ghc 9.6.7 → 9.8.1
raw patch · 551 files changed
+92878/−84350 lines, 551 filesdep +semaphore-compatdep ~basedep ~bytestringdep ~deepseqsetup-changedPVP ok
version bump matches the API change (PVP)
Dependencies added: semaphore-compat
Dependency ranges changed: base, bytestring, deepseq, ghc-boot, ghc-heap, ghci, hpc, template-haskell
API changes (from Hackage documentation)
- GHC: Opt_InfoTableMapWithFallback :: GeneralFlag
- GHC: Opt_InfoTableMapWithStack :: GeneralFlag
- GHC: Opt_SpecEval :: GeneralFlag
- GHC: Opt_SpecEvalDictFun :: GeneralFlag
- GHC: [modBreaks_module] :: ModBreaks -> RemotePtr ModuleName
- GHC.Builtin.Names: bitIntegerIdKey :: Unique
- GHC.Builtin.Names: tr'PtrRepLiftedKey :: Unique
- GHC.Builtin.Names: trLiftedRepKey :: Unique
- GHC.Builtin.Names: trRuntimeRepKey :: Unique
- GHC.Builtin.Names: trTYPE'PtrRepLiftedKey :: Unique
- GHC.Builtin.Names: trTYPEKey :: Unique
- GHC.Builtin.Names.TH: qqFun :: FastString -> Unique -> Name
- GHC.Builtin.Uniques: mkDataOccUnique :: FastString -> Unique
- GHC.Builtin.Uniques: mkTcOccUnique :: FastString -> Unique
- GHC.Builtin.Uniques: mkTvOccUnique :: FastString -> Unique
- GHC.Builtin.Uniques: mkVarOccUnique :: FastString -> Unique
- GHC.ByteCode.Types: [modBreaks_module] :: ModBreaks -> RemotePtr ModuleName
- GHC.Cmm: instance GHC.Classes.Ord GHC.Cmm.CmmInfoTable
- GHC.Cmm: instance GHC.Classes.Ord GHC.Cmm.ProfilingInfo
- GHC.Cmm.Expr: VGcPtr :: VGcPtr
- GHC.Cmm.Expr: VNonGcPtr :: VGcPtr
- GHC.Cmm.Expr: data VGcPtr
- GHC.Cmm.Expr: globalRegType :: Platform -> GlobalReg -> CmmType
- GHC.Cmm.Reg: VGcPtr :: VGcPtr
- GHC.Cmm.Reg: VNonGcPtr :: VGcPtr
- GHC.Cmm.Reg: data VGcPtr
- GHC.Cmm.Reg: globalRegType :: Platform -> GlobalReg -> CmmType
- GHC.Cmm.Reg: instance GHC.Classes.Eq GHC.Cmm.Reg.VGcPtr
- GHC.Cmm.Reg: instance GHC.Show.Show GHC.Cmm.Reg.VGcPtr
- GHC.CmmToAsm.AArch64.Instr: canFallthroughTo :: Instr -> BlockId -> Bool
- GHC.CmmToAsm.CFG.Dominators: asCGraph :: Tree Node -> Rooted
- GHC.CmmToAsm.Instr: canFallthroughTo :: Instruction instr => instr -> BlockId -> Bool
- GHC.CmmToAsm.PPC.Instr: canFallthroughTo :: Instr -> BlockId -> Bool
- GHC.CmmToAsm.Wasm.Types: wasmUniq :: WasmCodeGenM w Unique
- GHC.CmmToAsm.X86.Instr: canFallthroughTo :: Instr -> BlockId -> Bool
- GHC.Core.Coercion: mkFunCo1 :: HasDebugCallStack => Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
- GHC.Core.Coercion: mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
- GHC.Core.Coercion: mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
- GHC.Core.Coercion: mkNakedFunCo1 :: Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
- GHC.Core.Coercion: mkNakedFunCo2 :: Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
- GHC.Core.Coercion.Opt: checkAxInstCo :: Coercion -> Maybe CoAxBranch
- GHC.Core.DataCon: [flLabel] :: FieldLabel -> FieldLabelString
- GHC.Core.InstEnv: instance GHC.Base.Monoid GHC.Core.InstEnv.PotentialUnifiers
- GHC.Core.InstEnv: mkImportedInstance :: Name -> [RoughMatchTc] -> Name -> DFunId -> OverlapFlag -> IsOrphan -> ClsInst
- GHC.Core.InstEnv: mkLocalInstance :: DFunId -> OverlapFlag -> [TyVar] -> Class -> [Type] -> ClsInst
- GHC.Core.Make: mkWildEvBinder :: PredType -> EvVar
- GHC.Core.Opt.CallerCC: instance GHC.Utils.Binary.Binary GHC.Core.Opt.CallerCC.CallerCcFilter
- GHC.Core.Opt.CallerCC: instance GHC.Utils.Binary.Binary GHC.Core.Opt.CallerCC.NamePattern
- GHC.Core.Opt.CallerCC: instance GHC.Utils.Outputable.Outputable GHC.Core.Opt.CallerCC.CallerCcFilter
- GHC.Core.Opt.CallerCC: instance GHC.Utils.Outputable.Outputable GHC.Core.Opt.CallerCC.NamePattern
- GHC.Core.Opt.Monad: getUniqTag :: CoreM Char
- GHC.Core.Opt.Monad: instance GHC.Driver.Session.HasDynFlags GHC.Core.Opt.Monad.CoreM
- GHC.Core.Opt.OccurAnal: instance GHC.Utils.Outputable.Outputable GHC.Core.Opt.OccurAnal.Details
- GHC.Core.Predicate: hasIPSuperClasses :: Class -> [Type] -> Bool
- GHC.Core.Predicate: isEqPredClass :: Class -> Bool
- GHC.Core.Predicate: mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
- GHC.Core.Predicate: mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
- GHC.Core.TyCo.Rep: [fco_arg, fco_res] :: Coercion -> Coercion
- GHC.Core.TyCon: DataFamilyFlavour :: Maybe TyCon -> TyConFlavour
- GHC.Core.TyCon: LiftedRep :: PrimRep
- GHC.Core.TyCon: OpenTypeFamilyFlavour :: Maybe TyCon -> TyConFlavour
- GHC.Core.TyCon: UnliftedRep :: PrimRep
- GHC.Core.TyCon: instance GHC.Classes.Eq GHC.Core.TyCon.TyConFlavour
- GHC.Core.TyCon: instance GHC.Utils.Outputable.Outputable GHC.Core.TyCon.TyConFlavour
- GHC.Core.TyCon: mkInvisAnonTyConBinder :: TyVar -> TyConBinder
- GHC.Core.TyCon: type TyConPiTyBinder = VarBndr TyCoVar TyConBndrVis
- GHC.Core.Type: isConcrete :: Type -> Bool
- GHC.Core.Unfold: callSiteInline :: Logger -> UnfoldingOpts -> Int -> Id -> Bool -> Bool -> [ArgSummary] -> CallCtxt -> Maybe CoreExpr
- GHC.Core.Unfold: couldBeSmallEnoughToInline :: UnfoldingOpts -> Int -> CoreExpr -> Bool
- GHC.Core.Unfold: smallEnoughToInline :: UnfoldingOpts -> Unfolding -> Bool
- GHC.Core.UsageEnv: unitUE :: NamedThing n => n -> Mult -> UsageEnv
- GHC.Core.Utils: trivial_expr_fold :: (Id -> r) -> (Literal -> r) -> r -> r -> CoreExpr -> r
- GHC.CoreToStg.Prep: [cp_specEvalDFun] :: CorePrepConfig -> !Bool
- GHC.CoreToStg.Prep: [cp_specEval] :: CorePrepConfig -> !Bool
- GHC.Data.Bag: instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (GHC.Data.Bag.Bag a)
- GHC.Data.BooleanFormula: instance GHC.Utils.Binary.Binary a => GHC.Utils.Binary.Binary (GHC.Data.BooleanFormula.BooleanFormula a)
- GHC.Data.IOEnv: instance GHC.Driver.Session.ContainsDynFlags env => GHC.Driver.Session.HasDynFlags (GHC.Data.IOEnv.IOEnv env)
- GHC.Data.IOEnv: updMutVarM :: IORef a -> (a -> IOEnv env a) -> IOEnv env ()
- GHC.Data.Word64Map.Internal: (!) :: Word64Map a -> Key -> a
- GHC.Data.Word64Map.Internal: (!?) :: Word64Map a -> Key -> Maybe a
- GHC.Data.Word64Map.Internal: (\\) :: Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Internal: Bin :: {-# UNPACK #-} !Prefix -> {-# UNPACK #-} !Mask -> !Word64Map a -> !Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: Nil :: Word64Map a
- GHC.Data.Word64Map.Internal: Tip :: {-# UNPACK #-} !Key -> a -> Word64Map a
- GHC.Data.Word64Map.Internal: WhenMatched :: (Key -> x -> y -> f (Maybe z)) -> WhenMatched f x y z
- GHC.Data.Word64Map.Internal: WhenMissing :: (Word64Map x -> f (Word64Map y)) -> (Key -> x -> f (Maybe y)) -> WhenMissing f x y
- GHC.Data.Word64Map.Internal: [matchedKey] :: WhenMatched f x y z -> Key -> x -> y -> f (Maybe z)
- GHC.Data.Word64Map.Internal: [missingKey] :: WhenMissing f x y -> Key -> x -> f (Maybe y)
- GHC.Data.Word64Map.Internal: [missingSubtree] :: WhenMissing f x y -> Word64Map x -> f (Word64Map y)
- GHC.Data.Word64Map.Internal: adjust :: (a -> a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: adjustWithKey :: (Key -> a -> a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: alter :: (Maybe a -> Maybe a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: alterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key -> Word64Map a -> f (Word64Map a)
- GHC.Data.Word64Map.Internal: assocs :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Internal: bin :: Prefix -> Mask -> Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: binCheckLeft :: Prefix -> Mask -> Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: binCheckRight :: Prefix -> Mask -> Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: branchMask :: Prefix -> Prefix -> Mask
- GHC.Data.Word64Map.Internal: compose :: Word64Map c -> Word64Map Word64 -> Word64Map c
- GHC.Data.Word64Map.Internal: contramapFirstWhenMatched :: (b -> a) -> WhenMatched f a y z -> WhenMatched f b y z
- GHC.Data.Word64Map.Internal: contramapSecondWhenMatched :: (b -> a) -> WhenMatched f x a z -> WhenMatched f x b z
- GHC.Data.Word64Map.Internal: data WhenMissing f x y
- GHC.Data.Word64Map.Internal: data Word64Map a
- GHC.Data.Word64Map.Internal: delete :: Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: deleteFindMax :: Word64Map a -> ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Internal: deleteFindMin :: Word64Map a -> ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Internal: deleteMax :: Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: deleteMin :: Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: difference :: Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Internal: differenceWith :: (a -> b -> Maybe a) -> Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Internal: differenceWithKey :: (Key -> a -> b -> Maybe a) -> Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Internal: disjoint :: Word64Map a -> Word64Map b -> Bool
- GHC.Data.Word64Map.Internal: dropMissing :: Applicative f => WhenMissing f x y
- GHC.Data.Word64Map.Internal: dropWhileAntitone :: (Key -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: elems :: Word64Map a -> [a]
- GHC.Data.Word64Map.Internal: empty :: Word64Map a
- GHC.Data.Word64Map.Internal: filter :: (a -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: filterAMissing :: Applicative f => (Key -> x -> f Bool) -> WhenMissing f x x
- GHC.Data.Word64Map.Internal: filterMissing :: Applicative f => (Key -> x -> Bool) -> WhenMissing f x x
- GHC.Data.Word64Map.Internal: filterWithKey :: (Key -> a -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: findMax :: Word64Map a -> (Key, a)
- GHC.Data.Word64Map.Internal: findMin :: Word64Map a -> (Key, a)
- GHC.Data.Word64Map.Internal: findWithDefault :: a -> Key -> Word64Map a -> a
- GHC.Data.Word64Map.Internal: foldMapWithKey :: Monoid m => (Key -> a -> m) -> Word64Map a -> m
- GHC.Data.Word64Map.Internal: foldl :: (a -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Internal: foldl' :: (a -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Internal: foldlWithKey :: (a -> Key -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Internal: foldlWithKey' :: (a -> Key -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Internal: foldr :: (a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Internal: foldr' :: (a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Internal: foldrWithKey :: (Key -> a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Internal: foldrWithKey' :: (Key -> a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Internal: fromAscList :: [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Internal: fromAscListWith :: (a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Internal: fromAscListWithKey :: (Key -> a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Internal: fromDistinctAscList :: [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Internal: fromList :: [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Internal: fromListWith :: (a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Internal: fromListWithKey :: (Key -> a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Internal: fromSet :: (Key -> a) -> Word64Set -> Word64Map a
- GHC.Data.Word64Map.Internal: highestBitMask :: Word64 -> Word64
- GHC.Data.Word64Map.Internal: infixl 9 \\
- GHC.Data.Word64Map.Internal: insert :: Key -> a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: insertLookupWithKey :: (Key -> a -> a -> a) -> Key -> a -> Word64Map a -> (Maybe a, Word64Map a)
- GHC.Data.Word64Map.Internal: insertWith :: (a -> a -> a) -> Key -> a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: insertWithKey :: (Key -> a -> a -> a) -> Key -> a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: instance (GHC.Base.Applicative f, GHC.Base.Monad f) => Control.Category.Category (GHC.Data.Word64Map.Internal.WhenMissing f)
- GHC.Data.Word64Map.Internal: instance (GHC.Base.Applicative f, GHC.Base.Monad f) => GHC.Base.Applicative (GHC.Data.Word64Map.Internal.WhenMissing f x)
- GHC.Data.Word64Map.Internal: instance (GHC.Base.Applicative f, GHC.Base.Monad f) => GHC.Base.Functor (GHC.Data.Word64Map.Internal.WhenMissing f x)
- GHC.Data.Word64Map.Internal: instance (GHC.Base.Applicative f, GHC.Base.Monad f) => GHC.Base.Monad (GHC.Data.Word64Map.Internal.WhenMissing f x)
- GHC.Data.Word64Map.Internal: instance (GHC.Base.Monad f, GHC.Base.Applicative f) => Control.Category.Category (GHC.Data.Word64Map.Internal.WhenMatched f x)
- GHC.Data.Word64Map.Internal: instance (GHC.Base.Monad f, GHC.Base.Applicative f) => GHC.Base.Applicative (GHC.Data.Word64Map.Internal.WhenMatched f x y)
- GHC.Data.Word64Map.Internal: instance (GHC.Base.Monad f, GHC.Base.Applicative f) => GHC.Base.Monad (GHC.Data.Word64Map.Internal.WhenMatched f x y)
- GHC.Data.Word64Map.Internal: instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (GHC.Data.Word64Map.Internal.Word64Map a)
- GHC.Data.Word64Map.Internal: instance Data.Data.Data a => Data.Data.Data (GHC.Data.Word64Map.Internal.Word64Map a)
- GHC.Data.Word64Map.Internal: instance Data.Foldable.Foldable GHC.Data.Word64Map.Internal.Word64Map
- GHC.Data.Word64Map.Internal: instance Data.Functor.Classes.Eq1 GHC.Data.Word64Map.Internal.Word64Map
- GHC.Data.Word64Map.Internal: instance Data.Functor.Classes.Ord1 GHC.Data.Word64Map.Internal.Word64Map
- GHC.Data.Word64Map.Internal: instance Data.Functor.Classes.Read1 GHC.Data.Word64Map.Internal.Word64Map
- GHC.Data.Word64Map.Internal: instance Data.Functor.Classes.Show1 GHC.Data.Word64Map.Internal.Word64Map
- GHC.Data.Word64Map.Internal: instance Data.Traversable.Traversable GHC.Data.Word64Map.Internal.Word64Map
- GHC.Data.Word64Map.Internal: instance GHC.Base.Functor GHC.Data.Word64Map.Internal.Word64Map
- GHC.Data.Word64Map.Internal: instance GHC.Base.Functor f => GHC.Base.Functor (GHC.Data.Word64Map.Internal.WhenMatched f x y)
- GHC.Data.Word64Map.Internal: instance GHC.Base.Monoid (GHC.Data.Word64Map.Internal.Word64Map a)
- GHC.Data.Word64Map.Internal: instance GHC.Base.Semigroup (GHC.Data.Word64Map.Internal.Word64Map a)
- GHC.Data.Word64Map.Internal: instance GHC.Classes.Eq a => GHC.Classes.Eq (GHC.Data.Word64Map.Internal.Word64Map a)
- GHC.Data.Word64Map.Internal: instance GHC.Classes.Ord a => GHC.Classes.Ord (GHC.Data.Word64Map.Internal.Word64Map a)
- GHC.Data.Word64Map.Internal: instance GHC.IsList.IsList (GHC.Data.Word64Map.Internal.Word64Map a)
- GHC.Data.Word64Map.Internal: instance GHC.Read.Read e => GHC.Read.Read (GHC.Data.Word64Map.Internal.Word64Map e)
- GHC.Data.Word64Map.Internal: instance GHC.Show.Show a => GHC.Show.Show (GHC.Data.Word64Map.Internal.Word64Map a)
- GHC.Data.Word64Map.Internal: intFromNat :: Nat -> Key
- GHC.Data.Word64Map.Internal: intersection :: Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Internal: intersectionWith :: (a -> b -> c) -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Internal: intersectionWithKey :: (Key -> a -> b -> c) -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Internal: isProperSubmapOf :: Eq a => Word64Map a -> Word64Map a -> Bool
- GHC.Data.Word64Map.Internal: isProperSubmapOfBy :: (a -> b -> Bool) -> Word64Map a -> Word64Map b -> Bool
- GHC.Data.Word64Map.Internal: isSubmapOf :: Eq a => Word64Map a -> Word64Map a -> Bool
- GHC.Data.Word64Map.Internal: isSubmapOfBy :: (a -> b -> Bool) -> Word64Map a -> Word64Map b -> Bool
- GHC.Data.Word64Map.Internal: keys :: Word64Map a -> [Key]
- GHC.Data.Word64Map.Internal: keysSet :: Word64Map a -> Word64Set
- GHC.Data.Word64Map.Internal: link :: Prefix -> Word64Map a -> Prefix -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: linkWithMask :: Mask -> Prefix -> Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: lmapWhenMissing :: (b -> a) -> WhenMissing f a x -> WhenMissing f b x
- GHC.Data.Word64Map.Internal: lookup :: Key -> Word64Map a -> Maybe a
- GHC.Data.Word64Map.Internal: lookupGE :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Internal: lookupGT :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Internal: lookupLE :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Internal: lookupLT :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Internal: lookupMax :: Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Internal: lookupMin :: Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Internal: map :: (a -> b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Internal: mapAccum :: (a -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)
- GHC.Data.Word64Map.Internal: mapAccumRWithKey :: (a -> Key -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)
- GHC.Data.Word64Map.Internal: mapAccumWithKey :: (a -> Key -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)
- GHC.Data.Word64Map.Internal: mapEither :: (a -> Either b c) -> Word64Map a -> (Word64Map b, Word64Map c)
- GHC.Data.Word64Map.Internal: mapEitherWithKey :: (Key -> a -> Either b c) -> Word64Map a -> (Word64Map b, Word64Map c)
- GHC.Data.Word64Map.Internal: mapGentlyWhenMatched :: Functor f => (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b
- GHC.Data.Word64Map.Internal: mapGentlyWhenMissing :: Functor f => (a -> b) -> WhenMissing f x a -> WhenMissing f x b
- GHC.Data.Word64Map.Internal: mapKeys :: (Key -> Key) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: mapKeysMonotonic :: (Key -> Key) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: mapKeysWith :: (a -> a -> a) -> (Key -> Key) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: mapMaybe :: (a -> Maybe b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Internal: mapMaybeMissing :: Applicative f => (Key -> x -> Maybe y) -> WhenMissing f x y
- GHC.Data.Word64Map.Internal: mapMaybeWithKey :: (Key -> a -> Maybe b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Internal: mapMissing :: Applicative f => (Key -> x -> y) -> WhenMissing f x y
- GHC.Data.Word64Map.Internal: mapWhenMatched :: Functor f => (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b
- GHC.Data.Word64Map.Internal: mapWhenMissing :: (Applicative f, Monad f) => (a -> b) -> WhenMissing f x a -> WhenMissing f x b
- GHC.Data.Word64Map.Internal: mapWithKey :: (Key -> a -> b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Internal: mask :: Key -> Mask -> Prefix
- GHC.Data.Word64Map.Internal: maskW :: Nat -> Nat -> Prefix
- GHC.Data.Word64Map.Internal: match :: Key -> Prefix -> Mask -> Bool
- GHC.Data.Word64Map.Internal: maxView :: Word64Map a -> Maybe (a, Word64Map a)
- GHC.Data.Word64Map.Internal: maxViewWithKey :: Word64Map a -> Maybe ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Internal: member :: Key -> Word64Map a -> Bool
- GHC.Data.Word64Map.Internal: merge :: SimpleWhenMissing a c -> SimpleWhenMissing b c -> SimpleWhenMatched a b c -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Internal: mergeA :: Applicative f => WhenMissing f a c -> WhenMissing f b c -> WhenMatched f a b c -> Word64Map a -> Word64Map b -> f (Word64Map c)
- GHC.Data.Word64Map.Internal: mergeWithKey :: (Key -> a -> b -> Maybe c) -> (Word64Map a -> Word64Map c) -> (Word64Map b -> Word64Map c) -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Internal: mergeWithKey' :: (Prefix -> Mask -> Word64Map c -> Word64Map c -> Word64Map c) -> (Word64Map a -> Word64Map b -> Word64Map c) -> (Word64Map a -> Word64Map c) -> (Word64Map b -> Word64Map c) -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Internal: minView :: Word64Map a -> Maybe (a, Word64Map a)
- GHC.Data.Word64Map.Internal: minViewWithKey :: Word64Map a -> Maybe ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Internal: natFromInt :: Key -> Nat
- GHC.Data.Word64Map.Internal: newtype WhenMatched f x y z
- GHC.Data.Word64Map.Internal: nomatch :: Key -> Prefix -> Mask -> Bool
- GHC.Data.Word64Map.Internal: notMember :: Key -> Word64Map a -> Bool
- GHC.Data.Word64Map.Internal: null :: Word64Map a -> Bool
- GHC.Data.Word64Map.Internal: partition :: (a -> Bool) -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Internal: partitionWithKey :: (Key -> a -> Bool) -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Internal: preserveMissing :: Applicative f => WhenMissing f x x
- GHC.Data.Word64Map.Internal: restrictKeys :: Word64Map a -> Word64Set -> Word64Map a
- GHC.Data.Word64Map.Internal: runWhenMatched :: WhenMatched f x y z -> Key -> x -> y -> f (Maybe z)
- GHC.Data.Word64Map.Internal: runWhenMissing :: WhenMissing f x y -> Key -> x -> f (Maybe y)
- GHC.Data.Word64Map.Internal: shorter :: Mask -> Mask -> Bool
- GHC.Data.Word64Map.Internal: showTree :: Show a => Word64Map a -> String
- GHC.Data.Word64Map.Internal: showTreeWith :: Show a => Bool -> Bool -> Word64Map a -> String
- GHC.Data.Word64Map.Internal: singleton :: Key -> a -> Word64Map a
- GHC.Data.Word64Map.Internal: size :: Word64Map a -> Int
- GHC.Data.Word64Map.Internal: spanAntitone :: (Key -> Bool) -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Internal: split :: Key -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Internal: splitLookup :: Key -> Word64Map a -> (Word64Map a, Maybe a, Word64Map a)
- GHC.Data.Word64Map.Internal: splitRoot :: Word64Map a -> [Word64Map a]
- GHC.Data.Word64Map.Internal: takeWhileAntitone :: (Key -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: toAscList :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Internal: toDescList :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Internal: toList :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Internal: traverseMaybeMissing :: Applicative f => (Key -> x -> f (Maybe y)) -> WhenMissing f x y
- GHC.Data.Word64Map.Internal: traverseMaybeWithKey :: Applicative f => (Key -> a -> f (Maybe b)) -> Word64Map a -> f (Word64Map b)
- GHC.Data.Word64Map.Internal: traverseMissing :: Applicative f => (Key -> x -> f y) -> WhenMissing f x y
- GHC.Data.Word64Map.Internal: traverseWithKey :: Applicative t => (Key -> a -> t b) -> Word64Map a -> t (Word64Map b)
- GHC.Data.Word64Map.Internal: type Key = Word64
- GHC.Data.Word64Map.Internal: type Mask = Word64
- GHC.Data.Word64Map.Internal: type Nat = Word64
- GHC.Data.Word64Map.Internal: type Prefix = Word64
- GHC.Data.Word64Map.Internal: type SimpleWhenMatched = WhenMatched Identity
- GHC.Data.Word64Map.Internal: type SimpleWhenMissing = WhenMissing Identity
- GHC.Data.Word64Map.Internal: union :: Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: unionWith :: (a -> a -> a) -> Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: unionWithKey :: (Key -> a -> a -> a) -> Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: unions :: Foldable f => f (Word64Map a) -> Word64Map a
- GHC.Data.Word64Map.Internal: unionsWith :: Foldable f => (a -> a -> a) -> f (Word64Map a) -> Word64Map a
- GHC.Data.Word64Map.Internal: update :: (a -> Maybe a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: updateLookupWithKey :: (Key -> a -> Maybe a) -> Key -> Word64Map a -> (Maybe a, Word64Map a)
- GHC.Data.Word64Map.Internal: updateMax :: (a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: updateMaxWithKey :: (Key -> a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: updateMin :: (a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: updateMinWithKey :: (Key -> a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: updateWithKey :: (Key -> a -> Maybe a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Internal: withoutKeys :: Word64Map a -> Word64Set -> Word64Map a
- GHC.Data.Word64Map.Internal: zero :: Key -> Mask -> Bool
- GHC.Data.Word64Map.Internal: zipWithAMatched :: Applicative f => (Key -> x -> y -> f z) -> WhenMatched f x y z
- GHC.Data.Word64Map.Internal: zipWithMatched :: Applicative f => (Key -> x -> y -> z) -> WhenMatched f x y z
- GHC.Data.Word64Map.Internal: zipWithMaybeAMatched :: (Key -> x -> y -> f (Maybe z)) -> WhenMatched f x y z
- GHC.Data.Word64Map.Internal: zipWithMaybeMatched :: Applicative f => (Key -> x -> y -> Maybe z) -> WhenMatched f x y z
- GHC.Data.Word64Map.Lazy: (!) :: Word64Map a -> Key -> a
- GHC.Data.Word64Map.Lazy: (!?) :: Word64Map a -> Key -> Maybe a
- GHC.Data.Word64Map.Lazy: (\\) :: Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Lazy: adjust :: (a -> a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: adjustWithKey :: (Key -> a -> a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: alter :: (Maybe a -> Maybe a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: alterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key -> Word64Map a -> f (Word64Map a)
- GHC.Data.Word64Map.Lazy: assocs :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Lazy: compose :: Word64Map c -> Word64Map Word64 -> Word64Map c
- GHC.Data.Word64Map.Lazy: data Word64Map a
- GHC.Data.Word64Map.Lazy: delete :: Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: deleteFindMax :: Word64Map a -> ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Lazy: deleteFindMin :: Word64Map a -> ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Lazy: deleteMax :: Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: deleteMin :: Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: difference :: Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Lazy: differenceWith :: (a -> b -> Maybe a) -> Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Lazy: differenceWithKey :: (Key -> a -> b -> Maybe a) -> Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Lazy: disjoint :: Word64Map a -> Word64Map b -> Bool
- GHC.Data.Word64Map.Lazy: dropWhileAntitone :: (Key -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: elems :: Word64Map a -> [a]
- GHC.Data.Word64Map.Lazy: empty :: Word64Map a
- GHC.Data.Word64Map.Lazy: filter :: (a -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: filterWithKey :: (Key -> a -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: findMax :: Word64Map a -> (Key, a)
- GHC.Data.Word64Map.Lazy: findMin :: Word64Map a -> (Key, a)
- GHC.Data.Word64Map.Lazy: findWithDefault :: a -> Key -> Word64Map a -> a
- GHC.Data.Word64Map.Lazy: foldMapWithKey :: Monoid m => (Key -> a -> m) -> Word64Map a -> m
- GHC.Data.Word64Map.Lazy: foldl :: (a -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Lazy: foldl' :: (a -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Lazy: foldlWithKey :: (a -> Key -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Lazy: foldlWithKey' :: (a -> Key -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Lazy: foldr :: (a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Lazy: foldr' :: (a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Lazy: foldrWithKey :: (Key -> a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Lazy: foldrWithKey' :: (Key -> a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Lazy: fromAscList :: [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Lazy: fromAscListWith :: (a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Lazy: fromAscListWithKey :: (Key -> a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Lazy: fromDistinctAscList :: [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Lazy: fromList :: [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Lazy: fromListWith :: (a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Lazy: fromListWithKey :: (Key -> a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Lazy: fromSet :: (Key -> a) -> Word64Set -> Word64Map a
- GHC.Data.Word64Map.Lazy: infixl 9 \\
- GHC.Data.Word64Map.Lazy: insert :: Key -> a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: insertLookupWithKey :: (Key -> a -> a -> a) -> Key -> a -> Word64Map a -> (Maybe a, Word64Map a)
- GHC.Data.Word64Map.Lazy: insertWith :: (a -> a -> a) -> Key -> a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: insertWithKey :: (Key -> a -> a -> a) -> Key -> a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: intersection :: Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Lazy: intersectionWith :: (a -> b -> c) -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Lazy: intersectionWithKey :: (Key -> a -> b -> c) -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Lazy: isProperSubmapOf :: Eq a => Word64Map a -> Word64Map a -> Bool
- GHC.Data.Word64Map.Lazy: isProperSubmapOfBy :: (a -> b -> Bool) -> Word64Map a -> Word64Map b -> Bool
- GHC.Data.Word64Map.Lazy: isSubmapOf :: Eq a => Word64Map a -> Word64Map a -> Bool
- GHC.Data.Word64Map.Lazy: isSubmapOfBy :: (a -> b -> Bool) -> Word64Map a -> Word64Map b -> Bool
- GHC.Data.Word64Map.Lazy: keys :: Word64Map a -> [Key]
- GHC.Data.Word64Map.Lazy: keysSet :: Word64Map a -> Word64Set
- GHC.Data.Word64Map.Lazy: lookup :: Key -> Word64Map a -> Maybe a
- GHC.Data.Word64Map.Lazy: lookupGE :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Lazy: lookupGT :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Lazy: lookupLE :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Lazy: lookupLT :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Lazy: lookupMax :: Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Lazy: lookupMin :: Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Lazy: map :: (a -> b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Lazy: mapAccum :: (a -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)
- GHC.Data.Word64Map.Lazy: mapAccumRWithKey :: (a -> Key -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)
- GHC.Data.Word64Map.Lazy: mapAccumWithKey :: (a -> Key -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)
- GHC.Data.Word64Map.Lazy: mapEither :: (a -> Either b c) -> Word64Map a -> (Word64Map b, Word64Map c)
- GHC.Data.Word64Map.Lazy: mapEitherWithKey :: (Key -> a -> Either b c) -> Word64Map a -> (Word64Map b, Word64Map c)
- GHC.Data.Word64Map.Lazy: mapKeys :: (Key -> Key) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: mapKeysMonotonic :: (Key -> Key) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: mapKeysWith :: (a -> a -> a) -> (Key -> Key) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: mapMaybe :: (a -> Maybe b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Lazy: mapMaybeWithKey :: (Key -> a -> Maybe b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Lazy: mapWithKey :: (Key -> a -> b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Lazy: maxView :: Word64Map a -> Maybe (a, Word64Map a)
- GHC.Data.Word64Map.Lazy: maxViewWithKey :: Word64Map a -> Maybe ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Lazy: member :: Key -> Word64Map a -> Bool
- GHC.Data.Word64Map.Lazy: mergeWithKey :: (Key -> a -> b -> Maybe c) -> (Word64Map a -> Word64Map c) -> (Word64Map b -> Word64Map c) -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Lazy: minView :: Word64Map a -> Maybe (a, Word64Map a)
- GHC.Data.Word64Map.Lazy: minViewWithKey :: Word64Map a -> Maybe ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Lazy: notMember :: Key -> Word64Map a -> Bool
- GHC.Data.Word64Map.Lazy: null :: Word64Map a -> Bool
- GHC.Data.Word64Map.Lazy: partition :: (a -> Bool) -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Lazy: partitionWithKey :: (Key -> a -> Bool) -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Lazy: restrictKeys :: Word64Map a -> Word64Set -> Word64Map a
- GHC.Data.Word64Map.Lazy: singleton :: Key -> a -> Word64Map a
- GHC.Data.Word64Map.Lazy: size :: Word64Map a -> Int
- GHC.Data.Word64Map.Lazy: spanAntitone :: (Key -> Bool) -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Lazy: split :: Key -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Lazy: splitLookup :: Key -> Word64Map a -> (Word64Map a, Maybe a, Word64Map a)
- GHC.Data.Word64Map.Lazy: splitRoot :: Word64Map a -> [Word64Map a]
- GHC.Data.Word64Map.Lazy: takeWhileAntitone :: (Key -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: toAscList :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Lazy: toDescList :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Lazy: toList :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Lazy: traverseMaybeWithKey :: Applicative f => (Key -> a -> f (Maybe b)) -> Word64Map a -> f (Word64Map b)
- GHC.Data.Word64Map.Lazy: traverseWithKey :: Applicative t => (Key -> a -> t b) -> Word64Map a -> t (Word64Map b)
- GHC.Data.Word64Map.Lazy: type Key = Word64
- GHC.Data.Word64Map.Lazy: union :: Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: unionWith :: (a -> a -> a) -> Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: unionWithKey :: (Key -> a -> a -> a) -> Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: unions :: Foldable f => f (Word64Map a) -> Word64Map a
- GHC.Data.Word64Map.Lazy: unionsWith :: Foldable f => (a -> a -> a) -> f (Word64Map a) -> Word64Map a
- GHC.Data.Word64Map.Lazy: update :: (a -> Maybe a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: updateLookupWithKey :: (Key -> a -> Maybe a) -> Key -> Word64Map a -> (Maybe a, Word64Map a)
- GHC.Data.Word64Map.Lazy: updateMax :: (a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: updateMaxWithKey :: (Key -> a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: updateMin :: (a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: updateMinWithKey :: (Key -> a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: updateWithKey :: (Key -> a -> Maybe a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Lazy: withoutKeys :: Word64Map a -> Word64Set -> Word64Map a
- GHC.Data.Word64Map.Strict: (!) :: Word64Map a -> Key -> a
- GHC.Data.Word64Map.Strict: (!?) :: Word64Map a -> Key -> Maybe a
- GHC.Data.Word64Map.Strict: (\\) :: Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Strict: adjust :: (a -> a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: adjustWithKey :: (Key -> a -> a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: alter :: (Maybe a -> Maybe a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: alterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key -> Word64Map a -> f (Word64Map a)
- GHC.Data.Word64Map.Strict: assocs :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Strict: compose :: Word64Map c -> Word64Map Word64 -> Word64Map c
- GHC.Data.Word64Map.Strict: data Word64Map a
- GHC.Data.Word64Map.Strict: delete :: Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: deleteFindMax :: Word64Map a -> ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Strict: deleteFindMin :: Word64Map a -> ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Strict: deleteMax :: Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: deleteMin :: Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: difference :: Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Strict: differenceWith :: (a -> b -> Maybe a) -> Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Strict: differenceWithKey :: (Key -> a -> b -> Maybe a) -> Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Strict: disjoint :: Word64Map a -> Word64Map b -> Bool
- GHC.Data.Word64Map.Strict: dropWhileAntitone :: (Key -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: elems :: Word64Map a -> [a]
- GHC.Data.Word64Map.Strict: empty :: Word64Map a
- GHC.Data.Word64Map.Strict: filter :: (a -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: filterWithKey :: (Key -> a -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: findMax :: Word64Map a -> (Key, a)
- GHC.Data.Word64Map.Strict: findMin :: Word64Map a -> (Key, a)
- GHC.Data.Word64Map.Strict: findWithDefault :: a -> Key -> Word64Map a -> a
- GHC.Data.Word64Map.Strict: foldMapWithKey :: Monoid m => (Key -> a -> m) -> Word64Map a -> m
- GHC.Data.Word64Map.Strict: foldl :: (a -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Strict: foldl' :: (a -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Strict: foldlWithKey :: (a -> Key -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Strict: foldlWithKey' :: (a -> Key -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Strict: foldr :: (a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Strict: foldr' :: (a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Strict: foldrWithKey :: (Key -> a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Strict: foldrWithKey' :: (Key -> a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Strict: fromAscList :: [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict: fromAscListWith :: (a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict: fromAscListWithKey :: (Key -> a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict: fromDistinctAscList :: [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict: fromList :: [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict: fromListWith :: (a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict: fromListWithKey :: (Key -> a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict: fromSet :: (Key -> a) -> Word64Set -> Word64Map a
- GHC.Data.Word64Map.Strict: infixl 9 \\
- GHC.Data.Word64Map.Strict: insert :: Key -> a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: insertLookupWithKey :: (Key -> a -> a -> a) -> Key -> a -> Word64Map a -> (Maybe a, Word64Map a)
- GHC.Data.Word64Map.Strict: insertWith :: (a -> a -> a) -> Key -> a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: insertWithKey :: (Key -> a -> a -> a) -> Key -> a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: intersection :: Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Strict: intersectionWith :: (a -> b -> c) -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Strict: intersectionWithKey :: (Key -> a -> b -> c) -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Strict: isProperSubmapOf :: Eq a => Word64Map a -> Word64Map a -> Bool
- GHC.Data.Word64Map.Strict: isProperSubmapOfBy :: (a -> b -> Bool) -> Word64Map a -> Word64Map b -> Bool
- GHC.Data.Word64Map.Strict: isSubmapOf :: Eq a => Word64Map a -> Word64Map a -> Bool
- GHC.Data.Word64Map.Strict: isSubmapOfBy :: (a -> b -> Bool) -> Word64Map a -> Word64Map b -> Bool
- GHC.Data.Word64Map.Strict: keys :: Word64Map a -> [Key]
- GHC.Data.Word64Map.Strict: keysSet :: Word64Map a -> Word64Set
- GHC.Data.Word64Map.Strict: lookup :: Key -> Word64Map a -> Maybe a
- GHC.Data.Word64Map.Strict: lookupGE :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Strict: lookupGT :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Strict: lookupLE :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Strict: lookupLT :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Strict: lookupMax :: Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Strict: lookupMin :: Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Strict: map :: (a -> b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Strict: mapAccum :: (a -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)
- GHC.Data.Word64Map.Strict: mapAccumRWithKey :: (a -> Key -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)
- GHC.Data.Word64Map.Strict: mapAccumWithKey :: (a -> Key -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)
- GHC.Data.Word64Map.Strict: mapEither :: (a -> Either b c) -> Word64Map a -> (Word64Map b, Word64Map c)
- GHC.Data.Word64Map.Strict: mapEitherWithKey :: (Key -> a -> Either b c) -> Word64Map a -> (Word64Map b, Word64Map c)
- GHC.Data.Word64Map.Strict: mapKeys :: (Key -> Key) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: mapKeysMonotonic :: (Key -> Key) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: mapKeysWith :: (a -> a -> a) -> (Key -> Key) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: mapMaybe :: (a -> Maybe b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Strict: mapMaybeWithKey :: (Key -> a -> Maybe b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Strict: mapWithKey :: (Key -> a -> b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Strict: maxView :: Word64Map a -> Maybe (a, Word64Map a)
- GHC.Data.Word64Map.Strict: maxViewWithKey :: Word64Map a -> Maybe ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Strict: member :: Key -> Word64Map a -> Bool
- GHC.Data.Word64Map.Strict: mergeWithKey :: (Key -> a -> b -> Maybe c) -> (Word64Map a -> Word64Map c) -> (Word64Map b -> Word64Map c) -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Strict: minView :: Word64Map a -> Maybe (a, Word64Map a)
- GHC.Data.Word64Map.Strict: minViewWithKey :: Word64Map a -> Maybe ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Strict: notMember :: Key -> Word64Map a -> Bool
- GHC.Data.Word64Map.Strict: null :: Word64Map a -> Bool
- GHC.Data.Word64Map.Strict: partition :: (a -> Bool) -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Strict: partitionWithKey :: (Key -> a -> Bool) -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Strict: restrictKeys :: Word64Map a -> Word64Set -> Word64Map a
- GHC.Data.Word64Map.Strict: singleton :: Key -> a -> Word64Map a
- GHC.Data.Word64Map.Strict: size :: Word64Map a -> Int
- GHC.Data.Word64Map.Strict: spanAntitone :: (Key -> Bool) -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Strict: split :: Key -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Strict: splitLookup :: Key -> Word64Map a -> (Word64Map a, Maybe a, Word64Map a)
- GHC.Data.Word64Map.Strict: splitRoot :: Word64Map a -> [Word64Map a]
- GHC.Data.Word64Map.Strict: takeWhileAntitone :: (Key -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: toAscList :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Strict: toDescList :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Strict: toList :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Strict: traverseMaybeWithKey :: Applicative f => (Key -> a -> f (Maybe b)) -> Word64Map a -> f (Word64Map b)
- GHC.Data.Word64Map.Strict: traverseWithKey :: Applicative t => (Key -> a -> t b) -> Word64Map a -> t (Word64Map b)
- GHC.Data.Word64Map.Strict: type Key = Word64
- GHC.Data.Word64Map.Strict: union :: Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: unionWith :: (a -> a -> a) -> Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: unionWithKey :: (Key -> a -> a -> a) -> Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: unions :: Foldable f => f (Word64Map a) -> Word64Map a
- GHC.Data.Word64Map.Strict: unionsWith :: Foldable f => (a -> a -> a) -> f (Word64Map a) -> Word64Map a
- GHC.Data.Word64Map.Strict: update :: (a -> Maybe a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: updateLookupWithKey :: (Key -> a -> Maybe a) -> Key -> Word64Map a -> (Maybe a, Word64Map a)
- GHC.Data.Word64Map.Strict: updateMax :: (a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: updateMaxWithKey :: (Key -> a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: updateMin :: (a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: updateMinWithKey :: (Key -> a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: updateWithKey :: (Key -> a -> Maybe a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict: withoutKeys :: Word64Map a -> Word64Set -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: (!) :: Word64Map a -> Key -> a
- GHC.Data.Word64Map.Strict.Internal: (!?) :: Word64Map a -> Key -> Maybe a
- GHC.Data.Word64Map.Strict.Internal: (\\) :: Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: adjust :: (a -> a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: adjustWithKey :: (Key -> a -> a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: alter :: (Maybe a -> Maybe a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: alterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key -> Word64Map a -> f (Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: assocs :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Strict.Internal: compose :: Word64Map c -> Word64Map Word64 -> Word64Map c
- GHC.Data.Word64Map.Strict.Internal: data Word64Map a
- GHC.Data.Word64Map.Strict.Internal: delete :: Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: deleteFindMax :: Word64Map a -> ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: deleteFindMin :: Word64Map a -> ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: deleteMax :: Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: deleteMin :: Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: difference :: Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: differenceWith :: (a -> b -> Maybe a) -> Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: differenceWithKey :: (Key -> a -> b -> Maybe a) -> Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: disjoint :: Word64Map a -> Word64Map b -> Bool
- GHC.Data.Word64Map.Strict.Internal: dropWhileAntitone :: (Key -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: elems :: Word64Map a -> [a]
- GHC.Data.Word64Map.Strict.Internal: empty :: Word64Map a
- GHC.Data.Word64Map.Strict.Internal: filter :: (a -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: filterWithKey :: (Key -> a -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: findMax :: Word64Map a -> (Key, a)
- GHC.Data.Word64Map.Strict.Internal: findMin :: Word64Map a -> (Key, a)
- GHC.Data.Word64Map.Strict.Internal: findWithDefault :: a -> Key -> Word64Map a -> a
- GHC.Data.Word64Map.Strict.Internal: foldMapWithKey :: Monoid m => (Key -> a -> m) -> Word64Map a -> m
- GHC.Data.Word64Map.Strict.Internal: foldl :: (a -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Strict.Internal: foldl' :: (a -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Strict.Internal: foldlWithKey :: (a -> Key -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Strict.Internal: foldlWithKey' :: (a -> Key -> b -> a) -> a -> Word64Map b -> a
- GHC.Data.Word64Map.Strict.Internal: foldr :: (a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Strict.Internal: foldr' :: (a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Strict.Internal: foldrWithKey :: (Key -> a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Strict.Internal: foldrWithKey' :: (Key -> a -> b -> b) -> b -> Word64Map a -> b
- GHC.Data.Word64Map.Strict.Internal: fromAscList :: [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: fromAscListWith :: (a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: fromAscListWithKey :: (Key -> a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: fromDistinctAscList :: [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: fromList :: [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: fromListWith :: (a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: fromListWithKey :: (Key -> a -> a -> a) -> [(Key, a)] -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: fromSet :: (Key -> a) -> Word64Set -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: infixl 9 \\
- GHC.Data.Word64Map.Strict.Internal: insert :: Key -> a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: insertLookupWithKey :: (Key -> a -> a -> a) -> Key -> a -> Word64Map a -> (Maybe a, Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: insertWith :: (a -> a -> a) -> Key -> a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: insertWithKey :: (Key -> a -> a -> a) -> Key -> a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: intersection :: Word64Map a -> Word64Map b -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: intersectionWith :: (a -> b -> c) -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Strict.Internal: intersectionWithKey :: (Key -> a -> b -> c) -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Strict.Internal: isProperSubmapOf :: Eq a => Word64Map a -> Word64Map a -> Bool
- GHC.Data.Word64Map.Strict.Internal: isProperSubmapOfBy :: (a -> b -> Bool) -> Word64Map a -> Word64Map b -> Bool
- GHC.Data.Word64Map.Strict.Internal: isSubmapOf :: Eq a => Word64Map a -> Word64Map a -> Bool
- GHC.Data.Word64Map.Strict.Internal: isSubmapOfBy :: (a -> b -> Bool) -> Word64Map a -> Word64Map b -> Bool
- GHC.Data.Word64Map.Strict.Internal: keys :: Word64Map a -> [Key]
- GHC.Data.Word64Map.Strict.Internal: keysSet :: Word64Map a -> Word64Set
- GHC.Data.Word64Map.Strict.Internal: lookup :: Key -> Word64Map a -> Maybe a
- GHC.Data.Word64Map.Strict.Internal: lookupGE :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Strict.Internal: lookupGT :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Strict.Internal: lookupLE :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Strict.Internal: lookupLT :: Key -> Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Strict.Internal: lookupMax :: Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Strict.Internal: lookupMin :: Word64Map a -> Maybe (Key, a)
- GHC.Data.Word64Map.Strict.Internal: map :: (a -> b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Strict.Internal: mapAccum :: (a -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)
- GHC.Data.Word64Map.Strict.Internal: mapAccumRWithKey :: (a -> Key -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)
- GHC.Data.Word64Map.Strict.Internal: mapAccumWithKey :: (a -> Key -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)
- GHC.Data.Word64Map.Strict.Internal: mapEither :: (a -> Either b c) -> Word64Map a -> (Word64Map b, Word64Map c)
- GHC.Data.Word64Map.Strict.Internal: mapEitherWithKey :: (Key -> a -> Either b c) -> Word64Map a -> (Word64Map b, Word64Map c)
- GHC.Data.Word64Map.Strict.Internal: mapKeys :: (Key -> Key) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: mapKeysMonotonic :: (Key -> Key) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: mapKeysWith :: (a -> a -> a) -> (Key -> Key) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: mapMaybe :: (a -> Maybe b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Strict.Internal: mapMaybeWithKey :: (Key -> a -> Maybe b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Strict.Internal: mapWithKey :: (Key -> a -> b) -> Word64Map a -> Word64Map b
- GHC.Data.Word64Map.Strict.Internal: maxView :: Word64Map a -> Maybe (a, Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: maxViewWithKey :: Word64Map a -> Maybe ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: member :: Key -> Word64Map a -> Bool
- GHC.Data.Word64Map.Strict.Internal: mergeWithKey :: (Key -> a -> b -> Maybe c) -> (Word64Map a -> Word64Map c) -> (Word64Map b -> Word64Map c) -> Word64Map a -> Word64Map b -> Word64Map c
- GHC.Data.Word64Map.Strict.Internal: minView :: Word64Map a -> Maybe (a, Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: minViewWithKey :: Word64Map a -> Maybe ((Key, a), Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: notMember :: Key -> Word64Map a -> Bool
- GHC.Data.Word64Map.Strict.Internal: null :: Word64Map a -> Bool
- GHC.Data.Word64Map.Strict.Internal: partition :: (a -> Bool) -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: partitionWithKey :: (Key -> a -> Bool) -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: restrictKeys :: Word64Map a -> Word64Set -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: singleton :: Key -> a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: size :: Word64Map a -> Int
- GHC.Data.Word64Map.Strict.Internal: spanAntitone :: (Key -> Bool) -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: split :: Key -> Word64Map a -> (Word64Map a, Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: splitLookup :: Key -> Word64Map a -> (Word64Map a, Maybe a, Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: splitRoot :: Word64Map a -> [Word64Map a]
- GHC.Data.Word64Map.Strict.Internal: takeWhileAntitone :: (Key -> Bool) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: toAscList :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Strict.Internal: toDescList :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Strict.Internal: toList :: Word64Map a -> [(Key, a)]
- GHC.Data.Word64Map.Strict.Internal: traverseMaybeWithKey :: Applicative f => (Key -> a -> f (Maybe b)) -> Word64Map a -> f (Word64Map b)
- GHC.Data.Word64Map.Strict.Internal: traverseWithKey :: Applicative t => (Key -> a -> t b) -> Word64Map a -> t (Word64Map b)
- GHC.Data.Word64Map.Strict.Internal: type Key = Word64
- GHC.Data.Word64Map.Strict.Internal: union :: Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: unionWith :: (a -> a -> a) -> Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: unionWithKey :: (Key -> a -> a -> a) -> Word64Map a -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: unions :: Foldable f => f (Word64Map a) -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: unionsWith :: Foldable f => (a -> a -> a) -> f (Word64Map a) -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: update :: (a -> Maybe a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: updateLookupWithKey :: (Key -> a -> Maybe a) -> Key -> Word64Map a -> (Maybe a, Word64Map a)
- GHC.Data.Word64Map.Strict.Internal: updateMax :: (a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: updateMaxWithKey :: (Key -> a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: updateMin :: (a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: updateMinWithKey :: (Key -> a -> Maybe a) -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: updateWithKey :: (Key -> a -> Maybe a) -> Key -> Word64Map a -> Word64Map a
- GHC.Data.Word64Map.Strict.Internal: withoutKeys :: Word64Map a -> Word64Set -> Word64Map a
- GHC.Data.Word64Set: (\\) :: Word64Set -> Word64Set -> Word64Set
- GHC.Data.Word64Set: alterF :: Functor f => (Bool -> f Bool) -> Key -> Word64Set -> f Word64Set
- GHC.Data.Word64Set: data Word64Set
- GHC.Data.Word64Set: delete :: Key -> Word64Set -> Word64Set
- GHC.Data.Word64Set: deleteFindMax :: Word64Set -> (Key, Word64Set)
- GHC.Data.Word64Set: deleteFindMin :: Word64Set -> (Key, Word64Set)
- GHC.Data.Word64Set: deleteMax :: Word64Set -> Word64Set
- GHC.Data.Word64Set: deleteMin :: Word64Set -> Word64Set
- GHC.Data.Word64Set: difference :: Word64Set -> Word64Set -> Word64Set
- GHC.Data.Word64Set: disjoint :: Word64Set -> Word64Set -> Bool
- GHC.Data.Word64Set: dropWhileAntitone :: (Key -> Bool) -> Word64Set -> Word64Set
- GHC.Data.Word64Set: elems :: Word64Set -> [Key]
- GHC.Data.Word64Set: empty :: Word64Set
- GHC.Data.Word64Set: filter :: (Key -> Bool) -> Word64Set -> Word64Set
- GHC.Data.Word64Set: findMax :: Word64Set -> Key
- GHC.Data.Word64Set: findMin :: Word64Set -> Key
- GHC.Data.Word64Set: fold :: (Key -> b -> b) -> b -> Word64Set -> b
- GHC.Data.Word64Set: foldl :: (a -> Key -> a) -> a -> Word64Set -> a
- GHC.Data.Word64Set: foldl' :: (a -> Key -> a) -> a -> Word64Set -> a
- GHC.Data.Word64Set: foldr :: (Key -> b -> b) -> b -> Word64Set -> b
- GHC.Data.Word64Set: foldr' :: (Key -> b -> b) -> b -> Word64Set -> b
- GHC.Data.Word64Set: fromAscList :: [Key] -> Word64Set
- GHC.Data.Word64Set: fromDistinctAscList :: [Key] -> Word64Set
- GHC.Data.Word64Set: fromList :: [Key] -> Word64Set
- GHC.Data.Word64Set: infixl 9 \\
- GHC.Data.Word64Set: insert :: Key -> Word64Set -> Word64Set
- GHC.Data.Word64Set: intersection :: Word64Set -> Word64Set -> Word64Set
- GHC.Data.Word64Set: isProperSubsetOf :: Word64Set -> Word64Set -> Bool
- GHC.Data.Word64Set: isSubsetOf :: Word64Set -> Word64Set -> Bool
- GHC.Data.Word64Set: lookupGE :: Key -> Word64Set -> Maybe Key
- GHC.Data.Word64Set: lookupGT :: Key -> Word64Set -> Maybe Key
- GHC.Data.Word64Set: lookupLE :: Key -> Word64Set -> Maybe Key
- GHC.Data.Word64Set: lookupLT :: Key -> Word64Set -> Maybe Key
- GHC.Data.Word64Set: map :: (Key -> Key) -> Word64Set -> Word64Set
- GHC.Data.Word64Set: mapMonotonic :: (Key -> Key) -> Word64Set -> Word64Set
- GHC.Data.Word64Set: maxView :: Word64Set -> Maybe (Key, Word64Set)
- GHC.Data.Word64Set: member :: Key -> Word64Set -> Bool
- GHC.Data.Word64Set: minView :: Word64Set -> Maybe (Key, Word64Set)
- GHC.Data.Word64Set: notMember :: Key -> Word64Set -> Bool
- GHC.Data.Word64Set: null :: Word64Set -> Bool
- GHC.Data.Word64Set: partition :: (Key -> Bool) -> Word64Set -> (Word64Set, Word64Set)
- GHC.Data.Word64Set: showTree :: Word64Set -> String
- GHC.Data.Word64Set: showTreeWith :: Bool -> Bool -> Word64Set -> String
- GHC.Data.Word64Set: singleton :: Key -> Word64Set
- GHC.Data.Word64Set: size :: Word64Set -> Int
- GHC.Data.Word64Set: spanAntitone :: (Key -> Bool) -> Word64Set -> (Word64Set, Word64Set)
- GHC.Data.Word64Set: split :: Key -> Word64Set -> (Word64Set, Word64Set)
- GHC.Data.Word64Set: splitMember :: Key -> Word64Set -> (Word64Set, Bool, Word64Set)
- GHC.Data.Word64Set: splitRoot :: Word64Set -> [Word64Set]
- GHC.Data.Word64Set: takeWhileAntitone :: (Key -> Bool) -> Word64Set -> Word64Set
- GHC.Data.Word64Set: toAscList :: Word64Set -> [Key]
- GHC.Data.Word64Set: toDescList :: Word64Set -> [Key]
- GHC.Data.Word64Set: toList :: Word64Set -> [Key]
- GHC.Data.Word64Set: type Key = Word64
- GHC.Data.Word64Set: union :: Word64Set -> Word64Set -> Word64Set
- GHC.Data.Word64Set: unions :: Foldable f => f Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: (\\) :: Word64Set -> Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: Bin :: {-# UNPACK #-} !Prefix -> {-# UNPACK #-} !Mask -> !Word64Set -> !Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: Nil :: Word64Set
- GHC.Data.Word64Set.Internal: Tip :: {-# UNPACK #-} !Prefix -> {-# UNPACK #-} !BitMap -> Word64Set
- GHC.Data.Word64Set.Internal: alterF :: Functor f => (Bool -> f Bool) -> Key -> Word64Set -> f Word64Set
- GHC.Data.Word64Set.Internal: bitmapOf :: Word64 -> BitMap
- GHC.Data.Word64Set.Internal: data Word64Set
- GHC.Data.Word64Set.Internal: delete :: Key -> Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: deleteFindMax :: Word64Set -> (Key, Word64Set)
- GHC.Data.Word64Set.Internal: deleteFindMin :: Word64Set -> (Key, Word64Set)
- GHC.Data.Word64Set.Internal: deleteMax :: Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: deleteMin :: Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: difference :: Word64Set -> Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: disjoint :: Word64Set -> Word64Set -> Bool
- GHC.Data.Word64Set.Internal: dropWhileAntitone :: (Key -> Bool) -> Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: elems :: Word64Set -> [Key]
- GHC.Data.Word64Set.Internal: empty :: Word64Set
- GHC.Data.Word64Set.Internal: filter :: (Key -> Bool) -> Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: findMax :: Word64Set -> Key
- GHC.Data.Word64Set.Internal: findMin :: Word64Set -> Key
- GHC.Data.Word64Set.Internal: fold :: (Key -> b -> b) -> b -> Word64Set -> b
- GHC.Data.Word64Set.Internal: foldl :: (a -> Key -> a) -> a -> Word64Set -> a
- GHC.Data.Word64Set.Internal: foldl' :: (a -> Key -> a) -> a -> Word64Set -> a
- GHC.Data.Word64Set.Internal: foldr :: (Key -> b -> b) -> b -> Word64Set -> b
- GHC.Data.Word64Set.Internal: foldr' :: (Key -> b -> b) -> b -> Word64Set -> b
- GHC.Data.Word64Set.Internal: fromAscList :: [Key] -> Word64Set
- GHC.Data.Word64Set.Internal: fromDistinctAscList :: [Key] -> Word64Set
- GHC.Data.Word64Set.Internal: fromList :: [Key] -> Word64Set
- GHC.Data.Word64Set.Internal: infixl 9 \\
- GHC.Data.Word64Set.Internal: insert :: Key -> Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: instance Control.DeepSeq.NFData GHC.Data.Word64Set.Internal.Word64Set
- GHC.Data.Word64Set.Internal: instance Data.Data.Data GHC.Data.Word64Set.Internal.Word64Set
- GHC.Data.Word64Set.Internal: instance GHC.Base.Monoid GHC.Data.Word64Set.Internal.Word64Set
- GHC.Data.Word64Set.Internal: instance GHC.Base.Semigroup GHC.Data.Word64Set.Internal.Word64Set
- GHC.Data.Word64Set.Internal: instance GHC.Classes.Eq GHC.Data.Word64Set.Internal.Word64Set
- GHC.Data.Word64Set.Internal: instance GHC.Classes.Ord GHC.Data.Word64Set.Internal.Word64Set
- GHC.Data.Word64Set.Internal: instance GHC.IsList.IsList GHC.Data.Word64Set.Internal.Word64Set
- GHC.Data.Word64Set.Internal: instance GHC.Read.Read GHC.Data.Word64Set.Internal.Word64Set
- GHC.Data.Word64Set.Internal: instance GHC.Show.Show GHC.Data.Word64Set.Internal.Word64Set
- GHC.Data.Word64Set.Internal: intersection :: Word64Set -> Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: isProperSubsetOf :: Word64Set -> Word64Set -> Bool
- GHC.Data.Word64Set.Internal: isSubsetOf :: Word64Set -> Word64Set -> Bool
- GHC.Data.Word64Set.Internal: lookupGE :: Key -> Word64Set -> Maybe Key
- GHC.Data.Word64Set.Internal: lookupGT :: Key -> Word64Set -> Maybe Key
- GHC.Data.Word64Set.Internal: lookupLE :: Key -> Word64Set -> Maybe Key
- GHC.Data.Word64Set.Internal: lookupLT :: Key -> Word64Set -> Maybe Key
- GHC.Data.Word64Set.Internal: map :: (Key -> Key) -> Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: mapMonotonic :: (Key -> Key) -> Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: match :: Word64 -> Prefix -> Mask -> Bool
- GHC.Data.Word64Set.Internal: maxView :: Word64Set -> Maybe (Key, Word64Set)
- GHC.Data.Word64Set.Internal: member :: Key -> Word64Set -> Bool
- GHC.Data.Word64Set.Internal: minView :: Word64Set -> Maybe (Key, Word64Set)
- GHC.Data.Word64Set.Internal: notMember :: Key -> Word64Set -> Bool
- GHC.Data.Word64Set.Internal: null :: Word64Set -> Bool
- GHC.Data.Word64Set.Internal: partition :: (Key -> Bool) -> Word64Set -> (Word64Set, Word64Set)
- GHC.Data.Word64Set.Internal: prefixBitMask :: Word64
- GHC.Data.Word64Set.Internal: showTree :: Word64Set -> String
- GHC.Data.Word64Set.Internal: showTreeWith :: Bool -> Bool -> Word64Set -> String
- GHC.Data.Word64Set.Internal: singleton :: Key -> Word64Set
- GHC.Data.Word64Set.Internal: size :: Word64Set -> Int
- GHC.Data.Word64Set.Internal: spanAntitone :: (Key -> Bool) -> Word64Set -> (Word64Set, Word64Set)
- GHC.Data.Word64Set.Internal: split :: Key -> Word64Set -> (Word64Set, Word64Set)
- GHC.Data.Word64Set.Internal: splitMember :: Key -> Word64Set -> (Word64Set, Bool, Word64Set)
- GHC.Data.Word64Set.Internal: splitRoot :: Word64Set -> [Word64Set]
- GHC.Data.Word64Set.Internal: suffixBitMask :: Word64
- GHC.Data.Word64Set.Internal: takeWhileAntitone :: (Key -> Bool) -> Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: toAscList :: Word64Set -> [Key]
- GHC.Data.Word64Set.Internal: toDescList :: Word64Set -> [Key]
- GHC.Data.Word64Set.Internal: toList :: Word64Set -> [Key]
- GHC.Data.Word64Set.Internal: type BitMap = Word64
- GHC.Data.Word64Set.Internal: type Key = Word64
- GHC.Data.Word64Set.Internal: type Mask = Word64
- GHC.Data.Word64Set.Internal: type Prefix = Word64
- GHC.Data.Word64Set.Internal: union :: Word64Set -> Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: unions :: Foldable f => f Word64Set -> Word64Set
- GHC.Data.Word64Set.Internal: zero :: Word64 -> Mask -> Bool
- GHC.Driver.Backend: backendWantsBreakpointTicks :: Backend -> Bool
- GHC.Driver.Backpack: instance GHC.Driver.Session.HasDynFlags GHC.Driver.Backpack.BkpM
- GHC.Driver.CmdLine: NoReason :: WarnReason
- GHC.Driver.CmdLine: ReasonDeprecatedFlag :: WarnReason
- GHC.Driver.CmdLine: ReasonUnrecognisedFlag :: WarnReason
- GHC.Driver.CmdLine: Warn :: DiagnosticReason -> Located String -> Warn
- GHC.Driver.CmdLine: Word64Suffix :: (Word64 -> EwM m ()) -> OptKind m
- GHC.Driver.CmdLine: [warnMsg] :: Warn -> Located String
- GHC.Driver.CmdLine: [warnReason] :: Warn -> DiagnosticReason
- GHC.Driver.CmdLine: data Warn
- GHC.Driver.CmdLine: data WarnReason
- GHC.Driver.CmdLine: instance GHC.Classes.Eq GHC.Driver.CmdLine.WarnReason
- GHC.Driver.CmdLine: instance GHC.Show.Show GHC.Driver.CmdLine.WarnReason
- GHC.Driver.CmdLine: instance GHC.Utils.Json.ToJson GHC.Driver.CmdLine.WarnReason
- GHC.Driver.CmdLine: instance GHC.Utils.Outputable.Outputable GHC.Driver.CmdLine.WarnReason
- GHC.Driver.Config: initBCOOpts :: DynFlags -> IO BCOOpts
- GHC.Driver.Env.Types: instance GHC.Driver.Session.ContainsDynFlags GHC.Driver.Env.Types.HscEnv
- GHC.Driver.Env.Types: instance GHC.Driver.Session.HasDynFlags GHC.Driver.Env.Types.Hsc
- GHC.Driver.Errors: handleFlagWarnings :: Logger -> GhcMessageOpts -> DiagOpts -> [Warn] -> IO ()
- GHC.Driver.Errors.Types: NoBuildingCabalPackage :: BuildingCabalPackage
- GHC.Driver.Errors.Types: YesBuildingCabalPackage :: BuildingCabalPackage
- GHC.Driver.Errors.Types: data BuildingCabalPackage
- GHC.Driver.Errors.Types: instance GHC.Classes.Eq GHC.Driver.Errors.Types.BuildingCabalPackage
- GHC.Driver.Flags: Opt_D_ipe_stats :: DumpFlag
- GHC.Driver.Flags: Opt_InfoTableMapWithFallback :: GeneralFlag
- GHC.Driver.Flags: Opt_InfoTableMapWithStack :: GeneralFlag
- GHC.Driver.Flags: Opt_SpecEval :: GeneralFlag
- GHC.Driver.Flags: Opt_SpecEvalDictFun :: GeneralFlag
- GHC.Driver.Flags: Opt_WarnWarningsDeprecations :: WarningFlag
- GHC.Driver.Flags: instance GHC.Enum.Bounded GHC.Driver.Flags.WarningFlag
- GHC.Driver.GenerateCgIPEStub: lookupEstimatedTicks :: HscEnv -> Map CmmInfoTable (Maybe IpeSourceLocation) -> IPEStats -> CmmGroupSRTs -> IO (Map CmmInfoTable (Maybe IpeSourceLocation), IPEStats)
- GHC.Driver.Monad: instance Control.Monad.IO.Class.MonadIO m => GHC.Driver.Session.HasDynFlags (GHC.Driver.Monad.GhcT m)
- GHC.Driver.Monad: instance GHC.Driver.Session.HasDynFlags GHC.Driver.Monad.Ghc
- GHC.Driver.Pipeline.Execute: applyAssemblerInfoGetter :: DefunctionalizedAssemblerInfoGetter -> Logger -> DynFlags -> Platform -> IO CompilerInfo
- GHC.Driver.Session: Opt_D_ipe_stats :: DumpFlag
- GHC.Driver.Session: Opt_InfoTableMapWithFallback :: GeneralFlag
- GHC.Driver.Session: Opt_InfoTableMapWithStack :: GeneralFlag
- GHC.Driver.Session: Opt_SpecEval :: GeneralFlag
- GHC.Driver.Session: Opt_SpecEvalDictFun :: GeneralFlag
- GHC.Driver.Session: Opt_WarnWarningsDeprecations :: WarningFlag
- GHC.Driver.Session: WarningWithFlag :: !WarningFlag -> DiagnosticReason
- GHC.Driver.Session: instance (GHC.Base.Monad m, GHC.Driver.Session.HasDynFlags m) => GHC.Driver.Session.HasDynFlags (Control.Monad.Trans.Except.ExceptT e m)
- GHC.Driver.Session: instance (GHC.Base.Monad m, GHC.Driver.Session.HasDynFlags m) => GHC.Driver.Session.HasDynFlags (Control.Monad.Trans.Maybe.MaybeT m)
- GHC.Driver.Session: instance (GHC.Base.Monad m, GHC.Driver.Session.HasDynFlags m) => GHC.Driver.Session.HasDynFlags (Control.Monad.Trans.Reader.ReaderT a m)
- GHC.Driver.Session: instance (GHC.Base.Monoid a, GHC.Base.Monad m, GHC.Driver.Session.HasDynFlags m) => GHC.Driver.Session.HasDynFlags (Control.Monad.Trans.Writer.Lazy.WriterT a m)
- GHC.Driver.Session: instance GHC.Classes.Eq GHC.Driver.Session.CompilerInfo
- GHC.Driver.Session: instance GHC.Classes.Eq GHC.Driver.Session.DynLibLoader
- GHC.Driver.Session: instance GHC.Classes.Eq GHC.Driver.Session.DynamicTooState
- GHC.Driver.Session: instance GHC.Classes.Eq GHC.Driver.Session.GhcLink
- GHC.Driver.Session: instance GHC.Classes.Eq GHC.Driver.Session.GhcMode
- GHC.Driver.Session: instance GHC.Classes.Eq GHC.Driver.Session.IgnorePackageFlag
- GHC.Driver.Session: instance GHC.Classes.Eq GHC.Driver.Session.LinkerInfo
- GHC.Driver.Session: instance GHC.Classes.Eq GHC.Driver.Session.ModRenaming
- GHC.Driver.Session: instance GHC.Classes.Eq GHC.Driver.Session.PackageArg
- GHC.Driver.Session: instance GHC.Classes.Eq GHC.Driver.Session.PackageDBFlag
- GHC.Driver.Session: instance GHC.Classes.Eq GHC.Driver.Session.PackageFlag
- GHC.Driver.Session: instance GHC.Classes.Eq GHC.Driver.Session.PkgDbRef
- GHC.Driver.Session: instance GHC.Classes.Eq GHC.Driver.Session.TrustFlag
- GHC.Driver.Session: instance GHC.Classes.Eq a => GHC.Classes.Eq (GHC.Driver.Session.OnOff a)
- GHC.Driver.Session: instance GHC.Classes.Ord GHC.Driver.Session.DynamicTooState
- GHC.Driver.Session: instance GHC.Show.Show GHC.Driver.Session.DynamicTooState
- GHC.Driver.Session: instance GHC.Show.Show GHC.Driver.Session.GhcLink
- GHC.Driver.Session: instance GHC.Show.Show GHC.Driver.Session.IncludeSpecs
- GHC.Driver.Session: instance GHC.Show.Show GHC.Driver.Session.PackageArg
- GHC.Driver.Session: instance GHC.Show.Show GHC.Driver.Session.RtsOptsEnabled
- GHC.Driver.Session: instance GHC.Show.Show a => GHC.Show.Show (GHC.Driver.Session.OnOff a)
- GHC.Driver.Session: instance GHC.Utils.Outputable.Outputable GHC.Driver.Session.GhcMode
- GHC.Driver.Session: instance GHC.Utils.Outputable.Outputable GHC.Driver.Session.ModRenaming
- GHC.Driver.Session: instance GHC.Utils.Outputable.Outputable GHC.Driver.Session.PackageArg
- GHC.Driver.Session: instance GHC.Utils.Outputable.Outputable GHC.Driver.Session.PackageFlag
- GHC.Driver.Session: instance GHC.Utils.Outputable.Outputable a => GHC.Utils.Outputable.Outputable (GHC.Driver.Session.OnOff a)
- GHC.Hs.Instances: instance (Data.Data.Data a, Data.Data.Data b) => Data.Data.Data (Language.Haskell.Syntax.Type.HsArg a b)
- GHC.Hs.Lit: [$sel:ol_from_fun:OverLitRn] :: OverLitRn -> LIdP GhcRn
- GHC.Hs.Lit: [$sel:ol_rebindable:OverLitRn] :: OverLitRn -> Bool
- GHC.Hs.Lit: [$sel:ol_rebindable:OverLitTc] :: OverLitTc -> Bool
- GHC.Hs.Lit: [$sel:ol_type:OverLitTc] :: OverLitTc -> Type
- GHC.Hs.Lit: [$sel:ol_witness:OverLitTc] :: OverLitTc -> HsExpr GhcTc
- GHC.Hs.Type: instance (GHC.Utils.Outputable.Outputable tm, GHC.Utils.Outputable.Outputable ty) => GHC.Utils.Outputable.Outputable (Language.Haskell.Syntax.Type.HsArg tm ty)
- GHC.Hs.Type: rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc (GhcPass p) -> RdrName
- GHC.Iface.Errors: cantFindErr :: BuildingCabalPackage -> SDoc -> SDoc -> UnitEnv -> Profile -> ([FilePath] -> SDoc) -> ModuleName -> FindResult -> SDoc
- GHC.Iface.Errors: hiModuleNameMismatchWarn :: Module -> Module -> SDoc
- GHC.Iface.Errors: homeModError :: InstalledModule -> ModLocation -> SDoc
- GHC.Iface.Errors: mayShowLocations :: DynFlags -> [FilePath] -> SDoc
- GHC.Iface.Ext.Ast: instance (GHC.Iface.Ext.Ast.HasLoc tm, GHC.Iface.Ext.Ast.HasLoc ty) => GHC.Iface.Ext.Ast.HasLoc (Language.Haskell.Syntax.Type.HsArg tm ty)
- GHC.Iface.Ext.Ast: instance (GHC.Iface.Ext.Ast.ToHie tm, GHC.Iface.Ext.Ast.ToHie ty) => GHC.Iface.Ext.Ast.ToHie (Language.Haskell.Syntax.Type.HsArg tm ty)
- GHC.Iface.Ext.Ast: instance GHC.Iface.Ext.Ast.ToHie (GHC.Iface.Ext.Ast.IEContext (GHC.Types.SrcLoc.Located GHC.Types.FieldLabel.FieldLabel))
- GHC.Iface.Load: instance GHC.Utils.Outputable.Outputable (GHC.Unit.Module.Warnings.Warnings pass)
- GHC.Iface.Make: coAxiomToIfaceDecl :: CoAxiom br -> IfaceDecl
- GHC.Iface.Make: tyThingToIfaceDecl :: Bool -> TyThing -> IfaceDecl
- GHC.Iface.Syntax: instance GHC.Utils.Outputable.Outputable GHC.Iface.Syntax.ShowHowMuch
- GHC.JS.Make: allocClsA :: Int -> JExpr
- GHC.JS.Make: allocData :: Int -> JExpr
- GHC.JS.Make: dataFieldName :: Int -> FastString
- GHC.JS.Make: dataFieldNames :: [FastString]
- GHC.JS.Make: instance (GHC.JS.Make.ToSat a, b GHC.Types.~ GHC.JS.Syntax.JExpr) => GHC.JS.Make.ToSat (b -> a)
- GHC.JS.Make: instance GHC.JS.Make.ToJExpr GHC.JS.Syntax.Ident
- GHC.JS.Make: instance GHC.JS.Make.ToJExpr GHC.JS.Syntax.JExpr
- GHC.JS.Make: instance GHC.JS.Make.ToJExpr GHC.JS.Syntax.JVal
- GHC.JS.Make: instance GHC.JS.Make.ToSat GHC.JS.Syntax.JExpr
- GHC.JS.Make: instance GHC.JS.Make.ToSat GHC.JS.Syntax.JStat
- GHC.JS.Make: instance GHC.JS.Make.ToSat [GHC.JS.Syntax.JExpr]
- GHC.JS.Make: instance GHC.JS.Make.ToSat [GHC.JS.Syntax.JStat]
- GHC.JS.Make: instance GHC.JS.Make.ToStat GHC.JS.Syntax.JExpr
- GHC.JS.Make: instance GHC.JS.Make.ToStat GHC.JS.Syntax.JStat
- GHC.JS.Make: instance GHC.JS.Make.ToStat [GHC.JS.Syntax.JExpr]
- GHC.JS.Make: instance GHC.JS.Make.ToStat [GHC.JS.Syntax.JStat]
- GHC.JS.Make: instance GHC.Num.Num GHC.JS.Syntax.JExpr
- GHC.JS.Make: instance GHC.Real.Fractional GHC.JS.Syntax.JExpr
- GHC.JS.Ppr: flattenBlocks :: [JStat] -> [JStat]
- GHC.JS.Ppr: instance GHC.JS.Ppr.JsToDoc GHC.JS.Syntax.Ident
- GHC.JS.Ppr: renderJs' :: (JsToDoc a, JMacro a) => RenderJs -> a -> Doc
- GHC.JS.Syntax: IS :: State [Ident] a -> IdentSupply a
- GHC.JS.Syntax: UnsatBlock :: IdentSupply JStat -> JStat
- GHC.JS.Syntax: UnsatExpr :: IdentSupply JExpr -> JExpr
- GHC.JS.Syntax: UnsatVal :: IdentSupply JVal -> JVal
- GHC.JS.Syntax: [runIdentSupply] :: IdentSupply a -> State [Ident] a
- GHC.JS.Syntax: data JOp
- GHC.JS.Syntax: data JUOp
- GHC.JS.Syntax: identFS :: Ident -> FastString
- GHC.JS.Syntax: instance Control.DeepSeq.NFData (GHC.JS.Syntax.IdentSupply a)
- GHC.JS.Syntax: instance Control.DeepSeq.NFData GHC.JS.Syntax.JOp
- GHC.JS.Syntax: instance Control.DeepSeq.NFData GHC.JS.Syntax.JUOp
- GHC.JS.Syntax: instance Control.DeepSeq.NFData GHC.JS.Syntax.SaneDouble
- GHC.JS.Syntax: instance Data.Data.Data GHC.JS.Syntax.JOp
- GHC.JS.Syntax: instance Data.Data.Data GHC.JS.Syntax.JUOp
- GHC.JS.Syntax: instance Data.Data.Data GHC.JS.Syntax.SaneDouble
- GHC.JS.Syntax: instance GHC.Base.Functor GHC.JS.Syntax.IdentSupply
- GHC.JS.Syntax: instance GHC.Classes.Eq GHC.JS.Syntax.Ident
- GHC.JS.Syntax: instance GHC.Classes.Eq GHC.JS.Syntax.JOp
- GHC.JS.Syntax: instance GHC.Classes.Eq GHC.JS.Syntax.JUOp
- GHC.JS.Syntax: instance GHC.Classes.Eq GHC.JS.Syntax.SaneDouble
- GHC.JS.Syntax: instance GHC.Classes.Eq a => GHC.Classes.Eq (GHC.JS.Syntax.IdentSupply a)
- GHC.JS.Syntax: instance GHC.Classes.Ord GHC.JS.Syntax.JOp
- GHC.JS.Syntax: instance GHC.Classes.Ord GHC.JS.Syntax.JUOp
- GHC.JS.Syntax: instance GHC.Classes.Ord GHC.JS.Syntax.SaneDouble
- GHC.JS.Syntax: instance GHC.Classes.Ord a => GHC.Classes.Ord (GHC.JS.Syntax.IdentSupply a)
- GHC.JS.Syntax: instance GHC.Enum.Enum GHC.JS.Syntax.JOp
- GHC.JS.Syntax: instance GHC.Enum.Enum GHC.JS.Syntax.JUOp
- GHC.JS.Syntax: instance GHC.Generics.Generic GHC.JS.Syntax.JOp
- GHC.JS.Syntax: instance GHC.Generics.Generic GHC.JS.Syntax.JUOp
- GHC.JS.Syntax: instance GHC.Generics.Generic GHC.JS.Syntax.SaneDouble
- GHC.JS.Syntax: instance GHC.Num.Num GHC.JS.Syntax.SaneDouble
- GHC.JS.Syntax: instance GHC.Real.Fractional GHC.JS.Syntax.SaneDouble
- GHC.JS.Syntax: instance GHC.Show.Show GHC.JS.Syntax.Ident
- GHC.JS.Syntax: instance GHC.Show.Show GHC.JS.Syntax.JOp
- GHC.JS.Syntax: instance GHC.Show.Show GHC.JS.Syntax.JUOp
- GHC.JS.Syntax: instance GHC.Show.Show GHC.JS.Syntax.SaneDouble
- GHC.JS.Syntax: instance GHC.Show.Show a => GHC.Show.Show (GHC.JS.Syntax.IdentSupply a)
- GHC.JS.Syntax: instance GHC.Types.Unique.Uniquable GHC.JS.Syntax.Ident
- GHC.JS.Syntax: newIdentSupply :: Maybe FastString -> [Ident]
- GHC.JS.Syntax: newtype IdentSupply a
- GHC.JS.Syntax: pattern Add :: JExpr -> JExpr -> JExpr
- GHC.JS.Syntax: pattern BAnd :: JExpr -> JExpr -> JExpr
- GHC.JS.Syntax: pattern BNot :: JExpr -> JExpr
- GHC.JS.Syntax: pattern BOr :: JExpr -> JExpr -> JExpr
- GHC.JS.Syntax: pattern BXor :: JExpr -> JExpr -> JExpr
- GHC.JS.Syntax: pattern Div :: JExpr -> JExpr -> JExpr
- GHC.JS.Syntax: pattern Int :: Integer -> JExpr
- GHC.JS.Syntax: pattern LAnd :: JExpr -> JExpr -> JExpr
- GHC.JS.Syntax: pattern LOr :: JExpr -> JExpr -> JExpr
- GHC.JS.Syntax: pattern Mod :: JExpr -> JExpr -> JExpr
- GHC.JS.Syntax: pattern Mul :: JExpr -> JExpr -> JExpr
- GHC.JS.Syntax: pattern Negate :: JExpr -> JExpr
- GHC.JS.Syntax: pattern New :: JExpr -> JExpr
- GHC.JS.Syntax: pattern Not :: JExpr -> JExpr
- GHC.JS.Syntax: pattern PostDec :: JExpr -> JExpr
- GHC.JS.Syntax: pattern PostInc :: JExpr -> JExpr
- GHC.JS.Syntax: pattern PreDec :: JExpr -> JExpr
- GHC.JS.Syntax: pattern PreInc :: JExpr -> JExpr
- GHC.JS.Syntax: pattern String :: FastString -> JExpr
- GHC.JS.Syntax: pattern Sub :: JExpr -> JExpr -> JExpr
- GHC.JS.Syntax: pseudoSaturate :: IdentSupply a -> a
- GHC.JS.Syntax: type JsLabel = LexicalFastString
- GHC.JS.Transform: instance GHC.JS.Transform.JMacro GHC.JS.Syntax.Ident
- GHC.JS.Transform: instance GHC.JS.Transform.JMacro GHC.JS.Syntax.JExpr
- GHC.JS.Transform: instance GHC.JS.Transform.JMacro GHC.JS.Syntax.JStat
- GHC.JS.Transform: instance GHC.JS.Transform.JMacro GHC.JS.Syntax.JVal
- GHC.JS.Transform: jsSaturate :: JMacro a => Maybe FastString -> a -> a
- GHC.JS.Transform: mapExprIdent :: (Ident -> JExpr) -> JExpr -> JExpr
- GHC.JS.Transform: mapIdent :: (Ident -> JExpr) -> (JExpr -> JExpr, JStat -> JStat)
- GHC.JS.Transform: mapStatIdent :: (Ident -> JExpr) -> JStat -> JStat
- GHC.Llvm: MetaStmt :: [MetaAnnot] -> LlvmStatement -> LlvmStatement
- GHC.Llvm.Syntax: MetaStmt :: [MetaAnnot] -> LlvmStatement -> LlvmStatement
- GHC.Llvm.Types: instance GHC.Utils.Outputable.Outputable GHC.Llvm.Types.LlvmFunctionDecl
- GHC.Llvm.Types: ppType :: LlvmType -> SDoc
- GHC.Parser.Errors.Types: PsErrUnexpectedTypeAppInDecl :: !LHsType GhcPs -> !SDoc -> !RdrName -> PsMessage
- GHC.Parser.Lexer: [prev_loc2] :: PState -> PsSpan
- GHC.Plugins: extendOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccName -> a -> OccEnv a
- GHC.Plugins: filterOccSet :: (OccName -> Bool) -> OccSet -> OccSet
- GHC.Plugins: foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b
- GHC.Plugins: intersectOccSet :: OccSet -> OccSet -> OccSet
- GHC.Plugins: isConcrete :: Type -> Bool
- GHC.Plugins: minusOccSet :: OccSet -> OccSet -> OccSet
- GHC.Plugins: mkFunCo1 :: HasDebugCallStack => Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
- GHC.Plugins: mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
- GHC.Plugins: mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
- GHC.Plugins: mkNakedFunCo1 :: Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
- GHC.Plugins: mkNakedFunCo2 :: Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
- GHC.Plugins: mkRecFldSelOcc :: FastString -> OccName
- GHC.Plugins: occSetToEnv :: OccSet -> OccEnv OccName
- GHC.Rename.Env: AmbiguousFields :: AmbiguousResult
- GHC.Rename.Env: UnambiguousGre :: GreName -> AmbiguousResult
- GHC.Rename.Env: combineChildLookupResult :: [RnM ChildLookupResult] -> RnM ChildLookupResult
- GHC.Rename.Env: data AmbiguousResult
- GHC.Rename.Env: instance GHC.Classes.Eq GHC.Rename.Env.FieldsOrSelectors
- GHC.Rename.Env: lookupRecFieldOcc_update :: DuplicateRecordFields -> RdrName -> RnM AmbiguousResult
- GHC.Rename.Env: lookupSigCtxtOccRnN :: HsSigCtxt -> SDoc -> LocatedN RdrName -> RnM (LocatedN Name)
- GHC.Rename.HsType: instance GHC.Utils.Outputable.Outputable GHC.Rename.HsType.OpName
- GHC.Rename.HsType: rnHsKind :: HsDocContext -> HsKind GhcPs -> RnM (HsKind GhcRn, FreeVars)
- GHC.Rename.Names: newRecordSelector :: DuplicateRecordFields -> FieldSelectors -> [Name] -> LFieldOcc GhcPs -> RnM FieldLabel
- GHC.Rename.Utils: checkDupRdrNamesN :: [LocatedN RdrName] -> RnM ()
- GHC.Rename.Utils: mkFieldEnv :: GlobalRdrEnv -> NameEnv (FieldLabelString, Parent)
- GHC.Runtime.Heap.Layout: instance GHC.Classes.Ord GHC.Runtime.Heap.Layout.ArgDescr
- GHC.Runtime.Heap.Layout: instance GHC.Classes.Ord GHC.Runtime.Heap.Layout.ClosureTypeInfo
- GHC.Runtime.Heap.Layout: instance GHC.Classes.Ord GHC.Runtime.Heap.Layout.SMRep
- GHC.Runtime.Interpreter: BCOOpts :: Int -> BCOOpts
- GHC.Runtime.Interpreter: [NewBreakModule] :: String -> Message (RemotePtr BreakModule)
- GHC.Runtime.Interpreter: [bco_n_jobs] :: BCOOpts -> Int
- GHC.Runtime.Interpreter: iservCall :: Binary a => IServInstance -> Message a -> IO a
- GHC.Runtime.Interpreter: newModuleName :: Interp -> ModuleName -> IO (RemotePtr ModuleName)
- GHC.Runtime.Interpreter: newtype BCOOpts
- GHC.Runtime.Interpreter: readIServ :: IServInstance -> Get a -> IO a
- GHC.Runtime.Interpreter: withIServ_ :: (MonadIO m, ExceptionMonad m) => IServConfig -> IServ -> (IServInstance -> m a) -> m a
- GHC.Runtime.Interpreter: writeIServ :: IServInstance -> Put -> IO ()
- GHC.Runtime.Interpreter.Types: IServ :: MVar IServState -> IServ
- GHC.Runtime.Interpreter.Types: IServInstance :: !Pipe -> !ProcessHandle -> !UniqFM FastString (Ptr ()) -> ![HValueRef] -> IServInstance
- GHC.Runtime.Interpreter.Types: IServPending :: IServState
- GHC.Runtime.Interpreter.Types: IServRunning :: !IServInstance -> IServState
- GHC.Runtime.Interpreter.Types: [iservLookupSymbolCache] :: IServInstance -> !UniqFM FastString (Ptr ())
- GHC.Runtime.Interpreter.Types: [iservPendingFrees] :: IServInstance -> ![HValueRef]
- GHC.Runtime.Interpreter.Types: [iservPipe] :: IServInstance -> !Pipe
- GHC.Runtime.Interpreter.Types: [iservProcess] :: IServInstance -> !ProcessHandle
- GHC.Runtime.Interpreter.Types: data IServInstance
- GHC.Runtime.Interpreter.Types: data IServState
- GHC.Runtime.Interpreter.Types: newtype IServ
- GHC.Settings: [toolSettings_ldSupportsSingleModule] :: ToolSettings -> Bool
- GHC.Stg.Lift.Analysis: instance GHC.Utils.Outputable.Outputable GHC.Stg.Lift.Analysis.BinderInfo
- GHC.Stg.Lift.Analysis: instance GHC.Utils.Outputable.Outputable GHC.Stg.Lift.Analysis.Skeleton
- GHC.Stg.Lift.Analysis: instance GHC.Utils.Outputable.OutputableBndr GHC.Stg.Lift.Analysis.BinderInfo
- GHC.StgToByteCode: instance GHC.Driver.Session.HasDynFlags GHC.StgToByteCode.BcM
- GHC.StgToCmm.Closure: mkLFImported :: Id -> LambdaFormInfo
- GHC.StgToCmm.Config: [stgToCmmInfoTableMapWithFallback] :: StgToCmmConfig -> !Bool
- GHC.StgToCmm.Config: [stgToCmmInfoTableMapWithStack] :: StgToCmmConfig -> !Bool
- GHC.StgToCmm.Monad: MkSelfLoopInfo :: !Id -> !RepArity -> ![LocalReg] -> !BlockId -> SelfLoopInfo
- GHC.StgToCmm.Monad: [sli_arity] :: SelfLoopInfo -> !RepArity
- GHC.StgToCmm.Monad: [sli_header_block] :: SelfLoopInfo -> !BlockId
- GHC.StgToCmm.Monad: [sli_id] :: SelfLoopInfo -> !Id
- GHC.StgToCmm.Monad: [sli_registers] :: SelfLoopInfo -> ![LocalReg]
- GHC.StgToCmm.Monad: [stgToCmmInfoTableMapWithFallback] :: StgToCmmConfig -> !Bool
- GHC.StgToCmm.Monad: [stgToCmmInfoTableMapWithStack] :: StgToCmmConfig -> !Bool
- GHC.StgToCmm.Monad: data SelfLoopInfo
- GHC.StgToCmm.Sequel: MkSelfLoopInfo :: !Id -> !RepArity -> ![LocalReg] -> !BlockId -> SelfLoopInfo
- GHC.StgToCmm.Sequel: [sli_arity] :: SelfLoopInfo -> !RepArity
- GHC.StgToCmm.Sequel: [sli_header_block] :: SelfLoopInfo -> !BlockId
- GHC.StgToCmm.Sequel: [sli_id] :: SelfLoopInfo -> !Id
- GHC.StgToCmm.Sequel: [sli_registers] :: SelfLoopInfo -> ![LocalReg]
- GHC.StgToCmm.Sequel: data SelfLoopInfo
- GHC.StgToCmm.Utils: IPEStats :: !Int -> !IntMap Int -> !Int -> !Int -> IPEStats
- GHC.StgToCmm.Utils: [ipe_closure_types] :: IPEStats -> !IntMap Int
- GHC.StgToCmm.Utils: [ipe_fallback] :: IPEStats -> !Int
- GHC.StgToCmm.Utils: [ipe_skipped] :: IPEStats -> !Int
- GHC.StgToCmm.Utils: [ipe_total] :: IPEStats -> !Int
- GHC.StgToCmm.Utils: closureIpeStats :: Int -> IPEStats
- GHC.StgToCmm.Utils: data IPEStats
- GHC.StgToCmm.Utils: fallbackIpeStats :: IPEStats
- GHC.StgToCmm.Utils: instance GHC.Base.Monoid GHC.StgToCmm.Utils.IPEStats
- GHC.StgToCmm.Utils: instance GHC.Base.Semigroup GHC.StgToCmm.Utils.IPEStats
- GHC.StgToCmm.Utils: instance GHC.Utils.Outputable.Outputable GHC.StgToCmm.Utils.IPEStats
- GHC.StgToCmm.Utils: skippedIpeStats :: IPEStats
- GHC.StgToJS.CoreUtils: NoSlot :: SlotCount
- GHC.StgToJS.CoreUtils: OneSlot :: SlotCount
- GHC.StgToJS.CoreUtils: TwoSlots :: SlotCount
- GHC.StgToJS.CoreUtils: argVt :: StgArg -> VarType
- GHC.StgToJS.CoreUtils: assocIdExprs :: Id -> [JExpr] -> [TypedExpr]
- GHC.StgToJS.CoreUtils: assocIdPrimReps :: Outputable a => Id -> [a] -> [(PrimRep, [a])]
- GHC.StgToJS.CoreUtils: assocPrimReps :: Outputable a => [PrimRep] -> [a] -> [(PrimRep, [a])]
- GHC.StgToJS.CoreUtils: data SlotCount
- GHC.StgToJS.CoreUtils: dataConType :: DataCon -> Type
- GHC.StgToJS.CoreUtils: fixedLayout :: [VarType] -> CILayout
- GHC.StgToJS.CoreUtils: idPrimReps :: Id -> [PrimRep]
- GHC.StgToJS.CoreUtils: idVt :: HasDebugCallStack => Id -> [VarType]
- GHC.StgToJS.CoreUtils: instance GHC.Classes.Eq GHC.StgToJS.CoreUtils.SlotCount
- GHC.StgToJS.CoreUtils: instance GHC.Classes.Ord GHC.StgToJS.CoreUtils.SlotCount
- GHC.StgToJS.CoreUtils: instance GHC.Show.Show GHC.StgToJS.CoreUtils.SlotCount
- GHC.StgToJS.CoreUtils: instance GHC.Utils.Outputable.Outputable GHC.StgToJS.CoreUtils.SlotCount
- GHC.StgToJS.CoreUtils: isBoolDataCon :: DataCon -> Bool
- GHC.StgToJS.CoreUtils: isMatchable :: [VarType] -> Bool
- GHC.StgToJS.CoreUtils: isMultiVar :: VarType -> Bool
- GHC.StgToJS.CoreUtils: isPtr :: VarType -> Bool
- GHC.StgToJS.CoreUtils: isSingleVar :: VarType -> Bool
- GHC.StgToJS.CoreUtils: isUnboxable :: VarType -> Bool
- GHC.StgToJS.CoreUtils: isUnboxableCon :: DataCon -> Bool
- GHC.StgToJS.CoreUtils: isVoid :: VarType -> Bool
- GHC.StgToJS.CoreUtils: kindPrimRep' :: HasDebugCallStack => SDoc -> Kind -> [PrimRep]
- GHC.StgToJS.CoreUtils: might_be_a_function :: HasDebugCallStack => Type -> Bool
- GHC.StgToJS.CoreUtils: mkArityTag :: Int -> Int -> Int
- GHC.StgToJS.CoreUtils: primRepSize :: PrimRep -> SlotCount
- GHC.StgToJS.CoreUtils: primRepVt :: HasDebugCallStack => PrimRep -> VarType
- GHC.StgToJS.CoreUtils: primTypeVt :: HasDebugCallStack => Type -> VarType
- GHC.StgToJS.CoreUtils: slotCount :: SlotCount -> Int
- GHC.StgToJS.CoreUtils: stackSlotType :: Id -> VarType
- GHC.StgToJS.CoreUtils: toTypeList :: [VarType] -> [Int]
- GHC.StgToJS.CoreUtils: tyConPrimRep' :: HasDebugCallStack => TyCon -> [PrimRep]
- GHC.StgToJS.CoreUtils: tyConVt :: HasDebugCallStack => TyCon -> [VarType]
- GHC.StgToJS.CoreUtils: typePrimRep' :: HasDebugCallStack => UnaryType -> [PrimRep]
- GHC.StgToJS.CoreUtils: typePrimReps :: Type -> [PrimRep]
- GHC.StgToJS.CoreUtils: typeSize :: Type -> Int
- GHC.StgToJS.CoreUtils: typeVt :: HasDebugCallStack => Type -> [VarType]
- GHC.StgToJS.CoreUtils: uTypeVt :: HasDebugCallStack => UnaryType -> VarType
- GHC.StgToJS.CoreUtils: varSize :: VarType -> Int
- GHC.StgToJS.CoreUtils: varSlotCount :: VarType -> SlotCount
- GHC.StgToJS.Linker.Types: GhcjsEnv :: MVar (Map (Set FilePath) (Map Module (Deps, DepsLocation), [LinkableUnit])) -> GhcjsEnv
- GHC.StgToJS.Linker.Types: [lcOnlyOut] :: JSLinkConfig -> Bool
- GHC.StgToJS.Linker.Types: [linkerArchiveDeps] :: GhcjsEnv -> MVar (Map (Set FilePath) (Map Module (Deps, DepsLocation), [LinkableUnit]))
- GHC.StgToJS.Linker.Types: data GhcjsEnv
- GHC.StgToJS.Linker.Types: generateAllJs :: JSLinkConfig -> Bool
- GHC.StgToJS.Linker.Types: newGhcjsEnv :: IO GhcjsEnv
- GHC.StgToJS.Linker.Types: type LinkableUnit = (Module, Int)
- GHC.StgToJS.Object: Deps :: !Module -> !BlockIds -> !Map ExportedFun BlockId -> !Array BlockId BlockDeps -> Deps
- GHC.StgToJS.Object: [depsBlocks] :: Deps -> !Array BlockId BlockDeps
- GHC.StgToJS.Object: [depsHaskellExported] :: Deps -> !Map ExportedFun BlockId
- GHC.StgToJS.Object: [depsModule] :: Deps -> !Module
- GHC.StgToJS.Object: [depsRequired] :: Deps -> !BlockIds
- GHC.StgToJS.Object: [objDeps] :: Object -> !Deps
- GHC.StgToJS.Object: data Deps
- GHC.StgToJS.Object: data DepsLocation
- GHC.StgToJS.Object: getObjectUnits :: Object -> (Word -> IndexEntry -> Bool) -> IO [ObjUnit]
- GHC.StgToJS.Object: instance GHC.Utils.Binary.Binary GHC.JS.Syntax.Ident
- GHC.StgToJS.Object: instance GHC.Utils.Binary.Binary GHC.JS.Syntax.JOp
- GHC.StgToJS.Object: instance GHC.Utils.Binary.Binary GHC.JS.Syntax.JUOp
- GHC.StgToJS.Object: instance GHC.Utils.Binary.Binary GHC.JS.Syntax.SaneDouble
- GHC.StgToJS.Object: instance GHC.Utils.Binary.Binary GHC.StgToJS.Object.Deps
- GHC.StgToJS.Object: instance GHC.Utils.Outputable.Outputable GHC.StgToJS.Object.Deps
- GHC.StgToJS.Object: instance GHC.Utils.Outputable.Outputable GHC.StgToJS.Object.DepsLocation
- GHC.StgToJS.Object: isGlobalUnit :: Int -> Bool
- GHC.StgToJS.Object: readObjectDeps :: FilePath -> IO (Maybe Deps)
- GHC.StgToJS.Object: readObjectUnits :: FilePath -> (Word -> IndexEntry -> Bool) -> IO [ObjUnit]
- GHC.StgToJS.Printer: ghcjsRenderJs :: RenderJs
- GHC.StgToJS.Printer: pretty :: JStat -> Doc
- GHC.StgToJS.Printer: prettyBlock :: RenderJs -> [JStat] -> Doc
- GHC.StgToJS.Rts.Rts: assignRegs' :: Array Int Ident
- GHC.StgToJS.Rts.Rts: bhLneStats :: StgToJSConfig -> JExpr -> JExpr -> JStat
- GHC.StgToJS.Rts.Rts: bitsIdx :: Integer -> [Int]
- GHC.StgToJS.Rts.Rts: closureConstructors :: StgToJSConfig -> JStat
- GHC.StgToJS.Rts.Rts: closureTypes :: JStat
- GHC.StgToJS.Rts.Rts: declRegs :: JStat
- GHC.StgToJS.Rts.Rts: declRets :: JStat
- GHC.StgToJS.Rts.Rts: garbageCollector :: JStat
- GHC.StgToJS.Rts.Rts: loadRegs :: JStat
- GHC.StgToJS.Rts.Rts: regGettersSetters :: JStat
- GHC.StgToJS.Rts.Rts: resetRegister :: StgReg -> JStat
- GHC.StgToJS.Rts.Rts: resetResultVar :: StgRet -> JStat
- GHC.StgToJS.Rts.Rts: rts' :: StgToJSConfig -> JStat
- GHC.StgToJS.Rts.Rts: rtsDecls :: JStat
- GHC.StgToJS.Rts.Rts: rtsDeclsText :: String
- GHC.StgToJS.Rts.Rts: rtsText :: StgToJSConfig -> String
- GHC.StgToJS.Rts.Rts: stackManip :: JStat
- GHC.StgToJS.StgUtils: bindingRefs :: UniqFM Id CgStgExpr -> CgStgBinding -> Set Id
- GHC.StgToJS.StgUtils: collectIds :: UniqFM Id CgStgExpr -> CgStgBinding -> [Id]
- GHC.StgToJS.StgUtils: collectTopIds :: CgStgBinding -> [Id]
- GHC.StgToJS.StgUtils: exprRefs :: UniqFM Id CgStgExpr -> CgStgExpr -> Set Id
- GHC.StgToJS.StgUtils: hasExport :: CgStgBinding -> Bool
- GHC.StgToJS.StgUtils: isInlineExpr :: UniqSet Id -> CgStgExpr -> (UniqSet Id, Bool)
- GHC.StgToJS.StgUtils: isUpdatableRhs :: CgStgRhs -> Bool
- GHC.StgToJS.StgUtils: liveStatic :: LiveVars -> LiveVars
- GHC.StgToJS.StgUtils: liveVars :: LiveVars -> LiveVars
- GHC.StgToJS.StgUtils: removeTick :: CgStgExpr -> CgStgExpr
- GHC.StgToJS.StgUtils: stgExprLive :: Bool -> CgStgExpr -> LiveVars
- GHC.StgToJS.StgUtils: stgLetNoEscapeLive :: Bool -> StgBinding -> StgExpr -> LiveVars
- GHC.StgToJS.StgUtils: stgLneLive :: CgStgBinding -> [Id]
- GHC.StgToJS.StgUtils: stgLneLive' :: CgStgBinding -> [Id]
- GHC.StgToJS.StgUtils: stgLneLiveExpr :: CgStgRhs -> [Id]
- GHC.StgToJS.StgUtils: stgRhsLive :: CgStgRhs -> LiveVars
- GHC.StgToJS.StgUtils: stgTopBindLive :: CgStgTopBinding -> [(Id, LiveVars)]
- GHC.StgToJS.StgUtils: type LiveVars = DVarSet
- GHC.StgToJS.Symbols: word64BS :: Word64 -> ByteString
- GHC.StgToJS.Types: ObjUnit :: ![FastString] -> ![ClosureInfo] -> ![StaticInfo] -> JStat -> !ByteString -> ![ExpFun] -> ![ForeignJSRef] -> ObjUnit
- GHC.StgToJS.Types: RtsObjV :: VarType
- GHC.StgToJS.Types: [luObjUnit] :: LinkableUnit -> ObjUnit
- GHC.StgToJS.Types: data ObjUnit
- GHC.StgToJS.Types: instance Control.DeepSeq.NFData GHC.StgToJS.Types.CILayout
- GHC.StgToJS.Types: instance Control.DeepSeq.NFData GHC.StgToJS.Types.CIRegs
- GHC.StgToJS.Types: instance Control.DeepSeq.NFData GHC.StgToJS.Types.CIType
- GHC.StgToJS.Types: instance Control.DeepSeq.NFData GHC.StgToJS.Types.StaticUnboxed
- GHC.StgToJS.Types: instance Control.DeepSeq.NFData GHC.StgToJS.Types.VarType
- GHC.StgToJS.Types: instance GHC.Generics.Generic GHC.StgToJS.Types.CILayout
- GHC.StgToJS.Types: instance GHC.Generics.Generic GHC.StgToJS.Types.CIRegs
- GHC.StgToJS.Types: instance GHC.Generics.Generic GHC.StgToJS.Types.CIStatic
- GHC.StgToJS.Types: instance GHC.Generics.Generic GHC.StgToJS.Types.CIType
- GHC.StgToJS.Types: instance GHC.Generics.Generic GHC.StgToJS.Types.ClosureInfo
- GHC.StgToJS.Types: instance GHC.Generics.Generic GHC.StgToJS.Types.ForeignJSRef
- GHC.StgToJS.Types: instance GHC.Generics.Generic GHC.StgToJS.Types.StaticArg
- GHC.StgToJS.Types: instance GHC.Generics.Generic GHC.StgToJS.Types.StaticInfo
- GHC.StgToJS.Types: instance GHC.Generics.Generic GHC.StgToJS.Types.StaticLit
- GHC.StgToJS.Types: instance GHC.Generics.Generic GHC.StgToJS.Types.StaticUnboxed
- GHC.StgToJS.Types: instance GHC.Generics.Generic GHC.StgToJS.Types.StaticVal
- GHC.StgToJS.Types: instance GHC.Generics.Generic GHC.StgToJS.Types.VarType
- GHC.StgToJS.Types: instance GHC.Utils.Outputable.Outputable GHC.StgToJS.Types.TypedExpr
- GHC.Tc.Errors.Hole: [showWrap, showWrapVars, showType, showProv, showMatches] :: HoleFitDispConfig -> Bool
- GHC.Tc.Errors.Hole.FitTypes: HoleFitPlugin :: CandPlugin -> FitPlugin -> HoleFitPlugin
- GHC.Tc.Errors.Hole.FitTypes: HoleFitPluginR :: TcM (TcRef s) -> (TcRef s -> HoleFitPlugin) -> (TcRef s -> TcM ()) -> HoleFitPluginR
- GHC.Tc.Errors.Hole.FitTypes: [candPlugin] :: HoleFitPlugin -> CandPlugin
- GHC.Tc.Errors.Hole.FitTypes: [fitPlugin] :: HoleFitPlugin -> FitPlugin
- GHC.Tc.Errors.Hole.FitTypes: [hfPluginInit] :: HoleFitPluginR -> TcM (TcRef s)
- GHC.Tc.Errors.Hole.FitTypes: [hfPluginRun] :: HoleFitPluginR -> TcRef s -> HoleFitPlugin
- GHC.Tc.Errors.Hole.FitTypes: [hfPluginStop] :: HoleFitPluginR -> TcRef s -> TcM ()
- GHC.Tc.Errors.Hole.FitTypes: data HoleFitPlugin
- GHC.Tc.Errors.Hole.FitTypes: data HoleFitPluginR
- GHC.Tc.Errors.Hole.FitTypes: type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate]
- GHC.Tc.Errors.Hole.FitTypes: type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit]
- GHC.Tc.Errors.Types: UntouchableVariable :: TyVar -> Implication -> TcSolverReportMsg
- GHC.Tc.Errors.Types: [TcRnAbstractClassInst] :: !Class -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnAddDocToNonLocalDefn] :: !DocLoc -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnAddInvalidCorePlugin] :: !String -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnAmbiguousField] :: HsExpr GhcRn -> TyCon -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnBadAssociatedType] :: !Name -> !Name -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnBadBootFamInstDecl] :: TcRnMessage
- GHC.Tc.Errors.Types: [TcRnBadFamInstDecl] :: TyCon -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnBadOverloadedRecordUpdate] :: [LHsRecUpdField GhcRn] -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnCannotDefaultConcrete] :: !FixedRuntimeRepOrigin -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnCannotReifyInstance] :: !Type -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnCannotReifyOutOfScopeThing] :: !Name -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnCannotReifyThingNotInTypeEnv] :: !Name -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnCannotRepresentType] :: !UnrepresentableTypeDescr -> !Type -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnDisconnectedTyVar] :: !Name -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnFailedToLookupThInstName] :: !Type -> !LookupTHInstNameErrReason -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnIllegalBindingOfBuiltIn] :: !OccName -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnIllegalClassInst] :: !TyConFlavour -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnIllegalFamilyInstance] :: TyCon -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnIllegalHsBootFileDecl] :: TcRnMessage
- GHC.Tc.Errors.Types: [TcRnIllegalStaticFormInSplice] :: HsExpr GhcPs -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnInterfaceLookupError] :: !Name -> !SDoc -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnInvalidTopDecl] :: !HsDecl GhcPs -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnMissingClassAssoc] :: TyCon -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnMixedSelectors] :: Name -> [Id] -> Name -> [Id] -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnNameByTemplateHaskellQuote] :: !RdrName -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnNoClassInstHead] :: !Type -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnNoConstructorHasAllFields] :: [FieldLabelString] -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnNoExplicitAssocTypeOrDefaultDeclaration] :: Name -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnNoPossibleParentForFields] :: [LHsRecUpdField GhcRn] -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnNoRolesAssociatedWithThing] :: !TcTyThing -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnNonExactName] :: !RdrName -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnNotARecordSelector] :: !Name -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnNotOpenFamily] :: TyCon -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnReportCustomQuasiError] :: !Bool -> !String -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnRunSpliceFailure] :: !Maybe String -> !RunSpliceFailReason -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnSpecialClassInst] :: !Class -> !Bool -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnSplicePolymorphicLocalVar] :: !Id -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnSpliceThrewException] :: !SplicePhase -> !SomeException -> !String -> !LHsExpr GhcTc -> !Bool -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnTypedTHWithPolyType] :: !TcType -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnUnexpectedTypeSplice] :: !HsType GhcRn -> TcRnMessage
- GHC.Tc.Errors.Types: [ea_expanded_expected, ea_expanded_actual] :: ExpectedActualInfo -> Type
- GHC.Tc.Errors.Types: [ea_expected, ea_actual] :: ExpectedActualInfo -> Type
- GHC.Tc.Errors.Types: [showWrap, showWrapVars, showType, showProv, showMatches] :: HoleFitDispConfig -> Bool
- GHC.Tc.Errors.Types: [untouchableTyVarImplication] :: TcSolverReportMsg -> Implication
- GHC.Tc.Errors.Types: [untouchableTyVar] :: TcSolverReportMsg -> TyVar
- GHC.Tc.Errors.Types: instance GHC.Utils.Outputable.Outputable GHC.Tc.Errors.Types.PromotionErr
- GHC.Tc.Gen.Head: lookupParents :: Bool -> RdrName -> RnM [(RecSelParent, GlobalRdrElt)]
- GHC.Tc.Gen.Head: notSelector :: Name -> TcRnMessage
- GHC.Tc.Gen.Match: type TcStmtChecker body rho_type = forall thing. HsStmtContext GhcTc -> Stmt GhcRn (LocatedA (body GhcRn)) -> rho_type -> (rho_type -> TcM thing) -> TcM (Stmt GhcTc (LocatedA (body GhcTc)), thing)
- GHC.Tc.Instance.Class: instance GHC.Utils.Outputable.Outputable GHC.Tc.Instance.Class.InstanceWhat
- GHC.Tc.Instance.Family: newFamInst :: FamFlavor -> CoAxiom Unbranched -> TcM FamInst
- GHC.Tc.Module: badReexportedBootThing :: Bool -> Name -> Name -> TcRnMessage
- GHC.Tc.Module: missingBootThing :: Bool -> Name -> String -> TcRnMessage
- GHC.Tc.Solver.Canonical: ContinueWith :: a -> StopOrContinue a
- GHC.Tc.Solver.Canonical: Stop :: CtEvidence -> SDoc -> StopOrContinue a
- GHC.Tc.Solver.Canonical: andWhenContinue :: TcS (StopOrContinue a) -> (a -> TcS (StopOrContinue b)) -> TcS (StopOrContinue b)
- GHC.Tc.Solver.Canonical: canonicalize :: Ct -> TcS (StopOrContinue Ct)
- GHC.Tc.Solver.Canonical: continueWith :: a -> TcS (StopOrContinue a)
- GHC.Tc.Solver.Canonical: data StopOrContinue a
- GHC.Tc.Solver.Canonical: infixr 0 `andWhenContinue`
- GHC.Tc.Solver.Canonical: instance GHC.Base.Functor GHC.Tc.Solver.Canonical.StopOrContinue
- GHC.Tc.Solver.Canonical: instance GHC.Utils.Outputable.Outputable a => GHC.Utils.Outputable.Outputable (GHC.Tc.Solver.Canonical.StopOrContinue a)
- GHC.Tc.Solver.Canonical: makeSuperClasses :: [Ct] -> TcS [Ct]
- GHC.Tc.Solver.Canonical: rewriteEqEvidence :: RewriterSet -> CtEvidence -> SwapFlag -> Reduction -> Reduction -> TcS CtEvidence
- GHC.Tc.Solver.Canonical: solveCallStack :: CtEvidence -> EvCallStack -> TcS ()
- GHC.Tc.Solver.Canonical: stopWith :: CtEvidence -> String -> TcS (StopOrContinue a)
- GHC.Tc.Solver.Canonical: unifyWanted :: RewriterSet -> CtLoc -> Role -> TcType -> TcType -> TcS Coercion
- GHC.Tc.Solver.InertSet: addInertItem :: TcLevel -> InertCans -> Ct -> InertCans
- GHC.Tc.Solver.InertSet: insertCycleBreakerBinding :: TcTyVar -> TcType -> CycleBreakerVarStack -> CycleBreakerVarStack
- GHC.Tc.Solver.Interact: instance GHC.Utils.Outputable.Outputable GHC.Tc.Solver.Interact.InteractResult
- GHC.Tc.Solver.Interact: solveSimpleGivens :: [Ct] -> TcS ()
- GHC.Tc.Solver.Interact: solveSimpleWanteds :: Cts -> TcS WantedConstraints
- GHC.Tc.Solver.Monad: TouchableOuterLevel :: [TcTyVar] -> TcLevel -> TouchabilityTestResult
- GHC.Tc.Solver.Monad: TouchableSameLevel :: TouchabilityTestResult
- GHC.Tc.Solver.Monad: Untouchable :: TouchabilityTestResult
- GHC.Tc.Solver.Monad: addInertCan :: Ct -> TcS ()
- GHC.Tc.Solver.Monad: addSolvedDict :: InstanceWhat -> CtEvidence -> Class -> [Type] -> TcS ()
- GHC.Tc.Solver.Monad: breakTyEqCycle_maybe :: CtEvidence -> CheckTyEqResult -> CanEqLHS -> TcType -> TcS (Maybe ReductionN)
- GHC.Tc.Solver.Monad: data TouchabilityTestResult
- GHC.Tc.Solver.Monad: getTcSInerts :: TcS InertSet
- GHC.Tc.Solver.Monad: instance GHC.Driver.Session.HasDynFlags GHC.Tc.Solver.Monad.TcS
- GHC.Tc.Solver.Monad: instance GHC.Utils.Outputable.Outputable GHC.Tc.Solver.Monad.TouchabilityTestResult
- GHC.Tc.Solver.Monad: newGivenEvVars :: CtLoc -> [(TcPredType, EvTerm)] -> TcS [CtEvidence]
- GHC.Tc.Solver.Monad: rewriterView :: TcType -> Maybe TcType
- GHC.Tc.Solver.Monad: setLclEnv :: TcLclEnv -> TcS a -> TcS a
- GHC.Tc.Solver.Monad: setTcSInerts :: InertSet -> TcS ()
- GHC.Tc.Solver.Monad: touchabilityTest :: CtFlavour -> TcTyVar -> TcType -> TcS (TouchabilityTestResult, TcType)
- GHC.Tc.Solver.Monad: updInertDicts :: (DictMap Ct -> DictMap Ct) -> TcS ()
- GHC.Tc.Solver.Monad: updInertIrreds :: (Cts -> Cts) -> TcS ()
- GHC.Tc.Solver.Monad: updInertTcS :: (InertSet -> InertSet) -> TcS ()
- GHC.Tc.Solver.Rewrite: instance GHC.Driver.Session.HasDynFlags GHC.Tc.Solver.Rewrite.RewriteM
- GHC.Tc.Solver.Types: addDict :: DictMap a -> Class -> [Type] -> a -> DictMap a
- GHC.Tc.Solver.Types: addDictsByClass :: DictMap Ct -> Class -> Bag Ct -> DictMap Ct
- GHC.Tc.Solver.Types: delDict :: DictMap a -> Class -> [Type] -> DictMap a
- GHC.Tc.Solver.Types: filterDicts :: (Ct -> Bool) -> DictMap Ct -> DictMap Ct
- GHC.Tc.Solver.Types: foldFunEqs :: (a -> b -> b) -> FunEqMap a -> b -> b
- GHC.Tc.Solver.Types: partitionDicts :: (Ct -> Bool) -> DictMap Ct -> (Bag Ct, DictMap Ct)
- GHC.Tc.TyCl: wrongKindOfFamily :: TyCon -> TcRnMessage
- GHC.Tc.Types: ImportByPlugin :: WhereFrom
- GHC.Tc.Types: ImportBySystem :: WhereFrom
- GHC.Tc.Types: ImportByUser :: IsBootInterface -> WhereFrom
- GHC.Tc.Types: [env_ut] :: Env gbl lcl -> {-# UNPACK #-} !Char
- GHC.Tc.Types: [sb_tcs] :: SelfBootInfo -> NameSet
- GHC.Tc.Types: [tcg_field_env] :: TcGblEnv -> RecFieldEnv
- GHC.Tc.Types: data WhereFrom
- GHC.Tc.Types: instance GHC.Driver.Session.ContainsDynFlags (GHC.Tc.Types.Env gbl lcl)
- GHC.Tc.Types: instance GHC.Types.Name.Occurrence.HasOccName GHC.Tc.Types.TcBinder
- GHC.Tc.Types: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.IdBindingInfo
- GHC.Tc.Types: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.TcBinder
- GHC.Tc.Types: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.TcIdSigInfo
- GHC.Tc.Types: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.TcIdSigInst
- GHC.Tc.Types: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.TcPatSynInfo
- GHC.Tc.Types: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.TcSigInfo
- GHC.Tc.Types: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.TcTyThing
- GHC.Tc.Types: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.ThStage
- GHC.Tc.Types: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.WhereFrom
- GHC.Tc.Types: pushErrCtxt :: CtOrigin -> ErrCtxt -> CtLoc -> CtLoc
- GHC.Tc.Types: pushErrCtxtSameOrigin :: ErrCtxt -> CtLoc -> CtLoc
- GHC.Tc.Types: type RecFieldEnv = NameEnv [FieldLabel]
- GHC.Tc.Types: type TcIdSet = IdSet
- GHC.Tc.Types.Constraint: [cc_class] :: Ct -> Class
- GHC.Tc.Types.Constraint: [cc_eq_rel] :: Ct -> EqRel
- GHC.Tc.Types.Constraint: [cc_ev] :: Ct -> CtEvidence
- GHC.Tc.Types.Constraint: [cc_lhs] :: Ct -> CanEqLHS
- GHC.Tc.Types.Constraint: [cc_pend_sc] :: Ct -> Bool
- GHC.Tc.Types.Constraint: [cc_reason] :: Ct -> CtIrredReason
- GHC.Tc.Types.Constraint: [cc_rhs] :: Ct -> Xi
- GHC.Tc.Types.Constraint: [cc_tyargs] :: Ct -> [Xi]
- GHC.Tc.Types.Constraint: addRewriterSet :: RewriterSet -> CoercionHole -> RewriterSet
- GHC.Tc.Types.Constraint: andManyCts :: [Cts] -> Cts
- GHC.Tc.Types.Constraint: insolubleEqCt :: Ct -> Bool
- GHC.Tc.Types.Constraint: isUserTypeError :: PredType -> Bool
- GHC.Tc.Types.Constraint: mkKindLoc :: TcType -> TcType -> CtLoc -> CtLoc
- GHC.Tc.Types.Constraint: mkNonCanonicalCt :: Ct -> Ct
- GHC.Tc.Types.Constraint: pprCts :: Cts -> SDoc
- GHC.Tc.Types.Constraint: rewriterSetFromCo :: Coercion -> RewriterSet
- GHC.Tc.Types.Constraint: rewriterSetFromType :: Type -> RewriterSet
- GHC.Tc.Types.Constraint: rewriterSetFromTypes :: [Type] -> RewriterSet
- GHC.Tc.Types.Evidence: [eb_is_given] :: EvBind -> Bool
- GHC.Tc.Types.Origin: GhcBug20076 :: CtOrigin
- GHC.Tc.Utils.Concrete: makeTypeConcrete :: ConcreteTvOrigin -> TcType -> TcM (TcType, [NotConcreteReason])
- GHC.Tc.Utils.Env: instance GHC.Types.TyThing.MonadThings (GHC.Data.IOEnv.IOEnv (GHC.Tc.Types.Env GHC.Tc.Types.TcGblEnv GHC.Tc.Types.TcLclEnv))
- GHC.Tc.Utils.Env: ioLookupDataCon :: HscEnv -> Name -> IO DataCon
- GHC.Tc.Utils.Env: tcCheckUsage :: Name -> Mult -> TcM a -> TcM (a, HsWrapper)
- GHC.Tc.Utils.Env: tcInitOpenTidyEnv :: [TyCoVar] -> TcM TidyEnv
- GHC.Tc.Utils.Env: tcInitTidyEnv :: TcM TidyEnv
- GHC.Tc.Utils.Monad: emitInsoluble :: Ct -> TcM ()
- GHC.Tc.Utils.Monad: getRecFieldEnv :: TcRn RecFieldEnv
- GHC.Tc.Utils.TcMType: anyUnfilledCoercionHoles :: RewriterSet -> TcM Bool
- GHC.Tc.Utils.TcMType: instance GHC.Base.Monoid GHC.Tc.Utils.TcMType.UnfilledCoercionHoleMonoid
- GHC.Tc.Utils.TcMType: instance GHC.Base.Semigroup GHC.Tc.Utils.TcMType.UnfilledCoercionHoleMonoid
- GHC.Tc.Utils.TcMType: newConcreteHole :: Kind -> Type -> TcM (ConcreteHole, TcType)
- GHC.Tc.Utils.TcMType: tidyCt :: TidyEnv -> Ct -> Ct
- GHC.Tc.Utils.TcMType: tidyDelayedError :: TidyEnv -> DelayedError -> DelayedError
- GHC.Tc.Utils.TcMType: tidyEvVar :: TidyEnv -> EvVar -> EvVar
- GHC.Tc.Utils.TcMType: tidyHole :: TidyEnv -> Hole -> Hole
- GHC.Tc.Utils.TcMType: type ConcreteHole = CoercionHole
- GHC.Tc.Utils.TcMType: zonkCo :: Coercion -> TcM Coercion
- GHC.Tc.Utils.TcMType: zonkCoVar :: CoVar -> TcM CoVar
- GHC.Tc.Utils.TcMType: zonkCt :: Ct -> TcM Ct
- GHC.Tc.Utils.TcMType: zonkDTyCoVarSetAndFV :: DTyCoVarSet -> TcM DTyCoVarSet
- GHC.Tc.Utils.TcMType: zonkEvVar :: EvVar -> TcM EvVar
- GHC.Tc.Utils.TcMType: zonkId :: TcId -> TcM TcId
- GHC.Tc.Utils.TcMType: zonkImplication :: Implication -> TcM Implication
- GHC.Tc.Utils.TcMType: zonkInvisTVBinder :: VarBndr TcTyVar spec -> TcM (VarBndr TcTyVar spec)
- GHC.Tc.Utils.TcMType: zonkSimples :: Cts -> TcM Cts
- GHC.Tc.Utils.TcMType: zonkSkolemInfo :: SkolemInfo -> TcM SkolemInfo
- GHC.Tc.Utils.TcMType: zonkSkolemInfoAnon :: SkolemInfoAnon -> TcM SkolemInfoAnon
- GHC.Tc.Utils.TcMType: zonkTcTyVar :: TcTyVar -> TcM TcType
- GHC.Tc.Utils.TcMType: zonkTcTyVarToTcTyVar :: HasDebugCallStack => TcTyVar -> TcM TcTyVar
- GHC.Tc.Utils.TcMType: zonkTcTyVars :: [TcTyVar] -> TcM [TcType]
- GHC.Tc.Utils.TcMType: zonkTcTyVarsToTcTyVars :: HasDebugCallStack => [TcTyVar] -> TcM [TcTyVar]
- GHC.Tc.Utils.TcMType: zonkTcType :: TcType -> TcM TcType
- GHC.Tc.Utils.TcMType: zonkTcTypeAndFV :: TcType -> TcM DTyCoVarSet
- GHC.Tc.Utils.TcMType: zonkTcTypes :: [TcType] -> TcM [TcType]
- GHC.Tc.Utils.TcMType: zonkTidyFRRInfos :: TidyEnv -> [FixedRuntimeRepErrorInfo] -> TcM (TidyEnv, [FixedRuntimeRepErrorInfo])
- GHC.Tc.Utils.TcMType: zonkTidyOrigin :: TidyEnv -> CtOrigin -> TcM (TidyEnv, CtOrigin)
- GHC.Tc.Utils.TcMType: zonkTidyOrigins :: TidyEnv -> [CtOrigin] -> TcM (TidyEnv, [CtOrigin])
- GHC.Tc.Utils.TcMType: zonkTidyTcType :: TidyEnv -> TcType -> TcM (TidyEnv, TcType)
- GHC.Tc.Utils.TcMType: zonkTidyTcTypes :: TidyEnv -> [TcType] -> TcM (TidyEnv, [TcType])
- GHC.Tc.Utils.TcMType: zonkTyCoVarKind :: TyCoVar -> TcM TyCoVar
- GHC.Tc.Utils.TcMType: zonkTyCoVarsAndFV :: TyCoVarSet -> TcM TyCoVarSet
- GHC.Tc.Utils.TcMType: zonkTyCoVarsAndFVList :: [TyCoVar] -> TcM [TyCoVar]
- GHC.Tc.Utils.TcMType: zonkWC :: WantedConstraints -> TcM WantedConstraints
- GHC.Tc.Utils.TcType: AtLeastOneArgExpected :: IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: ForeignDynNotPtr :: !Type -> !Type -> IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: ForeignLabelNotAPtr :: TypeCannotBeMarshaledReason
- GHC.Tc.Utils.TcType: IOResultExpected :: IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: LinearTypesNotAllowed :: IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: NewtypeDataConNotInScope :: !Maybe TyCon -> TypeCannotBeMarshaledReason
- GHC.Tc.Utils.TcType: NotABoxedMarshalableTyCon :: TypeCannotBeMarshaledReason
- GHC.Tc.Utils.TcType: NotADataType :: TypeCannotBeMarshaledReason
- GHC.Tc.Utils.TcType: NotBoxedKindAny :: TypeCannotBeMarshaledReason
- GHC.Tc.Utils.TcType: NotSimpleUnliftedType :: TypeCannotBeMarshaledReason
- GHC.Tc.Utils.TcType: OneArgExpected :: IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: PSF_Size :: PatersonSizeFailure
- GHC.Tc.Utils.TcType: PSF_TyFam :: TyCon -> PatersonSizeFailure
- GHC.Tc.Utils.TcType: PSF_TyVar :: [TyVar] -> PatersonSizeFailure
- GHC.Tc.Utils.TcType: SafeHaskellMustBeInIO :: IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: TypeCannotBeMarshaled :: !Type -> TypeCannotBeMarshaledReason -> IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: UnexpectedNestedForall :: IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: UnliftedFFITypesNeeded :: TypeCannotBeMarshaledReason
- GHC.Tc.Utils.TcType: data IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: data PatersonSizeFailure
- GHC.Tc.Utils.TcType: data TypeCannotBeMarshaledReason
- GHC.Tc.Utils.TcType: instance GHC.Generics.Generic GHC.Tc.Utils.TcType.IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: instance GHC.Generics.Generic GHC.Tc.Utils.TcType.TypeCannotBeMarshaledReason
- GHC.Tc.Utils.TcType: isEqPredClass :: Class -> Bool
- GHC.Tc.Utils.TcType: isFFIArgumentTy :: DynFlags -> Safety -> Type -> Validity' IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: isFFIDynTy :: Type -> Type -> Validity' IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: isFFIExportResultTy :: Type -> Validity' IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: isFFIExternalTy :: Type -> Validity' IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: isFFIImportResultTy :: DynFlags -> Type -> Validity' IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: isFFILabelTy :: Type -> Validity' IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: isFFIPrimArgumentTy :: DynFlags -> Type -> Validity' IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: isFFIPrimResultTy :: DynFlags -> Type -> Validity' IllegalForeignTypeReason
- GHC.Tc.Utils.TcType: isFunPtrTy :: Type -> Bool
- GHC.Tc.Utils.TcType: orphNamesOfCo :: Coercion -> NameSet
- GHC.Tc.Utils.TcType: orphNamesOfCoCon :: CoAxiom br -> NameSet
- GHC.Tc.Utils.TcType: orphNamesOfType :: Type -> NameSet
- GHC.Tc.Utils.TcType: orphNamesOfTypes :: [Type] -> NameSet
- GHC.Tc.Utils.TcType: tcTyConVisibilities :: TyCon -> [Bool]
- GHC.Tc.Utils.Unify: checkTyFamEq :: TyCon -> [TcType] -> TcType -> CheckTyEqResult
- GHC.Tc.Utils.Unify: checkTyVarEq :: TcTyVar -> TcType -> CheckTyEqResult
- GHC.Tc.Utils.Unify: checkTypeEq :: CanEqLHS -> TcType -> CheckTyEqResult
- GHC.Tc.Utils.Unify: startSolvingByUnification :: MetaInfo -> TcType -> TcM (Maybe TcType)
- GHC.Tc.Utils.Zonk: DefaultFlexi :: ZonkFlexi
- GHC.Tc.Utils.Zonk: NoFlexi :: ZonkFlexi
- GHC.Tc.Utils.Zonk: RuntimeUnkFlexi :: ZonkFlexi
- GHC.Tc.Utils.Zonk: SkolemiseFlexi :: ZonkFlexi
- GHC.Tc.Utils.Zonk: conLikeResTy :: ConLike -> [Type] -> Type
- GHC.Tc.Utils.Zonk: data ZonkEnv
- GHC.Tc.Utils.Zonk: data ZonkFlexi
- GHC.Tc.Utils.Zonk: emptyZonkEnv :: TcM ZonkEnv
- GHC.Tc.Utils.Zonk: hsOverLitName :: OverLitVal -> Name
- GHC.Tc.Utils.Zonk: initZonkEnv :: (ZonkEnv -> TcM b) -> TcM b
- GHC.Tc.Utils.Zonk: instance GHC.Utils.Outputable.Outputable GHC.Tc.Utils.Zonk.ZonkEnv
- GHC.Tc.Utils.Zonk: lookupTyVarX :: ZonkEnv -> TcTyVar -> TyVar
- GHC.Tc.Utils.Zonk: mkEmptyZonkEnv :: ZonkFlexi -> TcM ZonkEnv
- GHC.Tc.Utils.Zonk: mkHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- GHC.Tc.Utils.Zonk: mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- GHC.Tc.Utils.Zonk: mkHsCaseAlt :: (Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns, Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA) => LPat (GhcPass p) -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p)))
- GHC.Tc.Utils.Zonk: mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc
- GHC.Tc.Utils.Zonk: shortCutLit :: Platform -> OverLitVal -> TcType -> Maybe (HsExpr GhcTc)
- GHC.Tc.Utils.Zonk: tcShortCutLit :: HsOverLit GhcRn -> ExpRhoType -> TcM (Maybe (HsOverLit GhcTc))
- GHC.Tc.Utils.Zonk: type TcId = Id
- GHC.Tc.Utils.Zonk: type TcIdSet = IdSet
- GHC.Tc.Utils.Zonk: zonkCoToCo :: ZonkEnv -> Coercion -> TcM Coercion
- GHC.Tc.Utils.Zonk: zonkEvBinds :: ZonkEnv -> Bag EvBind -> TcM (ZonkEnv, Bag EvBind)
- GHC.Tc.Utils.Zonk: zonkScaledTcTypesToTypesX :: ZonkEnv -> [Scaled TcType] -> TcM [Scaled Type]
- GHC.Tc.Utils.Zonk: zonkTcEvBinds :: ZonkEnv -> TcEvBinds -> TcM (ZonkEnv, TcEvBinds)
- GHC.Tc.Utils.Zonk: zonkTcMethInfoToMethInfoX :: ZonkEnv -> TcMethInfo -> TcM MethInfo
- GHC.Tc.Utils.Zonk: zonkTcTypeToType :: TcType -> TcM Type
- GHC.Tc.Utils.Zonk: zonkTcTypeToTypeX :: ZonkEnv -> TcType -> TcM Type
- GHC.Tc.Utils.Zonk: zonkTcTypesToTypesX :: ZonkEnv -> [TcType] -> TcM [Type]
- GHC.Tc.Utils.Zonk: zonkTopBndrs :: [TcId] -> TcM [Id]
- GHC.Tc.Utils.Zonk: zonkTopDecls :: Bag EvBind -> LHsBinds GhcTc -> [LRuleDecl GhcTc] -> [LTcSpecPrag] -> [LForeignDecl GhcTc] -> TcM (TypeEnv, Bag EvBind, LHsBinds GhcTc, [LForeignDecl GhcTc], [LTcSpecPrag], [LRuleDecl GhcTc])
- GHC.Tc.Utils.Zonk: zonkTopExpr :: HsExpr GhcTc -> TcM (HsExpr GhcTc)
- GHC.Tc.Utils.Zonk: zonkTopLExpr :: LHsExpr GhcTc -> TcM (LHsExpr GhcTc)
- GHC.Tc.Utils.Zonk: zonkTyBndrs :: [TcTyVar] -> TcM (ZonkEnv, [TyVar])
- GHC.Tc.Utils.Zonk: zonkTyBndrsX :: ZonkEnv -> [TcTyVar] -> TcM (ZonkEnv, [TyVar])
- GHC.Tc.Utils.Zonk: zonkTyVarBinderX :: ZonkEnv -> VarBndr TcTyVar vis -> TcM (ZonkEnv, VarBndr TyVar vis)
- GHC.Tc.Utils.Zonk: zonkTyVarBindersX :: ZonkEnv -> [VarBndr TcTyVar vis] -> TcM (ZonkEnv, [VarBndr TyVar vis])
- GHC.Tc.Utils.Zonk: zonkTyVarOcc :: HasDebugCallStack => ZonkEnv -> TcTyVar -> TcM Type
- GHC.Tc.Validity: arityErr :: Outputable a => SDoc -> a -> Int -> Int -> TcRnMessage
- GHC.Types.Avail: FieldGreName :: FieldLabel -> GreName
- GHC.Types.Avail: NormalGreName :: Name -> GreName
- GHC.Types.Avail: avail :: Name -> AvailInfo
- GHC.Types.Avail: availField :: FieldLabel -> AvailInfo
- GHC.Types.Avail: availFlds :: AvailInfo -> [FieldLabel]
- GHC.Types.Avail: availGreName :: AvailInfo -> GreName
- GHC.Types.Avail: availGreNames :: AvailInfo -> [GreName]
- GHC.Types.Avail: availNamesWithSelectors :: AvailInfo -> [Name]
- GHC.Types.Avail: availNonFldNames :: AvailInfo -> [Name]
- GHC.Types.Avail: availSubordinateGreNames :: AvailInfo -> [GreName]
- GHC.Types.Avail: availTC :: Name -> [Name] -> [FieldLabel] -> AvailInfo
- GHC.Types.Avail: availsToNameSetWithSelectors :: [AvailInfo] -> NameSet
- GHC.Types.Avail: data GreName
- GHC.Types.Avail: greNameFieldLabel :: GreName -> Maybe FieldLabel
- GHC.Types.Avail: greNameMangledName :: GreName -> Name
- GHC.Types.Avail: greNamePrintableName :: GreName -> Name
- GHC.Types.Avail: greNameSrcSpan :: GreName -> SrcSpan
- GHC.Types.Avail: instance Control.DeepSeq.NFData GHC.Types.Avail.GreName
- GHC.Types.Avail: instance Data.Data.Data GHC.Types.Avail.GreName
- GHC.Types.Avail: instance GHC.Classes.Eq GHC.Types.Avail.AvailInfo
- GHC.Types.Avail: instance GHC.Classes.Eq GHC.Types.Avail.GreName
- GHC.Types.Avail: instance GHC.Classes.Ord GHC.Types.Avail.GreName
- GHC.Types.Avail: instance GHC.Types.Name.Occurrence.HasOccName GHC.Types.Avail.GreName
- GHC.Types.Avail: instance GHC.Utils.Binary.Binary GHC.Types.Avail.GreName
- GHC.Types.Avail: instance GHC.Utils.Outputable.Outputable GHC.Types.Avail.GreName
- GHC.Types.Avail: partitionGreNames :: [GreName] -> ([Name], [FieldLabel])
- GHC.Types.Avail: stableGreNameCmp :: GreName -> GreName -> Ordering
- GHC.Types.Error: SuggestBindTyVarExplicitly :: Name -> GhcHint
- GHC.Types.Error: SuggestFixOrphanInstance :: GhcHint
- GHC.Types.Error: SuggestImportingDataCon :: GhcHint
- GHC.Types.Error: WarningWithFlag :: !WarningFlag -> DiagnosticReason
- GHC.Types.Error: instance GHC.Types.Error.Diagnostic GHC.Types.Error.UnknownDiagnostic
- GHC.Types.Error.Codes: instance (GHC.Types.Error.Codes.ConRecursInto con GHC.Types.~ 'GHC.Maybe.Just GHC.Types.Error.UnknownDiagnostic, GHC.Types.Error.Codes.HasType GHC.Types.Error.UnknownDiagnostic con f) => GHC.Types.Error.Codes.ConstructorCode con f ('GHC.Maybe.Just GHC.Types.Error.UnknownDiagnostic)
- GHC.Types.FieldLabel: [flLabel] :: FieldLabel -> FieldLabelString
- GHC.Types.FieldLabel: fieldLabelPrintableName :: FieldLabel -> Name
- GHC.Types.FieldLabel: fieldSelectorOccName :: FieldLabelString -> OccName -> DuplicateRecordFields -> FieldSelectors -> OccName
- GHC.Types.FieldLabel: instance Control.DeepSeq.NFData GHC.Types.FieldLabel.FieldLabel
- GHC.Types.Hint: SuggestBindTyVarExplicitly :: Name -> GhcHint
- GHC.Types.Hint: SuggestFixOrphanInstance :: GhcHint
- GHC.Types.Hint: SuggestImportingDataCon :: GhcHint
- GHC.Types.Name.Occurrence: extendOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccName -> a -> OccEnv a
- GHC.Types.Name.Occurrence: filterOccSet :: (OccName -> Bool) -> OccSet -> OccSet
- GHC.Types.Name.Occurrence: foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b
- GHC.Types.Name.Occurrence: instance Data.Data.Data a => Data.Data.Data (GHC.Types.Name.Occurrence.OccEnv a)
- GHC.Types.Name.Occurrence: instance GHC.Types.Unique.Uniquable GHC.Types.Name.Occurrence.OccName
- GHC.Types.Name.Occurrence: intersectOccSet :: OccSet -> OccSet -> OccSet
- GHC.Types.Name.Occurrence: minusOccSet :: OccSet -> OccSet -> OccSet
- GHC.Types.Name.Occurrence: mkRecFldSelOcc :: FastString -> OccName
- GHC.Types.Name.Occurrence: occSetToEnv :: OccSet -> OccEnv OccName
- GHC.Types.Name.Reader: FieldGreName :: FieldLabel -> GreName
- GHC.Types.Name.Reader: NormalGreName :: Name -> GreName
- GHC.Types.Name.Reader: data GlobalRdrElt
- GHC.Types.Name.Reader: data GreName
- GHC.Types.Name.Reader: greFieldLabel :: GlobalRdrElt -> Maybe FieldLabel
- GHC.Types.Name.Reader: greMangledName :: GlobalRdrElt -> Name
- GHC.Types.Name.Reader: greNameSrcSpan :: GreName -> SrcSpan
- GHC.Types.Name.Reader: grePrintableName :: GlobalRdrElt -> Name
- GHC.Types.Name.Reader: gresFromAvail :: (Name -> Maybe ImportSpec) -> AvailInfo -> [GlobalRdrElt]
- GHC.Types.Name.Reader: gresFromAvails :: Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt]
- GHC.Types.Name.Reader: instance Control.DeepSeq.NFData GHC.Types.Name.Reader.GlobalRdrElt
- GHC.Types.Name.Reader: instance Control.DeepSeq.NFData GHC.Types.Name.Reader.ImportSpec
- GHC.Types.Name.Reader: instance Control.DeepSeq.NFData GHC.Types.Name.Reader.Parent
- GHC.Types.Name.Reader: instance Data.Data.Data GHC.Types.Name.Reader.GlobalRdrElt
- GHC.Types.Name.Reader: instance GHC.Types.Name.Occurrence.HasOccName GHC.Types.Name.Reader.GlobalRdrElt
- GHC.Types.Name.Reader: instance GHC.Utils.Outputable.Outputable GHC.Types.Name.Reader.GlobalRdrElt
- GHC.Types.Name.Reader: localGREsFromAvail :: AvailInfo -> [GlobalRdrElt]
- GHC.Types.Name.Reader: lookupGRE_GreName :: GlobalRdrEnv -> GreName -> Maybe GlobalRdrElt
- GHC.Types.Name.Reader: lookupGRE_Name_OccName :: GlobalRdrEnv -> Name -> OccName -> Maybe GlobalRdrElt
- GHC.Types.Name.Reader: lookupGRE_RdrName :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt]
- GHC.Types.Name.Reader: lookupGRE_RdrName' :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt]
- GHC.Types.Name.Reader: lookupGlobalRdrEnv :: GlobalRdrEnv -> OccName -> [GlobalRdrElt]
- GHC.Types.RepType: LiftedRep :: PrimRep
- GHC.Types.RepType: UnliftedRep :: PrimRep
- GHC.Types.SourceFile: HsBootFile :: HscSource
- GHC.Types.SourceFile: HsigFile :: HscSource
- GHC.Types.SourceText: instance GHC.Utils.Binary.Binary GHC.Types.SourceText.StringLiteral
- GHC.Types.SrcLoc: [bufSpanStart, bufSpanEnd] :: BufSpan -> {-# UNPACK #-} !BufPos
- GHC.Types.TyThing: tyThingAvailInfo :: TyThing -> [AvailInfo]
- GHC.Types.Unique: mkTag :: Char -> Word64
- GHC.Types.Unique: mkUniqueInt :: Char -> Int -> Unique
- GHC.Types.Unique: mkUniqueIntGrimily :: Int -> Unique
- GHC.Types.Unique.FM: foldUFM :: (elt -> a -> a) -> a -> UniqFM key elt -> a
- GHC.Types.Unique.Supply: uniqFromTag :: Char -> IO Unique
- GHC.Unit.External: [n_ifaces_in, n_decls_in, n_decls_out, n_rules_in, n_rules_out, n_insts_in, n_insts_out] :: EpsStats -> !Int
- GHC.Unit.Module.ModIface: [mi_warn_fn] :: ModIfaceBackend -> !OccName -> Maybe (WarningTxt GhcRn)
- GHC.Unit.Module.Warnings: NoWarnings :: Warnings pass
- GHC.Unit.Module.Warnings: instance GHC.Classes.Eq (Language.Haskell.Syntax.Extension.IdP pass) => GHC.Classes.Eq (GHC.Unit.Module.Warnings.WarningTxt pass)
- GHC.Unit.Module.Warnings: instance GHC.Utils.Binary.Binary (GHC.Unit.Module.Warnings.WarningTxt GHC.Hs.Extension.GhcRn)
- GHC.Unit.Module.Warnings: instance GHC.Utils.Binary.Binary (GHC.Unit.Module.Warnings.Warnings GHC.Hs.Extension.GhcRn)
- GHC.Unit.Module.Warnings: mkIfaceWarnCache :: Warnings p -> OccName -> Maybe (WarningTxt p)
- GHC.Unit.Module.Warnings: plusWarns :: Warnings p -> Warnings p -> Warnings p
- GHC.Unit.State: UnusableUnit :: !Unit -> !UnusableUnitReason -> !Bool -> UnusableUnit
- GHC.Unit.State: [uuIsReexport] :: UnusableUnit -> !Bool
- GHC.Unit.State: [uuReason] :: UnusableUnit -> !UnusableUnitReason
- GHC.Unit.State: [uuUnit] :: UnusableUnit -> !Unit
- GHC.Unit.State: data UnusableUnit
- GHC.Utils.Containers.Internal.BitUtil: bitcount :: Int -> Word64 -> Int
- GHC.Utils.Containers.Internal.BitUtil: highestBitMask :: Word64 -> Word64
- GHC.Utils.Containers.Internal.BitUtil: shiftLL :: Word64 -> Int -> Word64
- GHC.Utils.Containers.Internal.BitUtil: shiftRL :: Word64 -> Int -> Word64
- GHC.Utils.Containers.Internal.StrictPair: (:*:) :: !a -> !b -> StrictPair a b
- GHC.Utils.Containers.Internal.StrictPair: data StrictPair a b
- GHC.Utils.Containers.Internal.StrictPair: infixr 1 :*:
- GHC.Utils.Containers.Internal.StrictPair: toPair :: StrictPair a b -> (a, b)
- GHC.Utils.Error: defaultDiagnosticOpts :: Diagnostic a => DiagnosticOpts a
- GHC.Utils.Outputable: instance GHC.Utils.Outputable.Outputable GHC.Data.Word64Set.Internal.Word64Set
- GHC.Utils.Outputable: word64 :: IsLine doc => Word64 -> doc
- GHC.Utils.Unique: anyOfUnique :: Uniquable a => a -> [Unique] -> Bool
- GHC.Utils.Unique: sameUnique :: Uniquable a => a -> a -> Bool
- GHC.Utils.Word64: intToWord64 :: HasCallStack => Int -> Word64
- GHC.Utils.Word64: truncateWord64ToWord32 :: Word64 -> Word32
- GHC.Utils.Word64: word64ToInt :: HasCallStack => Word64 -> Int
+ GHC: Opt_DisableJsMinifier :: GeneralFlag
+ GHC: Opt_InsertBreakpoints :: GeneralFlag
+ GHC: Opt_SpecialiseIncoherents :: GeneralFlag
+ GHC: Opt_UnoptimizedCoreForInterpreter :: GeneralFlag
+ GHC: [customWarningCategories] :: DynFlags -> WarningCategorySet
+ GHC: [fatalCustomWarningCategories] :: DynFlags -> WarningCategorySet
+ GHC: [fma] :: DynFlags -> Bool
+ GHC: [givensFuel] :: DynFlags -> Int
+ GHC: [qcsFuel] :: DynFlags -> Int
+ GHC: [wantedsFuel] :: DynFlags -> Int
+ GHC.Builtin.Names: fieldQual_RDR :: Module -> FastString -> FastString -> RdrName
+ GHC.Builtin.Names: unsatisfiableClassName :: Name
+ GHC.Builtin.Names: unsatisfiableClassNameKey :: Unique
+ GHC.Builtin.Names: unsatisfiableIdName :: Name
+ GHC.Builtin.Names: unsatisfiableIdNameKey :: Unique
+ GHC.Builtin.Names.TH: bndrInvisKey :: Unique
+ GHC.Builtin.Names.TH: bndrInvisName :: Name
+ GHC.Builtin.Names.TH: bndrReqKey :: Unique
+ GHC.Builtin.Names.TH: bndrReqName :: Name
+ GHC.Builtin.Names.TH: kindedBndrTVIdKey :: Unique
+ GHC.Builtin.Names.TH: kindedBndrTVName :: Name
+ GHC.Builtin.Names.TH: mkNameG_fldIdKey :: Unique
+ GHC.Builtin.Names.TH: mkNameG_fldName :: Name
+ GHC.Builtin.Names.TH: mkNameG_fldRDR :: RdrName
+ GHC.Builtin.Names.TH: plainBndrTVIdKey :: Unique
+ GHC.Builtin.Names.TH: plainBndrTVName :: Name
+ GHC.Builtin.Names.TH: qqFld :: FastString -> Unique -> Name
+ GHC.Builtin.Names.TH: thFld :: FastString -> FastString -> Unique -> Name
+ GHC.Builtin.Names.TH: tyVarBndrVisTyConKey :: Unique
+ GHC.Builtin.Names.TH: tyVarBndrVisTyConName :: Name
+ GHC.Builtin.PrimOps: AtomicSwapMutVarOp :: PrimOp
+ GHC.Builtin.PrimOps: CopyAddrToAddrNonOverlappingOp :: PrimOp
+ GHC.Builtin.PrimOps: CopyAddrToAddrOp :: PrimOp
+ GHC.Builtin.PrimOps: CopyMutableByteArrayNonOverlappingOp :: PrimOp
+ GHC.Builtin.PrimOps: DoubleFMAdd :: PrimOp
+ GHC.Builtin.PrimOps: DoubleFMSub :: PrimOp
+ GHC.Builtin.PrimOps: DoubleFNMAdd :: PrimOp
+ GHC.Builtin.PrimOps: DoubleFNMSub :: PrimOp
+ GHC.Builtin.PrimOps: FloatFMAdd :: PrimOp
+ GHC.Builtin.PrimOps: FloatFMSub :: PrimOp
+ GHC.Builtin.PrimOps: FloatFNMAdd :: PrimOp
+ GHC.Builtin.PrimOps: FloatFNMSub :: PrimOp
+ GHC.Builtin.PrimOps: SetAddrRangeOp :: PrimOp
+ GHC.Builtin.Types: isTupleTyOcc_maybe :: Module -> OccName -> Maybe Name
+ GHC.Builtin.Uniques: dataNSUnique :: Unique
+ GHC.Builtin.Uniques: isFldNSUnique :: Unique -> Bool
+ GHC.Builtin.Uniques: isTupleTyConUnique :: Unique -> Maybe (Boxity, Arity)
+ GHC.Builtin.Uniques: mkFldNSUnique :: FastString -> Unique
+ GHC.Builtin.Uniques: tcNSUnique :: Unique
+ GHC.Builtin.Uniques: tvNSUnique :: Unique
+ GHC.Builtin.Uniques: varNSUnique :: Unique
+ GHC.ByteCode.Types: HalfWord :: Word -> HalfWord
+ GHC.ByteCode.Types: instance GHC.Classes.Eq GHC.ByteCode.Types.HalfWord
+ GHC.ByteCode.Types: instance GHC.Classes.Ord GHC.ByteCode.Types.HalfWord
+ GHC.ByteCode.Types: instance GHC.Enum.Enum GHC.ByteCode.Types.HalfWord
+ GHC.ByteCode.Types: instance GHC.Num.Num GHC.ByteCode.Types.HalfWord
+ GHC.ByteCode.Types: instance GHC.Real.Integral GHC.ByteCode.Types.HalfWord
+ GHC.ByteCode.Types: instance GHC.Real.Real GHC.ByteCode.Types.HalfWord
+ GHC.ByteCode.Types: instance GHC.Show.Show GHC.ByteCode.Types.HalfWord
+ GHC.ByteCode.Types: instance GHC.Utils.Outputable.Outputable GHC.ByteCode.Types.HalfWord
+ GHC.ByteCode.Types: newtype HalfWord
+ GHC.Cmm.Expr: GlobalRegUse :: !GlobalReg -> !CmmType -> GlobalRegUse
+ GHC.Cmm.Expr: [globalRegUseGlobalReg] :: GlobalRegUse -> !GlobalReg
+ GHC.Cmm.Expr: [globalRegUseType] :: GlobalRegUse -> !CmmType
+ GHC.Cmm.Expr: data GlobalRegUse
+ GHC.Cmm.Expr: globalRegSpillType :: Platform -> GlobalReg -> CmmType
+ GHC.Cmm.Expr: instance GHC.Cmm.Expr.DefinerOfRegs GHC.Cmm.Reg.GlobalRegUse GHC.Cmm.Reg.CmmReg
+ GHC.Cmm.Expr: instance GHC.Cmm.Expr.UserOfRegs GHC.Cmm.Reg.GlobalRegUse GHC.Cmm.Reg.CmmReg
+ GHC.Cmm.MachOp: FMAdd :: FMASign
+ GHC.Cmm.MachOp: FMSub :: FMASign
+ GHC.Cmm.MachOp: FNMAdd :: FMASign
+ GHC.Cmm.MachOp: FNMSub :: FMASign
+ GHC.Cmm.MachOp: MO_FMA :: FMASign -> Width -> MachOp
+ GHC.Cmm.MachOp: data FMASign
+ GHC.Cmm.MachOp: instance GHC.Classes.Eq GHC.Cmm.MachOp.FMASign
+ GHC.Cmm.MachOp: instance GHC.Show.Show GHC.Cmm.MachOp.FMASign
+ GHC.Cmm.MachOp: pprFMASign :: IsLine doc => FMASign -> doc
+ GHC.Cmm.Reg: GlobalRegUse :: !GlobalReg -> !CmmType -> GlobalRegUse
+ GHC.Cmm.Reg: [globalRegUseGlobalReg] :: GlobalRegUse -> !GlobalReg
+ GHC.Cmm.Reg: [globalRegUseType] :: GlobalRegUse -> !CmmType
+ GHC.Cmm.Reg: data GlobalRegUse
+ GHC.Cmm.Reg: globalRegSpillType :: Platform -> GlobalReg -> CmmType
+ GHC.Cmm.Reg: instance GHC.Classes.Eq GHC.Cmm.Reg.GlobalRegUse
+ GHC.Cmm.Reg: instance GHC.Classes.Ord GHC.Cmm.Reg.GlobalRegUse
+ GHC.Cmm.Reg: instance GHC.Show.Show GHC.Cmm.Reg.GlobalRegUse
+ GHC.Cmm.Reg: instance GHC.Utils.Outputable.Outputable GHC.Cmm.Reg.GlobalRegUse
+ GHC.Cmm.Reg: pprGlobalRegUse :: IsLine doc => GlobalRegUse -> doc
+ GHC.Cmm.Type: setCmmTypeWidth :: Width -> CmmType -> CmmType
+ GHC.Cmm.Utils: globalRegUsedIn :: Platform -> GlobalReg -> CmmExpr -> Bool
+ GHC.Cmm.Utils: globalRegsOverlap :: Platform -> GlobalReg -> GlobalReg -> Bool
+ GHC.CmmToAsm.AArch64.Instr: FMA :: FMASign -> Operand -> Operand -> Operand -> Operand -> Instr
+ GHC.CmmToAsm.CFG.Dominators: asGraph :: Tree Node -> Rooted
+ GHC.CmmToAsm.PPC.Instr: FMADD :: FMASign -> Format -> Reg -> Reg -> Reg -> Reg -> Instr
+ GHC.CmmToAsm.Wasm.Types: instance GHC.Types.Unique.Supply.MonadUnique (GHC.CmmToAsm.Wasm.Types.WasmCodeGenM w)
+ GHC.CmmToAsm.X86.Instr: FMA132 :: FMAPermutation
+ GHC.CmmToAsm.X86.Instr: FMA213 :: FMAPermutation
+ GHC.CmmToAsm.X86.Instr: FMA231 :: FMAPermutation
+ GHC.CmmToAsm.X86.Instr: FMA3 :: Format -> FMASign -> FMAPermutation -> Operand -> Reg -> Reg -> Instr
+ GHC.CmmToAsm.X86.Instr: data FMAPermutation
+ GHC.Core.Class: classHasSCs :: Class -> Bool
+ GHC.Core.Coercion: [ch_hetero_kind] :: CoercionHole -> Bool
+ GHC.Core.Coercion: mkFunCo :: Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
+ GHC.Core.Coercion: mkNakedFunCo :: Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
+ GHC.Core.Coercion: mkNomPrimEqPred :: Kind -> Type -> Type -> Type
+ GHC.Core.ConLike: conLikeConInfo :: ConLike -> ConInfo
+ GHC.Core.ConLike: conLikeConLikeName :: ConLike -> ConLikeName
+ GHC.Core.DataCon: flLabel :: FieldLabel -> FieldLabelString
+ GHC.Core.FamInstEnv: [fi_orphan] :: FamInst -> IsOrphan
+ GHC.Core.FamInstEnv: mkLocalFamInst :: FamFlavor -> CoAxiom Unbranched -> [TyVar] -> [CoVar] -> [Type] -> Type -> FamInst
+ GHC.Core.InstEnv: LookupInstErrFlexiVar :: LookupInstanceErrReason
+ GHC.Core.InstEnv: LookupInstErrNotExact :: LookupInstanceErrReason
+ GHC.Core.InstEnv: LookupInstErrNotFound :: LookupInstanceErrReason
+ GHC.Core.InstEnv: NonCanonical :: SourceText -> OverlapMode
+ GHC.Core.InstEnv: data LookupInstanceErrReason
+ GHC.Core.InstEnv: instance GHC.Generics.Generic GHC.Core.InstEnv.LookupInstanceErrReason
+ GHC.Core.InstEnv: mkImportedClsInst :: Name -> [RoughMatchTc] -> Name -> DFunId -> OverlapFlag -> IsOrphan -> ClsInst
+ GHC.Core.InstEnv: mkLocalClsInst :: DFunId -> OverlapFlag -> [TyVar] -> Class -> [Type] -> ClsInst
+ GHC.Core.InstEnv: type Canonical = Bool
+ GHC.Core.Opt.CallerCC.Types: CallerCcFilter :: Maybe ModuleName -> NamePattern -> CallerCcFilter
+ GHC.Core.Opt.CallerCC.Types: PChar :: Char -> NamePattern -> NamePattern
+ GHC.Core.Opt.CallerCC.Types: PEnd :: NamePattern
+ GHC.Core.Opt.CallerCC.Types: PWildcard :: NamePattern -> NamePattern
+ GHC.Core.Opt.CallerCC.Types: [ccfFuncName] :: CallerCcFilter -> NamePattern
+ GHC.Core.Opt.CallerCC.Types: [ccfModuleName] :: CallerCcFilter -> Maybe ModuleName
+ GHC.Core.Opt.CallerCC.Types: data CallerCcFilter
+ GHC.Core.Opt.CallerCC.Types: data NamePattern
+ GHC.Core.Opt.CallerCC.Types: instance GHC.Utils.Binary.Binary GHC.Core.Opt.CallerCC.Types.CallerCcFilter
+ GHC.Core.Opt.CallerCC.Types: instance GHC.Utils.Binary.Binary GHC.Core.Opt.CallerCC.Types.NamePattern
+ GHC.Core.Opt.CallerCC.Types: instance GHC.Utils.Outputable.Outputable GHC.Core.Opt.CallerCC.Types.CallerCcFilter
+ GHC.Core.Opt.CallerCC.Types: instance GHC.Utils.Outputable.Outputable GHC.Core.Opt.CallerCC.Types.NamePattern
+ GHC.Core.Opt.CallerCC.Types: occNameMatches :: NamePattern -> OccName -> Bool
+ GHC.Core.Opt.CallerCC.Types: parseCallerCcFilter :: String -> Either String CallerCcFilter
+ GHC.Core.Opt.CallerCC.Types: parseNamePattern :: Parser NamePattern
+ GHC.Core.Opt.ConstantFold: caseRules2 :: InExpr -> InId -> [InAlt] -> Maybe (InExpr, InId, [InAlt])
+ GHC.Core.Opt.Monad: getUniqMask :: CoreM Char
+ GHC.Core.Opt.Monad: instance GHC.Driver.DynFlags.HasDynFlags GHC.Core.Opt.Monad.CoreM
+ GHC.Core.Opt.OccurAnal: instance GHC.Utils.Outputable.Outputable GHC.Core.Opt.OccurAnal.NodeDetails
+ GHC.Core.Opt.OccurAnal: instance GHC.Utils.Outputable.Outputable GHC.Core.Opt.OccurAnal.SimpleNodeDetails
+ GHC.Core.Opt.OccurAnal: instance GHC.Utils.Outputable.Outputable GHC.Core.Opt.OccurAnal.TailUsageDetails
+ GHC.Core.Opt.Simplify.Inline: BoringCtxt :: CallCtxt
+ GHC.Core.Opt.Simplify.Inline: CaseCtxt :: CallCtxt
+ GHC.Core.Opt.Simplify.Inline: DiscArgCtxt :: CallCtxt
+ GHC.Core.Opt.Simplify.Inline: RhsCtxt :: RecFlag -> CallCtxt
+ GHC.Core.Opt.Simplify.Inline: RuleArgCtxt :: CallCtxt
+ GHC.Core.Opt.Simplify.Inline: ValAppCtxt :: CallCtxt
+ GHC.Core.Opt.Simplify.Inline: callSiteInline :: Logger -> UnfoldingOpts -> Int -> Id -> Bool -> Bool -> [ArgSummary] -> CallCtxt -> Maybe CoreExpr
+ GHC.Core.Opt.Simplify.Inline: couldBeSmallEnoughToInline :: UnfoldingOpts -> Int -> CoreExpr -> Bool
+ GHC.Core.Opt.Simplify.Inline: data CallCtxt
+ GHC.Core.Opt.Simplify.Inline: smallEnoughToInline :: UnfoldingOpts -> Unfolding -> Bool
+ GHC.Core.Predicate: isEqualityClass :: Class -> Bool
+ GHC.Core.Predicate: mentionsIP :: Type -> Class -> [Type] -> Bool
+ GHC.Core.Predicate: mkNomPrimEqPred :: Kind -> Type -> Type -> Type
+ GHC.Core.TyCo.FVs: isInjectiveInType :: TyVar -> Type -> Bool
+ GHC.Core.TyCo.Rep: [ch_hetero_kind] :: CoercionHole -> Bool
+ GHC.Core.TyCo.Rep: [fco_arg] :: Coercion -> Coercion
+ GHC.Core.TyCo.Rep: [fco_res] :: Coercion -> Coercion
+ GHC.Core.TyCo.Rep: isHeteroKindCoHole :: CoercionHole -> Bool
+ GHC.Core.TyCo.Rep: typesSize :: [Type] -> Int
+ GHC.Core.TyCon: BoxedRep :: {-# UNPACK #-} !Maybe Levity -> PrimRep
+ GHC.Core.TyCon: Lifted :: Levity
+ GHC.Core.TyCon: OpenFamilyFlavour :: TypeOrData -> Maybe tc -> TyConFlavour tc
+ GHC.Core.TyCon: Unlifted :: Levity
+ GHC.Core.TyCon: data Levity
+ GHC.Core.TyCon: isInvisSpecTcbVis :: TyConBndrVis -> Bool
+ GHC.Core.Type: coreFullView :: Type -> Type
+ GHC.Core.Type: definitelyLiftedType :: Type -> Bool
+ GHC.Core.Type: definitelyUnliftedType :: Type -> Bool
+ GHC.Core.Type: isConcreteType :: Type -> Bool
+ GHC.Core.Type: isForAllTy_invis_ty :: Type -> Bool
+ GHC.Core.Type: isTerminatingType :: HasDebugCallStack => Type -> Bool
+ GHC.Core.Type: rewriterView :: Type -> Maybe Type
+ GHC.Core.Type: type ErrorMsgType = Type
+ GHC.Core.Unfold: SizeIs :: {-# UNPACK #-} !Int -> !Bag (Id, Int) -> {-# UNPACK #-} !Int -> ExprSize
+ GHC.Core.Unfold: TooBig :: ExprSize
+ GHC.Core.Unfold: [_es_args] :: ExprSize -> !Bag (Id, Int)
+ GHC.Core.Unfold: [_es_discount] :: ExprSize -> {-# UNPACK #-} !Int
+ GHC.Core.Unfold: [_es_size_is] :: ExprSize -> {-# UNPACK #-} !Int
+ GHC.Core.Unfold: data ExprSize
+ GHC.Core.Unfold: nonTriv :: ArgSummary -> Bool
+ GHC.Core.Unfold: sizeExpr :: UnfoldingOpts -> Int -> [Id] -> CoreExpr -> ExprSize
+ GHC.Core.UsageEnv: popUE :: NamedThing n => UsageEnv -> n -> (Usage, UsageEnv)
+ GHC.Core.UsageEnv: singleUsageUE :: Id -> UsageEnv
+ GHC.Data.Bag: lookupBag :: Eq a => a -> Bag (a, b) -> Maybe b
+ GHC.Data.Bag: mapMaybeBagM :: Monad m => (a -> m (Maybe b)) -> Bag a -> m (Bag b)
+ GHC.Data.Bag: pprBag :: Outputable a => Bag a -> SDoc
+ GHC.Data.FastString: fastStringToShortText :: FastString -> ShortText
+ GHC.Data.FastString.Env: mapMaybeFsEnv :: (elt1 -> Maybe elt2) -> FastStringEnv elt1 -> FastStringEnv elt2
+ GHC.Data.FastString.Env: nonDetFoldFsEnv :: (a -> b -> b) -> b -> FastStringEnv a -> b
+ GHC.Data.FastString.Env: strictMapFsEnv :: (a -> b) -> FastStringEnv a -> FastStringEnv b
+ GHC.Data.Graph.Directed: instance GHC.Base.Functor (GHC.Data.Graph.Directed.Node key)
+ GHC.Data.IOEnv: instance GHC.Driver.DynFlags.ContainsDynFlags env => GHC.Driver.DynFlags.HasDynFlags (GHC.Data.IOEnv.IOEnv env)
+ GHC.Data.List.SetOps: removeDupsOn :: Ord b => (a -> b) -> [a] -> ([a], [NonEmpty a])
+ GHC.Driver.Backend: backendSupportsBreakpoints :: Backend -> Bool
+ GHC.Driver.Backpack: instance GHC.Driver.DynFlags.HasDynFlags GHC.Driver.Backpack.BkpM
+ GHC.Driver.CmdLine: WordSuffix :: (Word -> EwM m ()) -> OptKind (m :: Type -> Type)
+ GHC.Driver.CmdLine: type Warn = Located DriverMessage
+ GHC.Driver.CmdLine: warnsToMessages :: DiagOpts -> [Warn] -> Messages DriverMessage
+ GHC.Driver.Config.Diagnostic: initIfaceMessageOpts :: DynFlags -> DiagnosticOpts IfaceMessage
+ GHC.Driver.Config.HsToCore.Ticks: breakpointsAllowed :: DynFlags -> Bool
+ GHC.Driver.DynFlags: AixLD :: [Option] -> LinkerInfo
+ GHC.Driver.DynFlags: AppleClang :: CompilerInfo
+ GHC.Driver.DynFlags: AppleClang51 :: CompilerInfo
+ GHC.Driver.DynFlags: Clang :: CompilerInfo
+ GHC.Driver.DynFlags: ClearPackageDBs :: PackageDBFlag
+ GHC.Driver.DynFlags: CompManager :: GhcMode
+ GHC.Driver.DynFlags: DT_Dont :: DynamicTooState
+ GHC.Driver.DynFlags: DT_Dyn :: DynamicTooState
+ GHC.Driver.DynFlags: DT_OK :: DynamicTooState
+ GHC.Driver.DynFlags: DarwinLD :: [Option] -> LinkerInfo
+ GHC.Driver.DynFlags: Deployable :: DynLibLoader
+ GHC.Driver.DynFlags: DistrustPackage :: String -> TrustFlag
+ GHC.Driver.DynFlags: DynFlags :: GhcMode -> GhcLink -> !Backend -> {-# UNPACK #-} !GhcNameVersion -> {-# UNPACK #-} !FileSettings -> Platform -> {-# UNPACK #-} !ToolSettings -> {-# UNPACK #-} !PlatformMisc -> [(String, String)] -> TempDir -> Int -> Int -> Int -> Int -> Int -> Maybe String -> [Int] -> Maybe ParMakeCount -> Bool -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Int -> Int -> Int -> !Int -> Maybe Int -> Maybe Int -> Int -> Maybe Word -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Bool -> Maybe Int -> Int -> [FilePath] -> ModuleName -> Maybe String -> IntWithInf -> IntWithInf -> Int -> Int -> Int -> UnitId -> Maybe UnitId -> [(ModuleName, Module)] -> Maybe FilePath -> Maybe String -> Set ModuleName -> Set ModuleName -> Ways -> Maybe (String, Int) -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> String -> String -> String -> String -> String -> String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> DynLibLoader -> !Bool -> FilePath -> Maybe FilePath -> [Option] -> IncludeSpecs -> [String] -> [String] -> [String] -> Maybe String -> RtsOptsEnabled -> Bool -> String -> [ModuleName] -> [(ModuleName, String)] -> [String] -> [ExternalPluginSpec] -> FilePath -> Bool -> Bool -> [ModuleName] -> [String] -> [PackageDBFlag] -> [IgnorePackageFlag] -> [PackageFlag] -> [PackageFlag] -> [TrustFlag] -> Maybe FilePath -> EnumSet DumpFlag -> EnumSet GeneralFlag -> EnumSet WarningFlag -> EnumSet WarningFlag -> WarningCategorySet -> WarningCategorySet -> Maybe Language -> SafeHaskellMode -> Bool -> Bool -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> [OnOff Extension] -> EnumSet Extension -> !UnfoldingOpts -> Int -> Int -> FlushOut -> Maybe FilePath -> Maybe String -> [String] -> Int -> Int -> Bool -> OverridingBool -> Bool -> Scheme -> ProfAuto -> [CallerCcFilter] -> Maybe String -> Maybe SseVersion -> Maybe BmiVersion -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> IORef (Maybe LinkerInfo) -> IORef (Maybe CompilerInfo) -> IORef (Maybe CompilerInfo) -> Int -> Int -> Int -> Bool -> Maybe Int -> Word -> Int -> Weights -> DynFlags
+ GHC.Driver.DynFlags: Emscripten :: CompilerInfo
+ GHC.Driver.DynFlags: ErrorWithoutFlag :: DiagnosticReason
+ GHC.Driver.DynFlags: ExposePackage :: String -> PackageArg -> ModRenaming -> PackageFlag
+ GHC.Driver.DynFlags: FileOption :: String -> String -> Option
+ GHC.Driver.DynFlags: FlushOut :: IO () -> FlushOut
+ GHC.Driver.DynFlags: GCC :: CompilerInfo
+ GHC.Driver.DynFlags: GHC2021 :: Language
+ GHC.Driver.DynFlags: GlobalPkgDb :: PkgDbRef
+ GHC.Driver.DynFlags: GnuGold :: [Option] -> LinkerInfo
+ GHC.Driver.DynFlags: GnuLD :: [Option] -> LinkerInfo
+ GHC.Driver.DynFlags: Haskell2010 :: Language
+ GHC.Driver.DynFlags: Haskell98 :: Language
+ GHC.Driver.DynFlags: HidePackage :: String -> PackageFlag
+ GHC.Driver.DynFlags: IgnorePackage :: String -> IgnorePackageFlag
+ GHC.Driver.DynFlags: IncludeSpecs :: [String] -> [String] -> [String] -> IncludeSpecs
+ GHC.Driver.DynFlags: LinkBinary :: GhcLink
+ GHC.Driver.DynFlags: LinkDynLib :: GhcLink
+ GHC.Driver.DynFlags: LinkInMemory :: GhcLink
+ GHC.Driver.DynFlags: LinkMergedObj :: GhcLink
+ GHC.Driver.DynFlags: LinkStaticLib :: GhcLink
+ GHC.Driver.DynFlags: LlvmLLD :: [Option] -> LinkerInfo
+ GHC.Driver.DynFlags: MkDepend :: GhcMode
+ GHC.Driver.DynFlags: ModRenaming :: Bool -> [(ModuleName, ModuleName)] -> ModRenaming
+ GHC.Driver.DynFlags: Mold :: [Option] -> LinkerInfo
+ GHC.Driver.DynFlags: NoGlobalPackageDB :: PackageDBFlag
+ GHC.Driver.DynFlags: NoLink :: GhcLink
+ GHC.Driver.DynFlags: NoProfAuto :: ProfAuto
+ GHC.Driver.DynFlags: NoUserPackageDB :: PackageDBFlag
+ GHC.Driver.DynFlags: Off :: a -> OnOff a
+ GHC.Driver.DynFlags: On :: a -> OnOff a
+ GHC.Driver.DynFlags: OneShot :: GhcMode
+ GHC.Driver.DynFlags: Opt_AbstractRefHoleFits :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_AlignmentSanitisation :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_AsmShortcutting :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_AutoLinkPackages :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_AutoSccsOnIndividualCafs :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_BreakOnError :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_BreakOnException :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_BuildDynamicToo :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_BuildingCabalPackage :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ByteCode :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ByteCodeAndObjectCode :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CSE :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CallArity :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CaseFolding :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CaseMerge :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CatchNonexhaustiveCases :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CfgBlocklayout :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CmmControlFlow :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CmmElimCommonBlocks :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CmmSink :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CmmStaticPred :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CmmThreadSanitizer :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CompactUnwind :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CoreConstantFolding :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CprAnal :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_CrossModuleSpecialise :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_D_dump_BCOs :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_asm :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_asm_conflicts :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_asm_liveness :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_asm_native :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_asm_regalloc :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_asm_regalloc_stages :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_asm_stats :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_c_backend :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_call_arity :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cfg_weights :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_caf :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_cbe :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_cfg :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_cps :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_from_stg :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_info :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_proc :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_procmap :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_raw :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_sink :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_sp :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_split :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_switch :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_thread_sanitizer :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_verbose :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cmm_verbose_by_proc :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_core_stats :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cpr_signatures :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cpranal :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cs_trace :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_cse :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_debug :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_deriv :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_ds :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_ds_preopt :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_ec_trace :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_exitify :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_faststrings :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_float_in :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_float_out :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_foreign :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_hi :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_hi_diffs :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_hie :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_if_trace :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_inlinings :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_js :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_json :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_late_cc :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_liberate_case :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_llvm :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_minimal_imports :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_D_dump_mod_cycles :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_mod_map :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_occur_anal :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_opt_cmm :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_parsed :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_parsed_ast :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_prep :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_rn :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_rn_ast :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_rn_stats :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_rn_trace :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_rtti :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_rule_firings :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_rule_rewrites :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_rules :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_simpl :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_simpl_iterations :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_simpl_stats :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_simpl_trace :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_spec :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_spec_constr :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_splices :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_static_argument_transformation :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_stg_cg :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_stg_final :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_stg_from_core :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_stg_tags :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_stg_unarised :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_str_signatures :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_stranal :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_tc :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_tc_ast :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_tc_trace :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_ticked :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_timings :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_types :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_verbose_inlinings :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_view_pattern_commoning :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_dump_worker_wrapper :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_faststring_stats :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_no_debug_output :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_ppr_debug :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_source_stats :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_th_dec_file :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_verbose_core2core :: DumpFlag
+ GHC.Driver.DynFlags: Opt_D_verbose_stg2stg :: DumpFlag
+ GHC.Driver.DynFlags: Opt_DeferDiagnostics :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DeferOutOfScopeVariables :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DeferTypeErrors :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DeferTypedHoles :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DiagnosticsShowCaret :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DictsCheap :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DictsStrict :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DisableJsMinifier :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DistinctConstructorTables :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DistrustAllPackages :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DmdTxDictSel :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DoAnnotationLinting :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DoAsmLinting :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DoBoundsChecking :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DoCmmLinting :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DoCoreLinting :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DoEtaReduction :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DoLambdaEtaExpansion :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DoLinearCoreLinting :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DoStgLinting :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DoTagInferenceChecks :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DumpToFile :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_DumpWithWays :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_EagerBlackHoling :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_EmbedManifest :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_EnableRewriteRules :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_EnableThSpliceWarnings :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ErrorSpans :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ExcessPrecision :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_Exitification :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ExposeAllUnfoldings :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ExposeInternalSymbols :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ExternalDynamicRefs :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ExternalInterpreter :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_FamAppCache :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_FastLlvm :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_FastPAPCalls :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_FloatIn :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ForceRecomp :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_FullLaziness :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_FunToThunk :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_G_NoOptCoercion :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_G_NoStateHack :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_GenManifest :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_GhciHistory :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_GhciLeakCheck :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_GhciSandbox :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_Haddock :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_HaddockOptions :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_HelpfulErrors :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_HexWordLiterals :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_HideAllPackages :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_HideAllPluginPackages :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_HideSourcePaths :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_Hpc :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_IgnoreAsserts :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_IgnoreDotGhci :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_IgnoreHpcChanges :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_IgnoreInterfacePragmas :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_IgnoreOptimChanges :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ImplicitImportQualified :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_InfoTableMap :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_InlineGenerics :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_InlineGenericsAggressively :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_InsertBreakpoints :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_IrrefutableTuples :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_KeepCAFs :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_KeepGoing :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_KeepHcFiles :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_KeepHiDiffs :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_KeepHiFiles :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_KeepHscppFiles :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_KeepLlvmFiles :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_KeepOFiles :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_KeepRawTokenStream :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_KeepSFiles :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_KeepTmpFiles :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_KillAbsence :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_KillOneShot :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_LateDmdAnal :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_LateSpecialise :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_LiberateCase :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_LinkRts :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_LlvmFillUndefWithGarbage :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_LlvmTBAA :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_LocalFloatOut :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_LocalFloatOutTopLevel :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_LocalGhciHistory :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_Loopification :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_NoHsMain :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_NoIt :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_NoLlvmMangler :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_NoTypeableBinds :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_NumConstantFolding :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_OmitInterfacePragmas :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_OmitYields :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_OptimalApplicativeDo :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PIC :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PICExecutable :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PIE :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PackageTrust :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PedanticBottoms :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PluginTrustworthy :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PolymorphicSpecialisation :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_Pp :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PprCaseAsLet :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PprShowTicks :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintAxiomIncomps :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintBindContents :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintBindResult :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintEqualityRelations :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintEvldWithShow :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintExpandedSynonyms :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintExplicitCoercions :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintExplicitForalls :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintExplicitKinds :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintExplicitRuntimeReps :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintPotentialInstances :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintRedundantPromotionTicks :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintTypecheckerElaboration :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_PrintUnicodeSyntax :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ProfCountEntries :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ProfLateCcs :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ProfLateInlineCcs :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ProfManualCcs :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_RPath :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_RegsGraph :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_RegsIterative :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_RelativeDynlibPaths :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SharedImplib :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ShowDocsOfHoleFits :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ShowErrorContext :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ShowHoleConstraints :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ShowLoadedModules :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ShowMatchesOfHoleFits :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ShowProvOfHoleFits :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ShowTypeAppOfHoleFits :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ShowTypeAppVarsOfHoleFits :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ShowTypeOfHoleFits :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ShowValidHoleFits :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ShowWarnGroups :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SimplPreInlining :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SingleLibFolder :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SolveConstantDicts :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SortBySizeHoleFits :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SortBySubsumHoleFits :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SortValidHoleFits :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SpecConstr :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SpecConstrKeen :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_Specialise :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SpecialiseAggressively :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SpecialiseIncoherents :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SplitSections :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_StaticArgumentTransformation :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_StgCSE :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_StgLiftLams :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_StgStats :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_Strictness :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressCoercionTypes :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressCoercions :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressCoreSizes :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressIdInfo :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressModulePrefixes :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressStgExts :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressStgReps :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressTicks :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressTimestamps :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressTypeApplications :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressTypeSignatures :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressUnfoldings :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressUniques :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_SuppressVarKinds :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_Ticky :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_Ticky_AP :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_Ticky_Allocd :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_Ticky_Dyn_Thunk :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_Ticky_LNE :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_Ticky_Tag :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_UnboxSmallStrictFields :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_UnboxStrictFields :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_UnclutterValidHoleFits :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_UnoptimizedCoreForInterpreter :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_UseBytecodeRatherThanObjects :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_ValidateHie :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_VersionMacros :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_WarnAllMissedSpecs :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnAlternativeLayoutRuleTransitional :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnAmbiguousFields :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnAutoOrphans :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnCPPUndef :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnCompatUnqualifiedImports :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnDeferredOutOfScopeVariables :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnDeferredTypeErrors :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnDeprecatedFlags :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnDerivingDefaults :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnDerivingTypeable :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnDodgyExports :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnDodgyForeignImports :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnDodgyImports :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnDuplicateConstraints :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnDuplicateExports :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnEmptyEnumerations :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnForallIdentifier :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnGADTMonoLocalBinds :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnHiShadows :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnIdentities :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnImplicitKindVars :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnImplicitLift :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnImplicitPrelude :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnImplicitRhsQuantification :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnInaccessibleCode :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnIncompleteExportWarnings :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnIncompletePatterns :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnIncompletePatternsRecUpd :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnIncompleteUniPatterns :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnInconsistentFlags :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnInferredSafeImports :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnInlineRuleShadowing :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnInvalidHaddock :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnIsError :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_WarnLoopySuperclassSolve :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMisplacedPragmas :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissedExtraSharedLib :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissedSpecs :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingDerivingStrategies :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingExportList :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingExportedPatternSynonymSignatures :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingExportedSignatures :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingFields :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingHomeModules :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingImportList :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingKindSignatures :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingLocalSignatures :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingMethods :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingMonadFailInstances :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingPatternSynonymSignatures :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingPolyKindSignatures :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingRoleAnnotations :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingSafeHaskellMode :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMissingSignatures :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnMonomorphism :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnNameShadowing :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnNonCanonicalMonadFailInstances :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnNonCanonicalMonadInstances :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnNonCanonicalMonoidInstances :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnOperatorWhitespace :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnOperatorWhitespaceExtConflict :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnOrphans :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnOverflowedLiterals :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnOverlappingPatterns :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnPartialFields :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnPartialTypeSignatures :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnPrepositiveQualifiedModule :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnRedundantBangPatterns :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnRedundantConstraints :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnRedundantRecordWildcards :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnRedundantStrictnessFlags :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnSafe :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnSemigroup :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnSimplifiableClassConstraints :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnSpaceAfterBang :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnStarBinder :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnStarIsType :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnTabs :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnTermVariableCapture :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnTrustworthySafe :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnTypeDefaults :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnTypeEqualityOutOfScope :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnTypeEqualityRequiresOperators :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnTypedHoles :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnbangedStrictPatterns :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnicodeBidirectionalFormatCharacters :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnrecognisedPragmas :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnrecognisedWarningFlags :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnsafe :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnsupportedCallingConventions :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnsupportedLlvmVersion :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUntickedPromotedConstructors :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnusedDoBind :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnusedForalls :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnusedImports :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnusedLocalBinds :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnusedMatches :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnusedPackages :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnusedPatternBinds :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnusedRecordWildcards :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnusedTopBinds :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnUnusedTypePatterns :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WarnWrongDoBind :: WarningFlag
+ GHC.Driver.DynFlags: Opt_WeightlessBlocklayout :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_WholeArchiveHsLibs :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_WorkerWrapper :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_WorkerWrapperUnlift :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_WriteHie :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_WriteIfSimplifiedCore :: GeneralFlag
+ GHC.Driver.DynFlags: Opt_WriteInterface :: GeneralFlag
+ GHC.Driver.DynFlags: Option :: String -> Option
+ GHC.Driver.DynFlags: PackageArg :: String -> PackageArg
+ GHC.Driver.DynFlags: PackageDB :: PkgDbRef -> PackageDBFlag
+ GHC.Driver.DynFlags: ParMakeNumProcessors :: ParMakeCount
+ GHC.Driver.DynFlags: ParMakeSemaphore :: FilePath -> ParMakeCount
+ GHC.Driver.DynFlags: ParMakeThisMany :: Int -> ParMakeCount
+ GHC.Driver.DynFlags: PkgDbPath :: FilePath -> PkgDbRef
+ GHC.Driver.DynFlags: ProfAutoAll :: ProfAuto
+ GHC.Driver.DynFlags: ProfAutoCalls :: ProfAuto
+ GHC.Driver.DynFlags: ProfAutoExports :: ProfAuto
+ GHC.Driver.DynFlags: ProfAutoTop :: ProfAuto
+ GHC.Driver.DynFlags: RtsOptsAll :: RtsOptsEnabled
+ GHC.Driver.DynFlags: RtsOptsIgnore :: RtsOptsEnabled
+ GHC.Driver.DynFlags: RtsOptsIgnoreAll :: RtsOptsEnabled
+ GHC.Driver.DynFlags: RtsOptsNone :: RtsOptsEnabled
+ GHC.Driver.DynFlags: RtsOptsSafeOnly :: RtsOptsEnabled
+ GHC.Driver.DynFlags: SolarisLD :: [Option] -> LinkerInfo
+ GHC.Driver.DynFlags: SystemDependent :: DynLibLoader
+ GHC.Driver.DynFlags: TrustPackage :: String -> TrustFlag
+ GHC.Driver.DynFlags: UnitIdArg :: Unit -> PackageArg
+ GHC.Driver.DynFlags: UnknownCC :: CompilerInfo
+ GHC.Driver.DynFlags: UnknownLD :: LinkerInfo
+ GHC.Driver.DynFlags: UserPkgDb :: PkgDbRef
+ GHC.Driver.DynFlags: WarningWithCategory :: !WarningCategory -> DiagnosticReason
+ GHC.Driver.DynFlags: WarningWithFlags :: !NonEmpty WarningFlag -> DiagnosticReason
+ GHC.Driver.DynFlags: WarningWithoutFlag :: DiagnosticReason
+ GHC.Driver.DynFlags: [avx2] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [avx512cd] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [avx512er] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [avx512f] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [avx512pf] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [avx] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [backend] :: DynFlags -> !Backend
+ GHC.Driver.DynFlags: [binBlobThreshold] :: DynFlags -> Maybe Word
+ GHC.Driver.DynFlags: [bmiVersion] :: DynFlags -> Maybe BmiVersion
+ GHC.Driver.DynFlags: [callerCcFilters] :: DynFlags -> [CallerCcFilter]
+ GHC.Driver.DynFlags: [canUseColor] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [cfgWeights] :: DynFlags -> Weights
+ GHC.Driver.DynFlags: [cmdlineFrameworks] :: DynFlags -> [String]
+ GHC.Driver.DynFlags: [cmmProcAlignment] :: DynFlags -> Maybe Int
+ GHC.Driver.DynFlags: [colScheme] :: DynFlags -> Scheme
+ GHC.Driver.DynFlags: [customWarningCategories] :: DynFlags -> WarningCategorySet
+ GHC.Driver.DynFlags: [debugLevel] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [depExcludeMods] :: DynFlags -> [ModuleName]
+ GHC.Driver.DynFlags: [depIncludeCppDeps] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [depIncludePkgDeps] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [depMakefile] :: DynFlags -> FilePath
+ GHC.Driver.DynFlags: [depSuffixes] :: DynFlags -> [String]
+ GHC.Driver.DynFlags: [deriveViaOnLoc] :: DynFlags -> SrcSpan
+ GHC.Driver.DynFlags: [dmdUnboxWidth] :: DynFlags -> !Int
+ GHC.Driver.DynFlags: [dumpDir] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [dumpFlags] :: DynFlags -> EnumSet DumpFlag
+ GHC.Driver.DynFlags: [dumpPrefixForce] :: DynFlags -> Maybe FilePath
+ GHC.Driver.DynFlags: [dumpPrefix] :: DynFlags -> FilePath
+ GHC.Driver.DynFlags: [dylibInstallName] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [dynHiSuf_] :: DynFlags -> String
+ GHC.Driver.DynFlags: [dynLibLoader] :: DynFlags -> DynLibLoader
+ GHC.Driver.DynFlags: [dynObjectSuf_] :: DynFlags -> String
+ GHC.Driver.DynFlags: [dynOutputFile_] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [dynOutputHi] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [dynamicNow] :: DynFlags -> !Bool
+ GHC.Driver.DynFlags: [enableTimeStats] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [extensionFlags] :: DynFlags -> EnumSet Extension
+ GHC.Driver.DynFlags: [extensions] :: DynFlags -> [OnOff Extension]
+ GHC.Driver.DynFlags: [externalPluginSpecs] :: DynFlags -> [ExternalPluginSpec]
+ GHC.Driver.DynFlags: [fatalCustomWarningCategories] :: DynFlags -> WarningCategorySet
+ GHC.Driver.DynFlags: [fatalWarningFlags] :: DynFlags -> EnumSet WarningFlag
+ GHC.Driver.DynFlags: [fileSettings] :: DynFlags -> {-# UNPACK #-} !FileSettings
+ GHC.Driver.DynFlags: [floatLamArgs] :: DynFlags -> Maybe Int
+ GHC.Driver.DynFlags: [flushOut] :: DynFlags -> FlushOut
+ GHC.Driver.DynFlags: [fma] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [frameworkPaths] :: DynFlags -> [String]
+ GHC.Driver.DynFlags: [frontendPluginOpts] :: DynFlags -> [String]
+ GHC.Driver.DynFlags: [generalFlags] :: DynFlags -> EnumSet GeneralFlag
+ GHC.Driver.DynFlags: [ghcHeapSize] :: DynFlags -> Maybe Int
+ GHC.Driver.DynFlags: [ghcLink] :: DynFlags -> GhcLink
+ GHC.Driver.DynFlags: [ghcMode] :: DynFlags -> GhcMode
+ GHC.Driver.DynFlags: [ghcNameVersion] :: DynFlags -> {-# UNPACK #-} !GhcNameVersion
+ GHC.Driver.DynFlags: [ghcVersionFile] :: DynFlags -> Maybe FilePath
+ GHC.Driver.DynFlags: [ghciHistSize] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [ghciScripts] :: DynFlags -> [String]
+ GHC.Driver.DynFlags: [givensFuel] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [haddockOptions] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [hcSuf] :: DynFlags -> String
+ GHC.Driver.DynFlags: [hiDir] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [hiSuf_] :: DynFlags -> String
+ GHC.Driver.DynFlags: [hiddenModules] :: DynFlags -> Set ModuleName
+ GHC.Driver.DynFlags: [hieDir] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [hieSuf] :: DynFlags -> String
+ GHC.Driver.DynFlags: [historySize] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [homeUnitId_] :: DynFlags -> UnitId
+ GHC.Driver.DynFlags: [homeUnitInstanceOf_] :: DynFlags -> Maybe UnitId
+ GHC.Driver.DynFlags: [homeUnitInstantiations_] :: DynFlags -> [(ModuleName, Module)]
+ GHC.Driver.DynFlags: [hpcDir] :: DynFlags -> String
+ GHC.Driver.DynFlags: [ignorePackageFlags] :: DynFlags -> [IgnorePackageFlag]
+ GHC.Driver.DynFlags: [importPaths] :: DynFlags -> [FilePath]
+ GHC.Driver.DynFlags: [includePathsGlobal] :: IncludeSpecs -> [String]
+ GHC.Driver.DynFlags: [includePathsQuoteImplicit] :: IncludeSpecs -> [String]
+ GHC.Driver.DynFlags: [includePathsQuote] :: IncludeSpecs -> [String]
+ GHC.Driver.DynFlags: [includePaths] :: DynFlags -> IncludeSpecs
+ GHC.Driver.DynFlags: [incoherentOnLoc] :: DynFlags -> SrcSpan
+ GHC.Driver.DynFlags: [initialUnique] :: DynFlags -> Word
+ GHC.Driver.DynFlags: [interactivePrint] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [language] :: DynFlags -> Maybe Language
+ GHC.Driver.DynFlags: [ldInputs] :: DynFlags -> [Option]
+ GHC.Driver.DynFlags: [liberateCaseThreshold] :: DynFlags -> Maybe Int
+ GHC.Driver.DynFlags: [libraryPaths] :: DynFlags -> [String]
+ GHC.Driver.DynFlags: [liftLamsKnown] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [liftLamsNonRecArgs] :: DynFlags -> Maybe Int
+ GHC.Driver.DynFlags: [liftLamsRecArgs] :: DynFlags -> Maybe Int
+ GHC.Driver.DynFlags: [llvmOptLevel] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [mainFunIs] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [mainModuleNameIs] :: DynFlags -> ModuleName
+ GHC.Driver.DynFlags: [maxErrors] :: DynFlags -> Maybe Int
+ GHC.Driver.DynFlags: [maxInlineAllocSize] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [maxInlineMemcpyInsns] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [maxInlineMemsetInsns] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [maxPmCheckModels] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [maxRefHoleFits] :: DynFlags -> Maybe Int
+ GHC.Driver.DynFlags: [maxRelevantBinds] :: DynFlags -> Maybe Int
+ GHC.Driver.DynFlags: [maxSimplIterations] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [maxUncoveredPatterns] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [maxValidHoleFits] :: DynFlags -> Maybe Int
+ GHC.Driver.DynFlags: [maxWorkerArgs] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [modRenamingWithImplicit] :: ModRenaming -> Bool
+ GHC.Driver.DynFlags: [modRenamings] :: ModRenaming -> [(ModuleName, ModuleName)]
+ GHC.Driver.DynFlags: [newDerivOnLoc] :: DynFlags -> SrcSpan
+ GHC.Driver.DynFlags: [objectDir] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [objectSuf_] :: DynFlags -> String
+ GHC.Driver.DynFlags: [outputFile_] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [outputHi] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [overlapInstLoc] :: DynFlags -> SrcSpan
+ GHC.Driver.DynFlags: [packageDBFlags] :: DynFlags -> [PackageDBFlag]
+ GHC.Driver.DynFlags: [packageEnv] :: DynFlags -> Maybe FilePath
+ GHC.Driver.DynFlags: [packageFlags] :: DynFlags -> [PackageFlag]
+ GHC.Driver.DynFlags: [parMakeCount] :: DynFlags -> Maybe ParMakeCount
+ GHC.Driver.DynFlags: [pkgTrustOnLoc] :: DynFlags -> SrcSpan
+ GHC.Driver.DynFlags: [platformMisc] :: DynFlags -> {-# UNPACK #-} !PlatformMisc
+ GHC.Driver.DynFlags: [pluginModNameOpts] :: DynFlags -> [(ModuleName, String)]
+ GHC.Driver.DynFlags: [pluginModNames] :: DynFlags -> [ModuleName]
+ GHC.Driver.DynFlags: [pluginPackageFlags] :: DynFlags -> [PackageFlag]
+ GHC.Driver.DynFlags: [pprCols] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [pprUserLength] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [profAuto] :: DynFlags -> ProfAuto
+ GHC.Driver.DynFlags: [qcsFuel] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [rawSettings] :: DynFlags -> [(String, String)]
+ GHC.Driver.DynFlags: [reductionDepth] :: DynFlags -> IntWithInf
+ GHC.Driver.DynFlags: [reexportedModules] :: DynFlags -> Set ModuleName
+ GHC.Driver.DynFlags: [refLevelHoleFits] :: DynFlags -> Maybe Int
+ GHC.Driver.DynFlags: [reverseErrors] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [rtasmInfo] :: DynFlags -> IORef (Maybe CompilerInfo)
+ GHC.Driver.DynFlags: [rtccInfo] :: DynFlags -> IORef (Maybe CompilerInfo)
+ GHC.Driver.DynFlags: [rtldInfo] :: DynFlags -> IORef (Maybe LinkerInfo)
+ GHC.Driver.DynFlags: [rtsOptsEnabled] :: DynFlags -> RtsOptsEnabled
+ GHC.Driver.DynFlags: [rtsOptsSuggestions] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [rtsOpts] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [ruleCheck] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [safeHaskell] :: DynFlags -> SafeHaskellMode
+ GHC.Driver.DynFlags: [safeInfer] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [safeInferred] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [simplPhases] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [simplTickFactor] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [solverIterations] :: DynFlags -> IntWithInf
+ GHC.Driver.DynFlags: [specConstrCount] :: DynFlags -> Maybe Int
+ GHC.Driver.DynFlags: [specConstrRecursive] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [specConstrThreshold] :: DynFlags -> Maybe Int
+ GHC.Driver.DynFlags: [splitInfo] :: DynFlags -> Maybe (String, Int)
+ GHC.Driver.DynFlags: [sseVersion] :: DynFlags -> Maybe SseVersion
+ GHC.Driver.DynFlags: [strictnessBefore] :: DynFlags -> [Int]
+ GHC.Driver.DynFlags: [stubDir] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [targetPlatform] :: DynFlags -> Platform
+ GHC.Driver.DynFlags: [targetWays_] :: DynFlags -> Ways
+ GHC.Driver.DynFlags: [thOnLoc] :: DynFlags -> SrcSpan
+ GHC.Driver.DynFlags: [thisPackageName] :: DynFlags -> Maybe String
+ GHC.Driver.DynFlags: [tmpDir] :: DynFlags -> TempDir
+ GHC.Driver.DynFlags: [toolSettings] :: DynFlags -> {-# UNPACK #-} !ToolSettings
+ GHC.Driver.DynFlags: [trustFlags] :: DynFlags -> [TrustFlag]
+ GHC.Driver.DynFlags: [trustworthyOnLoc] :: DynFlags -> SrcSpan
+ GHC.Driver.DynFlags: [unfoldingOpts] :: DynFlags -> !UnfoldingOpts
+ GHC.Driver.DynFlags: [uniqueIncrement] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [useColor] :: DynFlags -> OverridingBool
+ GHC.Driver.DynFlags: [useUnicode] :: DynFlags -> Bool
+ GHC.Driver.DynFlags: [verbosity] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [wantedsFuel] :: DynFlags -> Int
+ GHC.Driver.DynFlags: [warnSafeOnLoc] :: DynFlags -> SrcSpan
+ GHC.Driver.DynFlags: [warnUnsafeOnLoc] :: DynFlags -> SrcSpan
+ GHC.Driver.DynFlags: [warningFlags] :: DynFlags -> EnumSet WarningFlag
+ GHC.Driver.DynFlags: [workingDirectory] :: DynFlags -> Maybe FilePath
+ GHC.Driver.DynFlags: addGlobalInclude :: IncludeSpecs -> [String] -> IncludeSpecs
+ GHC.Driver.DynFlags: addImplicitQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs
+ GHC.Driver.DynFlags: addQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs
+ GHC.Driver.DynFlags: class ContainsDynFlags t
+ GHC.Driver.DynFlags: class HasDynFlags (m :: Type -> Type)
+ GHC.Driver.DynFlags: data CompilerInfo
+ GHC.Driver.DynFlags: data DiagnosticReason
+ GHC.Driver.DynFlags: data DumpFlag
+ GHC.Driver.DynFlags: data DynFlags
+ GHC.Driver.DynFlags: data DynLibLoader
+ GHC.Driver.DynFlags: data DynamicTooState
+ GHC.Driver.DynFlags: data GeneralFlag
+ GHC.Driver.DynFlags: data GhcLink
+ GHC.Driver.DynFlags: data GhcMode
+ GHC.Driver.DynFlags: data IncludeSpecs
+ GHC.Driver.DynFlags: data Language
+ GHC.Driver.DynFlags: data LinkerInfo
+ GHC.Driver.DynFlags: data ModRenaming
+ GHC.Driver.DynFlags: data OnOff a
+ GHC.Driver.DynFlags: data Option
+ GHC.Driver.DynFlags: data PackageArg
+ GHC.Driver.DynFlags: data PackageDBFlag
+ GHC.Driver.DynFlags: data PackageFlag
+ GHC.Driver.DynFlags: data ParMakeCount
+ GHC.Driver.DynFlags: data PkgDbRef
+ GHC.Driver.DynFlags: data ProfAuto
+ GHC.Driver.DynFlags: data RtsOptsEnabled
+ GHC.Driver.DynFlags: data TrustFlag
+ GHC.Driver.DynFlags: data WarningFlag
+ GHC.Driver.DynFlags: defaultDynFlags :: Settings -> DynFlags
+ GHC.Driver.DynFlags: defaultFatalMessager :: FatalMessager
+ GHC.Driver.DynFlags: defaultFlushOut :: FlushOut
+ GHC.Driver.DynFlags: dopt :: DumpFlag -> DynFlags -> Bool
+ GHC.Driver.DynFlags: dopt_set :: DynFlags -> DumpFlag -> DynFlags
+ GHC.Driver.DynFlags: dopt_unset :: DynFlags -> DumpFlag -> DynFlags
+ GHC.Driver.DynFlags: dynamicTooState :: DynFlags -> DynamicTooState
+ GHC.Driver.DynFlags: extraGccViaCFlags :: DynFlags -> [String]
+ GHC.Driver.DynFlags: extractDynFlags :: ContainsDynFlags t => t -> DynFlags
+ GHC.Driver.DynFlags: flattenIncludes :: IncludeSpecs -> [String]
+ GHC.Driver.DynFlags: getDynFlags :: HasDynFlags m => m DynFlags
+ GHC.Driver.DynFlags: ghcUsagePath :: DynFlags -> FilePath
+ GHC.Driver.DynFlags: ghciUsagePath :: DynFlags -> FilePath
+ GHC.Driver.DynFlags: globalPackageDatabasePath :: DynFlags -> FilePath
+ GHC.Driver.DynFlags: gopt :: GeneralFlag -> DynFlags -> Bool
+ GHC.Driver.DynFlags: gopt_set :: DynFlags -> GeneralFlag -> DynFlags
+ GHC.Driver.DynFlags: gopt_unset :: DynFlags -> GeneralFlag -> DynFlags
+ GHC.Driver.DynFlags: hasNoDebugOutput :: DynFlags -> Bool
+ GHC.Driver.DynFlags: hasNoOptCoercion :: DynFlags -> Bool
+ GHC.Driver.DynFlags: hasNoStateHack :: DynFlags -> Bool
+ GHC.Driver.DynFlags: hasPprDebug :: DynFlags -> Bool
+ GHC.Driver.DynFlags: initDefaultSDocContext :: DynFlags -> SDocContext
+ GHC.Driver.DynFlags: initDynFlags :: DynFlags -> IO DynFlags
+ GHC.Driver.DynFlags: initPromotionTickContext :: DynFlags -> PromotionTickContext
+ GHC.Driver.DynFlags: initSDocContext :: DynFlags -> PprStyle -> SDocContext
+ GHC.Driver.DynFlags: instance (GHC.Base.Monad m, GHC.Driver.DynFlags.HasDynFlags m) => GHC.Driver.DynFlags.HasDynFlags (Control.Monad.Trans.Except.ExceptT e m)
+ GHC.Driver.DynFlags: instance (GHC.Base.Monad m, GHC.Driver.DynFlags.HasDynFlags m) => GHC.Driver.DynFlags.HasDynFlags (Control.Monad.Trans.Maybe.MaybeT m)
+ GHC.Driver.DynFlags: instance (GHC.Base.Monad m, GHC.Driver.DynFlags.HasDynFlags m) => GHC.Driver.DynFlags.HasDynFlags (Control.Monad.Trans.Reader.ReaderT a m)
+ GHC.Driver.DynFlags: instance (GHC.Base.Monoid a, GHC.Base.Monad m, GHC.Driver.DynFlags.HasDynFlags m) => GHC.Driver.DynFlags.HasDynFlags (Control.Monad.Trans.Writer.Lazy.WriterT a m)
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq GHC.Driver.DynFlags.CompilerInfo
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq GHC.Driver.DynFlags.DynLibLoader
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq GHC.Driver.DynFlags.DynamicTooState
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq GHC.Driver.DynFlags.GhcLink
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq GHC.Driver.DynFlags.GhcMode
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq GHC.Driver.DynFlags.IgnorePackageFlag
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq GHC.Driver.DynFlags.LinkerInfo
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq GHC.Driver.DynFlags.ModRenaming
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq GHC.Driver.DynFlags.PackageArg
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq GHC.Driver.DynFlags.PackageDBFlag
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq GHC.Driver.DynFlags.PackageFlag
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq GHC.Driver.DynFlags.PkgDbRef
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq GHC.Driver.DynFlags.TrustFlag
+ GHC.Driver.DynFlags: instance GHC.Classes.Eq a => GHC.Classes.Eq (GHC.Driver.DynFlags.OnOff a)
+ GHC.Driver.DynFlags: instance GHC.Classes.Ord GHC.Driver.DynFlags.DynamicTooState
+ GHC.Driver.DynFlags: instance GHC.Show.Show GHC.Driver.DynFlags.DynamicTooState
+ GHC.Driver.DynFlags: instance GHC.Show.Show GHC.Driver.DynFlags.GhcLink
+ GHC.Driver.DynFlags: instance GHC.Show.Show GHC.Driver.DynFlags.IncludeSpecs
+ GHC.Driver.DynFlags: instance GHC.Show.Show GHC.Driver.DynFlags.PackageArg
+ GHC.Driver.DynFlags: instance GHC.Show.Show GHC.Driver.DynFlags.RtsOptsEnabled
+ GHC.Driver.DynFlags: instance GHC.Show.Show a => GHC.Show.Show (GHC.Driver.DynFlags.OnOff a)
+ GHC.Driver.DynFlags: instance GHC.Utils.Outputable.Outputable GHC.Driver.DynFlags.GhcMode
+ GHC.Driver.DynFlags: instance GHC.Utils.Outputable.Outputable GHC.Driver.DynFlags.ModRenaming
+ GHC.Driver.DynFlags: instance GHC.Utils.Outputable.Outputable GHC.Driver.DynFlags.PackageArg
+ GHC.Driver.DynFlags: instance GHC.Utils.Outputable.Outputable GHC.Driver.DynFlags.PackageFlag
+ GHC.Driver.DynFlags: instance GHC.Utils.Outputable.Outputable a => GHC.Utils.Outputable.Outputable (GHC.Driver.DynFlags.OnOff a)
+ GHC.Driver.DynFlags: isNoLink :: GhcLink -> Bool
+ GHC.Driver.DynFlags: isOneShot :: GhcMode -> Bool
+ GHC.Driver.DynFlags: lang_set :: DynFlags -> Maybe Language -> DynFlags
+ GHC.Driver.DynFlags: languageExtensions :: Maybe Language -> [Extension]
+ GHC.Driver.DynFlags: newtype FlushOut
+ GHC.Driver.DynFlags: newtype IgnorePackageFlag
+ GHC.Driver.DynFlags: optLevelFlags :: [([Int], GeneralFlag)]
+ GHC.Driver.DynFlags: optimisationFlags :: EnumSet GeneralFlag
+ GHC.Driver.DynFlags: packageFlagsChanged :: DynFlags -> DynFlags -> Bool
+ GHC.Driver.DynFlags: pattern WarningWithFlag :: WarningFlag -> DiagnosticReason
+ GHC.Driver.DynFlags: positionIndependent :: DynFlags -> Bool
+ GHC.Driver.DynFlags: programName :: DynFlags -> String
+ GHC.Driver.DynFlags: projectVersion :: DynFlags -> String
+ GHC.Driver.DynFlags: setDynamicNow :: DynFlags -> DynFlags
+ GHC.Driver.DynFlags: showOpt :: Option -> String
+ GHC.Driver.DynFlags: targetProfile :: DynFlags -> Profile
+ GHC.Driver.DynFlags: toolDir :: DynFlags -> Maybe FilePath
+ GHC.Driver.DynFlags: topDir :: DynFlags -> FilePath
+ GHC.Driver.DynFlags: turnOff :: TurnOnFlag
+ GHC.Driver.DynFlags: turnOn :: TurnOnFlag
+ GHC.Driver.DynFlags: type FatalMessager = String -> IO ()
+ GHC.Driver.DynFlags: type TurnOnFlag = Bool
+ GHC.Driver.DynFlags: versionedAppDir :: String -> ArchOS -> MaybeT IO FilePath
+ GHC.Driver.DynFlags: versionedFilePath :: ArchOS -> FilePath
+ GHC.Driver.DynFlags: ways :: DynFlags -> Ways
+ GHC.Driver.DynFlags: wopt :: WarningFlag -> DynFlags -> Bool
+ GHC.Driver.DynFlags: wopt_any_custom :: DynFlags -> Bool
+ GHC.Driver.DynFlags: wopt_fatal :: WarningFlag -> DynFlags -> Bool
+ GHC.Driver.DynFlags: wopt_set :: DynFlags -> WarningFlag -> DynFlags
+ GHC.Driver.DynFlags: wopt_set_all_custom :: DynFlags -> DynFlags
+ GHC.Driver.DynFlags: wopt_set_all_fatal_custom :: DynFlags -> DynFlags
+ GHC.Driver.DynFlags: wopt_set_custom :: DynFlags -> WarningCategory -> DynFlags
+ GHC.Driver.DynFlags: wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags
+ GHC.Driver.DynFlags: wopt_set_fatal_custom :: DynFlags -> WarningCategory -> DynFlags
+ GHC.Driver.DynFlags: wopt_unset :: DynFlags -> WarningFlag -> DynFlags
+ GHC.Driver.DynFlags: wopt_unset_all_custom :: DynFlags -> DynFlags
+ GHC.Driver.DynFlags: wopt_unset_all_fatal_custom :: DynFlags -> DynFlags
+ GHC.Driver.DynFlags: wopt_unset_custom :: DynFlags -> WarningCategory -> DynFlags
+ GHC.Driver.DynFlags: wopt_unset_fatal :: DynFlags -> WarningFlag -> DynFlags
+ GHC.Driver.DynFlags: wopt_unset_fatal_custom :: DynFlags -> WarningCategory -> DynFlags
+ GHC.Driver.DynFlags: xopt :: Extension -> DynFlags -> Bool
+ GHC.Driver.DynFlags: xopt_DuplicateRecordFields :: DynFlags -> DuplicateRecordFields
+ GHC.Driver.DynFlags: xopt_FieldSelectors :: DynFlags -> FieldSelectors
+ GHC.Driver.DynFlags: xopt_set :: DynFlags -> Extension -> DynFlags
+ GHC.Driver.DynFlags: xopt_set_unlessExplSpec :: Extension -> (DynFlags -> Extension -> DynFlags) -> DynFlags -> DynFlags
+ GHC.Driver.DynFlags: xopt_unset :: DynFlags -> Extension -> DynFlags
+ GHC.Driver.Env.Types: instance GHC.Driver.DynFlags.ContainsDynFlags GHC.Driver.Env.Types.HscEnv
+ GHC.Driver.Env.Types: instance GHC.Driver.DynFlags.HasDynFlags GHC.Driver.Env.Types.Hsc
+ GHC.Driver.Errors.Ppr: instance GHC.Types.Error.HasDefaultDiagnosticOpts GHC.Driver.Errors.Types.DriverMessageOpts
+ GHC.Driver.Errors.Ppr: instance GHC.Types.Error.HasDefaultDiagnosticOpts GHC.Driver.Errors.Types.GhcMessageOpts
+ GHC.Driver.Errors.Types: [DriverDeprecatedFlag] :: String -> String -> DriverMessage
+ GHC.Driver.Errors.Types: [DriverInconsistentDynFlags] :: String -> DriverMessage
+ GHC.Driver.Errors.Types: [DriverInterfaceError] :: !IfaceMessage -> DriverMessage
+ GHC.Driver.Errors.Types: [DriverPackageTrustIgnored] :: DriverMessage
+ GHC.Driver.Errors.Types: [DriverSafeHaskellIgnoredExtension] :: !Extension -> DriverMessage
+ GHC.Driver.Errors.Types: [DriverUnrecognisedFlag] :: String -> DriverMessage
+ GHC.Driver.Errors.Types: [ifaceDiagnosticOpts] :: DriverMessageOpts -> DiagnosticOpts IfaceMessage
+ GHC.Driver.Flags: Opt_D_dump_float_in :: DumpFlag
+ GHC.Driver.Flags: Opt_D_dump_float_out :: DumpFlag
+ GHC.Driver.Flags: Opt_D_dump_liberate_case :: DumpFlag
+ GHC.Driver.Flags: Opt_D_dump_spec_constr :: DumpFlag
+ GHC.Driver.Flags: Opt_D_dump_static_argument_transformation :: DumpFlag
+ GHC.Driver.Flags: Opt_DisableJsMinifier :: GeneralFlag
+ GHC.Driver.Flags: Opt_InsertBreakpoints :: GeneralFlag
+ GHC.Driver.Flags: Opt_SpecialiseIncoherents :: GeneralFlag
+ GHC.Driver.Flags: Opt_UnoptimizedCoreForInterpreter :: GeneralFlag
+ GHC.Driver.Flags: Opt_WarnImplicitRhsQuantification :: WarningFlag
+ GHC.Driver.Flags: Opt_WarnIncompleteExportWarnings :: WarningFlag
+ GHC.Driver.Flags: Opt_WarnInconsistentFlags :: WarningFlag
+ GHC.Driver.Flags: Opt_WarnMissingPolyKindSignatures :: WarningFlag
+ GHC.Driver.Flags: Opt_WarnMissingRoleAnnotations :: WarningFlag
+ GHC.Driver.Flags: Opt_WarnTermVariableCapture :: WarningFlag
+ GHC.Driver.Flags: W_all :: WarningGroup
+ GHC.Driver.Flags: W_compat :: WarningGroup
+ GHC.Driver.Flags: W_default :: WarningGroup
+ GHC.Driver.Flags: W_everything :: WarningGroup
+ GHC.Driver.Flags: W_extended_warnings :: WarningGroup
+ GHC.Driver.Flags: W_extra :: WarningGroup
+ GHC.Driver.Flags: W_unused_binds :: WarningGroup
+ GHC.Driver.Flags: data WarningGroup
+ GHC.Driver.Flags: instance GHC.Classes.Eq GHC.Driver.Flags.WarningGroup
+ GHC.Driver.Flags: instance GHC.Enum.Bounded GHC.Driver.Flags.WarningGroup
+ GHC.Driver.Flags: instance GHC.Enum.Enum GHC.Driver.Flags.WarningGroup
+ GHC.Driver.Flags: smallestWarningGroupsForCategory :: [WarningGroup]
+ GHC.Driver.Flags: warningGroupFlags :: WarningGroup -> [WarningFlag]
+ GHC.Driver.Flags: warningGroupIncludesExtendedWarnings :: WarningGroup -> Bool
+ GHC.Driver.Flags: warningGroupName :: WarningGroup -> String
+ GHC.Driver.Make: instance GHC.Classes.Eq GHC.Driver.Make.WorkerLimit
+ GHC.Driver.Make: type AnyGhcDiagnostic = UnknownDiagnostic DiagnosticOpts GhcMessage
+ GHC.Driver.MakeSem: AbstractSem :: IO () -> IO () -> AbstractSem
+ GHC.Driver.MakeSem: SemaphoreName :: String -> SemaphoreName
+ GHC.Driver.MakeSem: [acquireSem] :: AbstractSem -> IO ()
+ GHC.Driver.MakeSem: [getSemaphoreName] :: SemaphoreName -> String
+ GHC.Driver.MakeSem: [releaseSem] :: AbstractSem -> IO ()
+ GHC.Driver.MakeSem: data AbstractSem
+ GHC.Driver.MakeSem: data Semaphore
+ GHC.Driver.MakeSem: instance GHC.Utils.Outputable.Outputable GHC.Driver.MakeSem.JobResources
+ GHC.Driver.MakeSem: newtype SemaphoreName
+ GHC.Driver.MakeSem: runJSemAbstractSem :: SemaphoreName -> (AbstractSem -> IO a) -> IO a
+ GHC.Driver.MakeSem: withAbstractSem :: AbstractSem -> IO b -> IO b
+ GHC.Driver.Monad: instance Control.Monad.IO.Class.MonadIO m => GHC.Driver.DynFlags.HasDynFlags (GHC.Driver.Monad.GhcT m)
+ GHC.Driver.Monad: instance GHC.Driver.DynFlags.HasDynFlags GHC.Driver.Monad.Ghc
+ GHC.Driver.Session: Mold :: [Option] -> LinkerInfo
+ GHC.Driver.Session: Opt_D_dump_float_in :: DumpFlag
+ GHC.Driver.Session: Opt_D_dump_float_out :: DumpFlag
+ GHC.Driver.Session: Opt_D_dump_liberate_case :: DumpFlag
+ GHC.Driver.Session: Opt_D_dump_spec_constr :: DumpFlag
+ GHC.Driver.Session: Opt_D_dump_static_argument_transformation :: DumpFlag
+ GHC.Driver.Session: Opt_DisableJsMinifier :: GeneralFlag
+ GHC.Driver.Session: Opt_InsertBreakpoints :: GeneralFlag
+ GHC.Driver.Session: Opt_SpecialiseIncoherents :: GeneralFlag
+ GHC.Driver.Session: Opt_UnoptimizedCoreForInterpreter :: GeneralFlag
+ GHC.Driver.Session: Opt_WarnImplicitRhsQuantification :: WarningFlag
+ GHC.Driver.Session: Opt_WarnIncompleteExportWarnings :: WarningFlag
+ GHC.Driver.Session: Opt_WarnInconsistentFlags :: WarningFlag
+ GHC.Driver.Session: Opt_WarnMissingPolyKindSignatures :: WarningFlag
+ GHC.Driver.Session: Opt_WarnMissingRoleAnnotations :: WarningFlag
+ GHC.Driver.Session: Opt_WarnTermVariableCapture :: WarningFlag
+ GHC.Driver.Session: ParMakeNumProcessors :: ParMakeCount
+ GHC.Driver.Session: ParMakeSemaphore :: FilePath -> ParMakeCount
+ GHC.Driver.Session: ParMakeThisMany :: Int -> ParMakeCount
+ GHC.Driver.Session: WarningWithCategory :: !WarningCategory -> DiagnosticReason
+ GHC.Driver.Session: WarningWithFlags :: !NonEmpty WarningFlag -> DiagnosticReason
+ GHC.Driver.Session: [customWarningCategories] :: DynFlags -> WarningCategorySet
+ GHC.Driver.Session: [fatalCustomWarningCategories] :: DynFlags -> WarningCategorySet
+ GHC.Driver.Session: [fma] :: DynFlags -> Bool
+ GHC.Driver.Session: [givensFuel] :: DynFlags -> Int
+ GHC.Driver.Session: [qcsFuel] :: DynFlags -> Int
+ GHC.Driver.Session: [wantedsFuel] :: DynFlags -> Int
+ GHC.Driver.Session: data ParMakeCount
+ GHC.Driver.Session: flagSuggestions :: [String] -> String -> [String]
+ GHC.Driver.Session: isFmaEnabled :: DynFlags -> Bool
+ GHC.Driver.Session: pattern WarningWithFlag :: WarningFlag -> DiagnosticReason
+ GHC.Driver.Session: wopt_any_custom :: DynFlags -> Bool
+ GHC.Driver.Session: wopt_set_all_custom :: DynFlags -> DynFlags
+ GHC.Driver.Session: wopt_set_all_fatal_custom :: DynFlags -> DynFlags
+ GHC.Driver.Session: wopt_set_custom :: DynFlags -> WarningCategory -> DynFlags
+ GHC.Driver.Session: wopt_set_fatal_custom :: DynFlags -> WarningCategory -> DynFlags
+ GHC.Driver.Session: wopt_unset_all_custom :: DynFlags -> DynFlags
+ GHC.Driver.Session: wopt_unset_all_fatal_custom :: DynFlags -> DynFlags
+ GHC.Driver.Session: wopt_unset_custom :: DynFlags -> WarningCategory -> DynFlags
+ GHC.Driver.Session: wopt_unset_fatal_custom :: DynFlags -> WarningCategory -> DynFlags
+ GHC.Hs: [am_eof] :: AnnsModule -> Maybe (RealSrcSpan, RealSrcSpan)
+ GHC.Hs.Binds: type family XVarBindGhc (pL :: Pass) (pR :: Pass)
+ GHC.Hs.Expr: data family HsRecUpdParent x
+ GHC.Hs.ImpExp: ieDeprecation :: forall (p :: Pass). IsPass p => IE (GhcPass p) -> Maybe (WarningTxt (GhcPass p))
+ GHC.Hs.Instances: instance (Data.Data.Data a, Data.Data.Data b) => Data.Data.Data (Language.Haskell.Syntax.Type.HsArg GHC.Hs.Extension.GhcPs a b)
+ GHC.Hs.Instances: instance (Data.Data.Data a, Data.Data.Data b) => Data.Data.Data (Language.Haskell.Syntax.Type.HsArg GHC.Hs.Extension.GhcRn a b)
+ GHC.Hs.Instances: instance (Data.Data.Data a, Data.Data.Data b) => Data.Data.Data (Language.Haskell.Syntax.Type.HsArg GHC.Hs.Extension.GhcTc a b)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsRecUpdParent GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsRecUpdParent GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsRecUpdParent GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (Language.Haskell.Syntax.Expr.LHsRecUpdFields GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (Language.Haskell.Syntax.Expr.LHsRecUpdFields GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (Language.Haskell.Syntax.Expr.LHsRecUpdFields GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (Language.Haskell.Syntax.Type.HsBndrVis GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (Language.Haskell.Syntax.Type.HsBndrVis GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (Language.Haskell.Syntax.Type.HsBndrVis GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Lit: [ol_from_fun] :: OverLitRn -> LIdP GhcRn
+ GHC.Hs.Lit: [ol_rebindable] :: OverLitTc -> Bool
+ GHC.Hs.Lit: [ol_type] :: OverLitTc -> Type
+ GHC.Hs.Lit: [ol_witness] :: OverLitTc -> HsExpr GhcTc
+ GHC.Hs.Pat: isBoringHsPat :: forall (p :: Pass). OutputableBndrId p => LPat (GhcPass p) -> Bool
+ GHC.Hs.Type: HsBndrInvisible :: LHsToken "@" pass -> HsBndrVis pass
+ GHC.Hs.Type: HsBndrRequired :: HsBndrVis pass
+ GHC.Hs.Type: NegateOp :: OpName
+ GHC.Hs.Type: NormalOp :: Name -> OpName
+ GHC.Hs.Type: RecFldOp :: FieldOcc GhcRn -> OpName
+ GHC.Hs.Type: UnboundOp :: RdrName -> OpName
+ GHC.Hs.Type: ambiguousFieldOccLRdrName :: forall (p :: Pass). AmbiguousFieldOcc (GhcPass p) -> LocatedN RdrName
+ GHC.Hs.Type: ambiguousFieldOccRdrName :: forall (p :: Pass). AmbiguousFieldOcc (GhcPass p) -> RdrName
+ GHC.Hs.Type: data HsBndrVis pass
+ GHC.Hs.Type: data OpName
+ GHC.Hs.Type: hsScopedKvs :: LHsKind GhcRn -> [Name]
+ GHC.Hs.Type: instance (GHC.Utils.Outputable.Outputable tm, GHC.Utils.Outputable.Outputable ty) => GHC.Utils.Outputable.Outputable (Language.Haskell.Syntax.Type.HsArg (GHC.Hs.Extension.GhcPass p) tm ty)
+ GHC.Hs.Type: instance GHC.Hs.Type.OutputableBndrFlag (Language.Haskell.Syntax.Type.HsBndrVis p') p
+ GHC.Hs.Type: instance GHC.Utils.Outputable.Outputable GHC.Hs.Type.OpName
+ GHC.Hs.Type: isHsBndrInvisible :: HsBndrVis pass -> Bool
+ GHC.Hs.Type: updateHsTyVarBndrFlag :: forall flag flag' (pass :: Pass). (flag -> flag') -> HsTyVarBndr flag (GhcPass pass) -> HsTyVarBndr flag' (GhcPass pass)
+ GHC.Hs.Utils: LConsWithFields :: [(LocatedA (IdP (GhcPass p)), Maybe [Located Int])] -> IntMap (LFieldOcc (GhcPass p)) -> LConsWithFields (p :: Pass)
+ GHC.Hs.Utils: TyDeclBinders :: !(LocatedA (IdP (GhcPass p)), TyConFlavour ()) -> ![(LocatedA (IdP (GhcPass p)), TyConFlavour ())] -> ![LocatedA (IdP (GhcPass p))] -> !LConsWithFields p -> TyDeclBinders (p :: Pass)
+ GHC.Hs.Utils: [consFields] :: LConsWithFields (p :: Pass) -> IntMap (LFieldOcc (GhcPass p))
+ GHC.Hs.Utils: [consWithFieldIndices] :: LConsWithFields (p :: Pass) -> [(LocatedA (IdP (GhcPass p)), Maybe [Located Int])]
+ GHC.Hs.Utils: [tyDeclATs] :: TyDeclBinders (p :: Pass) -> ![(LocatedA (IdP (GhcPass p)), TyConFlavour ())]
+ GHC.Hs.Utils: [tyDeclConsWithFields] :: TyDeclBinders (p :: Pass) -> !LConsWithFields p
+ GHC.Hs.Utils: [tyDeclMainBinder] :: TyDeclBinders (p :: Pass) -> !(LocatedA (IdP (GhcPass p)), TyConFlavour ())
+ GHC.Hs.Utils: [tyDeclOpSigs] :: TyDeclBinders (p :: Pass) -> ![LocatedA (IdP (GhcPass p))]
+ GHC.Hs.Utils: data LConsWithFields (p :: Pass)
+ GHC.Hs.Utils: data TyDeclBinders (p :: Pass)
+ GHC.Hs.Utils: isUnliftedHsBinds :: LHsBinds GhcTc -> Bool
+ GHC.HsToCore.Binds: dsHsWrappers :: [HsWrapper] -> ([CoreExpr -> CoreExpr] -> DsM a) -> DsM a
+ GHC.HsToCore.Monad: addUnspecables :: Set EvId -> DsM a -> DsM a
+ GHC.HsToCore.Monad: getUnspecables :: DsM (Set EvId)
+ GHC.HsToCore.Pmc: isMatchContextPmChecked_SinglePat :: DynFlags -> Origin -> HsMatchContext id -> LPat GhcTc -> Bool
+ GHC.HsToCore.Pmc.Utils: isMatchContextPmChecked_SinglePat :: DynFlags -> Origin -> HsMatchContext id -> LPat GhcTc -> Bool
+ GHC.HsToCore.Quote: instance GHC.HsToCore.Quote.RepTV (Language.Haskell.Syntax.Type.HsBndrVis GHC.Hs.Extension.GhcRn) Language.Haskell.TH.Syntax.BndrVis
+ GHC.HsToCore.Types: [dsl_unspecables] :: DsLclEnv -> Set EvVar
+ GHC.Iface.Decl: coAxiomToIfaceDecl :: forall (br :: BranchFlag). CoAxiom br -> IfaceDecl
+ GHC.Iface.Decl: toIfaceBooleanFormula :: BooleanFormula IfLclName -> IfaceBooleanFormula
+ GHC.Iface.Decl: tyThingToIfaceDecl :: Bool -> TyThing -> IfaceDecl
+ GHC.Iface.Errors.Ppr: IfaceMessageOpts :: !Bool -> !BuildingCabalPackage -> IfaceMessageOpts
+ GHC.Iface.Errors.Ppr: [ifaceBuildingCabalPackage] :: IfaceMessageOpts -> !BuildingCabalPackage
+ GHC.Iface.Errors.Ppr: [ifaceShowTriedFiles] :: IfaceMessageOpts -> !Bool
+ GHC.Iface.Errors.Ppr: cantFindErrorX :: (UnitInfo -> SDoc) -> ([FilePath] -> SDoc) -> FindingModuleOrInterface -> CantFindInstalled -> SDoc
+ GHC.Iface.Errors.Ppr: data IfaceMessageOpts
+ GHC.Iface.Errors.Ppr: instance GHC.Types.Error.Diagnostic GHC.Iface.Errors.Types.IfaceMessage
+ GHC.Iface.Errors.Ppr: instance GHC.Types.Error.HasDefaultDiagnosticOpts GHC.Iface.Errors.Types.IfaceMessageOpts
+ GHC.Iface.Errors.Ppr: interfaceErrorDiagnostic :: IfaceMessageOpts -> IfaceMessage -> SDoc
+ GHC.Iface.Errors.Ppr: interfaceErrorHints :: IfaceMessage -> [GhcHint]
+ GHC.Iface.Errors.Ppr: interfaceErrorReason :: IfaceMessage -> DiagnosticReason
+ GHC.Iface.Errors.Ppr: lookingForHerald :: InterfaceLookingFor -> SDoc
+ GHC.Iface.Errors.Ppr: mayShowLocations :: String -> Bool -> [FilePath] -> SDoc
+ GHC.Iface.Errors.Ppr: missingInterfaceErrorDiagnostic :: IfaceMessageOpts -> MissingInterfaceError -> SDoc
+ GHC.Iface.Errors.Ppr: missingInterfaceErrorHints :: MissingInterfaceError -> [GhcHint]
+ GHC.Iface.Errors.Ppr: missingInterfaceErrorReason :: MissingInterfaceError -> DiagnosticReason
+ GHC.Iface.Errors.Ppr: pkgHiddenHint :: (UnitInfo -> SDoc) -> BuildingCabalPackage -> UnitInfo -> SDoc
+ GHC.Iface.Errors.Ppr: readInterfaceErrorDiagnostic :: ReadInterfaceError -> SDoc
+ GHC.Iface.Errors.Types: BadIfaceFile :: ReadInterfaceError -> MissingInterfaceError
+ GHC.Iface.Errors.Types: BadSourceImport :: !Module -> MissingInterfaceError
+ GHC.Iface.Errors.Types: Can'tFindInterface :: MissingInterfaceError -> InterfaceLookingFor -> IfaceMessage
+ GHC.Iface.Errors.Types: Can'tFindNameInInterface :: Name -> [TyThing] -> IfaceMessage
+ GHC.Iface.Errors.Types: CantFindErr :: !UnitState -> FindingModuleOrInterface -> CantFindInstalled -> MissingInterfaceError
+ GHC.Iface.Errors.Types: CantFindInstalled :: ModuleName -> CantFindInstalledReason -> CantFindInstalled
+ GHC.Iface.Errors.Types: CircularImport :: !Module -> IfaceMessage
+ GHC.Iface.Errors.Types: CouldntFindInFiles :: [FilePath] -> CantFindInstalledReason
+ GHC.Iface.Errors.Types: DynamicHashMismatchError :: !Module -> !ModLocation -> MissingInterfaceError
+ GHC.Iface.Errors.Types: ExceptionOccurred :: FilePath -> SomeException -> ReadInterfaceError
+ GHC.Iface.Errors.Types: FailedToLoadDynamicInterface :: Module -> ReadInterfaceError -> MissingInterfaceError
+ GHC.Iface.Errors.Types: FindingInterface :: FindingModuleOrInterface
+ GHC.Iface.Errors.Types: FindingModule :: FindingModuleOrInterface
+ GHC.Iface.Errors.Types: GenericMissing :: [(Unit, Maybe UnitInfo)] -> [Unit] -> [(Unit, UnusableUnitReason)] -> [FilePath] -> CantFindInstalledReason
+ GHC.Iface.Errors.Types: HiModuleNameMismatchWarn :: FilePath -> Module -> Module -> ReadInterfaceError
+ GHC.Iface.Errors.Types: HomeModError :: !InstalledModule -> !ModLocation -> MissingInterfaceError
+ GHC.Iface.Errors.Types: IfaceMessageOpts :: !Bool -> !BuildingCabalPackage -> IfaceMessageOpts
+ GHC.Iface.Errors.Types: LookingForHiBoot :: !Module -> InterfaceLookingFor
+ GHC.Iface.Errors.Types: LookingForModule :: !ModuleName -> !IsBootInterface -> InterfaceLookingFor
+ GHC.Iface.Errors.Types: LookingForName :: !Name -> InterfaceLookingFor
+ GHC.Iface.Errors.Types: LookingForSig :: !InstalledModule -> InterfaceLookingFor
+ GHC.Iface.Errors.Types: MissingPackageFiles :: UnitId -> [FilePath] -> CantFindInstalledReason
+ GHC.Iface.Errors.Types: MissingPackageWayFiles :: String -> UnitId -> [FilePath] -> CantFindInstalledReason
+ GHC.Iface.Errors.Types: ModuleSuggestion :: [ModuleSuggestion] -> [FilePath] -> CantFindInstalledReason
+ GHC.Iface.Errors.Types: MultiplePackages :: [(Module, ModuleOrigin)] -> CantFindInstalledReason
+ GHC.Iface.Errors.Types: NoBuildingCabalPackage :: BuildingCabalPackage
+ GHC.Iface.Errors.Types: NoUnitIdMatching :: UnitId -> [UnitInfo] -> CantFindInstalledReason
+ GHC.Iface.Errors.Types: NotAModule :: CantFindInstalledReason
+ GHC.Iface.Errors.Types: YesBuildingCabalPackage :: BuildingCabalPackage
+ GHC.Iface.Errors.Types: [ifaceBuildingCabalPackage] :: IfaceMessageOpts -> !BuildingCabalPackage
+ GHC.Iface.Errors.Types: [ifaceShowTriedFiles] :: IfaceMessageOpts -> !Bool
+ GHC.Iface.Errors.Types: data BuildingCabalPackage
+ GHC.Iface.Errors.Types: data CantFindInstalled
+ GHC.Iface.Errors.Types: data CantFindInstalledReason
+ GHC.Iface.Errors.Types: data FindingModuleOrInterface
+ GHC.Iface.Errors.Types: data IfaceMessage
+ GHC.Iface.Errors.Types: data IfaceMessageOpts
+ GHC.Iface.Errors.Types: data InterfaceLookingFor
+ GHC.Iface.Errors.Types: data MissingInterfaceError
+ GHC.Iface.Errors.Types: data ReadInterfaceError
+ GHC.Iface.Errors.Types: instance GHC.Classes.Eq GHC.Iface.Errors.Types.BuildingCabalPackage
+ GHC.Iface.Errors.Types: instance GHC.Generics.Generic GHC.Iface.Errors.Types.CantFindInstalled
+ GHC.Iface.Errors.Types: instance GHC.Generics.Generic GHC.Iface.Errors.Types.CantFindInstalledReason
+ GHC.Iface.Errors.Types: instance GHC.Generics.Generic GHC.Iface.Errors.Types.IfaceMessage
+ GHC.Iface.Errors.Types: instance GHC.Generics.Generic GHC.Iface.Errors.Types.MissingInterfaceError
+ GHC.Iface.Errors.Types: instance GHC.Generics.Generic GHC.Iface.Errors.Types.ReadInterfaceError
+ GHC.Iface.Ext.Ast: instance (GHC.Iface.Ext.Ast.HasLoc tm, GHC.Iface.Ext.Ast.HasLoc ty) => GHC.Iface.Ext.Ast.HasLoc (Language.Haskell.Syntax.Type.HsArg p tm ty)
+ GHC.Iface.Ext.Ast: instance (GHC.Iface.Ext.Ast.ToHie tm, GHC.Iface.Ext.Ast.ToHie ty) => GHC.Iface.Ext.Ast.ToHie (Language.Haskell.Syntax.Type.HsArg p tm ty)
+ GHC.Iface.Ext.Ast: instance GHC.Iface.Ext.Ast.ToHie (GHC.Iface.Ext.Ast.IEContext (GHC.Types.SrcLoc.Located GHC.Types.GREInfo.RecFieldInfo))
+ GHC.Iface.Load: ImportByPlugin :: WhereFrom
+ GHC.Iface.Load: ImportBySystem :: WhereFrom
+ GHC.Iface.Load: ImportByUser :: IsBootInterface -> WhereFrom
+ GHC.Iface.Load: data WhereFrom
+ GHC.Iface.Load: instance GHC.Utils.Outputable.Outputable GHC.Iface.Load.WhereFrom
+ GHC.Iface.Recomp: THWithJS :: RecompReason
+ GHC.Iface.Syntax: IfAnd :: [IfaceBooleanFormula] -> IfaceBooleanFormula
+ GHC.Iface.Syntax: IfDeprecatedTxt :: SourceText -> [(IfaceStringLiteral, [IfExtName])] -> IfaceWarningTxt
+ GHC.Iface.Syntax: IfOr :: [IfaceBooleanFormula] -> IfaceBooleanFormula
+ GHC.Iface.Syntax: IfParens :: IfaceBooleanFormula -> IfaceBooleanFormula
+ GHC.Iface.Syntax: IfStringLiteral :: SourceText -> FastString -> IfaceStringLiteral
+ GHC.Iface.Syntax: IfVar :: IfLclName -> IfaceBooleanFormula
+ GHC.Iface.Syntax: IfWarnAll :: IfaceWarningTxt -> IfaceWarnings
+ GHC.Iface.Syntax: IfWarnSome :: [(OccName, IfaceWarningTxt)] -> [(IfExtName, IfaceWarningTxt)] -> IfaceWarnings
+ GHC.Iface.Syntax: IfWarningTxt :: Maybe WarningCategory -> SourceText -> [(IfaceStringLiteral, [IfExtName])] -> IfaceWarningTxt
+ GHC.Iface.Syntax: [ifRecSelFirstCon] :: IfaceIdDetails -> IfaceTopBndr
+ GHC.Iface.Syntax: [ifRecSelIdFieldLabel] :: IfaceIdDetails -> FieldLabel
+ GHC.Iface.Syntax: [ifRecSelIdIsNaughty] :: IfaceIdDetails -> Bool
+ GHC.Iface.Syntax: [ifRecSelIdParent] :: IfaceIdDetails -> Either IfaceTyCon IfaceDecl
+ GHC.Iface.Syntax: data IfaceBooleanFormula
+ GHC.Iface.Syntax: data IfaceStringLiteral
+ GHC.Iface.Syntax: data IfaceWarningTxt
+ GHC.Iface.Syntax: data IfaceWarnings
+ GHC.Iface.Syntax: freeNamesIfConDecls :: IfaceConDecls -> NameSet
+ GHC.Iface.Syntax: fromIfaceBooleanFormula :: IfaceBooleanFormula -> BooleanFormula IfLclName
+ GHC.Iface.Syntax: fromIfaceWarnings :: IfaceWarnings -> Warnings GhcRn
+ GHC.Iface.Syntax: instance Control.DeepSeq.NFData GHC.Iface.Syntax.IfaceBooleanFormula
+ GHC.Iface.Syntax: instance Control.DeepSeq.NFData GHC.Iface.Syntax.IfaceStringLiteral
+ GHC.Iface.Syntax: instance Control.DeepSeq.NFData GHC.Iface.Syntax.IfaceWarningTxt
+ GHC.Iface.Syntax: instance Control.DeepSeq.NFData GHC.Iface.Syntax.IfaceWarnings
+ GHC.Iface.Syntax: instance GHC.Utils.Binary.Binary GHC.Iface.Syntax.IfaceBooleanFormula
+ GHC.Iface.Syntax: instance GHC.Utils.Binary.Binary GHC.Iface.Syntax.IfaceStringLiteral
+ GHC.Iface.Syntax: instance GHC.Utils.Binary.Binary GHC.Iface.Syntax.IfaceWarningTxt
+ GHC.Iface.Syntax: instance GHC.Utils.Binary.Binary GHC.Iface.Syntax.IfaceWarnings
+ GHC.Iface.Syntax: instance GHC.Utils.Outputable.Outputable GHC.Iface.Syntax.IfaceStringLiteral
+ GHC.Iface.Syntax: instance GHC.Utils.Outputable.Outputable GHC.Iface.Syntax.IfaceWarningTxt
+ GHC.Iface.Syntax: instance GHC.Utils.Outputable.Outputable GHC.Iface.Syntax.IfaceWarnings
+ GHC.Iface.Type: AltPpr :: Maybe (OccName -> SDoc) -> AltPpr
+ GHC.Iface.Type: ShowHeader :: AltPpr -> ShowHowMuch
+ GHC.Iface.Type: ShowIface :: ShowHowMuch
+ GHC.Iface.Type: ShowSome :: [OccName] -> AltPpr -> ShowHowMuch
+ GHC.Iface.Type: ShowSub :: ShowHowMuch -> ShowForAllFlag -> ShowSub
+ GHC.Iface.Type: [ss_forall] :: ShowSub -> ShowForAllFlag
+ GHC.Iface.Type: [ss_how_much] :: ShowSub -> ShowHowMuch
+ GHC.Iface.Type: data ShowHowMuch
+ GHC.Iface.Type: data ShowSub
+ GHC.Iface.Type: instance GHC.Utils.Outputable.Outputable GHC.Iface.Type.ShowHowMuch
+ GHC.Iface.Type: newtype AltPpr
+ GHC.JS.Make: instance (GHC.JS.Make.ToSat a, b GHC.Types.~ GHC.JS.Unsat.Syntax.JExpr) => GHC.JS.Make.ToSat (b -> a)
+ GHC.JS.Make: instance GHC.JS.Make.ToJExpr GHC.JS.Unsat.Syntax.Ident
+ GHC.JS.Make: instance GHC.JS.Make.ToJExpr GHC.JS.Unsat.Syntax.JExpr
+ GHC.JS.Make: instance GHC.JS.Make.ToJExpr GHC.JS.Unsat.Syntax.JVal
+ GHC.JS.Make: instance GHC.JS.Make.ToSat GHC.JS.Unsat.Syntax.JExpr
+ GHC.JS.Make: instance GHC.JS.Make.ToSat GHC.JS.Unsat.Syntax.JStat
+ GHC.JS.Make: instance GHC.JS.Make.ToSat [GHC.JS.Unsat.Syntax.JExpr]
+ GHC.JS.Make: instance GHC.JS.Make.ToSat [GHC.JS.Unsat.Syntax.JStat]
+ GHC.JS.Make: instance GHC.JS.Make.ToStat GHC.JS.Unsat.Syntax.JExpr
+ GHC.JS.Make: instance GHC.JS.Make.ToStat GHC.JS.Unsat.Syntax.JStat
+ GHC.JS.Make: instance GHC.JS.Make.ToStat [GHC.JS.Unsat.Syntax.JExpr]
+ GHC.JS.Make: instance GHC.JS.Make.ToStat [GHC.JS.Unsat.Syntax.JStat]
+ GHC.JS.Make: instance GHC.Num.Num GHC.JS.Unsat.Syntax.JExpr
+ GHC.JS.Make: instance GHC.Real.Fractional GHC.JS.Unsat.Syntax.JExpr
+ GHC.JS.Make: jForNoDecl :: Ident -> JExpr -> JExpr -> JStat -> JStat -> JStat
+ GHC.JS.Make: jFun :: ToSat a => Ident -> a -> JStat
+ GHC.JS.Make: jFunction :: Ident -> [Ident] -> JStat -> JStat
+ GHC.JS.Optimizer: instance GHC.Base.Monoid GHC.JS.Optimizer.BlockOpt
+ GHC.JS.Optimizer: instance GHC.Base.Semigroup GHC.JS.Optimizer.BlockOpt
+ GHC.JS.Optimizer: jsOptimize :: JStat -> JStat
+ GHC.JS.Ppr: ($$$) :: JsRender doc => doc -> doc -> doc
+ GHC.JS.Ppr: (<+?>) :: JsRender doc => doc -> doc -> doc
+ GHC.JS.Ppr: addSemi :: JsRender doc => doc -> doc
+ GHC.JS.Ppr: class IsLine doc => JsRender doc
+ GHC.JS.Ppr: instance GHC.JS.Ppr.JsRender GHC.Utils.Outputable.HLine
+ GHC.JS.Ppr: instance GHC.JS.Ppr.JsRender GHC.Utils.Outputable.SDoc
+ GHC.JS.Ppr: instance GHC.JS.Ppr.JsToDoc GHC.JS.Unsat.Syntax.Ident
+ GHC.JS.Ppr: interSemi :: JsRender doc => [doc] -> doc
+ GHC.JS.Ppr: jcat :: JsRender doc => [doc] -> doc
+ GHC.JS.Ppr: jnest :: JsRender doc => doc -> doc
+ GHC.JS.Syntax: AddAssignOp :: AOp
+ GHC.JS.Syntax: AssignOp :: AOp
+ GHC.JS.Syntax: ForStat :: JStat -> JExpr -> JStat -> JStat -> JStat
+ GHC.JS.Syntax: FuncStat :: !Ident -> [Ident] -> JStat -> JStat
+ GHC.JS.Syntax: SubAssignOp :: AOp
+ GHC.JS.Syntax: data AOp
+ GHC.JS.Syntax: data Op
+ GHC.JS.Syntax: data UOp
+ GHC.JS.Syntax: instance Control.DeepSeq.NFData GHC.JS.Syntax.AOp
+ GHC.JS.Syntax: instance Control.DeepSeq.NFData GHC.JS.Syntax.Op
+ GHC.JS.Syntax: instance Control.DeepSeq.NFData GHC.JS.Syntax.UOp
+ GHC.JS.Syntax: instance Data.Data.Data GHC.JS.Syntax.AOp
+ GHC.JS.Syntax: instance Data.Data.Data GHC.JS.Syntax.Op
+ GHC.JS.Syntax: instance Data.Data.Data GHC.JS.Syntax.UOp
+ GHC.JS.Syntax: instance GHC.Classes.Eq GHC.JS.Syntax.AOp
+ GHC.JS.Syntax: instance GHC.Classes.Eq GHC.JS.Syntax.Op
+ GHC.JS.Syntax: instance GHC.Classes.Eq GHC.JS.Syntax.UOp
+ GHC.JS.Syntax: instance GHC.Classes.Ord GHC.JS.Syntax.AOp
+ GHC.JS.Syntax: instance GHC.Classes.Ord GHC.JS.Syntax.Op
+ GHC.JS.Syntax: instance GHC.Classes.Ord GHC.JS.Syntax.UOp
+ GHC.JS.Syntax: instance GHC.Enum.Enum GHC.JS.Syntax.AOp
+ GHC.JS.Syntax: instance GHC.Enum.Enum GHC.JS.Syntax.Op
+ GHC.JS.Syntax: instance GHC.Enum.Enum GHC.JS.Syntax.UOp
+ GHC.JS.Syntax: instance GHC.Generics.Generic GHC.JS.Syntax.AOp
+ GHC.JS.Syntax: instance GHC.Generics.Generic GHC.JS.Syntax.Op
+ GHC.JS.Syntax: instance GHC.Generics.Generic GHC.JS.Syntax.UOp
+ GHC.JS.Syntax: instance GHC.Show.Show GHC.JS.Syntax.AOp
+ GHC.JS.Syntax: instance GHC.Show.Show GHC.JS.Syntax.Op
+ GHC.JS.Syntax: instance GHC.Show.Show GHC.JS.Syntax.UOp
+ GHC.JS.Syntax: jassignAll :: [JExpr] -> [JExpr] -> JStat
+ GHC.JS.Syntax: jassignAllEqual :: [JExpr] -> [JExpr] -> JStat
+ GHC.JS.Syntax: jvar :: FastString -> JExpr
+ GHC.JS.Syntax: pattern JAdd :: JExpr -> JExpr -> JExpr
+ GHC.JS.Syntax: pattern JBAnd :: JExpr -> JExpr -> JExpr
+ GHC.JS.Syntax: pattern JBNot :: JExpr -> JExpr
+ GHC.JS.Syntax: pattern JBOr :: JExpr -> JExpr -> JExpr
+ GHC.JS.Syntax: pattern JBXor :: JExpr -> JExpr -> JExpr
+ GHC.JS.Syntax: pattern JDiv :: JExpr -> JExpr -> JExpr
+ GHC.JS.Syntax: pattern JLAnd :: JExpr -> JExpr -> JExpr
+ GHC.JS.Syntax: pattern JLOr :: JExpr -> JExpr -> JExpr
+ GHC.JS.Syntax: pattern JMod :: JExpr -> JExpr -> JExpr
+ GHC.JS.Syntax: pattern JMul :: JExpr -> JExpr -> JExpr
+ GHC.JS.Syntax: pattern JNegate :: JExpr -> JExpr
+ GHC.JS.Syntax: pattern JNew :: JExpr -> JExpr
+ GHC.JS.Syntax: pattern JNot :: JExpr -> JExpr
+ GHC.JS.Syntax: pattern JPostDec :: JExpr -> JExpr
+ GHC.JS.Syntax: pattern JPostInc :: JExpr -> JExpr
+ GHC.JS.Syntax: pattern JPreDec :: JExpr -> JExpr
+ GHC.JS.Syntax: pattern JPreInc :: JExpr -> JExpr
+ GHC.JS.Syntax: pattern JString :: FastString -> JExpr
+ GHC.JS.Syntax: pattern JSub :: JExpr -> JExpr -> JExpr
+ GHC.JS.Syntax: pattern SatInt :: Integer -> JExpr
+ GHC.JS.Syntax: type JLabel = LexicalFastString
+ GHC.JS.Transform: instance GHC.JS.Transform.JMacro GHC.JS.Unsat.Syntax.Ident
+ GHC.JS.Transform: instance GHC.JS.Transform.JMacro GHC.JS.Unsat.Syntax.JExpr
+ GHC.JS.Transform: instance GHC.JS.Transform.JMacro GHC.JS.Unsat.Syntax.JStat
+ GHC.JS.Transform: instance GHC.JS.Transform.JMacro GHC.JS.Unsat.Syntax.JVal
+ GHC.JS.Transform: satJExpr :: Maybe FastString -> JExpr -> JExpr
+ GHC.JS.Transform: satJStat :: Maybe FastString -> JStat -> JStat
+ GHC.JS.Unsat.Syntax: AddOp :: JOp
+ GHC.JS.Unsat.Syntax: ApplExpr :: JExpr -> [JExpr] -> JExpr
+ GHC.JS.Unsat.Syntax: ApplStat :: JExpr -> [JExpr] -> JStat
+ GHC.JS.Unsat.Syntax: AssignStat :: JExpr -> JExpr -> JStat
+ GHC.JS.Unsat.Syntax: BAndOp :: JOp
+ GHC.JS.Unsat.Syntax: BNotOp :: JUOp
+ GHC.JS.Unsat.Syntax: BOrOp :: JOp
+ GHC.JS.Unsat.Syntax: BXorOp :: JOp
+ GHC.JS.Unsat.Syntax: BlockStat :: [JStat] -> JStat
+ GHC.JS.Unsat.Syntax: BreakStat :: Maybe JsLabel -> JStat
+ GHC.JS.Unsat.Syntax: ContinueStat :: Maybe JsLabel -> JStat
+ GHC.JS.Unsat.Syntax: DeclStat :: !Ident -> !Maybe JExpr -> JStat
+ GHC.JS.Unsat.Syntax: DeleteOp :: JUOp
+ GHC.JS.Unsat.Syntax: DivOp :: JOp
+ GHC.JS.Unsat.Syntax: EqOp :: JOp
+ GHC.JS.Unsat.Syntax: ForInStat :: Bool -> Ident -> JExpr -> JStat -> JStat
+ GHC.JS.Unsat.Syntax: ForStat :: JStat -> JExpr -> JStat -> JStat -> JStat
+ GHC.JS.Unsat.Syntax: FuncStat :: !Ident -> [Ident] -> JStat -> JStat
+ GHC.JS.Unsat.Syntax: GeOp :: JOp
+ GHC.JS.Unsat.Syntax: GtOp :: JOp
+ GHC.JS.Unsat.Syntax: IS :: State [Ident] a -> IdentSupply a
+ GHC.JS.Unsat.Syntax: IdxExpr :: JExpr -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: IfExpr :: JExpr -> JExpr -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: IfStat :: JExpr -> JStat -> JStat -> JStat
+ GHC.JS.Unsat.Syntax: InOp :: JOp
+ GHC.JS.Unsat.Syntax: InfixExpr :: JOp -> JExpr -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: InstanceofOp :: JOp
+ GHC.JS.Unsat.Syntax: JDouble :: SaneDouble -> JVal
+ GHC.JS.Unsat.Syntax: JFunc :: [Ident] -> JStat -> JVal
+ GHC.JS.Unsat.Syntax: JHash :: UniqMap FastString JExpr -> JVal
+ GHC.JS.Unsat.Syntax: JInt :: Integer -> JVal
+ GHC.JS.Unsat.Syntax: JList :: [JExpr] -> JVal
+ GHC.JS.Unsat.Syntax: JRegEx :: FastString -> JVal
+ GHC.JS.Unsat.Syntax: JStr :: FastString -> JVal
+ GHC.JS.Unsat.Syntax: JVar :: Ident -> JVal
+ GHC.JS.Unsat.Syntax: LAndOp :: JOp
+ GHC.JS.Unsat.Syntax: LOrOp :: JOp
+ GHC.JS.Unsat.Syntax: LabelStat :: JsLabel -> JStat -> JStat
+ GHC.JS.Unsat.Syntax: LeOp :: JOp
+ GHC.JS.Unsat.Syntax: LeftShiftOp :: JOp
+ GHC.JS.Unsat.Syntax: LtOp :: JOp
+ GHC.JS.Unsat.Syntax: ModOp :: JOp
+ GHC.JS.Unsat.Syntax: MulOp :: JOp
+ GHC.JS.Unsat.Syntax: NegOp :: JUOp
+ GHC.JS.Unsat.Syntax: NeqOp :: JOp
+ GHC.JS.Unsat.Syntax: NewOp :: JUOp
+ GHC.JS.Unsat.Syntax: NotOp :: JUOp
+ GHC.JS.Unsat.Syntax: PlusOp :: JUOp
+ GHC.JS.Unsat.Syntax: PostDecOp :: JUOp
+ GHC.JS.Unsat.Syntax: PostIncOp :: JUOp
+ GHC.JS.Unsat.Syntax: PreDecOp :: JUOp
+ GHC.JS.Unsat.Syntax: PreIncOp :: JUOp
+ GHC.JS.Unsat.Syntax: ReturnStat :: JExpr -> JStat
+ GHC.JS.Unsat.Syntax: RightShiftOp :: JOp
+ GHC.JS.Unsat.Syntax: SaneDouble :: Double -> SaneDouble
+ GHC.JS.Unsat.Syntax: SelExpr :: JExpr -> Ident -> JExpr
+ GHC.JS.Unsat.Syntax: StrictEqOp :: JOp
+ GHC.JS.Unsat.Syntax: StrictNeqOp :: JOp
+ GHC.JS.Unsat.Syntax: SubOp :: JOp
+ GHC.JS.Unsat.Syntax: SwitchStat :: JExpr -> [(JExpr, JStat)] -> JStat -> JStat
+ GHC.JS.Unsat.Syntax: TryStat :: JStat -> Ident -> JStat -> JStat -> JStat
+ GHC.JS.Unsat.Syntax: TxtI :: FastString -> Ident
+ GHC.JS.Unsat.Syntax: TypeofOp :: JUOp
+ GHC.JS.Unsat.Syntax: UOpExpr :: JUOp -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: UOpStat :: JUOp -> JExpr -> JStat
+ GHC.JS.Unsat.Syntax: UnsatBlock :: IdentSupply JStat -> JStat
+ GHC.JS.Unsat.Syntax: UnsatExpr :: IdentSupply JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: UnsatVal :: IdentSupply JVal -> JVal
+ GHC.JS.Unsat.Syntax: ValExpr :: JVal -> JExpr
+ GHC.JS.Unsat.Syntax: VoidOp :: JUOp
+ GHC.JS.Unsat.Syntax: WhileStat :: Bool -> JExpr -> JStat -> JStat
+ GHC.JS.Unsat.Syntax: YieldOp :: JUOp
+ GHC.JS.Unsat.Syntax: ZRightShiftOp :: JOp
+ GHC.JS.Unsat.Syntax: [itxt] :: Ident -> FastString
+ GHC.JS.Unsat.Syntax: [runIdentSupply] :: IdentSupply a -> State [Ident] a
+ GHC.JS.Unsat.Syntax: [unSaneDouble] :: SaneDouble -> Double
+ GHC.JS.Unsat.Syntax: data JExpr
+ GHC.JS.Unsat.Syntax: data JOp
+ GHC.JS.Unsat.Syntax: data JStat
+ GHC.JS.Unsat.Syntax: data JUOp
+ GHC.JS.Unsat.Syntax: data JVal
+ GHC.JS.Unsat.Syntax: identFS :: Ident -> FastString
+ GHC.JS.Unsat.Syntax: instance Control.DeepSeq.NFData (GHC.JS.Unsat.Syntax.IdentSupply a)
+ GHC.JS.Unsat.Syntax: instance Control.DeepSeq.NFData GHC.JS.Unsat.Syntax.JOp
+ GHC.JS.Unsat.Syntax: instance Control.DeepSeq.NFData GHC.JS.Unsat.Syntax.JUOp
+ GHC.JS.Unsat.Syntax: instance Data.Data.Data GHC.JS.Unsat.Syntax.JOp
+ GHC.JS.Unsat.Syntax: instance Data.Data.Data GHC.JS.Unsat.Syntax.JUOp
+ GHC.JS.Unsat.Syntax: instance GHC.Base.Functor GHC.JS.Unsat.Syntax.IdentSupply
+ GHC.JS.Unsat.Syntax: instance GHC.Base.Monoid GHC.JS.Unsat.Syntax.JStat
+ GHC.JS.Unsat.Syntax: instance GHC.Base.Semigroup GHC.JS.Unsat.Syntax.JStat
+ GHC.JS.Unsat.Syntax: instance GHC.Classes.Eq GHC.JS.Unsat.Syntax.Ident
+ GHC.JS.Unsat.Syntax: instance GHC.Classes.Eq GHC.JS.Unsat.Syntax.JExpr
+ GHC.JS.Unsat.Syntax: instance GHC.Classes.Eq GHC.JS.Unsat.Syntax.JOp
+ GHC.JS.Unsat.Syntax: instance GHC.Classes.Eq GHC.JS.Unsat.Syntax.JStat
+ GHC.JS.Unsat.Syntax: instance GHC.Classes.Eq GHC.JS.Unsat.Syntax.JUOp
+ GHC.JS.Unsat.Syntax: instance GHC.Classes.Eq GHC.JS.Unsat.Syntax.JVal
+ GHC.JS.Unsat.Syntax: instance GHC.Classes.Eq a => GHC.Classes.Eq (GHC.JS.Unsat.Syntax.IdentSupply a)
+ GHC.JS.Unsat.Syntax: instance GHC.Classes.Ord GHC.JS.Unsat.Syntax.JOp
+ GHC.JS.Unsat.Syntax: instance GHC.Classes.Ord GHC.JS.Unsat.Syntax.JUOp
+ GHC.JS.Unsat.Syntax: instance GHC.Classes.Ord a => GHC.Classes.Ord (GHC.JS.Unsat.Syntax.IdentSupply a)
+ GHC.JS.Unsat.Syntax: instance GHC.Enum.Enum GHC.JS.Unsat.Syntax.JOp
+ GHC.JS.Unsat.Syntax: instance GHC.Enum.Enum GHC.JS.Unsat.Syntax.JUOp
+ GHC.JS.Unsat.Syntax: instance GHC.Generics.Generic GHC.JS.Unsat.Syntax.JExpr
+ GHC.JS.Unsat.Syntax: instance GHC.Generics.Generic GHC.JS.Unsat.Syntax.JOp
+ GHC.JS.Unsat.Syntax: instance GHC.Generics.Generic GHC.JS.Unsat.Syntax.JStat
+ GHC.JS.Unsat.Syntax: instance GHC.Generics.Generic GHC.JS.Unsat.Syntax.JUOp
+ GHC.JS.Unsat.Syntax: instance GHC.Generics.Generic GHC.JS.Unsat.Syntax.JVal
+ GHC.JS.Unsat.Syntax: instance GHC.Show.Show GHC.JS.Unsat.Syntax.Ident
+ GHC.JS.Unsat.Syntax: instance GHC.Show.Show GHC.JS.Unsat.Syntax.JOp
+ GHC.JS.Unsat.Syntax: instance GHC.Show.Show GHC.JS.Unsat.Syntax.JUOp
+ GHC.JS.Unsat.Syntax: instance GHC.Show.Show a => GHC.Show.Show (GHC.JS.Unsat.Syntax.IdentSupply a)
+ GHC.JS.Unsat.Syntax: instance GHC.Types.Unique.Uniquable GHC.JS.Unsat.Syntax.Ident
+ GHC.JS.Unsat.Syntax: newIdentSupply :: Maybe FastString -> [Ident]
+ GHC.JS.Unsat.Syntax: newtype Ident
+ GHC.JS.Unsat.Syntax: newtype IdentSupply a
+ GHC.JS.Unsat.Syntax: newtype SaneDouble
+ GHC.JS.Unsat.Syntax: pattern Add :: JExpr -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern BAnd :: JExpr -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern BNot :: JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern BOr :: JExpr -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern BXor :: JExpr -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern Div :: JExpr -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern Int :: Integer -> JExpr
+ GHC.JS.Unsat.Syntax: pattern LAnd :: JExpr -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern LOr :: JExpr -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern Mod :: JExpr -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern Mul :: JExpr -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern Negate :: JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern New :: JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern Not :: JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern PostDec :: JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern PostInc :: JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern PreDec :: JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern PreInc :: JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pattern String :: FastString -> JExpr
+ GHC.JS.Unsat.Syntax: pattern Sub :: JExpr -> JExpr -> JExpr
+ GHC.JS.Unsat.Syntax: pseudoSaturate :: IdentSupply a -> a
+ GHC.JS.Unsat.Syntax: type JsLabel = LexicalFastString
+ GHC.Linker.Deps: LinkDeps :: [Linkable] -> [Linkable] -> [UnitId] -> UniqDSet UnitId -> LinkDeps
+ GHC.Linker.Deps: LinkDepsOpts :: !String -> !Bool -> !ModuleGraph -> !UnitEnv -> !SDocContext -> !FinderCache -> !FinderOpts -> !Bool -> !DiagnosticOpts IfaceMessage -> !Ways -> (SDoc -> Module -> IO (MaybeErr MissingInterfaceError ModIface)) -> LinkDepsOpts
+ GHC.Linker.Deps: [ldAllLinkables] :: LinkDeps -> [Linkable]
+ GHC.Linker.Deps: [ldFinderCache] :: LinkDepsOpts -> !FinderCache
+ GHC.Linker.Deps: [ldFinderOpts] :: LinkDepsOpts -> !FinderOpts
+ GHC.Linker.Deps: [ldLoadIface] :: LinkDepsOpts -> SDoc -> Module -> IO (MaybeErr MissingInterfaceError ModIface)
+ GHC.Linker.Deps: [ldModuleGraph] :: LinkDepsOpts -> !ModuleGraph
+ GHC.Linker.Deps: [ldMsgOpts] :: LinkDepsOpts -> !DiagnosticOpts IfaceMessage
+ GHC.Linker.Deps: [ldNeededLinkables] :: LinkDeps -> [Linkable]
+ GHC.Linker.Deps: [ldNeededUnits] :: LinkDeps -> UniqDSet UnitId
+ GHC.Linker.Deps: [ldObjSuffix] :: LinkDepsOpts -> !String
+ GHC.Linker.Deps: [ldOneShotMode] :: LinkDepsOpts -> !Bool
+ GHC.Linker.Deps: [ldPprOpts] :: LinkDepsOpts -> !SDocContext
+ GHC.Linker.Deps: [ldUnitEnv] :: LinkDepsOpts -> !UnitEnv
+ GHC.Linker.Deps: [ldUnits] :: LinkDeps -> [UnitId]
+ GHC.Linker.Deps: [ldUseByteCode] :: LinkDepsOpts -> !Bool
+ GHC.Linker.Deps: [ldWays] :: LinkDepsOpts -> !Ways
+ GHC.Linker.Deps: data LinkDeps
+ GHC.Linker.Deps: data LinkDepsOpts
+ GHC.Linker.Deps: getLinkDeps :: LinkDepsOpts -> Interp -> LoaderState -> SrcSpan -> [Module] -> IO LinkDeps
+ GHC.Linker.Loader: initLinkDepsOpts :: HscEnv -> LinkDepsOpts
+ GHC.Linker.Loader: modifyLoaderState :: Interp -> (LoaderState -> IO (LoaderState, a)) -> IO a
+ GHC.Linker.Loader: partitionLinkable :: Linkable -> [Linkable]
+ GHC.Linker.Loader: rmDupLinkables :: LinkableSet -> [Linkable] -> (LinkableSet, [Linkable])
+ GHC.Llvm: FMAOp :: FMASign -> LlvmVar -> LlvmVar -> LlvmVar -> LlvmExpression
+ GHC.Llvm.MetaData: ppMetaId :: IsLine doc => MetaId -> doc
+ GHC.Llvm.Syntax: FMAOp :: FMASign -> LlvmVar -> LlvmVar -> LlvmVar -> LlvmExpression
+ GHC.Llvm.Types: ppLlvmCallConvention :: IsLine doc => LlvmCallConvention -> doc
+ GHC.Llvm.Types: ppLlvmCastOp :: IsLine doc => LlvmCastOp -> doc
+ GHC.Llvm.Types: ppLlvmCmpOp :: IsLine doc => LlvmCmpOp -> doc
+ GHC.Llvm.Types: ppLlvmFuncAttr :: IsLine doc => LlvmFuncAttr -> doc
+ GHC.Llvm.Types: ppLlvmLinkageType :: IsLine doc => LlvmLinkageType -> doc
+ GHC.Llvm.Types: ppLlvmMachOp :: IsLine doc => LlvmMachOp -> doc
+ GHC.Llvm.Types: ppLlvmParamAttr :: IsLine doc => LlvmParamAttr -> doc
+ GHC.Llvm.Types: ppLlvmType :: IsLine doc => LlvmType -> doc
+ GHC.Parser.Annotation: [nann_mclose] :: NameAnn -> Maybe EpaLocation
+ GHC.Parser.Annotation: [nann_mopen] :: NameAnn -> Maybe EpaLocation
+ GHC.Parser.Annotation: [nann_unicode] :: NameAnn -> Bool
+ GHC.Parser.Annotation: getTokenSrcSpan :: TokenLocation -> SrcSpan
+ GHC.Parser.Lexer: ExtendedLiteralsBit :: ExtBits
+ GHC.Parser.Lexer: ITprimint16 :: SourceText -> Integer -> Token
+ GHC.Parser.Lexer: ITprimint32 :: SourceText -> Integer -> Token
+ GHC.Parser.Lexer: ITprimint64 :: SourceText -> Integer -> Token
+ GHC.Parser.Lexer: ITprimint8 :: SourceText -> Integer -> Token
+ GHC.Parser.Lexer: ITprimword16 :: SourceText -> Integer -> Token
+ GHC.Parser.Lexer: ITprimword32 :: SourceText -> Integer -> Token
+ GHC.Parser.Lexer: ITprimword64 :: SourceText -> Integer -> Token
+ GHC.Parser.Lexer: ITprimword8 :: SourceText -> Integer -> Token
+ GHC.Platform: platformHasRTSLinker :: Platform -> Bool
+ GHC.Plugins: [ch_hetero_kind] :: CoercionHole -> Bool
+ GHC.Plugins: coreFullView :: Type -> Type
+ GHC.Plugins: definitelyLiftedType :: Type -> Bool
+ GHC.Plugins: definitelyUnliftedType :: Type -> Bool
+ GHC.Plugins: demoteOccTvName :: OccName -> Maybe OccName
+ GHC.Plugins: fieldName :: FastString -> NameSpace
+ GHC.Plugins: fieldOcc_maybe :: OccName -> Maybe FastString
+ GHC.Plugins: forceOccEnv :: (a -> ()) -> OccEnv a -> ()
+ GHC.Plugins: intersectOccEnv_C :: (a -> b -> c) -> OccEnv a -> OccEnv b -> OccEnv c
+ GHC.Plugins: isConcreteType :: Type -> Bool
+ GHC.Plugins: isFieldName :: Name -> Bool
+ GHC.Plugins: isFieldNameSpace :: NameSpace -> Bool
+ GHC.Plugins: isFieldOcc :: OccName -> Bool
+ GHC.Plugins: isForAllTy_invis_ty :: Type -> Bool
+ GHC.Plugins: isTermVarOrFieldNameSpace :: NameSpace -> Bool
+ GHC.Plugins: isTerminatingType :: HasDebugCallStack => Type -> Bool
+ GHC.Plugins: isTupleTyConName :: Name -> Bool
+ GHC.Plugins: lookupFieldsOccEnv :: OccEnv a -> FastString -> [a]
+ GHC.Plugins: lookupOccEnv_AllNameSpaces :: OccEnv a -> OccName -> [a]
+ GHC.Plugins: lookupOccEnv_WithFields :: OccEnv a -> OccName -> [a]
+ GHC.Plugins: mainOcc :: OccName
+ GHC.Plugins: mapMaybeOccEnv :: (a -> Maybe b) -> OccEnv a -> OccEnv b
+ GHC.Plugins: minusOccEnv_C_Ns :: (UniqFM NameSpace a -> UniqFM NameSpace b -> UniqFM NameSpace a) -> OccEnv a -> OccEnv b -> OccEnv a
+ GHC.Plugins: mkFunCo :: Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
+ GHC.Plugins: mkNakedFunCo :: Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
+ GHC.Plugins: mkNomPrimEqPred :: Kind -> Type -> Type -> Type
+ GHC.Plugins: mkRecFieldOcc :: FastString -> String -> OccName
+ GHC.Plugins: mkRecFieldOccFS :: FastString -> FastString -> OccName
+ GHC.Plugins: nonDetFoldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b
+ GHC.Plugins: occNameMangledFS :: OccName -> FastString
+ GHC.Plugins: ppMainFn :: OccName -> SDoc
+ GHC.Plugins: recFieldToVarOcc :: HasDebugCallStack => OccName -> OccName
+ GHC.Plugins: rewriterView :: Type -> Maybe Type
+ GHC.Plugins: strictMapOccEnv :: (a -> b) -> OccEnv a -> OccEnv b
+ GHC.Plugins: type ErrorMsgType = Type
+ GHC.Plugins: varToRecFieldOcc :: HasDebugCallStack => FastString -> OccName -> OccName
+ GHC.Rename.Bind: rejectBootDecls :: HsBootOrSig -> (NonEmpty (LocatedA decl) -> BadBootDecls) -> [LocatedA decl] -> TcM ()
+ GHC.Rename.Env: AllDeprecationWarnings :: DeprecationWarnings
+ GHC.Rename.Env: ExportDeprecationWarnings :: DeprecationWarnings
+ GHC.Rename.Env: NoDeprecationWarnings :: DeprecationWarnings
+ GHC.Rename.Env: data DeprecationWarnings
+ GHC.Rename.Env: getFieldUpdLbl :: forall (p :: Pass) q. LHsRecUpdField (GhcPass p) q -> LocatedN RdrName
+ GHC.Rename.Env: getUpdFieldLbls :: forall (p :: Pass) q. UnXRec (GhcPass p) => [LHsRecUpdField (GhcPass p) q] -> [RdrName]
+ GHC.Rename.Env: lookupConstructorInfo :: HasDebugCallStack => Name -> RnM ConInfo
+ GHC.Rename.Env: lookupGREInfo :: HasDebugCallStack => HscEnv -> Name -> GREInfo
+ GHC.Rename.Env: lookupRecUpdFields :: NonEmpty (LHsRecUpdField GhcPs GhcPs) -> RnM (NonEmpty (HsRecUpdParent GhcRn))
+ GHC.Rename.Env: lookupSameOccRn_maybe :: RdrName -> RnM (Maybe Name)
+ GHC.Rename.Names: classifyGREs :: [GlobalRdrElt] -> ([GlobalRdrElt], [FieldGlobalRdrElt])
+ GHC.Rename.Names: newRecordFieldLabel :: DuplicateRecordFields -> FieldSelectors -> [Name] -> LFieldOcc GhcPs -> RnM FieldLabel
+ GHC.Rename.Unbound: NoTermInTypes :: IsTermInTypes
+ GHC.Rename.Unbound: TermInTypes :: RdrName -> IsTermInTypes
+ GHC.Rename.Unbound: UnknownTermInTypes :: RdrName -> IsTermInTypes
+ GHC.Rename.Unbound: data IsTermInTypes
+ GHC.Rename.Unbound: fieldSelectorSuggestions :: GlobalRdrEnv -> RdrName -> [GhcHint]
+ GHC.Rename.Unbound: mkUnboundGRE :: OccName -> GlobalRdrElt
+ GHC.Rename.Unbound: mkUnboundGRERdr :: RdrName -> GlobalRdrElt
+ GHC.Rename.Unbound: similarNameSuggestions :: LookingFor -> DynFlags -> GlobalRdrEnv -> LocalRdrEnv -> RdrName -> [SimilarName]
+ GHC.Rename.Unbound: termNameInType :: LookingFor -> RdrName -> RdrName -> [GhcHint] -> RnM Name
+ GHC.Rename.Unbound: unboundTermNameInTypes :: LookingFor -> RdrName -> RdrName -> RnM Name
+ GHC.Rename.Utils: delLocalNames :: [Name] -> RnM a -> RnM a
+ GHC.Rename.Utils: genLHsApp :: HsExpr GhcRn -> LHsExpr GhcRn -> LHsExpr GhcRn
+ GHC.Rename.Utils: genLHsLit :: HsLit GhcRn -> LocatedAn an (HsExpr GhcRn)
+ GHC.Rename.Utils: isIrrefutableHsPatRn :: forall (p :: Pass). OutputableBndrId p => DynFlags -> LPat (GhcPass p) -> Bool
+ GHC.Rename.Utils: mkNameClashErr :: GlobalRdrEnv -> RdrName -> NonEmpty GlobalRdrElt -> TcRnMessage
+ GHC.Runtime.Context: icExtendGblRdrEnv :: Bool -> GlobalRdrEnv -> [TyThing] -> GlobalRdrEnv
+ GHC.Runtime.Interpreter: freeReallyRemoteRef :: ExtInterpInstance d -> RemoteRef a -> IO ()
+ GHC.Runtime.Interpreter: withExtInterp :: ExceptionMonad m => ExtInterp -> (forall d. () => ExtInterpInstance d -> m a) -> m a
+ GHC.Runtime.Interpreter: withExtInterpStatus :: ExtInterp -> (forall d. () => ExtInterpStatusVar d -> m a) -> m a
+ GHC.Runtime.Interpreter: withJSInterp :: ExceptionMonad m => JSInterp -> (ExtInterpInstance JSInterpExtra -> m a) -> m a
+ GHC.Runtime.Interpreter.JS: jsLinkInterp :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> IO ()
+ GHC.Runtime.Interpreter.JS: jsLinkObject :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> FilePath -> [ExportedFun] -> IO ()
+ GHC.Runtime.Interpreter.JS: jsLinkObjects :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> [FilePath] -> (ExportedFun -> Bool) -> IO ()
+ GHC.Runtime.Interpreter.JS: jsLinkRts :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> IO ()
+ GHC.Runtime.Interpreter.JS: jsLoadFile :: ExtInterpInstance JSInterpExtra -> FilePath -> IO ()
+ GHC.Runtime.Interpreter.JS: jsRunServer :: ExtInterpInstance JSInterpExtra -> IO ()
+ GHC.Runtime.Interpreter.JS: mkExportedModFuns :: Module -> [FastString] -> [ExportedFun]
+ GHC.Runtime.Interpreter.JS: spawnJSInterp :: JSInterpConfig -> IO (ExtInterpInstance JSInterpExtra)
+ GHC.Runtime.Interpreter.Process: DelayedResponse :: DelayedResponse a
+ GHC.Runtime.Interpreter.Process: [AbandonStmt] :: RemoteRef (ResumeContext [HValueRef]) -> Message ()
+ GHC.Runtime.Interpreter.Process: [AddLibrarySearchPath] :: String -> Message (RemotePtr ())
+ GHC.Runtime.Interpreter.Process: [AddSptEntry] :: Fingerprint -> HValueRef -> Message ()
+ GHC.Runtime.Interpreter.Process: [BreakpointStatus] :: RemoteRef BreakArray -> Int -> Message Bool
+ GHC.Runtime.Interpreter.Process: [CostCentreStackInfo] :: RemotePtr CostCentreStack -> Message [String]
+ GHC.Runtime.Interpreter.Process: [CreateBCOs] :: [ByteString] -> Message [HValueRef]
+ GHC.Runtime.Interpreter.Process: [EvalIO] :: HValueRef -> Message (EvalResult ())
+ GHC.Runtime.Interpreter.Process: [EvalStmt] :: EvalOpts -> EvalExpr HValueRef -> Message (EvalStatus_ [HValueRef] [HValueRef])
+ GHC.Runtime.Interpreter.Process: [EvalStringToString] :: HValueRef -> String -> Message (EvalResult String)
+ GHC.Runtime.Interpreter.Process: [EvalString] :: HValueRef -> Message (EvalResult String)
+ GHC.Runtime.Interpreter.Process: [FindSystemLibrary] :: String -> Message (Maybe String)
+ GHC.Runtime.Interpreter.Process: [FreeFFI] :: RemotePtr C_ffi_cif -> Message ()
+ GHC.Runtime.Interpreter.Process: [FreeHValueRefs] :: [HValueRef] -> Message ()
+ GHC.Runtime.Interpreter.Process: [GetBreakpointVar] :: HValueRef -> Int -> Message (Maybe HValueRef)
+ GHC.Runtime.Interpreter.Process: [GetClosure] :: HValueRef -> Message (GenClosure HValueRef)
+ GHC.Runtime.Interpreter.Process: [InitLinker] :: Message ()
+ GHC.Runtime.Interpreter.Process: [LoadArchive] :: String -> Message ()
+ GHC.Runtime.Interpreter.Process: [LoadDLL] :: String -> Message (Maybe String)
+ GHC.Runtime.Interpreter.Process: [LoadObj] :: String -> Message ()
+ GHC.Runtime.Interpreter.Process: [LookupClosure] :: String -> Message (Maybe HValueRef)
+ GHC.Runtime.Interpreter.Process: [LookupSymbol] :: String -> Message (Maybe (RemotePtr ()))
+ GHC.Runtime.Interpreter.Process: [MallocData] :: ByteString -> Message (RemotePtr ())
+ GHC.Runtime.Interpreter.Process: [MallocStrings] :: [ByteString] -> Message [RemotePtr ()]
+ GHC.Runtime.Interpreter.Process: [MkConInfoTable] :: Bool -> Int -> Int -> Int -> Int -> ByteString -> Message (RemotePtr StgInfoTable)
+ GHC.Runtime.Interpreter.Process: [MkCostCentres] :: String -> [(String, String)] -> Message [RemotePtr CostCentre]
+ GHC.Runtime.Interpreter.Process: [NewBreakArray] :: Int -> Message (RemoteRef BreakArray)
+ GHC.Runtime.Interpreter.Process: [PrepFFI] :: FFIConv -> [FFIType] -> FFIType -> Message (RemotePtr C_ffi_cif)
+ GHC.Runtime.Interpreter.Process: [RemoveLibrarySearchPath] :: RemotePtr () -> Message Bool
+ GHC.Runtime.Interpreter.Process: [ResolveObjs] :: Message Bool
+ GHC.Runtime.Interpreter.Process: [ResumeSeq] :: RemoteRef (ResumeContext ()) -> Message (EvalStatus_ () ())
+ GHC.Runtime.Interpreter.Process: [ResumeStmt] :: EvalOpts -> RemoteRef (ResumeContext [HValueRef]) -> Message (EvalStatus_ [HValueRef] [HValueRef])
+ GHC.Runtime.Interpreter.Process: [RtsRevertCAFs] :: Message ()
+ GHC.Runtime.Interpreter.Process: [RunModFinalizers] :: RemoteRef (IORef QState) -> [RemoteRef (Q ())] -> Message (QResult ())
+ GHC.Runtime.Interpreter.Process: [RunTH] :: RemoteRef (IORef QState) -> HValueRef -> THResultType -> Maybe Loc -> Message (QResult ByteString)
+ GHC.Runtime.Interpreter.Process: [Seq] :: HValueRef -> Message (EvalStatus_ () ())
+ GHC.Runtime.Interpreter.Process: [SetupBreakpoint] :: RemoteRef BreakArray -> Int -> Int -> Message ()
+ GHC.Runtime.Interpreter.Process: [Shutdown] :: Message ()
+ GHC.Runtime.Interpreter.Process: [StartTH] :: Message (RemoteRef (IORef QState))
+ GHC.Runtime.Interpreter.Process: [UnloadObj] :: String -> Message ()
+ GHC.Runtime.Interpreter.Process: callInterpProcess :: Binary a => InterpProcess -> Message a -> IO a
+ GHC.Runtime.Interpreter.Process: data DelayedResponse a
+ GHC.Runtime.Interpreter.Process: data Message a
+ GHC.Runtime.Interpreter.Process: readInterpProcess :: InterpProcess -> Get a -> IO a
+ GHC.Runtime.Interpreter.Process: receiveAnyValue :: ExtInterpInstance d -> Get a -> IO a
+ GHC.Runtime.Interpreter.Process: receiveDelayedResponse :: Binary a => ExtInterpInstance d -> DelayedResponse a -> IO a
+ GHC.Runtime.Interpreter.Process: receiveTHMessage :: ExtInterpInstance d -> IO THMsg
+ GHC.Runtime.Interpreter.Process: sendAnyValue :: Binary a => ExtInterpInstance d -> a -> IO ()
+ GHC.Runtime.Interpreter.Process: sendMessage :: Binary a => ExtInterpInstance d -> Message a -> IO a
+ GHC.Runtime.Interpreter.Process: sendMessageDelayedResponse :: ExtInterpInstance d -> Message a -> IO (DelayedResponse a)
+ GHC.Runtime.Interpreter.Process: sendMessageNoResponse :: ExtInterpInstance d -> Message () -> IO ()
+ GHC.Runtime.Interpreter.Process: writeInterpProcess :: InterpProcess -> Put -> IO ()
+ GHC.Runtime.Interpreter.Types: ExtIServ :: !IServ -> ExtInterp
+ GHC.Runtime.Interpreter.Types: ExtInterpInstance :: {-# UNPACK #-} !InterpProcess -> !MVar [HValueRef] -> !MVar (UniqFM FastString (Ptr ())) -> !c -> ExtInterpInstance c
+ GHC.Runtime.Interpreter.Types: ExtInterpState :: !cfg -> !ExtInterpStatusVar details -> ExtInterpState cfg details
+ GHC.Runtime.Interpreter.Types: ExtJS :: !JSInterp -> ExtInterp
+ GHC.Runtime.Interpreter.Types: InterpPending :: InterpStatus inst
+ GHC.Runtime.Interpreter.Types: InterpProcess :: !Pipe -> !ProcessHandle -> InterpProcess
+ GHC.Runtime.Interpreter.Types: InterpRunning :: !inst -> InterpStatus inst
+ GHC.Runtime.Interpreter.Types: JSInterpConfig :: !NodeJsSettings -> !FilePath -> !TmpFs -> !TempDir -> !Logger -> !StgToJSConfig -> !UnitEnv -> !FinderOpts -> !FinderCache -> JSInterpConfig
+ GHC.Runtime.Interpreter.Types: JSInterpExtra :: !Handle -> !FinderCache -> !FinderOpts -> !MVar JSState -> !UnitId -> JSInterpExtra
+ GHC.Runtime.Interpreter.Types: JSState :: !LinkPlan -> !Bool -> JSState
+ GHC.Runtime.Interpreter.Types: NodeJsSettings :: FilePath -> Maybe FilePath -> [String] -> Integer -> NodeJsSettings
+ GHC.Runtime.Interpreter.Types: [instExtra] :: ExtInterpInstance c -> !c
+ GHC.Runtime.Interpreter.Types: [instFinderCache] :: JSInterpExtra -> !FinderCache
+ GHC.Runtime.Interpreter.Types: [instFinderOpts] :: JSInterpExtra -> !FinderOpts
+ GHC.Runtime.Interpreter.Types: [instGhciUnitId] :: JSInterpExtra -> !UnitId
+ GHC.Runtime.Interpreter.Types: [instJSState] :: JSInterpExtra -> !MVar JSState
+ GHC.Runtime.Interpreter.Types: [instLookupSymbolCache] :: ExtInterpInstance c -> !MVar (UniqFM FastString (Ptr ()))
+ GHC.Runtime.Interpreter.Types: [instPendingFrees] :: ExtInterpInstance c -> !MVar [HValueRef]
+ GHC.Runtime.Interpreter.Types: [instProcess] :: ExtInterpInstance c -> {-# UNPACK #-} !InterpProcess
+ GHC.Runtime.Interpreter.Types: [instStdIn] :: JSInterpExtra -> !Handle
+ GHC.Runtime.Interpreter.Types: [interpConfig] :: ExtInterpState cfg details -> !cfg
+ GHC.Runtime.Interpreter.Types: [interpHandle] :: InterpProcess -> !ProcessHandle
+ GHC.Runtime.Interpreter.Types: [interpPipe] :: InterpProcess -> !Pipe
+ GHC.Runtime.Interpreter.Types: [interpStatus] :: ExtInterpState cfg details -> !ExtInterpStatusVar details
+ GHC.Runtime.Interpreter.Types: [jsInterpCodegenCfg] :: JSInterpConfig -> !StgToJSConfig
+ GHC.Runtime.Interpreter.Types: [jsInterpFinderCache] :: JSInterpConfig -> !FinderCache
+ GHC.Runtime.Interpreter.Types: [jsInterpFinderOpts] :: JSInterpConfig -> !FinderOpts
+ GHC.Runtime.Interpreter.Types: [jsInterpLogger] :: JSInterpConfig -> !Logger
+ GHC.Runtime.Interpreter.Types: [jsInterpNodeConfig] :: JSInterpConfig -> !NodeJsSettings
+ GHC.Runtime.Interpreter.Types: [jsInterpScript] :: JSInterpConfig -> !FilePath
+ GHC.Runtime.Interpreter.Types: [jsInterpTmpDir] :: JSInterpConfig -> !TempDir
+ GHC.Runtime.Interpreter.Types: [jsInterpTmpFs] :: JSInterpConfig -> !TmpFs
+ GHC.Runtime.Interpreter.Types: [jsInterpUnitEnv] :: JSInterpConfig -> !UnitEnv
+ GHC.Runtime.Interpreter.Types: [jsLinkState] :: JSState -> !LinkPlan
+ GHC.Runtime.Interpreter.Types: [jsServerStarted] :: JSState -> !Bool
+ GHC.Runtime.Interpreter.Types: [nodeExtraArgs] :: NodeJsSettings -> [String]
+ GHC.Runtime.Interpreter.Types: [nodeKeepAliveMaxMem] :: NodeJsSettings -> Integer
+ GHC.Runtime.Interpreter.Types: [nodePath] :: NodeJsSettings -> Maybe FilePath
+ GHC.Runtime.Interpreter.Types: [nodeProgram] :: NodeJsSettings -> FilePath
+ GHC.Runtime.Interpreter.Types: data ExtInterp
+ GHC.Runtime.Interpreter.Types: data ExtInterpInstance c
+ GHC.Runtime.Interpreter.Types: data ExtInterpState cfg details
+ GHC.Runtime.Interpreter.Types: data InterpProcess
+ GHC.Runtime.Interpreter.Types: data InterpStatus inst
+ GHC.Runtime.Interpreter.Types: data JSInterpConfig
+ GHC.Runtime.Interpreter.Types: data JSInterpExtra
+ GHC.Runtime.Interpreter.Types: data JSState
+ GHC.Runtime.Interpreter.Types: data NodeJsSettings
+ GHC.Runtime.Interpreter.Types: defaultNodeJsSettings :: NodeJsSettings
+ GHC.Runtime.Interpreter.Types: type ExtInterpStatusVar d = MVar InterpStatus ExtInterpInstance d
+ GHC.Runtime.Interpreter.Types: type IServ = ExtInterpState IServConfig ()
+ GHC.Runtime.Interpreter.Types: type JSInterp = ExtInterpState JSInterpConfig JSInterpExtra
+ GHC.Runtime.Utils: runWithPipes :: (CreateProcess -> IO ProcessHandle) -> FilePath -> [String] -> [String] -> IO (ProcessHandle, Handle, Handle)
+ GHC.Settings: [toolSettings_ldSupportsResponseFiles] :: ToolSettings -> Bool
+ GHC.Settings: sLdSupportsResponseFiles :: Settings -> Bool
+ GHC.Settings.Config: cProjectUnitId :: String
+ GHC.Settings.Constants: mAX_GIVENS_FUEL :: Int
+ GHC.Settings.Constants: mAX_QC_FUEL :: Int
+ GHC.Settings.Constants: mAX_WANTEDS_FUEL :: Int
+ GHC.Stg.InferTags.TagSig: type StgCgInfos = NameEnv TagSig
+ GHC.Stg.Lift.Types: AltSk :: !Skeleton -> !Skeleton -> Skeleton
+ GHC.Stg.Lift.Types: BindsClosure :: !Id -> !Bool -> BinderInfo
+ GHC.Stg.Lift.Types: BoringBinder :: !Id -> BinderInfo
+ GHC.Stg.Lift.Types: BothSk :: !Skeleton -> !Skeleton -> Skeleton
+ GHC.Stg.Lift.Types: ClosureSk :: !Id -> !DIdSet -> !Skeleton -> Skeleton
+ GHC.Stg.Lift.Types: NilSk :: Skeleton
+ GHC.Stg.Lift.Types: RhsSk :: !Card -> !Skeleton -> Skeleton
+ GHC.Stg.Lift.Types: altSk :: Skeleton -> Skeleton -> Skeleton
+ GHC.Stg.Lift.Types: binderInfoBndr :: BinderInfo -> Id
+ GHC.Stg.Lift.Types: binderInfoOccursAsArg :: BinderInfo -> Maybe Bool
+ GHC.Stg.Lift.Types: bothSk :: Skeleton -> Skeleton -> Skeleton
+ GHC.Stg.Lift.Types: data BinderInfo
+ GHC.Stg.Lift.Types: data Skeleton
+ GHC.Stg.Lift.Types: instance GHC.Utils.Outputable.Outputable GHC.Stg.Lift.Types.BinderInfo
+ GHC.Stg.Lift.Types: instance GHC.Utils.Outputable.Outputable GHC.Stg.Lift.Types.Skeleton
+ GHC.Stg.Lift.Types: instance GHC.Utils.Outputable.OutputableBndr GHC.Stg.Lift.Types.BinderInfo
+ GHC.Stg.Lift.Types: rhsSk :: Card -> Skeleton -> Skeleton
+ GHC.StgToByteCode: instance GHC.Driver.DynFlags.HasDynFlags GHC.StgToByteCode.BcM
+ GHC.StgToCmm.Closure: importedIdLFInfo :: Id -> LambdaFormInfo
+ GHC.StgToCmm.Config: [stgToCmmAllowFMAInstr] :: StgToCmmConfig -> FMASign -> Bool
+ GHC.StgToCmm.Monad: [stgToCmmAllowFMAInstr] :: StgToCmmConfig -> FMASign -> Bool
+ GHC.StgToCmm.Sequel: type SelfLoopInfo = (Id, BlockId, [LocalReg])
+ GHC.StgToJS.Closure: allocClsA :: Int -> JExpr
+ GHC.StgToJS.Closure: allocData :: Int -> JExpr
+ GHC.StgToJS.Closure: clsName :: Int -> FastString
+ GHC.StgToJS.Closure: dataFieldName :: Int -> FastString
+ GHC.StgToJS.Closure: dataName :: Int -> FastString
+ GHC.StgToJS.Closure: jsClosureCount :: Int
+ GHC.StgToJS.Closure: mkClosure :: JExpr -> [JExpr] -> JExpr -> Maybe JExpr -> Closure
+ GHC.StgToJS.Closure: varName :: Int -> Ident
+ GHC.StgToJS.Linker.Linker: LinkPlan :: Map Module LocatedBlockInfo -> Set BlockRef -> Set FilePath -> Set FilePath -> LinkPlan
+ GHC.StgToJS.Linker.Linker: LinkSpec :: [UnitId] -> [LinkedObj] -> (ExportedFun -> Bool) -> Set ExportedFun -> [FilePath] -> LinkSpec
+ GHC.StgToJS.Linker.Linker: [lkp_archives] :: LinkPlan -> Set FilePath
+ GHC.StgToJS.Linker.Linker: [lkp_block_info] :: LinkPlan -> Map Module LocatedBlockInfo
+ GHC.StgToJS.Linker.Linker: [lkp_dep_blocks] :: LinkPlan -> Set BlockRef
+ GHC.StgToJS.Linker.Linker: [lkp_extra_js] :: LinkPlan -> Set FilePath
+ GHC.StgToJS.Linker.Linker: [lks_extra_js] :: LinkSpec -> [FilePath]
+ GHC.StgToJS.Linker.Linker: [lks_extra_roots] :: LinkSpec -> Set ExportedFun
+ GHC.StgToJS.Linker.Linker: [lks_obj_files] :: LinkSpec -> [LinkedObj]
+ GHC.StgToJS.Linker.Linker: [lks_obj_root_filter] :: LinkSpec -> ExportedFun -> Bool
+ GHC.StgToJS.Linker.Linker: [lks_unit_ids] :: LinkSpec -> [UnitId]
+ GHC.StgToJS.Linker.Linker: computeLinkDependencies :: StgToJSConfig -> UnitEnv -> LinkSpec -> FinderOpts -> FinderCache -> IO LinkPlan
+ GHC.StgToJS.Linker.Linker: data LinkPlan
+ GHC.StgToJS.Linker.Linker: data LinkSpec
+ GHC.StgToJS.Linker.Linker: emptyLinkPlan :: LinkPlan
+ GHC.StgToJS.Linker.Linker: incrementLinkPlan :: LinkPlan -> LinkPlan -> (LinkPlan, LinkPlan)
+ GHC.StgToJS.Linker.Linker: instance GHC.Utils.Outputable.Outputable GHC.StgToJS.Linker.Linker.LinkSpec
+ GHC.StgToJS.Linker.Linker: jsLink :: JSLinkConfig -> StgToJSConfig -> Logger -> FilePath -> LinkPlan -> IO ()
+ GHC.StgToJS.Linker.Linker: mkExportedFuns :: UnitId -> FastString -> [FastString] -> [ExportedFun]
+ GHC.StgToJS.Linker.Linker: mkExportedModFuns :: Module -> [FastString] -> [ExportedFun]
+ GHC.StgToJS.Linker.Linker: staticDeclStat :: StaticInfo -> JStat
+ GHC.StgToJS.Linker.Linker: staticInitStat :: StaticInfo -> JStat
+ GHC.StgToJS.Linker.Opt: optRenderJs :: RenderJs doc
+ GHC.StgToJS.Linker.Opt: pretty :: JsRender doc => Bool -> JStat -> doc
+ GHC.StgToJS.Linker.Types: LinkPlan :: Map Module LocatedBlockInfo -> Set BlockRef -> Set FilePath -> Set FilePath -> LinkPlan
+ GHC.StgToJS.Linker.Types: [lcCombineAll] :: JSLinkConfig -> !Bool
+ GHC.StgToJS.Linker.Types: [lcForeignRefs] :: JSLinkConfig -> !Bool
+ GHC.StgToJS.Linker.Types: [lkp_archives] :: LinkPlan -> Set FilePath
+ GHC.StgToJS.Linker.Types: [lkp_block_info] :: LinkPlan -> Map Module LocatedBlockInfo
+ GHC.StgToJS.Linker.Types: [lkp_dep_blocks] :: LinkPlan -> Set BlockRef
+ GHC.StgToJS.Linker.Types: [lkp_extra_js] :: LinkPlan -> Set FilePath
+ GHC.StgToJS.Linker.Types: data LinkPlan
+ GHC.StgToJS.Linker.Types: instance GHC.Utils.Outputable.Outputable GHC.StgToJS.Linker.Types.LinkPlan
+ GHC.StgToJS.Object: BlockInfo :: !Module -> !BlockIds -> !Map ExportedFun BlockId -> !Array BlockId BlockDeps -> BlockInfo
+ GHC.StgToJS.Object: BlockRef :: !Module -> !BlockId -> BlockRef
+ GHC.StgToJS.Object: LocatedBlockInfo :: !BlockLocation -> !BlockInfo -> LocatedBlockInfo
+ GHC.StgToJS.Object: [bi_block_deps] :: BlockInfo -> !Array BlockId BlockDeps
+ GHC.StgToJS.Object: [bi_exports] :: BlockInfo -> !Map ExportedFun BlockId
+ GHC.StgToJS.Object: [bi_module] :: BlockInfo -> !Module
+ GHC.StgToJS.Object: [bi_must_link] :: BlockInfo -> !BlockIds
+ GHC.StgToJS.Object: [block_ref_idx] :: BlockRef -> !BlockId
+ GHC.StgToJS.Object: [block_ref_mod] :: BlockRef -> !Module
+ GHC.StgToJS.Object: [lbi_info] :: LocatedBlockInfo -> !BlockInfo
+ GHC.StgToJS.Object: [lbi_loc] :: LocatedBlockInfo -> !BlockLocation
+ GHC.StgToJS.Object: [objBlockInfo] :: Object -> !BlockInfo
+ GHC.StgToJS.Object: data BlockInfo
+ GHC.StgToJS.Object: data BlockLocation
+ GHC.StgToJS.Object: data BlockRef
+ GHC.StgToJS.Object: data LocatedBlockInfo
+ GHC.StgToJS.Object: getObjectBlocks :: Object -> BlockIds -> IO [ObjBlock]
+ GHC.StgToJS.Object: instance GHC.Classes.Eq GHC.StgToJS.Object.BlockRef
+ GHC.StgToJS.Object: instance GHC.Classes.Ord GHC.StgToJS.Object.BlockRef
+ GHC.StgToJS.Object: instance GHC.Utils.Binary.Binary GHC.JS.Syntax.AOp
+ GHC.StgToJS.Object: instance GHC.Utils.Binary.Binary GHC.JS.Syntax.Op
+ GHC.StgToJS.Object: instance GHC.Utils.Binary.Binary GHC.JS.Syntax.UOp
+ GHC.StgToJS.Object: instance GHC.Utils.Binary.Binary GHC.JS.Unsat.Syntax.Ident
+ GHC.StgToJS.Object: instance GHC.Utils.Binary.Binary GHC.StgToJS.Object.BlockInfo
+ GHC.StgToJS.Object: instance GHC.Utils.Outputable.Outputable GHC.StgToJS.Object.BlockInfo
+ GHC.StgToJS.Object: instance GHC.Utils.Outputable.Outputable GHC.StgToJS.Object.BlockLocation
+ GHC.StgToJS.Object: isGlobalBlock :: BlockId -> Bool
+ GHC.StgToJS.Object: readObjectBlockInfo :: FilePath -> IO (Maybe BlockInfo)
+ GHC.StgToJS.Object: readObjectBlocks :: FilePath -> BlockIds -> IO [ObjBlock]
+ GHC.StgToJS.Object: type BlockId = Int
+ GHC.StgToJS.Object: type BlockIds = IntSet
+ GHC.StgToJS.Types: ObjBlock :: ![FastString] -> ![ClosureInfo] -> ![StaticInfo] -> JStat -> !ByteString -> ![ExpFun] -> ![ForeignJSRef] -> ObjBlock
+ GHC.StgToJS.Types: [csPrettyRender] :: StgToJSConfig -> !Bool
+ GHC.StgToJS.Types: [luObjBlock] :: LinkableUnit -> ObjBlock
+ GHC.StgToJS.Types: data ObjBlock
+ GHC.StgToJS.Utils: NoSlot :: SlotCount
+ GHC.StgToJS.Utils: OneSlot :: SlotCount
+ GHC.StgToJS.Utils: TwoSlots :: SlotCount
+ GHC.StgToJS.Utils: altRefs :: UniqFM Id CgStgExpr -> CgStgAlt -> Set Id
+ GHC.StgToJS.Utils: argRefs :: UniqFM Id CgStgExpr -> StgArg -> Set Id
+ GHC.StgToJS.Utils: argVt :: StgArg -> VarType
+ GHC.StgToJS.Utils: assocIdExprs :: Id -> [JExpr] -> [TypedExpr]
+ GHC.StgToJS.Utils: assocIdPrimReps :: Id -> [JExpr] -> [(PrimRep, [JExpr])]
+ GHC.StgToJS.Utils: assocPrimReps :: [PrimRep] -> [JExpr] -> [(PrimRep, [JExpr])]
+ GHC.StgToJS.Utils: bindees :: CgStgBinding -> [Id]
+ GHC.StgToJS.Utils: bindingRefs :: UniqFM Id CgStgExpr -> CgStgBinding -> Set Id
+ GHC.StgToJS.Utils: collectIds :: UniqFM Id CgStgExpr -> CgStgBinding -> [Id]
+ GHC.StgToJS.Utils: collectTopIds :: CgStgBinding -> [Id]
+ GHC.StgToJS.Utils: data SlotCount
+ GHC.StgToJS.Utils: dataConType :: DataCon -> Type
+ GHC.StgToJS.Utils: exprRefs :: UniqFM Id CgStgExpr -> CgStgExpr -> Set Id
+ GHC.StgToJS.Utils: fixedLayout :: [VarType] -> CILayout
+ GHC.StgToJS.Utils: hasExport :: CgStgBinding -> Bool
+ GHC.StgToJS.Utils: idPrimReps :: Id -> [PrimRep]
+ GHC.StgToJS.Utils: idVt :: HasDebugCallStack => Id -> [VarType]
+ GHC.StgToJS.Utils: inspectInlineBinding :: UniqSet Id -> CgStgBinding -> UniqSet Id
+ GHC.StgToJS.Utils: inspectInlineRhs :: UniqSet Id -> Id -> CgStgRhs -> UniqSet Id
+ GHC.StgToJS.Utils: instance GHC.Classes.Eq GHC.StgToJS.Utils.SlotCount
+ GHC.StgToJS.Utils: instance GHC.Classes.Ord GHC.StgToJS.Utils.SlotCount
+ GHC.StgToJS.Utils: instance GHC.Show.Show GHC.StgToJS.Utils.SlotCount
+ GHC.StgToJS.Utils: instance GHC.Utils.Outputable.Outputable GHC.StgToJS.Utils.SlotCount
+ GHC.StgToJS.Utils: isBoolDataCon :: DataCon -> Bool
+ GHC.StgToJS.Utils: isInlineApp :: UniqSet Id -> Id -> [StgArg] -> Bool
+ GHC.StgToJS.Utils: isInlineExpr :: UniqSet Id -> CgStgExpr -> (UniqSet Id, Bool)
+ GHC.StgToJS.Utils: isInlineForeignCall :: ForeignCall -> Bool
+ GHC.StgToJS.Utils: isMatchable :: [VarType] -> Bool
+ GHC.StgToJS.Utils: isMultiVar :: VarType -> Bool
+ GHC.StgToJS.Utils: isPtr :: VarType -> Bool
+ GHC.StgToJS.Utils: isSingleVar :: VarType -> Bool
+ GHC.StgToJS.Utils: isUnboxable :: VarType -> Bool
+ GHC.StgToJS.Utils: isUnboxableCon :: DataCon -> Bool
+ GHC.StgToJS.Utils: isUpdatableRhs :: CgStgRhs -> Bool
+ GHC.StgToJS.Utils: isVoid :: VarType -> Bool
+ GHC.StgToJS.Utils: kindPrimRep' :: HasDebugCallStack => SDoc -> Kind -> [PrimRep]
+ GHC.StgToJS.Utils: liveStatic :: LiveVars -> LiveVars
+ GHC.StgToJS.Utils: liveVars :: LiveVars -> LiveVars
+ GHC.StgToJS.Utils: mkArityTag :: Int -> Int -> Int
+ GHC.StgToJS.Utils: primRepSize :: PrimRep -> SlotCount
+ GHC.StgToJS.Utils: primRepVt :: HasDebugCallStack => PrimRep -> VarType
+ GHC.StgToJS.Utils: primTypeVt :: HasDebugCallStack => Type -> VarType
+ GHC.StgToJS.Utils: removeTick :: CgStgExpr -> CgStgExpr
+ GHC.StgToJS.Utils: rhsRefs :: UniqFM Id CgStgExpr -> CgStgRhs -> Set Id
+ GHC.StgToJS.Utils: slotCount :: SlotCount -> Int
+ GHC.StgToJS.Utils: stackSlotType :: Id -> VarType
+ GHC.StgToJS.Utils: stgAltLive :: CgStgAlt -> LiveVars
+ GHC.StgToJS.Utils: stgArgLive :: StgArg -> LiveVars
+ GHC.StgToJS.Utils: stgBindLive :: CgStgBinding -> [(Id, LiveVars)]
+ GHC.StgToJS.Utils: stgBindRhsLive :: CgStgBinding -> LiveVars
+ GHC.StgToJS.Utils: stgExprLive :: Bool -> CgStgExpr -> LiveVars
+ GHC.StgToJS.Utils: stgLetNoEscapeLive :: Bool -> StgBinding -> StgExpr -> LiveVars
+ GHC.StgToJS.Utils: stgLneLive :: CgStgBinding -> [Id]
+ GHC.StgToJS.Utils: stgLneLive' :: CgStgBinding -> [Id]
+ GHC.StgToJS.Utils: stgLneLiveExpr :: CgStgRhs -> [Id]
+ GHC.StgToJS.Utils: stgRhsLive :: CgStgRhs -> LiveVars
+ GHC.StgToJS.Utils: stgTopBindLive :: CgStgTopBinding -> [(Id, LiveVars)]
+ GHC.StgToJS.Utils: toTypeList :: [VarType] -> [Int]
+ GHC.StgToJS.Utils: tyConPrimRep' :: HasDebugCallStack => TyCon -> [PrimRep]
+ GHC.StgToJS.Utils: tyConVt :: HasDebugCallStack => TyCon -> [VarType]
+ GHC.StgToJS.Utils: type LiveVars = DVarSet
+ GHC.StgToJS.Utils: typePrimRep' :: HasDebugCallStack => UnaryType -> [PrimRep]
+ GHC.StgToJS.Utils: typePrimReps :: Type -> [PrimRep]
+ GHC.StgToJS.Utils: typeSize :: Type -> Int
+ GHC.StgToJS.Utils: typeVt :: HasDebugCallStack => Type -> [VarType]
+ GHC.StgToJS.Utils: uTypeVt :: HasDebugCallStack => UnaryType -> VarType
+ GHC.StgToJS.Utils: varSize :: VarType -> Int
+ GHC.StgToJS.Utils: varSlotCount :: VarType -> SlotCount
+ GHC.Tc.Errors.Hole: [showMatches] :: HoleFitDispConfig -> Bool
+ GHC.Tc.Errors.Hole: [showProv] :: HoleFitDispConfig -> Bool
+ GHC.Tc.Errors.Hole: [showType] :: HoleFitDispConfig -> Bool
+ GHC.Tc.Errors.Hole: [showWrapVars] :: HoleFitDispConfig -> Bool
+ GHC.Tc.Errors.Hole: [showWrap] :: HoleFitDispConfig -> Bool
+ GHC.Tc.Errors.Hole.Plugin: HoleFitPlugin :: CandPlugin -> FitPlugin -> HoleFitPlugin
+ GHC.Tc.Errors.Hole.Plugin: HoleFitPluginR :: TcM (TcRef s) -> (TcRef s -> HoleFitPlugin) -> (TcRef s -> TcM ()) -> HoleFitPluginR
+ GHC.Tc.Errors.Hole.Plugin: [candPlugin] :: HoleFitPlugin -> CandPlugin
+ GHC.Tc.Errors.Hole.Plugin: [fitPlugin] :: HoleFitPlugin -> FitPlugin
+ GHC.Tc.Errors.Hole.Plugin: [hfPluginInit] :: HoleFitPluginR -> TcM (TcRef s)
+ GHC.Tc.Errors.Hole.Plugin: [hfPluginRun] :: HoleFitPluginR -> TcRef s -> HoleFitPlugin
+ GHC.Tc.Errors.Hole.Plugin: [hfPluginStop] :: HoleFitPluginR -> TcRef s -> TcM ()
+ GHC.Tc.Errors.Hole.Plugin: data HoleFitPlugin
+ GHC.Tc.Errors.Hole.Plugin: data HoleFitPluginR
+ GHC.Tc.Errors.Hole.Plugin: type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate]
+ GHC.Tc.Errors.Hole.Plugin: type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit]
+ GHC.Tc.Errors.Ppr: [tcOptsIfaceOpts] :: TcRnMessageOpts -> !IfaceMessageOpts
+ GHC.Tc.Errors.Ppr: instance GHC.Types.Error.HasDefaultDiagnosticOpts GHC.Tc.Errors.Types.TcRnMessageOpts
+ GHC.Tc.Errors.Ppr: messageWithHsDocContext :: TcRnMessageOpts -> HsDocContext -> DecoratedSDoc -> DecoratedSDoc
+ GHC.Tc.Errors.Ppr: messageWithInfoDiagnosticMessage :: UnitState -> ErrInfo -> Bool -> DecoratedSDoc -> DecoratedSDoc
+ GHC.Tc.Errors.Ppr: pprTyThingUsedWrong :: WrongThingSort -> TcTyThing -> Name -> SDoc
+ GHC.Tc.Errors.Ppr: pprUntouchableVariable :: TcTyVar -> Implication -> SDoc
+ GHC.Tc.Errors.Types: AddDocToNonLocalDefn :: !DocLoc -> THError
+ GHC.Tc.Errors.Types: AddInvalidCorePlugin :: !String -> THError
+ GHC.Tc.Errors.Types: AddTopDeclsError :: !AddTopDeclsError -> THError
+ GHC.Tc.Errors.Types: AddTopDeclsRunSpliceFailure :: !RunSpliceFailReason -> AddTopDeclsError
+ GHC.Tc.Errors.Types: AddTopDeclsUnexpectedDeclarationSplice :: AddTopDeclsError
+ GHC.Tc.Errors.Types: AssocDefaultBadArgs :: !TyCon -> ![Type] -> AssocDefaultBadArgs -> InvalidAssocDefault
+ GHC.Tc.Errors.Types: AssocDefaultDuplicateTyVars :: !NonEmpty (TyCoVar, ForAllTyFlag) -> AssocDefaultBadArgs
+ GHC.Tc.Errors.Types: AssocDefaultNonTyVarArg :: !(Type, ForAllTyFlag) -> AssocDefaultBadArgs
+ GHC.Tc.Errors.Types: AssocDefaultNotAssoc :: !Name -> !Name -> InvalidAssocDefault
+ GHC.Tc.Errors.Types: AssocInstanceMissing :: !Name -> InvalidAssocInstance
+ GHC.Tc.Errors.Types: AssocInstanceNotInAClass :: !TyCon -> InvalidAssocInstance
+ GHC.Tc.Errors.Types: AssocMultipleDefaults :: !Name -> InvalidAssocDefault
+ GHC.Tc.Errors.Types: AssocNoClassTyVar :: !Class -> !TyCon -> InvalidAssocInstance
+ GHC.Tc.Errors.Types: AssocNotInThisClass :: !Class -> !TyCon -> InvalidAssocInstance
+ GHC.Tc.Errors.Types: AssocTyVarsDontMatch :: !ForAllTyFlag -> !TyCon -> ![Type] -> ![Type] -> InvalidAssocInstance
+ GHC.Tc.Errors.Types: AtLeastOneArgExpected :: IllegalForeignTypeReason
+ GHC.Tc.Errors.Types: BadCoercionRole :: !Coercion -> RoleValidationFailedReason
+ GHC.Tc.Errors.Types: BadImplicitSplice :: THSyntaxError
+ GHC.Tc.Errors.Types: BadImportAvailDataCon :: OccName -> BadImportKind
+ GHC.Tc.Errors.Types: BadImportAvailTyCon :: BadImportKind
+ GHC.Tc.Errors.Types: BadImportAvailVar :: BadImportKind
+ GHC.Tc.Errors.Types: BadImportNotExported :: [GhcHint] -> BadImportKind
+ GHC.Tc.Errors.Types: BadImportNotExportedSubordinates :: [OccName] -> BadImportKind
+ GHC.Tc.Errors.Types: BadReexportedBootThing :: !Name -> !Name -> BootMismatch
+ GHC.Tc.Errors.Types: BootBindsPs :: !NonEmpty (LHsBindLR GhcRn GhcPs) -> BadBootDecls
+ GHC.Tc.Errors.Types: BootBindsRn :: !NonEmpty (LHsBindLR GhcRn GhcRn) -> BadBootDecls
+ GHC.Tc.Errors.Types: BootDefaultDecls :: !NonEmpty (LDefaultDecl GhcRn) -> BadBootDecls
+ GHC.Tc.Errors.Types: BootFamInst :: !TyCon -> BadBootDecls
+ GHC.Tc.Errors.Types: BootForeignDecls :: !NonEmpty (LForeignDecl GhcRn) -> BadBootDecls
+ GHC.Tc.Errors.Types: BootInstanceSigs :: !NonEmpty (LSig GhcRn) -> BadBootDecls
+ GHC.Tc.Errors.Types: BootMismatch :: !TyThing -> !TyThing -> !BootMismatchWhat -> BootMismatch
+ GHC.Tc.Errors.Types: BootMismatchedIdTypes :: !Id -> !Id -> BootMismatchWhat
+ GHC.Tc.Errors.Types: BootMismatchedTyCons :: !TyCon -> !TyCon -> !NonEmpty BootTyConMismatch -> BootMismatchWhat
+ GHC.Tc.Errors.Types: BootRuleDecls :: !NonEmpty (LRuleDecls GhcRn) -> BadBootDecls
+ GHC.Tc.Errors.Types: BootSpliceDecls :: !NonEmpty (LocatedA (HsUntypedSplice GhcPs)) -> BadBootDecls
+ GHC.Tc.Errors.Types: CannotReifyInstance :: !Type -> THReifyError
+ GHC.Tc.Errors.Types: CannotReifyOutOfScopeThing :: !Name -> THReifyError
+ GHC.Tc.Errors.Types: CannotReifyThingNotInTypeEnv :: !Name -> THReifyError
+ GHC.Tc.Errors.Types: CannotRepresentType :: !UnrepresentableTypeDescr -> !Type -> THReifyError
+ GHC.Tc.Errors.Types: ClassDeclSort :: DeclSort
+ GHC.Tc.Errors.Types: CoverageProblem :: ([TyVar], [TyVar]) -> ([Type], [Type]) -> Pair VarSet -> FailedCoverageCondition -> CoverageProblem
+ GHC.Tc.Errors.Types: DodgyImportsEmptyParent :: !GlobalRdrElt -> DodgyImportsReason
+ GHC.Tc.Errors.Types: DodgyImportsHiding :: !ImportLookupReason -> DodgyImportsReason
+ GHC.Tc.Errors.Types: FailedICC :: !Bool -> FailedCoverageCondition
+ GHC.Tc.Errors.Types: FailedLICC :: FailedCoverageCondition
+ GHC.Tc.Errors.Types: FailedToLookupThInstName :: !Type -> !LookupTHInstNameErrReason -> THError
+ GHC.Tc.Errors.Types: FamInstLHSUnusedBoundTyVars :: ![Name] -> IllegalFamilyInstanceReason
+ GHC.Tc.Errors.Types: FamInstRHSOutOfScopeTyVars :: !Maybe (TyCon, [Type], TyVarSet) -> ![Name] -> IllegalFamilyInstanceReason
+ GHC.Tc.Errors.Types: FamilyArityMismatch :: !TyCon -> !Arity -> IllegalFamilyInstanceReason
+ GHC.Tc.Errors.Types: FamilyCategoryMismatch :: !TyCon -> IllegalFamilyInstanceReason
+ GHC.Tc.Errors.Types: ForeignDynNotPtr :: !Type -> !Type -> IllegalForeignTypeReason
+ GHC.Tc.Errors.Types: ForeignLabelNotAPtr :: TypeCannotBeMarshaledReason
+ GHC.Tc.Errors.Types: HsSigType :: HsSigType p -> HsTypeOrSigType p
+ GHC.Tc.Errors.Types: HsTyVarBndrExistentialFlag :: HsTyVarBndr flag GhcRn -> HsTyVarBndrExistentialFlag
+ GHC.Tc.Errors.Types: HsType :: HsType p -> HsTypeOrSigType p
+ GHC.Tc.Errors.Types: HsigShapeNotUnifiable :: !Name -> !Name -> !Bool -> HsigShapeMismatchReason
+ GHC.Tc.Errors.Types: HsigShapeSortMismatch :: !AvailInfo -> !AvailInfo -> HsigShapeMismatchReason
+ GHC.Tc.Errors.Types: IOResultExpected :: IllegalForeignTypeReason
+ GHC.Tc.Errors.Types: IllegalClassInstance :: !TypedThing -> !IllegalClassInstanceReason -> IllegalInstanceReason
+ GHC.Tc.Errors.Types: IllegalExpression :: RuleLhsErrReason
+ GHC.Tc.Errors.Types: IllegalFamilyApplicationInInstance :: !Type -> !Bool -> !TyCon -> ![Type] -> IllegalInstanceReason
+ GHC.Tc.Errors.Types: IllegalFamilyInstance :: !IllegalFamilyInstanceReason -> IllegalInstanceReason
+ GHC.Tc.Errors.Types: IllegalHasFieldInstance :: !IllegalHasFieldInstance -> IllegalClassInstanceReason
+ GHC.Tc.Errors.Types: IllegalHasFieldInstanceFamilyTyCon :: IllegalHasFieldInstance
+ GHC.Tc.Errors.Types: IllegalHasFieldInstanceNotATyCon :: IllegalHasFieldInstance
+ GHC.Tc.Errors.Types: IllegalHasFieldInstanceTyConHasField :: !TyCon -> !FieldLabelString -> IllegalHasFieldInstance
+ GHC.Tc.Errors.Types: IllegalHasFieldInstanceTyConHasFields :: !TyCon -> !Type -> IllegalHasFieldInstance
+ GHC.Tc.Errors.Types: IllegalInstanceFailsCoverageCondition :: !Class -> !CoverageProblem -> IllegalClassInstanceReason
+ GHC.Tc.Errors.Types: IllegalInstanceHead :: !IllegalInstanceHeadReason -> IllegalClassInstanceReason
+ GHC.Tc.Errors.Types: IllegalSpecialClassInstance :: !Class -> !Bool -> IllegalClassInstanceReason
+ GHC.Tc.Errors.Types: IllegalStaticFormInSplice :: !HsExpr GhcPs -> THError
+ GHC.Tc.Errors.Types: IllegalTHQuotes :: !HsExpr GhcPs -> THSyntaxError
+ GHC.Tc.Errors.Types: IllegalTHSplice :: THSyntaxError
+ GHC.Tc.Errors.Types: InstHeadAbstractClass :: !Class -> IllegalInstanceHeadReason
+ GHC.Tc.Errors.Types: InstHeadMultiParam :: IllegalInstanceHeadReason
+ GHC.Tc.Errors.Types: InstHeadNonClass :: !Maybe TyCon -> IllegalInstanceHeadReason
+ GHC.Tc.Errors.Types: InstHeadNonTyVarArgs :: IllegalInstanceHeadReason
+ GHC.Tc.Errors.Types: InstHeadTySynArgs :: IllegalInstanceHeadReason
+ GHC.Tc.Errors.Types: InstanceDeclSort :: DeclSort
+ GHC.Tc.Errors.Types: InvalidAssoc :: !InvalidAssoc -> IllegalFamilyInstanceReason
+ GHC.Tc.Errors.Types: InvalidAssocDefault :: !InvalidAssocDefault -> InvalidAssoc
+ GHC.Tc.Errors.Types: InvalidAssocInstance :: !InvalidAssocInstance -> InvalidAssoc
+ GHC.Tc.Errors.Types: InvalidTopDecl :: !HsDecl GhcPs -> AddTopDeclsError
+ GHC.Tc.Errors.Types: InvalidTyConParent :: TyCon -> NonEmpty RecSelParent -> BadRecordUpdateReason
+ GHC.Tc.Errors.Types: LinearTypesNotAllowed :: IllegalForeignTypeReason
+ GHC.Tc.Errors.Types: MismatchedATDefaultType :: BootATMismatch
+ GHC.Tc.Errors.Types: MismatchedATs :: !BootListMismatches ClassATItem BootATMismatch -> BootClassMismatch
+ GHC.Tc.Errors.Types: MismatchedAxiomBinders :: BootAxiomBranchMismatch
+ GHC.Tc.Errors.Types: MismatchedAxiomLHS :: BootAxiomBranchMismatch
+ GHC.Tc.Errors.Types: MismatchedAxiomRHS :: BootAxiomBranchMismatch
+ GHC.Tc.Errors.Types: MismatchedConstructors :: !BootListMismatches DataCon BootDataConMismatch -> BootDataMismatch
+ GHC.Tc.Errors.Types: MismatchedDataConBangs :: BootDataConMismatch
+ GHC.Tc.Errors.Types: MismatchedDataConFieldLabels :: BootDataConMismatch
+ GHC.Tc.Errors.Types: MismatchedDataConFixities :: BootDataConMismatch
+ GHC.Tc.Errors.Types: MismatchedDataConNames :: BootDataConMismatch
+ GHC.Tc.Errors.Types: MismatchedDataConTypes :: BootDataConMismatch
+ GHC.Tc.Errors.Types: MismatchedDatatypeContexts :: BootDataMismatch
+ GHC.Tc.Errors.Types: MismatchedDefaultMethods :: !Bool -> BootMethodMismatch
+ GHC.Tc.Errors.Types: MismatchedFunDeps :: BootClassMismatch
+ GHC.Tc.Errors.Types: MismatchedLength :: BootListMismatch item err
+ GHC.Tc.Errors.Types: MismatchedMethodNames :: BootMethodMismatch
+ GHC.Tc.Errors.Types: MismatchedMethodTypes :: !Type -> !Type -> BootMethodMismatch
+ GHC.Tc.Errors.Types: MismatchedMethods :: !BootListMismatches ClassOpItem BootMethodMismatch -> BootClassMismatch
+ GHC.Tc.Errors.Types: MismatchedMinimalPragmas :: BootClassMismatch
+ GHC.Tc.Errors.Types: MismatchedNewtypeVsData :: BootDataMismatch
+ GHC.Tc.Errors.Types: MismatchedSpliceType :: SpliceType -> SpliceOrBracket -> THSyntaxError
+ GHC.Tc.Errors.Types: MismatchedSuperclasses :: BootClassMismatch
+ GHC.Tc.Errors.Types: MismatchedThing :: !Int -> !item -> !item -> !err -> BootListMismatch item err
+ GHC.Tc.Errors.Types: MismatchedTyConAT :: !BootTyConMismatch -> BootATMismatch
+ GHC.Tc.Errors.Types: MissingBootDefinition :: MissingBootThing
+ GHC.Tc.Errors.Types: MissingBootExport :: MissingBootThing
+ GHC.Tc.Errors.Types: MissingBootInstance :: !DFunId -> BootMismatch
+ GHC.Tc.Errors.Types: MissingBootThing :: !Name -> !MissingBootThing -> BootMismatch
+ GHC.Tc.Errors.Types: MkSuperclassCycle :: Class -> Bool -> [SuperclassCycleDetail] -> SuperclassCycle
+ GHC.Tc.Errors.Types: MultiplePossibleParents :: (RecSelParent, RecSelParent, [RecSelParent]) -> BadRecordUpdateReason
+ GHC.Tc.Errors.Types: NFC_DerivedClassType :: NestedForallsContextsIn
+ GHC.Tc.Errors.Types: NFC_GadtConSig :: NestedForallsContextsIn
+ GHC.Tc.Errors.Types: NFC_InstanceHead :: NestedForallsContextsIn
+ GHC.Tc.Errors.Types: NFC_Specialize :: NestedForallsContextsIn
+ GHC.Tc.Errors.Types: NFC_StandaloneDerivedInstanceHead :: NestedForallsContextsIn
+ GHC.Tc.Errors.Types: NFC_ViaType :: NestedForallsContextsIn
+ GHC.Tc.Errors.Types: NestedTHBrackets :: THSyntaxError
+ GHC.Tc.Errors.Types: NewtypeDataConNotInScope :: !TyCon -> ![Type] -> TypeCannotBeMarshaledReason
+ GHC.Tc.Errors.Types: NoConstructorHasAllFields :: [FieldLabelString] -> BadRecordUpdateReason
+ GHC.Tc.Errors.Types: NoRolesAssociatedWithThing :: !TcTyThing -> THReifyError
+ GHC.Tc.Errors.Types: NonCanonicalMonad :: NonCanonical_Monad -> NonCanonicalDefinition
+ GHC.Tc.Errors.Types: NonCanonicalMonoid :: NonCanonical_Monoid -> NonCanonicalDefinition
+ GHC.Tc.Errors.Types: NonCanonical_Mappend :: NonCanonical_Monoid
+ GHC.Tc.Errors.Types: NonCanonical_Pure :: NonCanonical_Monad
+ GHC.Tc.Errors.Types: NonCanonical_Return :: NonCanonical_Monad
+ GHC.Tc.Errors.Types: NonCanonical_Sappend :: NonCanonical_Monoid
+ GHC.Tc.Errors.Types: NonCanonical_ThenA :: NonCanonical_Monad
+ GHC.Tc.Errors.Types: NonCanonical_ThenM :: NonCanonical_Monad
+ GHC.Tc.Errors.Types: NonExactName :: !RdrName -> THNameError
+ GHC.Tc.Errors.Types: NotABoxedMarshalableTyCon :: TypeCannotBeMarshaledReason
+ GHC.Tc.Errors.Types: NotADataType :: TypeCannotBeMarshaledReason
+ GHC.Tc.Errors.Types: NotAFamilyTyCon :: !TypeOrData -> !TyCon -> IllegalFamilyInstanceReason
+ GHC.Tc.Errors.Types: NotARecordField :: NotInScopeError
+ GHC.Tc.Errors.Types: NotAnOpenFamilyTyCon :: !TyCon -> IllegalFamilyInstanceReason
+ GHC.Tc.Errors.Types: NotBoxedKindAny :: TypeCannotBeMarshaledReason
+ GHC.Tc.Errors.Types: NotInScopeTc :: NameEnv TcTyThing -> NotInScopeError
+ GHC.Tc.Errors.Types: NotSimpleUnliftedType :: TypeCannotBeMarshaledReason
+ GHC.Tc.Errors.Types: OneArgExpected :: IllegalForeignTypeReason
+ GHC.Tc.Errors.Types: PatSynNotInvertible :: !Pat GhcRn -> PatSynInvalidRhsReason
+ GHC.Tc.Errors.Types: PatSynUnboundVar :: !Name -> PatSynInvalidRhsReason
+ GHC.Tc.Errors.Types: QuotedNameWrongStage :: !HsQuote GhcPs -> THNameError
+ GHC.Tc.Errors.Types: RecordFieldDecl :: !Name -> RecordFieldPart
+ GHC.Tc.Errors.Types: ReportCustomQuasiError :: !Bool -> !String -> THError
+ GHC.Tc.Errors.Types: RunSpliceFailure :: !RunSpliceFailReason -> SpliceFailReason
+ GHC.Tc.Errors.Types: SCD_HeadTyFam :: !PredType -> SuperclassCycleDetail
+ GHC.Tc.Errors.Types: SCD_HeadTyVar :: !PredType -> SuperclassCycleDetail
+ GHC.Tc.Errors.Types: SCD_Superclass :: !Class -> SuperclassCycleDetail
+ GHC.Tc.Errors.Types: SafeHaskellMustBeInIO :: IllegalForeignTypeReason
+ GHC.Tc.Errors.Types: SplicePolymorphicLocalVar :: !Id -> TypedTHError
+ GHC.Tc.Errors.Types: SpliceThrewException :: !SplicePhase -> !SomeException -> !String -> !LHsExpr GhcTc -> !Bool -> SpliceFailReason
+ GHC.Tc.Errors.Types: StageCheckInstance :: !InstanceWhat -> !PredType -> StageCheckReason
+ GHC.Tc.Errors.Types: StageCheckSplice :: !Name -> StageCheckReason
+ GHC.Tc.Errors.Types: SynAbsDataTySynNotNullary :: SynAbstractDataError
+ GHC.Tc.Errors.Types: SynAbstractData :: !SynAbstractDataError -> BootTyConMismatch
+ GHC.Tc.Errors.Types: SynAbstractDataInvalidRHS :: !NonEmpty Type -> SynAbstractDataError
+ GHC.Tc.Errors.Types: THNameError :: !THNameError -> THError
+ GHC.Tc.Errors.Types: THReifyError :: !THReifyError -> THError
+ GHC.Tc.Errors.Types: THSpliceFailed :: !SpliceFailReason -> THError
+ GHC.Tc.Errors.Types: THSyntaxError :: !THSyntaxError -> THError
+ GHC.Tc.Errors.Types: TcRnMessageOpts :: !Bool -> !IfaceMessageOpts -> TcRnMessageOpts
+ GHC.Tc.Errors.Types: TyConAxiomMismatch :: !BootListMismatches CoAxBranch BootAxiomBranchMismatch -> BootTyConMismatch
+ GHC.Tc.Errors.Types: TyConFlavourMismatch :: !FamTyConFlav -> !FamTyConFlav -> BootTyConMismatch
+ GHC.Tc.Errors.Types: TyConInjectivityMismatch :: BootTyConMismatch
+ GHC.Tc.Errors.Types: TyConKindMismatch :: BootTyConMismatch
+ GHC.Tc.Errors.Types: TyConMismatchedClasses :: !Class -> !Class -> !BootClassMismatch -> BootTyConMismatch
+ GHC.Tc.Errors.Types: TyConMismatchedData :: !AlgTyConRhs -> !AlgTyConRhs -> !BootDataMismatch -> BootTyConMismatch
+ GHC.Tc.Errors.Types: TyConRoleMismatch :: !Bool -> BootTyConMismatch
+ GHC.Tc.Errors.Types: TyConSynonymMismatch :: !Kind -> !Kind -> BootTyConMismatch
+ GHC.Tc.Errors.Types: TyConsVeryDifferent :: BootTyConMismatch
+ GHC.Tc.Errors.Types: TyFamNameMismatch :: !Name -> !Name -> IllegalFamilyInstanceReason
+ GHC.Tc.Errors.Types: TyFamsDisabledFamily :: !Name -> TyFamsDisabledReason
+ GHC.Tc.Errors.Types: TyFamsDisabledInstance :: !TyCon -> TyFamsDisabledReason
+ GHC.Tc.Errors.Types: TyVarMissingInEnv :: !TyVar -> RoleValidationFailedReason
+ GHC.Tc.Errors.Types: TyVarRoleMismatch :: !TyVar -> !Role -> RoleValidationFailedReason
+ GHC.Tc.Errors.Types: TypeApplication :: !HsType GhcPs -> !TypeOrKind -> TypeApplication
+ GHC.Tc.Errors.Types: TypeApplicationInPattern :: !HsConPatTyArg GhcPs -> TypeApplication
+ GHC.Tc.Errors.Types: TypeCannotBeMarshaled :: !Type -> TypeCannotBeMarshaledReason -> IllegalForeignTypeReason
+ GHC.Tc.Errors.Types: TypeVariablePE :: PromotionErr
+ GHC.Tc.Errors.Types: TypedTHError :: !TypedTHError -> THError
+ GHC.Tc.Errors.Types: TypedTHWithPolyType :: !TcType -> TypedTHError
+ GHC.Tc.Errors.Types: UnboundVariable :: RdrName -> NotInScopeError -> RuleLhsErrReason
+ GHC.Tc.Errors.Types: UnexpectedNestedForall :: IllegalForeignTypeReason
+ GHC.Tc.Errors.Types: UninfTyCtx_ClassContext :: [TcType] -> UninferrableTyVarCtx
+ GHC.Tc.Errors.Types: UninfTyCtx_DataContext :: [TcType] -> UninferrableTyVarCtx
+ GHC.Tc.Errors.Types: UninfTyCtx_ProvidedContext :: [TcType] -> UninferrableTyVarCtx
+ GHC.Tc.Errors.Types: UninfTyCtx_Sig :: TcType -> LHsSigType GhcRn -> UninferrableTyVarCtx
+ GHC.Tc.Errors.Types: UninfTyCtx_TyFamRhs :: TcType -> UninferrableTyVarCtx
+ GHC.Tc.Errors.Types: UninfTyCtx_TySynRhs :: TcType -> UninferrableTyVarCtx
+ GHC.Tc.Errors.Types: UnliftedFFITypesNeeded :: TypeCannotBeMarshaledReason
+ GHC.Tc.Errors.Types: UnsatisfiableError :: ErrorMsgType -> TcSolverReportMsg
+ GHC.Tc.Errors.Types: UnusedNameImported :: !ModuleName -> UnusedNameProv
+ GHC.Tc.Errors.Types: UnusedNameLocalBind :: UnusedNameProv
+ GHC.Tc.Errors.Types: UnusedNameMatch :: UnusedNameProv
+ GHC.Tc.Errors.Types: UnusedNameTopDecl :: UnusedNameProv
+ GHC.Tc.Errors.Types: UnusedNameTypePattern :: UnusedNameProv
+ GHC.Tc.Errors.Types: WrongThingAxiom :: WrongThingSort
+ GHC.Tc.Errors.Types: WrongThingClass :: WrongThingSort
+ GHC.Tc.Errors.Types: WrongThingConLike :: WrongThingSort
+ GHC.Tc.Errors.Types: WrongThingDataCon :: WrongThingSort
+ GHC.Tc.Errors.Types: WrongThingPatSyn :: WrongThingSort
+ GHC.Tc.Errors.Types: WrongThingTyCon :: WrongThingSort
+ GHC.Tc.Errors.Types: WrongThingType :: WrongThingSort
+ GHC.Tc.Errors.Types: [BackpackUnpackAbstractType] :: BadFieldAnnotationReason
+ GHC.Tc.Errors.Types: [ConstrainedClassMethodsDisabled] :: !Id -> !TcPredType -> DisabledClassExtension
+ GHC.Tc.Errors.Types: [FunDepsDisabled] :: DisabledClassExtension
+ GHC.Tc.Errors.Types: [ImportLookupAmbiguous] :: !RdrName -> ![GlobalRdrElt] -> ImportLookupReason
+ GHC.Tc.Errors.Types: [ImportLookupBad] :: BadImportKind -> ModIface -> ImpDeclSpec -> IE GhcPs -> Bool -> ImportLookupReason
+ GHC.Tc.Errors.Types: [ImportLookupIllegal] :: ImportLookupReason
+ GHC.Tc.Errors.Types: [ImportLookupQualified] :: !RdrName -> ImportLookupReason
+ GHC.Tc.Errors.Types: [LazyFieldsDisabled] :: BadFieldAnnotationReason
+ GHC.Tc.Errors.Types: [MultiParamDisabled] :: !Int -> DisabledClassExtension
+ GHC.Tc.Errors.Types: [NonStandardGuards] :: forall body. (Outputable body, Anno (Stmt GhcRn body) ~ SrcSpanAnnA) => [LStmtLR GhcRn GhcRn body] -> NonStandardGuards
+ GHC.Tc.Errors.Types: [TcRnAbstractClosedTyFamDecl] :: TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnAmbiguousFieldInUpdate] :: (GlobalRdrElt, GlobalRdrElt, [GlobalRdrElt]) -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnAmbiguousName] :: !GlobalRdrEnv -> !RdrName -> !NonEmpty GlobalRdrElt -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnAmbiguousRecordUpdate] :: HsExpr GhcRn -> TyCon -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnArityMismatch] :: !TyThing -> !Arity -> !Arity -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnBadFieldAnnotation] :: !Int -> !DataCon -> !BadFieldAnnotationReason -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnBadRecordUpdate] :: [RdrName] -> BadRecordUpdateReason -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnBadTyConTelescope] :: !TyCon -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnBadlyStaged] :: !StageCheckReason -> !Int -> !Int -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnBindMultipleVariables] :: HsDocContext -> LocatedN RdrName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnBindVarAlreadyInScope] :: [LocatedN RdrName] -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnBindingNameConflict] :: !RdrName -> !NonEmpty SrcSpan -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnBindingOfExistingName] :: RdrName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnBootMismatch] :: !HsBootOrSig -> !BootMismatch -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnCTupleTooLarge] :: !Int -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnCannotDefaultKindVar] :: !TyVar -> !Kind -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnCapturedTermName] :: RdrName -> Either [GlobalRdrElt] Name -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnClassExtensionDisabled] :: !Class -> !DisabledClassExtension -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnCommonFieldResultTypeMismatch] :: !DataCon -> !DataCon -> !FieldLabelString -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnCommonFieldTypeMismatch] :: !DataCon -> !DataCon -> !FieldLabelString -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnCompatUnqualifiedImport] :: !ImportDecl GhcPs -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDataConParentTypeMismatch] :: !DataCon -> !Type -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDataKindsError] :: TypeOrKind -> HsType GhcPs -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDefaultSigMismatch] :: !Id -> !Type -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDeprecatedInvisTyArgInConPat] :: TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDeprecatedModule] :: !ModuleName -> !WarningTxt GhcRn -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDifferentExportWarnings] :: !Name -> NonEmpty SrcSpan -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDuplicateDecls] :: !OccName -> !NonEmpty Name -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDuplicateFieldExport] :: (GlobalRdrElt, IE GhcPs) -> NonEmpty (GlobalRdrElt, IE GhcPs) -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDuplicateKindSig] :: NonEmpty (LStandaloneKindSig GhcPs) -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDuplicateMinimalSig] :: LSig GhcPs -> LSig GhcPs -> [LSig GhcPs] -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDuplicateRoleAnnot] :: NonEmpty (LRoleAnnotDecl GhcPs) -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDuplicateSigDecl] :: NonEmpty (LocatedN RdrName, Sig GhcPs) -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnEmptyCase] :: HsMatchContext GhcRn -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnEmptyDataDeclsDisabled] :: !Name -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnExistentialQuantificationDisabled] :: !DataCon -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnGADTDataContext] :: !Name -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnGADTsDisabled] :: !Name -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnGhciMonadLookupFail] :: String -> Maybe [GlobalRdrElt] -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnGhciUnliftedBind] :: !Id -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnHsigFixityMismatch] :: !TyThing -> !Fixity -> !Fixity -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnHsigMissingModuleExport] :: !OccName -> !UnitState -> !Module -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnHsigShapeMismatch] :: !HsigShapeMismatchReason -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalClassBinding] :: DeclSort -> HsBindLR GhcPs GhcPs -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalDataCon] :: !RdrName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalDerivStrategy] :: DerivStrategy GhcPs -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalHsBootOrSigDecl] :: !HsBootOrSig -> !BadBootDecls -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalInferredTyVars] :: !NonEmpty (HsTyVarBndr Specificity GhcPs) -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalInstance] :: IllegalInstanceReason -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalInvisTyVarBndr] :: !LHsTyVarBndr (HsBndrVis GhcRn) GhcRn -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalKindSignature] :: HsType GhcPs -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalKind] :: HsTypeOrSigType GhcPs -> Bool -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalMultipleDerivClauses] :: TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalPatternSynonymDecl] :: TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalQuasiQuotes] :: TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalRoleAnnotation] :: !RoleAnnotDecl GhcRn -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalRuleLhs] :: RuleLhsErrReason -> FastString -> LHsExpr GhcRn -> HsExpr GhcRn -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnImplicitImportOfPrelude] :: TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnImplicitRhsQuantification] :: LocatedN RdrName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnImportLookup] :: !ImportLookupReason -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnInaccessibleCoAxBranch] :: TyCon -> CoAxBranch -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIncoherentRoles] :: !TyCon -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIncompleteExportWarnings] :: !Name -> NonEmpty SrcSpan -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIncorrectTyVarOnLhsOfInjCond] :: IdP GhcRn -> LIdP GhcPs -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnInterfaceError] :: !IfaceMessage -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnInvalidInvisTyVarBndr] :: !Name -> !LHsTyVarBndr (HsBndrVis GhcRn) GhcRn -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnInvalidRecordField] :: !Name -> !FieldLabelString -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnInvalidWarningCategory] :: !WarningCategory -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnInvisBndrWithoutSig] :: !Name -> !LHsTyVarBndr (HsBndrVis GhcRn) GhcRn -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnKindSignaturesDisabled] :: !Either (HsType GhcPs) (Name, HsType GhcRn) -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnLookupInstance] :: !Class -> ![Type] -> !LookupInstanceErrReason -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnMisplacedSigDecl] :: Sig GhcRn -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnMissingMain] :: !Bool -> !Module -> !OccName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnMissingRoleAnnotation] :: Name -> [Role] -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnMultipleConForNewtype] :: !Name -> !Int -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnMultipleFixityDecls] :: SrcSpan -> RdrName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnNegativeNumTypeLiteral] :: HsType GhcPs -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnNestedForallsContexts] :: !NestedForallsContextsIn -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnNoDerivStratSpecified] :: Bool -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnNoExplicitImportList] :: !ModuleName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnNonCanonicalDefinition] :: !NonCanonicalDefinition -> !LHsSigType GhcRn -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnNonStdGuards] :: NonStandardGuards -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnOrphanCompletePragma] :: TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnPackageImportsDisabled] :: TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnPartialFieldSelector] :: !FieldLabel -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnPatSynArityMismatch] :: !Name -> !Arity -> !Arity -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnPatSynEscapedCoercion] :: !Id -> !NonEmpty CoVar -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnPatSynExistentialInResult] :: !Name -> !TcSigmaType -> ![TyVar] -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnPatSynInvalidRhs] :: !Name -> !LPat GhcRn -> ![LIdP GhcRn] -> !PatSynInvalidRhsReason -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnPatersonCondFailure] :: PatersonCondFailure -> PatersonCondFailureContext -> Type -> Type -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnPrecedenceParsingError] :: (OpName, Fixity) -> (OpName, Fixity) -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnQualifiedBinder] :: !RdrName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnRedundantRecordWildcard] :: TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnRedundantSourceImport] :: !ModuleName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnRoleAnnotationsDisabled] :: !TyCon -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnRoleCountMismatch] :: !Int -> !LRoleAnnotDecl GhcRn -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnRoleMismatch] :: !Name -> !Role -> !Role -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnRoleValidationFailed] :: !Role -> !RoleValidationFailedReason -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnSafeImportsDisabled] :: !ModuleName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnSectionPrecedenceError] :: (OpName, Fixity) -> (OpName, Fixity) -> HsExpr GhcPs -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnSelfImport] :: !ModuleName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnShadowedTyVarNameInFamResult] :: IdP GhcPs -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnSimplifiableConstraint] :: !PredType -> !InstanceWhat -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnSkolemEscape] :: ![TcTyVar] -> !TcTyVar -> !Type -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnSolverDepthError] :: !Type -> !SubGoalDepth -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnStageRestriction] :: !StageCheckReason -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnStupidThetaInGadt] :: HsDocContext -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnSuperclassCycle] :: !SuperclassCycle -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnTHError] :: THError -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnTermNameInType] :: RdrName -> [GhcHint] -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnTupleTooLarge] :: !Int -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnTyFamDepsDisabled] :: TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnTyFamResultDisabled] :: !Name -> !LHsTyVarBndr () GhcRn -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnTyFamsDisabled] :: !TyFamsDisabledReason -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnTyThingUsedWrong] :: !WrongThingSort -> !TcTyThing -> !Name -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnTypeApplicationsDisabled] :: !TypeApplication -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnTypeSynonymCycle] :: !TySynCycleTyCons -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnUnexpectedDefaultSig] :: Sig GhcPs -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnUnexpectedKindVar] :: RdrName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnUnexpectedPatSigType] :: HsPatSigType GhcPs -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnUnexpectedStandaloneDerivingDecl] :: TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnUnexpectedStandaloneKindSig] :: TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnUninferrableTyVar] :: ![TyCoVar] -> !UninferrableTyVarCtx -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnUnknownTyVarsOnRhsOfInjCond] :: [Name] -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnUnusedImport] :: !ImportDecl GhcRn -> !UnusedImportReason -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnUnusedName] :: !OccName -> !UnusedNameProv -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnUnusedQuantifiedTypeVar] :: HsDocContext -> HsTyVarBndrExistentialFlag -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnUnusedRecordWildcard] :: ![Name] -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnUnusedVariableInRuleDecl] :: FastString -> Name -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnZonkerMessage] :: ZonkerMessage -> TcRnMessage
+ GHC.Tc.Errors.Types: [UnpackWithoutStrictness] :: BadFieldAnnotationReason
+ GHC.Tc.Errors.Types: [UnusedImportNameRecField] :: !Parent -> !OccName -> UnusedImportName
+ GHC.Tc.Errors.Types: [UnusedImportNameRegular] :: !Name -> UnusedImportName
+ GHC.Tc.Errors.Types: [UnusedImportNone] :: UnusedImportReason
+ GHC.Tc.Errors.Types: [UnusedImportSome] :: ![UnusedImportName] -> UnusedImportReason
+ GHC.Tc.Errors.Types: [ZonkerCannotDefaultConcrete] :: !FixedRuntimeRepOrigin -> ZonkerMessage
+ GHC.Tc.Errors.Types: [alsoFailedLICC] :: FailedCoverageCondition -> !Bool
+ GHC.Tc.Errors.Types: [cls] :: SuperclassCycle -> Class
+ GHC.Tc.Errors.Types: [conflictingFields] :: BadRecordUpdateReason -> [FieldLabelString]
+ GHC.Tc.Errors.Types: [definite] :: SuperclassCycle -> Bool
+ GHC.Tc.Errors.Types: [ea_actual] :: ExpectedActualInfo -> Type
+ GHC.Tc.Errors.Types: [ea_expanded_actual] :: ExpectedActualInfo -> Type
+ GHC.Tc.Errors.Types: [ea_expanded_expected] :: ExpectedActualInfo -> Type
+ GHC.Tc.Errors.Types: [ea_expected] :: ExpectedActualInfo -> Type
+ GHC.Tc.Errors.Types: [not_covered_fundep] :: CoverageProblem -> ([TyVar], [TyVar])
+ GHC.Tc.Errors.Types: [not_covered_fundep_inst] :: CoverageProblem -> ([Type], [Type])
+ GHC.Tc.Errors.Types: [not_covered_invis_vis_tvs] :: CoverageProblem -> Pair VarSet
+ GHC.Tc.Errors.Types: [not_covered_liberal] :: CoverageProblem -> FailedCoverageCondition
+ GHC.Tc.Errors.Types: [reasons] :: SuperclassCycle -> [SuperclassCycleDetail]
+ GHC.Tc.Errors.Types: [showMatches] :: HoleFitDispConfig -> Bool
+ GHC.Tc.Errors.Types: [showProv] :: HoleFitDispConfig -> Bool
+ GHC.Tc.Errors.Types: [showType] :: HoleFitDispConfig -> Bool
+ GHC.Tc.Errors.Types: [showWrapVars] :: HoleFitDispConfig -> Bool
+ GHC.Tc.Errors.Types: [showWrap] :: HoleFitDispConfig -> Bool
+ GHC.Tc.Errors.Types: [tcOptsIfaceOpts] :: TcRnMessageOpts -> !IfaceMessageOpts
+ GHC.Tc.Errors.Types: [tcOptsShowContext] :: TcRnMessageOpts -> !Bool
+ GHC.Tc.Errors.Types: data AddTopDeclsError
+ GHC.Tc.Errors.Types: data AssocDefaultBadArgs
+ GHC.Tc.Errors.Types: data BadBootDecls
+ GHC.Tc.Errors.Types: data BadFieldAnnotationReason
+ GHC.Tc.Errors.Types: data BadImportKind
+ GHC.Tc.Errors.Types: data BadRecordUpdateReason
+ GHC.Tc.Errors.Types: data BootATMismatch
+ GHC.Tc.Errors.Types: data BootAxiomBranchMismatch
+ GHC.Tc.Errors.Types: data BootClassMismatch
+ GHC.Tc.Errors.Types: data BootDataConMismatch
+ GHC.Tc.Errors.Types: data BootDataMismatch
+ GHC.Tc.Errors.Types: data BootListMismatch item err
+ GHC.Tc.Errors.Types: data BootMethodMismatch
+ GHC.Tc.Errors.Types: data BootMismatch
+ GHC.Tc.Errors.Types: data BootMismatchWhat
+ GHC.Tc.Errors.Types: data BootTyConMismatch
+ GHC.Tc.Errors.Types: data CoverageProblem
+ GHC.Tc.Errors.Types: data DeclSort
+ GHC.Tc.Errors.Types: data DisabledClassExtension
+ GHC.Tc.Errors.Types: data DodgyImportsReason
+ GHC.Tc.Errors.Types: data FailedCoverageCondition
+ GHC.Tc.Errors.Types: data HsTyVarBndrExistentialFlag
+ GHC.Tc.Errors.Types: data HsTypeOrSigType p
+ GHC.Tc.Errors.Types: data HsigShapeMismatchReason
+ GHC.Tc.Errors.Types: data IllegalClassInstanceReason
+ GHC.Tc.Errors.Types: data IllegalFamilyInstanceReason
+ GHC.Tc.Errors.Types: data IllegalForeignTypeReason
+ GHC.Tc.Errors.Types: data IllegalHasFieldInstance
+ GHC.Tc.Errors.Types: data IllegalInstanceHeadReason
+ GHC.Tc.Errors.Types: data IllegalInstanceReason
+ GHC.Tc.Errors.Types: data ImportLookupReason
+ GHC.Tc.Errors.Types: data InvalidAssoc
+ GHC.Tc.Errors.Types: data InvalidAssocDefault
+ GHC.Tc.Errors.Types: data InvalidAssocInstance
+ GHC.Tc.Errors.Types: data MissingBootThing
+ GHC.Tc.Errors.Types: data NestedForallsContextsIn
+ GHC.Tc.Errors.Types: data NonCanonicalDefinition
+ GHC.Tc.Errors.Types: data NonCanonical_Monad
+ GHC.Tc.Errors.Types: data NonCanonical_Monoid
+ GHC.Tc.Errors.Types: data NonStandardGuards
+ GHC.Tc.Errors.Types: data PatSynInvalidRhsReason
+ GHC.Tc.Errors.Types: data RoleValidationFailedReason
+ GHC.Tc.Errors.Types: data RuleLhsErrReason
+ GHC.Tc.Errors.Types: data SpliceFailReason
+ GHC.Tc.Errors.Types: data StageCheckReason
+ GHC.Tc.Errors.Types: data SuperclassCycle
+ GHC.Tc.Errors.Types: data SuperclassCycleDetail
+ GHC.Tc.Errors.Types: data SynAbstractDataError
+ GHC.Tc.Errors.Types: data THError
+ GHC.Tc.Errors.Types: data THNameError
+ GHC.Tc.Errors.Types: data THReifyError
+ GHC.Tc.Errors.Types: data THSyntaxError
+ GHC.Tc.Errors.Types: data TcRnMessageOpts
+ GHC.Tc.Errors.Types: data TyFamsDisabledReason
+ GHC.Tc.Errors.Types: data TypeApplication
+ GHC.Tc.Errors.Types: data TypeCannotBeMarshaledReason
+ GHC.Tc.Errors.Types: data TypedTHError
+ GHC.Tc.Errors.Types: data UninferrableTyVarCtx
+ GHC.Tc.Errors.Types: data UnusedImportName
+ GHC.Tc.Errors.Types: data UnusedImportReason
+ GHC.Tc.Errors.Types: data UnusedNameProv
+ GHC.Tc.Errors.Types: data WrongThingSort
+ GHC.Tc.Errors.Types: data ZonkerMessage
+ GHC.Tc.Errors.Types: instance GHC.Classes.Eq GHC.Tc.Errors.Types.Exported
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.AddTopDeclsError
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.AssocDefaultBadArgs
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.BadFieldAnnotationReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.BadImportKind
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.BadRecordUpdateReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.BootMismatch
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.BootMismatchWhat
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.DisabledClassExtension
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.DodgyImportsReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.HsigShapeMismatchReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.IllegalClassInstanceReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.IllegalFamilyInstanceReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.IllegalForeignTypeReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.IllegalHasFieldInstance
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.IllegalInstanceHeadReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.IllegalInstanceReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.ImportLookupReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.InvalidAssoc
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.InvalidAssocDefault
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.InvalidAssocInstance
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.MissingBootThing
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.NonCanonicalDefinition
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.PatSynInvalidRhsReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.RoleValidationFailedReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.SpliceFailReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.THError
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.THNameError
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.THReifyError
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.THSyntaxError
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.TyFamsDisabledReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.TypeApplication
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.TypeCannotBeMarshaledReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.TypedTHError
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.UnusedImportReason
+ GHC.Tc.Errors.Types: instance GHC.Generics.Generic GHC.Tc.Errors.Types.ZonkerMessage
+ GHC.Tc.Errors.Types: instance GHC.Hs.Extension.OutputableBndrId p => GHC.Utils.Outputable.Outputable (GHC.Tc.Errors.Types.HsTypeOrSigType (GHC.Hs.Extension.GhcPass p))
+ GHC.Tc.Errors.Types: instance GHC.Utils.Outputable.Outputable GHC.Tc.Errors.Types.HsTyVarBndrExistentialFlag
+ GHC.Tc.Errors.Types: missingBootThing :: HsBootOrSig -> Name -> MissingBootThing -> TcRnMessage
+ GHC.Tc.Errors.Types: type BootListMismatches item err = NonEmpty BootListMismatch item err
+ GHC.Tc.Errors.Types: type TySynCycleTyCons = [Either TyCon LTyClDecl GhcRn]
+ GHC.Tc.Errors.Types.PromotionErr: ClassPE :: PromotionErr
+ GHC.Tc.Errors.Types.PromotionErr: ConstrainedDataConPE :: ThetaType -> PromotionErr
+ GHC.Tc.Errors.Types.PromotionErr: FamDataConPE :: PromotionErr
+ GHC.Tc.Errors.Types.PromotionErr: NoDataKindsDC :: PromotionErr
+ GHC.Tc.Errors.Types.PromotionErr: PatSynPE :: PromotionErr
+ GHC.Tc.Errors.Types.PromotionErr: RecDataConPE :: PromotionErr
+ GHC.Tc.Errors.Types.PromotionErr: TermVariablePE :: PromotionErr
+ GHC.Tc.Errors.Types.PromotionErr: TyConPE :: PromotionErr
+ GHC.Tc.Errors.Types.PromotionErr: TypeVariablePE :: PromotionErr
+ GHC.Tc.Errors.Types.PromotionErr: data PromotionErr
+ GHC.Tc.Errors.Types.PromotionErr: instance GHC.Generics.Generic GHC.Tc.Errors.Types.PromotionErr.PromotionErr
+ GHC.Tc.Errors.Types.PromotionErr: instance GHC.Utils.Outputable.Outputable GHC.Tc.Errors.Types.PromotionErr.PromotionErr
+ GHC.Tc.Errors.Types.PromotionErr: peCategory :: PromotionErr -> String
+ GHC.Tc.Errors.Types.PromotionErr: pprPECategory :: PromotionErr -> SDoc
+ GHC.Tc.Gen.Export: classifyGREs :: [GlobalRdrElt] -> ([GlobalRdrElt], [FieldGlobalRdrElt])
+ GHC.Tc.Gen.Match: type TcStmtChecker (body :: Type -> Type) rho_type = forall thing. () => HsStmtContext GhcTc -> Stmt GhcRn LocatedA body GhcRn -> rho_type -> rho_type -> TcM thing -> TcM (Stmt GhcTc LocatedA body GhcTc, thing)
+ GHC.Tc.Gen.Splice: instance GHC.Tc.Gen.Splice.ReifyFlag GHC.Core.TyCon.TyConBndrVis (GHC.Maybe.Maybe Language.Haskell.TH.Syntax.BndrVis)
+ GHC.Tc.Instance.Class: [cir_canonical] :: ClsInstResult -> Canonical
+ GHC.Tc.Instance.Class: matchEqualityInst :: Class -> [Type] -> (DataCon, Role, Type, Type)
+ GHC.Tc.Solver.Dict: checkInstanceOK :: CtLoc -> InstanceWhat -> TcPredType -> TcS CtLoc
+ GHC.Tc.Solver.Dict: chooseInstance :: CtEvidence -> ClsInstResult -> TcS (StopOrContinue a)
+ GHC.Tc.Solver.Dict: makeSuperClasses :: [Ct] -> TcS [Ct]
+ GHC.Tc.Solver.Dict: matchLocalInst :: TcPredType -> CtLoc -> TcS ClsInstResult
+ GHC.Tc.Solver.Dict: mkStrictSuperClasses :: ExpansionFuel -> CtEvidence -> [TyVar] -> ThetaType -> Class -> [Type] -> TcS [Ct]
+ GHC.Tc.Solver.Dict: solveCallStack :: CtEvidence -> EvCallStack -> TcS ()
+ GHC.Tc.Solver.Dict: solveDict :: DictCt -> SolverStage Void
+ GHC.Tc.Solver.Dict: solveDictNC :: CtEvidence -> Class -> [Type] -> SolverStage Void
+ GHC.Tc.Solver.Equality: solveEquality :: CtEvidence -> EqRel -> Type -> Type -> SolverStage Void
+ GHC.Tc.Solver.InertSet: KOAfterAdding :: CanEqLHS -> KickOutSpec
+ GHC.Tc.Solver.InertSet: KOAfterUnify :: TcTyVarSet -> KickOutSpec
+ GHC.Tc.Solver.InertSet: KeepInert :: InteractResult
+ GHC.Tc.Solver.InertSet: KeepWork :: InteractResult
+ GHC.Tc.Solver.InertSet: [wl_rw_eqs] :: WorkList -> [Ct]
+ GHC.Tc.Solver.InertSet: addCycleBreakerBindings :: Bag (TcTyVar, Type) -> InertSet -> InertSet
+ GHC.Tc.Solver.InertSet: addDict :: DictCt -> DictMap DictCt -> DictMap DictCt
+ GHC.Tc.Solver.InertSet: addEqToCans :: TcLevel -> EqCt -> InertCans -> InertCans
+ GHC.Tc.Solver.InertSet: addIrred :: IrredCt -> InertIrreds -> InertIrreds
+ GHC.Tc.Solver.InertSet: addIrredToCans :: TcLevel -> IrredCt -> InertCans -> InertCans
+ GHC.Tc.Solver.InertSet: addIrreds :: [IrredCt] -> InertIrreds -> InertIrreds
+ GHC.Tc.Solver.InertSet: addSolvedDict :: DictCt -> DictMap DictCt -> DictMap DictCt
+ GHC.Tc.Solver.InertSet: data InteractResult
+ GHC.Tc.Solver.InertSet: data KickOutSpec
+ GHC.Tc.Solver.InertSet: delDict :: DictCt -> DictMap a -> DictMap a
+ GHC.Tc.Solver.InertSet: delIrred :: IrredCt -> InertCans -> InertCans
+ GHC.Tc.Solver.InertSet: extendWorkListCtList :: [Ct] -> WorkList -> WorkList
+ GHC.Tc.Solver.InertSet: extendWorkListEqs :: RewriterSet -> Bag Ct -> WorkList -> WorkList
+ GHC.Tc.Solver.InertSet: filterDicts :: (DictCt -> Bool) -> DictMap DictCt -> DictMap DictCt
+ GHC.Tc.Solver.InertSet: findMatchingIrreds :: InertIrreds -> CtEvidence -> (Bag (IrredCt, SwapFlag), InertIrreds)
+ GHC.Tc.Solver.InertSet: foldFunEqs :: (EqCt -> b -> b) -> FunEqMap EqualCtList -> b -> b
+ GHC.Tc.Solver.InertSet: foldIrreds :: (IrredCt -> b -> b) -> InertIrreds -> b -> b
+ GHC.Tc.Solver.InertSet: instance GHC.Utils.Outputable.Outputable GHC.Tc.Solver.InertSet.InteractResult
+ GHC.Tc.Solver.InertSet: partitionDicts :: (DictCt -> Bool) -> DictMap DictCt -> (Bag DictCt, DictMap DictCt)
+ GHC.Tc.Solver.InertSet: solveOneFromTheOther :: Ct -> Ct -> InteractResult
+ GHC.Tc.Solver.InertSet: type InertIrreds = Bag IrredCt
+ GHC.Tc.Solver.InertSet: updDicts :: (DictMap DictCt -> DictMap DictCt) -> InertCans -> InertCans
+ GHC.Tc.Solver.InertSet: updGivenEqs :: TcLevel -> Ct -> InertCans -> InertCans
+ GHC.Tc.Solver.InertSet: updIrreds :: (InertIrreds -> InertIrreds) -> InertCans -> InertCans
+ GHC.Tc.Solver.Irred: solveIrred :: IrredCt -> SolverStage Void
+ GHC.Tc.Solver.Monad: ContinueWith :: !a -> StopOrContinue a
+ GHC.Tc.Solver.Monad: Stage :: TcS (StopOrContinue a) -> SolverStage a
+ GHC.Tc.Solver.Monad: StartAgain :: Ct -> StopOrContinue a
+ GHC.Tc.Solver.Monad: Stop :: CtEvidence -> SDoc -> StopOrContinue a
+ GHC.Tc.Solver.Monad: [cir_canonical] :: ClsInstResult -> Canonical
+ GHC.Tc.Solver.Monad: [runSolverStage] :: SolverStage a -> TcS (StopOrContinue a)
+ GHC.Tc.Solver.Monad: checkTouchableTyVarEq :: CtEvidence -> TcTyVar -> TcType -> TcS (PuResult () Reduction)
+ GHC.Tc.Solver.Monad: checkTypeEq :: CtEvidence -> EqRel -> CanEqLHS -> TcType -> TcS (PuResult () Reduction)
+ GHC.Tc.Solver.Monad: continueWith :: a -> TcS (StopOrContinue a)
+ GHC.Tc.Solver.Monad: data StopOrContinue a
+ GHC.Tc.Solver.Monad: emitFunDepWanteds :: CtEvidence -> [FunDepEqn (CtLoc, RewriterSet)] -> TcS Bool
+ GHC.Tc.Solver.Monad: emitNewGivens :: CtLoc -> [(Role, TcType, TcType, TcCoercion)] -> TcS ()
+ GHC.Tc.Solver.Monad: getInertSet :: TcS InertSet
+ GHC.Tc.Solver.Monad: instance GHC.Base.Applicative GHC.Tc.Solver.Monad.SolverStage
+ GHC.Tc.Solver.Monad: instance GHC.Base.Functor GHC.Tc.Solver.Monad.SolverStage
+ GHC.Tc.Solver.Monad: instance GHC.Base.Functor GHC.Tc.Solver.Monad.StopOrContinue
+ GHC.Tc.Solver.Monad: instance GHC.Base.Monad GHC.Tc.Solver.Monad.SolverStage
+ GHC.Tc.Solver.Monad: instance GHC.Driver.DynFlags.HasDynFlags GHC.Tc.Solver.Monad.TcS
+ GHC.Tc.Solver.Monad: instance GHC.Utils.Outputable.Outputable a => GHC.Utils.Outputable.Outputable (GHC.Tc.Solver.Monad.StopOrContinue a)
+ GHC.Tc.Solver.Monad: kickOutRewritable :: KickOutSpec -> CtFlavourRole -> TcS ()
+ GHC.Tc.Solver.Monad: newtype SolverStage a
+ GHC.Tc.Solver.Monad: setInertSet :: InertSet -> TcS ()
+ GHC.Tc.Solver.Monad: setSrcSpan :: RealSrcSpan -> TcS a -> TcS a
+ GHC.Tc.Solver.Monad: simpleStage :: TcS a -> SolverStage a
+ GHC.Tc.Solver.Monad: startAgainWith :: Ct -> TcS (StopOrContinue a)
+ GHC.Tc.Solver.Monad: stopWith :: CtEvidence -> String -> TcS (StopOrContinue a)
+ GHC.Tc.Solver.Monad: stopWithStage :: CtEvidence -> String -> SolverStage a
+ GHC.Tc.Solver.Monad: tcLookupTyCon :: Name -> TcS TyCon
+ GHC.Tc.Solver.Monad: touchabilityAndShapeTest :: TcLevel -> TcTyVar -> TcType -> Bool
+ GHC.Tc.Solver.Monad: tryEarlyAbortTcS :: TcS ()
+ GHC.Tc.Solver.Monad: uPairsTcM :: UnifyEnv -> [TypeEqn] -> TcM ()
+ GHC.Tc.Solver.Monad: unifyFunDeps :: CtEvidence -> Role -> (UnifyEnv -> TcM ()) -> TcS Bool
+ GHC.Tc.Solver.Monad: updInertSet :: (InertSet -> InertSet) -> TcS ()
+ GHC.Tc.Solver.Monad: updSolvedDicts :: InstanceWhat -> DictCt -> TcS ()
+ GHC.Tc.Solver.Monad: wrapUnifierTcS :: CtEvidence -> Role -> (UnifyEnv -> TcM a) -> TcS (a, Bag Ct, [TcTyVar])
+ GHC.Tc.Solver.Rewrite: instance GHC.Driver.DynFlags.HasDynFlags GHC.Tc.Solver.Rewrite.RewriteM
+ GHC.Tc.Solver.Solve: solveSimpleGivens :: [Ct] -> TcS ()
+ GHC.Tc.Solver.Solve: solveSimpleWanteds :: Cts -> TcS WantedConstraints
+ GHC.Tc.Solver.Types: delTcApp :: TcAppMap a -> TyCon -> [Type] -> TcAppMap a
+ GHC.Tc.Solver.Types: findDictsByTyConKey :: DictMap a -> Unique -> Bag a
+ GHC.Tc.Types: IsBracket :: SpliceOrBracket
+ GHC.Tc.Types: IsSplice :: SpliceOrBracket
+ GHC.Tc.Types: TcLclCtxt :: RealSrcSpan -> [ErrCtxt] -> Bool -> TcLevel -> TcBinderStack -> LocalRdrEnv -> ThStage -> ThBindEnv -> ArrowCtxt -> TcTypeEnv -> TcLclCtxt
+ GHC.Tc.Types: TypeVariablePE :: PromotionErr
+ GHC.Tc.Types: [env_um] :: Env gbl lcl -> {-# UNPACK #-} !Char
+ GHC.Tc.Types: [tcl_lcl_ctxt] :: TcLclEnv -> !TcLclCtxt
+ GHC.Tc.Types: data SpliceOrBracket
+ GHC.Tc.Types: data TcLclCtxt
+ GHC.Tc.Types: instance GHC.Driver.DynFlags.ContainsDynFlags (GHC.Tc.Types.Env gbl lcl)
+ GHC.Tc.Types: modifyLclCtxt :: (TcLclCtxt -> TcLclCtxt) -> TcLclEnv -> TcLclEnv
+ GHC.Tc.Types.BasicTypes: AGlobal :: TyThing -> TcTyThing
+ GHC.Tc.Types.BasicTypes: APromotionErr :: PromotionErr -> TcTyThing
+ GHC.Tc.Types.BasicTypes: ATcId :: Id -> IdBindingInfo -> TcTyThing
+ GHC.Tc.Types.BasicTypes: ATcTyCon :: TyCon -> TcTyThing
+ GHC.Tc.Types.BasicTypes: ATyVar :: Name -> TcTyVar -> TcTyThing
+ GHC.Tc.Types.BasicTypes: ClosedLet :: IdBindingInfo
+ GHC.Tc.Types.BasicTypes: CompleteSig :: TcId -> UserTypeCtxt -> SrcSpan -> TcIdSigInfo
+ GHC.Tc.Types.BasicTypes: IsGroupClosed :: NameEnv RhsNames -> ClosedTypeId -> IsGroupClosed
+ GHC.Tc.Types.BasicTypes: NonClosedLet :: RhsNames -> ClosedTypeId -> IdBindingInfo
+ GHC.Tc.Types.BasicTypes: NotLetBound :: IdBindingInfo
+ GHC.Tc.Types.BasicTypes: PartialSig :: Name -> LHsSigWcType GhcRn -> UserTypeCtxt -> SrcSpan -> TcIdSigInfo
+ GHC.Tc.Types.BasicTypes: TISI :: TcIdSigInfo -> [(Name, InvisTVBinder)] -> TcThetaType -> TcSigmaType -> [(Name, TcTyVar)] -> Maybe TcType -> TcIdSigInst
+ GHC.Tc.Types.BasicTypes: TPSI :: Name -> [InvisTVBinder] -> [InvisTVBinder] -> TcThetaType -> [InvisTVBinder] -> TcThetaType -> TcSigmaType -> TcPatSynInfo
+ GHC.Tc.Types.BasicTypes: TcIdBndr :: TcId -> TopLevelFlag -> TcBinder
+ GHC.Tc.Types.BasicTypes: TcIdBndr_ExpType :: Name -> ExpType -> TopLevelFlag -> TcBinder
+ GHC.Tc.Types.BasicTypes: TcIdSig :: TcIdSigInfo -> TcSigInfo
+ GHC.Tc.Types.BasicTypes: TcPatSynSig :: TcPatSynInfo -> TcSigInfo
+ GHC.Tc.Types.BasicTypes: TcTvBndr :: Name -> TyVar -> TcBinder
+ GHC.Tc.Types.BasicTypes: [patsig_body_ty] :: TcPatSynInfo -> TcSigmaType
+ GHC.Tc.Types.BasicTypes: [patsig_ex_bndrs] :: TcPatSynInfo -> [InvisTVBinder]
+ GHC.Tc.Types.BasicTypes: [patsig_implicit_bndrs] :: TcPatSynInfo -> [InvisTVBinder]
+ GHC.Tc.Types.BasicTypes: [patsig_name] :: TcPatSynInfo -> Name
+ GHC.Tc.Types.BasicTypes: [patsig_prov] :: TcPatSynInfo -> TcThetaType
+ GHC.Tc.Types.BasicTypes: [patsig_req] :: TcPatSynInfo -> TcThetaType
+ GHC.Tc.Types.BasicTypes: [patsig_univ_bndrs] :: TcPatSynInfo -> [InvisTVBinder]
+ GHC.Tc.Types.BasicTypes: [psig_hs_ty] :: TcIdSigInfo -> LHsSigWcType GhcRn
+ GHC.Tc.Types.BasicTypes: [psig_name] :: TcIdSigInfo -> Name
+ GHC.Tc.Types.BasicTypes: [sig_bndr] :: TcIdSigInfo -> TcId
+ GHC.Tc.Types.BasicTypes: [sig_ctxt] :: TcIdSigInfo -> UserTypeCtxt
+ GHC.Tc.Types.BasicTypes: [sig_inst_sig] :: TcIdSigInst -> TcIdSigInfo
+ GHC.Tc.Types.BasicTypes: [sig_inst_skols] :: TcIdSigInst -> [(Name, InvisTVBinder)]
+ GHC.Tc.Types.BasicTypes: [sig_inst_tau] :: TcIdSigInst -> TcSigmaType
+ GHC.Tc.Types.BasicTypes: [sig_inst_theta] :: TcIdSigInst -> TcThetaType
+ GHC.Tc.Types.BasicTypes: [sig_inst_wcs] :: TcIdSigInst -> [(Name, TcTyVar)]
+ GHC.Tc.Types.BasicTypes: [sig_inst_wcx] :: TcIdSigInst -> Maybe TcType
+ GHC.Tc.Types.BasicTypes: [sig_loc] :: TcIdSigInfo -> SrcSpan
+ GHC.Tc.Types.BasicTypes: [tct_id] :: TcTyThing -> Id
+ GHC.Tc.Types.BasicTypes: [tct_info] :: TcTyThing -> IdBindingInfo
+ GHC.Tc.Types.BasicTypes: data IdBindingInfo
+ GHC.Tc.Types.BasicTypes: data IsGroupClosed
+ GHC.Tc.Types.BasicTypes: data TcBinder
+ GHC.Tc.Types.BasicTypes: data TcIdSigInfo
+ GHC.Tc.Types.BasicTypes: data TcIdSigInst
+ GHC.Tc.Types.BasicTypes: data TcPatSynInfo
+ GHC.Tc.Types.BasicTypes: data TcSigInfo
+ GHC.Tc.Types.BasicTypes: data TcTyThing
+ GHC.Tc.Types.BasicTypes: hasCompleteSig :: TcSigFun -> Name -> Bool
+ GHC.Tc.Types.BasicTypes: instance GHC.Types.Name.Occurrence.HasOccName GHC.Tc.Types.BasicTypes.TcBinder
+ GHC.Tc.Types.BasicTypes: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.BasicTypes.IdBindingInfo
+ GHC.Tc.Types.BasicTypes: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.BasicTypes.TcBinder
+ GHC.Tc.Types.BasicTypes: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.BasicTypes.TcIdSigInfo
+ GHC.Tc.Types.BasicTypes: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.BasicTypes.TcIdSigInst
+ GHC.Tc.Types.BasicTypes: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.BasicTypes.TcPatSynInfo
+ GHC.Tc.Types.BasicTypes: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.BasicTypes.TcSigInfo
+ GHC.Tc.Types.BasicTypes: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.BasicTypes.TcTyThing
+ GHC.Tc.Types.BasicTypes: isPartialSig :: TcIdSigInst -> Bool
+ GHC.Tc.Types.BasicTypes: pprTcTyThingCategory :: TcTyThing -> SDoc
+ GHC.Tc.Types.BasicTypes: tcTyThingCategory :: TcTyThing -> String
+ GHC.Tc.Types.BasicTypes: tcTyThingTyCon_maybe :: TcTyThing -> Maybe TyCon
+ GHC.Tc.Types.BasicTypes: type ClosedTypeId = Bool
+ GHC.Tc.Types.BasicTypes: type RhsNames = NameSet
+ GHC.Tc.Types.BasicTypes: type TcBinderStack = [TcBinder]
+ GHC.Tc.Types.BasicTypes: type TcId = Id
+ GHC.Tc.Types.BasicTypes: type TcSigFun = Name -> Maybe TcSigInfo
+ GHC.Tc.Types.Constraint: CtLocEnv :: ![ErrCtxt] -> !RealSrcSpan -> !TcBinderStack -> !TcLevel -> !Bool -> !LocalRdrEnv -> CtLocEnv
+ GHC.Tc.Types.Constraint: DictCt :: CtEvidence -> Class -> [Xi] -> ExpansionFuel -> DictCt
+ GHC.Tc.Types.Constraint: EqCt :: CtEvidence -> CanEqLHS -> Xi -> EqRel -> EqCt
+ GHC.Tc.Types.Constraint: IrredCt :: CtEvidence -> CtIrredReason -> IrredCt
+ GHC.Tc.Types.Constraint: PluginReason :: CtIrredReason
+ GHC.Tc.Types.Constraint: [ctl_bndrs] :: CtLocEnv -> !TcBinderStack
+ GHC.Tc.Types.Constraint: [ctl_ctxt] :: CtLocEnv -> ![ErrCtxt]
+ GHC.Tc.Types.Constraint: [ctl_in_gen_code] :: CtLocEnv -> !Bool
+ GHC.Tc.Types.Constraint: [ctl_loc] :: CtLocEnv -> !RealSrcSpan
+ GHC.Tc.Types.Constraint: [ctl_rdr] :: CtLocEnv -> !LocalRdrEnv
+ GHC.Tc.Types.Constraint: [ctl_tclvl] :: CtLocEnv -> !TcLevel
+ GHC.Tc.Types.Constraint: [di_cls] :: DictCt -> Class
+ GHC.Tc.Types.Constraint: [di_ev] :: DictCt -> CtEvidence
+ GHC.Tc.Types.Constraint: [di_pend_sc] :: DictCt -> ExpansionFuel
+ GHC.Tc.Types.Constraint: [di_tys] :: DictCt -> [Xi]
+ GHC.Tc.Types.Constraint: [eq_eq_rel] :: EqCt -> EqRel
+ GHC.Tc.Types.Constraint: [eq_ev] :: EqCt -> CtEvidence
+ GHC.Tc.Types.Constraint: [eq_lhs] :: EqCt -> CanEqLHS
+ GHC.Tc.Types.Constraint: [eq_rhs] :: EqCt -> Xi
+ GHC.Tc.Types.Constraint: [ir_ev] :: IrredCt -> CtEvidence
+ GHC.Tc.Types.Constraint: [ir_reason] :: IrredCt -> CtIrredReason
+ GHC.Tc.Types.Constraint: addRewriter :: RewriterSet -> CoercionHole -> RewriterSet
+ GHC.Tc.Types.Constraint: adjustCtLoc :: Bool -> Bool -> CtLoc -> CtLoc
+ GHC.Tc.Types.Constraint: adjustCtLocTyConBinder :: TyConBinder -> CtLoc -> CtLoc
+ GHC.Tc.Types.Constraint: arisesFromGivens :: Ct -> Bool
+ GHC.Tc.Types.Constraint: assertFuelPrecondition :: ExpansionFuel -> a -> a
+ GHC.Tc.Types.Constraint: assertFuelPreconditionStrict :: ExpansionFuel -> a -> a
+ GHC.Tc.Types.Constraint: canTyFamEqLHS_maybe :: Xi -> Maybe CanEqLHS
+ GHC.Tc.Types.Constraint: consumeFuel :: ExpansionFuel -> ExpansionFuel
+ GHC.Tc.Types.Constraint: containsUserTypeError :: PredType -> Bool
+ GHC.Tc.Types.Constraint: ctIrredCt :: CtIrredReason -> Ct -> IrredCt
+ GHC.Tc.Types.Constraint: ctLocEnvInGeneratedCode :: CtLocEnv -> Bool
+ GHC.Tc.Types.Constraint: cteCoercionHole :: CheckTyEqProblem
+ GHC.Tc.Types.Constraint: cteConcrete :: CheckTyEqProblem
+ GHC.Tc.Types.Constraint: cteSkolemEscape :: CheckTyEqProblem
+ GHC.Tc.Types.Constraint: cterHasOnlyProblems :: CheckTyEqResult -> CheckTyEqResult -> Bool
+ GHC.Tc.Types.Constraint: ctsPreds :: Cts -> [PredType]
+ GHC.Tc.Types.Constraint: data CtLocEnv
+ GHC.Tc.Types.Constraint: data DictCt
+ GHC.Tc.Types.Constraint: data EqCt
+ GHC.Tc.Types.Constraint: data IrredCt
+ GHC.Tc.Types.Constraint: dictCtEvidence :: DictCt -> CtEvidence
+ GHC.Tc.Types.Constraint: doNotExpand :: ExpansionFuel
+ GHC.Tc.Types.Constraint: eqCtEvidence :: EqCt -> CtEvidence
+ GHC.Tc.Types.Constraint: eqCtFlavourRole :: EqCt -> CtFlavourRole
+ GHC.Tc.Types.Constraint: eqCtLHS :: EqCt -> CanEqLHS
+ GHC.Tc.Types.Constraint: getCtLocEnvLoc :: CtLocEnv -> RealSrcSpan
+ GHC.Tc.Types.Constraint: getCtLocEnvLvl :: CtLocEnv -> TcLevel
+ GHC.Tc.Types.Constraint: impredicativeProblem :: CheckTyEqResult
+ GHC.Tc.Types.Constraint: insolubleIrredCt :: IrredCt -> Bool
+ GHC.Tc.Types.Constraint: insolubleOccursProblem :: CheckTyEqResult
+ GHC.Tc.Types.Constraint: instance GHC.Classes.Eq GHC.Tc.Types.Constraint.CheckTyEqProblem
+ GHC.Tc.Types.Constraint: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.Constraint.CheckTyEqProblem
+ GHC.Tc.Types.Constraint: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.Constraint.DictCt
+ GHC.Tc.Types.Constraint: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.Constraint.EqCt
+ GHC.Tc.Types.Constraint: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.Constraint.IrredCt
+ GHC.Tc.Types.Constraint: irredCtEvidence :: IrredCt -> CtEvidence
+ GHC.Tc.Types.Constraint: irredCtPred :: IrredCt -> PredType
+ GHC.Tc.Types.Constraint: isPendingScDictCt :: DictCt -> Bool
+ GHC.Tc.Types.Constraint: isTopLevelUserTypeError :: PredType -> Bool
+ GHC.Tc.Types.Constraint: isUnsatisfiableCt_maybe :: Type -> Maybe ErrorMsgType
+ GHC.Tc.Types.Constraint: mkKindEqLoc :: TcType -> TcType -> CtLoc -> CtLoc
+ GHC.Tc.Types.Constraint: pendingFuel :: ExpansionFuel -> Bool
+ GHC.Tc.Types.Constraint: rewriterSetFromCts :: Bag Ct -> RewriterSet
+ GHC.Tc.Types.Constraint: setCtLocEnvLoc :: CtLocEnv -> SrcSpan -> CtLocEnv
+ GHC.Tc.Types.Constraint: setCtLocEnvLvl :: CtLocEnv -> TcLevel -> CtLocEnv
+ GHC.Tc.Types.Constraint: solubleOccursProblem :: CheckTyEqResult
+ GHC.Tc.Types.Constraint: toInvisibleLoc :: CtLoc -> CtLoc
+ GHC.Tc.Types.Constraint: type ExpansionFuel = Int
+ GHC.Tc.Types.Constraint: unionRewriterSet :: RewriterSet -> RewriterSet -> RewriterSet
+ GHC.Tc.Types.Constraint: unitRewriterSet :: CoercionHole -> RewriterSet
+ GHC.Tc.Types.Constraint: updCtEvidence :: (CtEvidence -> CtEvidence) -> Ct -> Ct
+ GHC.Tc.Types.CtLocEnv: CtLocEnv :: ![ErrCtxt] -> !RealSrcSpan -> !TcBinderStack -> !TcLevel -> !Bool -> !LocalRdrEnv -> CtLocEnv
+ GHC.Tc.Types.CtLocEnv: [ctl_bndrs] :: CtLocEnv -> !TcBinderStack
+ GHC.Tc.Types.CtLocEnv: [ctl_ctxt] :: CtLocEnv -> ![ErrCtxt]
+ GHC.Tc.Types.CtLocEnv: [ctl_in_gen_code] :: CtLocEnv -> !Bool
+ GHC.Tc.Types.CtLocEnv: [ctl_loc] :: CtLocEnv -> !RealSrcSpan
+ GHC.Tc.Types.CtLocEnv: [ctl_rdr] :: CtLocEnv -> !LocalRdrEnv
+ GHC.Tc.Types.CtLocEnv: [ctl_tclvl] :: CtLocEnv -> !TcLevel
+ GHC.Tc.Types.CtLocEnv: ctLocEnvInGeneratedCode :: CtLocEnv -> Bool
+ GHC.Tc.Types.CtLocEnv: data CtLocEnv
+ GHC.Tc.Types.CtLocEnv: getCtLocEnvLoc :: CtLocEnv -> RealSrcSpan
+ GHC.Tc.Types.CtLocEnv: getCtLocEnvLvl :: CtLocEnv -> TcLevel
+ GHC.Tc.Types.CtLocEnv: setCtLocEnvLoc :: CtLocEnv -> SrcSpan -> CtLocEnv
+ GHC.Tc.Types.CtLocEnv: setCtLocEnvLvl :: CtLocEnv -> TcLevel -> CtLocEnv
+ GHC.Tc.Types.CtLocEnv: setCtLocRealLoc :: CtLocEnv -> RealSrcSpan -> CtLocEnv
+ GHC.Tc.Types.ErrCtxt: type ErrCtxt = (Bool, TidyEnv -> ZonkM (TidyEnv, SDoc))
+ GHC.Tc.Types.Evidence: EvBindGiven :: EvBindInfo
+ GHC.Tc.Types.Evidence: EvBindWanted :: Canonical -> EvBindInfo
+ GHC.Tc.Types.Evidence: [eb_info] :: EvBind -> EvBindInfo
+ GHC.Tc.Types.Evidence: [ebi_canonical] :: EvBindInfo -> Canonical
+ GHC.Tc.Types.Evidence: data EvBindInfo
+ GHC.Tc.Types.LclEnv: ArrowCtxt :: LocalRdrEnv -> TcRef WantedConstraints -> ArrowCtxt
+ GHC.Tc.Types.LclEnv: NoArrowCtxt :: ArrowCtxt
+ GHC.Tc.Types.LclEnv: TcLclCtxt :: RealSrcSpan -> [ErrCtxt] -> Bool -> TcLevel -> TcBinderStack -> LocalRdrEnv -> ThStage -> ThBindEnv -> ArrowCtxt -> TcTypeEnv -> TcLclCtxt
+ GHC.Tc.Types.LclEnv: TcLclEnv :: !TcLclCtxt -> TcRef UsageEnv -> TcRef WantedConstraints -> TcRef (Messages TcRnMessage) -> TcLclEnv
+ GHC.Tc.Types.LclEnv: [tcl_arrow_ctxt] :: TcLclCtxt -> ArrowCtxt
+ GHC.Tc.Types.LclEnv: [tcl_bndrs] :: TcLclCtxt -> TcBinderStack
+ GHC.Tc.Types.LclEnv: [tcl_ctxt] :: TcLclCtxt -> [ErrCtxt]
+ GHC.Tc.Types.LclEnv: [tcl_env] :: TcLclCtxt -> TcTypeEnv
+ GHC.Tc.Types.LclEnv: [tcl_errs] :: TcLclEnv -> TcRef (Messages TcRnMessage)
+ GHC.Tc.Types.LclEnv: [tcl_in_gen_code] :: TcLclCtxt -> Bool
+ GHC.Tc.Types.LclEnv: [tcl_lcl_ctxt] :: TcLclEnv -> !TcLclCtxt
+ GHC.Tc.Types.LclEnv: [tcl_lie] :: TcLclEnv -> TcRef WantedConstraints
+ GHC.Tc.Types.LclEnv: [tcl_loc] :: TcLclCtxt -> RealSrcSpan
+ GHC.Tc.Types.LclEnv: [tcl_rdr] :: TcLclCtxt -> LocalRdrEnv
+ GHC.Tc.Types.LclEnv: [tcl_tclvl] :: TcLclCtxt -> TcLevel
+ GHC.Tc.Types.LclEnv: [tcl_th_bndrs] :: TcLclCtxt -> ThBindEnv
+ GHC.Tc.Types.LclEnv: [tcl_th_ctxt] :: TcLclCtxt -> ThStage
+ GHC.Tc.Types.LclEnv: [tcl_usage] :: TcLclEnv -> TcRef UsageEnv
+ GHC.Tc.Types.LclEnv: addLclEnvErrCtxt :: ErrCtxt -> TcLclEnv -> TcLclEnv
+ GHC.Tc.Types.LclEnv: data ArrowCtxt
+ GHC.Tc.Types.LclEnv: data TcLclCtxt
+ GHC.Tc.Types.LclEnv: data TcLclEnv
+ GHC.Tc.Types.LclEnv: getLclEnvArrowCtxt :: TcLclEnv -> ArrowCtxt
+ GHC.Tc.Types.LclEnv: getLclEnvBinderStack :: TcLclEnv -> TcBinderStack
+ GHC.Tc.Types.LclEnv: getLclEnvErrCtxt :: TcLclEnv -> [ErrCtxt]
+ GHC.Tc.Types.LclEnv: getLclEnvLoc :: TcLclEnv -> RealSrcSpan
+ GHC.Tc.Types.LclEnv: getLclEnvRdrEnv :: TcLclEnv -> LocalRdrEnv
+ GHC.Tc.Types.LclEnv: getLclEnvTcLevel :: TcLclEnv -> TcLevel
+ GHC.Tc.Types.LclEnv: getLclEnvThBndrs :: TcLclEnv -> ThBindEnv
+ GHC.Tc.Types.LclEnv: getLclEnvThStage :: TcLclEnv -> ThStage
+ GHC.Tc.Types.LclEnv: getLclEnvTypeEnv :: TcLclEnv -> TcTypeEnv
+ GHC.Tc.Types.LclEnv: lclEnvInGeneratedCode :: TcLclEnv -> Bool
+ GHC.Tc.Types.LclEnv: modifyLclCtxt :: (TcLclCtxt -> TcLclCtxt) -> TcLclEnv -> TcLclEnv
+ GHC.Tc.Types.LclEnv: modifyLclEnvTcLevel :: (TcLevel -> TcLevel) -> TcLclEnv -> TcLclEnv
+ GHC.Tc.Types.LclEnv: setLclEnvBinderStack :: TcBinderStack -> TcLclEnv -> TcLclEnv
+ GHC.Tc.Types.LclEnv: setLclEnvErrCtxt :: [ErrCtxt] -> TcLclEnv -> TcLclEnv
+ GHC.Tc.Types.LclEnv: setLclEnvLoc :: RealSrcSpan -> TcLclEnv -> TcLclEnv
+ GHC.Tc.Types.LclEnv: setLclEnvRdrEnv :: LocalRdrEnv -> TcLclEnv -> TcLclEnv
+ GHC.Tc.Types.LclEnv: setLclEnvTcLevel :: TcLevel -> TcLclEnv -> TcLclEnv
+ GHC.Tc.Types.LclEnv: setLclEnvThStage :: ThStage -> TcLclEnv -> TcLclEnv
+ GHC.Tc.Types.LclEnv: setLclEnvTypeEnv :: TcTypeEnv -> TcLclEnv -> TcLclEnv
+ GHC.Tc.Types.LclEnv: type TcTypeEnv = NameEnv TcTyThing
+ GHC.Tc.Types.LclEnv: type ThBindEnv = NameEnv (TopLevelFlag, ThLevel)
+ GHC.Tc.Types.Origin: BuiltinEqInstance :: InstanceWhat
+ GHC.Tc.Types.Origin: BuiltinInstance :: InstanceWhat
+ GHC.Tc.Types.Origin: BuiltinTypeableInstance :: TyCon -> InstanceWhat
+ GHC.Tc.Types.Origin: ImpedanceMatching :: Id -> CtOrigin
+ GHC.Tc.Types.Origin: LocalInstance :: InstanceWhat
+ GHC.Tc.Types.Origin: TopLevInstance :: DFunId -> SafeOverlapping -> InstanceWhat
+ GHC.Tc.Types.Origin: [iw_dfun_id] :: InstanceWhat -> DFunId
+ GHC.Tc.Types.Origin: [iw_safe_over] :: InstanceWhat -> SafeOverlapping
+ GHC.Tc.Types.Origin: data InstanceWhat
+ GHC.Tc.Types.Origin: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.Origin.FixedRuntimeRepOrigin
+ GHC.Tc.Types.Origin: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.Origin.InstanceWhat
+ GHC.Tc.Types.Origin: type SafeOverlapping = Bool
+ GHC.Tc.Types.TH: Brack :: ThStage -> PendingStuff -> ThStage
+ GHC.Tc.Types.TH: Comp :: ThStage
+ GHC.Tc.Types.TH: IsBracket :: SpliceOrBracket
+ GHC.Tc.Types.TH: IsSplice :: SpliceOrBracket
+ GHC.Tc.Types.TH: RnPendingTyped :: PendingStuff
+ GHC.Tc.Types.TH: RnPendingUntyped :: TcRef [PendingRnSplice] -> PendingStuff
+ GHC.Tc.Types.TH: RunSplice :: TcRef [ForeignRef (Q ())] -> ThStage
+ GHC.Tc.Types.TH: Splice :: SpliceType -> ThStage
+ GHC.Tc.Types.TH: TcPending :: TcRef [PendingTcSplice] -> TcRef WantedConstraints -> QuoteWrapper -> PendingStuff
+ GHC.Tc.Types.TH: Typed :: SpliceType
+ GHC.Tc.Types.TH: Untyped :: SpliceType
+ GHC.Tc.Types.TH: data PendingStuff
+ GHC.Tc.Types.TH: data SpliceOrBracket
+ GHC.Tc.Types.TH: data SpliceType
+ GHC.Tc.Types.TH: data ThStage
+ GHC.Tc.Types.TH: impLevel :: ThLevel
+ GHC.Tc.Types.TH: instance GHC.Utils.Outputable.Outputable GHC.Tc.Types.TH.ThStage
+ GHC.Tc.Types.TH: outerLevel :: ThLevel
+ GHC.Tc.Types.TH: thLevel :: ThStage -> ThLevel
+ GHC.Tc.Types.TH: topAnnStage :: ThStage
+ GHC.Tc.Types.TH: topSpliceStage :: ThStage
+ GHC.Tc.Types.TH: topStage :: ThStage
+ GHC.Tc.Types.TH: type ThLevel = Int
+ GHC.Tc.Types.TcRef: newTcRef :: MonadIO m => a -> m (TcRef a)
+ GHC.Tc.Types.TcRef: readTcRef :: MonadIO m => TcRef a -> m a
+ GHC.Tc.Types.TcRef: type TcRef a = IORef a
+ GHC.Tc.Types.TcRef: updTcRef :: MonadIO m => TcRef a -> (a -> a) -> m ()
+ GHC.Tc.Types.TcRef: updTcRefM :: MonadIO m => TcRef a -> (a -> m a) -> m ()
+ GHC.Tc.Types.TcRef: writeTcRef :: MonadIO m => TcRef a -> a -> m ()
+ GHC.Tc.Utils.Env: StageCheckInstance :: !InstanceWhat -> !PredType -> StageCheckReason
+ GHC.Tc.Utils.Env: StageCheckSplice :: !Name -> StageCheckReason
+ GHC.Tc.Utils.Env: data StageCheckReason
+ GHC.Tc.Utils.Env: instance GHC.Types.TyThing.MonadThings (GHC.Data.IOEnv.IOEnv (GHC.Tc.Types.Env GHC.Tc.Types.TcGblEnv GHC.Tc.Types.LclEnv.TcLclEnv))
+ GHC.Tc.Utils.Env: tcAddKindSigPlaceholders :: LHsKind GhcRn -> TcM a -> TcM a
+ GHC.Tc.Utils.Env: tcLookupRecSelParent :: HsRecUpdParent GhcRn -> TcM RecSelParent
+ GHC.Tc.Utils.Instantiate: newFamInst :: FamFlavor -> CoAxiom Unbranched -> TcM FamInst
+ GHC.Tc.Utils.Monad: checkErrAt :: SrcSpan -> Bool -> TcRnMessage -> TcRn ()
+ GHC.Tc.Utils.Monad: liftZonkM :: ZonkM a -> TcM a
+ GHC.Tc.Utils.Monad: mkCtLocEnv :: TcLclEnv -> CtLocEnv
+ GHC.Tc.Utils.Monad: setInGeneratedCode :: TcRn a -> TcRn a
+ GHC.Tc.Utils.Monad: tcHscSource :: TcRn HscSource
+ GHC.Tc.Utils.Monad: updLclCtxt :: (TcLclCtxt -> TcLclCtxt) -> TcRnIf gbl TcLclEnv a -> TcRnIf gbl TcLclEnv a
+ GHC.Tc.Utils.Monad: updTcRefM :: MonadIO m => TcRef a -> (a -> m a) -> m ()
+ GHC.Tc.Utils.Monad: withIfaceErr :: MonadIO m => SDocContext -> m (MaybeErr MissingInterfaceError a) -> m a
+ GHC.Tc.Utils.TcMType: cloneMetaTyVarWithInfo :: MetaInfo -> TcLevel -> TcTyVar -> TcM TcTyVar
+ GHC.Tc.Utils.TcMType: conLikeResTy :: ConLike -> [Type] -> Type
+ GHC.Tc.Utils.TcMType: hsOverLitName :: OverLitVal -> Name
+ GHC.Tc.Utils.TcMType: mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Tc.Utils.TcMType: mkHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Tc.Utils.TcMType: mkHsCaseAlt :: forall (p :: Pass) body. (Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns, Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA) => LPat (GhcPass p) -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p)))
+ GHC.Tc.Utils.TcMType: mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc
+ GHC.Tc.Utils.TcMType: newCoercionHoleO :: CtOrigin -> TcPredType -> TcM CoercionHole
+ GHC.Tc.Utils.TcMType: newConcreteTyVarTyAtLevel :: ConcreteTvOrigin -> TcLevel -> TcKind -> TcM TcType
+ GHC.Tc.Utils.TcMType: newVanillaCoercionHole :: TcPredType -> TcM CoercionHole
+ GHC.Tc.Utils.TcMType: shortCutLit :: Platform -> OverLitVal -> TcType -> Maybe (HsExpr GhcTc)
+ GHC.Tc.Utils.TcMType: tcCheckUsage :: Name -> Mult -> TcM a -> TcM (a, HsWrapper)
+ GHC.Tc.Utils.TcMType: tcShortCutLit :: HsOverLit GhcRn -> ExpRhoType -> TcM (Maybe (HsOverLit GhcTc))
+ GHC.Tc.Utils.TcType: InInstanceDecl :: PatersonCondFailureContext
+ GHC.Tc.Utils.TcType: InTyFamEquation :: PatersonCondFailureContext
+ GHC.Tc.Utils.TcType: PCF_Size :: PatersonCondFailure
+ GHC.Tc.Utils.TcType: PCF_TyFam :: TyCon -> PatersonCondFailure
+ GHC.Tc.Utils.TcType: PCF_TyVar :: [TyVar] -> PatersonCondFailure
+ GHC.Tc.Utils.TcType: anyTy_maybe :: Type -> Maybe Kind
+ GHC.Tc.Utils.TcType: checkingExpType :: String -> ExpType -> TcType
+ GHC.Tc.Utils.TcType: checkingExpType_maybe :: ExpType -> Maybe TcType
+ GHC.Tc.Utils.TcType: data PatersonCondFailure
+ GHC.Tc.Utils.TcType: data PatersonCondFailureContext
+ GHC.Tc.Utils.TcType: isConcreteInfo :: MetaInfo -> Bool
+ GHC.Tc.Utils.TcType: isEqualityClass :: Class -> Bool
+ GHC.Tc.Utils.TcType: minTcLevel :: TcLevel -> TcLevel -> TcLevel
+ GHC.Tc.Utils.TcType: tyConVisibilities :: TyCon -> [Bool]
+ GHC.Tc.Utils.Unify: LC_Check :: LevelCheck
+ GHC.Tc.Utils.Unify: LC_None :: LevelCheck
+ GHC.Tc.Utils.Unify: LC_Promote :: LevelCheck
+ GHC.Tc.Utils.Unify: NotUnifying :: AreUnifying
+ GHC.Tc.Utils.Unify: PuFail :: CheckTyEqResult -> PuResult a b
+ GHC.Tc.Utils.Unify: PuOK :: Bag a -> b -> PuResult a b
+ GHC.Tc.Utils.Unify: TEF :: Bool -> CanEqLHS -> AreUnifying -> TyEqFamApp a -> CheckTyEqProblem -> TyEqFlags a
+ GHC.Tc.Utils.Unify: TEFA_Break :: FamAppBreaker a -> TyEqFamApp a
+ GHC.Tc.Utils.Unify: TEFA_Fail :: TyEqFamApp a
+ GHC.Tc.Utils.Unify: TEFA_Recurse :: TyEqFamApp a
+ GHC.Tc.Utils.Unify: UE :: Role -> CtLoc -> RewriterSet -> TcRef (Bag Ct) -> Maybe (TcRef [TcTyVar]) -> UnifyEnv
+ GHC.Tc.Utils.Unify: Unifying :: MetaInfo -> TcLevel -> LevelCheck -> AreUnifying
+ GHC.Tc.Utils.Unify: [tef_fam_app] :: TyEqFlags a -> TyEqFamApp a
+ GHC.Tc.Utils.Unify: [tef_foralls] :: TyEqFlags a -> Bool
+ GHC.Tc.Utils.Unify: [tef_lhs] :: TyEqFlags a -> CanEqLHS
+ GHC.Tc.Utils.Unify: [tef_occurs] :: TyEqFlags a -> CheckTyEqProblem
+ GHC.Tc.Utils.Unify: [tef_unifying] :: TyEqFlags a -> AreUnifying
+ GHC.Tc.Utils.Unify: [u_defer] :: UnifyEnv -> TcRef (Bag Ct)
+ GHC.Tc.Utils.Unify: [u_loc] :: UnifyEnv -> CtLoc
+ GHC.Tc.Utils.Unify: [u_rewriters] :: UnifyEnv -> RewriterSet
+ GHC.Tc.Utils.Unify: [u_role] :: UnifyEnv -> Role
+ GHC.Tc.Utils.Unify: [u_unified] :: UnifyEnv -> Maybe (TcRef [TcTyVar])
+ GHC.Tc.Utils.Unify: checkPromoteFreeVars :: CheckTyEqProblem -> TcTyVar -> TcLevel -> TyCoVarSet -> TcM CheckTyEqResult
+ GHC.Tc.Utils.Unify: checkTyEqRhs :: TyEqFlags a -> TcType -> TcM (PuResult a Reduction)
+ GHC.Tc.Utils.Unify: data AreUnifying
+ GHC.Tc.Utils.Unify: data LevelCheck
+ GHC.Tc.Utils.Unify: data PuResult a b
+ GHC.Tc.Utils.Unify: data TyEqFamApp a
+ GHC.Tc.Utils.Unify: data TyEqFlags a
+ GHC.Tc.Utils.Unify: data UnifyEnv
+ GHC.Tc.Utils.Unify: failCheckWith :: CheckTyEqResult -> TcM (PuResult a b)
+ GHC.Tc.Utils.Unify: famAppArgFlags :: TyEqFlags a -> TyEqFlags a
+ GHC.Tc.Utils.Unify: instance (GHC.Utils.Outputable.Outputable a, GHC.Utils.Outputable.Outputable b) => GHC.Utils.Outputable.Outputable (GHC.Tc.Utils.Unify.PuResult a b)
+ GHC.Tc.Utils.Unify: instance GHC.Base.Applicative (GHC.Tc.Utils.Unify.PuResult a)
+ GHC.Tc.Utils.Unify: instance GHC.Base.Functor (GHC.Tc.Utils.Unify.PuResult a)
+ GHC.Tc.Utils.Unify: instance GHC.Utils.Outputable.Outputable (GHC.Tc.Utils.Unify.TyEqFamApp a)
+ GHC.Tc.Utils.Unify: instance GHC.Utils.Outputable.Outputable (GHC.Tc.Utils.Unify.TyEqFlags a)
+ GHC.Tc.Utils.Unify: instance GHC.Utils.Outputable.Outputable GHC.Tc.Utils.Unify.AreUnifying
+ GHC.Tc.Utils.Unify: instance GHC.Utils.Outputable.Outputable GHC.Tc.Utils.Unify.LevelCheck
+ GHC.Tc.Utils.Unify: mapCheck :: (x -> TcM (PuResult a Reduction)) -> [x] -> TcM (PuResult a Reductions)
+ GHC.Tc.Utils.Unify: okCheckRefl :: TcType -> TcM (PuResult a Reduction)
+ GHC.Tc.Utils.Unify: recurseIntoTyConApp :: TyEqFlags a -> TyCon -> [TcType] -> TcM (PuResult a Reduction)
+ GHC.Tc.Utils.Unify: setUEnvRole :: UnifyEnv -> Role -> UnifyEnv
+ GHC.Tc.Utils.Unify: simpleUnifyCheck :: Bool -> TcTyVar -> TcType -> Bool
+ GHC.Tc.Utils.Unify: touchabilityAndShapeTest :: TcLevel -> TcTyVar -> TcType -> Bool
+ GHC.Tc.Utils.Unify: type FamAppBreaker a = TcType -> TcM PuResult a Reduction
+ GHC.Tc.Utils.Unify: unifyInvisibleType :: TcTauType -> TcTauType -> TcM TcCoercionN
+ GHC.Tc.Utils.Unify: unifyTypeAndEmit :: TypeOrKind -> CtOrigin -> TcType -> TcType -> TcM CoercionN
+ GHC.Tc.Utils.Unify: updUEnvLoc :: UnifyEnv -> (CtLoc -> CtLoc) -> UnifyEnv
+ GHC.Tc.Zonk.Env: DefaultFlexi :: ZonkFlexi
+ GHC.Tc.Zonk.Env: NoFlexi :: ZonkFlexi
+ GHC.Tc.Zonk.Env: RuntimeUnkFlexi :: ZonkFlexi
+ GHC.Tc.Zonk.Env: SkolemiseFlexi :: ZonkFlexi
+ GHC.Tc.Zonk.Env: ZonkBndrT :: (forall r. () => (a -> ZonkT m r) -> ZonkT m r) -> ZonkBndrT (m :: Type -> Type) a
+ GHC.Tc.Zonk.Env: ZonkEnv :: !ZonkFlexi -> TyCoVarEnv TyCoVar -> IdEnv Id -> IORef (TyVarEnv Type) -> ZonkEnv
+ GHC.Tc.Zonk.Env: [runZonkBndrT'] :: ZonkBndrT (m :: Type -> Type) a -> forall r. () => (a -> ZonkT m r) -> ZonkT m r
+ GHC.Tc.Zonk.Env: [ze_flexi] :: ZonkEnv -> !ZonkFlexi
+ GHC.Tc.Zonk.Env: [ze_id_env] :: ZonkEnv -> IdEnv Id
+ GHC.Tc.Zonk.Env: [ze_meta_tv_env] :: ZonkEnv -> IORef (TyVarEnv Type)
+ GHC.Tc.Zonk.Env: [ze_tv_env] :: ZonkEnv -> TyCoVarEnv TyCoVar
+ GHC.Tc.Zonk.Env: data ZonkEnv
+ GHC.Tc.Zonk.Env: data ZonkFlexi
+ GHC.Tc.Zonk.Env: data ZonkT (m :: Type -> Type) a
+ GHC.Tc.Zonk.Env: don'tBind :: forall (m :: Type -> Type) a. Monad m => ZonkBndrT m a -> ZonkT m a
+ GHC.Tc.Zonk.Env: extendIdZonkEnv :: forall (m :: Type -> Type). Var -> ZonkBndrT m ()
+ GHC.Tc.Zonk.Env: extendIdZonkEnvRec :: forall (m :: Type -> Type). [Var] -> ZonkBndrT m ()
+ GHC.Tc.Zonk.Env: extendTyZonkEnv :: forall (m :: Type -> Type). TyVar -> ZonkBndrT m ()
+ GHC.Tc.Zonk.Env: extendZonkEnv :: forall (m :: Type -> Type). [Var] -> ZonkBndrT m ()
+ GHC.Tc.Zonk.Env: getZonkEnv :: forall (m :: Type -> Type). Monad m => ZonkT m ZonkEnv
+ GHC.Tc.Zonk.Env: initZonkEnv :: MonadIO m => ZonkFlexi -> ZonkT m b -> m b
+ GHC.Tc.Zonk.Env: instance Control.Monad.Fix.MonadFix m => Control.Monad.Fix.MonadFix (GHC.Tc.Zonk.Env.ZonkT m)
+ GHC.Tc.Zonk.Env: instance Control.Monad.IO.Class.MonadIO m => Control.Monad.Fix.MonadFix (GHC.Tc.Zonk.Env.ZonkBndrT m)
+ GHC.Tc.Zonk.Env: instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (GHC.Tc.Zonk.Env.ZonkBndrT m)
+ GHC.Tc.Zonk.Env: instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (GHC.Tc.Zonk.Env.ZonkT m)
+ GHC.Tc.Zonk.Env: instance Control.Monad.Trans.Class.MonadTrans GHC.Tc.Zonk.Env.ZonkT
+ GHC.Tc.Zonk.Env: instance GHC.Base.Applicative (GHC.Tc.Zonk.Env.ZonkBndrT m)
+ GHC.Tc.Zonk.Env: instance GHC.Base.Applicative m => GHC.Base.Applicative (GHC.Tc.Zonk.Env.ZonkT m)
+ GHC.Tc.Zonk.Env: instance GHC.Base.Functor (GHC.Tc.Zonk.Env.ZonkBndrT m)
+ GHC.Tc.Zonk.Env: instance GHC.Base.Functor m => GHC.Base.Functor (GHC.Tc.Zonk.Env.ZonkT m)
+ GHC.Tc.Zonk.Env: instance GHC.Base.Monad (GHC.Tc.Zonk.Env.ZonkBndrT m)
+ GHC.Tc.Zonk.Env: instance GHC.Base.Monad m => GHC.Base.Monad (GHC.Tc.Zonk.Env.ZonkT m)
+ GHC.Tc.Zonk.Env: instance GHC.Utils.Outputable.Outputable GHC.Tc.Zonk.Env.ZonkEnv
+ GHC.Tc.Zonk.Env: newtype ZonkBndrT (m :: Type -> Type) a
+ GHC.Tc.Zonk.Env: noBinders :: forall (m :: Type -> Type) a. Monad m => ZonkT m a -> ZonkBndrT m a
+ GHC.Tc.Zonk.Env: pattern ZonkT :: (ZonkEnv -> m a) -> ZonkT m a
+ GHC.Tc.Zonk.Env: runZonkBndrT :: forall (m :: Type -> Type) a. ZonkBndrT m a -> forall r. () => (a -> ZonkT m r) -> ZonkT m r
+ GHC.Tc.Zonk.Env: setZonkType :: forall (m :: Type -> Type) a. ZonkFlexi -> ZonkT m a -> ZonkT m a
+ GHC.Tc.Zonk.Monad: ZonkGblEnv :: Logger -> NamePprCtx -> SrcSpan -> TcLevel -> TcBinderStack -> ZonkGblEnv
+ GHC.Tc.Zonk.Monad: [zge_binder_stack] :: ZonkGblEnv -> TcBinderStack
+ GHC.Tc.Zonk.Monad: [zge_logger] :: ZonkGblEnv -> Logger
+ GHC.Tc.Zonk.Monad: [zge_name_ppr_ctx] :: ZonkGblEnv -> NamePprCtx
+ GHC.Tc.Zonk.Monad: [zge_src_span] :: ZonkGblEnv -> SrcSpan
+ GHC.Tc.Zonk.Monad: [zge_tc_level] :: ZonkGblEnv -> TcLevel
+ GHC.Tc.Zonk.Monad: data ZonkGblEnv
+ GHC.Tc.Zonk.Monad: data ZonkM a
+ GHC.Tc.Zonk.Monad: getZonkGblEnv :: ZonkM ZonkGblEnv
+ GHC.Tc.Zonk.Monad: instance Control.Monad.IO.Class.MonadIO GHC.Tc.Zonk.Monad.ZonkM
+ GHC.Tc.Zonk.Monad: instance GHC.Base.Applicative GHC.Tc.Zonk.Monad.ZonkM
+ GHC.Tc.Zonk.Monad: instance GHC.Base.Functor GHC.Tc.Zonk.Monad.ZonkM
+ GHC.Tc.Zonk.Monad: instance GHC.Base.Monad GHC.Tc.Zonk.Monad.ZonkM
+ GHC.Tc.Zonk.Monad: pattern ZonkM :: (ZonkGblEnv -> IO a) -> ZonkM a
+ GHC.Tc.Zonk.Monad: traceZonk :: String -> SDoc -> ZonkM ()
+ GHC.Tc.Zonk.TcType: checkCoercionHole :: CoVar -> Coercion -> ZonkM Coercion
+ GHC.Tc.Zonk.TcType: tcInitOpenTidyEnv :: [TyCoVar] -> ZonkM TidyEnv
+ GHC.Tc.Zonk.TcType: tcInitTidyEnv :: ZonkM TidyEnv
+ GHC.Tc.Zonk.TcType: tidyCt :: TidyEnv -> Ct -> Ct
+ GHC.Tc.Zonk.TcType: tidyDelayedError :: TidyEnv -> DelayedError -> DelayedError
+ GHC.Tc.Zonk.TcType: tidyEvVar :: TidyEnv -> EvVar -> EvVar
+ GHC.Tc.Zonk.TcType: writeMetaTyVar :: HasDebugCallStack => TcTyVar -> TcType -> ZonkM ()
+ GHC.Tc.Zonk.TcType: writeMetaTyVarRef :: HasDebugCallStack => TcTyVar -> TcRef MetaDetails -> TcType -> ZonkM ()
+ GHC.Tc.Zonk.TcType: zonkCo :: Coercion -> ZonkM Coercion
+ GHC.Tc.Zonk.TcType: zonkCoVar :: CoVar -> ZonkM CoVar
+ GHC.Tc.Zonk.TcType: zonkCt :: Ct -> ZonkM Ct
+ GHC.Tc.Zonk.TcType: zonkDTyCoVarSetAndFV :: DTyCoVarSet -> ZonkM DTyCoVarSet
+ GHC.Tc.Zonk.TcType: zonkId :: TcId -> ZonkM TcId
+ GHC.Tc.Zonk.TcType: zonkImplication :: Implication -> ZonkM Implication
+ GHC.Tc.Zonk.TcType: zonkInvisTVBinder :: VarBndr TcTyVar spec -> ZonkM (VarBndr TcTyVar spec)
+ GHC.Tc.Zonk.TcType: zonkSimples :: Cts -> ZonkM Cts
+ GHC.Tc.Zonk.TcType: zonkSkolemInfo :: SkolemInfo -> ZonkM SkolemInfo
+ GHC.Tc.Zonk.TcType: zonkSkolemInfoAnon :: SkolemInfoAnon -> ZonkM SkolemInfoAnon
+ GHC.Tc.Zonk.TcType: zonkTcTyCon :: TcTyCon -> ZonkM TcTyCon
+ GHC.Tc.Zonk.TcType: zonkTcTyVar :: TcTyVar -> ZonkM TcType
+ GHC.Tc.Zonk.TcType: zonkTcTyVarToTcTyVar :: HasDebugCallStack => TcTyVar -> ZonkM TcTyVar
+ GHC.Tc.Zonk.TcType: zonkTcTyVars :: [TcTyVar] -> ZonkM [TcType]
+ GHC.Tc.Zonk.TcType: zonkTcTyVarsToTcTyVars :: HasDebugCallStack => [TcTyVar] -> ZonkM [TcTyVar]
+ GHC.Tc.Zonk.TcType: zonkTcType :: TcType -> ZonkM TcType
+ GHC.Tc.Zonk.TcType: zonkTcTypeAndFV :: TcType -> ZonkM DTyCoVarSet
+ GHC.Tc.Zonk.TcType: zonkTcTypes :: [TcType] -> ZonkM [TcType]
+ GHC.Tc.Zonk.TcType: zonkTidyFRRInfos :: TidyEnv -> [FixedRuntimeRepErrorInfo] -> ZonkM (TidyEnv, [FixedRuntimeRepErrorInfo])
+ GHC.Tc.Zonk.TcType: zonkTidyOrigin :: TidyEnv -> CtOrigin -> ZonkM (TidyEnv, CtOrigin)
+ GHC.Tc.Zonk.TcType: zonkTidyOrigins :: TidyEnv -> [CtOrigin] -> ZonkM (TidyEnv, [CtOrigin])
+ GHC.Tc.Zonk.TcType: zonkTidyTcType :: TidyEnv -> TcType -> ZonkM (TidyEnv, TcType)
+ GHC.Tc.Zonk.TcType: zonkTidyTcTypes :: TidyEnv -> [TcType] -> ZonkM (TidyEnv, [TcType])
+ GHC.Tc.Zonk.TcType: zonkTyCoVar :: TyCoVar -> ZonkM TcType
+ GHC.Tc.Zonk.TcType: zonkTyCoVarBndrKind :: VarBndr TyCoVar flag -> ZonkM (VarBndr TyCoVar flag)
+ GHC.Tc.Zonk.TcType: zonkTyCoVarKind :: TyCoVar -> ZonkM TyCoVar
+ GHC.Tc.Zonk.TcType: zonkTyCoVarsAndFV :: TyCoVarSet -> ZonkM TyCoVarSet
+ GHC.Tc.Zonk.TcType: zonkTyCoVarsAndFVList :: [TyCoVar] -> ZonkM [TyCoVar]
+ GHC.Tc.Zonk.TcType: zonkWC :: WantedConstraints -> ZonkM WantedConstraints
+ GHC.Tc.Zonk.Type: instance GHC.Base.Monoid GHC.Tc.Zonk.Type.UnfilledCoercionHoleMonoid
+ GHC.Tc.Zonk.Type: instance GHC.Base.Semigroup GHC.Tc.Zonk.Type.UnfilledCoercionHoleMonoid
+ GHC.Tc.Zonk.Type: isFilledCoercionHole :: CoercionHole -> TcM Bool
+ GHC.Tc.Zonk.Type: lookupTyVarX :: TcTyVar -> ZonkTcM TyVar
+ GHC.Tc.Zonk.Type: tcInitOpenTidyEnv :: [TyCoVar] -> ZonkM TidyEnv
+ GHC.Tc.Zonk.Type: tcInitTidyEnv :: ZonkM TidyEnv
+ GHC.Tc.Zonk.Type: type ZonkTcM = ZonkT TcM
+ GHC.Tc.Zonk.Type: unpackCoercionHole :: CoercionHole -> TcM Coercion
+ GHC.Tc.Zonk.Type: unpackCoercionHole_maybe :: CoercionHole -> TcM (Maybe Coercion)
+ GHC.Tc.Zonk.Type: zonkCoToCo :: Coercion -> ZonkTcM Coercion
+ GHC.Tc.Zonk.Type: zonkCtEvRewriterSet :: CtEvidence -> TcM CtEvidence
+ GHC.Tc.Zonk.Type: zonkCtRewriterSet :: Ct -> TcM Ct
+ GHC.Tc.Zonk.Type: zonkEvBinds :: Bag EvBind -> ZonkBndrTcM (Bag EvBind)
+ GHC.Tc.Zonk.Type: zonkRewriterSet :: RewriterSet -> TcM RewriterSet
+ GHC.Tc.Zonk.Type: zonkScaledTcTypesToTypesX :: [Scaled TcType] -> ZonkTcM [Scaled Type]
+ GHC.Tc.Zonk.Type: zonkTcEvBinds :: TcEvBinds -> ZonkBndrTcM TcEvBinds
+ GHC.Tc.Zonk.Type: zonkTcMethInfoToMethInfoX :: TcMethInfo -> ZonkTcM MethInfo
+ GHC.Tc.Zonk.Type: zonkTcTypeToType :: TcType -> TcM Type
+ GHC.Tc.Zonk.Type: zonkTcTypeToTypeX :: TcType -> ZonkTcM Type
+ GHC.Tc.Zonk.Type: zonkTcTypesToTypesX :: [TcType] -> ZonkTcM [Type]
+ GHC.Tc.Zonk.Type: zonkTopBndrs :: [TcId] -> TcM [Id]
+ GHC.Tc.Zonk.Type: zonkTopDecls :: Bag EvBind -> LHsBinds GhcTc -> [LRuleDecl GhcTc] -> [LTcSpecPrag] -> [LForeignDecl GhcTc] -> TcM (TypeEnv, Bag EvBind, LHsBinds GhcTc, [LForeignDecl GhcTc], [LTcSpecPrag], [LRuleDecl GhcTc])
+ GHC.Tc.Zonk.Type: zonkTopExpr :: HsExpr GhcTc -> TcM (HsExpr GhcTc)
+ GHC.Tc.Zonk.Type: zonkTopLExpr :: LHsExpr GhcTc -> TcM (LHsExpr GhcTc)
+ GHC.Tc.Zonk.Type: zonkTyBndrsX :: [TcTyVar] -> ZonkBndrTcM [TcTyVar]
+ GHC.Tc.Zonk.Type: zonkTyVarBinderX :: VarBndr TcTyVar vis -> ZonkBndrTcM (VarBndr TyVar vis)
+ GHC.Tc.Zonk.Type: zonkTyVarBindersX :: [VarBndr TcTyVar vis] -> ZonkBndrTcM [VarBndr TyVar vis]
+ GHC.Tc.Zonk.Type: zonkTyVarOcc :: HasDebugCallStack => TcTyVar -> ZonkTcM Type
+ GHC.ThToHs: instance GHC.ThToHs.CvtFlag Language.Haskell.TH.Syntax.BndrVis (Language.Haskell.Syntax.Type.HsBndrVis GHC.Hs.Extension.GhcPs)
+ GHC.Types.Avail: availSubordinateNames :: AvailInfo -> [Name]
+ GHC.Types.Basic: AbstractTypeFlavour :: TyConFlavour tc
+ GHC.Types.Basic: BuiltInTypeFlavour :: TyConFlavour tc
+ GHC.Types.Basic: ClassFlavour :: TyConFlavour tc
+ GHC.Types.Basic: ClosedTypeFamilyFlavour :: TyConFlavour tc
+ GHC.Types.Basic: DataTypeFlavour :: TyConFlavour tc
+ GHC.Types.Basic: DoPmc :: DoPmc
+ GHC.Types.Basic: IAmData :: TypeOrData
+ GHC.Types.Basic: IAmType :: TypeOrData
+ GHC.Types.Basic: NewtypeFlavour :: TyConFlavour tc
+ GHC.Types.Basic: NonCanonical :: SourceText -> OverlapMode
+ GHC.Types.Basic: OpenFamilyFlavour :: TypeOrData -> Maybe tc -> TyConFlavour tc
+ GHC.Types.Basic: PromotedDataConFlavour :: TyConFlavour tc
+ GHC.Types.Basic: SkipPmc :: DoPmc
+ GHC.Types.Basic: SumFlavour :: TyConFlavour tc
+ GHC.Types.Basic: TupleFlavour :: Boxity -> TyConFlavour tc
+ GHC.Types.Basic: TypeSynonymFlavour :: TyConFlavour tc
+ GHC.Types.Basic: data DoPmc
+ GHC.Types.Basic: data TyConFlavour tc
+ GHC.Types.Basic: data TypeOrData
+ GHC.Types.Basic: hasNonCanonicalFlag :: OverlapMode -> Bool
+ GHC.Types.Basic: instance Control.DeepSeq.NFData tc => Control.DeepSeq.NFData (GHC.Types.Basic.TyConFlavour tc)
+ GHC.Types.Basic: instance Data.Data.Data GHC.Types.Basic.DoPmc
+ GHC.Types.Basic: instance Data.Data.Data GHC.Types.Basic.Levity
+ GHC.Types.Basic: instance Data.Data.Data GHC.Types.Basic.TypeOrData
+ GHC.Types.Basic: instance Data.Data.Data tc => Data.Data.Data (GHC.Types.Basic.TyConFlavour tc)
+ GHC.Types.Basic: instance GHC.Base.Functor GHC.Types.Basic.TyConFlavour
+ GHC.Types.Basic: instance GHC.Classes.Eq GHC.Types.Basic.DoPmc
+ GHC.Types.Basic: instance GHC.Classes.Eq GHC.Types.Basic.TypeOrData
+ GHC.Types.Basic: instance GHC.Classes.Eq tc => GHC.Classes.Eq (GHC.Types.Basic.TyConFlavour tc)
+ GHC.Types.Basic: instance GHC.Classes.Ord GHC.Types.Basic.Levity
+ GHC.Types.Basic: instance GHC.Show.Show GHC.Types.Basic.Levity
+ GHC.Types.Basic: instance GHC.Utils.Binary.Binary GHC.Types.Basic.Levity
+ GHC.Types.Basic: instance GHC.Utils.Outputable.Outputable (GHC.Types.Basic.TyConFlavour tc)
+ GHC.Types.Basic: instance GHC.Utils.Outputable.Outputable GHC.Types.Basic.DoPmc
+ GHC.Types.Basic: instance GHC.Utils.Outputable.Outputable GHC.Types.Basic.TypeOrData
+ GHC.Types.Basic: requiresPMC :: Origin -> Bool
+ GHC.Types.Basic: tyConFlavourAssoc_maybe :: TyConFlavour tc -> Maybe tc
+ GHC.Types.Error: RemindRecordMissingField :: FastString -> Type -> Type -> GhcHint
+ GHC.Types.Error: ResolvedDiagnosticReason :: DiagnosticReason -> ResolvedDiagnosticReason
+ GHC.Types.Error: SuggestAddStandaloneKindSignature :: Name -> GhcHint
+ GHC.Types.Error: SuggestBindTyVarOnLhs :: RdrName -> GhcHint
+ GHC.Types.Error: SuggestEtaReduceAbsDataTySyn :: TyCon -> GhcHint
+ GHC.Types.Error: SuggestExplicitBidiPatSyn :: Name -> LPat GhcRn -> [LIdP GhcRn] -> GhcHint
+ GHC.Types.Error: SuggestFixOrphanInst :: Maybe FamFlavor -> GhcHint
+ GHC.Types.Error: SuggestIncreaseReductionDepth :: GhcHint
+ GHC.Types.Error: SuggestMoveNonCanonicalDefinition :: Name -> Name -> String -> GhcHint
+ GHC.Types.Error: SuggestRemoveNonCanonicalDefinition :: Name -> Name -> String -> GhcHint
+ GHC.Types.Error: SuggestRemoveRecordWildcard :: GhcHint
+ GHC.Types.Error: SuggestRenameTypeVariable :: GhcHint
+ GHC.Types.Error: SuggestSafeHaskell :: GhcHint
+ GHC.Types.Error: WarningWithCategory :: !WarningCategory -> DiagnosticReason
+ GHC.Types.Error: WarningWithFlags :: !NonEmpty WarningFlag -> DiagnosticReason
+ GHC.Types.Error: [errMsgReason] :: MsgEnvelope e -> ResolvedDiagnosticReason
+ GHC.Types.Error: [isFamilyInstance] :: GhcHint -> Maybe FamFlavor
+ GHC.Types.Error: [resolvedDiagnosticReason] :: ResolvedDiagnosticReason -> DiagnosticReason
+ GHC.Types.Error: class HasDefaultDiagnosticOpts opts
+ GHC.Types.Error: defaultOpts :: HasDefaultDiagnosticOpts opts => opts
+ GHC.Types.Error: embedUnknownDiagnostic :: (Diagnostic a, Typeable a) => (opts -> DiagnosticOpts a) -> a -> UnknownDiagnostic opts
+ GHC.Types.Error: instance GHC.Classes.Ord GHC.Types.Error.Severity
+ GHC.Types.Error: instance GHC.Types.Error.HasDefaultDiagnosticOpts GHC.Types.Error.NoDiagnosticOpts
+ GHC.Types.Error: instance GHC.Types.Error.HasDefaultDiagnosticOpts opts => GHC.Types.Error.Diagnostic (GHC.Types.Error.UnknownDiagnostic opts)
+ GHC.Types.Error: instance GHC.Utils.Outputable.Outputable GHC.Types.Error.ResolvedDiagnosticReason
+ GHC.Types.Error: mkSimpleUnknownDiagnostic :: (Diagnostic a, Typeable a, DiagnosticOpts a ~ NoDiagnosticOpts) => a -> UnknownDiagnostic b
+ GHC.Types.Error: mkUnknownDiagnostic :: (Typeable a, Diagnostic a) => a -> UnknownDiagnostic (DiagnosticOpts a)
+ GHC.Types.Error: newtype ResolvedDiagnosticReason
+ GHC.Types.Error: pattern WarningWithFlag :: WarningFlag -> DiagnosticReason
+ GHC.Types.Error: pprDiagnostic :: Diagnostic e => e -> SDoc
+ GHC.Types.Error.Codes: instance (GHC.Types.Error.Codes.ConRecursInto con GHC.Types.~ 'GHC.Maybe.Just (GHC.Types.Error.UnknownDiagnostic opts), GHC.Types.Error.Codes.HasType (GHC.Types.Error.UnknownDiagnostic opts) con f) => GHC.Types.Error.Codes.ConstructorCode con f ('GHC.Maybe.Just (GHC.Types.Error.UnknownDiagnostic opts))
+ GHC.Types.FieldLabel: flLabel :: FieldLabel -> FieldLabelString
+ GHC.Types.GREInfo: ConHasPositionalArgs :: ConInfo
+ GHC.Types.GREInfo: ConHasRecordFields :: NonEmpty FieldLabel -> ConInfo
+ GHC.Types.GREInfo: ConIsNullary :: ConInfo
+ GHC.Types.GREInfo: DataConName :: !Name -> ConLikeName
+ GHC.Types.GREInfo: IAmConLike :: !ConInfo -> GREInfo
+ GHC.Types.GREInfo: IAmRecField :: !RecFieldInfo -> GREInfo
+ GHC.Types.GREInfo: IAmTyCon :: !TyConFlavour Name -> GREInfo
+ GHC.Types.GREInfo: PatSynName :: !Name -> ConLikeName
+ GHC.Types.GREInfo: RecFieldInfo :: !FieldLabel -> !UniqSet ConLikeName -> RecFieldInfo
+ GHC.Types.GREInfo: UnboundGRE :: GREInfo
+ GHC.Types.GREInfo: Vanilla :: GREInfo
+ GHC.Types.GREInfo: [conLikeName_Name] :: ConLikeName -> !Name
+ GHC.Types.GREInfo: [recFieldCons] :: RecFieldInfo -> !UniqSet ConLikeName
+ GHC.Types.GREInfo: [recFieldLabel] :: RecFieldInfo -> !FieldLabel
+ GHC.Types.GREInfo: conInfoFields :: ConInfo -> [FieldLabel]
+ GHC.Types.GREInfo: data ConInfo
+ GHC.Types.GREInfo: data ConLikeName
+ GHC.Types.GREInfo: data GREInfo
+ GHC.Types.GREInfo: data RecFieldInfo
+ GHC.Types.GREInfo: instance Control.DeepSeq.NFData GHC.Types.GREInfo.ConInfo
+ GHC.Types.GREInfo: instance Control.DeepSeq.NFData GHC.Types.GREInfo.ConLikeName
+ GHC.Types.GREInfo: instance Control.DeepSeq.NFData GHC.Types.GREInfo.GREInfo
+ GHC.Types.GREInfo: instance Control.DeepSeq.NFData GHC.Types.GREInfo.RecFieldInfo
+ GHC.Types.GREInfo: instance Data.Data.Data GHC.Types.GREInfo.ConInfo
+ GHC.Types.GREInfo: instance Data.Data.Data GHC.Types.GREInfo.ConLikeName
+ GHC.Types.GREInfo: instance Data.Data.Data GHC.Types.GREInfo.GREInfo
+ GHC.Types.GREInfo: instance Data.Data.Data GHC.Types.GREInfo.RecFieldInfo
+ GHC.Types.GREInfo: instance GHC.Classes.Eq GHC.Types.GREInfo.ConInfo
+ GHC.Types.GREInfo: instance GHC.Classes.Eq GHC.Types.GREInfo.ConLikeName
+ GHC.Types.GREInfo: instance GHC.Classes.Eq GHC.Types.GREInfo.RecFieldInfo
+ GHC.Types.GREInfo: instance GHC.Types.Unique.Uniquable GHC.Types.GREInfo.ConLikeName
+ GHC.Types.GREInfo: instance GHC.Utils.Outputable.Outputable GHC.Types.GREInfo.ConInfo
+ GHC.Types.GREInfo: instance GHC.Utils.Outputable.Outputable GHC.Types.GREInfo.ConLikeName
+ GHC.Types.GREInfo: instance GHC.Utils.Outputable.Outputable GHC.Types.GREInfo.GREInfo
+ GHC.Types.GREInfo: instance GHC.Utils.Outputable.Outputable GHC.Types.GREInfo.RecFieldInfo
+ GHC.Types.GREInfo: mkConInfo :: Arity -> [FieldLabel] -> ConInfo
+ GHC.Types.GREInfo: plusGREInfo :: GREInfo -> GREInfo -> GREInfo
+ GHC.Types.Hint: CouldAddTypeKeyword :: ModuleName -> ImportSuggestion
+ GHC.Types.Hint: CouldRemoveTypeKeyword :: ModuleName -> ImportSuggestion
+ GHC.Types.Hint: ImportDataCon :: Maybe (ModuleName, Bool) -> OccName -> ImportSuggestion
+ GHC.Types.Hint: RemindRecordMissingField :: FastString -> Type -> Type -> GhcHint
+ GHC.Types.Hint: SuggestAddStandaloneKindSignature :: Name -> GhcHint
+ GHC.Types.Hint: SuggestBindTyVarOnLhs :: RdrName -> GhcHint
+ GHC.Types.Hint: SuggestEtaReduceAbsDataTySyn :: TyCon -> GhcHint
+ GHC.Types.Hint: SuggestExplicitBidiPatSyn :: Name -> LPat GhcRn -> [LIdP GhcRn] -> GhcHint
+ GHC.Types.Hint: SuggestFixOrphanInst :: Maybe FamFlavor -> GhcHint
+ GHC.Types.Hint: SuggestIncreaseReductionDepth :: GhcHint
+ GHC.Types.Hint: SuggestMoveNonCanonicalDefinition :: Name -> Name -> String -> GhcHint
+ GHC.Types.Hint: SuggestRemoveNonCanonicalDefinition :: Name -> Name -> String -> GhcHint
+ GHC.Types.Hint: SuggestRemoveRecordWildcard :: GhcHint
+ GHC.Types.Hint: SuggestRenameTypeVariable :: GhcHint
+ GHC.Types.Hint: SuggestSafeHaskell :: GhcHint
+ GHC.Types.Hint: [ies_parent] :: ImportSuggestion -> OccName
+ GHC.Types.Hint: [ies_suggest_import_from] :: ImportSuggestion -> Maybe (ModuleName, Bool)
+ GHC.Types.Hint: [isFamilyInstance] :: GhcHint -> Maybe FamFlavor
+ GHC.Types.Id.Info: [sel_fieldLabel] :: IdDetails -> FieldLabel
+ GHC.Types.Id.Info: instance Data.Data.Data GHC.Types.Id.Info.RecSelParent
+ GHC.Types.Id.Info: recSelFirstConName :: RecSelParent -> Name
+ GHC.Types.Id.Info: recSelParentName :: RecSelParent -> Name
+ GHC.Types.Literal: mkLitNumberMaybe :: Platform -> LitNumType -> Integer -> Maybe Literal
+ GHC.Types.Name: instance Control.DeepSeq.NFData GHC.Types.FieldLabel.FieldLabel
+ GHC.Types.Name: isFieldName :: Name -> Bool
+ GHC.Types.Name: isTupleTyConName :: Name -> Bool
+ GHC.Types.Name.Env: extendNameEnvListWith :: (a -> Name) -> NameEnv a -> [a] -> NameEnv a
+ GHC.Types.Name.Env: fromUniqMap :: UniqMap Name a -> NameEnv a
+ GHC.Types.Name.Env: plusNameEnvList :: [NameEnv a] -> NameEnv a
+ GHC.Types.Name.Env: plusNameEnvListWith :: (a -> a -> a) -> [NameEnv a] -> NameEnv a
+ GHC.Types.Name.Occurrence: demoteOccTvName :: OccName -> Maybe OccName
+ GHC.Types.Name.Occurrence: fieldName :: FastString -> NameSpace
+ GHC.Types.Name.Occurrence: fieldOcc_maybe :: OccName -> Maybe FastString
+ GHC.Types.Name.Occurrence: forceOccEnv :: (a -> ()) -> OccEnv a -> ()
+ GHC.Types.Name.Occurrence: instance Control.DeepSeq.NFData GHC.Types.Name.Occurrence.NameSpace
+ GHC.Types.Name.Occurrence: instance GHC.Base.Functor GHC.Types.Name.Occurrence.OccEnv
+ GHC.Types.Name.Occurrence: instance GHC.Types.Unique.Uniquable GHC.Types.Name.Occurrence.NameSpace
+ GHC.Types.Name.Occurrence: intersectOccEnv_C :: (a -> b -> c) -> OccEnv a -> OccEnv b -> OccEnv c
+ GHC.Types.Name.Occurrence: isFieldNameSpace :: NameSpace -> Bool
+ GHC.Types.Name.Occurrence: isFieldOcc :: OccName -> Bool
+ GHC.Types.Name.Occurrence: isTermVarOrFieldNameSpace :: NameSpace -> Bool
+ GHC.Types.Name.Occurrence: lookupFieldsOccEnv :: OccEnv a -> FastString -> [a]
+ GHC.Types.Name.Occurrence: lookupOccEnv_AllNameSpaces :: OccEnv a -> OccName -> [a]
+ GHC.Types.Name.Occurrence: lookupOccEnv_WithFields :: OccEnv a -> OccName -> [a]
+ GHC.Types.Name.Occurrence: mainOcc :: OccName
+ GHC.Types.Name.Occurrence: mapMaybeOccEnv :: (a -> Maybe b) -> OccEnv a -> OccEnv b
+ GHC.Types.Name.Occurrence: minusOccEnv_C_Ns :: (UniqFM NameSpace a -> UniqFM NameSpace b -> UniqFM NameSpace a) -> OccEnv a -> OccEnv b -> OccEnv a
+ GHC.Types.Name.Occurrence: mkRecFieldOcc :: FastString -> String -> OccName
+ GHC.Types.Name.Occurrence: mkRecFieldOccFS :: FastString -> FastString -> OccName
+ GHC.Types.Name.Occurrence: nonDetFoldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b
+ GHC.Types.Name.Occurrence: occNameMangledFS :: OccName -> FastString
+ GHC.Types.Name.Occurrence: ppMainFn :: OccName -> SDoc
+ GHC.Types.Name.Occurrence: recFieldToVarOcc :: HasDebugCallStack => OccName -> OccName
+ GHC.Types.Name.Occurrence: strictMapOccEnv :: (a -> b) -> OccEnv a -> OccEnv b
+ GHC.Types.Name.Occurrence: varToRecFieldOcc :: HasDebugCallStack => FastString -> OccName -> OccName
+ GHC.Types.Name.Reader: DataConName :: !Name -> ConLikeName
+ GHC.Types.Name.Reader: IAmConLike :: !ConInfo -> GREInfo
+ GHC.Types.Name.Reader: IAmRecField :: !RecFieldInfo -> GREInfo
+ GHC.Types.Name.Reader: IAmTyCon :: !TyConFlavour Name -> GREInfo
+ GHC.Types.Name.Reader: LookupChild :: Name -> Bool -> Bool -> LookupChild
+ GHC.Types.Name.Reader: PatSynName :: !Name -> ConLikeName
+ GHC.Types.Name.Reader: RecFieldInfo :: !FieldLabel -> !UniqSet ConLikeName -> RecFieldInfo
+ GHC.Types.Name.Reader: UnboundGRE :: GREInfo
+ GHC.Types.Name.Reader: Vanilla :: GREInfo
+ GHC.Types.Name.Reader: WantBoth :: FieldsOrSelectors
+ GHC.Types.Name.Reader: WantField :: FieldsOrSelectors
+ GHC.Types.Name.Reader: WantNormal :: FieldsOrSelectors
+ GHC.Types.Name.Reader: [LookupChildren] :: forall info. OccName -> LookupChild -> LookupGRE info
+ GHC.Types.Name.Reader: [LookupExactName] :: forall info. Name -> Bool -> LookupGRE info
+ GHC.Types.Name.Reader: [LookupOccName] :: forall info. OccName -> WhichGREs info -> LookupGRE info
+ GHC.Types.Name.Reader: [LookupRdrName] :: forall info. RdrName -> WhichGREs info -> LookupGRE info
+ GHC.Types.Name.Reader: [RelevantGREs] :: !FieldsOrSelectors -> !Bool -> !Bool -> WhichGREs GREInfo
+ GHC.Types.Name.Reader: [SameNameSpace] :: forall info. WhichGREs info
+ GHC.Types.Name.Reader: [conLikeName_Name] :: ConLikeName -> !Name
+ GHC.Types.Name.Reader: [gre_info] :: GlobalRdrEltX info -> info
+ GHC.Types.Name.Reader: [lookupDataConFirst] :: LookupChild -> Bool
+ GHC.Types.Name.Reader: [prioritiseParent] :: LookupChild -> Bool
+ GHC.Types.Name.Reader: [recFieldCons] :: RecFieldInfo -> !UniqSet ConLikeName
+ GHC.Types.Name.Reader: [recFieldLabel] :: RecFieldInfo -> !FieldLabel
+ GHC.Types.Name.Reader: [wantedParent] :: LookupChild -> Name
+ GHC.Types.Name.Reader: allowGRE :: FieldsOrSelectors -> GlobalRdrElt -> Bool
+ GHC.Types.Name.Reader: availParent :: AvailInfo -> Parent
+ GHC.Types.Name.Reader: data ConLikeName
+ GHC.Types.Name.Reader: data FieldsOrSelectors
+ GHC.Types.Name.Reader: data GREInfo
+ GHC.Types.Name.Reader: data GlobalRdrEltX info
+ GHC.Types.Name.Reader: data LookupChild
+ GHC.Types.Name.Reader: data LookupGRE info
+ GHC.Types.Name.Reader: data RecFieldInfo
+ GHC.Types.Name.Reader: data WhichGREs info
+ GHC.Types.Name.Reader: demoteRdrNameTv :: RdrName -> Maybe RdrName
+ GHC.Types.Name.Reader: fieldGREInfo :: HasDebugCallStack => FieldGlobalRdrElt -> RecFieldInfo
+ GHC.Types.Name.Reader: fieldGRELabel :: HasDebugCallStack => FieldGlobalRdrElt -> FieldLabel
+ GHC.Types.Name.Reader: fieldGRE_maybe :: GlobalRdrElt -> Maybe FieldGlobalRdrElt
+ GHC.Types.Name.Reader: filterFieldGREs :: FieldsOrSelectors -> [GlobalRdrElt] -> [GlobalRdrElt]
+ GHC.Types.Name.Reader: forceGlobalRdrEnv :: GlobalRdrEnvX info -> IfGlobalRdrEnv
+ GHC.Types.Name.Reader: greClashesWith :: GlobalRdrElt -> GlobalRdrElt -> Bool
+ GHC.Types.Name.Reader: greFieldLabel_maybe :: GlobalRdrElt -> Maybe FieldLabel
+ GHC.Types.Name.Reader: greInfo :: GlobalRdrElt -> GREInfo
+ GHC.Types.Name.Reader: greIsRelevant :: WhichGREs GREInfo -> NameSpace -> GlobalRdrElt -> Bool
+ GHC.Types.Name.Reader: greName :: GlobalRdrEltX info -> Name
+ GHC.Types.Name.Reader: greNameSpace :: GlobalRdrEltX info -> NameSpace
+ GHC.Types.Name.Reader: greParent :: GlobalRdrEltX info -> Parent
+ GHC.Types.Name.Reader: gresToNameSet :: [GlobalRdrEltX info] -> NameSet
+ GHC.Types.Name.Reader: hydrateGlobalRdrEnv :: (Name -> IO info) -> GlobalRdrEnvX noInfo -> GlobalRdrEnvX info
+ GHC.Types.Name.Reader: instance Control.DeepSeq.NFData GHC.Types.Name.Reader.IfGlobalRdrElt
+ GHC.Types.Name.Reader: instance Data.Data.Data info => Data.Data.Data (GHC.Types.Name.Reader.GlobalRdrEltX info)
+ GHC.Types.Name.Reader: instance GHC.Base.Monoid GHC.Types.Name.Reader.ShadowedFieldGREs
+ GHC.Types.Name.Reader: instance GHC.Base.Monoid GHC.Types.Name.Reader.ShadowedGREs
+ GHC.Types.Name.Reader: instance GHC.Base.Semigroup GHC.Types.Name.Reader.ShadowedFieldGREs
+ GHC.Types.Name.Reader: instance GHC.Base.Semigroup GHC.Types.Name.Reader.ShadowedGREs
+ GHC.Types.Name.Reader: instance GHC.Classes.Eq GHC.Types.Name.Reader.FieldsOrSelectors
+ GHC.Types.Name.Reader: instance GHC.Show.Show GHC.Types.Name.Reader.FieldsOrSelectors
+ GHC.Types.Name.Reader: instance GHC.Types.Name.Occurrence.HasOccName (GHC.Types.Name.Reader.GlobalRdrEltX info)
+ GHC.Types.Name.Reader: instance GHC.Utils.Outputable.Outputable info => GHC.Utils.Outputable.Outputable (GHC.Types.Name.Reader.GlobalRdrEltX info)
+ GHC.Types.Name.Reader: isImportedGRE :: GlobalRdrEltX info -> Bool
+ GHC.Types.Name.Reader: lookupGRE :: GlobalRdrEnvX info -> LookupGRE info -> [GlobalRdrEltX info]
+ GHC.Types.Name.Reader: minusLocalRdrEnvList :: LocalRdrEnv -> [OccName] -> LocalRdrEnv
+ GHC.Types.Name.Reader: mkExactGRE :: Name -> GREInfo -> GlobalRdrElt
+ GHC.Types.Name.Reader: mkGRE :: (Name -> Maybe ImportSpec) -> GREInfo -> Parent -> Name -> GlobalRdrElt
+ GHC.Types.Name.Reader: mkLocalConLikeGRE :: Parent -> (ConLikeName, ConInfo) -> GlobalRdrElt
+ GHC.Types.Name.Reader: mkLocalFieldGREs :: Parent -> [(ConLikeName, ConInfo)] -> [GlobalRdrElt]
+ GHC.Types.Name.Reader: mkLocalGRE :: GREInfo -> Parent -> Name -> GlobalRdrElt
+ GHC.Types.Name.Reader: mkLocalTyConGRE :: TyConFlavour Name -> Name -> GlobalRdrElt
+ GHC.Types.Name.Reader: mkLocalVanillaGRE :: Parent -> Name -> GlobalRdrElt
+ GHC.Types.Name.Reader: mkParent :: Name -> AvailInfo -> Parent
+ GHC.Types.Name.Reader: pattern AllRelevantGREs :: WhichGREs GREInfo
+ GHC.Types.Name.Reader: pattern RelevantGREsFOS :: FieldsOrSelectors -> WhichGREs GREInfo
+ GHC.Types.Name.Reader: plusGREInfo :: GREInfo -> GREInfo -> GREInfo
+ GHC.Types.Name.Reader: recFieldConLike_maybe :: HasDebugCallStack => GlobalRdrElt -> Maybe ConInfo
+ GHC.Types.Name.Reader: recFieldInfo_maybe :: HasDebugCallStack => GlobalRdrElt -> Maybe RecFieldInfo
+ GHC.Types.Name.Reader: type FieldGlobalRdrElt = GlobalRdrElt
+ GHC.Types.Name.Reader: type GlobalRdrElt = GlobalRdrEltX GREInfo
+ GHC.Types.Name.Reader: type GlobalRdrEnvX info = OccEnv [GlobalRdrEltX info]
+ GHC.Types.Name.Reader: type IfGlobalRdrElt = GlobalRdrEltX ()
+ GHC.Types.Name.Reader: type IfGlobalRdrEnv = GlobalRdrEnvX ()
+ GHC.Types.RepType: BoxedRep :: {-# UNPACK #-} !Maybe Levity -> PrimRep
+ GHC.Types.SaneDouble: SaneDouble :: Double -> SaneDouble
+ GHC.Types.SaneDouble: [unSaneDouble] :: SaneDouble -> Double
+ GHC.Types.SaneDouble: instance GHC.Classes.Eq GHC.Types.SaneDouble.SaneDouble
+ GHC.Types.SaneDouble: instance GHC.Classes.Ord GHC.Types.SaneDouble.SaneDouble
+ GHC.Types.SaneDouble: instance GHC.Num.Num GHC.Types.SaneDouble.SaneDouble
+ GHC.Types.SaneDouble: instance GHC.Real.Fractional GHC.Types.SaneDouble.SaneDouble
+ GHC.Types.SaneDouble: instance GHC.Show.Show GHC.Types.SaneDouble.SaneDouble
+ GHC.Types.SaneDouble: instance GHC.Utils.Binary.Binary GHC.Types.SaneDouble.SaneDouble
+ GHC.Types.SaneDouble: newtype SaneDouble
+ GHC.Types.SourceFile: HsBoot :: HsBootOrSig
+ GHC.Types.SourceFile: HsBootOrSig :: !HsBootOrSig -> HscSource
+ GHC.Types.SourceFile: Hsig :: HsBootOrSig
+ GHC.Types.SourceFile: data HsBootOrSig
+ GHC.Types.SourceFile: instance GHC.Classes.Eq GHC.Types.SourceFile.HsBootOrSig
+ GHC.Types.SourceFile: instance GHC.Classes.Ord GHC.Types.SourceFile.HsBootOrSig
+ GHC.Types.SourceFile: instance GHC.Show.Show GHC.Types.SourceFile.HsBootOrSig
+ GHC.Types.SourceFile: isHsBootFile :: HscSource -> Bool
+ GHC.Types.SourceFile: pattern HsBootFile :: HscSource
+ GHC.Types.SourceFile: pattern HsigFile :: HscSource
+ GHC.Types.SourceText: instance Control.DeepSeq.NFData GHC.Types.SourceText.SourceText
+ GHC.Types.SrcLoc: [bufSpanEnd] :: BufSpan -> {-# UNPACK #-} !BufPos
+ GHC.Types.SrcLoc: [bufSpanStart] :: BufSpan -> {-# UNPACK #-} !BufPos
+ GHC.Types.SrcLoc: isPointRealSpan :: RealSrcSpan -> Bool
+ GHC.Types.TyThing: tyThingGREInfo :: TyThing -> GREInfo
+ GHC.Types.TyThing: tyThingLocalGREs :: TyThing -> [GlobalRdrElt]
+ GHC.Types.Unique.FM: alterUFM_Directly :: (Maybe elt -> Maybe elt) -> UniqFM key elt -> Unique -> UniqFM key elt
+ GHC.Types.Unique.FM: mapMaybeWithKeyUFM :: (Unique -> elt1 -> Maybe elt2) -> UniqFM key elt1 -> UniqFM key elt2
+ GHC.Types.Unique.FM: nonDetFoldUFM :: (elt -> a -> a) -> a -> UniqFM key elt -> a
+ GHC.Types.Unique.FM: nonDetFoldWithKeyUFM :: (Unique -> elt -> a -> a) -> a -> UniqFM key elt -> a
+ GHC.Types.Unique.FM: plusUFMListWith :: (elt -> elt -> elt) -> [UniqFM key elt] -> UniqFM key elt
+ GHC.Types.Unique.FM: strictMapUFM :: (a -> b) -> UniqFM k a -> UniqFM k b
+ GHC.Types.Unique.Map: filterWithKeyUniqMap :: (k -> a -> Bool) -> UniqMap k a -> UniqMap k a
+ GHC.Types.Unique.Map: nonDetKeysUniqMap :: UniqMap k a -> [k]
+ GHC.Types.Unique.Map: nonDetUniqMapToKeySet :: Ord k => UniqMap k a -> Set k
+ GHC.Types.Unique.Map: nonDetUniqMapToList :: UniqMap k a -> [(k, a)]
+ GHC.Types.Unique.Map: plusUniqMapListWith :: (a -> a -> a) -> [UniqMap k a] -> UniqMap k a
+ GHC.Types.Unique.Supply: uniqFromMask :: Char -> IO Unique
+ GHC.Types.Var.Env: nonDetStrictFoldVarEnv_Directly :: (Unique -> a -> r -> r) -> r -> VarEnv a -> r
+ GHC.Unit.External: [n_decls_in] :: EpsStats -> !Int
+ GHC.Unit.External: [n_decls_out] :: EpsStats -> !Int
+ GHC.Unit.External: [n_ifaces_in] :: EpsStats -> !Int
+ GHC.Unit.External: [n_insts_in] :: EpsStats -> !Int
+ GHC.Unit.External: [n_insts_out] :: EpsStats -> !Int
+ GHC.Unit.External: [n_rules_in] :: EpsStats -> !Int
+ GHC.Unit.External: [n_rules_out] :: EpsStats -> !Int
+ GHC.Unit.Module.Env: alterModuleEnv :: (Maybe a -> Maybe a) -> Module -> ModuleEnv a -> ModuleEnv a
+ GHC.Unit.Module.Graph: moduleGraphModulesBelow :: ModuleGraph -> UnitId -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid
+ GHC.Unit.Module.ModIface: [mi_decl_warn_fn] :: ModIfaceBackend -> !OccName -> Maybe (WarningTxt GhcRn)
+ GHC.Unit.Module.ModIface: [mi_export_warn_fn] :: ModIfaceBackend -> !Name -> Maybe (WarningTxt GhcRn)
+ GHC.Unit.Module.Warnings: InWarningCategory :: !Located (HsToken "in") -> !SourceText -> Located WarningCategory -> InWarningCategory
+ GHC.Unit.Module.Warnings: WarningCategory :: FastString -> WarningCategory
+ GHC.Unit.Module.Warnings: [iwc_in] :: InWarningCategory -> !Located (HsToken "in")
+ GHC.Unit.Module.Warnings: [iwc_st] :: InWarningCategory -> !SourceText
+ GHC.Unit.Module.Warnings: [iwc_wc] :: InWarningCategory -> Located WarningCategory
+ GHC.Unit.Module.Warnings: completeWarningCategorySet :: WarningCategorySet
+ GHC.Unit.Module.Warnings: data InWarningCategory
+ GHC.Unit.Module.Warnings: data WarningCategorySet
+ GHC.Unit.Module.Warnings: defaultWarningCategory :: WarningCategory
+ GHC.Unit.Module.Warnings: deleteWarningCategorySet :: WarningCategory -> WarningCategorySet -> WarningCategorySet
+ GHC.Unit.Module.Warnings: elemWarningCategorySet :: WarningCategory -> WarningCategorySet -> Bool
+ GHC.Unit.Module.Warnings: emptyWarn :: Warnings p
+ GHC.Unit.Module.Warnings: emptyWarningCategorySet :: WarningCategorySet
+ GHC.Unit.Module.Warnings: fromWarningCategory :: WarningCategory -> InWarningCategory
+ GHC.Unit.Module.Warnings: insertWarnDecls :: Warnings p -> [(OccName, WarningTxt p)] -> Warnings p
+ GHC.Unit.Module.Warnings: insertWarnExports :: Warnings p -> [(Name, WarningTxt p)] -> Warnings p
+ GHC.Unit.Module.Warnings: insertWarningCategorySet :: WarningCategory -> WarningCategorySet -> WarningCategorySet
+ GHC.Unit.Module.Warnings: instance (GHC.Classes.Eq (Language.Haskell.Syntax.Concrete.HsToken "in"), GHC.Classes.Eq (Language.Haskell.Syntax.Extension.IdP pass)) => GHC.Classes.Eq (GHC.Unit.Module.Warnings.WarningTxt pass)
+ GHC.Unit.Module.Warnings: instance Control.DeepSeq.NFData GHC.Unit.Module.Warnings.WarningCategory
+ GHC.Unit.Module.Warnings: instance Data.Data.Data GHC.Unit.Module.Warnings.InWarningCategory
+ GHC.Unit.Module.Warnings: instance Data.Data.Data GHC.Unit.Module.Warnings.WarningCategory
+ GHC.Unit.Module.Warnings: instance GHC.Classes.Eq GHC.Unit.Module.Warnings.InWarningCategory
+ GHC.Unit.Module.Warnings: instance GHC.Classes.Eq GHC.Unit.Module.Warnings.WarningCategory
+ GHC.Unit.Module.Warnings: instance GHC.Show.Show GHC.Unit.Module.Warnings.WarningCategory
+ GHC.Unit.Module.Warnings: instance GHC.Types.Unique.Uniquable GHC.Unit.Module.Warnings.WarningCategory
+ GHC.Unit.Module.Warnings: instance GHC.Utils.Binary.Binary GHC.Unit.Module.Warnings.WarningCategory
+ GHC.Unit.Module.Warnings: instance GHC.Utils.Outputable.Outputable GHC.Unit.Module.Warnings.InWarningCategory
+ GHC.Unit.Module.Warnings: instance GHC.Utils.Outputable.Outputable GHC.Unit.Module.Warnings.WarningCategory
+ GHC.Unit.Module.Warnings: mkIfaceDeclWarnCache :: Warnings p -> OccName -> Maybe (WarningTxt p)
+ GHC.Unit.Module.Warnings: mkIfaceExportWarnCache :: Warnings p -> Name -> Maybe (WarningTxt p)
+ GHC.Unit.Module.Warnings: mkWarningCategory :: FastString -> WarningCategory
+ GHC.Unit.Module.Warnings: newtype WarningCategory
+ GHC.Unit.Module.Warnings: nullWarningCategorySet :: WarningCategorySet -> Bool
+ GHC.Unit.Module.Warnings: type DeclWarnOccNames pass = [(OccName, WarningTxt pass)]
+ GHC.Unit.Module.Warnings: type ExportWarnNames pass = [(Name, WarningTxt pass)]
+ GHC.Unit.Module.Warnings: validWarningCategory :: WarningCategory -> Bool
+ GHC.Unit.Module.Warnings: warningTxtCategory :: WarningTxt pass -> WarningCategory
+ GHC.Unit.Module.Warnings: warningTxtMessage :: WarningTxt p -> [Located (WithHsDocIdentifiers StringLiteral p)]
+ GHC.Unit.Module.Warnings: warningTxtSame :: WarningTxt p1 -> WarningTxt p2 -> Bool
+ GHC.Utils.Binary: foldGet' :: Binary a => Word -> BinHandle -> b -> (Word -> a -> b -> IO b) -> IO b
+ GHC.Utils.Error: [diag_custom_warning_categories] :: DiagOpts -> !WarningCategorySet
+ GHC.Utils.Error: [diag_fatal_custom_warning_categories] :: DiagOpts -> !WarningCategorySet
+ GHC.Utils.Error: [errMsgReason] :: MsgEnvelope e -> ResolvedDiagnosticReason
+ GHC.Utils.Error: emptyDiagOpts :: DiagOpts
+ GHC.Utils.Misc: expectNonEmpty :: HasCallStack => String -> [a] -> NonEmpty a
+ GHC.Utils.Misc: fstOf4 :: (a, b, c, d) -> a
+ GHC.Utils.Misc: mapAndUnzip4 :: (a -> (b, c, d, e)) -> [a] -> ([b], [c], [d], [e])
+ GHC.Utils.Misc: sndOf4 :: (a, b, c, d) -> b
+ GHC.Utils.Monad: zipWith3MNE :: Monad m => (a -> b -> c -> m d) -> NonEmpty a -> NonEmpty b -> NonEmpty c -> m (NonEmpty d)
+ GHC.Utils.Monad.Codensity: Codensity :: (forall r. () => (a -> m r) -> m r) -> Codensity (m :: Type -> Type) a
+ GHC.Utils.Monad.Codensity: [runCodensity] :: Codensity (m :: Type -> Type) a -> forall r. () => (a -> m r) -> m r
+ GHC.Utils.Monad.Codensity: fromCodensity :: Monad m => Codensity m a -> m a
+ GHC.Utils.Monad.Codensity: instance Control.Monad.IO.Class.MonadIO m => Control.Monad.Fix.MonadFix (GHC.Utils.Monad.Codensity.Codensity m)
+ GHC.Utils.Monad.Codensity: instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (GHC.Utils.Monad.Codensity.Codensity m)
+ GHC.Utils.Monad.Codensity: instance Control.Monad.Trans.Class.MonadTrans GHC.Utils.Monad.Codensity.Codensity
+ GHC.Utils.Monad.Codensity: instance GHC.Base.Applicative (GHC.Utils.Monad.Codensity.Codensity f)
+ GHC.Utils.Monad.Codensity: instance GHC.Base.Functor (GHC.Utils.Monad.Codensity.Codensity k)
+ GHC.Utils.Monad.Codensity: instance GHC.Base.Monad (GHC.Utils.Monad.Codensity.Codensity f)
+ GHC.Utils.Monad.Codensity: newtype Codensity (m :: Type -> Type) a
+ GHC.Utils.Monad.Codensity: toCodensity :: Monad m => m a -> Codensity m a
+ GHC.Utils.Outputable: docWithStyle :: IsOutput doc => doc -> (PprStyle -> SDoc) -> doc
+ GHC.Utils.Outputable: instance (GHC.Utils.Outputable.Outputable a, GHC.Utils.Outputable.Outputable b) => GHC.Utils.Outputable.Outputable (Data.Semigroup.Arg a b)
+ GHC.Utils.Outputable: instance GHC.Utils.Outputable.Outputable Data.IntSet.Internal.IntSet
+ GHC.Utils.Outputable: instance GHC.Utils.Outputable.Outputable GHC.Base.Void
+ GHC.Utils.Outputable: punctuateFinal :: IsLine doc => doc -> doc -> [doc] -> [doc]
+ GHC.Utils.Outputable: quotedListWithAnd :: [SDoc] -> SDoc
+ Language.Haskell.Syntax.Concrete: instance GHC.Classes.Eq (Language.Haskell.Syntax.Concrete.HsToken tok)
+ Language.Haskell.Syntax.Decls: familyInfoTyConFlavour :: Maybe tc -> FamilyInfo pass -> TyConFlavour tc
+ Language.Haskell.Syntax.Decls: firstDataDefnCon :: DataDefnCons a -> Maybe a
+ Language.Haskell.Syntax.Expr: [OverloadedRecUpdFields] :: forall p. XLHsOLRecUpdLabels p -> [LHsRecUpdProj p] -> LHsRecUpdFields p
+ Language.Haskell.Syntax.Expr: [RegularRecUpdFields] :: forall p. XLHsRecUpdLabels p -> [LHsRecUpdField p p] -> LHsRecUpdFields p
+ Language.Haskell.Syntax.Expr: data LHsRecUpdFields p
+ Language.Haskell.Syntax.Lit: HsInt16Prim :: XHsInt16Prim x -> Integer -> HsLit x
+ Language.Haskell.Syntax.Lit: HsInt32Prim :: XHsInt32Prim x -> Integer -> HsLit x
+ Language.Haskell.Syntax.Lit: HsInt8Prim :: XHsInt8Prim x -> Integer -> HsLit x
+ Language.Haskell.Syntax.Lit: HsWord16Prim :: XHsWord16Prim x -> Integer -> HsLit x
+ Language.Haskell.Syntax.Lit: HsWord32Prim :: XHsWord32Prim x -> Integer -> HsLit x
+ Language.Haskell.Syntax.Lit: HsWord8Prim :: XHsWord8Prim x -> Integer -> HsLit x
+ Language.Haskell.Syntax.Type: HsBndrInvisible :: LHsToken "@" pass -> HsBndrVis pass
+ Language.Haskell.Syntax.Type: HsBndrRequired :: HsBndrVis pass
+ Language.Haskell.Syntax.Type: conDetailsArity :: (rec -> Arity) -> HsConDetails tyarg arg rec -> Arity
+ Language.Haskell.Syntax.Type: data HsBndrVis pass
+ Language.Haskell.Syntax.Type: isHsBndrInvisible :: HsBndrVis pass -> Bool
- GHC: DynFlags :: GhcMode -> GhcLink -> !Backend -> {-# UNPACK #-} !GhcNameVersion -> {-# UNPACK #-} !FileSettings -> Platform -> {-# UNPACK #-} !ToolSettings -> {-# UNPACK #-} !PlatformMisc -> [(String, String)] -> TempDir -> Int -> Int -> Int -> Int -> Int -> Maybe String -> [Int] -> Maybe Int -> Bool -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Int -> Int -> Int -> !Int -> Maybe Int -> Maybe Int -> Int -> Maybe Word -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Bool -> Maybe Int -> Int -> [FilePath] -> ModuleName -> Maybe String -> IntWithInf -> IntWithInf -> UnitId -> Maybe UnitId -> [(ModuleName, Module)] -> Maybe FilePath -> Maybe String -> Set ModuleName -> Set ModuleName -> Ways -> Maybe (String, Int) -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> String -> String -> String -> String -> String -> String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> DynLibLoader -> !Bool -> FilePath -> Maybe FilePath -> [Option] -> IncludeSpecs -> [String] -> [String] -> [String] -> Maybe String -> RtsOptsEnabled -> Bool -> String -> [ModuleName] -> [(ModuleName, String)] -> [String] -> [ExternalPluginSpec] -> FilePath -> Bool -> Bool -> [ModuleName] -> [String] -> [PackageDBFlag] -> [IgnorePackageFlag] -> [PackageFlag] -> [PackageFlag] -> [TrustFlag] -> Maybe FilePath -> EnumSet DumpFlag -> EnumSet GeneralFlag -> EnumSet WarningFlag -> EnumSet WarningFlag -> Maybe Language -> SafeHaskellMode -> Bool -> Bool -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> [OnOff Extension] -> EnumSet Extension -> !UnfoldingOpts -> Int -> Int -> FlushOut -> Maybe FilePath -> Maybe String -> [String] -> Int -> Int -> Bool -> OverridingBool -> Bool -> Scheme -> ProfAuto -> [CallerCcFilter] -> Maybe String -> Maybe SseVersion -> Maybe BmiVersion -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> IORef (Maybe LinkerInfo) -> IORef (Maybe CompilerInfo) -> IORef (Maybe CompilerInfo) -> Int -> Int -> Int -> Bool -> Maybe Int -> Word64 -> Int -> Weights -> DynFlags
+ GHC: DynFlags :: GhcMode -> GhcLink -> !Backend -> {-# UNPACK #-} !GhcNameVersion -> {-# UNPACK #-} !FileSettings -> Platform -> {-# UNPACK #-} !ToolSettings -> {-# UNPACK #-} !PlatformMisc -> [(String, String)] -> TempDir -> Int -> Int -> Int -> Int -> Int -> Maybe String -> [Int] -> Maybe ParMakeCount -> Bool -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Int -> Int -> Int -> !Int -> Maybe Int -> Maybe Int -> Int -> Maybe Word -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Bool -> Maybe Int -> Int -> [FilePath] -> ModuleName -> Maybe String -> IntWithInf -> IntWithInf -> Int -> Int -> Int -> UnitId -> Maybe UnitId -> [(ModuleName, Module)] -> Maybe FilePath -> Maybe String -> Set ModuleName -> Set ModuleName -> Ways -> Maybe (String, Int) -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> String -> String -> String -> String -> String -> String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> DynLibLoader -> !Bool -> FilePath -> Maybe FilePath -> [Option] -> IncludeSpecs -> [String] -> [String] -> [String] -> Maybe String -> RtsOptsEnabled -> Bool -> String -> [ModuleName] -> [(ModuleName, String)] -> [String] -> [ExternalPluginSpec] -> FilePath -> Bool -> Bool -> [ModuleName] -> [String] -> [PackageDBFlag] -> [IgnorePackageFlag] -> [PackageFlag] -> [PackageFlag] -> [TrustFlag] -> Maybe FilePath -> EnumSet DumpFlag -> EnumSet GeneralFlag -> EnumSet WarningFlag -> EnumSet WarningFlag -> WarningCategorySet -> WarningCategorySet -> Maybe Language -> SafeHaskellMode -> Bool -> Bool -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> [OnOff Extension] -> EnumSet Extension -> !UnfoldingOpts -> Int -> Int -> FlushOut -> Maybe FilePath -> Maybe String -> [String] -> Int -> Int -> Bool -> OverridingBool -> Bool -> Scheme -> ProfAuto -> [CallerCcFilter] -> Maybe String -> Maybe SseVersion -> Maybe BmiVersion -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> IORef (Maybe LinkerInfo) -> IORef (Maybe CompilerInfo) -> IORef (Maybe CompilerInfo) -> Int -> Int -> Int -> Bool -> Maybe Int -> Word -> Int -> Weights -> DynFlags
- GHC: ModBreaks :: ForeignRef BreakArray -> !Array BreakIndex SrcSpan -> !Array BreakIndex [OccName] -> !Array BreakIndex [String] -> !Array BreakIndex (RemotePtr CostCentre) -> IntMap CgBreakInfo -> RemotePtr ModuleName -> 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 -> !HscSource -> Dependencies -> [Usage] -> ![IfaceExport] -> !Bool -> [(OccName, Fixity)] -> Warnings GhcRn -> [IfaceAnnotation] -> [IfaceDeclExts phase] -> Maybe [IfaceBindingX IfaceMaybeRhs IfaceTopBndrInfo] -> !Maybe GlobalRdrEnv -> [IfaceClsInst] -> [IfaceFamInst] -> [IfaceRule] -> !AnyHpcUsage -> !IfaceTrustInfo -> !Bool -> ![IfaceCompleteMatch] -> !Maybe Docs -> !IfaceBackendExts phase -> !ExtensibleFields -> !Fingerprint -> ModIface_ (phase :: ModIfacePhase)
+ GHC: ModIface :: !Module -> !Maybe Module -> !HscSource -> Dependencies -> [Usage] -> ![IfaceExport] -> !Bool -> [(OccName, Fixity)] -> IfaceWarnings -> [IfaceAnnotation] -> [IfaceDeclExts phase] -> Maybe [IfaceBindingX IfaceMaybeRhs IfaceTopBndrInfo] -> !Maybe IfGlobalRdrEnv -> [IfaceClsInst] -> [IfaceFamInst] -> [IfaceRule] -> !AnyHpcUsage -> !IfaceTrustInfo -> !Bool -> ![IfaceCompleteMatch] -> !Maybe Docs -> !IfaceBackendExts phase -> !ExtensibleFields -> !Fingerprint -> ModIface_ (phase :: ModIfacePhase)
- GHC: [initialUnique] :: DynFlags -> Word64
+ GHC: [initialUnique] :: DynFlags -> Word
- GHC: [mi_globals] :: ModIface_ (phase :: ModIfacePhase) -> !Maybe GlobalRdrEnv
+ GHC: [mi_globals] :: ModIface_ (phase :: ModIfacePhase) -> !Maybe IfGlobalRdrEnv
- GHC: [mi_warns] :: ModIface_ (phase :: ModIfacePhase) -> Warnings GhcRn
+ GHC: [mi_warns] :: ModIface_ (phase :: ModIfacePhase) -> IfaceWarnings
- GHC: [parMakeCount] :: DynFlags -> Maybe Int
+ GHC: [parMakeCount] :: DynFlags -> Maybe ParMakeCount
- GHC: class (Functor m, ExceptionMonad m, HasDynFlags m, HasLogger m) => GhcMonad m
+ GHC: class (Functor m, ExceptionMonad m, HasDynFlags m, HasLogger m) => GhcMonad (m :: Type -> Type)
- GHC: data GhcT m a
+ GHC: data GhcT (m :: Type -> Type) a
- GHC: data () => HValue
+ GHC: data HValue
- GHC: loadWithCache :: GhcMonad m => Maybe ModIfaceCache -> LoadHowMuch -> m SuccessFlag
+ GHC: loadWithCache :: GhcMonad m => Maybe ModIfaceCache -> (GhcMessage -> AnyGhcDiagnostic) -> LoadHowMuch -> m SuccessFlag
- GHC: modInfoRdrEnv :: ModuleInfo -> Maybe GlobalRdrEnv
+ GHC: modInfoRdrEnv :: ModuleInfo -> Maybe IfGlobalRdrEnv
- GHC: parseDynamicFlags :: MonadIO m => Logger -> DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
+ GHC: parseDynamicFlags :: MonadIO m => Logger -> DynFlags -> [Located String] -> m (DynFlags, [Located String], Messages DriverMessage)
- GHC: type WarnErrLogger = forall m. (HasDynFlags m, MonadIO m, HasLogger m) => Maybe SourceError -> m ()
+ GHC: type WarnErrLogger = forall (m :: Type -> Type). (HasDynFlags m, MonadIO m, HasLogger m) => Maybe SourceError -> m ()
- GHC: type ParsedSource = Located (HsModule GhcPs)
+ GHC: type ParsedSource = Located HsModule GhcPs
- GHC: type RenamedSource = (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)], Maybe (LHsDoc GhcRn))
+ GHC: type RenamedSource = (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)], Maybe LHsDoc GhcRn)
- GHC.Builtin.Names: mkInteractiveModule :: Int -> Module
+ GHC.Builtin.Names: mkInteractiveModule :: String -> Module
- GHC.ByteCode.Asm: data () => SizedSeq a
+ GHC.ByteCode.Asm: data SizedSeq a
- GHC.ByteCode.Instr: ALLOC_AP :: !Word16 -> BCInstr
+ GHC.ByteCode.Instr: ALLOC_AP :: !HalfWord -> BCInstr
- GHC.ByteCode.Instr: ALLOC_AP_NOUPD :: !Word16 -> BCInstr
+ GHC.ByteCode.Instr: ALLOC_AP_NOUPD :: !HalfWord -> BCInstr
- GHC.ByteCode.Instr: ALLOC_PAP :: !Word16 -> !Word16 -> BCInstr
+ GHC.ByteCode.Instr: ALLOC_PAP :: !HalfWord -> !HalfWord -> BCInstr
- GHC.ByteCode.Instr: BRK_FUN :: !Word16 -> RemotePtr ModuleName -> RemotePtr CostCentre -> BCInstr
+ GHC.ByteCode.Instr: BRK_FUN :: !Word16 -> Unique -> RemotePtr CostCentre -> BCInstr
- GHC.ByteCode.Instr: CCALL :: Word16 -> RemotePtr C_ffi_cif -> Word16 -> BCInstr
+ GHC.ByteCode.Instr: CCALL :: !WordOff -> RemotePtr C_ffi_cif -> !Word16 -> BCInstr
- GHC.ByteCode.Instr: MKAP :: !Word16 -> !Word16 -> BCInstr
+ GHC.ByteCode.Instr: MKAP :: !WordOff -> !HalfWord -> BCInstr
- GHC.ByteCode.Instr: MKPAP :: !Word16 -> !Word16 -> BCInstr
+ GHC.ByteCode.Instr: MKPAP :: !WordOff -> !HalfWord -> BCInstr
- GHC.ByteCode.Instr: PACK :: DataCon -> !Word16 -> BCInstr
+ GHC.ByteCode.Instr: PACK :: DataCon -> !WordOff -> BCInstr
- GHC.ByteCode.Instr: PUSH16 :: !Word16 -> BCInstr
+ GHC.ByteCode.Instr: PUSH16 :: !ByteOff -> BCInstr
- GHC.ByteCode.Instr: PUSH16_W :: !Word16 -> BCInstr
+ GHC.ByteCode.Instr: PUSH16_W :: !ByteOff -> BCInstr
- GHC.ByteCode.Instr: PUSH32 :: !Word16 -> BCInstr
+ GHC.ByteCode.Instr: PUSH32 :: !ByteOff -> BCInstr
- GHC.ByteCode.Instr: PUSH32_W :: !Word16 -> BCInstr
+ GHC.ByteCode.Instr: PUSH32_W :: !ByteOff -> BCInstr
- GHC.ByteCode.Instr: PUSH8 :: !Word16 -> BCInstr
+ GHC.ByteCode.Instr: PUSH8 :: !ByteOff -> BCInstr
- GHC.ByteCode.Instr: PUSH8_W :: !Word16 -> BCInstr
+ GHC.ByteCode.Instr: PUSH8_W :: !ByteOff -> BCInstr
- GHC.ByteCode.Instr: PUSH_L :: !Word16 -> BCInstr
+ GHC.ByteCode.Instr: PUSH_L :: !WordOff -> BCInstr
- GHC.ByteCode.Instr: PUSH_LL :: !Word16 -> !Word16 -> BCInstr
+ GHC.ByteCode.Instr: PUSH_LL :: !WordOff -> !WordOff -> BCInstr
- GHC.ByteCode.Instr: PUSH_LLL :: !Word16 -> !Word16 -> !Word16 -> BCInstr
+ GHC.ByteCode.Instr: PUSH_LLL :: !WordOff -> !WordOff -> !WordOff -> BCInstr
- GHC.ByteCode.Instr: PUSH_UBX :: Literal -> Word16 -> BCInstr
+ GHC.ByteCode.Instr: PUSH_UBX :: Literal -> !WordOff -> BCInstr
- GHC.ByteCode.Instr: ProtoBCO :: a -> [BCInstr] -> [StgWord] -> Word16 -> Int -> Either [CgStgAlt] CgStgRhs -> [FFIInfo] -> ProtoBCO a
+ GHC.ByteCode.Instr: ProtoBCO :: a -> [BCInstr] -> [StgWord] -> Word -> Int -> Either [CgStgAlt] CgStgRhs -> [FFIInfo] -> ProtoBCO a
- GHC.ByteCode.Instr: SLIDE :: Word16 -> Word16 -> BCInstr
+ GHC.ByteCode.Instr: SLIDE :: !WordOff -> !WordOff -> BCInstr
- GHC.ByteCode.Instr: STKCHECK :: Word -> BCInstr
+ GHC.ByteCode.Instr: STKCHECK :: !Word -> BCInstr
- GHC.ByteCode.Instr: SWIZZLE :: Word16 -> Word16 -> BCInstr
+ GHC.ByteCode.Instr: SWIZZLE :: !WordOff -> !Int -> BCInstr
- GHC.ByteCode.Instr: TESTEQ_D :: Double -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTEQ_D :: !Double -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTEQ_F :: Float -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTEQ_F :: !Float -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTEQ_I :: Int -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTEQ_I :: !Int -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTEQ_I16 :: Int16 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTEQ_I16 :: !Int16 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTEQ_I32 :: Int32 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTEQ_I32 :: !Int32 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTEQ_I64 :: Int64 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTEQ_I64 :: !Int64 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTEQ_I8 :: Int16 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTEQ_I8 :: !Int16 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTEQ_P :: Word16 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTEQ_P :: !Word16 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTEQ_W :: Word -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTEQ_W :: !Word -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTEQ_W16 :: Word16 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTEQ_W16 :: !Word16 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTEQ_W32 :: Word32 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTEQ_W32 :: !Word32 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTEQ_W64 :: Word64 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTEQ_W64 :: !Word64 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTEQ_W8 :: Word8 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTEQ_W8 :: !Word8 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTLT_D :: Double -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTLT_D :: !Double -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTLT_F :: Float -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTLT_F :: !Float -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTLT_I :: Int -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTLT_I :: !Int -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTLT_I16 :: Int16 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTLT_I16 :: !Int16 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTLT_I32 :: Int32 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTLT_I32 :: !Int32 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTLT_I64 :: Int64 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTLT_I64 :: !Int64 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTLT_I8 :: Int8 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTLT_I8 :: !Int8 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTLT_P :: Word16 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTLT_P :: !Word16 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTLT_W :: Word -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTLT_W :: !Word -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTLT_W16 :: Word16 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTLT_W16 :: !Word16 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTLT_W32 :: Word32 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTLT_W32 :: !Word32 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTLT_W64 :: Word64 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTLT_W64 :: !Word64 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: TESTLT_W8 :: Word8 -> LocalLabel -> BCInstr
+ GHC.ByteCode.Instr: TESTLT_W8 :: !Word8 -> LocalLabel -> BCInstr
- GHC.ByteCode.Instr: UNPACK :: !Word16 -> BCInstr
+ GHC.ByteCode.Instr: UNPACK :: !WordOff -> BCInstr
- GHC.ByteCode.Instr: [protoBCOBitmapSize] :: ProtoBCO a -> Word16
+ GHC.ByteCode.Instr: [protoBCOBitmapSize] :: ProtoBCO a -> Word
- GHC.ByteCode.Types: CgBreakInfo :: ![IfaceTvBndr] -> ![Maybe (IfaceIdBndr, Word16)] -> !IfaceType -> CgBreakInfo
+ GHC.ByteCode.Types: CgBreakInfo :: ![IfaceTvBndr] -> ![Maybe (IfaceIdBndr, Word)] -> !IfaceType -> CgBreakInfo
- GHC.ByteCode.Types: ModBreaks :: ForeignRef BreakArray -> !Array BreakIndex SrcSpan -> !Array BreakIndex [OccName] -> !Array BreakIndex [String] -> !Array BreakIndex (RemotePtr CostCentre) -> IntMap CgBreakInfo -> RemotePtr ModuleName -> ModBreaks
+ GHC.ByteCode.Types: ModBreaks :: ForeignRef BreakArray -> !Array BreakIndex SrcSpan -> !Array BreakIndex [OccName] -> !Array BreakIndex [String] -> !Array BreakIndex (RemotePtr CostCentre) -> IntMap CgBreakInfo -> ModBreaks
- GHC.ByteCode.Types: [cgb_vars] :: CgBreakInfo -> ![Maybe (IfaceIdBndr, Word16)]
+ GHC.ByteCode.Types: [cgb_vars] :: CgBreakInfo -> ![Maybe (IfaceIdBndr, Word)]
- GHC.Cmm: CmmGraph :: BlockId -> Graph n C C -> GenCmmGraph n
+ GHC.Cmm: CmmGraph :: BlockId -> Graph n C C -> GenCmmGraph (n :: Extensibility -> Extensibility -> Type)
- GHC.Cmm: [CmmStaticsRaw] :: CLabel -> [CmmStatic] -> GenCmmStatics a
+ GHC.Cmm: [CmmStaticsRaw] :: forall (rawOnly :: Bool). CLabel -> [CmmStatic] -> GenCmmStatics rawOnly
- GHC.Cmm: [g_entry] :: GenCmmGraph n -> BlockId
+ GHC.Cmm: [g_entry] :: GenCmmGraph (n :: Extensibility -> Extensibility -> Type) -> BlockId
- GHC.Cmm: [g_graph] :: GenCmmGraph n -> Graph n C C
+ GHC.Cmm: [g_graph] :: GenCmmGraph (n :: Extensibility -> Extensibility -> Type) -> Graph n C C
- GHC.Cmm: data GenCmmGraph n
+ GHC.Cmm: data GenCmmGraph (n :: Extensibility -> Extensibility -> Type)
- GHC.Cmm: topInfoTable :: GenCmmDecl a CmmTopInfo (GenCmmGraph n) -> Maybe CmmInfoTable
+ GHC.Cmm: topInfoTable :: forall a (n :: Extensibility -> Extensibility -> Type). GenCmmDecl a CmmTopInfo (GenCmmGraph n) -> Maybe CmmInfoTable
- GHC.Cmm: type RawCmmDecl = GenCmmDecl RawCmmStatics (LabelMap RawCmmStatics) CmmGraph
+ GHC.Cmm: type RawCmmDecl = GenCmmDecl RawCmmStatics LabelMap RawCmmStatics CmmGraph
- GHC.Cmm: type RawCmmGroup = GenCmmGroup RawCmmStatics (LabelMap RawCmmStatics) CmmGraph
+ GHC.Cmm: type RawCmmGroup = GenCmmGroup RawCmmStatics LabelMap RawCmmStatics CmmGraph
- GHC.Cmm.CLabel: InfoProvEnt :: !CLabel -> !Int -> !String -> !Module -> !Maybe (RealSrcSpan, String) -> InfoProvEnt
+ GHC.Cmm.CLabel: InfoProvEnt :: !CLabel -> !Int -> !String -> !Module -> !Maybe (RealSrcSpan, LexicalFastString) -> InfoProvEnt
- GHC.Cmm.CLabel: [infoTableProv] :: InfoProvEnt -> !Maybe (RealSrcSpan, String)
+ GHC.Cmm.CLabel: [infoTableProv] :: InfoProvEnt -> !Maybe (RealSrcSpan, LexicalFastString)
- GHC.Cmm.Dataflow: analyzeCmmBwd :: NonLocal node => DataflowLattice f -> TransferFun' node f -> GenCmmGraph node -> FactBase f -> FactBase f
+ GHC.Cmm.Dataflow: analyzeCmmBwd :: forall (node :: Extensibility -> Extensibility -> Type) f. NonLocal node => DataflowLattice f -> TransferFun' node f -> GenCmmGraph node -> FactBase f -> FactBase f
- GHC.Cmm.Dataflow: analyzeCmmFwd :: NonLocal node => DataflowLattice f -> TransferFun' node f -> GenCmmGraph node -> FactBase f -> FactBase f
+ GHC.Cmm.Dataflow: analyzeCmmFwd :: forall (node :: Extensibility -> Extensibility -> Type) f. NonLocal node => DataflowLattice f -> TransferFun' node f -> GenCmmGraph node -> FactBase f -> FactBase f
- GHC.Cmm.Dataflow: data Block n e x
+ GHC.Cmm.Dataflow: data Block (n :: Extensibility -> Extensibility -> Type) (e :: Extensibility) (x :: Extensibility)
- GHC.Cmm.Dataflow: entryLabel :: NonLocal thing => thing C x -> Label
+ GHC.Cmm.Dataflow: entryLabel :: forall (x :: Extensibility). NonLocal thing => thing C x -> Label
- GHC.Cmm.Dataflow: joinOutFacts :: NonLocal n => DataflowLattice f -> n e C -> FactBase f -> f
+ GHC.Cmm.Dataflow: joinOutFacts :: forall n f (e :: Extensibility). NonLocal n => DataflowLattice f -> n e C -> FactBase f -> f
- GHC.Cmm.Dataflow: lastNode :: Block n x C -> n O C
+ GHC.Cmm.Dataflow: lastNode :: forall n (x :: Extensibility). Block n x C -> n O C
- GHC.Cmm.Dataflow: rewriteCmmBwd :: NonLocal node => DataflowLattice f -> RewriteFun' node f -> GenCmmGraph node -> FactBase f -> UniqSM (GenCmmGraph node, FactBase f)
+ GHC.Cmm.Dataflow: rewriteCmmBwd :: forall (node :: Extensibility -> Extensibility -> Type) f. NonLocal node => DataflowLattice f -> RewriteFun' node f -> GenCmmGraph node -> FactBase f -> UniqSM (GenCmmGraph node, FactBase f)
- GHC.Cmm.Dataflow: type family Fact (x :: Extensibility) f :: Type
+ GHC.Cmm.Dataflow: type family Fact (x :: Extensibility) f
- GHC.Cmm.Dataflow.Block: [BCat] :: Block n O O -> Block n O O -> Block n O O
+ GHC.Cmm.Dataflow.Block: [BCat] :: forall (n :: Extensibility -> Extensibility -> Type). Block n O O -> Block n O O -> Block n 'Open 'Open
- GHC.Cmm.Dataflow.Block: [BCons] :: n O O -> Block n O O -> Block n O O
+ GHC.Cmm.Dataflow.Block: [BCons] :: forall (n :: Extensibility -> Extensibility -> Type). n O O -> Block n O O -> Block n 'Open 'Open
- GHC.Cmm.Dataflow.Block: [BMiddle] :: n O O -> Block n O O
+ GHC.Cmm.Dataflow.Block: [BMiddle] :: forall (n :: Extensibility -> Extensibility -> Type). n O O -> Block n 'Open 'Open
- GHC.Cmm.Dataflow.Block: [BNil] :: Block n O O
+ GHC.Cmm.Dataflow.Block: [BNil] :: forall (n :: Extensibility -> Extensibility -> Type). Block n 'Open 'Open
- GHC.Cmm.Dataflow.Block: [BSnoc] :: Block n O O -> n O O -> Block n O O
+ GHC.Cmm.Dataflow.Block: [BSnoc] :: forall (n :: Extensibility -> Extensibility -> Type). Block n O O -> n O O -> Block n 'Open 'Open
- GHC.Cmm.Dataflow.Block: [BlockCC] :: n C O -> Block n O O -> n O C -> Block n C C
+ GHC.Cmm.Dataflow.Block: [BlockCC] :: forall (n :: Extensibility -> Extensibility -> Type). n C O -> Block n O O -> n O C -> Block n 'Closed 'Closed
- GHC.Cmm.Dataflow.Block: [BlockCO] :: n C O -> Block n O O -> Block n C O
+ GHC.Cmm.Dataflow.Block: [BlockCO] :: forall (n :: Extensibility -> Extensibility -> Type). n C O -> Block n O O -> Block n 'Closed 'Open
- GHC.Cmm.Dataflow.Block: [BlockOC] :: Block n O O -> n O C -> Block n O C
+ GHC.Cmm.Dataflow.Block: [BlockOC] :: forall (n :: Extensibility -> Extensibility -> Type). Block n O O -> n O C -> Block n 'Open 'Closed
- GHC.Cmm.Dataflow.Block: [JustO] :: t -> MaybeO O t
+ GHC.Cmm.Dataflow.Block: [JustO] :: forall t. t -> MaybeO 'Open t
- GHC.Cmm.Dataflow.Block: [NothingO] :: MaybeO C t
+ GHC.Cmm.Dataflow.Block: [NothingO] :: forall t. MaybeO 'Closed t
- GHC.Cmm.Dataflow.Block: blockAppend :: Block n e O -> Block n O x -> Block n e x
+ GHC.Cmm.Dataflow.Block: blockAppend :: forall (n :: Extensibility -> Extensibility -> Type) (e :: Extensibility) (x :: Extensibility). Block n e O -> Block n O x -> Block n e x
- GHC.Cmm.Dataflow.Block: blockConcat :: [Block n O O] -> Block n O O
+ GHC.Cmm.Dataflow.Block: blockConcat :: forall (n :: Extensibility -> Extensibility -> Type). [Block n O O] -> Block n O O
- GHC.Cmm.Dataflow.Block: blockCons :: n O O -> Block n O x -> Block n O x
+ GHC.Cmm.Dataflow.Block: blockCons :: forall n (x :: Extensibility). n O O -> Block n O x -> Block n O x
- GHC.Cmm.Dataflow.Block: blockJoinHead :: n C O -> Block n O x -> Block n C x
+ GHC.Cmm.Dataflow.Block: blockJoinHead :: forall n (x :: Extensibility). n C O -> Block n O x -> Block n C x
- GHC.Cmm.Dataflow.Block: blockJoinTail :: Block n e O -> n O C -> Block n e C
+ GHC.Cmm.Dataflow.Block: blockJoinTail :: forall n (e :: Extensibility). Block n e O -> n O C -> Block n e C
- GHC.Cmm.Dataflow.Block: blockSnoc :: Block n e O -> n O O -> Block n e O
+ GHC.Cmm.Dataflow.Block: blockSnoc :: forall n (e :: Extensibility). Block n e O -> n O O -> Block n e O
- GHC.Cmm.Dataflow.Block: blockSplitHead :: Block n C x -> (n C O, Block n O x)
+ GHC.Cmm.Dataflow.Block: blockSplitHead :: forall n (x :: Extensibility). Block n C x -> (n C O, Block n O x)
- GHC.Cmm.Dataflow.Block: blockSplitTail :: Block n e C -> (Block n e O, n O C)
+ GHC.Cmm.Dataflow.Block: blockSplitTail :: forall n (e :: Extensibility). Block n e C -> (Block n e O, n O C)
- GHC.Cmm.Dataflow.Block: data Block n e x
+ GHC.Cmm.Dataflow.Block: data Block (n :: Extensibility -> Extensibility -> Type) (e :: Extensibility) (x :: Extensibility)
- GHC.Cmm.Dataflow.Block: data MaybeO ex t
+ GHC.Cmm.Dataflow.Block: data MaybeO (ex :: Extensibility) t
- GHC.Cmm.Dataflow.Block: emptyBlock :: Block n O O
+ GHC.Cmm.Dataflow.Block: emptyBlock :: forall (n :: Extensibility -> Extensibility -> Type). Block n O O
- GHC.Cmm.Dataflow.Block: firstNode :: Block n C x -> n C O
+ GHC.Cmm.Dataflow.Block: firstNode :: forall n (x :: Extensibility). Block n C x -> n C O
- GHC.Cmm.Dataflow.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
+ GHC.Cmm.Dataflow.Block: foldBlockNodesB :: (forall (e :: Extensibility) (x :: Extensibility). () => n e x -> a -> a) -> forall (e :: Extensibility) (x :: Extensibility). () => Block n e x -> IndexedCO x a a -> IndexedCO e a a
- GHC.Cmm.Dataflow.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
+ GHC.Cmm.Dataflow.Block: foldBlockNodesB3 :: forall n a b c. (n C O -> b -> c, n O O -> b -> b, n O C -> a -> b) -> forall (e :: Extensibility) (x :: Extensibility). () => Block n e x -> IndexedCO x a b -> IndexedCO e c b
- GHC.Cmm.Dataflow.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
+ GHC.Cmm.Dataflow.Block: foldBlockNodesF :: (forall (e :: Extensibility) (x :: Extensibility). () => n e x -> a -> a) -> forall (e :: Extensibility) (x :: Extensibility). () => Block n e x -> IndexedCO e a a -> IndexedCO x a a
- GHC.Cmm.Dataflow.Block: isEmptyBlock :: Block n e x -> Bool
+ GHC.Cmm.Dataflow.Block: isEmptyBlock :: forall (n :: Extensibility -> Extensibility -> Type) (e :: Extensibility) (x :: Extensibility). Block n e x -> Bool
- GHC.Cmm.Dataflow.Block: lastNode :: Block n x C -> n O C
+ GHC.Cmm.Dataflow.Block: lastNode :: forall n (x :: Extensibility). Block n x C -> n O C
- GHC.Cmm.Dataflow.Block: mapBlock :: (forall e x. n e x -> n' e x) -> Block n e x -> Block n' e x
+ GHC.Cmm.Dataflow.Block: mapBlock :: forall n n' (e :: Extensibility) (x :: Extensibility). (forall (e1 :: Extensibility) (x1 :: Extensibility). () => n e1 x1 -> n' e1 x1) -> Block n e x -> Block n' e x
- GHC.Cmm.Dataflow.Block: mapBlock' :: (forall e x. n e x -> n' e x) -> Block n e x -> Block n' e x
+ GHC.Cmm.Dataflow.Block: mapBlock' :: forall n n' (e :: Extensibility) (x :: Extensibility). (forall (e1 :: Extensibility) (x1 :: Extensibility). () => n e1 x1 -> n' e1 x1) -> Block n e x -> Block n' e x
- GHC.Cmm.Dataflow.Block: mapBlock3' :: forall n n' e x. (n C O -> n' C O, n O O -> n' O O, n O C -> n' O C) -> Block n e x -> Block n' e x
+ GHC.Cmm.Dataflow.Block: mapBlock3' :: forall n n' (e :: Extensibility) (x :: Extensibility). (n C O -> n' C O, n O O -> n' O O, n O C -> n' O C) -> Block n e x -> Block n' e x
- GHC.Cmm.Dataflow.Block: replaceFirstNode :: Block n C x -> n C O -> Block n C x
+ GHC.Cmm.Dataflow.Block: replaceFirstNode :: forall n (x :: Extensibility). Block n C x -> n C O -> Block n C x
- GHC.Cmm.Dataflow.Block: replaceLastNode :: Block n x C -> n O C -> Block n x C
+ GHC.Cmm.Dataflow.Block: replaceLastNode :: forall n (x :: Extensibility). Block n x C -> n O C -> Block n x C
- GHC.Cmm.Dataflow.Collections: class IsMap map where {
+ GHC.Cmm.Dataflow.Collections: class IsMap (map :: Type -> Type) where {
- GHC.Cmm.Dataflow.Collections: type KeyOf map;
+ GHC.Cmm.Dataflow.Collections: type KeyOf (map :: Type -> Type);
- GHC.Cmm.Dataflow.Graph: [GMany] :: MaybeO e (block n O C) -> Body' block n -> MaybeO x (block n C O) -> Graph' block n e x
+ GHC.Cmm.Dataflow.Graph: [GMany] :: forall (e :: Extensibility) (block :: (Extensibility -> Extensibility -> Type) -> Extensibility -> Extensibility -> Type) (n :: Extensibility -> Extensibility -> Type) (x :: Extensibility). MaybeO e (block n O C) -> Body' block n -> MaybeO x (block n C O) -> Graph' block n e x
- GHC.Cmm.Dataflow.Graph: [GNil] :: Graph' block n O O
+ GHC.Cmm.Dataflow.Graph: [GNil] :: forall (block :: (Extensibility -> Extensibility -> Type) -> Extensibility -> Extensibility -> Type) (n :: Extensibility -> Extensibility -> Type). Graph' block n 'Open 'Open
- GHC.Cmm.Dataflow.Graph: [GUnit] :: block n O O -> Graph' block n O O
+ GHC.Cmm.Dataflow.Graph: [GUnit] :: forall (block :: (Extensibility -> Extensibility -> Type) -> Extensibility -> Extensibility -> Type) (n :: Extensibility -> Extensibility -> Type). block n O O -> Graph' block n 'Open 'Open
- GHC.Cmm.Dataflow.Graph: bodyList :: Body' block n -> [(Label, block n C C)]
+ GHC.Cmm.Dataflow.Graph: bodyList :: forall block (n :: Extensibility -> Extensibility -> Type). Body' block n -> [(Label, block n C C)]
- GHC.Cmm.Dataflow.Graph: bodyToBlockList :: Body n -> [Block n C C]
+ GHC.Cmm.Dataflow.Graph: bodyToBlockList :: forall (n :: Extensibility -> Extensibility -> Type). Body n -> [Block n C C]
- GHC.Cmm.Dataflow.Graph: class NonLocal thing
+ GHC.Cmm.Dataflow.Graph: class NonLocal (thing :: Extensibility -> Extensibility -> Type)
- GHC.Cmm.Dataflow.Graph: data Graph' block (n :: Extensibility -> Extensibility -> Type) e x
+ GHC.Cmm.Dataflow.Graph: data Graph' (block :: Extensibility -> Extensibility -> Type -> Extensibility -> Extensibility -> Type) (n :: Extensibility -> Extensibility -> Type) (e :: Extensibility) (x :: Extensibility)
- GHC.Cmm.Dataflow.Graph: emptyBody :: Body' block n
+ GHC.Cmm.Dataflow.Graph: emptyBody :: forall block (n :: Extensibility -> Extensibility -> Type). Body' block n
- GHC.Cmm.Dataflow.Graph: entryLabel :: NonLocal thing => thing C x -> Label
+ GHC.Cmm.Dataflow.Graph: entryLabel :: forall (x :: Extensibility). NonLocal thing => thing C x -> Label
- GHC.Cmm.Dataflow.Graph: labelsDefined :: forall block n e x. NonLocal (block n) => Graph' block n e x -> LabelSet
+ GHC.Cmm.Dataflow.Graph: labelsDefined :: forall (block :: (Extensibility -> Extensibility -> Type) -> Extensibility -> Extensibility -> Type) (n :: Extensibility -> Extensibility -> Type) (e :: Extensibility) (x :: Extensibility). NonLocal (block n) => Graph' block n e x -> LabelSet
- GHC.Cmm.Dataflow.Graph: mapGraph :: (forall e x. n e x -> n' e x) -> Graph n e x -> Graph n' e x
+ GHC.Cmm.Dataflow.Graph: mapGraph :: forall n n' (e :: Extensibility) (x :: Extensibility). (forall (e1 :: Extensibility) (x1 :: Extensibility). () => n e1 x1 -> n' e1 x1) -> Graph n e x -> Graph n' e x
- GHC.Cmm.Dataflow.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
+ GHC.Cmm.Dataflow.Graph: mapGraphBlocks :: forall block (n :: Extensibility -> Extensibility -> Type) block' (n' :: Extensibility -> Extensibility -> Type) (e :: Extensibility) (x :: Extensibility). (forall (e1 :: Extensibility) (x1 :: Extensibility). () => block n e1 x1 -> block' n' e1 x1) -> Graph' block n e x -> Graph' block' n' e x
- GHC.Cmm.Dataflow.Graph: revPostorderFrom :: forall block. NonLocal block => LabelMap (block C C) -> Label -> [block C C]
+ GHC.Cmm.Dataflow.Graph: revPostorderFrom :: NonLocal block => LabelMap (block C C) -> Label -> [block C C]
- GHC.Cmm.Dataflow.Graph: successors :: NonLocal thing => thing e C -> [Label]
+ GHC.Cmm.Dataflow.Graph: successors :: forall (e :: Extensibility). NonLocal thing => thing e C -> [Label]
- GHC.Cmm.Dataflow.Graph: type Body n = LabelMap (Block n C C)
+ GHC.Cmm.Dataflow.Graph: type Body (n :: Extensibility -> Extensibility -> Type) = LabelMap Block n C C
- GHC.Cmm.Dataflow.Label: mkHooplLabel :: Word64 -> Label
+ GHC.Cmm.Dataflow.Label: mkHooplLabel :: Int -> Label
- GHC.Cmm.DebugBlock: UwReg :: !GlobalReg -> !Int -> UnwindExpr
+ GHC.Cmm.DebugBlock: UwReg :: !GlobalRegUse -> !Int -> UnwindExpr
- GHC.Cmm.DebugBlock: type UnwindTable = Map GlobalReg (Maybe UnwindExpr)
+ GHC.Cmm.DebugBlock: type UnwindTable = Map GlobalReg Maybe UnwindExpr
- GHC.Cmm.Dominators: GraphWithDominators :: GenCmmGraph node -> LabelMap DominatorSet -> LabelMap RPNum -> GraphWithDominators node
+ GHC.Cmm.Dominators: GraphWithDominators :: GenCmmGraph node -> LabelMap DominatorSet -> LabelMap RPNum -> GraphWithDominators (node :: Extensibility -> Extensibility -> Type)
- GHC.Cmm.Dominators: [gwd_dominators] :: GraphWithDominators node -> LabelMap DominatorSet
+ GHC.Cmm.Dominators: [gwd_dominators] :: GraphWithDominators (node :: Extensibility -> Extensibility -> Type) -> LabelMap DominatorSet
- GHC.Cmm.Dominators: [gwd_graph] :: GraphWithDominators node -> GenCmmGraph node
+ GHC.Cmm.Dominators: [gwd_graph] :: GraphWithDominators (node :: Extensibility -> Extensibility -> Type) -> GenCmmGraph node
- GHC.Cmm.Dominators: [gwd_rpnumbering] :: GraphWithDominators node -> LabelMap RPNum
+ GHC.Cmm.Dominators: [gwd_rpnumbering] :: GraphWithDominators (node :: Extensibility -> Extensibility -> Type) -> LabelMap RPNum
- GHC.Cmm.Dominators: data GraphWithDominators node
+ GHC.Cmm.Dominators: data GraphWithDominators (node :: Extensibility -> Extensibility -> Type)
- GHC.Cmm.Dominators: graphMap :: GenCmmGraph n -> LabelMap (Block n C C)
+ GHC.Cmm.Dominators: graphMap :: forall (n :: Extensibility -> Extensibility -> Type). GenCmmGraph n -> LabelMap (Block n C C)
- GHC.Cmm.Dominators: graphWithDominators :: forall node. (NonLocal node, HasDebugCallStack) => GenCmmGraph node -> GraphWithDominators node
+ GHC.Cmm.Dominators: graphWithDominators :: forall (node :: Extensibility -> Extensibility -> Type). (NonLocal node, HasDebugCallStack) => GenCmmGraph node -> GraphWithDominators node
- GHC.Cmm.Dominators: gwdDominatorTree :: GraphWithDominators node -> Tree Label
+ GHC.Cmm.Dominators: gwdDominatorTree :: forall (node :: Extensibility -> Extensibility -> Type). GraphWithDominators node -> Tree Label
- GHC.Cmm.Dominators: gwdDominatorsOf :: HasDebugCallStack => GraphWithDominators node -> Label -> DominatorSet
+ GHC.Cmm.Dominators: gwdDominatorsOf :: forall (node :: Extensibility -> Extensibility -> Type). HasDebugCallStack => GraphWithDominators node -> Label -> DominatorSet
- GHC.Cmm.Dominators: gwdRPNumber :: HasDebugCallStack => GraphWithDominators node -> Label -> RPNum
+ GHC.Cmm.Dominators: gwdRPNumber :: forall (node :: Extensibility -> Extensibility -> Type). HasDebugCallStack => GraphWithDominators node -> Label -> RPNum
- GHC.Cmm.Expr: CmmGlobal :: GlobalReg -> CmmReg
+ GHC.Cmm.Expr: CmmGlobal :: GlobalRegUse -> CmmReg
- GHC.Cmm.Expr: VanillaReg :: {-# UNPACK #-} !Int -> VGcPtr -> GlobalReg
+ GHC.Cmm.Expr: VanillaReg :: {-# UNPACK #-} !Int -> GlobalReg
- GHC.Cmm.Expr: baseReg :: CmmReg
+ GHC.Cmm.Expr: baseReg :: Platform -> CmmReg
- GHC.Cmm.Expr: cccsReg :: CmmReg
+ GHC.Cmm.Expr: cccsReg :: Platform -> CmmReg
- GHC.Cmm.Expr: cmmRegType :: Platform -> CmmReg -> CmmType
+ GHC.Cmm.Expr: cmmRegType :: CmmReg -> CmmType
- GHC.Cmm.Expr: cmmRegWidth :: Platform -> CmmReg -> Width
+ GHC.Cmm.Expr: cmmRegWidth :: CmmReg -> Width
- GHC.Cmm.Expr: currentNurseryReg :: CmmReg
+ GHC.Cmm.Expr: currentNurseryReg :: Platform -> CmmReg
- GHC.Cmm.Expr: currentTSOReg :: CmmReg
+ GHC.Cmm.Expr: currentTSOReg :: Platform -> CmmReg
- GHC.Cmm.Expr: hpAllocReg :: CmmReg
+ GHC.Cmm.Expr: hpAllocReg :: Platform -> CmmReg
- GHC.Cmm.Expr: hpLimReg :: CmmReg
+ GHC.Cmm.Expr: hpLimReg :: Platform -> CmmReg
- GHC.Cmm.Expr: hpReg :: CmmReg
+ GHC.Cmm.Expr: hpReg :: Platform -> CmmReg
- GHC.Cmm.Expr: nodeReg :: CmmReg
+ GHC.Cmm.Expr: nodeReg :: Platform -> CmmReg
- GHC.Cmm.Expr: spLimReg :: CmmReg
+ GHC.Cmm.Expr: spLimReg :: Platform -> CmmReg
- GHC.Cmm.Expr: spReg :: CmmReg
+ GHC.Cmm.Expr: spReg :: Platform -> CmmReg
- GHC.Cmm.Info.Build: type SRTMap = Map CAFfyLabel (Maybe SRTEntry)
+ GHC.Cmm.Info.Build: type SRTMap = Map CAFfyLabel Maybe SRTEntry
- GHC.Cmm.LRegSet: elemsLRegSet :: Word64Set -> [Word64]
+ GHC.Cmm.LRegSet: elemsLRegSet :: IntSet -> [Int]
- GHC.Cmm.LRegSet: plusLRegSet :: Word64Set -> Word64Set -> Word64Set
+ GHC.Cmm.LRegSet: plusLRegSet :: IntSet -> IntSet -> IntSet
- GHC.Cmm.LRegSet: sizeLRegSet :: Word64Set -> Int
+ GHC.Cmm.LRegSet: sizeLRegSet :: IntSet -> Int
- GHC.Cmm.LRegSet: type LRegKey = Word64
+ GHC.Cmm.LRegSet: type LRegKey = Int
- GHC.Cmm.LRegSet: type LRegSet = Word64Set
+ GHC.Cmm.LRegSet: type LRegSet = IntSet
- GHC.Cmm.Lexer: CmmT_GlobalReg :: GlobalReg -> CmmToken
+ GHC.Cmm.Lexer: CmmT_GlobalReg :: GlobalRegUse -> CmmToken
- GHC.Cmm.Node: [CmmAssign] :: !CmmReg -> !CmmExpr -> CmmNode O O
+ GHC.Cmm.Node: [CmmAssign] :: !CmmReg -> !CmmExpr -> CmmNode 'Open 'Open
- GHC.Cmm.Node: [CmmBranch] :: {-# UNPACK #-} !Label -> CmmNode O C
+ GHC.Cmm.Node: [CmmBranch] :: {-# UNPACK #-} !Label -> CmmNode 'Open 'Closed
- GHC.Cmm.Node: [CmmCall] :: CmmExpr -> Maybe Label -> [GlobalReg] -> ByteOff -> ByteOff -> ByteOff -> CmmNode O C
+ GHC.Cmm.Node: [CmmCall] :: CmmExpr -> Maybe Label -> [GlobalReg] -> ByteOff -> ByteOff -> ByteOff -> CmmNode 'Open 'Closed
- GHC.Cmm.Node: [CmmComment] :: FastString -> CmmNode O O
+ GHC.Cmm.Node: [CmmComment] :: FastString -> CmmNode 'Open 'Open
- GHC.Cmm.Node: [CmmCondBranch] :: CmmExpr -> {-# UNPACK #-} !Label -> Maybe Bool -> CmmNode O C
+ GHC.Cmm.Node: [CmmCondBranch] :: CmmExpr -> {-# UNPACK #-} !Label -> {-# UNPACK #-} !Label -> Maybe Bool -> CmmNode 'Open 'Closed
- GHC.Cmm.Node: [CmmEntry] :: {-# UNPACK #-} !Label -> CmmTickScope -> CmmNode C O
+ GHC.Cmm.Node: [CmmEntry] :: {-# UNPACK #-} !Label -> CmmTickScope -> CmmNode 'Closed 'Open
- GHC.Cmm.Node: [CmmForeignCall] :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> {-# UNPACK #-} !Label -> ByteOff -> ByteOff -> Bool -> CmmNode O C
+ GHC.Cmm.Node: [CmmForeignCall] :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> {-# UNPACK #-} !Label -> ByteOff -> ByteOff -> Bool -> CmmNode 'Open 'Closed
- GHC.Cmm.Node: [CmmStore] :: !CmmExpr -> !CmmExpr -> !AlignmentSpec -> CmmNode O O
+ GHC.Cmm.Node: [CmmStore] :: !CmmExpr -> !CmmExpr -> !AlignmentSpec -> CmmNode 'Open 'Open
- GHC.Cmm.Node: [CmmSwitch] :: CmmExpr -> SwitchTargets -> CmmNode O C
+ GHC.Cmm.Node: [CmmSwitch] :: CmmExpr -> SwitchTargets -> CmmNode 'Open 'Closed
- GHC.Cmm.Node: [CmmTick] :: !CmmTickish -> CmmNode O O
+ GHC.Cmm.Node: [CmmTick] :: !CmmTickish -> CmmNode 'Open 'Open
- GHC.Cmm.Node: [CmmUnsafeForeignCall] :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> CmmNode O O
+ GHC.Cmm.Node: [CmmUnsafeForeignCall] :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> CmmNode 'Open 'Open
- GHC.Cmm.Node: [CmmUnwind] :: [(GlobalReg, Maybe CmmExpr)] -> CmmNode O O
+ GHC.Cmm.Node: [CmmUnwind] :: [(GlobalReg, Maybe CmmExpr)] -> CmmNode 'Open 'Open
- GHC.Cmm.Node: data CmmNode e x
+ GHC.Cmm.Node: data CmmNode (e :: Extensibility) (x :: Extensibility)
- GHC.Cmm.Node: foldExp :: (CmmExpr -> z -> z) -> CmmNode e x -> z -> z
+ GHC.Cmm.Node: foldExp :: forall z (e :: Extensibility) (x :: Extensibility). (CmmExpr -> z -> z) -> CmmNode e x -> z -> z
- GHC.Cmm.Node: foldExpDeep :: (CmmExpr -> z -> z) -> CmmNode e x -> z -> z
+ GHC.Cmm.Node: foldExpDeep :: forall z (e :: Extensibility) (x :: Extensibility). (CmmExpr -> z -> z) -> CmmNode e x -> z -> z
- GHC.Cmm.Node: mapCollectSuccessors :: forall a. (Label -> (Label, a)) -> CmmNode O C -> (CmmNode O C, [a])
+ GHC.Cmm.Node: mapCollectSuccessors :: (Label -> (Label, a)) -> CmmNode O C -> (CmmNode O C, [a])
- GHC.Cmm.Node: mapExp :: (CmmExpr -> CmmExpr) -> CmmNode e x -> CmmNode e x
+ GHC.Cmm.Node: mapExp :: forall (e :: Extensibility) (x :: Extensibility). (CmmExpr -> CmmExpr) -> CmmNode e x -> CmmNode e x
- GHC.Cmm.Node: mapExpDeep :: (CmmExpr -> CmmExpr) -> CmmNode e x -> CmmNode e x
+ GHC.Cmm.Node: mapExpDeep :: forall (e :: Extensibility) (x :: Extensibility). (CmmExpr -> CmmExpr) -> CmmNode e x -> CmmNode e x
- GHC.Cmm.Node: mapExpDeepM :: (CmmExpr -> Maybe CmmExpr) -> CmmNode e x -> Maybe (CmmNode e x)
+ GHC.Cmm.Node: mapExpDeepM :: forall (e :: Extensibility) (x :: Extensibility). (CmmExpr -> Maybe CmmExpr) -> CmmNode e x -> Maybe (CmmNode e x)
- GHC.Cmm.Node: mapExpM :: (CmmExpr -> Maybe CmmExpr) -> CmmNode e x -> Maybe (CmmNode e x)
+ GHC.Cmm.Node: mapExpM :: forall (e :: Extensibility) (x :: Extensibility). (CmmExpr -> Maybe CmmExpr) -> CmmNode e x -> Maybe (CmmNode e x)
- GHC.Cmm.Opt: constantFoldNode :: Platform -> CmmNode e x -> CmmNode e x
+ GHC.Cmm.Opt: constantFoldNode :: forall (e :: Extensibility) (x :: Extensibility). Platform -> CmmNode e x -> CmmNode e x
- GHC.Cmm.Reducibility: reducibility :: NonLocal node => GraphWithDominators node -> Reducibility
+ GHC.Cmm.Reducibility: reducibility :: forall (node :: Extensibility -> Extensibility -> Type). NonLocal node => GraphWithDominators node -> Reducibility
- GHC.Cmm.Reg: CmmGlobal :: GlobalReg -> CmmReg
+ GHC.Cmm.Reg: CmmGlobal :: GlobalRegUse -> CmmReg
- GHC.Cmm.Reg: VanillaReg :: {-# UNPACK #-} !Int -> VGcPtr -> GlobalReg
+ GHC.Cmm.Reg: VanillaReg :: {-# UNPACK #-} !Int -> GlobalReg
- GHC.Cmm.Reg: baseReg :: CmmReg
+ GHC.Cmm.Reg: baseReg :: Platform -> CmmReg
- GHC.Cmm.Reg: cccsReg :: CmmReg
+ GHC.Cmm.Reg: cccsReg :: Platform -> CmmReg
- GHC.Cmm.Reg: cmmRegType :: Platform -> CmmReg -> CmmType
+ GHC.Cmm.Reg: cmmRegType :: CmmReg -> CmmType
- GHC.Cmm.Reg: cmmRegWidth :: Platform -> CmmReg -> Width
+ GHC.Cmm.Reg: cmmRegWidth :: CmmReg -> Width
- GHC.Cmm.Reg: currentNurseryReg :: CmmReg
+ GHC.Cmm.Reg: currentNurseryReg :: Platform -> CmmReg
- GHC.Cmm.Reg: currentTSOReg :: CmmReg
+ GHC.Cmm.Reg: currentTSOReg :: Platform -> CmmReg
- GHC.Cmm.Reg: hpAllocReg :: CmmReg
+ GHC.Cmm.Reg: hpAllocReg :: Platform -> CmmReg
- GHC.Cmm.Reg: hpLimReg :: CmmReg
+ GHC.Cmm.Reg: hpLimReg :: Platform -> CmmReg
- GHC.Cmm.Reg: hpReg :: CmmReg
+ GHC.Cmm.Reg: hpReg :: Platform -> CmmReg
- GHC.Cmm.Reg: nodeReg :: CmmReg
+ GHC.Cmm.Reg: nodeReg :: Platform -> CmmReg
- GHC.Cmm.Reg: spLimReg :: CmmReg
+ GHC.Cmm.Reg: spLimReg :: Platform -> CmmReg
- GHC.Cmm.Reg: spReg :: CmmReg
+ GHC.Cmm.Reg: spReg :: Platform -> CmmReg
- GHC.Cmm.Utils: baseExpr :: CmmExpr
+ GHC.Cmm.Utils: baseExpr :: Platform -> CmmExpr
- GHC.Cmm.Utils: cccsExpr :: CmmExpr
+ GHC.Cmm.Utils: cccsExpr :: Platform -> CmmExpr
- GHC.Cmm.Utils: currentNurseryExpr :: CmmExpr
+ GHC.Cmm.Utils: currentNurseryExpr :: Platform -> CmmExpr
- GHC.Cmm.Utils: currentTSOExpr :: CmmExpr
+ GHC.Cmm.Utils: currentTSOExpr :: Platform -> CmmExpr
- GHC.Cmm.Utils: hpExpr :: CmmExpr
+ GHC.Cmm.Utils: hpExpr :: Platform -> CmmExpr
- GHC.Cmm.Utils: hpLimExpr :: CmmExpr
+ GHC.Cmm.Utils: hpLimExpr :: Platform -> CmmExpr
- GHC.Cmm.Utils: mapGraphNodes1 :: (forall e x. CmmNode e x -> CmmNode e x) -> CmmGraph -> CmmGraph
+ GHC.Cmm.Utils: mapGraphNodes1 :: (forall (e :: Extensibility) (x :: Extensibility). () => CmmNode e x -> CmmNode e x) -> CmmGraph -> CmmGraph
- GHC.Cmm.Utils: mkByteStringCLit :: CLabel -> ByteString -> (CmmLit, GenCmmDecl (GenCmmStatics raw) info stmt)
+ GHC.Cmm.Utils: mkByteStringCLit :: forall (raw :: Bool) info stmt. CLabel -> ByteString -> (CmmLit, GenCmmDecl (GenCmmStatics raw) info stmt)
- GHC.Cmm.Utils: mkDataLits :: Section -> CLabel -> [CmmLit] -> GenCmmDecl (GenCmmStatics raw) info stmt
+ GHC.Cmm.Utils: mkDataLits :: forall (raw :: Bool) info stmt. Section -> CLabel -> [CmmLit] -> GenCmmDecl (GenCmmStatics raw) info stmt
- GHC.Cmm.Utils: mkFileEmbedLit :: CLabel -> FilePath -> Int -> (CmmLit, GenCmmDecl (GenCmmStatics raw) info stmt)
+ GHC.Cmm.Utils: mkFileEmbedLit :: forall (raw :: Bool) info stmt. CLabel -> FilePath -> Int -> (CmmLit, GenCmmDecl (GenCmmStatics raw) info stmt)
- GHC.Cmm.Utils: mkRODataLits :: CLabel -> [CmmLit] -> GenCmmDecl (GenCmmStatics raw) info stmt
+ GHC.Cmm.Utils: mkRODataLits :: forall (raw :: Bool) info stmt. CLabel -> [CmmLit] -> GenCmmDecl (GenCmmStatics raw) info stmt
- GHC.Cmm.Utils: modifyGraph :: (Graph n C C -> Graph n' C C) -> GenCmmGraph n -> GenCmmGraph n'
+ GHC.Cmm.Utils: modifyGraph :: forall (n :: Extensibility -> Extensibility -> Type) (n' :: Extensibility -> Extensibility -> Type). (Graph n C C -> Graph n' C C) -> GenCmmGraph n -> GenCmmGraph n'
- GHC.Cmm.Utils: spExpr :: CmmExpr
+ GHC.Cmm.Utils: spExpr :: Platform -> CmmExpr
- GHC.Cmm.Utils: spLimExpr :: CmmExpr
+ GHC.Cmm.Utils: spLimExpr :: Platform -> CmmExpr
- GHC.CmmToAsm: nativeCodeGen :: forall a. Logger -> ToolSettings -> NCGConfig -> ModLocation -> Handle -> UniqSupply -> Stream IO RawCmmGroup a -> IO a
+ GHC.CmmToAsm: nativeCodeGen :: Logger -> ToolSettings -> NCGConfig -> ModLocation -> Handle -> UniqSupply -> Stream IO RawCmmGroup a -> IO a
- GHC.CmmToAsm.AArch64.Instr: stackFrameHeaderSize :: Platform -> Int
+ GHC.CmmToAsm.AArch64.Instr: stackFrameHeaderSize :: Int
- GHC.CmmToAsm.AArch64.Ppr: pprBasicBlock :: IsDoc doc => NCGConfig -> LabelMap RawCmmStatics -> NatBasicBlock Instr -> doc
+ GHC.CmmToAsm.AArch64.Ppr: pprBasicBlock :: IsDoc doc => Platform -> Bool -> LabelMap RawCmmStatics -> NatBasicBlock Instr -> doc
- GHC.CmmToAsm.CFG.Dominators: type Graph = Word64Map Word64Set
+ GHC.CmmToAsm.CFG.Dominators: type Graph = IntMap IntSet
- GHC.CmmToAsm.CFG.Dominators: type Node = Word64
+ GHC.CmmToAsm.CFG.Dominators: type Node = Int
- GHC.CmmToAsm.Dwarf.Types: pprDwarfFrame :: forall doc. IsDoc doc => Platform -> DwarfFrame -> doc
+ GHC.CmmToAsm.Dwarf.Types: pprDwarfFrame :: IsDoc doc => Platform -> DwarfFrame -> doc
- GHC.CmmToAsm.PIC: class Monad m => CmmMakeDynamicReferenceM m
+ GHC.CmmToAsm.PIC: class Monad m => CmmMakeDynamicReferenceM (m :: Type -> Type)
- GHC.CmmToAsm.Ppr: pprASCII :: forall doc. IsLine doc => ByteString -> doc
+ GHC.CmmToAsm.Ppr: pprASCII :: IsLine doc => ByteString -> doc
- GHC.CmmToAsm.Reg.Graph.SpillCost: slurpSpillCostInfo :: forall instr statics. Instruction instr => Platform -> Maybe CFG -> LiveCmmDecl statics instr -> SpillCostInfo
+ GHC.CmmToAsm.Reg.Graph.SpillCost: slurpSpillCostInfo :: Instruction instr => Platform -> Maybe CFG -> LiveCmmDecl statics instr -> SpillCostInfo
- GHC.CmmToAsm.Reg.Liveness: type LiveBasicBlock instr = GenBasicBlock (LiveInstr instr)
+ GHC.CmmToAsm.Reg.Liveness: type LiveBasicBlock instr = GenBasicBlock LiveInstr instr
- GHC.CmmToAsm.Reg.Liveness: type LiveCmmDecl statics instr = GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
+ GHC.CmmToAsm.Reg.Liveness: type LiveCmmDecl statics instr = GenCmmDecl statics LiveInfo [SCC LiveBasicBlock instr]
- GHC.CmmToAsm.Types: type NatCmm instr = GenCmmGroup RawCmmStatics (LabelMap RawCmmStatics) (ListGraph instr)
+ GHC.CmmToAsm.Types: type NatCmm instr = GenCmmGroup RawCmmStatics LabelMap RawCmmStatics ListGraph instr
- GHC.CmmToAsm.Types: type NatCmmDecl statics instr = GenCmmDecl statics (LabelMap RawCmmStatics) (ListGraph instr)
+ GHC.CmmToAsm.Types: type NatCmmDecl statics instr = GenCmmDecl statics LabelMap RawCmmStatics ListGraph instr
- GHC.CmmToAsm.Types: type RawCmmDecl = GenCmmDecl RawCmmStatics (LabelMap RawCmmStatics) CmmGraph
+ GHC.CmmToAsm.Types: type RawCmmDecl = GenCmmDecl RawCmmStatics LabelMap RawCmmStatics CmmGraph
- GHC.CmmToAsm.Wasm.Asm: asmTellEverything :: WasmTypeTag w -> WasmCodeGenState w -> WasmAsmM ()
+ GHC.CmmToAsm.Wasm.Asm: asmTellEverything :: forall (w :: WasmType). WasmTypeTag w -> WasmCodeGenState w -> WasmAsmM ()
- GHC.CmmToAsm.Wasm.FromCmm: alignmentFromWordType :: WasmTypeTag w -> Alignment
+ GHC.CmmToAsm.Wasm.FromCmm: alignmentFromWordType :: forall (w :: WasmType). WasmTypeTag w -> Alignment
- GHC.CmmToAsm.Wasm.FromCmm: globalInfoFromCmmGlobalReg :: WasmTypeTag w -> GlobalReg -> Maybe GlobalInfo
+ GHC.CmmToAsm.Wasm.FromCmm: globalInfoFromCmmGlobalReg :: forall (w :: WasmType). WasmTypeTag w -> GlobalReg -> Maybe GlobalInfo
- GHC.CmmToAsm.Wasm.FromCmm: onCmmGroup :: RawCmmGroup -> WasmCodeGenM w ()
+ GHC.CmmToAsm.Wasm.FromCmm: onCmmGroup :: forall (w :: WasmType). RawCmmGroup -> WasmCodeGenM w ()
- GHC.CmmToAsm.Wasm.Types: FuncBody :: [SomeWasmType] -> WasmControl (WasmStatements w) (WasmExpr w w) '[] '[w] -> FuncBody w
+ GHC.CmmToAsm.Wasm.Types: FuncBody :: [SomeWasmType] -> WasmControl (WasmStatements w) (WasmExpr w w) ('[] :: [WasmType]) '[w] -> FuncBody (w :: WasmType)
- GHC.CmmToAsm.Wasm.Types: WasmCodeGenM :: State (WasmCodeGenState w) a -> WasmCodeGenM w a
+ GHC.CmmToAsm.Wasm.Types: WasmCodeGenM :: State (WasmCodeGenState w) a -> WasmCodeGenM (w :: WasmType) a
- GHC.CmmToAsm.Wasm.Types: WasmCodeGenState :: Platform -> SymSet -> SymMap ([SomeWasmType], [SomeWasmType]) -> SymMap (FuncBody w) -> SymMap DataSection -> [SymName] -> UniqFM LocalReg LocalInfo -> Int -> UniqSupply -> WasmCodeGenState w
+ GHC.CmmToAsm.Wasm.Types: WasmCodeGenState :: Platform -> SymSet -> SymMap ([SomeWasmType], [SomeWasmType]) -> SymMap (FuncBody w) -> SymMap DataSection -> [SymName] -> UniqFM LocalReg LocalInfo -> Int -> UniqSupply -> WasmCodeGenState (w :: WasmType)
- GHC.CmmToAsm.Wasm.Types: WasmExpr :: (forall pre. WasmInstr w pre (t : pre)) -> WasmExpr w t
+ GHC.CmmToAsm.Wasm.Types: WasmExpr :: (forall (pre :: [WasmType]). () => WasmInstr w pre (t ': pre)) -> WasmExpr (w :: WasmType) (t :: WasmType)
- GHC.CmmToAsm.Wasm.Types: WasmFunctionType :: TypeList pre -> TypeList post -> WasmFunctionType pre post
+ GHC.CmmToAsm.Wasm.Types: WasmFunctionType :: TypeList pre -> TypeList post -> WasmFunctionType (pre :: [WasmType]) (post :: [WasmType])
- GHC.CmmToAsm.Wasm.Types: WasmStatements :: (forall pre. WasmInstr w pre pre) -> WasmStatements w
+ GHC.CmmToAsm.Wasm.Types: WasmStatements :: (forall (pre :: [WasmType]). () => WasmInstr w pre pre) -> WasmStatements (w :: WasmType)
- GHC.CmmToAsm.Wasm.Types: [SomeWasmExpr] :: WasmTypeTag t -> WasmExpr w t -> SomeWasmExpr w
+ GHC.CmmToAsm.Wasm.Types: [SomeWasmExpr] :: forall (t :: WasmType) (w :: WasmType). WasmTypeTag t -> WasmExpr w t -> SomeWasmExpr w
- GHC.CmmToAsm.Wasm.Types: [SomeWasmType] :: WasmTypeTag t -> SomeWasmType
+ GHC.CmmToAsm.Wasm.Types: [SomeWasmType] :: forall (t :: WasmType). WasmTypeTag t -> SomeWasmType
- GHC.CmmToAsm.Wasm.Types: [TypeListCons] :: WasmTypeTag t -> TypeList ts -> TypeList (t : ts)
+ GHC.CmmToAsm.Wasm.Types: [TypeListCons] :: forall (t :: WasmType) (ts :: [WasmType]). WasmTypeTag t -> TypeList ts -> TypeList (t ': ts)
- GHC.CmmToAsm.Wasm.Types: [TypeListNil] :: TypeList '[]
+ GHC.CmmToAsm.Wasm.Types: [TypeListNil] :: TypeList ('[] :: [WasmType])
- GHC.CmmToAsm.Wasm.Types: [WasmAbs] :: WasmTypeTag t -> WasmInstr w (t : pre) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmAbs] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t -> WasmInstr a (t ': pre) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmActions] :: s -> WasmControl s e stack stack
+ GHC.CmmToAsm.Wasm.Types: [WasmActions] :: forall a b (c :: [WasmType]). a -> WasmControl a b c c
- GHC.CmmToAsm.Wasm.Types: [WasmAdd] :: WasmTypeTag t -> WasmInstr w (t : (t : pre)) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmAdd] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmAnd] :: WasmTypeTag t -> WasmInstr w (t : (t : pre)) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmAnd] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmBlock] :: WasmFunctionType pre post -> WasmControl s e pre post -> WasmControl s e pre post
+ GHC.CmmToAsm.Wasm.Types: [WasmBlock] :: forall (c :: [WasmType]) (d :: [WasmType]) a b. WasmFunctionType c d -> WasmControl a b c d -> WasmControl a b c d
- GHC.CmmToAsm.Wasm.Types: [WasmBrTable] :: e -> BrTableInterval -> [Int] -> Int -> WasmControl s e dropped destination
+ GHC.CmmToAsm.Wasm.Types: [WasmBrTable] :: forall b a (c :: [WasmType]) (d :: [WasmType]). b -> BrTableInterval -> [Int] -> Int -> WasmControl a b c d
- GHC.CmmToAsm.Wasm.Types: [WasmBr] :: Int -> WasmControl s e dropped destination
+ GHC.CmmToAsm.Wasm.Types: [WasmBr] :: forall a b (c :: [WasmType]) (d :: [WasmType]). Int -> WasmControl a b c d
- GHC.CmmToAsm.Wasm.Types: [WasmCCallIndirect] :: TypeList arg_tys -> TypeList ret_tys -> WasmInstr w (w : pre) post
+ GHC.CmmToAsm.Wasm.Types: [WasmCCallIndirect] :: forall (arg_tys :: [WasmType]) (ret_tys :: [WasmType]) (a :: WasmType) (pre :: [WasmType]) (c :: [WasmType]). TypeList arg_tys -> TypeList ret_tys -> WasmInstr a (a ': pre) c
- GHC.CmmToAsm.Wasm.Types: [WasmCCall] :: SymName -> WasmInstr w pre post
+ GHC.CmmToAsm.Wasm.Types: [WasmCCall] :: forall (a :: WasmType) (b :: [WasmType]) (c :: [WasmType]). SymName -> WasmInstr a b c
- GHC.CmmToAsm.Wasm.Types: [WasmComment] :: String -> WasmInstr w pre pre
+ GHC.CmmToAsm.Wasm.Types: [WasmComment] :: forall (a :: WasmType) (b :: [WasmType]). String -> WasmInstr a b b
- GHC.CmmToAsm.Wasm.Types: [WasmConcat] :: WasmInstr w pre mid -> WasmInstr w mid post -> WasmInstr w pre post
+ GHC.CmmToAsm.Wasm.Types: [WasmConcat] :: forall (a :: WasmType) (b :: [WasmType]) (mid :: [WasmType]) (c :: [WasmType]). WasmInstr a b mid -> WasmInstr a mid c -> WasmInstr a b c
- GHC.CmmToAsm.Wasm.Types: [WasmCond] :: WasmInstr w pre pre -> WasmInstr w (w : pre) pre
+ GHC.CmmToAsm.Wasm.Types: [WasmCond] :: forall (a :: WasmType) (c :: [WasmType]). WasmInstr a c c -> WasmInstr a (a ': c) c
- GHC.CmmToAsm.Wasm.Types: [WasmConst] :: WasmTypeTag t -> Integer -> WasmInstr w pre (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmConst] :: forall (t :: WasmType) (a :: WasmType) (b :: [WasmType]). WasmTypeTag t -> Integer -> WasmInstr a b (t ': b)
- GHC.CmmToAsm.Wasm.Types: [WasmConvert] :: Signage -> WasmTypeTag t0 -> WasmTypeTag t1 -> WasmInstr w (t0 : pre) (t1 : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmConvert] :: forall (t0 :: WasmType) (t1 :: WasmType) (a :: WasmType) (pre :: [WasmType]). Signage -> WasmTypeTag t0 -> WasmTypeTag t1 -> WasmInstr a (t0 ': pre) (t1 ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmDiv] :: Signage -> WasmTypeTag t -> WasmInstr w (t : (t : pre)) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmDiv] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). Signage -> WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmDrop] :: WasmInstr w (t : pre) pre
+ GHC.CmmToAsm.Wasm.Types: [WasmDrop] :: forall (a :: WasmType) (t :: WasmType) (c :: [WasmType]). WasmInstr a (t ': c) c
- GHC.CmmToAsm.Wasm.Types: [WasmEq] :: WasmTypeTag t -> WasmInstr w (t : (t : pre)) (w : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmEq] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (a ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmF32DemoteF64] :: WasmInstr w ('F64 : pre) ('F32 : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmF32DemoteF64] :: forall (a :: WasmType) (pre :: [WasmType]). WasmInstr a ('F64 ': pre) ('F32 ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmF64PromoteF32] :: WasmInstr w ('F32 : pre) ('F64 : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmF64PromoteF32] :: forall (a :: WasmType) (pre :: [WasmType]). WasmInstr a ('F32 ': pre) ('F64 ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmFallthrough] :: WasmControl s e dropped destination
+ GHC.CmmToAsm.Wasm.Types: [WasmFallthrough] :: forall a b (c :: [WasmType]) (d :: [WasmType]). WasmControl a b c d
- GHC.CmmToAsm.Wasm.Types: [WasmGe] :: Signage -> WasmTypeTag t -> WasmInstr w (t : (t : pre)) (w : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmGe] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). Signage -> WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (a ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmGlobalGet] :: WasmTypeTag t -> SymName -> WasmInstr w pre (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmGlobalGet] :: forall (t :: WasmType) (a :: WasmType) (b :: [WasmType]). WasmTypeTag t -> SymName -> WasmInstr a b (t ': b)
- GHC.CmmToAsm.Wasm.Types: [WasmGlobalSet] :: WasmTypeTag t -> SymName -> WasmInstr w (t : pre) pre
+ GHC.CmmToAsm.Wasm.Types: [WasmGlobalSet] :: forall (t :: WasmType) (a :: WasmType) (c :: [WasmType]). WasmTypeTag t -> SymName -> WasmInstr a (t ': c) c
- GHC.CmmToAsm.Wasm.Types: [WasmGt] :: Signage -> WasmTypeTag t -> WasmInstr w (t : (t : pre)) (w : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmGt] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). Signage -> WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (a ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmI32Extend16S] :: WasmInstr w ('I32 : pre) ('I32 : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmI32Extend16S] :: forall (a :: WasmType) (pre :: [WasmType]). WasmInstr a ('I32 ': pre) ('I32 ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmI32Extend8S] :: WasmInstr w ('I32 : pre) ('I32 : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmI32Extend8S] :: forall (a :: WasmType) (pre :: [WasmType]). WasmInstr a ('I32 ': pre) ('I32 ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmI32WrapI64] :: WasmInstr w ('I64 : pre) ('I32 : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmI32WrapI64] :: forall (a :: WasmType) (pre :: [WasmType]). WasmInstr a ('I64 ': pre) ('I32 ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmI64Extend16S] :: WasmInstr w ('I64 : pre) ('I64 : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmI64Extend16S] :: forall (a :: WasmType) (pre :: [WasmType]). WasmInstr a ('I64 ': pre) ('I64 ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmI64Extend32S] :: WasmInstr w ('I64 : pre) ('I64 : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmI64Extend32S] :: forall (a :: WasmType) (pre :: [WasmType]). WasmInstr a ('I64 ': pre) ('I64 ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmI64Extend8S] :: WasmInstr w ('I64 : pre) ('I64 : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmI64Extend8S] :: forall (a :: WasmType) (pre :: [WasmType]). WasmInstr a ('I64 ': pre) ('I64 ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmI64ExtendI32] :: Signage -> WasmInstr w ('I32 : pre) ('I64 : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmI64ExtendI32] :: forall (a :: WasmType) (pre :: [WasmType]). Signage -> WasmInstr a ('I32 ': pre) ('I64 ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmIfTop] :: WasmFunctionType pre post -> WasmControl s e pre post -> WasmControl s e pre post -> WasmControl s e ('I32 : pre) post
+ GHC.CmmToAsm.Wasm.Types: [WasmIfTop] :: forall (pre :: [WasmType]) (d :: [WasmType]) a b. WasmFunctionType pre d -> WasmControl a b pre d -> WasmControl a b pre d -> WasmControl a b ('I32 ': pre) d
- GHC.CmmToAsm.Wasm.Types: [WasmLe] :: Signage -> WasmTypeTag t -> WasmInstr w (t : (t : pre)) (w : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmLe] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). Signage -> WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (a ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmLoad] :: WasmTypeTag t -> Maybe Int -> Signage -> Int -> AlignmentSpec -> WasmInstr w (w : pre) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmLoad] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t -> Maybe Int -> Signage -> Int -> AlignmentSpec -> WasmInstr a (a ': pre) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmLocalGet] :: WasmTypeTag t -> Int -> WasmInstr w pre (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmLocalGet] :: forall (t :: WasmType) (a :: WasmType) (b :: [WasmType]). WasmTypeTag t -> Int -> WasmInstr a b (t ': b)
- GHC.CmmToAsm.Wasm.Types: [WasmLocalSet] :: WasmTypeTag t -> Int -> WasmInstr w (t : pre) pre
+ GHC.CmmToAsm.Wasm.Types: [WasmLocalSet] :: forall (t :: WasmType) (a :: WasmType) (c :: [WasmType]). WasmTypeTag t -> Int -> WasmInstr a (t ': c) c
- GHC.CmmToAsm.Wasm.Types: [WasmLocalTee] :: WasmTypeTag t -> Int -> WasmInstr w (t : pre) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmLocalTee] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t -> Int -> WasmInstr a (t ': pre) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmLoop] :: WasmFunctionType pre post -> WasmControl s e pre post -> WasmControl s e pre post
+ GHC.CmmToAsm.Wasm.Types: [WasmLoop] :: forall (c :: [WasmType]) (d :: [WasmType]) a b. WasmFunctionType c d -> WasmControl a b c d -> WasmControl a b c d
- GHC.CmmToAsm.Wasm.Types: [WasmLt] :: Signage -> WasmTypeTag t -> WasmInstr w (t : (t : pre)) (w : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmLt] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). Signage -> WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (a ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmMul] :: WasmTypeTag t -> WasmInstr w (t : (t : pre)) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmMul] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmNe] :: WasmTypeTag t -> WasmInstr w (t : (t : pre)) (w : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmNe] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (a ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmNeg] :: WasmTypeTag t -> WasmInstr w (t : pre) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmNeg] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t -> WasmInstr a (t ': pre) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmNop] :: WasmInstr w pre pre
+ GHC.CmmToAsm.Wasm.Types: [WasmNop] :: forall (a :: WasmType) (b :: [WasmType]). WasmInstr a b b
- GHC.CmmToAsm.Wasm.Types: [WasmOr] :: WasmTypeTag t -> WasmInstr w (t : (t : pre)) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmOr] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmPush] :: WasmTypeTag t -> e -> WasmControl s e stack (t : stack)
+ GHC.CmmToAsm.Wasm.Types: [WasmPush] :: forall (t :: WasmType) b a (c :: [WasmType]). WasmTypeTag t -> b -> WasmControl a b c (t ': c)
- GHC.CmmToAsm.Wasm.Types: [WasmReinterpret] :: WasmTypeTag t0 -> WasmTypeTag t1 -> WasmInstr w (t0 : pre) (t1 : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmReinterpret] :: forall (t0 :: WasmType) (t1 :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t0 -> WasmTypeTag t1 -> WasmInstr a (t0 ': pre) (t1 ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmRem] :: Signage -> WasmTypeTag t -> WasmInstr w (t : (t : pre)) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmRem] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). Signage -> WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmSeq] :: WasmControl s e pre mid -> WasmControl s e mid post -> WasmControl s e pre post
+ GHC.CmmToAsm.Wasm.Types: [WasmSeq] :: forall a b (c :: [WasmType]) (mid :: [WasmType]) (d :: [WasmType]). WasmControl a b c mid -> WasmControl a b mid d -> WasmControl a b c d
- GHC.CmmToAsm.Wasm.Types: [WasmShl] :: WasmTypeTag t -> WasmInstr w (t : (t : pre)) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmShl] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmShr] :: Signage -> WasmTypeTag t -> WasmInstr w (t : (t : pre)) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmShr] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). Signage -> WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmStore] :: WasmTypeTag t -> Maybe Int -> Int -> AlignmentSpec -> WasmInstr w (t : (w : pre)) pre
+ GHC.CmmToAsm.Wasm.Types: [WasmStore] :: forall (t :: WasmType) (a :: WasmType) (c :: [WasmType]). WasmTypeTag t -> Maybe Int -> Int -> AlignmentSpec -> WasmInstr a (t ': (a ': c)) c
- GHC.CmmToAsm.Wasm.Types: [WasmSub] :: WasmTypeTag t -> WasmInstr w (t : (t : pre)) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmSub] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmSymConst] :: SymName -> WasmInstr w pre (w : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmSymConst] :: forall (a :: WasmType) (b :: [WasmType]). SymName -> WasmInstr a b (a ': b)
- GHC.CmmToAsm.Wasm.Types: [WasmTailCall] :: e -> WasmControl s e t1star t2star
+ GHC.CmmToAsm.Wasm.Types: [WasmTailCall] :: forall b a (c :: [WasmType]) (d :: [WasmType]). b -> WasmControl a b c d
- GHC.CmmToAsm.Wasm.Types: [WasmTruncSat] :: Signage -> WasmTypeTag t0 -> WasmTypeTag t1 -> WasmInstr w (t0 : pre) (t1 : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmTruncSat] :: forall (t0 :: WasmType) (t1 :: WasmType) (a :: WasmType) (pre :: [WasmType]). Signage -> WasmTypeTag t0 -> WasmTypeTag t1 -> WasmInstr a (t0 ': pre) (t1 ': pre)
- GHC.CmmToAsm.Wasm.Types: [WasmUnreachable] :: WasmInstr w pre post
+ GHC.CmmToAsm.Wasm.Types: [WasmUnreachable] :: forall (a :: WasmType) (b :: [WasmType]) (c :: [WasmType]). WasmInstr a b c
- GHC.CmmToAsm.Wasm.Types: [WasmXor] :: WasmTypeTag t -> WasmInstr w (t : (t : pre)) (t : pre)
+ GHC.CmmToAsm.Wasm.Types: [WasmXor] :: forall (t :: WasmType) (a :: WasmType) (pre :: [WasmType]). WasmTypeTag t -> WasmInstr a (t ': (t ': pre)) (t ': pre)
- GHC.CmmToAsm.Wasm.Types: [ctors] :: WasmCodeGenState w -> [SymName]
+ GHC.CmmToAsm.Wasm.Types: [ctors] :: WasmCodeGenState (w :: WasmType) -> [SymName]
- GHC.CmmToAsm.Wasm.Types: [dataSections] :: WasmCodeGenState w -> SymMap DataSection
+ GHC.CmmToAsm.Wasm.Types: [dataSections] :: WasmCodeGenState (w :: WasmType) -> SymMap DataSection
- GHC.CmmToAsm.Wasm.Types: [defaultSyms] :: WasmCodeGenState w -> SymSet
+ GHC.CmmToAsm.Wasm.Types: [defaultSyms] :: WasmCodeGenState (w :: WasmType) -> SymSet
- GHC.CmmToAsm.Wasm.Types: [ft_pops] :: WasmFunctionType pre post -> TypeList pre
+ GHC.CmmToAsm.Wasm.Types: [ft_pops] :: WasmFunctionType (pre :: [WasmType]) (post :: [WasmType]) -> TypeList pre
- GHC.CmmToAsm.Wasm.Types: [ft_pushes] :: WasmFunctionType pre post -> TypeList post
+ GHC.CmmToAsm.Wasm.Types: [ft_pushes] :: WasmFunctionType (pre :: [WasmType]) (post :: [WasmType]) -> TypeList post
- GHC.CmmToAsm.Wasm.Types: [funcBodies] :: WasmCodeGenState w -> SymMap (FuncBody w)
+ GHC.CmmToAsm.Wasm.Types: [funcBodies] :: WasmCodeGenState (w :: WasmType) -> SymMap (FuncBody w)
- GHC.CmmToAsm.Wasm.Types: [funcBody] :: FuncBody w -> WasmControl (WasmStatements w) (WasmExpr w w) '[] '[w]
+ GHC.CmmToAsm.Wasm.Types: [funcBody] :: FuncBody (w :: WasmType) -> WasmControl (WasmStatements w) (WasmExpr w w) ('[] :: [WasmType]) '[w]
- GHC.CmmToAsm.Wasm.Types: [funcLocals] :: FuncBody w -> [SomeWasmType]
+ GHC.CmmToAsm.Wasm.Types: [funcLocals] :: FuncBody (w :: WasmType) -> [SomeWasmType]
- GHC.CmmToAsm.Wasm.Types: [funcTypes] :: WasmCodeGenState w -> SymMap ([SomeWasmType], [SomeWasmType])
+ GHC.CmmToAsm.Wasm.Types: [funcTypes] :: WasmCodeGenState (w :: WasmType) -> SymMap ([SomeWasmType], [SomeWasmType])
- GHC.CmmToAsm.Wasm.Types: [localRegsCount] :: WasmCodeGenState w -> Int
+ GHC.CmmToAsm.Wasm.Types: [localRegsCount] :: WasmCodeGenState (w :: WasmType) -> Int
- GHC.CmmToAsm.Wasm.Types: [localRegs] :: WasmCodeGenState w -> UniqFM LocalReg LocalInfo
+ GHC.CmmToAsm.Wasm.Types: [localRegs] :: WasmCodeGenState (w :: WasmType) -> UniqFM LocalReg LocalInfo
- GHC.CmmToAsm.Wasm.Types: [wasmPlatform] :: WasmCodeGenState w -> Platform
+ GHC.CmmToAsm.Wasm.Types: [wasmPlatform] :: WasmCodeGenState (w :: WasmType) -> Platform
- GHC.CmmToAsm.Wasm.Types: [wasmUniqSupply] :: WasmCodeGenState w -> UniqSupply
+ GHC.CmmToAsm.Wasm.Types: [wasmUniqSupply] :: WasmCodeGenState (w :: WasmType) -> UniqSupply
- GHC.CmmToAsm.Wasm.Types: data FuncBody w
+ GHC.CmmToAsm.Wasm.Types: data FuncBody (w :: WasmType)
- GHC.CmmToAsm.Wasm.Types: data SomeWasmExpr w
+ GHC.CmmToAsm.Wasm.Types: data SomeWasmExpr (w :: WasmType)
- GHC.CmmToAsm.Wasm.Types: data TypeList :: [WasmType] -> Type
+ GHC.CmmToAsm.Wasm.Types: data TypeList (a :: [WasmType])
- GHC.CmmToAsm.Wasm.Types: data WasmCodeGenState w
+ GHC.CmmToAsm.Wasm.Types: data WasmCodeGenState (w :: WasmType)
- GHC.CmmToAsm.Wasm.Types: data WasmControl :: Type -> Type -> [WasmType] -> [WasmType] -> Type
+ GHC.CmmToAsm.Wasm.Types: data WasmControl a b (c :: [WasmType]) (d :: [WasmType])
- GHC.CmmToAsm.Wasm.Types: data WasmFunctionType pre post
+ GHC.CmmToAsm.Wasm.Types: data WasmFunctionType (pre :: [WasmType]) (post :: [WasmType])
- GHC.CmmToAsm.Wasm.Types: data WasmInstr :: WasmType -> [WasmType] -> [WasmType] -> Type
+ GHC.CmmToAsm.Wasm.Types: data WasmInstr (a :: WasmType) (b :: [WasmType]) (c :: [WasmType])
- GHC.CmmToAsm.Wasm.Types: data WasmTypeTag :: WasmType -> Type
+ GHC.CmmToAsm.Wasm.Types: data WasmTypeTag (a :: WasmType)
- GHC.CmmToAsm.Wasm.Types: initialWasmCodeGenState :: Platform -> UniqSupply -> WasmCodeGenState w
+ GHC.CmmToAsm.Wasm.Types: initialWasmCodeGenState :: forall (w :: WasmType). Platform -> UniqSupply -> WasmCodeGenState w
- GHC.CmmToAsm.Wasm.Types: newtype WasmCodeGenM w a
+ GHC.CmmToAsm.Wasm.Types: newtype WasmCodeGenM (w :: WasmType) a
- GHC.CmmToAsm.Wasm.Types: newtype WasmExpr w t
+ GHC.CmmToAsm.Wasm.Types: newtype WasmExpr (w :: WasmType) (t :: WasmType)
- GHC.CmmToAsm.Wasm.Types: newtype WasmStatements w
+ GHC.CmmToAsm.Wasm.Types: newtype WasmStatements (w :: WasmType)
- GHC.CmmToAsm.Wasm.Types: someWasmTypesFromTypeList :: TypeList ts -> [SomeWasmType]
+ GHC.CmmToAsm.Wasm.Types: someWasmTypesFromTypeList :: forall (ts :: [WasmType]). TypeList ts -> [SomeWasmType]
- GHC.CmmToAsm.Wasm.Types: wasmControlCast :: WasmControl s e pre post -> WasmControl s e pre' post'
+ GHC.CmmToAsm.Wasm.Types: wasmControlCast :: forall s e (pre :: [WasmType]) (post :: [WasmType]) (pre' :: [WasmType]) (post' :: [WasmType]). WasmControl s e pre post -> WasmControl s e pre' post'
- GHC.CmmToAsm.Wasm.Types: wasmExecM :: WasmCodeGenM w a -> WasmCodeGenState w -> WasmCodeGenState w
+ GHC.CmmToAsm.Wasm.Types: wasmExecM :: forall (w :: WasmType) a. WasmCodeGenM w a -> WasmCodeGenState w -> WasmCodeGenState w
- GHC.CmmToAsm.Wasm.Types: wasmGetsM :: (WasmCodeGenState w -> a) -> WasmCodeGenM w a
+ GHC.CmmToAsm.Wasm.Types: wasmGetsM :: forall (w :: WasmType) a. (WasmCodeGenState w -> a) -> WasmCodeGenM w a
- GHC.CmmToAsm.Wasm.Types: wasmModifyM :: (WasmCodeGenState w -> WasmCodeGenState w) -> WasmCodeGenM w ()
+ GHC.CmmToAsm.Wasm.Types: wasmModifyM :: forall (w :: WasmType). (WasmCodeGenState w -> WasmCodeGenState w) -> WasmCodeGenM w ()
- GHC.CmmToAsm.Wasm.Types: wasmPlatformM :: WasmCodeGenM w Platform
+ GHC.CmmToAsm.Wasm.Types: wasmPlatformM :: forall (w :: WasmType). WasmCodeGenM w Platform
- GHC.CmmToAsm.Wasm.Types: wasmStateM :: (WasmCodeGenState w -> (# a, WasmCodeGenState w #)) -> WasmCodeGenM w a
+ GHC.CmmToAsm.Wasm.Types: wasmStateM :: forall (w :: WasmType) a. (WasmCodeGenState w -> (# a, WasmCodeGenState w #)) -> WasmCodeGenM w a
- GHC.CmmToAsm.Wasm.Types: wasmWordCmmTypeM :: WasmCodeGenM w CmmType
+ GHC.CmmToAsm.Wasm.Types: wasmWordCmmTypeM :: forall (w :: WasmType). WasmCodeGenM w CmmType
- GHC.CmmToAsm.Wasm.Types: wasmWordTypeM :: WasmCodeGenM w (WasmTypeTag w)
+ GHC.CmmToAsm.Wasm.Types: wasmWordTypeM :: forall (w :: WasmType). WasmCodeGenM w (WasmTypeTag w)
- GHC.CmmToAsm.X86.Ppr: pprInstr :: forall doc. IsDoc doc => Platform -> Instr -> doc
+ GHC.CmmToAsm.X86.Ppr: pprInstr :: IsDoc doc => Platform -> Instr -> doc
- GHC.CmmToLlvm.Base: renderLlvm :: SDoc -> LlvmM ()
+ GHC.CmmToLlvm.Base: renderLlvm :: HDoc -> SDoc -> LlvmM ()
- GHC.CmmToLlvm.Base: type LlvmCmmDecl = GenCmmDecl [LlvmData] (Maybe RawCmmStatics) (ListGraph LlvmStatement)
+ GHC.CmmToLlvm.Base: type LlvmCmmDecl = GenCmmDecl [LlvmData] Maybe RawCmmStatics ListGraph LlvmStatement
- GHC.CmmToLlvm.Ppr: pprLlvmCmmDecl :: LlvmCmmDecl -> LlvmM (SDoc, [LlvmVar])
+ GHC.CmmToLlvm.Ppr: pprLlvmCmmDecl :: LlvmCmmDecl -> LlvmM (HDoc, SDoc)
- GHC.CmmToLlvm.Ppr: pprLlvmData :: LlvmCgConfig -> LlvmData -> SDoc
+ GHC.CmmToLlvm.Ppr: pprLlvmData :: IsDoc doc => LlvmCgConfig -> LlvmData -> doc
- GHC.Core: type TaggedAlt t = Alt (TaggedBndr t)
+ GHC.Core: type TaggedAlt t = Alt TaggedBndr t
- GHC.Core: type TaggedArg t = Arg (TaggedBndr t)
+ GHC.Core: type TaggedArg t = Arg TaggedBndr t
- GHC.Core: type TaggedBind t = Bind (TaggedBndr t)
+ GHC.Core: type TaggedBind t = Bind TaggedBndr t
- GHC.Core: type TaggedExpr t = Expr (TaggedBndr t)
+ GHC.Core: type TaggedExpr t = Expr TaggedBndr t
- GHC.Core.Coercion: CoercionHole :: CoVar -> IORef (Maybe Coercion) -> CoercionHole
+ GHC.Core.Coercion: CoercionHole :: CoVar -> IORef (Maybe Coercion) -> Bool -> CoercionHole
- GHC.Core.Coercion: mkAxInstCo :: Role -> CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Coercion
+ GHC.Core.Coercion: mkAxInstCo :: forall (br :: BranchFlag). Role -> CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Coercion
- GHC.Core.Coercion: mkAxInstLHS :: CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type
+ GHC.Core.Coercion: mkAxInstLHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type
- GHC.Core.Coercion: mkAxInstRHS :: CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type
+ GHC.Core.Coercion: mkAxInstRHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type
- GHC.Core.Coercion: mkFunCo2 :: HasDebugCallStack => Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
+ GHC.Core.Coercion: mkFunCo2 :: Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
- GHC.Core.Coercion: pprCoAxiom :: CoAxiom br -> SDoc
+ GHC.Core.Coercion: pprCoAxiom :: forall (br :: BranchFlag). CoAxiom br -> SDoc
- GHC.Core.Coercion.Axiom: CoAxiom :: Unique -> Name -> Role -> TyCon -> Branches br -> Bool -> CoAxiom br
+ GHC.Core.Coercion.Axiom: CoAxiom :: Unique -> Name -> Role -> TyCon -> Branches br -> Bool -> CoAxiom (br :: BranchFlag)
- GHC.Core.Coercion.Axiom: [co_ax_branches] :: CoAxiom br -> Branches br
+ GHC.Core.Coercion.Axiom: [co_ax_branches] :: CoAxiom (br :: BranchFlag) -> Branches br
- GHC.Core.Coercion.Axiom: [co_ax_implicit] :: CoAxiom br -> Bool
+ GHC.Core.Coercion.Axiom: [co_ax_implicit] :: CoAxiom (br :: BranchFlag) -> Bool
- GHC.Core.Coercion.Axiom: [co_ax_name] :: CoAxiom br -> Name
+ GHC.Core.Coercion.Axiom: [co_ax_name] :: CoAxiom (br :: BranchFlag) -> Name
- GHC.Core.Coercion.Axiom: [co_ax_role] :: CoAxiom br -> Role
+ GHC.Core.Coercion.Axiom: [co_ax_role] :: CoAxiom (br :: BranchFlag) -> Role
- GHC.Core.Coercion.Axiom: [co_ax_tc] :: CoAxiom br -> TyCon
+ GHC.Core.Coercion.Axiom: [co_ax_tc] :: CoAxiom (br :: BranchFlag) -> TyCon
- GHC.Core.Coercion.Axiom: [co_ax_unique] :: CoAxiom br -> Unique
+ GHC.Core.Coercion.Axiom: [co_ax_unique] :: CoAxiom (br :: BranchFlag) -> Unique
- GHC.Core.Coercion.Axiom: coAxiomArity :: CoAxiom br -> BranchIndex -> Arity
+ GHC.Core.Coercion.Axiom: coAxiomArity :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> Arity
- GHC.Core.Coercion.Axiom: coAxiomBranches :: CoAxiom br -> Branches br
+ GHC.Core.Coercion.Axiom: coAxiomBranches :: forall (br :: BranchFlag). CoAxiom br -> Branches br
- GHC.Core.Coercion.Axiom: coAxiomName :: CoAxiom br -> Name
+ GHC.Core.Coercion.Axiom: coAxiomName :: forall (br :: BranchFlag). CoAxiom br -> Name
- GHC.Core.Coercion.Axiom: coAxiomNthBranch :: CoAxiom br -> BranchIndex -> CoAxBranch
+ GHC.Core.Coercion.Axiom: coAxiomNthBranch :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> CoAxBranch
- GHC.Core.Coercion.Axiom: coAxiomNumPats :: CoAxiom br -> Int
+ GHC.Core.Coercion.Axiom: coAxiomNumPats :: forall (br :: BranchFlag). CoAxiom br -> Int
- GHC.Core.Coercion.Axiom: coAxiomRole :: CoAxiom br -> Role
+ GHC.Core.Coercion.Axiom: coAxiomRole :: forall (br :: BranchFlag). CoAxiom br -> Role
- GHC.Core.Coercion.Axiom: coAxiomSingleBranch_maybe :: CoAxiom br -> Maybe CoAxBranch
+ GHC.Core.Coercion.Axiom: coAxiomSingleBranch_maybe :: forall (br :: BranchFlag). CoAxiom br -> Maybe CoAxBranch
- GHC.Core.Coercion.Axiom: coAxiomTyCon :: CoAxiom br -> TyCon
+ GHC.Core.Coercion.Axiom: coAxiomTyCon :: forall (br :: BranchFlag). CoAxiom br -> TyCon
- GHC.Core.Coercion.Axiom: data CoAxiom br
+ GHC.Core.Coercion.Axiom: data CoAxiom (br :: BranchFlag)
- GHC.Core.Coercion.Axiom: fromBranches :: Branches br -> [CoAxBranch]
+ GHC.Core.Coercion.Axiom: fromBranches :: forall (br :: BranchFlag). Branches br -> [CoAxBranch]
- GHC.Core.Coercion.Axiom: isImplicitCoAxiom :: CoAxiom br -> Bool
+ GHC.Core.Coercion.Axiom: isImplicitCoAxiom :: forall (br :: BranchFlag). CoAxiom br -> Bool
- GHC.Core.Coercion.Axiom: mapAccumBranches :: ([CoAxBranch] -> CoAxBranch -> CoAxBranch) -> Branches br -> Branches br
+ GHC.Core.Coercion.Axiom: mapAccumBranches :: forall (br :: BranchFlag). ([CoAxBranch] -> CoAxBranch -> CoAxBranch) -> Branches br -> Branches br
- GHC.Core.Coercion.Axiom: numBranches :: Branches br -> Int
+ GHC.Core.Coercion.Axiom: numBranches :: forall (br :: BranchFlag). Branches br -> Int
- GHC.Core.Coercion.Axiom: toBranchedAxiom :: CoAxiom br -> CoAxiom Branched
+ GHC.Core.Coercion.Axiom: toBranchedAxiom :: forall (br :: BranchFlag). CoAxiom br -> CoAxiom Branched
- GHC.Core.Coercion.Axiom: toUnbranchedAxiom :: CoAxiom br -> CoAxiom Unbranched
+ GHC.Core.Coercion.Axiom: toUnbranchedAxiom :: forall (br :: BranchFlag). CoAxiom br -> CoAxiom Unbranched
- GHC.Core.DataCon: FieldLabel :: FieldLabelString -> DuplicateRecordFields -> FieldSelectors -> Name -> FieldLabel
+ GHC.Core.DataCon: FieldLabel :: DuplicateRecordFields -> FieldSelectors -> Name -> FieldLabel
- GHC.Core.FVs: orphNamesOfAxiomLHS :: CoAxiom br -> NameSet
+ GHC.Core.FVs: orphNamesOfAxiomLHS :: forall (br :: BranchFlag). CoAxiom br -> NameSet
- GHC.Core.FVs: orphNamesOfCoCon :: CoAxiom br -> NameSet
+ GHC.Core.FVs: orphNamesOfCoCon :: forall (br :: BranchFlag). CoAxiom br -> NameSet
- GHC.Core.FamInstEnv: FamInst :: CoAxiom Unbranched -> FamFlavor -> Name -> [RoughMatchTc] -> [TyVar] -> [CoVar] -> [Type] -> Type -> FamInst
+ GHC.Core.FamInstEnv: FamInst :: CoAxiom Unbranched -> FamFlavor -> Name -> [RoughMatchTc] -> [TyVar] -> [CoVar] -> [Type] -> Type -> IsOrphan -> FamInst
- GHC.Core.FamInstEnv: mkImportedFamInst :: Name -> [RoughMatchTc] -> CoAxiom Unbranched -> FamInst
+ GHC.Core.FamInstEnv: mkImportedFamInst :: Name -> [RoughMatchTc] -> CoAxiom Unbranched -> IsOrphan -> FamInst
- GHC.Core.InstEnv: NoUnifiers :: PotentialUnifiers
+ GHC.Core.InstEnv: NoUnifiers :: Canonical -> PotentialUnifiers
- GHC.Core.InstEnv: OneOrMoreUnifiers :: [ClsInst] -> PotentialUnifiers
+ GHC.Core.InstEnv: OneOrMoreUnifiers :: NonEmpty ClsInst -> PotentialUnifiers
- GHC.Core.InstEnv: lookupUniqueInstEnv :: InstEnvs -> Class -> [Type] -> Either SDoc (ClsInst, [Type])
+ GHC.Core.InstEnv: lookupUniqueInstEnv :: InstEnvs -> Class -> [Type] -> Either LookupInstanceErrReason (ClsInst, [Type])
- GHC.Core.Make: mkBigTupleCase :: UniqSupply -> [Id] -> CoreExpr -> CoreExpr -> CoreExpr
+ GHC.Core.Make: mkBigTupleCase :: MonadUnique m => [Id] -> CoreExpr -> CoreExpr -> m CoreExpr
- GHC.Core.Map.Expr: alterTM :: forall b. TrieMap m => Key m -> XT b -> m b -> m b
+ GHC.Core.Map.Expr: alterTM :: TrieMap m => Key m -> XT b -> m b -> m b
- GHC.Core.Map.Expr: class Functor m => TrieMap m where {
+ GHC.Core.Map.Expr: class Functor m => TrieMap (m :: Type -> Type) where {
- GHC.Core.Map.Expr: lookupTM :: forall b. TrieMap m => Key m -> m b -> Maybe b
+ GHC.Core.Map.Expr: lookupTM :: TrieMap m => Key m -> m b -> Maybe b
- GHC.Core.Map.Expr: type Key m :: Type;
+ GHC.Core.Map.Expr: type Key (m :: Type -> Type);
- GHC.Core.Map.Type: alterTM :: forall b. TrieMap m => Key m -> XT b -> m b -> m b
+ GHC.Core.Map.Type: alterTM :: TrieMap m => Key m -> XT b -> m b -> m b
- GHC.Core.Map.Type: class Functor m => TrieMap m where {
+ GHC.Core.Map.Type: class Functor m => TrieMap (m :: Type -> Type) where {
- GHC.Core.Map.Type: lookupTM :: forall b. TrieMap m => Key m -> m b -> Maybe b
+ GHC.Core.Map.Type: lookupTM :: TrieMap m => Key m -> m b -> Maybe b
- GHC.Core.Map.Type: type Key m :: Type;
+ GHC.Core.Map.Type: type Key (m :: Type -> Type);
- GHC.Core.Map.Type: xtBndr :: forall a. CmEnv -> Var -> XT a -> BndrMap a -> BndrMap a
+ GHC.Core.Map.Type: xtBndr :: CmEnv -> Var -> XT a -> BndrMap a -> BndrMap a
- GHC.Core.Opt.Arity: exprEtaExpandArity :: HasDebugCallStack => ArityOpts -> CoreExpr -> Maybe SafeArityType
+ GHC.Core.Opt.Arity: exprEtaExpandArity :: ArityOpts -> CoreExpr -> Maybe SafeArityType
- GHC.Core.Opt.Simplify.Monad: class Monad m => MonadUnique m
+ GHC.Core.Opt.Simplify.Monad: class Monad m => MonadUnique (m :: Type -> Type)
- GHC.Core.Opt.SpecConstr: data () => SpecConstrAnnotation
+ GHC.Core.Opt.SpecConstr: data SpecConstrAnnotation
- GHC.Core.Predicate: isIPPred_maybe :: Type -> Maybe (FastString, Type)
+ GHC.Core.Predicate: isIPPred_maybe :: Class -> [Type] -> Maybe (Type, Type)
- GHC.Core.Subst: cloneBndrs :: Subst -> UniqSupply -> [Var] -> (Subst, [Var])
+ GHC.Core.Subst: cloneBndrs :: MonadUnique m => Subst -> [Var] -> m (Subst, [Var])
- GHC.Core.Subst: cloneRecIdBndrs :: Subst -> UniqSupply -> [Id] -> (Subst, [Id])
+ GHC.Core.Subst: cloneRecIdBndrs :: MonadUnique m => Subst -> [Id] -> m (Subst, [Id])
- GHC.Core.TyCo.FVs: newtype () => Endo a
+ GHC.Core.TyCo.FVs: newtype Endo a
- GHC.Core.TyCo.Rep: CoercionHole :: CoVar -> IORef (Maybe Coercion) -> CoercionHole
+ GHC.Core.TyCo.Rep: CoercionHole :: CoVar -> IORef (Maybe Coercion) -> Bool -> CoercionHole
- GHC.Core.TyCo.Rep: FunCo :: Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion
+ GHC.Core.TyCo.Rep: FunCo :: Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
- GHC.Core.TyCon: AbstractTypeFlavour :: TyConFlavour
+ GHC.Core.TyCon: AbstractTypeFlavour :: TyConFlavour tc
- GHC.Core.TyCon: AnonTCB :: FunTyFlag -> TyConBndrVis
+ GHC.Core.TyCon: AnonTCB :: TyConBndrVis
- GHC.Core.TyCon: BuiltInTypeFlavour :: TyConFlavour
+ GHC.Core.TyCon: BuiltInTypeFlavour :: TyConFlavour tc
- GHC.Core.TyCon: ClassFlavour :: TyConFlavour
+ GHC.Core.TyCon: ClassFlavour :: TyConFlavour tc
- GHC.Core.TyCon: ClosedTypeFamilyFlavour :: TyConFlavour
+ GHC.Core.TyCon: ClosedTypeFamilyFlavour :: TyConFlavour tc
- GHC.Core.TyCon: DataTypeFlavour :: TyConFlavour
+ GHC.Core.TyCon: DataTypeFlavour :: TyConFlavour tc
- GHC.Core.TyCon: NewtypeFlavour :: TyConFlavour
+ GHC.Core.TyCon: NewtypeFlavour :: TyConFlavour tc
- GHC.Core.TyCon: PromotedDataConFlavour :: TyConFlavour
+ GHC.Core.TyCon: PromotedDataConFlavour :: TyConFlavour tc
- GHC.Core.TyCon: SumFlavour :: TyConFlavour
+ GHC.Core.TyCon: SumFlavour :: TyConFlavour tc
- GHC.Core.TyCon: TupleFlavour :: Boxity -> TyConFlavour
+ GHC.Core.TyCon: TupleFlavour :: Boxity -> TyConFlavour tc
- GHC.Core.TyCon: TypeSynonymFlavour :: TyConFlavour
+ GHC.Core.TyCon: TypeSynonymFlavour :: TyConFlavour tc
- GHC.Core.TyCon: data TyConFlavour
+ GHC.Core.TyCon: data TyConFlavour tc
- GHC.Core.TyCon: mkPromotedDataCon :: DataCon -> Name -> TyConRepName -> [TyConPiTyBinder] -> Kind -> [Role] -> PromDataConInfo -> TyCon
+ GHC.Core.TyCon: mkPromotedDataCon :: DataCon -> Name -> TyConRepName -> [TyConBinder] -> Kind -> [Role] -> PromDataConInfo -> TyCon
- GHC.Core.TyCon: mkSynonymTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Type -> Bool -> Bool -> Bool -> TyCon
+ GHC.Core.TyCon: mkSynonymTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Type -> Bool -> Bool -> Bool -> Bool -> TyCon
- GHC.Core.TyCon: mkTcTyCon :: Name -> [TyConBinder] -> Kind -> [(Name, TcTyVar)] -> Bool -> TyConFlavour -> TyCon
+ GHC.Core.TyCon: mkTcTyCon :: Name -> [TyConBinder] -> Kind -> [(Name, TcTyVar)] -> Bool -> TyConFlavour TyCon -> TyCon
- GHC.Core.TyCon: tcFlavourIsOpen :: TyConFlavour -> Bool
+ GHC.Core.TyCon: tcFlavourIsOpen :: TyConFlavour tc -> Bool
- GHC.Core.TyCon: tyConFlavour :: TyCon -> TyConFlavour
+ GHC.Core.TyCon: tyConFlavour :: TyCon -> TyConFlavour TyCon
- GHC.Core.TyCon: tyConFlavourAssoc_maybe :: TyConFlavour -> Maybe TyCon
+ GHC.Core.TyCon: tyConFlavourAssoc_maybe :: TyConFlavour tc -> Maybe tc
- GHC.Core.Type: TyCoMapper :: (env -> TyVar -> m Type) -> (env -> CoVar -> m Coercion) -> (env -> CoercionHole -> m Coercion) -> (env -> TyCoVar -> ForAllTyFlag -> m (env, TyCoVar)) -> (TyCon -> m TyCon) -> TyCoMapper env m
+ GHC.Core.Type: TyCoMapper :: (env -> TyVar -> m Type) -> (env -> CoVar -> m Coercion) -> (env -> CoercionHole -> m Coercion) -> (forall r. () => env -> TyCoVar -> ForAllTyFlag -> (env -> TyCoVar -> m r) -> m r) -> (TyCon -> m TyCon) -> TyCoMapper env (m :: Type -> Type)
- GHC.Core.Type: [tcm_covar] :: TyCoMapper env m -> env -> CoVar -> m Coercion
+ GHC.Core.Type: [tcm_covar] :: TyCoMapper env (m :: Type -> Type) -> env -> CoVar -> m Coercion
- GHC.Core.Type: [tcm_hole] :: TyCoMapper env m -> env -> CoercionHole -> m Coercion
+ GHC.Core.Type: [tcm_hole] :: TyCoMapper env (m :: Type -> Type) -> env -> CoercionHole -> m Coercion
- GHC.Core.Type: [tcm_tycobinder] :: TyCoMapper env m -> env -> TyCoVar -> ForAllTyFlag -> m (env, TyCoVar)
+ GHC.Core.Type: [tcm_tycobinder] :: TyCoMapper env (m :: Type -> Type) -> forall r. () => env -> TyCoVar -> ForAllTyFlag -> (env -> TyCoVar -> m r) -> m r
- GHC.Core.Type: [tcm_tycon] :: TyCoMapper env m -> TyCon -> m TyCon
+ GHC.Core.Type: [tcm_tycon] :: TyCoMapper env (m :: Type -> Type) -> TyCon -> m TyCon
- GHC.Core.Type: [tcm_tyvar] :: TyCoMapper env m -> env -> TyVar -> m Type
+ GHC.Core.Type: [tcm_tyvar] :: TyCoMapper env (m :: Type -> Type) -> env -> TyVar -> m Type
- GHC.Core.Type: coAxNthLHS :: CoAxiom br -> Int -> Type
+ GHC.Core.Type: coAxNthLHS :: forall (br :: BranchFlag). CoAxiom br -> Int -> Type
- GHC.Core.Type: data TyCoMapper env m
+ GHC.Core.Type: data TyCoMapper env (m :: Type -> Type)
- GHC.Core.Type: liftedTypeKind :: Kind
+ GHC.Core.Type: liftedTypeKind :: Type
- GHC.Core.Type: pprUserTypeErrorTy :: Type -> SDoc
+ GHC.Core.Type: pprUserTypeErrorTy :: ErrorMsgType -> SDoc
- GHC.Core.Type: unliftedTypeKind :: Kind
+ GHC.Core.Type: unliftedTypeKind :: Type
- GHC.Core.Type: userTypeError_maybe :: Type -> Maybe Type
+ GHC.Core.Type: userTypeError_maybe :: Type -> Maybe ErrorMsgType
- GHC.Core.Utils: etaExpansionTick :: Id -> GenTickish pass -> Bool
+ GHC.Core.Utils: etaExpansionTick :: forall (pass :: TickishPass). Id -> GenTickish pass -> Bool
- GHC.CoreToIface: dehydrateCgBreakInfo :: [TyVar] -> [Maybe (Id, Word16)] -> Type -> CgBreakInfo
+ GHC.CoreToIface: dehydrateCgBreakInfo :: [TyVar] -> [Maybe (Id, Word)] -> Type -> CgBreakInfo
- GHC.CoreToStg.Prep: CorePrepConfig :: !Bool -> !LitNumType -> Integer -> Maybe CoreExpr -> !Bool -> !Bool -> CorePrepConfig
+ GHC.CoreToStg.Prep: CorePrepConfig :: !Bool -> !LitNumType -> Integer -> Maybe CoreExpr -> CorePrepConfig
- GHC.Data.BooleanFormula: type LBooleanFormula a = LocatedL (BooleanFormula a)
+ GHC.Data.BooleanFormula: type LBooleanFormula a = LocatedL BooleanFormula a
- GHC.Data.Graph.Collapse: class (Monad m) => MonadUniqSM m
+ GHC.Data.Graph.Collapse: class Monad m => MonadUniqSM (m :: Type -> Type)
- GHC.Data.Graph.Collapse: class (Semigroup node) => PureSupernode node
+ GHC.Data.Graph.Collapse: class Semigroup node => PureSupernode node
- GHC.Data.Graph.Collapse: class (MonadUnique m, PureSupernode node) => Supernode node m
+ GHC.Data.Graph.Collapse: class (MonadUnique m, PureSupernode node) => Supernode node (m :: Type -> Type)
- GHC.Data.Graph.Collapse: class (MonadUniqSM m, Graph gr, Supernode s m) => VizCollapseMonad m gr s
+ GHC.Data.Graph.Collapse: class (MonadUniqSM m, Graph gr, Supernode s m) => VizCollapseMonad (m :: Type -> Type) (gr :: Type -> Type -> Type) s
- GHC.Data.Graph.Color: colorGraph :: forall k cls color. (Uniquable k, Uniquable cls, Uniquable color, Eq cls, Ord k, Outputable k, Outputable cls, Outputable color) => Bool -> Int -> UniqFM cls (UniqSet color) -> Triv k cls color -> (Graph k cls color -> k) -> Graph k cls color -> (Graph k cls color, UniqSet k, UniqFM k k)
+ GHC.Data.Graph.Color: colorGraph :: (Uniquable k, Uniquable cls, Uniquable color, Eq cls, Ord k, Outputable k, Outputable cls, Outputable color) => Bool -> Int -> UniqFM cls (UniqSet color) -> Triv k cls color -> (Graph k cls color -> k) -> Graph k cls color -> (Graph k cls color, UniqSet k, UniqFM k k)
- GHC.Data.Graph.Directed: classifyEdges :: forall key. Uniquable key => key -> (key -> [key]) -> [(key, key)] -> [((key, key), EdgeType)]
+ GHC.Data.Graph.Directed: classifyEdges :: Uniquable key => key -> (key -> [key]) -> [(key, key)] -> [((key, key), EdgeType)]
- GHC.Data.Graph.Directed: data () => SCC vertex
+ GHC.Data.Graph.Directed: data SCC vertex
- GHC.Data.Graph.Inductive.Graph: OrdGr :: gr a b -> OrdGr gr a b
+ GHC.Data.Graph.Inductive.Graph: OrdGr :: gr a b -> OrdGr (gr :: Type -> Type -> Type) a b
- GHC.Data.Graph.Inductive.Graph: [unOrdGr] :: OrdGr gr a b -> gr a b
+ GHC.Data.Graph.Inductive.Graph: [unOrdGr] :: OrdGr (gr :: Type -> Type -> Type) a b -> gr a b
- GHC.Data.Graph.Inductive.Graph: class (Graph gr) => DynGraph gr
+ GHC.Data.Graph.Inductive.Graph: class Graph gr => DynGraph (gr :: Type -> Type -> Type)
- GHC.Data.Graph.Inductive.Graph: class Graph gr
+ GHC.Data.Graph.Inductive.Graph: class Graph (gr :: Type -> Type -> Type)
- GHC.Data.Graph.Inductive.Graph: newtype OrdGr gr a b
+ GHC.Data.Graph.Inductive.Graph: newtype OrdGr (gr :: Type -> Type -> Type) a b
- GHC.Data.Graph.Inductive.Graph: type Decomp g a b = (MContext a b, g a b)
+ GHC.Data.Graph.Inductive.Graph: type Decomp (g :: Type -> Type -> Type) a b = (MContext a b, g a b)
- GHC.Data.Graph.Inductive.Graph: type GDecomp g a b = (Context a b, g a b)
+ GHC.Data.Graph.Inductive.Graph: type GDecomp (g :: Type -> Type -> Type) a b = (Context a b, g a b)
- GHC.Data.Graph.Inductive.Graph: type MContext a b = Maybe (Context a b)
+ GHC.Data.Graph.Inductive.Graph: type MContext a b = Maybe Context a b
- GHC.Data.IOEnv: data () => IORef a
+ GHC.Data.IOEnv: data IORef a
- GHC.Data.Maybe: newtype () => MaybeT (m :: Type -> Type) a
+ GHC.Data.Maybe: newtype MaybeT (m :: Type -> Type) a
- GHC.Data.Stream: Done :: b -> StreamS m a b
+ GHC.Data.Stream: Done :: b -> StreamS (m :: Type -> Type) a b
- GHC.Data.Stream: Effect :: m (StreamS m a b) -> StreamS m a b
+ GHC.Data.Stream: Effect :: m (StreamS m a b) -> StreamS (m :: Type -> Type) a b
- GHC.Data.Stream: Stream :: (forall r' r. (a -> m r') -> (b -> StreamS m r' r) -> StreamS m r' r) -> Stream m a b
+ GHC.Data.Stream: Stream :: (forall r' r. () => (a -> m r') -> (b -> StreamS m r' r) -> StreamS m r' r) -> Stream (m :: Type -> Type) a b
- GHC.Data.Stream: Yield :: a -> StreamS m a b -> StreamS m a b
+ GHC.Data.Stream: Yield :: a -> StreamS m a b -> StreamS (m :: Type -> Type) a b
- GHC.Data.Stream: [runStreamInternal] :: Stream m a b -> forall r' r. (a -> m r') -> (b -> StreamS m r' r) -> StreamS m r' r
+ GHC.Data.Stream: [runStreamInternal] :: Stream (m :: Type -> Type) a b -> forall r' r. () => (a -> m r') -> (b -> StreamS m r' r) -> StreamS m r' r
- GHC.Data.Stream: consume :: (Monad m, Monad n) => Stream m a b -> (forall a. m a -> n a) -> (a -> n ()) -> n b
+ GHC.Data.Stream: consume :: (Monad m, Monad n) => Stream m a b -> (forall a1. () => m a1 -> n a1) -> (a -> n ()) -> n b
- GHC.Data.Stream: data StreamS m a b
+ GHC.Data.Stream: data StreamS (m :: Type -> Type) a b
- GHC.Data.Stream: fromList :: Monad m => [a] -> Stream m a ()
+ GHC.Data.Stream: fromList :: forall (m :: Type -> Type) a. Monad m => [a] -> Stream m a ()
- GHC.Data.Stream: map :: Monad m => (a -> b) -> Stream m a x -> Stream m b x
+ GHC.Data.Stream: map :: forall (m :: Type -> Type) a b x. Monad m => (a -> b) -> Stream m a x -> Stream m b x
- GHC.Data.Stream: newtype Stream m a b
+ GHC.Data.Stream: newtype Stream (m :: Type -> Type) a b
- GHC.Data.Stream: runStream :: Applicative m => Stream m r' r -> StreamS m r' r
+ GHC.Data.Stream: runStream :: forall (m :: Type -> Type) r' r. Applicative m => Stream m r' r -> StreamS m r' r
- GHC.Data.Stream: yield :: Monad m => a -> Stream m a ()
+ GHC.Data.Stream: yield :: forall (m :: Type -> Type) a. Monad m => a -> Stream m a ()
- GHC.Data.TrieMap: alterTM :: forall b. TrieMap m => Key m -> XT b -> m b -> m b
+ GHC.Data.TrieMap: alterTM :: TrieMap m => Key m -> XT b -> m b -> m b
- GHC.Data.TrieMap: class Functor m => TrieMap m where {
+ GHC.Data.TrieMap: class Functor m => TrieMap (m :: Type -> Type) where {
- GHC.Data.TrieMap: data GenMap m a
+ GHC.Data.TrieMap: data GenMap (m :: Type -> Type) a
- GHC.Data.TrieMap: data ListMap m a
+ GHC.Data.TrieMap: data ListMap (m :: Type -> Type) a
- GHC.Data.TrieMap: data MaybeMap m a
+ GHC.Data.TrieMap: data MaybeMap (m :: Type -> Type) a
- GHC.Data.TrieMap: fdG :: TrieMap m => (a -> b -> b) -> GenMap m a -> b -> b
+ GHC.Data.TrieMap: fdG :: forall (m :: Type -> Type) a b. TrieMap m => (a -> b -> b) -> GenMap m a -> b -> b
- GHC.Data.TrieMap: lkG :: (Eq (Key m), TrieMap m) => Key m -> GenMap m a -> Maybe a
+ GHC.Data.TrieMap: lkG :: forall (m :: Type -> Type) a. (Eq (Key m), TrieMap m) => Key m -> GenMap m a -> Maybe a
- GHC.Data.TrieMap: lkList :: TrieMap m => (forall b. k -> m b -> Maybe b) -> [k] -> ListMap m a -> Maybe a
+ GHC.Data.TrieMap: lkList :: TrieMap m => (forall b. () => k -> m b -> Maybe b) -> [k] -> ListMap m a -> Maybe a
- GHC.Data.TrieMap: lookupTM :: forall b. TrieMap m => Key m -> m b -> Maybe b
+ GHC.Data.TrieMap: lookupTM :: TrieMap m => Key m -> m b -> Maybe b
- GHC.Data.TrieMap: mapG :: Functor m => (a -> b) -> GenMap m a -> GenMap m b
+ GHC.Data.TrieMap: mapG :: forall (m :: Type -> Type) a b. Functor m => (a -> b) -> GenMap m a -> GenMap m b
- GHC.Data.TrieMap: type Key m :: Type;
+ GHC.Data.TrieMap: type Key (m :: Type -> Type);
- GHC.Data.TrieMap: xtG :: (Eq (Key m), TrieMap m) => Key m -> XT a -> GenMap m a -> GenMap m a
+ GHC.Data.TrieMap: xtG :: forall (m :: Type -> Type) a. (Eq (Key m), TrieMap m) => Key m -> XT a -> GenMap m a -> GenMap m a
- GHC.Data.TrieMap: xtList :: TrieMap m => (forall b. k -> XT b -> m b -> m b) -> [k] -> XT a -> ListMap m a -> ListMap m a
+ GHC.Data.TrieMap: xtList :: TrieMap m => (forall b. () => k -> XT b -> m b -> m b) -> [k] -> XT a -> ListMap m a -> ListMap m a
- GHC.Data.Unboxed: data MaybeUB a
+ GHC.Data.Unboxed: data MaybeUB a :: TYPE 'SumRep '[ZeroBitRep, LiftedRep]
- GHC.Driver.Backpack.Syntax: type LHsModuleId n = Located (HsModuleId n)
+ GHC.Driver.Backpack.Syntax: type LHsModuleId n = Located HsModuleId n
- GHC.Driver.Backpack.Syntax: type LHsModuleSubst n = Located (HsModuleSubst n)
+ GHC.Driver.Backpack.Syntax: type LHsModuleSubst n = Located HsModuleSubst n
- GHC.Driver.Backpack.Syntax: type LHsUnit n = Located (HsUnit n)
+ GHC.Driver.Backpack.Syntax: type LHsUnit n = Located HsUnit n
- GHC.Driver.Backpack.Syntax: type LHsUnitDecl n = Located (HsUnitDecl n)
+ GHC.Driver.Backpack.Syntax: type LHsUnitDecl n = Located HsUnitDecl n
- GHC.Driver.Backpack.Syntax: type LHsUnitId n = Located (HsUnitId n)
+ GHC.Driver.Backpack.Syntax: type LHsUnitId n = Located HsUnitId n
- GHC.Driver.CmdLine: AnySuffix :: (String -> EwM m ()) -> OptKind m
+ GHC.Driver.CmdLine: AnySuffix :: (String -> EwM m ()) -> OptKind (m :: Type -> Type)
- GHC.Driver.CmdLine: Flag :: String -> OptKind m -> GhcFlagMode -> Flag m
+ GHC.Driver.CmdLine: Flag :: String -> OptKind m -> GhcFlagMode -> Flag (m :: Type -> Type)
- GHC.Driver.CmdLine: FloatSuffix :: (Float -> EwM m ()) -> OptKind m
+ GHC.Driver.CmdLine: FloatSuffix :: (Float -> EwM m ()) -> OptKind (m :: Type -> Type)
- GHC.Driver.CmdLine: HasArg :: (String -> EwM m ()) -> OptKind m
+ GHC.Driver.CmdLine: HasArg :: (String -> EwM m ()) -> OptKind (m :: Type -> Type)
- GHC.Driver.CmdLine: IntSuffix :: (Int -> EwM m ()) -> OptKind m
+ GHC.Driver.CmdLine: IntSuffix :: (Int -> EwM m ()) -> OptKind (m :: Type -> Type)
- GHC.Driver.CmdLine: NoArg :: EwM m () -> OptKind m
+ GHC.Driver.CmdLine: NoArg :: EwM m () -> OptKind (m :: Type -> Type)
- GHC.Driver.CmdLine: OptIntSuffix :: (Maybe Int -> EwM m ()) -> OptKind m
+ GHC.Driver.CmdLine: OptIntSuffix :: (Maybe Int -> EwM m ()) -> OptKind (m :: Type -> Type)
- GHC.Driver.CmdLine: OptPrefix :: (String -> EwM m ()) -> OptKind m
+ GHC.Driver.CmdLine: OptPrefix :: (String -> EwM m ()) -> OptKind (m :: Type -> Type)
- GHC.Driver.CmdLine: PassFlag :: (String -> EwM m ()) -> OptKind m
+ GHC.Driver.CmdLine: PassFlag :: (String -> EwM m ()) -> OptKind (m :: Type -> Type)
- GHC.Driver.CmdLine: Prefix :: (String -> EwM m ()) -> OptKind m
+ GHC.Driver.CmdLine: Prefix :: (String -> EwM m ()) -> OptKind (m :: Type -> Type)
- GHC.Driver.CmdLine: SepArg :: (String -> EwM m ()) -> OptKind m
+ GHC.Driver.CmdLine: SepArg :: (String -> EwM m ()) -> OptKind (m :: Type -> Type)
- GHC.Driver.CmdLine: [flagGhcMode] :: Flag m -> GhcFlagMode
+ GHC.Driver.CmdLine: [flagGhcMode] :: Flag (m :: Type -> Type) -> GhcFlagMode
- GHC.Driver.CmdLine: [flagName] :: Flag m -> String
+ GHC.Driver.CmdLine: [flagName] :: Flag (m :: Type -> Type) -> String
- GHC.Driver.CmdLine: [flagOptKind] :: Flag m -> OptKind m
+ GHC.Driver.CmdLine: [flagOptKind] :: Flag (m :: Type -> Type) -> OptKind m
- GHC.Driver.CmdLine: addErr :: Monad m => String -> EwM m ()
+ GHC.Driver.CmdLine: addErr :: forall (m :: Type -> Type). Monad m => String -> EwM m ()
- GHC.Driver.CmdLine: addFlagWarn :: Monad m => DiagnosticReason -> String -> EwM m ()
+ GHC.Driver.CmdLine: addFlagWarn :: forall (m :: Type -> Type). Monad m => DriverMessage -> EwM m ()
- GHC.Driver.CmdLine: addWarn :: Monad m => String -> EwM m ()
+ GHC.Driver.CmdLine: addWarn :: forall (m :: Type -> Type). Monad m => String -> EwM m ()
- GHC.Driver.CmdLine: data EwM m a
+ GHC.Driver.CmdLine: data EwM (m :: Type -> Type) a
- GHC.Driver.CmdLine: data Flag m
+ GHC.Driver.CmdLine: data Flag (m :: Type -> Type)
- GHC.Driver.CmdLine: data OptKind m
+ GHC.Driver.CmdLine: data OptKind (m :: Type -> Type)
- GHC.Driver.CmdLine: defFlag :: String -> OptKind m -> Flag m
+ GHC.Driver.CmdLine: defFlag :: forall (m :: Type -> Type). String -> OptKind m -> Flag m
- GHC.Driver.CmdLine: defGhcFlag :: String -> OptKind m -> Flag m
+ GHC.Driver.CmdLine: defGhcFlag :: forall (m :: Type -> Type). String -> OptKind m -> Flag m
- GHC.Driver.CmdLine: defGhciFlag :: String -> OptKind m -> Flag m
+ GHC.Driver.CmdLine: defGhciFlag :: forall (m :: Type -> Type). String -> OptKind m -> Flag m
- GHC.Driver.CmdLine: defHiddenFlag :: String -> OptKind m -> Flag m
+ GHC.Driver.CmdLine: defHiddenFlag :: forall (m :: Type -> Type). String -> OptKind m -> Flag m
- GHC.Driver.CmdLine: getArg :: Monad m => EwM m String
+ GHC.Driver.CmdLine: getArg :: forall (m :: Type -> Type). Monad m => EwM m String
- GHC.Driver.CmdLine: getCurLoc :: Monad m => EwM m SrcSpan
+ GHC.Driver.CmdLine: getCurLoc :: forall (m :: Type -> Type). Monad m => EwM m SrcSpan
- GHC.Driver.CmdLine: hoistFlag :: forall m n. (forall a. m a -> n a) -> Flag m -> Flag n
+ GHC.Driver.CmdLine: hoistFlag :: (forall a. () => m a -> n a) -> Flag m -> Flag n
- GHC.Driver.CmdLine: parseResponseFile :: MonadIO m => FilePath -> EwM m [Located String]
+ GHC.Driver.CmdLine: parseResponseFile :: forall (m :: Type -> Type). MonadIO m => FilePath -> EwM m [Located String]
- GHC.Driver.CmdLine: processArgs :: Monad m => [Flag m] -> [Located String] -> (FilePath -> EwM m [Located String]) -> m ([Located String], [Err], [Warn])
+ GHC.Driver.CmdLine: processArgs :: Monad m => [Flag m] -> [Located String] -> (FilePath -> EwM m [Located String]) -> m ([Located String], [Err], Warns)
- GHC.Driver.CodeOutput: codeOutput :: forall a. Logger -> TmpFs -> LlvmConfigCache -> DynFlags -> UnitState -> Module -> FilePath -> ModLocation -> (a -> ForeignStubs) -> [(ForeignSrcLang, FilePath)] -> Set UnitId -> Stream IO RawCmmGroup a -> IO (FilePath, (Bool, Maybe FilePath), [(ForeignSrcLang, FilePath)], a)
+ GHC.Driver.CodeOutput: codeOutput :: Logger -> TmpFs -> LlvmConfigCache -> DynFlags -> UnitState -> Module -> FilePath -> ModLocation -> (a -> ForeignStubs) -> [(ForeignSrcLang, FilePath)] -> Set UnitId -> Stream IO RawCmmGroup a -> IO (FilePath, (Bool, Maybe FilePath), [(ForeignSrcLang, FilePath)], a)
- GHC.Driver.Errors: printMessages :: forall a. Diagnostic a => Logger -> DiagnosticOpts a -> DiagOpts -> Messages a -> IO ()
+ GHC.Driver.Errors: printMessages :: Diagnostic a => Logger -> DiagnosticOpts a -> DiagOpts -> Messages a -> IO ()
- GHC.Driver.Errors.Types: DriverMessageOpts :: DiagnosticOpts PsMessage -> DriverMessageOpts
+ GHC.Driver.Errors.Types: DriverMessageOpts :: DiagnosticOpts PsMessage -> DiagnosticOpts IfaceMessage -> DriverMessageOpts
- GHC.Driver.Errors.Types: [DriverUnknownMessage] :: UnknownDiagnostic -> DriverMessage
+ GHC.Driver.Errors.Types: [DriverUnknownMessage] :: UnknownDiagnostic (DiagnosticOpts DriverMessage) -> DriverMessage
- GHC.Driver.Errors.Types: [GhcUnknownMessage] :: UnknownDiagnostic -> GhcMessage
+ GHC.Driver.Errors.Types: [GhcUnknownMessage] :: UnknownDiagnostic (DiagnosticOpts GhcMessage) -> GhcMessage
- GHC.Driver.Flags: smallestWarningGroups :: WarningFlag -> [String]
+ GHC.Driver.Flags: smallestWarningGroups :: WarningFlag -> [WarningGroup]
- GHC.Driver.Flags: warningGroups :: [(String, [WarningFlag])]
+ GHC.Driver.Flags: warningGroups :: [WarningGroup]
- GHC.Driver.Flags: warningHierarchies :: [[String]]
+ GHC.Driver.Flags: warningHierarchies :: [[WarningGroup]]
- GHC.Driver.GenerateCgIPEStub: generateCgIPEStub :: HscEnv -> Module -> InfoTableProvMap -> (NonCaffySet, ModuleLFInfos, Map CmmInfoTable (Maybe IpeSourceLocation), IPEStats) -> Stream IO CmmGroupSRTs CmmCgInfos
+ GHC.Driver.GenerateCgIPEStub: generateCgIPEStub :: HscEnv -> Module -> InfoTableProvMap -> Stream IO CmmGroupSRTs (NonCaffySet, ModuleLFInfos) -> Stream IO CmmGroupSRTs CmmCgInfos
- GHC.Driver.Hooks: class HasHooks m
+ GHC.Driver.Hooks: class HasHooks (m :: Type -> Type)
- GHC.Driver.Hooks: cmmToRawCmmHook :: Hooks -> forall a. Maybe (DynFlags -> Maybe Module -> Stream IO CmmGroupSRTs a -> IO (Stream IO RawCmmGroup a))
+ GHC.Driver.Hooks: cmmToRawCmmHook :: Hooks -> forall a. () => Maybe (DynFlags -> Maybe Module -> Stream IO CmmGroupSRTs a -> IO (Stream IO RawCmmGroup a))
- GHC.Driver.Hooks: type family DsForeignsHook :: Type
+ GHC.Driver.Hooks: type family DsForeignsHook
- GHC.Driver.Make: checkHomeUnitsClosed :: UnitEnv -> [DriverMessages]
+ GHC.Driver.Make: checkHomeUnitsClosed :: UnitEnv -> Set UnitId -> [(UnitId, UnitId)] -> [DriverMessages]
- GHC.Driver.Make: load' :: GhcMonad m => Maybe ModIfaceCache -> LoadHowMuch -> Maybe Messager -> ModuleGraph -> m SuccessFlag
+ GHC.Driver.Make: load' :: GhcMonad m => Maybe ModIfaceCache -> LoadHowMuch -> (GhcMessage -> AnyGhcDiagnostic) -> Maybe Messager -> ModuleGraph -> m SuccessFlag
- GHC.Driver.Make: loadWithCache :: GhcMonad m => Maybe ModIfaceCache -> LoadHowMuch -> m SuccessFlag
+ GHC.Driver.Make: loadWithCache :: GhcMonad m => Maybe ModIfaceCache -> (GhcMessage -> AnyGhcDiagnostic) -> LoadHowMuch -> m SuccessFlag
- GHC.Driver.Monad: GhcT :: (Session -> m a) -> GhcT m a
+ GHC.Driver.Monad: GhcT :: (Session -> m a) -> GhcT (m :: Type -> Type) a
- GHC.Driver.Monad: [unGhcT] :: GhcT m a -> Session -> m a
+ GHC.Driver.Monad: [unGhcT] :: GhcT (m :: Type -> Type) a -> Session -> m a
- GHC.Driver.Monad: class (Functor m, ExceptionMonad m, HasDynFlags m, HasLogger m) => GhcMonad m
+ GHC.Driver.Monad: class (Functor m, ExceptionMonad m, HasDynFlags m, HasLogger m) => GhcMonad (m :: Type -> Type)
- GHC.Driver.Monad: newtype GhcT m a
+ GHC.Driver.Monad: newtype GhcT (m :: Type -> Type) a
- GHC.Driver.Monad: type WarnErrLogger = forall m. (HasDynFlags m, MonadIO m, HasLogger m) => Maybe SourceError -> m ()
+ GHC.Driver.Monad: type WarnErrLogger = forall (m :: Type -> Type). (HasDynFlags m, MonadIO m, HasLogger m) => Maybe SourceError -> m ()
- GHC.Driver.Pipeline: [T_As] :: Bool -> PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline: [T_As] :: Bool -> PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline: [T_Cc] :: Phase -> PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline: [T_Cc] :: Phase -> PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline: [T_CmmCpp] :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline: [T_CmmCpp] :: PipeEnv -> HscEnv -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline: [T_Cpp] :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline: [T_Cpp] :: PipeEnv -> HscEnv -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline: [T_FileArgs] :: HscEnv -> FilePath -> TPhase (DynFlags, Messages PsMessage, [Warn])
+ GHC.Driver.Pipeline: [T_FileArgs] :: HscEnv -> FilePath -> TPhase (DynFlags, Messages PsMessage, Messages DriverMessage)
- GHC.Driver.Pipeline: [T_ForeignJs] :: PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline: [T_ForeignJs] :: PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline: [T_HsPp] :: PipeEnv -> HscEnv -> FilePath -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline: [T_HsPp] :: PipeEnv -> HscEnv -> FilePath -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline: [T_Js] :: PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline: [T_Js] :: PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline: [T_LlvmLlc] :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline: [T_LlvmLlc] :: PipeEnv -> HscEnv -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline: [T_LlvmMangle] :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline: [T_LlvmMangle] :: PipeEnv -> HscEnv -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline: [T_LlvmOpt] :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline: [T_LlvmOpt] :: PipeEnv -> HscEnv -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline: [T_MergeForeign] :: PipeEnv -> HscEnv -> FilePath -> [FilePath] -> TPhase FilePath
+ GHC.Driver.Pipeline: [T_MergeForeign] :: PipeEnv -> HscEnv -> FilePath -> [FilePath] -> TPhase [Char]
- GHC.Driver.Pipeline: [T_Unlit] :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline: [T_Unlit] :: PipeEnv -> HscEnv -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline: class MonadUse f m
+ GHC.Driver.Pipeline: class MonadUse (f :: Type -> Type) (m :: Type -> Type)
- GHC.Driver.Pipeline: link :: GhcLink -> Logger -> TmpFs -> Hooks -> DynFlags -> UnitEnv -> Bool -> Maybe (RecompileRequired -> IO ()) -> HomePackageTable -> IO SuccessFlag
+ GHC.Driver.Pipeline: link :: GhcLink -> Logger -> TmpFs -> FinderCache -> Hooks -> DynFlags -> UnitEnv -> Bool -> Maybe (RecompileRequired -> IO ()) -> HomePackageTable -> IO SuccessFlag
- GHC.Driver.Pipeline.Execute: getFileArgs :: HscEnv -> FilePath -> IO (DynFlags, Messages PsMessage, [Warn])
+ GHC.Driver.Pipeline.Execute: getFileArgs :: HscEnv -> FilePath -> IO (DynFlags, Messages PsMessage, Messages DriverMessage)
- GHC.Driver.Pipeline.LogQueue: logThread :: Int -> Int -> Logger -> TVar Bool -> TVar LogQueueQueue -> IO (IO ())
+ GHC.Driver.Pipeline.LogQueue: logThread :: Logger -> TVar Bool -> TVar LogQueueQueue -> IO (IO ())
- GHC.Driver.Pipeline.Monad: class MonadUse f m
+ GHC.Driver.Pipeline.Monad: class MonadUse (f :: Type -> Type) (m :: Type -> Type)
- GHC.Driver.Pipeline.Phases: PhaseHook :: (forall a. TPhase a -> IO a) -> PhaseHook
+ GHC.Driver.Pipeline.Phases: PhaseHook :: (forall a. () => TPhase a -> IO a) -> PhaseHook
- GHC.Driver.Pipeline.Phases: [T_As] :: Bool -> PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline.Phases: [T_As] :: Bool -> PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline.Phases: [T_Cc] :: Phase -> PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline.Phases: [T_Cc] :: Phase -> PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline.Phases: [T_CmmCpp] :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline.Phases: [T_CmmCpp] :: PipeEnv -> HscEnv -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline.Phases: [T_Cpp] :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline.Phases: [T_Cpp] :: PipeEnv -> HscEnv -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline.Phases: [T_FileArgs] :: HscEnv -> FilePath -> TPhase (DynFlags, Messages PsMessage, [Warn])
+ GHC.Driver.Pipeline.Phases: [T_FileArgs] :: HscEnv -> FilePath -> TPhase (DynFlags, Messages PsMessage, Messages DriverMessage)
- GHC.Driver.Pipeline.Phases: [T_ForeignJs] :: PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline.Phases: [T_ForeignJs] :: PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline.Phases: [T_HsPp] :: PipeEnv -> HscEnv -> FilePath -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline.Phases: [T_HsPp] :: PipeEnv -> HscEnv -> FilePath -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline.Phases: [T_Js] :: PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline.Phases: [T_Js] :: PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline.Phases: [T_LlvmLlc] :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline.Phases: [T_LlvmLlc] :: PipeEnv -> HscEnv -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline.Phases: [T_LlvmMangle] :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline.Phases: [T_LlvmMangle] :: PipeEnv -> HscEnv -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline.Phases: [T_LlvmOpt] :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline.Phases: [T_LlvmOpt] :: PipeEnv -> HscEnv -> FilePath -> TPhase [Char]
- GHC.Driver.Pipeline.Phases: [T_MergeForeign] :: PipeEnv -> HscEnv -> FilePath -> [FilePath] -> TPhase FilePath
+ GHC.Driver.Pipeline.Phases: [T_MergeForeign] :: PipeEnv -> HscEnv -> FilePath -> [FilePath] -> TPhase [Char]
- GHC.Driver.Pipeline.Phases: [T_Unlit] :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath
+ GHC.Driver.Pipeline.Phases: [T_Unlit] :: PipeEnv -> HscEnv -> FilePath -> TPhase [Char]
- GHC.Driver.Plugins: Plugin :: CorePlugin -> TcPlugin -> DefaultingPlugin -> HoleFitPlugin -> ([CommandLineOption] -> HscEnv -> IO HscEnv) -> ([CommandLineOption] -> IO PluginRecompile) -> ([CommandLineOption] -> ModSummary -> ParsedResult -> Hsc ParsedResult) -> ([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
+ GHC.Driver.Plugins: Plugin :: CorePlugin -> TcPlugin -> DefaultingPlugin -> HoleFitPlugin -> ([CommandLineOption] -> HscEnv -> IO HscEnv) -> ([CommandLineOption] -> IO PluginRecompile) -> ([CommandLineOption] -> ModSummary -> ParsedResult -> Hsc ParsedResult) -> ([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
- GHC.Driver.Plugins: [interfaceLoadAction] :: Plugin -> forall lcl. [CommandLineOption] -> ModIface -> IfM lcl ModIface
+ GHC.Driver.Plugins: [interfaceLoadAction] :: Plugin -> forall lcl. () => [CommandLineOption] -> ModIface -> IfM lcl ModIface
- GHC.Driver.Session: CmdLineP :: (forall m. Monad m => StateT s m a) -> CmdLineP s a
+ GHC.Driver.Session: CmdLineP :: (forall (m :: Type -> Type). Monad m => StateT s m a) -> CmdLineP s a
- GHC.Driver.Session: DynFlags :: GhcMode -> GhcLink -> !Backend -> {-# UNPACK #-} !GhcNameVersion -> {-# UNPACK #-} !FileSettings -> Platform -> {-# UNPACK #-} !ToolSettings -> {-# UNPACK #-} !PlatformMisc -> [(String, String)] -> TempDir -> Int -> Int -> Int -> Int -> Int -> Maybe String -> [Int] -> Maybe Int -> Bool -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Int -> Int -> Int -> !Int -> Maybe Int -> Maybe Int -> Int -> Maybe Word -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Bool -> Maybe Int -> Int -> [FilePath] -> ModuleName -> Maybe String -> IntWithInf -> IntWithInf -> UnitId -> Maybe UnitId -> [(ModuleName, Module)] -> Maybe FilePath -> Maybe String -> Set ModuleName -> Set ModuleName -> Ways -> Maybe (String, Int) -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> String -> String -> String -> String -> String -> String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> DynLibLoader -> !Bool -> FilePath -> Maybe FilePath -> [Option] -> IncludeSpecs -> [String] -> [String] -> [String] -> Maybe String -> RtsOptsEnabled -> Bool -> String -> [ModuleName] -> [(ModuleName, String)] -> [String] -> [ExternalPluginSpec] -> FilePath -> Bool -> Bool -> [ModuleName] -> [String] -> [PackageDBFlag] -> [IgnorePackageFlag] -> [PackageFlag] -> [PackageFlag] -> [TrustFlag] -> Maybe FilePath -> EnumSet DumpFlag -> EnumSet GeneralFlag -> EnumSet WarningFlag -> EnumSet WarningFlag -> Maybe Language -> SafeHaskellMode -> Bool -> Bool -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> [OnOff Extension] -> EnumSet Extension -> !UnfoldingOpts -> Int -> Int -> FlushOut -> Maybe FilePath -> Maybe String -> [String] -> Int -> Int -> Bool -> OverridingBool -> Bool -> Scheme -> ProfAuto -> [CallerCcFilter] -> Maybe String -> Maybe SseVersion -> Maybe BmiVersion -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> IORef (Maybe LinkerInfo) -> IORef (Maybe CompilerInfo) -> IORef (Maybe CompilerInfo) -> Int -> Int -> Int -> Bool -> Maybe Int -> Word64 -> Int -> Weights -> DynFlags
+ GHC.Driver.Session: DynFlags :: GhcMode -> GhcLink -> !Backend -> {-# UNPACK #-} !GhcNameVersion -> {-# UNPACK #-} !FileSettings -> Platform -> {-# UNPACK #-} !ToolSettings -> {-# UNPACK #-} !PlatformMisc -> [(String, String)] -> TempDir -> Int -> Int -> Int -> Int -> Int -> Maybe String -> [Int] -> Maybe ParMakeCount -> Bool -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Int -> Int -> Int -> !Int -> Maybe Int -> Maybe Int -> Int -> Maybe Word -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Bool -> Maybe Int -> Int -> [FilePath] -> ModuleName -> Maybe String -> IntWithInf -> IntWithInf -> Int -> Int -> Int -> UnitId -> Maybe UnitId -> [(ModuleName, Module)] -> Maybe FilePath -> Maybe String -> Set ModuleName -> Set ModuleName -> Ways -> Maybe (String, Int) -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> String -> String -> String -> String -> String -> String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> DynLibLoader -> !Bool -> FilePath -> Maybe FilePath -> [Option] -> IncludeSpecs -> [String] -> [String] -> [String] -> Maybe String -> RtsOptsEnabled -> Bool -> String -> [ModuleName] -> [(ModuleName, String)] -> [String] -> [ExternalPluginSpec] -> FilePath -> Bool -> Bool -> [ModuleName] -> [String] -> [PackageDBFlag] -> [IgnorePackageFlag] -> [PackageFlag] -> [PackageFlag] -> [TrustFlag] -> Maybe FilePath -> EnumSet DumpFlag -> EnumSet GeneralFlag -> EnumSet WarningFlag -> EnumSet WarningFlag -> WarningCategorySet -> WarningCategorySet -> Maybe Language -> SafeHaskellMode -> Bool -> Bool -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> [OnOff Extension] -> EnumSet Extension -> !UnfoldingOpts -> Int -> Int -> FlushOut -> Maybe FilePath -> Maybe String -> [String] -> Int -> Int -> Bool -> OverridingBool -> Bool -> Scheme -> ProfAuto -> [CallerCcFilter] -> Maybe String -> Maybe SseVersion -> Maybe BmiVersion -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> IORef (Maybe LinkerInfo) -> IORef (Maybe CompilerInfo) -> IORef (Maybe CompilerInfo) -> Int -> Int -> Int -> Bool -> Maybe Int -> Word -> Int -> Weights -> DynFlags
- GHC.Driver.Session: [initialUnique] :: DynFlags -> Word64
+ GHC.Driver.Session: [initialUnique] :: DynFlags -> Word
- GHC.Driver.Session: [parMakeCount] :: DynFlags -> Maybe Int
+ GHC.Driver.Session: [parMakeCount] :: DynFlags -> Maybe ParMakeCount
- GHC.Driver.Session: class HasDynFlags m
+ GHC.Driver.Session: class HasDynFlags (m :: Type -> Type)
- GHC.Driver.Session: makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String])
+ GHC.Driver.Session: makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Warn])
- GHC.Driver.Session: parseDynamicFilePragma :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
+ GHC.Driver.Session: parseDynamicFilePragma :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], Messages DriverMessage)
- GHC.Driver.Session: parseDynamicFlagsCmdLine :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
+ GHC.Driver.Session: parseDynamicFlagsCmdLine :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], Messages DriverMessage)
- GHC.Driver.Session: parseDynamicFlagsFull :: forall m. MonadIO m => [Flag (CmdLineP DynFlags)] -> Bool -> DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
+ GHC.Driver.Session: parseDynamicFlagsFull :: MonadIO m => [Flag (CmdLineP DynFlags)] -> Bool -> DynFlags -> [Located String] -> m (DynFlags, [Located String], Messages DriverMessage)
- GHC.Driver.Session: unsafeFlags :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]
+ GHC.Driver.Session: unsafeFlags :: [(Extension, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]
- GHC.Driver.Session: unsafeFlagsForInfer :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]
+ GHC.Driver.Session: unsafeFlagsForInfer :: [(Extension, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]
- GHC.Hs: AnnsModule :: [AddEpAnn] -> AnnList -> AnnsModule
+ GHC.Hs: AnnsModule :: [AddEpAnn] -> [TrailingAnn] -> Maybe (RealSrcSpan, RealSrcSpan) -> AnnsModule
- GHC.Hs: [am_decls] :: AnnsModule -> AnnList
+ GHC.Hs: [am_decls] :: AnnsModule -> [TrailingAnn]
- GHC.Hs.Binds: emptyLHsBinds :: LHsBindsLR (GhcPass idL) idR
+ GHC.Hs.Binds: emptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR
- GHC.Hs.Binds: emptyLocalBinds :: HsLocalBindsLR (GhcPass a) (GhcPass b)
+ GHC.Hs.Binds: emptyLocalBinds :: forall (a :: Pass) (b :: Pass). HsLocalBindsLR (GhcPass a) (GhcPass b)
- GHC.Hs.Binds: emptyValBindsIn :: HsValBindsLR (GhcPass a) (GhcPass b)
+ GHC.Hs.Binds: emptyValBindsIn :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b)
- GHC.Hs.Binds: emptyValBindsOut :: HsValBindsLR (GhcPass a) (GhcPass b)
+ GHC.Hs.Binds: emptyValBindsOut :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b)
- GHC.Hs.Binds: hsSigDoc :: forall p. IsPass p => Sig (GhcPass p) -> SDoc
+ GHC.Hs.Binds: hsSigDoc :: forall (p :: Pass). IsPass p => Sig (GhcPass p) -> SDoc
- GHC.Hs.Binds: isEmptyIPBindsPR :: HsIPBinds (GhcPass p) -> Bool
+ GHC.Hs.Binds: isEmptyIPBindsPR :: forall (p :: Pass). HsIPBinds (GhcPass p) -> Bool
- GHC.Hs.Binds: isEmptyLHsBinds :: LHsBindsLR (GhcPass idL) idR -> Bool
+ GHC.Hs.Binds: isEmptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR -> Bool
- GHC.Hs.Binds: isEmptyValBinds :: HsValBindsLR (GhcPass a) (GhcPass b) -> Bool
+ GHC.Hs.Binds: isEmptyValBinds :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) -> Bool
- GHC.Hs.Binds: plusHsValBinds :: HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)
+ GHC.Hs.Binds: plusHsValBinds :: forall (a :: Pass). HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)
- GHC.Hs.Binds: pprLHsBinds :: (OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
+ GHC.Hs.Binds: pprLHsBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- GHC.Hs.Binds: pprLHsBindsForUser :: (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId id2) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc]
+ GHC.Hs.Binds: pprLHsBindsForUser :: forall (idL :: Pass) (idR :: Pass) (id2 :: Pass). (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId id2) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc]
- GHC.Hs.Binds: ppr_monobind :: forall idL idR. (OutputableBndrId idL, OutputableBndrId idR) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc
+ GHC.Hs.Binds: ppr_monobind :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc
- GHC.Hs.Binds: ppr_sig :: forall p. OutputableBndrId p => Sig (GhcPass p) -> SDoc
+ GHC.Hs.Binds: ppr_sig :: forall (p :: Pass). OutputableBndrId p => Sig (GhcPass p) -> SDoc
- GHC.Hs.Decls: ConDeclGADT :: XConDeclGADT pass -> NonEmpty (LIdP pass) -> !LHsUniToken "::" "∷" pass -> XRec pass (HsOuterSigTyVarBndrs pass) -> Maybe (LHsContext pass) -> HsConDeclGADTDetails pass -> LHsType pass -> Maybe (LHsDoc pass) -> ConDecl pass
+ GHC.Hs.Decls: ConDeclGADT :: XConDeclGADT pass -> NonEmpty (LIdP pass) -> !LHsUniToken "::" "\8759" pass -> XRec pass (HsOuterSigTyVarBndrs pass) -> Maybe (LHsContext pass) -> HsConDeclGADTDetails pass -> LHsType pass -> Maybe (LHsDoc pass) -> ConDecl pass
- GHC.Hs.Decls: RecConGADT :: XRec pass [LConDeclField pass] -> LHsUniToken "->" "→" pass -> HsConDeclGADTDetails pass
+ GHC.Hs.Decls: RecConGADT :: XRec pass [LConDeclField pass] -> LHsUniToken "->" "\8594" pass -> HsConDeclGADTDetails pass
- GHC.Hs.Decls: [con_dcolon] :: ConDecl pass -> !LHsUniToken "::" "∷" pass
+ GHC.Hs.Decls: [con_dcolon] :: ConDecl pass -> !LHsUniToken "::" "\8759" pass
- GHC.Hs.Decls: annProvenanceName_maybe :: forall p. UnXRec p => AnnProvenance p -> Maybe (IdP p)
+ GHC.Hs.Decls: annProvenanceName_maybe :: UnXRec p => AnnProvenance p -> Maybe (IdP p)
- GHC.Hs.Decls: appendGroups :: HsGroup (GhcPass p) -> HsGroup (GhcPass p) -> HsGroup (GhcPass p)
+ GHC.Hs.Decls: appendGroups :: forall (p :: Pass). HsGroup (GhcPass p) -> HsGroup (GhcPass p) -> HsGroup (GhcPass p)
- GHC.Hs.Decls: emptyRdrGroup :: HsGroup (GhcPass p)
+ GHC.Hs.Decls: emptyRdrGroup :: forall (p :: Pass). HsGroup (GhcPass p)
- GHC.Hs.Decls: emptyRnGroup :: HsGroup (GhcPass p)
+ GHC.Hs.Decls: emptyRnGroup :: forall (p :: Pass). HsGroup (GhcPass p)
- GHC.Hs.Decls: famResultKindSignature :: FamilyResultSig (GhcPass p) -> Maybe (LHsKind (GhcPass p))
+ GHC.Hs.Decls: famResultKindSignature :: forall (p :: Pass). FamilyResultSig (GhcPass p) -> Maybe (LHsKind (GhcPass p))
- GHC.Hs.Decls: familyDeclLName :: FamilyDecl (GhcPass p) -> XRec (GhcPass p) (IdP (GhcPass p))
+ GHC.Hs.Decls: familyDeclLName :: forall (p :: Pass). FamilyDecl (GhcPass p) -> XRec (GhcPass p) (IdP (GhcPass p))
- GHC.Hs.Decls: familyDeclName :: FamilyDecl (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.Decls: familyDeclName :: forall (p :: Pass). FamilyDecl (GhcPass p) -> IdP (GhcPass p)
- GHC.Hs.Decls: flattenRuleDecls :: [LRuleDecls (GhcPass p)] -> [LRuleDecl (GhcPass p)]
+ GHC.Hs.Decls: flattenRuleDecls :: forall (p :: Pass). [LRuleDecls (GhcPass p)] -> [LRuleDecl (GhcPass p)]
- GHC.Hs.Decls: foldDerivStrategy :: p ~ GhcPass pass => r -> (XViaStrategy p -> r) -> DerivStrategy p -> r
+ GHC.Hs.Decls: foldDerivStrategy :: forall p (pass :: Pass) r. p ~ GhcPass pass => r -> (XViaStrategy p -> r) -> DerivStrategy p -> r
- GHC.Hs.Decls: hsConDeclTheta :: Maybe (LHsContext (GhcPass p)) -> [LHsType (GhcPass p)]
+ GHC.Hs.Decls: hsConDeclTheta :: forall (p :: Pass). Maybe (LHsContext (GhcPass p)) -> [LHsType (GhcPass p)]
- GHC.Hs.Decls: hsGroupTopLevelFixitySigs :: HsGroup (GhcPass p) -> [LFixitySig (GhcPass p)]
+ GHC.Hs.Decls: hsGroupTopLevelFixitySigs :: forall (p :: Pass). HsGroup (GhcPass p) -> [LFixitySig (GhcPass p)]
- GHC.Hs.Decls: instDeclDataFamInsts :: [LInstDecl (GhcPass p)] -> [DataFamInstDecl (GhcPass p)]
+ GHC.Hs.Decls: instDeclDataFamInsts :: forall (p :: Pass). [LInstDecl (GhcPass p)] -> [DataFamInstDecl (GhcPass p)]
- GHC.Hs.Decls: mapDerivStrategy :: p ~ GhcPass pass => (XViaStrategy p -> XViaStrategy p) -> DerivStrategy p -> DerivStrategy p
+ GHC.Hs.Decls: mapDerivStrategy :: forall p (pass :: Pass). p ~ GhcPass pass => (XViaStrategy p -> XViaStrategy p) -> DerivStrategy p -> DerivStrategy p
- GHC.Hs.Decls: newOrDataToFlavour :: NewOrData -> TyConFlavour
+ GHC.Hs.Decls: newOrDataToFlavour :: NewOrData -> TyConFlavour tc
- GHC.Hs.Decls: ppDataDefnHeader :: OutputableBndrId p => (Maybe (LHsContext (GhcPass p)) -> SDoc) -> HsDataDefn (GhcPass p) -> SDoc
+ GHC.Hs.Decls: ppDataDefnHeader :: forall (p :: Pass). OutputableBndrId p => (Maybe (LHsContext (GhcPass p)) -> SDoc) -> HsDataDefn (GhcPass p) -> SDoc
- GHC.Hs.Decls: pp_vanilla_decl_head :: OutputableBndrId p => XRec (GhcPass p) (IdP (GhcPass p)) -> LHsQTyVars (GhcPass p) -> LexicalFixity -> Maybe (LHsContext (GhcPass p)) -> SDoc
+ GHC.Hs.Decls: pp_vanilla_decl_head :: forall (p :: Pass). OutputableBndrId p => XRec (GhcPass p) (IdP (GhcPass p)) -> LHsQTyVars (GhcPass p) -> LexicalFixity -> Maybe (LHsContext (GhcPass p)) -> SDoc
- GHC.Hs.Decls: pprDataFamInstFlavour :: DataFamInstDecl (GhcPass p) -> SDoc
+ GHC.Hs.Decls: pprDataFamInstFlavour :: forall (p :: Pass). DataFamInstDecl (GhcPass p) -> SDoc
- GHC.Hs.Decls: pprHsFamInstLHS :: OutputableBndrId p => IdP (GhcPass p) -> HsOuterFamEqnTyVarBndrs (GhcPass p) -> HsTyPats (GhcPass p) -> LexicalFixity -> Maybe (LHsContext (GhcPass p)) -> SDoc
+ GHC.Hs.Decls: pprHsFamInstLHS :: forall (p :: Pass). OutputableBndrId p => IdP (GhcPass p) -> HsOuterFamEqnTyVarBndrs (GhcPass p) -> HsTyPats (GhcPass p) -> LexicalFixity -> Maybe (LHsContext (GhcPass p)) -> SDoc
- GHC.Hs.Decls: pprTyClDeclFlavour :: TyClDecl (GhcPass p) -> SDoc
+ GHC.Hs.Decls: pprTyClDeclFlavour :: forall (p :: Pass). TyClDecl (GhcPass p) -> SDoc
- GHC.Hs.Decls: pprTyFamInstDecl :: OutputableBndrId p => TopLevelFlag -> TyFamInstDecl (GhcPass p) -> SDoc
+ GHC.Hs.Decls: pprTyFamInstDecl :: forall (p :: Pass). OutputableBndrId p => TopLevelFlag -> TyFamInstDecl (GhcPass p) -> SDoc
- GHC.Hs.Decls: resultVariableName :: FamilyResultSig (GhcPass a) -> Maybe (IdP (GhcPass a))
+ GHC.Hs.Decls: resultVariableName :: forall (a :: Pass). FamilyResultSig (GhcPass a) -> Maybe (IdP (GhcPass a))
- GHC.Hs.Decls: roleAnnotDeclName :: RoleAnnotDecl (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.Decls: roleAnnotDeclName :: forall (p :: Pass). RoleAnnotDecl (GhcPass p) -> IdP (GhcPass p)
- GHC.Hs.Decls: standaloneKindSigName :: StandaloneKindSig (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.Decls: standaloneKindSigName :: forall (p :: Pass). StandaloneKindSig (GhcPass p) -> IdP (GhcPass p)
- GHC.Hs.Decls: tcdName :: Anno (IdGhcP p) ~ SrcSpanAnnN => TyClDecl (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.Decls: tcdName :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => TyClDecl (GhcPass p) -> IdP (GhcPass p)
- GHC.Hs.Decls: tyClDeclLName :: Anno (IdGhcP p) ~ SrcSpanAnnN => TyClDecl (GhcPass p) -> LocatedN (IdP (GhcPass p))
+ GHC.Hs.Decls: tyClDeclLName :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => TyClDecl (GhcPass p) -> LocatedN (IdP (GhcPass p))
- GHC.Hs.Decls: tyFamInstDeclLName :: Anno (IdGhcP p) ~ SrcSpanAnnN => TyFamInstDecl (GhcPass p) -> LocatedN (IdP (GhcPass p))
+ GHC.Hs.Decls: tyFamInstDeclLName :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => TyFamInstDecl (GhcPass p) -> LocatedN (IdP (GhcPass p))
- GHC.Hs.Decls: tyFamInstDeclName :: Anno (IdGhcP p) ~ SrcSpanAnnN => TyFamInstDecl (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.Decls: tyFamInstDeclName :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => TyFamInstDecl (GhcPass p) -> IdP (GhcPass p)
- GHC.Hs.Decls: type HsConDeclH98Details pass = HsConDetails Void (HsScaled pass (LBangType pass)) (XRec pass [LConDeclField pass])
+ GHC.Hs.Decls: type HsConDeclH98Details pass = HsConDetails Void HsScaled pass LBangType pass XRec pass [LConDeclField pass]
- GHC.Hs.Decls: type HsDeriving 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. [LHsDerivingClause pass]
+ GHC.Hs.Decls: type HsDeriving pass = [LHsDerivingClause pass]
- GHC.Hs.Decls: type LAnnDecl pass = XRec pass (AnnDecl pass)
+ GHC.Hs.Decls: type LAnnDecl pass = XRec pass AnnDecl pass
- GHC.Hs.Decls: type LClsInstDecl pass = XRec pass (ClsInstDecl pass)
+ GHC.Hs.Decls: type LClsInstDecl pass = XRec pass ClsInstDecl pass
- GHC.Hs.Decls: type LConDecl pass = -- | May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnSemi' when -- in a GADT constructor list XRec pass (ConDecl pass)
+ GHC.Hs.Decls: type LConDecl pass = XRec pass ConDecl pass
- GHC.Hs.Decls: type LDataFamInstDecl pass = XRec pass (DataFamInstDecl pass)
+ GHC.Hs.Decls: type LDataFamInstDecl pass = XRec pass DataFamInstDecl pass
- GHC.Hs.Decls: type LDefaultDecl pass = XRec pass (DefaultDecl pass)
+ GHC.Hs.Decls: type LDefaultDecl pass = XRec pass DefaultDecl pass
- GHC.Hs.Decls: type LDerivClauseTys pass = XRec pass (DerivClauseTys pass)
+ GHC.Hs.Decls: type LDerivClauseTys pass = XRec pass DerivClauseTys pass
- GHC.Hs.Decls: type LDerivDecl pass = XRec pass (DerivDecl pass)
+ GHC.Hs.Decls: type LDerivDecl pass = XRec pass DerivDecl pass
- GHC.Hs.Decls: type LDerivStrategy pass = XRec pass (DerivStrategy pass)
+ GHC.Hs.Decls: type LDerivStrategy pass = XRec pass DerivStrategy pass
- GHC.Hs.Decls: type LDocDecl pass = XRec pass (DocDecl pass)
+ GHC.Hs.Decls: type LDocDecl pass = XRec pass DocDecl pass
- GHC.Hs.Decls: type LFamilyDecl pass = XRec pass (FamilyDecl pass)
+ GHC.Hs.Decls: type LFamilyDecl pass = XRec pass FamilyDecl pass
- GHC.Hs.Decls: type LFamilyResultSig pass = XRec pass (FamilyResultSig pass)
+ GHC.Hs.Decls: type LFamilyResultSig pass = XRec pass FamilyResultSig pass
- GHC.Hs.Decls: type LForeignDecl pass = XRec pass (ForeignDecl pass)
+ GHC.Hs.Decls: type LForeignDecl pass = XRec pass ForeignDecl pass
- GHC.Hs.Decls: type LHsDecl p = -- | When in a list this may have -- -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnSemi' -- XRec p (HsDecl p)
+ GHC.Hs.Decls: type LHsDecl p = XRec p HsDecl p
- GHC.Hs.Decls: type LHsDerivingClause pass = XRec pass (HsDerivingClause pass)
+ GHC.Hs.Decls: type LHsDerivingClause pass = XRec pass HsDerivingClause pass
- GHC.Hs.Decls: type LHsFunDep pass = XRec pass (FunDep pass)
+ GHC.Hs.Decls: type LHsFunDep pass = XRec pass FunDep pass
- GHC.Hs.Decls: type LInjectivityAnn pass = XRec pass (InjectivityAnn pass)
+ GHC.Hs.Decls: type LInjectivityAnn pass = XRec pass InjectivityAnn pass
- GHC.Hs.Decls: type LInstDecl pass = XRec pass (InstDecl pass)
+ GHC.Hs.Decls: type LInstDecl pass = XRec pass InstDecl pass
- GHC.Hs.Decls: type LRoleAnnotDecl pass = XRec pass (RoleAnnotDecl pass)
+ GHC.Hs.Decls: type LRoleAnnotDecl pass = XRec pass RoleAnnotDecl pass
- GHC.Hs.Decls: type LRuleBndr pass = XRec pass (RuleBndr pass)
+ GHC.Hs.Decls: type LRuleBndr pass = XRec pass RuleBndr pass
- GHC.Hs.Decls: type LRuleDecl pass = XRec pass (RuleDecl pass)
+ GHC.Hs.Decls: type LRuleDecl pass = XRec pass RuleDecl pass
- GHC.Hs.Decls: type LRuleDecls pass = XRec pass (RuleDecls pass)
+ GHC.Hs.Decls: type LRuleDecls pass = XRec pass RuleDecls pass
- GHC.Hs.Decls: type LSpliceDecl pass = XRec pass (SpliceDecl pass)
+ GHC.Hs.Decls: type LSpliceDecl pass = XRec pass SpliceDecl pass
- GHC.Hs.Decls: type LStandaloneKindSig pass = XRec pass (StandaloneKindSig pass)
+ GHC.Hs.Decls: type LStandaloneKindSig pass = XRec pass StandaloneKindSig pass
- GHC.Hs.Decls: type LTyClDecl pass = XRec pass (TyClDecl pass)
+ GHC.Hs.Decls: type LTyClDecl pass = XRec pass TyClDecl pass
- GHC.Hs.Decls: type LTyFamDefltDecl pass = XRec pass (TyFamDefltDecl pass)
+ GHC.Hs.Decls: type LTyFamDefltDecl pass = XRec pass TyFamDefltDecl pass
- GHC.Hs.Decls: type LTyFamInstDecl pass = XRec pass (TyFamInstDecl pass)
+ GHC.Hs.Decls: type LTyFamInstDecl pass = XRec pass TyFamInstDecl pass
- GHC.Hs.Decls: type LTyFamInstEqn pass = -- | May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnSemi' -- when in a list XRec pass (TyFamInstEqn pass)
+ GHC.Hs.Decls: type LTyFamInstEqn pass = XRec pass TyFamInstEqn pass
- GHC.Hs.Decls: type LWarnDecl pass = XRec pass (WarnDecl pass)
+ GHC.Hs.Decls: type LWarnDecl pass = XRec pass WarnDecl pass
- GHC.Hs.Decls: type LWarnDecls pass = XRec pass (WarnDecls pass)
+ GHC.Hs.Decls: type LWarnDecls pass = XRec pass WarnDecls pass
- GHC.Hs.Decls: type TyFamInstEqn pass = FamEqn pass (LHsType pass)
+ GHC.Hs.Decls: type TyFamInstEqn pass = FamEqn pass LHsType pass
- GHC.Hs.Doc: type LHsDoc pass = Located (HsDoc pass)
+ GHC.Hs.Doc: type LHsDoc pass = Located HsDoc pass
- GHC.Hs.Expr: HsWrap :: HsWrapper -> hs_syn GhcTc -> HsWrap hs_syn
+ GHC.Hs.Expr: HsWrap :: HsWrapper -> hs_syn GhcTc -> HsWrap (hs_syn :: Type -> Type)
- GHC.Hs.Expr: data HsWrap hs_syn
+ GHC.Hs.Expr: data HsWrap (hs_syn :: Type -> Type)
- GHC.Hs.Expr: gHsPar :: LHsExpr (GhcPass id) -> HsExpr (GhcPass id)
+ GHC.Hs.Expr: gHsPar :: forall (id :: Pass). LHsExpr (GhcPass id) -> HsExpr (GhcPass id)
- GHC.Hs.Expr: hsExprNeedsParens :: forall p. IsPass p => PprPrec -> HsExpr (GhcPass p) -> Bool
+ GHC.Hs.Expr: hsExprNeedsParens :: forall (p :: Pass). IsPass p => PprPrec -> HsExpr (GhcPass p) -> Bool
- GHC.Hs.Expr: hsLMatchPats :: LMatch (GhcPass id) body -> [LPat (GhcPass id)]
+ GHC.Hs.Expr: hsLMatchPats :: forall (id :: Pass) body. LMatch (GhcPass id) body -> [LPat (GhcPass id)]
- GHC.Hs.Expr: isAtomicHsExpr :: forall p. IsPass p => HsExpr (GhcPass p) -> Bool
+ GHC.Hs.Expr: isAtomicHsExpr :: forall (p :: Pass). IsPass p => HsExpr (GhcPass p) -> Bool
- GHC.Hs.Expr: isEmptyMatchGroup :: MatchGroup (GhcPass p) body -> Bool
+ GHC.Hs.Expr: isEmptyMatchGroup :: forall (p :: Pass) body. MatchGroup (GhcPass p) body -> Bool
- GHC.Hs.Expr: isSingletonMatchGroup :: [LMatch (GhcPass p) body] -> Bool
+ GHC.Hs.Expr: isSingletonMatchGroup :: forall (p :: Pass) body. [LMatch (GhcPass p) body] -> Bool
- GHC.Hs.Expr: matchContextErrString :: OutputableBndrId p => HsMatchContext (GhcPass p) -> SDoc
+ GHC.Hs.Expr: matchContextErrString :: forall (p :: Pass). OutputableBndrId p => HsMatchContext (GhcPass p) -> SDoc
- GHC.Hs.Expr: matchGroupArity :: MatchGroup (GhcPass id) body -> Arity
+ GHC.Hs.Expr: matchGroupArity :: forall (id :: Pass) body. MatchGroup (GhcPass id) body -> Arity
- GHC.Hs.Expr: noExpr :: HsExpr (GhcPass p)
+ GHC.Hs.Expr: noExpr :: forall (p :: Pass). HsExpr (GhcPass p)
- GHC.Hs.Expr: noSyntaxExpr :: forall p. IsPass p => SyntaxExpr (GhcPass p)
+ GHC.Hs.Expr: noSyntaxExpr :: forall (p :: Pass). IsPass p => SyntaxExpr (GhcPass p)
- GHC.Hs.Expr: parenthesizeHsExpr :: IsPass p => PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
+ GHC.Hs.Expr: parenthesizeHsExpr :: forall (p :: Pass). IsPass p => PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- GHC.Hs.Expr: pprArg :: forall idL. OutputableBndrId idL => ApplicativeArg (GhcPass idL) -> SDoc
+ GHC.Hs.Expr: pprArg :: forall (idL :: Pass). OutputableBndrId idL => ApplicativeArg (GhcPass idL) -> SDoc
- GHC.Hs.Expr: pprArrowExpr :: (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc
+ GHC.Hs.Expr: pprArrowExpr :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc
- GHC.Hs.Expr: pprBinds :: (OutputableBndrId idL, OutputableBndrId idR) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
+ GHC.Hs.Expr: pprBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- GHC.Hs.Expr: pprCmd :: OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprCmd :: forall (p :: Pass). OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
- GHC.Hs.Expr: pprCmdArg :: OutputableBndrId p => HsCmdTop (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprCmdArg :: forall (p :: Pass). OutputableBndrId p => HsCmdTop (GhcPass p) -> SDoc
- GHC.Hs.Expr: pprComp :: (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc
+ GHC.Hs.Expr: pprComp :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc
- GHC.Hs.Expr: pprDebugParendExpr :: OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprDebugParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- GHC.Hs.Expr: pprDo :: (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => HsDoFlavour -> [LStmt (GhcPass p) body] -> SDoc
+ GHC.Hs.Expr: pprDo :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => HsDoFlavour -> [LStmt (GhcPass p) body] -> SDoc
- GHC.Hs.Expr: pprExpr :: OutputableBndrId p => HsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprExpr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> SDoc
- GHC.Hs.Expr: pprFieldLabelStrings :: forall p. (UnXRec p, Outputable (XRec p FieldLabelString)) => FieldLabelStrings p -> SDoc
+ GHC.Hs.Expr: pprFieldLabelStrings :: (UnXRec p, Outputable (XRec p FieldLabelString)) => FieldLabelStrings p -> SDoc
- GHC.Hs.Expr: pprFunBind :: OutputableBndrId idR => MatchGroup (GhcPass idR) (LHsExpr (GhcPass idR)) -> SDoc
+ GHC.Hs.Expr: pprFunBind :: forall (idR :: Pass). OutputableBndrId idR => MatchGroup (GhcPass idR) (LHsExpr (GhcPass idR)) -> SDoc
- GHC.Hs.Expr: pprGRHS :: (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHS (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprGRHS :: forall (idR :: Pass) body passL. (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHS (GhcPass idR) body -> SDoc
- GHC.Hs.Expr: pprGRHSs :: (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHSs (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprGRHSs :: forall (idR :: Pass) body passL. (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHSs (GhcPass idR) body -> SDoc
- GHC.Hs.Expr: pprLCmd :: OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprLCmd :: forall (p :: Pass). OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
- GHC.Hs.Expr: pprLExpr :: OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprLExpr :: forall (p :: Pass). OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc
- GHC.Hs.Expr: pprMatch :: (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprMatch :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc
- GHC.Hs.Expr: pprMatchContextNoun :: forall p. (Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) => HsMatchContext p -> SDoc
+ GHC.Hs.Expr: pprMatchContextNoun :: (Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) => HsMatchContext p -> SDoc
- GHC.Hs.Expr: pprMatchContextNouns :: forall p. (Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) => HsMatchContext p -> SDoc
+ GHC.Hs.Expr: pprMatchContextNouns :: (Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) => HsMatchContext p -> SDoc
- GHC.Hs.Expr: pprMatchInCtxt :: (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprMatchInCtxt :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc
- GHC.Hs.Expr: pprMatches :: (OutputableBndrId idR, Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprMatches :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
- GHC.Hs.Expr: pprParendExpr :: OutputableBndrId p => PprPrec -> HsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> HsExpr (GhcPass p) -> SDoc
- GHC.Hs.Expr: pprParendLExpr :: OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprParendLExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- GHC.Hs.Expr: pprPatBind :: forall bndr p. (OutputableBndrId bndr, OutputableBndrId p) => LPat (GhcPass bndr) -> GRHSs (GhcPass p) (LHsExpr (GhcPass p)) -> SDoc
+ GHC.Hs.Expr: pprPatBind :: forall (bndr :: Pass) (p :: Pass). (OutputableBndrId bndr, OutputableBndrId p) => LPat (GhcPass bndr) -> GRHSs (GhcPass p) (LHsExpr (GhcPass p)) -> SDoc
- GHC.Hs.Expr: pprPendingSplice :: OutputableBndrId p => SplicePointName -> LHsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprPendingSplice :: forall (p :: Pass). OutputableBndrId p => SplicePointName -> LHsExpr (GhcPass p) -> SDoc
- GHC.Hs.Expr: pprQuals :: (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc
+ GHC.Hs.Expr: pprQuals :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc
- GHC.Hs.Expr: pprStmt :: forall idL idR body. (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprStmt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
- GHC.Hs.Expr: pprStmtCat :: Stmt (GhcPass p) body -> SDoc
+ GHC.Hs.Expr: pprStmtCat :: forall (p :: Pass) body. Stmt (GhcPass p) body -> SDoc
- GHC.Hs.Expr: pprStmtInCtxt :: (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId ctx, Outputable body, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA) => HsStmtContext (GhcPass ctx) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprStmtInCtxt :: forall (idL :: Pass) (idR :: Pass) (ctx :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId ctx, Outputable body, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA) => HsStmtContext (GhcPass ctx) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
- GHC.Hs.Expr: pprTransformStmt :: OutputableBndrId p => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc
+ GHC.Hs.Expr: pprTransformStmt :: forall (p :: Pass). OutputableBndrId p => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc
- GHC.Hs.Expr: pprTypedSplice :: OutputableBndrId p => Maybe SplicePointName -> LHsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprTypedSplice :: forall (p :: Pass). OutputableBndrId p => Maybe SplicePointName -> LHsExpr (GhcPass p) -> SDoc
- GHC.Hs.Expr: pprUntypedSplice :: forall p. OutputableBndrId p => Bool -> Maybe SplicePointName -> HsUntypedSplice (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprUntypedSplice :: forall (p :: Pass). OutputableBndrId p => Bool -> Maybe SplicePointName -> HsUntypedSplice (GhcPass p) -> SDoc
- GHC.Hs.Expr: ppr_apps :: OutputableBndrId p => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (LHsWcType (NoGhcTc (GhcPass p)))] -> SDoc
+ GHC.Hs.Expr: ppr_apps :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (LHsWcType (NoGhcTc (GhcPass p)))] -> SDoc
- GHC.Hs.Expr: ppr_cmd :: forall p. OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
+ GHC.Hs.Expr: ppr_cmd :: forall (p :: Pass). OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
- GHC.Hs.Expr: ppr_do_stmts :: (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc
+ GHC.Hs.Expr: ppr_do_stmts :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc
- GHC.Hs.Expr: ppr_expr :: forall p. OutputableBndrId p => HsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: ppr_expr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> SDoc
- GHC.Hs.Expr: ppr_infix_expr :: forall p. OutputableBndrId p => HsExpr (GhcPass p) -> Maybe SDoc
+ GHC.Hs.Expr: ppr_infix_expr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> Maybe SDoc
- GHC.Hs.Expr: ppr_lcmd :: OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
+ GHC.Hs.Expr: ppr_lcmd :: forall (p :: Pass). OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
- GHC.Hs.Expr: ppr_lexpr :: OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: ppr_lexpr :: forall (p :: Pass). OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc
- GHC.Hs.Expr: ppr_splice :: OutputableBndrId p => SDoc -> Maybe SplicePointName -> LHsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: ppr_splice :: forall (p :: Pass). OutputableBndrId p => SDoc -> Maybe SplicePointName -> LHsExpr (GhcPass p) -> SDoc
- GHC.Hs.Expr: stripParensHsExpr :: HsExpr (GhcPass p) -> HsExpr (GhcPass p)
+ GHC.Hs.Expr: stripParensHsExpr :: forall (p :: Pass). HsExpr (GhcPass p) -> HsExpr (GhcPass p)
- GHC.Hs.Expr: stripParensLHsExpr :: LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
+ GHC.Hs.Expr: stripParensLHsExpr :: forall (p :: Pass). LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- GHC.Hs.Expr: tupArgPresent :: HsTupArg (GhcPass p) -> Bool
+ GHC.Hs.Expr: tupArgPresent :: forall (p :: Pass). HsTupArg (GhcPass p) -> Bool
- GHC.Hs.Extension: class (NoGhcTcPass (NoGhcTcPass p) ~ NoGhcTcPass p, IsPass (NoGhcTcPass p)) => IsPass p
+ GHC.Hs.Extension: class (NoGhcTcPass NoGhcTcPass p ~ NoGhcTcPass p, IsPass NoGhcTcPass p) => IsPass (p :: Pass)
- GHC.Hs.Extension: noHsTok :: GenLocated TokenLocation (HsToken tok)
+ GHC.Hs.Extension: noHsTok :: forall (tok :: Symbol). GenLocated TokenLocation (HsToken tok)
- GHC.Hs.Extension: noHsUniTok :: GenLocated TokenLocation (HsUniToken tok utok)
+ GHC.Hs.Extension: noHsUniTok :: forall (tok :: Symbol) (utok :: Symbol). GenLocated TokenLocation (HsUniToken tok utok)
- GHC.Hs.Extension: pprIfPs :: forall p. IsPass p => (p ~ 'Parsed => SDoc) -> SDoc
+ GHC.Hs.Extension: pprIfPs :: forall (p :: Pass). IsPass p => (p ~ 'Parsed => SDoc) -> SDoc
- GHC.Hs.Extension: pprIfRn :: forall p. IsPass p => (p ~ 'Renamed => SDoc) -> SDoc
+ GHC.Hs.Extension: pprIfRn :: forall (p :: Pass). IsPass p => (p ~ 'Renamed => SDoc) -> SDoc
- GHC.Hs.Extension: pprIfTc :: forall p. IsPass p => (p ~ 'Typechecked => SDoc) -> SDoc
+ GHC.Hs.Extension: pprIfTc :: forall (p :: Pass). IsPass p => (p ~ 'Typechecked => SDoc) -> SDoc
- GHC.Hs.Extension: type IsSrcSpanAnn p a = (Anno (IdGhcP p) ~ SrcSpanAnn' (EpAnn a), IsPass p)
+ GHC.Hs.Extension: type IsSrcSpanAnn (p :: Pass) a = (Anno IdGhcP p ~ SrcSpanAnn' EpAnn a, IsPass p)
- GHC.Hs.Extension: type OutputableBndrId pass = (OutputableBndr (IdGhcP pass), OutputableBndr (IdGhcP (NoGhcTcPass pass)), Outputable (GenLocated (Anno (IdGhcP pass)) (IdGhcP pass)), Outputable (GenLocated (Anno (IdGhcP (NoGhcTcPass pass))) (IdGhcP (NoGhcTcPass pass))), IsPass pass)
+ GHC.Hs.Extension: type OutputableBndrId (pass :: Pass) = (OutputableBndr IdGhcP pass, OutputableBndr IdGhcP NoGhcTcPass pass, Outputable GenLocated Anno IdGhcP pass IdGhcP pass, Outputable GenLocated Anno IdGhcP NoGhcTcPass pass IdGhcP NoGhcTcPass pass, IsPass pass)
- GHC.Hs.ImpExp: ieLWrappedName :: LIEWrappedName (GhcPass p) -> LIdP (GhcPass p)
+ GHC.Hs.ImpExp: ieLWrappedName :: forall (p :: Pass). LIEWrappedName (GhcPass p) -> LIdP (GhcPass p)
- GHC.Hs.ImpExp: ieName :: IE (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.ImpExp: ieName :: forall (p :: Pass). IE (GhcPass p) -> IdP (GhcPass p)
- GHC.Hs.ImpExp: ieNames :: IE (GhcPass p) -> [IdP (GhcPass p)]
+ GHC.Hs.ImpExp: ieNames :: forall (p :: Pass). IE (GhcPass p) -> [IdP (GhcPass p)]
- GHC.Hs.ImpExp: ieWrappedLName :: IEWrappedName (GhcPass p) -> LIdP (GhcPass p)
+ GHC.Hs.ImpExp: ieWrappedLName :: forall (p :: Pass). IEWrappedName (GhcPass p) -> LIdP (GhcPass p)
- GHC.Hs.ImpExp: ieWrappedName :: IEWrappedName (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.ImpExp: ieWrappedName :: forall (p :: Pass). IEWrappedName (GhcPass p) -> IdP (GhcPass p)
- GHC.Hs.ImpExp: lieWrappedName :: LIEWrappedName (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.ImpExp: lieWrappedName :: forall (p :: Pass). LIEWrappedName (GhcPass p) -> IdP (GhcPass p)
- GHC.Hs.Lit: convertLit :: HsLit (GhcPass p1) -> HsLit (GhcPass p2)
+ GHC.Hs.Lit: convertLit :: forall (p1 :: Pass) (p2 :: Pass). HsLit (GhcPass p1) -> HsLit (GhcPass p2)
- GHC.Hs.Lit: pmPprHsLit :: HsLit (GhcPass x) -> SDoc
+ GHC.Hs.Lit: pmPprHsLit :: forall (x :: Pass). HsLit (GhcPass x) -> SDoc
- GHC.Hs.Lit: pprXOverLit :: GhcPass p -> XOverLit (GhcPass p) -> SDoc
+ GHC.Hs.Lit: pprXOverLit :: forall (p :: Pass). GhcPass p -> XOverLit (GhcPass p) -> SDoc
- GHC.Hs.Pat: gParPat :: LPat (GhcPass pass) -> Pat (GhcPass pass)
+ GHC.Hs.Pat: gParPat :: forall (pass :: Pass). LPat (GhcPass pass) -> Pat (GhcPass pass)
- GHC.Hs.Pat: hsConPatArgs :: forall p. UnXRec p => HsConPatDetails p -> [LPat p]
+ GHC.Hs.Pat: hsConPatArgs :: UnXRec p => HsConPatDetails p -> [LPat p]
- GHC.Hs.Pat: hsRecFieldSel :: forall p arg. UnXRec p => HsRecField p arg -> XCFieldOcc p
+ GHC.Hs.Pat: hsRecFieldSel :: UnXRec p => HsRecField p arg -> XCFieldOcc p
- GHC.Hs.Pat: hsRecFields :: forall p arg. UnXRec p => HsRecFields p arg -> [XCFieldOcc p]
+ GHC.Hs.Pat: hsRecFields :: UnXRec p => HsRecFields p arg -> [XCFieldOcc p]
- GHC.Hs.Pat: hsRecFieldsArgs :: forall p arg. UnXRec p => HsRecFields p arg -> [arg]
+ GHC.Hs.Pat: hsRecFieldsArgs :: UnXRec p => HsRecFields p arg -> [arg]
- GHC.Hs.Pat: hsRecUpdFieldRdr :: HsRecUpdField (GhcPass p) -> Located RdrName
+ GHC.Hs.Pat: hsRecUpdFieldRdr :: forall (p :: Pass) q. HsRecUpdField (GhcPass p) q -> Located RdrName
- GHC.Hs.Pat: isBangedLPat :: LPat (GhcPass p) -> Bool
+ GHC.Hs.Pat: isBangedLPat :: forall (p :: Pass). LPat (GhcPass p) -> Bool
- GHC.Hs.Pat: isIrrefutableHsPat :: forall p. OutputableBndrId p => DynFlags -> LPat (GhcPass p) -> Bool
+ GHC.Hs.Pat: isIrrefutableHsPat :: forall (p :: Pass). OutputableBndrId p => Bool -> LPat (GhcPass p) -> Bool
- GHC.Hs.Pat: isSimplePat :: LPat (GhcPass x) -> Maybe (IdP (GhcPass x))
+ GHC.Hs.Pat: isSimplePat :: forall (x :: Pass). LPat (GhcPass x) -> Maybe (IdP (GhcPass x))
- GHC.Hs.Pat: parenthesizePat :: IsPass p => PprPrec -> LPat (GhcPass p) -> LPat (GhcPass p)
+ GHC.Hs.Pat: parenthesizePat :: forall (p :: Pass). IsPass p => PprPrec -> LPat (GhcPass p) -> LPat (GhcPass p)
- GHC.Hs.Pat: patNeedsParens :: forall p. IsPass p => PprPrec -> Pat (GhcPass p) -> Bool
+ GHC.Hs.Pat: patNeedsParens :: forall (p :: Pass). IsPass p => PprPrec -> Pat (GhcPass p) -> Bool
- GHC.Hs.Pat: pprConArgs :: (OutputableBndrId p, Outputable (Anno (IdGhcP p))) => HsConPatDetails (GhcPass p) -> SDoc
+ GHC.Hs.Pat: pprConArgs :: forall (p :: Pass). (OutputableBndrId p, Outputable (Anno (IdGhcP p))) => HsConPatDetails (GhcPass p) -> SDoc
- GHC.Hs.Pat: pprLPat :: OutputableBndrId p => LPat (GhcPass p) -> SDoc
+ GHC.Hs.Pat: pprLPat :: forall (p :: Pass). OutputableBndrId p => LPat (GhcPass p) -> SDoc
- GHC.Hs.Pat: pprParendLPat :: OutputableBndrId p => PprPrec -> LPat (GhcPass p) -> SDoc
+ GHC.Hs.Pat: pprParendLPat :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LPat (GhcPass p) -> SDoc
- GHC.Hs.Pat: type HsConPatDetails p = HsConDetails (HsConPatTyArg (NoGhcTc p)) (LPat p) (HsRecFields p (LPat p))
+ GHC.Hs.Pat: type HsConPatDetails p = HsConDetails HsConPatTyArg NoGhcTc p LPat p HsRecFields p LPat p
- GHC.Hs.Pat: type HsRecField p arg = HsFieldBind (LFieldOcc p) arg
+ GHC.Hs.Pat: type HsRecField p arg = HsFieldBind LFieldOcc p arg
- GHC.Hs.Pat: type HsRecUpdField p = HsFieldBind (LAmbiguousFieldOcc p) (LHsExpr p)
+ GHC.Hs.Pat: type HsRecUpdField p q = HsFieldBind LAmbiguousFieldOcc p LHsExpr q
- GHC.Hs.Pat: type LHsFieldBind p id arg = XRec p (HsFieldBind id arg)
+ GHC.Hs.Pat: type LHsFieldBind p id arg = XRec p HsFieldBind id arg
- GHC.Hs.Pat: type LHsRecField p arg = XRec p (HsRecField p arg)
+ GHC.Hs.Pat: type LHsRecField p arg = XRec p HsRecField p arg
- GHC.Hs.Pat: type LHsRecUpdField p = XRec p (HsRecUpdField p)
+ GHC.Hs.Pat: type LHsRecUpdField p q = XRec p HsRecUpdField p q
- GHC.Hs.Pat: type LPat p = XRec p (Pat p)
+ GHC.Hs.Pat: type LPat p = XRec p Pat p
- GHC.Hs.Syn.Type: hsLitType :: HsLit (GhcPass p) -> Type
+ GHC.Hs.Syn.Type: hsLitType :: forall (p :: Pass). HsLit (GhcPass p) -> Type
- GHC.Hs.Type: HsAppKindTy :: XAppKindTy pass -> LHsType pass -> LHsKind pass -> HsType pass
+ GHC.Hs.Type: HsAppKindTy :: XAppKindTy pass -> LHsType pass -> !LHsToken "@" pass -> LHsKind pass -> HsType pass
- GHC.Hs.Type: HsArgPar :: SrcSpan -> HsArg tm ty
+ GHC.Hs.Type: HsArgPar :: SrcSpan -> HsArg p tm ty
- GHC.Hs.Type: HsExplicitMult :: !LHsToken "%" pass -> !LHsType pass -> !LHsUniToken "->" "→" pass -> HsArrow pass
+ GHC.Hs.Type: HsExplicitMult :: !LHsToken "%" pass -> !LHsType pass -> !LHsUniToken "->" "\8594" pass -> HsArrow pass
- GHC.Hs.Type: HsLolly :: !LHsToken "⊸" pass -> HsLinearArrowTokens pass
+ GHC.Hs.Type: HsLolly :: !LHsToken "\8888" pass -> HsLinearArrowTokens pass
- GHC.Hs.Type: HsPct1 :: !LHsToken "%1" pass -> !LHsUniToken "->" "→" pass -> HsLinearArrowTokens pass
+ GHC.Hs.Type: HsPct1 :: !LHsToken "%1" pass -> !LHsUniToken "->" "\8594" pass -> HsLinearArrowTokens pass
- GHC.Hs.Type: HsQTvs :: XHsQTvs pass -> [LHsTyVarBndr () pass] -> LHsQTyVars pass
+ GHC.Hs.Type: HsQTvs :: XHsQTvs pass -> [LHsTyVarBndr (HsBndrVis pass) pass] -> LHsQTyVars pass
- GHC.Hs.Type: HsTypeArg :: SrcSpan -> ty -> HsArg tm ty
+ GHC.Hs.Type: HsTypeArg :: !LHsToken "@" p -> ty -> HsArg p tm ty
- GHC.Hs.Type: HsUnrestrictedArrow :: !LHsUniToken "->" "→" pass -> HsArrow pass
+ GHC.Hs.Type: HsUnrestrictedArrow :: !LHsUniToken "->" "\8594" pass -> HsArrow pass
- GHC.Hs.Type: HsValArg :: tm -> HsArg tm ty
+ GHC.Hs.Type: HsValArg :: tm -> HsArg p tm ty
- GHC.Hs.Type: [hsq_explicit] :: LHsQTyVars pass -> [LHsTyVarBndr () pass]
+ GHC.Hs.Type: [hsq_explicit] :: LHsQTyVars pass -> [LHsTyVarBndr (HsBndrVis pass) pass]
- GHC.Hs.Type: class OutputableBndrFlag flag p
+ GHC.Hs.Type: class OutputableBndrFlag flag (p :: Pass)
- GHC.Hs.Type: data HsArg tm ty
+ GHC.Hs.Type: data HsArg p tm ty
- GHC.Hs.Type: fromMaybeContext :: Maybe (LHsContext (GhcPass p)) -> HsContext (GhcPass p)
+ GHC.Hs.Type: fromMaybeContext :: forall (p :: Pass). Maybe (LHsContext (GhcPass p)) -> HsContext (GhcPass p)
- GHC.Hs.Type: getBangStrictness :: LHsType (GhcPass p) -> HsSrcBang
+ GHC.Hs.Type: getBangStrictness :: forall (p :: Pass). LHsType (GhcPass p) -> HsSrcBang
- GHC.Hs.Type: getBangType :: LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Type: getBangType :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p)
- GHC.Hs.Type: getLHsInstDeclClass_maybe :: Anno (IdGhcP p) ~ SrcSpanAnnN => LHsSigType (GhcPass p) -> Maybe (LocatedN (IdP (GhcPass p)))
+ GHC.Hs.Type: getLHsInstDeclClass_maybe :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => LHsSigType (GhcPass p) -> Maybe (LocatedN (IdP (GhcPass p)))
- GHC.Hs.Type: getLHsInstDeclHead :: LHsSigType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Type: getLHsInstDeclHead :: forall (p :: Pass). LHsSigType (GhcPass p) -> LHsType (GhcPass p)
- GHC.Hs.Type: hsExplicitLTyVarNames :: LHsQTyVars (GhcPass p) -> [IdP (GhcPass p)]
+ GHC.Hs.Type: hsExplicitLTyVarNames :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> [IdP (GhcPass p)]
- GHC.Hs.Type: hsLTyVarLocName :: LHsTyVarBndr flag (GhcPass p) -> LocatedN (IdP (GhcPass p))
+ GHC.Hs.Type: hsLTyVarLocName :: forall (p :: Pass) flag. Anno (IdGhcP p) ~ SrcSpanAnnN => LHsTyVarBndr flag (GhcPass p) -> LocatedN (IdP (GhcPass p))
- GHC.Hs.Type: hsLTyVarLocNames :: LHsQTyVars (GhcPass p) -> [LocatedN (IdP (GhcPass p))]
+ GHC.Hs.Type: hsLTyVarLocNames :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => LHsQTyVars (GhcPass p) -> [LocatedN (IdP (GhcPass p))]
- GHC.Hs.Type: hsLTyVarName :: LHsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.Type: hsLTyVarName :: forall flag (p :: Pass). LHsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p)
- GHC.Hs.Type: hsLTyVarNames :: [LHsTyVarBndr flag (GhcPass p)] -> [IdP (GhcPass p)]
+ GHC.Hs.Type: hsLTyVarNames :: forall flag (p :: Pass). [LHsTyVarBndr flag (GhcPass p)] -> [IdP (GhcPass p)]
- GHC.Hs.Type: hsLinear :: a -> HsScaled (GhcPass p) a
+ GHC.Hs.Type: hsLinear :: forall a (p :: Pass). a -> HsScaled (GhcPass p) a
- GHC.Hs.Type: hsOuterExplicitBndrs :: HsOuterTyVarBndrs flag (GhcPass p) -> [LHsTyVarBndr flag (NoGhcTc (GhcPass p))]
+ GHC.Hs.Type: hsOuterExplicitBndrs :: forall flag (p :: Pass). HsOuterTyVarBndrs flag (GhcPass p) -> [LHsTyVarBndr flag (NoGhcTc (GhcPass p))]
- GHC.Hs.Type: hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr () pass]
+ GHC.Hs.Type: hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr (HsBndrVis pass) pass]
- GHC.Hs.Type: hsSigWcType :: forall p. UnXRec p => LHsSigWcType p -> LHsType p
+ GHC.Hs.Type: hsSigWcType :: UnXRec p => LHsSigWcType p -> LHsType p
- GHC.Hs.Type: hsTvbAllKinded :: LHsQTyVars (GhcPass p) -> Bool
+ GHC.Hs.Type: hsTvbAllKinded :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> Bool
- GHC.Hs.Type: hsTyGetAppHead_maybe :: Anno (IdGhcP p) ~ SrcSpanAnnN => LHsType (GhcPass p) -> Maybe (LocatedN (IdP (GhcPass p)))
+ GHC.Hs.Type: hsTyGetAppHead_maybe :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => LHsType (GhcPass p) -> Maybe (LocatedN (IdP (GhcPass p)))
- GHC.Hs.Type: hsTyKindSig :: LHsType (GhcPass p) -> Maybe (LHsKind (GhcPass p))
+ GHC.Hs.Type: hsTyKindSig :: forall (p :: Pass). LHsType (GhcPass p) -> Maybe (LHsKind (GhcPass p))
- GHC.Hs.Type: hsTyVarBndrFlag :: HsTyVarBndr flag (GhcPass pass) -> flag
+ GHC.Hs.Type: hsTyVarBndrFlag :: forall flag (pass :: Pass). HsTyVarBndr flag (GhcPass pass) -> flag
- GHC.Hs.Type: hsTyVarName :: HsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.Type: hsTyVarName :: forall flag (p :: Pass). HsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p)
- GHC.Hs.Type: hsTypeNeedsParens :: PprPrec -> HsType (GhcPass p) -> Bool
+ GHC.Hs.Type: hsTypeNeedsParens :: forall (p :: Pass). PprPrec -> HsType (GhcPass p) -> Bool
- GHC.Hs.Type: hsUnrestricted :: a -> HsScaled (GhcPass p) a
+ GHC.Hs.Type: hsUnrestricted :: forall a (p :: Pass). a -> HsScaled (GhcPass p) a
- GHC.Hs.Type: ignoreParens :: LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Type: ignoreParens :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p)
- GHC.Hs.Type: lhsTypeArgSrcSpan :: LHsTypeArg (GhcPass pass) -> SrcSpan
+ GHC.Hs.Type: lhsTypeArgSrcSpan :: forall (pass :: Pass). LHsTypeArg (GhcPass pass) -> SrcSpan
- GHC.Hs.Type: mkHsAppKindTy :: XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Type: mkHsAppKindTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsToken "@" (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- GHC.Hs.Type: mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Type: mkHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- GHC.Hs.Type: mkHsAppTys :: LHsType (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
+ GHC.Hs.Type: mkHsAppTys :: forall (p :: Pass). LHsType (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
- GHC.Hs.Type: mkHsForAllInvisTele :: EpAnnForallTy -> [LHsTyVarBndr Specificity (GhcPass p)] -> HsForAllTelescope (GhcPass p)
+ GHC.Hs.Type: mkHsForAllInvisTele :: forall (p :: Pass). EpAnnForallTy -> [LHsTyVarBndr Specificity (GhcPass p)] -> HsForAllTelescope (GhcPass p)
- GHC.Hs.Type: mkHsForAllVisTele :: EpAnnForallTy -> [LHsTyVarBndr () (GhcPass p)] -> HsForAllTelescope (GhcPass p)
+ GHC.Hs.Type: mkHsForAllVisTele :: forall (p :: Pass). EpAnnForallTy -> [LHsTyVarBndr () (GhcPass p)] -> HsForAllTelescope (GhcPass p)
- GHC.Hs.Type: mkHsOpTy :: Anno (IdGhcP p) ~ SrcSpanAnnN => PromotionFlag -> LHsType (GhcPass p) -> LocatedN (IdP (GhcPass p)) -> LHsType (GhcPass p) -> HsType (GhcPass p)
+ GHC.Hs.Type: mkHsOpTy :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => PromotionFlag -> LHsType (GhcPass p) -> LocatedN (IdP (GhcPass p)) -> LHsType (GhcPass p) -> HsType (GhcPass p)
- GHC.Hs.Type: mkHsQTvs :: [LHsTyVarBndr () GhcPs] -> LHsQTyVars GhcPs
+ GHC.Hs.Type: mkHsQTvs :: [LHsTyVarBndr (HsBndrVis GhcPs) GhcPs] -> LHsQTyVars GhcPs
- GHC.Hs.Type: numVisibleArgs :: [HsArg tm ty] -> Arity
+ GHC.Hs.Type: numVisibleArgs :: [HsArg p tm ty] -> Arity
- GHC.Hs.Type: parenthesizeHsContext :: PprPrec -> LHsContext (GhcPass p) -> LHsContext (GhcPass p)
+ GHC.Hs.Type: parenthesizeHsContext :: forall (p :: Pass). PprPrec -> LHsContext (GhcPass p) -> LHsContext (GhcPass p)
- GHC.Hs.Type: parenthesizeHsType :: PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Type: parenthesizeHsType :: forall (p :: Pass). PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- GHC.Hs.Type: pprConDeclFields :: OutputableBndrId p => [LConDeclField (GhcPass p)] -> SDoc
+ GHC.Hs.Type: pprConDeclFields :: forall (p :: Pass). OutputableBndrId p => [LConDeclField (GhcPass p)] -> SDoc
- GHC.Hs.Type: pprHsArgsApp :: (OutputableBndr id, Outputable tm, Outputable ty) => id -> LexicalFixity -> [HsArg tm ty] -> SDoc
+ GHC.Hs.Type: pprHsArgsApp :: (OutputableBndr id, Outputable tm, Outputable ty) => id -> LexicalFixity -> [HsArg p tm ty] -> SDoc
- GHC.Hs.Type: pprHsArrow :: OutputableBndrId pass => HsArrow (GhcPass pass) -> SDoc
+ GHC.Hs.Type: pprHsArrow :: forall (pass :: Pass). OutputableBndrId pass => HsArrow (GhcPass pass) -> SDoc
- GHC.Hs.Type: pprHsForAll :: forall p. OutputableBndrId p => HsForAllTelescope (GhcPass p) -> Maybe (LHsContext (GhcPass p)) -> SDoc
+ GHC.Hs.Type: pprHsForAll :: forall (p :: Pass). OutputableBndrId p => HsForAllTelescope (GhcPass p) -> Maybe (LHsContext (GhcPass p)) -> SDoc
- GHC.Hs.Type: pprHsOuterFamEqnTyVarBndrs :: OutputableBndrId p => HsOuterFamEqnTyVarBndrs (GhcPass p) -> SDoc
+ GHC.Hs.Type: pprHsOuterFamEqnTyVarBndrs :: forall (p :: Pass). OutputableBndrId p => HsOuterFamEqnTyVarBndrs (GhcPass p) -> SDoc
- GHC.Hs.Type: pprHsOuterSigTyVarBndrs :: OutputableBndrId p => HsOuterSigTyVarBndrs (GhcPass p) -> SDoc
+ GHC.Hs.Type: pprHsOuterSigTyVarBndrs :: forall (p :: Pass). OutputableBndrId p => HsOuterSigTyVarBndrs (GhcPass p) -> SDoc
- GHC.Hs.Type: pprHsType :: OutputableBndrId p => HsType (GhcPass p) -> SDoc
+ GHC.Hs.Type: pprHsType :: forall (p :: Pass). OutputableBndrId p => HsType (GhcPass p) -> SDoc
- GHC.Hs.Type: pprLHsContext :: OutputableBndrId p => Maybe (LHsContext (GhcPass p)) -> SDoc
+ GHC.Hs.Type: pprLHsContext :: forall (p :: Pass). OutputableBndrId p => Maybe (LHsContext (GhcPass p)) -> SDoc
- GHC.Hs.Type: setHsTyVarBndrFlag :: flag -> HsTyVarBndr flag' (GhcPass pass) -> HsTyVarBndr flag (GhcPass pass)
+ GHC.Hs.Type: setHsTyVarBndrFlag :: forall flag flag' (pass :: Pass). flag -> HsTyVarBndr flag' (GhcPass pass) -> HsTyVarBndr flag (GhcPass pass)
- GHC.Hs.Type: splitHsFunType :: LHsType (GhcPass p) -> ([AddEpAnn], EpAnnComments, [HsScaled (GhcPass p) (LHsType (GhcPass p))], LHsType (GhcPass p))
+ GHC.Hs.Type: splitHsFunType :: forall (p :: Pass). LHsType (GhcPass p) -> ([AddEpAnn], EpAnnComments, [HsScaled (GhcPass p) (LHsType (GhcPass p))], LHsType (GhcPass p))
- GHC.Hs.Type: splitLHsForAllTyInvis :: LHsType (GhcPass pass) -> ((EpAnnForallTy, [LHsTyVarBndr Specificity (GhcPass pass)]), LHsType (GhcPass pass))
+ GHC.Hs.Type: splitLHsForAllTyInvis :: forall (pass :: Pass). LHsType (GhcPass pass) -> ((EpAnnForallTy, [LHsTyVarBndr Specificity (GhcPass pass)]), LHsType (GhcPass pass))
- GHC.Hs.Type: splitLHsForAllTyInvis_KP :: LHsType (GhcPass pass) -> (Maybe (EpAnnForallTy, [LHsTyVarBndr Specificity (GhcPass pass)]), LHsType (GhcPass pass))
+ GHC.Hs.Type: splitLHsForAllTyInvis_KP :: forall (pass :: Pass). LHsType (GhcPass pass) -> (Maybe (EpAnnForallTy, [LHsTyVarBndr Specificity (GhcPass pass)]), LHsType (GhcPass pass))
- GHC.Hs.Type: splitLHsPatSynTy :: LHsSigType (GhcPass p) -> ([LHsTyVarBndr Specificity (GhcPass (NoGhcTcPass p))], Maybe (LHsContext (GhcPass p)), [LHsTyVarBndr Specificity (GhcPass p)], Maybe (LHsContext (GhcPass p)), LHsType (GhcPass p))
+ GHC.Hs.Type: splitLHsPatSynTy :: forall (p :: Pass). LHsSigType (GhcPass p) -> ([LHsTyVarBndr Specificity (GhcPass (NoGhcTcPass p))], Maybe (LHsContext (GhcPass p)), [LHsTyVarBndr Specificity (GhcPass p)], Maybe (LHsContext (GhcPass p)), LHsType (GhcPass p))
- GHC.Hs.Type: splitLHsQualTy :: LHsType (GhcPass pass) -> (Maybe (LHsContext (GhcPass pass)), LHsType (GhcPass pass))
+ GHC.Hs.Type: splitLHsQualTy :: forall (pass :: Pass). LHsType (GhcPass pass) -> (Maybe (LHsContext (GhcPass pass)), LHsType (GhcPass pass))
- GHC.Hs.Type: splitLHsSigmaTyInvis :: LHsType (GhcPass p) -> ([LHsTyVarBndr Specificity (GhcPass p)], Maybe (LHsContext (GhcPass p)), LHsType (GhcPass p))
+ GHC.Hs.Type: splitLHsSigmaTyInvis :: forall (p :: Pass). LHsType (GhcPass p) -> ([LHsTyVarBndr Specificity (GhcPass p)], Maybe (LHsContext (GhcPass p)), LHsType (GhcPass p))
- GHC.Hs.Type: type EpAnnForallTy = -- | Location of 'forall' and '->' for HsForAllVis -- Location of 'forall' and '.' for HsForAllInvis EpAnn (AddEpAnn, AddEpAnn)
+ GHC.Hs.Type: type EpAnnForallTy = EpAnn (AddEpAnn, AddEpAnn)
- GHC.Hs.Type: type LAmbiguousFieldOcc pass = XRec pass (AmbiguousFieldOcc pass)
+ GHC.Hs.Type: type LAmbiguousFieldOcc pass = XRec pass AmbiguousFieldOcc pass
- GHC.Hs.Type: type LBangType pass = XRec pass (BangType pass)
+ GHC.Hs.Type: type LBangType pass = XRec pass BangType pass
- GHC.Hs.Type: type LConDeclField pass = -- | May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnComma' when -- in a list XRec pass (ConDeclField pass)
+ GHC.Hs.Type: type LConDeclField pass = XRec pass ConDeclField pass
- GHC.Hs.Type: type LFieldOcc pass = XRec pass (FieldOcc pass)
+ GHC.Hs.Type: type LFieldOcc pass = XRec pass FieldOcc pass
- GHC.Hs.Type: type LHsContext pass = -- | 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnUnit' -- For details on above see Note [exact print annotations] in GHC.Parser.Annotation XRec pass (HsContext pass)
+ GHC.Hs.Type: type LHsContext pass = XRec pass HsContext pass
- GHC.Hs.Type: type LHsKind pass = -- | 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnDcolon' XRec pass (HsKind pass)
+ GHC.Hs.Type: type LHsKind pass = XRec pass HsKind pass
- GHC.Hs.Type: type LHsSigType pass = XRec pass (HsSigType pass)
+ GHC.Hs.Type: type LHsSigType pass = XRec pass HsSigType pass
- GHC.Hs.Type: type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass)
+ GHC.Hs.Type: type LHsSigWcType pass = HsWildCardBndrs pass LHsSigType pass
- GHC.Hs.Type: type LHsTyVarBndr flag pass = XRec pass (HsTyVarBndr flag pass)
+ GHC.Hs.Type: type LHsTyVarBndr flag pass = XRec pass HsTyVarBndr flag pass
- GHC.Hs.Type: type LHsType pass = -- | May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnComma' when -- in a list XRec pass (HsType pass)
+ GHC.Hs.Type: type LHsType pass = XRec pass HsType pass
- GHC.Hs.Type: type LHsTypeArg p = HsArg (LHsType p) (LHsKind p)
+ GHC.Hs.Type: type LHsTypeArg p = HsArg p LHsType p LHsKind p
- GHC.Hs.Type: type LHsWcType pass = HsWildCardBndrs pass (LHsType pass)
+ GHC.Hs.Type: type LHsWcType pass = HsWildCardBndrs pass LHsType pass
- GHC.Hs.Utils: [CollNoDictBinders] :: CollectFlag p
+ GHC.Hs.Utils: [CollNoDictBinders] :: forall p. CollectFlag p
- GHC.Hs.Utils: [CollWithDictBinders] :: CollectFlag GhcTc
+ GHC.Hs.Utils: [CollWithDictBinders] :: CollectFlag (GhcPass 'Typechecked)
- GHC.Hs.Utils: collectHsBindListBinders :: forall p idR. CollectPass p => CollectFlag p -> [LHsBindLR p idR] -> [IdP p]
+ GHC.Hs.Utils: collectHsBindListBinders :: CollectPass p => CollectFlag p -> [LHsBindLR p idR] -> [IdP p]
- GHC.Hs.Utils: collectHsIdBinders :: CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: collectHsIdBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- GHC.Hs.Utils: collectHsValBinders :: CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) idR -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: collectHsValBinders :: forall (idL :: Pass) idR. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) idR -> [IdP (GhcPass idL)]
- GHC.Hs.Utils: collectLStmtBinders :: CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> LStmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: collectLStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> LStmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
- GHC.Hs.Utils: collectLStmtsBinders :: CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [LStmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: collectLStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [LStmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
- GHC.Hs.Utils: collectLocalBinders :: CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: collectLocalBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- GHC.Hs.Utils: collectMethodBinders :: forall idL idR. UnXRec idL => LHsBindsLR idL idR -> [LIdP idL]
+ GHC.Hs.Utils: collectMethodBinders :: UnXRec idL => LHsBindsLR idL idR -> [LIdP idL]
- GHC.Hs.Utils: collectStmtBinders :: CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> StmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: collectStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> StmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
- GHC.Hs.Utils: collectStmtsBinders :: CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [StmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: collectStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [StmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
- GHC.Hs.Utils: collectXXHsBindsLR :: forall pR. CollectPass p => XXHsBindsLR p pR -> [IdP p] -> [IdP p]
+ GHC.Hs.Utils: collectXXHsBindsLR :: CollectPass p => XXHsBindsLR p pR -> [IdP p] -> [IdP p]
- GHC.Hs.Utils: emptyRecStmt :: Anno [GenLocated (Anno (StmtLR (GhcPass idL) GhcPs bodyR)) (StmtLR (GhcPass idL) GhcPs bodyR)] ~ SrcSpanAnnL => StmtLR (GhcPass idL) GhcPs bodyR
+ GHC.Hs.Utils: emptyRecStmt :: forall (idL :: Pass) bodyR. Anno [GenLocated (Anno (StmtLR (GhcPass idL) GhcPs bodyR)) (StmtLR (GhcPass idL) GhcPs bodyR)] ~ SrcSpanAnnL => StmtLR (GhcPass idL) GhcPs bodyR
- GHC.Hs.Utils: getPatSynBinds :: forall id. UnXRec id => [(RecFlag, LHsBinds id)] -> [PatSynBind id id]
+ GHC.Hs.Utils: getPatSynBinds :: UnXRec id => [(RecFlag, LHsBinds id)] -> [PatSynBind id id]
- GHC.Hs.Utils: hsDataFamInstBinders :: IsPass p => DataFamInstDecl (GhcPass p) -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])
+ GHC.Hs.Utils: hsDataFamInstBinders :: forall (p :: Pass). (IsPass p, OutputableBndrId p) => DataFamInstDecl (GhcPass p) -> LConsWithFields p
- GHC.Hs.Utils: hsForeignDeclsBinders :: forall p a. (UnXRec (GhcPass p), IsSrcSpanAnn p a) => [LForeignDecl (GhcPass p)] -> [LIdP (GhcPass p)]
+ GHC.Hs.Utils: hsForeignDeclsBinders :: forall (p :: Pass) a. (UnXRec (GhcPass p), IsSrcSpanAnn p a) => [LForeignDecl (GhcPass p)] -> [LIdP (GhcPass p)]
- GHC.Hs.Utils: hsLTyClDeclBinders :: IsPass p => LocatedA (TyClDecl (GhcPass p)) -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])
+ GHC.Hs.Utils: hsLTyClDeclBinders :: forall (p :: Pass). (IsPass p, OutputableBndrId p) => LocatedA (TyClDecl (GhcPass p)) -> TyDeclBinders p
- GHC.Hs.Utils: hsPatSynSelectors :: IsPass p => HsValBinds (GhcPass p) -> [FieldOcc (GhcPass p)]
+ GHC.Hs.Utils: hsPatSynSelectors :: forall (p :: Pass). IsPass p => HsValBinds (GhcPass p) -> [FieldOcc (GhcPass p)]
- GHC.Hs.Utils: hsValBindsImplicits :: HsValBindsLR GhcRn (GhcPass idR) -> [(SrcSpan, [Name])]
+ GHC.Hs.Utils: hsValBindsImplicits :: forall (idR :: Pass). HsValBindsLR GhcRn (GhcPass idR) -> [(SrcSpan, [Name])]
- GHC.Hs.Utils: lStmtsImplicits :: [LStmtLR GhcRn (GhcPass idR) (LocatedA (body (GhcPass idR)))] -> [(SrcSpan, [Name])]
+ GHC.Hs.Utils: lStmtsImplicits :: forall (idR :: Pass) (body :: Type -> Type). [LStmtLR GhcRn (GhcPass idR) (LocatedA (body (GhcPass idR)))] -> [(SrcSpan, [Name])]
- GHC.Hs.Utils: mkBigLHsTup :: [LHsExpr (GhcPass id)] -> XExplicitTuple (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkBigLHsTup :: forall (id :: Pass). [LHsExpr (GhcPass id)] -> XExplicitTuple (GhcPass id) -> LHsExpr (GhcPass id)
- GHC.Hs.Utils: mkBigLHsVarTup :: IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
+ GHC.Hs.Utils: mkBigLHsVarTup :: forall (p :: Pass) a. IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
- GHC.Hs.Utils: mkBodyStmt :: LocatedA (bodyR GhcPs) -> StmtLR (GhcPass idL) GhcPs (LocatedA (bodyR GhcPs))
+ GHC.Hs.Utils: mkBodyStmt :: forall bodyR (idL :: Pass). LocatedA (bodyR GhcPs) -> StmtLR (GhcPass idL) GhcPs (LocatedA (bodyR GhcPs))
- GHC.Hs.Utils: mkHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- GHC.Hs.Utils: mkHsAppKindTy :: XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: mkHsAppKindTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsToken "@" (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- GHC.Hs.Utils: mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: mkHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- GHC.Hs.Utils: mkHsAppWith :: (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkHsAppWith :: forall (id :: Pass). (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- GHC.Hs.Utils: mkHsApps :: LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkHsApps :: forall (id :: Pass). LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- GHC.Hs.Utils: mkHsAppsWith :: (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkHsAppsWith :: forall (id :: Pass). (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- GHC.Hs.Utils: mkHsCaseAlt :: (Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns, Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA) => LPat (GhcPass p) -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p)))
+ GHC.Hs.Utils: mkHsCaseAlt :: forall (p :: Pass) body. (Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns, Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA) => LPat (GhcPass p) -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p)))
- GHC.Hs.Utils: mkHsCharPrimLit :: Char -> HsLit (GhcPass p)
+ GHC.Hs.Utils: mkHsCharPrimLit :: forall (p :: Pass). Char -> HsLit (GhcPass p)
- GHC.Hs.Utils: mkHsLam :: (IsPass p, XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ Origin) => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
+ GHC.Hs.Utils: mkHsLam :: forall (p :: Pass). (IsPass p, XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ Origin) => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- GHC.Hs.Utils: mkHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkHsPar :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- GHC.Hs.Utils: mkHsSigEnv :: forall a. (LSig GhcRn -> Maybe ([LocatedN Name], a)) -> [LSig GhcRn] -> NameEnv a
+ GHC.Hs.Utils: mkHsSigEnv :: (LSig GhcRn -> Maybe ([LocatedN Name], a)) -> [LSig GhcRn] -> NameEnv a
- GHC.Hs.Utils: mkHsString :: String -> HsLit (GhcPass p)
+ GHC.Hs.Utils: mkHsString :: forall (p :: Pass). String -> HsLit (GhcPass p)
- GHC.Hs.Utils: mkHsStringFS :: FastString -> HsLit (GhcPass p)
+ GHC.Hs.Utils: mkHsStringFS :: forall (p :: Pass). FastString -> HsLit (GhcPass p)
- GHC.Hs.Utils: mkHsStringPrimLit :: FastString -> HsLit (GhcPass p)
+ GHC.Hs.Utils: mkHsStringPrimLit :: forall (p :: Pass). FastString -> HsLit (GhcPass p)
- GHC.Hs.Utils: mkLHsPar :: IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkLHsPar :: forall (id :: Pass). IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- GHC.Hs.Utils: mkLHsTupleExpr :: [LHsExpr (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
+ GHC.Hs.Utils: mkLHsTupleExpr :: forall (p :: Pass). [LHsExpr (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
- GHC.Hs.Utils: mkLHsVarTuple :: IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
+ GHC.Hs.Utils: mkLHsVarTuple :: forall (p :: Pass) a. IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
- GHC.Hs.Utils: mkLamCaseMatchGroup :: AnnoBody p body => Origin -> LamCaseVariant -> LocatedL [LocatedA (Match (GhcPass p) (LocatedA (body (GhcPass p))))] -> MatchGroup (GhcPass p) (LocatedA (body (GhcPass p)))
+ GHC.Hs.Utils: mkLamCaseMatchGroup :: forall (p :: Pass) body. AnnoBody p body => Origin -> LamCaseVariant -> LocatedL [LocatedA (Match (GhcPass p) (LocatedA (body (GhcPass p))))] -> MatchGroup (GhcPass p) (LocatedA (body (GhcPass p)))
- GHC.Hs.Utils: mkLastStmt :: IsPass idR => LocatedA (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (LocatedA (bodyR (GhcPass idR)))
+ GHC.Hs.Utils: mkLastStmt :: forall (idR :: Pass) bodyR (idL :: Pass). IsPass idR => LocatedA (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (LocatedA (bodyR (GhcPass idR)))
- GHC.Hs.Utils: mkMatch :: forall p. IsPass p => HsMatchContext (GhcPass p) -> [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> HsLocalBinds (GhcPass p) -> LMatch (GhcPass p) (LHsExpr (GhcPass p))
+ GHC.Hs.Utils: mkMatch :: forall (p :: Pass). IsPass p => HsMatchContext (GhcPass p) -> [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> HsLocalBinds (GhcPass p) -> LMatch (GhcPass p) (LHsExpr (GhcPass p))
- GHC.Hs.Utils: mkMatchGroup :: AnnoBody p body => Origin -> LocatedL [LocatedA (Match (GhcPass p) (LocatedA (body (GhcPass p))))] -> MatchGroup (GhcPass p) (LocatedA (body (GhcPass p)))
+ GHC.Hs.Utils: mkMatchGroup :: forall (p :: Pass) body. AnnoBody p body => Origin -> LocatedL [LocatedA (Match (GhcPass p) (LocatedA (body (GhcPass p))))] -> MatchGroup (GhcPass p) (LocatedA (body (GhcPass p)))
- GHC.Hs.Utils: mkParPat :: IsPass p => LPat (GhcPass p) -> LPat (GhcPass p)
+ GHC.Hs.Utils: mkParPat :: forall (p :: Pass). IsPass p => LPat (GhcPass p) -> LPat (GhcPass p)
- GHC.Hs.Utils: mkSimpleMatch :: (Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA, Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns) => HsMatchContext (GhcPass p) -> [LPat (GhcPass p)] -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p)))
+ GHC.Hs.Utils: mkSimpleMatch :: forall (p :: Pass) body. (Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA, Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns) => HsMatchContext (GhcPass p) -> [LPat (GhcPass p)] -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p)))
- GHC.Hs.Utils: mkVarBind :: IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p)
+ GHC.Hs.Utils: mkVarBind :: IdP GhcTc -> LHsExpr GhcTc -> LHsBind GhcTc
- GHC.Hs.Utils: nlHsApp :: IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: nlHsApp :: forall (id :: Pass). IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- GHC.Hs.Utils: nlHsAppKindTy :: LHsType (GhcPass p) -> LHsKind (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: nlHsAppKindTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsKind (GhcPass p) -> LHsType (GhcPass p)
- GHC.Hs.Utils: nlHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: nlHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- GHC.Hs.Utils: nlHsApps :: IsSrcSpanAnn p a => IdP (GhcPass p) -> [LHsExpr (GhcPass p)] -> LHsExpr (GhcPass p)
+ GHC.Hs.Utils: nlHsApps :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> [LHsExpr (GhcPass p)] -> LHsExpr (GhcPass p)
- GHC.Hs.Utils: nlHsFunTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: nlHsFunTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- GHC.Hs.Utils: nlHsIntLit :: Integer -> LHsExpr (GhcPass p)
+ GHC.Hs.Utils: nlHsIntLit :: forall (p :: Pass). Integer -> LHsExpr (GhcPass p)
- GHC.Hs.Utils: nlHsLit :: HsLit (GhcPass p) -> LHsExpr (GhcPass p)
+ GHC.Hs.Utils: nlHsLit :: forall (p :: Pass). HsLit (GhcPass p) -> LHsExpr (GhcPass p)
- GHC.Hs.Utils: nlHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: nlHsPar :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- GHC.Hs.Utils: nlHsParTy :: LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: nlHsParTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p)
- GHC.Hs.Utils: nlHsTyConApp :: IsSrcSpanAnn p a => PromotionFlag -> LexicalFixity -> IdP (GhcPass p) -> [LHsTypeArg (GhcPass p)] -> LHsType (GhcPass p)
+ GHC.Hs.Utils: nlHsTyConApp :: forall (p :: Pass) a. IsSrcSpanAnn p a => PromotionFlag -> LexicalFixity -> IdP (GhcPass p) -> [LHsTypeArg (GhcPass p)] -> LHsType (GhcPass p)
- GHC.Hs.Utils: nlHsTyVar :: IsSrcSpanAnn p a => PromotionFlag -> IdP (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: nlHsTyVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => PromotionFlag -> IdP (GhcPass p) -> LHsType (GhcPass p)
- GHC.Hs.Utils: nlHsVar :: IsSrcSpanAnn p a => IdP (GhcPass p) -> LHsExpr (GhcPass p)
+ GHC.Hs.Utils: nlHsVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LHsExpr (GhcPass p)
- GHC.Hs.Utils: nlHsVarApps :: IsSrcSpanAnn p a => IdP (GhcPass p) -> [IdP (GhcPass p)] -> LHsExpr (GhcPass p)
+ GHC.Hs.Utils: nlHsVarApps :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> [IdP (GhcPass p)] -> LHsExpr (GhcPass p)
- GHC.Hs.Utils: nlParPat :: LPat (GhcPass name) -> LPat (GhcPass name)
+ GHC.Hs.Utils: nlParPat :: forall (name :: Pass). LPat (GhcPass name) -> LPat (GhcPass name)
- GHC.Hs.Utils: nlVarPat :: IsSrcSpanAnn p a => IdP (GhcPass p) -> LPat (GhcPass p)
+ GHC.Hs.Utils: nlVarPat :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LPat (GhcPass p)
- GHC.Hs.Utils: nl_HsVar :: IsSrcSpanAnn p a => IdP (GhcPass p) -> HsExpr (GhcPass p)
+ GHC.Hs.Utils: nl_HsVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> HsExpr (GhcPass p)
- GHC.Hs.Utils: spanHsLocaLBinds :: HsLocalBinds (GhcPass p) -> SrcSpan
+ GHC.Hs.Utils: spanHsLocaLBinds :: forall (p :: Pass). HsLocalBinds (GhcPass p) -> SrcSpan
- GHC.Hs.Utils: unguardedGRHSs :: Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns => SrcSpan -> LocatedA (body (GhcPass p)) -> EpAnn GrhsAnn -> GRHSs (GhcPass p) (LocatedA (body (GhcPass p)))
+ GHC.Hs.Utils: unguardedGRHSs :: forall (p :: Pass) body. Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns => SrcSpan -> LocatedA (body (GhcPass p)) -> EpAnn GrhsAnn -> GRHSs (GhcPass p) (LocatedA (body (GhcPass p)))
- GHC.Hs.Utils: unguardedRHS :: Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns => EpAnn GrhsAnn -> SrcSpan -> LocatedA (body (GhcPass p)) -> [LGRHS (GhcPass p) (LocatedA (body (GhcPass p)))]
+ GHC.Hs.Utils: unguardedRHS :: forall (p :: Pass) body. Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns => EpAnn GrhsAnn -> SrcSpan -> LocatedA (body (GhcPass p)) -> [LGRHS (GhcPass p) (LocatedA (body (GhcPass p)))]
- GHC.HsToCore.Binds: dsEvBinds :: Bag EvBind -> DsM [CoreBind]
+ GHC.HsToCore.Binds: dsEvBinds :: Bag EvBind -> ([CoreBind] -> DsM a) -> DsM a
- GHC.HsToCore.Binds: dsHsWrapper :: HsWrapper -> DsM (CoreExpr -> CoreExpr)
+ GHC.HsToCore.Binds: dsHsWrapper :: HsWrapper -> ((CoreExpr -> CoreExpr) -> DsM a) -> DsM a
- GHC.HsToCore.Binds: dsTcEvBinds :: TcEvBinds -> DsM [CoreBind]
+ GHC.HsToCore.Binds: dsTcEvBinds :: TcEvBinds -> ([CoreBind] -> DsM a) -> DsM a
- GHC.HsToCore.Binds: dsTcEvBinds_s :: [TcEvBinds] -> DsM [CoreBind]
+ GHC.HsToCore.Binds: dsTcEvBinds_s :: [TcEvBinds] -> ([CoreBind] -> DsM a) -> DsM a
- GHC.HsToCore.Docs: collectDocs :: forall p. UnXRec p => [LHsDecl p] -> [(LHsDecl p, [HsDoc p])]
+ GHC.HsToCore.Docs: collectDocs :: UnXRec p => [LHsDecl p] -> [(LHsDecl p, [HsDoc p])]
- GHC.HsToCore.Docs: filterClasses :: forall p doc. IsPass p => [(LHsDecl (GhcPass p), doc)] -> [(LHsDecl (GhcPass p), doc)]
+ GHC.HsToCore.Docs: filterClasses :: forall (p :: Pass) doc. IsPass p => [(LHsDecl (GhcPass p), doc)] -> [(LHsDecl (GhcPass p), doc)]
- GHC.HsToCore.Docs: filterDecls :: forall p doc. UnXRec p => [(LHsDecl p, doc)] -> [(LHsDecl p, doc)]
+ GHC.HsToCore.Docs: filterDecls :: UnXRec p => [(LHsDecl p, doc)] -> [(LHsDecl p, doc)]
- GHC.HsToCore.Docs: getInstLoc :: Anno (IdGhcP p) ~ SrcSpanAnnN => InstDecl (GhcPass p) -> SrcSpan
+ GHC.HsToCore.Docs: getInstLoc :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => InstDecl (GhcPass p) -> SrcSpan
- GHC.HsToCore.Docs: getNamedChunks :: Bool -> HsGroup (GhcPass pass) -> Map String (HsDoc (GhcPass pass))
+ GHC.HsToCore.Docs: getNamedChunks :: forall (pass :: Pass). Bool -> HsGroup (GhcPass pass) -> Map String (HsDoc (GhcPass pass))
- GHC.HsToCore.Docs: sigNameNoLoc :: forall a. (UnXRec a, HasOccName (IdP a)) => OccEnv (IdP a) -> Sig a -> [IdP a]
+ GHC.HsToCore.Docs: sigNameNoLoc :: (UnXRec a, HasOccName (IdP a)) => OccEnv (IdP a) -> Sig a -> [IdP a]
- GHC.HsToCore.Docs: unionArgMaps :: forall b. UniqMap Name (IntMap b) -> UniqMap Name (IntMap b) -> UniqMap Name (IntMap b)
+ GHC.HsToCore.Docs: unionArgMaps :: UniqMap Name (IntMap b) -> UniqMap Name (IntMap b) -> UniqMap Name (IntMap b)
- GHC.HsToCore.Errors.Ppr: pprContext :: Bool -> HsMatchContext GhcRn -> SDoc -> ((SDoc -> SDoc) -> SDoc) -> SDoc
+ GHC.HsToCore.Errors.Ppr: pprContext :: Bool -> HsMatchContext GhcTc -> SDoc -> ((SDoc -> SDoc) -> SDoc) -> SDoc
- GHC.HsToCore.Errors.Ppr: pprEqn :: HsMatchContext GhcRn -> SDoc -> String -> SDoc
+ GHC.HsToCore.Errors.Ppr: pprEqn :: HsMatchContext GhcTc -> SDoc -> String -> SDoc
- GHC.HsToCore.Errors.Types: DsInaccessibleRhs :: !HsMatchContext GhcRn -> !SDoc -> DsMessage
+ GHC.HsToCore.Errors.Types: DsInaccessibleRhs :: !HsMatchContext GhcTc -> !SDoc -> DsMessage
- GHC.HsToCore.Errors.Types: DsNonExhaustivePatterns :: !HsMatchContext GhcRn -> !ExhaustivityCheckType -> !MaxUncoveredPatterns -> [Id] -> [Nabla] -> DsMessage
+ GHC.HsToCore.Errors.Types: DsNonExhaustivePatterns :: !HsMatchContext GhcTc -> !ExhaustivityCheckType -> !MaxUncoveredPatterns -> [Id] -> [Nabla] -> DsMessage
- GHC.HsToCore.Errors.Types: DsOverlappingPatterns :: !HsMatchContext GhcRn -> !SDoc -> DsMessage
+ GHC.HsToCore.Errors.Types: DsOverlappingPatterns :: !HsMatchContext GhcTc -> !SDoc -> DsMessage
- GHC.HsToCore.Errors.Types: DsRedundantBangPatterns :: !HsMatchContext GhcRn -> !SDoc -> DsMessage
+ GHC.HsToCore.Errors.Types: DsRedundantBangPatterns :: !HsMatchContext GhcTc -> !SDoc -> DsMessage
- GHC.HsToCore.Errors.Types: DsUnknownMessage :: UnknownDiagnostic -> DsMessage
+ GHC.HsToCore.Errors.Types: DsUnknownMessage :: UnknownDiagnostic (DiagnosticOpts DsMessage) -> DsMessage
- GHC.HsToCore.Errors.Types: ThAmbiguousRecordUpdates :: !HsRecUpdField GhcRn -> ThRejectionReason
+ GHC.HsToCore.Errors.Types: ThAmbiguousRecordUpdates :: !HsRecUpdField GhcRn GhcRn -> ThRejectionReason
- GHC.HsToCore.GuardedRHSs: dsGRHSs :: HsMatchContext GhcRn -> GRHSs GhcTc (LHsExpr GhcTc) -> Type -> NonEmpty Nablas -> DsM (MatchResult CoreExpr)
+ GHC.HsToCore.GuardedRHSs: dsGRHSs :: HsMatchContext GhcTc -> GRHSs GhcTc (LHsExpr GhcTc) -> Type -> NonEmpty Nablas -> DsM (MatchResult CoreExpr)
- GHC.HsToCore.Match: matchEquations :: HsMatchContext GhcRn -> [MatchId] -> [EquationInfo] -> Type -> DsM CoreExpr
+ GHC.HsToCore.Match: matchEquations :: HsMatchContext GhcTc -> [MatchId] -> [EquationInfo] -> Type -> DsM CoreExpr
- GHC.HsToCore.Match: matchSimply :: CoreExpr -> HsMatchContext GhcRn -> LPat GhcTc -> CoreExpr -> CoreExpr -> DsM CoreExpr
+ GHC.HsToCore.Match: matchSimply :: CoreExpr -> HsMatchContext GhcTc -> LPat GhcTc -> CoreExpr -> CoreExpr -> DsM CoreExpr
- GHC.HsToCore.Match: matchSinglePat :: CoreExpr -> HsMatchContext GhcRn -> LPat GhcTc -> Type -> MatchResult CoreExpr -> DsM (MatchResult CoreExpr)
+ GHC.HsToCore.Match: matchSinglePat :: CoreExpr -> HsMatchContext GhcTc -> LPat GhcTc -> Type -> MatchResult CoreExpr -> DsM (MatchResult CoreExpr)
- GHC.HsToCore.Match: matchSinglePatVar :: Id -> Maybe CoreExpr -> HsMatchContext GhcRn -> LPat GhcTc -> Type -> MatchResult CoreExpr -> DsM (MatchResult CoreExpr)
+ GHC.HsToCore.Match: matchSinglePatVar :: Id -> Maybe CoreExpr -> HsMatchContext GhcTc -> LPat GhcTc -> Type -> MatchResult CoreExpr -> DsM (MatchResult CoreExpr)
- GHC.HsToCore.Match: matchWrapper :: HsMatchContext GhcRn -> Maybe [LHsExpr GhcTc] -> MatchGroup GhcTc (LHsExpr GhcTc) -> DsM ([Id], CoreExpr)
+ GHC.HsToCore.Match: matchWrapper :: HsMatchContext GhcTc -> Maybe [LHsExpr GhcTc] -> MatchGroup GhcTc (LHsExpr GhcTc) -> DsM ([Id], CoreExpr)
- GHC.HsToCore.Monad: DsMatchContext :: HsMatchContext GhcRn -> SrcSpan -> DsMatchContext
+ GHC.HsToCore.Monad: DsMatchContext :: HsMatchContext GhcTc -> SrcSpan -> DsMatchContext
- GHC.HsToCore.Pmc: pmcGRHSs :: HsMatchContext GhcRn -> GRHSs GhcTc (LHsExpr GhcTc) -> DsM (NonEmpty Nablas)
+ GHC.HsToCore.Pmc: pmcGRHSs :: HsMatchContext GhcTc -> GRHSs GhcTc (LHsExpr GhcTc) -> DsM (NonEmpty Nablas)
- GHC.HsToCore.Pmc: pmcPatBind :: DsMatchContext -> Id -> Pat GhcTc -> DsM ()
+ GHC.HsToCore.Pmc: pmcPatBind :: DsMatchContext -> Id -> Pat GhcTc -> DsM Nablas
- GHC.HsToCore.Types: DsLclEnv :: DsMetaEnv -> RealSrcSpan -> Nablas -> DsLclEnv
+ GHC.HsToCore.Types: DsLclEnv :: DsMetaEnv -> RealSrcSpan -> Nablas -> Set EvVar -> DsLclEnv
- GHC.HsToCore.Utils: mkFailExpr :: HsMatchContext GhcRn -> Type -> DsM CoreExpr
+ GHC.HsToCore.Utils: mkFailExpr :: HsMatchContext GhcTc -> Type -> DsM CoreExpr
- GHC.Iface.Errors: cannotFindInterface :: UnitState -> Maybe HomeUnit -> Profile -> ([FilePath] -> SDoc) -> ModuleName -> InstalledFindResult -> SDoc
+ GHC.Iface.Errors: cannotFindInterface :: UnitState -> Maybe HomeUnit -> Profile -> ModuleName -> InstalledFindResult -> MissingInterfaceError
- GHC.Iface.Errors: cannotFindModule :: HscEnv -> ModuleName -> FindResult -> SDoc
+ GHC.Iface.Errors: cannotFindModule :: HscEnv -> ModuleName -> FindResult -> MissingInterfaceError
- GHC.Iface.Errors: cantFindInstalledErr :: SDoc -> SDoc -> UnitState -> Maybe HomeUnit -> Profile -> ([FilePath] -> SDoc) -> ModuleName -> InstalledFindResult -> SDoc
+ GHC.Iface.Errors: cantFindInstalledErr :: UnitState -> Maybe HomeUnit -> Profile -> ModuleName -> InstalledFindResult -> CantFindInstalled
- GHC.Iface.Ext.Types: type NodeIdentifiers a = Map Identifier (IdentifierDetails a)
+ GHC.Iface.Ext.Types: type NodeIdentifiers a = Map Identifier IdentifierDetails a
- GHC.Iface.Ext.Utils: locOnly :: Monad m => SrcSpan -> ReaderT NodeOrigin m [HieAST a]
+ GHC.Iface.Ext.Utils: locOnly :: forall (m :: Type -> Type) a. Monad m => SrcSpan -> ReaderT NodeOrigin m [HieAST a]
- GHC.Iface.Ext.Utils: makeNode :: (Monad m, Data a) => a -> SrcSpan -> ReaderT NodeOrigin m [HieAST b]
+ GHC.Iface.Ext.Utils: makeNode :: forall (m :: Type -> Type) a b. (Monad m, Data a) => a -> SrcSpan -> ReaderT NodeOrigin m [HieAST b]
- GHC.Iface.Ext.Utils: makeNodeA :: (Monad m, Data a) => a -> SrcSpanAnn' ann -> ReaderT NodeOrigin m [HieAST b]
+ GHC.Iface.Ext.Utils: makeNodeA :: forall (m :: Type -> Type) a ann b. (Monad m, Data a) => a -> SrcSpanAnn' ann -> ReaderT NodeOrigin m [HieAST b]
- GHC.Iface.Ext.Utils: makeTypeNode :: (Monad m, Data a) => a -> SrcSpan -> Type -> ReaderT NodeOrigin m [HieAST Type]
+ GHC.Iface.Ext.Utils: makeTypeNode :: forall (m :: Type -> Type) a. (Monad m, Data a) => a -> SrcSpan -> Type -> ReaderT NodeOrigin m [HieAST Type]
- GHC.Iface.Ext.Utils: makeTypeNodeA :: (Monad m, Data a) => a -> SrcSpanAnnA -> Type -> ReaderT NodeOrigin m [HieAST Type]
+ GHC.Iface.Ext.Utils: makeTypeNodeA :: forall (m :: Type -> Type) a. (Monad m, Data a) => a -> SrcSpanAnnA -> Type -> ReaderT NodeOrigin m [HieAST Type]
- GHC.Iface.Load: findAndReadIface :: HscEnv -> SDoc -> InstalledModule -> Module -> IsBootInterface -> IO (MaybeErr SDoc (ModIface, FilePath))
+ GHC.Iface.Load: findAndReadIface :: HscEnv -> SDoc -> InstalledModule -> Module -> IsBootInterface -> IO (MaybeErr MissingInterfaceError (ModIface, FilePath))
- GHC.Iface.Load: importDecl :: Name -> IfM lcl (MaybeErr SDoc TyThing)
+ GHC.Iface.Load: importDecl :: Name -> IfM lcl (MaybeErr IfaceMessage TyThing)
- GHC.Iface.Load: loadInterface :: SDoc -> Module -> WhereFrom -> IfM lcl (MaybeErr SDoc ModIface)
+ GHC.Iface.Load: loadInterface :: SDoc -> Module -> WhereFrom -> IfM lcl (MaybeErr MissingInterfaceError ModIface)
- GHC.Iface.Load: loadSrcInterface_maybe :: SDoc -> ModuleName -> IsBootInterface -> PkgQual -> RnM (MaybeErr SDoc ModIface)
+ GHC.Iface.Load: loadSrcInterface_maybe :: SDoc -> ModuleName -> IsBootInterface -> PkgQual -> RnM (MaybeErr MissingInterfaceError ModIface)
- GHC.Iface.Load: moduleFreeHolesPrecise :: SDoc -> Module -> TcRnIf gbl lcl (MaybeErr SDoc (UniqDSet ModuleName))
+ GHC.Iface.Load: moduleFreeHolesPrecise :: SDoc -> Module -> TcRnIf gbl lcl (MaybeErr MissingInterfaceError (UniqDSet ModuleName))
- GHC.Iface.Load: readIface :: DynFlags -> NameCache -> Module -> FilePath -> IO (MaybeErr SDoc ModIface)
+ GHC.Iface.Load: readIface :: DynFlags -> NameCache -> Module -> FilePath -> IO (MaybeErr ReadInterfaceError ModIface)
- GHC.Iface.Load: tcLookupImported_maybe :: Name -> TcM (MaybeErr SDoc TyThing)
+ GHC.Iface.Load: tcLookupImported_maybe :: Name -> TcM (MaybeErr IfaceMessage TyThing)
- GHC.Iface.Syntax: IfConcreteClass :: IfaceContext -> [IfaceAT] -> [IfaceClassOp] -> BooleanFormula IfLclName -> IfaceClassBody
+ GHC.Iface.Syntax: IfConcreteClass :: IfaceContext -> [IfaceAT] -> [IfaceClassOp] -> IfaceBooleanFormula -> IfaceClassBody
- GHC.Iface.Syntax: IfRecSelId :: Either IfaceTyCon IfaceDecl -> Bool -> IfaceIdDetails
+ GHC.Iface.Syntax: IfRecSelId :: Either IfaceTyCon IfaceDecl -> IfaceTopBndr -> Bool -> FieldLabel -> IfaceIdDetails
- GHC.Iface.Syntax: IfaceSource :: RealSrcSpan -> String -> IfaceTickish
+ GHC.Iface.Syntax: IfaceSource :: RealSrcSpan -> FastString -> IfaceTickish
- GHC.Iface.Syntax: [ifMinDef] :: IfaceClassBody -> BooleanFormula IfLclName
+ GHC.Iface.Syntax: [ifMinDef] :: IfaceClassBody -> IfaceBooleanFormula
- GHC.IfaceToCore: hydrateCgBreakInfo :: CgBreakInfo -> IfL ([Maybe (Id, Word16)], Type)
+ GHC.IfaceToCore: hydrateCgBreakInfo :: CgBreakInfo -> IfL ([Maybe (Id, Word)], Type)
- GHC.IfaceToCore: importDecl :: Name -> IfM lcl (MaybeErr SDoc TyThing)
+ GHC.IfaceToCore: importDecl :: Name -> IfM lcl (MaybeErr IfaceMessage TyThing)
- GHC.IfaceToCore: tcLookupImported_maybe :: Name -> TcM (MaybeErr SDoc TyThing)
+ GHC.IfaceToCore: tcLookupImported_maybe :: Name -> TcM (MaybeErr IfaceMessage TyThing)
- GHC.JS.Make: jFor :: (ToJExpr a, ToStat b) => JStat -> a -> JStat -> b -> JStat
+ GHC.JS.Make: jFor :: (JExpr -> JStat) -> (JExpr -> JExpr) -> (JExpr -> JStat) -> (JExpr -> JStat) -> JStat
- GHC.JS.Ppr: RenderJs :: !RenderJs -> JStat -> Doc -> !RenderJs -> JExpr -> Doc -> !RenderJs -> JVal -> Doc -> !RenderJs -> Ident -> Doc -> RenderJs
+ GHC.JS.Ppr: RenderJs :: !JsRender doc => RenderJs doc -> JStat -> doc -> !JsRender doc => RenderJs doc -> JExpr -> doc -> !JsRender doc => RenderJs doc -> JVal -> doc -> !JsRender doc => RenderJs doc -> Ident -> doc -> RenderJs doc
- GHC.JS.Ppr: [renderJsE] :: RenderJs -> !RenderJs -> JExpr -> Doc
+ GHC.JS.Ppr: [renderJsE] :: RenderJs doc -> !JsRender doc => RenderJs doc -> JExpr -> doc
- GHC.JS.Ppr: [renderJsI] :: RenderJs -> !RenderJs -> Ident -> Doc
+ GHC.JS.Ppr: [renderJsI] :: RenderJs doc -> !JsRender doc => RenderJs doc -> Ident -> doc
- GHC.JS.Ppr: [renderJsS] :: RenderJs -> !RenderJs -> JStat -> Doc
+ GHC.JS.Ppr: [renderJsS] :: RenderJs doc -> !JsRender doc => RenderJs doc -> JStat -> doc
- GHC.JS.Ppr: [renderJsV] :: RenderJs -> !RenderJs -> JVal -> Doc
+ GHC.JS.Ppr: [renderJsV] :: RenderJs doc -> !JsRender doc => RenderJs doc -> JVal -> doc
- GHC.JS.Ppr: braceNest :: Doc -> Doc
+ GHC.JS.Ppr: braceNest :: JsRender doc => doc -> doc
- GHC.JS.Ppr: data RenderJs
+ GHC.JS.Ppr: data RenderJs doc
- GHC.JS.Ppr: defaultRenderJs :: RenderJs
+ GHC.JS.Ppr: defaultRenderJs :: RenderJs doc
- GHC.JS.Ppr: hangBrace :: Doc -> Doc -> Doc
+ GHC.JS.Ppr: hangBrace :: JsRender doc => doc -> doc -> doc
- GHC.JS.Ppr: jsToDoc :: JsToDoc a => a -> Doc
+ GHC.JS.Ppr: jsToDoc :: JsToDoc a => a -> SDoc
- GHC.JS.Ppr: jsToDocR :: JsToDoc a => RenderJs -> a -> Doc
+ GHC.JS.Ppr: jsToDocR :: (JsToDoc a, JsRender doc) => RenderJs doc -> a -> doc
- GHC.JS.Ppr: pprStringLit :: FastString -> Doc
+ GHC.JS.Ppr: pprStringLit :: IsLine doc => FastString -> doc
- GHC.JS.Ppr: renderJs :: (JsToDoc a, JMacro a) => a -> Doc
+ GHC.JS.Ppr: renderJs :: JsToDoc a => a -> SDoc
- GHC.JS.Ppr: renderPrefixJs :: (JsToDoc a, JMacro a) => FastString -> a -> Doc
+ GHC.JS.Ppr: renderPrefixJs :: (JsToDoc a, JMacro a) => a -> SDoc
- GHC.JS.Ppr: renderPrefixJs' :: (JsToDoc a, JMacro a) => RenderJs -> FastString -> a -> Doc
+ GHC.JS.Ppr: renderPrefixJs' :: (JsToDoc a, JMacro a, JsRender doc) => RenderJs doc -> a -> doc
- GHC.JS.Syntax: AddOp :: JOp
+ GHC.JS.Syntax: AddOp :: Op
- GHC.JS.Syntax: AssignStat :: JExpr -> JExpr -> JStat
+ GHC.JS.Syntax: AssignStat :: JExpr -> AOp -> JExpr -> JStat
- GHC.JS.Syntax: BAndOp :: JOp
+ GHC.JS.Syntax: BAndOp :: Op
- GHC.JS.Syntax: BNotOp :: JUOp
+ GHC.JS.Syntax: BNotOp :: UOp
- GHC.JS.Syntax: BOrOp :: JOp
+ GHC.JS.Syntax: BOrOp :: Op
- GHC.JS.Syntax: BXorOp :: JOp
+ GHC.JS.Syntax: BXorOp :: Op
- GHC.JS.Syntax: BreakStat :: Maybe JsLabel -> JStat
+ GHC.JS.Syntax: BreakStat :: Maybe JLabel -> JStat
- GHC.JS.Syntax: ContinueStat :: Maybe JsLabel -> JStat
+ GHC.JS.Syntax: ContinueStat :: Maybe JLabel -> JStat
- GHC.JS.Syntax: DeleteOp :: JUOp
+ GHC.JS.Syntax: DeleteOp :: UOp
- GHC.JS.Syntax: DivOp :: JOp
+ GHC.JS.Syntax: DivOp :: Op
- GHC.JS.Syntax: EqOp :: JOp
+ GHC.JS.Syntax: EqOp :: Op
- GHC.JS.Syntax: GeOp :: JOp
+ GHC.JS.Syntax: GeOp :: Op
- GHC.JS.Syntax: GtOp :: JOp
+ GHC.JS.Syntax: GtOp :: Op
- GHC.JS.Syntax: InOp :: JOp
+ GHC.JS.Syntax: InOp :: Op
- GHC.JS.Syntax: InfixExpr :: JOp -> JExpr -> JExpr -> JExpr
+ GHC.JS.Syntax: InfixExpr :: Op -> JExpr -> JExpr -> JExpr
- GHC.JS.Syntax: InstanceofOp :: JOp
+ GHC.JS.Syntax: InstanceofOp :: Op
- GHC.JS.Syntax: LAndOp :: JOp
+ GHC.JS.Syntax: LAndOp :: Op
- GHC.JS.Syntax: LOrOp :: JOp
+ GHC.JS.Syntax: LOrOp :: Op
- GHC.JS.Syntax: LabelStat :: JsLabel -> JStat -> JStat
+ GHC.JS.Syntax: LabelStat :: JLabel -> JStat -> JStat
- GHC.JS.Syntax: LeOp :: JOp
+ GHC.JS.Syntax: LeOp :: Op
- GHC.JS.Syntax: LeftShiftOp :: JOp
+ GHC.JS.Syntax: LeftShiftOp :: Op
- GHC.JS.Syntax: LtOp :: JOp
+ GHC.JS.Syntax: LtOp :: Op
- GHC.JS.Syntax: ModOp :: JOp
+ GHC.JS.Syntax: ModOp :: Op
- GHC.JS.Syntax: MulOp :: JOp
+ GHC.JS.Syntax: MulOp :: Op
- GHC.JS.Syntax: NegOp :: JUOp
+ GHC.JS.Syntax: NegOp :: UOp
- GHC.JS.Syntax: NeqOp :: JOp
+ GHC.JS.Syntax: NeqOp :: Op
- GHC.JS.Syntax: NewOp :: JUOp
+ GHC.JS.Syntax: NewOp :: UOp
- GHC.JS.Syntax: NotOp :: JUOp
+ GHC.JS.Syntax: NotOp :: UOp
- GHC.JS.Syntax: PlusOp :: JUOp
+ GHC.JS.Syntax: PlusOp :: UOp
- GHC.JS.Syntax: PostDecOp :: JUOp
+ GHC.JS.Syntax: PostDecOp :: UOp
- GHC.JS.Syntax: PostIncOp :: JUOp
+ GHC.JS.Syntax: PostIncOp :: UOp
- GHC.JS.Syntax: PreDecOp :: JUOp
+ GHC.JS.Syntax: PreDecOp :: UOp
- GHC.JS.Syntax: PreIncOp :: JUOp
+ GHC.JS.Syntax: PreIncOp :: UOp
- GHC.JS.Syntax: RightShiftOp :: JOp
+ GHC.JS.Syntax: RightShiftOp :: Op
- GHC.JS.Syntax: StrictEqOp :: JOp
+ GHC.JS.Syntax: StrictEqOp :: Op
- GHC.JS.Syntax: StrictNeqOp :: JOp
+ GHC.JS.Syntax: StrictNeqOp :: Op
- GHC.JS.Syntax: SubOp :: JOp
+ GHC.JS.Syntax: SubOp :: Op
- GHC.JS.Syntax: TypeofOp :: JUOp
+ GHC.JS.Syntax: TypeofOp :: UOp
- GHC.JS.Syntax: UOpExpr :: JUOp -> JExpr -> JExpr
+ GHC.JS.Syntax: UOpExpr :: UOp -> JExpr -> JExpr
- GHC.JS.Syntax: UOpStat :: JUOp -> JExpr -> JStat
+ GHC.JS.Syntax: UOpStat :: UOp -> JExpr -> JStat
- GHC.JS.Syntax: VoidOp :: JUOp
+ GHC.JS.Syntax: VoidOp :: UOp
- GHC.JS.Syntax: YieldOp :: JUOp
+ GHC.JS.Syntax: YieldOp :: UOp
- GHC.JS.Syntax: ZRightShiftOp :: JOp
+ GHC.JS.Syntax: ZRightShiftOp :: Op
- GHC.JS.Transform: class Compos t
+ GHC.JS.Transform: class Compos (t :: Type -> Type)
- GHC.JS.Transform: compos :: Compos t => (forall a. a -> m a) -> (forall a b. m (a -> b) -> m a -> m b) -> (forall a. t a -> m (t a)) -> t c -> m (t c)
+ GHC.JS.Transform: compos :: Compos t => (forall a. () => a -> m a) -> (forall a b. () => m (a -> b) -> m a -> m b) -> (forall a. () => t a -> m (t a)) -> t c -> m (t c)
- GHC.JS.Transform: composOp :: Compos t => (forall a. t a -> t a) -> t b -> t b
+ GHC.JS.Transform: composOp :: Compos t => (forall a. () => t a -> t a) -> t b -> t b
- GHC.JS.Transform: composOpFold :: Compos t => b -> (b -> b -> b) -> (forall a. t a -> b) -> t c -> b
+ GHC.JS.Transform: composOpFold :: Compos t => b -> (b -> b -> b) -> (forall a. () => t a -> b) -> t c -> b
- GHC.JS.Transform: composOpM :: (Compos t, Monad m) => (forall a. t a -> m (t a)) -> t b -> m (t b)
+ GHC.JS.Transform: composOpM :: (Compos t, Monad m) => (forall a. () => t a -> m (t a)) -> t b -> m (t b)
- GHC.JS.Transform: composOpM_ :: (Compos t, Monad m) => (forall a. t a -> m ()) -> t b -> m ()
+ GHC.JS.Transform: composOpM_ :: (Compos t, Monad m) => (forall a. () => t a -> m ()) -> t b -> m ()
- GHC.Linker.Types: LinkerEnv :: ClosureEnv -> !ItblEnv -> !AddrEnv -> LinkerEnv
+ GHC.Linker.Types: LinkerEnv :: !ClosureEnv -> !ItblEnv -> !AddrEnv -> LinkerEnv
- GHC.Linker.Types: [closure_env] :: LinkerEnv -> ClosureEnv
+ GHC.Linker.Types: [closure_env] :: LinkerEnv -> !ClosureEnv
- GHC.Llvm: Store :: LlvmVar -> LlvmVar -> LMAlign -> LlvmStatement
+ GHC.Llvm: Store :: LlvmVar -> LlvmVar -> LMAlign -> [MetaAnnot] -> LlvmStatement
- GHC.Llvm: ppLit :: LlvmCgConfig -> LlvmLit -> SDoc
+ GHC.Llvm: ppLit :: IsLine doc => LlvmCgConfig -> LlvmLit -> doc
- GHC.Llvm: ppLlvmAlias :: LlvmAlias -> SDoc
+ GHC.Llvm: ppLlvmAlias :: IsLine doc => LlvmAlias -> doc
- GHC.Llvm: ppLlvmAliases :: [LlvmAlias] -> SDoc
+ GHC.Llvm: ppLlvmAliases :: IsDoc doc => [LlvmAlias] -> doc
- GHC.Llvm: ppLlvmComment :: LMString -> SDoc
+ GHC.Llvm: ppLlvmComment :: IsLine doc => LMString -> doc
- GHC.Llvm: ppLlvmComments :: [LMString] -> SDoc
+ GHC.Llvm: ppLlvmComments :: IsDoc doc => [LMString] -> doc
- GHC.Llvm: ppLlvmFunction :: LlvmCgConfig -> LlvmFunction -> SDoc
+ GHC.Llvm: ppLlvmFunction :: IsDoc doc => LlvmCgConfig -> LlvmFunction -> doc
- GHC.Llvm: ppLlvmFunctionDecl :: LlvmFunctionDecl -> SDoc
+ GHC.Llvm: ppLlvmFunctionDecl :: IsDoc doc => LlvmFunctionDecl -> doc
- GHC.Llvm: ppLlvmFunctionDecls :: LlvmFunctionDecls -> SDoc
+ GHC.Llvm: ppLlvmFunctionDecls :: IsDoc doc => LlvmFunctionDecls -> doc
- GHC.Llvm: ppLlvmFunctions :: LlvmCgConfig -> LlvmFunctions -> SDoc
+ GHC.Llvm: ppLlvmFunctions :: IsDoc doc => LlvmCgConfig -> LlvmFunctions -> doc
- GHC.Llvm: ppLlvmGlobal :: LlvmCgConfig -> LMGlobal -> SDoc
+ GHC.Llvm: ppLlvmGlobal :: IsLine doc => LlvmCgConfig -> LMGlobal -> doc
- GHC.Llvm: ppLlvmGlobals :: LlvmCgConfig -> [LMGlobal] -> SDoc
+ GHC.Llvm: ppLlvmGlobals :: IsDoc doc => LlvmCgConfig -> [LMGlobal] -> doc
- GHC.Llvm: ppLlvmMeta :: LlvmCgConfig -> MetaDecl -> SDoc
+ GHC.Llvm: ppLlvmMeta :: IsLine doc => LlvmCgConfig -> MetaDecl -> doc
- GHC.Llvm: ppLlvmMetas :: LlvmCgConfig -> [MetaDecl] -> SDoc
+ GHC.Llvm: ppLlvmMetas :: IsDoc doc => LlvmCgConfig -> [MetaDecl] -> doc
- GHC.Llvm: ppLlvmModule :: LlvmCgConfig -> LlvmModule -> SDoc
+ GHC.Llvm: ppLlvmModule :: IsDoc doc => LlvmCgConfig -> LlvmModule -> doc
- GHC.Llvm: ppName :: LlvmCgConfig -> LlvmVar -> SDoc
+ GHC.Llvm: ppName :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc
- GHC.Llvm: ppPlainName :: LlvmCgConfig -> LlvmVar -> SDoc
+ GHC.Llvm: ppPlainName :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc
- GHC.Llvm: ppTypeLit :: LlvmCgConfig -> LlvmLit -> SDoc
+ GHC.Llvm: ppTypeLit :: IsLine doc => LlvmCgConfig -> LlvmLit -> doc
- GHC.Llvm: ppVar :: LlvmCgConfig -> LlvmVar -> SDoc
+ GHC.Llvm: ppVar :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc
- GHC.Llvm.Ppr: ppLit :: LlvmCgConfig -> LlvmLit -> SDoc
+ GHC.Llvm.Ppr: ppLit :: IsLine doc => LlvmCgConfig -> LlvmLit -> doc
- GHC.Llvm.Ppr: ppLlvmAlias :: LlvmAlias -> SDoc
+ GHC.Llvm.Ppr: ppLlvmAlias :: IsLine doc => LlvmAlias -> doc
- GHC.Llvm.Ppr: ppLlvmAliases :: [LlvmAlias] -> SDoc
+ GHC.Llvm.Ppr: ppLlvmAliases :: IsDoc doc => [LlvmAlias] -> doc
- GHC.Llvm.Ppr: ppLlvmComment :: LMString -> SDoc
+ GHC.Llvm.Ppr: ppLlvmComment :: IsLine doc => LMString -> doc
- GHC.Llvm.Ppr: ppLlvmComments :: [LMString] -> SDoc
+ GHC.Llvm.Ppr: ppLlvmComments :: IsDoc doc => [LMString] -> doc
- GHC.Llvm.Ppr: ppLlvmFunction :: LlvmCgConfig -> LlvmFunction -> SDoc
+ GHC.Llvm.Ppr: ppLlvmFunction :: IsDoc doc => LlvmCgConfig -> LlvmFunction -> doc
- GHC.Llvm.Ppr: ppLlvmFunctionDecl :: LlvmFunctionDecl -> SDoc
+ GHC.Llvm.Ppr: ppLlvmFunctionDecl :: IsDoc doc => LlvmFunctionDecl -> doc
- GHC.Llvm.Ppr: ppLlvmFunctionDecls :: LlvmFunctionDecls -> SDoc
+ GHC.Llvm.Ppr: ppLlvmFunctionDecls :: IsDoc doc => LlvmFunctionDecls -> doc
- GHC.Llvm.Ppr: ppLlvmFunctions :: LlvmCgConfig -> LlvmFunctions -> SDoc
+ GHC.Llvm.Ppr: ppLlvmFunctions :: IsDoc doc => LlvmCgConfig -> LlvmFunctions -> doc
- GHC.Llvm.Ppr: ppLlvmGlobal :: LlvmCgConfig -> LMGlobal -> SDoc
+ GHC.Llvm.Ppr: ppLlvmGlobal :: IsLine doc => LlvmCgConfig -> LMGlobal -> doc
- GHC.Llvm.Ppr: ppLlvmGlobals :: LlvmCgConfig -> [LMGlobal] -> SDoc
+ GHC.Llvm.Ppr: ppLlvmGlobals :: IsDoc doc => LlvmCgConfig -> [LMGlobal] -> doc
- GHC.Llvm.Ppr: ppLlvmMeta :: LlvmCgConfig -> MetaDecl -> SDoc
+ GHC.Llvm.Ppr: ppLlvmMeta :: IsLine doc => LlvmCgConfig -> MetaDecl -> doc
- GHC.Llvm.Ppr: ppLlvmMetas :: LlvmCgConfig -> [MetaDecl] -> SDoc
+ GHC.Llvm.Ppr: ppLlvmMetas :: IsDoc doc => LlvmCgConfig -> [MetaDecl] -> doc
- GHC.Llvm.Ppr: ppLlvmModule :: LlvmCgConfig -> LlvmModule -> SDoc
+ GHC.Llvm.Ppr: ppLlvmModule :: IsDoc doc => LlvmCgConfig -> LlvmModule -> doc
- GHC.Llvm.Ppr: ppName :: LlvmCgConfig -> LlvmVar -> SDoc
+ GHC.Llvm.Ppr: ppName :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc
- GHC.Llvm.Ppr: ppPlainName :: LlvmCgConfig -> LlvmVar -> SDoc
+ GHC.Llvm.Ppr: ppPlainName :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc
- GHC.Llvm.Ppr: ppTypeLit :: LlvmCgConfig -> LlvmLit -> SDoc
+ GHC.Llvm.Ppr: ppTypeLit :: IsLine doc => LlvmCgConfig -> LlvmLit -> doc
- GHC.Llvm.Ppr: ppVar :: LlvmCgConfig -> LlvmVar -> SDoc
+ GHC.Llvm.Ppr: ppVar :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc
- GHC.Llvm.Syntax: Store :: LlvmVar -> LlvmVar -> LMAlign -> LlvmStatement
+ GHC.Llvm.Syntax: Store :: LlvmVar -> LlvmVar -> LMAlign -> [MetaAnnot] -> LlvmStatement
- GHC.Llvm.Types: ppCommaJoin :: Outputable a => [a] -> SDoc
+ GHC.Llvm.Types: ppCommaJoin :: IsLine doc => (a -> doc) -> [a] -> doc
- GHC.Llvm.Types: ppDouble :: Platform -> Double -> SDoc
+ GHC.Llvm.Types: ppDouble :: IsLine doc => Platform -> Double -> doc
- GHC.Llvm.Types: ppFloat :: Platform -> Float -> SDoc
+ GHC.Llvm.Types: ppFloat :: IsLine doc => Platform -> Float -> doc
- GHC.Llvm.Types: ppParams :: LlvmParameterListType -> [LlvmParameter] -> SDoc
+ GHC.Llvm.Types: ppParams :: IsLine doc => LlvmParameterListType -> [LlvmParameter] -> doc
- GHC.Llvm.Types: ppSpaceJoin :: Outputable a => [a] -> SDoc
+ GHC.Llvm.Types: ppSpaceJoin :: IsLine doc => (a -> doc) -> [a] -> doc
- GHC.Parser.Annotation: NameAnnRArrow :: EpaLocation -> [TrailingAnn] -> NameAnn
+ GHC.Parser.Annotation: NameAnnRArrow :: Bool -> Maybe EpaLocation -> EpaLocation -> Maybe EpaLocation -> [TrailingAnn] -> NameAnn
- GHC.Parser.Annotation: type EpAnnCO = -- | Api Annotations for comments only EpAnn NoEpAnns
+ GHC.Parser.Annotation: type EpAnnCO = EpAnn NoEpAnns
- GHC.Parser.Annotation: type LocatedAn an = GenLocated (SrcAnn an)
+ GHC.Parser.Annotation: type LocatedAn an = GenLocated SrcAnn an
- GHC.Parser.Annotation: type SrcAnn ann = SrcSpanAnn' (EpAnn ann)
+ GHC.Parser.Annotation: type SrcAnn ann = SrcSpanAnn' EpAnn ann
- GHC.Parser.Errors.Types: PsUnknownMessage :: UnknownDiagnostic -> PsMessage
+ GHC.Parser.Errors.Types: PsUnknownMessage :: UnknownDiagnostic (DiagnosticOpts PsMessage) -> PsMessage
- GHC.Parser.Lexer: PState :: StringBuffer -> ParserOpts -> Messages PsMessage -> Messages PsMessage -> Maybe RealSrcSpan -> !Word -> Maybe (PsLocated Token) -> PsSpan -> PsSpan -> PsSpan -> !Int -> PsLoc -> [LayoutContext] -> [Int] -> [FastString] -> [PsLocated Token] -> Maybe (PsLocated Token) -> PsSpan -> [ALRContext] -> Maybe ALRLayout -> Bool -> Maybe (Pair RealSrcSpan RealSrcSpan) -> Maybe [LEpaComment] -> [LEpaComment] -> OrdList (PsLocated HdkComment) -> PState
+ GHC.Parser.Lexer: PState :: StringBuffer -> ParserOpts -> Messages PsMessage -> Messages PsMessage -> Maybe RealSrcSpan -> !Word -> Maybe (PsLocated Token) -> PsSpan -> PsSpan -> !Int -> PsLoc -> [LayoutContext] -> [Int] -> [FastString] -> [PsLocated Token] -> Maybe (PsLocated Token) -> PsSpan -> [ALRContext] -> Maybe ALRLayout -> Bool -> Maybe (Pair RealSrcSpan RealSrcSpan) -> Maybe [LEpaComment] -> [LEpaComment] -> OrdList (PsLocated HdkComment) -> PState
- GHC.Parser.Lexer: class Monad m => MonadP m
+ GHC.Parser.Lexer: class Monad m => MonadP (m :: Type -> Type)
- GHC.Parser.Lexer: data ParseResult a
+ GHC.Parser.Lexer: data ParseResult a :: TYPE 'SumRep '[ 'TupleRep '[LiftedRep, LiftedRep], LiftedRep]
- GHC.Parser.PostProcess: class (b ~ (Body b) GhcPs, AnnoBody b) => DisambECP b where {
+ GHC.Parser.PostProcess: class (b ~ Body b GhcPs, AnnoBody b) => DisambECP b where {
- GHC.Parser.PostProcess: mkGadtDecl :: SrcSpan -> NonEmpty (LocatedN RdrName) -> LHsUniToken "::" "∷" GhcPs -> LHsSigType GhcPs -> P (LConDecl GhcPs)
+ GHC.Parser.PostProcess: mkGadtDecl :: SrcSpan -> NonEmpty (LocatedN RdrName) -> LHsUniToken "::" "\8759" GhcPs -> LHsSigType GhcPs -> P (LConDecl GhcPs)
- GHC.Parser.PostProcess: mkHsAppKindTyPV :: DisambTD b => LocatedA b -> SrcSpan -> LHsType GhcPs -> PV (LocatedA b)
+ GHC.Parser.PostProcess: mkHsAppKindTyPV :: DisambTD b => LocatedA b -> LHsToken "@" GhcPs -> LHsType GhcPs -> PV (LocatedA b)
- GHC.Parser.PostProcess: mkInstD :: LInstDecl (GhcPass p) -> LHsDecl (GhcPass p)
+ GHC.Parser.PostProcess: mkInstD :: forall (p :: Pass). LInstDecl (GhcPass p) -> LHsDecl (GhcPass p)
- GHC.Parser.PostProcess: mkModuleImpExp :: [AddEpAnn] -> LocatedA ImpExpQcSpec -> ImpExpSubSpec -> P (IE GhcPs)
+ GHC.Parser.PostProcess: mkModuleImpExp :: Maybe (LocatedP (WarningTxt GhcPs)) -> [AddEpAnn] -> LocatedA ImpExpQcSpec -> ImpExpSubSpec -> P (IE GhcPs)
- GHC.Parser.PostProcess: mkMultTy :: LHsToken "%" GhcPs -> LHsType GhcPs -> LHsUniToken "->" "→" GhcPs -> HsArrow GhcPs
+ GHC.Parser.PostProcess: mkMultTy :: LHsToken "%" GhcPs -> LHsType GhcPs -> LHsUniToken "->" "\8594" GhcPs -> HsArrow GhcPs
- GHC.Parser.PostProcess: mkTyClD :: LTyClDecl (GhcPass p) -> LHsDecl (GhcPass p)
+ GHC.Parser.PostProcess: mkTyClD :: forall (p :: Pass). LTyClDecl (GhcPass p) -> LHsDecl (GhcPass p)
- GHC.Parser.PostProcess: parseCImport :: Located CCallConv -> Located Safety -> FastString -> String -> Located SourceText -> Maybe (ForeignImport (GhcPass p))
+ GHC.Parser.PostProcess: parseCImport :: forall (p :: Pass). Located CCallConv -> Located Safety -> FastString -> String -> Located SourceText -> Maybe (ForeignImport (GhcPass p))
- GHC.Parser.PostProcess: type Fbind b = Either (LHsRecField GhcPs (LocatedA b)) (LHsRecProj GhcPs (LocatedA b))
+ GHC.Parser.PostProcess: type Fbind b = Either LHsRecField GhcPs LocatedA b LHsRecProj GhcPs LocatedA b
- GHC.Platform: data () => Arch
+ GHC.Platform: data Arch
- GHC.Platform: data () => ArchOS
+ GHC.Platform: data ArchOS
- GHC.Platform: data () => ArmABI
+ GHC.Platform: data ArmABI
- GHC.Platform: data () => ArmISA
+ GHC.Platform: data ArmISA
- GHC.Platform: data () => ArmISAExt
+ GHC.Platform: data ArmISAExt
- GHC.Platform: data () => ByteOrder
+ GHC.Platform: data ByteOrder
- GHC.Platform: data () => OS
+ GHC.Platform: data OS
- GHC.Platform: data () => PPC_64ABI
+ GHC.Platform: data PPC_64ABI
- GHC.Plugins: CoercionHole :: CoVar -> IORef (Maybe Coercion) -> CoercionHole
+ GHC.Plugins: CoercionHole :: CoVar -> IORef (Maybe Coercion) -> Bool -> CoercionHole
- GHC.Plugins: TyCoMapper :: (env -> TyVar -> m Type) -> (env -> CoVar -> m Coercion) -> (env -> CoercionHole -> m Coercion) -> (env -> TyCoVar -> ForAllTyFlag -> m (env, TyCoVar)) -> (TyCon -> m TyCon) -> TyCoMapper env m
+ GHC.Plugins: TyCoMapper :: (env -> TyVar -> m Type) -> (env -> CoVar -> m Coercion) -> (env -> CoercionHole -> m Coercion) -> (forall r. () => env -> TyCoVar -> ForAllTyFlag -> (env -> TyCoVar -> m r) -> m r) -> (TyCon -> m TyCon) -> TyCoMapper env (m :: Type -> Type)
- GHC.Plugins: [tcm_covar] :: TyCoMapper env m -> env -> CoVar -> m Coercion
+ GHC.Plugins: [tcm_covar] :: TyCoMapper env (m :: Type -> Type) -> env -> CoVar -> m Coercion
- GHC.Plugins: [tcm_hole] :: TyCoMapper env m -> env -> CoercionHole -> m Coercion
+ GHC.Plugins: [tcm_hole] :: TyCoMapper env (m :: Type -> Type) -> env -> CoercionHole -> m Coercion
- GHC.Plugins: [tcm_tycobinder] :: TyCoMapper env m -> env -> TyCoVar -> ForAllTyFlag -> m (env, TyCoVar)
+ GHC.Plugins: [tcm_tycobinder] :: TyCoMapper env (m :: Type -> Type) -> forall r. () => env -> TyCoVar -> ForAllTyFlag -> (env -> TyCoVar -> m r) -> m r
- GHC.Plugins: [tcm_tycon] :: TyCoMapper env m -> TyCon -> m TyCon
+ GHC.Plugins: [tcm_tycon] :: TyCoMapper env (m :: Type -> Type) -> TyCon -> m TyCon
- GHC.Plugins: [tcm_tyvar] :: TyCoMapper env m -> env -> TyVar -> m Type
+ GHC.Plugins: [tcm_tyvar] :: TyCoMapper env (m :: Type -> Type) -> env -> TyVar -> m Type
- GHC.Plugins: alterOccEnv :: (Maybe elt -> Maybe elt) -> OccEnv elt -> OccName -> OccEnv elt
+ GHC.Plugins: alterOccEnv :: (Maybe a -> Maybe a) -> OccEnv a -> OccName -> OccEnv a
- GHC.Plugins: cloneBndrs :: Subst -> UniqSupply -> [Var] -> (Subst, [Var])
+ GHC.Plugins: cloneBndrs :: MonadUnique m => Subst -> [Var] -> m (Subst, [Var])
- GHC.Plugins: cloneRecIdBndrs :: Subst -> UniqSupply -> [Id] -> (Subst, [Id])
+ GHC.Plugins: cloneRecIdBndrs :: MonadUnique m => Subst -> [Id] -> m (Subst, [Id])
- GHC.Plugins: coAxNthLHS :: CoAxiom br -> Int -> Type
+ GHC.Plugins: coAxNthLHS :: forall (br :: BranchFlag). CoAxiom br -> Int -> Type
- GHC.Plugins: data TyCoMapper env m
+ GHC.Plugins: data TyCoMapper env (m :: Type -> Type)
- GHC.Plugins: filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt
+ GHC.Plugins: filterOccEnv :: (a -> Bool) -> OccEnv a -> OccEnv a
- GHC.Plugins: mkAxInstCo :: Role -> CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Coercion
+ GHC.Plugins: mkAxInstCo :: forall (br :: BranchFlag). Role -> CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Coercion
- GHC.Plugins: mkAxInstLHS :: CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type
+ GHC.Plugins: mkAxInstLHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type
- GHC.Plugins: mkAxInstRHS :: CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type
+ GHC.Plugins: mkAxInstRHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type
- GHC.Plugins: mkFunCo2 :: HasDebugCallStack => Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
+ GHC.Plugins: mkFunCo2 :: Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
- GHC.Plugins: pprCoAxiom :: CoAxiom br -> SDoc
+ GHC.Plugins: pprCoAxiom :: forall (br :: BranchFlag). CoAxiom br -> SDoc
- GHC.Plugins: pprModulePrefix :: IsLine doc => PprStyle -> Module -> OccName -> doc
+ GHC.Plugins: pprModulePrefix :: PprStyle -> Module -> OccName -> SDoc
- GHC.Plugins: pprName :: forall doc. IsLine doc => Name -> doc
+ GHC.Plugins: pprName :: IsLine doc => Name -> doc
- GHC.Plugins: pprNameSpaceBrief :: IsLine doc => NameSpace -> doc
+ GHC.Plugins: pprNameSpaceBrief :: NameSpace -> SDoc
- GHC.Plugins: pprUserTypeErrorTy :: Type -> SDoc
+ GHC.Plugins: pprUserTypeErrorTy :: ErrorMsgType -> SDoc
- GHC.Plugins: type OccSet = UniqSet OccName
+ GHC.Plugins: type OccSet = FastStringEnv UniqSet NameSpace
- GHC.Plugins: userTypeError_maybe :: Type -> Maybe Type
+ GHC.Plugins: userTypeError_maybe :: Type -> Maybe ErrorMsgType
- GHC.Prelude.Basic: ($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
+ GHC.Prelude.Basic: ($!) :: (a -> b) -> a -> b
- GHC.Prelude.Basic: ($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
+ GHC.Prelude.Basic: ($) :: (a -> b) -> a -> b
- GHC.Prelude.Basic: class () => Bounded a
+ GHC.Prelude.Basic: class Bounded a
- GHC.Prelude.Basic: class () => Enum a
+ GHC.Prelude.Basic: class Enum a
- GHC.Prelude.Basic: class () => Eq a
+ GHC.Prelude.Basic: class Eq a
- GHC.Prelude.Basic: class () => Foldable (t :: Type -> Type)
+ GHC.Prelude.Basic: class Foldable (t :: Type -> Type)
- GHC.Prelude.Basic: class () => Functor (f :: Type -> Type)
+ GHC.Prelude.Basic: class Functor (f :: Type -> Type)
- GHC.Prelude.Basic: class () => Num a
+ GHC.Prelude.Basic: class Num a
- GHC.Prelude.Basic: class () => Read a
+ GHC.Prelude.Basic: class Read a
- GHC.Prelude.Basic: class () => Semigroup a
+ GHC.Prelude.Basic: class Semigroup a
- GHC.Prelude.Basic: class () => Show a
+ GHC.Prelude.Basic: class Show a
- GHC.Prelude.Basic: data () => Bool
+ GHC.Prelude.Basic: data Bool
- GHC.Prelude.Basic: data () => Char
+ GHC.Prelude.Basic: data Char
- GHC.Prelude.Basic: data () => Double
+ GHC.Prelude.Basic: data Double
- GHC.Prelude.Basic: data () => Either a b
+ GHC.Prelude.Basic: data Either a b
- GHC.Prelude.Basic: data () => Float
+ GHC.Prelude.Basic: data Float
- GHC.Prelude.Basic: data () => IO a
+ GHC.Prelude.Basic: data IO a
- GHC.Prelude.Basic: data () => Int
+ GHC.Prelude.Basic: data Int
- GHC.Prelude.Basic: data () => Integer
+ GHC.Prelude.Basic: data Integer
- GHC.Prelude.Basic: data () => Maybe a
+ GHC.Prelude.Basic: data Maybe a
- GHC.Prelude.Basic: data () => Ordering
+ GHC.Prelude.Basic: data Ordering
- GHC.Prelude.Basic: data () => Word
+ GHC.Prelude.Basic: data Word
- GHC.Prelude.Basic: error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
+ GHC.Prelude.Basic: error :: HasCallStack => [Char] -> a
- GHC.Prelude.Basic: errorWithoutStackTrace :: forall (r :: RuntimeRep) (a :: TYPE r). [Char] -> a
+ GHC.Prelude.Basic: errorWithoutStackTrace :: [Char] -> a
- GHC.Prelude.Basic: seq :: forall {r :: RuntimeRep} a (b :: TYPE r). a -> b -> b
+ GHC.Prelude.Basic: seq :: a -> b -> b
- GHC.Prelude.Basic: undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
+ GHC.Prelude.Basic: undefined :: HasCallStack => a
- GHC.Rename.Bind: type MiniFixityEnv = FastStringEnv (Located Fixity)
+ GHC.Rename.Bind: type MiniFixityEnv = FastStringEnv Located Fixity
- GHC.Rename.Env: FoundChild :: Parent -> GreName -> ChildLookupResult
+ GHC.Rename.Env: FoundChild :: GlobalRdrElt -> ChildLookupResult
- GHC.Rename.Env: IncorrectParent :: Name -> GreName -> [Name] -> ChildLookupResult
+ GHC.Rename.Env: IncorrectParent :: Name -> GlobalRdrElt -> [Name] -> ChildLookupResult
- GHC.Rename.Env: addUsedGRE :: Bool -> GlobalRdrElt -> RnM ()
+ GHC.Rename.Env: addUsedGRE :: DeprecationWarnings -> GlobalRdrElt -> RnM ()
- GHC.Rename.Env: addUsedGREs :: [GlobalRdrElt] -> RnM ()
+ GHC.Rename.Env: addUsedGREs :: DeprecationWarnings -> [GlobalRdrElt] -> RnM ()
- GHC.Rename.Env: lookupConstructorFields :: Name -> RnM [FieldLabel]
+ GHC.Rename.Env: lookupConstructorFields :: HasDebugCallStack => Name -> RnM [FieldLabel]
- GHC.Rename.Env: lookupExprOccRn :: RdrName -> RnM (Maybe GreName)
+ GHC.Rename.Env: lookupExprOccRn :: RdrName -> RnM (Maybe GlobalRdrElt)
- GHC.Rename.Env: lookupGlobalOccRn_maybe :: RdrName -> RnM (Maybe Name)
+ GHC.Rename.Env: lookupGlobalOccRn_maybe :: WhichGREs GREInfo -> RdrName -> RnM (Maybe GlobalRdrElt)
- GHC.Rename.Env: lookupGreAvailRn :: RdrName -> RnM (Name, AvailInfo)
+ GHC.Rename.Env: lookupGreAvailRn :: RdrName -> RnM (Maybe GlobalRdrElt)
- GHC.Rename.Env: lookupOccRn_maybe :: RdrName -> RnM (Maybe Name)
+ GHC.Rename.Env: lookupOccRn_maybe :: RdrName -> RnM (Maybe GlobalRdrElt)
- GHC.Rename.Env: lookupSigCtxtOccRn :: HsSigCtxt -> SDoc -> LocatedA RdrName -> RnM (LocatedA Name)
+ GHC.Rename.Env: lookupSigCtxtOccRn :: HsSigCtxt -> SDoc -> GenLocated (SrcSpanAnn' ann) RdrName -> RnM (GenLocated (SrcSpanAnn' ann) Name)
- GHC.Rename.Env: lookupSubBndrOcc_helper :: Bool -> Bool -> Name -> RdrName -> RnM ChildLookupResult
+ GHC.Rename.Env: lookupSubBndrOcc_helper :: Bool -> DeprecationWarnings -> Name -> RdrName -> LookupChild -> RnM ChildLookupResult
- GHC.Rename.Expr: [UnexpectedStatement] :: Outputable (StmtLR GhcPs GhcPs body) => StmtLR GhcPs GhcPs body -> UnexpectedStatement
+ GHC.Rename.Expr: [UnexpectedStatement] :: forall body. Outputable (StmtLR GhcPs GhcPs body) => StmtLR GhcPs GhcPs body -> UnexpectedStatement
- GHC.Rename.Expr: type AnnoBody body = (Outputable (body GhcPs))
+ GHC.Rename.Expr: type AnnoBody (body :: Type -> Type) = Outputable body GhcPs
- GHC.Rename.Fixity: type MiniFixityEnv = FastStringEnv (Located Fixity)
+ GHC.Rename.Fixity: type MiniFixityEnv = FastStringEnv Located Fixity
- GHC.Rename.HsType: bindHsQTyVars :: forall a b. HsDocContext -> Maybe a -> FreeKiTyVars -> LHsQTyVars GhcPs -> (LHsQTyVars GhcRn -> Bool -> RnM (b, FreeVars)) -> RnM (b, FreeVars)
+ GHC.Rename.HsType: bindHsQTyVars :: HsDocContext -> Maybe a -> FreeKiTyVars -> LHsQTyVars GhcPs -> (LHsQTyVars GhcRn -> FreeKiTyVars -> RnM (b, FreeVars)) -> RnM (b, FreeVars)
- GHC.Rename.Names: extendGlobalRdrEnvRn :: [AvailInfo] -> MiniFixityEnv -> RnM (TcGblEnv, TcLclEnv)
+ GHC.Rename.Names: extendGlobalRdrEnvRn :: [GlobalRdrElt] -> MiniFixityEnv -> RnM (TcGblEnv, TcLclEnv)
- GHC.Rename.Names: gresFromAvails :: Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt]
+ GHC.Rename.Names: gresFromAvails :: HscEnv -> Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt]
- GHC.Rename.Pat: liftCpsWithCont :: (forall r. (b -> RnM (r, FreeVars)) -> RnM (r, FreeVars)) -> CpsRn b
+ GHC.Rename.Pat: liftCpsWithCont :: (forall r. () => (b -> RnM (r, FreeVars)) -> RnM (r, FreeVars)) -> CpsRn b
- GHC.Rename.Pat: rnHsRecFields :: forall arg. HsRecFieldContext -> (SrcSpan -> RdrName -> arg) -> HsRecFields GhcPs (LocatedA arg) -> RnM ([LHsRecField GhcRn (LocatedA arg)], FreeVars)
+ GHC.Rename.Pat: rnHsRecFields :: HsRecFieldContext -> (SrcSpan -> RdrName -> arg) -> HsRecFields GhcPs (LocatedA arg) -> RnM ([LHsRecField GhcRn (LocatedA arg)], FreeVars)
- GHC.Rename.Pat: rnHsRecUpdFields :: [LHsRecUpdField GhcPs] -> RnM ([LHsRecUpdField GhcRn], FreeVars)
+ GHC.Rename.Pat: rnHsRecUpdFields :: [LHsRecUpdField GhcPs GhcPs] -> RnM (XLHsRecUpdLabels GhcRn, [LHsRecUpdField GhcRn GhcRn], FreeVars)
- GHC.Rename.Unbound: unknownNameSuggestions :: WhatLooking -> DynFlags -> HomePackageTable -> Module -> GlobalRdrEnv -> LocalRdrEnv -> ImportAvails -> RdrName -> ([ImportError], [GhcHint])
+ GHC.Rename.Unbound: unknownNameSuggestions :: LocalRdrEnv -> WhatLooking -> RdrName -> RnM ([ImportError], [GhcHint])
- GHC.Rename.Utils: addNoNestedForallsContextsErr :: HsDocContext -> SDoc -> LHsType GhcRn -> RnM ()
+ GHC.Rename.Utils: addNoNestedForallsContextsErr :: HsDocContext -> NestedForallsContextsIn -> LHsType GhcRn -> RnM ()
- GHC.Rename.Utils: checkInferredVars :: HsDocContext -> Maybe SDoc -> LHsSigType GhcPs -> RnM ()
+ GHC.Rename.Utils: checkInferredVars :: HsDocContext -> LHsSigType GhcPs -> RnM ()
- GHC.Rename.Utils: dupNamesErr :: Outputable n => (n -> SrcSpan) -> NonEmpty n -> RnM ()
+ GHC.Rename.Utils: dupNamesErr :: NonEmpty SrcSpan -> NonEmpty RdrName -> RnM ()
- GHC.Rename.Utils: noNestedForallsContextsErr :: SDoc -> LHsType GhcRn -> Maybe (SrcSpan, TcRnMessage)
+ GHC.Rename.Utils: noNestedForallsContextsErr :: NestedForallsContextsIn -> LHsType GhcRn -> Maybe (SrcSpan, TcRnMessage)
- GHC.Rename.Utils: typeAppErr :: String -> LHsType GhcPs -> TcRnMessage
+ GHC.Rename.Utils: typeAppErr :: TypeOrKind -> LHsType GhcPs -> TcRnMessage
- GHC.Runtime.Heap.Inspect: cPprTermBase :: forall m. Monad m => CustomTermPrinter m
+ GHC.Runtime.Heap.Inspect: cPprTermBase :: Monad m => CustomTermPrinter m
- GHC.Runtime.Interpreter: EvalBreak :: Bool -> HValueRef -> Int -> String -> RemoteRef (ResumeContext b) -> RemotePtr CostCentreStack -> EvalStatus_ a b
+ GHC.Runtime.Interpreter: EvalBreak :: Bool -> HValueRef -> Int -> Int -> RemoteRef (ResumeContext b) -> RemotePtr CostCentreStack -> EvalStatus_ a b
- GHC.Runtime.Interpreter: createBCOs :: Interp -> BCOOpts -> [ResolvedBCO] -> IO [HValueRef]
+ GHC.Runtime.Interpreter: createBCOs :: Interp -> [ResolvedBCO] -> IO [HValueRef]
- GHC.Runtime.Interpreter: data () => EvalExpr a
+ GHC.Runtime.Interpreter: data EvalExpr a
- GHC.Runtime.Interpreter: data () => EvalResult a
+ GHC.Runtime.Interpreter: data EvalResult a
- GHC.Runtime.Interpreter: data () => EvalStatus_ a b
+ GHC.Runtime.Interpreter: data EvalStatus_ a b
- GHC.Runtime.Interpreter: data () => Message a
+ GHC.Runtime.Interpreter: data Message a
- GHC.Runtime.Interpreter: withIServ :: ExceptionMonad m => IServConfig -> IServ -> (IServInstance -> m (IServInstance, a)) -> m a
+ GHC.Runtime.Interpreter: withIServ :: ExceptionMonad m => IServ -> (ExtInterpInstance () -> m a) -> m a
- GHC.Runtime.Interpreter.Types: ExternalInterp :: !IServConfig -> !IServ -> InterpInstance
+ GHC.Runtime.Interpreter.Types: ExternalInterp :: !ExtInterp -> InterpInstance
- GHC.Runtime.Loader: lookupRdrNameInModuleForPlugins :: HscEnv -> ModuleName -> RdrName -> IO (Maybe (Name, ModIface))
+ GHC.Runtime.Loader: lookupRdrNameInModuleForPlugins :: HasDebugCallStack => HscEnv -> ModuleName -> RdrName -> IO (Maybe (Name, ModIface))
- GHC.Settings.IO: initSettings :: forall m. MonadIO m => String -> ExceptT SettingsError m Settings
+ GHC.Settings.IO: initSettings :: forall (m :: Type -> Type). MonadIO m => String -> ExceptT SettingsError m Settings
- GHC.Stg.FVs: depSortWithAnnotStgPgm :: Module -> [StgTopBinding] -> [CgStgTopBinding]
+ GHC.Stg.FVs: depSortWithAnnotStgPgm :: Module -> [StgTopBinding] -> [(CgStgTopBinding, ImpFVs)]
- GHC.Stg.InferTags.Types: TE :: TagSigEnv -> (BinderP p -> Id) -> !Bool -> TagEnv p
+ GHC.Stg.InferTags.Types: TE :: TagSigEnv -> (BinderP p -> Id) -> !Bool -> TagEnv (p :: StgPass)
- GHC.Stg.InferTags.Types: [te_bytecode] :: TagEnv p -> !Bool
+ GHC.Stg.InferTags.Types: [te_bytecode] :: TagEnv (p :: StgPass) -> !Bool
- GHC.Stg.InferTags.Types: [te_env] :: TagEnv p -> TagSigEnv
+ GHC.Stg.InferTags.Types: [te_env] :: TagEnv (p :: StgPass) -> TagSigEnv
- GHC.Stg.InferTags.Types: [te_get] :: TagEnv p -> BinderP p -> Id
+ GHC.Stg.InferTags.Types: [te_get] :: TagEnv (p :: StgPass) -> BinderP p -> Id
- GHC.Stg.InferTags.Types: data TagEnv p
+ GHC.Stg.InferTags.Types: data TagEnv (p :: StgPass)
- GHC.Stg.InferTags.Types: extendSigEnv :: TagEnv p -> [(Id, TagSig)] -> TagEnv p
+ GHC.Stg.InferTags.Types: extendSigEnv :: forall (p :: StgPass). TagEnv p -> [(Id, TagSig)] -> TagEnv p
- GHC.Stg.InferTags.Types: getBinderId :: TagEnv p -> BinderP p -> Id
+ GHC.Stg.InferTags.Types: getBinderId :: forall (p :: StgPass). TagEnv p -> BinderP p -> Id
- GHC.Stg.InferTags.Types: lookupInfo :: TagEnv p -> StgArg -> TagInfo
+ GHC.Stg.InferTags.Types: lookupInfo :: forall (p :: StgPass). TagEnv p -> StgArg -> TagInfo
- GHC.Stg.InferTags.Types: lookupSig :: TagEnv p -> Id -> Maybe TagSig
+ GHC.Stg.InferTags.Types: lookupSig :: forall (p :: StgPass). TagEnv p -> Id -> Maybe TagSig
- GHC.Stg.InferTags.Types: makeTagged :: TagEnv p -> TagEnv 'InferTaggedBinders
+ GHC.Stg.InferTags.Types: makeTagged :: forall (p :: StgPass). TagEnv p -> TagEnv 'InferTaggedBinders
- GHC.Stg.InferTags.Types: noSig :: TagEnv p -> BinderP p -> (Id, TagSig)
+ GHC.Stg.InferTags.Types: noSig :: forall (p :: StgPass). TagEnv p -> BinderP p -> (Id, TagSig)
- GHC.Stg.Lift.Monad: decomposeStgBinding :: GenStgBinding pass -> (RecFlag, [(BinderP pass, GenStgRhs pass)])
+ GHC.Stg.Lift.Monad: decomposeStgBinding :: forall (pass :: StgPass). GenStgBinding pass -> (RecFlag, [(BinderP pass, GenStgRhs pass)])
- GHC.Stg.Lift.Monad: mkStgBinding :: RecFlag -> [(BinderP pass, GenStgRhs pass)] -> GenStgBinding pass
+ GHC.Stg.Lift.Monad: mkStgBinding :: forall (pass :: StgPass). RecFlag -> [(BinderP pass, GenStgRhs pass)] -> GenStgBinding pass
- GHC.Stg.Lint: lintStgTopBindings :: forall a. (OutputablePass a, BinderP a ~ Id) => Platform -> Logger -> DiagOpts -> StgPprOpts -> [Var] -> Module -> Bool -> String -> [GenStgTopBinding a] -> IO ()
+ GHC.Stg.Lint: lintStgTopBindings :: forall (a :: StgPass). (OutputablePass a, BinderP a ~ Id) => Platform -> Logger -> DiagOpts -> StgPprOpts -> [Var] -> Module -> Bool -> String -> [GenStgTopBinding a] -> IO ()
- GHC.Stg.Pipeline: stg2stg :: Logger -> [Var] -> StgPipelineOpts -> Module -> [StgTopBinding] -> IO ([CgStgTopBinding], StgCgInfos)
+ GHC.Stg.Pipeline: stg2stg :: Logger -> [Var] -> StgPipelineOpts -> Module -> [StgTopBinding] -> IO ([(CgStgTopBinding, IdSet)], StgCgInfos)
- GHC.Stg.Syntax: GenStgAlt :: !AltCon -> ![BinderP pass] -> !GenStgExpr pass -> GenStgAlt pass
+ GHC.Stg.Syntax: GenStgAlt :: !AltCon -> ![BinderP pass] -> !GenStgExpr pass -> GenStgAlt (pass :: StgPass)
- GHC.Stg.Syntax: StgApp :: Id -> [StgArg] -> GenStgExpr pass
+ GHC.Stg.Syntax: StgApp :: Id -> [StgArg] -> GenStgExpr (pass :: StgPass)
- GHC.Stg.Syntax: StgCase :: GenStgExpr pass -> BinderP pass -> AltType -> [GenStgAlt pass] -> GenStgExpr pass
+ GHC.Stg.Syntax: StgCase :: GenStgExpr pass -> BinderP pass -> AltType -> [GenStgAlt pass] -> GenStgExpr (pass :: StgPass)
- GHC.Stg.Syntax: StgConApp :: DataCon -> ConstructorNumber -> [StgArg] -> [Type] -> GenStgExpr pass
+ GHC.Stg.Syntax: StgConApp :: DataCon -> ConstructorNumber -> [StgArg] -> [Type] -> GenStgExpr (pass :: StgPass)
- GHC.Stg.Syntax: StgLet :: XLet pass -> GenStgBinding pass -> GenStgExpr pass -> GenStgExpr pass
+ GHC.Stg.Syntax: StgLet :: XLet pass -> GenStgBinding pass -> GenStgExpr pass -> GenStgExpr (pass :: StgPass)
- GHC.Stg.Syntax: StgLetNoEscape :: XLetNoEscape pass -> GenStgBinding pass -> GenStgExpr pass -> GenStgExpr pass
+ GHC.Stg.Syntax: StgLetNoEscape :: XLetNoEscape pass -> GenStgBinding pass -> GenStgExpr pass -> GenStgExpr (pass :: StgPass)
- GHC.Stg.Syntax: StgLit :: Literal -> GenStgExpr pass
+ GHC.Stg.Syntax: StgLit :: Literal -> GenStgExpr (pass :: StgPass)
- GHC.Stg.Syntax: StgNonRec :: BinderP pass -> GenStgRhs pass -> GenStgBinding pass
+ GHC.Stg.Syntax: StgNonRec :: BinderP pass -> GenStgRhs pass -> GenStgBinding (pass :: StgPass)
- GHC.Stg.Syntax: StgOpApp :: StgOp -> [StgArg] -> Type -> GenStgExpr pass
+ GHC.Stg.Syntax: StgOpApp :: StgOp -> [StgArg] -> Type -> GenStgExpr (pass :: StgPass)
- GHC.Stg.Syntax: StgRec :: [(BinderP pass, GenStgRhs pass)] -> GenStgBinding pass
+ GHC.Stg.Syntax: StgRec :: [(BinderP pass, GenStgRhs pass)] -> GenStgBinding (pass :: StgPass)
- GHC.Stg.Syntax: StgRhsClosure :: XRhsClosure pass -> CostCentreStack -> !UpdateFlag -> [BinderP pass] -> GenStgExpr pass -> GenStgRhs pass
+ GHC.Stg.Syntax: StgRhsClosure :: XRhsClosure pass -> CostCentreStack -> !UpdateFlag -> [BinderP pass] -> GenStgExpr pass -> Type -> GenStgRhs (pass :: StgPass)
- GHC.Stg.Syntax: StgRhsCon :: CostCentreStack -> DataCon -> ConstructorNumber -> [StgTickish] -> [StgArg] -> GenStgRhs pass
+ GHC.Stg.Syntax: StgRhsCon :: CostCentreStack -> DataCon -> ConstructorNumber -> [StgTickish] -> [StgArg] -> Type -> GenStgRhs (pass :: StgPass)
- GHC.Stg.Syntax: StgTick :: StgTickish -> GenStgExpr pass -> GenStgExpr pass
+ GHC.Stg.Syntax: StgTick :: StgTickish -> GenStgExpr pass -> GenStgExpr (pass :: StgPass)
- GHC.Stg.Syntax: StgTopLifted :: GenStgBinding pass -> GenStgTopBinding pass
+ GHC.Stg.Syntax: StgTopLifted :: GenStgBinding pass -> GenStgTopBinding (pass :: StgPass)
- GHC.Stg.Syntax: StgTopStringLit :: Id -> ByteString -> GenStgTopBinding pass
+ GHC.Stg.Syntax: StgTopStringLit :: Id -> ByteString -> GenStgTopBinding (pass :: StgPass)
- GHC.Stg.Syntax: [alt_bndrs] :: GenStgAlt pass -> ![BinderP pass]
+ GHC.Stg.Syntax: [alt_bndrs] :: GenStgAlt (pass :: StgPass) -> ![BinderP pass]
- GHC.Stg.Syntax: [alt_con] :: GenStgAlt pass -> !AltCon
+ GHC.Stg.Syntax: [alt_con] :: GenStgAlt (pass :: StgPass) -> !AltCon
- GHC.Stg.Syntax: [alt_rhs] :: GenStgAlt pass -> !GenStgExpr pass
+ GHC.Stg.Syntax: [alt_rhs] :: GenStgAlt (pass :: StgPass) -> !GenStgExpr pass
- GHC.Stg.Syntax: data GenStgAlt pass
+ GHC.Stg.Syntax: data GenStgAlt (pass :: StgPass)
- GHC.Stg.Syntax: data GenStgBinding pass
+ GHC.Stg.Syntax: data GenStgBinding (pass :: StgPass)
- GHC.Stg.Syntax: data GenStgExpr pass
+ GHC.Stg.Syntax: data GenStgExpr (pass :: StgPass)
- GHC.Stg.Syntax: data GenStgRhs pass
+ GHC.Stg.Syntax: data GenStgRhs (pass :: StgPass)
- GHC.Stg.Syntax: data GenStgTopBinding pass
+ GHC.Stg.Syntax: data GenStgTopBinding (pass :: StgPass)
- GHC.Stg.Syntax: freeVarsOfRhs :: XRhsClosure pass ~ DIdSet => GenStgRhs pass -> DIdSet
+ GHC.Stg.Syntax: freeVarsOfRhs :: forall (pass :: StgPass). XRhsClosure pass ~ DIdSet => GenStgRhs pass -> DIdSet
- GHC.Stg.Syntax: pprGenStgTopBinding :: OutputablePass pass => StgPprOpts -> GenStgTopBinding pass -> SDoc
+ GHC.Stg.Syntax: pprGenStgTopBinding :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgTopBinding pass -> SDoc
- GHC.Stg.Syntax: pprGenStgTopBindings :: OutputablePass pass => StgPprOpts -> [GenStgTopBinding pass] -> SDoc
+ GHC.Stg.Syntax: pprGenStgTopBindings :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> [GenStgTopBinding pass] -> SDoc
- GHC.Stg.Syntax: pprStgAlt :: OutputablePass pass => StgPprOpts -> Bool -> GenStgAlt pass -> SDoc
+ GHC.Stg.Syntax: pprStgAlt :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> Bool -> GenStgAlt pass -> SDoc
- GHC.Stg.Syntax: pprStgBinding :: OutputablePass pass => StgPprOpts -> GenStgBinding pass -> SDoc
+ GHC.Stg.Syntax: pprStgBinding :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgBinding pass -> SDoc
- GHC.Stg.Syntax: pprStgExpr :: OutputablePass pass => StgPprOpts -> GenStgExpr pass -> SDoc
+ GHC.Stg.Syntax: pprStgExpr :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgExpr pass -> SDoc
- GHC.Stg.Syntax: pprStgRhs :: OutputablePass pass => StgPprOpts -> GenStgRhs pass -> SDoc
+ GHC.Stg.Syntax: pprStgRhs :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgRhs pass -> SDoc
- GHC.Stg.Syntax: pprStgTopBinding :: OutputablePass pass => StgPprOpts -> GenStgTopBinding pass -> SDoc
+ GHC.Stg.Syntax: pprStgTopBinding :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> GenStgTopBinding pass -> SDoc
- GHC.Stg.Syntax: pprStgTopBindings :: OutputablePass pass => StgPprOpts -> [GenStgTopBinding pass] -> SDoc
+ GHC.Stg.Syntax: pprStgTopBindings :: forall (pass :: StgPass). OutputablePass pass => StgPprOpts -> [GenStgTopBinding pass] -> SDoc
- GHC.Stg.Syntax: type OutputablePass pass = (Outputable (XLet pass), Outputable (XLetNoEscape pass), Outputable (XRhsClosure pass), OutputableBndr (BinderP pass))
+ GHC.Stg.Syntax: type OutputablePass (pass :: StgPass) = (Outputable XLet pass, Outputable XLetNoEscape pass, Outputable XRhsClosure pass, OutputableBndr BinderP pass)
- GHC.Stg.Utils: bindersOf :: BinderP a ~ Id => GenStgBinding a -> [Id]
+ GHC.Stg.Utils: bindersOf :: forall (a :: StgPass). BinderP a ~ Id => GenStgBinding a -> [Id]
- GHC.Stg.Utils: bindersOfTop :: BinderP a ~ Id => GenStgTopBinding a -> [Id]
+ GHC.Stg.Utils: bindersOfTop :: forall (a :: StgPass). BinderP a ~ Id => GenStgTopBinding a -> [Id]
- GHC.Stg.Utils: bindersOfTopBinds :: BinderP a ~ Id => [GenStgTopBinding a] -> [Id]
+ GHC.Stg.Utils: bindersOfTopBinds :: forall (a :: StgPass). BinderP a ~ Id => [GenStgTopBinding a] -> [Id]
- GHC.Stg.Utils: bindersOfX :: GenStgBinding a -> [BinderP a]
+ GHC.Stg.Utils: bindersOfX :: forall (a :: StgPass). GenStgBinding a -> [BinderP a]
- GHC.Stg.Utils: mkStgAltTypeFromStgAlts :: forall p. Id -> [GenStgAlt p] -> AltType
+ GHC.Stg.Utils: mkStgAltTypeFromStgAlts :: forall (p :: StgPass). Id -> [GenStgAlt p] -> AltType
- GHC.Stg.Utils: stripStgTicksTop :: (StgTickish -> Bool) -> GenStgExpr p -> ([StgTickish], GenStgExpr p)
+ GHC.Stg.Utils: stripStgTicksTop :: forall (p :: StgPass). (StgTickish -> Bool) -> GenStgExpr p -> ([StgTickish], GenStgExpr p)
- GHC.Stg.Utils: stripStgTicksTopE :: (StgTickish -> Bool) -> GenStgExpr p -> GenStgExpr p
+ GHC.Stg.Utils: stripStgTicksTopE :: forall (p :: StgPass). (StgTickish -> Bool) -> GenStgExpr p -> GenStgExpr p
- GHC.StgToCmm.Closure: getCallMethod :: StgToCmmConfig -> Name -> Id -> LambdaFormInfo -> RepArity -> CgLoc -> Maybe SelfLoopInfo -> CallMethod
+ GHC.StgToCmm.Closure: getCallMethod :: StgToCmmConfig -> Name -> Id -> LambdaFormInfo -> RepArity -> RepArity -> CgLoc -> Maybe SelfLoopInfo -> CallMethod
- GHC.StgToCmm.Config: StgToCmmConfig :: !Profile -> Module -> !TempDir -> !SDocContext -> !Bool -> !Maybe Word -> !Int -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> Maybe String -> !Bool -> !Bool -> !Bool -> StgToCmmConfig
+ GHC.StgToCmm.Config: StgToCmmConfig :: !Profile -> Module -> !TempDir -> !SDocContext -> !Bool -> !Maybe Word -> !Int -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> (FMASign -> Bool) -> !Bool -> Maybe String -> !Bool -> !Bool -> !Bool -> StgToCmmConfig
- GHC.StgToCmm.Monad: StgToCmmConfig :: !Profile -> Module -> !TempDir -> !SDocContext -> !Bool -> !Maybe Word -> !Int -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> Maybe String -> !Bool -> !Bool -> !Bool -> StgToCmmConfig
+ GHC.StgToCmm.Monad: StgToCmmConfig :: !Profile -> Module -> !TempDir -> !SDocContext -> !Bool -> !Maybe Word -> !Int -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> (FMASign -> Bool) -> !Bool -> Maybe String -> !Bool -> !Bool -> !Bool -> StgToCmmConfig
- GHC.StgToCmm.Prof: initInfoTableProv :: IPEStats -> [CmmInfoTable] -> InfoTableProvMap -> FCode (Maybe (IPEStats, CStub))
+ GHC.StgToCmm.Prof: initInfoTableProv :: [CmmInfoTable] -> InfoTableProvMap -> FCode CStub
- GHC.StgToCmm.Prof: restoreCurrentCostCentre :: Maybe LocalReg -> FCode ()
+ GHC.StgToCmm.Prof: restoreCurrentCostCentre :: Platform -> Maybe LocalReg -> FCode ()
- GHC.StgToCmm.Prof: storeCurCCS :: CmmExpr -> CmmAGraph
+ GHC.StgToCmm.Prof: storeCurCCS :: Platform -> CmmExpr -> CmmAGraph
- GHC.StgToCmm.Utils: convertInfoProvMap :: StgToCmmConfig -> Module -> InfoTableProvMap -> IPEStats -> [CmmInfoTable] -> (IPEStats, [InfoProvEnt])
+ GHC.StgToCmm.Utils: convertInfoProvMap :: [CmmInfoTable] -> Module -> InfoTableProvMap -> [InfoProvEnt]
- GHC.StgToJS.Deps: genDependencyData :: HasDebugCallStack => Module -> [LinkableUnit] -> G Deps
+ GHC.StgToJS.Deps: genDependencyData :: HasDebugCallStack => Module -> [LinkableUnit] -> G BlockInfo
- GHC.StgToJS.Expr: genBody :: HasDebugCallStack => ExprCtx -> Id -> StgReg -> [Id] -> CgStgExpr -> G JStat
+ GHC.StgToJS.Expr: genBody :: HasDebugCallStack => ExprCtx -> StgReg -> [Id] -> CgStgExpr -> Type -> G JStat
- GHC.StgToJS.FFI: saturateFFI :: JMacro a => Int -> a -> a
+ GHC.StgToJS.FFI: saturateFFI :: Int -> JStat -> JStat
- GHC.StgToJS.Linker.Linker: jsLinkBinary :: JSLinkConfig -> StgToJSConfig -> [FilePath] -> Logger -> DynFlags -> UnitEnv -> [FilePath] -> [UnitId] -> IO ()
+ GHC.StgToJS.Linker.Linker: jsLinkBinary :: FinderCache -> JSLinkConfig -> StgToJSConfig -> [FilePath] -> Logger -> DynFlags -> UnitEnv -> [FilePath] -> [UnitId] -> IO ()
- GHC.StgToJS.Linker.Types: JSLinkConfig :: Bool -> Bool -> Bool -> Bool -> Bool -> JSLinkConfig
+ GHC.StgToJS.Linker.Types: JSLinkConfig :: !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> JSLinkConfig
- GHC.StgToJS.Linker.Types: [lcNoHsMain] :: JSLinkConfig -> Bool
+ GHC.StgToJS.Linker.Types: [lcNoHsMain] :: JSLinkConfig -> !Bool
- GHC.StgToJS.Linker.Types: [lcNoJSExecutables] :: JSLinkConfig -> Bool
+ GHC.StgToJS.Linker.Types: [lcNoJSExecutables] :: JSLinkConfig -> !Bool
- GHC.StgToJS.Linker.Types: [lcNoRts] :: JSLinkConfig -> Bool
+ GHC.StgToJS.Linker.Types: [lcNoRts] :: JSLinkConfig -> !Bool
- GHC.StgToJS.Linker.Types: [lcNoStats] :: JSLinkConfig -> Bool
+ GHC.StgToJS.Linker.Types: [lcNoStats] :: JSLinkConfig -> !Bool
- GHC.StgToJS.Object: ArchiveFile :: FilePath -> DepsLocation
+ GHC.StgToJS.Object: ArchiveFile :: FilePath -> BlockLocation
- GHC.StgToJS.Object: BlockDeps :: [Int] -> [ExportedFun] -> BlockDeps
+ GHC.StgToJS.Object: BlockDeps :: [BlockId] -> [ExportedFun] -> BlockDeps
- GHC.StgToJS.Object: InMemory :: String -> Object -> DepsLocation
+ GHC.StgToJS.Object: InMemory :: String -> Object -> BlockLocation
- GHC.StgToJS.Object: IndexEntry :: ![FastString] -> !Bin ObjUnit -> IndexEntry
+ GHC.StgToJS.Object: IndexEntry :: ![FastString] -> !Bin ObjBlock -> IndexEntry
- GHC.StgToJS.Object: Object :: !ModuleName -> !BinHandle -> !Bin ObjUnit -> !Deps -> !Index -> Object
+ GHC.StgToJS.Object: Object :: !ModuleName -> !BinHandle -> !Bin ObjBlock -> !BlockInfo -> !Index -> Object
- GHC.StgToJS.Object: ObjectFile :: FilePath -> DepsLocation
+ GHC.StgToJS.Object: ObjectFile :: FilePath -> BlockLocation
- GHC.StgToJS.Object: [blockBlockDeps] :: BlockDeps -> [Int]
+ GHC.StgToJS.Object: [blockBlockDeps] :: BlockDeps -> [BlockId]
- GHC.StgToJS.Object: [idxOffset] :: IndexEntry -> !Bin ObjUnit
+ GHC.StgToJS.Object: [idxOffset] :: IndexEntry -> !Bin ObjBlock
- GHC.StgToJS.Object: [objPayloadOffset] :: Object -> !Bin ObjUnit
+ GHC.StgToJS.Object: [objPayloadOffset] :: Object -> !Bin ObjBlock
- GHC.StgToJS.Object: putObject :: BinHandle -> ModuleName -> Deps -> [ObjUnit] -> IO ()
+ GHC.StgToJS.Object: putObject :: BinHandle -> ModuleName -> BlockInfo -> [ObjBlock] -> IO ()
- GHC.StgToJS.Types: IdKey :: !Word64 -> !Int -> !IdType -> IdKey
+ GHC.StgToJS.Types: IdKey :: !Int -> !Int -> !IdType -> IdKey
- GHC.StgToJS.Types: LinkableUnit :: ObjUnit -> [Id] -> [FastString] -> [Id] -> [Unique] -> [OtherSymb] -> Bool -> [ForeignJSRef] -> LinkableUnit
+ GHC.StgToJS.Types: LinkableUnit :: ObjBlock -> [Id] -> [FastString] -> [Id] -> [Unique] -> [OtherSymb] -> Bool -> [ForeignJSRef] -> LinkableUnit
- GHC.StgToJS.Types: StgToJSConfig :: !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !SDocContext -> StgToJSConfig
+ GHC.StgToJS.Types: StgToJSConfig :: !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !SDocContext -> StgToJSConfig
- GHC.StgToJS.Types: [oiClInfo] :: ObjUnit -> ![ClosureInfo]
+ GHC.StgToJS.Types: [oiClInfo] :: ObjBlock -> ![ClosureInfo]
- GHC.StgToJS.Types: [oiFExports] :: ObjUnit -> ![ExpFun]
+ GHC.StgToJS.Types: [oiFExports] :: ObjBlock -> ![ExpFun]
- GHC.StgToJS.Types: [oiFImports] :: ObjUnit -> ![ForeignJSRef]
+ GHC.StgToJS.Types: [oiFImports] :: ObjBlock -> ![ForeignJSRef]
- GHC.StgToJS.Types: [oiRaw] :: ObjUnit -> !ByteString
+ GHC.StgToJS.Types: [oiRaw] :: ObjBlock -> !ByteString
- GHC.StgToJS.Types: [oiStat] :: ObjUnit -> JStat
+ GHC.StgToJS.Types: [oiStat] :: ObjBlock -> JStat
- GHC.StgToJS.Types: [oiStatic] :: ObjUnit -> ![StaticInfo]
+ GHC.StgToJS.Types: [oiStatic] :: ObjBlock -> ![StaticInfo]
- GHC.StgToJS.Types: [oiSymbols] :: ObjUnit -> ![FastString]
+ GHC.StgToJS.Types: [oiSymbols] :: ObjBlock -> ![FastString]
- GHC.StgToJS.Utils: assignCoerce1 :: HasDebugCallStack => [TypedExpr] -> [TypedExpr] -> JStat
+ GHC.StgToJS.Utils: assignCoerce1 :: [TypedExpr] -> [TypedExpr] -> JStat
- GHC.StgToJS.Utils: assignToExprCtx :: HasDebugCallStack => ExprCtx -> [JExpr] -> JStat
+ GHC.StgToJS.Utils: assignToExprCtx :: ExprCtx -> [JExpr] -> JStat
- GHC.StgToJS.Utils: assignToTypedExprs :: HasDebugCallStack => [TypedExpr] -> [JExpr] -> JStat
+ GHC.StgToJS.Utils: assignToTypedExprs :: [TypedExpr] -> [JExpr] -> JStat
- GHC.Tc.Deriv.Functor: functorLikeTraverse :: forall a. TyVar -> FFoldType a -> Type -> a
+ GHC.Tc.Deriv.Functor: functorLikeTraverse :: TyVar -> FFoldType a -> Type -> a
- GHC.Tc.Deriv.Generate: zonkDerivInstTys :: ZonkEnv -> DerivInstTys -> TcM DerivInstTys
+ GHC.Tc.Deriv.Generate: zonkDerivInstTys :: DerivInstTys -> ZonkT TcM DerivInstTys
- GHC.Tc.Deriv.Utils: zonkDerivSpec :: DerivSpec ThetaType -> TcM (DerivSpec ThetaType)
+ GHC.Tc.Deriv.Utils: zonkDerivSpec :: DerivSpec ThetaType -> ZonkTcM (DerivSpec ThetaType)
- GHC.Tc.Deriv.Utils: zonkDerivSpecMechanism :: ZonkEnv -> DerivSpecMechanism -> TcM DerivSpecMechanism
+ GHC.Tc.Deriv.Utils: zonkDerivSpecMechanism :: DerivSpecMechanism -> ZonkTcM DerivSpecMechanism
- GHC.Tc.Errors.Hole: HFDC :: Bool -> HoleFitDispConfig
+ GHC.Tc.Errors.Hole: HFDC :: Bool -> Bool -> Bool -> Bool -> Bool -> HoleFitDispConfig
- GHC.Tc.Errors.Hole: zonkSubs :: TidyEnv -> [HoleFit] -> TcM (TidyEnv, [HoleFit])
+ GHC.Tc.Errors.Hole: zonkSubs :: TidyEnv -> [HoleFit] -> ZonkM (TidyEnv, [HoleFit])
- GHC.Tc.Errors.Ppr: TcRnMessageOpts :: !Bool -> TcRnMessageOpts
+ GHC.Tc.Errors.Ppr: TcRnMessageOpts :: !Bool -> !IfaceMessageOpts -> TcRnMessageOpts
- GHC.Tc.Errors.Types: ConstrainedDataConPE :: PredType -> PromotionErr
+ GHC.Tc.Errors.Types: ConstrainedDataConPE :: ThetaType -> PromotionErr
- GHC.Tc.Errors.Types: ExpectedActual :: Type -> ExpectedActualInfo
+ GHC.Tc.Errors.Types: ExpectedActual :: Type -> Type -> ExpectedActualInfo
- GHC.Tc.Errors.Types: ExpectedActualAfterTySynExpansion :: Type -> ExpectedActualInfo
+ GHC.Tc.Errors.Types: ExpectedActualAfterTySynExpansion :: Type -> Type -> ExpectedActualInfo
- GHC.Tc.Errors.Types: HFDC :: Bool -> HoleFitDispConfig
+ GHC.Tc.Errors.Types: HFDC :: Bool -> Bool -> Bool -> Bool -> Bool -> HoleFitDispConfig
- GHC.Tc.Errors.Types: UserTypeError :: Type -> TcSolverReportMsg
+ GHC.Tc.Errors.Types: UserTypeError :: ErrorMsgType -> TcSolverReportMsg
- GHC.Tc.Errors.Types: [MatchArgMatches] :: LocatedA (Match GhcRn body) -> NonEmpty (LocatedA (Match GhcRn body)) -> MatchArgBadMatches
+ GHC.Tc.Errors.Types: [MatchArgMatches] :: forall body. LocatedA (Match GhcRn body) -> NonEmpty (LocatedA (Match GhcRn body)) -> MatchArgBadMatches
- GHC.Tc.Errors.Types: [TcRnConflictingExports] :: OccName -> GreName -> GlobalRdrElt -> IE GhcPs -> GreName -> GlobalRdrElt -> IE GhcPs -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnConflictingExports] :: OccName -> GlobalRdrElt -> IE GhcPs -> GlobalRdrElt -> IE GhcPs -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnDodgyExports] :: Name -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDodgyExports] :: GlobalRdrElt -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnDodgyImports] :: RdrName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDodgyImports] :: !DodgyImportsReason -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnDuplicateExport] :: GreName -> IE GhcPs -> IE GhcPs -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnDuplicateExport] :: GlobalRdrElt -> IE GhcPs -> IE GhcPs -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnExportedParentChildMismatch] :: Name -> TyThing -> GreName -> [Name] -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnExportedParentChildMismatch] :: Name -> TyThing -> Name -> [Name] -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnIllegalRecordSyntax] :: !HsType GhcRn -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnIllegalRecordSyntax] :: Either (HsType GhcPs) (HsType GhcRn) -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnMissingSignature] :: MissingSignature -> Exported -> Bool -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnMissingSignature] :: MissingSignature -> Exported -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnOrphanInstance] :: ClsInst -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnOrphanInstance] :: Either ClsInst FamInst -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnPragmaWarning] :: OccName -> WarningTxt GhcRn -> ModuleName -> ModuleName -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnPragmaWarning] :: OccName -> WarningTxt GhcRn -> ModuleName -> Maybe ModuleName -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnTooManyBinders] :: !Kind -> ![LHsTyVarBndr () GhcRn] -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnTooManyBinders] :: !Kind -> ![LHsTyVarBndr (HsBndrVis GhcRn) GhcRn] -> TcRnMessage
- GHC.Tc.Errors.Types: [TcRnUnknownMessage] :: UnknownDiagnostic -> TcRnMessage
+ GHC.Tc.Errors.Types: [TcRnUnknownMessage] :: UnknownDiagnostic (DiagnosticOpts TcRnMessage) -> TcRnMessage
- GHC.Tc.Errors.Types: [UnexpectedStatement] :: Outputable (StmtLR GhcPs GhcPs body) => StmtLR GhcPs GhcPs body -> UnexpectedStatement
+ GHC.Tc.Errors.Types: [UnexpectedStatement] :: forall body. Outputable (StmtLR GhcPs GhcPs body) => StmtLR GhcPs GhcPs body -> UnexpectedStatement
- GHC.Tc.Gen.Annotation: annCtxt :: OutputableBndrId p => AnnDecl (GhcPass p) -> SDoc
+ GHC.Tc.Gen.Annotation: annCtxt :: forall (p :: Pass). OutputableBndrId p => AnnDecl (GhcPass p) -> SDoc
- GHC.Tc.Gen.Export: exports_from_avail :: Maybe (LocatedL [LIE GhcPs]) -> GlobalRdrEnv -> ImportAvails -> Module -> RnM (Maybe [(LIE GhcRn, Avails)], Avails)
+ GHC.Tc.Gen.Export: exports_from_avail :: Maybe (LocatedL [LIE GhcPs]) -> GlobalRdrEnv -> ImportAvails -> Module -> RnM (Maybe [(LIE GhcRn, Avails)], Avails, ExportWarnNames GhcRn)
- GHC.Tc.Gen.Foreign: isForeignExport :: forall name. UnXRec name => LForeignDecl name -> Bool
+ GHC.Tc.Gen.Foreign: isForeignExport :: UnXRec name => LForeignDecl name -> Bool
- GHC.Tc.Gen.Foreign: isForeignImport :: forall name. UnXRec name => LForeignDecl name -> Bool
+ GHC.Tc.Gen.Foreign: isForeignImport :: UnXRec name => LForeignDecl name -> Bool
- GHC.Tc.Gen.Head: [ValArg] :: LHsExpr (GhcPass (XPass p)) -> EValArg p
+ GHC.Tc.Gen.Head: [ValArg] :: forall (p :: TcPass). LHsExpr (GhcPass (XPass p)) -> EValArg p
- GHC.Tc.Gen.Head: countLeadingValArgs :: [HsExprArg id] -> Int
+ GHC.Tc.Gen.Head: countLeadingValArgs :: forall (id :: TcPass). [HsExprArg id] -> Int
- GHC.Tc.Gen.Head: countVisAndInvisValArgs :: [HsExprArg id] -> Arity
+ GHC.Tc.Gen.Head: countVisAndInvisValArgs :: forall (id :: TcPass). [HsExprArg id] -> Arity
- GHC.Tc.Gen.Head: isHsValArg :: HsExprArg id -> Bool
+ GHC.Tc.Gen.Head: isHsValArg :: forall (id :: TcPass). HsExprArg id -> Bool
- GHC.Tc.Gen.Head: isVisibleArg :: HsExprArg id -> Bool
+ GHC.Tc.Gen.Head: isVisibleArg :: forall (id :: TcPass). HsExprArg id -> Bool
- GHC.Tc.Gen.HsType: addTyConFlavCtxt :: Name -> TyConFlavour -> TcM a -> TcM a
+ GHC.Tc.Gen.HsType: addTyConFlavCtxt :: Name -> TyConFlavour tc -> TcM a -> TcM a
- GHC.Tc.Gen.HsType: bindExplicitTKBndrs_Q_Skol :: SkolemInfo -> ContextKind -> [LHsTyVarBndr () GhcRn] -> TcM a -> TcM ([TcTyVar], a)
+ GHC.Tc.Gen.HsType: bindExplicitTKBndrs_Q_Skol :: OutputableBndrFlag flag 'Renamed => SkolemInfo -> ContextKind -> [LHsTyVarBndr flag GhcRn] -> TcM a -> TcM ([VarBndr TyVar flag], a)
- GHC.Tc.Gen.HsType: bindExplicitTKBndrs_Q_Tv :: ContextKind -> [LHsTyVarBndr () GhcRn] -> TcM a -> TcM ([TcTyVar], a)
+ GHC.Tc.Gen.HsType: bindExplicitTKBndrs_Q_Tv :: OutputableBndrFlag flag 'Renamed => ContextKind -> [LHsTyVarBndr flag GhcRn] -> TcM a -> TcM ([VarBndr TyVar flag], a)
- GHC.Tc.Gen.HsType: etaExpandAlgTyCon :: TyConFlavour -> SkolemInfo -> [TcTyConBinder] -> Kind -> TcM ([TcTyConBinder], Kind)
+ GHC.Tc.Gen.HsType: etaExpandAlgTyCon :: TyConFlavour tc -> SkolemInfo -> [TcTyConBinder] -> Kind -> TcM ([TcTyConBinder], Kind)
- GHC.Tc.Gen.HsType: kcDeclHeader :: InitialKindStrategy -> Name -> TyConFlavour -> LHsQTyVars GhcRn -> TcM ContextKind -> TcM TcTyCon
+ GHC.Tc.Gen.HsType: kcDeclHeader :: InitialKindStrategy -> Name -> TyConFlavour TyCon -> LHsQTyVars GhcRn -> TcM ContextKind -> TcM TcTyCon
- GHC.Tc.Gen.Match: MC :: HsMatchContext GhcTc -> (LocatedA (body GhcRn) -> ExpRhoType -> TcM (LocatedA (body GhcTc))) -> TcMatchCtxt body
+ GHC.Tc.Gen.Match: MC :: HsMatchContext GhcTc -> (LocatedA (body GhcRn) -> ExpRhoType -> TcM (LocatedA (body GhcTc))) -> TcMatchCtxt (body :: Type -> Type)
- GHC.Tc.Gen.Match: [mc_body] :: TcMatchCtxt body -> LocatedA (body GhcRn) -> ExpRhoType -> TcM (LocatedA (body GhcTc))
+ GHC.Tc.Gen.Match: [mc_body] :: TcMatchCtxt (body :: Type -> Type) -> LocatedA (body GhcRn) -> ExpRhoType -> TcM (LocatedA (body GhcTc))
- GHC.Tc.Gen.Match: [mc_what] :: TcMatchCtxt body -> HsMatchContext GhcTc
+ GHC.Tc.Gen.Match: [mc_what] :: TcMatchCtxt (body :: Type -> Type) -> HsMatchContext GhcTc
- GHC.Tc.Gen.Match: data TcMatchCtxt body
+ GHC.Tc.Gen.Match: data TcMatchCtxt (body :: Type -> Type)
- GHC.Tc.Gen.Match: tcStmts :: AnnoBody body => HsStmtContext GhcTc -> TcStmtChecker body rho_type -> [LStmt GhcRn (LocatedA (body GhcRn))] -> rho_type -> TcM [LStmt GhcTc (LocatedA (body GhcTc))]
+ GHC.Tc.Gen.Match: tcStmts :: forall (body :: Type -> Type) rho_type. AnnoBody body => HsStmtContext GhcTc -> TcStmtChecker body rho_type -> [LStmt GhcRn (LocatedA (body GhcRn))] -> rho_type -> TcM [LStmt GhcTc (LocatedA (body GhcTc))]
- GHC.Tc.Gen.Match: tcStmtsAndThen :: AnnoBody body => HsStmtContext GhcTc -> TcStmtChecker body rho_type -> [LStmt GhcRn (LocatedA (body GhcRn))] -> rho_type -> (rho_type -> TcM thing) -> TcM ([LStmt GhcTc (LocatedA (body GhcTc))], thing)
+ GHC.Tc.Gen.Match: tcStmtsAndThen :: forall (body :: Type -> Type) rho_type thing. AnnoBody body => HsStmtContext GhcTc -> TcStmtChecker body rho_type -> [LStmt GhcRn (LocatedA (body GhcRn))] -> rho_type -> (rho_type -> TcM thing) -> TcM ([LStmt GhcTc (LocatedA (body GhcTc))], thing)
- GHC.Tc.Instance.Class: OneInst :: [TcPredType] -> ([EvExpr] -> EvTerm) -> InstanceWhat -> ClsInstResult
+ GHC.Tc.Instance.Class: OneInst :: [TcPredType] -> ([EvExpr] -> EvTerm) -> Canonical -> InstanceWhat -> ClsInstResult
- GHC.Tc.Instance.Family: reportInjectivityErrors :: DynFlags -> CoAxiom br -> CoAxBranch -> [Bool] -> TcM ()
+ GHC.Tc.Instance.Family: reportInjectivityErrors :: forall (br :: BranchFlag). DynFlags -> CoAxiom br -> CoAxBranch -> [Bool] -> TcM ()
- GHC.Tc.Instance.FunDeps: checkInstCoverage :: Bool -> Class -> [PredType] -> [Type] -> Validity
+ GHC.Tc.Instance.FunDeps: checkInstCoverage :: Bool -> Class -> [PredType] -> [Type] -> Validity' CoverageProblem
- GHC.Tc.Module: checkBootDecl :: Bool -> TyThing -> TyThing -> Maybe SDoc
+ GHC.Tc.Module: checkBootDecl :: HsBootOrSig -> TyThing -> TyThing -> BootErrsM BootMismatchWhat
- GHC.Tc.Module: checkBootDeclM :: Bool -> TyThing -> TyThing -> TcM ()
+ GHC.Tc.Module: checkBootDeclM :: HsBootOrSig -> TyThing -> TyThing -> TcM ()
- GHC.Tc.Module: mergeSignatures :: HsParsedModule -> TcGblEnv -> ModIface -> TcRn TcGblEnv
+ GHC.Tc.Module: mergeSignatures :: HasDebugCallStack => HsParsedModule -> TcGblEnv -> ModIface -> TcRn TcGblEnv
- GHC.Tc.Module: type RenamedStuff = (Maybe (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)], Maybe (LHsDoc GhcRn)))
+ GHC.Tc.Module: type RenamedStuff = Maybe (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)], Maybe LHsDoc GhcRn)
- GHC.Tc.Plugin: NotFound :: [FilePath] -> Maybe Unit -> [Unit] -> [Unit] -> [UnusableUnit] -> [ModuleSuggestion] -> FindResult
+ GHC.Tc.Plugin: NotFound :: [FilePath] -> Maybe Unit -> [Unit] -> [Unit] -> [(Unit, UnusableUnitReason)] -> [ModuleSuggestion] -> FindResult
- GHC.Tc.Plugin: [fr_unusables] :: FindResult -> [UnusableUnit]
+ GHC.Tc.Plugin: [fr_unusables] :: FindResult -> [(Unit, UnusableUnitReason)]
- GHC.Tc.Solver.InertSet: IC :: InertEqs -> FunEqMap EqualCtList -> DictMap Ct -> [QCInst] -> DictMap Ct -> Cts -> TcLevel -> Bool -> InertCans
+ GHC.Tc.Solver.InertSet: IC :: InertEqs -> InertFunEqs -> DictMap DictCt -> [QCInst] -> DictMap DictCt -> InertIrreds -> TcLevel -> Bool -> InertCans
- GHC.Tc.Solver.InertSet: IS :: InertCans -> CycleBreakerVarStack -> FunEqMap Reduction -> DictMap CtEvidence -> InertSet
+ GHC.Tc.Solver.InertSet: IS :: InertCans -> CycleBreakerVarStack -> FunEqMap Reduction -> DictMap DictCt -> InertSet
- GHC.Tc.Solver.InertSet: WL :: [Ct] -> [Ct] -> Bag Implication -> WorkList
+ GHC.Tc.Solver.InertSet: WL :: [Ct] -> [Ct] -> [Ct] -> Bag Implication -> WorkList
- GHC.Tc.Solver.InertSet: [inert_dicts] :: InertCans -> DictMap Ct
+ GHC.Tc.Solver.InertSet: [inert_dicts] :: InertCans -> DictMap DictCt
- GHC.Tc.Solver.InertSet: [inert_funeqs] :: InertCans -> FunEqMap EqualCtList
+ GHC.Tc.Solver.InertSet: [inert_funeqs] :: InertCans -> InertFunEqs
- GHC.Tc.Solver.InertSet: [inert_irreds] :: InertCans -> Cts
+ GHC.Tc.Solver.InertSet: [inert_irreds] :: InertCans -> InertIrreds
- GHC.Tc.Solver.InertSet: [inert_safehask] :: InertCans -> DictMap Ct
+ GHC.Tc.Solver.InertSet: [inert_safehask] :: InertCans -> DictMap DictCt
- GHC.Tc.Solver.InertSet: [inert_solved_dicts] :: InertSet -> DictMap CtEvidence
+ GHC.Tc.Solver.InertSet: [inert_solved_dicts] :: InertSet -> DictMap DictCt
- GHC.Tc.Solver.InertSet: delEq :: InertCans -> CanEqLHS -> TcType -> InertCans
+ GHC.Tc.Solver.InertSet: delEq :: EqCt -> InertCans -> InertCans
- GHC.Tc.Solver.InertSet: extendWorkListCts :: [Ct] -> WorkList -> WorkList
+ GHC.Tc.Solver.InertSet: extendWorkListCts :: Cts -> WorkList -> WorkList
- GHC.Tc.Solver.InertSet: extendWorkListEq :: Ct -> WorkList -> WorkList
+ GHC.Tc.Solver.InertSet: extendWorkListEq :: RewriterSet -> Ct -> WorkList -> WorkList
- GHC.Tc.Solver.InertSet: findEq :: InertCans -> CanEqLHS -> [Ct]
+ GHC.Tc.Solver.InertSet: findEq :: InertCans -> CanEqLHS -> [EqCt]
- GHC.Tc.Solver.InertSet: foldTyEqs :: (Ct -> b -> b) -> InertEqs -> b -> b
+ GHC.Tc.Solver.InertSet: foldTyEqs :: (EqCt -> b -> b) -> InertEqs -> b -> b
- GHC.Tc.Solver.InertSet: kickOutRewritableLHS :: CtFlavourRole -> CanEqLHS -> InertCans -> (WorkList, InertCans)
+ GHC.Tc.Solver.InertSet: kickOutRewritableLHS :: KickOutSpec -> CtFlavourRole -> InertCans -> (Cts, InertCans)
- GHC.Tc.Solver.InertSet: partitionFunEqs :: (Ct -> Bool) -> FunEqMap EqualCtList -> ([Ct], FunEqMap EqualCtList)
+ GHC.Tc.Solver.InertSet: partitionFunEqs :: (EqCt -> Bool) -> InertFunEqs -> ([EqCt], InertFunEqs)
- GHC.Tc.Solver.InertSet: partitionInertEqs :: (Ct -> Bool) -> InertEqs -> ([Ct], InertEqs)
+ GHC.Tc.Solver.InertSet: partitionInertEqs :: (EqCt -> Bool) -> InertEqs -> ([EqCt], InertEqs)
- GHC.Tc.Solver.InertSet: type CycleBreakerVarStack = -- | a stack of (CycleBreakerTv, original family applications) lists -- first element in the stack corresponds to current implication; -- later elements correspond to outer implications -- used to undo the cycle-breaking needed to handle -- Note [Type equality cycles] in GHC.Tc.Solver.Canonical -- Why store the outer implications? For the use in mightEqualLater (only) NonEmpty [(TcTyVar, TcType)]
+ GHC.Tc.Solver.InertSet: type CycleBreakerVarStack = NonEmpty Bag (TcTyVar, TcType)
- GHC.Tc.Solver.Monad: OneInst :: [TcPredType] -> ([EvExpr] -> EvTerm) -> InstanceWhat -> ClsInstResult
+ GHC.Tc.Solver.Monad: OneInst :: [TcPredType] -> ([EvExpr] -> EvTerm) -> Canonical -> InstanceWhat -> ClsInstResult
- GHC.Tc.Solver.Monad: QCI :: CtEvidence -> [TcTyVar] -> TcPredType -> Bool -> QCInst
+ GHC.Tc.Solver.Monad: QCI :: CtEvidence -> [TcTyVar] -> TcPredType -> ExpansionFuel -> QCInst
- GHC.Tc.Solver.Monad: [qci_pend_sc] :: QCInst -> Bool
+ GHC.Tc.Solver.Monad: [qci_pend_sc] :: QCInst -> ExpansionFuel
- GHC.Tc.Solver.Monad: addInertSafehask :: InertCans -> Ct -> InertCans
+ GHC.Tc.Solver.Monad: addInertSafehask :: InertCans -> DictCt -> InertCans
- GHC.Tc.Solver.Monad: emitWork :: [Ct] -> TcS ()
+ GHC.Tc.Solver.Monad: emitWork :: Cts -> TcS ()
- GHC.Tc.Solver.Monad: foldIrreds :: (Ct -> b -> b) -> Cts -> b -> b
+ GHC.Tc.Solver.Monad: foldIrreds :: (IrredCt -> b -> b) -> InertIrreds -> b -> b
- GHC.Tc.Solver.Monad: getHasGivenEqs :: TcLevel -> TcS (HasGivenEqs, Cts)
+ GHC.Tc.Solver.Monad: getHasGivenEqs :: TcLevel -> TcS (HasGivenEqs, InertIrreds)
- GHC.Tc.Solver.Monad: getSafeOverlapFailures :: TcS Cts
+ GHC.Tc.Solver.Monad: getSafeOverlapFailures :: TcS (Bag DictCt)
- GHC.Tc.Solver.Monad: getSolvedDicts :: TcS (DictMap CtEvidence)
+ GHC.Tc.Solver.Monad: getSolvedDicts :: TcS (DictMap DictCt)
- GHC.Tc.Solver.Monad: insertSafeOverlapFailureTcS :: InstanceWhat -> Ct -> TcS ()
+ GHC.Tc.Solver.Monad: insertSafeOverlapFailureTcS :: InstanceWhat -> DictCt -> TcS ()
- GHC.Tc.Solver.Monad: kickOutAfterUnification :: TcTyVar -> TcS Int
+ GHC.Tc.Solver.Monad: kickOutAfterUnification :: [TcTyVar] -> TcS ()
- GHC.Tc.Solver.Monad: lookupInertDict :: InertCans -> CtLoc -> Class -> [Type] -> Maybe Ct
+ GHC.Tc.Solver.Monad: lookupInertDict :: InertCans -> CtLoc -> Class -> [Type] -> Maybe DictCt
- GHC.Tc.Solver.Monad: setEvBindIfWanted :: CtEvidence -> EvTerm -> TcS ()
+ GHC.Tc.Solver.Monad: setEvBindIfWanted :: CtEvidence -> Canonical -> EvTerm -> TcS ()
- GHC.Tc.Solver.Monad: setSolvedDicts :: DictMap CtEvidence -> TcS ()
+ GHC.Tc.Solver.Monad: setSolvedDicts :: DictMap DictCt -> TcS ()
- GHC.Tc.Solver.Monad: setWantedEvTerm :: TcEvDest -> EvTerm -> TcS ()
+ GHC.Tc.Solver.Monad: setWantedEvTerm :: TcEvDest -> Canonical -> EvTerm -> TcS ()
- GHC.Tc.Solver.Monad: updInertSafehask :: (DictMap Ct -> DictMap Ct) -> TcS ()
+ GHC.Tc.Solver.Monad: updInertSafehask :: (DictMap DictCt -> DictMap DictCt) -> TcS ()
- GHC.Tc.Solver.Types: addToEqualCtList :: Ct -> EqualCtList -> EqualCtList
+ GHC.Tc.Solver.Types: addToEqualCtList :: EqCt -> EqualCtList -> EqualCtList
- GHC.Tc.Solver.Types: alterTcApp :: forall a. TcAppMap a -> TyCon -> [Type] -> XT a -> TcAppMap a
+ GHC.Tc.Solver.Types: alterTcApp :: TcAppMap a -> TyCon -> [Type] -> XT a -> TcAppMap a
- GHC.Tc.Solver.Types: filterEqualCtList :: (Ct -> Bool) -> EqualCtList -> Maybe EqualCtList
+ GHC.Tc.Solver.Types: filterEqualCtList :: (EqCt -> Bool) -> EqualCtList -> Maybe EqualCtList
- GHC.Tc.Solver.Types: filterTcAppMap :: forall a. (a -> Bool) -> TcAppMap a -> TcAppMap a
+ GHC.Tc.Solver.Types: filterTcAppMap :: (a -> Bool) -> TcAppMap a -> TcAppMap a
- GHC.Tc.Solver.Types: type EqualCtList = [Ct]
+ GHC.Tc.Solver.Types: type EqualCtList = [EqCt]
- GHC.Tc.Solver.Types: type TcAppMap a = DTyConEnv (ListMap LooseTypeMap a)
+ GHC.Tc.Solver.Types: type TcAppMap a = DTyConEnv ListMap LooseTypeMap a
- GHC.Tc.TyCl.Build: type MethInfo = (Name, Type, Maybe (DefMethSpec (SrcSpan, Type)))
+ GHC.Tc.TyCl.Build: type MethInfo = (Name, Type, Maybe DefMethSpec (SrcSpan, Type))
- GHC.Tc.TyCl.Class: type HsSigFun = Name -> Maybe (LHsSigType GhcRn)
+ GHC.Tc.TyCl.Class: type HsSigFun = Name -> Maybe LHsSigType GhcRn
- GHC.Tc.TyCl.Utils: checkClassCycles :: Class -> Maybe SDoc
+ GHC.Tc.TyCl.Utils: checkClassCycles :: Class -> Maybe SuperclassCycle
- GHC.Tc.Types: ATcId :: TcId -> IdBindingInfo -> TcTyThing
+ GHC.Tc.Types: ATcId :: Id -> IdBindingInfo -> TcTyThing
- GHC.Tc.Types: ConstrainedDataConPE :: PredType -> PromotionErr
+ GHC.Tc.Types: ConstrainedDataConPE :: ThetaType -> PromotionErr
- GHC.Tc.Types: SelfBoot :: ModDetails -> NameSet -> SelfBootInfo
+ GHC.Tc.Types: SelfBoot :: ModDetails -> SelfBootInfo
- GHC.Tc.Types: TcGblEnv :: Module -> Module -> HscSource -> GlobalRdrEnv -> Maybe [Type] -> FixityEnv -> RecFieldEnv -> TypeEnv -> KnotVars (IORef TypeEnv) -> !InstEnv -> !FamInstEnv -> AnnEnv -> [AvailInfo] -> ImportAvails -> DefUses -> TcRef [GlobalRdrElt] -> TcRef NameSet -> TcRef Bool -> TcRef Bool -> TcRef ([Linkable], PkgsLoaded) -> TcRef OccSet -> [(Module, Fingerprint)] -> Maybe [(LIE GhcRn, Avails)] -> [LImportDecl GhcRn] -> Maybe (HsGroup GhcRn) -> TcRef [FilePath] -> TcRef [LHsDecl GhcPs] -> TcRef [(ForeignSrcLang, FilePath)] -> TcRef NameSet -> TcRef [(TcLclEnv, ThModFinalizers)] -> TcRef [String] -> TcRef (Map TypeRep Dynamic) -> TcRef (Maybe (ForeignRef (IORef QState))) -> TcRef THDocs -> Bag EvBind -> Maybe Id -> LHsBinds GhcTc -> NameSet -> [LTcSpecPrag] -> Warnings GhcRn -> [Annotation] -> [TyCon] -> NameSet -> [ClsInst] -> [FamInst] -> [LRuleDecl GhcTc] -> [LForeignDecl GhcTc] -> [PatSyn] -> Maybe (LHsDoc GhcRn) -> !AnyHpcUsage -> SelfBootInfo -> Maybe Name -> TcRef Bool -> TcRef (Messages TcRnMessage) -> [TcPluginSolver] -> UniqFM TyCon [TcPluginRewriter] -> [FillDefaulting] -> [HoleFitPlugin] -> RealSrcSpan -> TcRef WantedConstraints -> !CompleteMatches -> TcRef CostCentreState -> TcRef (ModuleEnv Int) -> TcGblEnv
+ GHC.Tc.Types: TcGblEnv :: Module -> Module -> HscSource -> GlobalRdrEnv -> Maybe [Type] -> FixityEnv -> TypeEnv -> KnotVars (IORef TypeEnv) -> !InstEnv -> !FamInstEnv -> AnnEnv -> [AvailInfo] -> ImportAvails -> DefUses -> TcRef [GlobalRdrElt] -> TcRef NameSet -> TcRef Bool -> TcRef Bool -> TcRef ([Linkable], PkgsLoaded) -> TcRef OccSet -> [(Module, Fingerprint)] -> Maybe [(LIE GhcRn, Avails)] -> [LImportDecl GhcRn] -> Maybe (HsGroup GhcRn) -> TcRef [FilePath] -> TcRef [LHsDecl GhcPs] -> TcRef [(ForeignSrcLang, FilePath)] -> TcRef NameSet -> TcRef [(TcLclEnv, ThModFinalizers)] -> TcRef [String] -> TcRef (Map TypeRep Dynamic) -> TcRef (Maybe (ForeignRef (IORef QState))) -> TcRef THDocs -> Bag EvBind -> Maybe Id -> LHsBinds GhcTc -> NameSet -> [LTcSpecPrag] -> Warnings GhcRn -> [Annotation] -> [TyCon] -> NameSet -> [ClsInst] -> [FamInst] -> [LRuleDecl GhcTc] -> [LForeignDecl GhcTc] -> [PatSyn] -> Maybe (LHsDoc GhcRn) -> !AnyHpcUsage -> SelfBootInfo -> Maybe Name -> TcRef Bool -> TcRef (Messages TcRnMessage) -> [TcPluginSolver] -> UniqFM TyCon [TcPluginRewriter] -> [FillDefaulting] -> [HoleFitPlugin] -> RealSrcSpan -> TcRef WantedConstraints -> !CompleteMatches -> TcRef CostCentreState -> TcRef (ModuleEnv Int) -> TcGblEnv
- GHC.Tc.Types: TcLclEnv :: RealSrcSpan -> [ErrCtxt] -> Bool -> TcLevel -> ThStage -> ThBindEnv -> ArrowCtxt -> LocalRdrEnv -> TcTypeEnv -> TcRef UsageEnv -> TcBinderStack -> TcRef WantedConstraints -> TcRef (Messages TcRnMessage) -> TcLclEnv
+ GHC.Tc.Types: TcLclEnv :: !TcLclCtxt -> TcRef UsageEnv -> TcRef WantedConstraints -> TcRef (Messages TcRnMessage) -> TcLclEnv
- GHC.Tc.Types: [tcl_arrow_ctxt] :: TcLclEnv -> ArrowCtxt
+ GHC.Tc.Types: [tcl_arrow_ctxt] :: TcLclCtxt -> ArrowCtxt
- GHC.Tc.Types: [tcl_bndrs] :: TcLclEnv -> TcBinderStack
+ GHC.Tc.Types: [tcl_bndrs] :: TcLclCtxt -> TcBinderStack
- GHC.Tc.Types: [tcl_ctxt] :: TcLclEnv -> [ErrCtxt]
+ GHC.Tc.Types: [tcl_ctxt] :: TcLclCtxt -> [ErrCtxt]
- GHC.Tc.Types: [tcl_env] :: TcLclEnv -> TcTypeEnv
+ GHC.Tc.Types: [tcl_env] :: TcLclCtxt -> TcTypeEnv
- GHC.Tc.Types: [tcl_in_gen_code] :: TcLclEnv -> Bool
+ GHC.Tc.Types: [tcl_in_gen_code] :: TcLclCtxt -> Bool
- GHC.Tc.Types: [tcl_loc] :: TcLclEnv -> RealSrcSpan
+ GHC.Tc.Types: [tcl_loc] :: TcLclCtxt -> RealSrcSpan
- GHC.Tc.Types: [tcl_rdr] :: TcLclEnv -> LocalRdrEnv
+ GHC.Tc.Types: [tcl_rdr] :: TcLclCtxt -> LocalRdrEnv
- GHC.Tc.Types: [tcl_tclvl] :: TcLclEnv -> TcLevel
+ GHC.Tc.Types: [tcl_tclvl] :: TcLclCtxt -> TcLevel
- GHC.Tc.Types: [tcl_th_bndrs] :: TcLclEnv -> ThBindEnv
+ GHC.Tc.Types: [tcl_th_bndrs] :: TcLclCtxt -> ThBindEnv
- GHC.Tc.Types: [tcl_th_ctxt] :: TcLclEnv -> ThStage
+ GHC.Tc.Types: [tcl_th_ctxt] :: TcLclCtxt -> ThStage
- GHC.Tc.Types: [tct_id] :: TcTyThing -> TcId
+ GHC.Tc.Types: [tct_id] :: TcTyThing -> Id
- GHC.Tc.Types: data () => ForeignSrcLang
+ GHC.Tc.Types: data ForeignSrcLang
- GHC.Tc.Types: setLclEnvLoc :: TcLclEnv -> RealSrcSpan -> TcLclEnv
+ GHC.Tc.Types: setLclEnvLoc :: RealSrcSpan -> TcLclEnv -> TcLclEnv
- GHC.Tc.Types: setLclEnvTcLevel :: TcLclEnv -> TcLevel -> TcLclEnv
+ GHC.Tc.Types: setLclEnvTcLevel :: TcLevel -> TcLclEnv -> TcLclEnv
- GHC.Tc.Types: type ErrCtxt = (Bool, TidyEnv -> TcM (TidyEnv, SDoc))
+ GHC.Tc.Types: type ErrCtxt = (Bool, TidyEnv -> ZonkM (TidyEnv, SDoc))
- GHC.Tc.Types: type FillDefaulting = WantedConstraints -> TcPluginM [DefaultingProposal]
+ GHC.Tc.Types: type FillDefaulting = WantedConstraints -> TcPluginM DefaultingPluginResult
- GHC.Tc.Types: type RoleAnnotEnv = NameEnv (LRoleAnnotDecl GhcRn)
+ GHC.Tc.Types: type RoleAnnotEnv = NameEnv LRoleAnnotDecl GhcRn
- GHC.Tc.Types: type THDocs = Map DocLoc (HsDoc GhcRn)
+ GHC.Tc.Types: type THDocs = Map DocLoc HsDoc GhcRn
- GHC.Tc.Types: type TcPluginRewriter = -- | Rewriter environment RewriteEnv -> -- | Givens [Ct] -> -- | type family arguments [TcType] -> TcPluginM TcPluginRewriteResult
+ GHC.Tc.Types: type TcPluginRewriter = RewriteEnv -> [Ct] -> [TcType] -> TcPluginM TcPluginRewriteResult
- GHC.Tc.Types: type TcPluginSolver = EvBindsVar -> -- | Givens [Ct] -> -- | Wanteds [Ct] -> TcPluginM TcPluginSolveResult
+ GHC.Tc.Types: type TcPluginSolver = EvBindsVar -> [Ct] -> [Ct] -> TcPluginM TcPluginSolveResult
- GHC.Tc.Types: type TcRnIf a b = IOEnv (Env a b)
+ GHC.Tc.Types: type TcRnIf a b = IOEnv Env a b
- GHC.Tc.Types.Constraint: CDictCan :: CtEvidence -> Class -> [Xi] -> Bool -> Ct
+ GHC.Tc.Types.Constraint: CDictCan :: DictCt -> Ct
- GHC.Tc.Types.Constraint: CEqCan :: CtEvidence -> CanEqLHS -> Xi -> EqRel -> Ct
+ GHC.Tc.Types.Constraint: CEqCan :: EqCt -> Ct
- GHC.Tc.Types.Constraint: CIrredCan :: CtEvidence -> CtIrredReason -> Ct
+ GHC.Tc.Types.Constraint: CIrredCan :: IrredCt -> Ct
- GHC.Tc.Types.Constraint: CtLoc :: CtOrigin -> TcLclEnv -> Maybe TypeOrKind -> !SubGoalDepth -> CtLoc
+ GHC.Tc.Types.Constraint: CtLoc :: CtOrigin -> CtLocEnv -> Maybe TypeOrKind -> !SubGoalDepth -> CtLoc
- GHC.Tc.Types.Constraint: Implic :: TcLevel -> SkolemInfoAnon -> [TcTyVar] -> [EvVar] -> HasGivenEqs -> Bool -> TcLclEnv -> WantedConstraints -> EvBindsVar -> VarSet -> VarSet -> ImplicStatus -> Implication
+ GHC.Tc.Types.Constraint: Implic :: TcLevel -> SkolemInfoAnon -> [TcTyVar] -> [EvVar] -> HasGivenEqs -> Bool -> !CtLocEnv -> WantedConstraints -> EvBindsVar -> VarSet -> VarSet -> ImplicStatus -> Implication
- GHC.Tc.Types.Constraint: QCI :: CtEvidence -> [TcTyVar] -> TcPredType -> Bool -> QCInst
+ GHC.Tc.Types.Constraint: QCI :: CtEvidence -> [TcTyVar] -> TcPredType -> ExpansionFuel -> QCInst
- GHC.Tc.Types.Constraint: [ctl_env] :: CtLoc -> TcLclEnv
+ GHC.Tc.Types.Constraint: [ctl_env] :: CtLoc -> CtLocEnv
- GHC.Tc.Types.Constraint: [ic_env] :: Implication -> TcLclEnv
+ GHC.Tc.Types.Constraint: [ic_env] :: Implication -> !CtLocEnv
- GHC.Tc.Types.Constraint: [qci_pend_sc] :: QCInst -> Bool
+ GHC.Tc.Types.Constraint: [qci_pend_sc] :: QCInst -> ExpansionFuel
- GHC.Tc.Types.Constraint: addInsols :: WantedConstraints -> Bag Ct -> WantedConstraints
+ GHC.Tc.Types.Constraint: addInsols :: WantedConstraints -> Bag IrredCt -> WantedConstraints
- GHC.Tc.Types.Constraint: ctLocEnv :: CtLoc -> TcLclEnv
+ GHC.Tc.Types.Constraint: ctLocEnv :: CtLoc -> CtLocEnv
- GHC.Tc.Types.Constraint: getUserTypeErrorMsg :: PredType -> Maybe Type
+ GHC.Tc.Types.Constraint: getUserTypeErrorMsg :: PredType -> Maybe ErrorMsgType
- GHC.Tc.Types.Constraint: implicationPrototype :: Implication
+ GHC.Tc.Types.Constraint: implicationPrototype :: CtLocEnv -> Implication
- GHC.Tc.Types.Constraint: mkGivenLoc :: TcLevel -> SkolemInfoAnon -> TcLclEnv -> CtLoc
+ GHC.Tc.Types.Constraint: mkGivenLoc :: TcLevel -> SkolemInfoAnon -> CtLocEnv -> CtLoc
- GHC.Tc.Types.Constraint: setCtLocEnv :: CtLoc -> TcLclEnv -> CtLoc
+ GHC.Tc.Types.Constraint: setCtLocEnv :: CtLoc -> CtLocEnv -> CtLoc
- GHC.Tc.Types.Constraint: subGoalDepthExceeded :: DynFlags -> SubGoalDepth -> Bool
+ GHC.Tc.Types.Constraint: subGoalDepthExceeded :: IntWithInf -> SubGoalDepth -> Bool
- GHC.Tc.Types.Evidence: EvBind :: EvVar -> EvTerm -> Bool -> EvBind
+ GHC.Tc.Types.Evidence: EvBind :: EvVar -> EvTerm -> EvBindInfo -> EvBind
- GHC.Tc.Types.Evidence: mkWantedEvBind :: EvVar -> EvTerm -> EvBind
+ GHC.Tc.Types.Evidence: mkWantedEvBind :: EvVar -> Canonical -> EvTerm -> EvBind
- GHC.Tc.Types.Origin: TyConSkol :: TyConFlavour -> Name -> SkolemInfoAnon
+ GHC.Tc.Types.Origin: TyConSkol :: TyConFlavour TyCon -> Name -> SkolemInfoAnon
- GHC.Tc.Utils.Backpack: mergeSignatures :: HsParsedModule -> TcGblEnv -> ModIface -> TcRn TcGblEnv
+ GHC.Tc.Utils.Backpack: mergeSignatures :: HasDebugCallStack => HsParsedModule -> TcGblEnv -> ModIface -> TcRn TcGblEnv
- GHC.Tc.Utils.Env: ATcId :: TcId -> IdBindingInfo -> TcTyThing
+ GHC.Tc.Utils.Env: ATcId :: Id -> IdBindingInfo -> TcTyThing
- GHC.Tc.Utils.Env: [tct_id] :: TcTyThing -> TcId
+ GHC.Tc.Utils.Env: [tct_id] :: TcTyThing -> Id
- GHC.Tc.Utils.Env: checkWellStaged :: SDoc -> ThLevel -> ThLevel -> TcM ()
+ GHC.Tc.Utils.Env: checkWellStaged :: StageCheckReason -> ThLevel -> ThLevel -> TcM ()
- GHC.Tc.Utils.Env: lookupGlobal_maybe :: HscEnv -> Name -> IO (MaybeErr SDoc TyThing)
+ GHC.Tc.Utils.Env: lookupGlobal_maybe :: HscEnv -> Name -> IO (MaybeErr (Either Name IfaceMessage) TyThing)
- GHC.Tc.Utils.Env: pprInstInfoDetails :: OutputableBndrId a => InstInfo (GhcPass a) -> SDoc
+ GHC.Tc.Utils.Env: pprInstInfoDetails :: forall (a :: Pass). OutputableBndrId a => InstInfo (GhcPass a) -> SDoc
- GHC.Tc.Utils.Env: tcExtendLocalTypeEnv :: TcLclEnv -> [(Name, TcTyThing)] -> TcLclEnv
+ GHC.Tc.Utils.Env: tcExtendLocalTypeEnv :: [(Name, TcTyThing)] -> TcLclCtxt -> TcLclCtxt
- GHC.Tc.Utils.Env: wrongThingErr :: String -> TcTyThing -> Name -> TcM a
+ GHC.Tc.Utils.Env: wrongThingErr :: WrongThingSort -> TcTyThing -> Name -> TcM a
- GHC.Tc.Utils.Instantiate: tcInstInvisibleTyBinder :: Subst -> PiTyVarBinder -> TcM (Subst, TcType)
+ GHC.Tc.Utils.Instantiate: tcInstInvisibleTyBinder :: Subst -> TyVar -> TcM (Subst, TcType)
- GHC.Tc.Utils.Monad: addErrCtxtM :: (TidyEnv -> TcM (TidyEnv, SDoc)) -> TcM a -> TcM a
+ GHC.Tc.Utils.Monad: addErrCtxtM :: (TidyEnv -> ZonkM (TidyEnv, SDoc)) -> TcM a -> TcM a
- GHC.Tc.Utils.Monad: addLandmarkErrCtxtM :: (TidyEnv -> TcM (TidyEnv, SDoc)) -> TcM a -> TcM a
+ GHC.Tc.Utils.Monad: addLandmarkErrCtxtM :: (TidyEnv -> ZonkM (TidyEnv, SDoc)) -> TcM a -> TcM a
- GHC.Tc.Utils.Monad: newTcRef :: a -> TcRnIf gbl lcl (TcRef a)
+ GHC.Tc.Utils.Monad: newTcRef :: MonadIO m => a -> m (TcRef a)
- GHC.Tc.Utils.Monad: readTcRef :: TcRef a -> TcRnIf gbl lcl a
+ GHC.Tc.Utils.Monad: readTcRef :: MonadIO m => TcRef a -> m a
- GHC.Tc.Utils.Monad: updTcRef :: TcRef a -> (a -> a) -> TcRnIf gbl lcl ()
+ GHC.Tc.Utils.Monad: updTcRef :: MonadIO m => TcRef a -> (a -> a) -> m ()
- GHC.Tc.Utils.Monad: writeTcRef :: TcRef a -> a -> TcRnIf gbl lcl ()
+ GHC.Tc.Utils.Monad: writeTcRef :: MonadIO m => TcRef a -> a -> m ()
- GHC.Tc.Utils.TcMType: checkCoercionHole :: CoVar -> Coercion -> TcM Coercion
+ GHC.Tc.Utils.TcMType: checkCoercionHole :: CoVar -> Coercion -> ZonkM Coercion
- GHC.Tc.Utils.TcMType: doNotQuantifyTyVars :: CandidatesQTvs -> (TidyEnv -> TcM (TidyEnv, SDoc)) -> TcM ()
+ GHC.Tc.Utils.TcMType: doNotQuantifyTyVars :: CandidatesQTvs -> (TidyEnv -> ZonkM (TidyEnv, UninferrableTyVarCtx)) -> TcM ()
- GHC.Tc.Utils.TcMType: newCoercionHole :: TcPredType -> TcM CoercionHole
+ GHC.Tc.Utils.TcMType: newCoercionHole :: CtLoc -> TcPredType -> TcM CoercionHole
- GHC.Tc.Utils.TcMType: newConcreteTyVar :: HasDebugCallStack => ConcreteTvOrigin -> TcKind -> TcM TcTyVar
+ GHC.Tc.Utils.TcMType: newConcreteTyVar :: HasDebugCallStack => ConcreteTvOrigin -> FastString -> TcKind -> TcM TcTyVar
- GHC.Tc.Utils.TcMType: readExpType :: ExpType -> TcM TcType
+ GHC.Tc.Utils.TcMType: readExpType :: MonadIO m => ExpType -> m TcType
- GHC.Tc.Utils.TcMType: readExpType_maybe :: ExpType -> TcM (Maybe TcType)
+ GHC.Tc.Utils.TcMType: readExpType_maybe :: MonadIO m => ExpType -> m (Maybe TcType)
- GHC.Tc.Utils.TcMType: readMetaTyVar :: TyVar -> TcM MetaDetails
+ GHC.Tc.Utils.TcMType: readMetaTyVar :: MonadIO m => TyVar -> m MetaDetails
- GHC.Tc.Utils.TcMType: readScaledExpType :: Scaled ExpType -> TcM (Scaled Type)
+ GHC.Tc.Utils.TcMType: readScaledExpType :: MonadIO m => Scaled ExpType -> m (Scaled Type)
- GHC.Tc.Utils.TcMType: skolemiseQuantifiedTyVar :: SkolemInfo -> TcTyVar -> TcM TcTyVar
+ GHC.Tc.Utils.TcMType: skolemiseQuantifiedTyVar :: SkolemInfo -> TcTyVar -> ZonkM TcTyVar
- GHC.Tc.Utils.TcMType: writeMetaTyVar :: HasDebugCallStack => TcTyVar -> TcType -> TcM ()
+ GHC.Tc.Utils.TcMType: writeMetaTyVar :: HasDebugCallStack => TcTyVar -> TcType -> ZonkM ()
- GHC.Tc.Utils.TcMType: writeMetaTyVarRef :: HasDebugCallStack => TcTyVar -> TcRef MetaDetails -> TcType -> TcM ()
+ GHC.Tc.Utils.TcMType: writeMetaTyVarRef :: HasDebugCallStack => TcTyVar -> TcRef MetaDetails -> TcType -> ZonkM ()
- GHC.Tc.Utils.TcMType: zonkAndSkolemise :: SkolemInfo -> TcTyCoVar -> TcM TcTyCoVar
+ GHC.Tc.Utils.TcMType: zonkAndSkolemise :: SkolemInfo -> TcTyCoVar -> ZonkM TcTyCoVar
- GHC.Tc.Utils.TcType: ltPatersonSize :: PatersonSize -> PatersonSize -> Maybe PatersonSizeFailure
+ GHC.Tc.Utils.TcType: ltPatersonSize :: PatersonSize -> PatersonSize -> Maybe PatersonCondFailure
- GHC.Tc.Utils.TcType: mkMinimalBySCs :: forall a. (a -> PredType) -> [a] -> [a]
+ GHC.Tc.Utils.TcType: mkMinimalBySCs :: (a -> PredType) -> [a] -> [a]
- GHC.Tc.Utils.Unify: matchExpectedFunTys :: forall a. ExpectedFunTyOrigin -> UserTypeCtxt -> Arity -> ExpRhoType -> ([Scaled ExpSigmaTypeFRR] -> ExpRhoType -> TcM a) -> TcM (HsWrapper, a)
+ GHC.Tc.Utils.Unify: matchExpectedFunTys :: ExpectedFunTyOrigin -> UserTypeCtxt -> Arity -> ExpRhoType -> ([Scaled ExpSigmaTypeFRR] -> ExpRhoType -> TcM a) -> TcM (HsWrapper, a)
- GHC.Tc.Utils.Unify: uType :: TypeOrKind -> CtOrigin -> TcType -> TcType -> TcM CoercionN
+ GHC.Tc.Utils.Unify: uType :: UnifyEnv -> TcType -> TcType -> TcM CoercionN
- GHC.Types.Annotations: type AnnPayload = -- | The "payload" of an annotation -- allows recovery of its value at a given type, -- and can be persisted to an interface file Serialized
+ GHC.Types.Annotations: type AnnPayload = Serialized
- GHC.Types.Avail: Avail :: GreName -> AvailInfo
+ GHC.Types.Avail: Avail :: Name -> AvailInfo
- GHC.Types.Avail: AvailTC :: Name -> [GreName] -> AvailInfo
+ GHC.Types.Avail: AvailTC :: Name -> [Name] -> AvailInfo
- GHC.Types.Basic: Generated :: Origin
+ GHC.Types.Basic: Generated :: DoPmc -> Origin
- GHC.Types.Basic: data () => ForeignSrcLang
+ GHC.Types.Basic: data ForeignSrcLang
- GHC.Types.Basic: data () => PromotionFlag
+ GHC.Types.Basic: data PromotionFlag
- GHC.Types.Error: ImportSuggestion :: ImportSuggestion -> GhcHint
+ GHC.Types.Error: ImportSuggestion :: OccName -> ImportSuggestion -> GhcHint
- GHC.Types.Error: MCDiagnostic :: Severity -> DiagnosticReason -> Maybe DiagnosticCode -> MessageClass
+ GHC.Types.Error: MCDiagnostic :: Severity -> ResolvedDiagnosticReason -> Maybe DiagnosticCode -> MessageClass
- GHC.Types.Error: MsgEnvelope :: SrcSpan -> NamePprCtx -> e -> Severity -> MsgEnvelope e
+ GHC.Types.Error: MsgEnvelope :: SrcSpan -> NamePprCtx -> e -> Severity -> ResolvedDiagnosticReason -> MsgEnvelope e
- GHC.Types.Error: [UnknownDiagnostic] :: (DiagnosticOpts a ~ NoDiagnosticOpts, Diagnostic a, Typeable a) => a -> UnknownDiagnostic
+ GHC.Types.Error: [UnknownDiagnostic] :: forall a opts. (Diagnostic a, Typeable a) => (opts -> DiagnosticOpts a) -> a -> UnknownDiagnostic opts
- GHC.Types.Error: class Diagnostic a where {
+ GHC.Types.Error: class HasDefaultDiagnosticOpts DiagnosticOpts a => Diagnostic a where {
- GHC.Types.Error: data UnknownDiagnostic
+ GHC.Types.Error: data UnknownDiagnostic opts
- GHC.Types.Error: defaultDiagnosticOpts :: Diagnostic a => DiagnosticOpts a
+ GHC.Types.Error: defaultDiagnosticOpts :: HasDefaultDiagnosticOpts (DiagnosticOpts opts) => DiagnosticOpts opts
- GHC.Types.FieldLabel: FieldLabel :: FieldLabelString -> DuplicateRecordFields -> FieldSelectors -> Name -> FieldLabel
+ GHC.Types.FieldLabel: FieldLabel :: DuplicateRecordFields -> FieldSelectors -> Name -> FieldLabel
- GHC.Types.Hint: CouldImportFrom :: NonEmpty (Module, ImportedModsVal) -> OccName -> ImportSuggestion
+ GHC.Types.Hint: CouldImportFrom :: NonEmpty (Module, ImportedModsVal) -> ImportSuggestion
- GHC.Types.Hint: CouldUnhideFrom :: NonEmpty (Module, ImportedModsVal) -> OccName -> ImportSuggestion
+ GHC.Types.Hint: CouldUnhideFrom :: NonEmpty (Module, ImportedModsVal) -> ImportSuggestion
- GHC.Types.Hint: ImportSuggestion :: ImportSuggestion -> GhcHint
+ GHC.Types.Hint: ImportSuggestion :: OccName -> ImportSuggestion -> GhcHint
- GHC.Types.Hint: SimilarRdrName :: RdrName -> HowInScope -> SimilarName
+ GHC.Types.Hint: SimilarRdrName :: RdrName -> Maybe HowInScope -> SimilarName
- GHC.Types.IPE: type DCMap = UniqMap DataCon (NonEmpty (Int, Maybe IpeSourceLocation))
+ GHC.Types.IPE: type DCMap = UniqMap DataCon NonEmpty (Int, Maybe IpeSourceLocation)
- GHC.Types.IPE: type IpeSourceLocation = (RealSrcSpan, String)
+ GHC.Types.IPE: type IpeSourceLocation = (RealSrcSpan, LexicalFastString)
- GHC.Types.Id.Info: ClassOpId :: Class -> IdDetails
+ GHC.Types.Id.Info: ClassOpId :: Class -> Bool -> IdDetails
- GHC.Types.Id.Info: RecSelId :: RecSelParent -> Bool -> IdDetails
+ GHC.Types.Id.Info: RecSelId :: RecSelParent -> FieldLabel -> Bool -> IdDetails
- GHC.Types.Id.Info: infixl 1 `setCafInfo`
+ GHC.Types.Id.Info: infixl 1 `setLFInfo`
- GHC.Types.Meta: type MetaHook f = MetaRequest -> LHsExpr GhcTc -> f MetaResult
+ GHC.Types.Meta: type MetaHook (f :: Type -> Type) = MetaRequest -> LHsExpr GhcTc -> f MetaResult
- GHC.Types.Name: pprModulePrefix :: IsLine doc => PprStyle -> Module -> OccName -> doc
+ GHC.Types.Name: pprModulePrefix :: PprStyle -> Module -> OccName -> SDoc
- GHC.Types.Name: pprName :: forall doc. IsLine doc => Name -> doc
+ GHC.Types.Name: pprName :: IsLine doc => Name -> doc
- GHC.Types.Name.Cache: type OrigNameCache = ModuleEnv (OccEnv Name)
+ GHC.Types.Name.Cache: type OrigNameCache = ModuleEnv OccEnv Name
- GHC.Types.Name.Env: depAnal :: forall node. (node -> [Name]) -> (node -> [Name]) -> [node] -> [SCC node]
+ GHC.Types.Name.Env: depAnal :: (node -> [Name]) -> (node -> [Name]) -> [node] -> [SCC node]
- GHC.Types.Name.Occurrence: alterOccEnv :: (Maybe elt -> Maybe elt) -> OccEnv elt -> OccName -> OccEnv elt
+ GHC.Types.Name.Occurrence: alterOccEnv :: (Maybe a -> Maybe a) -> OccEnv a -> OccName -> OccEnv a
- GHC.Types.Name.Occurrence: filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt
+ GHC.Types.Name.Occurrence: filterOccEnv :: (a -> Bool) -> OccEnv a -> OccEnv a
- GHC.Types.Name.Occurrence: pprNameSpaceBrief :: IsLine doc => NameSpace -> doc
+ GHC.Types.Name.Occurrence: pprNameSpaceBrief :: NameSpace -> SDoc
- GHC.Types.Name.Occurrence: type OccSet = UniqSet OccName
+ GHC.Types.Name.Occurrence: type OccSet = FastStringEnv UniqSet NameSpace
- GHC.Types.Name.Ppr: mkNamePprCtx :: PromotionTickContext -> UnitEnv -> GlobalRdrEnv -> NamePprCtx
+ GHC.Types.Name.Ppr: mkNamePprCtx :: Outputable info => PromotionTickContext -> UnitEnv -> GlobalRdrEnvX info -> NamePprCtx
- GHC.Types.Name.Reader: GRE :: !GreName -> !Parent -> !Bool -> !Bag ImportSpec -> GlobalRdrElt
+ GHC.Types.Name.Reader: GRE :: !Name -> !Parent -> !Bool -> !Bag ImportSpec -> info -> GlobalRdrEltX info
- GHC.Types.Name.Reader: ImpDeclSpec :: !ModuleName -> !ModuleName -> !Bool -> !SrcSpan -> ImpDeclSpec
+ GHC.Types.Name.Reader: ImpDeclSpec :: Module -> ModuleName -> Bool -> SrcSpan -> ImpDeclSpec
- GHC.Types.Name.Reader: ImpSome :: !Bool -> !SrcSpan -> ImpItemSpec
+ GHC.Types.Name.Reader: ImpSome :: Bool -> SrcSpan -> ImpItemSpec
- GHC.Types.Name.Reader: ImpSpec :: !ImpDeclSpec -> !ImpItemSpec -> ImportSpec
+ GHC.Types.Name.Reader: ImpSpec :: ImpDeclSpec -> ImpItemSpec -> ImportSpec
- GHC.Types.Name.Reader: ParentIs :: !Name -> Parent
+ GHC.Types.Name.Reader: ParentIs :: Name -> Parent
- GHC.Types.Name.Reader: [gre_imp] :: GlobalRdrElt -> !Bag ImportSpec
+ GHC.Types.Name.Reader: [gre_imp] :: GlobalRdrEltX info -> !Bag ImportSpec
- GHC.Types.Name.Reader: [gre_lcl] :: GlobalRdrElt -> !Bool
+ GHC.Types.Name.Reader: [gre_lcl] :: GlobalRdrEltX info -> !Bool
- GHC.Types.Name.Reader: [gre_name] :: GlobalRdrElt -> !GreName
+ GHC.Types.Name.Reader: [gre_name] :: GlobalRdrEltX info -> !Name
- GHC.Types.Name.Reader: [gre_par] :: GlobalRdrElt -> !Parent
+ GHC.Types.Name.Reader: [gre_par] :: GlobalRdrEltX info -> !Parent
- GHC.Types.Name.Reader: [is_as] :: ImpDeclSpec -> !ModuleName
+ GHC.Types.Name.Reader: [is_as] :: ImpDeclSpec -> ModuleName
- GHC.Types.Name.Reader: [is_decl] :: ImportSpec -> !ImpDeclSpec
+ GHC.Types.Name.Reader: [is_decl] :: ImportSpec -> ImpDeclSpec
- GHC.Types.Name.Reader: [is_dloc] :: ImpDeclSpec -> !SrcSpan
+ GHC.Types.Name.Reader: [is_dloc] :: ImpDeclSpec -> SrcSpan
- GHC.Types.Name.Reader: [is_explicit] :: ImpItemSpec -> !Bool
+ GHC.Types.Name.Reader: [is_explicit] :: ImpItemSpec -> Bool
- GHC.Types.Name.Reader: [is_iloc] :: ImpItemSpec -> !SrcSpan
+ GHC.Types.Name.Reader: [is_iloc] :: ImpItemSpec -> SrcSpan
- GHC.Types.Name.Reader: [is_item] :: ImportSpec -> !ImpItemSpec
+ GHC.Types.Name.Reader: [is_item] :: ImportSpec -> ImpItemSpec
- GHC.Types.Name.Reader: [is_mod] :: ImpDeclSpec -> !ModuleName
+ GHC.Types.Name.Reader: [is_mod] :: ImpDeclSpec -> Module
- GHC.Types.Name.Reader: [is_qual] :: ImpDeclSpec -> !Bool
+ GHC.Types.Name.Reader: [is_qual] :: ImpDeclSpec -> Bool
- GHC.Types.Name.Reader: [par_is] :: Parent -> !Name
+ GHC.Types.Name.Reader: [par_is] :: Parent -> Name
- GHC.Types.Name.Reader: availFromGRE :: GlobalRdrElt -> AvailInfo
+ GHC.Types.Name.Reader: availFromGRE :: GlobalRdrEltX info -> AvailInfo
- GHC.Types.Name.Reader: bestImport :: [ImportSpec] -> ImportSpec
+ GHC.Types.Name.Reader: bestImport :: NonEmpty ImportSpec -> ImportSpec
- GHC.Types.Name.Reader: emptyGlobalRdrEnv :: GlobalRdrEnv
+ GHC.Types.Name.Reader: emptyGlobalRdrEnv :: GlobalRdrEnvX info
- GHC.Types.Name.Reader: globalRdrEnvElts :: GlobalRdrEnv -> [GlobalRdrElt]
+ GHC.Types.Name.Reader: globalRdrEnvElts :: GlobalRdrEnvX info -> [GlobalRdrEltX info]
- GHC.Types.Name.Reader: greDefinitionModule :: GlobalRdrElt -> Maybe Module
+ GHC.Types.Name.Reader: greDefinitionModule :: GlobalRdrEltX info -> Maybe Module
- GHC.Types.Name.Reader: greDefinitionSrcSpan :: GlobalRdrElt -> SrcSpan
+ GHC.Types.Name.Reader: greDefinitionSrcSpan :: GlobalRdrEltX info -> SrcSpan
- GHC.Types.Name.Reader: greOccName :: GlobalRdrElt -> OccName
+ GHC.Types.Name.Reader: greOccName :: GlobalRdrEltX info -> OccName
- GHC.Types.Name.Reader: greParent_maybe :: GlobalRdrElt -> Maybe Name
+ GHC.Types.Name.Reader: greParent_maybe :: GlobalRdrEltX info -> Maybe Name
- GHC.Types.Name.Reader: greQualModName :: GlobalRdrElt -> ModuleName
+ GHC.Types.Name.Reader: greQualModName :: Outputable info => GlobalRdrEltX info -> ModuleName
- GHC.Types.Name.Reader: greRdrNames :: GlobalRdrElt -> [RdrName]
+ GHC.Types.Name.Reader: greRdrNames :: GlobalRdrEltX info -> [RdrName]
- GHC.Types.Name.Reader: greSrcSpan :: GlobalRdrElt -> SrcSpan
+ GHC.Types.Name.Reader: greSrcSpan :: Outputable info => GlobalRdrEltX info -> SrcSpan
- GHC.Types.Name.Reader: gresToAvailInfo :: [GlobalRdrElt] -> [AvailInfo]
+ GHC.Types.Name.Reader: gresToAvailInfo :: [GlobalRdrEltX info] -> [AvailInfo]
- GHC.Types.Name.Reader: isLocalGRE :: GlobalRdrElt -> Bool
+ GHC.Types.Name.Reader: isLocalGRE :: GlobalRdrEltX info -> Bool
- GHC.Types.Name.Reader: isRecFldGRE :: GlobalRdrElt -> Bool
+ GHC.Types.Name.Reader: isRecFldGRE :: GlobalRdrEltX info -> Bool
- GHC.Types.Name.Reader: lookupGRE_FieldLabel :: GlobalRdrEnv -> FieldLabel -> Maybe GlobalRdrElt
+ GHC.Types.Name.Reader: lookupGRE_FieldLabel :: GlobalRdrEnv -> FieldLabel -> Maybe FieldGlobalRdrElt
- GHC.Types.Name.Reader: lookupGRE_Name :: GlobalRdrEnv -> Name -> Maybe GlobalRdrElt
+ GHC.Types.Name.Reader: lookupGRE_Name :: Outputable info => GlobalRdrEnvX info -> Name -> Maybe (GlobalRdrEltX info)
- GHC.Types.Name.Reader: pickGREs :: RdrName -> [GlobalRdrElt] -> [GlobalRdrElt]
+ GHC.Types.Name.Reader: pickGREs :: RdrName -> [GlobalRdrEltX info] -> [GlobalRdrEltX info]
- GHC.Types.Name.Reader: pickGREsModExp :: ModuleName -> [GlobalRdrElt] -> [(GlobalRdrElt, GlobalRdrElt)]
+ GHC.Types.Name.Reader: pickGREsModExp :: ModuleName -> [GlobalRdrEltX info] -> [(GlobalRdrEltX info, GlobalRdrEltX info)]
- GHC.Types.Name.Reader: pprNameProvenance :: GlobalRdrElt -> SDoc
+ GHC.Types.Name.Reader: pprNameProvenance :: GlobalRdrEltX info -> SDoc
- GHC.Types.Name.Reader: shadowNames :: GlobalRdrEnv -> OccEnv a -> GlobalRdrEnv
+ GHC.Types.Name.Reader: shadowNames :: Bool -> GlobalRdrEnv -> GlobalRdrEnv -> GlobalRdrEnv
- GHC.Types.Name.Reader: type GlobalRdrEnv = OccEnv [GlobalRdrElt]
+ GHC.Types.Name.Reader: type GlobalRdrEnv = GlobalRdrEnvX GREInfo
- GHC.Types.Name.Reader: unQualOK :: GlobalRdrElt -> Bool
+ GHC.Types.Name.Reader: unQualOK :: GlobalRdrEltX info -> Bool
- GHC.Types.Name.Shape: extendNameShape :: HscEnv -> NameShape -> [AvailInfo] -> IO (Either SDoc NameShape)
+ GHC.Types.Name.Shape: extendNameShape :: HscEnv -> NameShape -> [AvailInfo] -> IO (Either HsigShapeMismatchReason NameShape)
- GHC.Types.RepType: typePrimRepArgs :: HasDebugCallStack => Type -> [PrimRep]
+ GHC.Types.RepType: typePrimRepArgs :: HasDebugCallStack => Type -> NonEmpty PrimRep
- GHC.Types.SourceText: SourceText :: String -> SourceText
+ GHC.Types.SourceText: SourceText :: FastString -> SourceText
- GHC.Types.SrcLoc: BufSpan :: {-# UNPACK #-} !BufPos -> BufSpan
+ GHC.Types.SrcLoc: BufSpan :: {-# UNPACK #-} !BufPos -> {-# UNPACK #-} !BufPos -> BufSpan
- GHC.Types.Tickish: Breakpoint :: XBreakpoint pass -> !Int -> [XTickishId pass] -> GenTickish pass
+ GHC.Types.Tickish: Breakpoint :: XBreakpoint pass -> !Int -> [XTickishId pass] -> GenTickish (pass :: TickishPass)
- GHC.Types.Tickish: HpcTick :: Module -> !Int -> GenTickish pass
+ GHC.Types.Tickish: HpcTick :: Module -> !Int -> GenTickish (pass :: TickishPass)
- GHC.Types.Tickish: ProfNote :: CostCentre -> !Bool -> !Bool -> GenTickish pass
+ GHC.Types.Tickish: ProfNote :: CostCentre -> !Bool -> !Bool -> GenTickish (pass :: TickishPass)
- GHC.Types.Tickish: SourceNote :: RealSrcSpan -> String -> GenTickish pass
+ GHC.Types.Tickish: SourceNote :: RealSrcSpan -> LexicalFastString -> GenTickish (pass :: TickishPass)
- GHC.Types.Tickish: [breakpointExt] :: GenTickish pass -> XBreakpoint pass
+ GHC.Types.Tickish: [breakpointExt] :: GenTickish (pass :: TickishPass) -> XBreakpoint pass
- GHC.Types.Tickish: [breakpointFVs] :: GenTickish pass -> [XTickishId pass]
+ GHC.Types.Tickish: [breakpointFVs] :: GenTickish (pass :: TickishPass) -> [XTickishId pass]
- GHC.Types.Tickish: [breakpointId] :: GenTickish pass -> !Int
+ GHC.Types.Tickish: [breakpointId] :: GenTickish (pass :: TickishPass) -> !Int
- GHC.Types.Tickish: [profNoteCC] :: GenTickish pass -> CostCentre
+ GHC.Types.Tickish: [profNoteCC] :: GenTickish (pass :: TickishPass) -> CostCentre
- GHC.Types.Tickish: [profNoteCount] :: GenTickish pass -> !Bool
+ GHC.Types.Tickish: [profNoteCount] :: GenTickish (pass :: TickishPass) -> !Bool
- GHC.Types.Tickish: [profNoteScope] :: GenTickish pass -> !Bool
+ GHC.Types.Tickish: [profNoteScope] :: GenTickish (pass :: TickishPass) -> !Bool
- GHC.Types.Tickish: [sourceName] :: GenTickish pass -> String
+ GHC.Types.Tickish: [sourceName] :: GenTickish (pass :: TickishPass) -> LexicalFastString
- GHC.Types.Tickish: [sourceSpan] :: GenTickish pass -> RealSrcSpan
+ GHC.Types.Tickish: [sourceSpan] :: GenTickish (pass :: TickishPass) -> RealSrcSpan
- GHC.Types.Tickish: [tickId] :: GenTickish pass -> !Int
+ GHC.Types.Tickish: [tickId] :: GenTickish (pass :: TickishPass) -> !Int
- GHC.Types.Tickish: [tickModule] :: GenTickish pass -> Module
+ GHC.Types.Tickish: [tickModule] :: GenTickish (pass :: TickishPass) -> Module
- GHC.Types.Tickish: data GenTickish pass
+ GHC.Types.Tickish: data GenTickish (pass :: TickishPass)
- GHC.Types.Tickish: isProfTick :: GenTickish pass -> Bool
+ GHC.Types.Tickish: isProfTick :: forall (pass :: TickishPass). GenTickish pass -> Bool
- GHC.Types.Tickish: mkNoCount :: GenTickish pass -> GenTickish pass
+ GHC.Types.Tickish: mkNoCount :: forall (pass :: TickishPass). GenTickish pass -> GenTickish pass
- GHC.Types.Tickish: mkNoScope :: GenTickish pass -> GenTickish pass
+ GHC.Types.Tickish: mkNoScope :: forall (pass :: TickishPass). GenTickish pass -> GenTickish pass
- GHC.Types.Tickish: tickishCanSplit :: GenTickish pass -> Bool
+ GHC.Types.Tickish: tickishCanSplit :: forall (pass :: TickishPass). GenTickish pass -> Bool
- GHC.Types.Tickish: tickishContains :: Eq (GenTickish pass) => GenTickish pass -> GenTickish pass -> Bool
+ GHC.Types.Tickish: tickishContains :: forall (pass :: TickishPass). Eq (GenTickish pass) => GenTickish pass -> GenTickish pass -> Bool
- GHC.Types.Tickish: tickishCounts :: GenTickish pass -> Bool
+ GHC.Types.Tickish: tickishCounts :: forall (pass :: TickishPass). GenTickish pass -> Bool
- GHC.Types.Tickish: tickishFloatable :: GenTickish pass -> Bool
+ GHC.Types.Tickish: tickishFloatable :: forall (pass :: TickishPass). GenTickish pass -> Bool
- GHC.Types.Tickish: tickishIsCode :: GenTickish pass -> Bool
+ GHC.Types.Tickish: tickishIsCode :: forall (pass :: TickishPass). GenTickish pass -> Bool
- GHC.Types.Tickish: tickishPlace :: GenTickish pass -> TickishPlacement
+ GHC.Types.Tickish: tickishPlace :: forall (pass :: TickishPass). GenTickish pass -> TickishPlacement
- GHC.Types.Tickish: tickishScoped :: GenTickish pass -> TickishScoping
+ GHC.Types.Tickish: tickishScoped :: forall (pass :: TickishPass). GenTickish pass -> TickishScoping
- GHC.Types.Tickish: tickishScopesLike :: GenTickish pass -> TickishScoping -> Bool
+ GHC.Types.Tickish: tickishScopesLike :: forall (pass :: TickishPass). GenTickish pass -> TickishScoping -> Bool
- GHC.Types.TyThing: class Monad m => MonadThings m
+ GHC.Types.TyThing: class Monad m => MonadThings (m :: Type -> Type)
- GHC.Types.Unique: getKey :: Unique -> Word64
+ GHC.Types.Unique: getKey :: Unique -> Int
- GHC.Types.Unique: mkLocalUnique :: Word64 -> Unique
+ GHC.Types.Unique: mkLocalUnique :: Int -> Unique
- GHC.Types.Unique: mkUnique :: Char -> Word64 -> Unique
+ GHC.Types.Unique: mkUnique :: Char -> Int -> Unique
- GHC.Types.Unique: mkUniqueGrimily :: Word64 -> Unique
+ GHC.Types.Unique: mkUniqueGrimily :: Int -> Unique
- GHC.Types.Unique: stepUnique :: Unique -> Word64 -> Unique
+ GHC.Types.Unique: stepUnique :: Unique -> Int -> Unique
- GHC.Types.Unique: unpkUnique :: Unique -> (Char, Word64)
+ GHC.Types.Unique: unpkUnique :: Unique -> (Char, Int)
- GHC.Types.Unique.DFM: mapMaybeUDFM :: forall elt1 elt2 key. (elt1 -> Maybe elt2) -> UniqDFM key elt1 -> UniqDFM key elt2
+ GHC.Types.Unique.DFM: mapMaybeUDFM :: (elt1 -> Maybe elt2) -> UniqDFM key elt1 -> UniqDFM key elt2
- GHC.Types.Unique.DFM: udfmRestrictKeysSet :: UniqDFM key elt -> Word64Set -> UniqDFM key elt
+ GHC.Types.Unique.DFM: udfmRestrictKeysSet :: UniqDFM key elt -> IntSet -> UniqDFM key elt
- GHC.Types.Unique.FM: sequenceUFMList :: forall key elt. [UniqFM key elt] -> UniqFM key [elt]
+ GHC.Types.Unique.FM: sequenceUFMList :: [UniqFM key elt] -> UniqFM key [elt]
- GHC.Types.Unique.FM: ufmToIntMap :: UniqFM key elt -> Word64Map elt
+ GHC.Types.Unique.FM: ufmToIntMap :: UniqFM key elt -> IntMap elt
- GHC.Types.Unique.FM: ufmToSet_Directly :: UniqFM key elt -> Word64Set
+ GHC.Types.Unique.FM: ufmToSet_Directly :: UniqFM key elt -> IntSet
- GHC.Types.Unique.FM: unsafeIntMapToUFM :: Word64Map elt -> UniqFM key elt
+ GHC.Types.Unique.FM: unsafeIntMapToUFM :: IntMap elt -> UniqFM key elt
- GHC.Types.Unique.Map: nonDetEltsUniqMap :: UniqMap k a -> [(k, a)]
+ GHC.Types.Unique.Map: nonDetEltsUniqMap :: UniqMap k a -> [a]
- GHC.Types.Unique.Supply: class Monad m => MonadUnique m
+ GHC.Types.Unique.Supply: class Monad m => MonadUnique (m :: Type -> Type)
- GHC.Types.Unique.Supply: initUniqSupply :: Word64 -> Int -> IO ()
+ GHC.Types.Unique.Supply: initUniqSupply :: Word -> Int -> IO ()
- GHC.Unit.External: EpsStats :: !Int -> EpsStats
+ GHC.Unit.External: EpsStats :: !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> EpsStats
- GHC.Unit.Finder: NotFound :: [FilePath] -> Maybe Unit -> [Unit] -> [Unit] -> [UnusableUnit] -> [ModuleSuggestion] -> FindResult
+ GHC.Unit.Finder: NotFound :: [FilePath] -> Maybe Unit -> [Unit] -> [Unit] -> [(Unit, UnusableUnitReason)] -> [ModuleSuggestion] -> FindResult
- GHC.Unit.Finder: [fr_unusables] :: FindResult -> [UnusableUnit]
+ GHC.Unit.Finder: [fr_unusables] :: FindResult -> [(Unit, UnusableUnitReason)]
- GHC.Unit.Finder.Types: NotFound :: [FilePath] -> Maybe Unit -> [Unit] -> [Unit] -> [UnusableUnit] -> [ModuleSuggestion] -> FindResult
+ GHC.Unit.Finder.Types: NotFound :: [FilePath] -> Maybe Unit -> [Unit] -> [Unit] -> [(Unit, UnusableUnitReason)] -> [ModuleSuggestion] -> FindResult
- GHC.Unit.Finder.Types: [fr_unusables] :: FindResult -> [UnusableUnit]
+ GHC.Unit.Finder.Types: [fr_unusables] :: FindResult -> [(Unit, UnusableUnitReason)]
- GHC.Unit.Info: data () => GenericUnitInfo srcpkgid srcpkgname uid modulename mod
+ GHC.Unit.Info: data GenericUnitInfo srcpkgid srcpkgname uid modulename mod
- GHC.Unit.Info: data () => Version
+ GHC.Unit.Info: data Version
- GHC.Unit.Info: type GenUnitInfo unit = GenericUnitInfo PackageId PackageName unit ModuleName (GenModule (GenUnit unit))
+ GHC.Unit.Info: type GenUnitInfo unit = GenericUnitInfo PackageId PackageName unit ModuleName GenModule GenUnit unit
- GHC.Unit.Module: class HasModule m
+ GHC.Unit.Module: class HasModule (m :: Type -> Type)
- GHC.Unit.Module.Deps: UsageFile :: FilePath -> Fingerprint -> Maybe String -> Usage
+ GHC.Unit.Module.Deps: UsageFile :: FastString -> Fingerprint -> Maybe String -> Usage
- GHC.Unit.Module.Deps: [usg_file_path] :: Usage -> FilePath
+ GHC.Unit.Module.Deps: [usg_file_path] :: Usage -> FastString
- GHC.Unit.Module.ModIface: ModIface :: !Module -> !Maybe Module -> !HscSource -> Dependencies -> [Usage] -> ![IfaceExport] -> !Bool -> [(OccName, Fixity)] -> Warnings GhcRn -> [IfaceAnnotation] -> [IfaceDeclExts phase] -> Maybe [IfaceBindingX IfaceMaybeRhs IfaceTopBndrInfo] -> !Maybe GlobalRdrEnv -> [IfaceClsInst] -> [IfaceFamInst] -> [IfaceRule] -> !AnyHpcUsage -> !IfaceTrustInfo -> !Bool -> ![IfaceCompleteMatch] -> !Maybe Docs -> !IfaceBackendExts phase -> !ExtensibleFields -> !Fingerprint -> ModIface_ (phase :: ModIfacePhase)
+ GHC.Unit.Module.ModIface: ModIface :: !Module -> !Maybe Module -> !HscSource -> Dependencies -> [Usage] -> ![IfaceExport] -> !Bool -> [(OccName, Fixity)] -> IfaceWarnings -> [IfaceAnnotation] -> [IfaceDeclExts phase] -> Maybe [IfaceBindingX IfaceMaybeRhs IfaceTopBndrInfo] -> !Maybe IfGlobalRdrEnv -> [IfaceClsInst] -> [IfaceFamInst] -> [IfaceRule] -> !AnyHpcUsage -> !IfaceTrustInfo -> !Bool -> ![IfaceCompleteMatch] -> !Maybe Docs -> !IfaceBackendExts phase -> !ExtensibleFields -> !Fingerprint -> ModIface_ (phase :: ModIfacePhase)
- GHC.Unit.Module.ModIface: ModIfaceBackend :: !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !WhetherHasOrphans -> !WhetherHasFamInst -> !Fingerprint -> !Fingerprint -> !OccName -> Maybe (WarningTxt GhcRn) -> !OccName -> Maybe Fixity -> !OccName -> Maybe (OccName, Fingerprint) -> ModIfaceBackend
+ GHC.Unit.Module.ModIface: ModIfaceBackend :: !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !WhetherHasOrphans -> !WhetherHasFamInst -> !Fingerprint -> !Fingerprint -> !OccName -> Maybe (WarningTxt GhcRn) -> !Name -> Maybe (WarningTxt GhcRn) -> !OccName -> Maybe Fixity -> !OccName -> Maybe (OccName, Fingerprint) -> ModIfaceBackend
- GHC.Unit.Module.ModIface: [mi_globals] :: ModIface_ (phase :: ModIfacePhase) -> !Maybe GlobalRdrEnv
+ GHC.Unit.Module.ModIface: [mi_globals] :: ModIface_ (phase :: ModIfacePhase) -> !Maybe IfGlobalRdrEnv
- GHC.Unit.Module.ModIface: [mi_warns] :: ModIface_ (phase :: ModIfacePhase) -> Warnings GhcRn
+ GHC.Unit.Module.ModIface: [mi_warns] :: ModIface_ (phase :: ModIfacePhase) -> IfaceWarnings
- GHC.Unit.Module.ModIface: mi_semantic_module :: ModIface_ a -> Module
+ GHC.Unit.Module.ModIface: mi_semantic_module :: forall (a :: ModIfacePhase). ModIface_ a -> Module
- GHC.Unit.Module.ModIface: type family IfaceBackendExts (phase :: ModIfacePhase) = bk | bk -> phase
+ GHC.Unit.Module.ModIface: type family IfaceBackendExts (phase :: ModIfacePhase) = (bk :: Type) | bk -> phase
- GHC.Unit.Module.Warnings: WarnSome :: [(OccName, WarningTxt pass)] -> Warnings pass
+ GHC.Unit.Module.Warnings: WarnSome :: DeclWarnOccNames pass -> ExportWarnNames pass -> Warnings pass
- GHC.Unit.Module.Warnings: WarningTxt :: Located SourceText -> [Located (WithHsDocIdentifiers StringLiteral pass)] -> WarningTxt pass
+ GHC.Unit.Module.Warnings: WarningTxt :: Maybe (Located InWarningCategory) -> Located SourceText -> [Located (WithHsDocIdentifiers StringLiteral pass)] -> WarningTxt pass
- GHC.Unit.Module.Warnings: emptyIfaceWarnCache :: OccName -> Maybe (WarningTxt p)
+ GHC.Unit.Module.Warnings: emptyIfaceWarnCache :: name -> Maybe (WarningTxt p)
- GHC.Unit.State: ModUnusable :: !UnusableUnit -> ModuleOrigin
+ GHC.Unit.State: ModUnusable :: UnusableUnitReason -> ModuleOrigin
- GHC.Unit.State: UnitState :: UnitInfoMap -> PreloadUnitClosure -> UniqFM PackageName UnitId -> Map UnitId UnitId -> Map UnitId UnitId -> [UnitId] -> [(Unit, Maybe PackageArg)] -> [UnitId] -> !ModuleNameProvidersMap -> !ModuleNameProvidersMap -> Map ModuleName [InstantiatedModule] -> !Bool -> UnitState
+ GHC.Unit.State: UnitState :: UnitInfoMap -> PreloadUnitClosure -> UniqFM PackageName UnitId -> UniqMap UnitId UnitId -> UniqMap UnitId UnitId -> [UnitId] -> [(Unit, Maybe PackageArg)] -> [UnitId] -> !ModuleNameProvidersMap -> !ModuleNameProvidersMap -> UniqMap ModuleName [InstantiatedModule] -> !Bool -> UnitState
- GHC.Unit.State: [requirementContext] :: UnitState -> Map ModuleName [InstantiatedModule]
+ GHC.Unit.State: [requirementContext] :: UnitState -> UniqMap ModuleName [InstantiatedModule]
- GHC.Unit.State: [unwireMap] :: UnitState -> Map UnitId UnitId
+ GHC.Unit.State: [unwireMap] :: UnitState -> UniqMap UnitId UnitId
- GHC.Unit.State: [wireMap] :: UnitState -> Map UnitId UnitId
+ GHC.Unit.State: [wireMap] :: UnitState -> UniqMap UnitId UnitId
- GHC.Unit.State: type UnitInfoMap = Map UnitId UnitInfo
+ GHC.Unit.State: type UnitInfoMap = UniqMap UnitId UnitInfo
- GHC.Unit.Types: data () => IsBootInterface
+ GHC.Unit.Types: data IsBootInterface
- GHC.Unit.Types: pprUnit :: IsLine doc => Unit -> doc
+ GHC.Unit.Types: pprUnit :: Unit -> SDoc
- GHC.Unit.Types: type GenInstantiations unit = [(ModuleName, GenModule (GenUnit unit))]
+ GHC.Unit.Types: type GenInstantiations unit = [(ModuleName, GenModule GenUnit unit)]
- GHC.Utils.Binary: castBin :: Bin a -> Bin b
+ GHC.Utils.Binary: castBin :: forall {k1} {k2} (a :: k1) (b :: k2). Bin a -> Bin b
- GHC.Utils.Binary: data Bin a
+ GHC.Utils.Binary: data Bin (a :: k)
- GHC.Utils.Binary: getSLEB128 :: forall a. (Show a, Integral a, FiniteBits a) => BinHandle -> IO a
+ GHC.Utils.Binary: getSLEB128 :: (Show a, Integral a, FiniteBits a) => BinHandle -> IO a
- GHC.Utils.Binary: getULEB128 :: forall a. (Integral a, FiniteBits a) => BinHandle -> IO a
+ GHC.Utils.Binary: getULEB128 :: (Integral a, FiniteBits a) => BinHandle -> IO a
- GHC.Utils.Binary: putSLEB128 :: forall a. (Integral a, Bits a) => BinHandle -> a -> IO ()
+ GHC.Utils.Binary: putSLEB128 :: (Integral a, Bits a) => BinHandle -> a -> IO ()
- GHC.Utils.Binary: putULEB128 :: forall a. (Integral a, FiniteBits a) => BinHandle -> a -> IO ()
+ GHC.Utils.Binary: putULEB128 :: (Integral a, FiniteBits a) => BinHandle -> a -> IO ()
- GHC.Utils.Binary: seekBin :: BinHandle -> Bin a -> IO ()
+ GHC.Utils.Binary: seekBin :: forall {k} (a :: k). BinHandle -> Bin a -> IO ()
- GHC.Utils.Binary: tellBin :: BinHandle -> IO (Bin a)
+ GHC.Utils.Binary: tellBin :: forall {k} (a :: k). BinHandle -> IO (Bin a)
- GHC.Utils.Error: DiagOpts :: !EnumSet WarningFlag -> !EnumSet WarningFlag -> !Bool -> !Bool -> !Maybe Int -> !SDocContext -> DiagOpts
+ GHC.Utils.Error: DiagOpts :: !EnumSet WarningFlag -> !EnumSet WarningFlag -> !WarningCategorySet -> !WarningCategorySet -> !Bool -> !Bool -> !Maybe Int -> !SDocContext -> DiagOpts
- GHC.Utils.Error: MCDiagnostic :: Severity -> DiagnosticReason -> Maybe DiagnosticCode -> MessageClass
+ GHC.Utils.Error: MCDiagnostic :: Severity -> ResolvedDiagnosticReason -> Maybe DiagnosticCode -> MessageClass
- GHC.Utils.Error: MsgEnvelope :: SrcSpan -> NamePprCtx -> e -> Severity -> MsgEnvelope e
+ GHC.Utils.Error: MsgEnvelope :: SrcSpan -> NamePprCtx -> e -> Severity -> ResolvedDiagnosticReason -> MsgEnvelope e
- GHC.Utils.Error: class Diagnostic a where {
+ GHC.Utils.Error: class HasDefaultDiagnosticOpts DiagnosticOpts a => Diagnostic a where {
- GHC.Utils.Error: formatBulleted :: SDocContext -> DecoratedSDoc -> SDoc
+ GHC.Utils.Error: formatBulleted :: DecoratedSDoc -> SDoc
- GHC.Utils.Error: pprLocMsgEnvelopeDefault :: forall e. Diagnostic e => MsgEnvelope e -> SDoc
+ GHC.Utils.Error: pprLocMsgEnvelopeDefault :: Diagnostic e => MsgEnvelope e -> SDoc
- GHC.Utils.Error: pprMsgEnvelopeBagWithLocDefault :: forall e. Diagnostic e => Bag (MsgEnvelope e) -> [SDoc]
+ GHC.Utils.Error: pprMsgEnvelopeBagWithLocDefault :: Diagnostic e => Bag (MsgEnvelope e) -> [SDoc]
- GHC.Utils.Exception: data () => AllocationLimitExceeded
+ GHC.Utils.Exception: data AllocationLimitExceeded
- GHC.Utils.Exception: data () => ArithException
+ GHC.Utils.Exception: data ArithException
- GHC.Utils.Exception: data () => ArrayException
+ GHC.Utils.Exception: data ArrayException
- GHC.Utils.Exception: data () => AsyncException
+ GHC.Utils.Exception: data AsyncException
- GHC.Utils.Exception: data () => BlockedIndefinitelyOnMVar
+ GHC.Utils.Exception: data BlockedIndefinitelyOnMVar
- GHC.Utils.Exception: data () => BlockedIndefinitelyOnSTM
+ GHC.Utils.Exception: data BlockedIndefinitelyOnSTM
- GHC.Utils.Exception: data () => Deadlock
+ GHC.Utils.Exception: data Deadlock
- GHC.Utils.Exception: data () => ErrorCall
+ GHC.Utils.Exception: data ErrorCall
- GHC.Utils.Exception: data () => Handler a
+ GHC.Utils.Exception: data Handler a
- GHC.Utils.Exception: data () => IOException
+ GHC.Utils.Exception: data IOException
- GHC.Utils.Exception: data () => MaskingState
+ GHC.Utils.Exception: data MaskingState
- GHC.Utils.Exception: data () => NestedAtomically
+ GHC.Utils.Exception: data NestedAtomically
- GHC.Utils.Exception: data () => NonTermination
+ GHC.Utils.Exception: data NonTermination
- GHC.Utils.Exception: data () => SomeAsyncException
+ GHC.Utils.Exception: data SomeAsyncException
- GHC.Utils.Exception: data () => SomeException
+ GHC.Utils.Exception: data SomeException
- GHC.Utils.Exception: newtype () => AssertionFailed
+ GHC.Utils.Exception: newtype AssertionFailed
- GHC.Utils.Exception: newtype () => CompactionFailed
+ GHC.Utils.Exception: newtype CompactionFailed
- GHC.Utils.Exception: newtype () => NoMethodError
+ GHC.Utils.Exception: newtype NoMethodError
- GHC.Utils.Exception: newtype () => PatternMatchFail
+ GHC.Utils.Exception: newtype PatternMatchFail
- GHC.Utils.Exception: newtype () => RecConError
+ GHC.Utils.Exception: newtype RecConError
- GHC.Utils.Exception: newtype () => RecSelError
+ GHC.Utils.Exception: newtype RecSelError
- GHC.Utils.Exception: newtype () => RecUpdError
+ GHC.Utils.Exception: newtype RecUpdError
- GHC.Utils.Exception: newtype () => TypeError
+ GHC.Utils.Exception: newtype TypeError
- GHC.Utils.Exception: throw :: forall (r :: RuntimeRep) (a :: TYPE r) e. Exception e => e -> a
+ GHC.Utils.Exception: throw :: forall a e. Exception e => e -> a
- GHC.Utils.Exception: type ExceptionMonad m = (MonadCatch m, MonadThrow m, MonadMask m, MonadIO m)
+ GHC.Utils.Exception: type ExceptionMonad (m :: Type -> Type) = (MonadCatch m, MonadThrow m, MonadMask m, MonadIO m)
- GHC.Utils.Fingerprint: data () => Fingerprint
+ GHC.Utils.Fingerprint: data Fingerprint
- GHC.Utils.Logger: class HasLogger m
+ GHC.Utils.Logger: class HasLogger (m :: Type -> Type)
- GHC.Utils.Logger: pushTraceHook :: (forall a. TraceAction a -> TraceAction a) -> Logger -> Logger
+ GHC.Utils.Logger: pushTraceHook :: (forall a. () => TraceAction a -> TraceAction a) -> Logger -> Logger
- GHC.Utils.Misc: mergeListsBy :: forall a. (a -> a -> Ordering) -> [[a]] -> [a]
+ GHC.Utils.Misc: mergeListsBy :: (a -> a -> Ordering) -> [[a]] -> [a]
- GHC.Utils.Misc: type HasDebugCallStack = (() :: Constraint)
+ GHC.Utils.Misc: type HasDebugCallStack = ()
- GHC.Utils.Outputable: class (IsOutput doc, IsLine (Line doc)) => IsDoc doc where {
+ GHC.Utils.Outputable: class (IsOutput doc, IsLine Line doc) => IsDoc doc where {
- GHC.Utils.Outputable: ppUnlessOption :: IsLine doc => (SDocContext -> Bool) -> doc -> doc
+ GHC.Utils.Outputable: ppUnlessOption :: (SDocContext -> Bool) -> SDoc -> SDoc
- GHC.Utils.Outputable: type Line doc = r | r -> doc;
+ GHC.Utils.Outputable: type Line doc = (r :: Type) | r -> doc;
- GHC.Wasm.ControlFlow: (<>) :: forall s e pre mid post. WasmControl s e pre mid -> WasmControl s e mid post -> WasmControl s e pre post
+ GHC.Wasm.ControlFlow: (<>) :: forall s e (pre :: [WasmType]) (mid :: [WasmType]) (post :: [WasmType]). WasmControl s e pre mid -> WasmControl s e mid post -> WasmControl s e pre post
- GHC.Wasm.ControlFlow: WasmFunctionType :: TypeList pre -> TypeList post -> WasmFunctionType pre post
+ GHC.Wasm.ControlFlow: WasmFunctionType :: TypeList pre -> TypeList post -> WasmFunctionType (pre :: [WasmType]) (post :: [WasmType])
- GHC.Wasm.ControlFlow: [TypeListCons] :: WasmTypeTag t -> TypeList ts -> TypeList (t : ts)
+ GHC.Wasm.ControlFlow: [TypeListCons] :: forall (t :: WasmType) (ts :: [WasmType]). WasmTypeTag t -> TypeList ts -> TypeList (t ': ts)
- GHC.Wasm.ControlFlow: [TypeListNil] :: TypeList '[]
+ GHC.Wasm.ControlFlow: [TypeListNil] :: TypeList ('[] :: [WasmType])
- GHC.Wasm.ControlFlow: [WasmActions] :: s -> WasmControl s e stack stack
+ GHC.Wasm.ControlFlow: [WasmActions] :: forall a b (c :: [WasmType]). a -> WasmControl a b c c
- GHC.Wasm.ControlFlow: [WasmBlock] :: WasmFunctionType pre post -> WasmControl s e pre post -> WasmControl s e pre post
+ GHC.Wasm.ControlFlow: [WasmBlock] :: forall (c :: [WasmType]) (d :: [WasmType]) a b. WasmFunctionType c d -> WasmControl a b c d -> WasmControl a b c d
- GHC.Wasm.ControlFlow: [WasmBrTable] :: e -> BrTableInterval -> [Int] -> Int -> WasmControl s e dropped destination
+ GHC.Wasm.ControlFlow: [WasmBrTable] :: forall b a (c :: [WasmType]) (d :: [WasmType]). b -> BrTableInterval -> [Int] -> Int -> WasmControl a b c d
- GHC.Wasm.ControlFlow: [WasmBr] :: Int -> WasmControl s e dropped destination
+ GHC.Wasm.ControlFlow: [WasmBr] :: forall a b (c :: [WasmType]) (d :: [WasmType]). Int -> WasmControl a b c d
- GHC.Wasm.ControlFlow: [WasmFallthrough] :: WasmControl s e dropped destination
+ GHC.Wasm.ControlFlow: [WasmFallthrough] :: forall a b (c :: [WasmType]) (d :: [WasmType]). WasmControl a b c d
- GHC.Wasm.ControlFlow: [WasmIfTop] :: WasmFunctionType pre post -> WasmControl s e pre post -> WasmControl s e pre post -> WasmControl s e ('I32 : pre) post
+ GHC.Wasm.ControlFlow: [WasmIfTop] :: forall (pre :: [WasmType]) (d :: [WasmType]) a b. WasmFunctionType pre d -> WasmControl a b pre d -> WasmControl a b pre d -> WasmControl a b ('I32 ': pre) d
- GHC.Wasm.ControlFlow: [WasmLoop] :: WasmFunctionType pre post -> WasmControl s e pre post -> WasmControl s e pre post
+ GHC.Wasm.ControlFlow: [WasmLoop] :: forall (c :: [WasmType]) (d :: [WasmType]) a b. WasmFunctionType c d -> WasmControl a b c d -> WasmControl a b c d
- GHC.Wasm.ControlFlow: [WasmPush] :: WasmTypeTag t -> e -> WasmControl s e stack (t : stack)
+ GHC.Wasm.ControlFlow: [WasmPush] :: forall (t :: WasmType) b a (c :: [WasmType]). WasmTypeTag t -> b -> WasmControl a b c (t ': c)
- GHC.Wasm.ControlFlow: [WasmSeq] :: WasmControl s e pre mid -> WasmControl s e mid post -> WasmControl s e pre post
+ GHC.Wasm.ControlFlow: [WasmSeq] :: forall a b (c :: [WasmType]) (mid :: [WasmType]) (d :: [WasmType]). WasmControl a b c mid -> WasmControl a b mid d -> WasmControl a b c d
- GHC.Wasm.ControlFlow: [WasmTailCall] :: e -> WasmControl s e t1star t2star
+ GHC.Wasm.ControlFlow: [WasmTailCall] :: forall b a (c :: [WasmType]) (d :: [WasmType]). b -> WasmControl a b c d
- GHC.Wasm.ControlFlow: [ft_pops] :: WasmFunctionType pre post -> TypeList pre
+ GHC.Wasm.ControlFlow: [ft_pops] :: WasmFunctionType (pre :: [WasmType]) (post :: [WasmType]) -> TypeList pre
- GHC.Wasm.ControlFlow: [ft_pushes] :: WasmFunctionType pre post -> TypeList post
+ GHC.Wasm.ControlFlow: [ft_pushes] :: WasmFunctionType (pre :: [WasmType]) (post :: [WasmType]) -> TypeList post
- GHC.Wasm.ControlFlow: data TypeList :: [WasmType] -> Type
+ GHC.Wasm.ControlFlow: data TypeList (a :: [WasmType])
- GHC.Wasm.ControlFlow: data WasmControl :: Type -> Type -> [WasmType] -> [WasmType] -> Type
+ GHC.Wasm.ControlFlow: data WasmControl a b (c :: [WasmType]) (d :: [WasmType])
- GHC.Wasm.ControlFlow: data WasmFunctionType pre post
+ GHC.Wasm.ControlFlow: data WasmFunctionType (pre :: [WasmType]) (post :: [WasmType])
- GHC.Wasm.ControlFlow: data WasmTypeTag :: WasmType -> Type
+ GHC.Wasm.ControlFlow: data WasmTypeTag (a :: WasmType)
- GHC.Wasm.ControlFlow.FromCmm: structuredControl :: forall expr stmt m. Applicative m => Platform -> (Label -> CmmExpr -> m expr) -> (Label -> CmmActions -> m stmt) -> CmmGraph -> m (WasmControl stmt expr '[] '[ 'I32])
+ GHC.Wasm.ControlFlow.FromCmm: structuredControl :: forall expr stmt m. Applicative m => Platform -> UniqSupply -> (Label -> CmmExpr -> m expr) -> (Label -> CmmActions -> m stmt) -> CmmGraph -> m (WasmControl stmt expr ('[] :: [WasmType]) '[ 'I32])
- Language.Haskell.Syntax.Binds: isCompleteMatchSig :: forall p. UnXRec p => LSig p -> Bool
+ Language.Haskell.Syntax.Binds: isCompleteMatchSig :: UnXRec p => LSig p -> Bool
- Language.Haskell.Syntax.Binds: isFixityLSig :: forall p. UnXRec p => LSig p -> Bool
+ Language.Haskell.Syntax.Binds: isFixityLSig :: UnXRec p => LSig p -> Bool
- Language.Haskell.Syntax.Binds: isInlineLSig :: forall p. UnXRec p => LSig p -> Bool
+ Language.Haskell.Syntax.Binds: isInlineLSig :: UnXRec p => LSig p -> Bool
- Language.Haskell.Syntax.Binds: isMinimalLSig :: forall p. UnXRec p => LSig p -> Bool
+ Language.Haskell.Syntax.Binds: isMinimalLSig :: UnXRec p => LSig p -> Bool
- Language.Haskell.Syntax.Binds: isPragLSig :: forall p. UnXRec p => LSig p -> Bool
+ Language.Haskell.Syntax.Binds: isPragLSig :: UnXRec p => LSig p -> Bool
- Language.Haskell.Syntax.Binds: isSCCFunSig :: forall p. UnXRec p => LSig p -> Bool
+ Language.Haskell.Syntax.Binds: isSCCFunSig :: UnXRec p => LSig p -> Bool
- Language.Haskell.Syntax.Binds: isSpecInstLSig :: forall p. UnXRec p => LSig p -> Bool
+ Language.Haskell.Syntax.Binds: isSpecInstLSig :: UnXRec p => LSig p -> Bool
- Language.Haskell.Syntax.Binds: isSpecLSig :: forall p. UnXRec p => LSig p -> Bool
+ Language.Haskell.Syntax.Binds: isSpecLSig :: UnXRec p => LSig p -> Bool
- Language.Haskell.Syntax.Binds: isTypeLSig :: forall p. UnXRec p => LSig p -> Bool
+ Language.Haskell.Syntax.Binds: isTypeLSig :: UnXRec p => LSig p -> Bool
- Language.Haskell.Syntax.Binds: type HsPatSynDetails pass = HsConDetails Void (LIdP pass) [RecordPatSynField pass]
+ Language.Haskell.Syntax.Binds: type HsPatSynDetails pass = HsConDetails Void LIdP pass [RecordPatSynField pass]
- Language.Haskell.Syntax.Binds: type LFixitySig pass = XRec pass (FixitySig pass)
+ Language.Haskell.Syntax.Binds: type LFixitySig pass = XRec pass FixitySig pass
- Language.Haskell.Syntax.Binds: type LHsBindLR idL idR = XRec idL (HsBindLR idL idR)
+ Language.Haskell.Syntax.Binds: type LHsBindLR idL idR = XRec idL HsBindLR idL idR
- Language.Haskell.Syntax.Binds: type LHsBindsLR idL idR = Bag (LHsBindLR idL idR)
+ Language.Haskell.Syntax.Binds: type LHsBindsLR idL idR = Bag LHsBindLR idL idR
- Language.Haskell.Syntax.Binds: type LHsLocalBinds id = XRec id (HsLocalBinds id)
+ Language.Haskell.Syntax.Binds: type LHsLocalBinds id = XRec id HsLocalBinds id
- Language.Haskell.Syntax.Binds: type LHsLocalBindsLR idL idR = XRec idL (HsLocalBindsLR idL idR)
+ Language.Haskell.Syntax.Binds: type LHsLocalBindsLR idL idR = XRec idL HsLocalBindsLR idL idR
- Language.Haskell.Syntax.Binds: type LIPBind id = XRec id (IPBind id)
+ Language.Haskell.Syntax.Binds: type LIPBind id = XRec id IPBind id
- Language.Haskell.Syntax.Binds: type LSig pass = XRec pass (Sig pass)
+ Language.Haskell.Syntax.Binds: type LSig pass = XRec pass Sig pass
- Language.Haskell.Syntax.Concrete: type LHsToken tok p = XRec p (HsToken tok)
+ Language.Haskell.Syntax.Concrete: type LHsToken (tok :: Symbol) p = XRec p HsToken tok
- Language.Haskell.Syntax.Concrete: type LHsUniToken tok utok p = XRec p (HsUniToken tok utok)
+ Language.Haskell.Syntax.Concrete: type LHsUniToken (tok :: Symbol) (utok :: Symbol) p = XRec p HsUniToken tok utok
- Language.Haskell.Syntax.Decls: ConDeclGADT :: XConDeclGADT pass -> NonEmpty (LIdP pass) -> !LHsUniToken "::" "∷" pass -> XRec pass (HsOuterSigTyVarBndrs pass) -> Maybe (LHsContext pass) -> HsConDeclGADTDetails pass -> LHsType pass -> Maybe (LHsDoc pass) -> ConDecl pass
+ Language.Haskell.Syntax.Decls: ConDeclGADT :: XConDeclGADT pass -> NonEmpty (LIdP pass) -> !LHsUniToken "::" "\8759" pass -> XRec pass (HsOuterSigTyVarBndrs pass) -> Maybe (LHsContext pass) -> HsConDeclGADTDetails pass -> LHsType pass -> Maybe (LHsDoc pass) -> ConDecl pass
- Language.Haskell.Syntax.Decls: RecConGADT :: XRec pass [LConDeclField pass] -> LHsUniToken "->" "→" pass -> HsConDeclGADTDetails pass
+ Language.Haskell.Syntax.Decls: RecConGADT :: XRec pass [LConDeclField pass] -> LHsUniToken "->" "\8594" pass -> HsConDeclGADTDetails pass
- Language.Haskell.Syntax.Decls: [con_dcolon] :: ConDecl pass -> !LHsUniToken "::" "∷" pass
+ Language.Haskell.Syntax.Decls: [con_dcolon] :: ConDecl pass -> !LHsUniToken "::" "\8759" pass
- Language.Haskell.Syntax.Decls: annProvenanceName_maybe :: forall p. UnXRec p => AnnProvenance p -> Maybe (IdP p)
+ Language.Haskell.Syntax.Decls: annProvenanceName_maybe :: UnXRec p => AnnProvenance p -> Maybe (IdP p)
- Language.Haskell.Syntax.Decls: type HsConDeclH98Details pass = HsConDetails Void (HsScaled pass (LBangType pass)) (XRec pass [LConDeclField pass])
+ Language.Haskell.Syntax.Decls: type HsConDeclH98Details pass = HsConDetails Void HsScaled pass LBangType pass XRec pass [LConDeclField pass]
- Language.Haskell.Syntax.Decls: type HsDeriving 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. [LHsDerivingClause pass]
+ Language.Haskell.Syntax.Decls: type HsDeriving pass = [LHsDerivingClause pass]
- Language.Haskell.Syntax.Decls: type LAnnDecl pass = XRec pass (AnnDecl pass)
+ Language.Haskell.Syntax.Decls: type LAnnDecl pass = XRec pass AnnDecl pass
- Language.Haskell.Syntax.Decls: type LClsInstDecl pass = XRec pass (ClsInstDecl pass)
+ Language.Haskell.Syntax.Decls: type LClsInstDecl pass = XRec pass ClsInstDecl pass
- Language.Haskell.Syntax.Decls: type LConDecl pass = -- | May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnSemi' when -- in a GADT constructor list XRec pass (ConDecl pass)
+ Language.Haskell.Syntax.Decls: type LConDecl pass = XRec pass ConDecl pass
- Language.Haskell.Syntax.Decls: type LDataFamInstDecl pass = XRec pass (DataFamInstDecl pass)
+ Language.Haskell.Syntax.Decls: type LDataFamInstDecl pass = XRec pass DataFamInstDecl pass
- Language.Haskell.Syntax.Decls: type LDefaultDecl pass = XRec pass (DefaultDecl pass)
+ Language.Haskell.Syntax.Decls: type LDefaultDecl pass = XRec pass DefaultDecl pass
- Language.Haskell.Syntax.Decls: type LDerivClauseTys pass = XRec pass (DerivClauseTys pass)
+ Language.Haskell.Syntax.Decls: type LDerivClauseTys pass = XRec pass DerivClauseTys pass
- Language.Haskell.Syntax.Decls: type LDerivDecl pass = XRec pass (DerivDecl pass)
+ Language.Haskell.Syntax.Decls: type LDerivDecl pass = XRec pass DerivDecl pass
- Language.Haskell.Syntax.Decls: type LDerivStrategy pass = XRec pass (DerivStrategy pass)
+ Language.Haskell.Syntax.Decls: type LDerivStrategy pass = XRec pass DerivStrategy pass
- Language.Haskell.Syntax.Decls: type LDocDecl pass = XRec pass (DocDecl pass)
+ Language.Haskell.Syntax.Decls: type LDocDecl pass = XRec pass DocDecl pass
- Language.Haskell.Syntax.Decls: type LFamilyDecl pass = XRec pass (FamilyDecl pass)
+ Language.Haskell.Syntax.Decls: type LFamilyDecl pass = XRec pass FamilyDecl pass
- Language.Haskell.Syntax.Decls: type LFamilyResultSig pass = XRec pass (FamilyResultSig pass)
+ Language.Haskell.Syntax.Decls: type LFamilyResultSig pass = XRec pass FamilyResultSig pass
- Language.Haskell.Syntax.Decls: type LForeignDecl pass = XRec pass (ForeignDecl pass)
+ Language.Haskell.Syntax.Decls: type LForeignDecl pass = XRec pass ForeignDecl pass
- Language.Haskell.Syntax.Decls: type LHsDecl p = -- | When in a list this may have -- -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnSemi' -- XRec p (HsDecl p)
+ Language.Haskell.Syntax.Decls: type LHsDecl p = XRec p HsDecl p
- Language.Haskell.Syntax.Decls: type LHsDerivingClause pass = XRec pass (HsDerivingClause pass)
+ Language.Haskell.Syntax.Decls: type LHsDerivingClause pass = XRec pass HsDerivingClause pass
- Language.Haskell.Syntax.Decls: type LHsFunDep pass = XRec pass (FunDep pass)
+ Language.Haskell.Syntax.Decls: type LHsFunDep pass = XRec pass FunDep pass
- Language.Haskell.Syntax.Decls: type LInjectivityAnn pass = XRec pass (InjectivityAnn pass)
+ Language.Haskell.Syntax.Decls: type LInjectivityAnn pass = XRec pass InjectivityAnn pass
- Language.Haskell.Syntax.Decls: type LInstDecl pass = XRec pass (InstDecl pass)
+ Language.Haskell.Syntax.Decls: type LInstDecl pass = XRec pass InstDecl pass
- Language.Haskell.Syntax.Decls: type LRoleAnnotDecl pass = XRec pass (RoleAnnotDecl pass)
+ Language.Haskell.Syntax.Decls: type LRoleAnnotDecl pass = XRec pass RoleAnnotDecl pass
- Language.Haskell.Syntax.Decls: type LRuleBndr pass = XRec pass (RuleBndr pass)
+ Language.Haskell.Syntax.Decls: type LRuleBndr pass = XRec pass RuleBndr pass
- Language.Haskell.Syntax.Decls: type LRuleDecl pass = XRec pass (RuleDecl pass)
+ Language.Haskell.Syntax.Decls: type LRuleDecl pass = XRec pass RuleDecl pass
- Language.Haskell.Syntax.Decls: type LRuleDecls pass = XRec pass (RuleDecls pass)
+ Language.Haskell.Syntax.Decls: type LRuleDecls pass = XRec pass RuleDecls pass
- Language.Haskell.Syntax.Decls: type LSpliceDecl pass = XRec pass (SpliceDecl pass)
+ Language.Haskell.Syntax.Decls: type LSpliceDecl pass = XRec pass SpliceDecl pass
- Language.Haskell.Syntax.Decls: type LStandaloneKindSig pass = XRec pass (StandaloneKindSig pass)
+ Language.Haskell.Syntax.Decls: type LStandaloneKindSig pass = XRec pass StandaloneKindSig pass
- Language.Haskell.Syntax.Decls: type LTyClDecl pass = XRec pass (TyClDecl pass)
+ Language.Haskell.Syntax.Decls: type LTyClDecl pass = XRec pass TyClDecl pass
- Language.Haskell.Syntax.Decls: type LTyFamDefltDecl pass = XRec pass (TyFamDefltDecl pass)
+ Language.Haskell.Syntax.Decls: type LTyFamDefltDecl pass = XRec pass TyFamDefltDecl pass
- Language.Haskell.Syntax.Decls: type LTyFamInstDecl pass = XRec pass (TyFamInstDecl pass)
+ Language.Haskell.Syntax.Decls: type LTyFamInstDecl pass = XRec pass TyFamInstDecl pass
- Language.Haskell.Syntax.Decls: type LTyFamInstEqn pass = -- | May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnSemi' -- when in a list XRec pass (TyFamInstEqn pass)
+ Language.Haskell.Syntax.Decls: type LTyFamInstEqn pass = XRec pass TyFamInstEqn pass
- Language.Haskell.Syntax.Decls: type LWarnDecl pass = XRec pass (WarnDecl pass)
+ Language.Haskell.Syntax.Decls: type LWarnDecl pass = XRec pass WarnDecl pass
- Language.Haskell.Syntax.Decls: type LWarnDecls pass = XRec pass (WarnDecls pass)
+ Language.Haskell.Syntax.Decls: type LWarnDecls pass = XRec pass WarnDecls pass
- Language.Haskell.Syntax.Decls: type TyFamInstEqn pass = FamEqn pass (LHsType pass)
+ Language.Haskell.Syntax.Decls: type TyFamInstEqn pass = FamEqn pass LHsType pass
- Language.Haskell.Syntax.Expr: RecordUpd :: XRecordUpd p -> LHsExpr p -> Either [LHsRecUpdField p] [LHsRecUpdProj p] -> HsExpr p
+ Language.Haskell.Syntax.Expr: RecordUpd :: XRecordUpd p -> LHsExpr p -> LHsRecUpdFields p -> HsExpr p
- Language.Haskell.Syntax.Expr: [rupd_flds] :: HsExpr p -> Either [LHsRecUpdField p] [LHsRecUpdProj p]
+ Language.Haskell.Syntax.Expr: [rupd_flds] :: HsExpr p -> LHsRecUpdFields p
- Language.Haskell.Syntax.Expr: type CmdLStmt id = LStmt id (LHsCmd id)
+ Language.Haskell.Syntax.Expr: type CmdLStmt id = LStmt id LHsCmd id
- Language.Haskell.Syntax.Expr: type CmdStmt id = Stmt id (LHsCmd id)
+ Language.Haskell.Syntax.Expr: type CmdStmt id = Stmt id LHsCmd id
- Language.Haskell.Syntax.Expr: type ExprLStmt id = LStmt id (LHsExpr id)
+ Language.Haskell.Syntax.Expr: type ExprLStmt id = LStmt id LHsExpr id
- Language.Haskell.Syntax.Expr: type ExprStmt id = Stmt id (LHsExpr id)
+ Language.Haskell.Syntax.Expr: type ExprStmt id = Stmt id LHsExpr id
- Language.Haskell.Syntax.Expr: type FailOperator id = Maybe (SyntaxExpr id)
+ Language.Haskell.Syntax.Expr: type FailOperator id = Maybe SyntaxExpr id
- Language.Haskell.Syntax.Expr: type GhciLStmt id = LStmt id (LHsExpr id)
+ Language.Haskell.Syntax.Expr: type GhciLStmt id = LStmt id LHsExpr id
- Language.Haskell.Syntax.Expr: type GhciStmt id = Stmt id (LHsExpr id)
+ Language.Haskell.Syntax.Expr: type GhciStmt id = Stmt id LHsExpr id
- Language.Haskell.Syntax.Expr: type GuardLStmt id = LStmt id (LHsExpr id)
+ Language.Haskell.Syntax.Expr: type GuardLStmt id = LStmt id LHsExpr id
- Language.Haskell.Syntax.Expr: type GuardStmt id = Stmt id (LHsExpr id)
+ Language.Haskell.Syntax.Expr: type GuardStmt id = Stmt id LHsExpr id
- Language.Haskell.Syntax.Expr: type HsRecordBinds p = HsRecFields p (LHsExpr p)
+ Language.Haskell.Syntax.Expr: type HsRecordBinds p = HsRecFields p LHsExpr p
- Language.Haskell.Syntax.Expr: type LFieldLabelStrings p = XRec p (FieldLabelStrings p)
+ Language.Haskell.Syntax.Expr: type LFieldLabelStrings p = XRec p FieldLabelStrings p
- Language.Haskell.Syntax.Expr: type LGRHS id body = XRec id (GRHS id body)
+ Language.Haskell.Syntax.Expr: type LGRHS id body = XRec id GRHS id body
- Language.Haskell.Syntax.Expr: type LHsCmd id = XRec id (HsCmd id)
+ Language.Haskell.Syntax.Expr: type LHsCmd id = XRec id HsCmd id
- Language.Haskell.Syntax.Expr: type LHsCmdTop p = XRec p (HsCmdTop p)
+ Language.Haskell.Syntax.Expr: type LHsCmdTop p = XRec p HsCmdTop p
- Language.Haskell.Syntax.Expr: type LHsExpr p = -- | May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnComma' when -- in a list XRec p (HsExpr p)
+ Language.Haskell.Syntax.Expr: type LHsExpr p = XRec p HsExpr p
- Language.Haskell.Syntax.Expr: type LHsRecProj p arg = XRec p (RecProj p arg)
+ Language.Haskell.Syntax.Expr: type LHsRecProj p arg = XRec p RecProj p arg
- Language.Haskell.Syntax.Expr: type LHsRecUpdProj p = XRec p (RecUpdProj p)
+ Language.Haskell.Syntax.Expr: type LHsRecUpdProj p = XRec p RecUpdProj p
- Language.Haskell.Syntax.Expr: type LHsTupArg id = XRec id (HsTupArg id)
+ Language.Haskell.Syntax.Expr: type LHsTupArg id = XRec id HsTupArg id
- Language.Haskell.Syntax.Expr: type LMatch id body = XRec id (Match id body)
+ Language.Haskell.Syntax.Expr: type LMatch id body = XRec id Match id body
- Language.Haskell.Syntax.Expr: type LStmt id body = XRec id (StmtLR id id body)
+ Language.Haskell.Syntax.Expr: type LStmt id body = XRec id StmtLR id id body
- Language.Haskell.Syntax.Expr: type LStmtLR idL idR body = XRec idL (StmtLR idL idR body)
+ Language.Haskell.Syntax.Expr: type LStmtLR idL idR body = XRec idL StmtLR idL idR body
- Language.Haskell.Syntax.Expr: type RecProj p arg = HsFieldBind (LFieldLabelStrings p) arg
+ Language.Haskell.Syntax.Expr: type RecProj p arg = HsFieldBind LFieldLabelStrings p arg
- Language.Haskell.Syntax.Expr: type RecUpdProj p = RecProj p (LHsExpr p)
+ Language.Haskell.Syntax.Expr: type RecUpdProj p = RecProj p LHsExpr p
- Language.Haskell.Syntax.Extension: type LIdP p = XRec p (IdP p)
+ Language.Haskell.Syntax.Extension: type LIdP p = XRec p IdP p
- Language.Haskell.Syntax.Extension: type family NoGhcTc (p :: Type)
+ Language.Haskell.Syntax.Extension: type family NoGhcTc p
- Language.Haskell.Syntax.ImpExp: type LIE pass = -- | When in a list this may have -- -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnComma' XRec pass (IE pass)
+ Language.Haskell.Syntax.ImpExp: type LIE pass = XRec pass IE pass
- Language.Haskell.Syntax.ImpExp: type LIEWrappedName p = XRec p (IEWrappedName p)
+ Language.Haskell.Syntax.ImpExp: type LIEWrappedName p = XRec p IEWrappedName p
- Language.Haskell.Syntax.ImpExp: type LImportDecl pass = -- | When in a list this may have -- -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnSemi' XRec pass (ImportDecl pass)
+ Language.Haskell.Syntax.ImpExp: type LImportDecl pass = XRec pass ImportDecl pass
- Language.Haskell.Syntax.Pat: hsConPatArgs :: forall p. UnXRec p => HsConPatDetails p -> [LPat p]
+ Language.Haskell.Syntax.Pat: hsConPatArgs :: UnXRec p => HsConPatDetails p -> [LPat p]
- Language.Haskell.Syntax.Pat: hsRecFieldSel :: forall p arg. UnXRec p => HsRecField p arg -> XCFieldOcc p
+ Language.Haskell.Syntax.Pat: hsRecFieldSel :: UnXRec p => HsRecField p arg -> XCFieldOcc p
- Language.Haskell.Syntax.Pat: hsRecFields :: forall p arg. UnXRec p => HsRecFields p arg -> [XCFieldOcc p]
+ Language.Haskell.Syntax.Pat: hsRecFields :: UnXRec p => HsRecFields p arg -> [XCFieldOcc p]
- Language.Haskell.Syntax.Pat: hsRecFieldsArgs :: forall p arg. UnXRec p => HsRecFields p arg -> [arg]
+ Language.Haskell.Syntax.Pat: hsRecFieldsArgs :: UnXRec p => HsRecFields p arg -> [arg]
- Language.Haskell.Syntax.Pat: type HsConPatDetails p = HsConDetails (HsConPatTyArg (NoGhcTc p)) (LPat p) (HsRecFields p (LPat p))
+ Language.Haskell.Syntax.Pat: type HsConPatDetails p = HsConDetails HsConPatTyArg NoGhcTc p LPat p HsRecFields p LPat p
- Language.Haskell.Syntax.Pat: type HsRecField p arg = HsFieldBind (LFieldOcc p) arg
+ Language.Haskell.Syntax.Pat: type HsRecField p arg = HsFieldBind LFieldOcc p arg
- Language.Haskell.Syntax.Pat: type HsRecUpdField p = HsFieldBind (LAmbiguousFieldOcc p) (LHsExpr p)
+ Language.Haskell.Syntax.Pat: type HsRecUpdField p q = HsFieldBind LAmbiguousFieldOcc p LHsExpr q
- Language.Haskell.Syntax.Pat: type LHsFieldBind p id arg = XRec p (HsFieldBind id arg)
+ Language.Haskell.Syntax.Pat: type LHsFieldBind p id arg = XRec p HsFieldBind id arg
- Language.Haskell.Syntax.Pat: type LHsRecField p arg = XRec p (HsRecField p arg)
+ Language.Haskell.Syntax.Pat: type LHsRecField p arg = XRec p HsRecField p arg
- Language.Haskell.Syntax.Pat: type LHsRecUpdField p = XRec p (HsRecUpdField p)
+ Language.Haskell.Syntax.Pat: type LHsRecUpdField p q = XRec p HsRecUpdField p q
- Language.Haskell.Syntax.Pat: type LPat p = XRec p (Pat p)
+ Language.Haskell.Syntax.Pat: type LPat p = XRec p Pat p
- Language.Haskell.Syntax.Type: HsAppKindTy :: XAppKindTy pass -> LHsType pass -> LHsKind pass -> HsType pass
+ Language.Haskell.Syntax.Type: HsAppKindTy :: XAppKindTy pass -> LHsType pass -> !LHsToken "@" pass -> LHsKind pass -> HsType pass
- Language.Haskell.Syntax.Type: HsArgPar :: SrcSpan -> HsArg tm ty
+ Language.Haskell.Syntax.Type: HsArgPar :: SrcSpan -> HsArg p tm ty
- Language.Haskell.Syntax.Type: HsExplicitMult :: !LHsToken "%" pass -> !LHsType pass -> !LHsUniToken "->" "→" pass -> HsArrow pass
+ Language.Haskell.Syntax.Type: HsExplicitMult :: !LHsToken "%" pass -> !LHsType pass -> !LHsUniToken "->" "\8594" pass -> HsArrow pass
- Language.Haskell.Syntax.Type: HsLolly :: !LHsToken "⊸" pass -> HsLinearArrowTokens pass
+ Language.Haskell.Syntax.Type: HsLolly :: !LHsToken "\8888" pass -> HsLinearArrowTokens pass
- Language.Haskell.Syntax.Type: HsPct1 :: !LHsToken "%1" pass -> !LHsUniToken "->" "→" pass -> HsLinearArrowTokens pass
+ Language.Haskell.Syntax.Type: HsPct1 :: !LHsToken "%1" pass -> !LHsUniToken "->" "\8594" pass -> HsLinearArrowTokens pass
- Language.Haskell.Syntax.Type: HsQTvs :: XHsQTvs pass -> [LHsTyVarBndr () pass] -> LHsQTyVars pass
+ Language.Haskell.Syntax.Type: HsQTvs :: XHsQTvs pass -> [LHsTyVarBndr (HsBndrVis pass) pass] -> LHsQTyVars pass
- Language.Haskell.Syntax.Type: HsTypeArg :: SrcSpan -> ty -> HsArg tm ty
+ Language.Haskell.Syntax.Type: HsTypeArg :: !LHsToken "@" p -> ty -> HsArg p tm ty
- Language.Haskell.Syntax.Type: HsUnrestrictedArrow :: !LHsUniToken "->" "→" pass -> HsArrow pass
+ Language.Haskell.Syntax.Type: HsUnrestrictedArrow :: !LHsUniToken "->" "\8594" pass -> HsArrow pass
- Language.Haskell.Syntax.Type: HsValArg :: tm -> HsArg tm ty
+ Language.Haskell.Syntax.Type: HsValArg :: tm -> HsArg p tm ty
- Language.Haskell.Syntax.Type: [hsq_explicit] :: LHsQTyVars pass -> [LHsTyVarBndr () pass]
+ Language.Haskell.Syntax.Type: [hsq_explicit] :: LHsQTyVars pass -> [LHsTyVarBndr (HsBndrVis pass) pass]
- Language.Haskell.Syntax.Type: data HsArg tm ty
+ Language.Haskell.Syntax.Type: data HsArg p tm ty
- Language.Haskell.Syntax.Type: hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr () pass]
+ Language.Haskell.Syntax.Type: hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr (HsBndrVis pass) pass]
- Language.Haskell.Syntax.Type: type LAmbiguousFieldOcc pass = XRec pass (AmbiguousFieldOcc pass)
+ Language.Haskell.Syntax.Type: type LAmbiguousFieldOcc pass = XRec pass AmbiguousFieldOcc pass
- Language.Haskell.Syntax.Type: type LBangType pass = XRec pass (BangType pass)
+ Language.Haskell.Syntax.Type: type LBangType pass = XRec pass BangType pass
- Language.Haskell.Syntax.Type: type LConDeclField pass = -- | May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnComma' when -- in a list XRec pass (ConDeclField pass)
+ Language.Haskell.Syntax.Type: type LConDeclField pass = XRec pass ConDeclField pass
- Language.Haskell.Syntax.Type: type LFieldOcc pass = XRec pass (FieldOcc pass)
+ Language.Haskell.Syntax.Type: type LFieldOcc pass = XRec pass FieldOcc pass
- Language.Haskell.Syntax.Type: type LHsContext pass = -- | 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnUnit' -- For details on above see Note [exact print annotations] in GHC.Parser.Annotation XRec pass (HsContext pass)
+ Language.Haskell.Syntax.Type: type LHsContext pass = XRec pass HsContext pass
- Language.Haskell.Syntax.Type: type LHsKind pass = -- | 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnDcolon' XRec pass (HsKind pass)
+ Language.Haskell.Syntax.Type: type LHsKind pass = XRec pass HsKind pass
- Language.Haskell.Syntax.Type: type LHsSigType pass = XRec pass (HsSigType pass)
+ Language.Haskell.Syntax.Type: type LHsSigType pass = XRec pass HsSigType pass
- Language.Haskell.Syntax.Type: type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass)
+ Language.Haskell.Syntax.Type: type LHsSigWcType pass = HsWildCardBndrs pass LHsSigType pass
- Language.Haskell.Syntax.Type: type LHsTyVarBndr flag pass = XRec pass (HsTyVarBndr flag pass)
+ Language.Haskell.Syntax.Type: type LHsTyVarBndr flag pass = XRec pass HsTyVarBndr flag pass
- Language.Haskell.Syntax.Type: type LHsType pass = -- | May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnComma' when -- in a list XRec pass (HsType pass)
+ Language.Haskell.Syntax.Type: type LHsType pass = XRec pass HsType pass
- Language.Haskell.Syntax.Type: type LHsTypeArg p = HsArg (LHsType p) (LHsKind p)
+ Language.Haskell.Syntax.Type: type LHsTypeArg p = HsArg p LHsType p LHsKind p
- Language.Haskell.Syntax.Type: type LHsWcType pass = HsWildCardBndrs pass (LHsType pass)
+ Language.Haskell.Syntax.Type: type LHsWcType pass = HsWildCardBndrs pass LHsType pass
Files
- CodeGen.Platform.h +30/−30
- GHC.hs +86/−47
- GHC/Builtin/Names.hs +46/−37
- GHC/Builtin/Names/TH.hs +51/−16
- GHC/Builtin/PrimOps.hs +8/−1
- GHC/Builtin/Types.hs +79/−18
- GHC/Builtin/Types/Literals.hs +6/−6
- GHC/Builtin/Types/Prim.hs +5/−5
- GHC/Builtin/Uniques.hs +52/−37
- GHC/Builtin/Uniques.hs-boot +0/−2
- GHC/Builtin/Utils.hs +4/−4
- GHC/Builtin/bytearray-ops.txt.pp +0/−551
- GHC/Builtin/primops.txt.pp +296/−374
- GHC/ByteCode/Asm.hs +53/−37
- GHC/ByteCode/Instr.hs +65/−57
- GHC/ByteCode/Linker.hs +1/−1
- GHC/ByteCode/Types.hs +9/−7
- GHC/Cmm.hs +3/−2
- GHC/Cmm/CLabel.hs +1/−1
- GHC/Cmm/CallConv.hs +71/−58
- GHC/Cmm/CommonBlockElim.hs +1/−4
- GHC/Cmm/Dataflow/Collections.hs +6/−7
- GHC/Cmm/Dataflow/Label.hs +4/−5
- GHC/Cmm/DebugBlock.hs +3/−3
- GHC/Cmm/Dominators.hs +10/−16
- GHC/Cmm/Expr.hs +14/−6
- GHC/Cmm/Graph.hs +28/−20
- GHC/Cmm/LRegSet.hs +14/−15
- GHC/Cmm/LayoutStack.hs +12/−12
- GHC/Cmm/Lexer.hs +31/−24
- GHC/Cmm/Lint.hs +3/−18
- GHC/Cmm/MachOp.hs +38/−0
- GHC/Cmm/Node.hs +0/−1
- GHC/Cmm/Opt.hs +2/−19
- GHC/Cmm/Parser.hs +122/−100
- GHC/Cmm/Reg.hs +102/−144
- GHC/Cmm/Sink.hs +21/−21
- GHC/Cmm/ThreadSanitizer.hs +16/−11
- GHC/Cmm/Type.hs +5/−1
- GHC/Cmm/Utils.hs +44/−19
- GHC/CmmToAsm.hs +4/−4
- GHC/CmmToAsm/AArch64.hs +0/−1
- GHC/CmmToAsm/AArch64/CodeGen.hs +55/−17
- GHC/CmmToAsm/AArch64/Instr.hs +29/−21
- GHC/CmmToAsm/AArch64/Ppr.hs +34/−41
- GHC/CmmToAsm/AArch64/Regs.hs +0/−1
- GHC/CmmToAsm/BlockLayout.hs +4/−3
- GHC/CmmToAsm/CFG.hs +7/−12
- GHC/CmmToAsm/CFG/Dominators.hs +70/−93
- GHC/CmmToAsm/Dwarf.hs +8/−6
- GHC/CmmToAsm/Dwarf/Types.hs +12/−10
- GHC/CmmToAsm/Instr.hs +1/−7
- GHC/CmmToAsm/Monad.hs +0/−26
- GHC/CmmToAsm/PIC.hs +3/−3
- GHC/CmmToAsm/PPC.hs +0/−1
- GHC/CmmToAsm/PPC/CodeGen.hs +48/−16
- GHC/CmmToAsm/PPC/Instr.hs +11/−8
- GHC/CmmToAsm/PPC/Ppr.hs +18/−0
- GHC/CmmToAsm/Ppr.hs +2/−3
- GHC/CmmToAsm/Reg/Graph/TrivColorable.hs +1/−2
- GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs +1/−2
- GHC/CmmToAsm/Reg/Liveness.hs +0/−5
- GHC/CmmToAsm/Wasm/Asm.hs +5/−5
- GHC/CmmToAsm/Wasm/FromCmm.hs +33/−31
- GHC/CmmToAsm/Wasm/Types.hs +15/−8
- GHC/CmmToAsm/Wasm/Utils.hs +1/−1
- GHC/CmmToAsm/X86.hs +0/−1
- GHC/CmmToAsm/X86/CodeGen.hs +103/−40
- GHC/CmmToAsm/X86/Instr.hs +21/−13
- GHC/CmmToAsm/X86/Ppr.hs +23/−1
- GHC/CmmToC.hs +40/−19
- GHC/CmmToLlvm.hs +39/−29
- GHC/CmmToLlvm/Base.hs +14/−14
- GHC/CmmToLlvm/CodeGen.hs +73/−49
- GHC/CmmToLlvm/Data.hs +0/−1
- GHC/CmmToLlvm/Mangler.hs +24/−1
- GHC/CmmToLlvm/Ppr.hs +13/−6
- GHC/CmmToLlvm/Regs.hs +15/−15
- GHC/Core.hs +66/−38
- GHC/Core/Class.hs +5/−2
- GHC/Core/Coercion.hs +49/−43
- GHC/Core/Coercion.hs-boot +5/−5
- GHC/Core/Coercion/Opt.hs +82/−58
- GHC/Core/ConLike.hs +19/−5
- GHC/Core/DataCon.hs +62/−119
- GHC/Core/FamInstEnv.hs +38/−3
- GHC/Core/InstEnv.hs +254/−69
- GHC/Core/LateCC.hs +2/−2
- GHC/Core/Lint.hs +120/−32
- GHC/Core/Make.hs +17/−17
- GHC/Core/Map/Type.hs +1/−1
- GHC/Core/Opt/Arity.hs +16/−6
- GHC/Core/Opt/CallerCC.hs +2/−95
- GHC/Core/Opt/CallerCC.hs-boot +0/−8
- GHC/Core/Opt/CallerCC/Types.hs +113/−0
- GHC/Core/Opt/ConstantFold.hs +297/−16
- GHC/Core/Opt/CprAnal.hs +4/−40
- GHC/Core/Opt/DmdAnal.hs +146/−90
- GHC/Core/Opt/FloatIn.hs +2/−2
- GHC/Core/Opt/LiberateCase.hs +1/−0
- GHC/Core/Opt/Monad.hs +11/−11
- GHC/Core/Opt/OccurAnal.hs +396/−239
- GHC/Core/Opt/Pipeline.hs +3/−3
- GHC/Core/Opt/SetLevels.hs +8/−9
- GHC/Core/Opt/Simplify/Inline.hs +555/−0
- GHC/Core/Opt/Simplify/Iteration.hs +32/−34
- GHC/Core/Opt/Simplify/Monad.hs +5/−5
- GHC/Core/Opt/Simplify/Utils.hs +12/−7
- GHC/Core/Opt/SpecConstr.hs +16/−3
- GHC/Core/Opt/Specialise.hs +3/−4
- GHC/Core/Opt/WorkWrap.hs +5/−5
- GHC/Core/Opt/WorkWrap/Utils.hs +2/−3
- GHC/Core/Ppr.hs +3/−3
- GHC/Core/Predicate.hs +69/−65
- GHC/Core/Reduction.hs +2/−2
- GHC/Core/Rules.hs +178/−10
- GHC/Core/SimpleOpt.hs +54/−8
- GHC/Core/Subst.hs +18/−11
- GHC/Core/TyCo/Compare.hs +2/−2
- GHC/Core/TyCo/FVs.hs +46/−19
- GHC/Core/TyCo/Rep.hs +19/−112
- GHC/Core/TyCo/Rep.hs-boot +1/−0
- GHC/Core/TyCo/Subst.hs +3/−3
- GHC/Core/TyCon.hs +148/−229
- GHC/Core/TyCon/Env.hs +1/−1
- GHC/Core/Type.hs +172/−101
- GHC/Core/Type.hs-boot +2/−1
- GHC/Core/Unfold.hs +43/−573
- GHC/Core/Unify.hs +8/−8
- GHC/Core/UsageEnv.hs +13/−3
- GHC/Core/Utils.hs +92/−59
- GHC/CoreToIface.hs +13/−17
- GHC/CoreToStg.hs +46/−45
- GHC/CoreToStg/Prep.hs +12/−33
- GHC/Data/Bag.hs +38/−11
- GHC/Data/BooleanFormula.hs +1/−21
- GHC/Data/FastString.hs +9/−1
- GHC/Data/FastString/Env.hs +14/−1
- GHC/Data/Graph/Directed.hs +31/−35
- GHC/Data/Graph/UnVar.hs +4/−5
- GHC/Data/IOEnv.hs +2/−8
- GHC/Data/List/SetOps.hs +5/−1
- GHC/Data/Maybe.hs +2/−1
- GHC/Data/Word64Map.hs +0/−61
- GHC/Data/Word64Map/Internal.hs +0/−3606
- GHC/Data/Word64Map/Lazy.hs +0/−236
- GHC/Data/Word64Map/Strict.hs +0/−254
- GHC/Data/Word64Map/Strict/Internal.hs +0/−1206
- GHC/Data/Word64Set.hs +0/−172
- GHC/Data/Word64Set/Internal.hs +0/−1702
- GHC/Driver/Backend.hs +14/−17
- GHC/Driver/Backpack.hs +7/−6
- GHC/Driver/CmdLine.hs +28/−39
- GHC/Driver/CodeOutput.hs +2/−2
- GHC/Driver/Config.hs +1/−16
- GHC/Driver/Config/Cmm.hs +1/−1
- GHC/Driver/Config/Cmm/Parser.hs +1/−1
- GHC/Driver/Config/CmmToAsm.hs +2/−3
- GHC/Driver/Config/CmmToLlvm.hs +1/−1
- GHC/Driver/Config/Core/Lint.hs +6/−6
- GHC/Driver/Config/Core/Lint/Interactive.hs +1/−1
- GHC/Driver/Config/Core/Opt/Arity.hs +1/−1
- GHC/Driver/Config/Core/Opt/LiberateCase.hs +1/−1
- GHC/Driver/Config/Core/Opt/Simplify.hs +1/−36
- GHC/Driver/Config/Core/Opt/WorkWrap.hs +1/−1
- GHC/Driver/Config/Core/Rules.hs +1/−1
- GHC/Driver/Config/CoreToStg.hs +1/−1
- GHC/Driver/Config/CoreToStg/Prep.hs +0/−2
- GHC/Driver/Config/Diagnostic.hs +16/−5
- GHC/Driver/Config/Finder.hs +1/−1
- GHC/Driver/Config/HsToCore.hs +1/−1
- GHC/Driver/Config/HsToCore/Ticks.hs +7/−1
- GHC/Driver/Config/Linker.hs +1/−1
- GHC/Driver/Config/Logger.hs +1/−1
- GHC/Driver/Config/Stg/Debug.hs +1/−1
- GHC/Driver/Config/Stg/Lift.hs +1/−1
- GHC/Driver/Config/Stg/Pipeline.hs +1/−1
- GHC/Driver/Config/StgToCmm.hs +22/−2
- GHC/Driver/Config/StgToJS.hs +2/−1
- GHC/Driver/Config/Tidy.hs +5/−12
- GHC/Driver/DynFlags.hs +1539/−0
- GHC/Driver/Env.hs +19/−48
- GHC/Driver/Env/Types.hs +1/−1
- GHC/Driver/Errors.hs +8/−24
- GHC/Driver/Errors/Ppr.hs +52/−10
- GHC/Driver/Errors/Types.hs +24/−13
- GHC/Driver/Flags.hs +98/−36
- GHC/Driver/GenerateCgIPEStub.hs +96/−203
- GHC/Driver/Hooks.hs +4/−1
- GHC/Driver/Main.hs +245/−124
- GHC/Driver/Make.hs +243/−212
- GHC/Driver/MakeFile.hs +4/−5
- GHC/Driver/MakeSem.hs +545/−0
- GHC/Driver/Monad.hs +1/−1
- GHC/Driver/Pipeline.hs +40/−48
- GHC/Driver/Pipeline/Execute.hs +13/−38
- GHC/Driver/Pipeline/LogQueue.hs +2/−2
- GHC/Driver/Pipeline/Phases.hs +2/−3
- GHC/Driver/Plugins.hs +1/−1
- GHC/Driver/Ppr.hs +1/−1
- GHC/Driver/Session.hs +3811/−5050
- GHC/Hs.hs +2/−1
- GHC/Hs/Binds.hs +9/−4
- GHC/Hs/Decls.hs +12/−6
- GHC/Hs/Doc.hs +3/−3
- GHC/Hs/Dump.hs +2/−2
- GHC/Hs/Expr.hs +44/−13
- GHC/Hs/ImpExp.hs +67/−60
- GHC/Hs/Instances.hs +17/−4
- GHC/Hs/Lit.hs +35/−5
- GHC/Hs/Pat.hs +119/−25
- GHC/Hs/Syn/Type.hs +6/−0
- GHC/Hs/Type.hs +91/−30
- GHC/Hs/Utils.hs +268/−104
- GHC/HsToCore.hs +6/−6
- GHC/HsToCore/Arrows.hs +14/−17
- GHC/HsToCore/Binds.hs +163/−86
- GHC/HsToCore/Binds.hs-boot +1/−1
- GHC/HsToCore/Breakpoints.hs +5/−7
- GHC/HsToCore/Docs.hs +8/−2
- GHC/HsToCore/Errors/Ppr.hs +5/−6
- GHC/HsToCore/Errors/Types.hs +8/−7
- GHC/HsToCore/Expr.hs +81/−41
- GHC/HsToCore/Foreign/C.hs +13/−23
- GHC/HsToCore/Foreign/Call.hs +1/−1
- GHC/HsToCore/Foreign/Decl.hs +1/−1
- GHC/HsToCore/Foreign/JavaScript.hs +15/−15
- GHC/HsToCore/GuardedRHSs.hs +9/−8
- GHC/HsToCore/ListComp.hs +15/−16
- GHC/HsToCore/Match.hs +36/−21
- GHC/HsToCore/Match.hs-boot +4/−4
- GHC/HsToCore/Match/Constructor.hs +8/−8
- GHC/HsToCore/Match/Literal.hs +65/−41
- GHC/HsToCore/Monad.hs +17/−5
- GHC/HsToCore/Pmc.hs +43/−21
- GHC/HsToCore/Pmc/Check.hs +1/−1
- GHC/HsToCore/Pmc/Desugar.hs +6/−6
- GHC/HsToCore/Pmc/Solver.hs +6/−8
- GHC/HsToCore/Pmc/Utils.hs +31/−18
- GHC/HsToCore/Quote.hs +59/−43
- GHC/HsToCore/Ticks.hs +11/−10
- GHC/HsToCore/Types.hs +9/−0
- GHC/HsToCore/Usage.hs +3/−2
- GHC/HsToCore/Utils.hs +5/−15
- GHC/Iface/Binary.hs +1/−1
- GHC/Iface/Decl.hs +345/−0
- GHC/Iface/Env.hs +9/−6
- GHC/Iface/Errors.hs +41/−229
- GHC/Iface/Errors/Ppr.hs +383/−0
- GHC/Iface/Errors/Types.hs +98/−0
- GHC/Iface/Ext/Ast.hs +16/−13
- GHC/Iface/Ext/Utils.hs +1/−1
- GHC/Iface/Load.hs +73/−69
- GHC/Iface/Make.hs +98/−380
- GHC/Iface/Recomp.hs +46/−32
- GHC/Iface/Recomp/Flags.hs +1/−4
- GHC/Iface/Rename.hs +9/−12
- GHC/Iface/Syntax.hs +170/−52
- GHC/Iface/Tidy.hs +2/−5
- GHC/Iface/Type.hs +91/−36
- GHC/Iface/Type.hs-boot +2/−0
- GHC/IfaceToCore.hs +41/−60
- GHC/JS/Make.hs +36/−59
- GHC/JS/Optimizer.hs +270/−0
- GHC/JS/Ppr.hs +243/−130
- GHC/JS/Syntax.hs +133/−174
- GHC/JS/Transform.hs +146/−101
- GHC/JS/Unsat/Syntax.hs +375/−0
- GHC/Linker/Deps.hs +411/−0
- GHC/Linker/Dynamic.hs +2/−9
- GHC/Linker/Loader.hs +57/−358
- GHC/Linker/MacOS.hs +1/−1
- GHC/Linker/Types.hs +1/−1
- GHC/Llvm/MetaData.hs +6/−1
- GHC/Llvm/Ppr.hs +293/−172
- GHC/Llvm/Syntax.hs +4/−6
- GHC/Llvm/Types.hs +155/−110
- GHC/Parser.hs +13143/−12811
- GHC/Parser/Annotation.hs +12/−3
- GHC/Parser/Errors/Ppr.hs +3/−14
- GHC/Parser/Errors/Types.hs +1/−4
- GHC/Parser/HaddockLex.hs +3/−11
- GHC/Parser/Lexer.hs +4060/−3767
- GHC/Parser/PostProcess.hs +63/−46
- GHC/Parser/Types.hs +6/−0
- GHC/Platform.hs +18/−0
- GHC/Plugins.hs +2/−0
- GHC/Prelude/Basic.hs +25/−1
- GHC/Rename/Bind.hs +43/−105
- GHC/Rename/Doc.hs +5/−7
- GHC/Rename/Env.hs +2394/−2095
- GHC/Rename/Expr.hs +78/−62
- GHC/Rename/Fixity.hs +4/−18
- GHC/Rename/HsType.hs +179/−155
- GHC/Rename/Module.hs +162/−388
- GHC/Rename/Names.hs +2234/−2198
- GHC/Rename/Pat.hs +203/−102
- GHC/Rename/Splice.hs +34/−62
- GHC/Rename/Unbound.hs +89/−38
- GHC/Rename/Utils.hs +106/−189
- GHC/Runtime/Context.hs +35/−32
- GHC/Runtime/Debugger.hs +1/−1
- GHC/Runtime/Eval.hs +45/−31
- GHC/Runtime/Heap/Inspect.hs +12/−27
- GHC/Runtime/Heap/Layout.hs +3/−3
- GHC/Runtime/Interpreter.hs +142/−219
- GHC/Runtime/Interpreter/JS.hs +403/−0
- GHC/Runtime/Interpreter/Process.hs +102/−0
- GHC/Runtime/Interpreter/Types.hs +108/−19
- GHC/Runtime/Loader.hs +56/−17
- GHC/Runtime/Utils.hs +84/−0
- GHC/Settings.hs +4/−1
- GHC/Settings/Constants.hs +21/−0
- GHC/Settings/IO.hs +20/−33
- GHC/Stg/BcPrep.hs +10/−8
- GHC/Stg/CSE.hs +8/−8
- GHC/Stg/Debug.hs +20/−24
- GHC/Stg/FVs.hs +67/−52
- GHC/Stg/InferTags.hs +8/−8
- GHC/Stg/InferTags/Rewrite.hs +13/−13
- GHC/Stg/InferTags/TagSig.hs +10/−5
- GHC/Stg/InferTags/Types.hs +0/−5
- GHC/Stg/Lift.hs +6/−6
- GHC/Stg/Lift/Analysis.hs +10/−80
- GHC/Stg/Lift/Monad.hs +7/−9
- GHC/Stg/Lift/Types.hs +92/−0
- GHC/Stg/Lint.hs +6/−6
- GHC/Stg/Pipeline.hs +10/−13
- GHC/Stg/Stats.hs +2/−2
- GHC/Stg/Syntax.hs +96/−31
- GHC/Stg/Unarise.hs +4/−4
- GHC/StgToByteCode.hs +71/−93
- GHC/StgToCmm.hs +5/−4
- GHC/StgToCmm/ArgRep.hs +1/−2
- GHC/StgToCmm/Bind.hs +12/−25
- GHC/StgToCmm/CgUtils.hs +26/−24
- GHC/StgToCmm/Closure.hs +56/−120
- GHC/StgToCmm/Config.hs +4/−3
- GHC/StgToCmm/DataCon.hs +4/−3
- GHC/StgToCmm/Env.hs +1/−1
- GHC/StgToCmm/Expr.hs +47/−25
- GHC/StgToCmm/Foreign.hs +27/−25
- GHC/StgToCmm/Heap.hs +12/−11
- GHC/StgToCmm/InfoTableProv.hs +206/−42
- GHC/StgToCmm/Layout.hs +12/−10
- GHC/StgToCmm/Lit.hs +1/−2
- GHC/StgToCmm/Monad.hs +1/−3
- GHC/StgToCmm/Prim.hs +120/−20
- GHC/StgToCmm/Prof.hs +22/−25
- GHC/StgToCmm/Sequel.hs +2/−12
- GHC/StgToCmm/Ticky.hs +13/−13
- GHC/StgToCmm/Types.hs +22/−8
- GHC/StgToCmm/Utils.hs +29/−87
- GHC/StgToJS/Apply.hs +17/−23
- GHC/StgToJS/Arg.hs +2/−2
- GHC/StgToJS/Closure.hs +90/−3
- GHC/StgToJS/CodeGen.hs +30/−29
- GHC/StgToJS/CoreUtils.hs +0/−282
- GHC/StgToJS/DataCon.hs +9/−20
- GHC/StgToJS/Deps.hs +33/−41
- GHC/StgToJS/Expr.hs +30/−44
- GHC/StgToJS/FFI.hs +7/−109
- GHC/StgToJS/Heap.hs +1/−1
- GHC/StgToJS/Ids.hs +4/−4
- GHC/StgToJS/Linker/Linker.hs +396/−207
- GHC/StgToJS/Linker/Opt.hs +126/−0
- GHC/StgToJS/Linker/Types.hs +37/−38
- GHC/StgToJS/Linker/Utils.hs +2/−1
- GHC/StgToJS/Literal.hs +2/−22
- GHC/StgToJS/Monad.hs +3/−2
- GHC/StgToJS/Object.hs +161/−152
- GHC/StgToJS/Prim.hs +22/−3
- GHC/StgToJS/Printer.hs +0/−218
- GHC/StgToJS/Profiling.hs +1/−1
- GHC/StgToJS/Regs.hs +1/−1
- GHC/StgToJS/Rts/Rts.hs +57/−105
- GHC/StgToJS/Rts/Types.hs +1/−1
- GHC/StgToJS/Sinker.hs +11/−11
- GHC/StgToJS/Stack.hs +1/−1
- GHC/StgToJS/StaticPtr.hs +1/−1
- GHC/StgToJS/StgUtils.hs +0/−266
- GHC/StgToJS/Symbols.hs +2/−11
- GHC/StgToJS/Types.hs +29/−41
- GHC/StgToJS/Utils.hs +569/−12
- GHC/SysTools/Cpp.hs +9/−11
- GHC/SysTools/Info.hs +5/−0
- GHC/SysTools/Process.hs +1/−1
- GHC/SysTools/Tasks.hs +6/−12
- GHC/Tc/Deriv.hs +25/−9
- GHC/Tc/Deriv/Generate.hs +66/−91
- GHC/Tc/Deriv/Generics.hs +12/−9
- GHC/Tc/Deriv/Infer.hs +12/−59
- GHC/Tc/Deriv/Utils.hs +51/−52
- GHC/Tc/Errors.hs +352/−206
- GHC/Tc/Errors/Hole.hs +101/−42
- GHC/Tc/Errors/Hole.hs-boot +2/−1
- GHC/Tc/Errors/Hole/FitTypes.hs +3/−27
- GHC/Tc/Errors/Hole/FitTypes.hs-boot +0/−30
- GHC/Tc/Errors/Hole/Plugin.hs +29/−0
- GHC/Tc/Errors/Hole/Plugin.hs-boot +3/−0
- GHC/Tc/Errors/Ppr.hs +6489/−4101
- GHC/Tc/Errors/Types.hs +6433/−4043
- GHC/Tc/Errors/Types/PromotionErr.hs +97/−0
- GHC/Tc/Gen/App.hs +29/−31
- GHC/Tc/Gen/Bind.hs +104/−81
- GHC/Tc/Gen/Default.hs +1/−1
- GHC/Tc/Gen/Export.hs +556/−246
- GHC/Tc/Gen/Expr.hs +280/−462
- GHC/Tc/Gen/Foreign.hs +226/−1
- GHC/Tc/Gen/Head.hs +19/−48
- GHC/Tc/Gen/HsType.hs +223/−312
- GHC/Tc/Gen/Match.hs +32/−9
- GHC/Tc/Gen/Pat.hs +5/−6
- GHC/Tc/Gen/Rule.hs +28/−17
- GHC/Tc/Gen/Sig.hs +16/−13
- GHC/Tc/Gen/Splice.hs +142/−134
- GHC/Tc/Instance/Class.hs +103/−134
- GHC/Tc/Instance/Family.hs +2/−110
- GHC/Tc/Instance/FunDeps.hs +31/−35
- GHC/Tc/Instance/Typeable.hs +2/−2
- GHC/Tc/Module.hs +2914/−2998
- GHC/Tc/Module.hs-boot +2/−7
- GHC/Tc/Plugin.hs +5/−4
- GHC/Tc/Solver.hs +3764/−3329
- GHC/Tc/Solver/Canonical.hs +0/−3421
- GHC/Tc/Solver/Dict.hs +2177/−0
- GHC/Tc/Solver/Equality.hs +3190/−0
- GHC/Tc/Solver/InertSet.hs +581/−207
- GHC/Tc/Solver/Interact.hs +0/−2836
- GHC/Tc/Solver/Irred.hs +144/−0
- GHC/Tc/Solver/Monad.hs +2270/−2019
- GHC/Tc/Solver/Rewrite.hs +23/−19
- GHC/Tc/Solver/Solve.hs +718/−0
- GHC/Tc/Solver/Types.hs +26/−64
- GHC/Tc/TyCl.hs +473/−439
- GHC/Tc/TyCl/Class.hs +17/−11
- GHC/Tc/TyCl/Instance.hs +121/−61
- GHC/Tc/TyCl/PatSyn.hs +55/−84
- GHC/Tc/TyCl/Utils.hs +32/−45
- GHC/Tc/Types.hs +28/−732
- GHC/Tc/Types.hs-boot +0/−24
- GHC/Tc/Types/BasicTypes.hs +500/−0
- GHC/Tc/Types/Constraint.hs +527/−387
- GHC/Tc/Types/CtLocEnv.hs +60/−0
- GHC/Tc/Types/ErrCtxt.hs +16/−0
- GHC/Tc/Types/EvTerm.hs +1/−1
- GHC/Tc/Types/Evidence.hs +24/−17
- GHC/Tc/Types/LclEnv.hs +239/−0
- GHC/Tc/Types/LclEnv.hs-boot +3/−0
- GHC/Tc/Types/Origin.hs +72/−17
- GHC/Tc/Types/TH.hs +122/−0
- GHC/Tc/Types/TcRef.hs +37/−0
- GHC/Tc/Utils/Backpack.hs +63/−80
- GHC/Tc/Utils/Concrete.hs +18/−14
- GHC/Tc/Utils/Env.hs +81/−185
- GHC/Tc/Utils/Env.hs-boot +0/−10
- GHC/Tc/Utils/Instantiate.hs +80/−82
- GHC/Tc/Utils/Monad.hs +150/−106
- GHC/Tc/Utils/TcMType.hs +2343/−2814
- GHC/Tc/Utils/TcType.hs +71/−350
- GHC/Tc/Utils/Unify.hs +3273/−2719
- GHC/Tc/Utils/Unify.hs-boot +3/−3
- GHC/Tc/Utils/Zonk.hs +0/−1934
- GHC/Tc/Validity.hs +334/−333
- GHC/Tc/Zonk/Env.hs +371/−0
- GHC/Tc/Zonk/Monad.hs +112/−0
- GHC/Tc/Zonk/TcType.hs +680/−0
- GHC/Tc/Zonk/Type.hs +1958/−0
- GHC/ThToHs.hs +128/−81
- GHC/Types/Avail.hs +27/−223
- GHC/Types/Basic.hs +165/−12
- GHC/Types/CostCentre.hs +2/−4
- GHC/Types/Demand.hs +13/−13
- GHC/Types/Error.hs +140/−31
- GHC/Types/Error/Codes.hs +388/−59
- GHC/Types/FieldLabel.hs +29/−93
- GHC/Types/Fixity.hs +1/−1
- GHC/Types/ForeignCall.hs +4/−4
- GHC/Types/GREInfo.hs +281/−0
- GHC/Types/Hint.hs +89/−26
- GHC/Types/Hint/Ppr.hs +122/−33
- GHC/Types/IPE.hs +2/−1
- GHC/Types/Id.hs +12/−12
- GHC/Types/Id/Info.hs +58/−20
- GHC/Types/Id/Make.hs +141/−23
- GHC/Types/Literal.hs +7/−1
- GHC/Types/Name.hs +57/−36
- GHC/Types/Name.hs-boot +2/−1
- GHC/Types/Name/Cache.hs +12/−10
- GHC/Types/Name/Env.hs +17/−2
- GHC/Types/Name/Occurrence.hs +550/−148
- GHC/Types/Name/Occurrence.hs-boot +0/−1
- GHC/Types/Name/Ppr.hs +11/−7
- GHC/Types/Name/Reader.hs +2032/−1345
- GHC/Types/Name/Shape.hs +20/−39
- GHC/Types/RepType.hs +19/−12
- GHC/Types/SaneDouble.hs +48/−0
- GHC/Types/SourceFile.hs +61/−43
- GHC/Types/SourceText.hs +23/−22
- GHC/Types/SrcLoc.hs +3/−0
- GHC/Types/Tickish.hs +3/−2
- GHC/Types/TyThing.hs +96/−19
- GHC/Types/TyThing/Ppr.hs +2/−2
- GHC/Types/TyThing/Ppr.hs-boot +11/−0
- GHC/Types/TypeEnv.hs +0/−1
- GHC/Types/Unique.hs +34/−51
- GHC/Types/Unique/DFM.hs +10/−12
- GHC/Types/Unique/FM.hs +61/−33
- GHC/Types/Unique/Map.hs +35/−4
- GHC/Types/Unique/Set.hs +2/−2
- GHC/Types/Unique/Supply.hs +51/−65
- GHC/Types/Var.hs +14/−18
- GHC/Types/Var/Env.hs +18/−10
- GHC/Unit.hs +1/−1
- GHC/Unit/Env.hs +1/−1
- GHC/Unit/Finder.hs +1/−1
- GHC/Unit/Finder/Types.hs +1/−1
- GHC/Unit/Module/Deps.hs +3/−1
- GHC/Unit/Module/Env.hs +4/−0
- GHC/Unit/Module/Graph.hs +31/−1
- GHC/Unit/Module/ModIface.hs +67/−18
- GHC/Unit/Module/ModSummary.hs +1/−1
- GHC/Unit/Module/Warnings.hs +243/−64
- GHC/Unit/State.hs +157/−180
- GHC/Unit/Types.hs +51/−18
- GHC/Utils/Binary.hs +18/−11
- GHC/Utils/Containers/Internal/BitUtil.hs +0/−69
- GHC/Utils/Containers/Internal/StrictPair.hs +0/−25
- GHC/Utils/Error.hs +76/−27
- GHC/Utils/Lexeme.hs +2/−3
- GHC/Utils/Misc.hs +27/−5
- GHC/Utils/Monad.hs +10/−0
- GHC/Utils/Monad/Codensity.hs +64/−0
- GHC/Utils/Outputable.hs +69/−25
- GHC/Utils/Panic.hs +8/−0
- GHC/Utils/Panic/Plain.hs +7/−1
- GHC/Utils/Unique.hs +0/−35
- GHC/Utils/Word64.hs +0/−20
- GHC/Wasm/ControlFlow/FromCmm.hs +9/−4
- Language/Haskell/Syntax/Concrete.hs +1/−0
- Language/Haskell/Syntax/Decls.hs +35/−5
- Language/Haskell/Syntax/Expr.hs +20/−7
- Language/Haskell/Syntax/Extension.hs +8/−0
- Language/Haskell/Syntax/ImpExp.hs +1/−1
- Language/Haskell/Syntax/Lit.hs +15/−4
- Language/Haskell/Syntax/Pat.hs +3/−4
- Language/Haskell/Syntax/Type.hs +32/−8
- Setup.hs +17/−4
- cbits/genSym.c +4/−32
- ghc.cabal +75/−37
- jsbits/genSym.js +0/−26
CodeGen.Platform.h view
@@ -452,34 +452,34 @@ callerSaves BaseReg = True #endif #if defined(CALLER_SAVES_R1)-callerSaves (VanillaReg 1 _) = True+callerSaves (VanillaReg 1) = True #endif #if defined(CALLER_SAVES_R2)-callerSaves (VanillaReg 2 _) = True+callerSaves (VanillaReg 2) = True #endif #if defined(CALLER_SAVES_R3)-callerSaves (VanillaReg 3 _) = True+callerSaves (VanillaReg 3) = True #endif #if defined(CALLER_SAVES_R4)-callerSaves (VanillaReg 4 _) = True+callerSaves (VanillaReg 4) = True #endif #if defined(CALLER_SAVES_R5)-callerSaves (VanillaReg 5 _) = True+callerSaves (VanillaReg 5) = True #endif #if defined(CALLER_SAVES_R6)-callerSaves (VanillaReg 6 _) = True+callerSaves (VanillaReg 6) = True #endif #if defined(CALLER_SAVES_R7)-callerSaves (VanillaReg 7 _) = True+callerSaves (VanillaReg 7) = True #endif #if defined(CALLER_SAVES_R8)-callerSaves (VanillaReg 8 _) = True+callerSaves (VanillaReg 8) = True #endif #if defined(CALLER_SAVES_R9)-callerSaves (VanillaReg 9 _) = True+callerSaves (VanillaReg 9) = True #endif #if defined(CALLER_SAVES_R10)-callerSaves (VanillaReg 10 _) = True+callerSaves (VanillaReg 10) = True #endif #if defined(CALLER_SAVES_F1) callerSaves (FloatReg 1) = True@@ -555,34 +555,34 @@ ,Hp #endif #if defined(REG_R1)- ,VanillaReg 1 VGcPtr+ ,VanillaReg 1 #endif #if defined(REG_R2)- ,VanillaReg 2 VGcPtr+ ,VanillaReg 2 #endif #if defined(REG_R3)- ,VanillaReg 3 VGcPtr+ ,VanillaReg 3 #endif #if defined(REG_R4)- ,VanillaReg 4 VGcPtr+ ,VanillaReg 4 #endif #if defined(REG_R5)- ,VanillaReg 5 VGcPtr+ ,VanillaReg 5 #endif #if defined(REG_R6)- ,VanillaReg 6 VGcPtr+ ,VanillaReg 6 #endif #if defined(REG_R7)- ,VanillaReg 7 VGcPtr+ ,VanillaReg 7 #endif #if defined(REG_R8)- ,VanillaReg 8 VGcPtr+ ,VanillaReg 8 #endif #if defined(REG_R9)- ,VanillaReg 9 VGcPtr+ ,VanillaReg 9 #endif #if defined(REG_R10)- ,VanillaReg 10 VGcPtr+ ,VanillaReg 10 #endif #if defined(REG_SpLim) ,SpLim@@ -740,34 +740,34 @@ globalRegMaybe BaseReg = Just (RealRegSingle REG_Base) # endif # if defined(REG_R1)-globalRegMaybe (VanillaReg 1 _) = Just (RealRegSingle REG_R1)+globalRegMaybe (VanillaReg 1) = Just (RealRegSingle REG_R1) # endif # if defined(REG_R2)-globalRegMaybe (VanillaReg 2 _) = Just (RealRegSingle REG_R2)+globalRegMaybe (VanillaReg 2) = Just (RealRegSingle REG_R2) # endif # if defined(REG_R3)-globalRegMaybe (VanillaReg 3 _) = Just (RealRegSingle REG_R3)+globalRegMaybe (VanillaReg 3) = Just (RealRegSingle REG_R3) # endif # if defined(REG_R4)-globalRegMaybe (VanillaReg 4 _) = Just (RealRegSingle REG_R4)+globalRegMaybe (VanillaReg 4) = Just (RealRegSingle REG_R4) # endif # if defined(REG_R5)-globalRegMaybe (VanillaReg 5 _) = Just (RealRegSingle REG_R5)+globalRegMaybe (VanillaReg 5) = Just (RealRegSingle REG_R5) # endif # if defined(REG_R6)-globalRegMaybe (VanillaReg 6 _) = Just (RealRegSingle REG_R6)+globalRegMaybe (VanillaReg 6) = Just (RealRegSingle REG_R6) # endif # if defined(REG_R7)-globalRegMaybe (VanillaReg 7 _) = Just (RealRegSingle REG_R7)+globalRegMaybe (VanillaReg 7) = Just (RealRegSingle REG_R7) # endif # if defined(REG_R8)-globalRegMaybe (VanillaReg 8 _) = Just (RealRegSingle REG_R8)+globalRegMaybe (VanillaReg 8) = Just (RealRegSingle REG_R8) # endif # if defined(REG_R9)-globalRegMaybe (VanillaReg 9 _) = Just (RealRegSingle REG_R9)+globalRegMaybe (VanillaReg 9) = Just (RealRegSingle REG_R9) # endif # if defined(REG_R10)-globalRegMaybe (VanillaReg 10 _) = Just (RealRegSingle REG_R10)+globalRegMaybe (VanillaReg 10) = Just (RealRegSingle REG_R10) # endif # if defined(REG_F1) globalRegMaybe (FloatReg 1) = Just (RealRegSingle REG_F1)
GHC.hs view
@@ -1,7 +1,7 @@+{-# LANGUAGE MultiWayIf #-} {-# LANGUAGE CPP #-} {-# LANGUAGE NondecreasingIndentation, ScopedTypeVariables #-} {-# LANGUAGE TupleSections, NamedFieldPuns #-}-{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeFamilies #-} -- -----------------------------------------------------------------------------@@ -316,6 +316,7 @@ import GHC.Driver.Config.Finder (initFinderOpts) import GHC.Driver.Config.Parser (initParserOpts) import GHC.Driver.Config.Logger (initLogFlags)+import GHC.Driver.Config.StgToJS (initStgToJSConfig) import GHC.Driver.Config.Diagnostic import GHC.Driver.Main import GHC.Driver.Make@@ -342,7 +343,7 @@ import GHC.Data.StringBuffer import GHC.Data.FastString import qualified GHC.LanguageExtensions as LangExt-import GHC.Rename.Names (renamePkgQual, renameRawPkgQual)+import GHC.Rename.Names (renamePkgQual, renameRawPkgQual, gresFromAvails) import GHC.Tc.Utils.Monad ( finalSafeMode, fixSafeInstances, initIfaceTcRn ) import GHC.Tc.Types@@ -353,11 +354,14 @@ import GHC.Utils.TmpFs import GHC.Utils.Error+import GHC.Utils.Exception import GHC.Utils.Monad import GHC.Utils.Misc import GHC.Utils.Outputable import GHC.Utils.Panic+#if !defined(javascript_HOST_ARCH) import GHC.Utils.Panic.Plain+#endif import GHC.Utils.Logger import GHC.Utils.Fingerprint @@ -371,6 +375,8 @@ import GHC.Core.InstEnv import GHC.Core +import GHC.Data.Maybe+ import GHC.Types.Id import GHC.Types.Name hiding ( varName ) import GHC.Types.Avail@@ -403,30 +409,27 @@ import GHC.Unit.Module.Graph import GHC.Unit.Home.ModInfo +import Control.Applicative ((<|>))+import Control.Concurrent+import Control.Monad+import Control.Monad.Catch as MC import Data.Foldable+import Data.IORef+import Data.List (isPrefixOf)+import Data.Typeable ( Typeable )+import Data.Word ( Word8 )+ import qualified Data.Map.Strict as Map import Data.Set (Set)+import qualified Data.Set as S import qualified Data.Sequence as Seq-import Data.Maybe-import Data.Typeable ( Typeable )-import Data.Word ( Word8 )-import Control.Monad++import System.Directory+import System.Environment ( getEnv, getProgName ) import System.Exit ( exitWith, ExitCode(..) )-import GHC.Utils.Exception-import Data.IORef import System.FilePath-import Control.Concurrent-import Control.Applicative ((<|>))-import Control.Monad.Catch as MC--import GHC.Data.Maybe import System.IO.Error ( isDoesNotExistError )-import System.Environment ( getEnv, getProgName )-import System.Directory-import Data.List (isPrefixOf)-import qualified Data.Set as S - -- %************************************************************************ -- %* * -- Initialisation: exception handlers@@ -558,13 +561,13 @@ initGhcMonad :: GhcMonad m => Maybe FilePath -> m () initGhcMonad mb_top_dir = setSession =<< liftIO ( do+#if !defined(javascript_HOST_ARCH) -- The call to c_keepCAFsForGHCi must not be optimized away. Even in non-debug builds. -- So we can't use assertM here. -- See Note [keepCAFsForGHCi] in keepCAFsForGHCi.c for details about why.--- #if MIN_VERSION_GLASGOW_HASKELL(9,7,0,0) !keep_cafs <- c_keepCAFsForGHCi massert keep_cafs--- #endif+#endif initHscEnv mb_top_dir ) @@ -675,8 +678,10 @@ logger <- getLogger -- Interpreter- interp <- if gopt Opt_ExternalInterpreter dflags- then do+ interp <- if+ -- external interpreter+ | gopt Opt_ExternalInterpreter dflags+ -> do let prog = pgm_i dflags ++ flavour profiled = ways dflags `hasWay` WayProf@@ -698,10 +703,31 @@ , iservConfHook = createIservProcessHook (hsc_hooks hsc_env) , iservConfTrace = tr }- s <- liftIO $ newMVar IServPending+ s <- liftIO $ newMVar InterpPending loader <- liftIO Loader.uninitializedLoader- return (Just (Interp (ExternalInterp conf (IServ s)) loader))- else+ return (Just (Interp (ExternalInterp (ExtIServ (ExtInterpState conf s))) loader))++ -- JavaScript interpreter+ | ArchJavaScript <- platformArch (targetPlatform dflags)+ -> do+ s <- liftIO $ newMVar InterpPending+ loader <- liftIO Loader.uninitializedLoader+ let cfg = JSInterpConfig+ { jsInterpNodeConfig = defaultNodeJsSettings+ , jsInterpScript = topDir dflags </> "ghc-interp.js"+ , jsInterpTmpFs = hsc_tmpfs hsc_env+ , jsInterpTmpDir = tmpDir dflags+ , jsInterpLogger = hsc_logger hsc_env+ , jsInterpCodegenCfg = initStgToJSConfig dflags+ , jsInterpUnitEnv = hsc_unit_env hsc_env+ , jsInterpFinderOpts = initFinderOpts dflags+ , jsInterpFinderCache = hsc_FC hsc_env+ }+ return (Just (Interp (ExternalInterp (ExtJS (ExtInterpState cfg s))) loader))++ -- Internal interpreter+ | otherwise+ -> #if defined(HAVE_INTERNAL_INTERPRETER) do loader <- liftIO Loader.uninitializedLoader@@ -837,7 +863,7 @@ => Logger -> DynFlags -> [Located String]- -> m (DynFlags, [Located String], [Warn])+ -> m (DynFlags, [Located String], Messages DriverMessage) parseDynamicFlags logger dflags cmdline = do (dflags1, leftovers, warns) <- parseDynamicFlagsCmdLine dflags cmdline -- flags that have just been read are used by the logger when loading package@@ -939,7 +965,8 @@ let (dflags', warnings) = makeDynFlagsConsistent dflags let diag_opts = initDiagOpts dflags print_config = initPrintConfig dflags- liftIO $ handleFlagWarnings logger print_config diag_opts (map (Warn WarningWithoutFlag) warnings)+ liftIO $ printOrThrowDiagnostics logger print_config diag_opts+ $ fmap GhcDriverMessage $ warnsToMessages diag_opts warnings return dflags' checkNewInteractiveDynFlags :: MonadIO m => Logger -> DynFlags -> m DynFlags@@ -1199,6 +1226,9 @@ details <- makeSimpleDetails lcl_logger tc_gbl_env safe <- finalSafeMode lcl_dflags tc_gbl_env + let !rdr_env = forceGlobalRdrEnv $ tcg_rdr_env tc_gbl_env+ -- See Note [Forcing GREInfo] in GHC.Types.GREInfo.+ return $ TypecheckedModule { tm_internals_ = (tc_gbl_env, details),@@ -1209,7 +1239,7 @@ ModuleInfo { minf_type_env = md_types details, minf_exports = md_exports details,- minf_rdr_env = Just (tcg_rdr_env tc_gbl_env),+ minf_rdr_env = Just rdr_env, minf_instances = fixSafeInstances safe $ instEnvElts $ md_insts details, minf_iface = Nothing, minf_safe = safe,@@ -1302,8 +1332,7 @@ else return $ Right mod_guts - Nothing -> panic "compileToCoreModule: target FilePath not found in\- module dependency graph"+ Nothing -> panic "compileToCoreModule: target FilePath not found in module dependency graph" where -- two versions, based on whether we simplify (thus run tidyProgram, -- which returns a (CgGuts, ModDetails) pair, or not (in which case -- we just have a ModGuts.@@ -1363,7 +1392,7 @@ data ModuleInfo = ModuleInfo { minf_type_env :: TypeEnv, minf_exports :: [AvailInfo],- minf_rdr_env :: Maybe GlobalRdrEnv, -- Nothing for a compiled/package mod+ minf_rdr_env :: Maybe IfGlobalRdrEnv, -- Nothing for a compiled/package mod minf_instances :: [ClsInst], minf_iface :: Maybe ModIface, minf_safe :: SafeHaskellMode,@@ -1389,40 +1418,45 @@ pte = eps_PTE eps tys = [ ty | name <- concatMap availNames avails, Just ty <- [lookupTypeEnv pte name] ]- --++ let !rdr_env = availsToGlobalRdrEnv hsc_env mdl avails+ -- See Note [Forcing GREInfo] in GHC.Types.GREInfo.+ return (Just (ModuleInfo { minf_type_env = mkTypeEnv tys, minf_exports = avails,- minf_rdr_env = Just $! availsToGlobalRdrEnv (moduleName mdl) avails,+ minf_rdr_env = Just rdr_env, minf_instances = error "getModuleInfo: instances for package module unimplemented", minf_iface = Just iface, minf_safe = getSafeMode $ mi_trust iface, minf_modBreaks = emptyModBreaks })) -availsToGlobalRdrEnv :: ModuleName -> [AvailInfo] -> GlobalRdrEnv-availsToGlobalRdrEnv mod_name avails- = mkGlobalRdrEnv (gresFromAvails (Just imp_spec) avails)+availsToGlobalRdrEnv :: HasDebugCallStack => HscEnv -> Module -> [AvailInfo] -> IfGlobalRdrEnv+availsToGlobalRdrEnv hsc_env mod avails+ = forceGlobalRdrEnv rdr_env+ -- See Note [Forcing GREInfo] in GHC.Types.GREInfo. where+ rdr_env = mkGlobalRdrEnv (gresFromAvails hsc_env (Just imp_spec) avails) -- We're building a GlobalRdrEnv as if the user imported -- all the specified modules into the global interactive module imp_spec = ImpSpec { is_decl = decl, is_item = ImpAll}- decl = ImpDeclSpec { is_mod = mod_name, is_as = mod_name,+ decl = ImpDeclSpec { is_mod = mod, is_as = moduleName mod, is_qual = False, is_dloc = srcLocSpan interactiveSrcLoc } - getHomeModuleInfo :: HscEnv -> Module -> IO (Maybe ModuleInfo) getHomeModuleInfo hsc_env mdl = case lookupHugByModule mdl (hsc_HUG hsc_env) of Nothing -> return Nothing Just hmi -> do- let details = hm_details hmi- iface = hm_iface hmi+ let details = hm_details hmi+ iface = hm_iface hmi return (Just (ModuleInfo { minf_type_env = md_types details, minf_exports = md_exports details,- minf_rdr_env = mi_globals $! hm_iface hmi,+ minf_rdr_env = mi_globals $ hm_iface hmi,+ -- NB: already forced. See Note [Forcing GREInfo] in GHC.Types.GREInfo. minf_instances = instEnvElts $ md_insts details, minf_iface = Just iface, minf_safe = getSafeMode $ mi_trust iface@@ -1435,13 +1469,15 @@ modInfoTopLevelScope :: ModuleInfo -> Maybe [Name] modInfoTopLevelScope minf- = fmap (map greMangledName . globalRdrEnvElts) (minf_rdr_env minf)+ = fmap (map greName . globalRdrEnvElts) (minf_rdr_env minf)+ -- NB: no need to force this again.+ -- See Note [Forcing GREInfo] in GHC.Types.GREInfo. modInfoExports :: ModuleInfo -> [Name] modInfoExports minf = concatMap availNames $! minf_exports minf modInfoExportsWithSelectors :: ModuleInfo -> [Name]-modInfoExportsWithSelectors minf = concatMap availNamesWithSelectors $! minf_exports minf+modInfoExportsWithSelectors minf = concatMap availNames $! minf_exports minf -- | Returns the instances defined by the specified module. -- Warning: currently unimplemented for package modules.@@ -1471,7 +1507,7 @@ modInfoIface :: ModuleInfo -> Maybe ModIface modInfoIface = minf_iface -modInfoRdrEnv :: ModuleInfo -> Maybe GlobalRdrEnv+modInfoRdrEnv :: ModuleInfo -> Maybe IfGlobalRdrEnv modInfoRdrEnv = minf_rdr_env -- | Retrieve module safe haskell mode@@ -1482,7 +1518,9 @@ modInfoModBreaks = minf_modBreaks isDictonaryId :: Id -> Bool-isDictonaryId id = isDictTy (idType id)+isDictonaryId id+ = case tcSplitSigmaTy (idType id) of {+ (_tvs, _theta, tau) -> isDictTy tau } -- | Looks up a global name: that is, any top-level name in any -- visible module. Unlike 'lookupName', lookupGlobalName does not use@@ -1957,7 +1995,8 @@ mkApiErr :: DynFlags -> SDoc -> GhcApiError mkApiErr dflags msg = GhcApiError (showSDoc dflags msg) ---++#if !defined(javascript_HOST_ARCH) foreign import ccall unsafe "keepCAFsForGHCi" c_keepCAFsForGHCi :: IO Bool-+#endif
GHC/Builtin/Names.hs view
@@ -4,22 +4,23 @@ \section[GHC.Builtin.Names]{Definitions of prelude modules and names} -Nota Bene: all Names defined in here should come from the base package+Nota Bene: all Names defined in here should come from the base package,+the big-num package or (for plugins) the ghc package. - ModuleNames for prelude modules,- e.g. pREL_BASE_Name :: ModuleName+ e.g. pRELUDE_NAME :: ModuleName - Modules for prelude modules- e.g. pREL_Base :: Module+ e.g. pRELUDE :: Module - Uniques for Ids, DataCons, TyCons and Classes that the compiler "knows about" in some way- e.g. intTyConKey :: Unique+ e.g. orderingTyConKey :: Unique minusClassOpKey :: Unique - Names for Ids, DataCons, TyCons and Classes that the compiler "knows about" in some way- e.g. intTyConName :: Name+ e.g. orderingTyConName :: Name minusName :: Name One of these Names contains (a) the module and occurrence name of the thing@@ -31,8 +32,9 @@ foldrName in the environment. - RdrNames for Ids, DataCons etc that the compiler may emit into- generated code (e.g. for deriving). It's not necessary to know- the uniques for these guys, only their names+ generated code (e.g. for deriving).+ e.g. and_RDR :: RdrName+ It's not necessary to know the uniques for these guys, only their names Note [Known-key names]@@ -501,6 +503,10 @@ , typeErrorVAppendDataConName , typeErrorShowTypeDataConName + -- "Unsatisfiable" constraint+ , unsatisfiableClassName+ , unsatisfiableIdName+ -- Unsafe coercion proofs , unsafeEqualityProofName , unsafeEqualityTyConName@@ -653,9 +659,9 @@ rOOT_MAIN :: Module rOOT_MAIN = mkMainModule (fsLit ":Main") -- Root module for initialisation -mkInteractiveModule :: Int -> Module--- (mkInteractiveMoudule 9) makes module 'interactive:Ghci9'-mkInteractiveModule n = mkModule interactiveUnit (mkModuleName ("Ghci" ++ show n))+mkInteractiveModule :: String -> Module+-- (mkInteractiveMoudule "9") makes module 'interactive:Ghci9'+mkInteractiveModule n = mkModule interactiveUnit (mkModuleName ("Ghci" ++ n)) pRELUDE_NAME, mAIN_NAME :: ModuleName pRELUDE_NAME = mkModuleNameFS (fsLit "Prelude")@@ -866,10 +872,10 @@ prodDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit ":*:") comp1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "Comp1") -unPar1_RDR = varQual_RDR gHC_GENERICS (fsLit "unPar1")-unRec1_RDR = varQual_RDR gHC_GENERICS (fsLit "unRec1")-unK1_RDR = varQual_RDR gHC_GENERICS (fsLit "unK1")-unComp1_RDR = varQual_RDR gHC_GENERICS (fsLit "unComp1")+unPar1_RDR = fieldQual_RDR gHC_GENERICS (fsLit "Par1") (fsLit "unPar1")+unRec1_RDR = fieldQual_RDR gHC_GENERICS (fsLit "Rec1") (fsLit "unRec1")+unK1_RDR = fieldQual_RDR gHC_GENERICS (fsLit "K1") (fsLit "unK1")+unComp1_RDR = fieldQual_RDR gHC_GENERICS (fsLit "Comp1") (fsLit "unComp1") from_RDR = varQual_RDR gHC_GENERICS (fsLit "from") from1_RDR = varQual_RDR gHC_GENERICS (fsLit "from1")@@ -898,12 +904,12 @@ uIntDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "UInt") uWordDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "UWord") -uAddrHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uAddr#")-uCharHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uChar#")-uDoubleHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uDouble#")-uFloatHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uFloat#")-uIntHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uInt#")-uWordHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uWord#")+uAddrHash_RDR = fieldQual_RDR gHC_GENERICS (fsLit "UAddr") (fsLit "uAddr#")+uCharHash_RDR = fieldQual_RDR gHC_GENERICS (fsLit "UChar") (fsLit "uChar#")+uDoubleHash_RDR = fieldQual_RDR gHC_GENERICS (fsLit "UDouble") (fsLit "uDouble#")+uFloatHash_RDR = fieldQual_RDR gHC_GENERICS (fsLit "UFloat") (fsLit "uFloat#")+uIntHash_RDR = fieldQual_RDR gHC_GENERICS (fsLit "UInt") (fsLit "uInt#")+uWordHash_RDR = fieldQual_RDR gHC_GENERICS (fsLit "UWord") (fsLit "uWord#") fmap_RDR, replace_RDR, pure_RDR, ap_RDR, liftA2_RDR, foldable_foldr_RDR, foldMap_RDR, null_RDR, all_RDR, traverse_RDR, mempty_RDR,@@ -929,6 +935,9 @@ clsQual_RDR mod str = mkOrig mod (mkOccNameFS clsName str) dataQual_RDR mod str = mkOrig mod (mkOccNameFS dataName str) +fieldQual_RDR :: Module -> FastString -> FastString -> RdrName+fieldQual_RDR mod con str = mkOrig mod (mkOccNameFS (fieldName con) str)+ {- ************************************************************************ * *@@ -1447,6 +1456,13 @@ typeErrorShowTypeDataConName = dcQual gHC_TYPEERROR (fsLit "ShowType") typeErrorShowTypeDataConKey +-- "Unsatisfiable" constraint+unsatisfiableClassName, unsatisfiableIdName :: Name+unsatisfiableClassName =+ clsQual gHC_TYPEERROR (fsLit "Unsatisfiable") unsatisfiableClassNameKey+unsatisfiableIdName =+ varQual gHC_TYPEERROR (fsLit "unsatisfiable") unsatisfiableIdNameKey+ -- Unsafe coercion proofs unsafeEqualityProofName, unsafeEqualityTyConName, unsafeCoercePrimName, unsafeReflDataConName :: Name@@ -1988,9 +2004,13 @@ uIntTyConKey = mkPreludeTyConUnique 162 uWordTyConKey = mkPreludeTyConUnique 163 +-- "Unsatisfiable" constraint+unsatisfiableClassNameKey :: Unique+unsatisfiableClassNameKey = mkPreludeTyConUnique 170+ -- Custom user type-errors errorMessageTypeErrorFamKey :: Unique-errorMessageTypeErrorFamKey = mkPreludeTyConUnique 181+errorMessageTypeErrorFamKey = mkPreludeTyConUnique 181 coercibleTyConKey :: Unique coercibleTyConKey = mkPreludeTyConUnique 183@@ -2498,19 +2518,6 @@ typeRepIdKey = mkPreludeMiscIdUnique 510 mkTrFunKey = mkPreludeMiscIdUnique 511 --- Representations for primitive types-trTYPEKey- , trTYPE'PtrRepLiftedKey- , trRuntimeRepKey- , tr'PtrRepLiftedKey- , trLiftedRepKey- :: Unique-trTYPEKey = mkPreludeMiscIdUnique 512-trTYPE'PtrRepLiftedKey = mkPreludeMiscIdUnique 513-trRuntimeRepKey = mkPreludeMiscIdUnique 514-tr'PtrRepLiftedKey = mkPreludeMiscIdUnique 515-trLiftedRepKey = mkPreludeMiscIdUnique 516- -- KindReps for common cases starKindRepKey, starArrStarKindRepKey, starArrStarArrStarKindRepKey, constraintKindRepKey :: Unique starKindRepKey = mkPreludeMiscIdUnique 520@@ -2523,9 +2530,6 @@ toDynIdKey = mkPreludeMiscIdUnique 530 -bitIntegerIdKey :: Unique-bitIntegerIdKey = mkPreludeMiscIdUnique 550- heqSCSelIdKey, eqSCSelIdKey, coercibleSCSelIdKey :: Unique eqSCSelIdKey = mkPreludeMiscIdUnique 551 heqSCSelIdKey = mkPreludeMiscIdUnique 552@@ -2559,6 +2563,10 @@ getFieldClassOpKey = mkPreludeMiscIdUnique 572 setFieldClassOpKey = mkPreludeMiscIdUnique 573 +-- "Unsatisfiable" constraints+unsatisfiableIdNameKey :: Unique+unsatisfiableIdNameKey = mkPreludeMiscIdUnique 580+ ------------------------------------------------------ -- ghc-bignum uses 600-699 uniques ------------------------------------------------------@@ -2810,6 +2818,7 @@ pretendNameIsInScope :: Name -> Bool pretendNameIsInScope n = isBuiltInSyntax n+ || isTupleTyConName n || any (n `hasKey`) [ liftedTypeKindTyConKey, unliftedTypeKindTyConKey , liftedDataConKey, unliftedDataConKey
GHC/Builtin/Names/TH.hs view
@@ -11,9 +11,9 @@ import GHC.Builtin.Names( mk_known_key_name ) import GHC.Unit.Types import GHC.Types.Name( Name )-import GHC.Types.Name.Occurrence( tcName, clsName, dataName, varName )+import GHC.Types.Name.Occurrence( tcName, clsName, dataName, varName, fieldName ) import GHC.Types.Name.Reader( RdrName, nameRdrName )-import GHC.Types.Unique+import GHC.Types.Unique ( Unique ) import GHC.Builtin.Uniques import GHC.Data.FastString @@ -31,7 +31,8 @@ templateHaskellNames = [ returnQName, bindQName, sequenceQName, newNameName, liftName, liftTypedName,- mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName, mkNameLName,+ mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName, mkNameG_fldName,+ mkNameLName, mkNameSName, mkNameQName, mkModNameName, liftStringName,@@ -109,8 +110,11 @@ -- TyVarBndr plainTVName, kindedTVName, plainInvisTVName, kindedInvisTVName,+ plainBndrTVName, kindedBndrTVName, -- Specificity specifiedSpecName, inferredSpecName,+ -- Visibility+ bndrReqName, bndrInvisName, -- Role nominalRName, representationalRName, phantomRName, inferRName, -- Kind@@ -156,7 +160,9 @@ expQTyConName, fieldExpTyConName, predTyConName, stmtTyConName, decsTyConName, conTyConName, bangTypeTyConName, varBangTypeTyConName, typeQTyConName, expTyConName, decTyConName,- typeTyConName, tyVarBndrUnitTyConName, tyVarBndrSpecTyConName, clauseTyConName,+ typeTyConName,+ tyVarBndrUnitTyConName, tyVarBndrSpecTyConName, tyVarBndrVisTyConName,+ clauseTyConName, patQTyConName, funDepTyConName, decsQTyConName, ruleBndrTyConName, tySynEqnTyConName, roleTyConName, codeTyConName, injAnnTyConName, kindTyConName,@@ -174,15 +180,20 @@ mkTHModule :: FastString -> Module mkTHModule m = mkModule thUnit (mkModuleNameFS m) -libFun, libTc, thFun, thTc, thCls, thCon, qqFun :: FastString -> Unique -> Name+libFun, libTc, thFun, thTc, thCls, thCon :: FastString -> Unique -> Name libFun = mk_known_key_name varName thLib libTc = mk_known_key_name tcName thLib thFun = mk_known_key_name varName thSyn thTc = mk_known_key_name tcName thSyn thCls = mk_known_key_name clsName thSyn thCon = mk_known_key_name dataName thSyn-qqFun = mk_known_key_name varName qqLib +thFld :: FastString -> FastString -> Unique -> Name+thFld con = mk_known_key_name (fieldName con) thSyn++qqFld :: FastString -> Unique -> Name+qqFld = mk_known_key_name (fieldName (fsLit "QuasiQuoter")) qqLib+ -------------------- TH.Syntax ----------------------- liftClassName :: Name liftClassName = thCls (fsLit "Lift") liftClassKey@@ -214,7 +225,7 @@ modNameTyConName = thTc (fsLit "ModName") modNameTyConKey returnQName, bindQName, sequenceQName, newNameName, liftName,- mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName,+ mkNameName, mkNameG_vName, mkNameG_fldName, mkNameG_dName, mkNameG_tcName, mkNameLName, mkNameSName, liftStringName, unTypeName, unTypeCodeName, unsafeCodeCoerceName, liftTypedName, mkModNameName, mkNameQName :: Name returnQName = thFun (fsLit "returnQ") returnQIdKey@@ -227,11 +238,12 @@ mkNameG_vName = thFun (fsLit "mkNameG_v") mkNameG_vIdKey mkNameG_dName = thFun (fsLit "mkNameG_d") mkNameG_dIdKey mkNameG_tcName = thFun (fsLit "mkNameG_tc") mkNameG_tcIdKey+mkNameG_fldName= thFun (fsLit "mkNameG_fld") mkNameG_fldIdKey mkNameLName = thFun (fsLit "mkNameL") mkNameLIdKey mkNameQName = thFun (fsLit "mkNameQ") mkNameQIdKey mkNameSName = thFun (fsLit "mkNameS") mkNameSIdKey mkModNameName = thFun (fsLit "mkModName") mkModNameIdKey-unTypeName = thFun (fsLit "unType") unTypeIdKey+unTypeName = thFld (fsLit "TExp") (fsLit "unType") unTypeIdKey unTypeCodeName = thFun (fsLit "unTypeCode") unTypeCodeIdKey unsafeCodeCoerceName = thFun (fsLit "unsafeCodeCoerce") unsafeCodeCoerceIdKey liftTypedName = thFun (fsLit "liftTyped") liftTypedIdKey@@ -492,11 +504,20 @@ plainInvisTVName = libFun (fsLit "plainInvisTV") plainInvisTVIdKey kindedInvisTVName = libFun (fsLit "kindedInvisTV") kindedInvisTVIdKey +plainBndrTVName, kindedBndrTVName :: Name+plainBndrTVName = libFun (fsLit "plainBndrTV") plainBndrTVIdKey+kindedBndrTVName = libFun (fsLit "kindedBndrTV") kindedBndrTVIdKey+ -- data Specificity = ... specifiedSpecName, inferredSpecName :: Name specifiedSpecName = libFun (fsLit "specifiedSpec") specifiedSpecKey inferredSpecName = libFun (fsLit "inferredSpec") inferredSpecKey +-- data BndrVis = ...+bndrReqName, bndrInvisName :: Name+bndrReqName = libFun (fsLit "bndrReq") bndrReqKey+bndrInvisName = libFun (fsLit "bndrInvis") bndrInvisKey+ -- data Role = ... nominalRName, representationalRName, phantomRName, inferRName :: Name nominalRName = libFun (fsLit "nominalR") nominalRIdKey@@ -569,7 +590,7 @@ varBangTypeTyConName, typeQTyConName, decsQTyConName, ruleBndrTyConName, tySynEqnTyConName, roleTyConName, derivClauseTyConName, kindTyConName,- tyVarBndrUnitTyConName, tyVarBndrSpecTyConName,+ tyVarBndrUnitTyConName, tyVarBndrSpecTyConName, tyVarBndrVisTyConName, derivStrategyTyConName :: Name -- These are only used for the types of top-level splices expQTyConName = libTc (fsLit "ExpQ") expQTyConKey@@ -589,14 +610,15 @@ kindTyConName = thTc (fsLit "Kind") kindTyConKey tyVarBndrUnitTyConName = libTc (fsLit "TyVarBndrUnit") tyVarBndrUnitTyConKey tyVarBndrSpecTyConName = libTc (fsLit "TyVarBndrSpec") tyVarBndrSpecTyConKey+tyVarBndrVisTyConName = libTc (fsLit "TyVarBndrVis") tyVarBndrVisTyConKey derivStrategyTyConName = thTc (fsLit "DerivStrategy") derivStrategyTyConKey -- quasiquoting quoteExpName, quotePatName, quoteDecName, quoteTypeName :: Name-quoteExpName = qqFun (fsLit "quoteExp") quoteExpKey-quotePatName = qqFun (fsLit "quotePat") quotePatKey-quoteDecName = qqFun (fsLit "quoteDec") quoteDecKey-quoteTypeName = qqFun (fsLit "quoteType") quoteTypeKey+quoteExpName = qqFld (fsLit "quoteExp") quoteExpKey+quotePatName = qqFld (fsLit "quotePat") quotePatKey+quoteDecName = qqFld (fsLit "quoteDec") quoteDecKey+quoteTypeName = qqFld (fsLit "quoteType") quoteTypeKey -- data Inline = ... noInlineDataConName, inlineDataConName, inlinableDataConName :: Name@@ -652,7 +674,7 @@ expTyConKey, matchTyConKey, clauseTyConKey, qTyConKey, expQTyConKey, patTyConKey, stmtTyConKey, conTyConKey, typeQTyConKey, typeTyConKey,- tyVarBndrUnitTyConKey, tyVarBndrSpecTyConKey,+ tyVarBndrUnitTyConKey, tyVarBndrSpecTyConKey, tyVarBndrVisTyConKey, decTyConKey, bangTypeTyConKey, varBangTypeTyConKey, fieldExpTyConKey, fieldPatTyConKey, nameTyConKey, patQTyConKey, funDepTyConKey, predTyConKey,@@ -694,6 +716,7 @@ tyVarBndrSpecTyConKey = mkPreludeTyConUnique 237 codeTyConKey = mkPreludeTyConUnique 238 modNameTyConKey = mkPreludeTyConUnique 239+tyVarBndrVisTyConKey = mkPreludeTyConUnique 240 {- ********************************************************************* * *@@ -741,7 +764,7 @@ -- If you want to change this, make sure you check in GHC.Builtin.Names returnQIdKey, bindQIdKey, sequenceQIdKey, liftIdKey, newNameIdKey,- mkNameIdKey, mkNameG_vIdKey, mkNameG_dIdKey, mkNameG_tcIdKey,+ mkNameIdKey, mkNameG_vIdKey, mkNameG_fldIdKey, mkNameG_dIdKey, mkNameG_tcIdKey, mkNameLIdKey, mkNameSIdKey, unTypeIdKey, unTypeCodeIdKey, unsafeCodeCoerceIdKey, liftTypedIdKey, mkModNameIdKey, mkNameQIdKey :: Unique returnQIdKey = mkPreludeMiscIdUnique 200@@ -761,6 +784,7 @@ mkModNameIdKey = mkPreludeMiscIdUnique 215 unsafeCodeCoerceIdKey = mkPreludeMiscIdUnique 216 mkNameQIdKey = mkPreludeMiscIdUnique 217+mkNameG_fldIdKey = mkPreludeMiscIdUnique 218 -- data Lit = ...@@ -1022,6 +1046,10 @@ plainInvisTVIdKey = mkPreludeMiscIdUnique 482 kindedInvisTVIdKey = mkPreludeMiscIdUnique 483 +plainBndrTVIdKey, kindedBndrTVIdKey :: Unique+plainBndrTVIdKey = mkPreludeMiscIdUnique 484+kindedBndrTVIdKey = mkPreludeMiscIdUnique 485+ -- data Role = ... nominalRIdKey, representationalRIdKey, phantomRIdKey, inferRIdKey :: Unique nominalRIdKey = mkPreludeMiscIdUnique 416@@ -1106,6 +1134,11 @@ specifiedSpecKey = mkPreludeMiscIdUnique 498 inferredSpecKey = mkPreludeMiscIdUnique 499 +-- data BndrVis = ...+bndrReqKey, bndrInvisKey :: Unique+bndrReqKey = mkPreludeMiscIdUnique 800 -- TODO (int-index): make up some room in the 5** numberspace?+bndrInvisKey = mkPreludeMiscIdUnique 801+ {- ************************************************************************ * *@@ -1114,12 +1147,14 @@ ************************************************************************ -} -lift_RDR, liftTyped_RDR, mkNameG_dRDR, mkNameG_vRDR, unsafeCodeCoerce_RDR :: RdrName+lift_RDR, liftTyped_RDR, mkNameG_dRDR, mkNameG_vRDR, mkNameG_fldRDR,+ unsafeCodeCoerce_RDR :: RdrName lift_RDR = nameRdrName liftName liftTyped_RDR = nameRdrName liftTypedName unsafeCodeCoerce_RDR = nameRdrName unsafeCodeCoerceName mkNameG_dRDR = nameRdrName mkNameG_dName mkNameG_vRDR = nameRdrName mkNameG_vName+mkNameG_fldRDR = nameRdrName mkNameG_fldName -- data Exp = ... conE_RDR, litE_RDR, appE_RDR, infixApp_RDR :: RdrName
GHC/Builtin/PrimOps.hs view
@@ -551,36 +551,43 @@ primOpIsDiv :: PrimOp -> Bool primOpIsDiv op = case op of - -- TODO: quotRemWord2, Int64, Word64 IntQuotOp -> True Int8QuotOp -> True Int16QuotOp -> True Int32QuotOp -> True+ Int64QuotOp -> True IntRemOp -> True Int8RemOp -> True Int16RemOp -> True Int32RemOp -> True+ Int64RemOp -> True IntQuotRemOp -> True Int8QuotRemOp -> True Int16QuotRemOp -> True Int32QuotRemOp -> True+ -- Int64QuotRemOp doesn't exist (yet) WordQuotOp -> True Word8QuotOp -> True Word16QuotOp -> True Word32QuotOp -> True+ Word64QuotOp -> True WordRemOp -> True Word8RemOp -> True Word16RemOp -> True Word32RemOp -> True+ Word64RemOp -> True WordQuotRemOp -> True Word8QuotRemOp -> True Word16QuotRemOp -> True Word32QuotRemOp -> True+ -- Word64QuotRemOp doesn't exist (yet)++ WordQuotRem2Op -> True FloatDivOp -> True DoubleDivOp -> True
GHC/Builtin/Types.hs view
@@ -18,7 +18,7 @@ mkWiredInIdName, -- used in GHC.Types.Id.Make -- * All wired in things- wiredInTyCons, isBuiltInOcc_maybe, isPunOcc_maybe,+ wiredInTyCons, isBuiltInOcc_maybe, isTupleTyOcc_maybe, isPunOcc_maybe, -- * Bool boolTy, boolTyCon, boolTyCon_RDR, boolTyConName,@@ -209,7 +209,11 @@ import Data.Foldable import Data.List ( elemIndex, intersperse )+import Numeric ( showInt ) +import Text.Read (readMaybe)+import Data.Char (ord, isDigit)+ alpha_tyvar :: [TyVar] alpha_tyvar = [alphaTyVar] @@ -734,16 +738,16 @@ However the /naming/ of the type/data constructors for one-tuples is a bit odd:- 3-tuples: (,,) (,,)#- 2-tuples: (,) (,)#+ 3-tuples: Tuple3 (,,)#+ 2-tuples: Tuple2 (,)# 1-tuples: ??- 0-tuples: () ()#+ 0-tuples: Unit ()# Zero-tuples have used up the logical name. So we use 'Solo' and 'Solo#' for one-tuples. So in ghc-prim:GHC.Tuple we see the declarations:- data () = ()+ data Unit = () data Solo a = MkSolo a- data (a,b) = (a,b)+ data Tuple2 a b = (a,b) There is no way to write a boxed one-tuple in Haskell using tuple syntax. They can, however, be written using other methods:@@ -852,13 +856,54 @@ choose_ns tc dc | isTcClsNameSpace ns = tc | isDataConNameSpace ns = dc- | otherwise = pprPanic "tup_name" (ppr occ)+ | otherwise = pprPanic "tup_name" (ppr occ <+> parens (pprNameSpace ns)) where ns = occNameSpace occ tup_name boxity arity = choose_ns (getName (tupleTyCon boxity arity)) (getName (tupleDataCon boxity arity)) +isTupleTyOcc_maybe :: Module -> OccName -> Maybe Name+isTupleTyOcc_maybe mod occ+ | mod == gHC_TUPLE_PRIM+ = match_occ+ where+ match_occ+ | occ == occName unitTyConName = Just unitTyConName+ | occ == occName soloTyConName = Just soloTyConName+ | otherwise = isTupleNTyOcc_maybe occ+isTupleTyOcc_maybe _ _ = Nothing+++-- | This is only for Tuple<n>, not for Unit or Solo+isTupleNTyOcc_maybe :: OccName -> Maybe Name+isTupleNTyOcc_maybe occ =+ case occNameString occ of+ 'T':'u':'p':'l':'e':str | Just n <- readInt str, n > 1+ -> Just (tupleTyConName BoxedTuple n)+ _ -> Nothing++-- | See Note [Small Ints parsing]+readInt :: String -> Maybe Int+readInt s = case s of+ [c] | isDigit c -> Just (digit_to_int c)+ [c1, c2] | isDigit c1, isDigit c2+ -> Just (digit_to_int c1 * 10 + digit_to_int c2)+ _ -> readMaybe s+ where+ digit_to_int :: Char -> Int+ digit_to_int c = ord c - ord '0'++{-+Note [Small Ints parsing]+~~~~~~~~~~~~~~~~~~~~~~~~~+Currently, tuples in Haskell have a maximum arity of 64.+To parse strings of length 1 and 2 more efficiently, we+can utilize an ad-hoc solution that matches their characters.+This results in a speedup of up to 40 times compared to using+`readMaybe @Int` on my machine.+-}+ -- When resolving names produced by Template Haskell (see thOrigRdrName -- in GHC.ThToHs), we want ghc-prim:GHC.Types.List to yield an Exact name, not -- an Orig name.@@ -872,6 +917,10 @@ isPunOcc_maybe mod occ | mod == gHC_TYPES, occ == occName listTyConName = Just listTyConName+ | mod == gHC_TUPLE_PRIM, occ == occName unitTyConName+ = Just unitTyConName+ | mod == gHC_TUPLE_PRIM+ = isTupleNTyOcc_maybe occ isPunOcc_maybe _ _ = Nothing mkTupleOcc :: NameSpace -> Boxity -> Arity -> OccName@@ -887,10 +936,15 @@ mkTupleStr Unboxed = const mkUnboxedTupleStr mkBoxedTupleStr :: NameSpace -> Arity -> String-mkBoxedTupleStr _ 0 = "()"-mkBoxedTupleStr ns 1 | isDataConNameSpace ns = "MkSolo" -- See Note [One-tuples]-mkBoxedTupleStr _ 1 = "Solo" -- See Note [One-tuples]-mkBoxedTupleStr _ ar = '(' : commas ar ++ ")"+mkBoxedTupleStr ns 0+ | isDataConNameSpace ns = "()"+ | otherwise = "Unit"+mkBoxedTupleStr ns 1+ | isDataConNameSpace ns = "MkSolo" -- See Note [One-tuples]+ | otherwise = "Solo"+mkBoxedTupleStr ns ar+ | isDataConNameSpace ns = '(' : commas ar ++ ")"+ | otherwise = "Tuple" ++ showInt ar "" mkUnboxedTupleStr :: Arity -> String mkUnboxedTupleStr 0 = "(##)"@@ -903,7 +957,7 @@ mkConstraintTupleStr ar = "(%" ++ commas ar ++ "%)" commas :: Arity -> String-commas ar = take (ar-1) (repeat ',')+commas ar = replicate (ar-1) ',' cTupleTyCon :: Arity -> TyCon cTupleTyCon i@@ -1052,7 +1106,7 @@ boxity = Boxed modu = gHC_TUPLE_PRIM tc_name = mkWiredInName modu (mkTupleOcc tcName boxity arity) tc_uniq- (ATyCon tycon) BuiltInSyntax+ (ATyCon tycon) UserSyntax dc_name = mkWiredInName modu (mkTupleOcc dataName boxity arity) dc_uniq (AConLike (RealDataCon tuple_con)) BuiltInSyntax tc_uniq = mkTupleTyConUnique boxity arity@@ -1126,6 +1180,9 @@ unitTyCon :: TyCon unitTyCon = tupleTyCon Boxed 0 +unitTyConName :: Name+unitTyConName = tyConName unitTyCon+ unitTyConKey :: Unique unitTyConKey = getUnique unitTyCon @@ -1138,6 +1195,9 @@ soloTyCon :: TyCon soloTyCon = tupleTyCon Boxed 1 +soloTyConName :: Name+soloTyConName = tyConName soloTyCon+ pairTyCon :: TyCon pairTyCon = tupleTyCon Boxed 2 @@ -1576,10 +1636,11 @@ where -- See Note [Getting from RuntimeRep to PrimRep] in RepType prim_rep_fun [lev]- = case tyConPromDataConInfo (tyConAppTyCon lev) of- Levity Lifted -> [LiftedRep]- Levity Unlifted -> [UnliftedRep]- _ -> pprPanic "boxedRepDataCon" (ppr lev)+ = case tyConAppTyCon_maybe lev of+ Just tc -> case tyConPromDataConInfo tc of+ Levity l -> [BoxedRep (Just l)]+ _ -> [BoxedRep Nothing]+ Nothing -> [BoxedRep Nothing] prim_rep_fun args = pprPanic "boxedRepDataCon" (ppr args) @@ -1939,7 +2000,7 @@ -- recall: data Int = I# Int# -- -- BI_Box { bi_data_con = MkInt8Box, bi_inst_con = MkInt8Box @ty- -- , bi_boxed_type = Int8Box ty }A+ -- , bi_boxed_type = Int8Box ty } -- recall: data Int8Box (a :: TYPE Int8Rep) = MkIntBox a boxingDataCon :: Type -> BoxingInfo b
GHC/Builtin/Types/Literals.hs view
@@ -479,8 +479,7 @@ axUnconsSymbolDef = mkUnAxiom "UnconsSymbolDef" typeUnconsSymbolTyCon isStrLitTy $- \str -> Just $- mkPromotedMaybeTy charSymbolPairKind (fmap reifyCharSymbolPairTy (unconsFS str))+ \str -> Just $ computeUncons str axCharToNatDef = mkUnAxiom "CharToNatDef" typeCharToNatTyCon isCharLitTy $@@ -784,14 +783,15 @@ mbY = isStrLitTy t matchFamConsSymbol _ = Nothing -reifyCharSymbolPairTy :: (Char, FastString) -> Type-reifyCharSymbolPairTy (c, s) = charSymbolPair (mkCharLitTy c) (mkStrLitTy s)+computeUncons :: FastString -> Type+computeUncons str = mkPromotedMaybeTy charSymbolPairKind (fmap reifyCharSymbolPairTy (unconsFS str))+ where reifyCharSymbolPairTy :: (Char, FastString) -> Type+ reifyCharSymbolPairTy (c, s) = charSymbolPair (mkCharLitTy c) (mkStrLitTy s) matchFamUnconsSymbol :: [Type] -> Maybe (CoAxiomRule, [Type], Type) matchFamUnconsSymbol [s] | Just x <- mbX =- Just (axUnconsSymbolDef, [s]- , mkPromotedMaybeTy charSymbolPairKind (fmap reifyCharSymbolPairTy (unconsFS x)))+ Just (axUnconsSymbolDef, [s], computeUncons x) where mbX = isStrLitTy s matchFamUnconsSymbol _ = Nothing
GHC/Builtin/Types/Prim.hs view
@@ -759,7 +759,7 @@ (W2) We need two absent-error Ids, aBSENT_ERROR_ID for types of kind Type, and aBSENT_CONSTRAINT_ERROR_ID for vaues of kind Constraint. Ditto noInlineId- vs noInlieConstraintId in GHC.Types.Id.Make; see Note [inlineId magic].+ vs noInlineConstraintId in GHC.Types.Id.Make; see Note [inlineId magic]. (W3) We need a TypeOrConstraint flag in LitRubbish. @@ -807,7 +807,7 @@ Wrinkles -(W1) In GHC.Core.RoughMap.roughMtchTyConName we are careful to map+(W1) In GHC.Core.RoughMap.roughMatchTyConName we are careful to map TYPE and CONSTRAINT to the same rough-map key. Reason: If we insert (F @Constraint tys) into a FamInstEnv, and look up (F @Type tys'), we /must/ ensure that the (C @Constraint tys)@@ -1042,8 +1042,8 @@ * It is "naturally coherent". This means that the solver won't hesitate to solve a goal of type (a ~~ b) even if there is, say (Int ~~ c) in the context. (Normally, it waits to learn more, just in case the given- influences what happens next.) See Note [Naturally coherent classes]- in GHC.Tc.Solver.Interact.+ influences what happens next.) See Note [Solving equality classes]+ in GHC.Tc.Solver.Dict * It always terminates. That is, in the UndecidableInstances checks, we don't worry if a (~~) constraint is too big, as we know that solving@@ -1052,7 +1052,7 @@ On the other hand, this behaves just like any class w.r.t. eager superclass unpacking in the solver. So a lifted equality given quickly becomes an unlifted equality given. This is good, because the solver knows all about unlifted-equalities. There is some special-casing in GHC.Tc.Solver.Interact.matchClassInst to+equalities. There is some special-casing in GHC.Tc.Solver.Dict.matchClassInst to pretend that there is an instance of this class, as we can't write the instance in Haskell.
GHC/Builtin/Uniques.hs view
@@ -19,6 +19,7 @@ -- *** Vanilla , mkTupleTyConUnique , mkTupleDataConUnique+ , isTupleTyConUnique -- *** Constraint , mkCTupleTyConUnique , mkCTupleDataConUnique@@ -30,10 +31,12 @@ , mkPreludeMiscIdUnique, mkPreludeDataConUnique , mkPreludeTyConUnique, mkPreludeClassUnique - , mkVarOccUnique, mkDataOccUnique, mkTvOccUnique, mkTcOccUnique , mkRegSingleUnique, mkRegPairUnique, mkRegClassUnique, mkRegSubUnique , mkCostCentreUnique + , varNSUnique, dataNSUnique, tvNSUnique, tcNSUnique+ , mkFldNSUnique, isFldNSUnique+ , mkBuiltinUnique , mkPseudoUniqueE @@ -63,10 +66,8 @@ import GHC.Utils.Outputable import GHC.Utils.Panic-import GHC.Utils.Panic.Plain (assert) import Data.Maybe-import GHC.Utils.Word64 (word64ToInt) -- | Get the 'Name' associated with a known-key 'Unique'. knownUniqueName :: Unique -> Maybe Name@@ -82,9 +83,7 @@ 'm' -> Just $ getCTupleDataConName n _ -> Nothing where- (tag, n') = unpkUnique u- -- Known unique names are guaranteed to fit in Int, so we don't need the whole Word64.- n = assert (isValidKnownKeyUnique u) (word64ToInt n')+ (tag, n) = unpkUnique u {- Note [Unique layout for unboxed sums]@@ -116,14 +115,14 @@ assertPpr (arity <= 0x3f) (ppr arity) $ -- 0x3f since we only have 6 bits to encode the -- alternative- mkUniqueInt 'z' (arity `shiftL` 8 .|. 0xfc)+ mkUnique 'z' (arity `shiftL` 8 .|. 0xfc) mkSumDataConUnique :: ConTagZ -> Arity -> Unique mkSumDataConUnique alt arity | alt >= arity = panic ("mkSumDataConUnique: " ++ show alt ++ " >= " ++ show arity) | otherwise- = mkUniqueInt 'z' (arity `shiftL` 8 + alt `shiftL` 2) {- skip the tycon -}+ = mkUnique 'z' (arity `shiftL` 8 + alt `shiftL` 2) {- skip the tycon -} getUnboxedSumName :: Int -> Name getUnboxedSumName n@@ -210,17 +209,17 @@ -} mkCTupleTyConUnique :: Arity -> Unique-mkCTupleTyConUnique a = mkUniqueInt 'k' (2*a)+mkCTupleTyConUnique a = mkUnique 'k' (2*a) mkCTupleDataConUnique :: Arity -> Unique-mkCTupleDataConUnique a = mkUniqueInt 'm' (3*a)+mkCTupleDataConUnique a = mkUnique 'm' (3*a) mkCTupleSelIdUnique :: ConTagZ -> Arity -> Unique mkCTupleSelIdUnique sc_pos arity | sc_pos >= arity = panic ("mkCTupleSelIdUnique: " ++ show sc_pos ++ " >= " ++ show arity) | otherwise- = mkUniqueInt 'j' (arity `shiftL` cTupleSelIdArityBits + sc_pos)+ = mkUnique 'j' (arity `shiftL` cTupleSelIdArityBits + sc_pos) getCTupleTyConName :: Int -> Name getCTupleTyConName n =@@ -263,13 +262,24 @@ -- Normal tuples mkTupleDataConUnique :: Boxity -> Arity -> Unique-mkTupleDataConUnique Boxed a = mkUniqueInt '7' (3*a) -- may be used in C labels-mkTupleDataConUnique Unboxed a = mkUniqueInt '8' (3*a)+mkTupleDataConUnique Boxed a = mkUnique '7' (3*a) -- may be used in C labels+mkTupleDataConUnique Unboxed a = mkUnique '8' (3*a) mkTupleTyConUnique :: Boxity -> Arity -> Unique-mkTupleTyConUnique Boxed a = mkUniqueInt '4' (2*a)-mkTupleTyConUnique Unboxed a = mkUniqueInt '5' (2*a)+mkTupleTyConUnique Boxed a = mkUnique '4' (2*a)+mkTupleTyConUnique Unboxed a = mkUnique '5' (2*a) +-- | This function is an inverse of `mkTupleTyConUnique`+isTupleTyConUnique :: Unique -> Maybe (Boxity, Arity)+isTupleTyConUnique u =+ case (tag, i) of+ ('4', 0) -> Just (Boxed, arity)+ ('5', 0) -> Just (Unboxed, arity)+ _ -> Nothing+ where+ (tag, n) = unpkUnique u+ (arity, i) = quotRem n 2+ getTupleTyConName :: Boxity -> Int -> Name getTupleTyConName boxity n = case n `divMod` 2 of@@ -288,7 +298,7 @@ _ -> panic "getTupleDataConName: impossible" {--Note [Uniques for wired-in prelude things and known tags]+Note [Uniques for wired-in prelude things and known masks] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Allocation of unique supply characters: v,u: for renumbering value-, and usage- vars.@@ -348,36 +358,41 @@ mkPrimOpWrapperUnique :: Int -> Unique mkPreludeMiscIdUnique :: Int -> Unique -mkAlphaTyVarUnique i = mkUniqueInt '1' i-mkPreludeClassUnique i = mkUniqueInt '2' i+mkAlphaTyVarUnique i = mkUnique '1' i+mkPreludeClassUnique i = mkUnique '2' i ---------------------------------------------------mkPrimOpIdUnique op = mkUniqueInt '9' (2*op)-mkPrimOpWrapperUnique op = mkUniqueInt '9' (2*op+1)-mkPreludeMiscIdUnique i = mkUniqueInt '0' i+mkPrimOpIdUnique op = mkUnique '9' (2*op)+mkPrimOpWrapperUnique op = mkUnique '9' (2*op+1)+mkPreludeMiscIdUnique i = mkUnique '0' i mkPseudoUniqueE, mkBuiltinUnique :: Int -> Unique -mkBuiltinUnique i = mkUniqueInt 'B' i-mkPseudoUniqueE i = mkUniqueInt 'E' i -- used in NCG spiller to create spill VirtualRegs+mkBuiltinUnique i = mkUnique 'B' i+mkPseudoUniqueE i = mkUnique 'E' i -- used in NCG spiller to create spill VirtualRegs mkRegSingleUnique, mkRegPairUnique, mkRegSubUnique, mkRegClassUnique :: Int -> Unique-mkRegSingleUnique = mkUniqueInt 'R'-mkRegSubUnique = mkUniqueInt 'S'-mkRegPairUnique = mkUniqueInt 'P'-mkRegClassUnique = mkUniqueInt 'L'+mkRegSingleUnique = mkUnique 'R'+mkRegSubUnique = mkUnique 'S'+mkRegPairUnique = mkUnique 'P'+mkRegClassUnique = mkUnique 'L' mkCostCentreUnique :: Int -> Unique-mkCostCentreUnique = mkUniqueInt 'C'+mkCostCentreUnique = mkUnique 'C' +varNSUnique, dataNSUnique, tvNSUnique, tcNSUnique :: Unique+varNSUnique = mkUnique 'i' 0+dataNSUnique = mkUnique 'd' 0+tvNSUnique = mkUnique 'v' 0+tcNSUnique = mkUnique 'c' 0 -mkVarOccUnique, mkDataOccUnique, mkTvOccUnique, mkTcOccUnique :: FastString -> Unique--- See Note [The Unique of an OccName] in GHC.Types.Name.Occurrence-mkVarOccUnique fs = mkUniqueInt 'i' (uniqueOfFS fs)-mkDataOccUnique fs = mkUniqueInt 'd' (uniqueOfFS fs)-mkTvOccUnique fs = mkUniqueInt 'v' (uniqueOfFS fs)-mkTcOccUnique fs = mkUniqueInt 'c' (uniqueOfFS fs)+mkFldNSUnique :: FastString -> Unique+mkFldNSUnique fs = mkUnique 'f' (uniqueOfFS fs) +isFldNSUnique :: Unique -> Bool+isFldNSUnique uniq = case unpkUnique uniq of+ (tag, _) -> tag == 'f'+ initExitJoinUnique :: Unique initExitJoinUnique = mkUnique 's' 0 @@ -386,7 +401,7 @@ -- See Note [Related uniques for wired-in things] mkPreludeTyConUnique :: Int -> Unique-mkPreludeTyConUnique i = mkUniqueInt '3' (2*i)+mkPreludeTyConUnique i = mkUnique '3' (2*i) tyConRepNameUnique :: Unique -> Unique tyConRepNameUnique u = incrUnique u@@ -396,7 +411,7 @@ -- See Note [Related uniques for wired-in things] mkPreludeDataConUnique :: Int -> Unique-mkPreludeDataConUnique i = mkUniqueInt '6' (3*i) -- Must be alphabetic+mkPreludeDataConUnique i = mkUnique '6' (3*i) -- Must be alphabetic dataConTyRepNameUnique, dataConWorkerUnique :: Unique -> Unique dataConWorkerUnique u = incrUnique u@@ -422,7 +437,7 @@ -- A little delicate! mkBoxingTyConUnique :: Int -> Unique-mkBoxingTyConUnique i = mkUniqueInt 'b' (5*i)+mkBoxingTyConUnique i = mkUnique 'b' (5*i) boxingDataConUnique :: Unique -> Unique boxingDataConUnique u = stepUnique u 2
GHC/Builtin/Uniques.hs-boot view
@@ -4,7 +4,6 @@ import GHC.Types.Unique import {-# SOURCE #-} GHC.Types.Name import GHC.Types.Basic-import GHC.Data.FastString -- Needed by GHC.Builtin.Types knownUniqueName :: Unique -> Maybe Name@@ -27,7 +26,6 @@ mkPseudoUniqueE, mkBuiltinUnique :: Int -> Unique mkRegSingleUnique, mkRegPairUnique, mkRegSubUnique, mkRegClassUnique :: Int -> Unique-mkVarOccUnique, mkDataOccUnique, mkTvOccUnique, mkTcOccUnique :: FastString -> Unique initExitJoinUnique :: Unique
GHC/Builtin/Utils.hs view
@@ -239,10 +239,10 @@ ghcPrimExports :: [IfaceExport] ghcPrimExports- = map (avail . idName) ghcPrimIds ++- map (avail . idName) allThePrimOpIds ++- [ availTC n [n] []- | tc <- exposedPrimTyCons, let n = tyConName tc ]+ = map (Avail . idName) ghcPrimIds +++ map (Avail . idName) allThePrimOpIds +++ [ AvailTC n [n]+ | tc <- exposedPrimTyCons, let n = tyConName tc ] ghcPrimDeclDocs :: Docs ghcPrimDeclDocs = emptyDocs { docs_decls = listToUniqMap $ mapMaybe findName primOpDocs }
− GHC/Builtin/bytearray-ops.txt.pp
@@ -1,551 +0,0 @@----------------------------------------- ByteArray# operations------------------------------------------ Do not edit. This file is generated by utils/genprimopcode/gen_bytearray_ops.py.--- To regenerate run,------ python3 utils/genprimops/gen_bytearray_ops.py > compiler/GHC/Builtin/bytearray-ops.txt.pp------------------------------------------ aligned index operations---------------------------------------primop IndexByteArrayOp_Char "indexCharArray#" GenPrimOp- ByteArray# -> Int# -> Char#- {Read a 8-bit character; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_WideChar "indexWideCharArray#" GenPrimOp- ByteArray# -> Int# -> Char#- {Read a 32-bit character; offset in 4-byte words.}- with can_fail = True--primop IndexByteArrayOp_Int "indexIntArray#" GenPrimOp- ByteArray# -> Int# -> Int#- {Read a word-sized integer; offset in machine words.}- with can_fail = True--primop IndexByteArrayOp_Word "indexWordArray#" GenPrimOp- ByteArray# -> Int# -> Word#- {Read a word-sized unsigned integer; offset in machine words.}- with can_fail = True--primop IndexByteArrayOp_Addr "indexAddrArray#" GenPrimOp- ByteArray# -> Int# -> Addr#- {Read a machine address; offset in machine words.}- with can_fail = True--primop IndexByteArrayOp_Float "indexFloatArray#" GenPrimOp- ByteArray# -> Int# -> Float#- {Read a single-precision floating-point value; offset in 4-byte words.}- with can_fail = True--primop IndexByteArrayOp_Double "indexDoubleArray#" GenPrimOp- ByteArray# -> Int# -> Double#- {Read a double-precision floating-point value; offset in 8-byte words.}- with can_fail = True--primop IndexByteArrayOp_StablePtr "indexStablePtrArray#" GenPrimOp- ByteArray# -> Int# -> StablePtr# a- {Read a 'StablePtr#' value; offset in machine words.}- with can_fail = True--primop IndexByteArrayOp_Int8 "indexInt8Array#" GenPrimOp- ByteArray# -> Int# -> Int8#- {Read a 8-bit signed integer; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Int16 "indexInt16Array#" GenPrimOp- ByteArray# -> Int# -> Int16#- {Read a 16-bit signed integer; offset in 2-byte words.}- with can_fail = True--primop IndexByteArrayOp_Int32 "indexInt32Array#" GenPrimOp- ByteArray# -> Int# -> Int32#- {Read a 32-bit signed integer; offset in 4-byte words.}- with can_fail = True--primop IndexByteArrayOp_Int64 "indexInt64Array#" GenPrimOp- ByteArray# -> Int# -> Int64#- {Read a 64-bit signed integer; offset in 8-byte words.}- with can_fail = True--primop IndexByteArrayOp_Word8 "indexWord8Array#" GenPrimOp- ByteArray# -> Int# -> Word8#- {Read a 8-bit unsigned integer; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word16 "indexWord16Array#" GenPrimOp- ByteArray# -> Int# -> Word16#- {Read a 16-bit unsigned integer; offset in 2-byte words.}- with can_fail = True--primop IndexByteArrayOp_Word32 "indexWord32Array#" GenPrimOp- ByteArray# -> Int# -> Word32#- {Read a 32-bit unsigned integer; offset in 4-byte words.}- with can_fail = True--primop IndexByteArrayOp_Word64 "indexWord64Array#" GenPrimOp- ByteArray# -> Int# -> Word64#- {Read a 64-bit unsigned integer; offset in 8-byte words.}- with can_fail = True------------------------------------------ unaligned index operations---------------------------------------primop IndexByteArrayOp_Word8AsChar "indexWord8ArrayAsChar#" GenPrimOp- ByteArray# -> Int# -> Char#- {Read a 8-bit character; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word8AsWideChar "indexWord8ArrayAsWideChar#" GenPrimOp- ByteArray# -> Int# -> Char#- {Read a 32-bit character; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word8AsInt "indexWord8ArrayAsInt#" GenPrimOp- ByteArray# -> Int# -> Int#- {Read a word-sized integer; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word8AsWord "indexWord8ArrayAsWord#" GenPrimOp- ByteArray# -> Int# -> Word#- {Read a word-sized unsigned integer; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word8AsAddr "indexWord8ArrayAsAddr#" GenPrimOp- ByteArray# -> Int# -> Addr#- {Read a machine address; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word8AsFloat "indexWord8ArrayAsFloat#" GenPrimOp- ByteArray# -> Int# -> Float#- {Read a single-precision floating-point value; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word8AsDouble "indexWord8ArrayAsDouble#" GenPrimOp- ByteArray# -> Int# -> Double#- {Read a double-precision floating-point value; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word8AsStablePtr "indexWord8ArrayAsStablePtr#" GenPrimOp- ByteArray# -> Int# -> StablePtr# a- {Read a 'StablePtr#' value; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word8AsInt16 "indexWord8ArrayAsInt16#" GenPrimOp- ByteArray# -> Int# -> Int16#- {Read a 16-bit signed integer; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word8AsInt32 "indexWord8ArrayAsInt32#" GenPrimOp- ByteArray# -> Int# -> Int32#- {Read a 32-bit signed integer; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word8AsInt64 "indexWord8ArrayAsInt64#" GenPrimOp- ByteArray# -> Int# -> Int64#- {Read a 64-bit signed integer; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word8AsWord16 "indexWord8ArrayAsWord16#" GenPrimOp- ByteArray# -> Int# -> Word16#- {Read a 16-bit unsigned integer; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word8AsWord32 "indexWord8ArrayAsWord32#" GenPrimOp- ByteArray# -> Int# -> Word32#- {Read a 32-bit unsigned integer; offset in bytes.}- with can_fail = True--primop IndexByteArrayOp_Word8AsWord64 "indexWord8ArrayAsWord64#" GenPrimOp- ByteArray# -> Int# -> Word64#- {Read a 64-bit unsigned integer; offset in bytes.}- with can_fail = True------------------------------------------ aligned read operations---------------------------------------primop ReadByteArrayOp_Char "readCharArray#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Char# #)- {Read a 8-bit character; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_WideChar "readWideCharArray#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Char# #)- {Read a 32-bit character; offset in 4-byte words.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Int "readIntArray#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Int# #)- {Read a word-sized integer; offset in machine words.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word "readWordArray#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Word# #)- {Read a word-sized unsigned integer; offset in machine words.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Addr "readAddrArray#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Addr# #)- {Read a machine address; offset in machine words.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Float "readFloatArray#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Float# #)- {Read a single-precision floating-point value; offset in 4-byte words.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Double "readDoubleArray#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Double# #)- {Read a double-precision floating-point value; offset in 8-byte words.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_StablePtr "readStablePtrArray#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, StablePtr# a #)- {Read a 'StablePtr#' value; offset in machine words.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Int8 "readInt8Array#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Int8# #)- {Read a 8-bit signed integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Int16 "readInt16Array#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Int16# #)- {Read a 16-bit signed integer; offset in 2-byte words.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Int32 "readInt32Array#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Int32# #)- {Read a 32-bit signed integer; offset in 4-byte words.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Int64 "readInt64Array#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Int64# #)- {Read a 64-bit signed integer; offset in 8-byte words.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8 "readWord8Array#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Word8# #)- {Read a 8-bit unsigned integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word16 "readWord16Array#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Word16# #)- {Read a 16-bit unsigned integer; offset in 2-byte words.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word32 "readWord32Array#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Word32# #)- {Read a 32-bit unsigned integer; offset in 4-byte words.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word64 "readWord64Array#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Word64# #)- {Read a 64-bit unsigned integer; offset in 8-byte words.}- with has_side_effects = True- can_fail = True------------------------------------------ unaligned read operations---------------------------------------primop ReadByteArrayOp_Word8AsChar "readWord8ArrayAsChar#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Char# #)- {Read a 8-bit character; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8AsWideChar "readWord8ArrayAsWideChar#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Char# #)- {Read a 32-bit character; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8AsInt "readWord8ArrayAsInt#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Int# #)- {Read a word-sized integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8AsWord "readWord8ArrayAsWord#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Word# #)- {Read a word-sized unsigned integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8AsAddr "readWord8ArrayAsAddr#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Addr# #)- {Read a machine address; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8AsFloat "readWord8ArrayAsFloat#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Float# #)- {Read a single-precision floating-point value; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8AsDouble "readWord8ArrayAsDouble#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Double# #)- {Read a double-precision floating-point value; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8AsStablePtr "readWord8ArrayAsStablePtr#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, StablePtr# a #)- {Read a 'StablePtr#' value; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8AsInt16 "readWord8ArrayAsInt16#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Int16# #)- {Read a 16-bit signed integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8AsInt32 "readWord8ArrayAsInt32#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Int32# #)- {Read a 32-bit signed integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8AsInt64 "readWord8ArrayAsInt64#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Int64# #)- {Read a 64-bit signed integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8AsWord16 "readWord8ArrayAsWord16#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Word16# #)- {Read a 16-bit unsigned integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8AsWord32 "readWord8ArrayAsWord32#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Word32# #)- {Read a 32-bit unsigned integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadByteArrayOp_Word8AsWord64 "readWord8ArrayAsWord64#" GenPrimOp- MutableByteArray# s -> Int# -> State# s -> (# State# s, Word64# #)- {Read a 64-bit unsigned integer; offset in bytes.}- with has_side_effects = True- can_fail = True------------------------------------------ aligned write operations---------------------------------------primop WriteByteArrayOp_Char "writeCharArray#" GenPrimOp- MutableByteArray# s -> Int# -> Char# -> State# s -> State# s- {Write a 8-bit character; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_WideChar "writeWideCharArray#" GenPrimOp- MutableByteArray# s -> Int# -> Char# -> State# s -> State# s- {Write a 32-bit character; offset in 4-byte words.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Int "writeIntArray#" GenPrimOp- MutableByteArray# s -> Int# -> Int# -> State# s -> State# s- {Write a word-sized integer; offset in machine words.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word "writeWordArray#" GenPrimOp- MutableByteArray# s -> Int# -> Word# -> State# s -> State# s- {Write a word-sized unsigned integer; offset in machine words.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Addr "writeAddrArray#" GenPrimOp- MutableByteArray# s -> Int# -> Addr# -> State# s -> State# s- {Write a machine address; offset in machine words.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Float "writeFloatArray#" GenPrimOp- MutableByteArray# s -> Int# -> Float# -> State# s -> State# s- {Write a single-precision floating-point value; offset in 4-byte words.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Double "writeDoubleArray#" GenPrimOp- MutableByteArray# s -> Int# -> Double# -> State# s -> State# s- {Write a double-precision floating-point value; offset in 8-byte words.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_StablePtr "writeStablePtrArray#" GenPrimOp- MutableByteArray# s -> Int# -> StablePtr# a -> State# s -> State# s- {Write a 'StablePtr#' value; offset in machine words.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Int8 "writeInt8Array#" GenPrimOp- MutableByteArray# s -> Int# -> Int8# -> State# s -> State# s- {Write a 8-bit signed integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Int16 "writeInt16Array#" GenPrimOp- MutableByteArray# s -> Int# -> Int16# -> State# s -> State# s- {Write a 16-bit signed integer; offset in 2-byte words.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Int32 "writeInt32Array#" GenPrimOp- MutableByteArray# s -> Int# -> Int32# -> State# s -> State# s- {Write a 32-bit signed integer; offset in 4-byte words.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Int64 "writeInt64Array#" GenPrimOp- MutableByteArray# s -> Int# -> Int64# -> State# s -> State# s- {Write a 64-bit signed integer; offset in 8-byte words.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8 "writeWord8Array#" GenPrimOp- MutableByteArray# s -> Int# -> Word8# -> State# s -> State# s- {Write a 8-bit unsigned integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word16 "writeWord16Array#" GenPrimOp- MutableByteArray# s -> Int# -> Word16# -> State# s -> State# s- {Write a 16-bit unsigned integer; offset in 2-byte words.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word32 "writeWord32Array#" GenPrimOp- MutableByteArray# s -> Int# -> Word32# -> State# s -> State# s- {Write a 32-bit unsigned integer; offset in 4-byte words.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word64 "writeWord64Array#" GenPrimOp- MutableByteArray# s -> Int# -> Word64# -> State# s -> State# s- {Write a 64-bit unsigned integer; offset in 8-byte words.}- with has_side_effects = True- can_fail = True------------------------------------------ unaligned write operations---------------------------------------primop WriteByteArrayOp_Word8AsChar "writeWord8ArrayAsChar#" GenPrimOp- MutableByteArray# s -> Int# -> Char# -> State# s -> State# s- {Write a 8-bit character; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8AsWideChar "writeWord8ArrayAsWideChar#" GenPrimOp- MutableByteArray# s -> Int# -> Char# -> State# s -> State# s- {Write a 32-bit character; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8AsInt "writeWord8ArrayAsInt#" GenPrimOp- MutableByteArray# s -> Int# -> Int# -> State# s -> State# s- {Write a word-sized integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8AsWord "writeWord8ArrayAsWord#" GenPrimOp- MutableByteArray# s -> Int# -> Word# -> State# s -> State# s- {Write a word-sized unsigned integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8AsAddr "writeWord8ArrayAsAddr#" GenPrimOp- MutableByteArray# s -> Int# -> Addr# -> State# s -> State# s- {Write a machine address; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8AsFloat "writeWord8ArrayAsFloat#" GenPrimOp- MutableByteArray# s -> Int# -> Float# -> State# s -> State# s- {Write a single-precision floating-point value; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8AsDouble "writeWord8ArrayAsDouble#" GenPrimOp- MutableByteArray# s -> Int# -> Double# -> State# s -> State# s- {Write a double-precision floating-point value; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8AsStablePtr "writeWord8ArrayAsStablePtr#" GenPrimOp- MutableByteArray# s -> Int# -> StablePtr# a -> State# s -> State# s- {Write a 'StablePtr#' value; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8AsInt16 "writeWord8ArrayAsInt16#" GenPrimOp- MutableByteArray# s -> Int# -> Int16# -> State# s -> State# s- {Write a 16-bit signed integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8AsInt32 "writeWord8ArrayAsInt32#" GenPrimOp- MutableByteArray# s -> Int# -> Int32# -> State# s -> State# s- {Write a 32-bit signed integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8AsInt64 "writeWord8ArrayAsInt64#" GenPrimOp- MutableByteArray# s -> Int# -> Int64# -> State# s -> State# s- {Write a 64-bit signed integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8AsWord16 "writeWord8ArrayAsWord16#" GenPrimOp- MutableByteArray# s -> Int# -> Word16# -> State# s -> State# s- {Write a 16-bit unsigned integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8AsWord32 "writeWord8ArrayAsWord32#" GenPrimOp- MutableByteArray# s -> Int# -> Word32# -> State# s -> State# s- {Write a 32-bit unsigned integer; offset in bytes.}- with has_side_effects = True- can_fail = True--primop WriteByteArrayOp_Word8AsWord64 "writeWord8ArrayAsWord64#" GenPrimOp- MutableByteArray# s -> Int# -> Word64# -> State# s -> State# s- {Write a 64-bit unsigned integer; offset in bytes.}- with has_side_effects = True- can_fail = True-
GHC/Builtin/primops.txt.pp view
@@ -933,27 +933,76 @@ {Count the number of set bits in a word.} primop Pdep8Op "pdep8#" GenPrimOp Word# -> Word# -> Word#- {Deposit bits to lower 8 bits of a word at locations specified by a mask.}+ {Deposit bits to lower 8 bits of a word at locations specified by a mask.++ @since 0.5.2.0} primop Pdep16Op "pdep16#" GenPrimOp Word# -> Word# -> Word#- {Deposit bits to lower 16 bits of a word at locations specified by a mask.}+ {Deposit bits to lower 16 bits of a word at locations specified by a mask.++ @since 0.5.2.0} primop Pdep32Op "pdep32#" GenPrimOp Word# -> Word# -> Word#- {Deposit bits to lower 32 bits of a word at locations specified by a mask.}+ {Deposit bits to lower 32 bits of a word at locations specified by a mask.++ @since 0.5.2.0} primop Pdep64Op "pdep64#" GenPrimOp Word64# -> Word64# -> Word64#- {Deposit bits to a word at locations specified by a mask.}+ {Deposit bits to a word at locations specified by a mask.++ @since 0.5.2.0} primop PdepOp "pdep#" GenPrimOp Word# -> Word# -> Word#- {Deposit bits to a word at locations specified by a mask.}+ {Deposit bits to a word at locations specified by a mask, aka+ [parallel bit deposit](https://en.wikipedia.org/wiki/Bit_Manipulation_Instruction_Sets#Parallel_bit_deposit_and_extract). + Software emulation:++ > pdep :: Word -> Word -> Word+ > pdep src mask = go 0 src mask+ > where+ > go :: Word -> Word -> Word -> Word+ > go result _ 0 = result+ > go result src mask = go newResult newSrc newMask+ > where+ > maskCtz = countTrailingZeros mask+ > newResult = if testBit src 0 then setBit result maskCtz else result+ > newSrc = src `shiftR` 1+ > newMask = clearBit mask maskCtz++ @since 0.5.2.0}+ primop Pext8Op "pext8#" GenPrimOp Word# -> Word# -> Word#- {Extract bits from lower 8 bits of a word at locations specified by a mask.}+ {Extract bits from lower 8 bits of a word at locations specified by a mask.++ @since 0.5.2.0} primop Pext16Op "pext16#" GenPrimOp Word# -> Word# -> Word#- {Extract bits from lower 16 bits of a word at locations specified by a mask.}+ {Extract bits from lower 16 bits of a word at locations specified by a mask.++ @since 0.5.2.0} primop Pext32Op "pext32#" GenPrimOp Word# -> Word# -> Word#- {Extract bits from lower 32 bits of a word at locations specified by a mask.}+ {Extract bits from lower 32 bits of a word at locations specified by a mask.++ @since 0.5.2.0} primop Pext64Op "pext64#" GenPrimOp Word64# -> Word64# -> Word64#- {Extract bits from a word at locations specified by a mask.}+ {Extract bits from a word at locations specified by a mask.++ @since 0.5.2.0} primop PextOp "pext#" GenPrimOp Word# -> Word# -> Word#- {Extract bits from a word at locations specified by a mask.}+ {Extract bits from a word at locations specified by a mask, aka+ [parallel bit extract](https://en.wikipedia.org/wiki/Bit_Manipulation_Instruction_Sets#Parallel_bit_deposit_and_extract). + Software emulation:++ > pext :: Word -> Word -> Word+ > pext src mask = loop 0 0 0+ > where+ > loop i count result+ > | i >= finiteBitSize (0 :: Word)+ > = result+ > | testBit mask i+ > = loop (i + 1) (count + 1) (if testBit src i then setBit result count else result)+ > | otherwise+ > = loop (i + 1) count result++ @since 0.5.2.0}+ primop Clz8Op "clz8#" GenPrimOp Word# -> Word# {Count leading zeros in the lower 8 bits of a word.} primop Clz16Op "clz16#" GenPrimOp Word# -> Word#@@ -1321,6 +1370,75 @@ with out_of_line = True ------------------------------------------------------------------------+section "Fused multiply-add operations"+ { #fma#++ The fused multiply-add primops 'fmaddFloat#' and 'fmaddDouble#'+ implement the operation++ \[+ \lambda\ x\ y\ z \rightarrow x * y + z+ \]++ with a single floating-point rounding operation at the end, as opposed to+ rounding twice (which can accumulate rounding errors).++ These primops can be compiled directly to a single machine instruction on+ architectures that support them. Currently, these are:++ 1. x86 with CPUs that support the FMA3 extended instruction set (which+ includes most processors since 2013).+ 2. PowerPC.+ 3. AArch64.++ This requires users pass the '-mfma' flag to GHC. Otherwise, the primop+ is implemented by falling back to the C standard library, which might+ perform software emulation (this may yield results that are not IEEE+ compliant on some platforms).++ The additional operations 'fmsubFloat#'/'fmsubDouble#',+ 'fnmaddFloat#'/'fnmaddDouble#' and 'fnmsubFloat#'/'fnmsubDouble#' provide+ variants on 'fmaddFloat#'/'fmaddDouble#' in which some signs are changed:++ \[+ \begin{aligned}+ \mathrm{fmadd}\ x\ y\ z &= \phantom{+} x * y + z \\[8pt]+ \mathrm{fmsub}\ x\ y\ z &= \phantom{+} x * y - z \\[8pt]+ \mathrm{fnmadd}\ x\ y\ z &= - x * y + z \\[8pt]+ \mathrm{fnmsub}\ x\ y\ z &= - x * y - z+ \end{aligned}+ \]++ }+------------------------------------------------------------------------++primop FloatFMAdd "fmaddFloat#" GenPrimOp+ Float# -> Float# -> Float# -> Float#+ {Fused multiply-add operation @x*y+z@. See "GHC.Prim#fma".}+primop FloatFMSub "fmsubFloat#" GenPrimOp+ Float# -> Float# -> Float# -> Float#+ {Fused multiply-subtract operation @x*y-z@. See "GHC.Prim#fma".}+primop FloatFNMAdd "fnmaddFloat#" GenPrimOp+ Float# -> Float# -> Float# -> Float#+ {Fused negate-multiply-add operation @-x*y+z@. See "GHC.Prim#fma".}+primop FloatFNMSub "fnmsubFloat#" GenPrimOp+ Float# -> Float# -> Float# -> Float#+ {Fused negate-multiply-subtract operation @-x*y-z@. See "GHC.Prim#fma".}++primop DoubleFMAdd "fmaddDouble#" GenPrimOp+ Double# -> Double# -> Double# -> Double#+ {Fused multiply-add operation @x*y+z@. See "GHC.Prim#fma".}+primop DoubleFMSub "fmsubDouble#" GenPrimOp+ Double# -> Double# -> Double# -> Double#+ {Fused multiply-subtract operation @x*y-z@. See "GHC.Prim#fma".}+primop DoubleFNMAdd "fnmaddDouble#" GenPrimOp+ Double# -> Double# -> Double# -> Double#+ {Fused negate-multiply-add operation @-x*y+z@. See "GHC.Prim#fma".}+primop DoubleFNMSub "fnmsubDouble#" GenPrimOp+ Double# -> Double# -> Double# -> Double#+ {Fused negate-multiply-subtract operation @-x*y-z@. See "GHC.Prim#fma".}++------------------------------------------------------------------------ section "Arrays" {Operations on 'Array#'.} ------------------------------------------------------------------------@@ -1518,7 +1636,16 @@ SmallMutableArray# s v -> Int# -> State# s -> State# s {Shrink mutable array to new specified size, in the specified state thread. The new size argument must be less than or- equal to the current size as reported by 'getSizeofSmallMutableArray#'.}+ equal to the current size as reported by 'getSizeofSmallMutableArray#'.++ Assuming the non-profiling RTS, for the copying garbage collector+ (default) this primitive compiles to an O(1) operation in C--, modifying+ the array in-place. For the non-moving garbage collector, however, the+ time is proportional to the number of elements shrinked out. Backends+ bypassing C-- representation (such as JavaScript) might behave+ differently.++ @since 0.6.1} with out_of_line = True has_side_effects = True @@ -1542,15 +1669,18 @@ primop SizeofSmallMutableArrayOp "sizeofSmallMutableArray#" GenPrimOp SmallMutableArray# s v -> Int#- {Return the number of elements in the array. Note that this is deprecated- as it is unsafe in the presence of shrink and resize operations on the- same small mutable array.}+ {Return the number of elements in the array. __Deprecated__, it is+ unsafe in the presence of 'shrinkSmallMutableArray#' and @resizeSmallMutableArray#@+ operations on the same small mutable array.} with deprecated_msg = { Use 'getSizeofSmallMutableArray#' instead } primop GetSizeofSmallMutableArrayOp "getSizeofSmallMutableArray#" GenPrimOp SmallMutableArray# s v -> State# s -> (# State# s, Int# #)- {Return the number of elements in the array.}+ {Return the number of elements in the array, correctly accounting for+ the effect of 'shrinkSmallMutableArray#' and @resizeSmallMutableArray#@. + @since 0.6.1}+ primop IndexSmallArrayOp "indexSmallArray#" GenPrimOp SmallArray# v -> Int# -> (# v #) {Read from specified index of immutable array. Result is packaged into@@ -1758,13 +1888,19 @@ MutableByteArray# s -> Int# -> State# s -> State# s {Shrink mutable byte array to new specified size (in bytes), in the specified state thread. The new size argument must be less than or- equal to the current size as reported by 'getSizeofMutableByteArray#'.}+ equal to the current size as reported by 'getSizeofMutableByteArray#'.++ Assuming the non-profiling RTS, this primitive compiles to an O(1)+ operation in C--, modifying the array in-place. Backends bypassing C--+ representation (such as JavaScript) might behave differently.++ @since 0.4.0.0} with out_of_line = True has_side_effects = True primop ResizeMutableByteArrayOp_Char "resizeMutableByteArray#" GenPrimOp MutableByteArray# s -> Int# -> State# s -> (# State# s,MutableByteArray# s #)- {Resize (unpinned) mutable byte array to new specified size (in bytes).+ {Resize mutable byte array to new specified size (in bytes), shrinking or growing it. The returned 'MutableByteArray#' is either the original 'MutableByteArray#' resized in-place or, if not possible, a newly allocated (unpinned) 'MutableByteArray#' (with the original content@@ -1774,7 +1910,9 @@ not be accessed anymore after a 'resizeMutableByteArray#' has been performed. Moreover, no reference to the old one should be kept in order to allow garbage collection of the original 'MutableByteArray#' in- case a new 'MutableByteArray#' had to be allocated.}+ case a new 'MutableByteArray#' had to be allocated.++ @since 0.4.0.0} with out_of_line = True has_side_effects = True @@ -1790,17 +1928,25 @@ primop SizeofMutableByteArrayOp "sizeofMutableByteArray#" GenPrimOp MutableByteArray# s -> Int#- {Return the size of the array in bytes. Note that this is deprecated as it is- unsafe in the presence of shrink and resize operations on the same mutable byte+ {Return the size of the array in bytes. __Deprecated__, it is+ unsafe in the presence of 'shrinkMutableByteArray#' and 'resizeMutableByteArray#'+ operations on the same mutable byte array.} with deprecated_msg = { Use 'getSizeofMutableByteArray#' instead } primop GetSizeofMutableByteArrayOp "getSizeofMutableByteArray#" GenPrimOp MutableByteArray# s -> State# s -> (# State# s, Int# #)- {Return the number of elements in the array.}+ {Return the number of elements in the array, correctly accounting for+ the effect of 'shrinkMutableByteArray#' and 'resizeMutableByteArray#'. -#include "bytearray-ops.txt.pp"+ @since 0.5.0.0} ++bytearray_access_ops+-- This generates a whole bunch of primops;+-- see utils/genprimopcode/AccessOps.hs++ primop CompareByteArraysOp "compareByteArrays#" GenPrimOp ByteArray# -> Int# -> ByteArray# -> Int# -> Int# -> Int# {@'compareByteArrays#' src1 src1_ofs src2 src2_ofs n@ compares@@ -1817,13 +1963,14 @@ primop CopyByteArrayOp "copyByteArray#" GenPrimOp ByteArray# -> Int# -> MutableByteArray# s -> Int# -> Int# -> State# s -> State# s- {@'copyByteArray#' src src_ofs dst dst_ofs n@ copies the range- starting at offset @src_ofs@ of length @n@ from the- 'ByteArray#' @src@ to the 'MutableByteArray#' @dst@- starting at offset @dst_ofs@. Both arrays must fully contain- the specified ranges, but this is not checked. The two arrays must- not be the same array in different states, but this is not checked- either.}+ { @'copyByteArray#' src src_ofs dst dst_ofs len@ copies the range+ starting at offset @src_ofs@ of length @len@ from the+ 'ByteArray#' @src@ to the 'MutableByteArray#' @dst@+ starting at offset @dst_ofs@. Both arrays must fully contain+ the specified ranges, but this is not checked. The two arrays must+ not be the same array in different states, but this is not checked+ either.+ } with has_side_effects = True code_size = { primOpCodeSizeForeignCall + 4}@@ -1831,15 +1978,35 @@ primop CopyMutableByteArrayOp "copyMutableByteArray#" GenPrimOp MutableByteArray# s -> Int# -> MutableByteArray# s -> Int# -> Int# -> State# s -> State# s- {Copy a range of the first MutableByteArray\# to the specified region in the second MutableByteArray\#.- Both arrays must fully contain the specified ranges, but this is not checked. The regions are- allowed to overlap, although this is only possible when the same array is provided- as both the source and the destination.}+ { @'copyMutableByteArray#' src src_ofs dst dst_ofs len@ copies the+ range starting at offset @src_ofs@ of length @len@ from the+ 'MutableByteArray#' @src@ to the 'MutableByteArray#' @dst@+ starting at offset @dst_ofs@. Both arrays must fully contain the+ specified ranges, but this is not checked. The regions are+ allowed to overlap, although this is only possible when the same+ array is provided as both the source and the destination.+ } with has_side_effects = True code_size = { primOpCodeSizeForeignCall + 4 } can_fail = True +primop CopyMutableByteArrayNonOverlappingOp "copyMutableByteArrayNonOverlapping#" GenPrimOp+ MutableByteArray# s -> Int# -> MutableByteArray# s -> Int# -> Int# -> State# s -> State# s+ { @'copyMutableByteArrayNonOverlapping#' src src_ofs dst dst_ofs len@+ copies the range starting at offset @src_ofs@ of length @len@ from+ the 'MutableByteArray#' @src@ to the 'MutableByteArray#' @dst@+ starting at offset @dst_ofs@. Both arrays must fully contain the+ specified ranges, but this is not checked. The regions are /not/+ allowed to overlap, but this is also not checked.++ @since 0.11.0+ }+ with+ has_side_effects = True+ code_size = { primOpCodeSizeForeignCall + 4 }+ can_fail = True+ primop CopyByteArrayToAddrOp "copyByteArrayToAddr#" GenPrimOp ByteArray# -> Int# -> Addr# -> Int# -> State# s -> State# s {Copy a range of the ByteArray\# to the memory range starting at the Addr\#.@@ -1849,7 +2016,7 @@ either.} with has_side_effects = True- code_size = { primOpCodeSizeForeignCall + 4}+ code_size = { primOpCodeSizeForeignCall + 4 } can_fail = True primop CopyMutableByteArrayToAddrOp "copyMutableByteArrayToAddr#" GenPrimOp@@ -1861,7 +2028,7 @@ pinned), but this is not checked either.} with has_side_effects = True- code_size = { primOpCodeSizeForeignCall + 4}+ code_size = { primOpCodeSizeForeignCall + 4 } can_fail = True primop CopyAddrToByteArrayOp "copyAddrToByteArray#" GenPrimOp@@ -1873,9 +2040,40 @@ but this is not checked either.} with has_side_effects = True- code_size = { primOpCodeSizeForeignCall + 4}+ code_size = { primOpCodeSizeForeignCall + 4 } can_fail = True +primop CopyAddrToAddrOp "copyAddrToAddr#" GenPrimOp+ Addr# -> Addr# -> Int# -> State# RealWorld -> State# RealWorld+ { @'copyAddrToAddr#' src dest len@ copies @len@ bytes+ from @src@ to @dest@. These two memory ranges are allowed to overlap.++ Analogous to the standard C function @memmove@, but with a different+ argument order.++ @since 0.11.0+ }+ with+ has_side_effects = True+ code_size = { primOpCodeSizeForeignCall }+ can_fail = True++primop CopyAddrToAddrNonOverlappingOp "copyAddrToAddrNonOverlapping#" GenPrimOp+ Addr# -> Addr# -> Int# -> State# RealWorld -> State# RealWorld+ { @'copyAddrToAddrNonOverlapping#' src dest len@ copies @len@ bytes+ from @src@ to @dest@. As the name suggests, these two memory ranges+ /must not overlap/, although this pre-condition is not checked.++ Analogous to the standard C function @memcpy@, but with a different+ argument order.++ @since 0.11.0+ }+ with+ has_side_effects = True+ code_size = { primOpCodeSizeForeignCall }+ can_fail = True+ primop SetByteArrayOp "setByteArray#" GenPrimOp MutableByteArray# s -> Int# -> Int# -> Int# -> State# s -> State# s {@'setByteArray#' ba off len c@ sets the byte range @[off, off+len)@ of@@ -1885,6 +2083,21 @@ code_size = { primOpCodeSizeForeignCall + 4 } can_fail = True +primop SetAddrRangeOp "setAddrRange#" GenPrimOp+ Addr# -> Int# -> Int# -> State# RealWorld -> State# RealWorld+ { @'setAddrRange#' dest len c@ sets all of the bytes in+ @[dest, dest+len)@ to the value @c@.++ Analogous to the standard C function @memset@, but with a different+ argument order.++ @since 0.11.0+ }+ with+ has_side_effects = True+ code_size = { primOpCodeSizeForeignCall }+ can_fail = True+ -- Atomic operations primop AtomicReadByteArrayOp_Int "atomicReadIntArray#" GenPrimOp@@ -2033,234 +2246,12 @@ primop AddrLtOp "ltAddr#" Compare Addr# -> Addr# -> Int# primop AddrLeOp "leAddr#" Compare Addr# -> Addr# -> Int# -primop IndexOffAddrOp_Char "indexCharOffAddr#" GenPrimOp- Addr# -> Int# -> Char#- {Reads 8-bit character; offset in bytes.}- with can_fail = True -primop IndexOffAddrOp_WideChar "indexWideCharOffAddr#" GenPrimOp- Addr# -> Int# -> Char#- {Reads 31-bit character; offset in 4-byte words.}- with can_fail = True+addr_access_ops+-- This generates a whole bunch of primops;+-- see utils/genprimopcode/AccessOps.hs -primop IndexOffAddrOp_Int "indexIntOffAddr#" GenPrimOp- Addr# -> Int# -> Int#- with can_fail = True -primop IndexOffAddrOp_Word "indexWordOffAddr#" GenPrimOp- Addr# -> Int# -> Word#- with can_fail = True--primop IndexOffAddrOp_Addr "indexAddrOffAddr#" GenPrimOp- Addr# -> Int# -> Addr#- with can_fail = True--primop IndexOffAddrOp_Float "indexFloatOffAddr#" GenPrimOp- Addr# -> Int# -> Float#- with can_fail = True--primop IndexOffAddrOp_Double "indexDoubleOffAddr#" GenPrimOp- Addr# -> Int# -> Double#- with can_fail = True--primop IndexOffAddrOp_StablePtr "indexStablePtrOffAddr#" GenPrimOp- Addr# -> Int# -> StablePtr# a- with can_fail = True--primop IndexOffAddrOp_Int8 "indexInt8OffAddr#" GenPrimOp- Addr# -> Int# -> Int8#- with can_fail = True--primop IndexOffAddrOp_Int16 "indexInt16OffAddr#" GenPrimOp- Addr# -> Int# -> Int16#- with can_fail = True--primop IndexOffAddrOp_Int32 "indexInt32OffAddr#" GenPrimOp- Addr# -> Int# -> Int32#- with can_fail = True--primop IndexOffAddrOp_Int64 "indexInt64OffAddr#" GenPrimOp- Addr# -> Int# -> Int64#- with can_fail = True--primop IndexOffAddrOp_Word8 "indexWord8OffAddr#" GenPrimOp- Addr# -> Int# -> Word8#- with can_fail = True--primop IndexOffAddrOp_Word16 "indexWord16OffAddr#" GenPrimOp- Addr# -> Int# -> Word16#- with can_fail = True--primop IndexOffAddrOp_Word32 "indexWord32OffAddr#" GenPrimOp- Addr# -> Int# -> Word32#- with can_fail = True--primop IndexOffAddrOp_Word64 "indexWord64OffAddr#" GenPrimOp- Addr# -> Int# -> Word64#- with can_fail = True--primop ReadOffAddrOp_Char "readCharOffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Char# #)- {Reads 8-bit character; offset in bytes.}- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_WideChar "readWideCharOffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Char# #)- {Reads 31-bit character; offset in 4-byte words.}- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_Int "readIntOffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Int# #)- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_Word "readWordOffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Word# #)- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_Addr "readAddrOffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Addr# #)- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_Float "readFloatOffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Float# #)- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_Double "readDoubleOffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Double# #)- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_StablePtr "readStablePtrOffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, StablePtr# a #)- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_Int8 "readInt8OffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Int8# #)- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_Int16 "readInt16OffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Int16# #)- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_Int32 "readInt32OffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Int32# #)- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_Int64 "readInt64OffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Int64# #)- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_Word8 "readWord8OffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Word8# #)- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_Word16 "readWord16OffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Word16# #)- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_Word32 "readWord32OffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Word32# #)- with has_side_effects = True- can_fail = True--primop ReadOffAddrOp_Word64 "readWord64OffAddr#" GenPrimOp- Addr# -> Int# -> State# s -> (# State# s, Word64# #)- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Char "writeCharOffAddr#" GenPrimOp- Addr# -> Int# -> Char# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_WideChar "writeWideCharOffAddr#" GenPrimOp- Addr# -> Int# -> Char# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Int "writeIntOffAddr#" GenPrimOp- Addr# -> Int# -> Int# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Word "writeWordOffAddr#" GenPrimOp- Addr# -> Int# -> Word# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Addr "writeAddrOffAddr#" GenPrimOp- Addr# -> Int# -> Addr# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Float "writeFloatOffAddr#" GenPrimOp- Addr# -> Int# -> Float# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Double "writeDoubleOffAddr#" GenPrimOp- Addr# -> Int# -> Double# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_StablePtr "writeStablePtrOffAddr#" GenPrimOp- Addr# -> Int# -> StablePtr# a -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Int8 "writeInt8OffAddr#" GenPrimOp- Addr# -> Int# -> Int8# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Int16 "writeInt16OffAddr#" GenPrimOp- Addr# -> Int# -> Int16# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Int32 "writeInt32OffAddr#" GenPrimOp- Addr# -> Int# -> Int32# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Int64 "writeInt64OffAddr#" GenPrimOp- Addr# -> Int# -> Int64# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Word8 "writeWord8OffAddr#" GenPrimOp- Addr# -> Int# -> Word8# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Word16 "writeWord16OffAddr#" GenPrimOp- Addr# -> Int# -> Word16# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Word32 "writeWord32OffAddr#" GenPrimOp- Addr# -> Int# -> Word32# -> State# s -> State# s- with has_side_effects = True- can_fail = True--primop WriteOffAddrOp_Word64 "writeWord64OffAddr#" GenPrimOp- Addr# -> Int# -> Word64# -> State# s -> State# s- with has_side_effects = True- can_fail = True- primop InterlockedExchange_Addr "atomicExchangeAddrAddr#" GenPrimOp Addr# -> Addr# -> State# s -> (# State# s, Addr# #) {The atomic exchange operation. Atomically exchanges the value at the first address@@ -2464,6 +2455,12 @@ has_side_effects = True code_size = { primOpCodeSizeForeignCall } -- for the write barrier +primop AtomicSwapMutVarOp "atomicSwapMutVar#" GenPrimOp+ MutVar# s v -> v -> State# s -> (# State# s, v #)+ {Atomically exchange the value of a 'MutVar#'.}+ with+ has_side_effects = True+ -- Note [Why not an unboxed tuple in atomicModifyMutVar2#?] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Looking at the type of atomicModifyMutVar2#, one might wonder why@@ -2479,15 +2476,28 @@ primop AtomicModifyMutVar2Op "atomicModifyMutVar2#" GenPrimOp MutVar# s a -> (a -> c) -> State# s -> (# State# s, a, c #) { Modify the contents of a 'MutVar#', returning the previous- contents and the result of applying the given function to the- previous contents. Note that this isn't strictly- speaking the correct type for this function; it should really be- @'MutVar#' s a -> (a -> (a,b)) -> 'State#' s -> (# 'State#' s, a, (a, b) #)@,- but we don't know about pairs here. }+ contents @x :: a@ and the result of applying the given function to the+ previous contents @f x :: c@.++ The @data@ type @c@ (not a @newtype@!) must be a record whose first field+ is of lifted type @a :: Type@ and is not unpacked. For example, product+ types @c ~ Solo a@ or @c ~ (a, b)@ work well. If the record type is both+ monomorphic and strict in its first field, it's recommended to mark the+ latter @{-# NOUNPACK #-}@ explicitly.++ Under the hood 'atomicModifyMutVar2#' atomically replaces a pointer to an+ old @x :: a@ with a pointer to a selector thunk @fst r@, where+ @fst@ is a selector for the first field of the record and @r@ is a+ function application thunk @r = f x@.++ @atomicModifyIORef2Native@ from @atomic-modify-general@ package makes an+ effort to reflect restrictions on @c@ faithfully, providing a+ well-typed high-level wrapper.} with out_of_line = True has_side_effects = True can_fail = True+ strictness = { \ _arity -> mkClosedDmdSig [ topDmd, lazyApply1Dmd, topDmd ] topDiv } primop AtomicModifyMutVar_Op "atomicModifyMutVar_#" GenPrimOp MutVar# s a -> (a -> a) -> State# s -> (# State# s, a, a #)@@ -2498,6 +2508,7 @@ out_of_line = True has_side_effects = True can_fail = True+ strictness = { \ _arity -> mkClosedDmdSig [ topDmd, lazyApply1Dmd, topDmd ] topDiv } primop CasMutVarOp "casMutVar#" GenPrimOp MutVar# s v -> v -> v -> State# s -> (# State# s, Int#, v #)@@ -2524,45 +2535,18 @@ section "Exceptions" ------------------------------------------------------------------------ --- Note [Strict IO wrappers]--- ~~~~~~~~~~~~~~~~~~~~~~~~~+-- Note [Strictness for mask/unmask/catch]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Consider this example, which comes from GHC.IO.Handle.Internals:--- wantReadableHandle3 f mv b st+-- wantReadableHandle3 f ma b st -- = case ... of--- DEFAULT -> case mv of MVar a -> ...--- 0# -> maskAsyncExceptions# (\st -> case mv of MVar a -> ...)+-- DEFAULT -> case ma of MVar a -> ...+-- 0# -> maskAsyncExceptions# (\st -> case ma of MVar a -> ...) -- The outer case just decides whether to mask exceptions, but we don't want--- thereby to hide the strictness in `mv`! Hence the use of strictOnceApply1Dmd--- in mask#, unmask# and atomically# (where we use strictManyApply1Dmd to respect--- that it potentially calls its action multiple times).------ Note [Strictness for catch-style primops]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--- The catch#-style primops always call their action, just like outlined--- in Note [Strict IO wrappers].--- However, it is important that we give their first arg lazyApply1Dmd and not--- strictOnceApply1Dmd, like for mask#. Here is why. Consider a call------ catch# act handler s------ If `act = raiseIO# ...`, using strictOnceApply1Dmd for `act` would mean that--- the call forwards the dead-end flag from `act` (see Note [Dead ends] and--- Note [Precise exceptions and strictness analysis]).--- This would cause dead code elimination to discard the continuation of the--- catch# call, among other things. This first came up in #11555.------ Hence catch# uses lazyApply1Dmd in order /not/ to forward the dead-end flag--- from `act`. (This is a bit brutal, but the language of strictness types is--- not expressive enough to give it a more precise semantics that is still--- sound.)--- For perf reasons we often (but not always) choose to use a wrapper around--- catch# that is head-strict in `act`: GHC.IO.catchException.------ A similar caveat applies to prompt#, which can be seen as a--- generalisation of catch# as explained in GHC.Prim#continuations#.--- The reason is that even if `act` appears dead-ending (e.g., looping)--- `prompt# tag ma s` might return alright due to a (higher-order) use of--- `control0#` in `act`. This came up in #25439.+-- thereby to hide the strictness in 'ma'! Hence the use of strictOnceApply1Dmd+-- in mask and unmask. But catch really is lazy in its first argument, see+-- #11555. So for IO actions 'ma' we often use a wrapper around it that is+-- head-strict in 'ma': GHC.IO.catchException. primop CatchOp "catch#" GenPrimOp (State# RealWorld -> (# State# RealWorld, o #) )@@ -2579,7 +2563,7 @@ strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd] topDiv }- -- See Note [Strictness for catch-style primops]+ -- See Note [Strictness for mask/unmask/catch] out_of_line = True has_side_effects = True @@ -2644,7 +2628,7 @@ in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv }- -- See Note [Strict IO wrappers]+ -- See Note [Strictness for mask/unmask/catch] out_of_line = True has_side_effects = True @@ -2659,7 +2643,6 @@ in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv }- -- See Note [Strict IO wrappers] out_of_line = True has_side_effects = True @@ -2674,7 +2657,7 @@ in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv }- -- See Note [Strict IO wrappers]+ -- See Note [Strictness for mask/unmask/catch] out_of_line = True has_side_effects = True @@ -2860,8 +2843,7 @@ -> State# RealWorld -> (# State# RealWorld, a #) { See "GHC.Prim#continuations". } with- strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply1Dmd, topDmd] topDiv }- -- See Note [Strictness for catch-style primops]+ strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv } out_of_line = True has_side_effects = True @@ -2888,7 +2870,7 @@ -> State# RealWorld -> (# State# RealWorld, v #) with strictness = { \ _arity -> mkClosedDmdSig [strictManyApply1Dmd,topDmd] topDiv }- -- See Note [Strict IO wrappers]+ -- See Note [Strictness for mask/unmask/catch] out_of_line = True has_side_effects = True @@ -2917,7 +2899,7 @@ strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply1Dmd , topDmd ] topDiv }- -- See Note [Strictness for catch-style primops]+ -- See Note [Strictness for mask/unmask/catch] out_of_line = True has_side_effects = True @@ -2929,7 +2911,7 @@ strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd ] topDiv }- -- See Note [Strictness for catch-style primops]+ -- See Note [Strictness for mask/unmask/catch] out_of_line = True has_side_effects = True @@ -3278,7 +3260,7 @@ out_of_line = True primop TouchOp "touch#" GenPrimOp- v -> State# RealWorld -> State# RealWorld+ v -> State# s -> State# s with code_size = { 0 } has_side_effects = True@@ -3594,7 +3576,7 @@ -- and "p" is the same as "b" except representation-polymorphic. -- See Note [Levity and representation polymorphic primops] primop KeepAliveOp "keepAlive#" GenPrimOp- v -> State# RealWorld -> (State# RealWorld -> p) -> p+ v -> State# s -> (State# s -> p) -> p { @'keepAlive#' x s k@ keeps the value @x@ alive during the execution of the computation @k@. @@ -3604,7 +3586,6 @@ with out_of_line = True strictness = { \ _arity -> mkClosedDmdSig [topDmd, topDmd, strictOnceApply1Dmd] topDiv }- -- See Note [Strict IO wrappers] ------------------------------------------------------------------------@@ -3773,7 +3754,7 @@ representation. } pseudoop "seq"- a -> b -> b+ a -> p -> p { The value of @'seq' a b@ is bottom if @a@ is bottom, and otherwise equal to @b@. In other words, it evaluates the first argument @a@ to weak head normal form (WHNF). 'seq' is usually@@ -3790,50 +3771,6 @@ -- This fixity is only the one picked up by Haddock. If you -- change this, do update 'ghcPrimIface' in 'GHC.Iface.Load'. -pseudoop "unsafeCoerce#"- a -> b- { The function 'unsafeCoerce#' allows you to side-step the typechecker entirely. That- is, it allows you to coerce any type into any other type. If you use this function,- you had better get it right, otherwise segmentation faults await. It is generally- used when you want to write a program that you know is well-typed, but where Haskell's- type system is not expressive enough to prove that it is well typed.-- The following uses of 'unsafeCoerce#' are supposed to work (i.e. not lead to- spurious compile-time or run-time crashes):-- * Casting any lifted type to 'Any'-- * Casting 'Any' back to the real type-- * Casting an unboxed type to another unboxed type of the same size.- (Casting between floating-point and integral types does not work.- See the "GHC.Float" module for functions to do work.)-- * Casting between two types that have the same runtime representation. One case is when- the two types differ only in "phantom" type parameters, for example- @'Ptr' 'Int'@ to @'Ptr' 'Float'@, or @['Int']@ to @['Float']@ when the list is- known to be empty. Also, a @newtype@ of a type @T@ has the same representation- at runtime as @T@.-- Other uses of 'unsafeCoerce#' are undefined. In particular, you should not use- 'unsafeCoerce#' to cast a T to an algebraic data type D, unless T is also- an algebraic data type. For example, do not cast @'Int'->'Int'@ to 'Bool', even if- you later cast that 'Bool' back to @'Int'->'Int'@ before applying it. The reasons- have to do with GHC's internal representation details (for the cognoscenti, data values- can be entered but function closures cannot). If you want a safe type to cast things- to, use 'Any', which is not an algebraic data type.-- }- with can_fail = True---- NB. It is tempting to think that casting a value to a type that it doesn't have is safe--- as long as you don't "do anything" with the value in its cast form, such as seq on it. This--- isn't the case: the compiler can insert seqs itself, and if these happen at the wrong type,--- Bad Things Might Happen. See bug #1616: in this case we cast a function of type (a,b) -> (a,b)--- to () -> () and back again. The strictness analyser saw that the function was strict, but--- the wrapper had type () -> (), and hence the wrapper de-constructed the (), the worker re-constructed--- a new (), with the result that the code ended up with "case () of (a,b) -> ...".- primop TraceEventOp "traceEvent#" GenPrimOp Addr# -> State# s -> State# s { Emits an event via the RTS tracing framework. The contents@@ -3889,25 +3826,10 @@ more complicated settings, e.g. converting a list of newtypes to a list of concrete types. - When used in conversions involving a newtype wrapper,- make sure the newtype constructor is in scope.- This function is representation-polymorphic, but the 'RuntimeRep' type argument is marked as 'Inferred', meaning that it is not available for visible type application. This means the typechecker will accept @'coerce' \@'Int' \@Age 42@.-- === __Examples__-- >>> newtype TTL = TTL Int deriving (Eq, Ord, Show)- >>> newtype Age = Age Int deriving (Eq, Ord, Show)- >>> coerce (Age 42) :: TTL- TTL 42- >>> coerce (+ (1 :: Int)) (Age 42) :: TTL- TTL 43- >>> coerce (map (+ (1 :: Int))) [Age 42, Age 24] :: [TTL]- [TTL 43,TTL 25]- } ------------------------------------------------------------------------
GHC/ByteCode/Asm.hs view
@@ -22,11 +22,12 @@ import GHC.ByteCode.Types import GHCi.RemoteTypes import GHC.Runtime.Interpreter-import GHC.Runtime.Heap.Layout hiding ( WordOff )+import GHC.Runtime.Heap.Layout ( fromStgWord, StgWord ) import GHC.Types.Name import GHC.Types.Name.Set import GHC.Types.Literal+import GHC.Types.Unique import GHC.Types.Unique.DSet import GHC.Utils.Outputable@@ -198,8 +199,8 @@ -- this BCO to be long. (n_insns0, lbl_map0) = inspectAsm platform False initial_offset asm ((n_insns, lbl_map), long_jumps)- | isLarge (fromIntegral $ Map.size lbl_map0)- || isLarge n_insns0+ | isLargeW (fromIntegral $ Map.size lbl_map0)+ || isLargeW n_insns0 = (inspectAsm platform True initial_offset asm, True) | otherwise = ((n_insns0, lbl_map0), False) @@ -228,7 +229,7 @@ return ul_bco -mkBitmapArray :: Word16 -> [StgWord] -> UArray Int Word64+mkBitmapArray :: Word -> [StgWord] -> UArray Int Word64 -- Here the return type must be an array of Words, not StgWords, -- because the underlying ByteArray# will end up as a component -- of a BCO object.@@ -243,10 +244,22 @@ data Operand = Op Word+ | IOp Int | SmallOp Word16 | LabelOp LocalLabel--- (unused) | LargeOp Word +wOp :: WordOff -> Operand+wOp = Op . fromIntegral++bOp :: ByteOff -> Operand+bOp = Op . fromIntegral++truncHalfWord :: Platform -> HalfWord -> Operand+truncHalfWord platform w = case platformWordSize platform of+ PW4 | w <= 65535 -> Op (fromIntegral w)+ PW8 | w <= 4294967295 -> Op (fromIntegral w)+ _ -> pprPanic "GHC.ByteCode.Asm.truncHalfWord" (ppr w)+ data Assembler a = AllocPtr (IO BCOPtr) (Word -> Assembler a) | AllocLit [BCONPtr] (Word -> Assembler a)@@ -286,9 +299,9 @@ largeOp :: Bool -> Operand -> Bool largeOp long_jumps op = case op of SmallOp _ -> False- Op w -> isLarge w+ Op w -> isLargeW w+ IOp i -> isLargeI i LabelOp _ -> long_jumps--- LargeOp _ -> True runAsm :: Platform -> Bool -> LabelEnv -> Assembler a -> StateT AsmState IO a runAsm platform long_jumps e = go@@ -307,15 +320,15 @@ go $ k w go (AllocLabel _ k) = go k go (Emit w ops k) = do- let largeOps = any (largeOp long_jumps) ops+ let largeArgs = any (largeOp long_jumps) ops opcode- | largeOps = largeArgInstr w+ | largeArgs = largeArgInstr w | otherwise = w words = concatMap expand ops expand (SmallOp w) = [w] expand (LabelOp w) = expand (Op (e w))- expand (Op w) = if largeOps then largeArg platform (fromIntegral w) else [fromIntegral w]--- expand (LargeOp w) = largeArg platform w+ expand (Op w) = if largeArgs then largeArg platform (fromIntegral w) else [fromIntegral w]+ expand (IOp i) = if largeArgs then largeArg platform (fromIntegral i) else [fromIntegral i] state $ \(st_i0,st_l0,st_p0) -> let st_i1 = addListToSS st_i0 (opcode : words) in ((), (st_i1,st_l0,st_p0))@@ -349,7 +362,7 @@ count (SmallOp _) = 1 count (LabelOp _) = count (Op 0) count (Op _) = if largeOps then largeArg16s platform else 1--- count (LargeOp _) = largeArg16s platform+ count (IOp _) = if largeOps then largeArg16s platform else 1 -- Bring in all the bci_ bytecode constants. #include "Bytecodes.h"@@ -378,15 +391,15 @@ -> Assembler () assembleI platform i = case i of STKCHECK n -> emit bci_STKCHECK [Op n]- PUSH_L o1 -> emit bci_PUSH_L [SmallOp o1]- PUSH_LL o1 o2 -> emit bci_PUSH_LL [SmallOp o1, SmallOp o2]- PUSH_LLL o1 o2 o3 -> emit bci_PUSH_LLL [SmallOp o1, SmallOp o2, SmallOp o3]- PUSH8 o1 -> emit bci_PUSH8 [SmallOp o1]- PUSH16 o1 -> emit bci_PUSH16 [SmallOp o1]- PUSH32 o1 -> emit bci_PUSH32 [SmallOp o1]- PUSH8_W o1 -> emit bci_PUSH8_W [SmallOp o1]- PUSH16_W o1 -> emit bci_PUSH16_W [SmallOp o1]- PUSH32_W o1 -> emit bci_PUSH32_W [SmallOp o1]+ PUSH_L o1 -> emit bci_PUSH_L [wOp o1]+ PUSH_LL o1 o2 -> emit bci_PUSH_LL [wOp o1, wOp o2]+ PUSH_LLL o1 o2 o3 -> emit bci_PUSH_LLL [wOp o1, wOp o2, wOp o3]+ PUSH8 o1 -> emit bci_PUSH8 [bOp o1]+ PUSH16 o1 -> emit bci_PUSH16 [bOp o1]+ PUSH32 o1 -> emit bci_PUSH32 [bOp o1]+ PUSH8_W o1 -> emit bci_PUSH8_W [bOp o1]+ PUSH16_W o1 -> emit bci_PUSH16_W [bOp o1]+ PUSH32_W o1 -> emit bci_PUSH32_W [bOp o1] PUSH_G nm -> do p <- ptr (BCOPtrName nm) emit bci_PUSH_G [Op p] PUSH_PRIMOP op -> do p <- ptr (BCOPtrPrimOp op)@@ -418,7 +431,7 @@ PUSH_UBX32 lit -> do np <- literal lit emit bci_PUSH_UBX32 [Op np] PUSH_UBX lit nws -> do np <- literal lit- emit bci_PUSH_UBX [Op np, SmallOp nws]+ emit bci_PUSH_UBX [Op np, wOp nws] -- see Note [Generating code for top-level string literal bindings] in GHC.StgToByteCode PUSH_ADDR nm -> do np <- lit [BCONPtrAddr nm]@@ -436,15 +449,15 @@ PUSH_APPLY_PPPPP -> emit bci_PUSH_APPLY_PPPPP [] PUSH_APPLY_PPPPPP -> emit bci_PUSH_APPLY_PPPPPP [] - SLIDE n by -> emit bci_SLIDE [SmallOp n, SmallOp by]- ALLOC_AP n -> emit bci_ALLOC_AP [SmallOp n]- ALLOC_AP_NOUPD n -> emit bci_ALLOC_AP_NOUPD [SmallOp n]- ALLOC_PAP arity n -> emit bci_ALLOC_PAP [SmallOp arity, SmallOp n]- MKAP off sz -> emit bci_MKAP [SmallOp off, SmallOp sz]- MKPAP off sz -> emit bci_MKPAP [SmallOp off, SmallOp sz]- UNPACK n -> emit bci_UNPACK [SmallOp n]+ SLIDE n by -> emit bci_SLIDE [wOp n, wOp by]+ ALLOC_AP n -> emit bci_ALLOC_AP [truncHalfWord platform n]+ ALLOC_AP_NOUPD n -> emit bci_ALLOC_AP_NOUPD [truncHalfWord platform n]+ ALLOC_PAP arity n -> emit bci_ALLOC_PAP [truncHalfWord platform arity, truncHalfWord platform n]+ MKAP off sz -> emit bci_MKAP [wOp off, truncHalfWord platform sz]+ MKPAP off sz -> emit bci_MKPAP [wOp off, truncHalfWord platform sz]+ UNPACK n -> emit bci_UNPACK [wOp n] PACK dcon sz -> do itbl_no <- lit [BCONPtrItbl (getName dcon)]- emit bci_PACK [Op itbl_no, SmallOp sz]+ emit bci_PACK [Op itbl_no, wOp sz] LABEL lbl -> label lbl TESTLT_I i l -> do np <- int i emit bci_TESTLT_I [Op np, LabelOp l]@@ -497,19 +510,19 @@ TESTLT_P i l -> emit bci_TESTLT_P [SmallOp i, LabelOp l] TESTEQ_P i l -> emit bci_TESTEQ_P [SmallOp i, LabelOp l] CASEFAIL -> emit bci_CASEFAIL []- SWIZZLE stkoff n -> emit bci_SWIZZLE [SmallOp stkoff, SmallOp n]+ SWIZZLE stkoff n -> emit bci_SWIZZLE [wOp stkoff, IOp n] JMP l -> emit bci_JMP [LabelOp l] ENTER -> emit bci_ENTER [] RETURN rep -> emit (return_non_tuple rep) [] RETURN_TUPLE -> emit bci_RETURN_T [] CCALL off m_addr i -> do np <- addr m_addr- emit bci_CCALL [SmallOp off, Op np, SmallOp i]+ emit bci_CCALL [wOp off, Op np, SmallOp i] PRIMCALL -> emit bci_PRIMCALL []- BRK_FUN index mod cc -> do p1 <- ptr BCOPtrBreakArray- m <- addr mod+ BRK_FUN index uniq cc -> do p1 <- ptr BCOPtrBreakArray+ q <- int (getKey uniq) np <- addr cc emit bci_BRK_FUN [Op p1, SmallOp index,- Op m, Op np]+ Op q, Op np] where literal (LitLabel fs (Just sz) _)@@ -555,8 +568,11 @@ words ws = lit (map BCONPtrWord ws) word w = words [w] -isLarge :: Word -> Bool-isLarge n = n > 65535+isLargeW :: Word -> Bool+isLargeW n = n > 65535++isLargeI :: Int -> Bool+isLargeI n = n > 32767 || n < -32768 push_alts :: ArgRep -> Word16 push_alts V = bci_PUSH_ALTS_V
GHC/ByteCode/Instr.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE LambdaCase #-} {-# OPTIONS_GHC -funbox-strict-fields #-} -- -- (c) The University of Glasgow 2002-2006@@ -18,10 +19,11 @@ import GHC.StgToCmm.Layout ( ArgRep(..) ) import GHC.Utils.Outputable import GHC.Types.Name+import GHC.Types.Unique import GHC.Types.Literal import GHC.Core.DataCon import GHC.Builtin.PrimOps-import GHC.Runtime.Heap.Layout+import GHC.Runtime.Heap.Layout ( StgWord ) import Data.Int import Data.Word@@ -29,7 +31,6 @@ import GHC.Stack.CCS (CostCentre) import GHC.Stg.Syntax-import Language.Haskell.Syntax.Module.Name (ModuleName) -- ---------------------------------------------------------------------------- -- Bytecode instructions@@ -40,7 +41,7 @@ protoBCOInstrs :: [BCInstr], -- instrs -- arity and GC info protoBCOBitmap :: [StgWord],- protoBCOBitmapSize :: Word16,+ protoBCOBitmapSize :: Word, protoBCOArity :: Int, -- what the BCO came from, for debugging only protoBCOExpr :: Either [CgStgAlt] CgStgRhs,@@ -57,18 +58,18 @@ data BCInstr -- Messing with the stack- = STKCHECK Word+ = STKCHECK !Word -- Push locals (existing bits of the stack)- | PUSH_L !Word16{-offset-}- | PUSH_LL !Word16 !Word16{-2 offsets-}- | PUSH_LLL !Word16 !Word16 !Word16{-3 offsets-}+ | PUSH_L !WordOff{-offset-}+ | PUSH_LL !WordOff !WordOff{-2 offsets-}+ | PUSH_LLL !WordOff !WordOff !WordOff{-3 offsets-} -- Push the specified local as a 8, 16, 32 bit value onto the stack. (i.e., -- the stack will grow by 8, 16 or 32 bits)- | PUSH8 !Word16- | PUSH16 !Word16- | PUSH32 !Word16+ | PUSH8 !ByteOff+ | PUSH16 !ByteOff+ | PUSH32 !ByteOff -- Push the specified local as a 8, 16, 32 bit value onto the stack, but the -- value will take the whole word on the stack (i.e., the stack will grow by@@ -77,11 +78,11 @@ -- Currently we expect all values on the stack to take full words, except for -- the ones used for PACK (i.e., actually constructing new data types, in -- which case we use PUSH{8,16,32})- | PUSH8_W !Word16- | PUSH16_W !Word16- | PUSH32_W !Word16+ | PUSH8_W !ByteOff+ | PUSH16_W !ByteOff+ | PUSH32_W !ByteOff - -- Push a (heap) ptr (these all map to PUSH_G really)+ -- Push a ptr (these all map to PUSH_G really) | PUSH_G Name | PUSH_PRIMOP PrimOp | PUSH_BCO (ProtoBCO Name)@@ -101,8 +102,8 @@ | PUSH_UBX8 Literal | PUSH_UBX16 Literal | PUSH_UBX32 Literal- | PUSH_UBX Literal Word16- -- push this int/float/double/addr, on the stack. Word16+ | PUSH_UBX Literal !WordOff+ -- push this int/float/double/addr, on the stack. Word -- is # of words to copy from literal pool. Eitherness reflects -- the difficulty of dealing with MachAddr here, mostly due to -- the excessive (and unnecessary) restrictions imposed by the@@ -128,58 +129,61 @@ | PUSH_APPLY_PPPPP | PUSH_APPLY_PPPPPP - | SLIDE Word16{-this many-} Word16{-down by this much-}+ | SLIDE !WordOff{-this many-} !WordOff{-down by this much-} -- To do with the heap- | ALLOC_AP !Word16 -- make an AP with this many payload words- | ALLOC_AP_NOUPD !Word16 -- make an AP_NOUPD with this many payload words- | ALLOC_PAP !Word16 !Word16 -- make a PAP with this arity / payload words- | MKAP !Word16{-ptr to AP is this far down stack-} !Word16{-number of words-}- | MKPAP !Word16{-ptr to PAP is this far down stack-} !Word16{-number of words-}- | UNPACK !Word16 -- unpack N words from t.o.s Constr- | PACK DataCon !Word16+ | ALLOC_AP !HalfWord {- make an AP with this many payload words.+ HalfWord matches the size of the n_args field in StgAP,+ make sure that we handle truncation when generating+ bytecode using this HalfWord type here -}+ | ALLOC_AP_NOUPD !HalfWord -- make an AP_NOUPD with this many payload words+ | ALLOC_PAP !HalfWord !HalfWord -- make a PAP with this arity / payload words+ | MKAP !WordOff{-ptr to AP is this far down stack-} !HalfWord{-number of words-}+ | MKPAP !WordOff{-ptr to PAP is this far down stack-} !HalfWord{-number of words-}+ | UNPACK !WordOff -- unpack N words from t.o.s Constr+ | PACK DataCon !WordOff -- after assembly, the DataCon is an index into the -- itbl array -- For doing case trees | LABEL LocalLabel- | TESTLT_I Int LocalLabel- | TESTEQ_I Int LocalLabel- | TESTLT_W Word LocalLabel- | TESTEQ_W Word LocalLabel- | TESTLT_I64 Int64 LocalLabel- | TESTEQ_I64 Int64 LocalLabel- | TESTLT_I32 Int32 LocalLabel- | TESTEQ_I32 Int32 LocalLabel- | TESTLT_I16 Int16 LocalLabel- | TESTEQ_I16 Int16 LocalLabel- | TESTLT_I8 Int8 LocalLabel- | TESTEQ_I8 Int16 LocalLabel- | TESTLT_W64 Word64 LocalLabel- | TESTEQ_W64 Word64 LocalLabel- | TESTLT_W32 Word32 LocalLabel- | TESTEQ_W32 Word32 LocalLabel- | TESTLT_W16 Word16 LocalLabel- | TESTEQ_W16 Word16 LocalLabel- | TESTLT_W8 Word8 LocalLabel- | TESTEQ_W8 Word8 LocalLabel- | TESTLT_F Float LocalLabel- | TESTEQ_F Float LocalLabel- | TESTLT_D Double LocalLabel- | TESTEQ_D Double LocalLabel+ | TESTLT_I !Int LocalLabel+ | TESTEQ_I !Int LocalLabel+ | TESTLT_W !Word LocalLabel+ | TESTEQ_W !Word LocalLabel+ | TESTLT_I64 !Int64 LocalLabel+ | TESTEQ_I64 !Int64 LocalLabel+ | TESTLT_I32 !Int32 LocalLabel+ | TESTEQ_I32 !Int32 LocalLabel+ | TESTLT_I16 !Int16 LocalLabel+ | TESTEQ_I16 !Int16 LocalLabel+ | TESTLT_I8 !Int8 LocalLabel+ | TESTEQ_I8 !Int16 LocalLabel+ | TESTLT_W64 !Word64 LocalLabel+ | TESTEQ_W64 !Word64 LocalLabel+ | TESTLT_W32 !Word32 LocalLabel+ | TESTEQ_W32 !Word32 LocalLabel+ | TESTLT_W16 !Word16 LocalLabel+ | TESTEQ_W16 !Word16 LocalLabel+ | TESTLT_W8 !Word8 LocalLabel+ | TESTEQ_W8 !Word8 LocalLabel+ | TESTLT_F !Float LocalLabel+ | TESTEQ_F !Float LocalLabel+ | TESTLT_D !Double LocalLabel+ | TESTEQ_D !Double LocalLabel -- The Word16 value is a constructor number and therefore -- stored in the insn stream rather than as an offset into -- the literal pool.- | TESTLT_P Word16 LocalLabel- | TESTEQ_P Word16 LocalLabel+ | TESTLT_P !Word16 LocalLabel+ | TESTEQ_P !Word16 LocalLabel | CASEFAIL | JMP LocalLabel -- For doing calls to C (via glue code generated by libffi)- | CCALL Word16 -- stack frame size+ | CCALL !WordOff -- stack frame size (RemotePtr C_ffi_cif) -- addr of the glue code- Word16 -- flags.+ !Word16 -- flags. -- -- 0x1: call is interruptible -- 0x2: call is unsafe@@ -190,8 +194,8 @@ | PRIMCALL -- For doing magic ByteArray passing to foreign calls- | SWIZZLE Word16 -- to the ptr N words down the stack,- Word16 -- add M (interpreted as a signed 16-bit entity)+ | SWIZZLE !WordOff -- to the ptr N words down the stack,+ !Int -- add M -- To Infinity And Beyond | ENTER@@ -201,7 +205,7 @@ -- Note [unboxed tuple bytecodes and tuple_BCO] in GHC.StgToByteCode -- Breakpoints- | BRK_FUN !Word16 (RemotePtr ModuleName) (RemotePtr CostCentre)+ | BRK_FUN !Word16 Unique (RemotePtr CostCentre) -- ----------------------------------------------------------------------------- -- Printing bytecode instructions@@ -251,7 +255,7 @@ ppr con <+> sep (map ppr args) <+> text "->" <+> pprStgExprShort opts expr pprStgRhsShort :: OutputablePass pass => StgPprOpts -> GenStgRhs pass -> SDoc-pprStgRhsShort opts (StgRhsClosure _ext _cc upd_flag args body) =+pprStgRhsShort opts (StgRhsClosure _ext _cc upd_flag args body _typ) = hang (hsep [ char '\\' <> ppr upd_flag, brackets (interppSP args) ]) 4 (pprStgExprShort opts body) pprStgRhsShort opts rhs = pprStgRhs opts rhs@@ -352,7 +356,11 @@ ppr ENTER = text "ENTER" ppr (RETURN pk) = text "RETURN " <+> ppr pk ppr (RETURN_TUPLE) = text "RETURN_TUPLE"- ppr (BRK_FUN index _mod_name _cc) = text "BRK_FUN" <+> ppr index <+> text "<module>" <+> text "<cc>"+ ppr (BRK_FUN index uniq _cc) = text "BRK_FUN" <+> ppr index <+> mb_uniq <+> text "<cc>"+ where mb_uniq = sdocOption sdocSuppressUniques $ \case+ True -> text "<uniq>"+ False -> ppr uniq+ -- -----------------------------------------------------------------------------
GHC/ByteCode/Linker.hs view
@@ -194,7 +194,7 @@ mod -> mod packagePart = encodeZ (unitFS pkgKey) modulePart = encodeZ (moduleNameFS modName)- occPart = encodeZ (occNameFS (nameOccName n))+ occPart = encodeZ $ occNameMangledFS (nameOccName n) label = concat [ if pkgKey == mainUnit then "" else packagePart ++ "_"
GHC/ByteCode/Types.hs view
@@ -11,7 +11,7 @@ , FFIInfo(..) , RegBitmap(..) , NativeCallType(..), NativeCallInfo(..), voidTupleReturnInfo, voidPrimCallInfo- , ByteOff(..), WordOff(..)+ , ByteOff(..), WordOff(..), HalfWord(..) , UnlinkedBCO(..), BCOPtr(..), BCONPtr(..) , ItblEnv, ItblPtr(..) , AddrEnv, AddrPtr(..)@@ -44,7 +44,6 @@ import GHC.Stack.CCS import GHC.Cmm.Expr ( GlobalRegSet, emptyRegSet, regSetToList ) import GHC.Iface.Syntax-import Language.Haskell.Syntax.Module.Name (ModuleName) -- ----------------------------------------------------------------------------- -- Compiled Byte Code@@ -80,6 +79,12 @@ newtype WordOff = WordOff Int deriving (Enum, Eq, Show, Integral, Num, Ord, Real, Outputable) +-- A type for values that are half the size of a word on the target+-- platform where the interpreter runs (which may be a different+-- wordsize than the compiler).+newtype HalfWord = HalfWord Word+ deriving (Enum, Eq, Show, Integral, Num, Ord, Real, Outputable)+ newtype RegBitmap = RegBitmap { unRegBitmap :: Word32 } deriving (Enum, Eq, Show, Integral, Num, Ord, Real, Bits, FiniteBits, Outputable) @@ -189,7 +194,7 @@ data CgBreakInfo = CgBreakInfo { cgb_tyvars :: ![IfaceTvBndr] -- ^ Type variables in scope at the breakpoint- , cgb_vars :: ![Maybe (IfaceIdBndr, Word16)]+ , cgb_vars :: ![Maybe (IfaceIdBndr, Word)] , cgb_resty :: !IfaceType } -- See Note [Syncing breakpoint info] in GHC.Runtime.Eval@@ -237,7 +242,6 @@ -- ^ Array pointing to cost centre for each breakpoint , modBreaks_breakInfo :: IntMap CgBreakInfo -- ^ info about each breakpoint from the bytecode generator- , modBreaks_module :: RemotePtr ModuleName } seqModBreaks :: ModBreaks -> ()@@ -247,8 +251,7 @@ rnf modBreaks_vars `seq` rnf modBreaks_decls `seq` rnf modBreaks_ccs `seq`- rnf (fmap seqCgBreakInfo modBreaks_breakInfo) `seq`- rnf modBreaks_module+ rnf (fmap seqCgBreakInfo modBreaks_breakInfo) -- | Construct an empty ModBreaks emptyModBreaks :: ModBreaks@@ -260,7 +263,6 @@ , modBreaks_decls = array (0,-1) [] , modBreaks_ccs = array (0,-1) [] , modBreaks_breakInfo = IntMap.empty- , modBreaks_module = toRemotePtr nullPtr } {-
GHC/Cmm.hs view
@@ -229,15 +229,16 @@ -- place to convey this information from the code generator to -- where we build the static closures in -- GHC.Cmm.Info.Build.doSRTs.- } deriving (Eq, Ord)+ } deriving Eq instance OutputableP Platform CmmInfoTable where pdoc = pprInfoTable + data ProfilingInfo = NoProfilingInfo | ProfilingInfo ByteString ByteString -- closure_type, closure_desc- deriving (Eq, Ord)+ deriving Eq ----------------------------------------------------------------------------- -- Static Data -----------------------------------------------------------------------------
GHC/Cmm/CLabel.hs view
@@ -839,7 +839,7 @@ -- The rendered Haskell type of the closure the table represents , infoProvModule :: !Module -- Origin module- , infoTableProv :: !(Maybe (RealSrcSpan, String)) }+ , infoTableProv :: !(Maybe (RealSrcSpan, LexicalFastString)) } -- Position and information about the info table deriving (Eq, Ord)
GHC/Cmm/CallConv.hs view
@@ -68,35 +68,33 @@ | isFloatType ty = float | otherwise = int where vec = case (w, regs) of- (W128, (vs, fs, ds, ls, s:ss))- | passVectorInReg W128 profile -> k (RegisterParam (XmmReg s), (vs, fs, ds, ls, ss))- (W256, (vs, fs, ds, ls, s:ss))- | passVectorInReg W256 profile -> k (RegisterParam (YmmReg s), (vs, fs, ds, ls, ss))- (W512, (vs, fs, ds, ls, s:ss))- | passVectorInReg W512 profile -> k (RegisterParam (ZmmReg s), (vs, fs, ds, ls, ss))+ (W128, AvailRegs vs fs ds ls (s:ss))+ | passVectorInReg W128 profile -> k (RegisterParam (XmmReg s), AvailRegs vs fs ds ls ss)+ (W256, AvailRegs vs fs ds ls (s:ss))+ | passVectorInReg W256 profile -> k (RegisterParam (YmmReg s), AvailRegs vs fs ds ls ss)+ (W512, AvailRegs vs fs ds ls (s:ss))+ | passVectorInReg W512 profile -> k (RegisterParam (ZmmReg s), AvailRegs vs fs ds ls ss) _ -> (assts, (r:rs)) float = case (w, regs) of- (W32, (vs, fs, ds, ls, s:ss))- | passFloatInXmm -> k (RegisterParam (FloatReg s), (vs, fs, ds, ls, ss))- (W32, (vs, f:fs, ds, ls, ss))- | not passFloatInXmm -> k (RegisterParam f, (vs, fs, ds, ls, ss))- (W64, (vs, fs, ds, ls, s:ss))- | passFloatInXmm -> k (RegisterParam (DoubleReg s), (vs, fs, ds, ls, ss))- (W64, (vs, fs, d:ds, ls, ss))- | not passFloatInXmm -> k (RegisterParam d, (vs, fs, ds, ls, ss))+ (W32, AvailRegs vs fs ds ls (s:ss))+ | passFloatInXmm -> k (RegisterParam (FloatReg s), AvailRegs vs fs ds ls ss)+ (W32, AvailRegs vs (f:fs) ds ls ss)+ | not passFloatInXmm -> k (RegisterParam f, AvailRegs vs fs ds ls ss)+ (W64, AvailRegs vs fs ds ls (s:ss))+ | passFloatInXmm -> k (RegisterParam (DoubleReg s), AvailRegs vs fs ds ls ss)+ (W64, AvailRegs vs fs (d:ds) ls ss)+ | not passFloatInXmm -> k (RegisterParam d, AvailRegs vs fs ds ls ss) _ -> (assts, (r:rs)) int = case (w, regs) of (W128, _) -> panic "W128 unsupported register type"- (_, (v:vs, fs, ds, ls, ss)) | widthInBits w <= widthInBits (wordWidth platform)- -> k (RegisterParam (v gcp), (vs, fs, ds, ls, ss))- (_, (vs, fs, ds, l:ls, ss)) | widthInBits w > widthInBits (wordWidth platform)- -> k (RegisterParam l, (vs, fs, ds, ls, ss))+ (_, AvailRegs (v:vs) fs ds ls ss) | widthInBits w <= widthInBits (wordWidth platform)+ -> k (RegisterParam v, AvailRegs vs fs ds ls ss)+ (_, AvailRegs vs fs ds (l:ls) ss) | widthInBits w > widthInBits (wordWidth platform)+ -> k (RegisterParam l, AvailRegs vs fs ds ls ss) _ -> (assts, (r:rs)) k (asst, regs') = assign_regs ((r, asst) : assts) rs regs' ty = arg_ty r w = typeWidth ty- !gcp | isGcPtrType ty = VGcPtr- | otherwise = VNonGcPtr passFloatInXmm = passFloatArgsInXmm platform passFloatArgsInXmm :: Platform -> Bool@@ -131,13 +129,24 @@ ----------------------------------------------------------------------------- -- Local information about the registers available -type AvailRegs = ( [VGcPtr -> GlobalReg] -- available vanilla regs.- , [GlobalReg] -- floats- , [GlobalReg] -- doubles- , [GlobalReg] -- longs (int64 and word64)- , [Int] -- XMM (floats and doubles)- )+-- | Keep track of locally available registers.+data AvailRegs+ = AvailRegs+ { availVanillaRegs :: [GlobalReg]+ -- ^ Available vanilla registers+ , availFloatRegs :: [GlobalReg]+ -- ^ Available float registers+ , availDoubleRegs :: [GlobalReg]+ -- ^ Available double registers+ , availLongRegs :: [GlobalReg]+ -- ^ Available long registers+ , availXMMRegs :: [Int]+ -- ^ Available vector XMM registers+ } +noAvailRegs :: AvailRegs+noAvailRegs = AvailRegs [] [] [] [] []+ -- Vanilla registers can contain pointers, Ints, Chars. -- Floats and doubles have separate register supplies. --@@ -146,24 +155,26 @@ getRegsWithoutNode, getRegsWithNode :: Platform -> AvailRegs getRegsWithoutNode platform =- ( filter (\r -> r VGcPtr /= node) (realVanillaRegs platform)- , realFloatRegs platform- , realDoubleRegs platform- , realLongRegs platform- , realXmmRegNos platform)+ AvailRegs+ { availVanillaRegs = filter (\r -> r /= node) (realVanillaRegs platform)+ , availFloatRegs = realFloatRegs platform+ , availDoubleRegs = realDoubleRegs platform+ , availLongRegs = realLongRegs platform+ , availXMMRegs = realXmmRegNos platform } -- getRegsWithNode uses R1/node even if it isn't a register getRegsWithNode platform =- ( if null (realVanillaRegs platform)- then [VanillaReg 1]- else realVanillaRegs platform- , realFloatRegs platform- , realDoubleRegs platform- , realLongRegs platform- , realXmmRegNos platform)+ AvailRegs+ { availVanillaRegs = if null (realVanillaRegs platform)+ then [VanillaReg 1]+ else realVanillaRegs platform+ , availFloatRegs = realFloatRegs platform+ , availDoubleRegs = realDoubleRegs platform+ , availLongRegs = realLongRegs platform+ , availXMMRegs = realXmmRegNos platform } allFloatRegs, allDoubleRegs, allLongRegs :: Platform -> [GlobalReg]-allVanillaRegs :: Platform -> [VGcPtr -> GlobalReg]+allVanillaRegs :: Platform -> [GlobalReg] allXmmRegs :: Platform -> [Int] allVanillaRegs platform = map VanillaReg $ regList (pc_MAX_Vanilla_REG (platformConstants platform))@@ -173,7 +184,7 @@ allXmmRegs platform = regList (pc_MAX_XMM_REG (platformConstants platform)) realFloatRegs, realDoubleRegs, realLongRegs :: Platform -> [GlobalReg]-realVanillaRegs :: Platform -> [VGcPtr -> GlobalReg]+realVanillaRegs :: Platform -> [GlobalReg] realVanillaRegs platform = map VanillaReg $ regList (pc_MAX_Real_Vanilla_REG (platformConstants platform)) realFloatRegs platform = map FloatReg $ regList (pc_MAX_Real_Float_REG (platformConstants platform))@@ -189,15 +200,16 @@ regList n = [1 .. n] allRegs :: Platform -> AvailRegs-allRegs platform = ( allVanillaRegs platform- , allFloatRegs platform- , allDoubleRegs platform- , allLongRegs platform- , allXmmRegs platform- )+allRegs platform =+ AvailRegs+ { availVanillaRegs = allVanillaRegs platform+ , availFloatRegs = allFloatRegs platform+ , availDoubleRegs = allDoubleRegs platform+ , availLongRegs = allLongRegs platform+ , availXMMRegs = allXmmRegs platform } nodeOnly :: AvailRegs-nodeOnly = ([VanillaReg 1], [], [], [], [])+nodeOnly = noAvailRegs { availVanillaRegs = [VanillaReg 1] } -- This returns the set of global registers that *cover* the machine registers -- used for argument passing. On platforms where registers can overlap---right@@ -207,18 +219,19 @@ realArgRegsCover :: Platform -> [GlobalReg] realArgRegsCover platform | passFloatArgsInXmm platform- = map ($ VGcPtr) (realVanillaRegs platform) ++- realLongRegs platform ++- realDoubleRegs platform -- we only need to save the low Double part of XMM registers.- -- Moreover, the NCG can't load/store full XMM- -- registers for now...+ = realVanillaRegs platform +++ realLongRegs platform +++ realDoubleRegs platform+ -- we only need to save the low Double part of XMM registers.+ -- Moreover, the NCG can't load/store full XMM+ -- registers for now... | otherwise- = map ($ VGcPtr) (realVanillaRegs platform) ++- realFloatRegs platform ++- realDoubleRegs platform ++- realLongRegs platform- -- we don't save XMM registers if they are not used for parameter passing+ = realVanillaRegs platform +++ realFloatRegs platform +++ realDoubleRegs platform +++ realLongRegs platform+ -- we don't save XMM registers if they are not used for parameter passing {-@@ -325,4 +338,4 @@ allArgRegsCover :: Platform -> [GlobalReg] allArgRegsCover platform =- nub (VanillaReg 1 VGcPtr : realArgRegsCover platform)+ nub (VanillaReg 1 : realArgRegsCover platform)
GHC/Cmm/CommonBlockElim.hs view
@@ -26,7 +26,6 @@ import qualified GHC.Data.TrieMap as TM import GHC.Types.Unique.FM import GHC.Types.Unique-import GHC.Utils.Word64 (truncateWord64ToWord32) import Control.Arrow (first, second) import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.List.NonEmpty as NE@@ -183,10 +182,8 @@ cvt = fromInteger . toInteger - -- Since we are hashing, we can savely downcast Word64 to Word32 here.- -- Although a different hashing function may be more effective. hash_unique :: Uniquable a => a -> Word32- hash_unique = truncateWord64ToWord32 . getKey . getUnique+ hash_unique = cvt . getKey . getUnique -- | Ignore these node types for equality dont_care :: CmmNode O x -> Bool
GHC/Cmm/Dataflow/Collections.hs view
@@ -12,11 +12,10 @@ import GHC.Prelude -import qualified GHC.Data.Word64Map.Strict as M-import qualified GHC.Data.Word64Set as S+import qualified Data.IntMap.Strict as M+import qualified Data.IntSet as S import Data.List (foldl1')-import Data.Word (Word64) class IsSet set where type ElemOf set@@ -108,10 +107,10 @@ -- Basic instances ----------------------------------------------------------------------------- -newtype UniqueSet = US S.Word64Set deriving (Eq, Ord, Show, Semigroup, Monoid)+newtype UniqueSet = US S.IntSet deriving (Eq, Ord, Show, Semigroup, Monoid) instance IsSet UniqueSet where- type ElemOf UniqueSet = Word64+ type ElemOf UniqueSet = Int setNull (US s) = S.null s setSize (US s) = S.size s@@ -134,11 +133,11 @@ setElems (US s) = S.elems s setFromList ks = US (S.fromList ks) -newtype UniqueMap v = UM (M.Word64Map v)+newtype UniqueMap v = UM (M.IntMap v) deriving (Eq, Ord, Show, Functor, Foldable, Traversable) instance IsMap UniqueMap where- type KeyOf UniqueMap = Word64+ type KeyOf UniqueMap = Int mapNull (UM m) = M.null m mapSize (UM m) = M.size m
GHC/Cmm/Dataflow/Label.hs view
@@ -20,26 +20,25 @@ -- TODO: This should really just use GHC's Unique and Uniq{Set,FM} import GHC.Cmm.Dataflow.Collections -import GHC.Types.Unique (Uniquable(..), mkUniqueGrimily)+import GHC.Types.Unique (Uniquable(..)) import GHC.Data.TrieMap-import Data.Word (Word64) ----------------------------------------------------------------------------- -- Label ----------------------------------------------------------------------------- -newtype Label = Label { lblToUnique :: Word64 }+newtype Label = Label { lblToUnique :: Int } deriving (Eq, Ord) -mkHooplLabel :: Word64 -> Label+mkHooplLabel :: Int -> Label mkHooplLabel = Label instance Show Label where show (Label n) = "L" ++ show n instance Uniquable Label where- getUnique label = mkUniqueGrimily (lblToUnique label)+ getUnique label = getUnique (lblToUnique label) instance Outputable Label where ppr label = ppr (getUnique label)
GHC/Cmm/DebugBlock.hs view
@@ -39,7 +39,7 @@ import GHC.Cmm.BlockId import GHC.Cmm.CLabel import GHC.Cmm-import GHC.Cmm.Reg ( pprGlobalReg )+import GHC.Cmm.Reg ( pprGlobalReg, pprGlobalRegUse ) import GHC.Cmm.Utils import GHC.Data.FastString ( nilFS, mkFastString ) import GHC.Unit.Module@@ -513,7 +513,7 @@ -- | Expressions, used for unwind information data UnwindExpr = UwConst !Int -- ^ literal value- | UwReg !GlobalReg !Int -- ^ register plus offset+ | UwReg !GlobalRegUse !Int -- ^ register plus offset | UwDeref UnwindExpr -- ^ pointer dereferencing | UwLabel CLabel | UwPlus UnwindExpr UnwindExpr@@ -535,7 +535,7 @@ pprUnwindExpr :: IsLine doc => Rational -> Platform -> UnwindExpr -> doc pprUnwindExpr p env = \case UwConst i -> int i- UwReg g 0 -> pprGlobalReg g+ UwReg g 0 -> pprGlobalRegUse g UwReg g x -> pprUnwindExpr p env (UwPlus (UwReg g 0) (UwConst x)) UwDeref e -> char '*' <> pprUnwindExpr 3 env e UwLabel l -> pprAsmLabel env l
GHC/Cmm/Dominators.hs view
@@ -26,7 +26,8 @@ import Data.Foldable() import qualified Data.Tree as Tree -import Data.Word+import qualified Data.IntMap.Strict as IM+import qualified Data.IntSet as IS import qualified GHC.CmmToAsm.CFG.Dominators as LT @@ -40,9 +41,6 @@ import GHC.Utils.Outputable( Outputable(..), text, int, hcat, (<+>)) import GHC.Utils.Misc import GHC.Utils.Panic-import GHC.Utils.Word64 (intToWord64)-import qualified GHC.Data.Word64Map as WM-import qualified GHC.Data.Word64Set as WS -- | =Dominator sets@@ -131,37 +129,33 @@ -- The implementation uses the Lengauer-Tarjan algorithm from the x86 -- back end. --- Technically, we do not need Word64 here, however the dominators code--- has to accomodate Word64 for other uses.- graphWithDominators g = GraphWithDominators (reachable rpblocks g) dmap rpmap where rpblocks = revPostorderFrom (graphMap g) (g_entry g) rplabels' = map entryLabel rpblocks- rplabels :: Array Word64 Label+ rplabels :: Array Int Label rplabels = listArray bounds rplabels' rpmap :: LabelMap RPNum rpmap = mapFromList $ zipWith kvpair rpblocks [0..] where kvpair block i = (entryLabel block, RPNum i) - labelIndex :: Label -> Word64+ labelIndex :: Label -> Int labelIndex = flip findLabelIn imap- where imap :: LabelMap Word64+ where imap :: LabelMap Int imap = mapFromList $ zip rplabels' [0..] blockIndex = labelIndex . entryLabel - bounds :: (Word64, Word64)- bounds = (0, intToWord64 (length rpblocks - 1))+ bounds = (0, length rpblocks - 1) ltGraph :: [Block node C C] -> LT.Graph- ltGraph [] = WM.empty+ ltGraph [] = IM.empty ltGraph (block:blocks) =- WM.insert+ IM.insert (blockIndex block)- (WS.fromList $ map labelIndex $ successors block)+ (IS.fromList $ map labelIndex $ successors block) (ltGraph blocks) - idom_array :: Array Word64 LT.Node+ idom_array :: Array Int LT.Node idom_array = array bounds $ LT.idom (0, ltGraph rpblocks) domSet 0 = EntryNode
GHC/Cmm/Expr.hs view
@@ -12,11 +12,11 @@ , AlignmentSpec(..) -- TODO: Remove: , LocalReg(..), localRegType- , GlobalReg(..), isArgReg, globalRegType+ , GlobalReg(..), isArgReg, globalRegSpillType+ , GlobalRegUse(..) , spReg, hpReg, spLimReg, hpLimReg, nodeReg , currentTSOReg, currentNurseryReg, hpAllocReg, cccsReg , node, baseReg- , VGcPtr(..) , DefinerOfRegs, UserOfRegs , foldRegsDefd, foldRegsUsed@@ -248,9 +248,9 @@ cmmExprType platform = \case (CmmLit lit) -> cmmLitType platform lit (CmmLoad _ rep _) -> rep- (CmmReg reg) -> cmmRegType platform reg+ (CmmReg reg) -> cmmRegType reg (CmmMachOp op args) -> machOpResultType platform op (map (cmmExprType platform) args)- (CmmRegOff reg _) -> cmmRegType platform reg+ (CmmRegOff reg _) -> cmmRegType reg (CmmStackSlot _ _) -> bWord platform -- an address -- Careful though: what is stored at the stack slot may be bigger than -- an address@@ -385,10 +385,18 @@ instance UserOfRegs GlobalReg CmmReg where {-# INLINEABLE foldRegsUsed #-} foldRegsUsed _ _ z (CmmLocal _) = z- foldRegsUsed _ f z (CmmGlobal reg) = f z reg+ foldRegsUsed _ f z (CmmGlobal (GlobalRegUse reg _)) = f z reg +instance UserOfRegs GlobalRegUse CmmReg where+ {-# INLINEABLE foldRegsUsed #-}+ foldRegsUsed _ _ z (CmmLocal _) = z+ foldRegsUsed _ f z (CmmGlobal reg) = f z reg instance DefinerOfRegs GlobalReg CmmReg where foldRegsDefd _ _ z (CmmLocal _) = z+ foldRegsDefd _ f z (CmmGlobal (GlobalRegUse reg _)) = f z reg++instance DefinerOfRegs GlobalRegUse CmmReg where+ foldRegsDefd _ _ z (CmmLocal _) = z foldRegsDefd _ f z (CmmGlobal reg) = f z reg instance Ord r => UserOfRegs r r where@@ -427,7 +435,7 @@ CmmRegOff reg i -> pprExpr platform (CmmMachOp (MO_Add rep) [CmmReg reg, CmmLit (CmmInt (fromIntegral i) rep)])- where rep = typeWidth (cmmRegType platform reg)+ where rep = typeWidth (cmmRegType reg) CmmLit lit -> pprLit platform lit _other -> pprExpr1 platform e
GHC/Cmm/Graph.hs view
@@ -38,8 +38,8 @@ import GHC.Data.OrdList import GHC.Runtime.Heap.Layout (ByteOff) import GHC.Types.Unique.Supply-import GHC.Utils.Panic import GHC.Utils.Constants (debugIsOn)+import GHC.Utils.Panic -----------------------------------------------------------------------------@@ -313,30 +313,36 @@ = (stk_size, [r | (_, RegisterParam r) <- args], map ci (stk_args ++ args)) where platform = profilePlatform profile- -- See Note [Width of parameters]++ ci :: (LocalReg, ParamLocation) -> CmmNode O O ci (reg, RegisterParam r@(VanillaReg {})) = let local = CmmLocal reg- global = CmmReg (CmmGlobal r)- width = cmmRegWidth platform local- expr- | width == wordWidth platform = global- | width < wordWidth platform =- CmmMachOp (MO_XX_Conv (wordWidth platform) width) [global]- | otherwise = panic "Parameter width greater than word width"+ width = cmmRegWidth local+ (expr, ty)+ -- See Note [Width of parameters]+ | width == wordWidth platform+ = (global, localRegType reg)+ | width < wordWidth platform+ = (CmmMachOp (MO_XX_Conv (wordWidth platform) width) [global]+ ,setCmmTypeWidth (wordWidth platform) (localRegType reg))+ | otherwise+ = panic "Parameter width greater than word width"+ global = CmmReg (CmmGlobal $ GlobalRegUse r ty) in CmmAssign local expr -- Non VanillaRegs ci (reg, RegisterParam r) =- CmmAssign (CmmLocal reg) (CmmReg (CmmGlobal r))+ CmmAssign (CmmLocal reg) (CmmReg (CmmGlobal $ GlobalRegUse r (localRegType reg))) ci (reg, StackParam off) | isBitsType $ localRegType reg+ -- See Note [Width of parameters] , typeWidth (localRegType reg) < wordWidth platform = let stack_slot = CmmLoad (CmmStackSlot area off) (cmmBits $ wordWidth platform) NaturallyAligned local = CmmLocal reg- width = cmmRegWidth platform local+ width = cmmRegWidth local expr = CmmMachOp (MO_XX_Conv (wordWidth platform) width) [stack_slot] in CmmAssign local expr @@ -376,25 +382,28 @@ platform = profilePlatform profile (regs, graph) = foldr co ([], mkNop) (setRA ++ args ++ stack_params) - -- See Note [Width of parameters]+ co :: (CmmExpr, ParamLocation)+ -> ([GlobalReg], CmmAGraph)+ -> ([GlobalReg], CmmAGraph) co (v, RegisterParam r@(VanillaReg {})) (rs, ms) = let width = cmmExprWidth platform v value+ -- See Note [Width of parameters] | width == wordWidth platform = v | width < wordWidth platform = CmmMachOp (MO_XX_Conv width (wordWidth platform)) [v] | otherwise = panic "Parameter width greater than word width" - in (r:rs, mkAssign (CmmGlobal r) value <*> ms)+ in (r:rs, mkAssign (CmmGlobal $ GlobalRegUse r (cmmExprType platform value)) value <*> ms) -- Non VanillaRegs co (v, RegisterParam r) (rs, ms) =- (r:rs, mkAssign (CmmGlobal r) v <*> ms)+ (r:rs, mkAssign (CmmGlobal $ GlobalRegUse r (cmmExprType platform v)) v <*> ms) - -- See Note [Width of parameters] co (v, StackParam off) (rs, ms) = (rs, mkStore (CmmStackSlot area off) (value v) <*> ms) + -- See Note [Width of parameters] width v = cmmExprWidth platform v value v | isBitsType $ cmmExprType platform v@@ -427,19 +436,18 @@ -- Note [Width of parameters] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~+-- -- Consider passing a small (< word width) primitive like Int8# to a function. -- It's actually non-trivial to do this without extending/narrowing:--- * Global registers are considered to have native word width (i.e., 64-bits on--- x86-64), so CmmLint would complain if we assigned an 8-bit parameter to a--- global register.--- * Same problem exists with LLVM IR.--- * Lowering gets harder since on x86-32 not every register exposes its lower+-- * Lowering gets harder, since on x86-32 not every register exposes its lower -- 8 bits (e.g., for %eax we can use %al, but there isn't a corresponding -- 8-bit register for %edi). So we would either need to extend/narrow anyway, -- or complicate the calling convention. -- * Passing a small integer in a stack slot, which has native word width, -- requires extending to word width when writing to the stack and narrowing -- when reading off the stack (see #16258).+-- This is because the generated Cmm application functions (such as stg_ap_n)+-- always load the full width from the stack. -- So instead, we always extend every parameter smaller than native word width -- in copyOutOflow and then truncate it back to the expected width in copyIn. -- Note that we do this in cmm using MO_XX_Conv to avoid requiring
GHC/Cmm/LRegSet.hs view
@@ -20,35 +20,34 @@ import GHC.Prelude import GHC.Types.Unique import GHC.Cmm.Expr-import GHC.Word -import GHC.Data.Word64Set as Word64Set+import Data.IntSet as IntSet -- Compact sets for membership tests of local variables. -type LRegSet = Word64Set.Word64Set-type LRegKey = Word64+type LRegSet = IntSet.IntSet+type LRegKey = Int emptyLRegSet :: LRegSet-emptyLRegSet = Word64Set.empty+emptyLRegSet = IntSet.empty nullLRegSet :: LRegSet -> Bool-nullLRegSet = Word64Set.null+nullLRegSet = IntSet.null insertLRegSet :: LocalReg -> LRegSet -> LRegSet-insertLRegSet l = Word64Set.insert (getKey (getUnique l))+insertLRegSet l = IntSet.insert (getKey (getUnique l)) elemLRegSet :: LocalReg -> LRegSet -> Bool-elemLRegSet l = Word64Set.member (getKey (getUnique l))+elemLRegSet l = IntSet.member (getKey (getUnique l)) deleteFromLRegSet :: LRegSet -> LocalReg -> LRegSet-deleteFromLRegSet set reg = Word64Set.delete (getKey . getUnique $ reg) set+deleteFromLRegSet set reg = IntSet.delete (getKey . getUnique $ reg) set -sizeLRegSet :: Word64Set -> Int-sizeLRegSet = Word64Set.size+sizeLRegSet :: IntSet -> Int+sizeLRegSet = IntSet.size -plusLRegSet :: Word64Set -> Word64Set -> Word64Set-plusLRegSet = Word64Set.union+plusLRegSet :: IntSet -> IntSet -> IntSet+plusLRegSet = IntSet.union -elemsLRegSet :: Word64Set -> [Word64]-elemsLRegSet = Word64Set.toList+elemsLRegSet :: IntSet -> [Int]+elemsLRegSet = IntSet.toList
GHC/Cmm/LayoutStack.hs view
@@ -350,7 +350,7 @@ -- Not foolproof, but GCFun is the culprit we most want to catch isGcJump :: CmmNode O C -> Bool-isGcJump (CmmCall { cml_target = CmmReg (CmmGlobal l) })+isGcJump (CmmCall { cml_target = CmmReg (CmmGlobal (GlobalRegUse l _)) }) = l == GCFun || l == GCEnter1 isGcJump _something_else = False @@ -875,7 +875,7 @@ do_stk_unwinding_gen = cmmGenStackUnwindInstr cfg adj block | sp_off /= 0- = block `blockSnoc` CmmAssign spReg (cmmOffset platform spExpr sp_off)+ = block `blockSnoc` CmmAssign (spReg platform) (cmmOffset platform (spExpr platform) sp_off) | otherwise = block -- Add unwind pseudo-instruction at the beginning of each block to -- document Sp level for debugging@@ -884,7 +884,7 @@ = CmmUnwind [(Sp, Just sp_unwind)] `blockCons` block | otherwise = block- where sp_unwind = CmmRegOff spReg (sp0 - platformWordSizeInBytes platform)+ where sp_unwind = CmmRegOff (spReg platform) (sp0 - platformWordSizeInBytes platform) -- Add unwind pseudo-instruction right after the Sp adjustment -- if there is one.@@ -894,7 +894,7 @@ = block `blockSnoc` CmmUnwind [(Sp, Just sp_unwind)] | otherwise = block- where sp_unwind = CmmRegOff spReg (sp0 - platformWordSizeInBytes platform - sp_off)+ where sp_unwind = CmmRegOff (spReg platform) (sp0 - platformWordSizeInBytes platform - sp_off) {- Note [SP old/young offsets] ~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -917,7 +917,7 @@ areaToSp :: Platform -> ByteOff -> ByteOff -> (Area -> StackLoc) -> CmmExpr -> CmmExpr areaToSp platform sp_old _sp_hwm area_off (CmmStackSlot area n)- = cmmOffset platform spExpr (sp_old - area_off area - n)+ = cmmOffset platform (spExpr platform) (sp_old - area_off area - n) -- Replace (CmmStackSlot area n) with an offset from Sp areaToSp platform _ sp_hwm _ (CmmLit CmmHighStackMark)@@ -939,9 +939,9 @@ -- | Determine whether a stack check cannot fail. falseStackCheck :: [CmmExpr] -> Bool falseStackCheck [ CmmMachOp (MO_Sub _)- [ CmmRegOff (CmmGlobal Sp) x_off+ [ CmmRegOff (CmmGlobal (GlobalRegUse Sp _)) x_off , CmmLit (CmmInt y_lit _)]- , CmmReg (CmmGlobal SpLim)]+ , CmmReg (CmmGlobal (GlobalRegUse SpLim _))] = fromIntegral x_off >= y_lit falseStackCheck _ = False @@ -1087,7 +1087,7 @@ [ CmmAssign (CmmLocal reg) -- This cmmOffset basically corresponds to manifesting -- @CmmStackSlot Old sp_off@, see Note [SP old/young offsets]- (CmmLoad (cmmOffset platform spExpr (sp_off - reg_off))+ (CmmLoad (cmmOffset platform (spExpr platform) (sp_off - reg_off)) (localRegType reg) NaturallyAligned) | (reg, reg_off) <- stackSlotRegs stackmap@@ -1142,7 +1142,7 @@ -- Both 'id' and 'new_base' are KindNonPtr because they're -- RTS-only objects and are not subject to garbage collection id <- newTemp (bWord platform)- new_base <- newTemp (cmmRegType platform baseReg)+ new_base <- newTemp (cmmRegType $ baseReg platform) let (caller_save, caller_load) = callerSaveVolatileRegs platform save_state_code <- saveThreadState profile load_state_code <- loadThreadState profile@@ -1153,7 +1153,7 @@ resume = mkMiddle (callResumeThread new_base id) <*> -- Assign the result to BaseReg: we -- might now have a different Capability!- mkAssign baseReg (CmmReg (CmmLocal new_base)) <*>+ mkAssign (baseReg platform) (CmmReg (CmmLocal new_base)) <*> caller_load <*> load_state_code @@ -1168,7 +1168,7 @@ -- different. Hence we continue by jumping to the top stack frame, -- not by jumping to succ. jump = CmmCall { cml_target = entryCode platform $- cmmLoadBWord platform spExpr+ cmmLoadBWord platform (spExpr platform) , cml_cont = Just succ , cml_args_regs = regs , cml_args = widthInBytes (wordWidth platform)@@ -1193,7 +1193,7 @@ callSuspendThread :: Platform -> LocalReg -> Bool -> CmmNode O O callSuspendThread platform id intrbl = CmmUnsafeForeignCall (PrimTarget MO_SuspendThread)- [id] [baseExpr, mkIntExpr platform (fromEnum intrbl)]+ [id] [baseExpr platform, mkIntExpr platform (fromEnum intrbl)] callResumeThread :: LocalReg -> LocalReg -> CmmNode O O callResumeThread new_base id =
GHC/Cmm/Lexer.hs view
@@ -1,7 +1,7 @@ {-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-missing-signatures #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-}-{-# LINE 13 "_build/source-dist/ghc-9.6.7-src/ghc-9.6.7/compiler/GHC/Cmm/Lexer.x" #-}+{-# LINE 13 "_build/source-dist/ghc-9.8.1-src/ghc-9.8.1/compiler/GHC/Cmm/Lexer.x" #-} module GHC.Cmm.Lexer ( CmmToken(..), cmmlex, ) where@@ -19,6 +19,7 @@ import GHC.Parser.CharClass import GHC.Parser.Errors.Types import GHC.Parser.Errors.Ppr ()+import GHC.Platform import GHC.Utils.Error import GHC.Utils.Misc --import TRACE@@ -385,7 +386,7 @@ , (0,alex_action_20) ] -{-# LINE 133 "_build/source-dist/ghc-9.6.7-src/ghc-9.6.7/compiler/GHC/Cmm/Lexer.x" #-}+{-# LINE 134 "_build/source-dist/ghc-9.8.1-src/ghc-9.8.1/compiler/GHC/Cmm/Lexer.x" #-} data CmmToken = CmmT_SpecChar Char | CmmT_DotDot@@ -433,7 +434,7 @@ | CmmT_float32 | CmmT_float64 | CmmT_gcptr- | CmmT_GlobalReg GlobalReg+ | CmmT_GlobalReg GlobalRegUse | CmmT_Name FastString | CmmT_String String | CmmT_Int Integer@@ -465,14 +466,20 @@ 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))))+global_regN :: (Int -> GlobalReg) -> (Platform -> CmmType) -> Action+global_regN con ty_fn span buf len+ = do { platform <- getPlatform+ ; let reg = con (fromIntegral n)+ ty = ty_fn platform+ ; return (L span (CmmT_GlobalReg (GlobalRegUse reg ty))) } 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))+global_reg :: GlobalReg -> (Platform -> CmmType) -> Action+global_reg reg ty_fn span _buf _len+ = do { platform <- getPlatform+ ; let ty = ty_fn platform+ ; return (L span (CmmT_GlobalReg (GlobalRegUse reg ty))) } strtoken :: (String -> CmmToken) -> Action strtoken f span buf len =@@ -660,22 +667,22 @@ alex_action_22 = kw CmmT_True alex_action_23 = kw CmmT_False alex_action_24 = kw CmmT_likely-alex_action_25 = global_regN (\n -> VanillaReg n VGcPtr)-alex_action_26 = global_regN (\n -> VanillaReg n VNonGcPtr)-alex_action_27 = global_regN FloatReg-alex_action_28 = global_regN DoubleReg-alex_action_29 = global_regN LongReg-alex_action_30 = global_reg Sp-alex_action_31 = global_reg SpLim-alex_action_32 = global_reg Hp-alex_action_33 = global_reg HpLim-alex_action_34 = global_reg CCCS-alex_action_35 = global_reg CurrentTSO-alex_action_36 = global_reg CurrentNursery-alex_action_37 = global_reg HpAlloc-alex_action_38 = global_reg BaseReg-alex_action_39 = global_reg MachSp-alex_action_40 = global_reg UnwindReturnReg+alex_action_25 = global_regN VanillaReg gcWord+alex_action_26 = global_regN VanillaReg bWord+alex_action_27 = global_regN FloatReg (const $ cmmFloat W32)+alex_action_28 = global_regN DoubleReg (const $ cmmFloat W64)+alex_action_29 = global_regN LongReg (const $ cmmBits W64)+alex_action_30 = global_reg Sp bWord+alex_action_31 = global_reg SpLim bWord+alex_action_32 = global_reg Hp gcWord+alex_action_33 = global_reg HpLim bWord+alex_action_34 = global_reg CCCS bWord+alex_action_35 = global_reg CurrentTSO bWord+alex_action_36 = global_reg CurrentNursery bWord+alex_action_37 = global_reg HpAlloc bWord+alex_action_38 = global_reg BaseReg bWord+alex_action_39 = global_reg MachSp bWord+alex_action_40 = global_reg UnwindReturnReg bWord alex_action_41 = name alex_action_42 = tok_octal alex_action_43 = tok_decimal
GHC/Cmm/Lint.hs view
@@ -107,8 +107,7 @@ then cmmCheckMachOp op args tys else cmmLintMachOpErr expr (map (cmmExprType platform) args) (machOpArgReps platform op) lintCmmExpr (CmmRegOff reg offset)- = do platform <- getPlatform- let rep = typeWidth (cmmRegType platform reg)+ = do let rep = typeWidth (cmmRegType reg) lintCmmExpr (CmmMachOp (MO_Add rep) [CmmReg reg, CmmLit (CmmInt (fromIntegral offset) rep)]) lintCmmExpr expr =@@ -171,24 +170,10 @@ CmmUnwind{} -> return () CmmAssign reg expr -> do- platform <- getPlatform erep <- lintCmmExpr expr- let reg_ty = cmmRegType platform reg- unless (compat_regs erep reg_ty) $+ let reg_ty = cmmRegType reg+ unless (erep `cmmEqType_ignoring_ptrhood` reg_ty) $ cmmLintAssignErr (CmmAssign reg expr) erep reg_ty- where- compat_regs :: CmmType -> CmmType -> Bool- compat_regs ty1 ty2- -- As noted in #22297, SIMD vector registers can be used for- -- multiple different purposes, e.g. xmm1 can be used to hold 4 Floats,- -- or 4 Int32s, or 2 Word64s, ...- -- To allow this, we relax the check: we only ensure that the widths- -- match, until we can find a more robust solution.- | isVecType ty1- , isVecType ty2- = typeWidth ty1 == typeWidth ty2- | otherwise- = cmmEqType_ignoring_ptrhood ty1 ty2 CmmStore l r _alignment -> do _ <- lintCmmExpr l
GHC/Cmm/MachOp.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE LambdaCase #-}+ {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module GHC.Cmm.MachOp@@ -26,6 +28,9 @@ -- Atomic read-modify-write , MemoryOrdering(..) , AtomicMachOp(..)++ -- Fused multiply-add+ , FMASign(..), pprFMASign ) where @@ -108,6 +113,10 @@ | MO_F_Mul Width | MO_F_Quot Width + -- Floating-point fused multiply-add operations+ -- | Fused multiply-add, see 'FMASign'.+ | MO_FMA FMASign Width+ -- Floating point comparison | MO_F_Eq Width | MO_F_Ne Width@@ -180,7 +189,30 @@ pprMachOp :: MachOp -> SDoc pprMachOp mo = text (show mo) +-- | Where are the signs in a fused multiply-add instruction?+--+-- @x*y + z@ vs @x*y - z@ vs @-x*y+z@ vs @-x*y-z@.+--+-- Warning: the signs aren't consistent across architectures (X86, PowerPC, AArch64).+-- The user-facing implementation uses the X86 convention, while the relevant+-- backends use their corresponding conventions.+data FMASign+ -- | Fused multiply-add @x*y + z@.+ = FMAdd+ -- | Fused multiply-subtract. On X86: @x*y - z@.+ | FMSub+ -- | Fused multiply-add. On X86: @-x*y + z@.+ | FNMAdd+ -- | Fused multiply-subtract. On X86: @-x*y - z@.+ | FNMSub+ deriving (Eq, Show) +pprFMASign :: IsLine doc => FMASign -> doc+pprFMASign = \case+ FMAdd -> text "fmadd"+ FMSub -> text "fmsub"+ FNMAdd -> text "fnmadd"+ FNMSub -> text "fnmsub" -- ----------------------------------------------------------------------------- -- Some common MachReps@@ -418,6 +450,9 @@ MO_F_Mul r -> cmmFloat r MO_F_Quot r -> cmmFloat r MO_F_Neg r -> cmmFloat r++ MO_FMA _ r -> cmmFloat r+ MO_F_Eq {} -> comparisonResultRep platform MO_F_Ne {} -> comparisonResultRep platform MO_F_Ge {} -> comparisonResultRep platform@@ -509,6 +544,9 @@ MO_F_Mul r -> [r,r] MO_F_Quot r -> [r,r] MO_F_Neg r -> [r]++ MO_FMA _ r -> [r,r,r]+ MO_F_Eq r -> [r,r] MO_F_Ne r -> [r,r] MO_F_Ge r -> [r,r]
GHC/Cmm/Node.hs view
@@ -565,7 +565,6 @@ where fold :: forall a b. UserOfRegs GlobalReg a => (b -> GlobalReg -> b) -> b -> a -> b fold f z n = foldRegsUsed platform f z n- instance (Ord r, UserOfRegs r CmmReg) => UserOfRegs r ForeignTarget where -- The (Ord r) in the context is necessary here -- See Note [Recursive superclasses] in GHC.Tc.TyCl.Instance
GHC/Cmm/Opt.hs view
@@ -213,33 +213,23 @@ = Just $! CmmMachOp op [pic, CmmLit $ cmmOffsetLit lit off ] where off = fromIntegral (narrowS rep n) --- Make a RegOff if we can. We don't perform this optimization if rep is greater--- than the host word size because we use an Int to store the offset. See--- #24893 and #24700. This should be fixed to ensure that optimizations don't--- depend on the compiler host platform.+-- Make a RegOff if we can cmmMachOpFoldM _ (MO_Add _) [CmmReg reg, CmmLit (CmmInt n rep)]- | validOffsetRep rep = Just $! cmmRegOff reg (fromIntegral (narrowS rep n)) cmmMachOpFoldM _ (MO_Add _) [CmmRegOff reg off, CmmLit (CmmInt n rep)]- | validOffsetRep rep = Just $! cmmRegOff reg (off + fromIntegral (narrowS rep n)) cmmMachOpFoldM _ (MO_Sub _) [CmmReg reg, CmmLit (CmmInt n rep)]- | validOffsetRep rep = Just $! cmmRegOff reg (- fromIntegral (narrowS rep n)) cmmMachOpFoldM _ (MO_Sub _) [CmmRegOff reg off, CmmLit (CmmInt n rep)]- | validOffsetRep rep = Just $! cmmRegOff reg (off - fromIntegral (narrowS rep n)) -- Fold label(+/-)offset into a CmmLit where possible cmmMachOpFoldM _ (MO_Add _) [CmmLit lit, CmmLit (CmmInt i rep)]- | validOffsetRep rep = Just $! CmmLit (cmmOffsetLit lit (fromIntegral (narrowU rep i))) cmmMachOpFoldM _ (MO_Add _) [CmmLit (CmmInt i rep), CmmLit lit]- | validOffsetRep rep = Just $! CmmLit (cmmOffsetLit lit (fromIntegral (narrowU rep i))) cmmMachOpFoldM _ (MO_Sub _) [CmmLit lit, CmmLit (CmmInt i rep)]- | validOffsetRep rep = Just $! CmmLit (cmmOffsetLit lit (fromIntegral (negate (narrowU rep i)))) @@ -420,13 +410,6 @@ cmmMachOpFoldM _ _ _ = Nothing --- | Check that a literal width is compatible with the host word size used to--- store offsets. This should be fixed properly (using larger types to store--- literal offsets). See #24893-validOffsetRep :: Width -> Bool-validOffsetRep rep = widthInBits rep <= finiteBitSize (undefined :: Int)-- {- Note [Comparison operators] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If we have@@ -442,5 +425,5 @@ -- Utils isPicReg :: CmmExpr -> Bool-isPicReg (CmmReg (CmmGlobal PicBaseReg)) = True+isPicReg (CmmReg (CmmGlobal (GlobalRegUse PicBaseReg _))) = True isPicReg _ = False
GHC/Cmm/Parser.hs view
@@ -81,7 +81,7 @@ import Control.Applicative(Applicative(..)) import Control.Monad (ap) --- parser produced by Happy Version 1.20.0+-- parser produced by Happy Version 1.20.1.1 newtype HappyAbsSyn = HappyAbsSyn HappyAny #if __GLASGOW_HASKELL__ >= 607@@ -271,8 +271,8 @@ happyOut29 :: (HappyAbsSyn ) -> HappyWrap29 happyOut29 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut29 #-}-newtype HappyWrap30 = HappyWrap30 ([GlobalReg])-happyIn30 :: ([GlobalReg]) -> (HappyAbsSyn )+newtype HappyWrap30 = HappyWrap30 ([GlobalRegUse])+happyIn30 :: ([GlobalRegUse]) -> (HappyAbsSyn ) happyIn30 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap30 x) {-# INLINE happyIn30 #-} happyOut30 :: (HappyAbsSyn ) -> HappyWrap30@@ -757,8 +757,8 @@ 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)) -> + = 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 { (HappyWrap10 happy_var_6) -> ( do home_unit_id <- getHomeUnitId@@ -776,7 +776,7 @@ happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest)- = case happyOutTok happy_x_2 of { (L _ (CmmT_String happy_var_2)) -> + = case happyOutTok happy_x_2 of { (L _ (CmmT_String happy_var_2)) -> case happyOut7 happy_x_4 of { (HappyWrap7 happy_var_4) -> case happyOut8 happy_x_5 of { (HappyWrap8 happy_var_5) -> happyIn6@@ -790,7 +790,7 @@ 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)) -> + = happyThen ((case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> ( do home_unit_id <- getHomeUnitId liftP $ pure $ do@@ -842,7 +842,7 @@ happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest)- = case happyOutTok happy_x_4 of { (L _ (CmmT_String happy_var_4)) -> + = case happyOutTok happy_x_4 of { (L _ (CmmT_String happy_var_4)) -> happyIn9 (return [mkString happy_var_4] ) `HappyStk` happyRest}@@ -855,7 +855,7 @@ happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest)- = case happyOutTok happy_x_3 of { (L _ (CmmT_Int happy_var_3)) -> + = case happyOutTok happy_x_3 of { (L _ (CmmT_Int happy_var_3)) -> happyIn9 (return [CmmUninitialised (fromIntegral happy_var_3)]@@ -870,7 +870,7 @@ happy_x_1 `HappyStk` happyRest) = case happyOut59 happy_x_1 of { (HappyWrap59 happy_var_1) -> - case happyOutTok happy_x_3 of { (L _ (CmmT_Int happy_var_3)) -> + case happyOutTok happy_x_3 of { (L _ (CmmT_Int happy_var_3)) -> happyIn9 (return [CmmUninitialised (widthInBytes (typeWidth happy_var_1) *@@ -885,7 +885,7 @@ happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest)- = case happyOutTok happy_x_3 of { (L _ (CmmT_Name happy_var_3)) -> + = case happyOutTok happy_x_3 of { (L _ (CmmT_Name happy_var_3)) -> case happyOut10 happy_x_4 of { (HappyWrap10 happy_var_4) -> happyIn9 (do { lits <- sequence happy_var_4@@ -977,7 +977,7 @@ 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)) -> + = happyThen ((case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> ( do home_unit_id <- getHomeUnitId liftP $ pure $ do@@ -1002,12 +1002,12 @@ 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)) -> + = 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)) -> ( do home_unit_id <- getHomeUnitId liftP $ pure $ do@@ -1046,14 +1046,14 @@ 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)) -> - case happyOutTok happy_x_17 of { (L _ (CmmT_Int happy_var_17)) -> + = 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)) -> + case happyOutTok happy_x_17 of { (L _ (CmmT_Int happy_var_17)) -> ( do home_unit_id <- getHomeUnitId liftP $ pure $ do@@ -1089,13 +1089,13 @@ 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)) -> + = 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)) -> ( do home_unit_id <- getHomeUnitId liftP $ pure $ do@@ -1128,11 +1128,11 @@ 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)) -> + = 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)) -> ( do home_unit_id <- getHomeUnitId liftP $ pure $ do@@ -1157,8 +1157,8 @@ 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)) -> + = 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)) -> ( do home_unit_id <- getHomeUnitId liftP $ pure $ do@@ -1182,8 +1182,8 @@ 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)) -> + = 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 happyOut55 happy_x_7 of { (HappyWrap55 happy_var_7) -> ( do home_unit_id <- getHomeUnitId@@ -1279,7 +1279,7 @@ 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)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> happyIn18 ((happy_var_1, mkForeignLabel happy_var_1 Nothing ForeignLabelInExternalPackage IsFunction) )}@@ -1288,7 +1288,7 @@ 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)) -> + = case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) -> happyIn18 ((happy_var_2, mkForeignLabel happy_var_2 Nothing ForeignLabelInExternalPackage IsData) )}@@ -1297,8 +1297,8 @@ 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)) -> + = 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 (UnitId (mkFastString happy_var_1)) happy_var_2) )}}@@ -1306,7 +1306,7 @@ 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)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> happyIn19 ([happy_var_1] )}@@ -1316,7 +1316,7 @@ happyReduction_43 happy_x_3 happy_x_2 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> case happyOut19 happy_x_3 of { (HappyWrap19 happy_var_3) -> happyIn19 (happy_var_1 : happy_var_3@@ -1333,7 +1333,7 @@ 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)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> happyIn20 (do l <- newLabel happy_var_1; emitLabel l )}@@ -1437,7 +1437,7 @@ happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut49 happy_x_1 of { (HappyWrap49 happy_var_1) -> - case happyOutTok happy_x_3 of { (L _ (CmmT_String happy_var_3)) -> + case happyOutTok happy_x_3 of { (L _ (CmmT_String happy_var_3)) -> case happyOut24 happy_x_4 of { (HappyWrap24 happy_var_4) -> case happyOut43 happy_x_6 of { (HappyWrap43 happy_var_6) -> case happyOut28 happy_x_8 of { (HappyWrap28 happy_var_8) -> @@ -1457,7 +1457,7 @@ happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut49 happy_x_1 of { (HappyWrap49 happy_var_1) -> - case happyOutTok happy_x_4 of { (L _ (CmmT_Name happy_var_4)) -> + case happyOutTok happy_x_4 of { (L _ (CmmT_Name happy_var_4)) -> case happyOut46 happy_x_6 of { (HappyWrap46 happy_var_6) -> ( primCall happy_var_1 happy_var_4 happy_var_6)}}}) ) (\r -> happyReturn (happyIn20 r))@@ -1470,7 +1470,7 @@ happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> + = happyThen ((case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> case happyOut46 happy_x_3 of { (HappyWrap46 happy_var_3) -> ( stmtMacro happy_var_1 happy_var_3)}}) ) (\r -> happyReturn (happyIn20 r))@@ -1498,7 +1498,7 @@ happyReduction_54 happy_x_3 happy_x_2 happy_x_1- = case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) -> + = case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) -> happyIn20 (do l <- lookupLabel happy_var_2; emit (mkBranch l) )}@@ -1608,7 +1608,7 @@ happyRest) = case happyOut26 happy_x_2 of { (HappyWrap26 happy_var_2) -> case happyOut38 happy_x_3 of { (HappyWrap38 happy_var_3) -> - case happyOutTok happy_x_5 of { (L _ (CmmT_Name happy_var_5)) -> + case happyOutTok happy_x_5 of { (L _ (CmmT_Name happy_var_5)) -> happyIn20 (do l <- lookupLabel happy_var_5; cmmRawIf happy_var_2 l happy_var_3 ) `HappyStk` happyRest}}}@@ -1680,11 +1680,11 @@ happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest)- = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) -> case happyOut23 happy_x_3 of { (HappyWrap23 happy_var_3) -> case happyOut21 happy_x_5 of { (HappyWrap21 happy_var_5) -> happyIn21- (do e <- happy_var_3; rest <- happy_var_5; return ((happy_var_1, e) : rest)+ (do e <- happy_var_3; rest <- happy_var_5; return ((globalRegUseGlobalReg happy_var_1, e) : rest) ) `HappyStk` happyRest}}} happyReduce_67 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )@@ -1692,10 +1692,10 @@ happyReduction_67 happy_x_3 happy_x_2 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) -> case happyOut23 happy_x_3 of { (HappyWrap23 happy_var_3) -> happyIn21- (do e <- happy_var_3; return [(happy_var_1, e)]+ (do e <- happy_var_3; return [(globalRegUseGlobalReg happy_var_1, e)] )}} happyReduce_68 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )@@ -1744,7 +1744,7 @@ happyReduce_74 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn ) happyReduce_74 = happySpecReduce_1 20# happyReduction_74 happyReduction_74 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> happyIn24 (return (CmmLit (CmmLabel (mkForeignLabel happy_var_1 Nothing ForeignLabelInThisPackage IsFunction))) )}@@ -1832,7 +1832,7 @@ happyReduce_84 = happyMonadReduce 1# 24# happyReduction_84 happyReduction_84 (happy_x_1 `HappyStk` happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { (L _ (CmmT_String happy_var_1)) -> + = happyThen ((case happyOutTok happy_x_1 of { (L _ (CmmT_String happy_var_1)) -> ( parseSafety happy_var_1)}) ) (\r -> happyReturn (happyIn28 r)) @@ -1861,13 +1861,13 @@ happy_x_1 = case happyOut30 happy_x_2 of { (HappyWrap30 happy_var_2) -> happyIn29- (happy_var_2+ (map globalRegUseGlobalReg happy_var_2 )} happyReduce_88 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn ) happyReduce_88 = happySpecReduce_1 26# happyReduction_88 happyReduction_88 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) -> happyIn30 ([happy_var_1] )}@@ -1877,7 +1877,7 @@ happyReduction_89 happy_x_3 happy_x_2 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) -> case happyOut30 happy_x_3 of { (HappyWrap30 happy_var_3) -> happyIn30 (happy_var_1 : happy_var_3@@ -1891,8 +1891,8 @@ 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)) -> + = case happyOutTok happy_x_2 of { (L _ (CmmT_Int happy_var_2)) -> + case happyOutTok happy_x_4 of { (L _ (CmmT_Int happy_var_4)) -> happyIn31 (Just (happy_var_2, happy_var_4) ) `HappyStk` happyRest}}@@ -1949,7 +1949,7 @@ happyReduction_96 happy_x_3 happy_x_2 happy_x_1- = case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) -> + = case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) -> happyIn34 (do l <- lookupLabel happy_var_2; return (Left l) )}@@ -1957,7 +1957,7 @@ happyReduce_97 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn ) happyReduce_97 = happySpecReduce_1 31# happyReduction_97 happyReduction_97 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_Int happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_Int happy_var_1)) -> happyIn35 ([ happy_var_1 ] )}@@ -1967,7 +1967,7 @@ happyReduction_98 happy_x_3 happy_x_2 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_Int happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_Int happy_var_1)) -> case happyOut35 happy_x_3 of { (HappyWrap35 happy_var_3) -> happyIn35 (happy_var_1 : happy_var_3@@ -2247,7 +2247,7 @@ happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut40 happy_x_1 of { (HappyWrap40 happy_var_1) -> - case happyOutTok happy_x_3 of { (L _ (CmmT_Name happy_var_3)) -> + case happyOutTok happy_x_3 of { (L _ (CmmT_Name happy_var_3)) -> case happyOut40 happy_x_5 of { (HappyWrap40 happy_var_5) -> ( do { mo <- nameToMachOp happy_var_3 ; return (mkMachOp mo [happy_var_1,happy_var_5]) })}}})@@ -2265,7 +2265,7 @@ happyReduce_126 = happySpecReduce_2 36# happyReduction_126 happyReduction_126 happy_x_2 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_Int happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_Int happy_var_1)) -> case happyOut42 happy_x_2 of { (HappyWrap42 happy_var_2) -> happyIn40 (return (CmmLit (CmmInt happy_var_1 (typeWidth happy_var_2)))@@ -2275,7 +2275,7 @@ happyReduce_127 = happySpecReduce_2 36# happyReduction_127 happyReduction_127 happy_x_2 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_Float happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_Float happy_var_1)) -> case happyOut42 happy_x_2 of { (HappyWrap42 happy_var_2) -> happyIn40 (return (CmmLit (CmmFloat happy_var_1 (typeWidth happy_var_2)))@@ -2284,7 +2284,7 @@ happyReduce_128 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn ) happyReduce_128 = happySpecReduce_1 36# happyReduction_128 happyReduction_128 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_String happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_String happy_var_1)) -> happyIn40 (do s <- code (newStringCLit happy_var_1); return (CmmLit s)@@ -2316,7 +2316,7 @@ happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk- = happyThen ((case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) -> + = happyThen ((case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) -> case happyOut46 happy_x_4 of { (HappyWrap46 happy_var_4) -> ( exprOp happy_var_2 happy_var_4)}}) ) (\r -> happyReturn (happyIn40 r))@@ -2416,7 +2416,7 @@ happy_x_1 `HappyStk` happyRest) tk = happyThen ((case happyOut39 happy_x_1 of { (HappyWrap39 happy_var_1) -> - case happyOutTok happy_x_2 of { (L _ (CmmT_String happy_var_2)) -> + 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))}})@@ -2458,7 +2458,7 @@ happyReduce_147 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn ) happyReduce_147 = happySpecReduce_1 44# happyReduction_147 happyReduction_147 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> happyIn48 (lookupName happy_var_1 )}@@ -2466,7 +2466,7 @@ happyReduce_148 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn ) happyReduce_148 = happySpecReduce_1 44# happyReduction_148 happyReduction_148 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) -> happyIn48 (return (CmmReg (CmmGlobal happy_var_1)) )}@@ -2530,7 +2530,7 @@ happyReduction_155 (happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { (L _ (CmmT_String happy_var_1)) -> + = happyThen ((case happyOutTok happy_x_1 of { (L _ (CmmT_String happy_var_1)) -> case happyOut52 happy_x_2 of { (HappyWrap52 happy_var_2) -> ( do h <- parseCmmHint happy_var_1; return $ do@@ -2540,7 +2540,7 @@ happyReduce_156 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn ) happyReduce_156 = happySpecReduce_1 48# happyReduction_156 happyReduction_156 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> happyIn52 (do e <- lookupName happy_var_1; return $@@ -2552,7 +2552,7 @@ happyReduce_157 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn ) happyReduce_157 = happySpecReduce_1 49# happyReduction_157 happyReduction_157 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) -> happyIn53 (do e <- lookupName happy_var_1; return $@@ -2564,7 +2564,7 @@ happyReduce_158 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn ) happyReduce_158 = happySpecReduce_1 49# happyReduction_158 happyReduction_158 happy_x_1- = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) -> + = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) -> happyIn53 (return (CmmGlobal happy_var_1) )}@@ -2632,7 +2632,7 @@ happyReduction_166 happy_x_2 happy_x_1 = case happyOut58 happy_x_1 of { (HappyWrap58 happy_var_1) -> - case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) -> + case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) -> happyIn57 (newLocal happy_var_1 happy_var_2 )}}@@ -2795,11 +2795,11 @@ L _ (CmmT_float32) -> cont 73#; L _ (CmmT_float64) -> cont 74#; L _ (CmmT_gcptr) -> cont 75#;- L _ (CmmT_GlobalReg happy_dollar_dollar) -> cont 76#;- L _ (CmmT_Name happy_dollar_dollar) -> cont 77#;- L _ (CmmT_String happy_dollar_dollar) -> cont 78#;- L _ (CmmT_Int happy_dollar_dollar) -> cont 79#;- L _ (CmmT_Float happy_dollar_dollar) -> cont 80#;+ L _ (CmmT_GlobalReg happy_dollar_dollar) -> cont 76#;+ L _ (CmmT_Name happy_dollar_dollar) -> cont 77#;+ L _ (CmmT_String happy_dollar_dollar) -> cont 78#;+ L _ (CmmT_Int happy_dollar_dollar) -> cont 79#;+ L _ (CmmT_Float happy_dollar_dollar) -> cont 80#; _ -> happyError' (tk, []) }) @@ -2900,7 +2900,7 @@ ( "eq", MO_Eq ), ( "ne", MO_Ne ), ( "mul", MO_Mul ),- ( "mulmayoflo", MO_S_MulMayOflo ),+ ( "mulmayoflo", MO_S_MulMayOflo ), ( "neg", MO_S_Neg ), ( "quot", MO_S_Quot ), ( "rem", MO_S_Rem ),@@ -2931,6 +2931,11 @@ ( "fmul", MO_F_Mul ), ( "fquot", MO_F_Quot ), + ( "fmadd" , MO_FMA FMAdd ),+ ( "fmsub" , MO_FMA FMSub ),+ ( "fnmadd", MO_FMA FNMAdd ),+ ( "fnmsub", MO_FMA FNMSub ),+ ( "feq", MO_F_Eq ), ( "fne", MO_F_Ne ), ( "fge", MO_F_Ge ),@@ -3028,6 +3033,12 @@ , allWidths "load_seqcst" (\w -> MO_AtomicRead w MemOrderSeqCst) , allWidths "store_release" (\w -> MO_AtomicWrite w MemOrderRelease) , allWidths "store_seqcst" (\w -> MO_AtomicWrite w MemOrderSeqCst)+ , allWidths "fetch_add" (\w -> MO_AtomicRMW w AMO_Add)+ , allWidths "fetch_sub" (\w -> MO_AtomicRMW w AMO_Sub)+ , allWidths "fetch_and" (\w -> MO_AtomicRMW w AMO_And)+ , allWidths "fetch_nand" (\w -> MO_AtomicRMW w AMO_Nand)+ , allWidths "fetch_or" (\w -> MO_AtomicRMW w AMO_Or)+ , allWidths "fetch_xor" (\w -> MO_AtomicRMW w AMO_Xor) ] where allWidths@@ -3068,19 +3079,30 @@ -- 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+inferCmmHint (CmmLit (CmmLabel _))+ = AddrHint+inferCmmHint (CmmReg (CmmGlobal reg))+ | isPtrGlobalRegUse reg+ = 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+isPtrGlobalRegUse :: GlobalRegUse -> Bool+isPtrGlobalRegUse (GlobalRegUse reg ty)+ | VanillaReg {} <- reg+ , isGcPtrType ty+ = True+ | otherwise+ = go reg+ where+ go Sp = True+ go SpLim = True+ go Hp = True+ go HpLim = True+ go CCCS = True+ go CurrentTSO = True+ go CurrentNursery = True+ go _ = False happyError :: PD a happyError = PD $ \_ _ s -> unP srcParseFail s@@ -3370,7 +3392,7 @@ withSourceNote a b parse = do name <- getName case combineSrcSpans (getLoc a) (getLoc b) of- RealSrcSpan span _ -> code (emitTick (SourceNote span name)) >> parse+ RealSrcSpan span _ -> code (emitTick (SourceNote span $ LexicalFastString $ mkFastString name)) >> parse _other -> parse -- -----------------------------------------------------------------------------
GHC/Cmm/Reg.hs view
@@ -11,12 +11,11 @@ , LocalReg(..) , localRegType -- * Global registers- , GlobalReg(..), isArgReg, globalRegType- , pprGlobalReg+ , GlobalReg(..), isArgReg, globalRegSpillType, pprGlobalReg , spReg, hpReg, spLimReg, hpLimReg, nodeReg , currentTSOReg, currentNurseryReg, hpAllocReg, cccsReg , node, baseReg- , VGcPtr(..)+ , GlobalRegUse(..), pprGlobalRegUse ) where import GHC.Prelude@@ -30,10 +29,66 @@ -- Cmm registers ----------------------------------------------------------------------------- +{- Note [GlobalReg vs GlobalRegUse]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We distinguish GlobalReg, which describes registers in the STG abstract machine,+with GlobalRegUse, which describes an usage of such a register to store values+of a particular CmmType.++For example, we might want to load/store an 8-bit integer in a register that+can store 32-bit integers.++The width of the type must fit in the register, i.e. for a usage+@GlobalRegUse reg ty@ we must have that++ > typeWidth ty <= typeWidth (globalRegSpillType reg)++The restrictions about what categories of types can be stored in a given+register are less easily stated. Some examples are:++ - Vanilla registers can contain both pointers (gcWord) and non-pointers (bWord),+ as well as sub-word sized values (e.g. b16).+ - On x86_64, SIMD registers can be used to hold vectors of both floating+ and integral values (e.g. XmmReg may store 2 Double values or 4 Int32 values).+-}++-- | A use of a global register at a particular type.+--+-- While a 'GlobalReg' identifies a global register in the STG machine,+-- a 'GlobalRegUse' also contains information about the type we are storing+-- in the register.+--+-- See Note [GlobalReg vs GlobalRegUse] for more information.+data GlobalRegUse+ = GlobalRegUse+ { globalRegUseGlobalReg :: !GlobalReg+ -- ^ The underlying 'GlobalReg'+ , globalRegUseType :: !CmmType+ -- ^ The 'CmmType' at which we are using the 'GlobalReg'.+ --+ -- Its width must be less than the width of the 'GlobalReg':+ --+ -- > typeWidth ty <= typeWidth (globalRegSpillType reg)+ }+ deriving Show++instance Outputable GlobalRegUse where+ ppr (GlobalRegUse reg _) = ppr reg++pprGlobalRegUse :: IsLine doc => GlobalRegUse -> doc+pprGlobalRegUse (GlobalRegUse reg _) = pprGlobalReg reg++-- TODO: these instances should be removed in favour+-- of more surgical uses of equality.+instance Eq GlobalRegUse where+ GlobalRegUse r1 _ == GlobalRegUse r2 _ = r1 == r2+instance Ord GlobalRegUse where+ GlobalRegUse r1 _ `compare` GlobalRegUse r2 _ = compare r1 r2+ data CmmReg = CmmLocal {-# UNPACK #-} !LocalReg- | CmmGlobal GlobalReg- deriving( Eq, Ord, Show )+ | CmmGlobal GlobalRegUse+ deriving ( Eq, Ord, Show ) instance Outputable CmmReg where ppr e = pprReg e@@ -41,16 +96,15 @@ pprReg :: CmmReg -> SDoc pprReg r = case r of- CmmLocal local -> pprLocalReg local- CmmGlobal global -> pprGlobalReg global--cmmRegType :: Platform -> CmmReg -> CmmType-cmmRegType _ (CmmLocal reg) = localRegType reg-cmmRegType platform (CmmGlobal reg) = globalRegType platform reg+ CmmLocal local -> pprLocalReg local+ CmmGlobal (GlobalRegUse global _) -> pprGlobalReg global -cmmRegWidth :: Platform -> CmmReg -> Width-cmmRegWidth platform = typeWidth . cmmRegType platform+cmmRegType :: CmmReg -> CmmType+cmmRegType (CmmLocal reg) = localRegType reg+cmmRegType (CmmGlobal reg) = globalRegUseType reg +cmmRegWidth :: CmmReg -> Width+cmmRegWidth = typeWidth . cmmRegType ----------------------------------------------------------------------------- -- Local registers@@ -129,13 +183,15 @@ there are likely still bugs there, beware! -} -data VGcPtr = VGcPtr | VNonGcPtr deriving( Eq, Show )-+-- | An abstract global register for the STG machine.+--+-- See also 'GlobalRegUse', which denotes a usage of a register at a particular+-- type (e.g. using a 32-bit wide register to store an 8-bit wide value), as per+-- Note [GlobalReg vs GlobalRegUse]. data GlobalReg -- Argument and return registers = VanillaReg -- pointers, unboxed ints and chars {-# UNPACK #-} !Int -- its number- VGcPtr | FloatReg -- single-precision floating-point registers {-# UNPACK #-} !Int -- its number@@ -192,104 +248,9 @@ -- from platform to platform (see module PositionIndependentCode). | PicBaseReg - deriving( Show )--instance Eq GlobalReg where- VanillaReg i _ == VanillaReg j _ = i==j -- Ignore type when seeking clashes- FloatReg i == FloatReg j = i==j- DoubleReg i == DoubleReg j = i==j- LongReg i == LongReg j = i==j- -- NOTE: XMM, YMM, ZMM registers actually are the same registers- -- at least with respect to store at YMM i and then read from XMM i- -- and similarly for ZMM etc.- XmmReg i == XmmReg j = i==j- YmmReg i == YmmReg j = i==j- ZmmReg i == ZmmReg j = i==j- Sp == Sp = True- SpLim == SpLim = True- Hp == Hp = True- HpLim == HpLim = True- CCCS == CCCS = True- CurrentTSO == CurrentTSO = True- CurrentNursery == CurrentNursery = True- HpAlloc == HpAlloc = True- EagerBlackholeInfo == EagerBlackholeInfo = True- GCEnter1 == GCEnter1 = True- GCFun == GCFun = True- BaseReg == BaseReg = True- MachSp == MachSp = True- UnwindReturnReg == UnwindReturnReg = True- PicBaseReg == PicBaseReg = True- _r1 == _r2 = False---- NOTE: this Ord instance affects the tuple layout in GHCi, see--- Note [GHCi and native call registers]-instance Ord GlobalReg where- compare (VanillaReg i _) (VanillaReg j _) = compare i j- -- Ignore type when seeking clashes- compare (FloatReg i) (FloatReg j) = compare i j- compare (DoubleReg i) (DoubleReg j) = compare i j- compare (LongReg i) (LongReg j) = compare i j- compare (XmmReg i) (XmmReg j) = compare i j- compare (YmmReg i) (YmmReg j) = compare i j- compare (ZmmReg i) (ZmmReg j) = compare i j- compare Sp Sp = EQ- compare SpLim SpLim = EQ- compare Hp Hp = EQ- compare HpLim HpLim = EQ- compare CCCS CCCS = EQ- compare CurrentTSO CurrentTSO = EQ- compare CurrentNursery CurrentNursery = EQ- compare HpAlloc HpAlloc = EQ- compare EagerBlackholeInfo EagerBlackholeInfo = EQ- compare GCEnter1 GCEnter1 = EQ- compare GCFun GCFun = EQ- compare BaseReg BaseReg = EQ- compare MachSp MachSp = EQ- compare UnwindReturnReg UnwindReturnReg = EQ- compare PicBaseReg PicBaseReg = EQ- compare (VanillaReg _ _) _ = LT- compare _ (VanillaReg _ _) = GT- compare (FloatReg _) _ = LT- compare _ (FloatReg _) = GT- compare (DoubleReg _) _ = LT- compare _ (DoubleReg _) = GT- compare (LongReg _) _ = LT- compare _ (LongReg _) = GT- compare (XmmReg _) _ = LT- compare _ (XmmReg _) = GT- compare (YmmReg _) _ = LT- compare _ (YmmReg _) = GT- compare (ZmmReg _) _ = LT- compare _ (ZmmReg _) = GT- compare Sp _ = LT- compare _ Sp = GT- compare SpLim _ = LT- compare _ SpLim = GT- compare Hp _ = LT- compare _ Hp = GT- compare HpLim _ = LT- compare _ HpLim = GT- compare CCCS _ = LT- compare _ CCCS = GT- compare CurrentTSO _ = LT- compare _ CurrentTSO = GT- compare CurrentNursery _ = LT- compare _ CurrentNursery = GT- compare HpAlloc _ = LT- compare _ HpAlloc = GT- compare GCEnter1 _ = LT- compare _ GCEnter1 = GT- compare GCFun _ = LT- compare _ GCFun = GT- compare BaseReg _ = LT- compare _ BaseReg = GT- compare MachSp _ = LT- compare _ MachSp = GT- compare UnwindReturnReg _ = LT- compare _ UnwindReturnReg = GT- compare EagerBlackholeInfo _ = LT- compare _ EagerBlackholeInfo = GT+ deriving( Eq, Ord, Show )+ -- NOTE: the Ord instance affects the tuple layout in GHCi, see+ -- Note [GHCi and native call registers] instance Outputable GlobalReg where ppr e = pprGlobalReg e@@ -300,10 +261,7 @@ pprGlobalReg :: IsLine doc => GlobalReg -> doc pprGlobalReg gr = case gr of- VanillaReg n _ -> char 'R' <> int n--- Temp Jan08--- VanillaReg n VNonGcPtr -> char 'R' <> int n--- VanillaReg n VGcPtr -> char 'P' <> int n+ VanillaReg n -> char 'R' <> int n FloatReg n -> char 'F' <> int n DoubleReg n -> char 'D' <> int n LongReg n -> char 'L' <> int n@@ -331,38 +289,38 @@ -- convenient aliases 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+ currentTSOReg, currentNurseryReg, hpAllocReg, cccsReg :: Platform -> CmmReg+baseReg p = CmmGlobal (GlobalRegUse BaseReg $ bWord p)+spReg p = CmmGlobal (GlobalRegUse Sp $ bWord p)+hpReg p = CmmGlobal (GlobalRegUse Hp $ gcWord p)+hpLimReg p = CmmGlobal (GlobalRegUse HpLim $ bWord p)+spLimReg p = CmmGlobal (GlobalRegUse SpLim $ bWord p)+nodeReg p = CmmGlobal (GlobalRegUse (VanillaReg 1) $ gcWord p)+currentTSOReg p = CmmGlobal (GlobalRegUse CurrentTSO $ bWord p)+currentNurseryReg p = CmmGlobal (GlobalRegUse CurrentNursery $ bWord p)+hpAllocReg p = CmmGlobal (GlobalRegUse HpAlloc $ bWord p)+cccsReg p = CmmGlobal (GlobalRegUse CCCS $ bWord p) node :: GlobalReg-node = VanillaReg 1 VGcPtr+node = VanillaReg 1 -globalRegType :: Platform -> GlobalReg -> CmmType-globalRegType platform = \case- (VanillaReg _ VGcPtr) -> gcWord platform- (VanillaReg _ VNonGcPtr) -> bWord platform- (FloatReg _) -> cmmFloat W32- (DoubleReg _) -> cmmFloat W64- (LongReg _) -> cmmBits W64+globalRegSpillType :: Platform -> GlobalReg -> CmmType+globalRegSpillType platform = \case+ VanillaReg _ -> gcWord platform+ FloatReg _ -> cmmFloat W32+ DoubleReg _ -> cmmFloat W64+ LongReg _ -> cmmBits W64+ -- TODO: improve the internal model of SIMD/vectorized registers- -- the right design SHOULd improve handling of float and double code too.+ -- the right design SHOULD improve handling of float and double code too. -- see remarks in Note [SIMD Design for the future] in GHC.StgToCmm.Prim- (XmmReg _) -> cmmVec 4 (cmmBits W32)- (YmmReg _) -> cmmVec 8 (cmmBits W32)- (ZmmReg _) -> cmmVec 16 (cmmBits W32)+ XmmReg _ -> cmmVec 4 (cmmBits W32)+ YmmReg _ -> cmmVec 8 (cmmBits W32)+ ZmmReg _ -> cmmVec 16 (cmmBits W32) - Hp -> gcWord platform -- The initialiser for all- -- dynamically allocated closures- _ -> bWord platform+ Hp -> gcWord platform -- The initialiser for all+ -- dynamically allocated closures+ _ -> bWord platform isArgReg :: GlobalReg -> Bool isArgReg (VanillaReg {}) = True
GHC/Cmm/Sink.hs view
@@ -21,7 +21,7 @@ import GHC.Platform import GHC.Types.Unique.FM -import qualified GHC.Data.Word64Set as Word64Set+import qualified Data.IntSet as IntSet import Data.List (partition) import Data.Maybe @@ -175,7 +175,7 @@ -- Annotate the middle nodes with the registers live *after* -- the node. This will help us decide whether we can inline -- an assignment in the current node or not.- live = Word64Set.unions (map getLive succs)+ live = IntSet.unions (map getLive succs) live_middle = gen_killL platform last live ann_middles = annotate platform live_middle (blockToList middle) @@ -188,7 +188,7 @@ -- one predecessor), so identify the join points and the set -- of registers live in them. (joins, nonjoins) = partition (`mapMember` join_pts) succs- live_in_joins = Word64Set.unions (map getLive joins)+ live_in_joins = IntSet.unions (map getLive joins) -- We do not want to sink an assignment into multiple branches, -- so identify the set of registers live in multiple successors.@@ -215,7 +215,7 @@ live_sets' | should_drop = live_sets | otherwise = map upd live_sets - upd set | r `elemLRegSet` set = set `Word64Set.union` live_rhs+ upd set | r `elemLRegSet` set = set `IntSet.union` live_rhs | otherwise = set live_rhs = foldRegsUsed platform (flip insertLRegSet) emptyLRegSet rhs@@ -244,7 +244,7 @@ -- isTrivial :: Platform -> CmmExpr -> Bool isTrivial _ (CmmReg (CmmLocal _)) = True-isTrivial platform (CmmReg (CmmGlobal r)) = -- see Note [Inline GlobalRegs?]+isTrivial platform (CmmReg (CmmGlobal (GlobalRegUse r _))) = -- see Note [Inline GlobalRegs?] if isARM (platformArch platform) then True -- CodeGen.Platform.ARM does not have globalRegMaybe else isJust (globalRegMaybe platform r)@@ -667,9 +667,9 @@ , memConflicts addr (loadAddr platform addr' (cmmExprWidth platform e)) = True -- (4) an assignment to Hp/Sp conflicts with a heap/stack read respectively- | HeapMem <- addr, CmmAssign (CmmGlobal Hp) _ <- node = True- | StackMem <- addr, CmmAssign (CmmGlobal Sp) _ <- node = True- | SpMem{} <- addr, CmmAssign (CmmGlobal Sp) _ <- node = True+ | HeapMem <- addr, CmmAssign (CmmGlobal (GlobalRegUse Hp _)) _ <- node = True+ | StackMem <- addr, CmmAssign (CmmGlobal (GlobalRegUse Sp _)) _ <- node = True+ | SpMem{} <- addr, CmmAssign (CmmGlobal (GlobalRegUse Sp _)) _ <- node = True -- (5) foreign calls clobber heap: see Note [Foreign calls clobber heap] | CmmUnsafeForeignCall{} <- node, memConflicts addr AnyMem = True@@ -703,9 +703,9 @@ -- Cmm expression globalRegistersConflict :: Platform -> CmmExpr -> CmmNode e x -> Bool globalRegistersConflict platform expr node =- -- See Note [Inlining foldRegsDefd]- inline foldRegsDefd platform (\b r -> b || regUsedIn platform (CmmGlobal r) expr)- False node+ -- See Note [Inlining foldRegsDefd]+ inline foldRegsDefd platform (\b r -> b || globalRegUsedIn platform r expr)+ False node -- Returns True if node defines any local registers that are used in the -- Cmm expression@@ -852,17 +852,17 @@ loadAddr :: Platform -> CmmExpr -> Width -> AbsMem loadAddr platform e w = case e of- CmmReg r -> regAddr platform r 0 w- CmmRegOff r i -> regAddr platform r i w- _other | regUsedIn platform spReg e -> StackMem- | otherwise -> AnyMem+ CmmReg r -> regAddr r 0 w+ CmmRegOff r i -> regAddr r i w+ _other | regUsedIn platform (spReg platform) e -> StackMem+ | otherwise -> AnyMem -regAddr :: Platform -> CmmReg -> Int -> Width -> AbsMem-regAddr _ (CmmGlobal Sp) i w = SpMem i (widthInBytes w)-regAddr _ (CmmGlobal Hp) _ _ = HeapMem-regAddr _ (CmmGlobal CurrentTSO) _ _ = HeapMem -- important for PrimOps-regAddr platform r _ _ | isGcPtrType (cmmRegType platform r) = HeapMem -- yay! GCPtr pays for itself-regAddr _ _ _ _ = AnyMem+regAddr :: CmmReg -> Int -> Width -> AbsMem+regAddr (CmmGlobal (GlobalRegUse Sp _)) i w = SpMem i (widthInBytes w)+regAddr (CmmGlobal (GlobalRegUse Hp _)) _ _ = HeapMem+regAddr (CmmGlobal (GlobalRegUse CurrentTSO _)) _ _ = HeapMem -- important for PrimOps+regAddr r _ _ | isGcPtrType (cmmRegType r) = HeapMem -- yay! GCPtr pays for itself+regAddr _ _ _ = AnyMem {- Note [Inline GlobalRegs?]
GHC/Cmm/ThreadSanitizer.hs view
@@ -54,11 +54,13 @@ CmmTick{} -> BMiddle node CmmUnwind{} -> BMiddle node CmmAssign{} -> annotateNodeOO env node- CmmStore lhs rhs align ->+ -- TODO: Track unaligned stores+ CmmStore _ _ Unaligned -> annotateNodeOO env node+ CmmStore lhs rhs NaturallyAligned -> let ty = cmmExprType (platform env) rhs rhs_nodes = annotateLoads env (collectExprLoads rhs) lhs_nodes = annotateLoads env (collectExprLoads lhs)- st = tsanStore env align ty lhs+ st = tsanStore env ty lhs in rhs_nodes `blockAppend` lhs_nodes `blockAppend` st `blockSnoc` node CmmUnsafeForeignCall (PrimTarget op) formals args -> let node' = fromMaybe (BMiddle node) (annotatePrim env op formals args)@@ -156,17 +158,23 @@ regs = filter (callerSaves platform) (activeStgRegs platform) save = blockFromList (map saveReg regs)++ saveReg :: GlobalReg -> CmmNode O O saveReg reg = CmmStore (get_GlobalReg_addr platform reg)- (CmmReg (CmmGlobal reg))+ (CmmReg (CmmGlobal (GlobalRegUse reg ty))) NaturallyAligned+ where ty = globalRegSpillType platform reg restore = blockFromList (map restoreReg regs)++ restoreReg :: GlobalReg -> CmmNode O O restoreReg reg =- CmmAssign (CmmGlobal reg)+ CmmAssign (CmmGlobal (GlobalRegUse reg ty)) (CmmLoad (get_GlobalReg_addr platform reg)- (globalRegType platform reg)+ ty NaturallyAligned)+ where ty = globalRegSpillType platform reg -- | Mirrors __tsan_memory_order -- <https://github.com/llvm-mirror/compiler-rt/blob/master/include/sanitizer/tsan_interface_atomic.h#L32>@@ -191,17 +199,14 @@ lbl = mkForeignLabel fn Nothing ForeignLabelInExternalPackage IsFunction tsanStore :: Env- -> AlignmentSpec -> CmmType -> CmmExpr+ -> CmmType -> CmmExpr -> Block CmmNode O O-tsanStore env align ty addr =+tsanStore env ty addr = mkUnsafeCall env ftarget [] [addr] where ftarget = tsanTarget fn [] [AddrHint] w = widthInBytes (typeWidth ty)- fn = case align of- Unaligned- | w > 1 -> fsLit $ "__tsan_unaligned_write" ++ show w- _ -> fsLit $ "__tsan_write" ++ show w+ fn = fsLit $ "__tsan_write" ++ show w tsanLoad :: Env -> AlignmentSpec -> CmmType -> CmmExpr
GHC/Cmm/Type.hs view
@@ -3,7 +3,8 @@ , b8, b16, b32, b64, b128, b256, b512, f32, f64, bWord, bHalfWord, gcWord , cInt , cmmBits, cmmFloat- , typeWidth, cmmEqType, cmmEqType_ignoring_ptrhood+ , typeWidth, setCmmTypeWidth+ , cmmEqType, cmmEqType_ignoring_ptrhood , isFloatType, isGcPtrType, isBitsType , isWordAny, isWord32, isWord64 , isFloat64, isFloat32@@ -105,6 +106,9 @@ --- Simple operations on CmmType ----- typeWidth :: CmmType -> Width typeWidth (CmmType _ w) = w++setCmmTypeWidth :: Width -> CmmType -> CmmType+setCmmTypeWidth w (CmmType c _) = CmmType c w cmmBits, cmmFloat :: Width -> CmmType cmmBits = CmmType BitsCat
GHC/Cmm/Utils.hs view
@@ -50,7 +50,7 @@ cmmConstrTag1, mAX_PTR_TAG, tAG_MASK, -- Overlap and usage- regsOverlap, regUsedIn,+ regsOverlap, globalRegsOverlap, regUsedIn, globalRegUsedIn, -- Liveness and bitmaps mkLiveness,@@ -98,8 +98,7 @@ primRepCmmType :: Platform -> PrimRep -> CmmType primRepCmmType platform = \case VoidRep -> panic "primRepCmmType:VoidRep"- LiftedRep -> gcWord platform- UnliftedRep -> gcWord platform+ BoxedRep _ -> gcWord platform IntRep -> bWord platform WordRep -> bWord platform Int8Rep -> b8@@ -142,8 +141,7 @@ primRepForeignHint :: PrimRep -> ForeignHint primRepForeignHint VoidRep = panic "primRepForeignHint:VoidRep"-primRepForeignHint LiftedRep = AddrHint-primRepForeignHint UnliftedRep = AddrHint+primRepForeignHint (BoxedRep _) = AddrHint primRepForeignHint IntRep = SignedHint primRepForeignHint Int8Rep = SignedHint primRepForeignHint Int16Rep = SignedHint@@ -437,13 +435,19 @@ -- other. This includes the case that the two registers are the same -- STG register. See Note [Overlapping global registers] for details. regsOverlap :: Platform -> CmmReg -> CmmReg -> Bool-regsOverlap platform (CmmGlobal g) (CmmGlobal g')- | Just real <- globalRegMaybe platform g,- Just real' <- globalRegMaybe platform g',- real == real'- = True+regsOverlap platform (CmmGlobal (GlobalRegUse g1 _)) (CmmGlobal (GlobalRegUse g2 _))+ = globalRegsOverlap platform g1 g2 regsOverlap _ reg reg' = reg == reg' +globalRegsOverlap :: Platform -> GlobalReg -> GlobalReg -> Bool+globalRegsOverlap platform g1 g2+ | Just real <- globalRegMaybe platform g1+ , Just real' <- globalRegMaybe platform g2+ , real == real'+ = True+ | otherwise+ = g1 == g2+ -- | Returns True if the STG register is used by the expression, in -- the sense that a store to the register might affect the value of -- the expression.@@ -461,6 +465,27 @@ reg `regUsedIn_` CmmMachOp _ es = any (reg `regUsedIn_`) es _ `regUsedIn_` CmmStackSlot _ _ = False +globalRegUsedIn :: Platform -> GlobalReg -> CmmExpr -> Bool+globalRegUsedIn platform = globalRegUsedIn_ where+ _ `globalRegUsedIn_` CmmLit _+ = False+ reg `globalRegUsedIn_` CmmLoad e _ _+ = reg `globalRegUsedIn_` e+ reg `globalRegUsedIn_` CmmReg reg'+ | CmmGlobal (GlobalRegUse reg' _) <- reg'+ = globalRegsOverlap platform reg reg'+ | otherwise+ = False+ reg `globalRegUsedIn_` CmmRegOff reg' _+ | CmmGlobal (GlobalRegUse reg' _) <- reg'+ = globalRegsOverlap platform reg reg'+ | otherwise+ = False+ reg `globalRegUsedIn_` CmmMachOp _ es+ = any (reg `globalRegUsedIn_`) es+ _ `globalRegUsedIn_` CmmStackSlot _ _+ = False+ -------------------------------------------- -- -- mkLiveness@@ -571,12 +596,12 @@ -- 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+ spLimExpr, hpLimExpr, cccsExpr :: Platform -> CmmExpr+baseExpr p = CmmReg $ baseReg p+spExpr p = CmmReg $ spReg p+spLimExpr p = CmmReg $ spLimReg p+hpExpr p = CmmReg $ hpReg p+hpLimExpr p = CmmReg $ hpLimReg p+currentTSOExpr p = CmmReg $ currentTSOReg p+currentNurseryExpr p = CmmReg $ currentNurseryReg p+cccsExpr p = CmmReg $ cccsReg p
GHC/CmmToAsm.hs view
@@ -119,7 +119,7 @@ import GHC.Types.Unique.FM import GHC.Types.Unique.Supply-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Ppr import GHC.Utils.Misc import GHC.Utils.Logger@@ -1127,15 +1127,15 @@ -- On powerpc (non-PIC), it's easier to jump directly to a label than -- to use the register table, so we replace these registers -- with the corresponding labels:- CmmReg (CmmGlobal EagerBlackholeInfo)+ CmmReg (CmmGlobal (GlobalRegUse EagerBlackholeInfo _)) | arch == ArchPPC && not (ncgPIC config) -> cmmExprNative referenceKind $ CmmLit (CmmLabel (mkCmmCodeLabel rtsUnitId (fsLit "__stg_EAGER_BLACKHOLE_info")))- CmmReg (CmmGlobal GCEnter1)+ CmmReg (CmmGlobal (GlobalRegUse GCEnter1 _)) | arch == ArchPPC && not (ncgPIC config) -> cmmExprNative referenceKind $ CmmLit (CmmLabel (mkCmmCodeLabel rtsUnitId (fsLit "__stg_gc_enter_1")))- CmmReg (CmmGlobal GCFun)+ CmmReg (CmmGlobal (GlobalRegUse GCFun _)) | arch == ArchPPC && not (ncgPIC config) -> cmmExprNative referenceKind $ CmmLit (CmmLabel (mkCmmCodeLabel rtsUnitId (fsLit "__stg_gc_fun")))
GHC/CmmToAsm/AArch64.hs view
@@ -47,7 +47,6 @@ patchRegsOfInstr = AArch64.patchRegsOfInstr isJumpishInstr = AArch64.isJumpishInstr jumpDestsOfInstr = AArch64.jumpDestsOfInstr- canFallthroughTo = AArch64.canFallthroughTo patchJumpInstr = AArch64.patchJumpInstr mkSpillInstr = AArch64.mkSpillInstr mkLoadInstr = AArch64.mkLoadInstr
GHC/CmmToAsm/AArch64/CodeGen.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE BinaryLiterals #-} {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE NumericUnderscores #-} module GHC.CmmToAsm.AArch64.CodeGen ( cmmTopCodeGen , generateJumpTableForInstr@@ -150,10 +151,10 @@ -- Generate location directive dbg <- getDebugBlock (entryLabel block) loc_instrs <- case dblSourceTick =<< dbg of- Just (SourceNote span name)+ Just (SourceNote span (LexicalFastString name)) -> do fileId <- getFileId (srcSpanFile span) let line = srcSpanStartLine span; col = srcSpanStartCol span- return $ unitOL $ LOCATION fileId line col name+ return $ unitOL $ LOCATION fileId line col (unpackFS name) _ -> return nilOL (mid_instrs,mid_bid) <- stmtsToInstrs id stmts (!tail_instrs,_) <- stmtToInstrs mid_bid tail@@ -297,7 +298,7 @@ CmmAssign reg src | isFloatType ty -> assignReg_FltCode format reg src | otherwise -> assignReg_IntCode format reg src- where ty = cmmRegType platform reg+ where ty = cmmRegType reg format = cmmTypeFormat ty CmmStore addr src _alignment@@ -350,10 +351,10 @@ getRegisterReg _ (CmmLocal (LocalReg u pk)) = RegVirtual $ mkVirtualReg u (cmmTypeFormat pk) -getRegisterReg platform (CmmGlobal mid)+getRegisterReg platform (CmmGlobal reg@(GlobalRegUse mid _)) = case globalRegMaybe platform mid of Just reg -> RegReal reg- Nothing -> pprPanic "getRegisterReg-memory" (ppr $ CmmGlobal mid)+ Nothing -> pprPanic "getRegisterReg-memory" (ppr $ CmmGlobal reg) -- By this stage, the only MagicIds remaining should be the -- ones which map to a real machine register on this -- platform. Hence if it's not mapped to a registers something@@ -497,7 +498,7 @@ -- Generic case. getRegister' config plat expr = case expr of- CmmReg (CmmGlobal PicBaseReg)+ CmmReg (CmmGlobal (GlobalRegUse PicBaseReg _)) -> pprPanic "getRegisterReg-memory" (ppr $ PicBaseReg) CmmLit lit -> case lit of@@ -615,19 +616,19 @@ CmmStackSlot _ _ -> pprPanic "getRegister' (CmmStackSlot): " (pdoc plat expr) CmmReg reg- -> return (Fixed (cmmTypeFormat (cmmRegType plat reg))+ -> return (Fixed (cmmTypeFormat (cmmRegType reg)) (getRegisterReg plat reg) nilOL) CmmRegOff reg off | isNbitEncodeable 12 (fromIntegral off) -> do getRegister' config plat $ CmmMachOp (MO_Add width) [CmmReg reg, CmmLit (CmmInt (fromIntegral off) width)]- where width = typeWidth (cmmRegType plat reg)+ where width = typeWidth (cmmRegType reg) CmmRegOff reg off -> do (off_r, _off_format, off_code) <- getSomeReg $ CmmLit (CmmInt (fromIntegral off) width) (reg, _format, code) <- getSomeReg $ CmmReg reg return $ Any (intFormat width) (\dst -> off_code `appOL` code `snocOL` ADD (OpReg width dst) (OpReg width reg) (OpReg width off_r))- where width = typeWidth (cmmRegType plat reg)+ where width = typeWidth (cmmRegType reg) @@ -708,14 +709,14 @@ , w == W32 || w == W64 -- Work around #23749 -> return $ Any (intFormat w) (\d -> unitOL $ annExpr expr (ADD (OpReg w d) (OpReg w' r') (OpImm (ImmInteger n)))) -- TODO: 12bits lsl #12; e.g. lower 12 bits of n are 0; shift n >> 12, and set lsl to #12.- where w' = formatToWidth (cmmTypeFormat (cmmRegType plat reg))+ where w' = formatToWidth (cmmTypeFormat (cmmRegType reg)) r' = getRegisterReg plat reg CmmMachOp (MO_Sub w) [(CmmReg reg), CmmLit (CmmInt n _)] | n > 0 && n < 4096 , w == W32 || w == W64 -- Work around #23749 -> return $ Any (intFormat w) (\d -> unitOL $ annExpr expr (SUB (OpReg w d) (OpReg w' r') (OpImm (ImmInteger n)))) -- TODO: 12bits lsl #12; e.g. lower 12 bits of n are 0; shift n >> 12, and set lsl to #12.- where w' = formatToWidth (cmmTypeFormat (cmmRegType plat reg))+ where w' = formatToWidth (cmmTypeFormat (cmmRegType reg)) r' = getRegisterReg plat reg CmmMachOp (MO_U_Quot w) [x, y] | w == W8 -> do@@ -787,15 +788,15 @@ -- 3. Logic &&, || CmmMachOp (MO_And w) [(CmmReg reg), CmmLit (CmmInt n _)] | isAArch64Bitmask (fromIntegral n) -> return $ Any (intFormat w) (\d -> unitOL $ annExpr expr (AND (OpReg w d) (OpReg w' r') (OpImm (ImmInteger n))))- where w' = formatToWidth (cmmTypeFormat (cmmRegType plat reg))+ where w' = formatToWidth (cmmTypeFormat (cmmRegType reg)) r' = getRegisterReg plat reg CmmMachOp (MO_Or w) [(CmmReg reg), CmmLit (CmmInt n _)] | isAArch64Bitmask (fromIntegral n) -> return $ Any (intFormat w) (\d -> unitOL $ annExpr expr (ORR (OpReg w d) (OpReg w' r') (OpImm (ImmInteger n))))- where w' = formatToWidth (cmmTypeFormat (cmmRegType plat reg))+ where w' = formatToWidth (cmmTypeFormat (cmmRegType reg)) r' = getRegisterReg plat reg - -- Generic case.+ -- Generic binary case. CmmMachOp op [x, y] -> do -- alright, so we have an operation, and two expressions. And we want to essentially do -- ensure we get float regs (TODO(Ben): What?)@@ -968,7 +969,44 @@ -- TODO - op -> pprPanic "getRegister' (unhandled dyadic CmmMachOp): " $ (pprMachOp op) <+> text "in" <+> (pdoc plat expr)+ op -> pprPanic "getRegister' (unhandled dyadic CmmMachOp): " $+ (pprMachOp op) <+> text "in" <+> (pdoc plat expr)++ -- Generic ternary case.+ CmmMachOp op [x, y, z] ->++ case op of++ -- Floating-point fused multiply-add operations++ -- x86 fmadd x * y + z <=> AArch64 fmadd : d = r1 * r2 + r3+ -- x86 fmsub x * y - z <=> AArch64 fnmsub: d = r1 * r2 - r3+ -- x86 fnmadd - x * y + z <=> AArch64 fmsub : d = - r1 * r2 + r3+ -- x86 fnmsub - x * y - z <=> AArch64 fnmadd: d = - r1 * r2 - r3++ MO_FMA var w -> case var of+ FMAdd -> float3Op w (\d n m a -> unitOL $ FMA FMAdd d n m a)+ FMSub -> float3Op w (\d n m a -> unitOL $ FMA FNMSub d n m a)+ FNMAdd -> float3Op w (\d n m a -> unitOL $ FMA FMSub d n m a)+ FNMSub -> float3Op w (\d n m a -> unitOL $ FMA FNMAdd d n m a)++ _ -> pprPanic "getRegister' (unhandled ternary CmmMachOp): " $+ (pprMachOp op) <+> text "in" <+> (pdoc plat expr)++ where+ float3Op w op = do+ (reg_fx, format_x, code_fx) <- getFloatReg x+ (reg_fy, format_y, code_fy) <- getFloatReg y+ (reg_fz, format_z, code_fz) <- getFloatReg z+ massertPpr (isFloatFormat format_x && isFloatFormat format_y && isFloatFormat format_z) $+ text "float3Op: non-float"+ return $+ Any (floatFormat w) $ \ dst ->+ code_fx `appOL`+ code_fy `appOL`+ code_fz `appOL`+ op (OpReg w dst) (OpReg w reg_fx) (OpReg w reg_fy) (OpReg w reg_fz)+ CmmMachOp _op _xs -> pprPanic "getRegister' (variadic CmmMachOp): " (pdoc plat expr) @@ -1795,9 +1833,9 @@ readResults (gpReg:gpRegs) (fpReg:fpRegs) (dst:dsts) accumRegs accumCode = do -- gp/fp reg -> dst platform <- getPlatform- let rep = cmmRegType platform (CmmLocal dst)+ let rep = cmmRegType (CmmLocal dst) format = cmmTypeFormat rep- w = cmmRegWidth platform (CmmLocal dst)+ w = cmmRegWidth (CmmLocal dst) r_dst = getRegisterReg platform (CmmLocal dst) if isFloatFormat format then readResults (gpReg:gpRegs) fpRegs dsts (fpReg:accumRegs) (accumCode `snocOL` MOV (OpReg w r_dst) (OpReg w fpReg))
GHC/CmmToAsm/AArch64/Instr.hs view
@@ -32,9 +32,9 @@ import GHC.Stack --- | TODO: verify this!-stackFrameHeaderSize :: Platform -> Int-stackFrameHeaderSize _ = 64+-- | LR and FP (8 byte each) are the prologue of each stack frame+stackFrameHeaderSize :: Int+stackFrameHeaderSize = 2 * 8 -- | All registers are 8 byte wide. spillSlotSize :: Int@@ -49,14 +49,13 @@ maxSpillSlots :: NCGConfig -> Int maxSpillSlots config -- = 0 -- set to zero, to see when allocMoreStack has to fire.- = let platform = ncgPlatform config- in ((ncgSpillPreallocSize config - stackFrameHeaderSize platform)+ = ((ncgSpillPreallocSize config - stackFrameHeaderSize) `div` spillSlotSize) - 1 -- | Convert a spill slot number to a *byte* offset, with no sign. spillSlotToOffset :: NCGConfig -> Int -> Int-spillSlotToOffset config slot- = stackFrameHeaderSize (ncgPlatform config) + spillSlotSize * slot+spillSlotToOffset _ slot+ = stackFrameHeaderSize + spillSlotSize * slot -- | Get the registers that are being used by this instruction. -- regUsage doesn't need to do any trickery for jumps and such.@@ -143,6 +142,8 @@ SCVTF dst src -> usage (regOp src, regOp dst) FCVTZS dst src -> usage (regOp src, regOp dst) FABS dst src -> usage (regOp src, regOp dst)+ FMA _ dst src1 src2 src3 ->+ usage (regOp src1 ++ regOp src2 ++ regOp src3, regOp dst) _ -> panic $ "regUsageOfInstr: " ++ instrCon instr @@ -175,8 +176,6 @@ interesting _ (RegReal (RealRegSingle (-1))) = False interesting platform (RegReal (RealRegSingle i)) = freeReg platform i --- Note [AArch64 Register assignments]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Save caller save registers -- This is x0-x18 --@@ -199,8 +198,6 @@ -- '---------------------------------------------------------------------------------------------------------------------------------------------------------------' -- IR: Indirect result location register, IP: Intra-procedure register, PL: Platform register, FP: Frame pointer, LR: Link register, SP: Stack pointer -- BR: Base, SL: SpLim------ TODO: The zero register is currently mapped to -1 but should get it's own separate number. callerSavedRegisters :: [Reg] callerSavedRegisters = map regSingle [0..18]@@ -285,6 +282,9 @@ SCVTF o1 o2 -> SCVTF (patchOp o1) (patchOp o2) FCVTZS o1 o2 -> FCVTZS (patchOp o1) (patchOp o2) FABS o1 o2 -> FABS (patchOp o1) (patchOp o2)+ FMA s o1 o2 o3 o4 ->+ FMA s (patchOp o1) (patchOp o2) (patchOp o3) (patchOp o4)+ _ -> panic $ "patchRegsOfInstr: " ++ instrCon instr where patchOp :: Operand -> Operand@@ -328,12 +328,6 @@ jumpDestsOfInstr (BCOND _ t) = [ id | TBlock id <- [t]] jumpDestsOfInstr _ = [] -canFallthroughTo :: Instr -> BlockId -> Bool-canFallthroughTo (ANN _ i) bid = canFallthroughTo i bid-canFallthroughTo (J (TBlock target)) bid = bid == target-canFallthroughTo (B (TBlock target)) bid = bid == target-canFallthroughTo _ _ = False- -- | Change the destination of this jump instruction. -- Used in the linear allocator when adding fixup blocks for join -- points.@@ -375,13 +369,13 @@ -> [Instr] mkSpillInstr config reg delta slot =- case (spillSlotToOffset config slot) - delta of+ case off - delta of imm | -256 <= imm && imm <= 255 -> [ mkStrSp imm ] imm | imm > 0 && imm .&. 0x7 == 0x0 && imm <= 0xfff -> [ mkStrSp imm ] imm | imm > 0xfff && imm <= 0xffffff && imm .&. 0x7 == 0x0 -> [ mkIp0SpillAddr (imm .&~. 0xfff) , mkStrIp0 (imm .&. 0xfff) ]- imm -> pprPanic "mkSpillInstr" (text "Unable to spill into" <+> int imm)+ imm -> pprPanic "mkSpillInstr" (text "Unable to spill register into" <+> int imm) where a .&~. b = a .&. (complement b) @@ -402,13 +396,13 @@ -> [Instr] mkLoadInstr config reg delta slot =- case (spillSlotToOffset config slot) - delta of+ case off - delta of imm | -256 <= imm && imm <= 255 -> [ mkLdrSp imm ] imm | imm > 0 && imm .&. 0x7 == 0x0 && imm <= 0xfff -> [ mkLdrSp imm ] imm | imm > 0xfff && imm <= 0xffffff && imm .&. 0x7 == 0x0 -> [ mkIp0SpillAddr (imm .&~. 0xfff) , mkLdrIp0 (imm .&. 0xfff) ]- imm -> pprPanic "mkSpillInstr" (text "Unable to spill into" <+> int imm)+ imm -> pprPanic "mkLoadInstr" (text "Unable to load spilled register at" <+> int imm) where a .&~. b = a .&. (complement b) @@ -661,6 +655,14 @@ -- Float ABSolute value | FABS Operand Operand + -- | Floating-point fused multiply-add instructions+ --+ -- - fmadd : d = r1 * r2 + r3+ -- - fnmsub: d = r1 * r2 - r3+ -- - fmsub : d = - r1 * r2 + r3+ -- - fnmadd: d = - r1 * r2 - r3+ | FMA FMASign Operand Operand Operand Operand+ instrCon :: Instr -> String instrCon i = case i of@@ -726,6 +728,12 @@ SCVTF{} -> "SCVTF" FCVTZS{} -> "FCVTZS" FABS{} -> "FABS"+ FMA variant _ _ _ _ ->+ case variant of+ FMAdd -> "FMADD"+ FMSub -> "FMSUB"+ FNMAdd -> "FNMADD"+ FNMSub -> "FNMSUB" data Target = TBlock BlockId
GHC/CmmToAsm/AArch64/Ppr.hs view
@@ -18,7 +18,6 @@ import GHC.Cmm hiding (topInfoTable) import GHC.Cmm.Dataflow.Collections import GHC.Cmm.Dataflow.Label-import GHC.Types.Basic (Alignment, mkAlignment, alignmentBytes) import GHC.Cmm.BlockId import GHC.Cmm.CLabel@@ -29,18 +28,16 @@ import GHC.Utils.Panic -pprProcAlignment :: IsDoc doc => NCGConfig -> doc-pprProcAlignment config = maybe empty (pprAlign platform . mkAlignment) (ncgProcAlignment config)- where- platform = ncgPlatform config- pprNatCmmDecl :: IsDoc doc => NCGConfig -> NatCmmDecl RawCmmStatics Instr -> doc pprNatCmmDecl config (CmmData section dats) =- pprSectionAlign config section $$ pprDatas config dats+ let platform = ncgPlatform config+ in+ pprSectionAlign config section $$ pprDatas platform dats pprNatCmmDecl config proc@(CmmProc top_info lbl _ (ListGraph blocks)) =- let platform = ncgPlatform config in- pprProcAlignment config $$+ let platform = ncgPlatform config+ with_dwarf = ncgDwarfEnabled config+ in case topInfoTable proc of Nothing -> -- special case for code without info table:@@ -48,7 +45,7 @@ -- do not -- pprProcAlignment config $$ pprLabel platform lbl $$ -- blocks guaranteed not null, so label needed- vcat (map (pprBasicBlock config top_info) blocks) $$+ vcat (map (pprBasicBlock platform with_dwarf top_info) blocks) $$ (if ncgDwarfEnabled config then line (pprAsmLabel platform (mkAsmTempEndLabel lbl) <> char ':') else empty) $$ pprSizeDecl platform lbl@@ -59,7 +56,7 @@ (if platformHasSubsectionsViaSymbols platform then line (pprAsmLabel platform (mkDeadStripPreventer info_lbl) <> char ':') else empty) $$- vcat (map (pprBasicBlock config top_info) blocks) $$+ vcat (map (pprBasicBlock platform with_dwarf top_info) blocks) $$ -- above: Even the first block gets a label, because with branch-chain -- elimination, it might be the target of a goto. (if platformHasSubsectionsViaSymbols platform@@ -80,10 +77,6 @@ $$ pprTypeDecl platform lbl $$ line (pprAsmLabel platform lbl <> char ':') -pprAlign :: IsDoc doc => Platform -> Alignment -> doc-pprAlign _platform alignment- = line $ text "\t.balign " <> int (alignmentBytes alignment)- -- | Print appropriate alignment for the given section type. pprAlignForSection :: IsDoc doc => Platform -> SectionType -> doc pprAlignForSection _platform _seg@@ -111,13 +104,13 @@ then line (text "\t.size" <+> pprAsmLabel platform lbl <> text ", .-" <> pprAsmLabel platform lbl) else empty -pprBasicBlock :: IsDoc doc => NCGConfig -> LabelMap RawCmmStatics -> NatBasicBlock Instr+pprBasicBlock :: IsDoc doc => Platform -> {- dwarf enabled -} Bool -> LabelMap RawCmmStatics -> NatBasicBlock Instr -> doc-pprBasicBlock config info_env (BasicBlock blockid instrs)+pprBasicBlock platform with_dwarf info_env (BasicBlock blockid instrs) = maybe_infotable $ pprLabel platform asmLbl $$ vcat (map (pprInstr platform) (id {-detectTrivialDeadlock-} optInstrs)) $$- (if ncgDwarfEnabled config+ (if with_dwarf then line (pprAsmLabel platform (mkAsmTempEndLabel asmLbl) <> char ':') else empty )@@ -128,16 +121,15 @@ f _ = True asmLbl = blockLbl blockid- platform = ncgPlatform config maybe_infotable c = case mapLookup blockid info_env of Nothing -> c Just (CmmStaticsRaw info_lbl info) -> -- pprAlignForSection platform Text $$ infoTableLoc $$- vcat (map (pprData config) info) $$+ vcat (map (pprData platform) info) $$ pprLabel platform info_lbl $$ c $$- (if ncgDwarfEnabled config+ (if with_dwarf then line (pprAsmLabel platform (mkAsmTempEndLabel info_lbl) <> char ':') else empty) -- Make sure the info table has the right .loc for the block@@ -146,34 +138,31 @@ (l@LOCATION{} : _) -> pprInstr platform l _other -> empty -pprDatas :: IsDoc doc => NCGConfig -> RawCmmStatics -> doc+pprDatas :: IsDoc doc => Platform -> RawCmmStatics -> doc -- See Note [emit-time elimination of static indirections] in "GHC.Cmm.CLabel".-pprDatas config (CmmStaticsRaw alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _])+pprDatas platform (CmmStaticsRaw alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _]) | lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing , Just ind' <- labelInd ind , alias `mayRedirectTo` ind'- = pprGloblDecl (ncgPlatform config) alias- $$ line (text ".equiv" <+> pprAsmLabel (ncgPlatform config) alias <> comma <> pprAsmLabel (ncgPlatform config) ind')+ = pprGloblDecl platform alias+ $$ line (text ".equiv" <+> pprAsmLabel platform alias <> comma <> pprAsmLabel platform ind') -pprDatas config (CmmStaticsRaw lbl dats)- = vcat (pprLabel platform lbl : map (pprData config) dats)- where- platform = ncgPlatform config+pprDatas platform (CmmStaticsRaw lbl dats)+ = vcat (pprLabel platform lbl : map (pprData platform) dats) -pprData :: IsDoc doc => NCGConfig -> CmmStatic -> doc-pprData _config (CmmString str) = line (pprString str)-pprData _config (CmmFileEmbed path _) = line (pprFileEmbed path)+pprData :: IsDoc doc => Platform -> CmmStatic -> doc+pprData _platform (CmmString str) = line (pprString str)+pprData _platform (CmmFileEmbed path _) = line (pprFileEmbed path) -pprData config (CmmUninitialised bytes)- = line $ let platform = ncgPlatform config- in if platformOS platform == OSDarwin+pprData platform (CmmUninitialised bytes)+ = line $ if platformOS platform == OSDarwin then text ".space " <> int bytes else text ".skip " <> int bytes -pprData config (CmmStaticLit lit) = pprDataItem config lit+pprData platform (CmmStaticLit lit) = pprDataItem platform lit pprGloblDecl :: IsDoc doc => Platform -> CLabel -> doc pprGloblDecl platform lbl@@ -207,12 +196,10 @@ then line (text ".type " <> pprAsmLabel platform lbl <> text ", " <> pprLabelType' platform lbl) else empty -pprDataItem :: IsDoc doc => NCGConfig -> CmmLit -> doc-pprDataItem config lit+pprDataItem :: IsDoc doc => Platform -> CmmLit -> doc+pprDataItem platform lit = lines_ (ppr_item (cmmTypeFormat $ cmmLitType platform lit) lit) where- platform = ncgPlatform config- imm = litToImm lit ppr_item II8 _ = [text "\t.byte\t" <> pprImm platform imm]@@ -330,7 +317,6 @@ | w == W64 = text "sp" | w == W32 = text "wsp" - -- See Note [AArch64 Register assignments] ppr_reg_no w i | i < 0, w == W32 = text "wzr" | i < 0, w == W64 = text "xzr"@@ -550,6 +536,13 @@ SCVTF o1 o2 -> op2 (text "\tscvtf") o1 o2 FCVTZS o1 o2 -> op2 (text "\tfcvtzs") o1 o2 FABS o1 o2 -> op2 (text "\tfabs") o1 o2+ FMA variant d r1 r2 r3 ->+ let fma = case variant of+ FMAdd -> text "\tfmadd"+ FMSub -> text "\tfmsub"+ FNMAdd -> text "\tfnmadd"+ FNMSub -> text "\tfnmsub"+ in op4 fma d r1 r2 r3 where op2 op o1 o2 = line $ op <+> pprOp platform o1 <> comma <+> pprOp platform o2 op3 op o1 o2 o3 = line $ op <+> pprOp platform o1 <> comma <+> pprOp platform o2 <> comma <+> pprOp platform o3 op4 op o1 o2 o3 o4 = line $ op <+> pprOp platform o1 <> comma <+> pprOp platform o2 <> comma <+> pprOp platform o3 <> comma <+> pprOp platform o4
GHC/CmmToAsm/AArch64/Regs.hs view
@@ -17,7 +17,6 @@ import GHC.Utils.Panic import GHC.Platform --- TODO: Should this include the zero register? allMachRegNos :: [RegNo] allMachRegNos = [0..31] ++ [32..63] -- allocatableRegs is allMachRegNos with the fixed-use regs removed.
GHC/CmmToAsm/BlockLayout.hs view
@@ -14,6 +14,7 @@ where import GHC.Prelude hiding (head, init, last, tail)+import qualified GHC.Prelude as Partial (head, tail) import GHC.Platform @@ -41,7 +42,6 @@ import GHC.Utils.Misc import Data.List (sortOn, sortBy, nub)-import qualified Data.List as Partial (head, tail) import Data.List.NonEmpty (nonEmpty) import qualified Data.List.NonEmpty as NE import Data.Foldable (toList)@@ -777,9 +777,10 @@ dropJumps _ [] = [] dropJumps info (BasicBlock lbl ins:todo) | Just ins <- nonEmpty ins --This can happen because of shortcutting+ , [dest] <- jumpDestsOfInstr (NE.last ins) , BasicBlock nextLbl _ : _ <- todo- , canFallthroughTo (NE.last ins) nextLbl- , not (mapMember nextLbl info)+ , not (mapMember dest info)+ , nextLbl == dest = BasicBlock lbl (NE.init ins) : dropJumps info todo | otherwise = BasicBlock lbl ins : dropJumps info todo
GHC/CmmToAsm/CFG.hs view
@@ -60,16 +60,12 @@ import GHC.Types.Unique import qualified GHC.CmmToAsm.CFG.Dominators as Dom import GHC.CmmToAsm.CFG.Weight-import GHC.Data.Word64Map.Strict (Word64Map)-import GHC.Data.Word64Set (Word64Set) import Data.IntMap.Strict (IntMap) import Data.IntSet (IntSet) import qualified Data.IntMap.Strict as IM-import qualified GHC.Data.Word64Map.Strict as WM import qualified Data.Map as M import qualified Data.IntSet as IS-import qualified GHC.Data.Word64Set as WS import qualified Data.Set as S import Data.Tree import Data.Bifunctor@@ -94,7 +90,6 @@ import Control.Monad import GHC.Data.UnionFind-import Data.Word type Prob = Double @@ -856,7 +851,7 @@ --TODO - This should be a no op: Export constructors? Use unsafeCoerce? ... rooted = ( fromBlockId root- , toWord64Map $ fmap toWord64Set graph) :: (Word64, Word64Map Word64Set)+ , toIntMap $ fmap toIntSet graph) :: (Int, IntMap IntSet) tree = fmap toBlockId $ Dom.domTree rooted :: Tree BlockId -- Map from Nodes to their dominators@@ -903,10 +898,10 @@ loopCount n = length $ nub . map fst . filter (setMember n . snd) $ bodies in map (\n -> (n, loopCount n)) $ nodes :: [(BlockId, Int)] - toWord64Set :: LabelSet -> Word64Set- toWord64Set s = WS.fromList . map fromBlockId . setElems $ s- toWord64Map :: LabelMap a -> Word64Map a- toWord64Map m = WM.fromList $ map (\(x,y) -> (fromBlockId x,y)) $ mapToList m+ toIntSet :: LabelSet -> IntSet+ toIntSet s = IS.fromList . map fromBlockId . setElems $ s+ toIntMap :: LabelMap a -> IntMap a+ toIntMap m = IM.fromList $ map (\(x,y) -> (fromBlockId x,y)) $ mapToList m mkDomMap :: Tree BlockId -> LabelMap LabelSet mkDomMap root = mapFromList $ go setEmpty root@@ -921,10 +916,10 @@ (\n -> go (setInsert (rootLabel n) parents) n) leaves - fromBlockId :: BlockId -> Word64+ fromBlockId :: BlockId -> Int fromBlockId = getKey . getUnique - toBlockId :: Word64 -> BlockId+ toBlockId :: Int -> BlockId toBlockId = mkBlockId . mkUniqueGrimily -- We make the CFG a Hoopl Graph, so we can reuse revPostOrder.
GHC/CmmToAsm/CFG/Dominators.hs view
@@ -21,8 +21,8 @@ /Advanced Compiler Design and Implementation/, 1997. \[3\] Brisk, Sarrafzadeh,- /Interference CGraphs for Procedures in Static Single/- /Information Form are Interval CGraphs/, 2007.+ /Interference Graphs for Procedures in Static Single/+ /Information Form are Interval Graphs/, 2007. * Strictness @@ -40,7 +40,7 @@ ,pddfs,rpddfs ,fromAdj,fromEdges ,toAdj,toEdges- ,asTree,asCGraph+ ,asTree,asGraph ,parents,ancestors ) where @@ -61,23 +61,14 @@ import Data.Array.Base (unsafeNewArray_ ,unsafeWrite,unsafeRead)-import GHC.Data.Word64Set (Word64Set)-import qualified GHC.Data.Word64Set as WS-import GHC.Data.Word64Map (Word64Map)-import qualified GHC.Data.Word64Map as WM-import Data.Word ----------------------------------------------------------------------------- --- Compacted nodes; these can be stored in contiguous arrays-type CNode = Int-type CGraph = IntMap IntSet--type Node = Word64-type Path = [Node]-type Edge = (Node, Node)-type Graph = Word64Map Word64Set-type Rooted = (Node, Graph)+type Node = Int+type Path = [Node]+type Edge = (Node,Node)+type Graph = IntMap IntSet+type Rooted = (Node, Graph) ----------------------------------------------------------------------------- @@ -120,7 +111,7 @@ -- | /Immediate post-dominators/. -- Complexity as for @idom@. ipdom :: Rooted -> [(Node,Node)]-ipdom rg = runST (evalS idomM =<< initEnv (pruneReach (second predGW rg)))+ipdom rg = runST (evalS idomM =<< initEnv (pruneReach (second predG rg))) ----------------------------------------------------------------------------- @@ -135,24 +126,24 @@ ----------------------------------------------------------------------------- type Dom s a = S s (Env s) a-type NodeSet = Word64Set-type NodeMap a = Word64Map a+type NodeSet = IntSet+type NodeMap a = IntMap a data Env s = Env- {succE :: !CGraph- ,predE :: !CGraph- ,bucketE :: !CGraph+ {succE :: !Graph+ ,predE :: !Graph+ ,bucketE :: !Graph ,dfsE :: {-# UNPACK #-}!Int- ,zeroE :: {-# UNPACK #-}!CNode- ,rootE :: {-# UNPACK #-}!CNode- ,labelE :: {-# UNPACK #-}!(Arr s CNode)- ,parentE :: {-# UNPACK #-}!(Arr s CNode)- ,ancestorE :: {-# UNPACK #-}!(Arr s CNode)- ,childE :: {-# UNPACK #-}!(Arr s CNode)- ,ndfsE :: {-# UNPACK #-}!(Arr s CNode)+ ,zeroE :: {-# UNPACK #-}!Node+ ,rootE :: {-# UNPACK #-}!Node+ ,labelE :: {-# UNPACK #-}!(Arr s Node)+ ,parentE :: {-# UNPACK #-}!(Arr s Node)+ ,ancestorE :: {-# UNPACK #-}!(Arr s Node)+ ,childE :: {-# UNPACK #-}!(Arr s Node)+ ,ndfsE :: {-# UNPACK #-}!(Arr s Node) ,dfnE :: {-# UNPACK #-}!(Arr s Int) ,sdnoE :: {-# UNPACK #-}!(Arr s Int) ,sizeE :: {-# UNPACK #-}!(Arr s Int)- ,domE :: {-# UNPACK #-}!(Arr s CNode)+ ,domE :: {-# UNPACK #-}!(Arr s Node) ,rnE :: {-# UNPACK #-}!(Arr s Node)} -----------------------------------------------------------------------------@@ -197,7 +188,7 @@ ----------------------------------------------------------------------------- -eval :: CNode -> Dom s CNode+eval :: Node -> Dom s Node eval v = do n0 <- zeroM a <- ancestorM v@@ -214,7 +205,7 @@ True-> return l False-> return la -compress :: CNode -> Dom s ()+compress :: Node -> Dom s () compress v = do n0 <- zeroM a <- ancestorM v@@ -233,7 +224,7 @@ ----------------------------------------------------------------------------- -link :: CNode -> CNode -> Dom s ()+link :: Node -> Node -> Dom s () link v w = do n0 <- zeroM lw <- labelM w@@ -277,7 +268,7 @@ ----------------------------------------------------------------------------- -dfsDom :: CNode -> Dom s ()+dfsDom :: Node -> Dom s () dfsDom i = do _ <- go i n0 <- zeroM@@ -302,10 +293,10 @@ initEnv :: Rooted -> ST s (Env s) initEnv (r0,g0) = do- -- CGraph renumbered to indices from 1 to |V|+ -- Graph renumbered to indices from 1 to |V| let (g,rnmap) = renum 1 g0 pred = predG g -- reverse graph- root = rnmap WM.! r0 -- renamed root+ root = rnmap IM.! r0 -- renamed root n = IM.size g ns = [0..n] m = n+1@@ -313,9 +304,9 @@ let bucket = IM.fromList (zip ns (repeat mempty)) - rna <- newW m+ rna <- newI m writes rna (fmap swap- (WM.toList rnmap))+ (IM.toList rnmap)) doms <- newI m sdno <- newI m@@ -370,33 +361,33 @@ ----------------------------------------------------------------------------- -zeroM :: Dom s CNode+zeroM :: Dom s Node zeroM = gets zeroE-domM :: CNode -> Dom s CNode+domM :: Node -> Dom s Node domM = fetch domE-rootM :: Dom s CNode+rootM :: Dom s Node rootM = gets rootE-succsM :: CNode -> Dom s [CNode]+succsM :: Node -> Dom s [Node] succsM i = gets (IS.toList . (! i) . succE)-predsM :: CNode -> Dom s [CNode]+predsM :: Node -> Dom s [Node] predsM i = gets (IS.toList . (! i) . predE)-bucketM :: CNode -> Dom s [CNode]+bucketM :: Node -> Dom s [Node] bucketM i = gets (IS.toList . (! i) . bucketE)-sizeM :: CNode -> Dom s Int+sizeM :: Node -> Dom s Int sizeM = fetch sizeE-sdnoM :: CNode -> Dom s Int+sdnoM :: Node -> Dom s Int sdnoM = fetch sdnoE--- dfnM :: CNode -> Dom s Int+-- dfnM :: Node -> Dom s Int -- dfnM = fetch dfnE-ndfsM :: Int -> Dom s CNode+ndfsM :: Int -> Dom s Node ndfsM = fetch ndfsE-childM :: CNode -> Dom s CNode+childM :: Node -> Dom s Node childM = fetch childE-ancestorM :: CNode -> Dom s CNode+ancestorM :: Node -> Dom s Node ancestorM = fetch ancestorE-parentM :: CNode -> Dom s CNode+parentM :: Node -> Dom s Node parentM = fetch parentE-labelM :: CNode -> Dom s CNode+labelM :: Node -> Dom s Node labelM = fetch labelE nextM :: Dom s Int nextM = do@@ -431,9 +422,6 @@ newI :: Int -> ST s (Arr s Int) newI = new -newW :: Int -> ST s (Arr s Node)-newW = new- writes :: (MArray (A s) a (ST s)) => Arr s a -> [(Int,a)] -> ST s () writes a xs = forM_ xs (\(i,x) -> (a.=x) i)@@ -443,18 +431,18 @@ (!) g n = maybe mempty id (IM.lookup n g) fromAdj :: [(Node, [Node])] -> Graph-fromAdj = WM.fromList . fmap (second WS.fromList)+fromAdj = IM.fromList . fmap (second IS.fromList) fromEdges :: [Edge] -> Graph-fromEdges = collectW WS.union fst (WS.singleton . snd)+fromEdges = collectI IS.union fst (IS.singleton . snd) toAdj :: Graph -> [(Node, [Node])]-toAdj = fmap (second WS.toList) . WM.toList+toAdj = fmap (second IS.toList) . IM.toList toEdges :: Graph -> [Edge] toEdges = concatMap (uncurry (fmap . (,))) . toAdj -predG :: CGraph -> CGraph+predG :: Graph -> Graph predG g = IM.unionWith IS.union (go g) g0 where g0 = fmap (const mempty) g go = flip IM.foldrWithKey mempty (\i a m ->@@ -463,24 +451,15 @@ m (IS.toList a)) -predGW :: Graph -> Graph-predGW g = WM.unionWith WS.union (go g) g0- where g0 = fmap (const mempty) g- go = flip WM.foldrWithKey mempty (\i a m ->- foldl' (\m p -> WM.insertWith mappend p- (WS.singleton i) m)- m- (WS.toList a))- pruneReach :: Rooted -> Rooted pruneReach (r,g) = (r,g2) where is = reachable (maybe mempty id- . flip WM.lookup g) $ r- g2 = WM.fromList- . fmap (second (WS.filter (`WS.member`is)))- . filter ((`WS.member`is) . fst)- . WM.toList $ g+ . flip IM.lookup g) $ r+ g2 = IM.fromList+ . fmap (second (IS.filter (`IS.member`is)))+ . filter ((`IS.member`is) . fst)+ . IM.toList $ g tip :: Tree a -> (a, [Tree a]) tip (Node a ts) = (a, ts)@@ -497,28 +476,26 @@ in p acc' xs ++ concatMap (go acc') xs p is = fmap (flip (,) is . rootLabel) -asCGraph :: Tree Node -> Rooted-asCGraph t@(Node a _) = let g = go t in (a, fromAdj g)+asGraph :: Tree Node -> Rooted+asGraph t@(Node a _) = let g = go t in (a, fromAdj g) where go (Node a ts) = let as = (fst . unzip . fmap tip) ts in (a, as) : concatMap go ts asTree :: Rooted -> Tree Node-asTree (r,g) = let go a = Node a (fmap go ((WS.toList . f) a))+asTree (r,g) = let go a = Node a (fmap go ((IS.toList . f) a)) f = (g !) in go r- where (!) g n = maybe mempty id (WM.lookup n g) - reachable :: (Node -> NodeSet) -> (Node -> NodeSet)-reachable f a = go (WS.singleton a) a+reachable f a = go (IS.singleton a) a where go seen a = let s = f a- as = WS.toList (s `WS.difference` seen)- in foldl' go (s `WS.union` seen) as+ as = IS.toList (s `IS.difference` seen)+ in foldl' go (s `IS.union` seen) as -collectW :: (c -> c -> c)- -> (a -> Node) -> (a -> c) -> [a] -> Word64Map c-collectW (<>) f g- = foldl' (\m a -> WM.insertWith (<>)+collectI :: (c -> c -> c)+ -> (a -> Int) -> (a -> c) -> [a] -> IntMap c+collectI (<>) f g+ = foldl' (\m a -> IM.insertWith (<>) (f a) (g a) m) mempty @@ -527,12 +504,12 @@ -- Gives nodes sequential names starting at n. -- Returns the new graph and a mapping. -- (renamed, old -> new)-renum :: Int -> Graph -> (CGraph, NodeMap CNode)+renum :: Int -> Graph -> (Graph, NodeMap Node) renum from = (\(_,m,g)->(g,m))- . WM.foldrWithKey+ . IM.foldrWithKey (\i ss (!n,!env,!new)-> let (j,n2,env2) = go n env i- (n3,env3,ss2) = WS.fold+ (n3,env3,ss2) = IS.fold (\k (!n,!env,!new)-> case go n env k of (l,n2,env2)-> (n2,env2,l `IS.insert` new))@@ -540,13 +517,13 @@ new2 = IM.insertWith IS.union j ss2 new in (n3,env3,new2)) (from,mempty,mempty) where go :: Int- -> NodeMap CNode+ -> NodeMap Node -> Node- -> (CNode,Int,NodeMap CNode)+ -> (Node,Int,NodeMap Node) go !n !env i =- case WM.lookup i env of+ case IM.lookup i env of Just j -> (j,n,env)- Nothing -> (n,n+1,WM.insert i n env)+ Nothing -> (n,n+1,IM.insert i n env) -----------------------------------------------------------------------------
GHC/CmmToAsm/Dwarf.hs view
@@ -5,7 +5,8 @@ import GHC.Prelude import GHC.Cmm.CLabel-import GHC.Cmm.Expr ( GlobalReg(..) )+import GHC.Cmm.Expr+import GHC.Data.FastString import GHC.Settings.Config ( cProjectName, cProjectVersion ) import GHC.Types.Tickish ( CmmTickish, GenTickish(..) ) import GHC.Cmm.DebugBlock@@ -82,7 +83,7 @@ (framesU, us'') = takeUniqFromSupply us' frameSct = dwarfFrameSection platform $$ line (dwarfFrameLabel <> colon) $$- pprDwarfFrame platform (debugFrame framesU procs)+ pprDwarfFrame platform (debugFrame platform framesU procs) -- .aranges section: Information about the bounds of compilation units aranges' | ncgSplitSections config = map mkDwarfARange procs@@ -177,7 +178,8 @@ procToDwarf config prc = DwarfSubprogram { dwChildren = map (blockToDwarf config) (dblBlocks prc) , dwName = case dblSourceTick prc of- Just s@SourceNote{} -> sourceName s+ Just s@SourceNote{} -> case sourceName s of+ LexicalFastString s -> unpackFS s _otherwise -> show (dblLabel prc) , dwLabel = dblCLabel prc , dwParent = fmap mkAsmTempDieLabel@@ -215,15 +217,15 @@ -- | Generates the data for the debug frame section, which encodes the -- desired stack unwind behaviour for the debugger-debugFrame :: Unique -> [DebugBlock] -> DwarfFrame-debugFrame u procs+debugFrame :: Platform -> Unique -> [DebugBlock] -> DwarfFrame+debugFrame p u procs = DwarfFrame { dwCieLabel = mkAsmTempLabel u , dwCieInit = initUws , dwCieProcs = map (procToFrame initUws) procs } where initUws :: UnwindTable- initUws = Map.fromList [(Sp, Just (UwReg Sp 0))]+ initUws = Map.fromList [(Sp, Just (UwReg (GlobalRegUse Sp $ bWord p) 0))] -- | Generates unwind information for a procedure debug block procToFrame :: UnwindTable -> DebugBlock -> DwarfFrameProc
GHC/CmmToAsm/Dwarf/Types.hs view
@@ -31,7 +31,7 @@ import GHC.Cmm.DebugBlock import GHC.Cmm.CLabel-import GHC.Cmm.Expr ( GlobalReg(..) )+import GHC.Cmm.Expr import GHC.Utils.Encoding import GHC.Data.FastString import GHC.Utils.Outputable@@ -469,7 +469,7 @@ = if o' >= 0 then pprByte dW_CFA_def_cfa_offset $$ pprLEBWord (fromIntegral o') else pprByte dW_CFA_def_cfa_offset_sf $$ pprLEBInt o'-pprSetUnwind plat Sp (_, Just (UwReg s' o'))+pprSetUnwind plat Sp (_, Just (UwReg (GlobalRegUse s' _) o')) = if o' >= 0 then pprByte dW_CFA_def_cfa $$ pprLEBRegNo plat s' $$@@ -479,7 +479,7 @@ pprLEBInt o' pprSetUnwind plat Sp (_, Just uw) = pprByte dW_CFA_def_cfa_expression $$ pprUnwindExpr plat False uw-pprSetUnwind plat g (_, Just (UwDeref (UwReg Sp o)))+pprSetUnwind plat g (_, Just (UwDeref (UwReg (GlobalRegUse Sp _) o))) | o < 0 && ((-o) `mod` platformWordSizeInBytes plat) == 0 -- expected case = pprByte (dW_CFA_offset + dwarfGlobalRegNo plat g) $$ pprLEBWord (fromIntegral ((-o) `div` platformWordSizeInBytes plat))@@ -491,7 +491,7 @@ = pprByte dW_CFA_expression $$ pprLEBRegNo plat g $$ pprUnwindExpr plat True uw-pprSetUnwind plat g (_, Just (UwReg g' 0))+pprSetUnwind plat g (_, Just (UwReg (GlobalRegUse g' _) 0)) | g == g' = pprByte dW_CFA_same_value $$ pprLEBRegNo plat g@@ -513,12 +513,14 @@ = let pprE (UwConst i) | i >= 0 && i < 32 = pprByte (dW_OP_lit0 + fromIntegral i) | otherwise = pprByte dW_OP_consts $$ pprLEBInt i -- lazy...- pprE (UwReg Sp i) | spIsCFA- = if i == 0- then pprByte dW_OP_call_frame_cfa- else pprE (UwPlus (UwReg Sp 0) (UwConst i))- pprE (UwReg g i) = pprByte (dW_OP_breg0+dwarfGlobalRegNo platform g) $$- pprLEBInt i+ pprE (UwReg r@(GlobalRegUse Sp _) i)+ | spIsCFA+ = if i == 0+ then pprByte dW_OP_call_frame_cfa+ else pprE (UwPlus (UwReg r 0) (UwConst i))+ pprE (UwReg (GlobalRegUse g _) i)+ = pprByte (dW_OP_breg0+dwarfGlobalRegNo platform g) $$+ pprLEBInt i pprE (UwDeref u) = pprE u $$ pprByte dW_OP_deref pprE (UwLabel l) = pprByte dW_OP_addr $$ pprWord platform (pprAsmLabel platform l) pprE (UwPlus u1 u2) = pprE u1 $$ pprE u2 $$ pprByte dW_OP_plus
GHC/CmmToAsm/Instr.hs view
@@ -71,16 +71,10 @@ :: instr -> Bool - -- | Give the possible *local block* destinations of this jump instruction.+ -- | Give the possible destinations of this jump instruction. -- Must be defined for all jumpish instructions. jumpDestsOfInstr :: instr -> [BlockId]-- -- | Check if the instr always transfers control flow- -- to the given block. Used by code layout to eliminate- -- jumps that can be replaced by fall through.- canFallthroughTo- :: instr -> BlockId -> Bool -- | Change the destination of this jump instruction.
GHC/CmmToAsm/Monad.hs view
@@ -79,15 +79,8 @@ cmmTopCodeGen :: RawCmmDecl -> NatM [NatCmmDecl statics instr], generateJumpTableForInstr :: instr -> Maybe (NatCmmDecl statics instr), getJumpDestBlockId :: jumpDest -> Maybe BlockId,- -- | Does this jump always jump to a single destination and is shortcutable?- --- -- We use this to determine shortcutable instructions - See Note [What is shortcutting]- -- Note that if we return a destination here we *most* support the relevant shortcutting in- -- shortcutStatics for jump tables and shortcutJump for the instructions itself. canShortcut :: instr -> Maybe jumpDest,- -- | Replace references to blockIds with other destinations - used to update jump tables. shortcutStatics :: (BlockId -> Maybe jumpDest) -> statics -> statics,- -- | Change the jump destination(s) of an instruction. shortcutJump :: (BlockId -> Maybe jumpDest) -> instr -> instr, -- | 'Module' is only for printing internal labels. See Note [Internal proc -- labels] in CLabel.@@ -112,25 +105,6 @@ -- ^ Turn the sequence of @jcc l1; jmp l2@ into @jncc l2; \<block_l1>@ -- when possible. }--{- Note [supporting shortcutting]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-For the concept of shortcutting see Note [What is shortcutting].--In order to support shortcutting across multiple backends uniformly we-use canShortcut, shortcutStatics and shortcutJump.--canShortcut tells us if the backend support shortcutting of a instruction-and if so what destination we should retarget instruction to instead.--shortcutStatics exists to allow us to update jump destinations in jump tables.--shortcutJump updates the instructions itself.--A backend can opt out of those by always returning Nothing for canShortcut-and implementing shortcutStatics/shortcutJump as \_ x -> x---} {- Note [pprNatCmmDeclS and pprNatCmmDeclH] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GHC/CmmToAsm/PIC.hs view
@@ -166,7 +166,7 @@ | OSAIX <- platformOS platform = CmmMachOp (MO_Add W32)- [ CmmReg (CmmGlobal PicBaseReg)+ [ CmmReg (CmmGlobal $ GlobalRegUse PicBaseReg (bWord platform)) , CmmLit $ picRelative (wordWidth platform) (platformArch platform) (platformOS platform)@@ -175,7 +175,7 @@ -- both ABI versions default to medium code model | ArchPPC_64 _ <- platformArch platform = CmmMachOp (MO_Add W32) -- code model medium- [ CmmReg (CmmGlobal PicBaseReg)+ [ CmmReg (CmmGlobal $ GlobalRegUse PicBaseReg (bWord platform)) , CmmLit $ picRelative (wordWidth platform) (platformArch platform) (platformOS platform)@@ -184,7 +184,7 @@ | (ncgPIC config || ncgExternalDynamicRefs config) && absoluteLabel lbl = CmmMachOp (MO_Add (wordWidth platform))- [ CmmReg (CmmGlobal PicBaseReg)+ [ CmmReg (CmmGlobal $ GlobalRegUse PicBaseReg (bWord platform)) , CmmLit $ picRelative (wordWidth platform) (platformArch platform) (platformOS platform)
GHC/CmmToAsm/PPC.hs view
@@ -46,7 +46,6 @@ patchRegsOfInstr = PPC.patchRegsOfInstr isJumpishInstr = PPC.isJumpishInstr jumpDestsOfInstr = PPC.jumpDestsOfInstr- canFallthroughTo = PPC.canFallthroughTo patchJumpInstr = PPC.patchJumpInstr mkSpillInstr = PPC.mkSpillInstr mkLoadInstr = PPC.mkLoadInstr
GHC/CmmToAsm/PPC/CodeGen.hs view
@@ -129,10 +129,10 @@ -- Generate location directive dbg <- getDebugBlock (entryLabel block) loc_instrs <- case dblSourceTick =<< dbg of- Just (SourceNote span name)+ Just (SourceNote span (LexicalFastString name)) -> do fileid <- getFileId (srcSpanFile span) let line = srcSpanStartLine span; col =srcSpanStartCol span- return $ unitOL $ LOCATION fileid line col name+ return $ unitOL $ LOCATION fileid line col (unpackFS name) _ -> return nilOL mid_instrs <- stmtsToInstrs stmts tail_instrs <- stmtToInstrs tail@@ -171,7 +171,7 @@ | target32Bit platform && isWord64 ty -> assignReg_I64Code reg src | otherwise -> assignReg_IntCode format reg src- where ty = cmmRegType platform reg+ where ty = cmmRegType reg format = cmmTypeFormat ty CmmStore addr src _alignment@@ -233,7 +233,7 @@ = getLocalRegReg local_reg getRegisterReg platform (CmmGlobal mid)- = case globalRegMaybe platform mid of+ = case globalRegMaybe platform (globalRegUseGlobalReg mid) of Just reg -> RegReal reg Nothing -> pprPanic "getRegisterReg-memory" (ppr $ CmmGlobal mid) -- By this stage, the only MagicIds remaining should be the@@ -253,12 +253,12 @@ -- Expand CmmRegOff. ToDo: should we do it this way around, or convert -- CmmExprs into CmmRegOff?-mangleIndexTree :: Platform -> CmmExpr -> CmmExpr-mangleIndexTree platform (CmmRegOff reg off)+mangleIndexTree :: CmmExpr -> CmmExpr+mangleIndexTree (CmmRegOff reg off) = CmmMachOp (MO_Add width) [CmmReg reg, CmmLit (CmmInt (fromIntegral off) width)]- where width = typeWidth (cmmRegType platform reg)+ where width = typeWidth (cmmRegType reg) -mangleIndexTree _ _+mangleIndexTree _ = panic "PPC.CodeGen.mangleIndexTree: no match" -- -----------------------------------------------------------------------------@@ -404,7 +404,7 @@ getRegister' :: NCGConfig -> Platform -> CmmExpr -> NatM Register -getRegister' _ platform (CmmReg (CmmGlobal PicBaseReg))+getRegister' _ platform (CmmReg (CmmGlobal (GlobalRegUse PicBaseReg _))) | OSAIX <- platformOS platform = do let code dst = toOL [ LD II32 dst tocAddr ] tocAddr = AddrRegImm toc (ImmLit (fsLit "ghc_toc_table[TC]"))@@ -416,11 +416,11 @@ | otherwise = return (Fixed II64 toc nilOL) getRegister' _ platform (CmmReg reg)- = return (Fixed (cmmTypeFormat (cmmRegType platform reg))+ = return (Fixed (cmmTypeFormat (cmmRegType reg)) (getRegisterReg platform reg) nilOL) getRegister' config platform tree@(CmmRegOff _ _)- = getRegister' config platform (mangleIndexTree platform tree)+ = getRegister' config platform (mangleIndexTree tree) -- for 32-bit architectures, support some 64 -> 32 bit conversions: -- TO_W_(x), TO_W_(x >> 32)@@ -649,7 +649,22 @@ code <- remainderCode rep sgn tmp x y return (Any fmt code) +getRegister' _ _ (CmmMachOp mop [x, y, z]) -- ternary PrimOps+ = case mop of + -- x86 fmadd x * y + z <> PPC fmadd rt = ra * rc + rb+ -- x86 fmsub x * y - z <> PPC fmsub rt = ra * rc - rb+ -- x86 fnmadd - x * y + z ~~ PPC fnmsub rt = -(ra * rc - rb)+ -- x86 fnmsub - x * y - z ~~ PPC fnmadd rt = -(ra * rc + rb)++ MO_FMA variant w ->+ case variant of+ FMAdd -> fma_code w (FMADD FMAdd) x y z+ FMSub -> fma_code w (FMADD FMSub) x y z+ FNMAdd -> fma_code w (FMADD FNMAdd) x y z+ FNMSub -> fma_code w (FMADD FNMSub) x y z+ _ -> panic "PPC.CodeGen.getRegister: no match"+ getRegister' _ _ (CmmLit (CmmInt i rep)) | Just imm <- makeImmediate rep True i = let@@ -735,8 +750,7 @@ getAmode :: InstrForm -> CmmExpr -> NatM Amode getAmode inf tree@(CmmRegOff _ _)- = do platform <- getPlatform- getAmode inf (mangleIndexTree platform tree)+ = getAmode inf (mangleIndexTree tree) getAmode _ (CmmMachOp (MO_Sub W32) [x, CmmLit (CmmInt i _)]) | Just off <- makeImmediate W32 True (-i)@@ -1752,7 +1766,7 @@ _ -> panic "genCall': unknown calling conv." argReps = map (cmmExprType platform) args- (_, argHints) = foreignTargetHints target+ (argHints, _) = foreignTargetHints target roundTo a x | x `mod` a == 0 = x | otherwise = x + a - (x `mod` a)@@ -1952,7 +1966,7 @@ -> toOL [MR (getHiVRegFromLo r_dest) r3, MR r_dest r4] | otherwise -> unitOL (MR r_dest r3)- where rep = cmmRegType platform (CmmLocal dest)+ where rep = cmmRegType (CmmLocal dest) r_dest = getLocalRegReg dest _ -> panic "genCCall' moveResult: Bad dest_regs" @@ -2359,10 +2373,28 @@ let code' dst = code `snocOL` instr dst src return (Any rep code') +-- | Generate code for a 4-register FMA instruction,+-- e.g. @fmadd rt ra rc rb := rt <- ra * rc + rb@.+fma_code :: Width+ -> (Format -> Reg -> Reg -> Reg -> Reg -> Instr)+ -> CmmExpr+ -> CmmExpr+ -> CmmExpr+ -> NatM Register+fma_code w instr ra rc rb = do+ let rep = floatFormat w+ (src1, code1) <- getSomeReg ra+ (src2, code2) <- getSomeReg rc+ (src3, code3) <- getSomeReg rb+ let instrCode rt =+ code1 `appOL`+ code2 `appOL`+ code3 `snocOL` instr rep rt src1 src2 src3+ return $ Any rep instrCode+ -- There is no "remainder" instruction on the PPC, so we have to do -- it the hard way. -- The "sgn" parameter is the signedness for the division instruction- remainderCode :: Width -> Bool -> Reg -> CmmExpr -> CmmExpr -> NatM (Reg -> InstrBlock) remainderCode rep sgn reg_q arg_x arg_y = do
GHC/CmmToAsm/PPC/Instr.hs view
@@ -22,7 +22,6 @@ , patchJumpInstr , patchRegsOfInstr , jumpDestsOfInstr- , canFallthroughTo , takeRegRegMoveInstr , takeDeltaInstr , mkRegRegMoveInstr@@ -281,6 +280,14 @@ | FABS Reg Reg -- abs is the same for single and double | FNEG Reg Reg -- negate is the same for single and double prec. + -- | Fused multiply-add instructions.+ --+ -- - FMADD: @rd = (ra * rb) + rd@+ -- - FMSUB: @rd = ra * rb - rd@+ -- - FNMADD: @rd = -(ra * rb + rd)@+ -- - FNMSUB: @rd = -(ra * rb - rd)@+ | FMADD FMASign Format Reg Reg Reg Reg+ | FCMP Reg Reg | FCTIWZ Reg Reg -- convert to integer word@@ -381,6 +388,7 @@ MFCR reg -> usage ([], [reg]) MFLR reg -> usage ([], [reg]) FETCHPC reg -> usage ([], [reg])+ FMADD _ _ rt ra rc rb -> usage ([ra, rc, rb], [rt]) _ -> noUsage where usage (src, dst) = RU (filter (interesting platform) src)@@ -468,6 +476,8 @@ FDIV fmt r1 r2 r3 -> FDIV fmt (env r1) (env r2) (env r3) FABS r1 r2 -> FABS (env r1) (env r2) FNEG r1 r2 -> FNEG (env r1) (env r2)+ FMADD sgn fmt r1 r2 r3 r4+ -> FMADD sgn fmt (env r1) (env r2) (env r3) (env r4) FCMP r1 r2 -> FCMP (env r1) (env r2) FCTIWZ r1 r2 -> FCTIWZ (env r1) (env r2) FCTIDZ r1 r2 -> FCTIDZ (env r1) (env r2)@@ -499,13 +509,6 @@ BL{} -> True JMP{} -> True _ -> False--canFallthroughTo :: Instr -> BlockId -> Bool-canFallthroughTo instr bid- = case instr of- BCC _ target _ -> target == bid- BCCFAR _ target _ -> target == bid- _ -> False -- | Checks whether this instruction is a jump/branch instruction.
GHC/CmmToAsm/PPC/Ppr.hs view
@@ -934,6 +934,9 @@ FNEG reg1 reg2 -> pprUnary (text "fneg") reg1 reg2 + FMADD signs fmt dst ra rc rb+ -> pprTernaryF (pprFMASign signs) fmt dst ra rc rb+ FCMP reg1 reg2 -> line $ hcat [ char '\t',@@ -1081,6 +1084,21 @@ pprReg reg2, text ", ", pprReg reg3+ ]++pprTernaryF :: IsDoc doc => Line doc -> Format -> Reg -> Reg -> Reg -> Reg -> doc+pprTernaryF op fmt rt ra rc rb = line $ hcat [+ char '\t',+ op,+ pprFFormat fmt,+ char '\t',+ pprReg rt,+ text ", ",+ pprReg ra,+ text ", ",+ pprReg rc,+ text ", ",+ pprReg rb ] pprRI :: IsLine doc => Platform -> RI -> doc
GHC/CmmToAsm/Ppr.hs view
@@ -246,10 +246,9 @@ panic "PprBase.pprGNUSectionHeader: unknown section type" flags = case t of Text- | OSMinGW32 <- platformOS platform, splitSections+ | OSMinGW32 <- platformOS platform -> text ",\"xr\""- | splitSections- -> text ",\"ax\"," <> sectionType platform "progbits"+ | otherwise -> text ",\"ax\"," <> sectionType platform "progbits" CString | OSMinGW32 <- platformOS platform -> empty
GHC/CmmToAsm/Reg/Graph/TrivColorable.hs view
@@ -179,8 +179,7 @@ ArchPPC -> 26 ArchPPC_64 _ -> 20 ArchARM _ _ _ -> panic "trivColorable ArchARM"- ArchAArch64 -> 24 -- 32 - F1 .. F4, D1..D4 - it's odd but see Note [AArch64 Register assignments] for our reg use.- -- Seems we reserve different registers for D1..D4 and F1 .. F4 somehow, we should fix this.+ ArchAArch64 -> 32 ArchAlpha -> panic "trivColorable ArchAlpha" ArchMipseb -> panic "trivColorable ArchMipseb" ArchMipsel -> panic "trivColorable ArchMipsel"
GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs view
@@ -199,8 +199,7 @@ (return ()) -} delta <- getDeltaR- fixUpInstrs_ <- mapM (handleComponent delta instr) sccs- let fixUpInstrs = concat fixUpInstrs_+ fixUpInstrs <- concatMapM (handleComponent delta instr) sccs -- make a new basic block containing the fixup code. -- A the end of the current block we will jump to the fixup one,
GHC/CmmToAsm/Reg/Liveness.hs view
@@ -133,11 +133,6 @@ Instr instr -> isJumpishInstr instr _ -> False - canFallthroughTo i bid- = case i of- Instr instr -> canFallthroughTo instr bid- _ -> False- jumpDestsOfInstr i = case i of Instr instr -> jumpDestsOfInstr instr
GHC/CmmToAsm/Wasm/Asm.hs view
@@ -14,7 +14,7 @@ import Data.ByteString.Builder import Data.Coerce import Data.Foldable-import qualified GHC.Data.Word64Set as WS+import qualified Data.IntSet as IS import Data.Maybe import Data.Semigroup import GHC.Cmm@@ -181,9 +181,9 @@ asmTellSectionHeader k = asmTellTabLine $ ".section " <> k <> ",\"\",@" asmTellDataSection ::- WasmTypeTag w -> WS.Word64Set -> SymName -> DataSection -> WasmAsmM ()+ WasmTypeTag w -> IS.IntSet -> SymName -> DataSection -> WasmAsmM () asmTellDataSection ty_word def_syms sym DataSection {..} = do- when (getKey (getUnique sym) `WS.member` def_syms) $ asmTellDefSym sym+ when (getKey (getUnique sym) `IS.member` def_syms) $ asmTellDefSym sym asmTellSectionHeader sec_name asmTellAlign dataSectionAlignment asmTellTabLine asm_size@@ -420,12 +420,12 @@ asmTellFunc :: WasmTypeTag w ->- WS.Word64Set ->+ IS.IntSet -> SymName -> (([SomeWasmType], [SomeWasmType]), FuncBody w) -> WasmAsmM () asmTellFunc ty_word def_syms sym (func_ty, FuncBody {..}) = do- when (getKey (getUnique sym) `WS.member` def_syms) $ asmTellDefSym sym+ when (getKey (getUnique sym) `IS.member` def_syms) $ asmTellDefSym sym asmTellSectionHeader $ ".text." <> asm_sym asmTellLine $ asm_sym <> ":" asmTellFuncType sym func_ty
GHC/CmmToAsm/Wasm/FromCmm.hs view
@@ -26,7 +26,7 @@ import qualified Data.ByteString as BS import Data.Foldable import Data.Functor-import qualified GHC.Data.Word64Set as WS+import qualified Data.IntSet as IS import Data.Semigroup import Data.String import Data.Traversable@@ -48,6 +48,7 @@ import GHC.Types.Unique import GHC.Types.Unique.FM import GHC.Types.Unique.Map+import GHC.Types.Unique.Supply import GHC.Utils.Outputable hiding ((<>)) import GHC.Utils.Panic import GHC.Wasm.ControlFlow.FromCmm@@ -177,7 +178,7 @@ -} globalInfoFromCmmGlobalReg :: WasmTypeTag w -> GlobalReg -> Maybe GlobalInfo globalInfoFromCmmGlobalReg t reg = case reg of- VanillaReg i _+ VanillaReg i | i >= 1 && i <= 10 -> Just (fromString $ "__R" <> show i, ty_word) FloatReg i | i >= 1 && i <= 6 ->@@ -197,7 +198,7 @@ supportedCmmGlobalRegs :: [GlobalReg] supportedCmmGlobalRegs =- [VanillaReg i VGcPtr | i <- [1 .. 10]]+ [VanillaReg i | i <- [1 .. 10]] <> [FloatReg i | i <- [1 .. 6]] <> [DoubleReg i | i <- [1 .. 6]] <> [LongReg i | i <- [1 .. 1]]@@ -815,7 +816,9 @@ lower_CmmMachOp lbl (MO_UU_Conv w0 w1) xs = lower_MO_UU_Conv lbl w0 w1 xs lower_CmmMachOp lbl (MO_XX_Conv w0 w1) xs = lower_MO_UU_Conv lbl w0 w1 xs lower_CmmMachOp lbl (MO_FF_Conv w0 w1) xs = lower_MO_FF_Conv lbl w0 w1 xs-lower_CmmMachOp _ _ _ = panic "lower_CmmMachOp: unreachable"+lower_CmmMachOp _ mop _ =+ pprPanic "lower_CmmMachOp: unreachable" $+ vcat [ text "offending MachOp:" <+> pprMachOp mop ] -- | Lower a 'CmmLit'. Note that we don't emit 'f32.const' or -- 'f64.const' for the time being, and instead emit their relative bit@@ -872,38 +875,35 @@ lower_CmmReg _ (CmmLocal reg) = do (reg_i, SomeWasmType ty) <- onCmmLocalReg reg pure $ SomeWasmExpr ty $ WasmExpr $ WasmLocalGet ty reg_i-lower_CmmReg _ (CmmGlobal EagerBlackholeInfo) = do- ty_word <- wasmWordTypeM- pure $- SomeWasmExpr ty_word $- WasmExpr $- WasmSymConst "__stg_EAGER_BLACKHOLE_info"-lower_CmmReg _ (CmmGlobal GCEnter1) = do- ty_word <- wasmWordTypeM- ty_word_cmm <- wasmWordCmmTypeM- onFuncSym "__stg_gc_enter_1" [] [ty_word_cmm]- pure $ SomeWasmExpr ty_word $ WasmExpr $ WasmSymConst "__stg_gc_enter_1"-lower_CmmReg _ (CmmGlobal GCFun) = do+lower_CmmReg lbl (CmmGlobal (GlobalRegUse greg reg_use_ty)) = do ty_word <- wasmWordTypeM ty_word_cmm <- wasmWordCmmTypeM- onFuncSym "__stg_gc_fun" [] [ty_word_cmm]- pure $ SomeWasmExpr ty_word $ WasmExpr $ WasmSymConst "__stg_gc_fun"-lower_CmmReg lbl (CmmGlobal BaseReg) = do- platform <- wasmPlatformM- lower_CmmExpr lbl $ regTableOffset platform 0-lower_CmmReg lbl (CmmGlobal reg) = do- ty_word <- wasmWordTypeM- if+ case greg of+ EagerBlackholeInfo ->+ pure $+ SomeWasmExpr ty_word $+ WasmExpr $+ WasmSymConst "stg_EAGER_BLACKHOLE_info"+ GCEnter1 -> do+ onFuncSym "__stg_gc_enter_1" [] [ty_word_cmm]+ pure $ SomeWasmExpr ty_word $ WasmExpr $ WasmSymConst "__stg_gc_enter_1"+ GCFun -> do+ onFuncSym "__stg_gc_fun" [] [ty_word_cmm]+ pure $ SomeWasmExpr ty_word $ WasmExpr $ WasmSymConst "__stg_gc_fun"+ BaseReg -> do+ platform <- wasmPlatformM+ lower_CmmExpr lbl $ regTableOffset platform 0+ _other | Just (sym_global, SomeWasmType ty) <-- globalInfoFromCmmGlobalReg ty_word reg ->+ globalInfoFromCmmGlobalReg ty_word greg -> pure $ SomeWasmExpr ty $ WasmExpr $ WasmGlobalGet ty sym_global | otherwise -> do platform <- wasmPlatformM- case someWasmTypeFromCmmType $ globalRegType platform reg of+ case someWasmTypeFromCmmType reg_use_ty of SomeWasmType ty -> do (WasmExpr ptr_instr, o) <- lower_CmmExpr_Ptr lbl $- get_GlobalReg_addr platform reg+ get_GlobalReg_addr platform greg pure $ SomeWasmExpr ty $ WasmExpr $@@ -1331,7 +1331,7 @@ [CmmActual] -> WasmCodeGenM w (WasmStatements w) lower_CmmUnsafeForeignCall_Drop lbl sym_callee ret_cmm_ty arg_exprs = do- ret_uniq <- wasmUniq+ ret_uniq <- getUniqueM let ret_local = LocalReg ret_uniq ret_cmm_ty lower_CmmUnsafeForeignCall lbl@@ -1379,7 +1379,7 @@ (reg_i, SomeWasmType reg_ty) <- onCmmLocalReg reg pure $ SomeWasmPostCCall (reg_ty `TypeListCons` acc_tys) $- case (# ret_hint, cmmRegWidth platform $ CmmLocal reg #) of+ case (# ret_hint, cmmRegWidth $ CmmLocal reg #) of (# SignedHint, W8 #) -> acc_instr `WasmConcat` WasmConst reg_ty 0xFF@@ -1458,7 +1458,7 @@ (i, SomeWasmType ty_reg) <- onCmmLocalReg reg WasmExpr instrs <- lower_CmmExpr_Typed lbl ty_reg e pure $ WasmStatements $ instrs `WasmConcat` WasmLocalSet ty_reg i- CmmAssign (CmmGlobal reg) e+ CmmAssign (CmmGlobal (GlobalRegUse reg _)) e | BaseReg <- reg -> pure $ WasmStatements WasmNop | Just (sym_global, SomeWasmType ty_reg) <- globalInfoFromCmmGlobalReg ty_word reg -> do@@ -1531,9 +1531,11 @@ lower_CmmGraph lbl g = do ty_word <- wasmWordTypeM platform <- wasmPlatformM+ us <- getUniqueSupplyM body <- structuredControl platform+ us (\_ -> lower_CmmExpr_Typed lbl ty_word) (lower_CmmActions lbl) g@@ -1551,7 +1553,7 @@ SymDefault -> wasmModifyM $ \s -> s { defaultSyms =- WS.insert+ IS.insert (getKey $ getUnique sym) $ defaultSyms s }
GHC/CmmToAsm/Wasm/Types.hs view
@@ -45,7 +45,6 @@ wasmStateM, wasmModifyM, wasmExecM,- wasmUniq, ) where @@ -53,7 +52,7 @@ import Data.ByteString (ByteString) import Data.Coerce import Data.Functor-import qualified GHC.Data.Word64Set as WS+import qualified Data.IntSet as IS import Data.Kind import Data.String import Data.Type.Equality@@ -198,7 +197,7 @@ type SymMap = UniqMap SymName -- | No need to remember the symbols.-type SymSet = WS.Word64Set+type SymSet = IS.IntSet type GlobalInfo = (SymName, SomeWasmType) @@ -428,7 +427,7 @@ WasmCodeGenState { wasmPlatform = platform,- defaultSyms = WS.empty,+ defaultSyms = IS.empty, funcTypes = emptyUniqMap, funcBodies = emptyUniqMap,@@ -466,10 +465,18 @@ wasmModifyM :: (WasmCodeGenState w -> WasmCodeGenState w) -> WasmCodeGenM w () wasmModifyM = coerce . modify +wasmEvalM :: WasmCodeGenM w a -> WasmCodeGenState w -> a+wasmEvalM (WasmCodeGenM s) = evalState s+ wasmExecM :: WasmCodeGenM w a -> WasmCodeGenState w -> WasmCodeGenState w wasmExecM (WasmCodeGenM s) = execState s -wasmUniq :: WasmCodeGenM w Unique-wasmUniq = wasmStateM $- \s@WasmCodeGenState {..} -> case takeUniqFromSupply wasmUniqSupply of- (u, us) -> (# u, s {wasmUniqSupply = us} #)+instance MonadUnique (WasmCodeGenM w) where+ getUniqueSupplyM = wasmGetsM wasmUniqSupply+ getUniqueM = wasmStateM $+ \s@WasmCodeGenState {..} -> case takeUniqFromSupply wasmUniqSupply of+ (u, us) -> (# u, s {wasmUniqSupply = us} #)+ getUniquesM = do+ u <- getUniqueM+ s <- WasmCodeGenM get+ pure $ u:(wasmEvalM getUniquesM s)
GHC/CmmToAsm/Wasm/Utils.hs view
@@ -23,7 +23,7 @@ detEltsUFM = sortOn fst . nonDetEltsUFM detEltsUniqMap :: Ord k => UniqMap k a -> [(k, a)]-detEltsUniqMap = sortOn fst . nonDetEltsUniqMap+detEltsUniqMap = sortOn fst . nonDetUniqMapToList builderCommas :: (a -> Builder) -> [a] -> Builder builderCommas f xs = mconcat (intersperse ", " (map f xs))
GHC/CmmToAsm/X86.hs view
@@ -51,7 +51,6 @@ patchRegsOfInstr = X86.patchRegsOfInstr isJumpishInstr = X86.isJumpishInstr jumpDestsOfInstr = X86.jumpDestsOfInstr- canFallthroughTo = X86.canFallthroughTo patchJumpInstr = X86.patchJumpInstr mkSpillInstr = X86.mkSpillInstr mkLoadInstr = X86.mkLoadInstr
GHC/CmmToAsm/X86/CodeGen.hs view
@@ -196,10 +196,10 @@ -- Generate location directive dbg <- getDebugBlock (entryLabel block) loc_instrs <- case dblSourceTick =<< dbg of- Just (SourceNote span name)+ Just (SourceNote span (LexicalFastString name)) -> do fileId <- getFileId (srcSpanFile span) let line = srcSpanStartLine span; col = srcSpanStartCol span- return $ unitOL $ LOCATION fileId line col name+ return $ unitOL $ LOCATION fileId line col (unpackFS name) _ -> return nilOL (mid_instrs,mid_bid) <- stmtsToInstrs id stmts (!tail_instrs,_) <- stmtToInstrs mid_bid tail@@ -228,9 +228,10 @@ addSpUnwindings :: Instr -> NatM (OrdList Instr) addSpUnwindings instr@(DELTA d) = do config <- getConfig+ let platform = ncgPlatform config if ncgDwarfUnwindings config then do lbl <- mkAsmTempLabel <$> getUniqueM- let unwind = M.singleton MachSp (Just $ UwReg MachSp $ negate d)+ let unwind = M.singleton MachSp (Just $ UwReg (GlobalRegUse MachSp (bWord platform)) $ negate d) return $ toOL [ instr, UNWIND lbl unwind ] else return (unitOL instr) addSpUnwindings instr = return $ unitOL instr@@ -342,7 +343,7 @@ | isFloatType ty -> assignReg_FltCode format reg src | is32Bit && isWord64 ty -> assignReg_I64Code reg src | otherwise -> assignReg_IntCode format reg src- where ty = cmmRegType platform reg+ where ty = cmmRegType reg format = cmmTypeFormat ty CmmStore addr src _alignment@@ -407,7 +408,7 @@ getRegisterReg _ (CmmLocal lreg) = getLocalRegReg lreg getRegisterReg platform (CmmGlobal mid)- = case globalRegMaybe platform mid of+ = case globalRegMaybe platform $ globalRegUseGlobalReg mid of Just reg -> RegReal $ reg Nothing -> pprPanic "getRegisterReg-memory" (ppr $ CmmGlobal mid) -- By this stage, the only MagicIds remaining should be the@@ -480,10 +481,10 @@ -- Expand CmmRegOff. ToDo: should we do it this way around, or convert -- CmmExprs into CmmRegOff?-mangleIndexTree :: Platform -> CmmReg -> Int -> CmmExpr-mangleIndexTree platform reg off+mangleIndexTree :: CmmReg -> Int -> CmmExpr+mangleIndexTree reg off = CmmMachOp (MO_Add width) [CmmReg reg, CmmLit (CmmInt (fromIntegral off) width)]- where width = typeWidth (cmmRegType platform reg)+ where width = typeWidth (cmmRegType reg) -- | The dual to getAnyReg: compute an expression into a register, but -- we don't mind which one it is.@@ -623,9 +624,9 @@ getRegister' :: Platform -> Bool -> CmmExpr -> NatM Register -getRegister' platform is32Bit (CmmReg reg)+getRegister' _ is32Bit (CmmReg reg) = case reg of- CmmGlobal PicBaseReg+ CmmGlobal (GlobalRegUse PicBaseReg _) | is32Bit -> -- on x86_64, we have %rip for PicBaseReg, but it's not -- a full-featured register, it can only be used for@@ -635,7 +636,7 @@ _ -> do let- fmt = cmmTypeFormat (cmmRegType platform reg)+ fmt = cmmTypeFormat (cmmRegType reg) format = fmt -- platform <- ncgPlatform <$> getConfig@@ -645,7 +646,7 @@ getRegister' platform is32Bit (CmmRegOff r n)- = getRegister' platform is32Bit $ mangleIndexTree platform r n+ = getRegister' platform is32Bit $ mangleIndexTree r n getRegister' platform is32Bit (CmmMachOp (MO_AlignmentCheck align _) [e]) = addAlignmentCheck align <$> getRegister' platform is32Bit e@@ -738,7 +739,7 @@ code <- intLoadCode (MOVSxL II32) addr return (Any II64 code) -getRegister' _ is32Bit (CmmMachOp (MO_Add W64) [CmmReg (CmmGlobal PicBaseReg),+getRegister' _ is32Bit (CmmMachOp (MO_Add W64) [CmmReg (CmmGlobal (GlobalRegUse PicBaseReg _)), CmmLit displacement]) | not is32Bit = return $ Any II64 (\dst -> unitOL $@@ -900,14 +901,10 @@ MO_U_Lt _ -> condIntReg LU x y MO_U_Le _ -> condIntReg LEU x y - MO_F_Add w -> trivialFCode_sse2 w ADD x y-- MO_F_Sub w -> trivialFCode_sse2 w SUB x y-- MO_F_Quot w -> trivialFCode_sse2 w FDIV x y-- MO_F_Mul w -> trivialFCode_sse2 w MUL x y-+ MO_F_Add w -> trivialFCode_sse2 w ADD x y+ MO_F_Sub w -> trivialFCode_sse2 w SUB x y+ MO_F_Quot w -> trivialFCode_sse2 w FDIV x y+ MO_F_Mul w -> trivialFCode_sse2 w MUL x y MO_Add rep -> add_code rep x y MO_Sub rep -> sub_code rep x y@@ -1134,7 +1131,14 @@ return (Fixed format result code) +getRegister' _plat _is32Bit (CmmMachOp mop [x, y, z]) = -- ternary MachOps+ case mop of+ -- Floating point fused multiply-add operations @ ± x*y ± z@+ MO_FMA var w -> genFMA3Code w var x y z + _other -> pprPanic "getRegister(x86) - ternary CmmMachOp (1)"+ (pprMachOp mop)+ getRegister' _ _ (CmmLoad mem pk _) | isFloatType pk = do@@ -1301,9 +1305,9 @@ case e of CmmRegOff r n- -> getAmode $ mangleIndexTree platform r n+ -> getAmode $ mangleIndexTree r n - CmmMachOp (MO_Add W64) [CmmReg (CmmGlobal PicBaseReg), CmmLit displacement]+ CmmMachOp (MO_Add W64) [CmmReg (CmmGlobal (GlobalRegUse PicBaseReg _)), CmmLit displacement] | not is32Bit -> return $ Amode (ripRel (litToImm displacement)) nilOL @@ -2437,11 +2441,10 @@ -> [CmmFormal] -- ^ where to put the result -> [CmmActual] -- ^ arguments (of mixed type) -> NatM InstrBlock-genCCall32 addr conv@(ForeignConvention _ argHints _ _) dest_regs args = do+genCCall32 addr conv dest_regs args = do config <- getConfig let platform = ncgPlatform config- args_hints = zip args (argHints ++ repeat NoHint)- prom_args = map (maybePromoteCArg platform W32) args_hints+ prom_args = map (maybePromoteCArg platform W32) args -- If the size is smaller than the word, we widen things (see maybePromoteCArg) arg_size_bytes :: CmmType -> Int@@ -2595,11 +2598,10 @@ -> [CmmFormal] -- ^ where to put the result -> [CmmActual] -- ^ arguments (of mixed type) -> NatM InstrBlock-genCCall64 addr conv@(ForeignConvention _ argHints _ _) dest_regs args = do+genCCall64 addr conv dest_regs args = do platform <- getPlatform -- load up the register arguments- let args_hints = zip args (argHints ++ repeat NoHint)- let prom_args = map (maybePromoteCArg platform W32) args_hints+ let prom_args = map (maybePromoteCArg platform W32) args let load_args :: [CmmExpr] -> [Reg] -- int regs avail for args@@ -2738,7 +2740,7 @@ <- load_args prom_args (allIntArgRegs platform) (allFPArgRegs platform) nilOL nilOL- let used_regs rs as = reverse (drop (length rs) (reverse as))+ let used_regs rs as = dropTail (length rs) as fregs_used = used_regs fregs (allFPArgRegs platform) aregs_used = used_regs aregs (allIntArgRegs platform) return (stack_args, aregs_used, fregs_used, load_args_code@@ -2837,11 +2839,9 @@ assign_code dest_regs) -maybePromoteCArg :: Platform -> Width -> (CmmExpr, ForeignHint) -> CmmExpr-maybePromoteCArg platform wto (arg, hint)- | wfrom < wto = case hint of- SignedHint -> CmmMachOp (MO_SS_Conv wfrom wto) [arg]- _ -> CmmMachOp (MO_UU_Conv wfrom wto) [arg]+maybePromoteCArg :: Platform -> Width -> CmmExpr -> CmmExpr+maybePromoteCArg platform wto arg+ | wfrom < wto = CmmMachOp (MO_UU_Conv wfrom wto) [arg] | otherwise = arg where wfrom = cmmExprWidth platform arg@@ -3176,12 +3176,12 @@ a_code <- getAnyReg a tmp <- getNewRegNat rep let- -- We want the value of b to stay alive across the computation of a.- -- But, we want to calculate a straight into the destination register,+ -- We want the value of 'b' to stay alive across the computation of 'a'.+ -- But, we want to calculate 'a' straight into the destination register, -- because the instruction only has two operands (dst := dst `op` src).- -- The troublesome case is when the result of b is in the same register- -- as the destination reg. In this case, we have to save b in a- -- new temporary across the computation of a.+ -- The troublesome case is when the result of 'b' is in the same register+ -- as the destination 'reg'. In this case, we have to save 'b' in a+ -- new temporary across the computation of 'a'. code dst | dst `regClashesWithOp` b_op = b_code `appOL`@@ -3198,6 +3198,69 @@ reg `regClashesWithOp` OpReg reg2 = reg == reg2 reg `regClashesWithOp` OpAddr amode = any (==reg) (addrModeRegs amode) _ `regClashesWithOp` _ = False++-- | Generate code for a fused multiply-add operation, of the form @± x * y ± z@,+-- with 3 operands (FMA3 instruction set).+genFMA3Code :: Width+ -> FMASign+ -> CmmExpr -> CmmExpr -> CmmExpr -> NatM Register+genFMA3Code w signs x y z = do++ -- For the FMA instruction, we want to compute x * y + z+ --+ -- There are three possible instructions we could emit:+ --+ -- - fmadd213 z y x, result in x, z can be a memory address+ -- - fmadd132 x z y, result in y, x can be a memory address+ -- - fmadd231 y x z, result in z, y can be a memory address+ --+ -- This suggests two possible optimisations:+ --+ -- - OPTIMISATION 1+ -- If one argument is an address, use the instruction that allows+ -- a memory address in that position.+ --+ -- - OPTIMISATION 2+ -- If one argument is in a fixed register, use the instruction that puts+ -- the result in that same register.+ --+ -- Currently we follow neither of these optimisations,+ -- opting to always use fmadd213 for simplicity.+ let rep = floatFormat w+ (y_reg, y_code) <- getNonClobberedReg y+ (z_reg, z_code) <- getNonClobberedReg z+ x_code <- getAnyReg x+ y_tmp <- getNewRegNat rep+ z_tmp <- getNewRegNat rep+ let+ fma213 = FMA3 rep signs FMA213+ code dst+ | dst == y_reg+ , dst == z_reg+ = y_code `appOL`+ unitOL (MOV rep (OpReg y_reg) (OpReg y_tmp)) `appOL`+ z_code `appOL`+ unitOL (MOV rep (OpReg z_reg) (OpReg z_tmp)) `appOL`+ x_code dst `snocOL`+ fma213 (OpReg z_tmp) y_tmp dst+ | dst == y_reg+ = y_code `appOL`+ unitOL (MOV rep (OpReg y_reg) (OpReg z_tmp)) `appOL`+ z_code `appOL`+ x_code dst `snocOL`+ fma213 (OpReg z_reg) y_tmp dst+ | dst == z_reg+ = y_code `appOL`+ z_code `appOL`+ unitOL (MOV rep (OpReg z_reg) (OpReg z_tmp)) `appOL`+ x_code dst `snocOL`+ fma213 (OpReg z_tmp) y_reg dst+ | otherwise+ = y_code `appOL`+ z_code `appOL`+ x_code dst `snocOL`+ fma213 (OpReg z_reg) y_reg dst+ return (Any rep code) -----------
GHC/CmmToAsm/X86/Instr.hs view
@@ -12,6 +12,7 @@ ( Instr(..) , Operand(..) , PrefetchVariant(..)+ , FMAPermutation(..) , JumpDest(..) , getJumpDestBlockId , canShortcut@@ -30,7 +31,6 @@ , mkSpillInstr , mkRegRegMoveInstr , jumpDestsOfInstr- , canFallthroughTo , patchRegsOfInstr , patchJumpInstr , isMetaInstr@@ -273,6 +273,10 @@ | CVTSI2SS Format Operand Reg -- I32/I64 to F32 | CVTSI2SD Format Operand Reg -- I32/I64 to F64 + -- | FMA3 fused multiply-add operations.+ | FMA3 Format FMASign FMAPermutation Operand Reg Reg+ -- src1 (r/m), src2 (r), dst (r)+ -- use ADD, SUB, and SQRT for arithmetic. In both cases, operands -- are Operand Reg. @@ -352,7 +356,7 @@ | OpImm Imm -- immediate value | OpAddr AddrMode -- memory reference -+data FMAPermutation = FMA132 | FMA213 | FMA231 -- | Returns which registers are read and written as a (read, written) -- pair.@@ -439,6 +443,8 @@ PDEP _ src mask dst -> mkRU (use_R src $ use_R mask []) [dst] PEXT _ src mask dst -> mkRU (use_R src $ use_R mask []) [dst] + FMA3 _ _ _ src1 src2 dst -> usageFMA src1 src2 dst+ -- note: might be a better way to do this PREFETCH _ _ src -> mkRU (use_R src []) [] LOCK i -> regUsageOfInstr platform i@@ -483,6 +489,15 @@ usageRMM (OpReg src) (OpAddr ea) (OpReg reg) = mkRU (use_EA ea [src, reg]) [reg] usageRMM _ _ _ = panic "X86.RegInfo.usageRMM: no match" + -- 3 operand form of FMA instructions.+ usageFMA :: Operand -> Reg -> Reg -> RegUsage+ usageFMA (OpReg src1) src2 dst+ = mkRU [src1, src2, dst] [dst]+ usageFMA (OpAddr ea1) src2 dst+ = mkRU (use_EA ea1 [src2, dst]) [dst]+ usageFMA _ _ _+ = panic "X86.RegInfo.usageFMA: no match"+ -- 1 operand form; operand Modified usageM :: Operand -> RegUsage usageM (OpReg reg) = mkRU [reg] [reg]@@ -562,6 +577,8 @@ JMP op regs -> JMP (patchOp op) regs JMP_TBL op ids s lbl -> JMP_TBL (patchOp op) ids s lbl + FMA3 fmt perm var x1 x2 x3 -> patch3 (FMA3 fmt perm var) x1 x2 x3+ -- literally only support storing the top x87 stack value st(0) X87Store fmt dst -> X87Store fmt (lookupAddr dst) @@ -613,6 +630,8 @@ patch1 insn op = insn $! patchOp op patch2 :: (Operand -> Operand -> a) -> Operand -> Operand -> a patch2 insn src dst = (insn $! patchOp src) $! patchOp dst+ patch3 :: (Operand -> Reg -> Reg -> a) -> Operand -> Reg -> Reg -> a+ patch3 insn src1 src2 dst = ((insn $! patchOp src1) $! env src2) $! env dst patchOp (OpReg reg) = OpReg $! env reg patchOp (OpImm imm) = OpImm imm@@ -643,17 +662,6 @@ CALL{} -> True _ -> False -canFallthroughTo :: Instr -> BlockId -> Bool-canFallthroughTo insn bid- = case insn of- JXX _ target -> bid == target- JMP_TBL _ targets _ _ -> all isTargetBid targets- _ -> False- where- isTargetBid target = case target of- Nothing -> True- Just (DestBlockId target) -> target == bid- _ -> False jumpDestsOfInstr :: Instr
GHC/CmmToAsm/X86/Ppr.hs view
@@ -74,7 +74,6 @@ pprNatCmmDecl config proc@(CmmProc top_info lbl _ (ListGraph blocks)) = let platform = ncgPlatform config in- pprProcAlignment config $$ case topInfoTable proc of Nothing -> -- special case for code without info table:@@ -838,6 +837,14 @@ FDIV format op1 op2 -> pprFormatOpOp (text "div") format op1 op2 + FMA3 format var perm op1 op2 op3+ -> let mnemo = case var of+ FMAdd -> text "vfmadd"+ FMSub -> text "vfmsub"+ FNMAdd -> text "vfnmadd"+ FNMSub -> text "vfnmsub"+ in pprFormatOpRegReg (mnemo <> pprFMAPermutation perm) format op1 op2 op3+ SQRT format op1 op2 -> pprFormatOpReg (text "sqrt") format op1 op2 @@ -968,6 +975,21 @@ pprOperand platform format op2 ] + pprFormatOpRegReg :: Line doc -> Format -> Operand -> Reg -> Reg -> doc+ pprFormatOpRegReg name format op1 op2 op3+ = line $ hcat [+ pprMnemonic name format,+ pprOperand platform format op1,+ comma,+ pprReg platform format op2,+ comma,+ pprReg platform format op3+ ]++ pprFMAPermutation :: FMAPermutation -> Line doc+ pprFMAPermutation FMA132 = text "132"+ pprFMAPermutation FMA213 = text "213"+ pprFMAPermutation FMA231 = text "231" pprOpOp :: Line doc -> Format -> Operand -> Operand -> doc pprOpOp name format op1 op2
GHC/CmmToC.hs view
@@ -383,7 +383,7 @@ -- CmmRegOff is an alias of MO_Add CmmRegOff reg i -> pprExpr platform $ CmmMachOp (MO_Add w) [CmmReg reg, CmmLit $ CmmInt (toInteger i) w]- where w = cmmRegWidth platform reg+ where w = cmmRegWidth reg CmmMachOp mop args -> pprMachOpApp platform mop args @@ -529,6 +529,11 @@ pprMachOpApp' :: Platform -> MachOp -> [CmmExpr] -> SDoc pprMachOpApp' platform mop args = case args of++ -- ternary+ args@[_,_,_] ->+ pprMachOp_for_C platform mop <> parens (pprWithCommas pprArg args)+ -- dyadic [x,y] -> pprArg x <+> pprMachOp_for_C platform mop <+> pprArg y @@ -711,13 +716,28 @@ MO_U_Quot _ -> char '/' MO_U_Rem _ -> char '%' - -- & Floating-point operations+ -- Floating-point operations MO_F_Add _ -> char '+' MO_F_Sub _ -> char '-' MO_F_Neg _ -> char '-' MO_F_Mul _ -> char '*' MO_F_Quot _ -> char '/' + -- Floating-point fused multiply-add operations+ MO_FMA FMAdd w ->+ case w of+ W32 -> text "fmaf"+ W64 -> text "fma"+ _ ->+ pprTrace "offending mop:"+ (text "FMAdd")+ (panic $ "PprC.pprMachOp_for_C: FMAdd unsupported"+ ++ "at width " ++ show w)+ MO_FMA var _width ->+ pprTrace "offending mop:"+ (text $ "FMA " ++ show var)+ (panic $ "PprC.pprMachOp_for_C: should have been handled earlier!")+ -- Signed comparisons MO_S_Ge _ -> text ">=" MO_S_Le _ -> text "<="@@ -1044,9 +1064,11 @@ | isFixedPtrReg r1 = mkAssign (mkP_ <> pprExpr1 platform r2) | Just ty <- strangeRegType r1 = mkAssign (parens ty <> pprExpr1 platform r2) | otherwise = mkAssign (pprExpr platform r2)- where mkAssign x = if r1 == CmmGlobal BaseReg- then text "ASSIGN_BaseReg" <> parens x <> semi- else pprReg r1 <> text " = " <> x <> semi+ where mkAssign x =+ case r1 of+ CmmGlobal (GlobalRegUse BaseReg _) ->+ text "ASSIGN_BaseReg" <> parens x <> semi+ _ -> pprReg r1 <> text " = " <> x <> semi -- --------------------------------------------------------------------- -- Registers@@ -1061,17 +1083,16 @@ -- StgPtr. isFixedPtrReg :: CmmReg -> Bool isFixedPtrReg (CmmLocal _) = False-isFixedPtrReg (CmmGlobal r) = isFixedPtrGlobalReg r+isFixedPtrReg (CmmGlobal (GlobalRegUse r _)) = isFixedPtrGlobalReg r -- True if (pprAsPtrReg reg) will give an expression with type StgPtr -- JD: THIS IS HORRIBLE AND SHOULD BE RENAMED, AT THE VERY LEAST. -- THE GARBAGE WITH THE VNonGcPtr HELPS MATCH THE OLD CODE GENERATOR'S OUTPUT; -- I'M NOT SURE IF IT SHOULD REALLY STAY THAT WAY. isPtrReg :: CmmReg -> Bool-isPtrReg (CmmLocal _) = False-isPtrReg (CmmGlobal (VanillaReg _ VGcPtr)) = True -- if we print via pprAsPtrReg-isPtrReg (CmmGlobal (VanillaReg _ VNonGcPtr)) = False -- if we print via pprAsPtrReg-isPtrReg (CmmGlobal reg) = isFixedPtrGlobalReg reg+isPtrReg (CmmLocal _) = False+isPtrReg (CmmGlobal (GlobalRegUse (VanillaReg _) ty)) = isGcPtrType ty -- if we print via pprAsPtrReg+isPtrReg (CmmGlobal (GlobalRegUse reg _)) = isFixedPtrGlobalReg reg -- True if this global reg has type StgPtr isFixedPtrGlobalReg :: GlobalReg -> Bool@@ -1085,7 +1106,7 @@ -- (machRepCType (cmmRegType reg)), so it has to be cast. isStrangeTypeReg :: CmmReg -> Bool isStrangeTypeReg (CmmLocal _) = False-isStrangeTypeReg (CmmGlobal g) = isStrangeTypeGlobal g+isStrangeTypeReg (CmmGlobal (GlobalRegUse g _)) = isStrangeTypeGlobal g isStrangeTypeGlobal :: GlobalReg -> Bool isStrangeTypeGlobal CCCS = True@@ -1095,10 +1116,10 @@ isStrangeTypeGlobal r = isFixedPtrGlobalReg r strangeRegType :: CmmReg -> Maybe SDoc-strangeRegType (CmmGlobal CCCS) = Just (text "struct CostCentreStack_ *")-strangeRegType (CmmGlobal CurrentTSO) = Just (text "struct StgTSO_ *")-strangeRegType (CmmGlobal CurrentNursery) = Just (text "struct bdescr_ *")-strangeRegType (CmmGlobal BaseReg) = Just (text "struct StgRegTable_ *")+strangeRegType (CmmGlobal (GlobalRegUse CCCS _)) = Just (text "struct CostCentreStack_ *")+strangeRegType (CmmGlobal (GlobalRegUse CurrentTSO _)) = Just (text "struct StgTSO_ *")+strangeRegType (CmmGlobal (GlobalRegUse CurrentNursery _)) = Just (text "struct bdescr_ *")+strangeRegType (CmmGlobal (GlobalRegUse BaseReg _)) = Just (text "struct StgRegTable_ *") strangeRegType _ = Nothing -- pprReg just prints the register name.@@ -1106,16 +1127,16 @@ pprReg :: CmmReg -> SDoc pprReg r = case r of CmmLocal local -> pprLocalReg local- CmmGlobal global -> pprGlobalReg global+ CmmGlobal (GlobalRegUse global _ ) -> pprGlobalReg global pprAsPtrReg :: CmmReg -> SDoc-pprAsPtrReg (CmmGlobal (VanillaReg n gcp))- = warnPprTrace (gcp /= VGcPtr) "pprAsPtrReg" (ppr n) $ char 'R' <> int n <> text ".p"+pprAsPtrReg (CmmGlobal (GlobalRegUse (VanillaReg n) ty))+ = warnPprTrace (not $ isGcPtrType ty) "pprAsPtrReg" (ppr n) $ char 'R' <> int n <> text ".p" pprAsPtrReg other_reg = pprReg other_reg pprGlobalReg :: GlobalReg -> SDoc pprGlobalReg gr = case gr of- VanillaReg n _ -> char 'R' <> int n <> text ".w"+ VanillaReg n -> char 'R' <> int n <> text ".w" -- pprGlobalReg prints a VanillaReg as a .w regardless -- Example: R1.w = R1.w & (-0x8UL); -- JMP_(*R1.p);
GHC/CmmToLlvm.hs view
@@ -11,7 +11,7 @@ ) where -import GHC.Prelude+import GHC.Prelude hiding ( head ) import GHC.Llvm import GHC.CmmToLlvm.Base@@ -27,7 +27,8 @@ import GHC.Cmm.Dataflow.Collections import GHC.Utils.BufHandle-import GHC.Driver.Session+import GHC.Driver.DynFlags+import GHC.Platform ( platformArch, Arch(..) ) import GHC.Utils.Error import GHC.Data.FastString import GHC.Utils.Outputable@@ -36,7 +37,8 @@ import qualified GHC.Data.Stream as Stream import Control.Monad ( when, forM_ )-import Data.Maybe ( fromMaybe, catMaybes, isNothing )+import Data.List.NonEmpty ( head )+import Data.Maybe ( fromMaybe, catMaybes ) import System.IO -- -----------------------------------------------------------------------------@@ -66,13 +68,11 @@ "up to" <+> text (llvmVersionStr supportedLlvmVersionUpperBound) <+> "(non inclusive) is supported." <+> "System LLVM version: " <> text (llvmVersionStr ver) $$ "We will try though..."-- when (isNothing mb_ver) $ do- let doWarn = llvmCgDoWarn cfg- when doWarn $ putMsg logger $- "Failed to detect LLVM version!" $$- "Make sure LLVM is installed correctly." $$- "We will try though..."+ let isS390X = platformArch (llvmCgPlatform cfg) == ArchS390X+ let major_ver = head . llvmVersionNE $ ver+ when (isS390X && major_ver < 10 && doWarn) $ putMsg logger $+ "Warning: For s390x the GHC calling convention is only supported since LLVM version 10." <+>+ "You are using LLVM version: " <> text (llvmVersionStr ver) -- HACK: the Nothing case here is potentially wrong here but we -- currently don't use the LLVM version to guide code generation@@ -91,7 +91,7 @@ llvmCodeGen' :: LlvmCgConfig -> Stream.Stream IO RawCmmGroup a -> LlvmM a llvmCodeGen' cfg cmm_stream = do -- Preamble- renderLlvm header+ renderLlvm (llvmHeader cfg) (llvmHeader cfg) ghcInternalFunctions cmmMetaLlvmPrelude @@ -99,20 +99,23 @@ a <- Stream.consume cmm_stream liftIO llvmGroupLlvmGens -- Declare aliases for forward references- renderLlvm . pprLlvmData cfg =<< generateExternDecls+ decls <- generateExternDecls+ renderLlvm (pprLlvmData cfg decls)+ (pprLlvmData cfg decls) -- Postamble cmmUsedLlvmGens return a- where- header :: SDoc- header =- let target = llvmCgLlvmTarget cfg- llvmCfg = llvmCgLlvmConfig cfg- in (text "target datalayout = \"" <> text (getDataLayout llvmCfg target) <> text "\"")- $+$ (text "target triple = \"" <> text target <> text "\"") +llvmHeader :: IsDoc doc => LlvmCgConfig -> doc+llvmHeader cfg =+ let target = llvmCgLlvmTarget cfg+ llvmCfg = llvmCgLlvmConfig cfg+ in lines_+ [ text "target datalayout = \"" <> text (getDataLayout llvmCfg target) <> text "\""+ , text "target triple = \"" <> text target <> text "\"" ]+ where getDataLayout :: LlvmConfig -> String -> String getDataLayout config target = case lookup target (llvmTargets config) of@@ -121,6 +124,8 @@ text "Target:" <+> text target $$ hang (text "Available targets:") 4 (vcat $ map (text . fst) $ llvmTargets config)+{-# SPECIALIZE llvmHeader :: LlvmCgConfig -> SDoc #-}+{-# SPECIALIZE llvmHeader :: LlvmCgConfig -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable llvmGroupLlvmGens :: RawCmmGroup -> LlvmM () llvmGroupLlvmGens cmm = do@@ -156,10 +161,11 @@ = funInsert l ty regGlobal _ = pure () mapM_ regGlobal gs- gss' <- mapM aliasify $ gs+ gss' <- mapM aliasify gs cfg <- getConfig- renderLlvm $ pprLlvmData cfg (concat gss', concat tss)+ renderLlvm (pprLlvmData cfg (concat gss', concat tss))+ (pprLlvmData cfg (concat gss', concat tss)) -- | Complete LLVM code generation phase for a single top-level chunk of Cmm. cmmLlvmGen ::RawCmmDecl -> LlvmM ()@@ -175,12 +181,12 @@ -- generate llvm code from cmm llvmBC <- withClearVars $ genLlvmProc fixed_cmm - -- pretty print- (docs, ivars) <- fmap unzip $ mapM pprLlvmCmmDecl llvmBC-- -- Output, note down used variables- renderLlvm (vcat docs)- mapM_ markUsedVar $ concat ivars+ -- pretty print - print as we go, since we produce HDocs, we know+ -- no nesting state needs to be maintained for the SDocs.+ forM_ llvmBC (\decl -> do+ (hdoc, sdoc) <- pprLlvmCmmDecl decl+ renderLlvm (hdoc $$ empty) (sdoc $$ empty)+ ) cmmLlvmGen _ = return () @@ -204,7 +210,8 @@ -- name. Nothing -> [ MetaStr name ] cfg <- getConfig- renderLlvm $ ppLlvmMetas cfg metas+ renderLlvm (ppLlvmMetas cfg metas)+ (ppLlvmMetas cfg metas) -- ----------------------------------------------------------------------------- -- | Marks variables as used where necessary@@ -229,4 +236,7 @@ lmUsed = LMGlobal lmUsedVar (Just usedArray) if null ivars then return ()- else getConfig >>= renderLlvm . flip pprLlvmData ([lmUsed], [])+ else do+ cfg <- getConfig+ renderLlvm (pprLlvmData cfg ([lmUsed], []))+ (pprLlvmData cfg ([lmUsed], []))
GHC/CmmToLlvm/Base.hs view
@@ -44,10 +44,10 @@ import GHC.Cmm.CLabel import GHC.Platform.Regs ( activeStgRegs, globalRegMaybe )-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Data.FastString import GHC.Cmm hiding ( succ )-import GHC.Cmm.Utils (regsOverlap)+import GHC.Cmm.Utils (globalRegsOverlap) import GHC.Utils.Outputable as Outp import GHC.Platform import GHC.Types.Unique.FM@@ -194,8 +194,8 @@ -- all use the same real regs on X86-64 (XMM registers). -- classes = NE.groupBy sharesClass fprLive- sharesClass a b = regsOverlap platform (norm a) (norm b) -- check if mapped to overlapping registers- norm x = CmmGlobal ((fpr_ctor x) 1) -- get the first register of the family+ sharesClass a b = globalRegsOverlap platform (norm a) (norm b) -- check if mapped to overlapping registers+ norm x = fpr_ctor x 1 -- get the first register of the family -- For each class, we just have to fill missing registers numbers. We use -- the constructor of the greatest register to build padding registers.@@ -260,7 +260,7 @@ , envConfig :: !LlvmCgConfig -- ^ Configuration for LLVM code gen , envLogger :: !Logger -- ^ Logger , envOutput :: BufHandle -- ^ Output buffer- , envTag :: !Char -- ^ Tag for creating unique values+ , envMask :: !Char -- ^ Mask for creating unique values , envFreshMeta :: MetaId -- ^ Supply of fresh metadata IDs , envUniqMeta :: UniqFM Unique MetaId -- ^ Global metadata nodes , envFunMap :: LlvmEnvMap -- ^ Global functions so far, with type@@ -292,12 +292,12 @@ instance MonadUnique LlvmM where getUniqueSupplyM = do- tag <- getEnv envTag- liftIO $! mkSplitUniqSupply tag+ mask <- getEnv envMask+ liftIO $! mkSplitUniqSupply mask getUniqueM = do- tag <- getEnv envTag- liftIO $! uniqFromTag tag+ mask <- getEnv envMask+ liftIO $! uniqFromMask mask -- | Lifting of IO actions. Not exported, as we want to encapsulate IO. liftIO :: IO a -> LlvmM a@@ -318,7 +318,7 @@ , envConfig = cfg , envLogger = logger , envOutput = out- , envTag = 'n'+ , envMask = 'n' , envFreshMeta = MetaId 0 , envUniqMeta = emptyUFM }@@ -371,13 +371,13 @@ liftIO $ putDumpFileMaybe logger flag hdr fmt doc -- | Prints the given contents to the output handle-renderLlvm :: Outp.SDoc -> LlvmM ()-renderLlvm sdoc = do+renderLlvm :: Outp.HDoc -> Outp.SDoc -> LlvmM ()+renderLlvm hdoc sdoc = do -- Write to output ctx <- llvmCgContext <$> getConfig out <- getEnv envOutput- liftIO $ Outp.bufLeftRenderSDoc ctx out sdoc+ liftIO $ Outp.bPutHDoc out ctx hdoc -- Dump, if requested dumpIfSetLlvm Opt_D_dump_llvm "LLVM Code" FormatLLVM sdoc@@ -428,7 +428,7 @@ let n' = fsLit n decl = LlvmFunctionDecl n' ExternallyVisible CC_Ccc ret FixedArgs (tysToParams args) Nothing- renderLlvm $ ppLlvmFunctionDecl decl+ renderLlvm (ppLlvmFunctionDecl decl) (ppLlvmFunctionDecl decl) funInsert n' (LMFunction decl) -- ----------------------------------------------------------------------------
GHC/CmmToLlvm/CodeGen.hs view
@@ -207,7 +207,7 @@ castV <- lift $ mkLocalVar ty ve <- exprToVarW e statement $ Assignment castV $ Cast LM_Uitofp ve width- statement $ Store castV dstV Nothing+ statement $ Store castV dstV Nothing [] genCall (PrimTarget (MO_UF_Conv _)) [_] args = panic $ "genCall: Too many arguments to MO_UF_Conv. " ++@@ -263,12 +263,12 @@ AMO_Or -> LAO_Or AMO_Xor -> LAO_Xor retVar <- doExprW targetTy $ AtomicRMW op ptrVar nVar SyncSeqCst- statement $ Store retVar dstVar Nothing+ statement $ Store retVar dstVar Nothing [] genCall (PrimTarget (MO_AtomicRead _ mem_ord)) [dst] [addr] = runStmtsDecls $ do dstV <- getCmmRegW (CmmLocal dst) v1 <- genLoadW (Just mem_ord) addr (localRegType dst) NaturallyAligned- statement $ Store v1 dstV Nothing+ statement $ Store v1 dstV Nothing [] genCall (PrimTarget (MO_Cmpxchg _width)) [dst] [addr, old, new] = runStmtsDecls $ do@@ -282,7 +282,7 @@ retVar <- doExprW (LMStructU [targetTy,i1]) $ CmpXChg ptrVar oldVar newVar SyncSeqCst SyncSeqCst retVar' <- doExprW targetTy $ ExtractV retVar 0- statement $ Store retVar' dstVar Nothing+ statement $ Store retVar' dstVar Nothing [] genCall (PrimTarget (MO_Xchg _width)) [dst] [addr, val] = runStmtsDecls $ do dstV <- getCmmRegW (CmmLocal dst) :: WriterT LlvmAccum LlvmM LlvmVar@@ -292,7 +292,7 @@ ptrExpr = Cast LM_Inttoptr addrVar ptrTy ptrVar <- doExprW ptrTy ptrExpr resVar <- doExprW (getVarType valVar) (AtomicRMW LAO_Xchg ptrVar valVar SyncSeqCst)- statement $ Store resVar dstV Nothing+ statement $ Store resVar dstV Nothing [] genCall (PrimTarget (MO_AtomicWrite _width mem_ord)) [] [addr, val] = runStmtsDecls $ do addrVar <- exprToVarW addr@@ -353,8 +353,8 @@ retH <- doExprW width $ Cast LM_Trunc retShifted width dstRegL <- getCmmRegW (CmmLocal dstL) dstRegH <- getCmmRegW (CmmLocal dstH)- statement $ Store retL dstRegL Nothing- statement $ Store retH dstRegH Nothing+ statement $ Store retL dstRegL Nothing []+ statement $ Store retH dstRegH Nothing [] genCall (PrimTarget (MO_S_Mul2 w)) [dstC, dstH, dstL] [lhs, rhs] = runStmtsDecls $ do let width = widthToLlvmInt w@@ -385,9 +385,9 @@ dstRegL <- getCmmRegW (CmmLocal dstL) dstRegH <- getCmmRegW (CmmLocal dstH) dstRegC <- getCmmRegW (CmmLocal dstC)- statement $ Store retL dstRegL Nothing- statement $ Store retH dstRegH Nothing- statement $ Store retC dstRegC Nothing+ statement $ Store retL dstRegL Nothing []+ statement $ Store retH dstRegH Nothing []+ statement $ Store retC dstRegC Nothing [] -- MO_U_QuotRem2 is another case we handle by widening the registers to double -- the width and use normal LLVM instructions (similarly to the MO_U_Mul2). The@@ -421,8 +421,8 @@ retRem <- narrow retExtRem dstRegQ <- lift $ getCmmReg (CmmLocal dstQ) dstRegR <- lift $ getCmmReg (CmmLocal dstR)- statement $ Store retDiv dstRegQ Nothing- statement $ Store retRem dstRegR Nothing+ statement $ Store retDiv dstRegQ Nothing []+ statement $ Store retRem dstRegR Nothing [] -- Handle the MO_{Add,Sub}IntC separately. LLVM versions return a record from -- which we need to extract the actual values.@@ -529,7 +529,7 @@ vreg <- getCmmRegW (CmmLocal creg) if retTy == pLower (getVarType vreg) then do- statement $ Store v1 vreg Nothing+ statement $ Store v1 vreg Nothing [] doReturn else do let ty = pLower $ getVarType vreg@@ -541,7 +541,7 @@ ++ " returned type!" v2 <- doExprW ty $ Cast op v1 ty- statement $ Store v2 vreg Nothing+ statement $ Store v2 vreg Nothing [] doReturn -- | Generate a call to an LLVM intrinsic that performs arithmetic operation@@ -570,8 +570,8 @@ (overflow, zext) <- doExpr width $ Cast LM_Zext overflowBit width dstRegV <- getCmmReg (CmmLocal dstV) dstRegO <- getCmmReg (CmmLocal dstO)- let storeV = Store value dstRegV Nothing- storeO = Store overflow dstRegO Nothing+ let storeV = Store value dstRegV Nothing []+ storeO = Store overflow dstRegO Nothing [] return (stmts `snocOL` zext `snocOL` storeV `snocOL` storeO, top) genCallWithOverflow _ _ _ _ = panic "genCallExtract: wrong ForeignTarget or number of arguments"@@ -636,7 +636,7 @@ (retV, s1) <- doExpr width $ Call StdCall fptr argsV' [] (retVs', stmts5) <- castVars (cmmPrimOpRetValSignage op) [(retV,dstTy)] let retV' = singletonPanic "genCallSimpleCast" retVs'- let s2 = Store retV' dstV Nothing+ let s2 = Store retV' dstV Nothing [] let stmts = stmts2 `appOL` stmts4 `snocOL` s1 `appOL` stmts5 `snocOL` s2@@ -668,7 +668,7 @@ (retV, s1) <- doExpr width $ Call StdCall fptr argsV' [] (retVs', stmts5) <- castVars (cmmPrimOpRetValSignage op) [(retV,dstTy)] let retV' = singletonPanic "genCallSimpleCast2" retVs'- let s2 = Store retV' dstV Nothing+ let s2 = Store retV' dstV Nothing [] let stmts = stmts2 `appOL` stmts4 `snocOL` s1 `appOL` stmts5 `snocOL` s2@@ -1098,16 +1098,16 @@ -- Some registers are pointer types, so need to cast value to pointer LMPointer _ | getVarType vval == llvmWord platform -> do (v, s1) <- doExpr ty $ Cast LM_Inttoptr vval ty- let s2 = Store v vreg Nothing+ let s2 = Store v vreg Nothing [] return (stmts `snocOL` s1 `snocOL` s2, top2) LMVector _ _ -> do (v, s1) <- doExpr ty $ Cast LM_Bitcast vval ty- let s2 = mkStore v vreg NaturallyAligned+ let s2 = mkStore v vreg NaturallyAligned [] return (stmts `snocOL` s1 `snocOL` s2, top2) _ -> do- let s1 = Store vval vreg Nothing+ let s1 = Store vval vreg Nothing [] return (stmts `snocOL` s1, top2) @@ -1143,12 +1143,12 @@ -- | CmmStore operation -- This is a special case for storing to a global register pointer -- offset such as I32[Sp+8].-genStore_fast :: CmmExpr -> GlobalReg -> Int -> CmmExpr -> AlignmentSpec+genStore_fast :: CmmExpr -> GlobalRegUse -> Int -> CmmExpr -> AlignmentSpec -> LlvmM StmtData genStore_fast addr r n val alignment = do platform <- getPlatform (gv, grt, s1) <- getCmmRegVal (CmmGlobal r)- meta <- getTBAARegMeta r+ meta <- getTBAARegMeta (globalRegUseGlobalReg r) let (ix,rem) = n `divMod` ((llvmWidthInBits platform . pLower) grt `div` 8) case isPointer grt && rem == 0 of True -> do@@ -1158,7 +1158,7 @@ case pLower grt == getVarType vval of -- were fine True -> do- let s3 = MetaStmt meta $ mkStore vval ptr alignment+ let s3 = mkStore vval ptr alignment meta return (stmts `appOL` s1 `snocOL` s2 `snocOL` s3, top) @@ -1166,7 +1166,7 @@ False -> do let ty = (pLift . getVarType) vval (ptr', s3) <- doExpr ty $ Cast LM_Bitcast ptr ty- let s4 = MetaStmt meta $ mkStore vval ptr' alignment+ let s4 = mkStore vval ptr' alignment meta return (stmts `appOL` s1 `snocOL` s2 `snocOL` s3 `snocOL` s4, top) @@ -1189,17 +1189,17 @@ -- sometimes we need to cast an int to a pointer before storing LMPointer ty@(LMPointer _) | getVarType vval == llvmWord platform -> do (v, s1) <- doExpr ty $ Cast LM_Inttoptr vval ty- let s2 = MetaStmt meta $ mkStore v vaddr alignment+ let s2 = mkStore v vaddr alignment meta return (stmts `snocOL` s1 `snocOL` s2, top1 ++ top2) LMPointer _ -> do- let s1 = MetaStmt meta $ mkStore vval vaddr alignment+ let s1 = mkStore vval vaddr alignment meta return (stmts `snocOL` s1, top1 ++ top2) i@(LMInt _) | i == llvmWord platform -> do let vty = pLift $ getVarType vval (vptr, s1) <- doExpr vty $ Cast LM_Inttoptr vaddr vty- let s2 = MetaStmt meta $ mkStore vval vptr alignment+ let s2 = mkStore vval vptr alignment meta return (stmts `snocOL` s1 `snocOL` s2, top1 ++ top2) other ->@@ -1209,9 +1209,9 @@ text "Size of var:" <+> ppr (llvmWidthInBits platform other) $$ text "Var:" <+> ppVar cfg vaddr) -mkStore :: LlvmVar -> LlvmVar -> AlignmentSpec -> LlvmStatement-mkStore vval vptr alignment =- Store vval vptr align+mkStore :: LlvmVar -> LlvmVar -> AlignmentSpec -> [MetaAnnot] -> LlvmStatement+mkStore vval vptr alignment metas =+ Store vval vptr align metas where ty = pLower (getVarType vptr) align = case alignment of@@ -1388,8 +1388,7 @@ -> genMachOp opt op exprs CmmRegOff r i- -> do platform <- getPlatform- exprToVar $ expandCmmReg platform (r, i)+ -> exprToVar $ expandCmmReg (r, i) CmmStackSlot _ _ -> panic "exprToVar: CmmStackSlot not supported!"@@ -1470,6 +1469,9 @@ MO_F_Sub _ -> panicOp MO_F_Mul _ -> panicOp MO_F_Quot _ -> panicOp++ MO_FMA _ _ -> panicOp+ MO_F_Eq _ -> panicOp MO_F_Ne _ -> panicOp MO_F_Ge _ -> panicOp@@ -1554,7 +1556,7 @@ -- | Handle CmmMachOp expressions -- This is a specialised method that handles Global register manipulations like -- 'Sp - 16', using the getelementptr instruction.-genMachOp_fast :: EOption -> MachOp -> GlobalReg -> Int -> [CmmExpr]+genMachOp_fast :: EOption -> MachOp -> GlobalRegUse -> Int -> [CmmExpr] -> LlvmM ExprData genMachOp_fast opt op r n e = do (gv, grt, s1) <- getCmmRegVal (CmmGlobal r)@@ -1653,6 +1655,8 @@ MO_F_Mul _ -> genBinMach LM_MO_FMul MO_F_Quot _ -> genBinMach LM_MO_FDiv + MO_FMA _ _ -> panicOp+ MO_And _ -> genBinMach LM_MO_And MO_Or _ -> genBinMach LM_MO_Or MO_Xor _ -> genBinMach LM_MO_Xor@@ -1786,10 +1790,29 @@ panicOp = panic $ "LLVM.CodeGen.genMachOp_slow: unary op encountered" ++ "with two arguments! (" ++ show op ++ ")" --- More than two expression, invalid!-genMachOp_slow _ _ _ = panic "genMachOp: More than 2 expressions in MachOp!"+genMachOp_slow _opt op [x, y, z] = case op of+ MO_FMA var _ -> triLlvmOp getVarType (FMAOp var)+ _ -> panicOp+ where+ triLlvmOp ty op = do+ platform <- getPlatform+ runExprData $ do+ vx <- exprToVarW x+ vy <- exprToVarW y+ vz <- exprToVarW z + if | getVarType vx == getVarType vy+ , getVarType vx == getVarType vz+ -> doExprW (ty vx) $ op vx vy vz+ | otherwise+ -> pprPanic "triLlvmOp types" (pdoc platform x $$ pdoc platform y $$ pdoc platform z)+ panicOp = panic $ "LLVM.CodeGen.genMachOp_slow: non-ternary op encountered"+ ++ "with three arguments! (" ++ show op ++ ")" +-- More than three expressions, invalid!+genMachOp_slow _ _ _ = panic "genMachOp_slow: More than 3 expressions in MachOp!"++ -- | Handle CmmLoad expression. genLoad :: Atomic -> CmmExpr -> CmmType -> AlignmentSpec -> LlvmM ExprData @@ -1822,12 +1845,12 @@ -- | Handle CmmLoad expression. -- This is a special case for loading from a global register pointer -- offset such as I32[Sp+8].-genLoad_fast :: Atomic -> CmmExpr -> GlobalReg -> Int -> CmmType+genLoad_fast :: Atomic -> CmmExpr -> GlobalRegUse -> Int -> CmmType -> AlignmentSpec -> LlvmM ExprData genLoad_fast atomic e r n ty align = do platform <- getPlatform (gv, grt, s1) <- getCmmRegVal (CmmGlobal r)- meta <- getTBAARegMeta r+ meta <- getTBAARegMeta (globalRegUseGlobalReg r) let ty' = cmmToLlvmType ty (ix,rem) = n `divMod` ((llvmWidthInBits platform . pLower) grt `div` 8) case isPointer grt && rem == 0 of@@ -1917,10 +1940,11 @@ -- "funPrologue" to allocate it on the stack. getCmmReg (CmmGlobal g)- = do onStack <- checkStackReg g+ = do let r = globalRegUseGlobalReg g+ onStack <- checkStackReg r platform <- getPlatform if onStack- then return (lmGlobalRegVar platform g)+ then return (lmGlobalRegVar platform r) else pprPanic "getCmmReg: Cmm register " $ ppr g <> text " not stack-allocated!" @@ -1930,10 +1954,10 @@ getCmmRegVal reg = case reg of CmmGlobal g -> do- onStack <- checkStackReg g+ onStack <- checkStackReg (globalRegUseGlobalReg g) platform <- getPlatform if onStack then loadFromStack else do- let r = lmGlobalRegArg platform g+ let r = lmGlobalRegArg platform (globalRegUseGlobalReg g) return (r, getVarType r, nilOL) _ -> loadFromStack where loadFromStack = do@@ -2064,7 +2088,7 @@ let (newv, stmts) = allocReg reg varInsert un (pLower $ getVarType newv) return stmts- CmmGlobal r -> do+ CmmGlobal (GlobalRegUse r _) -> do let reg = lmGlobalRegVar platform r arg = lmGlobalRegArg platform r ty = (pLower . getVarType) reg@@ -2072,7 +2096,7 @@ rval = if isLive r then arg else trash alloc = Assignment reg $ Alloca (pLower $ getVarType reg) 1 markStackReg r- return $ toOL [alloc, Store rval reg Nothing]+ return $ toOL [alloc, Store rval reg Nothing []] return (concatOL stmtss `snocOL` jumpToEntry, []) where@@ -2107,8 +2131,8 @@ let allRegs = activeStgRegs platform loads <- forM allRegs $ \r -> if -- load live registers- | r `elem` alwaysLive -> loadExpr r- | r `elem` live -> loadExpr r+ | r `elem` alwaysLive -> loadExpr (GlobalRegUse r (globalRegSpillType platform r))+ | r `elem` live -> loadExpr (GlobalRegUse r (globalRegSpillType platform r)) -- load all non Floating-Point Registers | not (isFPR r) -> loadUndef r -- load padding Floating-Point Registers@@ -2152,9 +2176,9 @@ -- | Expand CmmRegOff-expandCmmReg :: Platform -> (CmmReg, Int) -> CmmExpr-expandCmmReg platform (reg, off)- = let width = typeWidth (cmmRegType platform reg)+expandCmmReg :: (CmmReg, Int) -> CmmExpr+expandCmmReg (reg, off)+ = let width = typeWidth (cmmRegType reg) voff = CmmLit $ CmmInt (fromIntegral off) width in CmmMachOp (MO_Add width) [CmmReg reg, voff]
GHC/CmmToLlvm/Data.hs view
@@ -89,7 +89,6 @@ align = case sec of Section CString _ -> if (platformArch platform == ArchS390X) then Just 2 else Just 1- Section Data _ -> Just $ platformWordSizeInBytes platform _ -> Nothing const = if sectionProtection sec == ReadOnlySection then Constant else Global
GHC/CmmToLlvm/Mangler.hs view
@@ -38,7 +38,7 @@ -- | These are the rewrites that the mangler will perform rewrites :: [Rewrite]-rewrites = [rewriteSymType, rewriteAVX, rewriteCall]+rewrites = [rewriteSymType, rewriteAVX, rewriteCall, rewriteJump] type Rewrite = Platform -> B.ByteString -> Maybe B.ByteString @@ -121,6 +121,29 @@ replaceOnce (B.pack call) (B.pack ("la\t" ++ reg ++ ",")) l where removePlt = replaceOnce (B.pack "@plt") (B.pack "")+ appendInsn i = (`B.append` B.pack ("\n\t" ++ i))++-- | This rewrites bl and b jump inst to avoid creating PLT entries for+-- functions on loongarch64, because there is no separate call instruction+-- for function calls in loongarch64. Also, this replacement will load+-- the function address from the GOT, which is resolved to point to the+-- real address of the function.+rewriteJump :: Rewrite+rewriteJump platform l+ | not isLoongArch64 = Nothing+ | isBL l = Just $ replaceJump "bl" "$ra" "$ra" l+ | isB l = Just $ replaceJump "b" "$zero" "$t0" l+ | otherwise = Nothing+ where+ isLoongArch64 = platformArch platform == ArchLoongArch64+ isBL = B.isPrefixOf (B.pack "bl\t")+ isB = B.isPrefixOf (B.pack "b\t")++ replaceJump jump rd rj l =+ appendInsn ("jirl" ++ "\t" ++ rd ++ ", " ++ rj ++ ", 0") $ removeBracket $+ replaceOnce (B.pack (jump ++ "\t%plt(")) (B.pack ("la\t" ++ rj ++ ", ")) l+ where+ removeBracket = replaceOnce (B.pack ")") (B.pack "") appendInsn i = (`B.append` B.pack ("\n\t" ++ i)) -- | @replaceOnce match replace bs@ replaces the first occurrence of the
GHC/CmmToLlvm/Ppr.hs view
@@ -26,22 +26,28 @@ -- -- | Pretty print LLVM data code-pprLlvmData :: LlvmCgConfig -> LlvmData -> SDoc+pprLlvmData :: IsDoc doc => LlvmCgConfig -> LlvmData -> doc pprLlvmData cfg (globals, types) =- let ppLlvmTys (LMAlias a) = ppLlvmAlias a+ let ppLlvmTys (LMAlias a) = line $ ppLlvmAlias a ppLlvmTys (LMFunction f) = ppLlvmFunctionDecl f ppLlvmTys _other = empty types' = vcat $ map ppLlvmTys types globals' = ppLlvmGlobals cfg globals- in types' $+$ globals'+ in types' $$ globals'+{-# SPECIALIZE pprLlvmData :: LlvmCgConfig -> LlvmData -> SDoc #-}+{-# SPECIALIZE pprLlvmData :: LlvmCgConfig -> LlvmData -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Pretty print LLVM code-pprLlvmCmmDecl :: LlvmCmmDecl -> LlvmM (SDoc, [LlvmVar])+-- The HDoc we return is used to produce the final LLVM file, with the+-- SDoc being returned alongside for use when @Opt_D_dump_llvm@ is set+-- as we can't (currently) dump HDocs.+pprLlvmCmmDecl :: LlvmCmmDecl -> LlvmM (HDoc, SDoc) pprLlvmCmmDecl (CmmData _ lmdata) = do opts <- getConfig- return (vcat $ map (pprLlvmData opts) lmdata, [])+ return ( vcat $ map (pprLlvmData opts) lmdata+ , vcat $ map (pprLlvmData opts) lmdata) pprLlvmCmmDecl (CmmProc mb_info entry_lbl live (ListGraph blks)) = do let lbl = case mb_info of@@ -92,7 +98,8 @@ (Just $ LMBitc (LMStaticPointer defVar) i8Ptr) - return (ppLlvmGlobal cfg alias $+$ ppLlvmFunction cfg fun', [])+ return ( vcat [line $ ppLlvmGlobal cfg alias, ppLlvmFunction cfg fun']+ , vcat [line $ ppLlvmGlobal cfg alias, ppLlvmFunction cfg fun']) -- | The section we are putting info tables and their entry code into, should
GHC/CmmToLlvm/Regs.hs view
@@ -37,16 +37,16 @@ BaseReg -> ptrGlobal $ "Base" ++ suf Sp -> ptrGlobal $ "Sp" ++ suf Hp -> ptrGlobal $ "Hp" ++ suf- VanillaReg 1 _ -> wordGlobal $ "R1" ++ suf- VanillaReg 2 _ -> wordGlobal $ "R2" ++ suf- VanillaReg 3 _ -> wordGlobal $ "R3" ++ suf- VanillaReg 4 _ -> wordGlobal $ "R4" ++ suf- VanillaReg 5 _ -> wordGlobal $ "R5" ++ suf- VanillaReg 6 _ -> wordGlobal $ "R6" ++ suf- VanillaReg 7 _ -> wordGlobal $ "R7" ++ suf- VanillaReg 8 _ -> wordGlobal $ "R8" ++ suf- VanillaReg 9 _ -> wordGlobal $ "R9" ++ suf- VanillaReg 10 _ -> wordGlobal $ "R10" ++ suf+ VanillaReg 1 -> wordGlobal $ "R1" ++ suf+ VanillaReg 2 -> wordGlobal $ "R2" ++ suf+ VanillaReg 3 -> wordGlobal $ "R3" ++ suf+ VanillaReg 4 -> wordGlobal $ "R4" ++ suf+ VanillaReg 5 -> wordGlobal $ "R5" ++ suf+ VanillaReg 6 -> wordGlobal $ "R6" ++ suf+ VanillaReg 7 -> wordGlobal $ "R7" ++ suf+ VanillaReg 8 -> wordGlobal $ "R8" ++ suf+ VanillaReg 9 -> wordGlobal $ "R9" ++ suf+ VanillaReg 10 -> wordGlobal $ "R10" ++ suf SpLim -> wordGlobal $ "SpLim" ++ suf FloatReg 1 -> floatGlobal $ "F1" ++ suf FloatReg 2 -> floatGlobal $ "F2" ++ suf@@ -129,8 +129,8 @@ -- | Get the correct TBAA metadata information for this register type getTBAA :: GlobalReg -> Unique-getTBAA BaseReg = baseN-getTBAA Sp = stackN-getTBAA Hp = heapN-getTBAA (VanillaReg _ _) = rxN-getTBAA _ = topN+getTBAA BaseReg = baseN+getTBAA Sp = stackN+getTBAA Hp = heapN+getTBAA (VanillaReg _) = rxN+getTBAA _ = topN
GHC/Core.hs view
@@ -292,7 +292,7 @@ -- This instance is a bit shady. It can only be used to compare AltCons for -- a single type constructor. Fortunately, it seems quite unlikely that we'll -- ever need to compare AltCons for different type constructors.--- The instance adheres to the order described in [Core case invariants]+-- The instance adheres to the order described in Note [Case expression invariants] instance Ord AltCon where compare (DataAlt con1) (DataAlt con2) = assert (dataConTyCon con1 == dataConTyCon con2) $@@ -368,37 +368,36 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Core letrec invariant: - The right hand sides of all- /top-level/ or /recursive/- bindings must be of lifted type-- There is one exception to this rule, top-level @let@s are- allowed to bind primitive string literals: see- Note [Core top-level string literals].+ The right hand sides of all /top-level/ or /recursive/+ bindings must be of lifted type See "Type#type_classification" in GHC.Core.Type-for the meaning of "lifted" vs. "unlifted").--For the non-top-level, non-recursive case see Note [Core let-can-float invariant].+for the meaning of "lifted" vs. "unlifted". -Note [Compilation plan for top-level string literals]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Here is a summary on how top-level string literals are handled by various-parts of the compilation pipeline.+For the non-top-level, non-recursive case see+Note [Core let-can-float invariant]. -* In the source language, there is no way to bind a primitive string literal- at the top level.+At top level, however, there are two exceptions to this rule: -* In Core, we have a special rule that permits top-level Addr# bindings. See- Note [Core top-level string literals]. Core-to-core passes may introduce- new top-level string literals.+(TL1) A top-level binding is allowed to bind primitive string literal,+ (which is unlifted). See Note [Core top-level string literals]. -* In STG, top-level string literals are explicitly represented in the syntax- tree.+(TL2) In Core, we generate a top-level binding for every non-newtype data+constructor worker or wrapper+ e.g. data T = MkT Int+ we generate+ MkT :: Int -> T+ MkT = \x. MkT x+ (This binding looks recursive, but isn't; it defines a top-level, curried+ function whose body just allocates and returns the data constructor.) -* A top-level string literal may end up exported from a module. In this case,- in the object file, the content of the exported literal is given a label with- the _bytes suffix.+ But if (a) the data contructor is nullary and (b) the data type is unlifted,+ this binding is unlifted.+ e.g. data S :: UnliftedType where { S1 :: S, S2 :: S -> S }+ we generate+ S1 :: S -- A top-level unlifted binding+ S1 = S1+ We allow this top-level unlifted binding to exist. Note [Core let-can-float invariant] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -496,6 +495,45 @@ in the object file, the content of the exported literal is given a label with the _bytes suffix. +Note [NON-BOTTOM-DICTS invariant]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+It is a global invariant (not checkable by Lint) that++ every non-newtype dictionary-typed expression is non-bottom.++These conditions are captured by GHC.Core.Type.isTerminatingType.++How are we so sure about this? Dictionaries are built by GHC in only two ways:++* A dictionary function (DFun), arising from an instance declaration.+ DFuns do no computation: they always return a data constructor immediately.+ See DFunUnfolding in GHC.Core. So the result of a call to a DFun is always+ non-bottom.++ Exception: newtype dictionaries.++ Plus: see the Very Nasty Wrinkle in Note [Speculative evaluation]+ in GHC.CoreToStg.Prep++* A superclass selection from some other dictionary. This is harder to guarantee:+ see Note [Recursive superclasses] and Note [Solving superclass constraints]+ in GHC.Tc.TyCl.Instance.++A bad Core-to-Core pass could invalidate this reasoning, but that's too bad.+It's still an invariant of Core programs generated by GHC from Haskell, and+Core-to-Core passes maintain it.++Why is it useful to know that dictionaries are non-bottom?++1. It justifies the use of `-XDictsStrict`;+ see `GHC.Core.Types.Demand.strictifyDictDmd`++2. It means that (eq_sel d) is ok-for-speculation and thus+ case (eq_sel d) of _ -> blah+ can be discarded by the Simplifier. See these Notes:+ Note [exprOkForSpeculation and type classes] in GHC.Core.Utils+ Note[Speculative evaluation] in GHC.CoreToStg.Prep+ Note [Case expression invariants] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Case expressions are one of the more complicated elements of the Core@@ -584,11 +622,7 @@ case (df @Int) of (co :: a ~# b) -> blah Which is very exotic, and I think never encountered; but see Note [Equality superclasses in quantified constraints]- in GHC.Tc.Solver.Canonical--Note [Core case invariants]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-See Note [Case expression invariants]+ in GHC.Tc.Solver.Dict Note [Representation polymorphism invariants] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -657,12 +691,6 @@ See Note [Representation polymorphism checking] in GHC.Tc.Utils.Concrete for an overview of how we enforce these invariants in the typechecker. -Note [Core let goal]-~~~~~~~~~~~~~~~~~~~~-* The simplifier tries to ensure that if the RHS of a let is a constructor- application, its arguments are trivial, so that the constructor can be- inlined vigorously.- Note [Empty case alternatives] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The alternatives of a case expression should be exhaustive. But@@ -1107,7 +1135,7 @@ Orphan-hood is computed * For class instances:- when we make a ClsInst in GHC.Core.InstEnv.mkLocalInstance+ when we make a ClsInst in GHC.Core.InstEnv.mkLocalClsInst (because it is needed during instance lookup) See Note [When exactly is an instance decl an orphan?] in GHC.Core.InstEnv@@ -2101,7 +2129,7 @@ stripNArgs n (App f _) = stripNArgs (n - 1) f stripNArgs _ _ = Nothing --- | Like @collectArgs@, but also collects looks through floatable+-- | Like @collectArgs@, but also looks through floatable -- ticks if it means that we can find more arguments. collectArgsTicks :: (CoreTickish -> Bool) -> Expr b -> (Expr b, [Arg b], [CoreTickish])
GHC/Core/Class.hs view
@@ -17,8 +17,8 @@ mkClass, mkAbstractClass, classTyVars, classArity, classKey, className, classATs, classATItems, classTyCon, classMethods, classOpItems, classBigSig, classExtraBigSig, classTvsFds, classSCTheta,- classAllSelIds, classSCSelId, classSCSelIds, classMinimalDef, classHasFds,- isAbstractClass,+ classHasSCs, classAllSelIds, classSCSelId, classSCSelIds, classMinimalDef,+ classHasFds, isAbstractClass, ) where import GHC.Prelude@@ -294,6 +294,9 @@ classSCTheta (Class { classBody = ConcreteClass { cls_sc_theta = theta_stuff }}) = theta_stuff classSCTheta _ = []++classHasSCs :: Class -> Bool+classHasSCs cls = not (null (classSCTheta cls)) classTvsFds :: Class -> ([TyVar], [FunDep TyVar]) classTvsFds c = (classTyVars c, classFunDeps c)
GHC/Core/Coercion.hs view
@@ -39,8 +39,8 @@ mkSymCo, mkTransCo, mkSelCo, getNthFun, getNthFromType, mkLRCo, mkInstCo, mkAppCo, mkAppCos, mkTyConAppCo,- mkFunCo1, mkFunCo2, mkFunCoNoFTF, mkFunResCo,- mkNakedFunCo1, mkNakedFunCo2,+ mkFunCo, mkFunCo2, mkFunCoNoFTF, mkFunResCo,+ mkNakedFunCo, mkForAllCo, mkForAllCos, mkHomoForAllCos, mkPhantomCo, mkHoleCo, mkUnivCo, mkSubCo,@@ -51,7 +51,7 @@ castCoercionKind, castCoercionKind1, castCoercionKind2, mkPrimEqPred, mkReprPrimEqPred, mkPrimEqPredRole,- mkHeteroPrimEqPred, mkHeteroReprPrimEqPred,+ mkNomPrimEqPred, -- ** Decomposition instNewTyCon_maybe,@@ -811,29 +811,20 @@ -- or @(a => x) ~ (b => y)@, depending on the kind of @a@/@b@. -- This (most common) version takes a single FunTyFlag, which is used -- for both fco_afl and ftf_afr of the FunCo-mkFunCo1 :: HasDebugCallStack => Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion-mkFunCo1 r af w arg_co res_co+mkFunCo :: Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion+mkFunCo r af w arg_co res_co = mkFunCo2 r af af w arg_co res_co -mkNakedFunCo1 :: Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion--- This version of mkFunCo1 does not check FunCo invariants (checkFunCo)--- It is called during typechecking on un-zonked types;--- in particular there may be un-zonked coercion variables.-mkNakedFunCo1 r af w arg_co res_co- = mkNakedFunCo2 r af af w arg_co res_co+mkNakedFunCo :: Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion+-- This version of mkFunCo does not check FunCo invariants (checkFunCo)+-- It's a historical vestige; See Note [No assertion check on mkFunCo]+mkNakedFunCo = mkFunCo -mkFunCo2 :: HasDebugCallStack => Role -> FunTyFlag -> FunTyFlag- -> CoercionN -> Coercion -> Coercion -> Coercion+mkFunCo2 :: Role -> FunTyFlag -> FunTyFlag+ -> CoercionN -> Coercion -> Coercion -> Coercion -- This is the smart constructor for FunCo; it checks invariants mkFunCo2 r afl afr w arg_co res_co- = assertPprMaybe (checkFunCo r afl afr w arg_co res_co) $- mkNakedFunCo2 r afl afr w arg_co res_co--mkNakedFunCo2 :: Role -> FunTyFlag -> FunTyFlag- -> CoercionN -> Coercion -> Coercion -> Coercion--- This is the smart constructor for FunCo--- "Naked"; it does not check invariants-mkNakedFunCo2 r afl afr w arg_co res_co+ -- See Note [No assertion check on mkFunCo] | Just (ty1, _) <- isReflCo_maybe arg_co , Just (ty2, _) <- isReflCo_maybe res_co , Just (w, _) <- isReflCo_maybe w@@ -844,6 +835,19 @@ , fco_mult = w, fco_arg = arg_co, fco_res = res_co } +{- Note [No assertion check on mkFunCo]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We used to have a checkFunCo assertion on mkFunCo, but during typechecking+we can (legitimately) have not-full-zonked types or coercion variables, so+the assertion spuriously fails (test T11480b is a case in point). Lint+checks all these things anyway.++We used to get around the problem by calling mkNakedFunCo from within the+typechecker, which dodged the assertion check. But then mkAppCo calls+mkTyConAppCo, which calls tyConAppFunCo_maybe, which calls mkFunCo.+Duplicating this stack of calls with "naked" versions of each seems too much.++-- Commented out: see Note [No assertion check on mkFunCo] checkFunCo :: Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Maybe SDoc@@ -875,6 +879,7 @@ ok ty = isTYPEorCONSTRAINT (typeKind ty) pp_ty str ty = text str <> colon <+> hang (ppr ty) 2 (dcolon <+> ppr (typeKind ty))+-} -- | Apply a 'Coercion' to another 'Coercion'. -- The second coercion must be Nominal, unless the first is Phantom.@@ -2081,7 +2086,7 @@ liftCoSubstTyVar lc r tv go r (AppTy ty1 ty2) = mkAppCo (go r ty1) (go Nominal ty2) go r (TyConApp tc tys) = mkTyConAppCo r tc (zipWith go (tyConRoleListX r tc) tys)- go r (FunTy af w t1 t2) = mkFunCo1 r af (go Nominal w) (go r t1) (go r t2)+ go r (FunTy af w t1 t2) = mkFunCo r af (go Nominal w) (go r t1) (go r t2) go r t@(ForAllTy (Bndr v _) ty) = let (lc', v', h) = liftCoSubstVarBndr lc v body_co = ty_co_subst lc' r ty in@@ -2610,7 +2615,8 @@ in TyConApp eqPhantPrimTyCon [ki1, ki2, ty1, ty2] --- | Creates a primitive type equality predicate.+-- | Creates a primitive nominal type equality predicate.+-- t1 ~# t2 -- Invariant: the types are not Coercions mkPrimEqPred :: Type -> Type -> Type mkPrimEqPred ty1 ty2@@ -2619,22 +2625,9 @@ k1 = typeKind ty1 k2 = typeKind ty2 --- | Makes a lifted equality predicate at the given role-mkPrimEqPredRole :: Role -> Type -> Type -> PredType-mkPrimEqPredRole Nominal = mkPrimEqPred-mkPrimEqPredRole Representational = mkReprPrimEqPred-mkPrimEqPredRole Phantom = panic "mkPrimEqPredRole phantom"---- | Creates a primitive type equality predicate with explicit kinds-mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type-mkHeteroPrimEqPred k1 k2 ty1 ty2 = mkTyConApp eqPrimTyCon [k1, k2, ty1, ty2]---- | Creates a primitive representational type equality predicate--- with explicit kinds-mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type-mkHeteroReprPrimEqPred k1 k2 ty1 ty2- = mkTyConApp eqReprPrimTyCon [k1, k2, ty1, ty2]-+-- | Creates a primitive representational type equality predicate.+-- t1 ~R# t2+-- Invariant: the types are not Coercions mkReprPrimEqPred :: Type -> Type -> Type mkReprPrimEqPred ty1 ty2 = mkTyConApp eqReprPrimTyCon [k1, k2, ty1, ty2]@@ -2642,6 +2635,17 @@ k1 = typeKind ty1 k2 = typeKind ty2 +-- | Makes a lifted equality predicate at the given role+mkPrimEqPredRole :: Role -> Type -> Type -> PredType+mkPrimEqPredRole Nominal = mkPrimEqPred+mkPrimEqPredRole Representational = mkReprPrimEqPred+mkPrimEqPredRole Phantom = panic "mkPrimEqPredRole phantom"++-- | Creates a primitive nominal type equality predicate with an explicit+-- (but homogeneous) kind: (~#) k k ty1 ty2+mkNomPrimEqPred :: Kind -> Type -> Type -> Type+mkNomPrimEqPred k ty1 ty2 = mkTyConApp eqPrimTyCon [k, k, ty1, ty2]+ -- | Assuming that two types are the same, ignoring coercions, find -- a nominal coercion between the types. This is useful when optimizing -- transitivity over coercion applications, where splitting two@@ -2672,7 +2676,7 @@ go (FunTy { ft_af = af1, ft_mult = w1, ft_arg = arg1, ft_res = res1 }) (FunTy { ft_af = af2, ft_mult = w2, ft_arg = arg2, ft_res = res2 }) = assert (af1 == af2) $- mkFunCo1 Nominal af1 (go w1 w2) (go arg1 arg2) (go res1 res2)+ mkFunCo Nominal af1 (go w1 w2) (go arg1 arg2) (go res1 res2) go (TyConApp tc1 args1) (TyConApp tc2 args2) = assert (tc1 == tc2) $@@ -2753,15 +2757,17 @@ folder = TyCoFolder { tcf_view = noView , tcf_tyvar = const2 (Monoid.Any False) , tcf_covar = const2 (Monoid.Any False)- , tcf_hole = const2 (Monoid.Any True)+ , tcf_hole = \_ hole -> Monoid.Any (isHeteroKindCoHole hole) , tcf_tycobinder = const2 } --- | Is there a coercion hole in this type?+-- | Is there a hetero-kind coercion hole in this type?+-- (That is, a coercion hole with ch_hetero_kind=True.)+-- See wrinkle (EIK2) of Note [Equalities with incompatible kinds] in GHC.Tc.Solver.Equality hasCoercionHoleTy :: Type -> Bool hasCoercionHoleTy = Monoid.getAny . has_co_hole_ty --- | Is there a coercion hole in this coercion?+-- | Is there a hetero-kind coercion hole in this coercion? hasCoercionHoleCo :: Coercion -> Bool hasCoercionHoleCo = Monoid.getAny . has_co_hole_co
GHC/Core/Coercion.hs-boot view
@@ -17,9 +17,9 @@ mkTyConAppCo :: HasDebugCallStack => Role -> TyCon -> [Coercion] -> Coercion mkAppCo :: Coercion -> Coercion -> Coercion mkForAllCo :: TyCoVar -> Coercion -> Coercion -> Coercion-mkFunCo1 :: HasDebugCallStack => Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion-mkNakedFunCo1 :: Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion-mkFunCo2 :: HasDebugCallStack => Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion+mkFunCo :: Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion+mkNakedFunCo :: Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion+mkFunCo2 :: Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion mkCoVarCo :: CoVar -> Coercion mkAxiomInstCo :: CoAxiom Branched -> BranchIndex -> [Coercion] -> Coercion mkPhantomCo :: Coercion -> Type -> Type -> Coercion@@ -36,6 +36,8 @@ mkProofIrrelCo :: Role -> Coercion -> Coercion -> Coercion -> Coercion mkAxiomRuleCo :: CoAxiomRule -> [Coercion] -> Coercion +funRole :: Role -> FunSel -> Role+ isGReflCo :: Coercion -> Bool isReflCo :: Coercion -> Bool isReflexiveCo :: Coercion -> Bool@@ -45,8 +47,6 @@ mkCoercionType :: Role -> Type -> Type -> Type -data LiftingContext-liftCoSubst :: HasDebugCallStack => Role -> LiftingContext -> Type -> Coercion seqCo :: Coercion -> () coercionKind :: Coercion -> Pair Type
GHC/Core/Coercion/Opt.hs view
@@ -4,7 +4,6 @@ module GHC.Core.Coercion.Opt ( optCoercion- , checkAxInstCo , OptCoercionOpts (..) ) where@@ -804,37 +803,38 @@ -- Push transitivity inside axioms opt_trans_rule is co1 co2 - -- See Note [Why call checkAxInstCo during optimisation]+ -- See Note [Push transitivity inside axioms] and+ -- Note [Push transitivity inside newtype axioms only] -- TrPushSymAxR | Just (sym, con, ind, cos1) <- co1_is_axiom_maybe+ , isNewTyCon (coAxiomTyCon con) , True <- sym , Just cos2 <- matchAxiom sym con ind co2 , let newAxInst = AxiomInstCo con ind (opt_transList is (map mkSymCo cos2) cos1)- , Nothing <- checkAxInstCo newAxInst = fireTransRule "TrPushSymAxR" co1 co2 $ SymCo newAxInst -- TrPushAxR | Just (sym, con, ind, cos1) <- co1_is_axiom_maybe+ , isNewTyCon (coAxiomTyCon con) , False <- sym , Just cos2 <- matchAxiom sym con ind co2 , let newAxInst = AxiomInstCo con ind (opt_transList is cos1 cos2)- , Nothing <- checkAxInstCo newAxInst = fireTransRule "TrPushAxR" co1 co2 newAxInst -- TrPushSymAxL | Just (sym, con, ind, cos2) <- co2_is_axiom_maybe+ , isNewTyCon (coAxiomTyCon con) , True <- sym , Just cos1 <- matchAxiom (not sym) con ind co1 , let newAxInst = AxiomInstCo con ind (opt_transList is cos2 (map mkSymCo cos1))- , Nothing <- checkAxInstCo newAxInst = fireTransRule "TrPushSymAxL" co1 co2 $ SymCo newAxInst -- TrPushAxL | Just (sym, con, ind, cos2) <- co2_is_axiom_maybe+ , isNewTyCon (coAxiomTyCon con) , False <- sym , Just cos1 <- matchAxiom (not sym) con ind co1 , let newAxInst = AxiomInstCo con ind (opt_transList is cos1 cos2)- , Nothing <- checkAxInstCo newAxInst = fireTransRule "TrPushAxL" co1 co2 newAxInst -- TrPushAxSym/TrPushSymAx@@ -915,30 +915,87 @@ = Just res {--Note [Conflict checking with AxiomInstCo]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider the following type family and axiom:+Note [Push transitivity inside axioms]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+opt_trans_rule tries to push transitivity inside axioms to deal with cases like+the following: -type family Equal (a :: k) (b :: k) :: Bool-type instance where- Equal a a = True- Equal a b = False----Equal :: forall k::*. k -> k -> Bool-axEqual :: { forall k::*. forall a::k. Equal k a a ~ True- ; forall k::*. forall a::k. forall b::k. Equal k a b ~ False }+ newtype N a = MkN a -We wish to disallow (axEqual[1] <*> <Int> <Int). (Recall that the index is-0-based, so this is the second branch of the axiom.) The problem is that, on-the surface, it seems that (axEqual[1] <*> <Int> <Int>) :: (Equal * Int Int ~-False) and that all is OK. But, all is not OK: we want to use the first branch-of the axiom in this case, not the second. The problem is that the parameters-of the first branch can unify with the supplied coercions, thus meaning that-the first branch should be taken. See also Note [Apartness] in-"GHC.Core.FamInstEnv".+ axN :: N a ~R# a + covar :: a ~R# b+ co1 = axN <a> :: N a ~R# a+ co2 = axN <b> :: N b ~R# b++ co :: a ~R# b+ co = sym co1 ; N covar ; co2++When we are optimising co, we want to notice that the two axiom instantiations+cancel out. This is implemented by rules such as TrPushSymAxR, which transforms+ sym (axN <a>) ; N covar+into+ sym (axN covar)+so that TrPushSymAx can subsequently transform+ sym (axN covar) ; axN <b>+into+ covar+which is much more compact. In some perf test cases this kind of pattern can be+generated repeatedly during simplification, so it is very important we squash it+to stop coercions growing exponentially. For more details see the paper:++ Evidence normalisation in System FC+ Dimitrios Vytiniotis and Simon Peyton Jones+ RTA'13, 2013+ https://www.microsoft.com/en-us/research/publication/evidence-normalization-system-fc-2/+++Note [Push transitivity inside newtype axioms only]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The optimization described in Note [Push transitivity inside axioms] is possible+for both newtype and type family axioms. However, for type family axioms it is+relatively common to have transitive sequences of axioms instantiations, for+example:++ data Nat = Zero | Suc Nat++ type family Index (n :: Nat) (xs :: [Type]) :: Type where+ Index Zero (x : xs) = x+ Index (Suc n) (x : xs) = Index n xs++ axIndex :: { forall x::Type. forall xs::[Type]. Index Zero (x : xs) ~ x+ ; forall n::Nat. forall x::Type. forall xs::[Type]. Index (Suc n) (x : xs) ~ Index n xs }++ co :: Index (Suc (Suc Zero)) [a, b, c] ~ c+ co = axIndex[1] <Suc Zero> <a> <[b, c]>+ ; axIndex[1] <Zero> <b> <[c]>+ ; axIndex[0] <c> <[]>++Not only are there no cancellation opportunities here, but calling matchAxiom+repeatedly down the transitive chain is very expensive. Hence we do not attempt+to push transitivity inside type family axioms. See #8095, !9210 and related tickets.++This is implemented by opt_trans_rule checking that the axiom is for a newtype+constructor (i.e. not a type family). Adding these guards substantially+improved performance (reduced bytes allocated by more than 10%) for the tests+CoOpt_Singletons, LargeRecord, T12227, T12545, T13386, T15703, T5030, T8095.++A side benefit is that we do not risk accidentally creating an ill-typed+coercion; see Note [Why call checkAxInstCo during optimisation].++There may exist programs that previously relied on pushing transitivity inside+type family axioms to avoid creating huge coercions, which will regress in+compile time performance as a result of this change. We do not currently know+of any examples, but if any come to light we may need to reconsider this+behaviour.++ Note [Why call checkAxInstCo during optimisation] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+NB: The following is no longer relevant, because we no longer push transitivity+into type family axioms (Note [Push transitivity inside newtype axioms only]).+It is retained for reference in case we change this behaviour in the future.+ It is possible that otherwise-good-looking optimisations meet with disaster in the presence of axioms with multiple equations. Consider @@ -1028,39 +1085,6 @@ The problem described here was first found in dependent/should_compile/dynamic-paper. -}---- | Check to make sure that an AxInstCo is internally consistent.--- Returns the conflicting branch, if it exists--- See Note [Conflict checking with AxiomInstCo]-checkAxInstCo :: Coercion -> Maybe CoAxBranch--- defined here to avoid dependencies in GHC.Core.Coercion--- If you edit this function, you may need to update the GHC formalism--- See Note [GHC Formalism] in GHC.Core.Lint-checkAxInstCo (AxiomInstCo ax ind cos)- = let branch = coAxiomNthBranch ax ind- tvs = coAxBranchTyVars branch- cvs = coAxBranchCoVars branch- incomps = coAxBranchIncomps branch- (tys, cotys) = splitAtList tvs (map coercionLKind cos)- co_args = map stripCoercionTy cotys- subst = zipTvSubst tvs tys `composeTCvSubst`- zipCvSubst cvs co_args- target = Type.substTys subst (coAxBranchLHS branch)- in_scope = mkInScopeSet $- unionVarSets (map (tyCoVarsOfTypes . coAxBranchLHS) incomps)- flattened_target = flattenTys in_scope target in- check_no_conflict flattened_target incomps- where- check_no_conflict :: [Type] -> [CoAxBranch] -> Maybe CoAxBranch- check_no_conflict _ [] = Nothing- check_no_conflict flat (b@CoAxBranch { cab_lhs = lhs_incomp } : rest)- -- See Note [Apartness] in GHC.Core.FamInstEnv- | SurelyApart <- tcUnifyTysFG alwaysBindFun flat lhs_incomp- = check_no_conflict flat rest- | otherwise- = Just b-checkAxInstCo _ = Nothing- ----------- wrapSym :: SymFlag -> Coercion -> Coercion
GHC/Core/ConLike.hs view
@@ -9,9 +9,11 @@ module GHC.Core.ConLike ( ConLike(..)+ , conLikeConLikeName , isVanillaConLike , conLikeArity , conLikeFieldLabels+ , conLikeConInfo , conLikeInstOrigArgTys , conLikeUserTyVarBinders , conLikeExTyCoVars@@ -29,16 +31,19 @@ import GHC.Prelude import GHC.Core.DataCon+import GHC.Core.Multiplicity import GHC.Core.PatSyn-import GHC.Utils.Outputable+import GHC.Core.TyCo.Rep (Type, ThetaType)+import GHC.Core.Type(mkTyConApp) import GHC.Types.Unique-import GHC.Utils.Misc import GHC.Types.Name+import GHC.Types.Name.Reader import GHC.Types.Basic-import GHC.Core.TyCo.Rep (Type, ThetaType)++import GHC.Types.GREInfo import GHC.Types.Var-import GHC.Core.Type(mkTyConApp)-import GHC.Core.Multiplicity+import GHC.Utils.Misc+import GHC.Utils.Outputable import Data.Maybe( isJust ) import qualified Data.Data as Data@@ -61,6 +66,10 @@ isVanillaConLike (RealDataCon con) = isVanillaDataCon con isVanillaConLike (PatSynCon ps ) = isVanillaPatSyn ps +conLikeConLikeName :: ConLike -> ConLikeName+conLikeConLikeName (RealDataCon dc) = DataConName (dataConName dc)+conLikeConLikeName (PatSynCon ps) = PatSynName (patSynName ps)+ {- ************************************************************************ * *@@ -112,6 +121,11 @@ conLikeFieldLabels :: ConLike -> [FieldLabel] conLikeFieldLabels (RealDataCon data_con) = dataConFieldLabels data_con conLikeFieldLabels (PatSynCon pat_syn) = patSynFieldLabels pat_syn++-- | The 'ConInfo' (arity and field labels) associated to a 'ConLike'.+conLikeConInfo :: ConLike -> ConInfo+conLikeConInfo con =+ mkConInfo (conLikeArity con) (conLikeFieldLabels con) -- | Returns just the instantiated /value/ argument types of a 'ConLike', -- (excluding dictionary args)
GHC/Core/DataCon.hs view
@@ -22,7 +22,7 @@ eqSpecPair, eqSpecPreds, -- ** Field labels- FieldLabel(..), FieldLabelString,+ FieldLabel(..), flLabel, FieldLabelString, -- ** Type construction mkDataCon, fIRST_TAG,@@ -141,9 +141,21 @@ case e of { T a' b -> let a = I# a' in ... } To keep ourselves sane, we name the different versions of the data constructor-differently, as follows.+differently, as follows in Note [Data Constructor Naming]. +The `dcRepType` field of a `DataCon` contains the type of the representation of+the constructor /worker/, also called the Core representation. +The Core representation may differ from the type of the constructor /wrapper/+(built by `mkDataConRep`). Besides unpacking (as seen in the example above),+dictionaries and coercions become explict arguments in the Core representation+of a constructor.++Note that this representation is still *different* from runtime+representation. (Which is what STG uses after unarise).+See Note [Constructor applications in STG] in GHC.Stg.Syntax.++ Note [Data Constructor Naming] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Each data constructor C has two, and possibly up to four, Names associated with it:@@ -209,7 +221,8 @@ * See Note [Data Constructor Naming] for how the worker and wrapper are named -* Neither_ the worker _nor_ the wrapper take the dcStupidTheta dicts as arguments+* The workers don't take the dcStupidTheta dicts as arguments, while the+ wrappers currently do * The wrapper (if it exists) takes dcOrigArgTys as its arguments. The worker takes dataConRepArgTys as its arguments@@ -528,7 +541,7 @@ -- forall a x y. (a~(x,y), x~y, Ord x) => -- x -> y -> T a -- (this is *not* of the constructor wrapper Id:- -- see Note [Data con representation] below)+ -- see Note [Data constructor representation]) -- Notice that the existential type parameters come *second*. -- Reason: in a case expression we may find: -- case (e :: T t) of@@ -586,12 +599,22 @@ Note [DataCon arities] ~~~~~~~~~~~~~~~~~~~~~~-A `DataCon`'s source arity and core representation arity may differ:-`dcSourceArity` does not take constraints into account, but `dcRepArity` does.+A `DataCon`'s source and core representation may differ, meaning the source+arity (`dcSourceArity`) and the core representation arity (`dcRepArity`) may+differ too. -The additional arguments taken into account by `dcRepArity` include quantified-dictionaries and coercion arguments, lifted and unlifted (despite the unlifted-coercion arguments having a zero-width runtime representation).+Note that the source arity isn't exactly the number of arguments the data con+/wrapper/ has, since `dcSourceArity` doesn't count constraints -- which may+appear in the wrapper through `DatatypeContexts`, or if the constructor stores a+dictionary. In this sense, the source arity counts the number of non-constraint+arguments that appear at the source level.+ On the other hand, the Core representation arity is the number of arguments+of the data constructor in its Core representation, which is also the number+of arguments of the data con /worker/.++The arity might differ since `dcRepArity` takes into account arguments such as+quantified dictionaries and coercion arguments, lifted and unlifted (despite+the unlifted coercion arguments having a zero-width runtime representation). For example: MkT :: Ord a => a -> T a dcSourceArity = 1@@ -601,7 +624,16 @@ dcSourceArity = 0 dcRepArity = 1 +The arity might also differ due to unpacking, for example, consider the+following datatype and its wrapper and worker's type:+ data V = MkV !() !Int+ $WMkV :: () -> Int -> V+ MkV :: Int# -> V+As you see, because of unpacking we have both dropped the unit argument and+unboxed the Int. In this case, the source arity (which is the arity of the+wrapper) is 2, while the Core representation arity (the arity of the worker) is 1. + Note [DataCon user type variable binders] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A DataCon has two different sets of type variables:@@ -625,7 +657,7 @@ (that is, they are TyVars/TyCoVars instead of ForAllTyBinders). Often (dcUnivTyVars ++ dcExTyCoVars) = dcUserTyVarBinders; but they may differ-for three reasons, coming next:+for two reasons, coming next: --- Reason (R1): Order of quantification in GADT syntax --- @@ -714,55 +746,6 @@ equation in the dcEqSpec will be in dcUnivTyVars but *not* in dcUserTyVarBinders. ---- Reason (R3): Kind equalities may have been solved -----Consider now this case:-- type family F a where- F Type = False- F _ = True- type T :: forall k. (F k ~ True) => k -> k -> Type- data T a b where- MkT :: T Maybe List--The constraint F k ~ True tells us that T does not want to be indexed by, say,-Int. Now let's consider the Core types involved:-- axiom for F: axF[0] :: F Type ~ False- axF[1] :: forall a. F a ~ True (a must be apart from Type)- tycon: T :: forall k. (F k ~ True) -> k -> k -> Type- wrapper: MkT :: T @(Type -> Type) @(Eq# (axF[1] (Type -> Type)) Maybe List- worker: MkT :: forall k (c :: F k ~ True) (a :: k) (b :: k).- (k ~# (Type -> Type), a ~# Maybe, b ~# List) =>- T @k @c a b--The key observation here is that the worker quantifies over c, while the wrapper-does not. The worker *must* quantify over c, because c is a universal variable,-and the result of the worker must be the type constructor applied to a sequence-of plain type variables. But the wrapper certainly does not need to quantify over-any evidence that F (Type -> Type) ~ True, as no variables are needed there.--(Aside: the c here is a regular type variable, *not* a coercion variable. This-is because F k ~ True is a *lifted* equality, not the unlifted ~#. This is why-we see Eq# in the type of the wrapper: Eq# boxes the unlifted ~# to become a-lifted ~. See also Note [The equality types story] in GHC.Builtin.Types.Prim about-Eq# and Note [Constraints in kinds] in GHC.Core.TyCo.Rep about having this constraint-in the first place.)--In this case, we'll have these fields of the DataCon:-- dcUserTyVarBinders = [] -- the wrapper quantifies over nothing- dcUnivTyVars = [k, c, a, b]- dcExTyCoVars = [] -- no existentials here, but a different constructor might have- dcEqSpec = [k ~# (Type -> Type), a ~# Maybe, b ~# List]--Note that c is in the dcUserTyVars, but mentioned neither in the dcUserTyVarBinders nor-in the dcEqSpec. We thus have Reason (R3): a variable might be missing from the-dcUserTyVarBinders if its type's kind is Constraint.--(At one point, we thought that the dcEqSpec would have to be non-empty. But that-wouldn't account for silly cases like type T :: (True ~ True) => Type.)- --- End of Reasons --- INVARIANT(dataConTyVars): the set of tyvars in dcUserTyVarBinders@@ -859,7 +842,7 @@ -- emit a warning (in checkValidDataCon) and treat it like -- @(HsSrcBang _ NoSrcUnpack SrcLazy)@ data HsSrcBang =- HsSrcBang SourceText -- Note [Pragma source text] in GHC.Types.SourceText+ HsSrcBang SourceText -- Note [Pragma source text] in "GHC.Types.SourceText" SrcUnpackedness SrcStrictness deriving Data.Data@@ -1018,52 +1001,7 @@ The boolean flag is used only for this warning. See #11270 for motivation. -Note [Data con representation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The dcRepType field contains the type of the representation of a constructor-This may differ from the type of the constructor *Id* (built-by MkId.mkDataConId) for two reasons:- a) the constructor Id may be overloaded, but the dictionary isn't stored- e.g. data Eq a => T a = MkT a a - b) the constructor may store an unboxed version of a strict field.--So whenever this module talks about the representation of a data constructor-what it means is the DataCon with all Unpacking having been applied.-We can think of this as the Core representation.--Here's an example illustrating the Core representation:- data Ord a => T a = MkT Int! a Void#-Here- T :: Ord a => Int -> a -> Void# -> T a-but the rep type is- Trep :: Int# -> a -> Void# -> T a-Actually, the unboxed part isn't implemented yet!--Note that this representation is still *different* from runtime-representation. (Which is what STG uses after unarise).--This is how T would end up being used in STG post-unarise:-- let x = T 1# y- in ...- case x of- T int a -> ...--The Void# argument is dropped and the boxed int is replaced by an unboxed-one. In essence we only generate binders for runtime relevant values.--We also flatten out unboxed tuples in this process. See the unarise-pass for details on how this is done. But as an example consider-`data S = MkS Bool (# Bool | Char #)` which when matched on would-result in an alternative with three binders like this-- MkS bool tag tpl_field ->--See Note [Translating unboxed sums to unboxed tuples] and Note [Unarisation]-for the details of this transformation.-- ************************************************************************ * * \subsection{Instances}@@ -1279,11 +1217,9 @@ -- fresh_names: make sure that the "anonymous" tyvars don't -- clash in name or unique with the universal/existential ones. -- Tiresome! And unnecessary because these tyvars are never looked at- prom_theta_bndrs = [ mkInvisAnonTyConBinder (mkTyVar n t)- {- Invisible -} | (n,t) <- fresh_names `zip` theta ] prom_arg_bndrs = [ mkAnonTyConBinder (mkTyVar n t) {- Visible -} | (n,t) <- dropList theta fresh_names `zip` map scaledThing orig_arg_tys ]- prom_bndrs = prom_tv_bndrs ++ prom_theta_bndrs ++ prom_arg_bndrs+ prom_bndrs = prom_tv_bndrs ++ prom_arg_bndrs prom_res_kind = orig_res_ty promoted = mkPromotedDataCon con name prom_info prom_bndrs prom_res_kind roles rep_info@@ -1737,13 +1673,25 @@ -- evidence, after any flattening has been done and without substituting for -- any type variables dataConRepArgTys :: DataCon -> [Scaled Type]-dataConRepArgTys (MkData { dcRep = rep- , dcEqSpec = eq_spec+dataConRepArgTys (MkData { dcRep = rep+ , dcEqSpec = eq_spec , dcOtherTheta = theta- , dcOrigArgTys = orig_arg_tys })+ , dcOrigArgTys = orig_arg_tys+ , dcRepTyCon = tc }) = case rep of- NoDataConRep -> assert (null eq_spec) $ map unrestricted theta ++ orig_arg_tys DCR { dcr_arg_tys = arg_tys } -> arg_tys+ NoDataConRep+ | isTypeDataTyCon tc -> assert (null theta) $+ orig_arg_tys+ -- `type data` declarations can be GADTs (and hence have an eq_spec)+ -- but no wrapper. They cannot have a theta.+ -- See Note [Type data declarations] in GHC.Rename.Module+ -- You might wonder why we ever call dataConRepArgTys for `type data`;+ -- I think it's because of the call in mkDataCon, which in turn feeds+ -- into dcRepArity, which in turn is used in mkDataConWorkId.+ -- c.f. #23022+ | otherwise -> assert (null eq_spec) $+ map unrestricted theta ++ orig_arg_tys -- | The string @package:module.name@ identifying a constructor, which is attached -- to its info table and used by the GHCi debugger and the heap profiler@@ -1917,20 +1865,15 @@ , dcExTyCoVars = ex_tvs , dcEqSpec = eq_spec }) -- use of sets here: (R1) from the Note- = mkUnVarSet depleted_worker_vars == mkUnVarSet depleted_wrapper_vars &&+ = mkUnVarSet depleted_worker_vars == mkUnVarSet wrapper_vars && all (not . is_eq_spec_var) wrapper_vars where- is_constraint_var v = typeTypeOrConstraint (tyVarKind v) == ConstraintLike- -- implements (R3) from the Note- worker_vars = univ_tvs ++ ex_tvs eq_spec_tvs = mkUnVarSet (map eqSpecTyVar eq_spec) is_eq_spec_var = (`elemUnVarSet` eq_spec_tvs) -- (R2) from the Note- depleted_worker_vars = filterOut (is_eq_spec_var <||> is_constraint_var)- worker_vars+ depleted_worker_vars = filterOut is_eq_spec_var worker_vars wrapper_vars = dataConUserTyVars dc- depleted_wrapper_vars = filterOut is_constraint_var wrapper_vars dataConUserTyVarsNeedWrapper :: DataCon -> Bool -- Check whether the worker and wapper have the same type variables
GHC/Core/FamInstEnv.hs view
@@ -11,7 +11,7 @@ FamInst(..), FamFlavor(..), famInstAxiom, famInstTyCon, famInstRHS, famInstsRepTyCons, famInstRepTyCon_maybe, dataFamInstRepTyCon, pprFamInst, pprFamInsts, orphNamesOfFamInst,- mkImportedFamInst,+ mkImportedFamInst, mkLocalFamInst, FamInstEnvs, FamInstEnv, emptyFamInstEnv, emptyFamInstEnvs, unionFamInstEnv, extendFamInstEnv, extendFamInstEnvList,@@ -38,6 +38,7 @@ import GHC.Prelude +import GHC.Core( IsOrphan, chooseOrphanAnchor ) import GHC.Core.Unify import GHC.Core.Type as Type import GHC.Core.TyCo.Rep@@ -126,6 +127,8 @@ -- in GHC.Core.Coercion.Axiom , fi_rhs :: Type -- the RHS, with its freshened vars++ , fi_orphan :: IsOrphan } data FamFlavor@@ -254,6 +257,36 @@ pprFamInsts :: [FamInst] -> SDoc pprFamInsts finsts = vcat (map pprFamInst finsts) +{- *********************************************************************+* *+ Making FamInsts+* *+********************************************************************* -}++mkLocalFamInst :: FamFlavor -> CoAxiom Unbranched+ -> [TyVar] -> [CoVar] -> [Type] -> Type+ -> FamInst+mkLocalFamInst flavor axiom tvs cvs lhs rhs+ = FamInst { fi_fam = fam_tc_name+ , fi_flavor = flavor+ , fi_tcs = roughMatchTcs lhs+ , fi_tvs = tvs+ , fi_cvs = cvs+ , fi_tys = lhs+ , fi_rhs = rhs+ , fi_axiom = axiom+ , fi_orphan = chooseOrphanAnchor orph_names }+ where+ mod = assert (isExternalName (coAxiomName axiom)) $+ nameModule (coAxiomName axiom)+ is_local name = nameIsLocalOrFrom mod name++ orph_names = filterNameSet is_local $+ orphNamesOfAxiomLHS axiom `extendNameSet` fam_tc_name++ fam_tc_name = tyConName (coAxiomTyCon axiom)++ {- Note [Lazy axiom match] ~~~~~~~~~~~~~~~~~~~~~~~@@ -277,8 +310,9 @@ mkImportedFamInst :: Name -- Name of the family -> [RoughMatchTc] -- Rough match info -> CoAxiom Unbranched -- Axiom introduced+ -> IsOrphan -> FamInst -- Resulting family instance-mkImportedFamInst fam mb_tcs axiom+mkImportedFamInst fam mb_tcs axiom orphan = FamInst { fi_fam = fam, fi_tcs = mb_tcs,@@ -287,7 +321,8 @@ fi_tys = tys, fi_rhs = rhs, fi_axiom = axiom,- fi_flavor = flavor }+ fi_flavor = flavor,+ fi_orphan = orphan } where -- See Note [Lazy axiom match] ~(CoAxBranch { cab_lhs = tys
GHC/Core/InstEnv.hs view
@@ -7,18 +7,19 @@ The bits common to GHC.Tc.TyCl.Instance and GHC.Tc.Deriv. -} -{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-} module GHC.Core.InstEnv ( DFunId, InstMatch, ClsInstLookupResult,- PotentialUnifiers(..), getPotentialUnifiers, nullUnifiers,+ Canonical, PotentialUnifiers(..), getPotentialUnifiers, nullUnifiers, OverlapFlag(..), OverlapMode(..), setOverlapModeMaybe, ClsInst(..), DFunInstType, pprInstance, pprInstanceHdr, pprInstances,- instanceHead, instanceSig, mkLocalInstance, mkImportedInstance,+ instanceHead, instanceSig, mkLocalClsInst, mkImportedClsInst, instanceDFunId, updateClsInstDFuns, updateClsInstDFun, fuzzyClsInstCmp, orphNamesOfClsInst, InstEnvs(..), VisibleOrphanModules, InstEnv,+ LookupInstanceErrReason (..), mkInstEnv, emptyInstEnv, unionInstEnv, extendInstEnv, filterInstEnv, deleteFromInstEnv, deleteDFunFromInstEnv, anyInstEnv,@@ -40,6 +41,7 @@ import GHC.Core.RoughMap import GHC.Core.Class import GHC.Core.Unify+import GHC.Core.FVs( orphNamesOfTypes, orphNamesOfType ) import GHC.Unit.Module.Env import GHC.Unit.Types@@ -50,12 +52,13 @@ import GHC.Types.Name.Set import GHC.Types.Basic import GHC.Types.Id+import GHC.Generics (Generic) import Data.Data ( Data ) import Data.List.NonEmpty ( NonEmpty (..), nonEmpty ) import qualified Data.List.NonEmpty as NE import Data.Maybe ( isJust ) -import GHC.Utils.Outputable+import GHC.Utils.Outputable hiding ((<>)) import GHC.Utils.Panic import GHC.Utils.Panic.Plain import Data.Semigroup@@ -119,10 +122,11 @@ cmp (RM_KnownTc _, RM_WildCard) = GT cmp (RM_KnownTc x, RM_KnownTc y) = stableNameCmp x y -isOverlappable, isOverlapping, isIncoherent :: ClsInst -> Bool+isOverlappable, isOverlapping, isIncoherent, isNonCanonical :: ClsInst -> Bool isOverlappable i = hasOverlappableFlag (overlapMode (is_flag i)) isOverlapping i = hasOverlappingFlag (overlapMode (is_flag i)) isIncoherent i = hasIncoherentFlag (overlapMode (is_flag i))+isNonCanonical i = hasNonCanonicalFlag (overlapMode (is_flag i)) {- Note [ClsInst laziness and the rough-match fields]@@ -255,13 +259,13 @@ -- Decomposes the DFunId instanceSig ispec = tcSplitDFunTy (idType (is_dfun ispec)) -mkLocalInstance :: DFunId -> OverlapFlag- -> [TyVar] -> Class -> [Type]- -> ClsInst+mkLocalClsInst :: DFunId -> OverlapFlag+ -> [TyVar] -> Class -> [Type]+ -> ClsInst -- Used for local instances, where we can safely pull on the DFunId. -- Consider using newClsInst instead; this will also warn if -- the instance is an orphan.-mkLocalInstance dfun oflag tvs cls tys+mkLocalClsInst dfun oflag tvs cls tys = ClsInst { is_flag = oflag, is_dfun = dfun , is_tvs = tvs , is_dfun_name = dfun_name@@ -298,18 +302,18 @@ choose_one nss = chooseOrphanAnchor (unionNameSets nss) -mkImportedInstance :: Name -- ^ the name of the class- -> [RoughMatchTc] -- ^ the rough match signature of the instance- -> Name -- ^ the 'Name' of the dictionary binding- -> DFunId -- ^ the 'Id' of the dictionary.- -> OverlapFlag -- ^ may this instance overlap?- -> IsOrphan -- ^ is this instance an orphan?- -> ClsInst+mkImportedClsInst :: Name -- ^ the name of the class+ -> [RoughMatchTc] -- ^ the rough match signature of the instance+ -> Name -- ^ the 'Name' of the dictionary binding+ -> DFunId -- ^ the 'Id' of the dictionary.+ -> OverlapFlag -- ^ may this instance overlap?+ -> IsOrphan -- ^ is this instance an orphan?+ -> ClsInst -- Used for imported instances, where we get the rough-match stuff -- from the interface file -- The bound tyvars of the dfun are guaranteed fresh, because -- the dfun has been typechecked out of the same interface file-mkImportedInstance cls_nm mb_tcs dfun_name dfun oflag orphan+mkImportedClsInst cls_nm mb_tcs dfun_name dfun oflag orphan = ClsInst { is_flag = oflag, is_dfun = dfun , is_tvs = tvs, is_tys = tys , is_dfun_name = dfun_name@@ -576,50 +580,54 @@ instance declaration itself, controlled as follows: * An instance is "incoherent"- if it has an INCOHERENT pragma, or- if it appears in a module compiled with -XIncoherentInstances.+ if it has an `INCOHERENT` pragma, or+ if it appears in a module compiled with `-XIncoherentInstances`. * An instance is "overlappable"- if it has an OVERLAPPABLE or OVERLAPS pragma, or- if it appears in a module compiled with -XOverlappingInstances, or+ if it has an `OVERLAPPABLE` or `OVERLAPS` pragma, or+ if it appears in a module compiled with `-XOverlappingInstances`, or if the instance is incoherent. * An instance is "overlapping"- if it has an OVERLAPPING or OVERLAPS pragma, or- if it appears in a module compiled with -XOverlappingInstances, or+ if it has an `OVERLAPPING` or `OVERLAPS` pragma, or+ if it appears in a module compiled with `-XOverlappingInstances`, or if the instance is incoherent.- compiled with -XOverlappingInstances. 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*.+(IL0) If there are any local Givens that match (potentially unifying+ any metavariables, even untouchable ones) the target constraint,+ the search fails. See Note [Instance and Given overlap] in+ GHC.Tc.Solver.Dict. -* Eliminate any candidate `IX` for which both of the following hold:+(IL1) 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/. - - There is another candidate `IY` that is strictly more specific; that- is, `IY` is a substitution instance of `IX` but not vice versa.+(IL2) If there are no candidates, the search fails. - - 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.)+(IL3) Eliminate any candidate `IX` for which there is another candidate `IY` such+ that both of the following hold:+ - `IY` is strictly more specific than `IX`. That is, `IY` is a+ substitution instance of `IX` but not vice versa.+ - 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 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).+(IL4) If all the remaining candidates are *incoherent*, the search succeeds,+ returning an arbitrary surviving candidate. -- If the selected candidate (from the previous step) is incoherent, the- search succeeds, returning that candidate.+(IL5) If more than one non-*incoherent* candidate remains, the search+ fails. Otherwise there is exactly one non-*incoherent*+ candidate; call it the "prime 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.+(IL6) Now 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* top-level instances, the search succeeds,+ returning the prime candidate. Otherwise 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@@ -747,6 +755,140 @@ But still x and y might subsequently be unified so they *do* match. Simple story: unify, don't match.++Note [Coherence and specialisation: overview]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+GHC's specialiser relies on the Coherence Assumption: that if+ d1 :: C tys+ d2 :: C tys+then the dictionary d1 can be used in place of d2 and vice versa; it is as if+(C tys) is a singleton type. How do we guarantee this? Let's use this+example+ class C a where { op :: a -> Int }+ instance C [a] where {...} -- (I1)+ instance {-# OVERLAPPING #-} C [Int] where {...} -- (I2)++ instance C a => C (Maybe a) where {...} -- (I3)+ instance {-# INCOHERENT #-} C (Maybe Int) where {...} -- (I4)+ instance C Int where {...} -- (I5)++* When solving (C tys) from the top-level instances, we generally insist that+ there is a unique, most-specific match. (Incoherent instances change the+ picture a bit: see Note [Rules for instance lookup].) Example:+ [W] C [Int] -- Pick (I2)+ [W] C [Char] -- Pick (I1); does not match (I2)++ Caveat: if different usage sites see different instances (which the+ programmer can contrive, with some effort), all bets are off; we really+ can't make any guarantees at all.++* But what about [W] C [b], which might arise from+ risky :: b -> Int+ risky x = op [x]+ We can't pick (I2) because `b` is not Int. But if we pick (I1), and later+ the simplifier inlines a call (risky @Int) we'll get a dictionary of type+ (C [Int]) built by (I1), which might be utterly different to the dictionary+ of type (C [Int]) built by (I2). That breaks the Coherence Assumption.++ So GHC declines to pick either, and rejects `risky`. You have to write a+ different signature+ notRisky :: C [b] => b -> Int+ notRisky x = op [x]+ so that the dictionary is resolved at the call site.++* The INCOHERENT pragma tells GHC to choose an instance anyway: see+ Note [Rules for instance lookup] step (IL6). Suppose we have+ veryRisky :: C b => b -> Int+ veryRisky x = op (Just x)+ So we have [W] C (Maybe b). Because (I4) is INCOHERENT, GHC is allowed to+ pick (I3). Of course, this risks breaking the Coherence Assumption, as+ described above.++* What about the incoherence from step (IL4)? For example+ class D a b where { opD :: a -> b -> String }+ instance {-# INCOHERENT #-} D Int b where {...} -- (I7)+ instance {-# INCOHERENT #-} D a Int where {...} -- (I8)++ g (x::Int) = opD x x -- [W] D Int Int++ Here both (I7) and (I8) match, GHC picks an arbitrary one.++So INCOHERENT may break the Coherence Assumption. But sometimes that+is fine, because the programmer promises that it doesn't matter which+one is chosen. A good example is in the `optics` library:++ data IxEq i is js where { IxEq :: IxEq i is is }++ class AppendIndices xs ys ks | xs ys -> ks where+ appendIndices :: IxEq i (Curry xs (Curry ys i)) (Curry ks i)++ instance {-# INCOHERENT #-} xs ~ zs => AppendIndices xs '[] zs where+ appendIndices = IxEq++ instance ys ~ zs => AppendIndices '[] ys zs where+ appendIndices = IxEq++Here `xs` and `ys` are type-level lists, and for type inference purposes we want to+solve the `AppendIndices` constraint when /either/ of them are the empty list. The+dictionaries are the same in both cases (indeed the dictionary type is a singleton!),+so we really don't care which is used. See #23287 for discussion.+++In short, sometimes we want to specialise on these incoherently-selected dictionaries,+and sometimes we don't. It would be best to have a per-instance pragma, but for now+we have a global flag:++* If an instance has an `{-# INCOHERENT #-}` pragma, we use its `OverlapFlag` to+ label it as either+ * `Incoherent`: meaning incoherent but still specialisable, or+ * `NonCanonical`: meaning incoherent and not specialisable.++The module-wide `-fspecialise-incoherents` flag determines which+choice is made. The rest of this note describes what happens for+`NonCanonical` instances, i.e. with `-fno-specialise-incoherents`.++To avoid this incoherence breaking the specialiser,++* We label as "non-canonical" the dictionary constructed by a+ (potentially) incoherent use of an instance declaration whose+ `OverlapFlag` is `NonCanonical`.++* We do not specialise a function if there is a non-canonical+ dictionary in the /transistive dependencies/ of its dictionary+ arguments.++To see the transitive closure issue, consider+ deeplyRisky :: C b => b -> Int+ deeplyRisky x = op (Just (Just x))++From (op (Just (Just x))) we get+ [W] d1 : C (Maybe (Maybe b))+which we solve (coherently!) via (I3), giving+ [W] d2 : C (Maybe b)+Now we can only solve this incoherently. So we end up with++ deeplyRisky @b (d1 :: C b)+ = op @(Maybe (Maybe b)) d1+ where+ d1 :: C (Maybe (Maybe b)) = $dfI3 d2 -- Coherent decision+ d2 :: C (Maybe b) = $sfI3 d1 -- Incoherent decision++So `d2` is incoherent, and hence (transitively) so is `d1`.++Here are the moving parts:++* GHC.Core.InstEnv.lookupInstEnv tells if any incoherent unifiers were discarded+ in step (IL6) of the instance lookup.++* That info is recorded in the `cir_is_coherent` field of `OneInst`, and thence+ transferred to the `ep_is_coherent` field of the `EvBind` for the dictionary.++* `GHC.HsToCore.Binds.dsHsWrapper` desugars the evidence application (f d) into+ (nospec f d) if `d` is incoherent. It has to do a dependency analysis to+ determine transitive dependencies, but we need to do that anyway.+ See Note [Desugaring non-canonical evidence] in GHC.HsToCore.Binds.++ See also Note [nospecId magic] in GHC.Types.Id.Make. -} type DFunInstType = Maybe Type@@ -826,44 +968,75 @@ -- yield 'Left errorMessage'. lookupUniqueInstEnv :: InstEnvs -> Class -> [Type]- -> Either SDoc (ClsInst, [Type])+ -> Either LookupInstanceErrReason (ClsInst, [Type]) lookupUniqueInstEnv instEnv cls tys = case lookupInstEnv False instEnv cls tys of ([(inst, inst_tys)], _, _) | noFlexiVar -> Right (inst, inst_tys')- | otherwise -> Left $ text "flexible type variable:" <+>- (ppr $ mkTyConApp (classTyCon cls) tys)+ | otherwise -> Left $ LookupInstErrFlexiVar where inst_tys' = [ty | Just ty <- inst_tys] noFlexiVar = all isJust inst_tys- _other -> Left $ text "instance not found" <+>- (ppr $ mkTyConApp (classTyCon cls) tys)+ _other -> Left $ LookupInstErrNotFound -data PotentialUnifiers = NoUnifiers- | OneOrMoreUnifiers [ClsInst]+-- | Why a particular typeclass application couldn't be looked up.+data LookupInstanceErrReason =+ -- | Tyvars aren't an exact match.+ LookupInstErrNotExact+ |+ -- | One of the tyvars is flexible.+ LookupInstErrFlexiVar+ |+ -- | No matching instance was found.+ LookupInstErrNotFound+ deriving (Generic)++type Canonical = Bool++-- See Note [Recording coherence information in `PotentialUnifiers`]+data PotentialUnifiers = NoUnifiers Canonical+ -- NoUnifiers True: We have a unique solution modulo canonicity+ -- NoUnifiers False: The solutions is not canonical, and thus+ -- we shouldn't specialise on it.+ | OneOrMoreUnifiers (NonEmpty ClsInst) -- This list is lazy as we only look at all the unifiers when -- printing an error message. It can be expensive to compute all -- the unifiers because if you are matching something like C a[sk] then -- all instances will unify. +{- Note [Recording coherence information in `PotentialUnifiers`]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++When we find a matching instance, there might be other instances that+could potentially unify with the goal. For `INCOHERENT` instances, we+don't care (see steps IL4 and IL6 in Note [Rules for instance+lookup]). But if we have potentially unifying coherent instance, we+report these `OneOrMoreUnifiers` so that `matchInstEnv` can go down+the `NotSure` route.++If this hurdle is passed, i.e. we have a unique solution up to+`INCOHERENT` instances, the specialiser needs to know if that unique+solution is canonical or not (see Note [Coherence and specialisation:+overview] for why we care at all). So when the set of potential+unifiers is empty, we record in `NoUnifiers` if the one solution is+`Canonical`.+-}+ instance Outputable PotentialUnifiers where- ppr NoUnifiers = text "NoUnifiers"+ ppr (NoUnifiers c) = text "NoUnifiers" <+> if c then text "canonical" else text "non-canonical" ppr xs = ppr (getPotentialUnifiers xs) instance Semigroup PotentialUnifiers where- NoUnifiers <> u = u- u <> NoUnifiers = u- u1 <> u2 = OneOrMoreUnifiers (getPotentialUnifiers u1 ++ getPotentialUnifiers u2)--instance Monoid PotentialUnifiers where- mempty = NoUnifiers+ NoUnifiers c1 <> NoUnifiers c2 = NoUnifiers (c1 && c2)+ NoUnifiers _ <> u = u+ OneOrMoreUnifiers (unifier :| unifiers) <> u = OneOrMoreUnifiers (unifier :| (unifiers <> getPotentialUnifiers u)) getPotentialUnifiers :: PotentialUnifiers -> [ClsInst]-getPotentialUnifiers NoUnifiers = []-getPotentialUnifiers (OneOrMoreUnifiers cls) = cls+getPotentialUnifiers NoUnifiers{} = []+getPotentialUnifiers (OneOrMoreUnifiers cls) = NE.toList cls nullUnifiers :: PotentialUnifiers -> Bool-nullUnifiers NoUnifiers = True+nullUnifiers NoUnifiers{} = True nullUnifiers _ = False lookupInstEnv' :: InstEnv -- InstEnv to look in@@ -900,14 +1073,21 @@ = acc + noncanonically_matched :: PotentialUnifiers -> PotentialUnifiers+ noncanonically_matched (NoUnifiers _) = NoUnifiers False+ noncanonically_matched u = u+ check_unifier :: [ClsInst] -> PotentialUnifiers- check_unifier [] = NoUnifiers+ check_unifier [] = NoUnifiers True check_unifier (item@ClsInst { is_tvs = tpl_tvs, is_tys = tpl_tys }:items) | not (instIsVisible vis_mods item) = check_unifier items -- See Note [Instance lookup and orphan instances] | Just {} <- tcMatchTys tpl_tys tys = check_unifier items -- Does not match, so next check whether the things unify -- See Note [Overlapping instances]+ -- Record that we encountered non-canonical instances: Note [Coherence and specialisation: overview]+ | isNonCanonical item+ = noncanonically_matched $ check_unifier items -- Ignore ones that are incoherent: Note [Incoherent instances] | isIncoherent item = check_unifier items@@ -927,7 +1107,7 @@ -- See Note [Infinitary substitution in lookup] MaybeApart MARInfinite _ -> check_unifier items _ ->- OneOrMoreUnifiers (item: getPotentialUnifiers (check_unifier items))+ OneOrMoreUnifiers (item :| getPotentialUnifiers (check_unifier items)) where tpl_tv_set = mkVarSet tpl_tvs@@ -952,8 +1132,8 @@ where (home_matches, home_unifs) = lookupInstEnv' home_ie vis_mods cls tys (pkg_matches, pkg_unifs) = lookupInstEnv' pkg_ie vis_mods cls tys- all_matches = home_matches ++ pkg_matches- all_unifs = home_unifs `mappend` pkg_unifs+ all_matches = home_matches <> pkg_matches+ all_unifs = home_unifs <> pkg_unifs final_matches = pruneOverlappedMatches all_matches -- Even if the unifs is non-empty (an error situation) -- we still prune the matches, so that the error message isn't@@ -967,7 +1147,7 @@ -- If the selected match is incoherent, discard all unifiers final_unifs = case final_matches of- (m:_) | isIncoherent (fst m) -> NoUnifiers+ (m:_) | isIncoherent (fst m) -> NoUnifiers True _ -> all_unifs -- Note [Safe Haskell isSafeOverlap]@@ -1145,7 +1325,7 @@ pruneOverlappedMatches :: [InstMatch] -> [InstMatch] -- ^ Remove from the argument list any InstMatches for which another -- element of the list is more specific, and overlaps it, using the--- rules of Nove [Rules for instance lookup]+-- rules of Note [Rules for instance lookup] pruneOverlappedMatches all_matches = instMatches $ foldr insert_overlapping noMatches all_matches @@ -1298,7 +1478,12 @@ The implementation is in insert_overlapping, where we remove matching incoherent instances as long as there are others. -+If the choice of instance *does* matter, all bets are still not off:+users can consult the detailed specification of the instance selection+algorithm in the GHC Users' Manual. However, this means we can end up+with different instances at the same types at different parts of the+program, and this difference has to be preserved. Note [Coherence and+specialisation: overview] details how we achieve that. ************************************************************************ * *
GHC/Core/LateCC.hs view
@@ -26,7 +26,7 @@ import GHC.Core.Opt.Monad import GHC.Core.Utils (mkTick) import GHC.Types.Id-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Utils.Logger import GHC.Utils.Outputable@@ -117,7 +117,7 @@ | otherwise = doBndr' env bndr rhs --- We want to put the cost centra below the lambda as we only care about executions of the RHS.+-- We want to put the cost centre below the lambda as we only care about executions of the RHS. doBndr' :: Env -> Id -> CoreExpr -> State LateCCState CoreExpr doBndr' env bndr (Lam b rhs) = Lam b <$> doBndr' env bndr rhs doBndr' env bndr rhs = do
GHC/Core/Lint.hs view
@@ -31,7 +31,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Tc.Utils.TcType ( isFloatingPrimTy, isTyFamFree ) import GHC.Unit.Module.ModGuts@@ -56,7 +56,6 @@ import GHC.Core.Coercion.Axiom import GHC.Core.FamInstEnv( compatibleBranches ) import GHC.Core.Unify-import GHC.Core.Coercion.Opt ( checkAxInstCo ) import GHC.Core.Opt.Arity ( typeArity, exprIsDeadEnd ) import GHC.Core.Opt.Monad@@ -303,6 +302,10 @@ impactful. Changing `lint_app` reduced allocations for one test program I was looking at by ~4%. +Note [MCInfo for Lint]+~~~~~~~~~~~~~~~~~~~~~~+When printing a Lint message, use the MCInfo severity so that the+message is printed on stderr rather than stdout (#13342). ************************************************************************ * *@@ -426,7 +429,7 @@ -> IO () displayLintResults logger display_warnings pp_what pp_pgm (warns, errs) | not (isEmptyBag errs)- = do { logMsg logger Err.MCDump noSrcSpan+ = do { logMsg logger Err.MCInfo noSrcSpan -- See Note [MCInfo for Lint] $ withPprStyle defaultDumpStyle (vcat [ lint_banner "errors" pp_what, Err.pprMessageBag errs , text "*** Offending Program ***"@@ -437,9 +440,7 @@ | not (isEmptyBag warns) , log_enable_debug (logFlags logger) , display_warnings- -- If the Core linter encounters an error, output to stderr instead of- -- stdout (#13342)- = logMsg logger Err.MCInfo noSrcSpan+ = logMsg logger Err.MCInfo noSrcSpan -- See Note [MCInfo for Lint] $ withPprStyle defaultDumpStyle (lint_banner "warnings" pp_what $$ Err.pprMessageBag (mapBag ($$ blankLine) warns)) @@ -471,17 +472,15 @@ (_, dups) = removeDups compare binders - -- dups_ext checks for names with different uniques+ -- ext_dups checks for names with different uniques -- but the same External name M.n. We don't -- allow this at top level: -- M.n{r3} = ... -- M.n{r29} = ... -- because they both get the same linker symbol- ext_dups = snd (removeDups ord_ext (map Var.varName binders))- ord_ext n1 n2 | Just m1 <- nameModule_maybe n1- , Just m2 <- nameModule_maybe n2- = compare (m1, nameOccName n1) (m2, nameOccName n2)- | otherwise = LT+ ext_dups = snd $ removeDupsOn ord_ext $+ filter isExternalName $ map Var.varName binders+ ord_ext n = (nameModule n, nameOccName n) {- ************************************************************************@@ -1023,6 +1022,9 @@ ; checkDeadIdOcc var ; checkJoinOcc var nargs+ ; case isDataConId_maybe var of+ Nothing -> return ()+ Just dc -> checkTypeDataConOcc "expression" dc ; usage <- varCallSiteUsage var @@ -1109,6 +1111,13 @@ | otherwise = return () +checkTypeDataConOcc :: String -> DataCon -> LintM ()+-- Check that the Id is not a data constructor of a `type data` declaration+-- Invariant (I1) of Note [Type data declarations] in GHC.Rename.Module+checkTypeDataConOcc what dc+ = checkL (not (isTypeDataTyCon (dataConTyCon dc))) $+ (text "type data constructor found in a" <+> text what <> colon <+> ppr dc)+ -- | This function checks that we are able to perform eta expansion for -- functions with no binding, in order to satisfy invariant I3 -- from Note [Representation polymorphism invariants] in GHC.Core.@@ -1187,13 +1196,13 @@ checkLinearity :: UsageEnv -> Var -> LintM UsageEnv checkLinearity body_ue lam_var = case varMultMaybe lam_var of- Just mult -> do ensureSubUsage lhs mult (err_msg mult)- return $ deleteUE body_ue lam_var+ Just mult -> do+ let (lhs, body_ue') = popUE body_ue lam_var+ err_msg = text "Linearity failure in lambda:" <+> ppr lam_var+ $$ ppr lhs <+> text "⊈" <+> ppr mult+ ensureSubUsage lhs mult err_msg+ return body_ue' Nothing -> return body_ue -- A type variable- where- lhs = lookupUE body_ue lam_var- err_msg mult = text "Linearity failure in lambda:" <+> ppr lam_var- $$ ppr lhs <+> text "⊈" <+> ppr mult {- Note [Join points and casts] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1544,17 +1553,24 @@ -> LintM UsageEnv -- If you edit this function, you may need to update the GHC formalism -- See Note [GHC Formalism]-lintCoreAlt _ _ _ alt_ty (Alt DEFAULT args rhs) =+lintCoreAlt case_bndr _ scrut_mult alt_ty (Alt DEFAULT args rhs) = do { lintL (null args) (mkDefaultArgsMsg args)- ; lintAltExpr rhs alt_ty }+ ; rhs_ue <- lintAltExpr rhs alt_ty+ ; let (case_bndr_usage, rhs_ue') = popUE rhs_ue case_bndr+ err_msg = text "Linearity failure in the DEFAULT clause:" <+> ppr case_bndr+ $$ ppr case_bndr_usage <+> text "⊈" <+> ppr scrut_mult+ ; ensureSubUsage case_bndr_usage scrut_mult err_msg+ ; return rhs_ue' } -lintCoreAlt _case_bndr scrut_ty _ alt_ty (Alt (LitAlt lit) args rhs)+lintCoreAlt case_bndr scrut_ty _ alt_ty (Alt (LitAlt lit) args rhs) | litIsLifted lit = failWithL integerScrutinisedMsg | otherwise = do { lintL (null args) (mkDefaultArgsMsg args) ; ensureEqTys lit_ty scrut_ty (mkBadPatMsg lit_ty scrut_ty)- ; lintAltExpr rhs alt_ty }+ ; rhs_ue <- lintAltExpr rhs alt_ty+ ; return (deleteUE rhs_ue case_bndr) -- No need for linearity checks+ } where lit_ty = literalType lit @@ -1563,10 +1579,11 @@ = zeroUE <$ addErrL (mkNewTyDataConAltMsg scrut_ty alt) | Just (tycon, tycon_arg_tys) <- splitTyConApp_maybe scrut_ty = addLoc (CaseAlt alt) $ do- { -- First instantiate the universally quantified- -- type variables of the data constructor- -- We've already check- lintL (tycon == dataConTyCon con) (mkBadConMsg tycon con)+ { checkTypeDataConOcc "pattern" con+ ; lintL (tycon == dataConTyCon con) (mkBadConMsg tycon con)++ -- Instantiate the universally quantified+ -- type variables of the data constructor ; let { con_payload_ty = piResultTys (dataConRepType con) tycon_arg_tys ; binderMult (Named _) = ManyTy ; binderMult (Anon st _) = scaledMult st@@ -2522,7 +2539,71 @@ = do { addErrL $ text "Unfilled coercion hole:" <+> ppr h ; lintCoercion (CoVarCo (coHoleCoVar h)) } + {-+Note [Conflict checking with AxiomInstCo]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider the following type family and axiom:++type family Equal (a :: k) (b :: k) :: Bool+type instance where+ Equal a a = True+ Equal a b = False+--+Equal :: forall k::*. k -> k -> Bool+axEqual :: { forall k::*. forall a::k. Equal k a a ~ True+ ; forall k::*. forall a::k. forall b::k. Equal k a b ~ False }++The coercion (axEqual[1] <*> <Int> <Int) is ill-typed, and Lint should reject it.+(Recall that the index is 0-based, so this is the second branch of the axiom.)+The problem is that, on the surface, it seems that++ (axEqual[1] <*> <Int> <Int>) :: (Equal * Int Int ~ False)++and that all is OK. But, all is not OK: we want to use the first branch of the+axiom in this case, not the second. The problem is that the parameters of the+first branch can unify with the supplied coercions, thus meaning that the first+branch should be taken. See also Note [Apartness] in "GHC.Core.FamInstEnv".++For more details, see the section "Branched axiom conflict checking" in+docs/core-spec, which defines the corresponding no_conflict function used by the+Co_AxiomInstCo rule in the section "Coercion typing".+-}++-- | Check to make sure that an AxInstCo is internally consistent.+-- Returns the conflicting branch, if it exists+-- See Note [Conflict checking with AxiomInstCo]+checkAxInstCo :: Coercion -> Maybe CoAxBranch+-- defined here to avoid dependencies in GHC.Core.Coercion+-- If you edit this function, you may need to update the GHC formalism+-- See Note [GHC Formalism] in GHC.Core.Lint+checkAxInstCo (AxiomInstCo ax ind cos)+ = let branch = coAxiomNthBranch ax ind+ tvs = coAxBranchTyVars branch+ cvs = coAxBranchCoVars branch+ incomps = coAxBranchIncomps branch+ (tys, cotys) = splitAtList tvs (map coercionLKind cos)+ co_args = map stripCoercionTy cotys+ subst = zipTvSubst tvs tys `composeTCvSubst`+ zipCvSubst cvs co_args+ target = Type.substTys subst (coAxBranchLHS branch)+ in_scope = mkInScopeSet $+ unionVarSets (map (tyCoVarsOfTypes . coAxBranchLHS) incomps)+ flattened_target = flattenTys in_scope target in+ check_no_conflict flattened_target incomps+ where+ check_no_conflict :: [Type] -> [CoAxBranch] -> Maybe CoAxBranch+ check_no_conflict _ [] = Nothing+ check_no_conflict flat (b@CoAxBranch { cab_lhs = lhs_incomp } : rest)+ -- See Note [Apartness] in GHC.Core.FamInstEnv+ | SurelyApart <- tcUnifyTysFG alwaysBindFun flat lhs_incomp+ = check_no_conflict flat rest+ | otherwise+ = Just b+checkAxInstCo _ = Nothing+++{- ************************************************************************ * * Axioms@@ -3112,9 +3193,14 @@ addInScopeId :: Id -> LintedType -> LintM a -> LintM a addInScopeId id linted_ty m- = LintM $ \ env@(LE { le_ids = id_set, le_joins = join_set }) errs ->+ = LintM $ \ env@(LE { le_ids = id_set, le_joins = join_set, le_ue_aliases = aliases }) errs -> unLintM m (env { le_ids = extendVarEnv id_set id (id, linted_ty)- , le_joins = add_joins join_set }) errs+ , le_joins = add_joins join_set+ , le_ue_aliases = delFromNameEnv aliases (idName id) }) errs+ -- When shadowing an alias, we need to make sure the Id is no longer+ -- classified as such. E.g. in+ -- let x = <e1> in case x of x { _DEFAULT -> <e2> }+ -- Occurrences of 'x' in e2 shouldn't count as occurrences of e1. where add_joins join_set | isJoinId id = extendVarSet join_set id -- Overwrite with new arity@@ -3157,7 +3243,7 @@ = do { in_scope_ids <- getInScopeIds ; case lookupVarEnv in_scope_ids id_occ of Just (id_bndr, linted_ty)- -> do { checkL (not (bad_global id_bndr)) global_in_scope+ -> do { checkL (not (bad_global id_bndr)) $ global_in_scope id_bndr ; return (id_bndr, linted_ty) } Nothing -> do { checkL (not is_local) local_out_of_scope ; return (id_occ, idType id_occ) } }@@ -3166,8 +3252,10 @@ where is_local = mustHaveLocalBinding id_occ local_out_of_scope = text "Out of scope:" <+> pprBndr LetBind id_occ- global_in_scope = hang (text "Occurrence is GlobalId, but binding is LocalId")- 2 (pprBndr LetBind id_occ)+ global_in_scope id_bndr = hang (text "Occurrence is GlobalId, but binding is LocalId")+ 2 $ vcat [hang (text "occurrence:") 2 $ pprBndr LetBind id_occ+ ,hang (text "binder :") 2 $ pprBndr LetBind id_bndr+ ] bad_global id_bnd = isGlobalId id_occ && isLocalId id_bnd && not (isWiredIn id_occ)@@ -3201,7 +3289,7 @@ varCallSiteUsage id = do m <- getUEAliases return $ case lookupNameEnv m (getName id) of- Nothing -> unitUE id OneTy+ Nothing -> singleUsageUE id Just id_ue -> id_ue ensureEqTys :: LintedType -> LintedType -> SDoc -> LintM ()
GHC/Core/Make.hs view
@@ -6,7 +6,7 @@ mkCoreLet, mkCoreLets, mkCoreApp, mkCoreApps, mkCoreConApps, mkCoreLams, mkWildCase, mkIfThenElse,- mkWildValBinder, mkWildEvBinder,+ mkWildValBinder, mkSingleAltCase, sortQuantVars, castBottomExpr, @@ -54,7 +54,7 @@ import GHC.Platform import GHC.Types.Id-import GHC.Types.Var ( EvVar, setTyVarUnique, visArgConstraintLike )+import GHC.Types.Var ( setTyVarUnique, visArgConstraintLike ) import GHC.Types.TyThing import GHC.Types.Id.Info import GHC.Types.Cpr@@ -173,9 +173,6 @@ * * ********************************************************************* -} -mkWildEvBinder :: PredType -> EvVar-mkWildEvBinder pred = mkWildValBinder ManyTy pred- -- | Make a /wildcard binder/. This is typically used when you need a binder -- that you expect to use only at a *binding* site. Do not use it at -- occurrence sites because it has a single, fixed unique, and it's very@@ -559,7 +556,8 @@ where n_xs = length xs split [] = []- split xs = take mAX_TUPLE_SIZE xs : split (drop mAX_TUPLE_SIZE xs)+ split xs = let (as, bs) = splitAt mAX_TUPLE_SIZE xs+ in as : split bs {-@@ -651,12 +649,12 @@ -- To avoid shadowing, we use uniques to invent new variables. -- -- If necessary we pattern match on a "big" tuple.-mkBigTupleCase :: UniqSupply -- ^ For inventing names of intermediate variables- -> [Id] -- ^ The tuple identifiers to pattern match on;+mkBigTupleCase :: MonadUnique m -- For inventing names of intermediate variables+ => [Id] -- ^ The tuple identifiers to pattern match on; -- Bring these into scope in the body -> CoreExpr -- ^ Body of the case -> CoreExpr -- ^ Scrutinee- -> CoreExpr+ -> m CoreExpr -- ToDo: eliminate cases where none of the variables are needed. -- -- mkBigTupleCase uniqs [a,b,c,d] body v e@@ -664,11 +662,11 @@ -- case p of p { (a,b) -> -- case q of q { (c,d) -> -- body }}}-mkBigTupleCase us vars body scrut- = mk_tuple_case wrapped_us (chunkify wrapped_vars) wrapped_body+mkBigTupleCase vars body scrut+ = do us <- getUniqueSupplyM+ let (wrapped_us, wrapped_vars, wrapped_body) = foldr unwrap (us,[],body) vars+ return $ mk_tuple_case wrapped_us (chunkify wrapped_vars) wrapped_body where- (wrapped_us, wrapped_vars, wrapped_body) = foldr unwrap (us,[],body) vars- scrut_ty = exprType scrut unwrap var (us,vars,body)@@ -1082,8 +1080,9 @@ mkImpossibleExpr res_ty str = mkRuntimeErrorApp err_id res_ty str where -- See Note [Type vs Constraint for error ids]- err_id | isConstraintLikeKind (typeKind res_ty) = iMPOSSIBLE_CONSTRAINT_ERROR_ID- | otherwise = iMPOSSIBLE_ERROR_ID+ err_id = case typeTypeOrConstraint res_ty of+ TypeLike -> iMPOSSIBLE_ERROR_ID+ ConstraintLike -> iMPOSSIBLE_CONSTRAINT_ERROR_ID {- Note [Type vs Constraint for error ids] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1207,8 +1206,9 @@ mkAbsentErrorApp res_ty err_msg = mkApps (Var err_id) [ Type res_ty, err_string ] where- err_id | isConstraintLikeKind (typeKind res_ty) = aBSENT_CONSTRAINT_ERROR_ID- | otherwise = aBSENT_ERROR_ID+ err_id = case typeTypeOrConstraint res_ty of+ TypeLike -> aBSENT_ERROR_ID+ ConstraintLike -> aBSENT_CONSTRAINT_ERROR_ID err_string = Lit (mkLitString err_msg) absentErrorName, absentConstraintErrorName :: Name
GHC/Core/Map/Type.hs view
@@ -397,7 +397,7 @@ CharTyLit n -> m { tlm_char = Map.alter f n (tlm_char m) } foldTyLit :: (a -> b -> b) -> TyLitMap a -> b -> b-foldTyLit l m = flip (foldUFM l) (tlm_string m)+foldTyLit l m = flip (nonDetFoldUFM l) (tlm_string m) . flip (Map.foldr l) (tlm_number m) . flip (Map.foldr l) (tlm_char m)
GHC/Core/Opt/Arity.hs view
@@ -134,6 +134,9 @@ -- Join points are supposed to have manifestly-visible -- lambdas at the top: no ticks, no casts, nothing -- Moreover, type lambdas count in JoinArity+-- NB: For non-recursive bindings, the join arity of the binding may actually be+-- less that the number of manifestly-visible lambdas.+-- See Note [Join arity prediction based on joinRhsArity] in GHC.Core.Opt.OccurAnal joinRhsArity (Lam _ e) = 1 + joinRhsArity e joinRhsArity _ = 0 @@ -852,7 +855,7 @@ -- | The Arity returned is the number of value args the -- expression can be applied to without doing much work-exprEtaExpandArity :: HasDebugCallStack => ArityOpts -> CoreExpr -> Maybe SafeArityType+exprEtaExpandArity :: ArityOpts -> CoreExpr -> Maybe SafeArityType -- exprEtaExpandArity is used when eta expanding -- e ==> \xy -> e x y -- Nothing if the expression has arity 0@@ -1873,7 +1876,7 @@ \(y::Int). let j' :: Int -> Bool j' x = e y in b[j'/j] y-where I have written to stress that j's type has+where I have written b[j'/j] to stress that j's type has changed. Note that (of course!) we have to push the application inside the RHS of the join as well as into the body. AND if j has an unfolding we have to push it into there too. AND j might@@ -3105,7 +3108,7 @@ -- Adds as many binders as asked for; assumes expr is not a lambda etaBodyForJoinPoint :: Int -> CoreExpr -> ([CoreBndr], CoreExpr) etaBodyForJoinPoint need_args body- = go need_args (exprType body) (init_subst body) [] body+ = go need_args body_ty (mkEmptySubst in_scope) [] body where go 0 _ _ rev_bs e = (reverse rev_bs, e)@@ -3124,9 +3127,16 @@ = pprPanic "etaBodyForJoinPoint" $ int need_args $$ ppr body $$ ppr (exprType body) - init_subst e = mkEmptySubst (mkInScopeSet (exprFreeVars e))--+ body_ty = exprType body+ in_scope = mkInScopeSet (exprFreeVars body `unionVarSet` tyCoVarsOfType body_ty)+ -- in_scope is a bit tricky.+ -- - We are wrapping `body` in some value lambdas, so must not shadow+ -- any free vars of `body`+ -- - We are wrapping `body` in some type lambdas, so must not shadow any+ -- tyvars in body_ty. Example: body is just a variable+ -- (g :: forall (a::k). T k a -> Int)+ -- We must not shadown that `k` when adding the /\a. So treat the free vars+ -- of body_ty as in-scope. Showed up in #23026. -------------- freshEtaId :: Int -> Subst -> Scaled Type -> (Subst, Id)
GHC/Core/Opt/CallerCC.hs view
@@ -15,18 +15,15 @@ , parseCallerCcFilter ) where -import Data.Word (Word8) import Data.Maybe import Control.Applicative import GHC.Utils.Monad.State.Strict-import Data.Either import Control.Monad-import qualified Text.ParserCombinators.ReadP as P import GHC.Prelude import GHC.Utils.Outputable as Outputable-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Types.CostCentre import GHC.Types.CostCentre.State import GHC.Types.Name hiding (varName)@@ -38,11 +35,8 @@ import GHC.Data.FastString import GHC.Core import GHC.Core.Opt.Monad-import GHC.Utils.Panic-import qualified GHC.Utils.Binary as B-import Data.Char+import GHC.Core.Opt.CallerCC.Types -import Language.Haskell.Syntax.Module.Name addCallerCostCentres :: ModGuts -> CoreM ModGuts addCallerCostCentres guts = do@@ -138,91 +132,4 @@ Nothing -> True checkFunc = occNameMatches (ccfFuncName ccf) (getOccName i)--data NamePattern- = PChar Char NamePattern- | PWildcard NamePattern- | PEnd--instance Outputable NamePattern where- ppr (PChar c rest) = char c <> ppr rest- ppr (PWildcard rest) = char '*' <> ppr rest- ppr PEnd = Outputable.empty--instance B.Binary NamePattern where- get bh = do- tag <- B.get bh- case tag :: Word8 of- 0 -> PChar <$> B.get bh <*> B.get bh- 1 -> PWildcard <$> B.get bh- 2 -> pure PEnd- _ -> panic "Binary(NamePattern): Invalid tag"- put_ bh (PChar x y) = B.put_ bh (0 :: Word8) >> B.put_ bh x >> B.put_ bh y- put_ bh (PWildcard x) = B.put_ bh (1 :: Word8) >> B.put_ bh x- put_ bh PEnd = B.put_ bh (2 :: Word8)--occNameMatches :: NamePattern -> OccName -> Bool-occNameMatches pat = go pat . occNameString- where- go :: NamePattern -> String -> Bool- go PEnd "" = True- go (PChar c rest) (d:s)- = d == c && go rest s- go (PWildcard rest) s- = go rest s || go (PWildcard rest) (tail s)- go _ _ = False--type Parser = P.ReadP--parseNamePattern :: Parser NamePattern-parseNamePattern = pattern- where- pattern = star P.<++ wildcard P.<++ char P.<++ end- star = PChar '*' <$ P.string "\\*" <*> pattern- wildcard = do- void $ P.char '*'- PWildcard <$> pattern- char = PChar <$> P.get <*> pattern- end = PEnd <$ P.eof--data CallerCcFilter- = CallerCcFilter { ccfModuleName :: Maybe ModuleName- , ccfFuncName :: NamePattern- }--instance Outputable CallerCcFilter where- ppr ccf =- maybe (char '*') ppr (ccfModuleName ccf)- <> char '.'- <> ppr (ccfFuncName ccf)--instance B.Binary CallerCcFilter where- get bh = CallerCcFilter <$> B.get bh <*> B.get bh- put_ bh (CallerCcFilter x y) = B.put_ bh x >> B.put_ bh y--parseCallerCcFilter :: String -> Either String CallerCcFilter-parseCallerCcFilter inp =- case P.readP_to_S parseCallerCcFilter' inp of- ((result, ""):_) -> Right result- _ -> Left $ "parse error on " ++ inp--parseCallerCcFilter' :: Parser CallerCcFilter-parseCallerCcFilter' =- CallerCcFilter- <$> moduleFilter- <* P.char '.'- <*> parseNamePattern- where- moduleFilter :: Parser (Maybe ModuleName)- moduleFilter =- (Just . mkModuleName <$> moduleName)- <|>- (Nothing <$ P.char '*')-- moduleName :: Parser String- moduleName = do- c <- P.satisfy isUpper- cs <- P.munch1 (\c -> isUpper c || isLower c || isDigit c || c == '_')- rest <- optional $ P.char '.' >> fmap ('.':) moduleName- return $ c : (cs ++ fromMaybe "" rest)
− GHC/Core/Opt/CallerCC.hs-boot
@@ -1,8 +0,0 @@-module GHC.Core.Opt.CallerCC where--import GHC.Prelude---- Necessary due to import in GHC.Driver.Session.-data CallerCcFilter--parseCallerCcFilter :: String -> Either String CallerCcFilter
+ GHC/Core/Opt/CallerCC/Types.hs view
@@ -0,0 +1,113 @@+module GHC.Core.Opt.CallerCC.Types ( NamePattern(..)+ , CallerCcFilter(..)+ , occNameMatches+ , parseCallerCcFilter+ , parseNamePattern+ ) where++import Data.Word (Word8)+import Data.Maybe++import Control.Applicative+import Data.Either+import Control.Monad+import qualified Text.ParserCombinators.ReadP as P++import GHC.Prelude+import GHC.Utils.Outputable as Outputable+import GHC.Types.Name hiding (varName)+import GHC.Utils.Panic+import qualified GHC.Utils.Binary as B+import Data.Char++import Language.Haskell.Syntax.Module.Name+++data NamePattern+ = PChar Char NamePattern+ | PWildcard NamePattern+ | PEnd++instance Outputable NamePattern where+ ppr (PChar c rest) = char c <> ppr rest+ ppr (PWildcard rest) = char '*' <> ppr rest+ ppr PEnd = Outputable.empty++instance B.Binary NamePattern where+ get bh = do+ tag <- B.get bh+ case tag :: Word8 of+ 0 -> PChar <$> B.get bh <*> B.get bh+ 1 -> PWildcard <$> B.get bh+ 2 -> pure PEnd+ _ -> panic "Binary(NamePattern): Invalid tag"+ put_ bh (PChar x y) = B.put_ bh (0 :: Word8) >> B.put_ bh x >> B.put_ bh y+ put_ bh (PWildcard x) = B.put_ bh (1 :: Word8) >> B.put_ bh x+ put_ bh PEnd = B.put_ bh (2 :: Word8)++occNameMatches :: NamePattern -> OccName -> Bool+occNameMatches pat = go pat . occNameString+ where+ go :: NamePattern -> String -> Bool+ go PEnd "" = True+ go (PChar c rest) (d:s)+ = d == c && go rest s+ go (PWildcard rest) s+ = go rest s || go (PWildcard rest) (tail s)+ go _ _ = False++++type Parser = P.ReadP++parseNamePattern :: Parser NamePattern+parseNamePattern = pattern+ where+ pattern = star P.<++ wildcard P.<++ char P.<++ end+ star = PChar '*' <$ P.string "\\*" <*> pattern+ wildcard = do+ void $ P.char '*'+ PWildcard <$> pattern+ char = PChar <$> P.get <*> pattern+ end = PEnd <$ P.eof++data CallerCcFilter+ = CallerCcFilter { ccfModuleName :: Maybe ModuleName+ , ccfFuncName :: NamePattern+ }++instance Outputable CallerCcFilter where+ ppr ccf =+ maybe (char '*') ppr (ccfModuleName ccf)+ <> char '.'+ <> ppr (ccfFuncName ccf)++instance B.Binary CallerCcFilter where+ get bh = CallerCcFilter <$> B.get bh <*> B.get bh+ put_ bh (CallerCcFilter x y) = B.put_ bh x >> B.put_ bh y++parseCallerCcFilter :: String -> Either String CallerCcFilter+parseCallerCcFilter inp =+ case P.readP_to_S parseCallerCcFilter' inp of+ ((result, ""):_) -> Right result+ _ -> Left $ "parse error on " ++ inp++parseCallerCcFilter' :: Parser CallerCcFilter+parseCallerCcFilter' =+ CallerCcFilter+ <$> moduleFilter+ <* P.char '.'+ <*> parseNamePattern+ where+ moduleFilter :: Parser (Maybe ModuleName)+ moduleFilter =+ (Just . mkModuleName <$> moduleName)+ <|>+ (Nothing <$ P.char '*')++ moduleName :: Parser String+ moduleName = do+ c <- P.satisfy isUpper+ cs <- P.munch1 (\c -> isUpper c || isLower c || isDigit c || c == '_')+ rest <- optional $ P.char '.' >> fmap ('.':) moduleName+ return $ c : (cs ++ fromMaybe "" rest)
GHC/Core/Opt/ConstantFold.hs view
@@ -27,6 +27,7 @@ ( primOpRules , builtinRules , caseRules+ , caseRules2 ) where @@ -55,7 +56,7 @@ import GHC.Core.TyCon ( tyConDataCons_maybe, isAlgTyCon, isEnumerationTyCon , isNewTyCon, tyConDataCons- , tyConFamilySize )+ , tyConFamilySize, isTypeDataTyCon ) import GHC.Core.Map.Expr ( eqCoreExpr ) import GHC.Builtin.PrimOps ( PrimOp(..), tagToEnumKey )@@ -64,6 +65,9 @@ import GHC.Builtin.Types.Prim import GHC.Builtin.Names +import GHC.Cmm.MachOp ( FMASign(..) )+import GHC.Cmm.Type ( Width(..) )+ import GHC.Data.FastString import GHC.Data.Maybe ( orElse ) @@ -120,7 +124,9 @@ Int8QuotOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (int8Op2 quot) , leftZero , rightIdentity oneI8- , equalArgs $> Lit oneI8 ]+ , equalArgs $> Lit oneI8+ , quotFoldingRules int8Ops+ ] Int8RemOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (int8Op2 rem) , leftZero , oneLit 1 $> Lit zeroI8@@ -149,7 +155,9 @@ , mulFoldingRules Word8MulOp word8Ops ] Word8QuotOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (word8Op2 quot)- , rightIdentity oneW8 ]+ , rightIdentity oneW8+ , quotFoldingRules word8Ops+ ] Word8RemOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (word8Op2 rem) , leftZero , oneLit 1 $> Lit zeroW8@@ -194,7 +202,9 @@ Int16QuotOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (int16Op2 quot) , leftZero , rightIdentity oneI16- , equalArgs $> Lit oneI16 ]+ , equalArgs $> Lit oneI16+ , quotFoldingRules int16Ops+ ] Int16RemOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (int16Op2 rem) , leftZero , oneLit 1 $> Lit zeroI16@@ -223,7 +233,9 @@ , mulFoldingRules Word16MulOp word16Ops ] Word16QuotOp-> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (word16Op2 quot)- , rightIdentity oneW16 ]+ , rightIdentity oneW16+ , quotFoldingRules word16Ops+ ] Word16RemOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (word16Op2 rem) , leftZero , oneLit 1 $> Lit zeroW16@@ -268,7 +280,9 @@ Int32QuotOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (int32Op2 quot) , leftZero , rightIdentity oneI32- , equalArgs $> Lit oneI32 ]+ , equalArgs $> Lit oneI32+ , quotFoldingRules int32Ops+ ] Int32RemOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (int32Op2 rem) , leftZero , oneLit 1 $> Lit zeroI32@@ -297,7 +311,9 @@ , mulFoldingRules Word32MulOp word32Ops ] Word32QuotOp-> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (word32Op2 quot)- , rightIdentity oneW32 ]+ , rightIdentity oneW32+ , quotFoldingRules word32Ops+ ] Word32RemOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (word32Op2 rem) , leftZero , oneLit 1 $> Lit zeroW32@@ -341,7 +357,9 @@ Int64QuotOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (int64Op2 quot) , leftZero , rightIdentity oneI64- , equalArgs $> Lit oneI64 ]+ , equalArgs $> Lit oneI64+ , quotFoldingRules int64Ops+ ] Int64RemOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (int64Op2 rem) , leftZero , oneLit 1 $> Lit zeroI64@@ -370,7 +388,9 @@ , mulFoldingRules Word64MulOp word64Ops ] Word64QuotOp-> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (word64Op2 quot)- , rightIdentity oneW64 ]+ , rightIdentity oneW64+ , quotFoldingRules word64Ops+ ] Word64RemOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (word64Op2 rem) , leftZero , oneLit 1 $> Lit zeroW64@@ -451,7 +471,9 @@ IntQuotOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (intOp2 quot) , leftZero , rightIdentityPlatform onei- , equalArgs >> retLit onei ]+ , equalArgs >> retLit onei+ , quotFoldingRules intOps+ ] IntRemOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (intOp2 rem) , leftZero , oneLit 1 >> retLit zeroi@@ -503,7 +525,9 @@ , mulFoldingRules WordMulOp wordOps ] WordQuotOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (wordOp2 quot)- , rightIdentityPlatform onew ]+ , rightIdentityPlatform onew+ , quotFoldingRules wordOps+ ] WordRemOp -> mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (wordOp2 rem) , leftZero , oneLit 1 >> retLit zerow@@ -656,6 +680,11 @@ FloatMulOp -> mkPrimOpRule nm 2 [ binaryLit (floatOp2 (*)) , identity onef , strengthReduction twof FloatAddOp ]+ FloatFMAdd -> mkPrimOpRule nm 3 (fmaRules FMAdd W32)+ FloatFMSub -> mkPrimOpRule nm 3 (fmaRules FMSub W32)+ FloatFNMAdd -> mkPrimOpRule nm 3 (fmaRules FNMAdd W32)+ FloatFNMSub -> mkPrimOpRule nm 3 (fmaRules FNMSub W32)+ -- zeroElem zerof doesn't hold because of NaN FloatDivOp -> mkPrimOpRule nm 2 [ guardFloatDiv >> binaryLit (floatOp2 (/)) , rightIdentity onef ]@@ -671,6 +700,10 @@ DoubleMulOp -> mkPrimOpRule nm 2 [ binaryLit (doubleOp2 (*)) , identity oned , strengthReduction twod DoubleAddOp ]+ DoubleFMAdd -> mkPrimOpRule nm 3 (fmaRules FMAdd W64)+ DoubleFMSub -> mkPrimOpRule nm 3 (fmaRules FMSub W64)+ DoubleFNMAdd -> mkPrimOpRule nm 3 (fmaRules FNMAdd W64)+ DoubleFNMSub -> mkPrimOpRule nm 3 (fmaRules FNMSub W64) -- zeroElem zerod doesn't hold because of NaN DoubleDivOp -> mkPrimOpRule nm 2 [ guardDoubleDiv >> binaryLit (doubleOp2 (/)) , rightIdentity oned ]@@ -1118,6 +1151,150 @@ = Nothing --------------------------++-- | Constant folding rules for fused multiply-add operations.+fmaRules :: FMASign -> Width -> [RuleM CoreExpr]+fmaRules signs width =+ [ fmaLit signs width+ , fmaZero_z signs width+ , fmaOne signs width ]++-- | Compute @a * b + c@ when @a@, @b@, @c@ are all literals.+fmaLit :: FMASign -> Width -> RuleM CoreExpr+fmaLit signs width = do+ env <- getRuleOpts+ [Lit l1, Lit l2, Lit l3] <- getArgs+ liftMaybe $+ op env+ (convFloating env l1)+ (convFloating env l2)+ (convFloating env l3)++ where+ op env l1 l2 l3 =+ case width of+ W32+ | LitFloat x <- l1+ , LitFloat y <- l2+ , LitFloat z <- l3+ -> Just $ mkFloatVal env $+ case signs of+ FMAdd -> x * y + z+ FMSub -> x * y - z+ FNMAdd -> negate ( x * y ) + z+ FNMSub -> negate ( x * y ) - z+ W64+ | LitDouble x <- l1+ , LitDouble y <- l2+ , LitDouble z <- l3+ -> Just $ mkDoubleVal env $+ case signs of+ FMAdd -> x * y + z+ FMSub -> x * y - z+ FNMAdd -> negate ( x * y ) + z+ FNMSub -> negate ( x * y ) - z+ _ -> Nothing++-- | @x * y + 0 = x * y@.+fmaZero_z :: FMASign -> Width -> RuleM CoreExpr+fmaZero_z signs width = do+ [x, y, Lit z] <- getArgs+ let+ -- TODO: we should additionally check the sign of z.+ -- FMAdd, FNMAdd: should be -0.0.+ -- FMSub, FNMSub: should be +0.0.+ ok =+ case width of+ W32+ | LitFloat 0 <- z+ -> True+ W64+ | LitDouble 0 <- z+ -> True+ _ -> False+ neg = case width of+ W32 -> FloatNegOp+ W64 -> DoubleNegOp+ _ -> panic "fmaZero_xy: not Float# or Double#"+ mul = case width of+ W32 -> FloatMulOp+ W64 -> DoubleMulOp+ _ -> panic "fmaZero_z: not Float# or Double#"+ if ok+ then return $ case signs of+ FMAdd -> Var (primOpId mul) `App` x `App` y+ FMSub -> Var (primOpId mul) `App` x `App` y+ FNMAdd -> Var (primOpId neg) `App` (Var (primOpId mul) `App` x `App` y)+ FNMSub -> Var (primOpId neg) `App` (Var (primOpId mul) `App` x `App` y)+ else mzero++-- | @±1 * y + z ==> z ± y@ and @x * ±1 + z ==> z ± x@.+fmaOne :: FMASign -> Width -> RuleM CoreExpr+fmaOne signs width = do+ [x, y, z] <- getArgs+ let+ posNegOne_maybe :: Rational -> Maybe Bool+ posNegOne_maybe i+ | i == 1+ = Just False+ | i == -1+ = Just True+ | otherwise+ = Nothing+ ok =+ case width of+ W32+ | Lit (LitFloat i) <- x+ , Just sgn <- posNegOne_maybe i+ -> Just (sgn, y)+ | Lit (LitFloat i) <- y+ , Just sgn <- posNegOne_maybe i+ -> Just (sgn, x)+ W64+ | Lit (LitDouble i) <- x+ , Just sgn <- posNegOne_maybe i+ -> Just (sgn, y)+ | Lit (LitDouble i) <- y+ , Just sgn <- posNegOne_maybe i+ -> Just (sgn, x)+ _ -> Nothing+ neg = case width of+ W32 -> FloatNegOp+ W64 -> DoubleNegOp+ _ -> panic "fmaOne: not Float# or Double#"+ add = case width of+ W32 -> FloatAddOp+ W64 -> DoubleAddOp+ _ -> panic "fmaOne: not Float# or Double#"+ sub = case width of+ W32 -> FloatSubOp+ W64 -> DoubleSubOp+ _ -> panic "fmaOne: not Float# or Double#"+ case ok of+ Nothing -> mzero+ Just (sgn, t) -> return $+ if -- t + z+ | ( signs == FMAdd && sgn == False )+ || ( signs == FNMAdd && sgn == True )+ -> Var (primOpId add) `App` t `App` z+ -- - t + z+ | signs == FMAdd+ || signs == FNMAdd+ -> Var (primOpId sub) `App` z `App` t+ -- t - z+ | ( signs == FMSub && sgn == False )+ || ( signs == FNMSub && sgn == True )+ -> Var (primOpId sub) `App` t `App` z+ -- - t - z+ | signs == FMSub+ || signs == FNMSub+ -> Var (primOpId neg) `App` (Var (primOpId add) `App` t `App` z)+ | otherwise+ -> pprPanic "fmaOne: non-exhaustive pattern match" $+ vcat [ text "signs:" <+> text (show signs)+ , text "sign:" <+> ppr sgn ]++-------------------------- {- Note [The litEq rule: converting equality to case] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This stuff turns@@ -2652,6 +2829,14 @@ (orFoldingRules' platform arg1 arg2 num_ops <|> orFoldingRules' platform arg2 arg1 num_ops) +quotFoldingRules :: NumOps -> RuleM CoreExpr+quotFoldingRules num_ops = do+ env <- getRuleOpts+ guard (roNumConstantFolding env)+ [arg1,arg2] <- getArgs+ platform <- getPlatform+ liftMaybe (quotFoldingRules' platform arg1 arg2 num_ops)+ addFoldingRules' :: Platform -> CoreExpr -> CoreExpr -> NumOps -> Maybe CoreExpr addFoldingRules' platform arg1 arg2 num_ops = case (arg1, arg2) of @@ -2942,6 +3127,29 @@ mkL = Lit . mkNumLiteral platform num_ops or x y = BinOpApp x (fromJust (numOr num_ops)) y +quotFoldingRules' :: Platform -> CoreExpr -> CoreExpr -> NumOps -> Maybe CoreExpr+quotFoldingRules' platform arg1 arg2 num_ops = case (arg1, arg2) of++ -- (x / l1) / l2+ -- l1 and l2 /= 0+ -- l1*l2 doesn't overflow+ -- ==> x / (l1 * l2)+ (is_div num_ops -> Just (x, L l1), L l2)+ | l1 /= 0+ , l2 /= 0+ -- check that the result of the multiplication is in range+ , Just l <- mkNumLiteralMaybe platform num_ops (l1 * l2)+ -> Just (div x (Lit l))+ -- NB: we could directly return 0 or (-1) in case of overflow,+ -- but we would need to know+ -- (1) if we're dealing with a quot or a div operation+ -- (2) if it's an underflow or an overflow.+ -- Left as future work for now.++ _ -> Nothing+ where+ div x y = BinOpApp x (fromJust (numDiv num_ops)) y+ is_binop :: PrimOp -> CoreExpr -> Maybe (Arg CoreBndr, Arg CoreBndr) is_binop op e = case e of BinOpApp x op' y | op == op' -> Just (x,y)@@ -2952,12 +3160,13 @@ App (OpVal op') x | op == op' -> Just x _ -> Nothing -is_add, is_sub, is_mul, is_and, is_or :: NumOps -> CoreExpr -> Maybe (Arg CoreBndr, Arg CoreBndr)+is_add, is_sub, is_mul, is_and, is_or, is_div :: NumOps -> CoreExpr -> Maybe (Arg CoreBndr, Arg CoreBndr) is_add num_ops e = is_binop (numAdd num_ops) e is_sub num_ops e = is_binop (numSub num_ops) e is_mul num_ops e = is_binop (numMul num_ops) e is_and num_ops e = numAnd num_ops >>= \op -> is_binop op e is_or num_ops e = numOr num_ops >>= \op -> is_binop op e+is_div num_ops e = numDiv num_ops >>= \op -> is_binop op e is_neg :: NumOps -> CoreExpr -> Maybe (Arg CoreBndr) is_neg num_ops e = numNeg num_ops >>= \op -> is_op op e@@ -3006,6 +3215,7 @@ { numAdd :: !PrimOp -- ^ Add two numbers , numSub :: !PrimOp -- ^ Sub two numbers , numMul :: !PrimOp -- ^ Multiply two numbers+ , numDiv :: !(Maybe PrimOp) -- ^ Divide two numbers , numAnd :: !(Maybe PrimOp) -- ^ And two numbers , numOr :: !(Maybe PrimOp) -- ^ Or two numbers , numNeg :: !(Maybe PrimOp) -- ^ Negate a number@@ -3016,15 +3226,20 @@ mkNumLiteral :: Platform -> NumOps -> Integer -> Literal mkNumLiteral platform ops i = mkLitNumberWrap platform (numLitType ops) i +-- | Create a numeric literal if it is in range+mkNumLiteralMaybe :: Platform -> NumOps -> Integer -> Maybe Literal+mkNumLiteralMaybe platform ops i = mkLitNumberMaybe platform (numLitType ops) i+ int8Ops :: NumOps int8Ops = NumOps { numAdd = Int8AddOp , numSub = Int8SubOp , numMul = Int8MulOp- , numLitType = LitNumInt8+ , numDiv = Just Int8QuotOp , numAnd = Nothing , numOr = Nothing , numNeg = Just Int8NegOp+ , numLitType = LitNumInt8 } word8Ops :: NumOps@@ -3032,6 +3247,7 @@ { numAdd = Word8AddOp , numSub = Word8SubOp , numMul = Word8MulOp+ , numDiv = Just Word8QuotOp , numAnd = Just Word8AndOp , numOr = Just Word8OrOp , numNeg = Nothing@@ -3043,10 +3259,11 @@ { numAdd = Int16AddOp , numSub = Int16SubOp , numMul = Int16MulOp- , numLitType = LitNumInt16+ , numDiv = Just Int16QuotOp , numAnd = Nothing , numOr = Nothing , numNeg = Just Int16NegOp+ , numLitType = LitNumInt16 } word16Ops :: NumOps@@ -3054,6 +3271,7 @@ { numAdd = Word16AddOp , numSub = Word16SubOp , numMul = Word16MulOp+ , numDiv = Just Word16QuotOp , numAnd = Just Word16AndOp , numOr = Just Word16OrOp , numNeg = Nothing@@ -3065,10 +3283,11 @@ { numAdd = Int32AddOp , numSub = Int32SubOp , numMul = Int32MulOp- , numLitType = LitNumInt32+ , numDiv = Just Int32QuotOp , numAnd = Nothing , numOr = Nothing , numNeg = Just Int32NegOp+ , numLitType = LitNumInt32 } word32Ops :: NumOps@@ -3076,6 +3295,7 @@ { numAdd = Word32AddOp , numSub = Word32SubOp , numMul = Word32MulOp+ , numDiv = Just Word32QuotOp , numAnd = Just Word32AndOp , numOr = Just Word32OrOp , numNeg = Nothing@@ -3087,10 +3307,11 @@ { numAdd = Int64AddOp , numSub = Int64SubOp , numMul = Int64MulOp- , numLitType = LitNumInt64+ , numDiv = Just Int64QuotOp , numAnd = Nothing , numOr = Nothing , numNeg = Just Int64NegOp+ , numLitType = LitNumInt64 } word64Ops :: NumOps@@ -3098,6 +3319,7 @@ { numAdd = Word64AddOp , numSub = Word64SubOp , numMul = Word64MulOp+ , numDiv = Just Word64QuotOp , numAnd = Just Word64AndOp , numOr = Just Word64OrOp , numNeg = Nothing@@ -3109,6 +3331,7 @@ { numAdd = IntAddOp , numSub = IntSubOp , numMul = IntMulOp+ , numDiv = Just IntQuotOp , numAnd = Just IntAndOp , numOr = Just IntOrOp , numNeg = Just IntNegOp@@ -3120,6 +3343,7 @@ { numAdd = WordAddOp , numSub = WordSubOp , numMul = WordMulOp+ , numDiv = Just WordQuotOp , numAnd = Just WordAndOp , numOr = Just WordOrOp , numNeg = Nothing@@ -3184,10 +3408,67 @@ | Just DataToTagOp <- isPrimOpId_maybe f , Just (tc, _) <- tcSplitTyConApp_maybe ty , isAlgTyCon tc+ , not (isTypeDataTyCon tc) -- See wrinkle (W2c) in GHC.Rename.Module+ -- Note [Type data declarations] = Just (v, tx_con_dtt ty , \v -> App (App (Var f) (Type ty)) (Var v)) caseRules _ _ = Nothing+++-- | Case rules+--+-- It's important that occurence info are present, hence the use of In* types.+caseRules2+ :: InExpr -- ^ Scutinee+ -> InId -- ^ Case-binder+ -> [InAlt] -- ^ Alternatives in standard (increasing) order+ -> Maybe (InExpr, InId, [InAlt])+caseRules2 scrut bndr alts++ -- case quotRem# x y of+ -- (# q, _ #) -> body+ -- ====>+ -- case quot# x y of+ -- q -> body+ --+ -- case quotRem# x y of+ -- (# _, r #) -> body+ -- ====>+ -- case rem# x y of+ -- r -> body+ | BinOpApp x op y <- scrut+ , Just (quot,rem) <- is_any_quot_rem op+ , [Alt (DataAlt _) [q,r] body] <- alts+ , isDeadBinder bndr+ , dead_q <- isDeadBinder q+ , dead_r <- isDeadBinder r+ , dead_q || dead_r+ = if+ | dead_q -> Just $ (BinOpApp x rem y, r, [Alt DEFAULT [] body])+ | dead_r -> Just $ (BinOpApp x quot y, q, [Alt DEFAULT [] body])+ | otherwise -> Nothing++ | otherwise+ = Nothing+++-- | If the given primop is a quotRem, return the corresponding (quot,rem).+is_any_quot_rem :: PrimOp -> Maybe (PrimOp, PrimOp)+is_any_quot_rem = \case+ IntQuotRemOp -> Just (IntQuotOp , IntRemOp)+ Int8QuotRemOp -> Just (Int8QuotOp, Int8RemOp)+ Int16QuotRemOp -> Just (Int16QuotOp, Int16RemOp)+ Int32QuotRemOp -> Just (Int32QuotOp, Int32RemOp)+ -- Int64QuotRemOp doesn't exist (yet)++ WordQuotRemOp -> Just (WordQuotOp, WordRemOp)+ Word8QuotRemOp -> Just (Word8QuotOp, Word8RemOp)+ Word16QuotRemOp -> Just (Word16QuotOp, Word16RemOp)+ Word32QuotRemOp -> Just (Word32QuotOp, Word32RemOp)+ -- Word64QuotRemOp doesn't exist (yet)++ _ -> Nothing tx_lit_con :: Platform -> (Integer -> Integer) -> AltCon -> Maybe AltCon
GHC/Core/Opt/CprAnal.hs view
@@ -35,6 +35,7 @@ import GHC.Utils.Outputable import GHC.Utils.Misc import GHC.Utils.Panic+import GHC.Utils.Panic.Plain import GHC.Utils.Logger ( Logger, putDumpFileMaybe, DumpFormat (..) ) import Data.List ( mapAccumL )@@ -270,11 +271,11 @@ cprAnalAlt env scrut_ty (Alt con bndrs rhs) = (rhs_ty, Alt con bndrs rhs') where- ids = filter isId bndrs env_alt | DataAlt dc <- con+ , let ids = filter isId bndrs , CprType arity cpr <- scrut_ty- , arity == 0 -- See Note [Dead code may contain type confusions]+ , assert (arity == 0 ) True = case unpackConFieldsCpr dc cpr of AllFieldsSame field_cpr | let sig = mkCprSig 0 field_cpr@@ -283,7 +284,7 @@ | let sigs = zipWith (mkCprSig . idArity) ids field_cprs -> extendSigEnvList env (zipEqual "cprAnalAlt" ids sigs) | otherwise- = extendSigEnvAllSame env ids topCprSig+ = env (rhs_ty, rhs') = cprAnal env_alt rhs --@@ -430,43 +431,6 @@ (id', rhs', env') = cprAnalBind env id rhs {--Note [Dead code may contain type confusions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In T23862, we have a nested case match that looks like this-- data CheckSingleton (check :: Bool) where- Checked :: CheckSingleton True- Unchecked :: CheckSingleton False- data family Result (check :: Bool) a- data instance Result True a = CheckedResult a- newtype instance Result True a = UncheckedResult a-- case m () of Checked co1 ->- case m () of Unchecked co2 ->- case ((\_ -> True)- |> .. UncheckedResult ..- |> sym co2- |> co1) :: Result True (Bool -> Bool) of- CheckedResult f -> CheckedResult (f True)--Clearly, the innermost case is dead code, because the `Checked` and `Unchecked`-cases are apart.-However, both constructors introduce mutually contradictory coercions `co1` and-`co2` along which GHC generates a type confusion:-- 1. (\_ -> True) :: Bool -> Bool- 2. newtype coercion UncheckedResult (\_ -> True) :: Result False (Bool -> Bool)- 3. |> ... sym co1 ... :: Result check (Bool -> Bool)- 4. |> ... co2 ... :: Result True (Bool -> Bool)--Note that we started with a function, injected into `Result` via a newtype-instance and then match on it with a datatype instance.--We have to handle this case gracefully in `cprAnalAlt`, where for the innermost-case we see a `DataAlt` for `CheckedResult`, yet have a scrutinee type that-abstracts the function `(\_ -> True)` with arity 1.-In this case, don't pretend we know anything about the fields of `CheckedResult`!- Note [The OPAQUE pragma and avoiding the reboxing of results] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider:
GHC/Core/Opt/DmdAnal.hs view
@@ -16,39 +16,42 @@ import GHC.Prelude -import GHC.Core.Opt.WorkWrap.Utils import GHC.Types.Demand -- All of it+ import GHC.Core-import GHC.Core.Multiplicity ( scaledThing )-import GHC.Utils.Outputable-import GHC.Types.Var.Env-import GHC.Types.Var.Set-import GHC.Types.Basic-import Data.List ( mapAccumL ) import GHC.Core.DataCon-import GHC.Types.ForeignCall ( isSafeForeignCall )-import GHC.Types.Id import GHC.Core.Utils import GHC.Core.TyCon import GHC.Core.Type-import GHC.Core.Predicate( isClassPred )+import GHC.Core.Predicate( isEqualityClass, isCTupleClass ) import GHC.Core.FVs ( rulesRhsFreeIds, bndrRuleAndUnfoldingIds ) import GHC.Core.Coercion ( Coercion ) import GHC.Core.TyCo.FVs ( coVarsOfCos ) import GHC.Core.TyCo.Compare ( eqType )+import GHC.Core.Multiplicity ( scaledThing ) import GHC.Core.FamInstEnv import GHC.Core.Opt.Arity ( typeArity )-import GHC.Utils.Misc-import GHC.Utils.Panic-import GHC.Utils.Panic.Plain-import GHC.Data.Maybe+import GHC.Core.Opt.WorkWrap.Utils+ import GHC.Builtin.PrimOps import GHC.Builtin.Types.Prim ( realWorldStatePrimTy )+ import GHC.Types.Unique.Set import GHC.Types.Unique.MemoFun import GHC.Types.RepType+import GHC.Types.ForeignCall ( isSafeForeignCall )+import GHC.Types.Id+import GHC.Types.Var.Env+import GHC.Types.Var.Set+import GHC.Types.Basic +import GHC.Utils.Misc+import GHC.Utils.Panic+import GHC.Utils.Panic.Plain+import GHC.Utils.Outputable +import Data.List ( mapAccumL )+ {- ************************************************************************ * *@@ -403,7 +406,7 @@ anticipateANF :: CoreExpr -> Card -> Card anticipateANF e n | exprIsTrivial e = n -- trivial expr won't have a binding- | Just Unlifted <- typeLevity_maybe (exprType e)+ | definitelyUnliftedType (exprType e) , not (isAbs n && exprOkForSpeculation e) = case_bind n | otherwise = let_bind n where@@ -1089,8 +1092,8 @@ WithDmdType rhs_dmd_ty rhs' = dmdAnal env rhs_dmd rhs DmdType rhs_env rhs_dmds = rhs_dmd_ty- (final_rhs_dmds, final_rhs) = finaliseArgBoxities env id threshold_arity rhs' (de_div rhs_env)- `orElse` (rhs_dmds, rhs')+ (final_rhs_dmds, final_rhs) = finaliseArgBoxities env id threshold_arity+ rhs_dmds (de_div rhs_env) rhs' sig = mkDmdSigForArity threshold_arity (DmdType sig_env final_rhs_dmds) @@ -1273,7 +1276,9 @@ * Ordinary bindings: idArity f. Why idArity arguments? Because that's a conservative estimate of how many arguments we must feed a function before it does anything interesting with- them. Also it elegantly subsumes the trivial RHS and PAP case.+ them. Also it elegantly subsumes the trivial RHS and PAP case. E.g. for+ f = g+ we want to use a threshold arity based on g, not 0! idArity is /at least/ the number of manifest lambdas, but might be higher for PAPs and trivial RHS (see Note [Demand analysis for trivial right-hand sides]).@@ -1498,7 +1503,7 @@ So we want to give `indexError` a signature like `<1!P(!S,!S)><1!S><S!S>b` where the !S (meaning Poly Unboxed C1N) says that the polymorphic arguments-are unboxed (recursively). The wrapper for `indexError` won't /acutally/+are unboxed (recursively). The wrapper for `indexError` won't /actually/ unbox them (because their polymorphic type doesn't allow that) but when demand-analysing /callers/, we'll behave as if that call needs the args unboxed.@@ -1781,39 +1786,6 @@ that we get the strict demand signature we wanted even if we can't float the case on `x` up through the case on `burble`. -Note [Do not unbox class dictionaries]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We never unbox class dictionaries in worker/wrapper.--1. INLINABLE functions- If we have- f :: Ord a => [a] -> Int -> a- {-# INLINABLE f #-}- and we worker/wrapper f, we'll get a worker with an INLINABLE pragma- (see Note [Worker/wrapper for INLINABLE functions] in GHC.Core.Opt.WorkWrap),- which can still be specialised by the type-class specialiser, something like- fw :: Ord a => [a] -> Int# -> a-- BUT if f is strict in the Ord dictionary, we might unpack it, to get- fw :: (a->a->Bool) -> [a] -> Int# -> a- and the type-class specialiser can't specialise that. An example is #6056.-- Historical note: #14955 describes how I got this fix wrong the first time.- I got aware of the issue in T5075 by the change in boxity of loop between- demand analysis runs.--2. -fspecialise-aggressively. As #21286 shows, the same phenomenon can occur- occur without INLINABLE, when we use -fexpose-all-unfoldings and- -fspecialise-aggressively to do vigorous cross-module specialisation.--3. #18421 found that unboxing a dictionary can also make the worker less likely- to inline; the inlining heuristics seem to prefer to inline a function- applied to a dictionary over a function applied to a bunch of functions.--TL;DR we /never/ unbox class dictionaries. Unboxing the dictionary, and passing-a raft of higher-order functions isn't a huge win anyway -- you really want to-specialise the function.- Note [Worker argument budget] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In 'finaliseArgBoxities' we don't want to generate workers with zillions of@@ -1947,22 +1919,39 @@ positiveTopBudget :: Budgets -> Bool positiveTopBudget (MkB n _) = n >= 0 -finaliseArgBoxities :: AnalEnv -> Id -> Arity -> CoreExpr -> Divergence- -> Maybe ([Demand], CoreExpr)-finaliseArgBoxities env fn arity rhs div- | arity > count isId bndrs -- Can't find enough binders- = Nothing -- This happens if we have f = g- -- Then there are no binders; we don't worker/wrapper; and we- -- simply want to give f the same demand signature as g+finaliseArgBoxities :: AnalEnv -> Id -> Arity+ -> [Demand] -> Divergence+ -> CoreExpr -> ([Demand], CoreExpr)+finaliseArgBoxities env fn threshold_arity rhs_dmds div rhs - | otherwise -- NB: arity is the threshold_arity, which might be less than+ -- Check for an OPAQUE function: see Note [OPAQUE pragma]+ -- In that case, trim off all boxity info from argument demands+ -- and demand info on lambda binders+ -- See Note [The OPAQUE pragma and avoiding the reboxing of arguments]+ | isOpaquePragma (idInlinePragma fn)+ , let trimmed_rhs_dmds = map trimBoxity rhs_dmds+ = (trimmed_rhs_dmds, set_lam_dmds trimmed_rhs_dmds rhs)++ -- Check that we have enough visible binders to match the+ -- threshold arity; if not, we won't do worker/wrapper+ -- This happens if we have simply {f = g} or a PAP {f = h 13}+ -- we simply want to give f the same demand signature as g+ -- How can such bindings arise? Perhaps from {-# NOLINE[2] f #-},+ -- or if the call to `f` is currently not-applied (map f xs).+ -- It's a bit of a corner case. Anyway for now we pass on the+ -- unadulterated demands from the RHS, without any boxity trimming.+ | threshold_arity > count isId bndrs+ = (rhs_dmds, rhs)++ -- The normal case+ | otherwise -- NB: threshold_arity might be less than -- manifest arity for join points = -- pprTrace "finaliseArgBoxities" ( -- vcat [text "function:" <+> ppr fn -- , text "dmds before:" <+> ppr (map idDemandInfo (filter isId bndrs)) -- , text "dmds after: " <+> ppr arg_dmds' ]) $- Just (arg_dmds', add_demands arg_dmds' rhs)- -- add_demands: we must attach the final boxities to the lambda-binders+ (arg_dmds', set_lam_dmds arg_dmds' rhs)+ -- set_lam_dmds: we must attach the final boxities to the lambda-binders -- of the function, both because that's kosher, and because CPR analysis -- uses the info on the binders directly. where@@ -1979,30 +1968,16 @@ (remaining_budget, arg_dmds') = go_args (MkB max_wkr_args remaining_budget) arg_triples arg_triples :: [(Type, StrictnessMark, Demand)]- arg_triples = take arity $- [ (bndr_ty, NotMarkedStrict, get_dmd bndr bndr_ty)- | bndr <- bndrs- , isRuntimeVar bndr, let bndr_ty = idType bndr ]-- get_dmd :: Id -> Type -> Demand- get_dmd bndr bndr_ty- | isClassPred bndr_ty = trimBoxity dmd- -- See Note [Do not unbox class dictionaries]- -- NB: 'ty' has not been normalised, so this will (rightly)- -- catch newtype dictionaries too.- -- NB: even for bottoming functions, don't unbox dictionaries-- | is_bot_fn = unboxDeeplyDmd dmd- -- See Note [Boxity for bottoming functions], case (B)-- | is_opaque = trimBoxity dmd- -- See Note [OPAQUE pragma]- -- See Note [The OPAQUE pragma and avoiding the reboxing of arguments]+ arg_triples = take threshold_arity $+ [ (idType bndr, NotMarkedStrict, get_dmd bndr)+ | bndr <- bndrs, isRuntimeVar bndr ] - | otherwise = dmd+ get_dmd :: Id -> Demand+ get_dmd bndr+ | is_bot_fn = unboxDeeplyDmd dmd -- See Note [Boxity for bottoming functions],+ | otherwise = dmd -- case (B) where- dmd = idDemandInfo bndr- is_opaque = isOpaquePragma (idInlinePragma fn)+ dmd = idDemandInfo bndr -- is_bot_fn: see Note [Boxity for bottoming functions] is_bot_fn = div == botDiv@@ -2059,13 +2034,18 @@ | positiveTopBudget bg_inner' = (bg_inner', dmd') | otherwise = (bg_inner, trimBoxity dmd) - add_demands :: [Demand] -> CoreExpr -> CoreExpr+ set_lam_dmds :: [Demand] -> CoreExpr -> CoreExpr -- Attach the demands to the outer lambdas of this expression- add_demands [] e = e- add_demands (dmd:dmds) (Lam v e)- | isTyVar v = Lam v (add_demands (dmd:dmds) e)- | otherwise = Lam (v `setIdDemandInfo` dmd) (add_demands dmds e)- add_demands dmds e = pprPanic "add_demands" (ppr dmds $$ ppr e)+ set_lam_dmds (dmd:dmds) (Lam v e)+ | isTyVar v = Lam v (set_lam_dmds (dmd:dmds) e)+ | otherwise = Lam (v `setIdDemandInfo` dmd) (set_lam_dmds dmds e)+ set_lam_dmds dmds (Cast e co) = Cast (set_lam_dmds dmds e) co+ -- This case happens for an OPAQUE function, which may look like+ -- f = (\x y. blah) |> co+ -- We give it strictness but no boxity (#22502)+ set_lam_dmds _ e = e+ -- In the OPAQUE case, the list of demands at this point might be+ -- non-empty, e.g., when looking at a PAP. Hence don't panic (#22997). finaliseLetBoxity :: AnalEnv@@ -2101,6 +2081,12 @@ -- isMarkedStrict: see Note [Unboxing evaluated arguments] in DmdAnal -> DontUnbox + | doNotUnbox ty+ -> DontUnbox -- See Note [Do not unbox class dictionaries]+ -- NB: 'ty' has not been normalised, so this will (rightly)+ -- catch newtype dictionaries too.+ -- NB: even for bottoming functions, don't unbox dictionaries+ | DefinitelyRecursive <- ae_rec_dc env dc -- See Note [Which types are unboxed?] -- and Note [Demand analysis for recursive data constructors]@@ -2110,6 +2096,76 @@ -> DoUnbox (zip3 (dubiousDataConInstArgTys dc tc_args) (dataConRepStrictness dc) dmds)+++doNotUnbox :: Type -> Bool+-- Do not unbox class dictionaries, except equality classes and tuples+-- Note [Do not unbox class dictionaries]+doNotUnbox arg_ty+ = case tyConAppTyCon_maybe arg_ty of+ Just tc | Just cls <- tyConClass_maybe tc+ -> not (isEqualityClass cls || isCTupleClass cls)+ -- See (DNB2) and (DNB1) in Note [Do not unbox class dictionaries]++ _ -> False++{- Note [Do not unbox class dictionaries]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We never unbox class dictionaries in worker/wrapper.++1. INLINABLE functions+ If we have+ f :: Ord a => [a] -> Int -> a+ {-# INLINABLE f #-}+ and we worker/wrapper f, we'll get a worker with an INLINABLE pragma+ (see Note [Worker/wrapper for INLINABLE functions] in GHC.Core.Opt.WorkWrap),+ which can still be specialised by the type-class specialiser, something like+ fw :: Ord a => [a] -> Int# -> a++ BUT if f is strict in the Ord dictionary, we might unpack it, to get+ fw :: (a->a->Bool) -> [a] -> Int# -> a+ and the type-class specialiser can't specialise that. An example is #6056.++ Historical note: #14955 describes how I got this fix wrong the first time.+ I got aware of the issue in T5075 by the change in boxity of loop between+ demand analysis runs.++2. -fspecialise-aggressively. As #21286 shows, the same phenomenon can occur+ occur without INLINABLE, when we use -fexpose-all-unfoldings and+ -fspecialise-aggressively to do vigorous cross-module specialisation.++3. #18421 found that unboxing a dictionary can also make the worker less likely+ to inline; the inlining heuristics seem to prefer to inline a function+ applied to a dictionary over a function applied to a bunch of functions.++TL;DR we /never/ unbox class dictionaries. Unboxing the dictionary, and passing+a raft of higher-order functions isn't a huge win anyway -- you really want to+specialise the function.++Wrinkle (DNB1): we /do/ want to unbox tuple dictionaries (#23398)+ f :: (% Eq a, Show a %) => blah+ with -fdicts-strict it is great to unbox to+ $wf :: Eq a => Show a => blah+ (where I have written out the currying explicitly). Now we can specialise+ $wf on the Eq or Show dictionary. Nothing is lost.++ And something is gained. It is possible that `f` will look like this:+ f = /\a. \d:(% Eq a, Show a %). ... f @a (% sel1 d, sel2 d %)...+ where there is a recurive call to `f`, or to another function that takes the+ same tuple dictionary, but where the tuple is built from the components of+ `d`. The Simplier does not fix this. But if we unpacked the dictionary+ we'd get+ $wf = /\a. \(d1:Eq a) (d2:Show a). let d = (% d1, d2 %)+ in ...f @a (% sel1 d, sel2 d %)+ and all the tuple building and taking apart will disappear.++Wrinkle (DNB2): we /do/ wnat to unbox equality dictionaries,+ for (~), (~~), and Coercible (#23398). Their payload is a single unboxed+ coercion. We never want to specialise on `(t1 ~ t2)`. All that would do is+ to make a copy of the function's RHS with a particular coercion. Unlike+ normal class methods, that does not unlock any new optimisation+ opportunities in the specialised RHS.+-} {- ********************************************************************* * *
GHC/Core/Opt/FloatIn.hs view
@@ -28,7 +28,7 @@ import GHC.Core.FVs import GHC.Core.Type -import GHC.Types.Basic ( RecFlag(..), isRec, Levity(Unlifted) )+import GHC.Types.Basic ( RecFlag(..), isRec ) import GHC.Types.Id ( idType, isJoinId, isJoinId_maybe ) import GHC.Types.Tickish import GHC.Types.Var@@ -618,7 +618,7 @@ | isJoinId bndr = isRec is_rec -- Joins are one-shot iff non-recursive - | Just Unlifted <- typeLevity_maybe (idType bndr)+ | definitelyUnliftedType (idType bndr) = True -- Preserve let-can-float invariant, see Note [noFloatInto considerations] | otherwise
GHC/Core/Opt/LiberateCase.hs view
@@ -14,6 +14,7 @@ import GHC.Core import GHC.Core.Unfold+import GHC.Core.Opt.Simplify.Inline import GHC.Builtin.Types ( unitDataConId ) import GHC.Types.Id import GHC.Types.Var.Env
GHC/Core/Opt/Monad.hs view
@@ -20,7 +20,7 @@ initRuleEnv, getExternalRuleBase, getDynFlags, getPackageFamInstEnv, getInteractiveContext,- getUniqTag,+ getUniqMask, getNamePprCtx, getSrcSpanM, -- ** Writing to the monad@@ -40,7 +40,7 @@ import GHC.Prelude hiding ( read ) -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Env import GHC.Core.Rules ( RuleBase, RuleEnv, mkRuleEnv )@@ -117,7 +117,7 @@ cr_name_ppr_ctx :: NamePprCtx, cr_loc :: SrcSpan, -- Use this for log/error messages so they -- are at least tagged with the right source file- cr_uniq_tag :: !Char -- Tag for creating unique values+ cr_uniq_mask :: !Char -- Mask for creating unique values } -- Note: CoreWriter used to be defined with data, rather than newtype. If it@@ -167,12 +167,12 @@ instance MonadUnique CoreM where getUniqueSupplyM = do- tag <- read cr_uniq_tag- liftIO $! mkSplitUniqSupply tag+ mask <- read cr_uniq_mask+ liftIO $! mkSplitUniqSupply mask getUniqueM = do- tag <- read cr_uniq_tag- liftIO $! uniqFromTag tag+ mask <- read cr_uniq_mask+ liftIO $! uniqFromMask mask runCoreM :: HscEnv -> RuleBase@@ -182,7 +182,7 @@ -> SrcSpan -> CoreM a -> IO (a, SimplCount)-runCoreM hsc_env rule_base tag mod name_ppr_ctx loc m+runCoreM hsc_env rule_base mask mod name_ppr_ctx loc m = liftM extract $ runIOEnv reader $ unCoreM m where reader = CoreReader {@@ -191,7 +191,7 @@ cr_module = mod, cr_name_ppr_ctx = name_ppr_ctx, cr_loc = loc,- cr_uniq_tag = tag+ cr_uniq_mask = mask } extract :: (a, CoreWriter) -> (a, SimplCount)@@ -261,8 +261,8 @@ addSimplCount :: SimplCount -> CoreM () addSimplCount count = write (CoreWriter { cw_simpl_count = count }) -getUniqTag :: CoreM Char-getUniqTag = read cr_uniq_tag+getUniqMask :: CoreM Char+getUniqMask = read cr_uniq_mask -- Convenience accessors for useful fields of HscEnv
GHC/Core/Opt/OccurAnal.hs view
@@ -59,7 +59,7 @@ import GHC.Unit.Module( Module ) import Data.List (mapAccumL, mapAccumR)-import Data.List.NonEmpty (NonEmpty (..), nonEmpty)+import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.List.NonEmpty as NE {-@@ -510,6 +510,16 @@ at any of the definitions. This is done by Simplify.simplRecBind, when it calls addLetIdInfo. +Note [TailUsageDetails when forming Rec groups]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The `TailUsageDetails` stored in the `nd_uds` field of a `NodeDetails` is+computed by `occAnalLamTail` applied to the RHS, not `occAnalExpr`.+That is because the binding might still become a *non-recursive join point* in+the AcyclicSCC case of dependency analysis!+Hence we do the delayed `adjustTailUsage` in `occAnalRec`/`tagRecBinders` to get+a regular, adjusted UsageDetails.+See Note [Join points and unfoldings/rules] for more details on the contract.+ Note [Stable unfoldings] ~~~~~~~~~~~~~~~~~~~~~~~~ None of the above stuff about RULES applies to a stable unfolding@@ -608,6 +618,65 @@ 'occ_tail' will be 'NoTailCallInfo'. The tail call info flows bottom-up with the rest of 'OccInfo' until it goes on the binder. +Note [Join arity prediction based on joinRhsArity]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In general, the join arity from tail occurrences of a join point (O) may be+higher or lower than the manifest join arity of the join body (M). E.g.,++ -- M > O:+ let f x y = x + y -- M = 2+ in if b then f 1 else f 2 -- O = 1+ ==> { Contify for join arity 1 }+ join f x = \y -> x + y+ in if b then jump f 1 else jump f 2++ -- M < O+ let f = id -- M = 0+ in if ... then f 12 else f 13 -- O = 1+ ==> { Contify for join arity 1, eta-expand f }+ join f x = id x+ in if b then jump f 12 else jump f 13++But for *recursive* let, it is crucial that both arities match up, consider++ letrec f x y = if ... then f x else True+ in f 42++Here, M=2 but O=1. If we settled for a joinrec arity of 1, the recursive jump+would not happen in a tail context! Contification is invalid here.+So indeed it is crucial to demand that M=O.++(Side note: Actually, we could be more specific: Let O1 be the join arity of+occurrences from the letrec RHS and O2 the join arity from the let body. Then+we need M=O1 and M<=O2 and could simply eta-expand the RHS to match O2 later.+M=O is the specific case where we don't want to eta-expand. Neither the join+points paper nor GHC does this at the moment.)++We can capitalise on this observation and conclude that *if* f could become a+joinrec (without eta-expansion), it will have join arity M.+Now, M is just the result of 'joinRhsArity', a rather simple, local analysis.+It is also the join arity inside the 'TailUsageDetails' returned by+'occAnalLamTail', so we can predict join arity without doing any fixed-point+iteration or really doing any deep traversal of let body or RHS at all.+We check for M in the 'adjustTailUsage' call inside 'tagRecBinders'.++All this is quite apparent if you look at the contification transformation in+Fig. 5 of "Compiling without Continuations" (which does not account for+eta-expansion at all, mind you). The letrec case looks like this++ letrec f = /\as.\xs. L[us] in L'[es]+ ... and a bunch of conditions establishing that f only occurs+ in app heads of join arity (len as + len xs) inside us and es ...++The syntactic form `/\as.\xs. L[us]` forces M=O iff `f` occurs in `us`. However,+for non-recursive functions, this is the definition of contification from the+paper:++ let f = /\as.\xs.u in L[es] ... conditions ...++Note that u could be a lambda itself, as we have seen. No relationship between M+and O to exploit here.+ Note [Join points and unfoldings/rules] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider@@ -618,8 +687,10 @@ Before j is inlined, we'll have occurrences of j2 in both j's RHS and in its stable unfolding. We want to discover-j2 as a join point. So we must do the adjustRhsUsage thing-on j's RHS. That's why we pass mb_join_arity to calcUnfolding.+j2 as a join point. So 'occAnalUnfolding' returns an unadjusted+'TailUsageDetails', like 'occAnalLamTail'. We adjust the usage details of the+unfolding to the actual join arity using the same 'adjustTailArity' as for+the RHS, see Note [Adjusting right-hand sides]. Same with rules. Suppose we have: @@ -636,15 +707,32 @@ rule we can allow the tail-call info from the RHS of the rule to propagate. -* Wrinkle for Rec case. In the recursive case we don't know the- join-point arity in advance, when calling occAnalUnfolding and- occAnalRules. (See makeNode.) We don't want to pass Nothing,- because then a recursive joinrec might lose its join-poin-hood- when SpecConstr adds a RULE. So we just make do with the- *current* join-poin-hood, stored in the Id.+* Note that the join arity of the RHS and that of the unfolding or RULE might+ mismatch: - In the non-recursive case things are simple: see occAnalNonRecBind+ let j x y = j2 (x+x)+ {-# INLINE[2] j = \x. g #-}+ {-# RULE forall x y z. j x y z = h 17 #-}+ in j 1 2 + So it is crucial that we adjust each TailUsageDetails individually+ with the actual join arity 2 here before we combine with `andUDs`.+ Here, that means losing tail call info on `g` and `h`.++* Wrinkle for Rec case: We store one TailUsageDetails in the node Details for+ RHS, unfolding and RULE combined. Clearly, if they don't agree on their join+ arity, we have to do some adjusting. We choose to adjust to the join arity+ of the RHS, because that is likely the join arity that the join point will+ have; see Note [Join arity prediction based on joinRhsArity].++ If the guess is correct, then tail calls in the RHS are preserved; a necessary+ condition for the whole binding becoming a joinrec.+ The guess can only be incorrect in the 'AcyclicSCC' case when the binding+ becomes a non-recursive join point with a different join arity. But then the+ eventual call to 'adjustTailUsage' in 'tagRecBinders'/'occAnalRec' will+ be with a different join arity and destroy unsound tail call info with+ 'markNonTail'.+ * Wrinkle for RULES. Suppose the example was a bit different: let j :: Int -> Int j y = 2 * y@@ -669,28 +757,21 @@ This appears to be very rare in practice. TODO Perhaps we should gather statistics to be sure. -Note [Unfoldings and join points]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We assume that anything in an unfolding occurs multiple times, since-unfoldings are often copied (that's the whole point!). But we still-need to track tail calls for the purpose of finding join points.-- ------------------------------------------------------------ Note [Adjusting right-hand sides] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There's a bit of a dance we need to do after analysing a lambda expression or a right-hand side. In particular, we need to - a) call 'markAllInsideLam' *unless* the binding is for a thunk, a one-shot- lambda, or a non-recursive join point; and- b) call 'markAllNonTail' *unless* the binding is for a join point, and- the RHS has the right arity; e.g.+ a) call 'markAllNonTail' *unless* the binding is for a join point, and+ the TailUsageDetails from the RHS has the right join arity; e.g. join j x y = case ... of A -> j2 p B -> j2 q in j a b Here we want the tail calls to j2 to be tail calls of the whole expression+ b) call 'markAllInsideLam' *unless* the binding is for a thunk, a one-shot+ lambda, or a non-recursive join point Some examples, with how the free occurrences in e (assumed not to be a value lambda) get marked:@@ -707,26 +788,39 @@ There are a few other caveats; most importantly, if we're marking a binding as 'AlwaysTailCalled', it's *going* to be a join point, so we treat it as one so that the effect cascades properly. Consequently, at the time the RHS is-analysed, we won't know what adjustments to make; thus 'occAnalLamOrRhs' must-return the unadjusted 'UsageDetails', to be adjusted by 'adjustRhsUsage' once-join-point-hood has been decided.+analysed, we won't know what adjustments to make; thus 'occAnalLamTail' must+return the unadjusted 'TailUsageDetails', to be adjusted by 'adjustTailUsage'+once join-point-hood has been decided and eventual one-shot annotations have+been added through 'markNonRecJoinOneShots'. -Thus the overall sequence taking place in 'occAnalNonRecBind' and-'occAnalRecBind' is as follows:+It is not so simple to see that 'occAnalNonRecBind' and 'occAnalRecBind' indeed+perform a similar sequence of steps. Thus, here is an interleaving of events+of both functions, serving as a specification: - 1. Call 'occAnalLamOrRhs' to find usage information for the RHS.- 2. Call 'tagNonRecBinder' or 'tagRecBinders', which decides whether to make+ 1. Call 'occAnalLamTail' to find usage information for the RHS.+ Recursive case: 'makeNode'+ Non-recursive case: 'occAnalNonRecBind'+ 2. (Analyse the binding's scope. Done in 'occAnalBind'/`occAnal Let{}`.+ Same whether recursive or not.)+ 3. Call 'tagNonRecBinder' or 'tagRecBinders', which decides whether to make the binding a join point.- 3. Call 'adjustRhsUsage' accordingly. (Done as part of 'tagRecBinders' when- recursive.)--(In the recursive case, this logic is spread between 'makeNode' and-'occAnalRec'.)+ Cyclic Recursive case: 'mkLoopBreakerNodes'+ Acyclic Recursive case: `occAnalRec AcyclicSCC{}`+ Non-recursive case: 'occAnalNonRecBind'+ 4. Non-recursive join point: Call 'markNonRecJoinOneShots' so that e.g.,+ FloatOut sees one-shot annotations on lambdas+ Acyclic Recursive case: `occAnalRec AcyclicSCC{}` calls 'adjustNonRecRhs'+ Non-recursive case: 'occAnalNonRecBind' calls 'adjustNonRecRhs'+ 5. Call 'adjustTailUsage' accordingly.+ Cyclic Recursive case: 'tagRecBinders'+ Acyclic Recursive case: 'adjustNonRecRhs'+ Non-recursive case: 'adjustNonRecRhs' -} - data WithUsageDetails a = WithUsageDetails !UsageDetails !a +data WithTailUsageDetails a = WithTailUsageDetails !TailUsageDetails !a+ ------------------------------------------------------------------ -- occAnalBind ------------------------------------------------------------------@@ -750,19 +844,17 @@ | isTyVar bndr -- A type let; we don't gather usage info = WithUsageDetails body_usage [NonRec bndr rhs] - | not (bndr `usedIn` body_usage) -- It's not mentioned- = WithUsageDetails body_usage []+ | not (bndr `usedIn` body_usage)+ = WithUsageDetails body_usage [] -- See Note [Dead code] | otherwise -- It's mentioned in the body- = WithUsageDetails (body_usage' `andUDs` rhs_usage) [NonRec final_bndr rhs']+ = WithUsageDetails (body_usage' `andUDs` rhs_usage) [NonRec final_bndr final_rhs] where- (body_usage', tagged_bndr) = tagNonRecBinder lvl body_usage bndr- final_bndr = tagged_bndr `setIdUnfolding` unf'- `setIdSpecialisation` mkRuleInfo rules'- rhs_usage = rhs_uds `andUDs` unf_uds `andUDs` rule_uds+ WithUsageDetails body_usage' tagged_bndr = tagNonRecBinder lvl body_usage bndr -- Get the join info from the *new* decision -- See Note [Join points and unfoldings/rules]+ -- => join arity O of Note [Join arity prediction based on joinRhsArity] mb_join_arity = willBeJoinId_maybe tagged_bndr is_join_point = isJust mb_join_arity @@ -773,17 +865,28 @@ -- See Note [Sources of one-shot information] rhs_env = env1 { occ_one_shots = argOneShots dmd }- (WithUsageDetails rhs_uds rhs') = occAnalRhs rhs_env NonRecursive mb_join_arity rhs+ -- See Note [Join arity prediction based on joinRhsArity]+ -- Match join arity O from mb_join_arity with manifest join arity M as+ -- returned by of occAnalLamTail. It's totally OK for them to mismatch;+ -- hence adjust the UDs from the RHS+ WithUsageDetails adj_rhs_uds final_rhs+ = adjustNonRecRhs mb_join_arity $ occAnalLamTail rhs_env rhs+ rhs_usage = adj_rhs_uds `andUDs` adj_unf_uds `andUDs` adj_rule_uds+ final_bndr = tagged_bndr `setIdSpecialisation` mkRuleInfo rules'+ `setIdUnfolding` unf2 --------- Unfolding ---------- -- See Note [Unfoldings and join points]+ -- See Note [Join points and unfoldings/rules] unf | isId bndr = idUnfolding bndr | otherwise = NoUnfolding- (WithUsageDetails unf_uds unf') = occAnalUnfolding rhs_env NonRecursive mb_join_arity unf+ WithTailUsageDetails unf_uds unf1 = occAnalUnfolding rhs_env unf+ unf2 = markNonRecUnfoldingOneShots mb_join_arity unf1+ adj_unf_uds = adjustTailArity mb_join_arity unf_uds --------- Rules --------- -- See Note [Rules are extra RHSs] and Note [Rule dependency info]- rules_w_uds = occAnalRules rhs_env mb_join_arity bndr+ -- and Note [Join points and unfoldings/rules]+ rules_w_uds = occAnalRules rhs_env bndr rules' = map fstOf3 rules_w_uds imp_rule_uds = impRulesScopeUsage (lookupImpRules imp_rule_edges bndr) -- imp_rule_uds: consider@@ -794,8 +897,9 @@ -- that g is (since the RULE might turn g into h), so -- we make g mention h. - rule_uds = foldr add_rule_uds imp_rule_uds rules_w_uds- add_rule_uds (_, l, r) uds = l `andUDs` r `andUDs` uds+ adj_rule_uds = foldr add_rule_uds imp_rule_uds rules_w_uds+ add_rule_uds (_, l, r) uds+ = l `andUDs` adjustTailArity mb_join_arity r `andUDs` uds ---------- occ = idOccInfo tagged_bndr@@ -820,7 +924,7 @@ occAnalRecBind !env lvl imp_rule_edges pairs body_usage = foldr (occAnalRec rhs_env lvl) (WithUsageDetails body_usage []) sccs where- sccs :: [SCC Details]+ sccs :: [SCC NodeDetails] sccs = {-# SCC "occAnalBind.scc" #-} stronglyConnCompFromEdgedVerticesUniq nodes @@ -832,48 +936,62 @@ bndr_set = mkVarSet bndrs rhs_env = env `addInScope` bndrs +adjustNonRecRhs :: Maybe JoinArity -> WithTailUsageDetails CoreExpr -> WithUsageDetails CoreExpr+-- ^ This function concentrates shared logic between occAnalNonRecBind and the+-- AcyclicSCC case of occAnalRec.+-- * It applies 'markNonRecJoinOneShots' to the RHS+-- * and returns the adjusted rhs UsageDetails combined with the body usage+adjustNonRecRhs mb_join_arity (WithTailUsageDetails rhs_tuds rhs)+ = WithUsageDetails rhs_uds' rhs'+ where+ --------- Marking (non-rec) join binders one-shot ---------+ !rhs' | Just ja <- mb_join_arity = markNonRecJoinOneShots ja rhs+ | otherwise = rhs+ --------- Adjusting right-hand side usage ---------+ rhs_uds' = adjustTailUsage mb_join_arity rhs' rhs_tuds +bindersOfSCC :: SCC NodeDetails -> [Var]+bindersOfSCC (AcyclicSCC nd) = [nd_bndr nd]+bindersOfSCC (CyclicSCC ds) = map nd_bndr ds+ ----------------------------- occAnalRec :: OccEnv -> TopLevelFlag- -> SCC Details+ -> SCC NodeDetails -> WithUsageDetails [CoreBind] -> WithUsageDetails [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 }))- (WithUsageDetails body_uds binds)- | not (bndr `usedIn` body_uds)- = WithUsageDetails body_uds binds -- See Note [Dead code]+-- Check for Note [Dead code]+-- NB: Only look at body_uds, ignoring uses in the SCC+occAnalRec !_ _ scc (WithUsageDetails body_uds binds)+ | not (any (`usedIn` body_uds) (bindersOfSCC scc))+ = WithUsageDetails body_uds binds - | otherwise -- It's mentioned in the body- = WithUsageDetails (body_uds' `andUDs` rhs_uds')- (NonRec tagged_bndr rhs : binds)+-- The NonRec case is just like a Let (NonRec ...) above+occAnalRec !_ lvl+ (AcyclicSCC (ND { nd_bndr = bndr, nd_rhs = wtuds }))+ (WithUsageDetails body_uds binds)+ = WithUsageDetails (body_uds' `andUDs` rhs_uds') (NonRec bndr' rhs' : binds) where- (body_uds', tagged_bndr) = tagNonRecBinder lvl body_uds bndr- rhs_uds' = adjustRhsUsage mb_join_arity rhs rhs_uds+ WithUsageDetails body_uds' tagged_bndr = tagNonRecBinder lvl body_uds bndr mb_join_arity = willBeJoinId_maybe tagged_bndr+ WithUsageDetails rhs_uds' rhs' = adjustNonRecRhs mb_join_arity wtuds+ !unf' = markNonRecUnfoldingOneShots mb_join_arity (idUnfolding tagged_bndr)+ !bndr' = tagged_bndr `setIdUnfolding` unf' - -- The Rec case is the interesting one- -- See Note [Recursive bindings: the grand plan]- -- See Note [Loop breaking]+-- The Rec case is the interesting one+-- See Note [Recursive bindings: the grand plan]+-- See Note [Loop breaking] occAnalRec env lvl (CyclicSCC details_s) (WithUsageDetails body_uds binds)- | not (any (`usedIn` body_uds) bndrs) -- NB: look at body_uds, not total_uds- = WithUsageDetails body_uds binds -- See Note [Dead code]-- | otherwise -- At this point we always build a single Rec = -- pprTrace "occAnalRec" (ppr loop_breaker_nodes) WithUsageDetails final_uds (Rec pairs : binds)- where- bndrs = map nd_bndr details_s all_simple = all nd_simple details_s ------------------------------ -- Make the nodes for the loop-breaker analysis -- See Note [Choosing loop breakers] for loop_breaker_nodes final_uds :: UsageDetails- loop_breaker_nodes :: [LetrecNode]+ loop_breaker_nodes :: [LoopBreakerNode] (WithUsageDetails final_uds loop_breaker_nodes) = mkLoopBreakerNodes env lvl body_uds details_s ------------------------------@@ -1102,7 +1220,7 @@ loopBreakNodes :: Int -> VarSet -- Binders whose dependencies may be "missing" -- See Note [Weak loop breakers]- -> [LetrecNode]+ -> [LoopBreakerNode] -> [Binding] -- Append these to the end -> [Binding] @@ -1121,7 +1239,7 @@ CyclicSCC nodes -> reOrderNodes depth weak_fvs nodes binds -----------------------------------reOrderNodes :: Int -> VarSet -> [LetrecNode] -> [Binding] -> [Binding]+reOrderNodes :: Int -> VarSet -> [LoopBreakerNode] -> [Binding] -> [Binding] -- Choose a loop breaker, mark it no-inline, -- and call loopBreakNodes on the rest reOrderNodes _ _ [] _ = panic "reOrderNodes"@@ -1133,7 +1251,7 @@ (map (nodeBinding mk_loop_breaker) chosen_nodes ++ binds) where (chosen_nodes, unchosen) = chooseLoopBreaker approximate_lb- (nd_score (node_payload node))+ (snd_score (node_payload node)) [node] [] nodes approximate_lb = depth >= 2@@ -1142,8 +1260,8 @@ -- After two iterations (d=0, d=1) give up -- and approximate, returning to d=0 -nodeBinding :: (Id -> Id) -> LetrecNode -> Binding-nodeBinding set_id_occ (node_payload -> ND { nd_bndr = bndr, nd_rhs = rhs})+nodeBinding :: (Id -> Id) -> LoopBreakerNode -> Binding+nodeBinding set_id_occ (node_payload -> SND { snd_bndr = bndr, snd_rhs = rhs}) = (set_id_occ bndr, rhs) mk_loop_breaker :: Id -> Id@@ -1163,13 +1281,13 @@ tail_info = tailCallInfo (idOccInfo bndr) -----------------------------------chooseLoopBreaker :: Bool -- True <=> Too many iterations,- -- so approximate- -> NodeScore -- Best score so far- -> [LetrecNode] -- Nodes with this score- -> [LetrecNode] -- Nodes with higher scores- -> [LetrecNode] -- Unprocessed nodes- -> ([LetrecNode], [LetrecNode])+chooseLoopBreaker :: Bool -- True <=> Too many iterations,+ -- so approximate+ -> NodeScore -- Best score so far+ -> [LoopBreakerNode] -- Nodes with this score+ -> [LoopBreakerNode] -- Nodes with higher scores+ -> [LoopBreakerNode] -- Unprocessed nodes+ -> ([LoopBreakerNode], [LoopBreakerNode]) -- This loop looks for the bind with the lowest score -- to pick as the loop breaker. The rest accumulate in chooseLoopBreaker _ _ loop_nodes acc []@@ -1189,7 +1307,7 @@ | otherwise -- Worse score so don't pick it = chooseLoopBreaker approx_lb loop_sc loop_nodes (node : acc) nodes where- sc = nd_score (node_payload node)+ sc = snd_score (node_payload node) {- Note [Complexity of loop breaking]@@ -1322,16 +1440,21 @@ ************************************************************************ -} -type LetrecNode = Node Unique Details -- Node comes from Digraph- -- The Unique key is gotten from the Id-data Details- = ND { nd_bndr :: Id -- Binder+-- | Digraph node as constructed by 'makeNode' and consumed by 'occAnalRec'.+-- The Unique key is gotten from the Id.+type LetrecNode = Node Unique NodeDetails - , nd_rhs :: CoreExpr -- RHS, already occ-analysed+-- | Node details as consumed by 'occAnalRec'.+data NodeDetails+ = ND { nd_bndr :: Id -- Binder - , nd_uds :: UsageDetails -- Usage from RHS, and RULES, and stable unfoldings- -- ignoring phase (ie assuming all are active)- -- See Note [Forming Rec groups]+ , nd_rhs :: !(WithTailUsageDetails CoreExpr)+ -- ^ RHS, already occ-analysed+ -- With TailUsageDetails from RHS, and RULES, and stable unfoldings,+ -- ignoring phase (ie assuming all are active).+ -- NB: Unadjusted TailUsageDetails, as if this Node becomes a+ -- non-recursive join point!+ -- See Note [TailUsageDetails when forming Rec groups] , nd_inl :: IdSet -- Free variables of the stable unfolding and the RHS -- but excluding any RULES@@ -1348,20 +1471,35 @@ , nd_active_rule_fvs :: IdSet -- Variables bound in this Rec group that are free -- in the RHS of an active rule for this bndr -- See Note [Rules and loop breakers]-- , nd_score :: NodeScore } -instance Outputable Details where+instance Outputable NodeDetails where ppr nd = text "ND" <> braces (sep [ text "bndr =" <+> ppr (nd_bndr nd)- , text "uds =" <+> ppr (nd_uds nd)+ , text "uds =" <+> ppr uds , text "inl =" <+> ppr (nd_inl nd) , text "simple =" <+> ppr (nd_simple nd) , text "active_rule_fvs =" <+> ppr (nd_active_rule_fvs nd)- , text "score =" <+> ppr (nd_score nd) ])+ where WithTailUsageDetails uds _ = nd_rhs nd +-- | Digraph with simplified and completely occurrence analysed+-- 'SimpleNodeDetails', retaining just the info we need for breaking loops.+type LoopBreakerNode = Node Unique SimpleNodeDetails++-- | Condensed variant of 'NodeDetails' needed during loop breaking.+data SimpleNodeDetails+ = SND { snd_bndr :: IdWithOccInfo -- OccInfo accurate+ , snd_rhs :: CoreExpr -- properly occur-analysed+ , snd_score :: NodeScore+ }++instance Outputable SimpleNodeDetails where+ ppr nd = text "SND" <> braces+ (sep [ text "bndr =" <+> ppr (snd_bndr nd)+ , text "score =" <+> ppr (snd_score nd)+ ])+ -- The NodeScore is compared lexicographically; -- e.g. lower rank wins regardless of size type NodeScore = ( Int -- Rank: lower => more likely to be picked as loop breaker@@ -1387,52 +1525,59 @@ -- explained in Note [Deterministic SCC] in GHC.Data.Graph.Directed. where details = ND { nd_bndr = bndr'- , nd_rhs = rhs'- , nd_uds = scope_uds+ , nd_rhs = WithTailUsageDetails scope_uds rhs' , nd_inl = inl_fvs , nd_simple = null rules_w_uds && null imp_rule_info , nd_weak_fvs = weak_fvs- , nd_active_rule_fvs = active_rule_fvs- , nd_score = pprPanic "makeNodeDetails" (ppr bndr) }+ , nd_active_rule_fvs = active_rule_fvs } bndr' = bndr `setIdUnfolding` unf' `setIdSpecialisation` mkRuleInfo rules' - inl_uds = rhs_uds `andUDs` unf_uds- scope_uds = inl_uds `andUDs` rule_uds+ -- NB: Both adj_unf_uds and adj_rule_uds have been adjusted to match the+ -- JoinArity rhs_ja of unadj_rhs_uds.+ unadj_inl_uds = unadj_rhs_uds `andUDs` adj_unf_uds+ unadj_scope_uds = unadj_inl_uds `andUDs` adj_rule_uds+ scope_uds = TUD rhs_ja unadj_scope_uds -- Note [Rules are extra RHSs] -- Note [Rule dependency info]- scope_fvs = udFreeVars bndr_set scope_uds+ scope_fvs = udFreeVars bndr_set unadj_scope_uds -- scope_fvs: all occurrences from this binder: RHS, unfolding, -- and RULES, both LHS and RHS thereof, active or inactive - inl_fvs = udFreeVars bndr_set inl_uds+ inl_fvs = udFreeVars bndr_set unadj_inl_uds -- inl_fvs: vars that would become free if the function was inlined. -- We conservatively approximate that by thefree vars from the RHS -- and the unfolding together. -- See Note [inl_fvs] - mb_join_arity = isJoinId_maybe bndr- -- Get join point info from the *current* decision- -- We don't know what the new decision will be!- -- Using the old decision at least allows us to- -- preserve existing join point, even RULEs are added- -- See Note [Join points and unfoldings/rules] --------- Right hand side --------- -- Constructing the edges for the main Rec computation -- See Note [Forming Rec groups]- -- Do not use occAnalRhs because we don't yet know the final- -- answer for mb_join_arity; instead, do the occAnalLam call from- -- occAnalRhs, and postpone adjustRhsUsage until occAnalRec- rhs_env = rhsCtxt env- (WithUsageDetails rhs_uds rhs') = occAnalLam rhs_env rhs+ -- and Note [TailUsageDetails when forming Rec groups]+ -- Compared to occAnalNonRecBind, we can't yet adjust the RHS because+ -- (a) we don't yet know the final joinpointhood. It might not become a+ -- join point after all!+ -- (b) we don't even know whether it stays a recursive RHS after the SCC+ -- analysis we are about to seed! So we can't markAllInsideLam in+ -- advance, because if it ends up as a non-recursive join point we'll+ -- consider it as one-shot and don't need to markAllInsideLam.+ -- Instead, do the occAnalLamTail call here and postpone adjustTailUsage+ -- until occAnalRec. In effect, we pretend that the RHS becomes a+ -- non-recursive join point and fix up later with adjustTailUsage.+ rhs_env = rhsCtxt env+ WithTailUsageDetails (TUD rhs_ja unadj_rhs_uds) rhs' = occAnalLamTail rhs_env rhs+ -- corresponding call to adjustTailUsage in occAnalRec and tagRecBinders --------- Unfolding ---------- -- See Note [Unfoldings and join points]+ -- See Note [Join points and unfoldings/rules] unf = realIdUnfolding bndr -- realIdUnfolding: Ignore loop-breaker-ness -- here because that is what we are setting!- (WithUsageDetails unf_uds unf') = occAnalUnfolding rhs_env Recursive mb_join_arity unf+ WithTailUsageDetails unf_tuds unf' = occAnalUnfolding rhs_env unf+ adj_unf_uds = adjustTailArity (Just rhs_ja) unf_tuds+ -- `rhs_ja` is `joinRhsArity rhs` and is the prediction for source M+ -- of Note [Join arity prediction based on joinRhsArity] --------- IMP-RULES -------- is_active = occ_rule_act env :: Activation -> Bool@@ -1441,11 +1586,15 @@ imp_rule_fvs = impRulesActiveFvs is_active bndr_set imp_rule_info --------- All rules --------+ -- See Note [Join points and unfoldings/rules]+ -- `rhs_ja` is `joinRhsArity rhs'` and is the prediction for source M+ -- of Note [Join arity prediction based on joinRhsArity] rules_w_uds :: [(CoreRule, UsageDetails, UsageDetails)]- rules_w_uds = occAnalRules rhs_env mb_join_arity bndr+ rules_w_uds = [ (r,l,adjustTailArity (Just rhs_ja) rhs_tuds)+ | (r,l,rhs_tuds) <- occAnalRules rhs_env bndr ] rules' = map fstOf3 rules_w_uds - rule_uds = foldr add_rule_uds imp_rule_uds rules_w_uds+ adj_rule_uds = foldr add_rule_uds imp_rule_uds rules_w_uds add_rule_uds (_, l, r) uds = l `andUDs` r `andUDs` uds -------- active_rule_fvs ------------@@ -1463,8 +1612,8 @@ mkLoopBreakerNodes :: OccEnv -> TopLevelFlag -> UsageDetails -- for BODY of let- -> [Details]- -> WithUsageDetails [LetrecNode] -- adjusted+ -> [NodeDetails]+ -> WithUsageDetails [LoopBreakerNode] -- with OccInfo up-to-date -- See Note [Choosing loop breakers] -- This function primarily creates the Nodes for the -- loop-breaker SCC analysis. More specifically:@@ -1477,10 +1626,10 @@ mkLoopBreakerNodes !env lvl body_uds details_s = WithUsageDetails final_uds (zipWithEqual "mkLoopBreakerNodes" mk_lb_node details_s bndrs') where- (final_uds, bndrs') = tagRecBinders lvl body_uds details_s+ WithUsageDetails final_uds bndrs' = tagRecBinders lvl body_uds details_s mk_lb_node nd@(ND { nd_bndr = old_bndr, nd_inl = inl_fvs }) new_bndr- = DigraphNode { node_payload = new_nd+ = DigraphNode { node_payload = simple_nd , node_key = varUnique old_bndr , node_dependencies = nonDetKeysUniqSet lb_deps } -- It's OK to use nonDetKeysUniqSet here as@@ -1488,7 +1637,8 @@ -- in nondeterministic order as explained in -- Note [Deterministic SCC] in GHC.Data.Graph.Directed. where- new_nd = nd { nd_bndr = new_bndr, nd_score = score }+ WithTailUsageDetails _ rhs = nd_rhs nd+ simple_nd = SND { snd_bndr = new_bndr, snd_rhs = rhs, snd_score = score } score = nodeScore env new_bndr lb_deps nd lb_deps = extendFvs_ rule_fv_env inl_fvs -- See Note [Loop breaker dependencies]@@ -1524,10 +1674,10 @@ nodeScore :: OccEnv -> Id -- Binder with new occ-info -> VarSet -- Loop-breaker dependencies- -> Details+ -> NodeDetails -> NodeScore nodeScore !env new_bndr lb_deps- (ND { nd_bndr = old_bndr, nd_rhs = bind_rhs })+ (ND { nd_bndr = old_bndr, nd_rhs = WithTailUsageDetails _ bind_rhs }) | not (isId old_bndr) -- A type or coercion variable is never a loop breaker = (100, 0, False)@@ -1748,7 +1898,7 @@ * Occurrence analyser: we just mark each binder in the lambda-group (here: x,y,z) with its occurrence info in the *body* of the- lambda-group. See occAnalLam.+ lambda-group. See occAnalLamTail. * Simplifier. The simplifier is careful when partially applying lambda-groups. See the call to zapLambdaBndrs in@@ -1804,25 +1954,31 @@ zap_bndr b | isTyVar b = b | otherwise = zapLamIdInfo b -occAnalLam :: OccEnv -> CoreExpr -> (WithUsageDetails CoreExpr)--- See Note [Occurrence analysis for lambda binders]+occAnalLamTail :: OccEnv -> CoreExpr -> WithTailUsageDetails CoreExpr+-- ^ See Note [Occurrence analysis for lambda binders]. -- It does the following: -- * Sets one-shot info on the lambda binder from the OccEnv, and -- removes that one-shot info from the OccEnv -- * Sets the OccEnv to OccVanilla when going under a value lambda -- * Tags each lambda with its occurrence information -- * Walks through casts+-- * Package up the analysed lambda with its manifest join arity+-- -- This function does /not/ do -- markAllInsideLam or -- markAllNonTail--- The caller does that, either in occAnal (Lam {}), or in adjustRhsUsage+-- The caller does that, via adjustTailUsage (mostly calls go through+-- adjustNonRecRhs). Every call to occAnalLamTail must ultimately call+-- adjustTailUsage to discharge the assumed join arity.+--+-- In effect, the analysis result is for a non-recursive join point with+-- manifest arity and adjustTailUsage does the fixup. -- See Note [Adjusting right-hand sides]--occAnalLam env (Lam bndr expr)+occAnalLamTail env (Lam bndr expr) | isTyVar bndr- = let env1 = addOneInScope env bndr- WithUsageDetails usage expr' = occAnalLam env1 expr- in WithUsageDetails usage (Lam bndr expr')+ , let env1 = addOneInScope env bndr+ , WithTailUsageDetails (TUD ja usage) expr' <- occAnalLamTail env1 expr+ = WithTailUsageDetails (TUD (ja+1) usage) (Lam bndr expr') -- Important: Keep the 'env' unchanged so that with a RHS like -- \(@ x) -> K @x (f @x) -- we'll see that (K @x (f @x)) is in a OccRhs, and hence refrain@@ -1840,14 +1996,14 @@ env1 = env { occ_encl = OccVanilla, occ_one_shots = env_one_shots' } env2 = addOneInScope env1 bndr- (WithUsageDetails usage expr') = occAnalLam env2 expr+ WithTailUsageDetails (TUD ja usage) expr' = occAnalLamTail env2 expr (usage', bndr2) = tagLamBinder usage bndr1- in WithUsageDetails usage' (Lam bndr2 expr')+ in WithTailUsageDetails (TUD (ja+1) usage') (Lam bndr2 expr') -- For casts, keep going in the same lambda-group -- See Note [Occurrence analysis for lambda binders]-occAnalLam env (Cast expr co)- = let (WithUsageDetails usage expr') = occAnalLam env expr+occAnalLamTail env (Cast expr co)+ = let WithTailUsageDetails (TUD ja usage) expr' = occAnalLamTail env expr -- usage1: see Note [Gather occurrences of coercion variables] usage1 = addManyOccs usage (coVarsOfCo co) @@ -1857,15 +2013,16 @@ _ -> usage1 -- usage3: you might think this was not necessary, because of- -- the markAllNonTail in adjustRhsUsage; but not so! For a- -- join point, adjustRhsUsage doesn't do this; yet if there is+ -- the markAllNonTail in adjustTailUsage; but not so! For a+ -- join point, adjustTailUsage doesn't do this; yet if there is -- a cast, we must! Also: why markAllNonTail? See -- GHC.Core.Lint: Note Note [Join points and casts] usage3 = markAllNonTail usage2 - in WithUsageDetails usage3 (Cast expr' co)+ in WithTailUsageDetails (TUD ja usage3) (Cast expr' co) -occAnalLam env expr = occAnal env expr+occAnalLamTail env expr = case occAnal env expr of+ WithUsageDetails usage expr' -> WithTailUsageDetails (TUD 0 usage) expr' {- Note [Occ-anal and cast worker/wrapper] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1885,8 +2042,8 @@ unfolding, which would obviate this Note; but that seems a bit of a heavyweight solution.) -We only need to this in occAnalLam, not occAnal, because the top leve-of a right hand side is handled by occAnalLam.+We only need to this in occAnalLamTail, not occAnal, because the top leve+of a right hand side is handled by occAnalLamTail. -} @@ -1896,57 +2053,23 @@ * * ********************************************************************* -} -occAnalRhs :: OccEnv -> RecFlag -> Maybe JoinArity- -> CoreExpr -- RHS- -> WithUsageDetails CoreExpr-occAnalRhs !env is_rec mb_join_arity rhs- = let (WithUsageDetails usage rhs1) = occAnalLam env rhs- -- We call occAnalLam here, not occAnalExpr, so that it doesn't- -- do the markAllInsideLam and markNonTailCall stuff before- -- we've had a chance to help with join points; that comes next- rhs2 = markJoinOneShots is_rec mb_join_arity rhs1- rhs_usage = adjustRhsUsage mb_join_arity rhs2 usage- in WithUsageDetails rhs_usage rhs2----markJoinOneShots :: RecFlag -> Maybe JoinArity -> CoreExpr -> CoreExpr--- For a /non-recursive/ join point we can mark all--- its join-lambda as one-shot; and it's a good idea to do so-markJoinOneShots NonRecursive (Just join_arity) rhs- = go join_arity rhs- where- go 0 rhs = rhs- go n (Lam b rhs) = Lam (if isId b then setOneShotLambda b else b)- (go (n-1) rhs)- go _ rhs = rhs -- Not enough lambdas. 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.)-markJoinOneShots _ _ rhs- = rhs- occAnalUnfolding :: OccEnv- -> RecFlag- -> Maybe JoinArity -- See Note [Join points and unfoldings/rules] -> Unfolding- -> WithUsageDetails Unfolding+ -> WithTailUsageDetails Unfolding -- Occurrence-analyse a stable unfolding;--- discard a non-stable one altogether.-occAnalUnfolding !env is_rec mb_join_arity unf+-- discard a non-stable one altogether and return empty usage details.+occAnalUnfolding !env unf = case unf of unf@(CoreUnfolding { uf_tmpl = rhs, uf_src = src }) | isStableSource src -> let- (WithUsageDetails usage rhs') = occAnalRhs env is_rec mb_join_arity rhs+ WithTailUsageDetails (TUD rhs_ja usage) rhs' = occAnalLamTail env rhs unf' | noBinderSwaps env = unf -- Note [Unfoldings and rules] | otherwise = unf { uf_tmpl = rhs' }- in WithUsageDetails (markAllMany usage) unf'+ in WithTailUsageDetails (TUD rhs_ja (markAllMany usage)) unf' -- markAllMany: see Note [Occurrences in stable unfoldings]- | otherwise -> WithUsageDetails emptyDetails unf+ | otherwise -> WithTailUsageDetails (TUD 0 emptyDetails) unf -- For non-Stable unfoldings we leave them undisturbed, but -- don't count their usage because the simplifier will discard them. -- We leave them undisturbed because nodeScore uses their size info@@ -1955,29 +2078,26 @@ -- scope remain in scope; there is no cloning etc. unf@(DFunUnfolding { df_bndrs = bndrs, df_args = args })- -> WithUsageDetails final_usage (unf { df_args = args' })+ -> WithTailUsageDetails (TUD 0 final_usage) (unf { df_args = args' }) where env' = env `addInScope` bndrs (WithUsageDetails usage args') = occAnalList env' args- final_usage = markAllManyNonTail (delDetailsList usage bndrs)- `addLamCoVarOccs` bndrs- `delDetailsList` bndrs+ final_usage = usage `addLamCoVarOccs` bndrs `delDetailsList` bndrs -- delDetailsList; no need to use tagLamBinders because we -- never inline DFuns so the occ-info on binders doesn't matter - unf -> WithUsageDetails emptyDetails unf+ unf -> WithTailUsageDetails (TUD 0 emptyDetails) unf occAnalRules :: OccEnv- -> Maybe JoinArity -- See Note [Join points and unfoldings/rules] -> Id -- Get rules from here -> [(CoreRule, -- Each (non-built-in) rule UsageDetails, -- Usage details for LHS- UsageDetails)] -- Usage details for RHS-occAnalRules !env mb_join_arity bndr+ TailUsageDetails)] -- Usage details for RHS+occAnalRules !env bndr = map occ_anal_rule (idCoreRules bndr) where occ_anal_rule rule@(Rule { ru_bndrs = bndrs, ru_args = args, ru_rhs = rhs })- = (rule', lhs_uds', rhs_uds')+ = (rule', lhs_uds', TUD rhs_ja rhs_uds') where env' = env `addInScope` bndrs rule' | noBinderSwaps env = rule -- Note [Unfoldings and rules]@@ -1990,14 +2110,11 @@ (WithUsageDetails rhs_uds rhs') = occAnal env' rhs -- Note [Rules are extra RHSs] -- Note [Rule dependency info]- rhs_uds' = markAllNonTailIf (not exact_join) $- markAllMany $+ rhs_uds' = markAllMany $ rhs_uds `delDetailsList` bndrs-- exact_join = exactJoin mb_join_arity args- -- See Note [Join points and unfoldings/rules]+ rhs_ja = length args -- See Note [Join points and unfoldings/rules] - occ_anal_rule other_rule = (other_rule, emptyDetails, emptyDetails)+ occ_anal_rule other_rule = (other_rule, emptyDetails, TUD 0 emptyDetails) {- Note [Join point RHSs] ~~~~~~~~~~~~~~~~~~~~~~~~~@@ -2032,6 +2149,8 @@ call sites, now there's be multiple calls to f. Bottom line: treat all occurrences in a stable unfolding as "Many".+We still leave tail call information intact, though, as to not spoil+potential join points. Note [Unfoldings and rules] ~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -2220,10 +2339,7 @@ = occAnalApp env (collectArgsTicks tickishFloatable app) occAnal env expr@(Lam {})- = let (WithUsageDetails usage expr') = occAnalLam env expr- final_usage = markAllInsideLamIf (not (isOneShotFun expr')) $- markAllNonTail usage- in WithUsageDetails final_usage expr'+ = adjustNonRecRhs Nothing $ occAnalLamTail env expr -- mb_join_arity == Nothing <=> markAllManyNonTail occAnal env (Case scrut bndr ty alts) = let@@ -2298,7 +2414,7 @@ -- This caused #18296 | fun `hasKey` runRWKey , [t1, t2, arg] <- args- , let (WithUsageDetails usage arg') = occAnalRhs env NonRecursive (Just 1) arg+ , WithUsageDetails usage arg' <- adjustNonRecRhs (Just 1) $ occAnalLamTail env arg = WithUsageDetails usage (mkTicks ticks $ mkApps (Var fun) [t1, t2, arg']) occAnalApp env (Var fun_id, args, ticks)@@ -2883,7 +2999,6 @@ case lookupBndrSwap env bndr1 of (fun, fun_id) -> (mkCastMCo fun mco, fun_id) } - {- Historical note [Proxy let-bindings] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We used to do the binder-swap transformation by introducing@@ -3009,6 +3124,19 @@ instance Outputable UsageDetails where ppr ud = ppr (ud_env (flattenUsageDetails ud)) +-- | Captures the result of applying 'occAnalLamTail' to a function `\xyz.body`.+-- The TailUsageDetails records+-- * the number of lambdas (including type lambdas: a JoinArity)+-- * UsageDetails for the `body`, unadjusted by `adjustTailUsage`.+-- If the binding turns out to be a join point with the indicated join+-- arity, this unadjusted usage details is just what we need; otherwise we+-- need to discard tail calls. That's what `adjustTailUsage` does.+data TailUsageDetails = TUD !JoinArity !UsageDetails++instance Outputable TailUsageDetails where+ ppr (TUD ja uds) = lambda <> ppr ja <> ppr uds++ ------------------- -- UsageDetails API @@ -3150,25 +3278,50 @@ ------------------- -- See Note [Adjusting right-hand sides]-adjustRhsUsage :: Maybe JoinArity- -> CoreExpr -- Rhs, AFTER occ anal- -> UsageDetails -- From body of lambda+adjustTailUsage :: Maybe JoinArity+ -> CoreExpr -- Rhs, AFTER occAnalLamTail+ -> TailUsageDetails -- From body of lambda -> UsageDetails-adjustRhsUsage mb_join_arity rhs usage+adjustTailUsage mb_join_arity rhs (TUD rhs_ja usage) = -- c.f. occAnal (Lam {}) markAllInsideLamIf (not one_shot) $ markAllNonTailIf (not exact_join) $ usage where one_shot = isOneShotFun rhs- exact_join = exactJoin mb_join_arity bndrs- (bndrs,_) = collectBinders rhs+ exact_join = mb_join_arity == Just rhs_ja -exactJoin :: Maybe JoinArity -> [a] -> Bool-exactJoin Nothing _ = False-exactJoin (Just join_arity) args = args `lengthIs` join_arity- -- Remember join_arity includes type binders+adjustTailArity :: Maybe JoinArity -> TailUsageDetails -> UsageDetails+adjustTailArity mb_rhs_ja (TUD ud_ja usage) =+ markAllNonTailIf (mb_rhs_ja /= Just ud_ja) usage +markNonRecJoinOneShots :: JoinArity -> CoreExpr -> CoreExpr+-- For a /non-recursive/ join point we can mark all+-- its join-lambda as one-shot; and it's a good idea to do so+markNonRecJoinOneShots join_arity rhs+ = go join_arity rhs+ where+ go 0 rhs = rhs+ go n (Lam b rhs) = Lam (if isId b then setOneShotLambda b else b)+ (go (n-1) rhs)+ go _ rhs = rhs -- Not enough lambdas. 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.)++markNonRecUnfoldingOneShots :: Maybe JoinArity -> Unfolding -> Unfolding+-- ^ Apply 'markNonRecJoinOneShots' to a stable unfolding+markNonRecUnfoldingOneShots mb_join_arity unf+ | Just ja <- mb_join_arity+ , CoreUnfolding{uf_src=src,uf_tmpl=tmpl} <- unf+ , isStableSource src+ , let !tmpl' = markNonRecJoinOneShots ja tmpl+ = unf{uf_tmpl=tmpl'}+ | otherwise+ = unf+ type IdWithOccInfo = Id tagLamBinders :: UsageDetails -- Of scope@@ -3203,8 +3356,8 @@ tagNonRecBinder :: TopLevelFlag -- At top level? -> UsageDetails -- Of scope -> CoreBndr -- Binder- -> (UsageDetails, -- Details with binder removed- IdWithOccInfo) -- Tagged binder+ -> WithUsageDetails -- Details with binder removed+ IdWithOccInfo -- Tagged binder tagNonRecBinder lvl usage binder = let@@ -3216,37 +3369,34 @@ binder' = setBinderOcc occ' binder usage' = usage `delDetails` binder in- usage' `seq` (usage', binder')+ WithUsageDetails usage' binder' tagRecBinders :: TopLevelFlag -- At top level? -> UsageDetails -- Of body of let ONLY- -> [Details]- -> (UsageDetails, -- Adjusted details for whole scope,+ -> [NodeDetails]+ -> WithUsageDetails -- Adjusted details for whole scope, -- with binders removed- [IdWithOccInfo]) -- Tagged binders+ [IdWithOccInfo] -- Tagged binders -- Substantially more complicated than non-recursive case. Need to adjust RHS -- details *before* tagging binders (because the tags depend on the RHSes). tagRecBinders lvl body_uds details_s = let bndrs = map nd_bndr details_s- rhs_udss = map nd_uds details_s - -- 1. Determine join-point-hood of whole group, as determined by- -- the *unadjusted* usage details- unadj_uds = foldr andUDs body_uds rhs_udss-- -- This is only used in `mb_join_arity`, to adjust each `Details` in `details_s`, thus,- -- when `bndrs` is non-empty. So, we only write `maybe False` as `decideJoinPointHood`- -- takes a `NonEmpty CoreBndr`; the default value `False` won't affect program behavior.- will_be_joins = maybe False (decideJoinPointHood lvl unadj_uds) (nonEmpty bndrs)+ -- 1. See Note [Join arity prediction based on joinRhsArity]+ -- Determine possible join-point-hood of whole group, by testing for+ -- manifest join arity M.+ -- This (re-)asserts that makeNode had made tuds for that same arity M!+ unadj_uds = foldr (andUDs . test_manifest_arity) body_uds details_s+ test_manifest_arity ND{nd_rhs=WithTailUsageDetails tuds rhs}+ = adjustTailArity (Just (joinRhsArity rhs)) tuds - -- 2. Adjust usage details of each RHS, taking into account the- -- join-point-hood decision- rhs_udss' = [ adjustRhsUsage (mb_join_arity bndr) rhs rhs_uds- | ND { nd_bndr = bndr, nd_uds = rhs_uds- , nd_rhs = rhs } <- details_s ]+ bndr_ne = expectNonEmpty "List of binders is never empty" bndrs+ will_be_joins = decideJoinPointHood lvl unadj_uds bndr_ne mb_join_arity :: Id -> Maybe JoinArity+ -- mb_join_arity: See Note [Join arity prediction based on joinRhsArity]+ -- This is the source O mb_join_arity bndr -- Can't use willBeJoinId_maybe here because we haven't tagged -- the binder yet (the tag depends on these adjustments!)@@ -3258,6 +3408,12 @@ = assert (not will_be_joins) -- Should be AlwaysTailCalled if Nothing -- we are making join points! + -- 2. Adjust usage details of each RHS, taking into account the+ -- join-point-hood decision+ rhs_udss' = [ adjustTailUsage (mb_join_arity bndr) rhs rhs_tuds -- matching occAnalLamTail in makeNode+ | ND { nd_bndr = bndr, nd_rhs = WithTailUsageDetails rhs_tuds rhs }+ <- details_s ]+ -- 3. Compute final usage details from adjusted RHS details adj_uds = foldr andUDs body_uds rhs_udss' @@ -3268,7 +3424,7 @@ -- 5. Drop the binders from the adjusted details and return usage' = adj_uds `delDetailsList` bndrs in- (usage', bndrs')+ WithUsageDetails usage' bndrs' setBinderOcc :: OccInfo -> CoreBndr -> CoreBndr setBinderOcc occ_info bndr@@ -3282,12 +3438,13 @@ | otherwise = setIdOccInfo bndr occ_info --- | Decide whether some bindings should be made into join points or not.+-- | Decide whether some bindings should be made into join points or not, based+-- on its occurrences. This is -- Returns `False` if they can't be join points. Note that it's an -- all-or-nothing decision, as if multiple binders are given, they're -- assumed to be mutually recursive. ----- It must, however, be a final decision. If we say "True" for 'f',+-- It must, however, be a final decision. If we say `True` for 'f', -- and then subsequently decide /not/ make 'f' into a join point, then -- the decision about another binding 'g' might be invalidated if (say) -- 'f' tail-calls 'g'.
GHC/Core/Opt/Pipeline.hs view
@@ -10,7 +10,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Plugins ( withPlugins, installCoreToDos ) import GHC.Driver.Env import GHC.Driver.Config.Core.Lint ( endPass )@@ -77,9 +77,9 @@ , mg_loc = loc , mg_rdr_env = rdr_env }) = do { let builtin_passes = getCoreToDo dflags hpt_rule_base extra_vars- uniq_tag = 's'+ uniq_mask = 's' - ; (guts2, stats) <- runCoreM hsc_env hpt_rule_base uniq_tag mod+ ; (guts2, stats) <- runCoreM hsc_env hpt_rule_base uniq_mask mod name_ppr_ctx loc $ do { hsc_env' <- getHscEnv ; all_passes <- withPlugins (hsc_plugins hsc_env')
GHC/Core/Opt/SetLevels.hs view
@@ -1752,13 +1752,12 @@ cloneCaseBndrs :: LevelEnv -> Level -> [Var] -> LvlM (LevelEnv, [Var]) cloneCaseBndrs env@(LE { le_subst = subst, le_lvl_env = lvl_env, le_env = id_env }) new_lvl vs- = do { us <- getUniqueSupplyM- ; let (subst', vs') = cloneBndrs subst us vs+ = do { (subst', vs') <- cloneBndrs subst vs -- N.B. We are not moving the body of the case, merely its case -- binders. Consequently we should *not* set le_ctxt_lvl and -- le_join_ceil. See Note [Setting levels when floating -- single-alternative cases].- env' = env { le_lvl_env = addLvls new_lvl lvl_env vs'+ ; let env' = env { le_lvl_env = addLvls new_lvl lvl_env vs' , le_subst = subst' , le_env = foldl' add_id id_env (vs `zip` vs') } @@ -1773,13 +1772,13 @@ cloneLetVars is_rec env@(LE { le_subst = subst, le_lvl_env = lvl_env, le_env = id_env }) dest_lvl vs- = do { us <- getUniqueSupplyM- ; let vs1 = map zap vs+ = do { let vs1 = map zap vs -- See Note [Zapping the demand info]- (subst', vs2) = case is_rec of- NonRecursive -> cloneBndrs subst us vs1- Recursive -> cloneRecIdBndrs subst us vs1- prs = vs `zip` vs2+ ; (subst', vs2) <- case is_rec of+ NonRecursive -> cloneBndrs subst vs1+ Recursive -> cloneRecIdBndrs subst vs1++ ; let prs = vs `zip` vs2 env' = env { le_lvl_env = addLvls dest_lvl lvl_env vs2 , le_subst = subst' , le_env = foldl' add_id id_env prs }
+ GHC/Core/Opt/Simplify/Inline.hs view
@@ -0,0 +1,555 @@+{-+(c) The University of Glasgow 2006+(c) The AQUA Project, Glasgow University, 1994-1998++This module contains inlining logic used by the simplifier.+-}+++{-# LANGUAGE BangPatterns #-}++module GHC.Core.Opt.Simplify.Inline (+ -- * Cheap and cheerful inlining checks.+ couldBeSmallEnoughToInline,+ smallEnoughToInline,++ -- * The smart inlining decisions are made by callSiteInline+ callSiteInline, CallCtxt(..),+ ) where++import GHC.Prelude++import GHC.Driver.Flags++import GHC.Core+import GHC.Core.Unfold+import GHC.Types.Id+import GHC.Types.Basic ( Arity, RecFlag(..) )+import GHC.Utils.Logger+import GHC.Utils.Misc+import GHC.Utils.Outputable+import GHC.Types.Name++import Data.List (isPrefixOf)++{-+************************************************************************+* *+\subsection[considerUnfolding]{Given all the info, do (not) do the unfolding}+* *+************************************************************************++We use 'couldBeSmallEnoughToInline' to avoid exporting inlinings that+we ``couldn't possibly use'' on the other side. Can be overridden w/+flaggery. Just the same as smallEnoughToInline, except that it has no+actual arguments.+-}++couldBeSmallEnoughToInline :: UnfoldingOpts -> Int -> CoreExpr -> Bool+couldBeSmallEnoughToInline opts threshold rhs+ = case sizeExpr opts threshold [] body of+ TooBig -> False+ _ -> True+ where+ (_, body) = collectBinders rhs++----------------+smallEnoughToInline :: UnfoldingOpts -> Unfolding -> Bool+smallEnoughToInline opts (CoreUnfolding {uf_guidance = guidance})+ = case guidance of+ UnfIfGoodArgs {ug_size = size} -> size <= unfoldingUseThreshold opts+ UnfWhen {} -> True+ UnfNever -> False+smallEnoughToInline _ _+ = False++{-+************************************************************************+* *+\subsection{callSiteInline}+* *+************************************************************************++This is the key function. It decides whether to inline a variable at a call site++callSiteInline is used at call sites, so it is a bit more generous.+It's a very important function that embodies lots of heuristics.+A non-WHNF can be inlined if it doesn't occur inside a lambda,+and occurs exactly once or+ occurs once in each branch of a case and is small++If the thing is in WHNF, there's no danger of duplicating work,+so we can inline if it occurs once, or is small++NOTE: we don't want to inline top-level functions that always diverge.+It just makes the code bigger. Tt turns out that the convenient way to prevent+them inlining is to give them a NOINLINE pragma, which we do in+StrictAnal.addStrictnessInfoToTopId+-}++callSiteInline :: Logger+ -> UnfoldingOpts+ -> Int -- Case depth+ -> Id -- The Id+ -> Bool -- True <=> unfolding is active+ -> Bool -- True if there are no arguments at all (incl type args)+ -> [ArgSummary] -- One for each value arg; True if it is interesting+ -> CallCtxt -- True <=> continuation is interesting+ -> Maybe CoreExpr -- Unfolding, if any+callSiteInline logger opts !case_depth id active_unfolding lone_variable arg_infos cont_info+ = case idUnfolding id of+ -- idUnfolding checks for loop-breakers, returning NoUnfolding+ -- Things with an INLINE pragma may have an unfolding *and*+ -- be a loop breaker (maybe the knot is not yet untied)+ CoreUnfolding { uf_tmpl = unf_template+ , uf_cache = unf_cache+ , uf_guidance = guidance }+ | active_unfolding -> tryUnfolding logger opts case_depth id lone_variable+ arg_infos cont_info unf_template+ unf_cache guidance+ | otherwise -> traceInline logger opts id "Inactive unfolding:" (ppr id) Nothing+ NoUnfolding -> Nothing+ BootUnfolding -> Nothing+ OtherCon {} -> Nothing+ DFunUnfolding {} -> Nothing -- Never unfold a DFun++-- | Report the inlining of an identifier's RHS to the user, if requested.+traceInline :: Logger -> UnfoldingOpts -> Id -> String -> SDoc -> a -> a+traceInline logger opts inline_id str doc result+ -- We take care to ensure that doc is used in only one branch, ensuring that+ -- the simplifier can push its allocation into the branch. See Note [INLINE+ -- conditional tracing utilities].+ | enable = logTraceMsg logger str doc result+ | otherwise = result+ where+ enable+ | logHasDumpFlag logger Opt_D_dump_verbose_inlinings+ = True+ | Just prefix <- unfoldingReportPrefix opts+ = prefix `isPrefixOf` occNameString (getOccName inline_id)+ | otherwise+ = False+{-# INLINE traceInline #-} -- see Note [INLINE conditional tracing utilities]++{- Note [Avoid inlining into deeply nested cases]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++Consider a function f like this:++ f arg1 arg2 =+ case ...+ ... -> g arg1+ ... -> g arg2++This function is small. So should be safe to inline.+However sometimes this doesn't quite work out like that.+Consider this code:++f1 arg1 arg2 ... = ...+ case _foo of+ alt1 -> ... f2 arg1 ...+ alt2 -> ... f2 arg2 ...++f2 arg1 arg2 ... = ...+ case _foo of+ alt1 -> ... f3 arg1 ...+ alt2 -> ... f3 arg2 ...++f3 arg1 arg2 ... = ...++... repeats up to n times. And then f1 is+applied to some arguments:++foo = ... f1 <interestingArgs> ...++Initially f2..fn are not interesting to inline so we don't.+However we see that f1 is applied to interesting args.+So it's an obvious choice to inline those:++foo =+ ...+ case _foo of+ alt1 -> ... f2 <interestingArg> ...+ alt2 -> ... f2 <interestingArg> ...++As a result we go and inline f2 both mentions of f2 in turn are now applied to interesting+arguments and f2 is small:++foo =+ ...+ case _foo of+ alt1 -> ... case _foo of+ alt1 -> ... f3 <interestingArg> ...+ alt2 -> ... f3 <interestingArg> ...++ alt2 -> ... case _foo of+ alt1 -> ... f3 <interestingArg> ...+ alt2 -> ... f3 <interestingArg> ...++The same thing happens for each binding up to f_n, duplicating the amount of inlining+done in each step. Until at some point we are either done or run out of simplifier+ticks/RAM. This pattern happened #18730.++To combat this we introduce one more heuristic when weighing inlining decision.+We keep track of a "case-depth". Which increases each time we look inside a case+expression with more than one alternative.++We then apply a penalty to inlinings based on the case-depth at which they would+be inlined. Bounding the number of inlinings in such a scenario.++The heuristic can be tuned in two ways:++* We can ignore the first n levels of case nestings for inlining decisions using+ -funfolding-case-threshold.+* The penalty grows linear with the depth. It's computed as size*(depth-threshold)/scaling.+ Scaling can be set with -funfolding-case-scaling.++Some guidance on setting these defaults:++* A low treshold (<= 2) is needed to prevent exponential cases from spiraling out of+ control. We picked 2 for no particular reason.+* Scaling the penalty by any more than 30 means the reproducer from+ T18730 won't compile even with reasonably small values of n. Instead+ it will run out of runs/ticks. This means to positively affect the reproducer+ a scaling <= 30 is required.+* A scaling of >= 15 still causes a few very large regressions on some nofib benchmarks.+ (+80% for gc/fulsom, +90% for real/ben-raytrace, +20% for spectral/fibheaps)+* A scaling of >= 25 showed no regressions on nofib. However it showed a number of+ (small) regression for compiler perf benchmarks.++The end result is that we are settling for a scaling of 30, with a threshold of 2.+This gives us minimal compiler perf regressions. No nofib runtime regressions and+will still avoid this pattern sometimes. This is a "safe" default, where we err on+the side of compiler blowup instead of risking runtime regressions.++For cases where the default falls short the flag can be changed to allow more/less inlining as+needed on a per-module basis.++-}++tryUnfolding :: Logger -> UnfoldingOpts -> Int -> Id -> Bool -> [ArgSummary] -> CallCtxt+ -> CoreExpr -> UnfoldingCache -> UnfoldingGuidance+ -> Maybe CoreExpr+tryUnfolding logger opts !case_depth id lone_variable arg_infos+ cont_info unf_template unf_cache guidance+ = case guidance of+ UnfNever -> traceInline logger opts 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 || unfoldingVeryAggressive opts)+ -- See Note [INLINE for small functions] (3)+ -> traceInline logger opts id str (mk_doc some_benefit empty True) (Just unf_template)+ | otherwise+ -> traceInline logger opts 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 }+ | unfoldingVeryAggressive opts+ -> traceInline logger opts id str (mk_doc some_benefit extra_doc True) (Just unf_template)+ | is_wf && some_benefit && small_enough+ -> traceInline logger opts id str (mk_doc some_benefit extra_doc True) (Just unf_template)+ | otherwise+ -> traceInline logger opts id str (mk_doc some_benefit extra_doc False) Nothing+ where+ some_benefit = calc_some_benefit (length arg_discounts)+ -- See Note [Avoid inlining into deeply nested cases]+ depth_treshold = unfoldingCaseThreshold opts+ depth_scaling = unfoldingCaseScaling opts+ depth_penalty | case_depth <= depth_treshold = 0+ | otherwise = (size * (case_depth - depth_treshold)) `div` depth_scaling+ adjusted_size = size + depth_penalty - discount+ small_enough = adjusted_size <= unfoldingUseThreshold opts+ discount = computeDiscount arg_discounts res_discount arg_infos cont_info++ extra_doc = vcat [ text "case depth =" <+> int case_depth+ , text "depth based penalty =" <+> int depth_penalty+ , text "discounted size =" <+> int adjusted_size ]+ where+ -- Unpack the UnfoldingCache lazily because it may not be needed, and all+ -- its fields are strict; so evaluating unf_cache at all forces all the+ -- isWorkFree etc computations to take place. That risks wasting effort for+ -- Ids that are never going to inline anyway.+ -- See Note [UnfoldingCache] in GHC.Core+ UnfoldingCache{ uf_is_work_free = is_wf, uf_expandable = is_exp } = unf_cache++ mk_doc some_benefit extra_doc yes_or_no+ = vcat [ text "arg infos" <+> ppr arg_infos+ , text "interesting continuation" <+> ppr cont_info+ , text "some_benefit" <+> ppr some_benefit+ , text "is exp:" <+> ppr is_exp+ , text "is work-free:" <+> ppr is_wf+ , text "guidance" <+> ppr guidance+ , extra_doc+ , text "ANSWER =" <+> if yes_or_no then text "YES" else text "NO"]++ ctx = log_default_dump_context (logFlags logger)+ str = "Considering inlining: " ++ showSDocOneLine ctx (ppr id)+ n_val_args = length arg_infos++ -- some_benefit is used when the RHS is small enough+ -- and the call has enough (or too many) value+ -- arguments (ie n_val_args >= arity). But there must+ -- be *something* interesting about some argument, or the+ -- result context, to make it worth inlining+ calc_some_benefit :: Arity -> Bool -- The Arity is the number of args+ -- expected by the unfolding+ calc_some_benefit uf_arity+ | not saturated = interesting_args -- Under-saturated+ -- Note [Unsaturated applications]+ | otherwise = interesting_args -- Saturated or over-saturated+ || interesting_call+ where+ saturated = n_val_args >= uf_arity+ over_saturated = n_val_args > uf_arity+ interesting_args = any nonTriv arg_infos+ -- NB: (any nonTriv arg_infos) looks at the+ -- over-saturated args too which is "wrong";+ -- but if over-saturated we inline anyway.++ interesting_call+ | over_saturated+ = True+ | otherwise+ = case cont_info of+ CaseCtxt -> not (lone_variable && is_exp) -- Note [Lone variables]+ ValAppCtxt -> True -- Note [Cast then apply]+ RuleArgCtxt -> uf_arity > 0 -- See Note [RHS of lets]+ DiscArgCtxt -> uf_arity > 0 -- Note [Inlining in ArgCtxt]+ RhsCtxt NonRecursive+ -> uf_arity > 0 -- See Note [RHS of lets]+ _other -> False -- See Note [Nested functions]+++{- Note [RHS of lets]+~~~~~~~~~~~~~~~~~~~~~+When the call is the argument of a function with a RULE, or the RHS of a let,+we are a little bit keener to inline (in tryUnfolding). For example+ f y = (y,y,y)+ g y = let x = f y in ...(case x of (a,b,c) -> ...) ...+We'd inline 'f' if the call was in a case context, and it kind-of-is,+only we can't see it. Also+ x = f v+could be expensive whereas+ x = case v of (a,b) -> a+is patently cheap and may allow more eta expansion.++So, in `interesting_call` in `tryUnfolding`, we treat the RHS of a+/non-recursive/ let as not-totally-boring. A /recursive/ let isn't+going be inlined so there is much less point. Hence the (only reason+for the) RecFlag in RhsCtxt++Note [Unsaturated applications]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When a call is not saturated, we *still* inline if one of the+arguments has interesting structure. That's sometimes very important.+A good example is the Ord instance for Bool in Base:++ Rec {+ $fOrdBool =GHC.Classes.D:Ord+ @ Bool+ ...+ $cmin_ajX++ $cmin_ajX [Occ=LoopBreaker] :: Bool -> Bool -> Bool+ $cmin_ajX = GHC.Classes.$dmmin @ Bool $fOrdBool+ }++But the defn of GHC.Classes.$dmmin is:++ $dmmin :: forall a. GHC.Classes.Ord a => a -> a -> a+ {- Arity: 3, HasNoCafRefs, Strictness: SLL,+ Unfolding: (\ @ a $dOrd :: GHC.Classes.Ord a x :: a y :: a ->+ case @ a GHC.Classes.<= @ a $dOrd x y of wild {+ GHC.Types.False -> y GHC.Types.True -> x }) -}++We *really* want to inline $dmmin, even though it has arity 3, in+order to unravel the recursion.+++Note [Things to watch]+~~~~~~~~~~~~~~~~~~~~~~+* { y = I# 3; x = y `cast` co; ...case (x `cast` co) of ... }+ Assume x is exported, so not inlined unconditionally.+ Then we want x to inline unconditionally; no reason for it+ not to, and doing so avoids an indirection.++* { x = I# 3; ....f x.... }+ Make sure that x does not inline unconditionally!+ Lest we get extra allocation.++Note [Nested functions]+~~~~~~~~~~~~~~~~~~~~~~~+At one time we treated a call of a non-top-level function as+"interesting" (regardless of how boring the context) in the hope+that inlining it would eliminate the binding, and its allocation.+Specifically, in the default case of interesting_call we had+ _other -> not is_top && uf_arity > 0++But actually postInlineUnconditionally does some of this and overall+it makes virtually no difference to nofib. So I simplified away this+special case++Note [Cast then apply]+~~~~~~~~~~~~~~~~~~~~~~+Consider+ myIndex = __inline_me ( (/\a. <blah>) |> co )+ co :: (forall a. a -> a) ~ (forall a. T a)+ ... /\a.\x. case ((myIndex a) |> sym co) x of { ... } ...++We need to inline myIndex to unravel this; but the actual call (myIndex a) has+no value arguments. The ValAppCtxt gives it enough incentive to inline.++Note [Inlining in ArgCtxt]+~~~~~~~~~~~~~~~~~~~~~~~~~~+The condition (arity > 0) here is very important, because otherwise+we end up inlining top-level stuff into useless places; eg+ x = I# 3#+ f = \y. g x+This can make a very big difference: it adds 16% to nofib 'integer' allocs,+and 20% to 'power'.++At one stage I replaced this condition by 'True' (leading to the above+slow-down). The motivation was test eyeball/inline1.hs; but that seems+to work ok now.++NOTE: arguably, we should inline in ArgCtxt only if the result of the+call is at least CONLIKE. At least for the cases where we use ArgCtxt+for the RHS of a 'let', we only profit from the inlining if we get a+CONLIKE thing (modulo lets).++Note [Lone variables]+~~~~~~~~~~~~~~~~~~~~~+See also Note [Interaction of exprIsWorkFree and lone variables]+which appears below++The "lone-variable" case is important. I spent ages messing about+with unsatisfactory variants, but this is nice. The idea is that if a+variable appears all alone++ as an arg of lazy fn, or rhs BoringCtxt+ as scrutinee of a case CaseCtxt+ as arg of a fn ArgCtxt+AND+ it is bound to a cheap expression++then we should not inline it (unless there is some other reason,+e.g. it is the sole occurrence). That is what is happening at+the use of 'lone_variable' in 'interesting_call'.++Why? At least in the case-scrutinee situation, turning+ let x = (a,b) in case x of y -> ...+into+ let x = (a,b) in case (a,b) of y -> ...+and thence to+ let x = (a,b) in let y = (a,b) in ...+is bad if the binding for x will remain.++Another example: I discovered that strings+were getting inlined straight back into applications of 'error'+because the latter is strict.+ s = "foo"+ f = \x -> ...(error s)...++Fundamentally such contexts should not encourage inlining because, provided+the RHS is "expandable" (see Note [exprIsExpandable] in GHC.Core.Utils) the+context can ``see'' the unfolding of the variable (e.g. case or a+RULE) so there's no gain.++However, watch out:++ * Consider this:+ foo = \n. [n]) {-# INLINE foo #-}+ bar = foo 20 {-# INLINE bar #-}+ baz = \n. case bar of { (m:_) -> m + n }+ Here we really want to inline 'bar' so that we can inline 'foo'+ and the whole thing unravels as it should obviously do. This is+ important: in the NDP project, 'bar' generates a closure data+ structure rather than a list.++ So the non-inlining of lone_variables should only apply if the+ unfolding is regarded as expandable; because that is when+ exprIsConApp_maybe looks through the unfolding. Hence the "&&+ is_exp" in the CaseCtxt branch of interesting_call++ * Even a type application or coercion isn't a lone variable.+ Consider+ case $fMonadST @ RealWorld of { :DMonad a b c -> c }+ We had better inline that sucker! The case won't see through it.++ For now, I'm treating treating a variable applied to types+ in a *lazy* context "lone". The motivating example was+ f = /\a. \x. BIG+ g = /\a. \y. h (f a)+ There's no advantage in inlining f here, and perhaps+ a significant disadvantage. Hence some_val_args in the Stop case++Note [Interaction of exprIsWorkFree and lone variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The lone-variable test says "don't inline if a case expression+scrutinises a lone variable whose unfolding is cheap". It's very+important that, under these circumstances, exprIsConApp_maybe+can spot a constructor application. So, for example, we don't+consider+ let x = e in (x,x)+to be cheap, and that's good because exprIsConApp_maybe doesn't+think that expression is a constructor application.++In the 'not (lone_variable && is_wf)' test, I used to test is_value+rather than is_wf, which was utterly wrong, because the above+expression responds True to exprIsHNF, which is what sets is_value.++This kind of thing can occur if you have++ {-# INLINE foo #-}+ foo = let x = e in (x,x)++which Roman did.+++-}++computeDiscount :: [Int] -> Int -> [ArgSummary] -> CallCtxt+ -> Int+computeDiscount arg_discounts res_discount arg_infos cont_info++ = 10 -- Discount of 10 because the result replaces the call+ -- so we count 10 for the function itself++ + 10 * length actual_arg_discounts+ -- Discount of 10 for each arg supplied,+ -- because the result replaces the call++ + total_arg_discount + res_discount'+ where+ actual_arg_discounts = zipWith mk_arg_discount arg_discounts arg_infos+ total_arg_discount = sum actual_arg_discounts++ mk_arg_discount _ TrivArg = 0+ mk_arg_discount _ NonTrivArg = 10+ mk_arg_discount discount ValueArg = discount++ res_discount'+ | LT <- arg_discounts `compareLength` arg_infos+ = res_discount -- Over-saturated+ | otherwise+ = case cont_info of+ BoringCtxt -> 0+ CaseCtxt -> res_discount -- Presumably a constructor+ ValAppCtxt -> res_discount -- Presumably a function+ _ -> 40 `min` res_discount+ -- ToDo: this 40 `min` res_discount doesn't seem right+ -- for DiscArgCtxt it shouldn't matter because the function will+ -- get the arg discount for any non-triv arg+ -- for RuleArgCtxt we do want to be keener to inline; but not only+ -- constructor results+ -- for RhsCtxt I suppose that exposing a data con is good in general+ -- And 40 seems very arbitrary+ --+ -- res_discount can be very large when a function returns+ -- constructors; but we only want to invoke that large discount+ -- when there's a case continuation.+ -- Otherwise we, rather arbitrarily, threshold it. Yuk.+ -- But we want to avoid inlining large functions that return+ -- constructors into contexts that are simply "interesting"
GHC/Core/Opt/Simplify/Iteration.hs view
@@ -19,9 +19,11 @@ import GHC.Core import GHC.Core.Opt.Simplify.Monad+import GHC.Core.Opt.ConstantFold import GHC.Core.Type hiding ( substTy, substTyVar, extendTvSubst, extendCvSubst ) import GHC.Core.TyCo.Compare( eqType ) import GHC.Core.Opt.Simplify.Env+import GHC.Core.Opt.Simplify.Inline import GHC.Core.Opt.Simplify.Utils import GHC.Core.Opt.OccurAnal ( occurAnalyseExpr, zapLambdaBndrs, scrutBinderSwap_maybe ) import GHC.Core.Make ( FloatBind, mkImpossibleExpr, castBottomExpr )@@ -62,7 +64,7 @@ import GHC.Builtin.Types.Prim( realWorldStatePrimTy ) import GHC.Builtin.Names( runRWKey ) -import GHC.Data.Maybe ( isNothing, orElse )+import GHC.Data.Maybe ( isNothing, orElse, mapMaybe ) import GHC.Data.FastString import GHC.Unit.Module ( moduleName ) import GHC.Utils.Outputable@@ -595,9 +597,9 @@ -- a DFunUnfolding in mk_worker_unfolding , not (exprIsTrivial rhs) -- Not x = y |> co; Wrinkle 1 , not (hasInlineUnfolding info) -- Not INLINE things: Wrinkle 4- , isConcrete (typeKind work_ty) -- Don't peel off a cast if doing so would- -- lose the underlying runtime representation.- -- See Note [Preserve RuntimeRep info in cast w/w]+ , isConcreteType (typeKind work_ty) -- Don't peel off a cast if doing so would+ -- lose the underlying runtime representation.+ -- See Note [Preserve RuntimeRep info in cast w/w] , not (isOpaquePragma (idInlinePragma old_bndr)) -- Not for OPAQUE bindings -- See Note [OPAQUE pragma] = do { uniq <- getUniqueM@@ -666,7 +668,7 @@ mkCastWrapperInlinePrag :: InlinePragma -> InlinePragma -- See Note [Cast worker/wrapper] mkCastWrapperInlinePrag (InlinePragma { inl_inline = fn_inl, inl_act = fn_act, inl_rule = rule_info })- = InlinePragma { inl_src = SourceText "{-# INLINE"+ = InlinePragma { inl_src = SourceText $ fsLit "{-# INLINE" , inl_inline = fn_inl -- See Note [Worker/wrapper for INLINABLE functions] , inl_sat = Nothing -- in GHC.Core.Opt.WorkWrap , inl_act = wrap_act -- See Note [Wrapper activation]@@ -1434,7 +1436,7 @@ simplTickish env tickish | Breakpoint ext n ids <- tickish- = Breakpoint ext n (map (getDoneId . substId env) ids)+ = Breakpoint ext n (mapMaybe (getDoneId . substId env) ids) | otherwise = tickish -- Push type application and coercion inside a tick@@ -1445,8 +1447,9 @@ where (inc,outc) = splitCont c splitCont other = (mkBoringStop (contHoleType other), other) - getDoneId (DoneId id) = id- getDoneId (DoneEx e _) = getIdFromTrivialExpr e -- Note [substTickish] in GHC.Core.Subst+ getDoneId (DoneId id) = Just id+ getDoneId (DoneEx (Var id) _) = Just id+ getDoneId (DoneEx e _) = getIdFromTrivialExpr_maybe e -- Note [substTickish] in GHC.Core.Subst getDoneId other = pprPanic "getDoneId" (ppr other) -- Note [case-of-scc-of-case]@@ -2226,44 +2229,34 @@ (ApplyToVal { sc_arg = arg, sc_env = arg_se , sc_cont = cont, sc_hole_ty = fun_ty }) | fun_id `hasKey` runRWKey- , [ TyArg { as_arg_ty = hole_ty }, TyArg {} ] <- rev_args- -- Do this even if (contIsStop cont), or if seCaseCase is off.+ , [ TyArg {}, TyArg {} ] <- rev_args+ -- Do this even if (contIsStop cont) -- See Note [No eta-expansion in runRW#] = do { let arg_env = arg_se `setInScopeFromE` env-- overall_res_ty = contResultType cont- -- hole_ty is the type of the current runRW# application- (outer_cont, new_runrw_res_ty, inner_cont)- | seCaseCase env = (mkBoringStop overall_res_ty, overall_res_ty, cont)- | otherwise = (cont, hole_ty, mkBoringStop hole_ty)- -- Only when case-of-case is on. See GHC.Driver.Config.Core.Opt.Simplify- -- Note [Case-of-case and full laziness]+ ty' = contResultType cont -- If the argument is a literal lambda already, take a short cut- -- This isn't just efficiency:- -- * If we don't do this we get a beta-redex every time, so the- -- simplifier keeps doing more iterations.- -- * Even more important: see Note [No eta-expansion in runRW#]+ -- This isn't just efficiency; if we don't do this we get a beta-redex+ -- every time, so the simplifier keeps doing more iterations. ; arg' <- case arg of Lam s body -> do { (env', s') <- simplBinder arg_env s- ; body' <- simplExprC env' body inner_cont+ ; body' <- simplExprC env' body cont ; return (Lam s' body') } -- Important: do not try to eta-expand this lambda -- See Note [No eta-expansion in runRW#]- _ -> do { s' <- newId (fsLit "s") ManyTy realWorldStatePrimTy ; let (m,_,_) = splitFunTy fun_ty env' = arg_env `addNewInScopeIds` [s'] cont' = ApplyToVal { sc_dup = Simplified, sc_arg = Var s'- , sc_env = env', sc_cont = inner_cont- , sc_hole_ty = mkVisFunTy m realWorldStatePrimTy new_runrw_res_ty }+ , sc_env = env', sc_cont = cont+ , sc_hole_ty = mkVisFunTy m realWorldStatePrimTy ty' } -- cont' applies to s', then K ; body' <- simplExprC env' arg cont' ; return (Lam s' body') } - ; let rr' = getRuntimeRep new_runrw_res_ty- call' = mkApps (Var fun_id) [mkTyArg rr', mkTyArg new_runrw_res_ty, arg']- ; rebuild env call' outer_cont }+ ; let rr' = getRuntimeRep ty'+ call' = mkApps (Var fun_id) [mkTyArg rr', mkTyArg ty', arg']+ ; return (emptyFloats env, call') } ---------- Simplify value arguments -------------------- rebuildCall env fun_info@@ -2276,8 +2269,7 @@ -- Strict arguments | isStrictArgInfo fun_info- , seCaseCase env -- Only when case-of-case is on. See GHC.Driver.Config.Core.Opt.Simplify- -- Note [Case-of-case and full laziness]+ , seCaseCase env = -- pprTrace "Strict Arg" (ppr arg $$ ppr (seIdSubst env) $$ ppr (seInScope env)) $ simplExprF (arg_se `setInScopeFromE` env) arg (StrictArg { sc_fun = fun_info, sc_fun_ty = fun_ty@@ -3049,6 +3041,14 @@ ; case mb_rule of Just (env', rule_rhs, cont') -> simplExprF env' rule_rhs cont' Nothing -> reallyRebuildCase env scrut case_bndr alts cont }++--------------------------------------------------+-- 3. Primop-related case-rules+--------------------------------------------------++ |Just (scrut', case_bndr', alts') <- caseRules2 scrut case_bndr alts+ = reallyRebuildCase env scrut' case_bndr' alts' cont+ where all_dead_bndrs = all isDeadBinder bndrs -- bndrs are [InId] is_plain_seq = all_dead_bndrs && isDeadBinder case_bndr -- Evaluation *only* for effect@@ -3086,9 +3086,7 @@ -------------------------------------------------- reallyRebuildCase env scrut case_bndr alts cont- | not (seCaseCase env) -- Only when case-of-case is on.- -- See GHC.Driver.Config.Core.Opt.Simplify- -- Note [Case-of-case and full laziness]+ | not (seCaseCase env) = do { case_expr <- simplAlts env scrut case_bndr alts (mkBoringStop (contHoleType cont)) ; rebuild env case_expr cont }
GHC/Core/Opt/Simplify/Monad.hs view
@@ -180,13 +180,13 @@ ************************************************************************ -} --- See Note [Uniques for wired-in prelude things and known tags] in GHC.Builtin.Uniques-simplTag :: Char-simplTag = 's'+-- See Note [Uniques for wired-in prelude things and known masks] in GHC.Builtin.Uniques+simplMask :: Char+simplMask = 's' instance MonadUnique SimplM where- getUniqueSupplyM = liftIO $ mkSplitUniqSupply simplTag- getUniqueM = liftIO $ uniqFromTag simplTag+ getUniqueSupplyM = liftIO $ mkSplitUniqSupply simplMask+ getUniqueM = liftIO $ uniqFromMask simplMask instance HasLogger SimplM where getLogger = gets st_logger
GHC/Core/Opt/Simplify/Utils.hs view
@@ -43,10 +43,12 @@ ) where import GHC.Prelude hiding (head, init, last, tail)+import qualified GHC.Prelude as Partial (head) import GHC.Core import GHC.Types.Literal ( isLitRubbish ) import GHC.Core.Opt.Simplify.Env+import GHC.Core.Opt.Simplify.Inline import GHC.Core.Opt.Stats ( Tick(..) ) import qualified GHC.Core.Subst import GHC.Core.Ppr@@ -83,7 +85,6 @@ import Control.Monad ( when ) import Data.List ( sortBy )-import qualified Data.List as Partial ( head ) {- ********************************************************************* * *@@ -687,7 +688,7 @@ | Just (_, _, arg_ty, fun_ty') <- splitFunTy_maybe fun_ty -- Add strict-type info , dmd : rest_dmds <- dmds , let dmd'- | Just Unlifted <- typeLevity_maybe arg_ty+ | definitelyUnliftedType arg_ty = strictifyDmd dmd | otherwise -- Something that's not definitely unlifted.@@ -1858,11 +1859,12 @@ -> SimplM (ArityType, OutExpr) -- See Note [Eta-expanding at let bindings] tryEtaExpandRhs env bind_cxt bndr rhs- | do_eta_expand -- If the current manifest arity isn't enough- -- (never true for join points)- , seEtaExpand env -- and eta-expansion is on- , wantEtaExpansion rhs- = -- Do eta-expansion.+ | seEtaExpand env -- If Eta-expansion is on+ , wantEtaExpansion rhs -- and we'd like to eta-expand e+ , do_eta_expand -- and e's manifest arity is lower than+ -- what it could be+ -- (never true for join points)+ = -- Do eta-expansion. assertPpr( not (isJoinBC bind_cxt) ) (ppr bndr) $ -- assert: this never happens for join points; see GHC.Core.Opt.Arity -- Note [Do not eta-expand join points]@@ -2141,6 +2143,9 @@ get_tvs var free_tvs | isTyVar var -- CoVars have been substituted away = extendVarSet free_tvs var+ | isCoVar var -- CoVars can be free in the RHS, but they are never let-bound;+ = free_tvs -- Do not call lookupIdSubst_maybe, though (#23426)+ -- because it has a non-CoVar precondition | Just poly_app <- GHC.Core.Subst.lookupIdSubst_maybe subst var = -- 'var' is like 'x' in (AB4) exprSomeFreeVars isTyVar poly_app `unionVarSet` free_tvs
GHC/Core/Opt/SpecConstr.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP #-}+{-# LANGUAGE CPP, LambdaCase #-} #if __GLASGOW_HASKELL__ < 905 {-# LANGUAGE PatternSynonyms #-} #endif@@ -25,13 +25,14 @@ import GHC.Prelude -import GHC.Driver.Session ( DynFlags(..), GeneralFlag( Opt_SpecConstrKeen )+import GHC.Driver.DynFlags ( DynFlags(..), GeneralFlag( Opt_SpecConstrKeen ) , gopt, hasPprDebug ) import GHC.Core import GHC.Core.Subst import GHC.Core.Utils import GHC.Core.Unfold+import GHC.Core.Opt.Simplify.Inline import GHC.Core.FVs ( exprsFreeVarsList, exprFreeVars ) import GHC.Core.Opt.Monad import GHC.Core.Opt.WorkWrap.Utils@@ -1477,7 +1478,8 @@ scExpr' env (Coercion c) = return (nullUsage, Coercion (scSubstCo env c)) scExpr' _ e@(Lit {}) = return (nullUsage, e) scExpr' env (Tick t e) = do (usg, e') <- scExpr env e- return (usg, Tick t e')+ (usg_t, t') <- scTickish env t+ return (combineUsage usg usg_t, Tick t' e') scExpr' env (Cast e co) = do (usg, e') <- scExpr env e return (usg, mkCast e' (scSubstCo env co)) -- Important to use mkCast here@@ -1536,6 +1538,17 @@ ; return (usg', b_occ `combineOcc` scrut_occ, Alt con bs2 rhs') } +-- | Substitute the free variables captured by a breakpoint.+-- Variables are dropped if they have a non-variable substitution, like in+-- 'GHC.Opt.Specialise.specTickish'.+scTickish :: ScEnv -> CoreTickish -> UniqSM (ScUsage, CoreTickish)+scTickish env = \case+ Breakpoint ext i fv -> do+ (usg, fv') <- unzip <$> mapM (\ v -> scExpr env (Var v)) fv+ pure (combineUsages usg, Breakpoint ext i [v | Var v <- fv'])+ t@ProfNote {} -> pure (nullUsage, t)+ t@HpcTick {} -> pure (nullUsage, t)+ t@SourceNote {} -> pure (nullUsage, t) {- Note [Do not specialise evals] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GHC/Core/Opt/Specialise.hs view
@@ -10,7 +10,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Config import GHC.Driver.Config.Diagnostic import GHC.Driver.Config.Core.Rules ( initRuleOpts )@@ -3484,9 +3484,8 @@ cloneRecBndrsSM :: SpecEnv -> [Id] -> SpecM (SpecEnv, [Id]) cloneRecBndrsSM env@(SE { se_subst = subst }) bndrs- = do { us <- getUniqueSupplyM- ; let (subst', bndrs') = Core.cloneRecIdBndrs subst us bndrs- env' = env { se_subst = subst' }+ = do { (subst', bndrs') <- Core.cloneRecIdBndrs subst bndrs+ ; let env' = env { se_subst = subst' } ; return (env', bndrs') } newDictBndr :: SpecEnv -> CoreBndr -> SpecM (SpecEnv, CoreBndr)
GHC/Core/Opt/WorkWrap.hs view
@@ -20,6 +20,8 @@ import GHC.Core.Opt.WorkWrap.Utils import GHC.Core.SimpleOpt +import GHC.Data.FastString+ import GHC.Types.Var import GHC.Types.Id import GHC.Types.Id.Info@@ -68,9 +70,7 @@ wwTopBinds :: WwOpts -> UniqSupply -> CoreProgram -> CoreProgram wwTopBinds ww_opts us top_binds- = initUs_ us $ do- top_binds' <- mapM (wwBind ww_opts) top_binds- return (concat top_binds')+ = initUs_ us $ concatMapM (wwBind ww_opts) top_binds {- ************************************************************************@@ -821,7 +821,7 @@ NoInline _ -> inl_act fn_inl_prag _ -> inl_act wrap_prag - work_prag = InlinePragma { inl_src = SourceText "{-# INLINE"+ work_prag = InlinePragma { inl_src = SourceText $ fsLit "{-# INLINE" , inl_inline = fn_inline_spec , inl_sat = Nothing , inl_act = work_act@@ -889,7 +889,7 @@ mkStrWrapperInlinePrag (InlinePragma { inl_inline = fn_inl , inl_act = fn_act , inl_rule = rule_info }) rules- = InlinePragma { inl_src = SourceText "{-# INLINE"+ = InlinePragma { inl_src = SourceText $ fsLit "{-# INLINE" , inl_sat = Nothing , inl_inline = fn_inl
GHC/Core/Opt/WorkWrap/Utils.hs view
@@ -213,12 +213,11 @@ -- Clone and prepare arg_vars of the original fun RHS -- See Note [Freshen WW arguments] -- and Note [Zap IdInfo on worker args]- ; uniq_supply <- getUniqueSupplyM ; let args_free_tcvs = tyCoVarsOfTypes (res_ty : map varType arg_vars) empty_subst = mkEmptySubst (mkInScopeSet args_free_tcvs) zapped_arg_vars = map zap_var arg_vars- (subst, cloned_arg_vars) = cloneBndrs empty_subst uniq_supply zapped_arg_vars- res_ty' = substTyUnchecked subst res_ty+ ; (subst, cloned_arg_vars) <- cloneBndrs empty_subst zapped_arg_vars+ ; let res_ty' = substTyUnchecked subst res_ty init_str_marks = map (const NotMarkedStrict) cloned_arg_vars ; (useful1, work_args_str, wrap_fn_str, fn_args)
GHC/Core/Ppr.hs view
@@ -159,9 +159,9 @@ -- So refer to printing j = e = pp_normal_bind where- (bndrs, body) = collectBinders expr- lhs_bndrs = take join_arity bndrs- rhs = mkLams (drop join_arity bndrs) body+ (bndrs, body) = collectBinders expr+ (lhs_bndrs, rest) = splitAt join_arity bndrs+ rhs = mkLams rest body pprParendExpr expr = ppr_expr parens expr pprCoreExpr expr = ppr_expr noParens expr
GHC/Core/Predicate.hs view
@@ -16,16 +16,16 @@ getEqPredTys, getEqPredTys_maybe, getEqPredRole, predTypeEqRel, mkPrimEqPred, mkReprPrimEqPred, mkPrimEqPredRole,- mkHeteroPrimEqPred, mkHeteroReprPrimEqPred,+ mkNomPrimEqPred, -- Class predicates mkClassPred, isDictTy, typeDeterminesValue,- isClassPred, isEqPredClass, isCTupleClass,+ isClassPred, isEqualityClass, isCTupleClass, getClassPredTys, getClassPredTys_maybe, classMethodTy, classMethodInstTy, -- Implicit parameters- isIPLikePred, hasIPSuperClasses, isIPTyCon, isIPClass,+ isIPLikePred, mentionsIP, isIPTyCon, isIPClass, isCallStackTy, isCallStackPred, isCallStackPredTy, isIPPred_maybe, @@ -38,6 +38,7 @@ import GHC.Core.Type import GHC.Core.Class+import GHC.Core.TyCo.Compare( eqType ) import GHC.Core.TyCon import GHC.Core.TyCon.RecWalk import GHC.Types.Var@@ -51,8 +52,6 @@ import GHC.Utils.Panic import GHC.Data.FastString -import Control.Monad ( guard )- -- | A predicate in the solver. The solver tries to prove Wanted predicates -- from Given ones. data Pred@@ -68,7 +67,7 @@ -- | A quantified predicate. --- -- See Note [Quantified constraints] in GHC.Tc.Solver.Canonical+ -- See Note [Quantified constraints] in GHC.Tc.Solver.Solve | ForAllPred [TyVar] [PredType] PredType -- NB: There is no TuplePred case@@ -100,14 +99,7 @@ mkClassPred clas tys = mkTyConApp (classTyCon clas) tys isDictTy :: Type -> Bool--- True of dictionaries (Eq a) and--- dictionary functions (forall a. Eq a => Eq [a])--- See Note [Type determines value]--- See #24370 (and the isDictId call in GHC.HsToCore.Binds.decomposeRuleLhs)--- for why it's important to catch dictionary bindings-isDictTy ty = isClassPred pred- where- (_, pred) = splitInvisPiTys ty+isDictTy = isClassPred typeDeterminesValue :: Type -> Bool -- See Note [Type determines value]@@ -207,7 +199,7 @@ {- Note [Evidence for quantified constraints] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The superclass mechanism in GHC.Tc.Solver.Canonical.makeSuperClasses risks+The superclass mechanism in GHC.Tc.Solver.Dict.makeSuperClasses risks taking a quantified constraint like (forall a. C a => a ~ b) and generate superclass evidence@@ -216,7 +208,7 @@ This is a funny thing: neither isPredTy nor isCoVarType are true of it. So we are careful not to generate it in the first place: see Note [Equality superclasses in quantified constraints]-in GHC.Tc.Solver.Canonical.+in GHC.Tc.Solver.Dict. -} isEvVarType :: Type -> Bool@@ -226,27 +218,32 @@ -- See Note [Evidence for quantified constraints] isEvVarType ty = isCoVarType ty || isPredTy ty -isEqPredClass :: Class -> Bool--- True of (~) and (~~)-isEqPredClass cls = cls `hasKey` eqTyConKey- || cls `hasKey` heqTyConKey--isClassPred, isEqPred, isEqPrimPred :: PredType -> Bool+isClassPred :: PredType -> Bool isClassPred ty = case tyConAppTyCon_maybe ty of- Just tyCon | isClassTyCon tyCon -> True- _ -> False+ Just tc -> isClassTyCon tc+ _ -> False +isEqPred :: PredType -> Bool isEqPred ty -- True of (a ~ b) and (a ~~ b) -- ToDo: should we check saturation? | Just tc <- tyConAppTyCon_maybe ty , Just cls <- tyConClass_maybe tc- = isEqPredClass cls+ = isEqualityClass cls | otherwise = False +isEqPrimPred :: PredType -> Bool isEqPrimPred ty = isCoVarType ty -- True of (a ~# b) (a ~R# b) +isEqualityClass :: Class -> Bool+-- True of (~), (~~), and Coercible+-- These all have a single primitive-equality superclass, either (~N# or ~R#)+isEqualityClass cls+ = cls `hasKey` heqTyConKey+ || cls `hasKey` eqTyConKey+ || cls `hasKey` coercibleTyConKey+ isCTupleClass :: Class -> Bool isCTupleClass cls = isTupleTyCon (classTyCon cls) @@ -263,39 +260,15 @@ isIPClass :: Class -> Bool isIPClass cls = cls `hasKey` ipClassKey -isIPLikePred :: Type -> Bool--- See Note [Local implicit parameters]-isIPLikePred = is_ip_like_pred initIPRecTc---is_ip_like_pred :: RecTcChecker -> Type -> Bool-is_ip_like_pred rec_clss ty- | Just (tc, tys) <- splitTyConApp_maybe ty- , Just rec_clss' <- if isTupleTyCon tc -- Tuples never cause recursion- then Just rec_clss- else checkRecTc rec_clss tc- , Just cls <- tyConClass_maybe tc- = isIPClass cls || has_ip_super_classes rec_clss' cls tys-+-- | Decomposes a predicate if it is an implicit parameter. Does not look in+-- superclasses. See also [Local implicit parameters].+isIPPred_maybe :: Class -> [Type] -> Maybe (Type, Type)+isIPPred_maybe cls tys+ | isIPClass cls+ , [t1,t2] <- tys+ = Just (t1,t2) | otherwise- = False -- Includes things like (D []) where D is- -- a Constraint-ranged family; #7785--hasIPSuperClasses :: Class -> [Type] -> Bool--- See Note [Local implicit parameters]-hasIPSuperClasses = has_ip_super_classes initIPRecTc--has_ip_super_classes :: RecTcChecker -> Class -> [Type] -> Bool-has_ip_super_classes rec_clss cls tys- = any ip_ish (classSCSelIds cls)- where- -- Check that the type of a superclass determines its value- -- sc_sel_id :: forall a b. C a b -> <superclass type>- ip_ish sc_sel_id = is_ip_like_pred rec_clss $- classMethodInstTy sc_sel_id tys--initIPRecTc :: RecTcChecker-initIPRecTc = setRecTcMaxBound 1 initRecTc+ = Nothing -- --------------------- CallStack predicates --------------------------------- @@ -329,18 +302,49 @@ | otherwise = False +-- --------------------- isIPLike and mentionsIP --------------------------+-- See Note [Local implicit parameters] --- | Decomposes a predicate if it is an implicit parameter. Does not look in--- superclasses. See also [Local implicit parameters].-isIPPred_maybe :: Type -> Maybe (FastString, Type)-isIPPred_maybe ty =- do (tc,[t1,t2]) <- splitTyConApp_maybe ty- guard (isIPTyCon tc)- x <- isStrLitTy t1- return (x,t2)+isIPLikePred :: Type -> Bool+-- Is `pred`, or any of its superclasses, an implicit parameter?+-- See Note [Local implicit parameters]+isIPLikePred pred = mentions_ip_pred initIPRecTc Nothing pred +mentionsIP :: Type -> Class -> [Type] -> Bool+-- Is (cls tys) an implicit parameter with key `str_ty`, or+-- is any of its superclasses such at thing.+-- See Note [Local implicit parameters]+mentionsIP str_ty cls tys = mentions_ip initIPRecTc (Just str_ty) cls tys++mentions_ip :: RecTcChecker -> Maybe Type -> Class -> [Type] -> Bool+mentions_ip rec_clss mb_str_ty cls tys+ | Just (str_ty', _) <- isIPPred_maybe cls tys+ = case mb_str_ty of+ Nothing -> True+ Just str_ty -> str_ty `eqType` str_ty'+ | otherwise+ = or [ mentions_ip_pred rec_clss mb_str_ty (classMethodInstTy sc_sel_id tys)+ | sc_sel_id <- classSCSelIds cls ]++mentions_ip_pred :: RecTcChecker -> Maybe Type -> Type -> Bool+mentions_ip_pred rec_clss mb_str_ty ty+ | Just (cls, tys) <- getClassPredTys_maybe ty+ , let tc = classTyCon cls+ , Just rec_clss' <- if isTupleTyCon tc then Just rec_clss+ else checkRecTc rec_clss tc+ = mentions_ip rec_clss' mb_str_ty cls tys+ | otherwise+ = False -- Includes things like (D []) where D is+ -- a Constraint-ranged family; #7785++initIPRecTc :: RecTcChecker+initIPRecTc = setRecTcMaxBound 1 initRecTc+ {- Note [Local implicit parameters] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+See also wrinkle (SIP1) in Note [Shadowing of implicit parameters] in+GHC.Tc.Solver.Dict.+ The function isIPLikePred tells if this predicate, or any of its superclasses, is an implicit parameter.
GHC/Core/Reduction.hs view
@@ -361,8 +361,8 @@ (Reduction arg_co arg_ty) (Reduction res_co res_ty) = mkReduction- (mkFunCo1 r af w_co arg_co res_co)- (mkFunTy af w_ty arg_ty res_ty)+ (mkFunCo r af w_co arg_co res_co)+ (mkFunTy af w_ty arg_ty res_ty) {-# INLINE mkFunRedn #-} -- | Create a 'Reduction' associated to a Π type,
GHC/Core/Rules.hs view
@@ -41,7 +41,7 @@ import GHC.Unit.Module.ModGuts( ModGuts(..) ) import GHC.Unit.Module.Deps( Dependencies(..) ) -import GHC.Driver.Session( DynFlags )+import GHC.Driver.DynFlags( DynFlags ) import GHC.Driver.Ppr( showSDoc ) import GHC.Core -- All of it@@ -62,7 +62,8 @@ import GHC.Core.Tidy ( tidyRules ) import GHC.Core.Map.Expr ( eqCoreExpr ) import GHC.Core.Opt.Arity( etaExpandToJoinPointRule )-import GHC.Core.Opt.OccurAnal ( occurAnalyseExpr )+import GHC.Core.Make ( mkCoreLams )+import GHC.Core.Opt.OccurAnal( occurAnalyseExpr ) import GHC.Tc.Utils.TcType ( tcSplitTyConApp_maybe ) import GHC.Builtin.Types ( anyTypeOfKind )@@ -83,6 +84,7 @@ import GHC.Data.FastString import GHC.Data.Maybe import GHC.Data.Bag+import GHC.Data.List.SetOps( hasNoDups ) import GHC.Utils.Misc as Utils import GHC.Utils.Outputable@@ -892,8 +894,13 @@ -- * The BindWrapper in a RuleSubst are the bindings floated out -- from nested matches; see the Let case of match, below ---data RuleSubst = RS { rs_tv_subst :: TvSubstEnv -- Range is the- , rs_id_subst :: IdSubstEnv -- template variables+data RuleSubst = RS { -- Substitution; applied only to the template, not the target+ -- Domain is the template variables+ -- Range never includes template variables+ rs_tv_subst :: TvSubstEnv+ , rs_id_subst :: IdSubstEnv++ -- Floated bindings , rs_binds :: BindWrapper -- Floated bindings , rs_bndrs :: [Var] -- Variables bound by floated lets }@@ -1070,6 +1077,165 @@ -- because of the not-inRnEnvR ------------------------ Applications ---------------------+-- See Note [Matching higher order patterns]+match renv@(RV { rv_tmpls = tmpls, rv_lcl = rn_env })+ subst e1@App{} e2+ MRefl -- Like the App case we insist on Refl here+ -- See Note [Casts in the target]+ | (Var f, args) <- collectArgs e1+ , let f' = rnOccL rn_env f -- See similar rnOccL in match_var+ , f' `elemVarSet` tmpls -- (HOP1)+ , Just vs2 <- traverse arg_as_lcl_var args -- (HOP2), (HOP3)+ , hasNoDups vs2 -- (HOP4)+ , not can_decompose_app_instead+ = match_tmpl_var renv subst f' (mkCoreLams vs2 e2)+ -- match_tmpl_var checks (HOP5) and (HOP6)+ where+ arg_as_lcl_var :: CoreExpr -> Maybe Var+ arg_as_lcl_var (Var v)+ | Just v' <- rnOccL_maybe rn_env v+ , not (v' `elemVarSet` tmpls) -- rnEnvL contains the template variables+ = Just (to_target v') -- to_target: see (W1)+ -- in Note [Matching higher order patterns]+ arg_as_lcl_var _ = Nothing++ can_decompose_app_instead -- Template (e1 v), target (e2 v), and v # fvs(e2)+ = case (e1, e2) of -- See (W2) in Note [Matching higher order patterns]+ (App _ (Var v1), App f2 (Var v2))+ -> rnOccL rn_env v1 == rnOccR rn_env v2+ && not (v2 `elemVarSet` exprFreeVars f2)+ _ -> False++ ----------------+ -- to_target: see (W1) in Note [Matching higher order patterns]+ to_target :: Var -> Var -- From canonical variable back to target-expr variable+ to_target v = lookupVarEnv rev_envR v `orElse` v++ rev_envR :: VarEnv Var -- Inverts rnEnvR: from canonical variable+ -- back to target-expr variable+ rev_envR = nonDetStrictFoldVarEnv_Directly add_one emptyVarEnv (rnEnvR rn_env)+ add_one uniq var env = extendVarEnv env var (var `setVarUnique` uniq)++{- Note [Matching higher order patterns]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Higher order patterns provide a limited form of higher order matching.+See GHC Proposal #555+ https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0555-template-patterns.rst+and #22465 for more details and related work.++Consider the potential match:++ Template: forall f. foo (\x -> f x)+ Target: foo (\x -> x*2 + x)++The expression `x*2 + x` in the target is not literally an application of a+function to the variable `x`, so the simple application rule does not apply.+However, we can match them modulo beta equivalence with the substitution:++ [f :-> \x -> x*2 + x]++The general problem of higher order matching is tricky to implement, but+the subproblem which we call /higher order pattern matching/ is sufficient+for the given example and much easier to implement.++Design:++We start with terminology.++* /Template variables/. The forall'd variables are called the template+ variables. In the example match above, `f` is a template variable.++* /Local binders/. The local binders of a rule are the variables bound+ inside the template. In the example match above, `x` is a local binder.+ Note that local binders can be term variables and type variables.++A /higher order pattern/ (HOP) is a sub-expression of the template,+of form (f x y z) where:++* (HOP1) f is a template variable+* (HOP2) x, y, z are local binders (like y in rule "wombat" above; see definitions).+* (HOP3) The arguments x, y, z are term variables+* (HOP4) The arguments x, y, z are distinct (no duplicates)++Matching of higher order patterns (HOP-matching). A higher order pattern (f x y z)+(in the template) matches any target expression e provided:++* (HOP5) The target has the same type as the template+* (HOP6) No local binder is free in e, other than x, y, z.++If these two condition hold, the higher order pattern (f x y z) matches+the target expression e, yielding the substitution [f :-> \x y z. e].+Notice that this substitution is type preserving, and the RHS+of the substitution has no free local binders.++HOP matching is small enough to be done in-line in the `match` function.+Two wrinkles:++(W1) Consider the potential match:+ Template: forall f. foo (\x -> f x)+ Target: foo (\y -> (y, y))+ During matching we make `x` the canonical variable for the lambdas+ and then we see:+ Template: f x rnEnvL = []+ Target: (y, y) rnEnvR = [y :-> x]+ We could bind [f :-> \x. (x,x)], by applying rnEnvR substitution to the target+ expression. But that is tiresome (a) because it involves a traversal, and+ (b) because rnEnvR is a VarEnv Var, and we don't have a substitution function+ for that.++ So instead, we invert rnEnvR, and apply it to the binders, to get+ [f :-> \y. (y,y)]. This is done by `to_target` in the HOP-matching case.+ It takes a little bit of thinking to be sure this will work right in the case+ of shadowing. E.g. Template (\x y. f x y) Target (\p p. p*p)+ Here rnEnvR will be just [p :-> y], so after inversion we'll get+ [f :-> \x p. p*p]+ but that is fine.++(W2) This wrinkle concerns the overlp between the new HOP rule and the existing+ decompose-application rule. See 3.1 of GHC Proposal #555 for a discussion.++ Consider potential match:+ Template: forall f. foo (\x y. Just (f y x))+ Target: foo (\p q. Just (h (1+q) p)))+ During matching we will encounter:+ Template: f x y+ Target: h (1+q) p rnEnvR = [p:->x, q:->y]+ The rnEnvR renaming `[p:->x, q:->y]` is done by the matcher (today) on the fly,+ to make the bound variables of the template and target "line up".+ But now we can:+ * Either use the new HOP rule to succeed with+ [f :-> \x y. h (1+x) y]+ * Or use the existing decompose-application rule to match+ (f x) against (h (1+q)) and `y` against `p`.+ This will succeed with+ [f :-> \y. h (1+y)]++ Note that the result of the HOP rule will always be eta-equivalent to+ the result of the decompose-application rule. But the proposal specifies+ that we should use the decompose-application rule because it involves+ less eta-expansion.++ But take care:+ Template: forall f. foo (\x y. Just (f y x))+ Target: foo (\p q. Just (h (p+q) p)))+ Then during matching we will encounter:+ Template: f x y+ Target: h (p+q) p rnEnvR = [p:->x, q:->y]+ Now, we cannot use the decompose-application rule, because p is free in+ (h (p+q)). So, we can only use the new HOP rule.++(W3) You might wonder if a HOP can have /type/ arguments, thus (in Core)+ RULE forall h.+ f (\(MkT @b (d::Num b) (x::b)) -> h @b d x) = ...+ where the HOP is (h @b d x). In principle this might be possible, but+ it seems fragile; e.g. we would still need to insist that the (invisible)+ @b was a type variable. And since `h` gets a polymoprhic type, that+ type would have to be declared by the programmer.++ Maybe one day. But for now, we insist (in `arg_as_lcl_var`)that a HOP+ has only term-variable arguments.+-}+ -- Note the match on MRefl! We fail if there is a cast in the target -- (e1 e2) ~ (d1 d2) |> co -- See Note [Cancel reflexive casts]: in the Cast equations for 'match'@@ -1378,7 +1544,7 @@ -- if the right side of the env is empty. | anyInRnEnvR rn_env (exprFreeVars e2) = Nothing -- Skolem-escape failure- -- e.g. match forall a. (\x-> a x) against (\y. y y)+ -- e.g. match forall a. (\x -> a) against (\y -> y) | Just e1' <- lookupVarEnv id_subst v1' = if eqCoreExpr e1' e2'@@ -1398,6 +1564,7 @@ -- because no free var of e2' is in the rnEnvR of the envt ------------------------------------------+ match_ty :: RuleMatchEnv -> RuleSubst -> Type -- Template@@ -1409,12 +1576,13 @@ -- newtype T = MkT Int -- We only want to replace (f T) with f', not (f Int). -match_ty renv subst ty1 ty2- = do { tv_subst'- <- Unify.ruleMatchTyKiX (rv_tmpls renv) (rv_lcl renv) tv_subst ty1 ty2+match_ty (RV { rv_tmpls = tmpls, rv_lcl = rn_env })+ subst@(RS { rs_tv_subst = tv_subst })+ ty1 ty2+ = do { tv_subst' <- Unify.ruleMatchTyKiX tmpls rn_env tv_subst ty1 ty2+ -- NB: ruleMatchTyKiX applis tv_subst to ty1 only+ -- and of course only binds 'tmpls' ; return (subst { rs_tv_subst = tv_subst' }) }- where- tv_subst = rs_tv_subst subst {- Note [Matching variable types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GHC/Core/SimpleOpt.hs view
@@ -497,14 +497,21 @@ | otherwise = True -- Unconditionally safe to inline- safe_to_inline :: OccInfo -> Bool- safe_to_inline IAmALoopBreaker{} = False- safe_to_inline IAmDead = True- safe_to_inline OneOcc{ occ_in_lam = NotInsideLam- , occ_n_br = 1 } = True- safe_to_inline OneOcc{} = False- safe_to_inline ManyOccs{} = False+safe_to_inline :: OccInfo -> Bool+safe_to_inline IAmALoopBreaker{} = False+safe_to_inline IAmDead = True+safe_to_inline OneOcc{ occ_in_lam = NotInsideLam+ , occ_n_br = 1 } = True+safe_to_inline OneOcc{} = False+safe_to_inline ManyOccs{} = False +do_beta_by_substitution :: Id -> CoreExpr -> Bool+-- True <=> you can inline (bndr = rhs) by substitution+-- See Note [Exploit occ-info in exprIsConApp_maybe]+do_beta_by_substitution bndr rhs+ = exprIsTrivial rhs -- Can duplicate+ || safe_to_inline (idOccInfo bndr) -- Occurs at most once+ ------------------- simple_out_bind :: TopLevelFlag -> SimpleOptEnv@@ -1078,6 +1085,45 @@ See test T16254, which checks the behavior of newtypes. +Note [Exploit occ-info in exprIsConApp_maybe]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose (#23159) we have a simple data constructor wrapper like this (this one+might have come from a data family instance):+ $WK x y = K x y |> co+Now suppose the simplifier sees+ case ($WK e1 e2) |> co2 of+ K p q -> case q of ...++`exprIsConApp_maybe` expands the wrapper on the fly+(see Note [beta-reduction in exprIsConApp_maybe]). It effectively expands+that ($WK e1 e2) to+ let x = e1; y = e2 in K x y |> co++So the Simplifier might end up producing this:+ let x = e1; y = e2+ in case x of ...++But suppose `q` was used just once in the body of the `K p q` alternative; we+don't want to wait a whole Simplifier iteration to inline that `x`. (e1 might+be another constructor for example.) This would happen if `exprIsConApp_maybe`+we created a let for every (non-trivial) argument. So let's not do that when+the binder is used just once!++Instead, take advantage of the occurrence-info on `x` and `y` in the unfolding+of `$WK`. Since in `$WK` both `x` and `y` occur once, we want to effectively+expand `($WK e1 e2)` to `(K e1 e2 |> co)`. Hence in+`do_beta_by_substitution` we say "yes" if++ (a) the RHS is trivial (so we can duplicate it);+ see call to `exprIsTrivial`+or+ (b) the binder occurs at most once (so there is no worry about duplication);+ see call to `safe_to_inline`.++To see this in action, look at testsuite/tests/perf/compiler/T15703. The+initial Simlifier run takes 5 iterations without (b), but only 3 when we add+(b).+ Note [Don't float join points] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ exprIsConApp_maybe should succeed on@@ -1228,7 +1274,7 @@ = go subst floats fun (CC (subst_expr subst arg : args) co) go subst floats (Lam bndr body) (CC (arg:args) co)- | exprIsTrivial arg -- Don't duplicate stuff!+ | do_beta_by_substitution bndr arg = go (extend subst bndr arg) floats body (CC args co) | otherwise = let (subst', bndr') = subst_bndr subst bndr
GHC/Core/Subst.hs view
@@ -417,11 +417,12 @@ cloneIdBndrs subst us ids = mapAccumL (clone_id subst) subst (ids `zip` uniqsFromSupply us) -cloneBndrs :: Subst -> UniqSupply -> [Var] -> (Subst, [Var])+cloneBndrs :: MonadUnique m => Subst -> [Var] -> m (Subst, [Var]) -- Works for all kinds of variables (typically case binders) -- not just Ids-cloneBndrs subst us vs- = mapAccumL (\subst (v, u) -> cloneBndr subst u v) subst (vs `zip` uniqsFromSupply us)+cloneBndrs subst vs+ = do us <- getUniquesM+ pure $ mapAccumL (\subst (v, u) -> cloneBndr subst u v) subst (vs `zip` us) cloneBndr :: Subst -> Unique -> Var -> (Subst, Var) cloneBndr subst uniq v@@ -429,12 +430,11 @@ | otherwise = clone_id subst subst (v,uniq) -- Works for coercion variables too -- | Clone a mutually recursive group of 'Id's-cloneRecIdBndrs :: Subst -> UniqSupply -> [Id] -> (Subst, [Id])-cloneRecIdBndrs subst us ids- = (subst', ids')- where- (subst', ids') = mapAccumL (clone_id subst') subst- (ids `zip` uniqsFromSupply us)+cloneRecIdBndrs :: MonadUnique m => Subst -> [Id] -> m (Subst, [Id])+cloneRecIdBndrs subst ids+ = do us <- getUniquesM+ let (subst', ids') = mapAccumL (clone_id subst') subst (ids `zip` us)+ pure (subst', ids') -- Just like substIdBndr, except that it always makes a new unique -- It is given the unique to use@@ -592,9 +592,9 @@ ------------------ substTickish :: Subst -> CoreTickish -> CoreTickish substTickish subst (Breakpoint ext n ids)- = Breakpoint ext n (map do_one ids)+ = Breakpoint ext n (mapMaybe do_one ids) where- do_one = getIdFromTrivialExpr . lookupIdSubst subst+ do_one = getIdFromTrivialExpr_maybe . lookupIdSubst subst substTickish _subst other = other {- Note [Substitute lazily]@@ -649,6 +649,13 @@ for an Id in a breakpoint. We ensure this by never storing an Id with an unlifted type in a Breakpoint - see GHC.HsToCore.Ticks.mkTickish. Breakpoints can't handle free variables with unlifted types anyway.++These measures are only reliable with unoptimized code.+Since we can now enable optimizations for GHCi with+@-fno-unoptimized-core-for-interpreter -O@, nontrivial expressions can be+substituted, e.g. by specializations.+Therefore we resort to discarding free variables from breakpoints when this+situation occurs. -} {-
GHC/Core/TyCo/Compare.hs view
@@ -324,7 +324,7 @@ See Note [Non-trivial definitional equality] in GHC.Core.TyCo.Rep. * Typechecker equality, as implemented by tcEqType.- GHC.Tc.Solver.Canonical.canEqNC also respects typechecker equality.+ GHC.Tc.Solver.Equality.canonicaliseEquality also respects typechecker equality. Typechecker equality implied definitional equality: if two types are equal according to typechecker equality, then they are also equal according to@@ -379,7 +379,7 @@ * GHC.Core.Types.eqType * GHC.Core.Types.nonDetCmpType * GHC.Core.Unify.unify_ty- * TcCanonical.can_eq_nc'+ * GHC.Tc.Solver.Equality.can_eq_nc' * TcUnify.uType This optimisation is especially helpful for the ubiquitous GHC.Types.Type,
GHC/Core/TyCo/FVs.hs view
@@ -1,4 +1,4 @@-+{-# LANGUAGE MultiWayIf #-} module GHC.Core.TyCo.FVs ( shallowTyCoVarsOfType, shallowTyCoVarsOfTypes,@@ -23,7 +23,7 @@ almostDevoidCoVarOfCo, -- Injective free vars- injectiveVarsOfType, injectiveVarsOfTypes,+ injectiveVarsOfType, injectiveVarsOfTypes, isInjectiveInType, invisibleVarsOfType, invisibleVarsOfTypes, -- Any and No Free vars@@ -53,7 +53,7 @@ import GHC.Prelude -import {-# SOURCE #-} GHC.Core.Type( partitionInvisibleTypes, coreView )+import {-# SOURCE #-} GHC.Core.Type( partitionInvisibleTypes, coreView, rewriterView ) import {-# SOURCE #-} GHC.Core.Coercion( coercionLKind ) import GHC.Builtin.Types.Prim( funTyFlagTyCon )@@ -806,6 +806,28 @@ * * ********************************************************************* -} +isInjectiveInType :: TyVar -> Type -> Bool+-- True <=> tv /definitely/ appears injectively in ty+-- A bit more efficient that (tv `elemVarSet` injectiveTyVarsOfType ty)+-- Ignore occurence in coercions, and even in injective positions of+-- type families.+isInjectiveInType tv ty+ = go ty+ where+ go ty | Just ty' <- rewriterView ty = go ty'+ go (TyVarTy tv') = tv' == tv+ go (AppTy f a) = go f || go a+ go (FunTy _ w ty1 ty2) = go w || go ty1 || go ty2+ go (TyConApp tc tys) = go_tc tc tys+ go (ForAllTy (Bndr tv' _) ty) = go (tyVarKind tv')+ || (tv /= tv' && go ty)+ go LitTy{} = False+ go (CastTy ty _) = go ty+ go CoercionTy{} = False++ go_tc tc tys | isTypeFamilyTyCon tc = False+ | otherwise = any go tys+ -- | Returns the free variables of a 'Type' that are in injective positions. -- Specifically, it finds the free variables while: --@@ -836,24 +858,29 @@ -> Type -> FV injectiveVarsOfType look_under_tfs = go where- go ty | Just ty' <- coreView ty- = go ty'- go (TyVarTy v) = unitFV v `unionFV` go (tyVarKind v)- go (AppTy f a) = go f `unionFV` go a- go (FunTy _ w ty1 ty2) = go w `unionFV` go ty1 `unionFV` go ty2- go (TyConApp tc tys) =- case tyConInjectivityInfo tc of- Injective inj- | look_under_tfs || not (isTypeFamilyTyCon tc)- -> mapUnionFV go $- filterByList (inj ++ repeat True) tys+ go ty | Just ty' <- rewriterView ty = go ty'+ go (TyVarTy v) = unitFV v `unionFV` go (tyVarKind v)+ go (AppTy f a) = go f `unionFV` go a+ go (FunTy _ w ty1 ty2) = go w `unionFV` go ty1 `unionFV` go ty2+ go (TyConApp tc tys) = go_tc tc tys+ go (ForAllTy (Bndr tv _) ty) = go (tyVarKind tv) `unionFV` delFV tv (go ty)+ go LitTy{} = emptyFV+ go (CastTy ty _) = go ty+ go CoercionTy{} = emptyFV++ go_tc tc tys+ | isTypeFamilyTyCon tc+ = if | look_under_tfs+ , Injective flags <- tyConInjectivityInfo tc+ -> mapUnionFV go $+ filterByList (flags ++ repeat True) tys -- Oversaturated arguments to a tycon are -- always injective, hence the repeat True- _ -> emptyFV- go (ForAllTy (Bndr tv _) ty) = go (tyVarKind tv) `unionFV` delFV tv (go ty)- go LitTy{} = emptyFV- go (CastTy ty _) = go ty- go CoercionTy{} = emptyFV+ | otherwise -- No injectivity info for this type family+ -> emptyFV++ | otherwise -- Data type, injective in all positions+ = mapUnionFV go tys -- | Returns the free variables of a 'Type' that are in injective positions. -- Specifically, it finds the free variables while:
GHC/Core/TyCo/Rep.hs view
@@ -38,7 +38,7 @@ -- * Coercions Coercion(..), CoSel(..), FunSel(..), UnivCoProvenance(..),- CoercionHole(..), coHoleCoVar, setCoHoleCoVar,+ CoercionHole(..), coHoleCoVar, setCoHoleCoVar, isHeteroKindCoHole, CoercionN, CoercionR, CoercionP, KindCoercion, MCoercion(..), MCoercionR, MCoercionN, @@ -61,7 +61,7 @@ TyCoFolder(..), foldTyCo, noView, -- * Sizes- typeSize, coercionSize, provSize,+ typeSize, typesSize, coercionSize, provSize, -- * Multiplicities Scaled(..), scaledMult, scaledThing, mapScaledType, Mult@@ -325,113 +325,6 @@ be careful not to let any variables escape -- thus the last premise of the rule above. -Note [Constraints in kinds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-Do we allow a type constructor to have a kind like- S :: Eq a => a -> Type--No, we do not. Doing so would mean would need a TyConApp like- S @k @(d :: Eq k) (ty :: k)- and we have no way to build, or decompose, evidence like- (d :: Eq k) at the type level.--But we admit one exception: equality. We /do/ allow, say,- MkT :: (a ~ b) => a -> b -> Type a b--Why? Because we can, without much difficulty. Moreover-we can promote a GADT data constructor (see TyCon-Note [Promoted data constructors]), like- data GT a b where- MkGT : a -> a -> GT a a-so programmers might reasonably expect to be able to-promote MkT as well.--How does this work?--* In GHC.Tc.Validity.checkConstraintsOK we reject kinds that- have constraints other than (a~b) and (a~~b).--* In Inst.tcInstInvisibleTyBinder we instantiate a call- of MkT by emitting- [W] co :: alpha ~# beta- and producing the elaborated term- MkT @alpha @beta (Eq# alpha beta co)- We don't generate a boxed "Wanted"; we generate only a- regular old /unboxed/ primitive-equality Wanted, and build- the box on the spot.--* How can we get such a MkT? By promoting a GADT-style data- constructor, written with an explicit equality constraint.- data T a b where- MkT :: (a~b) => a -> b -> T a b- See DataCon.mkPromotedDataCon- and Note [Promoted data constructors] in GHC.Core.TyCon--* We support both homogeneous (~) and heterogeneous (~~)- equality. (See Note [The equality types story]- in GHC.Builtin.Types.Prim for a primer on these equality types.)--* How do we prevent a MkT having an illegal constraint like- Eq a? We check for this at use-sites; see GHC.Tc.Gen.HsType.tcTyVar,- specifically dc_theta_illegal_constraint.--* Notice that nothing special happens if- K :: (a ~# b) => blah- because (a ~# b) is not a predicate type, and is never- implicitly instantiated. (Mind you, it's not clear how you- could creates a type constructor with such a kind.) See- Note [Types for coercions, predicates, and evidence]--* The existence of promoted MkT with an equality-constraint- argument is the (only) reason that the AnonTCB constructor- of TyConBndrVis carries an FunTyFlag.- For example, when we promote the data constructor- MkT :: forall a b. (a~b) => a -> b -> T a b- we get a PromotedDataCon with tyConBinders- Bndr (a :: Type) (NamedTCB Inferred)- Bndr (b :: Type) (NamedTCB Inferred)- Bndr (_ :: a ~ b) (AnonTCB FTF_C_T)- Bndr (_ :: a) (AnonTCB FTF_T_T))- Bndr (_ :: b) (AnonTCB FTF_T_T))--* One might reasonably wonder who *unpacks* these boxes once they are- made. After all, there is no type-level `case` construct. The- surprising answer is that no one ever does. Instead, if a GADT- constructor is used on the left-hand side of a type family equation,- that occurrence forces GHC to unify the types in question. For- example:-- data G a where- MkG :: G Bool-- type family F (x :: G a) :: a where- F MkG = False-- When checking the LHS `F MkG`, GHC sees the MkG constructor and then must- unify F's implicit parameter `a` with Bool. This succeeds, making the equation-- F Bool (MkG @Bool <Bool>) = False-- Note that we never need unpack the coercion. This is because type- family equations are *not* parametric in their kind variables. That- is, we could have just said-- type family H (x :: G a) :: a where- H _ = False-- The presence of False on the RHS also forces `a` to become Bool,- giving us-- H Bool _ = False-- The fact that any of this works stems from the lack of phase- separation between types and kinds (unlike the very present phase- separation between terms and types).-- Once we have the ability to pattern-match on types below top-level,- this will no longer cut it, but it seems fine for now.-- Note [Arguments to type constructors] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Because of kind polymorphism, in addition to type application we now@@ -1561,12 +1454,20 @@ = CoercionHole { ch_co_var :: CoVar -- See Note [CoercionHoles and coercion free variables] - , ch_ref :: IORef (Maybe Coercion)+ , ch_ref :: IORef (Maybe Coercion)++ , ch_hetero_kind :: Bool+ -- True <=> arises from a kind-level equality+ -- See Note [Equalities with incompatible kinds]+ -- in GHC.Tc.Solver.Equality, wrinkle (EIK2) } coHoleCoVar :: CoercionHole -> CoVar coHoleCoVar = ch_co_var +isHeteroKindCoHole :: CoercionHole -> Bool+isHeteroKindCoHole = ch_hetero_kind+ setCoHoleCoVar :: CoercionHole -> CoVar -> CoercionHole setCoHoleCoVar h cv = h { ch_co_var = cv } @@ -1577,7 +1478,8 @@ dataTypeOf _ = mkNoRepType "CoercionHole" instance Outputable CoercionHole where- ppr (CoercionHole { ch_co_var = cv }) = braces (ppr cv)+ ppr (CoercionHole { ch_co_var = cv, ch_hetero_kind = hk })+ = braces (ppr cv <> ppWhen hk (text "[hk]")) instance Uniquable CoercionHole where getUnique (CoercionHole { ch_co_var = cv }) = getUnique cv@@ -1893,14 +1795,19 @@ -- function is used only in reporting, not decision-making. typeSize :: Type -> Int+-- The size of the syntax tree of a type. No special treatment+-- for type synonyms or type families. typeSize (LitTy {}) = 1 typeSize (TyVarTy {}) = 1 typeSize (AppTy t1 t2) = typeSize t1 + typeSize t2 typeSize (FunTy _ _ t1 t2) = typeSize t1 + typeSize t2 typeSize (ForAllTy (Bndr tv _) t) = typeSize (varType tv) + typeSize t-typeSize (TyConApp _ ts) = 1 + sum (map typeSize ts)+typeSize (TyConApp _ ts) = 1 + typesSize ts typeSize (CastTy ty co) = typeSize ty + coercionSize co typeSize (CoercionTy co) = coercionSize co++typesSize :: [Type] -> Int+typesSize tys = foldr ((+) . typeSize) 0 tys coercionSize :: Coercion -> Int coercionSize (Refl ty) = typeSize ty
GHC/Core/TyCo/Rep.hs-boot view
@@ -8,6 +8,7 @@ data Type data Coercion+data FunSel data CoSel data UnivCoProvenance data TyLit
GHC/Core/TyCo/Subst.hs view
@@ -387,9 +387,9 @@ -- those variables should be in scope already extendTvSubstWithClone (Subst in_scope idenv tenv cenv) tv tv' = Subst (extendInScopeSet in_scope tv')- idenv- (extendVarEnv tenv tv (mkTyVarTy tv'))- cenv+ idenv+ (extendVarEnv tenv tv (mkTyVarTy tv'))+ cenv -- | Add a substitution from a 'CoVar' to a 'Coercion' to the 'Subst': -- you must ensure that the in-scope set satisfies
GHC/Core/TyCon.hs view
@@ -20,12 +20,13 @@ PromDataConInfo(..), TyConFlavour(..), -- * TyConBinder- TyConBinder, TyConBndrVis(..), TyConPiTyBinder,+ TyConBinder, TyConBndrVis(..), mkNamedTyConBinder, mkNamedTyConBinders, mkRequiredTyConBinder,- mkAnonTyConBinder, mkAnonTyConBinders, mkInvisAnonTyConBinder,+ mkAnonTyConBinder, mkAnonTyConBinders, tyConBinderForAllTyFlag, tyConBndrVisForAllTyFlag, isNamedTyConBinder,- isVisibleTyConBinder, isInvisibleTyConBinder, isVisibleTcbVis,+ isVisibleTyConBinder, isInvisibleTyConBinder,+ isVisibleTcbVis, isInvisSpecTcbVis, -- ** Field labels tyConFieldLabels, lookupTyConFieldLabel,@@ -123,7 +124,7 @@ tyConRepModOcc, -- * Primitive representations of Types- PrimRep(..), PrimElemRep(..),+ PrimRep(..), PrimElemRep(..), Levity(..), primElemRepToPrimRep, isVoidRep, isGcPtrRep, primRepSizeB,@@ -194,7 +195,7 @@ * Type synonym families, also known as "type functions", map directly onto the type functions in FC: - type family F a :: *+ type family F a :: Type type instance F Int = Bool ..etc... @@ -210,11 +211,11 @@ type instance F (F Int) = ... -- BAD! * Translation of type family decl:- type family F a :: *+ type family F a :: Type translates to a FamilyTyCon 'F', whose FamTyConFlav is OpenSynFamilyTyCon - type family G a :: * where+ type family G a :: Type where G Int = Bool G Bool = Char G a = ()@@ -229,7 +230,7 @@ See also Note [Wrappers for data instance tycons] in GHC.Types.Id.Make * Data type families are declared thus- data family T a :: *+ data family T a :: Type data instance T Int = T1 | T2 Bool Here T is the "family TyCon".@@ -321,7 +322,7 @@ should not think of a data family T as a *type function* at all, not even an injective one! We can't allow even injective type functions on the LHS of a type function:- type family injective G a :: *+ type family injective G a :: Type type instance F (G Int) = Bool is no good, even if G is injective, because consider type instance G Int = Bool@@ -427,7 +428,7 @@ * [Injectivity annotation] in GHC.Hs.Decls * [Renaming injectivity annotation] in GHC.Rename.Module * [Verifying injectivity annotation] in GHC.Core.FamInstEnv- * [Type inference for type families with injectivity] in GHC.Tc.Solver.Interact+ * [Type inference for type families with injectivity] in GHC.Tc.Solver.Equality Note [Sharing nullary TyConApps] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -445,38 +446,29 @@ ************************************************************************ * *- TyConBinder, TyConPiTyBinder+ TyConBinder * * ************************************************************************ -} type TyConBinder = VarBndr TyVar TyConBndrVis-type TyConPiTyBinder = VarBndr TyCoVar TyConBndrVis- -- Only PromotedDataCon has TyConPiTyBinders- -- See Note [Promoted GADT data constructors] data TyConBndrVis- = NamedTCB ForAllTyFlag- | AnonTCB FunTyFlag+ = NamedTCB ForAllTyFlag -- ^ A named, forall-bound variable (invisible or not)+ | AnonTCB -- ^ an ordinary, visible type argument instance Outputable TyConBndrVis where ppr (NamedTCB flag) = ppr flag- ppr (AnonTCB af) = ppr af+ ppr AnonTCB = text "AnonTCB" mkAnonTyConBinder :: TyVar -> TyConBinder -- Make a visible anonymous TyCon binder mkAnonTyConBinder tv = assert (isTyVar tv) $- Bndr tv (AnonTCB visArgTypeLike)+ Bndr tv AnonTCB mkAnonTyConBinders :: [TyVar] -> [TyConBinder] mkAnonTyConBinders tvs = map mkAnonTyConBinder tvs -mkInvisAnonTyConBinder :: TyVar -> TyConBinder--- Make an /invisible/ anonymous TyCon binder--- Not used much-mkInvisAnonTyConBinder tv = assert (isTyVar tv) $- Bndr tv (AnonTCB invisArgTypeLike)- mkNamedTyConBinder :: ForAllTyFlag -> TyVar -> TyConBinder -- The odd argument order supports currying mkNamedTyConBinder vis tv = assert (isTyVar tv) $@@ -499,10 +491,8 @@ tyConBinderForAllTyFlag (Bndr _ vis) = tyConBndrVisForAllTyFlag vis tyConBndrVisForAllTyFlag :: TyConBndrVis -> ForAllTyFlag-tyConBndrVisForAllTyFlag (NamedTCB vis) = vis-tyConBndrVisForAllTyFlag (AnonTCB af) -- See Note [AnonTCB with constraint arg]- | isVisibleFunArg af = Required- | otherwise = Inferred+tyConBndrVisForAllTyFlag (NamedTCB vis) = vis+tyConBndrVisForAllTyFlag AnonTCB = Required isNamedTyConBinder :: TyConBinder -> Bool -- Identifies kind variables@@ -517,8 +507,12 @@ isVisibleTcbVis :: TyConBndrVis -> Bool isVisibleTcbVis (NamedTCB vis) = isVisibleForAllTyFlag vis-isVisibleTcbVis (AnonTCB af) = isVisibleFunArg af+isVisibleTcbVis AnonTCB = True +isInvisSpecTcbVis :: TyConBndrVis -> Bool+isInvisSpecTcbVis (NamedTCB Specified) = True+isInvisSpecTcbVis _ = False+ isInvisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool -- Works for IfaceTyConBinder too isInvisibleTyConBinder tcb = not (isVisibleTyConBinder tcb)@@ -530,7 +524,7 @@ where mk :: TyConBinder -> Kind -> Kind mk (Bndr tv (NamedTCB vis)) k = mkForAllTy (Bndr tv vis) k- mk (Bndr tv (AnonTCB af)) k = mkNakedFunTy af (varType tv) k+ mk (Bndr tv AnonTCB) k = mkNakedFunTy FTF_T_T (varType tv) k -- mkNakedFunTy: see Note [Naked FunTy] in GHC.Builtin.Types -- | (mkTyConTy tc) returns (TyConApp tc [])@@ -549,9 +543,7 @@ mk_binder (Bndr tv tc_vis) = mkTyVarBinder vis tv where vis = case tc_vis of- AnonTCB af -- Note [AnonTCB with constraint arg]- | isInvisibleFunArg af -> InferredSpec- | otherwise -> SpecifiedSpec+ AnonTCB -> SpecifiedSpec NamedTCB Required -> SpecifiedSpec NamedTCB (Invisible vis) -> vis @@ -561,35 +553,7 @@ = [ tv | Bndr tv vis <- tyConBinders tc , isVisibleTcbVis vis ] -{- Note [AnonTCB with constraint arg]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-It's pretty rare to have an (AnonTCB af) binder with af=FTF_C_T or FTF_C_C.-The only way it can occur is through equality constraints in kinds. These-can arise in one of two ways:--* In a PromotedDataCon whose kind has an equality constraint:-- 'MkT :: forall a b. (a~b) => blah-- See Note [Constraints in kinds] in GHC.Core.TyCo.Rep, and- Note [Promoted data constructors] in this module.--* In a data type whose kind has an equality constraint, as in the- following example from #12102:-- data T :: forall a. (IsTypeLit a ~ 'True) => a -> Type--When mapping an (AnonTCB FTF_C_x) to an ForAllTyFlag, in-tyConBndrVisForAllTyFlag, we use "Inferred" to mean "the user cannot-specify this arguments, even with visible type/kind application;-instead the type checker must fill it in.--We map (AnonTCB FTF_T_x) to Required, of course: the user must-provide it. It would be utterly wrong to do this for constraint-arguments, which is why AnonTCB must have the FunTyFlag in-the first place.--Note [Building TyVarBinders from TyConBinders]+{- Note [Building TyVarBinders from TyConBinders] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We sometimes need to build the quantified type of a value from the TyConBinders of a type or class. For that we need not@@ -613,21 +577,21 @@ information right; and that info is in the TyConBinders. Here is an example: - data App a b = MkApp (a b) -- App :: forall {k}. (k->*) -> k -> *+ data App a b = MkApp (a b) -- App :: forall {k}. (k->Type) -> k -> Type The TyCon has - tyConTyBinders = [ Named (Bndr (k :: *) Inferred), Anon (k->*), Anon k ]+ tyConTyBinders = [ Named (Bndr (k :: Type) Inferred), Anon (k->Type), Anon k ] The TyConBinders for App line up with App's kind, given above. But the DataCon MkApp has the type- MkApp :: forall {k} (a:k->*) (b:k). a b -> App k a b+ MkApp :: forall {k} (a:k->Type) (b:k). a b -> App k a b That is, its ForAllTyBinders should be - dataConUnivTyVarBinders = [ Bndr (k:*) Inferred- , Bndr (a:k->*) Specified+ dataConUnivTyVarBinders = [ Bndr (k:Type) Inferred+ , Bndr (a:k->Type) Specified , Bndr (b:k) Specified ] So tyConTyVarBinders converts TyCon's TyConBinders into TyVarBinders:@@ -645,7 +609,7 @@ {- Note [The binders/kind/arity fields of a TyCon] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All TyCons have this group of fields- tyConBinders :: [TyConBinder/TyConPiTyBinder]+ tyConBinders :: [TyConBinder] tyConResKind :: Kind tyConTyVars :: [TyVar] -- Cached = binderVars tyConBinders -- NB: Currently (Aug 2018), TyCons that own this@@ -656,13 +620,13 @@ They fit together like so: -* tyConBinders gives the telescope of type/coercion variables on the LHS of the+* tyConBinders gives the telescope of type variables on the LHS of the type declaration. For example: type App a (b :: k) = a b - tyConBinders = [ Bndr (k::*) (NamedTCB Inferred)- , Bndr (a:k->*) AnonTCB+ tyConBinders = [ Bndr (k::Type) (NamedTCB Inferred)+ , Bndr (a:k->Type) AnonTCB , Bndr (b:k) AnonTCB ] Note that there are three binders here, including the@@ -673,17 +637,17 @@ * See Note [VarBndrs, ForAllTyBinders, TyConBinders, and visibility] in GHC.Core.TyCo.Rep for what the visibility flag means. -* Each TyConBinder tyConBinders has a TyVar (sometimes it is TyCoVar), and+* Each TyConBinder in tyConBinders has a TyVar, and that TyVar may scope over some other part of the TyCon's definition. Eg type T a = a -> a we have- tyConBinders = [ Bndr (a:*) AnonTCB ]+ tyConBinders = [ Bndr (a:Type) AnonTCB ] synTcRhs = a -> a So the 'a' scopes over the synTcRhs * From the tyConBinders and tyConResKind we can get the tyConKind E.g for our App example:- App :: forall k. (k->*) -> k -> *+ App :: forall k. (k->Type) -> k -> Type We get a 'forall' in the kind for each NamedTCB, and an arrow for each AnonTCB@@ -745,12 +709,12 @@ ppr (Bndr v bi) = ppr bi <+> parens (pprBndr LetBind v) instance Binary TyConBndrVis where- put_ bh (AnonTCB af) = do { putByte bh 0; put_ bh af }+ put_ bh AnonTCB = do { putByte bh 0 } put_ bh (NamedTCB vis) = do { putByte bh 1; put_ bh vis } get bh = do { h <- getByte bh ; case h of- 0 -> do { af <- get bh; return (AnonTCB af) }+ 0 -> return AnonTCB _ -> do { vis <- get bh; return (NamedTCB vis) } } @@ -766,15 +730,15 @@ -- things such as: -- -- 1) Data declarations: @data Foo = ...@ creates the @Foo@ type constructor of--- kind @*@+-- kind @Type@ -- -- 2) Type synonyms: @type Foo = ...@ creates the @Foo@ type constructor -- -- 3) Newtypes: @newtype Foo a = MkFoo ...@ creates the @Foo@ type constructor--- of kind @* -> *@+-- of kind @Type -> Type@ -- -- 4) Class declarations: @class Foo where@ creates the @Foo@ type constructor--- of kind @*@+-- of kind @Constraint@ -- -- This data type also encodes a number of primitive, built in type constructors -- such as those for function and tuple types.@@ -874,11 +838,17 @@ -- any type synonym families (data families -- are fine), again after expanding any -- nested synonyms- synIsForgetful :: Bool -- True <= at least one argument is not mentioned++ synIsForgetful :: Bool, -- True <= at least one argument is not mentioned -- in the RHS (or is mentioned only under -- forgetful synonyms) -- Test is conservative, so True does not guarantee- -- forgetfulness.+ -- forgetfulness. False conveys definite information+ -- (definitely not forgetful); True is always safe.++ synIsConcrete :: Bool -- True <= If 'tys' are concrete then the expansion+ -- of (S tys) is definitely concrete+ -- But False is always safe } -- | Represents families (both type and data)@@ -915,14 +885,17 @@ } -- | Represents promoted data constructor.+ -- The kind of a promoted data constructor is the *wrapper* type of+ -- the original data constructor. This type must not have constraints+ -- (as checked in GHC.Tc.Gen.HsType.tcTyVar). | PromotedDataCon { -- See Note [Promoted data constructors] dataCon :: DataCon, -- ^ Corresponding data constructor tcRepName :: TyConRepName, promDcInfo :: PromDataConInfo -- ^ See comments with 'PromDataConInfo' } - -- | These exist only during type-checking. See Note [How TcTyCons work]- -- in "GHC.Tc.TyCl"+ -- | These exist only during type-checking.+ -- See Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon] in "GHC.Tc.TyCl" | TcTyCon { -- NB: the tyConArity of a TcTyCon must match -- the number of Required (positional, user-specified)@@ -937,7 +910,7 @@ tctc_is_poly :: Bool, -- ^ Is this TcTyCon already generalized? -- Used only to make zonking more efficient - tctc_flavour :: TyConFlavour+ tctc_flavour :: TyConFlavour TyCon -- ^ What sort of 'TyCon' this represents. } @@ -956,18 +929,7 @@ * tyConArity = length required_tvs tcTyConScopedTyVars are used only for MonoTcTyCons, not PolyTcTyCons.-See Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon] in GHC.Tc.Utils.TcType.--Note [Promoted GADT data constructors]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Any promoted GADT data constructor will have a type with equality-constraints in its type; e.g.- K :: forall a b. (a ~# [b]) => a -> b -> T a--So, when promoted to become a type constructor, the tyConBinders-will include CoVars. That is why we use [TyConPiTyBinder] for the-tyconBinders field. TyConPiTyBinder is a synonym for TyConBinder,-but with the clue that the binder can be a CoVar not just a TyVar.+See Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon] in GHC.Tc.TyCl Note [Representation-polymorphic TyCons] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1301,16 +1263,16 @@ -- -- These are introduced by either a top level declaration: --- -- > data family T a :: *+ -- > data family T a :: Type -- -- Or an associated data type declaration, within a class declaration: -- -- > class C a b where- -- > data T b :: *+ -- > data T b :: Type DataFamilyTyCon TyConRepName - -- | An open type synonym family e.g. @type family F x y :: * -> *@+ -- | An open type synonym family e.g. @type family F x y :: Type -> Type@ | OpenSynFamilyTyCon -- | A closed type synonym family e.g.@@ -1574,8 +1536,7 @@ -- "GHC.Types.RepType" and Note [VoidRep] in "GHC.Types.RepType". data PrimRep = VoidRep- | LiftedRep- | UnliftedRep -- ^ Unlifted pointer+ | BoxedRep {-# UNPACK #-} !(Maybe Levity) -- ^ Boxed, heap value | Int8Rep -- ^ Signed, 8-bit value | Int16Rep -- ^ Signed, 16-bit value | Int32Rep -- ^ Signed, 32-bit value@@ -1586,7 +1547,7 @@ | Word32Rep -- ^ Unsigned, 32 bit value | Word64Rep -- ^ Unsigned, 64 bit value | WordRep -- ^ Unsigned, word-sized value- | AddrRep -- ^ A pointer, but /not/ to a Haskell value (use '(Un)liftedRep')+ | AddrRep -- ^ A pointer, but /not/ to a Haskell value (use 'BoxedRep') | FloatRep | DoubleRep | VecRep Int PrimElemRep -- ^ A vector@@ -1613,42 +1574,47 @@ instance Binary PrimRep where put_ bh VoidRep = putByte bh 0- put_ bh LiftedRep = putByte bh 1- put_ bh UnliftedRep = putByte bh 2- put_ bh Int8Rep = putByte bh 3- put_ bh Int16Rep = putByte bh 4- put_ bh Int32Rep = putByte bh 5- put_ bh Int64Rep = putByte bh 6- put_ bh IntRep = putByte bh 7- put_ bh Word8Rep = putByte bh 8- put_ bh Word16Rep = putByte bh 9- put_ bh Word32Rep = putByte bh 10- put_ bh Word64Rep = putByte bh 11- put_ bh WordRep = putByte bh 12- put_ bh AddrRep = putByte bh 13- put_ bh FloatRep = putByte bh 14- put_ bh DoubleRep = putByte bh 15- put_ bh (VecRep n per) = putByte bh 16 *> put_ bh n *> put_ bh per+ put_ bh (BoxedRep ml) = case ml of+ -- cheaper storage of the levity than using+ -- the Binary (Maybe Levity) instance+ Nothing -> putByte bh 1+ Just Lifted -> putByte bh 2+ Just Unlifted -> putByte bh 3+ put_ bh Int8Rep = putByte bh 4+ put_ bh Int16Rep = putByte bh 5+ put_ bh Int32Rep = putByte bh 6+ put_ bh Int64Rep = putByte bh 7+ put_ bh IntRep = putByte bh 8+ put_ bh Word8Rep = putByte bh 9+ put_ bh Word16Rep = putByte bh 10+ put_ bh Word32Rep = putByte bh 11+ put_ bh Word64Rep = putByte bh 12+ put_ bh WordRep = putByte bh 13+ put_ bh AddrRep = putByte bh 14+ put_ bh FloatRep = putByte bh 15+ put_ bh DoubleRep = putByte bh 16+ put_ bh (VecRep n per) = putByte bh 17 *> put_ bh n *> put_ bh per get bh = do h <- getByte bh case h of 0 -> pure VoidRep- 1 -> pure LiftedRep- 2 -> pure UnliftedRep- 3 -> pure Int8Rep- 4 -> pure Int16Rep- 5 -> pure Int32Rep- 6 -> pure Int64Rep- 7 -> pure IntRep- 8 -> pure Word8Rep- 9 -> pure Word16Rep- 10 -> pure Word32Rep- 11 -> pure Word64Rep- 12 -> pure WordRep- 13 -> pure AddrRep- 14 -> pure FloatRep- 15 -> pure DoubleRep- 16 -> VecRep <$> get bh <*> get bh+ 1 -> pure $ BoxedRep Nothing+ 2 -> pure $ BoxedRep (Just Lifted)+ 3 -> pure $ BoxedRep (Just Unlifted)+ 4 -> pure Int8Rep+ 5 -> pure Int16Rep+ 6 -> pure Int32Rep+ 7 -> pure Int64Rep+ 8 -> pure IntRep+ 9 -> pure Word8Rep+ 10 -> pure Word16Rep+ 11 -> pure Word32Rep+ 12 -> pure Word64Rep+ 13 -> pure WordRep+ 14 -> pure AddrRep+ 15 -> pure FloatRep+ 16 -> pure DoubleRep+ 17 -> VecRep <$> get bh <*> get bh _ -> pprPanic "Binary:PrimRep" (int (fromIntegral h)) instance Binary PrimElemRep where@@ -1660,9 +1626,8 @@ isVoidRep _other = False isGcPtrRep :: PrimRep -> Bool-isGcPtrRep LiftedRep = True-isGcPtrRep UnliftedRep = True-isGcPtrRep _ = False+isGcPtrRep (BoxedRep _) = True+isGcPtrRep _ = False -- A PrimRep is compatible with another iff one can be coerced to the other. -- See Note [Bad unsafe coercion] in GHC.Core.Lint for when are two types coercible.@@ -1703,8 +1668,7 @@ FloatRep -> fLOAT_SIZE DoubleRep -> dOUBLE_SIZE AddrRep -> platformWordSizeInBytes platform- LiftedRep -> platformWordSizeInBytes platform- UnliftedRep -> platformWordSizeInBytes platform+ BoxedRep _ -> platformWordSizeInBytes platform VoidRep -> 0 (VecRep len rep) -> len * primElemRepSizeB platform rep @@ -1886,15 +1850,13 @@ -- 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 "GHC.Tc.TyCl".+-- See Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon] in "GHC.Tc.TyCl" mkTcTyCon :: Name -> [TyConBinder] -> Kind -- ^ /result/ kind only -> [(Name,TcTyVar)] -- ^ Scoped type variables;- -- see Note [How TcTyCons work] in GHC.Tc.TyCl -> Bool -- ^ Is this TcTyCon generalised already?- -> TyConFlavour -- ^ What sort of 'TyCon' this represents+ -> TyConFlavour TyCon -- ^ What sort of 'TyCon' this represents -> TyCon mkTcTyCon name binders res_kind scoped_tvs poly flav = mkTyCon name binders res_kind (constRoles binders Nominal) $@@ -1922,13 +1884,17 @@ -- | Create a type synonym 'TyCon' mkSynonymTyCon :: Name -> [TyConBinder] -> Kind -- ^ /result/ kind- -> [Role] -> Type -> Bool -> Bool -> Bool -> TyCon-mkSynonymTyCon name binders res_kind roles rhs is_tau is_fam_free is_forgetful+ -> [Role] -> Type+ -> Bool -> Bool -> Bool -> Bool+ -> TyCon+mkSynonymTyCon name binders res_kind roles rhs is_tau+ is_fam_free is_forgetful is_concrete = mkTyCon name binders res_kind roles $ SynonymTyCon { synTcRhs = rhs , synIsTau = is_tau , synIsFamFree = is_fam_free- , synIsForgetful = is_forgetful }+ , synIsForgetful = is_forgetful+ , synIsConcrete = is_concrete } -- | Create a type family 'TyCon' mkFamilyTyCon :: Name -> [TyConBinder] -> Kind -- ^ /result/ kind@@ -1946,7 +1912,7 @@ -- as the data constructor itself; when we pretty-print -- the TyCon we add a quote; see the Outputable TyCon instance mkPromotedDataCon :: DataCon -> Name -> TyConRepName- -> [TyConPiTyBinder] -> Kind -> [Role]+ -> [TyConBinder] -> Kind -> [Role] -> PromDataConInfo -> TyCon mkPromotedDataCon con name rep_name binders res_kind roles rep_info = mkTyCon name binders res_kind roles $@@ -2018,18 +1984,17 @@ -- (where r is the role passed in): -- If (T a1 b1 c1) ~r (T a2 b2 c2), then (a1 ~r1 a2), (b1 ~r2 b2), and (c1 ~r3 c2) -- (where r1, r2, and r3, are the roles given by tyConRolesX tc r)--- See also Note [Decomposing TyConApp equalities] in "GHC.Tc.Solver.Canonical"+-- See also Note [Decomposing TyConApp equalities] in "GHC.Tc.Solver.Equality" isInjectiveTyCon :: TyCon -> Role -> Bool isInjectiveTyCon (TyCon { tyConDetails = details }) role = go details role where go _ Phantom = True -- Vacuously; (t1 ~P t2) holds for all t1, t2! go (AlgTyCon {}) Nominal = True- go (AlgTyCon {algTcRhs = rhs}) Representational- = isGenInjAlgRhs rhs+ go (AlgTyCon {algTcRhs = rhs}) Representational = isGenInjAlgRhs rhs go (SynonymTyCon {}) _ = False go (FamilyTyCon { famTcFlav = DataFamilyTyCon _ })- Nominal = True+ Nominal = True go (FamilyTyCon { famTcInj = Injective inj }) Nominal = and inj go (FamilyTyCon {}) _ = False go (PrimTyCon {}) _ = True@@ -2037,13 +2002,17 @@ go (TcTyCon {}) _ = True -- Reply True for TcTyCon to minimise knock on type errors- -- See Note [How TcTyCons work] item (1) in GHC.Tc.TyCl+ -- See (W1) in Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon] in GHC.Tc.TyCl -- | 'isGenerativeTyCon' is true of 'TyCon's for which this property holds -- (where r is the role passed in): -- If (T tys ~r t), then (t's head ~r T).--- See also Note [Decomposing TyConApp equalities] in "GHC.Tc.Solver.Canonical"+-- See also Note [Decomposing TyConApp equalities] in "GHC.Tc.Solver.Equality"+--+-- NB: at Nominal role, isGenerativeTyCon is simple:+-- isGenerativeTyCon tc Nominal+-- = not (isTypeFamilyTyCon tc || isSynonymTyCon tc) isGenerativeTyCon :: TyCon -> Role -> Bool isGenerativeTyCon tc@(TyCon { tyConDetails = details }) role = go role details@@ -2167,13 +2136,13 @@ _ -> False | otherwise = False --- | Is this a synonym 'TyCon' that can have may have further instances appear?+-- | Is this a type family 'TyCon' (whether open or closed)? isTypeFamilyTyCon :: TyCon -> Bool isTypeFamilyTyCon (TyCon { tyConDetails = details }) | FamilyTyCon { famTcFlav = flav } <- details = not (isDataFamFlav flav) | otherwise = False --- | Is this a synonym 'TyCon' that can have may have further instances appear?+-- | Is this a data family 'TyCon'? isDataFamilyTyCon :: TyCon -> Bool isDataFamilyTyCon (TyCon { tyConDetails = details }) | FamilyTyCon { famTcFlav = flav } <- details = isDataFamFlav flav@@ -2194,14 +2163,14 @@ isBuiltInSynFamTyCon_maybe :: TyCon -> Maybe BuiltInSynFamily isBuiltInSynFamTyCon_maybe (TyCon { tyConDetails = details })- | FamilyTyCon {famTcFlav = BuiltInSynFamTyCon ops } <- details = Just ops- | otherwise = Nothing+ | FamilyTyCon {famTcFlav = BuiltInSynFamTyCon ops} <- details = Just ops+ | otherwise = Nothing -- | Extract type variable naming the result of injective type family tyConFamilyResVar_maybe :: TyCon -> Maybe Name tyConFamilyResVar_maybe (TyCon { tyConDetails = details }) | FamilyTyCon {famTcResVar = res} <- details = res- | otherwise = Nothing+ | otherwise = Nothing -- | @'tyConInjectivityInfo' tc@ returns @'Injective' is@ if @tc@ is an -- injective tycon (where @is@ states for which 'tyConBinders' @tc@ is@@ -2227,12 +2196,6 @@ tyConAssoc_maybe :: TyCon -> Maybe TyCon tyConAssoc_maybe = tyConFlavourAssoc_maybe . tyConFlavour --- | Get the enclosing class TyCon (if there is one) for the given TyConFlavour-tyConFlavourAssoc_maybe :: TyConFlavour -> Maybe TyCon-tyConFlavourAssoc_maybe (DataFamilyFlavour mb_parent) = mb_parent-tyConFlavourAssoc_maybe (OpenTypeFamilyFlavour mb_parent) = mb_parent-tyConFlavourAssoc_maybe _ = Nothing- -- The unit tycon didn't used to be classed as a tuple tycon -- but I thought that was silly so I've undone it -- If it can't be for some reason, it should be a AlgTyCon@@ -2403,30 +2366,24 @@ | TcTyCon{} <- details = False | PromotedDataCon{} <- details = pprPanic "tcHasFixedRuntimeRep datacon" (ppr tc) --- | Is this 'TyCon' concrete (i.e. not a synonym/type family)?---+-- | Is this 'TyCon' concrete?+-- More specifically, if 'tys' are all concrete, is (T tys) concrete?+-- (for synonyms this requires us to look at the RHS) -- Used for representation polymorphism checks.+-- See Note [Concrete types] in GHC.Tc.Utils.Concrete isConcreteTyCon :: TyCon -> Bool-isConcreteTyCon = isConcreteTyConFlavour . tyConFlavour+isConcreteTyCon tc@(TyCon { tyConDetails = details })+ = case details of+ AlgTyCon {} -> True -- Includes AbstractTyCon+ PrimTyCon {} -> True+ PromotedDataCon {} -> True+ FamilyTyCon {} -> False --- | Is this 'TyConFlavour' concrete (i.e. not a synonym/type family)?------ Used for representation polymorphism checks.-isConcreteTyConFlavour :: TyConFlavour -> Bool-isConcreteTyConFlavour = \case- ClassFlavour -> True- TupleFlavour {} -> True- SumFlavour -> True- DataTypeFlavour -> True- NewtypeFlavour -> True- AbstractTypeFlavour -> True -- See Note [Concrete types] in GHC.Tc.Utils.Concrete- DataFamilyFlavour {} -> False- OpenTypeFamilyFlavour {} -> False- ClosedTypeFamilyFlavour -> False- TypeSynonymFlavour -> False- BuiltInTypeFlavour -> True- PromotedDataConFlavour -> True+ SynonymTyCon { synIsConcrete = is_conc } -> is_conc + TcTyCon {} -> pprPanic "isConcreteTyCon" (ppr tc)+ -- isConcreteTyCon is only used on "real" tycons+ {- ----------------------------------------------- -- TcTyCon@@ -2774,43 +2731,7 @@ then text "[tc]" else empty --- | Paints a picture of what a 'TyCon' represents, in broad strokes.--- This is used towards more informative error messages.-data TyConFlavour- = ClassFlavour- | TupleFlavour Boxity- | SumFlavour- | DataTypeFlavour- | NewtypeFlavour- | AbstractTypeFlavour- | DataFamilyFlavour (Maybe TyCon) -- Just tc <=> (tc == associated class)- | OpenTypeFamilyFlavour (Maybe TyCon) -- Just tc <=> (tc == associated class)- | ClosedTypeFamilyFlavour- | TypeSynonymFlavour- | BuiltInTypeFlavour -- ^ e.g., the @(->)@ 'TyCon'.- | PromotedDataConFlavour- deriving Eq--instance Outputable TyConFlavour where- ppr = text . go- where- go ClassFlavour = "class"- go (TupleFlavour boxed) | isBoxed boxed = "tuple"- | otherwise = "unboxed tuple"- go SumFlavour = "unboxed sum"- go DataTypeFlavour = "data type"- go NewtypeFlavour = "newtype"- go AbstractTypeFlavour = "abstract type"- go (DataFamilyFlavour (Just _)) = "associated data family"- go (DataFamilyFlavour Nothing) = "data family"- go (OpenTypeFamilyFlavour (Just _)) = "associated type family"- go (OpenTypeFamilyFlavour Nothing) = "type family"- go ClosedTypeFamilyFlavour = "type family"- go TypeSynonymFlavour = "type synonym"- go BuiltInTypeFlavour = "built-in type"- go PromotedDataConFlavour = "promoted data constructor"--tyConFlavour :: TyCon -> TyConFlavour+tyConFlavour :: TyCon -> TyConFlavour TyCon tyConFlavour (TyCon { tyConDetails = details }) | AlgTyCon { algTcFlavour = parent, algTcRhs = rhs } <- details = case parent of@@ -2825,8 +2746,8 @@ | FamilyTyCon { famTcFlav = flav, famTcParent = parent } <- details = case flav of- DataFamilyTyCon{} -> DataFamilyFlavour parent- OpenSynFamilyTyCon -> OpenTypeFamilyFlavour parent+ DataFamilyTyCon{} -> OpenFamilyFlavour IAmData parent+ OpenSynFamilyTyCon -> OpenFamilyFlavour IAmType parent ClosedSynFamilyTyCon{} -> ClosedTypeFamilyFlavour AbstractClosedSynFamilyTyCon -> ClosedTypeFamilyFlavour BuiltInSynFamTyCon{} -> ClosedTypeFamilyFlavour@@ -2837,24 +2758,22 @@ | TcTyCon { tctc_flavour = flav } <-details = flav -- | Can this flavour of 'TyCon' appear unsaturated?-tcFlavourMustBeSaturated :: TyConFlavour -> Bool+tcFlavourMustBeSaturated :: TyConFlavour tc -> Bool tcFlavourMustBeSaturated ClassFlavour = False tcFlavourMustBeSaturated DataTypeFlavour = False tcFlavourMustBeSaturated NewtypeFlavour = False-tcFlavourMustBeSaturated DataFamilyFlavour{} = False tcFlavourMustBeSaturated TupleFlavour{} = False tcFlavourMustBeSaturated SumFlavour = False tcFlavourMustBeSaturated AbstractTypeFlavour {} = False tcFlavourMustBeSaturated BuiltInTypeFlavour = False tcFlavourMustBeSaturated PromotedDataConFlavour = False+tcFlavourMustBeSaturated (OpenFamilyFlavour td _)= case td of { IAmData -> False; IAmType -> True } tcFlavourMustBeSaturated TypeSynonymFlavour = True-tcFlavourMustBeSaturated OpenTypeFamilyFlavour{} = True tcFlavourMustBeSaturated ClosedTypeFamilyFlavour = True -- | Is this flavour of 'TyCon' an open type family or a data family?-tcFlavourIsOpen :: TyConFlavour -> Bool-tcFlavourIsOpen DataFamilyFlavour{} = True-tcFlavourIsOpen OpenTypeFamilyFlavour{} = True+tcFlavourIsOpen :: TyConFlavour tc -> Bool+tcFlavourIsOpen OpenFamilyFlavour{} = True tcFlavourIsOpen ClosedTypeFamilyFlavour = False tcFlavourIsOpen ClassFlavour = False tcFlavourIsOpen DataTypeFlavour = False
GHC/Core/TyCon/Env.hs view
@@ -100,7 +100,7 @@ delFromTyConEnv x y = delFromUFM x y delListFromTyConEnv x y = delListFromUFM x y filterTyConEnv x y = filterUFM x y-anyTyConEnv f x = foldUFM ((||) . f) False x+anyTyConEnv f x = nonDetFoldUFM ((||) . f) False x disjointTyConEnv x y = disjointUFM x y lookupTyConEnv_NF env n = expectJust "lookupTyConEnv_NF" (lookupTyConEnv env n)
GHC/Core/Type.hs view
@@ -3,7 +3,7 @@ -- -- Type - public interface -{-# LANGUAGE FlexibleContexts, PatternSynonyms, ViewPatterns, MultiWayIf #-}+{-# LANGUAGE FlexibleContexts, PatternSynonyms, ViewPatterns, MultiWayIf, RankNTypes #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Main functions for manipulating types and type-related things@@ -76,6 +76,7 @@ mkCastTy, mkCoercionTy, splitCastTy_maybe, + ErrorMsgType, userTypeError_maybe, pprUserTypeErrorTy, coAxNthLHS,@@ -110,6 +111,7 @@ isTyVarTy, isFunTy, isCoercionTy, isCoercionTy_maybe, isForAllTy, isForAllTy_ty, isForAllTy_co,+ isForAllTy_invis_ty, isPiTy, isTauTy, isFamFreeTy, isCoVarType, isAtomicTy, @@ -132,8 +134,9 @@ isUnliftedType, isBoxedType, isUnboxedTupleType, isUnboxedSumType, kindBoxedRepLevity_maybe, mightBeLiftedType, mightBeUnliftedType,+ definitelyLiftedType, definitelyUnliftedType, isAlgType, isDataFamilyAppType,- isPrimitiveType, isStrictType,+ isPrimitiveType, isStrictType, isTerminatingType, isLevityTy, isLevityVar, isRuntimeRepTy, isRuntimeRepVar, isRuntimeRepKindedTy, dropRuntimeRepArgs,@@ -183,7 +186,7 @@ seqType, seqTypes, -- * Other views onto Types- coreView,+ coreView, coreFullView, rewriterView, tyConsOfType, @@ -232,7 +235,7 @@ -- * Kinds isTYPEorCONSTRAINT,- isConcrete, isFixedRuntimeRepKind,+ isConcreteType, isFixedRuntimeRepKind, ) where import GHC.Prelude@@ -272,7 +275,7 @@ , mkTyConAppCo, mkAppCo , mkForAllCo, mkFunCo2, mkAxiomInstCo, mkUnivCo , mkSymCo, mkTransCo, mkSelCo, mkLRCo, mkInstCo- , mkKindCo, mkSubCo, mkFunCo1+ , mkKindCo, mkSubCo, mkFunCo, funRole , decomposePiCos, coercionKind , coercionRKind, coercionType , isReflexiveCo, seqCo@@ -360,6 +363,19 @@ ************************************************************************ -} +rewriterView :: Type -> Maybe Type+-- Unwrap a type synonym only when either:+-- The type synonym is forgetful, or+-- the type synonym mentions a type family in its expansion+-- See Note [Rewriting synonyms]+{-# INLINE rewriterView #-}+rewriterView (TyConApp tc tys)+ | isTypeSynonymTyCon tc+ , isForgetfulSynTyCon tc || not (isFamFreeTyCon tc)+ = expandSynTyConApp_maybe tc tys+rewriterView _other+ = Nothing+ coreView :: Type -> Maybe Type -- ^ This function strips off the /top layer only/ of a type synonym -- application (if any) its underlying representation type.@@ -401,7 +417,11 @@ expandSynTyConApp_maybe tc arg_tys | Just (tvs, rhs) <- synTyConDefn_maybe tc , arg_tys `saturates` tyConArity tc- = Just (expand_syn tvs rhs arg_tys)+ = Just $! (expand_syn tvs rhs arg_tys)+ -- Why strict application? Because every client of this function will evaluat+ -- that (expand_syn ...) thunk, so it's more efficient not to build a thunk.+ -- Mind you, this function is always INLINEd, so the client context is probably+ -- enough to avoid thunk construction and so the $! is just belt-and-braces. | otherwise = Nothing @@ -686,8 +706,8 @@ -- * False of type variables, type family applications, -- and of other reps such as @IntRep :: RuntimeRep@. isLiftedRuntimeRep :: RuntimeRepType -> Bool-isLiftedRuntimeRep rep =- runtimeRepLevity_maybe rep == Just Lifted+isLiftedRuntimeRep rep+ = runtimeRepLevity_maybe rep == Just Lifted -- | Check whether a type of kind 'RuntimeRep' is unlifted. --@@ -770,7 +790,7 @@ -- expands to `Boxed lev` and returns `Nothing` otherwise. -- -- Types with this runtime rep are represented by pointers on the GC'd heap.-isBoxedRuntimeRep_maybe :: RuntimeRepType -> Maybe Type+isBoxedRuntimeRep_maybe :: RuntimeRepType -> Maybe LevityType isBoxedRuntimeRep_maybe rep | Just (rr_tc, args) <- splitRuntimeRep_maybe rep , rr_tc `hasKey` boxedRepDataConKey@@ -779,9 +799,10 @@ | otherwise = Nothing --- | Check whether a type of kind 'RuntimeRep' is lifted, unlifted, or unknown.+-- | Check whether a type (usually of kind 'RuntimeRep') is lifted, unlifted,+-- or unknown. Returns Nothing if the type isn't of kind 'RuntimeRep'. ----- `isLiftedRuntimeRep rr` returns:+-- `runtimeRepLevity_maybe rr` returns: -- -- * `Just Lifted` if `rr` is `LiftedRep :: RuntimeRep` -- * `Just Unlifted` if `rr` is definitely unlifted, e.g. `IntRep`@@ -793,7 +814,9 @@ if (rr_tc `hasKey` boxedRepDataConKey) then case args of [lev] -> levityType_maybe lev- _ -> pprPanic "runtimeRepLevity_maybe" (ppr rep)+ _ -> Nothing -- Type isn't of kind RuntimeRep+ -- The latter case happens via the call to isLiftedRuntimeRep+ -- in GHC.Tc.Errors.Ppr.pprMisMatchMsg (#22742) else Just Unlifted -- Avoid searching all the unlifted RuntimeRep type cons -- In the RuntimeRep data type, only LiftedRep is lifted@@ -867,7 +890,8 @@ -- ^ What to do with coercion holes. -- See Note [Coercion holes] in "GHC.Core.TyCo.Rep". - , tcm_tycobinder :: env -> TyCoVar -> ForAllTyFlag -> m (env, TyCoVar)+ , tcm_tycobinder :: forall r. env -> TyCoVar -> ForAllTyFlag+ -> (env -> TyCoVar -> m r) -> m r -- ^ The returned env is used in the extended scope , tcm_tycon :: TyCon -> m TyCon@@ -880,10 +904,10 @@ {-# INLINE mapTyCo #-} -- See Note [Specialising mappers] mapTyCo :: Monad m => TyCoMapper () m- -> ( Type -> m Type- , [Type] -> m [Type]- , Coercion -> m Coercion- , [Coercion] -> m[Coercion])+ -> ( Type -> m Type+ , [Type] -> m [Type]+ , Coercion -> m Coercion+ , [Coercion] -> m [Coercion] ) mapTyCo mapper = case mapTyCoX mapper of (go_ty, go_tys, go_co, go_cos)@@ -894,7 +918,7 @@ -> ( env -> Type -> m Type , env -> [Type] -> m [Type] , env -> Coercion -> m Coercion- , env -> [Coercion] -> m[Coercion])+ , env -> [Coercion] -> m [Coercion] ) mapTyCoX (TyCoMapper { tcm_tyvar = tyvar , tcm_tycobinder = tycobinder , tcm_tycon = tycon@@ -902,20 +926,20 @@ , tcm_hole = cohole }) = (go_ty, go_tys, go_co, go_cos) where- go_tys _ [] = return []- go_tys env (ty:tys) = (:) <$> go_ty env ty <*> go_tys env tys+ go_tys !_ [] = return []+ go_tys !env (ty:tys) = (:) <$> go_ty env ty <*> go_tys env tys - go_ty env (TyVarTy tv) = tyvar env tv- go_ty env (AppTy t1 t2) = mkAppTy <$> go_ty env t1 <*> go_ty env t2- go_ty _ ty@(LitTy {}) = return ty- go_ty env (CastTy ty co) = mkCastTy <$> go_ty env ty <*> go_co env co- go_ty env (CoercionTy co) = CoercionTy <$> go_co env co+ go_ty !env (TyVarTy tv) = tyvar env tv+ go_ty !env (AppTy t1 t2) = mkAppTy <$> go_ty env t1 <*> go_ty env t2+ go_ty !_ ty@(LitTy {}) = return ty+ go_ty !env (CastTy ty co) = mkCastTy <$> go_ty env ty <*> go_co env co+ go_ty !env (CoercionTy co) = CoercionTy <$> go_co env co - go_ty env ty@(FunTy _ w arg res)+ go_ty !env ty@(FunTy _ w arg res) = do { w' <- go_ty env w; arg' <- go_ty env arg; res' <- go_ty env res ; return (ty { ft_mult = w', ft_arg = arg', ft_res = res' }) } - go_ty env ty@(TyConApp tc tys)+ go_ty !env ty@(TyConApp tc tys) | isTcTyCon tc = do { tc' <- tycon tc ; mkTyConApp tc' <$> go_tys env tys }@@ -927,36 +951,36 @@ | otherwise = mkTyConApp tc <$> go_tys env tys - go_ty env (ForAllTy (Bndr tv vis) inner)- = do { (env', tv') <- tycobinder env tv vis+ go_ty !env (ForAllTy (Bndr tv vis) inner)+ = do { tycobinder env tv vis $ \env' tv' -> do ; inner' <- go_ty env' inner ; return $ ForAllTy (Bndr tv' vis) inner' } - go_cos _ [] = return []- go_cos env (co:cos) = (:) <$> go_co env co <*> go_cos env cos+ go_cos !_ [] = return []+ go_cos !env (co:cos) = (:) <$> go_co env co <*> go_cos env cos - go_mco _ MRefl = return MRefl- go_mco env (MCo co) = MCo <$> (go_co env co)+ go_mco !_ MRefl = return MRefl+ go_mco !env (MCo co) = MCo <$> (go_co env co) - go_co env (Refl ty) = Refl <$> go_ty env ty- go_co env (GRefl r ty mco) = mkGReflCo r <$> go_ty env ty <*> go_mco env mco- go_co env (AppCo c1 c2) = mkAppCo <$> go_co env c1 <*> go_co env c2- go_co env (FunCo r afl afr cw c1 c2) = mkFunCo2 r afl afr <$> go_co env cw+ go_co !env (Refl ty) = Refl <$> go_ty env ty+ go_co !env (GRefl r ty mco) = mkGReflCo r <$> go_ty env ty <*> go_mco env mco+ go_co !env (AppCo c1 c2) = mkAppCo <$> go_co env c1 <*> go_co env c2+ go_co !env (FunCo r afl afr cw c1 c2) = mkFunCo2 r afl afr <$> go_co env cw <*> go_co env c1 <*> go_co env c2- go_co env (CoVarCo cv) = covar env cv- go_co env (HoleCo hole) = cohole env hole- go_co env (UnivCo p r t1 t2) = mkUnivCo <$> go_prov env p <*> pure r+ go_co !env (CoVarCo cv) = covar env cv+ go_co !env (HoleCo hole) = cohole env hole+ go_co !env (UnivCo p r t1 t2) = mkUnivCo <$> go_prov env p <*> pure r <*> go_ty env t1 <*> go_ty env t2- go_co env (SymCo co) = mkSymCo <$> go_co env co- go_co env (TransCo c1 c2) = mkTransCo <$> go_co env c1 <*> go_co env c2- go_co env (AxiomRuleCo r cos) = AxiomRuleCo r <$> go_cos env cos- go_co env (SelCo i co) = mkSelCo i <$> go_co env co- go_co env (LRCo lr co) = mkLRCo lr <$> go_co env co- go_co env (InstCo co arg) = mkInstCo <$> go_co env co <*> go_co env arg- go_co env (KindCo co) = mkKindCo <$> go_co env co- go_co env (SubCo co) = mkSubCo <$> go_co env co- go_co env (AxiomInstCo ax i cos) = mkAxiomInstCo ax i <$> go_cos env cos- go_co env co@(TyConAppCo r tc cos)+ go_co !env (SymCo co) = mkSymCo <$> go_co env co+ go_co !env (TransCo c1 c2) = mkTransCo <$> go_co env c1 <*> go_co env c2+ go_co !env (AxiomRuleCo r cos) = AxiomRuleCo r <$> go_cos env cos+ go_co !env (SelCo i co) = mkSelCo i <$> go_co env co+ go_co !env (LRCo lr co) = mkLRCo lr <$> go_co env co+ go_co !env (InstCo co arg) = mkInstCo <$> go_co env co <*> go_co env arg+ go_co !env (KindCo co) = mkKindCo <$> go_co env co+ go_co !env (SubCo co) = mkSubCo <$> go_co env co+ go_co !env (AxiomInstCo ax i cos) = mkAxiomInstCo ax i <$> go_cos env cos+ go_co !env co@(TyConAppCo r tc cos) | isTcTyCon tc = do { tc' <- tycon tc ; mkTyConAppCo r tc' <$> go_cos env cos }@@ -967,17 +991,17 @@ | otherwise = mkTyConAppCo r tc <$> go_cos env cos- go_co env (ForAllCo tv kind_co co)+ go_co !env (ForAllCo tv kind_co co) = do { kind_co' <- go_co env kind_co- ; (env', tv') <- tycobinder env tv Inferred+ ; tycobinder env tv Inferred $ \env' tv' -> do ; co' <- go_co env' co ; return $ mkForAllCo tv' kind_co' co' } -- See Note [Efficiency for ForAllCo case of mapTyCoX] - 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- go_prov _ p@(CorePrepProv _) = return p+ 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+ go_prov !_ p@(CorePrepProv _) = return p {- *********************************************************************@@ -1028,7 +1052,7 @@ Note [Decomposing fat arrow c=>t] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Can we unify (a b) with (Eq a => ty)? If we do so, we end up with-a partial application like ((=>) Eq a) which doesn't make sense in+a partial application like ((=>) (Eq a)) which doesn't make sense in source Haskell. In contrast, we *can* unify (a b) with (t1 -> t2). Here's an example (#9858) of how you might do it: i :: (Typeable a, Typeable b) => Proxy (a b) -> TypeRep@@ -1208,9 +1232,12 @@ | LitTy l <- coreFullView ty = Just l | otherwise = Nothing +-- | A type of kind 'ErrorMessage' (from the 'GHC.TypeError' module).+type ErrorMsgType = Type+ -- | Is this type a custom user error?--- If so, give us the kind and the error message.-userTypeError_maybe :: Type -> Maybe Type+-- If so, give us the error message.+userTypeError_maybe :: Type -> Maybe ErrorMsgType userTypeError_maybe t = do { (tc, _kind : msg : _) <- splitTyConApp_maybe t -- There may be more than 2 arguments, if the type error is@@ -1220,7 +1247,7 @@ ; return msg } -- | Render a type corresponding to a user type error into a SDoc.-pprUserTypeErrorTy :: Type -> SDoc+pprUserTypeErrorTy :: ErrorMsgType -> SDoc pprUserTypeErrorTy ty = case splitTyConApp_maybe ty of @@ -1246,7 +1273,6 @@ -- An unevaluated type function _ -> ppr ty - {- ********************************************************************* * * FunTy@@ -1307,9 +1333,12 @@ -> Maybe Coercion -- ^ Return Just if this TyConAppCo should be represented as a FunCo tyConAppFunCo_maybe r tc cos- | Just (af, mult, arg, res) <- ty_con_app_fun_maybe (mkReflCo r manyDataConTy) tc cos- = Just (mkFunCo1 r af mult arg res)- | otherwise = Nothing+ | Just (af, mult, arg, res) <- ty_con_app_fun_maybe mult_refl tc cos+ = Just (mkFunCo r af mult arg res)+ | otherwise+ = Nothing+ where+ mult_refl = mkReflCo (funRole r SelMult) manyDataConTy ty_con_app_fun_maybe :: (HasDebugCallStack, Outputable a) => a -> TyCon -> [a] -> Maybe (FunTyFlag, a, a, a)@@ -1592,7 +1621,7 @@ -- (e.g. `FunTy (a :: k) Int`, since the kind of @a@ isn't of -- the form `TYPE rep`. This isn't usually a problem but may -- be temporarily the cas during canonicalization:--- see Note [Decomposing FunTy] in GHC.Tc.Solver.Canonical+-- see Note [Decomposing FunTy] in GHC.Tc.Solver.Equality -- and Note [The Purely Kinded Type Invariant (PKTI)] in GHC.Tc.Gen.HsType, -- Wrinkle around FunTy --@@ -1732,7 +1761,7 @@ tyConBindersPiTyBinders = map to_tyb where to_tyb (Bndr tv (NamedTCB vis)) = Named (Bndr tv vis)- to_tyb (Bndr tv (AnonTCB af)) = Anon (tymult (varType tv)) af+ to_tyb (Bndr tv AnonTCB) = Anon (tymult (varType tv)) FTF_T_T -- | Make a dependent forall over an 'Inferred' variable mkTyCoInvForAllTy :: TyCoVar -> Type -> Type@@ -1794,7 +1823,7 @@ = ( Bndr v (NamedTCB Required) : binders , fvs `delVarSet` v `unionVarSet` kind_vars ) | otherwise- = ( Bndr v (AnonTCB visArgTypeLike) : binders+ = ( Bndr v AnonTCB : binders , fvs `unionVarSet` kind_vars ) where (binders, fvs) = go vs@@ -1863,6 +1892,15 @@ | otherwise = False +-- | Like `isForAllTy`, but returns True only if it is an inferred tyvar binder+isForAllTy_invis_ty :: Type -> Bool+isForAllTy_invis_ty ty+ | ForAllTy (Bndr tv (Invisible InferredSpec)) _ <- coreFullView ty+ , isTyVar tv+ = True++ | otherwise = False+ -- | Like `isForAllTy`, but returns True only if it is a covar binder isForAllTy_co :: Type -> Bool isForAllTy_co ty@@ -2195,32 +2233,33 @@ isFamFreeTy (CastTy ty _) = isFamFreeTy ty isFamFreeTy (CoercionTy _) = False -- Not sure about this --- | Does this type classify a core (unlifted) Coercion?--- At either role nominal or representational--- (t1 ~# t2) or (t1 ~R# t2)--- See Note [Types for coercions, predicates, and evidence] in "GHC.Core.TyCo.Rep"-isCoVarType :: Type -> Bool- -- ToDo: should we check saturation?-isCoVarType ty- | Just tc <- tyConAppTyCon_maybe ty- = tc `hasKey` eqPrimTyConKey || tc `hasKey` eqReprPrimTyConKey- | otherwise- = False- buildSynTyCon :: Name -> [KnotTied TyConBinder] -> Kind -- ^ /result/ kind -> [Role] -> KnotTied Type -> TyCon -- This function is here because here is where we have -- isFamFree and isTauTy buildSynTyCon name binders res_kind roles rhs- = mkSynonymTyCon name binders res_kind roles rhs is_tau is_fam_free is_forgetful+ = mkSynonymTyCon name binders res_kind roles rhs+ is_tau is_fam_free is_forgetful is_concrete where is_tau = isTauTy rhs is_fam_free = isFamFreeTy rhs- is_forgetful = any (not . (`elemVarSet` tyCoVarsOfType rhs) . binderVar) binders ||- uniqSetAny isForgetfulSynTyCon (tyConsOfType rhs)- -- NB: This is allowed to be conservative, returning True more often+ is_concrete = uniqSetAll isConcreteTyCon rhs_tycons+ -- NB: is_concrete is allowed to be conservative, returning False+ -- more often than it could. e.g.+ -- type S a b = b+ -- type family F a+ -- type T a = S (F a) a+ -- We will mark T as not-concrete, even though (since S ignore its first+ -- argument, it could be marked concrete.++ is_forgetful = not (all ((`elemVarSet` rhs_tyvars) . binderVar) binders) ||+ uniqSetAny isForgetfulSynTyCon rhs_tycons+ -- NB: is_forgetful is allowed to be conservative, returning True more often -- than it should. See comments on GHC.Core.TyCon.isForgetfulSynTyCon + rhs_tycons = tyConsOfType rhs+ rhs_tyvars = tyCoVarsOfType rhs+ {- ************************************************************************ * *@@ -2253,8 +2292,7 @@ case typeLevity_maybe ty of Just Lifted -> False Just Unlifted -> True- Nothing ->- pprPanic "isUnliftedType" (ppr ty <+> dcolon <+> ppr (typeKind ty))+ Nothing -> pprPanic "isUnliftedType" (ppr ty <+> dcolon <+> ppr (typeKind ty)) -- | Returns: --@@ -2264,6 +2302,9 @@ mightBeLiftedType :: Type -> Bool mightBeLiftedType = mightBeLifted . typeLevity_maybe +definitelyLiftedType :: Type -> Bool+definitelyLiftedType = not . mightBeUnliftedType+ -- | Returns: -- -- * 'False' if the type is /guaranteed/ lifted or@@ -2272,6 +2313,9 @@ mightBeUnliftedType :: Type -> Bool mightBeUnliftedType = mightBeUnlifted . typeLevity_maybe +definitelyUnliftedType :: Type -> Bool+definitelyUnliftedType = not . mightBeLiftedType+ -- | See "Type#type_classification" for what a boxed type is. -- Panics on representation-polymorphic types; See 'mightBeUnliftedType' for -- a more approximate predicate that behaves better in the presence of@@ -2368,6 +2412,28 @@ isStrictType :: HasDebugCallStack => Type -> Bool isStrictType = isUnliftedType +isTerminatingType :: HasDebugCallStack => Type -> Bool+-- ^ True <=> a term of this type cannot be bottom+-- This identifies the types described by+-- Note [NON-BOTTOM-DICTS invariant] in GHC.Core+-- NB: unlifted types are not terminating types!+-- e.g. you can write a term (loop 1)::Int# that diverges.+isTerminatingType ty = case tyConAppTyCon_maybe ty of+ Just tc -> isClassTyCon tc && not (isNewTyCon tc)+ _ -> False++-- | Does this type classify a core (unlifted) Coercion?+-- At either role nominal or representational+-- (t1 ~# t2) or (t1 ~R# t2)+-- See Note [Types for coercions, predicates, and evidence] in "GHC.Core.TyCo.Rep"+isCoVarType :: Type -> Bool+ -- ToDo: should we check saturation?+isCoVarType ty+ | Just tc <- tyConAppTyCon_maybe ty+ = tc `hasKey` eqPrimTyConKey || tc `hasKey` eqReprPrimTyConKey+ | otherwise+ = False+ isPrimitiveType :: Type -> Bool -- ^ Returns true of types that are opaque to Haskell. isPrimitiveType ty = case splitTyConApp_maybe ty of@@ -2489,8 +2555,6 @@ torc is TYPE or CONSTRAINT ty : body_torc rep- bndr_torc is Type or Constraint- ki : bndr_torc ki : Type `a` is a type variable `a` is not free in rep@@ -2509,10 +2573,6 @@ Note that: * (FORALL1) rejects (forall (a::Maybe). blah) -* (FORALL1) accepts (forall (a :: t1~t2) blah), where the type variable- (not coercion variable!) 'a' has a kind (t1~t2) that in turn has kind- Constraint. See Note [Constraints in kinds] in GHC.Core.TyCo.Rep.- * (FORALL2) Surprise 1: See GHC.Core.TyCo.Rep Note [Unused coercion variable in ForAllTy] @@ -2737,29 +2797,26 @@ (bndrs, _) = splitPiTys ty -- | Checks that a kind of the form 'Type', 'Constraint'--- or @'TYPE r@ is concrete. See 'isConcrete'.+-- or @'TYPE r@ is concrete. See 'isConcreteType'. -- -- __Precondition:__ The type has kind `TYPE blah` or `CONSTRAINT blah` isFixedRuntimeRepKind :: HasDebugCallStack => Kind -> Bool isFixedRuntimeRepKind k = assertPpr (isTYPEorCONSTRAINT k) (ppr k) $ -- the isLiftedTypeKind check is necessary b/c of Constraint- isConcrete k+ isConcreteType k -- | Tests whether the given type is concrete, i.e. it -- whether it consists only of concrete type constructors, -- concrete type variables, and applications. -- -- See Note [Concrete types] in GHC.Tc.Utils.Concrete.-isConcrete :: Type -> Bool-isConcrete = go+isConcreteType :: Type -> Bool+isConcreteType = go where- go ty | Just ty' <- coreView ty = go ty' go (TyVarTy tv) = isConcreteTyVar tv go (AppTy ty1 ty2) = go ty1 && go ty2- go (TyConApp tc tys)- | isConcreteTyCon tc = all go tys- | otherwise = False+ go (TyConApp tc tys) = go_tc tc tys go ForAllTy{} = False go (FunTy _ w t1 t2) = go w && go (typeKind t1) && go t1@@ -2768,7 +2825,22 @@ go CastTy{} = False go CoercionTy{} = False + go_tc tc tys+ | isForgetfulSynTyCon tc -- E.g. type S a = Int+ -- Then (S x) is concrete even if x isn't+ , Just ty' <- expandSynTyConApp_maybe tc tys+ = go ty' + -- Apart from forgetful synonyms, isConcreteTyCon+ -- is enough; no need to expand. This is good for e.g+ -- type LiftedRep = BoxedRep Lifted+ | isConcreteTyCon tc+ = all go tys++ | otherwise -- E.g. type families+ = False++ {- %************************************************************************ %* *@@ -2815,8 +2887,7 @@ injective_vars_of_binder :: TyConBinder -> FV injective_vars_of_binder (Bndr tv vis) = case vis of- AnonTCB af | isVisibleFunArg af- -> injectiveVarsOfType False -- conservative choice+ AnonTCB -> injectiveVarsOfType False -- conservative choice (varType tv) NamedTCB argf | source_of_injectivity argf -> unitFV tv `unionFV`
GHC/Core/Type.hs-boot view
@@ -21,7 +21,8 @@ typeKind :: HasDebugCallStack => Type -> Type typeTypeOrConstraint :: HasDebugCallStack => Type -> TypeOrConstraint -coreView :: Type -> Maybe Type+coreView :: Type -> Maybe Type+rewriterView :: Type -> Maybe Type isRuntimeRepTy :: Type -> Bool isLevityTy :: Type -> Bool isMultiplicityTy :: Type -> Bool
GHC/Core/Unfold.hs view
@@ -21,25 +21,22 @@ module GHC.Core.Unfold ( Unfolding, UnfoldingGuidance, -- Abstract types + ExprSize(..), sizeExpr,++ ArgSummary(..), nonTriv,+ CallCtxt(..),+ UnfoldingOpts (..), defaultUnfoldingOpts, updateCreationThreshold, updateUseThreshold, updateFunAppDiscount, updateDictDiscount, updateVeryAggressive, updateCaseScaling, updateCaseThreshold, updateReportPrefix, - ArgSummary(..),-- couldBeSmallEnoughToInline, inlineBoringOk,- smallEnoughToInline,-- callSiteInline, CallCtxt(..),- calcUnfoldingGuidance+ inlineBoringOk, calcUnfoldingGuidance ) where import GHC.Prelude -import GHC.Driver.Flags- import GHC.Core import GHC.Core.Utils import GHC.Types.Id@@ -48,21 +45,17 @@ import GHC.Builtin.PrimOps import GHC.Types.Id.Info import GHC.Types.RepType ( isZeroBitTy )-import GHC.Types.Basic ( Arity, RecFlag(..) )+import GHC.Types.Basic ( Arity, RecFlag ) import GHC.Core.Type import GHC.Builtin.Names import GHC.Data.Bag-import GHC.Utils.Logger import GHC.Utils.Misc import GHC.Utils.Outputable import GHC.Types.ForeignCall-import GHC.Types.Name import GHC.Types.Tickish import qualified Data.ByteString as BS-import Data.List (isPrefixOf) - -- | Unfolding options data UnfoldingOpts = UnfoldingOpts { unfoldingCreationThreshold :: !Int@@ -151,6 +144,41 @@ updateReportPrefix :: Maybe String -> UnfoldingOpts -> UnfoldingOpts updateReportPrefix n opts = opts { unfoldingReportPrefix = n } +data ArgSummary = TrivArg -- Nothing interesting+ | NonTrivArg -- Arg has structure+ | ValueArg -- Arg is a con-app or PAP+ -- ..or con-like. Note [Conlike is interesting]++instance Outputable ArgSummary where+ ppr TrivArg = text "TrivArg"+ ppr NonTrivArg = text "NonTrivArg"+ ppr ValueArg = text "ValueArg"++nonTriv :: ArgSummary -> Bool+nonTriv TrivArg = False+nonTriv _ = True++data CallCtxt+ = BoringCtxt+ | RhsCtxt RecFlag -- Rhs of a let-binding; see Note [RHS of lets]+ | DiscArgCtxt -- Argument of a function with non-zero arg discount+ | RuleArgCtxt -- We are somewhere in the argument of a function with rules++ | ValAppCtxt -- We're applied to at least one value arg+ -- This arises when we have ((f x |> co) y)+ -- Then the (f x) has argument 'x' but in a ValAppCtxt++ | CaseCtxt -- We're the scrutinee of a case+ -- that decomposes its scrutinee++instance Outputable CallCtxt where+ ppr CaseCtxt = text "CaseCtxt"+ ppr ValAppCtxt = text "ValAppCtxt"+ ppr BoringCtxt = text "BoringCtxt"+ ppr (RhsCtxt ir)= text "RhsCtxt" <> parens (ppr ir)+ ppr DiscArgCtxt = text "DiscArgCtxt"+ ppr RuleArgCtxt = text "RuleArgCtxt"+ {- Note [Occurrence analysis of unfoldings] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -565,7 +593,7 @@ FCallId _ -> sizeN (callSize (length val_args) voids) DataConWorkId dc -> conSize dc (length val_args) PrimOpId op _ -> primOpSize op (length val_args)- ClassOpId _ -> classOpSize opts top_args val_args+ ClassOpId {} -> classOpSize opts top_args val_args _ -> funSize opts top_args fun (length val_args) voids ------------@@ -930,561 +958,3 @@ sizeZero = SizeIs 0 emptyBag 0 sizeN n = SizeIs n emptyBag 0--{--************************************************************************-* *-\subsection[considerUnfolding]{Given all the info, do (not) do the unfolding}-* *-************************************************************************--We use 'couldBeSmallEnoughToInline' to avoid exporting inlinings that-we ``couldn't possibly use'' on the other side. Can be overridden w/-flaggery. Just the same as smallEnoughToInline, except that it has no-actual arguments.--}--couldBeSmallEnoughToInline :: UnfoldingOpts -> Int -> CoreExpr -> Bool-couldBeSmallEnoughToInline opts threshold rhs- = case sizeExpr opts threshold [] body of- TooBig -> False- _ -> True- where- (_, body) = collectBinders rhs-------------------smallEnoughToInline :: UnfoldingOpts -> Unfolding -> Bool-smallEnoughToInline opts (CoreUnfolding {uf_guidance = guidance})- = case guidance of- UnfIfGoodArgs {ug_size = size} -> size <= unfoldingUseThreshold opts- UnfWhen {} -> True- UnfNever -> False-smallEnoughToInline _ _- = False--{--************************************************************************-* *-\subsection{callSiteInline}-* *-************************************************************************--This is the key function. It decides whether to inline a variable at a call site--callSiteInline is used at call sites, so it is a bit more generous.-It's a very important function that embodies lots of heuristics.-A non-WHNF can be inlined if it doesn't occur inside a lambda,-and occurs exactly once or- occurs once in each branch of a case and is small--If the thing is in WHNF, there's no danger of duplicating work,-so we can inline if it occurs once, or is small--NOTE: we don't want to inline top-level functions that always diverge.-It just makes the code bigger. Tt turns out that the convenient way to prevent-them inlining is to give them a NOINLINE pragma, which we do in-StrictAnal.addStrictnessInfoToTopId--}--data ArgSummary = TrivArg -- Nothing interesting- | NonTrivArg -- Arg has structure- | ValueArg -- Arg is a con-app or PAP- -- ..or con-like. Note [Conlike is interesting]--instance Outputable ArgSummary where- ppr TrivArg = text "TrivArg"- ppr NonTrivArg = text "NonTrivArg"- ppr ValueArg = text "ValueArg"--nonTriv :: ArgSummary -> Bool-nonTriv TrivArg = False-nonTriv _ = True--data CallCtxt- = BoringCtxt- | RhsCtxt RecFlag -- Rhs of a let-binding; see Note [RHS of lets]- | DiscArgCtxt -- Argument of a function with non-zero arg discount- | RuleArgCtxt -- We are somewhere in the argument of a function with rules-- | ValAppCtxt -- We're applied to at least one value arg- -- This arises when we have ((f x |> co) y)- -- Then the (f x) has argument 'x' but in a ValAppCtxt-- | CaseCtxt -- We're the scrutinee of a case- -- that decomposes its scrutinee--instance Outputable CallCtxt where- ppr CaseCtxt = text "CaseCtxt"- ppr ValAppCtxt = text "ValAppCtxt"- ppr BoringCtxt = text "BoringCtxt"- ppr (RhsCtxt ir)= text "RhsCtxt" <> parens (ppr ir)- ppr DiscArgCtxt = text "DiscArgCtxt"- ppr RuleArgCtxt = text "RuleArgCtxt"--callSiteInline :: Logger- -> UnfoldingOpts- -> Int -- Case depth- -> Id -- The Id- -> Bool -- True <=> unfolding is active- -> Bool -- True if there are no arguments at all (incl type args)- -> [ArgSummary] -- One for each value arg; True if it is interesting- -> CallCtxt -- True <=> continuation is interesting- -> Maybe CoreExpr -- Unfolding, if any-callSiteInline logger opts !case_depth id active_unfolding lone_variable arg_infos cont_info- = case idUnfolding id of- -- idUnfolding checks for loop-breakers, returning NoUnfolding- -- Things with an INLINE pragma may have an unfolding *and*- -- be a loop breaker (maybe the knot is not yet untied)- CoreUnfolding { uf_tmpl = unf_template- , uf_cache = unf_cache- , uf_guidance = guidance }- | active_unfolding -> tryUnfolding logger opts case_depth id lone_variable- arg_infos cont_info unf_template- unf_cache guidance- | otherwise -> traceInline logger opts id "Inactive unfolding:" (ppr id) Nothing- NoUnfolding -> Nothing- BootUnfolding -> Nothing- OtherCon {} -> Nothing- DFunUnfolding {} -> Nothing -- Never unfold a DFun---- | Report the inlining of an identifier's RHS to the user, if requested.-traceInline :: Logger -> UnfoldingOpts -> Id -> String -> SDoc -> a -> a-traceInline logger opts inline_id str doc result- -- We take care to ensure that doc is used in only one branch, ensuring that- -- the simplifier can push its allocation into the branch. See Note [INLINE- -- conditional tracing utilities].- | enable = logTraceMsg logger str doc result- | otherwise = result- where- enable- | logHasDumpFlag logger Opt_D_dump_verbose_inlinings- = True- | Just prefix <- unfoldingReportPrefix opts- = prefix `isPrefixOf` occNameString (getOccName inline_id)- | otherwise- = False-{-# INLINE traceInline #-} -- see Note [INLINE conditional tracing utilities]--{- Note [Avoid inlining into deeply nested cases]- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--Consider a function f like this:-- f arg1 arg2 =- case ...- ... -> g arg1- ... -> g arg2--This function is small. So should be safe to inline.-However sometimes this doesn't quite work out like that.-Consider this code:--f1 arg1 arg2 ... = ...- case _foo of- alt1 -> ... f2 arg1 ...- alt2 -> ... f2 arg2 ...--f2 arg1 arg2 ... = ...- case _foo of- alt1 -> ... f3 arg1 ...- alt2 -> ... f3 arg2 ...--f3 arg1 arg2 ... = ...--... repeats up to n times. And then f1 is-applied to some arguments:--foo = ... f1 <interestingArgs> ...--Initially f2..fn are not interesting to inline so we don't.-However we see that f1 is applied to interesting args.-So it's an obvious choice to inline those:--foo =- ...- case _foo of- alt1 -> ... f2 <interestingArg> ...- alt2 -> ... f2 <interestingArg> ...--As a result we go and inline f2 both mentions of f2 in turn are now applied to interesting-arguments and f2 is small:--foo =- ...- case _foo of- alt1 -> ... case _foo of- alt1 -> ... f3 <interestingArg> ...- alt2 -> ... f3 <interestingArg> ...-- alt2 -> ... case _foo of- alt1 -> ... f3 <interestingArg> ...- alt2 -> ... f3 <interestingArg> ...--The same thing happens for each binding up to f_n, duplicating the amount of inlining-done in each step. Until at some point we are either done or run out of simplifier-ticks/RAM. This pattern happened #18730.--To combat this we introduce one more heuristic when weighing inlining decision.-We keep track of a "case-depth". Which increases each time we look inside a case-expression with more than one alternative.--We then apply a penalty to inlinings based on the case-depth at which they would-be inlined. Bounding the number of inlinings in such a scenario.--The heuristic can be tuned in two ways:--* We can ignore the first n levels of case nestings for inlining decisions using- -funfolding-case-threshold.-* The penalty grows linear with the depth. It's computed as size*(depth-threshold)/scaling.- Scaling can be set with -funfolding-case-scaling.--Some guidance on setting these defaults:--* A low treshold (<= 2) is needed to prevent exponential cases from spiraling out of- control. We picked 2 for no particular reason.-* Scaling the penalty by any more than 30 means the reproducer from- T18730 won't compile even with reasonably small values of n. Instead- it will run out of runs/ticks. This means to positively affect the reproducer- a scaling <= 30 is required.-* A scaling of >= 15 still causes a few very large regressions on some nofib benchmarks.- (+80% for gc/fulsom, +90% for real/ben-raytrace, +20% for spectral/fibheaps)-* A scaling of >= 25 showed no regressions on nofib. However it showed a number of- (small) regression for compiler perf benchmarks.--The end result is that we are settling for a scaling of 30, with a threshold of 2.-This gives us minimal compiler perf regressions. No nofib runtime regressions and-will still avoid this pattern sometimes. This is a "safe" default, where we err on-the side of compiler blowup instead of risking runtime regressions.--For cases where the default falls short the flag can be changed to allow more/less inlining as-needed on a per-module basis.---}--tryUnfolding :: Logger -> UnfoldingOpts -> Int -> Id -> Bool -> [ArgSummary] -> CallCtxt- -> CoreExpr -> UnfoldingCache -> UnfoldingGuidance- -> Maybe CoreExpr-tryUnfolding logger opts !case_depth id lone_variable arg_infos- cont_info unf_template unf_cache guidance- = case guidance of- UnfNever -> traceInline logger opts 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 || unfoldingVeryAggressive opts)- -- See Note [INLINE for small functions] (3)- -> traceInline logger opts id str (mk_doc some_benefit empty True) (Just unf_template)- | otherwise- -> traceInline logger opts 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 }- | unfoldingVeryAggressive opts- -> traceInline logger opts id str (mk_doc some_benefit extra_doc True) (Just unf_template)- | is_wf && some_benefit && small_enough- -> traceInline logger opts id str (mk_doc some_benefit extra_doc True) (Just unf_template)- | otherwise- -> traceInline logger opts id str (mk_doc some_benefit extra_doc False) Nothing- where- some_benefit = calc_some_benefit (length arg_discounts)- -- See Note [Avoid inlining into deeply nested cases]- depth_treshold = unfoldingCaseThreshold opts- depth_scaling = unfoldingCaseScaling opts- depth_penalty | case_depth <= depth_treshold = 0- | otherwise = (size * (case_depth - depth_treshold)) `div` depth_scaling- adjusted_size = size + depth_penalty - discount- small_enough = adjusted_size <= unfoldingUseThreshold opts- discount = computeDiscount arg_discounts res_discount arg_infos cont_info-- extra_doc = vcat [ text "case depth =" <+> int case_depth- , text "depth based penalty =" <+> int depth_penalty- , text "discounted size =" <+> int adjusted_size ]-- where- -- Unpack the UnfoldingCache lazily because it may not be needed, and all- -- its fields are strict; so evaluating unf_cache at all forces all the- -- isWorkFree etc computations to take place. That risks wasting effort for- -- Ids that are never going to inline anyway.- -- See Note [UnfoldingCache] in GHC.Core- UnfoldingCache{ uf_is_work_free = is_wf, uf_expandable = is_exp } = unf_cache-- mk_doc some_benefit extra_doc yes_or_no- = vcat [ text "arg infos" <+> ppr arg_infos- , text "interesting continuation" <+> ppr cont_info- , text "some_benefit" <+> ppr some_benefit- , text "is exp:" <+> ppr is_exp- , text "is work-free:" <+> ppr is_wf- , text "guidance" <+> ppr guidance- , extra_doc- , text "ANSWER =" <+> if yes_or_no then text "YES" else text "NO"]-- ctx = log_default_dump_context (logFlags logger)- str = "Considering inlining: " ++ showSDocOneLine ctx (ppr id)- n_val_args = length arg_infos-- -- some_benefit is used when the RHS is small enough- -- and the call has enough (or too many) value- -- arguments (ie n_val_args >= arity). But there must- -- be *something* interesting about some argument, or the- -- result context, to make it worth inlining- calc_some_benefit :: Arity -> Bool -- The Arity is the number of args- -- expected by the unfolding- calc_some_benefit uf_arity- | not saturated = interesting_args -- Under-saturated- -- Note [Unsaturated applications]- | otherwise = interesting_args -- Saturated or over-saturated- || interesting_call- where- saturated = n_val_args >= uf_arity- over_saturated = n_val_args > uf_arity- interesting_args = any nonTriv arg_infos- -- NB: (any nonTriv arg_infos) looks at the- -- over-saturated args too which is "wrong";- -- but if over-saturated we inline anyway.-- interesting_call- | over_saturated- = True- | otherwise- = case cont_info of- CaseCtxt -> not (lone_variable && is_exp) -- Note [Lone variables]- ValAppCtxt -> True -- Note [Cast then apply]- RuleArgCtxt -> uf_arity > 0 -- See Note [RHS of lets]- DiscArgCtxt -> uf_arity > 0 -- Note [Inlining in ArgCtxt]- RhsCtxt NonRecursive- -> uf_arity > 0 -- See Note [RHS of lets]- _other -> False -- See Note [Nested functions]---{- Note [RHS of lets]-~~~~~~~~~~~~~~~~~~~~~-When the call is the argument of a function with a RULE, or the RHS of a let,-we are a little bit keener to inline (in tryUnfolding). For example- f y = (y,y,y)- g y = let x = f y in ...(case x of (a,b,c) -> ...) ...-We'd inline 'f' if the call was in a case context, and it kind-of-is,-only we can't see it. Also- x = f v-could be expensive whereas- x = case v of (a,b) -> a-is patently cheap and may allow more eta expansion.--So, in `interesting_call` in `tryUnfolding`, we treat the RHS of a-/non-recursive/ let as not-totally-boring. A /recursive/ let isn't-going be inlined so there is much less point. Hence the (only reason-for the) RecFlag in RhsCtxt--Note [Unsaturated applications]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When a call is not saturated, we *still* inline if one of the-arguments has interesting structure. That's sometimes very important.-A good example is the Ord instance for Bool in Base:-- Rec {- $fOrdBool =GHC.Classes.D:Ord- @ Bool- ...- $cmin_ajX-- $cmin_ajX [Occ=LoopBreaker] :: Bool -> Bool -> Bool- $cmin_ajX = GHC.Classes.$dmmin @ Bool $fOrdBool- }--But the defn of GHC.Classes.$dmmin is:-- $dmmin :: forall a. GHC.Classes.Ord a => a -> a -> a- {- Arity: 3, HasNoCafRefs, Strictness: SLL,- Unfolding: (\ @ a $dOrd :: GHC.Classes.Ord a x :: a y :: a ->- case @ a GHC.Classes.<= @ a $dOrd x y of wild {- GHC.Types.False -> y GHC.Types.True -> x }) -}--We *really* want to inline $dmmin, even though it has arity 3, in-order to unravel the recursion.---Note [Things to watch]-~~~~~~~~~~~~~~~~~~~~~~-* { y = I# 3; x = y `cast` co; ...case (x `cast` co) of ... }- Assume x is exported, so not inlined unconditionally.- Then we want x to inline unconditionally; no reason for it- not to, and doing so avoids an indirection.--* { x = I# 3; ....f x.... }- Make sure that x does not inline unconditionally!- Lest we get extra allocation.--Note [Nested functions]-~~~~~~~~~~~~~~~~~~~~~~~-At one time we treated a call of a non-top-level function as-"interesting" (regardless of how boring the context) in the hope-that inlining it would eliminate the binding, and its allocation.-Specifically, in the default case of interesting_call we had- _other -> not is_top && uf_arity > 0--But actually postInlineUnconditionally does some of this and overall-it makes virtually no difference to nofib. So I simplified away this-special case--Note [Cast then apply]-~~~~~~~~~~~~~~~~~~~~~~-Consider- myIndex = __inline_me ( (/\a. <blah>) |> co )- co :: (forall a. a -> a) ~ (forall a. T a)- ... /\a.\x. case ((myIndex a) |> sym co) x of { ... } ...--We need to inline myIndex to unravel this; but the actual call (myIndex a) has-no value arguments. The ValAppCtxt gives it enough incentive to inline.--Note [Inlining in ArgCtxt]-~~~~~~~~~~~~~~~~~~~~~~~~~~-The condition (arity > 0) here is very important, because otherwise-we end up inlining top-level stuff into useless places; eg- x = I# 3#- f = \y. g x-This can make a very big difference: it adds 16% to nofib 'integer' allocs,-and 20% to 'power'.--At one stage I replaced this condition by 'True' (leading to the above-slow-down). The motivation was test eyeball/inline1.hs; but that seems-to work ok now.--NOTE: arguably, we should inline in ArgCtxt only if the result of the-call is at least CONLIKE. At least for the cases where we use ArgCtxt-for the RHS of a 'let', we only profit from the inlining if we get a-CONLIKE thing (modulo lets).--Note [Lone variables]-~~~~~~~~~~~~~~~~~~~~~-See also Note [Interaction of exprIsWorkFree and lone variables]-which appears below--The "lone-variable" case is important. I spent ages messing about-with unsatisfactory variants, but this is nice. The idea is that if a-variable appears all alone-- as an arg of lazy fn, or rhs BoringCtxt- as scrutinee of a case CaseCtxt- as arg of a fn ArgCtxt-AND- it is bound to a cheap expression--then we should not inline it (unless there is some other reason,-e.g. it is the sole occurrence). That is what is happening at-the use of 'lone_variable' in 'interesting_call'.--Why? At least in the case-scrutinee situation, turning- let x = (a,b) in case x of y -> ...-into- let x = (a,b) in case (a,b) of y -> ...-and thence to- let x = (a,b) in let y = (a,b) in ...-is bad if the binding for x will remain.--Another example: I discovered that strings-were getting inlined straight back into applications of 'error'-because the latter is strict.- s = "foo"- f = \x -> ...(error s)...--Fundamentally such contexts should not encourage inlining because, provided-the RHS is "expandable" (see Note [exprIsExpandable] in GHC.Core.Utils) the-context can ``see'' the unfolding of the variable (e.g. case or a-RULE) so there's no gain.--However, watch out:-- * Consider this:- foo = \n. [n]) {-# INLINE foo #-}- bar = foo 20 {-# INLINE bar #-}- baz = \n. case bar of { (m:_) -> m + n }- Here we really want to inline 'bar' so that we can inline 'foo'- and the whole thing unravels as it should obviously do. This is- important: in the NDP project, 'bar' generates a closure data- structure rather than a list.-- So the non-inlining of lone_variables should only apply if the- unfolding is regarded as expandable; because that is when- exprIsConApp_maybe looks through the unfolding. Hence the "&&- is_exp" in the CaseCtxt branch of interesting_call-- * Even a type application or coercion isn't a lone variable.- Consider- case $fMonadST @ RealWorld of { :DMonad a b c -> c }- We had better inline that sucker! The case won't see through it.-- For now, I'm treating treating a variable applied to types- in a *lazy* context "lone". The motivating example was- f = /\a. \x. BIG- g = /\a. \y. h (f a)- There's no advantage in inlining f here, and perhaps- a significant disadvantage. Hence some_val_args in the Stop case--Note [Interaction of exprIsWorkFree and lone variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The lone-variable test says "don't inline if a case expression-scrutinises a lone variable whose unfolding is cheap". It's very-important that, under these circumstances, exprIsConApp_maybe-can spot a constructor application. So, for example, we don't-consider- let x = e in (x,x)-to be cheap, and that's good because exprIsConApp_maybe doesn't-think that expression is a constructor application.--In the 'not (lone_variable && is_wf)' test, I used to test is_value-rather than is_wf, which was utterly wrong, because the above-expression responds True to exprIsHNF, which is what sets is_value.--This kind of thing can occur if you have-- {-# INLINE foo #-}- foo = let x = e in (x,x)--which Roman did.----}--computeDiscount :: [Int] -> Int -> [ArgSummary] -> CallCtxt- -> Int-computeDiscount arg_discounts res_discount arg_infos cont_info-- = 10 -- Discount of 10 because the result replaces the call- -- so we count 10 for the function itself-- + 10 * length actual_arg_discounts- -- Discount of 10 for each arg supplied,- -- because the result replaces the call-- + total_arg_discount + res_discount'- where- actual_arg_discounts = zipWith mk_arg_discount arg_discounts arg_infos- total_arg_discount = sum actual_arg_discounts-- mk_arg_discount _ TrivArg = 0- mk_arg_discount _ NonTrivArg = 10- mk_arg_discount discount ValueArg = discount-- res_discount'- | LT <- arg_discounts `compareLength` arg_infos- = res_discount -- Over-saturated- | otherwise- = case cont_info of- BoringCtxt -> 0- CaseCtxt -> res_discount -- Presumably a constructor- ValAppCtxt -> res_discount -- Presumably a function- _ -> 40 `min` res_discount- -- ToDo: this 40 `min` res_discount doesn't seem right- -- for DiscArgCtxt it shouldn't matter because the function will- -- get the arg discount for any non-triv arg- -- for RuleArgCtxt we do want to be keener to inline; but not only- -- constructor results- -- for RhsCtxt I suppose that exposing a data con is good in general- -- And 40 seems very arbitrary- --- -- res_discount can be very large when a function returns- -- constructors; but we only want to invoke that large discount- -- when there's a case continuation.- -- Otherwise we, rather arbitrarily, threshold it. Yuk.- -- But we want to avoid inlining large functions that return- -- constructors into contexts that are simply "interesting"
GHC/Core/Unify.hs view
@@ -31,7 +31,6 @@ import GHC.Types.Var.Env import GHC.Types.Var.Set import GHC.Types.Name( Name, mkSysTvName, mkSystemVarName )-import GHC.Builtin.Names( tYPETyConKey, cONSTRAINTTyConKey ) import GHC.Core.Type hiding ( getTvSubstEnv ) import GHC.Core.Coercion hiding ( getCvSubstEnv ) import GHC.Core.TyCon@@ -734,8 +733,8 @@ see Note [Non-trivial definitional equality] in GHC.Core.TyCo.Rep Unlike the "impure unifiers" in the typechecker (the eager unifier in-GHC.Tc.Utils.Unify, and the constraint solver itself in GHC.Tc.Solver.Canonical), the pure-unifier does /not/ work up to ~.+GHC.Tc.Utils.Unify, and the constraint solver itself in GHC.Tc.Solver.Equality),+the pure unifier does /not/ work up to ~. The algorithm implemented here is rather delicate, and we depend on it to uphold certain properties. This is a summary of these required@@ -1151,10 +1150,8 @@ -- TYPE and CONSTRAINT are not Apart -- See Note [Type and Constraint are not apart] in GHC.Builtin.Types.Prim -- NB: at this point we know that the two TyCons do not match- | Just (tc1,_) <- mb_tc_app1, let u1 = tyConUnique tc1- , Just (tc2,_) <- mb_tc_app2, let u2 = tyConUnique tc2- , (u1 == tYPETyConKey && u2 == cONSTRAINTTyConKey) ||- (u2 == tYPETyConKey && u1 == cONSTRAINTTyConKey)+ | Just {} <- sORTKind_maybe ty1+ , Just {} <- sORTKind_maybe ty2 = maybeApart MARTypeVsConstraint -- We don't bother to look inside; wrinkle (W3) in GHC.Builtin.Types.Prim -- Note [Type and Constraint are not apart]@@ -1433,13 +1430,16 @@ newtype UM a = UM' { unUM :: UMState -> UnifyResultM (UMState, a) } -- See Note [The one-shot state monad trick] in GHC.Utils.Monad- deriving (Functor) pattern UM :: (UMState -> UnifyResultM (UMState, a)) -> UM a -- See Note [The one-shot state monad trick] in GHC.Utils.Monad pattern UM m <- UM' m where UM m = UM' (oneShot m)+{-# COMPLETE UM #-}++instance Functor UM where+ fmap f (UM m) = UM (\s -> fmap (\(s', v) -> (s', f v)) (m s)) instance Applicative UM where pure a = UM (\s -> pure (s, a))
GHC/Core/UsageEnv.hs view
@@ -6,17 +6,19 @@ , bottomUE , deleteUE , lookupUE+ , popUE , scaleUE , scaleUsage , supUE , supUEs- , unitUE+ , singleUsageUE , zeroUE ) where import Data.Foldable import GHC.Prelude import GHC.Core.Multiplicity+import GHC.Types.Var import GHC.Types.Name import GHC.Types.Name.Env import GHC.Utils.Outputable@@ -54,8 +56,13 @@ -- For now, we use extra multiplicity Bottom for empty case. data UsageEnv = UsageEnv !(NameEnv Mult) Bool -unitUE :: NamedThing n => n -> Mult -> UsageEnv-unitUE x w = UsageEnv (unitNameEnv (getName x) w) False+-- | Record a single usage of an Id, i.e. {n: 1}+-- Exception: We do not record external names (both GlobalIds and top-level LocalIds)+-- because they're not relevant to linearity checking.+singleUsageUE :: Id -> UsageEnv+singleUsageUE x | isExternalName n = zeroUE+ | otherwise = UsageEnv (unitNameEnv n OneTy) False+ where n = getName x zeroUE, bottomUE :: UsageEnv zeroUE = UsageEnv emptyNameEnv False@@ -97,6 +104,9 @@ case lookupNameEnv e (getName x) of Just w -> MUsage w Nothing -> if has_bottom then Bottom else Zero++popUE :: NamedThing n => UsageEnv -> n -> (Usage, UsageEnv)+popUE ue x = (lookupUE ue x, deleteUE ue x) instance Outputable UsageEnv where ppr (UsageEnv ne b) = text "UsageEnv:" <+> ppr ne <+> ppr b
GHC/Core/Utils.hs view
@@ -23,9 +23,9 @@ -- * Properties of expressions exprType, coreAltType, coreAltsType, mkLamType, mkLamTypes, mkFunctionType,- exprIsTrivial, getIdFromTrivialExpr, getIdFromTrivialExpr_maybe,- trivial_expr_fold,- exprIsDupable, exprIsCheap, exprIsExpandable, exprIsCheapX, CheapAppFun,+ exprIsDupable, exprIsTrivial, getIdFromTrivialExpr,+ getIdFromTrivialExpr_maybe,+ exprIsCheap, exprIsExpandable, exprIsCheapX, CheapAppFun, exprIsHNF, exprOkForSpeculation, exprOkForSideEffects, exprOkForSpecEval, exprIsWorkFree, exprIsConLike, isCheapApp, isExpandableApp, isSaturatedConApp,@@ -91,8 +91,7 @@ import GHC.Types.Tickish import GHC.Types.Id import GHC.Types.Id.Info-import GHC.Types.Basic( Arity, Levity(..)- )+import GHC.Types.Basic( Arity ) import GHC.Types.Unique import GHC.Types.Unique.Set import GHC.Types.Demand@@ -141,8 +140,7 @@ exprType e@(App _ _) = case collectArgs e of (fun, args) -> applyTypeToArgs (pprCoreExpr e) (exprType fun) args--exprType other = pprPanic "exprType" (pprCoreExpr other)+exprType (Type ty) = pprPanic "exprType" (ppr ty) coreAltType :: CoreAlt -> Type -- ^ Returns the type of the alternatives right hand side@@ -847,8 +845,9 @@ __DEFAULT -> () Namely, we do _not_ want to match on `A`, as it doesn't exist at the value- level!+ level! See wrinkle (W2b) in Note [Type data declarations] in GHC.Rename.Module + Note [Combine identical alternatives] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If several alternatives are identical, merge them into a single@@ -1047,37 +1046,20 @@ it off at source. -} -{-# INLINE trivial_expr_fold #-}-trivial_expr_fold :: (Id -> r) -> (Literal -> r) -> r -> r -> CoreExpr -> r--- ^ The worker function for Note [exprIsTrivial] and Note [getIdFromTrivialExpr]--- This is meant to have the code of both functions in one place and make it--- easy to derive custom predicates.------ (trivial_expr_fold k_id k_triv k_not_triv e)--- * returns (k_id x) if `e` is a variable `x` (with trivial wrapping)--- * returns (k_lit x) if `e` is a trivial literal `l` (with trivial wrapping)--- * returns k_triv if `e` is a literal, type, or coercion (with trivial wrapping)--- * returns k_not_triv otherwise------ where "trivial wrapping" is--- * Type application or abstraction--- * Ticks other than `tickishIsCode`--- * `case e of {}` an empty case-trivial_expr_fold k_id k_lit k_triv k_not_triv = go- where- go (Var v) = k_id v -- See Note [Variables are trivial]- go (Lit l) | litIsTrivial l = k_lit l- go (Type _) = k_triv- go (Coercion _) = k_triv- go (App f t) | not (isRuntimeArg t) = go f- go (Lam b e) | not (isRuntimeVar b) = go e- go (Tick t e) | not (tickishIsCode t) = go e -- See Note [Tick trivial]- go (Cast e _) = go e- go (Case e _ _ []) = go e -- See Note [Empty case is trivial]- go _ = k_not_triv- exprIsTrivial :: CoreExpr -> Bool-exprIsTrivial e = trivial_expr_fold (const True) (const True) True False e+-- If you modify this function, you may also+-- need to modify getIdFromTrivialExpr+exprIsTrivial (Var _) = True -- See Note [Variables are trivial]+exprIsTrivial (Type _) = True+exprIsTrivial (Coercion _) = True+exprIsTrivial (Lit lit) = litIsTrivial lit+exprIsTrivial (App e arg) = not (isRuntimeArg arg) && exprIsTrivial e+exprIsTrivial (Lam b e) = not (isRuntimeVar b) && exprIsTrivial e+exprIsTrivial (Tick t e) = not (tickishIsCode t) && exprIsTrivial e+ -- See Note [Tick trivial]+exprIsTrivial (Cast e _) = exprIsTrivial e+exprIsTrivial (Case e _ _ []) = exprIsTrivial e -- See Note [Empty case is trivial]+exprIsTrivial _ = False {- Note [getIdFromTrivialExpr]@@ -1097,13 +1079,24 @@ -} getIdFromTrivialExpr :: HasDebugCallStack => CoreExpr -> Id+getIdFromTrivialExpr e+ = fromMaybe (pprPanic "getIdFromTrivialExpr" (ppr e))+ (getIdFromTrivialExpr_maybe e)++getIdFromTrivialExpr_maybe :: CoreExpr -> Maybe Id -- See Note [getIdFromTrivialExpr]-getIdFromTrivialExpr e = trivial_expr_fold id (const panic) panic panic e+-- Th equations for this should line up with those for exprIsTrivial+getIdFromTrivialExpr_maybe e+ = go e where- panic = pprPanic "getIdFromTrivialExpr" (ppr e)+ go (App f t) | not (isRuntimeArg t) = go f+ go (Tick t e) | not (tickishIsCode t) = go e+ go (Cast e _) = go e+ go (Lam b e) | not (isRuntimeVar b) = go e+ go (Case e _ _ []) = go e+ go (Var v) = Just v+ go _ = Nothing -getIdFromTrivialExpr_maybe :: CoreExpr -> Maybe Id-getIdFromTrivialExpr_maybe e = trivial_expr_fold Just (const Nothing) Nothing Nothing e {- ********************************************************************* * *@@ -1613,10 +1606,19 @@ -- been expressed by its "wrapper", so we don't need -- to take the arguments into account + ClassOpId _ is_terminating_result+ | is_terminating_result -- See Note [exprOkForSpeculation and type classes]+ -> assertPpr (n_val_args == 1) (ppr fun $$ ppr args) $+ True+ -- assert: terminating result type => can't be applied;+ -- c.f the _other case below+ PrimOpId op _ | primOpIsDiv op- , [arg1, Lit lit] <- args- -> not (isZeroLit lit) && expr_ok fun_ok primop_ok arg1+ , Lit divisor <- last args+ -- there can be 2 args (most div primops) or 3 args+ -- (WordQuotRem2Op), hence the use of last/init+ -> not (isZeroLit divisor) && all (expr_ok fun_ok primop_ok) (init args) -- Special case for dividing operations that fail -- In general they are NOT ok-for-speculation -- (which primop_ok will catch), but they ARE OK@@ -1635,14 +1637,16 @@ -> primop_ok op -- Check the primop itself && and (zipWith arg_ok arg_tys args) -- Check the arguments - _ -- Unlifted types- -- c.f. the Var case of exprIsHNF- | Just Unlifted <- typeLevity_maybe (idType fun)+ _other -- Unlifted and terminating types;+ -- Also c.f. the Var case of exprIsHNF+ | isTerminatingType fun_ty -- See Note [exprOkForSpeculation and type classes]+ || definitelyUnliftedType fun_ty -> assertPpr (n_val_args == 0) (ppr fun $$ ppr args)- True -- Our only unlifted types are Int# etc, so will have- -- no value args. The assert is just to check this.- -- If we added unlifted function types this would change,- -- and we'd need to actually test n_val_args == 0.+ True -- Both terminating types (e.g. Eq a), and unlifted types (e.g. Int#)+ -- are non-functions and so will have no value args. The assert is+ -- just to check this.+ -- (If we added unlifted function types this would change,+ -- and we'd need to actually test n_val_args == 0.) -- Partial applications | idArity fun > n_val_args ->@@ -1657,14 +1661,15 @@ -- for evaluated-ness of the fun; -- see Note [exprOkForSpeculation and evaluated variables] where+ fun_ty = idType fun n_val_args = valArgCount args- (arg_tys, _) = splitPiTys (idType fun)+ (arg_tys, _) = splitPiTys fun_ty -- Used for arguments to primops and to partial applications arg_ok :: PiTyVarBinder -> CoreExpr -> Bool arg_ok (Named _) _ = True -- A type argument arg_ok (Anon ty _) arg -- A term argument- | Just Lifted <- typeLevity_maybe (scaledThing ty)+ | definitelyLiftedType (scaledThing ty) = True -- See Note [Primops with lifted arguments] | otherwise = expr_ok fun_ok primop_ok arg@@ -1694,8 +1699,36 @@ = hasNoBinding id && ( tickishFloatable t || isProfTick t ) -{- Note [exprOkForSpeculation: case expressions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+{- Note [exprOkForSpeculation and type classes]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (#22745, #15205)++ \(d :: C a b). case eq_sel (sc_sel d) of+ (co :: t1 ~# t2) [Dead] -> blah++We know that+* eq_sel's argument (sc_sel d) has dictionary type, so it definitely terminates+ (again Note [NON-BOTTOM-DICTS invariant] in GHC.Core)+* eq_sel is simply a superclass selector, and hence is fast+* The field that eq_sel picks is of unlifted type, and hence can't be bottom+ (remember the dictionary argument itself is non-bottom)++So we can treat (eq_sel (sc_sel d)) as ok-for-speculation. We must check++a) That the function is a class-op, with IdDetails of ClassOpId++b) That the result type of the class-op is terminating or unlifted. E.g. for+ class C a => D a where ...+ class C a where { op :: a -> a }+ Since C is represented by a newtype, (sc_sel (d :: D a)) might+ not be terminating.++Rather than repeatedly test if the result of the class-op is a+terminating/unlifted type, we cache it as a field of ClassOpId. See+GHC.Types.Id.Make.mkDictSelId for where this field is initialised.++Note [exprOkForSpeculation: case expressions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ exprOkForSpeculation accepts very special case expressions. Reason: (a ==# b) is ok-for-speculation, but the litEq rules in GHC.Core.Opt.ConstantFold convert it (a ==# 3#) to@@ -1920,7 +1953,8 @@ -- We don't look through loop breakers here, which is a bit conservative -- but otherwise I worry that if an Id's unfolding is just itself, -- we could get an infinite loop- || ( typeLevity_maybe (idType v) == Just Unlifted )++ || definitelyUnliftedType (idType v) -- Unlifted binders are always evaluated (#20140) is_hnf_like (Lit l) = not (isLitRubbish l)@@ -2091,9 +2125,8 @@ arg_ids = zipWith4 mk_id_var id_uniqs id_fss arg_tys arg_strs mk_id_var uniq fs (Scaled m ty) str = setCaseBndrEvald str $ -- See Note [Mark evaluated arguments]- mkLocalIdOrCoVar name (mult `mkMultMul` m) (Type.substTy full_subst ty)- where- name = mkInternalName uniq (mkVarOccFS fs) noSrcSpan+ mkUserLocalOrCoVar (mkVarOccFS fs) uniq+ (mult `mkMultMul` m) (Type.substTy full_subst ty) noSrcSpan {- Note [Mark evaluated arguments]
GHC/CoreToIface.hs view
@@ -49,8 +49,6 @@ import GHC.Prelude -import Data.Word- import GHC.StgToCmm.Types import GHC.ByteCode.Types@@ -87,6 +85,7 @@ import GHC.Utils.Outputable import GHC.Utils.Panic+import GHC.Utils.Panic.Plain import GHC.Utils.Misc import Data.Maybe ( isNothing, catMaybes )@@ -359,12 +358,8 @@ ts' = go (extendTCvSubst env tv t) res ts go env (FunTy { ft_af = af, ft_res = res }) (t:ts)- = IA_Arg (toIfaceTypeX fr t) argf (go env res ts)- where- argf | isVisibleFunArg af = Required- | otherwise = Inferred- -- It's rare for a kind to have a constraint argument, but it- -- can happen. See Note [AnonTCB with constraint arg] in GHC.Core.TyCon.+ = assert (isVisibleFunArg af)+ IA_Arg (toIfaceTypeX fr t) Required (go env res ts) go env ty ts@(t1:ts1) | not (isEmptyTCvSubst env)@@ -455,14 +450,15 @@ toIfaceIdDetails :: IdDetails -> IfaceIdDetails toIfaceIdDetails VanillaId = IfVanillaId-toIfaceIdDetails (WorkerLikeId dmds) = IfWorkerLikeId dmds+toIfaceIdDetails (WorkerLikeId dmds) = IfWorkerLikeId dmds toIfaceIdDetails (DFunId {}) = IfDFunId toIfaceIdDetails (RecSelId { sel_naughty = n- , sel_tycon = tc }) =- let iface = case tc of- RecSelData ty_con -> Left (toIfaceTyCon ty_con)- RecSelPatSyn pat_syn -> Right (patSynToIfaceDecl pat_syn)- in IfRecSelId iface n+ , sel_tycon = tc+ , sel_fieldLabel = fl }) =+ let (iface, first_con) = case tc of+ RecSelData ty_con -> ( Left (toIfaceTyCon ty_con), dataConName $ head $ tyConDataCons ty_con)+ RecSelPatSyn pat_syn -> ( Right (patSynToIfaceDecl pat_syn), patSynName pat_syn)+ in IfRecSelId iface first_con n fl -- The remaining cases are all "implicit Ids" which don't -- appear in interface files at all@@ -580,7 +576,7 @@ toIfaceTickish :: CoreTickish -> Maybe IfaceTickish toIfaceTickish (ProfNote cc tick push) = Just (IfaceSCC cc tick push) toIfaceTickish (HpcTick modl ix) = Just (IfaceHpcTick modl ix)-toIfaceTickish (SourceNote src names) = Just (IfaceSource src names)+toIfaceTickish (SourceNote src (LexicalFastString names)) = Just (IfaceSource src names) toIfaceTickish (Breakpoint {}) = Nothing -- Ignore breakpoints, since they are relevant only to GHCi, and -- should not be serialised (#8333)@@ -664,7 +660,7 @@ -- Foreign calls have special syntax | isExternalName name = IfaceExt name- | otherwise = IfaceLcl (getOccFS name)+ | otherwise = IfaceLcl (occNameFS $ nameOccName name) where name = idName v ty = idType v@@ -700,7 +696,7 @@ -- Dehydrating CgBreakInfo -dehydrateCgBreakInfo :: [TyVar] -> [Maybe (Id, Word16)] -> Type -> CgBreakInfo+dehydrateCgBreakInfo :: [TyVar] -> [Maybe (Id, Word)] -> Type -> CgBreakInfo dehydrateCgBreakInfo ty_vars idOffSets tick_ty = CgBreakInfo { cgb_tyvars = map toIfaceTvBndr ty_vars
GHC/CoreToStg.hs view
@@ -19,7 +19,8 @@ import GHC.Prelude import GHC.Core-import GHC.Core.Utils+import GHC.Core.Utils ( exprType, findDefault, isJoinBind+ , exprIsTickedString_maybe ) import GHC.Core.Opt.Arity ( manifestArity ) import GHC.Core.Type import GHC.Core.TyCon@@ -48,7 +49,7 @@ import GHC.Data.FastString import GHC.Platform ( Platform ) import GHC.Platform.Ways-import GHC.Builtin.PrimOps+import GHC.Builtin.PrimOps ( PrimCall(..), primOpWrapperId ) import GHC.Utils.Outputable import GHC.Utils.Monad@@ -573,19 +574,6 @@ -- This is the guy that turns applications into A-normal form -- --------------------------------------------------------------------------- -getStgArgFromTrivialArg :: HasDebugCallStack => CoreArg -> StgArg--- A (non-erased) trivial CoreArg corresponds to an atomic StgArg.--- CoreArgs may not immediately look trivial, e.g., `case e of {}` or--- `case unsafeequalityProof of UnsafeRefl -> e` might intervene.--- Good thing we can just call `trivial_expr_fold` here.-getStgArgFromTrivialArg e- | Just s <- exprIsTickedString_maybe e -- This case is just for backport to GHC 9.8,- = StgLitArg (LitString s) -- where we used to treat strings as valid StgArgs- | otherwise- = trivial_expr_fold StgVarArg StgLitArg panic panic e- where- panic = pprPanic "getStgArgFromTrivialArg" (ppr e)- coreToStgArgs :: [CoreArg] -> CtsM ([StgArg], [StgTickish]) coreToStgArgs [] = return ([], [])@@ -598,29 +586,42 @@ = do { (args', ts) <- coreToStgArgs args ; return (StgVarArg coercionTokenId : args', ts) } +coreToStgArgs (Tick t e : args)+ = assert (not (tickishIsCode t)) $+ do { (args', ts) <- coreToStgArgs (e : args)+ ; let !t' = coreToStgTick (exprType e) t+ ; return (args', t':ts) }+ coreToStgArgs (arg : args) = do -- Non-type argument (stg_args, ticks) <- coreToStgArgs args- -- We know that `arg` must be trivial, but it may contain Ticks.- -- Example from test case `decodeMyStack`:- -- $ @... ((src<decodeMyStack.hs:18:26-28> Data.Tuple.snd) @Int @[..])- -- Note that unfortunately the Tick is not at the top.- -- So we'll traverse the expression twice:- -- * Once with `stripTicksT` (which collects *all* ticks from the expression)- -- * and another time with `getStgArgFromTrivialArg`.- -- Since the argument is trivial, the only place the Tick can occur is- -- somehow wrapping a variable (give or take type args, as above).+ arg' <- coreToStgExpr arg+ let+ (aticks, arg'') = stripStgTicksTop tickishFloatable arg'+ stg_arg = case arg'' of+ StgApp v [] -> StgVarArg v+ StgConApp con _ [] _ -> StgVarArg (dataConWorkId con)+ StgOpApp (StgPrimOp op) [] _ -> StgVarArg (primOpWrapperId op)+ StgLit lit -> StgLitArg lit+ _ -> pprPanic "coreToStgArgs" (ppr arg $$ pprStgExpr panicStgPprOpts arg' $$ pprStgExpr panicStgPprOpts arg'')++ -- WARNING: what if we have an argument like (v `cast` co)+ -- where 'co' changes the representation type?+ -- (This really only happens if co is unsafe.)+ -- Then all the getArgAmode stuff in CgBindery will set the+ -- cg_rep of the CgIdInfo based on the type of v, rather+ -- than the type of 'co'.+ -- This matters particularly when the function is a primop+ -- or foreign call.+ -- Wanted: a better solution than this hacky warning+ platform <- getPlatform- let arg_ty = exprType arg- ticks' = map (coreToStgTick arg_ty) (stripTicksT (not . tickishIsCode) arg)- arg' = getStgArgFromTrivialArg arg- arg_rep = typePrimRep arg_ty- stg_arg_rep = typePrimRep (stgArgType arg')+ let+ arg_rep = typePrimRep (exprType arg)+ stg_arg_rep = typePrimRep (stgArgType stg_arg) bad_args = not (primRepsCompatible platform arg_rep stg_arg_rep) - massertPpr (length ticks' <= 1) (text "More than one Tick in trivial arg:" <+> ppr arg)- warnPprTrace bad_args "Dangerous-looking argument. Probable cause: bad unsafeCoerce#" (ppr arg) (return ())-- return (arg' : stg_args, ticks' ++ ticks)+ warnPprTrace bad_args "Dangerous-looking argument. Probable cause: bad unsafeCoerce#" (ppr arg) $+ return (stg_arg : stg_args, ticks ++ aticks) coreToStgTick :: Type -- type of the ticked expression -> CoreTickish@@ -690,7 +691,7 @@ return (mkStgRhs bndr new_rhs) -- Represents the RHS of a binding for use with mk(Top)StgRhs.-data PreStgRhs = PreStgRhs [Id] StgExpr -- The [Id] is empty for thunks+data PreStgRhs = PreStgRhs [Id] StgExpr Type -- The [Id] is empty for thunks -- Convert the RHS of a binding from Core to STG. This is a wrapper around -- coreToStgExpr that can handle value lambdas.@@ -698,7 +699,7 @@ coreToPreStgRhs expr = extendVarEnvCts [ (a, LambdaBound) | a <- args' ] $ do { body' <- coreToStgExpr body- ; return (PreStgRhs args' body') }+ ; return (PreStgRhs args' body' (exprType body)) } where (args, body) = myCollectBinders expr args' = filterStgBinders args@@ -712,13 +713,13 @@ { coreToStg_platform = platform , coreToStg_ExternalDynamicRefs = opt_ExternalDynamicRefs , coreToStg_AutoSccsOnIndividualCafs = opt_AutoSccsOnIndividualCafs- } this_mod ccs bndr (PreStgRhs bndrs rhs)+ } this_mod ccs bndr (PreStgRhs bndrs rhs typ) | not (null bndrs) = -- The list of arguments is non-empty, so not CAF ( StgRhsClosure noExtFieldSilent dontCareCCS ReEntrant- bndrs rhs+ bndrs rhs typ , ccs ) -- After this point we know that `bndrs` is empty,@@ -729,19 +730,19 @@ = -- CorePrep does this right, but just to make sure assertPpr (not (isUnboxedTupleDataCon con || isUnboxedSumDataCon con)) (ppr bndr $$ ppr con $$ ppr args)- ( StgRhsCon dontCareCCS con mn ticks args, ccs )+ ( StgRhsCon dontCareCCS con mn ticks args typ, ccs ) -- Otherwise it's a CAF, see Note [Cost-centre initialization plan]. | opt_AutoSccsOnIndividualCafs = ( StgRhsClosure noExtFieldSilent caf_ccs- upd_flag [] rhs+ upd_flag [] rhs typ , collectCC caf_cc caf_ccs ccs ) | otherwise = ( StgRhsClosure noExtFieldSilent all_cafs_ccs- upd_flag [] rhs+ upd_flag [] rhs typ , ccs ) where@@ -765,12 +766,12 @@ -- Generate a non-top-level RHS. Cost-centre is always currentCCS, -- see Note [Cost-centre initialization plan]. mkStgRhs :: Id -> PreStgRhs -> StgRhs-mkStgRhs bndr (PreStgRhs bndrs rhs)+mkStgRhs bndr (PreStgRhs bndrs rhs typ) | not (null bndrs) = StgRhsClosure noExtFieldSilent currentCCS ReEntrant- bndrs rhs+ bndrs rhs typ -- After this point we know that `bndrs` is empty, -- so this is not a function binding@@ -781,15 +782,15 @@ StgRhsClosure noExtFieldSilent currentCCS ReEntrant -- ignored for LNE- [] rhs+ [] rhs typ | StgConApp con mn args _ <- unticked_rhs- = StgRhsCon currentCCS con mn ticks args+ = StgRhsCon currentCCS con mn ticks args typ | otherwise = StgRhsClosure noExtFieldSilent currentCCS- upd_flag [] rhs+ upd_flag [] rhs typ where (ticks, unticked_rhs) = stripStgTicksTop (not . tickishIsCode) rhs
GHC/CoreToStg/Prep.hs view
@@ -314,7 +314,7 @@ | Just file <- ml_hs_file mod_loc = tick (span1 file) | otherwise = tick (span1 "???") where tick span = Tick $ SourceNote span $- renderWithContext defaultSDocContext $ ppr name+ LexicalFastString $ mkFastString $ renderWithContext defaultSDocContext $ ppr name span1 file = realSrcLocSpan $ mkRealSrcLoc (mkFastString file) 1 1 {-@@ -1648,13 +1648,17 @@ most code paths anyway, we get to turn the unknown eval in the callee into a known call at the call site. -However, we must be very careful not to speculate recursive calls!-Doing so might well change termination behavior.+Very Nasty Wrinkle +We must be very careful not to speculate recursive calls! Doing so+might well change termination behavior.+ That comes up in practice for DFuns, which are considered ok-for-spec, because they always immediately return a constructor.-Not so if you speculate the recursive call, as #20836 shows:+See Note [NON-BOTTOM-DICTS invariant] in GHC.Core. +But not so if you speculate the recursive call, as #20836 shows:+ class Foo m => Foo m where runFoo :: m a -> m a newtype Trans m a = Trans { runTrans :: m a }@@ -1711,17 +1715,6 @@ It is also similar to Note [Do not strictify a DFun's parameter dictionaries], where marking recursive DFuns (of undecidable *instances*) strict in dictionary *parameters* leads to quite the same change in termination as above.--Note [Controlling Speculative Evaluation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--Most of the time, speculative evaluation has a positive effect on performance,-but we have found a case where speculative evaluation of dictionary functions-leads to a performance regression #25284.--Therefore we have some flags to control it. See the optimization section in-the User's Guide for the description of these flags and when to use them.- -} data FloatingBind@@ -1796,15 +1789,7 @@ where is_hnf = exprIsHNF rhs is_strict = isStrUsedDmd dmd- cfg = cpe_config env-- ok_for_spec = exprOkForSpecEval call_ok_for_spec rhs- -- See Note [Controlling Speculative Evaluation]- call_ok_for_spec x- | is_rec_call x = False- | not (cp_specEval cfg) = False- | not (cp_specEvalDFun cfg) && isDFunId x = False- | otherwise = True+ ok_for_spec = exprOkForSpecEval (not . is_rec_call) rhs is_rec_call = (`elemUnVarSet` cpe_rec_ids env) emptyFloats :: Floats@@ -1992,12 +1977,6 @@ , cp_convertNumLit :: !(LitNumType -> Integer -> Maybe CoreExpr) -- ^ Convert some numeric literals (Integer, Natural) into their final -- Core form.-- , cp_specEval :: !Bool- -- ^ Whether to perform speculative evaluation- -- See Note [Controlling Speculative Evaluation]- , cp_specEvalDFun :: !Bool- -- ^ Whether to perform speculative evaluation on DFuns } data CorePrepEnv@@ -2129,9 +2108,9 @@ { tcm_tyvar = \env tv -> return (lookup_tce_tv env tv) , tcm_covar = \env cv -> return (lookup_tce_cv env cv) , tcm_hole = \_ hole -> pprPanic "subst_co_mapper:hole" (ppr hole)- , tcm_tycobinder = \env tcv _vis -> if isTyVar tcv- then return (subst_tv_bndr env tcv)- else return (subst_cv_bndr env tcv)+ , tcm_tycobinder = \env tcv _vis k -> if isTyVar tcv+ then uncurry k (subst_tv_bndr env tcv)+ else uncurry k (subst_cv_bndr env tcv) , tcm_tycon = \tc -> return tc } subst_ty :: CpeTyCoEnv -> Type -> Identity Type
GHC/Data/Bag.hs view
@@ -12,14 +12,14 @@ Bag, -- abstract type emptyBag, unitBag, unionBags, unionManyBags,- mapBag,+ mapBag, pprBag, elemBag, lengthBag, filterBag, partitionBag, partitionBagWith, concatBag, catBagMaybes, foldBag, isEmptyBag, isSingletonBag, consBag, snocBag, anyBag, allBag, listToBag, nonEmptyToBag, bagToList, headMaybe, mapAccumBagL,- concatMapBag, concatMapBagPair, mapMaybeBag, unzipBag,- mapBagM, mapBagM_,+ concatMapBag, concatMapBagPair, mapMaybeBag, mapMaybeBagM, unzipBag,+ mapBagM, mapBagM_, lookupBag, flatMapBagM, flatMapBagPairM, mapAndUnzipBagM, mapAccumBagLM, anyBagM, filterBagM@@ -38,7 +38,7 @@ import Data.List.NonEmpty ( NonEmpty(..) ) import qualified Data.List.NonEmpty as NE import qualified Data.Semigroup ( (<>) )-import Control.DeepSeq+import Control.Applicative( Alternative( (<|>) ) ) infixr 3 `consBag` infixl 3 `snocBag`@@ -50,12 +50,6 @@ | ListBag (NonEmpty a) deriving (Foldable, Functor, Traversable) -instance NFData a => NFData (Bag a) where- rnf EmptyBag = ()- rnf (UnitBag a) = rnf a- rnf (TwoBags a b) = rnf a `seq` rnf b- rnf (ListBag a) = rnf a- emptyBag :: Bag a emptyBag = EmptyBag @@ -121,7 +115,19 @@ filterBagM pred (ListBag vs) = do sat <- filterM pred (toList vs) return (listToBag sat)+{-# INLINEABLE filterBagM #-} +lookupBag :: Eq a => a -> Bag (a,b) -> Maybe b+lookupBag _ EmptyBag = Nothing+lookupBag k (UnitBag kv) = lookup_one k kv+lookupBag k (TwoBags b1 b2) = lookupBag k b1 <|> lookupBag k b2+lookupBag k (ListBag xs) = foldr ((<|>) . lookup_one k) Nothing xs+{-# INLINEABLE lookupBag #-}++lookup_one :: Eq a => a -> (a,b) -> Maybe b+lookup_one k (k',v) | k==k' = Just v+ | otherwise = Nothing+ allBag :: (a -> Bool) -> Bag a -> Bool allBag _ EmptyBag = True allBag p (UnitBag v) = p v@@ -141,6 +147,7 @@ if flag then return True else anyBagM p b2 anyBagM p (ListBag xs) = anyM p xs+{-# INLINEABLE anyBagM #-} concatBag :: Bag (Bag a) -> Bag a concatBag = foldr unionBags emptyBag@@ -228,6 +235,17 @@ mapMaybeBag f (TwoBags b1 b2) = unionBags (mapMaybeBag f b1) (mapMaybeBag f b2) mapMaybeBag f (ListBag xs) = listToBag $ mapMaybe f (toList xs) +mapMaybeBagM :: Monad m => (a -> m (Maybe b)) -> Bag a -> m (Bag b)+mapMaybeBagM _ EmptyBag = return EmptyBag+mapMaybeBagM f (UnitBag x) = do r <- f x+ return $ case r of+ Nothing -> EmptyBag+ Just y -> UnitBag y+mapMaybeBagM f (TwoBags b1 b2) = do r1 <- mapMaybeBagM f b1+ r2 <- mapMaybeBagM f b2+ return $ unionBags r1 r2+mapMaybeBagM f (ListBag xs) = listToBag <$> mapMaybeM f (toList xs)+ mapBagM :: Monad m => (a -> m b) -> Bag a -> m (Bag b) mapBagM _ EmptyBag = return EmptyBag mapBagM f (UnitBag x) = do r <- f x@@ -237,12 +255,14 @@ return (TwoBags r1 r2) mapBagM f (ListBag xs) = do rs <- mapM f xs return (ListBag rs)+{-# INLINEABLE mapBagM #-} mapBagM_ :: Monad m => (a -> m b) -> Bag a -> m () mapBagM_ _ EmptyBag = return () mapBagM_ f (UnitBag x) = f x >> return () mapBagM_ f (TwoBags b1 b2) = mapBagM_ f b1 >> mapBagM_ f b2 mapBagM_ f (ListBag xs) = mapM_ f xs+{-# INLINEABLE mapBagM_ #-} flatMapBagM :: Monad m => (a -> m (Bag b)) -> Bag a -> m (Bag b) flatMapBagM _ EmptyBag = return EmptyBag@@ -253,6 +273,7 @@ flatMapBagM f (ListBag xs) = foldrM k EmptyBag xs where k x b2 = do { b1 <- f x; return (b1 `unionBags` b2) }+{-# INLINEABLE flatMapBagM #-} flatMapBagPairM :: Monad m => (a -> m (Bag b, Bag c)) -> Bag a -> m (Bag b, Bag c) flatMapBagPairM _ EmptyBag = return (EmptyBag, EmptyBag)@@ -264,6 +285,7 @@ where k x (r2,s2) = do { (r1,s1) <- f x ; return (r1 `unionBags` r2, s1 `unionBags` s2) }+{-# INLINEABLE flatMapBagPairM #-} mapAndUnzipBagM :: Monad m => (a -> m (b,c)) -> Bag a -> m (Bag b, Bag c) mapAndUnzipBagM _ EmptyBag = return (EmptyBag, EmptyBag)@@ -275,6 +297,7 @@ mapAndUnzipBagM f (ListBag xs) = do ts <- mapM f xs let (rs,ss) = NE.unzip ts return (ListBag rs, ListBag ss)+{-# INLINEABLE mapAndUnzipBagM #-} mapAccumBagL ::(acc -> x -> (acc, y)) -- ^ combining function -> acc -- ^ initial state@@ -300,6 +323,7 @@ ; return (s2, TwoBags b1' b2') } mapAccumBagLM f s (ListBag xs) = do { (s', xs') <- mapAccumLM f s xs ; return (s', ListBag xs') }+{-# INLINEABLE mapAccumBagLM #-} listToBag :: [a] -> Bag a listToBag [] = EmptyBag@@ -331,7 +355,10 @@ headMaybe (ListBag (v:|_)) = Just v instance (Outputable a) => Outputable (Bag a) where- ppr bag = braces (pprWithCommas ppr (bagToList bag))+ ppr = pprBag++pprBag :: Outputable a => Bag a -> SDoc+pprBag bag = braces (pprWithCommas ppr (bagToList bag)) instance Data a => Data (Bag a) where gfoldl k z b = z listToBag `k` bagToList b -- traverse abstract type abstractly
GHC/Data/BooleanFormula.hs view
@@ -24,8 +24,7 @@ import GHC.Utils.Monad import GHC.Utils.Outputable-import GHC.Utils.Binary-import GHC.Parser.Annotation ( LocatedL, noLocA )+import GHC.Parser.Annotation ( LocatedL ) import GHC.Types.SrcLoc import GHC.Types.Unique import GHC.Types.Unique.Set@@ -243,22 +242,3 @@ go (Or []) = keyword $ text "FALSE" go (Or xs) = fsep $ intersperse vbar (map (go . unLoc) xs) go (Parens x) = parens (go $ unLoc x)---------------------------------------------------------------------------- Binary-------------------------------------------------------------------------instance Binary a => Binary (BooleanFormula a) where- put_ bh (Var x) = putByte bh 0 >> put_ bh x- put_ bh (And xs) = putByte bh 1 >> put_ bh (unLoc <$> xs)- put_ bh (Or xs) = putByte bh 2 >> put_ bh (unLoc <$> xs)- put_ bh (Parens x) = putByte bh 3 >> put_ bh (unLoc x)-- get bh = do- h <- getByte bh- case h of- 0 -> Var <$> get bh- 1 -> And . fmap noLocA <$> get bh- 2 -> Or . fmap noLocA <$> get bh- _ -> Parens . noLocA <$> get bh
GHC/Data/FastString.hs view
@@ -52,6 +52,9 @@ fastStringToShortByteString, mkFastStringShortByteString, + -- * ShortText+ fastStringToShortText,+ -- * FastZString FastZString, hPutFZS,@@ -130,6 +133,7 @@ #if !MIN_VERSION_bytestring(0,11,0) import qualified Data.ByteString.Short.Internal as SBS #endif+import GHC.Data.ShortText (ShortText(..)) import Foreign.C import System.IO import Data.Data@@ -159,6 +163,9 @@ fastStringToShortByteString :: FastString -> ShortByteString fastStringToShortByteString = fs_sbs +fastStringToShortText :: FastString -> ShortText+fastStringToShortText = ShortText . fs_sbs+ fastZStringToByteString :: FastZString -> ByteString fastZStringToByteString (FastZString bs) = bs @@ -412,7 +419,8 @@ be looked up /by the plugin/. let rdrName = mkModuleName "GHC.NT.Type" `mkRdrQual` mkTcOcc "NT"- putMsgS $ showSDoc dflags $ ppr $ lookupGRE_RdrName rdrName $ mg_rdr_env guts+ putMsgS $ showSDoc dflags $ ppr $+ lookupGRE (mg_rdr_env guts) (LookupRdrName rdrName AllRelevantGREs) `mkTcOcc` involves the lookup (or creation) of a FastString. Since the plugin's FastString.string_table is empty, constructing the RdrName also
GHC/Data/FastString/Env.hs view
@@ -18,7 +18,8 @@ filterFsEnv, plusFsEnv, plusFsEnv_C, alterFsEnv, lookupFsEnv, lookupFsEnv_NF, delFromFsEnv, delListFromFsEnv,- elemFsEnv, mapFsEnv,+ elemFsEnv, mapFsEnv, strictMapFsEnv, mapMaybeFsEnv,+ nonDetFoldFsEnv, -- * Deterministic FastString environments (maps) DFastStringEnv,@@ -60,6 +61,7 @@ lookupFsEnv_NF :: FastStringEnv a -> FastString -> a filterFsEnv :: (elt -> Bool) -> FastStringEnv elt -> FastStringEnv elt mapFsEnv :: (elt1 -> elt2) -> FastStringEnv elt1 -> FastStringEnv elt2+mapMaybeFsEnv :: (elt1 -> Maybe elt2) -> FastStringEnv elt1 -> FastStringEnv elt2 emptyFsEnv = emptyUFM unitFsEnv x y = unitUFM x y@@ -78,8 +80,19 @@ delFromFsEnv x y = delFromUFM x y delListFromFsEnv x y = delListFromUFM x y filterFsEnv x y = filterUFM x y+mapMaybeFsEnv f x = mapMaybeUFM f x lookupFsEnv_NF env n = expectJust "lookupFsEnv_NF" (lookupFsEnv env n)++strictMapFsEnv :: (a -> b) -> FastStringEnv a -> FastStringEnv b+strictMapFsEnv = strictMapUFM++-- | Fold over a 'FastStringEnv'.+--+-- Non-deterministic, unless the folding function is commutative+-- (i.e. @a1 `f` ( a2 `f` b ) == a2 `f` ( a1 `f` b )@ for all @a1@, @a2@, @b@).+nonDetFoldFsEnv :: (a -> b -> b) -> b -> FastStringEnv a -> b+nonDetFoldFsEnv = nonDetFoldUFM -- Deterministic FastStringEnv -- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why we need
GHC/Data/Graph/Directed.hs view
@@ -4,6 +4,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE DeriveFunctor #-} module GHC.Data.Graph.Directed ( Graph, graphFromEdgedVerticesOrd, graphFromEdgedVerticesUniq,@@ -45,7 +46,7 @@ import GHC.Prelude -import GHC.Utils.Misc ( sortWith, count )+import GHC.Utils.Misc ( minWith, count ) import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Data.Maybe ( expectJust )@@ -108,7 +109,7 @@ node_payload :: payload, -- ^ User data node_key :: key, -- ^ User defined node id node_dependencies :: [key] -- ^ Dependencies/successors of the node- }+ } deriving Functor instance (Outputable a, Outputable b) => Outputable (Node a b) where@@ -218,52 +219,47 @@ [payload]) -- Rest of the path; -- [a,b,c] means c depends on b, b depends on a --- | Find a reasonably short cycle a->b->c->a, in a graph--- The graph might not necessarily be strongly connected.+-- | Find a reasonably short cycle a->b->c->a, in a strongly+-- connected component. The input nodes are presumed to be+-- a SCC, so you can start anywhere. findCycle :: forall payload key. Ord key => [Node key payload] -- The nodes. The dependencies can -- contain extra keys, which are ignored -> Maybe [payload] -- A cycle, starting with node -- so each depends on the next findCycle graph- = goRoots plausible_roots+ = go Set.empty (new_work root_deps []) [] where env :: Map.Map key (Node key payload) env = Map.fromList [ (node_key node, node) | node <- graph ] - goRoots [] = Nothing- goRoots (root:xs) =- case go Set.empty (new_work root_deps []) [] of- Nothing -> goRoots xs- Just res -> Just res- where- DigraphNode root_payload root_key root_deps = root- -- 'go' implements Dijkstra's algorithm, more or less- go :: Set.Set key -- Visited- -> [WorkItem key payload] -- Work list, items length n- -> [WorkItem key payload] -- Work list, items length n+1- -> Maybe [payload] -- Returned cycle- -- Invariant: in a call (go visited ps qs),- -- visited = union (map tail (ps ++ qs))-- go _ [] [] = Nothing -- No cycles- go visited [] qs = go visited qs []- go visited (((DigraphNode payload key deps), path) : ps) qs- | key == root_key = Just (root_payload : reverse path)- | key `Set.member` visited = go visited ps qs- | key `Map.notMember` env = go visited ps qs- | otherwise = go (Set.insert key visited)- ps (new_qs ++ qs)- where- new_qs = new_work deps (payload : path)+ -- Find the node with fewest dependencies among the SCC modules+ -- This is just a heuristic to find some plausible root module+ root :: Node key payload+ root = fst (minWith snd [ (node, count (`Map.member` env)+ (node_dependencies node))+ | node <- graph ])+ DigraphNode root_payload root_key root_deps = root - -- Find the nodes with fewest dependencies among the SCC modules- -- This is just a heuristic to find some plausible root module- plausible_roots :: [Node key payload]- plausible_roots = map fst (sortWith snd [ (node, count (`Map.member` env) (node_dependencies node))- | node <- graph ])+ -- 'go' implements Dijkstra's algorithm, more or less+ go :: Set.Set key -- Visited+ -> [WorkItem key payload] -- Work list, items length n+ -> [WorkItem key payload] -- Work list, items length n+1+ -> Maybe [payload] -- Returned cycle+ -- Invariant: in a call (go visited ps qs),+ -- visited = union (map tail (ps ++ qs)) + go _ [] [] = Nothing -- No cycles+ go visited [] qs = go visited qs []+ go visited (((DigraphNode payload key deps), path) : ps) qs+ | key == root_key = Just (root_payload : reverse path)+ | key `Set.member` visited = go visited ps qs+ | key `Map.notMember` env = go visited ps qs+ | otherwise = go (Set.insert key visited)+ ps (new_qs ++ qs)+ where+ new_qs = new_work deps (payload : path) new_work :: [key] -> [payload] -> [WorkItem key payload] new_work deps path = [ (n, path) | Just n <- map (`Map.lookup` env) deps ]
GHC/Data/Graph/UnVar.hs view
@@ -35,9 +35,8 @@ import GHC.Types.Var import GHC.Utils.Outputable import GHC.Types.Unique-import GHC.Word -import qualified GHC.Data.Word64Set as S+import qualified Data.IntSet as S -- We need a type for sets of variables (UnVarSet). -- We do not use VarSet, because for that we need to have the actual variable@@ -45,10 +44,10 @@ -- Therefore, use a IntSet directly (which is likely also a bit more efficient). -- Set of uniques, i.e. for adjacent nodes-newtype UnVarSet = UnVarSet S.Word64Set+newtype UnVarSet = UnVarSet (S.IntSet) deriving Eq -k :: Var -> Word64+k :: Var -> Int k v = getKey (getUnique v) domUFMUnVarSet :: UniqFM key elt -> UnVarSet@@ -93,7 +92,7 @@ instance Outputable UnVarSet where ppr (UnVarSet s) = braces $- hcat $ punctuate comma [ ppr (mkUniqueGrimily i) | i <- S.toList s]+ hcat $ punctuate comma [ ppr (getUnique i) | i <- S.toList s] data UnVarGraph = CBPG !UnVarSet !UnVarSet -- ^ complete bipartite graph | CG !UnVarSet -- ^ complete graph
GHC/Data/IOEnv.hs view
@@ -28,13 +28,13 @@ tryM, tryAllM, tryMostM, fixM, -- I/O operations- IORef, newMutVar, readMutVar, writeMutVar, updMutVar, updMutVarM,+ IORef, newMutVar, readMutVar, writeMutVar, updMutVar, atomicUpdMutVar, atomicUpdMutVar' ) where import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import {-# SOURCE #-} GHC.Driver.Hooks import GHC.IO (catchException) import GHC.Utils.Exception@@ -226,12 +226,6 @@ updMutVar :: IORef a -> (a -> a) -> IOEnv env () updMutVar var upd = liftIO (modifyIORef var upd)--updMutVarM :: IORef a -> (a -> IOEnv env a) -> IOEnv env ()-updMutVarM ref upd- = do { contents <- liftIO $ readIORef ref- ; new_contents <- upd contents- ; liftIO $ writeIORef ref new_contents } -- | Atomically update the reference. Does not force the evaluation of the -- new variable contents. For strict update, use 'atomicUpdMutVar''.
GHC/Data/List/SetOps.hs view
@@ -18,7 +18,7 @@ Assoc, assoc, assocMaybe, assocUsing, assocDefault, assocDefaultUsing, -- Duplicate handling- hasNoDups, removeDups, nubOrdBy, findDupsEq,+ hasNoDups, removeDups, removeDupsOn, nubOrdBy, findDupsEq, equivClasses, -- Indexing@@ -37,6 +37,7 @@ import qualified Data.List as L import qualified Data.List.NonEmpty as NE import Data.List.NonEmpty (NonEmpty(..))+import Data.Ord (comparing) import qualified Data.Set as S getNth :: Outputable a => [a] -> Int -> a@@ -192,6 +193,9 @@ collect_dups :: [NonEmpty a] -> NonEmpty a -> ([NonEmpty a], a) collect_dups dups_so_far (x :| []) = (dups_so_far, x) collect_dups dups_so_far dups@(x :| _) = (dups:dups_so_far, x)++removeDupsOn :: Ord b => (a -> b) -> [a] -> ([a], [NonEmpty a])+removeDupsOn f x = removeDups (comparing f) x -- | Remove the duplicates from a list using the provided -- comparison function.
GHC/Data/Maybe.hs view
@@ -35,6 +35,7 @@ import Data.Foldable ( foldlM, for_ ) import GHC.Utils.Misc (HasCallStack) import Data.List.NonEmpty ( NonEmpty )+import Control.Applicative( Alternative( (<|>) ) ) infixr 4 `orElse` @@ -47,7 +48,7 @@ -} firstJust :: Maybe a -> Maybe a -> Maybe a-firstJust a b = firstJusts [a, b]+firstJust = (<|>) -- | Takes a list of @Maybes@ and returns the first @Just@ if there is one, or -- @Nothing@ otherwise.
− GHC/Data/Word64Map.hs
@@ -1,61 +0,0 @@-{-# LANGUAGE CPP #-}-#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)-{-# LANGUAGE Safe #-}-#endif-#ifdef __GLASGOW_HASKELL__-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE MonoLocalBinds #-}-#endif----------------------------------------------------------------------------------- |--- Module : Data.Word64Map--- Copyright : (c) Daan Leijen 2002--- (c) Andriy Palamarchuk 2008--- License : BSD-style--- Maintainer : libraries@haskell.org--- Portability : portable------ An efficient implementation of maps from integer keys to values--- (dictionaries).------ This module re-exports the value lazy "Data.Word64Map.Lazy" API, plus--- several deprecated value strict functions. Please note that these functions--- have different strictness properties than those in "Data.Word64Map.Strict":--- they only evaluate the result of the combining function. For example, the--- default value to 'insertWith'' is only evaluated if the combining function--- is called and uses it.------ These modules are intended to be imported qualified, to avoid name--- clashes with Prelude functions, e.g.------ > import Data.Word64Map (Word64Map)--- > import qualified Data.Word64Map as Word64Map------ The implementation is based on /big-endian patricia trees/. This data--- structure performs especially well on binary operations like 'union'--- and 'intersection'. However, my benchmarks show that it is also--- (much) faster on insertions and deletions when compared to a generic--- size-balanced map implementation (see "Data.Map").------ * Chris Okasaki and Andy Gill, \"/Fast Mergeable Integer Maps/\",--- Workshop on ML, September 1998, pages 77-86,--- <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.5452>------ * D.R. Morrison, \"/PATRICIA -- Practical Algorithm To Retrieve Information Coded In Alphanumeric/\",--- Journal of the ACM, 15(4), October 1968, pages 514-534.------ Operation comments contain the operation time complexity in--- the Big-O notation <http://en.wikipedia.org/wiki/Big_O_notation>.--- Many operations have a worst-case complexity of \(O(\min(n,64))\).--- This means that the operation can become linear in the number of--- elements with a maximum of \(64\)--------------------------------------------------------------------------------module GHC.Data.Word64Map- ( module GHC.Data.Word64Map.Lazy- ) where--import GHC.Data.Word64Map.Lazy
− GHC/Data/Word64Map/Internal.hs
@@ -1,3606 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE BangPatterns #-}-{-# LANGUAGE PatternGuards #-}-#ifdef __GLASGOW_HASKELL__-{-# LANGUAGE MagicHash #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE TypeFamilies #-}-#endif-#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)-{-# LANGUAGE Trustworthy #-}-#endif--{-# OPTIONS_HADDOCK not-home #-}-{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}----------------------------------------------------------------------------------- |--- Module : Data.Word64Map.Internal--- Copyright : (c) Daan Leijen 2002--- (c) Andriy Palamarchuk 2008--- (c) wren romano 2016--- License : BSD-style--- Maintainer : libraries@haskell.org--- Portability : portable------ = WARNING------ This module is considered __internal__.------ The Package Versioning Policy __does not apply__.------ The contents of this module may change __in any way whatsoever__--- and __without any warning__ between minor versions of this package.------ Authors importing this module are expected to track development--- closely.------ = Description------ This defines the data structures and core (hidden) manipulations--- on representations.------ @since 0.5.9---------------------------------------------------------------------------------- [Note: INLINE bit fiddling]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~--- It is essential that the bit fiddling functions like mask, zero, branchMask--- etc are inlined. If they do not, the memory allocation skyrockets. The GHC--- usually gets it right, but it is disastrous if it does not. Therefore we--- explicitly mark these functions INLINE.----- [Note: Local 'go' functions and capturing]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--- Care must be taken when using 'go' function which captures an argument.--- Sometimes (for example when the argument is passed to a data constructor,--- as in insert), GHC heap-allocates more than necessary. Therefore C-- code--- must be checked for increased allocation when creating and modifying such--- functions.----- [Note: Order of constructors]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--- The order of constructors of Word64Map matters when considering performance.--- Currently in GHC 7.0, when type has 3 constructors, they are matched from--- the first to the last -- the best performance is achieved when the--- constructors are ordered by frequency.--- On GHC 7.0, reordering constructors from Nil | Tip | Bin to Bin | Tip | Nil--- improves the benchmark by circa 10%.-----module GHC.Data.Word64Map.Internal (- -- * Map type- Word64Map(..), Key -- instance Eq,Show-- -- * Operators- , (!), (!?), (\\)-- -- * Query- , null- , size- , member- , notMember- , lookup- , findWithDefault- , lookupLT- , lookupGT- , lookupLE- , lookupGE- , disjoint-- -- * Construction- , empty- , singleton-- -- ** Insertion- , insert- , insertWith- , insertWithKey- , insertLookupWithKey-- -- ** Delete\/Update- , delete- , adjust- , adjustWithKey- , update- , updateWithKey- , updateLookupWithKey- , alter- , alterF-- -- * Combine-- -- ** Union- , union- , unionWith- , unionWithKey- , unions- , unionsWith-- -- ** Difference- , difference- , differenceWith- , differenceWithKey-- -- ** Intersection- , intersection- , intersectionWith- , intersectionWithKey-- -- ** Compose- , compose-- -- ** General combining function- , SimpleWhenMissing- , SimpleWhenMatched- , runWhenMatched- , runWhenMissing- , merge- -- *** @WhenMatched@ tactics- , zipWithMaybeMatched- , zipWithMatched- -- *** @WhenMissing@ tactics- , mapMaybeMissing- , dropMissing- , preserveMissing- , mapMissing- , filterMissing-- -- ** Applicative general combining function- , WhenMissing (..)- , WhenMatched (..)- , mergeA- -- *** @WhenMatched@ tactics- -- | The tactics described for 'merge' work for- -- 'mergeA' as well. Furthermore, the following- -- are available.- , zipWithMaybeAMatched- , zipWithAMatched- -- *** @WhenMissing@ tactics- -- | The tactics described for 'merge' work for- -- 'mergeA' as well. Furthermore, the following- -- are available.- , traverseMaybeMissing- , traverseMissing- , filterAMissing-- -- ** Deprecated general combining function- , mergeWithKey- , mergeWithKey'-- -- * Traversal- -- ** Map- , map- , mapWithKey- , traverseWithKey- , traverseMaybeWithKey- , mapAccum- , mapAccumWithKey- , mapAccumRWithKey- , mapKeys- , mapKeysWith- , mapKeysMonotonic-- -- * Folds- , foldr- , foldl- , foldrWithKey- , foldlWithKey- , foldMapWithKey-- -- ** Strict folds- , foldr'- , foldl'- , foldrWithKey'- , foldlWithKey'-- -- * Conversion- , elems- , keys- , assocs- , keysSet- , fromSet-- -- ** Lists- , toList- , fromList- , fromListWith- , fromListWithKey-- -- ** Ordered lists- , toAscList- , toDescList- , fromAscList- , fromAscListWith- , fromAscListWithKey- , fromDistinctAscList-- -- * Filter- , filter- , filterWithKey- , restrictKeys- , withoutKeys- , partition- , partitionWithKey-- , takeWhileAntitone- , dropWhileAntitone- , spanAntitone-- , mapMaybe- , mapMaybeWithKey- , mapEither- , mapEitherWithKey-- , split- , splitLookup- , splitRoot-- -- * Submap- , isSubmapOf, isSubmapOfBy- , isProperSubmapOf, isProperSubmapOfBy-- -- * Min\/Max- , lookupMin- , lookupMax- , findMin- , findMax- , deleteMin- , deleteMax- , deleteFindMin- , deleteFindMax- , updateMin- , updateMax- , updateMinWithKey- , updateMaxWithKey- , minView- , maxView- , minViewWithKey- , maxViewWithKey-- -- * Debugging- , showTree- , showTreeWith-- -- * Internal types- , Mask, Prefix, Nat-- -- * Utility- , natFromInt- , intFromNat- , link- , linkWithMask- , bin- , binCheckLeft- , binCheckRight- , zero- , nomatch- , match- , mask- , maskW- , shorter- , branchMask- , highestBitMask-- -- * Used by "Word64Map.Merge.Lazy" and "Word64Map.Merge.Strict"- , mapWhenMissing- , mapWhenMatched- , lmapWhenMissing- , contramapFirstWhenMatched- , contramapSecondWhenMatched- , mapGentlyWhenMissing- , mapGentlyWhenMatched- ) where--import GHC.Prelude.Basic hiding- (lookup, filter, foldr, foldl, foldl', null, map)--import Data.Functor.Identity (Identity (..))-import Data.Semigroup (Semigroup(stimes,(<>)),stimesIdempotentMonoid)-import Data.Functor.Classes--import Control.DeepSeq (NFData(rnf))-import qualified Data.Foldable as Foldable-import Data.Maybe (fromMaybe)--import GHC.Data.Word64Set.Internal (Key)-import qualified GHC.Data.Word64Set.Internal as Word64Set-import GHC.Utils.Containers.Internal.BitUtil-import GHC.Utils.Containers.Internal.StrictPair--#ifdef __GLASGOW_HASKELL__-import Data.Coerce-import Data.Data (Data(..), Constr, mkConstr, constrIndex, Fixity(Prefix),- DataType, mkDataType, gcast1)-import GHC.Exts (build)-import qualified GHC.Exts as GHCExts-import Text.Read-#endif-import qualified Control.Category as Category-import Data.Word----- A "Nat" is a 64 bit machine word (an unsigned Int64)-type Nat = Word64--natFromInt :: Key -> Nat-natFromInt = id-{-# INLINE natFromInt #-}--intFromNat :: Nat -> Key-intFromNat = id-{-# INLINE intFromNat #-}--{--------------------------------------------------------------------- Types---------------------------------------------------------------------}----- | A map of integers to values @a@.---- See Note: Order of constructors-data Word64Map a = Bin {-# UNPACK #-} !Prefix- {-# UNPACK #-} !Mask- !(Word64Map a)- !(Word64Map a)--- Fields:--- prefix: The most significant bits shared by all keys in this Bin.--- mask: The switching bit to determine if a key should follow the left--- or right subtree of a 'Bin'.--- Invariant: Nil is never found as a child of Bin.--- Invariant: The Mask is a power of 2. It is the largest bit position at which--- two keys of the map differ.--- Invariant: Prefix is the common high-order bits that all elements share to--- the left of the Mask bit.--- Invariant: In (Bin prefix mask left right), left consists of the elements that--- don't have the mask bit set; right is all the elements that do.- | Tip {-# UNPACK #-} !Key a- | Nil--type Prefix = Word64-type Mask = Word64----- Some stuff from "Data.Word64Set.Internal", for 'restrictKeys' and--- 'withoutKeys' to use.-type Word64SetPrefix = Word64-type Word64SetBitMap = Word64--bitmapOf :: Word64 -> Word64SetBitMap-bitmapOf x = shiftLL 1 (fromIntegral (x .&. Word64Set.suffixBitMask))-{-# INLINE bitmapOf #-}--{--------------------------------------------------------------------- Operators---------------------------------------------------------------------}---- | \(O(\min(n,W))\). Find the value at a key.--- Calls 'error' when the element can not be found.------ > fromList [(5,'a'), (3,'b')] ! 1 Error: element not in the map--- > fromList [(5,'a'), (3,'b')] ! 5 == 'a'--(!) :: Word64Map a -> Key -> a-(!) m k = find k m---- | \(O(\min(n,W))\). Find the value at a key.--- Returns 'Nothing' when the element can not be found.------ > fromList [(5,'a'), (3,'b')] !? 1 == Nothing--- > fromList [(5,'a'), (3,'b')] !? 5 == Just 'a'------ @since 0.5.11--(!?) :: Word64Map a -> Key -> Maybe a-(!?) m k = lookup k m---- | Same as 'difference'.-(\\) :: Word64Map a -> Word64Map b -> Word64Map a-m1 \\ m2 = difference m1 m2--infixl 9 !?,\\{-This comment teaches CPP correct behaviour -}--{--------------------------------------------------------------------- Types---------------------------------------------------------------------}--instance Monoid (Word64Map a) where- mempty = empty- mconcat = unions- mappend = (<>)---- | @since 0.5.7-instance Semigroup (Word64Map a) where- (<>) = union- stimes = stimesIdempotentMonoid---- | Folds in order of increasing key.-instance Foldable.Foldable Word64Map where- fold = go- where go Nil = mempty- go (Tip _ v) = v- go (Bin _ m l r)- | m < 0 = go r `mappend` go l- | otherwise = go l `mappend` go r- {-# INLINABLE fold #-}- foldr = foldr- {-# INLINE foldr #-}- foldl = foldl- {-# INLINE foldl #-}- foldMap f t = go t- where go Nil = mempty- go (Tip _ v) = f v- go (Bin _ m l r)- | m < 0 = go r `mappend` go l- | otherwise = go l `mappend` go r- {-# INLINE foldMap #-}- foldl' = foldl'- {-# INLINE foldl' #-}- foldr' = foldr'- {-# INLINE foldr' #-}- length = size- {-# INLINE length #-}- null = null- {-# INLINE null #-}- toList = elems -- NB: Foldable.toList /= Word64Map.toList- {-# INLINE toList #-}- elem = go- where go !_ Nil = False- go x (Tip _ y) = x == y- go x (Bin _ _ l r) = go x l || go x r- {-# INLINABLE elem #-}- maximum = start- where start Nil = error "Data.Foldable.maximum (for Data.Word64Map): empty map"- start (Tip _ y) = y- start (Bin _ m l r)- | m < 0 = go (start r) l- | otherwise = go (start l) r-- go !m Nil = m- go m (Tip _ y) = max m y- go m (Bin _ _ l r) = go (go m l) r- {-# INLINABLE maximum #-}- minimum = start- where start Nil = error "Data.Foldable.minimum (for Data.Word64Map): empty map"- start (Tip _ y) = y- start (Bin _ m l r)- | m < 0 = go (start r) l- | otherwise = go (start l) r-- go !m Nil = m- go m (Tip _ y) = min m y- go m (Bin _ _ l r) = go (go m l) r- {-# INLINABLE minimum #-}- sum = foldl' (+) 0- {-# INLINABLE sum #-}- product = foldl' (*) 1- {-# INLINABLE product #-}---- | Traverses in order of increasing key.-instance Traversable Word64Map where- traverse f = traverseWithKey (\_ -> f)- {-# INLINE traverse #-}--instance NFData a => NFData (Word64Map a) where- rnf Nil = ()- rnf (Tip _ v) = rnf v- rnf (Bin _ _ l r) = rnf l `seq` rnf r--#if __GLASGOW_HASKELL__--{--------------------------------------------------------------------- A Data instance---------------------------------------------------------------------}---- This instance preserves data abstraction at the cost of inefficiency.--- We provide limited reflection services for the sake of data abstraction.--instance Data a => Data (Word64Map a) where- gfoldl f z im = z fromList `f` (toList im)- toConstr _ = fromListConstr- gunfold k z c = case constrIndex c of- 1 -> k (z fromList)- _ -> error "gunfold"- dataTypeOf _ = intMapDataType- dataCast1 f = gcast1 f--fromListConstr :: Constr-fromListConstr = mkConstr intMapDataType "fromList" [] Prefix--intMapDataType :: DataType-intMapDataType = mkDataType "Data.Word64Map.Internal.Word64Map" [fromListConstr]--#endif--{--------------------------------------------------------------------- Query---------------------------------------------------------------------}--- | \(O(1)\). Is the map empty?------ > Data.Word64Map.null (empty) == True--- > Data.Word64Map.null (singleton 1 'a') == False--null :: Word64Map a -> Bool-null Nil = True-null _ = False-{-# INLINE null #-}---- | \(O(n)\). Number of elements in the map.------ > size empty == 0--- > size (singleton 1 'a') == 1--- > size (fromList([(1,'a'), (2,'c'), (3,'b')])) == 3-size :: Word64Map a -> Int-size = go 0- where- go !acc (Bin _ _ l r) = go (go acc l) r- go acc (Tip _ _) = 1 + acc- go acc Nil = acc---- | \(O(\min(n,W))\). Is the key a member of the map?------ > member 5 (fromList [(5,'a'), (3,'b')]) == True--- > member 1 (fromList [(5,'a'), (3,'b')]) == False---- See Note: Local 'go' functions and capturing]-member :: Key -> Word64Map a -> Bool-member !k = go- where- go (Bin p m l r) | nomatch k p m = False- | zero k m = go l- | otherwise = go r- go (Tip kx _) = k == kx- go Nil = False---- | \(O(\min(n,W))\). Is the key not a member of the map?------ > notMember 5 (fromList [(5,'a'), (3,'b')]) == False--- > notMember 1 (fromList [(5,'a'), (3,'b')]) == True--notMember :: Key -> Word64Map a -> Bool-notMember k m = not $ member k m---- | \(O(\min(n,W))\). Lookup the value at a key in the map. See also 'Data.Map.lookup'.---- See Note: Local 'go' functions and capturing-lookup :: Key -> Word64Map a -> Maybe a-lookup !k = go- where- go (Bin _p m l r) | zero k m = go l- | otherwise = go r- go (Tip kx x) | k == kx = Just x- | otherwise = Nothing- go Nil = Nothing---- See Note: Local 'go' functions and capturing]-find :: Key -> Word64Map a -> a-find !k = go- where- go (Bin _p m l r) | zero k m = go l- | otherwise = go r- go (Tip kx x) | k == kx = x- | otherwise = not_found- go Nil = not_found-- not_found = error ("Word64Map.!: key " ++ show k ++ " is not an element of the map")---- | \(O(\min(n,W))\). The expression @('findWithDefault' def k map)@--- returns the value at key @k@ or returns @def@ when the key is not an--- element of the map.------ > findWithDefault 'x' 1 (fromList [(5,'a'), (3,'b')]) == 'x'--- > findWithDefault 'x' 5 (fromList [(5,'a'), (3,'b')]) == 'a'---- See Note: Local 'go' functions and capturing]-findWithDefault :: a -> Key -> Word64Map a -> a-findWithDefault def !k = go- where- go (Bin p m l r) | nomatch k p m = def- | zero k m = go l- | otherwise = go r- go (Tip kx x) | k == kx = x- | otherwise = def- go Nil = def---- | \(O(\min(n,W))\). Find largest key smaller than the given one and return the--- corresponding (key, value) pair.------ > lookupLT 3 (fromList [(3,'a'), (5,'b')]) == Nothing--- > lookupLT 4 (fromList [(3,'a'), (5,'b')]) == Just (3, 'a')---- See Note: Local 'go' functions and capturing.-lookupLT :: Key -> Word64Map a -> Maybe (Key, a)-lookupLT !k t = case t of- Bin _ m l r | m < 0 -> if k >= 0 then go r l else go Nil r- _ -> go Nil t- where- go def (Bin p m l r)- | nomatch k p m = if k < p then unsafeFindMax def else unsafeFindMax r- | zero k m = go def l- | otherwise = go l r- go def (Tip ky y)- | k <= ky = unsafeFindMax def- | otherwise = Just (ky, y)- go def Nil = unsafeFindMax def---- | \(O(\min(n,W))\). Find smallest key greater than the given one and return the--- corresponding (key, value) pair.------ > lookupGT 4 (fromList [(3,'a'), (5,'b')]) == Just (5, 'b')--- > lookupGT 5 (fromList [(3,'a'), (5,'b')]) == Nothing---- See Note: Local 'go' functions and capturing.-lookupGT :: Key -> Word64Map a -> Maybe (Key, a)-lookupGT !k t = case t of- Bin _ m l r | m < 0 -> if k >= 0 then go Nil l else go l r- _ -> go Nil t- where- go def (Bin p m l r)- | nomatch k p m = if k < p then unsafeFindMin l else unsafeFindMin def- | zero k m = go r l- | otherwise = go def r- go def (Tip ky y)- | k >= ky = unsafeFindMin def- | otherwise = Just (ky, y)- go def Nil = unsafeFindMin def---- | \(O(\min(n,W))\). Find largest key smaller or equal to the given one and return--- the corresponding (key, value) pair.------ > lookupLE 2 (fromList [(3,'a'), (5,'b')]) == Nothing--- > lookupLE 4 (fromList [(3,'a'), (5,'b')]) == Just (3, 'a')--- > lookupLE 5 (fromList [(3,'a'), (5,'b')]) == Just (5, 'b')---- See Note: Local 'go' functions and capturing.-lookupLE :: Key -> Word64Map a -> Maybe (Key, a)-lookupLE !k t = case t of- Bin _ m l r | m < 0 -> if k >= 0 then go r l else go Nil r- _ -> go Nil t- where- go def (Bin p m l r)- | nomatch k p m = if k < p then unsafeFindMax def else unsafeFindMax r- | zero k m = go def l- | otherwise = go l r- go def (Tip ky y)- | k < ky = unsafeFindMax def- | otherwise = Just (ky, y)- go def Nil = unsafeFindMax def---- | \(O(\min(n,W))\). Find smallest key greater or equal to the given one and return--- the corresponding (key, value) pair.------ > lookupGE 3 (fromList [(3,'a'), (5,'b')]) == Just (3, 'a')--- > lookupGE 4 (fromList [(3,'a'), (5,'b')]) == Just (5, 'b')--- > lookupGE 6 (fromList [(3,'a'), (5,'b')]) == Nothing---- See Note: Local 'go' functions and capturing.-lookupGE :: Key -> Word64Map a -> Maybe (Key, a)-lookupGE !k t = case t of- Bin _ m l r | m < 0 -> if k >= 0 then go Nil l else go l r- _ -> go Nil t- where- go def (Bin p m l r)- | nomatch k p m = if k < p then unsafeFindMin l else unsafeFindMin def- | zero k m = go r l- | otherwise = go def r- go def (Tip ky y)- | k > ky = unsafeFindMin def- | otherwise = Just (ky, y)- go def Nil = unsafeFindMin def----- Helper function for lookupGE and lookupGT. It assumes that if a Bin node is--- given, it has m > 0.-unsafeFindMin :: Word64Map a -> Maybe (Key, a)-unsafeFindMin Nil = Nothing-unsafeFindMin (Tip ky y) = Just (ky, y)-unsafeFindMin (Bin _ _ l _) = unsafeFindMin l---- Helper function for lookupLE and lookupLT. It assumes that if a Bin node is--- given, it has m > 0.-unsafeFindMax :: Word64Map a -> Maybe (Key, a)-unsafeFindMax Nil = Nothing-unsafeFindMax (Tip ky y) = Just (ky, y)-unsafeFindMax (Bin _ _ _ r) = unsafeFindMax r--{--------------------------------------------------------------------- Disjoint---------------------------------------------------------------------}--- | \(O(n+m)\). Check whether the key sets of two maps are disjoint--- (i.e. their 'intersection' is empty).------ > disjoint (fromList [(2,'a')]) (fromList [(1,()), (3,())]) == True--- > disjoint (fromList [(2,'a')]) (fromList [(1,'a'), (2,'b')]) == False--- > disjoint (fromList []) (fromList []) == True------ > disjoint a b == null (intersection a b)------ @since 0.6.2.1-disjoint :: Word64Map a -> Word64Map b -> Bool-disjoint Nil _ = True-disjoint _ Nil = True-disjoint (Tip kx _) ys = notMember kx ys-disjoint xs (Tip ky _) = notMember ky xs-disjoint t1@(Bin p1 m1 l1 r1) t2@(Bin p2 m2 l2 r2)- | shorter m1 m2 = disjoint1- | shorter m2 m1 = disjoint2- | p1 == p2 = disjoint l1 l2 && disjoint r1 r2- | otherwise = True- where- disjoint1 | nomatch p2 p1 m1 = True- | zero p2 m1 = disjoint l1 t2- | otherwise = disjoint r1 t2- disjoint2 | nomatch p1 p2 m2 = True- | zero p1 m2 = disjoint t1 l2- | otherwise = disjoint t1 r2--{--------------------------------------------------------------------- Compose---------------------------------------------------------------------}--- | Relate the keys of one map to the values of--- the other, by using the values of the former as keys for lookups--- in the latter.------ Complexity: \( O(n * \min(m,W)) \), where \(m\) is the size of the first argument------ > compose (fromList [('a', "A"), ('b', "B")]) (fromList [(1,'a'),(2,'b'),(3,'z')]) = fromList [(1,"A"),(2,"B")]------ @--- ('compose' bc ab '!?') = (bc '!?') <=< (ab '!?')--- @------ __Note:__ Prior to v0.6.4, "Data.Word64Map.Strict" exposed a version of--- 'compose' that forced the values of the output 'Word64Map'. This version does--- not force these values.------ @since 0.6.3.1-compose :: Word64Map c -> Word64Map Word64 -> Word64Map c-compose bc !ab- | null bc = empty- | otherwise = mapMaybe (bc !?) ab--{--------------------------------------------------------------------- Construction---------------------------------------------------------------------}--- | \(O(1)\). The empty map.------ > empty == fromList []--- > size empty == 0--empty :: Word64Map a-empty- = Nil-{-# INLINE empty #-}---- | \(O(1)\). A map of one element.------ > singleton 1 'a' == fromList [(1, 'a')]--- > size (singleton 1 'a') == 1--singleton :: Key -> a -> Word64Map a-singleton k x- = Tip k x-{-# INLINE singleton #-}--{--------------------------------------------------------------------- Insert---------------------------------------------------------------------}--- | \(O(\min(n,W))\). Insert a new key\/value pair in the map.--- If the key is already present in the map, the associated value is--- replaced with the supplied value, i.e. 'insert' is equivalent to--- @'insertWith' 'const'@.------ > insert 5 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'x')]--- > insert 7 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'a'), (7, 'x')]--- > insert 5 'x' empty == singleton 5 'x'--insert :: Key -> a -> Word64Map a -> Word64Map a-insert !k x t@(Bin p m l r)- | nomatch k p m = link k (Tip k x) p t- | zero k m = Bin p m (insert k x l) r- | otherwise = Bin p m l (insert k x r)-insert k x t@(Tip ky _)- | k==ky = Tip k x- | otherwise = link k (Tip k x) ky t-insert k x Nil = Tip k x---- right-biased insertion, used by 'union'--- | \(O(\min(n,W))\). Insert with a combining function.--- @'insertWith' f key value mp@--- will insert the pair (key, value) into @mp@ if key does--- not exist in the map. If the key does exist, the function will--- insert @f new_value old_value@.------ > insertWith (++) 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "xxxa")]--- > insertWith (++) 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")]--- > insertWith (++) 5 "xxx" empty == singleton 5 "xxx"--insertWith :: (a -> a -> a) -> Key -> a -> Word64Map a -> Word64Map a-insertWith f k x t- = insertWithKey (\_ x' y' -> f x' y') k x t---- | \(O(\min(n,W))\). Insert with a combining function.--- @'insertWithKey' f key value mp@--- will insert the pair (key, value) into @mp@ if key does--- not exist in the map. If the key does exist, the function will--- insert @f key new_value old_value@.------ > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value--- > insertWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:xxx|a")]--- > insertWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")]--- > insertWithKey f 5 "xxx" empty == singleton 5 "xxx"--insertWithKey :: (Key -> a -> a -> a) -> Key -> a -> Word64Map a -> Word64Map a-insertWithKey f !k x t@(Bin p m l r)- | nomatch k p m = link k (Tip k x) p t- | zero k m = Bin p m (insertWithKey f k x l) r- | otherwise = Bin p m l (insertWithKey f k x r)-insertWithKey f k x t@(Tip ky y)- | k == ky = Tip k (f k x y)- | otherwise = link k (Tip k x) ky t-insertWithKey _ k x Nil = Tip k x---- | \(O(\min(n,W))\). The expression (@'insertLookupWithKey' f k x map@)--- is a pair where the first element is equal to (@'lookup' k map@)--- and the second element equal to (@'insertWithKey' f k x map@).------ > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value--- > insertLookupWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "5:xxx|a")])--- > insertLookupWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a"), (7, "xxx")])--- > insertLookupWithKey f 5 "xxx" empty == (Nothing, singleton 5 "xxx")------ This is how to define @insertLookup@ using @insertLookupWithKey@:------ > let insertLookup kx x t = insertLookupWithKey (\_ a _ -> a) kx x t--- > insertLookup 5 "x" (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "x")])--- > insertLookup 7 "x" (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a"), (7, "x")])--insertLookupWithKey :: (Key -> a -> a -> a) -> Key -> a -> Word64Map a -> (Maybe a, Word64Map a)-insertLookupWithKey f !k x t@(Bin p m l r)- | nomatch k p m = (Nothing,link k (Tip k x) p t)- | zero k m = let (found,l') = insertLookupWithKey f k x l- in (found,Bin p m l' r)- | otherwise = let (found,r') = insertLookupWithKey f k x r- in (found,Bin p m l r')-insertLookupWithKey f k x t@(Tip ky y)- | k == ky = (Just y,Tip k (f k x y))- | otherwise = (Nothing,link k (Tip k x) ky t)-insertLookupWithKey _ k x Nil = (Nothing,Tip k x)---{--------------------------------------------------------------------- Deletion---------------------------------------------------------------------}--- | \(O(\min(n,W))\). Delete a key and its value from the map. When the key is not--- a member of the map, the original map is returned.------ > delete 5 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"--- > delete 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]--- > delete 5 empty == empty--delete :: Key -> Word64Map a -> Word64Map a-delete !k t@(Bin p m l r)- | nomatch k p m = t- | zero k m = binCheckLeft p m (delete k l) r- | otherwise = binCheckRight p m l (delete k r)-delete k t@(Tip ky _)- | k == ky = Nil- | otherwise = t-delete _k Nil = Nil---- | \(O(\min(n,W))\). Adjust a value at a specific key. When the key is not--- a member of the map, the original map is returned.------ > adjust ("new " ++) 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")]--- > adjust ("new " ++) 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]--- > adjust ("new " ++) 7 empty == empty--adjust :: (a -> a) -> Key -> Word64Map a -> Word64Map a-adjust f k m- = adjustWithKey (\_ x -> f x) k m---- | \(O(\min(n,W))\). Adjust a value at a specific key. When the key is not--- a member of the map, the original map is returned.------ > let f key x = (show key) ++ ":new " ++ x--- > adjustWithKey f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:new a")]--- > adjustWithKey f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]--- > adjustWithKey f 7 empty == empty--adjustWithKey :: (Key -> a -> a) -> Key -> Word64Map a -> Word64Map a-adjustWithKey f !k (Bin p m l r)- | zero k m = Bin p m (adjustWithKey f k l) r- | otherwise = Bin p m l (adjustWithKey f k r)-adjustWithKey f k t@(Tip ky y)- | k == ky = Tip ky (f k y)- | otherwise = t-adjustWithKey _ _ Nil = Nil----- | \(O(\min(n,W))\). The expression (@'update' f k map@) updates the value @x@--- at @k@ (if it is in the map). If (@f x@) is 'Nothing', the element is--- deleted. If it is (@'Just' y@), the key @k@ is bound to the new value @y@.------ > let f x = if x == "a" then Just "new a" else Nothing--- > update f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")]--- > update f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]--- > update f 3 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"--update :: (a -> Maybe a) -> Key -> Word64Map a -> Word64Map a-update f- = updateWithKey (\_ x -> f x)---- | \(O(\min(n,W))\). The expression (@'update' f k map@) updates the value @x@--- at @k@ (if it is in the map). If (@f k x@) is 'Nothing', the element is--- deleted. If it is (@'Just' y@), the key @k@ is bound to the new value @y@.------ > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing--- > updateWithKey f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:new a")]--- > updateWithKey f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]--- > updateWithKey f 3 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"--updateWithKey :: (Key -> a -> Maybe a) -> Key -> Word64Map a -> Word64Map a-updateWithKey f !k (Bin p m l r)- | zero k m = binCheckLeft p m (updateWithKey f k l) r- | otherwise = binCheckRight p m l (updateWithKey f k r)-updateWithKey f k t@(Tip ky y)- | k == ky = case (f k y) of- Just y' -> Tip ky y'- Nothing -> Nil- | otherwise = t-updateWithKey _ _ Nil = Nil---- | \(O(\min(n,W))\). Lookup and update.--- The function returns original value, if it is updated.--- This is different behavior than 'Data.Map.updateLookupWithKey'.--- Returns the original key value if the map entry is deleted.------ > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing--- > updateLookupWithKey f 5 (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "5:new a")])--- > updateLookupWithKey f 7 (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a")])--- > updateLookupWithKey f 3 (fromList [(5,"a"), (3,"b")]) == (Just "b", singleton 5 "a")--updateLookupWithKey :: (Key -> a -> Maybe a) -> Key -> Word64Map a -> (Maybe a,Word64Map a)-updateLookupWithKey f !k (Bin p m l r)- | zero k m = let !(found,l') = updateLookupWithKey f k l- in (found,binCheckLeft p m l' r)- | otherwise = let !(found,r') = updateLookupWithKey f k r- in (found,binCheckRight p m l r')-updateLookupWithKey f k t@(Tip ky y)- | k==ky = case (f k y) of- Just y' -> (Just y,Tip ky y')- Nothing -> (Just y,Nil)- | otherwise = (Nothing,t)-updateLookupWithKey _ _ Nil = (Nothing,Nil)------ | \(O(\min(n,W))\). The expression (@'alter' f k map@) alters the value @x@ at @k@, or absence thereof.--- 'alter' can be used to insert, delete, or update a value in an 'Word64Map'.--- In short : @'lookup' k ('alter' f k m) = f ('lookup' k m)@.-alter :: (Maybe a -> Maybe a) -> Key -> Word64Map a -> Word64Map a-alter f !k t@(Bin p m l r)- | nomatch k p m = case f Nothing of- Nothing -> t- Just x -> link k (Tip k x) p t- | zero k m = binCheckLeft p m (alter f k l) r- | otherwise = binCheckRight p m l (alter f k r)-alter f k t@(Tip ky y)- | k==ky = case f (Just y) of- Just x -> Tip ky x- Nothing -> Nil- | otherwise = case f Nothing of- Just x -> link k (Tip k x) ky t- Nothing -> Tip ky y-alter f k Nil = case f Nothing of- Just x -> Tip k x- Nothing -> Nil---- | \(O(\min(n,W))\). The expression (@'alterF' f k map@) alters the value @x@ at--- @k@, or absence thereof. 'alterF' can be used to inspect, insert, delete,--- or update a value in an 'Word64Map'. In short : @'lookup' k <$> 'alterF' f k m = f--- ('lookup' k m)@.------ Example:------ @--- interactiveAlter :: Int -> Word64Map String -> IO (Word64Map String)--- interactiveAlter k m = alterF f k m where--- f Nothing = do--- putStrLn $ show k ++--- " was not found in the map. Would you like to add it?"--- getUserResponse1 :: IO (Maybe String)--- f (Just old) = do--- putStrLn $ "The key is currently bound to " ++ show old ++--- ". Would you like to change or delete it?"--- getUserResponse2 :: IO (Maybe String)--- @------ 'alterF' is the most general operation for working with an individual--- key that may or may not be in a given map.------ Note: 'alterF' is a flipped version of the @at@ combinator from--- @Control.Lens.At@.------ @since 0.5.8--alterF :: Functor f- => (Maybe a -> f (Maybe a)) -> Key -> Word64Map a -> f (Word64Map a)--- This implementation was stolen from 'Control.Lens.At'.-alterF f k m = (<$> f mv) $ \fres ->- case fres of- Nothing -> maybe m (const (delete k m)) mv- Just v' -> insert k v' m- where mv = lookup k m--{--------------------------------------------------------------------- Union---------------------------------------------------------------------}--- | The union of a list of maps.------ > unions [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])]--- > == fromList [(3, "b"), (5, "a"), (7, "C")]--- > unions [(fromList [(5, "A3"), (3, "B3")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "a"), (3, "b")])]--- > == fromList [(3, "B3"), (5, "A3"), (7, "C")]--unions :: Foldable f => f (Word64Map a) -> Word64Map a-unions xs- = Foldable.foldl' union empty xs---- | The union of a list of maps, with a combining operation.------ > unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])]--- > == fromList [(3, "bB3"), (5, "aAA3"), (7, "C")]--unionsWith :: Foldable f => (a->a->a) -> f (Word64Map a) -> Word64Map a-unionsWith f ts- = Foldable.foldl' (unionWith f) empty ts---- | \(O(n+m)\). The (left-biased) union of two maps.--- It prefers the first map when duplicate keys are encountered,--- i.e. (@'union' == 'unionWith' 'const'@).------ > union (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "a"), (7, "C")]--union :: Word64Map a -> Word64Map a -> Word64Map a-union m1 m2- = mergeWithKey' Bin const id id m1 m2---- | \(O(n+m)\). The union with a combining function.------ > unionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "aA"), (7, "C")]--unionWith :: (a -> a -> a) -> Word64Map a -> Word64Map a -> Word64Map a-unionWith f m1 m2- = unionWithKey (\_ x y -> f x y) m1 m2---- | \(O(n+m)\). The union with a combining function.------ > let f key left_value right_value = (show key) ++ ":" ++ left_value ++ "|" ++ right_value--- > unionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "5:a|A"), (7, "C")]--unionWithKey :: (Key -> a -> a -> a) -> Word64Map a -> Word64Map a -> Word64Map a-unionWithKey f m1 m2- = mergeWithKey' Bin (\(Tip k1 x1) (Tip _k2 x2) -> Tip k1 (f k1 x1 x2)) id id m1 m2--{--------------------------------------------------------------------- Difference---------------------------------------------------------------------}--- | \(O(n+m)\). Difference between two maps (based on keys).------ > difference (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 3 "b"--difference :: Word64Map a -> Word64Map b -> Word64Map a-difference m1 m2- = mergeWithKey (\_ _ _ -> Nothing) id (const Nil) m1 m2---- | \(O(n+m)\). Difference with a combining function.------ > let f al ar = if al == "b" then Just (al ++ ":" ++ ar) else Nothing--- > differenceWith f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (7, "C")])--- > == singleton 3 "b:B"--differenceWith :: (a -> b -> Maybe a) -> Word64Map a -> Word64Map b -> Word64Map a-differenceWith f m1 m2- = differenceWithKey (\_ x y -> f x y) m1 m2---- | \(O(n+m)\). Difference with a combining function. When two equal keys are--- encountered, the combining function is applied to the key and both values.--- If it returns 'Nothing', the element is discarded (proper set difference).--- If it returns (@'Just' y@), the element is updated with a new value @y@.------ > let f k al ar = if al == "b" then Just ((show k) ++ ":" ++ al ++ "|" ++ ar) else Nothing--- > differenceWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (10, "C")])--- > == singleton 3 "3:b|B"--differenceWithKey :: (Key -> a -> b -> Maybe a) -> Word64Map a -> Word64Map b -> Word64Map a-differenceWithKey f m1 m2- = mergeWithKey f id (const Nil) m1 m2----- TODO(wrengr): re-verify that asymptotic bound--- | \(O(n+m)\). Remove all the keys in a given set from a map.------ @--- m \`withoutKeys\` s = 'filterWithKey' (\\k _ -> k ``Word64Set.notMember`` s) m--- @------ @since 0.5.8-withoutKeys :: Word64Map a -> Word64Set.Word64Set -> Word64Map a-withoutKeys t1@(Bin p1 m1 l1 r1) t2@(Word64Set.Bin p2 m2 l2 r2)- | shorter m1 m2 = difference1- | shorter m2 m1 = difference2- | p1 == p2 = bin p1 m1 (withoutKeys l1 l2) (withoutKeys r1 r2)- | otherwise = t1- where- difference1- | nomatch p2 p1 m1 = t1- | zero p2 m1 = binCheckLeft p1 m1 (withoutKeys l1 t2) r1- | otherwise = binCheckRight p1 m1 l1 (withoutKeys r1 t2)- difference2- | nomatch p1 p2 m2 = t1- | zero p1 m2 = withoutKeys t1 l2- | otherwise = withoutKeys t1 r2-withoutKeys t1@(Bin p1 m1 _ _) (Word64Set.Tip p2 bm2) =- let minbit = bitmapOf p1- lt_minbit = minbit - 1- maxbit = bitmapOf (p1 .|. (m1 .|. (m1 - 1)))- gt_maxbit = (-maxbit) `xor` maxbit- -- TODO(wrengr): should we manually inline/unroll 'updatePrefix'- -- and 'withoutBM' here, in order to avoid redundant case analyses?- in updatePrefix p2 t1 $ withoutBM (bm2 .|. lt_minbit .|. gt_maxbit)-withoutKeys t1@(Bin _ _ _ _) Word64Set.Nil = t1-withoutKeys t1@(Tip k1 _) t2- | k1 `Word64Set.member` t2 = Nil- | otherwise = t1-withoutKeys Nil _ = Nil---updatePrefix- :: Word64SetPrefix -> Word64Map a -> (Word64Map a -> Word64Map a) -> Word64Map a-updatePrefix !kp t@(Bin p m l r) f- | m .&. Word64Set.suffixBitMask /= 0 =- if p .&. Word64Set.prefixBitMask == kp then f t else t- | nomatch kp p m = t- | zero kp m = binCheckLeft p m (updatePrefix kp l f) r- | otherwise = binCheckRight p m l (updatePrefix kp r f)-updatePrefix kp t@(Tip kx _) f- | kx .&. Word64Set.prefixBitMask == kp = f t- | otherwise = t-updatePrefix _ Nil _ = Nil---withoutBM :: Word64SetBitMap -> Word64Map a -> Word64Map a-withoutBM 0 t = t-withoutBM bm (Bin p m l r) =- let leftBits = bitmapOf (p .|. m) - 1- bmL = bm .&. leftBits- bmR = bm `xor` bmL -- = (bm .&. complement leftBits)- in bin p m (withoutBM bmL l) (withoutBM bmR r)-withoutBM bm t@(Tip k _)- -- TODO(wrengr): need we manually inline 'Word64Set.Member' here?- | k `Word64Set.member` Word64Set.Tip (k .&. Word64Set.prefixBitMask) bm = Nil- | otherwise = t-withoutBM _ Nil = Nil---{--------------------------------------------------------------------- Intersection---------------------------------------------------------------------}--- | \(O(n+m)\). The (left-biased) intersection of two maps (based on keys).------ > intersection (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "a"--intersection :: Word64Map a -> Word64Map b -> Word64Map a-intersection m1 m2- = mergeWithKey' bin const (const Nil) (const Nil) m1 m2----- TODO(wrengr): re-verify that asymptotic bound--- | \(O(n+m)\). The restriction of a map to the keys in a set.------ @--- m \`restrictKeys\` s = 'filterWithKey' (\\k _ -> k ``Word64Set.member`` s) m--- @------ @since 0.5.8-restrictKeys :: Word64Map a -> Word64Set.Word64Set -> Word64Map a-restrictKeys t1@(Bin p1 m1 l1 r1) t2@(Word64Set.Bin p2 m2 l2 r2)- | shorter m1 m2 = intersection1- | shorter m2 m1 = intersection2- | p1 == p2 = bin p1 m1 (restrictKeys l1 l2) (restrictKeys r1 r2)- | otherwise = Nil- where- intersection1- | nomatch p2 p1 m1 = Nil- | zero p2 m1 = restrictKeys l1 t2- | otherwise = restrictKeys r1 t2- intersection2- | nomatch p1 p2 m2 = Nil- | zero p1 m2 = restrictKeys t1 l2- | otherwise = restrictKeys t1 r2-restrictKeys t1@(Bin p1 m1 _ _) (Word64Set.Tip p2 bm2) =- let minbit = bitmapOf p1- ge_minbit = complement (minbit - 1)- maxbit = bitmapOf (p1 .|. (m1 .|. (m1 - 1)))- le_maxbit = maxbit .|. (maxbit - 1)- -- TODO(wrengr): should we manually inline/unroll 'lookupPrefix'- -- and 'restrictBM' here, in order to avoid redundant case analyses?- in restrictBM (bm2 .&. ge_minbit .&. le_maxbit) (lookupPrefix p2 t1)-restrictKeys (Bin _ _ _ _) Word64Set.Nil = Nil-restrictKeys t1@(Tip k1 _) t2- | k1 `Word64Set.member` t2 = t1- | otherwise = Nil-restrictKeys Nil _ = Nil----- | \(O(\min(n,W))\). Restrict to the sub-map with all keys matching--- a key prefix.-lookupPrefix :: Word64SetPrefix -> Word64Map a -> Word64Map a-lookupPrefix !kp t@(Bin p m l r)- | m .&. Word64Set.suffixBitMask /= 0 =- if p .&. Word64Set.prefixBitMask == kp then t else Nil- | nomatch kp p m = Nil- | zero kp m = lookupPrefix kp l- | otherwise = lookupPrefix kp r-lookupPrefix kp t@(Tip kx _)- | (kx .&. Word64Set.prefixBitMask) == kp = t- | otherwise = Nil-lookupPrefix _ Nil = Nil---restrictBM :: Word64SetBitMap -> Word64Map a -> Word64Map a-restrictBM 0 _ = Nil-restrictBM bm (Bin p m l r) =- let leftBits = bitmapOf (p .|. m) - 1- bmL = bm .&. leftBits- bmR = bm `xor` bmL -- = (bm .&. complement leftBits)- in bin p m (restrictBM bmL l) (restrictBM bmR r)-restrictBM bm t@(Tip k _)- -- TODO(wrengr): need we manually inline 'Word64Set.Member' here?- | k `Word64Set.member` Word64Set.Tip (k .&. Word64Set.prefixBitMask) bm = t- | otherwise = Nil-restrictBM _ Nil = Nil----- | \(O(n+m)\). The intersection with a combining function.------ > intersectionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "aA"--intersectionWith :: (a -> b -> c) -> Word64Map a -> Word64Map b -> Word64Map c-intersectionWith f m1 m2- = intersectionWithKey (\_ x y -> f x y) m1 m2---- | \(O(n+m)\). The intersection with a combining function.------ > let f k al ar = (show k) ++ ":" ++ al ++ "|" ++ ar--- > intersectionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "5:a|A"--intersectionWithKey :: (Key -> a -> b -> c) -> Word64Map a -> Word64Map b -> Word64Map c-intersectionWithKey f m1 m2- = mergeWithKey' bin (\(Tip k1 x1) (Tip _k2 x2) -> Tip k1 (f k1 x1 x2)) (const Nil) (const Nil) m1 m2--{--------------------------------------------------------------------- MergeWithKey---------------------------------------------------------------------}---- | \(O(n+m)\). A high-performance universal combining function. Using--- 'mergeWithKey', all combining functions can be defined without any loss of--- efficiency (with exception of 'union', 'difference' and 'intersection',--- where sharing of some nodes is lost with 'mergeWithKey').------ Please make sure you know what is going on when using 'mergeWithKey',--- otherwise you can be surprised by unexpected code growth or even--- corruption of the data structure.------ When 'mergeWithKey' is given three arguments, it is inlined to the call--- site. You should therefore use 'mergeWithKey' only to define your custom--- combining functions. For example, you could define 'unionWithKey',--- 'differenceWithKey' and 'intersectionWithKey' as------ > myUnionWithKey f m1 m2 = mergeWithKey (\k x1 x2 -> Just (f k x1 x2)) id id m1 m2--- > myDifferenceWithKey f m1 m2 = mergeWithKey f id (const empty) m1 m2--- > myIntersectionWithKey f m1 m2 = mergeWithKey (\k x1 x2 -> Just (f k x1 x2)) (const empty) (const empty) m1 m2------ When calling @'mergeWithKey' combine only1 only2@, a function combining two--- 'Word64Map's is created, such that------ * if a key is present in both maps, it is passed with both corresponding--- values to the @combine@ function. Depending on the result, the key is either--- present in the result with specified value, or is left out;------ * a nonempty subtree present only in the first map is passed to @only1@ and--- the output is added to the result;------ * a nonempty subtree present only in the second map is passed to @only2@ and--- the output is added to the result.------ The @only1@ and @only2@ methods /must return a map with a subset (possibly empty) of the keys of the given map/.--- The values can be modified arbitrarily. Most common variants of @only1@ and--- @only2@ are 'id' and @'const' 'empty'@, but for example @'map' f@ or--- @'filterWithKey' f@ could be used for any @f@.--mergeWithKey :: (Key -> a -> b -> Maybe c) -> (Word64Map a -> Word64Map c) -> (Word64Map b -> Word64Map c)- -> Word64Map a -> Word64Map b -> Word64Map c-mergeWithKey f g1 g2 = mergeWithKey' bin combine g1 g2- where -- We use the lambda form to avoid non-exhaustive pattern matches warning.- combine = \(Tip k1 x1) (Tip _k2 x2) ->- case f k1 x1 x2 of- Nothing -> Nil- Just x -> Tip k1 x- {-# INLINE combine #-}-{-# INLINE mergeWithKey #-}---- Slightly more general version of mergeWithKey. It differs in the following:------ * the combining function operates on maps instead of keys and values. The--- reason is to enable sharing in union, difference and intersection.------ * mergeWithKey' is given an equivalent of bin. The reason is that in union*,--- Bin constructor can be used, because we know both subtrees are nonempty.--mergeWithKey' :: (Prefix -> Mask -> Word64Map c -> Word64Map c -> Word64Map c)- -> (Word64Map a -> Word64Map b -> Word64Map c) -> (Word64Map a -> Word64Map c) -> (Word64Map b -> Word64Map c)- -> Word64Map a -> Word64Map b -> Word64Map c-mergeWithKey' bin' f g1 g2 = go- where- go t1@(Bin p1 m1 l1 r1) t2@(Bin p2 m2 l2 r2)- | shorter m1 m2 = merge1- | shorter m2 m1 = merge2- | p1 == p2 = bin' p1 m1 (go l1 l2) (go r1 r2)- | otherwise = maybe_link p1 (g1 t1) p2 (g2 t2)- where- merge1 | nomatch p2 p1 m1 = maybe_link p1 (g1 t1) p2 (g2 t2)- | zero p2 m1 = bin' p1 m1 (go l1 t2) (g1 r1)- | otherwise = bin' p1 m1 (g1 l1) (go r1 t2)- merge2 | nomatch p1 p2 m2 = maybe_link p1 (g1 t1) p2 (g2 t2)- | zero p1 m2 = bin' p2 m2 (go t1 l2) (g2 r2)- | otherwise = bin' p2 m2 (g2 l2) (go t1 r2)-- go t1'@(Bin _ _ _ _) t2'@(Tip k2' _) = merge0 t2' k2' t1'- where- merge0 t2 k2 t1@(Bin p1 m1 l1 r1)- | nomatch k2 p1 m1 = maybe_link p1 (g1 t1) k2 (g2 t2)- | zero k2 m1 = bin' p1 m1 (merge0 t2 k2 l1) (g1 r1)- | otherwise = bin' p1 m1 (g1 l1) (merge0 t2 k2 r1)- merge0 t2 k2 t1@(Tip k1 _)- | k1 == k2 = f t1 t2- | otherwise = maybe_link k1 (g1 t1) k2 (g2 t2)- merge0 t2 _ Nil = g2 t2-- go t1@(Bin _ _ _ _) Nil = g1 t1-- go t1'@(Tip k1' _) t2' = merge0 t1' k1' t2'- where- merge0 t1 k1 t2@(Bin p2 m2 l2 r2)- | nomatch k1 p2 m2 = maybe_link k1 (g1 t1) p2 (g2 t2)- | zero k1 m2 = bin' p2 m2 (merge0 t1 k1 l2) (g2 r2)- | otherwise = bin' p2 m2 (g2 l2) (merge0 t1 k1 r2)- merge0 t1 k1 t2@(Tip k2 _)- | k1 == k2 = f t1 t2- | otherwise = maybe_link k1 (g1 t1) k2 (g2 t2)- merge0 t1 _ Nil = g1 t1-- go Nil t2 = g2 t2-- maybe_link _ Nil _ t2 = t2- maybe_link _ t1 _ Nil = t1- maybe_link p1 t1 p2 t2 = link p1 t1 p2 t2- {-# INLINE maybe_link #-}-{-# INLINE mergeWithKey' #-}---{--------------------------------------------------------------------- mergeA---------------------------------------------------------------------}---- | A tactic for dealing with keys present in one map but not the--- other in 'merge' or 'mergeA'.------ A tactic of type @WhenMissing f k x z@ is an abstract representation--- of a function of type @Key -> x -> f (Maybe z)@.------ @since 0.5.9--data WhenMissing f x y = WhenMissing- { missingSubtree :: Word64Map x -> f (Word64Map y)- , missingKey :: Key -> x -> f (Maybe y)}---- | @since 0.5.9-instance (Applicative f, Monad f) => Functor (WhenMissing f x) where- fmap = mapWhenMissing- {-# INLINE fmap #-}----- | @since 0.5.9-instance (Applicative f, Monad f) => Category.Category (WhenMissing f)- where- id = preserveMissing- f . g =- traverseMaybeMissing $ \ k x -> do- y <- missingKey g k x- case y of- Nothing -> pure Nothing- Just q -> missingKey f k q- {-# INLINE id #-}- {-# INLINE (.) #-}----- | Equivalent to @ReaderT k (ReaderT x (MaybeT f))@.------ @since 0.5.9-instance (Applicative f, Monad f) => Applicative (WhenMissing f x) where- pure x = mapMissing (\ _ _ -> x)- f <*> g =- traverseMaybeMissing $ \k x -> do- res1 <- missingKey f k x- case res1 of- Nothing -> pure Nothing- Just r -> (pure $!) . fmap r =<< missingKey g k x- {-# INLINE pure #-}- {-# INLINE (<*>) #-}----- | Equivalent to @ReaderT k (ReaderT x (MaybeT f))@.------ @since 0.5.9-instance (Applicative f, Monad f) => Monad (WhenMissing f x) where- m >>= f =- traverseMaybeMissing $ \k x -> do- res1 <- missingKey m k x- case res1 of- Nothing -> pure Nothing- Just r -> missingKey (f r) k x- {-# INLINE (>>=) #-}----- | Map covariantly over a @'WhenMissing' f x@.------ @since 0.5.9-mapWhenMissing- :: (Applicative f, Monad f)- => (a -> b)- -> WhenMissing f x a- -> WhenMissing f x b-mapWhenMissing f t = WhenMissing- { missingSubtree = \m -> missingSubtree t m >>= \m' -> pure $! fmap f m'- , missingKey = \k x -> missingKey t k x >>= \q -> (pure $! fmap f q) }-{-# INLINE mapWhenMissing #-}----- | Map covariantly over a @'WhenMissing' f x@, using only a--- 'Functor f' constraint.-mapGentlyWhenMissing- :: Functor f- => (a -> b)- -> WhenMissing f x a- -> WhenMissing f x b-mapGentlyWhenMissing f t = WhenMissing- { missingSubtree = \m -> fmap f <$> missingSubtree t m- , missingKey = \k x -> fmap f <$> missingKey t k x }-{-# INLINE mapGentlyWhenMissing #-}----- | Map covariantly over a @'WhenMatched' f k x@, using only a--- 'Functor f' constraint.-mapGentlyWhenMatched- :: Functor f- => (a -> b)- -> WhenMatched f x y a- -> WhenMatched f x y b-mapGentlyWhenMatched f t =- zipWithMaybeAMatched $ \k x y -> fmap f <$> runWhenMatched t k x y-{-# INLINE mapGentlyWhenMatched #-}----- | Map contravariantly over a @'WhenMissing' f _ x@.------ @since 0.5.9-lmapWhenMissing :: (b -> a) -> WhenMissing f a x -> WhenMissing f b x-lmapWhenMissing f t = WhenMissing- { missingSubtree = \m -> missingSubtree t (fmap f m)- , missingKey = \k x -> missingKey t k (f x) }-{-# INLINE lmapWhenMissing #-}----- | Map contravariantly over a @'WhenMatched' f _ y z@.------ @since 0.5.9-contramapFirstWhenMatched- :: (b -> a)- -> WhenMatched f a y z- -> WhenMatched f b y z-contramapFirstWhenMatched f t =- WhenMatched $ \k x y -> runWhenMatched t k (f x) y-{-# INLINE contramapFirstWhenMatched #-}----- | Map contravariantly over a @'WhenMatched' f x _ z@.------ @since 0.5.9-contramapSecondWhenMatched- :: (b -> a)- -> WhenMatched f x a z- -> WhenMatched f x b z-contramapSecondWhenMatched f t =- WhenMatched $ \k x y -> runWhenMatched t k x (f y)-{-# INLINE contramapSecondWhenMatched #-}----- | A tactic for dealing with keys present in one map but not the--- other in 'merge'.------ A tactic of type @SimpleWhenMissing x z@ is an abstract--- representation of a function of type @Key -> x -> Maybe z@.------ @since 0.5.9-type SimpleWhenMissing = WhenMissing Identity----- | A tactic for dealing with keys present in both maps in 'merge'--- or 'mergeA'.------ A tactic of type @WhenMatched f x y z@ is an abstract representation--- of a function of type @Key -> x -> y -> f (Maybe z)@.------ @since 0.5.9-newtype WhenMatched f x y z = WhenMatched- { matchedKey :: Key -> x -> y -> f (Maybe z) }----- | Along with zipWithMaybeAMatched, witnesses the isomorphism--- between @WhenMatched f x y z@ and @Key -> x -> y -> f (Maybe z)@.------ @since 0.5.9-runWhenMatched :: WhenMatched f x y z -> Key -> x -> y -> f (Maybe z)-runWhenMatched = matchedKey-{-# INLINE runWhenMatched #-}----- | Along with traverseMaybeMissing, witnesses the isomorphism--- between @WhenMissing f x y@ and @Key -> x -> f (Maybe y)@.------ @since 0.5.9-runWhenMissing :: WhenMissing f x y -> Key-> x -> f (Maybe y)-runWhenMissing = missingKey-{-# INLINE runWhenMissing #-}----- | @since 0.5.9-instance Functor f => Functor (WhenMatched f x y) where- fmap = mapWhenMatched- {-# INLINE fmap #-}----- | @since 0.5.9-instance (Monad f, Applicative f) => Category.Category (WhenMatched f x)- where- id = zipWithMatched (\_ _ y -> y)- f . g =- zipWithMaybeAMatched $ \k x y -> do- res <- runWhenMatched g k x y- case res of- Nothing -> pure Nothing- Just r -> runWhenMatched f k x r- {-# INLINE id #-}- {-# INLINE (.) #-}----- | Equivalent to @ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))@------ @since 0.5.9-instance (Monad f, Applicative f) => Applicative (WhenMatched f x y) where- pure x = zipWithMatched (\_ _ _ -> x)- fs <*> xs =- zipWithMaybeAMatched $ \k x y -> do- res <- runWhenMatched fs k x y- case res of- Nothing -> pure Nothing- Just r -> (pure $!) . fmap r =<< runWhenMatched xs k x y- {-# INLINE pure #-}- {-# INLINE (<*>) #-}----- | Equivalent to @ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))@------ @since 0.5.9-instance (Monad f, Applicative f) => Monad (WhenMatched f x y) where- m >>= f =- zipWithMaybeAMatched $ \k x y -> do- res <- runWhenMatched m k x y- case res of- Nothing -> pure Nothing- Just r -> runWhenMatched (f r) k x y- {-# INLINE (>>=) #-}----- | Map covariantly over a @'WhenMatched' f x y@.------ @since 0.5.9-mapWhenMatched- :: Functor f- => (a -> b)- -> WhenMatched f x y a- -> WhenMatched f x y b-mapWhenMatched f (WhenMatched g) =- WhenMatched $ \k x y -> fmap (fmap f) (g k x y)-{-# INLINE mapWhenMatched #-}----- | A tactic for dealing with keys present in both maps in 'merge'.------ A tactic of type @SimpleWhenMatched x y z@ is an abstract--- representation of a function of type @Key -> x -> y -> Maybe z@.------ @since 0.5.9-type SimpleWhenMatched = WhenMatched Identity----- | When a key is found in both maps, apply a function to the key--- and values and use the result in the merged map.------ > zipWithMatched--- > :: (Key -> x -> y -> z)--- > -> SimpleWhenMatched x y z------ @since 0.5.9-zipWithMatched- :: Applicative f- => (Key -> x -> y -> z)- -> WhenMatched f x y z-zipWithMatched f = WhenMatched $ \ k x y -> pure . Just $ f k x y-{-# INLINE zipWithMatched #-}----- | When a key is found in both maps, apply a function to the key--- and values to produce an action and use its result in the merged--- map.------ @since 0.5.9-zipWithAMatched- :: Applicative f- => (Key -> x -> y -> f z)- -> WhenMatched f x y z-zipWithAMatched f = WhenMatched $ \ k x y -> Just <$> f k x y-{-# INLINE zipWithAMatched #-}----- | When a key is found in both maps, apply a function to the key--- and values and maybe use the result in the merged map.------ > zipWithMaybeMatched--- > :: (Key -> x -> y -> Maybe z)--- > -> SimpleWhenMatched x y z------ @since 0.5.9-zipWithMaybeMatched- :: Applicative f- => (Key -> x -> y -> Maybe z)- -> WhenMatched f x y z-zipWithMaybeMatched f = WhenMatched $ \ k x y -> pure $ f k x y-{-# INLINE zipWithMaybeMatched #-}----- | When a key is found in both maps, apply a function to the key--- and values, perform the resulting action, and maybe use the--- result in the merged map.------ This is the fundamental 'WhenMatched' tactic.------ @since 0.5.9-zipWithMaybeAMatched- :: (Key -> x -> y -> f (Maybe z))- -> WhenMatched f x y z-zipWithMaybeAMatched f = WhenMatched $ \ k x y -> f k x y-{-# INLINE zipWithMaybeAMatched #-}----- | Drop all the entries whose keys are missing from the other--- map.------ > dropMissing :: SimpleWhenMissing x y------ prop> dropMissing = mapMaybeMissing (\_ _ -> Nothing)------ but @dropMissing@ is much faster.------ @since 0.5.9-dropMissing :: Applicative f => WhenMissing f x y-dropMissing = WhenMissing- { missingSubtree = const (pure Nil)- , missingKey = \_ _ -> pure Nothing }-{-# INLINE dropMissing #-}----- | Preserve, unchanged, the entries whose keys are missing from--- the other map.------ > preserveMissing :: SimpleWhenMissing x x------ prop> preserveMissing = Merge.Lazy.mapMaybeMissing (\_ x -> Just x)------ but @preserveMissing@ is much faster.------ @since 0.5.9-preserveMissing :: Applicative f => WhenMissing f x x-preserveMissing = WhenMissing- { missingSubtree = pure- , missingKey = \_ v -> pure (Just v) }-{-# INLINE preserveMissing #-}----- | Map over the entries whose keys are missing from the other map.------ > mapMissing :: (k -> x -> y) -> SimpleWhenMissing x y------ prop> mapMissing f = mapMaybeMissing (\k x -> Just $ f k x)------ but @mapMissing@ is somewhat faster.------ @since 0.5.9-mapMissing :: Applicative f => (Key -> x -> y) -> WhenMissing f x y-mapMissing f = WhenMissing- { missingSubtree = \m -> pure $! mapWithKey f m- , missingKey = \k x -> pure $ Just (f k x) }-{-# INLINE mapMissing #-}----- | Map over the entries whose keys are missing from the other--- map, optionally removing some. This is the most powerful--- 'SimpleWhenMissing' tactic, but others are usually more efficient.------ > mapMaybeMissing :: (Key -> x -> Maybe y) -> SimpleWhenMissing x y------ prop> mapMaybeMissing f = traverseMaybeMissing (\k x -> pure (f k x))------ but @mapMaybeMissing@ uses fewer unnecessary 'Applicative'--- operations.------ @since 0.5.9-mapMaybeMissing- :: Applicative f => (Key -> x -> Maybe y) -> WhenMissing f x y-mapMaybeMissing f = WhenMissing- { missingSubtree = \m -> pure $! mapMaybeWithKey f m- , missingKey = \k x -> pure $! f k x }-{-# INLINE mapMaybeMissing #-}----- | Filter the entries whose keys are missing from the other map.------ > filterMissing :: (k -> x -> Bool) -> SimpleWhenMissing x x------ prop> filterMissing f = Merge.Lazy.mapMaybeMissing $ \k x -> guard (f k x) *> Just x------ but this should be a little faster.------ @since 0.5.9-filterMissing- :: Applicative f => (Key -> x -> Bool) -> WhenMissing f x x-filterMissing f = WhenMissing- { missingSubtree = \m -> pure $! filterWithKey f m- , missingKey = \k x -> pure $! if f k x then Just x else Nothing }-{-# INLINE filterMissing #-}----- | Filter the entries whose keys are missing from the other map--- using some 'Applicative' action.------ > filterAMissing f = Merge.Lazy.traverseMaybeMissing $--- > \k x -> (\b -> guard b *> Just x) <$> f k x------ but this should be a little faster.------ @since 0.5.9-filterAMissing- :: Applicative f => (Key -> x -> f Bool) -> WhenMissing f x x-filterAMissing f = WhenMissing- { missingSubtree = \m -> filterWithKeyA f m- , missingKey = \k x -> bool Nothing (Just x) <$> f k x }-{-# INLINE filterAMissing #-}----- | \(O(n)\). Filter keys and values using an 'Applicative' predicate.-filterWithKeyA- :: Applicative f => (Key -> a -> f Bool) -> Word64Map a -> f (Word64Map a)-filterWithKeyA _ Nil = pure Nil-filterWithKeyA f t@(Tip k x) = (\b -> if b then t else Nil) <$> f k x-filterWithKeyA f (Bin p m l r)- | m < 0 = liftA2 (flip (bin p m)) (filterWithKeyA f r) (filterWithKeyA f l)- | otherwise = liftA2 (bin p m) (filterWithKeyA f l) (filterWithKeyA f r)---- | This wasn't in Data.Bool until 4.7.0, so we define it here-bool :: a -> a -> Bool -> a-bool f _ False = f-bool _ t True = t----- | Traverse over the entries whose keys are missing from the other--- map.------ @since 0.5.9-traverseMissing- :: Applicative f => (Key -> x -> f y) -> WhenMissing f x y-traverseMissing f = WhenMissing- { missingSubtree = traverseWithKey f- , missingKey = \k x -> Just <$> f k x }-{-# INLINE traverseMissing #-}----- | Traverse over the entries whose keys are missing from the other--- map, optionally producing values to put in the result. This is--- the most powerful 'WhenMissing' tactic, but others are usually--- more efficient.------ @since 0.5.9-traverseMaybeMissing- :: Applicative f => (Key -> x -> f (Maybe y)) -> WhenMissing f x y-traverseMaybeMissing f = WhenMissing- { missingSubtree = traverseMaybeWithKey f- , missingKey = f }-{-# INLINE traverseMaybeMissing #-}----- | \(O(n)\). Traverse keys\/values and collect the 'Just' results.------ @since 0.6.4-traverseMaybeWithKey- :: Applicative f => (Key -> a -> f (Maybe b)) -> Word64Map a -> f (Word64Map b)-traverseMaybeWithKey f = go- where- go Nil = pure Nil- go (Tip k x) = maybe Nil (Tip k) <$> f k x- go (Bin p m l r)- | m < 0 = liftA2 (flip (bin p m)) (go r) (go l)- | otherwise = liftA2 (bin p m) (go l) (go r)----- | Merge two maps.------ 'merge' takes two 'WhenMissing' tactics, a 'WhenMatched' tactic--- and two maps. It uses the tactics to merge the maps. Its behavior--- is best understood via its fundamental tactics, 'mapMaybeMissing'--- and 'zipWithMaybeMatched'.------ Consider------ @--- merge (mapMaybeMissing g1)--- (mapMaybeMissing g2)--- (zipWithMaybeMatched f)--- m1 m2--- @------ Take, for example,------ @--- m1 = [(0, \'a\'), (1, \'b\'), (3, \'c\'), (4, \'d\')]--- m2 = [(1, "one"), (2, "two"), (4, "three")]--- @------ 'merge' will first \"align\" these maps by key:------ @--- m1 = [(0, \'a\'), (1, \'b\'), (3, \'c\'), (4, \'d\')]--- m2 = [(1, "one"), (2, "two"), (4, "three")]--- @------ It will then pass the individual entries and pairs of entries--- to @g1@, @g2@, or @f@ as appropriate:------ @--- maybes = [g1 0 \'a\', f 1 \'b\' "one", g2 2 "two", g1 3 \'c\', f 4 \'d\' "three"]--- @------ This produces a 'Maybe' for each key:------ @--- keys = 0 1 2 3 4--- results = [Nothing, Just True, Just False, Nothing, Just True]--- @------ Finally, the @Just@ results are collected into a map:------ @--- return value = [(1, True), (2, False), (4, True)]--- @------ The other tactics below are optimizations or simplifications of--- 'mapMaybeMissing' for special cases. Most importantly,------ * 'dropMissing' drops all the keys.--- * 'preserveMissing' leaves all the entries alone.------ When 'merge' is given three arguments, it is inlined at the call--- site. To prevent excessive inlining, you should typically use--- 'merge' to define your custom combining functions.--------- Examples:------ prop> unionWithKey f = merge preserveMissing preserveMissing (zipWithMatched f)--- prop> intersectionWithKey f = merge dropMissing dropMissing (zipWithMatched f)--- prop> differenceWith f = merge diffPreserve diffDrop f--- prop> symmetricDifference = merge diffPreserve diffPreserve (\ _ _ _ -> Nothing)--- prop> mapEachPiece f g h = merge (diffMapWithKey f) (diffMapWithKey g)------ @since 0.5.9-merge- :: SimpleWhenMissing a c -- ^ What to do with keys in @m1@ but not @m2@- -> SimpleWhenMissing b c -- ^ What to do with keys in @m2@ but not @m1@- -> SimpleWhenMatched a b c -- ^ What to do with keys in both @m1@ and @m2@- -> Word64Map a -- ^ Map @m1@- -> Word64Map b -- ^ Map @m2@- -> Word64Map c-merge g1 g2 f m1 m2 =- runIdentity $ mergeA g1 g2 f m1 m2-{-# INLINE merge #-}----- | An applicative version of 'merge'.------ 'mergeA' takes two 'WhenMissing' tactics, a 'WhenMatched'--- tactic and two maps. It uses the tactics to merge the maps.--- Its behavior is best understood via its fundamental tactics,--- 'traverseMaybeMissing' and 'zipWithMaybeAMatched'.------ Consider------ @--- mergeA (traverseMaybeMissing g1)--- (traverseMaybeMissing g2)--- (zipWithMaybeAMatched f)--- m1 m2--- @------ Take, for example,------ @--- m1 = [(0, \'a\'), (1, \'b\'), (3,\'c\'), (4, \'d\')]--- m2 = [(1, "one"), (2, "two"), (4, "three")]--- @------ 'mergeA' will first \"align\" these maps by key:------ @--- m1 = [(0, \'a\'), (1, \'b\'), (3, \'c\'), (4, \'d\')]--- m2 = [(1, "one"), (2, "two"), (4, "three")]--- @------ It will then pass the individual entries and pairs of entries--- to @g1@, @g2@, or @f@ as appropriate:------ @--- actions = [g1 0 \'a\', f 1 \'b\' "one", g2 2 "two", g1 3 \'c\', f 4 \'d\' "three"]--- @------ Next, it will perform the actions in the @actions@ list in order from--- left to right.------ @--- keys = 0 1 2 3 4--- results = [Nothing, Just True, Just False, Nothing, Just True]--- @------ Finally, the @Just@ results are collected into a map:------ @--- return value = [(1, True), (2, False), (4, True)]--- @------ The other tactics below are optimizations or simplifications of--- 'traverseMaybeMissing' for special cases. Most importantly,------ * 'dropMissing' drops all the keys.--- * 'preserveMissing' leaves all the entries alone.--- * 'mapMaybeMissing' does not use the 'Applicative' context.------ When 'mergeA' is given three arguments, it is inlined at the call--- site. To prevent excessive inlining, you should generally only use--- 'mergeA' to define custom combining functions.------ @since 0.5.9-mergeA- :: (Applicative f)- => WhenMissing f a c -- ^ What to do with keys in @m1@ but not @m2@- -> WhenMissing f b c -- ^ What to do with keys in @m2@ but not @m1@- -> WhenMatched f a b c -- ^ What to do with keys in both @m1@ and @m2@- -> Word64Map a -- ^ Map @m1@- -> Word64Map b -- ^ Map @m2@- -> f (Word64Map c)-mergeA- WhenMissing{missingSubtree = g1t, missingKey = g1k}- WhenMissing{missingSubtree = g2t, missingKey = g2k}- WhenMatched{matchedKey = f}- = go- where- go t1 Nil = g1t t1- go Nil t2 = g2t t2-- -- This case is already covered below.- -- go (Tip k1 x1) (Tip k2 x2) = mergeTips k1 x1 k2 x2-- go (Tip k1 x1) t2' = merge2 t2'- where- merge2 t2@(Bin p2 m2 l2 r2)- | nomatch k1 p2 m2 = linkA k1 (subsingletonBy g1k k1 x1) p2 (g2t t2)- | zero k1 m2 = binA p2 m2 (merge2 l2) (g2t r2)- | otherwise = binA p2 m2 (g2t l2) (merge2 r2)- merge2 (Tip k2 x2) = mergeTips k1 x1 k2 x2- merge2 Nil = subsingletonBy g1k k1 x1-- go t1' (Tip k2 x2) = merge1 t1'- where- merge1 t1@(Bin p1 m1 l1 r1)- | nomatch k2 p1 m1 = linkA p1 (g1t t1) k2 (subsingletonBy g2k k2 x2)- | zero k2 m1 = binA p1 m1 (merge1 l1) (g1t r1)- | otherwise = binA p1 m1 (g1t l1) (merge1 r1)- merge1 (Tip k1 x1) = mergeTips k1 x1 k2 x2- merge1 Nil = subsingletonBy g2k k2 x2-- go t1@(Bin p1 m1 l1 r1) t2@(Bin p2 m2 l2 r2)- | shorter m1 m2 = merge1- | shorter m2 m1 = merge2- | p1 == p2 = binA p1 m1 (go l1 l2) (go r1 r2)- | otherwise = linkA p1 (g1t t1) p2 (g2t t2)- where- merge1 | nomatch p2 p1 m1 = linkA p1 (g1t t1) p2 (g2t t2)- | zero p2 m1 = binA p1 m1 (go l1 t2) (g1t r1)- | otherwise = binA p1 m1 (g1t l1) (go r1 t2)- merge2 | nomatch p1 p2 m2 = linkA p1 (g1t t1) p2 (g2t t2)- | zero p1 m2 = binA p2 m2 (go t1 l2) (g2t r2)- | otherwise = binA p2 m2 (g2t l2) (go t1 r2)-- subsingletonBy gk k x = maybe Nil (Tip k) <$> gk k x- {-# INLINE subsingletonBy #-}-- mergeTips k1 x1 k2 x2- | k1 == k2 = maybe Nil (Tip k1) <$> f k1 x1 x2- | k1 < k2 = liftA2 (subdoubleton k1 k2) (g1k k1 x1) (g2k k2 x2)- {-- = link_ k1 k2 <$> subsingletonBy g1k k1 x1 <*> subsingletonBy g2k k2 x2- -}- | otherwise = liftA2 (subdoubleton k2 k1) (g2k k2 x2) (g1k k1 x1)- {-# INLINE mergeTips #-}-- subdoubleton _ _ Nothing Nothing = Nil- subdoubleton _ k2 Nothing (Just y2) = Tip k2 y2- subdoubleton k1 _ (Just y1) Nothing = Tip k1 y1- subdoubleton k1 k2 (Just y1) (Just y2) = link k1 (Tip k1 y1) k2 (Tip k2 y2)- {-# INLINE subdoubleton #-}-- -- A variant of 'link_' which makes sure to execute side-effects- -- in the right order.- linkA- :: Applicative f- => Prefix -> f (Word64Map a)- -> Prefix -> f (Word64Map a)- -> f (Word64Map a)- linkA p1 t1 p2 t2- | zero p1 m = binA p m t1 t2- | otherwise = binA p m t2 t1- where- m = branchMask p1 p2- p = mask p1 m- {-# INLINE linkA #-}-- -- A variant of 'bin' that ensures that effects for negative keys are executed- -- first.- binA- :: Applicative f- => Prefix- -> Mask- -> f (Word64Map a)- -> f (Word64Map a)- -> f (Word64Map a)- binA p m a b- | m < 0 = liftA2 (flip (bin p m)) b a- | otherwise = liftA2 (bin p m) a b- {-# INLINE binA #-}-{-# INLINE mergeA #-}---{--------------------------------------------------------------------- Min\/Max---------------------------------------------------------------------}---- | \(O(\min(n,W))\). Update the value at the minimal key.------ > updateMinWithKey (\ k a -> Just ((show k) ++ ":" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3,"3:b"), (5,"a")]--- > updateMinWithKey (\ _ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"--updateMinWithKey :: (Key -> a -> Maybe a) -> Word64Map a -> Word64Map a-updateMinWithKey f t =- case t of Bin p m l r | m < 0 -> binCheckRight p m l (go f r)- _ -> go f t- where- go f' (Bin p m l r) = binCheckLeft p m (go f' l) r- go f' (Tip k y) = case f' k y of- Just y' -> Tip k y'- Nothing -> Nil- go _ Nil = error "updateMinWithKey Nil"---- | \(O(\min(n,W))\). Update the value at the maximal key.------ > updateMaxWithKey (\ k a -> Just ((show k) ++ ":" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3,"b"), (5,"5:a")]--- > updateMaxWithKey (\ _ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"--updateMaxWithKey :: (Key -> a -> Maybe a) -> Word64Map a -> Word64Map a-updateMaxWithKey f t =- case t of Bin p m l r | m < 0 -> binCheckLeft p m (go f l) r- _ -> go f t- where- go f' (Bin p m l r) = binCheckRight p m l (go f' r)- go f' (Tip k y) = case f' k y of- Just y' -> Tip k y'- Nothing -> Nil- go _ Nil = error "updateMaxWithKey Nil"---data View a = View {-# UNPACK #-} !Key a !(Word64Map a)---- | \(O(\min(n,W))\). Retrieves the maximal (key,value) pair of the map, and--- the map stripped of that element, or 'Nothing' if passed an empty map.------ > maxViewWithKey (fromList [(5,"a"), (3,"b")]) == Just ((5,"a"), singleton 3 "b")--- > maxViewWithKey empty == Nothing--maxViewWithKey :: Word64Map a -> Maybe ((Key, a), Word64Map a)-maxViewWithKey t = case t of- Nil -> Nothing- _ -> Just $ case maxViewWithKeySure t of- View k v t' -> ((k, v), t')-{-# INLINE maxViewWithKey #-}--maxViewWithKeySure :: Word64Map a -> View a-maxViewWithKeySure t =- case t of- Nil -> error "maxViewWithKeySure Nil"- Bin p m l r | m < 0 ->- case go l of View k a l' -> View k a (binCheckLeft p m l' r)- _ -> go t- where- go (Bin p m l r) =- case go r of View k a r' -> View k a (binCheckRight p m l r')- go (Tip k y) = View k y Nil- go Nil = error "maxViewWithKey_go Nil"--- See note on NOINLINE at minViewWithKeySure-{-# NOINLINE maxViewWithKeySure #-}---- | \(O(\min(n,W))\). Retrieves the minimal (key,value) pair of the map, and--- the map stripped of that element, or 'Nothing' if passed an empty map.------ > minViewWithKey (fromList [(5,"a"), (3,"b")]) == Just ((3,"b"), singleton 5 "a")--- > minViewWithKey empty == Nothing--minViewWithKey :: Word64Map a -> Maybe ((Key, a), Word64Map a)-minViewWithKey t =- case t of- Nil -> Nothing- _ -> Just $ case minViewWithKeySure t of- View k v t' -> ((k, v), t')--- We inline this to give GHC the best possible chance of--- getting rid of the Maybe, pair, and Int constructors, as--- well as a thunk under the Just. That is, we really want to--- be certain this inlines!-{-# INLINE minViewWithKey #-}--minViewWithKeySure :: Word64Map a -> View a-minViewWithKeySure t =- case t of- Nil -> error "minViewWithKeySure Nil"- Bin p m l r | m < 0 ->- case go r of- View k a r' -> View k a (binCheckRight p m l r')- _ -> go t- where- go (Bin p m l r) =- case go l of View k a l' -> View k a (binCheckLeft p m l' r)- go (Tip k y) = View k y Nil- go Nil = error "minViewWithKey_go Nil"--- There's never anything significant to be gained by inlining--- this. Sufficiently recent GHC versions will inline the wrapper--- anyway, which should be good enough.-{-# NOINLINE minViewWithKeySure #-}---- | \(O(\min(n,W))\). Update the value at the maximal key.------ > updateMax (\ a -> Just ("X" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "Xa")]--- > updateMax (\ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"--updateMax :: (a -> Maybe a) -> Word64Map a -> Word64Map a-updateMax f = updateMaxWithKey (const f)---- | \(O(\min(n,W))\). Update the value at the minimal key.------ > updateMin (\ a -> Just ("X" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3, "Xb"), (5, "a")]--- > updateMin (\ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"--updateMin :: (a -> Maybe a) -> Word64Map a -> Word64Map a-updateMin f = updateMinWithKey (const f)---- | \(O(\min(n,W))\). Retrieves the maximal key of the map, and the map--- stripped of that element, or 'Nothing' if passed an empty map.-maxView :: Word64Map a -> Maybe (a, Word64Map a)-maxView t = fmap (\((_, x), t') -> (x, t')) (maxViewWithKey t)---- | \(O(\min(n,W))\). Retrieves the minimal key of the map, and the map--- stripped of that element, or 'Nothing' if passed an empty map.-minView :: Word64Map a -> Maybe (a, Word64Map a)-minView t = fmap (\((_, x), t') -> (x, t')) (minViewWithKey t)---- | \(O(\min(n,W))\). Delete and find the maximal element.--- This function throws an error if the map is empty. Use 'maxViewWithKey'--- if the map may be empty.-deleteFindMax :: Word64Map a -> ((Key, a), Word64Map a)-deleteFindMax = fromMaybe (error "deleteFindMax: empty map has no maximal element") . maxViewWithKey---- | \(O(\min(n,W))\). Delete and find the minimal element.--- This function throws an error if the map is empty. Use 'minViewWithKey'--- if the map may be empty.-deleteFindMin :: Word64Map a -> ((Key, a), Word64Map a)-deleteFindMin = fromMaybe (error "deleteFindMin: empty map has no minimal element") . minViewWithKey---- | \(O(\min(n,W))\). The minimal key of the map. Returns 'Nothing' if the map is empty.-lookupMin :: Word64Map a -> Maybe (Key, a)-lookupMin Nil = Nothing-lookupMin (Tip k v) = Just (k,v)-lookupMin (Bin _ m l r)- | m < 0 = go r- | otherwise = go l- where go (Tip k v) = Just (k,v)- go (Bin _ _ l' _) = go l'- go Nil = Nothing---- | \(O(\min(n,W))\). The minimal key of the map. Calls 'error' if the map is empty.--- Use 'minViewWithKey' if the map may be empty.-findMin :: Word64Map a -> (Key, a)-findMin t- | Just r <- lookupMin t = r- | otherwise = error "findMin: empty map has no minimal element"---- | \(O(\min(n,W))\). The maximal key of the map. Returns 'Nothing' if the map is empty.-lookupMax :: Word64Map a -> Maybe (Key, a)-lookupMax Nil = Nothing-lookupMax (Tip k v) = Just (k,v)-lookupMax (Bin _ m l r)- | m < 0 = go l- | otherwise = go r- where go (Tip k v) = Just (k,v)- go (Bin _ _ _ r') = go r'- go Nil = Nothing---- | \(O(\min(n,W))\). The maximal key of the map. Calls 'error' if the map is empty.--- Use 'maxViewWithKey' if the map may be empty.-findMax :: Word64Map a -> (Key, a)-findMax t- | Just r <- lookupMax t = r- | otherwise = error "findMax: empty map has no maximal element"---- | \(O(\min(n,W))\). Delete the minimal key. Returns an empty map if the map is empty.------ Note that this is a change of behaviour for consistency with 'Data.Map.Map' –--- versions prior to 0.5 threw an error if the 'Word64Map' was already empty.-deleteMin :: Word64Map a -> Word64Map a-deleteMin = maybe Nil snd . minView---- | \(O(\min(n,W))\). Delete the maximal key. Returns an empty map if the map is empty.------ Note that this is a change of behaviour for consistency with 'Data.Map.Map' –--- versions prior to 0.5 threw an error if the 'Word64Map' was already empty.-deleteMax :: Word64Map a -> Word64Map a-deleteMax = maybe Nil snd . maxView---{--------------------------------------------------------------------- Submap---------------------------------------------------------------------}--- | \(O(n+m)\). Is this a proper submap? (ie. a submap but not equal).--- Defined as (@'isProperSubmapOf' = 'isProperSubmapOfBy' (==)@).-isProperSubmapOf :: Eq a => Word64Map a -> Word64Map a -> Bool-isProperSubmapOf m1 m2- = isProperSubmapOfBy (==) m1 m2--{- | \(O(n+m)\). Is this a proper submap? (ie. a submap but not equal).- The expression (@'isProperSubmapOfBy' f m1 m2@) returns 'True' when- @keys m1@ and @keys m2@ are not equal,- all keys in @m1@ are in @m2@, and when @f@ returns 'True' when- applied to their respective values. For example, the following- expressions are all 'True':-- > isProperSubmapOfBy (==) (fromList [(1,1)]) (fromList [(1,1),(2,2)])- > isProperSubmapOfBy (<=) (fromList [(1,1)]) (fromList [(1,1),(2,2)])-- But the following are all 'False':-- > isProperSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1),(2,2)])- > isProperSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1)])- > isProperSubmapOfBy (<) (fromList [(1,1)]) (fromList [(1,1),(2,2)])--}-isProperSubmapOfBy :: (a -> b -> Bool) -> Word64Map a -> Word64Map b -> Bool-isProperSubmapOfBy predicate t1 t2- = case submapCmp predicate t1 t2 of- LT -> True- _ -> False--submapCmp :: (a -> b -> Bool) -> Word64Map a -> Word64Map b -> Ordering-submapCmp predicate t1@(Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)- | shorter m1 m2 = GT- | shorter m2 m1 = submapCmpLt- | p1 == p2 = submapCmpEq- | otherwise = GT -- disjoint- where- submapCmpLt | nomatch p1 p2 m2 = GT- | zero p1 m2 = submapCmp predicate t1 l2- | otherwise = submapCmp predicate t1 r2- submapCmpEq = case (submapCmp predicate l1 l2, submapCmp predicate r1 r2) of- (GT,_ ) -> GT- (_ ,GT) -> GT- (EQ,EQ) -> EQ- _ -> LT--submapCmp _ (Bin _ _ _ _) _ = GT-submapCmp predicate (Tip kx x) (Tip ky y)- | (kx == ky) && predicate x y = EQ- | otherwise = GT -- disjoint-submapCmp predicate (Tip k x) t- = case lookup k t of- Just y | predicate x y -> LT- _ -> GT -- disjoint-submapCmp _ Nil Nil = EQ-submapCmp _ Nil _ = LT---- | \(O(n+m)\). Is this a submap?--- Defined as (@'isSubmapOf' = 'isSubmapOfBy' (==)@).-isSubmapOf :: Eq a => Word64Map a -> Word64Map a -> Bool-isSubmapOf m1 m2- = isSubmapOfBy (==) m1 m2--{- | \(O(n+m)\).- The expression (@'isSubmapOfBy' f m1 m2@) returns 'True' if- all keys in @m1@ are in @m2@, and when @f@ returns 'True' when- applied to their respective values. For example, the following- expressions are all 'True':-- > isSubmapOfBy (==) (fromList [(1,1)]) (fromList [(1,1),(2,2)])- > isSubmapOfBy (<=) (fromList [(1,1)]) (fromList [(1,1),(2,2)])- > isSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1),(2,2)])-- But the following are all 'False':-- > isSubmapOfBy (==) (fromList [(1,2)]) (fromList [(1,1),(2,2)])- > isSubmapOfBy (<) (fromList [(1,1)]) (fromList [(1,1),(2,2)])- > isSubmapOfBy (==) (fromList [(1,1),(2,2)]) (fromList [(1,1)])--}-isSubmapOfBy :: (a -> b -> Bool) -> Word64Map a -> Word64Map b -> Bool-isSubmapOfBy predicate t1@(Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)- | shorter m1 m2 = False- | shorter m2 m1 = match p1 p2 m2 &&- if zero p1 m2- then isSubmapOfBy predicate t1 l2- else isSubmapOfBy predicate t1 r2- | otherwise = (p1==p2) && isSubmapOfBy predicate l1 l2 && isSubmapOfBy predicate r1 r2-isSubmapOfBy _ (Bin _ _ _ _) _ = False-isSubmapOfBy predicate (Tip k x) t = case lookup k t of- Just y -> predicate x y- Nothing -> False-isSubmapOfBy _ Nil _ = True--{--------------------------------------------------------------------- Mapping---------------------------------------------------------------------}--- | \(O(n)\). Map a function over all values in the map.------ > map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]--map :: (a -> b) -> Word64Map a -> Word64Map b-map f = go- where- go (Bin p m l r) = Bin p m (go l) (go r)- go (Tip k x) = Tip k (f x)- go Nil = Nil--#ifdef __GLASGOW_HASKELL__-{-# NOINLINE [1] map #-}-{-# RULES-"map/map" forall f g xs . map f (map g xs) = map (f . g) xs-"map/coerce" map coerce = coerce- #-}-#endif---- | \(O(n)\). Map a function over all values in the map.------ > let f key x = (show key) ++ ":" ++ x--- > mapWithKey f (fromList [(5,"a"), (3,"b")]) == fromList [(3, "3:b"), (5, "5:a")]--mapWithKey :: (Key -> a -> b) -> Word64Map a -> Word64Map b-mapWithKey f t- = case t of- Bin p m l r -> Bin p m (mapWithKey f l) (mapWithKey f r)- Tip k x -> Tip k (f k x)- Nil -> Nil--#ifdef __GLASGOW_HASKELL__-{-# NOINLINE [1] mapWithKey #-}-{-# RULES-"mapWithKey/mapWithKey" forall f g xs . mapWithKey f (mapWithKey g xs) =- mapWithKey (\k a -> f k (g k a)) xs-"mapWithKey/map" forall f g xs . mapWithKey f (map g xs) =- mapWithKey (\k a -> f k (g a)) xs-"map/mapWithKey" forall f g xs . map f (mapWithKey g xs) =- mapWithKey (\k a -> f (g k a)) xs- #-}-#endif---- | \(O(n)\).--- @'traverseWithKey' f s == 'fromList' <$> 'traverse' (\(k, v) -> (,) k <$> f k v) ('toList' m)@--- That is, behaves exactly like a regular 'traverse' except that the traversing--- function also has access to the key associated with a value.------ > traverseWithKey (\k v -> if odd k then Just (succ v) else Nothing) (fromList [(1, 'a'), (5, 'e')]) == Just (fromList [(1, 'b'), (5, 'f')])--- > traverseWithKey (\k v -> if odd k then Just (succ v) else Nothing) (fromList [(2, 'c')]) == Nothing-traverseWithKey :: Applicative t => (Key -> a -> t b) -> Word64Map a -> t (Word64Map b)-traverseWithKey f = go- where- go Nil = pure Nil- go (Tip k v) = Tip k <$> f k v- go (Bin p m l r)- | m < 0 = liftA2 (flip (Bin p m)) (go r) (go l)- | otherwise = liftA2 (Bin p m) (go l) (go r)-{-# INLINE traverseWithKey #-}---- | \(O(n)\). The function @'mapAccum'@ threads an accumulating--- argument through the map in ascending order of keys.------ > let f a b = (a ++ b, b ++ "X")--- > mapAccum f "Everything: " (fromList [(5,"a"), (3,"b")]) == ("Everything: ba", fromList [(3, "bX"), (5, "aX")])--mapAccum :: (a -> b -> (a,c)) -> a -> Word64Map b -> (a,Word64Map c)-mapAccum f = mapAccumWithKey (\a' _ x -> f a' x)---- | \(O(n)\). The function @'mapAccumWithKey'@ threads an accumulating--- argument through the map in ascending order of keys.------ > let f a k b = (a ++ " " ++ (show k) ++ "-" ++ b, b ++ "X")--- > mapAccumWithKey f "Everything:" (fromList [(5,"a"), (3,"b")]) == ("Everything: 3-b 5-a", fromList [(3, "bX"), (5, "aX")])--mapAccumWithKey :: (a -> Key -> b -> (a,c)) -> a -> Word64Map b -> (a,Word64Map c)-mapAccumWithKey f a t- = mapAccumL f a t---- | \(O(n)\). The function @'mapAccumL'@ threads an accumulating--- argument through the map in ascending order of keys.-mapAccumL :: (a -> Key -> b -> (a,c)) -> a -> Word64Map b -> (a,Word64Map c)-mapAccumL f a t- = case t of- Bin p m l r- | m < 0 ->- let (a1,r') = mapAccumL f a r- (a2,l') = mapAccumL f a1 l- in (a2,Bin p m l' r')- | otherwise ->- let (a1,l') = mapAccumL f a l- (a2,r') = mapAccumL f a1 r- in (a2,Bin p m l' r')- Tip k x -> let (a',x') = f a k x in (a',Tip k x')- Nil -> (a,Nil)---- | \(O(n)\). The function @'mapAccumRWithKey'@ threads an accumulating--- argument through the map in descending order of keys.-mapAccumRWithKey :: (a -> Key -> b -> (a,c)) -> a -> Word64Map b -> (a,Word64Map c)-mapAccumRWithKey f a t- = case t of- Bin p m l r- | m < 0 ->- let (a1,l') = mapAccumRWithKey f a l- (a2,r') = mapAccumRWithKey f a1 r- in (a2,Bin p m l' r')- | otherwise ->- let (a1,r') = mapAccumRWithKey f a r- (a2,l') = mapAccumRWithKey f a1 l- in (a2,Bin p m l' r')- Tip k x -> let (a',x') = f a k x in (a',Tip k x')- Nil -> (a,Nil)---- | \(O(n \min(n,W))\).--- @'mapKeys' f s@ is the map obtained by applying @f@ to each key of @s@.------ The size of the result may be smaller if @f@ maps two or more distinct--- keys to the same new key. In this case the value at the greatest of the--- original keys is retained.------ > mapKeys (+ 1) (fromList [(5,"a"), (3,"b")]) == fromList [(4, "b"), (6, "a")]--- > mapKeys (\ _ -> 1) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 1 "c"--- > mapKeys (\ _ -> 3) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 3 "c"--mapKeys :: (Key->Key) -> Word64Map a -> Word64Map a-mapKeys f = fromList . foldrWithKey (\k x xs -> (f k, x) : xs) []---- | \(O(n \min(n,W))\).--- @'mapKeysWith' c f s@ is the map obtained by applying @f@ to each key of @s@.------ The size of the result may be smaller if @f@ maps two or more distinct--- keys to the same new key. In this case the associated values will be--- combined using @c@.------ > mapKeysWith (++) (\ _ -> 1) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 1 "cdab"--- > mapKeysWith (++) (\ _ -> 3) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 3 "cdab"--mapKeysWith :: (a -> a -> a) -> (Key->Key) -> Word64Map a -> Word64Map a-mapKeysWith c f- = fromListWith c . foldrWithKey (\k x xs -> (f k, x) : xs) []---- | \(O(n \min(n,W))\).--- @'mapKeysMonotonic' f s == 'mapKeys' f s@, but works only when @f@--- is strictly monotonic.--- That is, for any values @x@ and @y@, if @x@ < @y@ then @f x@ < @f y@.--- /The precondition is not checked./--- Semi-formally, we have:------ > and [x < y ==> f x < f y | x <- ls, y <- ls]--- > ==> mapKeysMonotonic f s == mapKeys f s--- > where ls = keys s------ This means that @f@ maps distinct original keys to distinct resulting keys.--- This function has slightly better performance than 'mapKeys'.------ > mapKeysMonotonic (\ k -> k * 2) (fromList [(5,"a"), (3,"b")]) == fromList [(6, "b"), (10, "a")]--mapKeysMonotonic :: (Key->Key) -> Word64Map a -> Word64Map a-mapKeysMonotonic f- = fromDistinctAscList . foldrWithKey (\k x xs -> (f k, x) : xs) []--{--------------------------------------------------------------------- Filter---------------------------------------------------------------------}--- | \(O(n)\). Filter all values that satisfy some predicate.------ > filter (> "a") (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"--- > filter (> "x") (fromList [(5,"a"), (3,"b")]) == empty--- > filter (< "a") (fromList [(5,"a"), (3,"b")]) == empty--filter :: (a -> Bool) -> Word64Map a -> Word64Map a-filter p m- = filterWithKey (\_ x -> p x) m---- | \(O(n)\). Filter all keys\/values that satisfy some predicate.------ > filterWithKey (\k _ -> k > 4) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"--filterWithKey :: (Key -> a -> Bool) -> Word64Map a -> Word64Map a-filterWithKey predicate = go- where- go Nil = Nil- go t@(Tip k x) = if predicate k x then t else Nil- go (Bin p m l r) = bin p m (go l) (go r)---- | \(O(n)\). Partition the map according to some predicate. The first--- map contains all elements that satisfy the predicate, the second all--- elements that fail the predicate. See also 'split'.------ > partition (> "a") (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", singleton 5 "a")--- > partition (< "x") (fromList [(5,"a"), (3,"b")]) == (fromList [(3, "b"), (5, "a")], empty)--- > partition (> "x") (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3, "b"), (5, "a")])--partition :: (a -> Bool) -> Word64Map a -> (Word64Map a,Word64Map a)-partition p m- = partitionWithKey (\_ x -> p x) m---- | \(O(n)\). Partition the map according to some predicate. The first--- map contains all elements that satisfy the predicate, the second all--- elements that fail the predicate. See also 'split'.------ > partitionWithKey (\ k _ -> k > 3) (fromList [(5,"a"), (3,"b")]) == (singleton 5 "a", singleton 3 "b")--- > partitionWithKey (\ k _ -> k < 7) (fromList [(5,"a"), (3,"b")]) == (fromList [(3, "b"), (5, "a")], empty)--- > partitionWithKey (\ k _ -> k > 7) (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3, "b"), (5, "a")])--partitionWithKey :: (Key -> a -> Bool) -> Word64Map a -> (Word64Map a,Word64Map a)-partitionWithKey predicate0 t0 = toPair $ go predicate0 t0- where- go predicate t =- case t of- Bin p m l r ->- let (l1 :*: l2) = go predicate l- (r1 :*: r2) = go predicate r- in bin p m l1 r1 :*: bin p m l2 r2- Tip k x- | predicate k x -> (t :*: Nil)- | otherwise -> (Nil :*: t)- Nil -> (Nil :*: Nil)---- | \(O(\min(n,W))\). Take while a predicate on the keys holds.--- The user is responsible for ensuring that for all @Int@s, @j \< k ==\> p j \>= p k@.--- See note at 'spanAntitone'.------ @--- takeWhileAntitone p = 'fromDistinctAscList' . 'Data.List.takeWhile' (p . fst) . 'toList'--- takeWhileAntitone p = 'filterWithKey' (\\k _ -> p k)--- @------ @since 0.6.7-takeWhileAntitone :: (Key -> Bool) -> Word64Map a -> Word64Map a-takeWhileAntitone predicate t =- case t of- Bin p m l r- | m < 0 ->- if predicate 0 -- handle negative numbers.- then bin p m (go predicate l) r- else go predicate r- _ -> go predicate t- where- go predicate' (Bin p m l r)- | predicate' $! p+m = bin p m l (go predicate' r)- | otherwise = go predicate' l- go predicate' t'@(Tip ky _)- | predicate' ky = t'- | otherwise = Nil- go _ Nil = Nil---- | \(O(\min(n,W))\). Drop while a predicate on the keys holds.--- The user is responsible for ensuring that for all @Int@s, @j \< k ==\> p j \>= p k@.--- See note at 'spanAntitone'.------ @--- dropWhileAntitone p = 'fromDistinctAscList' . 'Data.List.dropWhile' (p . fst) . 'toList'--- dropWhileAntitone p = 'filterWithKey' (\\k _ -> not (p k))--- @------ @since 0.6.7-dropWhileAntitone :: (Key -> Bool) -> Word64Map a -> Word64Map a-dropWhileAntitone predicate t =- case t of- Bin p m l r- | m < 0 ->- if predicate 0 -- handle negative numbers.- then go predicate l- else bin p m l (go predicate r)- _ -> go predicate t- where- go predicate' (Bin p m l r)- | predicate' $! p+m = go predicate' r- | otherwise = bin p m (go predicate' l) r- go predicate' t'@(Tip ky _)- | predicate' ky = Nil- | otherwise = t'- go _ Nil = Nil---- | \(O(\min(n,W))\). Divide a map at the point where a predicate on the keys stops holding.--- The user is responsible for ensuring that for all @Int@s, @j \< k ==\> p j \>= p k@.------ @--- spanAntitone p xs = ('takeWhileAntitone' p xs, 'dropWhileAntitone' p xs)--- spanAntitone p xs = 'partitionWithKey' (\\k _ -> p k) xs--- @------ Note: if @p@ is not actually antitone, then @spanAntitone@ will split the map--- at some /unspecified/ point.------ @since 0.6.7-spanAntitone :: (Key -> Bool) -> Word64Map a -> (Word64Map a, Word64Map a)-spanAntitone predicate t =- case t of- Bin p m l r- | m < 0 ->- if predicate 0 -- handle negative numbers.- then- case go predicate l of- (lt :*: gt) ->- let !lt' = bin p m lt r- in (lt', gt)- else- case go predicate r of- (lt :*: gt) ->- let !gt' = bin p m l gt- in (lt, gt')- _ -> case go predicate t of- (lt :*: gt) -> (lt, gt)- where- go predicate' (Bin p m l r)- | predicate' $! p+m = case go predicate' r of (lt :*: gt) -> bin p m l lt :*: gt- | otherwise = case go predicate' l of (lt :*: gt) -> lt :*: bin p m gt r- go predicate' t'@(Tip ky _)- | predicate' ky = (t' :*: Nil)- | otherwise = (Nil :*: t')- go _ Nil = (Nil :*: Nil)---- | \(O(n)\). Map values and collect the 'Just' results.------ > let f x = if x == "a" then Just "new a" else Nothing--- > mapMaybe f (fromList [(5,"a"), (3,"b")]) == singleton 5 "new a"--mapMaybe :: (a -> Maybe b) -> Word64Map a -> Word64Map b-mapMaybe f = mapMaybeWithKey (\_ x -> f x)---- | \(O(n)\). Map keys\/values and collect the 'Just' results.------ > let f k _ = if k < 5 then Just ("key : " ++ (show k)) else Nothing--- > mapMaybeWithKey f (fromList [(5,"a"), (3,"b")]) == singleton 3 "key : 3"--mapMaybeWithKey :: (Key -> a -> Maybe b) -> Word64Map a -> Word64Map b-mapMaybeWithKey f (Bin p m l r)- = bin p m (mapMaybeWithKey f l) (mapMaybeWithKey f r)-mapMaybeWithKey f (Tip k x) = case f k x of- Just y -> Tip k y- Nothing -> Nil-mapMaybeWithKey _ Nil = Nil---- | \(O(n)\). Map values and separate the 'Left' and 'Right' results.------ > let f a = if a < "c" then Left a else Right a--- > mapEither f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])--- > == (fromList [(3,"b"), (5,"a")], fromList [(1,"x"), (7,"z")])--- >--- > mapEither (\ a -> Right a) (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])--- > == (empty, fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])--mapEither :: (a -> Either b c) -> Word64Map a -> (Word64Map b, Word64Map c)-mapEither f m- = mapEitherWithKey (\_ x -> f x) m---- | \(O(n)\). Map keys\/values and separate the 'Left' and 'Right' results.------ > let f k a = if k < 5 then Left (k * 2) else Right (a ++ a)--- > mapEitherWithKey f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])--- > == (fromList [(1,2), (3,6)], fromList [(5,"aa"), (7,"zz")])--- >--- > mapEitherWithKey (\_ a -> Right a) (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])--- > == (empty, fromList [(1,"x"), (3,"b"), (5,"a"), (7,"z")])--mapEitherWithKey :: (Key -> a -> Either b c) -> Word64Map a -> (Word64Map b, Word64Map c)-mapEitherWithKey f0 t0 = toPair $ go f0 t0- where- go f (Bin p m l r) =- bin p m l1 r1 :*: bin p m l2 r2- where- (l1 :*: l2) = go f l- (r1 :*: r2) = go f r- go f (Tip k x) = case f k x of- Left y -> (Tip k y :*: Nil)- Right z -> (Nil :*: Tip k z)- go _ Nil = (Nil :*: Nil)---- | \(O(\min(n,W))\). The expression (@'split' k map@) is a pair @(map1,map2)@--- where all keys in @map1@ are lower than @k@ and all keys in--- @map2@ larger than @k@. Any key equal to @k@ is found in neither @map1@ nor @map2@.------ > split 2 (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3,"b"), (5,"a")])--- > split 3 (fromList [(5,"a"), (3,"b")]) == (empty, singleton 5 "a")--- > split 4 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", singleton 5 "a")--- > split 5 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", empty)--- > split 6 (fromList [(5,"a"), (3,"b")]) == (fromList [(3,"b"), (5,"a")], empty)--split :: Key -> Word64Map a -> (Word64Map a, Word64Map a)-split k t =- case t of- Bin p m l r- | m < 0 ->- if k >= 0 -- handle negative numbers.- then- case go k l of- (lt :*: gt) ->- let !lt' = bin p m lt r- in (lt', gt)- else- case go k r of- (lt :*: gt) ->- let !gt' = bin p m l gt- in (lt, gt')- _ -> case go k t of- (lt :*: gt) -> (lt, gt)- where- go k' t'@(Bin p m l r)- | nomatch k' p m = if k' > p then t' :*: Nil else Nil :*: t'- | zero k' m = case go k' l of (lt :*: gt) -> lt :*: bin p m gt r- | otherwise = case go k' r of (lt :*: gt) -> bin p m l lt :*: gt- go k' t'@(Tip ky _)- | k' > ky = (t' :*: Nil)- | k' < ky = (Nil :*: t')- | otherwise = (Nil :*: Nil)- go _ Nil = (Nil :*: Nil)---data SplitLookup a = SplitLookup !(Word64Map a) !(Maybe a) !(Word64Map a)--mapLT :: (Word64Map a -> Word64Map a) -> SplitLookup a -> SplitLookup a-mapLT f (SplitLookup lt fnd gt) = SplitLookup (f lt) fnd gt-{-# INLINE mapLT #-}--mapGT :: (Word64Map a -> Word64Map a) -> SplitLookup a -> SplitLookup a-mapGT f (SplitLookup lt fnd gt) = SplitLookup lt fnd (f gt)-{-# INLINE mapGT #-}---- | \(O(\min(n,W))\). Performs a 'split' but also returns whether the pivot--- key was found in the original map.------ > splitLookup 2 (fromList [(5,"a"), (3,"b")]) == (empty, Nothing, fromList [(3,"b"), (5,"a")])--- > splitLookup 3 (fromList [(5,"a"), (3,"b")]) == (empty, Just "b", singleton 5 "a")--- > splitLookup 4 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", Nothing, singleton 5 "a")--- > splitLookup 5 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", Just "a", empty)--- > splitLookup 6 (fromList [(5,"a"), (3,"b")]) == (fromList [(3,"b"), (5,"a")], Nothing, empty)--splitLookup :: Key -> Word64Map a -> (Word64Map a, Maybe a, Word64Map a)-splitLookup k t =- case- case t of- Bin p m l r- | m < 0 ->- if k >= 0 -- handle negative numbers.- then mapLT (flip (bin p m) r) (go k l)- else mapGT (bin p m l) (go k r)- _ -> go k t- of SplitLookup lt fnd gt -> (lt, fnd, gt)- where- go k' t'@(Bin p m l r)- | nomatch k' p m =- if k' > p- then SplitLookup t' Nothing Nil- else SplitLookup Nil Nothing t'- | zero k' m = mapGT (flip (bin p m) r) (go k' l)- | otherwise = mapLT (bin p m l) (go k' r)- go k' t'@(Tip ky y)- | k' > ky = SplitLookup t' Nothing Nil- | k' < ky = SplitLookup Nil Nothing t'- | otherwise = SplitLookup Nil (Just y) Nil- go _ Nil = SplitLookup Nil Nothing Nil--{--------------------------------------------------------------------- Fold---------------------------------------------------------------------}--- | \(O(n)\). Fold the values in the map using the given right-associative--- binary operator, such that @'foldr' f z == 'Prelude.foldr' f z . 'elems'@.------ For example,------ > elems map = foldr (:) [] map------ > let f a len = len + (length a)--- > foldr f 0 (fromList [(5,"a"), (3,"bbb")]) == 4-foldr :: (a -> b -> b) -> b -> Word64Map a -> b-foldr f z = \t -> -- Use lambda t to be inlinable with two arguments only.- case t of- Bin _ m l r- | m < 0 -> go (go z l) r -- put negative numbers before- | otherwise -> go (go z r) l- _ -> go z t- where- go z' Nil = z'- go z' (Tip _ x) = f x z'- go z' (Bin _ _ l r) = go (go z' r) l-{-# INLINE foldr #-}---- | \(O(n)\). A strict version of 'foldr'. Each application of the operator is--- evaluated before using the result in the next application. This--- function is strict in the starting value.-foldr' :: (a -> b -> b) -> b -> Word64Map a -> b-foldr' f z = \t -> -- Use lambda t to be inlinable with two arguments only.- case t of- Bin _ m l r- | m < 0 -> go (go z l) r -- put negative numbers before- | otherwise -> go (go z r) l- _ -> go z t- where- go !z' Nil = z'- go z' (Tip _ x) = f x z'- go z' (Bin _ _ l r) = go (go z' r) l-{-# INLINE foldr' #-}---- | \(O(n)\). Fold the values in the map using the given left-associative--- binary operator, such that @'foldl' f z == 'Prelude.foldl' f z . 'elems'@.------ For example,------ > elems = reverse . foldl (flip (:)) []------ > let f len a = len + (length a)--- > foldl f 0 (fromList [(5,"a"), (3,"bbb")]) == 4-foldl :: (a -> b -> a) -> a -> Word64Map b -> a-foldl f z = \t -> -- Use lambda t to be inlinable with two arguments only.- case t of- Bin _ m l r- | m < 0 -> go (go z r) l -- put negative numbers before- | otherwise -> go (go z l) r- _ -> go z t- where- go z' Nil = z'- go z' (Tip _ x) = f z' x- go z' (Bin _ _ l r) = go (go z' l) r-{-# INLINE foldl #-}---- | \(O(n)\). A strict version of 'foldl'. Each application of the operator is--- evaluated before using the result in the next application. This--- function is strict in the starting value.-foldl' :: (a -> b -> a) -> a -> Word64Map b -> a-foldl' f z = \t -> -- Use lambda t to be inlinable with two arguments only.- case t of- Bin _ m l r- | m < 0 -> go (go z r) l -- put negative numbers before- | otherwise -> go (go z l) r- _ -> go z t- where- go !z' Nil = z'- go z' (Tip _ x) = f z' x- go z' (Bin _ _ l r) = go (go z' l) r-{-# INLINE foldl' #-}---- | \(O(n)\). Fold the keys and values in the map using the given right-associative--- binary operator, such that--- @'foldrWithKey' f z == 'Prelude.foldr' ('uncurry' f) z . 'toAscList'@.------ For example,------ > keys map = foldrWithKey (\k x ks -> k:ks) [] map------ > let f k a result = result ++ "(" ++ (show k) ++ ":" ++ a ++ ")"--- > foldrWithKey f "Map: " (fromList [(5,"a"), (3,"b")]) == "Map: (5:a)(3:b)"-foldrWithKey :: (Key -> a -> b -> b) -> b -> Word64Map a -> b-foldrWithKey f z = \t -> -- Use lambda t to be inlinable with two arguments only.- case t of- Bin _ m l r- | m < 0 -> go (go z l) r -- put negative numbers before- | otherwise -> go (go z r) l- _ -> go z t- where- go z' Nil = z'- go z' (Tip kx x) = f kx x z'- go z' (Bin _ _ l r) = go (go z' r) l-{-# INLINE foldrWithKey #-}---- | \(O(n)\). A strict version of 'foldrWithKey'. Each application of the operator is--- evaluated before using the result in the next application. This--- function is strict in the starting value.-foldrWithKey' :: (Key -> a -> b -> b) -> b -> Word64Map a -> b-foldrWithKey' f z = \t -> -- Use lambda t to be inlinable with two arguments only.- case t of- Bin _ m l r- | m < 0 -> go (go z l) r -- put negative numbers before- | otherwise -> go (go z r) l- _ -> go z t- where- go !z' Nil = z'- go z' (Tip kx x) = f kx x z'- go z' (Bin _ _ l r) = go (go z' r) l-{-# INLINE foldrWithKey' #-}---- | \(O(n)\). Fold the keys and values in the map using the given left-associative--- binary operator, such that--- @'foldlWithKey' f z == 'Prelude.foldl' (\\z' (kx, x) -> f z' kx x) z . 'toAscList'@.------ For example,------ > keys = reverse . foldlWithKey (\ks k x -> k:ks) []------ > let f result k a = result ++ "(" ++ (show k) ++ ":" ++ a ++ ")"--- > foldlWithKey f "Map: " (fromList [(5,"a"), (3,"b")]) == "Map: (3:b)(5:a)"-foldlWithKey :: (a -> Key -> b -> a) -> a -> Word64Map b -> a-foldlWithKey f z = \t -> -- Use lambda t to be inlinable with two arguments only.- case t of- Bin _ m l r- | m < 0 -> go (go z r) l -- put negative numbers before- | otherwise -> go (go z l) r- _ -> go z t- where- go z' Nil = z'- go z' (Tip kx x) = f z' kx x- go z' (Bin _ _ l r) = go (go z' l) r-{-# INLINE foldlWithKey #-}---- | \(O(n)\). A strict version of 'foldlWithKey'. Each application of the operator is--- evaluated before using the result in the next application. This--- function is strict in the starting value.-foldlWithKey' :: (a -> Key -> b -> a) -> a -> Word64Map b -> a-foldlWithKey' f z = \t -> -- Use lambda t to be inlinable with two arguments only.- case t of- Bin _ m l r- | m < 0 -> go (go z r) l -- put negative numbers before- | otherwise -> go (go z l) r- _ -> go z t- where- go !z' Nil = z'- go z' (Tip kx x) = f z' kx x- go z' (Bin _ _ l r) = go (go z' l) r-{-# INLINE foldlWithKey' #-}---- | \(O(n)\). Fold the keys and values in the map using the given monoid, such that------ @'foldMapWithKey' f = 'Prelude.fold' . 'mapWithKey' f@------ This can be an asymptotically faster than 'foldrWithKey' or 'foldlWithKey' for some monoids.------ @since 0.5.4-foldMapWithKey :: Monoid m => (Key -> a -> m) -> Word64Map a -> m-foldMapWithKey f = go- where- go Nil = mempty- go (Tip kx x) = f kx x- go (Bin _ m l r)- | m < 0 = go r `mappend` go l- | otherwise = go l `mappend` go r-{-# INLINE foldMapWithKey #-}--{--------------------------------------------------------------------- List variations---------------------------------------------------------------------}--- | \(O(n)\).--- Return all elements of the map in the ascending order of their keys.--- Subject to list fusion.------ > elems (fromList [(5,"a"), (3,"b")]) == ["b","a"]--- > elems empty == []--elems :: Word64Map a -> [a]-elems = foldr (:) []---- | \(O(n)\). Return all keys of the map in ascending order. Subject to list--- fusion.------ > keys (fromList [(5,"a"), (3,"b")]) == [3,5]--- > keys empty == []--keys :: Word64Map a -> [Key]-keys = foldrWithKey (\k _ ks -> k : ks) []---- | \(O(n)\). An alias for 'toAscList'. Returns all key\/value pairs in the--- map in ascending key order. Subject to list fusion.------ > assocs (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")]--- > assocs empty == []--assocs :: Word64Map a -> [(Key,a)]-assocs = toAscList---- | \(O(n \min(n,W))\). The set of all keys of the map.------ > keysSet (fromList [(5,"a"), (3,"b")]) == Data.Word64Set.fromList [3,5]--- > keysSet empty == Data.Word64Set.empty--keysSet :: Word64Map a -> Word64Set.Word64Set-keysSet Nil = Word64Set.Nil-keysSet (Tip kx _) = Word64Set.singleton kx-keysSet (Bin p m l r)- | m .&. Word64Set.suffixBitMask == 0 = Word64Set.Bin p m (keysSet l) (keysSet r)- | otherwise = Word64Set.Tip (p .&. Word64Set.prefixBitMask) (computeBm (computeBm 0 l) r)- where computeBm !acc (Bin _ _ l' r') = computeBm (computeBm acc l') r'- computeBm acc (Tip kx _) = acc .|. Word64Set.bitmapOf kx- computeBm _ Nil = error "Data.Word64Set.keysSet: Nil"---- | \(O(n)\). Build a map from a set of keys and a function which for each key--- computes its value.------ > fromSet (\k -> replicate k 'a') (Data.Word64Set.fromList [3, 5]) == fromList [(5,"aaaaa"), (3,"aaa")]--- > fromSet undefined Data.Word64Set.empty == empty--fromSet :: (Key -> a) -> Word64Set.Word64Set -> Word64Map a-fromSet _ Word64Set.Nil = Nil-fromSet f (Word64Set.Bin p m l r) = Bin p m (fromSet f l) (fromSet f r)-fromSet f (Word64Set.Tip kx bm) = buildTree f kx bm (Word64Set.suffixBitMask + 1)- where- -- This is slightly complicated, as we to convert the dense- -- representation of Word64Set into tree representation of Word64Map.- --- -- We are given a nonzero bit mask 'bmask' of 'bits' bits with- -- prefix 'prefix'. We split bmask into halves corresponding- -- to left and right subtree. If they are both nonempty, we- -- create a Bin node, otherwise exactly one of them is nonempty- -- and we construct the Word64Map from that half.- buildTree g !prefix !bmask bits = case bits of- 0 -> Tip prefix (g prefix)- _ -> case intFromNat ((natFromInt bits) `shiftRL` 1) of- bits2- | bmask .&. ((1 `shiftLL` fromIntegral bits2) - 1) == 0 ->- buildTree g (prefix + bits2) (bmask `shiftRL` fromIntegral bits2) bits2- | (bmask `shiftRL` fromIntegral bits2) .&. ((1 `shiftLL` fromIntegral bits2) - 1) == 0 ->- buildTree g prefix bmask bits2- | otherwise ->- Bin prefix bits2- (buildTree g prefix bmask bits2)- (buildTree g (prefix + bits2) (bmask `shiftRL` fromIntegral bits2) bits2)--{--------------------------------------------------------------------- Lists---------------------------------------------------------------------}--#ifdef __GLASGOW_HASKELL__--- | @since 0.5.6.2-instance GHCExts.IsList (Word64Map a) where- type Item (Word64Map a) = (Key,a)- fromList = fromList- toList = toList-#endif---- | \(O(n)\). Convert the map to a list of key\/value pairs. Subject to list--- fusion.------ > toList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")]--- > toList empty == []--toList :: Word64Map a -> [(Key,a)]-toList = toAscList---- | \(O(n)\). Convert the map to a list of key\/value pairs where the--- keys are in ascending order. Subject to list fusion.------ > toAscList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")]--toAscList :: Word64Map a -> [(Key,a)]-toAscList = foldrWithKey (\k x xs -> (k,x):xs) []---- | \(O(n)\). Convert the map to a list of key\/value pairs where the keys--- are in descending order. Subject to list fusion.------ > toDescList (fromList [(5,"a"), (3,"b")]) == [(5,"a"), (3,"b")]--toDescList :: Word64Map a -> [(Key,a)]-toDescList = foldlWithKey (\xs k x -> (k,x):xs) []---- List fusion for the list generating functions.-#if __GLASGOW_HASKELL__--- The foldrFB and foldlFB are fold{r,l}WithKey equivalents, used for list fusion.--- They are important to convert unfused methods back, see mapFB in prelude.-foldrFB :: (Key -> a -> b -> b) -> b -> Word64Map a -> b-foldrFB = foldrWithKey-{-# INLINE[0] foldrFB #-}-foldlFB :: (a -> Key -> b -> a) -> a -> Word64Map b -> a-foldlFB = foldlWithKey-{-# INLINE[0] foldlFB #-}---- Inline assocs and toList, so that we need to fuse only toAscList.-{-# INLINE assocs #-}-{-# INLINE toList #-}---- The fusion is enabled up to phase 2 included. If it does not succeed,--- convert in phase 1 the expanded elems,keys,to{Asc,Desc}List calls back to--- elems,keys,to{Asc,Desc}List. In phase 0, we inline fold{lr}FB (which were--- used in a list fusion, otherwise it would go away in phase 1), and let compiler--- do whatever it wants with elems,keys,to{Asc,Desc}List -- it was forbidden to--- inline it before phase 0, otherwise the fusion rules would not fire at all.-{-# NOINLINE[0] elems #-}-{-# NOINLINE[0] keys #-}-{-# NOINLINE[0] toAscList #-}-{-# NOINLINE[0] toDescList #-}-{-# RULES "Word64Map.elems" [~1] forall m . elems m = build (\c n -> foldrFB (\_ x xs -> c x xs) n m) #-}-{-# RULES "Word64Map.elemsBack" [1] foldrFB (\_ x xs -> x : xs) [] = elems #-}-{-# RULES "Word64Map.keys" [~1] forall m . keys m = build (\c n -> foldrFB (\k _ xs -> c k xs) n m) #-}-{-# RULES "Word64Map.keysBack" [1] foldrFB (\k _ xs -> k : xs) [] = keys #-}-{-# RULES "Word64Map.toAscList" [~1] forall m . toAscList m = build (\c n -> foldrFB (\k x xs -> c (k,x) xs) n m) #-}-{-# RULES "Word64Map.toAscListBack" [1] foldrFB (\k x xs -> (k, x) : xs) [] = toAscList #-}-{-# RULES "Word64Map.toDescList" [~1] forall m . toDescList m = build (\c n -> foldlFB (\xs k x -> c (k,x) xs) n m) #-}-{-# RULES "Word64Map.toDescListBack" [1] foldlFB (\xs k x -> (k, x) : xs) [] = toDescList #-}-#endif----- | \(O(n \min(n,W))\). Create a map from a list of key\/value pairs.------ > fromList [] == empty--- > fromList [(5,"a"), (3,"b"), (5, "c")] == fromList [(5,"c"), (3,"b")]--- > fromList [(5,"c"), (3,"b"), (5, "a")] == fromList [(5,"a"), (3,"b")]--fromList :: [(Key,a)] -> Word64Map a-fromList xs- = Foldable.foldl' ins empty xs- where- ins t (k,x) = insert k x t---- | \(O(n \min(n,W))\). Create a map from a list of key\/value pairs with a combining function. See also 'fromAscListWith'.------ > fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")] == fromList [(3, "ab"), (5, "cba")]--- > fromListWith (++) [] == empty--fromListWith :: (a -> a -> a) -> [(Key,a)] -> Word64Map a-fromListWith f xs- = fromListWithKey (\_ x y -> f x y) xs---- | \(O(n \min(n,W))\). Build a map from a list of key\/value pairs with a combining function. See also fromAscListWithKey'.------ > let f key new_value old_value = show key ++ ":" ++ new_value ++ "|" ++ old_value--- > fromListWithKey f [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")] == fromList [(3, "3:a|b"), (5, "5:c|5:b|a")]--- > fromListWithKey f [] == empty--fromListWithKey :: (Key -> a -> a -> a) -> [(Key,a)] -> Word64Map a-fromListWithKey f xs- = Foldable.foldl' ins empty xs- where- ins t (k,x) = insertWithKey f k x t---- | \(O(n)\). Build a map from a list of key\/value pairs where--- the keys are in ascending order.------ > fromAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")]--- > fromAscList [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "b")]--fromAscList :: [(Key,a)] -> Word64Map a-fromAscList = fromMonoListWithKey Nondistinct (\_ x _ -> x)-{-# NOINLINE fromAscList #-}---- | \(O(n)\). Build a map from a list of key\/value pairs where--- the keys are in ascending order, with a combining function on equal keys.--- /The precondition (input list is ascending) is not checked./------ > fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "ba")]--fromAscListWith :: (a -> a -> a) -> [(Key,a)] -> Word64Map a-fromAscListWith f = fromMonoListWithKey Nondistinct (\_ x y -> f x y)-{-# NOINLINE fromAscListWith #-}---- | \(O(n)\). Build a map from a list of key\/value pairs where--- the keys are in ascending order, with a combining function on equal keys.--- /The precondition (input list is ascending) is not checked./------ > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value--- > fromAscListWithKey f [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "5:b|a")]--fromAscListWithKey :: (Key -> a -> a -> a) -> [(Key,a)] -> Word64Map a-fromAscListWithKey f = fromMonoListWithKey Nondistinct f-{-# NOINLINE fromAscListWithKey #-}---- | \(O(n)\). Build a map from a list of key\/value pairs where--- the keys are in ascending order and all distinct.--- /The precondition (input list is strictly ascending) is not checked./------ > fromDistinctAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")]--fromDistinctAscList :: [(Key,a)] -> Word64Map a-fromDistinctAscList = fromMonoListWithKey Distinct (\_ x _ -> x)-{-# NOINLINE fromDistinctAscList #-}---- | \(O(n)\). Build a map from a list of key\/value pairs with monotonic keys--- and a combining function.------ The precise conditions under which this function works are subtle:--- For any branch mask, keys with the same prefix w.r.t. the branch--- mask must occur consecutively in the list.--fromMonoListWithKey :: Distinct -> (Key -> a -> a -> a) -> [(Key,a)] -> Word64Map a-fromMonoListWithKey distinct f = go- where- go [] = Nil- go ((kx,vx) : zs1) = addAll' kx vx zs1-- -- `addAll'` collects all keys equal to `kx` into a single value,- -- and then proceeds with `addAll`.- addAll' !kx vx []- = Tip kx vx- addAll' !kx vx ((ky,vy) : zs)- | Nondistinct <- distinct, kx == ky- = let v = f kx vy vx in addAll' ky v zs- -- inlined: | otherwise = addAll kx (Tip kx vx) (ky : zs)- | m <- branchMask kx ky- , Inserted ty zs' <- addMany' m ky vy zs- = addAll kx (linkWithMask m ky ty {-kx-} (Tip kx vx)) zs'-- -- for `addAll` and `addMany`, kx is /a/ key inside the tree `tx`- -- `addAll` consumes the rest of the list, adding to the tree `tx`- addAll !_kx !tx []- = tx- addAll !kx !tx ((ky,vy) : zs)- | m <- branchMask kx ky- , Inserted ty zs' <- addMany' m ky vy zs- = addAll kx (linkWithMask m ky ty {-kx-} tx) zs'-- -- `addMany'` is similar to `addAll'`, but proceeds with `addMany'`.- addMany' !_m !kx vx []- = Inserted (Tip kx vx) []- addMany' !m !kx vx zs0@((ky,vy) : zs)- | Nondistinct <- distinct, kx == ky- = let v = f kx vy vx in addMany' m ky v zs- -- inlined: | otherwise = addMany m kx (Tip kx vx) (ky : zs)- | mask kx m /= mask ky m- = Inserted (Tip kx vx) zs0- | mxy <- branchMask kx ky- , Inserted ty zs' <- addMany' mxy ky vy zs- = addMany m kx (linkWithMask mxy ky ty {-kx-} (Tip kx vx)) zs'-- -- `addAll` adds to `tx` all keys whose prefix w.r.t. `m` agrees with `kx`.- addMany !_m !_kx tx []- = Inserted tx []- addMany !m !kx tx zs0@((ky,vy) : zs)- | mask kx m /= mask ky m- = Inserted tx zs0- | mxy <- branchMask kx ky- , Inserted ty zs' <- addMany' mxy ky vy zs- = addMany m kx (linkWithMask mxy ky ty {-kx-} tx) zs'-{-# INLINE fromMonoListWithKey #-}--data Inserted a = Inserted !(Word64Map a) ![(Key,a)]--data Distinct = Distinct | Nondistinct--{--------------------------------------------------------------------- Eq---------------------------------------------------------------------}-instance Eq a => Eq (Word64Map a) where- t1 == t2 = equal t1 t2- t1 /= t2 = nequal t1 t2--equal :: Eq a => Word64Map a -> Word64Map a -> Bool-equal (Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)- = (m1 == m2) && (p1 == p2) && (equal l1 l2) && (equal r1 r2)-equal (Tip kx x) (Tip ky y)- = (kx == ky) && (x==y)-equal Nil Nil = True-equal _ _ = False--nequal :: Eq a => Word64Map a -> Word64Map a -> Bool-nequal (Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)- = (m1 /= m2) || (p1 /= p2) || (nequal l1 l2) || (nequal r1 r2)-nequal (Tip kx x) (Tip ky y)- = (kx /= ky) || (x/=y)-nequal Nil Nil = False-nequal _ _ = True---- | @since 0.5.9-instance Eq1 Word64Map where- liftEq eq (Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)- = (m1 == m2) && (p1 == p2) && (liftEq eq l1 l2) && (liftEq eq r1 r2)- liftEq eq (Tip kx x) (Tip ky y)- = (kx == ky) && (eq x y)- liftEq _eq Nil Nil = True- liftEq _eq _ _ = False--{--------------------------------------------------------------------- Ord---------------------------------------------------------------------}--instance Ord a => Ord (Word64Map a) where- compare m1 m2 = compare (toList m1) (toList m2)---- | @since 0.5.9-instance Ord1 Word64Map where- liftCompare cmp m n =- liftCompare (liftCompare cmp) (toList m) (toList n)--{--------------------------------------------------------------------- Functor---------------------------------------------------------------------}--instance Functor Word64Map where- fmap = map--#ifdef __GLASGOW_HASKELL__- a <$ Bin p m l r = Bin p m (a <$ l) (a <$ r)- a <$ Tip k _ = Tip k a- _ <$ Nil = Nil-#endif--{--------------------------------------------------------------------- Show---------------------------------------------------------------------}--instance Show a => Show (Word64Map a) where- showsPrec d m = showParen (d > 10) $- showString "fromList " . shows (toList m)---- | @since 0.5.9-instance Show1 Word64Map where- liftShowsPrec sp sl d m =- showsUnaryWith (liftShowsPrec sp' sl') "fromList" d (toList m)- where- sp' = liftShowsPrec sp sl- sl' = liftShowList sp sl--{--------------------------------------------------------------------- Read---------------------------------------------------------------------}-instance (Read e) => Read (Word64Map e) where-#ifdef __GLASGOW_HASKELL__- readPrec = parens $ prec 10 $ do- Ident "fromList" <- lexP- xs <- readPrec- return (fromList xs)-- readListPrec = readListPrecDefault-#else- readsPrec p = readParen (p > 10) $ \ r -> do- ("fromList",s) <- lex r- (xs,t) <- reads s- return (fromList xs,t)-#endif---- | @since 0.5.9-instance Read1 Word64Map where- liftReadsPrec rp rl = readsData $- readsUnaryWith (liftReadsPrec rp' rl') "fromList" fromList- where- rp' = liftReadsPrec rp rl- rl' = liftReadList rp rl--{--------------------------------------------------------------------- Helpers---------------------------------------------------------------------}-{--------------------------------------------------------------------- Link---------------------------------------------------------------------}-link :: Prefix -> Word64Map a -> Prefix -> Word64Map a -> Word64Map a-link p1 t1 p2 t2 = linkWithMask (branchMask p1 p2) p1 t1 {-p2-} t2-{-# INLINE link #-}---- `linkWithMask` is useful when the `branchMask` has already been computed-linkWithMask :: Mask -> Prefix -> Word64Map a -> Word64Map a -> Word64Map a-linkWithMask m p1 t1 {-p2-} t2- | zero p1 m = Bin p m t1 t2- | otherwise = Bin p m t2 t1- where- p = mask p1 m-{-# INLINE linkWithMask #-}--{--------------------------------------------------------------------- @bin@ assures that we never have empty trees within a tree.---------------------------------------------------------------------}-bin :: Prefix -> Mask -> Word64Map a -> Word64Map a -> Word64Map a-bin _ _ l Nil = l-bin _ _ Nil r = r-bin p m l r = Bin p m l r-{-# INLINE bin #-}---- binCheckLeft only checks that the left subtree is non-empty-binCheckLeft :: Prefix -> Mask -> Word64Map a -> Word64Map a -> Word64Map a-binCheckLeft _ _ Nil r = r-binCheckLeft p m l r = Bin p m l r-{-# INLINE binCheckLeft #-}---- binCheckRight only checks that the right subtree is non-empty-binCheckRight :: Prefix -> Mask -> Word64Map a -> Word64Map a -> Word64Map a-binCheckRight _ _ l Nil = l-binCheckRight p m l r = Bin p m l r-{-# INLINE binCheckRight #-}--{--------------------------------------------------------------------- Endian independent bit twiddling---------------------------------------------------------------------}---- | Should this key follow the left subtree of a 'Bin' with switching--- bit @m@? N.B., the answer is only valid when @match i p m@ is true.-zero :: Key -> Mask -> Bool-zero i m- = (natFromInt i) .&. (natFromInt m) == 0-{-# INLINE zero #-}--nomatch,match :: Key -> Prefix -> Mask -> Bool---- | Does the key @i@ differ from the prefix @p@ before getting to--- the switching bit @m@?-nomatch i p m- = (mask i m) /= p-{-# INLINE nomatch #-}---- | Does the key @i@ match the prefix @p@ (up to but not including--- bit @m@)?-match i p m- = (mask i m) == p-{-# INLINE match #-}----- | The prefix of key @i@ up to (but not including) the switching--- bit @m@.-mask :: Key -> Mask -> Prefix-mask i m- = maskW (natFromInt i) (natFromInt m)-{-# INLINE mask #-}---{--------------------------------------------------------------------- Big endian operations---------------------------------------------------------------------}---- | The prefix of key @i@ up to (but not including) the switching--- bit @m@.-maskW :: Nat -> Nat -> Prefix-maskW i m- = intFromNat (i .&. ((-m) `xor` m))-{-# INLINE maskW #-}---- | Does the left switching bit specify a shorter prefix?-shorter :: Mask -> Mask -> Bool-shorter m1 m2- = (natFromInt m1) > (natFromInt m2)-{-# INLINE shorter #-}---- | The first switching bit where the two prefixes disagree.-branchMask :: Prefix -> Prefix -> Mask-branchMask p1 p2- = intFromNat (highestBitMask (natFromInt p1 `xor` natFromInt p2))-{-# INLINE branchMask #-}--{--------------------------------------------------------------------- Utilities---------------------------------------------------------------------}---- | \(O(1)\). Decompose a map into pieces based on the structure--- of the underlying tree. This function is useful for consuming a--- map in parallel.------ No guarantee is made as to the sizes of the pieces; an internal, but--- deterministic process determines this. However, it is guaranteed that the--- pieces returned will be in ascending order (all elements in the first submap--- less than all elements in the second, and so on).------ Examples:------ > splitRoot (fromList (zip [1..6::Int] ['a'..])) ==--- > [fromList [(1,'a'),(2,'b'),(3,'c')],fromList [(4,'d'),(5,'e'),(6,'f')]]------ > splitRoot empty == []------ Note that the current implementation does not return more than two submaps,--- but you should not depend on this behaviour because it can change in the--- future without notice.-splitRoot :: Word64Map a -> [Word64Map a]-splitRoot orig =- case orig of- Nil -> []- x@(Tip _ _) -> [x]- Bin _ m l r | m < 0 -> [r, l]- | otherwise -> [l, r]-{-# INLINE splitRoot #-}---{--------------------------------------------------------------------- Debugging---------------------------------------------------------------------}---- | \(O(n \min(n,W))\). Show the tree that implements the map. The tree is shown--- in a compressed, hanging format.-showTree :: Show a => Word64Map a -> String-showTree s- = showTreeWith True False s---{- | \(O(n \min(n,W))\). The expression (@'showTreeWith' hang wide map@) shows- the tree that implements the map. If @hang@ is- 'True', a /hanging/ tree is shown otherwise a rotated tree is shown. If- @wide@ is 'True', an extra wide version is shown.--}-showTreeWith :: Show a => Bool -> Bool -> Word64Map a -> String-showTreeWith hang wide t- | hang = (showsTreeHang wide [] t) ""- | otherwise = (showsTree wide [] [] t) ""--showsTree :: Show a => Bool -> [String] -> [String] -> Word64Map a -> ShowS-showsTree wide lbars rbars t = case t of- Bin p m l r ->- showsTree wide (withBar rbars) (withEmpty rbars) r .- showWide wide rbars .- showsBars lbars . showString (showBin p m) . showString "\n" .- showWide wide lbars .- showsTree wide (withEmpty lbars) (withBar lbars) l- Tip k x ->- showsBars lbars .- showString " " . shows k . showString ":=" . shows x . showString "\n"- Nil -> showsBars lbars . showString "|\n"--showsTreeHang :: Show a => Bool -> [String] -> Word64Map a -> ShowS-showsTreeHang wide bars t = case t of- Bin p m l r ->- showsBars bars . showString (showBin p m) . showString "\n" .- showWide wide bars .- showsTreeHang wide (withBar bars) l .- showWide wide bars .- showsTreeHang wide (withEmpty bars) r- Tip k x ->- showsBars bars .- showString " " . shows k . showString ":=" . shows x . showString "\n"- Nil -> showsBars bars . showString "|\n"--showBin :: Prefix -> Mask -> String-showBin _ _- = "*" -- ++ show (p,m)--showWide :: Bool -> [String] -> String -> String-showWide wide bars- | wide = showString (concat (reverse bars)) . showString "|\n"- | otherwise = id--showsBars :: [String] -> ShowS-showsBars bars- = case bars of- [] -> id- _ : tl -> showString (concat (reverse tl)) . showString node--node :: String-node = "+--"--withBar, withEmpty :: [String] -> [String]-withBar bars = "| ":bars-withEmpty bars = " ":bars
− GHC/Data/Word64Map/Lazy.hs
@@ -1,236 +0,0 @@-{-# LANGUAGE CPP #-}-#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)-{-# LANGUAGE Safe #-}-#endif----------------------------------------------------------------------------------- |--- Module : Data.Word64Map.Lazy--- Copyright : (c) Daan Leijen 2002--- (c) Andriy Palamarchuk 2008--- License : BSD-style--- Maintainer : libraries@haskell.org--- Portability : portable--------- = Finite Word64 Maps (lazy interface)------ The @'Word64Map' v@ type represents a finite map (sometimes called a dictionary)--- from keys of type @Word64@ to values of type @v@.------ The functions in "Data.Word64Map.Strict" are careful to force values before--- installing them in an 'Word64Map'. This is usually more efficient in cases where--- laziness is not essential. The functions in this module do not do so.------ For a walkthrough of the most commonly used functions see the--- <https://haskell-containers.readthedocs.io/en/latest/map.html maps introduction>.------ This module is intended to be imported qualified, to avoid name clashes with--- Prelude functions:------ > import Data.Word64Map.Lazy (Word64Map)--- > import qualified Data.Word64Map.Lazy as Word64Map------ Note that the implementation is generally /left-biased/. Functions that take--- two maps as arguments and combine them, such as `union` and `intersection`,--- prefer the values in the first argument to those in the second.--------- == Detailed performance information------ The amortized running time is given for each operation, with \(n\) referring to--- the number of entries in the map and \(W\) referring to the number of bits in--- an 'Word64' (64).------ Benchmarks comparing "Data.Word64Map.Lazy" with other dictionary--- implementations can be found at https://github.com/haskell-perf/dictionaries.--------- == Implementation------ The implementation is based on /big-endian patricia trees/. This data--- structure performs especially well on binary operations like 'union' and--- 'intersection'. Additionally, benchmarks show that it is also (much) faster--- on insertions and deletions when compared to a generic size-balanced map--- implementation (see "Data.Map").------ * Chris Okasaki and Andy Gill, \"/Fast Mergeable Integer Maps/\",--- Workshop on ML, September 1998, pages 77-86,--- <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.5452>------ * D.R. Morrison, \"/PATRICIA -- Practical Algorithm To Retrieve Information Coded In Alphanumeric/\",--- Journal of the ACM, 15(4), October 1968, pages 514-534.-----------------------------------------------------------------------------------module GHC.Data.Word64Map.Lazy (- -- * Map type-#if !defined(TESTING)- Word64Map, Key -- instance Eq,Show-#else- Word64Map(..), Key -- instance Eq,Show-#endif-- -- * Construction- , empty- , singleton- , fromSet-- -- ** From Unordered Lists- , fromList- , fromListWith- , fromListWithKey-- -- ** From Ascending Lists- , fromAscList- , fromAscListWith- , fromAscListWithKey- , fromDistinctAscList-- -- * Insertion- , insert- , insertWith- , insertWithKey- , insertLookupWithKey-- -- * Deletion\/Update- , delete- , adjust- , adjustWithKey- , update- , updateWithKey- , updateLookupWithKey- , alter- , alterF-- -- * Query- -- ** Lookup- , WM.lookup- , (!?)- , (!)- , findWithDefault- , member- , notMember- , lookupLT- , lookupGT- , lookupLE- , lookupGE-- -- ** Size- , WM.null- , size-- -- * Combine-- -- ** Union- , union- , unionWith- , unionWithKey- , unions- , unionsWith-- -- ** Difference- , difference- , (\\)- , differenceWith- , differenceWithKey-- -- ** Intersection- , intersection- , intersectionWith- , intersectionWithKey-- -- ** Disjoint- , disjoint-- -- ** Compose- , compose-- -- ** Universal combining function- , mergeWithKey-- -- * Traversal- -- ** Map- , WM.map- , mapWithKey- , traverseWithKey- , traverseMaybeWithKey- , mapAccum- , mapAccumWithKey- , mapAccumRWithKey- , mapKeys- , mapKeysWith- , mapKeysMonotonic-- -- * Folds- , WM.foldr- , WM.foldl- , foldrWithKey- , foldlWithKey- , foldMapWithKey-- -- ** Strict folds- , foldr'- , foldl'- , foldrWithKey'- , foldlWithKey'-- -- * Conversion- , elems- , keys- , assocs- , keysSet-- -- ** Lists- , toList-- -- ** Ordered lists- , toAscList- , toDescList-- -- * Filter- , WM.filter- , filterWithKey- , restrictKeys- , withoutKeys- , partition- , partitionWithKey-- , takeWhileAntitone- , dropWhileAntitone- , spanAntitone-- , mapMaybe- , mapMaybeWithKey- , mapEither- , mapEitherWithKey-- , split- , splitLookup- , splitRoot-- -- * Submap- , isSubmapOf, isSubmapOfBy- , isProperSubmapOf, isProperSubmapOfBy-- -- * Min\/Max- , lookupMin- , lookupMax- , findMin- , findMax- , deleteMin- , deleteMax- , deleteFindMin- , deleteFindMax- , updateMin- , updateMax- , updateMinWithKey- , updateMaxWithKey- , minView- , maxView- , minViewWithKey- , maxViewWithKey- ) where--import GHC.Data.Word64Map.Internal as WM
− GHC/Data/Word64Map/Strict.hs
@@ -1,254 +0,0 @@-{-# LANGUAGE CPP #-}-#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)-{-# LANGUAGE Trustworthy #-}-#endif---------------------------------------------------------------------------------- |--- Module : Data.Word64Map.Strict--- Copyright : (c) Daan Leijen 2002--- (c) Andriy Palamarchuk 2008--- License : BSD-style--- Maintainer : libraries@haskell.org--- Portability : portable--------- = Finite Word64 Maps (strict interface)------ The @'Word64Map' v@ type represents a finite map (sometimes called a dictionary)--- from key of type @Word64@ to values of type @v@.------ Each function in this module is careful to force values before installing--- them in an 'Word64Map'. This is usually more efficient when laziness is not--- necessary. When laziness /is/ required, use the functions in--- "Data.Word64Map.Lazy".------ In particular, the functions in this module obey the following law:------ - If all values stored in all maps in the arguments are in WHNF, then all--- values stored in all maps in the results will be in WHNF once those maps--- are evaluated.------ For a walkthrough of the most commonly used functions see the--- <https://haskell-containers.readthedocs.io/en/latest/map.html maps introduction>.------ This module is intended to be imported qualified, to avoid name clashes with--- Prelude functions:------ > import Data.Word64Map.Strict (Word64Map)--- > import qualified Data.Word64Map.Strict as Word64Map------ Note that the implementation is generally /left-biased/. Functions that take--- two maps as arguments and combine them, such as `union` and `intersection`,--- prefer the values in the first argument to those in the second.--------- == Detailed performance information------ The amortized running time is given for each operation, with \(n\) referring to--- the number of entries in the map and \(W\) referring to the number of bits in--- an 'Word64' (64).------ Benchmarks comparing "Data.Word64Map.Strict" with other dictionary--- implementations can be found at https://github.com/haskell-perf/dictionaries.--------- == Warning------ The 'Word64Map' type is shared between the lazy and strict modules, meaning that--- the same 'Word64Map' value can be passed to functions in both modules. This--- means that the 'Functor', 'Traversable' and 'Data.Data.Data' instances are--- the same as for the "Data.Word64Map.Lazy" module, so if they are used the--- resulting map may contain suspended values (thunks).--------- == Implementation------ The implementation is based on /big-endian patricia trees/. This data--- structure performs especially well on binary operations like 'union' and--- 'intersection'. Additionally, benchmarks show that it is also (much) faster--- on insertions and deletions when compared to a generic size-balanced map--- implementation (see "Data.Map").------ * Chris Okasaki and Andy Gill, \"/Fast Mergeable Integer Maps/\",--- Workshop on ML, September 1998, pages 77-86,--- <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.5452>------ * D.R. Morrison, \"/PATRICIA -- Practical Algorithm To Retrieve Information Coded In Alphanumeric/\",--- Journal of the ACM, 15(4), October 1968, pages 514-534.------------------------------------------------------------------------------------- See the notes at the beginning of Data.Word64Map.Internal.--module GHC.Data.Word64Map.Strict (- -- * Map type-#if !defined(TESTING)- Word64Map, Key -- instance Eq,Show-#else- Word64Map(..), Key -- instance Eq,Show-#endif-- -- * Construction- , empty- , singleton- , fromSet-- -- ** From Unordered Lists- , fromList- , fromListWith- , fromListWithKey-- -- ** From Ascending Lists- , fromAscList- , fromAscListWith- , fromAscListWithKey- , fromDistinctAscList-- -- * Insertion- , insert- , insertWith- , insertWithKey- , insertLookupWithKey-- -- * Deletion\/Update- , delete- , adjust- , adjustWithKey- , update- , updateWithKey- , updateLookupWithKey- , alter- , alterF-- -- * Query- -- ** Lookup- , lookup- , (!?)- , (!)- , findWithDefault- , member- , notMember- , lookupLT- , lookupGT- , lookupLE- , lookupGE-- -- ** Size- , null- , size-- -- * Combine-- -- ** Union- , union- , unionWith- , unionWithKey- , unions- , unionsWith-- -- ** Difference- , difference- , (\\)- , differenceWith- , differenceWithKey-- -- ** Intersection- , intersection- , intersectionWith- , intersectionWithKey-- -- ** Disjoint- , disjoint-- -- ** Compose- , compose-- -- ** Universal combining function- , mergeWithKey-- -- * Traversal- -- ** Map- , map- , mapWithKey- , traverseWithKey- , traverseMaybeWithKey- , mapAccum- , mapAccumWithKey- , mapAccumRWithKey- , mapKeys- , mapKeysWith- , mapKeysMonotonic-- -- * Folds- , foldr- , foldl- , foldrWithKey- , foldlWithKey- , foldMapWithKey-- -- ** Strict folds- , foldr'- , foldl'- , foldrWithKey'- , foldlWithKey'-- -- * Conversion- , elems- , keys- , assocs- , keysSet-- -- ** Lists- , toList---- ** Ordered lists- , toAscList- , toDescList-- -- * Filter- , filter- , filterWithKey- , restrictKeys- , withoutKeys- , partition- , partitionWithKey-- , takeWhileAntitone- , dropWhileAntitone- , spanAntitone-- , mapMaybe- , mapMaybeWithKey- , mapEither- , mapEitherWithKey-- , split- , splitLookup- , splitRoot-- -- * Submap- , isSubmapOf, isSubmapOfBy- , isProperSubmapOf, isProperSubmapOfBy-- -- * Min\/Max- , lookupMin- , lookupMax- , findMin- , findMax- , deleteMin- , deleteMax- , deleteFindMin- , deleteFindMax- , updateMin- , updateMax- , updateMinWithKey- , updateMaxWithKey- , minView- , maxView- , minViewWithKey- , maxViewWithKey- ) where--import GHC.Data.Word64Map.Strict.Internal-import Prelude ()
− GHC/Data/Word64Map/Strict/Internal.hs
@@ -1,1206 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE BangPatterns #-}-{-# LANGUAGE PatternGuards #-}--{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}---------------------------------------------------------------------------------- |--- Module : Data.Word64Map.Strict.Internal--- Copyright : (c) Daan Leijen 2002--- (c) Andriy Palamarchuk 2008--- License : BSD-style--- Maintainer : libraries@haskell.org--- Portability : portable--------- = Finite Int Maps (strict interface)------ The @'Word64Map' v@ type represents a finite map (sometimes called a dictionary)--- from key of type @Int@ to values of type @v@.------ Each function in this module is careful to force values before installing--- them in an 'Word64Map'. This is usually more efficient when laziness is not--- necessary. When laziness /is/ required, use the functions in--- "Data.Word64Map.Lazy".------ In particular, the functions in this module obey the following law:------ - If all values stored in all maps in the arguments are in WHNF, then all--- values stored in all maps in the results will be in WHNF once those maps--- are evaluated.------ For a walkthrough of the most commonly used functions see the--- <https://haskell-containers.readthedocs.io/en/latest/map.html maps introduction>.------ This module is intended to be imported qualified, to avoid name clashes with--- Prelude functions:------ > import Data.Word64Map.Strict (Word64Map)--- > import qualified Data.Word64Map.Strict as Word64Map------ Note that the implementation is generally /left-biased/. Functions that take--- two maps as arguments and combine them, such as `union` and `intersection`,--- prefer the values in the first argument to those in the second.--------- == Detailed performance information------ The amortized running time is given for each operation, with \(n\) referring to--- the number of entries in the map and \(W\) referring to the number of bits in--- an 'Int' (32 or 64).------ Benchmarks comparing "Data.Word64Map.Strict" with other dictionary--- implementations can be found at https://github.com/haskell-perf/dictionaries.--------- == Warning------ The 'Word64Map' type is shared between the lazy and strict modules, meaning that--- the same 'Word64Map' value can be passed to functions in both modules. This--- means that the 'Functor', 'Traversable' and 'Data.Data.Data' instances are--- the same as for the "Data.Word64Map.Lazy" module, so if they are used the--- resulting map may contain suspended values (thunks).--------- == Implementation------ The implementation is based on /big-endian patricia trees/. This data--- structure performs especially well on binary operations like 'union' and--- 'intersection'. Additionally, benchmarks show that it is also (much) faster--- on insertions and deletions when compared to a generic size-balanced map--- implementation (see "Data.Map").------ * Chris Okasaki and Andy Gill, \"/Fast Mergeable Integer Maps/\",--- Workshop on ML, September 1998, pages 77-86,--- <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.5452>------ * D.R. Morrison, \"/PATRICIA -- Practical Algorithm To Retrieve Information Coded In Alphanumeric/\",--- Journal of the ACM, 15(4), October 1968, pages 514-534.------------------------------------------------------------------------------------- See the notes at the beginning of Data.Word64Map.Internal.--module GHC.Data.Word64Map.Strict.Internal (- -- * Map type-#if !defined(TESTING)- Word64Map, Key -- instance Eq,Show-#else- Word64Map(..), Key -- instance Eq,Show-#endif-- -- * Construction- , empty- , singleton- , fromSet-- -- ** From Unordered Lists- , fromList- , fromListWith- , fromListWithKey-- -- ** From Ascending Lists- , fromAscList- , fromAscListWith- , fromAscListWithKey- , fromDistinctAscList-- -- * Insertion- , insert- , insertWith- , insertWithKey- , insertLookupWithKey-- -- * Deletion\/Update- , delete- , adjust- , adjustWithKey- , update- , updateWithKey- , updateLookupWithKey- , alter- , alterF-- -- * Query- -- ** Lookup- , lookup- , (!?)- , (!)- , findWithDefault- , member- , notMember- , lookupLT- , lookupGT- , lookupLE- , lookupGE-- -- ** Size- , null- , size-- -- * Combine-- -- ** Union- , union- , unionWith- , unionWithKey- , unions- , unionsWith-- -- ** Difference- , difference- , (\\)- , differenceWith- , differenceWithKey-- -- ** Intersection- , intersection- , intersectionWith- , intersectionWithKey-- -- ** Disjoint- , disjoint-- -- ** Compose- , compose-- -- ** Universal combining function- , mergeWithKey-- -- * Traversal- -- ** Map- , map- , mapWithKey- , traverseWithKey- , traverseMaybeWithKey- , mapAccum- , mapAccumWithKey- , mapAccumRWithKey- , mapKeys- , mapKeysWith- , mapKeysMonotonic-- -- * Folds- , foldr- , foldl- , foldrWithKey- , foldlWithKey- , foldMapWithKey-- -- ** Strict folds- , foldr'- , foldl'- , foldrWithKey'- , foldlWithKey'-- -- * Conversion- , elems- , keys- , assocs- , keysSet-- -- ** Lists- , toList---- ** Ordered lists- , toAscList- , toDescList-- -- * Filter- , filter- , filterWithKey- , restrictKeys- , withoutKeys- , partition- , partitionWithKey-- , takeWhileAntitone- , dropWhileAntitone- , spanAntitone-- , mapMaybe- , mapMaybeWithKey- , mapEither- , mapEitherWithKey-- , split- , splitLookup- , splitRoot-- -- * Submap- , isSubmapOf, isSubmapOfBy- , isProperSubmapOf, isProperSubmapOfBy-- -- * Min\/Max- , lookupMin- , lookupMax- , findMin- , findMax- , deleteMin- , deleteMax- , deleteFindMin- , deleteFindMax- , updateMin- , updateMax- , updateMinWithKey- , updateMaxWithKey- , minView- , maxView- , minViewWithKey- , maxViewWithKey- ) where--import GHC.Prelude.Basic hiding- (lookup, filter, foldr, foldl, foldl', null, map)--import qualified GHC.Data.Word64Map.Internal as L-import GHC.Data.Word64Map.Internal- ( Word64Map (..)- , Key- , mask- , branchMask- , nomatch- , zero- , natFromInt- , intFromNat- , bin- , binCheckLeft- , binCheckRight- , link- , linkWithMask-- , (\\)- , (!)- , (!?)- , empty- , assocs- , filter- , filterWithKey- , findMin- , findMax- , foldMapWithKey- , foldr- , foldl- , foldr'- , foldl'- , foldlWithKey- , foldrWithKey- , foldlWithKey'- , foldrWithKey'- , keysSet- , mergeWithKey'- , compose- , delete- , deleteMin- , deleteMax- , deleteFindMax- , deleteFindMin- , difference- , elems- , intersection- , disjoint- , isProperSubmapOf- , isProperSubmapOfBy- , isSubmapOf- , isSubmapOfBy- , lookup- , lookupLE- , lookupGE- , lookupLT- , lookupGT- , lookupMin- , lookupMax- , minView- , maxView- , minViewWithKey- , maxViewWithKey- , keys- , mapKeys- , mapKeysMonotonic- , member- , notMember- , null- , partition- , partitionWithKey- , takeWhileAntitone- , dropWhileAntitone- , spanAntitone- , restrictKeys- , size- , split- , splitLookup- , splitRoot- , toAscList- , toDescList- , toList- , union- , unions- , withoutKeys- )-import qualified GHC.Data.Word64Set.Internal as Word64Set-import GHC.Utils.Containers.Internal.BitUtil-import GHC.Utils.Containers.Internal.StrictPair-import qualified Data.Foldable as Foldable--{--------------------------------------------------------------------- Query---------------------------------------------------------------------}---- | \(O(\min(n,W))\). The expression @('findWithDefault' def k map)@--- returns the value at key @k@ or returns @def@ when the key is not an--- element of the map.------ > findWithDefault 'x' 1 (fromList [(5,'a'), (3,'b')]) == 'x'--- > findWithDefault 'x' 5 (fromList [(5,'a'), (3,'b')]) == 'a'---- See Word64Map.Internal.Note: Local 'go' functions and capturing]-findWithDefault :: a -> Key -> Word64Map a -> a-findWithDefault def !k = go- where- go (Bin p m l r) | nomatch k p m = def- | zero k m = go l- | otherwise = go r- go (Tip kx x) | k == kx = x- | otherwise = def- go Nil = def--{--------------------------------------------------------------------- Construction---------------------------------------------------------------------}--- | \(O(1)\). A map of one element.------ > singleton 1 'a' == fromList [(1, 'a')]--- > size (singleton 1 'a') == 1--singleton :: Key -> a -> Word64Map a-singleton k !x- = Tip k x-{-# INLINE singleton #-}--{--------------------------------------------------------------------- Insert---------------------------------------------------------------------}--- | \(O(\min(n,W))\). Insert a new key\/value pair in the map.--- If the key is already present in the map, the associated value is--- replaced with the supplied value, i.e. 'insert' is equivalent to--- @'insertWith' 'const'@.------ > insert 5 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'x')]--- > insert 7 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'a'), (7, 'x')]--- > insert 5 'x' empty == singleton 5 'x'--insert :: Key -> a -> Word64Map a -> Word64Map a-insert !k !x t =- case t of- Bin p m l r- | nomatch k p m -> link k (Tip k x) p t- | zero k m -> Bin p m (insert k x l) r- | otherwise -> Bin p m l (insert k x r)- Tip ky _- | k==ky -> Tip k x- | otherwise -> link k (Tip k x) ky t- Nil -> Tip k x---- right-biased insertion, used by 'union'--- | \(O(\min(n,W))\). Insert with a combining function.--- @'insertWith' f key value mp@--- will insert the pair (key, value) into @mp@ if key does--- not exist in the map. If the key does exist, the function will--- insert @f new_value old_value@.------ > insertWith (++) 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "xxxa")]--- > insertWith (++) 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")]--- > insertWith (++) 5 "xxx" empty == singleton 5 "xxx"--insertWith :: (a -> a -> a) -> Key -> a -> Word64Map a -> Word64Map a-insertWith f k x t- = insertWithKey (\_ x' y' -> f x' y') k x t---- | \(O(\min(n,W))\). Insert with a combining function.--- @'insertWithKey' f key value mp@--- will insert the pair (key, value) into @mp@ if key does--- not exist in the map. If the key does exist, the function will--- insert @f key new_value old_value@.------ > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value--- > insertWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:xxx|a")]--- > insertWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")]--- > insertWithKey f 5 "xxx" empty == singleton 5 "xxx"------ If the key exists in the map, this function is lazy in @value@ but strict--- in the result of @f@.--insertWithKey :: (Key -> a -> a -> a) -> Key -> a -> Word64Map a -> Word64Map a-insertWithKey f !k x t =- case t of- Bin p m l r- | nomatch k p m -> link k (singleton k x) p t- | zero k m -> Bin p m (insertWithKey f k x l) r- | otherwise -> Bin p m l (insertWithKey f k x r)- Tip ky y- | k==ky -> Tip k $! f k x y- | otherwise -> link k (singleton k x) ky t- Nil -> singleton k x---- | \(O(\min(n,W))\). The expression (@'insertLookupWithKey' f k x map@)--- is a pair where the first element is equal to (@'lookup' k map@)--- and the second element equal to (@'insertWithKey' f k x map@).------ > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value--- > insertLookupWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "5:xxx|a")])--- > insertLookupWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a"), (7, "xxx")])--- > insertLookupWithKey f 5 "xxx" empty == (Nothing, singleton 5 "xxx")------ This is how to define @insertLookup@ using @insertLookupWithKey@:------ > let insertLookup kx x t = insertLookupWithKey (\_ a _ -> a) kx x t--- > insertLookup 5 "x" (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "x")])--- > insertLookup 7 "x" (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a"), (7, "x")])--insertLookupWithKey :: (Key -> a -> a -> a) -> Key -> a -> Word64Map a -> (Maybe a, Word64Map a)-insertLookupWithKey f0 !k0 x0 t0 = toPair $ go f0 k0 x0 t0- where- go f k x t =- case t of- Bin p m l r- | nomatch k p m -> Nothing :*: link k (singleton k x) p t- | zero k m -> let (found :*: l') = go f k x l in (found :*: Bin p m l' r)- | otherwise -> let (found :*: r') = go f k x r in (found :*: Bin p m l r')- Tip ky y- | k==ky -> (Just y :*: (Tip k $! f k x y))- | otherwise -> (Nothing :*: link k (singleton k x) ky t)- Nil -> Nothing :*: (singleton k x)---{--------------------------------------------------------------------- Deletion---------------------------------------------------------------------}--- | \(O(\min(n,W))\). Adjust a value at a specific key. When the key is not--- a member of the map, the original map is returned.------ > adjust ("new " ++) 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")]--- > adjust ("new " ++) 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]--- > adjust ("new " ++) 7 empty == empty--adjust :: (a -> a) -> Key -> Word64Map a -> Word64Map a-adjust f k m- = adjustWithKey (\_ x -> f x) k m---- | \(O(\min(n,W))\). Adjust a value at a specific key. When the key is not--- a member of the map, the original map is returned.------ > let f key x = (show key) ++ ":new " ++ x--- > adjustWithKey f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:new a")]--- > adjustWithKey f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]--- > adjustWithKey f 7 empty == empty--adjustWithKey :: (Key -> a -> a) -> Key -> Word64Map a -> Word64Map a-adjustWithKey f !k t =- case t of- Bin p m l r- | nomatch k p m -> t- | zero k m -> Bin p m (adjustWithKey f k l) r- | otherwise -> Bin p m l (adjustWithKey f k r)- Tip ky y- | k==ky -> Tip ky $! f k y- | otherwise -> t- Nil -> Nil---- | \(O(\min(n,W))\). The expression (@'update' f k map@) updates the value @x@--- at @k@ (if it is in the map). If (@f x@) is 'Nothing', the element is--- deleted. If it is (@'Just' y@), the key @k@ is bound to the new value @y@.------ > let f x = if x == "a" then Just "new a" else Nothing--- > update f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")]--- > update f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]--- > update f 3 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"--update :: (a -> Maybe a) -> Key -> Word64Map a -> Word64Map a-update f- = updateWithKey (\_ x -> f x)---- | \(O(\min(n,W))\). The expression (@'update' f k map@) updates the value @x@--- at @k@ (if it is in the map). If (@f k x@) is 'Nothing', the element is--- deleted. If it is (@'Just' y@), the key @k@ is bound to the new value @y@.------ > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing--- > updateWithKey f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:new a")]--- > updateWithKey f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]--- > updateWithKey f 3 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"--updateWithKey :: (Key -> a -> Maybe a) -> Key -> Word64Map a -> Word64Map a-updateWithKey f !k t =- case t of- Bin p m l r- | nomatch k p m -> t- | zero k m -> binCheckLeft p m (updateWithKey f k l) r- | otherwise -> binCheckRight p m l (updateWithKey f k r)- Tip ky y- | k==ky -> case f k y of- Just !y' -> Tip ky y'- Nothing -> Nil- | otherwise -> t- Nil -> Nil---- | \(O(\min(n,W))\). Lookup and update.--- The function returns original value, if it is updated.--- This is different behavior than 'Data.Map.updateLookupWithKey'.--- Returns the original key value if the map entry is deleted.------ > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing--- > updateLookupWithKey f 5 (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "5:new a")])--- > updateLookupWithKey f 7 (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a")])--- > updateLookupWithKey f 3 (fromList [(5,"a"), (3,"b")]) == (Just "b", singleton 5 "a")--updateLookupWithKey :: (Key -> a -> Maybe a) -> Key -> Word64Map a -> (Maybe a,Word64Map a)-updateLookupWithKey f0 !k0 t0 = toPair $ go f0 k0 t0- where- go f k t =- case t of- Bin p m l r- | nomatch k p m -> (Nothing :*: t)- | zero k m -> let (found :*: l') = go f k l in (found :*: binCheckLeft p m l' r)- | otherwise -> let (found :*: r') = go f k r in (found :*: binCheckRight p m l r')- Tip ky y- | k==ky -> case f k y of- Just !y' -> (Just y :*: Tip ky y')- Nothing -> (Just y :*: Nil)- | otherwise -> (Nothing :*: t)- Nil -> (Nothing :*: Nil)------ | \(O(\min(n,W))\). The expression (@'alter' f k map@) alters the value @x@ at @k@, or absence thereof.--- 'alter' can be used to insert, delete, or update a value in an 'Word64Map'.--- In short : @'lookup' k ('alter' f k m) = f ('lookup' k m)@.-alter :: (Maybe a -> Maybe a) -> Key -> Word64Map a -> Word64Map a-alter f !k t =- case t of- Bin p m l r- | nomatch k p m -> case f Nothing of- Nothing -> t- Just !x -> link k (Tip k x) p t- | zero k m -> binCheckLeft p m (alter f k l) r- | otherwise -> binCheckRight p m l (alter f k r)- Tip ky y- | k==ky -> case f (Just y) of- Just !x -> Tip ky x- Nothing -> Nil- | otherwise -> case f Nothing of- Just !x -> link k (Tip k x) ky t- Nothing -> t- Nil -> case f Nothing of- Just !x -> Tip k x- Nothing -> Nil---- | \(O(\log n)\). The expression (@'alterF' f k map@) alters the value @x@ at--- @k@, or absence thereof. 'alterF' can be used to inspect, insert, delete,--- or update a value in an 'Word64Map'. In short : @'lookup' k <$> 'alterF' f k m = f--- ('lookup' k m)@.------ Example:------ @--- interactiveAlter :: Int -> Word64Map String -> IO (Word64Map String)--- interactiveAlter k m = alterF f k m where--- f Nothing = do--- putStrLn $ show k ++--- " was not found in the map. Would you like to add it?"--- getUserResponse1 :: IO (Maybe String)--- f (Just old) = do--- putStrLn $ "The key is currently bound to " ++ show old ++--- ". Would you like to change or delete it?"--- getUserResponse2 :: IO (Maybe String)--- @------ 'alterF' is the most general operation for working with an individual--- key that may or may not be in a given map.---- Note: 'alterF' is a flipped version of the 'at' combinator from--- 'Control.Lens.At'.------ @since 0.5.8--alterF :: Functor f- => (Maybe a -> f (Maybe a)) -> Key -> Word64Map a -> f (Word64Map a)--- This implementation was modified from 'Control.Lens.At'.-alterF f k m = (<$> f mv) $ \fres ->- case fres of- Nothing -> maybe m (const (delete k m)) mv- Just !v' -> insert k v' m- where mv = lookup k m---{--------------------------------------------------------------------- Union---------------------------------------------------------------------}--- | The union of a list of maps, with a combining operation.------ > unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])]--- > == fromList [(3, "bB3"), (5, "aAA3"), (7, "C")]--unionsWith :: Foldable f => (a->a->a) -> f (Word64Map a) -> Word64Map a-unionsWith f ts- = Foldable.foldl' (unionWith f) empty ts---- | \(O(n+m)\). The union with a combining function.------ > unionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "aA"), (7, "C")]--unionWith :: (a -> a -> a) -> Word64Map a -> Word64Map a -> Word64Map a-unionWith f m1 m2- = unionWithKey (\_ x y -> f x y) m1 m2---- | \(O(n+m)\). The union with a combining function.------ > let f key left_value right_value = (show key) ++ ":" ++ left_value ++ "|" ++ right_value--- > unionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "5:a|A"), (7, "C")]--unionWithKey :: (Key -> a -> a -> a) -> Word64Map a -> Word64Map a -> Word64Map a-unionWithKey f m1 m2- = mergeWithKey' Bin (\(Tip k1 x1) (Tip _k2 x2) -> Tip k1 $! f k1 x1 x2) id id m1 m2--{--------------------------------------------------------------------- Difference---------------------------------------------------------------------}---- | \(O(n+m)\). Difference with a combining function.------ > let f al ar = if al == "b" then Just (al ++ ":" ++ ar) else Nothing--- > differenceWith f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (7, "C")])--- > == singleton 3 "b:B"--differenceWith :: (a -> b -> Maybe a) -> Word64Map a -> Word64Map b -> Word64Map a-differenceWith f m1 m2- = differenceWithKey (\_ x y -> f x y) m1 m2---- | \(O(n+m)\). Difference with a combining function. When two equal keys are--- encountered, the combining function is applied to the key and both values.--- If it returns 'Nothing', the element is discarded (proper set difference).--- If it returns (@'Just' y@), the element is updated with a new value @y@.------ > let f k al ar = if al == "b" then Just ((show k) ++ ":" ++ al ++ "|" ++ ar) else Nothing--- > differenceWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (10, "C")])--- > == singleton 3 "3:b|B"--differenceWithKey :: (Key -> a -> b -> Maybe a) -> Word64Map a -> Word64Map b -> Word64Map a-differenceWithKey f m1 m2- = mergeWithKey f id (const Nil) m1 m2--{--------------------------------------------------------------------- Intersection---------------------------------------------------------------------}---- | \(O(n+m)\). The intersection with a combining function.------ > intersectionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "aA"--intersectionWith :: (a -> b -> c) -> Word64Map a -> Word64Map b -> Word64Map c-intersectionWith f m1 m2- = intersectionWithKey (\_ x y -> f x y) m1 m2---- | \(O(n+m)\). The intersection with a combining function.------ > let f k al ar = (show k) ++ ":" ++ al ++ "|" ++ ar--- > intersectionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "5:a|A"--intersectionWithKey :: (Key -> a -> b -> c) -> Word64Map a -> Word64Map b -> Word64Map c-intersectionWithKey f m1 m2- = mergeWithKey' bin (\(Tip k1 x1) (Tip _k2 x2) -> Tip k1 $! f k1 x1 x2) (const Nil) (const Nil) m1 m2--{--------------------------------------------------------------------- MergeWithKey---------------------------------------------------------------------}---- | \(O(n+m)\). A high-performance universal combining function. Using--- 'mergeWithKey', all combining functions can be defined without any loss of--- efficiency (with exception of 'union', 'difference' and 'intersection',--- where sharing of some nodes is lost with 'mergeWithKey').------ Please make sure you know what is going on when using 'mergeWithKey',--- otherwise you can be surprised by unexpected code growth or even--- corruption of the data structure.------ When 'mergeWithKey' is given three arguments, it is inlined to the call--- site. You should therefore use 'mergeWithKey' only to define your custom--- combining functions. For example, you could define 'unionWithKey',--- 'differenceWithKey' and 'intersectionWithKey' as------ > myUnionWithKey f m1 m2 = mergeWithKey (\k x1 x2 -> Just (f k x1 x2)) id id m1 m2--- > myDifferenceWithKey f m1 m2 = mergeWithKey f id (const empty) m1 m2--- > myIntersectionWithKey f m1 m2 = mergeWithKey (\k x1 x2 -> Just (f k x1 x2)) (const empty) (const empty) m1 m2------ When calling @'mergeWithKey' combine only1 only2@, a function combining two--- 'Word64Map's is created, such that------ * if a key is present in both maps, it is passed with both corresponding--- values to the @combine@ function. Depending on the result, the key is either--- present in the result with specified value, or is left out;------ * a nonempty subtree present only in the first map is passed to @only1@ and--- the output is added to the result;------ * a nonempty subtree present only in the second map is passed to @only2@ and--- the output is added to the result.------ The @only1@ and @only2@ methods /must return a map with a subset (possibly empty) of the keys of the given map/.--- The values can be modified arbitrarily. Most common variants of @only1@ and--- @only2@ are 'id' and @'const' 'empty'@, but for example @'map' f@ or--- @'filterWithKey' f@ could be used for any @f@.--mergeWithKey :: (Key -> a -> b -> Maybe c) -> (Word64Map a -> Word64Map c) -> (Word64Map b -> Word64Map c)- -> Word64Map a -> Word64Map b -> Word64Map c-mergeWithKey f g1 g2 = mergeWithKey' bin combine g1 g2- where -- We use the lambda form to avoid non-exhaustive pattern matches warning.- combine = \(Tip k1 x1) (Tip _k2 x2) -> case f k1 x1 x2 of Nothing -> Nil- Just !x -> Tip k1 x- {-# INLINE combine #-}-{-# INLINE mergeWithKey #-}--{--------------------------------------------------------------------- Min\/Max---------------------------------------------------------------------}---- | \(O(\log n)\). Update the value at the minimal key.------ > updateMinWithKey (\ k a -> Just ((show k) ++ ":" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3,"3:b"), (5,"a")]--- > updateMinWithKey (\ _ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"--updateMinWithKey :: (Key -> a -> Maybe a) -> Word64Map a -> Word64Map a-updateMinWithKey f t =- case t of Bin p m l r | m < 0 -> binCheckRight p m l (go f r)- _ -> go f t- where- go f' (Bin p m l r) = binCheckLeft p m (go f' l) r- go f' (Tip k y) = case f' k y of- Just !y' -> Tip k y'- Nothing -> Nil- go _ Nil = error "updateMinWithKey Nil"---- | \(O(\log n)\). Update the value at the maximal key.------ > updateMaxWithKey (\ k a -> Just ((show k) ++ ":" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3,"b"), (5,"5:a")]--- > updateMaxWithKey (\ _ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"--updateMaxWithKey :: (Key -> a -> Maybe a) -> Word64Map a -> Word64Map a-updateMaxWithKey f t =- case t of Bin p m l r | m < 0 -> binCheckLeft p m (go f l) r- _ -> go f t- where- go f' (Bin p m l r) = binCheckRight p m l (go f' r)- go f' (Tip k y) = case f' k y of- Just !y' -> Tip k y'- Nothing -> Nil- go _ Nil = error "updateMaxWithKey Nil"---- | \(O(\log n)\). Update the value at the maximal key.------ > updateMax (\ a -> Just ("X" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "Xa")]--- > updateMax (\ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"--updateMax :: (a -> Maybe a) -> Word64Map a -> Word64Map a-updateMax f = updateMaxWithKey (const f)---- | \(O(\log n)\). Update the value at the minimal key.------ > updateMin (\ a -> Just ("X" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3, "Xb"), (5, "a")]--- > updateMin (\ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"--updateMin :: (a -> Maybe a) -> Word64Map a -> Word64Map a-updateMin f = updateMinWithKey (const f)---{--------------------------------------------------------------------- Mapping---------------------------------------------------------------------}--- | \(O(n)\). Map a function over all values in the map.------ > map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]--map :: (a -> b) -> Word64Map a -> Word64Map b-map f = go- where- go (Bin p m l r) = Bin p m (go l) (go r)- go (Tip k x) = Tip k $! f x- go Nil = Nil--#ifdef __GLASGOW_HASKELL__-{-# NOINLINE [1] map #-}-{-# RULES-"map/map" forall f g xs . map f (map g xs) = map (\x -> f $! g x) xs-"map/mapL" forall f g xs . map f (L.map g xs) = map (\x -> f (g x)) xs- #-}-#endif---- | \(O(n)\). Map a function over all values in the map.------ > let f key x = (show key) ++ ":" ++ x--- > mapWithKey f (fromList [(5,"a"), (3,"b")]) == fromList [(3, "3:b"), (5, "5:a")]--mapWithKey :: (Key -> a -> b) -> Word64Map a -> Word64Map b-mapWithKey f t- = case t of- Bin p m l r -> Bin p m (mapWithKey f l) (mapWithKey f r)- Tip k x -> Tip k $! f k x- Nil -> Nil--#ifdef __GLASGOW_HASKELL__--- Pay close attention to strictness here. We need to force the--- intermediate result for map f . map g, and we need to refrain--- from forcing it for map f . L.map g, etc.------ TODO Consider moving map and mapWithKey to Word64Map.Internal so we can write--- non-orphan RULES for things like L.map f (map g xs). We'd need a new function--- for this, and we'd have to pay attention to simplifier phases. Something like------ lsmap :: (b -> c) -> (a -> b) -> Word64Map a -> Word64Map c--- lsmap _ _ Nil = Nil--- lsmap f g (Tip k x) = let !gx = g x in Tip k (f gx)--- lsmap f g (Bin p m l r) = Bin p m (lsmap f g l) (lsmap f g r)-{-# NOINLINE [1] mapWithKey #-}-{-# RULES-"mapWithKey/mapWithKey" forall f g xs . mapWithKey f (mapWithKey g xs) =- mapWithKey (\k a -> f k $! g k a) xs-"mapWithKey/mapWithKeyL" forall f g xs . mapWithKey f (L.mapWithKey g xs) =- mapWithKey (\k a -> f k (g k a)) xs-"mapWithKey/map" forall f g xs . mapWithKey f (map g xs) =- mapWithKey (\k a -> f k $! g a) xs-"mapWithKey/mapL" forall f g xs . mapWithKey f (L.map g xs) =- mapWithKey (\k a -> f k (g a)) xs-"map/mapWithKey" forall f g xs . map f (mapWithKey g xs) =- mapWithKey (\k a -> f $! g k a) xs-"map/mapWithKeyL" forall f g xs . map f (L.mapWithKey g xs) =- mapWithKey (\k a -> f (g k a)) xs- #-}-#endif---- | \(O(n)\).--- @'traverseWithKey' f s == 'fromList' <$> 'traverse' (\(k, v) -> (,) k <$> f k v) ('toList' m)@--- That is, behaves exactly like a regular 'traverse' except that the traversing--- function also has access to the key associated with a value.------ > traverseWithKey (\k v -> if odd k then Just (succ v) else Nothing) (fromList [(1, 'a'), (5, 'e')]) == Just (fromList [(1, 'b'), (5, 'f')])--- > traverseWithKey (\k v -> if odd k then Just (succ v) else Nothing) (fromList [(2, 'c')]) == Nothing-traverseWithKey :: Applicative t => (Key -> a -> t b) -> Word64Map a -> t (Word64Map b)-traverseWithKey f = go- where- go Nil = pure Nil- go (Tip k v) = (\ !v' -> Tip k v') <$> f k v- go (Bin p m l r)- | m < 0 = liftA2 (flip (Bin p m)) (go r) (go l)- | otherwise = liftA2 (Bin p m) (go l) (go r)-{-# INLINE traverseWithKey #-}---- | \(O(n)\). Traverse keys\/values and collect the 'Just' results.------ @since 0.6.4-traverseMaybeWithKey- :: Applicative f => (Key -> a -> f (Maybe b)) -> Word64Map a -> f (Word64Map b)-traverseMaybeWithKey f = go- where- go Nil = pure Nil- go (Tip k x) = maybe Nil (Tip k $!) <$> f k x- go (Bin p m l r)- | m < 0 = liftA2 (flip (bin p m)) (go r) (go l)- | otherwise = liftA2 (bin p m) (go l) (go r)---- | \(O(n)\). The function @'mapAccum'@ threads an accumulating--- argument through the map in ascending order of keys.------ > let f a b = (a ++ b, b ++ "X")--- > mapAccum f "Everything: " (fromList [(5,"a"), (3,"b")]) == ("Everything: ba", fromList [(3, "bX"), (5, "aX")])--mapAccum :: (a -> b -> (a,c)) -> a -> Word64Map b -> (a,Word64Map c)-mapAccum f = mapAccumWithKey (\a' _ x -> f a' x)---- | \(O(n)\). The function @'mapAccumWithKey'@ threads an accumulating--- argument through the map in ascending order of keys.------ > let f a k b = (a ++ " " ++ (show k) ++ "-" ++ b, b ++ "X")--- > mapAccumWithKey f "Everything:" (fromList [(5,"a"), (3,"b")]) == ("Everything: 3-b 5-a", fromList [(3, "bX"), (5, "aX")])--mapAccumWithKey :: (a -> Key -> b -> (a,c)) -> a -> Word64Map b -> (a,Word64Map c)-mapAccumWithKey f a t- = mapAccumL f a t---- | \(O(n)\). The function @'mapAccumL'@ threads an accumulating--- argument through the map in ascending order of keys. Strict in--- the accumulating argument and the both elements of the--- result of the function.-mapAccumL :: (a -> Key -> b -> (a,c)) -> a -> Word64Map b -> (a,Word64Map c)-mapAccumL f0 a0 t0 = toPair $ go f0 a0 t0- where- go f a t- = case t of- Bin p m l r- | m < 0 ->- let (a1 :*: r') = go f a r- (a2 :*: l') = go f a1 l- in (a2 :*: Bin p m l' r')- | otherwise ->- let (a1 :*: l') = go f a l- (a2 :*: r') = go f a1 r- in (a2 :*: Bin p m l' r')- Tip k x -> let !(a',!x') = f a k x in (a' :*: Tip k x')- Nil -> (a :*: Nil)---- | \(O(n)\). The function @'mapAccumRWithKey'@ threads an accumulating--- argument through the map in descending order of keys.-mapAccumRWithKey :: (a -> Key -> b -> (a,c)) -> a -> Word64Map b -> (a,Word64Map c)-mapAccumRWithKey f0 a0 t0 = toPair $ go f0 a0 t0- where- go f a t- = case t of- Bin p m l r- | m < 0 ->- let (a1 :*: l') = go f a l- (a2 :*: r') = go f a1 r- in (a2 :*: Bin p m l' r')- | otherwise ->- let (a1 :*: r') = go f a r- (a2 :*: l') = go f a1 l- in (a2 :*: Bin p m l' r')- Tip k x -> let !(a',!x') = f a k x in (a' :*: Tip k x')- Nil -> (a :*: Nil)---- | \(O(n \log n)\).--- @'mapKeysWith' c f s@ is the map obtained by applying @f@ to each key of @s@.------ The size of the result may be smaller if @f@ maps two or more distinct--- keys to the same new key. In this case the associated values will be--- combined using @c@.------ > mapKeysWith (++) (\ _ -> 1) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 1 "cdab"--- > mapKeysWith (++) (\ _ -> 3) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 3 "cdab"--mapKeysWith :: (a -> a -> a) -> (Key->Key) -> Word64Map a -> Word64Map a-mapKeysWith c f = fromListWith c . foldrWithKey (\k x xs -> (f k, x) : xs) []--{--------------------------------------------------------------------- Filter---------------------------------------------------------------------}--- | \(O(n)\). Map values and collect the 'Just' results.------ > let f x = if x == "a" then Just "new a" else Nothing--- > mapMaybe f (fromList [(5,"a"), (3,"b")]) == singleton 5 "new a"--mapMaybe :: (a -> Maybe b) -> Word64Map a -> Word64Map b-mapMaybe f = mapMaybeWithKey (\_ x -> f x)---- | \(O(n)\). Map keys\/values and collect the 'Just' results.------ > let f k _ = if k < 5 then Just ("key : " ++ (show k)) else Nothing--- > mapMaybeWithKey f (fromList [(5,"a"), (3,"b")]) == singleton 3 "key : 3"--mapMaybeWithKey :: (Key -> a -> Maybe b) -> Word64Map a -> Word64Map b-mapMaybeWithKey f (Bin p m l r)- = bin p m (mapMaybeWithKey f l) (mapMaybeWithKey f r)-mapMaybeWithKey f (Tip k x) = case f k x of- Just !y -> Tip k y- Nothing -> Nil-mapMaybeWithKey _ Nil = Nil---- | \(O(n)\). Map values and separate the 'Left' and 'Right' results.------ > let f a = if a < "c" then Left a else Right a--- > mapEither f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])--- > == (fromList [(3,"b"), (5,"a")], fromList [(1,"x"), (7,"z")])--- >--- > mapEither (\ a -> Right a) (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])--- > == (empty, fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])--mapEither :: (a -> Either b c) -> Word64Map a -> (Word64Map b, Word64Map c)-mapEither f m- = mapEitherWithKey (\_ x -> f x) m---- | \(O(n)\). Map keys\/values and separate the 'Left' and 'Right' results.------ > let f k a = if k < 5 then Left (k * 2) else Right (a ++ a)--- > mapEitherWithKey f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])--- > == (fromList [(1,2), (3,6)], fromList [(5,"aa"), (7,"zz")])--- >--- > mapEitherWithKey (\_ a -> Right a) (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])--- > == (empty, fromList [(1,"x"), (3,"b"), (5,"a"), (7,"z")])--mapEitherWithKey :: (Key -> a -> Either b c) -> Word64Map a -> (Word64Map b, Word64Map c)-mapEitherWithKey f0 t0 = toPair $ go f0 t0- where- go f (Bin p m l r)- = bin p m l1 r1 :*: bin p m l2 r2- where- (l1 :*: l2) = go f l- (r1 :*: r2) = go f r- go f (Tip k x) = case f k x of- Left !y -> (Tip k y :*: Nil)- Right !z -> (Nil :*: Tip k z)- go _ Nil = (Nil :*: Nil)--{--------------------------------------------------------------------- Conversions---------------------------------------------------------------------}---- | \(O(n)\). Build a map from a set of keys and a function which for each key--- computes its value.------ > fromSet (\k -> replicate k 'a') (Data.Word64Set.fromList [3, 5]) == fromList [(5,"aaaaa"), (3,"aaa")]--- > fromSet undefined Data.Word64Set.empty == empty--fromSet :: (Key -> a) -> Word64Set.Word64Set -> Word64Map a-fromSet _ Word64Set.Nil = Nil-fromSet f (Word64Set.Bin p m l r) = Bin p m (fromSet f l) (fromSet f r)-fromSet f (Word64Set.Tip kx bm) = buildTree f kx bm (Word64Set.suffixBitMask + 1)- where -- This is slightly complicated, as we to convert the dense- -- representation of Word64Set into tree representation of Word64Map.- --- -- We are given a nonzero bit mask 'bmask' of 'bits' bits with prefix 'prefix'.- -- We split bmask into halves corresponding to left and right subtree.- -- If they are both nonempty, we create a Bin node, otherwise exactly- -- one of them is nonempty and we construct the Word64Map from that half.- buildTree g !prefix !bmask bits = case bits of- 0 -> Tip prefix $! g prefix- _ -> case intFromNat ((natFromInt bits) `shiftRL` 1) of- bits2 | bmask .&. ((1 `shiftLL` fromIntegral bits2) - 1) == 0 ->- buildTree g (prefix + bits2) (bmask `shiftRL` fromIntegral bits2) bits2- | (bmask `shiftRL` fromIntegral bits2) .&. ((1 `shiftLL` fromIntegral bits2) - 1) == 0 ->- buildTree g prefix bmask bits2- | otherwise ->- Bin prefix bits2 (buildTree g prefix bmask bits2) (buildTree g (prefix + bits2) (bmask `shiftRL` fromIntegral bits2) bits2)--{--------------------------------------------------------------------- Lists---------------------------------------------------------------------}--- | \(O(n \min(n,W))\). Create a map from a list of key\/value pairs.------ > fromList [] == empty--- > fromList [(5,"a"), (3,"b"), (5, "c")] == fromList [(5,"c"), (3,"b")]--- > fromList [(5,"c"), (3,"b"), (5, "a")] == fromList [(5,"a"), (3,"b")]--fromList :: [(Key,a)] -> Word64Map a-fromList xs- = Foldable.foldl' ins empty xs- where- ins t (k,x) = insert k x t---- | \(O(n \min(n,W))\). Create a map from a list of key\/value pairs with a combining function. See also 'fromAscListWith'.------ > fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"a")] == fromList [(3, "ab"), (5, "aba")]--- > fromListWith (++) [] == empty--fromListWith :: (a -> a -> a) -> [(Key,a)] -> Word64Map a-fromListWith f xs- = fromListWithKey (\_ x y -> f x y) xs---- | \(O(n \min(n,W))\). Build a map from a list of key\/value pairs with a combining function. See also fromAscListWithKey'.------ > let f key new_value old_value = show key ++ ":" ++ new_value ++ "|" ++ old_value--- > fromListWithKey f [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")] == fromList [(3, "3:a|b"), (5, "5:c|5:b|a")]--- > fromListWithKey f [] == empty--fromListWithKey :: (Key -> a -> a -> a) -> [(Key,a)] -> Word64Map a-fromListWithKey f xs- = Foldable.foldl' ins empty xs- where- ins t (k,x) = insertWithKey f k x t---- | \(O(n)\). Build a map from a list of key\/value pairs where--- the keys are in ascending order.------ > fromAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")]--- > fromAscList [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "b")]--fromAscList :: [(Key,a)] -> Word64Map a-fromAscList = fromMonoListWithKey Nondistinct (\_ x _ -> x)-{-# NOINLINE fromAscList #-}---- | \(O(n)\). Build a map from a list of key\/value pairs where--- the keys are in ascending order, with a combining function on equal keys.--- /The precondition (input list is ascending) is not checked./------ > fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "ba")]--fromAscListWith :: (a -> a -> a) -> [(Key,a)] -> Word64Map a-fromAscListWith f = fromMonoListWithKey Nondistinct (\_ x y -> f x y)-{-# NOINLINE fromAscListWith #-}---- | \(O(n)\). Build a map from a list of key\/value pairs where--- the keys are in ascending order, with a combining function on equal keys.--- /The precondition (input list is ascending) is not checked./------ > fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "ba")]--fromAscListWithKey :: (Key -> a -> a -> a) -> [(Key,a)] -> Word64Map a-fromAscListWithKey f = fromMonoListWithKey Nondistinct f-{-# NOINLINE fromAscListWithKey #-}---- | \(O(n)\). Build a map from a list of key\/value pairs where--- the keys are in ascending order and all distinct.--- /The precondition (input list is strictly ascending) is not checked./------ > fromDistinctAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")]--fromDistinctAscList :: [(Key,a)] -> Word64Map a-fromDistinctAscList = fromMonoListWithKey Distinct (\_ x _ -> x)-{-# NOINLINE fromDistinctAscList #-}---- | \(O(n)\). Build a map from a list of key\/value pairs with monotonic keys--- and a combining function.------ The precise conditions under which this function works are subtle:--- For any branch mask, keys with the same prefix w.r.t. the branch--- mask must occur consecutively in the list.--fromMonoListWithKey :: Distinct -> (Key -> a -> a -> a) -> [(Key,a)] -> Word64Map a-fromMonoListWithKey distinct f = go- where- go [] = Nil- go ((kx,vx) : zs1) = addAll' kx vx zs1-- -- `addAll'` collects all keys equal to `kx` into a single value,- -- and then proceeds with `addAll`.- addAll' !kx vx []- = Tip kx $! vx- addAll' !kx vx ((ky,vy) : zs)- | Nondistinct <- distinct, kx == ky- = let !v = f kx vy vx in addAll' ky v zs- -- inlined: | otherwise = addAll kx (Tip kx $! vx) (ky : zs)- | m <- branchMask kx ky- , Inserted ty zs' <- addMany' m ky vy zs- = addAll kx (linkWithMask m ky ty {-kx-} (Tip kx $! vx)) zs'-- -- for `addAll` and `addMany`, kx is /a/ key inside the tree `tx`- -- `addAll` consumes the rest of the list, adding to the tree `tx`- addAll !_kx !tx []- = tx- addAll !kx !tx ((ky,vy) : zs)- | m <- branchMask kx ky- , Inserted ty zs' <- addMany' m ky vy zs- = addAll kx (linkWithMask m ky ty {-kx-} tx) zs'-- -- `addMany'` is similar to `addAll'`, but proceeds with `addMany'`.- addMany' !_m !kx vx []- = Inserted (Tip kx $! vx) []- addMany' !m !kx vx zs0@((ky,vy) : zs)- | Nondistinct <- distinct, kx == ky- = let !v = f kx vy vx in addMany' m ky v zs- -- inlined: | otherwise = addMany m kx (Tip kx $! vx) (ky : zs)- | mask kx m /= mask ky m- = Inserted (Tip kx $! vx) zs0- | mxy <- branchMask kx ky- , Inserted ty zs' <- addMany' mxy ky vy zs- = addMany m kx (linkWithMask mxy ky ty {-kx-} (Tip kx $! vx)) zs'-- -- `addAll` adds to `tx` all keys whose prefix w.r.t. `m` agrees with `kx`.- addMany !_m !_kx tx []- = Inserted tx []- addMany !m !kx tx zs0@((ky,vy) : zs)- | mask kx m /= mask ky m- = Inserted tx zs0- | mxy <- branchMask kx ky- , Inserted ty zs' <- addMany' mxy ky vy zs- = addMany m kx (linkWithMask mxy ky ty {-kx-} tx) zs'-{-# INLINE fromMonoListWithKey #-}--data Inserted a = Inserted !(Word64Map a) ![(Key,a)]--data Distinct = Distinct | Nondistinct
− GHC/Data/Word64Set.hs
@@ -1,172 +0,0 @@-{-# LANGUAGE CPP #-}-#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)-{-# LANGUAGE Safe #-}-#endif---------------------------------------------------------------------------------- |--- Module : Data.Word64Set--- Copyright : (c) Daan Leijen 2002--- (c) Joachim Breitner 2011--- License : BSD-style--- Maintainer : libraries@haskell.org--- Portability : portable--------- = Finite Int Sets------ The @'Word64Set'@ type represents a set of elements of type @Int@.------ For a walkthrough of the most commonly used functions see their--- <https://haskell-containers.readthedocs.io/en/latest/set.html sets introduction>.------ These modules are intended to be imported qualified, to avoid name--- clashes with Prelude functions, e.g.------ > import Data.Word64Set (Word64Set)--- > import qualified Data.Word64Set as Word64Set--------- == Performance information------ Many operations have a worst-case complexity of \(O(\min(n,W))\).--- This means that the operation can become linear in the number of--- elements with a maximum of \(W\) -- the number of bits in an 'Int'--- (32 or 64).--------- == Implementation------ The implementation is based on /big-endian patricia trees/. This data--- structure performs especially well on binary operations like 'union'--- and 'intersection'. However, my benchmarks show that it is also--- (much) faster on insertions and deletions when compared to a generic--- size-balanced set implementation (see "Data.Set").------ * Chris Okasaki and Andy Gill, \"/Fast Mergeable Integer Maps/\",--- Workshop on ML, September 1998, pages 77-86,--- <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.5452>------ * D.R. Morrison, \"/PATRICIA -- Practical Algorithm To Retrieve Information Coded In Alphanumeric/\",--- Journal of the ACM, 15(4), October 1968, pages 514-534.------ Additionally, this implementation places bitmaps in the leaves of the tree.--- Their size is the natural size of a machine word (32 or 64 bits) and greatly--- reduces the memory footprint and execution times for dense sets, e.g. sets--- where it is likely that many values lie close to each other. The asymptotics--- are not affected by this optimization.-----------------------------------------------------------------------------------module GHC.Data.Word64Set (- -- * Strictness properties- -- $strictness-- -- * Set type-#if !defined(TESTING)- Word64Set -- instance Eq,Show-#else- Word64Set(..) -- instance Eq,Show-#endif- , Key-- -- * Construction- , empty- , singleton- , fromList- , fromAscList- , fromDistinctAscList-- -- * Insertion- , insert-- -- * Deletion- , delete-- -- * Generalized insertion/deletion- , alterF-- -- * Query- , member- , notMember- , lookupLT- , lookupGT- , lookupLE- , lookupGE- , WS.null- , size- , isSubsetOf- , isProperSubsetOf- , disjoint-- -- * Combine- , union- , unions- , difference- , (\\)- , intersection-- -- * Filter- , WS.filter- , partition-- , takeWhileAntitone- , dropWhileAntitone- , spanAntitone-- , split- , splitMember- , splitRoot-- -- * Map- , WS.map- , mapMonotonic-- -- * Folds- , WS.foldr- , WS.foldl- -- ** Strict folds- , foldr'- , foldl'- -- ** Legacy folds- , fold-- -- * Min\/Max- , findMin- , findMax- , deleteMin- , deleteMax- , deleteFindMin- , deleteFindMax- , maxView- , minView-- -- * Conversion-- -- ** List- , elems- , toList- , toAscList- , toDescList-- -- * Debugging- , showTree- , showTreeWith--#if defined(TESTING)- -- * Internals- , match-#endif- ) where--import GHC.Data.Word64Set.Internal as WS---- $strictness------ This module satisfies the following strictness property:------ * Key arguments are evaluated to WHNF------ Here are some examples that illustrate the property:------ > delete undefined s == undefined
− GHC/Data/Word64Set/Internal.hs
@@ -1,1702 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE BangPatterns #-}-{-# LANGUAGE PatternGuards #-}-#ifdef __GLASGOW_HASKELL__-{-# LANGUAGE MagicHash #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE TypeFamilies #-}-#endif-#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)-{-# LANGUAGE Trustworthy #-}-#endif--{-# OPTIONS_HADDOCK not-home #-}---------------------------------------------------------------------------------- |--- Module : Data.Word64Set.Internal--- Copyright : (c) Daan Leijen 2002--- (c) Joachim Breitner 2011--- License : BSD-style--- Maintainer : libraries@haskell.org--- Portability : portable------ = WARNING------ This module is considered __internal__.------ The Package Versioning Policy __does not apply__.------ The contents of this module may change __in any way whatsoever__--- and __without any warning__ between minor versions of this package.------ Authors importing this module are expected to track development--- closely.------ = Description------ An efficient implementation of integer sets.------ These modules are intended to be imported qualified, to avoid name--- clashes with Prelude functions, e.g.------ > import Data.Word64Set (Word64Set)--- > import qualified Data.Word64Set as Word64Set------ The implementation is based on /big-endian patricia trees/. This data--- structure performs especially well on binary operations like 'union'--- and 'intersection'. However, my benchmarks show that it is also--- (much) faster on insertions and deletions when compared to a generic--- size-balanced set implementation (see "Data.Set").------ * Chris Okasaki and Andy Gill, \"/Fast Mergeable Integer Maps/\",--- Workshop on ML, September 1998, pages 77-86,--- <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.5452>------ * D.R. Morrison, \"/PATRICIA -- Practical Algorithm To Retrieve Information Coded In Alphanumeric/\",--- Journal of the ACM, 15(4), October 1968, pages 514-534.------ Additionally, this implementation places bitmaps in the leaves of the tree.--- Their size is the natural size of a machine word (32 or 64 bits) and greatly--- reduce memory footprint and execution times for dense sets, e.g. sets where--- it is likely that many values lie close to each other. The asymptotics are--- not affected by this optimization.------ Many operations have a worst-case complexity of \(O(\min(n,W))\).--- This means that the operation can become linear in the number of--- elements with a maximum of \(W\) -- the number of bits in an 'Int'--- (32 or 64).------ @since 0.5.9---------------------------------------------------------------------------------- [Note: INLINE bit fiddling]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~--- It is essential that the bit fiddling functions like mask, zero, branchMask--- etc are inlined. If they do not, the memory allocation skyrockets. The GHC--- usually gets it right, but it is disastrous if it does not. Therefore we--- explicitly mark these functions INLINE.----- [Note: Local 'go' functions and capturing]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--- Care must be taken when using 'go' function which captures an argument.--- Sometimes (for example when the argument is passed to a data constructor,--- as in insert), GHC heap-allocates more than necessary. Therefore C-- code--- must be checked for increased allocation when creating and modifying such--- functions.----- [Note: Order of constructors]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--- The order of constructors of Word64Set matters when considering performance.--- Currently in GHC 7.0, when type has 3 constructors, they are matched from--- the first to the last -- the best performance is achieved when the--- constructors are ordered by frequency.--- On GHC 7.0, reordering constructors from Nil | Tip | Bin to Bin | Tip | Nil--- improves the benchmark by circa 10%.--module GHC.Data.Word64Set.Internal (- -- * Set type- Word64Set(..), Key -- instance Eq,Show- , Prefix, Mask, BitMap-- -- * Operators- , (\\)-- -- * Query- , null- , size- , member- , notMember- , lookupLT- , lookupGT- , lookupLE- , lookupGE- , isSubsetOf- , isProperSubsetOf- , disjoint-- -- * Construction- , empty- , singleton- , insert- , delete- , alterF-- -- * Combine- , union- , unions- , difference- , intersection-- -- * Filter- , filter- , partition-- , takeWhileAntitone- , dropWhileAntitone- , spanAntitone-- , split- , splitMember- , splitRoot-- -- * Map- , map- , mapMonotonic-- -- * Folds- , foldr- , foldl- -- ** Strict folds- , foldr'- , foldl'- -- ** Legacy folds- , fold-- -- * Min\/Max- , findMin- , findMax- , deleteMin- , deleteMax- , deleteFindMin- , deleteFindMax- , maxView- , minView-- -- * Conversion-- -- ** List- , elems- , toList- , fromList-- -- ** Ordered list- , toAscList- , toDescList- , fromAscList- , fromDistinctAscList-- -- * Debugging- , showTree- , showTreeWith-- -- * Internals- , match- , suffixBitMask- , prefixBitMask- , bitmapOf- , zero- ) where--import Control.Applicative (Const(..))-import Control.DeepSeq (NFData(rnf))-import Data.Bits-import qualified Data.List as List-import Data.Maybe (fromMaybe)-import Data.Semigroup (Semigroup(stimes, (<>)), stimesIdempotentMonoid)-import GHC.Prelude.Basic hiding- (filter, foldr, foldl, foldl', null, map)-import Data.Word ( Word64 )--import GHC.Utils.Containers.Internal.BitUtil-import GHC.Utils.Containers.Internal.StrictPair--#if __GLASGOW_HASKELL__-import Data.Data (Data(..), Constr, mkConstr, constrIndex, DataType, mkDataType)-import qualified Data.Data-import Text.Read-#endif--#if __GLASGOW_HASKELL__-import qualified GHC.Exts-#endif--import qualified Data.Foldable as Foldable-import Data.Functor.Identity (Identity(..))--infixl 9 \\{-This comment teaches CPP correct behaviour -}---- A "Nat" is a 64 bit machine word-type Nat = Word64--natFromInt :: Word64 -> Nat-natFromInt = id-{-# INLINE natFromInt #-}--intFromNat :: Nat -> Word64-intFromNat = id-{-# INLINE intFromNat #-}--{--------------------------------------------------------------------- Operators---------------------------------------------------------------------}--- | \(O(n+m)\). See 'difference'.-(\\) :: Word64Set -> Word64Set -> Word64Set-m1 \\ m2 = difference m1 m2--{--------------------------------------------------------------------- Types---------------------------------------------------------------------}---- | A set of integers.---- See Note: Order of constructors-data Word64Set = Bin {-# UNPACK #-} !Prefix {-# UNPACK #-} !Mask !Word64Set !Word64Set--- Invariant: Nil is never found as a child of Bin.--- Invariant: The Mask is a power of 2. It is the largest bit position at which--- two elements of the set differ.--- Invariant: Prefix is the common high-order bits that all elements share to--- the left of the Mask bit.--- Invariant: In Bin prefix mask left right, left consists of the elements that--- don't have the mask bit set; right is all the elements that do.- | Tip {-# UNPACK #-} !Prefix {-# UNPACK #-} !BitMap--- Invariant: The Prefix is zero for the last 6 bits. The values of the set--- represented by a tip are the prefix plus the indices of the set--- bits in the bit map.- | Nil---- A number stored in a set is stored as--- * Prefix (all but last 6 bits) and--- * BitMap (last 6 bits stored as a bitmask)--- Last 6 bits are called a Suffix.--type Prefix = Word64-type Mask = Word64-type BitMap = Word64-type Key = Word64--instance Monoid Word64Set where- mempty = empty- mconcat = unions- mappend = (<>)---- | @since 0.5.7-instance Semigroup Word64Set where- (<>) = union- stimes = stimesIdempotentMonoid--#if __GLASGOW_HASKELL__--{--------------------------------------------------------------------- A Data instance---------------------------------------------------------------------}---- This instance preserves data abstraction at the cost of inefficiency.--- We provide limited reflection services for the sake of data abstraction.--instance Data Word64Set where- gfoldl f z is = z fromList `f` (toList is)- toConstr _ = fromListConstr- gunfold k z c = case constrIndex c of- 1 -> k (z fromList)- _ -> error "gunfold"- dataTypeOf _ = intSetDataType--fromListConstr :: Constr-fromListConstr = mkConstr intSetDataType "fromList" [] Data.Data.Prefix--intSetDataType :: DataType-intSetDataType = mkDataType "Data.Word64Set.Internal.Word64Set" [fromListConstr]--#endif--{--------------------------------------------------------------------- Query---------------------------------------------------------------------}--- | \(O(1)\). Is the set empty?-null :: Word64Set -> Bool-null Nil = True-null _ = False-{-# INLINE null #-}---- | \(O(n)\). Cardinality of the set.-size :: Word64Set -> Int-size = go 0- where- go !acc (Bin _ _ l r) = go (go acc l) r- go acc (Tip _ bm) = acc + bitcount 0 bm- go acc Nil = acc---- | \(O(\min(n,W))\). Is the value a member of the set?---- See Note: Local 'go' functions and capturing.-member :: Key -> Word64Set -> Bool-member !x = go- where- go (Bin p m l r)- | nomatch x p m = False- | zero x m = go l- | otherwise = go r- go (Tip y bm) = prefixOf x == y && bitmapOf x .&. bm /= 0- go Nil = False---- | \(O(\min(n,W))\). Is the element not in the set?-notMember :: Key -> Word64Set -> Bool-notMember k = not . member k---- | \(O(\min(n,W))\). Find largest element smaller than the given one.------ > lookupLT 3 (fromList [3, 5]) == Nothing--- > lookupLT 5 (fromList [3, 5]) == Just 3---- See Note: Local 'go' functions and capturing.-lookupLT :: Key -> Word64Set -> Maybe Key-lookupLT !x t = case t of- Bin _ m l r | m < 0 -> if x >= 0 then go r l else go Nil r- _ -> go Nil t- where- go def (Bin p m l r) | nomatch x p m = if x < p then unsafeFindMax def else unsafeFindMax r- | zero x m = go def l- | otherwise = go l r- go def (Tip kx bm) | prefixOf x > kx = Just $ kx + highestBitSet bm- | prefixOf x == kx && maskLT /= 0 = Just $ kx + highestBitSet maskLT- | otherwise = unsafeFindMax def- where maskLT = (bitmapOf x - 1) .&. bm- go def Nil = unsafeFindMax def----- | \(O(\min(n,W))\). Find smallest element greater than the given one.------ > lookupGT 4 (fromList [3, 5]) == Just 5--- > lookupGT 5 (fromList [3, 5]) == Nothing---- See Note: Local 'go' functions and capturing.-lookupGT :: Key -> Word64Set -> Maybe Key-lookupGT !x t = case t of- Bin _ m l r | m < 0 -> if x >= 0 then go Nil l else go l r- _ -> go Nil t- where- go def (Bin p m l r) | nomatch x p m = if x < p then unsafeFindMin l else unsafeFindMin def- | zero x m = go r l- | otherwise = go def r- go def (Tip kx bm) | prefixOf x < kx = Just $ kx + lowestBitSet bm- | prefixOf x == kx && maskGT /= 0 = Just $ kx + lowestBitSet maskGT- | otherwise = unsafeFindMin def- where maskGT = (- ((bitmapOf x) `shiftLL` 1)) .&. bm- go def Nil = unsafeFindMin def----- | \(O(\min(n,W))\). Find largest element smaller or equal to the given one.------ > lookupLE 2 (fromList [3, 5]) == Nothing--- > lookupLE 4 (fromList [3, 5]) == Just 3--- > lookupLE 5 (fromList [3, 5]) == Just 5---- See Note: Local 'go' functions and capturing.-lookupLE :: Key -> Word64Set -> Maybe Key-lookupLE !x t = case t of- Bin _ m l r | m < 0 -> if x >= 0 then go r l else go Nil r- _ -> go Nil t- where- go def (Bin p m l r) | nomatch x p m = if x < p then unsafeFindMax def else unsafeFindMax r- | zero x m = go def l- | otherwise = go l r- go def (Tip kx bm) | prefixOf x > kx = Just $ kx + highestBitSet bm- | prefixOf x == kx && maskLE /= 0 = Just $ kx + highestBitSet maskLE- | otherwise = unsafeFindMax def- where maskLE = (((bitmapOf x) `shiftLL` 1) - 1) .&. bm- go def Nil = unsafeFindMax def----- | \(O(\min(n,W))\). Find smallest element greater or equal to the given one.------ > lookupGE 3 (fromList [3, 5]) == Just 3--- > lookupGE 4 (fromList [3, 5]) == Just 5--- > lookupGE 6 (fromList [3, 5]) == Nothing---- See Note: Local 'go' functions and capturing.-lookupGE :: Key -> Word64Set -> Maybe Key-lookupGE !x t = case t of- Bin _ m l r | m < 0 -> if x >= 0 then go Nil l else go l r- _ -> go Nil t- where- go def (Bin p m l r) | nomatch x p m = if x < p then unsafeFindMin l else unsafeFindMin def- | zero x m = go r l- | otherwise = go def r- go def (Tip kx bm) | prefixOf x < kx = Just $ kx + lowestBitSet bm- | prefixOf x == kx && maskGE /= 0 = Just $ kx + lowestBitSet maskGE- | otherwise = unsafeFindMin def- where maskGE = (- (bitmapOf x)) .&. bm- go def Nil = unsafeFindMin def------ Helper function for lookupGE and lookupGT. It assumes that if a Bin node is--- given, it has m > 0.-unsafeFindMin :: Word64Set -> Maybe Key-unsafeFindMin Nil = Nothing-unsafeFindMin (Tip kx bm) = Just $ kx + lowestBitSet bm-unsafeFindMin (Bin _ _ l _) = unsafeFindMin l---- Helper function for lookupLE and lookupLT. It assumes that if a Bin node is--- given, it has m > 0.-unsafeFindMax :: Word64Set -> Maybe Key-unsafeFindMax Nil = Nothing-unsafeFindMax (Tip kx bm) = Just $ kx + highestBitSet bm-unsafeFindMax (Bin _ _ _ r) = unsafeFindMax r--{--------------------------------------------------------------------- Construction---------------------------------------------------------------------}--- | \(O(1)\). The empty set.-empty :: Word64Set-empty- = Nil-{-# INLINE empty #-}---- | \(O(1)\). A set of one element.-singleton :: Key -> Word64Set-singleton x- = Tip (prefixOf x) (bitmapOf x)-{-# INLINE singleton #-}--{--------------------------------------------------------------------- Insert---------------------------------------------------------------------}--- | \(O(\min(n,W))\). Add a value to the set. There is no left- or right bias for--- Word64Sets.-insert :: Key -> Word64Set -> Word64Set-insert !x = insertBM (prefixOf x) (bitmapOf x)---- Helper function for insert and union.-insertBM :: Prefix -> BitMap -> Word64Set -> Word64Set-insertBM !kx !bm t@(Bin p m l r)- | nomatch kx p m = link kx (Tip kx bm) p t- | zero kx m = Bin p m (insertBM kx bm l) r- | otherwise = Bin p m l (insertBM kx bm r)-insertBM kx bm t@(Tip kx' bm')- | kx' == kx = Tip kx' (bm .|. bm')- | otherwise = link kx (Tip kx bm) kx' t-insertBM kx bm Nil = Tip kx bm---- | \(O(\min(n,W))\). Delete a value in the set. Returns the--- original set when the value was not present.-delete :: Key -> Word64Set -> Word64Set-delete !x = deleteBM (prefixOf x) (bitmapOf x)---- Deletes all values mentioned in the BitMap from the set.--- Helper function for delete and difference.-deleteBM :: Prefix -> BitMap -> Word64Set -> Word64Set-deleteBM !kx !bm t@(Bin p m l r)- | nomatch kx p m = t- | zero kx m = bin p m (deleteBM kx bm l) r- | otherwise = bin p m l (deleteBM kx bm r)-deleteBM kx bm t@(Tip kx' bm')- | kx' == kx = tip kx (bm' .&. complement bm)- | otherwise = t-deleteBM _ _ Nil = Nil---- | \(O(\min(n,W))\). @('alterF' f x s)@ can delete or insert @x@ in @s@ depending--- on whether it is already present in @s@.------ In short:------ @--- 'member' x \<$\> 'alterF' f x s = f ('member' x s)--- @------ Note: 'alterF' is a variant of the @at@ combinator from "Control.Lens.At".------ @since 0.6.3.1-alterF :: Functor f => (Bool -> f Bool) -> Key -> Word64Set -> f Word64Set-alterF f k s = fmap choose (f member_)- where- member_ = member k s-- (inserted, deleted)- | member_ = (s , delete k s)- | otherwise = (insert k s, s )-- choose True = inserted- choose False = deleted-#ifndef __GLASGOW_HASKELL__-{-# INLINE alterF #-}-#else-{-# INLINABLE [2] alterF #-}--{-# RULES-"alterF/Const" forall k (f :: Bool -> Const a Bool) . alterF f k = \s -> Const . getConst . f $ member k s- #-}-#endif--{-# SPECIALIZE alterF :: (Bool -> Identity Bool) -> Key -> Word64Set -> Identity Word64Set #-}--{--------------------------------------------------------------------- Union---------------------------------------------------------------------}--- | The union of a list of sets.-unions :: Foldable f => f Word64Set -> Word64Set-unions xs- = Foldable.foldl' union empty xs----- | \(O(n+m)\). The union of two sets.-union :: Word64Set -> Word64Set -> Word64Set-union t1@(Bin p1 m1 l1 r1) t2@(Bin p2 m2 l2 r2)- | shorter m1 m2 = union1- | shorter m2 m1 = union2- | p1 == p2 = Bin p1 m1 (union l1 l2) (union r1 r2)- | otherwise = link p1 t1 p2 t2- where- union1 | nomatch p2 p1 m1 = link p1 t1 p2 t2- | zero p2 m1 = Bin p1 m1 (union l1 t2) r1- | otherwise = Bin p1 m1 l1 (union r1 t2)-- union2 | nomatch p1 p2 m2 = link p1 t1 p2 t2- | zero p1 m2 = Bin p2 m2 (union t1 l2) r2- | otherwise = Bin p2 m2 l2 (union t1 r2)--union t@(Bin _ _ _ _) (Tip kx bm) = insertBM kx bm t-union t@(Bin _ _ _ _) Nil = t-union (Tip kx bm) t = insertBM kx bm t-union Nil t = t---{--------------------------------------------------------------------- Difference---------------------------------------------------------------------}--- | \(O(n+m)\). Difference between two sets.-difference :: Word64Set -> Word64Set -> Word64Set-difference t1@(Bin p1 m1 l1 r1) t2@(Bin p2 m2 l2 r2)- | shorter m1 m2 = difference1- | shorter m2 m1 = difference2- | p1 == p2 = bin p1 m1 (difference l1 l2) (difference r1 r2)- | otherwise = t1- where- difference1 | nomatch p2 p1 m1 = t1- | zero p2 m1 = bin p1 m1 (difference l1 t2) r1- | otherwise = bin p1 m1 l1 (difference r1 t2)-- difference2 | nomatch p1 p2 m2 = t1- | zero p1 m2 = difference t1 l2- | otherwise = difference t1 r2--difference t@(Bin _ _ _ _) (Tip kx bm) = deleteBM kx bm t-difference t@(Bin _ _ _ _) Nil = t--difference t1@(Tip kx bm) t2 = differenceTip t2- where differenceTip (Bin p2 m2 l2 r2) | nomatch kx p2 m2 = t1- | zero kx m2 = differenceTip l2- | otherwise = differenceTip r2- differenceTip (Tip kx2 bm2) | kx == kx2 = tip kx (bm .&. complement bm2)- | otherwise = t1- differenceTip Nil = t1--difference Nil _ = Nil----{--------------------------------------------------------------------- Intersection---------------------------------------------------------------------}--- | \(O(n+m)\). The intersection of two sets.-intersection :: Word64Set -> Word64Set -> Word64Set-intersection t1@(Bin p1 m1 l1 r1) t2@(Bin p2 m2 l2 r2)- | shorter m1 m2 = intersection1- | shorter m2 m1 = intersection2- | p1 == p2 = bin p1 m1 (intersection l1 l2) (intersection r1 r2)- | otherwise = Nil- where- intersection1 | nomatch p2 p1 m1 = Nil- | zero p2 m1 = intersection l1 t2- | otherwise = intersection r1 t2-- intersection2 | nomatch p1 p2 m2 = Nil- | zero p1 m2 = intersection t1 l2- | otherwise = intersection t1 r2--intersection t1@(Bin _ _ _ _) (Tip kx2 bm2) = intersectBM t1- where intersectBM (Bin p1 m1 l1 r1) | nomatch kx2 p1 m1 = Nil- | zero kx2 m1 = intersectBM l1- | otherwise = intersectBM r1- intersectBM (Tip kx1 bm1) | kx1 == kx2 = tip kx1 (bm1 .&. bm2)- | otherwise = Nil- intersectBM Nil = Nil--intersection (Bin _ _ _ _) Nil = Nil--intersection (Tip kx1 bm1) t2 = intersectBM t2- where intersectBM (Bin p2 m2 l2 r2) | nomatch kx1 p2 m2 = Nil- | zero kx1 m2 = intersectBM l2- | otherwise = intersectBM r2- intersectBM (Tip kx2 bm2) | kx1 == kx2 = tip kx1 (bm1 .&. bm2)- | otherwise = Nil- intersectBM Nil = Nil--intersection Nil _ = Nil--{--------------------------------------------------------------------- Subset---------------------------------------------------------------------}--- | \(O(n+m)\). Is this a proper subset? (ie. a subset but not equal).-isProperSubsetOf :: Word64Set -> Word64Set -> Bool-isProperSubsetOf t1 t2- = case subsetCmp t1 t2 of- LT -> True- _ -> False--subsetCmp :: Word64Set -> Word64Set -> Ordering-subsetCmp t1@(Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)- | shorter m1 m2 = GT- | shorter m2 m1 = case subsetCmpLt of- GT -> GT- _ -> LT- | p1 == p2 = subsetCmpEq- | otherwise = GT -- disjoint- where- subsetCmpLt | nomatch p1 p2 m2 = GT- | zero p1 m2 = subsetCmp t1 l2- | otherwise = subsetCmp t1 r2- subsetCmpEq = case (subsetCmp l1 l2, subsetCmp r1 r2) of- (GT,_ ) -> GT- (_ ,GT) -> GT- (EQ,EQ) -> EQ- _ -> LT--subsetCmp (Bin _ _ _ _) _ = GT-subsetCmp (Tip kx1 bm1) (Tip kx2 bm2)- | kx1 /= kx2 = GT -- disjoint- | bm1 == bm2 = EQ- | bm1 .&. complement bm2 == 0 = LT- | otherwise = GT-subsetCmp t1@(Tip kx _) (Bin p m l r)- | nomatch kx p m = GT- | zero kx m = case subsetCmp t1 l of GT -> GT ; _ -> LT- | otherwise = case subsetCmp t1 r of GT -> GT ; _ -> LT-subsetCmp (Tip _ _) Nil = GT -- disjoint-subsetCmp Nil Nil = EQ-subsetCmp Nil _ = LT---- | \(O(n+m)\). Is this a subset?--- @(s1 \`isSubsetOf\` s2)@ tells whether @s1@ is a subset of @s2@.--isSubsetOf :: Word64Set -> Word64Set -> Bool-isSubsetOf t1@(Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)- | shorter m1 m2 = False- | shorter m2 m1 = match p1 p2 m2 && (if zero p1 m2 then isSubsetOf t1 l2- else isSubsetOf t1 r2)- | otherwise = (p1==p2) && isSubsetOf l1 l2 && isSubsetOf r1 r2-isSubsetOf (Bin _ _ _ _) _ = False-isSubsetOf (Tip kx1 bm1) (Tip kx2 bm2) = kx1 == kx2 && bm1 .&. complement bm2 == 0-isSubsetOf t1@(Tip kx _) (Bin p m l r)- | nomatch kx p m = False- | zero kx m = isSubsetOf t1 l- | otherwise = isSubsetOf t1 r-isSubsetOf (Tip _ _) Nil = False-isSubsetOf Nil _ = True---{--------------------------------------------------------------------- Disjoint---------------------------------------------------------------------}--- | \(O(n+m)\). Check whether two sets are disjoint (i.e. their intersection--- is empty).------ > disjoint (fromList [2,4,6]) (fromList [1,3]) == True--- > disjoint (fromList [2,4,6,8]) (fromList [2,3,5,7]) == False--- > disjoint (fromList [1,2]) (fromList [1,2,3,4]) == False--- > disjoint (fromList []) (fromList []) == True------ @since 0.5.11-disjoint :: Word64Set -> Word64Set -> Bool-disjoint t1@(Bin p1 m1 l1 r1) t2@(Bin p2 m2 l2 r2)- | shorter m1 m2 = disjoint1- | shorter m2 m1 = disjoint2- | p1 == p2 = disjoint l1 l2 && disjoint r1 r2- | otherwise = True- where- disjoint1 | nomatch p2 p1 m1 = True- | zero p2 m1 = disjoint l1 t2- | otherwise = disjoint r1 t2-- disjoint2 | nomatch p1 p2 m2 = True- | zero p1 m2 = disjoint t1 l2- | otherwise = disjoint t1 r2--disjoint t1@(Bin _ _ _ _) (Tip kx2 bm2) = disjointBM t1- where disjointBM (Bin p1 m1 l1 r1) | nomatch kx2 p1 m1 = True- | zero kx2 m1 = disjointBM l1- | otherwise = disjointBM r1- disjointBM (Tip kx1 bm1) | kx1 == kx2 = (bm1 .&. bm2) == 0- | otherwise = True- disjointBM Nil = True--disjoint (Bin _ _ _ _) Nil = True--disjoint (Tip kx1 bm1) t2 = disjointBM t2- where disjointBM (Bin p2 m2 l2 r2) | nomatch kx1 p2 m2 = True- | zero kx1 m2 = disjointBM l2- | otherwise = disjointBM r2- disjointBM (Tip kx2 bm2) | kx1 == kx2 = (bm1 .&. bm2) == 0- | otherwise = True- disjointBM Nil = True--disjoint Nil _ = True---{--------------------------------------------------------------------- Filter---------------------------------------------------------------------}--- | \(O(n)\). Filter all elements that satisfy some predicate.-filter :: (Key -> Bool) -> Word64Set -> Word64Set-filter predicate t- = case t of- Bin p m l r- -> bin p m (filter predicate l) (filter predicate r)- Tip kx bm- -> tip kx (foldl'Bits 0 (bitPred kx) 0 bm)- Nil -> Nil- where bitPred kx bm bi | predicate (kx + bi) = bm .|. bitmapOfSuffix bi- | otherwise = bm- {-# INLINE bitPred #-}---- | \(O(n)\). partition the set according to some predicate.-partition :: (Key -> Bool) -> Word64Set -> (Word64Set,Word64Set)-partition predicate0 t0 = toPair $ go predicate0 t0- where- go predicate t- = case t of- Bin p m l r- -> let (l1 :*: l2) = go predicate l- (r1 :*: r2) = go predicate r- in bin p m l1 r1 :*: bin p m l2 r2- Tip kx bm- -> let bm1 = foldl'Bits 0 (bitPred kx) 0 bm- in tip kx bm1 :*: tip kx (bm `xor` bm1)- Nil -> (Nil :*: Nil)- where bitPred kx bm bi | predicate (kx + bi) = bm .|. bitmapOfSuffix bi- | otherwise = bm- {-# INLINE bitPred #-}---- | \(O(\min(n,W))\). Take while a predicate on the elements holds.--- The user is responsible for ensuring that for all @Int@s, @j \< k ==\> p j \>= p k@.--- See note at 'spanAntitone'.------ @--- takeWhileAntitone p = 'fromDistinctAscList' . 'Data.List.takeWhile' p . 'toList'--- takeWhileAntitone p = 'filter' p--- @------ @since 0.6.7-takeWhileAntitone :: (Key -> Bool) -> Word64Set -> Word64Set-takeWhileAntitone predicate t =- case t of- Bin p m l r- | m < 0 ->- if predicate 0 -- handle negative numbers.- then bin p m (go predicate l) r- else go predicate r- _ -> go predicate t- where- go predicate' (Bin p m l r)- | predicate' $! p+m = bin p m l (go predicate' r)- | otherwise = go predicate' l- go predicate' (Tip kx bm) = tip kx (takeWhileAntitoneBits kx predicate' bm)- go _ Nil = Nil---- | \(O(\min(n,W))\). Drop while a predicate on the elements holds.--- The user is responsible for ensuring that for all @Int@s, @j \< k ==\> p j \>= p k@.--- See note at 'spanAntitone'.------ @--- dropWhileAntitone p = 'fromDistinctAscList' . 'Data.List.dropWhile' p . 'toList'--- dropWhileAntitone p = 'filter' (not . p)--- @------ @since 0.6.7-dropWhileAntitone :: (Key -> Bool) -> Word64Set -> Word64Set-dropWhileAntitone predicate t =- case t of- Bin p m l r- | m < 0 ->- if predicate 0 -- handle negative numbers.- then go predicate l- else bin p m l (go predicate r)- _ -> go predicate t- where- go predicate' (Bin p m l r)- | predicate' $! p+m = go predicate' r- | otherwise = bin p m (go predicate' l) r- go predicate' (Tip kx bm) = tip kx (bm `xor` takeWhileAntitoneBits kx predicate' bm)- go _ Nil = Nil---- | \(O(\min(n,W))\). Divide a set at the point where a predicate on the elements stops holding.--- The user is responsible for ensuring that for all @Int@s, @j \< k ==\> p j \>= p k@.------ @--- spanAntitone p xs = ('takeWhileAntitone' p xs, 'dropWhileAntitone' p xs)--- spanAntitone p xs = 'partition' p xs--- @------ Note: if @p@ is not actually antitone, then @spanAntitone@ will split the set--- at some /unspecified/ point.------ @since 0.6.7-spanAntitone :: (Key -> Bool) -> Word64Set -> (Word64Set, Word64Set)-spanAntitone predicate t =- case t of- Bin p m l r- | m < 0 ->- if predicate 0 -- handle negative numbers.- then- case go predicate l of- (lt :*: gt) ->- let !lt' = bin p m lt r- in (lt', gt)- else- case go predicate r of- (lt :*: gt) ->- let !gt' = bin p m l gt- in (lt, gt')- _ -> case go predicate t of- (lt :*: gt) -> (lt, gt)- where- go predicate' (Bin p m l r)- | predicate' $! p+m = case go predicate' r of (lt :*: gt) -> bin p m l lt :*: gt- | otherwise = case go predicate' l of (lt :*: gt) -> lt :*: bin p m gt r- go predicate' (Tip kx bm) = let bm' = takeWhileAntitoneBits kx predicate' bm- in (tip kx bm' :*: tip kx (bm `xor` bm'))- go _ Nil = (Nil :*: Nil)---- | \(O(\min(n,W))\). The expression (@'split' x set@) is a pair @(set1,set2)@--- where @set1@ comprises the elements of @set@ less than @x@ and @set2@--- comprises the elements of @set@ greater than @x@.------ > split 3 (fromList [1..5]) == (fromList [1,2], fromList [4,5])-split :: Key -> Word64Set -> (Word64Set,Word64Set)-split x t =- case t of- Bin p m l r- | m < 0 ->- if x >= 0 -- handle negative numbers.- then- case go x l of- (lt :*: gt) ->- let !lt' = bin p m lt r- in (lt', gt)- else- case go x r of- (lt :*: gt) ->- let !gt' = bin p m l gt- in (lt, gt')- _ -> case go x t of- (lt :*: gt) -> (lt, gt)- where- go !x' t'@(Bin p m l r)- | nomatch x' p m = if x' < p then (Nil :*: t') else (t' :*: Nil)- | zero x' m = case go x' l of (lt :*: gt) -> lt :*: bin p m gt r- | otherwise = case go x' r of (lt :*: gt) -> bin p m l lt :*: gt- go x' t'@(Tip kx' bm)- | kx' > x' = (Nil :*: t')- -- equivalent to kx' > prefixOf x'- | kx' < prefixOf x' = (t' :*: Nil)- | otherwise = tip kx' (bm .&. lowerBitmap) :*: tip kx' (bm .&. higherBitmap)- where lowerBitmap = bitmapOf x' - 1- higherBitmap = complement (lowerBitmap + bitmapOf x')- go _ Nil = (Nil :*: Nil)---- | \(O(\min(n,W))\). Performs a 'split' but also returns whether the pivot--- element was found in the original set.-splitMember :: Key -> Word64Set -> (Word64Set,Bool,Word64Set)-splitMember x t =- case t of- Bin p m l r- | m < 0 ->- if x >= 0 -- handle negative numbers.- then- case go x l of- (lt, fnd, gt) ->- let !lt' = bin p m lt r- in (lt', fnd, gt)- else- case go x r of- (lt, fnd, gt) ->- let !gt' = bin p m l gt- in (lt, fnd, gt')- _ -> go x t- where- go x' t'@(Bin p m l r)- | nomatch x' p m = if x' < p then (Nil, False, t') else (t', False, Nil)- | zero x' m =- case go x' l of- (lt, fnd, gt) ->- let !gt' = bin p m gt r- in (lt, fnd, gt')- | otherwise =- case go x' r of- (lt, fnd, gt) ->- let !lt' = bin p m l lt- in (lt', fnd, gt)- go x' t'@(Tip kx' bm)- | kx' > x' = (Nil, False, t')- -- equivalent to kx' > prefixOf x'- | kx' < prefixOf x' = (t', False, Nil)- | otherwise = let !lt = tip kx' (bm .&. lowerBitmap)- !found = (bm .&. bitmapOfx') /= 0- !gt = tip kx' (bm .&. higherBitmap)- in (lt, found, gt)- where bitmapOfx' = bitmapOf x'- lowerBitmap = bitmapOfx' - 1- higherBitmap = complement (lowerBitmap + bitmapOfx')- go _ Nil = (Nil, False, Nil)--{----------------------------------------------------------------------- Min/Max-----------------------------------------------------------------------}---- | \(O(\min(n,W))\). Retrieves the maximal key of the set, and the set--- stripped of that element, or 'Nothing' if passed an empty set.-maxView :: Word64Set -> Maybe (Key, Word64Set)-maxView t =- case t of Nil -> Nothing- Bin p m l r | m < 0 -> case go l of (result, l') -> Just (result, bin p m l' r)- _ -> Just (go t)- where- go (Bin p m l r) = case go r of (result, r') -> (result, bin p m l r')- go (Tip kx bm) = case highestBitSet bm of bi -> (kx + bi, tip kx (bm .&. complement (bitmapOfSuffix bi)))- go Nil = error "maxView Nil"---- | \(O(\min(n,W))\). Retrieves the minimal key of the set, and the set--- stripped of that element, or 'Nothing' if passed an empty set.-minView :: Word64Set -> Maybe (Key, Word64Set)-minView t =- case t of Nil -> Nothing- Bin p m l r | m < 0 -> case go r of (result, r') -> Just (result, bin p m l r')- _ -> Just (go t)- where- go (Bin p m l r) = case go l of (result, l') -> (result, bin p m l' r)- go (Tip kx bm) = case lowestBitSet bm of bi -> (kx + bi, tip kx (bm .&. complement (bitmapOfSuffix bi)))- go Nil = error "minView Nil"---- | \(O(\min(n,W))\). Delete and find the minimal element.------ > deleteFindMin set = (findMin set, deleteMin set)-deleteFindMin :: Word64Set -> (Key, Word64Set)-deleteFindMin = fromMaybe (error "deleteFindMin: empty set has no minimal element") . minView---- | \(O(\min(n,W))\). Delete and find the maximal element.------ > deleteFindMax set = (findMax set, deleteMax set)-deleteFindMax :: Word64Set -> (Key, Word64Set)-deleteFindMax = fromMaybe (error "deleteFindMax: empty set has no maximal element") . maxView----- | \(O(\min(n,W))\). The minimal element of the set.-findMin :: Word64Set -> Key-findMin Nil = error "findMin: empty set has no minimal element"-findMin (Tip kx bm) = kx + lowestBitSet bm-findMin (Bin _ m l r)- | m < 0 = find r- | otherwise = find l- where find (Tip kx bm) = kx + lowestBitSet bm- find (Bin _ _ l' _) = find l'- find Nil = error "findMin Nil"---- | \(O(\min(n,W))\). The maximal element of a set.-findMax :: Word64Set -> Key-findMax Nil = error "findMax: empty set has no maximal element"-findMax (Tip kx bm) = kx + highestBitSet bm-findMax (Bin _ m l r)- | m < 0 = find l- | otherwise = find r- where find (Tip kx bm) = kx + highestBitSet bm- find (Bin _ _ _ r') = find r'- find Nil = error "findMax Nil"----- | \(O(\min(n,W))\). Delete the minimal element. Returns an empty set if the set is empty.------ Note that this is a change of behaviour for consistency with 'Data.Set.Set' –--- versions prior to 0.5 threw an error if the 'Word64Set' was already empty.-deleteMin :: Word64Set -> Word64Set-deleteMin = maybe Nil snd . minView---- | \(O(\min(n,W))\). Delete the maximal element. Returns an empty set if the set is empty.------ Note that this is a change of behaviour for consistency with 'Data.Set.Set' –--- versions prior to 0.5 threw an error if the 'Word64Set' was already empty.-deleteMax :: Word64Set -> Word64Set-deleteMax = maybe Nil snd . maxView--{----------------------------------------------------------------------- Map-----------------------------------------------------------------------}---- | \(O(n \min(n,W))\).--- @'map' f s@ is the set obtained by applying @f@ to each element of @s@.------ It's worth noting that the size of the result may be smaller if,--- for some @(x,y)@, @x \/= y && f x == f y@--map :: (Key -> Key) -> Word64Set -> Word64Set-map f = fromList . List.map f . toList---- | \(O(n)\). The------ @'mapMonotonic' f s == 'map' f s@, but works only when @f@ is strictly increasing.--- /The precondition is not checked./--- Semi-formally, we have:------ > and [x < y ==> f x < f y | x <- ls, y <- ls]--- > ==> mapMonotonic f s == map f s--- > where ls = toList s------ @since 0.6.3.1---- Note that for now the test is insufficient to support any fancier implementation.-mapMonotonic :: (Key -> Key) -> Word64Set -> Word64Set-mapMonotonic f = fromDistinctAscList . List.map f . toAscList---{--------------------------------------------------------------------- Fold---------------------------------------------------------------------}--- | \(O(n)\). Fold the elements in the set using the given right-associative--- binary operator. This function is an equivalent of 'foldr' and is present--- for compatibility only.------ /Please note that fold will be deprecated in the future and removed./-fold :: (Key -> b -> b) -> b -> Word64Set -> b-fold = foldr-{-# INLINE fold #-}---- | \(O(n)\). Fold the elements in the set using the given right-associative--- binary operator, such that @'foldr' f z == 'Prelude.foldr' f z . 'toAscList'@.------ For example,------ > toAscList set = foldr (:) [] set-foldr :: (Key -> b -> b) -> b -> Word64Set -> b-foldr f z = \t -> -- Use lambda t to be inlinable with two arguments only.- case t of Bin _ m l r | m < 0 -> go (go z l) r -- put negative numbers before- | otherwise -> go (go z r) l- _ -> go z t- where- go z' Nil = z'- go z' (Tip kx bm) = foldrBits kx f z' bm- go z' (Bin _ _ l r) = go (go z' r) l-{-# INLINE foldr #-}---- | \(O(n)\). A strict version of 'foldr'. Each application of the operator is--- evaluated before using the result in the next application. This--- function is strict in the starting value.-foldr' :: (Key -> b -> b) -> b -> Word64Set -> b-foldr' f z = \t -> -- Use lambda t to be inlinable with two arguments only.- case t of Bin _ m l r | m < 0 -> go (go z l) r -- put negative numbers before- | otherwise -> go (go z r) l- _ -> go z t- where- go !z' Nil = z'- go z' (Tip kx bm) = foldr'Bits kx f z' bm- go z' (Bin _ _ l r) = go (go z' r) l-{-# INLINE foldr' #-}---- | \(O(n)\). Fold the elements in the set using the given left-associative--- binary operator, such that @'foldl' f z == 'Prelude.foldl' f z . 'toAscList'@.------ For example,------ > toDescList set = foldl (flip (:)) [] set-foldl :: (a -> Key -> a) -> a -> Word64Set -> a-foldl f z = \t -> -- Use lambda t to be inlinable with two arguments only.- case t of Bin _ m l r | m < 0 -> go (go z r) l -- put negative numbers before- | otherwise -> go (go z l) r- _ -> go z t- where- go z' Nil = z'- go z' (Tip kx bm) = foldlBits kx f z' bm- go z' (Bin _ _ l r) = go (go z' l) r-{-# INLINE foldl #-}---- | \(O(n)\). A strict version of 'foldl'. Each application of the operator is--- evaluated before using the result in the next application. This--- function is strict in the starting value.-foldl' :: (a -> Key -> a) -> a -> Word64Set -> a-foldl' f z = \t -> -- Use lambda t to be inlinable with two arguments only.- case t of Bin _ m l r | m < 0 -> go (go z r) l -- put negative numbers before- | otherwise -> go (go z l) r- _ -> go z t- where- go !z' Nil = z'- go z' (Tip kx bm) = foldl'Bits kx f z' bm- go z' (Bin _ _ l r) = go (go z' l) r-{-# INLINE foldl' #-}--{--------------------------------------------------------------------- List variations---------------------------------------------------------------------}--- | \(O(n)\). An alias of 'toAscList'. The elements of a set in ascending order.--- Subject to list fusion.-elems :: Word64Set -> [Key]-elems- = toAscList--{--------------------------------------------------------------------- Lists---------------------------------------------------------------------}--#ifdef __GLASGOW_HASKELL__--- | @since 0.5.6.2-instance GHC.Exts.IsList Word64Set where- type Item Word64Set = Key- fromList = fromList- toList = toList-#endif---- | \(O(n)\). Convert the set to a list of elements. Subject to list fusion.-toList :: Word64Set -> [Key]-toList- = toAscList---- | \(O(n)\). Convert the set to an ascending list of elements. Subject to list--- fusion.-toAscList :: Word64Set -> [Key]-toAscList = foldr (:) []---- | \(O(n)\). Convert the set to a descending list of elements. Subject to list--- fusion.-toDescList :: Word64Set -> [Key]-toDescList = foldl (flip (:)) []---- List fusion for the list generating functions.-#if __GLASGOW_HASKELL__--- The foldrFB and foldlFB are foldr and foldl equivalents, used for list fusion.--- They are important to convert unfused to{Asc,Desc}List back, see mapFB in prelude.-foldrFB :: (Key -> b -> b) -> b -> Word64Set -> b-foldrFB = foldr-{-# INLINE[0] foldrFB #-}-foldlFB :: (a -> Key -> a) -> a -> Word64Set -> a-foldlFB = foldl-{-# INLINE[0] foldlFB #-}---- Inline elems and toList, so that we need to fuse only toAscList.-{-# INLINE elems #-}-{-# INLINE toList #-}---- The fusion is enabled up to phase 2 included. If it does not succeed,--- convert in phase 1 the expanded to{Asc,Desc}List calls back to--- to{Asc,Desc}List. In phase 0, we inline fold{lr}FB (which were used in--- a list fusion, otherwise it would go away in phase 1), and let compiler do--- whatever it wants with to{Asc,Desc}List -- it was forbidden to inline it--- before phase 0, otherwise the fusion rules would not fire at all.-{-# NOINLINE[0] toAscList #-}-{-# NOINLINE[0] toDescList #-}-{-# RULES "Word64Set.toAscList" [~1] forall s . toAscList s = GHC.Exts.build (\c n -> foldrFB c n s) #-}-{-# RULES "Word64Set.toAscListBack" [1] foldrFB (:) [] = toAscList #-}-{-# RULES "Word64Set.toDescList" [~1] forall s . toDescList s = GHC.Exts.build (\c n -> foldlFB (\xs x -> c x xs) n s) #-}-{-# RULES "Word64Set.toDescListBack" [1] foldlFB (\xs x -> x : xs) [] = toDescList #-}-#endif----- | \(O(n \min(n,W))\). Create a set from a list of integers.-fromList :: [Key] -> Word64Set-fromList xs- = Foldable.foldl' ins empty xs- where- ins t x = insert x t---- | \(O(n)\). Build a set from an ascending list of elements.--- /The precondition (input list is ascending) is not checked./-fromAscList :: [Key] -> Word64Set-fromAscList = fromMonoList-{-# NOINLINE fromAscList #-}---- | \(O(n)\). Build a set from an ascending list of distinct elements.--- /The precondition (input list is strictly ascending) is not checked./-fromDistinctAscList :: [Key] -> Word64Set-fromDistinctAscList = fromAscList-{-# INLINE fromDistinctAscList #-}---- | \(O(n)\). Build a set from a monotonic list of elements.------ The precise conditions under which this function works are subtle:--- For any branch mask, keys with the same prefix w.r.t. the branch--- mask must occur consecutively in the list.-fromMonoList :: [Key] -> Word64Set-fromMonoList [] = Nil-fromMonoList (kx : zs1) = addAll' (prefixOf kx) (bitmapOf kx) zs1- where- -- `addAll'` collects all keys with the prefix `px` into a single- -- bitmap, and then proceeds with `addAll`.- addAll' !px !bm []- = Tip px bm- addAll' !px !bm (ky : zs)- | px == prefixOf ky- = addAll' px (bm .|. bitmapOf ky) zs- -- inlined: | otherwise = addAll px (Tip px bm) (ky : zs)- | py <- prefixOf ky- , m <- branchMask px py- , Inserted ty zs' <- addMany' m py (bitmapOf ky) zs- = addAll px (linkWithMask m py ty {-px-} (Tip px bm)) zs'-- -- for `addAll` and `addMany`, px is /a/ prefix inside the tree `tx`- -- `addAll` consumes the rest of the list, adding to the tree `tx`- addAll !_px !tx []- = tx- addAll !px !tx (ky : zs)- | py <- prefixOf ky- , m <- branchMask px py- , Inserted ty zs' <- addMany' m py (bitmapOf ky) zs- = addAll px (linkWithMask m py ty {-px-} tx) zs'-- -- `addMany'` is similar to `addAll'`, but proceeds with `addMany'`.- addMany' !_m !px !bm []- = Inserted (Tip px bm) []- addMany' !m !px !bm zs0@(ky : zs)- | px == prefixOf ky- = addMany' m px (bm .|. bitmapOf ky) zs- -- inlined: | otherwise = addMany m px (Tip px bm) (ky : zs)- | mask px m /= mask ky m- = Inserted (Tip (prefixOf px) bm) zs0- | py <- prefixOf ky- , mxy <- branchMask px py- , Inserted ty zs' <- addMany' mxy py (bitmapOf ky) zs- = addMany m px (linkWithMask mxy py ty {-px-} (Tip px bm)) zs'-- -- `addAll` adds to `tx` all keys whose prefix w.r.t. `m` agrees with `px`.- addMany !_m !_px tx []- = Inserted tx []- addMany !m !px tx zs0@(ky : zs)- | mask px m /= mask ky m- = Inserted tx zs0- | py <- prefixOf ky- , mxy <- branchMask px py- , Inserted ty zs' <- addMany' mxy py (bitmapOf ky) zs- = addMany m px (linkWithMask mxy py ty {-px-} tx) zs'-{-# INLINE fromMonoList #-}--data Inserted = Inserted !Word64Set ![Key]--{--------------------------------------------------------------------- Eq---------------------------------------------------------------------}-instance Eq Word64Set where- t1 == t2 = equal t1 t2- t1 /= t2 = nequal t1 t2--equal :: Word64Set -> Word64Set -> Bool-equal (Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)- = (m1 == m2) && (p1 == p2) && (equal l1 l2) && (equal r1 r2)-equal (Tip kx1 bm1) (Tip kx2 bm2)- = kx1 == kx2 && bm1 == bm2-equal Nil Nil = True-equal _ _ = False--nequal :: Word64Set -> Word64Set -> Bool-nequal (Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)- = (m1 /= m2) || (p1 /= p2) || (nequal l1 l2) || (nequal r1 r2)-nequal (Tip kx1 bm1) (Tip kx2 bm2)- = kx1 /= kx2 || bm1 /= bm2-nequal Nil Nil = False-nequal _ _ = True--{--------------------------------------------------------------------- Ord---------------------------------------------------------------------}--instance Ord Word64Set where- compare s1 s2 = compare (toAscList s1) (toAscList s2)- -- tentative implementation. See if more efficient exists.--{--------------------------------------------------------------------- Show---------------------------------------------------------------------}-instance Show Word64Set where- showsPrec p xs = showParen (p > 10) $- showString "fromList " . shows (toList xs)--{--------------------------------------------------------------------- Read---------------------------------------------------------------------}-instance Read Word64Set where-#ifdef __GLASGOW_HASKELL__- readPrec = parens $ prec 10 $ do- Ident "fromList" <- lexP- xs <- readPrec- return (fromList xs)-- readListPrec = readListPrecDefault-#else- readsPrec p = readParen (p > 10) $ \ r -> do- ("fromList",s) <- lex r- (xs,t) <- reads s- return (fromList xs,t)-#endif--{--------------------------------------------------------------------- NFData---------------------------------------------------------------------}---- The Word64Set constructors consist only of strict fields of Ints and--- Word64Sets, thus the default NFData instance which evaluates to whnf--- should suffice-instance NFData Word64Set where rnf x = seq x ()--{--------------------------------------------------------------------- Debugging---------------------------------------------------------------------}--- | \(O(n \min(n,W))\). Show the tree that implements the set. The tree is shown--- in a compressed, hanging format.-showTree :: Word64Set -> String-showTree s- = showTreeWith True False s---{- | \(O(n \min(n,W))\). The expression (@'showTreeWith' hang wide map@) shows- the tree that implements the set. If @hang@ is- 'True', a /hanging/ tree is shown otherwise a rotated tree is shown. If- @wide@ is 'True', an extra wide version is shown.--}-showTreeWith :: Bool -> Bool -> Word64Set -> String-showTreeWith hang wide t- | hang = (showsTreeHang wide [] t) ""- | otherwise = (showsTree wide [] [] t) ""--showsTree :: Bool -> [String] -> [String] -> Word64Set -> ShowS-showsTree wide lbars rbars t- = case t of- Bin p m l r- -> showsTree wide (withBar rbars) (withEmpty rbars) r .- showWide wide rbars .- showsBars lbars . showString (showBin p m) . showString "\n" .- showWide wide lbars .- showsTree wide (withEmpty lbars) (withBar lbars) l- Tip kx bm- -> showsBars lbars . showString " " . shows kx . showString " + " .- showsBitMap bm . showString "\n"- Nil -> showsBars lbars . showString "|\n"--showsTreeHang :: Bool -> [String] -> Word64Set -> ShowS-showsTreeHang wide bars t- = case t of- Bin p m l r- -> showsBars bars . showString (showBin p m) . showString "\n" .- showWide wide bars .- showsTreeHang wide (withBar bars) l .- showWide wide bars .- showsTreeHang wide (withEmpty bars) r- Tip kx bm- -> showsBars bars . showString " " . shows kx . showString " + " .- showsBitMap bm . showString "\n"- Nil -> showsBars bars . showString "|\n"--showBin :: Prefix -> Mask -> String-showBin _ _- = "*" -- ++ show (p,m)--showWide :: Bool -> [String] -> String -> String-showWide wide bars- | wide = showString (concat (reverse bars)) . showString "|\n"- | otherwise = id--showsBars :: [String] -> ShowS-showsBars [] = id-showsBars (_ : tl) = showString (concat (reverse tl)) . showString node--showsBitMap :: Word64 -> ShowS-showsBitMap = showString . showBitMap--showBitMap :: Word64 -> String-showBitMap w = show $ foldrBits 0 (:) [] w--node :: String-node = "+--"--withBar, withEmpty :: [String] -> [String]-withBar bars = "| ":bars-withEmpty bars = " ":bars---{--------------------------------------------------------------------- Helpers---------------------------------------------------------------------}-{--------------------------------------------------------------------- Link---------------------------------------------------------------------}-link :: Prefix -> Word64Set -> Prefix -> Word64Set -> Word64Set-link p1 t1 p2 t2 = linkWithMask (branchMask p1 p2) p1 t1 {-p2-} t2-{-# INLINE link #-}---- `linkWithMask` is useful when the `branchMask` has already been computed-linkWithMask :: Mask -> Prefix -> Word64Set -> Word64Set -> Word64Set-linkWithMask m p1 t1 {-p2-} t2- | zero p1 m = Bin p m t1 t2- | otherwise = Bin p m t2 t1- where- p = mask p1 m-{-# INLINE linkWithMask #-}--{--------------------------------------------------------------------- @bin@ assures that we never have empty trees within a tree.---------------------------------------------------------------------}-bin :: Prefix -> Mask -> Word64Set -> Word64Set -> Word64Set-bin _ _ l Nil = l-bin _ _ Nil r = r-bin p m l r = Bin p m l r-{-# INLINE bin #-}--{--------------------------------------------------------------------- @tip@ assures that we never have empty bitmaps within a tree.---------------------------------------------------------------------}-tip :: Prefix -> BitMap -> Word64Set-tip _ 0 = Nil-tip kx bm = Tip kx bm-{-# INLINE tip #-}---{----------------------------------------------------------------------- Functions that generate Prefix and BitMap of a Key or a Suffix.-----------------------------------------------------------------------}--suffixBitMask :: Word64-suffixBitMask = fromIntegral (finiteBitSize (undefined::Word64)) - 1-{-# INLINE suffixBitMask #-}--prefixBitMask :: Word64-prefixBitMask = complement suffixBitMask-{-# INLINE prefixBitMask #-}--prefixOf :: Word64 -> Prefix-prefixOf x = x .&. prefixBitMask-{-# INLINE prefixOf #-}--suffixOf :: Word64 -> Word64-suffixOf x = x .&. suffixBitMask-{-# INLINE suffixOf #-}--bitmapOfSuffix :: Word64 -> BitMap-bitmapOfSuffix s = 1 `shiftLL` fromIntegral s-{-# INLINE bitmapOfSuffix #-}--bitmapOf :: Word64 -> BitMap-bitmapOf x = bitmapOfSuffix (suffixOf x)-{-# INLINE bitmapOf #-}---{--------------------------------------------------------------------- Endian independent bit twiddling---------------------------------------------------------------------}--- Returns True iff the bits set in i and the Mask m are disjoint.-zero :: Word64 -> Mask -> Bool-zero i m- = (natFromInt i) .&. (natFromInt m) == 0-{-# INLINE zero #-}--nomatch,match :: Word64 -> Prefix -> Mask -> Bool-nomatch i p m- = (mask i m) /= p-{-# INLINE nomatch #-}--match i p m- = (mask i m) == p-{-# INLINE match #-}---- Suppose a is largest such that 2^a divides 2*m.--- Then mask i m is i with the low a bits zeroed out.-mask :: Word64 -> Mask -> Prefix-mask i m- = maskW (natFromInt i) (natFromInt m)-{-# INLINE mask #-}--{--------------------------------------------------------------------- Big endian operations---------------------------------------------------------------------}-maskW :: Nat -> Nat -> Prefix-maskW i m- = intFromNat (i .&. (complement (m-1) `xor` m))-{-# INLINE maskW #-}--shorter :: Mask -> Mask -> Bool-shorter m1 m2- = (natFromInt m1) > (natFromInt m2)-{-# INLINE shorter #-}--branchMask :: Prefix -> Prefix -> Mask-branchMask p1 p2- = intFromNat (highestBitMask (natFromInt p1 `xor` natFromInt p2))-{-# INLINE branchMask #-}--{----------------------------------------------------------------------- To get best performance, we provide fast implementations of- lowestBitSet, highestBitSet and fold[lr][l]Bits for GHC.- If the intel bsf and bsr instructions ever become GHC primops,- this code should be reimplemented using these.-- Performance of this code is crucial for folds, toList, filter, partition.-- The signatures of methods in question are placed after this comment.-----------------------------------------------------------------------}--lowestBitSet :: Nat -> Word64-highestBitSet :: Nat -> Word64-foldlBits :: Word64 -> (a -> Word64 -> a) -> a -> Nat -> a-foldl'Bits :: Word64 -> (a -> Word64 -> a) -> a -> Nat -> a-foldrBits :: Word64 -> (Word64 -> a -> a) -> a -> Nat -> a-foldr'Bits :: Word64 -> (Word64 -> a -> a) -> a -> Nat -> a-takeWhileAntitoneBits :: Word64 -> (Word64 -> Bool) -> Nat -> Nat--{-# INLINE lowestBitSet #-}-{-# INLINE highestBitSet #-}-{-# INLINE foldlBits #-}-{-# INLINE foldl'Bits #-}-{-# INLINE foldrBits #-}-{-# INLINE foldr'Bits #-}-{-# INLINE takeWhileAntitoneBits #-}--#if defined(__GLASGOW_HASKELL__)-indexOfTheOnlyBit :: Nat -> Word64-{-# INLINE indexOfTheOnlyBit #-}-indexOfTheOnlyBit bitmask = fromIntegral $ countTrailingZeros bitmask--lowestBitSet x = fromIntegral $ countTrailingZeros x--highestBitSet x = fromIntegral $ 63 - countLeadingZeros x--lowestBitMask :: Nat -> Nat-lowestBitMask x = x .&. negate x-{-# INLINE lowestBitMask #-}---- Reverse the order of bits in the Nat.-revNat :: Nat -> Nat-revNat x1 = case ((x1 `shiftRL` 1) .&. 0x5555555555555555) .|. ((x1 .&. 0x5555555555555555) `shiftLL` 1) of- x2 -> case ((x2 `shiftRL` 2) .&. 0x3333333333333333) .|. ((x2 .&. 0x3333333333333333) `shiftLL` 2) of- x3 -> case ((x3 `shiftRL` 4) .&. 0x0F0F0F0F0F0F0F0F) .|. ((x3 .&. 0x0F0F0F0F0F0F0F0F) `shiftLL` 4) of- x4 -> case ((x4 `shiftRL` 8) .&. 0x00FF00FF00FF00FF) .|. ((x4 .&. 0x00FF00FF00FF00FF) `shiftLL` 8) of- x5 -> case ((x5 `shiftRL` 16) .&. 0x0000FFFF0000FFFF) .|. ((x5 .&. 0x0000FFFF0000FFFF) `shiftLL` 16) of- x6 -> ( x6 `shiftRL` 32 ) .|. ( x6 `shiftLL` 32);--foldlBits prefix f z bitmap = go bitmap z- where go 0 acc = acc- go bm acc = go (bm `xor` bitmask) ((f acc) $! (prefix+bi))- where- !bitmask = lowestBitMask bm- !bi = indexOfTheOnlyBit bitmask--foldl'Bits prefix f z bitmap = go bitmap z- where go 0 acc = acc- go bm !acc = go (bm `xor` bitmask) ((f acc) $! (prefix+bi))- where !bitmask = lowestBitMask bm- !bi = indexOfTheOnlyBit bitmask--foldrBits prefix f z bitmap = go (revNat bitmap) z- where go 0 acc = acc- go bm acc = go (bm `xor` bitmask) ((f $! (prefix+63-bi)) acc)- where !bitmask = lowestBitMask bm- !bi = indexOfTheOnlyBit bitmask---foldr'Bits prefix f z bitmap = go (revNat bitmap) z- where go 0 acc = acc- go bm !acc = go (bm `xor` bitmask) ((f $! (prefix+63-bi)) acc)- where !bitmask = lowestBitMask bm- !bi = indexOfTheOnlyBit bitmask--takeWhileAntitoneBits prefix predicate bitmap =- -- Binary search for the first index where the predicate returns false, but skip a predicate- -- call if the high half of the current range is empty. This ensures- -- min (log2 64 + 1 = 7) (popcount bitmap) predicate calls.- let next d h (n',b') =- if n' .&. h /= 0 && (predicate $! prefix + fromIntegral (b'+d)) then (n' `shiftRL` d, b'+d) else (n',b')- {-# INLINE next #-}- (_,b) = next 1 0x2 $- next 2 0xC $- next 4 0xF0 $- next 8 0xFF00 $- next 16 0xFFFF0000 $- next 32 0xFFFFFFFF00000000 $- (bitmap,0)- m = if b /= 0 || (bitmap .&. 0x1 /= 0 && predicate prefix)- then ((2 `shiftLL` b) - 1)- else ((1 `shiftLL` b) - 1)- in bitmap .&. m--#else-{----------------------------------------------------------------------- In general case we use logarithmic implementation of- lowestBitSet and highestBitSet, which works up to bit sizes of 64.-- Folds are linear scans.-----------------------------------------------------------------------}--lowestBitSet n0 =- let (n1,b1) = if n0 .&. 0xFFFFFFFF /= 0 then (n0,0) else (n0 `shiftRL` 32, 32)- (n2,b2) = if n1 .&. 0xFFFF /= 0 then (n1,b1) else (n1 `shiftRL` 16, 16+b1)- (n3,b3) = if n2 .&. 0xFF /= 0 then (n2,b2) else (n2 `shiftRL` 8, 8+b2)- (n4,b4) = if n3 .&. 0xF /= 0 then (n3,b3) else (n3 `shiftRL` 4, 4+b3)- (n5,b5) = if n4 .&. 0x3 /= 0 then (n4,b4) else (n4 `shiftRL` 2, 2+b4)- b6 = if n5 .&. 0x1 /= 0 then b5 else 1+b5- in b6--highestBitSet n0 =- let (n1,b1) = if n0 .&. 0xFFFFFFFF00000000 /= 0 then (n0 `shiftRL` 32, 32) else (n0,0)- (n2,b2) = if n1 .&. 0xFFFF0000 /= 0 then (n1 `shiftRL` 16, 16+b1) else (n1,b1)- (n3,b3) = if n2 .&. 0xFF00 /= 0 then (n2 `shiftRL` 8, 8+b2) else (n2,b2)- (n4,b4) = if n3 .&. 0xF0 /= 0 then (n3 `shiftRL` 4, 4+b3) else (n3,b3)- (n5,b5) = if n4 .&. 0xC /= 0 then (n4 `shiftRL` 2, 2+b4) else (n4,b4)- b6 = if n5 .&. 0x2 /= 0 then 1+b5 else b5- in b6--foldlBits prefix f z bm = let lb = lowestBitSet bm- in go (prefix+lb) z (bm `shiftRL` lb)- where go !_ acc 0 = acc- go bi acc n | n `testBit` 0 = go (bi + 1) (f acc bi) (n `shiftRL` 1)- | otherwise = go (bi + 1) acc (n `shiftRL` 1)--foldl'Bits prefix f z bm = let lb = lowestBitSet bm- in go (prefix+lb) z (bm `shiftRL` lb)- where go !_ !acc 0 = acc- go bi acc n | n `testBit` 0 = go (bi + 1) (f acc bi) (n `shiftRL` 1)- | otherwise = go (bi + 1) acc (n `shiftRL` 1)--foldrBits prefix f z bm = let lb = lowestBitSet bm- in go (prefix+lb) (bm `shiftRL` lb)- where go !_ 0 = z- go bi n | n `testBit` 0 = f bi (go (bi + 1) (n `shiftRL` 1))- | otherwise = go (bi + 1) (n `shiftRL` 1)--foldr'Bits prefix f z bm = let lb = lowestBitSet bm- in go (prefix+lb) (bm `shiftRL` lb)- where- go !_ 0 = z- go bi n | n `testBit` 0 = f bi $! go (bi + 1) (n `shiftRL` 1)- | otherwise = go (bi + 1) (n `shiftRL` 1)--takeWhileAntitoneBits prefix predicate = foldl'Bits prefix f 0 -- Does not use antitone property- where- f acc bi | predicate bi = acc .|. bitmapOf bi- | otherwise = acc--#endif---{--------------------------------------------------------------------- Utilities---------------------------------------------------------------------}---- | \(O(1)\). Decompose a set into pieces based on the structure of the underlying--- tree. This function is useful for consuming a set in parallel.------ No guarantee is made as to the sizes of the pieces; an internal, but--- deterministic process determines this. However, it is guaranteed that the--- pieces returned will be in ascending order (all elements in the first submap--- less than all elements in the second, and so on).------ Examples:------ > splitRoot (fromList [1..120]) == [fromList [1..63],fromList [64..120]]--- > splitRoot empty == []------ Note that the current implementation does not return more than two subsets,--- but you should not depend on this behaviour because it can change in the--- future without notice. Also, the current version does not continue--- splitting all the way to individual singleton sets -- it stops at some--- point.-splitRoot :: Word64Set -> [Word64Set]-splitRoot Nil = []--- NOTE: we don't currently split below Tip, but we could.-splitRoot x@(Tip _ _) = [x]-splitRoot (Bin _ m l r) | m < 0 = [r, l]- | otherwise = [l, r]-{-# INLINE splitRoot #-}
GHC/Driver/Backend.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE MultiWayIf #-}+{-# LANGUAGE MultiWayIf, LambdaCase #-} {-| Module : GHC.Driver.Backend@@ -87,7 +87,7 @@ , backendUnregisterisedAbiOnly , backendGeneratesHc , backendSptIsDynamic- , backendWantsBreakpointTicks+ , backendSupportsBreakpoints , backendForcesOptimization0 , backendNeedsFullWays , backendSpecialModuleSource@@ -551,17 +551,14 @@ -- | This back end wants the `mi_globals` field of a -- `ModIface` to be populated (with the top-level bindings--- of the original source). True for the interpreter, and--- also true for "no backend", which is used by Haddock.--- (After typechecking a module, Haddock wants access to--- the module's `GlobalRdrEnv`.)+-- of the original source). Only true for the interpreter. backendWantsGlobalBindings :: Backend -> Bool backendWantsGlobalBindings (Named NCG) = False backendWantsGlobalBindings (Named LLVM) = False backendWantsGlobalBindings (Named ViaC) = False backendWantsGlobalBindings (Named JavaScript) = False+backendWantsGlobalBindings (Named NoBackend) = False backendWantsGlobalBindings (Named Interpreter) = True-backendWantsGlobalBindings (Named NoBackend) = True -- | The back end targets a technology that implements -- `switch` natively. (For example, LLVM or C.) Therefore@@ -691,16 +688,16 @@ backendSptIsDynamic (Named Interpreter) = True backendSptIsDynamic (Named NoBackend) = False --- | If this flag is set, then "GHC.HsToCore.Ticks"--- inserts `Breakpoint` ticks. Used only for the--- interpreter.-backendWantsBreakpointTicks :: Backend -> Bool-backendWantsBreakpointTicks (Named NCG) = False-backendWantsBreakpointTicks (Named LLVM) = False-backendWantsBreakpointTicks (Named ViaC) = False-backendWantsBreakpointTicks (Named JavaScript) = False-backendWantsBreakpointTicks (Named Interpreter) = True-backendWantsBreakpointTicks (Named NoBackend) = False+-- | If this flag is unset, then the driver ignores the flag @-fbreak-points@,+-- since backends other than the interpreter tend to panic on breakpoints.+backendSupportsBreakpoints :: Backend -> Bool+backendSupportsBreakpoints = \case+ Named NCG -> False+ Named LLVM -> False+ Named ViaC -> False+ Named JavaScript -> False+ Named Interpreter -> True+ Named NoBackend -> False -- | If this flag is set, then the driver forces the -- optimization level to 0, issuing a warning message if
GHC/Driver/Backpack.hs view
@@ -90,6 +90,7 @@ import Data.Map (Map) import qualified Data.Map as Map import qualified Data.Set as Set+import GHC.Types.Error (mkUnknownDiagnostic) -- | Entry point to compile a Backpack file. doBackpack :: [FilePath] -> Ghc ()@@ -108,7 +109,7 @@ liftIO $ checkProcessArgsResult unhandled_flags let print_config = initPrintConfig dflags liftIO $ printOrThrowDiagnostics logger print_config (initDiagOpts dflags) (GhcPsMessage <$> p_warns)- liftIO $ handleFlagWarnings logger print_config (initDiagOpts dflags) warns+ liftIO $ printOrThrowDiagnostics logger print_config (initDiagOpts dflags) (GhcDriverMessage <$> warns) -- TODO: Preprocessing not implemented buf <- liftIO $ hGetStringBuffer src_filename@@ -139,9 +140,9 @@ where cid = hsComponentId (unLoc (hsunitName unit)) reqs = uniqDSetToList (unionManyUniqDSets (map (get_reqs . unLoc) (hsunitBody unit)))- get_reqs (DeclD HsigFile (L _ modname) _) = unitUniqDSet modname get_reqs (DeclD HsSrcFile _ _) = emptyUniqDSet get_reqs (DeclD HsBootFile _ _) = emptyUniqDSet+ get_reqs (DeclD HsigFile (L _ modname) _) = unitUniqDSet modname get_reqs (IncludeD (IncludeDecl (L _ hsuid) _ _)) = unitFreeModuleHoles (convertHsComponentId hsuid) @@ -329,7 +330,7 @@ mod_graph <- hsunitModuleGraph False (unLoc lunit) msg <- mkBackpackMsg- ok <- load' noIfaceCache LoadAllTargets (Just msg) mod_graph+ ok <- load' noIfaceCache LoadAllTargets mkUnknownDiagnostic (Just msg) mod_graph when (failed ok) (liftIO $ exitWith (ExitFailure 1)) let hi_dir = expectJust (panic "hiDir Backpack") $ hiDir dflags@@ -418,7 +419,7 @@ withBkpExeSession deps_w_rns $ do mod_graph <- hsunitModuleGraph True (unLoc lunit) msg <- mkBackpackMsg- ok <- load' noIfaceCache LoadAllTargets (Just msg) mod_graph+ ok <- load' noIfaceCache LoadAllTargets mkUnknownDiagnostic (Just msg) mod_graph when (failed ok) (liftIO $ exitWith (ExitFailure 1)) -- | Register a new virtual unit database containing a single unit@@ -857,9 +858,9 @@ (unpackFS unit_fs </> moduleNameSlashes modname) (case hsc_src of- HsigFile -> "hsig"+ HsigFile -> "hsig" HsBootFile -> "hs-boot"- HsSrcFile -> "hs")+ HsSrcFile -> "hs") -- DANGEROUS: bootifying can POISON the module finder cache let location = case hsc_src of HsBootFile -> addBootSuffixLocnOut location0
GHC/Driver/CmdLine.hs view
@@ -17,7 +17,7 @@ Flag(..), defFlag, defGhcFlag, defGhciFlag, defHiddenFlag, hoistFlag, errorsToGhcException, - Err(..), Warn(..), WarnReason(..),+ Err(..), Warn, warnsToMessages, EwM, runEwM, addErr, addWarn, addFlagWarn, getArg, getCurLoc, liftEwM ) where@@ -25,18 +25,18 @@ import GHC.Prelude import GHC.Utils.Misc-import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Panic.Plain import GHC.Data.Bag import GHC.Types.SrcLoc-import GHC.Utils.Json--import GHC.Types.Error ( DiagnosticReason(..) )+import GHC.Types.Error+import GHC.Utils.Error+import GHC.Driver.Errors.Types+import GHC.Driver.Errors.Ppr ()+import GHC.Utils.Outputable (text) import Data.Function import Data.List (sortBy, intercalate, stripPrefix)-import Data.Word import GHC.ResponseFile import Control.Exception (IOException, catch)@@ -75,7 +75,7 @@ go (OptPrefix k) = OptPrefix (\s -> go2 (k s)) go (OptIntSuffix k) = OptIntSuffix (\n -> go2 (k n)) go (IntSuffix k) = IntSuffix (\n -> go2 (k n))- go (Word64Suffix k) = Word64Suffix (\s -> go2 (k s))+ go (WordSuffix k) = WordSuffix (\s -> go2 (k s)) go (FloatSuffix k) = FloatSuffix (\s -> go2 (k s)) go (PassFlag k) = PassFlag (\s -> go2 (k s)) go (AnySuffix k) = AnySuffix (\s -> go2 (k s))@@ -98,7 +98,7 @@ | OptPrefix (String -> EwM m ()) -- -f or -farg (i.e. the arg is optional) | OptIntSuffix (Maybe Int -> EwM m ()) -- -f or -f=n; pass n to fn | IntSuffix (Int -> EwM m ()) -- -f or -f=n; pass n to fn- | Word64Suffix (Word64 -> EwM m ()) -- -f or -f=n; pass n to fn+ | WordSuffix (Word -> EwM m ()) -- -f or -f=n; pass n to fn | FloatSuffix (Float -> EwM m ()) -- -f or -f=n; pass n to fn | PassFlag (String -> EwM m ()) -- -f; pass "-f" fn | AnySuffix (String -> EwM m ()) -- -f or -farg; pass entire "-farg" to fn@@ -108,32 +108,16 @@ -- The EwM monad -------------------------------------------------------- --- | Used when filtering warnings: if a reason is given--- it can be filtered out when displaying.-data WarnReason- = NoReason- | ReasonDeprecatedFlag- | ReasonUnrecognisedFlag- deriving (Eq, Show)--instance Outputable WarnReason where- ppr = text . show--instance ToJson WarnReason where- json NoReason = JSNull- json reason = JSString $ show reason- -- | A command-line error message newtype Err = Err { errMsg :: Located String } -- | A command-line warning message and the reason it arose-data Warn = Warn- { warnReason :: DiagnosticReason,- warnMsg :: Located String- }+--+-- This used to be own type, but now it's just @'MsgEnvelope' 'DriverMessage'@.+type Warn = Located DriverMessage type Errs = Bag Err-type Warns = Bag Warn+type Warns = [Warn] -- EwM ("errors and warnings monad") is a monad -- transformer for m that adds an (err, warn) state@@ -153,7 +137,7 @@ liftIO = liftEwM . liftIO runEwM :: EwM m a -> m (Errs, Warns, a)-runEwM action = unEwM action (panic "processArgs: no arg yet") emptyBag emptyBag+runEwM action = unEwM action (panic "processArgs: no arg yet") emptyBag mempty setArg :: Located String -> EwM m () -> EwM m () setArg l (EwM f) = EwM (\_ es ws -> f l es ws)@@ -162,11 +146,12 @@ addErr e = EwM (\(L loc _) es ws -> return (es `snocBag` Err (L loc e), ws, ())) addWarn :: Monad m => String -> EwM m ()-addWarn = addFlagWarn WarningWithoutFlag+addWarn msg = addFlagWarn $ DriverUnknownMessage $ mkSimpleUnknownDiagnostic $+ mkPlainDiagnostic WarningWithoutFlag noHints $ text msg -addFlagWarn :: Monad m => DiagnosticReason -> String -> EwM m ()-addFlagWarn reason msg = EwM $- (\(L loc _) es ws -> return (es, ws `snocBag` Warn reason (L loc msg), ()))+addFlagWarn :: Monad m => DriverMessage -> EwM m ()+addFlagWarn msg = EwM+ (\(L loc _) es ws -> return (es, L loc msg : ws, ())) getArg :: Monad m => EwM m String getArg = EwM (\(L _ arg) es ws -> return (es, ws, arg))@@ -177,6 +162,10 @@ liftEwM :: Monad m => m a -> EwM m a liftEwM action = EwM (\_ es ws -> do { r <- action; return (es, ws, r) }) +warnsToMessages :: DiagOpts -> [Warn] -> Messages DriverMessage+warnsToMessages diag_opts = foldr+ (\(L loc w) ws -> addMessage (mkPlainMsgEnvelope diag_opts loc w) ws)+ emptyMessages -------------------------------------------------------- -- Processing arguments@@ -188,10 +177,10 @@ -> (FilePath -> EwM m [Located String]) -- ^ response file handler -> m ( [Located String], -- spare args [Err], -- errors- [Warn] ) -- warnings+ Warns ) -- warnings processArgs spec args handleRespFile = do (errs, warns, spare) <- runEwM action- return (spare, bagToList errs, bagToList warns)+ return (spare, bagToList errs, warns) where action = process args [] @@ -251,7 +240,7 @@ IntSuffix f | Just n <- parseInt rest_no_eq -> Right (f n, args) | otherwise -> Left ("malformed integer argument in " ++ dash_arg) - Word64Suffix f | Just n <- parseWord64 rest_no_eq -> Right (f n, args)+ WordSuffix f | Just n <- parseWord rest_no_eq -> Right (f n, args) | otherwise -> Left ("malformed natural argument in " ++ dash_arg) FloatSuffix f | Just n <- parseFloat rest_no_eq -> Right (f n, args)@@ -280,7 +269,7 @@ -- to improve error message (#12625) arg_ok (OptIntSuffix _) _ _ = True arg_ok (IntSuffix _) _ _ = True-arg_ok (Word64Suffix _) _ _ = True+arg_ok (WordSuffix _) _ _ = True arg_ok (FloatSuffix _) _ _ = True arg_ok (OptPrefix _) _ _ = True arg_ok (PassFlag _) rest _ = null rest@@ -296,8 +285,8 @@ ((n,""):_) -> Just n _ -> Nothing -parseWord64 :: String -> Maybe Word64-parseWord64 s = case reads s of+parseWord :: String -> Maybe Word+parseWord s = case reads s of ((n,""):_) -> Just n _ -> Nothing
GHC/Driver/CodeOutput.hs view
@@ -27,7 +27,7 @@ import GHC.Cmm import GHC.Cmm.CLabel -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Config.Finder ( initFinderOpts ) import GHC.Driver.Config.CmmToAsm ( initNCGConfig ) import GHC.Driver.Config.CmmToLlvm ( initLlvmCgConfig )@@ -105,7 +105,7 @@ (const ()) $ do { case cmmLint (targetPlatform dflags) cmm of Just err -> do { logMsg logger- MCDump+ MCInfo -- See Note [MCInfo for Lint] in "GHC.Core.Lint" noSrcSpan $ withPprStyle defaultDumpStyle err ; ghcExit logger 1
GHC/Driver/Config.hs view
@@ -2,22 +2,17 @@ module GHC.Driver.Config ( initOptCoercionOpts , initSimpleOpts- , initBCOOpts , initEvalOpts ) where import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Core.SimpleOpt import GHC.Core.Coercion.Opt-import GHC.Runtime.Interpreter (BCOOpts(..)) import GHCi.Message (EvalOpts(..)) -import GHC.Conc (getNumProcessors)-import Control.Monad.IO.Class- -- | Initialise coercion optimiser configuration from DynFlags initOptCoercionOpts :: DynFlags -> OptCoercionOpts initOptCoercionOpts dflags = OptCoercionOpts@@ -31,16 +26,6 @@ , so_co_opts = initOptCoercionOpts dflags , so_eta_red = gopt Opt_DoEtaReduction dflags }---- | Extract BCO options from DynFlags-initBCOOpts :: DynFlags -> IO BCOOpts-initBCOOpts dflags = do- -- Serializing ResolvedBCO is expensive, so if we're in parallel mode- -- (-j<n>) parallelise the serialization.- n_jobs <- case parMakeCount dflags of- Nothing -> liftIO getNumProcessors- Just n -> return n- return $ BCOOpts n_jobs -- | Extract GHCi options from DynFlags and step initEvalOpts :: DynFlags -> Bool -> EvalOpts
GHC/Driver/Config/Cmm.hs view
@@ -4,7 +4,7 @@ import GHC.Cmm.Config -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Backend import GHC.Platform
GHC/Driver/Config/Cmm/Parser.hs view
@@ -6,7 +6,7 @@ import GHC.Driver.Config.Parser import GHC.Driver.Config.StgToCmm-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Utils.Panic
GHC/Driver/Config/CmmToAsm.hs view
@@ -5,7 +5,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Platform import GHC.Unit.Types (Module)@@ -66,8 +66,7 @@ , ncgDwarfSourceNotes = osElfTarget (platformOS (targetPlatform dflags)) && debugLevel dflags > 2 -- We produce GHC-specific source-note DIEs only with -g3 , ncgExposeInternalSymbols = gopt Opt_ExposeInternalSymbols dflags , ncgCmmStaticPred = gopt Opt_CmmStaticPred dflags- -- Disabled due to https://gitlab.haskell.org/ghc/ghc/-/issues/24507- , ncgEnableShortcutting = False -- gopt Opt_AsmShortcutting dflags+ , ncgEnableShortcutting = gopt Opt_AsmShortcutting dflags , ncgComputeUnwinding = debugLevel dflags > 0 , ncgEnableDeadCodeElimination = not (gopt Opt_InfoTableMap dflags) -- Disable when -finfo-table-map is on (#20428)
GHC/Driver/Config/CmmToLlvm.hs view
@@ -4,7 +4,7 @@ where import GHC.Prelude-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.LlvmConfigCache import GHC.Platform import GHC.CmmToLlvm.Config
GHC/Driver/Config/Core/Lint.hs view
@@ -12,7 +12,7 @@ import qualified GHC.LanguageExtensions as LangExt import GHC.Driver.Env-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Config.Diagnostic import GHC.Core@@ -77,17 +77,17 @@ coreDumpFlag :: CoreToDo -> Maybe DumpFlag coreDumpFlag (CoreDoSimplify {}) = Just Opt_D_verbose_core2core coreDumpFlag (CoreDoPluginPass {}) = Just Opt_D_verbose_core2core-coreDumpFlag CoreDoFloatInwards = Just Opt_D_verbose_core2core-coreDumpFlag (CoreDoFloatOutwards {}) = Just Opt_D_verbose_core2core-coreDumpFlag CoreLiberateCase = Just Opt_D_verbose_core2core-coreDumpFlag CoreDoStaticArgs = Just Opt_D_verbose_core2core+coreDumpFlag CoreDoFloatInwards = Just Opt_D_dump_float_in+coreDumpFlag (CoreDoFloatOutwards {}) = Just Opt_D_dump_float_out+coreDumpFlag CoreLiberateCase = Just Opt_D_dump_liberate_case+coreDumpFlag CoreDoStaticArgs = Just Opt_D_dump_static_argument_transformation coreDumpFlag CoreDoCallArity = Just Opt_D_dump_call_arity coreDumpFlag CoreDoExitify = Just Opt_D_dump_exitify coreDumpFlag (CoreDoDemand {}) = Just Opt_D_dump_stranal coreDumpFlag CoreDoCpr = Just Opt_D_dump_cpranal coreDumpFlag CoreDoWorkerWrapper = Just Opt_D_dump_worker_wrapper coreDumpFlag CoreDoSpecialising = Just Opt_D_dump_spec-coreDumpFlag CoreDoSpecConstr = Just Opt_D_dump_spec+coreDumpFlag CoreDoSpecConstr = Just Opt_D_dump_spec_constr coreDumpFlag CoreCSE = Just Opt_D_dump_cse coreDumpFlag CoreDesugar = Just Opt_D_dump_ds_preopt coreDumpFlag CoreDesugarOpt = Just Opt_D_dump_ds
GHC/Driver/Config/Core/Lint/Interactive.hs view
@@ -5,7 +5,7 @@ import GHC.Prelude import GHC.Driver.Env-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Config.Core.Lint import GHC.Core
GHC/Driver/Config/Core/Opt/Arity.hs view
@@ -4,7 +4,7 @@ import GHC.Prelude () -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Core.Opt.Arity
GHC/Driver/Config/Core/Opt/LiberateCase.hs view
@@ -2,7 +2,7 @@ ( initLiberateCaseOpts ) where -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Core.Opt.LiberateCase ( LibCaseOpts(..) )
GHC/Driver/Config/Core/Opt/Simplify.hs view
@@ -17,7 +17,7 @@ import GHC.Driver.Config.Core.Lint ( initLintPassResultConfig ) import GHC.Driver.Config.Core.Rules ( initRuleOpts ) import GHC.Driver.Config.Core.Opt.Arity ( initArityOpts )-import GHC.Driver.Session ( DynFlags(..), GeneralFlag(..), gopt )+import GHC.Driver.DynFlags ( DynFlags(..), GeneralFlag(..), gopt ) import GHC.Runtime.Context ( InteractiveContext(..) ) @@ -80,7 +80,6 @@ initGentleSimplMode dflags = (initSimplMode dflags InitialPhase "Gentle") { -- Don't do case-of-case transformations. -- This makes full laziness work better- -- See Note [Case-of-case and full laziness] sm_case_case = False } @@ -90,37 +89,3 @@ (True, True) -> FloatEnabled (True, False)-> FloatNestedOnly (False, _) -> FloatDisabled---{- Note [Case-of-case and full laziness]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Case-of-case can hide opportunities for let-floating (full laziness).-For example- rec { f = \y. case (expensive x) of (a,b) -> blah }-We might hope to float the (expensive x) out of the \y-loop.-But if we inline `expensive` we might get- \y. case (case x of I# x' -> body) of (a,b) -> blah-Now if we do case-of-case we get- \y. case x if I# x2 ->- case body of (a,b) -> blah--Sadly, at this point `body` mentions `x2`, so we can't float it out of the-\y-loop.--Solution: don't do case-of-case in the "gentle" simplification phase that-precedes the first float-out transformation. Implementation:-- * `sm_case_case` field in SimplMode-- * Consult `sm_case_case` (via `seCaseCase`) before doing case-of-case- in GHC.Core.Opt.Simplify.Iteration.rebuildCall.--Wrinkles--* This applies equally to the case-of-runRW# transformation:- case (runRW# (\s. body)) of (a,b) -> blah- --->- runRW# (\s. case body of (a,b) -> blah)- Again, don't do this when `sm_case_case` is off. See #25055 for- a motivating example.--}
GHC/Driver/Config/Core/Opt/WorkWrap.hs view
@@ -5,7 +5,7 @@ import GHC.Prelude () import GHC.Driver.Config (initSimpleOpts)-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Core.FamInstEnv import GHC.Core.Opt.WorkWrap
GHC/Driver/Config/Core/Rules.hs view
@@ -5,7 +5,7 @@ import GHC.Prelude import GHC.Driver.Flags-import GHC.Driver.Session ( DynFlags, gopt, targetPlatform, homeUnitId_ )+import GHC.Driver.DynFlags ( DynFlags, gopt, targetPlatform, homeUnitId_ ) import GHC.Core.Rules.Config
GHC/Driver/Config/CoreToStg.hs view
@@ -1,7 +1,7 @@ module GHC.Driver.Config.CoreToStg where import GHC.Driver.Config.Stg.Debug-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.CoreToStg
GHC/Driver/Config/CoreToStg/Prep.hs view
@@ -25,8 +25,6 @@ return $ CorePrepConfig { cp_catchNonexhaustiveCases = gopt Opt_CatchNonexhaustiveCases $ hsc_dflags hsc_env , cp_convertNumLit = convertNumLit- , cp_specEval = gopt Opt_SpecEval $ hsc_dflags hsc_env- , cp_specEvalDFun = gopt Opt_SpecEvalDictFun $ hsc_dflags hsc_env } initCorePrepPgmConfig :: DynFlags -> [Var] -> CorePrepPgmConfig
GHC/Driver/Config/Diagnostic.hs view
@@ -8,20 +8,22 @@ , initDsMessageOpts , initTcMessageOpts , initDriverMessageOpts+ , initIfaceMessageOpts ) where import GHC.Driver.Flags-import GHC.Driver.Session+import GHC.Driver.DynFlags+import GHC.Prelude import GHC.Utils.Outputable import GHC.Utils.Error (DiagOpts (..))-import GHC.Driver.Errors.Types (GhcMessage, GhcMessageOpts (..), PsMessage, DriverMessage, DriverMessageOpts (..))+import GHC.Driver.Errors.Types (GhcMessage, GhcMessageOpts (..), PsMessage, DriverMessage, DriverMessageOpts (..), checkBuildingCabalPackage) import GHC.Driver.Errors.Ppr () import GHC.Tc.Errors.Types import GHC.HsToCore.Errors.Types import GHC.Types.Error-import GHC.Tc.Errors.Ppr+import GHC.Iface.Errors.Types -- | Initialise the general configuration for printing diagnostic messages -- For example, this configuration controls things like whether warnings are@@ -30,6 +32,8 @@ initDiagOpts dflags = DiagOpts { diag_warning_flags = warningFlags dflags , diag_fatal_warning_flags = fatalWarningFlags dflags+ , diag_custom_warning_categories = customWarningCategories dflags+ , diag_fatal_custom_warning_categories = fatalCustomWarningCategories dflags , diag_warn_is_error = gopt Opt_WarnIsError dflags , diag_reverse_errors = reverseErrors dflags , diag_max_errors = maxErrors dflags@@ -48,11 +52,18 @@ initPsMessageOpts _ = NoDiagnosticOpts initTcMessageOpts :: DynFlags -> DiagnosticOpts TcRnMessage-initTcMessageOpts dflags = TcRnMessageOpts { tcOptsShowContext = gopt Opt_ShowErrorContext dflags }+initTcMessageOpts dflags =+ TcRnMessageOpts { tcOptsShowContext = gopt Opt_ShowErrorContext dflags+ , tcOptsIfaceOpts = initIfaceMessageOpts dflags } initDsMessageOpts :: DynFlags -> DiagnosticOpts DsMessage initDsMessageOpts _ = NoDiagnosticOpts +initIfaceMessageOpts :: DynFlags -> DiagnosticOpts IfaceMessage+initIfaceMessageOpts dflags =+ IfaceMessageOpts { ifaceShowTriedFiles = verbosity dflags >= 3+ , ifaceBuildingCabalPackage = checkBuildingCabalPackage dflags }+ initDriverMessageOpts :: DynFlags -> DiagnosticOpts DriverMessage-initDriverMessageOpts dflags = DriverMessageOpts (initPsMessageOpts dflags)+initDriverMessageOpts dflags = DriverMessageOpts (initPsMessageOpts dflags) (initIfaceMessageOpts dflags)
GHC/Driver/Config/Finder.hs view
@@ -5,7 +5,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Unit.Finder.Types import GHC.Data.FastString
GHC/Driver/Config/HsToCore.hs view
@@ -4,7 +4,7 @@ where import GHC.Types.Id.Make-import GHC.Driver.Session+import GHC.Driver.DynFlags import qualified GHC.LanguageExtensions as LangExt initBangOpts :: DynFlags -> BangOpts
GHC/Driver/Config/HsToCore/Ticks.hs view
@@ -1,5 +1,6 @@ module GHC.Driver.Config.HsToCore.Ticks ( initTicksConfig+ , breakpointsAllowed ) where @@ -18,9 +19,14 @@ , ticks_countEntries = gopt Opt_ProfCountEntries dflags } +breakpointsAllowed :: DynFlags -> Bool+breakpointsAllowed dflags =+ gopt Opt_InsertBreakpoints dflags &&+ backendSupportsBreakpoints (backend dflags)+ coveragePasses :: DynFlags -> [TickishType] coveragePasses dflags = catMaybes- [ ifA Breakpoints $ backendWantsBreakpointTicks $ backend dflags+ [ ifA Breakpoints $ breakpointsAllowed dflags , ifA HpcTicks $ gopt Opt_Hpc dflags , ifA ProfNotes $ sccProfilingEnabled dflags && profAuto dflags /= NoProfAuto , ifA SourceNotes $ needSourceNotes dflags
GHC/Driver/Config/Linker.hs view
@@ -4,7 +4,7 @@ import GHC.Linker.Config -import GHC.Driver.Session+import GHC.Driver.DynFlags initFrameworkOpts :: DynFlags -> FrameworkOpts initFrameworkOpts dflags = FrameworkOpts
GHC/Driver/Config/Logger.hs view
@@ -5,7 +5,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Utils.Logger (LogFlags (..)) import GHC.Utils.Outputable
GHC/Driver/Config/Stg/Debug.hs view
@@ -4,7 +4,7 @@ import GHC.Stg.Debug -import GHC.Driver.Session+import GHC.Driver.DynFlags -- | Initialize STG pretty-printing options from DynFlags initStgDebugOpts :: DynFlags -> StgDebugOpts
GHC/Driver/Config/Stg/Lift.hs view
@@ -4,7 +4,7 @@ import GHC.Stg.Lift.Config -import GHC.Driver.Session+import GHC.Driver.DynFlags initStgLiftConfig :: DynFlags -> StgLiftConfig initStgLiftConfig dflags = StgLiftConfig
GHC/Driver/Config/Stg/Pipeline.hs view
@@ -11,7 +11,7 @@ import GHC.Driver.Config.Diagnostic import GHC.Driver.Config.Stg.Lift import GHC.Driver.Config.Stg.Ppr-import GHC.Driver.Session+import GHC.Driver.DynFlags -- | Initialize STG pretty-printing options from DynFlags initStgPipelineOpts :: DynFlags -> Bool -> StgPipelineOpts
GHC/Driver/Config/StgToCmm.hs view
@@ -1,3 +1,6 @@+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE MultiWayIf #-}+ module GHC.Driver.Config.StgToCmm ( initStgToCmmConfig ) where@@ -6,6 +9,7 @@ import GHC.StgToCmm.Config +import GHC.Cmm.MachOp ( FMASign(..)) import GHC.Driver.Backend import GHC.Driver.Session import GHC.Platform@@ -38,8 +42,6 @@ , stgToCmmSCCProfiling = sccProfilingEnabled dflags , stgToCmmEagerBlackHole = gopt Opt_EagerBlackHoling dflags , stgToCmmInfoTableMap = gopt Opt_InfoTableMap dflags- , stgToCmmInfoTableMapWithFallback = gopt Opt_InfoTableMapWithFallback dflags- , stgToCmmInfoTableMapWithStack = gopt Opt_InfoTableMapWithStack dflags , stgToCmmOmitYields = gopt Opt_OmitYields dflags , stgToCmmOmitIfPragmas = gopt Opt_OmitInterfacePragmas dflags , stgToCmmPIC = gopt Opt_PIC dflags@@ -52,6 +54,24 @@ , stgToCmmAllowQuotRemInstr = ncg && (x86ish || ppc) , stgToCmmAllowQuotRem2 = (ncg && (x86ish || ppc)) || llvm , stgToCmmAllowExtendedAddSubInstrs = (ncg && (x86ish || ppc)) || llvm+ , stgToCmmAllowFMAInstr =+ if+ | not (isFmaEnabled dflags)+ || not (ncg || llvm)+ -- If we're not using the native code generator or LLVM,+ -- fall back to the generic implementation.+ || platformArch platform == ArchWasm32+ -- WASM doesn't support native FMA instructions (at the time of writing).+ -> const False++ -- FNMSub and FNMAdd have different semantics on PowerPC,+ -- so we avoid using them.+ | ppc+ -> \ case { FMAdd -> True; FMSub -> True; _ -> False }++ | otherwise+ -> const True+ , stgToCmmAllowIntMul2Instr = (ncg && x86ish) || llvm -- SIMD flags , stgToCmmVecInstrsErr = vec_err
GHC/Driver/Config/StgToJS.hs view
@@ -5,7 +5,7 @@ import GHC.StgToJS.Types -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Platform.Ways import GHC.Utils.Outputable @@ -20,6 +20,7 @@ , csInlineLoadRegs = False , csInlineEnter = False , csInlineAlloc = False+ , csPrettyRender = gopt Opt_DisableJsMinifier dflags , csTraceRts = False , csAssertRts = False , csBoundsCheck = gopt Opt_DoBoundsChecking dflags
GHC/Driver/Config/Tidy.hs view
@@ -12,16 +12,13 @@ import GHC.Iface.Tidy import GHC.Iface.Tidy.StaticPtrTable -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Env import GHC.Driver.Backend import GHC.Core.Make (getMkStringIds)-import GHC.Data.Maybe-import GHC.Utils.Panic-import GHC.Utils.Outputable import GHC.Builtin.Names-import GHC.Tc.Utils.Env (lookupGlobal_maybe)+import GHC.Tc.Utils.Env (lookupGlobal) import GHC.Types.TyThing import GHC.Platform.Ways @@ -49,13 +46,9 @@ initStaticPtrOpts hsc_env = do let dflags = hsc_dflags hsc_env - let lookupM n = lookupGlobal_maybe hsc_env n >>= \case- Succeeded r -> pure r- Failed err -> pprPanic "initStaticPtrOpts: couldn't find" (ppr (err,n))-- mk_string <- getMkStringIds (fmap tyThingId . lookupM)- static_ptr_info_datacon <- tyThingDataCon <$> lookupM staticPtrInfoDataConName- static_ptr_datacon <- tyThingDataCon <$> lookupM staticPtrDataConName+ mk_string <- getMkStringIds (fmap tyThingId . lookupGlobal hsc_env )+ static_ptr_info_datacon <- tyThingDataCon <$> lookupGlobal hsc_env staticPtrInfoDataConName+ static_ptr_datacon <- tyThingDataCon <$> lookupGlobal hsc_env staticPtrDataConName pure $ StaticPtrOpts { opt_platform = targetPlatform dflags
+ GHC/Driver/DynFlags.hs view
@@ -0,0 +1,1539 @@+{-# LANGUAGE LambdaCase #-}+module GHC.Driver.DynFlags (+ -- * Dynamic flags and associated configuration types+ DumpFlag(..),+ GeneralFlag(..),+ WarningFlag(..), DiagnosticReason(..),+ Language(..),+ FatalMessager, FlushOut(..),+ ProfAuto(..),+ hasPprDebug, hasNoDebugOutput, hasNoStateHack, hasNoOptCoercion,+ dopt, dopt_set, dopt_unset,+ gopt, gopt_set, gopt_unset,+ wopt, wopt_set, wopt_unset,+ wopt_fatal, wopt_set_fatal, wopt_unset_fatal,+ wopt_set_all_custom, wopt_unset_all_custom,+ wopt_set_all_fatal_custom, wopt_unset_all_fatal_custom,+ wopt_set_custom, wopt_unset_custom,+ wopt_set_fatal_custom, wopt_unset_fatal_custom,+ wopt_any_custom,+ xopt, xopt_set, xopt_unset,+ xopt_set_unlessExplSpec,+ xopt_DuplicateRecordFields,+ xopt_FieldSelectors,+ lang_set,+ DynamicTooState(..), dynamicTooState, setDynamicNow,+ OnOff(..),+ DynFlags(..),+ ParMakeCount(..),+ ways,+ HasDynFlags(..), ContainsDynFlags(..),+ RtsOptsEnabled(..),+ GhcMode(..), isOneShot,+ GhcLink(..), isNoLink,+ PackageFlag(..), PackageArg(..), ModRenaming(..),+ packageFlagsChanged,+ IgnorePackageFlag(..), TrustFlag(..),+ PackageDBFlag(..), PkgDbRef(..),+ Option(..), showOpt,+ DynLibLoader(..),+ positionIndependent,+ optimisationFlags,++ targetProfile,++ -- ** Manipulating DynFlags+ defaultDynFlags, -- Settings -> DynFlags+ initDynFlags, -- DynFlags -> IO DynFlags+ defaultFatalMessager,+ defaultFlushOut,+ optLevelFlags,+ languageExtensions,++ TurnOnFlag,+ turnOn,+ turnOff,++ -- ** System tool settings and locations+ programName, projectVersion,+ ghcUsagePath, ghciUsagePath, topDir, toolDir,+ versionedAppDir, versionedFilePath,+ extraGccViaCFlags, globalPackageDatabasePath,++ -- * Linker/compiler information+ LinkerInfo(..),+ CompilerInfo(..),++ -- * Include specifications+ IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes,+ addImplicitQuoteInclude,++ -- * SDoc+ initSDocContext, initDefaultSDocContext,+ initPromotionTickContext,+) where++import GHC.Prelude++import GHC.Platform+import GHC.Platform.Ways+import GHC.Platform.Profile++import GHC.CmmToAsm.CFG.Weight+import GHC.Core.Unfold+import GHC.Data.Bool+import GHC.Data.EnumSet (EnumSet)+import GHC.Data.Maybe+import GHC.Builtin.Names ( mAIN_NAME )+import GHC.Driver.Backend+import GHC.Driver.Flags+import GHC.Driver.Phases ( Phase(..), phaseInputExt )+import GHC.Driver.Plugins.External+import GHC.Settings+import GHC.Settings.Constants+import GHC.Types.Basic ( IntWithInf, treatZeroAsInf )+import GHC.Types.Error (DiagnosticReason(..))+import GHC.Types.ProfAuto+import GHC.Types.SafeHaskell+import GHC.Types.SrcLoc+import GHC.Unit.Module+import GHC.Unit.Module.Warnings+import GHC.Utils.CliOption+import GHC.SysTools.Terminal ( stderrSupportsAnsiColors )+import GHC.UniqueSubdir (uniqueSubdir)+import GHC.Utils.Outputable+import GHC.Utils.Panic+import GHC.Utils.TmpFs++import qualified GHC.Types.FieldLabel as FieldLabel+import qualified GHC.Utils.Ppr.Colour as Col+import qualified GHC.Data.EnumSet as EnumSet++import GHC.Core.Opt.CallerCC.Types++import Control.Monad (msum, (<=<))+import Control.Monad.Trans.Class (lift)+import Control.Monad.Trans.Except (ExceptT)+import Control.Monad.Trans.Reader (ReaderT)+import Control.Monad.Trans.Writer (WriterT)+import Data.IORef+import System.IO+import System.IO.Error (catchIOError)+import System.Environment (lookupEnv)+import System.FilePath (normalise, (</>))+import System.Directory+import GHC.Foreign (withCString, peekCString)++import qualified Data.Set as Set++import qualified GHC.LanguageExtensions as LangExt++-- -----------------------------------------------------------------------------+-- DynFlags++-- | Contains not only a collection of 'GeneralFlag's but also a plethora of+-- information relating to the compilation of a single file or GHC session+data DynFlags = DynFlags {+ ghcMode :: GhcMode,+ ghcLink :: GhcLink,+ backend :: !Backend,+ -- ^ The backend to use (if any).+ --+ -- Whenever you change the backend, also make sure to set 'ghcLink' to+ -- something sensible.+ --+ -- 'NoBackend' can be used to avoid generating any output, however, note that:+ --+ -- * If a program uses Template Haskell the typechecker may need to run code+ -- from an imported module. To facilitate this, code generation is enabled+ -- for modules imported by modules that use template haskell, using the+ -- default backend for the platform.+ -- See Note [-fno-code mode].+++ -- formerly Settings+ ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion,+ fileSettings :: {-# UNPACK #-} !FileSettings,+ targetPlatform :: Platform, -- Filled in by SysTools+ toolSettings :: {-# UNPACK #-} !ToolSettings,+ platformMisc :: {-# UNPACK #-} !PlatformMisc,+ rawSettings :: [(String, String)],+ tmpDir :: TempDir,++ llvmOptLevel :: Int, -- ^ LLVM optimisation level+ verbosity :: Int, -- ^ Verbosity level: see Note [Verbosity levels]+ debugLevel :: Int, -- ^ How much debug information to produce+ simplPhases :: Int, -- ^ Number of simplifier phases+ maxSimplIterations :: Int, -- ^ Max simplifier iterations+ ruleCheck :: Maybe String,+ strictnessBefore :: [Int], -- ^ Additional demand analysis++ parMakeCount :: Maybe ParMakeCount,+ -- ^ The number of modules to compile in parallel+ -- If unspecified, compile with a single job.++ enableTimeStats :: Bool, -- ^ Enable RTS timing statistics?+ ghcHeapSize :: Maybe Int, -- ^ The heap size to set.++ maxRelevantBinds :: Maybe Int, -- ^ Maximum number of bindings from the type envt+ -- 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+ maxPmCheckModels :: Int, -- ^ Soft limit on the number of models+ -- the pattern match checker checks+ -- a pattern against. A safe guard+ -- against exponential blow-up.+ simplTickFactor :: Int, -- ^ Multiplier for simplifier ticks+ dmdUnboxWidth :: !Int, -- ^ Whether DmdAnal should optimistically put an+ -- Unboxed demand on returned products with at most+ -- this number of fields+ specConstrThreshold :: Maybe Int, -- ^ Threshold for SpecConstr+ specConstrCount :: Maybe Int, -- ^ Max number of specialisations for any one function+ specConstrRecursive :: Int, -- ^ Max number of specialisations for recursive types+ -- Not optional; otherwise ForceSpecConstr can diverge.+ binBlobThreshold :: Maybe Word, -- ^ Binary literals (e.g. strings) whose size is above+ -- this threshold will be dumped in a binary file+ -- by the assembler code generator. 0 and Nothing disables+ -- this feature. See 'GHC.StgToCmm.Config'.+ liberateCaseThreshold :: Maybe Int, -- ^ Threshold for LiberateCase+ floatLamArgs :: Maybe Int, -- ^ Arg count for lambda floating+ -- See 'GHC.Core.Opt.Monad.FloatOutSwitches'++ liftLamsRecArgs :: Maybe Int, -- ^ Maximum number of arguments after lambda lifting a+ -- recursive function.+ liftLamsNonRecArgs :: Maybe Int, -- ^ Maximum number of arguments after lambda lifting a+ -- non-recursive function.+ liftLamsKnown :: Bool, -- ^ Lambda lift even when this turns a known call+ -- into an unknown call.++ cmmProcAlignment :: Maybe Int, -- ^ Align Cmm functions at this boundary or use default.++ historySize :: Int, -- ^ Simplification history size++ importPaths :: [FilePath],+ mainModuleNameIs :: ModuleName,+ mainFunIs :: Maybe String,+ reductionDepth :: IntWithInf, -- ^ Typechecker maximum stack depth+ solverIterations :: IntWithInf, -- ^ Number of iterations in the constraints solver+ -- Typically only 1 is needed+ givensFuel :: Int, -- ^ Number of layers of superclass expansion for givens+ -- Should be < solverIterations+ -- See Note [Expanding Recursive Superclasses and ExpansionFuel]+ wantedsFuel :: Int, -- ^ Number of layers of superclass expansion for wanteds+ -- Should be < givensFuel+ -- See Note [Expanding Recursive Superclasses and ExpansionFuel]+ qcsFuel :: Int, -- ^ Number of layers of superclass expansion for quantified constraints+ -- Should be < givensFuel+ -- See Note [Expanding Recursive Superclasses and ExpansionFuel]+ homeUnitId_ :: UnitId, -- ^ Target home unit-id+ homeUnitInstanceOf_ :: Maybe UnitId, -- ^ Id of the unit to instantiate+ homeUnitInstantiations_ :: [(ModuleName, Module)], -- ^ Module instantiations++ -- Note [Filepaths and Multiple Home Units]+ workingDirectory :: Maybe FilePath,+ thisPackageName :: Maybe String, -- ^ What the package is called, use with multiple home units+ hiddenModules :: Set.Set ModuleName,+ reexportedModules :: Set.Set ModuleName,++ -- ways+ targetWays_ :: Ways, -- ^ Target way flags from the command line++ -- For object splitting+ splitInfo :: Maybe (String,Int),++ -- paths etc.+ objectDir :: Maybe String,+ dylibInstallName :: Maybe String,+ hiDir :: Maybe String,+ hieDir :: Maybe String,+ stubDir :: Maybe String,+ dumpDir :: Maybe String,++ objectSuf_ :: String,+ hcSuf :: String,+ hiSuf_ :: String,+ hieSuf :: String,++ dynObjectSuf_ :: String,+ dynHiSuf_ :: String,++ outputFile_ :: Maybe String,+ dynOutputFile_ :: Maybe String,+ outputHi :: Maybe String,+ dynOutputHi :: Maybe String,+ dynLibLoader :: DynLibLoader,++ dynamicNow :: !Bool, -- ^ Indicate if we are now generating dynamic output+ -- because of -dynamic-too. This predicate is+ -- used to query the appropriate fields+ -- (outputFile/dynOutputFile, ways, etc.)++ -- | This defaults to 'non-module'. It can be set by+ -- 'GHC.Driver.Pipeline.setDumpPrefix' or 'ghc.GHCi.UI.runStmt' based on+ -- where its output is going.+ dumpPrefix :: FilePath,++ -- | Override the 'dumpPrefix' set by 'GHC.Driver.Pipeline.setDumpPrefix'+ -- or 'ghc.GHCi.UI.runStmt'.+ -- Set by @-ddump-file-prefix@+ dumpPrefixForce :: Maybe FilePath,++ ldInputs :: [Option],++ includePaths :: IncludeSpecs,+ libraryPaths :: [String],+ frameworkPaths :: [String], -- used on darwin only+ cmdlineFrameworks :: [String], -- ditto++ rtsOpts :: Maybe String,+ rtsOptsEnabled :: RtsOptsEnabled,+ rtsOptsSuggestions :: Bool,++ hpcDir :: String, -- ^ Path to store the .mix files++ -- Plugins+ pluginModNames :: [ModuleName],+ -- ^ the @-fplugin@ flags given on the command line, in *reverse*+ -- order that they're specified on the command line.+ pluginModNameOpts :: [(ModuleName,String)],+ frontendPluginOpts :: [String],+ -- ^ the @-ffrontend-opt@ flags given on the command line, in *reverse*+ -- order that they're specified on the command line.++ externalPluginSpecs :: [ExternalPluginSpec],+ -- ^ External plugins loaded from shared libraries++ -- For ghc -M+ depMakefile :: FilePath,+ depIncludePkgDeps :: Bool,+ depIncludeCppDeps :: Bool,+ depExcludeMods :: [ModuleName],+ depSuffixes :: [String],++ -- Package flags+ packageDBFlags :: [PackageDBFlag],+ -- ^ The @-package-db@ flags given on the command line, In+ -- *reverse* order that they're specified on the command line.+ -- This is intended to be applied with the list of "initial"+ -- package databases derived from @GHC_PACKAGE_PATH@; see+ -- 'getUnitDbRefs'.++ ignorePackageFlags :: [IgnorePackageFlag],+ -- ^ The @-ignore-package@ flags from the command line.+ -- In *reverse* order that they're specified on the command line.+ packageFlags :: [PackageFlag],+ -- ^ The @-package@ and @-hide-package@ flags from the command-line.+ -- In *reverse* order that they're specified on the command line.+ pluginPackageFlags :: [PackageFlag],+ -- ^ The @-plugin-package-id@ flags from command line.+ -- In *reverse* order that they're specified on the command line.+ trustFlags :: [TrustFlag],+ -- ^ The @-trust@ and @-distrust@ flags.+ -- In *reverse* order that they're specified on the command line.+ packageEnv :: Maybe FilePath,+ -- ^ Filepath to the package environment file (if overriding default)+++ -- hsc dynamic flags+ dumpFlags :: EnumSet DumpFlag,+ generalFlags :: EnumSet GeneralFlag,+ warningFlags :: EnumSet WarningFlag,+ fatalWarningFlags :: EnumSet WarningFlag,+ customWarningCategories :: WarningCategorySet, -- See Note [Warning categories]+ fatalCustomWarningCategories :: WarningCategorySet, -- in GHC.Unit.Module.Warnings+ -- Don't change this without updating extensionFlags:+ language :: Maybe Language,+ -- | Safe Haskell mode+ safeHaskell :: SafeHaskellMode,+ safeInfer :: Bool,+ safeInferred :: Bool,+ -- We store the location of where some extension and flags were turned on so+ -- we can produce accurate error messages when Safe Haskell fails due to+ -- them.+ thOnLoc :: SrcSpan,+ newDerivOnLoc :: SrcSpan,+ deriveViaOnLoc :: SrcSpan,+ overlapInstLoc :: SrcSpan,+ incoherentOnLoc :: SrcSpan,+ pkgTrustOnLoc :: SrcSpan,+ warnSafeOnLoc :: SrcSpan,+ warnUnsafeOnLoc :: SrcSpan,+ trustworthyOnLoc :: SrcSpan,+ -- Don't change this without updating extensionFlags:+ -- Here we collect the settings of the language extensions+ -- from the command line, the ghci config file and+ -- from interactive :set / :seti commands.+ extensions :: [OnOff LangExt.Extension],+ -- extensionFlags should always be equal to+ -- flattenExtensionFlags language extensions+ -- LangExt.Extension is defined in libraries/ghc-boot so that it can be used+ -- by template-haskell+ extensionFlags :: EnumSet LangExt.Extension,++ -- | Unfolding control+ -- See Note [Discounts and thresholds] in GHC.Core.Unfold+ unfoldingOpts :: !UnfoldingOpts,++ maxWorkerArgs :: Int,++ ghciHistSize :: Int,++ flushOut :: FlushOut,++ ghcVersionFile :: Maybe FilePath,+ haddockOptions :: Maybe String,++ -- | GHCi scripts specified by -ghci-script, in reverse order+ ghciScripts :: [String],++ -- Output style options+ pprUserLength :: Int,+ pprCols :: Int,++ useUnicode :: Bool,+ useColor :: OverridingBool,+ canUseColor :: Bool,+ colScheme :: Col.Scheme,++ -- | what kind of {-# SCC #-} to add automatically+ profAuto :: ProfAuto,+ callerCcFilters :: [CallerCcFilter],++ interactivePrint :: Maybe String,++ -- | Machine dependent flags (-m\<blah> stuff)+ sseVersion :: Maybe SseVersion,+ bmiVersion :: Maybe BmiVersion,+ avx :: Bool,+ avx2 :: Bool,+ avx512cd :: Bool, -- Enable AVX-512 Conflict Detection Instructions.+ avx512er :: Bool, -- Enable AVX-512 Exponential and Reciprocal Instructions.+ avx512f :: Bool, -- Enable AVX-512 instructions.+ avx512pf :: Bool, -- Enable AVX-512 PreFetch Instructions.+ fma :: Bool, -- ^ Enable FMA instructions.++ -- | Run-time linker information (what options we need, etc.)+ rtldInfo :: IORef (Maybe LinkerInfo),++ -- | Run-time C compiler information+ rtccInfo :: IORef (Maybe CompilerInfo),++ -- | Run-time assembler information+ rtasmInfo :: IORef (Maybe CompilerInfo),++ -- Constants used to control the amount of optimization done.++ -- | Max size, in bytes, of inline array allocations.+ maxInlineAllocSize :: Int,++ -- | Only inline memcpy if it generates no more than this many+ -- pseudo (roughly: Cmm) instructions.+ maxInlineMemcpyInsns :: Int,++ -- | Only inline memset if it generates no more than this many+ -- pseudo (roughly: Cmm) instructions.+ maxInlineMemsetInsns :: Int,++ -- | Reverse the order of error messages in GHC/GHCi+ reverseErrors :: Bool,++ -- | Limit the maximum number of errors to show+ maxErrors :: Maybe Int,++ -- | Unique supply configuration for testing build determinism+ initialUnique :: Word,+ uniqueIncrement :: Int,+ -- 'Int' because it can be used to test uniques in decreasing order.++ -- | Temporary: CFG Edge weights for fast iterations+ cfgWeights :: Weights+}++class HasDynFlags m where+ getDynFlags :: m DynFlags++{- It would be desirable to have the more generalised++ instance (MonadTrans t, Monad m, HasDynFlags m) => HasDynFlags (t m) where+ getDynFlags = lift getDynFlags++instance definition. However, that definition would overlap with the+`HasDynFlags (GhcT m)` instance. Instead we define instances for a+couple of common Monad transformers explicitly. -}++instance (Monoid a, Monad m, HasDynFlags m) => HasDynFlags (WriterT a m) where+ getDynFlags = lift getDynFlags++instance (Monad m, HasDynFlags m) => HasDynFlags (ReaderT a m) where+ getDynFlags = lift getDynFlags++instance (Monad m, HasDynFlags m) => HasDynFlags (MaybeT m) where+ getDynFlags = lift getDynFlags++instance (Monad m, HasDynFlags m) => HasDynFlags (ExceptT e m) where+ getDynFlags = lift getDynFlags++class ContainsDynFlags t where+ extractDynFlags :: t -> DynFlags++-----------------------------------------------------------------------------++-- | Used by 'GHC.runGhc' to partially initialize a new 'DynFlags' value+initDynFlags :: DynFlags -> IO DynFlags+initDynFlags dflags = do+ let+ refRtldInfo <- newIORef Nothing+ refRtccInfo <- newIORef Nothing+ refRtasmInfo <- newIORef Nothing+ canUseUnicode <- do let enc = localeEncoding+ str = "‘’"+ (withCString enc str $ \cstr ->+ do str' <- peekCString enc cstr+ return (str == str'))+ `catchIOError` \_ -> return False+ ghcNoUnicodeEnv <- lookupEnv "GHC_NO_UNICODE"+ let useUnicode' = isNothing ghcNoUnicodeEnv && canUseUnicode+ maybeGhcColorsEnv <- lookupEnv "GHC_COLORS"+ maybeGhcColoursEnv <- lookupEnv "GHC_COLOURS"+ let adjustCols (Just env) = Col.parseScheme env+ adjustCols Nothing = id+ let (useColor', colScheme') =+ (adjustCols maybeGhcColoursEnv . adjustCols maybeGhcColorsEnv)+ (useColor dflags, colScheme dflags)+ tmp_dir <- normalise <$> getTemporaryDirectory+ return dflags{+ useUnicode = useUnicode',+ useColor = useColor',+ canUseColor = stderrSupportsAnsiColors,+ colScheme = colScheme',+ rtldInfo = refRtldInfo,+ rtccInfo = refRtccInfo,+ rtasmInfo = refRtasmInfo,+ tmpDir = TempDir tmp_dir+ }++-- | 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 -> DynFlags+defaultDynFlags mySettings =+-- See Note [Updating flag description in the User's Guide]+ DynFlags {+ ghcMode = CompManager,+ ghcLink = LinkBinary,+ backend = platformDefaultBackend (sTargetPlatform mySettings),+ verbosity = 0,+ debugLevel = 0,+ simplPhases = 2,+ maxSimplIterations = 4,+ ruleCheck = Nothing,+ binBlobThreshold = Just 500000, -- 500K is a good default (see #16190)+ maxRelevantBinds = Just 6,+ maxValidHoleFits = Just 6,+ maxRefHoleFits = Just 6,+ refLevelHoleFits = Nothing,+ maxUncoveredPatterns = 4,+ maxPmCheckModels = 30,+ simplTickFactor = 100,+ dmdUnboxWidth = 3, -- Default: Assume an unboxed demand on function bodies returning a triple+ specConstrThreshold = Just 2000,+ specConstrCount = Just 3,+ specConstrRecursive = 3,+ liberateCaseThreshold = Just 2000,+ floatLamArgs = Just 0, -- Default: float only if no fvs+ liftLamsRecArgs = Just 5, -- Default: the number of available argument hardware registers on x86_64+ liftLamsNonRecArgs = Just 5, -- Default: the number of available argument hardware registers on x86_64+ liftLamsKnown = False, -- Default: don't turn known calls into unknown ones+ cmmProcAlignment = Nothing,++ historySize = 20,+ strictnessBefore = [],++ parMakeCount = Nothing,++ enableTimeStats = False,+ ghcHeapSize = Nothing,++ importPaths = ["."],+ mainModuleNameIs = mAIN_NAME,+ mainFunIs = Nothing,+ reductionDepth = treatZeroAsInf mAX_REDUCTION_DEPTH,+ solverIterations = treatZeroAsInf mAX_SOLVER_ITERATIONS,+ givensFuel = mAX_GIVENS_FUEL,+ wantedsFuel = mAX_WANTEDS_FUEL,+ qcsFuel = mAX_QC_FUEL,++ homeUnitId_ = mainUnitId,+ homeUnitInstanceOf_ = Nothing,+ homeUnitInstantiations_ = [],++ workingDirectory = Nothing,+ thisPackageName = Nothing,+ hiddenModules = Set.empty,+ reexportedModules = Set.empty,++ objectDir = Nothing,+ dylibInstallName = Nothing,+ hiDir = Nothing,+ hieDir = Nothing,+ stubDir = Nothing,+ dumpDir = Nothing,++ objectSuf_ = phaseInputExt StopLn,+ hcSuf = phaseInputExt HCc,+ hiSuf_ = "hi",+ hieSuf = "hie",++ dynObjectSuf_ = "dyn_" ++ phaseInputExt StopLn,+ dynHiSuf_ = "dyn_hi",+ dynamicNow = False,++ pluginModNames = [],+ pluginModNameOpts = [],+ frontendPluginOpts = [],++ externalPluginSpecs = [],++ outputFile_ = Nothing,+ dynOutputFile_ = Nothing,+ outputHi = Nothing,+ dynOutputHi = Nothing,+ dynLibLoader = SystemDependent,+ dumpPrefix = "non-module.",+ dumpPrefixForce = Nothing,+ ldInputs = [],+ includePaths = IncludeSpecs [] [] [],+ libraryPaths = [],+ frameworkPaths = [],+ cmdlineFrameworks = [],+ rtsOpts = Nothing,+ rtsOptsEnabled = RtsOptsSafeOnly,+ rtsOptsSuggestions = True,++ hpcDir = ".hpc",++ packageDBFlags = [],+ packageFlags = [],+ pluginPackageFlags = [],+ ignorePackageFlags = [],+ trustFlags = [],+ packageEnv = Nothing,+ targetWays_ = Set.empty,+ splitInfo = Nothing,++ ghcNameVersion = sGhcNameVersion mySettings,+ fileSettings = sFileSettings mySettings,+ toolSettings = sToolSettings mySettings,+ targetPlatform = sTargetPlatform mySettings,+ platformMisc = sPlatformMisc mySettings,+ rawSettings = sRawSettings mySettings,++ tmpDir = panic "defaultDynFlags: uninitialized tmpDir",++ llvmOptLevel = 0,++ -- ghc -M values+ depMakefile = "Makefile",+ depIncludePkgDeps = False,+ depIncludeCppDeps = False,+ depExcludeMods = [],+ depSuffixes = [],+ -- end of ghc -M values+ ghcVersionFile = Nothing,+ haddockOptions = Nothing,+ dumpFlags = EnumSet.empty,+ generalFlags = EnumSet.fromList (defaultFlags mySettings),+ warningFlags = EnumSet.fromList standardWarnings,+ fatalWarningFlags = EnumSet.empty,+ customWarningCategories = completeWarningCategorySet,+ fatalCustomWarningCategories = emptyWarningCategorySet,+ ghciScripts = [],+ language = Nothing,+ safeHaskell = Sf_None,+ safeInfer = True,+ safeInferred = True,+ thOnLoc = noSrcSpan,+ newDerivOnLoc = noSrcSpan,+ deriveViaOnLoc = noSrcSpan,+ overlapInstLoc = noSrcSpan,+ incoherentOnLoc = noSrcSpan,+ pkgTrustOnLoc = noSrcSpan,+ warnSafeOnLoc = noSrcSpan,+ warnUnsafeOnLoc = noSrcSpan,+ trustworthyOnLoc = noSrcSpan,+ extensions = [],+ extensionFlags = flattenExtensionFlags Nothing [],++ unfoldingOpts = defaultUnfoldingOpts,+ maxWorkerArgs = 10,++ ghciHistSize = 50, -- keep a log of length 50 by default++ flushOut = defaultFlushOut,+ pprUserLength = 5,+ pprCols = 100,+ useUnicode = False,+ useColor = Auto,+ canUseColor = False,+ colScheme = Col.defaultScheme,+ profAuto = NoProfAuto,+ callerCcFilters = [],+ interactivePrint = Nothing,+ sseVersion = Nothing,+ bmiVersion = Nothing,+ avx = False,+ avx2 = False,+ avx512cd = False,+ avx512er = False,+ avx512f = False,+ avx512pf = False,+ fma = False,+ rtldInfo = panic "defaultDynFlags: no rtldInfo",+ rtccInfo = panic "defaultDynFlags: no rtccInfo",+ rtasmInfo = panic "defaultDynFlags: no rtasmInfo",++ maxInlineAllocSize = 128,+ maxInlineMemcpyInsns = 32,+ maxInlineMemsetInsns = 32,++ initialUnique = 0,+ uniqueIncrement = 1,++ reverseErrors = False,+ maxErrors = Nothing,+ cfgWeights = defaultWeights+ }++type FatalMessager = String -> IO ()++defaultFatalMessager :: FatalMessager+defaultFatalMessager = hPutStrLn stderr+++newtype FlushOut = FlushOut (IO ())++defaultFlushOut :: FlushOut+defaultFlushOut = FlushOut $ hFlush stdout++++data OnOff a = On a+ | Off a+ deriving (Eq, Show)++instance Outputable a => Outputable (OnOff a) where+ ppr (On x) = text "On" <+> ppr x+ ppr (Off x) = text "Off" <+> ppr x++-- OnOffs accumulate in reverse order, so we use foldr in order to+-- process them in the right order+flattenExtensionFlags :: Maybe Language -> [OnOff LangExt.Extension] -> EnumSet LangExt.Extension+flattenExtensionFlags ml = foldr g defaultExtensionFlags+ where g (On f) flags = EnumSet.insert f flags+ g (Off f) flags = EnumSet.delete f flags+ defaultExtensionFlags = EnumSet.fromList (languageExtensions ml)++-- -----------------------------------------------------------------------------+-- -jN++-- | The type for the -jN argument, specifying that -j on its own represents+-- using the number of machine processors.+data ParMakeCount+ -- | Use this many processors (@-j<n>@ flag).+ = ParMakeThisMany Int+ -- | Use parallelism with as many processors as possible (@-j@ flag without an argument).+ | ParMakeNumProcessors+ -- | Use the specific semaphore @<sem>@ to control parallelism (@-jsem <sem>@ flag).+ | ParMakeSemaphore FilePath++-- -----------------------------------------------------------------------------+-- Linker/compiler information++-- LinkerInfo contains any extra options needed by the system linker.+data LinkerInfo+ = GnuLD [Option]+ | Mold [Option]+ | GnuGold [Option]+ | LlvmLLD [Option]+ | DarwinLD [Option]+ | SolarisLD [Option]+ | AixLD [Option]+ | UnknownLD+ deriving Eq++-- CompilerInfo tells us which C compiler we're using+data CompilerInfo+ = GCC+ | Clang+ | AppleClang+ | AppleClang51+ | Emscripten+ | UnknownCC+ deriving Eq++-- | The 'GhcMode' tells us whether we're doing multi-module+-- compilation (controlled via the "GHC" API) or one-shot+-- (single-module) compilation. This makes a difference primarily to+-- the "GHC.Unit.Finder": in one-shot mode we look for interface files for+-- imported modules, but in multi-module mode we look for source files+-- in order to check whether they need to be recompiled.+data GhcMode+ = CompManager -- ^ @\-\-make@, GHCi, etc.+ | OneShot -- ^ @ghc -c Foo.hs@+ | MkDepend -- ^ @ghc -M@, see "GHC.Unit.Finder" for why we need this+ deriving Eq++instance Outputable GhcMode where+ ppr CompManager = text "CompManager"+ ppr OneShot = text "OneShot"+ ppr MkDepend = text "MkDepend"++isOneShot :: GhcMode -> Bool+isOneShot OneShot = True+isOneShot _other = False++-- | What to do in the link step, if there is one.+data GhcLink+ = NoLink -- ^ Don't link at all+ | LinkBinary -- ^ Link object code into a binary+ | LinkInMemory -- ^ Use the in-memory dynamic linker (works for both+ -- bytecode and object code).+ | LinkDynLib -- ^ Link objects into a dynamic lib (DLL on Windows, DSO on ELF platforms)+ | LinkStaticLib -- ^ Link objects into a static lib+ | LinkMergedObj -- ^ Link objects into a merged "GHCi object"+ deriving (Eq, Show)++isNoLink :: GhcLink -> Bool+isNoLink NoLink = True+isNoLink _ = False++-- | We accept flags which make packages visible, but how they select+-- the package varies; this data type reflects what selection criterion+-- is used.+data PackageArg =+ PackageArg String -- ^ @-package@, by 'PackageName'+ | UnitIdArg Unit -- ^ @-package-id@, by 'Unit'+ deriving (Eq, Show)++instance Outputable PackageArg where+ ppr (PackageArg pn) = text "package" <+> text pn+ ppr (UnitIdArg uid) = text "unit" <+> ppr uid++-- | Represents the renaming that may be associated with an exposed+-- package, e.g. the @rns@ part of @-package "foo (rns)"@.+--+-- Here are some example parsings of the package flags (where+-- a string literal is punned to be a 'ModuleName':+--+-- * @-package foo@ is @ModRenaming True []@+-- * @-package foo ()@ is @ModRenaming False []@+-- * @-package foo (A)@ is @ModRenaming False [("A", "A")]@+-- * @-package foo (A as B)@ is @ModRenaming False [("A", "B")]@+-- * @-package foo with (A as B)@ is @ModRenaming True [("A", "B")]@+data ModRenaming = ModRenaming {+ modRenamingWithImplicit :: Bool, -- ^ Bring all exposed modules into scope?+ modRenamings :: [(ModuleName, ModuleName)] -- ^ Bring module @m@ into scope+ -- under name @n@.+ } deriving (Eq)+instance Outputable ModRenaming where+ ppr (ModRenaming b rns) = ppr b <+> parens (ppr rns)++-- | Flags for manipulating the set of non-broken packages.+newtype IgnorePackageFlag = IgnorePackage String -- ^ @-ignore-package@+ deriving (Eq)++-- | Flags for manipulating package trust.+data TrustFlag+ = TrustPackage String -- ^ @-trust@+ | DistrustPackage String -- ^ @-distrust@+ deriving (Eq)++-- | Flags for manipulating packages visibility.+data PackageFlag+ = ExposePackage String PackageArg ModRenaming -- ^ @-package@, @-package-id@+ | HidePackage String -- ^ @-hide-package@+ deriving (Eq) -- NB: equality instance is used by packageFlagsChanged++data PackageDBFlag+ = PackageDB PkgDbRef+ | NoUserPackageDB+ | NoGlobalPackageDB+ | ClearPackageDBs+ deriving (Eq)++packageFlagsChanged :: DynFlags -> DynFlags -> Bool+packageFlagsChanged idflags1 idflags0 =+ packageFlags idflags1 /= packageFlags idflags0 ||+ ignorePackageFlags idflags1 /= ignorePackageFlags idflags0 ||+ pluginPackageFlags idflags1 /= pluginPackageFlags idflags0 ||+ trustFlags idflags1 /= trustFlags idflags0 ||+ packageDBFlags idflags1 /= packageDBFlags idflags0 ||+ packageGFlags idflags1 /= packageGFlags idflags0+ where+ packageGFlags dflags = map (`gopt` dflags)+ [ Opt_HideAllPackages+ , Opt_HideAllPluginPackages+ , Opt_AutoLinkPackages ]++instance Outputable PackageFlag where+ ppr (ExposePackage n arg rn) = text n <> braces (ppr arg <+> ppr rn)+ ppr (HidePackage str) = text "-hide-package" <+> text str++data DynLibLoader+ = Deployable+ | SystemDependent+ deriving Eq++data RtsOptsEnabled+ = RtsOptsNone | RtsOptsIgnore | RtsOptsIgnoreAll | RtsOptsSafeOnly+ | RtsOptsAll+ deriving (Show)++-- | Are we building with @-fPIE@ or @-fPIC@ enabled?+positionIndependent :: DynFlags -> Bool+positionIndependent dflags = gopt Opt_PIC dflags || gopt Opt_PIE dflags++-- Note [-dynamic-too business]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- With -dynamic-too flag, we try to build both the non-dynamic and dynamic+-- objects in a single run of the compiler: the pipeline is the same down to+-- Core optimisation, then the backend (from Core to object code) is executed+-- twice.+--+-- The implementation is currently rather hacky, for example, we don't clearly separate non-dynamic+-- and dynamic loaded interfaces (#9176).+--+-- To make matters worse, we automatically enable -dynamic-too when some modules+-- need Template-Haskell and GHC is dynamically linked (cf+-- GHC.Driver.Pipeline.compileOne').+--+-- We used to try and fall back from a dynamic-too failure but this feature+-- didn't work as expected (#20446) so it was removed to simplify the+-- implementation and not obscure latent bugs.++data DynamicTooState+ = DT_Dont -- ^ Don't try to build dynamic objects too+ | DT_OK -- ^ Will still try to generate dynamic objects+ | DT_Dyn -- ^ Currently generating dynamic objects (in the backend)+ deriving (Eq,Show,Ord)++dynamicTooState :: DynFlags -> DynamicTooState+dynamicTooState dflags+ | not (gopt Opt_BuildDynamicToo dflags) = DT_Dont+ | dynamicNow dflags = DT_Dyn+ | otherwise = DT_OK++setDynamicNow :: DynFlags -> DynFlags+setDynamicNow dflags0 =+ dflags0+ { dynamicNow = True+ }++data PkgDbRef+ = GlobalPkgDb+ | UserPkgDb+ | PkgDbPath FilePath+ deriving Eq++-- | 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 #14312.+data IncludeSpecs+ = IncludeSpecs { includePathsQuote :: [String]+ , includePathsGlobal :: [String]+ -- | See Note [Implicit include paths]+ , includePathsQuoteImplicit :: [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 }++-- | These includes are not considered while fingerprinting the flags for iface+-- | See Note [Implicit include paths]+addImplicitQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs+addImplicitQuoteInclude spec paths = let f = includePathsQuoteImplicit spec+ in spec { includePathsQuoteImplicit = 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 +++ includePathsQuoteImplicit specs +++ includePathsGlobal specs++{- Note [Implicit include paths]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ The compile driver adds the path to the folder containing the source file being+ compiled to the 'IncludeSpecs', and this change gets recorded in the 'DynFlags'+ that are used later to compute the interface file. Because of this,+ the flags fingerprint derived from these 'DynFlags' and recorded in the+ interface file will end up containing the absolute path to the source folder.++ Build systems with a remote cache like Bazel or Buck (or Shake, see #16956)+ store the build artifacts produced by a build BA for reuse in subsequent builds.++ Embedding source paths in interface fingerprints will thwart these attempts and+ lead to unnecessary recompilations when the source paths in BA differ from the+ source paths in subsequent builds.+ -}++hasPprDebug :: DynFlags -> Bool+hasPprDebug = dopt Opt_D_ppr_debug++hasNoDebugOutput :: DynFlags -> Bool+hasNoDebugOutput = dopt Opt_D_no_debug_output++hasNoStateHack :: DynFlags -> Bool+hasNoStateHack = gopt Opt_G_NoStateHack++hasNoOptCoercion :: DynFlags -> Bool+hasNoOptCoercion = gopt Opt_G_NoOptCoercion++-- | Test whether a 'DumpFlag' is set+dopt :: DumpFlag -> DynFlags -> Bool+dopt = getDumpFlagFrom verbosity dumpFlags++-- | Set a 'DumpFlag'+dopt_set :: DynFlags -> DumpFlag -> DynFlags+dopt_set dfs f = dfs{ dumpFlags = EnumSet.insert f (dumpFlags dfs) }++-- | Unset a 'DumpFlag'+dopt_unset :: DynFlags -> DumpFlag -> DynFlags+dopt_unset dfs f = dfs{ dumpFlags = EnumSet.delete f (dumpFlags dfs) }++-- | Test whether a 'GeneralFlag' is set+--+-- Note that `dynamicNow` (i.e., dynamic objects built with `-dynamic-too`)+-- always implicitly enables Opt_PIC, Opt_ExternalDynamicRefs, and disables+-- Opt_SplitSections.+--+gopt :: GeneralFlag -> DynFlags -> Bool+gopt Opt_PIC dflags+ | dynamicNow dflags = True+gopt Opt_ExternalDynamicRefs dflags+ | dynamicNow dflags = True+gopt Opt_SplitSections dflags+ | dynamicNow dflags = False+gopt f dflags = f `EnumSet.member` generalFlags dflags++-- | Set a 'GeneralFlag'+gopt_set :: DynFlags -> GeneralFlag -> DynFlags+gopt_set dfs f = dfs{ generalFlags = EnumSet.insert f (generalFlags dfs) }++-- | Unset a 'GeneralFlag'+gopt_unset :: DynFlags -> GeneralFlag -> DynFlags+gopt_unset dfs f = dfs{ generalFlags = EnumSet.delete f (generalFlags dfs) }++-- | Test whether a 'WarningFlag' is set+wopt :: WarningFlag -> DynFlags -> Bool+wopt f dflags = f `EnumSet.member` warningFlags dflags++-- | Set a 'WarningFlag'+wopt_set :: DynFlags -> WarningFlag -> DynFlags+wopt_set dfs f = dfs{ warningFlags = EnumSet.insert f (warningFlags dfs) }++-- | Unset a 'WarningFlag'+wopt_unset :: DynFlags -> WarningFlag -> DynFlags+wopt_unset dfs f = dfs{ warningFlags = EnumSet.delete f (warningFlags dfs) }++-- | Test whether a 'WarningFlag' is set as fatal+wopt_fatal :: WarningFlag -> DynFlags -> Bool+wopt_fatal f dflags = f `EnumSet.member` fatalWarningFlags dflags++-- | Mark a 'WarningFlag' as fatal (do not set the flag)+wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags+wopt_set_fatal dfs f+ = dfs { fatalWarningFlags = EnumSet.insert f (fatalWarningFlags dfs) }++-- | Mark a 'WarningFlag' as not fatal+wopt_unset_fatal :: DynFlags -> WarningFlag -> DynFlags+wopt_unset_fatal dfs f+ = dfs { fatalWarningFlags = EnumSet.delete f (fatalWarningFlags dfs) }+++-- | Enable all custom warning categories.+wopt_set_all_custom :: DynFlags -> DynFlags+wopt_set_all_custom dfs+ = dfs{ customWarningCategories = completeWarningCategorySet }++-- | Disable all custom warning categories.+wopt_unset_all_custom :: DynFlags -> DynFlags+wopt_unset_all_custom dfs+ = dfs{ customWarningCategories = emptyWarningCategorySet }++-- | Mark all custom warning categories as fatal (do not set the flags).+wopt_set_all_fatal_custom :: DynFlags -> DynFlags+wopt_set_all_fatal_custom dfs+ = dfs { fatalCustomWarningCategories = completeWarningCategorySet }++-- | Mark all custom warning categories as non-fatal.+wopt_unset_all_fatal_custom :: DynFlags -> DynFlags+wopt_unset_all_fatal_custom dfs+ = dfs { fatalCustomWarningCategories = emptyWarningCategorySet }++-- | Set a custom 'WarningCategory'+wopt_set_custom :: DynFlags -> WarningCategory -> DynFlags+wopt_set_custom dfs f = dfs{ customWarningCategories = insertWarningCategorySet f (customWarningCategories dfs) }++-- | Unset a custom 'WarningCategory'+wopt_unset_custom :: DynFlags -> WarningCategory -> DynFlags+wopt_unset_custom dfs f = dfs{ customWarningCategories = deleteWarningCategorySet f (customWarningCategories dfs) }++-- | Mark a custom 'WarningCategory' as fatal (do not set the flag)+wopt_set_fatal_custom :: DynFlags -> WarningCategory -> DynFlags+wopt_set_fatal_custom dfs f+ = dfs { fatalCustomWarningCategories = insertWarningCategorySet f (fatalCustomWarningCategories dfs) }++-- | Mark a custom 'WarningCategory' as not fatal+wopt_unset_fatal_custom :: DynFlags -> WarningCategory -> DynFlags+wopt_unset_fatal_custom dfs f+ = dfs { fatalCustomWarningCategories = deleteWarningCategorySet f (fatalCustomWarningCategories dfs) }++-- | Are there any custom warning categories enabled?+wopt_any_custom :: DynFlags -> Bool+wopt_any_custom dfs = not (nullWarningCategorySet (customWarningCategories dfs))+++-- | Test whether a 'LangExt.Extension' is set+xopt :: LangExt.Extension -> DynFlags -> Bool+xopt f dflags = f `EnumSet.member` extensionFlags dflags++-- | Set a 'LangExt.Extension'+xopt_set :: DynFlags -> LangExt.Extension -> DynFlags+xopt_set dfs f+ = let onoffs = On f : extensions dfs+ in dfs { extensions = onoffs,+ extensionFlags = flattenExtensionFlags (language dfs) onoffs }++-- | Unset a 'LangExt.Extension'+xopt_unset :: DynFlags -> LangExt.Extension -> DynFlags+xopt_unset dfs f+ = let onoffs = Off f : extensions dfs+ in dfs { extensions = onoffs,+ extensionFlags = flattenExtensionFlags (language dfs) onoffs }++-- | Set or unset a 'LangExt.Extension', unless it has been explicitly+-- set or unset before.+xopt_set_unlessExplSpec+ :: LangExt.Extension+ -> (DynFlags -> LangExt.Extension -> DynFlags)+ -> DynFlags -> DynFlags+xopt_set_unlessExplSpec ext setUnset dflags =+ let referedExts = stripOnOff <$> extensions dflags+ stripOnOff (On x) = x+ stripOnOff (Off x) = x+ in+ if ext `elem` referedExts then dflags else setUnset dflags ext++xopt_DuplicateRecordFields :: DynFlags -> FieldLabel.DuplicateRecordFields+xopt_DuplicateRecordFields dfs+ | xopt LangExt.DuplicateRecordFields dfs = FieldLabel.DuplicateRecordFields+ | otherwise = FieldLabel.NoDuplicateRecordFields++xopt_FieldSelectors :: DynFlags -> FieldLabel.FieldSelectors+xopt_FieldSelectors dfs+ | xopt LangExt.FieldSelectors dfs = FieldLabel.FieldSelectors+ | otherwise = FieldLabel.NoFieldSelectors++lang_set :: DynFlags -> Maybe Language -> DynFlags+lang_set dflags lang =+ dflags {+ language = lang,+ extensionFlags = flattenExtensionFlags lang (extensions dflags)+ }++defaultFlags :: Settings -> [GeneralFlag]+defaultFlags settings+-- See Note [Updating flag description in the User's Guide]+ = [ Opt_AutoLinkPackages,+ Opt_DiagnosticsShowCaret,+ Opt_EmbedManifest,+ Opt_FamAppCache,+ Opt_GenManifest,+ Opt_GhciHistory,+ Opt_GhciSandbox,+ Opt_HelpfulErrors,+ Opt_KeepHiFiles,+ Opt_KeepOFiles,+ Opt_OmitYields,+ Opt_PrintBindContents,+ Opt_ProfCountEntries,+ Opt_SharedImplib,+ Opt_SimplPreInlining,+ Opt_VersionMacros,+ Opt_RPath,+ Opt_DumpWithWays,+ Opt_CompactUnwind,+ Opt_ShowErrorContext,+ Opt_SuppressStgReps,+ Opt_UnoptimizedCoreForInterpreter,+ Opt_SpecialiseIncoherents+ ]++ ++ [f | (ns,f) <- optLevelFlags, 0 `elem` ns]+ -- The default -O0 options++ -- Default floating flags (see Note [RHS Floating])+ ++ [ Opt_LocalFloatOut, Opt_LocalFloatOutTopLevel ]+++ ++ default_PIC platform++ ++ 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 "GHC.Tc.Errors.Hole" module.+validHoleFitDefaults :: [GeneralFlag]+validHoleFitDefaults+ = [ Opt_ShowTypeAppOfHoleFits+ , Opt_ShowTypeOfHoleFits+ , Opt_ShowProvOfHoleFits+ , Opt_ShowMatchesOfHoleFits+ , Opt_ShowValidHoleFits+ , Opt_SortValidHoleFits+ , Opt_SortBySizeHoleFits+ , Opt_ShowHoleConstraints ]++-- 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 file is:+--+-- docs/users_guide/using-optimisation.rst+--+-- Make sure to note whether a flag is implied by -O0, -O or -O2.++optLevelFlags :: [([Int], GeneralFlag)]+-- Default settings of flags, before any command-line overrides+optLevelFlags -- see Note [Documenting optimisation flags]+ = [ ([0,1,2], Opt_DoLambdaEtaExpansion)+ , ([0,1,2], Opt_DoEtaReduction) -- See Note [Eta-reduction in -O0]+ , ([0,1,2], Opt_LlvmTBAA)+ , ([0,1,2], Opt_ProfManualCcs )+ , ([2], Opt_DictsStrict)++ , ([0], Opt_IgnoreInterfacePragmas)+ , ([0], Opt_OmitInterfacePragmas)++ , ([1,2], Opt_CoreConstantFolding)++ , ([1,2], Opt_CallArity)+ , ([1,2], Opt_Exitification)+ , ([1,2], Opt_CaseMerge)+ , ([1,2], Opt_CaseFolding)+ , ([1,2], Opt_CmmElimCommonBlocks)+ , ([2], Opt_AsmShortcutting)+ , ([1,2], Opt_CmmSink)+ , ([1,2], Opt_CmmStaticPred)+ , ([1,2], Opt_CSE)+ , ([1,2], Opt_StgCSE)+ , ([2], Opt_StgLiftLams)+ , ([1,2], Opt_CmmControlFlow)++ , ([1,2], Opt_EnableRewriteRules)+ -- Off for -O0. Otherwise we desugar list literals+ -- to 'build' but don't run the simplifier passes that+ -- would rewrite them back to cons cells! This seems+ -- silly, and matters for the GHCi debugger.++ , ([1,2], Opt_FloatIn)+ , ([1,2], Opt_FullLaziness)+ , ([1,2], Opt_IgnoreAsserts)+ , ([1,2], Opt_Loopification)+ , ([1,2], Opt_CfgBlocklayout) -- Experimental++ , ([1,2], Opt_Specialise)+ , ([1,2], Opt_CrossModuleSpecialise)+ , ([1,2], Opt_InlineGenerics)+ , ([1,2], Opt_Strictness)+ , ([1,2], Opt_UnboxSmallStrictFields)+ , ([1,2], Opt_CprAnal)+ , ([1,2], Opt_WorkerWrapper)+ , ([1,2], Opt_SolveConstantDicts)+ , ([1,2], Opt_NumConstantFolding)++ , ([2], Opt_LiberateCase)+ , ([2], Opt_SpecConstr)+ , ([2], Opt_FastPAPCalls)+-- , ([2], Opt_RegsGraph)+-- RegsGraph suffers performance regression. See #7679+-- , ([2], Opt_StaticArgumentTransformation)+-- Static Argument Transformation needs investigation. See #9374+ ]++type TurnOnFlag = Bool -- True <=> we are turning the flag on+ -- False <=> we are turning the flag off+turnOn :: TurnOnFlag; turnOn = True+turnOff :: TurnOnFlag; turnOff = False++default_PIC :: Platform -> [GeneralFlag]+default_PIC platform =+ case (platformOS platform, platformArch platform) of+ -- Darwin always requires PIC. Especially on more recent macOS releases+ -- there will be a 4GB __ZEROPAGE that prevents us from using 32bit addresses+ -- while we could work around this on x86_64 (like WINE does), we won't be+ -- able on aarch64, where this is enforced.+ (OSDarwin, ArchX86_64) -> [Opt_PIC]+ -- For AArch64, we need to always have PIC enabled. The relocation model+ -- on AArch64 does not permit arbitrary relocations. Under ASLR, we can't+ -- control much how far apart symbols are in memory for our in-memory static+ -- linker; and thus need to ensure we get sufficiently capable relocations.+ -- This requires PIC on AArch64, and ExternalDynamicRefs on Linux as on top+ -- of that. Subsequently we expect all code on aarch64/linux (and macOS) to+ -- be built with -fPIC.+ (OSDarwin, ArchAArch64) -> [Opt_PIC]+ (OSLinux, ArchAArch64) -> [Opt_PIC, Opt_ExternalDynamicRefs]+ (OSLinux, ArchARM {}) -> [Opt_PIC, Opt_ExternalDynamicRefs]+ (OSOpenBSD, ArchX86_64) -> [Opt_PIC] -- Due to PIE support in+ -- OpenBSD since 5.3 release+ -- (1 May 2013) we need to+ -- always generate PIC. See+ -- #10597 for more+ -- information.+ _ -> []++-- | The language extensions implied by the various language variants.+-- When updating this be sure to update the flag documentation in+-- @docs/users_guide/exts@.+languageExtensions :: Maybe Language -> [LangExt.Extension]++-- Nothing: the default case+languageExtensions Nothing = languageExtensions (Just GHC2021)++languageExtensions (Just Haskell98)+ = [LangExt.ImplicitPrelude,+ -- See Note [When is StarIsType enabled]+ LangExt.StarIsType,+ LangExt.CUSKs,+ LangExt.MonomorphismRestriction,+ LangExt.NPlusKPatterns,+ LangExt.DatatypeContexts,+ LangExt.TraditionalRecordSyntax,+ LangExt.FieldSelectors,+ LangExt.NondecreasingIndentation,+ -- strictly speaking non-standard, but we always had this+ -- on implicitly before the option was added in 7.1, and+ -- turning it off breaks code, so we're keeping it on for+ -- backwards compatibility. Cabal uses -XHaskell98 by+ -- default unless you specify another language.+ LangExt.DeepSubsumption+ -- Non-standard but enabled for backwards compatability (see GHC proposal #511)+ ]++languageExtensions (Just Haskell2010)+ = [LangExt.ImplicitPrelude,+ -- See Note [When is StarIsType enabled]+ LangExt.StarIsType,+ LangExt.CUSKs,+ LangExt.MonomorphismRestriction,+ LangExt.DatatypeContexts,+ LangExt.TraditionalRecordSyntax,+ LangExt.EmptyDataDecls,+ LangExt.ForeignFunctionInterface,+ LangExt.PatternGuards,+ LangExt.DoAndIfThenElse,+ LangExt.FieldSelectors,+ LangExt.RelaxedPolyRec,+ LangExt.DeepSubsumption ]++languageExtensions (Just GHC2021)+ = [LangExt.ImplicitPrelude,+ -- See Note [When is StarIsType enabled]+ LangExt.StarIsType,+ LangExt.MonomorphismRestriction,+ LangExt.TraditionalRecordSyntax,+ LangExt.EmptyDataDecls,+ LangExt.ForeignFunctionInterface,+ LangExt.PatternGuards,+ LangExt.DoAndIfThenElse,+ LangExt.FieldSelectors,+ LangExt.RelaxedPolyRec,+ -- Now the new extensions (not in Haskell2010)+ LangExt.BangPatterns,+ LangExt.BinaryLiterals,+ LangExt.ConstrainedClassMethods,+ LangExt.ConstraintKinds,+ LangExt.DeriveDataTypeable,+ LangExt.DeriveFoldable,+ LangExt.DeriveFunctor,+ LangExt.DeriveGeneric,+ LangExt.DeriveLift,+ LangExt.DeriveTraversable,+ LangExt.EmptyCase,+ LangExt.EmptyDataDeriving,+ LangExt.ExistentialQuantification,+ LangExt.ExplicitForAll,+ LangExt.FlexibleContexts,+ LangExt.FlexibleInstances,+ LangExt.GADTSyntax,+ LangExt.GeneralizedNewtypeDeriving,+ LangExt.HexFloatLiterals,+ LangExt.ImportQualifiedPost,+ LangExt.InstanceSigs,+ LangExt.KindSignatures,+ LangExt.MultiParamTypeClasses,+ LangExt.NamedFieldPuns,+ LangExt.NamedWildCards,+ LangExt.NumericUnderscores,+ LangExt.PolyKinds,+ LangExt.PostfixOperators,+ LangExt.RankNTypes,+ LangExt.ScopedTypeVariables,+ LangExt.StandaloneDeriving,+ LangExt.StandaloneKindSignatures,+ LangExt.TupleSections,+ LangExt.TypeApplications,+ LangExt.TypeOperators,+ LangExt.TypeSynonymInstances]+++ways :: DynFlags -> Ways+ways dflags+ | dynamicNow dflags = addWay WayDyn (targetWays_ dflags)+ | otherwise = targetWays_ dflags++-- | Get target profile+targetProfile :: DynFlags -> Profile+targetProfile dflags = Profile (targetPlatform dflags) (ways dflags)++--+-- System tool settings and locations++programName :: DynFlags -> String+programName dflags = ghcNameVersion_programName $ ghcNameVersion dflags+projectVersion :: DynFlags -> String+projectVersion dflags = ghcNameVersion_projectVersion (ghcNameVersion dflags)+ghcUsagePath :: DynFlags -> FilePath+ghcUsagePath dflags = fileSettings_ghcUsagePath $ fileSettings dflags+ghciUsagePath :: DynFlags -> FilePath+ghciUsagePath dflags = fileSettings_ghciUsagePath $ fileSettings dflags+topDir :: DynFlags -> FilePath+topDir dflags = fileSettings_topDir $ fileSettings dflags+toolDir :: DynFlags -> Maybe FilePath+toolDir dflags = fileSettings_toolDir $ fileSettings dflags+extraGccViaCFlags :: DynFlags -> [String]+extraGccViaCFlags dflags = toolSettings_extraGccViaCFlags $ toolSettings dflags+globalPackageDatabasePath :: DynFlags -> FilePath+globalPackageDatabasePath dflags = fileSettings_globalPackageDatabase $ fileSettings dflags++-- | The directory for this version of ghc in the user's app directory+-- The appdir used to be in ~/.ghc but to respect the XDG specification+-- we want to move it under $XDG_DATA_HOME/+-- However, old tooling (like cabal) might still write package environments+-- to the old directory, so we prefer that if a subdirectory of ~/.ghc+-- with the correct target and GHC version suffix exists.+--+-- i.e. if ~/.ghc/$UNIQUE_SUBDIR exists we use that+-- otherwise we use $XDG_DATA_HOME/$UNIQUE_SUBDIR+--+-- UNIQUE_SUBDIR is typically a combination of the target platform and GHC version+versionedAppDir :: String -> ArchOS -> MaybeT IO FilePath+versionedAppDir appname platform = do+ -- Make sure we handle the case the HOME isn't set (see #11678)+ -- We need to fallback to the old scheme if the subdirectory exists.+ msum $ map (checkIfExists <=< fmap (</> versionedFilePath platform))+ [ tryMaybeT $ getAppUserDataDirectory appname -- this is ~/.ghc/+ , tryMaybeT $ getXdgDirectory XdgData appname -- this is $XDG_DATA_HOME/+ ]+ where+ checkIfExists dir = tryMaybeT (doesDirectoryExist dir) >>= \case+ True -> pure dir+ False -> MaybeT (pure Nothing)++versionedFilePath :: ArchOS -> FilePath+versionedFilePath platform = uniqueSubdir platform++-- SDoc+-------------------------------------------++-- | Initialize the pretty-printing options+initSDocContext :: DynFlags -> PprStyle -> SDocContext+initSDocContext dflags style = SDC+ { sdocStyle = style+ , sdocColScheme = colScheme dflags+ , sdocLastColour = Col.colReset+ , sdocShouldUseColor = overrideWith (canUseColor dflags) (useColor dflags)+ , sdocDefaultDepth = pprUserLength dflags+ , sdocLineLength = pprCols dflags+ , sdocCanUseUnicode = useUnicode dflags+ , sdocHexWordLiterals = gopt Opt_HexWordLiterals dflags+ , sdocPprDebug = dopt Opt_D_ppr_debug dflags+ , sdocPrintUnicodeSyntax = gopt Opt_PrintUnicodeSyntax dflags+ , sdocPrintCaseAsLet = gopt Opt_PprCaseAsLet dflags+ , sdocPrintTypecheckerElaboration = gopt Opt_PrintTypecheckerElaboration dflags+ , sdocPrintAxiomIncomps = gopt Opt_PrintAxiomIncomps dflags+ , sdocPrintExplicitKinds = gopt Opt_PrintExplicitKinds dflags+ , sdocPrintExplicitCoercions = gopt Opt_PrintExplicitCoercions dflags+ , sdocPrintExplicitRuntimeReps = gopt Opt_PrintExplicitRuntimeReps dflags+ , sdocPrintExplicitForalls = gopt Opt_PrintExplicitForalls dflags+ , sdocPrintPotentialInstances = gopt Opt_PrintPotentialInstances dflags+ , sdocPrintEqualityRelations = gopt Opt_PrintEqualityRelations dflags+ , sdocSuppressTicks = gopt Opt_SuppressTicks dflags+ , sdocSuppressTypeSignatures = gopt Opt_SuppressTypeSignatures dflags+ , sdocSuppressTypeApplications = gopt Opt_SuppressTypeApplications dflags+ , sdocSuppressIdInfo = gopt Opt_SuppressIdInfo dflags+ , sdocSuppressCoercions = gopt Opt_SuppressCoercions dflags+ , sdocSuppressCoercionTypes = gopt Opt_SuppressCoercionTypes dflags+ , sdocSuppressUnfoldings = gopt Opt_SuppressUnfoldings dflags+ , sdocSuppressVarKinds = gopt Opt_SuppressVarKinds dflags+ , sdocSuppressUniques = gopt Opt_SuppressUniques dflags+ , sdocSuppressModulePrefixes = gopt Opt_SuppressModulePrefixes dflags+ , sdocSuppressStgExts = gopt Opt_SuppressStgExts dflags+ , sdocSuppressStgReps = gopt Opt_SuppressStgReps dflags+ , sdocErrorSpans = gopt Opt_ErrorSpans dflags+ , sdocStarIsType = xopt LangExt.StarIsType dflags+ , sdocLinearTypes = xopt LangExt.LinearTypes dflags+ , sdocListTuplePuns = True+ , sdocPrintTypeAbbreviations = True+ , sdocUnitIdForUser = ftext+ }++-- | Initialize the pretty-printing options using the default user style+initDefaultSDocContext :: DynFlags -> SDocContext+initDefaultSDocContext dflags = initSDocContext dflags defaultUserStyle++initPromotionTickContext :: DynFlags -> PromotionTickContext+initPromotionTickContext dflags =+ PromTickCtx {+ ptcListTuplePuns = True,+ ptcPrintRedundantPromTicks = gopt Opt_PrintRedundantPromotionTicks dflags+ }
GHC/Driver/Env.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE LambdaCase #-} module GHC.Driver.Env ( Hsc(..)@@ -42,7 +41,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Errors ( printOrThrowDiagnostics ) import GHC.Driver.Errors.Types ( GhcMessage ) import GHC.Driver.Config.Logger (initLogFlags)@@ -84,10 +83,7 @@ import Data.IORef import qualified Data.Set as Set-import Data.Set (Set) import GHC.Unit.Module.Graph-import Data.List (sort)-import qualified Data.Map as Map runHsc :: HscEnv -> Hsc a -> IO a runHsc hsc_env (Hsc hsc) = do@@ -267,35 +263,6 @@ hptAllThings extract hsc_env = concatMap (concatMap extract . eltsHpt . homeUnitEnv_hpt . snd) (hugElts (hsc_HUG hsc_env)) --- | This function returns all the modules belonging to the home-unit that can--- be reached by following the given dependencies. Additionally, if both the--- boot module and the non-boot module can be reached, it only returns the--- non-boot one.-hptModulesBelow :: HscEnv -> UnitId -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid-hptModulesBelow hsc_env uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- modules_below]- where- td_map = mgTransDeps (hsc_mod_graph hsc_env)-- modules_below = maybe [] Set.toList $ Map.lookup (NodeKey_Module (ModNodeKeyWithUid mn uid)) td_map-- filtered_mods = Set.fromDistinctAscList . filter_mods . sort-- -- IsBoot and NotBoot modules are necessarily consecutive in the sorted list- -- (cf Ord instance of GenWithIsBoot). Hence we only have to perform a- -- linear sweep with a window of size 2 to remove boot modules for which we- -- have the corresponding non-boot.- filter_mods = \case- (r1@(ModNodeKeyWithUid (GWIB m1 b1) uid1) : r2@(ModNodeKeyWithUid (GWIB m2 _) uid2): rs)- | m1 == m2 && uid1 == uid2 ->- let !r' = case b1 of- NotBoot -> r1- IsBoot -> r2- in r' : filter_mods rs- | otherwise -> r1 : filter_mods (r2:rs)- rs -> rs--- -- | Get things from modules "below" this one (in the dependency sense) -- C.f Inst.hptInstances hptSomeThingsBelowUs :: (HomeModInfo -> [a]) -> Bool -> HscEnv -> UnitId -> ModuleNameWithIsBoot -> [a]@@ -304,11 +271,12 @@ | otherwise = let hug = hsc_HUG hsc_env+ mg = hsc_mod_graph hsc_env in [ thing | -- Find each non-hi-boot module below me- (ModNodeKeyWithUid (GWIB { gwib_mod = mod, gwib_isBoot = is_boot }) mod_uid) <- Set.toList (hptModulesBelow hsc_env uid mn)+ (ModNodeKeyWithUid (GWIB { gwib_mod = mod, gwib_isBoot = is_boot }) mod_uid) <- Set.toList (moduleGraphModulesBelow mg uid mn) , include_hi_boot || (is_boot == NotBoot) -- unsavoury: when compiling the base package with --make, we@@ -324,7 +292,7 @@ Nothing -> pprTrace "WARNING in hptSomeThingsBelowUs" msg mempty msg = vcat [text "missing module" <+> ppr mod, text "When starting from" <+> ppr mn,- text "below:" <+> ppr (hptModulesBelow hsc_env uid mn),+ text "below:" <+> ppr (moduleGraphModulesBelow mg uid mn), text "Probable cause: out-of-date interface files"] -- This really shouldn't happen, but see #962 , thing <- things@@ -359,20 +327,23 @@ lookupType hsc_env name = do eps <- liftIO $ hscEPS hsc_env let pte = eps_PTE eps- hpt = hsc_HUG hsc_env+ return $ lookupTypeInPTE hsc_env pte name - mod = assertPpr (isExternalName name) (ppr name) $- if isHoleName name- then mkHomeModule (hsc_home_unit hsc_env) (moduleName (nameModule name))- else nameModule name+lookupTypeInPTE :: HscEnv -> PackageTypeEnv -> Name -> Maybe TyThing+lookupTypeInPTE hsc_env pte name = ty+ where+ hpt = hsc_HUG hsc_env+ mod = assertPpr (isExternalName name) (ppr name) $+ if isHoleName name+ then mkHomeModule (hsc_home_unit hsc_env) (moduleName (nameModule name))+ else nameModule name - !ty = if isOneShot (ghcMode (hsc_dflags hsc_env))- -- in one-shot, we don't use the HPT- then lookupNameEnv pte name- else case lookupHugByModule mod hpt of- Just hm -> lookupNameEnv (md_types (hm_details hm)) name- Nothing -> lookupNameEnv pte name- pure ty+ !ty = if isOneShot (ghcMode (hsc_dflags hsc_env))+ -- in one-shot, we don't use the HPT+ then lookupNameEnv pte name+ else case lookupHugByModule mod hpt of+ Just hm -> lookupNameEnv (md_types (hm_details hm)) name+ Nothing -> lookupNameEnv pte name -- | Find the 'ModIface' for a 'Module', searching in both the loaded home -- and external package module information
GHC/Driver/Env/Types.hs view
@@ -7,7 +7,7 @@ import GHC.Driver.Errors.Types ( GhcMessage ) import {-# SOURCE #-} GHC.Driver.Hooks-import GHC.Driver.Session ( ContainsDynFlags(..), HasDynFlags(..), DynFlags )+import GHC.Driver.DynFlags ( ContainsDynFlags(..), HasDynFlags(..), DynFlags ) import GHC.Driver.LlvmConfigCache (LlvmConfigCache) import GHC.Prelude
GHC/Driver/Errors.hs view
@@ -2,54 +2,38 @@ module GHC.Driver.Errors ( printOrThrowDiagnostics , printMessages- , handleFlagWarnings , mkDriverPsHeaderMessage ) where import GHC.Driver.Errors.Types-import GHC.Data.Bag import GHC.Prelude-import GHC.Types.SrcLoc import GHC.Types.SourceError import GHC.Types.Error import GHC.Utils.Error-import GHC.Utils.Outputable (hang, ppr, ($$), SDocContext, text, withPprStyle, mkErrStyle, sdocStyle )+import GHC.Utils.Outputable (hang, ppr, ($$), text, mkErrStyle, sdocStyle, updSDocContext ) import GHC.Utils.Logger-import qualified GHC.Driver.CmdLine as CmdLine printMessages :: forall a . Diagnostic a => Logger -> DiagnosticOpts a -> DiagOpts -> Messages a -> IO () printMessages logger msg_opts opts msgs = sequence_ [ let style = mkErrStyle name_ppr_ctx ctx = (diag_ppr_ctx opts) { sdocStyle = style }- in logMsg logger (MCDiagnostic sev (diagnosticReason dia) (diagnosticCode dia)) s $- withPprStyle style (messageWithHints ctx dia)+ in logMsg logger (MCDiagnostic sev reason (diagnosticCode dia)) s $+ updSDocContext (\_ -> ctx) (messageWithHints dia) | MsgEnvelope { errMsgSpan = s, errMsgDiagnostic = dia, errMsgSeverity = sev,+ errMsgReason = reason, errMsgContext = name_ppr_ctx } <- sortMsgBag (Just opts) (getMessages msgs) ] where- messageWithHints :: Diagnostic a => SDocContext -> a -> SDoc- messageWithHints ctx e =- let main_msg = formatBulleted ctx $ diagnosticMessage msg_opts e+ messageWithHints :: Diagnostic a => a -> SDoc+ messageWithHints e =+ let main_msg = formatBulleted $ diagnosticMessage msg_opts e in case diagnosticHints e of [] -> main_msg [h] -> main_msg $$ hang (text "Suggested fix:") 2 (ppr h) hs -> main_msg $$ hang (text "Suggested fixes:") 2- (formatBulleted ctx . mkDecorated . map ppr $ hs)--handleFlagWarnings :: Logger -> GhcMessageOpts -> DiagOpts -> [CmdLine.Warn] -> IO ()-handleFlagWarnings logger print_config opts warns = do- let -- It would be nicer if warns :: [Located SDoc], but that- -- has circular import problems.- bag = listToBag [ mkPlainMsgEnvelope opts loc $- GhcDriverMessage $- DriverUnknownMessage $- UnknownDiagnostic $- mkPlainDiagnostic reason noHints $ text warn- | CmdLine.Warn reason (L loc warn) <- warns ]-- printOrThrowDiagnostics logger print_config opts (mkMessages bag)+ (formatBulleted $ mkDecorated . map ppr $ hs) -- | Given a bag of diagnostics, turn them into an exception if -- any has 'SevError', or print them out otherwise.
GHC/Driver/Errors/Ppr.hs view
@@ -13,10 +13,9 @@ import GHC.Driver.Errors.Types import GHC.Driver.Flags-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.HsToCore.Errors.Ppr () import GHC.Parser.Errors.Ppr ()-import GHC.Tc.Errors.Ppr () import GHC.Types.Error import GHC.Types.Error.Codes ( constructorCode ) import GHC.Unit.Types@@ -30,6 +29,9 @@ import Language.Haskell.Syntax.Decls (RuleDecl(..)) import GHC.Tc.Errors.Types (TcRnMessage) import GHC.HsToCore.Errors.Types (DsMessage)+import GHC.Iface.Errors.Types+import GHC.Tc.Errors.Ppr ()+import GHC.Iface.Errors.Ppr () -- -- Suggestions@@ -40,12 +42,14 @@ suggestInstantiatedWith pi_mod_name insts = [ InstantiationSuggestion k v | (k,v) <- ((pi_mod_name, mkHoleModule pi_mod_name) : insts) ] -instance Diagnostic GhcMessage where- type DiagnosticOpts GhcMessage = GhcMessageOpts- defaultDiagnosticOpts = GhcMessageOpts (defaultDiagnosticOpts @PsMessage)+instance HasDefaultDiagnosticOpts GhcMessageOpts where+ defaultOpts = GhcMessageOpts (defaultDiagnosticOpts @PsMessage) (defaultDiagnosticOpts @TcRnMessage) (defaultDiagnosticOpts @DsMessage) (defaultDiagnosticOpts @DriverMessage)++instance Diagnostic GhcMessage where+ type DiagnosticOpts GhcMessage = GhcMessageOpts diagnosticMessage opts = \case GhcPsMessage m -> diagnosticMessage (psMessageOpts opts) m@@ -55,8 +59,8 @@ -> diagnosticMessage (dsMessageOpts opts) m GhcDriverMessage m -> diagnosticMessage (driverMessageOpts opts) m- GhcUnknownMessage (UnknownDiagnostic @e m)- -> diagnosticMessage (defaultDiagnosticOpts @e) m+ GhcUnknownMessage (UnknownDiagnostic f m)+ -> diagnosticMessage (f opts) m diagnosticReason = \case GhcPsMessage m@@ -84,12 +88,14 @@ diagnosticCode = constructorCode +instance HasDefaultDiagnosticOpts DriverMessageOpts where+ defaultOpts = DriverMessageOpts (defaultDiagnosticOpts @PsMessage) (defaultDiagnosticOpts @IfaceMessage)+ instance Diagnostic DriverMessage where type DiagnosticOpts DriverMessage = DriverMessageOpts- defaultDiagnosticOpts = DriverMessageOpts (defaultDiagnosticOpts @PsMessage) diagnosticMessage opts = \case- DriverUnknownMessage (UnknownDiagnostic @e m)- -> diagnosticMessage (defaultDiagnosticOpts @e) m+ DriverUnknownMessage (UnknownDiagnostic f m)+ -> diagnosticMessage (f opts) m DriverPsHeaderMessage m -> diagnosticMessage (psDiagnosticOpts opts) m DriverMissingHomeModules uid missing buildingCabalPackage@@ -218,7 +224,21 @@ -> mkSimpleDecorated $ vcat ([text "Home units are not closed." , text "It is necessary to also load the following units:" ] ++ map (\uid -> text "-" <+> ppr uid) needed_unit_ids)+ DriverInterfaceError reason -> diagnosticMessage (ifaceDiagnosticOpts opts) reason + DriverInconsistentDynFlags msg+ -> mkSimpleDecorated $ text msg+ DriverSafeHaskellIgnoredExtension ext+ -> let arg = text "-X" <> ppr ext+ in mkSimpleDecorated $ arg <+> text "is not allowed in Safe Haskell; ignoring" <+> arg+ DriverPackageTrustIgnored+ -> mkSimpleDecorated $ text "-fpackage-trust ignored; must be specified with a Safe Haskell flag"++ DriverUnrecognisedFlag arg+ -> mkSimpleDecorated $ text $ "unrecognised warning flag: -" ++ arg+ DriverDeprecatedFlag arg msg+ -> mkSimpleDecorated $ text $ arg ++ " is deprecated: " ++ msg+ diagnosticReason = \case DriverUnknownMessage m -> diagnosticReason m@@ -272,6 +292,17 @@ -> ErrorWithoutFlag DriverHomePackagesNotClosed {} -> ErrorWithoutFlag+ DriverInterfaceError reason -> diagnosticReason reason+ DriverInconsistentDynFlags {}+ -> WarningWithFlag Opt_WarnInconsistentFlags+ DriverSafeHaskellIgnoredExtension {}+ -> WarningWithoutFlag+ DriverPackageTrustIgnored {}+ -> WarningWithoutFlag+ DriverUnrecognisedFlag {}+ -> WarningWithFlag Opt_WarnUnrecognisedWarningFlags+ DriverDeprecatedFlag {}+ -> WarningWithFlag Opt_WarnDeprecatedFlags diagnosticHints = \case DriverUnknownMessage m@@ -327,6 +358,17 @@ DriverRedirectedNoMain {} -> noHints DriverHomePackagesNotClosed {}+ -> noHints+ DriverInterfaceError reason -> diagnosticHints reason+ DriverInconsistentDynFlags {}+ -> noHints+ DriverSafeHaskellIgnoredExtension {}+ -> noHints+ DriverPackageTrustIgnored {}+ -> noHints+ DriverUnrecognisedFlag {}+ -> noHints+ DriverDeprecatedFlag {} -> noHints diagnosticCode = constructorCode
GHC/Driver/Errors/Types.hs view
@@ -8,7 +8,6 @@ , DriverMessage(..) , DriverMessageOpts(..) , DriverMessages, PsMessage(PsHeaderMessage)- , BuildingCabalPackage(..) , WarningMessages , ErrorMessages , WarnMsg@@ -25,20 +24,24 @@ import Data.Bifunctor import Data.Typeable -import GHC.Driver.Session+import GHC.Driver.DynFlags (DynFlags, PackageArg, gopt)+import GHC.Driver.Flags (GeneralFlag (Opt_BuildingCabalPackage)) import GHC.Types.Error import GHC.Unit.Module import GHC.Unit.State import GHC.Parser.Errors.Types ( PsMessage(PsHeaderMessage) )-import GHC.Tc.Errors.Types ( TcRnMessage ) import GHC.HsToCore.Errors.Types ( DsMessage ) import GHC.Hs.Extension (GhcTc) import Language.Haskell.Syntax.Decls (RuleDecl)+import qualified GHC.LanguageExtensions as LangExt import GHC.Generics ( Generic ) +import GHC.Tc.Errors.Types+import GHC.Iface.Errors.Types+ -- | A collection of warning messages. -- /INVARIANT/: Each 'GhcMessage' in the collection should have 'SevWarning' severity. type WarningMessages = Messages GhcMessage@@ -90,7 +93,7 @@ -- 'Diagnostic' constraint ensures that worst case scenario we can still -- render this into something which can be eventually converted into a -- 'DecoratedSDoc'.- GhcUnknownMessage :: UnknownDiagnostic -> GhcMessage+ GhcUnknownMessage :: (UnknownDiagnostic (DiagnosticOpts GhcMessage)) -> GhcMessage deriving Generic @@ -108,7 +111,7 @@ -- GHC, as it would typically be used by plugin or library authors (see -- comment for the 'GhcUnknownMessage' type constructor) ghcUnknownMessage :: (DiagnosticOpts a ~ NoDiagnosticOpts, Diagnostic a, Typeable a) => a -> GhcMessage-ghcUnknownMessage = GhcUnknownMessage . UnknownDiagnostic+ghcUnknownMessage = GhcUnknownMessage . mkSimpleUnknownDiagnostic -- | Abstracts away the frequent pattern where we are calling 'ioMsgMaybe' on -- the result of 'IO (Messages TcRnMessage, a)'.@@ -126,7 +129,7 @@ -- | A message from the driver. data DriverMessage where -- | Simply wraps a generic 'Diagnostic' message @a@.- DriverUnknownMessage :: UnknownDiagnostic -> DriverMessage+ DriverUnknownMessage :: UnknownDiagnostic (DiagnosticOpts DriverMessage) -> DriverMessage -- | A parse error in parsing a Haskell file header during dependency -- analysis@@ -368,17 +371,25 @@ DriverHomePackagesNotClosed :: ![UnitId] -> DriverMessage + DriverInterfaceError :: !IfaceMessage -> DriverMessage++ -- TODO: Add structure messages rather than a String+ DriverInconsistentDynFlags :: String -> DriverMessage++ DriverSafeHaskellIgnoredExtension :: !LangExt.Extension -> DriverMessage++ DriverPackageTrustIgnored :: DriverMessage++ DriverUnrecognisedFlag :: String -> DriverMessage++ DriverDeprecatedFlag :: String -> String -> DriverMessage+ deriving instance Generic DriverMessage data DriverMessageOpts =- DriverMessageOpts { psDiagnosticOpts :: DiagnosticOpts PsMessage }+ DriverMessageOpts { psDiagnosticOpts :: DiagnosticOpts PsMessage+ , ifaceDiagnosticOpts :: DiagnosticOpts IfaceMessage } --- | Pass to a 'DriverMessage' the information whether or not the--- '-fbuilding-cabal-package' flag is set.-data BuildingCabalPackage- = YesBuildingCabalPackage- | NoBuildingCabalPackage- deriving Eq -- | Checks if we are building a cabal package by consulting the 'DynFlags'. checkBuildingCabalPackage :: DynFlags -> BuildingCabalPackage
GHC/Driver/Flags.hs view
@@ -8,11 +8,17 @@ , codeGenFlags -- * Warnings+ , WarningGroup(..)+ , warningGroupName+ , warningGroupFlags+ , warningGroupIncludesExtendedWarnings , WarningFlag(..) , warnFlagNames , warningGroups , warningHierarchies , smallestWarningGroups+ , smallestWarningGroupsForCategory+ , standardWarnings , minusWOpts , minusWallOpts@@ -47,7 +53,7 @@ -- | Debugging flags data DumpFlag--- See Note [Updating flag description in the User's Guide]+-- See Note [Updating flag description in the User's Guide] in GHC.Driver.Session -- debugging flags = Opt_D_dump_cmm@@ -102,6 +108,7 @@ | Opt_D_dump_simpl | Opt_D_dump_simpl_iterations | Opt_D_dump_spec+ | Opt_D_dump_spec_constr | Opt_D_dump_prep | Opt_D_dump_late_cc | Opt_D_dump_stg_from_core -- ^ Initial STG (CoreToStg output)@@ -121,6 +128,10 @@ | Opt_D_dump_types | Opt_D_dump_rules | Opt_D_dump_cse+ | Opt_D_dump_float_out+ | Opt_D_dump_float_in+ | Opt_D_dump_liberate_case+ | Opt_D_dump_static_argument_transformation | Opt_D_dump_worker_wrapper | Opt_D_dump_rn_trace | Opt_D_dump_rn_stats@@ -150,7 +161,6 @@ | Opt_D_no_debug_output | Opt_D_dump_faststrings | Opt_D_faststring_stats- | Opt_D_ipe_stats deriving (Eq, Show, Enum) -- | Helper function to query whether a given `DumpFlag` is enabled or not.@@ -195,7 +205,7 @@ -- | Enumerates the simple on-or-off dynamic flags data GeneralFlag--- See Note [Updating flag description in the User's Guide]+-- See Note [Updating flag description in the User's Guide] in GHC.Driver.Session = Opt_DumpToFile -- ^ Append dump output to files instead of stdout. | Opt_DumpWithWays -- ^ Use foo.ways.<dumpFlag> instead of foo.<dumpFlag>@@ -213,8 +223,6 @@ | Opt_DistinctConstructorTables | Opt_InfoTableMap- | Opt_InfoTableMapWithFallback- | Opt_InfoTableMapWithStack | Opt_WarnIsError -- -Werror; makes warnings fatal | Opt_ShowWarnGroups -- Show the group a warning belongs to@@ -260,6 +268,7 @@ | Opt_LiberateCase | Opt_SpecConstr | Opt_SpecConstrKeen+ | Opt_SpecialiseIncoherents | Opt_DoLambdaEtaExpansion | Opt_IgnoreAsserts | Opt_DoEtaReduction@@ -298,10 +307,7 @@ | Opt_NumConstantFolding | Opt_CoreConstantFolding | Opt_FastPAPCalls -- #6084- | Opt_SpecEval- | Opt_SpecEvalDictFun -- See Note [Controlling Speculative Evaluation] - -- Inference flags | Opt_DoTagInferenceChecks @@ -316,6 +322,9 @@ | Opt_WriteInterface -- forces .hi files to be written even with -fno-code | Opt_WriteHie -- generate .hie files + -- JavaScript opts+ | Opt_DisableJsMinifier -- ^ render JavaScript pretty-printed instead of minified (compacted)+ -- profiling opts | Opt_AutoSccsOnIndividualCafs | Opt_ProfCountEntries@@ -348,6 +357,7 @@ | Opt_BuildingCabalPackage | Opt_IgnoreDotGhci | Opt_GhciSandbox+ | Opt_InsertBreakpoints | Opt_GhciHistory | Opt_GhciLeakCheck | Opt_ValidateHie@@ -389,6 +399,7 @@ | Opt_KeepGoing | Opt_ByteCode | Opt_ByteCodeAndObjectCode+ | Opt_UnoptimizedCoreForInterpreter | Opt_LinkRts -- output style opts@@ -525,8 +536,6 @@ , Opt_WorkerWrapper , Opt_WorkerWrapperUnlift , Opt_SolveConstantDicts- , Opt_SpecEval- , Opt_SpecEvalDictFun ] -- | The set of flags which affect code generation and can change a program's@@ -568,12 +577,10 @@ -- Flags that affect debugging information , Opt_DistinctConstructorTables , Opt_InfoTableMap- , Opt_InfoTableMapWithStack- , Opt_InfoTableMapWithFallback ] data WarningFlag =--- See Note [Updating flag description in the User's Guide]+-- See Note [Updating flag description in the User's Guide] in GHC.Driver.Session Opt_WarnDuplicateExports | Opt_WarnDuplicateConstraints | Opt_WarnRedundantConstraints@@ -603,7 +610,6 @@ | Opt_WarnUnusedRecordWildcards | Opt_WarnRedundantBangPatterns | Opt_WarnRedundantRecordWildcards- | Opt_WarnWarningsDeprecations | Opt_WarnDeprecatedFlags | Opt_WarnMissingMonadFailInstances -- since 8.0, has no effect since 8.8 | Opt_WarnSemigroup -- since 8.0@@ -664,6 +670,7 @@ | Opt_WarnAmbiguousFields -- Since 9.2 | Opt_WarnImplicitLift -- Since 9.2 | Opt_WarnMissingKindSignatures -- Since 9.2+ | Opt_WarnMissingPolyKindSignatures -- Since 9.8 | Opt_WarnMissingExportedPatternSynonymSignatures -- since 9.2 | Opt_WarnRedundantStrictnessFlags -- Since 9.4 | Opt_WarnForallIdentifier -- Since 9.4@@ -672,7 +679,12 @@ | Opt_WarnTypeEqualityOutOfScope -- Since 9.4 | Opt_WarnTypeEqualityRequiresOperators -- Since 9.4 | Opt_WarnLoopySuperclassSolve -- Since 9.6- deriving (Eq, Ord, Show, Enum, Bounded)+ | Opt_WarnTermVariableCapture -- Since 9.8+ | Opt_WarnMissingRoleAnnotations -- Since 9.8+ | Opt_WarnImplicitRhsQuantification -- Since 9.8+ | Opt_WarnIncompleteExportWarnings -- Since 9.8+ | Opt_WarnInconsistentFlags -- Since 9.8+ deriving (Eq, Ord, Show, Enum) -- | Return the names of a WarningFlag --@@ -683,11 +695,11 @@ Opt_WarnAlternativeLayoutRuleTransitional -> "alternative-layout-rule-transitional" :| [] Opt_WarnAmbiguousFields -> "ambiguous-fields" :| [] Opt_WarnAutoOrphans -> "auto-orphans" :| []+ Opt_WarnTermVariableCapture -> "term-variable-capture" :| [] Opt_WarnCPPUndef -> "cpp-undef" :| [] Opt_WarnUnbangedStrictPatterns -> "unbanged-strict-patterns" :| [] Opt_WarnDeferredTypeErrors -> "deferred-type-errors" :| [] Opt_WarnDeferredOutOfScopeVariables -> "deferred-out-of-scope-variables" :| []- Opt_WarnWarningsDeprecations -> "deprecations" :| ["warnings-deprecations"] Opt_WarnDeprecatedFlags -> "deprecated-flags" :| [] Opt_WarnDerivingDefaults -> "deriving-defaults" :| [] Opt_WarnDerivingTypeable -> "deriving-typeable" :| []@@ -716,6 +728,7 @@ Opt_WarnSemigroup -> "semigroup" :| [] Opt_WarnMissingSignatures -> "missing-signatures" :| [] Opt_WarnMissingKindSignatures -> "missing-kind-signatures" :| []+ Opt_WarnMissingPolyKindSignatures -> "missing-poly-kind-signatures" :| [] Opt_WarnMissingExportedSignatures -> "missing-exported-signatures" :| [] Opt_WarnMonomorphism -> "monomorphism-restriction" :| [] Opt_WarnNameShadowing -> "name-shadowing" :| []@@ -778,6 +791,10 @@ Opt_WarnTypeEqualityOutOfScope -> "type-equality-out-of-scope" :| [] Opt_WarnLoopySuperclassSolve -> "loopy-superclass-solve" :| [] Opt_WarnTypeEqualityRequiresOperators -> "type-equality-requires-operators" :| []+ Opt_WarnMissingRoleAnnotations -> "missing-role-annotations" :| []+ Opt_WarnImplicitRhsQuantification -> "implicit-rhs-quantification" :| []+ Opt_WarnIncompleteExportWarnings -> "incomplete-export-warnings" :| []+ Opt_WarnInconsistentFlags -> "inconsistent-flags" :| [] -- ----------------------------------------------------------------------------- -- Standard sets of warning options@@ -785,24 +802,62 @@ -- Note [Documenting warning flags] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ----- If you change the list of warning enabled by default+-- If you change the list of warnings enabled by default -- please remember to update the User's Guide. The relevant file is: -- -- docs/users_guide/using-warnings.rst ++-- | A group of warning flags that can be enabled or disabled collectively,+-- e.g. using @-Wcompat@ to enable all warnings in the 'W_compat' group.+data WarningGroup = W_compat+ | W_unused_binds+ | W_extended_warnings+ | W_default+ | W_extra+ | W_all+ | W_everything+ deriving (Bounded, Enum, Eq)++warningGroupName :: WarningGroup -> String+warningGroupName W_compat = "compat"+warningGroupName W_unused_binds = "unused-binds"+warningGroupName W_extended_warnings = "extended-warnings"+warningGroupName W_default = "default"+warningGroupName W_extra = "extra"+warningGroupName W_all = "all"+warningGroupName W_everything = "everything"++warningGroupFlags :: WarningGroup -> [WarningFlag]+warningGroupFlags W_compat = minusWcompatOpts+warningGroupFlags W_unused_binds = unusedBindsFlags+warningGroupFlags W_extended_warnings = []+warningGroupFlags W_default = standardWarnings+warningGroupFlags W_extra = minusWOpts+warningGroupFlags W_all = minusWallOpts+warningGroupFlags W_everything = minusWeverythingOpts++-- | Does this warning group contain (all) extended warning categories? See+-- Note [Warning categories] in GHC.Unit.Module.Warnings.+--+-- The 'W_extended_warnings' group contains extended warnings but no+-- 'WarningFlag's, but extended warnings are also treated as part of 'W_default'+-- and every warning group that includes it.+warningGroupIncludesExtendedWarnings :: WarningGroup -> Bool+warningGroupIncludesExtendedWarnings W_compat = False+warningGroupIncludesExtendedWarnings W_unused_binds = False+warningGroupIncludesExtendedWarnings W_extended_warnings = True+warningGroupIncludesExtendedWarnings W_default = True+warningGroupIncludesExtendedWarnings W_extra = True+warningGroupIncludesExtendedWarnings W_all = True+warningGroupIncludesExtendedWarnings W_everything = True+ -- | Warning groups. -- -- As all warnings are in the Weverything set, it is ignored when -- displaying to the user which group a warning is in.-warningGroups :: [(String, [WarningFlag])]-warningGroups =- [ ("compat", minusWcompatOpts)- , ("unused-binds", unusedBindsFlags)- , ("default", standardWarnings)- , ("extra", minusWOpts)- , ("all", minusWallOpts)- , ("everything", minusWeverythingOpts)- ]+warningGroups :: [WarningGroup]+warningGroups = [minBound..maxBound] -- | Warning group hierarchies, where there is an explicit inclusion -- relation.@@ -815,31 +870,34 @@ -- hierarchies with no inherent relation to be defined. -- -- The special-case Weverything group is not included.-warningHierarchies :: [[String]]+warningHierarchies :: [[WarningGroup]] warningHierarchies = hierarchies ++ map (:[]) rest where- hierarchies = [["default", "extra", "all"]]- rest = filter (`notElem` "everything" : concat hierarchies) $- map fst warningGroups+ hierarchies = [[W_default, W_extra, W_all]]+ rest = filter (`notElem` W_everything : concat hierarchies) warningGroups -- | Find the smallest group in every hierarchy which a warning -- belongs to, excluding Weverything.-smallestWarningGroups :: WarningFlag -> [String]+smallestWarningGroups :: WarningFlag -> [WarningGroup] smallestWarningGroups flag = mapMaybe go warningHierarchies where -- Because each hierarchy is arranged from smallest to largest, -- the first group we find in a hierarchy which contains the flag -- is the smallest. go (group:rest) = fromMaybe (go rest) $ do- flags <- lookup group warningGroups- guard (flag `elem` flags)+ guard (flag `elem` warningGroupFlags group) pure (Just group) go [] = Nothing +-- | The smallest group in every hierarchy to which a custom warning+-- category belongs is currently always @-Wextended-warnings@.+-- See Note [Warning categories] in "GHC.Unit.Module.Warnings".+smallestWarningGroupsForCategory :: [WarningGroup]+smallestWarningGroupsForCategory = [W_extended_warnings]+ -- | Warnings enabled unless specified otherwise standardWarnings :: [WarningFlag] standardWarnings -- see Note [Documenting warning flags] = [ Opt_WarnOverlappingPatterns,- Opt_WarnWarningsDeprecations, Opt_WarnDeprecatedFlags, Opt_WarnDeferredTypeErrors, Opt_WarnTypedHoles,@@ -875,7 +933,8 @@ Opt_WarnUnicodeBidirectionalFormatCharacters, Opt_WarnGADTMonoLocalBinds, Opt_WarnLoopySuperclassSolve,- Opt_WarnTypeEqualityRequiresOperators+ Opt_WarnTypeEqualityRequiresOperators,+ Opt_WarnInconsistentFlags ] -- | Things you get with -W@@ -909,7 +968,8 @@ Opt_WarnUnusedRecordWildcards, Opt_WarnRedundantRecordWildcards, Opt_WarnIncompleteUniPatterns,- Opt_WarnIncompletePatternsRecUpd+ Opt_WarnIncompletePatternsRecUpd,+ Opt_WarnIncompleteExportWarnings ] -- | Things you get with -Weverything, i.e. *all* known warnings flags@@ -925,8 +985,10 @@ minusWcompatOpts = [ Opt_WarnSemigroup , Opt_WarnNonCanonicalMonoidInstances+ , Opt_WarnNonCanonicalMonadInstances , Opt_WarnCompatUnqualifiedImports , Opt_WarnTypeEqualityOutOfScope+ , Opt_WarnImplicitRhsQuantification ] -- | Things you get with -Wunused-binds
GHC/Driver/GenerateCgIPEStub.hs view
@@ -1,40 +1,37 @@-{-# LANGUAGE GADTs #-}+{-# LANGUAGE GADTs #-} -module GHC.Driver.GenerateCgIPEStub (generateCgIPEStub, lookupEstimatedTicks) where+module GHC.Driver.GenerateCgIPEStub (generateCgIPEStub) where -import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map-import Data.Semigroup ((<>))+import Data.Maybe (mapMaybe, listToMaybe) import GHC.Cmm-import GHC.Cmm.CLabel (CLabel, mkAsmTempLabel)-import GHC.Cmm.Dataflow (O)+import GHC.Cmm.CLabel (CLabel)+import GHC.Cmm.Dataflow (Block, C, O) import GHC.Cmm.Dataflow.Block (blockSplit, blockToList)-import GHC.Cmm.Dataflow.Collections+import GHC.Cmm.Dataflow.Collections (mapToList) import GHC.Cmm.Dataflow.Label (Label) import GHC.Cmm.Info.Build (emptySRT) import GHC.Cmm.Pipeline (cmmPipeline)+import GHC.Data.Maybe (firstJusts) import GHC.Data.Stream (Stream, liftIO) import qualified GHC.Data.Stream as Stream import GHC.Driver.Env (hsc_dflags, hsc_logger) import GHC.Driver.Env.Types (HscEnv)-import GHC.Driver.Flags (GeneralFlag (..), DumpFlag(Opt_D_ipe_stats))-import GHC.Driver.Session (gopt, targetPlatform)+import GHC.Driver.Flags (GeneralFlag (Opt_InfoTableMap))+import GHC.Driver.DynFlags (gopt, targetPlatform) import GHC.Driver.Config.StgToCmm import GHC.Driver.Config.Cmm import GHC.Prelude import GHC.Runtime.Heap.Layout (isStackRep)-import GHC.Settings (platformTablesNextToCode)+import GHC.Settings (Platform, platformTablesNextToCode) import GHC.StgToCmm.Monad (getCmm, initC, runC, initFCodeState) import GHC.StgToCmm.Prof (initInfoTableProv) import GHC.StgToCmm.Types (CmmCgInfos (..), ModuleLFInfos)-import GHC.StgToCmm.Utils import GHC.Types.IPE (InfoTableProvMap (provInfoTables), IpeSourceLocation) import GHC.Types.Name.Set (NonCaffySet) import GHC.Types.Tickish (GenTickish (SourceNote))-import GHC.Unit.Types (Module, moduleName)-import GHC.Unit.Module (moduleNameString)-import qualified GHC.Utils.Logger as Logger-import GHC.Utils.Outputable (ppr)+import GHC.Unit.Types (Module)+import GHC.Utils.Misc {- Note [Stacktraces from Info Table Provenance Entries (IPE based stack unwinding)]@@ -55,16 +52,10 @@ This leads to the question: How to figure out the source location of a return frame? -The algorithm for determining source locations for stack info tables is implemented in-`lookupEstimatedTicks` as two passes over every 'CmmGroupSRTs'. The first pass generates estimated-source locations for any labels potentially corresponding to stack info tables in the Cmm code. The-second pass walks over the Cmm decls and creates an entry in the IPE map for every info table,-looking up source locations for stack info tables in the map generated during the first pass.--The rest of this note will document exactly how the first pass generates the map from labels to-estimated source positions. The algorithms are different depending on whether tables-next-to-code-is on or off. Both algorithms have in common that we are looking for a `CmmNode.CmmTick`-(containing a `SourceNote`) that is near what we estimate to be the label of a return stack frame.+While the lookup algorithms when tables-next-to-code is on/off differ in details, they have in+common that we want to lookup the `CmmNode.CmmTick` (containing a `SourceNote`) that is nearest+(before) the usage of the return frame's label. (Which label and label type is used differs between+these two use cases.) With tables-next-to-code ~~~~~~~~~~~~~~~~~~~~~~~~@@ -116,15 +107,15 @@ Here we use the fact, that calls (represented by `CmmNode.CmmCall`) are always closed on exit (`CmmNode O C`, `O` means open, `C` closed). In other words, they are always at the end of a block. -So, given a `CmmGraph`:- - Look at the end of every block: If it is a `CmmNode.CmmCall` returning to some label, lookup- the nearest `CmmNode.CmmTick` by traversing the middle part of the block backwards (from end to- beginning).- - Take the first `CmmNode.CmmTick` that contains a `Tickish.SourceNote` and map the label we- found to it's payload as an `IpeSourceLocation`. (There are other `Tickish` constructors like- `ProfNote` or `HpcTick`, these are ignored.)--See `labelsToSourcesWithTNTC` for the implementation of this algorithm.+So, given a stack represented info table (likely representing a return frame, but this isn't completely+sure as there are e.g. update frames, too) with it's label (`c18g` in the example above) and a `CmmGraph`:+ - Look at the end of every block, if it's a `CmmNode.CmmCall` returning to the continuation with the+ label of the return frame.+ - If there's such a call, lookup the nearest `CmmNode.CmmTick` by traversing the middle part of the block+ backwards (from end to beginning).+ - Take the first `CmmNode.CmmTick` that contains a `Tickish.SourceNote` and return it's payload as+ `IpeSourceLocation`. (There are other `Tickish` constructors like `ProfNote` or `HpcTick`, these are+ ignored.) Without tables-next-to-code ~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -179,27 +170,16 @@ Notice, that this cannot be done with the `Label` `c18M`, but with the `CLabel` `block_c18M_info` (`label: block_c18M_info` is actually a `CLabel`). -Given a `CmmGraph`:- - Check every `CmmBlock` from top (first) to bottom (last).- - If a `CmmTick` holding a `SourceNote` is found, remember the source location in the tick.- - If an assignment of the form `... = block_c18M_info;` (a `CmmStore` whose RHS is a- `CmmLit (CmmLabel l)`) is found, map that label to the most recently visited source note's- location.--See `labelsToSourcesSansTNTC` for the implementation of this algorithm.+The find the tick:+ - Every `Block` is checked from top (first) to bottom (last) node for an assignment like+ `I64[Sp - 24] = block_c18M_info;`. The lefthand side is actually ignored.+ - If such an assignment is found the search is over, because the payload (content of+ `Tickish.SourceNote`, represented as `IpeSourceLocation`) of last visited tick is always+ remembered in a `Maybe`. -} -generateCgIPEStub- :: HscEnv- -> Module- -> InfoTableProvMap- -> ( NonCaffySet- , ModuleLFInfos- , Map CmmInfoTable (Maybe IpeSourceLocation)- , IPEStats- )- -> Stream IO CmmGroupSRTs CmmCgInfos-generateCgIPEStub hsc_env this_mod denv (nonCaffySet, moduleLFInfos, infoTablesWithTickishes, initStats) = do+generateCgIPEStub :: HscEnv -> Module -> InfoTableProvMap -> Stream IO CmmGroupSRTs (NonCaffySet, ModuleLFInfos) -> Stream IO CmmGroupSRTs CmmCgInfos+generateCgIPEStub hsc_env this_mod denv s = do let dflags = hsc_dflags hsc_env platform = targetPlatform dflags logger = hsc_logger hsc_env@@ -207,169 +187,82 @@ cmm_cfg = initCmmConfig dflags cgState <- liftIO initC + -- Collect info tables, but only if -finfo-table-map is enabled, otherwise labeledInfoTablesWithTickishes is empty.+ let collectFun = if gopt Opt_InfoTableMap dflags then collect platform else collectNothing+ (labeledInfoTablesWithTickishes, (nonCaffySet, moduleLFInfos)) <- Stream.mapAccumL_ collectFun [] s+ -- Yield Cmm for Info Table Provenance Entries (IPEs)- let denv' = denv {provInfoTables = Map.mapKeys cit_lbl infoTablesWithTickishes}- ((mIpeStub, ipeCmmGroup), _) = runC (initStgToCmmConfig dflags this_mod) fstate cgState $ getCmm (initInfoTableProv initStats (Map.keys infoTablesWithTickishes) denv')+ let denv' = denv {provInfoTables = Map.fromList (map (\(_, i, t) -> (cit_lbl i, t)) labeledInfoTablesWithTickishes)}+ ((ipeStub, ipeCmmGroup), _) = runC (initStgToCmmConfig dflags this_mod) fstate cgState $ getCmm (initInfoTableProv (map sndOf3 labeledInfoTablesWithTickishes) denv') (_, ipeCmmGroupSRTs) <- liftIO $ cmmPipeline logger cmm_cfg (emptySRT this_mod) ipeCmmGroup Stream.yield ipeCmmGroupSRTs - ipeStub <-- case mIpeStub of- Just (stats, stub) -> do- -- Print ipe stats if requested- liftIO $- Logger.putDumpFileMaybe logger- Opt_D_ipe_stats- ("IPE Stats for module " ++ (moduleNameString $ moduleName this_mod))- Logger.FormatText- (ppr stats)- return stub- Nothing -> return mempty- return CmmCgInfos {cgNonCafs = nonCaffySet, cgLFInfos = moduleLFInfos, cgIPEStub = ipeStub}---- | Given:--- * an initial mapping from info tables to possible source locations,--- * initial 'IPEStats',--- * a 'CmmGroupSRTs',------ map every info table listed in the 'CmmProc's of the group to their possible--- source locations and update 'IPEStats' for skipped stack info tables (in case--- both -finfo-table-map and -fno-info-table-map-with-stack were given). See:--- Note [Stacktraces from Info Table Provenance Entries (IPE based stack unwinding)]------ Note: While it would be cleaner if we could keep the recursion and--- accumulation internal to this function, this cannot be done without--- separately traversing stream of 'CmmGroupSRTs' in 'GHC.Driver.Main'. The--- initial implementation of this logic did such a thing, and code generation--- performance suffered considerably as a result (see #23103).-lookupEstimatedTicks- :: HscEnv- -> Map CmmInfoTable (Maybe IpeSourceLocation)- -> IPEStats- -> CmmGroupSRTs- -> IO (Map CmmInfoTable (Maybe IpeSourceLocation), IPEStats)-lookupEstimatedTicks hsc_env ipes stats cmm_group_srts =- -- Pass 2: Create an entry in the IPE map for every info table listed in- -- this CmmGroupSRTs. If the info table is a stack info table and- -- -finfo-table-map-with-stack is enabled, look up its estimated source- -- location in the map generate during Pass 1. If the info table is a stack- -- info table and -finfo-table-map-with-stack is not enabled, skip the table- -- and note it as skipped in the IPE stats. If the info table is not a stack- -- info table, insert into the IPE map with no source location information- -- (for now; see `convertInfoProvMap` in GHC.StgToCmm.Utils to see how source- -- locations for these tables get filled in)- pure $ foldl' collectInfoTables (ipes, stats) cmm_group_srts where- dflags = hsc_dflags hsc_env- platform = targetPlatform dflags+ collect :: Platform -> [(Label, CmmInfoTable, Maybe IpeSourceLocation)] -> CmmGroupSRTs -> IO ([(Label, CmmInfoTable, Maybe IpeSourceLocation)], CmmGroupSRTs)+ collect platform acc cmmGroupSRTs = do+ let labelsToInfoTables = collectInfoTables cmmGroupSRTs+ labelsToInfoTablesToTickishes = map (\(l, i) -> (l, i, lookupEstimatedTick platform cmmGroupSRTs l i)) labelsToInfoTables+ return (acc ++ labelsToInfoTablesToTickishes, cmmGroupSRTs) - -- Pass 1: Map every label meeting the conditions described in Note- -- [Stacktraces from Info Table Provenance Entries (IPE based stack- -- unwinding)] to the estimated source location (also as described in the- -- aformentioned note)- --- -- Note: It's important that this remains a thunk so we do not compute this- -- map if -fno-info-table-with-stack is given- labelsToSources :: Map CLabel IpeSourceLocation- labelsToSources =- if platformTablesNextToCode platform then- foldl' labelsToSourcesWithTNTC Map.empty cmm_group_srts- else- foldl' labelsToSourcesSansTNTC Map.empty cmm_group_srts+ collectNothing :: [a] -> CmmGroupSRTs -> IO ([a], CmmGroupSRTs)+ collectNothing _ cmmGroupSRTs = pure ([], cmmGroupSRTs) - collectInfoTables- :: (Map CmmInfoTable (Maybe IpeSourceLocation), IPEStats)- -> GenCmmDecl RawCmmStatics CmmTopInfo CmmGraph- -> (Map CmmInfoTable (Maybe IpeSourceLocation), IPEStats)- collectInfoTables (!acc, !stats) (CmmProc h _ _ _) =- mapFoldlWithKey go (acc, stats) (info_tbls h)- where- go :: (Map CmmInfoTable (Maybe IpeSourceLocation), IPEStats)- -> Label- -> CmmInfoTable- -> (Map CmmInfoTable (Maybe IpeSourceLocation), IPEStats)- go (!acc, !stats) lbl' tbl =- let- lbl =- if platformTablesNextToCode platform then- -- TNTC case, the mapped CLabel will be the result of- -- mkAsmTempLabel on the info table label- mkAsmTempLabel lbl'- else- -- Non-TNTC case, the mapped CLabel will be the CLabel of the- -- info table itself- cit_lbl tbl- in- if (isStackRep . cit_rep) tbl then- if gopt Opt_InfoTableMapWithStack dflags then- -- This is a stack info table and we DO want to put it in the- -- info table map- (Map.insert tbl (Map.lookup lbl labelsToSources) acc, stats)- else- -- This is a stack info table but we DO NOT want to put it in- -- the info table map (-fno-info-table-map-with-stack was- -- given), track it as skipped- (acc, stats <> skippedIpeStats)- else- -- This is not a stack info table, so put it in the map with no- -- source location (for now)- (Map.insert tbl Nothing acc, stats)- collectInfoTables (!acc, !stats) _ = (acc, stats)+ collectInfoTables :: CmmGroupSRTs -> [(Label, CmmInfoTable)]+ collectInfoTables cmmGroup = concat $ mapMaybe extractInfoTables cmmGroup --- | See Note [Stacktraces from Info Table Provenance Entries (IPE based stack unwinding)]-labelsToSourcesWithTNTC- :: Map CLabel IpeSourceLocation- -> GenCmmDecl RawCmmStatics CmmTopInfo CmmGraph- -> Map CLabel IpeSourceLocation-labelsToSourcesWithTNTC acc (CmmProc _ _ _ cmm_graph) =- foldl' go acc (toBlockList cmm_graph)- where- go :: Map CLabel IpeSourceLocation -> CmmBlock -> Map CLabel IpeSourceLocation- go acc block =- case (,) <$> returnFrameLabel <*> lastTickInBlock of- Just (clabel, src_loc) -> Map.insert clabel src_loc acc- Nothing -> acc+ extractInfoTables :: GenCmmDecl RawCmmStatics CmmTopInfo CmmGraph -> Maybe [(Label, CmmInfoTable)]+ extractInfoTables (CmmProc h _ _ _) = Just $ mapToList (info_tbls h)+ extractInfoTables _ = Nothing++ lookupEstimatedTick :: Platform -> CmmGroupSRTs -> Label -> CmmInfoTable -> Maybe IpeSourceLocation+ lookupEstimatedTick platform cmmGroup infoTableLabel infoTable = do+ -- All return frame info tables are stack represented, though not all stack represented info+ -- tables have to be return frames.+ if (isStackRep . cit_rep) infoTable+ then do+ let findFun =+ if platformTablesNextToCode platform+ then findCmmTickishWithTNTC infoTableLabel+ else findCmmTickishSansTNTC (cit_lbl infoTable)+ blocks = concatMap toBlockList (graphs cmmGroup)+ firstJusts $ map findFun blocks+ else Nothing+ graphs :: CmmGroupSRTs -> [CmmGraph]+ graphs = foldl' go [] where- (_, middleBlock, endBlock) = blockSplit block+ go :: [CmmGraph] -> GenCmmDecl d h CmmGraph -> [CmmGraph]+ go acc (CmmProc _ _ _ g) = g : acc+ go acc _ = acc - returnFrameLabel :: Maybe CLabel- returnFrameLabel =- case endBlock of- (CmmCall _ (Just l) _ _ _ _) -> Just $ mkAsmTempLabel l- _ -> Nothing+ findCmmTickishWithTNTC :: Label -> Block CmmNode C C -> Maybe IpeSourceLocation+ findCmmTickishWithTNTC label block = do+ let (_, middleBlock, endBlock) = blockSplit block - lastTickInBlock = foldr maybeTick Nothing (blockToList middleBlock)+ isCallWithReturnFrameLabel endBlock label+ lastTickInBlock middleBlock+ where+ isCallWithReturnFrameLabel :: CmmNode O C -> Label -> Maybe ()+ isCallWithReturnFrameLabel (CmmCall _ (Just l) _ _ _ _) clabel | l == clabel = Just ()+ isCallWithReturnFrameLabel _ _ = Nothing - maybeTick :: CmmNode O O -> Maybe IpeSourceLocation -> Maybe IpeSourceLocation- maybeTick _ s@(Just _) = s- maybeTick (CmmTick (SourceNote span name)) Nothing = Just (span, name)- maybeTick _ _ = Nothing-labelsToSourcesWithTNTC acc _ = acc+ lastTickInBlock block =+ listToMaybe $+ mapMaybe maybeTick $ (reverse . blockToList) block --- | See Note [Stacktraces from Info Table Provenance Entries (IPE based stack unwinding)]-labelsToSourcesSansTNTC- :: Map CLabel IpeSourceLocation- -> GenCmmDecl RawCmmStatics CmmTopInfo CmmGraph- -> Map CLabel IpeSourceLocation-labelsToSourcesSansTNTC acc (CmmProc _ _ _ cmm_graph) =- foldl' go acc (toBlockList cmm_graph)- where- go :: Map CLabel IpeSourceLocation -> CmmBlock -> Map CLabel IpeSourceLocation- go acc block = fst $ foldl' collectLabels (acc, Nothing) (blockToList middleBlock)- where- (_, middleBlock, _) = blockSplit block+ maybeTick :: CmmNode O O -> Maybe IpeSourceLocation+ maybeTick (CmmTick (SourceNote span name)) = Just (span, name)+ maybeTick _ = Nothing - collectLabels- :: (Map CLabel IpeSourceLocation, Maybe IpeSourceLocation)- -> CmmNode O O- -> (Map CLabel IpeSourceLocation, Maybe IpeSourceLocation)- collectLabels (!acc, lastTick) b =- case (b, lastTick) of- (CmmStore _ (CmmLit (CmmLabel l)) _, Just src_loc) ->- (Map.insert l src_loc acc, Nothing)- (CmmTick (SourceNote span name), _) ->- (acc, Just (span, name))- _ -> (acc, lastTick)-labelsToSourcesSansTNTC acc _ = acc+ findCmmTickishSansTNTC :: CLabel -> Block CmmNode C C -> Maybe IpeSourceLocation+ findCmmTickishSansTNTC cLabel block = do+ let (_, middleBlock, _) = blockSplit block+ find cLabel (blockToList middleBlock) Nothing+ where+ find :: CLabel -> [CmmNode O O] -> Maybe IpeSourceLocation -> Maybe IpeSourceLocation+ find label (b : blocks) lastTick = case b of+ (CmmStore _ (CmmLit (CmmLabel l)) _) -> if label == l then lastTick else find label blocks lastTick+ (CmmTick (SourceNote span name)) -> find label blocks $ Just (span, name)+ _ -> find label blocks lastTick+ find _ [] _ = Nothing
GHC/Driver/Hooks.hs view
@@ -32,7 +32,7 @@ import GHC.Prelude import GHC.Driver.Env-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Pipeline.Phases import GHC.Hs.Decls@@ -121,6 +121,9 @@ be decoupled from its use of the DsM definition in GHC.HsToCore.Types. Since both DsM and the definition of @ForeignsHook@ live in the same module, there is virtually no difference for plugin authors that want to write a foreign hook.++An awkward consequences is that the `type instance DsForeignsHook`, in+GHC.HsToCore.Types is an orphan instance. -} -- See Note [The Decoupling Abstract Data Hack]
GHC/Driver/Main.hs view
@@ -137,16 +137,18 @@ import GHC.Driver.Config.Diagnostic import GHC.Driver.Config.Tidy import GHC.Driver.Hooks-import GHC.Driver.GenerateCgIPEStub (generateCgIPEStub, lookupEstimatedTicks)+import GHC.Driver.GenerateCgIPEStub (generateCgIPEStub) import GHC.Runtime.Context-import GHC.Runtime.Interpreter ( addSptEntry )+import GHC.Runtime.Interpreter+import GHC.Runtime.Interpreter.JS import GHC.Runtime.Loader ( initializePlugins )-import GHCi.RemoteTypes ( ForeignHValue )+import GHCi.RemoteTypes import GHC.ByteCode.Types import GHC.Linker.Loader import GHC.Linker.Types+import GHC.Linker.Deps import GHC.Hs import GHC.Hs.Dump@@ -156,6 +158,9 @@ import GHC.StgToByteCode ( byteCodeGen ) import GHC.StgToJS ( stgToJS )+import GHC.StgToJS.Ids+import GHC.StgToJS.Types+import GHC.JS.Syntax import GHC.IfaceToCore ( typecheckIface, typecheckWholeCoreBindings ) @@ -172,7 +177,6 @@ import GHC.Core.Lint.Interactive ( interactiveInScope ) import GHC.Core.Tidy ( tidyExpr ) import GHC.Core.Type ( Type, Kind )-import GHC.Core.Multiplicity import GHC.Core.Utils ( exprType ) import GHC.Core.ConLike import GHC.Core.Opt.Pipeline@@ -194,17 +198,16 @@ import GHC.Tc.Module import GHC.Tc.Utils.Monad-import GHC.Tc.Utils.Zonk ( ZonkFlexi (DefaultFlexi) )+import GHC.Tc.Zonk.Env ( ZonkFlexi (DefaultFlexi) ) import GHC.Stg.Syntax import GHC.Stg.Pipeline ( stg2stg, StgCgInfos ) import GHC.Builtin.Utils import GHC.Builtin.Names-import GHC.Builtin.Uniques ( mkPseudoUniqueE ) import qualified GHC.StgToCmm as StgToCmm ( codeGen )-import GHC.StgToCmm.Types (CmmCgInfos (..), ModuleLFInfos)+import GHC.StgToCmm.Types (CmmCgInfos (..), ModuleLFInfos, LambdaFormInfo(..)) import GHC.Cmm import GHC.Cmm.Info.Build@@ -230,7 +233,9 @@ import GHC.Types.SourceError import GHC.Types.SafeHaskell import GHC.Types.ForeignStubs-import GHC.Types.Var.Env ( emptyTidyEnv )+import GHC.Types.Name.Env ( mkNameEnv )+import GHC.Types.Var.Env ( mkEmptyTidyEnv )+import GHC.Types.Var.Set import GHC.Types.Error import GHC.Types.Fixity.Env import GHC.Types.CostCentre@@ -241,8 +246,11 @@ import GHC.Types.Name.Cache ( initNameCache ) import GHC.Types.Name.Reader import GHC.Types.Name.Ppr+import GHC.Types.Name.Set (NonCaffySet) import GHC.Types.TyThing import GHC.Types.HpcInfo+import GHC.Types.Unique.Supply (uniqFromMask)+import GHC.Types.Unique.Set import GHC.Utils.Fingerprint ( Fingerprint ) import GHC.Utils.Panic@@ -253,6 +261,8 @@ import GHC.Utils.Logger import GHC.Utils.TmpFs +import qualified GHC.LanguageExtensions as LangExt+ import GHC.Data.FastString import GHC.Data.Bag import GHC.Data.StringBuffer@@ -271,11 +281,11 @@ import Data.IORef import System.FilePath as FilePath import System.Directory-import qualified Data.Map as M-import Data.Map (Map) import qualified Data.Set as S import Data.Set (Set)+import Data.Functor ((<&>)) import Control.DeepSeq (force)+import Data.Bifunctor (first) import Data.List.NonEmpty (NonEmpty ((:|))) import GHC.Unit.Module.WholeCoreBindings import GHC.Types.TypeEnv@@ -286,9 +296,8 @@ import System.IO.Unsafe ( unsafeInterleaveIO ) import GHC.Iface.Env ( trace_if ) import GHC.Stg.InferTags.TagSig (seqTagSig)-import GHC.StgToCmm.Utils (IPEStats) import GHC.Types.Unique.FM-import GHC.Cmm.Config (CmmConfig)+import GHC.Types.Unique.DFM {- **********************************************************************@@ -864,6 +873,15 @@ , IsBoot <- isBootSummary mod_summary -> do msg UpToDate return $ HscUpToDate checked_iface emptyHomeModInfoLinkable++ -- Always recompile with the JS backend when TH is enabled until+ -- #23013 is fixed.+ | ArchJavaScript <- platformArch (targetPlatform lcl_dflags)+ , xopt LangExt.TemplateHaskell lcl_dflags+ -> do+ msg $ needsRecompileBecause THWithJS+ return $ HscRecompNeeded $ Just $ mi_iface_hash $ mi_final_exts $ checked_iface+ | otherwise -> do -- Do need linkable -- 1. Just check whether we have bytecode/object linkables and then@@ -1685,7 +1703,7 @@ (logDiagnostics $ singleMessage $ mkPlainMsgEnvelope diag_opts (warnUnsafeOnLoc dflags) $ GhcDriverMessage $ DriverUnknownMessage $- UnknownDiagnostic $+ mkSimpleUnknownDiagnostic $ mkPlainDiagnostic reason noHints $ whyUnsafe' dflags) @@ -1710,9 +1728,9 @@ (vcat $ badInsts $ tcg_insts tcg_env) ] badFlags df = concatMap (badFlag df) unsafeFlagsForInfer- badFlag df (str,loc,on,_)+ badFlag df (ext,loc,on,_) | on df = [mkLocMessage MCOutput (loc df) $- text str <+> text "is not allowed in Safe Haskell"]+ text "-X" <> ppr ext <+> text "is not allowed in Safe Haskell"] | otherwise = [] badInsts insts = concatMap badInst insts @@ -1843,7 +1861,7 @@ this_mod location late_cc_binds data_tycons ----------------- Convert to STG ------------------- (stg_binds, denv, (caf_ccs, caf_cc_stacks), stg_cg_infos)+ (stg_binds_with_deps, denv, (caf_ccs, caf_cc_stacks), stg_cg_infos) <- {-# SCC "CoreToStg" #-} withTiming logger (text "CoreToStg"<+>brackets (ppr this_mod))@@ -1853,8 +1871,10 @@ c `seqList` d `seqList` (seqEltsUFM (seqTagSig) tag_env))- (myCoreToStg logger dflags (hsc_IC hsc_env) False this_mod location prepd_binds)+ (myCoreToStg logger dflags (interactiveInScope (hsc_IC hsc_env)) False this_mod location prepd_binds) + let (stg_binds,_stg_deps) = unzip stg_binds_with_deps+ let cost_centre_info = (late_local_ccs ++ caf_ccs, caf_cc_stacks) platform = targetPlatform dflags@@ -1873,7 +1893,19 @@ JSCodeOutput -> do let js_config = initStgToJSConfig dflags- cmm_cg_infos = Nothing++ -- The JavaScript backend does not create CmmCgInfos like the Cmm backend,+ -- but it is needed for writing the interface file. Here we compute a very+ -- conservative but correct value.+ lf_infos (StgTopLifted (StgNonRec b _)) = [(idName b, LFUnknown True)]+ lf_infos (StgTopLifted (StgRec bs)) = map (\(b,_) -> (idName b, LFUnknown True)) bs+ lf_infos (StgTopStringLit b _) = [(idName b, LFUnlifted)]++ cmm_cg_infos = CmmCgInfos+ { cgNonCafs = mempty+ , cgLFInfos = mkNameEnv (concatMap lf_infos stg_binds)+ , cgIPEStub = mempty+ } stub_c_exists = Nothing foreign_fps = [] @@ -1882,7 +1914,7 @@ -- do the unfortunately effectual business stgToJS logger js_config stg_binds this_mod spt_entries foreign_stubs0 cost_centre_info output_filename- return (output_filename, stub_c_exists, foreign_fps, Just stg_cg_infos, cmm_cg_infos)+ return (output_filename, stub_c_exists, foreign_fps, Just stg_cg_infos, Just cmm_cg_infos) _ -> do@@ -1961,9 +1993,12 @@ -- The stg cg info only provides a runtime benfit, but is not requires so we just -- omit it here- (stg_binds, _infotable_prov, _caf_ccs__caf_cc_stacks, _ignore_stg_cg_infos)+ (stg_binds_with_deps, _infotable_prov, _caf_ccs__caf_cc_stacks, _ignore_stg_cg_infos) <- {-# SCC "CoreToStg" #-}- myCoreToStg logger dflags (hsc_IC hsc_env) True this_mod location prepd_binds+ myCoreToStg logger dflags (interactiveInScope (hsc_IC hsc_env)) True this_mod location prepd_binds++ let (stg_binds,_stg_deps) = unzip stg_binds_with_deps+ ----------------- Generate byte code ------------------ comp_bc <- byteCodeGen hsc_env this_mod stg_binds data_tycons mod_breaks ------------------ Create f-x-dynamic C-side stuff -----@@ -2122,85 +2157,41 @@ cmm_config = initCmmConfig dflags - pipeline_stream :: Stream IO CmmGroupSRTs CmmCgInfos+ pipeline_stream :: Stream IO CmmGroupSRTs (NonCaffySet, ModuleLFInfos) pipeline_stream = do- ((mod_srt_info, ipes, ipe_stats), lf_infos) <-+ (non_cafs, lf_infos) <- {-# SCC "cmmPipeline" #-}- Stream.mapAccumL_ (pipeline_action logger cmm_config) (emptySRT this_mod, M.empty, mempty) ppr_stream1- let nonCaffySet = srtMapNonCAFs (moduleSRTMap mod_srt_info)- generateCgIPEStub hsc_env this_mod denv (nonCaffySet, lf_infos, ipes, ipe_stats)-- pipeline_action- :: Logger- -> CmmConfig- -> (ModuleSRTInfo, Map CmmInfoTable (Maybe IpeSourceLocation), IPEStats)- -> CmmGroup- -> IO ((ModuleSRTInfo, Map CmmInfoTable (Maybe IpeSourceLocation), IPEStats), CmmGroupSRTs)- pipeline_action logger cmm_config (mod_srt_info, ipes, stats) cmm_group = do- (mod_srt_info', cmm_srts) <- cmmPipeline logger cmm_config mod_srt_info cmm_group-- -- If -finfo-table-map is enabled, we precompute a map from info- -- tables to source locations. See Note [Mapping Info Tables to Source- -- Positions] in GHC.Stg.Debug.- (ipes', stats') <-- if (gopt Opt_InfoTableMap dflags) then- lookupEstimatedTicks hsc_env ipes stats cmm_srts- else- return (ipes, stats)+ Stream.mapAccumL_ (cmmPipeline logger cmm_config) (emptySRT this_mod) ppr_stream1+ <&> first (srtMapNonCAFs . moduleSRTMap) - return ((mod_srt_info', ipes', stats'), cmm_srts)+ return (non_cafs, lf_infos) dump2 a = do unless (null a) $ putDumpFileMaybe logger Opt_D_dump_cmm "Output Cmm" FormatCMM (pdoc platform a) return a - return $ Stream.mapM dump2 pipeline_stream--myCoreToStgExpr :: Logger -> DynFlags -> InteractiveContext- -> Bool- -> Module -> ModLocation -> CoreExpr- -> IO ( Id- , [CgStgTopBinding]- , InfoTableProvMap- , CollectedCCs- , StgCgInfos )-myCoreToStgExpr logger dflags ictxt for_bytecode this_mod ml prepd_expr = do- {- Create a temporary binding (just because myCoreToStg needs a- binding for the stg2stg step) -}- let bco_tmp_id = mkSysLocal (fsLit "BCO_toplevel")- (mkPseudoUniqueE 0)- ManyTy- (exprType prepd_expr)- (stg_binds, prov_map, collected_ccs, stg_cg_infos) <-- myCoreToStg logger- dflags- ictxt- for_bytecode- this_mod- ml- [NonRec bco_tmp_id prepd_expr]- return (bco_tmp_id, stg_binds, prov_map, collected_ccs, stg_cg_infos)+ return $ Stream.mapM dump2 $ generateCgIPEStub hsc_env this_mod denv pipeline_stream -myCoreToStg :: Logger -> DynFlags -> InteractiveContext+myCoreToStg :: Logger -> DynFlags -> [Var] -> Bool -> Module -> ModLocation -> CoreProgram- -> IO ( [CgStgTopBinding] -- output program+ -> IO ( [(CgStgTopBinding,IdSet)] -- output program and its dependencies , InfoTableProvMap , CollectedCCs -- CAF cost centre info (declared and used) , StgCgInfos )-myCoreToStg logger dflags ictxt for_bytecode this_mod ml prepd_binds = do+myCoreToStg logger dflags ic_inscope for_bytecode this_mod ml prepd_binds = do let (stg_binds, denv, cost_centre_info) = {-# SCC "Core2Stg" #-} coreToStg (initCoreToStgOpts dflags) this_mod ml prepd_binds (stg_binds_with_fvs,stg_cg_info) <- {-# SCC "Stg2Stg" #-}- stg2stg logger (interactiveInScope ictxt) (initStgPipelineOpts dflags for_bytecode)+ stg2stg logger ic_inscope (initStgPipelineOpts dflags for_bytecode) this_mod stg_binds putDumpFileMaybe logger Opt_D_dump_stg_cg "CodeGenInput STG:" FormatSTG- (pprGenStgTopBindings (initStgPprOpts dflags) stg_binds_with_fvs)+ (pprGenStgTopBindings (initStgPprOpts dflags) (fmap fst stg_binds_with_fvs)) return (stg_binds_with_fvs, denv, cost_centre_info, stg_cg_info) @@ -2353,16 +2344,18 @@ (initCorePrepPgmConfig (hsc_dflags hsc_env) (interactiveInScope $ hsc_IC hsc_env)) this_mod iNTERACTIVELoc core_binds data_tycons - (stg_binds, _infotable_prov, _caf_ccs__caf_cc_stacks, _stg_cg_info)+ (stg_binds_with_deps, _infotable_prov, _caf_ccs__caf_cc_stacks, _stg_cg_info) <- {-# SCC "CoreToStg" #-} liftIO $ myCoreToStg (hsc_logger hsc_env) (hsc_dflags hsc_env)- (hsc_IC hsc_env)+ (interactiveInScope (hsc_IC hsc_env)) True this_mod iNTERACTIVELoc prepd_binds + let (stg_binds,_stg_deps) = unzip stg_binds_with_deps+ {- Generate byte code -} cbc <- liftIO $ byteCodeGen hsc_env this_mod stg_binds data_tycons mod_breaks@@ -2433,7 +2426,8 @@ _ -> liftIO $ throwOneError $ mkPlainErrorMsgEnvelope noSrcSpan $ GhcPsMessage $ PsUnknownMessage $- UnknownDiagnostic $ mkPlainError noHints $+ mkSimpleUnknownDiagnostic $+ mkPlainError noHints $ text "parse error in import declaration" -- | Typecheck an expression (but don't run it)@@ -2464,7 +2458,9 @@ Just (L _ (BodyStmt _ expr _ _)) -> return expr _ -> throwOneError $ mkPlainErrorMsgEnvelope noSrcSpan $- GhcPsMessage $ PsUnknownMessage $ UnknownDiagnostic $ mkPlainError noHints $+ GhcPsMessage $ PsUnknownMessage+ $ mkSimpleUnknownDiagnostic+ $ mkPlainError noHints $ text "not an expression:" <+> quotes (text expr) hscParseStmt :: String -> Hsc (Maybe (GhciLStmt GhcPs))@@ -2562,56 +2558,181 @@ Just h -> h hsc_env loc expr hscCompileCoreExpr' :: HscEnv -> SrcSpan -> CoreExpr -> IO (ForeignHValue, [Linkable], PkgsLoaded)-hscCompileCoreExpr' hsc_env srcspan ds_expr- = do { {- Simplify it -}- -- Question: should we call SimpleOpt.simpleOptExpr here instead?- -- It is, well, simpler, and does less inlining etc.- let dflags = hsc_dflags hsc_env- ; let logger = hsc_logger hsc_env- ; let ic = hsc_IC hsc_env- ; let unit_env = hsc_unit_env hsc_env- ; let simplify_expr_opts = initSimplifyExprOpts dflags ic- ; simpl_expr <- simplifyExpr logger (ue_eps unit_env) simplify_expr_opts ds_expr+hscCompileCoreExpr' hsc_env srcspan ds_expr = do+ {- Simplify it -}+ -- Question: should we call SimpleOpt.simpleOptExpr here instead?+ -- It is, well, simpler, and does less inlining etc.+ let dflags = hsc_dflags hsc_env+ let logger = hsc_logger hsc_env+ let ic = hsc_IC hsc_env+ let unit_env = hsc_unit_env hsc_env+ let simplify_expr_opts = initSimplifyExprOpts dflags ic - {- Tidy it (temporary, until coreSat does cloning) -}- ; let tidy_expr = tidyExpr emptyTidyEnv simpl_expr+ simpl_expr <- simplifyExpr logger (ue_eps unit_env) simplify_expr_opts ds_expr - {- Prepare for codegen -}- ; cp_cfg <- initCorePrepConfig hsc_env- ; prepd_expr <- corePrepExpr- logger cp_cfg- tidy_expr+ -- Create a unique temporary binding+ --+ -- The id has to be exported for the JS backend. This isn't required for the+ -- byte-code interpreter but it does no harm to always do it.+ u <- uniqFromMask 'I'+ let binding_name = mkSystemVarName u (fsLit ("BCO_toplevel"))+ let binding_id = mkExportedVanillaId binding_name (exprType simpl_expr) - {- Lint if necessary -}- ; lintInteractiveExpr (text "hscCompileExpr") hsc_env prepd_expr- ; let iNTERACTIVELoc = ModLocation{ ml_hs_file = Nothing,- ml_hi_file = panic "hscCompileCoreExpr':ml_hi_file",- ml_obj_file = panic "hscCompileCoreExpr':ml_obj_file",- ml_dyn_obj_file = panic "hscCompileCoreExpr': ml_obj_file",- ml_dyn_hi_file = panic "hscCompileCoreExpr': ml_dyn_hi_file",- ml_hie_file = panic "hscCompileCoreExpr':ml_hie_file" }+ {- Tidy it (temporary, until coreSat does cloning) -}+ let tidy_occ_env = initTidyOccEnv [occName binding_id]+ let tidy_env = mkEmptyTidyEnv tidy_occ_env+ let tidy_expr = tidyExpr tidy_env simpl_expr - ; let ictxt = hsc_IC hsc_env- ; (binding_id, stg_expr, _, _, _stg_cg_info) <-- myCoreToStgExpr logger- dflags- ictxt- True- (icInteractiveModule ictxt)- iNTERACTIVELoc- prepd_expr+ {- Prepare for codegen -}+ cp_cfg <- initCorePrepConfig hsc_env+ prepd_expr <- corePrepExpr+ logger cp_cfg+ tidy_expr - {- Convert to BCOs -}- ; bcos <- byteCodeGen hsc_env- (icInteractiveModule ictxt)- stg_expr- [] Nothing+ {- Lint if necessary -}+ lintInteractiveExpr (text "hscCompileCoreExpr") hsc_env prepd_expr+ let this_loc = ModLocation{ ml_hs_file = Nothing,+ ml_hi_file = panic "hscCompileCoreExpr':ml_hi_file",+ ml_obj_file = panic "hscCompileCoreExpr':ml_obj_file",+ ml_dyn_obj_file = panic "hscCompileCoreExpr': ml_obj_file",+ ml_dyn_hi_file = panic "hscCompileCoreExpr': ml_dyn_hi_file",+ ml_hie_file = panic "hscCompileCoreExpr':ml_hie_file" } - {- load it -}- ; (fv_hvs, mods_needed, units_needed) <- loadDecls (hscInterp hsc_env) hsc_env srcspan bcos- {- Get the HValue for the root -}- ; return (expectJust "hscCompileCoreExpr'"- $ lookup (idName binding_id) fv_hvs, mods_needed, units_needed) }+ -- Ensure module uniqueness by giving it a name like "GhciNNNN".+ -- This uniqueness is needed by the JS linker. Without it we break the 1-1+ -- relationship between modules and object files, i.e. we get different object+ -- files for the same module and the JS linker doesn't support this.+ --+ -- Note that we can't use icInteractiveModule because the ic_mod_index value+ -- isn't bumped between invocations of hscCompileCoreExpr, so uniqueness isn't+ -- guaranteed.+ --+ -- We reuse the unique we obtained for the binding, but any unique would do.+ let this_mod = mkInteractiveModule (show u)+ let for_bytecode = True++ (stg_binds_with_deps, _prov_map, _collected_ccs, _stg_cg_infos) <-+ myCoreToStg logger+ dflags+ (interactiveInScope (hsc_IC hsc_env))+ for_bytecode+ this_mod+ this_loc+ [NonRec binding_id prepd_expr]++ let (stg_binds, _stg_deps) = unzip stg_binds_with_deps++ let interp = hscInterp hsc_env++ case interp of+ -- always generate JS code for the JS interpreter (no bytecode!)+ Interp (ExternalInterp (ExtJS i)) _ ->+ jsCodeGen hsc_env srcspan i this_mod stg_binds_with_deps binding_id++ _ -> do+ {- Convert to BCOs -}+ bcos <- byteCodeGen hsc_env+ this_mod+ stg_binds+ [] Nothing++ {- load it -}+ (fv_hvs, mods_needed, units_needed) <- loadDecls interp hsc_env srcspan bcos+ {- Get the HValue for the root -}+ return (expectJust "hscCompileCoreExpr'"+ $ lookup (idName binding_id) fv_hvs, mods_needed, units_needed)++++-- | Generate JS code for the given bindings and return the HValue for the given id+jsCodeGen+ :: HscEnv+ -> SrcSpan+ -> JSInterp+ -> Module+ -> [(CgStgTopBinding,IdSet)]+ -> Id+ -> IO (ForeignHValue, [Linkable], PkgsLoaded)+jsCodeGen hsc_env srcspan i this_mod stg_binds_with_deps binding_id = do+ let logger = hsc_logger hsc_env+ tmpfs = hsc_tmpfs hsc_env+ dflags = hsc_dflags hsc_env+ interp = hscInterp hsc_env+ tmp_dir = tmpDir dflags+ unit_env = hsc_unit_env hsc_env+ js_config = initStgToJSConfig dflags++ -- We need to load all the dependencies first.+ --+ -- We get all the imported names from the Stg bindings and load their modules.+ --+ -- (logic adapted from GHC.Linker.Loader.loadDecls for the JS linker)+ let+ (stg_binds, stg_deps) = unzip stg_binds_with_deps+ imported_ids = nonDetEltsUniqSet (unionVarSets stg_deps)+ imported_names = map idName imported_ids++ needed_mods :: [Module]+ needed_mods = [ nameModule n | n <- imported_names,+ isExternalName n, -- Names from other modules+ not (isWiredInName n) -- Exclude wired-in names+ ] -- (see note below)+ -- Exclude wired-in names because we may not have read+ -- their interface files, so getLinkDeps will fail+ -- All wired-in names are in the base package, which we link+ -- by default, so we can safely ignore them here.++ -- Initialise the linker (if it's not been done already)+ initLoaderState interp hsc_env++ -- Take lock for the actual work.+ (dep_linkables, dep_units) <- modifyLoaderState interp $ \pls -> do+ let link_opts = initLinkDepsOpts hsc_env++ -- Find what packages and linkables are required+ deps <- getLinkDeps link_opts interp pls srcspan needed_mods+ -- We update the LinkerState even if the JS interpreter maintains its linker+ -- state independently to load new objects here.+ let (objs, _bcos) = partition isObjectLinkable+ (concatMap partitionLinkable (ldNeededLinkables deps))++ let (objs_loaded', _new_objs) = rmDupLinkables (objs_loaded pls) objs++ -- FIXME: we should make the JS linker load new_objs here, instead of+ -- on-demand.++ -- FIXME: we don't report needed units because we would have to find a way+ -- to build a meaningful LoadedPkgInfo (see the mess in+ -- GHC.Linker.Loader.{loadPackage,loadPackages'}). Detecting what to load+ -- and actually loading (using the native interpreter) are intermingled, so+ -- we can't directly reuse this code.+ let pls' = pls { objs_loaded = objs_loaded' }+ pure (pls', (ldAllLinkables deps, emptyUDFM {- ldNeededUnits deps -}) )+++ let foreign_stubs = NoStubs+ spt_entries = mempty+ cost_centre_info = mempty++ -- codegen into object file whose path is in out_obj+ out_obj <- newTempName logger tmpfs tmp_dir TFL_CurrentModule "o"+ stgToJS logger js_config stg_binds this_mod spt_entries foreign_stubs cost_centre_info out_obj++ let TxtI id_sym = makeIdentForId binding_id Nothing IdPlain this_mod+ -- link code containing binding "id_sym = expr", using id_sym as root+ withJSInterp i $ \inst -> do+ let roots = mkExportedModFuns this_mod [id_sym]+ jsLinkObject logger tmpfs tmp_dir js_config unit_env inst out_obj roots++ -- look up "id_sym" closure and create a StablePtr (HValue) from it+ href <- lookupClosure interp (unpackFS id_sym) >>= \case+ Nothing -> pprPanic "Couldn't find just linked TH closure" (ppr id_sym)+ Just r -> pure r++ binding_fref <- withJSInterp i $ \inst ->+ mkForeignRef href (freeReallyRemoteRef inst href)++ return (castForeignRef binding_fref, dep_linkables, dep_units) {- **********************************************************************
GHC/Driver/Make.hs view
@@ -27,7 +27,7 @@ -- ----------------------------------------------------------------------------- module GHC.Driver.Make ( depanal, depanalE, depanalPartial, checkHomeUnitsClosed,- load, loadWithCache, load', LoadHowMuch(..), ModIfaceCache(..), noIfaceCache, newIfaceCache,+ load, loadWithCache, load', AnyGhcDiagnostic, LoadHowMuch(..), ModIfaceCache(..), noIfaceCache, newIfaceCache, instantiationNodes, downsweep,@@ -75,6 +75,7 @@ import GHC.Driver.Errors import GHC.Driver.Errors.Types import GHC.Driver.Main+import GHC.Driver.MakeSem import GHC.Parser.Header @@ -105,6 +106,7 @@ import GHC.Types.SourceFile import GHC.Types.SourceError import GHC.Types.SrcLoc+import GHC.Types.Unique.Map import GHC.Types.PkgQual import GHC.Unit@@ -129,6 +131,7 @@ import Data.IORef import Data.Maybe import Data.Time+import Data.List (sortOn) import Data.Bifunctor (first) import System.Directory import System.FilePath@@ -149,10 +152,10 @@ import GHC.Rename.Names import GHC.Utils.Constants import GHC.Types.Unique.DFM (udfmRestrictKeysSet)-import GHC.Types.Unique.Map import GHC.Types.Unique+import GHC.Iface.Errors.Types -import qualified GHC.Data.Word64Set as W+import qualified Data.IntSet as I -- ----------------------------------------------------------------------------- -- Loading the program@@ -308,16 +311,16 @@ -- Note [Missing home modules] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--- Sometimes we don't want GHC to process modules that weren't specified as--- explicit targets. For example, cabal may want to enable this warning--- when building a library, so that GHC warns the user about modules listed--- neither in `exposed-modules` nor in `other-modules`.+-- Sometimes user doesn't want GHC to pick up modules, not explicitly listed+-- in a command line. For example, cabal may want to enable this warning+-- when building a library, so that GHC warns user about modules, not listed+-- neither in `exposed-modules`, nor in `other-modules`. ----- Here "home module" means a module that doesn't come from another package.+-- Here "home module" means a module, that doesn't come from an other package. -- -- For example, if GHC is invoked with modules "A" and "B" as targets, -- but "A" imports some other module "C", then GHC will issue a warning--- about module "C" not being listed in the command line.+-- about module "C" not being listed in a command line. -- -- The warning in enabled by `-Wmissing-home-modules`. See #13129 warnMissingHomeModules :: DynFlags -> [Target] -> ModuleGraph -> DriverMessages@@ -328,6 +331,8 @@ where diag_opts = initDiagOpts dflags + is_known_module mod = any (is_my_target mod) targets+ -- We need to be careful to handle the case where (possibly -- path-qualified) filenames (aka 'TargetFile') rather than module -- names are being passed on the GHC command-line.@@ -336,31 +341,27 @@ -- `ghc --make -isrc-exe Main` are supposed to be equivalent. -- Note also that we can't always infer the associated module name -- directly from the filename argument. See #13727.- is_known_module mod =- is_module_target mod- ||- maybe False is_file_target (ml_hs_file (ms_location mod))-- is_module_target mod = (moduleName (ms_mod mod), ms_unitid mod) `Set.member` mod_targets-- is_file_target file = Set.member (withoutExt file) file_targets-- file_targets = Set.fromList (mapMaybe file_target targets)-- file_target Target {targetId} =- case targetId of- TargetModule _ -> Nothing- TargetFile file _ ->- Just (withoutExt (augmentByWorkingDirectory dflags file))-- mod_targets = Set.fromList (mod_target <$> targets)+ is_my_target mod target =+ let tuid = targetUnitId target+ in case targetId target of+ TargetModule name+ -> moduleName (ms_mod mod) == name+ && tuid == ms_unitid mod+ TargetFile target_file _+ | Just mod_file <- ml_hs_file (ms_location mod)+ ->+ augmentByWorkingDirectory dflags target_file == mod_file || - mod_target Target {targetUnitId, targetId} =- case targetId of- TargetModule name -> (name, targetUnitId)- TargetFile file _ -> (mkModuleName (withoutExt file), targetUnitId)+ -- Don't warn on B.hs-boot if B.hs is specified (#16551)+ addBootSuffix target_file == mod_file || - withoutExt = fst . splitExtension+ -- We can get a file target even if a module name was+ -- originally specified in a command line because it can+ -- be converted in guessTarget (by appending .hs/.lhs).+ -- So let's convert it back and compare with module name+ mkModuleName (fst $ splitExtension target_file)+ == moduleName (ms_mod mod)+ _ -> False missing = map (moduleName . ms_mod) $ filter (not . is_known_module) $@@ -485,7 +486,7 @@ -- All other errors are reported using the 'defaultWarnErrLogger'. load :: GhcMonad f => LoadHowMuch -> f SuccessFlag-load how_much = loadWithCache noIfaceCache how_much+load how_much = loadWithCache noIfaceCache mkUnknownDiagnostic how_much mkBatchMsg :: HscEnv -> Messager mkBatchMsg hsc_env =@@ -494,12 +495,18 @@ then batchMultiMsg else batchMsg +type AnyGhcDiagnostic = UnknownDiagnostic (DiagnosticOpts GhcMessage) -loadWithCache :: GhcMonad m => Maybe ModIfaceCache -> LoadHowMuch -> m SuccessFlag-loadWithCache cache how_much = do+loadWithCache :: GhcMonad m => Maybe ModIfaceCache -- ^ Instructions about how to cache interfaces as we create them.+ -> (GhcMessage -> AnyGhcDiagnostic) -- ^ How to wrap error messages before they are displayed to a user.+ -- If you are using the GHC API you can use this to override how messages+ -- created during 'loadWithCache' are displayed to the user.+ -> LoadHowMuch -- ^ How much `loadWithCache` should load+ -> m SuccessFlag+loadWithCache cache diag_wrapper how_much = do (errs, mod_graph) <- depanalE [] False -- #17459 msg <- mkBatchMsg <$> getSession- success <- load' cache how_much (Just msg) mod_graph+ success <- load' cache how_much diag_wrapper (Just msg) mod_graph if isEmptyMessages errs then pure success else throwErrors (fmap GhcDriverMessage errs)@@ -515,14 +522,18 @@ warnUnusedPackages us dflags mod_graph = let diag_opts = initDiagOpts dflags + home_mod_sum = filter (\ms -> homeUnitId_ dflags == ms_unitid ms) (mgModSummaries mod_graph)+ -- Only need non-source imports here because SOURCE imports are always HPT loadedPackages = concat $ mapMaybe (\(fs, mn) -> lookupModulePackage us (unLoc mn) fs)- $ concatMap ms_imps (- filter (\ms -> homeUnitId_ dflags == ms_unitid ms) (mgModSummaries mod_graph))+ $ concatMap ms_imps home_mod_sum - used_args = Set.fromList $ map unitId loadedPackages+ any_import_ghc_prim = any ms_ghc_prim_import home_mod_sum + used_args = Set.fromList (map unitId loadedPackages)+ `Set.union` Set.fromList [ primUnitId | any_import_ghc_prim ]+ resolve (u,mflag) = do -- The units which we depend on via the command line explicitly flag <- mflag@@ -532,7 +543,7 @@ guard (Set.notMember (unitId ui) used_args) return (unitId ui, unitPackageName ui, unitPackageVersion ui, flag) - unusedArgs = mapMaybe resolve (explicitUnits us)+ unusedArgs = sortOn (\(u,_,_,_) -> u) $ mapMaybe resolve (explicitUnits us) warn = singleMessage $ mkPlainMsgEnvelope diag_opts noSrcSpan (DriverUnusedPackages unusedArgs) @@ -598,7 +609,7 @@ -- Now perform another toposort but just with these nodes and relevant hs-boot files. -- The result should be acyclic, if it's not, then there's an unresolved cycle in the graph. mresolved_cycle = collapseSCC (topSortWithBoot nodes)- in acyclic ++ [either UnresolvedCycle ResolvedCycle mresolved_cycle] ++ toBuildPlan sccs []+ in acyclic ++ [maybe (UnresolvedCycle nodes) ResolvedCycle mresolved_cycle] ++ toBuildPlan sccs [] (mg, lookup_node) = moduleGraphNodes False (mgModSummaries' mod_graph) trans_deps_map = allReachable mg (mkNodeKey . node_payload)@@ -629,12 +640,12 @@ get_boot_module m = case m of ModuleNode _ ms | HsSrcFile <- ms_hsc_src ms -> lookupModuleEnv boot_modules (ms_mod ms); _ -> Nothing -- Any cycles should be resolved now- collapseSCC :: [SCC ModuleGraphNode] -> Either [ModuleGraphNode] [(Either ModuleGraphNode ModuleGraphNodeWithBootFile)]+ collapseSCC :: [SCC ModuleGraphNode] -> Maybe [(Either ModuleGraphNode ModuleGraphNodeWithBootFile)] -- Must be at least two nodes, as we were in a cycle- collapseSCC [AcyclicSCC node1, AcyclicSCC node2] = Right [toNodeWithBoot node1, toNodeWithBoot node2]- collapseSCC (AcyclicSCC node : nodes) = either (Left . (node :)) (Right . (toNodeWithBoot node :)) (collapseSCC nodes)+ collapseSCC [AcyclicSCC node1, AcyclicSCC node2] = Just [toNodeWithBoot node1, toNodeWithBoot node2]+ collapseSCC (AcyclicSCC node : nodes) = (toNodeWithBoot node :) <$> collapseSCC nodes -- Cyclic- collapseSCC nodes = Left (flattenSCCs nodes)+ collapseSCC _ = Nothing toNodeWithBoot :: ModuleGraphNode -> Either ModuleGraphNode ModuleGraphNodeWithBootFile toNodeWithBoot mn =@@ -660,18 +671,44 @@ (vcat [text "Build plan missing nodes:", (text "PLAN:" <+> ppr (sum (map countMods build_plan))), (text "GRAPH:" <+> ppr (length (mgModSummaries' mod_graph )))]) build_plan +mkWorkerLimit :: DynFlags -> IO WorkerLimit+mkWorkerLimit dflags =+ case parMakeCount dflags of+ Nothing -> pure $ num_procs 1+ Just (ParMakeSemaphore h) -> pure (JSemLimit (SemaphoreName h))+ Just ParMakeNumProcessors -> num_procs <$> getNumProcessors+ Just (ParMakeThisMany n) -> pure $ num_procs n+ where+ num_procs x = NumProcessorsLimit (max 1 x)++isWorkerLimitSequential :: WorkerLimit -> Bool+isWorkerLimitSequential (NumProcessorsLimit x) = x <= 1+isWorkerLimitSequential (JSemLimit {}) = False++-- | This describes what we use to limit the number of jobs, either we limit it+-- ourselves to a specific number or we have an external parallelism semaphore+-- limit it for us.+data WorkerLimit+ = NumProcessorsLimit Int+ | JSemLimit+ SemaphoreName+ -- ^ Semaphore name to use+ deriving Eq+ -- | Generalized version of 'load' which also supports a custom -- 'Messager' (for reporting progress) and 'ModuleGraph' (generally -- produced by calling 'depanal'.-load' :: GhcMonad m => Maybe ModIfaceCache -> LoadHowMuch -> Maybe Messager -> ModuleGraph -> m SuccessFlag-load' mhmi_cache how_much mHscMessage mod_graph = do+load' :: GhcMonad m => Maybe ModIfaceCache -> LoadHowMuch -> (GhcMessage -> AnyGhcDiagnostic) -> Maybe Messager -> ModuleGraph -> m SuccessFlag+load' mhmi_cache how_much diag_wrapper mHscMessage mod_graph = do -- In normal usage plugins are initialised already by ghc/Main.hs this is protective -- for any client who might interact with GHC via load'.+ -- See Note [Timing of plugin initialization] initializeSessionPlugins modifySession $ \hsc_env -> hsc_env { hsc_mod_graph = mod_graph } guessOutputFile hsc_env <- getSession + let dflags = hsc_dflags hsc_env let logger = hsc_logger hsc_env let interp = hscInterp hsc_env @@ -735,7 +772,6 @@ let pruneHomeUnitEnv hme = hme { homeUnitEnv_hpt = emptyHomePackageTable } setSession $ discardIC $ hscUpdateHUG (unitEnv_map pruneHomeUnitEnv) hsc_env- hsc_env <- getSession -- Unload everything liftIO $ unload interp hsc_env@@ -743,13 +779,12 @@ liftIO $ debugTraceMsg logger 2 (hang (text "Ready for upsweep") 2 (ppr build_plan)) - n_jobs <- case parMakeCount (hsc_dflags hsc_env) of- Nothing -> liftIO getNumProcessors- Just n -> return n+ worker_limit <- liftIO $ mkWorkerLimit dflags + setSession $ hscUpdateHUG (unitEnv_map pruneHomeUnitEnv) hsc_env (upsweep_ok, new_deps) <- withDeferredDiagnostics $ do hsc_env <- getSession- liftIO $ upsweep n_jobs hsc_env mhmi_cache mHscMessage (toCache pruned_cache) build_plan+ liftIO $ upsweep worker_limit hsc_env mhmi_cache diag_wrapper mHscMessage (toCache pruned_cache) build_plan modifySession (addDepsToHscEnv new_deps) case upsweep_ok of Failed -> loadFinish upsweep_ok@@ -1032,13 +1067,7 @@ type BuildM a = StateT BuildLoopState IO a --- | Abstraction over the operations of a semaphore which allows usage with the--- -j1 case-data AbstractSem = AbstractSem { acquireSem :: IO ()- , releaseSem :: IO () } -withAbstractSem :: AbstractSem -> IO b -> IO b-withAbstractSem sem = MC.bracket_ (acquireSem sem) (releaseSem sem) -- | Environment used when compiling a module data MakeEnv = MakeEnv { hsc_env :: !HscEnv -- The basic HscEnv which will be augmented for each module@@ -1049,6 +1078,7 @@ -- into the log queue. , withLogger :: forall a . Int -> ((Logger -> Logger) -> IO a) -> IO a , env_messager :: !(Maybe Messager)+ , diag_wrapper :: GhcMessage -> AnyGhcDiagnostic } type RunMakeM a = ReaderT MakeEnv (MaybeT IO) a@@ -1116,37 +1146,33 @@ -- which would retain all the result variables, preventing us from collecting them -- after they are no longer used. !build_deps = getDependencies direct_deps build_map- let !build_action =+ let build_action =+ withCurrentUnit (moduleGraphNodeUnitId mod) $ do+ (hug, deps) <- wait_deps_hug hug_var build_deps case mod of InstantiationNode uid iu -> do- withCurrentUnit (moduleGraphNodeUnitId mod) $ do- (hug, deps) <- wait_deps_hug hug_var build_deps- executeInstantiationNode mod_idx n_mods hug uid iu- return (Nothing, deps)- ModuleNode _build_deps ms ->+ executeInstantiationNode mod_idx n_mods hug uid iu+ return (Nothing, deps)+ ModuleNode _build_deps ms -> do let !old_hmi = M.lookup (msKey ms) old_hpt rehydrate_mods = mapMaybe nodeKeyModName <$> rehydrate_nodes- in withCurrentUnit (moduleGraphNodeUnitId mod) $ do- (hug, deps) <- wait_deps_hug hug_var build_deps- hmi <- executeCompileNode mod_idx n_mods old_hmi hug rehydrate_mods ms- -- Write the HMI to an external cache (if one exists)- -- See Note [Caching HomeModInfo]- liftIO $ forM mhmi_cache $ \hmi_cache -> addHmiToCache hmi_cache hmi- -- This global MVar is incrementally modified in order to avoid having to- -- recreate the HPT before compiling each module which leads to a quadratic amount of work.- liftIO $ modifyMVar_ hug_var (return . addHomeModInfoToHug hmi)- return (Just hmi, addToModuleNameSet (moduleGraphNodeUnitId mod) (ms_mod_name ms) deps )+ hmi <- executeCompileNode mod_idx n_mods old_hmi hug rehydrate_mods ms+ -- Write the HMI to an external cache (if one exists)+ -- See Note [Caching HomeModInfo]+ liftIO $ forM mhmi_cache $ \hmi_cache -> addHmiToCache hmi_cache hmi+ -- This global MVar is incrementally modified in order to avoid having to+ -- recreate the HPT before compiling each module which leads to a quadratic amount of work.+ liftIO $ modifyMVar_ hug_var (return . addHomeModInfoToHug hmi)+ return (Just hmi, addToModuleNameSet (moduleGraphNodeUnitId mod) (ms_mod_name ms) deps ) LinkNode _nks uid -> do- withCurrentUnit (moduleGraphNodeUnitId mod) $ do- (hug, deps) <- wait_deps_hug hug_var build_deps- executeLinkNode hug (mod_idx, n_mods) uid direct_deps- return (Nothing, deps)+ executeLinkNode hug (mod_idx, n_mods) uid direct_deps+ return (Nothing, deps) res_var <- liftIO newEmptyMVar let result_var = mkResultVar res_var setModulePipeline (mkNodeKey mod) (mkBuildResult origin result_var)- return $! (MakeAction build_action res_var)+ return $ (MakeAction build_action res_var) buildOneLoopyModule :: ModuleGraphNodeWithBootFile -> BuildM [MakeAction]@@ -1227,16 +1253,17 @@ local (\env -> env { hsc_env = hscSetActiveUnitId uid (hsc_env env)}) upsweep- :: Int -- ^ The number of workers we wish to run in parallel+ :: WorkerLimit -- ^ The number of workers we wish to run in parallel -> HscEnv -- ^ The base HscEnv, which is augmented for each module -> Maybe ModIfaceCache -- ^ A cache to incrementally write final interface files to+ -> (GhcMessage -> AnyGhcDiagnostic) -> Maybe Messager -> M.Map ModNodeKeyWithUid HomeModInfo -> [BuildPlan] -> IO (SuccessFlag, [HomeModInfo])-upsweep n_jobs hsc_env hmi_cache mHscMessage old_hpt build_plan = do+upsweep n_jobs hsc_env hmi_cache diag_wrapper mHscMessage old_hpt build_plan = do (cycle, pipelines, collect_result) <- interpretBuildPlan (hsc_HUG hsc_env) hmi_cache old_hpt build_plan- runPipelines n_jobs hsc_env mHscMessage pipelines+ runPipelines n_jobs hsc_env diag_wrapper mHscMessage pipelines res <- collect_result let completed = [m | Just (Just m) <- res]@@ -1547,8 +1574,8 @@ let (root_errs, rootSummariesOk) = partitionEithers rootSummaries -- #17549 root_map = mkRootMap rootSummariesOk checkDuplicates root_map- (deps, map0) <- loopSummaries rootSummariesOk (M.empty, root_map)- let closure_errs = checkHomeUnitsClosed (hsc_unit_env hsc_env)+ (deps, pkg_deps, map0) <- loopSummaries rootSummariesOk (M.empty, Set.empty, root_map)+ let closure_errs = checkHomeUnitsClosed (hsc_unit_env hsc_env) (hsc_all_home_unit_ids hsc_env) (Set.toList pkg_deps) let unit_env = hsc_unit_env hsc_env let tmpfs = hsc_tmpfs hsc_env @@ -1642,25 +1669,27 @@ -- This loops over all the mod summaries in the dependency graph, accumulates the actual dependencies for each module/unit loopSummaries :: [ModSummary]- -> (M.Map NodeKey ModuleGraphNode,+ -> (M.Map NodeKey ModuleGraphNode, Set.Set (UnitId, UnitId), DownsweepCache)- -> IO ((M.Map NodeKey ModuleGraphNode), DownsweepCache)+ -> IO ((M.Map NodeKey ModuleGraphNode), Set.Set (UnitId, UnitId), DownsweepCache) loopSummaries [] done = return done- loopSummaries (ms:next) (done, summarised)+ loopSummaries (ms:next) (done, pkgs, summarised) | Just {} <- M.lookup k done- = loopSummaries next (done, summarised)+ = loopSummaries next (done, pkgs, summarised) -- Didn't work out what the imports mean yet, now do that. | otherwise = do- (final_deps, done', summarised') <- loopImports (calcDeps ms) done summarised+ (final_deps, pkgs1, done', summarised') <- loopImports (calcDeps ms) done summarised -- This has the effect of finding a .hs file if we are looking at the .hs-boot file.- (_, done'', summarised'') <- loopImports (maybeToList hs_file_for_boot) done' summarised'- loopSummaries next (M.insert k (ModuleNode final_deps ms) done'', summarised'')+ (_, _, done'', summarised'') <- loopImports (maybeToList hs_file_for_boot) done' summarised'+ loopSummaries next (M.insert k (ModuleNode final_deps ms) done'', pkgs1 `Set.union` pkgs, summarised'') where k = NodeKey_Module (msKey ms) hs_file_for_boot- | HsBootFile <- ms_hsc_src ms = Just $ ((ms_unitid ms), NoPkgQual, (GWIB (noLoc $ ms_mod_name ms) NotBoot))- | otherwise = Nothing+ | HsBootFile <- ms_hsc_src ms+ = Just $ ((ms_unitid ms), NoPkgQual, (GWIB (noLoc $ ms_mod_name ms) NotBoot))+ | otherwise+ = Nothing -- This loops over each import in each summary. It is mutually recursive with loopSummaries if we discover@@ -1672,17 +1701,18 @@ -- Visited set; the range is a list because -- the roots can have the same module names -- if allow_dup_roots is True- -> IO ([NodeKey],+ -> IO ([NodeKey], Set.Set (UnitId, UnitId),+ M.Map NodeKey ModuleGraphNode, DownsweepCache) -- The result is the completed NodeMap- loopImports [] done summarised = return ([], done, summarised)+ loopImports [] done summarised = return ([], Set.empty, done, summarised) loopImports ((home_uid,mb_pkg, gwib) : ss) done summarised | Just summs <- M.lookup cache_key summarised = case summs of [Right ms] -> do let nk = NodeKey_Module (msKey ms)- (rest, summarised', done') <- loopImports ss done summarised- return (nk: rest, summarised', done')+ (rest, pkgs, summarised', done') <- loopImports ss done summarised+ return (nk: rest, pkgs, summarised', done') [Left _err] -> loopImports ss done summarised _errs -> do@@ -1694,79 +1724,69 @@ Nothing excl_mods case mb_s of NotThere -> loopImports ss done summarised- External _ -> do- (other_deps, done', summarised') <- loopImports ss done summarised- return (other_deps, done', summarised')+ External uid -> do+ (other_deps, pkgs, done', summarised') <- loopImports ss done summarised+ return (other_deps, Set.insert (homeUnitId home_unit, uid) pkgs, done', summarised') FoundInstantiation iud -> do- (other_deps, done', summarised') <- loopImports ss done summarised- return (NodeKey_Unit iud : other_deps, done', summarised')+ (other_deps, pkgs, done', summarised') <- loopImports ss done summarised+ return (NodeKey_Unit iud : other_deps, pkgs, done', summarised') FoundHomeWithError (_uid, e) -> loopImports ss done (Map.insert cache_key [(Left e)] summarised) FoundHome s -> do- (done', summarised') <-- loopSummaries [s] (done, Map.insert cache_key [Right s] summarised)- (other_deps, final_done, final_summarised) <- loopImports ss done' summarised'+ (done', pkgs1, summarised') <-+ loopSummaries [s] (done, Set.empty, Map.insert cache_key [Right s] summarised)+ (other_deps, pkgs2, final_done, final_summarised) <- loopImports ss done' summarised' -- MP: This assumes that we can only instantiate non home units, which is probably fair enough for now.- return (NodeKey_Module (msKey s) : other_deps, final_done, final_summarised)+ return (NodeKey_Module (msKey s) : other_deps, pkgs1 `Set.union` pkgs2, final_done, final_summarised) where cache_key = (home_uid, mb_pkg, unLoc <$> gwib) home_unit = ue_unitHomeUnit home_uid (hsc_unit_env hsc_env) GWIB { gwib_mod = L loc mod, gwib_isBoot = is_boot } = gwib wanted_mod = L loc mod --- | This function checks then important property that if both p and q are home units+-- This function checks then important property that if both p and q are home units -- then any dependency of p, which transitively depends on q is also a home unit.------ See Note [Multiple Home Units], section 'Closure Property'.-checkHomeUnitsClosed :: UnitEnv -> [DriverMessages]-checkHomeUnitsClosed ue- | Set.null bad_unit_ids = []- | otherwise = [singleMessage $ mkPlainErrorMsgEnvelope rootLoc $ DriverHomePackagesNotClosed (Set.toList bad_unit_ids)]+checkHomeUnitsClosed :: UnitEnv -> Set.Set UnitId -> [(UnitId, UnitId)] -> [DriverMessages]+-- Fast path, trivially closed.+checkHomeUnitsClosed ue home_id_set home_imp_ids+ | Set.size home_id_set == 1 = []+ | otherwise =+ let res = foldMap loop home_imp_ids+ -- Now check whether everything which transitively depends on a home_unit is actually a home_unit+ -- These units are the ones which we need to load as home packages but failed to do for some reason,+ -- it's a bug in the tool invoking GHC.+ bad_unit_ids = Set.difference res home_id_set+ in if Set.null bad_unit_ids+ then []+ else [singleMessage $ mkPlainErrorMsgEnvelope rootLoc $ DriverHomePackagesNotClosed (Set.toList bad_unit_ids)]+ where- home_id_set = unitEnv_keys $ ue_home_unit_graph ue- bad_unit_ids = upwards_closure Set.\\ home_id_set rootLoc = mkGeneralSrcSpan (fsLit "<command line>")-- graph :: Graph (Node UnitId UnitId)- graph = graphFromEdgedVerticesUniq graphNodes-- -- downwards closure of graph- downwards_closure- = graphFromEdgedVerticesUniq [ DigraphNode uid uid (Set.toList deps)- | (uid, deps) <- M.toList (allReachable graph node_key)]-- inverse_closure = transposeG downwards_closure-- upwards_closure = Set.fromList $ map node_key $ reachablesG inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set]-- all_unit_direct_deps :: UniqMap UnitId (Set.Set UnitId)- all_unit_direct_deps- = unitEnv_foldWithKey go emptyUniqMap $ ue_home_unit_graph ue- where- go rest this this_uis =- plusUniqMap_C Set.union- (addToUniqMap_C Set.union external_depends this (Set.fromList $ this_deps))- rest- where- external_depends = mapUniqMap (Set.fromList . unitDepends)- $ listToUniqMap $ Map.toList- $ unitInfoMap this_units- this_units = homeUnitEnv_units this_uis- this_deps = [ toUnitId unit | (unit,Just _) <- explicitUnits this_units]-- graphNodes :: [Node UnitId UnitId]- graphNodes = go Set.empty home_id_set- where- go done todo- = case Set.minView todo of- Nothing -> []- Just (uid, todo')- | Set.member uid done -> go done todo'- | otherwise -> case lookupUniqMap all_unit_direct_deps uid of- Nothing -> pprPanic "uid not found" (ppr (uid, all_unit_direct_deps))- Just depends ->- let todo'' = (depends Set.\\ done) `Set.union` todo'- in DigraphNode uid uid (Set.toList depends) : go (Set.insert uid done) todo''+ -- TODO: This could repeat quite a bit of work but I struggled to write this function.+ -- Which units transitively depend on a home unit+ loop :: (UnitId, UnitId) -> Set.Set UnitId -- The units which transitively depend on a home unit+ loop (from_uid, uid) =+ let us = ue_findHomeUnitEnv from_uid ue in+ let um = unitInfoMap (homeUnitEnv_units us) in+ case lookupUniqMap um uid of+ Nothing -> pprPanic "uid not found" (ppr uid)+ Just ui ->+ let depends = unitDepends ui+ home_depends = Set.fromList depends `Set.intersection` home_id_set+ other_depends = Set.fromList depends `Set.difference` home_id_set+ in+ -- Case 1: The unit directly depends on a home_id+ if not (null home_depends)+ then+ let res = foldMap (loop . (from_uid,)) other_depends+ in Set.insert uid res+ -- Case 2: Check the rest of the dependencies, and then see if any of them depended on+ else+ let res = foldMap (loop . (from_uid,)) other_depends+ in+ if not (Set.null res)+ then Set.insert uid res+ else res -- | Update the every ModSummary that is depended on -- by a module that needs template haskell. We enable codegen to@@ -2194,9 +2214,9 @@ -- annotation, but we don't know if it's a signature or a regular -- module until we actually look it up on the filesystem. let hsc_src- | is_boot == IsBoot = HsBootFile+ | is_boot == IsBoot = HsBootFile | isHaskellSigFilename src_fn = HsigFile- | otherwise = HsSrcFile+ | otherwise = HsSrcFile when (pi_mod_name /= wanted_mod) $ throwE $ singleMessage $ mkPlainErrorMsgEnvelope pi_mod_name_loc@@ -2348,8 +2368,8 @@ -- ToDo: we don't have a proper line number for this error noModError hsc_env loc wanted_mod err = mkPlainErrorMsgEnvelope loc $ GhcDriverMessage $- DriverUnknownMessage $ UnknownDiagnostic $ mkPlainError noHints $- cannotFindModule hsc_env wanted_mod err+ DriverInterfaceError $+ (Can'tFindInterface (cannotFindModule hsc_env wanted_mod err) (LookingForModule wanted_mod NotBoot)) {- noHsFileErr :: SrcSpan -> String -> DriverMessages@@ -2430,12 +2450,12 @@ hscUpdateHUG (const $ deps) hsc_env -- | Wrap an action to catch and handle exceptions.-wrapAction :: HscEnv -> IO a -> IO (Maybe a)-wrapAction hsc_env k = do+wrapAction :: (GhcMessage -> AnyGhcDiagnostic) -> HscEnv -> IO a -> IO (Maybe a)+wrapAction msg_wrapper hsc_env k = do let lcl_logger = hsc_logger hsc_env lcl_dynflags = hsc_dflags hsc_env print_config = initPrintConfig lcl_dynflags- let logg err = printMessages lcl_logger print_config (initDiagOpts lcl_dynflags) (srcErrorMessages err)+ let logg err = printMessages lcl_logger print_config (initDiagOpts lcl_dynflags) (msg_wrapper <$> srcErrorMessages err) -- MP: It is a bit strange how prettyPrintGhcErrors handles some errors but then we handle -- SourceError and ThreadKilled differently directly below. TODO: Refactor to use `catches` -- directly. MP should probably use safeTry here to not catch async exceptions but that will regress performance due to@@ -2485,9 +2505,10 @@ -- Output of the logger is mediated by a central worker to -- avoid output interleaving msg <- asks env_messager+ wrapper <- asks diag_wrapper lift $ MaybeT $ withLoggerHsc k env $ \hsc_env -> let lcl_hsc_env = setHUG deps hsc_env- in wrapAction lcl_hsc_env $ do+ in wrapAction wrapper lcl_hsc_env $ do res <- upsweep_inst lcl_hsc_env msg k n uid iu cleanCurrentModuleTempFilesMaybe (hsc_logger hsc_env) (hsc_tmpfs hsc_env) (hsc_dflags hsc_env) return res@@ -2513,7 +2534,7 @@ hydrated_hsc_env -- Compile the module, locking with a semaphore to avoid too many modules -- being compiled at the same time leading to high memory usage.- wrapAction lcl_hsc_env $ do+ wrapAction diag_wrapper lcl_hsc_env $ do res <- upsweep_mod lcl_hsc_env env_messager old_hmi mod k n cleanCurrentModuleTempFilesMaybe (hsc_logger hsc_env) (hsc_tmpfs hsc_env) lcl_dynflags return res)@@ -2525,7 +2546,7 @@ -- compiling a signature requires an knot_var for that unit. -- If you remove this then a lot of backpack tests fail. HsigFile -> Just []- _ -> mrehydrate_mods+ _ -> mrehydrate_mods {- Rehydration, see Note [Rehydrating Modules] -} @@ -2757,6 +2778,7 @@ link (ghcLink dflags) (hsc_logger hsc_env') (hsc_tmpfs hsc_env')+ (hsc_FC hsc_env') (hsc_hooks hsc_env') dflags (hsc_unit_env hsc_env')@@ -2801,12 +2823,12 @@ -} -- See Note [ModuleNameSet, efficiency and space leaks]-type ModuleNameSet = M.Map UnitId W.Word64Set+type ModuleNameSet = M.Map UnitId I.IntSet addToModuleNameSet :: UnitId -> ModuleName -> ModuleNameSet -> ModuleNameSet addToModuleNameSet uid mn s = let k = (getKey $ getUnique $ mn)- in M.insertWith (W.union) uid (W.singleton k) s+ in M.insertWith (I.union) uid (I.singleton k) s -- | Wait for some dependencies to finish and then read from the given MVar. wait_deps_hug :: MVar HomeUnitGraph -> [BuildResult] -> ReaderT MakeEnv (MaybeT IO) (HomeUnitGraph, ModuleNameSet)@@ -2817,7 +2839,7 @@ let -- Restrict to things which are in the transitive closure to avoid retaining -- reference to loop modules which have already been compiled by other threads. -- See Note [ModuleNameSet, efficiency and space leaks]- !new = udfmRestrictKeysSet (homeUnitEnv_hpt hme) (fromMaybe W.empty $ M.lookup uid module_deps)+ !new = udfmRestrictKeysSet (homeUnitEnv_hpt hme) (fromMaybe I.empty $ M.lookup uid module_deps) in hme { homeUnitEnv_hpt = new } return (unitEnv_mapWithKey pruneHomeUnitEnv hug, module_deps) @@ -2832,7 +2854,7 @@ Nothing -> return (hmis, new_deps) Just hmi -> return (hmi:hmis, new_deps) where- unionModuleNameSet = M.unionWith W.union+ unionModuleNameSet = M.unionWith I.union -- Executing the pipelines@@ -2844,32 +2866,55 @@ CC.labelThread self_tid thread_name -runPipelines :: Int -> HscEnv -> Maybe Messager -> [MakeAction] -> IO ()+runPipelines :: WorkerLimit -> HscEnv -> (GhcMessage -> AnyGhcDiagnostic) -> Maybe Messager -> [MakeAction] -> IO () -- Don't even initialise plugins if there are no pipelines-runPipelines _ _ _ [] = return ()-runPipelines n_job hsc_env mHscMessager all_pipelines = do+runPipelines n_job hsc_env diag_wrapper mHscMessager all_pipelines = do liftIO $ label_self "main --make thread" case n_job of- 1 -> runSeqPipelines hsc_env mHscMessager all_pipelines- _n -> runParPipelines n_job hsc_env mHscMessager all_pipelines+ NumProcessorsLimit n | n <= 1 -> runSeqPipelines hsc_env diag_wrapper mHscMessager all_pipelines+ _n -> runParPipelines n_job hsc_env diag_wrapper mHscMessager all_pipelines -runSeqPipelines :: HscEnv -> Maybe Messager -> [MakeAction] -> IO ()-runSeqPipelines plugin_hsc_env mHscMessager all_pipelines =+runSeqPipelines :: HscEnv -> (GhcMessage -> AnyGhcDiagnostic) -> Maybe Messager -> [MakeAction] -> IO ()+runSeqPipelines plugin_hsc_env diag_wrapper mHscMessager all_pipelines = let env = MakeEnv { hsc_env = plugin_hsc_env , withLogger = \_ k -> k id , compile_sem = AbstractSem (return ()) (return ()) , env_messager = mHscMessager+ , diag_wrapper = diag_wrapper }- in runAllPipelines 1 env all_pipelines+ in runAllPipelines (NumProcessorsLimit 1) env all_pipelines +runNjobsAbstractSem :: Int -> (AbstractSem -> IO a) -> IO a+runNjobsAbstractSem n_jobs action = do+ compile_sem <- newQSem n_jobs+ n_capabilities <- getNumCapabilities+ n_cpus <- getNumProcessors+ let+ asem = AbstractSem (waitQSem compile_sem) (signalQSem compile_sem)+ set_num_caps n = unless (n_capabilities /= 1) $ setNumCapabilities n+ updNumCapabilities = do+ -- Setting number of capabilities more than+ -- CPU count usually leads to high userspace+ -- lock contention. #9221+ set_num_caps $ min n_jobs n_cpus+ resetNumCapabilities = set_num_caps n_capabilities+ MC.bracket_ updNumCapabilities resetNumCapabilities $ action asem +runWorkerLimit :: WorkerLimit -> (AbstractSem -> IO a) -> IO a+runWorkerLimit worker_limit action = case worker_limit of+ NumProcessorsLimit n_jobs ->+ runNjobsAbstractSem n_jobs action+ JSemLimit sem ->+ runJSemAbstractSem sem action+ -- | Build and run a pipeline-runParPipelines :: Int -- ^ How many capabilities to use- -> HscEnv -- ^ The basic HscEnv which is augmented with specific info for each module+runParPipelines :: WorkerLimit -- ^ How to limit work parallelism+ -> HscEnv -- ^ The basic HscEnv which is augmented with specific info for each module+ -> (GhcMessage -> AnyGhcDiagnostic) -> Maybe Messager -- ^ Optional custom messager to use to report progress -> [MakeAction] -- ^ The build plan for all the module nodes -> IO ()-runParPipelines n_jobs plugin_hsc_env mHscMessager all_pipelines = do+runParPipelines worker_limit plugin_hsc_env diag_wrapper mHscMessager all_pipelines = do -- A variable which we write to when an error has happened and we have to tell the@@ -2879,39 +2924,24 @@ -- will add it's LogQueue into this queue. log_queue_queue_var <- newTVarIO newLogQueueQueue -- Thread which coordinates the printing of logs- wait_log_thread <- logThread n_jobs (length all_pipelines) (hsc_logger plugin_hsc_env) stopped_var log_queue_queue_var+ wait_log_thread <- logThread (hsc_logger plugin_hsc_env) stopped_var log_queue_queue_var -- Make the logger thread-safe, in case there is some output which isn't sent via the LogQueue. thread_safe_logger <- liftIO $ makeThreadSafe (hsc_logger plugin_hsc_env) let thread_safe_hsc_env = plugin_hsc_env { hsc_logger = thread_safe_logger } - let updNumCapabilities = liftIO $ do- n_capabilities <- getNumCapabilities- n_cpus <- getNumProcessors- -- Setting number of capabilities more than- -- CPU count usually leads to high userspace- -- lock contention. #9221- let n_caps = min n_jobs n_cpus- unless (n_capabilities /= 1) $ setNumCapabilities n_caps- return n_capabilities-- let resetNumCapabilities orig_n = do- liftIO $ setNumCapabilities orig_n- atomically $ writeTVar stopped_var True- wait_log_thread-- compile_sem <- newQSem n_jobs- let abstract_sem = AbstractSem (waitQSem compile_sem) (signalQSem compile_sem)+ runWorkerLimit worker_limit $ \abstract_sem -> do+ let env = MakeEnv { hsc_env = thread_safe_hsc_env+ , withLogger = withParLog log_queue_queue_var+ , compile_sem = abstract_sem+ , env_messager = mHscMessager+ , diag_wrapper = diag_wrapper+ } -- Reset the number of capabilities once the upsweep ends.- let env = MakeEnv { hsc_env = thread_safe_hsc_env- , withLogger = withParLog log_queue_queue_var- , compile_sem = abstract_sem- , env_messager = mHscMessager- }-- MC.bracket updNumCapabilities resetNumCapabilities $ \_ ->- runAllPipelines n_jobs env all_pipelines+ runAllPipelines worker_limit env all_pipelines+ atomically $ writeTVar stopped_var True+ wait_log_thread withLocalTmpFS :: RunMakeM a -> RunMakeM a withLocalTmpFS act = do@@ -2928,10 +2958,11 @@ MC.bracket initialiser finaliser $ \lcl_hsc_env -> local (\env -> env { hsc_env = lcl_hsc_env}) act -- | Run the given actions and then wait for them all to finish.-runAllPipelines :: Int -> MakeEnv -> [MakeAction] -> IO ()-runAllPipelines n_jobs env acts = do- let spawn_actions :: IO [ThreadId]- spawn_actions = if n_jobs == 1+runAllPipelines :: WorkerLimit -> MakeEnv -> [MakeAction] -> IO ()+runAllPipelines worker_limit env acts = do+ let single_worker = isWorkerLimitSequential worker_limit+ spawn_actions :: IO [ThreadId]+ spawn_actions = if single_worker then (:[]) <$> (forkIOWithUnmask $ \unmask -> void $ runLoop (\io -> io unmask) env acts) else runLoop forkIOWithUnmask env acts @@ -2957,7 +2988,7 @@ run_pipeline :: RunMakeM a -> IO (Maybe a) run_pipeline p = runMaybeT (runReaderT p env) -data MakeAction = forall a . MakeAction !(RunMakeM a) !(MVar (Maybe a))+data MakeAction = forall a . MakeAction (RunMakeM a) (MVar (Maybe a)) waitMakeAction :: MakeAction -> IO () waitMakeAction (MakeAction _ mvar) = () <$ readMVar mvar
GHC/Driver/MakeFile.hs view
@@ -17,7 +17,7 @@ import qualified GHC import GHC.Driver.Monad-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Ppr import GHC.Utils.Misc import GHC.Driver.Env@@ -27,7 +27,6 @@ import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Panic.Plain-import GHC.Types.Error (UnknownDiagnostic(..)) import GHC.Types.SourceError import GHC.Types.SrcLoc import GHC.Types.PkgQual@@ -53,6 +52,7 @@ import Data.Maybe ( isJust ) import Data.IORef import qualified Data.Set as Set+import GHC.Iface.Errors.Types ----------------------------------------------------------------- --@@ -307,9 +307,8 @@ fail -> throwOneError $ mkPlainErrorMsgEnvelope srcloc $- GhcDriverMessage $ DriverUnknownMessage $- UnknownDiagnostic $ mkPlainError noHints $- cannotFindModule hsc_env imp fail+ GhcDriverMessage $ DriverInterfaceError $+ (Can'tFindInterface (cannotFindModule hsc_env imp fail) (LookingForModule imp is_boot)) ----------------------------- writeDependency :: FilePath -> Handle -> [FilePath] -> FilePath -> IO ()
+ GHC/Driver/MakeSem.hs view
@@ -0,0 +1,545 @@+{-# LANGUAGE BlockArguments #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TupleSections #-}+{-# LANGUAGE NumericUnderscores #-}++-- | Implementation of a jobserver using system semaphores.+--+--+module GHC.Driver.MakeSem+ ( -- * JSem: parallelism semaphore backed+ -- by a system semaphore (Posix/Windows)+ runJSemAbstractSem++ -- * System semaphores+ , Semaphore, SemaphoreName(..)++ -- * Abstract semaphores+ , AbstractSem(..)+ , withAbstractSem+ )+ where++import GHC.Prelude+import GHC.Conc+import GHC.Data.OrdList+import GHC.IO.Exception+import GHC.Utils.Outputable+import GHC.Utils.Panic+import GHC.Utils.Json++import System.Semaphore++import Control.Monad+import qualified Control.Monad.Catch as MC+import Control.Concurrent.MVar+import Control.Concurrent.STM+import Data.Foldable+import Data.Functor+import GHC.Stack+import Debug.Trace++---------------------------------------+-- Semaphore jobserver++-- | A jobserver based off a system 'Semaphore'.+--+-- Keeps track of the pending jobs and resources+-- available from the semaphore.+data Jobserver+ = Jobserver+ { jSemaphore :: !Semaphore+ -- ^ The semaphore which controls available resources+ , jobs :: !(TVar JobResources)+ -- ^ The currently pending jobs, and the resources+ -- obtained from the semaphore+ }++data JobserverOptions+ = JobserverOptions+ { releaseDebounce :: !Int+ -- ^ Minimum delay, in milliseconds, between acquiring a token+ -- and releasing a token.+ , setNumCapsDebounce :: !Int+ -- ^ Minimum delay, in milliseconds, between two consecutive+ -- calls of 'setNumCapabilities'.+ }++defaultJobserverOptions :: JobserverOptions+defaultJobserverOptions =+ JobserverOptions+ { releaseDebounce = 1000 -- 1 second+ , setNumCapsDebounce = 1000 -- 1 second+ }++-- | Resources available for running jobs, i.e.+-- tokens obtained from the parallelism semaphore.+data JobResources+ = Jobs+ { tokensOwned :: !Int+ -- ^ How many tokens have been claimed from the semaphore+ , tokensFree :: !Int+ -- ^ How many tokens are not currently being used+ , jobsWaiting :: !(OrdList (TMVar ()))+ -- ^ Pending jobs waiting on a token, the job will be blocked on the TMVar so putting into+ -- the TMVar will allow the job to continue.+ }++instance Outputable JobResources where+ ppr Jobs{..}+ = text "JobResources" <+>+ ( braces $ hsep+ [ text "owned=" <> ppr tokensOwned+ , text "free=" <> ppr tokensFree+ , text "num_waiting=" <> ppr (length jobsWaiting)+ ] )++-- | Add one new token.+addToken :: JobResources -> JobResources+addToken jobs@( Jobs { tokensOwned = owned, tokensFree = free })+ = jobs { tokensOwned = owned + 1, tokensFree = free + 1 }++-- | Free one token.+addFreeToken :: JobResources -> JobResources+addFreeToken jobs@( Jobs { tokensFree = free })+ = assertPpr (tokensOwned jobs > free)+ (text "addFreeToken:" <+> ppr (tokensOwned jobs) <+> ppr free)+ $ jobs { tokensFree = free + 1 }++-- | Use up one token.+removeFreeToken :: JobResources -> JobResources+removeFreeToken jobs@( Jobs { tokensFree = free })+ = assertPpr (free > 0)+ (text "removeFreeToken:" <+> ppr free)+ $ jobs { tokensFree = free - 1 }++-- | Return one owned token.+removeOwnedToken :: JobResources -> JobResources+removeOwnedToken jobs@( Jobs { tokensOwned = owned })+ = assertPpr (owned > 1)+ (text "removeOwnedToken:" <+> ppr owned)+ $ jobs { tokensOwned = owned - 1 }++-- | Add one new job to the end of the list of pending jobs.+addJob :: TMVar () -> JobResources -> JobResources+addJob job jobs@( Jobs { jobsWaiting = wait })+ = jobs { jobsWaiting = wait `SnocOL` job }++-- | The state of the semaphore job server.+data JobserverState+ = JobserverState+ { jobserverAction :: !JobserverAction+ -- ^ The current action being performed by the+ -- job server.+ , canChangeNumCaps :: !(TVar Bool)+ -- ^ A TVar that signals whether it has been long+ -- enough since we last changed 'numCapabilities'.+ , canReleaseToken :: !(TVar Bool)+ -- ^ A TVar that signals whether we last acquired+ -- a token long enough ago that we can now release+ -- a token.+ }+data JobserverAction+ -- | The jobserver is idle: no thread is currently+ -- interacting with the semaphore.+ = Idle+ -- | A thread is waiting for a token on the semaphore.+ | Acquiring+ { activeWaitId :: WaitId+ , threadFinished :: TMVar (Maybe MC.SomeException) }++-- | Retrieve the 'TMVar' that signals if the current thread has finished,+-- if any thread is currently active in the jobserver.+activeThread_maybe :: JobserverAction -> Maybe (TMVar (Maybe MC.SomeException))+activeThread_maybe Idle = Nothing+activeThread_maybe (Acquiring { threadFinished = tmvar }) = Just tmvar++-- | Whether we should try to acquire a new token from the semaphore:+-- there is a pending job and no free tokens.+guardAcquire :: JobResources -> Bool+guardAcquire ( Jobs { tokensFree, jobsWaiting } )+ = tokensFree == 0 && not (null jobsWaiting)++-- | Whether we should release a token from the semaphore:+-- there are no pending jobs and we can release a token.+guardRelease :: JobResources -> Bool+guardRelease ( Jobs { tokensFree, tokensOwned, jobsWaiting } )+ = null jobsWaiting && tokensFree > 0 && tokensOwned > 1++---------------------------------------+-- Semaphore jobserver implementation++-- | Add one pending job to the jobserver.+--+-- Blocks, waiting on the jobserver to supply a free token.+acquireJob :: TVar JobResources -> IO ()+acquireJob jobs_tvar = do+ (job_tmvar, _jobs0) <- tracedAtomically "acquire" $+ modifyJobResources jobs_tvar \ jobs -> do+ job_tmvar <- newEmptyTMVar+ return ((job_tmvar, jobs), addJob job_tmvar jobs)+ atomically $ takeTMVar job_tmvar++-- | Signal to the job server that one job has completed,+-- releasing its corresponding token.+releaseJob :: TVar JobResources -> IO ()+releaseJob jobs_tvar = do+ tracedAtomically "release" do+ modifyJobResources jobs_tvar \ jobs -> do+ massertPpr (tokensFree jobs < tokensOwned jobs)+ (text "releaseJob: more free jobs than owned jobs!")+ return ((), addFreeToken jobs)+++-- | Release all tokens owned from the semaphore (to clean up+-- the jobserver at the end).+cleanupJobserver :: Jobserver -> IO ()+cleanupJobserver (Jobserver { jSemaphore = sem+ , jobs = jobs_tvar })+ = do+ Jobs { tokensOwned = owned } <- readTVarIO jobs_tvar+ let toks_to_release = owned - 1+ -- Subtract off the implicit token: whoever spawned the ghc process+ -- in the first place is responsible for that token.+ releaseSemaphore sem toks_to_release++-- | Dispatch the available tokens acquired from the semaphore+-- to the pending jobs in the job server.+dispatchTokens :: JobResources -> STM JobResources+dispatchTokens jobs@( Jobs { tokensFree = toks_free, jobsWaiting = wait } )+ | toks_free > 0+ , next `ConsOL` rest <- wait+ -- There's a pending job and a free token:+ -- pass on the token to that job, and recur.+ = do+ putTMVar next ()+ let jobs' = jobs { tokensFree = toks_free - 1, jobsWaiting = rest }+ dispatchTokens jobs'+ | otherwise+ = return jobs++-- | Update the available resources used from a semaphore, dispatching+-- any newly acquired resources.+--+-- Invariant: if the number of available resources decreases, there+-- must be no pending jobs.+--+-- All modifications should go through this function to ensure the contents+-- of the 'TVar' remains in normal form.+modifyJobResources :: HasCallStack => TVar JobResources+ -> (JobResources -> STM (a, JobResources))+ -> STM (a, Maybe JobResources)+modifyJobResources jobs_tvar action = do+ old_jobs <- readTVar jobs_tvar+ (a, jobs) <- action old_jobs++ -- Check the invariant: if the number of free tokens has decreased,+ -- there must be no pending jobs.+ massertPpr (null (jobsWaiting jobs) || tokensFree jobs >= tokensFree old_jobs) $+ vcat [ text "modiyJobResources: pending jobs but fewer free tokens" ]+ dispatched_jobs <- dispatchTokens jobs+ writeTVar jobs_tvar dispatched_jobs+ return (a, Just dispatched_jobs)+++tracedAtomically_ :: String -> STM (Maybe JobResources) -> IO ()+tracedAtomically_ s act = tracedAtomically s (((),) <$> act)++tracedAtomically :: String -> STM (a, Maybe JobResources) -> IO a+tracedAtomically origin act = do+ (a, mjr) <- atomically act+ forM_ mjr $ \ jr -> do+ -- Use the "jsem:" prefix to identify where the write traces are+ traceEventIO ("jsem:" ++ renderJobResources origin jr)+ return a++renderJobResources :: String -> JobResources -> String+renderJobResources origin (Jobs own free pending) = showSDocUnsafe $ renderJSON $+ JSObject [ ("name", JSString origin)+ , ("owned", JSInt own)+ , ("free", JSInt free)+ , ("pending", JSInt (length pending) )+ ]+++-- | Spawn a new thread that waits on the semaphore in order to acquire+-- an additional token.+acquireThread :: Jobserver -> IO JobserverAction+acquireThread (Jobserver { jSemaphore = sem, jobs = jobs_tvar }) = do+ threadFinished_tmvar <- newEmptyTMVarIO+ let+ wait_result_action :: Either MC.SomeException Bool -> IO ()+ wait_result_action wait_res =+ tracedAtomically_ "acquire_thread" do+ (r, jb) <- case wait_res of+ Left (e :: MC.SomeException) -> do+ return $ (Just e, Nothing)+ Right success -> do+ if success+ then do+ modifyJobResources jobs_tvar \ jobs ->+ return (Nothing, addToken jobs)+ else+ return (Nothing, Nothing)+ putTMVar threadFinished_tmvar r+ return jb+ wait_id <- forkWaitOnSemaphoreInterruptible sem wait_result_action+ labelThread (waitingThreadId wait_id) "acquire_thread"+ return $ Acquiring { activeWaitId = wait_id+ , threadFinished = threadFinished_tmvar }++-- | Spawn a thread to release ownership of one resource from the semaphore,+-- provided we have spare resources and no pending jobs.+releaseThread :: Jobserver -> IO JobserverAction+releaseThread (Jobserver { jSemaphore = sem, jobs = jobs_tvar }) = do+ threadFinished_tmvar <- newEmptyTMVarIO+ MC.mask_ do+ -- Pre-release the resource so that another thread doesn't take control of it+ -- just as we release the lock on the semaphore.+ still_ok_to_release+ <- tracedAtomically "pre_release" $+ modifyJobResources jobs_tvar \ jobs ->+ if guardRelease jobs+ -- TODO: should this also debounce?+ then return (True , removeOwnedToken $ removeFreeToken jobs)+ else return (False, jobs)+ if not still_ok_to_release+ then return Idle+ else do+ tid <- forkIO $ do+ x <- MC.try $ releaseSemaphore sem 1+ tracedAtomically_ "post-release" $ do+ (r, jobs) <- case x of+ Left (e :: MC.SomeException) -> do+ modifyJobResources jobs_tvar \ jobs ->+ return (Just e, addToken jobs)+ Right _ -> do+ return (Nothing, Nothing)+ putTMVar threadFinished_tmvar r+ return jobs+ labelThread tid "release_thread"+ return Idle++-- | When there are pending jobs but no free tokens,+-- spawn a thread to acquire a new token from the semaphore.+--+-- See 'acquireThread'.+tryAcquire :: JobserverOptions+ -> Jobserver+ -> JobserverState+ -> STM (IO JobserverState)+tryAcquire opts js@( Jobserver { jobs = jobs_tvar })+ st@( JobserverState { jobserverAction = Idle } )+ = do+ jobs <- readTVar jobs_tvar+ guard $ guardAcquire jobs+ return do+ action <- acquireThread js+ -- Set a debounce after acquiring a token.+ can_release_tvar <- registerDelay $ (releaseDebounce opts * 1000)+ return $ st { jobserverAction = action+ , canReleaseToken = can_release_tvar }+tryAcquire _ _ _ = retry++-- | When there are free tokens and no pending jobs,+-- spawn a thread to release a token from the semamphore.+--+-- See 'releaseThread'.+tryRelease :: Jobserver+ -> JobserverState+ -> STM (IO JobserverState)+tryRelease sjs@( Jobserver { jobs = jobs_tvar } )+ st@( JobserverState+ { jobserverAction = Idle+ , canReleaseToken = can_release_tvar } )+ = do+ jobs <- readTVar jobs_tvar+ guard $ guardRelease jobs+ can_release <- readTVar can_release_tvar+ guard can_release+ return do+ action <- releaseThread sjs+ return $ st { jobserverAction = action }+tryRelease _ _ = retry++-- | Wait for an active thread to finish. Once it finishes:+--+-- - set the 'JobserverAction' to 'Idle',+-- - update the number of capabilities to reflect the number+-- of owned tokens from the semaphore.+tryNoticeIdle :: JobserverOptions+ -> TVar JobResources+ -> JobserverState+ -> STM (IO JobserverState)+tryNoticeIdle opts jobs_tvar jobserver_state+ | Just threadFinished_tmvar <- activeThread_maybe $ jobserverAction jobserver_state+ = sync_num_caps (canChangeNumCaps jobserver_state) threadFinished_tmvar+ | otherwise+ = retry -- no active thread: wait until jobserver isn't idle+ where+ sync_num_caps :: TVar Bool+ -> TMVar (Maybe MC.SomeException)+ -> STM (IO JobserverState)+ sync_num_caps can_change_numcaps_tvar threadFinished_tmvar = do+ mb_ex <- takeTMVar threadFinished_tmvar+ for_ mb_ex MC.throwM+ Jobs { tokensOwned } <- readTVar jobs_tvar+ can_change_numcaps <- readTVar can_change_numcaps_tvar+ guard can_change_numcaps+ return do+ x <- getNumCapabilities+ can_change_numcaps_tvar_2 <-+ if x == tokensOwned+ then return can_change_numcaps_tvar+ else do+ setNumCapabilities tokensOwned+ registerDelay $ (setNumCapsDebounce opts * 1000)+ return $+ jobserver_state+ { jobserverAction = Idle+ , canChangeNumCaps = can_change_numcaps_tvar_2 }++-- | Try to stop the current thread which is acquiring/releasing resources+-- if that operation is no longer relevant.+tryStopThread :: TVar JobResources+ -> JobserverState+ -> STM (IO JobserverState)+tryStopThread jobs_tvar jsj = do+ case jobserverAction jsj of+ Acquiring { activeWaitId = wait_id } -> do+ jobs <- readTVar jobs_tvar+ guard $ null (jobsWaiting jobs)+ return do+ interruptWaitOnSemaphore wait_id+ return $ jsj { jobserverAction = Idle }+ _ -> retry++-- | Main jobserver loop: acquire/release resources as+-- needed for the pending jobs and available semaphore tokens.+jobserverLoop :: JobserverOptions -> Jobserver -> IO ()+jobserverLoop opts sjs@(Jobserver { jobs = jobs_tvar })+ = do+ true_tvar <- newTVarIO True+ let init_state :: JobserverState+ init_state =+ JobserverState+ { jobserverAction = Idle+ , canChangeNumCaps = true_tvar+ , canReleaseToken = true_tvar }+ loop init_state+ where+ loop s = do+ action <- atomically $ asum $ (\x -> x s) <$>+ [ tryRelease sjs+ , tryAcquire opts sjs+ , tryNoticeIdle opts jobs_tvar+ , tryStopThread jobs_tvar+ ]+ s <- action+ loop s++-- | Create a new jobserver using the given semaphore handle.+makeJobserver :: SemaphoreName -> IO (AbstractSem, IO ())+makeJobserver sem_name = do+ semaphore <- openSemaphore sem_name+ let+ init_jobs =+ Jobs { tokensOwned = 1+ , tokensFree = 1+ , jobsWaiting = NilOL+ }+ jobs_tvar <- newTVarIO init_jobs+ let+ opts = defaultJobserverOptions -- TODO: allow this to be configured+ sjs = Jobserver { jSemaphore = semaphore+ , jobs = jobs_tvar }+ loop_finished_mvar <- newEmptyMVar+ loop_tid <- forkIOWithUnmask \ unmask -> do+ r <- try $ unmask $ jobserverLoop opts sjs+ putMVar loop_finished_mvar $+ case r of+ Left e+ | Just ThreadKilled <- fromException e+ -> Nothing+ | otherwise+ -> Just e+ Right () -> Nothing+ labelThread loop_tid "job_server"+ let+ acquireSem = acquireJob jobs_tvar+ releaseSem = releaseJob jobs_tvar+ cleanupSem = do+ -- this is interruptible+ cleanupJobserver sjs+ killThread loop_tid+ mb_ex <- takeMVar loop_finished_mvar+ for_ mb_ex MC.throwM++ return (AbstractSem{..}, cleanupSem)++-- | Implement an abstract semaphore using a semaphore 'Jobserver'+-- which queries the system semaphore of the given name for resources.+runJSemAbstractSem :: SemaphoreName -- ^ the system semaphore to use+ -> (AbstractSem -> IO a) -- ^ the operation to run+ -- which requires a semaphore+ -> IO a+runJSemAbstractSem sem action = MC.mask \ unmask -> do+ (abs, cleanup) <- makeJobserver sem+ r <- try $ unmask $ action abs+ case r of+ Left (e1 :: MC.SomeException) -> do+ (_ :: Either MC.SomeException ()) <- MC.try cleanup+ MC.throwM e1+ Right x -> cleanup $> x++{- Note [Architecture of the Job Server]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In `-jsem` mode, the amount of parallelism that GHC can use is controlled by a+system semaphore. We take resources from the semaphore when we need them, and+give them back if we don't have enough to do.++A naive implementation would just take and release the semaphore around performing+the action, but this leads to two issues:++* When taking a token in the semaphore, we must call `setNumCapabilities` in order+ to adjust how many capabilities are available for parallel garbage collection.+ This causes unnecessary synchronisations.+* We want to implement a debounce, so that whilst there is pending work in the+ current process we prefer to keep hold of resources from the semaphore.+ This reduces overall memory usage, as there are fewer live GHC processes at once.++Therefore, the obtention of semaphore resources is separated away from the+request for the resource in the driver.++A token from the semaphore is requested using `acquireJob`. This creates a pending+job, which is a MVar that can be filled in to signal that the requested token is ready.++When the job is finished, the token is released by calling `releaseJob`, which just+increases the number of `free` jobs. If there are more pending jobs when the free count+is increased, the token is immediately reused (see `modifyJobResources`).++The `jobServerLoop` interacts with the system semaphore: when there are pending+jobs, `acquireThread` blocks, waiting for a token from the semaphore. Once a+token is obtained, it increases the owned count.++When GHC has free tokens (tokens from the semaphore that it is not using),+no pending jobs, and the debounce has expired, then `releaseThread` will+release tokens back to the global semaphore.++`tryStopThread` attempts to kill threads which are waiting to acquire a resource+when we no longer need it. For example, consider that we attempt to acquire two+tokens, but the first job finishes before we acquire the second token.+This second token is no longer needed, so we should cancel the wait+(as it would not be used to do any work, and not be returned until the debounce).+We only need to kill `acquireJob`, because `releaseJob` never blocks.++Note [Eventlog Messages for jsem]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+It can be tricky to verify that the work is shared adequately across different+processes. To help debug this, we output the values of `JobResource` to the+eventlog whenever the global state changes. There are some scripts which can be used+to analyse this output and report statistics about core saturation in the+GitHub repo (https://github.com/mpickering/ghc-jsem-analyse).++-}
GHC/Driver/Monad.hs view
@@ -34,7 +34,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Env import GHC.Driver.Errors ( printOrThrowDiagnostics, printMessages ) import GHC.Driver.Errors.Types
GHC/Driver/Pipeline.hs view
@@ -103,7 +103,7 @@ import GHC.Types.Basic ( SuccessFlag(..), ForeignSrcLang(..) )-import GHC.Types.Error ( singleMessage, getMessages, UnknownDiagnostic (..) )+import GHC.Types.Error ( singleMessage, getMessages, mkSimpleUnknownDiagnostic, defaultDiagnosticOpts ) import GHC.Types.Target import GHC.Types.SrcLoc import GHC.Types.SourceFile@@ -111,7 +111,7 @@ import GHC.Unit import GHC.Unit.Env---import GHC.Unit.Finder+import GHC.Unit.Finder --import GHC.Unit.State import GHC.Unit.Module.ModSummary import GHC.Unit.Module.ModIface@@ -129,7 +129,6 @@ import Data.Time ( getCurrentTime ) import GHC.Iface.Recomp-import GHC.Types.Unique.DSet -- Simpler type synonym for actions in the pipeline monad type P m = TPipelineClass TPhase m@@ -163,7 +162,7 @@ handler (ProgramError msg) = return $ Left $ singleMessage $ mkPlainErrorMsgEnvelope srcspan $- DriverUnknownMessage $ UnknownDiagnostic $ mkPlainError noHints $ text msg+ DriverUnknownMessage $ mkSimpleUnknownDiagnostic $ mkPlainError noHints $ text msg handler ex = throwGhcExceptionIO ex to_driver_messages :: Messages GhcMessage -> Messages DriverMessage@@ -352,6 +351,7 @@ link :: GhcLink -- ^ interactive or batch -> Logger -- ^ Logger -> TmpFs+ -> FinderCache -> Hooks -> DynFlags -- ^ dynamic flags -> UnitEnv -- ^ unit environment@@ -367,7 +367,7 @@ -- exports main, i.e., we have good reason to believe that linking -- will succeed. -link ghcLink logger tmpfs hooks dflags unit_env batch_attempt_linking mHscMessage hpt =+link ghcLink logger tmpfs fc hooks dflags unit_env batch_attempt_linking mHscMessage hpt = case linkHook hooks of Nothing -> case ghcLink of NoLink -> return Succeeded@@ -383,7 +383,7 @@ -> panicBadLink LinkInMemory Just h -> h ghcLink dflags batch_attempt_linking hpt where- normal_link = link' logger tmpfs dflags unit_env batch_attempt_linking mHscMessage hpt+ normal_link = link' logger tmpfs fc dflags unit_env batch_attempt_linking mHscMessage hpt panicBadLink :: GhcLink -> a@@ -392,6 +392,7 @@ link' :: Logger -> TmpFs+ -> FinderCache -> DynFlags -- ^ dynamic flags -> UnitEnv -- ^ unit environment -> Bool -- ^ attempt linking in batch mode?@@ -399,7 +400,7 @@ -> HomePackageTable -- ^ what to link -> IO SuccessFlag -link' logger tmpfs dflags unit_env batch_attempt_linking mHscMessager hpt+link' logger tmpfs fc dflags unit_env batch_attempt_linking mHscMessager hpt | batch_attempt_linking = do let@@ -446,7 +447,7 @@ -- Don't showPass in Batch mode; doLink will do that for us. case ghcLink dflags of LinkBinary- | backendUseJSLinker (backend dflags) -> linkJSBinary logger dflags unit_env obj_files pkg_deps+ | backendUseJSLinker (backend dflags) -> linkJSBinary logger fc dflags unit_env obj_files pkg_deps | otherwise -> linkBinary logger tmpfs dflags unit_env obj_files pkg_deps LinkStaticLib -> linkStaticLib logger dflags unit_env obj_files pkg_deps LinkDynLib -> linkDynLibCheck logger tmpfs dflags unit_env obj_files pkg_deps@@ -463,14 +464,14 @@ return Succeeded -linkJSBinary :: Logger -> DynFlags -> UnitEnv -> [FilePath] -> [UnitId] -> IO ()-linkJSBinary logger dflags unit_env obj_files pkg_deps = do+linkJSBinary :: Logger -> FinderCache -> DynFlags -> UnitEnv -> [FilePath] -> [UnitId] -> IO ()+linkJSBinary logger fc dflags unit_env obj_files pkg_deps = do -- we use the default configuration for now. In the future we may expose -- settings to the user via DynFlags. let lc_cfg = defaultJSLinkConfig let cfg = initStgToJSConfig dflags let extra_js = mempty- jsLinkBinary lc_cfg cfg extra_js logger dflags unit_env obj_files pkg_deps+ jsLinkBinary fc lc_cfg cfg extra_js logger dflags unit_env obj_files pkg_deps linkingNeeded :: Logger -> DynFlags -> UnitEnv -> Bool -> [Linkable] -> [UnitId] -> IO RecompileRequired linkingNeeded logger dflags unit_env staticLink linkables pkg_deps = do@@ -496,18 +497,8 @@ -- next, check libraries. XXX this only checks Haskell libraries, -- not extra_libraries or -l things from the command line.- -- pkg_deps is just the direct dependencies so take the transitive closure here- -- to decide if we need to relink or not.- let pkg_hslibs acc uid- | uid `elementOfUniqDSet` acc = acc- | Just c <- lookupUnitId unit_state uid =- foldl' @[] pkg_hslibs (addOneToUniqDSet acc uid) (unitDepends c)- | otherwise = acc-- all_pkg_deps = foldl' @[] pkg_hslibs emptyUniqDSet pkg_deps- let pkg_hslibs = [ (collectLibraryDirs (ways dflags) [c], lib)- | Just c <- map (lookupUnitId unit_state) (uniqDSetToList all_pkg_deps),+ | Just c <- map (lookupUnitId unit_state) pkg_deps, lib <- unitHsLibs (ghcNameVersion dflags) (ways dflags) c ] pkg_libfiles <- mapM (uncurry (findHSLib platform (ways dflags))) pkg_hslibs@@ -542,6 +533,7 @@ -- In oneshot mode, initialise plugins specified on command line -- we also initialise in ghc/Main but this might be used as an entry point by API clients who -- should initialise their own plugins but may not.+ -- See Note [Timing of plugin initialization] hsc_env <- initializePlugins orig_hsc_env o_files <- mapMaybeM (compileFile hsc_env stop_phase) srcs case stop_phase of@@ -552,28 +544,28 @@ compileFile :: HscEnv -> StopPhase -> (FilePath, Maybe Phase) -> IO (Maybe FilePath) compileFile hsc_env stop_phase (src, mb_phase) = do- let offset_file = augmentByWorkingDirectory dflags src- dflags = hsc_dflags hsc_env- mb_o_file = outputFile dflags- ghc_link = ghcLink dflags -- Set by -c or -no-link- notStopPreprocess | StopPreprocess <- stop_phase = False- | _ <- stop_phase = True- -- When linking, the -o argument refers to the linker's output.- -- otherwise, we use it as the name for the pipeline's output.- output- | not (backendGeneratesCode (backend dflags)), notStopPreprocess = NoOutputFile- -- avoid -E -fno-code undesirable interactions. see #20439- | NoStop <- stop_phase, not (isNoLink ghc_link) = Persistent- -- -o foo applies to linker- | isJust mb_o_file = SpecificFile- -- -o foo applies to the file we are compiling now- | otherwise = Persistent- pipe_env = mkPipeEnv stop_phase offset_file mb_phase output- pipeline = pipelineStart pipe_env (setDumpPrefix pipe_env hsc_env) offset_file mb_phase-- exists <- doesFileExist offset_file+ exists <- doesFileExist src when (not exists) $- throwGhcExceptionIO (CmdLineError ("does not exist: " ++ offset_file))+ throwGhcExceptionIO (CmdLineError ("does not exist: " ++ src))++ let+ dflags = hsc_dflags hsc_env+ mb_o_file = outputFile dflags+ ghc_link = ghcLink dflags -- Set by -c or -no-link+ notStopPreprocess | StopPreprocess <- stop_phase = False+ | _ <- stop_phase = True+ -- When linking, the -o argument refers to the linker's output.+ -- otherwise, we use it as the name for the pipeline's output.+ output+ | not (backendGeneratesCode (backend dflags)), notStopPreprocess = NoOutputFile+ -- avoid -E -fno-code undesirable interactions. see #20439+ | NoStop <- stop_phase, not (isNoLink ghc_link) = Persistent+ -- -o foo applies to linker+ | isJust mb_o_file = SpecificFile+ -- -o foo applies to the file we are compiling now+ | otherwise = Persistent+ pipe_env = mkPipeEnv stop_phase src mb_phase output+ pipeline = pipelineStart pipe_env (setDumpPrefix pipe_env hsc_env) src mb_phase runPipeline (hsc_hooks hsc_env) pipeline @@ -584,12 +576,13 @@ logger = hsc_logger hsc_env unit_env = hsc_unit_env hsc_env tmpfs = hsc_tmpfs hsc_env+ fc = hsc_FC hsc_env case ghcLink dflags of NoLink -> return () LinkBinary | backendUseJSLinker (backend dflags)- -> linkJSBinary logger dflags unit_env o_files []+ -> linkJSBinary logger fc dflags unit_env o_files [] | otherwise -> linkBinary logger tmpfs dflags unit_env o_files [] LinkStaticLib -> linkStaticLib logger dflags unit_env o_files [] LinkDynLib -> linkDynLibCheck logger tmpfs dflags unit_env o_files []@@ -747,7 +740,7 @@ let print_config = initPrintConfig dflags3 liftIO (printOrThrowDiagnostics (hsc_logger hsc_env) print_config (initDiagOpts dflags3) (GhcPsMessage <$> p_warns3))- liftIO (handleFlagWarnings (hsc_logger hsc_env) print_config (initDiagOpts dflags3) warns3)+ liftIO (printOrThrowDiagnostics (hsc_logger hsc_env) print_config (initDiagOpts dflags3) (GhcDriverMessage <$> warns3)) return (dflags3, pp_fn) @@ -879,9 +872,8 @@ use (T_ForeignJs pipe_env hsc_env location input_fn) hscPostBackendPipeline :: P m => PipeEnv -> HscEnv -> HscSource -> Backend -> Maybe ModLocation -> FilePath -> m (Maybe FilePath)-hscPostBackendPipeline _ _ HsBootFile _ _ _ = return Nothing-hscPostBackendPipeline _ _ HsigFile _ _ _ = return Nothing-hscPostBackendPipeline pipe_env hsc_env _ bcknd ml input_fn =+hscPostBackendPipeline _ _ (HsBootOrSig _) _ _ _ = return Nothing+hscPostBackendPipeline pipe_env hsc_env HsSrcFile bcknd ml input_fn = applyPostHscPipeline (backendPostHscPipeline bcknd) pipe_env hsc_env ml input_fn applyPostHscPipeline
GHC/Driver/Pipeline/Execute.hs view
@@ -28,7 +28,6 @@ import GHC.Unit.Module.ModIface import GHC.Driver.Backend import GHC.Driver.Session-import GHC.Driver.CmdLine import GHC.Unit.Module.ModSummary import qualified GHC.LanguageExtensions as LangExt import GHC.Types.SrcLoc@@ -293,11 +292,7 @@ -- LLVM from version 3.0 onwards doesn't support the OS X system -- assembler, so we use clang as the assembler instead. (#5636)- let (as_prog, get_asm_info) =- ( applyAssemblerProg $ backendAssemblerProg (backend dflags)- , applyAssemblerInfoGetter $ backendAssemblerInfoGetter (backend dflags)- )- asmInfo <- get_asm_info logger dflags platform+ let as_prog = applyAssemblerProg $ backendAssemblerProg (backend dflags) let cmdline_include_paths = includePaths dflags let pic_c_flags = picCCOpts dflags@@ -331,9 +326,6 @@ ++ [ GHC.SysTools.Option "-Wa,--no-type-check" | platformArch (targetPlatform dflags) == ArchWasm32] - ++ (if any (asmInfo ==) [Clang, AppleClang, AppleClang51]- then [GHC.SysTools.Option "-Qunused-arguments"]- else []) ++ [ GHC.SysTools.Option "-x" , if with_cpp then GHC.SysTools.Option "assembler-with-cpp"@@ -401,19 +393,6 @@ return output_fn -applyAssemblerInfoGetter- :: DefunctionalizedAssemblerInfoGetter- -> Logger -> DynFlags -> Platform -> IO CompilerInfo-applyAssemblerInfoGetter StandardAssemblerInfoGetter logger dflags _platform =- getAssemblerInfo logger dflags-applyAssemblerInfoGetter JSAssemblerInfoGetter _ _ _ =- pure Emscripten-applyAssemblerInfoGetter DarwinClangAssemblerInfoGetter logger dflags platform =- if platformOS platform == OSDarwin then- pure Clang- else- getAssemblerInfo logger dflags- applyAssemblerProg :: DefunctionalizedAssemblerProg -> Logger -> DynFlags -> Platform -> [Option] -> IO ()@@ -683,7 +662,7 @@ return output_fn -getFileArgs :: HscEnv -> FilePath -> IO ((DynFlags, Messages PsMessage, [Warn]))+getFileArgs :: HscEnv -> FilePath -> IO ((DynFlags, Messages PsMessage, Messages DriverMessage)) getFileArgs hsc_env input_fn = do let dflags0 = hsc_dflags hsc_env parser_opts = initParserOpts dflags0@@ -1028,6 +1007,7 @@ ++ ["+avx512cd"| isAvx512cdEnabled dflags ] ++ ["+avx512er"| isAvx512erEnabled dflags ] ++ ["+avx512pf"| isAvx512pfEnabled dflags ]+ ++ ["+fma" | isFmaEnabled dflags ] ++ ["+bmi" | isBmiEnabled dflags ] ++ ["+bmi2" | isBmi2Enabled dflags ] @@ -1039,9 +1019,8 @@ -- | What phase to run after one of the backend code generators has run hscPostBackendPhase :: HscSource -> Backend -> Phase-hscPostBackendPhase HsBootFile _ = StopLn-hscPostBackendPhase HsigFile _ = StopLn-hscPostBackendPhase _ bcknd = backendNormalSuccessorPhase bcknd+hscPostBackendPhase (HsBootOrSig _) _ = StopLn+hscPostBackendPhase HsSrcFile bcknd = backendNormalSuccessorPhase bcknd compileStub :: HscEnv -> FilePath -> IO FilePath@@ -1094,17 +1073,13 @@ The command used for object linking is set using the -pgmlm and -optlm command-line options. -However, `ld -r` is broken in some cases:-- * The LLD linker that we use on Windows does not support the `-r`- flag needed to support object merging (see #21068). For this reason- on Windows we do not support GHCi objects.--In these cases, we bundle a module's own object file with its foreign-stub's object file, instead of merging them. Consequently, we can end-up producing `.o` files which are in fact static archives. This can-only work if `ar -L` is supported, so the archive `.o` files can be-properly added to the final static library.+Sadly, the LLD linker that we use on Windows does not support the `-r` flag+needed to support object merging (see #21068). For this reason on Windows we do+not support GHCi objects. To deal with foreign stubs we build a static archive+of all of a module's object files instead merging them. Consequently, we can+end up producing `.o` files which are in fact static archives. However,+toolchains generally don't have a problem with this as they use file headers,+not the filename, to determine the nature of inputs. Note that this has somewhat non-obvious consequences when producing initializers and finalizers. See Note [Initializers and finalizers in Cmm]@@ -1130,7 +1105,7 @@ -- | See Note [Object merging]. joinObjectFiles :: HscEnv -> [FilePath] -> FilePath -> IO () joinObjectFiles hsc_env o_files output_fn- | can_merge_objs = do+ | can_merge_objs && not dashLSupported = do let toolSettings' = toolSettings dflags ldIsGnuLd = toolSettings_ldIsGnuLd toolSettings' ld_r args = GHC.SysTools.runMergeObjects (hsc_logger hsc_env) (hsc_tmpfs hsc_env) (hsc_dflags hsc_env) (
GHC/Driver/Pipeline/LogQueue.hs view
@@ -100,10 +100,10 @@ Just ((k, v), lqq') | k == n -> Just (v, LogQueueQueue (n + 1) lqq') _ -> Nothing -logThread :: Int -> Int -> Logger -> TVar Bool -- Signal that no more new logs will be added, clear the queue and exit+logThread :: Logger -> TVar Bool -- Signal that no more new logs will be added, clear the queue and exit -> TVar LogQueueQueue -- Queue for logs -> IO (IO ())-logThread _ _ logger stopped lqq_var = do+logThread logger stopped lqq_var = do finished_var <- newEmptyMVar _ <- forkIO $ print_logs *> putMVar finished_var () return (takeMVar finished_var)
GHC/Driver/Pipeline/Phases.hs view
@@ -6,8 +6,7 @@ import GHC.Prelude import GHC.Driver.Pipeline.Monad import GHC.Driver.Env.Types-import GHC.Driver.Session-import GHC.Driver.CmdLine+import GHC.Driver.DynFlags import GHC.Types.SourceFile import GHC.Unit.Module.ModSummary import GHC.Unit.Module.Status@@ -29,7 +28,7 @@ -- phase if the inputs have been modified. data TPhase res where T_Unlit :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath- T_FileArgs :: HscEnv -> FilePath -> TPhase (DynFlags, Messages PsMessage, [Warn])+ T_FileArgs :: HscEnv -> FilePath -> TPhase (DynFlags, Messages PsMessage, Messages DriverMessage) T_Cpp :: PipeEnv -> HscEnv -> FilePath -> TPhase FilePath T_HsPp :: PipeEnv -> HscEnv -> FilePath -> FilePath -> TPhase FilePath T_HscRecomp :: PipeEnv -> HscEnv -> FilePath -> HscSource -> TPhase (HscEnv, ModSummary, HscRecompStatus)
GHC/Driver/Plugins.hs view
@@ -82,7 +82,7 @@ import qualified GHC.Tc.Types import GHC.Tc.Types ( TcGblEnv, IfM, TcM, tcg_rn_decls, tcg_rn_exports )-import GHC.Tc.Errors.Hole.FitTypes ( HoleFitPluginR )+import GHC.Tc.Errors.Hole.Plugin ( HoleFitPluginR ) import GHC.Core.Opt.Monad ( CoreM ) import GHC.Core.Opt.Pipeline.Types ( CoreToDo )
GHC/Driver/Ppr.hs view
@@ -11,7 +11,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Unit.State import GHC.Utils.Outputable
GHC/Driver/Session.hs view
@@ -33,5056 +33,3817 @@ gopt, gopt_set, gopt_unset, setGeneralFlag', unSetGeneralFlag', wopt, wopt_set, wopt_unset, wopt_fatal, wopt_set_fatal, wopt_unset_fatal,- xopt, xopt_set, xopt_unset,- xopt_set_unlessExplSpec,- xopt_DuplicateRecordFields,- xopt_FieldSelectors,- lang_set,- DynamicTooState(..), dynamicTooState, setDynamicNow,- sccProfilingEnabled,- needSourceNotes,- OnOff(..),- DynFlags(..),- outputFile, objectSuf, ways,- FlagSpec(..),- HasDynFlags(..), ContainsDynFlags(..),- RtsOptsEnabled(..),- GhcMode(..), isOneShot,- GhcLink(..), isNoLink,- PackageFlag(..), PackageArg(..), ModRenaming(..),- packageFlagsChanged,- IgnorePackageFlag(..), TrustFlag(..),- PackageDBFlag(..), PkgDbRef(..),- Option(..), showOpt,- DynLibLoader(..),- fFlags, fLangFlags, xFlags,- wWarningFlags,- makeDynFlagsConsistent,- positionIndependent,- optimisationFlags,- codeGenFlags,- setFlagsFromEnvFile,- pprDynFlagsDiff,- flagSpecOf,-- targetProfile,-- -- ** Safe Haskell- safeHaskellOn, safeHaskellModeEnabled,- safeImportsOn, safeLanguageOn, safeInferOn,- packageTrustOn,- safeDirectImpsReq, safeImplicitImpsReq,- unsafeFlags, unsafeFlagsForInfer,-- -- ** System tool settings and locations- Settings(..),- sProgramName,- sProjectVersion,- sGhcUsagePath,- sGhciUsagePath,- sToolDir,- sTopDir,- sGlobalPackageDatabasePath,- sLdSupportsCompactUnwind,- sLdSupportsFilelist,- sLdIsGnuLd,- sGccSupportsNoPie,- sPgm_L,- sPgm_P,- sPgm_F,- sPgm_c,- sPgm_cxx,- sPgm_a,- sPgm_l,- sPgm_lm,- sPgm_dll,- sPgm_T,- sPgm_windres,- sPgm_ar,- sPgm_ranlib,- sPgm_lo,- sPgm_lc,- sPgm_lcc,- sPgm_i,- sOpt_L,- sOpt_P,- sOpt_P_fingerprint,- sOpt_F,- sOpt_c,- sOpt_cxx,- sOpt_a,- sOpt_l,- sOpt_lm,- sOpt_windres,- sOpt_lo,- sOpt_lc,- sOpt_lcc,- sOpt_i,- sExtraGccViaCFlags,- sTargetPlatformString,- sGhcWithInterpreter,- sLibFFI,- GhcNameVersion(..),- FileSettings(..),- PlatformMisc(..),- settings,- programName, projectVersion,- ghcUsagePath, ghciUsagePath, topDir,- versionedAppDir, versionedFilePath,- extraGccViaCFlags, globalPackageDatabasePath,- pgm_L, pgm_P, pgm_F, pgm_c, pgm_cxx, pgm_a, pgm_l, pgm_lm, pgm_dll, pgm_T,- pgm_windres, pgm_ar,- pgm_ranlib, pgm_lo, pgm_lc, pgm_lcc, pgm_i,- opt_L, opt_P, opt_F, opt_c, opt_cxx, opt_a, opt_l, opt_lm, opt_i,- opt_P_signature,- opt_windres, opt_lo, opt_lc, opt_lcc,- updatePlatformConstants,-- -- ** Manipulating DynFlags- addPluginModuleName,- defaultDynFlags, -- Settings -> DynFlags- initDynFlags, -- DynFlags -> IO DynFlags- defaultFatalMessager,- defaultFlushOut,- setOutputFile, setDynOutputFile, setOutputHi, setDynOutputHi,- augmentByWorkingDirectory,-- getOpts, -- DynFlags -> (DynFlags -> [a]) -> [a]- getVerbFlags,- updOptLevel,- setTmpDir,- setUnitId,-- TurnOnFlag,- turnOn,- turnOff,- impliedGFlags,- impliedOffGFlags,- impliedXFlags,-- -- ** State- CmdLineP(..), runCmdLineP,- getCmdLineState, putCmdLineState,- processCmdLineP,-- -- ** Parsing DynFlags- parseDynamicFlagsCmdLine,- parseDynamicFilePragma,- parseDynamicFlagsFull,-- -- ** Available DynFlags- allNonDeprecatedFlags,- flagsAll,- flagsDynamic,- flagsPackage,- flagsForCompletion,-- supportedLanguagesAndExtensions,- languageExtensions,-- -- ** DynFlags C compiler options- picCCOpts, picPOpts,-- -- ** DynFlags C linker options- pieCCLDOpts,-- -- * Compiler configuration suitable for display to the user- compilerInfo,-- wordAlignment,-- setUnsafeGlobalDynFlags,-- -- * SSE and AVX- isSse4_2Enabled,- isBmiEnabled,- isBmi2Enabled,- isAvxEnabled,- isAvx2Enabled,- isAvx512cdEnabled,- isAvx512erEnabled,- isAvx512fEnabled,- isAvx512pfEnabled,-- -- * Linker/compiler information- LinkerInfo(..),- CompilerInfo(..),- useXLinkerRPath,-- -- * Include specifications- IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes,- addImplicitQuoteInclude,-- -- * SDoc- initSDocContext, initDefaultSDocContext,- initPromotionTickContext,- ) where--import GHC.Prelude--import GHC.Platform-import GHC.Platform.Ways-import GHC.Platform.Profile--import GHC.UniqueSubdir (uniqueSubdir)-import GHC.Unit.Types-import GHC.Unit.Parser-import GHC.Unit.Module-import GHC.Builtin.Names ( mAIN_NAME )-import GHC.Driver.Phases ( Phase(..), phaseInputExt )-import GHC.Driver.Flags-import GHC.Driver.Backend-import GHC.Driver.Plugins.External-import GHC.Settings.Config-import GHC.Utils.CliOption-import GHC.Core.Unfold-import GHC.Driver.CmdLine-import GHC.Settings.Constants-import GHC.Utils.Panic-import qualified GHC.Utils.Ppr.Colour as Col-import GHC.Utils.Misc-import GHC.Utils.Constants (debugIsOn)-import GHC.Utils.GlobalVars-import GHC.Data.Maybe-import GHC.Data.Bool-import GHC.Utils.Monad-import GHC.Types.Error (DiagnosticReason(..))-import GHC.Types.SrcLoc-import GHC.Types.SafeHaskell-import GHC.Types.Basic ( IntWithInf, treatZeroAsInf )-import GHC.Types.ProfAuto-import qualified GHC.Types.FieldLabel as FieldLabel-import GHC.Data.FastString-import GHC.Utils.TmpFs-import GHC.Utils.Fingerprint-import GHC.Utils.Outputable-import GHC.Settings-import GHC.CmmToAsm.CFG.Weight-import {-# SOURCE #-} GHC.Core.Opt.CallerCC--import GHC.SysTools.Terminal ( stderrSupportsAnsiColors )-import GHC.SysTools.BaseDir ( expandToolDir, expandTopDir )--import Data.IORef-import Control.Arrow ((&&&))-import Control.Monad-import Control.Monad.Trans.Class-import Control.Monad.Trans.Writer-import Control.Monad.Trans.Reader-import Control.Monad.Trans.Except-import Control.Monad.Trans.State as State-import Data.Functor.Identity--import Data.Ord-import Data.Char-import Data.List (intercalate, sortBy)-import qualified Data.List.NonEmpty as NE-import qualified Data.Map as Map-import qualified Data.Set as Set-import Data.Word-import System.FilePath-import System.Directory-import System.Environment (lookupEnv)-import System.IO-import System.IO.Error-import Text.ParserCombinators.ReadP hiding (char)-import Text.ParserCombinators.ReadP as R--import GHC.Data.EnumSet (EnumSet)-import qualified GHC.Data.EnumSet as EnumSet--import GHC.Foreign (withCString, peekCString)-import qualified GHC.LanguageExtensions as LangExt---- Note [Updating flag description in the User's Guide]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ If you modify anything in this file please make sure that your changes are--- described in the User's Guide. Please update the flag description in the--- users guide (docs/users_guide) whenever you add or change a flag.--- Please make sure you add ":since:" information to new flags.---- Note [Supporting CLI completion]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ The command line interface completion (in for example bash) is an easy way--- for the developer to learn what flags are available from GHC.--- GHC helps by separating which flags are available when compiling with GHC,--- and which flags are available when using GHCi.--- A flag is assumed to either work in both these modes, or only in one of them.--- When adding or changing a flag, please consider for which mode the flag will--- have effect, and annotate it accordingly. For Flags use defFlag, defGhcFlag,--- defGhciFlag, and for FlagSpec use flagSpec or flagGhciSpec.---- Note [Adding a language extension]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ There are a few steps to adding (or removing) a language extension,------ * Adding the extension to GHC.LanguageExtensions------ The Extension type in libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs--- is the canonical list of language extensions known by GHC.------ * Adding a flag to DynFlags.xFlags------ This is fairly self-explanatory. The name should be concise, memorable,--- and consistent with any previous implementations of the similar idea in--- other Haskell compilers.------ * Adding the flag to the documentation------ This is the same as any other flag. See--- Note [Updating flag description in the User's Guide]------ * Adding the flag to Cabal------ The Cabal library has its own list of all language extensions supported--- by all major compilers. This is the list that user code being uploaded--- to Hackage is checked against to ensure language extension validity.--- Consequently, it is very important that this list remains up-to-date.------ To this end, there is a testsuite test (testsuite/tests/driver/T4437.hs)--- whose job it is to ensure these GHC's extensions are consistent with--- Cabal.------ The recommended workflow is,------ 1. Temporarily add your new language extension to the--- expectedGhcOnlyExtensions list in T4437 to ensure the test doesn't--- break while Cabal is updated.------ 2. After your GHC change is accepted, submit a Cabal pull request adding--- your new extension to Cabal's list (found in--- Cabal/Language/Haskell/Extension.hs).------ 3. After your Cabal change is accepted, let the GHC developers know so--- they can update the Cabal submodule and remove the extensions from--- expectedGhcOnlyExtensions.------ * Adding the flag to the GHC Wiki------ There is a change log tracking language extension additions and removals--- on the GHC wiki: https://gitlab.haskell.org/ghc/ghc/wikis/language-pragma-history------ See #4437 and #8176.---- -------------------------------------------------------------------------------- DynFlags---- | 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 #14312.-data IncludeSpecs- = IncludeSpecs { includePathsQuote :: [String]- , includePathsGlobal :: [String]- -- | See Note [Implicit include paths]- , includePathsQuoteImplicit :: [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 }---- | These includes are not considered while fingerprinting the flags for iface--- | See Note [Implicit include paths]-addImplicitQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs-addImplicitQuoteInclude spec paths = let f = includePathsQuoteImplicit spec- in spec { includePathsQuoteImplicit = 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 ++- includePathsQuoteImplicit specs ++- includePathsGlobal specs--{- Note [Implicit include paths]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- The compile driver adds the path to the folder containing the source file being- compiled to the 'IncludeSpecs', and this change gets recorded in the 'DynFlags'- that are used later to compute the interface file. Because of this,- the flags fingerprint derived from these 'DynFlags' and recorded in the- interface file will end up containing the absolute path to the source folder.-- Build systems with a remote cache like Bazel or Buck (or Shake, see #16956)- store the build artifacts produced by a build BA for reuse in subsequent builds.-- Embedding source paths in interface fingerprints will thwart these attempts and- lead to unnecessary recompilations when the source paths in BA differ from the- source paths in subsequent builds.- -}----- | Contains not only a collection of 'GeneralFlag's but also a plethora of--- information relating to the compilation of a single file or GHC session-data DynFlags = DynFlags {- ghcMode :: GhcMode,- ghcLink :: GhcLink,- backend :: !Backend,- -- ^ The backend to use (if any).- --- -- Whenever you change the backend, also make sure to set 'ghcLink' to- -- something sensible.- --- -- 'NoBackend' can be used to avoid generating any output, however, note that:- --- -- * If a program uses Template Haskell the typechecker may need to run code- -- from an imported module. To facilitate this, code generation is enabled- -- for modules imported by modules that use template haskell, using the- -- default backend for the platform.- -- See Note [-fno-code mode].--- -- formerly Settings- ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion,- fileSettings :: {-# UNPACK #-} !FileSettings,- targetPlatform :: Platform, -- Filled in by SysTools- toolSettings :: {-# UNPACK #-} !ToolSettings,- platformMisc :: {-# UNPACK #-} !PlatformMisc,- rawSettings :: [(String, String)],- tmpDir :: TempDir,-- llvmOptLevel :: Int, -- ^ LLVM optimisation level- verbosity :: Int, -- ^ Verbosity level: see Note [Verbosity levels]- debugLevel :: Int, -- ^ How much debug information to produce- simplPhases :: Int, -- ^ Number of simplifier phases- maxSimplIterations :: Int, -- ^ Max simplifier iterations- ruleCheck :: Maybe String,- strictnessBefore :: [Int], -- ^ Additional demand analysis-- parMakeCount :: Maybe Int, -- ^ The number of modules to compile in parallel- -- in --make mode, where Nothing ==> compile as- -- many in parallel as there are CPUs.-- enableTimeStats :: Bool, -- ^ Enable RTS timing statistics?- ghcHeapSize :: Maybe Int, -- ^ The heap size to set.-- maxRelevantBinds :: Maybe Int, -- ^ Maximum number of bindings from the type envt- -- 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- maxPmCheckModels :: Int, -- ^ Soft limit on the number of models- -- the pattern match checker checks- -- a pattern against. A safe guard- -- against exponential blow-up.- simplTickFactor :: Int, -- ^ Multiplier for simplifier ticks- dmdUnboxWidth :: !Int, -- ^ Whether DmdAnal should optimistically put an- -- Unboxed demand on returned products with at most- -- this number of fields- specConstrThreshold :: Maybe Int, -- ^ Threshold for SpecConstr- specConstrCount :: Maybe Int, -- ^ Max number of specialisations for any one function- specConstrRecursive :: Int, -- ^ Max number of specialisations for recursive types- -- Not optional; otherwise ForceSpecConstr can diverge.- binBlobThreshold :: Maybe Word, -- ^ Binary literals (e.g. strings) whose size is above- -- this threshold will be dumped in a binary file- -- by the assembler code generator. 0 and Nothing disables- -- this feature. See 'GHC.StgToCmm.Config'.- liberateCaseThreshold :: Maybe Int, -- ^ Threshold for LiberateCase- floatLamArgs :: Maybe Int, -- ^ Arg count for lambda floating- -- See 'GHC.Core.Opt.Monad.FloatOutSwitches'-- liftLamsRecArgs :: Maybe Int, -- ^ Maximum number of arguments after lambda lifting a- -- recursive function.- liftLamsNonRecArgs :: Maybe Int, -- ^ Maximum number of arguments after lambda lifting a- -- non-recursive function.- liftLamsKnown :: Bool, -- ^ Lambda lift even when this turns a known call- -- into an unknown call.-- cmmProcAlignment :: Maybe Int, -- ^ Align Cmm functions at this boundary or use default.-- historySize :: Int, -- ^ Simplification history size-- importPaths :: [FilePath],- mainModuleNameIs :: ModuleName,- mainFunIs :: Maybe String,- reductionDepth :: IntWithInf, -- ^ Typechecker maximum stack depth- solverIterations :: IntWithInf, -- ^ Number of iterations in the constraints solver- -- Typically only 1 is needed-- homeUnitId_ :: UnitId, -- ^ Target home unit-id- homeUnitInstanceOf_ :: Maybe UnitId, -- ^ Id of the unit to instantiate- homeUnitInstantiations_ :: [(ModuleName, Module)], -- ^ Module instantiations-- -- Note [Filepaths and Multiple Home Units]- workingDirectory :: Maybe FilePath,- thisPackageName :: Maybe String, -- ^ What the package is called, use with multiple home units- hiddenModules :: Set.Set ModuleName,- reexportedModules :: Set.Set ModuleName,-- -- ways- targetWays_ :: Ways, -- ^ Target way flags from the command line-- -- For object splitting- splitInfo :: Maybe (String,Int),-- -- paths etc.- objectDir :: Maybe String,- dylibInstallName :: Maybe String,- hiDir :: Maybe String,- hieDir :: Maybe String,- stubDir :: Maybe String,- dumpDir :: Maybe String,-- objectSuf_ :: String,- hcSuf :: String,- hiSuf_ :: String,- hieSuf :: String,-- dynObjectSuf_ :: String,- dynHiSuf_ :: String,-- outputFile_ :: Maybe String,- dynOutputFile_ :: Maybe String,- outputHi :: Maybe String,- dynOutputHi :: Maybe String,- dynLibLoader :: DynLibLoader,-- dynamicNow :: !Bool, -- ^ Indicate if we are now generating dynamic output- -- because of -dynamic-too. This predicate is- -- used to query the appropriate fields- -- (outputFile/dynOutputFile, ways, etc.)-- -- | This defaults to 'non-module'. It can be set by- -- 'GHC.Driver.Pipeline.setDumpPrefix' or 'ghc.GHCi.UI.runStmt' based on- -- where its output is going.- dumpPrefix :: FilePath,-- -- | Override the 'dumpPrefix' set by 'GHC.Driver.Pipeline.setDumpPrefix'- -- or 'ghc.GHCi.UI.runStmt'.- -- Set by @-ddump-file-prefix@- dumpPrefixForce :: Maybe FilePath,-- ldInputs :: [Option],-- includePaths :: IncludeSpecs,- libraryPaths :: [String],- frameworkPaths :: [String], -- used on darwin only- cmdlineFrameworks :: [String], -- ditto-- rtsOpts :: Maybe String,- rtsOptsEnabled :: RtsOptsEnabled,- rtsOptsSuggestions :: Bool,-- hpcDir :: String, -- ^ Path to store the .mix files-- -- Plugins- pluginModNames :: [ModuleName],- -- ^ the @-fplugin@ flags given on the command line, in *reverse*- -- order that they're specified on the command line.- pluginModNameOpts :: [(ModuleName,String)],- frontendPluginOpts :: [String],- -- ^ the @-ffrontend-opt@ flags given on the command line, in *reverse*- -- order that they're specified on the command line.-- externalPluginSpecs :: [ExternalPluginSpec],- -- ^ External plugins loaded from shared libraries-- -- For ghc -M- depMakefile :: FilePath,- depIncludePkgDeps :: Bool,- depIncludeCppDeps :: Bool,- depExcludeMods :: [ModuleName],- depSuffixes :: [String],-- -- Package flags- packageDBFlags :: [PackageDBFlag],- -- ^ The @-package-db@ flags given on the command line, In- -- *reverse* order that they're specified on the command line.- -- This is intended to be applied with the list of "initial"- -- package databases derived from @GHC_PACKAGE_PATH@; see- -- 'getUnitDbRefs'.-- ignorePackageFlags :: [IgnorePackageFlag],- -- ^ The @-ignore-package@ flags from the command line.- -- In *reverse* order that they're specified on the command line.- packageFlags :: [PackageFlag],- -- ^ The @-package@ and @-hide-package@ flags from the command-line.- -- In *reverse* order that they're specified on the command line.- pluginPackageFlags :: [PackageFlag],- -- ^ The @-plugin-package-id@ flags from command line.- -- In *reverse* order that they're specified on the command line.- trustFlags :: [TrustFlag],- -- ^ The @-trust@ and @-distrust@ flags.- -- In *reverse* order that they're specified on the command line.- packageEnv :: Maybe FilePath,- -- ^ Filepath to the package environment file (if overriding default)--- -- hsc dynamic flags- dumpFlags :: EnumSet DumpFlag,- generalFlags :: EnumSet GeneralFlag,- warningFlags :: EnumSet WarningFlag,- fatalWarningFlags :: EnumSet WarningFlag,- -- Don't change this without updating extensionFlags:- language :: Maybe Language,- -- | Safe Haskell mode- safeHaskell :: SafeHaskellMode,- safeInfer :: Bool,- safeInferred :: Bool,- -- We store the location of where some extension and flags were turned on so- -- we can produce accurate error messages when Safe Haskell fails due to- -- them.- thOnLoc :: SrcSpan,- newDerivOnLoc :: SrcSpan,- deriveViaOnLoc :: SrcSpan,- overlapInstLoc :: SrcSpan,- incoherentOnLoc :: SrcSpan,- pkgTrustOnLoc :: SrcSpan,- warnSafeOnLoc :: SrcSpan,- warnUnsafeOnLoc :: SrcSpan,- trustworthyOnLoc :: SrcSpan,- -- Don't change this without updating extensionFlags:- -- Here we collect the settings of the language extensions- -- from the command line, the ghci config file and- -- from interactive :set / :seti commands.- extensions :: [OnOff LangExt.Extension],- -- extensionFlags should always be equal to- -- flattenExtensionFlags language extensions- -- LangExt.Extension is defined in libraries/ghc-boot so that it can be used- -- by template-haskell- extensionFlags :: EnumSet LangExt.Extension,-- -- | Unfolding control- -- See Note [Discounts and thresholds] in GHC.Core.Unfold- unfoldingOpts :: !UnfoldingOpts,-- maxWorkerArgs :: Int,-- ghciHistSize :: Int,-- flushOut :: FlushOut,-- ghcVersionFile :: Maybe FilePath,- haddockOptions :: Maybe String,-- -- | GHCi scripts specified by -ghci-script, in reverse order- ghciScripts :: [String],-- -- Output style options- pprUserLength :: Int,- pprCols :: Int,-- useUnicode :: Bool,- useColor :: OverridingBool,- canUseColor :: Bool,- colScheme :: Col.Scheme,-- -- | what kind of {-# SCC #-} to add automatically- profAuto :: ProfAuto,- callerCcFilters :: [CallerCcFilter],-- interactivePrint :: Maybe String,-- -- | Machine dependent flags (-m\<blah> stuff)- sseVersion :: Maybe SseVersion,- bmiVersion :: Maybe BmiVersion,- avx :: Bool,- avx2 :: Bool,- avx512cd :: Bool, -- Enable AVX-512 Conflict Detection Instructions.- avx512er :: Bool, -- Enable AVX-512 Exponential and Reciprocal Instructions.- avx512f :: Bool, -- Enable AVX-512 instructions.- avx512pf :: Bool, -- Enable AVX-512 PreFetch Instructions.-- -- | Run-time linker information (what options we need, etc.)- rtldInfo :: IORef (Maybe LinkerInfo),-- -- | Run-time C compiler information- rtccInfo :: IORef (Maybe CompilerInfo),-- -- | Run-time assembler information- rtasmInfo :: IORef (Maybe CompilerInfo),-- -- Constants used to control the amount of optimization done.-- -- | Max size, in bytes, of inline array allocations.- maxInlineAllocSize :: Int,-- -- | Only inline memcpy if it generates no more than this many- -- pseudo (roughly: Cmm) instructions.- maxInlineMemcpyInsns :: Int,-- -- | Only inline memset if it generates no more than this many- -- pseudo (roughly: Cmm) instructions.- maxInlineMemsetInsns :: Int,-- -- | Reverse the order of error messages in GHC/GHCi- reverseErrors :: Bool,-- -- | Limit the maximum number of errors to show- maxErrors :: Maybe Int,-- -- | Unique supply configuration for testing build determinism- initialUnique :: Word64,- uniqueIncrement :: Int,- -- 'Int' because it can be used to test uniques in decreasing order.-- -- | Temporary: CFG Edge weights for fast iterations- cfgWeights :: Weights-}--{- Note [RHS Floating]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- We provide both 'Opt_LocalFloatOut' and 'Opt_LocalFloatOutTopLevel' to correspond to- 'doFloatFromRhs'; with this we can control floating out with GHC flags.-- This addresses https://gitlab.haskell.org/ghc/ghc/-/issues/13663 and- allows for experimentation.--}--class HasDynFlags m where- getDynFlags :: m DynFlags--{- It would be desirable to have the more generalised-- instance (MonadTrans t, Monad m, HasDynFlags m) => HasDynFlags (t m) where- getDynFlags = lift getDynFlags--instance definition. However, that definition would overlap with the-`HasDynFlags (GhcT m)` instance. Instead we define instances for a-couple of common Monad transformers explicitly. -}--instance (Monoid a, Monad m, HasDynFlags m) => HasDynFlags (WriterT a m) where- getDynFlags = lift getDynFlags--instance (Monad m, HasDynFlags m) => HasDynFlags (ReaderT a m) where- getDynFlags = lift getDynFlags--instance (Monad m, HasDynFlags m) => HasDynFlags (MaybeT m) where- getDynFlags = lift getDynFlags--instance (Monad m, HasDynFlags m) => HasDynFlags (ExceptT e m) where- getDynFlags = lift getDynFlags--class ContainsDynFlags t where- extractDynFlags :: t -> DynFlags---------------------------------------------------------------------------------- Accessors from 'DynFlags'---- | "unbuild" a 'Settings' from a 'DynFlags'. This shouldn't be needed in the--- vast majority of code. But GHCi questionably uses this to produce a default--- 'DynFlags' from which to compute a flags diff for printing.-settings :: DynFlags -> Settings-settings dflags = Settings- { sGhcNameVersion = ghcNameVersion dflags- , sFileSettings = fileSettings dflags- , sTargetPlatform = targetPlatform dflags- , sToolSettings = toolSettings dflags- , sPlatformMisc = platformMisc dflags- , sRawSettings = rawSettings dflags- }--programName :: DynFlags -> String-programName dflags = ghcNameVersion_programName $ ghcNameVersion dflags-projectVersion :: DynFlags -> String-projectVersion dflags = ghcNameVersion_projectVersion (ghcNameVersion dflags)-ghcUsagePath :: DynFlags -> FilePath-ghcUsagePath dflags = fileSettings_ghcUsagePath $ fileSettings dflags-ghciUsagePath :: DynFlags -> FilePath-ghciUsagePath dflags = fileSettings_ghciUsagePath $ fileSettings dflags-toolDir :: DynFlags -> Maybe FilePath-toolDir dflags = fileSettings_toolDir $ fileSettings dflags-topDir :: DynFlags -> FilePath-topDir dflags = fileSettings_topDir $ fileSettings dflags-extraGccViaCFlags :: DynFlags -> [String]-extraGccViaCFlags dflags = toolSettings_extraGccViaCFlags $ toolSettings dflags-globalPackageDatabasePath :: DynFlags -> FilePath-globalPackageDatabasePath dflags = fileSettings_globalPackageDatabase $ fileSettings dflags-pgm_L :: DynFlags -> String-pgm_L dflags = toolSettings_pgm_L $ toolSettings dflags-pgm_P :: DynFlags -> (String,[Option])-pgm_P dflags = toolSettings_pgm_P $ toolSettings dflags-pgm_F :: DynFlags -> String-pgm_F dflags = toolSettings_pgm_F $ toolSettings dflags-pgm_c :: DynFlags -> String-pgm_c dflags = toolSettings_pgm_c $ toolSettings dflags-pgm_cxx :: DynFlags -> String-pgm_cxx dflags = toolSettings_pgm_cxx $ toolSettings dflags-pgm_a :: DynFlags -> (String,[Option])-pgm_a dflags = toolSettings_pgm_a $ toolSettings dflags-pgm_l :: DynFlags -> (String,[Option])-pgm_l dflags = toolSettings_pgm_l $ toolSettings dflags-pgm_lm :: DynFlags -> Maybe (String,[Option])-pgm_lm dflags = toolSettings_pgm_lm $ toolSettings dflags-pgm_dll :: DynFlags -> (String,[Option])-pgm_dll dflags = toolSettings_pgm_dll $ toolSettings dflags-pgm_T :: DynFlags -> String-pgm_T dflags = toolSettings_pgm_T $ toolSettings dflags-pgm_windres :: DynFlags -> String-pgm_windres dflags = toolSettings_pgm_windres $ toolSettings dflags-pgm_lcc :: DynFlags -> (String,[Option])-pgm_lcc dflags = toolSettings_pgm_lcc $ toolSettings dflags-pgm_ar :: DynFlags -> String-pgm_ar dflags = toolSettings_pgm_ar $ toolSettings dflags-pgm_ranlib :: DynFlags -> String-pgm_ranlib dflags = toolSettings_pgm_ranlib $ toolSettings dflags-pgm_lo :: DynFlags -> (String,[Option])-pgm_lo dflags = toolSettings_pgm_lo $ toolSettings dflags-pgm_lc :: DynFlags -> (String,[Option])-pgm_lc dflags = toolSettings_pgm_lc $ toolSettings dflags-pgm_i :: DynFlags -> String-pgm_i dflags = toolSettings_pgm_i $ toolSettings dflags-opt_L :: DynFlags -> [String]-opt_L dflags = toolSettings_opt_L $ toolSettings dflags-opt_P :: DynFlags -> [String]-opt_P dflags = concatMap (wayOptP (targetPlatform dflags)) (ways dflags)- ++ toolSettings_opt_P (toolSettings dflags)---- This function packages everything that's needed to fingerprint opt_P--- flags. See Note [Repeated -optP hashing].-opt_P_signature :: DynFlags -> ([String], Fingerprint)-opt_P_signature dflags =- ( concatMap (wayOptP (targetPlatform dflags)) (ways dflags)- , toolSettings_opt_P_fingerprint $ toolSettings dflags- )--opt_F :: DynFlags -> [String]-opt_F dflags= toolSettings_opt_F $ toolSettings dflags-opt_c :: DynFlags -> [String]-opt_c dflags = concatMap (wayOptc (targetPlatform dflags)) (ways dflags)- ++ toolSettings_opt_c (toolSettings dflags)-opt_cxx :: DynFlags -> [String]-opt_cxx dflags= toolSettings_opt_cxx $ toolSettings dflags-opt_a :: DynFlags -> [String]-opt_a dflags= toolSettings_opt_a $ toolSettings dflags-opt_l :: DynFlags -> [String]-opt_l dflags = concatMap (wayOptl (targetPlatform dflags)) (ways dflags)- ++ toolSettings_opt_l (toolSettings dflags)-opt_lm :: DynFlags -> [String]-opt_lm dflags= toolSettings_opt_lm $ toolSettings dflags-opt_windres :: DynFlags -> [String]-opt_windres dflags= toolSettings_opt_windres $ toolSettings dflags-opt_lcc :: DynFlags -> [String]-opt_lcc dflags= toolSettings_opt_lcc $ toolSettings dflags-opt_lo :: DynFlags -> [String]-opt_lo dflags= toolSettings_opt_lo $ toolSettings dflags-opt_lc :: DynFlags -> [String]-opt_lc dflags= toolSettings_opt_lc $ toolSettings dflags-opt_i :: DynFlags -> [String]-opt_i dflags= toolSettings_opt_i $ toolSettings dflags---- | The directory for this version of ghc in the user's app directory--- The appdir used to be in ~/.ghc but to respect the XDG specification--- we want to move it under $XDG_DATA_HOME/--- However, old tooling (like cabal) might still write package environments--- to the old directory, so we prefer that if a subdirectory of ~/.ghc--- with the correct target and GHC version suffix exists.------ i.e. if ~/.ghc/$UNIQUE_SUBDIR exists we use that--- otherwise we use $XDG_DATA_HOME/$UNIQUE_SUBDIR------ UNIQUE_SUBDIR is typically a combination of the target platform and GHC version-versionedAppDir :: String -> ArchOS -> MaybeT IO FilePath-versionedAppDir appname platform = do- -- Make sure we handle the case the HOME isn't set (see #11678)- -- We need to fallback to the old scheme if the subdirectory exists.- msum $ map (checkIfExists <=< fmap (</> versionedFilePath platform))- [ tryMaybeT $ getAppUserDataDirectory appname -- this is ~/.ghc/- , tryMaybeT $ getXdgDirectory XdgData appname -- this is $XDG_DATA_HOME/- ]- where- checkIfExists dir = tryMaybeT (doesDirectoryExist dir) >>= \case- True -> pure dir- False -> MaybeT (pure Nothing)--versionedFilePath :: ArchOS -> FilePath-versionedFilePath platform = uniqueSubdir platform---- | The 'GhcMode' tells us whether we're doing multi-module--- compilation (controlled via the "GHC" API) or one-shot--- (single-module) compilation. This makes a difference primarily to--- the "GHC.Unit.Finder": in one-shot mode we look for interface files for--- imported modules, but in multi-module mode we look for source files--- in order to check whether they need to be recompiled.-data GhcMode- = CompManager -- ^ @\-\-make@, GHCi, etc.- | OneShot -- ^ @ghc -c Foo.hs@- | MkDepend -- ^ @ghc -M@, see "GHC.Unit.Finder" for why we need this- deriving Eq--instance Outputable GhcMode where- ppr CompManager = text "CompManager"- ppr OneShot = text "OneShot"- ppr MkDepend = text "MkDepend"--isOneShot :: GhcMode -> Bool-isOneShot OneShot = True-isOneShot _other = False---- | What to do in the link step, if there is one.-data GhcLink- = NoLink -- ^ Don't link at all- | LinkBinary -- ^ Link object code into a binary- | LinkInMemory -- ^ Use the in-memory dynamic linker (works for both- -- bytecode and object code).- | LinkDynLib -- ^ Link objects into a dynamic lib (DLL on Windows, DSO on ELF platforms)- | LinkStaticLib -- ^ Link objects into a static lib- | LinkMergedObj -- ^ Link objects into a merged "GHCi object"- deriving (Eq, Show)--isNoLink :: GhcLink -> Bool-isNoLink NoLink = True-isNoLink _ = False---- | We accept flags which make packages visible, but how they select--- the package varies; this data type reflects what selection criterion--- is used.-data PackageArg =- PackageArg String -- ^ @-package@, by 'PackageName'- | UnitIdArg Unit -- ^ @-package-id@, by 'Unit'- deriving (Eq, Show)--instance Outputable PackageArg where- ppr (PackageArg pn) = text "package" <+> text pn- ppr (UnitIdArg uid) = text "unit" <+> ppr uid---- | Represents the renaming that may be associated with an exposed--- package, e.g. the @rns@ part of @-package "foo (rns)"@.------ Here are some example parsings of the package flags (where--- a string literal is punned to be a 'ModuleName':------ * @-package foo@ is @ModRenaming True []@--- * @-package foo ()@ is @ModRenaming False []@--- * @-package foo (A)@ is @ModRenaming False [("A", "A")]@--- * @-package foo (A as B)@ is @ModRenaming False [("A", "B")]@--- * @-package foo with (A as B)@ is @ModRenaming True [("A", "B")]@-data ModRenaming = ModRenaming {- modRenamingWithImplicit :: Bool, -- ^ Bring all exposed modules into scope?- modRenamings :: [(ModuleName, ModuleName)] -- ^ Bring module @m@ into scope- -- under name @n@.- } deriving (Eq)-instance Outputable ModRenaming where- ppr (ModRenaming b rns) = ppr b <+> parens (ppr rns)---- | Flags for manipulating the set of non-broken packages.-newtype IgnorePackageFlag = IgnorePackage String -- ^ @-ignore-package@- deriving (Eq)---- | Flags for manipulating package trust.-data TrustFlag- = TrustPackage String -- ^ @-trust@- | DistrustPackage String -- ^ @-distrust@- deriving (Eq)---- | Flags for manipulating packages visibility.-data PackageFlag- = ExposePackage String PackageArg ModRenaming -- ^ @-package@, @-package-id@- | HidePackage String -- ^ @-hide-package@- deriving (Eq) -- NB: equality instance is used by packageFlagsChanged--data PackageDBFlag- = PackageDB PkgDbRef- | NoUserPackageDB- | NoGlobalPackageDB- | ClearPackageDBs- deriving (Eq)--packageFlagsChanged :: DynFlags -> DynFlags -> Bool-packageFlagsChanged idflags1 idflags0 =- packageFlags idflags1 /= packageFlags idflags0 ||- ignorePackageFlags idflags1 /= ignorePackageFlags idflags0 ||- pluginPackageFlags idflags1 /= pluginPackageFlags idflags0 ||- trustFlags idflags1 /= trustFlags idflags0 ||- packageDBFlags idflags1 /= packageDBFlags idflags0 ||- packageGFlags idflags1 /= packageGFlags idflags0- where- packageGFlags dflags = map (`gopt` dflags)- [ Opt_HideAllPackages- , Opt_HideAllPluginPackages- , Opt_AutoLinkPackages ]--instance Outputable PackageFlag where- ppr (ExposePackage n arg rn) = text n <> braces (ppr arg <+> ppr rn)- ppr (HidePackage str) = text "-hide-package" <+> text str--data DynLibLoader- = Deployable- | SystemDependent- deriving Eq--data RtsOptsEnabled- = RtsOptsNone | RtsOptsIgnore | RtsOptsIgnoreAll | RtsOptsSafeOnly- | RtsOptsAll- deriving (Show)---- | Are we building with @-fPIE@ or @-fPIC@ enabled?-positionIndependent :: DynFlags -> Bool-positionIndependent dflags = gopt Opt_PIC dflags || gopt Opt_PIE dflags---- Note [-dynamic-too business]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ With -dynamic-too flag, we try to build both the non-dynamic and dynamic--- objects in a single run of the compiler: the pipeline is the same down to--- Core optimisation, then the backend (from Core to object code) is executed--- twice.------ The implementation is currently rather hacky, for example, we don't clearly separate non-dynamic--- and dynamic loaded interfaces (#9176).------ To make matters worse, we automatically enable -dynamic-too when some modules--- need Template-Haskell and GHC is dynamically linked (cf--- GHC.Driver.Pipeline.compileOne').------ We used to try and fall back from a dynamic-too failure but this feature--- didn't work as expected (#20446) so it was removed to simplify the--- implementation and not obscure latent bugs.--data DynamicTooState- = DT_Dont -- ^ Don't try to build dynamic objects too- | DT_OK -- ^ Will still try to generate dynamic objects- | DT_Dyn -- ^ Currently generating dynamic objects (in the backend)- deriving (Eq,Show,Ord)--dynamicTooState :: DynFlags -> DynamicTooState-dynamicTooState dflags- | not (gopt Opt_BuildDynamicToo dflags) = DT_Dont- | dynamicNow dflags = DT_Dyn- | otherwise = DT_OK--setDynamicNow :: DynFlags -> DynFlags-setDynamicNow dflags0 =- dflags0- { dynamicNow = True- }----------------------------------------------------------------------------------- | Used by 'GHC.runGhc' to partially initialize a new 'DynFlags' value-initDynFlags :: DynFlags -> IO DynFlags-initDynFlags dflags = do- let- refRtldInfo <- newIORef Nothing- refRtccInfo <- newIORef Nothing- refRtasmInfo <- newIORef Nothing- canUseUnicode <- do let enc = localeEncoding- str = "‘’"- (withCString enc str $ \cstr ->- do str' <- peekCString enc cstr- return (str == str'))- `catchIOError` \_ -> return False- ghcNoUnicodeEnv <- lookupEnv "GHC_NO_UNICODE"- let useUnicode' = isNothing ghcNoUnicodeEnv && canUseUnicode- maybeGhcColorsEnv <- lookupEnv "GHC_COLORS"- maybeGhcColoursEnv <- lookupEnv "GHC_COLOURS"- let adjustCols (Just env) = Col.parseScheme env- adjustCols Nothing = id- let (useColor', colScheme') =- (adjustCols maybeGhcColoursEnv . adjustCols maybeGhcColorsEnv)- (useColor dflags, colScheme dflags)- tmp_dir <- normalise <$> getTemporaryDirectory- return dflags{- useUnicode = useUnicode',- useColor = useColor',- canUseColor = stderrSupportsAnsiColors,- colScheme = colScheme',- rtldInfo = refRtldInfo,- rtccInfo = refRtccInfo,- rtasmInfo = refRtasmInfo,- tmpDir = TempDir tmp_dir- }---- | 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 -> DynFlags-defaultDynFlags mySettings =--- See Note [Updating flag description in the User's Guide]- DynFlags {- ghcMode = CompManager,- ghcLink = LinkBinary,- backend = platformDefaultBackend (sTargetPlatform mySettings),- verbosity = 0,- debugLevel = 0,- simplPhases = 2,- maxSimplIterations = 4,- ruleCheck = Nothing,- binBlobThreshold = Just 500000, -- 500K is a good default (see #16190)- maxRelevantBinds = Just 6,- maxValidHoleFits = Just 6,- maxRefHoleFits = Just 6,- refLevelHoleFits = Nothing,- maxUncoveredPatterns = 4,- maxPmCheckModels = 30,- simplTickFactor = 100,- dmdUnboxWidth = 3, -- Default: Assume an unboxed demand on function bodies returning a triple- specConstrThreshold = Just 2000,- specConstrCount = Just 3,- specConstrRecursive = 3,- liberateCaseThreshold = Just 2000,- floatLamArgs = Just 0, -- Default: float only if no fvs- liftLamsRecArgs = Just 5, -- Default: the number of available argument hardware registers on x86_64- liftLamsNonRecArgs = Just 5, -- Default: the number of available argument hardware registers on x86_64- liftLamsKnown = False, -- Default: don't turn known calls into unknown ones- cmmProcAlignment = Nothing,-- historySize = 20,- strictnessBefore = [],-- parMakeCount = Just 1,-- enableTimeStats = False,- ghcHeapSize = Nothing,-- importPaths = ["."],- mainModuleNameIs = mAIN_NAME,- mainFunIs = Nothing,- reductionDepth = treatZeroAsInf mAX_REDUCTION_DEPTH,- solverIterations = treatZeroAsInf mAX_SOLVER_ITERATIONS,-- homeUnitId_ = mainUnitId,- homeUnitInstanceOf_ = Nothing,- homeUnitInstantiations_ = [],-- workingDirectory = Nothing,- thisPackageName = Nothing,- hiddenModules = Set.empty,- reexportedModules = Set.empty,-- objectDir = Nothing,- dylibInstallName = Nothing,- hiDir = Nothing,- hieDir = Nothing,- stubDir = Nothing,- dumpDir = Nothing,-- objectSuf_ = phaseInputExt StopLn,- hcSuf = phaseInputExt HCc,- hiSuf_ = "hi",- hieSuf = "hie",-- dynObjectSuf_ = "dyn_" ++ phaseInputExt StopLn,- dynHiSuf_ = "dyn_hi",- dynamicNow = False,-- pluginModNames = [],- pluginModNameOpts = [],- frontendPluginOpts = [],-- externalPluginSpecs = [],-- outputFile_ = Nothing,- dynOutputFile_ = Nothing,- outputHi = Nothing,- dynOutputHi = Nothing,- dynLibLoader = SystemDependent,- dumpPrefix = "non-module.",- dumpPrefixForce = Nothing,- ldInputs = [],- includePaths = IncludeSpecs [] [] [],- libraryPaths = [],- frameworkPaths = [],- cmdlineFrameworks = [],- rtsOpts = Nothing,- rtsOptsEnabled = RtsOptsSafeOnly,- rtsOptsSuggestions = True,-- hpcDir = ".hpc",-- packageDBFlags = [],- packageFlags = [],- pluginPackageFlags = [],- ignorePackageFlags = [],- trustFlags = [],- packageEnv = Nothing,- targetWays_ = Set.empty,- splitInfo = Nothing,-- ghcNameVersion = sGhcNameVersion mySettings,- fileSettings = sFileSettings mySettings,- toolSettings = sToolSettings mySettings,- targetPlatform = sTargetPlatform mySettings,- platformMisc = sPlatformMisc mySettings,- rawSettings = sRawSettings mySettings,-- tmpDir = panic "defaultDynFlags: uninitialized tmpDir",-- llvmOptLevel = 0,-- -- ghc -M values- depMakefile = "Makefile",- depIncludePkgDeps = False,- depIncludeCppDeps = False,- depExcludeMods = [],- depSuffixes = [],- -- end of ghc -M values- ghcVersionFile = Nothing,- haddockOptions = Nothing,- dumpFlags = EnumSet.empty,- generalFlags = EnumSet.fromList (defaultFlags mySettings),- warningFlags = EnumSet.fromList standardWarnings,- fatalWarningFlags = EnumSet.empty,- ghciScripts = [],- language = Nothing,- safeHaskell = Sf_None,- safeInfer = True,- safeInferred = True,- thOnLoc = noSrcSpan,- newDerivOnLoc = noSrcSpan,- deriveViaOnLoc = noSrcSpan,- overlapInstLoc = noSrcSpan,- incoherentOnLoc = noSrcSpan,- pkgTrustOnLoc = noSrcSpan,- warnSafeOnLoc = noSrcSpan,- warnUnsafeOnLoc = noSrcSpan,- trustworthyOnLoc = noSrcSpan,- extensions = [],- extensionFlags = flattenExtensionFlags Nothing [],-- unfoldingOpts = defaultUnfoldingOpts,- maxWorkerArgs = 10,-- ghciHistSize = 50, -- keep a log of length 50 by default-- flushOut = defaultFlushOut,- pprUserLength = 5,- pprCols = 100,- useUnicode = False,- useColor = Auto,- canUseColor = False,- colScheme = Col.defaultScheme,- profAuto = NoProfAuto,- callerCcFilters = [],- interactivePrint = Nothing,- sseVersion = Nothing,- bmiVersion = Nothing,- avx = False,- avx2 = False,- avx512cd = False,- avx512er = False,- avx512f = False,- avx512pf = False,- rtldInfo = panic "defaultDynFlags: no rtldInfo",- rtccInfo = panic "defaultDynFlags: no rtccInfo",- rtasmInfo = panic "defaultDynFlags: no rtasmInfo",-- maxInlineAllocSize = 128,- maxInlineMemcpyInsns = 32,- maxInlineMemsetInsns = 32,-- initialUnique = 0,- uniqueIncrement = 1,-- reverseErrors = False,- maxErrors = Nothing,- cfgWeights = defaultWeights- }--type FatalMessager = String -> IO ()--defaultFatalMessager :: FatalMessager-defaultFatalMessager = hPutStrLn stderr---newtype FlushOut = FlushOut (IO ())--defaultFlushOut :: FlushOut-defaultFlushOut = FlushOut $ hFlush stdout--{--Note [Verbosity levels]-~~~~~~~~~~~~~~~~~~~~~~~- 0 | print errors & warnings only- 1 | minimal verbosity: print "compiling M ... done." for each module.- 2 | equivalent to -dshow-passes- 3 | equivalent to existing "ghc -v"- 4 | "ghc -v -ddump-most"- 5 | "ghc -v -ddump-all"--}--data OnOff a = On a- | Off a- deriving (Eq, Show)--instance Outputable a => Outputable (OnOff a) where- ppr (On x) = text "On" <+> ppr x- ppr (Off x) = text "Off" <+> ppr x---- OnOffs accumulate in reverse order, so we use foldr in order to--- process them in the right order-flattenExtensionFlags :: Maybe Language -> [OnOff LangExt.Extension] -> EnumSet LangExt.Extension-flattenExtensionFlags ml = foldr f defaultExtensionFlags- where f (On f) flags = EnumSet.insert f flags- f (Off f) flags = EnumSet.delete f flags- defaultExtensionFlags = EnumSet.fromList (languageExtensions ml)---- | The language extensions implied by the various language variants.--- When updating this be sure to update the flag documentation in--- @docs/users_guide/exts@.-languageExtensions :: Maybe Language -> [LangExt.Extension]---- Nothing: the default case-languageExtensions Nothing = languageExtensions (Just GHC2021)--languageExtensions (Just Haskell98)- = [LangExt.ImplicitPrelude,- -- See Note [When is StarIsType enabled]- LangExt.StarIsType,- LangExt.CUSKs,- LangExt.MonomorphismRestriction,- LangExt.NPlusKPatterns,- LangExt.DatatypeContexts,- LangExt.TraditionalRecordSyntax,- LangExt.FieldSelectors,- LangExt.NondecreasingIndentation,- -- strictly speaking non-standard, but we always had this- -- on implicitly before the option was added in 7.1, and- -- turning it off breaks code, so we're keeping it on for- -- backwards compatibility. Cabal uses -XHaskell98 by- -- default unless you specify another language.- LangExt.DeepSubsumption- -- Non-standard but enabled for backwards compatability (see GHC proposal #511)- ]--languageExtensions (Just Haskell2010)- = [LangExt.ImplicitPrelude,- -- See Note [When is StarIsType enabled]- LangExt.StarIsType,- LangExt.CUSKs,- LangExt.MonomorphismRestriction,- LangExt.DatatypeContexts,- LangExt.TraditionalRecordSyntax,- LangExt.EmptyDataDecls,- LangExt.ForeignFunctionInterface,- LangExt.PatternGuards,- LangExt.DoAndIfThenElse,- LangExt.FieldSelectors,- LangExt.RelaxedPolyRec,- LangExt.DeepSubsumption ]--languageExtensions (Just GHC2021)- = [LangExt.ImplicitPrelude,- -- See Note [When is StarIsType enabled]- LangExt.StarIsType,- LangExt.MonomorphismRestriction,- LangExt.TraditionalRecordSyntax,- LangExt.EmptyDataDecls,- LangExt.ForeignFunctionInterface,- LangExt.PatternGuards,- LangExt.DoAndIfThenElse,- LangExt.FieldSelectors,- LangExt.RelaxedPolyRec,- -- Now the new extensions (not in Haskell2010)- LangExt.BangPatterns,- LangExt.BinaryLiterals,- LangExt.ConstrainedClassMethods,- LangExt.ConstraintKinds,- LangExt.DeriveDataTypeable,- LangExt.DeriveFoldable,- LangExt.DeriveFunctor,- LangExt.DeriveGeneric,- LangExt.DeriveLift,- LangExt.DeriveTraversable,- LangExt.EmptyCase,- LangExt.EmptyDataDeriving,- LangExt.ExistentialQuantification,- LangExt.ExplicitForAll,- LangExt.FlexibleContexts,- LangExt.FlexibleInstances,- LangExt.GADTSyntax,- LangExt.GeneralizedNewtypeDeriving,- LangExt.HexFloatLiterals,- LangExt.ImportQualifiedPost,- LangExt.InstanceSigs,- LangExt.KindSignatures,- LangExt.MultiParamTypeClasses,- LangExt.NamedFieldPuns,- LangExt.NamedWildCards,- LangExt.NumericUnderscores,- LangExt.PolyKinds,- LangExt.PostfixOperators,- LangExt.RankNTypes,- LangExt.ScopedTypeVariables,- LangExt.StandaloneDeriving,- LangExt.StandaloneKindSignatures,- LangExt.TupleSections,- LangExt.TypeApplications,- LangExt.TypeOperators,- LangExt.TypeSynonymInstances]--hasPprDebug :: DynFlags -> Bool-hasPprDebug = dopt Opt_D_ppr_debug--hasNoDebugOutput :: DynFlags -> Bool-hasNoDebugOutput = dopt Opt_D_no_debug_output--hasNoStateHack :: DynFlags -> Bool-hasNoStateHack = gopt Opt_G_NoStateHack--hasNoOptCoercion :: DynFlags -> Bool-hasNoOptCoercion = gopt Opt_G_NoOptCoercion----- | Test whether a 'DumpFlag' is set-dopt :: DumpFlag -> DynFlags -> Bool-dopt = getDumpFlagFrom verbosity dumpFlags---- | Set a 'DumpFlag'-dopt_set :: DynFlags -> DumpFlag -> DynFlags-dopt_set dfs f = dfs{ dumpFlags = EnumSet.insert f (dumpFlags dfs) }---- | Unset a 'DumpFlag'-dopt_unset :: DynFlags -> DumpFlag -> DynFlags-dopt_unset dfs f = dfs{ dumpFlags = EnumSet.delete f (dumpFlags dfs) }---- | Test whether a 'GeneralFlag' is set------ Note that `dynamicNow` (i.e., dynamic objects built with `-dynamic-too`)--- always implicitly enables Opt_PIC, Opt_ExternalDynamicRefs, and disables--- Opt_SplitSections.----gopt :: GeneralFlag -> DynFlags -> Bool-gopt Opt_PIC dflags- | dynamicNow dflags = True-gopt Opt_ExternalDynamicRefs dflags- | dynamicNow dflags = True-gopt Opt_SplitSections dflags- | dynamicNow dflags = False-gopt f dflags = f `EnumSet.member` generalFlags dflags---- | Set a 'GeneralFlag'-gopt_set :: DynFlags -> GeneralFlag -> DynFlags-gopt_set dfs f = dfs{ generalFlags = EnumSet.insert f (generalFlags dfs) }---- | Unset a 'GeneralFlag'-gopt_unset :: DynFlags -> GeneralFlag -> DynFlags-gopt_unset dfs f = dfs{ generalFlags = EnumSet.delete f (generalFlags dfs) }---- | Test whether a 'WarningFlag' is set-wopt :: WarningFlag -> DynFlags -> Bool-wopt f dflags = f `EnumSet.member` warningFlags dflags---- | Set a 'WarningFlag'-wopt_set :: DynFlags -> WarningFlag -> DynFlags-wopt_set dfs f = dfs{ warningFlags = EnumSet.insert f (warningFlags dfs) }---- | Unset a 'WarningFlag'-wopt_unset :: DynFlags -> WarningFlag -> DynFlags-wopt_unset dfs f = dfs{ warningFlags = EnumSet.delete f (warningFlags dfs) }---- | Test whether a 'WarningFlag' is set as fatal-wopt_fatal :: WarningFlag -> DynFlags -> Bool-wopt_fatal f dflags = f `EnumSet.member` fatalWarningFlags dflags---- | Mark a 'WarningFlag' as fatal (do not set the flag)-wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags-wopt_set_fatal dfs f- = dfs { fatalWarningFlags = EnumSet.insert f (fatalWarningFlags dfs) }---- | Mark a 'WarningFlag' as not fatal-wopt_unset_fatal :: DynFlags -> WarningFlag -> DynFlags-wopt_unset_fatal dfs f- = dfs { fatalWarningFlags = EnumSet.delete f (fatalWarningFlags dfs) }---- | Test whether a 'LangExt.Extension' is set-xopt :: LangExt.Extension -> DynFlags -> Bool-xopt f dflags = f `EnumSet.member` extensionFlags dflags---- | Set a 'LangExt.Extension'-xopt_set :: DynFlags -> LangExt.Extension -> DynFlags-xopt_set dfs f- = let onoffs = On f : extensions dfs- in dfs { extensions = onoffs,- extensionFlags = flattenExtensionFlags (language dfs) onoffs }---- | Unset a 'LangExt.Extension'-xopt_unset :: DynFlags -> LangExt.Extension -> DynFlags-xopt_unset dfs f- = let onoffs = Off f : extensions dfs- in dfs { extensions = onoffs,- extensionFlags = flattenExtensionFlags (language dfs) onoffs }---- | Set or unset a 'LangExt.Extension', unless it has been explicitly--- set or unset before.-xopt_set_unlessExplSpec- :: LangExt.Extension- -> (DynFlags -> LangExt.Extension -> DynFlags)- -> DynFlags -> DynFlags-xopt_set_unlessExplSpec ext setUnset dflags =- let referedExts = stripOnOff <$> extensions dflags- stripOnOff (On x) = x- stripOnOff (Off x) = x- in- if ext `elem` referedExts then dflags else setUnset dflags ext--xopt_DuplicateRecordFields :: DynFlags -> FieldLabel.DuplicateRecordFields-xopt_DuplicateRecordFields dfs- | xopt LangExt.DuplicateRecordFields dfs = FieldLabel.DuplicateRecordFields- | otherwise = FieldLabel.NoDuplicateRecordFields--xopt_FieldSelectors :: DynFlags -> FieldLabel.FieldSelectors-xopt_FieldSelectors dfs- | xopt LangExt.FieldSelectors dfs = FieldLabel.FieldSelectors- | otherwise = FieldLabel.NoFieldSelectors--lang_set :: DynFlags -> Maybe Language -> DynFlags-lang_set dflags lang =- dflags {- language = lang,- extensionFlags = flattenExtensionFlags lang (extensions dflags)- }---- | Set the Haskell language standard to use-setLanguage :: Language -> DynP ()-setLanguage l = upd (`lang_set` Just l)---- | Is the -fpackage-trust mode on-packageTrustOn :: DynFlags -> Bool-packageTrustOn = gopt Opt_PackageTrust---- | Is Safe Haskell on in some way (including inference mode)-safeHaskellOn :: DynFlags -> Bool-safeHaskellOn dflags = safeHaskellModeEnabled dflags || safeInferOn dflags--safeHaskellModeEnabled :: DynFlags -> Bool-safeHaskellModeEnabled dflags = safeHaskell dflags `elem` [Sf_Unsafe, Sf_Trustworthy- , Sf_Safe ]----- | Is the Safe Haskell safe language in use-safeLanguageOn :: DynFlags -> Bool-safeLanguageOn dflags = safeHaskell dflags == Sf_Safe---- | Is the Safe Haskell safe inference mode active-safeInferOn :: DynFlags -> Bool-safeInferOn = safeInfer---- | Test if Safe Imports are on in some form-safeImportsOn :: DynFlags -> Bool-safeImportsOn dflags = safeHaskell dflags == Sf_Unsafe ||- safeHaskell dflags == Sf_Trustworthy ||- safeHaskell dflags == Sf_Safe---- | Set a 'Safe Haskell' flag-setSafeHaskell :: SafeHaskellMode -> DynP ()-setSafeHaskell s = updM f- where f dfs = do- let sf = safeHaskell dfs- safeM <- combineSafeFlags sf s- case s of- Sf_Safe -> return $ dfs { safeHaskell = safeM, safeInfer = False }- -- leave safe inference on in Trustworthy mode so we can warn- -- if it could have been inferred safe.- Sf_Trustworthy -> do- l <- getCurLoc- return $ dfs { safeHaskell = safeM, trustworthyOnLoc = l }- -- leave safe inference on in Unsafe mode as well.- _ -> return $ dfs { safeHaskell = safeM }---- | Are all direct imports required to be safe for this Safe Haskell mode?--- Direct imports are when the code explicitly imports a module-safeDirectImpsReq :: DynFlags -> Bool-safeDirectImpsReq d = safeLanguageOn d---- | Are all implicit imports required to be safe for this Safe Haskell mode?--- Implicit imports are things in the prelude. e.g System.IO when print is used.-safeImplicitImpsReq :: DynFlags -> Bool-safeImplicitImpsReq d = safeLanguageOn d---- | Combine two Safe Haskell modes correctly. Used for dealing with multiple flags.--- This makes Safe Haskell very much a monoid but for now I prefer this as I don't--- want to export this functionality from the module but do want to export the--- type constructors.-combineSafeFlags :: SafeHaskellMode -> SafeHaskellMode -> DynP SafeHaskellMode-combineSafeFlags a b | a == Sf_None = return b- | b == Sf_None = return a- | a == Sf_Ignore || b == Sf_Ignore = return Sf_Ignore- | a == b = return a- | otherwise = addErr errm >> pure a- where errm = "Incompatible Safe Haskell flags! ("- ++ show a ++ ", " ++ show b ++ ")"---- | A list of unsafe flags under Safe Haskell. Tuple elements are:--- * name of the flag--- * function to get srcspan that enabled the flag--- * function to test if the flag is on--- * function to turn the flag off-unsafeFlags, unsafeFlagsForInfer- :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]-unsafeFlags = [ ("-XGeneralizedNewtypeDeriving", newDerivOnLoc,- xopt LangExt.GeneralizedNewtypeDeriving,- flip xopt_unset LangExt.GeneralizedNewtypeDeriving)- , ("-XDerivingVia", deriveViaOnLoc,- xopt LangExt.DerivingVia,- flip xopt_unset LangExt.DerivingVia)- , ("-XTemplateHaskell", thOnLoc,- xopt LangExt.TemplateHaskell,- flip xopt_unset LangExt.TemplateHaskell)- ]-unsafeFlagsForInfer = unsafeFlags----- | Retrieve the options corresponding to a particular @opt_*@ field in the correct order-getOpts :: DynFlags -- ^ 'DynFlags' to retrieve the options from- -> (DynFlags -> [a]) -- ^ Relevant record accessor: one of the @opt_*@ accessors- -> [a] -- ^ Correctly ordered extracted options-getOpts dflags opts = reverse (opts dflags)- -- We add to the options from the front, so we need to reverse the list---- | Gets the verbosity flag for the current verbosity level. This is fed to--- other tools, so GHC-specific verbosity flags like @-ddump-most@ are not included-getVerbFlags :: DynFlags -> [String]-getVerbFlags dflags- | verbosity dflags >= 4 = ["-v"]- | otherwise = []--setObjectDir, setHiDir, setHieDir, setStubDir, setDumpDir, setOutputDir,- setDynObjectSuf, setDynHiSuf,- setDylibInstallName,- setObjectSuf, setHiSuf, setHieSuf, setHcSuf, parseDynLibLoaderMode,- setPgmP, addOptl, addOptc, addOptcxx, addOptP,- addCmdlineFramework, addHaddockOpts, addGhciScript,- setInteractivePrint- :: String -> DynFlags -> DynFlags-setOutputFile, setDynOutputFile, setOutputHi, setDynOutputHi, setDumpPrefixForce- :: Maybe String -> DynFlags -> DynFlags--setObjectDir f d = d { objectDir = Just f}-setHiDir f d = d { hiDir = Just f}-setHieDir f d = d { hieDir = Just f}-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).-setDumpDir f d = d { dumpDir = Just f}-setOutputDir f = setObjectDir f- . setHieDir f- . setHiDir f- . setStubDir f- . setDumpDir f-setDylibInstallName f d = d { dylibInstallName = Just f}--setObjectSuf f d = d { objectSuf_ = f}-setDynObjectSuf f d = d { dynObjectSuf_ = f}-setHiSuf f d = d { hiSuf_ = f}-setHieSuf f d = d { hieSuf = f}-setDynHiSuf f d = d { dynHiSuf_ = f}-setHcSuf f d = d { hcSuf = f}--setOutputFile f d = d { outputFile_ = f}-setDynOutputFile f d = d { dynOutputFile_ = f}-setOutputHi f d = d { outputHi = f}-setDynOutputHi f d = d { dynOutputHi = f}--parseUnitInsts :: String -> Instantiations-parseUnitInsts str = case filter ((=="").snd) (readP_to_S parse str) of- [(r, "")] -> r- _ -> throwGhcException $ CmdLineError ("Can't parse -instantiated-with: " ++ str)- where parse = sepBy parseEntry (R.char ',')- parseEntry = do- n <- parseModuleName- _ <- R.char '='- m <- parseHoleyModule- return (n, m)--setUnitInstantiations :: String -> DynFlags -> DynFlags-setUnitInstantiations s d =- d { homeUnitInstantiations_ = parseUnitInsts s }--setUnitInstanceOf :: String -> DynFlags -> DynFlags-setUnitInstanceOf s d =- d { homeUnitInstanceOf_ = Just (UnitId (fsLit s)) }--addPluginModuleName :: String -> DynFlags -> DynFlags-addPluginModuleName name d = d { pluginModNames = (mkModuleName name) : (pluginModNames d) }--clearPluginModuleNames :: DynFlags -> DynFlags-clearPluginModuleNames d =- d { pluginModNames = []- , pluginModNameOpts = []- }--addPluginModuleNameOption :: String -> DynFlags -> DynFlags-addPluginModuleNameOption optflag d = d { pluginModNameOpts = (mkModuleName m, option) : (pluginModNameOpts d) }- where (m, rest) = break (== ':') optflag- option = case rest of- [] -> "" -- should probably signal an error- (_:plug_opt) -> plug_opt -- ignore the ':' from break--addExternalPlugin :: String -> DynFlags -> DynFlags-addExternalPlugin optflag d = case parseExternalPluginSpec optflag of- Just r -> d { externalPluginSpecs = r : externalPluginSpecs d }- Nothing -> cmdLineError $ "Couldn't parse external plugin specification: " ++ optflag--addFrontendPluginOption :: String -> DynFlags -> DynFlags-addFrontendPluginOption s d = d { frontendPluginOpts = s : frontendPluginOpts d }--parseDynLibLoaderMode f d =- case splitAt 8 f of- ("deploy", "") -> d { dynLibLoader = Deployable }- ("sysdep", "") -> d { dynLibLoader = SystemDependent }- _ -> throwGhcException (CmdLineError ("Unknown dynlib loader: " ++ f))--setDumpPrefixForce f d = d { dumpPrefixForce = f}---- XXX HACK: Prelude> words "'does not' work" ===> ["'does","not'","work"]--- Config.hs should really use Option.-setPgmP f = alterToolSettings (\s -> s { toolSettings_pgm_P = (pgm, map Option args)})- where (pgm:args) = words f-addOptl f = alterToolSettings (\s -> s { toolSettings_opt_l = f : toolSettings_opt_l s})-addOptc f = alterToolSettings (\s -> s { toolSettings_opt_c = f : toolSettings_opt_c s})-addOptcxx f = alterToolSettings (\s -> s { toolSettings_opt_cxx = f : toolSettings_opt_cxx s})-addOptP f = alterToolSettings $ \s -> s- { toolSettings_opt_P = f : toolSettings_opt_P s- , toolSettings_opt_P_fingerprint = fingerprintStrings (f : toolSettings_opt_P s)- }- -- See Note [Repeated -optP hashing]- where- fingerprintStrings ss = fingerprintFingerprints $ map fingerprintString ss---setDepMakefile :: FilePath -> DynFlags -> DynFlags-setDepMakefile f d = d { depMakefile = f }--setDepIncludeCppDeps :: Bool -> DynFlags -> DynFlags-setDepIncludeCppDeps b d = d { depIncludeCppDeps = b }--setDepIncludePkgDeps :: Bool -> DynFlags -> DynFlags-setDepIncludePkgDeps b d = d { depIncludePkgDeps = b }--addDepExcludeMod :: String -> DynFlags -> DynFlags-addDepExcludeMod m d- = d { depExcludeMods = mkModuleName m : depExcludeMods d }--addDepSuffix :: FilePath -> DynFlags -> DynFlags-addDepSuffix s d = d { depSuffixes = s : depSuffixes d }--addCmdlineFramework f d = d { cmdlineFrameworks = f : cmdlineFrameworks d}--addGhcVersionFile :: FilePath -> DynFlags -> DynFlags-addGhcVersionFile f d = d { ghcVersionFile = Just f }--addHaddockOpts f d = d { haddockOptions = Just f}--addGhciScript f d = d { ghciScripts = f : ghciScripts d}--setInteractivePrint f d = d { interactivePrint = Just f}---------------------------------------------------------------------------------- Setting the optimisation level--updOptLevelChanged :: Int -> DynFlags -> (DynFlags, Bool)--- ^ Sets the 'DynFlags' to be appropriate to the optimisation level and signals if any changes took place-updOptLevelChanged n dfs- = (dfs3, changed1 || changed2 || changed3)- where- final_n = max 0 (min 2 n) -- Clamp to 0 <= n <= 2- (dfs1, changed1) = foldr unset (dfs , False) remove_gopts- (dfs2, changed2) = foldr set (dfs1, False) extra_gopts- (dfs3, changed3) = setLlvmOptLevel dfs2-- extra_gopts = [ f | (ns,f) <- optLevelFlags, final_n `elem` ns ]- remove_gopts = [ f | (ns,f) <- optLevelFlags, final_n `notElem` ns ]-- set f (dfs, changed)- | gopt f dfs = (dfs, changed)- | otherwise = (gopt_set dfs f, True)-- unset f (dfs, changed)- | not (gopt f dfs) = (dfs, changed)- | otherwise = (gopt_unset dfs f, True)-- setLlvmOptLevel dfs- | llvmOptLevel dfs /= final_n = (dfs{ llvmOptLevel = final_n }, True)- | otherwise = (dfs, False)--updOptLevel :: Int -> DynFlags -> DynFlags--- ^ Sets the 'DynFlags' to be appropriate to the optimisation level-updOptLevel n = fst . updOptLevelChanged n--{- **********************************************************************-%* *- DynFlags parser-%* *-%********************************************************************* -}---- -------------------------------------------------------------------------------- Parsing the dynamic flags.----- | Parse dynamic flags from a list of command line arguments. Returns--- the parsed 'DynFlags', the left-over arguments, and a list of warnings.--- Throws a 'UsageError' if errors occurred during parsing (such as unknown--- flags or missing arguments).-parseDynamicFlagsCmdLine :: MonadIO m => DynFlags -> [Located String]- -> m (DynFlags, [Located String], [Warn])- -- ^ Updated 'DynFlags', left-over arguments, and- -- list of warnings.-parseDynamicFlagsCmdLine = parseDynamicFlagsFull flagsAll True----- | Like 'parseDynamicFlagsCmdLine' but does not allow the package flags--- (-package, -hide-package, -ignore-package, -hide-all-packages, -package-db).--- Used to parse flags set in a modules pragma.-parseDynamicFilePragma :: MonadIO m => DynFlags -> [Located String]- -> m (DynFlags, [Located String], [Warn])- -- ^ Updated 'DynFlags', left-over arguments, and- -- list of warnings.-parseDynamicFilePragma = parseDynamicFlagsFull flagsDynamic False--newtype CmdLineP s a = CmdLineP (forall m. (Monad m) => StateT s m a)- deriving (Functor)--instance Monad (CmdLineP s) where- CmdLineP k >>= f = CmdLineP (k >>= \x -> case f x of CmdLineP g -> g)- return = pure--instance Applicative (CmdLineP s) where- pure x = CmdLineP (pure x)- (<*>) = ap--getCmdLineState :: CmdLineP s s-getCmdLineState = CmdLineP State.get--putCmdLineState :: s -> CmdLineP s ()-putCmdLineState x = CmdLineP (State.put x)--runCmdLineP :: CmdLineP s a -> s -> (a, s)-runCmdLineP (CmdLineP k) s0 = runIdentity $ runStateT k s0---- | A helper to parse a set of flags from a list of command-line arguments, handling--- response files.-processCmdLineP- :: forall s m. MonadIO m- => [Flag (CmdLineP s)] -- ^ valid flags to match against- -> s -- ^ current state- -> [Located String] -- ^ arguments to parse- -> m (([Located String], [Err], [Warn]), s)- -- ^ (leftovers, errors, warnings)-processCmdLineP activeFlags s0 args =- runStateT (processArgs (map (hoistFlag getCmdLineP) activeFlags) args parseResponseFile) s0- where- getCmdLineP :: CmdLineP s a -> StateT s m a- getCmdLineP (CmdLineP k) = k---- | Parses the dynamically set flags for GHC. This is the most general form of--- the dynamic flag parser that the other methods simply wrap. It allows--- saying which flags are valid flags and indicating if we are parsing--- arguments from the command line or from a file pragma.-parseDynamicFlagsFull- :: forall m. MonadIO m- => [Flag (CmdLineP DynFlags)] -- ^ valid flags to match against- -> Bool -- ^ are the arguments from the command line?- -> DynFlags -- ^ current dynamic flags- -> [Located String] -- ^ arguments to parse- -> m (DynFlags, [Located String], [Warn])-parseDynamicFlagsFull activeFlags cmdline dflags0 args = do- ((leftover, errs, warns), dflags1) <- processCmdLineP activeFlags dflags0 args-- -- See Note [Handling errors when parsing command-line flags]- let rdr = renderWithContext (initSDocContext dflags0 defaultUserStyle)- unless (null errs) $ liftIO $ throwGhcExceptionIO $ errorsToGhcException $- map ((rdr . ppr . getLoc &&& unLoc) . errMsg) $ errs-- -- check for disabled flags in safe haskell- let (dflags2, sh_warns) = safeFlagCheck cmdline dflags1- theWays = ways dflags2-- unless (allowed_combination theWays) $ liftIO $- throwGhcExceptionIO (CmdLineError ("combination not supported: " ++- intercalate "/" (map wayDesc (Set.toAscList theWays))))-- let (dflags3, consistency_warnings) = makeDynFlagsConsistent dflags2-- -- Set timer stats & heap size- when (enableTimeStats dflags3) $ liftIO enableTimingStats- case (ghcHeapSize dflags3) of- Just x -> liftIO (setHeapSize x)- _ -> return ()-- liftIO $ setUnsafeGlobalDynFlags dflags3-- let warns' = map (Warn WarningWithoutFlag) (consistency_warnings ++ sh_warns)-- return (dflags3, leftover, warns' ++ warns)---- | Check (and potentially disable) any extensions that aren't allowed--- in safe mode.------ The bool is to indicate if we are parsing command line flags (false means--- file pragma). This allows us to generate better warnings.-safeFlagCheck :: Bool -> DynFlags -> (DynFlags, [Located String])-safeFlagCheck _ dflags | safeLanguageOn dflags = (dflagsUnset, warns)- where- -- Handle illegal flags under safe language.- (dflagsUnset, warns) = foldl' check_method (dflags, []) unsafeFlags-- check_method (df, warns) (str,loc,test,fix)- | test df = (fix df, warns ++ safeFailure (loc df) str)- | otherwise = (df, warns)-- safeFailure loc str- = [L loc $ str ++ " is not allowed in Safe Haskell; ignoring "- ++ str]--safeFlagCheck cmdl dflags =- case safeInferOn dflags of- True -> (dflags' { safeInferred = safeFlags }, warn)- False -> (dflags', warn)-- where- -- dynflags and warn for when -fpackage-trust by itself with no safe- -- haskell flag- (dflags', warn)- | not (safeHaskellModeEnabled dflags) && not cmdl && packageTrustOn dflags- = (gopt_unset dflags Opt_PackageTrust, pkgWarnMsg)- | otherwise = (dflags, [])-- pkgWarnMsg = [L (pkgTrustOnLoc dflags') $- "-fpackage-trust ignored;" ++- " must be specified with a Safe Haskell flag"]-- -- Have we inferred Unsafe? See Note [Safe Haskell Inference] in GHC.Driver.Main- -- Force this to avoid retaining reference to old DynFlags value- !safeFlags = all (\(_,_,t,_) -> not $ t dflags) unsafeFlagsForInfer---{- **********************************************************************-%* *- DynFlags specifications-%* *-%********************************************************************* -}---- | All dynamic flags option strings without the deprecated ones.--- These are the user facing strings for enabling and disabling options.-allNonDeprecatedFlags :: [String]-allNonDeprecatedFlags = allFlagsDeps False---- | All flags with possibility to filter deprecated ones-allFlagsDeps :: Bool -> [String]-allFlagsDeps keepDeprecated = [ '-':flagName flag- | (deprecated, flag) <- flagsAllDeps- , keepDeprecated || not (isDeprecated deprecated)]- where isDeprecated Deprecated = True- isDeprecated _ = False--{-- - Below we export user facing symbols for GHC dynamic flags for use with the- - GHC API.- -}---- All dynamic flags present in GHC.-flagsAll :: [Flag (CmdLineP DynFlags)]-flagsAll = map snd flagsAllDeps---- All dynamic flags present in GHC with deprecation information.-flagsAllDeps :: [(Deprecation, Flag (CmdLineP DynFlags))]-flagsAllDeps = package_flags_deps ++ dynamic_flags_deps----- All dynamic flags, minus package flags, present in GHC.-flagsDynamic :: [Flag (CmdLineP DynFlags)]-flagsDynamic = map snd dynamic_flags_deps---- ALl package flags present in GHC.-flagsPackage :: [Flag (CmdLineP DynFlags)]-flagsPackage = map snd package_flags_deps------------------Helpers to make flags and keep deprecation information------------type FlagMaker m = String -> OptKind m -> Flag m-type DynFlagMaker = FlagMaker (CmdLineP DynFlags)-data Deprecation = NotDeprecated | Deprecated deriving (Eq, Ord)---- Make a non-deprecated flag-make_ord_flag :: DynFlagMaker -> String -> OptKind (CmdLineP DynFlags)- -> (Deprecation, Flag (CmdLineP DynFlags))-make_ord_flag fm name kind = (NotDeprecated, fm name kind)---- Make a deprecated flag-make_dep_flag :: DynFlagMaker -> String -> OptKind (CmdLineP DynFlags) -> String- -> (Deprecation, Flag (CmdLineP DynFlags))-make_dep_flag fm name kind message = (Deprecated,- fm name $ add_dep_message kind message)--add_dep_message :: OptKind (CmdLineP DynFlags) -> String- -> OptKind (CmdLineP DynFlags)-add_dep_message (NoArg f) message = NoArg $ f >> deprecate message-add_dep_message (HasArg f) message = HasArg $ \s -> f s >> deprecate message-add_dep_message (SepArg f) message = SepArg $ \s -> f s >> deprecate message-add_dep_message (Prefix f) message = Prefix $ \s -> f s >> deprecate message-add_dep_message (OptPrefix f) message =- OptPrefix $ \s -> f s >> deprecate message-add_dep_message (OptIntSuffix f) message =- OptIntSuffix $ \oi -> f oi >> deprecate message-add_dep_message (IntSuffix f) message =- IntSuffix $ \i -> f i >> deprecate message-add_dep_message (Word64Suffix f) message =- Word64Suffix $ \i -> f i >> deprecate message-add_dep_message (FloatSuffix f) message =- FloatSuffix $ \fl -> f fl >> deprecate message-add_dep_message (PassFlag f) message =- PassFlag $ \s -> f s >> deprecate message-add_dep_message (AnySuffix f) message =- AnySuffix $ \s -> f s >> deprecate message------------------------- The main flags themselves --------------------------------- See Note [Updating flag description in the User's Guide]--- See Note [Supporting CLI completion]-dynamic_flags_deps :: [(Deprecation, Flag (CmdLineP DynFlags))]-dynamic_flags_deps = [- make_dep_flag defFlag "n" (NoArg $ return ())- "The -n flag is deprecated and no longer has any effect"- , make_ord_flag defFlag "cpp" (NoArg (setExtensionFlag LangExt.Cpp))- , make_ord_flag defFlag "F" (NoArg (setGeneralFlag Opt_Pp))- , (Deprecated, defFlag "#include"- (HasArg (\_s ->- deprecate ("-#include and INCLUDE pragmas are " ++- "deprecated: They no longer have any effect"))))- , make_ord_flag defFlag "v" (OptIntSuffix setVerbosity)-- , make_ord_flag defGhcFlag "j" (OptIntSuffix- (\n -> case n of- Just n- | n > 0 -> upd (\d -> d { parMakeCount = Just n })- | otherwise -> addErr "Syntax: -j[n] where n > 0"- Nothing -> upd (\d -> d { parMakeCount = Nothing })))- -- When the number of parallel builds- -- is omitted, it is the same- -- as specifying that the number of- -- parallel builds is equal to the- -- result of getNumProcessors- , make_ord_flag defFlag "instantiated-with" (sepArg setUnitInstantiations)- , make_ord_flag defFlag "this-component-id" (sepArg setUnitInstanceOf)-- -- RTS options -------------------------------------------------------------- , make_ord_flag defFlag "H" (HasArg (\s -> upd (\d ->- d { ghcHeapSize = Just $ fromIntegral (decodeSize s)})))-- , make_ord_flag defFlag "Rghc-timing" (NoArg (upd (\d ->- d { enableTimeStats = True })))-- ------- ways ---------------------------------------------------------------- , make_ord_flag defGhcFlag "prof" (NoArg (addWayDynP WayProf))- , (Deprecated, defFlag "eventlog"- $ noArgM $ \d -> do- deprecate "the eventlog is now enabled in all runtime system ways"- return d)- , make_ord_flag defGhcFlag "debug" (NoArg (addWayDynP WayDebug))- , make_ord_flag defGhcFlag "threaded" (NoArg (addWayDynP WayThreaded))-- , make_ord_flag defGhcFlag "ticky"- (NoArg (setGeneralFlag Opt_Ticky >> addWayDynP WayDebug))-- -- -ticky enables ticky-ticky code generation, and also implies -debug which- -- is required to get the RTS ticky support.-- ----- Linker --------------------------------------------------------- , make_ord_flag defGhcFlag "static" (NoArg removeWayDyn)- , make_ord_flag defGhcFlag "dynamic" (NoArg (addWayDynP WayDyn))- , make_ord_flag defGhcFlag "rdynamic" $ noArg $-#if defined(linux_HOST_OS)- addOptl "-rdynamic"-#elif defined(mingw32_HOST_OS)- addOptl "-Wl,--export-all-symbols"-#else- -- ignored for compat w/ gcc:- id-#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))-- ------- Specific phases --------------------------------------------- -- need to appear before -pgmL to be parsed as LLVM flags.- , make_ord_flag defFlag "pgmlo"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_lo = (f,[]) }- , make_ord_flag defFlag "pgmlc"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_lc = (f,[]) }- , make_ord_flag defFlag "pgmlm"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_lm =- if null f then Nothing else Just (f,[]) }- , make_ord_flag defFlag "pgmi"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_i = f }- , make_ord_flag defFlag "pgmL"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_L = f }- , make_ord_flag defFlag "pgmP"- (hasArg setPgmP)- , make_ord_flag defFlag "pgmF"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_F = f }- , make_ord_flag defFlag "pgmc"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_c = f }- , make_ord_flag defFlag "pgmcxx"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_cxx = f }- , (Deprecated, defFlag "pgmc-supports-no-pie"- $ noArgM $ \d -> do- deprecate $ "use -pgml-supports-no-pie instead"- pure $ alterToolSettings (\s -> s { toolSettings_ccSupportsNoPie = True }) d)- , make_ord_flag defFlag "pgms"- (HasArg (\_ -> addWarn "Object splitting was removed in GHC 8.8"))- , make_ord_flag defFlag "pgma"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_a = (f,[]) }- , make_ord_flag defFlag "pgml"- $ hasArg $ \f -> alterToolSettings $ \s -> s- { toolSettings_pgm_l = (f,[])- , -- Don't pass -no-pie with custom -pgml (see #15319). Note- -- that this could break when -no-pie is actually needed.- -- But the CC_SUPPORTS_NO_PIE check only happens at- -- buildtime, and -pgml is a runtime option. A better- -- solution would be running this check for each custom- -- -pgml.- toolSettings_ccSupportsNoPie = False- }- , make_ord_flag defFlag "pgml-supports-no-pie"- $ noArg $ alterToolSettings $ \s -> s { toolSettings_ccSupportsNoPie = True }- , make_ord_flag defFlag "pgmdll"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_dll = (f,[]) }- , make_ord_flag defFlag "pgmwindres"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_windres = f }- , make_ord_flag defFlag "pgmar"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_ar = f }- , make_ord_flag defFlag "pgmotool"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_otool = f}- , make_ord_flag defFlag "pgminstall_name_tool"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_install_name_tool = f}- , make_ord_flag defFlag "pgmranlib"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_ranlib = f }--- -- need to appear before -optl/-opta to be parsed as LLVM flags.- , make_ord_flag defFlag "optlm"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_lm = f : toolSettings_opt_lm s }- , make_ord_flag defFlag "optlo"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_lo = f : toolSettings_opt_lo s }- , make_ord_flag defFlag "optlc"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_lc = f : toolSettings_opt_lc s }- , make_ord_flag defFlag "opti"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_i = f : toolSettings_opt_i s }- , make_ord_flag defFlag "optL"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_L = f : toolSettings_opt_L s }- , make_ord_flag defFlag "optP"- (hasArg addOptP)- , make_ord_flag defFlag "optF"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_F = f : toolSettings_opt_F s }- , make_ord_flag defFlag "optc"- (hasArg addOptc)- , make_ord_flag defFlag "optcxx"- (hasArg addOptcxx)- , make_ord_flag defFlag "opta"- $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_a = f : toolSettings_opt_a s }- , make_ord_flag defFlag "optl"- (hasArg addOptl)- , make_ord_flag defFlag "optwindres"- $ hasArg $ \f ->- alterToolSettings $ \s -> s { toolSettings_opt_windres = f : toolSettings_opt_windres s }-- , make_ord_flag defGhcFlag "split-objs"- (NoArg $ addWarn "ignoring -split-objs")-- -- N.B. We may someday deprecate this in favor of -fsplit-sections,- -- which has the benefit of also having a negating -fno-split-sections.- , make_ord_flag defGhcFlag "split-sections"- (NoArg $ setGeneralFlag Opt_SplitSections)-- -------- ghc -M ------------------------------------------------------ , make_ord_flag defGhcFlag "dep-suffix" (hasArg addDepSuffix)- , make_ord_flag defGhcFlag "dep-makefile" (hasArg setDepMakefile)- , make_ord_flag defGhcFlag "include-cpp-deps"- (noArg (setDepIncludeCppDeps True))- , make_ord_flag defGhcFlag "include-pkg-deps"- (noArg (setDepIncludePkgDeps True))- , make_ord_flag defGhcFlag "exclude-module" (hasArg addDepExcludeMod)-- -------- Linking ----------------------------------------------------- , make_ord_flag defGhcFlag "no-link"- (noArg (\d -> d { ghcLink=NoLink }))- , make_ord_flag defGhcFlag "shared"- (noArg (\d -> d { ghcLink=LinkDynLib }))- , make_ord_flag defGhcFlag "staticlib"- (noArg (\d -> setGeneralFlag' Opt_LinkRts (d { ghcLink=LinkStaticLib })))- , make_ord_flag defGhcFlag "-merge-objs"- (noArg (\d -> d { ghcLink=LinkMergedObj }))- , make_ord_flag defGhcFlag "dynload" (hasArg parseDynLibLoaderMode)- , make_ord_flag defGhcFlag "dylib-install-name" (hasArg setDylibInstallName)-- ------- Libraries ---------------------------------------------------- , make_ord_flag defFlag "L" (Prefix addLibraryPath)- , make_ord_flag defFlag "l" (hasArg (addLdInputs . Option . ("-l" ++)))-- ------- Frameworks --------------------------------------------------- -- -framework-path should really be -F ...- , make_ord_flag defFlag "framework-path" (HasArg addFrameworkPath)- , make_ord_flag defFlag "framework" (hasArg addCmdlineFramework)-- ------- Output Redirection ------------------------------------------- , make_ord_flag defGhcFlag "odir" (hasArg setObjectDir)- , make_ord_flag defGhcFlag "o" (sepArg (setOutputFile . Just))- , make_ord_flag defGhcFlag "dyno"- (sepArg (setDynOutputFile . Just))- , make_ord_flag defGhcFlag "ohi"- (hasArg (setOutputHi . Just ))- , make_ord_flag defGhcFlag "dynohi"- (hasArg (setDynOutputHi . Just ))- , make_ord_flag defGhcFlag "osuf" (hasArg setObjectSuf)- , make_ord_flag defGhcFlag "dynosuf" (hasArg setDynObjectSuf)- , make_ord_flag defGhcFlag "hcsuf" (hasArg setHcSuf)- , make_ord_flag defGhcFlag "hisuf" (hasArg setHiSuf)- , make_ord_flag defGhcFlag "hiesuf" (hasArg setHieSuf)- , make_ord_flag defGhcFlag "dynhisuf" (hasArg setDynHiSuf)- , make_ord_flag defGhcFlag "hidir" (hasArg setHiDir)- , make_ord_flag defGhcFlag "hiedir" (hasArg setHieDir)- , make_ord_flag defGhcFlag "tmpdir" (hasArg setTmpDir)- , make_ord_flag defGhcFlag "stubdir" (hasArg setStubDir)- , make_ord_flag defGhcFlag "dumpdir" (hasArg setDumpDir)- , make_ord_flag defGhcFlag "outputdir" (hasArg setOutputDir)- , make_ord_flag defGhcFlag "ddump-file-prefix"- (hasArg (setDumpPrefixForce . Just . flip (++) "."))-- , make_ord_flag defGhcFlag "dynamic-too"- (NoArg (setGeneralFlag Opt_BuildDynamicToo))-- ------- Keeping temporary files -------------------------------------- -- These can be singular (think ghc -c) or plural (think ghc --make)- , make_ord_flag defGhcFlag "keep-hc-file"- (NoArg (setGeneralFlag Opt_KeepHcFiles))- , make_ord_flag defGhcFlag "keep-hc-files"- (NoArg (setGeneralFlag Opt_KeepHcFiles))- , make_ord_flag defGhcFlag "keep-hscpp-file"- (NoArg (setGeneralFlag Opt_KeepHscppFiles))- , make_ord_flag defGhcFlag "keep-hscpp-files"- (NoArg (setGeneralFlag Opt_KeepHscppFiles))- , make_ord_flag defGhcFlag "keep-s-file"- (NoArg (setGeneralFlag Opt_KeepSFiles))- , make_ord_flag defGhcFlag "keep-s-files"- (NoArg (setGeneralFlag Opt_KeepSFiles))- , make_ord_flag defGhcFlag "keep-llvm-file"- (NoArg $ setObjBackend llvmBackend >> setGeneralFlag Opt_KeepLlvmFiles)- , make_ord_flag defGhcFlag "keep-llvm-files"- (NoArg $ setObjBackend llvmBackend >> setGeneralFlag Opt_KeepLlvmFiles)- -- This only makes sense as plural- , make_ord_flag defGhcFlag "keep-tmp-files"- (NoArg (setGeneralFlag Opt_KeepTmpFiles))- , make_ord_flag defGhcFlag "keep-hi-file"- (NoArg (setGeneralFlag Opt_KeepHiFiles))- , make_ord_flag defGhcFlag "no-keep-hi-file"- (NoArg (unSetGeneralFlag Opt_KeepHiFiles))- , make_ord_flag defGhcFlag "keep-hi-files"- (NoArg (setGeneralFlag Opt_KeepHiFiles))- , make_ord_flag defGhcFlag "no-keep-hi-files"- (NoArg (unSetGeneralFlag Opt_KeepHiFiles))- , make_ord_flag defGhcFlag "keep-o-file"- (NoArg (setGeneralFlag Opt_KeepOFiles))- , make_ord_flag defGhcFlag "no-keep-o-file"- (NoArg (unSetGeneralFlag Opt_KeepOFiles))- , make_ord_flag defGhcFlag "keep-o-files"- (NoArg (setGeneralFlag Opt_KeepOFiles))- , make_ord_flag defGhcFlag "no-keep-o-files"- (NoArg (unSetGeneralFlag Opt_KeepOFiles))-- ------- Miscellaneous ----------------------------------------------- , make_ord_flag defGhcFlag "no-auto-link-packages"- (NoArg (unSetGeneralFlag Opt_AutoLinkPackages))- , make_ord_flag defGhcFlag "no-hs-main"- (NoArg (setGeneralFlag Opt_NoHsMain))- , make_ord_flag defGhcFlag "fno-state-hack"- (NoArg (setGeneralFlag Opt_G_NoStateHack))- , make_ord_flag defGhcFlag "fno-opt-coercion"- (NoArg (setGeneralFlag Opt_G_NoOptCoercion))- , make_ord_flag defGhcFlag "with-rtsopts"- (HasArg setRtsOpts)- , make_ord_flag defGhcFlag "rtsopts"- (NoArg (setRtsOptsEnabled RtsOptsAll))- , make_ord_flag defGhcFlag "rtsopts=all"- (NoArg (setRtsOptsEnabled RtsOptsAll))- , make_ord_flag defGhcFlag "rtsopts=some"- (NoArg (setRtsOptsEnabled RtsOptsSafeOnly))- , make_ord_flag defGhcFlag "rtsopts=none"- (NoArg (setRtsOptsEnabled RtsOptsNone))- , make_ord_flag defGhcFlag "rtsopts=ignore"- (NoArg (setRtsOptsEnabled RtsOptsIgnore))- , make_ord_flag defGhcFlag "rtsopts=ignoreAll"- (NoArg (setRtsOptsEnabled RtsOptsIgnoreAll))- , make_ord_flag defGhcFlag "no-rtsopts"- (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)- , make_ord_flag defGhcFlag "haddock" (NoArg (setGeneralFlag Opt_Haddock))- , make_ord_flag defGhcFlag "no-haddock" (NoArg (unSetGeneralFlag Opt_Haddock))- , make_ord_flag defGhcFlag "haddock-opts" (hasArg addHaddockOpts)- , make_ord_flag defGhcFlag "hpcdir" (SepArg setOptHpcDir)- , make_ord_flag defGhciFlag "ghci-script" (hasArg addGhciScript)- , make_ord_flag defGhciFlag "interactive-print" (hasArg setInteractivePrint)- , make_ord_flag defGhcFlag "ticky-allocd"- (NoArg (setGeneralFlag Opt_Ticky_Allocd))- , make_ord_flag defGhcFlag "ticky-LNE"- (NoArg (setGeneralFlag Opt_Ticky_LNE))- , make_ord_flag defGhcFlag "ticky-ap-thunk"- (NoArg (setGeneralFlag Opt_Ticky_AP))- , make_ord_flag defGhcFlag "ticky-dyn-thunk"- (NoArg (setGeneralFlag Opt_Ticky_Dyn_Thunk))- , make_ord_flag defGhcFlag "ticky-tag-checks"- (NoArg (setGeneralFlag Opt_Ticky_Tag))- ------- recompilation checker --------------------------------------- , make_dep_flag defGhcFlag "recomp"- (NoArg $ unSetGeneralFlag Opt_ForceRecomp)- "Use -fno-force-recomp instead"- , make_dep_flag defGhcFlag "no-recomp"- (NoArg $ setGeneralFlag Opt_ForceRecomp) "Use -fforce-recomp instead"- , make_ord_flag defFlag "fmax-errors"- (intSuffix (\n d -> d { maxErrors = Just (max 1 n) }))- , make_ord_flag defFlag "fno-max-errors"- (noArg (\d -> d { maxErrors = Nothing }))- , make_ord_flag defFlag "freverse-errors"- (noArg (\d -> d {reverseErrors = True} ))- , make_ord_flag defFlag "fno-reverse-errors"- (noArg (\d -> d {reverseErrors = False} ))-- ------ HsCpp opts ---------------------------------------------------- , make_ord_flag defFlag "D" (AnySuffix (upd . addOptP))- , make_ord_flag defFlag "U" (AnySuffix (upd . addOptP))-- ------- Include/Import Paths ----------------------------------------- , make_ord_flag defFlag "I" (Prefix addIncludePath)- , make_ord_flag defFlag "i" (OptPrefix addImportPath)-- ------ Output style options ------------------------------------------ , make_ord_flag defFlag "dppr-user-length" (intSuffix (\n d ->- d { pprUserLength = n }))- , make_ord_flag defFlag "dppr-cols" (intSuffix (\n d ->- d { pprCols = n }))- , make_ord_flag defFlag "fdiagnostics-color=auto"- (NoArg (upd (\d -> d { useColor = Auto })))- , make_ord_flag defFlag "fdiagnostics-color=always"- (NoArg (upd (\d -> d { useColor = Always })))- , make_ord_flag defFlag "fdiagnostics-color=never"- (NoArg (upd (\d -> d { useColor = Never })))-- -- Suppress all that is suppressible in core dumps.- -- Except for uniques, as some simplifier phases introduce new variables that- -- have otherwise identical names.- , make_ord_flag defGhcFlag "dsuppress-all"- (NoArg $ do setGeneralFlag Opt_SuppressCoercions- setGeneralFlag Opt_SuppressCoercionTypes- setGeneralFlag Opt_SuppressVarKinds- setGeneralFlag Opt_SuppressModulePrefixes- setGeneralFlag Opt_SuppressTypeApplications- setGeneralFlag Opt_SuppressIdInfo- setGeneralFlag Opt_SuppressTicks- setGeneralFlag Opt_SuppressStgExts- setGeneralFlag Opt_SuppressStgReps- setGeneralFlag Opt_SuppressTypeSignatures- setGeneralFlag Opt_SuppressCoreSizes- setGeneralFlag Opt_SuppressTimestamps)-- ------ Debugging ----------------------------------------------------- , make_ord_flag defGhcFlag "dstg-stats"- (NoArg (setGeneralFlag Opt_StgStats))-- , make_ord_flag defGhcFlag "ddump-cmm"- (setDumpFlag Opt_D_dump_cmm)- , make_ord_flag defGhcFlag "ddump-cmm-from-stg"- (setDumpFlag Opt_D_dump_cmm_from_stg)- , make_ord_flag defGhcFlag "ddump-cmm-raw"- (setDumpFlag Opt_D_dump_cmm_raw)- , make_ord_flag defGhcFlag "ddump-cmm-verbose"- (setDumpFlag Opt_D_dump_cmm_verbose)- , make_ord_flag defGhcFlag "ddump-cmm-verbose-by-proc"- (setDumpFlag Opt_D_dump_cmm_verbose_by_proc)- , make_ord_flag defGhcFlag "ddump-cmm-cfg"- (setDumpFlag Opt_D_dump_cmm_cfg)- , make_ord_flag defGhcFlag "ddump-cmm-cbe"- (setDumpFlag Opt_D_dump_cmm_cbe)- , make_ord_flag defGhcFlag "ddump-cmm-switch"- (setDumpFlag Opt_D_dump_cmm_switch)- , make_ord_flag defGhcFlag "ddump-cmm-proc"- (setDumpFlag Opt_D_dump_cmm_proc)- , make_ord_flag defGhcFlag "ddump-cmm-sp"- (setDumpFlag Opt_D_dump_cmm_sp)- , make_ord_flag defGhcFlag "ddump-cmm-sink"- (setDumpFlag Opt_D_dump_cmm_sink)- , make_ord_flag defGhcFlag "ddump-cmm-caf"- (setDumpFlag Opt_D_dump_cmm_caf)- , make_ord_flag defGhcFlag "ddump-cmm-procmap"- (setDumpFlag Opt_D_dump_cmm_procmap)- , make_ord_flag defGhcFlag "ddump-cmm-split"- (setDumpFlag Opt_D_dump_cmm_split)- , make_ord_flag defGhcFlag "ddump-cmm-info"- (setDumpFlag Opt_D_dump_cmm_info)- , make_ord_flag defGhcFlag "ddump-cmm-cps"- (setDumpFlag Opt_D_dump_cmm_cps)- , make_ord_flag defGhcFlag "ddump-cmm-opt"- (setDumpFlag Opt_D_dump_opt_cmm)- , make_ord_flag defGhcFlag "ddump-cmm-thread-sanitizer"- (setDumpFlag Opt_D_dump_cmm_thread_sanitizer)- , make_ord_flag defGhcFlag "ddump-cfg-weights"- (setDumpFlag Opt_D_dump_cfg_weights)- , make_ord_flag defGhcFlag "ddump-core-stats"- (setDumpFlag Opt_D_dump_core_stats)- , make_ord_flag defGhcFlag "ddump-asm"- (setDumpFlag Opt_D_dump_asm)- , make_ord_flag defGhcFlag "ddump-js"- (setDumpFlag Opt_D_dump_js)- , make_ord_flag defGhcFlag "ddump-asm-native"- (setDumpFlag Opt_D_dump_asm_native)- , make_ord_flag defGhcFlag "ddump-asm-liveness"- (setDumpFlag Opt_D_dump_asm_liveness)- , make_ord_flag defGhcFlag "ddump-asm-regalloc"- (setDumpFlag Opt_D_dump_asm_regalloc)- , make_ord_flag defGhcFlag "ddump-asm-conflicts"- (setDumpFlag Opt_D_dump_asm_conflicts)- , make_ord_flag defGhcFlag "ddump-asm-regalloc-stages"- (setDumpFlag Opt_D_dump_asm_regalloc_stages)- , make_ord_flag defGhcFlag "ddump-asm-stats"- (setDumpFlag Opt_D_dump_asm_stats)- , make_ord_flag defGhcFlag "ddump-llvm"- (NoArg $ setDumpFlag' Opt_D_dump_llvm)- , make_ord_flag defGhcFlag "ddump-c-backend"- (NoArg $ setDumpFlag' Opt_D_dump_c_backend)- , make_ord_flag defGhcFlag "ddump-deriv"- (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"- (setDumpFlag Opt_D_dump_inlinings)- , make_ord_flag defGhcFlag "ddump-verbose-inlinings"- (setDumpFlag Opt_D_dump_verbose_inlinings)- , make_ord_flag defGhcFlag "ddump-rule-firings"- (setDumpFlag Opt_D_dump_rule_firings)- , make_ord_flag defGhcFlag "ddump-rule-rewrites"- (setDumpFlag Opt_D_dump_rule_rewrites)- , make_ord_flag defGhcFlag "ddump-simpl-trace"- (setDumpFlag Opt_D_dump_simpl_trace)- , make_ord_flag defGhcFlag "ddump-occur-anal"- (setDumpFlag Opt_D_dump_occur_anal)- , make_ord_flag defGhcFlag "ddump-parsed"- (setDumpFlag Opt_D_dump_parsed)- , make_ord_flag defGhcFlag "ddump-parsed-ast"- (setDumpFlag Opt_D_dump_parsed_ast)- , make_ord_flag defGhcFlag "dkeep-comments"- (NoArg (setGeneralFlag Opt_KeepRawTokenStream))- , make_ord_flag defGhcFlag "ddump-rn"- (setDumpFlag Opt_D_dump_rn)- , make_ord_flag defGhcFlag "ddump-rn-ast"- (setDumpFlag Opt_D_dump_rn_ast)- , make_ord_flag defGhcFlag "ddump-simpl"- (setDumpFlag Opt_D_dump_simpl)- , make_ord_flag defGhcFlag "ddump-simpl-iterations"- (setDumpFlag Opt_D_dump_simpl_iterations)- , make_ord_flag defGhcFlag "ddump-spec"- (setDumpFlag Opt_D_dump_spec)- , make_ord_flag defGhcFlag "ddump-prep"- (setDumpFlag Opt_D_dump_prep)- , make_ord_flag defGhcFlag "ddump-late-cc"- (setDumpFlag Opt_D_dump_late_cc)- , make_ord_flag defGhcFlag "ddump-stg-from-core"- (setDumpFlag Opt_D_dump_stg_from_core)- , make_ord_flag defGhcFlag "ddump-stg-unarised"- (setDumpFlag Opt_D_dump_stg_unarised)- , make_ord_flag defGhcFlag "ddump-stg-final"- (setDumpFlag Opt_D_dump_stg_final)- , make_ord_flag defGhcFlag "ddump-stg-cg"- (setDumpFlag Opt_D_dump_stg_cg)- , make_dep_flag defGhcFlag "ddump-stg"- (setDumpFlag Opt_D_dump_stg_from_core)- "Use `-ddump-stg-from-core` or `-ddump-stg-final` instead"- , make_ord_flag defGhcFlag "ddump-stg-tags"- (setDumpFlag Opt_D_dump_stg_tags)- , make_ord_flag defGhcFlag "ddump-call-arity"- (setDumpFlag Opt_D_dump_call_arity)- , make_ord_flag defGhcFlag "ddump-exitify"- (setDumpFlag Opt_D_dump_exitify)- , make_ord_flag defGhcFlag "ddump-stranal"- (setDumpFlag Opt_D_dump_stranal)- , make_ord_flag defGhcFlag "ddump-str-signatures"- (setDumpFlag Opt_D_dump_str_signatures)- , make_ord_flag defGhcFlag "ddump-cpranal"- (setDumpFlag Opt_D_dump_cpranal)- , make_ord_flag defGhcFlag "ddump-cpr-signatures"- (setDumpFlag Opt_D_dump_cpr_signatures)- , make_ord_flag defGhcFlag "ddump-tc"- (setDumpFlag Opt_D_dump_tc)- , make_ord_flag defGhcFlag "ddump-tc-ast"- (setDumpFlag Opt_D_dump_tc_ast)- , make_ord_flag defGhcFlag "ddump-hie"- (setDumpFlag Opt_D_dump_hie)- , make_ord_flag defGhcFlag "ddump-types"- (setDumpFlag Opt_D_dump_types)- , make_ord_flag defGhcFlag "ddump-rules"- (setDumpFlag Opt_D_dump_rules)- , make_ord_flag defGhcFlag "ddump-cse"- (setDumpFlag Opt_D_dump_cse)- , make_ord_flag defGhcFlag "ddump-worker-wrapper"- (setDumpFlag Opt_D_dump_worker_wrapper)- , make_ord_flag defGhcFlag "ddump-rn-trace"- (setDumpFlag Opt_D_dump_rn_trace)- , make_ord_flag defGhcFlag "ddump-if-trace"- (setDumpFlag Opt_D_dump_if_trace)- , make_ord_flag defGhcFlag "ddump-cs-trace"- (setDumpFlag Opt_D_dump_cs_trace)- , make_ord_flag defGhcFlag "ddump-tc-trace"- (NoArg (do setDumpFlag' Opt_D_dump_tc_trace- setDumpFlag' Opt_D_dump_cs_trace))- , make_ord_flag defGhcFlag "ddump-ec-trace"- (setDumpFlag Opt_D_dump_ec_trace)- , make_ord_flag defGhcFlag "ddump-splices"- (setDumpFlag Opt_D_dump_splices)- , make_ord_flag defGhcFlag "dth-dec-file"- (setDumpFlag Opt_D_th_dec_file)-- , make_ord_flag defGhcFlag "ddump-rn-stats"- (setDumpFlag Opt_D_dump_rn_stats)- , make_ord_flag defGhcFlag "ddump-opt-cmm" --old alias for cmm-opt- (setDumpFlag Opt_D_dump_opt_cmm)- , make_ord_flag defGhcFlag "ddump-simpl-stats"- (setDumpFlag Opt_D_dump_simpl_stats)- , make_ord_flag defGhcFlag "ddump-bcos"- (setDumpFlag Opt_D_dump_BCOs)- , make_ord_flag defGhcFlag "dsource-stats"- (setDumpFlag Opt_D_source_stats)- , make_ord_flag defGhcFlag "dverbose-core2core"- (NoArg $ setVerbosity (Just 2) >> setDumpFlag' Opt_D_verbose_core2core)- , make_ord_flag defGhcFlag "dverbose-stg2stg"- (setDumpFlag Opt_D_verbose_stg2stg)- , make_ord_flag defGhcFlag "ddump-hi"- (setDumpFlag Opt_D_dump_hi)- , make_ord_flag defGhcFlag "ddump-minimal-imports"- (NoArg (setGeneralFlag Opt_D_dump_minimal_imports))- , make_ord_flag defGhcFlag "ddump-hpc"- (setDumpFlag Opt_D_dump_ticked) -- back compat- , make_ord_flag defGhcFlag "ddump-ticked"- (setDumpFlag Opt_D_dump_ticked)- , make_ord_flag defGhcFlag "ddump-mod-cycles"- (setDumpFlag Opt_D_dump_mod_cycles)- , make_ord_flag defGhcFlag "ddump-mod-map"- (setDumpFlag Opt_D_dump_mod_map)- , make_ord_flag defGhcFlag "ddump-timings"- (setDumpFlag Opt_D_dump_timings)- , make_ord_flag defGhcFlag "ddump-view-pattern-commoning"- (setDumpFlag Opt_D_dump_view_pattern_commoning)- , make_ord_flag defGhcFlag "ddump-to-file"- (NoArg (setGeneralFlag Opt_DumpToFile))- , make_ord_flag defGhcFlag "ddump-hi-diffs"- (setDumpFlag Opt_D_dump_hi_diffs)- , make_ord_flag defGhcFlag "ddump-rtti"- (setDumpFlag Opt_D_dump_rtti)- , make_ord_flag defGhcFlag "dlint"- (NoArg enableDLint)- , make_ord_flag defGhcFlag "dcore-lint"- (NoArg (setGeneralFlag Opt_DoCoreLinting))- , make_ord_flag defGhcFlag "dlinear-core-lint"- (NoArg (setGeneralFlag Opt_DoLinearCoreLinting))- , make_ord_flag defGhcFlag "dstg-lint"- (NoArg (setGeneralFlag Opt_DoStgLinting))- , make_ord_flag defGhcFlag "dcmm-lint"- (NoArg (setGeneralFlag Opt_DoCmmLinting))- , make_ord_flag defGhcFlag "dasm-lint"- (NoArg (setGeneralFlag Opt_DoAsmLinting))- , make_ord_flag defGhcFlag "dannot-lint"- (NoArg (setGeneralFlag Opt_DoAnnotationLinting))- , make_ord_flag defGhcFlag "dtag-inference-checks"- (NoArg (setGeneralFlag Opt_DoTagInferenceChecks))- , make_ord_flag defGhcFlag "dshow-passes"- (NoArg $ forceRecompile >> (setVerbosity $ Just 2))- , make_ord_flag defGhcFlag "dipe-stats"- (setDumpFlag Opt_D_ipe_stats)- , make_ord_flag defGhcFlag "dfaststring-stats"- (setDumpFlag Opt_D_faststring_stats)- , make_ord_flag defGhcFlag "dno-llvm-mangler"- (NoArg (setGeneralFlag Opt_NoLlvmMangler)) -- hidden flag- , make_ord_flag defGhcFlag "dno-typeable-binds"- (NoArg (setGeneralFlag Opt_NoTypeableBinds))- , make_ord_flag defGhcFlag "ddump-debug"- (setDumpFlag Opt_D_dump_debug)- , make_ord_flag defGhcFlag "ddump-json"- (setDumpFlag Opt_D_dump_json )- , make_ord_flag defGhcFlag "dppr-debug"- (setDumpFlag Opt_D_ppr_debug)- , make_ord_flag defGhcFlag "ddebug-output"- (noArg (flip dopt_unset Opt_D_no_debug_output))- , make_ord_flag defGhcFlag "dno-debug-output"- (setDumpFlag Opt_D_no_debug_output)-- , make_ord_flag defGhcFlag "ddump-faststrings"- (setDumpFlag Opt_D_dump_faststrings)-- ------ Machine dependent (-m<blah>) stuff ----------------------------- , make_ord_flag defGhcFlag "msse" (noArg (\d ->- d { sseVersion = Just SSE1 }))- , make_ord_flag defGhcFlag "msse2" (noArg (\d ->- d { sseVersion = Just SSE2 }))- , make_ord_flag defGhcFlag "msse3" (noArg (\d ->- d { sseVersion = Just SSE3 }))- , make_ord_flag defGhcFlag "msse4" (noArg (\d ->- d { sseVersion = Just SSE4 }))- , make_ord_flag defGhcFlag "msse4.2" (noArg (\d ->- d { sseVersion = Just SSE42 }))- , make_ord_flag defGhcFlag "mbmi" (noArg (\d ->- d { bmiVersion = Just BMI1 }))- , make_ord_flag defGhcFlag "mbmi2" (noArg (\d ->- d { bmiVersion = Just BMI2 }))- , make_ord_flag defGhcFlag "mavx" (noArg (\d -> d { avx = True }))- , make_ord_flag defGhcFlag "mavx2" (noArg (\d -> d { avx2 = True }))- , make_ord_flag defGhcFlag "mavx512cd" (noArg (\d ->- d { avx512cd = True }))- , make_ord_flag defGhcFlag "mavx512er" (noArg (\d ->- d { avx512er = True }))- , make_ord_flag defGhcFlag "mavx512f" (noArg (\d -> d { avx512f = True }))- , make_ord_flag defGhcFlag "mavx512pf" (noArg (\d ->- d { avx512pf = True }))-- ------ Warning opts -------------------------------------------------- , make_ord_flag defFlag "W" (NoArg (mapM_ setWarningFlag minusWOpts))- , make_ord_flag defFlag "Werror"- (NoArg (do { setGeneralFlag Opt_WarnIsError- ; mapM_ setFatalWarningFlag minusWeverythingOpts }))- , make_ord_flag defFlag "Wwarn"- (NoArg (do { unSetGeneralFlag Opt_WarnIsError- ; mapM_ unSetFatalWarningFlag minusWeverythingOpts }))- -- Opt_WarnIsError is still needed to pass -Werror- -- to CPP; see runCpp in SysTools- , make_dep_flag defFlag "Wnot" (NoArg (upd (\d ->- d {warningFlags = EnumSet.empty})))- "Use -w or -Wno-everything instead"- , make_ord_flag defFlag "w" (NoArg (upd (\d ->- d {warningFlags = EnumSet.empty})))-- -- New-style uniform warning sets- --- -- Note that -Weverything > -Wall > -Wextra > -Wdefault > -Wno-everything- , make_ord_flag defFlag "Weverything" (NoArg (mapM_- setWarningFlag minusWeverythingOpts))- , make_ord_flag defFlag "Wno-everything"- (NoArg (upd (\d -> d {warningFlags = EnumSet.empty})))-- , make_ord_flag defFlag "Wall" (NoArg (mapM_- setWarningFlag minusWallOpts))- , make_ord_flag defFlag "Wno-all" (NoArg (mapM_- unSetWarningFlag minusWallOpts))-- , make_ord_flag defFlag "Wextra" (NoArg (mapM_- setWarningFlag minusWOpts))- , make_ord_flag defFlag "Wno-extra" (NoArg (mapM_- unSetWarningFlag minusWOpts))-- , make_ord_flag defFlag "Wdefault" (NoArg (mapM_- setWarningFlag standardWarnings))- , make_ord_flag defFlag "Wno-default" (NoArg (mapM_- unSetWarningFlag standardWarnings))-- , make_ord_flag defFlag "Wcompat" (NoArg (mapM_- setWarningFlag minusWcompatOpts))- , make_ord_flag defFlag "Wno-compat" (NoArg (mapM_- unSetWarningFlag minusWcompatOpts))-- ------ Plugin flags ------------------------------------------------- , make_ord_flag defGhcFlag "fplugin-opt" (hasArg addPluginModuleNameOption)- , make_ord_flag defGhcFlag "fplugin-trustworthy"- (NoArg (setGeneralFlag Opt_PluginTrustworthy))- , make_ord_flag defGhcFlag "fplugin" (hasArg addPluginModuleName)- , make_ord_flag defGhcFlag "fclear-plugins" (noArg clearPluginModuleNames)- , make_ord_flag defGhcFlag "ffrontend-opt" (hasArg addFrontendPluginOption)-- , make_ord_flag defGhcFlag "fplugin-library" (hasArg addExternalPlugin)-- ------ Optimisation flags ------------------------------------------- , make_dep_flag defGhcFlag "Onot" (noArgM $ setOptLevel 0 )- "Use -O0 instead"- , make_ord_flag defGhcFlag "O" (optIntSuffixM (\mb_n ->- setOptLevel (mb_n `orElse` 1)))- -- If the number is missing, use 1-- , make_ord_flag defFlag "fbinary-blob-threshold"- (intSuffix (\n d -> d { binBlobThreshold = case fromIntegral n of- 0 -> Nothing- x -> Just x}))- , make_ord_flag defFlag "fmax-relevant-binds"- (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-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_dep_flag defGhcFlag "fllvm-pass-vectors-in-regs"- (noArg id)- "vectors registers are now passed in registers by default."- , make_ord_flag defFlag "fmax-uncovered-patterns"- (intSuffix (\n d -> d { maxUncoveredPatterns = n }))- , make_ord_flag defFlag "fmax-pmcheck-models"- (intSuffix (\n d -> d { maxPmCheckModels = n }))- , make_ord_flag defFlag "fsimplifier-phases"- (intSuffix (\n d -> d { simplPhases = n }))- , make_ord_flag defFlag "fmax-simplifier-iterations"- (intSuffix (\n d -> d { maxSimplIterations = n }))- , (Deprecated, defFlag "fmax-pmcheck-iterations"- (intSuffixM (\_ d ->- do { deprecate $ "use -fmax-pmcheck-models instead"- ; return d })))- , make_ord_flag defFlag "fsimpl-tick-factor"- (intSuffix (\n d -> d { simplTickFactor = n }))- , make_ord_flag defFlag "fdmd-unbox-width"- (intSuffix (\n d -> d { dmdUnboxWidth = n }))- , make_ord_flag defFlag "fspec-constr-threshold"- (intSuffix (\n d -> d { specConstrThreshold = Just n }))- , make_ord_flag defFlag "fno-spec-constr-threshold"- (noArg (\d -> d { specConstrThreshold = Nothing }))- , make_ord_flag defFlag "fspec-constr-count"- (intSuffix (\n d -> d { specConstrCount = Just n }))- , make_ord_flag defFlag "fno-spec-constr-count"- (noArg (\d -> d { specConstrCount = Nothing }))- , make_ord_flag defFlag "fspec-constr-recursive"- (intSuffix (\n d -> d { specConstrRecursive = n }))- , make_ord_flag defFlag "fliberate-case-threshold"- (intSuffix (\n d -> d { liberateCaseThreshold = Just n }))- , make_ord_flag defFlag "fno-liberate-case-threshold"- (noArg (\d -> d { liberateCaseThreshold = Nothing }))- , make_ord_flag defFlag "drule-check"- (sepArg (\s d -> d { ruleCheck = Just s }))- , make_ord_flag defFlag "dinline-check"- (sepArg (\s d -> d { unfoldingOpts = updateReportPrefix (Just s) (unfoldingOpts d)}))- , make_ord_flag defFlag "freduction-depth"- (intSuffix (\n d -> d { reductionDepth = treatZeroAsInf n }))- , make_ord_flag defFlag "fconstraint-solver-iterations"- (intSuffix (\n d -> d { solverIterations = treatZeroAsInf n }))- , (Deprecated, defFlag "fcontext-stack"- (intSuffixM (\n d ->- do { deprecate $ "use -freduction-depth=" ++ show n ++ " instead"- ; return $ d { reductionDepth = treatZeroAsInf n } })))- , (Deprecated, defFlag "ftype-function-depth"- (intSuffixM (\n d ->- do { deprecate $ "use -freduction-depth=" ++ show n ++ " instead"- ; return $ d { reductionDepth = treatZeroAsInf n } })))- , make_ord_flag defFlag "fstrictness-before"- (intSuffix (\n d -> d { strictnessBefore = n : strictnessBefore d }))- , make_ord_flag defFlag "ffloat-lam-args"- (intSuffix (\n d -> d { floatLamArgs = Just n }))- , make_ord_flag defFlag "ffloat-all-lams"- (noArg (\d -> d { floatLamArgs = Nothing }))- , make_ord_flag defFlag "fstg-lift-lams-rec-args"- (intSuffix (\n d -> d { liftLamsRecArgs = Just n }))- , make_ord_flag defFlag "fstg-lift-lams-rec-args-any"- (noArg (\d -> d { liftLamsRecArgs = Nothing }))- , make_ord_flag defFlag "fstg-lift-lams-non-rec-args"- (intSuffix (\n d -> d { liftLamsNonRecArgs = Just n }))- , make_ord_flag defFlag "fstg-lift-lams-non-rec-args-any"- (noArg (\d -> d { liftLamsNonRecArgs = Nothing }))- , make_ord_flag defFlag "fstg-lift-lams-known"- (noArg (\d -> d { liftLamsKnown = True }))- , make_ord_flag defFlag "fno-stg-lift-lams-known"- (noArg (\d -> d { liftLamsKnown = False }))- , make_ord_flag defFlag "fproc-alignment"- (intSuffix (\n d -> d { cmmProcAlignment = Just n }))- , make_ord_flag defFlag "fblock-layout-weights"- (HasArg (\s ->- upd (\d -> d { cfgWeights =- parseWeights s (cfgWeights d)})))- , make_ord_flag defFlag "fhistory-size"- (intSuffix (\n d -> d { historySize = n }))-- , make_ord_flag defFlag "funfolding-creation-threshold"- (intSuffix (\n d -> d { unfoldingOpts = updateCreationThreshold n (unfoldingOpts d)}))- , make_ord_flag defFlag "funfolding-use-threshold"- (intSuffix (\n d -> d { unfoldingOpts = updateUseThreshold n (unfoldingOpts d)}))- , make_ord_flag defFlag "funfolding-fun-discount"- (intSuffix (\n d -> d { unfoldingOpts = updateFunAppDiscount n (unfoldingOpts d)}))- , make_ord_flag defFlag "funfolding-dict-discount"- (intSuffix (\n d -> d { unfoldingOpts = updateDictDiscount n (unfoldingOpts d)}))-- , make_ord_flag defFlag "funfolding-case-threshold"- (intSuffix (\n d -> d { unfoldingOpts = updateCaseThreshold n (unfoldingOpts d)}))- , make_ord_flag defFlag "funfolding-case-scaling"- (intSuffix (\n d -> d { unfoldingOpts = updateCaseScaling n (unfoldingOpts d)}))-- , make_dep_flag defFlag "funfolding-keeness-factor"- (floatSuffix (\_ d -> d))- "-funfolding-keeness-factor is no longer respected as of GHC 9.0"-- , make_ord_flag defFlag "fmax-worker-args"- (intSuffix (\n d -> d {maxWorkerArgs = n}))- , make_ord_flag defGhciFlag "fghci-hist-size"- (intSuffix (\n d -> d {ghciHistSize = n}))- , make_ord_flag defGhcFlag "fmax-inline-alloc-size"- (intSuffix (\n d -> d { maxInlineAllocSize = n }))- , make_ord_flag defGhcFlag "fmax-inline-memcpy-insns"- (intSuffix (\n d -> d { maxInlineMemcpyInsns = n }))- , make_ord_flag defGhcFlag "fmax-inline-memset-insns"- (intSuffix (\n d -> d { maxInlineMemsetInsns = n }))- , make_ord_flag defGhcFlag "dinitial-unique"- (word64Suffix (\n d -> d { initialUnique = n }))- , make_ord_flag defGhcFlag "dunique-increment"- (intSuffix (\n d -> d { uniqueIncrement = n }))-- ------ Profiling ------------------------------------------------------ -- OLD profiling flags- , make_dep_flag defGhcFlag "auto-all"- (noArg (\d -> d { profAuto = ProfAutoAll } ))- "Use -fprof-auto instead"- , make_dep_flag defGhcFlag "no-auto-all"- (noArg (\d -> d { profAuto = NoProfAuto } ))- "Use -fno-prof-auto instead"- , make_dep_flag defGhcFlag "auto"- (noArg (\d -> d { profAuto = ProfAutoExports } ))- "Use -fprof-auto-exported instead"- , make_dep_flag defGhcFlag "no-auto"- (noArg (\d -> d { profAuto = NoProfAuto } ))- "Use -fno-prof-auto instead"- , make_dep_flag defGhcFlag "caf-all"- (NoArg (setGeneralFlag Opt_AutoSccsOnIndividualCafs))- "Use -fprof-cafs instead"- , make_dep_flag defGhcFlag "no-caf-all"- (NoArg (unSetGeneralFlag Opt_AutoSccsOnIndividualCafs))- "Use -fno-prof-cafs instead"-- -- NEW profiling flags- , make_ord_flag defGhcFlag "fprof-auto"- (noArg (\d -> d { profAuto = ProfAutoAll } ))- , make_ord_flag defGhcFlag "fprof-auto-top"- (noArg (\d -> d { profAuto = ProfAutoTop } ))- , make_ord_flag defGhcFlag "fprof-auto-exported"- (noArg (\d -> d { profAuto = ProfAutoExports } ))- , make_ord_flag defGhcFlag "fprof-auto-calls"- (noArg (\d -> d { profAuto = ProfAutoCalls } ))- , make_ord_flag defGhcFlag "fno-prof-auto"- (noArg (\d -> d { profAuto = NoProfAuto } ))-- -- Caller-CC- , make_ord_flag defGhcFlag "fprof-callers"- (HasArg setCallerCcFilters)- ------ Compiler flags ------------------------------------------------- , make_ord_flag defGhcFlag "fasm" (NoArg (setObjBackend ncgBackend))- , make_ord_flag defGhcFlag "fvia-c" (NoArg- (deprecate $ "The -fvia-c flag does nothing; " ++- "it will be removed in a future GHC release"))- , make_ord_flag defGhcFlag "fvia-C" (NoArg- (deprecate $ "The -fvia-C flag does nothing; " ++- "it will be removed in a future GHC release"))- , make_ord_flag defGhcFlag "fllvm" (NoArg (setObjBackend llvmBackend))-- , make_ord_flag defFlag "fno-code" (NoArg ((upd $ \d ->- d { ghcLink=NoLink }) >> setBackend noBackend))- , make_ord_flag defFlag "fbyte-code"- (noArgM $ \dflags -> do- setBackend interpreterBackend- pure $ flip gopt_unset Opt_ByteCodeAndObjectCode (gopt_set dflags Opt_ByteCode))- , make_ord_flag defFlag "fobject-code" $ noArgM $ \dflags -> do- setBackend $ platformDefaultBackend (targetPlatform dflags)- dflags' <- liftEwM getCmdLineState- pure $ gopt_unset dflags' Opt_ByteCodeAndObjectCode-- , make_dep_flag defFlag "fglasgow-exts"- (NoArg enableGlasgowExts) "Use individual extensions instead"- , make_dep_flag defFlag "fno-glasgow-exts"- (NoArg disableGlasgowExts) "Use individual extensions instead"- , make_ord_flag defFlag "Wunused-binds" (NoArg enableUnusedBinds)- , make_ord_flag defFlag "Wno-unused-binds" (NoArg disableUnusedBinds)- , make_ord_flag defHiddenFlag "fwarn-unused-binds" (NoArg enableUnusedBinds)- , make_ord_flag defHiddenFlag "fno-warn-unused-binds" (NoArg- disableUnusedBinds)-- ------ Safe Haskell flags -------------------------------------------- , make_ord_flag defFlag "fpackage-trust" (NoArg setPackageTrust)- , make_ord_flag defFlag "fno-safe-infer" (noArg (\d ->- d { safeInfer = False }))- , make_ord_flag defFlag "fno-safe-haskell" (NoArg (setSafeHaskell Sf_Ignore))-- ------ position independent flags ----------------------------------- , make_ord_flag defGhcFlag "fPIC" (NoArg (setGeneralFlag Opt_PIC))- , make_ord_flag defGhcFlag "fno-PIC" (NoArg (unSetGeneralFlag Opt_PIC))- , make_ord_flag defGhcFlag "fPIE" (NoArg (setGeneralFlag Opt_PIE))- , make_ord_flag defGhcFlag "fno-PIE" (NoArg (unSetGeneralFlag Opt_PIE))-- ------ Debugging flags ----------------------------------------------- , make_ord_flag defGhcFlag "g" (OptIntSuffix setDebugLevel)- ]- ++ map (mkFlag turnOn "" setGeneralFlag ) negatableFlagsDeps- ++ map (mkFlag turnOff "no-" unSetGeneralFlag ) negatableFlagsDeps- ++ map (mkFlag turnOn "d" setGeneralFlag ) dFlagsDeps- ++ map (mkFlag turnOff "dno-" unSetGeneralFlag ) dFlagsDeps- ++ map (mkFlag turnOn "f" setGeneralFlag ) fFlagsDeps- ++ map (mkFlag turnOff "fno-" unSetGeneralFlag ) fFlagsDeps- ++ map (mkFlag turnOn "W" setWarningFlag ) wWarningFlagsDeps- ++ map (mkFlag turnOff "Wno-" unSetWarningFlag ) wWarningFlagsDeps- ++ map (mkFlag turnOn "Werror=" setWErrorFlag ) wWarningFlagsDeps- ++ map (mkFlag turnOn "Wwarn=" unSetFatalWarningFlag )- wWarningFlagsDeps- ++ map (mkFlag turnOn "Wno-error=" unSetFatalWarningFlag )- wWarningFlagsDeps- ++ map (mkFlag turnOn "fwarn-" setWarningFlag . hideFlag)- wWarningFlagsDeps- ++ map (mkFlag turnOff "fno-warn-" unSetWarningFlag . hideFlag)- wWarningFlagsDeps- ++ [ (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- ++ map (mkFlag turnOff "XNo" unSetExtensionFlag) xFlagsDeps- ++ map (mkFlag turnOn "X" setLanguage ) languageFlagsDeps- ++ map (mkFlag turnOn "X" setSafeHaskell ) safeHaskellFlagsDeps---- | This is where we handle unrecognised warning flags. We only issue a warning--- if -Wunrecognised-warning-flags is set. See #11429 for context.-unrecognisedWarning :: String -> Flag (CmdLineP DynFlags)-unrecognisedWarning prefix = defHiddenFlag prefix (Prefix action)- where- action :: String -> EwM (CmdLineP DynFlags) ()- action flag = do- f <- wopt Opt_WarnUnrecognisedWarningFlags <$> liftEwM getCmdLineState- when f $ addFlagWarn (WarningWithFlag Opt_WarnUnrecognisedWarningFlags) $- "unrecognised warning flag: -" ++ prefix ++ flag---- See Note [Supporting CLI completion]-package_flags_deps :: [(Deprecation, Flag (CmdLineP DynFlags))]-package_flags_deps = [- ------- Packages ----------------------------------------------------- make_ord_flag defFlag "package-db"- (HasArg (addPkgDbRef . PkgDbPath))- , make_ord_flag defFlag "clear-package-db" (NoArg clearPkgDb)- , make_ord_flag defFlag "no-global-package-db" (NoArg removeGlobalPkgDb)- , make_ord_flag defFlag "no-user-package-db" (NoArg removeUserPkgDb)- , make_ord_flag defFlag "global-package-db"- (NoArg (addPkgDbRef GlobalPkgDb))- , make_ord_flag defFlag "user-package-db"- (NoArg (addPkgDbRef UserPkgDb))- -- backwards compat with GHC<=7.4 :- , make_dep_flag defFlag "package-conf"- (HasArg $ addPkgDbRef . PkgDbPath) "Use -package-db instead"- , make_dep_flag defFlag "no-user-package-conf"- (NoArg removeUserPkgDb) "Use -no-user-package-db instead"- , make_ord_flag defGhcFlag "package-name" (HasArg $ \name ->- upd (setUnitId name))- , make_ord_flag defGhcFlag "this-unit-id" (hasArg setUnitId)-- , make_ord_flag defGhcFlag "working-dir" (hasArg setWorkingDirectory)- , make_ord_flag defGhcFlag "this-package-name" (hasArg setPackageName)- , make_ord_flag defGhcFlag "hidden-module" (HasArg addHiddenModule)- , make_ord_flag defGhcFlag "reexported-module" (HasArg addReexportedModule)-- , make_ord_flag defFlag "package" (HasArg exposePackage)- , make_ord_flag defFlag "plugin-package-id" (HasArg exposePluginPackageId)- , make_ord_flag defFlag "plugin-package" (HasArg exposePluginPackage)- , make_ord_flag defFlag "package-id" (HasArg exposePackageId)- , make_ord_flag defFlag "hide-package" (HasArg hidePackage)- , make_ord_flag defFlag "hide-all-packages"- (NoArg (setGeneralFlag Opt_HideAllPackages))- , make_ord_flag defFlag "hide-all-plugin-packages"- (NoArg (setGeneralFlag Opt_HideAllPluginPackages))- , make_ord_flag defFlag "package-env" (HasArg setPackageEnv)- , make_ord_flag defFlag "ignore-package" (HasArg ignorePackage)- , make_dep_flag defFlag "syslib" (HasArg exposePackage) "Use -package instead"- , make_ord_flag defFlag "distrust-all-packages"- (NoArg (setGeneralFlag Opt_DistrustAllPackages))- , make_ord_flag defFlag "trust" (HasArg trustPackage)- , make_ord_flag defFlag "distrust" (HasArg distrustPackage)- ]- where- setPackageEnv env = upd $ \s -> s { packageEnv = Just env }---- | Make a list of flags for shell completion.--- Filter all available flags into two groups, for interactive GHC vs all other.-flagsForCompletion :: Bool -> [String]-flagsForCompletion isInteractive- = [ '-':flagName flag- | flag <- flagsAll- , modeFilter (flagGhcMode flag)- ]- where- modeFilter AllModes = True- modeFilter OnlyGhci = isInteractive- modeFilter OnlyGhc = not isInteractive- modeFilter HiddenFlag = False--type TurnOnFlag = Bool -- True <=> we are turning the flag on- -- False <=> we are turning the flag off-turnOn :: TurnOnFlag; turnOn = True-turnOff :: TurnOnFlag; turnOff = False--data FlagSpec flag- = FlagSpec- { flagSpecName :: String -- ^ Flag in string form- , flagSpecFlag :: flag -- ^ Flag in internal form- , flagSpecAction :: (TurnOnFlag -> DynP ())- -- ^ Extra action to run when the flag is found- -- Typically, emit a warning or error- , flagSpecGhcMode :: GhcFlagMode- -- ^ In which ghc mode the flag has effect- }---- | Define a new flag.-flagSpec :: String -> flag -> (Deprecation, FlagSpec flag)-flagSpec name flag = flagSpec' name flag nop---- | Define a new flag with an effect.-flagSpec' :: String -> flag -> (TurnOnFlag -> DynP ())- -> (Deprecation, FlagSpec flag)-flagSpec' name flag act = (NotDeprecated, FlagSpec name flag act AllModes)---- | Define a warning flag.-warnSpec :: WarningFlag -> [(Deprecation, FlagSpec WarningFlag)]-warnSpec flag = warnSpec' flag nop---- | Define a warning flag with an effect.-warnSpec' :: WarningFlag -> (TurnOnFlag -> DynP ())- -> [(Deprecation, FlagSpec WarningFlag)]-warnSpec' flag act = [ (NotDeprecated, FlagSpec name flag act AllModes)- | name <- NE.toList (warnFlagNames flag)- ]---- | Define a new deprecated flag with an effect.-depFlagSpecOp :: String -> flag -> (TurnOnFlag -> DynP ()) -> String- -> (Deprecation, FlagSpec flag)-depFlagSpecOp name flag act dep =- (Deprecated, snd (flagSpec' name flag (\f -> act f >> deprecate dep)))---- | Define a new deprecated flag.-depFlagSpec :: String -> flag -> String- -> (Deprecation, FlagSpec flag)-depFlagSpec name flag dep = depFlagSpecOp name flag nop dep---- | Define a deprecated warning flag.-depWarnSpec :: WarningFlag -> String- -> [(Deprecation, FlagSpec WarningFlag)]-depWarnSpec flag dep = [ depFlagSpecOp name flag nop dep- | name <- NE.toList (warnFlagNames flag)- ]---- | Define a deprecated warning name substituted by another.-subWarnSpec :: String -> WarningFlag -> String- -> [(Deprecation, FlagSpec WarningFlag)]-subWarnSpec oldname flag dep = [ depFlagSpecOp oldname flag nop dep ]----- | Define a new deprecated flag with an effect where the deprecation message--- depends on the flag value-depFlagSpecOp' :: String- -> flag- -> (TurnOnFlag -> DynP ())- -> (TurnOnFlag -> String)- -> (Deprecation, FlagSpec flag)-depFlagSpecOp' name flag act dep =- (Deprecated, FlagSpec name flag (\f -> act f >> (deprecate $ dep f))- AllModes)---- | Define a new deprecated flag where the deprecation message--- depends on the flag value-depFlagSpec' :: String- -> flag- -> (TurnOnFlag -> String)- -> (Deprecation, FlagSpec flag)-depFlagSpec' name flag dep = depFlagSpecOp' name flag nop dep----- | Define a new deprecated flag where the deprecation message--- is shown depending on the flag value-depFlagSpecCond :: String- -> flag- -> (TurnOnFlag -> Bool)- -> String- -> (Deprecation, FlagSpec flag)-depFlagSpecCond name flag cond dep =- (Deprecated, FlagSpec name flag (\f -> when (cond f) $ deprecate dep)- AllModes)---- | Define a new flag for GHCi.-flagGhciSpec :: String -> flag -> (Deprecation, FlagSpec flag)-flagGhciSpec name flag = flagGhciSpec' name flag nop---- | Define a new flag for GHCi with an effect.-flagGhciSpec' :: String -> flag -> (TurnOnFlag -> DynP ())- -> (Deprecation, FlagSpec flag)-flagGhciSpec' name flag act = (NotDeprecated, FlagSpec name flag act OnlyGhci)---- | Define a new flag invisible to CLI completion.-flagHiddenSpec :: String -> flag -> (Deprecation, FlagSpec flag)-flagHiddenSpec name flag = flagHiddenSpec' name flag nop---- | Define a new flag invisible to CLI completion with an effect.-flagHiddenSpec' :: String -> flag -> (TurnOnFlag -> DynP ())- -> (Deprecation, FlagSpec flag)-flagHiddenSpec' name flag act = (NotDeprecated, FlagSpec name flag act- HiddenFlag)---- | Hide a 'FlagSpec' from being displayed in @--show-options@.------ This is for example useful for flags that are obsolete, but should not--- (yet) be deprecated for compatibility reasons.-hideFlag :: (Deprecation, FlagSpec a) -> (Deprecation, FlagSpec a)-hideFlag (dep, fs) = (dep, fs { flagSpecGhcMode = HiddenFlag })--mkFlag :: TurnOnFlag -- ^ True <=> it should be turned on- -> String -- ^ The flag prefix- -> (flag -> DynP ()) -- ^ What to do when the flag is found- -> (Deprecation, FlagSpec flag) -- ^ Specification of- -- this particular flag- -> (Deprecation, Flag (CmdLineP DynFlags))-mkFlag turn_on flagPrefix f (dep, (FlagSpec name flag extra_action mode))- = (dep,- Flag (flagPrefix ++ name) (NoArg (f flag >> extra_action turn_on)) mode)---- here to avoid module cycle with GHC.Driver.CmdLine-deprecate :: Monad m => String -> EwM m ()-deprecate s = do- arg <- getArg- addFlagWarn (WarningWithFlag Opt_WarnDeprecatedFlags) (arg ++ " is deprecated: " ++ s)--deprecatedForExtension :: String -> TurnOnFlag -> String-deprecatedForExtension lang turn_on- = "use -X" ++ flag ++- " or pragma {-# LANGUAGE " ++ flag ++ " #-} instead"- where- flag | turn_on = lang- | otherwise = "No" ++ lang--deprecatedForExtensions :: [String] -> TurnOnFlag -> String-deprecatedForExtensions [] _ = panic "new extension has not been specified"-deprecatedForExtensions [lang] turn_on = deprecatedForExtension lang turn_on-deprecatedForExtensions langExts turn_on- = "use " ++ xExt flags ++ " instead"- where- flags | turn_on = langExts- | otherwise = ("No" ++) <$> langExts-- xExt fls = intercalate " and " $ (\flag -> "-X" ++ flag) <$> fls--useInstead :: String -> String -> TurnOnFlag -> String-useInstead prefix flag turn_on- = "Use " ++ prefix ++ no ++ flag ++ " instead"- where- no = if turn_on then "" else "no-"--nop :: TurnOnFlag -> DynP ()-nop _ = return ()---- | Find the 'FlagSpec' for a 'WarningFlag'.-flagSpecOf :: WarningFlag -> Maybe (FlagSpec WarningFlag)-flagSpecOf = flip Map.lookup wWarningFlagMap--wWarningFlagMap :: Map.Map WarningFlag (FlagSpec WarningFlag)-wWarningFlagMap = Map.fromListWith (\_ x -> x) $ map (flagSpecFlag &&& id) wWarningFlags---- | These @-W\<blah\>@ flags can all be reversed with @-Wno-\<blah\>@-wWarningFlags :: [FlagSpec WarningFlag]-wWarningFlags = map snd (sortBy (comparing fst) wWarningFlagsDeps)--wWarningFlagsDeps :: [(Deprecation, FlagSpec WarningFlag)]-wWarningFlagsDeps = [minBound..maxBound] >>= \x -> case x of--- See Note [Updating flag description in the User's Guide]--- See Note [Supporting CLI completion]--- Please keep the list of flags below sorted alphabetically- Opt_WarnAlternativeLayoutRuleTransitional -> warnSpec x- Opt_WarnAmbiguousFields -> warnSpec x- Opt_WarnAutoOrphans- -> depWarnSpec x "it has no effect"- Opt_WarnCPPUndef -> warnSpec x- Opt_WarnUnbangedStrictPatterns -> warnSpec x- Opt_WarnDeferredTypeErrors -> warnSpec x- Opt_WarnDeferredOutOfScopeVariables -> warnSpec x- Opt_WarnWarningsDeprecations -> warnSpec x- Opt_WarnDeprecatedFlags -> warnSpec x- Opt_WarnDerivingDefaults -> warnSpec x- Opt_WarnDerivingTypeable -> warnSpec x- Opt_WarnDodgyExports -> warnSpec x- Opt_WarnDodgyForeignImports -> warnSpec x- Opt_WarnDodgyImports -> warnSpec x- Opt_WarnEmptyEnumerations -> warnSpec x- Opt_WarnDuplicateConstraints- -> subWarnSpec "duplicate-constraints" x "it is subsumed by -Wredundant-constraints"- Opt_WarnRedundantConstraints -> warnSpec x- Opt_WarnDuplicateExports -> warnSpec x- Opt_WarnHiShadows- -> depWarnSpec x "it is not used and was never implemented"- Opt_WarnInaccessibleCode -> warnSpec x- Opt_WarnImplicitPrelude -> warnSpec x- Opt_WarnImplicitKindVars- -> depWarnSpec x "it is now an error"- Opt_WarnIncompletePatterns -> warnSpec x- Opt_WarnIncompletePatternsRecUpd -> warnSpec x- Opt_WarnIncompleteUniPatterns -> warnSpec x- Opt_WarnInlineRuleShadowing -> warnSpec x- Opt_WarnIdentities -> warnSpec x- Opt_WarnLoopySuperclassSolve -> warnSpec x- Opt_WarnMissingFields -> warnSpec x- Opt_WarnMissingImportList -> warnSpec x- Opt_WarnMissingExportList -> warnSpec x- Opt_WarnMissingLocalSignatures- -> subWarnSpec "missing-local-sigs" x "it is replaced by -Wmissing-local-signatures"- ++ warnSpec x- Opt_WarnMissingMethods -> warnSpec x- Opt_WarnMissingMonadFailInstances- -> depWarnSpec x "fail is no longer a method of Monad"- Opt_WarnSemigroup -> warnSpec x- Opt_WarnMissingSignatures -> warnSpec x- Opt_WarnMissingKindSignatures -> warnSpec x- Opt_WarnMissingExportedSignatures- -> subWarnSpec "missing-exported-sigs" x "it is replaced by -Wmissing-exported-signatures"- ++ warnSpec x- Opt_WarnMonomorphism -> warnSpec x- Opt_WarnNameShadowing -> warnSpec x- Opt_WarnNonCanonicalMonadInstances -> warnSpec x- Opt_WarnNonCanonicalMonadFailInstances- -> depWarnSpec x "fail is no longer a method of Monad"- Opt_WarnNonCanonicalMonoidInstances -> warnSpec x- Opt_WarnOrphans -> warnSpec x- Opt_WarnOverflowedLiterals -> warnSpec x- Opt_WarnOverlappingPatterns -> warnSpec x- Opt_WarnMissedSpecs -> warnSpec x- Opt_WarnAllMissedSpecs -> warnSpec x- Opt_WarnSafe -> warnSpec' x setWarnSafe- Opt_WarnTrustworthySafe -> warnSpec x- Opt_WarnInferredSafeImports -> warnSpec x- Opt_WarnMissingSafeHaskellMode -> warnSpec x- Opt_WarnTabs -> warnSpec x- Opt_WarnTypeDefaults -> warnSpec x- Opt_WarnTypedHoles -> warnSpec x- Opt_WarnPartialTypeSignatures -> warnSpec x- Opt_WarnUnrecognisedPragmas -> warnSpec x- Opt_WarnMisplacedPragmas -> warnSpec x- Opt_WarnUnsafe -> warnSpec' x setWarnUnsafe- Opt_WarnUnsupportedCallingConventions -> warnSpec x- Opt_WarnUnsupportedLlvmVersion -> warnSpec x- Opt_WarnMissedExtraSharedLib -> warnSpec x- Opt_WarnUntickedPromotedConstructors -> warnSpec x- Opt_WarnUnusedDoBind -> warnSpec x- Opt_WarnUnusedForalls -> warnSpec x- Opt_WarnUnusedImports -> warnSpec x- Opt_WarnUnusedLocalBinds -> warnSpec x- Opt_WarnUnusedMatches -> warnSpec x- Opt_WarnUnusedPatternBinds -> warnSpec x- Opt_WarnUnusedTopBinds -> warnSpec x- Opt_WarnUnusedTypePatterns -> warnSpec x- Opt_WarnUnusedRecordWildcards -> warnSpec x- Opt_WarnRedundantBangPatterns -> warnSpec x- Opt_WarnRedundantRecordWildcards -> warnSpec x- Opt_WarnRedundantStrictnessFlags -> warnSpec x- Opt_WarnWrongDoBind -> warnSpec x- Opt_WarnMissingPatternSynonymSignatures -> warnSpec x- Opt_WarnMissingDerivingStrategies -> warnSpec x- Opt_WarnSimplifiableClassConstraints -> warnSpec x- Opt_WarnMissingHomeModules -> warnSpec x- Opt_WarnUnrecognisedWarningFlags -> warnSpec x- Opt_WarnStarBinder -> warnSpec x- Opt_WarnStarIsType -> warnSpec x- Opt_WarnSpaceAfterBang- -> depWarnSpec x "bang patterns can no longer be written with a space"- Opt_WarnPartialFields -> warnSpec x- Opt_WarnPrepositiveQualifiedModule -> warnSpec x- Opt_WarnUnusedPackages -> warnSpec x- Opt_WarnCompatUnqualifiedImports -> warnSpec x- Opt_WarnInvalidHaddock -> warnSpec x- Opt_WarnOperatorWhitespaceExtConflict -> warnSpec x- Opt_WarnOperatorWhitespace -> warnSpec x- Opt_WarnImplicitLift -> warnSpec x- Opt_WarnMissingExportedPatternSynonymSignatures -> warnSpec x- Opt_WarnForallIdentifier -> warnSpec x- Opt_WarnUnicodeBidirectionalFormatCharacters -> warnSpec x- Opt_WarnGADTMonoLocalBinds -> warnSpec x- Opt_WarnTypeEqualityOutOfScope -> warnSpec x- Opt_WarnTypeEqualityRequiresOperators -> warnSpec x---- | These @-\<blah\>@ flags can all be reversed with @-no-\<blah\>@-negatableFlagsDeps :: [(Deprecation, FlagSpec GeneralFlag)]-negatableFlagsDeps = [- flagGhciSpec "ignore-dot-ghci" Opt_IgnoreDotGhci ]---- | These @-d\<blah\>@ flags can all be reversed with @-dno-\<blah\>@-dFlagsDeps :: [(Deprecation, FlagSpec GeneralFlag)]-dFlagsDeps = [--- 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 "ppr-case-as-let" Opt_PprCaseAsLet,- depFlagSpec' "ppr-ticks" Opt_PprShowTicks- (\turn_on -> useInstead "-d" "suppress-ticks" (not turn_on)),- flagSpec "suppress-ticks" Opt_SuppressTicks,- depFlagSpec' "suppress-stg-free-vars" Opt_SuppressStgExts- (useInstead "-d" "suppress-stg-exts"),- flagSpec "suppress-stg-exts" Opt_SuppressStgExts,- flagSpec "suppress-stg-reps" Opt_SuppressStgReps,- flagSpec "suppress-coercions" Opt_SuppressCoercions,- flagSpec "suppress-coercion-types" Opt_SuppressCoercionTypes,- 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-core-sizes" Opt_SuppressCoreSizes- ]---- | These @-f\<blah\>@ flags can all be reversed with @-fno-\<blah\>@-fFlags :: [FlagSpec GeneralFlag]-fFlags = map snd fFlagsDeps--fFlagsDeps :: [(Deprecation, FlagSpec GeneralFlag)]-fFlagsDeps = [--- See Note [Updating flag description in the User's Guide]--- See Note [Supporting CLI completion]--- Please keep the list of flags below sorted alphabetically- depFlagSpec "asm-shortcutting" Opt_AsmShortcutting- "this flag is disabled on this ghc version due to unsoundness concerns (https://gitlab.haskell.org/ghc/ghc/-/issues/24507)",- flagGhciSpec "break-on-error" Opt_BreakOnError,- flagGhciSpec "break-on-exception" Opt_BreakOnException,- flagSpec "building-cabal-package" Opt_BuildingCabalPackage,- flagSpec "call-arity" Opt_CallArity,- flagSpec "exitification" Opt_Exitification,- flagSpec "case-merge" Opt_CaseMerge,- flagSpec "case-folding" Opt_CaseFolding,- flagSpec "cmm-elim-common-blocks" Opt_CmmElimCommonBlocks,- flagSpec "cmm-sink" Opt_CmmSink,- flagSpec "cmm-static-pred" Opt_CmmStaticPred,- flagSpec "cse" Opt_CSE,- flagSpec "stg-cse" Opt_StgCSE,- flagSpec "stg-lift-lams" Opt_StgLiftLams,- flagSpec "cpr-anal" Opt_CprAnal,- flagSpec "defer-diagnostics" Opt_DeferDiagnostics,- flagSpec "defer-type-errors" Opt_DeferTypeErrors,- flagSpec "defer-typed-holes" Opt_DeferTypedHoles,- flagSpec "defer-out-of-scope-variables" Opt_DeferOutOfScopeVariables,- flagSpec "diagnostics-show-caret" Opt_DiagnosticsShowCaret,- -- With-ways needs to be reversible hence why its made via flagSpec unlike- -- other debugging flags.- flagSpec "dump-with-ways" Opt_DumpWithWays,- flagSpec "dicts-cheap" Opt_DictsCheap,- flagSpec "dicts-strict" Opt_DictsStrict,- depFlagSpec "dmd-tx-dict-sel"- Opt_DmdTxDictSel "effect is now unconditionally enabled",- flagSpec "do-eta-reduction" Opt_DoEtaReduction,- flagSpec "do-lambda-eta-expansion" Opt_DoLambdaEtaExpansion,- flagSpec "eager-blackholing" Opt_EagerBlackHoling,- flagSpec "embed-manifest" Opt_EmbedManifest,- flagSpec "enable-rewrite-rules" Opt_EnableRewriteRules,- flagSpec "enable-th-splice-warnings" Opt_EnableThSpliceWarnings,- flagSpec "error-spans" Opt_ErrorSpans,- flagSpec "excess-precision" Opt_ExcessPrecision,- flagSpec "expose-all-unfoldings" Opt_ExposeAllUnfoldings,- flagSpec "expose-internal-symbols" Opt_ExposeInternalSymbols,- flagSpec "external-dynamic-refs" Opt_ExternalDynamicRefs,- flagSpec "external-interpreter" Opt_ExternalInterpreter,- flagSpec "family-application-cache" Opt_FamAppCache,- flagSpec "float-in" Opt_FloatIn,- flagSpec "force-recomp" Opt_ForceRecomp,- flagSpec "ignore-optim-changes" Opt_IgnoreOptimChanges,- flagSpec "ignore-hpc-changes" Opt_IgnoreHpcChanges,- flagSpec "full-laziness" Opt_FullLaziness,- depFlagSpec' "fun-to-thunk" Opt_FunToThunk- (useInstead "-f" "full-laziness"),- flagSpec "local-float-out" Opt_LocalFloatOut,- flagSpec "local-float-out-top-level" Opt_LocalFloatOutTopLevel,- flagSpec "gen-manifest" Opt_GenManifest,- flagSpec "ghci-history" Opt_GhciHistory,- flagSpec "ghci-leak-check" Opt_GhciLeakCheck,- flagSpec "validate-ide-info" Opt_ValidateHie,- 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,- flagSpec "ignore-asserts" Opt_IgnoreAsserts,- flagSpec "ignore-interface-pragmas" Opt_IgnoreInterfacePragmas,- flagGhciSpec "implicit-import-qualified" Opt_ImplicitImportQualified,- flagSpec "irrefutable-tuples" Opt_IrrefutableTuples,- flagSpec "keep-going" Opt_KeepGoing,- flagSpec "late-dmd-anal" Opt_LateDmdAnal,- flagSpec "late-specialise" Opt_LateSpecialise,- flagSpec "liberate-case" Opt_LiberateCase,- flagHiddenSpec "llvm-tbaa" Opt_LlvmTBAA,- flagHiddenSpec "llvm-fill-undef-with-garbage" Opt_LlvmFillUndefWithGarbage,- flagSpec "loopification" Opt_Loopification,- flagSpec "block-layout-cfg" Opt_CfgBlocklayout,- flagSpec "block-layout-weightless" Opt_WeightlessBlocklayout,- flagSpec "omit-interface-pragmas" Opt_OmitInterfacePragmas,- flagSpec "omit-yields" Opt_OmitYields,- flagSpec "optimal-applicative-do" Opt_OptimalApplicativeDo,- flagSpec "pedantic-bottoms" Opt_PedanticBottoms,- flagSpec "pre-inlining" Opt_SimplPreInlining,- flagGhciSpec "print-bind-contents" Opt_PrintBindContents,- flagGhciSpec "print-bind-result" Opt_PrintBindResult,- flagGhciSpec "print-evld-with-show" Opt_PrintEvldWithShow,- flagSpec "print-explicit-foralls" Opt_PrintExplicitForalls,- flagSpec "print-explicit-kinds" Opt_PrintExplicitKinds,- flagSpec "print-explicit-coercions" Opt_PrintExplicitCoercions,- flagSpec "print-explicit-runtime-reps" Opt_PrintExplicitRuntimeReps,- flagSpec "print-equality-relations" Opt_PrintEqualityRelations,- flagSpec "print-axiom-incomps" Opt_PrintAxiomIncomps,- flagSpec "print-unicode-syntax" Opt_PrintUnicodeSyntax,- flagSpec "print-expanded-synonyms" Opt_PrintExpandedSynonyms,- flagSpec "print-potential-instances" Opt_PrintPotentialInstances,- flagSpec "print-redundant-promotion-ticks" Opt_PrintRedundantPromotionTicks,- flagSpec "print-typechecker-elaboration" Opt_PrintTypecheckerElaboration,- flagSpec "prof-cafs" Opt_AutoSccsOnIndividualCafs,- flagSpec "prof-count-entries" Opt_ProfCountEntries,- flagSpec "prof-late" Opt_ProfLateCcs,- flagSpec "prof-manual" Opt_ProfManualCcs,- flagSpec "prof-late-inline" Opt_ProfLateInlineCcs,- flagSpec "regs-graph" Opt_RegsGraph,- flagSpec "regs-iterative" Opt_RegsIterative,- depFlagSpec' "rewrite-rules" Opt_EnableRewriteRules- (useInstead "-f" "enable-rewrite-rules"),- flagSpec "shared-implib" Opt_SharedImplib,- flagSpec "spec-constr" Opt_SpecConstr,- flagSpec "spec-constr-keen" Opt_SpecConstrKeen,- flagSpec "specialise" Opt_Specialise,- flagSpec "specialize" Opt_Specialise,- flagSpec "specialise-aggressively" Opt_SpecialiseAggressively,- flagSpec "specialize-aggressively" Opt_SpecialiseAggressively,- flagSpec "cross-module-specialise" Opt_CrossModuleSpecialise,- flagSpec "cross-module-specialize" Opt_CrossModuleSpecialise,- flagSpec "polymorphic-specialisation" Opt_PolymorphicSpecialisation,- flagSpec "inline-generics" Opt_InlineGenerics,- flagSpec "inline-generics-aggressively" Opt_InlineGenericsAggressively,- flagSpec "static-argument-transformation" Opt_StaticArgumentTransformation,- flagSpec "strictness" Opt_Strictness,- flagSpec "use-rpaths" Opt_RPath,- flagSpec "write-interface" Opt_WriteInterface,- flagSpec "write-if-simplified-core" Opt_WriteIfSimplifiedCore,- flagSpec "write-ide-info" Opt_WriteHie,- flagSpec "unbox-small-strict-fields" Opt_UnboxSmallStrictFields,- flagSpec "unbox-strict-fields" Opt_UnboxStrictFields,- flagSpec "version-macros" Opt_VersionMacros,- flagSpec "worker-wrapper" Opt_WorkerWrapper,- flagSpec "worker-wrapper-cbv" Opt_WorkerWrapperUnlift, -- See Note [Worker/wrapper for strict arguments]- flagSpec "solve-constant-dicts" Opt_SolveConstantDicts,- flagSpec "catch-nonexhaustive-cases" Opt_CatchNonexhaustiveCases,- flagSpec "alignment-sanitisation" Opt_AlignmentSanitisation,- flagSpec "check-prim-bounds" Opt_DoBoundsChecking,- flagSpec "num-constant-folding" Opt_NumConstantFolding,- flagSpec "core-constant-folding" Opt_CoreConstantFolding,- flagSpec "fast-pap-calls" Opt_FastPAPCalls,- flagSpec "spec-eval" Opt_SpecEval,- flagSpec "spec-eval-dictfun" Opt_SpecEvalDictFun,- flagSpec "cmm-control-flow" Opt_CmmControlFlow,- flagSpec "show-warning-groups" Opt_ShowWarnGroups,- flagSpec "hide-source-paths" Opt_HideSourcePaths,- flagSpec "show-loaded-modules" Opt_ShowLoadedModules,- flagSpec "whole-archive-hs-libs" Opt_WholeArchiveHsLibs,- flagSpec "keep-cafs" Opt_KeepCAFs,- flagSpec "link-rts" Opt_LinkRts,- flagSpec "byte-code-and-object-code" Opt_ByteCodeAndObjectCode,- flagSpec "prefer-byte-code" Opt_UseBytecodeRatherThanObjects,- flagSpec' "compact-unwind" Opt_CompactUnwind- (\turn_on -> updM (\dflags -> do- unless (platformOS (targetPlatform dflags) == OSDarwin && turn_on)- (addWarn "-compact-unwind is only implemented by the darwin platform. Ignoring.")- return dflags)),- flagSpec "show-error-context" Opt_ShowErrorContext,- flagSpec "cmm-thread-sanitizer" Opt_CmmThreadSanitizer,- flagSpec "split-sections" Opt_SplitSections,- flagSpec "distinct-constructor-tables" Opt_DistinctConstructorTables,- flagSpec "info-table-map" Opt_InfoTableMap,- flagSpec "info-table-map-with-stack" Opt_InfoTableMapWithStack,- flagSpec "info-table-map-with-fallback" Opt_InfoTableMapWithFallback- ]- ++ 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 "GHC.Tc.Errors.Hole" 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 "show-docs-of-hole-fits" Opt_ShowDocsOfHoleFits,- 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--fLangFlagsDeps :: [(Deprecation, FlagSpec LangExt.Extension)]-fLangFlagsDeps = [--- See Note [Updating flag description in the User's Guide]--- See Note [Supporting CLI completion]- depFlagSpecOp' "th" LangExt.TemplateHaskell- checkTemplateHaskellOk- (deprecatedForExtension "TemplateHaskell"),- depFlagSpec' "fi" LangExt.ForeignFunctionInterface- (deprecatedForExtension "ForeignFunctionInterface"),- depFlagSpec' "ffi" LangExt.ForeignFunctionInterface- (deprecatedForExtension "ForeignFunctionInterface"),- depFlagSpec' "arrows" LangExt.Arrows- (deprecatedForExtension "Arrows"),- depFlagSpec' "implicit-prelude" LangExt.ImplicitPrelude- (deprecatedForExtension "ImplicitPrelude"),- depFlagSpec' "bang-patterns" LangExt.BangPatterns- (deprecatedForExtension "BangPatterns"),- depFlagSpec' "monomorphism-restriction" LangExt.MonomorphismRestriction- (deprecatedForExtension "MonomorphismRestriction"),- depFlagSpec' "extended-default-rules" LangExt.ExtendedDefaultRules- (deprecatedForExtension "ExtendedDefaultRules"),- depFlagSpec' "implicit-params" LangExt.ImplicitParams- (deprecatedForExtension "ImplicitParams"),- depFlagSpec' "scoped-type-variables" LangExt.ScopedTypeVariables- (deprecatedForExtension "ScopedTypeVariables"),- depFlagSpec' "allow-overlapping-instances" LangExt.OverlappingInstances- (deprecatedForExtension "OverlappingInstances"),- depFlagSpec' "allow-undecidable-instances" LangExt.UndecidableInstances- (deprecatedForExtension "UndecidableInstances"),- depFlagSpec' "allow-incoherent-instances" LangExt.IncoherentInstances- (deprecatedForExtension "IncoherentInstances")- ]--supportedLanguages :: [String]-supportedLanguages = map (flagSpecName . snd) languageFlagsDeps--supportedLanguageOverlays :: [String]-supportedLanguageOverlays = map (flagSpecName . snd) safeHaskellFlagsDeps--supportedExtensions :: ArchOS -> [String]-supportedExtensions (ArchOS _ os) = concatMap toFlagSpecNamePair xFlags- where- toFlagSpecNamePair flg- -- IMPORTANT! Make sure that `ghc --supported-extensions` omits- -- "TemplateHaskell"/"QuasiQuotes" when it's known not to work out of the- -- box. See also GHC #11102 and #16331 for more details about- -- the rationale- | isAIX, flagSpecFlag flg == LangExt.TemplateHaskell = [noName]- | isAIX, flagSpecFlag flg == LangExt.QuasiQuotes = [noName]- | otherwise = [name, noName]- where- isAIX = os == OSAIX- noName = "No" ++ name- name = flagSpecName flg--supportedLanguagesAndExtensions :: ArchOS -> [String]-supportedLanguagesAndExtensions arch_os =- supportedLanguages ++ supportedLanguageOverlays ++ supportedExtensions arch_os---- | These -X<blah> flags cannot be reversed with -XNo<blah>-languageFlagsDeps :: [(Deprecation, FlagSpec Language)]-languageFlagsDeps = [- flagSpec "Haskell98" Haskell98,- flagSpec "Haskell2010" Haskell2010,- flagSpec "GHC2021" GHC2021- ]---- | These -X<blah> flags cannot be reversed with -XNo<blah>--- They are used to place hard requirements on what GHC Haskell language--- features can be used.-safeHaskellFlagsDeps :: [(Deprecation, FlagSpec SafeHaskellMode)]-safeHaskellFlagsDeps = [mkF Sf_Unsafe, mkF Sf_Trustworthy, mkF Sf_Safe]- where mkF flag = flagSpec (show flag) flag---- | These -X<blah> flags can all be reversed with -XNo<blah>-xFlags :: [FlagSpec LangExt.Extension]-xFlags = map snd xFlagsDeps--xFlagsDeps :: [(Deprecation, FlagSpec LangExt.Extension)]-xFlagsDeps = [--- See Note [Updating flag description in the User's Guide]--- See Note [Supporting CLI completion]--- See Note [Adding a language extension]--- Please keep the list of flags below sorted alphabetically- flagSpec "AllowAmbiguousTypes" LangExt.AllowAmbiguousTypes,- flagSpec "AlternativeLayoutRule" LangExt.AlternativeLayoutRule,- flagSpec "AlternativeLayoutRuleTransitional"- LangExt.AlternativeLayoutRuleTransitional,- flagSpec "Arrows" LangExt.Arrows,- depFlagSpecCond "AutoDeriveTypeable" LangExt.AutoDeriveTypeable- id- ("Typeable instances are created automatically " ++- "for all types since GHC 8.2."),- flagSpec "BangPatterns" LangExt.BangPatterns,- flagSpec "BinaryLiterals" LangExt.BinaryLiterals,- flagSpec "CApiFFI" LangExt.CApiFFI,- flagSpec "CPP" LangExt.Cpp,- flagSpec "CUSKs" LangExt.CUSKs,- flagSpec "ConstrainedClassMethods" LangExt.ConstrainedClassMethods,- flagSpec "ConstraintKinds" LangExt.ConstraintKinds,- flagSpec "DataKinds" LangExt.DataKinds,- depFlagSpecCond "DatatypeContexts" LangExt.DatatypeContexts- id- ("It was widely considered a misfeature, " ++- "and has been removed from the Haskell language."),- flagSpec "DefaultSignatures" LangExt.DefaultSignatures,- flagSpec "DeriveAnyClass" LangExt.DeriveAnyClass,- flagSpec "DeriveDataTypeable" LangExt.DeriveDataTypeable,- flagSpec "DeriveFoldable" LangExt.DeriveFoldable,- flagSpec "DeriveFunctor" LangExt.DeriveFunctor,- flagSpec "DeriveGeneric" LangExt.DeriveGeneric,- flagSpec "DeriveLift" LangExt.DeriveLift,- flagSpec "DeriveTraversable" LangExt.DeriveTraversable,- flagSpec "DerivingStrategies" LangExt.DerivingStrategies,- flagSpec' "DerivingVia" LangExt.DerivingVia- setDeriveVia,- flagSpec "DisambiguateRecordFields" LangExt.DisambiguateRecordFields,- flagSpec "DoAndIfThenElse" LangExt.DoAndIfThenElse,- flagSpec "BlockArguments" LangExt.BlockArguments,- depFlagSpec' "DoRec" LangExt.RecursiveDo- (deprecatedForExtension "RecursiveDo"),- flagSpec "DuplicateRecordFields" LangExt.DuplicateRecordFields,- flagSpec "FieldSelectors" LangExt.FieldSelectors,- flagSpec "EmptyCase" LangExt.EmptyCase,- flagSpec "EmptyDataDecls" LangExt.EmptyDataDecls,- flagSpec "EmptyDataDeriving" LangExt.EmptyDataDeriving,- flagSpec "ExistentialQuantification" LangExt.ExistentialQuantification,- flagSpec "ExplicitForAll" LangExt.ExplicitForAll,- flagSpec "ExplicitNamespaces" LangExt.ExplicitNamespaces,- flagSpec "ExtendedDefaultRules" LangExt.ExtendedDefaultRules,- flagSpec "FlexibleContexts" LangExt.FlexibleContexts,- flagSpec "FlexibleInstances" LangExt.FlexibleInstances,- flagSpec "ForeignFunctionInterface" LangExt.ForeignFunctionInterface,- flagSpec "FunctionalDependencies" LangExt.FunctionalDependencies,- flagSpec "GADTSyntax" LangExt.GADTSyntax,- flagSpec "GADTs" LangExt.GADTs,- flagSpec "GHCForeignImportPrim" LangExt.GHCForeignImportPrim,- flagSpec' "GeneralizedNewtypeDeriving" LangExt.GeneralizedNewtypeDeriving- setGenDeriving,- flagSpec' "GeneralisedNewtypeDeriving" LangExt.GeneralizedNewtypeDeriving- setGenDeriving,- flagSpec "ImplicitParams" LangExt.ImplicitParams,- flagSpec "ImplicitPrelude" LangExt.ImplicitPrelude,- flagSpec "ImportQualifiedPost" LangExt.ImportQualifiedPost,- flagSpec "ImpredicativeTypes" LangExt.ImpredicativeTypes,- flagSpec' "IncoherentInstances" LangExt.IncoherentInstances- setIncoherentInsts,- flagSpec "TypeFamilyDependencies" LangExt.TypeFamilyDependencies,- flagSpec "InstanceSigs" LangExt.InstanceSigs,- flagSpec "ApplicativeDo" LangExt.ApplicativeDo,- flagSpec "InterruptibleFFI" LangExt.InterruptibleFFI,- flagSpec "JavaScriptFFI" LangExt.JavaScriptFFI,- flagSpec "KindSignatures" LangExt.KindSignatures,- flagSpec "LambdaCase" LangExt.LambdaCase,- flagSpec "LexicalNegation" LangExt.LexicalNegation,- flagSpec "LiberalTypeSynonyms" LangExt.LiberalTypeSynonyms,- flagSpec "LinearTypes" LangExt.LinearTypes,- flagSpec "MagicHash" LangExt.MagicHash,- flagSpec "MonadComprehensions" LangExt.MonadComprehensions,- flagSpec "MonoLocalBinds" LangExt.MonoLocalBinds,- flagSpec "DeepSubsumption" LangExt.DeepSubsumption,- flagSpec "MonomorphismRestriction" LangExt.MonomorphismRestriction,- flagSpec "MultiParamTypeClasses" LangExt.MultiParamTypeClasses,- flagSpec "MultiWayIf" LangExt.MultiWayIf,- flagSpec "NumericUnderscores" LangExt.NumericUnderscores,- flagSpec "NPlusKPatterns" LangExt.NPlusKPatterns,- flagSpec "NamedFieldPuns" LangExt.NamedFieldPuns,- flagSpec "NamedWildCards" LangExt.NamedWildCards,- flagSpec "NegativeLiterals" LangExt.NegativeLiterals,- flagSpec "HexFloatLiterals" LangExt.HexFloatLiterals,- flagSpec "NondecreasingIndentation" LangExt.NondecreasingIndentation,- depFlagSpec' "NullaryTypeClasses" LangExt.NullaryTypeClasses- (deprecatedForExtension "MultiParamTypeClasses"),- flagSpec "NumDecimals" LangExt.NumDecimals,- depFlagSpecOp "OverlappingInstances" LangExt.OverlappingInstances- setOverlappingInsts- "instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS",- flagSpec "OverloadedLabels" LangExt.OverloadedLabels,- flagSpec "OverloadedLists" LangExt.OverloadedLists,- flagSpec "OverloadedStrings" LangExt.OverloadedStrings,- flagSpec "PackageImports" LangExt.PackageImports,- flagSpec "ParallelArrays" LangExt.ParallelArrays,- flagSpec "ParallelListComp" LangExt.ParallelListComp,- flagSpec "PartialTypeSignatures" LangExt.PartialTypeSignatures,- flagSpec "PatternGuards" LangExt.PatternGuards,- depFlagSpec' "PatternSignatures" LangExt.ScopedTypeVariables- (deprecatedForExtension "ScopedTypeVariables"),- 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 "QualifiedDo" LangExt.QualifiedDo,- flagSpec "Rank2Types" LangExt.RankNTypes,- flagSpec "RankNTypes" LangExt.RankNTypes,- flagSpec "RebindableSyntax" LangExt.RebindableSyntax,- flagSpec "OverloadedRecordDot" LangExt.OverloadedRecordDot,- flagSpec "OverloadedRecordUpdate" LangExt.OverloadedRecordUpdate,- depFlagSpec' "RecordPuns" LangExt.NamedFieldPuns- (deprecatedForExtension "NamedFieldPuns"),- flagSpec "RecordWildCards" LangExt.RecordWildCards,- flagSpec "RecursiveDo" LangExt.RecursiveDo,- flagSpec "RelaxedLayout" LangExt.RelaxedLayout,- depFlagSpecCond "RelaxedPolyRec" LangExt.RelaxedPolyRec- not- "You can't turn off RelaxedPolyRec any more",- 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,- flagSpec' "TemplateHaskell" LangExt.TemplateHaskell- checkTemplateHaskellOk,- flagSpec "TemplateHaskellQuotes" LangExt.TemplateHaskellQuotes,- flagSpec "StandaloneKindSignatures" LangExt.StandaloneKindSignatures,- flagSpec "TraditionalRecordSyntax" LangExt.TraditionalRecordSyntax,- flagSpec "TransformListComp" LangExt.TransformListComp,- flagSpec "TupleSections" LangExt.TupleSections,- flagSpec "TypeApplications" LangExt.TypeApplications,- flagSpec "TypeData" LangExt.TypeData,- depFlagSpec' "TypeInType" LangExt.TypeInType- (deprecatedForExtensions ["DataKinds", "PolyKinds"]),- flagSpec "TypeFamilies" LangExt.TypeFamilies,- flagSpec "TypeOperators" LangExt.TypeOperators,- flagSpec "TypeSynonymInstances" LangExt.TypeSynonymInstances,- flagSpec "UnboxedTuples" LangExt.UnboxedTuples,- flagSpec "UnboxedSums" LangExt.UnboxedSums,- flagSpec "UndecidableInstances" LangExt.UndecidableInstances,- flagSpec "UndecidableSuperClasses" LangExt.UndecidableSuperClasses,- flagSpec "UnicodeSyntax" LangExt.UnicodeSyntax,- flagSpec "UnliftedDatatypes" LangExt.UnliftedDatatypes,- flagSpec "UnliftedFFITypes" LangExt.UnliftedFFITypes,- flagSpec "UnliftedNewtypes" LangExt.UnliftedNewtypes,- flagSpec "ViewPatterns" LangExt.ViewPatterns- ]--defaultFlags :: Settings -> [GeneralFlag]-defaultFlags settings--- See Note [Updating flag description in the User's Guide]- = [ Opt_AutoLinkPackages,- Opt_DiagnosticsShowCaret,- Opt_EmbedManifest,- Opt_FamAppCache,- Opt_GenManifest,- Opt_GhciHistory,- Opt_GhciSandbox,- Opt_HelpfulErrors,- Opt_KeepHiFiles,- Opt_KeepOFiles,- Opt_OmitYields,- Opt_PrintBindContents,- Opt_ProfCountEntries,- Opt_SharedImplib,- Opt_SimplPreInlining,- Opt_VersionMacros,- Opt_RPath,- Opt_DumpWithWays,- Opt_CompactUnwind,- Opt_ShowErrorContext,- Opt_SuppressStgReps- ]-- ++ [f | (ns,f) <- optLevelFlags, 0 `elem` ns]- -- The default -O0 options-- -- Default floating flags (see Note [RHS Floating])- ++ [ Opt_LocalFloatOut, Opt_LocalFloatOutTopLevel ]--- ++ default_PIC platform-- ++ 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 "GHC.Tc.Errors.Hole" 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_UnclutterValidHoleFits, turnOff, Opt_ShowDocsOfHoleFits)- , (Opt_ShowTypeAppVarsOfHoleFits, turnOff, Opt_ShowTypeAppOfHoleFits)- , (Opt_UnclutterValidHoleFits, turnOff, Opt_ShowProvOfHoleFits) ]--default_PIC :: Platform -> [GeneralFlag]-default_PIC platform =- case (platformOS platform, platformArch platform) of- -- Darwin always requires PIC. Especially on more recent macOS releases- -- there will be a 4GB __ZEROPAGE that prevents us from using 32bit addresses- -- while we could work around this on x86_64 (like WINE does), we won't be- -- able on aarch64, where this is enforced.- (OSDarwin, ArchX86_64) -> [Opt_PIC]- -- For AArch64, we need to always have PIC enabled. The relocation model- -- on AArch64 does not permit arbitrary relocations. Under ASLR, we can't- -- control much how far apart symbols are in memory for our in-memory static- -- linker; and thus need to ensure we get sufficiently capable relocations.- -- This requires PIC on AArch64, and ExternalDynamicRefs on Linux as on top- -- of that. Subsequently we expect all code on aarch64/linux (and macOS) to- -- be built with -fPIC.- (OSDarwin, ArchAArch64) -> [Opt_PIC]- (OSLinux, ArchAArch64) -> [Opt_PIC, Opt_ExternalDynamicRefs]- (OSLinux, ArchARM {}) -> [Opt_PIC, Opt_ExternalDynamicRefs]- (OSOpenBSD, ArchX86_64) -> [Opt_PIC] -- Due to PIE support in- -- OpenBSD since 5.3 release- -- (1 May 2013) we need to- -- always generate PIC. See- -- #10597 for more- -- information.- _ -> []---- General flags that are switched on/off when other general flags are switched--- on-impliedGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]-impliedGFlags = [(Opt_DeferTypeErrors, turnOn, Opt_DeferTypedHoles)- ,(Opt_DeferTypeErrors, turnOn, Opt_DeferOutOfScopeVariables)- ,(Opt_DoLinearCoreLinting, turnOn, Opt_DoCoreLinting)- ,(Opt_Strictness, turnOn, Opt_WorkerWrapper)- ,(Opt_WriteIfSimplifiedCore, turnOn, Opt_WriteInterface)- ,(Opt_ByteCodeAndObjectCode, turnOn, Opt_WriteIfSimplifiedCore)- ,(Opt_InfoTableMap, turnOn, Opt_InfoTableMapWithStack)- ,(Opt_InfoTableMap, turnOn, Opt_InfoTableMapWithFallback)- ] ++ validHoleFitsImpliedGFlags---- General flags that are switched on/off when other general flags are switched--- off-impliedOffGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]-impliedOffGFlags = [(Opt_Strictness, turnOff, Opt_WorkerWrapper)]--impliedXFlags :: [(LangExt.Extension, TurnOnFlag, LangExt.Extension)]-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)- , (LangExt.FlexibleInstances, turnOn, LangExt.TypeSynonymInstances)- , (LangExt.FunctionalDependencies, turnOn, LangExt.MultiParamTypeClasses)- , (LangExt.MultiParamTypeClasses, turnOn, LangExt.ConstrainedClassMethods) -- c.f. #7854- , (LangExt.TypeFamilyDependencies, turnOn, LangExt.TypeFamilies)-- , (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)-- -- Standalone kind signatures are a replacement for CUSKs.- , (LangExt.StandaloneKindSignatures, turnOff, LangExt.CUSKs)-- -- AutoDeriveTypeable is not very useful without DeriveDataTypeable- , (LangExt.AutoDeriveTypeable, turnOn, LangExt.DeriveDataTypeable)-- -- We turn this on so that we can export associated type- -- type synonyms in subordinates (e.g. MyClass(type AssocType))- , (LangExt.TypeFamilies, turnOn, LangExt.ExplicitNamespaces)- , (LangExt.TypeOperators, turnOn, LangExt.ExplicitNamespaces)-- , (LangExt.ImpredicativeTypes, turnOn, LangExt.RankNTypes)-- -- Record wild-cards implies field disambiguation- -- Otherwise if you write (C {..}) you may well get- -- stuff like " 'a' not in scope ", which is a bit silly- -- if the compiler has just filled in field 'a' of constructor 'C'- , (LangExt.RecordWildCards, turnOn, LangExt.DisambiguateRecordFields)-- , (LangExt.ParallelArrays, turnOn, LangExt.ParallelListComp)-- , (LangExt.JavaScriptFFI, turnOn, LangExt.InterruptibleFFI)-- , (LangExt.DeriveTraversable, turnOn, LangExt.DeriveFunctor)- , (LangExt.DeriveTraversable, turnOn, LangExt.DeriveFoldable)-- -- Duplicate record fields require field disambiguation- , (LangExt.DuplicateRecordFields, turnOn, LangExt.DisambiguateRecordFields)-- , (LangExt.TemplateHaskell, turnOn, LangExt.TemplateHaskellQuotes)- , (LangExt.Strict, turnOn, LangExt.StrictData)-- -- Historically only UnboxedTuples was required for unboxed sums to work.- -- To avoid breaking code, we make UnboxedTuples imply UnboxedSums.- , (LangExt.UnboxedTuples, turnOn, LangExt.UnboxedSums)-- -- The extensions needed to declare an H98 unlifted data type- , (LangExt.UnliftedDatatypes, turnOn, LangExt.DataKinds)- , (LangExt.UnliftedDatatypes, turnOn, LangExt.StandaloneKindSignatures)- ]---- 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 file is:------ docs/users_guide/using-optimisation.rst------ Make sure to note whether a flag is implied by -O0, -O or -O2.--optLevelFlags :: [([Int], GeneralFlag)]--- Default settings of flags, before any command-line overrides-optLevelFlags -- see Note [Documenting optimisation flags]- = [ ([0,1,2], Opt_DoLambdaEtaExpansion)- , ([0,1,2], Opt_DoEtaReduction) -- See Note [Eta-reduction in -O0]- , ([0,1,2], Opt_LlvmTBAA)- , ([0,1,2], Opt_ProfManualCcs )- , ([2], Opt_DictsStrict)-- , ([0], Opt_IgnoreInterfacePragmas)- , ([0], Opt_OmitInterfacePragmas)-- , ([1,2], Opt_CoreConstantFolding)-- , ([1,2], Opt_CallArity)- , ([1,2], Opt_Exitification)- , ([1,2], Opt_CaseMerge)- , ([1,2], Opt_CaseFolding)- , ([1,2], Opt_CmmElimCommonBlocks)- -- Disabled due to #24507- -- , ([2], Opt_AsmShortcutting)- , ([1,2], Opt_CmmSink)- , ([1,2], Opt_CmmStaticPred)- , ([1,2], Opt_CSE)- , ([1,2], Opt_StgCSE)- , ([2], Opt_StgLiftLams)- , ([1,2], Opt_CmmControlFlow)-- , ([1,2], Opt_EnableRewriteRules)- -- Off for -O0. Otherwise we desugar list literals- -- to 'build' but don't run the simplifier passes that- -- would rewrite them back to cons cells! This seems- -- silly, and matters for the GHCi debugger.-- , ([1,2], Opt_FloatIn)- , ([1,2], Opt_FullLaziness)- , ([1,2], Opt_IgnoreAsserts)- , ([1,2], Opt_Loopification)- , ([1,2], Opt_CfgBlocklayout) -- Experimental-- , ([1,2], Opt_Specialise)- , ([1,2], Opt_CrossModuleSpecialise)- , ([1,2], Opt_InlineGenerics)- , ([1,2], Opt_Strictness)- , ([1,2], Opt_UnboxSmallStrictFields)- , ([1,2], Opt_CprAnal)- , ([1,2], Opt_WorkerWrapper)- , ([1,2], Opt_SolveConstantDicts)- , ([1,2], Opt_NumConstantFolding)-- , ([2], Opt_LiberateCase)- , ([2], Opt_SpecConstr)- , ([2], Opt_FastPAPCalls)--- , ([2], Opt_RegsGraph)--- RegsGraph suffers performance regression. See #7679--- , ([2], Opt_StaticArgumentTransformation)--- Static Argument Transformation needs investigation. See #9374- , ([0,1,2], Opt_SpecEval)- , ([0,1,2], Opt_SpecEvalDictFun)- ]---enableUnusedBinds :: DynP ()-enableUnusedBinds = mapM_ setWarningFlag unusedBindsFlags--disableUnusedBinds :: DynP ()-disableUnusedBinds = mapM_ unSetWarningFlag unusedBindsFlags---- | Things you get with `-dlint`.-enableDLint :: DynP ()-enableDLint = do- mapM_ setGeneralFlag dLintFlags- addWayDynP WayDebug- where- dLintFlags :: [GeneralFlag]- dLintFlags =- [ Opt_DoCoreLinting- , Opt_DoStgLinting- , Opt_DoCmmLinting- , Opt_DoAsmLinting- , Opt_CatchNonexhaustiveCases- , Opt_LlvmFillUndefWithGarbage- ]--enableGlasgowExts :: DynP ()-enableGlasgowExts = do setGeneralFlag Opt_PrintExplicitForalls- mapM_ setExtensionFlag glasgowExtsFlags--disableGlasgowExts :: DynP ()-disableGlasgowExts = do unSetGeneralFlag Opt_PrintExplicitForalls- mapM_ unSetExtensionFlag glasgowExtsFlags---- Please keep what_glasgow_exts_does.rst up to date with this list-glasgowExtsFlags :: [LangExt.Extension]-glasgowExtsFlags = [- LangExt.ConstrainedClassMethods- , LangExt.DeriveDataTypeable- , LangExt.DeriveFoldable- , LangExt.DeriveFunctor- , LangExt.DeriveGeneric- , LangExt.DeriveTraversable- , LangExt.EmptyDataDecls- , LangExt.ExistentialQuantification- , LangExt.ExplicitNamespaces- , LangExt.FlexibleContexts- , LangExt.FlexibleInstances- , LangExt.ForeignFunctionInterface- , LangExt.FunctionalDependencies- , LangExt.GeneralizedNewtypeDeriving- , LangExt.ImplicitParams- , LangExt.KindSignatures- , LangExt.LiberalTypeSynonyms- , LangExt.MagicHash- , LangExt.MultiParamTypeClasses- , LangExt.ParallelListComp- , LangExt.PatternGuards- , LangExt.PostfixOperators- , LangExt.RankNTypes- , LangExt.RecursiveDo- , LangExt.ScopedTypeVariables- , LangExt.StandaloneDeriving- , LangExt.TypeOperators- , LangExt.TypeSynonymInstances- , LangExt.UnboxedTuples- , LangExt.UnicodeSyntax- , LangExt.UnliftedFFITypes ]--setWarnSafe :: Bool -> DynP ()-setWarnSafe True = getCurLoc >>= \l -> upd (\d -> d { warnSafeOnLoc = l })-setWarnSafe False = return ()--setWarnUnsafe :: Bool -> DynP ()-setWarnUnsafe True = getCurLoc >>= \l -> upd (\d -> d { warnUnsafeOnLoc = l })-setWarnUnsafe False = return ()--setPackageTrust :: DynP ()-setPackageTrust = do- setGeneralFlag Opt_PackageTrust- l <- getCurLoc- upd $ \d -> d { pkgTrustOnLoc = l }--setGenDeriving :: TurnOnFlag -> DynP ()-setGenDeriving True = getCurLoc >>= \l -> upd (\d -> d { newDerivOnLoc = l })-setGenDeriving False = return ()--setDeriveVia :: TurnOnFlag -> DynP ()-setDeriveVia True = getCurLoc >>= \l -> upd (\d -> d { deriveViaOnLoc = l })-setDeriveVia False = return ()--setOverlappingInsts :: TurnOnFlag -> DynP ()-setOverlappingInsts False = return ()-setOverlappingInsts True = do- l <- getCurLoc- upd (\d -> d { overlapInstLoc = l })--setIncoherentInsts :: TurnOnFlag -> DynP ()-setIncoherentInsts False = return ()-setIncoherentInsts True = do- l <- getCurLoc- upd (\d -> d { incoherentOnLoc = l })--checkTemplateHaskellOk :: TurnOnFlag -> DynP ()-checkTemplateHaskellOk _turn_on- = getCurLoc >>= \l -> upd (\d -> d { thOnLoc = l })--{- **********************************************************************-%* *- DynFlags constructors-%* *-%********************************************************************* -}--type DynP = EwM (CmdLineP DynFlags)--upd :: (DynFlags -> DynFlags) -> DynP ()-upd f = liftEwM (do dflags <- getCmdLineState- putCmdLineState $! f dflags)--updM :: (DynFlags -> DynP DynFlags) -> DynP ()-updM f = do dflags <- liftEwM getCmdLineState- dflags' <- f dflags- liftEwM $ putCmdLineState $! dflags'----------------- Constructor functions for OptKind ------------------noArg :: (DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags)-noArg fn = NoArg (upd fn)--noArgM :: (DynFlags -> DynP DynFlags) -> OptKind (CmdLineP DynFlags)-noArgM fn = NoArg (updM fn)--hasArg :: (String -> DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags)-hasArg fn = HasArg (upd . fn)--sepArg :: (String -> DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags)-sepArg fn = SepArg (upd . fn)--intSuffix :: (Int -> DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags)-intSuffix fn = IntSuffix (\n -> upd (fn n))--intSuffixM :: (Int -> DynFlags -> DynP DynFlags) -> OptKind (CmdLineP DynFlags)-intSuffixM fn = IntSuffix (\n -> updM (fn n))--word64Suffix :: (Word64 -> DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags)-word64Suffix fn = Word64Suffix (\n -> upd (fn n))--floatSuffix :: (Float -> DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags)-floatSuffix fn = FloatSuffix (\n -> upd (fn n))--optIntSuffixM :: (Maybe Int -> DynFlags -> DynP DynFlags)- -> OptKind (CmdLineP DynFlags)-optIntSuffixM fn = OptIntSuffix (\mi -> updM (fn mi))--setDumpFlag :: DumpFlag -> OptKind (CmdLineP DynFlags)-setDumpFlag dump_flag = NoArg (setDumpFlag' dump_flag)-----------------------------addWayDynP :: Way -> DynP ()-addWayDynP = upd . addWay'--addWay' :: Way -> DynFlags -> DynFlags-addWay' w dflags0 =- let platform = targetPlatform dflags0- dflags1 = dflags0 { targetWays_ = addWay w (targetWays_ dflags0) }- dflags2 = foldr setGeneralFlag' dflags1- (wayGeneralFlags platform w)- dflags3 = foldr unSetGeneralFlag' dflags2- (wayUnsetGeneralFlags platform w)- in dflags3--removeWayDyn :: DynP ()-removeWayDyn = upd (\dfs -> dfs { targetWays_ = removeWay WayDyn (targetWays_ dfs) })-----------------------------setGeneralFlag, unSetGeneralFlag :: GeneralFlag -> DynP ()-setGeneralFlag f = upd (setGeneralFlag' f)-unSetGeneralFlag f = upd (unSetGeneralFlag' f)--setGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags-setGeneralFlag' f dflags = foldr ($) (gopt_set dflags f) deps- where- deps = [ if turn_on then setGeneralFlag' d- else unSetGeneralFlag' d- | (f', turn_on, d) <- impliedGFlags, f' == f ]- -- When you set f, set the ones it implies- -- NB: use setGeneralFlag recursively, in case the implied flags- -- implies further flags--unSetGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags-unSetGeneralFlag' f dflags = foldr ($) (gopt_unset dflags f) deps- where- deps = [ if turn_on then setGeneralFlag' d- else unSetGeneralFlag' d- | (f', turn_on, d) <- impliedOffGFlags, f' == f ]- -- In general, when you un-set f, we don't un-set the things it implies.- -- There are however some exceptions, e.g., -fno-strictness implies- -- -fno-worker-wrapper.- --- -- NB: use unSetGeneralFlag' recursively, in case the implied off flags- -- imply further flags.-----------------------------setWarningFlag, unSetWarningFlag :: WarningFlag -> DynP ()-setWarningFlag f = upd (\dfs -> wopt_set dfs f)-unSetWarningFlag f = upd (\dfs -> wopt_unset dfs f)--setFatalWarningFlag, unSetFatalWarningFlag :: WarningFlag -> DynP ()-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)-unSetExtensionFlag f = upd (unSetExtensionFlag' f)--setExtensionFlag', unSetExtensionFlag' :: LangExt.Extension -> DynFlags -> DynFlags-setExtensionFlag' f dflags = foldr ($) (xopt_set dflags f) deps- where- deps = [ if turn_on then setExtensionFlag' d- else unSetExtensionFlag' d- | (f', turn_on, d) <- impliedXFlags, f' == f ]- -- When you set f, set the ones it implies- -- NB: use setExtensionFlag recursively, in case the implied flags- -- implies further flags--unSetExtensionFlag' f dflags = xopt_unset dflags f- -- When you un-set f, however, we don't un-set the things it implies- -- (except for -fno-glasgow-exts, which is treated specially)------------------------------alterToolSettings :: (ToolSettings -> ToolSettings) -> DynFlags -> DynFlags-alterToolSettings f dynFlags = dynFlags { toolSettings = f (toolSettings dynFlags) }-----------------------------setDumpFlag' :: DumpFlag -> DynP ()-setDumpFlag' dump_flag- = do upd (\dfs -> dopt_set dfs dump_flag)- when want_recomp forceRecompile- where -- Certain dumpy-things are really interested in what's going- -- on during recompilation checking, so in those cases we- -- don't want to turn it off.- want_recomp = dump_flag `notElem` [Opt_D_dump_if_trace,- Opt_D_dump_hi_diffs,- Opt_D_no_debug_output]--forceRecompile :: DynP ()--- Whenever we -ddump, force recompilation (by switching off the--- recompilation checker), else you don't see the dump! However,--- don't switch it off in --make mode, else *everything* gets--- recompiled which probably isn't what you want-forceRecompile = do dfs <- liftEwM getCmdLineState- when (force_recomp dfs) (setGeneralFlag Opt_ForceRecomp)- where- force_recomp dfs = isOneShot (ghcMode dfs)---setVerbosity :: Maybe Int -> DynP ()-setVerbosity mb_n = upd (\dfs -> dfs{ verbosity = mb_n `orElse` 3 })--setDebugLevel :: Maybe Int -> DynP ()-setDebugLevel mb_n =- upd (\dfs -> exposeSyms $ dfs{ debugLevel = n })- where- n = mb_n `orElse` 2- exposeSyms- | n > 2 = setGeneralFlag' Opt_ExposeInternalSymbols- | otherwise = id--data PkgDbRef- = GlobalPkgDb- | UserPkgDb- | PkgDbPath FilePath- deriving Eq--addPkgDbRef :: PkgDbRef -> DynP ()-addPkgDbRef p = upd $ \s ->- s { packageDBFlags = PackageDB p : packageDBFlags s }--removeUserPkgDb :: DynP ()-removeUserPkgDb = upd $ \s ->- s { packageDBFlags = NoUserPackageDB : packageDBFlags s }--removeGlobalPkgDb :: DynP ()-removeGlobalPkgDb = upd $ \s ->- s { packageDBFlags = NoGlobalPackageDB : packageDBFlags s }--clearPkgDb :: DynP ()-clearPkgDb = upd $ \s ->- s { packageDBFlags = ClearPackageDBs : packageDBFlags s }--parsePackageFlag :: String -- the flag- -> ReadP PackageArg -- type of argument- -> String -- string to parse- -> PackageFlag-parsePackageFlag flag arg_parse str- = case filter ((=="").snd) (readP_to_S parse str) of- [(r, "")] -> r- _ -> throwGhcException $ CmdLineError ("Can't parse package flag: " ++ str)- where doc = flag ++ " " ++ str- parse = do- pkg_arg <- tok arg_parse- let mk_expose = ExposePackage doc pkg_arg- ( do _ <- tok $ string "with"- fmap (mk_expose . ModRenaming True) parseRns- <++ fmap (mk_expose . ModRenaming False) parseRns- <++ return (mk_expose (ModRenaming True [])))- parseRns = do _ <- tok $ R.char '('- rns <- tok $ sepBy parseItem (tok $ R.char ',')- _ <- tok $ R.char ')'- return rns- parseItem = do- orig <- tok $ parseModuleName- (do _ <- tok $ string "as"- new <- tok $ parseModuleName- return (orig, new)- +++- return (orig, orig))- tok m = m >>= \x -> skipSpaces >> return x--exposePackage, exposePackageId, hidePackage,- exposePluginPackage, exposePluginPackageId,- ignorePackage,- trustPackage, distrustPackage :: String -> DynP ()-exposePackage p = upd (exposePackage' p)-exposePackageId p =- upd (\s -> s{ packageFlags =- parsePackageFlag "-package-id" parseUnitArg p : packageFlags s })-exposePluginPackage p =- upd (\s -> s{ pluginPackageFlags =- parsePackageFlag "-plugin-package" parsePackageArg p : pluginPackageFlags s })-exposePluginPackageId p =- upd (\s -> s{ pluginPackageFlags =- parsePackageFlag "-plugin-package-id" parseUnitArg p : pluginPackageFlags s })-hidePackage p =- upd (\s -> s{ packageFlags = HidePackage p : packageFlags s })-ignorePackage p =- upd (\s -> s{ ignorePackageFlags = IgnorePackage p : ignorePackageFlags s })--trustPackage p = exposePackage p >> -- both trust and distrust also expose a package- upd (\s -> s{ trustFlags = TrustPackage p : trustFlags s })-distrustPackage p = exposePackage p >>- upd (\s -> s{ trustFlags = DistrustPackage p : trustFlags s })--exposePackage' :: String -> DynFlags -> DynFlags-exposePackage' p dflags- = dflags { packageFlags =- parsePackageFlag "-package" parsePackageArg p : packageFlags dflags }--parsePackageArg :: ReadP PackageArg-parsePackageArg =- fmap PackageArg (munch1 (\c -> isAlphaNum c || c `elem` ":-_."))--parseUnitArg :: ReadP PackageArg-parseUnitArg =- fmap UnitIdArg parseUnit--setUnitId :: String -> DynFlags -> DynFlags-setUnitId p d = d { homeUnitId_ = stringToUnitId p }--setWorkingDirectory :: String -> DynFlags -> DynFlags-setWorkingDirectory p d = d { workingDirectory = Just p }--{--Note [Filepaths and Multiple Home Units]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--It is common to assume that a package is compiled in the directory where its-cabal file resides. Thus, all paths used in the compiler are assumed to be relative-to this directory. When there are multiple home units the compiler is often-not operating in the standard directory and instead where the cabal.project-file is located. In this case the `-working-dir` option can be passed which specifies-the path from the current directory to the directory the unit assumes to be it's root,-normally the directory which contains the cabal file.--When the flag is passed, any relative paths used by the compiler are offset-by the working directory. Notably this includes `-i`, `-I⟨dir⟩`, `-hidir`, `-odir` etc and-the location of input files.---}--augmentByWorkingDirectory :: DynFlags -> FilePath -> FilePath-augmentByWorkingDirectory dflags fp | isRelative fp, Just offset <- workingDirectory dflags = offset </> fp-augmentByWorkingDirectory _ fp = fp--setPackageName :: String -> DynFlags -> DynFlags-setPackageName p d = d { thisPackageName = Just p }--addHiddenModule :: String -> DynP ()-addHiddenModule p =- upd (\s -> s{ hiddenModules = Set.insert (mkModuleName p) (hiddenModules s) })--addReexportedModule :: String -> DynP ()-addReexportedModule p =- upd (\s -> s{ reexportedModules = Set.insert (mkModuleName p) (reexportedModules s) })----- If we're linking a binary, then only backends that produce object--- code are allowed (requests for other target types are ignored).-setBackend :: Backend -> DynP ()-setBackend l = upd $ \ dfs ->- if ghcLink dfs /= LinkBinary || backendWritesFiles l- then dfs{ backend = l }- else dfs---- Changes the target only if we're compiling object code. This is--- used by -fasm and -fllvm, which switch from one to the other, but--- not from bytecode to object-code. The idea is that -fasm/-fllvm--- can be safely used in an OPTIONS_GHC pragma.-setObjBackend :: Backend -> DynP ()-setObjBackend l = updM set- where- set dflags- | backendWritesFiles (backend dflags)- = return $ dflags { backend = l }- | otherwise = return dflags--setOptLevel :: Int -> DynFlags -> DynP DynFlags-setOptLevel n dflags = return (updOptLevel n dflags)--setCallerCcFilters :: String -> DynP ()-setCallerCcFilters arg =- case parseCallerCcFilter arg of- Right filt -> upd $ \d -> d { callerCcFilters = filt : callerCcFilters d }- Left err -> addErr err--setMainIs :: String -> DynP ()-setMainIs arg- | x:_ <- main_fn, isLower x -- The arg looked like "Foo.Bar.baz"- = upd $ \d -> d { mainFunIs = Just main_fn,- mainModuleNameIs = mkModuleName main_mod }-- | x:_ <- arg, isUpper x -- The arg looked like "Foo" or "Foo.Bar"- = upd $ \d -> d { mainModuleNameIs = mkModuleName arg }-- | otherwise -- The arg looked like "baz"- = upd $ \d -> d { mainFunIs = Just arg }- where- (main_mod, main_fn) = splitLongestPrefix arg (== '.')--addLdInputs :: Option -> DynFlags -> DynFlags-addLdInputs p dflags = dflags{ldInputs = ldInputs dflags ++ [p]}---- -------------------------------------------------------------------------------- Load dynflags from environment files.--setFlagsFromEnvFile :: FilePath -> String -> DynP ()-setFlagsFromEnvFile envfile content = do- setGeneralFlag Opt_HideAllPackages- parseEnvFile envfile content--parseEnvFile :: FilePath -> String -> DynP ()-parseEnvFile envfile = mapM_ parseEntry . lines- where- parseEntry str = case words str of- ("package-db": _) -> addPkgDbRef (PkgDbPath (envdir </> db))- -- relative package dbs are interpreted relative to the env file- where envdir = takeDirectory envfile- db = drop 11 str- ["clear-package-db"] -> clearPkgDb- ["hide-package", pkg] -> hidePackage pkg- ["global-package-db"] -> addPkgDbRef GlobalPkgDb- ["user-package-db"] -> addPkgDbRef UserPkgDb- ["package-id", pkgid] -> exposePackageId pkgid- (('-':'-':_):_) -> return () -- comments- -- and the original syntax introduced in 7.10:- [pkgid] -> exposePackageId pkgid- [] -> return ()- _ -> throwGhcException $ CmdLineError $- "Can't parse environment file entry: "- ++ envfile ++ ": " ++ str----------------------------------------------------------------------------------- Paths & Libraries--addImportPath, addLibraryPath, addIncludePath, addFrameworkPath :: FilePath -> DynP ()---- -i on its own deletes the import paths-addImportPath "" = upd (\s -> s{importPaths = []})-addImportPath p = upd (\s -> s{importPaths = importPaths s ++ splitPathList p})--addLibraryPath p =- upd (\s -> s{libraryPaths = libraryPaths s ++ splitPathList p})--addIncludePath p =- upd (\s -> s{includePaths =- addGlobalInclude (includePaths s) (splitPathList p)})--addFrameworkPath p =- upd (\s -> s{frameworkPaths = frameworkPaths s ++ splitPathList p})--#if !defined(mingw32_HOST_OS)-split_marker :: Char-split_marker = ':' -- not configurable (ToDo)-#endif--splitPathList :: String -> [String]-splitPathList s = filter notNull (splitUp s)- -- empty paths are ignored: there might be a trailing- -- ':' in the initial list, for example. Empty paths can- -- cause confusion when they are translated into -I options- -- for passing to gcc.- where-#if !defined(mingw32_HOST_OS)- splitUp xs = split split_marker xs-#else- -- Windows: 'hybrid' support for DOS-style paths in directory lists.- --- -- That is, if "foo:bar:baz" is used, this interpreted as- -- consisting of three entries, 'foo', 'bar', 'baz'.- -- However, with "c:/foo:c:\\foo;x:/bar", this is interpreted- -- as 3 elts, "c:/foo", "c:\\foo", "x:/bar"- --- -- Notice that no attempt is made to fully replace the 'standard'- -- split marker ':' with the Windows / DOS one, ';'. The reason being- -- that this will cause too much breakage for users & ':' will- -- work fine even with DOS paths, if you're not insisting on being silly.- -- So, use either.- splitUp [] = []- splitUp (x:':':div:xs) | div `elem` dir_markers- = ((x:':':div:p): splitUp rs)- where- (p,rs) = findNextPath xs- -- we used to check for existence of the path here, but that- -- required the IO monad to be threaded through the command-line- -- parser which is quite inconvenient. The- splitUp xs = cons p (splitUp rs)- where- (p,rs) = findNextPath xs-- cons "" xs = xs- cons x xs = x:xs-- -- will be called either when we've consumed nought or the- -- "<Drive>:/" part of a DOS path, so splitting is just a Q of- -- finding the next split marker.- findNextPath xs =- case break (`elem` split_markers) xs of- (p, _:ds) -> (p, ds)- (p, xs) -> (p, xs)-- split_markers :: [Char]- split_markers = [':', ';']-- dir_markers :: [Char]- dir_markers = ['/', '\\']-#endif---- -------------------------------------------------------------------------------- tmpDir, where we store temporary files.--setTmpDir :: FilePath -> DynFlags -> DynFlags-setTmpDir dir d = d { tmpDir = TempDir (normalise dir) }- -- we used to fix /cygdrive/c/.. on Windows, but this doesn't- -- seem necessary now --SDM 7/2/2008---------------------------------------------------------------------------------- RTS opts--setRtsOpts :: String -> DynP ()-setRtsOpts arg = upd $ \ d -> d {rtsOpts = Just arg}--setRtsOptsEnabled :: RtsOptsEnabled -> DynP ()-setRtsOptsEnabled arg = upd $ \ d -> d {rtsOptsEnabled = arg}---------------------------------------------------------------------------------- Hpc stuff--setOptHpcDir :: String -> DynP ()-setOptHpcDir arg = upd $ \ d -> d {hpcDir = arg}---------------------------------------------------------------------------------- Via-C compilation stuff---- There are some options that we need to pass to gcc when compiling--- Haskell code via C, but are only supported by recent versions of--- gcc. The configure script decides which of these options we need,--- and puts them in the "settings" file in $topdir. The advantage of--- having these in a separate file is that the file can be created at--- install-time depending on the available gcc version, and even--- re-generated later if gcc is upgraded.------ The options below are not dependent on the version of gcc, only the--- platform.--picCCOpts :: DynFlags -> [String]-picCCOpts dflags =- case platformOS (targetPlatform dflags) of- OSDarwin- -- Apple prefers to do things the other way round.- -- PIC is on by default.- -- -mdynamic-no-pic:- -- Turn off PIC code generation.- -- -fno-common:- -- Don't generate "common" symbols - these are unwanted- -- in dynamic libraries.-- | gopt Opt_PIC dflags -> ["-fno-common", "-U__PIC__", "-D__PIC__"]- | otherwise -> ["-mdynamic-no-pic"]- OSMinGW32 -- no -fPIC for Windows- | gopt Opt_PIC dflags -> ["-U__PIC__", "-D__PIC__"]- | otherwise -> []- _- -- we need -fPIC for C files when we are compiling with -dynamic,- -- otherwise things like stub.c files don't get compiled- -- correctly. They need to reference data in the Haskell- -- objects, but can't without -fPIC. See- -- https://gitlab.haskell.org/ghc/ghc/wikis/commentary/position-independent-code- | gopt Opt_PIC dflags || ways dflags `hasWay` WayDyn ->- ["-fPIC", "-U__PIC__", "-D__PIC__"]- -- gcc may be configured to have PIC on by default, let's be- -- explicit here, see #15847- | otherwise -> ["-fno-PIC"]--pieCCLDOpts :: DynFlags -> [String]-pieCCLDOpts dflags- | gopt Opt_PICExecutable dflags = ["-pie"]- -- See Note [No PIE when linking]- | toolSettings_ccSupportsNoPie (toolSettings dflags) = ["-no-pie"]- | otherwise = []---{--Note [No PIE when linking]-~~~~~~~~~~~~~~~~~~~~~~~~~~-As of 2016 some Linux distributions (e.g. Debian) have started enabling -pie by-default in their gcc builds. This is incompatible with -r as it implies that we-are producing an executable. Consequently, we must manually pass -no-pie to gcc-when joining object files or linking dynamic libraries. Unless, of course, the-user has explicitly requested a PIE executable with -pie. See #12759.--}--picPOpts :: DynFlags -> [String]-picPOpts dflags- | gopt Opt_PIC dflags = ["-U__PIC__", "-D__PIC__"]- | otherwise = []---- -------------------------------------------------------------------------------- Compiler Info--compilerInfo :: DynFlags -> [(String, String)]-compilerInfo dflags- = -- We always make "Project name" be first to keep parsing in- -- other languages simple, i.e. when looking for other fields,- -- you don't have to worry whether there is a leading '[' or not- ("Project name", cProjectName)- -- 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 $ expandDirectories (topDir dflags) (toolDir dflags))- (rawSettings dflags)- ++ [("Project version", projectVersion dflags),- ("Project Git commit id", cProjectGitCommitId),- ("Project Version Int", cProjectVersionInt),- ("Project Patch Level", cProjectPatchLevel),- ("Project Patch Level1", cProjectPatchLevel1),- ("Project Patch Level2", cProjectPatchLevel2),- ("Booter version", cBooterVersion),- ("Stage", cStage),- ("Build platform", cBuildPlatformString),- ("Host platform", cHostPlatformString),- ("Target platform", platformMisc_targetPlatformString $ platformMisc dflags),- ("Have interpreter", showBool $ platformMisc_ghcWithInterpreter $ platformMisc dflags),- ("Object splitting supported", showBool False),- ("Have native code generator", showBool $ platformNcgSupported (targetPlatform dflags)),- ("Target default backend", show $ platformDefaultBackend (targetPlatform dflags)),- -- Whether or not we support @-dynamic-too@- ("Support dynamic-too", showBool $ not isWindows),- -- Whether or not we support the @-j@ flag with @--make@.- ("Support parallel --make", "YES"),- -- Whether or not we support "Foo from foo-0.1-XXX:Foo" syntax in- -- installed package info.- ("Support reexported-modules", "YES"),- -- Whether or not we support extended @-package foo (Foo)@ syntax.- ("Support thinning and renaming package flags", "YES"),- -- Whether or not we support Backpack.- ("Support Backpack", "YES"),- -- If true, we require that the 'id' field in installed package info- -- match what is passed to the @-this-unit-id@ flag for modules- -- built in it- ("Requires unified installed package IDs", "YES"),- -- Whether or not we support the @-this-package-key@ flag. Prefer- -- "Uses unit IDs" over it. We still say yes even if @-this-package-key@- -- flag has been removed, otherwise it breaks Cabal...- ("Uses package keys", "YES"),- -- Whether or not we support the @-this-unit-id@ flag- ("Uses unit IDs", "YES"),- -- Whether or not GHC was compiled using -dynamic- ("GHC Dynamic", showBool hostIsDynamic),- -- Whether or not GHC was compiled using -prof- ("GHC Profiled", showBool hostIsProfiled),- ("Debug on", showBool debugIsOn),- ("LibDir", topDir dflags),- -- The path of the global package database used by GHC- ("Global Package DB", globalPackageDatabasePath dflags)- ]- where- showBool True = "YES"- showBool False = "NO"- platform = targetPlatform dflags- isWindows = platformOS platform == OSMinGW32- useInplaceMinGW = toolSettings_useInplaceMinGW $ toolSettings dflags- expandDirectories :: FilePath -> Maybe FilePath -> String -> String- expandDirectories topd mtoold = expandToolDir useInplaceMinGW mtoold . expandTopDir topd----- | Get target profile-targetProfile :: DynFlags -> Profile-targetProfile dflags = Profile (targetPlatform dflags) (ways dflags)--{- ------------------------------------------------------------------------------Note [DynFlags consistency]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~--There are a number of number of DynFlags configurations which either-do not make sense or lead to unimplemented or buggy codepaths in the-compiler. makeDynFlagsConsistent is responsible for verifying the validity-of a set of DynFlags, fixing any issues, and reporting them back to the-caller.--GHCi and -O------------------When using optimization, the compiler can introduce several things-(such as unboxed tuples) into the intermediate code, which GHCi later-chokes on since the bytecode interpreter can't handle this (and while-this is arguably a bug these aren't handled, there are no plans to fix-it.)--While the driver pipeline always checks for this particular erroneous-combination when parsing flags, we also need to check when we update-the flags; this is because API clients may parse flags but update the-DynFlags afterwords, before finally running code inside a session (see-T10052 and #10052).--}---- | Resolve any internal inconsistencies in a set of 'DynFlags'.--- Returns the consistent 'DynFlags' as well as a list of warnings--- to report to the user.-makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String])--- Whenever makeDynFlagsConsistent does anything, it starts over, to--- ensure that a later change doesn't invalidate an earlier check.--- Be careful not to introduce potential loops!-makeDynFlagsConsistent dflags- -- Disable -dynamic-too on Windows (#8228, #7134, #5987)- | os == OSMinGW32 && gopt Opt_BuildDynamicToo dflags- = let dflags' = gopt_unset dflags Opt_BuildDynamicToo- warn = "-dynamic-too is not supported on Windows"- in loop dflags' warn- -- Disable -dynamic-too if we are are compiling with -dynamic already, otherwise- -- you get two dynamic object files (.o and .dyn_o). (#20436)- | ways dflags `hasWay` WayDyn && gopt Opt_BuildDynamicToo dflags- = let dflags' = gopt_unset dflags Opt_BuildDynamicToo- warn = "-dynamic-too is ignored when using -dynamic"- in loop dflags' warn-- | gopt Opt_SplitSections dflags- , platformHasSubsectionsViaSymbols (targetPlatform dflags)- = let dflags' = gopt_unset dflags Opt_SplitSections- warn = "-fsplit-sections is not useful on this platform " ++- "since it uses subsections-via-symbols. Ignoring."- in loop dflags' warn-- -- Via-C backend only supports unregisterised ABI. Switch to a backend- -- supporting it if possible.- | backendUnregisterisedAbiOnly (backend dflags) &&- not (platformUnregisterised (targetPlatform dflags))- = let b = platformDefaultBackend (targetPlatform dflags)- in if backendSwappableWithViaC b then- let dflags' = dflags { backend = b }- warn = "Target platform doesn't use unregisterised ABI, so using " ++- backendDescription b ++ " rather than " ++- backendDescription (backend dflags)- in loop dflags' warn- else- pgmError (backendDescription (backend dflags) ++- " supports only unregisterised ABI but target platform doesn't use it.")-- | gopt Opt_Hpc dflags && not (backendSupportsHpc (backend dflags))- = let dflags' = gopt_unset dflags Opt_Hpc- warn = "Hpc can't be used with " ++ backendDescription (backend dflags) ++- ". Ignoring -fhpc."- in loop dflags' warn-- | backendSwappableWithViaC (backend dflags) &&- platformUnregisterised (targetPlatform dflags)- = loop (dflags { backend = viaCBackend })- "Target platform uses unregisterised ABI, so compiling via C"-- | backendNeedsPlatformNcgSupport (backend dflags) &&- not (platformNcgSupported $ targetPlatform dflags)- = let dflags' = dflags { backend = llvmBackend }- warn = "Native code generator doesn't support target platform, so using LLVM"- in loop dflags' warn-- | not (osElfTarget os) && gopt Opt_PIE dflags- = loop (gopt_unset dflags Opt_PIE)- "Position-independent only supported on ELF platforms"- | os == OSDarwin &&- arch == ArchX86_64 &&- not (gopt Opt_PIC dflags)- = loop (gopt_set dflags Opt_PIC)- "Enabling -fPIC as it is always on for this platform"-- | backendForcesOptimization0 (backend dflags)- , let (dflags', changed) = updOptLevelChanged 0 dflags- , changed- = loop dflags' ("Optimization flags are incompatible with the " ++- backendDescription (backend dflags) ++- "; optimization flags ignored.")-- | LinkInMemory <- ghcLink dflags- , not (gopt Opt_ExternalInterpreter dflags)- , hostIsProfiled- , backendWritesFiles (backend dflags)- , ways dflags `hasNotWay` WayProf- = loop dflags{targetWays_ = addWay WayProf (targetWays_ dflags)}- "Enabling -prof, because -fobject-code is enabled and GHCi is profiled"-- | LinkMergedObj <- ghcLink dflags- , Nothing <- outputFile dflags- = pgmError "--output must be specified when using --merge-objs"-- | otherwise = (dflags, [])- where loc = mkGeneralSrcSpan (fsLit "when making flags consistent")- loop updated_dflags warning- = case makeDynFlagsConsistent updated_dflags of- (dflags', ws) -> (dflags', L loc warning : ws)- platform = targetPlatform dflags- arch = platformArch platform- os = platformOS platform---setUnsafeGlobalDynFlags :: DynFlags -> IO ()-setUnsafeGlobalDynFlags dflags = do- writeIORef v_unsafeHasPprDebug (hasPprDebug dflags)- writeIORef v_unsafeHasNoDebugOutput (hasNoDebugOutput dflags)- writeIORef v_unsafeHasNoStateHack (hasNoStateHack dflags)----- -------------------------------------------------------------------------------- SSE and AVX--isSse4_2Enabled :: DynFlags -> Bool-isSse4_2Enabled dflags = sseVersion dflags >= Just SSE42--isAvxEnabled :: DynFlags -> Bool-isAvxEnabled dflags = avx dflags || avx2 dflags || avx512f dflags--isAvx2Enabled :: DynFlags -> Bool-isAvx2Enabled dflags = avx2 dflags || avx512f dflags--isAvx512cdEnabled :: DynFlags -> Bool-isAvx512cdEnabled dflags = avx512cd dflags--isAvx512erEnabled :: DynFlags -> Bool-isAvx512erEnabled dflags = avx512er dflags--isAvx512fEnabled :: DynFlags -> Bool-isAvx512fEnabled dflags = avx512f dflags--isAvx512pfEnabled :: DynFlags -> Bool-isAvx512pfEnabled dflags = avx512pf dflags---- -------------------------------------------------------------------------------- BMI2--isBmiEnabled :: DynFlags -> Bool-isBmiEnabled dflags = case platformArch (targetPlatform dflags) of- ArchX86_64 -> bmiVersion dflags >= Just BMI1- ArchX86 -> bmiVersion dflags >= Just BMI1- _ -> False--isBmi2Enabled :: DynFlags -> Bool-isBmi2Enabled dflags = case platformArch (targetPlatform dflags) of- ArchX86_64 -> bmiVersion dflags >= Just BMI2- ArchX86 -> bmiVersion dflags >= Just BMI2- _ -> False---- | Indicate if cost-centre profiling is enabled-sccProfilingEnabled :: DynFlags -> Bool-sccProfilingEnabled dflags = profileIsProfiling (targetProfile dflags)---- | Indicate whether we need to generate source notes-needSourceNotes :: DynFlags -> Bool-needSourceNotes dflags = debugLevel dflags > 0- || gopt Opt_InfoTableMap dflags---- -------------------------------------------------------------------------------- Linker/compiler information---- LinkerInfo contains any extra options needed by the system linker.-data LinkerInfo- = GnuLD [Option]- | GnuGold [Option]- | LlvmLLD [Option]- | DarwinLD [Option]- | SolarisLD [Option]- | AixLD [Option]- | UnknownLD- deriving Eq---- CompilerInfo tells us which C compiler we're using-data CompilerInfo- = GCC- | Clang- | AppleClang- | AppleClang51- | Emscripten- | UnknownCC- deriving Eq----- | Should we use `-XLinker -rpath` when linking or not?--- See Note [-fno-use-rpaths]-useXLinkerRPath :: DynFlags -> OS -> Bool-useXLinkerRPath _ OSDarwin = False -- See Note [Dynamic linking on macOS]-useXLinkerRPath dflags _ = gopt Opt_RPath dflags--{--Note [-fno-use-rpaths]-~~~~~~~~~~~~~~~~~~~~~~--First read, Note [Dynamic linking on macOS] to understand why on darwin we never-use `-XLinker -rpath`.--The specification of `Opt_RPath` is as follows:--The default case `-fuse-rpaths`:-* On darwin, never use `-Xlinker -rpath -Xlinker`, always inject the rpath- afterwards, see `runInjectRPaths`. There is no way to use `-Xlinker` on darwin- as things stand but it wasn't documented in the user guide before this patch how- `-fuse-rpaths` should behave and the fact it was always disabled on darwin.-* Otherwise, use `-Xlinker -rpath -Xlinker` to set the rpath of the executable,- this is the normal way you should set the rpath.--The case of `-fno-use-rpaths`-* Never inject anything into the rpath.--When this was first implemented, `Opt_RPath` was disabled on darwin, but-the rpath was still always augmented by `runInjectRPaths`, and there was no way to-stop this. This was problematic because you couldn't build an executable in CI-with a clean rpath.---}---- -------------------------------------------------------------------------------- RTS hooks---- Convert sizes like "3.5M" into integers-decodeSize :: String -> Integer-decodeSize str- | c == "" = truncate n- | c == "K" || c == "k" = truncate (n * 1000)- | c == "M" || c == "m" = truncate (n * 1000 * 1000)- | c == "G" || c == "g" = truncate (n * 1000 * 1000 * 1000)- | otherwise = throwGhcException (CmdLineError ("can't decode size: " ++ str))- where (m, c) = span pred str- n = readRational m- pred c = isDigit c || c == '.'--foreign import ccall unsafe "setHeapSize" setHeapSize :: Int -> IO ()-foreign import ccall unsafe "enableTimingStats" enableTimingStats :: IO ()----- | Initialize the pretty-printing options-initSDocContext :: DynFlags -> PprStyle -> SDocContext-initSDocContext dflags style = SDC- { sdocStyle = style- , sdocColScheme = colScheme dflags- , sdocLastColour = Col.colReset- , sdocShouldUseColor = overrideWith (canUseColor dflags) (useColor dflags)- , sdocDefaultDepth = pprUserLength dflags- , sdocLineLength = pprCols dflags- , sdocCanUseUnicode = useUnicode dflags- , sdocHexWordLiterals = gopt Opt_HexWordLiterals dflags- , sdocPprDebug = dopt Opt_D_ppr_debug dflags- , sdocPrintUnicodeSyntax = gopt Opt_PrintUnicodeSyntax dflags- , sdocPrintCaseAsLet = gopt Opt_PprCaseAsLet dflags- , sdocPrintTypecheckerElaboration = gopt Opt_PrintTypecheckerElaboration dflags- , sdocPrintAxiomIncomps = gopt Opt_PrintAxiomIncomps dflags- , sdocPrintExplicitKinds = gopt Opt_PrintExplicitKinds dflags- , sdocPrintExplicitCoercions = gopt Opt_PrintExplicitCoercions dflags- , sdocPrintExplicitRuntimeReps = gopt Opt_PrintExplicitRuntimeReps dflags- , sdocPrintExplicitForalls = gopt Opt_PrintExplicitForalls dflags- , sdocPrintPotentialInstances = gopt Opt_PrintPotentialInstances dflags- , sdocPrintEqualityRelations = gopt Opt_PrintEqualityRelations dflags- , sdocSuppressTicks = gopt Opt_SuppressTicks dflags- , sdocSuppressTypeSignatures = gopt Opt_SuppressTypeSignatures dflags- , sdocSuppressTypeApplications = gopt Opt_SuppressTypeApplications dflags- , sdocSuppressIdInfo = gopt Opt_SuppressIdInfo dflags- , sdocSuppressCoercions = gopt Opt_SuppressCoercions dflags- , sdocSuppressCoercionTypes = gopt Opt_SuppressCoercionTypes dflags- , sdocSuppressUnfoldings = gopt Opt_SuppressUnfoldings dflags- , sdocSuppressVarKinds = gopt Opt_SuppressVarKinds dflags- , sdocSuppressUniques = gopt Opt_SuppressUniques dflags- , sdocSuppressModulePrefixes = gopt Opt_SuppressModulePrefixes dflags- , sdocSuppressStgExts = gopt Opt_SuppressStgExts dflags- , sdocSuppressStgReps = gopt Opt_SuppressStgReps dflags- , sdocErrorSpans = gopt Opt_ErrorSpans dflags- , sdocStarIsType = xopt LangExt.StarIsType dflags- , sdocLinearTypes = xopt LangExt.LinearTypes dflags- , sdocListTuplePuns = True- , sdocPrintTypeAbbreviations = True- , sdocUnitIdForUser = ftext- }---- | Initialize the pretty-printing options using the default user style-initDefaultSDocContext :: DynFlags -> SDocContext-initDefaultSDocContext dflags = initSDocContext dflags defaultUserStyle--initPromotionTickContext :: DynFlags -> PromotionTickContext-initPromotionTickContext dflags =- PromTickCtx {- ptcListTuplePuns = True,- ptcPrintRedundantPromTicks = gopt Opt_PrintRedundantPromotionTicks dflags- }--outputFile :: DynFlags -> Maybe String-outputFile dflags- | dynamicNow dflags = dynOutputFile_ dflags- | otherwise = outputFile_ dflags--objectSuf :: DynFlags -> String-objectSuf dflags- | dynamicNow dflags = dynObjectSuf_ dflags- | otherwise = objectSuf_ dflags--ways :: DynFlags -> Ways-ways dflags- | dynamicNow dflags = addWay WayDyn (targetWays_ dflags)- | otherwise = targetWays_ dflags+ wopt_set_all_custom, wopt_unset_all_custom,+ wopt_set_all_fatal_custom, wopt_unset_all_fatal_custom,+ wopt_set_custom, wopt_unset_custom,+ wopt_set_fatal_custom, wopt_unset_fatal_custom,+ wopt_any_custom,+ xopt, xopt_set, xopt_unset,+ xopt_set_unlessExplSpec,+ xopt_DuplicateRecordFields,+ xopt_FieldSelectors,+ lang_set,+ DynamicTooState(..), dynamicTooState, setDynamicNow,+ sccProfilingEnabled,+ needSourceNotes,+ OnOff(..),+ DynFlags(..),+ ParMakeCount(..),+ outputFile, objectSuf, ways,+ FlagSpec(..),+ HasDynFlags(..), ContainsDynFlags(..),+ RtsOptsEnabled(..),+ GhcMode(..), isOneShot,+ GhcLink(..), isNoLink,+ PackageFlag(..), PackageArg(..), ModRenaming(..),+ packageFlagsChanged,+ IgnorePackageFlag(..), TrustFlag(..),+ PackageDBFlag(..), PkgDbRef(..),+ Option(..), showOpt,+ DynLibLoader(..),+ fFlags, fLangFlags, xFlags,+ wWarningFlags,+ makeDynFlagsConsistent,+ positionIndependent,+ optimisationFlags,+ codeGenFlags,+ setFlagsFromEnvFile,+ pprDynFlagsDiff,+ flagSpecOf,++ targetProfile,++ -- ** Safe Haskell+ safeHaskellOn, safeHaskellModeEnabled,+ safeImportsOn, safeLanguageOn, safeInferOn,+ packageTrustOn,+ safeDirectImpsReq, safeImplicitImpsReq,+ unsafeFlags, unsafeFlagsForInfer,++ -- ** System tool settings and locations+ Settings(..),+ sProgramName,+ sProjectVersion,+ sGhcUsagePath,+ sGhciUsagePath,+ sToolDir,+ sTopDir,+ sGlobalPackageDatabasePath,+ sLdSupportsCompactUnwind,+ sLdSupportsFilelist,+ sLdIsGnuLd,+ sGccSupportsNoPie,+ sPgm_L,+ sPgm_P,+ sPgm_F,+ sPgm_c,+ sPgm_cxx,+ sPgm_a,+ sPgm_l,+ sPgm_lm,+ sPgm_dll,+ sPgm_T,+ sPgm_windres,+ sPgm_ar,+ sPgm_ranlib,+ sPgm_lo,+ sPgm_lc,+ sPgm_lcc,+ sPgm_i,+ sOpt_L,+ sOpt_P,+ sOpt_P_fingerprint,+ sOpt_F,+ sOpt_c,+ sOpt_cxx,+ sOpt_a,+ sOpt_l,+ sOpt_lm,+ sOpt_windres,+ sOpt_lo,+ sOpt_lc,+ sOpt_lcc,+ sOpt_i,+ sExtraGccViaCFlags,+ sTargetPlatformString,+ sGhcWithInterpreter,+ sLibFFI,+ GhcNameVersion(..),+ FileSettings(..),+ PlatformMisc(..),+ settings,+ programName, projectVersion,+ ghcUsagePath, ghciUsagePath, topDir,+ versionedAppDir, versionedFilePath,+ extraGccViaCFlags, globalPackageDatabasePath,+ pgm_L, pgm_P, pgm_F, pgm_c, pgm_cxx, pgm_a, pgm_l, pgm_lm, pgm_dll, pgm_T,+ pgm_windres, pgm_ar,+ pgm_ranlib, pgm_lo, pgm_lc, pgm_lcc, pgm_i,+ opt_L, opt_P, opt_F, opt_c, opt_cxx, opt_a, opt_l, opt_lm, opt_i,+ opt_P_signature,+ opt_windres, opt_lo, opt_lc, opt_lcc,+ updatePlatformConstants,++ -- ** Manipulating DynFlags+ addPluginModuleName,+ defaultDynFlags, -- Settings -> DynFlags+ initDynFlags, -- DynFlags -> IO DynFlags+ defaultFatalMessager,+ defaultFlushOut,+ setOutputFile, setDynOutputFile, setOutputHi, setDynOutputHi,+ augmentByWorkingDirectory,++ getOpts, -- DynFlags -> (DynFlags -> [a]) -> [a]+ getVerbFlags,+ updOptLevel,+ setTmpDir,+ setUnitId,++ TurnOnFlag,+ turnOn,+ turnOff,+ impliedGFlags,+ impliedOffGFlags,+ impliedXFlags,++ -- ** State+ CmdLineP(..), runCmdLineP,+ getCmdLineState, putCmdLineState,+ processCmdLineP,++ -- ** Parsing DynFlags+ parseDynamicFlagsCmdLine,+ parseDynamicFilePragma,+ parseDynamicFlagsFull,+ flagSuggestions,++ -- ** Available DynFlags+ allNonDeprecatedFlags,+ flagsAll,+ flagsDynamic,+ flagsPackage,+ flagsForCompletion,++ supportedLanguagesAndExtensions,+ languageExtensions,++ -- ** DynFlags C compiler options+ picCCOpts, picPOpts,++ -- ** DynFlags C linker options+ pieCCLDOpts,++ -- * Compiler configuration suitable for display to the user+ compilerInfo,++ wordAlignment,++ setUnsafeGlobalDynFlags,++ -- * SSE and AVX+ isSse4_2Enabled,+ isBmiEnabled,+ isBmi2Enabled,+ isAvxEnabled,+ isAvx2Enabled,+ isAvx512cdEnabled,+ isAvx512erEnabled,+ isAvx512fEnabled,+ isAvx512pfEnabled,+ isFmaEnabled,++ -- * Linker/compiler information+ LinkerInfo(..),+ CompilerInfo(..),+ useXLinkerRPath,++ -- * Include specifications+ IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes,+ addImplicitQuoteInclude,++ -- * SDoc+ initSDocContext, initDefaultSDocContext,+ initPromotionTickContext,+ ) where++import GHC.Prelude++import GHC.Platform+import GHC.Platform.Ways+import GHC.Platform.Profile++import GHC.Unit.Types+import GHC.Unit.Parser+import GHC.Unit.Module+import GHC.Unit.Module.Warnings+import GHC.Driver.DynFlags+import GHC.Driver.Config.Diagnostic+import GHC.Driver.Flags+import GHC.Driver.Backend+import GHC.Driver.Errors.Types+import GHC.Driver.Plugins.External+import GHC.Settings.Config+import GHC.Core.Unfold+import GHC.Driver.CmdLine+import GHC.Utils.Panic+import GHC.Utils.Misc+import GHC.Utils.Constants (debugIsOn)+import GHC.Utils.GlobalVars+import GHC.Data.Maybe+import GHC.Data.Bool+import GHC.Types.Error+import GHC.Utils.Monad+import GHC.Types.SrcLoc+import GHC.Types.SafeHaskell+import GHC.Types.Basic ( treatZeroAsInf )+import GHC.Data.FastString+import GHC.Utils.TmpFs+import GHC.Utils.Fingerprint+import GHC.Utils.Outputable+import GHC.Settings+import GHC.CmmToAsm.CFG.Weight+import GHC.Core.Opt.CallerCC++import GHC.SysTools.BaseDir ( expandToolDir, expandTopDir )++import Data.IORef+import Control.Arrow ((&&&))+import Control.Monad+import Control.Monad.Trans.State as State+import Data.Functor.Identity++import Data.Ord+import Data.Char+import Data.List (intercalate, sortBy, partition)+import qualified Data.List.NonEmpty as NE+import qualified Data.Map as Map+import qualified Data.Set as Set+import System.FilePath+import Text.ParserCombinators.ReadP hiding (char)+import Text.ParserCombinators.ReadP as R++import qualified GHC.Data.EnumSet as EnumSet++import qualified GHC.LanguageExtensions as LangExt++-- Note [Updating flag description in the User's Guide]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- If you modify anything in this file please make sure that your changes are+-- described in the User's Guide. Please update the flag description in the+-- users guide (docs/users_guide) whenever you add or change a flag.+-- Please make sure you add ":since:" information to new flags.++-- Note [Supporting CLI completion]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- The command line interface completion (in for example bash) is an easy way+-- for the developer to learn what flags are available from GHC.+-- GHC helps by separating which flags are available when compiling with GHC,+-- and which flags are available when using GHCi.+-- A flag is assumed to either work in both these modes, or only in one of them.+-- When adding or changing a flag, please consider for which mode the flag will+-- have effect, and annotate it accordingly. For Flags use defFlag, defGhcFlag,+-- defGhciFlag, and for FlagSpec use flagSpec or flagGhciSpec.++-- Note [Adding a language extension]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- There are a few steps to adding (or removing) a language extension,+--+-- * Adding the extension to GHC.LanguageExtensions+--+-- The Extension type in libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs+-- is the canonical list of language extensions known by GHC.+--+-- * Adding a flag to DynFlags.xFlags+--+-- This is fairly self-explanatory. The name should be concise, memorable,+-- and consistent with any previous implementations of the similar idea in+-- other Haskell compilers.+--+-- * Adding the flag to the documentation+--+-- This is the same as any other flag. See+-- Note [Updating flag description in the User's Guide]+--+-- * Adding the flag to Cabal+--+-- The Cabal library has its own list of all language extensions supported+-- by all major compilers. This is the list that user code being uploaded+-- to Hackage is checked against to ensure language extension validity.+-- Consequently, it is very important that this list remains up-to-date.+--+-- To this end, there is a testsuite test (testsuite/tests/driver/T4437.hs)+-- whose job it is to ensure these GHC's extensions are consistent with+-- Cabal.+--+-- The recommended workflow is,+--+-- 1. Temporarily add your new language extension to the+-- expectedGhcOnlyExtensions list in T4437 to ensure the test doesn't+-- break while Cabal is updated.+--+-- 2. After your GHC change is accepted, submit a Cabal pull request adding+-- your new extension to Cabal's list (found in+-- Cabal/Language/Haskell/Extension.hs).+--+-- 3. After your Cabal change is accepted, let the GHC developers know so+-- they can update the Cabal submodule and remove the extensions from+-- expectedGhcOnlyExtensions.+--+-- * Adding the flag to the GHC Wiki+--+-- There is a change log tracking language extension additions and removals+-- on the GHC wiki: https://gitlab.haskell.org/ghc/ghc/wikis/language-pragma-history+--+-- See #4437 and #8176.++-- -----------------------------------------------------------------------------+-- DynFlags++{- Note [RHS Floating]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ We provide both 'Opt_LocalFloatOut' and 'Opt_LocalFloatOutTopLevel' to correspond to+ 'doFloatFromRhs'; with this we can control floating out with GHC flags.++ This addresses https://gitlab.haskell.org/ghc/ghc/-/issues/13663 and+ allows for experimentation.+-}++-----------------------------------------------------------------------------+-- Accessors from 'DynFlags'++-- | "unbuild" a 'Settings' from a 'DynFlags'. This shouldn't be needed in the+-- vast majority of code. But GHCi questionably uses this to produce a default+-- 'DynFlags' from which to compute a flags diff for printing.+settings :: DynFlags -> Settings+settings dflags = Settings+ { sGhcNameVersion = ghcNameVersion dflags+ , sFileSettings = fileSettings dflags+ , sTargetPlatform = targetPlatform dflags+ , sToolSettings = toolSettings dflags+ , sPlatformMisc = platformMisc dflags+ , sRawSettings = rawSettings dflags+ }++pgm_L :: DynFlags -> String+pgm_L dflags = toolSettings_pgm_L $ toolSettings dflags+pgm_P :: DynFlags -> (String,[Option])+pgm_P dflags = toolSettings_pgm_P $ toolSettings dflags+pgm_F :: DynFlags -> String+pgm_F dflags = toolSettings_pgm_F $ toolSettings dflags+pgm_c :: DynFlags -> String+pgm_c dflags = toolSettings_pgm_c $ toolSettings dflags+pgm_cxx :: DynFlags -> String+pgm_cxx dflags = toolSettings_pgm_cxx $ toolSettings dflags+pgm_a :: DynFlags -> (String,[Option])+pgm_a dflags = toolSettings_pgm_a $ toolSettings dflags+pgm_l :: DynFlags -> (String,[Option])+pgm_l dflags = toolSettings_pgm_l $ toolSettings dflags+pgm_lm :: DynFlags -> Maybe (String,[Option])+pgm_lm dflags = toolSettings_pgm_lm $ toolSettings dflags+pgm_dll :: DynFlags -> (String,[Option])+pgm_dll dflags = toolSettings_pgm_dll $ toolSettings dflags+pgm_T :: DynFlags -> String+pgm_T dflags = toolSettings_pgm_T $ toolSettings dflags+pgm_windres :: DynFlags -> String+pgm_windres dflags = toolSettings_pgm_windres $ toolSettings dflags+pgm_lcc :: DynFlags -> (String,[Option])+pgm_lcc dflags = toolSettings_pgm_lcc $ toolSettings dflags+pgm_ar :: DynFlags -> String+pgm_ar dflags = toolSettings_pgm_ar $ toolSettings dflags+pgm_ranlib :: DynFlags -> String+pgm_ranlib dflags = toolSettings_pgm_ranlib $ toolSettings dflags+pgm_lo :: DynFlags -> (String,[Option])+pgm_lo dflags = toolSettings_pgm_lo $ toolSettings dflags+pgm_lc :: DynFlags -> (String,[Option])+pgm_lc dflags = toolSettings_pgm_lc $ toolSettings dflags+pgm_i :: DynFlags -> String+pgm_i dflags = toolSettings_pgm_i $ toolSettings dflags+opt_L :: DynFlags -> [String]+opt_L dflags = toolSettings_opt_L $ toolSettings dflags+opt_P :: DynFlags -> [String]+opt_P dflags = concatMap (wayOptP (targetPlatform dflags)) (ways dflags)+ ++ toolSettings_opt_P (toolSettings dflags)++-- This function packages everything that's needed to fingerprint opt_P+-- flags. See Note [Repeated -optP hashing].+opt_P_signature :: DynFlags -> ([String], Fingerprint)+opt_P_signature dflags =+ ( concatMap (wayOptP (targetPlatform dflags)) (ways dflags)+ , toolSettings_opt_P_fingerprint $ toolSettings dflags+ )++opt_F :: DynFlags -> [String]+opt_F dflags= toolSettings_opt_F $ toolSettings dflags+opt_c :: DynFlags -> [String]+opt_c dflags = concatMap (wayOptc (targetPlatform dflags)) (ways dflags)+ ++ toolSettings_opt_c (toolSettings dflags)+opt_cxx :: DynFlags -> [String]+opt_cxx dflags= toolSettings_opt_cxx $ toolSettings dflags+opt_a :: DynFlags -> [String]+opt_a dflags= toolSettings_opt_a $ toolSettings dflags+opt_l :: DynFlags -> [String]+opt_l dflags = concatMap (wayOptl (targetPlatform dflags)) (ways dflags)+ ++ toolSettings_opt_l (toolSettings dflags)+opt_lm :: DynFlags -> [String]+opt_lm dflags= toolSettings_opt_lm $ toolSettings dflags+opt_windres :: DynFlags -> [String]+opt_windres dflags= toolSettings_opt_windres $ toolSettings dflags+opt_lcc :: DynFlags -> [String]+opt_lcc dflags= toolSettings_opt_lcc $ toolSettings dflags+opt_lo :: DynFlags -> [String]+opt_lo dflags= toolSettings_opt_lo $ toolSettings dflags+opt_lc :: DynFlags -> [String]+opt_lc dflags= toolSettings_opt_lc $ toolSettings dflags+opt_i :: DynFlags -> [String]+opt_i dflags= toolSettings_opt_i $ toolSettings dflags++-----------------------------------------------------------------------------++{-+Note [Verbosity levels]+~~~~~~~~~~~~~~~~~~~~~~~+ 0 | print errors & warnings only+ 1 | minimal verbosity: print "compiling M ... done." for each module.+ 2 | equivalent to -dshow-passes+ 3 | equivalent to existing "ghc -v"+ 4 | "ghc -v -ddump-most"+ 5 | "ghc -v -ddump-all"+-}++-- | Set the Haskell language standard to use+setLanguage :: Language -> DynP ()+setLanguage l = upd (`lang_set` Just l)++-- | Is the -fpackage-trust mode on+packageTrustOn :: DynFlags -> Bool+packageTrustOn = gopt Opt_PackageTrust++-- | Is Safe Haskell on in some way (including inference mode)+safeHaskellOn :: DynFlags -> Bool+safeHaskellOn dflags = safeHaskellModeEnabled dflags || safeInferOn dflags++safeHaskellModeEnabled :: DynFlags -> Bool+safeHaskellModeEnabled dflags = safeHaskell dflags `elem` [Sf_Unsafe, Sf_Trustworthy+ , Sf_Safe ]+++-- | Is the Safe Haskell safe language in use+safeLanguageOn :: DynFlags -> Bool+safeLanguageOn dflags = safeHaskell dflags == Sf_Safe++-- | Is the Safe Haskell safe inference mode active+safeInferOn :: DynFlags -> Bool+safeInferOn = safeInfer++-- | Test if Safe Imports are on in some form+safeImportsOn :: DynFlags -> Bool+safeImportsOn dflags = safeHaskell dflags == Sf_Unsafe ||+ safeHaskell dflags == Sf_Trustworthy ||+ safeHaskell dflags == Sf_Safe++-- | Set a 'Safe Haskell' flag+setSafeHaskell :: SafeHaskellMode -> DynP ()+setSafeHaskell s = updM f+ where f dfs = do+ let sf = safeHaskell dfs+ safeM <- combineSafeFlags sf s+ case s of+ Sf_Safe -> return $ dfs { safeHaskell = safeM, safeInfer = False }+ -- leave safe inference on in Trustworthy mode so we can warn+ -- if it could have been inferred safe.+ Sf_Trustworthy -> do+ l <- getCurLoc+ return $ dfs { safeHaskell = safeM, trustworthyOnLoc = l }+ -- leave safe inference on in Unsafe mode as well.+ _ -> return $ dfs { safeHaskell = safeM }++-- | Are all direct imports required to be safe for this Safe Haskell mode?+-- Direct imports are when the code explicitly imports a module+safeDirectImpsReq :: DynFlags -> Bool+safeDirectImpsReq d = safeLanguageOn d++-- | Are all implicit imports required to be safe for this Safe Haskell mode?+-- Implicit imports are things in the prelude. e.g System.IO when print is used.+safeImplicitImpsReq :: DynFlags -> Bool+safeImplicitImpsReq d = safeLanguageOn d++-- | Combine two Safe Haskell modes correctly. Used for dealing with multiple flags.+-- This makes Safe Haskell very much a monoid but for now I prefer this as I don't+-- want to export this functionality from the module but do want to export the+-- type constructors.+combineSafeFlags :: SafeHaskellMode -> SafeHaskellMode -> DynP SafeHaskellMode+combineSafeFlags a b | a == Sf_None = return b+ | b == Sf_None = return a+ | a == Sf_Ignore || b == Sf_Ignore = return Sf_Ignore+ | a == b = return a+ | otherwise = addErr errm >> pure a+ where errm = "Incompatible Safe Haskell flags! ("+ ++ show a ++ ", " ++ show b ++ ")"++-- | A list of unsafe flags under Safe Haskell. Tuple elements are:+-- * name of the flag+-- * function to get srcspan that enabled the flag+-- * function to test if the flag is on+-- * function to turn the flag off+unsafeFlags, unsafeFlagsForInfer+ :: [(LangExt.Extension, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]+unsafeFlags = [ (LangExt.GeneralizedNewtypeDeriving, newDerivOnLoc,+ xopt LangExt.GeneralizedNewtypeDeriving,+ flip xopt_unset LangExt.GeneralizedNewtypeDeriving)+ , (LangExt.DerivingVia, deriveViaOnLoc,+ xopt LangExt.DerivingVia,+ flip xopt_unset LangExt.DerivingVia)+ , (LangExt.TemplateHaskell, thOnLoc,+ xopt LangExt.TemplateHaskell,+ flip xopt_unset LangExt.TemplateHaskell)+ ]+unsafeFlagsForInfer = unsafeFlags+++-- | Retrieve the options corresponding to a particular @opt_*@ field in the correct order+getOpts :: DynFlags -- ^ 'DynFlags' to retrieve the options from+ -> (DynFlags -> [a]) -- ^ Relevant record accessor: one of the @opt_*@ accessors+ -> [a] -- ^ Correctly ordered extracted options+getOpts dflags opts = reverse (opts dflags)+ -- We add to the options from the front, so we need to reverse the list++-- | Gets the verbosity flag for the current verbosity level. This is fed to+-- other tools, so GHC-specific verbosity flags like @-ddump-most@ are not included+getVerbFlags :: DynFlags -> [String]+getVerbFlags dflags+ | verbosity dflags >= 4 = ["-v"]+ | otherwise = []++setObjectDir, setHiDir, setHieDir, setStubDir, setDumpDir, setOutputDir,+ setDynObjectSuf, setDynHiSuf,+ setDylibInstallName,+ setObjectSuf, setHiSuf, setHieSuf, setHcSuf, parseDynLibLoaderMode,+ setPgmP, addOptl, addOptc, addOptcxx, addOptP,+ addCmdlineFramework, addHaddockOpts, addGhciScript,+ setInteractivePrint+ :: String -> DynFlags -> DynFlags+setOutputFile, setDynOutputFile, setOutputHi, setDynOutputHi, setDumpPrefixForce+ :: Maybe String -> DynFlags -> DynFlags++setObjectDir f d = d { objectDir = Just f}+setHiDir f d = d { hiDir = Just f}+setHieDir f d = d { hieDir = Just f}+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).+setDumpDir f d = d { dumpDir = Just f}+setOutputDir f = setObjectDir f+ . setHieDir f+ . setHiDir f+ . setStubDir f+ . setDumpDir f+setDylibInstallName f d = d { dylibInstallName = Just f}++setObjectSuf f d = d { objectSuf_ = f}+setDynObjectSuf f d = d { dynObjectSuf_ = f}+setHiSuf f d = d { hiSuf_ = f}+setHieSuf f d = d { hieSuf = f}+setDynHiSuf f d = d { dynHiSuf_ = f}+setHcSuf f d = d { hcSuf = f}++setOutputFile f d = d { outputFile_ = f}+setDynOutputFile f d = d { dynOutputFile_ = f}+setOutputHi f d = d { outputHi = f}+setDynOutputHi f d = d { dynOutputHi = f}++parseUnitInsts :: String -> Instantiations+parseUnitInsts str = case filter ((=="").snd) (readP_to_S parse str) of+ [(r, "")] -> r+ _ -> throwGhcException $ CmdLineError ("Can't parse -instantiated-with: " ++ str)+ where parse = sepBy parseEntry (R.char ',')+ parseEntry = do+ n <- parseModuleName+ _ <- R.char '='+ m <- parseHoleyModule+ return (n, m)++setUnitInstantiations :: String -> DynFlags -> DynFlags+setUnitInstantiations s d =+ d { homeUnitInstantiations_ = parseUnitInsts s }++setUnitInstanceOf :: String -> DynFlags -> DynFlags+setUnitInstanceOf s d =+ d { homeUnitInstanceOf_ = Just (UnitId (fsLit s)) }++addPluginModuleName :: String -> DynFlags -> DynFlags+addPluginModuleName name d = d { pluginModNames = (mkModuleName name) : (pluginModNames d) }++clearPluginModuleNames :: DynFlags -> DynFlags+clearPluginModuleNames d =+ d { pluginModNames = []+ , pluginModNameOpts = []+ }++addPluginModuleNameOption :: String -> DynFlags -> DynFlags+addPluginModuleNameOption optflag d = d { pluginModNameOpts = (mkModuleName m, option) : (pluginModNameOpts d) }+ where (m, rest) = break (== ':') optflag+ option = case rest of+ [] -> "" -- should probably signal an error+ (_:plug_opt) -> plug_opt -- ignore the ':' from break++addExternalPlugin :: String -> DynFlags -> DynFlags+addExternalPlugin optflag d = case parseExternalPluginSpec optflag of+ Just r -> d { externalPluginSpecs = r : externalPluginSpecs d }+ Nothing -> cmdLineError $ "Couldn't parse external plugin specification: " ++ optflag++addFrontendPluginOption :: String -> DynFlags -> DynFlags+addFrontendPluginOption s d = d { frontendPluginOpts = s : frontendPluginOpts d }++parseDynLibLoaderMode f d =+ case splitAt 8 f of+ ("deploy", "") -> d { dynLibLoader = Deployable }+ ("sysdep", "") -> d { dynLibLoader = SystemDependent }+ _ -> throwGhcException (CmdLineError ("Unknown dynlib loader: " ++ f))++setDumpPrefixForce f d = d { dumpPrefixForce = f}++-- XXX HACK: Prelude> words "'does not' work" ===> ["'does","not'","work"]+-- Config.hs should really use Option.+setPgmP f = alterToolSettings (\s -> s { toolSettings_pgm_P = (pgm, map Option args)})+ where (pgm:args) = words f+addOptl f = alterToolSettings (\s -> s { toolSettings_opt_l = f : toolSettings_opt_l s})+addOptc f = alterToolSettings (\s -> s { toolSettings_opt_c = f : toolSettings_opt_c s})+addOptcxx f = alterToolSettings (\s -> s { toolSettings_opt_cxx = f : toolSettings_opt_cxx s})+addOptP f = alterToolSettings $ \s -> s+ { toolSettings_opt_P = f : toolSettings_opt_P s+ , toolSettings_opt_P_fingerprint = fingerprintStrings (f : toolSettings_opt_P s)+ }+ -- See Note [Repeated -optP hashing]+ where+ fingerprintStrings ss = fingerprintFingerprints $ map fingerprintString ss+++setDepMakefile :: FilePath -> DynFlags -> DynFlags+setDepMakefile f d = d { depMakefile = f }++setDepIncludeCppDeps :: Bool -> DynFlags -> DynFlags+setDepIncludeCppDeps b d = d { depIncludeCppDeps = b }++setDepIncludePkgDeps :: Bool -> DynFlags -> DynFlags+setDepIncludePkgDeps b d = d { depIncludePkgDeps = b }++addDepExcludeMod :: String -> DynFlags -> DynFlags+addDepExcludeMod m d+ = d { depExcludeMods = mkModuleName m : depExcludeMods d }++addDepSuffix :: FilePath -> DynFlags -> DynFlags+addDepSuffix s d = d { depSuffixes = s : depSuffixes d }++addCmdlineFramework f d = d { cmdlineFrameworks = f : cmdlineFrameworks d}++addGhcVersionFile :: FilePath -> DynFlags -> DynFlags+addGhcVersionFile f d = d { ghcVersionFile = Just f }++addHaddockOpts f d = d { haddockOptions = Just f}++addGhciScript f d = d { ghciScripts = f : ghciScripts d}++setInteractivePrint f d = d { interactivePrint = Just f}++-----------------------------------------------------------------------------+-- Setting the optimisation level++updOptLevelChanged :: Int -> DynFlags -> (DynFlags, Bool)+-- ^ Sets the 'DynFlags' to be appropriate to the optimisation level and signals if any changes took place+updOptLevelChanged n dfs+ = (dfs3, changed1 || changed2 || changed3)+ where+ final_n = max 0 (min 2 n) -- Clamp to 0 <= n <= 2+ (dfs1, changed1) = foldr unset (dfs , False) remove_gopts+ (dfs2, changed2) = foldr set (dfs1, False) extra_gopts+ (dfs3, changed3) = setLlvmOptLevel dfs2++ extra_gopts = [ f | (ns,f) <- optLevelFlags, final_n `elem` ns ]+ remove_gopts = [ f | (ns,f) <- optLevelFlags, final_n `notElem` ns ]++ set f (dfs, changed)+ | gopt f dfs = (dfs, changed)+ | otherwise = (gopt_set dfs f, True)++ unset f (dfs, changed)+ | not (gopt f dfs) = (dfs, changed)+ | otherwise = (gopt_unset dfs f, True)++ setLlvmOptLevel dfs+ | llvmOptLevel dfs /= final_n = (dfs{ llvmOptLevel = final_n }, True)+ | otherwise = (dfs, False)++updOptLevel :: Int -> DynFlags -> DynFlags+-- ^ Sets the 'DynFlags' to be appropriate to the optimisation level+updOptLevel n = fst . updOptLevelChanged n++{- **********************************************************************+%* *+ DynFlags parser+%* *+%********************************************************************* -}++-- -----------------------------------------------------------------------------+-- Parsing the dynamic flags.+++-- | Parse dynamic flags from a list of command line arguments. Returns+-- the parsed 'DynFlags', the left-over arguments, and a list of warnings.+-- Throws a 'UsageError' if errors occurred during parsing (such as unknown+-- flags or missing arguments).+parseDynamicFlagsCmdLine :: MonadIO m => DynFlags -> [Located String]+ -> m (DynFlags, [Located String], Messages DriverMessage)+ -- ^ Updated 'DynFlags', left-over arguments, and+ -- list of warnings.+parseDynamicFlagsCmdLine = parseDynamicFlagsFull flagsAll True+++-- | Like 'parseDynamicFlagsCmdLine' but does not allow the package flags+-- (-package, -hide-package, -ignore-package, -hide-all-packages, -package-db).+-- Used to parse flags set in a modules pragma.+parseDynamicFilePragma :: MonadIO m => DynFlags -> [Located String]+ -> m (DynFlags, [Located String], Messages DriverMessage)+ -- ^ Updated 'DynFlags', left-over arguments, and+ -- list of warnings.+parseDynamicFilePragma = parseDynamicFlagsFull flagsDynamic False++newtype CmdLineP s a = CmdLineP (forall m. (Monad m) => StateT s m a)+ deriving (Functor)++instance Monad (CmdLineP s) where+ CmdLineP k >>= f = CmdLineP (k >>= \x -> case f x of CmdLineP g -> g)+ return = pure++instance Applicative (CmdLineP s) where+ pure x = CmdLineP (pure x)+ (<*>) = ap++getCmdLineState :: CmdLineP s s+getCmdLineState = CmdLineP State.get++putCmdLineState :: s -> CmdLineP s ()+putCmdLineState x = CmdLineP (State.put x)++runCmdLineP :: CmdLineP s a -> s -> (a, s)+runCmdLineP (CmdLineP k) s0 = runIdentity $ runStateT k s0++-- | A helper to parse a set of flags from a list of command-line arguments, handling+-- response files.+processCmdLineP+ :: forall s m. MonadIO m+ => [Flag (CmdLineP s)] -- ^ valid flags to match against+ -> s -- ^ current state+ -> [Located String] -- ^ arguments to parse+ -> m (([Located String], [Err], [Warn]), s)+ -- ^ (leftovers, errors, warnings)+processCmdLineP activeFlags s0 args =+ runStateT (processArgs (map (hoistFlag getCmdLineP) activeFlags) args parseResponseFile) s0+ where+ getCmdLineP :: CmdLineP s a -> StateT s m a+ getCmdLineP (CmdLineP k) = k++-- | Parses the dynamically set flags for GHC. This is the most general form of+-- the dynamic flag parser that the other methods simply wrap. It allows+-- saying which flags are valid flags and indicating if we are parsing+-- arguments from the command line or from a file pragma.+parseDynamicFlagsFull+ :: forall m. MonadIO m+ => [Flag (CmdLineP DynFlags)] -- ^ valid flags to match against+ -> Bool -- ^ are the arguments from the command line?+ -> DynFlags -- ^ current dynamic flags+ -> [Located String] -- ^ arguments to parse+ -> m (DynFlags, [Located String], Messages DriverMessage)+parseDynamicFlagsFull activeFlags cmdline dflags0 args = do+ ((leftover, errs, cli_warns), dflags1) <- processCmdLineP activeFlags dflags0 args++ -- See Note [Handling errors when parsing command-line flags]+ let rdr = renderWithContext (initSDocContext dflags0 defaultUserStyle)+ unless (null errs) $ liftIO $ throwGhcExceptionIO $ errorsToGhcException $+ map ((rdr . ppr . getLoc &&& unLoc) . errMsg) $ errs++ -- check for disabled flags in safe haskell+ let (dflags2, sh_warns) = safeFlagCheck cmdline dflags1+ theWays = ways dflags2++ unless (allowed_combination theWays) $ liftIO $+ throwGhcExceptionIO (CmdLineError ("combination not supported: " +++ intercalate "/" (map wayDesc (Set.toAscList theWays))))++ let (dflags3, consistency_warnings) = makeDynFlagsConsistent dflags2++ -- Set timer stats & heap size+ when (enableTimeStats dflags3) $ liftIO enableTimingStats+ case (ghcHeapSize dflags3) of+ Just x -> liftIO (setHeapSize x)+ _ -> return ()++ liftIO $ setUnsafeGlobalDynFlags dflags3++ -- create message envelopes using final DynFlags: #23402+ let diag_opts = initDiagOpts dflags3+ warns = warnsToMessages diag_opts $ mconcat [consistency_warnings, sh_warns, cli_warns]++ return (dflags3, leftover, warns)++-- | Check (and potentially disable) any extensions that aren't allowed+-- in safe mode.+--+-- The bool is to indicate if we are parsing command line flags (false means+-- file pragma). This allows us to generate better warnings.+safeFlagCheck :: Bool -> DynFlags -> (DynFlags, [Warn])+safeFlagCheck _ dflags | safeLanguageOn dflags = (dflagsUnset, warns)+ where+ -- Handle illegal flags under safe language.+ (dflagsUnset, warns) = foldl' check_method (dflags, mempty) unsafeFlags++ check_method (df, warns) (ext,loc,test,fix)+ | test df = (fix df, safeFailure (loc df) ext : warns)+ | otherwise = (df, warns)++ safeFailure loc ext+ = L loc $ DriverSafeHaskellIgnoredExtension ext++safeFlagCheck cmdl dflags =+ case safeInferOn dflags of+ True -> (dflags' { safeInferred = safeFlags }, warn)+ False -> (dflags', warn)++ where+ -- dynflags and warn for when -fpackage-trust by itself with no safe+ -- haskell flag+ (dflags', warn)+ | not (safeHaskellModeEnabled dflags) && not cmdl && packageTrustOn dflags+ = (gopt_unset dflags Opt_PackageTrust, pkgWarnMsg)+ | otherwise = (dflags, mempty)++ pkgWarnMsg :: [Warn]+ pkgWarnMsg = [ L (pkgTrustOnLoc dflags') DriverPackageTrustIgnored ]++ -- Have we inferred Unsafe? See Note [Safe Haskell Inference] in GHC.Driver.Main+ -- Force this to avoid retaining reference to old DynFlags value+ !safeFlags = all (\(_,_,t,_) -> not $ t dflags) unsafeFlagsForInfer++-- | Produce a list of suggestions for a user provided flag that is invalid.+flagSuggestions+ :: [String] -- valid flags to match against+ -> String+ -> [String]+flagSuggestions flags userInput+ -- fixes #11789+ -- If the flag contains '=',+ -- this uses both the whole and the left side of '=' for comparing.+ | elem '=' userInput =+ let (flagsWithEq, flagsWithoutEq) = partition (elem '=') flags+ fName = takeWhile (/= '=') userInput+ in (fuzzyMatch userInput flagsWithEq) ++ (fuzzyMatch fName flagsWithoutEq)+ | otherwise = fuzzyMatch userInput flags++{- **********************************************************************+%* *+ DynFlags specifications+%* *+%********************************************************************* -}++-- | All dynamic flags option strings without the deprecated ones.+-- These are the user facing strings for enabling and disabling options.+allNonDeprecatedFlags :: [String]+allNonDeprecatedFlags = allFlagsDeps False++-- | All flags with possibility to filter deprecated ones+allFlagsDeps :: Bool -> [String]+allFlagsDeps keepDeprecated = [ '-':flagName flag+ | (deprecated, flag) <- flagsAllDeps+ , keepDeprecated || not (isDeprecated deprecated)]+ where isDeprecated Deprecated = True+ isDeprecated _ = False++{-+ - Below we export user facing symbols for GHC dynamic flags for use with the+ - GHC API.+ -}++-- All dynamic flags present in GHC.+flagsAll :: [Flag (CmdLineP DynFlags)]+flagsAll = map snd flagsAllDeps++-- All dynamic flags present in GHC with deprecation information.+flagsAllDeps :: [(Deprecation, Flag (CmdLineP DynFlags))]+flagsAllDeps = package_flags_deps ++ dynamic_flags_deps+++-- All dynamic flags, minus package flags, present in GHC.+flagsDynamic :: [Flag (CmdLineP DynFlags)]+flagsDynamic = map snd dynamic_flags_deps++-- ALl package flags present in GHC.+flagsPackage :: [Flag (CmdLineP DynFlags)]+flagsPackage = map snd package_flags_deps++----------------Helpers to make flags and keep deprecation information----------++type FlagMaker m = String -> OptKind m -> Flag m+type DynFlagMaker = FlagMaker (CmdLineP DynFlags)+data Deprecation = NotDeprecated | Deprecated deriving (Eq, Ord)++-- Make a non-deprecated flag+make_ord_flag :: DynFlagMaker -> String -> OptKind (CmdLineP DynFlags)+ -> (Deprecation, Flag (CmdLineP DynFlags))+make_ord_flag fm name kind = (NotDeprecated, fm name kind)++-- Make a deprecated flag+make_dep_flag :: DynFlagMaker -> String -> OptKind (CmdLineP DynFlags) -> String+ -> (Deprecation, Flag (CmdLineP DynFlags))+make_dep_flag fm name kind message = (Deprecated,+ fm name $ add_dep_message kind message)++add_dep_message :: OptKind (CmdLineP DynFlags) -> String+ -> OptKind (CmdLineP DynFlags)+add_dep_message (NoArg f) message = NoArg $ f >> deprecate message+add_dep_message (HasArg f) message = HasArg $ \s -> f s >> deprecate message+add_dep_message (SepArg f) message = SepArg $ \s -> f s >> deprecate message+add_dep_message (Prefix f) message = Prefix $ \s -> f s >> deprecate message+add_dep_message (OptPrefix f) message =+ OptPrefix $ \s -> f s >> deprecate message+add_dep_message (OptIntSuffix f) message =+ OptIntSuffix $ \oi -> f oi >> deprecate message+add_dep_message (IntSuffix f) message =+ IntSuffix $ \i -> f i >> deprecate message+add_dep_message (WordSuffix f) message =+ WordSuffix $ \i -> f i >> deprecate message+add_dep_message (FloatSuffix f) message =+ FloatSuffix $ \fl -> f fl >> deprecate message+add_dep_message (PassFlag f) message =+ PassFlag $ \s -> f s >> deprecate message+add_dep_message (AnySuffix f) message =+ AnySuffix $ \s -> f s >> deprecate message++----------------------- The main flags themselves ------------------------------+-- See Note [Updating flag description in the User's Guide]+-- See Note [Supporting CLI completion]+dynamic_flags_deps :: [(Deprecation, Flag (CmdLineP DynFlags))]+dynamic_flags_deps = [+ make_dep_flag defFlag "n" (NoArg $ return ())+ "The -n flag is deprecated and no longer has any effect"+ , make_ord_flag defFlag "cpp" (NoArg (setExtensionFlag LangExt.Cpp))+ , make_ord_flag defFlag "F" (NoArg (setGeneralFlag Opt_Pp))+ , (Deprecated, defFlag "#include"+ (HasArg (\_s ->+ deprecate ("-#include and INCLUDE pragmas are " +++ "deprecated: They no longer have any effect"))))+ , make_ord_flag defFlag "v" (OptIntSuffix setVerbosity)++ , make_ord_flag defGhcFlag "j" (OptIntSuffix+ (\n -> case n of+ Just n+ | n > 0 -> upd (\d -> d { parMakeCount = Just (ParMakeThisMany n) })+ | otherwise -> addErr "Syntax: -j[n] where n > 0"+ Nothing -> upd (\d -> d { parMakeCount = Just ParMakeNumProcessors })))+ -- When the number of parallel builds+ -- is omitted, it is the same+ -- as specifying that the number of+ -- parallel builds is equal to the+ -- result of getNumProcessors+ , make_ord_flag defGhcFlag "jsem" $ hasArg $ \f d -> d { parMakeCount = Just (ParMakeSemaphore f) }++ , make_ord_flag defFlag "instantiated-with" (sepArg setUnitInstantiations)+ , make_ord_flag defFlag "this-component-id" (sepArg setUnitInstanceOf)++ -- RTS options -------------------------------------------------------------+ , make_ord_flag defFlag "H" (HasArg (\s -> upd (\d ->+ d { ghcHeapSize = Just $ fromIntegral (decodeSize s)})))++ , make_ord_flag defFlag "Rghc-timing" (NoArg (upd (\d ->+ d { enableTimeStats = True })))++ ------- ways ---------------------------------------------------------------+ , make_ord_flag defGhcFlag "prof" (NoArg (addWayDynP WayProf))+ , (Deprecated, defFlag "eventlog"+ $ noArgM $ \d -> do+ deprecate "the eventlog is now enabled in all runtime system ways"+ return d)+ , make_ord_flag defGhcFlag "debug" (NoArg (addWayDynP WayDebug))+ , make_ord_flag defGhcFlag "threaded" (NoArg (addWayDynP WayThreaded))+ , make_ord_flag defGhcFlag "single-threaded" (NoArg (removeWayDynP WayThreaded))++ , make_ord_flag defGhcFlag "ticky"+ (NoArg (setGeneralFlag Opt_Ticky >> addWayDynP WayDebug))++ -- -ticky enables ticky-ticky code generation, and also implies -debug which+ -- is required to get the RTS ticky support.++ ----- Linker --------------------------------------------------------+ , make_ord_flag defGhcFlag "static" (NoArg (removeWayDynP WayDyn))+ , make_ord_flag defGhcFlag "dynamic" (NoArg (addWayDynP WayDyn))+ , make_ord_flag defGhcFlag "rdynamic" $ noArg $+#if defined(linux_HOST_OS)+ addOptl "-rdynamic"+#elif defined(mingw32_HOST_OS)+ addOptl "-Wl,--export-all-symbols"+#else+ -- ignored for compat w/ gcc:+ id+#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))++ ------- Specific phases --------------------------------------------+ -- need to appear before -pgmL to be parsed as LLVM flags.+ , make_ord_flag defFlag "pgmlo"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_lo = (f,[]) }+ , make_ord_flag defFlag "pgmlc"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_lc = (f,[]) }+ , make_ord_flag defFlag "pgmlm"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_lm =+ if null f then Nothing else Just (f,[]) }+ , make_ord_flag defFlag "pgmi"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_i = f }+ , make_ord_flag defFlag "pgmL"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_L = f }+ , make_ord_flag defFlag "pgmP"+ (hasArg setPgmP)+ , make_ord_flag defFlag "pgmF"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_F = f }+ , make_ord_flag defFlag "pgmc"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_c = f }+ , make_ord_flag defFlag "pgmcxx"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_cxx = f }+ , (Deprecated, defFlag "pgmc-supports-no-pie"+ $ noArgM $ \d -> do+ deprecate $ "use -pgml-supports-no-pie instead"+ pure $ alterToolSettings (\s -> s { toolSettings_ccSupportsNoPie = True }) d)+ , make_ord_flag defFlag "pgms"+ (HasArg (\_ -> addWarn "Object splitting was removed in GHC 8.8"))+ , make_ord_flag defFlag "pgma"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_a = (f,[]) }+ , make_ord_flag defFlag "pgml"+ $ hasArg $ \f -> alterToolSettings $ \s -> s+ { toolSettings_pgm_l = (f,[])+ , -- Don't pass -no-pie with custom -pgml (see #15319). Note+ -- that this could break when -no-pie is actually needed.+ -- But the CC_SUPPORTS_NO_PIE check only happens at+ -- buildtime, and -pgml is a runtime option. A better+ -- solution would be running this check for each custom+ -- -pgml.+ toolSettings_ccSupportsNoPie = False+ }+ , make_ord_flag defFlag "pgml-supports-no-pie"+ $ noArg $ alterToolSettings $ \s -> s { toolSettings_ccSupportsNoPie = True }+ , make_ord_flag defFlag "pgmdll"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_dll = (f,[]) }+ , make_ord_flag defFlag "pgmwindres"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_windres = f }+ , make_ord_flag defFlag "pgmar"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_ar = f }+ , make_ord_flag defFlag "pgmotool"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_otool = f}+ , make_ord_flag defFlag "pgminstall_name_tool"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_install_name_tool = f}+ , make_ord_flag defFlag "pgmranlib"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_ranlib = f }+++ -- need to appear before -optl/-opta to be parsed as LLVM flags.+ , make_ord_flag defFlag "optlm"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_lm = f : toolSettings_opt_lm s }+ , make_ord_flag defFlag "optlo"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_lo = f : toolSettings_opt_lo s }+ , make_ord_flag defFlag "optlc"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_lc = f : toolSettings_opt_lc s }+ , make_ord_flag defFlag "opti"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_i = f : toolSettings_opt_i s }+ , make_ord_flag defFlag "optL"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_L = f : toolSettings_opt_L s }+ , make_ord_flag defFlag "optP"+ (hasArg addOptP)+ , make_ord_flag defFlag "optF"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_F = f : toolSettings_opt_F s }+ , make_ord_flag defFlag "optc"+ (hasArg addOptc)+ , make_ord_flag defFlag "optcxx"+ (hasArg addOptcxx)+ , make_ord_flag defFlag "opta"+ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_a = f : toolSettings_opt_a s }+ , make_ord_flag defFlag "optl"+ (hasArg addOptl)+ , make_ord_flag defFlag "optwindres"+ $ hasArg $ \f ->+ alterToolSettings $ \s -> s { toolSettings_opt_windres = f : toolSettings_opt_windres s }++ , make_ord_flag defGhcFlag "split-objs"+ (NoArg $ addWarn "ignoring -split-objs")++ -- N.B. We may someday deprecate this in favor of -fsplit-sections,+ -- which has the benefit of also having a negating -fno-split-sections.+ , make_ord_flag defGhcFlag "split-sections"+ (NoArg $ setGeneralFlag Opt_SplitSections)++ -------- ghc -M -----------------------------------------------------+ , make_ord_flag defGhcFlag "dep-suffix" (hasArg addDepSuffix)+ , make_ord_flag defGhcFlag "dep-makefile" (hasArg setDepMakefile)+ , make_ord_flag defGhcFlag "include-cpp-deps"+ (noArg (setDepIncludeCppDeps True))+ , make_ord_flag defGhcFlag "include-pkg-deps"+ (noArg (setDepIncludePkgDeps True))+ , make_ord_flag defGhcFlag "exclude-module" (hasArg addDepExcludeMod)++ -------- Linking ----------------------------------------------------+ , make_ord_flag defGhcFlag "no-link"+ (noArg (\d -> d { ghcLink=NoLink }))+ , make_ord_flag defGhcFlag "shared"+ (noArg (\d -> d { ghcLink=LinkDynLib }))+ , make_ord_flag defGhcFlag "staticlib"+ (noArg (\d -> setGeneralFlag' Opt_LinkRts (d { ghcLink=LinkStaticLib })))+ , make_ord_flag defGhcFlag "-merge-objs"+ (noArg (\d -> d { ghcLink=LinkMergedObj }))+ , make_ord_flag defGhcFlag "dynload" (hasArg parseDynLibLoaderMode)+ , make_ord_flag defGhcFlag "dylib-install-name" (hasArg setDylibInstallName)++ ------- Libraries ---------------------------------------------------+ , make_ord_flag defFlag "L" (Prefix addLibraryPath)+ , make_ord_flag defFlag "l" (hasArg (addLdInputs . Option . ("-l" ++)))++ ------- Frameworks --------------------------------------------------+ -- -framework-path should really be -F ...+ , make_ord_flag defFlag "framework-path" (HasArg addFrameworkPath)+ , make_ord_flag defFlag "framework" (hasArg addCmdlineFramework)++ ------- Output Redirection ------------------------------------------+ , make_ord_flag defGhcFlag "odir" (hasArg setObjectDir)+ , make_ord_flag defGhcFlag "o" (sepArg (setOutputFile . Just))+ , make_ord_flag defGhcFlag "dyno"+ (sepArg (setDynOutputFile . Just))+ , make_ord_flag defGhcFlag "ohi"+ (hasArg (setOutputHi . Just ))+ , make_ord_flag defGhcFlag "dynohi"+ (hasArg (setDynOutputHi . Just ))+ , make_ord_flag defGhcFlag "osuf" (hasArg setObjectSuf)+ , make_ord_flag defGhcFlag "dynosuf" (hasArg setDynObjectSuf)+ , make_ord_flag defGhcFlag "hcsuf" (hasArg setHcSuf)+ , make_ord_flag defGhcFlag "hisuf" (hasArg setHiSuf)+ , make_ord_flag defGhcFlag "hiesuf" (hasArg setHieSuf)+ , make_ord_flag defGhcFlag "dynhisuf" (hasArg setDynHiSuf)+ , make_ord_flag defGhcFlag "hidir" (hasArg setHiDir)+ , make_ord_flag defGhcFlag "hiedir" (hasArg setHieDir)+ , make_ord_flag defGhcFlag "tmpdir" (hasArg setTmpDir)+ , make_ord_flag defGhcFlag "stubdir" (hasArg setStubDir)+ , make_ord_flag defGhcFlag "dumpdir" (hasArg setDumpDir)+ , make_ord_flag defGhcFlag "outputdir" (hasArg setOutputDir)+ , make_ord_flag defGhcFlag "ddump-file-prefix"+ (hasArg (setDumpPrefixForce . Just . flip (++) "."))++ , make_ord_flag defGhcFlag "dynamic-too"+ (NoArg (setGeneralFlag Opt_BuildDynamicToo))++ ------- Keeping temporary files -------------------------------------+ -- These can be singular (think ghc -c) or plural (think ghc --make)+ , make_ord_flag defGhcFlag "keep-hc-file"+ (NoArg (setGeneralFlag Opt_KeepHcFiles))+ , make_ord_flag defGhcFlag "keep-hc-files"+ (NoArg (setGeneralFlag Opt_KeepHcFiles))+ , make_ord_flag defGhcFlag "keep-hscpp-file"+ (NoArg (setGeneralFlag Opt_KeepHscppFiles))+ , make_ord_flag defGhcFlag "keep-hscpp-files"+ (NoArg (setGeneralFlag Opt_KeepHscppFiles))+ , make_ord_flag defGhcFlag "keep-s-file"+ (NoArg (setGeneralFlag Opt_KeepSFiles))+ , make_ord_flag defGhcFlag "keep-s-files"+ (NoArg (setGeneralFlag Opt_KeepSFiles))+ , make_ord_flag defGhcFlag "keep-llvm-file"+ (NoArg $ setObjBackend llvmBackend >> setGeneralFlag Opt_KeepLlvmFiles)+ , make_ord_flag defGhcFlag "keep-llvm-files"+ (NoArg $ setObjBackend llvmBackend >> setGeneralFlag Opt_KeepLlvmFiles)+ -- This only makes sense as plural+ , make_ord_flag defGhcFlag "keep-tmp-files"+ (NoArg (setGeneralFlag Opt_KeepTmpFiles))+ , make_ord_flag defGhcFlag "keep-hi-file"+ (NoArg (setGeneralFlag Opt_KeepHiFiles))+ , make_ord_flag defGhcFlag "no-keep-hi-file"+ (NoArg (unSetGeneralFlag Opt_KeepHiFiles))+ , make_ord_flag defGhcFlag "keep-hi-files"+ (NoArg (setGeneralFlag Opt_KeepHiFiles))+ , make_ord_flag defGhcFlag "no-keep-hi-files"+ (NoArg (unSetGeneralFlag Opt_KeepHiFiles))+ , make_ord_flag defGhcFlag "keep-o-file"+ (NoArg (setGeneralFlag Opt_KeepOFiles))+ , make_ord_flag defGhcFlag "no-keep-o-file"+ (NoArg (unSetGeneralFlag Opt_KeepOFiles))+ , make_ord_flag defGhcFlag "keep-o-files"+ (NoArg (setGeneralFlag Opt_KeepOFiles))+ , make_ord_flag defGhcFlag "no-keep-o-files"+ (NoArg (unSetGeneralFlag Opt_KeepOFiles))++ ------- Miscellaneous ----------------------------------------------+ , make_ord_flag defGhcFlag "no-auto-link-packages"+ (NoArg (unSetGeneralFlag Opt_AutoLinkPackages))+ , make_ord_flag defGhcFlag "no-hs-main"+ (NoArg (setGeneralFlag Opt_NoHsMain))+ , make_ord_flag defGhcFlag "fno-state-hack"+ (NoArg (setGeneralFlag Opt_G_NoStateHack))+ , make_ord_flag defGhcFlag "fno-opt-coercion"+ (NoArg (setGeneralFlag Opt_G_NoOptCoercion))+ , make_ord_flag defGhcFlag "with-rtsopts"+ (HasArg setRtsOpts)+ , make_ord_flag defGhcFlag "rtsopts"+ (NoArg (setRtsOptsEnabled RtsOptsAll))+ , make_ord_flag defGhcFlag "rtsopts=all"+ (NoArg (setRtsOptsEnabled RtsOptsAll))+ , make_ord_flag defGhcFlag "rtsopts=some"+ (NoArg (setRtsOptsEnabled RtsOptsSafeOnly))+ , make_ord_flag defGhcFlag "rtsopts=none"+ (NoArg (setRtsOptsEnabled RtsOptsNone))+ , make_ord_flag defGhcFlag "rtsopts=ignore"+ (NoArg (setRtsOptsEnabled RtsOptsIgnore))+ , make_ord_flag defGhcFlag "rtsopts=ignoreAll"+ (NoArg (setRtsOptsEnabled RtsOptsIgnoreAll))+ , make_ord_flag defGhcFlag "no-rtsopts"+ (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)+ , make_ord_flag defGhcFlag "haddock" (NoArg (setGeneralFlag Opt_Haddock))+ , make_ord_flag defGhcFlag "no-haddock" (NoArg (unSetGeneralFlag Opt_Haddock))+ , make_ord_flag defGhcFlag "haddock-opts" (hasArg addHaddockOpts)+ , make_ord_flag defGhcFlag "hpcdir" (SepArg setOptHpcDir)+ , make_ord_flag defGhciFlag "ghci-script" (hasArg addGhciScript)+ , make_ord_flag defGhciFlag "interactive-print" (hasArg setInteractivePrint)+ , make_ord_flag defGhcFlag "ticky-allocd"+ (NoArg (setGeneralFlag Opt_Ticky_Allocd))+ , make_ord_flag defGhcFlag "ticky-LNE"+ (NoArg (setGeneralFlag Opt_Ticky_LNE))+ , make_ord_flag defGhcFlag "ticky-ap-thunk"+ (NoArg (setGeneralFlag Opt_Ticky_AP))+ , make_ord_flag defGhcFlag "ticky-dyn-thunk"+ (NoArg (setGeneralFlag Opt_Ticky_Dyn_Thunk))+ , make_ord_flag defGhcFlag "ticky-tag-checks"+ (NoArg (setGeneralFlag Opt_Ticky_Tag))+ ------- recompilation checker --------------------------------------+ , make_dep_flag defGhcFlag "recomp"+ (NoArg $ unSetGeneralFlag Opt_ForceRecomp)+ "Use -fno-force-recomp instead"+ , make_dep_flag defGhcFlag "no-recomp"+ (NoArg $ setGeneralFlag Opt_ForceRecomp) "Use -fforce-recomp instead"+ , make_ord_flag defFlag "fmax-errors"+ (intSuffix (\n d -> d { maxErrors = Just (max 1 n) }))+ , make_ord_flag defFlag "fno-max-errors"+ (noArg (\d -> d { maxErrors = Nothing }))+ , make_ord_flag defFlag "freverse-errors"+ (noArg (\d -> d {reverseErrors = True} ))+ , make_ord_flag defFlag "fno-reverse-errors"+ (noArg (\d -> d {reverseErrors = False} ))++ ------ HsCpp opts ---------------------------------------------------+ , make_ord_flag defFlag "D" (AnySuffix (upd . addOptP))+ , make_ord_flag defFlag "U" (AnySuffix (upd . addOptP))++ ------- Include/Import Paths ----------------------------------------+ , make_ord_flag defFlag "I" (Prefix addIncludePath)+ , make_ord_flag defFlag "i" (OptPrefix addImportPath)++ ------ Output style options -----------------------------------------+ , make_ord_flag defFlag "dppr-user-length" (intSuffix (\n d ->+ d { pprUserLength = n }))+ , make_ord_flag defFlag "dppr-cols" (intSuffix (\n d ->+ d { pprCols = n }))+ , make_ord_flag defFlag "fdiagnostics-color=auto"+ (NoArg (upd (\d -> d { useColor = Auto })))+ , make_ord_flag defFlag "fdiagnostics-color=always"+ (NoArg (upd (\d -> d { useColor = Always })))+ , make_ord_flag defFlag "fdiagnostics-color=never"+ (NoArg (upd (\d -> d { useColor = Never })))++ -- Suppress all that is suppressible in core dumps.+ -- Except for uniques, as some simplifier phases introduce new variables that+ -- have otherwise identical names.+ , make_ord_flag defGhcFlag "dsuppress-all"+ (NoArg $ do setGeneralFlag Opt_SuppressCoercions+ setGeneralFlag Opt_SuppressCoercionTypes+ setGeneralFlag Opt_SuppressVarKinds+ setGeneralFlag Opt_SuppressModulePrefixes+ setGeneralFlag Opt_SuppressTypeApplications+ setGeneralFlag Opt_SuppressIdInfo+ setGeneralFlag Opt_SuppressTicks+ setGeneralFlag Opt_SuppressStgExts+ setGeneralFlag Opt_SuppressStgReps+ setGeneralFlag Opt_SuppressTypeSignatures+ setGeneralFlag Opt_SuppressCoreSizes+ setGeneralFlag Opt_SuppressTimestamps)++ ------ Debugging ----------------------------------------------------+ , make_ord_flag defGhcFlag "dstg-stats"+ (NoArg (setGeneralFlag Opt_StgStats))++ , make_ord_flag defGhcFlag "ddump-cmm"+ (setDumpFlag Opt_D_dump_cmm)+ , make_ord_flag defGhcFlag "ddump-cmm-from-stg"+ (setDumpFlag Opt_D_dump_cmm_from_stg)+ , make_ord_flag defGhcFlag "ddump-cmm-raw"+ (setDumpFlag Opt_D_dump_cmm_raw)+ , make_ord_flag defGhcFlag "ddump-cmm-verbose"+ (setDumpFlag Opt_D_dump_cmm_verbose)+ , make_ord_flag defGhcFlag "ddump-cmm-verbose-by-proc"+ (setDumpFlag Opt_D_dump_cmm_verbose_by_proc)+ , make_ord_flag defGhcFlag "ddump-cmm-cfg"+ (setDumpFlag Opt_D_dump_cmm_cfg)+ , make_ord_flag defGhcFlag "ddump-cmm-cbe"+ (setDumpFlag Opt_D_dump_cmm_cbe)+ , make_ord_flag defGhcFlag "ddump-cmm-switch"+ (setDumpFlag Opt_D_dump_cmm_switch)+ , make_ord_flag defGhcFlag "ddump-cmm-proc"+ (setDumpFlag Opt_D_dump_cmm_proc)+ , make_ord_flag defGhcFlag "ddump-cmm-sp"+ (setDumpFlag Opt_D_dump_cmm_sp)+ , make_ord_flag defGhcFlag "ddump-cmm-sink"+ (setDumpFlag Opt_D_dump_cmm_sink)+ , make_ord_flag defGhcFlag "ddump-cmm-caf"+ (setDumpFlag Opt_D_dump_cmm_caf)+ , make_ord_flag defGhcFlag "ddump-cmm-procmap"+ (setDumpFlag Opt_D_dump_cmm_procmap)+ , make_ord_flag defGhcFlag "ddump-cmm-split"+ (setDumpFlag Opt_D_dump_cmm_split)+ , make_ord_flag defGhcFlag "ddump-cmm-info"+ (setDumpFlag Opt_D_dump_cmm_info)+ , make_ord_flag defGhcFlag "ddump-cmm-cps"+ (setDumpFlag Opt_D_dump_cmm_cps)+ , make_ord_flag defGhcFlag "ddump-cmm-opt"+ (setDumpFlag Opt_D_dump_opt_cmm)+ , make_ord_flag defGhcFlag "ddump-cmm-thread-sanitizer"+ (setDumpFlag Opt_D_dump_cmm_thread_sanitizer)+ , make_ord_flag defGhcFlag "ddump-cfg-weights"+ (setDumpFlag Opt_D_dump_cfg_weights)+ , make_ord_flag defGhcFlag "ddump-core-stats"+ (setDumpFlag Opt_D_dump_core_stats)+ , make_ord_flag defGhcFlag "ddump-asm"+ (setDumpFlag Opt_D_dump_asm)+ , make_ord_flag defGhcFlag "ddump-js"+ (setDumpFlag Opt_D_dump_js)+ , make_ord_flag defGhcFlag "ddump-asm-native"+ (setDumpFlag Opt_D_dump_asm_native)+ , make_ord_flag defGhcFlag "ddump-asm-liveness"+ (setDumpFlag Opt_D_dump_asm_liveness)+ , make_ord_flag defGhcFlag "ddump-asm-regalloc"+ (setDumpFlag Opt_D_dump_asm_regalloc)+ , make_ord_flag defGhcFlag "ddump-asm-conflicts"+ (setDumpFlag Opt_D_dump_asm_conflicts)+ , make_ord_flag defGhcFlag "ddump-asm-regalloc-stages"+ (setDumpFlag Opt_D_dump_asm_regalloc_stages)+ , make_ord_flag defGhcFlag "ddump-asm-stats"+ (setDumpFlag Opt_D_dump_asm_stats)+ , make_ord_flag defGhcFlag "ddump-llvm"+ (NoArg $ setDumpFlag' Opt_D_dump_llvm)+ , make_ord_flag defGhcFlag "ddump-c-backend"+ (NoArg $ setDumpFlag' Opt_D_dump_c_backend)+ , make_ord_flag defGhcFlag "ddump-deriv"+ (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"+ (setDumpFlag Opt_D_dump_inlinings)+ , make_ord_flag defGhcFlag "ddump-verbose-inlinings"+ (setDumpFlag Opt_D_dump_verbose_inlinings)+ , make_ord_flag defGhcFlag "ddump-rule-firings"+ (setDumpFlag Opt_D_dump_rule_firings)+ , make_ord_flag defGhcFlag "ddump-rule-rewrites"+ (setDumpFlag Opt_D_dump_rule_rewrites)+ , make_ord_flag defGhcFlag "ddump-simpl-trace"+ (setDumpFlag Opt_D_dump_simpl_trace)+ , make_ord_flag defGhcFlag "ddump-occur-anal"+ (setDumpFlag Opt_D_dump_occur_anal)+ , make_ord_flag defGhcFlag "ddump-parsed"+ (setDumpFlag Opt_D_dump_parsed)+ , make_ord_flag defGhcFlag "ddump-parsed-ast"+ (setDumpFlag Opt_D_dump_parsed_ast)+ , make_ord_flag defGhcFlag "dkeep-comments"+ (NoArg (setGeneralFlag Opt_KeepRawTokenStream))+ , make_ord_flag defGhcFlag "ddump-rn"+ (setDumpFlag Opt_D_dump_rn)+ , make_ord_flag defGhcFlag "ddump-rn-ast"+ (setDumpFlag Opt_D_dump_rn_ast)+ , make_ord_flag defGhcFlag "ddump-simpl"+ (setDumpFlag Opt_D_dump_simpl)+ , make_ord_flag defGhcFlag "ddump-simpl-iterations"+ (setDumpFlag Opt_D_dump_simpl_iterations)+ , make_ord_flag defGhcFlag "ddump-spec"+ (setDumpFlag Opt_D_dump_spec)+ , make_ord_flag defGhcFlag "ddump-spec-constr"+ (setDumpFlag Opt_D_dump_spec_constr)+ , make_ord_flag defGhcFlag "ddump-prep"+ (setDumpFlag Opt_D_dump_prep)+ , make_ord_flag defGhcFlag "ddump-late-cc"+ (setDumpFlag Opt_D_dump_late_cc)+ , make_ord_flag defGhcFlag "ddump-stg-from-core"+ (setDumpFlag Opt_D_dump_stg_from_core)+ , make_ord_flag defGhcFlag "ddump-stg-unarised"+ (setDumpFlag Opt_D_dump_stg_unarised)+ , make_ord_flag defGhcFlag "ddump-stg-final"+ (setDumpFlag Opt_D_dump_stg_final)+ , make_ord_flag defGhcFlag "ddump-stg-cg"+ (setDumpFlag Opt_D_dump_stg_cg)+ , make_dep_flag defGhcFlag "ddump-stg"+ (setDumpFlag Opt_D_dump_stg_from_core)+ "Use `-ddump-stg-from-core` or `-ddump-stg-final` instead"+ , make_ord_flag defGhcFlag "ddump-stg-tags"+ (setDumpFlag Opt_D_dump_stg_tags)+ , make_ord_flag defGhcFlag "ddump-call-arity"+ (setDumpFlag Opt_D_dump_call_arity)+ , make_ord_flag defGhcFlag "ddump-exitify"+ (setDumpFlag Opt_D_dump_exitify)+ , make_ord_flag defGhcFlag "ddump-stranal"+ (setDumpFlag Opt_D_dump_stranal)+ , make_ord_flag defGhcFlag "ddump-str-signatures"+ (setDumpFlag Opt_D_dump_str_signatures)+ , make_ord_flag defGhcFlag "ddump-cpranal"+ (setDumpFlag Opt_D_dump_cpranal)+ , make_ord_flag defGhcFlag "ddump-cpr-signatures"+ (setDumpFlag Opt_D_dump_cpr_signatures)+ , make_ord_flag defGhcFlag "ddump-tc"+ (setDumpFlag Opt_D_dump_tc)+ , make_ord_flag defGhcFlag "ddump-tc-ast"+ (setDumpFlag Opt_D_dump_tc_ast)+ , make_ord_flag defGhcFlag "ddump-hie"+ (setDumpFlag Opt_D_dump_hie)+ , make_ord_flag defGhcFlag "ddump-types"+ (setDumpFlag Opt_D_dump_types)+ , make_ord_flag defGhcFlag "ddump-rules"+ (setDumpFlag Opt_D_dump_rules)+ , make_ord_flag defGhcFlag "ddump-cse"+ (setDumpFlag Opt_D_dump_cse)+ , make_ord_flag defGhcFlag "ddump-float-out"+ (setDumpFlag Opt_D_dump_float_out)+ , make_ord_flag defGhcFlag "ddump-full-laziness"+ (setDumpFlag Opt_D_dump_float_out)+ , make_ord_flag defGhcFlag "ddump-float-in"+ (setDumpFlag Opt_D_dump_float_in)+ , make_ord_flag defGhcFlag "ddump-liberate-case"+ (setDumpFlag Opt_D_dump_liberate_case)+ , make_ord_flag defGhcFlag "ddump-static-argument-transformation"+ (setDumpFlag Opt_D_dump_static_argument_transformation)+ , make_ord_flag defGhcFlag "ddump-worker-wrapper"+ (setDumpFlag Opt_D_dump_worker_wrapper)+ , make_ord_flag defGhcFlag "ddump-rn-trace"+ (setDumpFlag Opt_D_dump_rn_trace)+ , make_ord_flag defGhcFlag "ddump-if-trace"+ (setDumpFlag Opt_D_dump_if_trace)+ , make_ord_flag defGhcFlag "ddump-cs-trace"+ (setDumpFlag Opt_D_dump_cs_trace)+ , make_ord_flag defGhcFlag "ddump-tc-trace"+ (NoArg (do setDumpFlag' Opt_D_dump_tc_trace+ setDumpFlag' Opt_D_dump_cs_trace))+ , make_ord_flag defGhcFlag "ddump-ec-trace"+ (setDumpFlag Opt_D_dump_ec_trace)+ , make_ord_flag defGhcFlag "ddump-splices"+ (setDumpFlag Opt_D_dump_splices)+ , make_ord_flag defGhcFlag "dth-dec-file"+ (setDumpFlag Opt_D_th_dec_file)++ , make_ord_flag defGhcFlag "ddump-rn-stats"+ (setDumpFlag Opt_D_dump_rn_stats)+ , make_ord_flag defGhcFlag "ddump-opt-cmm" --old alias for cmm-opt+ (setDumpFlag Opt_D_dump_opt_cmm)+ , make_ord_flag defGhcFlag "ddump-simpl-stats"+ (setDumpFlag Opt_D_dump_simpl_stats)+ , make_ord_flag defGhcFlag "ddump-bcos"+ (setDumpFlag Opt_D_dump_BCOs)+ , make_ord_flag defGhcFlag "dsource-stats"+ (setDumpFlag Opt_D_source_stats)+ , make_ord_flag defGhcFlag "dverbose-core2core"+ (NoArg $ setVerbosity (Just 2) >> setDumpFlag' Opt_D_verbose_core2core)+ , make_ord_flag defGhcFlag "dverbose-stg2stg"+ (setDumpFlag Opt_D_verbose_stg2stg)+ , make_ord_flag defGhcFlag "ddump-hi"+ (setDumpFlag Opt_D_dump_hi)+ , make_ord_flag defGhcFlag "ddump-minimal-imports"+ (NoArg (setGeneralFlag Opt_D_dump_minimal_imports))+ , make_ord_flag defGhcFlag "ddump-hpc"+ (setDumpFlag Opt_D_dump_ticked) -- back compat+ , make_ord_flag defGhcFlag "ddump-ticked"+ (setDumpFlag Opt_D_dump_ticked)+ , make_ord_flag defGhcFlag "ddump-mod-cycles"+ (setDumpFlag Opt_D_dump_mod_cycles)+ , make_ord_flag defGhcFlag "ddump-mod-map"+ (setDumpFlag Opt_D_dump_mod_map)+ , make_ord_flag defGhcFlag "ddump-timings"+ (setDumpFlag Opt_D_dump_timings)+ , make_ord_flag defGhcFlag "ddump-view-pattern-commoning"+ (setDumpFlag Opt_D_dump_view_pattern_commoning)+ , make_ord_flag defGhcFlag "ddump-to-file"+ (NoArg (setGeneralFlag Opt_DumpToFile))+ , make_ord_flag defGhcFlag "ddump-hi-diffs"+ (setDumpFlag Opt_D_dump_hi_diffs)+ , make_ord_flag defGhcFlag "ddump-rtti"+ (setDumpFlag Opt_D_dump_rtti)+ , make_ord_flag defGhcFlag "dlint"+ (NoArg enableDLint)+ , make_ord_flag defGhcFlag "dcore-lint"+ (NoArg (setGeneralFlag Opt_DoCoreLinting))+ , make_ord_flag defGhcFlag "dlinear-core-lint"+ (NoArg (setGeneralFlag Opt_DoLinearCoreLinting))+ , make_ord_flag defGhcFlag "dstg-lint"+ (NoArg (setGeneralFlag Opt_DoStgLinting))+ , make_ord_flag defGhcFlag "dcmm-lint"+ (NoArg (setGeneralFlag Opt_DoCmmLinting))+ , make_ord_flag defGhcFlag "dasm-lint"+ (NoArg (setGeneralFlag Opt_DoAsmLinting))+ , make_ord_flag defGhcFlag "dannot-lint"+ (NoArg (setGeneralFlag Opt_DoAnnotationLinting))+ , make_ord_flag defGhcFlag "dtag-inference-checks"+ (NoArg (setGeneralFlag Opt_DoTagInferenceChecks))+ , make_ord_flag defGhcFlag "dshow-passes"+ (NoArg $ forceRecompile >> (setVerbosity $ Just 2))+ , make_ord_flag defGhcFlag "dfaststring-stats"+ (setDumpFlag Opt_D_faststring_stats)+ , make_ord_flag defGhcFlag "dno-llvm-mangler"+ (NoArg (setGeneralFlag Opt_NoLlvmMangler)) -- hidden flag+ , make_ord_flag defGhcFlag "dno-typeable-binds"+ (NoArg (setGeneralFlag Opt_NoTypeableBinds))+ , make_ord_flag defGhcFlag "ddump-debug"+ (setDumpFlag Opt_D_dump_debug)+ , make_ord_flag defGhcFlag "ddump-json"+ (setDumpFlag Opt_D_dump_json )+ , make_ord_flag defGhcFlag "dppr-debug"+ (setDumpFlag Opt_D_ppr_debug)+ , make_ord_flag defGhcFlag "ddebug-output"+ (noArg (flip dopt_unset Opt_D_no_debug_output))+ , make_ord_flag defGhcFlag "dno-debug-output"+ (setDumpFlag Opt_D_no_debug_output)++ , make_ord_flag defGhcFlag "ddump-faststrings"+ (setDumpFlag Opt_D_dump_faststrings)++ ------ Machine dependent (-m<blah>) stuff ---------------------------++ , make_ord_flag defGhcFlag "msse" (noArg (\d ->+ d { sseVersion = Just SSE1 }))+ , make_ord_flag defGhcFlag "msse2" (noArg (\d ->+ d { sseVersion = Just SSE2 }))+ , make_ord_flag defGhcFlag "msse3" (noArg (\d ->+ d { sseVersion = Just SSE3 }))+ , make_ord_flag defGhcFlag "msse4" (noArg (\d ->+ d { sseVersion = Just SSE4 }))+ , make_ord_flag defGhcFlag "msse4.2" (noArg (\d ->+ d { sseVersion = Just SSE42 }))+ , make_ord_flag defGhcFlag "mbmi" (noArg (\d ->+ d { bmiVersion = Just BMI1 }))+ , make_ord_flag defGhcFlag "mbmi2" (noArg (\d ->+ d { bmiVersion = Just BMI2 }))+ , make_ord_flag defGhcFlag "mavx" (noArg (\d -> d { avx = True }))+ , make_ord_flag defGhcFlag "mavx2" (noArg (\d -> d { avx2 = True }))+ , make_ord_flag defGhcFlag "mavx512cd" (noArg (\d ->+ d { avx512cd = True }))+ , make_ord_flag defGhcFlag "mavx512er" (noArg (\d ->+ d { avx512er = True }))+ , make_ord_flag defGhcFlag "mavx512f" (noArg (\d -> d { avx512f = True }))+ , make_ord_flag defGhcFlag "mavx512pf" (noArg (\d ->+ d { avx512pf = True }))+ , make_ord_flag defGhcFlag "mfma" (noArg (\d -> d { fma = True }))++ ------ Plugin flags ------------------------------------------------+ , make_ord_flag defGhcFlag "fplugin-opt" (hasArg addPluginModuleNameOption)+ , make_ord_flag defGhcFlag "fplugin-trustworthy"+ (NoArg (setGeneralFlag Opt_PluginTrustworthy))+ , make_ord_flag defGhcFlag "fplugin" (hasArg addPluginModuleName)+ , make_ord_flag defGhcFlag "fclear-plugins" (noArg clearPluginModuleNames)+ , make_ord_flag defGhcFlag "ffrontend-opt" (hasArg addFrontendPluginOption)++ , make_ord_flag defGhcFlag "fplugin-library" (hasArg addExternalPlugin)++ ------ Optimisation flags ------------------------------------------+ , make_dep_flag defGhcFlag "Onot" (noArgM $ setOptLevel 0 )+ "Use -O0 instead"+ , make_ord_flag defGhcFlag "O" (optIntSuffixM (\mb_n ->+ setOptLevel (mb_n `orElse` 1)))+ -- If the number is missing, use 1++ , make_ord_flag defFlag "fbinary-blob-threshold"+ (intSuffix (\n d -> d { binBlobThreshold = case fromIntegral n of+ 0 -> Nothing+ x -> Just x}))+ , make_ord_flag defFlag "fmax-relevant-binds"+ (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-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_dep_flag defGhcFlag "fllvm-pass-vectors-in-regs"+ (noArg id)+ "vectors registers are now passed in registers by default."+ , make_ord_flag defFlag "fmax-uncovered-patterns"+ (intSuffix (\n d -> d { maxUncoveredPatterns = n }))+ , make_ord_flag defFlag "fmax-pmcheck-models"+ (intSuffix (\n d -> d { maxPmCheckModels = n }))+ , make_ord_flag defFlag "fsimplifier-phases"+ (intSuffix (\n d -> d { simplPhases = n }))+ , make_ord_flag defFlag "fmax-simplifier-iterations"+ (intSuffix (\n d -> d { maxSimplIterations = n }))+ , (Deprecated, defFlag "fmax-pmcheck-iterations"+ (intSuffixM (\_ d ->+ do { deprecate $ "use -fmax-pmcheck-models instead"+ ; return d })))+ , make_ord_flag defFlag "fsimpl-tick-factor"+ (intSuffix (\n d -> d { simplTickFactor = n }))+ , make_ord_flag defFlag "fdmd-unbox-width"+ (intSuffix (\n d -> d { dmdUnboxWidth = n }))+ , make_ord_flag defFlag "fspec-constr-threshold"+ (intSuffix (\n d -> d { specConstrThreshold = Just n }))+ , make_ord_flag defFlag "fno-spec-constr-threshold"+ (noArg (\d -> d { specConstrThreshold = Nothing }))+ , make_ord_flag defFlag "fspec-constr-count"+ (intSuffix (\n d -> d { specConstrCount = Just n }))+ , make_ord_flag defFlag "fno-spec-constr-count"+ (noArg (\d -> d { specConstrCount = Nothing }))+ , make_ord_flag defFlag "fspec-constr-recursive"+ (intSuffix (\n d -> d { specConstrRecursive = n }))+ , make_ord_flag defFlag "fliberate-case-threshold"+ (intSuffix (\n d -> d { liberateCaseThreshold = Just n }))+ , make_ord_flag defFlag "fno-liberate-case-threshold"+ (noArg (\d -> d { liberateCaseThreshold = Nothing }))+ , make_ord_flag defFlag "drule-check"+ (sepArg (\s d -> d { ruleCheck = Just s }))+ , make_ord_flag defFlag "dinline-check"+ (sepArg (\s d -> d { unfoldingOpts = updateReportPrefix (Just s) (unfoldingOpts d)}))+ , make_ord_flag defFlag "freduction-depth"+ (intSuffix (\n d -> d { reductionDepth = treatZeroAsInf n }))+ , make_ord_flag defFlag "fconstraint-solver-iterations"+ (intSuffix (\n d -> d { solverIterations = treatZeroAsInf n }))+ , make_ord_flag defFlag "fgivens-expansion-fuel"+ (intSuffix (\n d -> d { givensFuel = n }))+ , make_ord_flag defFlag "fwanteds-expansion-fuel"+ (intSuffix (\n d -> d { wantedsFuel = n }))+ , make_ord_flag defFlag "fqcs-expansion-fuel"+ (intSuffix (\n d -> d { qcsFuel = n }))+ , (Deprecated, defFlag "fcontext-stack"+ (intSuffixM (\n d ->+ do { deprecate $ "use -freduction-depth=" ++ show n ++ " instead"+ ; return $ d { reductionDepth = treatZeroAsInf n } })))+ , (Deprecated, defFlag "ftype-function-depth"+ (intSuffixM (\n d ->+ do { deprecate $ "use -freduction-depth=" ++ show n ++ " instead"+ ; return $ d { reductionDepth = treatZeroAsInf n } })))+ , make_ord_flag defFlag "fstrictness-before"+ (intSuffix (\n d -> d { strictnessBefore = n : strictnessBefore d }))+ , make_ord_flag defFlag "ffloat-lam-args"+ (intSuffix (\n d -> d { floatLamArgs = Just n }))+ , make_ord_flag defFlag "ffloat-all-lams"+ (noArg (\d -> d { floatLamArgs = Nothing }))+ , make_ord_flag defFlag "fstg-lift-lams-rec-args"+ (intSuffix (\n d -> d { liftLamsRecArgs = Just n }))+ , make_ord_flag defFlag "fstg-lift-lams-rec-args-any"+ (noArg (\d -> d { liftLamsRecArgs = Nothing }))+ , make_ord_flag defFlag "fstg-lift-lams-non-rec-args"+ (intSuffix (\n d -> d { liftLamsNonRecArgs = Just n }))+ , make_ord_flag defFlag "fstg-lift-lams-non-rec-args-any"+ (noArg (\d -> d { liftLamsNonRecArgs = Nothing }))+ , make_ord_flag defFlag "fstg-lift-lams-known"+ (noArg (\d -> d { liftLamsKnown = True }))+ , make_ord_flag defFlag "fno-stg-lift-lams-known"+ (noArg (\d -> d { liftLamsKnown = False }))+ , make_ord_flag defFlag "fproc-alignment"+ (intSuffix (\n d -> d { cmmProcAlignment = Just n }))+ , make_ord_flag defFlag "fblock-layout-weights"+ (HasArg (\s ->+ upd (\d -> d { cfgWeights =+ parseWeights s (cfgWeights d)})))+ , make_ord_flag defFlag "fhistory-size"+ (intSuffix (\n d -> d { historySize = n }))++ , make_ord_flag defFlag "funfolding-creation-threshold"+ (intSuffix (\n d -> d { unfoldingOpts = updateCreationThreshold n (unfoldingOpts d)}))+ , make_ord_flag defFlag "funfolding-use-threshold"+ (intSuffix (\n d -> d { unfoldingOpts = updateUseThreshold n (unfoldingOpts d)}))+ , make_ord_flag defFlag "funfolding-fun-discount"+ (intSuffix (\n d -> d { unfoldingOpts = updateFunAppDiscount n (unfoldingOpts d)}))+ , make_ord_flag defFlag "funfolding-dict-discount"+ (intSuffix (\n d -> d { unfoldingOpts = updateDictDiscount n (unfoldingOpts d)}))++ , make_ord_flag defFlag "funfolding-case-threshold"+ (intSuffix (\n d -> d { unfoldingOpts = updateCaseThreshold n (unfoldingOpts d)}))+ , make_ord_flag defFlag "funfolding-case-scaling"+ (intSuffix (\n d -> d { unfoldingOpts = updateCaseScaling n (unfoldingOpts d)}))++ , make_dep_flag defFlag "funfolding-keeness-factor"+ (floatSuffix (\_ d -> d))+ "-funfolding-keeness-factor is no longer respected as of GHC 9.0"++ , make_ord_flag defFlag "fmax-worker-args"+ (intSuffix (\n d -> d {maxWorkerArgs = n}))+ , make_ord_flag defGhciFlag "fghci-hist-size"+ (intSuffix (\n d -> d {ghciHistSize = n}))+ , make_ord_flag defGhcFlag "fmax-inline-alloc-size"+ (intSuffix (\n d -> d { maxInlineAllocSize = n }))+ , make_ord_flag defGhcFlag "fmax-inline-memcpy-insns"+ (intSuffix (\n d -> d { maxInlineMemcpyInsns = n }))+ , make_ord_flag defGhcFlag "fmax-inline-memset-insns"+ (intSuffix (\n d -> d { maxInlineMemsetInsns = n }))+ , make_ord_flag defGhcFlag "dinitial-unique"+ (wordSuffix (\n d -> d { initialUnique = n }))+ , make_ord_flag defGhcFlag "dunique-increment"+ (intSuffix (\n d -> d { uniqueIncrement = n }))++ ------ Profiling ----------------------------------------------------++ -- OLD profiling flags+ , make_dep_flag defGhcFlag "auto-all"+ (noArg (\d -> d { profAuto = ProfAutoAll } ))+ "Use -fprof-auto instead"+ , make_dep_flag defGhcFlag "no-auto-all"+ (noArg (\d -> d { profAuto = NoProfAuto } ))+ "Use -fno-prof-auto instead"+ , make_dep_flag defGhcFlag "auto"+ (noArg (\d -> d { profAuto = ProfAutoExports } ))+ "Use -fprof-auto-exported instead"+ , make_dep_flag defGhcFlag "no-auto"+ (noArg (\d -> d { profAuto = NoProfAuto } ))+ "Use -fno-prof-auto instead"+ , make_dep_flag defGhcFlag "caf-all"+ (NoArg (setGeneralFlag Opt_AutoSccsOnIndividualCafs))+ "Use -fprof-cafs instead"+ , make_dep_flag defGhcFlag "no-caf-all"+ (NoArg (unSetGeneralFlag Opt_AutoSccsOnIndividualCafs))+ "Use -fno-prof-cafs instead"++ -- NEW profiling flags+ , make_ord_flag defGhcFlag "fprof-auto"+ (noArg (\d -> d { profAuto = ProfAutoAll } ))+ , make_ord_flag defGhcFlag "fprof-auto-top"+ (noArg (\d -> d { profAuto = ProfAutoTop } ))+ , make_ord_flag defGhcFlag "fprof-auto-exported"+ (noArg (\d -> d { profAuto = ProfAutoExports } ))+ , make_ord_flag defGhcFlag "fprof-auto-calls"+ (noArg (\d -> d { profAuto = ProfAutoCalls } ))+ , make_ord_flag defGhcFlag "fno-prof-auto"+ (noArg (\d -> d { profAuto = NoProfAuto } ))++ -- Caller-CC+ , make_ord_flag defGhcFlag "fprof-callers"+ (HasArg setCallerCcFilters)+ , make_ord_flag defGhcFlag "fdistinct-constructor-tables"+ (NoArg (setGeneralFlag Opt_DistinctConstructorTables))+ , make_ord_flag defGhcFlag "finfo-table-map"+ (NoArg (setGeneralFlag Opt_InfoTableMap))+ ------ Compiler flags -----------------------------------------------++ , make_ord_flag defGhcFlag "fasm" (NoArg (setObjBackend ncgBackend))+ , make_ord_flag defGhcFlag "fvia-c" (NoArg+ (deprecate $ "The -fvia-c flag does nothing; " +++ "it will be removed in a future GHC release"))+ , make_ord_flag defGhcFlag "fvia-C" (NoArg+ (deprecate $ "The -fvia-C flag does nothing; " +++ "it will be removed in a future GHC release"))+ , make_ord_flag defGhcFlag "fllvm" (NoArg (setObjBackend llvmBackend))++ , make_ord_flag defFlag "fno-code" (NoArg ((upd $ \d ->+ d { ghcLink=NoLink }) >> setBackend noBackend))+ , make_ord_flag defFlag "fbyte-code"+ (noArgM $ \dflags -> do+ setBackend interpreterBackend+ pure $ flip gopt_unset Opt_ByteCodeAndObjectCode (gopt_set dflags Opt_ByteCode))+ , make_ord_flag defFlag "fobject-code" $ noArgM $ \dflags -> do+ setBackend $ platformDefaultBackend (targetPlatform dflags)+ dflags' <- liftEwM getCmdLineState+ pure $ gopt_unset dflags' Opt_ByteCodeAndObjectCode++ , make_dep_flag defFlag "fglasgow-exts"+ (NoArg enableGlasgowExts) "Use individual extensions instead"+ , make_dep_flag defFlag "fno-glasgow-exts"+ (NoArg disableGlasgowExts) "Use individual extensions instead"++ ------ Safe Haskell flags -------------------------------------------+ , make_ord_flag defFlag "fpackage-trust" (NoArg setPackageTrust)+ , make_ord_flag defFlag "fno-safe-infer" (noArg (\d ->+ d { safeInfer = False }))+ , make_ord_flag defFlag "fno-safe-haskell" (NoArg (setSafeHaskell Sf_Ignore))++ ------ position independent flags ----------------------------------+ , make_ord_flag defGhcFlag "fPIC" (NoArg (setGeneralFlag Opt_PIC))+ , make_ord_flag defGhcFlag "fno-PIC" (NoArg (unSetGeneralFlag Opt_PIC))+ , make_ord_flag defGhcFlag "fPIE" (NoArg (setGeneralFlag Opt_PIE))+ , make_ord_flag defGhcFlag "fno-PIE" (NoArg (unSetGeneralFlag Opt_PIE))++ ------ Debugging flags ----------------------------------------------+ , make_ord_flag defGhcFlag "g" (OptIntSuffix setDebugLevel)+ ]+ ++ map (mkFlag turnOn "" setGeneralFlag ) negatableFlagsDeps+ ++ map (mkFlag turnOff "no-" unSetGeneralFlag ) negatableFlagsDeps+ ++ map (mkFlag turnOn "d" setGeneralFlag ) dFlagsDeps+ ++ map (mkFlag turnOff "dno-" unSetGeneralFlag ) dFlagsDeps+ ++ map (mkFlag turnOn "f" setGeneralFlag ) fFlagsDeps+ ++ map (mkFlag turnOff "fno-" unSetGeneralFlag ) fFlagsDeps+ ++++ ------ Warning flags -------------------------------------------------+ [ make_ord_flag defFlag "W" (NoArg (setWarningGroup W_extra))+ , make_ord_flag defFlag "Werror"+ (NoArg (do { setGeneralFlag Opt_WarnIsError+ ; setFatalWarningGroup W_everything }))+ , make_ord_flag defFlag "Wwarn"+ (NoArg (do { unSetGeneralFlag Opt_WarnIsError+ ; unSetFatalWarningGroup W_everything }))+ -- Opt_WarnIsError is still needed to pass -Werror+ -- to CPP; see runCpp in SysTools+ , make_dep_flag defFlag "Wnot" (NoArg (unSetWarningGroup W_everything))+ "Use -w or -Wno-everything instead"+ , make_ord_flag defFlag "w" (NoArg (unSetWarningGroup W_everything))+ ]++ -- New-style uniform warning sets+ --+ -- Note that -Weverything > -Wall > -Wextra > -Wdefault > -Wno-everything+ ++ warningControls setWarningGroup unSetWarningGroup setWErrorWarningGroup unSetFatalWarningGroup warningGroupsDeps+ ++ warningControls setWarningFlag unSetWarningFlag setWErrorFlag unSetFatalWarningFlag wWarningFlagsDeps+ ++ warningControls setCustomWarningFlag unSetCustomWarningFlag setCustomWErrorFlag unSetCustomFatalWarningFlag+ [(NotDeprecated, FlagSpec "warnings-deprecations" defaultWarningCategory nop AllModes)]+ -- See Note [Warning categories] in GHC.Unit.Module.Warnings.++ ++ [ (NotDeprecated, customOrUnrecognisedWarning "Wno-" unSetCustomWarningFlag)+ , (NotDeprecated, customOrUnrecognisedWarning "Werror=" setCustomWErrorFlag)+ , (NotDeprecated, customOrUnrecognisedWarning "Wwarn=" unSetCustomFatalWarningFlag)+ , (NotDeprecated, customOrUnrecognisedWarning "Wno-error=" unSetCustomFatalWarningFlag)+ , (NotDeprecated, customOrUnrecognisedWarning "W" setCustomWarningFlag)+ , (Deprecated, customOrUnrecognisedWarning "fwarn-" setCustomWarningFlag)+ , (Deprecated, customOrUnrecognisedWarning "fno-warn-" unSetCustomWarningFlag)+ ]++ ------ JavaScript flags -----------------------------------------------+ ++ [ make_ord_flag defFlag "ddisable-js-minifier" (NoArg (setGeneralFlag Opt_DisableJsMinifier))+ ]++ ------ Language flags -------------------------------------------------+ ++ map (mkFlag turnOn "f" setExtensionFlag ) fLangFlagsDeps+ ++ map (mkFlag turnOff "fno-" unSetExtensionFlag) fLangFlagsDeps+ ++ map (mkFlag turnOn "X" setExtensionFlag ) xFlagsDeps+ ++ map (mkFlag turnOff "XNo" unSetExtensionFlag) xFlagsDeps+ ++ map (mkFlag turnOn "X" setLanguage ) languageFlagsDeps+ ++ map (mkFlag turnOn "X" setSafeHaskell ) safeHaskellFlagsDeps++-- | Warnings have both new-style flags to control their state (@-W@, @-Wno-@,+-- @-Werror=@, @-Wwarn=@) and old-style flags (@-fwarn-@, @-fno-warn-@). We+-- define these uniformly for individual warning flags and groups of warnings.+warningControls :: (warn_flag -> DynP ()) -- ^ Set the warning+ -> (warn_flag -> DynP ()) -- ^ Unset the warning+ -> (warn_flag -> DynP ()) -- ^ Make the warning an error+ -> (warn_flag -> DynP ()) -- ^ Clear the error status+ -> [(Deprecation, FlagSpec warn_flag)]+ -> [(Deprecation, Flag (CmdLineP DynFlags))]+warningControls set unset set_werror unset_fatal xs =+ map (mkFlag turnOn "W" set ) xs+ ++ map (mkFlag turnOff "Wno-" unset ) xs+ ++ map (mkFlag turnOn "Werror=" set_werror ) xs+ ++ map (mkFlag turnOn "Wwarn=" unset_fatal ) xs+ ++ map (mkFlag turnOn "Wno-error=" unset_fatal ) xs+ ++ map (mkFlag turnOn "fwarn-" set . hideFlag) xs+ ++ map (mkFlag turnOff "fno-warn-" unset . hideFlag) xs++-- | This is where we handle unrecognised warning flags. If the flag is valid as+-- an extended warning category, we call the supplied action. Otherwise, issue a+-- warning if -Wunrecognised-warning-flags is set. See #11429 for context.+-- See Note [Warning categories] in GHC.Unit.Module.Warnings.+customOrUnrecognisedWarning :: String -> (WarningCategory -> DynP ()) -> Flag (CmdLineP DynFlags)+customOrUnrecognisedWarning prefix custom = defHiddenFlag prefix (Prefix action)+ where+ action :: String -> DynP ()+ action flag+ | validWarningCategory cat = custom cat+ | otherwise = unrecognised flag+ where+ cat = mkWarningCategory (mkFastString flag)++ unrecognised flag = do+ -- #23402 and #12056+ -- for unrecognised flags we consider current dynflags, not the final one.+ -- But if final state says to not report unrecognised flags, they won't anyway.+ f <- wopt Opt_WarnUnrecognisedWarningFlags <$> liftEwM getCmdLineState+ when f $ addFlagWarn (DriverUnrecognisedFlag (prefix ++ flag))++-- See Note [Supporting CLI completion]+package_flags_deps :: [(Deprecation, Flag (CmdLineP DynFlags))]+package_flags_deps = [+ ------- Packages ----------------------------------------------------+ make_ord_flag defFlag "package-db"+ (HasArg (addPkgDbRef . PkgDbPath))+ , make_ord_flag defFlag "clear-package-db" (NoArg clearPkgDb)+ , make_ord_flag defFlag "no-global-package-db" (NoArg removeGlobalPkgDb)+ , make_ord_flag defFlag "no-user-package-db" (NoArg removeUserPkgDb)+ , make_ord_flag defFlag "global-package-db"+ (NoArg (addPkgDbRef GlobalPkgDb))+ , make_ord_flag defFlag "user-package-db"+ (NoArg (addPkgDbRef UserPkgDb))+ -- backwards compat with GHC<=7.4 :+ , make_dep_flag defFlag "package-conf"+ (HasArg $ addPkgDbRef . PkgDbPath) "Use -package-db instead"+ , make_dep_flag defFlag "no-user-package-conf"+ (NoArg removeUserPkgDb) "Use -no-user-package-db instead"+ , make_ord_flag defGhcFlag "package-name" (HasArg $ \name ->+ upd (setUnitId name))+ , make_ord_flag defGhcFlag "this-unit-id" (hasArg setUnitId)++ , make_ord_flag defGhcFlag "working-dir" (hasArg setWorkingDirectory)+ , make_ord_flag defGhcFlag "this-package-name" (hasArg setPackageName)+ , make_ord_flag defGhcFlag "hidden-module" (HasArg addHiddenModule)+ , make_ord_flag defGhcFlag "reexported-module" (HasArg addReexportedModule)++ , make_ord_flag defFlag "package" (HasArg exposePackage)+ , make_ord_flag defFlag "plugin-package-id" (HasArg exposePluginPackageId)+ , make_ord_flag defFlag "plugin-package" (HasArg exposePluginPackage)+ , make_ord_flag defFlag "package-id" (HasArg exposePackageId)+ , make_ord_flag defFlag "hide-package" (HasArg hidePackage)+ , make_ord_flag defFlag "hide-all-packages"+ (NoArg (setGeneralFlag Opt_HideAllPackages))+ , make_ord_flag defFlag "hide-all-plugin-packages"+ (NoArg (setGeneralFlag Opt_HideAllPluginPackages))+ , make_ord_flag defFlag "package-env" (HasArg setPackageEnv)+ , make_ord_flag defFlag "ignore-package" (HasArg ignorePackage)+ , make_dep_flag defFlag "syslib" (HasArg exposePackage) "Use -package instead"+ , make_ord_flag defFlag "distrust-all-packages"+ (NoArg (setGeneralFlag Opt_DistrustAllPackages))+ , make_ord_flag defFlag "trust" (HasArg trustPackage)+ , make_ord_flag defFlag "distrust" (HasArg distrustPackage)+ ]+ where+ setPackageEnv env = upd $ \s -> s { packageEnv = Just env }++-- | Make a list of flags for shell completion.+-- Filter all available flags into two groups, for interactive GHC vs all other.+flagsForCompletion :: Bool -> [String]+flagsForCompletion isInteractive+ = [ '-':flagName flag+ | flag <- flagsAll+ , modeFilter (flagGhcMode flag)+ ]+ where+ modeFilter AllModes = True+ modeFilter OnlyGhci = isInteractive+ modeFilter OnlyGhc = not isInteractive+ modeFilter HiddenFlag = False++data FlagSpec flag+ = FlagSpec+ { flagSpecName :: String -- ^ Flag in string form+ , flagSpecFlag :: flag -- ^ Flag in internal form+ , flagSpecAction :: (TurnOnFlag -> DynP ())+ -- ^ Extra action to run when the flag is found+ -- Typically, emit a warning or error+ , flagSpecGhcMode :: GhcFlagMode+ -- ^ In which ghc mode the flag has effect+ }++-- | Define a new flag.+flagSpec :: String -> flag -> (Deprecation, FlagSpec flag)+flagSpec name flag = flagSpec' name flag nop++-- | Define a new flag with an effect.+flagSpec' :: String -> flag -> (TurnOnFlag -> DynP ())+ -> (Deprecation, FlagSpec flag)+flagSpec' name flag act = (NotDeprecated, FlagSpec name flag act AllModes)++-- | Define a warning flag.+warnSpec :: WarningFlag -> [(Deprecation, FlagSpec WarningFlag)]+warnSpec flag = warnSpec' flag nop++-- | Define a warning flag with an effect.+warnSpec' :: WarningFlag -> (TurnOnFlag -> DynP ())+ -> [(Deprecation, FlagSpec WarningFlag)]+warnSpec' flag act = [ (NotDeprecated, FlagSpec name flag act AllModes)+ | name <- NE.toList (warnFlagNames flag)+ ]++-- | Define a new deprecated flag with an effect.+depFlagSpecOp :: String -> flag -> (TurnOnFlag -> DynP ()) -> String+ -> (Deprecation, FlagSpec flag)+depFlagSpecOp name flag act dep =+ (Deprecated, snd (flagSpec' name flag (\f -> act f >> deprecate dep)))++-- | Define a new deprecated flag.+depFlagSpec :: String -> flag -> String+ -> (Deprecation, FlagSpec flag)+depFlagSpec name flag dep = depFlagSpecOp name flag nop dep++-- | Define a deprecated warning flag.+depWarnSpec :: WarningFlag -> String+ -> [(Deprecation, FlagSpec WarningFlag)]+depWarnSpec flag dep = [ depFlagSpecOp name flag nop dep+ | name <- NE.toList (warnFlagNames flag)+ ]++-- | Define a deprecated warning name substituted by another.+subWarnSpec :: String -> WarningFlag -> String+ -> [(Deprecation, FlagSpec WarningFlag)]+subWarnSpec oldname flag dep = [ depFlagSpecOp oldname flag nop dep ]+++-- | Define a new deprecated flag with an effect where the deprecation message+-- depends on the flag value+depFlagSpecOp' :: String+ -> flag+ -> (TurnOnFlag -> DynP ())+ -> (TurnOnFlag -> String)+ -> (Deprecation, FlagSpec flag)+depFlagSpecOp' name flag act dep =+ (Deprecated, FlagSpec name flag (\f -> act f >> (deprecate $ dep f))+ AllModes)++-- | Define a new deprecated flag where the deprecation message+-- depends on the flag value+depFlagSpec' :: String+ -> flag+ -> (TurnOnFlag -> String)+ -> (Deprecation, FlagSpec flag)+depFlagSpec' name flag dep = depFlagSpecOp' name flag nop dep+++-- | Define a new deprecated flag where the deprecation message+-- is shown depending on the flag value+depFlagSpecCond :: String+ -> flag+ -> (TurnOnFlag -> Bool)+ -> String+ -> (Deprecation, FlagSpec flag)+depFlagSpecCond name flag cond dep =+ (Deprecated, FlagSpec name flag (\f -> when (cond f) $ deprecate dep)+ AllModes)++-- | Define a new flag for GHCi.+flagGhciSpec :: String -> flag -> (Deprecation, FlagSpec flag)+flagGhciSpec name flag = flagGhciSpec' name flag nop++-- | Define a new flag for GHCi with an effect.+flagGhciSpec' :: String -> flag -> (TurnOnFlag -> DynP ())+ -> (Deprecation, FlagSpec flag)+flagGhciSpec' name flag act = (NotDeprecated, FlagSpec name flag act OnlyGhci)++-- | Define a new flag invisible to CLI completion.+flagHiddenSpec :: String -> flag -> (Deprecation, FlagSpec flag)+flagHiddenSpec name flag = flagHiddenSpec' name flag nop++-- | Define a new flag invisible to CLI completion with an effect.+flagHiddenSpec' :: String -> flag -> (TurnOnFlag -> DynP ())+ -> (Deprecation, FlagSpec flag)+flagHiddenSpec' name flag act = (NotDeprecated, FlagSpec name flag act+ HiddenFlag)++-- | Hide a 'FlagSpec' from being displayed in @--show-options@.+--+-- This is for example useful for flags that are obsolete, but should not+-- (yet) be deprecated for compatibility reasons.+hideFlag :: (Deprecation, FlagSpec a) -> (Deprecation, FlagSpec a)+hideFlag (dep, fs) = (dep, fs { flagSpecGhcMode = HiddenFlag })++mkFlag :: TurnOnFlag -- ^ True <=> it should be turned on+ -> String -- ^ The flag prefix+ -> (flag -> DynP ()) -- ^ What to do when the flag is found+ -> (Deprecation, FlagSpec flag) -- ^ Specification of+ -- this particular flag+ -> (Deprecation, Flag (CmdLineP DynFlags))+mkFlag turn_on flagPrefix f (dep, (FlagSpec name flag extra_action mode))+ = (dep,+ Flag (flagPrefix ++ name) (NoArg (f flag >> extra_action turn_on)) mode)++deprecate :: String -> DynP ()+deprecate s = do+ arg <- getArg+ addFlagWarn (DriverDeprecatedFlag arg s)++deprecatedForExtension :: String -> TurnOnFlag -> String+deprecatedForExtension lang turn_on+ = "use -X" ++ flag +++ " or pragma {-# LANGUAGE " ++ flag ++ " #-} instead"+ where+ flag | turn_on = lang+ | otherwise = "No" ++ lang++deprecatedForExtensions :: [String] -> TurnOnFlag -> String+deprecatedForExtensions [] _ = panic "new extension has not been specified"+deprecatedForExtensions [lang] turn_on = deprecatedForExtension lang turn_on+deprecatedForExtensions langExts turn_on+ = "use " ++ xExt flags ++ " instead"+ where+ flags | turn_on = langExts+ | otherwise = ("No" ++) <$> langExts++ xExt fls = intercalate " and " $ (\flag -> "-X" ++ flag) <$> fls++useInstead :: String -> String -> TurnOnFlag -> String+useInstead prefix flag turn_on+ = "Use " ++ prefix ++ no ++ flag ++ " instead"+ where+ no = if turn_on then "" else "no-"++nop :: TurnOnFlag -> DynP ()+nop _ = return ()++-- | Find the 'FlagSpec' for a 'WarningFlag'.+flagSpecOf :: WarningFlag -> Maybe (FlagSpec WarningFlag)+flagSpecOf = flip Map.lookup wWarningFlagMap++wWarningFlagMap :: Map.Map WarningFlag (FlagSpec WarningFlag)+wWarningFlagMap = Map.fromListWith (\_ x -> x) $ map (flagSpecFlag &&& id) wWarningFlags++-- | These @-W\<blah\>@ flags can all be reversed with @-Wno-\<blah\>@+wWarningFlags :: [FlagSpec WarningFlag]+wWarningFlags = map snd (sortBy (comparing fst) wWarningFlagsDeps)++wWarningFlagsDeps :: [(Deprecation, FlagSpec WarningFlag)]+wWarningFlagsDeps = mconcat [+-- See Note [Updating flag description in the User's Guide]+-- See Note [Supporting CLI completion]+-- Please keep the list of flags below sorted alphabetically+ warnSpec Opt_WarnAlternativeLayoutRuleTransitional,+ warnSpec Opt_WarnAmbiguousFields,+ depWarnSpec Opt_WarnAutoOrphans+ "it has no effect",+ warnSpec Opt_WarnCPPUndef,+ warnSpec Opt_WarnUnbangedStrictPatterns,+ warnSpec Opt_WarnDeferredTypeErrors,+ warnSpec Opt_WarnDeferredOutOfScopeVariables,+ warnSpec Opt_WarnDeprecatedFlags,+ warnSpec Opt_WarnDerivingDefaults,+ warnSpec Opt_WarnDerivingTypeable,+ warnSpec Opt_WarnDodgyExports,+ warnSpec Opt_WarnDodgyForeignImports,+ warnSpec Opt_WarnDodgyImports,+ warnSpec Opt_WarnEmptyEnumerations,+ subWarnSpec "duplicate-constraints"+ Opt_WarnDuplicateConstraints+ "it is subsumed by -Wredundant-constraints",+ warnSpec Opt_WarnRedundantConstraints,+ warnSpec Opt_WarnDuplicateExports,+ depWarnSpec Opt_WarnHiShadows+ "it is not used, and was never implemented",+ warnSpec Opt_WarnInaccessibleCode,+ warnSpec Opt_WarnImplicitPrelude,+ depWarnSpec Opt_WarnImplicitKindVars+ "it is now an error",+ warnSpec Opt_WarnIncompletePatterns,+ warnSpec Opt_WarnIncompletePatternsRecUpd,+ warnSpec Opt_WarnIncompleteUniPatterns,+ warnSpec Opt_WarnInlineRuleShadowing,+ warnSpec Opt_WarnIdentities,+ warnSpec Opt_WarnMissingFields,+ warnSpec Opt_WarnMissingImportList,+ warnSpec Opt_WarnMissingExportList,+ subWarnSpec "missing-local-sigs"+ Opt_WarnMissingLocalSignatures+ "it is replaced by -Wmissing-local-signatures",+ warnSpec Opt_WarnMissingLocalSignatures,+ warnSpec Opt_WarnMissingMethods,+ depWarnSpec Opt_WarnMissingMonadFailInstances+ "fail is no longer a method of Monad",+ warnSpec Opt_WarnSemigroup,+ warnSpec Opt_WarnMissingSignatures,+ warnSpec Opt_WarnMissingKindSignatures,+ warnSpec Opt_WarnMissingPolyKindSignatures,+ subWarnSpec "missing-exported-sigs"+ Opt_WarnMissingExportedSignatures+ "it is replaced by -Wmissing-exported-signatures",+ warnSpec Opt_WarnMissingExportedSignatures,+ warnSpec Opt_WarnMonomorphism,+ warnSpec Opt_WarnNameShadowing,+ warnSpec Opt_WarnNonCanonicalMonadInstances,+ depWarnSpec Opt_WarnNonCanonicalMonadFailInstances+ "fail is no longer a method of Monad",+ warnSpec Opt_WarnNonCanonicalMonoidInstances,+ warnSpec Opt_WarnOrphans,+ warnSpec Opt_WarnOverflowedLiterals,+ warnSpec Opt_WarnOverlappingPatterns,+ warnSpec Opt_WarnMissedSpecs,+ warnSpec Opt_WarnAllMissedSpecs,+ warnSpec' Opt_WarnSafe setWarnSafe,+ warnSpec Opt_WarnTrustworthySafe,+ warnSpec Opt_WarnInferredSafeImports,+ warnSpec Opt_WarnMissingSafeHaskellMode,+ warnSpec Opt_WarnTabs,+ warnSpec Opt_WarnTypeDefaults,+ warnSpec Opt_WarnTypedHoles,+ warnSpec Opt_WarnPartialTypeSignatures,+ warnSpec Opt_WarnUnrecognisedPragmas,+ warnSpec Opt_WarnMisplacedPragmas,+ warnSpec' Opt_WarnUnsafe setWarnUnsafe,+ warnSpec Opt_WarnUnsupportedCallingConventions,+ warnSpec Opt_WarnUnsupportedLlvmVersion,+ warnSpec Opt_WarnMissedExtraSharedLib,+ warnSpec Opt_WarnUntickedPromotedConstructors,+ warnSpec Opt_WarnUnusedDoBind,+ warnSpec Opt_WarnUnusedForalls,+ warnSpec Opt_WarnUnusedImports,+ warnSpec Opt_WarnUnusedLocalBinds,+ warnSpec Opt_WarnUnusedMatches,+ warnSpec Opt_WarnUnusedPatternBinds,+ warnSpec Opt_WarnUnusedTopBinds,+ warnSpec Opt_WarnUnusedTypePatterns,+ warnSpec Opt_WarnUnusedRecordWildcards,+ warnSpec Opt_WarnRedundantBangPatterns,+ warnSpec Opt_WarnRedundantRecordWildcards,+ warnSpec Opt_WarnRedundantStrictnessFlags,+ warnSpec Opt_WarnWrongDoBind,+ warnSpec Opt_WarnMissingPatternSynonymSignatures,+ warnSpec Opt_WarnMissingDerivingStrategies,+ warnSpec Opt_WarnSimplifiableClassConstraints,+ warnSpec Opt_WarnMissingHomeModules,+ warnSpec Opt_WarnUnrecognisedWarningFlags,+ warnSpec Opt_WarnStarBinder,+ warnSpec Opt_WarnStarIsType,+ depWarnSpec Opt_WarnSpaceAfterBang+ "bang patterns can no longer be written with a space",+ warnSpec Opt_WarnPartialFields,+ warnSpec Opt_WarnPrepositiveQualifiedModule,+ warnSpec Opt_WarnUnusedPackages,+ warnSpec Opt_WarnCompatUnqualifiedImports,+ warnSpec Opt_WarnInvalidHaddock,+ warnSpec Opt_WarnOperatorWhitespaceExtConflict,+ warnSpec Opt_WarnOperatorWhitespace,+ warnSpec Opt_WarnImplicitLift,+ warnSpec Opt_WarnMissingExportedPatternSynonymSignatures,+ warnSpec Opt_WarnForallIdentifier,+ warnSpec Opt_WarnUnicodeBidirectionalFormatCharacters,+ warnSpec Opt_WarnGADTMonoLocalBinds,+ warnSpec Opt_WarnTypeEqualityOutOfScope,+ warnSpec Opt_WarnTypeEqualityRequiresOperators,+ warnSpec Opt_WarnTermVariableCapture,+ warnSpec Opt_WarnMissingRoleAnnotations,+ warnSpec Opt_WarnImplicitRhsQuantification,+ warnSpec Opt_WarnIncompleteExportWarnings+ ]++warningGroupsDeps :: [(Deprecation, FlagSpec WarningGroup)]+warningGroupsDeps = map mk warningGroups+ where+ mk g = (NotDeprecated, FlagSpec (warningGroupName g) g nop AllModes)++-- | These @-\<blah\>@ flags can all be reversed with @-no-\<blah\>@+negatableFlagsDeps :: [(Deprecation, FlagSpec GeneralFlag)]+negatableFlagsDeps = [+ flagGhciSpec "ignore-dot-ghci" Opt_IgnoreDotGhci ]++-- | These @-d\<blah\>@ flags can all be reversed with @-dno-\<blah\>@+dFlagsDeps :: [(Deprecation, FlagSpec GeneralFlag)]+dFlagsDeps = [+-- 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 "ppr-case-as-let" Opt_PprCaseAsLet,+ depFlagSpec' "ppr-ticks" Opt_PprShowTicks+ (\turn_on -> useInstead "-d" "suppress-ticks" (not turn_on)),+ flagSpec "suppress-ticks" Opt_SuppressTicks,+ depFlagSpec' "suppress-stg-free-vars" Opt_SuppressStgExts+ (useInstead "-d" "suppress-stg-exts"),+ flagSpec "suppress-stg-exts" Opt_SuppressStgExts,+ flagSpec "suppress-stg-reps" Opt_SuppressStgReps,+ flagSpec "suppress-coercions" Opt_SuppressCoercions,+ flagSpec "suppress-coercion-types" Opt_SuppressCoercionTypes,+ 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-core-sizes" Opt_SuppressCoreSizes+ ]++-- | These @-f\<blah\>@ flags can all be reversed with @-fno-\<blah\>@+fFlags :: [FlagSpec GeneralFlag]+fFlags = map snd fFlagsDeps++fFlagsDeps :: [(Deprecation, FlagSpec GeneralFlag)]+fFlagsDeps = [+-- 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,+ flagSpec "call-arity" Opt_CallArity,+ flagSpec "exitification" Opt_Exitification,+ flagSpec "case-merge" Opt_CaseMerge,+ flagSpec "case-folding" Opt_CaseFolding,+ flagSpec "cmm-elim-common-blocks" Opt_CmmElimCommonBlocks,+ flagSpec "cmm-sink" Opt_CmmSink,+ flagSpec "cmm-static-pred" Opt_CmmStaticPred,+ flagSpec "cse" Opt_CSE,+ flagSpec "stg-cse" Opt_StgCSE,+ flagSpec "stg-lift-lams" Opt_StgLiftLams,+ flagSpec "cpr-anal" Opt_CprAnal,+ flagSpec "defer-diagnostics" Opt_DeferDiagnostics,+ flagSpec "defer-type-errors" Opt_DeferTypeErrors,+ flagSpec "defer-typed-holes" Opt_DeferTypedHoles,+ flagSpec "defer-out-of-scope-variables" Opt_DeferOutOfScopeVariables,+ flagSpec "diagnostics-show-caret" Opt_DiagnosticsShowCaret,+ -- With-ways needs to be reversible hence why its made via flagSpec unlike+ -- other debugging flags.+ flagSpec "dump-with-ways" Opt_DumpWithWays,+ flagSpec "dicts-cheap" Opt_DictsCheap,+ flagSpec "dicts-strict" Opt_DictsStrict,+ depFlagSpec "dmd-tx-dict-sel"+ Opt_DmdTxDictSel "effect is now unconditionally enabled",+ flagSpec "do-eta-reduction" Opt_DoEtaReduction,+ flagSpec "do-lambda-eta-expansion" Opt_DoLambdaEtaExpansion,+ flagSpec "eager-blackholing" Opt_EagerBlackHoling,+ flagSpec "embed-manifest" Opt_EmbedManifest,+ flagSpec "enable-rewrite-rules" Opt_EnableRewriteRules,+ flagSpec "enable-th-splice-warnings" Opt_EnableThSpliceWarnings,+ flagSpec "error-spans" Opt_ErrorSpans,+ flagSpec "excess-precision" Opt_ExcessPrecision,+ flagSpec "expose-all-unfoldings" Opt_ExposeAllUnfoldings,+ flagSpec "expose-internal-symbols" Opt_ExposeInternalSymbols,+ flagSpec "external-dynamic-refs" Opt_ExternalDynamicRefs,+ flagSpec "external-interpreter" Opt_ExternalInterpreter,+ flagSpec "family-application-cache" Opt_FamAppCache,+ flagSpec "float-in" Opt_FloatIn,+ flagSpec "force-recomp" Opt_ForceRecomp,+ flagSpec "ignore-optim-changes" Opt_IgnoreOptimChanges,+ flagSpec "ignore-hpc-changes" Opt_IgnoreHpcChanges,+ flagSpec "full-laziness" Opt_FullLaziness,+ depFlagSpec' "fun-to-thunk" Opt_FunToThunk+ (useInstead "-f" "full-laziness"),+ flagSpec "local-float-out" Opt_LocalFloatOut,+ flagSpec "local-float-out-top-level" Opt_LocalFloatOutTopLevel,+ flagSpec "gen-manifest" Opt_GenManifest,+ flagSpec "ghci-history" Opt_GhciHistory,+ flagSpec "ghci-leak-check" Opt_GhciLeakCheck,+ flagSpec "validate-ide-info" Opt_ValidateHie,+ 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,+ flagSpec "ignore-asserts" Opt_IgnoreAsserts,+ flagSpec "ignore-interface-pragmas" Opt_IgnoreInterfacePragmas,+ flagGhciSpec "implicit-import-qualified" Opt_ImplicitImportQualified,+ flagSpec "irrefutable-tuples" Opt_IrrefutableTuples,+ flagSpec "keep-going" Opt_KeepGoing,+ flagSpec "late-dmd-anal" Opt_LateDmdAnal,+ flagSpec "late-specialise" Opt_LateSpecialise,+ flagSpec "liberate-case" Opt_LiberateCase,+ flagHiddenSpec "llvm-tbaa" Opt_LlvmTBAA,+ flagHiddenSpec "llvm-fill-undef-with-garbage" Opt_LlvmFillUndefWithGarbage,+ flagSpec "loopification" Opt_Loopification,+ flagSpec "block-layout-cfg" Opt_CfgBlocklayout,+ flagSpec "block-layout-weightless" Opt_WeightlessBlocklayout,+ flagSpec "omit-interface-pragmas" Opt_OmitInterfacePragmas,+ flagSpec "omit-yields" Opt_OmitYields,+ flagSpec "optimal-applicative-do" Opt_OptimalApplicativeDo,+ flagSpec "pedantic-bottoms" Opt_PedanticBottoms,+ flagSpec "pre-inlining" Opt_SimplPreInlining,+ flagGhciSpec "print-bind-contents" Opt_PrintBindContents,+ flagGhciSpec "print-bind-result" Opt_PrintBindResult,+ flagGhciSpec "print-evld-with-show" Opt_PrintEvldWithShow,+ flagSpec "print-explicit-foralls" Opt_PrintExplicitForalls,+ flagSpec "print-explicit-kinds" Opt_PrintExplicitKinds,+ flagSpec "print-explicit-coercions" Opt_PrintExplicitCoercions,+ flagSpec "print-explicit-runtime-reps" Opt_PrintExplicitRuntimeReps,+ flagSpec "print-equality-relations" Opt_PrintEqualityRelations,+ flagSpec "print-axiom-incomps" Opt_PrintAxiomIncomps,+ flagSpec "print-unicode-syntax" Opt_PrintUnicodeSyntax,+ flagSpec "print-expanded-synonyms" Opt_PrintExpandedSynonyms,+ flagSpec "print-potential-instances" Opt_PrintPotentialInstances,+ flagSpec "print-redundant-promotion-ticks" Opt_PrintRedundantPromotionTicks,+ flagSpec "print-typechecker-elaboration" Opt_PrintTypecheckerElaboration,+ flagSpec "prof-cafs" Opt_AutoSccsOnIndividualCafs,+ flagSpec "prof-count-entries" Opt_ProfCountEntries,+ flagSpec "prof-late" Opt_ProfLateCcs,+ flagSpec "prof-manual" Opt_ProfManualCcs,+ flagSpec "prof-late-inline" Opt_ProfLateInlineCcs,+ flagSpec "regs-graph" Opt_RegsGraph,+ flagSpec "regs-iterative" Opt_RegsIterative,+ depFlagSpec' "rewrite-rules" Opt_EnableRewriteRules+ (useInstead "-f" "enable-rewrite-rules"),+ flagSpec "shared-implib" Opt_SharedImplib,+ flagSpec "spec-constr" Opt_SpecConstr,+ flagSpec "spec-constr-keen" Opt_SpecConstrKeen,+ flagSpec "specialise" Opt_Specialise,+ flagSpec "specialize" Opt_Specialise,+ flagSpec "specialise-aggressively" Opt_SpecialiseAggressively,+ flagSpec "specialize-aggressively" Opt_SpecialiseAggressively,+ flagSpec "cross-module-specialise" Opt_CrossModuleSpecialise,+ flagSpec "cross-module-specialize" Opt_CrossModuleSpecialise,+ flagSpec "polymorphic-specialisation" Opt_PolymorphicSpecialisation,+ flagSpec "specialise-incoherents" Opt_SpecialiseIncoherents,+ flagSpec "inline-generics" Opt_InlineGenerics,+ flagSpec "inline-generics-aggressively" Opt_InlineGenericsAggressively,+ flagSpec "static-argument-transformation" Opt_StaticArgumentTransformation,+ flagSpec "strictness" Opt_Strictness,+ flagSpec "use-rpaths" Opt_RPath,+ flagSpec "write-interface" Opt_WriteInterface,+ flagSpec "write-if-simplified-core" Opt_WriteIfSimplifiedCore,+ flagSpec "write-ide-info" Opt_WriteHie,+ flagSpec "unbox-small-strict-fields" Opt_UnboxSmallStrictFields,+ flagSpec "unbox-strict-fields" Opt_UnboxStrictFields,+ flagSpec "unoptimized-core-for-interpreter" Opt_UnoptimizedCoreForInterpreter,+ flagSpec "version-macros" Opt_VersionMacros,+ flagSpec "worker-wrapper" Opt_WorkerWrapper,+ flagSpec "worker-wrapper-cbv" Opt_WorkerWrapperUnlift, -- See Note [Worker/wrapper for strict arguments]+ flagSpec "solve-constant-dicts" Opt_SolveConstantDicts,+ flagSpec "catch-nonexhaustive-cases" Opt_CatchNonexhaustiveCases,+ flagSpec "alignment-sanitisation" Opt_AlignmentSanitisation,+ flagSpec "check-prim-bounds" Opt_DoBoundsChecking,+ flagSpec "num-constant-folding" Opt_NumConstantFolding,+ flagSpec "core-constant-folding" Opt_CoreConstantFolding,+ flagSpec "fast-pap-calls" Opt_FastPAPCalls,+ flagSpec "cmm-control-flow" Opt_CmmControlFlow,+ flagSpec "show-warning-groups" Opt_ShowWarnGroups,+ flagSpec "hide-source-paths" Opt_HideSourcePaths,+ flagSpec "show-loaded-modules" Opt_ShowLoadedModules,+ flagSpec "whole-archive-hs-libs" Opt_WholeArchiveHsLibs,+ flagSpec "keep-cafs" Opt_KeepCAFs,+ flagSpec "link-rts" Opt_LinkRts,+ flagSpec "byte-code-and-object-code" Opt_ByteCodeAndObjectCode,+ flagSpec "prefer-byte-code" Opt_UseBytecodeRatherThanObjects,+ flagSpec' "compact-unwind" Opt_CompactUnwind+ (\turn_on -> updM (\dflags -> do+ unless (platformOS (targetPlatform dflags) == OSDarwin && turn_on)+ (addWarn "-compact-unwind is only implemented by the darwin platform. Ignoring.")+ return dflags)),+ flagSpec "show-error-context" Opt_ShowErrorContext,+ flagSpec "cmm-thread-sanitizer" Opt_CmmThreadSanitizer,+ flagSpec "split-sections" Opt_SplitSections,+ flagSpec "break-points" Opt_InsertBreakpoints+ ]+ ++ 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 "GHC.Tc.Errors.Hole" 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 "show-docs-of-hole-fits" Opt_ShowDocsOfHoleFits,+ 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++fLangFlagsDeps :: [(Deprecation, FlagSpec LangExt.Extension)]+fLangFlagsDeps = [+-- See Note [Updating flag description in the User's Guide]+-- See Note [Supporting CLI completion]+ depFlagSpecOp' "th" LangExt.TemplateHaskell+ checkTemplateHaskellOk+ (deprecatedForExtension "TemplateHaskell"),+ depFlagSpec' "fi" LangExt.ForeignFunctionInterface+ (deprecatedForExtension "ForeignFunctionInterface"),+ depFlagSpec' "ffi" LangExt.ForeignFunctionInterface+ (deprecatedForExtension "ForeignFunctionInterface"),+ depFlagSpec' "arrows" LangExt.Arrows+ (deprecatedForExtension "Arrows"),+ depFlagSpec' "implicit-prelude" LangExt.ImplicitPrelude+ (deprecatedForExtension "ImplicitPrelude"),+ depFlagSpec' "bang-patterns" LangExt.BangPatterns+ (deprecatedForExtension "BangPatterns"),+ depFlagSpec' "monomorphism-restriction" LangExt.MonomorphismRestriction+ (deprecatedForExtension "MonomorphismRestriction"),+ depFlagSpec' "extended-default-rules" LangExt.ExtendedDefaultRules+ (deprecatedForExtension "ExtendedDefaultRules"),+ depFlagSpec' "implicit-params" LangExt.ImplicitParams+ (deprecatedForExtension "ImplicitParams"),+ depFlagSpec' "scoped-type-variables" LangExt.ScopedTypeVariables+ (deprecatedForExtension "ScopedTypeVariables"),+ depFlagSpec' "allow-overlapping-instances" LangExt.OverlappingInstances+ (deprecatedForExtension "OverlappingInstances"),+ depFlagSpec' "allow-undecidable-instances" LangExt.UndecidableInstances+ (deprecatedForExtension "UndecidableInstances"),+ depFlagSpec' "allow-incoherent-instances" LangExt.IncoherentInstances+ (deprecatedForExtension "IncoherentInstances")+ ]++supportedLanguages :: [String]+supportedLanguages = map (flagSpecName . snd) languageFlagsDeps++supportedLanguageOverlays :: [String]+supportedLanguageOverlays = map (flagSpecName . snd) safeHaskellFlagsDeps++supportedExtensions :: ArchOS -> [String]+supportedExtensions (ArchOS arch os) = concatMap toFlagSpecNamePair xFlags+ where+ toFlagSpecNamePair flg+ -- IMPORTANT! Make sure that `ghc --supported-extensions` omits+ -- "TemplateHaskell"/"QuasiQuotes" when it's known not to work out of the+ -- box. See also GHC #11102 and #16331 for more details about+ -- the rationale+ | isAIX, flagSpecFlag flg == LangExt.TemplateHaskell = [noName]+ | isAIX, flagSpecFlag flg == LangExt.QuasiQuotes = [noName]+ -- "JavaScriptFFI" is only supported on the JavaScript backend+ | notJS, flagSpecFlag flg == LangExt.JavaScriptFFI = [noName]+ | otherwise = [name, noName]+ where+ isAIX = os == OSAIX+ notJS = arch /= ArchJavaScript+ noName = "No" ++ name+ name = flagSpecName flg++supportedLanguagesAndExtensions :: ArchOS -> [String]+supportedLanguagesAndExtensions arch_os =+ supportedLanguages ++ supportedLanguageOverlays ++ supportedExtensions arch_os++-- | These -X<blah> flags cannot be reversed with -XNo<blah>+languageFlagsDeps :: [(Deprecation, FlagSpec Language)]+languageFlagsDeps = [+ flagSpec "Haskell98" Haskell98,+ flagSpec "Haskell2010" Haskell2010,+ flagSpec "GHC2021" GHC2021+ ]++-- | These -X<blah> flags cannot be reversed with -XNo<blah>+-- They are used to place hard requirements on what GHC Haskell language+-- features can be used.+safeHaskellFlagsDeps :: [(Deprecation, FlagSpec SafeHaskellMode)]+safeHaskellFlagsDeps = [mkF Sf_Unsafe, mkF Sf_Trustworthy, mkF Sf_Safe]+ where mkF flag = flagSpec (show flag) flag++-- | These -X<blah> flags can all be reversed with -XNo<blah>+xFlags :: [FlagSpec LangExt.Extension]+xFlags = map snd xFlagsDeps++xFlagsDeps :: [(Deprecation, FlagSpec LangExt.Extension)]+xFlagsDeps = [+-- See Note [Updating flag description in the User's Guide]+-- See Note [Supporting CLI completion]+-- See Note [Adding a language extension]+-- Please keep the list of flags below sorted alphabetically+ flagSpec "AllowAmbiguousTypes" LangExt.AllowAmbiguousTypes,+ flagSpec "AlternativeLayoutRule" LangExt.AlternativeLayoutRule,+ flagSpec "AlternativeLayoutRuleTransitional"+ LangExt.AlternativeLayoutRuleTransitional,+ flagSpec "Arrows" LangExt.Arrows,+ depFlagSpecCond "AutoDeriveTypeable" LangExt.AutoDeriveTypeable+ id+ ("Typeable instances are created automatically " +++ "for all types since GHC 8.2."),+ flagSpec "BangPatterns" LangExt.BangPatterns,+ flagSpec "BinaryLiterals" LangExt.BinaryLiterals,+ flagSpec "CApiFFI" LangExt.CApiFFI,+ flagSpec "CPP" LangExt.Cpp,+ flagSpec "CUSKs" LangExt.CUSKs,+ flagSpec "ConstrainedClassMethods" LangExt.ConstrainedClassMethods,+ flagSpec "ConstraintKinds" LangExt.ConstraintKinds,+ flagSpec "DataKinds" LangExt.DataKinds,+ depFlagSpecCond "DatatypeContexts" LangExt.DatatypeContexts+ id+ ("It was widely considered a misfeature, " +++ "and has been removed from the Haskell language."),+ flagSpec "DefaultSignatures" LangExt.DefaultSignatures,+ flagSpec "DeriveAnyClass" LangExt.DeriveAnyClass,+ flagSpec "DeriveDataTypeable" LangExt.DeriveDataTypeable,+ flagSpec "DeriveFoldable" LangExt.DeriveFoldable,+ flagSpec "DeriveFunctor" LangExt.DeriveFunctor,+ flagSpec "DeriveGeneric" LangExt.DeriveGeneric,+ flagSpec "DeriveLift" LangExt.DeriveLift,+ flagSpec "DeriveTraversable" LangExt.DeriveTraversable,+ flagSpec "DerivingStrategies" LangExt.DerivingStrategies,+ flagSpec' "DerivingVia" LangExt.DerivingVia+ setDeriveVia,+ flagSpec "DisambiguateRecordFields" LangExt.DisambiguateRecordFields,+ flagSpec "DoAndIfThenElse" LangExt.DoAndIfThenElse,+ flagSpec "BlockArguments" LangExt.BlockArguments,+ depFlagSpec' "DoRec" LangExt.RecursiveDo+ (deprecatedForExtension "RecursiveDo"),+ flagSpec "DuplicateRecordFields" LangExt.DuplicateRecordFields,+ flagSpec "FieldSelectors" LangExt.FieldSelectors,+ flagSpec "EmptyCase" LangExt.EmptyCase,+ flagSpec "EmptyDataDecls" LangExt.EmptyDataDecls,+ flagSpec "EmptyDataDeriving" LangExt.EmptyDataDeriving,+ flagSpec "ExistentialQuantification" LangExt.ExistentialQuantification,+ flagSpec "ExplicitForAll" LangExt.ExplicitForAll,+ flagSpec "ExplicitNamespaces" LangExt.ExplicitNamespaces,+ flagSpec "ExtendedDefaultRules" LangExt.ExtendedDefaultRules,+ flagSpec "ExtendedLiterals" LangExt.ExtendedLiterals,+ flagSpec "FlexibleContexts" LangExt.FlexibleContexts,+ flagSpec "FlexibleInstances" LangExt.FlexibleInstances,+ flagSpec "ForeignFunctionInterface" LangExt.ForeignFunctionInterface,+ flagSpec "FunctionalDependencies" LangExt.FunctionalDependencies,+ flagSpec "GADTSyntax" LangExt.GADTSyntax,+ flagSpec "GADTs" LangExt.GADTs,+ flagSpec "GHCForeignImportPrim" LangExt.GHCForeignImportPrim,+ flagSpec' "GeneralizedNewtypeDeriving" LangExt.GeneralizedNewtypeDeriving+ setGenDeriving,+ flagSpec' "GeneralisedNewtypeDeriving" LangExt.GeneralizedNewtypeDeriving+ setGenDeriving,+ flagSpec "ImplicitParams" LangExt.ImplicitParams,+ flagSpec "ImplicitPrelude" LangExt.ImplicitPrelude,+ flagSpec "ImportQualifiedPost" LangExt.ImportQualifiedPost,+ flagSpec "ImpredicativeTypes" LangExt.ImpredicativeTypes,+ flagSpec' "IncoherentInstances" LangExt.IncoherentInstances+ setIncoherentInsts,+ flagSpec "TypeFamilyDependencies" LangExt.TypeFamilyDependencies,+ flagSpec "InstanceSigs" LangExt.InstanceSigs,+ flagSpec "ApplicativeDo" LangExt.ApplicativeDo,+ flagSpec "InterruptibleFFI" LangExt.InterruptibleFFI,+ flagSpec "JavaScriptFFI" LangExt.JavaScriptFFI,+ flagSpec "KindSignatures" LangExt.KindSignatures,+ flagSpec "LambdaCase" LangExt.LambdaCase,+ flagSpec "LexicalNegation" LangExt.LexicalNegation,+ flagSpec "LiberalTypeSynonyms" LangExt.LiberalTypeSynonyms,+ flagSpec "LinearTypes" LangExt.LinearTypes,+ flagSpec "MagicHash" LangExt.MagicHash,+ flagSpec "MonadComprehensions" LangExt.MonadComprehensions,+ flagSpec "MonoLocalBinds" LangExt.MonoLocalBinds,+ flagSpec "DeepSubsumption" LangExt.DeepSubsumption,+ flagSpec "MonomorphismRestriction" LangExt.MonomorphismRestriction,+ flagSpec "MultiParamTypeClasses" LangExt.MultiParamTypeClasses,+ flagSpec "MultiWayIf" LangExt.MultiWayIf,+ flagSpec "NumericUnderscores" LangExt.NumericUnderscores,+ flagSpec "NPlusKPatterns" LangExt.NPlusKPatterns,+ flagSpec "NamedFieldPuns" LangExt.NamedFieldPuns,+ flagSpec "NamedWildCards" LangExt.NamedWildCards,+ flagSpec "NegativeLiterals" LangExt.NegativeLiterals,+ flagSpec "HexFloatLiterals" LangExt.HexFloatLiterals,+ flagSpec "NondecreasingIndentation" LangExt.NondecreasingIndentation,+ depFlagSpec' "NullaryTypeClasses" LangExt.NullaryTypeClasses+ (deprecatedForExtension "MultiParamTypeClasses"),+ flagSpec "NumDecimals" LangExt.NumDecimals,+ depFlagSpecOp "OverlappingInstances" LangExt.OverlappingInstances+ setOverlappingInsts+ "instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS",+ flagSpec "OverloadedLabels" LangExt.OverloadedLabels,+ flagSpec "OverloadedLists" LangExt.OverloadedLists,+ flagSpec "OverloadedStrings" LangExt.OverloadedStrings,+ flagSpec "PackageImports" LangExt.PackageImports,+ flagSpec "ParallelArrays" LangExt.ParallelArrays,+ flagSpec "ParallelListComp" LangExt.ParallelListComp,+ flagSpec "PartialTypeSignatures" LangExt.PartialTypeSignatures,+ flagSpec "PatternGuards" LangExt.PatternGuards,+ depFlagSpec' "PatternSignatures" LangExt.ScopedTypeVariables+ (deprecatedForExtension "ScopedTypeVariables"),+ 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 "QualifiedDo" LangExt.QualifiedDo,+ flagSpec "Rank2Types" LangExt.RankNTypes,+ flagSpec "RankNTypes" LangExt.RankNTypes,+ flagSpec "RebindableSyntax" LangExt.RebindableSyntax,+ flagSpec "OverloadedRecordDot" LangExt.OverloadedRecordDot,+ flagSpec "OverloadedRecordUpdate" LangExt.OverloadedRecordUpdate,+ depFlagSpec' "RecordPuns" LangExt.NamedFieldPuns+ (deprecatedForExtension "NamedFieldPuns"),+ flagSpec "RecordWildCards" LangExt.RecordWildCards,+ flagSpec "RecursiveDo" LangExt.RecursiveDo,+ flagSpec "RelaxedLayout" LangExt.RelaxedLayout,+ depFlagSpecCond "RelaxedPolyRec" LangExt.RelaxedPolyRec+ not+ "You can't turn off RelaxedPolyRec any more",+ 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,+ flagSpec' "TemplateHaskell" LangExt.TemplateHaskell+ checkTemplateHaskellOk,+ flagSpec "TemplateHaskellQuotes" LangExt.TemplateHaskellQuotes,+ flagSpec "StandaloneKindSignatures" LangExt.StandaloneKindSignatures,+ flagSpec "TraditionalRecordSyntax" LangExt.TraditionalRecordSyntax,+ flagSpec "TransformListComp" LangExt.TransformListComp,+ flagSpec "TupleSections" LangExt.TupleSections,+ flagSpec "TypeAbstractions" LangExt.TypeAbstractions,+ flagSpec "TypeApplications" LangExt.TypeApplications,+ flagSpec "TypeData" LangExt.TypeData,+ depFlagSpec' "TypeInType" LangExt.TypeInType+ (deprecatedForExtensions ["DataKinds", "PolyKinds"]),+ flagSpec "TypeFamilies" LangExt.TypeFamilies,+ flagSpec "TypeOperators" LangExt.TypeOperators,+ flagSpec "TypeSynonymInstances" LangExt.TypeSynonymInstances,+ flagSpec "UnboxedTuples" LangExt.UnboxedTuples,+ flagSpec "UnboxedSums" LangExt.UnboxedSums,+ flagSpec "UndecidableInstances" LangExt.UndecidableInstances,+ flagSpec "UndecidableSuperClasses" LangExt.UndecidableSuperClasses,+ flagSpec "UnicodeSyntax" LangExt.UnicodeSyntax,+ flagSpec "UnliftedDatatypes" LangExt.UnliftedDatatypes,+ flagSpec "UnliftedFFITypes" LangExt.UnliftedFFITypes,+ flagSpec "UnliftedNewtypes" LangExt.UnliftedNewtypes,+ flagSpec "ViewPatterns" LangExt.ViewPatterns+ ]++validHoleFitsImpliedGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]+validHoleFitsImpliedGFlags+ = [ (Opt_UnclutterValidHoleFits, turnOff, Opt_ShowTypeAppOfHoleFits)+ , (Opt_UnclutterValidHoleFits, turnOff, Opt_ShowTypeAppVarsOfHoleFits)+ , (Opt_UnclutterValidHoleFits, turnOff, Opt_ShowDocsOfHoleFits)+ , (Opt_ShowTypeAppVarsOfHoleFits, turnOff, Opt_ShowTypeAppOfHoleFits)+ , (Opt_UnclutterValidHoleFits, turnOff, Opt_ShowProvOfHoleFits) ]++-- General flags that are switched on/off when other general flags are switched+-- on+impliedGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]+impliedGFlags = [(Opt_DeferTypeErrors, turnOn, Opt_DeferTypedHoles)+ ,(Opt_DeferTypeErrors, turnOn, Opt_DeferOutOfScopeVariables)+ ,(Opt_DoLinearCoreLinting, turnOn, Opt_DoCoreLinting)+ ,(Opt_Strictness, turnOn, Opt_WorkerWrapper)+ ,(Opt_WriteIfSimplifiedCore, turnOn, Opt_WriteInterface)+ ,(Opt_ByteCodeAndObjectCode, turnOn, Opt_WriteIfSimplifiedCore)+ ] ++ validHoleFitsImpliedGFlags++-- General flags that are switched on/off when other general flags are switched+-- off+impliedOffGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]+impliedOffGFlags = [(Opt_Strictness, turnOff, Opt_WorkerWrapper)]++impliedXFlags :: [(LangExt.Extension, TurnOnFlag, LangExt.Extension)]+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)+ , (LangExt.FlexibleInstances, turnOn, LangExt.TypeSynonymInstances)+ , (LangExt.FunctionalDependencies, turnOn, LangExt.MultiParamTypeClasses)+ , (LangExt.MultiParamTypeClasses, turnOn, LangExt.ConstrainedClassMethods) -- c.f. #7854+ , (LangExt.TypeFamilyDependencies, turnOn, LangExt.TypeFamilies)++ , (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)++ -- Standalone kind signatures are a replacement for CUSKs.+ , (LangExt.StandaloneKindSignatures, turnOff, LangExt.CUSKs)++ -- AutoDeriveTypeable is not very useful without DeriveDataTypeable+ , (LangExt.AutoDeriveTypeable, turnOn, LangExt.DeriveDataTypeable)++ -- We turn this on so that we can export associated type+ -- type synonyms in subordinates (e.g. MyClass(type AssocType))+ , (LangExt.TypeFamilies, turnOn, LangExt.ExplicitNamespaces)+ , (LangExt.TypeOperators, turnOn, LangExt.ExplicitNamespaces)++ , (LangExt.ImpredicativeTypes, turnOn, LangExt.RankNTypes)++ -- Record wild-cards implies field disambiguation+ -- Otherwise if you write (C {..}) you may well get+ -- stuff like " 'a' not in scope ", which is a bit silly+ -- if the compiler has just filled in field 'a' of constructor 'C'+ , (LangExt.RecordWildCards, turnOn, LangExt.DisambiguateRecordFields)++ , (LangExt.ParallelArrays, turnOn, LangExt.ParallelListComp)++ , (LangExt.JavaScriptFFI, turnOn, LangExt.InterruptibleFFI)++ , (LangExt.DeriveTraversable, turnOn, LangExt.DeriveFunctor)+ , (LangExt.DeriveTraversable, turnOn, LangExt.DeriveFoldable)++ -- Duplicate record fields require field disambiguation+ , (LangExt.DuplicateRecordFields, turnOn, LangExt.DisambiguateRecordFields)++ , (LangExt.TemplateHaskell, turnOn, LangExt.TemplateHaskellQuotes)+ , (LangExt.Strict, turnOn, LangExt.StrictData)++ -- Historically only UnboxedTuples was required for unboxed sums to work.+ -- To avoid breaking code, we make UnboxedTuples imply UnboxedSums.+ , (LangExt.UnboxedTuples, turnOn, LangExt.UnboxedSums)++ -- The extensions needed to declare an H98 unlifted data type+ , (LangExt.UnliftedDatatypes, turnOn, LangExt.DataKinds)+ , (LangExt.UnliftedDatatypes, turnOn, LangExt.StandaloneKindSignatures)+ ]++++-- | Things you get with `-dlint`.+enableDLint :: DynP ()+enableDLint = do+ mapM_ setGeneralFlag dLintFlags+ addWayDynP WayDebug+ where+ dLintFlags :: [GeneralFlag]+ dLintFlags =+ [ Opt_DoCoreLinting+ , Opt_DoStgLinting+ , Opt_DoCmmLinting+ , Opt_DoAsmLinting+ , Opt_CatchNonexhaustiveCases+ , Opt_LlvmFillUndefWithGarbage+ ]++enableGlasgowExts :: DynP ()+enableGlasgowExts = do setGeneralFlag Opt_PrintExplicitForalls+ mapM_ setExtensionFlag glasgowExtsFlags++disableGlasgowExts :: DynP ()+disableGlasgowExts = do unSetGeneralFlag Opt_PrintExplicitForalls+ mapM_ unSetExtensionFlag glasgowExtsFlags++-- Please keep what_glasgow_exts_does.rst up to date with this list+glasgowExtsFlags :: [LangExt.Extension]+glasgowExtsFlags = [+ LangExt.ConstrainedClassMethods+ , LangExt.DeriveDataTypeable+ , LangExt.DeriveFoldable+ , LangExt.DeriveFunctor+ , LangExt.DeriveGeneric+ , LangExt.DeriveTraversable+ , LangExt.EmptyDataDecls+ , LangExt.ExistentialQuantification+ , LangExt.ExplicitNamespaces+ , LangExt.FlexibleContexts+ , LangExt.FlexibleInstances+ , LangExt.ForeignFunctionInterface+ , LangExt.FunctionalDependencies+ , LangExt.GeneralizedNewtypeDeriving+ , LangExt.ImplicitParams+ , LangExt.KindSignatures+ , LangExt.LiberalTypeSynonyms+ , LangExt.MagicHash+ , LangExt.MultiParamTypeClasses+ , LangExt.ParallelListComp+ , LangExt.PatternGuards+ , LangExt.PostfixOperators+ , LangExt.RankNTypes+ , LangExt.RecursiveDo+ , LangExt.ScopedTypeVariables+ , LangExt.StandaloneDeriving+ , LangExt.TypeOperators+ , LangExt.TypeSynonymInstances+ , LangExt.UnboxedTuples+ , LangExt.UnicodeSyntax+ , LangExt.UnliftedFFITypes ]++setWarnSafe :: Bool -> DynP ()+setWarnSafe True = getCurLoc >>= \l -> upd (\d -> d { warnSafeOnLoc = l })+setWarnSafe False = return ()++setWarnUnsafe :: Bool -> DynP ()+setWarnUnsafe True = getCurLoc >>= \l -> upd (\d -> d { warnUnsafeOnLoc = l })+setWarnUnsafe False = return ()++setPackageTrust :: DynP ()+setPackageTrust = do+ setGeneralFlag Opt_PackageTrust+ l <- getCurLoc+ upd $ \d -> d { pkgTrustOnLoc = l }++setGenDeriving :: TurnOnFlag -> DynP ()+setGenDeriving True = getCurLoc >>= \l -> upd (\d -> d { newDerivOnLoc = l })+setGenDeriving False = return ()++setDeriveVia :: TurnOnFlag -> DynP ()+setDeriveVia True = getCurLoc >>= \l -> upd (\d -> d { deriveViaOnLoc = l })+setDeriveVia False = return ()++setOverlappingInsts :: TurnOnFlag -> DynP ()+setOverlappingInsts False = return ()+setOverlappingInsts True = do+ l <- getCurLoc+ upd (\d -> d { overlapInstLoc = l })++setIncoherentInsts :: TurnOnFlag -> DynP ()+setIncoherentInsts False = return ()+setIncoherentInsts True = do+ l <- getCurLoc+ upd (\d -> d { incoherentOnLoc = l })++checkTemplateHaskellOk :: TurnOnFlag -> DynP ()+checkTemplateHaskellOk _turn_on+ = getCurLoc >>= \l -> upd (\d -> d { thOnLoc = l })++{- **********************************************************************+%* *+ DynFlags constructors+%* *+%********************************************************************* -}++type DynP = EwM (CmdLineP DynFlags)++upd :: (DynFlags -> DynFlags) -> DynP ()+upd f = liftEwM (do dflags <- getCmdLineState+ putCmdLineState $! f dflags)++updM :: (DynFlags -> DynP DynFlags) -> DynP ()+updM f = do dflags <- liftEwM getCmdLineState+ dflags' <- f dflags+ liftEwM $ putCmdLineState $! dflags'++--------------- Constructor functions for OptKind -----------------+noArg :: (DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags)+noArg fn = NoArg (upd fn)++noArgM :: (DynFlags -> DynP DynFlags) -> OptKind (CmdLineP DynFlags)+noArgM fn = NoArg (updM fn)++hasArg :: (String -> DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags)+hasArg fn = HasArg (upd . fn)++sepArg :: (String -> DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags)+sepArg fn = SepArg (upd . fn)++intSuffix :: (Int -> DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags)+intSuffix fn = IntSuffix (\n -> upd (fn n))++intSuffixM :: (Int -> DynFlags -> DynP DynFlags) -> OptKind (CmdLineP DynFlags)+intSuffixM fn = IntSuffix (\n -> updM (fn n))++wordSuffix :: (Word -> DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags)+wordSuffix fn = WordSuffix (\n -> upd (fn n))++floatSuffix :: (Float -> DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags)+floatSuffix fn = FloatSuffix (\n -> upd (fn n))++optIntSuffixM :: (Maybe Int -> DynFlags -> DynP DynFlags)+ -> OptKind (CmdLineP DynFlags)+optIntSuffixM fn = OptIntSuffix (\mi -> updM (fn mi))++setDumpFlag :: DumpFlag -> OptKind (CmdLineP DynFlags)+setDumpFlag dump_flag = NoArg (setDumpFlag' dump_flag)++--------------------------+addWayDynP :: Way -> DynP ()+addWayDynP = upd . addWay'++addWay' :: Way -> DynFlags -> DynFlags+addWay' w dflags0 =+ let platform = targetPlatform dflags0+ dflags1 = dflags0 { targetWays_ = addWay w (targetWays_ dflags0) }+ dflags2 = foldr setGeneralFlag' dflags1+ (wayGeneralFlags platform w)+ dflags3 = foldr unSetGeneralFlag' dflags2+ (wayUnsetGeneralFlags platform w)+ in dflags3++removeWayDynP :: Way -> DynP ()+removeWayDynP w = upd (\dfs -> dfs { targetWays_ = removeWay w (targetWays_ dfs) })++--------------------------+setGeneralFlag, unSetGeneralFlag :: GeneralFlag -> DynP ()+setGeneralFlag f = upd (setGeneralFlag' f)+unSetGeneralFlag f = upd (unSetGeneralFlag' f)++setGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags+setGeneralFlag' f dflags = foldr ($) (gopt_set dflags f) deps+ where+ deps = [ if turn_on then setGeneralFlag' d+ else unSetGeneralFlag' d+ | (f', turn_on, d) <- impliedGFlags, f' == f ]+ -- When you set f, set the ones it implies+ -- NB: use setGeneralFlag recursively, in case the implied flags+ -- implies further flags++unSetGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags+unSetGeneralFlag' f dflags = foldr ($) (gopt_unset dflags f) deps+ where+ deps = [ if turn_on then setGeneralFlag' d+ else unSetGeneralFlag' d+ | (f', turn_on, d) <- impliedOffGFlags, f' == f ]+ -- In general, when you un-set f, we don't un-set the things it implies.+ -- There are however some exceptions, e.g., -fno-strictness implies+ -- -fno-worker-wrapper.+ --+ -- NB: use unSetGeneralFlag' recursively, in case the implied off flags+ -- imply further flags.++--------------------------+setWarningGroup :: WarningGroup -> DynP ()+setWarningGroup g = do+ mapM_ setWarningFlag (warningGroupFlags g)+ when (warningGroupIncludesExtendedWarnings g) $ upd wopt_set_all_custom++unSetWarningGroup :: WarningGroup -> DynP ()+unSetWarningGroup g = do+ mapM_ unSetWarningFlag (warningGroupFlags g)+ when (warningGroupIncludesExtendedWarnings g) $ upd wopt_unset_all_custom++setWErrorWarningGroup :: WarningGroup -> DynP ()+setWErrorWarningGroup g =+ do { setWarningGroup g+ ; setFatalWarningGroup g }++setFatalWarningGroup :: WarningGroup -> DynP ()+setFatalWarningGroup g = do+ mapM_ setFatalWarningFlag (warningGroupFlags g)+ when (warningGroupIncludesExtendedWarnings g) $ upd wopt_set_all_fatal_custom++unSetFatalWarningGroup :: WarningGroup -> DynP ()+unSetFatalWarningGroup g = do+ mapM_ unSetFatalWarningFlag (warningGroupFlags g)+ when (warningGroupIncludesExtendedWarnings g) $ upd wopt_unset_all_fatal_custom+++setWarningFlag, unSetWarningFlag :: WarningFlag -> DynP ()+setWarningFlag f = upd (\dfs -> wopt_set dfs f)+unSetWarningFlag f = upd (\dfs -> wopt_unset dfs f)++setFatalWarningFlag, unSetFatalWarningFlag :: WarningFlag -> DynP ()+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 }+++setCustomWarningFlag, unSetCustomWarningFlag :: WarningCategory -> DynP ()+setCustomWarningFlag f = upd (\dfs -> wopt_set_custom dfs f)+unSetCustomWarningFlag f = upd (\dfs -> wopt_unset_custom dfs f)++setCustomFatalWarningFlag, unSetCustomFatalWarningFlag :: WarningCategory -> DynP ()+setCustomFatalWarningFlag f = upd (\dfs -> wopt_set_fatal_custom dfs f)+unSetCustomFatalWarningFlag f = upd (\dfs -> wopt_unset_fatal_custom dfs f)++setCustomWErrorFlag :: WarningCategory -> DynP ()+setCustomWErrorFlag flag =+ do { setCustomWarningFlag flag+ ; setCustomFatalWarningFlag flag }+++--------------------------+setExtensionFlag, unSetExtensionFlag :: LangExt.Extension -> DynP ()+setExtensionFlag f = upd (setExtensionFlag' f)+unSetExtensionFlag f = upd (unSetExtensionFlag' f)++setExtensionFlag', unSetExtensionFlag' :: LangExt.Extension -> DynFlags -> DynFlags+setExtensionFlag' f dflags = foldr ($) (xopt_set dflags f) deps+ where+ deps = [ if turn_on then setExtensionFlag' d+ else unSetExtensionFlag' d+ | (f', turn_on, d) <- impliedXFlags, f' == f ]+ -- When you set f, set the ones it implies+ -- NB: use setExtensionFlag recursively, in case the implied flags+ -- implies further flags++unSetExtensionFlag' f dflags = xopt_unset dflags f+ -- When you un-set f, however, we don't un-set the things it implies+ -- (except for -fno-glasgow-exts, which is treated specially)++--------------------------++alterToolSettings :: (ToolSettings -> ToolSettings) -> DynFlags -> DynFlags+alterToolSettings f dynFlags = dynFlags { toolSettings = f (toolSettings dynFlags) }++--------------------------+setDumpFlag' :: DumpFlag -> DynP ()+setDumpFlag' dump_flag+ = do upd (\dfs -> dopt_set dfs dump_flag)+ when want_recomp forceRecompile+ where -- Certain dumpy-things are really interested in what's going+ -- on during recompilation checking, so in those cases we+ -- don't want to turn it off.+ want_recomp = dump_flag `notElem` [Opt_D_dump_if_trace,+ Opt_D_dump_hi_diffs,+ Opt_D_no_debug_output]++forceRecompile :: DynP ()+-- Whenever we -ddump, force recompilation (by switching off the+-- recompilation checker), else you don't see the dump! However,+-- don't switch it off in --make mode, else *everything* gets+-- recompiled which probably isn't what you want+forceRecompile = do dfs <- liftEwM getCmdLineState+ when (force_recomp dfs) (setGeneralFlag Opt_ForceRecomp)+ where+ force_recomp dfs = isOneShot (ghcMode dfs)+++setVerbosity :: Maybe Int -> DynP ()+setVerbosity mb_n = upd (\dfs -> dfs{ verbosity = mb_n `orElse` 3 })++setDebugLevel :: Maybe Int -> DynP ()+setDebugLevel mb_n =+ upd (\dfs -> exposeSyms $ dfs{ debugLevel = n })+ where+ n = mb_n `orElse` 2+ exposeSyms+ | n > 2 = setGeneralFlag' Opt_ExposeInternalSymbols+ | otherwise = id++addPkgDbRef :: PkgDbRef -> DynP ()+addPkgDbRef p = upd $ \s ->+ s { packageDBFlags = PackageDB p : packageDBFlags s }++removeUserPkgDb :: DynP ()+removeUserPkgDb = upd $ \s ->+ s { packageDBFlags = NoUserPackageDB : packageDBFlags s }++removeGlobalPkgDb :: DynP ()+removeGlobalPkgDb = upd $ \s ->+ s { packageDBFlags = NoGlobalPackageDB : packageDBFlags s }++clearPkgDb :: DynP ()+clearPkgDb = upd $ \s ->+ s { packageDBFlags = ClearPackageDBs : packageDBFlags s }++parsePackageFlag :: String -- the flag+ -> ReadP PackageArg -- type of argument+ -> String -- string to parse+ -> PackageFlag+parsePackageFlag flag arg_parse str+ = case filter ((=="").snd) (readP_to_S parse str) of+ [(r, "")] -> r+ _ -> throwGhcException $ CmdLineError ("Can't parse package flag: " ++ str)+ where doc = flag ++ " " ++ str+ parse = do+ pkg_arg <- tok arg_parse+ let mk_expose = ExposePackage doc pkg_arg+ ( do _ <- tok $ string "with"+ fmap (mk_expose . ModRenaming True) parseRns+ <++ fmap (mk_expose . ModRenaming False) parseRns+ <++ return (mk_expose (ModRenaming True [])))+ parseRns = do _ <- tok $ R.char '('+ rns <- tok $ sepBy parseItem (tok $ R.char ',')+ _ <- tok $ R.char ')'+ return rns+ parseItem = do+ orig <- tok $ parseModuleName+ (do _ <- tok $ string "as"+ new <- tok $ parseModuleName+ return (orig, new)+ ++++ return (orig, orig))+ tok m = m >>= \x -> skipSpaces >> return x++exposePackage, exposePackageId, hidePackage,+ exposePluginPackage, exposePluginPackageId,+ ignorePackage,+ trustPackage, distrustPackage :: String -> DynP ()+exposePackage p = upd (exposePackage' p)+exposePackageId p =+ upd (\s -> s{ packageFlags =+ parsePackageFlag "-package-id" parseUnitArg p : packageFlags s })+exposePluginPackage p =+ upd (\s -> s{ pluginPackageFlags =+ parsePackageFlag "-plugin-package" parsePackageArg p : pluginPackageFlags s })+exposePluginPackageId p =+ upd (\s -> s{ pluginPackageFlags =+ parsePackageFlag "-plugin-package-id" parseUnitArg p : pluginPackageFlags s })+hidePackage p =+ upd (\s -> s{ packageFlags = HidePackage p : packageFlags s })+ignorePackage p =+ upd (\s -> s{ ignorePackageFlags = IgnorePackage p : ignorePackageFlags s })++trustPackage p = exposePackage p >> -- both trust and distrust also expose a package+ upd (\s -> s{ trustFlags = TrustPackage p : trustFlags s })+distrustPackage p = exposePackage p >>+ upd (\s -> s{ trustFlags = DistrustPackage p : trustFlags s })++exposePackage' :: String -> DynFlags -> DynFlags+exposePackage' p dflags+ = dflags { packageFlags =+ parsePackageFlag "-package" parsePackageArg p : packageFlags dflags }++parsePackageArg :: ReadP PackageArg+parsePackageArg =+ fmap PackageArg (munch1 (\c -> isAlphaNum c || c `elem` ":-_."))++parseUnitArg :: ReadP PackageArg+parseUnitArg =+ fmap UnitIdArg parseUnit++setUnitId :: String -> DynFlags -> DynFlags+setUnitId p d = d { homeUnitId_ = stringToUnitId p }++setWorkingDirectory :: String -> DynFlags -> DynFlags+setWorkingDirectory p d = d { workingDirectory = Just p }++{-+Note [Filepaths and Multiple Home Units]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++It is common to assume that a package is compiled in the directory where its+cabal file resides. Thus, all paths used in the compiler are assumed to be relative+to this directory. When there are multiple home units the compiler is often+not operating in the standard directory and instead where the cabal.project+file is located. In this case the `-working-dir` option can be passed which specifies+the path from the current directory to the directory the unit assumes to be it's root,+normally the directory which contains the cabal file.++When the flag is passed, any relative paths used by the compiler are offset+by the working directory. Notably this includes `-i`, `-I⟨dir⟩`, `-hidir`, `-odir` etc and+the location of input files.++-}++augmentByWorkingDirectory :: DynFlags -> FilePath -> FilePath+augmentByWorkingDirectory dflags fp | isRelative fp, Just offset <- workingDirectory dflags = offset </> fp+augmentByWorkingDirectory _ fp = fp++setPackageName :: String -> DynFlags -> DynFlags+setPackageName p d = d { thisPackageName = Just p }++addHiddenModule :: String -> DynP ()+addHiddenModule p =+ upd (\s -> s{ hiddenModules = Set.insert (mkModuleName p) (hiddenModules s) })++addReexportedModule :: String -> DynP ()+addReexportedModule p =+ upd (\s -> s{ reexportedModules = Set.insert (mkModuleName p) (reexportedModules s) })+++-- If we're linking a binary, then only backends that produce object+-- code are allowed (requests for other target types are ignored).+setBackend :: Backend -> DynP ()+setBackend l = upd $ \ dfs ->+ if ghcLink dfs /= LinkBinary || backendWritesFiles l+ then dfs{ backend = l }+ else dfs++-- Changes the target only if we're compiling object code. This is+-- used by -fasm and -fllvm, which switch from one to the other, but+-- not from bytecode to object-code. The idea is that -fasm/-fllvm+-- can be safely used in an OPTIONS_GHC pragma.+setObjBackend :: Backend -> DynP ()+setObjBackend l = updM set+ where+ set dflags+ | backendWritesFiles (backend dflags)+ = return $ dflags { backend = l }+ | otherwise = return dflags++setOptLevel :: Int -> DynFlags -> DynP DynFlags+setOptLevel n dflags = return (updOptLevel n dflags)++setCallerCcFilters :: String -> DynP ()+setCallerCcFilters arg =+ case parseCallerCcFilter arg of+ Right filt -> upd $ \d -> d { callerCcFilters = filt : callerCcFilters d }+ Left err -> addErr err++setMainIs :: String -> DynP ()+setMainIs arg+ | x:_ <- main_fn, isLower x -- The arg looked like "Foo.Bar.baz"+ = upd $ \d -> d { mainFunIs = Just main_fn,+ mainModuleNameIs = mkModuleName main_mod }++ | x:_ <- arg, isUpper x -- The arg looked like "Foo" or "Foo.Bar"+ = upd $ \d -> d { mainModuleNameIs = mkModuleName arg }++ | otherwise -- The arg looked like "baz"+ = upd $ \d -> d { mainFunIs = Just arg }+ where+ (main_mod, main_fn) = splitLongestPrefix arg (== '.')++addLdInputs :: Option -> DynFlags -> DynFlags+addLdInputs p dflags = dflags{ldInputs = ldInputs dflags ++ [p]}++-- -----------------------------------------------------------------------------+-- Load dynflags from environment files.++setFlagsFromEnvFile :: FilePath -> String -> DynP ()+setFlagsFromEnvFile envfile content = do+ setGeneralFlag Opt_HideAllPackages+ parseEnvFile envfile content++parseEnvFile :: FilePath -> String -> DynP ()+parseEnvFile envfile = mapM_ parseEntry . lines+ where+ parseEntry str = case words str of+ ("package-db": _) -> addPkgDbRef (PkgDbPath (envdir </> db))+ -- relative package dbs are interpreted relative to the env file+ where envdir = takeDirectory envfile+ db = drop 11 str+ ["clear-package-db"] -> clearPkgDb+ ["hide-package", pkg] -> hidePackage pkg+ ["global-package-db"] -> addPkgDbRef GlobalPkgDb+ ["user-package-db"] -> addPkgDbRef UserPkgDb+ ["package-id", pkgid] -> exposePackageId pkgid+ (('-':'-':_):_) -> return () -- comments+ -- and the original syntax introduced in 7.10:+ [pkgid] -> exposePackageId pkgid+ [] -> return ()+ _ -> throwGhcException $ CmdLineError $+ "Can't parse environment file entry: "+ ++ envfile ++ ": " ++ str+++-----------------------------------------------------------------------------+-- Paths & Libraries++addImportPath, addLibraryPath, addIncludePath, addFrameworkPath :: FilePath -> DynP ()++-- -i on its own deletes the import paths+addImportPath "" = upd (\s -> s{importPaths = []})+addImportPath p = upd (\s -> s{importPaths = importPaths s ++ splitPathList p})++addLibraryPath p =+ upd (\s -> s{libraryPaths = libraryPaths s ++ splitPathList p})++addIncludePath p =+ upd (\s -> s{includePaths =+ addGlobalInclude (includePaths s) (splitPathList p)})++addFrameworkPath p =+ upd (\s -> s{frameworkPaths = frameworkPaths s ++ splitPathList p})++#if !defined(mingw32_HOST_OS)+split_marker :: Char+split_marker = ':' -- not configurable (ToDo)+#endif++splitPathList :: String -> [String]+splitPathList s = filter notNull (splitUp s)+ -- empty paths are ignored: there might be a trailing+ -- ':' in the initial list, for example. Empty paths can+ -- cause confusion when they are translated into -I options+ -- for passing to gcc.+ where+#if !defined(mingw32_HOST_OS)+ splitUp xs = split split_marker xs+#else+ -- Windows: 'hybrid' support for DOS-style paths in directory lists.+ --+ -- That is, if "foo:bar:baz" is used, this interpreted as+ -- consisting of three entries, 'foo', 'bar', 'baz'.+ -- However, with "c:/foo:c:\\foo;x:/bar", this is interpreted+ -- as 3 elts, "c:/foo", "c:\\foo", "x:/bar"+ --+ -- Notice that no attempt is made to fully replace the 'standard'+ -- split marker ':' with the Windows / DOS one, ';'. The reason being+ -- that this will cause too much breakage for users & ':' will+ -- work fine even with DOS paths, if you're not insisting on being silly.+ -- So, use either.+ splitUp [] = []+ splitUp (x:':':div:xs) | div `elem` dir_markers+ = ((x:':':div:p): splitUp rs)+ where+ (p,rs) = findNextPath xs+ -- we used to check for existence of the path here, but that+ -- required the IO monad to be threaded through the command-line+ -- parser which is quite inconvenient. The+ splitUp xs = cons p (splitUp rs)+ where+ (p,rs) = findNextPath xs++ cons "" xs = xs+ cons x xs = x:xs++ -- will be called either when we've consumed nought or the+ -- "<Drive>:/" part of a DOS path, so splitting is just a Q of+ -- finding the next split marker.+ findNextPath xs =+ case break (`elem` split_markers) xs of+ (p, _:ds) -> (p, ds)+ (p, xs) -> (p, xs)++ split_markers :: [Char]+ split_markers = [':', ';']++ dir_markers :: [Char]+ dir_markers = ['/', '\\']+#endif++-- -----------------------------------------------------------------------------+-- tmpDir, where we store temporary files.++setTmpDir :: FilePath -> DynFlags -> DynFlags+setTmpDir dir d = d { tmpDir = TempDir (normalise dir) }+ -- we used to fix /cygdrive/c/.. on Windows, but this doesn't+ -- seem necessary now --SDM 7/2/2008++-----------------------------------------------------------------------------+-- RTS opts++setRtsOpts :: String -> DynP ()+setRtsOpts arg = upd $ \ d -> d {rtsOpts = Just arg}++setRtsOptsEnabled :: RtsOptsEnabled -> DynP ()+setRtsOptsEnabled arg = upd $ \ d -> d {rtsOptsEnabled = arg}++-----------------------------------------------------------------------------+-- Hpc stuff++setOptHpcDir :: String -> DynP ()+setOptHpcDir arg = upd $ \ d -> d {hpcDir = arg}++-----------------------------------------------------------------------------+-- Via-C compilation stuff++-- There are some options that we need to pass to gcc when compiling+-- Haskell code via C, but are only supported by recent versions of+-- gcc. The configure script decides which of these options we need,+-- and puts them in the "settings" file in $topdir. The advantage of+-- having these in a separate file is that the file can be created at+-- install-time depending on the available gcc version, and even+-- re-generated later if gcc is upgraded.+--+-- The options below are not dependent on the version of gcc, only the+-- platform.++picCCOpts :: DynFlags -> [String]+picCCOpts dflags =+ case platformOS (targetPlatform dflags) of+ OSDarwin+ -- Apple prefers to do things the other way round.+ -- PIC is on by default.+ -- -mdynamic-no-pic:+ -- Turn off PIC code generation.+ -- -fno-common:+ -- Don't generate "common" symbols - these are unwanted+ -- in dynamic libraries.++ | gopt Opt_PIC dflags -> ["-fno-common", "-U__PIC__", "-D__PIC__"]+ | otherwise -> ["-mdynamic-no-pic"]+ OSMinGW32 -- no -fPIC for Windows+ | gopt Opt_PIC dflags -> ["-U__PIC__", "-D__PIC__"]+ | otherwise -> []+ _+ -- we need -fPIC for C files when we are compiling with -dynamic,+ -- otherwise things like stub.c files don't get compiled+ -- correctly. They need to reference data in the Haskell+ -- objects, but can't without -fPIC. See+ -- https://gitlab.haskell.org/ghc/ghc/wikis/commentary/position-independent-code+ | gopt Opt_PIC dflags || ways dflags `hasWay` WayDyn ->+ ["-fPIC", "-U__PIC__", "-D__PIC__"]+ -- gcc may be configured to have PIC on by default, let's be+ -- explicit here, see #15847+ | otherwise -> ["-fno-PIC"]++pieCCLDOpts :: DynFlags -> [String]+pieCCLDOpts dflags+ | gopt Opt_PICExecutable dflags = ["-pie"]+ -- See Note [No PIE when linking]+ | toolSettings_ccSupportsNoPie (toolSettings dflags) = ["-no-pie"]+ | otherwise = []+++{-+Note [No PIE when linking]+~~~~~~~~~~~~~~~~~~~~~~~~~~+As of 2016 some Linux distributions (e.g. Debian) have started enabling -pie by+default in their gcc builds. This is incompatible with -r as it implies that we+are producing an executable. Consequently, we must manually pass -no-pie to gcc+when joining object files or linking dynamic libraries. Unless, of course, the+user has explicitly requested a PIE executable with -pie. See #12759.+-}++picPOpts :: DynFlags -> [String]+picPOpts dflags+ | gopt Opt_PIC dflags = ["-U__PIC__", "-D__PIC__"]+ | otherwise = []++-- -----------------------------------------------------------------------------+-- Compiler Info++compilerInfo :: DynFlags -> [(String, String)]+compilerInfo dflags+ = -- We always make "Project name" be first to keep parsing in+ -- other languages simple, i.e. when looking for other fields,+ -- you don't have to worry whether there is a leading '[' or not+ ("Project name", cProjectName)+ -- 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 $ expandDirectories (topDir dflags) (toolDir dflags))+ (rawSettings dflags)+ ++ [("Project version", projectVersion dflags),+ ("Project Git commit id", cProjectGitCommitId),+ ("Project Version Int", cProjectVersionInt),+ ("Project Patch Level", cProjectPatchLevel),+ ("Project Patch Level1", cProjectPatchLevel1),+ ("Project Patch Level2", cProjectPatchLevel2),+ ("Project Unit Id", cProjectUnitId),+ ("Booter version", cBooterVersion),+ ("Stage", cStage),+ ("Build platform", cBuildPlatformString),+ ("Host platform", cHostPlatformString),+ ("Target platform", platformMisc_targetPlatformString $ platformMisc dflags),+ ("Have interpreter", showBool $ platformMisc_ghcWithInterpreter $ platformMisc dflags),+ ("Object splitting supported", showBool False),+ ("Have native code generator", showBool $ platformNcgSupported platform),+ ("target has RTS linker", showBool $ platformHasRTSLinker platform),+ ("Target default backend", show $ platformDefaultBackend platform),+ -- Whether or not we support @-dynamic-too@+ ("Support dynamic-too", showBool $ not isWindows),+ -- Whether or not we support the @-j@ flag with @--make@.+ ("Support parallel --make", "YES"),+ -- Whether or not we support "Foo from foo-0.1-XXX:Foo" syntax in+ -- installed package info.+ ("Support reexported-modules", "YES"),+ -- Whether or not we support extended @-package foo (Foo)@ syntax.+ ("Support thinning and renaming package flags", "YES"),+ -- Whether or not we support Backpack.+ ("Support Backpack", "YES"),+ -- If true, we require that the 'id' field in installed package info+ -- match what is passed to the @-this-unit-id@ flag for modules+ -- built in it+ ("Requires unified installed package IDs", "YES"),+ -- Whether or not we support the @-this-package-key@ flag. Prefer+ -- "Uses unit IDs" over it. We still say yes even if @-this-package-key@+ -- flag has been removed, otherwise it breaks Cabal...+ ("Uses package keys", "YES"),+ -- Whether or not we support the @-this-unit-id@ flag+ ("Uses unit IDs", "YES"),+ -- Whether or not GHC was compiled using -dynamic+ ("GHC Dynamic", showBool hostIsDynamic),+ -- Whether or not GHC was compiled using -prof+ ("GHC Profiled", showBool hostIsProfiled),+ ("Debug on", showBool debugIsOn),+ ("LibDir", topDir dflags),+ -- The path of the global package database used by GHC+ ("Global Package DB", globalPackageDatabasePath dflags)+ ]+ where+ showBool True = "YES"+ showBool False = "NO"+ platform = targetPlatform dflags+ isWindows = platformOS platform == OSMinGW32+ useInplaceMinGW = toolSettings_useInplaceMinGW $ toolSettings dflags+ expandDirectories :: FilePath -> Maybe FilePath -> String -> String+ expandDirectories topd mtoold = expandToolDir useInplaceMinGW mtoold . expandTopDir topd++{- -----------------------------------------------------------------------------+Note [DynFlags consistency]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~++There are a number of number of DynFlags configurations which either+do not make sense or lead to unimplemented or buggy codepaths in the+compiler. makeDynFlagsConsistent is responsible for verifying the validity+of a set of DynFlags, fixing any issues, and reporting them back to the+caller.++GHCi and -O+---------------++When using optimization, the compiler can introduce several things+(such as unboxed tuples) into the intermediate code, which GHCi later+chokes on since the bytecode interpreter can't handle this (and while+this is arguably a bug these aren't handled, there are no plans to fix+it.)++While the driver pipeline always checks for this particular erroneous+combination when parsing flags, we also need to check when we update+the flags; this is because API clients may parse flags but update the+DynFlags afterwords, before finally running code inside a session (see+T10052 and #10052).+-}++-- | Resolve any internal inconsistencies in a set of 'DynFlags'.+-- Returns the consistent 'DynFlags' as well as a list of warnings+-- to report to the user.+makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Warn])+-- Whenever makeDynFlagsConsistent does anything, it starts over, to+-- ensure that a later change doesn't invalidate an earlier check.+-- Be careful not to introduce potential loops!+makeDynFlagsConsistent dflags+ -- Disable -dynamic-too on Windows (#8228, #7134, #5987)+ | os == OSMinGW32 && gopt Opt_BuildDynamicToo dflags+ = let dflags' = gopt_unset dflags Opt_BuildDynamicToo+ warn = "-dynamic-too is not supported on Windows"+ in loop dflags' warn+ -- Disable -dynamic-too if we are are compiling with -dynamic already, otherwise+ -- you get two dynamic object files (.o and .dyn_o). (#20436)+ | ways dflags `hasWay` WayDyn && gopt Opt_BuildDynamicToo dflags+ = let dflags' = gopt_unset dflags Opt_BuildDynamicToo+ warn = "-dynamic-too is ignored when using -dynamic"+ in loop dflags' warn++ | gopt Opt_SplitSections dflags+ , platformHasSubsectionsViaSymbols (targetPlatform dflags)+ = let dflags' = gopt_unset dflags Opt_SplitSections+ warn = "-fsplit-sections is not useful on this platform " +++ "since it uses subsections-via-symbols. Ignoring."+ in loop dflags' warn++ -- Via-C backend only supports unregisterised ABI. Switch to a backend+ -- supporting it if possible.+ | backendUnregisterisedAbiOnly (backend dflags) &&+ not (platformUnregisterised (targetPlatform dflags))+ = let b = platformDefaultBackend (targetPlatform dflags)+ in if backendSwappableWithViaC b then+ let dflags' = dflags { backend = b }+ warn = "Target platform doesn't use unregisterised ABI, so using " +++ backendDescription b ++ " rather than " +++ backendDescription (backend dflags)+ in loop dflags' warn+ else+ pgmError (backendDescription (backend dflags) +++ " supports only unregisterised ABI but target platform doesn't use it.")++ | gopt Opt_Hpc dflags && not (backendSupportsHpc (backend dflags))+ = let dflags' = gopt_unset dflags Opt_Hpc+ warn = "Hpc can't be used with " ++ backendDescription (backend dflags) +++ ". Ignoring -fhpc."+ in loop dflags' warn++ | backendSwappableWithViaC (backend dflags) &&+ platformUnregisterised (targetPlatform dflags)+ = loop (dflags { backend = viaCBackend })+ "Target platform uses unregisterised ABI, so compiling via C"++ | backendNeedsPlatformNcgSupport (backend dflags) &&+ not (platformNcgSupported $ targetPlatform dflags)+ = let dflags' = dflags { backend = llvmBackend }+ warn = "Native code generator doesn't support target platform, so using LLVM"+ in loop dflags' warn++ | not (osElfTarget os) && gopt Opt_PIE dflags+ = loop (gopt_unset dflags Opt_PIE)+ "Position-independent only supported on ELF platforms"+ | os == OSDarwin &&+ arch == ArchX86_64 &&+ not (gopt Opt_PIC dflags)+ = loop (gopt_set dflags Opt_PIC)+ "Enabling -fPIC as it is always on for this platform"++ | backendForcesOptimization0 (backend dflags)+ , gopt Opt_UnoptimizedCoreForInterpreter dflags+ , let (dflags', changed) = updOptLevelChanged 0 dflags+ , changed+ = loop dflags' $+ "Ignoring optimization flags since they are experimental for the " +++ backendDescription (backend dflags) +++ ". Pass -fno-unoptimized-core-for-interpreter to enable this feature."++ | LinkInMemory <- ghcLink dflags+ , not (gopt Opt_ExternalInterpreter dflags)+ , hostIsProfiled+ , backendWritesFiles (backend dflags)+ , ways dflags `hasNotWay` WayProf+ = loop dflags{targetWays_ = addWay WayProf (targetWays_ dflags)}+ "Enabling -prof, because -fobject-code is enabled and GHCi is profiled"++ | LinkMergedObj <- ghcLink dflags+ , Nothing <- outputFile dflags+ = pgmError "--output must be specified when using --merge-objs"++ | otherwise = (dflags, mempty)+ where loc = mkGeneralSrcSpan (fsLit "when making flags consistent")+ loop updated_dflags warning+ = case makeDynFlagsConsistent updated_dflags of+ (dflags', ws) -> (dflags', L loc (DriverInconsistentDynFlags warning) : ws)+ platform = targetPlatform dflags+ arch = platformArch platform+ os = platformOS platform+++setUnsafeGlobalDynFlags :: DynFlags -> IO ()+setUnsafeGlobalDynFlags dflags = do+ writeIORef v_unsafeHasPprDebug (hasPprDebug dflags)+ writeIORef v_unsafeHasNoDebugOutput (hasNoDebugOutput dflags)+ writeIORef v_unsafeHasNoStateHack (hasNoStateHack dflags)+++-- -----------------------------------------------------------------------------+-- SSE, AVX, FMA++isSse4_2Enabled :: DynFlags -> Bool+isSse4_2Enabled dflags = sseVersion dflags >= Just SSE42++isAvxEnabled :: DynFlags -> Bool+isAvxEnabled dflags = avx dflags || avx2 dflags || avx512f dflags++isAvx2Enabled :: DynFlags -> Bool+isAvx2Enabled dflags = avx2 dflags || avx512f dflags++isAvx512cdEnabled :: DynFlags -> Bool+isAvx512cdEnabled dflags = avx512cd dflags++isAvx512erEnabled :: DynFlags -> Bool+isAvx512erEnabled dflags = avx512er dflags++isAvx512fEnabled :: DynFlags -> Bool+isAvx512fEnabled dflags = avx512f dflags++isAvx512pfEnabled :: DynFlags -> Bool+isAvx512pfEnabled dflags = avx512pf dflags++isFmaEnabled :: DynFlags -> Bool+isFmaEnabled dflags = fma dflags++-- -----------------------------------------------------------------------------+-- BMI2++isBmiEnabled :: DynFlags -> Bool+isBmiEnabled dflags = case platformArch (targetPlatform dflags) of+ ArchX86_64 -> bmiVersion dflags >= Just BMI1+ ArchX86 -> bmiVersion dflags >= Just BMI1+ _ -> False++isBmi2Enabled :: DynFlags -> Bool+isBmi2Enabled dflags = case platformArch (targetPlatform dflags) of+ ArchX86_64 -> bmiVersion dflags >= Just BMI2+ ArchX86 -> bmiVersion dflags >= Just BMI2+ _ -> False++-- -----------------------------------------------------------------------------++-- | Indicate if cost-centre profiling is enabled+sccProfilingEnabled :: DynFlags -> Bool+sccProfilingEnabled dflags = profileIsProfiling (targetProfile dflags)++-- | Indicate whether we need to generate source notes+needSourceNotes :: DynFlags -> Bool+needSourceNotes dflags = debugLevel dflags > 0+ || gopt Opt_InfoTableMap dflags++-- -----------------------------------------------------------------------------+-- Linker/compiler information++-- | Should we use `-XLinker -rpath` when linking or not?+-- See Note [-fno-use-rpaths]+useXLinkerRPath :: DynFlags -> OS -> Bool+useXLinkerRPath _ OSDarwin = False -- See Note [Dynamic linking on macOS]+useXLinkerRPath dflags _ = gopt Opt_RPath dflags++{-+Note [-fno-use-rpaths]+~~~~~~~~~~~~~~~~~~~~~~++First read, Note [Dynamic linking on macOS] to understand why on darwin we never+use `-XLinker -rpath`.++The specification of `Opt_RPath` is as follows:++The default case `-fuse-rpaths`:+* On darwin, never use `-Xlinker -rpath -Xlinker`, always inject the rpath+ afterwards, see `runInjectRPaths`. There is no way to use `-Xlinker` on darwin+ as things stand but it wasn't documented in the user guide before this patch how+ `-fuse-rpaths` should behave and the fact it was always disabled on darwin.+* Otherwise, use `-Xlinker -rpath -Xlinker` to set the rpath of the executable,+ this is the normal way you should set the rpath.++The case of `-fno-use-rpaths`+* Never inject anything into the rpath.++When this was first implemented, `Opt_RPath` was disabled on darwin, but+the rpath was still always augmented by `runInjectRPaths`, and there was no way to+stop this. This was problematic because you couldn't build an executable in CI+with a clean rpath.++-}++-- -----------------------------------------------------------------------------+-- RTS hooks++-- Convert sizes like "3.5M" into integers+decodeSize :: String -> Integer+decodeSize str+ | c == "" = truncate n+ | c == "K" || c == "k" = truncate (n * 1000)+ | c == "M" || c == "m" = truncate (n * 1000 * 1000)+ | c == "G" || c == "g" = truncate (n * 1000 * 1000 * 1000)+ | otherwise = throwGhcException (CmdLineError ("can't decode size: " ++ str))+ where (m, c) = span pred str+ n = readRational m+ pred c = isDigit c || c == '.'++foreign import ccall unsafe "setHeapSize" setHeapSize :: Int -> IO ()+foreign import ccall unsafe "enableTimingStats" enableTimingStats :: IO ()++outputFile :: DynFlags -> Maybe String+outputFile dflags+ | dynamicNow dflags = dynOutputFile_ dflags+ | otherwise = outputFile_ dflags++objectSuf :: DynFlags -> String+objectSuf dflags+ | dynamicNow dflags = dynObjectSuf_ dflags+ | otherwise = objectSuf_ dflags -- | Pretty-print the difference between 2 DynFlags. --
GHC/Hs.hs view
@@ -101,7 +101,8 @@ data AnnsModule = AnnsModule { am_main :: [AddEpAnn],- am_decls :: AnnList+ am_decls :: [TrailingAnn],+ am_eof :: Maybe (RealSrcSpan, RealSrcSpan) -- End of file and end of prior token } deriving (Data, Eq) instance Outputable (HsModule GhcPs) where
GHC/Hs/Binds.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-}@@ -120,7 +121,11 @@ , ( [CoreTickish] -- Ticks to put on the rhs, if any , [[CoreTickish]] ) ) -- and ticks to put on the bound variables. -type instance XVarBind (GhcPass pL) (GhcPass pR) = NoExtField+type instance XVarBind (GhcPass pL) (GhcPass pR) = XVarBindGhc pL pR+type family XVarBindGhc pL pR where+ XVarBindGhc 'Typechecked 'Typechecked = NoExtField+ XVarBindGhc _ _ = DataConCantHappen+ type instance XPatSynBind (GhcPass pL) (GhcPass pR) = NoExtField type instance XXHsBindsLR GhcPs pR = DataConCantHappen@@ -680,7 +685,7 @@ type instance XMinimalSig (GhcPass p) = (EpAnn [AddEpAnn], SourceText) type instance XSCCFunSig (GhcPass p) = (EpAnn [AddEpAnn], SourceText) type instance XCompleteMatchSig (GhcPass p) = (EpAnn [AddEpAnn], SourceText)- -- SourceText: Note [Pragma source text] in GHC.Types.SourceText+ -- SourceText: Note [Pragma source text] in "GHC.Types.SourceText" type instance XXSig GhcPs = DataConCantHappen type instance XXSig GhcRn = IdSig type instance XXSig GhcTc = IdSig@@ -756,7 +761,7 @@ = ppr_pfx <+> pprInline inl <+> pprPrefixOcc (unLoc var) <+> text "#-}" where ppr_pfx = case inlinePragmaSource inl of- SourceText src -> text src+ SourceText src -> ftext src NoSourceText -> text "{-#" <+> inlinePragmaName (inl_inline inl) ppr_sig (SpecInstSig (_, src) ty) = pragSrcBrackets src "{-# pragma" (text "instance" <+> ppr ty)@@ -828,7 +833,7 @@ -- | Using SourceText in case the pragma was spelled differently or used mixed -- case pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc-pragSrcBrackets (SourceText src) _ doc = text src <+> doc <+> text "#-}"+pragSrcBrackets (SourceText src) _ doc = ftext src <+> doc <+> text "#-}" pragSrcBrackets NoSourceText alt doc = text alt <+> doc <+> text "#-}" pprVarSig :: (OutputableBndr id) => [id] -> SDoc -> SDoc
GHC/Hs/Decls.hs view
@@ -124,8 +124,8 @@ import GHC.Types.SrcLoc import GHC.Types.SourceText import GHC.Core.Type-import GHC.Core.TyCon (TyConFlavour(NewtypeFlavour,DataTypeFlavour)) import GHC.Types.ForeignCall+import GHC.Unit.Module.Warnings (WarningTxt(..)) import GHC.Data.Bag import GHC.Data.Maybe@@ -703,7 +703,7 @@ | isTypeDataDefnCons condecls = text "type" | otherwise = empty pp_ct = case mb_ct of- Nothing -> empty+ Nothing -> empty Just ct -> ppr ct pp_sig = case mb_sig of Nothing -> empty@@ -911,9 +911,10 @@ Just (L _ (Overlapping s)) -> maybe_stext s "{-# OVERLAPPING #-}" Just (L _ (Overlaps s)) -> maybe_stext s "{-# OVERLAPS #-}" Just (L _ (Incoherent s)) -> maybe_stext s "{-# INCOHERENT #-}"+ Just (L _ (NonCanonical s)) -> maybe_stext s "{-# INCOHERENT #-}" -- No surface syntax for NONCANONICAL yet where maybe_stext NoSourceText alt = text alt- maybe_stext (SourceText src) _ = text src <+> text "#-}"+ maybe_stext (SourceText src) _ = ftext src <+> text "#-}" instance (OutputableBndrId p) => Outputable (InstDecl (GhcPass p)) where@@ -934,7 +935,7 @@ do_one (L _ (TyFamInstD {})) = [] -- | Convert a 'NewOrData' to a 'TyConFlavour'-newOrDataToFlavour :: NewOrData -> TyConFlavour+newOrDataToFlavour :: NewOrData -> TyConFlavour tc newOrDataToFlavour NewType = NewtypeFlavour newOrDataToFlavour DataType = DataTypeFlavour @@ -1219,7 +1220,7 @@ instance OutputableBndrId p => Outputable (WarnDecls (GhcPass p)) where ppr (Warnings ext decls)- = text src <+> vcat (punctuate comma (map ppr decls)) <+> text "#-}"+ = ftext src <+> vcat (punctuate semi (map ppr decls)) <+> text "#-}" where src = case ghcPass @p of GhcPs | (_, SourceText src) <- ext -> src GhcRn | SourceText src <- ext -> src@@ -1229,8 +1230,13 @@ instance OutputableBndrId p => Outputable (WarnDecl (GhcPass p)) where ppr (Warning _ thing txt)- = hsep ( punctuate comma (map ppr thing))+ = ppr_category+ <+> hsep (punctuate comma (map ppr thing)) <+> ppr txt+ where+ ppr_category = case txt of+ WarningTxt (Just cat) _ _ -> ppr cat+ _ -> empty {- ************************************************************************
GHC/Hs/Doc.hs view
@@ -123,7 +123,7 @@ data DocStructureItem = DsiSectionHeading !Int !(HsDoc GhcRn) | DsiDocChunk !(HsDoc GhcRn)- | DsiNamedChunkRef !(String)+ | DsiNamedChunkRef !String | DsiExports !Avails | DsiModExport !(NonEmpty ModuleName) -- ^ We might re-export avails from multiple@@ -224,8 +224,8 @@ instance Binary Docs where put_ bh docs = do put_ bh (docs_mod_hdr docs)- put_ bh (sortBy (\a b -> (fst a) `stableNameCmp` fst b) $ nonDetEltsUniqMap $ docs_decls docs)- put_ bh (sortBy (\a b -> (fst a) `stableNameCmp` fst b) $ nonDetEltsUniqMap $ docs_args docs)+ put_ bh (sortBy (\a b -> (fst a) `stableNameCmp` fst b) $ nonDetUniqMapToList $ docs_decls docs)+ put_ bh (sortBy (\a b -> (fst a) `stableNameCmp` fst b) $ nonDetUniqMapToList $ docs_args docs) put_ bh (docs_structure docs) put_ bh (Map.toList $ docs_named_chunks docs) put_ bh (docs_haddock_opts docs)
GHC/Hs/Dump.hs view
@@ -139,8 +139,8 @@ sourceText :: SourceText -> SDoc sourceText NoSourceText = parens $ text "NoSourceText" sourceText (SourceText src) = case bs of- NoBlankSrcSpan -> parens $ text "SourceText" <+> text src- BlankSrcSpanFile -> parens $ text "SourceText" <+> text src+ NoBlankSrcSpan -> parens $ text "SourceText" <+> ftext src+ BlankSrcSpanFile -> parens $ text "SourceText" <+> ftext src _ -> parens $ text "SourceText" <+> text "blanked" epaAnchor :: EpaLocation -> SDoc
GHC/Hs/Expr.hs view
@@ -44,6 +44,7 @@ -- others: import GHC.Tc.Types.Evidence+import GHC.Types.Id.Info ( RecSelParent ) import GHC.Types.Name import GHC.Types.Name.Reader import GHC.Types.Name.Set@@ -52,7 +53,8 @@ import GHC.Types.SourceText import GHC.Types.SrcLoc import GHC.Types.Tickish (CoreTickish)-import GHC.Core.ConLike+import GHC.Types.Unique.Set (UniqSet)+import GHC.Core.ConLike ( conLikeName, ConLike ) import GHC.Unit.Module (ModuleName) import GHC.Utils.Misc import GHC.Utils.Outputable@@ -62,7 +64,7 @@ import GHC.Core.Type import GHC.Builtin.Types (mkTupleStr) import GHC.Tc.Utils.TcType (TcType, TcTyVar)-import {-# SOURCE #-} GHC.Tc.Types (TcLclEnv)+import {-# SOURCE #-} GHC.Tc.Types.LclEnv (TcLclEnv) import GHCi.RemoteTypes ( ForeignRef ) import qualified Language.Haskell.TH as TH (Q)@@ -74,6 +76,7 @@ import Data.Maybe (isJust) import Data.Foldable ( toList ) import Data.List (uncons)+import Data.List.NonEmpty (NonEmpty) import Data.Bifunctor (first) {- *********************************************************************@@ -128,7 +131,7 @@ -- | 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 noComments (HsString (SourceText "noExpr") (fsLit "noExpr"))+noExpr = HsLit noComments (HsString (SourceText $ fsLit "noExpr") (fsLit "noExpr")) noSyntaxExpr :: forall p. IsPass p => SyntaxExpr (GhcPass p) -- Before renaming, and sometimes after@@ -283,8 +286,8 @@ type instance XExplicitSum GhcTc = [Type] type instance XCase GhcPs = EpAnn EpAnnHsCase-type instance XCase GhcRn = NoExtField-type instance XCase GhcTc = NoExtField+type instance XCase GhcRn = HsMatchContext GhcTc+type instance XCase GhcTc = HsMatchContext GhcTc type instance XIf GhcPs = EpAnn AnnsIf type instance XIf GhcRn = NoExtField@@ -324,6 +327,31 @@ -- See [Handling overloaded and rebindable constructs], -- and [Record Updates] in GHC.Tc.Gen.Expr. +-- | Information about the parent of a record update:+--+-- - the parent type constructor or pattern synonym,+-- - the relevant con-likes,+-- - the field labels.+data family HsRecUpdParent x++data instance HsRecUpdParent GhcPs+data instance HsRecUpdParent GhcRn+ = RnRecUpdParent+ { rnRecUpdLabels :: NonEmpty FieldGlobalRdrElt+ , rnRecUpdCons :: UniqSet ConLikeName }+data instance HsRecUpdParent GhcTc+ = TcRecUpdParent+ { tcRecUpdParent :: RecSelParent+ , tcRecUpdLabels :: NonEmpty FieldGlobalRdrElt+ , tcRecUpdCons :: UniqSet ConLike }++type instance XLHsRecUpdLabels GhcPs = NoExtField+type instance XLHsRecUpdLabels GhcRn = NonEmpty (HsRecUpdParent GhcRn)+ -- Possible parents for the record update.+type instance XLHsRecUpdLabels GhcTc = DataConCantHappen++type instance XLHsOLRecUpdLabels p = NoExtField+ type instance XGetField GhcPs = EpAnnCO type instance XGetField GhcRn = NoExtField type instance XGetField GhcTc = DataConCantHappen@@ -491,7 +519,7 @@ ppr_expr (HsIPVar _ v) = ppr v ppr_expr (HsOverLabel _ s l) = char '#' <> case s of NoSourceText -> ppr l- SourceText src -> text src+ SourceText src -> ftext src ppr_expr (HsLit _ lit) = ppr lit ppr_expr (HsOverLit _ lit) = ppr lit ppr_expr (HsPar _ _ e _) = parens (ppr_lexpr e)@@ -625,8 +653,10 @@ ppr_expr (RecordUpd { rupd_expr = L _ aexp, rupd_flds = flds }) = case flds of- Left rbinds -> hang (ppr aexp) 2 (braces (fsep (punctuate comma (map ppr rbinds))))- Right pbinds -> hang (ppr aexp) 2 (braces (fsep (punctuate comma (map ppr pbinds))))+ RegularRecUpdFields { recUpdFields= rbinds } ->+ hang (ppr aexp) 2 (braces (fsep (punctuate comma (map ppr rbinds))))+ OverloadedRecUpdFields { olRecUpdFields = pbinds } ->+ hang (ppr aexp) 2 (braces (fsep (punctuate comma (map ppr pbinds)))) ppr_expr (HsGetField { gf_expr = L _ fexp, gf_field = field }) = ppr fexp <> dot <> ppr field@@ -863,12 +893,14 @@ | GhcTc <- ghcPass @p = go_x_tc x | GhcRn <- ghcPass @p = go_x_rn x where+ go_x_tc :: XXExprGhcTc -> Bool go_x_tc (WrapExpr (HsWrap _ e)) = isAtomicHsExpr e go_x_tc (ExpansionExpr (HsExpanded a _)) = isAtomicHsExpr a go_x_tc (ConLikeTc {}) = True go_x_tc (HsTick {}) = False go_x_tc (HsBinTick {}) = False + go_x_rn :: HsExpansion (HsExpr GhcRn) (HsExpr GhcRn) -> Bool go_x_rn (HsExpanded a _) = isAtomicHsExpr a isAtomicHsExpr _ = False@@ -1941,7 +1973,7 @@ matchContextErrString (ArrowMatchCtxt c) = matchArrowContextErrString c 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 PatSyn = text "pattern synonym" matchContextErrString (StmtCtxt (ParStmtCtxt c)) = matchContextErrString (StmtCtxt c) matchContextErrString (StmtCtxt (TransStmtCtxt c)) = matchContextErrString (StmtCtxt c) matchContextErrString (StmtCtxt (PatGuard _)) = text "pattern guard"@@ -1998,11 +2030,10 @@ matchSeparator PatBindRhs = text "=" matchSeparator PatBindGuards = text "=" matchSeparator StmtCtxt{} = text "<-"-matchSeparator RecUpd = text "=" -- This can be printed by the pattern- -- match checker trace+matchSeparator RecUpd = text "=" -- This can be printed by the pattern+matchSeparator PatSyn = text "<-" -- match checker trace matchSeparator ThPatSplice = panic "unused" matchSeparator ThPatQuote = panic "unused"-matchSeparator PatSyn = panic "unused" pprMatchContext :: (Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) => HsMatchContext p -> SDoc@@ -2023,7 +2054,7 @@ pprMatchContextNoun (LamCaseAlt lc_variant) = lamCaseKeyword lc_variant <+> text "alternative" pprMatchContextNoun IfAlt = text "multi-way if alternative"-pprMatchContextNoun RecUpd = text "record-update construct"+pprMatchContextNoun RecUpd = text "record update" pprMatchContextNoun ThPatSplice = text "Template Haskell pattern splice" pprMatchContextNoun ThPatQuote = text "Template Haskell pattern quotation" pprMatchContextNoun PatBindRhs = text "pattern binding"
GHC/Hs/ImpExp.hs view
@@ -21,25 +21,28 @@ , module GHC.Hs.ImpExp ) where +import Language.Haskell.Syntax.Extension+import Language.Haskell.Syntax.Module.Name+import Language.Haskell.Syntax.ImpExp+ import GHC.Prelude import GHC.Types.SourceText ( SourceText(..) )-import GHC.Types.FieldLabel ( FieldLabel )--import GHC.Utils.Outputable-import GHC.Utils.Panic import GHC.Types.SrcLoc-import GHC.Parser.Annotation-import GHC.Hs.Extension import GHC.Types.Name import GHC.Types.PkgQual +import GHC.Parser.Annotation+import GHC.Hs.Extension++import GHC.Utils.Outputable+import GHC.Utils.Panic++import GHC.Unit.Module.Warnings (WarningTxt)+ import Data.Data import Data.Maybe -import Language.Haskell.Syntax.Extension-import Language.Haskell.Syntax.Module.Name-import Language.Haskell.Syntax.ImpExp {- ************************************************************************@@ -77,7 +80,7 @@ type instance XCImportDecl GhcPs = XImportDeclPass type instance XCImportDecl GhcRn = XImportDeclPass type instance XCImportDecl GhcTc = DataConCantHappen- -- Note [Pragma source text] in GHC.Types.SourceText+ -- Note [Pragma source text] in "GHC.Types.SourceText" data XImportDeclPass = XImportDeclPass { ideclAnn :: EpAnn EpAnnImportDecl@@ -170,7 +173,7 @@ GhcTc -> dataConCantHappen ext in case mSrcText of NoSourceText -> text "{-# SOURCE #-}"- SourceText src -> text src <+> text "#-}"+ SourceText src -> ftext src <+> text "#-}" ppr_imp _ NotBoot = empty pp_spec Nothing = empty@@ -197,20 +200,39 @@ type instance Anno (IE (GhcPass p)) = SrcSpanAnnA -type instance XIEVar GhcPs = NoExtField-type instance XIEVar GhcRn = NoExtField-type instance XIEVar GhcTc = NoExtField+-- The additional field of type 'Maybe (WarningTxt pass)' holds information+-- about export deprecation annotations and is thus set to Nothing when `IE`+-- is used in an import list (since export deprecation can only be used in exports)+type instance XIEVar GhcPs = Maybe (LocatedP (WarningTxt GhcPs))+type instance XIEVar GhcRn = Maybe (LocatedP (WarningTxt GhcRn))+type instance XIEVar GhcTc = NoExtField -type instance XIEThingAbs (GhcPass _) = EpAnn [AddEpAnn]-type instance XIEThingAll (GhcPass _) = EpAnn [AddEpAnn]+-- The additional field of type 'Maybe (WarningTxt pass)' holds information+-- about export deprecation annotations and is thus set to Nothing when `IE`+-- is used in an import list (since export deprecation can only be used in exports)+type instance XIEThingAbs GhcPs = (Maybe (LocatedP (WarningTxt GhcPs)), EpAnn [AddEpAnn])+type instance XIEThingAbs GhcRn = (Maybe (LocatedP (WarningTxt GhcRn)), EpAnn [AddEpAnn])+type instance XIEThingAbs GhcTc = EpAnn [AddEpAnn] --- See Note [IEThingWith]-type instance XIEThingWith (GhcPass 'Parsed) = EpAnn [AddEpAnn]-type instance XIEThingWith (GhcPass 'Renamed) = [Located FieldLabel]-type instance XIEThingWith (GhcPass 'Typechecked) = NoExtField+-- The additional field of type 'Maybe (WarningTxt pass)' holds information+-- about export deprecation annotations and is thus set to Nothing when `IE`+-- is used in an import list (since export deprecation can only be used in exports)+type instance XIEThingAll GhcPs = (Maybe (LocatedP (WarningTxt GhcPs)), EpAnn [AddEpAnn])+type instance XIEThingAll GhcRn = (Maybe (LocatedP (WarningTxt GhcRn)), EpAnn [AddEpAnn])+type instance XIEThingAll GhcTc = EpAnn [AddEpAnn] -type instance XIEModuleContents GhcPs = EpAnn [AddEpAnn]-type instance XIEModuleContents GhcRn = NoExtField+-- The additional field of type 'Maybe (WarningTxt pass)' holds information+-- about export deprecation annotations and is thus set to Nothing when `IE`+-- is used in an import list (since export deprecation can only be used in exports)+type instance XIEThingWith GhcPs = (Maybe (LocatedP (WarningTxt GhcPs)), EpAnn [AddEpAnn])+type instance XIEThingWith GhcRn = (Maybe (LocatedP (WarningTxt GhcRn)), EpAnn [AddEpAnn])+type instance XIEThingWith GhcTc = EpAnn [AddEpAnn]++-- The additional field of type 'Maybe (WarningTxt pass)' holds information+-- about export deprecation annotations and is thus set to Nothing when `IE`+-- is used in an import list (since export deprecation can only be used in exports)+type instance XIEModuleContents GhcPs = (Maybe (LocatedP (WarningTxt GhcPs)), EpAnn [AddEpAnn])+type instance XIEModuleContents GhcRn = Maybe (LocatedP (WarningTxt GhcRn)) type instance XIEModuleContents GhcTc = NoExtField type instance XIEGroup (GhcPass _) = NoExtField@@ -220,32 +242,6 @@ type instance Anno (LocatedA (IE (GhcPass p))) = SrcSpanAnnA -{--Note [IEThingWith]-~~~~~~~~~~~~~~~~~~-A definition like-- {-# LANGUAGE DuplicateRecordFields #-}- module M ( T(MkT, x) ) where- data T = MkT { x :: Int }--gives rise to this in the output of the parser:-- IEThingWith NoExtField T [MkT, x] NoIEWildcard--But in the renamer we need to attach the correct field label,-because the selector Name is mangled (see Note [FieldLabel] in-GHC.Types.FieldLabel). Hence we change this to:-- IEThingWith [FieldLabel "x" True $sel:x:MkT)] T [MkT] NoIEWildcard--using the TTG extension field to store the list of fields in renamed syntax-only. (Record fields always appear in this list, regardless of whether-DuplicateRecordFields was in use at the definition site or not.)--See Note [Representing fields in AvailInfo] in GHC.Types.Avail for more details.--}- ieName :: IE (GhcPass p) -> IdP (GhcPass p) ieName (IEVar _ (L _ n)) = ieWrappedName n ieName (IEThingAbs _ (L _ n)) = ieWrappedName n@@ -265,6 +261,22 @@ ieNames (IEDoc {}) = [] ieNames (IEDocNamed {}) = [] +ieDeprecation :: forall p. IsPass p => IE (GhcPass p) -> Maybe (WarningTxt (GhcPass p))+ieDeprecation = fmap unLoc . ie_deprecation (ghcPass @p)+ where+ ie_deprecation :: GhcPass p -> IE (GhcPass p) -> Maybe (LocatedP (WarningTxt (GhcPass p)))+ ie_deprecation GhcPs (IEVar xie _) = xie+ ie_deprecation GhcPs (IEThingAbs (xie, _) _) = xie+ ie_deprecation GhcPs (IEThingAll (xie, _) _) = xie+ ie_deprecation GhcPs (IEThingWith (xie, _) _ _ _) = xie+ ie_deprecation GhcPs (IEModuleContents (xie, _) _) = xie+ ie_deprecation GhcRn (IEVar xie _) = xie+ ie_deprecation GhcRn (IEThingAbs (xie, _) _) = xie+ ie_deprecation GhcRn (IEThingAll (xie, _) _) = xie+ ie_deprecation GhcRn (IEThingWith (xie, _) _ _ _) = xie+ ie_deprecation GhcRn (IEModuleContents xie _) = xie+ ie_deprecation _ _ = Nothing+ ieWrappedLName :: IEWrappedName (GhcPass p) -> LIdP (GhcPass p) ieWrappedLName (IEName _ (L l n)) = L l n ieWrappedLName (IEPattern _ (L l n)) = L l n@@ -289,12 +301,11 @@ replaceLWrappedName (L l n) n' = L l (replaceWrappedName n n') instance OutputableBndrId p => Outputable (IE (GhcPass p)) where- ppr (IEVar _ var) = ppr (unLoc var)- ppr (IEThingAbs _ thing) = ppr (unLoc thing)- ppr (IEThingAll _ thing) = hcat [ppr (unLoc thing), text "(..)"]- ppr (IEThingWith flds thing wc withs)- = ppr (unLoc thing) <> parens (fsep (punctuate comma- (ppWiths ++ ppFields) ))+ ppr ie@(IEVar _ var) = sep $ catMaybes [ppr <$> ieDeprecation ie, Just $ ppr (unLoc var)]+ ppr ie@(IEThingAbs _ thing) = sep $ catMaybes [ppr <$> ieDeprecation ie, Just $ ppr (unLoc thing)]+ ppr ie@(IEThingAll _ thing) = sep $ catMaybes [ppr <$> ieDeprecation ie, Just $ hcat [ppr (unLoc thing), text "(..)"]]+ ppr ie@(IEThingWith _ thing wc withs)+ = sep $ catMaybes [ppr <$> ieDeprecation ie, Just $ ppr (unLoc thing) <> parens (fsep (punctuate comma ppWiths))] where ppWiths = case wc of@@ -303,12 +314,8 @@ IEWildcard pos -> let (bs, as) = splitAt pos (map (ppr . unLoc) withs) in bs ++ [text ".."] ++ as- ppFields =- case ghcPass @p of- GhcRn -> map ppr flds- _ -> []- ppr (IEModuleContents _ mod')- = text "module" <+> ppr mod'+ ppr ie@(IEModuleContents _ mod')+ = sep $ catMaybes [ppr <$> ieDeprecation ie, Just $ text "module" <+> ppr mod'] ppr (IEGroup _ n _) = text ("<IEGroup: " ++ show n ++ ">") ppr (IEDoc _ doc) = ppr doc ppr (IEDocNamed _ string) = text ("<IEDocNamed: " ++ string ++ ">")
GHC/Hs/Instances.hs view
@@ -287,6 +287,14 @@ deriving instance Data (FieldLabelStrings GhcRn) deriving instance Data (FieldLabelStrings GhcTc) +deriving instance Data (HsRecUpdParent GhcPs)+deriving instance Data (HsRecUpdParent GhcRn)+deriving instance Data (HsRecUpdParent GhcTc)++deriving instance Data (LHsRecUpdFields GhcPs)+deriving instance Data (LHsRecUpdFields GhcRn)+deriving instance Data (LHsRecUpdFields GhcTc)+ deriving instance Data (DotFieldOcc GhcPs) deriving instance Data (DotFieldOcc GhcRn) deriving instance Data (DotFieldOcc GhcTc)@@ -450,6 +458,11 @@ -- --------------------------------------------------------------------- -- Data derivations from GHC.Hs.Type ---------------------------------- +-- deriving instance Data (HsBndrVis p)+deriving instance Data (HsBndrVis GhcPs)+deriving instance Data (HsBndrVis GhcRn)+deriving instance Data (HsBndrVis GhcTc)+ -- deriving instance (DataIdLR p p) => Data (LHsQTyVars p) deriving instance Data (LHsQTyVars GhcPs) deriving instance Data (LHsQTyVars GhcRn)@@ -510,10 +523,10 @@ deriving instance Data thing => Data (HsScaled GhcRn thing) deriving instance Data thing => Data (HsScaled GhcTc thing) -deriving instance (Data a, Data b) => Data (HsArg a b)--- deriving instance Data (HsArg (Located (HsType GhcPs)) (Located (HsKind GhcPs)))--- deriving instance Data (HsArg (Located (HsType GhcRn)) (Located (HsKind GhcRn)))--- deriving instance Data (HsArg (Located (HsType GhcTc)) (Located (HsKind GhcTc)))+-- deriving instance (Data a, Data b) => Data (HsArg p a b)+deriving instance (Data a, Data b) => Data (HsArg GhcPs a b)+deriving instance (Data a, Data b) => Data (HsArg GhcRn a b)+deriving instance (Data a, Data b) => Data (HsArg GhcTc a b) -- deriving instance (DataIdLR p p) => Data (ConDeclField p) deriving instance Data (ConDeclField GhcPs)
GHC/Hs/Lit.hs view
@@ -50,7 +50,13 @@ type instance XHsInt (GhcPass _) = NoExtField type instance XHsIntPrim (GhcPass _) = SourceText type instance XHsWordPrim (GhcPass _) = SourceText+type instance XHsInt8Prim (GhcPass _) = SourceText+type instance XHsInt16Prim (GhcPass _) = SourceText+type instance XHsInt32Prim (GhcPass _) = SourceText type instance XHsInt64Prim (GhcPass _) = SourceText+type instance XHsWord8Prim (GhcPass _) = SourceText+type instance XHsWord16Prim (GhcPass _) = SourceText+type instance XHsWord32Prim (GhcPass _) = SourceText type instance XHsWord64Prim (GhcPass _) = SourceText type instance XHsInteger (GhcPass _) = SourceText type instance XHsRat (GhcPass _) = NoExtField@@ -128,14 +134,20 @@ go (HsString {}) = False go (HsStringPrim {}) = False go (HsInt _ x) = p > topPrec && il_neg x- go (HsIntPrim {}) = False- go (HsWordPrim {}) = False- go (HsInt64Prim {}) = False- go (HsWord64Prim {}) = False go (HsInteger _ x _) = p > topPrec && x < 0 go (HsRat _ x _) = p > topPrec && fl_neg x go (HsFloatPrim {}) = False go (HsDoublePrim {}) = False+ go (HsIntPrim {}) = False+ go (HsInt8Prim {}) = False+ go (HsInt16Prim {}) = False+ go (HsInt32Prim {}) = False+ go (HsInt64Prim {}) = False+ go (HsWordPrim {}) = False+ go (HsWord8Prim {}) = False+ go (HsWord16Prim {}) = False+ go (HsWord64Prim {}) = False+ go (HsWord32Prim {}) = False go (XLit _) = False -- | Convert a literal from one index type to another@@ -147,7 +159,13 @@ convertLit (HsInt a x) = HsInt a x convertLit (HsIntPrim a x) = HsIntPrim a x convertLit (HsWordPrim a x) = HsWordPrim a x+convertLit (HsInt8Prim a x) = HsInt8Prim a x+convertLit (HsInt16Prim a x) = HsInt16Prim a x+convertLit (HsInt32Prim a x) = HsInt32Prim a x convertLit (HsInt64Prim a x) = HsInt64Prim a x+convertLit (HsWord8Prim a x) = HsWord8Prim a x+convertLit (HsWord16Prim a x) = HsWord16Prim a x+convertLit (HsWord32Prim a x) = HsWord32Prim a x convertLit (HsWord64Prim a x) = HsWord64Prim a x convertLit (HsInteger a x b) = HsInteger a x b convertLit (HsRat a x b) = HsRat a x b@@ -182,8 +200,14 @@ ppr (HsFloatPrim _ f) = ppr f <> primFloatSuffix ppr (HsDoublePrim _ d) = ppr d <> primDoubleSuffix ppr (HsIntPrim st i) = pprWithSourceText st (pprPrimInt i)- ppr (HsWordPrim st w) = pprWithSourceText st (pprPrimWord w)+ ppr (HsInt8Prim st i) = pprWithSourceText st (pprPrimInt8 i)+ ppr (HsInt16Prim st i) = pprWithSourceText st (pprPrimInt16 i)+ ppr (HsInt32Prim st i) = pprWithSourceText st (pprPrimInt32 i) ppr (HsInt64Prim st i) = pprWithSourceText st (pprPrimInt64 i)+ ppr (HsWordPrim st w) = pprWithSourceText st (pprPrimWord w)+ ppr (HsWord8Prim st w) = pprWithSourceText st (pprPrimWord8 w)+ ppr (HsWord16Prim st w) = pprWithSourceText st (pprPrimWord16 w)+ ppr (HsWord32Prim st w) = pprWithSourceText st (pprPrimWord32 w) ppr (HsWord64Prim st w) = pprWithSourceText st (pprPrimWord64 w) -- in debug mode, print the expression that it's resolved to, too@@ -211,7 +235,13 @@ pmPprHsLit (HsInt _ i) = integer (il_value i) pmPprHsLit (HsIntPrim _ i) = integer i pmPprHsLit (HsWordPrim _ w) = integer w+pmPprHsLit (HsInt8Prim _ i) = integer i+pmPprHsLit (HsInt16Prim _ i) = integer i+pmPprHsLit (HsInt32Prim _ i) = integer i pmPprHsLit (HsInt64Prim _ i) = integer i+pmPprHsLit (HsWord8Prim _ w) = integer w+pmPprHsLit (HsWord16Prim _ w) = integer w+pmPprHsLit (HsWord32Prim _ w) = integer w pmPprHsLit (HsWord64Prim _ w) = integer w pmPprHsLit (HsInteger _ i _) = integer i pmPprHsLit (HsRat _ f _) = ppr f
GHC/Hs/Pat.hs view
@@ -43,7 +43,7 @@ looksLazyPatBind, isBangedLPat, gParPat, patNeedsParens, parenthesizePat,- isIrrefutableHsPat,+ isIrrefutableHsPat, isBoringHsPat, collectEvVarsPat, collectEvVarsPats, @@ -82,8 +82,6 @@ import GHC.Data.Bag -- collect ev vars from pats import GHC.Data.Maybe import GHC.Types.Name (Name, dataName)-import GHC.Driver.Session-import qualified GHC.LanguageExtensions as LangExt import Data.Data @@ -244,8 +242,8 @@ hsRecFieldId :: HsRecField GhcTc arg -> Id hsRecFieldId = hsRecFieldSel -hsRecUpdFieldRdr :: HsRecUpdField (GhcPass p) -> Located RdrName-hsRecUpdFieldRdr = fmap rdrNameAmbiguousFieldOcc . reLoc . hfbLHS+hsRecUpdFieldRdr :: HsRecUpdField (GhcPass p) q -> Located RdrName+hsRecUpdFieldRdr = fmap ambiguousFieldOccRdrName . reLoc . hfbLHS hsRecUpdFieldId :: HsFieldBind (LAmbiguousFieldOcc GhcTc) arg -> Located Id hsRecUpdFieldId = fmap foExt . reLoc . hsRecUpdFieldOcc@@ -502,22 +500,6 @@ looksLazyPat (WildPat {}) = False looksLazyPat _ = True -isIrrefutableHsPat :: forall p. (OutputableBndrId p)- => DynFlags -> LPat (GhcPass p) -> Bool--- (isIrrefutableHsPat p) is true if matching against p cannot fail,--- in the sense of falling through to the next pattern.--- (NB: this is not quite the same as the (silly) defn--- in 3.17.2 of the Haskell 98 report.)------ WARNING: isIrrefutableHsPat returns False if it's in doubt.--- Specifically on a ConPatIn, which is what it sees for a--- (LPat Name) in the renamer, it doesn't know the size of the--- constructor family, so it returns False. Result: only--- tuple patterns are considered irrefutable at the renamer stage.------ But if it returns True, the pattern is definitely irrefutable-isIrrefutableHsPat dflags =- isIrrefutableHsPat' (xopt LangExt.Strict dflags) {- Note [-XStrict and irrefutability]@@ -544,12 +526,23 @@ See also Note [decideBangHood] in GHC.HsToCore.Utils. -}--isIrrefutableHsPat' :: forall p. (OutputableBndrId p)+-- | (isIrrefutableHsPat p) is true if matching against p cannot fail+-- in the sense of falling through to the next pattern.+-- (NB: this is not quite the same as the (silly) defn+-- in 3.17.2 of the Haskell 98 report.)+--+-- WARNING: isIrrefutableHsPat returns False if it's in doubt.+-- Specifically on a ConPatIn, which is what it sees for a+-- (LPat Name) in the renamer, it doesn't know the size of the+-- constructor family, so it returns False. Result: only+-- tuple patterns are considered irrefutable at the renamer stage.+--+-- But if it returns True, the pattern is definitely irrefutable+isIrrefutableHsPat :: forall p. (OutputableBndrId p) => Bool -- ^ Are we in a @-XStrict@ context? -- See Note [-XStrict and irrefutability] -> LPat (GhcPass p) -> Bool-isIrrefutableHsPat' is_strict = goL+isIrrefutableHsPat is_strict = goL where goL :: LPat (GhcPass p) -> Bool goL = go . unLoc@@ -559,7 +552,7 @@ go (VarPat {}) = True go (LazyPat _ p') | is_strict- = isIrrefutableHsPat' False p'+ = isIrrefutableHsPat False p' | otherwise = True go (BangPat _ pat) = goL pat go (ParPat _ _ pat _) = goL pat@@ -616,7 +609,56 @@ VarPat _ x -> Just (unLoc x) _ -> Nothing +-- | Is this pattern boring from the perspective of pattern-match checking,+-- i.e. introduces no new pieces of long-dinstance information+-- which could influence pattern-match checking?+--+-- See Note [Boring patterns].+isBoringHsPat :: forall p. OutputableBndrId p => LPat (GhcPass p) -> Bool+-- NB: it's always safe to return 'False' in this function; that just means+-- performing potentially-redundant pattern-match checking.+isBoringHsPat = goL+ where+ goL :: forall p. OutputableBndrId p => LPat (GhcPass p) -> Bool+ goL = go . unLoc + go :: forall p. OutputableBndrId p => Pat (GhcPass p) -> Bool+ go = \case+ WildPat {} -> True+ VarPat {} -> True+ LazyPat {} -> True+ BangPat _ pat -> goL pat+ ParPat _ _ pat _ -> goL pat+ AsPat {} -> False -- the pattern x@y links x and y together,+ -- which is a nontrivial piece of information+ ViewPat _ _ pat -> goL pat+ SigPat _ pat _ -> goL pat+ TuplePat _ pats _ -> all goL pats+ SumPat _ pat _ _ -> goL pat+ ListPat _ pats -> all goL pats+ ConPat { pat_con = con, pat_args = details }+ -> case ghcPass @p of+ GhcPs -> False -- conservative+ GhcRn -> False -- conservative+ GhcTc+ | isVanillaConLike (unLoc con)+ -> all goL (hsConPatArgs details)+ | otherwise+ -- A pattern match on a GADT constructor can introduce+ -- type-level information (for example, T18572).+ -> False+ LitPat {} -> True+ NPat {} -> True+ NPlusKPat {} -> True+ SplicePat {} -> False+ XPat ext ->+ case ghcPass @p of+ GhcRn -> case ext of+ HsPatExpanded _ pat -> go pat+ GhcTc -> case ext of+ CoPat _ pat _ -> go pat+ ExpansionPat _ pat -> go pat+ {- Note [Unboxed sum patterns aren't irrefutable] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unlike unboxed tuples, unboxed sums are *not* irrefutable when used as@@ -637,6 +679,58 @@ Failing to mark unboxed sum patterns as non-irrefutable would cause the Just' case in foo to be unreachable, as GHC would mistakenly believe that Nothing' is the only thing that could possibly be matched!++Note [Boring patterns]+~~~~~~~~~~~~~~~~~~~~~~+A pattern is called boring when no new information is gained upon successfully+matching on the pattern.++Some examples of boring patterns:++ - x, for a variable x. We learn nothing about x upon matching this pattern.+ - Just y. This pattern can fail, but if it matches, we don't learn anything+ about y.++Some examples of non-boring patterns:++ - x@(Just y). A match on this pattern introduces the fact that x is headed+ by the constructor Just, which means that a subsequent pattern match such as++ case x of { Just z -> ... }++ should not be marked as incomplete.+ - a@b. Matching on this pattern introduces a relation between 'a' and 'b',+ which means that we shouldn't emit any warnings in code of the form++ case a of+ True -> case b of { True -> .. } -- no warning here!+ False -> ...+ - GADT patterns. For example, with the GADT++ data G i where { MkGInt :: G Int }++ a match on the pattern 'MkGInt' introduces type-level information:++ foo :: G i -> i+ foo MkGInt = 3++ Here we learn that i ~ Int after matching on 'MkGInt', so this pattern+ is not boring.++When a pattern is boring, and we are only interested in additional long-distance+information (not whether the pattern itself is fallible), we can skip pattern-match+checking entirely. Doing this saves about 10% allocations in test T11195.++This happens when we are checking pattern-matches in do-notation, for example:++ do { x@(Just y) <- z+ ; ...+ ; return $ case x of { Just w -> ... } }++Here we *do not* want to emit a pattern-match warning on the first line for the+incomplete pattern-match, as incompleteness inside do-notation is handled+using MonadFail. However, we still want to propagate the fact that x is headed+by the 'Just' constructor, to avoid a pattern-match warning on the last line. -} -- | @'patNeedsParens' p pat@ returns 'True' if the pattern @pat@ needs
GHC/Hs/Syn/Type.hs view
@@ -77,7 +77,13 @@ hsLitType (HsInt _ _) = intTy hsLitType (HsIntPrim _ _) = intPrimTy hsLitType (HsWordPrim _ _) = wordPrimTy+hsLitType (HsInt8Prim _ _) = int8PrimTy+hsLitType (HsInt16Prim _ _) = int16PrimTy+hsLitType (HsInt32Prim _ _) = int32PrimTy hsLitType (HsInt64Prim _ _) = int64PrimTy+hsLitType (HsWord8Prim _ _) = word8PrimTy+hsLitType (HsWord16Prim _ _) = word16PrimTy+hsLitType (HsWord32Prim _ _) = word32PrimTy hsLitType (HsWord64Prim _ _) = word64PrimTy hsLitType (HsInteger _ _ ty) = ty hsLitType (HsRat _ _ ty) = ty
GHC/Hs/Type.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveDataTypeable #-}@@ -31,6 +32,7 @@ HsType(..), HsCoreTy, LHsType, HsKind, LHsKind, HsForAllTelescope(..), EpAnnForallTy, HsTyVarBndr(..), LHsTyVarBndr,+ HsBndrVis(..), isHsBndrInvisible, LHsQTyVars(..), HsOuterTyVarBndrs(..), HsOuterFamEqnTyVarBndrs, HsOuterSigTyVarBndrs, HsWildCardBndrs(..),@@ -55,9 +57,12 @@ FieldOcc(..), LFieldOcc, mkFieldOcc, AmbiguousFieldOcc(..), LAmbiguousFieldOcc, mkAmbiguousFieldOcc,- rdrNameAmbiguousFieldOcc, selectorAmbiguousFieldOcc,+ ambiguousFieldOccRdrName, ambiguousFieldOccLRdrName,+ selectorAmbiguousFieldOcc, unambiguousFieldOcc, ambiguousFieldOcc, + OpName(..),+ mkAnonWildCardTy, pprAnonWildCard, hsOuterTyVarNames, hsOuterExplicitBndrs, mapHsOuterImplicit,@@ -68,7 +73,7 @@ mkHsForAllVisTele, mkHsForAllInvisTele, mkHsQTvs, hsQTvExplicit, emptyLHsQTvs, isHsKindedTyVar, hsTvbAllKinded,- hsScopedTvs, hsWcScopedTvs, dropWildCards,+ hsScopedTvs, hsScopedKvs, hsWcScopedTvs, dropWildCards, hsTyVarName, hsAllLTyVarNames, hsLTyVarLocNames, hsLTyVarName, hsLTyVarNames, hsLTyVarLocName, hsExplicitLTyVarNames, splitLHsInstDeclTy, getLHsInstDeclHead, getLHsInstDeclClass_maybe,@@ -79,7 +84,7 @@ mkHsOpTy, mkHsAppTy, mkHsAppTys, mkHsAppKindTy, ignoreParens, hsSigWcType, hsPatSigType, hsTyKindSig,- setHsTyVarBndrFlag, hsTyVarBndrFlag,+ setHsTyVarBndrFlag, hsTyVarBndrFlag, updateHsTyVarBndrFlag, -- Printing pprHsType, pprHsForAll,@@ -94,6 +99,7 @@ import {-# SOURCE #-} GHC.Hs.Expr ( pprUntypedSplice, HsUntypedSpliceResult(..) ) +import Language.Haskell.Syntax.Concrete import Language.Haskell.Syntax.Extension import GHC.Core.DataCon( SrcStrictness(..), SrcUnpackedness(..), HsImplBang(..) ) import GHC.Hs.Extension@@ -102,10 +108,11 @@ import GHC.Types.Fixity ( LexicalFixity(..) ) import GHC.Types.Id ( Id ) import GHC.Types.SourceText-import GHC.Types.Name( Name, NamedThing(getName), tcName, dataName )+import GHC.Types.Name import GHC.Types.Name.Reader ( RdrName ) import GHC.Types.Var ( VarBndr, visArgTypeLike ) import GHC.Core.TyCo.Rep ( Type(..) )+import GHC.Builtin.Names ( negateName ) import GHC.Builtin.Types( manyDataConName, oneDataConName, mkTupleStr ) import GHC.Core.Ppr ( pprOccWithTick) import GHC.Core.Type@@ -182,7 +189,7 @@ mkHsForAllInvisTele an invis_bndrs = HsForAllInvis { hsf_xinvis = an, hsf_invis_bndrs = invis_bndrs } -mkHsQTvs :: [LHsTyVarBndr () GhcPs] -> LHsQTyVars GhcPs+mkHsQTvs :: [LHsTyVarBndr (HsBndrVis GhcPs) GhcPs] -> LHsQTyVars GhcPs mkHsQTvs tvs = HsQTvs { hsq_ext = noExtField, hsq_explicit = tvs } emptyLHsQTvs :: LHsQTyVars GhcRn@@ -283,6 +290,8 @@ hsTyVarBndrFlag :: HsTyVarBndr flag (GhcPass pass) -> flag hsTyVarBndrFlag (UserTyVar _ fl _) = fl hsTyVarBndrFlag (KindedTyVar _ fl _ _) = fl+-- By specialising to (GhcPass p) we know that XXTyVarBndr is DataConCantHappen+-- so these two equations are exhaustive: extension construction can't happen -- | Set the attached flag setHsTyVarBndrFlag :: flag -> HsTyVarBndr flag' (GhcPass pass)@@ -290,6 +299,14 @@ setHsTyVarBndrFlag f (UserTyVar x _ l) = UserTyVar x f l setHsTyVarBndrFlag f (KindedTyVar x _ l k) = KindedTyVar x f l k +-- | Update the attached flag+updateHsTyVarBndrFlag+ :: (flag -> flag')+ -> HsTyVarBndr flag (GhcPass pass)+ -> HsTyVarBndr flag' (GhcPass pass)+updateHsTyVarBndrFlag f (UserTyVar x flag name) = UserTyVar x (f flag) name+updateHsTyVarBndrFlag f (KindedTyVar x flag name ki) = KindedTyVar x (f flag) name ki+ -- | Do all type variables in this 'LHsQTyVars' come with kind annotations? hsTvbAllKinded :: LHsQTyVars (GhcPass p) -> Bool hsTvbAllKinded = all (isHsKindedTyVar . unLoc) . hsQTvExplicit@@ -312,7 +329,7 @@ type instance XStarTy (GhcPass _) = NoExtField type instance XKindSig (GhcPass _) = EpAnn [AddEpAnn] -type instance XAppKindTy (GhcPass _) = SrcSpan -- Where the `@` lives+type instance XAppKindTy (GhcPass _) = NoExtField type instance XSpliceTy GhcPs = NoExtField type instance XSpliceTy GhcRn = HsUntypedSpliceResult (LHsType GhcRn)@@ -414,10 +431,20 @@ = hsLTyVarNames (hsOuterExplicitBndrs outer_bndrs) -- See Note [hsScopedTvs and visible foralls] +hsScopedKvs :: LHsKind GhcRn -> [Name]+-- Same as hsScopedTvs, but for a LHsKind+hsScopedKvs (L _ HsForAllTy { hst_tele = HsForAllInvis { hsf_invis_bndrs = bndrs }})+ = hsLTyVarNames bndrs+ -- See Note [hsScopedTvs and visible foralls]+hsScopedKvs _ = []+ ---------------------+hsTyVarLName :: HsTyVarBndr flag (GhcPass p) -> LIdP (GhcPass p)+hsTyVarLName (UserTyVar _ _ n) = n+hsTyVarLName (KindedTyVar _ _ n _) = n+ hsTyVarName :: HsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p)-hsTyVarName (UserTyVar _ _ (L _ n)) = n-hsTyVarName (KindedTyVar _ _ (L _ n) _) = n+hsTyVarName = unLoc . hsTyVarLName hsLTyVarName :: LHsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p) hsLTyVarName = hsTyVarName . unLoc@@ -435,10 +462,12 @@ , hsq_explicit = tvs }) = kvs ++ hsLTyVarNames tvs -hsLTyVarLocName :: LHsTyVarBndr flag (GhcPass p) -> LocatedN (IdP (GhcPass p))-hsLTyVarLocName (L l a) = L (l2l l) (hsTyVarName a)+hsLTyVarLocName :: Anno (IdGhcP p) ~ SrcSpanAnnN+ => LHsTyVarBndr flag (GhcPass p) -> LocatedN (IdP (GhcPass p))+hsLTyVarLocName (L _ a) = hsTyVarLName a -hsLTyVarLocNames :: LHsQTyVars (GhcPass p) -> [LocatedN (IdP (GhcPass p))]+hsLTyVarLocNames :: Anno (IdGhcP p) ~ SrcSpanAnnN+ => LHsQTyVars (GhcPass p) -> [LocatedN (IdP (GhcPass p))] hsLTyVarLocNames qtvs = map hsLTyVarLocName (hsQTvExplicit qtvs) -- | Get the kind signature of a type, ignoring parentheses:@@ -489,10 +518,10 @@ -> LHsType (GhcPass p) mkHsAppTys = foldl' mkHsAppTy -mkHsAppKindTy :: XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)+mkHsAppKindTy :: LHsType (GhcPass p) -> LHsToken "@" (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)-mkHsAppKindTy ext ty k- = addCLocAA ty k (HsAppKindTy ext ty k)+mkHsAppKindTy ty at k+ = addCLocAA ty k (HsAppKindTy noExtField ty at k) {- ************************************************************************@@ -541,7 +570,7 @@ where go (L _ (HsTyVar _ _ ln)) = Just ln go (L _ (HsAppTy _ l _)) = go l- go (L _ (HsAppKindTy _ t _)) = go t+ go (L _ (HsAppKindTy _ t _ _)) = go t go (L _ (HsOpTy _ _ _ ln _)) = Just ln go (L _ (HsParTy _ t)) = go t go (L _ (HsKindSig _ t _)) = go t@@ -553,12 +582,12 @@ lhsTypeArgSrcSpan :: LHsTypeArg (GhcPass pass) -> SrcSpan lhsTypeArgSrcSpan arg = case arg of HsValArg tm -> getLocA tm- HsTypeArg at ty -> at `combineSrcSpans` getLocA ty+ HsTypeArg at ty -> getTokenSrcSpan (getLoc at) `combineSrcSpans` getLocA ty HsArgPar sp -> sp -------------------------------- -numVisibleArgs :: [HsArg tm ty] -> Arity+numVisibleArgs :: [HsArg p tm ty] -> Arity numVisibleArgs = count is_vis where is_vis (HsValArg _) = True is_vis _ = False@@ -576,7 +605,7 @@ -- pprHsArgsApp (++) Infix [HsValArg Char, HsValArg Double, HsVarArg Ordering] = (Char ++ Double) Ordering -- @ pprHsArgsApp :: (OutputableBndr id, Outputable tm, Outputable ty)- => id -> LexicalFixity -> [HsArg tm ty] -> SDoc+ => id -> LexicalFixity -> [HsArg p tm ty] -> SDoc pprHsArgsApp thing fixity (argl:argr:args) | Infix <- fixity = let pp_op_app = hsep [ ppr_single_hs_arg argl@@ -591,7 +620,7 @@ -- | Pretty-print a prefix identifier to a list of 'HsArg's. ppr_hs_args_prefix_app :: (Outputable tm, Outputable ty)- => SDoc -> [HsArg tm ty] -> SDoc+ => SDoc -> [HsArg p tm ty] -> SDoc ppr_hs_args_prefix_app acc [] = acc ppr_hs_args_prefix_app acc (arg:args) = case arg of@@ -601,7 +630,7 @@ -- | Pretty-print an 'HsArg' in isolation. ppr_single_hs_arg :: (Outputable tm, Outputable ty)- => HsArg tm ty -> SDoc+ => HsArg p tm ty -> SDoc ppr_single_hs_arg (HsValArg tm) = ppr tm ppr_single_hs_arg (HsTypeArg _ ty) = char '@' <> ppr ty -- GHC shouldn't be constructing ASTs such that this case is ever reached.@@ -611,9 +640,9 @@ -- | This instance is meant for debug-printing purposes. If you wish to -- pretty-print an application of 'HsArg's, use 'pprHsArgsApp' instead.-instance (Outputable tm, Outputable ty) => Outputable (HsArg tm ty) where+instance (Outputable tm, Outputable ty) => Outputable (HsArg (GhcPass p) tm ty) where ppr (HsValArg tm) = text "HsValArg" <+> ppr tm- ppr (HsTypeArg sp ty) = text "HsTypeArg" <+> ppr sp <+> ppr ty+ ppr (HsTypeArg at ty) = text "HsTypeArg" <+> ppr at <+> ppr ty ppr (HsArgPar sp) = text "HsArgPar" <+> ppr sp --------------------------------@@ -913,11 +942,11 @@ type instance XXAmbiguousFieldOcc (GhcPass _) = DataConCantHappen instance Outputable (AmbiguousFieldOcc (GhcPass p)) where- ppr = ppr . rdrNameAmbiguousFieldOcc+ ppr = ppr . ambiguousFieldOccRdrName instance OutputableBndr (AmbiguousFieldOcc (GhcPass p)) where- pprInfixOcc = pprInfixOcc . rdrNameAmbiguousFieldOcc- pprPrefixOcc = pprPrefixOcc . rdrNameAmbiguousFieldOcc+ pprInfixOcc = pprInfixOcc . ambiguousFieldOccRdrName+ pprPrefixOcc = pprPrefixOcc . ambiguousFieldOccRdrName instance OutputableBndr (Located (AmbiguousFieldOcc (GhcPass p))) where pprInfixOcc = pprInfixOcc . unLoc@@ -926,10 +955,13 @@ mkAmbiguousFieldOcc :: LocatedN RdrName -> AmbiguousFieldOcc GhcPs mkAmbiguousFieldOcc rdr = Unambiguous noExtField rdr -rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc (GhcPass p) -> RdrName-rdrNameAmbiguousFieldOcc (Unambiguous _ (L _ rdr)) = rdr-rdrNameAmbiguousFieldOcc (Ambiguous _ (L _ rdr)) = rdr+ambiguousFieldOccRdrName :: AmbiguousFieldOcc (GhcPass p) -> RdrName+ambiguousFieldOccRdrName = unLoc . ambiguousFieldOccLRdrName +ambiguousFieldOccLRdrName :: AmbiguousFieldOcc (GhcPass p) -> LocatedN RdrName+ambiguousFieldOccLRdrName (Unambiguous _ rdr) = rdr+ambiguousFieldOccLRdrName (Ambiguous _ rdr) = rdr+ selectorAmbiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> Id selectorAmbiguousFieldOcc (Unambiguous sel _) = sel selectorAmbiguousFieldOcc (Ambiguous sel _) = sel@@ -944,6 +976,26 @@ {- ************************************************************************ * *+ OpName+* *+************************************************************************+-}++-- | Name of an operator in an operator application or section+data OpName = NormalOp Name -- ^ A normal identifier+ | NegateOp -- ^ Prefix negation+ | UnboundOp RdrName -- ^ An unbound identifier+ | RecFldOp (FieldOcc GhcRn) -- ^ A record field occurrence++instance Outputable OpName where+ ppr (NormalOp n) = ppr n+ ppr NegateOp = ppr negateName+ ppr (UnboundOp uv) = ppr uv+ ppr (RecFldOp fld) = ppr fld++{-+************************************************************************+* * \subsection{Pretty printing} * * ************************************************************************@@ -962,6 +1014,15 @@ pprTyVarBndr (KindedTyVar _ SpecifiedSpec n k) = parens $ hsep [ppr n, dcolon, ppr k] pprTyVarBndr (KindedTyVar _ InferredSpec n k) = braces $ hsep [ppr n, dcolon, ppr k] +instance OutputableBndrFlag (HsBndrVis p') p where+ pprTyVarBndr (UserTyVar _ vis n) = pprHsBndrVis vis $ ppr n+ pprTyVarBndr (KindedTyVar _ vis n k) =+ pprHsBndrVis vis $ parens $ hsep [ppr n, dcolon, ppr k]++pprHsBndrVis :: HsBndrVis pass -> SDoc -> SDoc+pprHsBndrVis HsBndrRequired d = d+pprHsBndrVis (HsBndrInvisible _) d = char '@' <> d+ instance OutputableBndrId p => Outputable (HsSigType (GhcPass p)) where ppr (HsSig { sig_bndrs = outer_bndrs, sig_body = body }) = pprHsOuterSigTyVarBndrs outer_bndrs <+> ppr body@@ -1180,7 +1241,7 @@ ppr_mono_ty (HsAppTy _ fun_ty arg_ty) = hsep [ppr_mono_lty fun_ty, ppr_mono_lty arg_ty]-ppr_mono_ty (HsAppKindTy _ ty k)+ppr_mono_ty (HsAppKindTy _ ty _ k) = ppr_mono_lty ty <+> char '@' <> ppr_mono_lty k ppr_mono_ty (HsOpTy _ prom ty1 (L _ op) ty2) = sep [ ppr_mono_lty ty1@@ -1295,7 +1356,7 @@ go (HsWildCardTy{}) = False go (HsStarTy{}) = False go (HsAppTy _ t _) = goL t- go (HsAppKindTy _ t _) = goL t+ go (HsAppKindTy _ t _ _) = goL t go (HsParTy{}) = False go (HsDocTy _ t _) = goL t go (XHsType{}) = False
GHC/Hs/Utils.hs view
@@ -1,4 +1,6 @@ {-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE TupleSections #-}+ {-| Module : GHC.Hs.Utils Description : Generic helpers for the HsSyn type.@@ -12,7 +14,7 @@ ---------------- ------------- GhcPs/RdrName GHC.Parser.PostProcess GhcRn/Name GHC.Rename.*- GhcTc/Id GHC.Tc.Utils.Zonk+ GhcTc/Id GHC.Tc.Zonk.Type The @mk*@ functions attempt to construct a not-completely-useless SrcSpan from their components, compared with the @nl*@ functions which@@ -86,7 +88,7 @@ mkLetStmt, -- * Collecting binders- isUnliftedHsBind, isBangedHsBind,+ isUnliftedHsBind, isUnliftedHsBinds, isBangedHsBind, collectLocalBinders, collectHsValBinders, collectHsBindListBinders, collectHsIdBinders,@@ -97,6 +99,7 @@ collectLStmtBinders, collectStmtBinders, CollectPass(..), CollectFlag(..), + TyDeclBinders(..), LConsWithFields(..), hsLTyClDeclBinders, hsTyClForeignBinders, hsPatSynSelectors, getPatSynBinds, hsForeignDeclsBinders, hsGroupBinders, hsDataFamInstBinders,@@ -113,6 +116,7 @@ import GHC.Hs.Pat import GHC.Hs.Type import GHC.Hs.Lit+import Language.Haskell.Syntax.Decls import Language.Haskell.Syntax.Extension import GHC.Hs.Extension import GHC.Parser.Annotation@@ -146,13 +150,18 @@ import GHC.Utils.Outputable import GHC.Utils.Panic -import Data.Either+import Control.Arrow ( first )+import Data.Either ( partitionEithers ) import Data.Foldable ( toList )-import Data.Function-import Data.List ( partition, deleteBy )+import Data.List ( partition ) import Data.List.NonEmpty ( nonEmpty ) import qualified Data.List.NonEmpty as NE +import Data.IntMap ( IntMap )+import qualified Data.IntMap.Strict as IntMap+import Data.Map ( Map )+import qualified Data.Map.Strict as Map+ {- ************************************************************************ * *@@ -262,7 +271,7 @@ -> LHsExpr (GhcPass p) mkHsLam pats body = mkHsPar (L (getLoc body) (HsLam noExtField matches)) where- matches = mkMatchGroup Generated+ matches = mkMatchGroup (Generated SkipPmc) (noLocA [mkSimpleMatch LambdaExpr pats' body]) pats' = map (parenthesizePat appPrec) pats @@ -590,7 +599,8 @@ nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs -- AZ:Is this used?-nlHsLam match = noLocA (HsLam noExtField (mkMatchGroup Generated (noLocA [match])))+nlHsLam match = noLocA $ HsLam noExtField+ $ mkMatchGroup (Generated SkipPmc) (noLocA [match]) nlHsPar e = noLocA (gHsPar e) -- nlHsIf should generate if-expressions which are NOT subject to@@ -599,7 +609,7 @@ nlHsIf cond true false = noLocA (HsIf noAnn cond true false) nlHsCase expr matches- = noLocA (HsCase noAnn expr (mkMatchGroup Generated (noLocA matches)))+ = noLocA (HsCase noAnn expr (mkMatchGroup (Generated SkipPmc) (noLocA matches))) nlList exprs = noLocA (ExplicitList noAnn exprs) nlHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)@@ -628,13 +638,13 @@ mk_app fun@(L _ (HsOpTy {})) arg = mk_app (noLocA $ HsParTy noAnn fun) arg -- parenthesize things like `(A + B) C` mk_app fun (HsValArg ty) = noLocA (HsAppTy noExtField fun (parenthesizeHsType appPrec ty))- mk_app fun (HsTypeArg _ ki) = noLocA (HsAppKindTy noSrcSpan fun (parenthesizeHsType appPrec ki))+ mk_app fun (HsTypeArg at ki) = noLocA (HsAppKindTy noExtField fun at (parenthesizeHsType appPrec ki)) mk_app fun (HsArgPar _) = noLocA (HsParTy noAnn fun) nlHsAppKindTy :: LHsType (GhcPass p) -> LHsKind (GhcPass p) -> LHsType (GhcPass p) nlHsAppKindTy f k- = noLocA (HsAppKindTy noSrcSpan f (parenthesizeHsType appPrec k))+ = noLocA (HsAppKindTy noExtField f noHsTok (parenthesizeHsType appPrec k)) {- Tuples. All these functions are *pre-typechecker* because they lack@@ -810,7 +820,7 @@ mkHsVarBind :: SrcSpan -> RdrName -> LHsExpr GhcPs -> LHsBind GhcPs mkHsVarBind loc var rhs = mkSimpleGeneratedFunBind loc var [] rhs -mkVarBind :: IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p)+mkVarBind :: IdP GhcTc -> LHsExpr GhcTc -> LHsBind GhcTc mkVarBind var rhs = L (getLoc rhs) $ VarBind { var_ext = noExtField, var_id = var, var_rhs = rhs }@@ -856,9 +866,9 @@ -- | Convenience function using 'mkFunBind'. -- This is for generated bindings only, do not use for user-written code. mkSimpleGeneratedFunBind :: SrcSpan -> RdrName -> [LPat GhcPs]- -> LHsExpr GhcPs -> LHsBind GhcPs+ -> LHsExpr GhcPs -> LHsBind GhcPs mkSimpleGeneratedFunBind loc fun pats expr- = L (noAnnSrcSpan loc) $ mkFunBind Generated (L (noAnnSrcSpan loc) fun)+ = L (noAnnSrcSpan loc) $ mkFunBind (Generated SkipPmc) (L (noAnnSrcSpan loc) fun) [mkMatch (mkPrefixFunRhs (L (noAnnSrcSpan loc) fun)) pats expr emptyLocalBinds] @@ -905,56 +915,107 @@ and wild-card mechanism makes it hard to know what is bound. So these functions should not be applied to (HsSyn RdrName) -Note [Unlifted id check in isUnliftedHsBind]+Note [isUnliftedHsBind] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The function isUnliftedHsBind is used to complain if we make a top-level-binding for a variable of unlifted type.+The function isUnliftedHsBind tells if the binding binds a variable of+unlifted type. e.g. -Such a binding is illegal if the top-level binding would be unlifted;-but also if the local letrec generated by desugaring AbsBinds would be.-E.g.- f :: Num a => (# a, a #)- g :: Num a => a -> a- f = ...g...- g = ...g...+ - I# x = blah+ - Just (I# x) = blah -The top-level bindings for f,g are not unlifted (because of the Num a =>),-but the local, recursive, monomorphic bindings are:+isUnliftedHsBind is used in two ways: +* To complain if we make a top-level binding for a variable of unlifted+ type. E.g. any of the above bindings are illegal at top level++* To generate a case expression for a non-recursive local let. E.g.+ let Just (I# x) = blah in body+ ==>+ case blah of Just (I# x) -> body+ See GHC.HsToCore.Expr.dsUnliftedBind.++Wrinkles:++(W1) For AbsBinds we must check if the local letrec generated by desugaring+ AbsBinds would be unlifted; so we just recurse into the abs_binds. E.g.+ f :: Num a => (# a, a #)+ g :: Num a => a -> a+ f = ...g...+ g = ...g...++ The top-level bindings for f,g are not unlifted (because of the Num a =>),+ but the local, recursive, monomorphic bindings are: t = /\a \(d:Num a). letrec fm :: (# a, a #) = ...g... gm :: a -> a = ...f... in (fm, gm) -Here the binding for 'fm' is illegal. So generally we check the abe_mono types.+ Here the binding for 'fm' is illegal. So we recurse into the abs_binds -BUT we have a special case when abs_sig is true;- see Note [The abs_sig field of AbsBinds] in GHC.Hs.Binds+(W2) BUT we have a special case when abs_sig is true;+ see Note [The abs_sig field of AbsBinds] in GHC.Hs.Binds++(W3) isUnliftedHsBind returns False even if the binding itself is+ unlifted, provided it binds only lifted variables. E.g.+ - (# a,b #) = (# reverse xs, xs #)++ - x = sqrt# y# :: Float#++ - type Unl :: UnliftedType+ data Unl = MkUnl Int+ MkUnl z = blah++ In each case the RHS of the "=" has unlifted type, but isUnliftedHsBind+ returns False. Reason: see GHC Proposal #35+ https://github.com/ghc-proposals/ghc-proposals/blob/master/+ proposals/0035-unbanged-strict-patterns.rst++(W4) In particular, (W3) applies to a pattern that binds no variables at all.+ So { _ = sqrt# y :: Float# } returns False from isUnliftedHsBind, but+ { x = sqrt# y :: Float# } returns True.+ This is arguably a bit confusing (see #22719) -} ----------------- Bindings -------------------------- -- | Should we treat this as an unlifted bind? This will be true for any -- bind that binds an unlifted variable, but we must be careful around--- AbsBinds. See Note [Unlifted id check in isUnliftedHsBind]. For usage+-- AbsBinds. See Note [isUnliftedHsBind]. For usage -- information, see Note [Strict binds checks] is GHC.HsToCore.Binds. isUnliftedHsBind :: HsBind GhcTc -> Bool -- works only over typechecked binds-isUnliftedHsBind bind- | XHsBindsLR (AbsBinds { abs_exports = exports, abs_sig = has_sig }) <- bind- = if has_sig- then any (is_unlifted_id . abe_poly) exports- else any (is_unlifted_id . abe_mono) exports+isUnliftedHsBind (XHsBindsLR (AbsBinds { abs_exports = exports+ , abs_sig = has_sig+ , abs_binds = binds }))+ | has_sig = any (is_unlifted_id . abe_poly) exports+ | otherwise = isUnliftedHsBinds binds+ -- See wrinkle (W1) and (W2) in Note [isUnliftedHsBind] -- If has_sig is True we will never generate a binding for abe_mono, -- so we don't need to worry about it being unlifted. The abe_poly -- binding might not be: e.g. forall a. Num a => (# a, a #)+ -- If has_sig is False, just recurse - | otherwise- = any is_unlifted_id (collectHsBindBinders CollNoDictBinders bind)- where- is_unlifted_id id = isUnliftedType (idType id)- -- bindings always have a fixed RuntimeRep, so it's OK- -- to call isUnliftedType here+isUnliftedHsBind (FunBind { fun_id = L _ fun })+ = is_unlifted_id fun +isUnliftedHsBind (VarBind { var_id = var })+ = is_unlifted_id var++isUnliftedHsBind (PatBind { pat_lhs = pat })+ = any is_unlifted_id (collectPatBinders CollNoDictBinders pat)+ -- If we changed our view on (W3) you could add+ -- || isUnliftedType pat_ty+ -- to this check++isUnliftedHsBind (PatSynBind {}) = panic "isUnliftedBind: PatSynBind"++isUnliftedHsBinds :: LHsBinds GhcTc -> Bool+isUnliftedHsBinds = anyBag (isUnliftedHsBind . unLoc)++is_unlifted_id :: Id -> Bool+is_unlifted_id id = isUnliftedType (idType id)+ -- Bindings always have a fixed RuntimeRep, so it's OK+ -- to call isUnliftedType here+ -- | Is a binding a strict variable or pattern bind (e.g. @!x = ...@)? isBangedHsBind :: HsBind GhcTc -> Bool isBangedHsBind (XHsBindsLR (AbsBinds { abs_binds = binds }))@@ -1211,7 +1272,7 @@ AbsBinds { abs_exports = dbinds } -> (map abe_poly dbinds ++) -- I don't think we want the binders from the abe_binds - -- binding (hence see AbsBinds) is in zonking in GHC.Tc.Utils.Zonk+ -- binding (hence see AbsBinds) is in zonking in GHC.Tc.Zonk.Type collectXSplicePat flag ext = case ghcPass @p of@@ -1305,17 +1366,31 @@ hsTyClForeignBinders tycl_decls foreign_decls = map unLoc (hsForeignDeclsBinders foreign_decls) ++ getSelectorNames- (foldMap (foldMap hsLTyClDeclBinders . group_tyclds) tycl_decls+ (foldMap (foldMap (tyDeclBinders . hsLTyClDeclBinders) . group_tyclds) tycl_decls `mappend`- foldMap (foldMap hsLInstDeclBinders . group_instds) tycl_decls)+ (foldMap (foldMap hsLInstDeclBinders . group_instds) tycl_decls)) where getSelectorNames :: ([LocatedA Name], [LFieldOcc GhcRn]) -> [Name] getSelectorNames (ns, fs) = map unLoc ns ++ map (foExt . unLoc) fs --------------------hsLTyClDeclBinders :: IsPass p++data TyDeclBinders p+ = TyDeclBinders+ { tyDeclMainBinder :: !(LocatedA (IdP (GhcPass p)), TyConFlavour ())+ , tyDeclATs :: ![(LocatedA (IdP (GhcPass p)), TyConFlavour ())]+ , tyDeclOpSigs :: ![LocatedA (IdP (GhcPass p))]+ , tyDeclConsWithFields :: !(LConsWithFields p) }++tyDeclBinders :: TyDeclBinders p -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])+tyDeclBinders (TyDeclBinders main ats sigs consWithFields)+ = (fst main : (fmap fst ats ++ sigs ++ cons), flds)+ where+ (cons, flds) = lconsWithFieldsBinders consWithFields++hsLTyClDeclBinders :: (IsPass p, OutputableBndrId p) => LocatedA (TyClDecl (GhcPass p))- -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])+ -> TyDeclBinders p -- ^ Returns all the /binding/ names of the decl. The first one is -- guaranteed to be the name of the decl. The first component -- represents all binding names except record fields; the second@@ -1326,27 +1401,40 @@ -- See Note [SrcSpan for binders] hsLTyClDeclBinders (L loc (FamDecl { tcdFam = FamilyDecl- { fdLName = (L _ name) } }))- = ([L loc name], [])+ { fdLName = (L _ name)+ , fdInfo = fd_info } }))+ = TyDeclBinders+ { tyDeclMainBinder = (L loc name, familyInfoTyConFlavour Nothing fd_info)+ , tyDeclATs = [], tyDeclOpSigs = []+ , tyDeclConsWithFields = emptyLConsWithFields } hsLTyClDeclBinders (L loc (SynDecl { tcdLName = (L _ name) }))- = ([L loc name], [])+ = TyDeclBinders+ { tyDeclMainBinder = (L loc name, TypeSynonymFlavour)+ , tyDeclATs = [], tyDeclOpSigs = []+ , tyDeclConsWithFields = emptyLConsWithFields } 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 ]- , [])+ = TyDeclBinders+ { tyDeclMainBinder = (L loc cls_name, ClassFlavour)+ , tyDeclATs = [ (L fam_loc fam_name, familyInfoTyConFlavour (Just ()) fd_info)+ | (L fam_loc (FamilyDecl { fdLName = L _ fam_name+ , fdInfo = fd_info })) <- ats ]+ , tyDeclOpSigs = [ L mem_loc mem_name+ | (L mem_loc (ClassOpSig _ False ns _)) <- sigs+ , (L _ mem_name) <- ns ]+ , tyDeclConsWithFields = emptyLConsWithFields } hsLTyClDeclBinders (L loc (DataDecl { tcdLName = (L _ name) , tcdDataDefn = defn }))- = (\ (xs, ys) -> (L loc name : xs, ys)) $ hsDataDefnBinders defn-+ = TyDeclBinders+ { tyDeclMainBinder = (L loc name, flav )+ , tyDeclATs = []+ , tyDeclOpSigs = []+ , tyDeclConsWithFields = hsDataDefnBinders defn }+ where+ flav = newOrDataToFlavour $ dataDefnConsNewOrData $ dd_cons defn ------------------- hsForeignDeclsBinders :: forall p a. (UnXRec (GhcPass p), IsSrcSpanAnn p a)@@ -1379,94 +1467,170 @@ , (unXRec @id -> (PatSynBind _ psb)) <- bagToList lbinds ] --------------------hsLInstDeclBinders :: IsPass p+hsLInstDeclBinders :: (IsPass p, OutputableBndrId p) => LInstDecl (GhcPass p)- -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])+ -> ([(LocatedA (IdP (GhcPass p)))], [LFieldOcc (GhcPass p)]) hsLInstDeclBinders (L _ (ClsInstD { cid_inst = ClsInstDecl { cid_datafam_insts = dfis }}))- = foldMap (hsDataFamInstBinders . unLoc) dfis+ = foldMap (lconsWithFieldsBinders . hsDataFamInstBinders . unLoc) dfis hsLInstDeclBinders (L _ (DataFamInstD { dfid_inst = fi }))- = hsDataFamInstBinders fi+ = lconsWithFieldsBinders $ hsDataFamInstBinders fi hsLInstDeclBinders (L _ (TyFamInstD {})) = mempty ------------------- -- | the 'SrcLoc' returned are for the whole declarations, not just the names-hsDataFamInstBinders :: IsPass p+hsDataFamInstBinders :: (IsPass p, OutputableBndrId p) => DataFamInstDecl (GhcPass p)- -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])+ -> LConsWithFields p hsDataFamInstBinders (DataFamInstDecl { dfid_eqn = FamEqn { feqn_rhs = defn }}) = hsDataDefnBinders defn -- There can't be repeated symbols because only data instances have binders ------------------- -- | the 'SrcLoc' returned are for the whole declarations, not just the names-hsDataDefnBinders :: IsPass p+hsDataDefnBinders :: (IsPass p, OutputableBndrId p) => HsDataDefn (GhcPass p)- -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])+ -> LConsWithFields p hsDataDefnBinders (HsDataDefn { dd_cons = cons }) = hsConDeclsBinders (toList cons) -- See Note [Binders in family instances] --------------------type Seen p = [LFieldOcc (GhcPass p)] -> [LFieldOcc (GhcPass p)]- -- Filters out ones that have already been seen -hsConDeclsBinders :: forall p. IsPass p+{- Note [Collecting record fields in data declarations]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When renaming a data declaration that includes record constructors, we are, in+the end, going to to create a mapping from constructor to its field labels,+to store in 'GREInfo' (see 'IAmConLike'). This allows us to know, in the renamer,+which constructor has what fields.++In order to achieve this, we return the constructor and field information from+hsConDeclsBinders in the following format:++ - [(ConRdrName, [Located Int])], a list of the constructors, each associated+ with its record fields, in the form of a list of Int indices into...+ - IntMap FieldOcc, an IntMap of record fields.++(In actual fact, we use [(ConRdrName, Maybe [Located Int])], with Nothing indicating+that the constructor has unlabelled fields: see Note [Local constructor info in the renamer]+in GHC.Types.GREInfo.)++This allows us to do the following (see GHC.Rename.Names.getLocalNonValBinders.new_tc):++ - create 'Name's for each of the record fields, to get IntMap FieldLabel,+ - create 'Name's for each of the constructors, to get [(ConName, [Int])],+ - look up the FieldLabels of each constructor, to get [(ConName, [FieldLabel])].++NB: This can be a bit tricky to get right in the presence of data types with+duplicate constructors or fields. Storing locations allows us to report an error+for duplicate field declarations, see test cases T9156 T9156_DF.+Other relevant test cases: rnfail015.++-}++-- | A mapping from constructors to all of their fields.+--+-- See Note [Collecting record fields in data declarations].+data LConsWithFields p =+ LConsWithFields+ { consWithFieldIndices :: [(LocatedA (IdP (GhcPass p)), Maybe [Located Int])]+ , consFields :: IntMap (LFieldOcc (GhcPass p))+ }++lconsWithFieldsBinders :: LConsWithFields p+ -> ([(LocatedA (IdP (GhcPass p)))], [LFieldOcc (GhcPass p)])+lconsWithFieldsBinders (LConsWithFields cons fields)+ = (map fst cons, IntMap.elems fields)++emptyLConsWithFields :: LConsWithFields p+emptyLConsWithFields = LConsWithFields [] IntMap.empty++hsConDeclsBinders :: forall p. (IsPass p, OutputableBndrId p) => [LConDecl (GhcPass p)]- -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])- -- See hsLTyClDeclBinders for what this does- -- The function is boringly complicated because of the records- -- And since we only have equality, we have to be a little careful-hsConDeclsBinders cons- = go id cons+ -> LConsWithFields p+ -- 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 emptyFieldIndices cons where- go :: Seen p -> [LConDecl (GhcPass p)]- -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])- go _ [] = ([], [])- go remSeen (r:rs)+ go :: FieldIndices p -> [LConDecl (GhcPass p)] -> LConsWithFields p+ go seen [] = LConsWithFields [] (fields seen)+ go seen (r:rs) -- Don't re-mangle the location of field names, because we don't -- have a record of the full location of the field declaration anyway = let loc = getLoc r in case unLoc r of- -- remove only the first occurrence of any seen field in order to- -- avoid circumventing detection of duplicate fields (#9156) ConDeclGADT { con_names = names, con_g_args = args }- -> (toList (L loc . unLoc <$> names) ++ ns, flds ++ fs)+ -> LConsWithFields (cons ++ ns) fs where- (remSeen', flds) = get_flds_gadt remSeen args- (ns, fs) = go remSeen' rs+ cons = map ( , con_flds ) $ toList (L loc . unLoc <$> names)+ (con_flds, seen') = get_flds_gadt seen args+ LConsWithFields ns fs = go seen' rs ConDeclH98 { con_name = name, con_args = args }- -> ([L loc (unLoc name)] ++ ns, flds ++ fs)+ -> LConsWithFields ([(L loc (unLoc name), con_flds)] ++ ns) fs where- (remSeen', flds) = get_flds_h98 remSeen args- (ns, fs) = go remSeen' rs+ (con_flds, seen') = get_flds_h98 seen args+ LConsWithFields ns fs = go seen' rs - get_flds_h98 :: Seen p -> HsConDeclH98Details (GhcPass p)- -> (Seen p, [LFieldOcc (GhcPass p)])- get_flds_h98 remSeen (RecCon flds) = get_flds remSeen flds- get_flds_h98 remSeen _ = (remSeen, [])+ get_flds_h98 :: FieldIndices p -> HsConDeclH98Details (GhcPass p)+ -> (Maybe [Located Int], FieldIndices p)+ get_flds_h98 seen (RecCon flds) = first Just $ get_flds seen flds+ get_flds_h98 seen (PrefixCon _ []) = (Just [], seen)+ get_flds_h98 seen _ = (Nothing, seen) - get_flds_gadt :: Seen p -> HsConDeclGADTDetails (GhcPass p)- -> (Seen p, [LFieldOcc (GhcPass p)])- get_flds_gadt remSeen (RecConGADT flds _) = get_flds remSeen flds- get_flds_gadt remSeen _ = (remSeen, [])+ get_flds_gadt :: FieldIndices p -> HsConDeclGADTDetails (GhcPass p)+ -> (Maybe [Located Int], FieldIndices p)+ get_flds_gadt seen (RecConGADT flds _) = first Just $ get_flds seen flds+ get_flds_gadt seen (PrefixConGADT []) = (Just [], seen)+ get_flds_gadt seen _ = (Nothing, seen) - get_flds :: Seen p -> LocatedL [LConDeclField (GhcPass p)]- -> (Seen p, [LFieldOcc (GhcPass p)])- get_flds remSeen flds = (remSeen', fld_names)- where- fld_names = remSeen (concatMap (cd_fld_names . unLoc) (unLoc flds))- remSeen' = foldr (.) remSeen- [deleteBy ((==) `on` unLoc . foLabel . unLoc) v- | v <- fld_names]+ get_flds :: FieldIndices p -> LocatedL [LConDeclField (GhcPass p)]+ -> ([Located Int], FieldIndices p)+ get_flds seen flds =+ foldr add_fld ([], seen) fld_names+ where+ add_fld fld (is, ixs) =+ let (i, ixs') = insertField fld ixs+ in (i:is, ixs')+ fld_names = concatMap (cd_fld_names . unLoc) (unLoc flds) +-- | A bijection between record fields of a datatype and integers,+-- used to implement Note [Collecting record fields in data declarations].+data FieldIndices p =+ FieldIndices+ { fields :: IntMap (LFieldOcc (GhcPass p))+ -- ^ Look up a field from its index.+ , fieldIndices :: Map RdrName Int+ -- ^ Look up the index of a field label in the previous 'IntMap'.+ , newInt :: !Int+ -- ^ An integer @i@ such that no integer @i' >= i@ appears in the 'IntMap'.+ }++emptyFieldIndices :: FieldIndices p+emptyFieldIndices =+ FieldIndices { fields = IntMap.empty+ , fieldIndices = Map.empty+ , newInt = 0 }++insertField :: LFieldOcc (GhcPass p) -> FieldIndices p -> (Located Int, FieldIndices p)+insertField new_fld fi@(FieldIndices flds idxs new_idx)+ | Just i <- Map.lookup rdr idxs+ = (L loc i, fi)+ | otherwise+ = (L loc new_idx,+ FieldIndices (IntMap.insert new_idx new_fld flds)+ (Map.insert rdr new_idx idxs)+ (new_idx + 1))+ where+ loc = getLocA new_fld+ rdr = unLoc . foLabel . unLoc $ new_fld+ {- Note [SrcSpan for binders] ~~~~~~~~~~~~~~~~~~~~~~~~~~-When extracting the (Located RdrNme) for a binder, at least for the+When extracting the (Located RdrName) for a binder, at least for the main name (the TyCon of a type declaration etc), we want to give it the @SrcSpan@ of the whole /declaration/, not just the name itself (which is how it appears in the syntax tree). This SrcSpan (for the
GHC/HsToCore.hs view
@@ -18,7 +18,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Config import GHC.Driver.Config.Core.Lint ( endPassHscEnvIO ) import GHC.Driver.Config.HsToCore.Ticks@@ -167,7 +167,7 @@ [ (i, s) | i <- hsc_interp hsc_env , (_, s) <- m_tickInfo- , backendWantsBreakpointTicks (backend dflags)+ , breakpointsAllowed dflags ] $ \(interp, specs) -> mkModBreaks interp mod specs @@ -182,8 +182,8 @@ _ -> pure $ emptyHpcInfo other_hpc_info ; (msgs, mb_res) <- initDs hsc_env tcg_env $- do { ds_ev_binds <- dsEvBinds ev_binds- ; core_prs <- dsTopLHsBinds binds_cvr+ do { dsEvBinds ev_binds $ \ ds_ev_binds -> do+ { core_prs <- dsTopLHsBinds binds_cvr ; core_prs <- patchMagicDefns core_prs ; (spec_prs, spec_rules) <- dsImpSpecs imp_specs ; (ds_fords, foreign_prs) <- dsForeigns fords@@ -194,7 +194,7 @@ ; return ( ds_ev_binds , foreign_prs `appOL` core_prs `appOL` spec_prs , spec_rules ++ ds_rules- , ds_fords `appendStubC` hpc_init) }+ , ds_fords `appendStubC` hpc_init) } } ; case mb_res of { Nothing -> return (msgs, Nothing) ;@@ -764,7 +764,7 @@ unsafe_equality k a b = ( mkTyApps (Var unsafe_equality_proof_id) [k,b,a] , mkTyConApp unsafe_equality_tc [k,b,a]- , mkHeteroPrimEqPred k k a b+ , mkNomPrimEqPred k a b ) -- NB: UnsafeRefl :: (b ~# a) -> UnsafeEquality a b, so we have to -- carefully swap the arguments above
GHC/HsToCore/Arrows.hs view
@@ -158,9 +158,9 @@ -- = case v of v { (x1, .., xn) -> body } -- But the matching may be nested if the tuple is very big -coreCaseTuple :: UniqSupply -> Id -> [Id] -> CoreExpr -> CoreExpr-coreCaseTuple uniqs scrut_var vars body- = mkBigTupleCase uniqs vars body (Var scrut_var)+coreCaseTuple :: Id -> [Id] -> CoreExpr -> DsM CoreExpr+coreCaseTuple scrut_var vars body+ = mkBigTupleCase vars body (Var scrut_var) coreCasePair :: Id -> Id -> Id -> CoreExpr -> CoreExpr coreCasePair scrut_var var1 var2 body@@ -231,9 +231,8 @@ -> CoreExpr -- e -> DsM CoreExpr matchEnvStack env_ids stack_id body = do- uniqs <- newUniqueSupply tup_var <- newSysLocalDs ManyTy (mkBigCoreVarTupTy env_ids)- let match_env = coreCaseTuple uniqs tup_var env_ids body+ match_env <- coreCaseTuple tup_var env_ids body pair_id <- newSysLocalDs ManyTy (mkCorePairTy (idType tup_var) (idType stack_id)) return (Lam pair_id (coreCasePair pair_id tup_var stack_id match_env)) @@ -250,9 +249,9 @@ -> CoreExpr -- e -> DsM CoreExpr matchEnv env_ids body = do- uniqs <- newUniqueSupply tup_id <- newSysLocalDs ManyTy (mkBigCoreVarTupTy env_ids)- return (Lam tup_id (coreCaseTuple uniqs tup_id env_ids body))+ tup_case <- coreCaseTuple tup_id env_ids body+ return (Lam tup_id tup_case) ---------------------------------------------- -- matchVarStack@@ -511,7 +510,7 @@ let MG{ mg_ext = MatchGroupTc _ sum_ty _ } = match' in_ty = envStackType env_ids stack_ty - core_body <- dsExpr (HsCase noExtField exp match')+ core_body <- dsExpr (HsCase (ArrowMatchCtxt ArrowCaseAlt) exp match') core_matches <- matchEnvStack env_ids stack_id core_body return (do_premap ids in_ty sum_ty res_ty core_matches core_choices,@@ -644,10 +643,10 @@ dsCmd ids local_vars stack_ty res_ty (XCmd (HsWrap 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')+ dsHsWrapper wrap $ \core_wrap ->+ return (core_wrap core_cmd, env_ids') -dsCmd _ _ _ _ c _ = pprPanic "dsCmd" (ppr c)+dsCmd _ _ _ _ c@(HsCmdLam {}) _ = pprPanic "dsCmd" (ppr c) -- D; ys |-a c : stk --> t (ys <= xs) -- ---------------------@@ -812,7 +811,7 @@ Nothing -> ([], void_ty,) . do_arr ids void_ty res_ty <$> dsExpr (HsLamCase EpAnnNotUsed LamCase (MG { mg_alts = noLocA []- , mg_ext = MatchGroupTc [Scaled ManyTy void_ty] res_ty Generated+ , mg_ext = MatchGroupTc [Scaled ManyTy void_ty] res_ty (Generated SkipPmc) })) -- Replace the commands in the case with these tagged tuples,@@ -957,11 +956,10 @@ -- \ (p, (xs2)) -> (zs) env_id <- newSysLocalDs ManyTy env_ty2- uniqs <- newUniqueSupply let after_c_ty = mkCorePairTy pat_ty env_ty2 out_ty = mkBigCoreVarTupTy out_ids- body_expr = coreCaseTuple uniqs env_id env_ids2 (mkBigCoreVarTup out_ids)+ body_expr <- coreCaseTuple env_id env_ids2 (mkBigCoreVarTup out_ids) fail_expr <- mkFailExpr (StmtCtxt (HsDoStmt (DoExpr Nothing))) out_ty pat_id <- selectSimpleMatchVarL ManyTy pat@@ -1029,12 +1027,11 @@ -- post_loop_fn = \((later_ids),(env2_ids)) -> (out_ids) - uniqs <- newUniqueSupply env2_id <- newSysLocalDs ManyTy env2_ty let later_ty = mkBigCoreVarTupTy later_ids post_pair_ty = mkCorePairTy later_ty env2_ty- post_loop_body = coreCaseTuple uniqs env2_id env2_ids (mkBigCoreVarTup out_ids)+ post_loop_body <- coreCaseTuple env2_id env2_ids (mkBigCoreVarTup out_ids) post_loop_fn <- matchEnvStack later_ids env2_id post_loop_body @@ -1194,7 +1191,7 @@ -- Match a list of expressions against a list of patterns, left-to-right. matchSimplys :: [CoreExpr] -- Scrutinees- -> HsMatchContext GhcRn -- Match kind+ -> HsMatchContext GhcTc -- Match kind -> [LPat GhcTc] -- Patterns they should match -> CoreExpr -- Return this if they all match -> CoreExpr -- Return this if they don't
GHC/HsToCore/Binds.hs view
@@ -16,14 +16,14 @@ module GHC.HsToCore.Binds ( dsTopLHsBinds, dsLHsBinds, decomposeRuleLhs, dsSpec- , dsHsWrapper, dsEvTerm, dsTcEvBinds, dsTcEvBinds_s, dsEvBinds+ , dsHsWrapper, dsHsWrappers, dsEvTerm, dsTcEvBinds, dsTcEvBinds_s, dsEvBinds , dsWarnOrphanRule ) where import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Config import qualified GHC.LanguageExtensions as LangExt import GHC.Unit.Module@@ -41,6 +41,7 @@ import GHC.Core -- lots of things import GHC.Core.SimpleOpt ( simpleOptExpr ) import GHC.Core.Opt.OccurAnal ( occurAnalyseExpr )+import GHC.Core.InstEnv ( Canonical ) import GHC.Core.Make import GHC.Core.Utils import GHC.Core.Opt.Arity ( etaExpand )@@ -60,6 +61,7 @@ import GHC.Tc.Types.Evidence import GHC.Types.Id+import GHC.Types.Id.Make ( nospecId ) import GHC.Types.Name import GHC.Types.Var.Set import GHC.Types.Var.Env@@ -72,6 +74,7 @@ import GHC.Data.OrdList import GHC.Data.Graph.Directed import GHC.Data.Bag+import qualified Data.Set as S import GHC.Utils.Constants (debugIsOn) import GHC.Utils.Misc@@ -153,7 +156,8 @@ , fun_matches = matches , fun_ext = (co_fn, tick) })- = do { (args, body) <- addTyCs FromSource (hsWrapDictBinders co_fn) $+ = do { dsHsWrapper co_fn $ \core_wrap -> do+ { (args, body) <- addTyCs FromSource (hsWrapDictBinders co_fn) $ -- FromSource might not be accurate (we don't have any -- origin annotations for things in this module), but at -- worst we do superfluous calls to the pattern match@@ -163,7 +167,6 @@ -- See Note [Long-distance information] in "GHC.HsToCore.Pmc" matchWrapper (mkPrefixFunRhs (L loc (idName fun))) Nothing matches - ; core_wrap <- dsHsWrapper co_fn ; let body' = mkOptTickBox tick body rhs = core_wrap (mkLams args body') core_binds@(id,_) = makeCorePair dflags fun False 0 rhs@@ -179,7 +182,7 @@ ; --pprTrace "dsHsBind" (vcat [ ppr fun <+> ppr (idInlinePragma fun) -- , ppr (mg_alts matches) -- , ppr args, ppr core_binds, ppr body']) $- return (force_var, [core_binds]) }+ return (force_var, [core_binds]) } } dsHsBind dflags (PatBind { pat_lhs = pat, pat_rhs = grhss , pat_ext = (ty, (rhs_tick, var_ticks))@@ -208,10 +211,10 @@ -- for inner pattern match check -- See Check, Note [Long-distance information] - ; ds_ev_binds <- dsTcEvBinds_s ev_binds+ ; dsTcEvBinds_s ev_binds $ \ds_ev_binds -> do -- dsAbsBinds does the hard work- ; dsAbsBinds dflags tyvars dicts exports ds_ev_binds ds_binds has_sig }+ { dsAbsBinds dflags tyvars dicts exports ds_ev_binds ds_binds has_sig } } dsHsBind _ (PatSynBind{}) = panic "dsHsBind: PatSynBind" @@ -241,9 +244,8 @@ _ -> Nothing -- If there is a variable to force, it's just the -- single variable we are binding here- = do { core_wrap <- dsHsWrapper wrap -- Usually the identity-- ; let rhs = core_wrap $+ = do { dsHsWrapper wrap $ \core_wrap -> do -- Usually the identity+ { let rhs = core_wrap $ mkLams tyvars $ mkLams dicts $ mkCoreLets ds_ev_binds $ body@@ -261,7 +263,7 @@ (isDefaultMethod prags) (dictArity dicts) rhs - ; return (force_vars', main_bind : fromOL spec_binds) }+ ; return (force_vars', main_bind : fromOL spec_binds) } } -- Another common case: no tyvars, no dicts -- In this case we can have a much simpler desugaring@@ -273,9 +275,9 @@ , abe_wrap = wrap }) -- No SpecPrags (no dicts) -- Can't be a default method (default methods are singletons)- = do { core_wrap <- dsHsWrapper wrap- ; return ( gbl_id `setInlinePragma` defaultInlinePragma- , core_wrap (Var lcl_id)) }+ = do { dsHsWrapper wrap $ \core_wrap -> do+ { return ( gbl_id `setInlinePragma` defaultInlinePragma+ , core_wrap (Var lcl_id)) } } ; main_prs <- mapM mk_main exports ; return (force_vars, flattenBinds ds_ev_binds@@ -307,10 +309,10 @@ ; let mk_bind (ABE { abe_wrap = wrap , abe_poly = global , abe_mono = local, abe_prags = spec_prags })- -- See Note [AbsBinds wrappers] in "GHC.Hs.Binds"+ -- See Note [ABExport wrapper] in "GHC.Hs.Binds" = do { tup_id <- newSysLocalDs ManyTy tup_ty- ; core_wrap <- dsHsWrapper wrap- ; let rhs = core_wrap $ mkLams tyvars $ mkLams dicts $+ ; dsHsWrapper wrap $ \core_wrap -> do+ { let rhs = core_wrap $ mkLams tyvars $ mkLams dicts $ mkBigTupleSelector all_locals local tup_id $ mkVarApps (Var poly_tup_id) (tyvars ++ dicts) rhs_for_spec = Let (NonRec poly_tup_id poly_tup_rhs) rhs@@ -320,7 +322,7 @@ -- Kill the INLINE pragma because it applies to -- the user written (local) function. The global -- Id is just the selector. Hmm.- ; return ((global', rhs) : fromOL spec_binds) }+ ; return ((global', rhs) : fromOL spec_binds) } } ; export_binds_s <- mapM mk_bind (exports ++ extra_exports) @@ -698,9 +700,9 @@ -- perhaps with the body of the lambda wrapped in some WpLets -- E.g. /\a \(d:Eq a). let d2 = $df d in [] (Maybe a) d2 - ; core_app <- dsHsWrapper spec_app+ ; dsHsWrapper spec_app $ \core_app -> do - ; let ds_lhs = core_app (Var poly_id)+ { let ds_lhs = core_app (Var poly_id) spec_ty = mkLamTypes spec_bndrs (exprType ds_lhs) ; -- pprTrace "dsRule" (vcat [ text "Id:" <+> ppr poly_id -- , text "spec_co:" <+> ppr spec_co@@ -729,7 +731,7 @@ -- NB: do *not* use makeCorePair on (spec_id,spec_rhs), because -- makeCorePair overwrites the unfolding, which we have -- just created using specUnfolding- } } }+ } } } } where is_local_id = isJust mb_poly_rhs poly_rhs | Just rhs <- mb_poly_rhs@@ -847,16 +849,7 @@ = Left (DsRuleIgnoredDueToConstructor con) -- See Note [No RULES on datacons] | otherwise = case decompose fun2 args2 of- Nothing -> -- pprTrace "decomposeRuleLhs 3" (vcat [ text "orig_bndrs:" <+> ppr orig_bndrs- -- , text "orig_lhs:" <+> ppr orig_lhs- -- , text "rhs_fvs:" <+> ppr rhs_fvs- -- , text "orig_lhs:" <+> ppr orig_lhs- -- , text "lhs1:" <+> ppr lhs1- -- , text "lhs2:" <+> ppr lhs2- -- , text "fun2:" <+> ppr fun2- -- , text "args2:" <+> ppr args2- -- ]) $- Left (DsRuleLhsTooComplicated orig_lhs lhs2)+ Nothing -> Left (DsRuleLhsTooComplicated orig_lhs lhs2) Just (fn_id, args) | not (null unbound) -> -- Check for things unbound on LHS@@ -928,9 +921,7 @@ split_lets :: CoreExpr -> ([(DictId,CoreExpr)], CoreExpr) split_lets (Let (NonRec d r) body)- | isDictId d -- Catches dictionaries, yes, but also catches dictionary- -- /functions/ arising from solving a- -- quantified contraint (#24370)+ | isDictId d = ((d,r):bs, body') where (bs, body') = split_lets body @@ -991,9 +982,9 @@ {-# RULES "myrule" foo C = 1 #-} After type checking the LHS becomes (foo alpha (C alpha)), where alpha-is an unbound meta-tyvar. The zonker in GHC.Tc.Utils.Zonk is careful not to+is an unbound meta-tyvar. The zonker in GHC.Tc.Zonk.Type is careful not to turn the free alpha into Any (as it usually does). Instead it turns it-into a TyVar 'a'. See Note [Zonking the LHS of a RULE] in "GHC.Tc.Utils.Zonk".+into a TyVar 'a'. See Note [Zonking the LHS of a RULE] in "GHC.Tc.Zonk.Type". Now we must quantify over that 'a'. It's /really/ inconvenient to do that in the zonker, because the HsExpr data type is very large. But it's /easy/@@ -1161,75 +1152,161 @@ This question arose when thinking about deep subsumption; see https://github.com/ghc-proposals/ghc-proposals/pull/287#issuecomment-1125419649).++Note [Desugaring non-canonical evidence]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If the evidence is canonical, we desugar WpEvApp by simply passing+core_tm directly to k:++ k core_tm++If the evidence is not canonical, we mark the application with nospec:++ nospec @(cls => a) k core_tm++where nospec :: forall a. a -> a ensures that the typeclass specialiser+doesn't attempt to common up this evidence term with other evidence terms+of the same type (see Note [nospecId magic] in GHC.Types.Id.Make).++See Note [Coherence and specialisation: overview] for why we shouldn't+specialise incoherent evidence.++We can find out if a given evidence is canonical or not during the+desugaring of its WpLet wrapper: an evidence is non-canonical if its+own resolution was incoherent (see Note [Incoherent instances]), or+if its definition refers to other non-canonical evidence. dsEvBinds is+the convenient place to compute this, since it already needs to do+inter-evidence dependency analysis to generate well-scoped+bindings. We then record this specialisability information in the+dsl_unspecables field of DsM's local environment.+ -} -dsHsWrapper :: HsWrapper -> DsM (CoreExpr -> CoreExpr)-dsHsWrapper WpHole = return $ \e -> e-dsHsWrapper (WpTyApp ty) = return $ \e -> App e (Type ty)-dsHsWrapper (WpEvLam ev) = return $ Lam ev-dsHsWrapper (WpTyLam tv) = return $ Lam tv-dsHsWrapper (WpLet ev_binds) = do { bs <- dsTcEvBinds ev_binds- ; return (mkCoreLets bs) }-dsHsWrapper (WpCompose c1 c2) = do { w1 <- dsHsWrapper c1- ; w2 <- dsHsWrapper c2- ; return (w1 . w2) }-dsHsWrapper (WpFun c1 c2 (Scaled w t1)) -- See Note [Desugaring WpFun]- = do { x <- newSysLocalDs w t1- ; w1 <- dsHsWrapper c1- ; w2 <- dsHsWrapper c2- ; let app f a = mkCoreAppDs (text "dsHsWrapper") f a- arg = w1 (Var x)- ; return (\e -> (Lam x (w2 (app e arg)))) }-dsHsWrapper (WpCast co) = assert (coercionRole co == Representational) $- return $ \e -> mkCastDs e co-dsHsWrapper (WpEvApp tm) = do { core_tm <- dsEvTerm tm- ; return (\e -> App e core_tm) }+dsHsWrapper :: HsWrapper -> ((CoreExpr -> CoreExpr) -> DsM a) -> DsM a+dsHsWrapper WpHole k = k $ \e -> e+dsHsWrapper (WpTyApp ty) k = k $ \e -> App e (Type ty)+dsHsWrapper (WpEvLam ev) k = k $ Lam ev+dsHsWrapper (WpTyLam tv) k = k $ Lam tv+dsHsWrapper (WpLet ev_binds) k = do { dsTcEvBinds ev_binds $ \bs -> do+ { k (mkCoreLets bs) } }+dsHsWrapper (WpCompose c1 c2) k = do { dsHsWrapper c1 $ \w1 -> do+ { dsHsWrapper c2 $ \w2 -> do+ { k (w1 . w2) } } }+dsHsWrapper (WpFun c1 c2 (Scaled w t1)) k -- See Note [Desugaring WpFun]+ = do { x <- newSysLocalDs w t1+ ; dsHsWrapper c1 $ \w1 -> do+ { dsHsWrapper c2 $ \w2 -> do+ { let app f a = mkCoreAppDs (text "dsHsWrapper") f a+ arg = w1 (Var x)+ ; k (\e -> (Lam x (w2 (app e arg)))) } } }+dsHsWrapper (WpCast co) k = assert (coercionRole co == Representational) $+ k $ \e -> mkCastDs e co+dsHsWrapper (WpEvApp tm) k = do { core_tm <- dsEvTerm tm+ ; unspecables <- getUnspecables+ ; let vs = exprFreeVarsList core_tm+ is_unspecable_var v = v `S.member` unspecables+ is_specable = not $ any (is_unspecable_var) vs -- See Note [Desugaring non-canonical evidence]+ ; k (\e -> app_ev is_specable e core_tm) } -- See Note [Wrapper returned from tcSubMult] in GHC.Tc.Utils.Unify.-dsHsWrapper (WpMultCoercion co) = do { when (not (isReflexiveCo co)) $- diagnosticDs DsMultiplicityCoercionsNotSupported- ; return $ \e -> e }+dsHsWrapper (WpMultCoercion co) k = do { unless (isReflexiveCo co) $+ diagnosticDs DsMultiplicityCoercionsNotSupported+ ; k $ \e -> e }++-- We are about to construct an evidence application `f dict`. If the dictionary is+-- non-specialisable, instead construct+-- nospec f dict+-- See Note [nospecId magic] in GHC.Types.Id.Make for what `nospec` does.+app_ev :: Bool -> CoreExpr -> CoreExpr -> CoreExpr+app_ev is_specable k core_tm+ | not is_specable+ = Var nospecId `App` Type (exprType k) `App` k `App` core_tm++ | otherwise+ = k `App` core_tm++dsHsWrappers :: [HsWrapper] -> ([CoreExpr -> CoreExpr] -> DsM a) -> DsM a+dsHsWrappers (wp:wps) k = dsHsWrapper wp $ \wrap -> dsHsWrappers wps $ \wraps -> k (wrap:wraps)+dsHsWrappers [] k = k []+ ---------------------------------------dsTcEvBinds_s :: [TcEvBinds] -> DsM [CoreBind]-dsTcEvBinds_s [] = return []-dsTcEvBinds_s (b:rest) = assert (null rest) $ -- Zonker ensures null- dsTcEvBinds b+dsTcEvBinds_s :: [TcEvBinds] -> ([CoreBind] -> DsM a) -> DsM a+dsTcEvBinds_s [] k = k []+dsTcEvBinds_s (b:rest) k = assert (null rest) $ -- Zonker ensures null+ dsTcEvBinds b k -dsTcEvBinds :: TcEvBinds -> DsM [CoreBind]+dsTcEvBinds :: TcEvBinds -> ([CoreBind] -> DsM a) -> DsM a dsTcEvBinds (TcEvBinds {}) = panic "dsEvBinds" -- Zonker has got rid of this dsTcEvBinds (EvBinds bs) = dsEvBinds bs -dsEvBinds :: Bag EvBind -> DsM [CoreBind]-dsEvBinds bs- = do { ds_bs <- mapBagM dsEvBind bs- ; return (mk_ev_binds ds_bs) }+-- * Desugars the ev_binds, sorts them into dependency order, and+-- passes the resulting [CoreBind] to thing_inside+-- * Extends the DsM (dsl_unspecable field) with specialisability information+-- for each binder in ev_binds, before invoking thing_inside+dsEvBinds :: Bag EvBind -> ([CoreBind] -> DsM a) -> DsM a+dsEvBinds ev_binds thing_inside+ = do { ds_binds <- mapBagM dsEvBind ev_binds+ ; let comps = sort_ev_binds ds_binds+ ; go comps thing_inside }+ where+ go ::[SCC (Node EvVar (Canonical, CoreExpr))] -> ([CoreBind] -> DsM a) -> DsM a+ go (comp:comps) thing_inside+ = do { unspecables <- getUnspecables+ ; let (core_bind, new_unspecables) = ds_component unspecables comp+ ; addUnspecables new_unspecables $ go comps $ \ core_binds -> thing_inside (core_bind:core_binds) }+ go [] thing_inside = thing_inside [] -mk_ev_binds :: Bag (Id,CoreExpr) -> [CoreBind]+ ds_component unspecables (AcyclicSCC node) = (NonRec v rhs, new_unspecables)+ where+ ((v, rhs), (this_canonical, deps)) = unpack_node node+ transitively_unspecable = not this_canonical || any is_unspecable deps+ is_unspecable dep = dep `S.member` unspecables+ new_unspecables+ | transitively_unspecable = S.singleton v+ | otherwise = mempty+ ds_component unspecables (CyclicSCC nodes) = (Rec pairs, new_unspecables)+ where+ (pairs, direct_canonicity) = unzip $ map unpack_node nodes++ is_unspecable_remote dep = dep `S.member` unspecables+ transitively_unspecable = or [ not this_canonical || any is_unspecable_remote deps | (this_canonical, deps) <- direct_canonicity ]+ -- Bindings from a given SCC are transitively specialisable if+ -- all are specialisable and all their remote dependencies are+ -- also specialisable; see Note [Desugaring non-canonical evidence]++ new_unspecables+ | transitively_unspecable = S.fromList [ v | (v, _) <- pairs]+ | otherwise = mempty++ unpack_node DigraphNode { node_key = v, node_payload = (canonical, rhs), node_dependencies = deps } = ((v, rhs), (canonical, deps))++sort_ev_binds :: Bag (Id, Canonical, CoreExpr) -> [SCC (Node EvVar (Canonical, CoreExpr))] -- We do SCC analysis of the evidence bindings, /after/ desugaring -- them. This is convenient: it means we can use the GHC.Core -- free-variable functions rather than having to do accurate free vars -- for EvTerm.-mk_ev_binds ds_binds- = map ds_scc (stronglyConnCompFromEdgedVerticesUniq edges)+sort_ev_binds ds_binds = stronglyConnCompFromEdgedVerticesUniqR edges where- edges :: [ Node EvVar (EvVar,CoreExpr) ]+ edges :: [ Node EvVar (Canonical, CoreExpr) ] edges = foldr ((:) . mk_node) [] ds_binds - mk_node :: (Id, CoreExpr) -> Node EvVar (EvVar,CoreExpr)- mk_node b@(var, rhs)- = DigraphNode { node_payload = b+ mk_node :: (Id, Canonical, CoreExpr) -> Node EvVar (Canonical, CoreExpr)+ mk_node (var, canonical, rhs)+ = DigraphNode { node_payload = (canonical, rhs) , node_key = var , node_dependencies = nonDetEltsUniqSet $ exprFreeVars rhs `unionVarSet` coVarsOfType (varType var) }- -- It's OK to use nonDetEltsUniqSet here as stronglyConnCompFromEdgedVertices+ -- It's OK to use nonDetEltsUniqSet here as graphFromEdgedVerticesUniq -- is still deterministic even if the edges are in nondeterministic order -- as explained in Note [Deterministic SCC] in GHC.Data.Graph.Directed. - 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)+dsEvBind :: EvBind -> DsM (Id, Canonical, CoreExpr)+dsEvBind (EvBind { eb_lhs = v, eb_rhs = r, eb_info = info }) = do+ e <- dsEvTerm r+ let canonical = case info of+ EvBindGiven{} -> True+ EvBindWanted{ ebi_canonical = canonical } -> canonical+ return (v, canonical, e) {-**********************************************************************@@ -1243,10 +1320,10 @@ 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) $+ = do { dsTcEvBinds ev_binds $ \ds_ev_binds -> do+ { return $ (mkLams (tvs ++ given) $ mkCoreLets ds_ev_binds $- Var wanted_id) }+ Var wanted_id) } } {-**********************************************************************@@ -1333,7 +1410,7 @@ } ds_ev_typeable ty (EvTypeableTyLit ev)- = -- See Note [Typeable for Nat and Symbol] in GHC.Tc.Solver.Interact+ = -- See Note [Typeable for Nat and Symbol] in GHC.Tc.Instance.Class do { fun <- dsLookupGlobalId tr_fun ; dict <- dsEvTerm ev -- Of type KnownNat/KnownSymbol ; return (mkApps (mkTyApps (Var fun) [ty]) [ dict ]) }
GHC/HsToCore/Binds.hs-boot view
@@ -3,4 +3,4 @@ import GHC.Core ( CoreExpr ) import GHC.Tc.Types.Evidence (HsWrapper) -dsHsWrapper :: HsWrapper -> DsM (CoreExpr -> CoreExpr)+dsHsWrapper :: HsWrapper -> ((CoreExpr -> CoreExpr) -> DsM a) -> DsM a
GHC/HsToCore/Breakpoints.hs view
@@ -27,18 +27,16 @@ breakArray <- GHCi.newBreakArray interp count ccs <- mkCCSArray interp mod count entries- mod_ptr <- GHCi.newModuleName interp (moduleName mod) let locsTicks = listArray (0,count-1) [ tick_loc t | t <- entries ] varsTicks = listArray (0,count-1) [ tick_ids t | t <- entries ] declsTicks = listArray (0,count-1) [ tick_path t | t <- entries ] return $ emptyModBreaks- { modBreaks_flags = breakArray- , modBreaks_locs = locsTicks- , modBreaks_vars = varsTicks- , modBreaks_decls = declsTicks- , modBreaks_ccs = ccs- , modBreaks_module = mod_ptr+ { modBreaks_flags = breakArray+ , modBreaks_locs = locsTicks+ , modBreaks_vars = varsTicks+ , modBreaks_decls = declsTicks+ , modBreaks_ccs = ccs } mkCCSArray
GHC/HsToCore/Docs.hs view
@@ -44,7 +44,7 @@ import qualified Data.List.NonEmpty as NonEmpty import Data.List.NonEmpty (NonEmpty ((:|))) import GHC.Unit.Module.Imported-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Types.TypeEnv import GHC.Types.Id import GHC.Types.Unique.Map@@ -192,7 +192,13 @@ Just loc -> L loc (DsiExports [avail]) -- FIXME: This is just a workaround that we use when handling e.g. -- associated data families like in the html-test Instances.hs.- Nothing -> noLoc (DsiExports [avail])+ Nothing -> noLoc (DsiExports [])++ -- This causes the associated data family to be incorrectly documented+ -- separately from its class:+ -- Nothing -> noLoc (DsiExports [avail])++ -- This panics on the associated data family: -- Nothing -> panicDoc "mkDocStructureFromDecls: No loc found for" -- (ppr avail)
GHC/HsToCore/Errors/Ppr.hs view
@@ -26,10 +26,9 @@ instance Diagnostic DsMessage where type DiagnosticOpts DsMessage = NoDiagnosticOpts- defaultDiagnosticOpts = NoDiagnosticOpts- diagnosticMessage _ = \case- DsUnknownMessage (UnknownDiagnostic @e m)- -> diagnosticMessage (defaultDiagnosticOpts @e) m+ diagnosticMessage opts = \case+ DsUnknownMessage (UnknownDiagnostic f m)+ -> diagnosticMessage (f opts) m DsEmptyEnumeration -> mkSimpleDecorated $ text "Enumeration is empty" DsIdentitiesFound conv_fn type_of_conv@@ -299,11 +298,11 @@ 2 (quotes (ppr elt_ty)) -- Print a single clause (for redundant/with-inaccessible-rhs)-pprEqn :: HsMatchContext GhcRn -> SDoc -> String -> SDoc+pprEqn :: HsMatchContext GhcTc -> SDoc -> String -> SDoc pprEqn ctx q txt = pprContext True ctx (text txt) $ \f -> f (q <+> matchSeparator ctx <+> text "...") -pprContext :: Bool -> HsMatchContext GhcRn -> SDoc -> ((SDoc -> SDoc) -> SDoc) -> SDoc+pprContext :: Bool -> HsMatchContext GhcTc -> SDoc -> ((SDoc -> SDoc) -> SDoc) -> SDoc pprContext singular kind msg rest_of_msg_fun = vcat [text txt <+> msg, sep [ text "In" <+> ppr_match <> char ':'
GHC/HsToCore/Errors/Types.hs view
@@ -9,7 +9,8 @@ import GHC.Core (CoreRule, CoreExpr, RuleName) import GHC.Core.DataCon import GHC.Core.Type-import GHC.Driver.Session+import GHC.Driver.DynFlags (DynFlags, xopt)+import GHC.Driver.Flags (WarningFlag) import GHC.Hs import GHC.HsToCore.Pmc.Solver.Types import GHC.Types.Basic (Activation)@@ -29,7 +30,7 @@ -- | Diagnostics messages emitted during desugaring. data DsMessage -- | Simply wraps a generic 'Diagnostic' message.- = DsUnknownMessage UnknownDiagnostic+ = DsUnknownMessage (UnknownDiagnostic (DiagnosticOpts DsMessage)) {-| DsEmptyEnumeration is a warning (controlled by the -Wempty-enumerations flag) that is emitted if an enumeration is empty.@@ -84,18 +85,18 @@ -- FIXME(adn) Use a proper type instead of 'SDoc', but unfortunately -- 'SrcInfo' gives us an 'SDoc' to begin with.- | DsRedundantBangPatterns !(HsMatchContext GhcRn) !SDoc+ | DsRedundantBangPatterns !(HsMatchContext GhcTc) !SDoc -- FIXME(adn) Use a proper type instead of 'SDoc', but unfortunately -- 'SrcInfo' gives us an 'SDoc' to begin with.- | DsOverlappingPatterns !(HsMatchContext GhcRn) !SDoc+ | DsOverlappingPatterns !(HsMatchContext GhcTc) !SDoc -- FIXME(adn) Use a proper type instead of 'SDoc'- | DsInaccessibleRhs !(HsMatchContext GhcRn) !SDoc+ | DsInaccessibleRhs !(HsMatchContext GhcTc) !SDoc | DsMaxPmCheckModelsReached !MaxPmCheckModels - | DsNonExhaustivePatterns !(HsMatchContext GhcRn)+ | DsNonExhaustivePatterns !(HsMatchContext GhcTc) !ExhaustivityCheckType !MaxUncoveredPatterns [Id]@@ -154,7 +155,7 @@ -- | Why TemplateHaskell rejected the splice. Used in the 'DsNotYetHandledByTH' -- constructor of a 'DsMessage'. data ThRejectionReason- = ThAmbiguousRecordUpdates !(HsRecUpdField GhcRn)+ = ThAmbiguousRecordUpdates !(HsRecUpdField GhcRn GhcRn) | ThAbstractClosedTypeFamily !(LFamilyDecl GhcRn) | ThForeignLabel !CLabelString | ThForeignExport !(LForeignDecl GhcRn)
GHC/HsToCore/Expr.hs view
@@ -28,12 +28,13 @@ import GHC.HsToCore.Utils import GHC.HsToCore.Arrows import GHC.HsToCore.Monad-import GHC.HsToCore.Pmc ( addTyCs, pmcGRHSs )+import GHC.HsToCore.Pmc import GHC.HsToCore.Errors.Types import GHC.Types.SourceText import GHC.Types.Name import GHC.Core.FamInstEnv( topNormaliseType ) import GHC.HsToCore.Quote+import GHC.HsToCore.Ticks (stripTicksTopHsExpr) import GHC.Hs -- NB: The desugarer, which straddles the source and Core worlds, sometimes@@ -66,7 +67,6 @@ import GHC.Utils.Panic.Plain import GHC.Core.PatSyn import Control.Monad-import GHC.HsToCore.Ticks (stripTicksTopHsExpr) {- ************************************************************************@@ -92,11 +92,11 @@ ------------------------- dsIPBinds :: HsIPBinds GhcTc -> CoreExpr -> DsM CoreExpr dsIPBinds (IPBinds ev_binds ip_binds) body- = do { ds_binds <- dsTcEvBinds ev_binds- ; let inner = mkCoreLets ds_binds body+ = do { dsTcEvBinds ev_binds $ \ ds_binds -> do+ { let inner = mkCoreLets ds_binds body -- The dict bindings may not be in -- dependency order; hence Rec- ; foldrM ds_ip_bind inner ip_binds }+ ; foldrM ds_ip_bind inner ip_binds } } where ds_ip_bind :: LIPBind GhcTc -> CoreExpr -> DsM CoreExpr ds_ip_bind (L _ (IPBind n _ e)) body@@ -182,8 +182,8 @@ bind_export export b = bindNonRec (abe_poly export) (Var (abe_mono export)) b ; body2 <- foldlM (\body lbind -> dsUnliftedBind (unLoc lbind) body) body1 lbinds- ; ds_binds <- dsTcEvBinds_s ev_binds- ; return (mkCoreLets ds_binds body2) }+ ; dsTcEvBinds_s ev_binds $ \ ds_binds -> do+ { return (mkCoreLets ds_binds body2) } } dsUnliftedBind (FunBind { fun_id = L l fun , fun_matches = matches@@ -193,11 +193,11 @@ -- so must be simply unboxed = do { (args, rhs) <- matchWrapper (mkPrefixFunRhs (L l $ idName fun)) Nothing matches ; massert (null args) -- Functions aren't unlifted- ; core_wrap <- dsHsWrapper co_fn -- Can be non-identity (#21516)- ; let rhs' = core_wrap (mkOptTickBox tick rhs)- ; return (bindNonRec fun rhs' body) }+ ; dsHsWrapper co_fn $ \core_wrap -> do -- Can be non-identity (#21516)+ { let rhs' = core_wrap (mkOptTickBox tick rhs)+ ; return (bindNonRec fun rhs' body) } } -dsUnliftedBind (PatBind {pat_lhs = pat, pat_rhs = grhss+dsUnliftedBind (PatBind { pat_lhs = pat, pat_rhs = grhss , pat_ext = (ty, _) }) body = -- let C x# y# = rhs in body -- ==> case rhs of C x# y# -> body@@ -223,19 +223,11 @@ ************************************************************************ -} ---- | Replace the body of the function with this block to test the hsExprType--- function in GHC.Tc.Utils.Zonk:--- putSrcSpanDs loc $ do--- { core_expr <- dsExpr e--- ; massertPpr (exprType core_expr `eqType` hsExprType e)--- (ppr e <+> dcolon <+> ppr (hsExprType e) $$--- ppr core_expr <+> dcolon <+> ppr (exprType core_expr))--- ; return core_expr }+-- | Desugar a located typechecked expression. dsLExpr :: LHsExpr GhcTc -> DsM CoreExpr-dsLExpr (L loc e) =- putSrcSpanDsA loc $ dsExpr e+dsLExpr (L loc e) = putSrcSpanDsA loc $ dsExpr e +-- | Desugar a typechecked expression. dsExpr :: HsExpr GhcTc -> DsM CoreExpr dsExpr (HsVar _ (L _ id)) = dsHsVar id dsExpr (HsRecSel _ (FieldOcc id _)) = dsHsVar id@@ -373,9 +365,9 @@ dsExpr (HsPragE _ prag expr) = ds_prag_expr prag expr -dsExpr (HsCase _ discrim matches)+dsExpr (HsCase ctxt discrim matches) = do { core_discrim <- dsLExpr discrim- ; ([discrim_var], matching_code) <- matchWrapper CaseAlt (Just [discrim]) matches+ ; ([discrim_var], matching_code) <- matchWrapper ctxt (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@@ -550,16 +542,16 @@ , syn_res_wrap = res_wrap }) arg_exprs = do { fun <- dsExpr expr- ; core_arg_wraps <- mapM dsHsWrapper arg_wraps- ; core_res_wrap <- dsHsWrapper res_wrap- ; let wrapped_args = zipWithEqual "dsSyntaxExpr" ($) core_arg_wraps arg_exprs- ; return $ core_res_wrap (mkCoreApps fun wrapped_args) }+ ; dsHsWrappers arg_wraps $ \core_arg_wraps -> do+ { dsHsWrapper res_wrap $ \core_res_wrap -> do+ { let wrapped_args = zipWithEqual "dsSyntaxExpr" ($) core_arg_wraps arg_exprs+ ; return $ core_res_wrap (mkCoreApps fun wrapped_args) } } } dsSyntaxExpr NoSyntaxExprTc _ = panic "dsSyntaxExpr" findField :: [LHsRecField GhcTc arg] -> Name -> [arg] findField rbinds sel = [hfbRHS fld | L _ fld <- rbinds- , sel == idName (hsRecFieldId fld) ]+ , sel == idName (hsRecFieldId fld) ] {- %--------------------------------------------------------------------@@ -691,11 +683,13 @@ ; dsLocalBinds binds rest } go _ (BindStmt xbs pat rhs) stmts- = do { body <- goL stmts- ; rhs' <- dsLExpr rhs- ; var <- selectSimpleMatchVarL (xbstc_boundResultMult xbs) pat+ = do { var <- selectSimpleMatchVarL (xbstc_boundResultMult xbs) pat+ ; rhs' <- dsLExpr rhs ; match <- matchSinglePatVar var Nothing (StmtCtxt (HsDoStmt ctx)) pat- (xbstc_boundResultType xbs) (cantFailMatchResult body)+ (xbstc_boundResultType xbs) (MR_Infallible $ goL stmts)+ -- NB: "goL stmts" needs to happen inside matchSinglePatVar, and not+ -- before it, so that long-distance information is properly threaded.+ -- See Note [Long-distance information in do notation]. ; match_code <- dsHandleMonadicFailure ctx pat match (xbstc_failOp xbs) ; dsSyntaxExpr (xbstc_bindOp xbs) [rhs', Lam var match_code] } @@ -755,11 +749,12 @@ later_pats = rec_tup_pats rets = map noLocA rec_rets mfix_app = nlHsSyntaxApps mfix_op [mfix_arg]+ match_group = MatchGroupTc [unrestricted tup_ty] body_ty (Generated SkipPmc) mfix_arg = noLocA $ HsLam noExtField (MG { mg_alts = noLocA [mkSimpleMatch LambdaExpr [mfix_pat] body]- , mg_ext = MatchGroupTc [unrestricted tup_ty] body_ty Generated+ , mg_ext = match_group }) mfix_pat = noLocA $ LazyPat noExtField $ mkBigLHsPatTupId rec_tup_pats body = noLocA $ HsDo body_ty@@ -773,7 +768,52 @@ go _ (ParStmt {}) _ = panic "dsDo ParStmt" go _ (TransStmt {}) _ = panic "dsDo TransStmt" -{-+{- Note [Long-distance information in do notation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider T21360:++ data Foo = A Int | B++ swooble :: Foo -> Maybe Foo+ swooble foo = do+ bar@A{} <- Just foo+ return $ case bar of { A _ -> A 9 }++The pattern-match checker **should not** complain that the case statement+is incomplete, because we know that 'bar' is headed by the constructor 'A',+due to the pattern match in the line above. However, we need to ensure that we+propagate this long-distance information; failing to do so lead to #21360.++To do this, we use "matchSinglePatVar" to handle the first pattern match++ bar@A{} <- Just foo++"matchSinglePatVar" then threads through the long-distance information to the+desugaring of the remaining statements by using updPmNablasMatchResult.+This avoids any spurious pattern-match warnings when handling the case+statement on the last line.++Other places that requires from the same treatment:++ - monad comprehensions, e.g.++ blorble :: Foo -> Maybe Foo+ blorble foo = [ case bar of { A _ -> A 9 } | bar@A{} <- Just foo ]++ See GHC.HsToCore.ListComp.dsMcBindStmt. Also tested in T21360.++ - guards, e.g.++ giddy :: Maybe Char -> Char+ giddy x+ | y@(Just _) <- x+ , let z = case y of { Just w -> w }+ = z++ We don't want any inexhaustive pattern match warnings for the case statement,+ because we already know 'y' is of the form "Just ...".+ See test case T21360b.+ ************************************************************************ * * Desugaring Variables@@ -872,15 +912,15 @@ = go (wrap <.> WpTyApp ty) hs_e go wrap (HsVar _ (L _ var))- = do { wrap' <- dsHsWrapper wrap- ; let expr = wrap' (varToCoreExpr var)+ = do { dsHsWrapper wrap $ \wrap' -> do+ { let expr = wrap' (varToCoreExpr var) ty = exprType expr ; dflags <- getDynFlags ; warnAboutIdentities dflags var ty- ; return expr }+ ; return expr } } go wrap hs_e- = do { wrap' <- dsHsWrapper wrap- ; addTyCs FromSource (hsWrapDictBinders wrap) $+ = do { dsHsWrapper wrap $ \wrap' -> do+ { addTyCs FromSource (hsWrapDictBinders wrap) $ do { e <- dsExpr hs_e- ; return (wrap' e) } }+ ; return (wrap' e) } } }
GHC/HsToCore/Foreign/C.hs view
@@ -42,7 +42,7 @@ import GHC.Unit.Module -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Config import GHC.Cmm.Expr@@ -401,11 +401,17 @@ Int -- total size of arguments ) mkFExportCBits dflags c_nm maybe_target arg_htys res_hty is_IO_res_ty cc- =- ( header_bits+ = ( header_bits , CStub body [] [] , type_string,- aug_arg_size+ sum [ widthInBytes (typeWidth rep) | (_,_,_,rep) <- aug_arg_info] -- all the args+ -- NB. the calculation here isn't strictly speaking correct.+ -- We have a primitive Haskell type (eg. Int#, Double#), and+ -- we want to know the size, when passed on the C stack, of+ -- the associated C type (eg. HsInt, HsDouble). We don't have+ -- this information to hand, but we know what GHC's conventions+ -- are for passing around the primitive Haskell types, so we+ -- use that instead. I hope the two coincide --SDM ) where platform = targetPlatform dflags@@ -444,19 +450,6 @@ | isNothing maybe_target = stable_ptr_arg : insertRetAddr platform cc arg_info | otherwise = arg_info - aug_arg_size = sum [ widthInBytes (typeWidth rep) | (_,_,_,rep) <- aug_arg_info]- -- NB. the calculation here isn't strictly speaking correct.- -- We have a primitive Haskell type (eg. Int#, Double#), and- -- we want to know the size, when passed on the C stack, of- -- the associated C type (eg. HsInt, HsDouble). We don't have- -- this information to hand, but we know what GHC's conventions- -- are for passing around the primitive Haskell types, so we- -- use that instead. I hope the two coincide --SDM- -- AK: This seems just wrong, the code here uses widthInBytes, but when- -- we pass args on the haskell stack we always extend to multiples of 8- -- to my knowledge. Not sure if it matters though so I won't touch this- -- for now.- stable_ptr_arg = (text "the_stableptr", text "StgStablePtr", undefined, typeCmmType platform (mkStablePtrPrimTy alphaTy))@@ -561,7 +554,7 @@ , ppUnless res_hty_is_unit $ if libffi then char '*' <> parens (ffi_cResType <> char '*') <>- text "resp = " <> parens ffi_cResType <> text "cret;"+ text "resp = cret;" else text "return cret;" , rbrace ]@@ -612,11 +605,8 @@ -> [(SDoc, SDoc, Type, CmmType)] go 6 args = ret_addr_arg platform : args go n (arg@(_,_,_,rep):args)- -- Int type fitting into int register- | (isBitsType rep && typeWidth rep <= W64 || isGcPtrType rep)- = arg : go (n+1) args- | otherwise- = arg : go n args+ | cmmEqType_ignoring_ptrhood rep b64 = arg : go (n+1) args+ | otherwise = arg : go n args go _ [] = [] in go 0 args _ ->
GHC/HsToCore/Foreign/Call.hs view
@@ -42,7 +42,7 @@ import GHC.Types.Basic import GHC.Types.Literal import GHC.Builtin.Names-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Panic.Plain
GHC/HsToCore/Foreign/Decl.hs view
@@ -33,7 +33,7 @@ import GHC.Types.ForeignCall import GHC.Types.SrcLoc import GHC.Utils.Outputable-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Platform import GHC.Data.OrdList import GHC.Driver.Hooks
GHC/HsToCore/Foreign/JavaScript.hs view
@@ -50,7 +50,7 @@ import GHC.JS.Ppr -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Config import GHC.Builtin.Types@@ -156,7 +156,7 @@ header_bits = maybe mempty idTag maybe_target idTag i = let (tag, u) = unpkUnique (getUnique i)- in CHeader (char tag <> word64 u)+ in CHeader (char tag <> int u) fun_args | null arg_info = empty -- text "void"@@ -177,14 +177,14 @@ text "h$foreignExport" <> parens ( ftext c_nm <> comma <>- strlit (unitIdString (moduleUnitId m)) <> comma <>- strlit (moduleNameString (moduleName m)) <> comma <>- strlit (unpackFS c_nm) <> comma <>- strlit type_string+ strlit (unitIdFS (moduleUnitId m)) <> comma <>+ strlit (moduleNameFS (moduleName m)) <> comma <>+ strlit c_nm <> comma <>+ strlit (mkFastString type_string) ) <> semi _ -> empty - strlit xs = docToSDoc (pprStringLit (mkFastString xs))+ strlit xs = pprStringLit xs -- the target which will form the root of what we ask rts_evalIO to run the_cfun@@ -382,16 +382,16 @@ mkHObj :: Type -> SDoc-mkHObj t = text "h$rts_mk" <> text (showFFIType t)+mkHObj t = text "h$rts_mk" <> showFFIType t unpackHObj :: Type -> SDoc-unpackHObj t = text "h$rts_get" <> text (showFFIType t)+unpackHObj t = text "h$rts_get" <> showFFIType t showStgType :: Type -> SDoc-showStgType t = text "Hs" <> text (showFFIType t)+showStgType t = text "Hs" <> showFFIType t -showFFIType :: Type -> String-showFFIType t = getOccString (getName (typeTyCon t))+showFFIType :: Type -> SDoc+showFFIType t = ftext (occNameFS (getOccName (typeTyCon t))) typeTyCon :: Type -> TyCon typeTyCon ty@@ -639,7 +639,7 @@ | Just (tc,_) <- maybe_tc_app, tc `hasKey` boolTyConKey = do -- result_id <- newSysLocalDs boolTy ccall_uniq <- newUnique- let forceBool e = mkJsCall ccall_uniq "((x) => { return !(!x); })" [e] boolTy+ let forceBool e = mkJsCall ccall_uniq (fsLit "((x) => { return !(!x); })") [e] boolTy return (Just intPrimTy, \e -> forceBool e) @@ -674,10 +674,10 @@ maybe_tc_app = splitTyConApp_maybe result_ty -- low-level primitive JavaScript call:-mkJsCall :: Unique -> String -> [CoreExpr] -> Type -> CoreExpr+mkJsCall :: Unique -> FastString -> [CoreExpr] -> Type -> CoreExpr mkJsCall u tgt args t = mkFCall u ccall args t where ccall = CCall $ CCallSpec- (StaticTarget NoSourceText (mkFastString tgt) (Just primUnit) True)+ (StaticTarget NoSourceText tgt (Just primUnit) True) JavaScriptCallConv PlayRisky
GHC/HsToCore/GuardedRHSs.hs view
@@ -55,7 +55,7 @@ -- In contrast, @dsGRHSs@ produces a @MatchResult CoreExpr@. -dsGRHSs :: HsMatchContext GhcRn+dsGRHSs :: HsMatchContext GhcTc -> GRHSs GhcTc (LHsExpr GhcTc) -- ^ Guarded RHSs -> Type -- ^ Type of RHS -> NonEmpty Nablas -- ^ Refined pattern match checking@@ -76,10 +76,10 @@ -- NB: nested dsLet inside matchResult ; return match_result2 } -dsGRHS :: HsMatchContext GhcRn -> Type -> Nablas -> LGRHS GhcTc (LHsExpr GhcTc)+dsGRHS :: HsMatchContext GhcTc -> Type -> Nablas -> LGRHS GhcTc (LHsExpr GhcTc) -> DsM (MatchResult CoreExpr) dsGRHS hs_ctx rhs_ty rhs_nablas (L _ (GRHS _ guards rhs))- = matchGuards (map unLoc guards) (PatGuard hs_ctx) rhs_nablas rhs rhs_ty+ = matchGuards (map unLoc guards) hs_ctx rhs_nablas rhs rhs_ty {- ************************************************************************@@ -90,7 +90,7 @@ -} matchGuards :: [GuardStmt GhcTc] -- Guard- -> HsStmtContext GhcRn -- Context+ -> HsMatchContext GhcTc -- Context -> Nablas -- The RHS's covered set for PmCheck -> LHsExpr GhcTc -- RHS -> Type -- Type of RHS of guard@@ -130,15 +130,16 @@ matchGuards (BindStmt _ pat bind_rhs : stmts) ctx nablas rhs rhs_ty = do let upat = unLoc pat match_var <- selectMatchVar ManyTy upat- -- We only allow unrestricted patterns in guard, hence the `Many`+ -- We only allow unrestricted patterns in guards, hence the `Many` -- above. It isn't clear what linear patterns would mean, maybe we will -- figure it out in the future. match_result <- matchGuards stmts ctx nablas rhs rhs_ty core_rhs <- dsLExpr bind_rhs- match_result' <- matchSinglePatVar match_var (Just core_rhs) (StmtCtxt ctx)- pat rhs_ty match_result- pure $ bindNonRec match_var core_rhs <$> match_result'+ match_result' <-+ matchSinglePatVar match_var (Just core_rhs) (StmtCtxt $ PatGuard ctx)+ pat rhs_ty match_result+ return $ bindNonRec match_var core_rhs <$> match_result' matchGuards (LastStmt {} : _) _ _ _ _ = panic "matchGuards LastStmt" matchGuards (ParStmt {} : _) _ _ _ _ = panic "matchGuards ParStmt"
GHC/HsToCore/ListComp.hs view
@@ -23,7 +23,7 @@ import GHC.HsToCore.Monad -- the monadery used in the desugarer import GHC.HsToCore.Utils -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Core.Utils import GHC.Types.Id import GHC.Core.Type@@ -444,15 +444,13 @@ ; unzip_fn <- newSysLocalDs ManyTy unzip_fn_ty - ; [us1, us2] <- sequence [newUniqueSupply, newUniqueSupply]- ; let nil_tuple = mkBigCoreTup (map mkNilExpr elt_tys) concat_expressions = map mkConcatExpression (zip3 elt_tys (map Var xs) (map Var xss)) tupled_concat_expression = mkBigCoreTup concat_expressions - folder_body_inner_case = mkBigTupleCase us1 xss tupled_concat_expression (Var axs)- folder_body_outer_case = mkBigTupleCase us2 xs folder_body_inner_case (Var ax)- folder_body = mkLams [ax, axs] folder_body_outer_case+ ; folder_body_inner_case <- mkBigTupleCase xss tupled_concat_expression (Var axs)+ ; folder_body_outer_case <- mkBigTupleCase xs folder_body_inner_case (Var ax)+ ; let folder_body = mkLams [ax, axs] folder_body_outer_case ; unzip_body <- mkFoldrExpr elt_tuple_ty elt_list_tuple_ty folder_body nil_tuple (Var ys) ; return (Just (unzip_fn, mkLams [ys] unzip_body)) }@@ -546,9 +544,8 @@ ; body <- dsMcStmts stmts_rest ; n_tup_var' <- newSysLocalDs ManyTy n_tup_ty' ; tup_n_expr' <- mkMcUnzipM form fmap_op n_tup_var' from_bndr_tys- ; us <- newUniqueSupply ; let rhs' = mkApps usingExpr' usingArgs'- body' = mkBigTupleCase us to_bndrs body tup_n_expr'+ ; body' <- mkBigTupleCase to_bndrs body tup_n_expr' ; dsSyntaxExpr bind_op [rhs', Lam n_tup_var' body'] } @@ -584,17 +581,17 @@ = do { exp <- dsInnerMonadComp stmts bndrs return_op ; return (exp, mkBigCoreVarTupTy bndrs) } -dsMcStmt stmt _ = pprPanic "dsMcStmt: unexpected stmt" (ppr stmt)-+dsMcStmt stmt@(ApplicativeStmt {}) _ = pprPanic "dsMcStmt: unexpected stmt" (ppr stmt)+dsMcStmt stmt@(RecStmt {}) _ = pprPanic "dsMcStmt: unexpected stmt" (ppr stmt) matchTuple :: [Id] -> CoreExpr -> DsM CoreExpr -- (matchTuple [a,b,c] body) -- returns the Core term -- \x. case x of (a,b,c) -> body matchTuple ids body- = do { us <- newUniqueSupply- ; tup_id <- newSysLocalDs ManyTy (mkBigCoreVarTupTy ids)- ; return (Lam tup_id $ mkBigTupleCase us ids body (Var tup_id)) }+ = do { tup_id <- newSysLocalDs ManyTy (mkBigCoreVarTupTy ids)+ ; tup_case <- mkBigTupleCase ids body (Var tup_id)+ ; return (Lam tup_id tup_case) } -- general `rhs' >>= \pat -> stmts` desugaring where `rhs'` is already a -- desugared `CoreExpr`@@ -606,10 +603,12 @@ -> [ExprLStmt GhcTc] -> DsM CoreExpr dsMcBindStmt pat rhs' bind_op fail_op res1_ty stmts- = do { body <- dsMcStmts stmts- ; var <- selectSimpleMatchVarL ManyTy pat+ = do { var <- selectSimpleMatchVarL ManyTy pat ; match <- matchSinglePatVar var Nothing (StmtCtxt (HsDoStmt (DoExpr Nothing))) pat- res1_ty (cantFailMatchResult body)+ res1_ty (MR_Infallible $ dsMcStmts stmts)+ -- NB: dsMcStmts needs to happen inside matchSinglePatVar, and not+ -- before it, so that long-distance information is properly threaded.+ -- See Note [Long-distance information in do notation] in GHC.HsToCore.Expr. ; match_code <- dsHandleMonadicFailure MonadComp pat match fail_op ; dsSyntaxExpr bind_op [rhs', Lam var match_code] }
GHC/HsToCore/Match.hs view
@@ -1,4 +1,5 @@ +{-# LANGUAGE LambdaCase #-} {-# LANGUAGE MonadComprehensions #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE PatternSynonyms #-}@@ -28,9 +29,9 @@ import {-#SOURCE#-} GHC.HsToCore.Expr (dsExpr) -import GHC.Types.Basic ( Origin(..), isGenerated )+import GHC.Types.Basic ( Origin(..), isGenerated, requiresPMC ) import GHC.Types.SourceText-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Hs import GHC.Hs.Syn.Type import GHC.Tc.Types.Evidence@@ -72,7 +73,7 @@ import GHC.Types.Unique import GHC.Types.Unique.DFM -import Control.Monad ( zipWithM, unless, when )+import Control.Monad ( zipWithM, unless ) import Data.List.NonEmpty (NonEmpty(..)) import qualified Data.List.NonEmpty as NEL import qualified Data.Map as Map@@ -285,9 +286,9 @@ ; var' <- newUniqueId var (idMult var) pat_ty' ; match_result <- match (var':vars) ty $ NEL.toList $ decomposeFirstPat getCoPat <$> eqns- ; core_wrap <- dsHsWrapper co- ; let bind = NonRec var' (core_wrap (Var var))- ; return (mkCoLetMatchResult bind match_result) }+ ; dsHsWrapper co $ \core_wrap -> do+ { let bind = NonRec var' (core_wrap (Var var))+ ; return (mkCoLetMatchResult bind match_result) } } matchView :: NonEmpty MatchId -> Type -> NonEmpty EquationInfo -> DsM (MatchResult CoreExpr) -- Apply the view function to the match variable and then match that@@ -736,7 +737,7 @@ -- p2 q2 -> ... matchWrapper- :: HsMatchContext GhcRn -- ^ For shadowing warning messages+ :: HsMatchContext GhcTc -- ^ For shadowing warning messages -> Maybe [LHsExpr GhcTc] -- ^ Scrutinee(s) -- see Note [matchWrapper scrutinees] -> MatchGroup GhcTc (LHsExpr GhcTc) -- ^ Matches being desugared@@ -798,7 +799,7 @@ ; eqns_info <- zipWithM mk_eqn_info matches matches_nablas - ; result_expr <- discard_warnings_if_generated origin $+ ; result_expr <- discard_warnings_if_skip_pmc origin $ matchEquations ctxt new_vars eqns_info rhs_ty ; return (new_vars, result_expr) }@@ -818,10 +819,10 @@ , eqn_orig = FromSource , eqn_rhs = match_result } } - discard_warnings_if_generated orig =- if isGenerated orig- then discardWarningsDs- else id+ discard_warnings_if_skip_pmc orig =+ if requiresPMC orig+ then id+ else discardWarningsDs initNablasMatches :: Nablas -> [LMatch GhcTc b] -> [(Nablas, NonEmpty Nablas)] initNablasMatches ldi_nablas ms@@ -880,7 +881,7 @@ on the user-written case statement). -} -matchEquations :: HsMatchContext GhcRn+matchEquations :: HsMatchContext GhcTc -> [MatchId] -> [EquationInfo] -> Type -> DsM CoreExpr matchEquations ctxt vars eqns_info rhs_ty@@ -894,7 +895,7 @@ -- situation where we want to match a single expression against a single -- pattern. It returns an expression. matchSimply :: CoreExpr -- ^ Scrutinee- -> HsMatchContext GhcRn -- ^ Match kind+ -> HsMatchContext GhcTc -- ^ Match kind -> LPat GhcTc -- ^ Pattern it should match -> CoreExpr -- ^ Return this if it matches -> CoreExpr -- ^ Return this if it doesn't@@ -916,7 +917,7 @@ match_result' <- matchSinglePat scrut hs_ctx pat rhs_ty match_result extractMatchResult match_result' fail_expr -matchSinglePat :: CoreExpr -> HsMatchContext GhcRn -> LPat GhcTc+matchSinglePat :: CoreExpr -> HsMatchContext GhcTc -> LPat GhcTc -> Type -> MatchResult CoreExpr -> DsM (MatchResult CoreExpr) -- matchSinglePat ensures that the scrutinee is a variable -- and then calls matchSinglePatVar@@ -942,22 +943,36 @@ matchSinglePatVar :: Id -- See Note [Match Ids] -> Maybe CoreExpr -- ^ The scrutinee the match id is bound to- -> HsMatchContext GhcRn -> LPat GhcTc+ -> HsMatchContext GhcTc -> LPat GhcTc -> Type -> MatchResult CoreExpr -> DsM (MatchResult CoreExpr) matchSinglePatVar var mb_scrut ctx pat ty match_result = assertPpr (isInternalName (idName var)) (ppr var) $ do { dflags <- getDynFlags ; locn <- getSrcSpanDs- -- Pattern match check warnings- ; when (isMatchContextPmChecked dflags FromSource ctx) $- addCoreScrutTmCs (maybeToList mb_scrut) [var] $- pmcPatBind (DsMatchContext ctx locn) var (unLoc pat)+ -- Pattern match check warnings.+ -- See Note [Long-distance information in matchWrapper] and+ -- Note [Long-distance information in do notation] in GHC.HsToCore.Expr.+ ; ldi_nablas <-+ if isMatchContextPmChecked_SinglePat dflags FromSource ctx pat+ then addCoreScrutTmCs (maybeToList mb_scrut) [var] $+ pmcPatBind (DsMatchContext ctx locn) var (unLoc pat)+ else getLdiNablas ; let eqn_info = EqnInfo { eqn_pats = [unLoc (decideBangHood dflags pat)] , eqn_orig = FromSource- , eqn_rhs = match_result }+ , eqn_rhs =+ updPmNablasMatchResult ldi_nablas match_result }+ -- See Note [Long-distance information in do notation]+ -- in GHC.HsToCore.Expr.+ ; match [var] ty [eqn_info] } +updPmNablasMatchResult :: Nablas -> MatchResult r -> MatchResult r+updPmNablasMatchResult nablas = \case+ MR_Infallible body_fn -> MR_Infallible $+ updPmNablas nablas body_fn+ MR_Fallible body_fn -> MR_Fallible $ \fail ->+ updPmNablas nablas $ body_fn fail {- ************************************************************************
GHC/HsToCore/Match.hs-boot view
@@ -6,7 +6,7 @@ import GHC.HsToCore.Monad ( DsM, EquationInfo, MatchResult ) import GHC.Core ( CoreExpr ) import GHC.Hs ( LPat, HsMatchContext, MatchGroup, LHsExpr )-import GHC.Hs.Extension ( GhcTc, GhcRn )+import GHC.Hs.Extension ( GhcTc ) match :: [Id] -> Type@@ -14,14 +14,14 @@ -> DsM (MatchResult CoreExpr) matchWrapper- :: HsMatchContext GhcRn+ :: HsMatchContext GhcTc -> Maybe [LHsExpr GhcTc] -> MatchGroup GhcTc (LHsExpr GhcTc) -> DsM ([Id], CoreExpr) matchSimply :: CoreExpr- -> HsMatchContext GhcRn+ -> HsMatchContext GhcTc -> LPat GhcTc -> CoreExpr -> CoreExpr@@ -30,7 +30,7 @@ matchSinglePatVar :: Id -> Maybe CoreExpr- -> HsMatchContext GhcRn+ -> HsMatchContext GhcTc -> LPat GhcTc -> Type -> MatchResult CoreExpr
GHC/HsToCore/Match/Constructor.hs view
@@ -20,7 +20,7 @@ import GHC.Hs import GHC.HsToCore.Binds import GHC.Core.ConLike-import GHC.Types.Basic ( Origin(..) )+import GHC.Types.Basic import GHC.Tc.Utils.TcType import GHC.Core.Multiplicity import GHC.HsToCore.Monad@@ -163,13 +163,13 @@ } } : pats }))- = do ds_bind <- dsTcEvBinds bind- return ( wrapBinds (tvs `zip` tvs1)- . wrapBinds (ds `zip` dicts1)- . mkCoreLets ds_bind- , eqn { eqn_orig = Generated- , eqn_pats = conArgPats val_arg_tys args ++ pats }- )+ = do dsTcEvBinds bind $ \ds_bind ->+ return ( wrapBinds (tvs `zip` tvs1)+ . wrapBinds (ds `zip` dicts1)+ . mkCoreLets ds_bind+ , eqn { eqn_orig = Generated SkipPmc+ , eqn_pats = conArgPats val_arg_tys args ++ pats }+ ) shift (_, (EqnInfo { eqn_pats = ps })) = pprPanic "matchOneCon/shift" (ppr ps) ; let scaled_arg_tys = map (scaleScaled mult) val_arg_tys -- The 'val_arg_tys' are taken from the data type definition, they
GHC/HsToCore/Match/Literal.hs view
@@ -36,7 +36,7 @@ import GHC.Hs -import GHC.Tc.Utils.Zonk ( shortCutLit )+import GHC.Tc.Utils.TcMType ( shortCutLit ) import GHC.Tc.Utils.TcType import GHC.Core@@ -58,13 +58,12 @@ import GHC.Types.Id import GHC.Types.SourceText -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Utils.Outputable as Outputable import GHC.Utils.Misc import GHC.Utils.Panic import GHC.Utils.Panic.Plain-import GHC.Utils.Unique (sameUnique) import GHC.Data.FastString @@ -107,7 +106,13 @@ HsCharPrim _ c -> return (Lit (LitChar c)) HsIntPrim _ i -> return (Lit (mkLitIntWrap platform i)) HsWordPrim _ w -> return (Lit (mkLitWordWrap platform w))+ HsInt8Prim _ i -> return (Lit (mkLitInt8Wrap i))+ HsInt16Prim _ i -> return (Lit (mkLitInt16Wrap i))+ HsInt32Prim _ i -> return (Lit (mkLitInt32Wrap i)) HsInt64Prim _ i -> return (Lit (mkLitInt64Wrap i))+ HsWord8Prim _ w -> return (Lit (mkLitWord8Wrap w))+ HsWord16Prim _ w -> return (Lit (mkLitWord16Wrap w))+ HsWord32Prim _ w -> return (Lit (mkLitWord32Wrap w)) HsWord64Prim _ w -> return (Lit (mkLitWord64Wrap w)) -- This can be slow for very large literals. See Note [FractionalLit representation]@@ -314,29 +319,29 @@ , Just (i, tc) <- lit = if -- These only show up via the 'HsOverLit' route- | sameUnique tc intTyConName -> check i tc minInt maxInt- | sameUnique tc wordTyConName -> check i tc minWord maxWord- | sameUnique tc int8TyConName -> check i tc (min' @Int8) (max' @Int8)- | sameUnique tc int16TyConName -> check i tc (min' @Int16) (max' @Int16)- | sameUnique tc int32TyConName -> check i tc (min' @Int32) (max' @Int32)- | sameUnique tc int64TyConName -> check i tc (min' @Int64) (max' @Int64)- | sameUnique tc word8TyConName -> check i tc (min' @Word8) (max' @Word8)- | sameUnique tc word16TyConName -> check i tc (min' @Word16) (max' @Word16)- | sameUnique tc word32TyConName -> check i tc (min' @Word32) (max' @Word32)- | sameUnique tc word64TyConName -> check i tc (min' @Word64) (max' @Word64)- | sameUnique tc naturalTyConName -> checkPositive i tc+ | tc == intTyConName -> check i tc minInt maxInt+ | tc == wordTyConName -> check i tc minWord maxWord+ | tc == int8TyConName -> check i tc (min' @Int8) (max' @Int8)+ | tc == int16TyConName -> check i tc (min' @Int16) (max' @Int16)+ | tc == int32TyConName -> check i tc (min' @Int32) (max' @Int32)+ | tc == int64TyConName -> check i tc (min' @Int64) (max' @Int64)+ | tc == word8TyConName -> check i tc (min' @Word8) (max' @Word8)+ | tc == word16TyConName -> check i tc (min' @Word16) (max' @Word16)+ | tc == word32TyConName -> check i tc (min' @Word32) (max' @Word32)+ | tc == word64TyConName -> check i tc (min' @Word64) (max' @Word64)+ | tc == naturalTyConName -> checkPositive i tc -- These only show up via the 'HsLit' route- | sameUnique tc intPrimTyConName -> check i tc minInt maxInt- | sameUnique tc wordPrimTyConName -> check i tc minWord maxWord- | sameUnique tc int8PrimTyConName -> check i tc (min' @Int8) (max' @Int8)- | sameUnique tc int16PrimTyConName -> check i tc (min' @Int16) (max' @Int16)- | sameUnique tc int32PrimTyConName -> check i tc (min' @Int32) (max' @Int32)- | sameUnique tc int64PrimTyConName -> check i tc (min' @Int64) (max' @Int64)- | sameUnique tc word8PrimTyConName -> check i tc (min' @Word8) (max' @Word8)- | sameUnique tc word16PrimTyConName -> check i tc (min' @Word16) (max' @Word16)- | sameUnique tc word32PrimTyConName -> check i tc (min' @Word32) (max' @Word32)- | sameUnique tc word64PrimTyConName -> check i tc (min' @Word64) (max' @Word64)+ | tc == intPrimTyConName -> check i tc minInt maxInt+ | tc == wordPrimTyConName -> check i tc minWord maxWord+ | tc == int8PrimTyConName -> check i tc (min' @Int8) (max' @Int8)+ | tc == int16PrimTyConName -> check i tc (min' @Int16) (max' @Int16)+ | tc == int32PrimTyConName -> check i tc (min' @Int32) (max' @Int32)+ | tc == int64PrimTyConName -> check i tc (min' @Int64) (max' @Int64)+ | tc == word8PrimTyConName -> check i tc (min' @Word8) (max' @Word8)+ | tc == word16PrimTyConName -> check i tc (min' @Word16) (max' @Word16)+ | tc == word32PrimTyConName -> check i tc (min' @Word32) (max' @Word32)+ | tc == word64PrimTyConName -> check i tc (min' @Word64) (max' @Word64) | otherwise -> return () @@ -393,22 +398,22 @@ platform <- targetPlatform <$> getDynFlags -- Be careful to use target Int/Word sizes! cf #17336- if | sameUnique tc intTyConName -> case platformWordSize platform of- PW4 -> check @Int32- PW8 -> check @Int64- | sameUnique tc wordTyConName -> case platformWordSize platform of- PW4 -> check @Word32- PW8 -> check @Word64- | sameUnique tc int8TyConName -> check @Int8- | sameUnique tc int16TyConName -> check @Int16- | sameUnique tc int32TyConName -> check @Int32- | sameUnique tc int64TyConName -> check @Int64- | sameUnique tc word8TyConName -> check @Word8- | sameUnique tc word16TyConName -> check @Word16- | sameUnique tc word32TyConName -> check @Word32- | sameUnique tc word64TyConName -> check @Word64- | sameUnique tc integerTyConName -> check @Integer- | sameUnique tc naturalTyConName -> check @Integer+ if | tc == intTyConName -> case platformWordSize platform of+ PW4 -> check @Int32+ PW8 -> check @Int64+ | tc == wordTyConName -> case platformWordSize platform of+ PW4 -> check @Word32+ PW8 -> check @Word64+ | tc == int8TyConName -> check @Int8+ | tc == int16TyConName -> check @Int16+ | tc == int32TyConName -> check @Int32+ | tc == int64TyConName -> check @Int64+ | tc == word8TyConName -> check @Word8+ | tc == word16TyConName -> check @Word16+ | tc == word32TyConName -> check @Word32+ | tc == word64TyConName -> check @Word64+ | tc == integerTyConName -> check @Integer+ | tc == naturalTyConName -> check @Integer -- We use 'Integer' because otherwise a negative 'Natural' literal -- could cause a compile time crash (instead of a runtime one). -- See the T10930b test case for an example of where this matters.@@ -456,11 +461,24 @@ getSimpleIntegralLit (HsInt _ IL{ il_value = i }) = Just (i, intTy) getSimpleIntegralLit (HsIntPrim _ i) = Just (i, intPrimTy) getSimpleIntegralLit (HsWordPrim _ i) = Just (i, wordPrimTy)+getSimpleIntegralLit (HsInt8Prim _ i) = Just (i, int8PrimTy)+getSimpleIntegralLit (HsInt16Prim _ i) = Just (i, int16PrimTy)+getSimpleIntegralLit (HsInt32Prim _ i) = Just (i, int32PrimTy) getSimpleIntegralLit (HsInt64Prim _ i) = Just (i, int64PrimTy)+getSimpleIntegralLit (HsWord8Prim _ i) = Just (i, word8PrimTy)+getSimpleIntegralLit (HsWord16Prim _ i) = Just (i, word16PrimTy)+getSimpleIntegralLit (HsWord32Prim _ i) = Just (i, word32PrimTy) getSimpleIntegralLit (HsWord64Prim _ i) = Just (i, word64PrimTy) getSimpleIntegralLit (HsInteger _ i ty) = Just (i, ty)-getSimpleIntegralLit _ = Nothing +getSimpleIntegralLit HsChar{} = Nothing+getSimpleIntegralLit HsCharPrim{} = Nothing+getSimpleIntegralLit HsString{} = Nothing+getSimpleIntegralLit HsStringPrim{} = Nothing+getSimpleIntegralLit HsRat{} = Nothing+getSimpleIntegralLit HsFloatPrim{} = Nothing+getSimpleIntegralLit HsDoublePrim{} = Nothing+ -- | Extract the Char if the expression is a Char literal. getLHsCharLit :: LHsExpr GhcTc -> Maybe Char getLHsCharLit (L _ (HsPar _ _ e _)) = getLHsCharLit e@@ -639,7 +657,13 @@ -- HsLit does not. hsLitKey platform (HsIntPrim _ i) = mkLitIntWrap platform i hsLitKey platform (HsWordPrim _ w) = mkLitWordWrap platform w+hsLitKey _ (HsInt8Prim _ i) = mkLitInt8Wrap i+hsLitKey _ (HsInt16Prim _ i) = mkLitInt16Wrap i+hsLitKey _ (HsInt32Prim _ i) = mkLitInt32Wrap i hsLitKey _ (HsInt64Prim _ i) = mkLitInt64Wrap i+hsLitKey _ (HsWord8Prim _ w) = mkLitWord8Wrap w+hsLitKey _ (HsWord16Prim _ w) = mkLitWord16Wrap w+hsLitKey _ (HsWord32Prim _ w) = mkLitWord32Wrap w hsLitKey _ (HsWord64Prim _ w) = mkLitWord64Wrap w hsLitKey _ (HsCharPrim _ c) = mkLitChar c -- This following two can be slow. See Note [FractionalLit representation]
GHC/HsToCore/Monad.hs view
@@ -36,6 +36,9 @@ -- Getting and setting pattern match oracle states getPmNablas, updPmNablas, + -- Tracking evidence variable coherence+ addUnspecables, getUnspecables,+ -- Get COMPLETE sets of a TyCon dsGetCompleteMatches, @@ -54,7 +57,7 @@ import GHC.Prelude import GHC.Driver.Env-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Ppr import GHC.Driver.Config.Diagnostic @@ -91,6 +94,7 @@ import GHC.Types.Basic ( Origin ) import GHC.Types.SourceFile import GHC.Types.Id+import GHC.Types.Var (EvId) import GHC.Types.SrcLoc import GHC.Types.TypeEnv import GHC.Types.Unique.Supply@@ -109,6 +113,7 @@ import Data.IORef import GHC.Driver.Env.KnotVars+import qualified Data.Set as S {- ************************************************************************@@ -119,7 +124,7 @@ -} data DsMatchContext- = DsMatchContext (HsMatchContext GhcRn) SrcSpan+ = DsMatchContext (HsMatchContext GhcTc) SrcSpan deriving () instance Outputable DsMatchContext where@@ -349,9 +354,10 @@ , ds_cc_st = cc_st_var , ds_next_wrapper_num = next_wrapper_num }- lcl_env = DsLclEnv { dsl_meta = emptyNameEnv- , dsl_loc = real_span- , dsl_nablas = initNablas+ lcl_env = DsLclEnv { dsl_meta = emptyNameEnv+ , dsl_loc = real_span+ , dsl_nablas = initNablas+ , dsl_unspecables = mempty } in (gbl_env, lcl_env) @@ -406,6 +412,12 @@ -- See 'dsl_nablas'. updPmNablas :: Nablas -> DsM a -> DsM a updPmNablas nablas = updLclEnv (\env -> env { dsl_nablas = nablas })++addUnspecables :: S.Set EvId -> DsM a -> DsM a+addUnspecables unspecables = updLclEnv (\env -> env{ dsl_unspecables = unspecables `mappend` dsl_unspecables env })++getUnspecables :: DsM (S.Set EvId)+getUnspecables = dsl_unspecables <$> getLclEnv getSrcSpanDs :: DsM SrcSpan getSrcSpanDs = do { env <- getLclEnv
GHC/HsToCore/Pmc.hs view
@@ -36,7 +36,7 @@ module GHC.HsToCore.Pmc ( -- Checking and printing pmcPatBind, pmcMatches, pmcGRHSs,- isMatchContextPmChecked,+ isMatchContextPmChecked, isMatchContextPmChecked_SinglePat, -- See Note [Long-distance information] addTyCs, addCoreScrutTmCs, addHsScrutTmCs, getLdiNablas@@ -52,7 +52,7 @@ import GHC.HsToCore.Pmc.Solver import GHC.Types.Basic (Origin(..)) import GHC.Core (CoreExpr)-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Hs import GHC.Types.Id import GHC.Types.SrcLoc@@ -98,21 +98,36 @@ noCheckDs = updTopFlags (\dflags -> foldl' wopt_unset dflags allPmCheckWarnings) -- | Check a pattern binding (let, where) for exhaustiveness.-pmcPatBind :: DsMatchContext -> Id -> Pat GhcTc -> DsM ()--- See Note [pmcPatBind only checks PatBindRhs]-pmcPatBind ctxt@(DsMatchContext PatBindRhs loc) var p = do- !missing <- getLdiNablas- pat_bind <- noCheckDs $ desugarPatBind loc var p- tracePm "pmcPatBind {" (vcat [ppr ctxt, ppr var, ppr p, ppr pat_bind, ppr missing])- result <- unCA (checkPatBind pat_bind) missing- tracePm "}: " (ppr (cr_uncov result))- formatReportWarnings ReportPatBind ctxt [var] result-pmcPatBind _ _ _ = pure ()+pmcPatBind :: DsMatchContext -> Id -> Pat GhcTc -> DsM Nablas+pmcPatBind ctxt@(DsMatchContext match_ctxt loc) var p+ = mb_discard_warnings $ do+ !missing <- getLdiNablas+ pat_bind <- noCheckDs $ desugarPatBind loc var p+ tracePm "pmcPatBind {" (vcat [ppr ctxt, ppr var, ppr p, ppr pat_bind, ppr missing])+ result <- unCA (checkPatBind pat_bind) missing+ let ldi = ldiGRHS $ ( \ pb -> case pb of PmPatBind grhs -> grhs) $ cr_ret result+ tracePm "pmcPatBind }: " $+ vcat [ text "cr_uncov:" <+> ppr (cr_uncov result)+ , text "ldi:" <+> ppr ldi ]+ formatReportWarnings ReportPatBind ctxt [var] result+ return ldi+ where+ -- See Note [pmcPatBind doesn't warn on pattern guards]+ mb_discard_warnings+ = if want_pmc match_ctxt+ then id+ else discardWarningsDs+ want_pmc PatBindRhs = True+ want_pmc (StmtCtxt stmt_ctxt) =+ case stmt_ctxt of+ PatGuard {} -> False+ _ -> True+ want_pmc _ = False -- | Exhaustive for guard matches, is used for guards in pattern bindings and -- in @MultiIf@ expressions. Returns the 'Nablas' covered by the RHSs. pmcGRHSs- :: HsMatchContext GhcRn -- ^ Match context, for warning messages+ :: HsMatchContext GhcTc -- ^ Match context, for warning messages -> GRHSs GhcTc (LHsExpr GhcTc) -- ^ The GRHSs to check -> DsM (NonEmpty Nablas) -- ^ Covered 'Nablas' for each RHS, for long -- distance info@@ -178,22 +193,29 @@ {-# SCC "formatReportWarnings" #-} formatReportWarnings ReportMatchGroup ctxt vars result return (NE.toList (ldiMatchGroup (cr_ret result))) -{- Note [pmcPatBind only checks PatBindRhs]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-@pmcPatBind@'s sole purpose is to check vanilla pattern bindings, like+{- Note [pmcPatBind doesn't warn on pattern guards]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+@pmcPatBind@'s main purpose is to check vanilla pattern bindings, like @x :: Int; Just x = e@, which is in a @PatBindRhs@ context. But its caller is also called for individual pattern guards in a @StmtCtxt@. For example, both pattern guards in @f x y | True <- x, False <- y = ...@ will-go through this function. It makes no sense to do coverage checking there:+go through this function. It makes no sense to report pattern match warnings+for these pattern guards:+ * Pattern guards may well fail. Fall-through is not an unrecoverable panic, but rather behavior the programmer expects, so inexhaustivity should not be reported.+ * Redundancy is already reported for the whole GRHS via one of the other- exported coverage checking functions. Also reporting individual redundant+ exported coverage checking functions. Also, reporting individual redundant guards is... redundant. See #17646.-Note that we can't just omit checking of @StmtCtxt@ altogether (by adjusting-'isMatchContextPmChecked'), because that affects the other checking functions,-too.++However, we should not skip pattern-match checking altogether, as it may reveal+important long-distance information. One example is described in+Note [Long-distance information in do notation] in GHC.HsToCore.Expr.++Instead, we simply discard warnings when in pattern-guards, by using the function+discardWarningsDs. -} --
GHC/HsToCore/Pmc/Check.hs view
@@ -29,7 +29,7 @@ import GHC.HsToCore.Pmc.Types import GHC.HsToCore.Pmc.Utils import GHC.HsToCore.Pmc.Solver-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Utils.Outputable import GHC.Tc.Utils.TcType (evVarPred) import GHC.Data.OrdList
GHC/HsToCore/Pmc/Desugar.hs view
@@ -21,9 +21,9 @@ import GHC.Core (Expr(Var,App)) import GHC.Data.FastString (unpackFS, lengthFS) import GHC.Data.Bag (bagToList)-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Hs-import GHC.Tc.Utils.Zonk (shortCutLit)+import GHC.Tc.Utils.TcMType (shortCutLit) import GHC.Types.Id import GHC.Core.ConLike import GHC.Types.Name@@ -48,7 +48,7 @@ import qualified GHC.LanguageExtensions as LangExt import GHC.Utils.Monad (concatMapM) import GHC.Types.SourceText (FractionalLit(..))-import Control.Monad (zipWithM)+import Control.Monad (zipWithM, replicateM) import Data.List (elemIndex) import Data.List.NonEmpty ( NonEmpty(..) ) import qualified Data.List.NonEmpty as NE@@ -92,7 +92,7 @@ -- 'GHC.HsToCore.Pmc.Solver.addRefutableAltCon', but it's so much simpler -- here. See Note [Representation of Strings in TmState] in -- GHC.HsToCore.Pmc.Solver- vars <- traverse mkPmId (take (lengthFS s) (repeat charTy))+ vars <- replicateM (lengthFS s) (mkPmId charTy) let mk_char_lit y c = mkPmLitGrds y (PmLit charTy (PmLitChar c)) char_grdss <- zipWithM mk_char_lit vars (unpackFS s) mkListGrds x (zip vars char_grdss)@@ -154,8 +154,8 @@ | WpCast co <- wrapper, isReflexiveCo co -> desugarPat x p | otherwise -> do (y, grds) <- desugarPatV p- wrap_rhs_y <- dsHsWrapper wrapper- pure (PmLet y (wrap_rhs_y (Var x)) : grds)+ dsHsWrapper wrapper $ \wrap_rhs_y ->+ pure (PmLet y (wrap_rhs_y (Var x)) : grds) -- (n + k) ===> let b = x >= k, True <- b, let n = x-k NPlusKPat _pat_ty (L _ n) k1 k2 ge minus -> do
GHC/HsToCore/Pmc/Solver.hs view
@@ -37,7 +37,7 @@ import GHC.HsToCore.Pmc.Types import GHC.HsToCore.Pmc.Utils (tracePm, traceWhenFailPm, mkPmId) -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Config import GHC.Utils.Outputable import GHC.Utils.Misc@@ -46,7 +46,6 @@ import GHC.Utils.Panic.Plain import GHC.Data.Bag -import GHC.Types.Basic (Levity(..)) import GHC.Types.CompleteMatch import GHC.Types.Unique.Set import GHC.Types.Unique.DSet@@ -153,8 +152,8 @@ tc == tYPETyCon = Just [] | -- Similarly, treat `type data` declarations as empty data types on -- the term level, as `type data` data constructors only exist at- -- the type level (#22964).- -- See Note [Type data declarations] in GHC.Rename.Module.+ -- the type level (#22964). See wrinkle (W2a) in+ -- Note [Type data declarations] in GHC.Rename.Module. isTypeDataTyCon tc = Just [] | otherwise = tyConDataCons_maybe tc in vanillaCompleteMatch . mkUniqDSet . map RealDataCon <$> mb_dcs@@ -646,8 +645,7 @@ nameTyCt pred_ty = do unique <- getUniqueM let occname = mkVarOccFS (fsLit ("pm_"++show unique))- idname = mkInternalName unique occname noSrcSpan- return (mkLocalIdOrCoVar idname ManyTy pred_ty)+ return (mkUserLocalOrCoVar occname unique ManyTy pred_ty noSrcSpan) ----------------------------- -- ** Adding term constraints@@ -680,7 +678,7 @@ filterUnliftedFields :: PmAltCon -> [Id] -> [Id] filterUnliftedFields con args = [ arg | (arg, bang) <- zipEqual "addPhiCt" args (pmAltConImplBangs con)- , isBanged bang || typeLevity_maybe (idType arg) == Just Unlifted ]+ , isBanged bang || definitelyUnliftedType (idType arg) ] -- | Adds the constraint @x ~ ⊥@, e.g. that evaluation of a particular 'Id' @x@ -- surely diverges. Quite similar to 'addConCt', only that it only cares about@@ -692,7 +690,7 @@ IsNotBot -> mzero -- There was x ≁ ⊥. Contradiction! IsBot -> pure nabla -- There already is x ~ ⊥. Nothing left to do MaybeBot -- We add x ~ ⊥- | Just Unlifted <- typeLevity_maybe (idType x)+ | definitelyUnliftedType (idType x) -- Case (3) in Note [Strict fields and variables of unlifted type] -> mzero -- unlifted vars can never be ⊥ | otherwise
GHC/HsToCore/Pmc/Utils.hs view
@@ -8,14 +8,15 @@ tracePm, traceWhenFailPm, mkPmId, allPmCheckWarnings, overlapping, exhaustive, redundantBang, exhaustiveWarningFlag,- isMatchContextPmChecked, needToRunPmCheck+ isMatchContextPmChecked, isMatchContextPmChecked_SinglePat,+ needToRunPmCheck ) where import GHC.Prelude -import GHC.Types.Basic (Origin(..), isGenerated)-import GHC.Driver.Session+import GHC.Types.Basic (Origin(..), requiresPMC)+import GHC.Driver.DynFlags import GHC.Hs import GHC.Core.Type import GHC.Data.FastString@@ -25,7 +26,6 @@ import GHC.Types.Name import GHC.Types.Unique.Supply import GHC.Types.SrcLoc-import GHC.Utils.Misc import GHC.Utils.Outputable import GHC.Utils.Logger import GHC.HsToCore.Monad@@ -51,8 +51,7 @@ mkPmId :: Type -> DsM Id mkPmId ty = getUniqueM >>= \unique -> let occname = mkVarOccFS $ fsLit "pm"- name = mkInternalName unique occname noSrcSpan- in return (mkLocalIdOrCoVar name ManyTy ty)+ in return (mkUserLocalOrCoVar occname unique ManyTy ty noSrcSpan) {-# NOINLINE mkPmId #-} -- We'll CPR deeply, that should be enough -- | All warning flags that need to run the pattern match checker.@@ -109,24 +108,36 @@ -- 'HsMatchContext' (does not matter whether it is the redundancy check or the -- exhaustiveness check). isMatchContextPmChecked :: DynFlags -> Origin -> HsMatchContext id -> Bool-isMatchContextPmChecked dflags origin kind- | isGenerated origin+isMatchContextPmChecked dflags origin ctxt+ = requiresPMC origin+ && (overlapping dflags ctxt || exhaustive dflags ctxt)++-- | Check whether exhaustivity checks are enabled for this 'HsMatchContext',+-- when dealing with a single pattern (using the 'matchSinglePatVar' function).+isMatchContextPmChecked_SinglePat :: DynFlags -> Origin -> HsMatchContext id -> LPat GhcTc -> Bool+isMatchContextPmChecked_SinglePat dflags origin ctxt pat+ | not (needToRunPmCheck dflags origin) = False+ | StmtCtxt {} <- ctxt+ -- For @StmtCtxt@, we are interested in propagating pattern-match information+ -- but not in the actual outcome of pattern-match checking, so we skip+ -- if the pattern is "boring" (gives rise to no long-distance information).+ -- (This is done purely for runtime performance.)+ = not (isBoringHsPat pat) -- See Note [Boring patterns] in GHC.Hs.Pat. | otherwise- = overlapping dflags kind || exhaustive dflags kind+ = overlapping dflags ctxt || exhaustive dflags ctxt -- | Return True when any of the pattern match warnings ('allPmCheckWarnings') -- are enabled, in which case we need to run the pattern match checker. needToRunPmCheck :: DynFlags -> Origin -> Bool needToRunPmCheck dflags origin- | isGenerated origin- = False- | otherwise- = notNull (filter (`wopt` dflags) allPmCheckWarnings)+ = requiresPMC origin+ && any (`wopt` dflags) allPmCheckWarnings {- Note [Inaccessible warnings for record updates] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (#12957)+Consider (#12957):+ data T a where T1 :: { x :: Int } -> T Bool T2 :: { x :: Int } -> T a@@ -135,8 +146,9 @@ f :: T Char -> T a f r = r { x = 3 } -The desugarer will conservatively generate a case for T1 even though-it's impossible:+In GHC.Tc.Gen.Expr.desugarRecordUpd, we will conservatively generate a case+for T1 even though it's impossible:+ f r = case r of T1 x -> T1 3 -- Inaccessible branch T2 x -> T2 3@@ -144,13 +156,14 @@ We don't want to warn about the inaccessible branch because the programmer didn't put it there! So we filter out the warning here.+The test case T12957a checks this. The same can happen for long distance term constraints instead of type constraints (#17783): - data T = A { x :: Int } | B { x :: Int }+ data T = A { x :: Int } | B f r@A{} = r { x = 3 }- f _ = B 0+ f _ = B Here, the long distance info from the FunRhs match (@r ~ A x@) will make the clause matching on @B@ of the desugaring to @case@ redundant. It's generated
GHC/HsToCore/Quote.hs view
@@ -2,7 +2,9 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-}+{-# LANGUAGE MultiWayIf #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -32,7 +34,7 @@ import GHC.Prelude import GHC.Platform -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.HsToCore.Errors.Types import {-# SOURCE #-} GHC.HsToCore.Expr ( dsExpr )@@ -94,11 +96,10 @@ import Data.ByteString ( unpack ) import Control.Monad import Data.List (sort, sortBy)-import Data.List.NonEmpty ( NonEmpty(..) )+import Data.List.NonEmpty ( NonEmpty(..), toList ) import Data.Function import Control.Monad.Trans.Reader import Control.Monad.Trans.Class-import Data.Foldable ( toList ) import GHC.Types.Name.Reader (RdrName(..)) data MetaWrappers = MetaWrappers {@@ -143,9 +144,9 @@ mkWpTyApps [m_var] tyWrapper t = mkAppTy m_var t debug = (quoteWrapper, monadWrapper, m_var)- q_f <- dsHsWrapper quoteWrapper- m_f <- dsHsWrapper monadWrapper- return (MetaWrappers q_f m_f tyWrapper debug)+ dsHsWrapper quoteWrapper $ \q_f -> do {+ dsHsWrapper monadWrapper $ \m_f -> do {+ return (MetaWrappers q_f m_f tyWrapper debug) } } -- Turn A into m A wrapName :: Name -> MetaM Type@@ -513,7 +514,7 @@ ------------------------- repDataDefn :: Core TH.Name- -> Either (Core [(M (TH.TyVarBndr ()))])+ -> Either (Core [(M (TH.TyVarBndr TH.BndrVis))]) -- the repTyClD case (Core (Maybe [(M (TH.TyVarBndr ()))]), Core (M TH.Type)) -- the repDataFamInstD case@@ -536,7 +537,7 @@ derivs1 } } -repSynDecl :: Core TH.Name -> Core [(M (TH.TyVarBndr ()))]+repSynDecl :: Core TH.Name -> Core [(M (TH.TyVarBndr TH.BndrVis))] -> LHsType GhcRn -> MetaM (Core (M TH.Dec)) repSynDecl tc bndrs ty@@ -1179,6 +1180,17 @@ rep_flag SpecifiedSpec = rep2_nw specifiedSpecName [] rep_flag InferredSpec = rep2_nw inferredSpecName [] +instance RepTV (HsBndrVis GhcRn) TH.BndrVis where+ tyVarBndrName = tyVarBndrVisTyConName+ repPlainTV (MkC nm) vis = do { (MkC vis') <- rep_bndr_vis vis+ ; rep2 plainBndrTVName [nm, vis'] }+ repKindedTV (MkC nm) vis (MkC ki) = do { (MkC vis') <- rep_bndr_vis vis+ ; rep2 kindedBndrTVName [nm, vis', ki] }++rep_bndr_vis :: HsBndrVis GhcRn -> MetaM (Core TH.BndrVis)+rep_bndr_vis HsBndrRequired = rep2_nw bndrReqName []+rep_bndr_vis (HsBndrInvisible _) = rep2_nw bndrInvisName []+ addHsOuterFamEqnTyVarBinds :: HsOuterFamEqnTyVarBndrs GhcRn -> (Core (Maybe [M TH.TyVarBndrUnit]) -> MetaM (Core (M a)))@@ -1284,7 +1296,7 @@ addQTyVarBinds :: FreshOrReuse -> LHsQTyVars GhcRn -- the binders to be added- -> (Core [(M (TH.TyVarBndr ()))] -> MetaM (Core (M a))) -- action in the ext env+ -> (Core [(M (TH.TyVarBndr TH.BndrVis))] -> MetaM (Core (M a))) -- action in the ext env -> MetaM (Core (M a)) addQTyVarBinds fresh_or_reuse qtvs thing_inside = let HsQTvs { hsq_ext = imp_tvs@@ -1389,7 +1401,7 @@ f1 <- repLTy f a1 <- repLTy a repTapp f1 a1-repTy (HsAppKindTy _ ty ki) = do+repTy (HsAppKindTy _ ty _ ki) = do ty1 <- repLTy ty ki1 <- repLTy ki repTappKind ty1 ki1@@ -1608,15 +1620,15 @@ = do { x <- lookupLOcc c; fs <- repFields flds; repRecCon x fs }-repE (RecordUpd { rupd_expr = e, rupd_flds = Left flds })+repE (RecordUpd { rupd_expr = e, rupd_flds = RegularRecUpdFields { recUpdFields = flds } }) = do { x <- repLE e; fs <- repUpdFields flds; repRecUpd x fs }-repE (RecordUpd { rupd_flds = Right _ })+repE e@(RecordUpd { rupd_flds = OverloadedRecUpdFields {} }) = do -- Not possible due to elimination in the renamer. See Note -- [Handling overloaded and rebindable constructs]- panic "The impossible has happened!"+ pprPanic "repE: unexpected overloaded record update" $ ppr e repE (ExprWithTySig _ e wc_ty) = addSimpleTyVarBinds FreshNamesOnly (get_scoped_tvs_from_sig sig_ty) $@@ -1745,10 +1757,10 @@ ; e <- repLE (hfbRHS fld) ; repFieldExp fn e } -repUpdFields :: [LHsRecUpdField GhcRn] -> MetaM (Core [M TH.FieldExp])+repUpdFields :: [LHsRecUpdField GhcRn GhcRn] -> MetaM (Core [M TH.FieldExp]) repUpdFields = repListM fieldExpTyConName rep_fld where- rep_fld :: LHsRecUpdField GhcRn -> MetaM (Core (M TH.FieldExp))+ rep_fld :: LHsRecUpdField GhcRn GhcRn -> MetaM (Core (M TH.FieldExp)) rep_fld (L l fld) = case unLoc (hfbLHS fld) of Unambiguous sel_name _ -> do { fn <- lookupLOcc (L l sel_name) ; e <- repLE (hfbRHS fld)@@ -1899,12 +1911,18 @@ fun_matches = MG { mg_alts = (L _ [L _ (Match { m_pats = []- , m_grhss = GRHSs _ guards wheres }- )]) } }))+ , m_grhss = GRHSs _ guards wheres+ -- For a variable declaration I'm pretty+ -- sure we always have a FunRhs+ , m_ctxt = FunRhs { mc_strictness = strictessAnn }+ } )]) } })) = do { (ss,wherecore) <- repBinds wheres ; guardcore <- addBinds ss (repGuards guards) ; fn' <- lookupNBinder fn- ; p <- repPvar fn'+ ; p <- repPvar fn' >>= case strictessAnn of+ SrcLazy -> repPtilde+ SrcStrict -> repPbang+ NoSrcStrict -> pure ; ans <- repVal p guardcore wherecore ; ans' <- wrapGenSyms ss ans ; return (locA loc, ans') }@@ -1925,15 +1943,6 @@ ; ans' <- wrapGenSyms ss ans ; return (locA loc, ans') } -rep_bind (L _ (VarBind { var_id = v, var_rhs = e}))- = do { v' <- lookupBinder v- ; e2 <- repLE e- ; x <- repNormal e2- ; patcore <- repPvar v'- ; empty_decls <- coreListM decTyConName []- ; ans <- repVal patcore x empty_decls- ; return (srcLocSpan (getSrcLoc v), ans) }- rep_bind (L loc (PatSynBind _ (PSB { psb_id = syn , psb_args = args , psb_def = pat@@ -1972,6 +1981,8 @@ wrapGenArgSyms (RecCon _) _ dec = return dec wrapGenArgSyms _ ss dec = wrapGenSyms ss dec +rep_bind (L _ (VarBind { var_ext = x })) = dataConCantHappen x+ repPatSynD :: Core TH.Name -> Core (M TH.PatSynArgs) -> Core (M TH.PatSynDir)@@ -2211,21 +2222,25 @@ globalVarExternal :: Module -> OccName -> DsM (Core TH.Name) globalVarExternal mod name_occ- = do {-- ; MkC mod <- coreStringLit name_mod+ = do { MkC mod <- coreStringLit name_mod ; MkC pkg <- coreStringLit name_pkg ; MkC occ <- occNameLit name_occ- ; rep2_nwDsM mk_varg [pkg,mod,occ] }+ ; if | isDataOcc name_occ+ -> rep2_nwDsM mkNameG_dName [pkg,mod,occ]+ | isVarOcc name_occ+ -> rep2_nwDsM mkNameG_vName [pkg,mod,occ]+ | isTcOcc name_occ+ -> rep2_nwDsM mkNameG_tcName [pkg,mod,occ]+ | Just con_fs <- fieldOcc_maybe name_occ+ -> do { MkC con <- coreStringLit con_fs+ ; rep2_nwDsM mkNameG_fldName [pkg,mod,con,occ] }+ | otherwise+ -> pprPanic "GHC.HsToCore.Quote.globalVar" (ppr name_occ)+ } where name_mod = moduleNameFS (moduleName mod) name_pkg = unitFS (moduleUnit mod)- mk_varg | isDataOcc name_occ = mkNameG_dName- | isVarOcc name_occ = mkNameG_vName- | isTcOcc name_occ = mkNameG_tcName- | otherwise = pprPanic "GHC.HsToCore.Quote.globalVar" (ppr name_occ) - lookupType :: Name -- Name of type constructor (e.g. (M TH.Exp)) -> MetaM Type -- The type lookupType tc_name = do { tc <- lift $ dsLookupTyCon tc_name ;@@ -2537,7 +2552,7 @@ repData :: Bool -- ^ @True@ for a @type data@ declaration. -- See Note [Type data declarations] in GHC.Rename.Module -> Core (M TH.Cxt) -> Core TH.Name- -> Either (Core [(M (TH.TyVarBndr ()))])+ -> Either (Core [(M (TH.TyVarBndr TH.BndrVis))]) (Core (Maybe [(M (TH.TyVarBndr ()))]), Core (M TH.Type)) -> Core (Maybe (M TH.Kind)) -> Core [(M TH.Con)] -> Core [M TH.DerivClause] -> MetaM (Core (M TH.Dec))@@ -2549,7 +2564,7 @@ = rep2 dataInstDName [cxt, mb_bndrs, ty, ksig, cons, derivs] repNewtype :: Core (M TH.Cxt) -> Core TH.Name- -> Either (Core [(M (TH.TyVarBndr ()))])+ -> Either (Core [(M (TH.TyVarBndr TH.BndrVis))]) (Core (Maybe [(M (TH.TyVarBndr ()))]), Core (M TH.Type)) -> Core (Maybe (M TH.Kind)) -> Core (M TH.Con) -> Core [M TH.DerivClause] -> MetaM (Core (M TH.Dec))@@ -2560,7 +2575,7 @@ (MkC derivs) = rep2 newtypeInstDName [cxt, mb_bndrs, ty, ksig, con, derivs] -repTySyn :: Core TH.Name -> Core [(M (TH.TyVarBndr ()))]+repTySyn :: Core TH.Name -> Core [(M (TH.TyVarBndr TH.BndrVis))] -> Core (M TH.Type) -> MetaM (Core (M TH.Dec)) repTySyn (MkC nm) (MkC tvs) (MkC rhs) = rep2 tySynDName [nm, tvs, rhs]@@ -2613,12 +2628,13 @@ Overlapping _ -> just =<< dataCon overlappingDataConName Overlaps _ -> just =<< dataCon overlapsDataConName Incoherent _ -> just =<< dataCon incoherentDataConName+ NonCanonical _ -> just =<< dataCon incoherentDataConName where nothing = coreNothing overlapTyConName just = coreJust overlapTyConName -repClass :: Core (M TH.Cxt) -> Core TH.Name -> Core [(M (TH.TyVarBndr ()))]+repClass :: Core (M TH.Cxt) -> Core TH.Name -> Core [(M (TH.TyVarBndr TH.BndrVis))] -> Core [TH.FunDep] -> Core [(M TH.Dec)] -> MetaM (Core (M TH.Dec)) repClass (MkC cxt) (MkC cls) (MkC tvs) (MkC fds) (MkC ds)@@ -2667,13 +2683,13 @@ repTySynInst (MkC eqn) = rep2 tySynInstDName [eqn] -repDataFamilyD :: Core TH.Name -> Core [(M (TH.TyVarBndr ()))]+repDataFamilyD :: Core TH.Name -> Core [(M (TH.TyVarBndr TH.BndrVis))] -> Core (Maybe (M TH.Kind)) -> MetaM (Core (M TH.Dec)) repDataFamilyD (MkC nm) (MkC tvs) (MkC kind) = rep2 dataFamilyDName [nm, tvs, kind] repOpenFamilyD :: Core TH.Name- -> Core [(M (TH.TyVarBndr ()))]+ -> Core [(M (TH.TyVarBndr TH.BndrVis))] -> Core (M TH.FamilyResultSig) -> Core (Maybe TH.InjectivityAnn) -> MetaM (Core (M TH.Dec))@@ -2681,7 +2697,7 @@ = rep2 openTypeFamilyDName [nm, tvs, result, inj] repClosedFamilyD :: Core TH.Name- -> Core [(M (TH.TyVarBndr ()))]+ -> Core [(M (TH.TyVarBndr TH.BndrVis))] -> Core (M TH.FamilyResultSig) -> Core (Maybe TH.InjectivityAnn) -> Core [(M TH.TySynEqn)]
GHC/HsToCore/Ticks.hs view
@@ -550,14 +550,16 @@ = do { rec_binds' <- addTickHsRecordBinds rec_binds ; return (expr { rcon_flds = rec_binds' }) } -addTickHsExpr expr@(RecordUpd { rupd_expr = e, rupd_flds = Left flds })+addTickHsExpr expr@(RecordUpd { rupd_expr = e+ , rupd_flds = upd@(RegularRecUpdFields { recUpdFields = flds }) }) = do { e' <- addTickLHsExpr e ; flds' <- mapM addTickHsRecField flds- ; return (expr { rupd_expr = e', rupd_flds = Left flds' }) }-addTickHsExpr expr@(RecordUpd { rupd_expr = e, rupd_flds = Right flds })+ ; return (expr { rupd_expr = e', rupd_flds = upd { recUpdFields = flds' } }) }+addTickHsExpr expr@(RecordUpd { rupd_expr = e+ , rupd_flds = upd@(OverloadedRecUpdFields { olRecUpdFields = flds } ) }) = do { e' <- addTickLHsExpr e ; flds' <- mapM addTickHsRecField flds- ; return (expr { rupd_expr = e', rupd_flds = Right flds' }) }+ ; return (expr { rupd_expr = e', rupd_flds = upd { olRecUpdFields = flds' } }) } addTickHsExpr (ExprWithTySig x e ty) = liftM3 ExprWithTySig@@ -1180,24 +1182,23 @@ , tick_label = boxLabel } - cc_name | topOnly = head decl_path- | otherwise = concat (intersperse "." decl_path)+ cc_name | topOnly = mkFastString $ head decl_path+ | otherwise = mkFastString $ concat (intersperse "." decl_path) env <- getEnv case tickishType env of HpcTicks -> HpcTick (this_mod env) <$> addMixEntry me ProfNotes -> do- let nm = mkFastString cc_name- flavour <- mkHpcCCFlavour <$> getCCIndexM nm- let cc = mkUserCC nm (this_mod env) pos flavour+ flavour <- mkHpcCCFlavour <$> getCCIndexM cc_name+ let cc = mkUserCC cc_name (this_mod env) pos flavour count = countEntries && tte_countEntries env return $ ProfNote cc count True{-scopes-} Breakpoints -> Breakpoint noExtField <$> addMixEntry me <*> pure ids SourceNotes | RealSrcSpan pos' _ <- pos ->- return $ SourceNote pos' cc_name+ return $ SourceNote pos' $ LexicalFastString cc_name _otherwise -> panic "mkTickish: bad source span!"
GHC/HsToCore/Types.hs view
@@ -1,5 +1,10 @@ {-# LANGUAGE TypeFamilies, UndecidableInstances #-} +{-# OPTIONS_GHC -Wno-orphans #-}+ -- Don't warn that `type instance DsForeignsHooks = ...`+ -- is an orphan; see Note [The Decoupling Abstract Data Hack]+ -- in GHC.Driver.Hooks+ -- | Various types used during desugaring. module GHC.HsToCore.Types ( DsM, DsLclEnv(..), DsGblEnv(..),@@ -9,6 +14,7 @@ import GHC.Prelude (Int) import Data.IORef+import qualified Data.Set as S import GHC.Types.CostCentre.State import GHC.Types.Error@@ -73,6 +79,9 @@ -- ^ See Note [Long-distance information] in "GHC.HsToCore.Pmc". -- The set of reaching values Nablas is augmented as we walk inwards, refined -- through each pattern match in turn+ , dsl_unspecables :: S.Set EvVar+ -- ^ See Note [Desugaring non-canonical evidence]: this field collects+ -- all un-specialisable evidence variables in scope. } -- Inside [| |] brackets, the desugarer looks
GHC/HsToCore/Usage.hs view
@@ -35,6 +35,7 @@ import GHC.Unit.Module.Deps import GHC.Data.Maybe+import GHC.Data.FastString import Data.IORef import Data.List (sortBy)@@ -86,7 +87,7 @@ let all_home_ids = ue_all_home_unit_ids unit_env mod_usages <- mk_mod_usage_info uc hu all_home_ids this_mod dir_imp_mods used_names- let usages = mod_usages ++ [ UsageFile { usg_file_path = f+ let usages = mod_usages ++ [ UsageFile { usg_file_path = mkFastString f , usg_file_hash = hash , usg_file_label = Nothing } | (f, hash) <- zip dependent_files hashes ]@@ -174,7 +175,7 @@ msg m = moduleNameString (moduleName m) ++ "[TH] changed" - fing mmsg fn = UsageFile fn <$> lookupFileCache fc fn <*> pure mmsg+ fing mmsg fn = UsageFile (mkFastString fn) <$> lookupFileCache fc fn <*> pure mmsg unlinkedToUsage m ul = case nameOfObject_maybe ul of
GHC/HsToCore/Utils.hs view
@@ -79,9 +79,8 @@ import GHC.Types.SrcLoc import GHC.Types.Tickish import GHC.Utils.Misc-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Ppr-import GHC.Data.FastString import qualified GHC.LanguageExtensions as LangExt import GHC.Tc.Types.Evidence@@ -142,7 +141,7 @@ -- multiplicity stored within the variable -- itself. It's easier to pull it from the -- variable, so we ignore the multiplicity.-selectMatchVar _w (AsPat _ var _ _) = assert (isManyTy _w ) (return (unLoc var))+selectMatchVar _w (AsPat _ var _ _) = assert (isManyTy _w ) (return (localiseId (unLoc var))) selectMatchVar w other_pat = newSysLocalDs w (hsPatType other_pat) {- Note [Localise pattern binders]@@ -454,7 +453,7 @@ is disabled. -} -mkFailExpr :: HsMatchContext GhcRn -> Type -> DsM CoreExpr+mkFailExpr :: HsMatchContext GhcTc -> Type -> DsM CoreExpr mkFailExpr ctxt ty = mkErrorAppDs pAT_ERROR_ID ty (matchContextErrString ctxt) @@ -995,19 +994,10 @@ mkBinaryTickBox :: Int -> Int -> CoreExpr -> DsM CoreExpr mkBinaryTickBox ixT ixF e = do- uq <- newUnique this_mod <- getModule- let bndr1 = mkSysLocal (fsLit "t1") uq OneTy boolTy- -- It's always sufficient to pattern-match on a boolean with- -- multiplicity 'One'.- let+ let trueBox = Tick (HpcTick this_mod ixT) (Var trueDataConId) falseBox = Tick (HpcTick this_mod ixF) (Var falseDataConId)- trueBox = Tick (HpcTick this_mod ixT) (Var trueDataConId)- --- return $ Case e bndr1 boolTy- [ Alt (DataAlt falseDataCon) [] falseBox- , Alt (DataAlt trueDataCon) [] trueBox- ]+ return $ mkIfThenElse e trueBox falseBox
GHC/Iface/Binary.hs view
@@ -292,7 +292,7 @@ -- create an array of Names for the symbols and add them to the NameCache updateNameCache' name_cache $ \cache0 -> do mut_arr <- newArray_ (0, sz-1) :: IO (IOArray Int Name)- cache <- foldGet (fromIntegral sz) bh cache0 $ \i (uid, mod_name, occ) cache -> do+ cache <- foldGet' (fromIntegral sz) bh cache0 $ \i (uid, mod_name, occ) cache -> do let mod = mkModule uid mod_name case lookupOrigNameCache cache mod occ of Just name -> do
+ GHC/Iface/Decl.hs view
@@ -0,0 +1,345 @@++{-# LANGUAGE NondecreasingIndentation #-}+{-# LANGUAGE LambdaCase #-}++{-+(c) The University of Glasgow 2006-2008+(c) The GRASP/AQUA Project, Glasgow University, 1993-1998+-}++-- | Module for constructing interface declaration values+-- from the corresponding 'TyThing's.++module GHC.Iface.Decl+ ( coAxiomToIfaceDecl+ , tyThingToIfaceDecl -- Converting things to their Iface equivalents+ , toIfaceBooleanFormula+ )+where++import GHC.Prelude++import GHC.Tc.Utils.TcType++import GHC.Iface.Syntax++import GHC.CoreToIface++import GHC.Core.Class+import GHC.Core.TyCon+import GHC.Core.Coercion.Axiom+import GHC.Core.ConLike+import GHC.Core.DataCon+import GHC.Core.Type+import GHC.Core.Multiplicity+++import GHC.Types.Id+import GHC.Types.Var.Env+import GHC.Types.Var+import GHC.Types.Name+import GHC.Types.Basic+import GHC.Types.TyThing+import GHC.Types.SrcLoc++import GHC.Utils.Panic.Plain+import GHC.Utils.Misc++import GHC.Data.FastString+import GHC.Data.Maybe+import GHC.Data.BooleanFormula++import Data.List ( findIndex, mapAccumL )++{-+************************************************************************+* *+ Converting things to their Iface equivalents+* *+************************************************************************+-}++tyThingToIfaceDecl :: Bool -> TyThing -> IfaceDecl+tyThingToIfaceDecl _ (AnId id) = idToIfaceDecl id+tyThingToIfaceDecl _ (ATyCon tycon) = snd (tyConToIfaceDecl emptyTidyEnv tycon)+tyThingToIfaceDecl _ (ACoAxiom ax) = coAxiomToIfaceDecl ax+tyThingToIfaceDecl show_linear_types (AConLike cl) = case cl of+ RealDataCon dc -> dataConToIfaceDecl show_linear_types dc -- for ppr purposes only+ PatSynCon ps -> patSynToIfaceDecl ps++--------------------------+idToIfaceDecl :: Id -> IfaceDecl+-- The Id is already tidied, so that locally-bound names+-- (lambdas, for-alls) already have non-clashing OccNames+-- We can't tidy it here, locally, because it may have+-- free variables in its type or IdInfo+idToIfaceDecl id+ = IfaceId { ifName = getName id,+ ifType = toIfaceType (idType id),+ ifIdDetails = toIfaceIdDetails (idDetails id),+ ifIdInfo = toIfaceIdInfo (idInfo id) }++--------------------------+dataConToIfaceDecl :: Bool -> DataCon -> IfaceDecl+dataConToIfaceDecl show_linear_types dataCon+ = IfaceId { ifName = getName dataCon,+ ifType = toIfaceType (dataConDisplayType show_linear_types dataCon),+ ifIdDetails = IfVanillaId,+ ifIdInfo = [] }++--------------------------+coAxiomToIfaceDecl :: CoAxiom br -> IfaceDecl+-- We *do* tidy Axioms, because they are not (and cannot+-- conveniently be) built in tidy form+coAxiomToIfaceDecl ax@(CoAxiom { co_ax_tc = tycon, co_ax_branches = branches+ , co_ax_role = role })+ = IfaceAxiom { ifName = getName ax+ , ifTyCon = toIfaceTyCon tycon+ , ifRole = role+ , ifAxBranches = map (coAxBranchToIfaceBranch tycon+ (map coAxBranchLHS branch_list))+ branch_list }+ where+ branch_list = fromBranches branches++-- 2nd parameter is the list of branch LHSs, in case of a closed type family,+-- for conversion from incompatible branches to incompatible indices.+-- For an open type family the list should be empty.+-- See Note [Storing compatibility] in GHC.Core.Coercion.Axiom+coAxBranchToIfaceBranch :: TyCon -> [[Type]] -> CoAxBranch -> IfaceAxBranch+coAxBranchToIfaceBranch tc lhs_s+ (CoAxBranch { cab_tvs = tvs, cab_cvs = cvs+ , cab_eta_tvs = eta_tvs+ , cab_lhs = lhs, cab_roles = roles+ , cab_rhs = rhs, cab_incomps = incomps })++ = IfaceAxBranch { ifaxbTyVars = toIfaceTvBndrs tvs+ , ifaxbCoVars = map toIfaceIdBndr cvs+ , ifaxbEtaTyVars = toIfaceTvBndrs eta_tvs+ , ifaxbLHS = toIfaceTcArgs tc lhs+ , ifaxbRoles = roles+ , ifaxbRHS = toIfaceType rhs+ , ifaxbIncomps = iface_incomps }+ where+ iface_incomps = map (expectJust "iface_incomps"+ . flip findIndex lhs_s+ . eqTypes+ . coAxBranchLHS) incomps++-----------------+tyConToIfaceDecl :: TidyEnv -> TyCon -> (TidyEnv, IfaceDecl)+-- We *do* tidy TyCons, because they are not (and cannot+-- conveniently be) built in tidy form+-- The returned TidyEnv is the one after tidying the tyConTyVars+tyConToIfaceDecl env tycon+ | Just clas <- tyConClass_maybe tycon+ = classToIfaceDecl env clas++ | Just syn_rhs <- synTyConRhs_maybe tycon+ = ( tc_env1+ , IfaceSynonym { ifName = getName tycon,+ ifRoles = tyConRoles tycon,+ ifSynRhs = if_syn_type syn_rhs,+ ifBinders = if_binders,+ ifResKind = if_res_kind+ })++ | Just fam_flav <- famTyConFlav_maybe tycon+ = ( tc_env1+ , IfaceFamily { ifName = getName tycon,+ ifResVar = if_res_var,+ ifFamFlav = to_if_fam_flav fam_flav,+ ifBinders = if_binders,+ ifResKind = if_res_kind,+ ifFamInj = tyConInjectivityInfo tycon+ })++ | isAlgTyCon tycon+ = ( tc_env1+ , IfaceData { ifName = getName tycon,+ ifBinders = if_binders,+ ifResKind = if_res_kind,+ ifCType = tyConCType_maybe tycon,+ ifRoles = tyConRoles tycon,+ ifCtxt = tidyToIfaceContext tc_env1 (tyConStupidTheta tycon),+ ifCons = ifaceConDecls (algTyConRhs tycon),+ ifGadtSyntax = isGadtSyntaxTyCon tycon,+ ifParent = parent })++ | otherwise -- FunTyCon, PrimTyCon, promoted TyCon/DataCon+ -- We only convert these TyCons to IfaceTyCons when we are+ -- just about to pretty-print them, not because we are going+ -- to put them into interface files+ = ( env+ , IfaceData { ifName = getName tycon,+ ifBinders = if_binders,+ ifResKind = if_res_kind,+ ifCType = Nothing,+ ifRoles = tyConRoles tycon,+ ifCtxt = [],+ ifCons = IfDataTyCon False [],+ ifGadtSyntax = False,+ ifParent = IfNoParent })+ where+ -- NOTE: Not all TyCons have `tyConTyVars` field. Forcing this when `tycon`+ -- is one of these TyCons (FunTyCon, PrimTyCon, PromotedDataCon) will cause+ -- an error.+ (tc_env1, tc_binders) = tidyTyConBinders env (tyConBinders tycon)+ tc_tyvars = binderVars tc_binders+ if_binders = toIfaceForAllBndrs tc_binders+ -- No tidying of the binders; they are already tidy+ if_res_kind = tidyToIfaceType tc_env1 (tyConResKind tycon)+ if_syn_type ty = tidyToIfaceType tc_env1 ty+ if_res_var = getOccFS `fmap` tyConFamilyResVar_maybe tycon++ parent = case tyConFamInstSig_maybe tycon of+ Just (tc, ty, ax) -> IfDataInstance (coAxiomName ax)+ (toIfaceTyCon tc)+ (tidyToIfaceTcArgs tc_env1 tc ty)+ Nothing -> IfNoParent++ to_if_fam_flav OpenSynFamilyTyCon = IfaceOpenSynFamilyTyCon+ to_if_fam_flav AbstractClosedSynFamilyTyCon = IfaceAbstractClosedSynFamilyTyCon+ to_if_fam_flav (DataFamilyTyCon {}) = IfaceDataFamilyTyCon+ to_if_fam_flav (BuiltInSynFamTyCon {}) = IfaceBuiltInSynFamTyCon+ to_if_fam_flav (ClosedSynFamilyTyCon Nothing) = IfaceClosedSynFamilyTyCon Nothing+ to_if_fam_flav (ClosedSynFamilyTyCon (Just ax))+ = IfaceClosedSynFamilyTyCon (Just (axn, ibr))+ where defs = fromBranches $ coAxiomBranches ax+ lhss = map coAxBranchLHS defs+ ibr = map (coAxBranchToIfaceBranch tycon lhss) defs+ axn = coAxiomName ax++ ifaceConDecls (NewTyCon { data_con = con }) = IfNewTyCon (ifaceConDecl con)+ ifaceConDecls (DataTyCon { data_cons = cons, is_type_data = type_data })+ = IfDataTyCon type_data (map ifaceConDecl cons)+ ifaceConDecls (TupleTyCon { data_con = con }) = IfDataTyCon False [ifaceConDecl con]+ ifaceConDecls (SumTyCon { data_cons = cons }) = IfDataTyCon False (map ifaceConDecl cons)+ ifaceConDecls AbstractTyCon = IfAbstractTyCon+ -- The AbstractTyCon case happens when a TyCon has been trimmed+ -- during tidying.+ -- Furthermore, tyThingToIfaceDecl is also used in GHC.Tc.Module+ -- for GHCi, when browsing a module, in which case the+ -- AbstractTyCon and TupleTyCon cases are perfectly sensible.+ -- (Tuple declarations are not serialised into interface files.)++ ifaceConDecl data_con+ = IfCon { ifConName = dataConName data_con,+ ifConInfix = dataConIsInfix data_con,+ ifConWrapper = isJust (dataConWrapId_maybe data_con),+ ifConExTCvs = map toIfaceBndr ex_tvs',+ ifConUserTvBinders = toIfaceForAllBndrs user_bndrs',+ ifConEqSpec = map (to_eq_spec . eqSpecPair) eq_spec,+ ifConCtxt = tidyToIfaceContext con_env2 theta,+ ifConArgTys =+ map (\(Scaled w t) -> (tidyToIfaceType con_env2 w+ , (tidyToIfaceType con_env2 t))) arg_tys,+ ifConFields = dataConFieldLabels data_con,+ ifConStricts = map (toIfaceBang con_env2)+ (dataConImplBangs data_con),+ ifConSrcStricts = map toIfaceSrcBang+ (dataConSrcBangs data_con)}+ where+ (univ_tvs, ex_tvs, eq_spec, theta, arg_tys, _)+ = dataConFullSig data_con+ user_bndrs = dataConUserTyVarBinders data_con++ -- Tidy the univ_tvs of the data constructor to be identical+ -- to the tyConTyVars of the type constructor. This means+ -- (a) we don't need to redundantly put them into the interface file+ -- (b) when pretty-printing an Iface data declaration in H98-style syntax,+ -- we know that the type variables will line up+ -- The latter (b) is important because we pretty-print type constructors+ -- by converting to Iface syntax and pretty-printing that+ con_env1 = (fst tc_env1, mkVarEnv (zipEqual "ifaceConDecl" univ_tvs tc_tyvars))+ -- A bit grimy, perhaps, but it's simple!++ (con_env2, ex_tvs') = tidyVarBndrs con_env1 ex_tvs+ user_bndrs' = map (tidyUserForAllTyBinder con_env2) user_bndrs+ to_eq_spec (tv,ty) = (tidyTyVar con_env2 tv, tidyToIfaceType con_env2 ty)++ -- By this point, we have tidied every universal and existential+ -- tyvar. Because of the dcUserForAllTyBinders invariant+ -- (see Note [DataCon user type variable binders]), *every*+ -- user-written tyvar must be contained in the substitution that+ -- tidying produced. Therefore, tidying the user-written tyvars is a+ -- simple matter of looking up each variable in the substitution,+ -- which tidyTyCoVarOcc accomplishes.+ tidyUserForAllTyBinder :: TidyEnv -> InvisTVBinder -> InvisTVBinder+ tidyUserForAllTyBinder env (Bndr tv vis) =+ Bndr (tidyTyCoVarOcc env tv) vis++classToIfaceDecl :: TidyEnv -> Class -> (TidyEnv, IfaceDecl)+classToIfaceDecl env clas+ = ( env1+ , IfaceClass { ifName = getName tycon,+ ifRoles = tyConRoles (classTyCon clas),+ ifBinders = toIfaceForAllBndrs tc_binders,+ ifBody = body,+ ifFDs = map toIfaceFD clas_fds })+ where+ (_, clas_fds, sc_theta, _, clas_ats, op_stuff)+ = classExtraBigSig clas+ tycon = classTyCon clas++ body | isAbstractTyCon tycon = IfAbstractClass+ | otherwise+ = IfConcreteClass {+ ifClassCtxt = tidyToIfaceContext env1 sc_theta,+ ifATs = map toIfaceAT clas_ats,+ ifSigs = map toIfaceClassOp op_stuff,+ ifMinDef = toIfaceBooleanFormula $ fmap getOccFS (classMinimalDef clas)+ }++ (env1, tc_binders) = tidyTyConBinders env (tyConBinders tycon)++ toIfaceAT :: ClassATItem -> IfaceAT+ toIfaceAT (ATI tc def)+ = IfaceAT if_decl (fmap (tidyToIfaceType env2 . fst) def)+ where+ (env2, if_decl) = tyConToIfaceDecl env1 tc++ toIfaceClassOp (sel_id, def_meth)+ = assert (sel_tyvars == binderVars tc_binders) $+ IfaceClassOp (getName sel_id)+ (tidyToIfaceType env1 op_ty)+ (fmap toDmSpec def_meth)+ where+ -- Be careful when splitting the type, because of things+ -- like class Foo a where+ -- op :: (?x :: String) => a -> a+ -- and class Baz a where+ -- op :: (Ord a) => a -> a+ (sel_tyvars, rho_ty) = splitForAllTyCoVars (idType sel_id)+ op_ty = funResultTy rho_ty++ toDmSpec :: (Name, DefMethSpec Type) -> DefMethSpec IfaceType+ toDmSpec (_, VanillaDM) = VanillaDM+ toDmSpec (_, GenericDM dm_ty) = GenericDM (tidyToIfaceType env1 dm_ty)++ toIfaceFD (tvs1, tvs2) = (map (tidyTyVar env1) tvs1+ ,map (tidyTyVar env1) tvs2)++--------------------------++tidyTyConBinder :: TidyEnv -> TyConBinder -> (TidyEnv, TyConBinder)+-- If the type variable "binder" is in scope, don't re-bind it+-- In a class decl, for example, the ATD binders mention+-- (amd must mention) the class tyvars+tidyTyConBinder env@(_, subst) tvb@(Bndr tv vis)+ = case lookupVarEnv subst tv of+ Just tv' -> (env, Bndr tv' vis)+ Nothing -> tidyForAllTyBinder env tvb++tidyTyConBinders :: TidyEnv -> [TyConBinder] -> (TidyEnv, [TyConBinder])+tidyTyConBinders = mapAccumL tidyTyConBinder++tidyTyVar :: TidyEnv -> TyVar -> FastString+tidyTyVar (_, subst) tv = toIfaceTyVar (lookupVarEnv subst tv `orElse` tv)++toIfaceBooleanFormula :: BooleanFormula IfLclName -> IfaceBooleanFormula+toIfaceBooleanFormula = \case+ Var nm -> IfVar nm+ And bfs -> IfAnd (map (toIfaceBooleanFormula . unLoc) bfs)+ Or bfs -> IfOr (map (toIfaceBooleanFormula . unLoc) bfs)+ Parens bf -> IfParens (toIfaceBooleanFormula . unLoc $ bf)
GHC/Iface/Env.hs view
@@ -24,7 +24,7 @@ import GHC.Prelude import GHC.Driver.Env-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Tc.Utils.Monad import GHC.Core.Type@@ -193,9 +193,12 @@ tcIfaceLclId :: FastString -> IfL Id tcIfaceLclId occ = do { lcl <- getLclEnv- ; case (lookupFsEnv (if_id_env lcl) occ) of+ ; case lookupFsEnv (if_id_env lcl) occ of Just ty_var -> return ty_var- Nothing -> failIfM (text "Iface id out of scope: " <+> ppr occ)+ Nothing -> failIfM $+ vcat+ [ text "Iface id out of scope: " <+> ppr occ+ , text "env:" <+> ppr (if_id_env lcl) ] } extendIfaceIdEnv :: [Id] -> IfL a -> IfL a@@ -209,7 +212,7 @@ tcIfaceTyVar :: FastString -> IfL TyVar tcIfaceTyVar occ = do { lcl <- getLclEnv- ; case (lookupFsEnv (if_tv_env lcl) occ) of+ ; case lookupFsEnv (if_tv_env lcl) occ of Just ty_var -> return ty_var Nothing -> failIfM (text "Iface type variable out of scope: " <+> ppr occ) }@@ -262,9 +265,9 @@ newIfaceNames :: [OccName] -> IfL [Name] newIfaceNames occs- = do { uniqs <- newUniqueSupply+ = do { uniqs <- getUniquesM ; return [ mkInternalName uniq occ noSrcSpan- | (occ,uniq) <- occs `zip` uniqsFromSupply uniqs] }+ | (occ,uniq) <- occs `zip` uniqs] } trace_if :: Logger -> SDoc -> IO () {-# INLINE trace_if #-}
GHC/Iface/Errors.hs view
@@ -3,95 +3,54 @@ module GHC.Iface.Errors ( badIfaceFile- , hiModuleNameMismatchWarn- , homeModError , cannotFindInterface , cantFindInstalledErr , cannotFindModule- , cantFindErr- -- * Utility functions- , mayShowLocations ) where import GHC.Platform.Profile import GHC.Platform.Ways import GHC.Utils.Panic.Plain-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Env-import GHC.Driver.Errors.Types import GHC.Data.Maybe import GHC.Prelude import GHC.Unit import GHC.Unit.Env import GHC.Unit.Finder.Types import GHC.Utils.Outputable as Outputable+import GHC.Iface.Errors.Types +-- -----------------------------------------------------------------------------+-- Error messages badIfaceFile :: String -> SDoc -> SDoc badIfaceFile file err = vcat [text "Bad interface file:" <+> text file, nest 4 err] -hiModuleNameMismatchWarn :: Module -> Module -> SDoc-hiModuleNameMismatchWarn requested_mod read_mod- | moduleUnit requested_mod == moduleUnit read_mod =- sep [text "Interface file contains module" <+> quotes (ppr read_mod) <> comma,- text "but we were expecting module" <+> quotes (ppr requested_mod),- sep [text "Probable cause: the source code which generated interface file",- text "has an incompatible module name"- ]- ]- | otherwise =- -- ToDo: This will fail to have enough qualification when the package IDs- -- are the same- withPprStyle (mkUserStyle alwaysQualify AllTheWay) $- -- we want the Modules below to be qualified with package names,- -- so reset the NamePprCtx setting.- hsep [ text "Something is amiss; requested module "- , ppr requested_mod- , text "differs from name found in the interface file"- , ppr read_mod- , parens (text "if these names look the same, try again with -dppr-debug")- ]--homeModError :: InstalledModule -> ModLocation -> SDoc--- See Note [Home module load error]-homeModError mod location- = text "attempting to use module " <> quotes (ppr mod)- <> (case ml_hs_file location of- Just file -> space <> parens (text file)- Nothing -> Outputable.empty)- <+> text "which is not loaded"----- -------------------------------------------------------------------------------- Error messages--cannotFindInterface :: UnitState -> Maybe HomeUnit -> Profile -> ([FilePath] -> SDoc) -> ModuleName -> InstalledFindResult -> SDoc-cannotFindInterface = cantFindInstalledErr (text "Failed to load interface for")- (text "Ambiguous interface for")+cannotFindInterface :: UnitState -> Maybe HomeUnit -> Profile+ -> ModuleName -> InstalledFindResult -> MissingInterfaceError+cannotFindInterface us mhu p mn ifr =+ CantFindErr us FindingInterface $+ cantFindInstalledErr us mhu p mn ifr cantFindInstalledErr- :: SDoc- -> SDoc- -> UnitState+ :: UnitState -> Maybe HomeUnit -> Profile- -> ([FilePath] -> SDoc) -> ModuleName -> InstalledFindResult- -> SDoc-cantFindInstalledErr cannot_find _ unit_state mhome_unit profile tried_these mod_name find_result- = cannot_find <+> quotes (ppr mod_name)- $$ more_info+ -> CantFindInstalled+cantFindInstalledErr unit_state mhome_unit profile mod_name find_result+ = CantFindInstalled mod_name more_info where build_tag = waysBuildTag (profileWays profile) more_info = case find_result of InstalledNoPackage pkg- -> text "no unit id matching" <+> quotes (ppr pkg) <+>- text "was found" $$ looks_like_srcpkgid pkg+ -> NoUnitIdMatching pkg (searchPackageId unit_state (PackageId (unitIdFS pkg))) InstalledNotFound files mb_pkg | Just pkg <- mb_pkg@@ -99,152 +58,80 @@ -> not_found_in_package pkg files | null files- -> text "It is not a module in the current program, or in any known package."+ -> NotAModule | otherwise- -> tried_these files+ -> CouldntFindInFiles files _ -> panic "cantFindInstalledErr" - looks_like_srcpkgid :: UnitId -> SDoc- looks_like_srcpkgid pk- -- Unsafely coerce a unit id (i.e. an installed package component- -- identifier) into a PackageId and see if it means anything.- | (pkg:pkgs) <- searchPackageId unit_state (PackageId (unitIdFS pk))- = parens (text "This unit ID looks like the source package ID;" $$- text "the real unit ID is" <+> quotes (ftext (unitIdFS (unitId pkg))) $$- (if null pkgs then Outputable.empty- else text "and" <+> int (length pkgs) <+> text "other candidates"))- -- Todo: also check if it looks like a package name!- | otherwise = Outputable.empty- not_found_in_package pkg files | build_tag /= "" = let build = if build_tag == "p" then "profiling" else "\"" ++ build_tag ++ "\"" in- text "Perhaps you haven't installed the " <> text build <>- text " libraries for package " <> quotes (ppr pkg) <> char '?' $$- tried_these files-+ MissingPackageWayFiles build pkg files | otherwise- = text "There are files missing in the " <> quotes (ppr pkg) <>- text " package," $$- text "try running 'ghc-pkg check'." $$- tried_these files+ = MissingPackageFiles pkg files -mayShowLocations :: DynFlags -> [FilePath] -> SDoc-mayShowLocations dflags files- | null files = Outputable.empty- | verbosity dflags < 3 =- text "Use -v (or `:set -v` in ghci) " <>- text "to see a list of the files searched for."- | otherwise =- hang (text "Locations searched:") 2 $ vcat (map text files) -cannotFindModule :: HscEnv -> ModuleName -> FindResult -> SDoc++cannotFindModule :: HscEnv -> ModuleName -> FindResult -> MissingInterfaceError cannotFindModule hsc_env = cannotFindModule'- (hsc_dflags hsc_env) (hsc_unit_env hsc_env) (targetProfile (hsc_dflags hsc_env)) -cannotFindModule' :: DynFlags -> UnitEnv -> Profile -> ModuleName -> FindResult -> SDoc-cannotFindModule' dflags unit_env profile mod res = pprWithUnitState (ue_units unit_env) $- cantFindErr (checkBuildingCabalPackage dflags)- cannotFindMsg- (text "Ambiguous module name")- unit_env+cannotFindModule' :: UnitEnv -> Profile -> ModuleName -> FindResult+ -> MissingInterfaceError+cannotFindModule' unit_env profile mod res =+ CantFindErr (ue_units unit_env) FindingModule $+ cantFindErr unit_env profile- (mayShowLocations dflags) 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)- -> text "Could not load module"- _ -> text "Could not find module" cantFindErr- :: BuildingCabalPackage -- ^ Using Cabal?- -> SDoc- -> SDoc- -> UnitEnv+ :: UnitEnv -> Profile- -> ([FilePath] -> SDoc) -> ModuleName -> FindResult- -> SDoc-cantFindErr _ _ multiple_found _ _ _ mod_name (FoundMultiple mods)- | Just pkgs <- unambiguousPackages- = hang (multiple_found <+> quotes (ppr mod_name) <> colon) 2 (- sep [text "it was found in multiple packages:",- hsep (map ppr pkgs) ]- )- | otherwise- = hang (multiple_found <+> quotes (ppr mod_name) <> colon) 2 (- vcat (map pprMod mods)- )- where- unambiguousPackages = foldl' unambiguousPackage (Just []) mods- unambiguousPackage (Just xs) (m, ModOrigin (Just _) _ _ _)- = Just (moduleUnit m : xs)- unambiguousPackage _ _ = Nothing-- 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 (moduleUnit m)]- else [] ++- map ((text "a reexport in package" <+>)- .ppr.mkUnit) res ++- if f then [text "a package flag"] else []- )+ -> CantFindInstalled+cantFindErr _ _ mod_name (FoundMultiple mods)+ = CantFindInstalled mod_name (MultiplePackages mods) -cantFindErr using_cabal cannot_find _ unit_env profile tried_these mod_name find_result- = cannot_find <+> quotes (ppr mod_name)- $$ more_info+cantFindErr unit_env profile mod_name find_result+ = CantFindInstalled mod_name more_info where mhome_unit = ue_homeUnit unit_env more_info = case find_result of NoPackage pkg- -> text "no unit id matching" <+> quotes (ppr pkg) <+>- text "was found"-+ -> NoUnitIdMatching (toUnitId pkg) [] NotFound { fr_paths = files, fr_pkg = mb_pkg , fr_mods_hidden = mod_hiddens, fr_pkgs_hidden = pkg_hiddens , fr_unusables = unusables, fr_suggestions = suggest } | Just pkg <- mb_pkg , Nothing <- mhome_unit -- no home-unit- -> not_found_in_package pkg files+ -> not_found_in_package (toUnitId pkg) files | Just pkg <- mb_pkg , Just home_unit <- mhome_unit -- there is a home-unit but the , not (isHomeUnit home_unit pkg) -- module isn't from it- -> not_found_in_package pkg files+ -> not_found_in_package (toUnitId pkg) files | not (null suggest)- -> pp_suggestions suggest $$ tried_these files+ -> ModuleSuggestion suggest files | 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."+ -> NotAModule | otherwise- -> vcat (map pkg_hidden pkg_hiddens) $$- vcat (map mod_hidden mod_hiddens) $$- vcat (map unusable unusables) $$- tried_these files-+ -> GenericMissing+ (map ((\uid -> (uid, lookupUnit (ue_units unit_env) uid))) pkg_hiddens)+ mod_hiddens unusables files _ -> panic "cantFindErr" build_tag = waysBuildTag (profileWays profile)@@ -255,82 +142,7 @@ build = if build_tag == "p" then "profiling" else "\"" ++ build_tag ++ "\"" in- text "Perhaps you haven't installed the " <> text build <>- text " libraries for package " <> quotes (ppr pkg) <> char '?' $$- tried_these files+ MissingPackageWayFiles build pkg files | otherwise- = text "There are files missing in the " <> quotes (ppr pkg) <>- text " package," $$- text "try running 'ghc-pkg check'." $$- tried_these files-- pkg_hidden :: Unit -> SDoc- pkg_hidden uid =- text "It is a member of the hidden package"- <+> quotes (ppr uid)- --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 $$ pkg_hidden_hint uid-- pkg_hidden_hint uid- | using_cabal == YesBuildingCabalPackage- = let pkg = expectJust "pkg_hidden" (lookupUnit (ue_units unit_env) uid)- in text "Perhaps you need to add" <+>- quotes (ppr (unitPackageName pkg)) <+>- text "to the build-depends in your .cabal file."- | Just pkg <- lookupUnit (ue_units unit_env) uid- = text "You can run" <+>- quotes (text ":set -package " <> ppr (unitPackageName 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 (UnusableUnit unit reason reexport)- = text "It is " <> (if reexport then text "reexported from the package"- else text "a member of the package")- <+> quotes (ppr unit)- $$ pprReason (text "which is") reason-- pp_suggestions :: [ModuleSuggestion] -> SDoc- pp_suggestions sugs- | null sugs = Outputable.empty- | otherwise = hang (text "Perhaps you meant")- 2 (vcat (map pp_sugg sugs))-- -- NB: Prefer the *original* location, and then reexports, and then- -- package flags when making suggestions. ToDo: if the original package- -- 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{ fromOrigUnit = e,- fromExposedReexport = res,- fromPackageFlag = f })- | Just True <- e- = parens (text "from" <+> ppr (moduleUnit mod))- | f && moduleName mod == m- = parens (text "from" <+> ppr (moduleUnit mod))- | (pkg:_) <- res- = parens (text "from" <+> ppr (mkUnit pkg)- <> comma <+> text "reexporting" <+> ppr mod)- | f- = parens (text "defined via package flags to be"- <+> ppr mod)- | otherwise = Outputable.empty- pp_sugg (SuggestHidden m mod o) = ppr m <+> provenance o- where provenance ModHidden = Outputable.empty- provenance (ModUnusable _) = Outputable.empty- provenance (ModOrigin{ fromOrigUnit = e,- fromHiddenReexport = rhs })- | Just False <- e- = parens (text "needs flag -package-id"- <+> ppr (moduleUnit mod))- | (pkg:_) <- rhs- = parens (text "needs flag -package-id"- <+> ppr (mkUnit pkg))- | otherwise = Outputable.empty-+ = MissingPackageFiles pkg files
+ GHC/Iface/Errors/Ppr.hs view
@@ -0,0 +1,383 @@+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-orphans #-} -- instance Diagnostic TcRnMessage+{-# LANGUAGE InstanceSigs #-}++module GHC.Iface.Errors.Ppr+ ( IfaceMessageOpts(..)+ , interfaceErrorHints+ , interfaceErrorReason+ , interfaceErrorDiagnostic+ , missingInterfaceErrorHints+ , missingInterfaceErrorReason+ , missingInterfaceErrorDiagnostic+ , readInterfaceErrorDiagnostic++ , lookingForHerald+ , cantFindErrorX+ , mayShowLocations+ , pkgHiddenHint+ )+ where++import GHC.Prelude++import GHC.Types.Error+import GHC.Types.Hint.Ppr () -- Outputable GhcHint+import GHC.Types.Error.Codes ( constructorCode )+import GHC.Types.Name+import GHC.Types.TyThing++import GHC.Unit.State+import GHC.Unit.Module++import GHC.Utils.Outputable+import GHC.Utils.Panic++import GHC.Iface.Errors.Types++defaultIfaceMessageOpts :: IfaceMessageOpts+defaultIfaceMessageOpts = IfaceMessageOpts { ifaceShowTriedFiles = False+ , ifaceBuildingCabalPackage = NoBuildingCabalPackage }++instance HasDefaultDiagnosticOpts IfaceMessageOpts where+ defaultOpts = defaultIfaceMessageOpts++instance Diagnostic IfaceMessage where+ type DiagnosticOpts IfaceMessage = IfaceMessageOpts+ diagnosticMessage opts reason = mkSimpleDecorated $+ interfaceErrorDiagnostic opts reason++ diagnosticReason = interfaceErrorReason++ diagnosticHints = interfaceErrorHints++ diagnosticCode = constructorCode++interfaceErrorHints :: IfaceMessage -> [GhcHint]+interfaceErrorHints = \ case+ Can'tFindInterface err _looking_for ->+ missingInterfaceErrorHints err+ Can'tFindNameInInterface {} ->+ noHints+ CircularImport {} ->+ noHints++missingInterfaceErrorHints :: MissingInterfaceError -> [GhcHint]+missingInterfaceErrorHints = \case+ BadSourceImport {} ->+ noHints+ HomeModError {} ->+ noHints+ DynamicHashMismatchError {} ->+ noHints+ CantFindErr {} ->+ noHints+ BadIfaceFile {} ->+ noHints+ FailedToLoadDynamicInterface {} ->+ noHints++interfaceErrorReason :: IfaceMessage -> DiagnosticReason+interfaceErrorReason (Can'tFindInterface err _)+ = missingInterfaceErrorReason err+interfaceErrorReason (Can'tFindNameInInterface {})+ = ErrorWithoutFlag+interfaceErrorReason (CircularImport {})+ = ErrorWithoutFlag++missingInterfaceErrorReason :: MissingInterfaceError -> DiagnosticReason+missingInterfaceErrorReason = \ case+ BadSourceImport {} ->+ ErrorWithoutFlag+ HomeModError {} ->+ ErrorWithoutFlag+ DynamicHashMismatchError {} ->+ ErrorWithoutFlag+ CantFindErr {} ->+ ErrorWithoutFlag+ BadIfaceFile {} ->+ ErrorWithoutFlag+ FailedToLoadDynamicInterface {} ->+ ErrorWithoutFlag+++prettyCantFindWhat :: FindOrLoad -> FindingModuleOrInterface -> AmbiguousOrMissing -> SDoc+prettyCantFindWhat Find FindingModule AoM_Missing = text "Could not find module"+prettyCantFindWhat Load FindingModule AoM_Missing = text "Could not load module"+prettyCantFindWhat _ FindingInterface AoM_Missing = text "Failed to load interface for"+prettyCantFindWhat _ FindingModule AoM_Ambiguous = text "Ambiguous module name"+prettyCantFindWhat _ FindingInterface AoM_Ambiguous = text "Ambiguous interface for"++isAmbiguousInstalledReason :: CantFindInstalledReason -> AmbiguousOrMissing+isAmbiguousInstalledReason (MultiplePackages {}) = AoM_Ambiguous+isAmbiguousInstalledReason _ = AoM_Missing++isLoadOrFindReason :: CantFindInstalledReason -> FindOrLoad+isLoadOrFindReason NotAModule {} = Find+isLoadOrFindReason (GenericMissing a b c _) | null a && null b && null c = Find+isLoadOrFindReason (ModuleSuggestion {}) = Find+isLoadOrFindReason _ = Load++data FindOrLoad = Find | Load++data AmbiguousOrMissing = AoM_Ambiguous | AoM_Missing++cantFindError :: IfaceMessageOpts+ -> FindingModuleOrInterface+ -> CantFindInstalled+ -> SDoc+cantFindError opts =+ cantFindErrorX+ (pkgHiddenHint (const empty) (ifaceBuildingCabalPackage opts))+ (mayShowLocations "-v" (ifaceShowTriedFiles opts))+++pkgHiddenHint :: (UnitInfo -> SDoc) -> BuildingCabalPackage+ -> UnitInfo -> SDoc+pkgHiddenHint _hint YesBuildingCabalPackage pkg+ = text "Perhaps you need to add" <+>+ quotes (ppr (unitPackageName pkg)) <+>+ text "to the build-depends in your .cabal file."+pkgHiddenHint hint _not_cabal pkg+ = hint pkg++mayShowLocations :: String -> Bool -> [FilePath] -> SDoc+mayShowLocations option verbose files+ | null files = empty+ | not verbose =+ text "Use" <+> text option <+>+ text "to see a list of the files searched for."+ | otherwise =+ hang (text "Locations searched:") 2 $ vcat (map text files)++-- | General version of cantFindError which has some holes which allow GHC/GHCi to display slightly different+-- error messages.+cantFindErrorX :: (UnitInfo -> SDoc) -> ([FilePath] -> SDoc) -> FindingModuleOrInterface -> CantFindInstalled -> SDoc+cantFindErrorX pkg_hidden_hint may_show_locations mod_or_interface (CantFindInstalled mod_name cfir) =+ let ambig = isAmbiguousInstalledReason cfir+ find_or_load = isLoadOrFindReason cfir+ ppr_what = prettyCantFindWhat find_or_load mod_or_interface ambig+ in+ (ppr_what <+> quotes (ppr mod_name) <> dot) $$+ case cfir of+ NoUnitIdMatching pkg cands ->++ let looks_like_srcpkgid :: SDoc+ looks_like_srcpkgid =+ -- Unsafely coerce a unit id (i.e. an installed package component+ -- identifier) into a PackageId and see if it means anything.+ case cands of+ (pkg:pkgs) ->+ parens (text "This unit ID looks like the source package ID;" $$+ text "the real unit ID is" <+> quotes (ftext (unitIdFS (unitId pkg))) $$+ (if null pkgs then empty+ else text "and" <+> int (length pkgs) <+> text "other candidate" <> plural pkgs))+ -- Todo: also check if it looks like a package name!+ [] -> empty++ in hsep [ text "no unit id matching" <+> quotes (ppr pkg)+ , text "was found"] $$ looks_like_srcpkgid+ MissingPackageFiles pkg files ->+ text "There are files missing in the " <> quotes (ppr pkg) <+>+ text "package," $$+ text "try running 'ghc-pkg check'." $$+ may_show_locations files+ MissingPackageWayFiles build pkg files ->+ text "Perhaps you haven't installed the " <> text build <+>+ text "libraries for package " <> quotes (ppr pkg) <> char '?' $$+ may_show_locations files+ ModuleSuggestion ms fps ->++ let pp_suggestions :: [ModuleSuggestion] -> SDoc+ pp_suggestions sugs+ | null sugs = empty+ | otherwise = hang (text "Perhaps you meant")+ 2 (vcat (map pp_sugg sugs))++ -- NB: Prefer the *original* location, and then reexports, and then+ -- package flags when making suggestions. ToDo: if the original package+ -- also has a reexport, prefer that one+ pp_sugg (SuggestVisible m mod o) = ppr m <+> provenance o+ where provenance ModHidden = empty+ provenance (ModUnusable _) = empty+ provenance (ModOrigin{ fromOrigUnit = e,+ fromExposedReexport = res,+ fromPackageFlag = f })+ | Just True <- e+ = parens (text "from" <+> ppr (moduleUnit mod))+ | f && moduleName mod == m+ = parens (text "from" <+> ppr (moduleUnit mod))+ | (pkg:_) <- res+ = parens (text "from" <+> ppr (mkUnit pkg)+ <> comma <+> text "reexporting" <+> ppr mod)+ | f+ = parens (text "defined via package flags to be"+ <+> ppr mod)+ | otherwise = empty+ pp_sugg (SuggestHidden m mod o) = ppr m <+> provenance o+ where provenance ModHidden = empty+ provenance (ModUnusable _) = empty+ provenance (ModOrigin{ fromOrigUnit = e,+ fromHiddenReexport = rhs })+ | Just False <- e+ = parens (text "needs flag -package-id"+ <+> ppr (moduleUnit mod))+ | (pkg:_) <- rhs+ = parens (text "needs flag -package-id"+ <+> ppr (mkUnit pkg))+ | otherwise = empty++ in pp_suggestions ms $$ may_show_locations fps+ NotAModule -> text "It is not a module in the current program, or in any known package."+ CouldntFindInFiles fps -> vcat (map text fps)+ MultiplePackages mods+ | Just pkgs <- unambiguousPackages+ -> sep [text "it was found in multiple packages:",+ hsep (map ppr pkgs)]+ | otherwise+ -> vcat (map pprMod mods)+ where+ unambiguousPackages = foldl' unambiguousPackage (Just []) mods+ unambiguousPackage (Just xs) (m, ModOrigin (Just _) _ _ _)+ = Just (moduleUnit m : xs)+ unambiguousPackage _ _ = Nothing+ GenericMissing pkg_hiddens mod_hiddens unusables files ->+ vcat (map pkg_hidden pkg_hiddens) $$+ vcat (map mod_hidden mod_hiddens) $$+ vcat (map unusable unusables) $$+ may_show_locations files+ where+ 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 (moduleUnit m)]+ else [] +++ map ((text "a reexport in package" <+>)+ .ppr.mkUnit) res +++ if f then [text "a package flag"] else []+ )+ pkg_hidden :: (Unit, Maybe UnitInfo) -> SDoc+ pkg_hidden (uid, uif) =+ text "It is a member of the hidden package"+ <+> quotes (ppr uid)+ --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 $$ maybe empty pkg_hidden_hint uif+++ 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+++interfaceErrorDiagnostic :: IfaceMessageOpts -> IfaceMessage -> SDoc+interfaceErrorDiagnostic opts = \ case+ Can'tFindNameInInterface name relevant_tyThings ->+ missingDeclInInterface name relevant_tyThings+ Can'tFindInterface err looking_for ->+ hangNotEmpty (lookingForHerald looking_for) 2 (missingInterfaceErrorDiagnostic opts err)+ CircularImport mod ->+ text "Circular imports: module" <+> quotes (ppr mod)+ <+> text "depends on itself"++lookingForHerald :: InterfaceLookingFor -> SDoc+lookingForHerald looking_for =+ case looking_for of+ LookingForName {} -> empty+ LookingForModule {} -> empty+ LookingForHiBoot mod ->+ text "Could not find hi-boot interface for" <+> quotes (ppr mod) <> colon+ LookingForSig sig ->+ text "Could not find interface file for signature" <+> quotes (ppr sig) <> colon++readInterfaceErrorDiagnostic :: ReadInterfaceError -> SDoc+readInterfaceErrorDiagnostic = \ case+ ExceptionOccurred fp ex ->+ hang (text "Exception when reading interface file " <+> text fp)+ 2 (text (showException ex))+ HiModuleNameMismatchWarn _ m1 m2 ->+ hiModuleNameMismatchWarn m1 m2++missingInterfaceErrorDiagnostic :: IfaceMessageOpts -> MissingInterfaceError -> SDoc+missingInterfaceErrorDiagnostic opts reason =+ case reason of+ BadSourceImport m -> badSourceImport m+ HomeModError im ml -> homeModError im ml+ DynamicHashMismatchError m ml -> dynamicHashMismatchError m ml+ CantFindErr us module_or_interface cfi -> pprWithUnitState us $ cantFindError opts module_or_interface cfi+ BadIfaceFile rie -> readInterfaceErrorDiagnostic rie+ FailedToLoadDynamicInterface wanted_mod err ->+ hang (text "Failed to load dynamic interface file for" <+> ppr wanted_mod <> colon)+ 2 (readInterfaceErrorDiagnostic err)++hiModuleNameMismatchWarn :: Module -> Module -> SDoc+hiModuleNameMismatchWarn requested_mod read_mod+ | moduleUnit requested_mod == moduleUnit read_mod =+ sep [text "Interface file contains module" <+> quotes (ppr read_mod) <> comma,+ text "but we were expecting module" <+> quotes (ppr requested_mod),+ sep [text "Probable cause: the source code which generated interface file",+ text "has an incompatible module name"+ ]+ ]+ | otherwise =+ -- ToDo: This will fail to have enough qualification when the package IDs+ -- are the same+ withPprStyle (mkUserStyle alwaysQualify AllTheWay) $+ -- we want the Modules below to be qualified with package names,+ -- so reset the NamePprCtx setting.+ hsep [ text "Something is amiss; requested module "+ , ppr requested_mod+ , text "differs from name found in the interface file"+ , ppr read_mod+ , parens (text "if these names look the same, try again with -dppr-debug")+ ]++dynamicHashMismatchError :: Module -> ModLocation -> SDoc+dynamicHashMismatchError wanted_mod loc =+ vcat [ text "Dynamic hash doesn't match for" <+> quotes (ppr wanted_mod)+ , text "Normal interface file from" <+> text (ml_hi_file loc)+ , text "Dynamic interface file from" <+> text (ml_dyn_hi_file loc)+ , text "You probably need to recompile" <+> quotes (ppr wanted_mod) ]++homeModError :: InstalledModule -> ModLocation -> SDoc+-- See Note [Home module load error]+homeModError mod location+ = text "attempting to use module " <> quotes (ppr mod)+ <> (case ml_hs_file location of+ Just file -> space <> parens (text file)+ Nothing -> empty)+ <+> text "which is not loaded"+++missingDeclInInterface :: Name -> [TyThing] -> SDoc+missingDeclInInterface name things =+ whenPprDebug (found_things $$ empty) $$+ hang (text "Can't find interface-file declaration for" <+>+ pprNameSpace (nameNameSpace name) <+> ppr name)+ 2 (vcat [text "Probable cause: bug in .hi-boot file, or inconsistent .hi file",+ text "Use -ddump-if-trace to get an idea of which file caused the error"])+ where+ found_things =+ hang (text "Found the following declarations in" <+> ppr (nameModule name) <> colon)+ 2 (vcat (map ppr things))++badSourceImport :: Module -> SDoc+badSourceImport mod+ = hang (text "You cannot {-# SOURCE #-} import a module from another package")+ 2 (text "but" <+> quotes (ppr mod) <+> text "is from package"+ <+> quotes (ppr (moduleUnit mod)))
+ GHC/Iface/Errors/Types.hs view
@@ -0,0 +1,98 @@++{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE GADTs #-}+{-# LANGUAGE KindSignatures #-}++module GHC.Iface.Errors.Types (++ MissingInterfaceError(..)+ , InterfaceLookingFor(..)+ , IfaceMessage(..)+ , ReadInterfaceError(..)+ , CantFindInstalled(..)+ , CantFindInstalledReason(..)+ , FindingModuleOrInterface(..)++ , BuildingCabalPackage(..)++ , IfaceMessageOpts(..)++ ) where++import GHC.Prelude++import GHC.Types.Name (Name)+import GHC.Types.TyThing (TyThing)+import GHC.Unit.Types (Module, InstalledModule, UnitId, Unit)+import GHC.Unit.State (UnitState, ModuleSuggestion, ModuleOrigin, UnusableUnitReason, UnitInfo)+import GHC.Exception.Type (SomeException)+import GHC.Unit.Types ( IsBootInterface )+import Language.Haskell.Syntax.Module.Name ( ModuleName )++++import GHC.Generics ( Generic )+import GHC.Unit.Module.Location++data IfaceMessageOpts = IfaceMessageOpts { ifaceShowTriedFiles :: !Bool -- ^ Whether to show files we tried to look for or not when printing loader errors+ , ifaceBuildingCabalPackage :: !BuildingCabalPackage+ }++data InterfaceLookingFor+ = LookingForName !Name+ | LookingForHiBoot !Module+ | LookingForModule !ModuleName !IsBootInterface+ | LookingForSig !InstalledModule++data IfaceMessage+ = Can'tFindInterface+ MissingInterfaceError+ InterfaceLookingFor+ | Can'tFindNameInInterface+ Name+ [TyThing] -- possibly relevant TyThings+ | CircularImport !Module+ deriving Generic++data MissingInterfaceError+ = BadSourceImport !Module+ | HomeModError !InstalledModule !ModLocation+ | DynamicHashMismatchError !Module !ModLocation++ | CantFindErr !UnitState FindingModuleOrInterface CantFindInstalled++ | BadIfaceFile ReadInterfaceError+ | FailedToLoadDynamicInterface Module ReadInterfaceError+ deriving Generic++data ReadInterfaceError+ = ExceptionOccurred FilePath SomeException+ | HiModuleNameMismatchWarn FilePath Module Module+ deriving Generic++data CantFindInstalledReason+ = NoUnitIdMatching UnitId [UnitInfo]+ | MissingPackageFiles UnitId [FilePath]+ | MissingPackageWayFiles String UnitId [FilePath]+ | ModuleSuggestion [ModuleSuggestion] [FilePath]+ | NotAModule+ | CouldntFindInFiles [FilePath]+ | GenericMissing+ [(Unit, Maybe UnitInfo)] [Unit]+ [(Unit, UnusableUnitReason)] [FilePath]+ | MultiplePackages [(Module, ModuleOrigin)]+ deriving Generic++data CantFindInstalled =+ CantFindInstalled ModuleName CantFindInstalledReason+ deriving Generic+data FindingModuleOrInterface = FindingModule+ | FindingInterface++-- | Pass to a 'DriverMessage' the information whether or not the+-- '-fbuilding-cabal-package' flag is set.+data BuildingCabalPackage+ = YesBuildingCabalPackage+ | NoBuildingCabalPackage+ deriving Eq
GHC/Iface/Ext/Ast.hs view
@@ -41,6 +41,7 @@ import GHC.Types.Id ( isDataConId_maybe ) import GHC.Types.Name ( Name, nameSrcSpan, nameUnique ) import GHC.Types.Name.Env ( NameEnv, emptyNameEnv, extendNameEnv, lookupNameEnv )+import GHC.Types.Name.Reader ( RecFieldInfo(..) ) import GHC.Types.SrcLoc import GHC.Core.Type ( Type ) import GHC.Core.Predicate@@ -570,7 +571,7 @@ HsOuterExplicit{hso_bndrs = tvs} -> foldl1' combineSrcSpans [loc a, loc tvs, loc b, loc c] -instance (HasLoc tm, HasLoc ty) => HasLoc (HsArg tm ty) where+instance (HasLoc tm, HasLoc ty) => HasLoc (HsArg p tm ty) where loc (HsValArg tm) = loc tm loc (HsTypeArg _ ty) = loc ty loc (HsArgPar sp) = sp@@ -905,7 +906,7 @@ setOrigin :: Origin -> NodeOrigin -> NodeOrigin setOrigin FromSource _ = SourceInfo-setOrigin Generated _ = GeneratedInfo+setOrigin (Generated {}) _ = GeneratedInfo instance HiePass p => ToHie (Located (PatSynBind (GhcPass p) (GhcPass p))) where toHie (L sp psb) = concatM $ case psb of@@ -1182,11 +1183,13 @@ con_name = case hiePass @p of -- Like ConPat HieRn -> con HieTc -> fmap conLikeName con- RecordUpd {rupd_expr = expr, rupd_flds = Left upds}->+ RecordUpd { rupd_expr = expr+ , rupd_flds = RegularRecUpdFields { recUpdFields = upds } }-> [ toHie expr , toHie $ map (RC RecFieldAssign) upds ]- RecordUpd {rupd_expr = expr, rupd_flds = Right _}->+ RecordUpd { rupd_expr = expr+ , rupd_flds = OverloadedRecUpdFields {} }-> [ toHie expr ] ExprWithTySig _ expr sig ->@@ -1773,7 +1776,7 @@ [ toHie a , toHie b ]- HsAppKindTy _ ty ki ->+ HsAppKindTy _ ty _ ki -> [ toHie ty , toHie ki ]@@ -1831,7 +1834,7 @@ HsStarTy _ _ -> [] XHsType _ -> [] -instance (ToHie tm, ToHie ty) => ToHie (HsArg tm ty) where+instance (ToHie tm, ToHie ty) => ToHie (HsArg p tm ty) where toHie (HsValArg tm) = toHie tm toHie (HsTypeArg _ ty) = toHie ty toHie (HsArgPar sp) = locOnly sp@@ -2111,10 +2114,9 @@ IEThingAll _ n -> [ toHie $ IEC c n ]- IEThingWith flds n _ ns ->+ IEThingWith _ n _ ns -> [ toHie $ IEC c n , toHie $ map (IEC c) ns- , toHie $ map (IEC c) flds ] IEModuleContents _ n -> [ toHie $ IEC c n@@ -2135,10 +2137,10 @@ [ toHie $ C (IEThing c) (L l n) ] -instance ToHie (IEContext (Located FieldLabel)) where- toHie (IEC c (L span lbl)) = concatM- [ makeNode lbl span- , toHie $ C (IEThing c) $ L span (flSelector lbl)+instance ToHie (IEContext (Located RecFieldInfo)) where+ toHie (IEC c (L span info)) = concatM+ [ makeNode info span+ , toHie $ C (IEThing c) $ L span (flSelector $ recFieldLabel info) ] instance ToHie (LocatedA (DocDecl GhcRn)) where@@ -2149,4 +2151,5 @@ DocGroup _ d -> [ toHie d ] instance ToHie (LHsDoc GhcRn) where- toHie (L span d@(WithHsDocIdentifiers _ ids)) = concatM $ makeNode d span : [toHie $ map (C Use) ids]+ toHie (L span d@(WithHsDocIdentifiers _ ids)) =+ concatM $ makeNode d span : [toHie $ map (C Use) ids]
GHC/Iface/Ext/Utils.hs view
@@ -9,7 +9,7 @@ import GHC.Prelude import GHC.Core.Map.Type-import GHC.Driver.Session ( DynFlags )+import GHC.Driver.DynFlags ( DynFlags ) import GHC.Driver.Ppr import GHC.Data.FastString ( FastString, mkFastString ) import GHC.Iface.Type
GHC/Iface/Load.hs view
@@ -30,6 +30,8 @@ moduleFreeHolesPrecise, needWiredInHomeIface, loadWiredInHomeIface, + WhereFrom(..),+ pprModIfaceSimple, ifaceStats, pprModIface, showIface, @@ -47,7 +49,7 @@ import GHC.Driver.Config.Finder import GHC.Driver.Env import GHC.Driver.Errors.Types-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Hooks import GHC.Driver.Plugins @@ -100,7 +102,6 @@ import GHC.Unit.External import GHC.Unit.Module-import GHC.Unit.Module.Warnings import GHC.Unit.Module.ModIface import GHC.Unit.Module.Deps import GHC.Unit.State@@ -116,6 +117,7 @@ import System.FilePath import System.Directory import GHC.Driver.Env.KnotVars+import GHC.Iface.Errors.Types {- ************************************************************************@@ -143,7 +145,7 @@ also turn out to be needed by the code that e2 expands to. -} -tcLookupImported_maybe :: Name -> TcM (MaybeErr SDoc TyThing)+tcLookupImported_maybe :: Name -> TcM (MaybeErr IfaceMessage TyThing) -- Returns (Failed err) if we can't find the interface file for the thing tcLookupImported_maybe name = do { hsc_env <- getTopEnv@@ -152,7 +154,7 @@ Just thing -> return (Succeeded thing) Nothing -> tcImportDecl_maybe name } -tcImportDecl_maybe :: Name -> TcM (MaybeErr SDoc TyThing)+tcImportDecl_maybe :: Name -> TcM (MaybeErr IfaceMessage TyThing) -- Entry point for *source-code* uses of importDecl tcImportDecl_maybe name | Just thing <- wiredInNameTyThing_maybe name@@ -163,7 +165,7 @@ | otherwise = initIfaceTcRn (importDecl name) -importDecl :: Name -> IfM lcl (MaybeErr SDoc TyThing)+importDecl :: Name -> IfM lcl (MaybeErr IfaceMessage TyThing) -- Get the TyThing for this Name from an interface file -- It's not a wired-in thing -- the caller caught that importDecl name@@ -174,29 +176,22 @@ -- Load the interface, which should populate the PTE ; mb_iface <- assertPpr (isExternalName name) (ppr name) $ loadInterface nd_doc (nameModule name) ImportBySystem- ; case mb_iface of {- Failed err_msg -> return (Failed err_msg) ;- Succeeded _ -> do+ ; case mb_iface of+ { Failed err_msg -> return $ Failed $+ Can'tFindInterface err_msg (LookingForName name)+ ; Succeeded _ -> do -- Now look it up again; this time we should find it { eps <- getEps ; case lookupTypeEnv (eps_PTE eps) name of Just thing -> return $ Succeeded thing- Nothing -> let doc = whenPprDebug (found_things_msg eps $$ empty)- $$ not_found_msg- in return $ Failed doc+ Nothing -> return $ Failed $+ Can'tFindNameInInterface name+ (filter is_interesting $ nonDetNameEnvElts $ eps_PTE eps) }}} where nd_doc = text "Need decl for" <+> ppr name- not_found_msg = hang (text "Can't find interface-file declaration for" <+>- pprNameSpace (nameNameSpace name) <+> ppr name)- 2 (vcat [text "Probable cause: bug in .hi-boot file, or inconsistent .hi file",- text "Use -ddump-if-trace to get an idea of which file caused the error"])- found_things_msg eps =- hang (text "Found the following declarations in" <+> ppr (nameModule name) <> colon)- 2 (vcat (map ppr $ filter is_interesting $ nonDetNameEnvElts $ eps_PTE eps))- where- is_interesting thing = nameModule name == nameModule (getName thing)+ is_interesting thing = nameModule name == nameModule (getName thing) {-@@ -299,15 +294,21 @@ loadSrcInterface doc mod want_boot maybe_pkg = do { res <- loadSrcInterface_maybe doc mod want_boot maybe_pkg ; case res of- Failed err -> failWithTc (mkTcRnUnknownMessage $ mkPlainError noHints err)- Succeeded iface -> return iface }+ Failed err ->+ failWithTc $+ TcRnInterfaceError $+ Can'tFindInterface err $+ LookingForModule mod want_boot+ Succeeded iface ->+ return iface+ } -- | Like 'loadSrcInterface', but returns a 'MaybeErr'. loadSrcInterface_maybe :: SDoc -> ModuleName -> IsBootInterface -- {-# SOURCE #-} ? -> PkgQual -- "package", if any- -> RnM (MaybeErr SDoc ModIface)+ -> RnM (MaybeErr MissingInterfaceError ModIface) loadSrcInterface_maybe doc mod want_boot maybe_pkg -- We must first find which Module this import refers to. This involves@@ -403,11 +404,11 @@ = do dflags <- getDynFlags let ctx = initSDocContext dflags defaultUserStyle- withException ctx (loadInterface doc mod_name where_from)+ withIfaceErr ctx (loadInterface doc mod_name where_from) ------------------ loadInterface :: SDoc -> Module -> WhereFrom- -> IfM lcl (MaybeErr SDoc ModIface)+ -> IfM lcl (MaybeErr MissingInterfaceError ModIface) -- loadInterface looks in both the HPT and PIT for the required interface -- If not found, it loads it, and puts it in the PIT (always).@@ -703,7 +704,7 @@ -> SDoc -> IsBootInterface -> Module- -> IO (MaybeErr SDoc (ModIface, FilePath))+ -> IO (MaybeErr MissingInterfaceError (ModIface, FilePath)) computeInterface hsc_env doc_str hi_boot_file mod0 = do massert (not (isHoleModule mod0)) let mhome_unit = hsc_home_unit_maybe hsc_env@@ -732,7 +733,7 @@ -- @p[A=\<A>,B=\<B>]:B@ never includes B. moduleFreeHolesPrecise :: SDoc -> Module- -> TcRnIf gbl lcl (MaybeErr SDoc (UniqDSet ModuleName))+ -> TcRnIf gbl lcl (MaybeErr MissingInterfaceError (UniqDSet ModuleName)) moduleFreeHolesPrecise doc_str mod | moduleIsDefinite mod = return (Succeeded emptyUniqDSet) | otherwise =@@ -769,13 +770,13 @@ Failed err -> return (Failed err) wantHiBootFile :: Maybe HomeUnit -> ExternalPackageState -> Module -> WhereFrom- -> MaybeErr SDoc IsBootInterface+ -> MaybeErr MissingInterfaceError IsBootInterface -- Figure out whether we want Foo.hi or Foo.hi-boot wantHiBootFile mhome_unit eps mod from = case from of ImportByUser usr_boot | usr_boot == IsBoot && notHomeModuleMaybe mhome_unit mod- -> Failed (badSourceImport mod)+ -> Failed (BadSourceImport mod) | otherwise -> Succeeded usr_boot ImportByPlugin@@ -798,11 +799,6 @@ -- The boot-ness of the requested interface, -- based on the dependencies in directly-imported modules -badSourceImport :: Module -> SDoc-badSourceImport mod- = hang (text "You cannot {-# SOURCE #-} import a module from another package")- 2 (text "but" <+> quotes (ppr mod) <+> text "is from package"- <+> quotes (ppr (moduleUnit mod))) ----------------------------------------------------- -- Loading type/class/value decls@@ -855,7 +851,7 @@ -- this to check the consistency of the requirements of the -- module we read out. -> IsBootInterface -- ^ Looking for .hi-boot or .hi file- -> IO (MaybeErr SDoc (ModIface, FilePath))+ -> IO (MaybeErr MissingInterfaceError (ModIface, FilePath)) findAndReadIface hsc_env doc_str mod wanted_mod hi_boot_file = do let profile = targetProfile dflags@@ -897,12 +893,12 @@ Just home_unit | isHomeInstalledModule home_unit mod , not (isOneShot (ghcMode dflags))- -> return (Failed (homeModError mod loc))+ -> return (Failed (HomeModError mod loc)) _ -> do r <- read_file logger name_cache unit_state dflags wanted_mod (ml_hi_file loc) case r of- Failed _- -> return r+ Failed err+ -> return (Failed $ BadIfaceFile err) Succeeded (iface,_fp) -> do r2 <- load_dynamic_too_maybe logger name_cache unit_state@@ -910,46 +906,47 @@ iface loc case r2 of Failed sdoc -> return (Failed sdoc)- Succeeded {} -> return r+ Succeeded {} -> return $ Succeeded (iface,_fp) err -> do trace_if logger (text "...not found") return $ Failed $ cannotFindInterface unit_state mhome_unit profile- (Iface_Errors.mayShowLocations dflags) (moduleName mod) err -- | Check if we need to try the dynamic interface for -dynamic-too-load_dynamic_too_maybe :: Logger -> NameCache -> UnitState -> DynFlags -> Module -> ModIface -> ModLocation -> IO (MaybeErr SDoc ())+load_dynamic_too_maybe :: Logger -> NameCache -> UnitState -> DynFlags+ -> Module -> ModIface -> ModLocation+ -> IO (MaybeErr MissingInterfaceError ()) load_dynamic_too_maybe logger name_cache unit_state dflags wanted_mod iface loc -- Indefinite interfaces are ALWAYS non-dynamic. | not (moduleIsDefinite (mi_module iface)) = return (Succeeded ()) | gopt Opt_BuildDynamicToo dflags = load_dynamic_too logger name_cache unit_state dflags wanted_mod iface loc | otherwise = return (Succeeded ()) -load_dynamic_too :: Logger -> NameCache -> UnitState -> DynFlags -> Module -> ModIface -> ModLocation -> IO (MaybeErr SDoc ())+load_dynamic_too :: Logger -> NameCache -> UnitState -> DynFlags+ -> Module -> ModIface -> ModLocation+ -> IO (MaybeErr MissingInterfaceError ()) load_dynamic_too logger name_cache unit_state dflags wanted_mod iface loc = do read_file logger name_cache unit_state dflags wanted_mod (ml_dyn_hi_file loc) >>= \case Succeeded (dynIface, _) | mi_mod_hash (mi_final_exts iface) == mi_mod_hash (mi_final_exts dynIface) -> return (Succeeded ()) | otherwise ->- do return $ (Failed $ dynamicHashMismatchError wanted_mod loc)+ do return $ (Failed $ DynamicHashMismatchError wanted_mod loc) Failed err ->- do return $ (Failed $ ((text "Failed to load dynamic interface file for" <+> ppr wanted_mod <> colon) $$ err))+ do return $ (Failed $ FailedToLoadDynamicInterface wanted_mod err) + --((text "Failed to load dynamic interface file for" <+> ppr wanted_mod <> colon) $$ err)) -dynamicHashMismatchError :: Module -> ModLocation -> SDoc-dynamicHashMismatchError wanted_mod loc =- vcat [ text "Dynamic hash doesn't match for" <+> quotes (ppr wanted_mod)- , text "Normal interface file from" <+> text (ml_hi_file loc)- , text "Dynamic interface file from" <+> text (ml_dyn_hi_file loc)- , text "You probably need to recompile" <+> quotes (ppr wanted_mod) ] -read_file :: Logger -> NameCache -> UnitState -> DynFlags -> Module -> FilePath -> IO (MaybeErr SDoc (ModIface, FilePath))++read_file :: Logger -> NameCache -> UnitState -> DynFlags+ -> Module -> FilePath+ -> IO (MaybeErr ReadInterfaceError (ModIface, FilePath)) read_file logger name_cache unit_state dflags wanted_mod file_path = do trace_if logger (text "readIFace" <+> text file_path) @@ -964,7 +961,7 @@ (uninstantiateInstantiatedModule indef_mod) read_result <- readIface dflags name_cache wanted_mod' file_path case read_result of- Failed err -> return (Failed (badIfaceFile file_path err))+ Failed err -> return (Failed err) Succeeded iface -> return (Succeeded (iface, file_path)) -- Don't forget to fill in the package name... @@ -985,7 +982,7 @@ -> NameCache -> Module -> FilePath- -> IO (MaybeErr SDoc ModIface)+ -> IO (MaybeErr ReadInterfaceError ModIface) readIface dflags name_cache wanted_mod file_path = do let profile = targetProfile dflags res <- tryMost $ readBinIface profile name_cache CheckHiWay QuietBinIFace file_path@@ -999,9 +996,9 @@ | otherwise -> return (Failed err) where actual_mod = mi_module iface- err = hiModuleNameMismatchWarn wanted_mod actual_mod+ err = HiModuleNameMismatchWarn file_path wanted_mod actual_mod - Left exn -> return (Failed (text (showException exn)))+ Left exn -> return (Failed (ExceptionOccurred file_path exn)) {- *********************************************************@@ -1146,8 +1143,8 @@ ] where pp_hsc_src HsBootFile = text "[boot]"- pp_hsc_src HsigFile = text "[hsig]"- pp_hsc_src HsSrcFile = Outputable.empty+ pp_hsc_src HsigFile = text "[hsig]"+ pp_hsc_src HsSrcFile = Outputable.empty {- When printing export lists, we print like this:@@ -1160,7 +1157,7 @@ pprExport (Avail n) = ppr n pprExport (AvailTC _ []) = Outputable.empty pprExport avail@(AvailTC n _) =- ppr n <> mark <> pp_export (availSubordinateGreNames avail)+ ppr n <> mark <> pp_export (availSubordinateNames avail) where mark | availExportsDecl avail = Outputable.empty | otherwise = vbar@@ -1179,7 +1176,7 @@ ) pprUsage usage@UsageFile{} = hsep [text "addDependentFile",- doubleQuotes (text (usg_file_path usage)),+ doubleQuotes (ftext (usg_file_path usage)), ppr (usg_file_hash usage)] pprUsage usage@UsageMergedRequirement{} = hsep [text "merged", ppr (usg_mod usage), ppr (usg_mod_hash usage)]@@ -1208,16 +1205,6 @@ pprTrustPkg :: Bool -> SDoc pprTrustPkg tpkg = text "require own pkg trusted:" <+> ppr tpkg -instance Outputable (Warnings pass) where- ppr = pprWarns--pprWarns :: Warnings pass -> SDoc-pprWarns NoWarnings = Outputable.empty-pprWarns (WarnAll txt) = text "Warn all" <+> ppr txt-pprWarns (WarnSome prs) = text "Warnings:"- <+> vcat (map pprWarning prs)- where pprWarning (name, txt) = ppr name <+> ppr txt- pprIfaceAnnotation :: IfaceAnnotation -> SDoc pprIfaceAnnotation (IfaceAnnotation { ifAnnotatedTarget = target, ifAnnotatedValue = serialized }) = ppr target <+> text "annotated by" <+> ppr serialized@@ -1226,3 +1213,20 @@ pprExtensibleFields (ExtensibleFields fs) = vcat . map pprField $ toList fs where pprField (name, (BinData size _data)) = text name <+> text "-" <+> ppr size <+> text "bytes"+++-- | Reason for loading an interface file+--+-- Used to figure out whether we want to consider loading hi-boot files or not.+data WhereFrom+ = ImportByUser IsBootInterface -- Ordinary user import (perhaps {-# SOURCE #-})+ | ImportBySystem -- Non user import.+ | ImportByPlugin -- Importing a plugin.++instance Outputable WhereFrom where+ ppr (ImportByUser IsBoot) = text "{- SOURCE -}"+ ppr (ImportByUser NotBoot) = empty+ ppr ImportBySystem = text "{- SYSTEM -}"+ ppr ImportByPlugin = text "{- PLUGIN -}"++
GHC/Iface/Make.hs view
@@ -14,8 +14,6 @@ , mkFullIface , mkIfaceTc , mkIfaceExports- , coAxiomToIfaceDecl- , tyThingToIfaceDecl -- Converting things to their Iface equivalents ) where @@ -23,11 +21,13 @@ import GHC.Hs +import GHC.Stg.InferTags.TagSig (StgCgInfos) import GHC.StgToCmm.Types (CmmCgInfos (..)) import GHC.Tc.Utils.TcType import GHC.Tc.Utils.Monad +import GHC.Iface.Decl import GHC.Iface.Syntax import GHC.Iface.Recomp import GHC.Iface.Load@@ -38,13 +38,8 @@ import qualified GHC.LanguageExtensions as LangExt import GHC.Core import GHC.Core.Class-import GHC.Core.TyCon import GHC.Core.Coercion.Axiom import GHC.Core.ConLike-import GHC.Core.DataCon-import GHC.Core.FVs ( orphNamesOfAxiomLHS )-import GHC.Core.Type-import GHC.Core.Multiplicity import GHC.Core.InstEnv import GHC.Core.FamInstEnv import GHC.Core.Ppr@@ -53,32 +48,30 @@ import GHC.Driver.Config.HsToCore.Usage import GHC.Driver.Env import GHC.Driver.Backend-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Plugins import GHC.Types.Id import GHC.Types.Fixity.Env import GHC.Types.SafeHaskell import GHC.Types.Annotations-import GHC.Types.Var.Env-import GHC.Types.Var import GHC.Types.Name import GHC.Types.Avail import GHC.Types.Name.Reader import GHC.Types.Name.Env import GHC.Types.Name.Set import GHC.Types.Unique.DSet-import GHC.Types.Basic hiding ( SuccessFlag(..) ) import GHC.Types.TypeEnv import GHC.Types.SourceFile import GHC.Types.TyThing import GHC.Types.HpcInfo import GHC.Types.CompleteMatch+import GHC.Types.SourceText+import GHC.Types.SrcLoc ( unLoc ) import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Panic.Plain-import GHC.Utils.Misc import GHC.Utils.Logger import GHC.Data.FastString@@ -96,10 +89,9 @@ import GHC.Unit.Module.Deps import Data.Function-import Data.List ( findIndex, mapAccumL, sortBy )+import Data.List ( sortBy ) import Data.Ord import Data.IORef-import GHC.Stg.Pipeline (StgCgInfos) {-@@ -301,13 +293,14 @@ -- The order of fixities returned from nonDetNameEnvElts is not -- deterministic, so we sort by OccName to canonicalize it. -- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for more details.- warns = src_warns+ warns = toIfaceWarnings src_warns iface_rules = map coreRuleToIfaceRule rules iface_insts = map instanceToIfaceInst $ fixSafeInstances safe_mode (instEnvElts insts) iface_fam_insts = map famInstToIfaceFamInst fam_insts trust_info = setSafeMode safe_mode annotations = map mkIfaceAnnotation anns icomplete_matches = map mkIfaceCompleteMatch complete_matches+ !rdrs = maybeGlobalRdrEnv rdr_env ModIface { mi_module = this_mod,@@ -330,7 +323,7 @@ mi_fixities = fixities, mi_warns = warns, mi_anns = annotations,- mi_globals = maybeGlobalRdrEnv rdr_env,+ mi_globals = rdrs, mi_used_th = used_th, mi_decls = decls, mi_extra_decls = extra_decls,@@ -358,14 +351,96 @@ -- Desugar.addExportFlagsAndRules). The mi_globals field is used -- by GHCi to decide whether the module has its full top-level -- scope available. (#5534)- maybeGlobalRdrEnv :: GlobalRdrEnv -> Maybe GlobalRdrEnv+ maybeGlobalRdrEnv :: GlobalRdrEnv -> Maybe IfGlobalRdrEnv maybeGlobalRdrEnv rdr_env- | backendWantsGlobalBindings (backend dflags) = Just rdr_env- | otherwise = Nothing+ | backendWantsGlobalBindings (backend dflags)+ = Just $! forceGlobalRdrEnv rdr_env+ -- See Note [Forcing GREInfo] in GHC.Types.GREInfo.+ | otherwise+ = Nothing ifFamInstTcName = ifFamInstFam +--------------------------+instanceToIfaceInst :: ClsInst -> IfaceClsInst+instanceToIfaceInst (ClsInst { is_dfun = dfun_id, is_flag = oflag+ , is_cls_nm = cls_name, is_cls = cls+ , is_tcs = rough_tcs+ , is_orphan = orph })+ = assert (cls_name == className cls) $+ IfaceClsInst { ifDFun = idName dfun_id+ , ifOFlag = oflag+ , ifInstCls = cls_name+ , ifInstTys = ifaceRoughMatchTcs $ tail rough_tcs+ -- N.B. Drop the class name from the rough match template+ -- It is put back by GHC.Core.InstEnv.mkImportedClsInst+ , ifInstOrph = orph }++--------------------------+famInstToIfaceFamInst :: FamInst -> IfaceFamInst+famInstToIfaceFamInst (FamInst { fi_axiom = axiom+ , fi_fam = fam+ , fi_tcs = rough_tcs+ , fi_orphan = orphan })+ = IfaceFamInst { ifFamInstAxiom = coAxiomName axiom+ , ifFamInstFam = fam+ , ifFamInstTys = ifaceRoughMatchTcs rough_tcs+ , ifFamInstOrph = orphan }++ifaceRoughMatchTcs :: [RoughMatchTc] -> [Maybe IfaceTyCon]+ifaceRoughMatchTcs tcs = map do_rough tcs+ where+ do_rough RM_WildCard = Nothing+ do_rough (RM_KnownTc n) = Just (toIfaceTyCon_name n)++--------------------------+toIfaceWarnings :: Warnings GhcRn -> IfaceWarnings+toIfaceWarnings (WarnAll txt) = IfWarnAll (toIfaceWarningTxt txt)+toIfaceWarnings (WarnSome vs ds) = IfWarnSome vs' ds'+ where+ vs' = [(occ, toIfaceWarningTxt txt) | (occ, txt) <- vs]+ ds' = [(occ, toIfaceWarningTxt txt) | (occ, txt) <- ds]++toIfaceWarningTxt :: WarningTxt GhcRn -> IfaceWarningTxt+toIfaceWarningTxt (WarningTxt mb_cat src strs) = IfWarningTxt (unLoc . iwc_wc . unLoc <$> mb_cat) (unLoc src) (map (toIfaceStringLiteralWithNames . unLoc) strs)+toIfaceWarningTxt (DeprecatedTxt src strs) = IfDeprecatedTxt (unLoc src) (map (toIfaceStringLiteralWithNames . unLoc) strs)++toIfaceStringLiteralWithNames :: WithHsDocIdentifiers StringLiteral GhcRn -> (IfaceStringLiteral, [IfExtName])+toIfaceStringLiteralWithNames (WithHsDocIdentifiers src names) = (toIfaceStringLiteral src, map unLoc names)++toIfaceStringLiteral :: StringLiteral -> IfaceStringLiteral+toIfaceStringLiteral (StringLiteral sl fs _) = IfStringLiteral sl fs++coreRuleToIfaceRule :: CoreRule -> IfaceRule+-- A plugin that installs a BuiltinRule in a CoreDoPluginPass should+-- ensure that there's another CoreDoPluginPass that removes the rule.+-- Otherwise a module using the plugin and compiled with -fno-omit-interface-pragmas+-- would cause panic when the rule is attempted to be written to the interface file.+coreRuleToIfaceRule rule@(BuiltinRule {})+ = pprPanic "toHsRule:" (pprRule rule)++coreRuleToIfaceRule (Rule { ru_name = name, ru_fn = fn,+ ru_act = act, ru_bndrs = bndrs,+ ru_args = args, ru_rhs = rhs,+ ru_orphan = orph, ru_auto = auto })+ = IfaceRule { ifRuleName = name, ifActivation = act,+ ifRuleBndrs = map toIfaceBndr bndrs,+ ifRuleHead = fn,+ ifRuleArgs = map do_arg args,+ ifRuleRhs = toIfaceExpr rhs,+ ifRuleAuto = auto,+ ifRuleOrph = orph }+ where+ -- For type args we must remove synonyms from the outermost+ -- level. Reason: so that when we read it back in we'll+ -- construct the same ru_rough field as we have right now;+ -- see tcIfaceRule+ do_arg (Type ty) = IfaceType (toIfaceType (deNoteType ty))+ do_arg (Coercion co) = IfaceCo (toIfaceCoercion co)+ do_arg arg = toIfaceExpr arg++ {- ************************************************************************ * *@@ -403,8 +478,10 @@ sort_subs (Avail n) = Avail n sort_subs (AvailTC n []) = AvailTC n [] sort_subs (AvailTC n (m:ms))- | NormalGreName n==m = AvailTC n (m:sortBy stableGreNameCmp ms)- | otherwise = AvailTC n (sortBy stableGreNameCmp (m:ms))+ | n == m+ = AvailTC n (m:sortBy stableNameCmp ms)+ | otherwise+ = AvailTC n (sortBy stableNameCmp (m:ms)) -- Maintain the AvailTC Invariant {-@@ -423,362 +500,3 @@ In the result of mkIfaceExports, the names are grouped by defining module, so we may need to split up a single Avail into multiple ones. -}---{--************************************************************************-* *- Converting things to their Iface equivalents-* *-************************************************************************--}--tyThingToIfaceDecl :: Bool -> TyThing -> IfaceDecl-tyThingToIfaceDecl _ (AnId id) = idToIfaceDecl id-tyThingToIfaceDecl _ (ATyCon tycon) = snd (tyConToIfaceDecl emptyTidyEnv tycon)-tyThingToIfaceDecl _ (ACoAxiom ax) = coAxiomToIfaceDecl ax-tyThingToIfaceDecl show_linear_types (AConLike cl) = case cl of- RealDataCon dc -> dataConToIfaceDecl show_linear_types dc -- for ppr purposes only- PatSynCon ps -> patSynToIfaceDecl ps-----------------------------idToIfaceDecl :: Id -> IfaceDecl--- The Id is already tidied, so that locally-bound names--- (lambdas, for-alls) already have non-clashing OccNames--- We can't tidy it here, locally, because it may have--- free variables in its type or IdInfo-idToIfaceDecl id- = IfaceId { ifName = getName id,- ifType = toIfaceType (idType id),- ifIdDetails = toIfaceIdDetails (idDetails id),- ifIdInfo = toIfaceIdInfo (idInfo id) }-----------------------------dataConToIfaceDecl :: Bool -> DataCon -> IfaceDecl-dataConToIfaceDecl show_linear_types dataCon- = IfaceId { ifName = getName dataCon,- ifType = toIfaceType (dataConDisplayType show_linear_types dataCon),- ifIdDetails = IfVanillaId,- ifIdInfo = [] }-----------------------------coAxiomToIfaceDecl :: CoAxiom br -> IfaceDecl--- We *do* tidy Axioms, because they are not (and cannot--- conveniently be) built in tidy form-coAxiomToIfaceDecl ax@(CoAxiom { co_ax_tc = tycon, co_ax_branches = branches- , co_ax_role = role })- = IfaceAxiom { ifName = getName ax- , ifTyCon = toIfaceTyCon tycon- , ifRole = role- , ifAxBranches = map (coAxBranchToIfaceBranch tycon- (map coAxBranchLHS branch_list))- branch_list }- where- branch_list = fromBranches branches---- 2nd parameter is the list of branch LHSs, in case of a closed type family,--- for conversion from incompatible branches to incompatible indices.--- For an open type family the list should be empty.--- See Note [Storing compatibility] in GHC.Core.Coercion.Axiom-coAxBranchToIfaceBranch :: TyCon -> [[Type]] -> CoAxBranch -> IfaceAxBranch-coAxBranchToIfaceBranch tc lhs_s- (CoAxBranch { cab_tvs = tvs, cab_cvs = cvs- , cab_eta_tvs = eta_tvs- , cab_lhs = lhs, cab_roles = roles- , cab_rhs = rhs, cab_incomps = incomps })-- = IfaceAxBranch { ifaxbTyVars = toIfaceTvBndrs tvs- , ifaxbCoVars = map toIfaceIdBndr cvs- , ifaxbEtaTyVars = toIfaceTvBndrs eta_tvs- , ifaxbLHS = toIfaceTcArgs tc lhs- , ifaxbRoles = roles- , ifaxbRHS = toIfaceType rhs- , ifaxbIncomps = iface_incomps }- where- iface_incomps = map (expectJust "iface_incomps"- . flip findIndex lhs_s- . eqTypes- . coAxBranchLHS) incomps--------------------tyConToIfaceDecl :: TidyEnv -> TyCon -> (TidyEnv, IfaceDecl)--- We *do* tidy TyCons, because they are not (and cannot--- conveniently be) built in tidy form--- The returned TidyEnv is the one after tidying the tyConTyVars-tyConToIfaceDecl env tycon- | Just clas <- tyConClass_maybe tycon- = classToIfaceDecl env clas-- | Just syn_rhs <- synTyConRhs_maybe tycon- = ( tc_env1- , IfaceSynonym { ifName = getName tycon,- ifRoles = tyConRoles tycon,- ifSynRhs = if_syn_type syn_rhs,- ifBinders = if_binders,- ifResKind = if_res_kind- })-- | Just fam_flav <- famTyConFlav_maybe tycon- = ( tc_env1- , IfaceFamily { ifName = getName tycon,- ifResVar = if_res_var,- ifFamFlav = to_if_fam_flav fam_flav,- ifBinders = if_binders,- ifResKind = if_res_kind,- ifFamInj = tyConInjectivityInfo tycon- })-- | isAlgTyCon tycon- = ( tc_env1- , IfaceData { ifName = getName tycon,- ifBinders = if_binders,- ifResKind = if_res_kind,- ifCType = tyConCType_maybe tycon,- ifRoles = tyConRoles tycon,- ifCtxt = tidyToIfaceContext tc_env1 (tyConStupidTheta tycon),- ifCons = ifaceConDecls (algTyConRhs tycon),- ifGadtSyntax = isGadtSyntaxTyCon tycon,- ifParent = parent })-- | otherwise -- FunTyCon, PrimTyCon, promoted TyCon/DataCon- -- We only convert these TyCons to IfaceTyCons when we are- -- just about to pretty-print them, not because we are going- -- to put them into interface files- = ( env- , IfaceData { ifName = getName tycon,- ifBinders = if_binders,- ifResKind = if_res_kind,- ifCType = Nothing,- ifRoles = tyConRoles tycon,- ifCtxt = [],- ifCons = IfDataTyCon False [],- ifGadtSyntax = False,- ifParent = IfNoParent })- where- -- NOTE: Not all TyCons have `tyConTyVars` field. Forcing this when `tycon`- -- is one of these TyCons (FunTyCon, PrimTyCon, PromotedDataCon) will cause- -- an error.- (tc_env1, tc_binders) = tidyTyConBinders env (tyConBinders tycon)- tc_tyvars = binderVars tc_binders- if_binders = toIfaceForAllBndrs tc_binders- -- No tidying of the binders; they are already tidy- if_res_kind = tidyToIfaceType tc_env1 (tyConResKind tycon)- if_syn_type ty = tidyToIfaceType tc_env1 ty- if_res_var = getOccFS `fmap` tyConFamilyResVar_maybe tycon-- parent = case tyConFamInstSig_maybe tycon of- Just (tc, ty, ax) -> IfDataInstance (coAxiomName ax)- (toIfaceTyCon tc)- (tidyToIfaceTcArgs tc_env1 tc ty)- Nothing -> IfNoParent-- to_if_fam_flav OpenSynFamilyTyCon = IfaceOpenSynFamilyTyCon- to_if_fam_flav AbstractClosedSynFamilyTyCon = IfaceAbstractClosedSynFamilyTyCon- to_if_fam_flav (DataFamilyTyCon {}) = IfaceDataFamilyTyCon- to_if_fam_flav (BuiltInSynFamTyCon {}) = IfaceBuiltInSynFamTyCon- to_if_fam_flav (ClosedSynFamilyTyCon Nothing) = IfaceClosedSynFamilyTyCon Nothing- to_if_fam_flav (ClosedSynFamilyTyCon (Just ax))- = IfaceClosedSynFamilyTyCon (Just (axn, ibr))- where defs = fromBranches $ coAxiomBranches ax- lhss = map coAxBranchLHS defs- ibr = map (coAxBranchToIfaceBranch tycon lhss) defs- axn = coAxiomName ax-- ifaceConDecls (NewTyCon { data_con = con }) = IfNewTyCon (ifaceConDecl con)- ifaceConDecls (DataTyCon { data_cons = cons, is_type_data = type_data })- = IfDataTyCon type_data (map ifaceConDecl cons)- ifaceConDecls (TupleTyCon { data_con = con }) = IfDataTyCon False [ifaceConDecl con]- ifaceConDecls (SumTyCon { data_cons = cons }) = IfDataTyCon False (map ifaceConDecl cons)- ifaceConDecls AbstractTyCon = IfAbstractTyCon- -- The AbstractTyCon case happens when a TyCon has been trimmed- -- during tidying.- -- Furthermore, tyThingToIfaceDecl is also used in GHC.Tc.Module- -- for GHCi, when browsing a module, in which case the- -- AbstractTyCon and TupleTyCon cases are perfectly sensible.- -- (Tuple declarations are not serialised into interface files.)-- ifaceConDecl data_con- = IfCon { ifConName = dataConName data_con,- ifConInfix = dataConIsInfix data_con,- ifConWrapper = isJust (dataConWrapId_maybe data_con),- ifConExTCvs = map toIfaceBndr ex_tvs',- ifConUserTvBinders = toIfaceForAllBndrs user_bndrs',- ifConEqSpec = map (to_eq_spec . eqSpecPair) eq_spec,- ifConCtxt = tidyToIfaceContext con_env2 theta,- ifConArgTys =- map (\(Scaled w t) -> (tidyToIfaceType con_env2 w- , (tidyToIfaceType con_env2 t))) arg_tys,- ifConFields = dataConFieldLabels data_con,- ifConStricts = map (toIfaceBang con_env2)- (dataConImplBangs data_con),- ifConSrcStricts = map toIfaceSrcBang- (dataConSrcBangs data_con)}- where- (univ_tvs, ex_tvs, eq_spec, theta, arg_tys, _)- = dataConFullSig data_con- user_bndrs = dataConUserTyVarBinders data_con-- -- Tidy the univ_tvs of the data constructor to be identical- -- to the tyConTyVars of the type constructor. This means- -- (a) we don't need to redundantly put them into the interface file- -- (b) when pretty-printing an Iface data declaration in H98-style syntax,- -- we know that the type variables will line up- -- The latter (b) is important because we pretty-print type constructors- -- by converting to Iface syntax and pretty-printing that- con_env1 = (fst tc_env1, mkVarEnv (zipEqual "ifaceConDecl" univ_tvs tc_tyvars))- -- A bit grimy, perhaps, but it's simple!-- (con_env2, ex_tvs') = tidyVarBndrs con_env1 ex_tvs- user_bndrs' = map (tidyUserForAllTyBinder con_env2) user_bndrs- to_eq_spec (tv,ty) = (tidyTyVar con_env2 tv, tidyToIfaceType con_env2 ty)-- -- By this point, we have tidied every universal and existential- -- tyvar. Because of the dcUserForAllTyBinders invariant- -- (see Note [DataCon user type variable binders]), *every*- -- user-written tyvar must be contained in the substitution that- -- tidying produced. Therefore, tidying the user-written tyvars is a- -- simple matter of looking up each variable in the substitution,- -- which tidyTyCoVarOcc accomplishes.- tidyUserForAllTyBinder :: TidyEnv -> InvisTVBinder -> InvisTVBinder- tidyUserForAllTyBinder env (Bndr tv vis) =- Bndr (tidyTyCoVarOcc env tv) vis--classToIfaceDecl :: TidyEnv -> Class -> (TidyEnv, IfaceDecl)-classToIfaceDecl env clas- = ( env1- , IfaceClass { ifName = getName tycon,- ifRoles = tyConRoles (classTyCon clas),- ifBinders = toIfaceForAllBndrs tc_binders,- ifBody = body,- ifFDs = map toIfaceFD clas_fds })- where- (_, clas_fds, sc_theta, _, clas_ats, op_stuff)- = classExtraBigSig clas- tycon = classTyCon clas-- body | isAbstractTyCon tycon = IfAbstractClass- | otherwise- = IfConcreteClass {- ifClassCtxt = tidyToIfaceContext env1 sc_theta,- ifATs = map toIfaceAT clas_ats,- ifSigs = map toIfaceClassOp op_stuff,- ifMinDef = fmap getOccFS (classMinimalDef clas)- }-- (env1, tc_binders) = tidyTyConBinders env (tyConBinders tycon)-- toIfaceAT :: ClassATItem -> IfaceAT- toIfaceAT (ATI tc def)- = IfaceAT if_decl (fmap (tidyToIfaceType env2 . fst) def)- where- (env2, if_decl) = tyConToIfaceDecl env1 tc-- toIfaceClassOp (sel_id, def_meth)- = assert (sel_tyvars == binderVars tc_binders) $- IfaceClassOp (getName sel_id)- (tidyToIfaceType env1 op_ty)- (fmap toDmSpec def_meth)- where- -- Be careful when splitting the type, because of things- -- like class Foo a where- -- op :: (?x :: String) => a -> a- -- and class Baz a where- -- op :: (Ord a) => a -> a- (sel_tyvars, rho_ty) = splitForAllTyCoVars (idType sel_id)- op_ty = funResultTy rho_ty-- toDmSpec :: (Name, DefMethSpec Type) -> DefMethSpec IfaceType- toDmSpec (_, VanillaDM) = VanillaDM- toDmSpec (_, GenericDM dm_ty) = GenericDM (tidyToIfaceType env1 dm_ty)-- toIfaceFD (tvs1, tvs2) = (map (tidyTyVar env1) tvs1- ,map (tidyTyVar env1) tvs2)------------------------------tidyTyConBinder :: TidyEnv -> TyConBinder -> (TidyEnv, TyConBinder)--- If the type variable "binder" is in scope, don't re-bind it--- In a class decl, for example, the ATD binders mention--- (amd must mention) the class tyvars-tidyTyConBinder env@(_, subst) tvb@(Bndr tv vis)- = case lookupVarEnv subst tv of- Just tv' -> (env, Bndr tv' vis)- Nothing -> tidyForAllTyBinder env tvb--tidyTyConBinders :: TidyEnv -> [TyConBinder] -> (TidyEnv, [TyConBinder])-tidyTyConBinders = mapAccumL tidyTyConBinder--tidyTyVar :: TidyEnv -> TyVar -> FastString-tidyTyVar (_, subst) tv = toIfaceTyVar (lookupVarEnv subst tv `orElse` tv)-----------------------------instanceToIfaceInst :: ClsInst -> IfaceClsInst-instanceToIfaceInst (ClsInst { is_dfun = dfun_id, is_flag = oflag- , is_cls_nm = cls_name, is_cls = cls- , is_tcs = rough_tcs- , is_orphan = orph })- = assert (cls_name == className cls) $- IfaceClsInst { ifDFun = idName dfun_id- , ifOFlag = oflag- , ifInstCls = cls_name- , ifInstTys = ifaceRoughMatchTcs $ tail rough_tcs- -- N.B. Drop the class name from the rough match template- -- It is put back by GHC.Core.InstEnv.mkImportedInstance- , ifInstOrph = orph }-----------------------------famInstToIfaceFamInst :: FamInst -> IfaceFamInst-famInstToIfaceFamInst (FamInst { fi_axiom = axiom,- fi_fam = fam,- fi_tcs = rough_tcs })- = IfaceFamInst { ifFamInstAxiom = coAxiomName axiom- , ifFamInstFam = fam- , ifFamInstTys = ifaceRoughMatchTcs rough_tcs- , ifFamInstOrph = orph }- where- fam_decl = tyConName $ coAxiomTyCon axiom- mod = assert (isExternalName (coAxiomName axiom)) $- nameModule (coAxiomName axiom)- is_local name = nameIsLocalOrFrom mod name-- lhs_names = filterNameSet is_local (orphNamesOfAxiomLHS axiom)-- orph | is_local fam_decl- = NotOrphan (nameOccName fam_decl)- | otherwise- = chooseOrphanAnchor lhs_names--ifaceRoughMatchTcs :: [RoughMatchTc] -> [Maybe IfaceTyCon]-ifaceRoughMatchTcs tcs = map do_rough tcs- where- do_rough RM_WildCard = Nothing- do_rough (RM_KnownTc n) = Just (toIfaceTyCon_name n)-----------------------------coreRuleToIfaceRule :: CoreRule -> IfaceRule--- A plugin that installs a BuiltinRule in a CoreDoPluginPass should--- ensure that there's another CoreDoPluginPass that removes the rule.--- Otherwise a module using the plugin and compiled with -fno-omit-interface-pragmas--- would cause panic when the rule is attempted to be written to the interface file.-coreRuleToIfaceRule rule@(BuiltinRule {})- = pprPanic "toHsRule:" (pprRule rule)--coreRuleToIfaceRule (Rule { ru_name = name, ru_fn = fn,- ru_act = act, ru_bndrs = bndrs,- ru_args = args, ru_rhs = rhs,- ru_orphan = orph, ru_auto = auto })- = IfaceRule { ifRuleName = name, ifActivation = act,- ifRuleBndrs = map toIfaceBndr bndrs,- ifRuleHead = fn,- ifRuleArgs = map do_arg args,- ifRuleRhs = toIfaceExpr rhs,- ifRuleAuto = auto,- ifRuleOrph = orph }- where- -- For type args we must remove synonyms from the outermost- -- level. Reason: so that when we read it back in we'll- -- construct the same ru_rough field as we have right now;- -- see tcIfaceRule- do_arg (Type ty) = IfaceType (toIfaceType (deNoteType ty))- do_arg (Coercion co) = IfaceCo (toIfaceCoercion co)- do_arg arg = toIfaceExpr arg
GHC/Iface/Recomp.hs view
@@ -24,7 +24,7 @@ import GHC.Driver.Backend import GHC.Driver.Config.Finder import GHC.Driver.Env-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Ppr import GHC.Driver.Plugins @@ -56,9 +56,9 @@ import GHC.Types.Name import GHC.Types.Name.Set import GHC.Types.SrcLoc-import GHC.Types.Unique import GHC.Types.Unique.Set import GHC.Types.Fixity.Env+import GHC.Types.Unique.Map import GHC.Unit.External import GHC.Unit.Finder import GHC.Unit.State@@ -83,6 +83,7 @@ import Data.Ord import Data.Containers.ListUtils import Data.Bifunctor+import GHC.Iface.Errors.Ppr {- -----------------------------------------------@@ -196,6 +197,7 @@ | MismatchedDynHiFile | ObjectsChanged | LibraryChanged+ | THWithJS deriving (Eq) instance Outputable RecompReason where@@ -228,6 +230,7 @@ MismatchedDynHiFile -> text "Mismatched dynamic interface file" ObjectsChanged -> text "Objects changed" LibraryChanged -> text "Library changed"+ THWithJS -> text "JS backend always recompiles modules using Template Haskell for now (#23013)" recompileRequired :: RecompileRequired -> Bool recompileRequired UpToDate = False@@ -292,8 +295,13 @@ read_result <- readIface read_dflags ncu (ms_mod mod_summary) iface_path case read_result of Failed err -> do- trace_if logger (text "FYI: cannot read old interface file:" $$ nest 4 err)- trace_hi_diffs logger (text "Old interface file was invalid:" $$ nest 4 err)+ let msg = readInterfaceErrorDiagnostic err+ trace_if logger+ $ vcat [ text "FYI: cannot read old interface file:"+ , nest 4 msg ]+ trace_hi_diffs logger $+ vcat [ text "Old interface file was invalid:"+ , nest 4 msg ] return Nothing Succeeded iface -> do trace_if logger (text "Read the interface file" <+> text iface_path)@@ -559,8 +567,8 @@ let logger = hsc_logger hsc_env let unit_state = hsc_units hsc_env let old_merged = sort [ mod | UsageMergedRequirement{ usg_mod = mod } <- mi_usages iface ]- new_merged = case Map.lookup (ms_mod_name mod_summary)- (requirementContext unit_state) of+ new_merged = case lookupUniqMap (requirementContext unit_state)+ (ms_mod_name mod_summary) of Nothing -> [] Just r -> sort $ map (instModuleToModule unit_state) r if old_merged == new_merged@@ -765,12 +773,12 @@ usg_file_label = mlabel } = liftIO $ handleIO handler $ do- new_hash <- lookupFileCache fc file+ new_hash <- lookupFileCache fc $ unpackFS file if (old_hash /= new_hash) then return recomp else return UpToDate where- reason = FileChanged file+ reason = FileChanged $ unpackFS file recomp = needsRecompileBecause $ fromMaybe reason $ fmap CustomReason mlabel handler = if debugIsOn then \e -> pprTrace "UsageFile" (text (show e)) $ return recomp@@ -956,7 +964,8 @@ eps <- hscEPS hsc_env let decls = mi_decls iface0- warn_fn = mkIfaceWarnCache (mi_warns iface0)+ decl_warn_fn = mkIfaceDeclWarnCache (fromIfaceWarnings $ mi_warns iface0)+ export_warn_fn = mkIfaceExportWarnCache (fromIfaceWarnings $ mi_warns iface0) fix_fn = mkIfaceFixCache (mi_fixities iface0) -- The ABI of a declaration represents everything that is made@@ -979,8 +988,8 @@ -- This is computed by finding the free external names of each -- declaration, including IfaceDeclExtras (things that a -- declaration implicitly depends on).- edges :: [ Node Unique IfaceDeclABI ]- edges = [ DigraphNode abi (getUnique (getOccName decl)) out+ edges :: [ Node OccName IfaceDeclABI ]+ edges = [ DigraphNode abi (getOccName decl) out | decl <- decls , let abi = declABI decl , let out = localOccs $ freeNamesDeclABI abi@@ -988,7 +997,7 @@ name_module n = assertPpr (isExternalName n) (ppr n) (nameModule n) localOccs =- map (getUnique . getParent . getOccName)+ map (getParent . getOccName) -- NB: names always use semantic module, so -- filtering must be on the semantic module! -- See Note [Identity versus semantic module]@@ -1013,7 +1022,7 @@ -- Strongly-connected groups of declarations, in dependency order groups :: [SCC IfaceDeclABI]- groups = stronglyConnCompFromEdgedVerticesUniq edges+ groups = stronglyConnCompFromEdgedVerticesOrd edges global_hash_fn = mkHashFun hsc_env eps @@ -1205,7 +1214,11 @@ -- This key is safe because mi_extra_decls contains tidied things. getOcc (IfGblTopBndr b) = getOccName b- getOcc (IfLclTopBndr fs _ _ _) = mkVarOccFS fs+ getOcc (IfLclTopBndr fs _ _ details) =+ case details of+ IfRecSelId { ifRecSelFirstCon = first_con }+ -> mkRecFieldOccFS (getOccFS first_con) fs+ _ -> mkVarOccFS fs binding_key (IfaceNonRec b _) = IfaceNonRec (getOcc b) () binding_key (IfaceRec bs) = IfaceRec (map (\(b, _) -> (getOcc b, ())) bs)@@ -1253,22 +1266,23 @@ let final_iface_exts = ModIfaceBackend- { mi_iface_hash = iface_hash- , mi_mod_hash = mod_hash- , mi_flag_hash = flag_hash- , mi_opt_hash = opt_hash- , mi_hpc_hash = hpc_hash- , mi_plugin_hash = plugin_hash- , mi_orphan = not ( all ifRuleAuto orph_rules- -- See Note [Orphans and auto-generated rules]- && null orph_insts- && null orph_fis)- , mi_finsts = not (null (mi_fam_insts iface0))- , mi_exp_hash = export_hash- , mi_orphan_hash = orphan_hash- , mi_warn_fn = warn_fn- , mi_fix_fn = fix_fn- , mi_hash_fn = lookupOccEnv local_env+ { mi_iface_hash = iface_hash+ , mi_mod_hash = mod_hash+ , mi_flag_hash = flag_hash+ , mi_opt_hash = opt_hash+ , mi_hpc_hash = hpc_hash+ , mi_plugin_hash = plugin_hash+ , mi_orphan = not ( all ifRuleAuto orph_rules+ -- See Note [Orphans and auto-generated rules]+ && null orph_insts+ && null orph_fis)+ , mi_finsts = not (null (mi_fam_insts iface0))+ , mi_exp_hash = export_hash+ , mi_orphan_hash = orphan_hash+ , mi_decl_warn_fn = decl_warn_fn+ , mi_export_warn_fn = export_warn_fn+ , mi_fix_fn = fix_fn+ , mi_hash_fn = lookupOccEnv local_env } final_iface = iface0 { mi_decls = sorted_decls, mi_extra_decls = sorted_extra_decls, mi_final_exts = final_iface_exts } --@@ -1319,7 +1333,7 @@ dflags = hsc_dflags hsc_env ctx = initSDocContext dflags defaultUserStyle get_orph_hash mod = do- iface <- initIfaceLoad hsc_env . withException ctx+ iface <- initIfaceLoad hsc_env . withIfaceErr ctx $ loadInterface (text "getOrphanHashes") mod ImportBySystem return (mi_orphan_hash (mi_final_exts iface)) @@ -1614,7 +1628,7 @@ -- requirements; we didn't do any /real/ typechecking -- so there's no guarantee everything is loaded. -- Kind of a heinous hack.- initIfaceLoad hsc_env . withException ctx+ initIfaceLoad hsc_env . withIfaceErr ctx $ withoutDynamicNow -- If you try and load interfaces when dynamic-too -- enabled then it attempts to load the dyn_hi and hi
GHC/Iface/Recomp/Flags.hs view
@@ -70,10 +70,7 @@ -- Other flags which affect code generation codegen = map (`gopt` dflags) (EnumSet.toList codeGenFlags) - -- Did we include core for all bindings?- fat_iface = gopt Opt_WriteIfSimplifiedCore dflags-- flags = ((mainis, safeHs, lang, cpp), (paths, prof, ticky, codegen, debugLevel, callerCcFilters, fat_iface))+ flags = ((mainis, safeHs, lang, cpp), (paths, prof, ticky, codegen, debugLevel, callerCcFilters)) in -- pprTrace "flags" (ppr flags) $ computeFingerprint nameio flags
GHC/Iface/Rename.hs view
@@ -231,14 +231,14 @@ return (renameHoleModule unit_state hmap mod) rnAvailInfo :: Rename AvailInfo-rnAvailInfo (Avail c) = Avail <$> rnGreName c+rnAvailInfo (Avail c) = Avail <$> rnIfaceGlobal c rnAvailInfo (AvailTC n ns) = do -- Why don't we rnIfaceGlobal the availName itself? It may not -- actually be exported by the module it putatively is from, in -- which case we won't be able to tell what the name actually -- is. But for the availNames they MUST be exported, so they -- will rename fine.- ns' <- mapM rnGreName ns+ ns' <- mapM rnIfaceGlobal ns case ns' of [] -> panic "rnAvailInfoEmpty AvailInfo" (rep:rest) -> assertPpr (all ((== childModule rep) . childModule) rest)@@ -246,11 +246,7 @@ n' <- setNameModule (Just (childModule rep)) n return (AvailTC n' ns') where- childModule = nameModule . greNameMangledName--rnGreName :: Rename GreName-rnGreName (NormalGreName n) = NormalGreName <$> rnIfaceGlobal n-rnGreName (FieldGreName fl) = FieldGreName <$> rnFieldLabel fl+ childModule = nameModule rnFieldLabel :: Rename FieldLabel rnFieldLabel fl = do@@ -258,8 +254,6 @@ return (fl { flSelector = sel' }) -- -- | The key function. This gets called on every Name embedded -- inside a ModIface. Our job is to take a Name from some -- generalized unit ID p[A=\<A>, B=\<B>], and change@@ -704,9 +698,12 @@ rnIfaceExprs = mapM rnIfaceExpr rnIfaceIdDetails :: Rename IfaceIdDetails-rnIfaceIdDetails (IfRecSelId (Left tc) b) = IfRecSelId <$> fmap Left (rnIfaceTyCon tc) <*> pure b-rnIfaceIdDetails (IfRecSelId (Right decl) b) = IfRecSelId <$> fmap Right (rnIfaceDecl decl) <*> pure b-rnIfaceIdDetails details = pure details+rnIfaceIdDetails (IfRecSelId (Left tc) con naughty fl)+ = IfRecSelId <$> fmap Left (rnIfaceTyCon tc) <*> rnIfaceGlobal con <*> pure naughty <*> rnFieldLabel fl+rnIfaceIdDetails (IfRecSelId (Right decl) con naughty fl)+ = IfRecSelId <$> fmap Right (rnIfaceDecl decl) <*> rnIfaceGlobal con <*> pure naughty <*> rnFieldLabel fl+rnIfaceIdDetails details+ = pure details rnIfaceType :: Rename IfaceType rnIfaceType (IfaceFreeTyVar n) = pure (IfaceFreeTyVar n)
GHC/Iface/Syntax.hs view
@@ -16,8 +16,9 @@ IfaceBindingX(..), IfaceMaybeRhs(..), IfaceConAlt(..), IfaceIdInfo, IfaceIdDetails(..), IfaceUnfolding(..), IfGuidance(..), IfaceInfoItem(..), IfaceRule(..), IfaceAnnotation(..), IfaceAnnTarget,+ IfaceWarnings(..), IfaceWarningTxt(..), IfaceStringLiteral(..), IfaceClsInst(..), IfaceFamInst(..), IfaceTickish(..),- IfaceClassBody(..),+ IfaceClassBody(..), IfaceBooleanFormula(..), IfaceBang(..), IfaceSrcBang(..), SrcUnpackedness(..), SrcStrictness(..), IfaceAxBranch(..),@@ -32,9 +33,12 @@ -- Misc ifaceDeclImplicitBndrs, visibleIfConDecls, ifaceDeclFingerprints,+ fromIfaceBooleanFormula,+ fromIfaceWarnings, -- Free Names freeNamesIfDecl, freeNamesIfRule, freeNamesIfFamInst,+ freeNamesIfConDecls, -- Pretty printing pprIfaceExpr,@@ -44,6 +48,7 @@ import GHC.Prelude +import GHC.Data.FastString import GHC.Builtin.Names ( unrestrictedFunTyConKey, liftedTypeKindTyConKey, constraintKindTyConKey ) import GHC.Types.Unique ( hasKey )@@ -63,13 +68,18 @@ import GHC.Types.Annotations( AnnPayload, AnnTarget ) import GHC.Types.Basic import GHC.Unit.Module+import GHC.Unit.Module.Warnings import GHC.Types.SrcLoc-import GHC.Data.BooleanFormula ( BooleanFormula, pprBooleanFormula, isTrue )+import GHC.Types.SourceText+import GHC.Data.BooleanFormula ( BooleanFormula(..), pprBooleanFormula, isTrue ) import GHC.Types.Var( VarBndr(..), binderVar, tyVarSpecToBinders, visArgTypeLike ) import GHC.Core.TyCon ( Role (..), Injectivity(..), tyConBndrVisForAllTyFlag ) import GHC.Core.DataCon (SrcStrictness(..), SrcUnpackedness(..)) import GHC.Builtin.Types ( constraintKindTyConName ) import GHC.Stg.InferTags.TagSig+import GHC.Parser.Annotation (noLocA)+import GHC.Hs.Extension ( GhcRn )+import GHC.Hs.Doc ( WithHsDocIdentifiers(..) ) import GHC.Utils.Lexeme (isLexSym) import GHC.Utils.Fingerprint@@ -80,8 +90,6 @@ import GHC.Utils.Misc( dropList, filterByList, notNull, unzipWith, seqList, zipWithEqual ) -import Language.Haskell.Syntax.Basic (FieldLabelString(..))- import Control.Monad import System.IO.Unsafe import Control.DeepSeq@@ -191,9 +199,22 @@ ifClassCtxt :: IfaceContext, -- Super classes ifATs :: [IfaceAT], -- Associated type families ifSigs :: [IfaceClassOp], -- Method signatures- ifMinDef :: BooleanFormula IfLclName -- Minimal complete definition+ ifMinDef :: IfaceBooleanFormula -- Minimal complete definition } +data IfaceBooleanFormula+ = IfVar IfLclName+ | IfAnd [IfaceBooleanFormula]+ | IfOr [IfaceBooleanFormula]+ | IfParens IfaceBooleanFormula++fromIfaceBooleanFormula :: IfaceBooleanFormula -> BooleanFormula IfLclName+fromIfaceBooleanFormula = \case+ IfVar nm -> Var nm+ IfAnd ibfs -> And (map (noLocA . fromIfaceBooleanFormula) ibfs)+ IfOr ibfs -> Or (map (noLocA . fromIfaceBooleanFormula) ibfs)+ IfParens ibf -> Parens (noLocA . fromIfaceBooleanFormula $ ibf)+ data IfaceTyConParent = IfNoParent | IfDataInstance@@ -323,6 +344,18 @@ ifRuleOrph :: IsOrphan -- Just like IfaceClsInst } +data IfaceWarnings+ = IfWarnAll IfaceWarningTxt+ | IfWarnSome [(OccName, IfaceWarningTxt)]+ [(IfExtName, IfaceWarningTxt)]++data IfaceWarningTxt+ = IfWarningTxt (Maybe WarningCategory) SourceText [(IfaceStringLiteral, [IfExtName])]+ | IfDeprecatedTxt SourceText [(IfaceStringLiteral, [IfExtName])]++data IfaceStringLiteral+ = IfStringLiteral SourceText FastString+ data IfaceAnnotation = IfaceAnnotation { ifAnnotatedTarget :: IfaceAnnTarget,@@ -385,7 +418,11 @@ data IfaceIdDetails = IfVanillaId | IfWorkerLikeId [CbvMark]- | IfRecSelId (Either IfaceTyCon IfaceDecl) Bool+ | IfRecSelId+ { ifRecSelIdParent :: Either IfaceTyCon IfaceDecl+ , ifRecSelFirstCon :: IfaceTopBndr+ , ifRecSelIdIsNaughty :: Bool+ , ifRecSelIdFieldLabel :: FieldLabel } | IfDFunId -- | Iface type for LambdaFormInfo. Fields not relevant for imported Ids are@@ -545,6 +582,24 @@ unsafeDupablePerformIO . computeFingerprint (panic "ifaceDeclFingerprints") +fromIfaceWarnings :: IfaceWarnings -> Warnings GhcRn+fromIfaceWarnings = \case+ IfWarnAll txt -> WarnAll (fromIfaceWarningTxt txt)+ IfWarnSome vs ds -> WarnSome [(occ, fromIfaceWarningTxt txt) | (occ, txt) <- vs]+ [(occ, fromIfaceWarningTxt txt) | (occ, txt) <- ds]++fromIfaceWarningTxt :: IfaceWarningTxt -> WarningTxt GhcRn+fromIfaceWarningTxt = \case+ IfWarningTxt mb_cat src strs -> WarningTxt (noLoc . fromWarningCategory <$> mb_cat) (noLoc src) (noLoc <$> map fromIfaceStringLiteralWithNames strs)+ IfDeprecatedTxt src strs -> DeprecatedTxt (noLoc src) (noLoc <$> map fromIfaceStringLiteralWithNames strs)++fromIfaceStringLiteralWithNames :: (IfaceStringLiteral, [IfExtName]) -> WithHsDocIdentifiers StringLiteral GhcRn+fromIfaceStringLiteralWithNames (str, names) = WithHsDocIdentifiers (fromIfaceStringLiteral str) (map noLoc names)++fromIfaceStringLiteral :: IfaceStringLiteral -> StringLiteral+fromIfaceStringLiteral (IfStringLiteral st fs) = StringLiteral st fs Nothing++ {- ************************************************************************ * *@@ -574,7 +629,7 @@ data IfaceTickish = IfaceHpcTick Module Int -- from HpcTick x | IfaceSCC CostCentre Bool Bool -- from ProfNote- | IfaceSource RealSrcSpan String -- from SourceNote+ | IfaceSource RealSrcSpan FastString -- from SourceNote -- no breakpoints: we never export these into interface files data IfaceAlt = IfaceAlt IfaceConAlt [IfLclName] IfaceExpr@@ -696,6 +751,27 @@ text "--" <+> text "incompatible with:" <+> pprWithCommas (\incomp -> text "#" <> ppr incomp) incomps +instance Outputable IfaceWarnings where+ ppr = \case+ IfWarnAll txt -> text "Warn all" <+> ppr txt+ IfWarnSome vs ds ->+ hang (text "Warnings:") 2 $+ text "Deprecated names:" <+> vcat [ppr name <+> ppr txt | (name, txt) <- vs] $$+ text "Deprecated exports:" <+> vcat [ppr name <+> ppr txt | (name, txt) <- ds]++instance Outputable IfaceWarningTxt where+ ppr = \case+ IfWarningTxt _ _ ws -> pp_ws ws+ IfDeprecatedTxt _ ds -> pp_ws ds+ where+ pp_ws [msg] = pp_with_name msg+ pp_ws msgs = brackets $ vcat . punctuate comma . map pp_with_name $ msgs++ pp_with_name = ppr . fst++instance Outputable IfaceStringLiteral where+ ppr (IfStringLiteral st fs) = pprWithSourceText st (ftext fs)+ instance Outputable IfaceAnnotation where ppr (IfaceAnnotation target value) = ppr target <+> colon <+> ppr value @@ -745,27 +821,6 @@ filtered and hide it in that case. -} -data ShowSub- = ShowSub- { ss_how_much :: ShowHowMuch- , ss_forall :: ShowForAllFlag }---- See Note [Printing IfaceDecl binders]--- The alternative pretty printer referred to in the note.-newtype AltPpr = AltPpr (Maybe (OccName -> SDoc))--data ShowHowMuch- = ShowHeader AltPpr -- ^Header information only, not rhs- | ShowSome [OccName] AltPpr- -- ^ Show only some sub-components. Specifically,- --- -- [@\[\]@] Print all sub-components.- -- [@(n:ns)@] Print sub-component @n@ with @ShowSub = ns@;- -- elide other sub-components to @...@- -- May 14: the list is max 1 element long at the moment- | ShowIface- -- ^Everything including GHC-internal information (used in --show-iface)- {- Note [Printing IfaceDecl binders] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -779,11 +834,6 @@ everything unqualified, so we can just print the OccName directly. -} -instance Outputable ShowHowMuch where- ppr (ShowHeader _) = text "ShowHeader"- ppr ShowIface = text "ShowIface"- ppr (ShowSome occs _) = text "ShowSome" <+> ppr occs- showToHeader :: ShowSub showToHeader = ShowSub { ss_how_much = ShowHeader $ AltPpr Nothing , ss_forall = ShowForAllWhen }@@ -952,7 +1002,7 @@ , pprClassStandaloneKindSig ss clas (mkIfaceTyConKind binders constraintIfaceKind) , text "class" <+> pprIfaceDeclHead suppress_bndr_sig context ss clas binders <+> pprFundeps fds <+> pp_where , nest 2 (vcat [ vcat asocs, vcat dsigs- , ppShowAllSubs ss (pprMinDef minDef)])]+ , ppShowAllSubs ss (pprMinDef $ fromIfaceBooleanFormula minDef)])] where pp_where = ppShowRhs ss $ ppUnless (null sigs && null ats) (text "where") @@ -1299,7 +1349,7 @@ | otherwise = Nothing where sel = flSelector lbl- occ = mkVarOccFS (field_label $ flLabel lbl)+ occ = nameOccName sel mk_user_con_res_ty :: IfaceEqSpec -> SDoc -- See Note [Result type of a data family GADT]@@ -1504,10 +1554,10 @@ instance Outputable IfaceIdDetails where ppr IfVanillaId = Outputable.empty ppr (IfWorkerLikeId dmd) = text "StrWork" <> parens (ppr dmd)- ppr (IfRecSelId tc b) = text "RecSel" <+> ppr tc- <+> if b- then text "<naughty>"- else Outputable.empty+ ppr (IfRecSelId tc _c b _fl) = text "RecSel" <+> ppr tc+ <+> if b+ then text "<naughty>"+ else Outputable.empty ppr IfDFunId = text "DFunId" instance Outputable IfaceInfoItem where@@ -1623,9 +1673,13 @@ freeNamesIfType rhs freeNamesIfIdDetails :: IfaceIdDetails -> NameSet-freeNamesIfIdDetails (IfRecSelId tc _) =- either freeNamesIfTc freeNamesIfDecl tc-freeNamesIfIdDetails _ = emptyNameSet+freeNamesIfIdDetails (IfRecSelId tc first_con _ fl) =+ either freeNamesIfTc freeNamesIfDecl tc &&&+ unitFV first_con &&&+ unitFV (flSelector fl)+freeNamesIfIdDetails IfVanillaId = emptyNameSet+freeNamesIfIdDetails (IfWorkerLikeId {}) = emptyNameSet+freeNamesIfIdDetails IfDFunId = emptyNameSet -- All other changes are handled via the version info on the tycon freeNamesIfFamFlav :: IfaceFamTyConFlav -> NameSet@@ -1657,7 +1711,7 @@ freeNamesIfConDecls :: IfaceConDecls -> NameSet freeNamesIfConDecls (IfDataTyCon _ cs) = fnList freeNamesIfConDecl cs freeNamesIfConDecls (IfNewTyCon c) = freeNamesIfConDecl c-freeNamesIfConDecls _ = emptyNameSet+freeNamesIfConDecls _ = emptyNameSet freeNamesIfConDecl :: IfaceConDecl -> NameSet freeNamesIfConDecl (IfCon { ifConExTCvs = ex_tvs, ifConCtxt = ctxt@@ -1860,7 +1914,7 @@ data DynFlags = DF ... PackageState ... module Packages where- import GHC.Driver.Session+ import GHC.Driver.DynFlags data PackageState = PS ... lookupModule (df :: DynFlags) = case df of@@ -2056,6 +2110,20 @@ ifBody = IfAbstractClass }) _ -> panic (unwords ["Unknown IfaceDecl tag:", show h]) +instance Binary IfaceBooleanFormula where+ put_ bh = \case+ IfVar a1 -> putByte bh 0 >> put_ bh a1+ IfAnd a1 -> putByte bh 1 >> put_ bh a1+ IfOr a1 -> putByte bh 2 >> put_ bh a1+ IfParens a1 -> putByte bh 3 >> put_ bh a1++ get bh = do+ getByte bh >>= \case+ 0 -> IfVar <$> get bh+ 1 -> IfAnd <$> get bh+ 2 -> IfOr <$> get bh+ _ -> IfParens <$> get bh+ {- Note [Lazy deserialization of IfaceId] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The use of lazyPut and lazyGet in the IfaceId Binary instance is@@ -2254,6 +2322,27 @@ a8 <- get bh return (IfaceRule a1 a2 a3 a4 a5 a6 a7 a8) +instance Binary IfaceWarnings where+ put_ bh = \case+ IfWarnAll txt -> putByte bh 0 *> put_ bh txt+ IfWarnSome vs ds -> putByte bh 1 *> put_ bh vs *> put_ bh ds+ get bh = getByte bh >>= \case+ 0 -> pure IfWarnAll <*> get bh+ 1 -> pure IfWarnSome <*> get bh <*> get bh+ _ -> fail "invalid tag(IfaceWarnings)"++instance Binary IfaceWarningTxt where+ put_ bh = \case+ IfWarningTxt a1 a2 a3 -> putByte bh 0 *> put_ bh a1 *> put_ bh a2 *> put_ bh a3+ IfDeprecatedTxt a1 a2 -> putByte bh 1 *> put_ bh a1 *> put_ bh a2+ get bh = getByte bh >>= \case+ 0 -> pure IfWarningTxt <*> get bh <*> get bh <*> get bh+ _ -> pure IfDeprecatedTxt <*> get bh <*> get bh++instance Binary IfaceStringLiteral where+ put_ bh (IfStringLiteral a1 a2) = put_ bh a1 *> put_ bh a2+ get bh = IfStringLiteral <$> get bh <*> get bh+ instance Binary IfaceAnnotation where put_ bh (IfaceAnnotation a1 a2) = do put_ bh a1@@ -2264,16 +2353,25 @@ return (IfaceAnnotation a1 a2) instance Binary IfaceIdDetails where- put_ bh IfVanillaId = putByte bh 0- put_ bh (IfRecSelId a b) = putByte bh 1 >> put_ bh a >> put_ bh b+ put_ bh IfVanillaId = putByte bh 0+ put_ bh (IfRecSelId a b c d) = do { putByte bh 1+ ; put_ bh a+ ; put_ bh b+ ; put_ bh c+ ; put_ bh d } put_ bh (IfWorkerLikeId dmds) = putByte bh 2 >> put_ bh dmds- put_ bh IfDFunId = putByte bh 3+ put_ bh IfDFunId = putByte bh 3 get bh = do h <- getByte bh case h of 0 -> return IfVanillaId- 1 -> do { a <- get bh; b <- get bh; return (IfRecSelId a b) }- 2 -> do { dmds <- get bh; return (IfWorkerLikeId dmds) }+ 1 -> do { a <- get bh+ ; b <- get bh+ ; c <- get bh+ ; d <- get bh+ ; return (IfRecSelId a b c d) }+ 2 -> do { dmds <- get bh+ ; return (IfWorkerLikeId dmds) } _ -> return IfDFunId instance Binary IfaceInfoItem where@@ -2659,8 +2757,15 @@ instance NFData IfaceClassBody where rnf = \case IfAbstractClass -> ()- IfConcreteClass f1 f2 f3 f4 -> rnf f1 `seq` rnf f2 `seq` rnf f3 `seq` f4 `seq` ()+ IfConcreteClass f1 f2 f3 f4 -> rnf f1 `seq` rnf f2 `seq` rnf f3 `seq` rnf f4 `seq` () +instance NFData IfaceBooleanFormula where+ rnf = \case+ IfVar f1 -> rnf f1+ IfAnd f1 -> rnf f1+ IfOr f1 -> rnf f1+ IfParens f1 -> rnf f1+ instance NFData IfaceAT where rnf (IfaceAT f1 f2) = rnf f1 `seq` rnf f2 @@ -2693,8 +2798,8 @@ rnf = \case IfVanillaId -> () IfWorkerLikeId dmds -> dmds `seqList` ()- IfRecSelId (Left tycon) b -> rnf tycon `seq` rnf b- IfRecSelId (Right decl) b -> rnf decl `seq` rnf b+ IfRecSelId (Left tycon) b c d -> rnf tycon `seq` rnf b `seq` rnf c `seq` rnf d+ IfRecSelId (Right decl) b c d -> rnf decl `seq` rnf b `seq` rnf c `seq` rnf d IfDFunId -> () instance NFData IfaceInfoItem where@@ -2794,6 +2899,19 @@ instance NFData IfaceClsInst where rnf (IfaceClsInst f1 f2 f3 f4 f5) = f1 `seq` rnf f2 `seq` rnf f3 `seq` f4 `seq` f5 `seq` ()++instance NFData IfaceWarnings where+ rnf = \case+ IfWarnAll txt -> rnf txt+ IfWarnSome vs ds -> rnf vs `seq` rnf ds++instance NFData IfaceWarningTxt where+ rnf = \case+ IfWarningTxt f1 f2 f3 -> rnf f1 `seq` rnf f2 `seq` rnf f3+ IfDeprecatedTxt f1 f2 -> rnf f1 `seq` rnf f2++instance NFData IfaceStringLiteral where+ rnf (IfStringLiteral f1 f2) = rnf f1 `seq` rnf f2 instance NFData IfaceAnnotation where rnf (IfaceAnnotation f1 f2) = f1 `seq` f2 `seq` ()
GHC/Iface/Tidy.hs view
@@ -615,11 +615,8 @@ getTyConImplicitBinds :: TyCon -> [CoreBind] getTyConImplicitBinds tc- | isDataTyCon tc = map get_defn (mapMaybe dataConWrapId_maybe (tyConDataCons tc))- | otherwise = []- -- The 'otherwise' includes family TyCons of course, but also (less obviously)- -- * Newtypes: see Note [Compulsory newtype unfolding] in GHC.Types.Id.Make- -- * type data: we don't want any code for type-only stuff (#24620)+ | isNewTyCon tc = [] -- See Note [Compulsory newtype unfolding] in GHC.Types.Id.Make+ | otherwise = map get_defn (mapMaybe dataConWrapId_maybe (tyConDataCons tc)) getClassImplicitBinds :: Class -> [CoreBind] getClassImplicitBinds cls
GHC/Iface/Type.hs view
@@ -29,6 +29,7 @@ IfaceTvBndr, IfaceIdBndr, IfaceTyConBinder, IfaceForAllSpecBndr, IfaceForAllBndr, ForAllTyFlag(..), FunTyFlag(..), ShowForAllFlag(..),+ ShowSub(..), ShowHowMuch(..), AltPpr(..), mkIfaceForAllTvBndr, mkIfaceTyConKind, ifaceForAllSpecToBndrs, ifaceForAllSpecToBndr,@@ -206,7 +207,7 @@ mkIfaceTyConKind bndrs res_kind = foldr mk res_kind bndrs where mk :: IfaceTyConBinder -> IfaceKind -> IfaceKind- mk (Bndr tv (AnonTCB af)) k = IfaceFunTy af many_ty (ifaceBndrType tv) k+ mk (Bndr tv AnonTCB) k = IfaceFunTy FTF_T_T many_ty (ifaceBndrType tv) k mk (Bndr tv (NamedTCB vis)) k = IfaceForAllTy (Bndr tv vis) k ifaceForAllSpecToBndrs :: [IfaceForAllSpecBndr] -> [IfaceForAllBndr]@@ -820,7 +821,7 @@ pprIfaceLamBndr (b, IfaceOneShot) = ppr b <> text "[OneShot]" pprIfaceIdBndr :: IfaceIdBndr -> SDoc-pprIfaceIdBndr (w, name, ty) = parens (ppr name <> brackets (ppr w) <+> dcolon <+> ppr ty)+pprIfaceIdBndr (w, name, ty) = parens (ppr name <> brackets (ppr_ty_nested w) <+> dcolon <+> ppr_ty_nested ty) {- Note [Suppressing binder signatures] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -880,7 +881,7 @@ pprIfaceTvBndr (tv, ki) (SuppressBndrSig suppress_sig) (UseBndrParens use_parens) | suppress_sig = ppr tv | isIfaceLiftedTypeKind ki = ppr tv- | otherwise = maybe_parens (ppr tv <+> dcolon <+> ppr ki)+ | otherwise = maybe_parens (ppr tv <+> dcolon <+> ppr_ty_nested ki) where maybe_parens | use_parens = parens | otherwise = id@@ -893,12 +894,7 @@ go (Bndr (IfaceTvBndr bndr) vis) = -- See Note [Pretty-printing invisible arguments] case vis of- AnonTCB af- | isVisibleFunArg af -> ppr_bndr (UseBndrParens True)- | otherwise -> char '@' <> braces (ppr_bndr (UseBndrParens False))- -- The above case is rare. (See Note [AnonTCB with constraint arg]- -- in GHC.Core.TyCon.)- -- Should we print these differently?+ AnonTCB -> ppr_bndr (UseBndrParens True) NamedTCB Required -> ppr_bndr (UseBndrParens True) NamedTCB Specified -> char '@' <> ppr_bndr (UseBndrParens True) NamedTCB Inferred -> char '@' <> braces (ppr_bndr (UseBndrParens False))@@ -937,9 +933,13 @@ instance Outputable IfaceType where ppr ty = pprIfaceType ty -pprIfaceType, pprParendIfaceType :: IfaceType -> SDoc+-- The purpose of 'ppr_ty_nested' is to distinguish calls that should not+-- trigger 'hideNonStandardTypes', see Note [Defaulting RuntimeRep variables]+-- wrinkle (W2).+pprIfaceType, pprParendIfaceType, ppr_ty_nested :: IfaceType -> SDoc pprIfaceType = pprPrecIfaceType topPrec pprParendIfaceType = pprPrecIfaceType appPrec+ppr_ty_nested = ppr_ty topPrec pprPrecIfaceType :: PprPrec -> IfaceType -> SDoc -- We still need `hideNonStandardTypes`, since the `pprPrecIfaceType` may be@@ -991,7 +991,7 @@ | isVisibleFunArg af = (pprTypeArrow af wthis <+> ppr_ty funPrec ty1) : ppr_fun_tail wnext ty2 ppr_fun_tail wthis other_ty- = [pprTypeArrow af wthis <+> pprIfaceType other_ty]+ = [pprTypeArrow af wthis <+> ppr_ty_nested other_ty] ppr_ty ctxt_prec (IfaceAppTy t ts) = if_print_coercions@@ -1048,9 +1048,11 @@ syntactic overhead. 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 LiftedRep.-Likewise, we default all Multiplicity variables to Many.+for now (see #11549). We do this right in the pretty-printer, by pre-processing+the type we are about to print, to default any type variables of kind RuntimeRep+that are bound by toplevel invisible quantification to LiftedRep.+Likewise, we default Multiplicity variables to Many and Levity variables to+Lifted. This is done in a pass right before pretty-printing (defaultIfaceTyVarsOfKind, controlled by@@ -1077,6 +1079,32 @@ There's one exception though: TyVarTv metavariables should not be defaulted, as they appear during kind-checking of "newtype T :: TYPE r where..." (test T18357a). Therefore, we additionally test for isTyConableTyVar.++Wrinkles:++(W1) The loop 'go' in 'defaultIfaceTyVarsOfKind' passes a Bool flag, 'rank1',+ around that indicates whether we haven't yet descended into the arguments+ of a function type.+ This is used to decide whether newly bound variables are eligible for+ defaulting – we do not want contravariant foralls to be defaulted because+ that would result in an incorrect, rather than specialized, type.+ For example:+ ∀ p (r1 :: RuntimeRep) . (∀ (r2 :: RuntimeRep) . p r2) -> p r1+ We want to default 'r1', but not 'r2'.+ When examining the first forall, 'rank1' is True.+ The toplevel function type is matched as IfaceFunTy, where we recurse into+ 'go' by passing False for 'rank1'.+ The forall in the first argument then skips adding a substitution for 'r2'.++(W2) 'defaultIfaceTyVarsOfKind' ought to be called only once when printing a+ type.+ A few components of the printing machinery used to invoke 'ppr' on types+ nested in secondary structures like IfaceBndr, which would repeat the+ defaulting process, but treating the type as if it were top-level, causing+ unwanted defaulting.+ In order to prevent future developers from using 'ppr' again or being+ confused that @ppr_ty topPrec@ is used, we introduced a marker function,+ 'ppr_ty_nested'. -} -- | Default 'RuntimeRep' variables to 'LiftedRep',@@ -1101,28 +1129,29 @@ defaultIfaceTyVarsOfKind :: Bool -- ^ default 'RuntimeRep'/'Levity' variables? -> Bool -- ^ default 'Multiplicity' variables? -> IfaceType -> IfaceType-defaultIfaceTyVarsOfKind def_rep def_mult ty = go emptyFsEnv ty+defaultIfaceTyVarsOfKind def_rep def_mult ty = go emptyFsEnv True ty where go :: FastStringEnv IfaceType -- Set of enclosing forall-ed RuntimeRep/Levity/Multiplicity variables+ -> Bool -- Are we in a toplevel forall, where defaulting is allowed? -> IfaceType -> IfaceType- go subs (IfaceForAllTy (Bndr (IfaceTvBndr (var, var_kind)) argf) ty)+ go subs True (IfaceForAllTy (Bndr (IfaceTvBndr (var, var_kind)) argf) ty) | isInvisibleForAllTyFlag argf -- Don't default *visible* quantification -- or we get the mess in #13963 , Just substituted_ty <- check_substitution var_kind = let subs' = extendFsEnv subs var substituted_ty -- Record that we should replace it with LiftedRep/Lifted/Many, -- and recurse, discarding the forall- in go subs' ty+ in go subs' True ty - go subs (IfaceForAllTy bndr ty)- = IfaceForAllTy (go_ifacebndr subs bndr) (go subs ty)+ go subs rank1 (IfaceForAllTy bndr ty)+ = IfaceForAllTy (go_ifacebndr subs bndr) (go subs rank1 ty) - go subs ty@(IfaceTyVar tv) = case lookupFsEnv subs tv of+ go subs _ ty@(IfaceTyVar tv) = case lookupFsEnv subs tv of Just s -> s Nothing -> ty - go _ ty@(IfaceFreeTyVar tv)+ go _ _ ty@(IfaceFreeTyVar tv) -- See Note [Defaulting RuntimeRep variables], about free vars | def_rep , GHC.Core.Type.isRuntimeRepTy (tyVarKind tv)@@ -1142,34 +1171,34 @@ | otherwise = ty - go subs (IfaceTyConApp tc tc_args)+ go subs _ (IfaceTyConApp tc tc_args) = IfaceTyConApp tc (go_args subs tc_args) - go subs (IfaceTupleTy sort is_prom tc_args)+ go subs _ (IfaceTupleTy sort is_prom tc_args) = IfaceTupleTy sort is_prom (go_args subs tc_args) - go subs (IfaceFunTy af w arg res)- = IfaceFunTy af (go subs w) (go subs arg) (go subs res)+ go subs rank1 (IfaceFunTy af w arg res)+ = IfaceFunTy af (go subs False w) (go subs False arg) (go subs rank1 res) - go subs (IfaceAppTy t ts)- = IfaceAppTy (go subs t) (go_args subs ts)+ go subs _ (IfaceAppTy t ts)+ = IfaceAppTy (go subs False t) (go_args subs ts) - go subs (IfaceCastTy x co)- = IfaceCastTy (go subs x) co+ go subs rank1 (IfaceCastTy x co)+ = IfaceCastTy (go subs rank1 x) co - go _ ty@(IfaceLitTy {}) = ty- go _ ty@(IfaceCoercionTy {}) = ty+ go _ _ ty@(IfaceLitTy {}) = ty+ go _ _ ty@(IfaceCoercionTy {}) = ty go_ifacebndr :: FastStringEnv IfaceType -> IfaceForAllBndr -> IfaceForAllBndr go_ifacebndr subs (Bndr (IfaceIdBndr (w, n, t)) argf)- = Bndr (IfaceIdBndr (w, n, go subs t)) argf+ = Bndr (IfaceIdBndr (w, n, go subs False t)) argf go_ifacebndr subs (Bndr (IfaceTvBndr (n, t)) argf)- = Bndr (IfaceTvBndr (n, go subs t)) argf+ = Bndr (IfaceTvBndr (n, go subs False t)) argf go_args :: FastStringEnv IfaceType -> IfaceAppArgs -> IfaceAppArgs go_args _ IA_Nil = IA_Nil go_args subs (IA_Arg ty argf args)- = IA_Arg (go subs ty) argf (go_args subs args)+ = IA_Arg (go subs False ty) argf (go_args subs args) check_substitution :: IfaceType -> Maybe IfaceType check_substitution (IfaceTyConApp tc _)@@ -1240,7 +1269,7 @@ Specified | print_kinds -> char '@' <> ppr_ty appPrec t Inferred | print_kinds- -> char '@' <> braces (ppr_ty topPrec t)+ -> char '@' <> braces (ppr_ty_nested t) _ -> empty -------------------@@ -1322,6 +1351,32 @@ -- or when compiling with -fprint-explicit-foralls. data ShowForAllFlag = ShowForAllMust | ShowForAllWhen +data ShowSub+ = ShowSub+ { ss_how_much :: ShowHowMuch+ , ss_forall :: ShowForAllFlag }++-- See Note [Printing IfaceDecl binders]+-- The alternative pretty printer referred to in the note.+newtype AltPpr = AltPpr (Maybe (OccName -> SDoc))++data ShowHowMuch+ = ShowHeader AltPpr -- ^Header information only, not rhs+ | ShowSome [OccName] AltPpr+ -- ^ Show only some sub-components. Specifically,+ --+ -- [@\[\]@] Print all sub-components.+ -- [@(n:ns)@] Print sub-component @n@ with @ShowSub = ns@;+ -- elide other sub-components to @...@+ -- May 14: the list is max 1 element long at the moment+ | ShowIface+ -- ^Everything including GHC-internal information (used in --show-iface)++instance Outputable ShowHowMuch where+ ppr (ShowHeader _) = text "ShowHeader"+ ppr ShowIface = text "ShowIface"+ ppr (ShowSome occs _) = text "ShowSome" <+> ppr occs+ pprIfaceSigmaType :: ShowForAllFlag -> IfaceType -> SDoc pprIfaceSigmaType show_forall ty = hideNonStandardTypes (ppr_sigma show_forall topPrec) ty@@ -1345,7 +1400,7 @@ -- Then it could handle both invisible and required binders, and -- splitIfaceReqForallTy wouldn't be necessary here. in ppr_iface_forall_part show_forall invis_tvs theta $- sep [pprIfaceForAll req_tvs, ppr tau']+ sep [pprIfaceForAll req_tvs, ppr_ty_nested tau'] pprUserIfaceForAll :: [IfaceForAllBndr] -> SDoc pprUserIfaceForAll tvs
GHC/Iface/Type.hs-boot view
@@ -1,6 +1,7 @@ module GHC.Iface.Type ( IfaceType, IfaceTyCon, IfaceBndr , IfaceCoercion, IfaceTyLit, IfaceAppArgs+ , ShowSub ) where @@ -15,3 +16,4 @@ data IfaceTyLit data IfaceCoercion data IfaceBndr+data ShowSub
GHC/IfaceToCore.hs view
@@ -10,6 +10,8 @@ {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE RecursiveDo #-}+ {-# OPTIONS_GHC -Wno-incomplete-record-updates #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE RecordWildCards #-}@@ -33,8 +35,6 @@ import GHC.ByteCode.Types -import Data.Word- import GHC.Driver.Env import GHC.Driver.Session import GHC.Driver.Config.Core.Lint ( initLintConfig )@@ -42,6 +42,7 @@ import GHC.Builtin.Types.Literals(typeNatCoAxiomRules) import GHC.Builtin.Types +import GHC.Iface.Decl (toIfaceBooleanFormula) import GHC.Iface.Syntax import GHC.Iface.Load import GHC.Iface.Env@@ -112,7 +113,6 @@ import GHC.Types.Var.Set import GHC.Types.Name import GHC.Types.Name.Env-import GHC.Types.Name.Set import GHC.Types.Id import GHC.Types.Id.Make import GHC.Types.Id.Info@@ -130,6 +130,7 @@ import Data.IORef import Data.Foldable import GHC.Builtin.Names (ioTyConName, rOOT_MAIN)+import GHC.Iface.Errors.Types {- This module takes@@ -288,7 +289,7 @@ (mkNameEnv [ (n, op) | op@(IfaceClassOp n _ _) <- ops2 ]) in d1 { ifBody = (ifBody d1) { ifSigs = ops,- ifMinDef = BF.mkOr [noLocA bf1, noLocA bf2]+ ifMinDef = toIfaceBooleanFormula . BF.mkOr . map (noLocA . fromIfaceBooleanFormula) $ [bf1, bf2] } } `withRolesFrom` d2 -- It doesn't matter; we'll check for consistency later when@@ -565,7 +566,7 @@ then do { (_, hug) <- getEpsAndHug ; case lookupHugByModule mod hug of Just info | mi_boot (hm_iface info) == IsBoot- -> mkSelfBootInfo (hm_iface info) (hm_details info)+ -> return $ SelfBoot { sb_mds = hm_details info } _ -> return NoSelfBoot } else do @@ -574,13 +575,14 @@ -- to check consistency against, rather than just when we notice -- that an hi-boot is necessary due to a circular import. { hsc_env <- getTopEnv- ; read_result <- liftIO $ findAndReadIface hsc_env- need (fst (getModuleInstantiation mod)) mod- IsBoot -- Hi-boot file+ ; read_result <- liftIO $ findAndReadIface hsc_env need+ (fst (getModuleInstantiation mod)) mod+ IsBoot -- Hi-boot file ; case read_result of {- Succeeded (iface, _path) -> do { tc_iface <- initIfaceTcRn $ typecheckIface iface- ; mkSelfBootInfo iface tc_iface } ;+ Succeeded (iface, _path) ->+ do { tc_iface <- initIfaceTcRn $ typecheckIface iface+ ; return $ SelfBoot { sb_mds = tc_iface } } ; Failed err -> -- There was no hi-boot file. But if there is circularity in@@ -596,9 +598,12 @@ Nothing -> return NoSelfBoot -- error cases Just (GWIB { gwib_isBoot = is_boot }) -> case is_boot of- IsBoot -> failWithTc (mkTcRnUnknownMessage $ mkPlainError noHints (elaborate err))+ IsBoot ->+ let diag = Can'tFindInterface err+ (LookingForHiBoot mod)+ in failWithTc (TcRnInterfaceError diag) -- The hi-boot file has mysteriously disappeared.- NotBoot -> failWithTc (mkTcRnUnknownMessage $ mkPlainError noHints moduleLoop)+ NotBoot -> failWithTc (TcRnInterfaceError (CircularImport mod)) -- Someone below us imported us! -- This is a loop with no hi-boot in the way }}}}@@ -606,36 +611,6 @@ need = text "Need the hi-boot interface for" <+> ppr mod <+> text "to compare against the Real Thing" - moduleLoop = text "Circular imports: module" <+> quotes (ppr mod)- <+> text "depends on itself"-- elaborate err = hang (text "Could not find hi-boot interface for" <+>- quotes (ppr mod) <> colon) 4 err---mkSelfBootInfo :: ModIface -> ModDetails -> TcRn SelfBootInfo-mkSelfBootInfo iface mds- = do -- NB: This is computed DIRECTLY from the ModIface rather- -- than from the ModDetails, so that we can query 'sb_tcs'- -- WITHOUT forcing the contents of the interface.- let tcs = map ifName- . filter isIfaceTyCon- . map snd- $ mi_decls iface- return $ SelfBoot { sb_mds = mds- , sb_tcs = mkNameSet tcs }- where- -- Returns @True@ if, when you call 'tcIfaceDecl' on- -- this 'IfaceDecl', an ATyCon would be returned.- -- NB: This code assumes that a TyCon cannot be implicit.- isIfaceTyCon IfaceId{} = False- isIfaceTyCon IfaceData{} = True- isIfaceTyCon IfaceSynonym{} = True- isIfaceTyCon IfaceFamily{} = True- isIfaceTyCon IfaceClass{} = True- isIfaceTyCon IfaceAxiom{} = False- isIfaceTyCon IfacePatSyn{} = False- {- ************************************************************************ * *@@ -699,7 +674,7 @@ tc_iface_decl _ ignore_prags (IfaceId {ifName = name, ifType = iface_type, ifIdDetails = details, ifIdInfo = info}) = do { ty <- tcIfaceType iface_type- ; details <- tcIdDetails ty details+ ; details <- tcIdDetails name ty details ; info <- tcIdInfo ignore_prags TopLevel name ty info ; return (AnId (mkGlobalId details name ty info)) } @@ -797,7 +772,7 @@ ifBody = IfConcreteClass { ifClassCtxt = rdr_ctxt, ifATs = rdr_ats, ifSigs = rdr_sigs,- ifMinDef = mindef_occ+ ifMinDef = if_mindef }}) = bindIfaceTyConBinders binders $ \ binders' -> do { traceIf (text "tc-iface-class1" <+> ppr tc_name)@@ -806,6 +781,7 @@ ; sigs <- mapM tc_sig rdr_sigs ; fds <- mapM tc_fd rdr_fds ; traceIf (text "tc-iface-class3" <+> ppr tc_name)+ ; let mindef_occ = fromIfaceBooleanFormula if_mindef ; mindef <- traverse (lookupIfaceTop . mkVarOccFS) mindef_occ ; cls <- fixM $ \ cls -> do { ats <- mapM (tc_at cls) rdr_ats@@ -955,10 +931,15 @@ return $ mkExportedVanillaId gbl_name (mkTyConApp ioTyCon [unitTy]) | otherwise = tcIfaceExtId gbl_name mk_top_id (IfLclTopBndr raw_name iface_type info details) = do- name <- newIfaceName (mkVarOccFS raw_name) ty <- tcIfaceType iface_type+ rec { details' <- tcIdDetails name ty details+ ; let occ = case details' of+ RecSelId { sel_tycon = parent }+ -> let con_fs = getOccFS $ recSelFirstConName parent+ in mkRecFieldOccFS con_fs raw_name+ _ -> mkVarOccFS raw_name+ ; name <- newIfaceName occ } info' <- tcIdInfo False TopLevel name ty info- details' <- tcIdDetails ty details let new_id = mkGlobalId details' name ty info' return new_id @@ -1250,17 +1231,18 @@ = do { dfun <- forkM (text "Dict fun" <+> ppr dfun_name) $ fmap tyThingId (tcIfaceImplicit dfun_name) ; let mb_tcs' = map tcRoughTyCon mb_tcs- ; return (mkImportedInstance cls mb_tcs' dfun_name dfun oflag orph) }+ ; return (mkImportedClsInst cls mb_tcs' dfun_name dfun oflag orph) } tcIfaceFamInst :: IfaceFamInst -> IfL FamInst tcIfaceFamInst (IfaceFamInst { ifFamInstFam = fam, ifFamInstTys = mb_tcs- , ifFamInstAxiom = axiom_name } )+ , ifFamInstAxiom = axiom_name+ , ifFamInstOrph = orphan } ) = do { axiom' <- forkM (text "Axiom" <+> ppr axiom_name) $ tcIfaceCoAxiom axiom_name -- will panic if branched, but that's OK ; let axiom'' = toUnbranchedAxiom axiom' mb_tcs' = map tcRoughTyCon mb_tcs- ; return (mkImportedFamInst fam mb_tcs' axiom'') }+ ; return (mkImportedFamInst fam mb_tcs' axiom'' orphan) } {- ************************************************************************@@ -1640,7 +1622,7 @@ tcIfaceTickish :: IfaceTickish -> IfM lcl CoreTickish tcIfaceTickish (IfaceHpcTick modl ix) = return (HpcTick modl ix) tcIfaceTickish (IfaceSCC cc tick push) = return (ProfNote cc tick push)-tcIfaceTickish (IfaceSource src name) = return (SourceNote src name)+tcIfaceTickish (IfaceSource src name) = return (SourceNote src (LexicalFastString name)) ------------------------- tcIfaceLit :: Literal -> IfL Literal@@ -1673,8 +1655,7 @@ tcIfaceDataAlt :: Mult -> DataCon -> [Type] -> [FastString] -> IfaceExpr -> IfL CoreAlt tcIfaceDataAlt mult con inst_tys arg_strs rhs- = do { us <- newUniqueSupply- ; let uniqs = uniqsFromSupply us+ = do { uniqs <- getUniquesM ; let (ex_tvs, arg_ids) = dataConRepFSInstPat arg_strs uniqs mult con inst_tys @@ -1691,19 +1672,19 @@ ************************************************************************ -} -tcIdDetails :: Type -> IfaceIdDetails -> IfL IdDetails-tcIdDetails _ IfVanillaId = return VanillaId-tcIdDetails _ (IfWorkerLikeId dmds) = return $ WorkerLikeId dmds-tcIdDetails ty IfDFunId+tcIdDetails :: Name -> Type -> IfaceIdDetails -> IfL IdDetails+tcIdDetails _ _ IfVanillaId = return VanillaId+tcIdDetails _ _ (IfWorkerLikeId dmds) = return $ WorkerLikeId dmds+tcIdDetails _ ty IfDFunId = return (DFunId (isNewTyCon (classTyCon cls))) where (_, _, cls, _) = tcSplitDFunTy ty -tcIdDetails _ (IfRecSelId tc naughty)+tcIdDetails nm _ (IfRecSelId tc _first_con naughty fl) = do { tc' <- either (fmap RecSelData . tcIfaceTyCon) (fmap (RecSelPatSyn . tyThingPatSyn) . tcIfaceDecl False) tc- ; return (RecSelId { sel_tycon = tc', sel_naughty = naughty }) }+ ; return (RecSelId { sel_tycon = tc', sel_naughty = naughty, sel_fieldLabel = fl { flSelector = nm } }) } where tyThingPatSyn (AConLike (PatSynCon ps)) = ps tyThingPatSyn _ = panic "tcIdDetails: expecting patsyn"@@ -1961,7 +1942,7 @@ { mb_thing <- importDecl name -- It's imported; go get it ; case mb_thing of- Failed err -> failIfM (ppr name <+> err)+ Failed err -> failIfM (ppr name <+> pprDiagnostic err) Succeeded thing -> return thing }}} @@ -2181,7 +2162,7 @@ -- CgBreakInfo -hydrateCgBreakInfo :: CgBreakInfo -> IfL ([Maybe (Id, Word16)], Type)+hydrateCgBreakInfo :: CgBreakInfo -> IfL ([Maybe (Id, Word)], Type) hydrateCgBreakInfo CgBreakInfo{..} = do bindIfaceTyVars cgb_tyvars $ \_ -> do result_ty <- tcIfaceType cgb_resty
GHC/JS/Make.hs view
@@ -36,7 +36,7 @@ -- construct new terms in the EDSL. Crucially, missing from this module are -- corresponding /elimination/ or /destructing/ functions which would -- project information from the EDSL back to Haskell. See--- 'GHC.StgToJS.UnitUtils' and 'GHC.StgToJS.CoreUtils' for such functions.+-- 'GHC.StgToJS.Utils' for such functions. -- -- * /Introduction/ functions --@@ -83,7 +83,7 @@ -- $intro_funcs , var , jString- , jLam, jVar, jFor, jForIn, jForEachIn, jTryCatchFinally+ , jLam, jFun, jFunction, jVar, jFor, jForNoDecl, jForIn, jForEachIn, jTryCatchFinally -- * Combinators -- $combinators , (||=), (|=), (.==.), (.===.), (.!=.), (.!==.), (.!)@@ -126,27 +126,19 @@ math_cosh, math_sinh, math_tanh, math_expm1, math_log1p, math_fround -- * Statement helpers , decl- -- * Miscellaneous- -- $misc- , allocData, allocClsA- , dataFieldName, dataFieldNames ) where import GHC.Prelude hiding ((.|.)) -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import Control.Arrow ((***)) -import Data.Array import qualified Data.Map as M-import qualified Data.List as List -import GHC.Utils.Outputable (Outputable (..)) import GHC.Data.FastString import GHC.Utils.Monad.State.Strict-import GHC.Utils.Panic import GHC.Utils.Misc import GHC.Types.Unique.Map @@ -257,11 +249,20 @@ (block,is) <- runIdentSupply $ toSat_ f [] return $ JFunc is block +-- | Create a new function. The result is a 'GHC.JS.Syntax.JStat'.+-- Usage:+--+-- > jFun fun_name $ \x -> ...+jFun :: ToSat a => Ident -> a -> JStat+jFun n f = UnsatBlock . IS $ do+ (block,is) <- runIdentSupply $ toSat_ f []+ return $ FuncStat n is block+ -- | Introduce a new variable into scope for the duration -- of the enclosed expression. The result is a block statement. -- Usage: ----- @jVar $ \x y -> mconcat [jVar x ||= one_, jVar y ||= two_, jVar x + jVar y]@+-- @jVar $ \x y -> mconcat [x ||= one_, y ||= two_, x + y]@ jVar :: ToSat a => a -> JStat jVar f = UnsatBlock . IS $ do (block, is) <- runIdentSupply $ toSat_ f []@@ -270,6 +271,9 @@ addDecls x = x return $ addDecls block +jFunction :: Ident -> [Ident] -> JStat -> JStat+jFunction name args body = FuncStat name args body+ -- | Create a 'for in' statement. -- Usage: --@@ -277,21 +281,38 @@ jForIn :: ToSat a => JExpr -> (JExpr -> a) -> JStat jForIn e f = UnsatBlock . IS $ do (block, is) <- runIdentSupply $ toSat_ f []- let i = List.head is+ let i = head is return $ decl i `mappend` ForInStat False i e block -- | As with "jForIn" but creating a \"for each in\" statement. jForEachIn :: ToSat a => JExpr -> (JExpr -> a) -> JStat jForEachIn e f = UnsatBlock . IS $ do (block, is) <- runIdentSupply $ toSat_ f []- let i = List.head is+ let i = head is return $ decl i `mappend` ForInStat True i e block +-- | Create a 'for' statement given a function for initialization, a predicate+-- to step to, a step and a body+-- Usage:+--+-- @ jFor (|= zero_) (.<. Int 65536) preIncrS+-- (\j -> ...something with the counter j...)@+--+jFor :: (JExpr -> JStat)+ -> (JExpr -> JExpr)+ -> (JExpr -> JStat)+ -> (JExpr -> JStat)+ -> JStat+jFor init pred step body = jVar $ \i -> ForStat (init i) (pred i) (step i) (body i)++jForNoDecl :: Ident -> JExpr -> JExpr -> JStat -> JStat -> JStat+jForNoDecl i initial p step body = ForStat (toJExpr i |= initial) p step body+ -- | As with "jForIn" but creating a \"for each in\" statement. jTryCatchFinally :: (ToSat a) => JStat -> a -> JStat -> JStat jTryCatchFinally s f s2 = UnsatBlock . IS $ do (block, is) <- runIdentSupply $ toSat_ f []- let i = List.head is+ let i = head is return $ TryStat s i block s2 -- | construct a JS variable reference@@ -302,13 +323,6 @@ jString :: FastString -> JExpr jString = toJExpr --- | Create a 'for' statement-jFor :: (ToJExpr a, ToStat b) => JStat -> a -> JStat -> b -> JStat-jFor before p after b = BlockStat [before, WhileStat False (toJExpr p) b']- where b' = case toStat b of- BlockStat xs -> BlockStat $ xs ++ [after]- x -> BlockStat [x,after]- -- | construct a js declaration with the given identifier decl :: Ident -> JStat decl i = DeclStat i Nothing@@ -630,43 +644,6 @@ instance Fractional JExpr where x / y = InfixExpr DivOp x y fromRational x = ValExpr (JDouble (realToFrac x))-------------------------------------------------------------------------------------- Miscellaneous------------------------------------------------------------------------------------ $misc--- Everything else,---- | Cache "dXXX" field names-dataFieldCache :: Array Int FastString-dataFieldCache = listArray (0,nFieldCache) (map (mkFastString . ('d':) . show) [(0::Int)..nFieldCache])--nFieldCache :: Int-nFieldCache = 16384--dataFieldName :: Int -> FastString-dataFieldName i- | i < 1 || i > nFieldCache = panic "dataFieldName" (ppr i)- | otherwise = dataFieldCache ! i--dataFieldNames :: [FastString]-dataFieldNames = fmap dataFieldName [1..nFieldCache]----- | Cache "h$dXXX" names-dataCache :: Array Int FastString-dataCache = listArray (0,1024) (map (mkFastString . ("h$d"++) . show) [(0::Int)..1024])--allocData :: Int -> JExpr-allocData i = toJExpr (TxtI (dataCache ! i))---- | Cache "h$cXXX" names-clsCache :: Array Int FastString-clsCache = listArray (0,1024) (map (mkFastString . ("h$c"++) . show) [(0::Int)..1024])--allocClsA :: Int -> JExpr-allocClsA i = toJExpr (TxtI (clsCache ! i)) --------------------------------------------------------------------------------
+ GHC/JS/Optimizer.hs view
@@ -0,0 +1,270 @@+{-# LANGUAGE LambdaCase #-}++-----------------------------------------------------------------------------+-- |+-- Module : GHC.JS.Optimizer+-- Copyright : (c) The University of Glasgow 2001+-- License : BSD-style (see the file LICENSE)+--+-- Maintainer : Jeffrey Young <jeffrey.young@iohk.io>+-- Luite Stegeman <luite.stegeman@iohk.io>+-- Sylvain Henry <sylvain.henry@iohk.io>+-- Josh Meredith <josh.meredith@iohk.io>+-- Stability : experimental+--+--+-- * Domain and Purpose+--+-- GHC.JS.Optimizer is a shallow embedding of a peephole optimizer. That is,+-- this module defines transformations over the JavaScript IR in+-- 'GHC.JS.Syntax', transforming the IR forms from inefficient, or+-- non-idiomatic, JavaScript to more efficient and idiomatic JavaScript. The+-- optimizer is written in continuation passing style so optimizations+-- compose.+--+-- * Architecture of the optimizer+--+-- The design is that each optimization pattern matches on the head of a+-- block by pattern matching onto the head of the stream of nodes in the+-- JavaScript IR. If an optimization gets a successful match then it performs+-- whatever rewrite is necessary and then calls the 'loop' continuation. This+-- ensures that the result of the optimization is subject to the same+-- optimization, /and/ the rest of the optimizations. If there is no match+-- then the optimization should call the 'next' continuation to pass the+-- stream to the next optimization in the optimization chain. We then define+-- the last "optimization" to be @tailLoop@ which selects the next block of+-- code to optimize and begin the optimization pipeline again.+-----------------------------------------------------------------------------+module GHC.JS.Optimizer+ ( jsOptimize+ ) where+++import Prelude++import GHC.JS.Syntax++import Control.Arrow++{-+Note [Unsafe JavaScript optimizations]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+There are a number of optimizations that the JavaScript Backend performs that+are not sound with respect to arbritrary JavaScript. We still perform these+optimizations because we are not optimizing arbritrary javascript and under the+assumption that the JavaScript backend will not generate code that violates the+soundness of the optimizer. For example, the @deadCodeElim@ optimization removes+all statements that occur after a 'return' in JavaScript, however this is not+always sound because of hoisting, consider this program:++ function foo() {+ var x = 2;+ bar();+ return x;++ function bar() {+ x = 10;+ }}++ which is transformed to:++ function foo() {+ var x = 2;+ bar();+ return x;+ }}++The optimized form is clearly a program that goes wrong because `bar()` is no+longer defined. But the JavaScript backend will never generate this code, so as+long as that assumption holds we are safe to perform optimizations that would+normally be unsafe.+-}+++--------------------------------------------------------------------------------+-- Top level Driver+--------------------------------------------------------------------------------+jsOptimize :: JStat -> JStat+jsOptimize = go+ where+ p_opt = jsOptimize+ opt = jsOptimize'+ e_opt = jExprOptimize+ -- base case+ go (BlockStat xs) = BlockStat (opt xs)+ -- recursive cases+ go (ForStat i p s body) = ForStat (go i) (e_opt p) (go s) (p_opt body)+ go (ForInStat b i p body) = ForInStat b i p (p_opt body)+ go (WhileStat b c body) = WhileStat b (e_opt c) (p_opt body)+ go (SwitchStat s ps body) = SwitchStat s (fmap (second go) ps) (p_opt body)+ go (FuncStat i args body) = FuncStat i args (p_opt body)+ go (IfStat c t e) = IfStat (e_opt c) (p_opt t) (p_opt e)+ go (TryStat ths i c f) = TryStat (p_opt ths) i (p_opt c) (p_opt f)+ go (LabelStat lbl s) = LabelStat lbl (p_opt s)+ -- special case: drive the optimizer into expressions+ go (AssignStat id op rhs) = AssignStat (e_opt id) op (e_opt rhs)+ go (DeclStat i (Just e)) = DeclStat i (Just $ e_opt e)+ go (ReturnStat e) = ReturnStat (e_opt e)+ go (UOpStat op e) = UOpStat op (e_opt e)+ go (ApplStat f args) = ApplStat (e_opt f) (e_opt <$> args)+ -- all else is terminal, we match on these to force a warning in the event+ -- another constructor is added+ go x@BreakStat{} = x+ go x@ContinueStat{} = x+ go x@DeclStat{} = x -- match on the nothing case++jsOptimize' :: [JStat] -> [JStat]+jsOptimize' = runBlockOpt opts . single_pass_opts+ where+ opts :: BlockOpt+ opts = safe_opts+ <> unsafe_opts+ <> tailLoop -- tailloop must be last, see module description++ unsafe_opts :: BlockOpt+ unsafe_opts = mconcat [ deadCodeElim ]++ safe_opts :: BlockOpt+ safe_opts = mconcat [ declareAssign, combineOps ]++ single_pass_opts :: BlockTrans+ single_pass_opts = runBlockTrans sp_opts++ sp_opts = [flattenBlocks]++-- | recur over a @JExpr@ and optimize the @JVal@s+jExprOptimize :: JExpr -> JExpr+-- the base case+jExprOptimize (ValExpr val) = ValExpr (jValOptimize val)+-- recursive cases+jExprOptimize (SelExpr obj field) = SelExpr (jExprOptimize obj) field+jExprOptimize (IdxExpr obj ix) = IdxExpr (jExprOptimize obj) (jExprOptimize ix)+jExprOptimize (UOpExpr op exp) = UOpExpr op (jExprOptimize exp)+jExprOptimize (IfExpr c t e) = IfExpr c (jExprOptimize t) (jExprOptimize e)+jExprOptimize (ApplExpr f args ) = ApplExpr (jExprOptimize f) (jExprOptimize <$> args)+jExprOptimize (InfixExpr op l r) = InfixExpr op (jExprOptimize l) (jExprOptimize r)++-- | drive optimizations to anonymous functions and over expressions+jValOptimize :: JVal -> JVal+-- base case+jValOptimize (JFunc args body) = JFunc args (jsOptimize body)+-- recursive cases+jValOptimize (JList exprs) = JList (jExprOptimize <$> exprs)+jValOptimize (JHash hash) = JHash (jExprOptimize <$> hash)+-- all else is terminal+jValOptimize x@JVar{} = x+jValOptimize x@JDouble{} = x+jValOptimize x@JInt{} = x+jValOptimize x@JStr{} = x+jValOptimize x@JRegEx{} = x++-- | A block transformation is a function from a stream of syntax to another+-- stream+type BlockTrans = [JStat] -> [JStat]++-- | A BlockOpt is a function that alters the stream, and a continuation that+-- represents the rest of the stream. The first @BlockTrans@ represents+-- restarting the optimizer after a change has happened. The second @BlockTrans@+-- represents the rest of the continuation stream.+newtype BlockOpt = BlockOpt (BlockTrans -> BlockTrans -> BlockTrans)++-- | To merge two BlockOpt we first run the left-hand side optimization and+-- capture the right-hand side in the continuation+instance Semigroup BlockOpt where+ BlockOpt opt0 <> BlockOpt opt1 = BlockOpt+ $ \loop next -> opt0 loop (opt1 loop next)++instance Monoid BlockOpt where+ -- don't loop, just finalize+ mempty = BlockOpt $ \_loop next -> next++-- | loop until a fixpoint is reached+runBlockOpt :: BlockOpt -> [JStat] -> [JStat]+runBlockOpt (BlockOpt opt) xs = recur xs+ where recur = opt recur id++runBlockTrans :: [BlockTrans] -> [JStat] -> [JStat]+runBlockTrans opts = foldl (.) id opts++-- | Perform all the optimizations on the tail of a block.+tailLoop :: BlockOpt+tailLoop = BlockOpt $ \loop next -> \case+ [] -> next []+ -- this call to jsOptimize is required or else the optimizer will not+ -- properly recur down JStat. See the 'deadCodeElim' test for examples which+ -- were failing before this change+ (x:xs) -> next (jsOptimize x : loop xs)++--------------------------------------------------------------------------------+-- Single Slot Optimizations+--------------------------------------------------------------------------------++{- |+ Catch modify and assign operators:+ case 1:+ i = i + 1; ==> ++i;+ case 2:+ i = i - 1; ==> --i;+ case 3:+ i = i + n; ==> i += n;+ case 4:+ i = i - n; ==> i -= n;+-}+combineOps :: BlockOpt+combineOps = BlockOpt $ \loop next ->+ \case+ -- find a op pattern, and rerun the optimizer on its result unless there is+ -- nothing to optimize, in which case call the next optimization+ (unchanged@(AssignStat+ ident@(ValExpr (JVar i))+ AssignOp+ (InfixExpr op (ValExpr (JVar i')) e)) : xs)+ | i == i' -> case (op, e) of+ (AddOp, (ValExpr (JInt 1))) -> loop $ UOpStat PreIncOp ident : xs+ (SubOp, (ValExpr (JInt 1))) -> loop $ UOpStat PreDecOp ident : xs+ (AddOp, e') -> loop $ AssignStat ident AddAssignOp e' : xs+ (SubOp, e') -> loop $ AssignStat ident SubAssignOp e' : xs+ _ -> next $ unchanged : xs+ -- commutative cases+ (unchanged@(AssignStat+ ident@(ValExpr (JVar i))+ AssignOp+ (InfixExpr op e (ValExpr (JVar i')))) : xs)+ | i == i' -> case (op, e) of+ (AddOp, (ValExpr (JInt 1))) -> loop $ UOpStat PreIncOp ident : xs+ (SubOp, (ValExpr (JInt 1))) -> loop $ UOpStat PreDecOp ident : xs+ (AddOp, e') -> loop $ AssignStat ident AddAssignOp e' : xs+ (SubOp, e') -> loop $ AssignStat ident SubAssignOp e' : xs+ _ -> next $ unchanged : xs+ -- general case, we had nothing to optimize in this case so call the next+ -- optimization+ xs -> next xs+++--------------------------------------------------------------------------------+-- Dual Slot Optimizations+--------------------------------------------------------------------------------+-- | Catch 'var i; i = q;' ==> 'var i = q;'+declareAssign :: BlockOpt+declareAssign = BlockOpt $+ \loop next -> \case+ ( (DeclStat i Nothing)+ : (AssignStat (ValExpr (JVar i')) AssignOp v)+ : xs+ ) | i == i' -> loop (DeclStat i (Just v) : xs)+ xs -> next xs++-- | Eliminate all code after a return statement. This is a special case+-- optimization that doesn't need to loop. See Note [Unsafe JavaScript+-- optimizations]+deadCodeElim :: BlockOpt+deadCodeElim = BlockOpt $+ \_loop next -> \case+ (x@ReturnStat{}:_) -> next [x]+ xs -> next xs++-- | remove nested blocks+flattenBlocks :: BlockTrans+flattenBlocks (BlockStat y : ys) = flattenBlocks y ++ flattenBlocks ys+flattenBlocks (x:xs) = x : flattenBlocks xs+flattenBlocks [] = []
GHC/JS/Ppr.hs view
@@ -6,22 +6,60 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE BlockArguments #-}+{-# LANGUAGE TypeApplications #-} -- For Outputable instances for JS syntax {-# OPTIONS_GHC -Wno-orphans #-} --- | Pretty-printing JavaScript+-----------------------------------------------------------------------------+-- |+-- Module : GHC.JS.Ppr+-- Copyright : (c) The University of Glasgow 2001+-- License : BSD-style (see the file LICENSE)+--+-- Maintainer : Jeffrey Young <jeffrey.young@iohk.io>+-- Luite Stegeman <luite.stegeman@iohk.io>+-- Sylvain Henry <sylvain.henry@iohk.io>+-- Josh Meredith <josh.meredith@iohk.io>+-- Stability : experimental+--+--+-- * Domain and Purpose+--+-- GHC.JS.Ppr defines the code generation facilities for the JavaScript+-- backend. That is, this module exports a function from the JS backend IR+-- to JavaScript compliant concrete syntax that can readily be executed by+-- nodejs or called in a browser.+--+-- * Design+--+-- This module follows the architecture and style of the other backends in+-- GHC: it intances Outputable for the relevant types, creates a class that+-- describes a morphism from the IR domain to JavaScript concrete Syntax and+-- then generates that syntax on a case by case basis.+--+-- * How to use+--+-- The key functions are @renderJS@, @jsToDoc@, and the @RenderJS@ record.+-- Use the @RenderJS@ record and @jsToDoc@ to define a custom renderers for+-- specific parts of the backend, for example in 'GHC.StgToJS.Linker.Opt' a+-- custom renderer ensures all @Ident@ generated by the linker optimization+-- pass are prefixed differently than the default. Use @renderJS@ to+-- generate JavaScript concrete syntax in the general case, suitable for+-- human consumption.+-----------------------------------------------------------------------------+ module GHC.JS.Ppr ( renderJs- , renderJs' , renderPrefixJs , renderPrefixJs' , JsToDoc(..) , defaultRenderJs , RenderJs(..)+ , JsRender(..) , jsToDoc , pprStringLit- , flattenBlocks+ , interSemi , braceNest , hangBrace )@@ -38,154 +76,159 @@ import Numeric(showHex) -import GHC.Utils.Outputable (Outputable (..), docToSDoc)-import GHC.Utils.Ppr as PP+import GHC.Utils.Outputable import GHC.Data.FastString import GHC.Types.Unique.Map instance Outputable JExpr where- ppr = docToSDoc . renderJs+ ppr = renderJs instance Outputable JVal where- ppr = docToSDoc . renderJs-+ ppr = renderJs -($$$) :: Doc -> Doc -> Doc-x $$$ y = nest 2 $ x $+$ y+--------------------------------------------------------------------------------+-- Top level API+-------------------------------------------------------------------------------- -- | Render a syntax tree as a pretty-printable document -- (simply showing the resultant doc produces a nice, -- well formatted String).-renderJs :: (JsToDoc a, JMacro a) => a -> Doc+renderJs :: (JsToDoc a) => a -> SDoc renderJs = renderJs' defaultRenderJs -renderJs' :: (JsToDoc a, JMacro a) => RenderJs -> a -> Doc-renderJs' r = jsToDocR r . jsSaturate Nothing+{-# SPECIALISE renderJs' :: JsToDoc a => RenderJs HLine -> a -> HLine #-}+{-# SPECIALISE renderJs' :: JsToDoc a => RenderJs SDoc -> a -> SDoc #-}+renderJs' :: (JsToDoc a, JsRender doc) => RenderJs doc -> a -> doc+renderJs' r = jsToDocR r -data RenderJs = RenderJs- { renderJsS :: !(RenderJs -> JStat -> Doc)- , renderJsE :: !(RenderJs -> JExpr -> Doc)- , renderJsV :: !(RenderJs -> JVal -> Doc)- , renderJsI :: !(RenderJs -> Ident -> Doc)+data RenderJs doc = RenderJs+ { renderJsS :: !(JsRender doc => RenderJs doc -> JStat -> doc)+ , renderJsE :: !(JsRender doc => RenderJs doc -> JExpr -> doc)+ , renderJsV :: !(JsRender doc => RenderJs doc -> JVal -> doc)+ , renderJsI :: !(JsRender doc => RenderJs doc -> Ident -> doc) } -defaultRenderJs :: RenderJs+defaultRenderJs :: RenderJs doc defaultRenderJs = RenderJs defRenderJsS defRenderJsE defRenderJsV defRenderJsI -jsToDoc :: JsToDoc a => a -> Doc+jsToDoc :: JsToDoc a => a -> SDoc jsToDoc = jsToDocR defaultRenderJs -- | Render a syntax tree as a pretty-printable document, using a given prefix -- to all generated names. Use this with distinct prefixes to ensure distinct -- generated names between independent calls to render(Prefix)Js.-renderPrefixJs :: (JsToDoc a, JMacro a) => FastString -> a -> Doc-renderPrefixJs pfx = renderPrefixJs' defaultRenderJs pfx--renderPrefixJs' :: (JsToDoc a, JMacro a) => RenderJs -> FastString -> a -> Doc-renderPrefixJs' r pfx = jsToDocR r . jsSaturate (Just $ "jmId_" `mappend` pfx)+renderPrefixJs :: (JsToDoc a, JMacro a) => a -> SDoc+renderPrefixJs = renderPrefixJs' defaultRenderJs -braceNest :: Doc -> Doc-braceNest x = char '{' <+> nest 2 x $$ char '}'+renderPrefixJs' :: (JsToDoc a, JMacro a, JsRender doc) => RenderJs doc -> a -> doc+renderPrefixJs' r = jsToDocR r --- | Hang with braces:------ hdr {--- body--- }-hangBrace :: Doc -> Doc -> Doc-hangBrace hdr body = sep [ hdr <> char ' ' <> char '{', nest 2 body, char '}' ]+--------------------------------------------------------------------------------+-- Code Generator+-------------------------------------------------------------------------------- -class JsToDoc a where jsToDocR :: RenderJs -> a -> Doc-instance JsToDoc JStat where jsToDocR r = renderJsS r r-instance JsToDoc JExpr where jsToDocR r = renderJsE r r-instance JsToDoc JVal where jsToDocR r = renderJsV r r-instance JsToDoc Ident where jsToDocR r = renderJsI r r-instance JsToDoc [JExpr] where- jsToDocR r = vcat . map ((<> semi) . jsToDocR r)-instance JsToDoc [JStat] where- jsToDocR r = vcat . map ((<> semi) . jsToDocR r)+class JsToDoc a where jsToDocR :: JsRender doc => RenderJs doc -> a -> doc+instance JsToDoc JStat where jsToDocR r = renderJsS r r+instance JsToDoc JExpr where jsToDocR r = renderJsE r r+instance JsToDoc JVal where jsToDocR r = renderJsV r r+instance JsToDoc Ident where jsToDocR r = renderJsI r r+instance JsToDoc [JExpr] where jsToDocR r = jcat . map (addSemi . jsToDocR r)+instance JsToDoc [JStat] where jsToDocR r = jcat . map (addSemi . jsToDocR r) -defRenderJsS :: RenderJs -> JStat -> Doc+defRenderJsS :: JsRender doc => RenderJs doc -> JStat -> doc defRenderJsS r = \case- IfStat cond x y -> hangBrace (text "if" <> parens (jsToDocR r cond))- (jsToDocR r x)- $$ mbElse- where mbElse | y == BlockStat [] = PP.empty- | otherwise = hangBrace (text "else") (jsToDocR r y)+ IfStat cond x y -> jcat+ [ hangBrace (text "if" <+?> parens (jsToDocR r cond)) (optBlock r x)+ , mbElse+ ]+ where mbElse | y == BlockStat [] = empty+ | otherwise = hangBrace (text "else") (optBlock r y) DeclStat x Nothing -> text "var" <+> jsToDocR r x- DeclStat x (Just e) -> text "var" <+> jsToDocR r x <+> char '=' <+> jsToDocR r e- WhileStat False p b -> hangBrace (text "while" <> parens (jsToDocR r p)) (jsToDocR r b)- WhileStat True p b -> (hangBrace (text "do") (jsToDocR r b)) $+$ text "while" <+> parens (jsToDocR r p)- UnsatBlock e -> jsToDocR r $ pseudoSaturate e- BreakStat l -> maybe (text "break") (\(LexicalFastString s) -> (text "break" <+> ftext s)) l- ContinueStat l -> maybe (text "continue") (\(LexicalFastString s) -> (text "continue" <+> ftext s)) l- LabelStat (LexicalFastString l) s -> ftext l <> char ':' $$ printBS s+ -- special treatment for functions, otherwise there is too much left padding+ -- (more than the length of the expression assigned to). E.g.+ --+ -- var long_variable_name = (function()+ -- {+ -- ...+ -- });+ --+ DeclStat x (Just (ValExpr f@(JFunc {}))) -> jhang (text "var" <+> jsToDocR r x <+?> char '=') (jsToDocR r f)+ DeclStat x (Just e) -> text "var" <+> jsToDocR r x <+?> char '=' <+?> jsToDocR r e+ WhileStat False p b -> hangBrace (text "while" <+?> parens (jsToDocR r p)) (optBlock r b)+ WhileStat True p b -> hangBrace (text "do") (optBlock r b) <+?> text "while" <+?> parens (jsToDocR r p)+ BreakStat l -> addSemi $ maybe (text "break") (\(LexicalFastString s) -> (text "break" <+> ftext s)) l+ ContinueStat l -> addSemi $ maybe (text "continue") (\(LexicalFastString s) -> (text "continue" <+> ftext s)) l+ LabelStat (LexicalFastString l) s -> ftext l <> char ':' $$$ printBS s where- printBS (BlockStat ss) = vcat $ interSemi $ flattenBlocks ss+ printBS (BlockStat ss) = interSemi $ map (jsToDocR r) ss printBS x = jsToDocR r x- interSemi [x] = [jsToDocR r x]- interSemi [] = []- interSemi (x:xs) = (jsToDocR r x <> semi) : interSemi xs - ForInStat each i e b -> hangBrace (text txt <> parens (jsToDocR r i <+> text "in" <+> jsToDocR r e)) (jsToDocR r b)+ ForStat init p s1 sb -> hangBrace (text "for" <+?> parens forCond) (optBlock r sb)+ where+ forCond = jsToDocR r init <> semi <+?> jsToDocR r p <> semi <+?> parens (jsToDocR r s1)+ ForInStat each i e b -> hangBrace (text txt <+?> parens (jsToDocR r i <+> text "in" <+> jsToDocR r e)) (optBlock r b) where txt | each = "for each" | otherwise = "for"- SwitchStat e l d -> hangBrace (text "switch" <+> parens (jsToDocR r e)) cases- where l' = map (\(c,s) -> (text "case" <+> parens (jsToDocR r c) <> char ':') $$$ (jsToDocR r s)) l ++ [text "default:" $$$ (jsToDocR r d)]- cases = vcat l'+ SwitchStat e l d -> hangBrace (text "switch" <+?> parens (jsToDocR r e)) cases+ where l' = map (\(c,s) -> (text "case" <+?> parens (jsToDocR r c) <> colon) $$$ jnest (optBlock r s)) l+ ++ [(text "default:") $$$ jnest (optBlock r d)]+ cases = foldl1 ($$$) l' ReturnStat e -> text "return" <+> jsToDocR r e- ApplStat e es -> jsToDocR r e <> (parens . hsep . punctuate comma $ map (jsToDocR r) es)- TryStat s i s1 s2 -> hangBrace (text "try") (jsToDocR r s) $$ mbCatch $$ mbFinally- where mbCatch | s1 == BlockStat [] = PP.empty- | otherwise = hangBrace (text "catch" <> parens (jsToDocR r i)) (jsToDocR r s1)- mbFinally | s2 == BlockStat [] = PP.empty- | otherwise = hangBrace (text "finally") (jsToDocR r s2)- AssignStat i x -> case x of+ ApplStat e es -> jsToDocR r e <> (parens . foldl' (<+?>) empty . punctuate comma $ map (jsToDocR r) es)+ FuncStat i is b -> hangBrace (text "function" <+> jsToDocR r i+ <> parens (foldl' (<+?>) empty . punctuate comma . map (jsToDocR r) $ is))+ (optBlock r b)+ TryStat s i s1 s2 -> hangBrace (text "try") (jsToDocR r s) <+?> mbCatch <+?> mbFinally+ where mbCatch | s1 == BlockStat [] = empty+ | otherwise = hangBrace (text "catch" <+?> parens (jsToDocR r i)) (optBlock r s1)+ mbFinally | s2 == BlockStat [] = empty+ | otherwise = hangBrace (text "finally") (optBlock r s2)+ AssignStat i op x -> case x of -- special treatment for functions, otherwise there is too much left padding -- (more than the length of the expression assigned to). E.g. --- -- var long_variable_name = (function()+ -- long_variable_name = (function() -- { -- ... -- }); --- ValExpr (JFunc is b) -> sep [jsToDocR r i <+> text "= function" <> parens (hsep . punctuate comma . map (jsToDocR r) $ is) <> char '{', nest 2 (jsToDocR r b), text "}"]- _ -> jsToDocR r i <+> char '=' <+> jsToDocR r x+ ValExpr f@(JFunc {}) -> jhang (jsToDocR r i <> ftext (aOpText op)) (jsToDocR r f)+ _ -> jsToDocR r i <+?> ftext (aOpText op) <+?> jsToDocR r x UOpStat op x | isPre op && isAlphaOp op -> ftext (uOpText op) <+> optParens r x- | isPre op -> ftext (uOpText op) <> optParens r x- | otherwise -> optParens r x <> ftext (uOpText op)- BlockStat xs -> jsToDocR r (flattenBlocks xs)+ | isPre op -> ftext (uOpText op) <+> optParens r x+ | otherwise -> optParens r x <+> ftext (uOpText op)+ BlockStat xs -> jsToDocR r xs -flattenBlocks :: [JStat] -> [JStat]-flattenBlocks = \case- BlockStat y:ys -> flattenBlocks y ++ flattenBlocks ys- y:ys -> y : flattenBlocks ys- [] -> []+-- | Remove one Block layering if we know we already have braces around the+-- statement+optBlock :: JsRender doc => RenderJs doc -> JStat -> doc+optBlock r x = case x of+ BlockStat{} -> jsToDocR r x+ _ -> addSemi (jsToDocR r x) -optParens :: RenderJs -> JExpr -> Doc+optParens :: JsRender doc => RenderJs doc -> JExpr -> doc optParens r x = case x of UOpExpr _ _ -> parens (jsToDocR r x) _ -> jsToDocR r x -defRenderJsE :: RenderJs -> JExpr -> Doc+defRenderJsE :: JsRender doc => RenderJs doc -> JExpr -> doc defRenderJsE r = \case ValExpr x -> jsToDocR r x SelExpr x y -> jsToDocR r x <> char '.' <> jsToDocR r y IdxExpr x y -> jsToDocR r x <> brackets (jsToDocR r y)- IfExpr x y z -> parens (jsToDocR r x <+> char '?' <+> jsToDocR r y <+> char ':' <+> jsToDocR r z)- InfixExpr op x y -> parens $ hsep [jsToDocR r x, ftext (opText op), jsToDocR r y]+ IfExpr x y z -> parens (jsToDocR r x <+?> char '?' <+?> jsToDocR r y <+?> colon <+?> jsToDocR r z)+ InfixExpr op x y -> parens $ jsToDocR r x <+?> ftext (opText op) <+?> jsToDocR r y UOpExpr op x | isPre op && isAlphaOp op -> ftext (uOpText op) <+> optParens r x- | isPre op -> ftext (uOpText op) <> optParens r x- | otherwise -> optParens r x <> ftext (uOpText op)- ApplExpr je xs -> jsToDocR r je <> (parens . hsep . punctuate comma $ map (jsToDocR r) xs)- UnsatExpr e -> jsToDocR r $ pseudoSaturate e+ | isPre op -> ftext (uOpText op) <+> optParens r x+ | otherwise -> optParens r x <+> ftext (uOpText op)+ ApplExpr je xs -> jsToDocR r je <> (parens . foldl' (<+?>) empty . punctuate comma $ map (jsToDocR r) xs) -defRenderJsV :: RenderJs -> JVal -> Doc+defRenderJsV :: JsRender doc => RenderJs doc -> JVal -> doc defRenderJsV r = \case JVar i -> jsToDocR r i- JList xs -> brackets . hsep . punctuate comma $ map (jsToDocR r) xs+ JList xs -> brackets . foldl' (<+?>) empty . punctuate comma $ map (jsToDocR r) xs JDouble (SaneDouble d) | d < 0 || isNegativeZero d -> parens (double d) | otherwise -> double d@@ -193,49 +236,27 @@ | i < 0 -> parens (integer i) | otherwise -> integer i JStr s -> pprStringLit s- JRegEx s -> hcat [char '/',ftext s, char '/']+ JRegEx s -> char '/' <> ftext s <> char '/' JHash m | isNullUniqMap m -> text "{}"- | otherwise -> braceNest . hsep . punctuate comma .- map (\(x,y) -> squotes (ftext x) <> colon <+> jsToDocR r y)- -- nonDetEltsUniqMap doesn't introduce non-determinism here+ | otherwise -> braceNest . foldl' (<+?>) empty . punctuate comma .+ map (\(x,y) -> char '\'' <> ftext x <> char '\'' <> colon <+?> jsToDocR r y)+ -- nonDetKeysUniqMap doesn't introduce non-determinism here -- because we sort the elements lexically- $ sortOn (LexicalFastString . fst) (nonDetEltsUniqMap m)- JFunc is b -> parens $ hangBrace (text "function" <> parens (hsep . punctuate comma . map (jsToDocR r) $ is)) (jsToDocR r b)- UnsatVal f -> jsToDocR r $ pseudoSaturate f+ $ sortOn (LexicalFastString . fst) (nonDetUniqMapToList m)+ JFunc is b -> parens $ hangBrace (text "function" <> parens (foldl' (<+?>) empty . punctuate comma . map (jsToDocR r) $ is)) (jsToDocR r b) -defRenderJsI :: RenderJs -> Ident -> Doc+defRenderJsI :: JsRender doc => RenderJs doc -> Ident -> doc defRenderJsI _ (TxtI t) = ftext t +aOpText :: AOp -> FastString+aOpText = \case+ AssignOp -> "="+ AddAssignOp -> "+="+ SubAssignOp -> "-=" -pprStringLit :: FastString -> Doc-pprStringLit s = hcat [char '\"',encodeJson s, char '\"'] -encodeJson :: FastString -> Doc-encodeJson xs = hcat (map encodeJsonChar (unpackFS xs))--encodeJsonChar :: Char -> Doc-encodeJsonChar = \case- '/' -> text "\\/"- '\b' -> text "\\b"- '\f' -> text "\\f"- '\n' -> text "\\n"- '\r' -> text "\\r"- '\t' -> text "\\t"- '"' -> text "\\\""- '\\' -> text "\\\\"- c- | not (isControl c) && ord c <= 127 -> char c- | ord c <= 0xff -> hexxs "\\x" 2 (ord c)- | ord c <= 0xffff -> hexxs "\\u" 4 (ord c)- | otherwise -> let cp0 = ord c - 0x10000 -- output surrogate pair- in hexxs "\\u" 4 ((cp0 `shiftR` 10) + 0xd800) <>- hexxs "\\u" 4 ((cp0 .&. 0x3ff) + 0xdc00)- where hexxs prefix pad cp =- let h = showHex cp ""- in text (prefix ++ replicate (pad - length h) '0' ++ h)--uOpText :: JUOp -> FastString+uOpText :: UOp -> FastString uOpText = \case NotOp -> "!" BNotOp -> "~"@@ -251,7 +272,7 @@ PreDecOp -> "--" PostDecOp -> "--" -opText :: JOp -> FastString+opText :: Op -> FastString opText = \case EqOp -> "==" StrictEqOp -> "==="@@ -278,13 +299,13 @@ InOp -> "in" -isPre :: JUOp -> Bool+isPre :: UOp -> Bool isPre = \case PostIncOp -> False PostDecOp -> False _ -> True -isAlphaOp :: JUOp -> Bool+isAlphaOp :: UOp -> Bool isAlphaOp = \case NewOp -> True TypeofOp -> True@@ -292,3 +313,95 @@ YieldOp -> True VoidOp -> True _ -> False++pprStringLit :: IsLine doc => FastString -> doc+pprStringLit s = char '\"' <> encodeJson s <> char '\"'++--------------------------------------------------------------------------------+-- Utilities+--------------------------------------------------------------------------------++encodeJson :: IsLine doc => FastString -> doc+encodeJson xs = hcat (map encodeJsonChar (unpackFS xs))++encodeJsonChar :: IsLine doc => Char -> doc+encodeJsonChar = \case+ '/' -> text "\\/"+ '\b' -> text "\\b"+ '\f' -> text "\\f"+ '\n' -> text "\\n"+ '\r' -> text "\\r"+ '\t' -> text "\\t"+ '"' -> text "\\\""+ '\\' -> text "\\\\"+ c+ | not (isControl c) && ord c <= 127 -> char c+ | ord c <= 0xff -> hexxs "\\x" 2 (ord c)+ | ord c <= 0xffff -> hexxs "\\u" 4 (ord c)+ | otherwise -> let cp0 = ord c - 0x10000 -- output surrogate pair+ in hexxs "\\u" 4 ((cp0 `shiftR` 10) + 0xd800) <>+ hexxs "\\u" 4 ((cp0 .&. 0x3ff) + 0xdc00)+ where hexxs prefix pad cp =+ let h = showHex cp ""+ in text (prefix ++ replicate (pad - length h) '0' ++ h)+++interSemi :: JsRender doc => [doc] -> doc+interSemi = foldl ($$$) empty . punctuateFinal semi semi++-- | The structure `{body}`, optionally indented over multiple lines+{-# INLINE braceNest #-}+braceNest :: JsRender doc => doc -> doc+braceNest x = lbrace $$$ jnest x $$$ rbrace++-- | The structure `hdr {body}`, optionally indented over multiple lines+{-# INLINE hangBrace #-}+hangBrace :: JsRender doc => doc -> doc -> doc+hangBrace hdr body = jcat [ hdr <> char ' ' <> char '{', jnest body, char '}' ]++{-# INLINE jhang #-}+jhang :: JsRender doc => doc -> doc -> doc+jhang hdr body = jcat [ hdr, jnest body]++-- | JsRender controls the differences in whitespace between HLine and SDoc.+-- Generally, this involves the indentation and newlines in the human-readable+-- SDoc implementation being replaced in the HLine version by the minimal+-- whitespace required for valid JavaScript syntax.+class IsLine doc => JsRender doc where++ -- | Concatenate with an optional single space+ (<+?>) :: doc -> doc -> doc+ -- | Concatenate with an optional newline+ ($$$) :: doc -> doc -> doc+ -- | Concatenate these `doc`s, either vertically (SDoc) or horizontally (HLine)+ jcat :: [doc] -> doc+ -- | Optionally indent the following+ jnest :: doc -> doc+ -- | Append semi-colon (and line-break in HLine mode)+ addSemi :: doc -> doc++instance JsRender SDoc where+ (<+?>) = (<+>)+ {-# INLINE (<+?>) #-}+ ($$$) = ($+$)+ {-# INLINE ($$$) #-}+ jcat = vcat+ {-# INLINE jcat #-}+ jnest = nest 2+ {-# INLINE jnest #-}+ addSemi x = x <> semi+ {-# INLINE addSemi #-}+++instance JsRender HLine where+ (<+?>) = (<>)+ {-# INLINE (<+?>) #-}+ ($$$) = (<>)+ {-# INLINE ($$$) #-}+ jcat = hcat+ {-# INLINE jcat #-}+ jnest = id+ {-# INLINE jnest #-}+ addSemi x = x <> semi <> char '\n'+ -- we add a line-break to avoid issues with lines too long in minified outputs+ {-# INLINE addSemi #-}
GHC/JS/Syntax.hs view
@@ -48,93 +48,63 @@ -- GHC.StgToJS.\*. Please see 'GHC.JS.Make' for a module which provides -- helper functions that use the deeply embedded DSL defined in this module -- to provide some of the benefits of a shallow embedding.+-- -----------------------------------------------------------------------------+ module GHC.JS.Syntax ( -- * Deeply embedded JS datatypes JStat(..) , JExpr(..) , JVal(..)- , JOp(..)- , JUOp(..)+ , Op(..)+ , UOp(..)+ , AOp(..) , Ident(..)- , identFS- , JsLabel+ , JLabel -- * pattern synonyms over JS operators- , pattern New- , pattern Not- , pattern Negate- , pattern Add- , pattern Sub- , pattern Mul- , pattern Div- , pattern Mod- , pattern BOr- , pattern BAnd- , pattern BXor- , pattern BNot- , pattern LOr- , pattern LAnd- , pattern Int- , pattern String- , pattern PreInc- , pattern PostInc- , pattern PreDec- , pattern PostDec- -- * Ident supply- , IdentSupply(..)- , newIdentSupply- , pseudoSaturate+ , pattern JNew+ , pattern JNot+ , pattern JNegate+ , pattern JAdd+ , pattern JSub+ , pattern JMul+ , pattern JDiv+ , pattern JMod+ , pattern JBOr+ , pattern JBAnd+ , pattern JBXor+ , pattern JBNot+ , pattern JLOr+ , pattern JLAnd+ , pattern SatInt+ , pattern JString+ , pattern JPreInc+ , pattern JPostInc+ , pattern JPreDec+ , pattern JPostDec -- * Utility , SaneDouble(..)+ , jassignAll+ , jassignAllEqual+ , jvar ) where import GHC.Prelude +import GHC.JS.Unsat.Syntax (Ident(..))+import GHC.Data.FastString+import GHC.Types.Unique.Map+import GHC.Types.SaneDouble+import GHC.Utils.Misc+ import Control.DeepSeq -import Data.Function import Data.Data-import Data.Word import qualified Data.Semigroup as Semigroup import GHC.Generics -import GHC.Data.FastString-import GHC.Utils.Monad.State.Strict-import GHC.Types.Unique-import GHC.Types.Unique.Map --- | A supply of identifiers, possibly empty-newtype IdentSupply a- = IS {runIdentSupply :: State [Ident] a}- deriving Typeable--instance NFData (IdentSupply a) where rnf IS{} = ()--inIdentSupply :: (State [Ident] a -> State [Ident] b) -> IdentSupply a -> IdentSupply b-inIdentSupply f x = IS $ f (runIdentSupply x)--instance Functor IdentSupply where- fmap f x = inIdentSupply (fmap f) x--newIdentSupply :: Maybe FastString -> [Ident]-newIdentSupply Nothing = newIdentSupply (Just "jmId")-newIdentSupply (Just pfx) = [ TxtI (mconcat [pfx,"_",mkFastString (show x)])- | x <- [(0::Word64)..]- ]---- | Given a Pseudo-saturate a value with garbage @<<unsatId>>@ identifiers.-pseudoSaturate :: IdentSupply a -> a-pseudoSaturate x = evalState (runIdentSupply x) $ newIdentSupply (Just "<<unsatId>>")--instance Eq a => Eq (IdentSupply a) where- (==) = (==) `on` pseudoSaturate-instance Ord a => Ord (IdentSupply a) where- compare = compare `on` pseudoSaturate-instance Show a => Show (IdentSupply a) where- show x = "(" ++ show (pseudoSaturate x) ++ ")"-- -------------------------------------------------------------------------------- -- Statements --------------------------------------------------------------------------------@@ -142,26 +112,27 @@ -- Reference](https://tc39.es/ecma262/#sec-ecmascript-language-statements-and-declarations) -- for details data JStat- = DeclStat !Ident !(Maybe JExpr) -- ^ Variable declarations: var foo [= e]- | ReturnStat JExpr -- ^ Return- | IfStat JExpr JStat JStat -- ^ If- | WhileStat Bool JExpr JStat -- ^ While, bool is "do" when True- | ForInStat Bool Ident JExpr JStat -- ^ For-in, bool is "each' when True+ = DeclStat !Ident !(Maybe JExpr) -- ^ Variable declarations: var foo [= e]+ | ReturnStat JExpr -- ^ Return+ | IfStat JExpr JStat JStat -- ^ If+ | WhileStat Bool JExpr JStat -- ^ While, bool is "do" when True+ | ForStat JStat JExpr JStat JStat -- ^ For+ | ForInStat Bool Ident JExpr JStat -- ^ For-in, bool is "each' when True | SwitchStat JExpr [(JExpr, JStat)] JStat -- ^ Switch- | TryStat JStat Ident JStat JStat -- ^ Try- | BlockStat [JStat] -- ^ Blocks- | ApplStat JExpr [JExpr] -- ^ Application- | UOpStat JUOp JExpr -- ^ Unary operators- | AssignStat JExpr JExpr -- ^ Binding form: @foo = bar@- | UnsatBlock (IdentSupply JStat) -- ^ /Unsaturated/ blocks see 'pseudoSaturate'- | LabelStat JsLabel JStat -- ^ Statement Labels, makes me nostalgic for qbasic- | BreakStat (Maybe JsLabel) -- ^ Break- | ContinueStat (Maybe JsLabel) -- ^ Continue+ | TryStat JStat Ident JStat JStat -- ^ Try+ | BlockStat [JStat] -- ^ Blocks+ | ApplStat JExpr [JExpr] -- ^ Application+ | UOpStat UOp JExpr -- ^ Unary operators+ | AssignStat JExpr AOp JExpr -- ^ Binding form: @<foo> <op> <bar>@+ | LabelStat JLabel JStat -- ^ Statement Labels, makes me nostalgic for qbasic+ | BreakStat (Maybe JLabel) -- ^ Break+ | ContinueStat (Maybe JLabel) -- ^ Continue+ | FuncStat !Ident [Ident] JStat -- ^ an explicit function definition deriving (Eq, Typeable, Generic) -- | A Label used for 'JStat', specifically 'BreakStat', 'ContinueStat' and of -- course 'LabelStat'-type JsLabel = LexicalFastString+type JLabel = LexicalFastString instance Semigroup JStat where (<>) = appendJStat@@ -178,9 +149,9 @@ appendJStat mx my = case (mx,my) of (BlockStat [] , y ) -> y (x , BlockStat []) -> x- (BlockStat xs , BlockStat ys) -> BlockStat $ xs ++ ys- (BlockStat xs , ys ) -> BlockStat $ xs ++ [ys]- (xs , BlockStat ys) -> BlockStat $ xs : ys+ (BlockStat xs , BlockStat ys) -> BlockStat $! xs ++ ys+ (BlockStat xs , ys ) -> BlockStat $! xs ++ [ys]+ (xs , BlockStat ys) -> BlockStat $! xs : ys (xs , ys ) -> BlockStat [xs,ys] @@ -189,16 +160,13 @@ -------------------------------------------------------------------------------- -- | JavaScript Expressions data JExpr- = ValExpr JVal -- ^ All values are trivially expressions- | SelExpr JExpr Ident -- ^ Selection: Obj.foo, see 'GHC.JS.Make..^'- | IdxExpr JExpr JExpr -- ^ Indexing: Obj[foo], see 'GHC.JS.Make..!'- | InfixExpr JOp JExpr JExpr -- ^ Infix Expressions, see 'JExpr'- -- pattern synonyms- | UOpExpr JUOp JExpr -- ^ Unary Expressions- | IfExpr JExpr JExpr JExpr -- ^ If-expression- | ApplExpr JExpr [JExpr] -- ^ Application- | UnsatExpr (IdentSupply JExpr) -- ^ An /Unsaturated/ expression.- -- See 'pseudoSaturate'+ = ValExpr JVal -- ^ All values are trivially expressions+ | SelExpr JExpr Ident -- ^ Selection: Obj.foo, see 'GHC.JS.Make..^'+ | IdxExpr JExpr JExpr -- ^ Indexing: Obj[foo], see 'GHC.JS.Make..!'+ | InfixExpr Op JExpr JExpr -- ^ Infix Expressions, see 'JExpr' pattern synonyms+ | UOpExpr UOp JExpr -- ^ Unary Expressions+ | IfExpr JExpr JExpr JExpr -- ^ If-expression+ | ApplExpr JExpr [JExpr] -- ^ Application deriving (Eq, Typeable, Generic) -- * Useful pattern synonyms to ease programming with the deeply embedded JS@@ -207,110 +175,110 @@ -- and Integer literals. -- | pattern synonym for a unary operator new-pattern New :: JExpr -> JExpr-pattern New x = UOpExpr NewOp x+pattern JNew :: JExpr -> JExpr+pattern JNew x = UOpExpr NewOp x -- | pattern synonym for prefix increment @++x@-pattern PreInc :: JExpr -> JExpr-pattern PreInc x = UOpExpr PreIncOp x+pattern JPreInc :: JExpr -> JExpr+pattern JPreInc x = UOpExpr PreIncOp x -- | pattern synonym for postfix increment @x++@-pattern PostInc :: JExpr -> JExpr-pattern PostInc x = UOpExpr PostIncOp x+pattern JPostInc :: JExpr -> JExpr+pattern JPostInc x = UOpExpr PostIncOp x -- | pattern synonym for prefix decrement @--x@-pattern PreDec :: JExpr -> JExpr-pattern PreDec x = UOpExpr PreDecOp x+pattern JPreDec :: JExpr -> JExpr+pattern JPreDec x = UOpExpr PreDecOp x -- | pattern synonym for postfix decrement @--x@-pattern PostDec :: JExpr -> JExpr-pattern PostDec x = UOpExpr PostDecOp x+pattern JPostDec :: JExpr -> JExpr+pattern JPostDec x = UOpExpr PostDecOp x -- | pattern synonym for logical not @!@-pattern Not :: JExpr -> JExpr-pattern Not x = UOpExpr NotOp x+pattern JNot :: JExpr -> JExpr+pattern JNot x = UOpExpr NotOp x -- | pattern synonym for unary negation @-@-pattern Negate :: JExpr -> JExpr-pattern Negate x = UOpExpr NegOp x+pattern JNegate :: JExpr -> JExpr+pattern JNegate x = UOpExpr NegOp x -- | pattern synonym for addition @+@-pattern Add :: JExpr -> JExpr -> JExpr-pattern Add x y = InfixExpr AddOp x y+pattern JAdd :: JExpr -> JExpr -> JExpr+pattern JAdd x y = InfixExpr AddOp x y -- | pattern synonym for subtraction @-@-pattern Sub :: JExpr -> JExpr -> JExpr-pattern Sub x y = InfixExpr SubOp x y+pattern JSub :: JExpr -> JExpr -> JExpr+pattern JSub x y = InfixExpr SubOp x y -- | pattern synonym for multiplication @*@-pattern Mul :: JExpr -> JExpr -> JExpr-pattern Mul x y = InfixExpr MulOp x y+pattern JMul :: JExpr -> JExpr -> JExpr+pattern JMul x y = InfixExpr MulOp x y -- | pattern synonym for division @*@-pattern Div :: JExpr -> JExpr -> JExpr-pattern Div x y = InfixExpr DivOp x y+pattern JDiv :: JExpr -> JExpr -> JExpr+pattern JDiv x y = InfixExpr DivOp x y -- | pattern synonym for remainder @%@-pattern Mod :: JExpr -> JExpr -> JExpr-pattern Mod x y = InfixExpr ModOp x y+pattern JMod :: JExpr -> JExpr -> JExpr+pattern JMod x y = InfixExpr ModOp x y -- | pattern synonym for Bitwise Or @|@-pattern BOr :: JExpr -> JExpr -> JExpr-pattern BOr x y = InfixExpr BOrOp x y+pattern JBOr :: JExpr -> JExpr -> JExpr+pattern JBOr x y = InfixExpr BOrOp x y -- | pattern synonym for Bitwise And @&@-pattern BAnd :: JExpr -> JExpr -> JExpr-pattern BAnd x y = InfixExpr BAndOp x y+pattern JBAnd :: JExpr -> JExpr -> JExpr+pattern JBAnd x y = InfixExpr BAndOp x y -- | pattern synonym for Bitwise XOr @^@-pattern BXor :: JExpr -> JExpr -> JExpr-pattern BXor x y = InfixExpr BXorOp x y+pattern JBXor :: JExpr -> JExpr -> JExpr+pattern JBXor x y = InfixExpr BXorOp x y -- | pattern synonym for Bitwise Not @~@-pattern BNot :: JExpr -> JExpr-pattern BNot x = UOpExpr BNotOp x+pattern JBNot :: JExpr -> JExpr+pattern JBNot x = UOpExpr BNotOp x -- | pattern synonym for logical Or @||@-pattern LOr :: JExpr -> JExpr -> JExpr-pattern LOr x y = InfixExpr LOrOp x y+pattern JLOr :: JExpr -> JExpr -> JExpr+pattern JLOr x y = InfixExpr LOrOp x y -- | pattern synonym for logical And @&&@-pattern LAnd :: JExpr -> JExpr -> JExpr-pattern LAnd x y = InfixExpr LAndOp x y-+pattern JLAnd :: JExpr -> JExpr -> JExpr+pattern JLAnd x y = InfixExpr LAndOp x y -- | pattern synonym to create integer values-pattern Int :: Integer -> JExpr-pattern Int x = ValExpr (JInt x)+pattern SatInt :: Integer -> JExpr+pattern SatInt x = ValExpr (JInt x) -- | pattern synonym to create string values-pattern String :: FastString -> JExpr-pattern String x = ValExpr (JStr x)+pattern JString :: FastString -> JExpr+pattern JString x = ValExpr (JStr x) -------------------------------------------------------------------------------- -- Values --------------------------------------------------------------------------------+ -- | JavaScript values data JVal- = JVar Ident -- ^ A variable reference- | JList [JExpr] -- ^ A JavaScript list, or what JS- -- calls an Array- | JDouble SaneDouble -- ^ A Double- | JInt Integer -- ^ A BigInt- | JStr FastString -- ^ A String- | JRegEx FastString -- ^ A Regex+ = JVar Ident -- ^ A variable reference+ | JList [JExpr] -- ^ A JavaScript list, or what JS calls an Array+ | JDouble SaneDouble -- ^ A Double+ | JInt Integer -- ^ A BigInt+ | JStr FastString -- ^ A String+ | JRegEx FastString -- ^ A Regex | JHash (UniqMap FastString JExpr) -- ^ A JS HashMap: @{"foo": 0}@- | JFunc [Ident] JStat -- ^ A function- | UnsatVal (IdentSupply JVal) -- ^ An /Unsaturated/ value, see 'pseudoSaturate'+ | JFunc [Ident] JStat -- ^ A function deriving (Eq, Typeable, Generic) + -------------------------------------------------------------------------------- -- Operators --------------------------------------------------------------------------------+ -- | JS Binary Operators. We do not deeply embed the comma operator and the -- assignment operators-data JOp+data Op = EqOp -- ^ Equality: `==` | StrictEqOp -- ^ Strict Equality: `===` | NeqOp -- ^ InEquality: `!=`@@ -336,10 +304,10 @@ | InOp -- ^ @in@ deriving (Show, Eq, Ord, Enum, Data, Typeable, Generic) -instance NFData JOp+instance NFData Op -- | JS Unary Operators-data JUOp+data UOp = NotOp -- ^ Logical Not: @!@ | BNotOp -- ^ Bitwise Not: @~@ | NegOp -- ^ Negation: @-@@@ -355,38 +323,29 @@ | PostDecOp -- ^ Postfix Decrement: @x--@ deriving (Show, Eq, Ord, Enum, Data, Typeable, Generic) -instance NFData JUOp---- | A newtype wrapper around 'Double' to ensure we never generate a 'Double'--- that becomes a 'NaN', see 'Eq SaneDouble', 'Ord SaneDouble' for details on--- Sane-ness-newtype SaneDouble = SaneDouble- { unSaneDouble :: Double- }- deriving (Data, Typeable, Fractional, Num, Generic, NFData)--instance Eq SaneDouble where- (SaneDouble x) == (SaneDouble y) = x == y || (isNaN x && isNaN y)--instance Ord SaneDouble where- compare (SaneDouble x) (SaneDouble y) = compare (fromNaN x) (fromNaN y)- where fromNaN z | isNaN z = Nothing- | otherwise = Just z+instance NFData UOp -instance Show SaneDouble where- show (SaneDouble x) = show x+-- | JS Unary Operators+data AOp+ = AssignOp -- ^ Vanilla Assignment: =+ | AddAssignOp -- ^ Addition Assignment: +=+ | SubAssignOp -- ^ Subtraction Assignment: -=+ deriving (Show, Eq, Ord, Enum, Data, Typeable, Generic) +instance NFData AOp ----------------------------------------------------------------------------------- Identifiers+-- Helper Functions ----------------------------------------------------------------------------------- We use FastString for identifiers in JS backend --- | A newtype wrapper around 'FastString' for JS identifiers.-newtype Ident = TxtI { itxt :: FastString }- deriving stock (Show, Eq)- deriving newtype (Uniquable)+jassignAllEqual :: [JExpr] -> [JExpr] -> JStat+jassignAllEqual xs ys = mconcat (zipWithEqual "assignAllEqual" go xs ys)+ where go l r = AssignStat l AssignOp r -identFS :: Ident -> FastString-identFS = \case- TxtI fs -> fs+jassignAll :: [JExpr] -> [JExpr] -> JStat+jassignAll xs ys = mconcat $ zipWith go xs ys+ where go l r = AssignStat l AssignOp r++jvar :: FastString -> JExpr+jvar = ValExpr . JVar . TxtI+
GHC/JS/Transform.hs view
@@ -6,16 +6,15 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE BlockArguments #-}+{-# LANGUAGE TupleSections #-} module GHC.JS.Transform- ( mapIdent- , mapStatIdent- , mapExprIdent- , identsS+ ( identsS , identsV , identsE -- * Saturation- , jsSaturate+ , satJStat+ , satJExpr -- * Generic traversal (via compos) , JMacro(..) , JMGadt(..)@@ -29,108 +28,62 @@ import GHC.Prelude -import GHC.JS.Syntax+import qualified GHC.JS.Syntax as Sat+import GHC.JS.Unsat.Syntax import Data.Functor.Identity import Control.Monad-import Data.Bifunctor+import Data.List (sortBy) import GHC.Data.FastString import GHC.Utils.Monad.State.Strict import GHC.Types.Unique.Map+import GHC.Types.Unique.FM -mapExprIdent :: (Ident -> JExpr) -> JExpr -> JExpr-mapExprIdent f = fst (mapIdent f) -mapStatIdent :: (Ident -> JExpr) -> JStat -> JStat-mapStatIdent f = snd (mapIdent f)---- | Map on every variable ident-mapIdent :: (Ident -> JExpr) -> (JExpr -> JExpr, JStat -> JStat)-mapIdent f = (map_expr, map_stat)- where- map_expr = \case- ValExpr v -> map_val v- SelExpr e i -> SelExpr (map_expr e) i- IdxExpr e1 e2 -> IdxExpr (map_expr e1) (map_expr e2)- InfixExpr o e1 e2 -> InfixExpr o (map_expr e1) (map_expr e2)- UOpExpr o e -> UOpExpr o (map_expr e)- IfExpr e1 e2 e3 -> IfExpr (map_expr e1) (map_expr e2) (map_expr e3)- ApplExpr e es -> ApplExpr (map_expr e) (fmap map_expr es)- UnsatExpr me -> UnsatExpr (fmap map_expr me)-- map_val v = case v of- JVar i -> f i- JList es -> ValExpr $ JList (fmap map_expr es)- JDouble{} -> ValExpr $ v- JInt{} -> ValExpr $ v- JStr{} -> ValExpr $ v- JRegEx{} -> ValExpr $ v- JHash me -> ValExpr $ JHash (fmap map_expr me)- JFunc is s -> ValExpr $ JFunc is (map_stat s)- UnsatVal v2 -> ValExpr $ UnsatVal v2-- map_stat s = case s of- DeclStat i e -> DeclStat i (fmap map_expr e)- ReturnStat e -> ReturnStat (map_expr e)- IfStat e s1 s2 -> IfStat (map_expr e) (map_stat s1) (map_stat s2)- WhileStat b e s2 -> WhileStat b (map_expr e) (map_stat s2)- ForInStat b i e s2 -> ForInStat b i (map_expr e) (map_stat s2)- SwitchStat e les s2 -> SwitchStat (map_expr e) (fmap (bimap map_expr map_stat) les) (map_stat s2)- TryStat s2 i s3 s4 -> TryStat (map_stat s2) i (map_stat s3) (map_stat s4)- BlockStat ls -> BlockStat (fmap map_stat ls)- ApplStat e es -> ApplStat (map_expr e) (fmap map_expr es)- UOpStat o e -> UOpStat o (map_expr e)- AssignStat e1 e2 -> AssignStat (map_expr e1) (map_expr e2)- UnsatBlock ms -> UnsatBlock (fmap map_stat ms)- LabelStat l s2 -> LabelStat l (map_stat s2)- BreakStat{} -> s- ContinueStat{} -> s- {-# INLINE identsS #-}-identsS :: JStat -> [Ident]+identsS :: Sat.JStat -> [Ident] identsS = \case- DeclStat i e -> [i] ++ maybe [] identsE e- ReturnStat e -> identsE e- IfStat e s1 s2 -> identsE e ++ identsS s1 ++ identsS s2- WhileStat _ e s -> identsE e ++ identsS s- ForInStat _ i e s -> [i] ++ identsE e ++ identsS s- SwitchStat e xs s -> identsE e ++ concatMap traverseCase xs ++ identsS s- where traverseCase (e,s) = identsE e ++ identsS s- TryStat s1 i s2 s3 -> identsS s1 ++ [i] ++ identsS s2 ++ identsS s3- BlockStat xs -> concatMap identsS xs- ApplStat e es -> identsE e ++ concatMap identsE es- UOpStat _op e -> identsE e- AssignStat e1 e2 -> identsE e1 ++ identsE e2- UnsatBlock{} -> error "identsS: UnsatBlock"- LabelStat _l s -> identsS s- BreakStat{} -> []- ContinueStat{} -> []+ Sat.DeclStat i e -> [i] ++ maybe [] identsE e+ Sat.ReturnStat e -> identsE e+ Sat.IfStat e s1 s2 -> identsE e ++ identsS s1 ++ identsS s2+ Sat.WhileStat _ e s -> identsE e ++ identsS s+ Sat.ForStat init p step body -> identsS init ++ identsE p ++ identsS step ++ identsS body+ Sat.ForInStat _ i e s -> [i] ++ identsE e ++ identsS s+ Sat.SwitchStat e xs s -> identsE e ++ concatMap traverseCase xs ++ identsS s+ where traverseCase (e,s) = identsE e ++ identsS s+ Sat.TryStat s1 i s2 s3 -> identsS s1 ++ [i] ++ identsS s2 ++ identsS s3+ Sat.BlockStat xs -> concatMap identsS xs+ Sat.ApplStat e es -> identsE e ++ concatMap identsE es+ Sat.UOpStat _op e -> identsE e+ Sat.AssignStat e1 _op e2 -> identsE e1 ++ identsE e2+ Sat.LabelStat _l s -> identsS s+ Sat.BreakStat{} -> []+ Sat.ContinueStat{} -> []+ Sat.FuncStat i args body -> [i] ++ args ++ identsS body {-# INLINE identsE #-}-identsE :: JExpr -> [Ident]+identsE :: Sat.JExpr -> [Ident] identsE = \case- ValExpr v -> identsV v- SelExpr e _i -> identsE e -- do not rename properties- IdxExpr e1 e2 -> identsE e1 ++ identsE e2- InfixExpr _ e1 e2 -> identsE e1 ++ identsE e2- UOpExpr _ e -> identsE e- IfExpr e1 e2 e3 -> identsE e1 ++ identsE e2 ++ identsE e3- ApplExpr e es -> identsE e ++ concatMap identsE es- UnsatExpr{} -> error "identsE: UnsatExpr"+ Sat.ValExpr v -> identsV v+ Sat.SelExpr e _i -> identsE e -- do not rename properties+ Sat.IdxExpr e1 e2 -> identsE e1 ++ identsE e2+ Sat.InfixExpr _ e1 e2 -> identsE e1 ++ identsE e2+ Sat.UOpExpr _ e -> identsE e+ Sat.IfExpr e1 e2 e3 -> identsE e1 ++ identsE e2 ++ identsE e3+ Sat.ApplExpr e es -> identsE e ++ concatMap identsE es {-# INLINE identsV #-}-identsV :: JVal -> [Ident]+identsV :: Sat.JVal -> [Ident] identsV = \case- JVar i -> [i]- JList xs -> concatMap identsE xs- JDouble{} -> []- JInt{} -> []- JStr{} -> []- JRegEx{} -> []- JHash m -> concatMap (identsE . snd) (nonDetEltsUniqMap m)- JFunc args s -> args ++ identsS s- UnsatVal{} -> error "identsV: UnsatVal"+ Sat.JVar i -> [i]+ Sat.JList xs -> concatMap identsE xs+ Sat.JDouble{} -> []+ Sat.JInt{} -> []+ Sat.JStr{} -> []+ Sat.JRegEx{} -> []+ Sat.JHash m -> concatMap identsE (nonDetEltsUniqMap m)+ Sat.JFunc args s -> args ++ identsS s {--------------------------------------------------------------------@@ -198,6 +151,8 @@ ReturnStat i -> ret ReturnStat `app` f i IfStat e s s' -> ret IfStat `app` f e `app` f s `app` f s' WhileStat b e s -> ret (WhileStat b) `app` f e `app` f s+ ForStat init p step body -> ret ForStat `app` f init `app` f p+ `app` f step `app` f body ForInStat b i e s -> ret (ForInStat b) `app` f i `app` f e `app` f s SwitchStat e l d -> ret SwitchStat `app` f e `app` l' `app` f d where l' = mapM' (\(c,s) -> ret (,) `app` f c `app` f s) l@@ -208,6 +163,7 @@ AssignStat e e' -> ret AssignStat `app` f e `app` f e' UnsatBlock _ -> ret v' ContinueStat l -> ret (ContinueStat l)+ FuncStat i args body -> ret FuncStat `app` f i `app` mapM' f args `app` f body BreakStat l -> ret (BreakStat l) LabelStat l s -> ret (LabelStat l) `app` f s JMGExpr v' -> ret JMGExpr `app` case v' of@@ -229,7 +185,7 @@ JHash m -> ret JHash `app` m' -- nonDetEltsUniqMap doesn't introduce nondeterminism here because the -- elements are treated independently before being re-added to a UniqMap- where (ls, vs) = unzip (nonDetEltsUniqMap m)+ where (ls, vs) = unzip (nonDetUniqMapToList m) m' = ret (listToUniqMap . zip ls) `app` mapM' f vs JFunc xs s -> ret JFunc `app` mapM' f xs `app` f s UnsatVal _ -> ret v'@@ -250,15 +206,104 @@ -- | Given an optional prefix, fills in all free variable names with a supply -- of names generated by the prefix.-jsSaturate :: (JMacro a) => Maybe FastString -> a -> a-jsSaturate str x = evalState (runIdentSupply $ jsSaturate_ x) (newIdentSupply str)+satJStat :: Maybe FastString -> JStat -> Sat.JStat+satJStat str x = evalState (jsSaturateS x) (newIdentSupply str) -jsSaturate_ :: (JMacro a) => a -> IdentSupply a-jsSaturate_ e = IS $ jfromGADT <$> go (jtoGADT e)+satJExpr :: Maybe FastString -> JExpr -> Sat.JExpr+satJExpr str x = evalState (jsSaturateE x) (newIdentSupply str)++jsSaturateS :: JStat -> State [Ident] Sat.JStat+jsSaturateS = \case+ DeclStat i rhs -> Sat.DeclStat i <$> mapM jsSaturateE rhs+ ReturnStat e -> Sat.ReturnStat <$> jsSaturateE e+ IfStat c t e -> Sat.IfStat <$> jsSaturateE c <*> jsSaturateS t <*> jsSaturateS e+ WhileStat is_do c e -> Sat.WhileStat is_do <$> jsSaturateE c <*> jsSaturateS e+ ForStat init p step body -> Sat.ForStat <$> jsSaturateS init <*> jsSaturateE p+ <*> jsSaturateS step <*> jsSaturateS body+ ForInStat is_each i iter body -> Sat.ForInStat is_each i <$> jsSaturateE iter <*> jsSaturateS body+ SwitchStat struct ps def -> Sat.SwitchStat <$> jsSaturateE struct+ <*> mapM (\(p1, p2) -> (,) <$> jsSaturateE p1 <*> jsSaturateS p2) ps+ <*> jsSaturateS def+ TryStat t i c f -> Sat.TryStat <$> jsSaturateS t <*> pure i <*> jsSaturateS c <*> jsSaturateS f+ BlockStat bs -> fmap Sat.BlockStat $! mapM jsSaturateS bs+ ApplStat rator rand -> Sat.ApplStat <$> jsSaturateE rator <*> mapM jsSaturateE rand+ UOpStat rator rand -> Sat.UOpStat (satJUOp rator) <$> jsSaturateE rand+ AssignStat lhs rhs -> Sat.AssignStat <$> jsSaturateE lhs <*> pure Sat.AssignOp <*> jsSaturateE rhs+ LabelStat lbl stmt -> Sat.LabelStat lbl <$> jsSaturateS stmt+ BreakStat m_l -> return $ Sat.BreakStat $! m_l+ ContinueStat m_l -> return $ Sat.ContinueStat $! m_l+ FuncStat i args body -> Sat.FuncStat i args <$> jsSaturateS body+ UnsatBlock us -> jsSaturateS =<< runIdentSupply us++jsSaturateE :: JExpr -> State [Ident] Sat.JExpr+jsSaturateE = \case+ ValExpr v -> Sat.ValExpr <$> jsSaturateV v+ SelExpr obj i -> Sat.SelExpr <$> jsSaturateE obj <*> pure i+ IdxExpr o i -> Sat.IdxExpr <$> jsSaturateE o <*> jsSaturateE i+ InfixExpr op l r -> Sat.InfixExpr (satJOp op) <$> jsSaturateE l <*> jsSaturateE r+ UOpExpr op r -> Sat.UOpExpr (satJUOp op) <$> jsSaturateE r+ IfExpr c t e -> Sat.IfExpr <$> jsSaturateE c <*> jsSaturateE t <*> jsSaturateE e+ ApplExpr rator rands -> Sat.ApplExpr <$> jsSaturateE rator <*> mapM jsSaturateE rands+ UnsatExpr us -> jsSaturateE =<< runIdentSupply us++jsSaturateV :: JVal -> State [Ident] Sat.JVal+jsSaturateV = \case+ JVar i -> return $ Sat.JVar i+ JList xs -> Sat.JList <$> mapM jsSaturateE xs+ JDouble d -> return $ Sat.JDouble (Sat.SaneDouble (unSaneDouble d))+ JInt i -> return $ Sat.JInt i+ JStr s -> return $ Sat.JStr s+ JRegEx f -> return $ Sat.JRegEx f+ JHash m -> Sat.JHash <$> mapUniqMapM satHash m where- go :: forall a. JMGadt a -> State [Ident] (JMGadt a)- go v = case v of- JMGStat (UnsatBlock us) -> go =<< (JMGStat <$> runIdentSupply us)- JMGExpr (UnsatExpr us) -> go =<< (JMGExpr <$> runIdentSupply us)- JMGVal (UnsatVal us) -> go =<< (JMGVal <$> runIdentSupply us)- _ -> composOpM go v+ satHash (i, x) = (i,) . (i,) <$> jsSaturateE x+ compareHash (i,_) (j,_) = lexicalCompareFS i j+ -- By lexically sorting the elements, the non-determinism introduced by nonDetEltsUFM is avoided+ mapUniqMapM f (UniqMap m) = UniqMap . listToUFM <$> (mapM f . sortBy compareHash $ nonDetEltsUFM m)+ JFunc args body -> Sat.JFunc args <$> jsSaturateS body+ UnsatVal us -> jsSaturateV =<< runIdentSupply us++satJOp :: JOp -> Sat.Op+satJOp = go+ where+ go EqOp = Sat.EqOp+ go StrictEqOp = Sat.StrictEqOp+ go NeqOp = Sat.NeqOp+ go StrictNeqOp = Sat.StrictNeqOp+ go GtOp = Sat.GtOp+ go GeOp = Sat.GeOp+ go LtOp = Sat.LtOp+ go LeOp = Sat.LeOp+ go AddOp = Sat.AddOp+ go SubOp = Sat.SubOp+ go MulOp = Sat.MulOp+ go DivOp = Sat.DivOp+ go ModOp = Sat.ModOp+ go LeftShiftOp = Sat.LeftShiftOp+ go RightShiftOp = Sat.RightShiftOp+ go ZRightShiftOp = Sat.ZRightShiftOp+ go BAndOp = Sat.BAndOp+ go BOrOp = Sat.BOrOp+ go BXorOp = Sat.BXorOp+ go LAndOp = Sat.LAndOp+ go LOrOp = Sat.LOrOp+ go InstanceofOp = Sat.InstanceofOp+ go InOp = Sat.InOp++satJUOp :: JUOp -> Sat.UOp+satJUOp = go+ where+ go NotOp = Sat.NotOp+ go BNotOp = Sat.BNotOp+ go NegOp = Sat.NegOp+ go PlusOp = Sat.PlusOp+ go NewOp = Sat.NewOp+ go TypeofOp = Sat.TypeofOp+ go DeleteOp = Sat.DeleteOp+ go YieldOp = Sat.YieldOp+ go VoidOp = Sat.VoidOp+ go PreIncOp = Sat.PreIncOp+ go PostIncOp = Sat.PostIncOp+ go PreDecOp = Sat.PreDecOp+ go PostDecOp = Sat.PostDecOp+
+ GHC/JS/Unsat/Syntax.hs view
@@ -0,0 +1,375 @@+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE GADTs #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingVia #-}+{-# LANGUAGE BlockArguments #-}+{-# LANGUAGE PatternSynonyms #-}++-----------------------------------------------------------------------------+-- |+-- Module : GHC.JS.Unsat.Syntax+-- Copyright : (c) The University of Glasgow 2001+-- License : BSD-style (see the file LICENSE)+--+-- Maintainer : Jeffrey Young <jeffrey.young@iohk.io>+-- Luite Stegeman <luite.stegeman@iohk.io>+-- Sylvain Henry <sylvain.henry@iohk.io>+-- Josh Meredith <josh.meredith@iohk.io>+-- Stability : experimental+--+--+-- * Domain and Purpose+--+-- GHC.JS.Unsat.Syntax defines the Syntax for the JS backend in GHC. It+-- comports with the [ECMA-262](https://tc39.es/ecma262/) although not every+-- production rule of the standard is represented. Code in this module is a+-- fork of [JMacro](https://hackage.haskell.org/package/jmacro) (BSD 3+-- Clause) by Gershom Bazerman, heavily modified to accomodate GHC's+-- constraints.+--+--+-- * Strategy+--+-- Nothing fancy in this module, this is a classic deeply embeded AST for+-- JS. We define numerous ADTs and pattern synonyms to make pattern matching+-- and constructing ASTs easier.+--+--+-- * Consumers+--+-- The entire JS backend consumes this module, e.g., the modules in+-- GHC.StgToJS.\*. Please see 'GHC.JS.Make' for a module which provides+-- helper functions that use the deeply embedded DSL defined in this module+-- to provide some of the benefits of a shallow embedding.+-----------------------------------------------------------------------------+module GHC.JS.Unsat.Syntax+ ( -- * Deeply embedded JS datatypes+ JStat(..)+ , JExpr(..)+ , JVal(..)+ , JOp(..)+ , JUOp(..)+ , Ident(..)+ , identFS+ , JsLabel+ -- * pattern synonyms over JS operators+ , pattern New+ , pattern Not+ , pattern Negate+ , pattern Add+ , pattern Sub+ , pattern Mul+ , pattern Div+ , pattern Mod+ , pattern BOr+ , pattern BAnd+ , pattern BXor+ , pattern BNot+ , pattern LOr+ , pattern LAnd+ , pattern Int+ , pattern String+ , pattern PreInc+ , pattern PostInc+ , pattern PreDec+ , pattern PostDec+ -- * Ident supply+ , IdentSupply(..)+ , newIdentSupply+ , pseudoSaturate+ -- * Utility+ , SaneDouble(..)+ ) where++import GHC.Prelude++import Control.DeepSeq++import Data.Function+import Data.Data+import Data.Word+import qualified Data.Semigroup as Semigroup++import GHC.Generics++import GHC.Data.FastString+import GHC.Utils.Monad.State.Strict+import GHC.Types.Unique+import GHC.Types.Unique.Map+import GHC.Types.SaneDouble++-- | A supply of identifiers, possibly empty+newtype IdentSupply a+ = IS {runIdentSupply :: State [Ident] a}+ deriving Typeable++instance NFData (IdentSupply a) where rnf IS{} = ()++inIdentSupply :: (State [Ident] a -> State [Ident] b) -> IdentSupply a -> IdentSupply b+inIdentSupply f x = IS $ f (runIdentSupply x)++instance Functor IdentSupply where+ fmap f x = inIdentSupply (fmap f) x++newIdentSupply :: Maybe FastString -> [Ident]+newIdentSupply Nothing = newIdentSupply (Just "jmId")+newIdentSupply (Just pfx) = [ TxtI (mconcat [pfx,"_",mkFastString (show x)])+ | x <- [(0::Word64)..]+ ]++-- | Given a Pseudo-saturate a value with garbage @<<unsatId>>@ identifiers.+pseudoSaturate :: IdentSupply a -> a+pseudoSaturate x = evalState (runIdentSupply x) $ newIdentSupply (Just "<<unsatId>>")++instance Eq a => Eq (IdentSupply a) where+ (==) = (==) `on` pseudoSaturate+instance Ord a => Ord (IdentSupply a) where+ compare = compare `on` pseudoSaturate+instance Show a => Show (IdentSupply a) where+ show x = "(" ++ show (pseudoSaturate x) ++ ")"+++--------------------------------------------------------------------------------+-- Statements+--------------------------------------------------------------------------------+-- | JavaScript statements, see the [ECMA262+-- Reference](https://tc39.es/ecma262/#sec-ecmascript-language-statements-and-declarations)+-- for details+data JStat+ = DeclStat !Ident !(Maybe JExpr) -- ^ Variable declarations: var foo [= e]+ | ReturnStat JExpr -- ^ Return+ | IfStat JExpr JStat JStat -- ^ If+ | WhileStat Bool JExpr JStat -- ^ While, bool is "do" when True+ | ForStat JStat JExpr JStat JStat -- ^ For+ | ForInStat Bool Ident JExpr JStat -- ^ For-in, bool is "each' when True+ | SwitchStat JExpr [(JExpr, JStat)] JStat -- ^ Switch+ | TryStat JStat Ident JStat JStat -- ^ Try+ | BlockStat [JStat] -- ^ Blocks+ | ApplStat JExpr [JExpr] -- ^ Application+ | UOpStat JUOp JExpr -- ^ Unary operators+ | AssignStat JExpr JExpr -- ^ Binding form: @foo = bar@+ | UnsatBlock (IdentSupply JStat) -- ^ /Unsaturated/ blocks see 'pseudoSaturate'+ | LabelStat JsLabel JStat -- ^ Statement Labels, makes me nostalgic for qbasic+ | BreakStat (Maybe JsLabel) -- ^ Break+ | ContinueStat (Maybe JsLabel) -- ^ Continue+ | FuncStat !Ident [Ident] JStat -- ^ an explicit function definition+ deriving (Eq, Typeable, Generic)++-- | A Label used for 'JStat', specifically 'BreakStat', 'ContinueStat' and of+-- course 'LabelStat'+type JsLabel = LexicalFastString++instance Semigroup JStat where+ (<>) = appendJStat++instance Monoid JStat where+ mempty = BlockStat []++-- | Append a statement to another statement. 'appendJStat' only returns a+-- 'JStat' that is /not/ a 'BlockStat' when either @mx@ or @my is an empty+-- 'BlockStat'. That is:+-- > (BlockStat [] , y ) = y+-- > (x , BlockStat []) = x+appendJStat :: JStat -> JStat -> JStat+appendJStat mx my = case (mx,my) of+ (BlockStat [] , y ) -> y+ (x , BlockStat []) -> x+ (BlockStat xs , BlockStat ys) -> BlockStat $ xs ++ ys+ (BlockStat xs , ys ) -> BlockStat $ xs ++ [ys]+ (xs , BlockStat ys) -> BlockStat $ xs : ys+ (xs , ys ) -> BlockStat [xs,ys]+++--------------------------------------------------------------------------------+-- Expressions+--------------------------------------------------------------------------------+-- | JavaScript Expressions+data JExpr+ = ValExpr JVal -- ^ All values are trivially expressions+ | SelExpr JExpr Ident -- ^ Selection: Obj.foo, see 'GHC.JS.Make..^'+ | IdxExpr JExpr JExpr -- ^ Indexing: Obj[foo], see 'GHC.JS.Make..!'+ | InfixExpr JOp JExpr JExpr -- ^ Infix Expressions, see 'JExpr'+ -- pattern synonyms+ | UOpExpr JUOp JExpr -- ^ Unary Expressions+ | IfExpr JExpr JExpr JExpr -- ^ If-expression+ | ApplExpr JExpr [JExpr] -- ^ Application+ | UnsatExpr (IdentSupply JExpr) -- ^ An /Saturated/ expression.+ -- See 'pseudoSaturate'+ deriving (Eq, Typeable, Generic)++-- * Useful pattern synonyms to ease programming with the deeply embedded JS+-- AST. Each pattern wraps @JUOp@ and @JOp@ into a @JExpr@s to save typing and+-- for convienience. In addition we include a string wrapper for JS string+-- and Integer literals.++-- | pattern synonym for a unary operator new+pattern New :: JExpr -> JExpr+pattern New x = UOpExpr NewOp x++-- | pattern synonym for prefix increment @++x@+pattern PreInc :: JExpr -> JExpr+pattern PreInc x = UOpExpr PreIncOp x++-- | pattern synonym for postfix increment @x++@+pattern PostInc :: JExpr -> JExpr+pattern PostInc x = UOpExpr PostIncOp x++-- | pattern synonym for prefix decrement @--x@+pattern PreDec :: JExpr -> JExpr+pattern PreDec x = UOpExpr PreDecOp x++-- | pattern synonym for postfix decrement @--x@+pattern PostDec :: JExpr -> JExpr+pattern PostDec x = UOpExpr PostDecOp x++-- | pattern synonym for logical not @!@+pattern Not :: JExpr -> JExpr+pattern Not x = UOpExpr NotOp x++-- | pattern synonym for unary negation @-@+pattern Negate :: JExpr -> JExpr+pattern Negate x = UOpExpr NegOp x++-- | pattern synonym for addition @+@+pattern Add :: JExpr -> JExpr -> JExpr+pattern Add x y = InfixExpr AddOp x y++-- | pattern synonym for subtraction @-@+pattern Sub :: JExpr -> JExpr -> JExpr+pattern Sub x y = InfixExpr SubOp x y++-- | pattern synonym for multiplication @*@+pattern Mul :: JExpr -> JExpr -> JExpr+pattern Mul x y = InfixExpr MulOp x y++-- | pattern synonym for division @*@+pattern Div :: JExpr -> JExpr -> JExpr+pattern Div x y = InfixExpr DivOp x y++-- | pattern synonym for remainder @%@+pattern Mod :: JExpr -> JExpr -> JExpr+pattern Mod x y = InfixExpr ModOp x y++-- | pattern synonym for Bitwise Or @|@+pattern BOr :: JExpr -> JExpr -> JExpr+pattern BOr x y = InfixExpr BOrOp x y++-- | pattern synonym for Bitwise And @&@+pattern BAnd :: JExpr -> JExpr -> JExpr+pattern BAnd x y = InfixExpr BAndOp x y++-- | pattern synonym for Bitwise XOr @^@+pattern BXor :: JExpr -> JExpr -> JExpr+pattern BXor x y = InfixExpr BXorOp x y++-- | pattern synonym for Bitwise Not @~@+pattern BNot :: JExpr -> JExpr+pattern BNot x = UOpExpr BNotOp x++-- | pattern synonym for logical Or @||@+pattern LOr :: JExpr -> JExpr -> JExpr+pattern LOr x y = InfixExpr LOrOp x y++-- | pattern synonym for logical And @&&@+pattern LAnd :: JExpr -> JExpr -> JExpr+pattern LAnd x y = InfixExpr LAndOp x y+++-- | pattern synonym to create integer values+pattern Int :: Integer -> JExpr+pattern Int x = ValExpr (JInt x)++-- | pattern synonym to create string values+pattern String :: FastString -> JExpr+pattern String x = ValExpr (JStr x)+++--------------------------------------------------------------------------------+-- Values+--------------------------------------------------------------------------------+-- | JavaScript values+data JVal+ = JVar Ident -- ^ A variable reference+ | JList [JExpr] -- ^ A JavaScript list, or what JS+ -- calls an Array+ | JDouble SaneDouble -- ^ A Double+ | JInt Integer -- ^ A BigInt+ | JStr FastString -- ^ A String+ | JRegEx FastString -- ^ A Regex+ | JHash (UniqMap FastString JExpr) -- ^ A JS HashMap: @{"foo": 0}@+ | JFunc [Ident] JStat -- ^ A function+ | UnsatVal (IdentSupply JVal) -- ^ An /Saturated/ value, see 'pseudoSaturate'+ deriving (Eq, Typeable, Generic)++--------------------------------------------------------------------------------+-- Operators+--------------------------------------------------------------------------------+-- | JS Binary Operators. We do not deeply embed the comma operator and the+-- assignment operators+data JOp+ = EqOp -- ^ Equality: `==`+ | StrictEqOp -- ^ Strict Equality: `===`+ | NeqOp -- ^ InEquality: `!=`+ | StrictNeqOp -- ^ Strict InEquality `!==`+ | GtOp -- ^ Greater Than: `>`+ | GeOp -- ^ Greater Than or Equal: `>=`+ | LtOp -- ^ Less Than: <+ | LeOp -- ^ Less Than or Equal: <=+ | AddOp -- ^ Addition: ++ | SubOp -- ^ Subtraction: -+ | MulOp -- ^ Multiplication \*+ | DivOp -- ^ Division: \/+ | ModOp -- ^ Remainder: %+ | LeftShiftOp -- ^ Left Shift: \<\<+ | RightShiftOp -- ^ Right Shift: \>\>+ | ZRightShiftOp -- ^ Unsigned RightShift: \>\>\>+ | BAndOp -- ^ Bitwise And: &+ | BOrOp -- ^ Bitwise Or: |+ | BXorOp -- ^ Bitwise XOr: ^+ | LAndOp -- ^ Logical And: &&+ | LOrOp -- ^ Logical Or: ||+ | InstanceofOp -- ^ @instanceof@+ | InOp -- ^ @in@+ deriving (Show, Eq, Ord, Enum, Data, Typeable, Generic)++instance NFData JOp++-- | JS Unary Operators+data JUOp+ = NotOp -- ^ Logical Not: @!@+ | BNotOp -- ^ Bitwise Not: @~@+ | NegOp -- ^ Negation: @-@+ | PlusOp -- ^ Unary Plus: @+x@+ | NewOp -- ^ new x+ | TypeofOp -- ^ typeof x+ | DeleteOp -- ^ delete x+ | YieldOp -- ^ yield x+ | VoidOp -- ^ void x+ | PreIncOp -- ^ Prefix Increment: @++x@+ | PostIncOp -- ^ Postfix Increment: @x++@+ | PreDecOp -- ^ Prefix Decrement: @--x@+ | PostDecOp -- ^ Postfix Decrement: @x--@+ deriving (Show, Eq, Ord, Enum, Data, Typeable, Generic)++instance NFData JUOp++--------------------------------------------------------------------------------+-- Identifiers+--------------------------------------------------------------------------------+-- We use FastString for identifiers in JS backend++-- | A newtype wrapper around 'FastString' for JS identifiers.+newtype Ident = TxtI { itxt :: FastString }+ deriving stock (Show, Eq)+ deriving newtype (Uniquable)++identFS :: Ident -> FastString+identFS = \case+ TxtI fs -> fs
+ GHC/Linker/Deps.hs view
@@ -0,0 +1,411 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE TupleSections, RecordWildCards #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE RankNTypes #-}++module GHC.Linker.Deps+ ( LinkDepsOpts (..)+ , LinkDeps (..)+ , getLinkDeps+ )+where++import GHC.Prelude++import GHC.Platform.Ways++import GHC.Runtime.Interpreter++import GHC.Linker.Types++import GHC.Types.SourceFile+import GHC.Types.SrcLoc+import GHC.Types.Unique.DSet+import GHC.Types.Unique.DFM++import GHC.Utils.Outputable+import GHC.Utils.Panic+import GHC.Utils.Panic.Plain+import GHC.Utils.Error++import GHC.Unit.Env+import GHC.Unit.Finder+import GHC.Unit.Module+import GHC.Unit.Module.ModIface+import GHC.Unit.Module.WholeCoreBindings+import GHC.Unit.Module.Deps+import GHC.Unit.Module.Graph+import GHC.Unit.Home.ModInfo++import GHC.Iface.Errors.Types+import GHC.Iface.Errors.Ppr++import GHC.Utils.Misc+import GHC.Unit.Home+import GHC.Data.Maybe++import Control.Monad+import Control.Applicative++import qualified Data.Set as Set+import qualified Data.Map as M+import Data.List (isSuffixOf)+import Data.Either++import System.FilePath+import System.Directory+++data LinkDepsOpts = LinkDepsOpts+ { ldObjSuffix :: !String -- ^ Suffix of .o files+ , ldOneShotMode :: !Bool -- ^ Is the driver in one-shot mode?+ , ldModuleGraph :: !ModuleGraph -- ^ Module graph+ , ldUnitEnv :: !UnitEnv -- ^ Unit environment+ , ldPprOpts :: !SDocContext -- ^ Rendering options for error messages+ , ldFinderCache :: !FinderCache -- ^ Finder cache+ , ldFinderOpts :: !FinderOpts -- ^ Finder options+ , ldUseByteCode :: !Bool -- ^ Use bytecode rather than objects+ , ldMsgOpts :: !(DiagnosticOpts IfaceMessage) -- ^ Options for diagnostics+ , ldWays :: !Ways -- ^ Enabled ways+ , ldLoadIface :: SDoc -> Module -> IO (MaybeErr MissingInterfaceError ModIface)+ -- ^ Interface loader function+ }++data LinkDeps = LinkDeps+ { ldNeededLinkables :: [Linkable]+ , ldAllLinkables :: [Linkable]+ , ldUnits :: [UnitId]+ , ldNeededUnits :: UniqDSet UnitId+ }++-- | Find all the packages and linkables that a set of modules depends on+--+-- Return the module and package dependencies for the needed modules.+-- See Note [Object File Dependencies]+--+-- Fails with an IO exception if it can't find enough files+--+getLinkDeps+ :: LinkDepsOpts+ -> Interp+ -> LoaderState+ -> SrcSpan -- for error messages+ -> [Module] -- If you need these+ -> IO LinkDeps -- ... then link these first+getLinkDeps opts interp pls span mods = do+ -- The interpreter and dynamic linker can only handle object code built+ -- the "normal" way, i.e. no non-std ways like profiling or ticky-ticky.+ -- So here we check the build tag: if we're building a non-standard way+ -- then we need to find & link object files built the "normal" way.+ maybe_normal_osuf <- checkNonStdWay opts interp span++ get_link_deps opts pls maybe_normal_osuf span mods+++get_link_deps+ :: LinkDepsOpts+ -> LoaderState+ -> Maybe FilePath -- replace object suffixes?+ -> SrcSpan+ -> [Module]+ -> IO LinkDeps+get_link_deps opts pls maybe_normal_osuf span mods = do+ -- 1. Find the dependent home-pkg-modules/packages from each iface+ -- (omitting modules from the interactive package, which is already linked)+ (mods_s, pkgs_s) <-+ -- Why two code paths here? There is a significant amount of repeated work+ -- performed calculating transitive dependencies+ -- if --make uses the oneShot code path (see MultiLayerModulesTH_* tests)+ if ldOneShotMode opts+ then follow_deps (filterOut isInteractiveModule mods)+ emptyUniqDSet emptyUniqDSet;+ else do+ (pkgs, mmods) <- unzip <$> mapM get_mod_info all_home_mods+ return (catMaybes mmods, unionManyUniqDSets (init_pkg_set : pkgs))++ let+ -- 2. Exclude ones already linked+ -- Main reason: avoid findModule calls in get_linkable+ (mods_needed, links_got) = partitionEithers (map split_mods mods_s)+ pkgs_needed = eltsUDFM $ getUniqDSet pkgs_s `minusUDFM` pkgs_loaded pls++ split_mods mod =+ let is_linked = lookupModuleEnv (objs_loaded pls) mod+ <|> lookupModuleEnv (bcos_loaded pls) mod+ in case is_linked of+ Just linkable -> Right linkable+ Nothing -> Left mod++ -- 3. For each dependent module, find its linkable+ -- This will either be in the HPT or (in the case of one-shot+ -- compilation) we may need to use maybe_getFileLinkable+ lnks_needed <- mapM (get_linkable (ldObjSuffix opts)) mods_needed++ return $ LinkDeps+ { ldNeededLinkables = lnks_needed+ , ldAllLinkables = links_got ++ lnks_needed+ , ldUnits = pkgs_needed+ , ldNeededUnits = pkgs_s+ }+ where+ mod_graph = ldModuleGraph opts+ unit_env = ldUnitEnv opts++ -- This code is used in `--make` mode to calculate the home package and unit dependencies+ -- for a set of modules.+ --+ -- It is significantly more efficient to use the shared transitive dependency+ -- calculation than to compute the transitive dependency set in the same manner as oneShot mode.++ -- It is also a matter of correctness to use the module graph so that dependencies between home units+ -- is resolved correctly.+ make_deps_loop :: (UniqDSet UnitId, Set.Set NodeKey) -> [ModNodeKeyWithUid] -> (UniqDSet UnitId, Set.Set NodeKey)+ make_deps_loop found [] = found+ make_deps_loop found@(found_units, found_mods) (nk:nexts)+ | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts+ | otherwise =+ case M.lookup (NodeKey_Module nk) (mgTransDeps mod_graph) of+ Just trans_deps ->+ let deps = Set.insert (NodeKey_Module nk) trans_deps+ -- See #936 and the ghci.prog007 test for why we have to continue traversing through+ -- boot modules.+ todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- Set.toList trans_deps]+ in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts)+ Nothing ->+ let (ModNodeKeyWithUid _ uid) = nk+ in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts++ mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m)+ (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods)++ all_home_mods = [with_uid | NodeKey_Module with_uid <- Set.toList all_deps]++ get_mod_info (ModNodeKeyWithUid gwib uid) =+ case lookupHug (ue_home_unit_graph unit_env) uid (gwib_mod gwib) of+ Just hmi ->+ let iface = (hm_iface hmi)+ mmod = case mi_hsc_src iface of+ HsBootFile -> link_boot_mod_error (mi_module iface)+ _ -> return $ Just (mi_module iface)++ in (mkUniqDSet $ Set.toList $ dep_direct_pkgs (mi_deps iface),) <$> mmod+ Nothing -> throwProgramError opts $+ text "getLinkDeps: Home module not loaded" <+> ppr (gwib_mod gwib) <+> ppr uid+++ -- This code is used in one-shot mode to traverse downwards through the HPT+ -- to find all link dependencies.+ -- The ModIface contains the transitive closure of the module dependencies+ -- within the current package, *except* for boot modules: if we encounter+ -- a boot module, we have to find its real interface and discover the+ -- dependencies of that. Hence we need to traverse the dependency+ -- tree recursively. See bug #936, testcase ghci/prog007.+ follow_deps :: [Module] -- modules to follow+ -> UniqDSet Module -- accum. module dependencies+ -> UniqDSet UnitId -- accum. package dependencies+ -> IO ([Module], UniqDSet UnitId) -- result+ follow_deps [] acc_mods acc_pkgs+ = return (uniqDSetToList acc_mods, acc_pkgs)+ follow_deps (mod:mods) acc_mods acc_pkgs+ = do+ mb_iface <- ldLoadIface opts msg mod+ iface <- case mb_iface of+ Failed err -> throwProgramError opts $+ missingInterfaceErrorDiagnostic (ldMsgOpts opts) err+ Succeeded iface -> return iface++ when (mi_boot iface == IsBoot) $ link_boot_mod_error mod++ let+ pkg = moduleUnit mod+ deps = mi_deps iface++ pkg_deps = dep_direct_pkgs deps+ (boot_deps, mod_deps) = flip partitionWith (Set.toList (dep_direct_mods deps)) $+ \case+ (_, GWIB m IsBoot) -> Left m+ (_, GWIB m NotBoot) -> Right m++ mod_deps' = case ue_homeUnit unit_env of+ Nothing -> []+ Just home_unit -> filter (not . (`elementOfUniqDSet` acc_mods)) (map (mkHomeModule home_unit) $ (boot_deps ++ mod_deps))+ acc_mods' = case ue_homeUnit unit_env of+ Nothing -> acc_mods+ Just home_unit -> addListToUniqDSet acc_mods (mod : map (mkHomeModule home_unit) mod_deps)+ acc_pkgs' = addListToUniqDSet acc_pkgs (Set.toList pkg_deps)++ case ue_homeUnit unit_env of+ Just home_unit | isHomeUnit home_unit pkg -> follow_deps (mod_deps' ++ mods)+ acc_mods' acc_pkgs'+ _ -> follow_deps mods acc_mods (addOneToUniqDSet acc_pkgs' (toUnitId pkg))+ where+ msg = text "need to link module" <+> ppr mod <+>+ text "due to use of Template Haskell"++++ link_boot_mod_error :: Module -> IO a+ link_boot_mod_error mod = throwProgramError opts $+ text "module" <+> ppr mod <+>+ text "cannot be linked; it is only available as a boot module"++ no_obj :: Outputable a => a -> IO b+ no_obj mod = dieWith opts span $+ text "cannot find object file for module " <>+ quotes (ppr mod) $$+ while_linking_expr++ while_linking_expr = text "while linking an interpreted expression"+++ -- See Note [Using Byte Code rather than Object Code for Template Haskell]+ homeModLinkable :: HomeModInfo -> Maybe Linkable+ homeModLinkable hmi =+ if ldUseByteCode opts+ then homeModInfoByteCode hmi <|> homeModInfoObject hmi+ else homeModInfoObject hmi <|> homeModInfoByteCode hmi++ get_linkable osuf mod -- A home-package module+ | Just mod_info <- lookupHugByModule mod (ue_home_unit_graph unit_env)+ = adjust_linkable (expectJust "getLinkDeps" (homeModLinkable mod_info))+ | otherwise+ = do -- It's not in the HPT because we are in one shot mode,+ -- so use the Finder to get a ModLocation...+ case ue_homeUnit unit_env of+ Nothing -> no_obj mod+ Just home_unit -> do++ let fc = ldFinderCache opts+ let fopts = ldFinderOpts opts+ mb_stuff <- findHomeModule fc fopts home_unit (moduleName mod)+ case mb_stuff of+ Found loc mod -> found loc mod+ _ -> no_obj (moduleName mod)+ where+ found loc mod = do {+ -- ...and then find the linkable for it+ mb_lnk <- findObjectLinkableMaybe mod loc ;+ case mb_lnk of {+ Nothing -> no_obj mod ;+ Just lnk -> adjust_linkable lnk+ }}++ adjust_linkable lnk+ | Just new_osuf <- maybe_normal_osuf = do+ new_uls <- mapM (adjust_ul new_osuf)+ (linkableUnlinked lnk)+ return lnk{ linkableUnlinked=new_uls }+ | otherwise =+ return lnk++ adjust_ul new_osuf (DotO file) = do+ massert (osuf `isSuffixOf` file)+ let file_base = fromJust (stripExtension osuf file)+ new_file = file_base <.> new_osuf+ ok <- doesFileExist new_file+ if (not ok)+ then dieWith opts span $+ text "cannot find object file "+ <> quotes (text new_file) $$ while_linking_expr+ else return (DotO new_file)+ adjust_ul _ (DotA fp) = panic ("adjust_ul DotA " ++ show fp)+ adjust_ul _ (DotDLL fp) = panic ("adjust_ul DotDLL " ++ show fp)+ adjust_ul _ l@(BCOs {}) = return l+ adjust_ul _ l@LoadedBCOs{} = return l+ adjust_ul _ (CoreBindings (WholeCoreBindings _ mod _)) = pprPanic "Unhydrated core bindings" (ppr mod)++{-+Note [Using Byte Code rather than Object Code for Template Haskell]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++The `-fprefer-byte-code` flag allows a user to specify that they want to use+byte code (if availble) rather than object code for home module dependenices+when executing Template Haskell splices.++Why might you want to use byte code rather than object code?++* Producing object code is much slower than producing byte code (for example if you're using -fno-code)+* Linking many large object files, which happens once per splice, is quite expensive. (#21700)++So we allow the user to choose to use byte code rather than object files if they want to avoid these+two pitfalls.++When using `-fprefer-byte-code` you have to arrange to have the byte code availble.+In normal --make mode it will not be produced unless you enable `-fbyte-code-and-object-code`.+See Note [Home module build products] for some more information about that.++The only other place where the flag is consulted is when enabling code generation+with `-fno-code`, which does so to anticipate what decision we will make at the+splice point about what we would prefer.++-}++dieWith :: LinkDepsOpts -> SrcSpan -> SDoc -> IO a+dieWith opts span msg = throwProgramError opts (mkLocMessage MCFatal span msg)++throwProgramError :: LinkDepsOpts -> SDoc -> IO a+throwProgramError opts doc = throwGhcExceptionIO (ProgramError (renderWithContext (ldPprOpts opts) doc))++checkNonStdWay :: LinkDepsOpts -> Interp -> SrcSpan -> IO (Maybe FilePath)+checkNonStdWay _opts interp _srcspan+ | ExternalInterp {} <- interpInstance interp = return Nothing+ -- with -fexternal-interpreter we load the .o files, whatever way+ -- they were built. If they were built for a non-std way, then+ -- we will use the appropriate variant of the iserv binary to load them.++-- #if-guard the following equations otherwise the pattern match checker will+-- complain that they are redundant.+#if defined(HAVE_INTERNAL_INTERPRETER)+checkNonStdWay opts _interp srcspan+ | hostFullWays == targetFullWays = return Nothing+ -- Only if we are compiling with the same ways as GHC is built+ -- with, can we dynamically load those object files. (see #3604)++ | ldObjSuffix opts == normalObjectSuffix && not (null targetFullWays)+ = failNonStd opts srcspan++ | otherwise = return (Just (hostWayTag ++ "o"))+ where+ targetFullWays = fullWays (ldWays opts)+ hostWayTag = case waysTag hostFullWays of+ "" -> ""+ tag -> tag ++ "_"++ normalObjectSuffix :: String+ normalObjectSuffix = "o"++data Way' = Normal | Prof | Dyn++failNonStd :: LinkDepsOpts -> SrcSpan -> IO (Maybe FilePath)+failNonStd opts srcspan = dieWith opts srcspan $+ text "Cannot load" <+> pprWay' compWay <+>+ text "objects when GHC is built" <+> pprWay' ghciWay $$+ text "To fix this, either:" $$+ text " (1) Use -fexternal-interpreter, or" $$+ buildTwiceMsg+ where compWay+ | ldWays opts `hasWay` WayDyn = Dyn+ | ldWays opts `hasWay` WayProf = Prof+ | otherwise = Normal+ ghciWay+ | hostIsDynamic = Dyn+ | hostIsProfiled = Prof+ | otherwise = Normal+ buildTwiceMsg = case (ghciWay, compWay) of+ (Normal, Dyn) -> dynamicTooMsg+ (Dyn, Normal) -> dynamicTooMsg+ _ ->+ text " (2) Build the program twice: once" <+>+ pprWay' ghciWay <> text ", and then" $$+ text " " <> pprWay' compWay <+>+ text "using -osuf to set a different object file suffix."+ dynamicTooMsg = text " (2) Use -dynamic-too," <+>+ text "and use -osuf and -dynosuf to set object file suffixes as needed."+ pprWay' :: Way' -> SDoc+ pprWay' way = text $ case way of+ Normal -> "the normal way"+ Prof -> "with -prof"+ Dyn -> "with -dynamic"+#endif+
GHC/Linker/Dynamic.hs view
@@ -11,7 +11,6 @@ import GHC.Prelude import GHC.Platform import GHC.Platform.Ways-import GHC.Settings (ToolSettings(toolSettings_ldSupportsSingleModule)) import GHC.Driver.Config.Linker import GHC.Driver.Session@@ -151,9 +150,6 @@ -- dynamic binding nonsense when referring to symbols from -- within the library. The NCG assumes that this option is -- specified (on i386, at least).- -- In XCode 15, -single_module is the default and passing the- -- flag is now obsolete and raises a warning (#24168). We encode- -- this information into the toolchain field ...SupportsSingleModule. -- -install_name -- Mac OS/X stores the path where a dynamic library is (to -- be) installed in the library itself. It's called the@@ -179,11 +175,8 @@ ] ++ map Option o_files ++ [ Option "-undefined",- Option "dynamic_lookup"- ]- ++ (if toolSettings_ldSupportsSingleModule (toolSettings dflags)- then [ Option "-single_module" ]- else [ ])+ Option "dynamic_lookup",+ Option "-single_module" ] ++ (if platformArch platform `elem` [ ArchX86_64, ArchAArch64 ] then [ ] else [ Option "-Wl,-read_only_relocs,suppress" ])
GHC/Linker/Loader.hs view
@@ -29,6 +29,11 @@ , withExtendedLoadedEnv , extendLoadedEnv , deleteFromLoadedEnv+ -- * Internals+ , rmDupLinkables+ , modifyLoaderState+ , initLinkDepsOpts+ , partitionLinkable ) where @@ -43,7 +48,6 @@ import GHC.Driver.Env import GHC.Driver.Session import GHC.Driver.Ppr-import GHC.Driver.Config import GHC.Driver.Config.Diagnostic import GHC.Driver.Config.Finder @@ -51,7 +55,7 @@ import GHC.Runtime.Interpreter import GHCi.RemoteTypes-+import GHC.Iface.Load import GHC.ByteCode.Linker import GHC.ByteCode.Asm@@ -68,24 +72,18 @@ import GHC.Utils.Outputable import GHC.Utils.Panic-import GHC.Utils.Panic.Plain import GHC.Utils.Error import GHC.Utils.Logger import GHC.Utils.TmpFs import GHC.Unit.Env-import GHC.Unit.Finder import GHC.Unit.Module-import GHC.Unit.Module.ModIface-import GHC.Unit.Module.WholeCoreBindings-import GHC.Unit.Module.Deps-import GHC.Unit.Home.ModInfo import GHC.Unit.State as Packages import qualified GHC.Data.ShortText as ST-import qualified GHC.Data.Maybe as Maybes import GHC.Data.FastString +import GHC.Linker.Deps import GHC.Linker.MacOS import GHC.Linker.Dynamic import GHC.Linker.Types@@ -94,10 +92,9 @@ import Control.Monad import qualified Data.Set as Set-import qualified Data.Map as M import Data.Char (isSpace) import Data.IORef-import Data.List (intercalate, isPrefixOf, isSuffixOf, nub, partition)+import Data.List (intercalate, isPrefixOf, nub, partition) import Data.Maybe import Control.Concurrent.MVar import qualified Control.Monad.Catch as MC@@ -113,14 +110,6 @@ import GHC.Utils.Exception -import GHC.Unit.Module.Graph-import GHC.Types.SourceFile-import GHC.Utils.Misc-import GHC.Iface.Load-import GHC.Unit.Home-import Data.Either-import Control.Applicative- uninitialised :: a uninitialised = panic "Loader not initialised" @@ -207,28 +196,23 @@ -> IO (LoaderState, SuccessFlag, [Linkable], PkgsLoaded) -- ^ returns the set of linkables required loadDependencies interp hsc_env pls span needed_mods = do -- initLoaderState (hsc_dflags hsc_env) dl- let dflags = hsc_dflags hsc_env- -- The interpreter and dynamic linker can only handle object code built- -- the "normal" way, i.e. no non-std ways like profiling or ticky-ticky.- -- So here we check the build tag: if we're building a non-standard way- -- then we need to find & link object files built the "normal" way.- maybe_normal_osuf <- checkNonStdWay dflags interp span+ let opts = initLinkDepsOpts hsc_env -- Find what packages and linkables are required- (lnks, all_lnks, pkgs, this_pkgs_needed)- <- getLinkDeps hsc_env pls- maybe_normal_osuf span needed_mods+ deps <- getLinkDeps opts interp pls span needed_mods + let this_pkgs_needed = ldNeededUnits deps+ -- Link the packages and modules required- pls1 <- loadPackages' interp hsc_env pkgs pls- (pls2, succ) <- loadModuleLinkables interp hsc_env pls1 lnks+ pls1 <- loadPackages' interp hsc_env (ldUnits deps) pls+ (pls2, succ) <- loadModuleLinkables interp hsc_env pls1 (ldNeededLinkables deps) let this_pkgs_loaded = udfmRestrictKeys all_pkgs_loaded $ getUniqDSet trans_pkgs_needed all_pkgs_loaded = pkgs_loaded pls2 trans_pkgs_needed = unionManyUniqDSets (this_pkgs_needed : [ loaded_pkg_trans_deps pkg | pkg_id <- uniqDSetToList this_pkgs_needed , Just pkg <- [lookupUDFM all_pkgs_loaded pkg_id] ])- return (pls2, succ, all_lnks, this_pkgs_loaded)+ return (pls2, succ, ldAllLinkables deps, this_pkgs_loaded) -- | Temporarily extend the loaded env.@@ -303,17 +287,24 @@ -- Initialise the linker state let pls0 = emptyLoaderState - -- (a) initialise the C dynamic linker- initObjLinker interp+ case platformArch (targetPlatform (hsc_dflags hsc_env)) of+ -- FIXME: we don't initialize anything with the JS interpreter.+ -- Perhaps we should load preload packages. We'll load them on demand+ -- anyway.+ ArchJavaScript -> return pls0 + _ -> do+ -- (a) initialise the C dynamic linker+ initObjLinker interp - -- (b) Load packages from the command-line (Note [preload packages])- pls <- unitEnv_foldWithKey (\k u env -> k >>= \pls' -> loadPackages' interp (hscSetActiveUnitId u hsc_env) (preloadUnits (homeUnitEnv_units env)) pls') (return pls0) (hsc_HUG hsc_env) - -- steps (c), (d) and (e)- loadCmdLineLibs' interp hsc_env pls+ -- (b) Load packages from the command-line (Note [preload packages])+ pls <- unitEnv_foldWithKey (\k u env -> k >>= \pls' -> loadPackages' interp (hscSetActiveUnitId u hsc_env) (preloadUnits (homeUnitEnv_units env)) pls') (return pls0) (hsc_HUG hsc_env) + -- steps (c), (d) and (e)+ loadCmdLineLibs' interp hsc_env pls + loadCmdLineLibs :: Interp -> HscEnv -> IO () loadCmdLineLibs interp hsc_env = do initLoaderState interp hsc_env@@ -598,8 +589,7 @@ nobreakarray = error "no break array" bco_ix = mkNameEnv [(unlinkedBCOName root_ul_bco, 0)] resolved <- linkBCO interp le bco_ix nobreakarray root_ul_bco- bco_opts <- initBCOOpts (hsc_dflags hsc_env)- [root_hvref] <- createBCOs interp bco_opts [resolved]+ [root_hvref] <- createBCOs interp [resolved] fhv <- mkFinalizedHValue interp root_hvref return (pls, fhv) where@@ -615,313 +605,28 @@ -- All wired-in names are in the base package, which we link -- by default, so we can safely ignore them here. -dieWith :: DynFlags -> SrcSpan -> SDoc -> IO a-dieWith dflags span msg = throwGhcExceptionIO (ProgramError (showSDoc dflags (mkLocMessage MCFatal span msg)))---checkNonStdWay :: DynFlags -> Interp -> SrcSpan -> IO (Maybe FilePath)-checkNonStdWay _dflags interp _srcspan- | ExternalInterp {} <- interpInstance interp = return Nothing- -- with -fexternal-interpreter we load the .o files, whatever way- -- they were built. If they were built for a non-std way, then- -- we will use the appropriate variant of the iserv binary to load them.---- #if-guard the following equations otherwise the pattern match checker will--- complain that they are redundant.-#if defined(HAVE_INTERNAL_INTERPRETER)-checkNonStdWay dflags _interp srcspan- | hostFullWays == targetFullWays = return Nothing- -- Only if we are compiling with the same ways as GHC is built- -- with, can we dynamically load those object files. (see #3604)-- | objectSuf_ dflags == normalObjectSuffix && not (null targetFullWays)- = failNonStd dflags srcspan-- | otherwise = return (Just (hostWayTag ++ "o"))- where- targetFullWays = fullWays (ways dflags)- hostWayTag = case waysTag hostFullWays of- "" -> ""- tag -> tag ++ "_"-- normalObjectSuffix :: String- normalObjectSuffix = phaseInputExt StopLn--data Way' = Normal | Prof | Dyn--failNonStd :: DynFlags -> SrcSpan -> IO (Maybe FilePath)-failNonStd dflags srcspan = dieWith dflags srcspan $- text "Cannot load" <+> pprWay' compWay <+>- text "objects when GHC is built" <+> pprWay' ghciWay $$- text "To fix this, either:" $$- text " (1) Use -fexternal-interpreter, or" $$- buildTwiceMsg- where compWay- | ways dflags `hasWay` WayDyn = Dyn- | ways dflags `hasWay` WayProf = Prof- | otherwise = Normal- ghciWay- | hostIsDynamic = Dyn- | hostIsProfiled = Prof- | otherwise = Normal- buildTwiceMsg = case (ghciWay, compWay) of- (Normal, Dyn) -> dynamicTooMsg- (Dyn, Normal) -> dynamicTooMsg- _ ->- text " (2) Build the program twice: once" <+>- pprWay' ghciWay <> text ", and then" $$- text " " <> pprWay' compWay <+>- text "using -osuf to set a different object file suffix."- dynamicTooMsg = text " (2) Use -dynamic-too," <+>- text "and use -osuf and -dynosuf to set object file suffixes as needed."- pprWay' :: Way' -> SDoc- pprWay' way = text $ case way of- Normal -> "the normal way"- Prof -> "with -prof"- Dyn -> "with -dynamic"-#endif--getLinkDeps :: HscEnv- -> LoaderState- -> Maybe FilePath -- replace object suffixes?- -> SrcSpan -- for error messages- -> [Module] -- If you need these- -> IO ([Linkable], [Linkable], [UnitId], UniqDSet UnitId) -- ... then link these first- -- The module and package dependencies for the needed modules are returned.- -- See Note [Object File Dependencies]--- Fails with an IO exception if it can't find enough files--getLinkDeps hsc_env pls replace_osuf span mods--- Find all the packages and linkables that a set of modules depends on- = do {- -- 1. Find the dependent home-pkg-modules/packages from each iface- -- (omitting modules from the interactive package, which is already linked)- ; (mods_s, pkgs_s) <-- -- Why two code paths here? There is a significant amount of repeated work- -- performed calculating transitive dependencies- -- if --make uses the oneShot code path (see MultiLayerModulesTH_* tests)- if isOneShot (ghcMode dflags)- then follow_deps (filterOut isInteractiveModule mods)- emptyUniqDSet emptyUniqDSet;- else do- (pkgs, mmods) <- unzip <$> mapM get_mod_info all_home_mods- return (catMaybes mmods, unionManyUniqDSets (init_pkg_set : pkgs))-- ; let- -- 2. Exclude ones already linked- -- Main reason: avoid findModule calls in get_linkable- (mods_needed, links_got) = partitionEithers (map split_mods mods_s)- pkgs_needed = eltsUDFM $ getUniqDSet pkgs_s `minusUDFM` pkgs_loaded pls-- split_mods mod =- let is_linked = findModuleLinkable_maybe (objs_loaded pls) mod <|> findModuleLinkable_maybe (bcos_loaded pls) mod- in case is_linked of- Just linkable -> Right linkable- Nothing -> Left mod-- -- 3. For each dependent module, find its linkable- -- This will either be in the HPT or (in the case of one-shot- -- compilation) we may need to use maybe_getFileLinkable- ; let { osuf = objectSuf dflags }- ; lnks_needed <- mapM (get_linkable osuf) mods_needed-- ; return (lnks_needed, links_got ++ lnks_needed, pkgs_needed, pkgs_s) }+initLinkDepsOpts :: HscEnv -> LinkDepsOpts+initLinkDepsOpts hsc_env = opts where+ opts = LinkDepsOpts+ { ldObjSuffix = objectSuf dflags+ , ldOneShotMode = isOneShot (ghcMode dflags)+ , ldModuleGraph = hsc_mod_graph hsc_env+ , ldUnitEnv = hsc_unit_env hsc_env+ , ldLoadIface = load_iface+ , ldPprOpts = initSDocContext dflags defaultUserStyle+ , ldFinderCache = hsc_FC hsc_env+ , ldFinderOpts = initFinderOpts dflags+ , ldUseByteCode = gopt Opt_UseBytecodeRatherThanObjects dflags+ , ldMsgOpts = initIfaceMessageOpts dflags+ , ldWays = ways dflags+ } dflags = hsc_dflags hsc_env- mod_graph = hsc_mod_graph hsc_env-- -- This code is used in `--make` mode to calculate the home package and unit dependencies- -- for a set of modules.- --- -- It is significantly more efficient to use the shared transitive dependency- -- calculation than to compute the transitive dependency set in the same manner as oneShot mode.-- -- It is also a matter of correctness to use the module graph so that dependencies between home units- -- is resolved correctly.- make_deps_loop :: (UniqDSet UnitId, Set.Set NodeKey) -> [ModNodeKeyWithUid] -> (UniqDSet UnitId, Set.Set NodeKey)- make_deps_loop found [] = found- make_deps_loop found@(found_units, found_mods) (nk:nexts)- | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts- | otherwise =- case M.lookup (NodeKey_Module nk) (mgTransDeps mod_graph) of- Just trans_deps ->- let deps = Set.insert (NodeKey_Module nk) trans_deps- -- See #936 and the ghci.prog007 test for why we have to continue traversing through- -- boot modules.- todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- Set.toList trans_deps]- in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts)- Nothing ->- let (ModNodeKeyWithUid _ uid) = nk- in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts-- mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m)- (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods)-- all_home_mods = [with_uid | NodeKey_Module with_uid <- Set.toList all_deps]-- get_mod_info (ModNodeKeyWithUid gwib uid) =- case lookupHug (hsc_HUG hsc_env) uid (gwib_mod gwib) of- Just hmi ->- let iface = (hm_iface hmi)- mmod = case mi_hsc_src iface of- HsBootFile -> link_boot_mod_error (mi_module iface)- _ -> return $ Just (mi_module iface)-- in (mkUniqDSet $ Set.toList $ dep_direct_pkgs (mi_deps iface),) <$> mmod- Nothing ->- let err = text "getLinkDeps: Home module not loaded" <+> ppr (gwib_mod gwib) <+> ppr uid- in throwGhcExceptionIO (ProgramError (showSDoc dflags err))--- -- This code is used in one-shot mode to traverse downwards through the HPT- -- to find all link dependencies.- -- The ModIface contains the transitive closure of the module dependencies- -- within the current package, *except* for boot modules: if we encounter- -- a boot module, we have to find its real interface and discover the- -- dependencies of that. Hence we need to traverse the dependency- -- tree recursively. See bug #936, testcase ghci/prog007.- follow_deps :: [Module] -- modules to follow- -> UniqDSet Module -- accum. module dependencies- -> UniqDSet UnitId -- accum. package dependencies- -> IO ([Module], UniqDSet UnitId) -- result- follow_deps [] acc_mods acc_pkgs- = return (uniqDSetToList acc_mods, acc_pkgs)- follow_deps (mod:mods) acc_mods acc_pkgs- = do- mb_iface <- initIfaceCheck (text "getLinkDeps") hsc_env $- loadInterface msg mod (ImportByUser NotBoot)- iface <- case mb_iface of- Maybes.Failed err -> throwGhcExceptionIO (ProgramError (showSDoc dflags err))- Maybes.Succeeded iface -> return iface-- when (mi_boot iface == IsBoot) $ link_boot_mod_error mod-- let- pkg = moduleUnit mod- deps = mi_deps iface-- pkg_deps = dep_direct_pkgs deps- (boot_deps, mod_deps) = flip partitionWith (Set.toList (dep_direct_mods deps)) $- \case- (_, GWIB m IsBoot) -> Left m- (_, GWIB m NotBoot) -> Right m-- mod_deps' = case hsc_home_unit_maybe hsc_env of- Nothing -> []- Just home_unit -> filter (not . (`elementOfUniqDSet` acc_mods)) (map (mkHomeModule home_unit) $ (boot_deps ++ mod_deps))- acc_mods' = case hsc_home_unit_maybe hsc_env of- Nothing -> acc_mods- Just home_unit -> addListToUniqDSet acc_mods (mod : map (mkHomeModule home_unit) mod_deps)- acc_pkgs' = addListToUniqDSet acc_pkgs (Set.toList pkg_deps)-- case hsc_home_unit_maybe hsc_env of- Just home_unit | isHomeUnit home_unit pkg -> follow_deps (mod_deps' ++ mods)- acc_mods' acc_pkgs'- _ -> follow_deps mods acc_mods (addOneToUniqDSet acc_pkgs' (toUnitId pkg))- where- msg = text "need to link module" <+> ppr mod <+>- text "due to use of Template Haskell"+ load_iface msg mod = initIfaceCheck (text "loader") hsc_env+ $ loadInterface msg mod (ImportByUser NotBoot) - link_boot_mod_error :: Module -> IO a- link_boot_mod_error mod =- throwGhcExceptionIO (ProgramError (showSDoc dflags (- text "module" <+> ppr mod <+>- text "cannot be linked; it is only available as a boot module")))-- no_obj :: Outputable a => a -> IO b- no_obj mod = dieWith dflags span $- text "cannot find object file for module " <>- quotes (ppr mod) $$- while_linking_expr-- while_linking_expr = text "while linking an interpreted expression"--- -- See Note [Using Byte Code rather than Object Code for Template Haskell]- homeModLinkable :: DynFlags -> HomeModInfo -> Maybe Linkable- homeModLinkable dflags hmi =- if gopt Opt_UseBytecodeRatherThanObjects dflags- then homeModInfoByteCode hmi <|> homeModInfoObject hmi- else homeModInfoObject hmi <|> homeModInfoByteCode hmi-- get_linkable osuf mod -- A home-package module- | Just mod_info <- lookupHugByModule mod (hsc_HUG hsc_env)- = adjust_linkable (Maybes.expectJust "getLinkDeps" (homeModLinkable dflags mod_info))- | otherwise- = do -- It's not in the HPT because we are in one shot mode,- -- so use the Finder to get a ModLocation...- case hsc_home_unit_maybe hsc_env of- Nothing -> no_obj mod- Just home_unit -> do-- let fc = hsc_FC hsc_env- let dflags = hsc_dflags hsc_env- let fopts = initFinderOpts dflags- mb_stuff <- findHomeModule fc fopts home_unit (moduleName mod)- case mb_stuff of- Found loc mod -> found loc mod- _ -> no_obj (moduleName mod)- where- found loc mod = do {- -- ...and then find the linkable for it- mb_lnk <- findObjectLinkableMaybe mod loc ;- case mb_lnk of {- Nothing -> no_obj mod ;- Just lnk -> adjust_linkable lnk- }}-- adjust_linkable lnk- | Just new_osuf <- replace_osuf = do- new_uls <- mapM (adjust_ul new_osuf)- (linkableUnlinked lnk)- return lnk{ linkableUnlinked=new_uls }- | otherwise =- return lnk-- adjust_ul new_osuf (DotO file) = do- massert (osuf `isSuffixOf` file)- let file_base = fromJust (stripExtension osuf file)- new_file = file_base <.> new_osuf- ok <- doesFileExist new_file- if (not ok)- then dieWith dflags span $- text "cannot find object file "- <> quotes (text new_file) $$ while_linking_expr- else return (DotO new_file)- adjust_ul _ (DotA fp) = panic ("adjust_ul DotA " ++ show fp)- adjust_ul _ (DotDLL fp) = panic ("adjust_ul DotDLL " ++ show fp)- adjust_ul _ l@(BCOs {}) = return l- adjust_ul _ l@LoadedBCOs{} = return l- adjust_ul _ (CoreBindings (WholeCoreBindings _ mod _)) = pprPanic "Unhydrated core bindings" (ppr mod)--{--Note [Using Byte Code rather than Object Code for Template Haskell]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--The `-fprefer-byte-code` flag allows a user to specify that they want to use-byte code (if availble) rather than object code for home module dependenices-when executing Template Haskell splices.--Why might you want to use byte code rather than object code?--* Producing object code is much slower than producing byte code (for example if you're using -fno-code)-* Linking many large object files, which happens once per splice, is quite expensive. (#21700)--So we allow the user to choose to use byte code rather than object files if they want to avoid these-two pitfalls.--When using `-fprefer-byte-code` you have to arrange to have the byte code availble.-In normal --make mode it will not be produced unless you enable `-fbyte-code-and-object-code`.-See Note [Home module build products] for some more information about that.--The only other place where the flag is consulted is when enabling code generation-with `-fno-code`, which does so to anticipate what decision we will make at the-splice point about what we would prefer.---}- {- ********************************************************************** Loading a Decls statement@@ -946,11 +651,10 @@ , addr_env = plusNameEnv (addr_env le) bc_strs } -- Link the necessary packages and linkables- bco_opts <- initBCOOpts (hsc_dflags hsc_env)- new_bindings <- linkSomeBCOs bco_opts interp le2 [cbc]+ new_bindings <- linkSomeBCOs interp le2 [cbc] nms_fhvs <- makeForeignNamedHValueRefs interp new_bindings let ce2 = extendClosureEnv (closure_env le2) nms_fhvs- pls2 = pls { linker_env = le2 { closure_env = ce2 } }+ !pls2 = pls { linker_env = le2 { closure_env = ce2 } } return (pls2, (nms_fhvs, links_needed, units_needed)) where free_names = uniqDSetToList $@@ -995,7 +699,6 @@ let (objs, bcos) = partition isObjectLinkable (concatMap partitionLinkable linkables)- bco_opts <- initBCOOpts (hsc_dflags hsc_env) -- Load objects first; they can't depend on BCOs (pls1, ok_flag) <- loadObjects interp hsc_env pls objs@@ -1003,7 +706,7 @@ if failed ok_flag then return (pls1, Failed) else do- pls2 <- dynLinkBCOs bco_opts interp pls1 bcos+ pls2 <- dynLinkBCOs interp pls1 bcos return (pls2, Succeeded) @@ -1019,12 +722,9 @@ li {linkableUnlinked=li_uls_bco}] _ -> [li] -findModuleLinkable_maybe :: LinkableSet -> Module -> Maybe Linkable-findModuleLinkable_maybe = lookupModuleEnv- linkableInSet :: Linkable -> LinkableSet -> Bool linkableInSet l objs_loaded =- case findModuleLinkable_maybe objs_loaded (linkableModule l) of+ case lookupModuleEnv objs_loaded (linkableModule l) of Nothing -> False Just m -> linkableTime l == linkableTime m @@ -1156,8 +856,8 @@ ********************************************************************* -} -dynLinkBCOs :: BCOOpts -> Interp -> LoaderState -> [Linkable] -> IO LoaderState-dynLinkBCOs bco_opts interp pls bcos = do+dynLinkBCOs :: Interp -> LoaderState -> [Linkable] -> IO LoaderState+dynLinkBCOs interp pls bcos = do let (bcos_loaded', new_bcos) = rmDupLinkables (bcos_loaded pls) bcos pls1 = pls { bcos_loaded = bcos_loaded' }@@ -1173,7 +873,7 @@ ae2 = foldr plusNameEnv (addr_env le1) (map bc_strs cbcs) le2 = le1 { itbl_env = ie2, addr_env = ae2 } - names_and_refs <- linkSomeBCOs bco_opts interp le2 cbcs+ names_and_refs <- linkSomeBCOs interp le2 cbcs -- We only want to add the external ones to the ClosureEnv let (to_add, to_drop) = partition (isExternalName.fst) names_and_refs@@ -1184,11 +884,10 @@ new_binds <- makeForeignNamedHValueRefs interp to_add let ce2 = extendClosureEnv (closure_env le2) new_binds- return pls1 { linker_env = le2 { closure_env = ce2 } }+ return $! pls1 { linker_env = le2 { closure_env = ce2 } } -- Link a bunch of BCOs and return references to their values-linkSomeBCOs :: BCOOpts- -> Interp+linkSomeBCOs :: Interp -> LinkerEnv -> [CompiledByteCode] -> IO [(Name,HValueRef)]@@ -1196,7 +895,7 @@ -- the incoming unlinked BCOs. Each gives the -- value of the corresponding unlinked BCO -linkSomeBCOs bco_opts interp le mods = foldr fun do_link mods []+linkSomeBCOs interp le mods = foldr fun do_link mods [] where fun CompiledByteCode{..} inner accum = case bc_breaks of@@ -1211,7 +910,7 @@ bco_ix = mkNameEnv (zip names [0..]) resolved <- sequence [ linkBCO interp le bco_ix breakarray bco | (breakarray, bco) <- flat ]- hvrefs <- createBCOs interp bco_opts resolved+ hvrefs <- createBCOs interp resolved return (zip names hvrefs) -- | Useful to apply to the result of 'linkSomeBCOs'
GHC/Linker/MacOS.hs view
@@ -11,7 +11,7 @@ import GHC.Linker.Config -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Unit.Types import GHC.Unit.State
GHC/Linker/Types.hs view
@@ -108,7 +108,7 @@ in pls { linker_env = le { closure_env = f ce } } data LinkerEnv = LinkerEnv- { closure_env :: ClosureEnv+ { closure_env :: !ClosureEnv -- ^ Current global mapping from closure Names to their true values , itbl_env :: !ItblEnv
GHC/Llvm/MetaData.hs view
@@ -64,7 +64,12 @@ deriving (Eq, Ord, Enum) instance Outputable MetaId where- ppr (MetaId n) = char '!' <> int n+ ppr = ppMetaId++ppMetaId :: IsLine doc => MetaId -> doc+ppMetaId (MetaId n) = char '!' <> int n+{-# SPECIALIZE ppMetaId :: MetaId -> SDoc #-}+{-# SPECIALIZE ppMetaId :: MetaId -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | LLVM metadata expressions data MetaExpr = MetaStr !LMString
GHC/Llvm/Ppr.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE LambdaCase #-}+{-# LANGUAGE TypeApplications #-} -------------------------------------------------------------------------------- -- | Pretty print LLVM IR Code.@@ -36,10 +37,10 @@ import GHC.Llvm.MetaData import GHC.Llvm.Types -import Data.Int import Data.List ( intersperse ) import GHC.Utils.Outputable +import GHC.Cmm.MachOp ( FMASign(..), pprFMASign ) import GHC.CmmToLlvm.Config import GHC.Utils.Panic import GHC.Types.Unique@@ -49,30 +50,39 @@ -------------------------------------------------------------------------------- -- | Print out a whole LLVM module.-ppLlvmModule :: LlvmCgConfig -> LlvmModule -> SDoc+ppLlvmModule :: IsDoc doc => LlvmCgConfig -> LlvmModule -> doc ppLlvmModule opts (LlvmModule comments aliases meta globals decls funcs)- = ppLlvmComments comments $+$ newLine- $+$ ppLlvmAliases aliases $+$ newLine- $+$ ppLlvmMetas opts meta $+$ newLine- $+$ ppLlvmGlobals opts globals $+$ newLine- $+$ ppLlvmFunctionDecls decls $+$ newLine- $+$ ppLlvmFunctions opts funcs+ = ppLlvmComments comments $$ newLine+ $$ ppLlvmAliases aliases $$ newLine+ $$ ppLlvmMetas opts meta $$ newLine+ $$ ppLlvmGlobals opts globals $$ newLine+ $$ ppLlvmFunctionDecls decls $$ newLine+ $$ ppLlvmFunctions opts funcs+{-# SPECIALIZE ppLlvmModule :: LlvmCgConfig -> LlvmModule -> SDoc #-}+{-# SPECIALIZE ppLlvmModule :: LlvmCgConfig -> LlvmModule -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable + -- | Print out a multi-line comment, can be inside a function or on its own-ppLlvmComments :: [LMString] -> SDoc-ppLlvmComments comments = vcat $ map ppLlvmComment comments+ppLlvmComments :: IsDoc doc => [LMString] -> doc+ppLlvmComments comments = lines_ $ map ppLlvmComment comments+{-# SPECIALIZE ppLlvmComments :: [LMString] -> SDoc #-}+{-# SPECIALIZE ppLlvmComments :: [LMString] -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out a comment, can be inside a function or on its own-ppLlvmComment :: LMString -> SDoc+ppLlvmComment :: IsLine doc => LMString -> doc ppLlvmComment com = semi <+> ftext com+{-# SPECIALIZE ppLlvmComment :: LMString -> SDoc #-}+{-# SPECIALIZE ppLlvmComment :: LMString -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out a list of global mutable variable definitions-ppLlvmGlobals :: LlvmCgConfig -> [LMGlobal] -> SDoc-ppLlvmGlobals opts ls = vcat $ map (ppLlvmGlobal opts) ls+ppLlvmGlobals :: IsDoc doc => LlvmCgConfig -> [LMGlobal] -> doc+ppLlvmGlobals opts ls = lines_ $ map (ppLlvmGlobal opts) ls+{-# SPECIALIZE ppLlvmGlobals :: LlvmCgConfig -> [LMGlobal] -> SDoc #-}+{-# SPECIALIZE ppLlvmGlobals :: LlvmCgConfig -> [LMGlobal] -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out a global mutable variable definition-ppLlvmGlobal :: LlvmCgConfig -> LMGlobal -> SDoc+ppLlvmGlobal :: IsLine doc => LlvmCgConfig -> LMGlobal -> doc ppLlvmGlobal opts (LMGlobal var@(LMGlobalVar _ _ link x a c) dat) = let sect = case x of Just x' -> text ", section" <+> doubleQuotes (ftext x')@@ -84,7 +94,7 @@ rhs = case dat of Just stat -> pprSpecialStatic opts stat- Nothing -> ppr (pLower $ getVarType var)+ Nothing -> ppLlvmType (pLower $ getVarType var) -- Position of linkage is different for aliases. const = case c of@@ -92,105 +102,130 @@ Constant -> "constant" Alias -> "alias" - in ppAssignment opts var $ ppr link <+> text const <+> rhs <> sect <> align- $+$ newLine+ in ppAssignment opts var $ ppLlvmLinkageType link <+> text const <+> rhs <> sect <> align ppLlvmGlobal opts (LMGlobal var val) = pprPanic "ppLlvmGlobal" $- text "Non Global var ppr as global! " <> ppVar opts var <> text "=" <> ppr (fmap (ppStatic opts) val)+ text "Non Global var ppr as global! " <> ppVar opts var <> text "=" <> ppr (fmap (ppStatic @SDoc opts) val)+{-# SPECIALIZE ppLlvmGlobal :: LlvmCgConfig -> LMGlobal -> SDoc #-}+{-# SPECIALIZE ppLlvmGlobal :: LlvmCgConfig -> LMGlobal -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out a list of LLVM type aliases.-ppLlvmAliases :: [LlvmAlias] -> SDoc-ppLlvmAliases tys = vcat $ map ppLlvmAlias tys+ppLlvmAliases :: IsDoc doc => [LlvmAlias] -> doc+ppLlvmAliases tys = lines_ $ map ppLlvmAlias tys+{-# SPECIALIZE ppLlvmAliases :: [LlvmAlias] -> SDoc #-}+{-# SPECIALIZE ppLlvmAliases :: [LlvmAlias] -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out an LLVM type alias.-ppLlvmAlias :: LlvmAlias -> SDoc+ppLlvmAlias :: IsLine doc => LlvmAlias -> doc ppLlvmAlias (name, ty)- = char '%' <> ftext name <+> equals <+> text "type" <+> ppr ty+ = char '%' <> ftext name <+> equals <+> text "type" <+> ppLlvmType ty+{-# SPECIALIZE ppLlvmAlias :: LlvmAlias -> SDoc #-}+{-# SPECIALIZE ppLlvmAlias :: LlvmAlias -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out a list of LLVM metadata.-ppLlvmMetas :: LlvmCgConfig -> [MetaDecl] -> SDoc-ppLlvmMetas opts metas = vcat $ map (ppLlvmMeta opts) metas+ppLlvmMetas :: IsDoc doc => LlvmCgConfig -> [MetaDecl] -> doc+ppLlvmMetas opts metas = lines_ $ map (ppLlvmMeta opts) metas+{-# SPECIALIZE ppLlvmMetas :: LlvmCgConfig -> [MetaDecl] -> SDoc #-}+{-# SPECIALIZE ppLlvmMetas :: LlvmCgConfig -> [MetaDecl] -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out an LLVM metadata definition.-ppLlvmMeta :: LlvmCgConfig -> MetaDecl -> SDoc+ppLlvmMeta :: IsLine doc => LlvmCgConfig -> MetaDecl -> doc ppLlvmMeta opts (MetaUnnamed n m)- = ppr n <+> equals <+> ppMetaExpr opts m+ = ppMetaId n <+> equals <+> ppMetaExpr opts m ppLlvmMeta _opts (MetaNamed n m) = exclamation <> ftext n <+> equals <+> exclamation <> braces nodes where- nodes = hcat $ intersperse comma $ map ppr m+ nodes = hcat $ intersperse comma $ map ppMetaId m+{-# SPECIALIZE ppLlvmMeta :: LlvmCgConfig -> MetaDecl -> SDoc #-}+{-# SPECIALIZE ppLlvmMeta :: LlvmCgConfig -> MetaDecl -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out a list of function definitions.-ppLlvmFunctions :: LlvmCgConfig -> LlvmFunctions -> SDoc+ppLlvmFunctions :: IsDoc doc => LlvmCgConfig -> LlvmFunctions -> doc ppLlvmFunctions opts funcs = vcat $ map (ppLlvmFunction opts) funcs+{-# SPECIALIZE ppLlvmFunctions :: LlvmCgConfig -> LlvmFunctions -> SDoc #-}+{-# SPECIALIZE ppLlvmFunctions :: LlvmCgConfig -> LlvmFunctions -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out a function definition.-ppLlvmFunction :: LlvmCgConfig -> LlvmFunction -> SDoc+ppLlvmFunction :: IsDoc doc => LlvmCgConfig -> LlvmFunction -> doc ppLlvmFunction opts fun =- let attrDoc = ppSpaceJoin (funcAttrs fun)+ let attrDoc = ppSpaceJoin ppLlvmFuncAttr (funcAttrs fun) secDoc = case funcSect fun of Just s' -> text "section" <+> (doubleQuotes $ ftext s') Nothing -> empty prefixDoc = case funcPrefix fun of Just v -> text "prefix" <+> ppStatic opts v Nothing -> empty- in text "define" <+> ppLlvmFunctionHeader (funcDecl fun) (funcArgs fun)- <+> attrDoc <+> secDoc <+> prefixDoc- $+$ lbrace- $+$ ppLlvmBlocks opts (funcBody fun)- $+$ rbrace- $+$ newLine- $+$ newLine+ in vcat+ [line $ text "define" <+> ppLlvmFunctionHeader (funcDecl fun) (funcArgs fun)+ <+> attrDoc <+> secDoc <+> prefixDoc+ , line lbrace+ , ppLlvmBlocks opts (funcBody fun)+ , line rbrace+ , newLine+ , newLine]+{-# SPECIALIZE ppLlvmFunction :: LlvmCgConfig -> LlvmFunction -> SDoc #-}+{-# SPECIALIZE ppLlvmFunction :: LlvmCgConfig -> LlvmFunction -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out a function definition header.-ppLlvmFunctionHeader :: LlvmFunctionDecl -> [LMString] -> SDoc+ppLlvmFunctionHeader :: IsLine doc => LlvmFunctionDecl -> [LMString] -> doc ppLlvmFunctionHeader (LlvmFunctionDecl n l c r varg p a) args = let varg' = case varg of VarArgs | null p -> text "..." | otherwise -> text ", ..." _otherwise -> text "" align = case a of- Just a' -> text " align " <> ppr a'+ Just a' -> text " align " <> int a' Nothing -> empty- args' = map (\((ty,p),n) -> ppr ty <+> ppSpaceJoin p <+> char '%'+ args' = zipWith (\(ty,p) n -> ppLlvmType ty <+> ppSpaceJoin ppLlvmParamAttr p <+> char '%' <> ftext n)- (zip p args)- in ppr l <+> ppr c <+> ppr r <+> char '@' <> ftext n <> lparen <>- (hsep $ punctuate comma args') <> varg' <> rparen <> align+ p+ args+ in ppLlvmLinkageType l <+> ppLlvmCallConvention c <+> ppLlvmType r <+> char '@' <> ftext n <> lparen <>+ hsep (punctuate comma args') <> varg' <> rparen <> align+{-# SPECIALIZE ppLlvmFunctionHeader :: LlvmFunctionDecl -> [LMString] -> SDoc #-}+{-# SPECIALIZE ppLlvmFunctionHeader :: LlvmFunctionDecl -> [LMString] -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out a list of function declaration.-ppLlvmFunctionDecls :: LlvmFunctionDecls -> SDoc+ppLlvmFunctionDecls :: IsDoc doc => LlvmFunctionDecls -> doc ppLlvmFunctionDecls decs = vcat $ map ppLlvmFunctionDecl decs+{-# SPECIALIZE ppLlvmFunctionDecls :: LlvmFunctionDecls -> SDoc #-}+{-# SPECIALIZE ppLlvmFunctionDecls :: LlvmFunctionDecls -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out a function declaration. -- Declarations define the function type but don't define the actual body of -- the function.-ppLlvmFunctionDecl :: LlvmFunctionDecl -> SDoc+ppLlvmFunctionDecl :: IsDoc doc => LlvmFunctionDecl -> doc ppLlvmFunctionDecl (LlvmFunctionDecl n l c r varg p a) = let varg' = case varg of VarArgs | null p -> text "..." | otherwise -> text ", ..." _otherwise -> text "" align = case a of- Just a' -> text " align" <+> ppr a'+ Just a' -> text " align" <+> int a' Nothing -> empty args = hcat $ intersperse (comma <> space) $- map (\(t,a) -> ppr t <+> ppSpaceJoin a) p- in text "declare" <+> ppr l <+> ppr c <+> ppr r <+> char '@' <>- ftext n <> lparen <> args <> varg' <> rparen <> align $+$ newLine+ map (\(t,a) -> ppLlvmType t <+> ppSpaceJoin ppLlvmParamAttr a) p+ in lines_+ [ text "declare" <+> ppLlvmLinkageType l <+> ppLlvmCallConvention c+ <+> ppLlvmType r <+> char '@' <> ftext n <> lparen <> args <> varg' <> rparen <> align+ , empty]+{-# SPECIALIZE ppLlvmFunctionDecl :: LlvmFunctionDecl -> SDoc #-}+{-# SPECIALIZE ppLlvmFunctionDecl :: LlvmFunctionDecl -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out a list of LLVM blocks.-ppLlvmBlocks :: LlvmCgConfig -> LlvmBlocks -> SDoc+ppLlvmBlocks :: IsDoc doc => LlvmCgConfig -> LlvmBlocks -> doc ppLlvmBlocks opts blocks = vcat $ map (ppLlvmBlock opts) blocks+{-# SPECIALIZE ppLlvmBlocks :: LlvmCgConfig -> LlvmBlocks -> SDoc #-}+{-# SPECIALIZE ppLlvmBlocks :: LlvmCgConfig -> LlvmBlocks -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out an LLVM block. -- It must be part of a function definition.-ppLlvmBlock :: LlvmCgConfig -> LlvmBlock -> SDoc+ppLlvmBlock :: IsDoc doc => LlvmCgConfig -> LlvmBlock -> doc ppLlvmBlock opts (LlvmBlock blockId stmts) = let isLabel (MkLabel _) = True isLabel _ = False@@ -198,39 +233,44 @@ ppRest = case rest of MkLabel id:xs -> ppLlvmBlock opts (LlvmBlock id xs) _ -> empty- in ppLlvmBlockLabel blockId- $+$ (vcat $ map (ppLlvmStatement opts) block)- $+$ newLine- $+$ ppRest+ in vcat $+ line (ppLlvmBlockLabel blockId)+ : map (ppLlvmStatement opts) block+ ++ [ empty , ppRest ]+{-# SPECIALIZE ppLlvmBlock :: LlvmCgConfig -> LlvmBlock -> SDoc #-}+{-# SPECIALIZE ppLlvmBlock :: LlvmCgConfig -> LlvmBlock -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out an LLVM block label.-ppLlvmBlockLabel :: LlvmBlockId -> SDoc+ppLlvmBlockLabel :: IsLine doc => LlvmBlockId -> doc ppLlvmBlockLabel id = pprUniqueAlways id <> colon+{-# SPECIALIZE ppLlvmBlockLabel :: LlvmBlockId -> SDoc #-}+{-# SPECIALIZE ppLlvmBlockLabel :: LlvmBlockId -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable --- | Print out an LLVM statement.-ppLlvmStatement :: LlvmCgConfig -> LlvmStatement -> SDoc+-- | Print out an LLVM statement, with any metadata to append to the statement.+ppLlvmStatement :: IsDoc doc => LlvmCgConfig -> LlvmStatement -> doc ppLlvmStatement opts stmt =- let ind = (text " " <>)+ let ind = line . (text " " <>) in case stmt of Assignment dst expr -> ind $ ppAssignment opts dst (ppLlvmExpression opts expr) Fence st ord -> ind $ ppFence st ord Branch target -> ind $ ppBranch opts target BranchIf cond ifT ifF -> ind $ ppBranchIf opts cond ifT ifF- Comment comments -> ind $ ppLlvmComments comments- MkLabel label -> ppLlvmBlockLabel label- Store value ptr align- -> ind $ ppStore opts value ptr align- Switch scrut def tgs -> ind $ ppSwitch opts scrut def tgs+ Comment comments -> ppLlvmComments comments+ MkLabel label -> line $ ppLlvmBlockLabel label+ Store value ptr align metas+ -> ind $ ppStore opts value ptr align metas+ Switch scrut def tgs -> ppSwitch opts scrut def tgs Return result -> ind $ ppReturn opts result Expr expr -> ind $ ppLlvmExpression opts expr Unreachable -> ind $ text "unreachable"- Nop -> empty- MetaStmt meta s -> ppMetaStatement opts meta s+ Nop -> line empty +{-# SPECIALIZE ppLlvmStatement :: LlvmCgConfig -> LlvmStatement -> SDoc #-}+{-# SPECIALIZE ppLlvmStatement :: LlvmCgConfig -> LlvmStatement -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print out an LLVM expression.-ppLlvmExpression :: LlvmCgConfig -> LlvmExpression -> SDoc+ppLlvmExpression :: IsLine doc => LlvmCgConfig -> LlvmExpression -> doc ppLlvmExpression opts expr = case expr of Alloca tp amount -> ppAlloca opts tp amount@@ -249,16 +289,21 @@ AtomicRMW aop tgt src ordering -> ppAtomicRMW opts aop tgt src ordering CmpXChg addr old new s_ord f_ord -> ppCmpXChg opts addr old new s_ord f_ord Phi tp predecessors -> ppPhi opts tp predecessors+ FMAOp op x y z -> pprFMAOp opts op x y z Asm asm c ty v se sk -> ppAsm opts asm c ty v se sk MExpr meta expr -> ppMetaAnnotExpr opts meta expr+{-# SPECIALIZE ppLlvmExpression :: LlvmCgConfig -> LlvmExpression -> SDoc #-}+{-# SPECIALIZE ppLlvmExpression :: LlvmCgConfig -> LlvmExpression -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppMetaExpr :: LlvmCgConfig -> MetaExpr -> SDoc+ppMetaExpr :: IsLine doc => LlvmCgConfig -> MetaExpr -> doc ppMetaExpr opts = \case MetaVar (LMLitVar (LMNullLit _)) -> text "null" MetaStr s -> char '!' <> doubleQuotes (ftext s)- MetaNode n -> ppr n+ MetaNode n -> ppMetaId n MetaVar v -> ppVar opts v- MetaStruct es -> char '!' <> braces (ppCommaJoin (map (ppMetaExpr opts) es))+ MetaStruct es -> char '!' <> braces (ppCommaJoin (ppMetaExpr opts) es)+{-# SPECIALIZE ppMetaExpr :: LlvmCgConfig -> MetaExpr -> SDoc #-}+{-# SPECIALIZE ppMetaExpr :: LlvmCgConfig -> MetaExpr -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable --------------------------------------------------------------------------------@@ -267,7 +312,8 @@ -- | Should always be a function pointer. So a global var of function type -- (since globals are always pointers) or a local var of pointer function type.-ppCall :: LlvmCgConfig -> LlvmCallType -> LlvmVar -> [MetaExpr] -> [LlvmFuncAttr] -> SDoc+ppCall :: forall doc. IsLine doc => LlvmCgConfig -> LlvmCallType -> LlvmVar -> [MetaExpr]+ -> [LlvmFuncAttr] -> doc ppCall opts ct fptr args attrs = case fptr of -- -- if local var function pointer, unwrap@@ -285,32 +331,36 @@ ppCall' (LlvmFunctionDecl _ _ cc ret argTy params _) = let tc = if ct == TailCall then text "tail " else empty ppValues = ppCallParams opts (map snd params) args- ppArgTy = (ppCommaJoin $ map (ppr . fst) params) <>+ ppArgTy = ppCommaJoin (ppLlvmType . fst) params <> (case argTy of VarArgs -> text ", ..." FixedArgs -> empty) fnty = space <> lparen <> ppArgTy <> rparen- attrDoc = ppSpaceJoin attrs- in tc <> text "call" <+> ppr cc <+> ppr ret+ attrDoc = ppSpaceJoin ppLlvmFuncAttr attrs+ in tc <> text "call" <+> ppLlvmCallConvention cc <+> ppLlvmType ret <> fnty <+> ppName opts fptr <> lparen <+> ppValues <+> rparen <+> attrDoc - ppCallParams :: LlvmCgConfig -> [[LlvmParamAttr]] -> [MetaExpr] -> SDoc+ ppCallParams :: LlvmCgConfig -> [[LlvmParamAttr]] -> [MetaExpr] -> doc ppCallParams opts attrs args = hsep $ punctuate comma $ zipWith ppCallMetaExpr attrs args where -- Metadata needs to be marked as having the `metadata` type when used -- in a call argument ppCallMetaExpr attrs (MetaVar v) = ppVar' attrs opts v ppCallMetaExpr _ v = text "metadata" <+> ppMetaExpr opts v+{-# SPECIALIZE ppCall :: LlvmCgConfig -> LlvmCallType -> LlvmVar -> [MetaExpr] -> [LlvmFuncAttr] -> SDoc #-}+{-# SPECIALIZE ppCall :: LlvmCgConfig -> LlvmCallType -> LlvmVar -> [MetaExpr] -> [LlvmFuncAttr] -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppMachOp :: LlvmCgConfig -> LlvmMachOp -> LlvmVar -> LlvmVar -> SDoc+ppMachOp :: IsLine doc => LlvmCgConfig -> LlvmMachOp -> LlvmVar -> LlvmVar -> doc ppMachOp opts op left right =- (ppr op) <+> (ppr (getVarType left)) <+> ppName opts left+ ppLlvmMachOp op <+> ppLlvmType (getVarType left) <+> ppName opts left <> comma <+> ppName opts right+{-# SPECIALIZE ppMachOp :: LlvmCgConfig -> LlvmMachOp -> LlvmVar -> LlvmVar -> SDoc #-}+{-# SPECIALIZE ppMachOp :: LlvmCgConfig -> LlvmMachOp -> LlvmVar -> LlvmVar -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppCmpOp :: LlvmCgConfig -> LlvmCmpOp -> LlvmVar -> LlvmVar -> SDoc+ppCmpOp :: IsLine doc => LlvmCgConfig -> LlvmCmpOp -> LlvmVar -> LlvmVar -> doc ppCmpOp opts op left right = let cmpOp | isInt (getVarType left) && isInt (getVarType right) = text "icmp"@@ -321,28 +371,42 @@ ++ (show $ getVarType left) ++ ", right = " ++ (show $ getVarType right)) -}- in cmpOp <+> ppr op <+> ppr (getVarType left)+ in cmpOp <+> ppLlvmCmpOp op <+> ppLlvmType (getVarType left) <+> ppName opts left <> comma <+> ppName opts right+{-# SPECIALIZE ppCmpOp :: LlvmCgConfig -> LlvmCmpOp -> LlvmVar -> LlvmVar -> SDoc #-}+{-# SPECIALIZE ppCmpOp :: LlvmCgConfig -> LlvmCmpOp -> LlvmVar -> LlvmVar -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable +pprFMAOp :: IsLine doc => LlvmCgConfig -> FMASign -> LlvmVar -> LlvmVar -> LlvmVar -> doc+pprFMAOp opts signs x y z =+ pprFMASign signs <+> ppLlvmType (getVarType x)+ <+> ppName opts x <> comma+ <+> ppName opts y <> comma+ <+> ppName opts z -ppAssignment :: LlvmCgConfig -> LlvmVar -> SDoc -> SDoc+ppAssignment :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc -> doc ppAssignment opts var expr = ppName opts var <+> equals <+> expr+{-# SPECIALIZE ppAssignment :: LlvmCgConfig -> LlvmVar -> SDoc -> SDoc #-}+{-# SPECIALIZE ppAssignment :: LlvmCgConfig -> LlvmVar -> HLine -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppFence :: Bool -> LlvmSyncOrdering -> SDoc+ppFence :: IsLine doc => Bool -> LlvmSyncOrdering -> doc ppFence st ord = let singleThread = case st of True -> text "singlethread" False -> empty in text "fence" <+> singleThread <+> ppSyncOrdering ord+{-# SPECIALIZE ppFence :: Bool -> LlvmSyncOrdering -> SDoc #-}+{-# SPECIALIZE ppFence :: Bool -> LlvmSyncOrdering -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppSyncOrdering :: LlvmSyncOrdering -> SDoc+ppSyncOrdering :: IsLine doc => LlvmSyncOrdering -> doc ppSyncOrdering SyncUnord = text "unordered" ppSyncOrdering SyncMonotonic = text "monotonic" ppSyncOrdering SyncAcquire = text "acquire" ppSyncOrdering SyncRelease = text "release" ppSyncOrdering SyncAcqRel = text "acq_rel" ppSyncOrdering SyncSeqCst = text "seq_cst"+{-# SPECIALIZE ppSyncOrdering :: LlvmSyncOrdering -> SDoc #-}+{-# SPECIALIZE ppSyncOrdering :: LlvmSyncOrdering -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppAtomicOp :: LlvmAtomicOp -> SDoc+ppAtomicOp :: IsLine doc => LlvmAtomicOp -> doc ppAtomicOp LAO_Xchg = text "xchg" ppAtomicOp LAO_Add = text "add" ppAtomicOp LAO_Sub = text "sub"@@ -354,184 +418,222 @@ ppAtomicOp LAO_Min = text "min" ppAtomicOp LAO_Umax = text "umax" ppAtomicOp LAO_Umin = text "umin"+{-# SPECIALIZE ppAtomicOp :: LlvmAtomicOp -> SDoc #-}+{-# SPECIALIZE ppAtomicOp :: LlvmAtomicOp -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppAtomicRMW :: LlvmCgConfig -> LlvmAtomicOp -> LlvmVar -> LlvmVar -> LlvmSyncOrdering -> SDoc+ppAtomicRMW :: IsLine doc => LlvmCgConfig -> LlvmAtomicOp -> LlvmVar -> LlvmVar -> LlvmSyncOrdering -> doc ppAtomicRMW opts aop tgt src ordering = text "atomicrmw" <+> ppAtomicOp aop <+> ppVar opts tgt <> comma <+> ppVar opts src <+> ppSyncOrdering ordering+{-# SPECIALIZE ppAtomicRMW :: LlvmCgConfig -> LlvmAtomicOp -> LlvmVar -> LlvmVar -> LlvmSyncOrdering -> SDoc #-}+{-# SPECIALIZE ppAtomicRMW :: LlvmCgConfig -> LlvmAtomicOp -> LlvmVar -> LlvmVar -> LlvmSyncOrdering -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppCmpXChg :: LlvmCgConfig -> LlvmVar -> LlvmVar -> LlvmVar- -> LlvmSyncOrdering -> LlvmSyncOrdering -> SDoc+ppCmpXChg :: IsLine doc => LlvmCgConfig -> LlvmVar -> LlvmVar -> LlvmVar+ -> LlvmSyncOrdering -> LlvmSyncOrdering -> doc ppCmpXChg opts addr old new s_ord f_ord = text "cmpxchg" <+> ppVar opts addr <> comma <+> ppVar opts old <> comma <+> ppVar opts new <+> ppSyncOrdering s_ord <+> ppSyncOrdering f_ord+{-# SPECIALIZE ppCmpXChg :: LlvmCgConfig -> LlvmVar -> LlvmVar -> LlvmVar -> LlvmSyncOrdering -> LlvmSyncOrdering -> SDoc #-}+{-# SPECIALIZE ppCmpXChg :: LlvmCgConfig -> LlvmVar -> LlvmVar -> LlvmVar -> LlvmSyncOrdering -> LlvmSyncOrdering -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppLoad :: LlvmCgConfig -> LlvmVar -> LMAlign -> SDoc+ppLoad :: IsLine doc => LlvmCgConfig -> LlvmVar -> LMAlign -> doc ppLoad opts var alignment =- text "load" <+> ppr derefType <> comma <+> ppVar opts var <> align+ text "load" <+> ppLlvmType derefType <> comma <+> ppVar opts var <> align where derefType = pLower $ getVarType var align = case alignment of- Just n -> text ", align" <+> ppr n+ Just n -> text ", align" <+> int n Nothing -> empty+{-# SPECIALIZE ppLoad :: LlvmCgConfig -> LlvmVar -> LMAlign -> SDoc #-}+{-# SPECIALIZE ppLoad :: LlvmCgConfig -> LlvmVar -> LMAlign -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppALoad :: LlvmCgConfig -> LlvmSyncOrdering -> SingleThreaded -> LlvmVar -> SDoc+ppALoad :: IsLine doc => LlvmCgConfig -> LlvmSyncOrdering -> SingleThreaded -> LlvmVar -> doc ppALoad opts ord st var = let alignment = llvmWidthInBits (llvmCgPlatform opts) (getVarType var) `quot` 8- align = text ", align" <+> ppr alignment+ align = text ", align" <+> int alignment sThreaded | st = text " singlethread" | otherwise = empty derefType = pLower $ getVarType var- in text "load atomic" <+> ppr derefType <> comma <+> ppVar opts var <> sThreaded+ in text "load atomic" <+> ppLlvmType derefType <> comma <+> ppVar opts var <> sThreaded <+> ppSyncOrdering ord <> align+{-# SPECIALIZE ppALoad :: LlvmCgConfig -> LlvmSyncOrdering -> SingleThreaded -> LlvmVar -> SDoc #-}+{-# SPECIALIZE ppALoad :: LlvmCgConfig -> LlvmSyncOrdering -> SingleThreaded -> LlvmVar -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppStore :: LlvmCgConfig -> LlvmVar -> LlvmVar -> LMAlign -> SDoc-ppStore opts val dst alignment =- text "store" <+> ppVar opts val <> comma <+> ppVar opts dst <> align+ppStore :: IsLine doc => LlvmCgConfig -> LlvmVar -> LlvmVar -> LMAlign -> [MetaAnnot] -> doc+ppStore opts val dst alignment metas =+ text "store" <+> ppVar opts val <> comma <+> ppVar opts dst <> align <+> ppMetaAnnots opts metas where align = case alignment of- Just n -> text ", align" <+> ppr n+ Just n -> text ", align" <+> int n Nothing -> empty+{-# SPECIALIZE ppStore :: LlvmCgConfig -> LlvmVar -> LlvmVar -> LMAlign -> [MetaAnnot] -> SDoc #-}+{-# SPECIALIZE ppStore :: LlvmCgConfig -> LlvmVar -> LlvmVar -> LMAlign -> [MetaAnnot] -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppCast :: LlvmCgConfig -> LlvmCastOp -> LlvmVar -> LlvmType -> SDoc+ppCast :: IsLine doc => LlvmCgConfig -> LlvmCastOp -> LlvmVar -> LlvmType -> doc ppCast opts op from to- = ppr op- <+> ppr (getVarType from) <+> ppName opts from+ = ppLlvmCastOp op+ <+> ppLlvmType (getVarType from) <+> ppName opts from <+> text "to"- <+> ppr to+ <+> ppLlvmType to+{-# SPECIALIZE ppCast :: LlvmCgConfig -> LlvmCastOp -> LlvmVar -> LlvmType -> SDoc #-}+{-# SPECIALIZE ppCast :: LlvmCgConfig -> LlvmCastOp -> LlvmVar -> LlvmType -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppMalloc :: LlvmCgConfig -> LlvmType -> Int -> SDoc+ppMalloc :: IsLine doc => LlvmCgConfig -> LlvmType -> Int -> doc ppMalloc opts tp amount = let amount' = LMLitVar $ LMIntLit (toInteger amount) i32- in text "malloc" <+> ppr tp <> comma <+> ppVar opts amount'-+ in text "malloc" <+> ppLlvmType tp <> comma <+> ppVar opts amount'+{-# SPECIALIZE ppMalloc :: LlvmCgConfig -> LlvmType -> Int -> SDoc #-}+{-# SPECIALIZE ppMalloc :: LlvmCgConfig -> LlvmType -> Int -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppAlloca :: LlvmCgConfig -> LlvmType -> Int -> SDoc+ppAlloca :: IsLine doc => LlvmCgConfig -> LlvmType -> Int -> doc ppAlloca opts tp amount = let amount' = LMLitVar $ LMIntLit (toInteger amount) i32- in text "alloca" <+> ppr tp <> comma <+> ppVar opts amount'-+ in text "alloca" <+> ppLlvmType tp <> comma <+> ppVar opts amount'+{-# SPECIALIZE ppAlloca :: LlvmCgConfig -> LlvmType -> Int -> SDoc #-}+{-# SPECIALIZE ppAlloca :: LlvmCgConfig -> LlvmType -> Int -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppGetElementPtr :: LlvmCgConfig -> Bool -> LlvmVar -> [LlvmVar] -> SDoc+ppGetElementPtr :: IsLine doc => LlvmCgConfig -> Bool -> LlvmVar -> [LlvmVar] -> doc ppGetElementPtr opts inb ptr idx =- let indexes = comma <+> ppCommaJoin (map (ppVar opts) idx)+ let indexes = comma <+> ppCommaJoin (ppVar opts) idx inbound = if inb then text "inbounds" else empty derefType = pLower $ getVarType ptr- in text "getelementptr" <+> inbound <+> ppr derefType <> comma <+> ppVar opts ptr+ in text "getelementptr" <+> inbound <+> ppLlvmType derefType <> comma <+> ppVar opts ptr <> indexes+{-# SPECIALIZE ppGetElementPtr :: LlvmCgConfig -> Bool -> LlvmVar -> [LlvmVar] -> SDoc #-}+{-# SPECIALIZE ppGetElementPtr :: LlvmCgConfig -> Bool -> LlvmVar -> [LlvmVar] -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppReturn :: LlvmCgConfig -> Maybe LlvmVar -> SDoc+ppReturn :: IsLine doc => LlvmCgConfig -> Maybe LlvmVar -> doc ppReturn opts (Just var) = text "ret" <+> ppVar opts var-ppReturn _ Nothing = text "ret" <+> ppr LMVoid-+ppReturn _ Nothing = text "ret" <+> ppLlvmType LMVoid+{-# SPECIALIZE ppReturn :: LlvmCgConfig -> Maybe LlvmVar -> SDoc #-}+{-# SPECIALIZE ppReturn :: LlvmCgConfig -> Maybe LlvmVar -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppBranch :: LlvmCgConfig -> LlvmVar -> SDoc+ppBranch :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc ppBranch opts var = text "br" <+> ppVar opts var+{-# SPECIALIZE ppBranch :: LlvmCgConfig -> LlvmVar -> SDoc #-}+{-# SPECIALIZE ppBranch :: LlvmCgConfig -> LlvmVar -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppBranchIf :: LlvmCgConfig -> LlvmVar -> LlvmVar -> LlvmVar -> SDoc+ppBranchIf :: IsLine doc => LlvmCgConfig -> LlvmVar -> LlvmVar -> LlvmVar -> doc ppBranchIf opts cond trueT falseT = text "br" <+> ppVar opts cond <> comma <+> ppVar opts trueT <> comma <+> ppVar opts falseT+{-# SPECIALIZE ppBranchIf :: LlvmCgConfig -> LlvmVar -> LlvmVar -> LlvmVar -> SDoc #-}+{-# SPECIALIZE ppBranchIf :: LlvmCgConfig -> LlvmVar -> LlvmVar -> LlvmVar -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppPhi :: LlvmCgConfig -> LlvmType -> [(LlvmVar,LlvmVar)] -> SDoc+ppPhi :: IsLine doc => LlvmCgConfig -> LlvmType -> [(LlvmVar,LlvmVar)] -> doc ppPhi opts tp preds = let ppPreds (val, label) = brackets $ ppName opts val <> comma <+> ppName opts label- in text "phi" <+> ppr tp <+> hsep (punctuate comma $ map ppPreds preds)+ in text "phi" <+> ppLlvmType tp <+> hsep (punctuate comma $ map ppPreds preds)+{-# SPECIALIZE ppPhi :: LlvmCgConfig -> LlvmType -> [(LlvmVar,LlvmVar)] -> SDoc #-}+{-# SPECIALIZE ppPhi :: LlvmCgConfig -> LlvmType -> [(LlvmVar,LlvmVar)] -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppSwitch :: LlvmCgConfig -> LlvmVar -> LlvmVar -> [(LlvmVar,LlvmVar)] -> SDoc+ppSwitch :: IsDoc doc => LlvmCgConfig -> LlvmVar -> LlvmVar -> [(LlvmVar,LlvmVar)] -> doc ppSwitch opts scrut dflt targets =- let ppTarget (val, lab) = ppVar opts val <> comma <+> ppVar opts lab- ppTargets xs = brackets $ vcat (map ppTarget xs)- in text "switch" <+> ppVar opts scrut <> comma <+> ppVar opts dflt- <+> ppTargets targets+ let ppTarget (val, lab) = text " " <> ppVar opts val <> comma <+> ppVar opts lab+ in lines_ $ concat+ [ [text "switch" <+> ppVar opts scrut <> comma <+> ppVar opts dflt <+> char '[']+ , map ppTarget targets+ , [char ']']+ ]+{-# SPECIALIZE ppSwitch :: LlvmCgConfig -> LlvmVar -> LlvmVar -> [(LlvmVar,LlvmVar)] -> SDoc #-}+{-# SPECIALIZE ppSwitch :: LlvmCgConfig -> LlvmVar -> LlvmVar -> [(LlvmVar,LlvmVar)] -> HDoc #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppAsm :: LlvmCgConfig -> LMString -> LMString -> LlvmType -> [LlvmVar] -> Bool -> Bool -> SDoc+ppAsm :: IsLine doc => LlvmCgConfig -> LMString -> LMString -> LlvmType -> [LlvmVar] -> Bool -> Bool -> doc ppAsm opts asm constraints rty vars sideeffect alignstack = let asm' = doubleQuotes $ ftext asm cons = doubleQuotes $ ftext constraints- rty' = ppr rty- vars' = lparen <+> ppCommaJoin (map (ppVar opts) vars) <+> rparen+ rty' = ppLlvmType rty+ vars' = lparen <+> ppCommaJoin (ppVar opts) vars <+> rparen side = if sideeffect then text "sideeffect" else empty align = if alignstack then text "alignstack" else empty in text "call" <+> rty' <+> text "asm" <+> side <+> align <+> asm' <> comma <+> cons <> vars'+{-# SPECIALIZE ppAsm :: LlvmCgConfig -> LMString -> LMString -> LlvmType -> [LlvmVar] -> Bool -> Bool -> SDoc #-}+{-# SPECIALIZE ppAsm :: LlvmCgConfig -> LMString -> LMString -> LlvmType -> [LlvmVar] -> Bool -> Bool -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppExtract :: LlvmCgConfig -> LlvmVar -> LlvmVar -> SDoc+ppExtract :: IsLine doc => LlvmCgConfig -> LlvmVar -> LlvmVar -> doc ppExtract opts vec idx = text "extractelement"- <+> ppr (getVarType vec) <+> ppName opts vec <> comma+ <+> ppLlvmType (getVarType vec) <+> ppName opts vec <> comma <+> ppVar opts idx+{-# SPECIALIZE ppExtract :: LlvmCgConfig -> LlvmVar -> LlvmVar -> SDoc #-}+{-# SPECIALIZE ppExtract :: LlvmCgConfig -> LlvmVar -> LlvmVar -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppExtractV :: LlvmCgConfig -> LlvmVar -> Int -> SDoc+ppExtractV :: IsLine doc => LlvmCgConfig -> LlvmVar -> Int -> doc ppExtractV opts struct idx = text "extractvalue"- <+> ppr (getVarType struct) <+> ppName opts struct <> comma- <+> ppr idx+ <+> ppLlvmType (getVarType struct) <+> ppName opts struct <> comma+ <+> int idx+{-# SPECIALIZE ppExtractV :: LlvmCgConfig -> LlvmVar -> Int -> SDoc #-}+{-# SPECIALIZE ppExtractV :: LlvmCgConfig -> LlvmVar -> Int -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppInsert :: LlvmCgConfig -> LlvmVar -> LlvmVar -> LlvmVar -> SDoc+ppInsert :: IsLine doc => LlvmCgConfig -> LlvmVar -> LlvmVar -> LlvmVar -> doc ppInsert opts vec elt idx = text "insertelement"- <+> ppr (getVarType vec) <+> ppName opts vec <> comma- <+> ppr (getVarType elt) <+> ppName opts elt <> comma+ <+> ppLlvmType (getVarType vec) <+> ppName opts vec <> comma+ <+> ppLlvmType (getVarType elt) <+> ppName opts elt <> comma <+> ppVar opts idx---ppMetaStatement :: LlvmCgConfig -> [MetaAnnot] -> LlvmStatement -> SDoc-ppMetaStatement opts meta stmt =- ppLlvmStatement opts stmt <> ppMetaAnnots opts meta+{-# SPECIALIZE ppInsert :: LlvmCgConfig -> LlvmVar -> LlvmVar -> LlvmVar -> SDoc #-}+{-# SPECIALIZE ppInsert :: LlvmCgConfig -> LlvmVar -> LlvmVar -> LlvmVar -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppMetaAnnotExpr :: LlvmCgConfig -> [MetaAnnot] -> LlvmExpression -> SDoc+ppMetaAnnotExpr :: IsLine doc => LlvmCgConfig -> [MetaAnnot] -> LlvmExpression -> doc ppMetaAnnotExpr opts meta expr = ppLlvmExpression opts expr <> ppMetaAnnots opts meta+{-# SPECIALIZE ppMetaAnnotExpr :: LlvmCgConfig -> [MetaAnnot] -> LlvmExpression -> SDoc #-}+{-# SPECIALIZE ppMetaAnnotExpr :: LlvmCgConfig -> [MetaAnnot] -> LlvmExpression -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppMetaAnnots :: LlvmCgConfig -> [MetaAnnot] -> SDoc+ppMetaAnnots :: IsLine doc => LlvmCgConfig -> [MetaAnnot] -> doc ppMetaAnnots opts meta = hcat $ map ppMeta meta where ppMeta (MetaAnnot name e) = comma <+> exclamation <> ftext name <+> case e of- MetaNode n -> ppr n- MetaStruct ms -> exclamation <> braces (ppCommaJoin (map (ppMetaExpr opts) ms))+ MetaNode n -> ppMetaId n+ MetaStruct ms -> exclamation <> braces (ppCommaJoin (ppMetaExpr opts) ms) other -> exclamation <> braces (ppMetaExpr opts other) -- possible?+{-# SPECIALIZE ppMetaAnnots :: LlvmCgConfig -> [MetaAnnot] -> SDoc #-}+{-# SPECIALIZE ppMetaAnnots :: LlvmCgConfig -> [MetaAnnot] -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Return the variable name or value of the 'LlvmVar' -- in Llvm IR textual representation (e.g. @\@x@, @%y@ or @42@).-ppName :: LlvmCgConfig -> LlvmVar -> SDoc+ppName :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc ppName opts v = case v of LMGlobalVar {} -> char '@' <> ppPlainName opts v LMLocalVar {} -> char '%' <> ppPlainName opts v LMNLocalVar {} -> char '%' <> ppPlainName opts v LMLitVar {} -> ppPlainName opts v+{-# SPECIALIZE ppName :: LlvmCgConfig -> LlvmVar -> SDoc #-}+{-# SPECIALIZE ppName :: LlvmCgConfig -> LlvmVar -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Return the variable name or value of the 'LlvmVar' -- in a plain textual representation (e.g. @x@, @y@ or @42@).-ppPlainName :: LlvmCgConfig -> LlvmVar -> SDoc+ppPlainName :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc ppPlainName opts v = case v of (LMGlobalVar x _ _ _ _ _) -> ftext x (LMLocalVar x LMLabel ) -> pprUniqueAlways x (LMLocalVar x _ ) -> char 'l' <> pprUniqueAlways x (LMNLocalVar x _ ) -> ftext x (LMLitVar x ) -> ppLit opts x+{-# SPECIALIZE ppPlainName :: LlvmCgConfig -> LlvmVar -> SDoc #-}+{-# SPECIALIZE ppPlainName :: LlvmCgConfig -> LlvmVar -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Print a literal value. No type.-ppLit :: LlvmCgConfig -> LlvmLit -> SDoc+ppLit :: IsLine doc => LlvmCgConfig -> LlvmLit -> doc ppLit opts l = case l of- (LMIntLit i (LMInt 32)) -> ppr (fromInteger i :: Int32)- (LMIntLit i (LMInt 64)) -> ppr (fromInteger i :: Int64)- (LMIntLit i _ ) -> ppr ((fromInteger i)::Int)+ (LMIntLit i _ ) -> integer i (LMFloatLit r LMFloat ) -> ppFloat (llvmCgPlatform opts) $ narrowFp r (LMFloatLit r LMDouble) -> ppDouble (llvmCgPlatform opts) r f@(LMFloatLit _ _) -> pprPanic "ppLit" (text "Can't print this float literal: " <> ppTypeLit opts f)- (LMVectorLit ls ) -> char '<' <+> ppCommaJoin (map (ppTypeLit opts) ls) <+> char '>'+ (LMVectorLit ls ) -> char '<' <+> ppCommaJoin (ppTypeLit opts) ls <+> char '>' (LMNullLit _ ) -> text "null" -- #11487 was an issue where we passed undef for some arguments -- that were actually live. By chance the registers holding those@@ -544,61 +646,76 @@ | llvmCgFillUndefWithGarbage opts , Just lit <- garbageLit t -> ppLit opts lit | otherwise -> text "undef"+{-# SPECIALIZE ppLit :: LlvmCgConfig -> LlvmLit -> SDoc #-}+{-# SPECIALIZE ppLit :: LlvmCgConfig -> LlvmLit -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppVar :: LlvmCgConfig -> LlvmVar -> SDoc+ppVar :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc ppVar = ppVar' []+{-# SPECIALIZE ppVar :: LlvmCgConfig -> LlvmVar -> SDoc #-}+{-# SPECIALIZE ppVar :: LlvmCgConfig -> LlvmVar -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppVar' :: [LlvmParamAttr] -> LlvmCgConfig -> LlvmVar -> SDoc+ppVar' :: IsLine doc => [LlvmParamAttr] -> LlvmCgConfig -> LlvmVar -> doc ppVar' attrs opts v = case v of LMLitVar x -> ppTypeLit' attrs opts x- x -> ppr (getVarType x) <+> ppSpaceJoin attrs <+> ppName opts x+ x -> ppLlvmType (getVarType x) <+> ppSpaceJoin ppLlvmParamAttr attrs <+> ppName opts x+{-# SPECIALIZE ppVar' :: [LlvmParamAttr] -> LlvmCgConfig -> LlvmVar -> SDoc #-}+{-# SPECIALIZE ppVar' :: [LlvmParamAttr] -> LlvmCgConfig -> LlvmVar -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppTypeLit :: LlvmCgConfig -> LlvmLit -> SDoc+ppTypeLit :: IsLine doc => LlvmCgConfig -> LlvmLit -> doc ppTypeLit = ppTypeLit' []+{-# SPECIALIZE ppTypeLit :: LlvmCgConfig -> LlvmLit -> SDoc #-}+{-# SPECIALIZE ppTypeLit :: LlvmCgConfig -> LlvmLit -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppTypeLit' :: [LlvmParamAttr] -> LlvmCgConfig -> LlvmLit -> SDoc+ppTypeLit' :: IsLine doc => [LlvmParamAttr] -> LlvmCgConfig -> LlvmLit -> doc ppTypeLit' attrs opts l = case l of LMVectorLit {} -> ppLit opts l- _ -> ppr (getLitType l) <+> ppSpaceJoin attrs <+> ppLit opts l+ _ -> ppLlvmType (getLitType l) <+> ppSpaceJoin ppLlvmParamAttr attrs <+> ppLit opts l+{-# SPECIALIZE ppTypeLit' :: [LlvmParamAttr] -> LlvmCgConfig -> LlvmLit -> SDoc #-}+{-# SPECIALIZE ppTypeLit' :: [LlvmParamAttr] -> LlvmCgConfig -> LlvmLit -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppStatic :: LlvmCgConfig -> LlvmStatic -> SDoc+ppStatic :: IsLine doc => LlvmCgConfig -> LlvmStatic -> doc ppStatic opts st = case st of LMComment s -> text "; " <> ftext s LMStaticLit l -> ppTypeLit opts l- LMUninitType t -> ppr t <> text " undef"- LMStaticStr s t -> ppr t <> text " c\"" <> ftext s <> text "\\00\""- LMStaticArray d t -> ppr t <> text " [" <> ppCommaJoin (map (ppStatic opts) d) <> char ']'- LMStaticStruc d t -> ppr t <> text "<{" <> ppCommaJoin (map (ppStatic opts) d) <> text "}>"- LMStaticStrucU d t -> ppr t <> text "{" <> ppCommaJoin (map (ppStatic opts) d) <> text "}"+ LMUninitType t -> ppLlvmType t <> text " undef"+ LMStaticStr s t -> ppLlvmType t <> text " c\"" <> ftext s <> text "\\00\""+ LMStaticArray d t -> ppLlvmType t <> text " [" <> ppCommaJoin (ppStatic opts) d <> char ']'+ LMStaticStruc d t -> ppLlvmType t <> text "<{" <> ppCommaJoin (ppStatic opts) d <> text "}>"+ LMStaticStrucU d t -> ppLlvmType t <> text "{" <> ppCommaJoin (ppStatic opts) d <> text "}" LMStaticPointer v -> ppVar opts v- LMTrunc v t -> ppr t <> text " trunc (" <> ppStatic opts v <> text " to " <> ppr t <> char ')'- LMBitc v t -> ppr t <> text " bitcast (" <> ppStatic opts v <> text " to " <> ppr t <> char ')'- LMPtoI v t -> ppr t <> text " ptrtoint (" <> ppStatic opts v <> text " to " <> ppr t <> char ')'+ LMTrunc v t -> ppLlvmType t <> text " trunc (" <> ppStatic opts v <> text " to " <> ppLlvmType t <> char ')'+ LMBitc v t -> ppLlvmType t <> text " bitcast (" <> ppStatic opts v <> text " to " <> ppLlvmType t <> char ')'+ LMPtoI v t -> ppLlvmType t <> text " ptrtoint (" <> ppStatic opts v <> text " to " <> ppLlvmType t <> char ')' LMAdd s1 s2 -> pprStaticArith opts s1 s2 (text "add") (text "fadd") (text "LMAdd") LMSub s1 s2 -> pprStaticArith opts s1 s2 (text "sub") (text "fsub") (text "LMSub")+{-# SPECIALIZE ppStatic :: LlvmCgConfig -> LlvmStatic -> SDoc #-}+{-# SPECIALIZE ppStatic :: LlvmCgConfig -> LlvmStatic -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -pprSpecialStatic :: LlvmCgConfig -> LlvmStatic -> SDoc+pprSpecialStatic :: IsLine doc => LlvmCgConfig -> LlvmStatic -> doc pprSpecialStatic opts stat = case stat of- LMBitc v t -> ppr (pLower t)+ LMBitc v t -> ppLlvmType (pLower t) <> text ", bitcast ("- <> ppStatic opts v <> text " to " <> ppr t+ <> ppStatic opts v <> text " to " <> ppLlvmType t <> char ')'- LMStaticPointer x -> ppr (pLower $ getVarType x)+ LMStaticPointer x -> ppLlvmType (pLower $ getVarType x) <> comma <+> ppStatic opts stat _ -> ppStatic opts stat+{-# SPECIALIZE pprSpecialStatic :: LlvmCgConfig -> LlvmStatic -> SDoc #-}+{-# SPECIALIZE pprSpecialStatic :: LlvmCgConfig -> LlvmStatic -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -pprStaticArith :: LlvmCgConfig -> LlvmStatic -> LlvmStatic -> SDoc -> SDoc- -> SDoc -> SDoc+pprStaticArith :: IsLine doc => LlvmCgConfig -> LlvmStatic -> LlvmStatic -> doc -> doc -> SDoc -> doc pprStaticArith opts s1 s2 int_op float_op op_name = let ty1 = getStatType s1 op = if isFloat ty1 then float_op else int_op in if ty1 == getStatType s2- then ppr ty1 <+> op <+> lparen <> ppStatic opts s1 <> comma <> ppStatic opts s2 <> rparen+ then ppLlvmType ty1 <+> op <+> lparen <> ppStatic opts s1 <> comma <> ppStatic opts s2 <> rparen else pprPanic "pprStaticArith" $ op_name <> text " with different types! s1: " <> ppStatic opts s1 <> text", s2: " <> ppStatic opts s2+{-# SPECIALIZE pprStaticArith :: LlvmCgConfig -> LlvmStatic -> LlvmStatic -> SDoc -> SDoc -> SDoc -> SDoc #-}+{-# SPECIALIZE pprStaticArith :: LlvmCgConfig -> LlvmStatic -> LlvmStatic -> HLine -> HLine -> SDoc -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable --------------------------------------------------------------------------------@@ -606,9 +723,13 @@ -------------------------------------------------------------------------------- -- | Blank line.-newLine :: SDoc+newLine :: IsDoc doc => doc newLine = empty+{-# SPECIALIZE newLine :: SDoc #-}+{-# SPECIALIZE newLine :: HDoc #-} -- | Exclamation point.-exclamation :: SDoc+exclamation :: IsLine doc => doc exclamation = char '!'+{-# SPECIALIZE exclamation :: SDoc #-}+{-# SPECIALIZE exclamation :: HLine #-}
GHC/Llvm/Syntax.hs view
@@ -10,6 +10,7 @@ import GHC.Llvm.Types import GHC.Types.Unique+import GHC.Cmm.MachOp ( FMASign(..) ) -- | Block labels type LlvmBlockId = Unique@@ -150,7 +151,7 @@ * value: Variable/Constant to store. * ptr: Location to store the value in -}- | Store LlvmVar LlvmVar LMAlign+ | Store LlvmVar LlvmVar LMAlign [MetaAnnot] {- | Multiway branch@@ -186,11 +187,6 @@ -} | Nop - {- |- A LLVM statement with metadata attached to it.- -}- | MetaStmt [MetaAnnot] LlvmStatement- deriving (Eq) @@ -342,6 +338,8 @@ expression is executed. -} | Asm LMString LMString LlvmType [LlvmVar] Bool Bool++ | FMAOp FMASign LlvmVar LlvmVar LlvmVar {- | A LLVM expression with metadata attached to it.
GHC/Llvm/Types.hs view
@@ -1,6 +1,13 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} +-- Workaround for #21972. It can be removed once the minimal bootstrapping+-- compiler has a fix for this bug.+#if defined(darwin_HOST_OS)+{-# OPTIONS_GHC -fno-asm-shortcutting #-}+#endif+ -------------------------------------------------------------------------------- -- | The LLVM Type System. --@@ -61,28 +68,30 @@ deriving (Eq) instance Outputable LlvmType where- ppr = ppType+ ppr = ppLlvmType -ppType :: LlvmType -> SDoc-ppType t = case t of- LMInt size -> char 'i' <> ppr size+ppLlvmType :: IsLine doc => LlvmType -> doc+ppLlvmType t = case t of+ LMInt size -> char 'i' <> int size LMFloat -> text "float" LMDouble -> text "double" LMFloat80 -> text "x86_fp80" LMFloat128 -> text "fp128"- LMPointer x -> ppr x <> char '*'- LMArray nr tp -> char '[' <> ppr nr <> text " x " <> ppr tp <> char ']'- LMVector nr tp -> char '<' <> ppr nr <> text " x " <> ppr tp <> char '>'+ LMPointer x -> ppLlvmType x <> char '*'+ LMArray nr tp -> char '[' <> int nr <> text " x " <> ppLlvmType tp <> char ']'+ LMVector nr tp -> char '<' <> int nr <> text " x " <> ppLlvmType tp <> char '>' LMLabel -> text "label" LMVoid -> text "void"- LMStruct tys -> text "<{" <> ppCommaJoin tys <> text "}>"- LMStructU tys -> text "{" <> ppCommaJoin tys <> text "}"+ LMStruct tys -> text "<{" <> ppCommaJoin ppLlvmType tys <> text "}>"+ LMStructU tys -> text "{" <> ppCommaJoin ppLlvmType tys <> text "}" LMMetadata -> text "metadata" LMAlias (s,_) -> char '%' <> ftext s LMFunction (LlvmFunctionDecl _ _ _ r varg p _)- -> ppr r <+> lparen <> ppParams varg p <> rparen+ -> ppLlvmType r <+> lparen <> ppParams varg p <> rparen+{-# SPECIALIZE ppLlvmType :: LlvmType -> SDoc #-}+{-# SPECIALIZE ppLlvmType :: LlvmType -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppParams :: LlvmParameterListType -> [LlvmParameter] -> SDoc+ppParams :: IsLine doc => LlvmParameterListType -> [LlvmParameter] -> doc ppParams varg p = let varg' = case varg of VarArgs | null args -> text "..."@@ -90,7 +99,9 @@ _otherwise -> text "" -- by default we don't print param attributes args = map fst p- in ppCommaJoin args <> varg'+ in ppCommaJoin ppLlvmType args <> varg'+{-# SPECIALIZE ppParams :: LlvmParameterListType -> [LlvmParameter] -> SDoc #-}+{-# SPECIALIZE ppParams :: LlvmParameterListType -> [LlvmParameter] -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | An LLVM section definition. If Nothing then let LLVM decide the section type LMSection = Maybe LMString@@ -337,14 +348,6 @@ } deriving (Eq) -instance Outputable LlvmFunctionDecl where- ppr (LlvmFunctionDecl n l c r varg p a)- = let align = case a of- Just a' -> text " align " <> ppr a'- Nothing -> empty- in ppr l <+> ppr c <+> ppr r <+> char '@' <> ftext n <>- lparen <> ppParams varg p <> rparen <> align- type LlvmFunctionDecls = [LlvmFunctionDecl] type LlvmParameter = (LlvmType, [LlvmParamAttr])@@ -385,15 +388,20 @@ deriving (Eq) instance Outputable LlvmParamAttr where- ppr ZeroExt = text "zeroext"- ppr SignExt = text "signext"- ppr InReg = text "inreg"- ppr ByVal = text "byval"- ppr SRet = text "sret"- ppr NoAlias = text "noalias"- ppr NoCapture = text "nocapture"- ppr Nest = text "nest"+ ppr = ppLlvmParamAttr +ppLlvmParamAttr :: IsLine doc => LlvmParamAttr -> doc+ppLlvmParamAttr ZeroExt = text "zeroext"+ppLlvmParamAttr SignExt = text "signext"+ppLlvmParamAttr InReg = text "inreg"+ppLlvmParamAttr ByVal = text "byval"+ppLlvmParamAttr SRet = text "sret"+ppLlvmParamAttr NoAlias = text "noalias"+ppLlvmParamAttr NoCapture = text "nocapture"+ppLlvmParamAttr Nest = text "nest"+{-# SPECIALIZE ppLlvmParamAttr :: LlvmParamAttr -> SDoc #-}+{-# SPECIALIZE ppLlvmParamAttr :: LlvmParamAttr -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable+ -- | Llvm Function Attributes. -- -- Function attributes are set to communicate additional information about a@@ -473,21 +481,26 @@ deriving (Eq) instance Outputable LlvmFuncAttr where- ppr AlwaysInline = text "alwaysinline"- ppr InlineHint = text "inlinehint"- ppr NoInline = text "noinline"- ppr OptSize = text "optsize"- ppr NoReturn = text "noreturn"- ppr NoUnwind = text "nounwind"- ppr ReadNone = text "readnone"- ppr ReadOnly = text "readonly"- ppr Ssp = text "ssp"- ppr SspReq = text "ssqreq"- ppr NoRedZone = text "noredzone"- ppr NoImplicitFloat = text "noimplicitfloat"- ppr Naked = text "naked"+ ppr = ppLlvmFuncAttr +ppLlvmFuncAttr :: IsLine doc => LlvmFuncAttr -> doc+ppLlvmFuncAttr AlwaysInline = text "alwaysinline"+ppLlvmFuncAttr InlineHint = text "inlinehint"+ppLlvmFuncAttr NoInline = text "noinline"+ppLlvmFuncAttr OptSize = text "optsize"+ppLlvmFuncAttr NoReturn = text "noreturn"+ppLlvmFuncAttr NoUnwind = text "nounwind"+ppLlvmFuncAttr ReadNone = text "readnone"+ppLlvmFuncAttr ReadOnly = text "readonly"+ppLlvmFuncAttr Ssp = text "ssp"+ppLlvmFuncAttr SspReq = text "ssqreq"+ppLlvmFuncAttr NoRedZone = text "noredzone"+ppLlvmFuncAttr NoImplicitFloat = text "noimplicitfloat"+ppLlvmFuncAttr Naked = text "naked"+{-# SPECIALIZE ppLlvmFuncAttr :: LlvmFuncAttr -> SDoc #-}+{-# SPECIALIZE ppLlvmFuncAttr :: LlvmFuncAttr -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable + -- | Different types to call a function. data LlvmCallType -- | Normal call, allocate a new stack frame.@@ -533,14 +546,19 @@ deriving (Eq) instance Outputable LlvmCallConvention where- ppr CC_Ccc = text "ccc"- ppr CC_Fastcc = text "fastcc"- ppr CC_Coldcc = text "coldcc"- ppr CC_Ghc = text "ghccc"- ppr (CC_Ncc i) = text "cc " <> ppr i- ppr CC_X86_Stdcc = text "x86_stdcallcc"+ ppr = ppLlvmCallConvention +ppLlvmCallConvention :: IsLine doc => LlvmCallConvention -> doc+ppLlvmCallConvention CC_Ccc = text "ccc"+ppLlvmCallConvention CC_Fastcc = text "fastcc"+ppLlvmCallConvention CC_Coldcc = text "coldcc"+ppLlvmCallConvention CC_Ghc = text "ghccc"+ppLlvmCallConvention (CC_Ncc i) = text "cc " <> int i+ppLlvmCallConvention CC_X86_Stdcc = text "x86_stdcallcc"+{-# SPECIALIZE ppLlvmCallConvention :: LlvmCallConvention -> SDoc #-}+{-# SPECIALIZE ppLlvmCallConvention :: LlvmCallConvention -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable + -- | Functions can have a fixed amount of parameters, or a variable amount. data LlvmParameterListType -- Fixed amount of arguments.@@ -597,18 +615,23 @@ deriving (Eq) instance Outputable LlvmLinkageType where- ppr Internal = text "internal"- ppr LinkOnce = text "linkonce"- ppr Weak = text "weak"- ppr Appending = text "appending"- ppr ExternWeak = text "extern_weak"- -- ExternallyVisible does not have a textual representation, it is- -- the linkage type a function resolves to if no other is specified- -- in Llvm.- ppr ExternallyVisible = empty- ppr External = text "external"- ppr Private = text "private"+ ppr = ppLlvmLinkageType +ppLlvmLinkageType :: IsLine doc => LlvmLinkageType -> doc+ppLlvmLinkageType Internal = text "internal"+ppLlvmLinkageType LinkOnce = text "linkonce"+ppLlvmLinkageType Weak = text "weak"+ppLlvmLinkageType Appending = text "appending"+ppLlvmLinkageType ExternWeak = text "extern_weak"+-- ExternallyVisible does not have a textual representation, it is+-- the linkage type a function resolves to if no other is specified+-- in Llvm.+ppLlvmLinkageType ExternallyVisible = empty+ppLlvmLinkageType External = text "external"+ppLlvmLinkageType Private = text "private"+{-# SPECIALIZE ppLlvmLinkageType :: LlvmLinkageType -> SDoc #-}+{-# SPECIALIZE ppLlvmLinkageType :: LlvmLinkageType -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable+ -- ----------------------------------------------------------------------------- -- * LLVM Operations --@@ -645,26 +668,31 @@ deriving (Eq) instance Outputable LlvmMachOp where- ppr LM_MO_Add = text "add"- ppr LM_MO_Sub = text "sub"- ppr LM_MO_Mul = text "mul"- ppr LM_MO_UDiv = text "udiv"- ppr LM_MO_SDiv = text "sdiv"- ppr LM_MO_URem = text "urem"- ppr LM_MO_SRem = text "srem"- ppr LM_MO_FAdd = text "fadd"- ppr LM_MO_FSub = text "fsub"- ppr LM_MO_FMul = text "fmul"- ppr LM_MO_FDiv = text "fdiv"- ppr LM_MO_FRem = text "frem"- ppr LM_MO_Shl = text "shl"- ppr LM_MO_LShr = text "lshr"- ppr LM_MO_AShr = text "ashr"- ppr LM_MO_And = text "and"- ppr LM_MO_Or = text "or"- ppr LM_MO_Xor = text "xor"+ ppr = ppLlvmMachOp +ppLlvmMachOp :: IsLine doc => LlvmMachOp -> doc+ppLlvmMachOp LM_MO_Add = text "add"+ppLlvmMachOp LM_MO_Sub = text "sub"+ppLlvmMachOp LM_MO_Mul = text "mul"+ppLlvmMachOp LM_MO_UDiv = text "udiv"+ppLlvmMachOp LM_MO_SDiv = text "sdiv"+ppLlvmMachOp LM_MO_URem = text "urem"+ppLlvmMachOp LM_MO_SRem = text "srem"+ppLlvmMachOp LM_MO_FAdd = text "fadd"+ppLlvmMachOp LM_MO_FSub = text "fsub"+ppLlvmMachOp LM_MO_FMul = text "fmul"+ppLlvmMachOp LM_MO_FDiv = text "fdiv"+ppLlvmMachOp LM_MO_FRem = text "frem"+ppLlvmMachOp LM_MO_Shl = text "shl"+ppLlvmMachOp LM_MO_LShr = text "lshr"+ppLlvmMachOp LM_MO_AShr = text "ashr"+ppLlvmMachOp LM_MO_And = text "and"+ppLlvmMachOp LM_MO_Or = text "or"+ppLlvmMachOp LM_MO_Xor = text "xor"+{-# SPECIALIZE ppLlvmMachOp :: LlvmMachOp -> SDoc #-}+{-# SPECIALIZE ppLlvmMachOp :: LlvmMachOp -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable + -- | Llvm compare operations. data LlvmCmpOp = LM_CMP_Eq -- ^ Equal (Signed and Unsigned)@@ -689,24 +717,29 @@ deriving (Eq) instance Outputable LlvmCmpOp where- ppr LM_CMP_Eq = text "eq"- ppr LM_CMP_Ne = text "ne"- ppr LM_CMP_Ugt = text "ugt"- ppr LM_CMP_Uge = text "uge"- ppr LM_CMP_Ult = text "ult"- ppr LM_CMP_Ule = text "ule"- ppr LM_CMP_Sgt = text "sgt"- ppr LM_CMP_Sge = text "sge"- ppr LM_CMP_Slt = text "slt"- ppr LM_CMP_Sle = text "sle"- ppr LM_CMP_Feq = text "oeq"- ppr LM_CMP_Fne = text "une"- ppr LM_CMP_Fgt = text "ogt"- ppr LM_CMP_Fge = text "oge"- ppr LM_CMP_Flt = text "olt"- ppr LM_CMP_Fle = text "ole"+ ppr = ppLlvmCmpOp +ppLlvmCmpOp :: IsLine doc => LlvmCmpOp -> doc+ppLlvmCmpOp LM_CMP_Eq = text "eq"+ppLlvmCmpOp LM_CMP_Ne = text "ne"+ppLlvmCmpOp LM_CMP_Ugt = text "ugt"+ppLlvmCmpOp LM_CMP_Uge = text "uge"+ppLlvmCmpOp LM_CMP_Ult = text "ult"+ppLlvmCmpOp LM_CMP_Ule = text "ule"+ppLlvmCmpOp LM_CMP_Sgt = text "sgt"+ppLlvmCmpOp LM_CMP_Sge = text "sge"+ppLlvmCmpOp LM_CMP_Slt = text "slt"+ppLlvmCmpOp LM_CMP_Sle = text "sle"+ppLlvmCmpOp LM_CMP_Feq = text "oeq"+ppLlvmCmpOp LM_CMP_Fne = text "une"+ppLlvmCmpOp LM_CMP_Fgt = text "ogt"+ppLlvmCmpOp LM_CMP_Fge = text "oge"+ppLlvmCmpOp LM_CMP_Flt = text "olt"+ppLlvmCmpOp LM_CMP_Fle = text "ole"+{-# SPECIALIZE ppLlvmCmpOp :: LlvmCmpOp -> SDoc #-}+{-# SPECIALIZE ppLlvmCmpOp :: LlvmCmpOp -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable + -- | Llvm cast operations. data LlvmCastOp = LM_Trunc -- ^ Integer truncate@@ -724,19 +757,23 @@ deriving (Eq) instance Outputable LlvmCastOp where- ppr LM_Trunc = text "trunc"- ppr LM_Zext = text "zext"- ppr LM_Sext = text "sext"- ppr LM_Fptrunc = text "fptrunc"- ppr LM_Fpext = text "fpext"- ppr LM_Fptoui = text "fptoui"- ppr LM_Fptosi = text "fptosi"- ppr LM_Uitofp = text "uitofp"- ppr LM_Sitofp = text "sitofp"- ppr LM_Ptrtoint = text "ptrtoint"- ppr LM_Inttoptr = text "inttoptr"- ppr LM_Bitcast = text "bitcast"+ ppr = ppLlvmCastOp +ppLlvmCastOp :: IsLine doc => LlvmCastOp -> doc+ppLlvmCastOp LM_Trunc = text "trunc"+ppLlvmCastOp LM_Zext = text "zext"+ppLlvmCastOp LM_Sext = text "sext"+ppLlvmCastOp LM_Fptrunc = text "fptrunc"+ppLlvmCastOp LM_Fpext = text "fpext"+ppLlvmCastOp LM_Fptoui = text "fptoui"+ppLlvmCastOp LM_Fptosi = text "fptosi"+ppLlvmCastOp LM_Uitofp = text "uitofp"+ppLlvmCastOp LM_Sitofp = text "sitofp"+ppLlvmCastOp LM_Ptrtoint = text "ptrtoint"+ppLlvmCastOp LM_Inttoptr = text "inttoptr"+ppLlvmCastOp LM_Bitcast = text "bitcast"+{-# SPECIALIZE ppLlvmCastOp :: LlvmCastOp -> SDoc #-}+{-# SPECIALIZE ppLlvmCastOp :: LlvmCastOp -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- ----------------------------------------------------------------------------- -- * Floating point conversion@@ -747,7 +784,7 @@ -- regardless of underlying architecture. -- -- See Note [LLVM Float Types].-ppDouble :: Platform -> Double -> SDoc+ppDouble :: IsLine doc => Platform -> Double -> doc ppDouble platform d = let bs = doubleToBytes d hex d' = case showHex d' "" of@@ -761,6 +798,8 @@ LittleEndian -> reverse str = map toUpper $ concat $ fixEndian $ map hex bs in text "0x" <> text str+{-# SPECIALIZE ppDouble :: Platform -> Double -> SDoc #-}+{-# SPECIALIZE ppDouble :: Platform -> Double -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- Note [LLVM Float Types] -- ~~~~~~~~~~~~~~~~~~~~~~~@@ -787,16 +826,22 @@ {-# NOINLINE widenFp #-} widenFp = float2Double -ppFloat :: Platform -> Float -> SDoc+ppFloat :: IsLine doc => Platform -> Float -> doc ppFloat platform = ppDouble platform . widenFp+{-# SPECIALIZE ppFloat :: Platform -> Float -> SDoc #-}+{-# SPECIALIZE ppFloat :: Platform -> Float -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -------------------------------------------------------------------------------- -- * Misc functions -------------------------------------------------------------------------------- -ppCommaJoin :: (Outputable a) => [a] -> SDoc-ppCommaJoin strs = hsep $ punctuate comma (map ppr strs)+ppCommaJoin :: IsLine doc => (a -> doc) -> [a] -> doc+ppCommaJoin ppr strs = hsep $ punctuate comma (map ppr strs)+{-# SPECIALIZE ppCommaJoin :: (a -> SDoc) -> [a] -> SDoc #-}+{-# SPECIALIZE ppCommaJoin :: (a -> HLine) -> [a] -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -ppSpaceJoin :: (Outputable a) => [a] -> SDoc-ppSpaceJoin strs = hsep (map ppr strs)+ppSpaceJoin :: IsLine doc => (a -> doc) -> [a] -> doc+ppSpaceJoin ppr strs = hsep (map ppr strs)+{-# SPECIALIZE ppSpaceJoin :: (a -> SDoc) -> [a] -> SDoc #-}+{-# SPECIALIZE ppSpaceJoin :: (a -> HLine) -> [a] -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable
GHC/Parser.hs view
@@ -100,12817 +100,13149 @@ import Control.Applicative(Applicative(..)) import Control.Monad (ap) --- parser produced by Happy Version 1.20.0--newtype HappyAbsSyn = HappyAbsSyn HappyAny-#if __GLASGOW_HASKELL__ >= 607-type HappyAny = Happy_GHC_Exts.Any-#else-type HappyAny = forall a . a-#endif-newtype HappyWrap16 = HappyWrap16 (LocatedN RdrName)-happyIn16 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn16 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap16 x)-{-# INLINE happyIn16 #-}-happyOut16 :: (HappyAbsSyn ) -> HappyWrap16-happyOut16 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut16 #-}-newtype HappyWrap17 = HappyWrap17 ([LHsUnit PackageName])-happyIn17 :: ([LHsUnit PackageName]) -> (HappyAbsSyn )-happyIn17 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap17 x)-{-# INLINE happyIn17 #-}-happyOut17 :: (HappyAbsSyn ) -> HappyWrap17-happyOut17 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut17 #-}-newtype HappyWrap18 = HappyWrap18 (OrdList (LHsUnit PackageName))-happyIn18 :: (OrdList (LHsUnit PackageName)) -> (HappyAbsSyn )-happyIn18 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap18 x)-{-# INLINE happyIn18 #-}-happyOut18 :: (HappyAbsSyn ) -> HappyWrap18-happyOut18 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut18 #-}-newtype HappyWrap19 = HappyWrap19 (LHsUnit PackageName)-happyIn19 :: (LHsUnit PackageName) -> (HappyAbsSyn )-happyIn19 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap19 x)-{-# INLINE happyIn19 #-}-happyOut19 :: (HappyAbsSyn ) -> HappyWrap19-happyOut19 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut19 #-}-newtype HappyWrap20 = HappyWrap20 (LHsUnitId PackageName)-happyIn20 :: (LHsUnitId PackageName) -> (HappyAbsSyn )-happyIn20 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap20 x)-{-# INLINE happyIn20 #-}-happyOut20 :: (HappyAbsSyn ) -> HappyWrap20-happyOut20 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut20 #-}-newtype HappyWrap21 = HappyWrap21 (OrdList (LHsModuleSubst PackageName))-happyIn21 :: (OrdList (LHsModuleSubst PackageName)) -> (HappyAbsSyn )-happyIn21 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap21 x)-{-# INLINE happyIn21 #-}-happyOut21 :: (HappyAbsSyn ) -> HappyWrap21-happyOut21 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut21 #-}-newtype HappyWrap22 = HappyWrap22 (LHsModuleSubst PackageName)-happyIn22 :: (LHsModuleSubst PackageName) -> (HappyAbsSyn )-happyIn22 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap22 x)-{-# INLINE happyIn22 #-}-happyOut22 :: (HappyAbsSyn ) -> HappyWrap22-happyOut22 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut22 #-}-newtype HappyWrap23 = HappyWrap23 (LHsModuleId PackageName)-happyIn23 :: (LHsModuleId PackageName) -> (HappyAbsSyn )-happyIn23 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap23 x)-{-# INLINE happyIn23 #-}-happyOut23 :: (HappyAbsSyn ) -> HappyWrap23-happyOut23 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut23 #-}-newtype HappyWrap24 = HappyWrap24 (Located PackageName)-happyIn24 :: (Located PackageName) -> (HappyAbsSyn )-happyIn24 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap24 x)-{-# INLINE happyIn24 #-}-happyOut24 :: (HappyAbsSyn ) -> HappyWrap24-happyOut24 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut24 #-}-newtype HappyWrap25 = HappyWrap25 (Located FastString)-happyIn25 :: (Located FastString) -> (HappyAbsSyn )-happyIn25 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap25 x)-{-# INLINE happyIn25 #-}-happyOut25 :: (HappyAbsSyn ) -> HappyWrap25-happyOut25 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut25 #-}-newtype HappyWrap26 = HappyWrap26 ([AddEpAnn])-happyIn26 :: ([AddEpAnn]) -> (HappyAbsSyn )-happyIn26 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap26 x)-{-# INLINE happyIn26 #-}-happyOut26 :: (HappyAbsSyn ) -> HappyWrap26-happyOut26 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut26 #-}-newtype HappyWrap27 = HappyWrap27 (Located FastString)-happyIn27 :: (Located FastString) -> (HappyAbsSyn )-happyIn27 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap27 x)-{-# INLINE happyIn27 #-}-happyOut27 :: (HappyAbsSyn ) -> HappyWrap27-happyOut27 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut27 #-}-newtype HappyWrap28 = HappyWrap28 (Maybe [LRenaming])-happyIn28 :: (Maybe [LRenaming]) -> (HappyAbsSyn )-happyIn28 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap28 x)-{-# INLINE happyIn28 #-}-happyOut28 :: (HappyAbsSyn ) -> HappyWrap28-happyOut28 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut28 #-}-newtype HappyWrap29 = HappyWrap29 (OrdList LRenaming)-happyIn29 :: (OrdList LRenaming) -> (HappyAbsSyn )-happyIn29 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap29 x)-{-# INLINE happyIn29 #-}-happyOut29 :: (HappyAbsSyn ) -> HappyWrap29-happyOut29 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut29 #-}-newtype HappyWrap30 = HappyWrap30 (LRenaming)-happyIn30 :: (LRenaming) -> (HappyAbsSyn )-happyIn30 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap30 x)-{-# INLINE happyIn30 #-}-happyOut30 :: (HappyAbsSyn ) -> HappyWrap30-happyOut30 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut30 #-}-newtype HappyWrap31 = HappyWrap31 (OrdList (LHsUnitDecl PackageName))-happyIn31 :: (OrdList (LHsUnitDecl PackageName)) -> (HappyAbsSyn )-happyIn31 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap31 x)-{-# INLINE happyIn31 #-}-happyOut31 :: (HappyAbsSyn ) -> HappyWrap31-happyOut31 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut31 #-}-newtype HappyWrap32 = HappyWrap32 (OrdList (LHsUnitDecl PackageName))-happyIn32 :: (OrdList (LHsUnitDecl PackageName)) -> (HappyAbsSyn )-happyIn32 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap32 x)-{-# INLINE happyIn32 #-}-happyOut32 :: (HappyAbsSyn ) -> HappyWrap32-happyOut32 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut32 #-}-newtype HappyWrap33 = HappyWrap33 (LHsUnitDecl PackageName)-happyIn33 :: (LHsUnitDecl PackageName) -> (HappyAbsSyn )-happyIn33 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap33 x)-{-# INLINE happyIn33 #-}-happyOut33 :: (HappyAbsSyn ) -> HappyWrap33-happyOut33 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut33 #-}-newtype HappyWrap34 = HappyWrap34 (Located (HsModule GhcPs))-happyIn34 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )-happyIn34 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap34 x)-{-# INLINE happyIn34 #-}-happyOut34 :: (HappyAbsSyn ) -> HappyWrap34-happyOut34 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut34 #-}-newtype HappyWrap35 = HappyWrap35 (Located (HsModule GhcPs))-happyIn35 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )-happyIn35 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap35 x)-{-# INLINE happyIn35 #-}-happyOut35 :: (HappyAbsSyn ) -> HappyWrap35-happyOut35 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut35 #-}-newtype HappyWrap36 = HappyWrap36 (())-happyIn36 :: (()) -> (HappyAbsSyn )-happyIn36 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap36 x)-{-# INLINE happyIn36 #-}-happyOut36 :: (HappyAbsSyn ) -> HappyWrap36-happyOut36 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut36 #-}-newtype HappyWrap37 = HappyWrap37 (())-happyIn37 :: (()) -> (HappyAbsSyn )-happyIn37 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap37 x)-{-# INLINE happyIn37 #-}-happyOut37 :: (HappyAbsSyn ) -> HappyWrap37-happyOut37 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut37 #-}-newtype HappyWrap38 = HappyWrap38 (Maybe (LocatedP (WarningTxt GhcPs)))-happyIn38 :: (Maybe (LocatedP (WarningTxt GhcPs))) -> (HappyAbsSyn )-happyIn38 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap38 x)-{-# INLINE happyIn38 #-}-happyOut38 :: (HappyAbsSyn ) -> HappyWrap38-happyOut38 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut38 #-}-newtype HappyWrap39 = HappyWrap39 ((AnnList- ,([LImportDecl GhcPs], [LHsDecl GhcPs])- ,LayoutInfo GhcPs))-happyIn39 :: ((AnnList- ,([LImportDecl GhcPs], [LHsDecl GhcPs])- ,LayoutInfo GhcPs)) -> (HappyAbsSyn )-happyIn39 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap39 x)-{-# INLINE happyIn39 #-}-happyOut39 :: (HappyAbsSyn ) -> HappyWrap39-happyOut39 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut39 #-}-newtype HappyWrap40 = HappyWrap40 ((AnnList- ,([LImportDecl GhcPs], [LHsDecl GhcPs])- ,LayoutInfo GhcPs))-happyIn40 :: ((AnnList- ,([LImportDecl GhcPs], [LHsDecl GhcPs])- ,LayoutInfo GhcPs)) -> (HappyAbsSyn )-happyIn40 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap40 x)-{-# INLINE happyIn40 #-}-happyOut40 :: (HappyAbsSyn ) -> HappyWrap40-happyOut40 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut40 #-}-newtype HappyWrap41 = HappyWrap41 (([TrailingAnn]- ,([LImportDecl GhcPs], [LHsDecl GhcPs])))-happyIn41 :: (([TrailingAnn]- ,([LImportDecl GhcPs], [LHsDecl GhcPs]))) -> (HappyAbsSyn )-happyIn41 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap41 x)-{-# INLINE happyIn41 #-}-happyOut41 :: (HappyAbsSyn ) -> HappyWrap41-happyOut41 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut41 #-}-newtype HappyWrap42 = HappyWrap42 (([LImportDecl GhcPs], [LHsDecl GhcPs]))-happyIn42 :: (([LImportDecl GhcPs], [LHsDecl GhcPs])) -> (HappyAbsSyn )-happyIn42 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap42 x)-{-# INLINE happyIn42 #-}-happyOut42 :: (HappyAbsSyn ) -> HappyWrap42-happyOut42 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut42 #-}-newtype HappyWrap43 = HappyWrap43 (Located (HsModule GhcPs))-happyIn43 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )-happyIn43 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap43 x)-{-# INLINE happyIn43 #-}-happyOut43 :: (HappyAbsSyn ) -> HappyWrap43-happyOut43 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut43 #-}-newtype HappyWrap44 = HappyWrap44 ([LImportDecl GhcPs])-happyIn44 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn44 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap44 x)-{-# INLINE happyIn44 #-}-happyOut44 :: (HappyAbsSyn ) -> HappyWrap44-happyOut44 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut44 #-}-newtype HappyWrap45 = HappyWrap45 ([LImportDecl GhcPs])-happyIn45 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn45 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap45 x)-{-# INLINE happyIn45 #-}-happyOut45 :: (HappyAbsSyn ) -> HappyWrap45-happyOut45 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut45 #-}-newtype HappyWrap46 = HappyWrap46 ([LImportDecl GhcPs])-happyIn46 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn46 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap46 x)-{-# INLINE happyIn46 #-}-happyOut46 :: (HappyAbsSyn ) -> HappyWrap46-happyOut46 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut46 #-}-newtype HappyWrap47 = HappyWrap47 ([LImportDecl GhcPs])-happyIn47 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn47 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap47 x)-{-# INLINE happyIn47 #-}-happyOut47 :: (HappyAbsSyn ) -> HappyWrap47-happyOut47 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut47 #-}-newtype HappyWrap48 = HappyWrap48 ((Maybe (LocatedL [LIE GhcPs])))-happyIn48 :: ((Maybe (LocatedL [LIE GhcPs]))) -> (HappyAbsSyn )-happyIn48 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap48 x)-{-# INLINE happyIn48 #-}-happyOut48 :: (HappyAbsSyn ) -> HappyWrap48-happyOut48 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut48 #-}-newtype HappyWrap49 = HappyWrap49 (([AddEpAnn], OrdList (LIE GhcPs)))-happyIn49 :: (([AddEpAnn], OrdList (LIE GhcPs))) -> (HappyAbsSyn )-happyIn49 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap49 x)-{-# INLINE happyIn49 #-}-happyOut49 :: (HappyAbsSyn ) -> HappyWrap49-happyOut49 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut49 #-}-newtype HappyWrap50 = HappyWrap50 (OrdList (LIE GhcPs))-happyIn50 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )-happyIn50 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap50 x)-{-# INLINE happyIn50 #-}-happyOut50 :: (HappyAbsSyn ) -> HappyWrap50-happyOut50 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut50 #-}-newtype HappyWrap51 = HappyWrap51 (OrdList (LIE GhcPs))-happyIn51 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )-happyIn51 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap51 x)-{-# INLINE happyIn51 #-}-happyOut51 :: (HappyAbsSyn ) -> HappyWrap51-happyOut51 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut51 #-}-newtype HappyWrap52 = HappyWrap52 (Located ([AddEpAnn],ImpExpSubSpec))-happyIn52 :: (Located ([AddEpAnn],ImpExpSubSpec)) -> (HappyAbsSyn )-happyIn52 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap52 x)-{-# INLINE happyIn52 #-}-happyOut52 :: (HappyAbsSyn ) -> HappyWrap52-happyOut52 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut52 #-}-newtype HappyWrap53 = HappyWrap53 (([AddEpAnn], [LocatedA ImpExpQcSpec]))-happyIn53 :: (([AddEpAnn], [LocatedA ImpExpQcSpec])) -> (HappyAbsSyn )-happyIn53 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap53 x)-{-# INLINE happyIn53 #-}-happyOut53 :: (HappyAbsSyn ) -> HappyWrap53-happyOut53 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut53 #-}-newtype HappyWrap54 = HappyWrap54 (([AddEpAnn], [LocatedA ImpExpQcSpec]))-happyIn54 :: (([AddEpAnn], [LocatedA ImpExpQcSpec])) -> (HappyAbsSyn )-happyIn54 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap54 x)-{-# INLINE happyIn54 #-}-happyOut54 :: (HappyAbsSyn ) -> HappyWrap54-happyOut54 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut54 #-}-newtype HappyWrap55 = HappyWrap55 (Located ([AddEpAnn], LocatedA ImpExpQcSpec))-happyIn55 :: (Located ([AddEpAnn], LocatedA ImpExpQcSpec)) -> (HappyAbsSyn )-happyIn55 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap55 x)-{-# INLINE happyIn55 #-}-happyOut55 :: (HappyAbsSyn ) -> HappyWrap55-happyOut55 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut55 #-}-newtype HappyWrap56 = HappyWrap56 (LocatedA ImpExpQcSpec)-happyIn56 :: (LocatedA ImpExpQcSpec) -> (HappyAbsSyn )-happyIn56 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap56 x)-{-# INLINE happyIn56 #-}-happyOut56 :: (HappyAbsSyn ) -> HappyWrap56-happyOut56 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut56 #-}-newtype HappyWrap57 = HappyWrap57 (LocatedN RdrName)-happyIn57 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn57 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap57 x)-{-# INLINE happyIn57 #-}-happyOut57 :: (HappyAbsSyn ) -> HappyWrap57-happyOut57 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut57 #-}-newtype HappyWrap58 = HappyWrap58 (Located [TrailingAnn])-happyIn58 :: (Located [TrailingAnn]) -> (HappyAbsSyn )-happyIn58 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap58 x)-{-# INLINE happyIn58 #-}-happyOut58 :: (HappyAbsSyn ) -> HappyWrap58-happyOut58 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut58 #-}-newtype HappyWrap59 = HappyWrap59 ([TrailingAnn])-happyIn59 :: ([TrailingAnn]) -> (HappyAbsSyn )-happyIn59 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap59 x)-{-# INLINE happyIn59 #-}-happyOut59 :: (HappyAbsSyn ) -> HappyWrap59-happyOut59 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut59 #-}-newtype HappyWrap60 = HappyWrap60 ([LImportDecl GhcPs])-happyIn60 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn60 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap60 x)-{-# INLINE happyIn60 #-}-happyOut60 :: (HappyAbsSyn ) -> HappyWrap60-happyOut60 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut60 #-}-newtype HappyWrap61 = HappyWrap61 ([LImportDecl GhcPs])-happyIn61 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn61 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap61 x)-{-# INLINE happyIn61 #-}-happyOut61 :: (HappyAbsSyn ) -> HappyWrap61-happyOut61 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut61 #-}-newtype HappyWrap62 = HappyWrap62 (LImportDecl GhcPs)-happyIn62 :: (LImportDecl GhcPs) -> (HappyAbsSyn )-happyIn62 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap62 x)-{-# INLINE happyIn62 #-}-happyOut62 :: (HappyAbsSyn ) -> HappyWrap62-happyOut62 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut62 #-}-newtype HappyWrap63 = HappyWrap63 (((Maybe (EpaLocation,EpaLocation),SourceText),IsBootInterface))-happyIn63 :: (((Maybe (EpaLocation,EpaLocation),SourceText),IsBootInterface)) -> (HappyAbsSyn )-happyIn63 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap63 x)-{-# INLINE happyIn63 #-}-happyOut63 :: (HappyAbsSyn ) -> HappyWrap63-happyOut63 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut63 #-}-newtype HappyWrap64 = HappyWrap64 ((Maybe EpaLocation,Bool))-happyIn64 :: ((Maybe EpaLocation,Bool)) -> (HappyAbsSyn )-happyIn64 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap64 x)-{-# INLINE happyIn64 #-}-happyOut64 :: (HappyAbsSyn ) -> HappyWrap64-happyOut64 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut64 #-}-newtype HappyWrap65 = HappyWrap65 ((Maybe EpaLocation, RawPkgQual))-happyIn65 :: ((Maybe EpaLocation, RawPkgQual)) -> (HappyAbsSyn )-happyIn65 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap65 x)-{-# INLINE happyIn65 #-}-happyOut65 :: (HappyAbsSyn ) -> HappyWrap65-happyOut65 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut65 #-}-newtype HappyWrap66 = HappyWrap66 (Located (Maybe EpaLocation))-happyIn66 :: (Located (Maybe EpaLocation)) -> (HappyAbsSyn )-happyIn66 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap66 x)-{-# INLINE happyIn66 #-}-happyOut66 :: (HappyAbsSyn ) -> HappyWrap66-happyOut66 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut66 #-}-newtype HappyWrap67 = HappyWrap67 ((Maybe EpaLocation,Located (Maybe (LocatedA ModuleName))))-happyIn67 :: ((Maybe EpaLocation,Located (Maybe (LocatedA ModuleName)))) -> (HappyAbsSyn )-happyIn67 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap67 x)-{-# INLINE happyIn67 #-}-happyOut67 :: (HappyAbsSyn ) -> HappyWrap67-happyOut67 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut67 #-}-newtype HappyWrap68 = HappyWrap68 (Located (Maybe (ImportListInterpretation, LocatedL [LIE GhcPs])))-happyIn68 :: (Located (Maybe (ImportListInterpretation, LocatedL [LIE GhcPs]))) -> (HappyAbsSyn )-happyIn68 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap68 x)-{-# INLINE happyIn68 #-}-happyOut68 :: (HappyAbsSyn ) -> HappyWrap68-happyOut68 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut68 #-}-newtype HappyWrap69 = HappyWrap69 (Located (ImportListInterpretation, LocatedL [LIE GhcPs]))-happyIn69 :: (Located (ImportListInterpretation, LocatedL [LIE GhcPs])) -> (HappyAbsSyn )-happyIn69 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap69 x)-{-# INLINE happyIn69 #-}-happyOut69 :: (HappyAbsSyn ) -> HappyWrap69-happyOut69 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut69 #-}-newtype HappyWrap70 = HappyWrap70 (Maybe (Located (SourceText,Int)))-happyIn70 :: (Maybe (Located (SourceText,Int))) -> (HappyAbsSyn )-happyIn70 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap70 x)-{-# INLINE happyIn70 #-}-happyOut70 :: (HappyAbsSyn ) -> HappyWrap70-happyOut70 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut70 #-}-newtype HappyWrap71 = HappyWrap71 (Located FixityDirection)-happyIn71 :: (Located FixityDirection) -> (HappyAbsSyn )-happyIn71 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap71 x)-{-# INLINE happyIn71 #-}-happyOut71 :: (HappyAbsSyn ) -> HappyWrap71-happyOut71 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut71 #-}-newtype HappyWrap72 = HappyWrap72 (Located (OrdList (LocatedN RdrName)))-happyIn72 :: (Located (OrdList (LocatedN RdrName))) -> (HappyAbsSyn )-happyIn72 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap72 x)-{-# INLINE happyIn72 #-}-happyOut72 :: (HappyAbsSyn ) -> HappyWrap72-happyOut72 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut72 #-}-newtype HappyWrap73 = HappyWrap73 (OrdList (LHsDecl GhcPs))-happyIn73 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )-happyIn73 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap73 x)-{-# INLINE happyIn73 #-}-happyOut73 :: (HappyAbsSyn ) -> HappyWrap73-happyOut73 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut73 #-}-newtype HappyWrap74 = HappyWrap74 (OrdList (LHsDecl GhcPs))-happyIn74 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )-happyIn74 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap74 x)-{-# INLINE happyIn74 #-}-happyOut74 :: (HappyAbsSyn ) -> HappyWrap74-happyOut74 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut74 #-}-newtype HappyWrap75 = HappyWrap75 (OrdList (LHsDecl GhcPs))-happyIn75 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )-happyIn75 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap75 x)-{-# INLINE happyIn75 #-}-happyOut75 :: (HappyAbsSyn ) -> HappyWrap75-happyOut75 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut75 #-}-newtype HappyWrap76 = HappyWrap76 (OrdList (LHsDecl GhcPs))-happyIn76 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )-happyIn76 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap76 x)-{-# INLINE happyIn76 #-}-happyOut76 :: (HappyAbsSyn ) -> HappyWrap76-happyOut76 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut76 #-}-newtype HappyWrap77 = HappyWrap77 (LHsDecl GhcPs)-happyIn77 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn77 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap77 x)-{-# INLINE happyIn77 #-}-happyOut77 :: (HappyAbsSyn ) -> HappyWrap77-happyOut77 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut77 #-}-newtype HappyWrap78 = HappyWrap78 (LHsDecl GhcPs)-happyIn78 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn78 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap78 x)-{-# INLINE happyIn78 #-}-happyOut78 :: (HappyAbsSyn ) -> HappyWrap78-happyOut78 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut78 #-}-newtype HappyWrap79 = HappyWrap79 (LTyClDecl GhcPs)-happyIn79 :: (LTyClDecl GhcPs) -> (HappyAbsSyn )-happyIn79 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap79 x)-{-# INLINE happyIn79 #-}-happyOut79 :: (HappyAbsSyn ) -> HappyWrap79-happyOut79 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut79 #-}-newtype HappyWrap80 = HappyWrap80 (LTyClDecl GhcPs)-happyIn80 :: (LTyClDecl GhcPs) -> (HappyAbsSyn )-happyIn80 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap80 x)-{-# INLINE happyIn80 #-}-happyOut80 :: (HappyAbsSyn ) -> HappyWrap80-happyOut80 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut80 #-}-newtype HappyWrap81 = HappyWrap81 (LStandaloneKindSig GhcPs)-happyIn81 :: (LStandaloneKindSig GhcPs) -> (HappyAbsSyn )-happyIn81 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap81 x)-{-# INLINE happyIn81 #-}-happyOut81 :: (HappyAbsSyn ) -> HappyWrap81-happyOut81 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut81 #-}-newtype HappyWrap82 = HappyWrap82 (Located [LocatedN RdrName])-happyIn82 :: (Located [LocatedN RdrName]) -> (HappyAbsSyn )-happyIn82 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap82 x)-{-# INLINE happyIn82 #-}-happyOut82 :: (HappyAbsSyn ) -> HappyWrap82-happyOut82 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut82 #-}-newtype HappyWrap83 = HappyWrap83 (LInstDecl GhcPs)-happyIn83 :: (LInstDecl GhcPs) -> (HappyAbsSyn )-happyIn83 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap83 x)-{-# INLINE happyIn83 #-}-happyOut83 :: (HappyAbsSyn ) -> HappyWrap83-happyOut83 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut83 #-}-newtype HappyWrap84 = HappyWrap84 (Maybe (LocatedP OverlapMode))-happyIn84 :: (Maybe (LocatedP OverlapMode)) -> (HappyAbsSyn )-happyIn84 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap84 x)-{-# INLINE happyIn84 #-}-happyOut84 :: (HappyAbsSyn ) -> HappyWrap84-happyOut84 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut84 #-}-newtype HappyWrap85 = HappyWrap85 (LDerivStrategy GhcPs)-happyIn85 :: (LDerivStrategy GhcPs) -> (HappyAbsSyn )-happyIn85 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap85 x)-{-# INLINE happyIn85 #-}-happyOut85 :: (HappyAbsSyn ) -> HappyWrap85-happyOut85 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut85 #-}-newtype HappyWrap86 = HappyWrap86 (LDerivStrategy GhcPs)-happyIn86 :: (LDerivStrategy GhcPs) -> (HappyAbsSyn )-happyIn86 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap86 x)-{-# INLINE happyIn86 #-}-happyOut86 :: (HappyAbsSyn ) -> HappyWrap86-happyOut86 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut86 #-}-newtype HappyWrap87 = HappyWrap87 (Maybe (LDerivStrategy GhcPs))-happyIn87 :: (Maybe (LDerivStrategy GhcPs)) -> (HappyAbsSyn )-happyIn87 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap87 x)-{-# INLINE happyIn87 #-}-happyOut87 :: (HappyAbsSyn ) -> HappyWrap87-happyOut87 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut87 #-}-newtype HappyWrap88 = HappyWrap88 (Located ([AddEpAnn], Maybe (LInjectivityAnn GhcPs)))-happyIn88 :: (Located ([AddEpAnn], Maybe (LInjectivityAnn GhcPs))) -> (HappyAbsSyn )-happyIn88 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap88 x)-{-# INLINE happyIn88 #-}-happyOut88 :: (HappyAbsSyn ) -> HappyWrap88-happyOut88 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut88 #-}-newtype HappyWrap89 = HappyWrap89 (LInjectivityAnn GhcPs)-happyIn89 :: (LInjectivityAnn GhcPs) -> (HappyAbsSyn )-happyIn89 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap89 x)-{-# INLINE happyIn89 #-}-happyOut89 :: (HappyAbsSyn ) -> HappyWrap89-happyOut89 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut89 #-}-newtype HappyWrap90 = HappyWrap90 (Located [LocatedN RdrName])-happyIn90 :: (Located [LocatedN RdrName]) -> (HappyAbsSyn )-happyIn90 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap90 x)-{-# INLINE happyIn90 #-}-happyOut90 :: (HappyAbsSyn ) -> HappyWrap90-happyOut90 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut90 #-}-newtype HappyWrap91 = HappyWrap91 (Located ([AddEpAnn],FamilyInfo GhcPs))-happyIn91 :: (Located ([AddEpAnn],FamilyInfo GhcPs)) -> (HappyAbsSyn )-happyIn91 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap91 x)-{-# INLINE happyIn91 #-}-happyOut91 :: (HappyAbsSyn ) -> HappyWrap91-happyOut91 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut91 #-}-newtype HappyWrap92 = HappyWrap92 (Located ([AddEpAnn],Maybe [LTyFamInstEqn GhcPs]))-happyIn92 :: (Located ([AddEpAnn],Maybe [LTyFamInstEqn GhcPs])) -> (HappyAbsSyn )-happyIn92 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap92 x)-{-# INLINE happyIn92 #-}-happyOut92 :: (HappyAbsSyn ) -> HappyWrap92-happyOut92 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut92 #-}-newtype HappyWrap93 = HappyWrap93 (Located [LTyFamInstEqn GhcPs])-happyIn93 :: (Located [LTyFamInstEqn GhcPs]) -> (HappyAbsSyn )-happyIn93 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap93 x)-{-# INLINE happyIn93 #-}-happyOut93 :: (HappyAbsSyn ) -> HappyWrap93-happyOut93 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut93 #-}-newtype HappyWrap94 = HappyWrap94 (LTyFamInstEqn GhcPs)-happyIn94 :: (LTyFamInstEqn GhcPs) -> (HappyAbsSyn )-happyIn94 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap94 x)-{-# INLINE happyIn94 #-}-happyOut94 :: (HappyAbsSyn ) -> HappyWrap94-happyOut94 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut94 #-}-newtype HappyWrap95 = HappyWrap95 (LHsDecl GhcPs)-happyIn95 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn95 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap95 x)-{-# INLINE happyIn95 #-}-happyOut95 :: (HappyAbsSyn ) -> HappyWrap95-happyOut95 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut95 #-}-newtype HappyWrap96 = HappyWrap96 ([AddEpAnn])-happyIn96 :: ([AddEpAnn]) -> (HappyAbsSyn )-happyIn96 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap96 x)-{-# INLINE happyIn96 #-}-happyOut96 :: (HappyAbsSyn ) -> HappyWrap96-happyOut96 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut96 #-}-newtype HappyWrap97 = HappyWrap97 ([AddEpAnn])-happyIn97 :: ([AddEpAnn]) -> (HappyAbsSyn )-happyIn97 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap97 x)-{-# INLINE happyIn97 #-}-happyOut97 :: (HappyAbsSyn ) -> HappyWrap97-happyOut97 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut97 #-}-newtype HappyWrap98 = HappyWrap98 (LInstDecl GhcPs)-happyIn98 :: (LInstDecl GhcPs) -> (HappyAbsSyn )-happyIn98 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap98 x)-{-# INLINE happyIn98 #-}-happyOut98 :: (HappyAbsSyn ) -> HappyWrap98-happyOut98 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut98 #-}-newtype HappyWrap99 = HappyWrap99 (Located ([AddEpAnn], Bool, NewOrData))-happyIn99 :: (Located ([AddEpAnn], Bool, NewOrData)) -> (HappyAbsSyn )-happyIn99 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap99 x)-{-# INLINE happyIn99 #-}-happyOut99 :: (HappyAbsSyn ) -> HappyWrap99-happyOut99 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut99 #-}-newtype HappyWrap100 = HappyWrap100 (Located (AddEpAnn, NewOrData))-happyIn100 :: (Located (AddEpAnn, NewOrData)) -> (HappyAbsSyn )-happyIn100 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap100 x)-{-# INLINE happyIn100 #-}-happyOut100 :: (HappyAbsSyn ) -> HappyWrap100-happyOut100 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut100 #-}-newtype HappyWrap101 = HappyWrap101 (Located ([AddEpAnn], Maybe (LHsKind GhcPs)))-happyIn101 :: (Located ([AddEpAnn], Maybe (LHsKind GhcPs))) -> (HappyAbsSyn )-happyIn101 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap101 x)-{-# INLINE happyIn101 #-}-happyOut101 :: (HappyAbsSyn ) -> HappyWrap101-happyOut101 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut101 #-}-newtype HappyWrap102 = HappyWrap102 (Located ([AddEpAnn], LFamilyResultSig GhcPs))-happyIn102 :: (Located ([AddEpAnn], LFamilyResultSig GhcPs)) -> (HappyAbsSyn )-happyIn102 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap102 x)-{-# INLINE happyIn102 #-}-happyOut102 :: (HappyAbsSyn ) -> HappyWrap102-happyOut102 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut102 #-}-newtype HappyWrap103 = HappyWrap103 (Located ([AddEpAnn], LFamilyResultSig GhcPs))-happyIn103 :: (Located ([AddEpAnn], LFamilyResultSig GhcPs)) -> (HappyAbsSyn )-happyIn103 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap103 x)-{-# INLINE happyIn103 #-}-happyOut103 :: (HappyAbsSyn ) -> HappyWrap103-happyOut103 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut103 #-}-newtype HappyWrap104 = HappyWrap104 (Located ([AddEpAnn], ( LFamilyResultSig GhcPs- , Maybe (LInjectivityAnn GhcPs))))-happyIn104 :: (Located ([AddEpAnn], ( LFamilyResultSig GhcPs- , Maybe (LInjectivityAnn GhcPs)))) -> (HappyAbsSyn )-happyIn104 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap104 x)-{-# INLINE happyIn104 #-}-happyOut104 :: (HappyAbsSyn ) -> HappyWrap104-happyOut104 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut104 #-}-newtype HappyWrap105 = HappyWrap105 (Located (Maybe (LHsContext GhcPs), LHsType GhcPs))-happyIn105 :: (Located (Maybe (LHsContext GhcPs), LHsType GhcPs)) -> (HappyAbsSyn )-happyIn105 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap105 x)-{-# INLINE happyIn105 #-}-happyOut105 :: (HappyAbsSyn ) -> HappyWrap105-happyOut105 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut105 #-}-newtype HappyWrap106 = HappyWrap106 (Located (Maybe (LHsContext GhcPs), HsOuterFamEqnTyVarBndrs GhcPs, LHsType GhcPs))-happyIn106 :: (Located (Maybe (LHsContext GhcPs), HsOuterFamEqnTyVarBndrs GhcPs, LHsType GhcPs)) -> (HappyAbsSyn )-happyIn106 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap106 x)-{-# INLINE happyIn106 #-}-happyOut106 :: (HappyAbsSyn ) -> HappyWrap106-happyOut106 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut106 #-}-newtype HappyWrap107 = HappyWrap107 (Maybe (LocatedP CType))-happyIn107 :: (Maybe (LocatedP CType)) -> (HappyAbsSyn )-happyIn107 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap107 x)-{-# INLINE happyIn107 #-}-happyOut107 :: (HappyAbsSyn ) -> HappyWrap107-happyOut107 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut107 #-}-newtype HappyWrap108 = HappyWrap108 (LDerivDecl GhcPs)-happyIn108 :: (LDerivDecl GhcPs) -> (HappyAbsSyn )-happyIn108 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap108 x)-{-# INLINE happyIn108 #-}-happyOut108 :: (HappyAbsSyn ) -> HappyWrap108-happyOut108 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut108 #-}-newtype HappyWrap109 = HappyWrap109 (LRoleAnnotDecl GhcPs)-happyIn109 :: (LRoleAnnotDecl GhcPs) -> (HappyAbsSyn )-happyIn109 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap109 x)-{-# INLINE happyIn109 #-}-happyOut109 :: (HappyAbsSyn ) -> HappyWrap109-happyOut109 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut109 #-}-newtype HappyWrap110 = HappyWrap110 (Located [Located (Maybe FastString)])-happyIn110 :: (Located [Located (Maybe FastString)]) -> (HappyAbsSyn )-happyIn110 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap110 x)-{-# INLINE happyIn110 #-}-happyOut110 :: (HappyAbsSyn ) -> HappyWrap110-happyOut110 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut110 #-}-newtype HappyWrap111 = HappyWrap111 (Located [Located (Maybe FastString)])-happyIn111 :: (Located [Located (Maybe FastString)]) -> (HappyAbsSyn )-happyIn111 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap111 x)-{-# INLINE happyIn111 #-}-happyOut111 :: (HappyAbsSyn ) -> HappyWrap111-happyOut111 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut111 #-}-newtype HappyWrap112 = HappyWrap112 (Located (Maybe FastString))-happyIn112 :: (Located (Maybe FastString)) -> (HappyAbsSyn )-happyIn112 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap112 x)-{-# INLINE happyIn112 #-}-happyOut112 :: (HappyAbsSyn ) -> HappyWrap112-happyOut112 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut112 #-}-newtype HappyWrap113 = HappyWrap113 (LHsDecl GhcPs)-happyIn113 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn113 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap113 x)-{-# INLINE happyIn113 #-}-happyOut113 :: (HappyAbsSyn ) -> HappyWrap113-happyOut113 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut113 #-}-newtype HappyWrap114 = HappyWrap114 ((LocatedN RdrName, HsPatSynDetails GhcPs, [AddEpAnn]))-happyIn114 :: ((LocatedN RdrName, HsPatSynDetails GhcPs, [AddEpAnn])) -> (HappyAbsSyn )-happyIn114 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap114 x)-{-# INLINE happyIn114 #-}-happyOut114 :: (HappyAbsSyn ) -> HappyWrap114-happyOut114 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut114 #-}-newtype HappyWrap115 = HappyWrap115 ([LocatedN RdrName])-happyIn115 :: ([LocatedN RdrName]) -> (HappyAbsSyn )-happyIn115 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap115 x)-{-# INLINE happyIn115 #-}-happyOut115 :: (HappyAbsSyn ) -> HappyWrap115-happyOut115 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut115 #-}-newtype HappyWrap116 = HappyWrap116 ([RecordPatSynField GhcPs])-happyIn116 :: ([RecordPatSynField GhcPs]) -> (HappyAbsSyn )-happyIn116 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap116 x)-{-# INLINE happyIn116 #-}-happyOut116 :: (HappyAbsSyn ) -> HappyWrap116-happyOut116 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut116 #-}-newtype HappyWrap117 = HappyWrap117 (LocatedL (OrdList (LHsDecl GhcPs)))-happyIn117 :: (LocatedL (OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn117 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap117 x)-{-# INLINE happyIn117 #-}-happyOut117 :: (HappyAbsSyn ) -> HappyWrap117-happyOut117 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut117 #-}-newtype HappyWrap118 = HappyWrap118 (LSig GhcPs)-happyIn118 :: (LSig GhcPs) -> (HappyAbsSyn )-happyIn118 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap118 x)-{-# INLINE happyIn118 #-}-happyOut118 :: (HappyAbsSyn ) -> HappyWrap118-happyOut118 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut118 #-}-newtype HappyWrap119 = HappyWrap119 (LocatedN RdrName)-happyIn119 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn119 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap119 x)-{-# INLINE happyIn119 #-}-happyOut119 :: (HappyAbsSyn ) -> HappyWrap119-happyOut119 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut119 #-}-newtype HappyWrap120 = HappyWrap120 (LHsDecl GhcPs)-happyIn120 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn120 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap120 x)-{-# INLINE happyIn120 #-}-happyOut120 :: (HappyAbsSyn ) -> HappyWrap120-happyOut120 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut120 #-}-newtype HappyWrap121 = HappyWrap121 (Located ([AddEpAnn],OrdList (LHsDecl GhcPs)))-happyIn121 :: (Located ([AddEpAnn],OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn121 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap121 x)-{-# INLINE happyIn121 #-}-happyOut121 :: (HappyAbsSyn ) -> HappyWrap121-happyOut121 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut121 #-}-newtype HappyWrap122 = HappyWrap122 (Located ([AddEpAnn]- , OrdList (LHsDecl GhcPs)- , LayoutInfo GhcPs))-happyIn122 :: (Located ([AddEpAnn]- , OrdList (LHsDecl GhcPs)- , LayoutInfo GhcPs)) -> (HappyAbsSyn )-happyIn122 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap122 x)-{-# INLINE happyIn122 #-}-happyOut122 :: (HappyAbsSyn ) -> HappyWrap122-happyOut122 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut122 #-}-newtype HappyWrap123 = HappyWrap123 (Located ([AddEpAnn]- ,(OrdList (LHsDecl GhcPs)) -- Reversed- ,LayoutInfo GhcPs))-happyIn123 :: (Located ([AddEpAnn]- ,(OrdList (LHsDecl GhcPs)) -- Reversed- ,LayoutInfo GhcPs)) -> (HappyAbsSyn )-happyIn123 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap123 x)-{-# INLINE happyIn123 #-}-happyOut123 :: (HappyAbsSyn ) -> HappyWrap123-happyOut123 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut123 #-}-newtype HappyWrap124 = HappyWrap124 (Located (OrdList (LHsDecl GhcPs)))-happyIn124 :: (Located (OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn124 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap124 x)-{-# INLINE happyIn124 #-}-happyOut124 :: (HappyAbsSyn ) -> HappyWrap124-happyOut124 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut124 #-}-newtype HappyWrap125 = HappyWrap125 (Located ([AddEpAnn],OrdList (LHsDecl GhcPs)))-happyIn125 :: (Located ([AddEpAnn],OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn125 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap125 x)-{-# INLINE happyIn125 #-}-happyOut125 :: (HappyAbsSyn ) -> HappyWrap125-happyOut125 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut125 #-}-newtype HappyWrap126 = HappyWrap126 (Located ([AddEpAnn]- , OrdList (LHsDecl GhcPs)))-happyIn126 :: (Located ([AddEpAnn]- , OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn126 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap126 x)-{-# INLINE happyIn126 #-}-happyOut126 :: (HappyAbsSyn ) -> HappyWrap126-happyOut126 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut126 #-}-newtype HappyWrap127 = HappyWrap127 (Located ([AddEpAnn]- , OrdList (LHsDecl GhcPs)))-happyIn127 :: (Located ([AddEpAnn]- , OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn127 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap127 x)-{-# INLINE happyIn127 #-}-happyOut127 :: (HappyAbsSyn ) -> HappyWrap127-happyOut127 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut127 #-}-newtype HappyWrap128 = HappyWrap128 (Located ([TrailingAnn], OrdList (LHsDecl GhcPs)))-happyIn128 :: (Located ([TrailingAnn], OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn128 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap128 x)-{-# INLINE happyIn128 #-}-happyOut128 :: (HappyAbsSyn ) -> HappyWrap128-happyOut128 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut128 #-}-newtype HappyWrap129 = HappyWrap129 (Located (AnnList,Located (OrdList (LHsDecl GhcPs))))-happyIn129 :: (Located (AnnList,Located (OrdList (LHsDecl GhcPs)))) -> (HappyAbsSyn )-happyIn129 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap129 x)-{-# INLINE happyIn129 #-}-happyOut129 :: (HappyAbsSyn ) -> HappyWrap129-happyOut129 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut129 #-}-newtype HappyWrap130 = HappyWrap130 (Located (HsLocalBinds GhcPs))-happyIn130 :: (Located (HsLocalBinds GhcPs)) -> (HappyAbsSyn )-happyIn130 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap130 x)-{-# INLINE happyIn130 #-}-happyOut130 :: (HappyAbsSyn ) -> HappyWrap130-happyOut130 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut130 #-}-newtype HappyWrap131 = HappyWrap131 (Maybe (Located (HsLocalBinds GhcPs, Maybe EpAnnComments )))-happyIn131 :: (Maybe (Located (HsLocalBinds GhcPs, Maybe EpAnnComments ))) -> (HappyAbsSyn )-happyIn131 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap131 x)-{-# INLINE happyIn131 #-}-happyOut131 :: (HappyAbsSyn ) -> HappyWrap131-happyOut131 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut131 #-}-newtype HappyWrap132 = HappyWrap132 ([LRuleDecl GhcPs])-happyIn132 :: ([LRuleDecl GhcPs]) -> (HappyAbsSyn )-happyIn132 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap132 x)-{-# INLINE happyIn132 #-}-happyOut132 :: (HappyAbsSyn ) -> HappyWrap132-happyOut132 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut132 #-}-newtype HappyWrap133 = HappyWrap133 (LRuleDecl GhcPs)-happyIn133 :: (LRuleDecl GhcPs) -> (HappyAbsSyn )-happyIn133 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap133 x)-{-# INLINE happyIn133 #-}-happyOut133 :: (HappyAbsSyn ) -> HappyWrap133-happyOut133 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut133 #-}-newtype HappyWrap134 = HappyWrap134 (([AddEpAnn],Maybe Activation))-happyIn134 :: (([AddEpAnn],Maybe Activation)) -> (HappyAbsSyn )-happyIn134 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap134 x)-{-# INLINE happyIn134 #-}-happyOut134 :: (HappyAbsSyn ) -> HappyWrap134-happyOut134 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut134 #-}-newtype HappyWrap135 = HappyWrap135 ([AddEpAnn])-happyIn135 :: ([AddEpAnn]) -> (HappyAbsSyn )-happyIn135 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap135 x)-{-# INLINE happyIn135 #-}-happyOut135 :: (HappyAbsSyn ) -> HappyWrap135-happyOut135 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut135 #-}-newtype HappyWrap136 = HappyWrap136 (([AddEpAnn]- ,Activation))-happyIn136 :: (([AddEpAnn]- ,Activation)) -> (HappyAbsSyn )-happyIn136 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap136 x)-{-# INLINE happyIn136 #-}-happyOut136 :: (HappyAbsSyn ) -> HappyWrap136-happyOut136 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut136 #-}-newtype HappyWrap137 = HappyWrap137 (([AddEpAnn] -> HsRuleAnn, Maybe [LHsTyVarBndr () GhcPs], [LRuleBndr GhcPs]))-happyIn137 :: (([AddEpAnn] -> HsRuleAnn, Maybe [LHsTyVarBndr () GhcPs], [LRuleBndr GhcPs])) -> (HappyAbsSyn )-happyIn137 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap137 x)-{-# INLINE happyIn137 #-}-happyOut137 :: (HappyAbsSyn ) -> HappyWrap137-happyOut137 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut137 #-}-newtype HappyWrap138 = HappyWrap138 ([LRuleTyTmVar])-happyIn138 :: ([LRuleTyTmVar]) -> (HappyAbsSyn )-happyIn138 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap138 x)-{-# INLINE happyIn138 #-}-happyOut138 :: (HappyAbsSyn ) -> HappyWrap138-happyOut138 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut138 #-}-newtype HappyWrap139 = HappyWrap139 (LRuleTyTmVar)-happyIn139 :: (LRuleTyTmVar) -> (HappyAbsSyn )-happyIn139 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap139 x)-{-# INLINE happyIn139 #-}-happyOut139 :: (HappyAbsSyn ) -> HappyWrap139-happyOut139 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut139 #-}-newtype HappyWrap140 = HappyWrap140 (OrdList (LWarnDecl GhcPs))-happyIn140 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )-happyIn140 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap140 x)-{-# INLINE happyIn140 #-}-happyOut140 :: (HappyAbsSyn ) -> HappyWrap140-happyOut140 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut140 #-}-newtype HappyWrap141 = HappyWrap141 (OrdList (LWarnDecl GhcPs))-happyIn141 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )-happyIn141 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap141 x)-{-# INLINE happyIn141 #-}-happyOut141 :: (HappyAbsSyn ) -> HappyWrap141-happyOut141 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut141 #-}-newtype HappyWrap142 = HappyWrap142 (OrdList (LWarnDecl GhcPs))-happyIn142 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )-happyIn142 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap142 x)-{-# INLINE happyIn142 #-}-happyOut142 :: (HappyAbsSyn ) -> HappyWrap142-happyOut142 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut142 #-}-newtype HappyWrap143 = HappyWrap143 (OrdList (LWarnDecl GhcPs))-happyIn143 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )-happyIn143 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap143 x)-{-# INLINE happyIn143 #-}-happyOut143 :: (HappyAbsSyn ) -> HappyWrap143-happyOut143 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut143 #-}-newtype HappyWrap144 = HappyWrap144 (Located ([AddEpAnn],[Located StringLiteral]))-happyIn144 :: (Located ([AddEpAnn],[Located StringLiteral])) -> (HappyAbsSyn )-happyIn144 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap144 x)-{-# INLINE happyIn144 #-}-happyOut144 :: (HappyAbsSyn ) -> HappyWrap144-happyOut144 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut144 #-}-newtype HappyWrap145 = HappyWrap145 (Located (OrdList (Located StringLiteral)))-happyIn145 :: (Located (OrdList (Located StringLiteral))) -> (HappyAbsSyn )-happyIn145 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap145 x)-{-# INLINE happyIn145 #-}-happyOut145 :: (HappyAbsSyn ) -> HappyWrap145-happyOut145 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut145 #-}-newtype HappyWrap146 = HappyWrap146 (LHsDecl GhcPs)-happyIn146 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn146 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap146 x)-{-# INLINE happyIn146 #-}-happyOut146 :: (HappyAbsSyn ) -> HappyWrap146-happyOut146 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut146 #-}-newtype HappyWrap147 = HappyWrap147 (Located ([AddEpAnn],EpAnn [AddEpAnn] -> HsDecl GhcPs))-happyIn147 :: (Located ([AddEpAnn],EpAnn [AddEpAnn] -> HsDecl GhcPs)) -> (HappyAbsSyn )-happyIn147 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap147 x)-{-# INLINE happyIn147 #-}-happyOut147 :: (HappyAbsSyn ) -> HappyWrap147-happyOut147 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut147 #-}-newtype HappyWrap148 = HappyWrap148 (Located CCallConv)-happyIn148 :: (Located CCallConv) -> (HappyAbsSyn )-happyIn148 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap148 x)-{-# INLINE happyIn148 #-}-happyOut148 :: (HappyAbsSyn ) -> HappyWrap148-happyOut148 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut148 #-}-newtype HappyWrap149 = HappyWrap149 (Located Safety)-happyIn149 :: (Located Safety) -> (HappyAbsSyn )-happyIn149 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap149 x)-{-# INLINE happyIn149 #-}-happyOut149 :: (HappyAbsSyn ) -> HappyWrap149-happyOut149 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut149 #-}-newtype HappyWrap150 = HappyWrap150 (Located ([AddEpAnn]- ,(Located StringLiteral, LocatedN RdrName, LHsSigType GhcPs)))-happyIn150 :: (Located ([AddEpAnn]- ,(Located StringLiteral, LocatedN RdrName, LHsSigType GhcPs))) -> (HappyAbsSyn )-happyIn150 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap150 x)-{-# INLINE happyIn150 #-}-happyOut150 :: (HappyAbsSyn ) -> HappyWrap150-happyOut150 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut150 #-}-newtype HappyWrap151 = HappyWrap151 (Maybe (AddEpAnn, LHsType GhcPs))-happyIn151 :: (Maybe (AddEpAnn, LHsType GhcPs)) -> (HappyAbsSyn )-happyIn151 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap151 x)-{-# INLINE happyIn151 #-}-happyOut151 :: (HappyAbsSyn ) -> HappyWrap151-happyOut151 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut151 #-}-newtype HappyWrap152 = HappyWrap152 (([AddEpAnn], Maybe (LocatedN RdrName)))-happyIn152 :: (([AddEpAnn], Maybe (LocatedN RdrName))) -> (HappyAbsSyn )-happyIn152 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap152 x)-{-# INLINE happyIn152 #-}-happyOut152 :: (HappyAbsSyn ) -> HappyWrap152-happyOut152 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut152 #-}-newtype HappyWrap153 = HappyWrap153 (LHsSigType GhcPs)-happyIn153 :: (LHsSigType GhcPs) -> (HappyAbsSyn )-happyIn153 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap153 x)-{-# INLINE happyIn153 #-}-happyOut153 :: (HappyAbsSyn ) -> HappyWrap153-happyOut153 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut153 #-}-newtype HappyWrap154 = HappyWrap154 (LHsSigType GhcPs)-happyIn154 :: (LHsSigType GhcPs) -> (HappyAbsSyn )-happyIn154 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap154 x)-{-# INLINE happyIn154 #-}-happyOut154 :: (HappyAbsSyn ) -> HappyWrap154-happyOut154 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut154 #-}-newtype HappyWrap155 = HappyWrap155 (Located [LocatedN RdrName])-happyIn155 :: (Located [LocatedN RdrName]) -> (HappyAbsSyn )-happyIn155 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap155 x)-{-# INLINE happyIn155 #-}-happyOut155 :: (HappyAbsSyn ) -> HappyWrap155-happyOut155 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut155 #-}-newtype HappyWrap156 = HappyWrap156 (OrdList (LHsSigType GhcPs))-happyIn156 :: (OrdList (LHsSigType GhcPs)) -> (HappyAbsSyn )-happyIn156 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap156 x)-{-# INLINE happyIn156 #-}-happyOut156 :: (HappyAbsSyn ) -> HappyWrap156-happyOut156 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut156 #-}-newtype HappyWrap157 = HappyWrap157 (Located UnpackednessPragma)-happyIn157 :: (Located UnpackednessPragma) -> (HappyAbsSyn )-happyIn157 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap157 x)-{-# INLINE happyIn157 #-}-happyOut157 :: (HappyAbsSyn ) -> HappyWrap157-happyOut157 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut157 #-}-newtype HappyWrap158 = HappyWrap158 (Located (HsForAllTelescope GhcPs))-happyIn158 :: (Located (HsForAllTelescope GhcPs)) -> (HappyAbsSyn )-happyIn158 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap158 x)-{-# INLINE happyIn158 #-}-happyOut158 :: (HappyAbsSyn ) -> HappyWrap158-happyOut158 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut158 #-}-newtype HappyWrap159 = HappyWrap159 (LHsType GhcPs)-happyIn159 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn159 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap159 x)-{-# INLINE happyIn159 #-}-happyOut159 :: (HappyAbsSyn ) -> HappyWrap159-happyOut159 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut159 #-}-newtype HappyWrap160 = HappyWrap160 (LHsType GhcPs)-happyIn160 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn160 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap160 x)-{-# INLINE happyIn160 #-}-happyOut160 :: (HappyAbsSyn ) -> HappyWrap160-happyOut160 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut160 #-}-newtype HappyWrap161 = HappyWrap161 (LHsContext GhcPs)-happyIn161 :: (LHsContext GhcPs) -> (HappyAbsSyn )-happyIn161 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap161 x)-{-# INLINE happyIn161 #-}-happyOut161 :: (HappyAbsSyn ) -> HappyWrap161-happyOut161 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut161 #-}-newtype HappyWrap162 = HappyWrap162 (LHsType GhcPs)-happyIn162 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn162 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap162 x)-{-# INLINE happyIn162 #-}-happyOut162 :: (HappyAbsSyn ) -> HappyWrap162-happyOut162 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut162 #-}-newtype HappyWrap163 = HappyWrap163 (Located (LHsUniToken "->" "\8594" GhcPs -> HsArrow GhcPs))-happyIn163 :: (Located (LHsUniToken "->" "\8594" GhcPs -> HsArrow GhcPs)) -> (HappyAbsSyn )-happyIn163 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap163 x)-{-# INLINE happyIn163 #-}-happyOut163 :: (HappyAbsSyn ) -> HappyWrap163-happyOut163 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut163 #-}-newtype HappyWrap164 = HappyWrap164 (LHsType GhcPs)-happyIn164 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn164 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap164 x)-{-# INLINE happyIn164 #-}-happyOut164 :: (HappyAbsSyn ) -> HappyWrap164-happyOut164 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut164 #-}-newtype HappyWrap165 = HappyWrap165 (forall b. DisambTD b => PV (LocatedA b))-happyIn165 :: (forall b. DisambTD b => PV (LocatedA b)) -> (HappyAbsSyn )-happyIn165 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap165 x)-{-# INLINE happyIn165 #-}-happyOut165 :: (HappyAbsSyn ) -> HappyWrap165-happyOut165 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut165 #-}-newtype HappyWrap166 = HappyWrap166 (forall b. DisambTD b => PV (LocatedA b))-happyIn166 :: (forall b. DisambTD b => PV (LocatedA b)) -> (HappyAbsSyn )-happyIn166 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap166 x)-{-# INLINE happyIn166 #-}-happyOut166 :: (HappyAbsSyn ) -> HappyWrap166-happyOut166 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut166 #-}-newtype HappyWrap167 = HappyWrap167 (LHsType GhcPs)-happyIn167 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn167 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap167 x)-{-# INLINE happyIn167 #-}-happyOut167 :: (HappyAbsSyn ) -> HappyWrap167-happyOut167 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut167 #-}-newtype HappyWrap168 = HappyWrap168 ((LocatedN RdrName, PromotionFlag))-happyIn168 :: ((LocatedN RdrName, PromotionFlag)) -> (HappyAbsSyn )-happyIn168 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap168 x)-{-# INLINE happyIn168 #-}-happyOut168 :: (HappyAbsSyn ) -> HappyWrap168-happyOut168 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut168 #-}-newtype HappyWrap169 = HappyWrap169 (LHsType GhcPs)-happyIn169 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn169 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap169 x)-{-# INLINE happyIn169 #-}-happyOut169 :: (HappyAbsSyn ) -> HappyWrap169-happyOut169 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut169 #-}-newtype HappyWrap170 = HappyWrap170 (LHsSigType GhcPs)-happyIn170 :: (LHsSigType GhcPs) -> (HappyAbsSyn )-happyIn170 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap170 x)-{-# INLINE happyIn170 #-}-happyOut170 :: (HappyAbsSyn ) -> HappyWrap170-happyOut170 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut170 #-}-newtype HappyWrap171 = HappyWrap171 ([LHsSigType GhcPs])-happyIn171 :: ([LHsSigType GhcPs]) -> (HappyAbsSyn )-happyIn171 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap171 x)-{-# INLINE happyIn171 #-}-happyOut171 :: (HappyAbsSyn ) -> HappyWrap171-happyOut171 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut171 #-}-newtype HappyWrap172 = HappyWrap172 ([LHsType GhcPs])-happyIn172 :: ([LHsType GhcPs]) -> (HappyAbsSyn )-happyIn172 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap172 x)-{-# INLINE happyIn172 #-}-happyOut172 :: (HappyAbsSyn ) -> HappyWrap172-happyOut172 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut172 #-}-newtype HappyWrap173 = HappyWrap173 ([LHsType GhcPs])-happyIn173 :: ([LHsType GhcPs]) -> (HappyAbsSyn )-happyIn173 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap173 x)-{-# INLINE happyIn173 #-}-happyOut173 :: (HappyAbsSyn ) -> HappyWrap173-happyOut173 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut173 #-}-newtype HappyWrap174 = HappyWrap174 ([LHsType GhcPs])-happyIn174 :: ([LHsType GhcPs]) -> (HappyAbsSyn )-happyIn174 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap174 x)-{-# INLINE happyIn174 #-}-happyOut174 :: (HappyAbsSyn ) -> HappyWrap174-happyOut174 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut174 #-}-newtype HappyWrap175 = HappyWrap175 ([LHsTyVarBndr Specificity GhcPs])-happyIn175 :: ([LHsTyVarBndr Specificity GhcPs]) -> (HappyAbsSyn )-happyIn175 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap175 x)-{-# INLINE happyIn175 #-}-happyOut175 :: (HappyAbsSyn ) -> HappyWrap175-happyOut175 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut175 #-}-newtype HappyWrap176 = HappyWrap176 (LHsTyVarBndr Specificity GhcPs)-happyIn176 :: (LHsTyVarBndr Specificity GhcPs) -> (HappyAbsSyn )-happyIn176 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap176 x)-{-# INLINE happyIn176 #-}-happyOut176 :: (HappyAbsSyn ) -> HappyWrap176-happyOut176 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut176 #-}-newtype HappyWrap177 = HappyWrap177 (LHsTyVarBndr Specificity GhcPs)-happyIn177 :: (LHsTyVarBndr Specificity GhcPs) -> (HappyAbsSyn )-happyIn177 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap177 x)-{-# INLINE happyIn177 #-}-happyOut177 :: (HappyAbsSyn ) -> HappyWrap177-happyOut177 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut177 #-}-newtype HappyWrap178 = HappyWrap178 (Located ([AddEpAnn],[LHsFunDep GhcPs]))-happyIn178 :: (Located ([AddEpAnn],[LHsFunDep GhcPs])) -> (HappyAbsSyn )-happyIn178 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap178 x)-{-# INLINE happyIn178 #-}-happyOut178 :: (HappyAbsSyn ) -> HappyWrap178-happyOut178 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut178 #-}-newtype HappyWrap179 = HappyWrap179 (Located [LHsFunDep GhcPs])-happyIn179 :: (Located [LHsFunDep GhcPs]) -> (HappyAbsSyn )-happyIn179 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap179 x)-{-# INLINE happyIn179 #-}-happyOut179 :: (HappyAbsSyn ) -> HappyWrap179-happyOut179 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut179 #-}-newtype HappyWrap180 = HappyWrap180 (LHsFunDep GhcPs)-happyIn180 :: (LHsFunDep GhcPs) -> (HappyAbsSyn )-happyIn180 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap180 x)-{-# INLINE happyIn180 #-}-happyOut180 :: (HappyAbsSyn ) -> HappyWrap180-happyOut180 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut180 #-}-newtype HappyWrap181 = HappyWrap181 (Located [LocatedN RdrName])-happyIn181 :: (Located [LocatedN RdrName]) -> (HappyAbsSyn )-happyIn181 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap181 x)-{-# INLINE happyIn181 #-}-happyOut181 :: (HappyAbsSyn ) -> HappyWrap181-happyOut181 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut181 #-}-newtype HappyWrap182 = HappyWrap182 (LHsKind GhcPs)-happyIn182 :: (LHsKind GhcPs) -> (HappyAbsSyn )-happyIn182 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap182 x)-{-# INLINE happyIn182 #-}-happyOut182 :: (HappyAbsSyn ) -> HappyWrap182-happyOut182 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut182 #-}-newtype HappyWrap183 = HappyWrap183 (Located ([AddEpAnn]- ,[LConDecl GhcPs]))-happyIn183 :: (Located ([AddEpAnn]- ,[LConDecl GhcPs])) -> (HappyAbsSyn )-happyIn183 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap183 x)-{-# INLINE happyIn183 #-}-happyOut183 :: (HappyAbsSyn ) -> HappyWrap183-happyOut183 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut183 #-}-newtype HappyWrap184 = HappyWrap184 (Located [LConDecl GhcPs])-happyIn184 :: (Located [LConDecl GhcPs]) -> (HappyAbsSyn )-happyIn184 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap184 x)-{-# INLINE happyIn184 #-}-happyOut184 :: (HappyAbsSyn ) -> HappyWrap184-happyOut184 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut184 #-}-newtype HappyWrap185 = HappyWrap185 (LConDecl GhcPs)-happyIn185 :: (LConDecl GhcPs) -> (HappyAbsSyn )-happyIn185 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap185 x)-{-# INLINE happyIn185 #-}-happyOut185 :: (HappyAbsSyn ) -> HappyWrap185-happyOut185 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut185 #-}-newtype HappyWrap186 = HappyWrap186 (Located ([AddEpAnn],[LConDecl GhcPs]))-happyIn186 :: (Located ([AddEpAnn],[LConDecl GhcPs])) -> (HappyAbsSyn )-happyIn186 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap186 x)-{-# INLINE happyIn186 #-}-happyOut186 :: (HappyAbsSyn ) -> HappyWrap186-happyOut186 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut186 #-}-newtype HappyWrap187 = HappyWrap187 (Located [LConDecl GhcPs])-happyIn187 :: (Located [LConDecl GhcPs]) -> (HappyAbsSyn )-happyIn187 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap187 x)-{-# INLINE happyIn187 #-}-happyOut187 :: (HappyAbsSyn ) -> HappyWrap187-happyOut187 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut187 #-}-newtype HappyWrap188 = HappyWrap188 (LConDecl GhcPs)-happyIn188 :: (LConDecl GhcPs) -> (HappyAbsSyn )-happyIn188 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap188 x)-{-# INLINE happyIn188 #-}-happyOut188 :: (HappyAbsSyn ) -> HappyWrap188-happyOut188 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut188 #-}-newtype HappyWrap189 = HappyWrap189 (Located ([AddEpAnn], Maybe [LHsTyVarBndr Specificity GhcPs]))-happyIn189 :: (Located ([AddEpAnn], Maybe [LHsTyVarBndr Specificity GhcPs])) -> (HappyAbsSyn )-happyIn189 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap189 x)-{-# INLINE happyIn189 #-}-happyOut189 :: (HappyAbsSyn ) -> HappyWrap189-happyOut189 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut189 #-}-newtype HappyWrap190 = HappyWrap190 (Located (LocatedN RdrName, HsConDeclH98Details GhcPs))-happyIn190 :: (Located (LocatedN RdrName, HsConDeclH98Details GhcPs)) -> (HappyAbsSyn )-happyIn190 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap190 x)-{-# INLINE happyIn190 #-}-happyOut190 :: (HappyAbsSyn ) -> HappyWrap190-happyOut190 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut190 #-}-newtype HappyWrap191 = HappyWrap191 ([LConDeclField GhcPs])-happyIn191 :: ([LConDeclField GhcPs]) -> (HappyAbsSyn )-happyIn191 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap191 x)-{-# INLINE happyIn191 #-}-happyOut191 :: (HappyAbsSyn ) -> HappyWrap191-happyOut191 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut191 #-}-newtype HappyWrap192 = HappyWrap192 ([LConDeclField GhcPs])-happyIn192 :: ([LConDeclField GhcPs]) -> (HappyAbsSyn )-happyIn192 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap192 x)-{-# INLINE happyIn192 #-}-happyOut192 :: (HappyAbsSyn ) -> HappyWrap192-happyOut192 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut192 #-}-newtype HappyWrap193 = HappyWrap193 (LConDeclField GhcPs)-happyIn193 :: (LConDeclField GhcPs) -> (HappyAbsSyn )-happyIn193 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap193 x)-{-# INLINE happyIn193 #-}-happyOut193 :: (HappyAbsSyn ) -> HappyWrap193-happyOut193 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut193 #-}-newtype HappyWrap194 = HappyWrap194 (Located (HsDeriving GhcPs))-happyIn194 :: (Located (HsDeriving GhcPs)) -> (HappyAbsSyn )-happyIn194 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap194 x)-{-# INLINE happyIn194 #-}-happyOut194 :: (HappyAbsSyn ) -> HappyWrap194-happyOut194 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut194 #-}-newtype HappyWrap195 = HappyWrap195 (Located (HsDeriving GhcPs))-happyIn195 :: (Located (HsDeriving GhcPs)) -> (HappyAbsSyn )-happyIn195 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap195 x)-{-# INLINE happyIn195 #-}-happyOut195 :: (HappyAbsSyn ) -> HappyWrap195-happyOut195 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut195 #-}-newtype HappyWrap196 = HappyWrap196 (LHsDerivingClause GhcPs)-happyIn196 :: (LHsDerivingClause GhcPs) -> (HappyAbsSyn )-happyIn196 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap196 x)-{-# INLINE happyIn196 #-}-happyOut196 :: (HappyAbsSyn ) -> HappyWrap196-happyOut196 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut196 #-}-newtype HappyWrap197 = HappyWrap197 (LDerivClauseTys GhcPs)-happyIn197 :: (LDerivClauseTys GhcPs) -> (HappyAbsSyn )-happyIn197 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap197 x)-{-# INLINE happyIn197 #-}-happyOut197 :: (HappyAbsSyn ) -> HappyWrap197-happyOut197 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut197 #-}-newtype HappyWrap198 = HappyWrap198 (LHsDecl GhcPs)-happyIn198 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn198 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap198 x)-{-# INLINE happyIn198 #-}-happyOut198 :: (HappyAbsSyn ) -> HappyWrap198-happyOut198 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut198 #-}-newtype HappyWrap199 = HappyWrap199 (LHsDecl GhcPs)-happyIn199 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn199 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap199 x)-{-# INLINE happyIn199 #-}-happyOut199 :: (HappyAbsSyn ) -> HappyWrap199-happyOut199 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut199 #-}-newtype HappyWrap200 = HappyWrap200 (Located (GRHSs GhcPs (LHsExpr GhcPs)))-happyIn200 :: (Located (GRHSs GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )-happyIn200 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap200 x)-{-# INLINE happyIn200 #-}-happyOut200 :: (HappyAbsSyn ) -> HappyWrap200-happyOut200 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut200 #-}-newtype HappyWrap201 = HappyWrap201 (Located [LGRHS GhcPs (LHsExpr GhcPs)])-happyIn201 :: (Located [LGRHS GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn201 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap201 x)-{-# INLINE happyIn201 #-}-happyOut201 :: (HappyAbsSyn ) -> HappyWrap201-happyOut201 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut201 #-}-newtype HappyWrap202 = HappyWrap202 (LGRHS GhcPs (LHsExpr GhcPs))-happyIn202 :: (LGRHS GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn202 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap202 x)-{-# INLINE happyIn202 #-}-happyOut202 :: (HappyAbsSyn ) -> HappyWrap202-happyOut202 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut202 #-}-newtype HappyWrap203 = HappyWrap203 (LHsDecl GhcPs)-happyIn203 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn203 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap203 x)-{-# INLINE happyIn203 #-}-happyOut203 :: (HappyAbsSyn ) -> HappyWrap203-happyOut203 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut203 #-}-newtype HappyWrap204 = HappyWrap204 (([AddEpAnn],Maybe Activation))-happyIn204 :: (([AddEpAnn],Maybe Activation)) -> (HappyAbsSyn )-happyIn204 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap204 x)-{-# INLINE happyIn204 #-}-happyOut204 :: (HappyAbsSyn ) -> HappyWrap204-happyOut204 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut204 #-}-newtype HappyWrap205 = HappyWrap205 (([AddEpAnn],Activation))-happyIn205 :: (([AddEpAnn],Activation)) -> (HappyAbsSyn )-happyIn205 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap205 x)-{-# INLINE happyIn205 #-}-happyOut205 :: (HappyAbsSyn ) -> HappyWrap205-happyOut205 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut205 #-}-newtype HappyWrap206 = HappyWrap206 (Located (HsUntypedSplice GhcPs))-happyIn206 :: (Located (HsUntypedSplice GhcPs)) -> (HappyAbsSyn )-happyIn206 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap206 x)-{-# INLINE happyIn206 #-}-happyOut206 :: (HappyAbsSyn ) -> HappyWrap206-happyOut206 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut206 #-}-newtype HappyWrap207 = HappyWrap207 (ECP)-happyIn207 :: (ECP) -> (HappyAbsSyn )-happyIn207 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap207 x)-{-# INLINE happyIn207 #-}-happyOut207 :: (HappyAbsSyn ) -> HappyWrap207-happyOut207 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut207 #-}-newtype HappyWrap208 = HappyWrap208 (ECP)-happyIn208 :: (ECP) -> (HappyAbsSyn )-happyIn208 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap208 x)-{-# INLINE happyIn208 #-}-happyOut208 :: (HappyAbsSyn ) -> HappyWrap208-happyOut208 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut208 #-}-newtype HappyWrap209 = HappyWrap209 (ECP)-happyIn209 :: (ECP) -> (HappyAbsSyn )-happyIn209 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap209 x)-{-# INLINE happyIn209 #-}-happyOut209 :: (HappyAbsSyn ) -> HappyWrap209-happyOut209 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut209 #-}-newtype HappyWrap210 = HappyWrap210 (ECP)-happyIn210 :: (ECP) -> (HappyAbsSyn )-happyIn210 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap210 x)-{-# INLINE happyIn210 #-}-happyOut210 :: (HappyAbsSyn ) -> HappyWrap210-happyOut210 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut210 #-}-newtype HappyWrap211 = HappyWrap211 ((Maybe EpaLocation,Bool))-happyIn211 :: ((Maybe EpaLocation,Bool)) -> (HappyAbsSyn )-happyIn211 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap211 x)-{-# INLINE happyIn211 #-}-happyOut211 :: (HappyAbsSyn ) -> HappyWrap211-happyOut211 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut211 #-}-newtype HappyWrap212 = HappyWrap212 (Located (HsPragE GhcPs))-happyIn212 :: (Located (HsPragE GhcPs)) -> (HappyAbsSyn )-happyIn212 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap212 x)-{-# INLINE happyIn212 #-}-happyOut212 :: (HappyAbsSyn ) -> HappyWrap212-happyOut212 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut212 #-}-newtype HappyWrap213 = HappyWrap213 (ECP)-happyIn213 :: (ECP) -> (HappyAbsSyn )-happyIn213 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap213 x)-{-# INLINE happyIn213 #-}-happyOut213 :: (HappyAbsSyn ) -> HappyWrap213-happyOut213 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut213 #-}-newtype HappyWrap214 = HappyWrap214 (ECP)-happyIn214 :: (ECP) -> (HappyAbsSyn )-happyIn214 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap214 x)-{-# INLINE happyIn214 #-}-happyOut214 :: (HappyAbsSyn ) -> HappyWrap214-happyOut214 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut214 #-}-newtype HappyWrap215 = HappyWrap215 (ECP)-happyIn215 :: (ECP) -> (HappyAbsSyn )-happyIn215 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap215 x)-{-# INLINE happyIn215 #-}-happyOut215 :: (HappyAbsSyn ) -> HappyWrap215-happyOut215 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut215 #-}-newtype HappyWrap216 = HappyWrap216 (ECP)-happyIn216 :: (ECP) -> (HappyAbsSyn )-happyIn216 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap216 x)-{-# INLINE happyIn216 #-}-happyOut216 :: (HappyAbsSyn ) -> HappyWrap216-happyOut216 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut216 #-}-newtype HappyWrap217 = HappyWrap217 (Located (NonEmpty (LocatedAn NoEpAnns (DotFieldOcc GhcPs))))-happyIn217 :: (Located (NonEmpty (LocatedAn NoEpAnns (DotFieldOcc GhcPs)))) -> (HappyAbsSyn )-happyIn217 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap217 x)-{-# INLINE happyIn217 #-}-happyOut217 :: (HappyAbsSyn ) -> HappyWrap217-happyOut217 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut217 #-}-newtype HappyWrap218 = HappyWrap218 (LHsExpr GhcPs)-happyIn218 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn218 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap218 x)-{-# INLINE happyIn218 #-}-happyOut218 :: (HappyAbsSyn ) -> HappyWrap218-happyOut218 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut218 #-}-newtype HappyWrap219 = HappyWrap219 (Located (HsUntypedSplice GhcPs))-happyIn219 :: (Located (HsUntypedSplice GhcPs)) -> (HappyAbsSyn )-happyIn219 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap219 x)-{-# INLINE happyIn219 #-}-happyOut219 :: (HappyAbsSyn ) -> HappyWrap219-happyOut219 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut219 #-}-newtype HappyWrap220 = HappyWrap220 (Located ((EpAnnCO, EpAnn [AddEpAnn]), LHsExpr GhcPs))-happyIn220 :: (Located ((EpAnnCO, EpAnn [AddEpAnn]), LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn220 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap220 x)-{-# INLINE happyIn220 #-}-happyOut220 :: (HappyAbsSyn ) -> HappyWrap220-happyOut220 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut220 #-}-newtype HappyWrap221 = HappyWrap221 ([LHsCmdTop GhcPs])-happyIn221 :: ([LHsCmdTop GhcPs]) -> (HappyAbsSyn )-happyIn221 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap221 x)-{-# INLINE happyIn221 #-}-happyOut221 :: (HappyAbsSyn ) -> HappyWrap221-happyOut221 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut221 #-}-newtype HappyWrap222 = HappyWrap222 (LHsCmdTop GhcPs)-happyIn222 :: (LHsCmdTop GhcPs) -> (HappyAbsSyn )-happyIn222 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap222 x)-{-# INLINE happyIn222 #-}-happyOut222 :: (HappyAbsSyn ) -> HappyWrap222-happyOut222 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut222 #-}-newtype HappyWrap223 = HappyWrap223 (([AddEpAnn],[LHsDecl GhcPs]))-happyIn223 :: (([AddEpAnn],[LHsDecl GhcPs])) -> (HappyAbsSyn )-happyIn223 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap223 x)-{-# INLINE happyIn223 #-}-happyOut223 :: (HappyAbsSyn ) -> HappyWrap223-happyOut223 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut223 #-}-newtype HappyWrap224 = HappyWrap224 ([LHsDecl GhcPs])-happyIn224 :: ([LHsDecl GhcPs]) -> (HappyAbsSyn )-happyIn224 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap224 x)-{-# INLINE happyIn224 #-}-happyOut224 :: (HappyAbsSyn ) -> HappyWrap224-happyOut224 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut224 #-}-newtype HappyWrap225 = HappyWrap225 (ECP)-happyIn225 :: (ECP) -> (HappyAbsSyn )-happyIn225 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap225 x)-{-# INLINE happyIn225 #-}-happyOut225 :: (HappyAbsSyn ) -> HappyWrap225-happyOut225 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut225 #-}-newtype HappyWrap226 = HappyWrap226 (forall b. DisambECP b => PV (SumOrTuple b))-happyIn226 :: (forall b. DisambECP b => PV (SumOrTuple b)) -> (HappyAbsSyn )-happyIn226 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap226 x)-{-# INLINE happyIn226 #-}-happyOut226 :: (HappyAbsSyn ) -> HappyWrap226-happyOut226 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut226 #-}-newtype HappyWrap227 = HappyWrap227 (forall b. DisambECP b => PV (SrcSpan,[Either (EpAnn EpaLocation) (LocatedA b)]))-happyIn227 :: (forall b. DisambECP b => PV (SrcSpan,[Either (EpAnn EpaLocation) (LocatedA b)])) -> (HappyAbsSyn )-happyIn227 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap227 x)-{-# INLINE happyIn227 #-}-happyOut227 :: (HappyAbsSyn ) -> HappyWrap227-happyOut227 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut227 #-}-newtype HappyWrap228 = HappyWrap228 (forall b. DisambECP b => PV [Either (EpAnn EpaLocation) (LocatedA b)])-happyIn228 :: (forall b. DisambECP b => PV [Either (EpAnn EpaLocation) (LocatedA b)]) -> (HappyAbsSyn )-happyIn228 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap228 x)-{-# INLINE happyIn228 #-}-happyOut228 :: (HappyAbsSyn ) -> HappyWrap228-happyOut228 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut228 #-}-newtype HappyWrap229 = HappyWrap229 (forall b. DisambECP b => SrcSpan -> (AddEpAnn, AddEpAnn) -> PV (LocatedA b))-happyIn229 :: (forall b. DisambECP b => SrcSpan -> (AddEpAnn, AddEpAnn) -> PV (LocatedA b)) -> (HappyAbsSyn )-happyIn229 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap229 x)-{-# INLINE happyIn229 #-}-happyOut229 :: (HappyAbsSyn ) -> HappyWrap229-happyOut229 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut229 #-}-newtype HappyWrap230 = HappyWrap230 (forall b. DisambECP b => PV [LocatedA b])-happyIn230 :: (forall b. DisambECP b => PV [LocatedA b]) -> (HappyAbsSyn )-happyIn230 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap230 x)-{-# INLINE happyIn230 #-}-happyOut230 :: (HappyAbsSyn ) -> HappyWrap230-happyOut230 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut230 #-}-newtype HappyWrap231 = HappyWrap231 (Located [LStmt GhcPs (LHsExpr GhcPs)])-happyIn231 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn231 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap231 x)-{-# INLINE happyIn231 #-}-happyOut231 :: (HappyAbsSyn ) -> HappyWrap231-happyOut231 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut231 #-}-newtype HappyWrap232 = HappyWrap232 (Located [[LStmt GhcPs (LHsExpr GhcPs)]])-happyIn232 :: (Located [[LStmt GhcPs (LHsExpr GhcPs)]]) -> (HappyAbsSyn )-happyIn232 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap232 x)-{-# INLINE happyIn232 #-}-happyOut232 :: (HappyAbsSyn ) -> HappyWrap232-happyOut232 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut232 #-}-newtype HappyWrap233 = HappyWrap233 (Located [LStmt GhcPs (LHsExpr GhcPs)])-happyIn233 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn233 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap233 x)-{-# INLINE happyIn233 #-}-happyOut233 :: (HappyAbsSyn ) -> HappyWrap233-happyOut233 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut233 #-}-newtype HappyWrap234 = HappyWrap234 (Located (RealSrcSpan -> [LStmt GhcPs (LHsExpr GhcPs)] -> Stmt GhcPs (LHsExpr GhcPs)))-happyIn234 :: (Located (RealSrcSpan -> [LStmt GhcPs (LHsExpr GhcPs)] -> Stmt GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )-happyIn234 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap234 x)-{-# INLINE happyIn234 #-}-happyOut234 :: (HappyAbsSyn ) -> HappyWrap234-happyOut234 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut234 #-}-newtype HappyWrap235 = HappyWrap235 (Located [LStmt GhcPs (LHsExpr GhcPs)])-happyIn235 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn235 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap235 x)-{-# INLINE happyIn235 #-}-happyOut235 :: (HappyAbsSyn ) -> HappyWrap235-happyOut235 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut235 #-}-newtype HappyWrap236 = HappyWrap236 (Located [LStmt GhcPs (LHsExpr GhcPs)])-happyIn236 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn236 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap236 x)-{-# INLINE happyIn236 #-}-happyOut236 :: (HappyAbsSyn ) -> HappyWrap236-happyOut236 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut236 #-}-newtype HappyWrap237 = HappyWrap237 (forall b. DisambECP b => PV (Located (GRHSs GhcPs (LocatedA b))))-happyIn237 :: (forall b. DisambECP b => PV (Located (GRHSs GhcPs (LocatedA b)))) -> (HappyAbsSyn )-happyIn237 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap237 x)-{-# INLINE happyIn237 #-}-happyOut237 :: (HappyAbsSyn ) -> HappyWrap237-happyOut237 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut237 #-}-newtype HappyWrap238 = HappyWrap238 (forall b. DisambECP b => PV (Located [LGRHS GhcPs (LocatedA b)]))-happyIn238 :: (forall b. DisambECP b => PV (Located [LGRHS GhcPs (LocatedA b)])) -> (HappyAbsSyn )-happyIn238 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap238 x)-{-# INLINE happyIn238 #-}-happyOut238 :: (HappyAbsSyn ) -> HappyWrap238-happyOut238 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut238 #-}-newtype HappyWrap239 = HappyWrap239 (forall b. DisambECP b => PV (Located [LGRHS GhcPs (LocatedA b)]))-happyIn239 :: (forall b. DisambECP b => PV (Located [LGRHS GhcPs (LocatedA b)])) -> (HappyAbsSyn )-happyIn239 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap239 x)-{-# INLINE happyIn239 #-}-happyOut239 :: (HappyAbsSyn ) -> HappyWrap239-happyOut239 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut239 #-}-newtype HappyWrap240 = HappyWrap240 (Located ([AddEpAnn],[LGRHS GhcPs (LHsExpr GhcPs)]))-happyIn240 :: (Located ([AddEpAnn],[LGRHS GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )-happyIn240 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap240 x)-{-# INLINE happyIn240 #-}-happyOut240 :: (HappyAbsSyn ) -> HappyWrap240-happyOut240 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut240 #-}-newtype HappyWrap241 = HappyWrap241 (forall b. DisambECP b => PV (LGRHS GhcPs (LocatedA b)))-happyIn241 :: (forall b. DisambECP b => PV (LGRHS GhcPs (LocatedA b))) -> (HappyAbsSyn )-happyIn241 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap241 x)-{-# INLINE happyIn241 #-}-happyOut241 :: (HappyAbsSyn ) -> HappyWrap241-happyOut241 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut241 #-}-newtype HappyWrap242 = HappyWrap242 (LPat GhcPs)-happyIn242 :: (LPat GhcPs) -> (HappyAbsSyn )-happyIn242 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap242 x)-{-# INLINE happyIn242 #-}-happyOut242 :: (HappyAbsSyn ) -> HappyWrap242-happyOut242 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut242 #-}-newtype HappyWrap243 = HappyWrap243 ([LPat GhcPs])-happyIn243 :: ([LPat GhcPs]) -> (HappyAbsSyn )-happyIn243 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap243 x)-{-# INLINE happyIn243 #-}-happyOut243 :: (HappyAbsSyn ) -> HappyWrap243-happyOut243 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut243 #-}-newtype HappyWrap244 = HappyWrap244 (LPat GhcPs)-happyIn244 :: (LPat GhcPs) -> (HappyAbsSyn )-happyIn244 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap244 x)-{-# INLINE happyIn244 #-}-happyOut244 :: (HappyAbsSyn ) -> HappyWrap244-happyOut244 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut244 #-}-newtype HappyWrap245 = HappyWrap245 (LPat GhcPs)-happyIn245 :: (LPat GhcPs) -> (HappyAbsSyn )-happyIn245 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap245 x)-{-# INLINE happyIn245 #-}-happyOut245 :: (HappyAbsSyn ) -> HappyWrap245-happyOut245 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut245 #-}-newtype HappyWrap246 = HappyWrap246 ([LPat GhcPs])-happyIn246 :: ([LPat GhcPs]) -> (HappyAbsSyn )-happyIn246 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap246 x)-{-# INLINE happyIn246 #-}-happyOut246 :: (HappyAbsSyn ) -> HappyWrap246-happyOut246 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut246 #-}-newtype HappyWrap247 = HappyWrap247 (forall b. DisambECP b => PV (LocatedL [LocatedA (Stmt GhcPs (LocatedA b))]))-happyIn247 :: (forall b. DisambECP b => PV (LocatedL [LocatedA (Stmt GhcPs (LocatedA b))])) -> (HappyAbsSyn )-happyIn247 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap247 x)-{-# INLINE happyIn247 #-}-happyOut247 :: (HappyAbsSyn ) -> HappyWrap247-happyOut247 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut247 #-}-newtype HappyWrap248 = HappyWrap248 (forall b. DisambECP b => PV (Located (OrdList AddEpAnn,[LStmt GhcPs (LocatedA b)])))-happyIn248 :: (forall b. DisambECP b => PV (Located (OrdList AddEpAnn,[LStmt GhcPs (LocatedA b)]))) -> (HappyAbsSyn )-happyIn248 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap248 x)-{-# INLINE happyIn248 #-}-happyOut248 :: (HappyAbsSyn ) -> HappyWrap248-happyOut248 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut248 #-}-newtype HappyWrap249 = HappyWrap249 (Maybe (LStmt GhcPs (LHsExpr GhcPs)))-happyIn249 :: (Maybe (LStmt GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )-happyIn249 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap249 x)-{-# INLINE happyIn249 #-}-happyOut249 :: (HappyAbsSyn ) -> HappyWrap249-happyOut249 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut249 #-}-newtype HappyWrap250 = HappyWrap250 (LStmt GhcPs (LHsExpr GhcPs))-happyIn250 :: (LStmt GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn250 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap250 x)-{-# INLINE happyIn250 #-}-happyOut250 :: (HappyAbsSyn ) -> HappyWrap250-happyOut250 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut250 #-}-newtype HappyWrap251 = HappyWrap251 (forall b. DisambECP b => PV (LStmt GhcPs (LocatedA b)))-happyIn251 :: (forall b. DisambECP b => PV (LStmt GhcPs (LocatedA b))) -> (HappyAbsSyn )-happyIn251 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap251 x)-{-# INLINE happyIn251 #-}-happyOut251 :: (HappyAbsSyn ) -> HappyWrap251-happyOut251 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut251 #-}-newtype HappyWrap252 = HappyWrap252 (forall b. DisambECP b => PV (LStmt GhcPs (LocatedA b)))-happyIn252 :: (forall b. DisambECP b => PV (LStmt GhcPs (LocatedA b))) -> (HappyAbsSyn )-happyIn252 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap252 x)-{-# INLINE happyIn252 #-}-happyOut252 :: (HappyAbsSyn ) -> HappyWrap252-happyOut252 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut252 #-}-newtype HappyWrap253 = HappyWrap253 (forall b. DisambECP b => PV ([Fbind b], Maybe SrcSpan))-happyIn253 :: (forall b. DisambECP b => PV ([Fbind b], Maybe SrcSpan)) -> (HappyAbsSyn )-happyIn253 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap253 x)-{-# INLINE happyIn253 #-}-happyOut253 :: (HappyAbsSyn ) -> HappyWrap253-happyOut253 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut253 #-}-newtype HappyWrap254 = HappyWrap254 (forall b. DisambECP b => PV ([Fbind b], Maybe SrcSpan))-happyIn254 :: (forall b. DisambECP b => PV ([Fbind b], Maybe SrcSpan)) -> (HappyAbsSyn )-happyIn254 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap254 x)-{-# INLINE happyIn254 #-}-happyOut254 :: (HappyAbsSyn ) -> HappyWrap254-happyOut254 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut254 #-}-newtype HappyWrap255 = HappyWrap255 (forall b. DisambECP b => PV (Fbind b))-happyIn255 :: (forall b. DisambECP b => PV (Fbind b)) -> (HappyAbsSyn )-happyIn255 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap255 x)-{-# INLINE happyIn255 #-}-happyOut255 :: (HappyAbsSyn ) -> HappyWrap255-happyOut255 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut255 #-}-newtype HappyWrap256 = HappyWrap256 (Located [LocatedAn NoEpAnns (DotFieldOcc GhcPs)])-happyIn256 :: (Located [LocatedAn NoEpAnns (DotFieldOcc GhcPs)]) -> (HappyAbsSyn )-happyIn256 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap256 x)-{-# INLINE happyIn256 #-}-happyOut256 :: (HappyAbsSyn ) -> HappyWrap256-happyOut256 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut256 #-}-newtype HappyWrap257 = HappyWrap257 (Located [LIPBind GhcPs])-happyIn257 :: (Located [LIPBind GhcPs]) -> (HappyAbsSyn )-happyIn257 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap257 x)-{-# INLINE happyIn257 #-}-happyOut257 :: (HappyAbsSyn ) -> HappyWrap257-happyOut257 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut257 #-}-newtype HappyWrap258 = HappyWrap258 (LIPBind GhcPs)-happyIn258 :: (LIPBind GhcPs) -> (HappyAbsSyn )-happyIn258 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap258 x)-{-# INLINE happyIn258 #-}-happyOut258 :: (HappyAbsSyn ) -> HappyWrap258-happyOut258 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut258 #-}-newtype HappyWrap259 = HappyWrap259 (Located HsIPName)-happyIn259 :: (Located HsIPName) -> (HappyAbsSyn )-happyIn259 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap259 x)-{-# INLINE happyIn259 #-}-happyOut259 :: (HappyAbsSyn ) -> HappyWrap259-happyOut259 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut259 #-}-newtype HappyWrap260 = HappyWrap260 (Located (SourceText, FastString))-happyIn260 :: (Located (SourceText, FastString)) -> (HappyAbsSyn )-happyIn260 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap260 x)-{-# INLINE happyIn260 #-}-happyOut260 :: (HappyAbsSyn ) -> HappyWrap260-happyOut260 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut260 #-}-newtype HappyWrap261 = HappyWrap261 (LBooleanFormula (LocatedN RdrName))-happyIn261 :: (LBooleanFormula (LocatedN RdrName)) -> (HappyAbsSyn )-happyIn261 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap261 x)-{-# INLINE happyIn261 #-}-happyOut261 :: (HappyAbsSyn ) -> HappyWrap261-happyOut261 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut261 #-}-newtype HappyWrap262 = HappyWrap262 (LBooleanFormula (LocatedN RdrName))-happyIn262 :: (LBooleanFormula (LocatedN RdrName)) -> (HappyAbsSyn )-happyIn262 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap262 x)-{-# INLINE happyIn262 #-}-happyOut262 :: (HappyAbsSyn ) -> HappyWrap262-happyOut262 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut262 #-}-newtype HappyWrap263 = HappyWrap263 (LBooleanFormula (LocatedN RdrName))-happyIn263 :: (LBooleanFormula (LocatedN RdrName)) -> (HappyAbsSyn )-happyIn263 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap263 x)-{-# INLINE happyIn263 #-}-happyOut263 :: (HappyAbsSyn ) -> HappyWrap263-happyOut263 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut263 #-}-newtype HappyWrap264 = HappyWrap264 ([LBooleanFormula (LocatedN RdrName)])-happyIn264 :: ([LBooleanFormula (LocatedN RdrName)]) -> (HappyAbsSyn )-happyIn264 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap264 x)-{-# INLINE happyIn264 #-}-happyOut264 :: (HappyAbsSyn ) -> HappyWrap264-happyOut264 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut264 #-}-newtype HappyWrap265 = HappyWrap265 (LBooleanFormula (LocatedN RdrName))-happyIn265 :: (LBooleanFormula (LocatedN RdrName)) -> (HappyAbsSyn )-happyIn265 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap265 x)-{-# INLINE happyIn265 #-}-happyOut265 :: (HappyAbsSyn ) -> HappyWrap265-happyOut265 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut265 #-}-newtype HappyWrap266 = HappyWrap266 (Located [LocatedN RdrName])-happyIn266 :: (Located [LocatedN RdrName]) -> (HappyAbsSyn )-happyIn266 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap266 x)-{-# INLINE happyIn266 #-}-happyOut266 :: (HappyAbsSyn ) -> HappyWrap266-happyOut266 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut266 #-}-newtype HappyWrap267 = HappyWrap267 (LocatedN RdrName)-happyIn267 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn267 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap267 x)-{-# INLINE happyIn267 #-}-happyOut267 :: (HappyAbsSyn ) -> HappyWrap267-happyOut267 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut267 #-}-newtype HappyWrap268 = HappyWrap268 (LocatedN RdrName)-happyIn268 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn268 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap268 x)-{-# INLINE happyIn268 #-}-happyOut268 :: (HappyAbsSyn ) -> HappyWrap268-happyOut268 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut268 #-}-newtype HappyWrap269 = HappyWrap269 (LocatedN RdrName)-happyIn269 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn269 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap269 x)-{-# INLINE happyIn269 #-}-happyOut269 :: (HappyAbsSyn ) -> HappyWrap269-happyOut269 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut269 #-}-newtype HappyWrap270 = HappyWrap270 (LocatedN RdrName)-happyIn270 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn270 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap270 x)-{-# INLINE happyIn270 #-}-happyOut270 :: (HappyAbsSyn ) -> HappyWrap270-happyOut270 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut270 #-}-newtype HappyWrap271 = HappyWrap271 (LocatedN RdrName)-happyIn271 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn271 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap271 x)-{-# INLINE happyIn271 #-}-happyOut271 :: (HappyAbsSyn ) -> HappyWrap271-happyOut271 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut271 #-}-newtype HappyWrap272 = HappyWrap272 (Located (NonEmpty (LocatedN RdrName)))-happyIn272 :: (Located (NonEmpty (LocatedN RdrName))) -> (HappyAbsSyn )-happyIn272 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap272 x)-{-# INLINE happyIn272 #-}-happyOut272 :: (HappyAbsSyn ) -> HappyWrap272-happyOut272 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut272 #-}-newtype HappyWrap273 = HappyWrap273 (Located [LocatedN RdrName])-happyIn273 :: (Located [LocatedN RdrName]) -> (HappyAbsSyn )-happyIn273 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap273 x)-{-# INLINE happyIn273 #-}-happyOut273 :: (HappyAbsSyn ) -> HappyWrap273-happyOut273 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut273 #-}-newtype HappyWrap274 = HappyWrap274 (LocatedN DataCon)-happyIn274 :: (LocatedN DataCon) -> (HappyAbsSyn )-happyIn274 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap274 x)-{-# INLINE happyIn274 #-}-happyOut274 :: (HappyAbsSyn ) -> HappyWrap274-happyOut274 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut274 #-}-newtype HappyWrap275 = HappyWrap275 (LocatedN DataCon)-happyIn275 :: (LocatedN DataCon) -> (HappyAbsSyn )-happyIn275 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap275 x)-{-# INLINE happyIn275 #-}-happyOut275 :: (HappyAbsSyn ) -> HappyWrap275-happyOut275 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut275 #-}-newtype HappyWrap276 = HappyWrap276 (LocatedN RdrName)-happyIn276 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn276 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap276 x)-{-# INLINE happyIn276 #-}-happyOut276 :: (HappyAbsSyn ) -> HappyWrap276-happyOut276 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut276 #-}-newtype HappyWrap277 = HappyWrap277 (LocatedN RdrName)-happyIn277 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn277 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap277 x)-{-# INLINE happyIn277 #-}-happyOut277 :: (HappyAbsSyn ) -> HappyWrap277-happyOut277 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut277 #-}-newtype HappyWrap278 = HappyWrap278 (LocatedN RdrName)-happyIn278 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn278 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap278 x)-{-# INLINE happyIn278 #-}-happyOut278 :: (HappyAbsSyn ) -> HappyWrap278-happyOut278 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut278 #-}-newtype HappyWrap279 = HappyWrap279 (LocatedN RdrName)-happyIn279 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn279 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap279 x)-{-# INLINE happyIn279 #-}-happyOut279 :: (HappyAbsSyn ) -> HappyWrap279-happyOut279 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut279 #-}-newtype HappyWrap280 = HappyWrap280 (LocatedN RdrName)-happyIn280 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn280 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap280 x)-{-# INLINE happyIn280 #-}-happyOut280 :: (HappyAbsSyn ) -> HappyWrap280-happyOut280 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut280 #-}-newtype HappyWrap281 = HappyWrap281 (LocatedN RdrName)-happyIn281 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn281 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap281 x)-{-# INLINE happyIn281 #-}-happyOut281 :: (HappyAbsSyn ) -> HappyWrap281-happyOut281 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut281 #-}-newtype HappyWrap282 = HappyWrap282 (LocatedN RdrName)-happyIn282 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn282 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap282 x)-{-# INLINE happyIn282 #-}-happyOut282 :: (HappyAbsSyn ) -> HappyWrap282-happyOut282 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut282 #-}-newtype HappyWrap283 = HappyWrap283 (LocatedN RdrName)-happyIn283 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn283 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap283 x)-{-# INLINE happyIn283 #-}-happyOut283 :: (HappyAbsSyn ) -> HappyWrap283-happyOut283 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut283 #-}-newtype HappyWrap284 = HappyWrap284 (LocatedN RdrName)-happyIn284 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn284 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap284 x)-{-# INLINE happyIn284 #-}-happyOut284 :: (HappyAbsSyn ) -> HappyWrap284-happyOut284 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut284 #-}-newtype HappyWrap285 = HappyWrap285 (LocatedN RdrName)-happyIn285 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn285 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap285 x)-{-# INLINE happyIn285 #-}-happyOut285 :: (HappyAbsSyn ) -> HappyWrap285-happyOut285 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut285 #-}-newtype HappyWrap286 = HappyWrap286 (LocatedN RdrName)-happyIn286 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn286 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap286 x)-{-# INLINE happyIn286 #-}-happyOut286 :: (HappyAbsSyn ) -> HappyWrap286-happyOut286 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut286 #-}-newtype HappyWrap287 = HappyWrap287 (LocatedN RdrName)-happyIn287 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn287 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap287 x)-{-# INLINE happyIn287 #-}-happyOut287 :: (HappyAbsSyn ) -> HappyWrap287-happyOut287 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut287 #-}-newtype HappyWrap288 = HappyWrap288 (LocatedN RdrName)-happyIn288 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn288 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap288 x)-{-# INLINE happyIn288 #-}-happyOut288 :: (HappyAbsSyn ) -> HappyWrap288-happyOut288 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut288 #-}-newtype HappyWrap289 = HappyWrap289 (LocatedN RdrName)-happyIn289 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn289 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap289 x)-{-# INLINE happyIn289 #-}-happyOut289 :: (HappyAbsSyn ) -> HappyWrap289-happyOut289 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut289 #-}-newtype HappyWrap290 = HappyWrap290 (forall b. DisambInfixOp b => PV (LocatedN b))-happyIn290 :: (forall b. DisambInfixOp b => PV (LocatedN b)) -> (HappyAbsSyn )-happyIn290 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap290 x)-{-# INLINE happyIn290 #-}-happyOut290 :: (HappyAbsSyn ) -> HappyWrap290-happyOut290 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut290 #-}-newtype HappyWrap291 = HappyWrap291 (forall b. DisambInfixOp b => PV (LocatedN b))-happyIn291 :: (forall b. DisambInfixOp b => PV (LocatedN b)) -> (HappyAbsSyn )-happyIn291 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap291 x)-{-# INLINE happyIn291 #-}-happyOut291 :: (HappyAbsSyn ) -> HappyWrap291-happyOut291 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut291 #-}-newtype HappyWrap292 = HappyWrap292 (forall b. DisambInfixOp b => PV (Located b))-happyIn292 :: (forall b. DisambInfixOp b => PV (Located b)) -> (HappyAbsSyn )-happyIn292 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap292 x)-{-# INLINE happyIn292 #-}-happyOut292 :: (HappyAbsSyn ) -> HappyWrap292-happyOut292 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut292 #-}-newtype HappyWrap293 = HappyWrap293 (LocatedN RdrName)-happyIn293 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn293 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap293 x)-{-# INLINE happyIn293 #-}-happyOut293 :: (HappyAbsSyn ) -> HappyWrap293-happyOut293 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut293 #-}-newtype HappyWrap294 = HappyWrap294 (LocatedN RdrName)-happyIn294 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn294 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap294 x)-{-# INLINE happyIn294 #-}-happyOut294 :: (HappyAbsSyn ) -> HappyWrap294-happyOut294 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut294 #-}-newtype HappyWrap295 = HappyWrap295 (LocatedN RdrName)-happyIn295 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn295 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap295 x)-{-# INLINE happyIn295 #-}-happyOut295 :: (HappyAbsSyn ) -> HappyWrap295-happyOut295 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut295 #-}-newtype HappyWrap296 = HappyWrap296 (LocatedN RdrName)-happyIn296 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn296 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap296 x)-{-# INLINE happyIn296 #-}-happyOut296 :: (HappyAbsSyn ) -> HappyWrap296-happyOut296 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut296 #-}-newtype HappyWrap297 = HappyWrap297 (LocatedN RdrName)-happyIn297 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn297 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap297 x)-{-# INLINE happyIn297 #-}-happyOut297 :: (HappyAbsSyn ) -> HappyWrap297-happyOut297 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut297 #-}-newtype HappyWrap298 = HappyWrap298 (LocatedN RdrName)-happyIn298 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn298 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap298 x)-{-# INLINE happyIn298 #-}-happyOut298 :: (HappyAbsSyn ) -> HappyWrap298-happyOut298 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut298 #-}-newtype HappyWrap299 = HappyWrap299 (LocatedN RdrName)-happyIn299 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn299 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap299 x)-{-# INLINE happyIn299 #-}-happyOut299 :: (HappyAbsSyn ) -> HappyWrap299-happyOut299 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut299 #-}-newtype HappyWrap300 = HappyWrap300 (LocatedN FieldLabelString)-happyIn300 :: (LocatedN FieldLabelString) -> (HappyAbsSyn )-happyIn300 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap300 x)-{-# INLINE happyIn300 #-}-happyOut300 :: (HappyAbsSyn ) -> HappyWrap300-happyOut300 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut300 #-}-newtype HappyWrap301 = HappyWrap301 (LocatedN RdrName)-happyIn301 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn301 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap301 x)-{-# INLINE happyIn301 #-}-happyOut301 :: (HappyAbsSyn ) -> HappyWrap301-happyOut301 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut301 #-}-newtype HappyWrap302 = HappyWrap302 (LocatedN RdrName)-happyIn302 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn302 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap302 x)-{-# INLINE happyIn302 #-}-happyOut302 :: (HappyAbsSyn ) -> HappyWrap302-happyOut302 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut302 #-}-newtype HappyWrap303 = HappyWrap303 (LocatedN RdrName)-happyIn303 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn303 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap303 x)-{-# INLINE happyIn303 #-}-happyOut303 :: (HappyAbsSyn ) -> HappyWrap303-happyOut303 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut303 #-}-newtype HappyWrap304 = HappyWrap304 (LocatedN RdrName)-happyIn304 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn304 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap304 x)-{-# INLINE happyIn304 #-}-happyOut304 :: (HappyAbsSyn ) -> HappyWrap304-happyOut304 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut304 #-}-newtype HappyWrap305 = HappyWrap305 (LocatedN RdrName)-happyIn305 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn305 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap305 x)-{-# INLINE happyIn305 #-}-happyOut305 :: (HappyAbsSyn ) -> HappyWrap305-happyOut305 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut305 #-}-newtype HappyWrap306 = HappyWrap306 (LocatedN RdrName)-happyIn306 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn306 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap306 x)-{-# INLINE happyIn306 #-}-happyOut306 :: (HappyAbsSyn ) -> HappyWrap306-happyOut306 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut306 #-}-newtype HappyWrap307 = HappyWrap307 (LocatedN RdrName)-happyIn307 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn307 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap307 x)-{-# INLINE happyIn307 #-}-happyOut307 :: (HappyAbsSyn ) -> HappyWrap307-happyOut307 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut307 #-}-newtype HappyWrap308 = HappyWrap308 (Located FastString)-happyIn308 :: (Located FastString) -> (HappyAbsSyn )-happyIn308 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap308 x)-{-# INLINE happyIn308 #-}-happyOut308 :: (HappyAbsSyn ) -> HappyWrap308-happyOut308 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut308 #-}-newtype HappyWrap309 = HappyWrap309 (Located FastString)-happyIn309 :: (Located FastString) -> (HappyAbsSyn )-happyIn309 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap309 x)-{-# INLINE happyIn309 #-}-happyOut309 :: (HappyAbsSyn ) -> HappyWrap309-happyOut309 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut309 #-}-newtype HappyWrap310 = HappyWrap310 (LocatedN RdrName)-happyIn310 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn310 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap310 x)-{-# INLINE happyIn310 #-}-happyOut310 :: (HappyAbsSyn ) -> HappyWrap310-happyOut310 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut310 #-}-newtype HappyWrap311 = HappyWrap311 (LocatedN RdrName)-happyIn311 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn311 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap311 x)-{-# INLINE happyIn311 #-}-happyOut311 :: (HappyAbsSyn ) -> HappyWrap311-happyOut311 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut311 #-}-newtype HappyWrap312 = HappyWrap312 (LocatedN RdrName)-happyIn312 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn312 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap312 x)-{-# INLINE happyIn312 #-}-happyOut312 :: (HappyAbsSyn ) -> HappyWrap312-happyOut312 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut312 #-}-newtype HappyWrap313 = HappyWrap313 (LocatedN RdrName)-happyIn313 :: (LocatedN RdrName) -> (HappyAbsSyn )-happyIn313 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap313 x)-{-# INLINE happyIn313 #-}-happyOut313 :: (HappyAbsSyn ) -> HappyWrap313-happyOut313 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut313 #-}-newtype HappyWrap314 = HappyWrap314 (Located (HsLit GhcPs))-happyIn314 :: (Located (HsLit GhcPs)) -> (HappyAbsSyn )-happyIn314 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap314 x)-{-# INLINE happyIn314 #-}-happyOut314 :: (HappyAbsSyn ) -> HappyWrap314-happyOut314 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut314 #-}-newtype HappyWrap315 = HappyWrap315 (())-happyIn315 :: (()) -> (HappyAbsSyn )-happyIn315 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap315 x)-{-# INLINE happyIn315 #-}-happyOut315 :: (HappyAbsSyn ) -> HappyWrap315-happyOut315 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut315 #-}-newtype HappyWrap316 = HappyWrap316 (LocatedA ModuleName)-happyIn316 :: (LocatedA ModuleName) -> (HappyAbsSyn )-happyIn316 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap316 x)-{-# INLINE happyIn316 #-}-happyOut316 :: (HappyAbsSyn ) -> HappyWrap316-happyOut316 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut316 #-}-newtype HappyWrap317 = HappyWrap317 (([SrcSpan],Int))-happyIn317 :: (([SrcSpan],Int)) -> (HappyAbsSyn )-happyIn317 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap317 x)-{-# INLINE happyIn317 #-}-happyOut317 :: (HappyAbsSyn ) -> HappyWrap317-happyOut317 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut317 #-}-newtype HappyWrap318 = HappyWrap318 (([SrcSpan],Int))-happyIn318 :: (([SrcSpan],Int)) -> (HappyAbsSyn )-happyIn318 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap318 x)-{-# INLINE happyIn318 #-}-happyOut318 :: (HappyAbsSyn ) -> HappyWrap318-happyOut318 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut318 #-}-newtype HappyWrap319 = HappyWrap319 (([SrcSpan],Int))-happyIn319 :: (([SrcSpan],Int)) -> (HappyAbsSyn )-happyIn319 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap319 x)-{-# INLINE happyIn319 #-}-happyOut319 :: (HappyAbsSyn ) -> HappyWrap319-happyOut319 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut319 #-}-newtype HappyWrap320 = HappyWrap320 (forall b. DisambECP b => PV (LocatedL [LMatch GhcPs (LocatedA b)]))-happyIn320 :: (forall b. DisambECP b => PV (LocatedL [LMatch GhcPs (LocatedA b)])) -> (HappyAbsSyn )-happyIn320 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap320 x)-{-# INLINE happyIn320 #-}-happyOut320 :: (HappyAbsSyn ) -> HappyWrap320-happyOut320 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut320 #-}-newtype HappyWrap321 = HappyWrap321 (forall b. DisambECP b => PV (LocatedL [LMatch GhcPs (LocatedA b)]))-happyIn321 :: (forall b. DisambECP b => PV (LocatedL [LMatch GhcPs (LocatedA b)])) -> (HappyAbsSyn )-happyIn321 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap321 x)-{-# INLINE happyIn321 #-}-happyOut321 :: (HappyAbsSyn ) -> HappyWrap321-happyOut321 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut321 #-}-newtype HappyWrap322 = HappyWrap322 (ECP)-happyIn322 :: (ECP) -> (HappyAbsSyn )-happyIn322 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap322 x)-{-# INLINE happyIn322 #-}-happyOut322 :: (HappyAbsSyn ) -> HappyWrap322-happyOut322 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut322 #-}-newtype HappyWrap323 = HappyWrap323 (ECP)-happyIn323 :: (ECP) -> (HappyAbsSyn )-happyIn323 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap323 x)-{-# INLINE happyIn323 #-}-happyOut323 :: (HappyAbsSyn ) -> HappyWrap323-happyOut323 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut323 #-}-newtype HappyWrap324 = HappyWrap324 (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)])))-happyIn324 :: (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)]))) -> (HappyAbsSyn )-happyIn324 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap324 x)-{-# INLINE happyIn324 #-}-happyOut324 :: (HappyAbsSyn ) -> HappyWrap324-happyOut324 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut324 #-}-newtype HappyWrap325 = HappyWrap325 (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)])))-happyIn325 :: (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)]))) -> (HappyAbsSyn )-happyIn325 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap325 x)-{-# INLINE happyIn325 #-}-happyOut325 :: (HappyAbsSyn ) -> HappyWrap325-happyOut325 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut325 #-}-newtype HappyWrap326 = HappyWrap326 (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)])))-happyIn326 :: (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)]))) -> (HappyAbsSyn )-happyIn326 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap326 x)-{-# INLINE happyIn326 #-}-happyOut326 :: (HappyAbsSyn ) -> HappyWrap326-happyOut326 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut326 #-}-newtype HappyWrap327 = HappyWrap327 (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)])))-happyIn327 :: (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)]))) -> (HappyAbsSyn )-happyIn327 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap327 x)-{-# INLINE happyIn327 #-}-happyOut327 :: (HappyAbsSyn ) -> HappyWrap327-happyOut327 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut327 #-}-newtype HappyWrap328 = HappyWrap328 (forall b. DisambECP b => PV (LMatch GhcPs (LocatedA b)))-happyIn328 :: (forall b. DisambECP b => PV (LMatch GhcPs (LocatedA b))) -> (HappyAbsSyn )-happyIn328 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap328 x)-{-# INLINE happyIn328 #-}-happyOut328 :: (HappyAbsSyn ) -> HappyWrap328-happyOut328 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut328 #-}-newtype HappyWrap329 = HappyWrap329 (forall b. DisambECP b => PV (LMatch GhcPs (LocatedA b)))-happyIn329 :: (forall b. DisambECP b => PV (LMatch GhcPs (LocatedA b))) -> (HappyAbsSyn )-happyIn329 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap329 x)-{-# INLINE happyIn329 #-}-happyOut329 :: (HappyAbsSyn ) -> HappyWrap329-happyOut329 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut329 #-}-happyInTok :: ((Located Token)) -> (HappyAbsSyn )-happyInTok x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyInTok #-}-happyOutTok :: (HappyAbsSyn ) -> ((Located Token))-happyOutTok x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOutTok #-}---happyExpList :: HappyAddr-happyExpList = HappyA# "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\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\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xff\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xd7\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x6f\xbe\xea\xff\x5f\xfe\xdf\x33\x08\x02\x3c\x00\x50\x85\x33\xff\xff\xeb\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\x70\x30\x10\xd1\xff\x2f\xfe\x40\x00\x00\x01\x1e\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x18\x88\xe8\xff\x17\x7f\x20\x00\x80\x00\x0f\x00\x54\xe1\xcc\xff\xff\xfa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xcc\x45\xf4\xff\xcb\xff\x13\x04\x41\x80\x07\x00\xaa\x70\xe6\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x06\x22\xfa\xff\xc7\x1f\x08\x00\x20\xc0\x03\x00\x55\x38\xf3\xff\xbf\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x01\x10\xfd\x7f\xc2\x0f\x00\x00\x02\x22\x42\x80\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\x80\x81\x00\x88\x7e\x3e\xe1\x07\x30\x00\x01\x70\x21\x44\x05\xbf\xd3\x01\x80\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\x40\x00\x00\x00\x80\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\x20\x10\x00\xd1\xff\x27\xfc\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x21\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x18\x08\x80\xe0\xe7\x13\x7e\x00\x03\x10\x00\x17\x42\x54\xf0\x3b\x1c\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\xc0\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\x18\x08\x80\xe0\xe7\x13\x7e\x00\x03\x10\x00\x17\x52\x54\xf0\x3b\x1c\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x20\xf8\xf9\x84\x1f\x00\x00\x00\x00\x00\x10\x04\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x06\x02\x20\xf8\xf9\x84\x1f\x00\x00\x00\x80\x05\x10\x15\x38\x02\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\xfc\x7c\xc2\x0f\x00\x00\x00\xc0\x02\x88\x0a\x1c\x81\x03\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x20\x00\xa2\xff\x4f\xf8\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\x30\x10\x00\xd1\xcf\x27\xfc\x00\x06\x20\x00\x2e\x84\xb8\xe0\x77\x3a\x00\x90\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x80\xe8\xe7\x13\x7e\x00\x03\x10\x10\x17\x42\x74\xf8\x3b\x1d\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x82\x0b\x21\x6a\xfc\x9d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x20\xf8\xf9\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x30\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x10\xfd\x7f\xc2\x0f\x00\x00\x02\x20\x42\x80\x0a\x7a\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\x00\xd1\xff\x27\xfc\x00\x00\x00\x00\x00\x00\xa8\xc2\x19\xfe\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\x10\x11\x02\x20\x08\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\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\x04\x02\x20\xfa\xff\x84\x1f\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x20\x7e\x00\x00\x62\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xd7\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x60\x20\xa2\xff\x5f\xf8\x01\x00\x00\x02\x38\x40\x50\x85\x33\xff\xff\xeb\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\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x70\x30\x10\xd1\xff\x2f\xfe\x40\x00\x00\x01\x1e\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x18\x88\xe8\xff\x17\x7f\x20\x00\x80\x04\x0f\x40\x54\xe1\xcc\xff\xff\xfa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0e\x06\x22\xfa\xff\x85\x1f\x00\x00\x20\x80\x03\x00\x55\x38\xf3\xff\xbf\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x83\x81\x88\xfe\x7f\xe1\x07\x00\x00\x08\xe0\x00\x40\x15\xce\xfc\xff\xaf\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\x02\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\xe0\x60\x20\xa2\xff\x5f\xf8\x01\x00\x00\x0e\x38\x00\x50\x85\x33\xff\xff\xeb\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\x70\x30\x10\xd1\xff\x2f\xfe\x00\x00\x00\x01\x1c\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x18\x88\xe8\xff\x17\x7e\x00\x00\x80\x00\x0e\x00\x54\xe1\xcc\xff\xff\xfa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x0b\x3f\x00\x00\x40\x00\x07\x00\xaa\x70\xe6\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x06\x22\xfa\xff\x85\x1f\x00\x00\x20\x80\x03\x00\x55\x38\xf3\xff\xbf\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x03\x11\xfd\xff\xe2\x0f\x04\x00\x12\xe0\x43\x80\x2b\xfe\xff\xff\x5f\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x83\x81\x88\xfe\x7f\xf1\x07\x02\x00\x49\xf0\x61\x40\x97\xff\xff\xff\xaf\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x80\x24\xf8\x10\xa0\xce\xff\xff\xff\xd7\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x60\x20\xa2\xff\x5f\xf8\x01\x00\x00\x02\x38\x00\x50\x85\x33\xff\xff\xeb\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\x20\x10\x00\xd1\xff\x27\xfc\x00\x00\x00\x00\x00\x00\xa8\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\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\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xd7\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x60\x20\xa2\xff\x5f\xfc\x01\x00\x00\x02\x3c\x00\x50\x85\x33\xff\xff\xeb\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\x30\x10\x00\xd1\xcf\x27\xfc\x00\x06\x20\x00\x2e\x84\xa8\xe0\x77\x3a\x00\x90\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x02\x20\xfa\xff\x84\x1f\x00\x00\x00\x00\x00\x00\x55\x38\xc3\xff\xbf\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x01\x10\xfc\x7c\xc2\x0f\x00\x00\x00\x00\x00\x80\x0a\x18\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x60\x00\x22\x04\x00\x20\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x50\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\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x08\x80\xe8\xff\x13\x7e\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\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x01\x10\xfd\x7f\xc2\x0f\x00\x00\x00\x00\x00\x00\x02\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x88\xfe\x3f\xe1\x07\x00\x00\x00\x00\x00\x40\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\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\xe0\x60\x20\xa2\xff\x5f\xfc\x81\x00\x40\x12\x7c\x18\xd0\xe5\xff\xff\xff\xeb\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x22\x04\x00\x20\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x08\x80\xe0\xe7\x13\x7e\x00\x03\x10\x00\x17\x42\x54\xf0\x3b\x1c\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x04\x00\x00\xc0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x60\x22\x10\x82\xff\x4f\xf8\x01\x0c\x40\x00\x5c\x08\x51\xc1\xef\x70\x00\x20\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\x40\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\x10\x08\x80\xe8\xff\x13\x7e\x00\x00\x00\x00\x00\x00\x54\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\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\x04\x02\x20\xfa\xff\x84\x1f\x00\x00\x00\x00\x00\x00\x15\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\x02\x01\x10\xfd\x7f\xc2\x0f\x00\x00\x00\x00\x00\x80\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\x81\x00\xa9\xfe\x3f\xe1\x07\x00\x00\x00\x00\x00\x40\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x1c\x0c\x44\xf4\xff\x0b\x3f\x00\x00\x40\x00\x07\x00\xaa\x70\xe6\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x30\x10\xd1\xff\x2f\xfc\x00\x00\x00\x01\x1c\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x80\x08\x01\x10\x84\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\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\x40\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\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\x10\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\x04\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\x02\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\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\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x44\xff\x9f\xf0\x03\x00\x00\x00\x00\x00\x02\x40\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\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\x10\x00\x00\x00\x20\x08\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x00\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x20\xf8\xf9\x84\x1f\xc0\x00\x04\xc0\x85\x10\x15\xfc\x0e\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x81\x00\x88\x7e\x3e\xe1\x07\x30\x00\x01\x70\x21\x44\x05\xbf\xd3\x01\x80\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\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\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\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x20\x00\xa2\x9f\x4f\xf8\x01\x0c\x40\x00\x5c\x08\x51\xc1\xef\x74\x00\x20\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\x30\x10\x00\xd1\xcf\x27\xfc\x00\x06\x20\x00\x2e\x84\xa8\xe0\x77\x3a\x00\x90\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x80\xe0\xe7\x13\x7e\x00\x03\x10\x00\x17\x42\x54\xf0\x3b\x1c\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\xe0\x60\x20\xa2\xff\x5f\xfc\x81\x00\x00\x02\x3c\x00\x50\x85\x33\xff\xff\xeb\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x20\xfa\xff\x84\x1f\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x81\x00\x08\x7e\x3e\xe1\x07\x30\x00\x01\x70\x21\x44\x05\xbf\xc3\x01\x80\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\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\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\x60\x00\xe2\x07\x00\x20\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x10\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x83\x81\x88\xfe\x7f\xf1\x07\x00\x00\x08\xf0\x00\x40\x15\xce\xfc\xff\xaf\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x80\x83\x81\x88\xfe\x7f\xf1\x07\x02\x00\x09\xf0\x21\x40\x97\xff\xff\xff\xaf\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x80\x24\xf8\x10\xa0\x8a\xff\xff\xff\xd7\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\x70\x30\x10\xd1\xff\x2f\xfe\x00\x00\x00\x01\x1c\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\xe8\xff\x13\x7e\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\x03\x01\x10\xfd\x7f\xc2\x0f\x00\x00\x00\x00\x00\x00\x00\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x20\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x40\x00\x44\xff\x9f\xf0\x03\x00\x80\x00\x88\x10\xa0\x43\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x10\x00\xd1\xff\x27\xfc\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\x01\x00\x00\x80\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\x04\x02\x20\xfa\xff\x84\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\x03\x01\x10\xfd\x7c\xc2\x0f\x60\x00\x02\xe0\x42\x88\x0a\x7e\xa7\x03\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\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\x80\x40\x00\x44\xff\x9f\xf0\x03\x00\x00\x00\x00\x00\xa0\x02\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x1c\xcc\x45\xf4\xff\xcb\xff\x13\x04\x41\x80\x07\x00\xaa\x70\xe6\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\xe6\x22\xfa\xff\xe5\xff\x09\x82\x20\xc0\x03\x00\x55\x38\xf3\xff\xbf\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x01\x10\xfd\x7f\xc2\x0f\x00\x00\x00\x00\x00\x00\x02\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x81\x00\x88\x7e\x3e\xe1\x07\x30\x00\x01\x70\x21\x44\x05\xbf\xd3\x01\x80\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\x80\x80\x88\x10\x00\x80\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x22\x40\x00\x04\x61\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\x40\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x10\x21\x00\x00\x31\x03\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\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\x70\x30\x10\xd1\xff\x3f\xfe\x40\x00\x00\x01\x1e\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x18\x88\xe8\xff\x1f\x7f\x20\x00\x80\x00\x0f\x00\x54\xe1\xcc\xff\xff\xfa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\x21\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\x10\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x06\x22\xfa\xff\xc5\x1f\x08\x00\x24\xc0\x87\x00\x75\xfe\xff\xff\xbf\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x20\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\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\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\x80\x83\x81\x88\xfe\x7f\xe1\x07\x00\x00\x08\xe0\x00\x41\x15\xce\xfc\xff\xaf\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\xe0\x60\x20\xa2\xff\x5f\xf8\x01\x00\x00\x02\x38\x00\x50\x85\x33\xff\xff\xeb\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\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\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\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x04\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\x02\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\x80\x83\x81\x88\xfe\x7f\xf1\x07\x02\x00\x08\xf0\x00\x40\x15\xce\xfc\xff\xaf\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\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\x70\x30\x10\xd1\xff\x2f\xfc\x00\x00\x00\x01\x1c\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x18\x88\xe8\xff\x17\x7f\x20\x00\x80\x00\x0f\x00\x54\xe1\xcc\xff\xff\xfa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x04\x40\xf4\xff\x09\x3f\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\x04\x02\x20\xfa\xff\x84\x1f\x00\x00\x02\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x81\x00\x08\x7e\x3e\xe1\x07\x00\x00\x00\x60\x01\x44\x05\x8e\xc0\x01\x80\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\x60\x20\x00\xa2\x9f\x4f\xf8\x01\x0c\x40\x00\x5c\x08\x51\xc1\xef\x74\x00\x20\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\x70\x30\x10\xd1\xff\x2f\xfe\x40\x00\x00\x01\x1e\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x18\x88\xe8\xff\x17\x7f\x20\x00\x80\x00\x0f\x00\x54\xe1\xcc\xff\xff\xfa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x06\x22\xfa\xff\xc5\x1f\x08\x00\x20\xc0\x03\x00\x55\x38\xf3\xff\xbf\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x20\xfa\xf9\x84\x1f\xc0\x00\x04\xc0\x85\x10\x15\xfc\x4e\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\xfd\x7c\xc2\x0f\x60\x00\x02\xe0\x42\x88\x0e\x7f\xa7\x03\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\x00\x00\x00\x00\x81\x00\x88\xfe\x3f\xe1\x07\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\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\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x00\x00\x00\x00\x80\x08\x01\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\x02\x01\x10\xfd\x7f\xc2\x0f\x00\x00\x00\x00\x00\x80\x0a\x18\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\x08\x80\xe0\xe7\x13\x7e\x00\x00\x00\x00\x00\x40\x10\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x01\x10\xfc\x7c\xc2\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\x81\x00\x08\x7e\x3e\xe1\x07\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xdf\xe9\x00\x40\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x20\x00\x82\x9f\x4f\xf8\x01\x00\x00\x00\x58\x00\x51\x81\x23\x70\x00\x20\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\x18\x08\x80\xe0\xe7\x13\x7e\x00\x03\x10\x00\x17\x42\x54\xf0\x3b\x1c\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x20\xf8\xf9\x84\x1f\x00\x00\x00\x80\x05\x10\x15\x38\x02\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x81\x00\x88\x7e\x3e\xe1\x07\x30\x00\x01\x70\x21\x44\x05\xbf\xd3\x01\x80\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xdf\xe9\x00\x40\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x20\x00\x82\x9f\x4f\xf8\x01\x00\x00\x00\x58\x00\x51\x81\x23\x70\x00\x20\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\x30\x10\x00\xd1\xcf\x27\xfc\x00\x06\x20\x00\x2e\x84\xa8\xe0\x77\x3a\x00\x90\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x80\xe8\xe7\x13\x7e\x00\x03\x10\x00\x17\x42\x54\xf0\x3b\x1d\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x40\x00\x04\x07\x9f\xf0\x03\x00\x00\x00\x00\x00\x00\x00\x06\x40\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x20\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\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\x80\x04\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x20\x00\xa2\x9f\x4f\xf8\x01\x0c\x40\x00\x5c\x08\x51\xc1\xef\x74\x00\x20\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\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\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\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\x08\x04\x40\xf4\xff\x09\x3f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\xfd\x7c\xc2\x0f\x60\x00\x02\xe0\x42\x88\x0a\x7e\xa7\x03\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\x00\x00\x00\x00\x81\x00\x88\xfe\x3f\xe1\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\x60\x20\x00\xa2\x9f\x4f\xf8\x01\x0c\x40\x00\x5c\x08\x51\xc1\xef\x74\x00\x20\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x81\x00\x88\x7e\x3e\xe1\x07\x30\x00\x01\x70\x21\x44\x05\xbf\xd3\x01\x80\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x20\xfa\xf9\x84\x1f\xc0\x00\x04\xc0\x85\x10\x15\xfc\x4e\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\xfd\x7c\xc2\x0f\x60\x00\x02\xe0\x42\x88\x0a\x7e\xa7\x03\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x07\x03\x11\xfd\xff\xe2\x0f\x04\x00\x10\xe0\x01\x80\x2a\x9c\xf9\xff\x5f\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x83\x81\x88\xfe\x7f\xf1\x07\x02\x00\x08\xf0\x00\x40\x15\xce\xfc\xff\xaf\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x18\x88\xe8\xff\x17\x7e\x00\x00\x80\x00\x0e\x80\x54\xe5\xcc\xff\xff\xfa\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x0b\x3f\x00\x00\x40\x00\x07\x00\xab\x72\xe6\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x03\x11\xfd\xff\xe2\x0f\x04\x00\x10\xe0\x01\x90\xaa\x9c\xf9\xff\x5f\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x83\x81\x88\xfe\x7f\xf1\x07\x02\x00\x08\xf0\x00\x60\x55\xce\xfc\xff\xaf\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xd7\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\x70\x30\x10\xd1\xff\x2f\xfe\x40\x00\x20\x01\x3e\x04\xa8\xe2\xff\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x06\x62\xfa\xff\xc5\x1f\x08\x00\x20\xc0\x03\x00\x55\x38\xf3\xff\xbf\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x03\x11\xfd\xff\xe2\x0f\x04\x00\x12\xe0\x43\x80\x2a\xfe\xff\xff\x5f\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\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x48\x80\x0f\x01\xaa\xfc\xff\xff\x7f\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\x00\x00\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\x80\x83\x81\x88\xfe\x7f\xe1\x07\x00\x00\x08\xe0\x00\x40\x35\xce\xfc\xff\xaf\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\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\x80\xbf\xf9\xaa\xff\x7f\xf9\x7f\xcf\x20\x08\xf0\x00\x40\x15\xce\xfc\xff\xaf\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x20\xfa\xff\x84\x1f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\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\x08\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\x18\x80\x08\x01\x00\x88\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x15\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\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\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x02\x01\x10\xfd\x7f\xc2\x0f\x00\x00\x00\x00\x00\x80\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\x81\x00\x88\xfe\x3f\xe1\x07\x00\x00\x00\x00\x00\x40\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xa8\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\x54\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\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\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\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\x40\x00\x44\x08\x00\x40\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x04\x40\xf4\xff\x09\x3f\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\x07\x03\x11\xfd\xff\xe2\x0f\x04\x00\x10\xe0\x01\x80\x2a\x9c\xf9\xff\x5f\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x83\x81\x88\xfe\x7f\xf1\x07\x02\x00\x09\xf0\x21\x40\x15\xff\xff\xff\xaf\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\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\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\x30\x10\x00\xd1\xcf\x27\xfc\x00\x06\x20\x00\x2e\x84\xa8\xe0\x77\x38\x00\x90\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x03\x11\xfd\xff\xe2\x0f\x04\x00\x10\xe0\x01\x80\x2a\x9c\xf9\xff\x5f\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\x10\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\x38\x18\x88\xe8\xff\x17\x7f\x20\x00\x80\x00\x0f\x00\x54\xe1\xcc\xff\xff\xfa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x02\x20\xf8\xf9\x84\x1f\xc0\x00\x04\xc0\x85\x10\x15\xfc\x0e\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x78\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\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\x08\x80\x00\x01\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\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\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x40\x00\x04\x3f\x9f\xf0\x03\x00\x00\x00\x00\x00\x82\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\x60\x20\x00\xa2\x9f\x4f\xf8\x01\x0c\x40\x00\x5c\x08\x51\xc1\xef\x74\x00\x20\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\x30\x10\x00\xd1\xcf\x27\xfc\x00\x06\x20\x00\x2e\x84\xa8\xe0\x77\x3a\x00\x90\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x08\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\x00\xd1\xff\x27\xfc\x00\x00\x00\x00\x00\x00\x20\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\x10\x08\x80\xe8\xff\x13\x7e\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x02\x20\xfa\xf9\x84\x1f\xc0\x00\x04\xc0\x85\x10\x15\xfc\x4e\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x88\xfe\x3f\xe1\x07\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\x80\x40\x00\x44\xff\x9f\xf0\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\xe0\x60\x20\xa2\xff\x5f\xfc\x81\x00\x00\x02\x3c\x00\x50\x85\x33\xff\xff\xeb\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\x70\x30\x10\xd1\xff\x2f\xfe\x40\x00\x00\x01\x1e\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x00\x00\x00\x40\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\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\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\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x2a\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\x04\x02\x20\xfa\xff\x84\x1f\x00\x00\x00\x00\x00\x00\x15\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x44\xff\x9f\xf0\x03\x00\x00\x00\x00\x00\xa0\x02\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x30\x10\xd1\xff\x2f\xfc\x00\x00\x00\x01\x1c\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x02\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\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\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\xf0\x37\x5f\xf5\xff\x2f\xff\xef\x19\x04\x01\x1e\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x04\x48\xf5\xff\x49\x3f\x00\x00\x00\x00\x00\x00\x08\x64\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\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\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x00\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x02\x20\xfa\xff\x84\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\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\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\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\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\x02\x01\x10\xfd\x7f\xc2\x0f\x00\x00\x00\x00\x00\x00\x02\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x04\x40\xf4\xff\x09\x3f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x30\x10\x00\xd1\xcf\x27\xfc\x00\x06\x20\x00\x2e\x84\xa8\xe0\x77\x3a\x00\x90\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x20\xf8\xf9\x84\x1f\x00\x00\x00\x00\x00\x10\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\x80\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\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\x06\x02\x20\xfa\xf9\x84\x1f\xc0\x00\x04\xc0\x85\x10\x15\xfc\x4e\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\xfd\x7c\xc2\x0f\x60\x00\x02\xe0\x42\x88\x0a\x7e\xa7\x03\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x20\x00\xa2\x9f\x4f\xf8\x01\x0c\x40\x00\x5c\x08\x51\xc1\xef\x74\x00\x20\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\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\x08\x04\x40\xf0\xf3\x09\x3f\x00\x00\x00\x08\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x40\x20\x00\x82\x9f\x4f\xf8\x01\x00\x00\x00\x00\x00\x41\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x01\x10\xfd\x7c\xc2\x0f\x60\x00\x02\xe0\x42\x88\x0a\x7e\xa7\x03\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x60\x20\x00\xa2\x9f\x4f\xf8\x01\x0c\x40\x00\x5c\x08\x51\xc1\xef\x74\x00\x20\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\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\xc0\xc1\x5c\x44\xff\xbf\xfc\x3f\x41\x10\x04\x78\x00\xa0\x0a\x67\xfe\xff\xd7\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x60\x20\xa2\xff\x5f\xfc\x81\x00\x00\x02\x3c\x00\x50\x85\x33\xff\xff\xeb\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x44\x84\x00\x00\xc4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x70\x30\x10\xd1\xff\x3f\xfe\x40\x00\x00\x01\x1e\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xd7\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\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\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\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\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\x70\x30\x10\xd1\xff\x2f\xfe\x40\x00\x00\x01\x1e\x00\xa8\xca\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\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\x70\x30\x10\xd1\xff\x2f\xfc\x00\x00\x00\x01\x1c\x00\xa8\xca\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x83\x81\x88\xfe\x7f\xf1\x07\x02\x00\x08\xf0\x00\x40\x15\xce\xfc\xff\xaf\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xd7\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x60\x20\xa2\xff\x5f\xfc\x81\x00\x00\x02\x3c\x00\x50\x85\x33\xff\xff\xeb\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\x08\x04\x40\xf4\xff\x09\x3f\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\x0e\x06\x22\xfa\xff\xc5\x1f\x08\x00\x24\xc0\x87\x00\x55\xfc\xff\xff\xbf\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x01\x10\xfd\x7f\xc2\x0f\x00\x00\x01\x00\x00\x00\x02\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x20\x00\xa2\x9f\x4f\xf8\x01\x0c\x40\x00\x5c\x08\x51\xc1\xef\x74\x00\x20\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\xfd\x7c\xc2\x0f\x60\x00\x02\xe0\x42\x88\x0a\x7e\xa7\x03\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x04\x07\x9f\xf0\x03\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\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\x80\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf0\x03\x00\x00\x04\x70\x00\xa0\x0a\x67\xfe\xff\xd7\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x06\x22\xfa\xff\xc5\x1f\x08\x00\x20\xc0\x03\x00\x55\x38\xf3\xff\xbf\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xd7\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\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\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\x0e\x06\x62\xfa\xff\xc5\x1f\x08\x00\x20\xc0\x03\x00\x55\x38\xf3\xff\xbf\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x03\x31\xfd\xff\xe2\x0f\x04\x00\x10\xe0\x01\x80\x2a\x9c\xf9\xff\x5f\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x83\x81\x88\xfe\x7f\xf1\x07\x02\x00\x08\xf0\x00\x40\x15\xce\xfc\xff\xaf\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\x40\x00\x04\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xdf\xe1\x00\x40\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x20\x00\x82\x9f\x4f\xf8\x01\x00\x00\x00\x00\x00\x41\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\x00\x00\x00\x00\x00\x00\x00\x02\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\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\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\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\x30\x10\x00\xc1\xcf\x27\xfc\x00\x06\x20\x00\x2e\x84\xa8\xe0\x77\x38\x00\x90\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x83\x81\x88\xfe\x7f\xf1\x07\x02\x00\x08\xf0\x00\x40\x15\xce\xfc\xff\xaf\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\xe0\x66\x2e\xaa\xff\x5f\xfe\x9f\x20\x08\x02\x3c\x00\x50\x85\x33\xff\xff\xeb\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\x70\x33\x17\xd5\xff\x2f\xff\x4f\x10\x04\x01\x1e\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x31\x57\xd5\xff\x2f\xff\x4f\x10\x04\x01\x1e\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x98\xab\xea\xff\x97\xff\x27\x08\x82\x00\x0f\x00\x54\xe1\xcc\xff\xff\xfa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x40\x00\x04\x3f\x9f\xf0\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\x00\xc1\xcf\x27\xfc\x00\x06\x20\x00\x2e\x84\xa8\xe0\x77\x38\x00\x90\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x88\xfe\x3f\xe1\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\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x04\x40\xf4\xff\x09\x3f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x10\xfd\x7f\xc2\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\x05\x10\x21\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\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\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\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\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\x10\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\x2a\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\x04\x40\x84\x00\x00\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\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\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x81\x00\xa8\xfe\x3f\xe1\x07\x00\x80\x00\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\x80\x40\x80\x54\xff\x9f\xf4\x03\x00\x00\x00\x00\x00\x80\x00\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x07\x03\x11\xfd\xff\xe2\x0f\x04\x00\x10\xe0\x01\x80\x2a\x9c\xf9\xff\x5f\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x70\x30\x17\xd1\xff\x2f\xff\x4f\x10\x04\x01\x1e\x00\xa8\xc2\x99\xff\xff\xf5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x98\x8b\xe8\xff\x97\xff\x27\x08\x82\x00\x0f\x00\x54\xe1\xcc\xff\xff\xfa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\xfd\x7c\xc2\x0f\x60\x00\x02\xe0\x42\x88\x0a\x7e\xa7\x03\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\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\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\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x20\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\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\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\x02\x01\x10\xfc\x7c\xc2\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\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\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\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x00\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x02\x21\xfa\xfb\x84\x1f\xc0\x00\x04\xc0\x85\x10\x15\xfc\x0e\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x18\x08\x80\xe0\xe7\x13\x7e\x00\x03\x10\x00\x17\x42\x54\xf0\x3b\x1c\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x06\x02\x20\xfa\xf9\x84\x1f\xc0\x00\x04\xc0\x85\x10\x1d\xfc\x4e\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x81\x00\x88\x7e\x3e\xe1\x07\x30\x00\x01\x70\x21\x44\x05\xbf\xd3\x01\x80\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x06\x22\xfa\xff\xc5\x1f\x08\x00\x20\xc0\x03\x00\x55\x38\xf3\xff\xbf\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x03\x11\xfd\xff\xe2\x0f\x04\x00\x10\xe0\x01\x80\x2a\x9c\xf9\xff\x5f\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\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x48\x80\x0f\x01\xaa\xf8\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x02\x20\xfa\xff\x84\x1f\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\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\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\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\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\x04\x02\x20\x38\xf8\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x30\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x20\x00\x82\x83\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x03\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x83\x81\x88\xfe\x7f\xf1\x07\x02\x00\x08\xf0\x00\x40\x15\xce\xfc\xff\xaf\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x06\x02\x20\xf8\xf9\x84\x1f\xc0\x00\x04\xc0\x85\x10\x15\xfc\x0e\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x0a\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\xdc\xcc\x45\xf5\xff\xcb\xff\x13\x04\x41\x80\x07\x00\xaa\x70\xe6\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x81\x00\x88\x7e\x3e\xe1\x07\x30\x00\x01\x70\x21\x44\x05\xbf\xc3\x01\x80\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\xc0\x40\x00\x04\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xdf\xe1\x00\x40\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\xc0\x00\x44\x08\x00\x40\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\x30\x10\x00\xc1\xcf\x27\xfc\x00\x06\x20\x00\x2e\x84\xa8\xe0\x77\x38\x00\x90\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x73\x55\xfd\xff\xf2\xff\x04\x41\x10\xe0\x01\x80\x2a\x9c\xf9\xff\x5f\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x81\x00\x88\x7e\x3e\xe1\x07\x30\x00\x01\x70\x21\x44\x05\xbf\xc3\x01\x80\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\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x0c\x80\x0b\x21\x2a\xf8\x1d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x20\xfa\xf9\x84\x1f\xc0\x00\x06\xc0\x85\x10\x15\xfc\x0e\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x10\xfc\x7c\xc2\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\x80\x81\x00\x88\x7e\x3e\xe1\x07\x30\x00\x01\x70\x21\x44\x05\xbf\xd3\x01\x80\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\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\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\x10\x08\x80\xe8\xff\x13\x7e\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x04\x40\xf5\xff\x09\x3f\x00\x00\x04\x00\x00\x00\x08\x60\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\x04\x02\x20\xf8\xf9\x84\x1f\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\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\x20\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\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xdf\xe9\x00\x40\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\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x20\xfa\xf9\x84\x1f\xc0\x00\x04\xc0\x85\x10\x15\xfc\x4e\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x81\x00\x08\x7e\x3e\xe1\x07\x30\x00\x01\x70\x21\x44\x05\xbf\xc3\x01\x80\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\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\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\x06\x02\x20\xfa\xf9\x84\x1f\xc0\x00\x04\xc0\x85\x10\x15\xfc\x4e\x07\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xd7\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\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\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\x08\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\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\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9d\x0e\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x80\xb8\x10\xa2\xc3\xdf\xe9\x00\x40\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\x10\x08\x80\xe0\xe7\x13\x7e\x00\x00\x00\x00\x00\x00\x10\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x60\x20\x00\xa2\x9f\x4f\xf8\x01\x0c\x40\x00\x5c\x08\x51\xc1\xef\x70\x00\x20\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\x08\x90\xea\xff\x93\x7e\x00\x00\x00\x00\x00\x00\x10\xc8\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\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\x02\x01\x52\xfd\x7f\xd2\x0f\x00\x00\x00\x00\x00\x00\x02\x99\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x10\x08\x80\xe0\xe7\x13\x7e\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x08\x0e\x3e\xe1\x07\x00\x00\x00\x00\x00\x00\x00\x1c\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\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\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\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\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\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\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\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\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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"#--{-# NOINLINE happyExpListPerState #-}-happyExpListPerState st =- token_strs_expected- where token_strs = ["error","%dummy","%start_parseModuleNoHaddock","%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","HYPHEN","litpkgname","mayberns","rns","rn","unitbody","unitdecls","unitdecl","signature","module","missing_module_keyword","implicit_top","maybemodwarning","body","body2","top","top1","header","header_body","header_body2","header_top","header_top_importdecls","maybeexports","exportlist","exportlist1","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","topdecls_cs","topdecls_cs_semi","topdecl_cs","topdecl","cl_decl","ty_decl","standalone_kind_sig","sks_vars","inst_decl","overlap_pragma","deriv_strategy_no_via","deriv_strategy_via","deriv_standalone_strategy","opt_injective_info","injectivity_cond","inj_varids","where_type_family","ty_fam_inst_eqn_list","ty_fam_inst_eqns","ty_fam_inst_eqn","at_decl_cls","opt_family","opt_instance","at_decl_inst","type_data_or_newtype","data_or_newtype","opt_kind_sig","opt_datafam_kind_sig","opt_tyfam_kind_sig","opt_at_kind_inj_sig","tycl_hdr","datafam_inst_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","qvarcon","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_activation_marker","rule_explicit_activation","rule_foralls","rule_vars","rule_var","warnings","warning","deprecations","deprecation","strings","stringlist","annotation","fdecl","callconv","safety","fspec","opt_sig","opt_tyconsig","sigktype","sigtype","sig_vars","sigtypes1","unpackedness","forall_telescope","ktype","ctype","context","type","mult","btype","infixtype","ftype","tyarg","tyop","atype","inst_type","deriv_types","comma_types0","comma_types1","bar_types2","tv_bndrs","tv_bndr","tv_bndr_no_braces","fds","fds1","fd","varids0","kind","gadt_constrlist","gadt_constrs","gadt_constr","constrs","constrs1","constr","forall","constr_stuff","fielddecls","fielddecls1","fielddecl","maybe_derivings","derivings","deriving","deriv_clause_types","decl_no_th","decl","rhs","gdrhs","gdrh","sigdecl","activation","explicit_activation","quasiquote","exp","infixexp","exp10p","exp10","optSemi","prag_e","fexp","aexp","aexp1","aexp2","projection","splice_exp","splice_untyped","splice_typed","cmdargs","acmd","cvtopbody","cvtopdecls0","texp","tup_exprs","commas_tup_tail","tup_tail","list","lexps","flattenedpquals","pquals","squals","transformqual","guardquals","guardquals1","alt_rhs","ralt","gdpats","ifgdpats","gdpat","pat","pats1","bindpat","apat","apats","stmtlist","stmts","maybe_stmt","e_stmt","stmt","qual","fbinds","fbinds1","fbind","fieldToUpdate","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","qcon_list","sysdcon_nolist","sysdcon","conop","qconop","gtycon","ntgtycon","oqtycon","oqtycon_no_varcon","qtyconop","qtycon","tycon","qtyconsym","tyconsym","otycon","op","varop","qop","qopm","hole_op","qvarop","qvaropm","tyvar","tyvarop","tyvarid","var","qvar","field","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","altslist__apats__","altslist__pats1__","exp_prag__exp__","exp_prag__exp10p__","alts__apats__","alts__pats1__","alts1__apats__","alts1__pats1__","alt__apats__","alt__pats1__","'_'","'as'","'case'","'class'","'data'","'default'","'deriving'","'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'","'family'","'role'","'stdcall'","'ccall'","'capi'","'prim'","'javascript'","'proc'","'rec'","'group'","'by'","'using'","'pattern'","'static'","'stock'","'anyclass'","'via'","'unit'","'signature'","'dependency'","'{-# INLINE'","'{-# OPAQUE'","'{-# SPECIALISE'","'{-# SPECIALISE_INLINE'","'{-# SOURCE'","'{-# RULES'","'{-# SCC'","'{-# DEPRECATED'","'{-# WARNING'","'{-# UNPACK'","'{-# NOUNPACK'","'{-# ANN'","'{-# MINIMAL'","'{-# CTYPE'","'{-# OVERLAPPING'","'{-# OVERLAPPABLE'","'{-# OVERLAPS'","'{-# INCOHERENT'","'{-# COMPLETE'","'#-}'","'..'","':'","'::'","'='","'\\\\'","'lcase'","'lcases'","'|'","'<-'","'->'","'->.'","TIGHT_INFIX_AT","'=>'","'-'","PREFIX_TILDE","PREFIX_BANG","PREFIX_MINUS","'*'","'-<'","'>-'","'-<<'","'>>-'","'.'","PREFIX_PROJ","TIGHT_INFIX_PROJ","PREFIX_AT","PREFIX_PERCENT","'{'","'}'","vocurly","vccurly","'['","']'","'('","')'","'(#'","'#)'","'(|'","'|)'","';'","','","'`'","SIMPLEQUOTE","VARID","CONID","VARSYM","CONSYM","QVARID","QCONID","QVARSYM","QCONSYM","DO","MDO","IPDUPVARID","LABELVARID","CHAR","STRING","INTEGER","RATIONAL","PRIMCHAR","PRIMSTRING","PRIMINTEGER","PRIMWORD","PRIMFLOAT","PRIMDOUBLE","'[|'","'[p|'","'[t|'","'[d|'","'|]'","'[||'","'||]'","PREFIX_DOLLAR","PREFIX_DOLLAR_DOLLAR","TH_TY_QUOTE","TH_QUASIQUOTE","TH_QQUASIQUOTE","%eof"]- bit_start = st Prelude.* 479- bit_end = (st Prelude.+ 1) Prelude.* 479- read_bit = readArrayBit happyExpList- bits = Prelude.map read_bit [bit_start..bit_end Prelude.- 1]- bits_indexed = Prelude.zip bits [0..478]- token_strs_expected = Prelude.concatMap f bits_indexed- f (Prelude.False, _) = []- f (Prelude.True, nr) = [token_strs Prelude.!! nr]--happyActOffsets :: HappyAddr-happyActOffsets = HappyA# "\x1d\x00\x26\x00\x32\x00\x9d\x29\xcf\x1c\x86\x2c\x86\x2c\xcb\x23\x9d\x29\x8f\x48\x7c\x3f\x33\x00\x38\x00\x2c\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x02\x00\x00\x00\x00\x00\x00\x60\x00\x00\x00\x06\x03\x06\x03\x00\x00\x6f\x00\xff\x00\xff\x00\xed\x44\x7c\x3f\x76\x00\xf9\x00\x21\x01\x00\x00\xbe\x18\x00\x00\xf9\x16\x00\x00\x00\x00\x00\x00\x00\x00\x6e\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x17\x00\x00\x27\x18\x00\x00\x00\x00\x00\x00\x00\x00\x27\x61\x00\x00\x00\x00\x00\x00\xba\x01\xcb\x01\x00\x00\x00\x00\x68\x45\x68\x45\x00\x00\x00\x00\x67\x60\xfb\x3d\x76\x3b\xf8\x3b\x5b\x4b\xf6\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe1\x3a\x00\x00\x00\x00\xa5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x02\x95\x09\x2f\x02\xf9\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x02\x55\x19\x00\x00\x86\x2c\xec\x19\x00\x00\x0c\x02\x00\x00\x00\x00\x00\x00\x3c\x02\x0d\x02\x00\x00\x00\x00\xcb\x15\x00\x00\x00\x00\x83\x02\x00\x00\x00\x00\x00\x00\x86\x2c\x73\x28\x83\x01\x54\x39\xb2\x03\x54\x39\x0b\x01\xc3\x31\x95\x37\x54\x39\x54\x39\x54\x39\xb4\x26\x4d\x20\xa1\x22\x54\x39\xce\x49\xb2\x03\xb2\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x2c\x58\x32\x7c\x3f\xf9\x03\x86\x2c\xe1\x3a\x62\x16\x6f\x02\x00\x00\x8c\x02\x02\x05\xd7\x02\xf1\x02\x00\x00\x00\x00\x00\x00\x77\x04\xbb\x02\xfa\x49\x2c\x4c\x90\x4b\xbc\x4b\x2c\x4c\x93\x5e\x29\x03\x4d\x20\x00\x00\x94\x02\x94\x02\x94\x02\x00\x00\x00\x00\x00\x00\x00\x00\x36\x03\x5b\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x05\xed\x44\xfa\x00\x1e\x03\x6a\x02\xd4\x04\x90\x03\xfc\x3c\x36\x02\xf0\x5e\x24\x03\x1c\x5f\x1c\x5f\x67\x5e\x4c\x03\x00\x00\x4c\x03\xae\x03\x63\x03\x71\x03\x63\x03\x00\x00\x00\x00\x71\x03\x00\x00\x9d\x03\x9f\x03\xfb\x02\x00\x00\x00\x00\x3e\x00\xfb\x02\xfd\x03\xd8\x03\x54\x39\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x39\x46\x00\x4c\x06\xd0\x00\x00\x00\xe3\xff\xbb\x03\x22\x01\x00\x00\xe3\xff\x5c\x01\x00\x00\xed\x32\xbd\x01\x2e\x60\xf3\x03\xf7\xff\x13\x01\x00\x00\x29\x06\x29\x06\x09\x00\x00\x04\xad\x02\x38\x01\x00\x00\x7e\x42\xed\x44\xe8\x01\x7c\x3f\x25\x04\x31\x04\x46\x04\x50\x04\x00\x00\x76\x04\x00\x00\x00\x00\x00\x00\x7c\x3f\x7c\x3f\xed\x44\x14\x04\x6e\x04\x00\x00\x33\x04\x00\x00\x86\x2c\x00\x00\x00\x00\x7c\x3f\x0d\x3b\x67\x04\xed\x44\x47\x04\x7d\x04\x1b\x47\x1c\x01\x79\x01\x95\x04\x00\x00\x82\x33\x00\x00\x00\x00\x00\x00\xa1\x04\xa7\x04\xb2\x04\xb7\x04\x60\x24\x49\x27\x00\x00\x95\x37\xa4\x4d\x00\x00\x00\x00\x0d\x3b\x74\x04\xe3\x04\x84\x01\xdf\x04\x00\x00\x9a\x04\x00\x00\xc7\x04\x00\x00\x5f\x4c\x0a\x00\x2c\x4c\x00\x00\xfc\xff\x2c\x4c\x7c\x3f\xf5\x04\x5c\x4a\xd3\x04\x00\x00\x42\x05\xf5\x24\xf5\x24\x67\x60\x7c\x3f\x3c\x07\x00\x00\x00\x00\x00\x00\x00\x00\xfa\x04\xe0\x05\x28\x01\x00\x00\x00\x00\xc4\x04\xdd\x04\x00\x00\x00\x00\xe2\x04\x7f\x04\xe5\x04\x00\x00\x9d\x29\x9d\x29\x00\x00\x00\x00\x00\x00\xf9\x09\x00\x00\xac\x01\x09\x05\x00\x00\x00\x00\x8a\x25\x00\x00\x13\x05\x30\x01\x1d\x05\x1e\x05\x00\x00\x00\x00\x00\x00\x00\x00\x83\x1a\x00\x00\x54\x39\x40\x05\x7c\x04\xeb\x04\x58\x05\x66\x05\x00\x00\x00\x00\x6f\x05\xa7\x05\x48\x05\x42\x00\x00\x00\x00\x00\x1b\x2d\x81\x05\xb4\x05\x54\x39\xb0\x2d\xa4\x4d\xf9\x4b\x00\x00\x68\x45\x00\x00\x7c\x3f\xb0\x2d\xb0\x2d\xb0\x2d\xb0\x2d\x63\x05\x6b\x05\x28\x04\x75\x05\x7d\x05\x7a\x01\x85\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x3f\x79\x3d\x2f\x4b\x86\x05\x8a\x05\x7b\x01\x92\x05\x9b\x05\x54\x04\xf4\xff\x00\x00\xe9\x01\xe9\x39\x7a\x02\xa3\x05\x00\x00\x10\x02\x00\x00\x49\x01\xc0\x05\x00\x00\xb1\x05\x00\x00\x85\x02\x00\x00\xcd\x4a\x00\x00\x00\x00\x00\x00\x70\x01\x27\x61\x00\x00\x00\x00\x87\x61\x87\x61\x7c\x3f\x68\x45\x00\x00\xed\x44\x00\x00\x68\x45\xe9\x05\x7c\x3f\x7c\x3f\x68\x45\x7c\x3f\x7c\x3f\x00\x00\x00\x00\x43\x02\x00\x00\x56\x38\x3b\x00\x00\x00\xd4\x05\xfb\x02\xfb\x02\x00\x00\xe8\x05\xe3\xff\xe3\xff\xe8\x05\x00\x00\x00\x00\x57\x06\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x06\x62\x06\xf1\x00\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\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x35\x06\xab\x01\x00\x00\x00\x00\x00\x00\x2d\x06\x67\x60\x00\x00\x7c\x3f\x67\x60\x00\x00\x7c\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x3f\x7c\x3f\x00\x00\x00\x00\x49\x06\x3d\x06\x53\x06\x5f\x06\x64\x06\x6a\x06\x6e\x06\x70\x06\x72\x06\x5c\x06\x7c\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\x85\x06\x00\x00\x80\x06\xae\x06\xb1\x06\xb5\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x35\x05\x05\x00\xc6\x06\xac\x06\x00\x00\x00\x00\x00\x00\x0e\x07\x00\x00\xb0\x2d\xb0\x2d\x00\x00\x00\x00\x00\x00\x17\x34\xb0\x1b\x00\x00\x08\x29\x1a\x1b\xb0\x2d\x00\x00\xde\x27\x00\x00\xb0\x2d\x32\x2a\xde\x27\x00\x00\xc7\x06\x00\x00\x00\x00\x00\x00\x36\x23\xd6\x06\x00\x00\x2a\x38\x4e\x00\x00\x00\x87\x02\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x1c\x3e\x00\xd9\x06\x00\x00\x00\x00\x00\x00\xd0\x06\x00\x00\xce\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x60\x00\x00\x00\x00\x4f\x01\x5a\x00\x00\x00\x00\x00\x7b\x0c\x00\x00\xe2\x20\x77\x21\x83\x00\x00\x00\x0c\x22\x8a\x02\xb0\x02\xbb\x02\x01\x07\x00\x00\x00\x00\x00\x00\x00\x00\x02\x07\xfd\x06\xc9\x06\x00\x00\x00\x00\xe4\x06\x06\x07\x00\x00\x0d\x07\xe9\x06\xeb\x06\x79\x5f\x79\x5f\x00\x00\x0f\x07\x70\x03\x8b\x03\xec\x06\xed\x06\x00\x00\x0b\x07\xf0\x06\xce\x10\x00\x00\x00\x00\xa4\x4d\x00\x00\xb0\x2d\xde\x27\x37\x00\xa1\x03\xfb\x42\x6c\x04\x00\x00\x00\x00\xb0\x2d\x00\x00\x00\x00\x30\x00\x00\x00\xb0\x2d\x45\x2e\xed\x44\x45\x07\x00\x00\x19\x07\xfa\x06\x00\x00\x00\x00\x21\x07\xd4\x04\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x07\x2c\x00\x5d\x01\xdb\x03\x00\x00\x28\x07\x27\x61\x7c\x3f\x7c\x3f\xe8\x01\x94\x45\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfd\x45\xa4\x4d\xfe\x06\x7c\x3f\x00\x00\xa4\x4d\x67\x60\xda\x2e\xda\x2e\xac\x34\x00\x00\x85\x00\x00\x00\xf5\x06\x00\x00\xf6\x06\x00\x00\x00\x00\xa5\x5f\xa5\x5f\x00\x00\x00\x00\xa5\x5f\x00\x00\x54\x39\x77\x02\x31\x07\x35\x07\x00\x00\x6c\x07\x00\x00\x1a\x07\x00\x00\x1a\x07\x00\x00\x00\x00\x7d\x07\x00\x00\x1d\x07\x00\x00\xcf\x1c\x72\x07\x65\x49\x78\x07\x12\x07\x00\x00\x00\x00\x00\x00\x29\x07\x4d\x07\x00\x00\x00\x00\x00\x00\x9c\x02\x00\x00\x00\x00\x8f\x00\x2e\x07\x41\x35\x93\x60\x80\x07\x00\x00\x37\x07\x2c\x07\x00\x00\x00\x00\x2d\x07\x00\x00\x29\x46\x00\x00\x4f\x07\x5b\x07\x5c\x07\x5d\x07\xc7\x60\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x07\x7c\x3f\x5f\x07\x7c\x3f\x27\x61\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x05\x7c\x3f\x7c\x3f\x00\x00\x00\x00\x7c\x3f\x39\x07\x00\x00\x19\x4e\x00\x00\x6e\x05\x00\x00\x60\x07\x95\x07\x00\x00\x00\x00\x8f\x05\x00\x00\xec\x03\x62\x07\x00\x00\x27\x61\x99\x07\xae\x07\x7c\x3f\x9f\x07\x00\x00\x76\x07\x00\x00\x00\x00\x00\x00\x6a\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x3f\x00\x00\x63\x07\x7c\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x07\x00\x00\x1f\x26\xda\x2e\x00\x00\x00\x00\x7c\x3f\x3c\x07\x00\x00\x00\x00\x5e\x07\x00\x00\xc7\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe1\x01\x00\x00\x00\x00\x00\x00\x7d\x01\x00\x00\x00\x00\x6f\x2f\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x03\x00\x00\x3e\x00\x64\x07\x00\x00\x5c\x2b\x66\x07\x00\x00\x0b\x03\x00\x00\x3e\x00\x65\x07\x00\x00\xbf\x38\x68\x07\x00\x00\x00\x00\x00\x00\x04\x30\x99\x30\x2e\x31\x00\x00\x00\x00\xa4\x4d\xde\x27\xf9\x4b\x00\x00\x00\x00\x7c\x3f\x00\x00\x00\x00\x7f\x07\x00\x00\x6b\x07\x67\x07\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x3f\x00\x00\x7c\x3f\x00\x00\x31\x5e\x00\x00\x00\x00\x00\x00\xa1\x05\x00\x00\xc0\x07\x91\x07\x92\x07\xc3\x07\xab\x05\x00\x00\x00\x00\xab\x05\x00\x00\xda\x00\xda\x00\x00\x00\x71\x07\x7b\x07\x00\x00\x00\x00\x77\x07\x00\x00\x00\x00\x92\x01\x00\x00\x00\x00\x00\x00\x6d\x07\x00\x00\x00\x00\xd6\x35\x00\x00\x00\x00\xc9\x07\x9e\x07\x2e\x31\x00\x00\x00\x00\x2e\x31\x00\x00\x00\x00\xbe\x07\x64\x1d\xf1\x2b\xf1\x2b\x2e\x31\x00\x00\x83\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x07\x84\x07\xac\x07\x00\x00\xaf\x07\x00\x00\xa6\x07\x00\x00\xed\x44\x27\x61\x00\x00\x00\x00\xf1\x07\x00\x00\xb2\x01\xf1\x07\xae\x05\x9a\x07\xed\x44\xe2\x07\xf6\x07\x00\x00\x00\x00\x2e\x31\x00\x00\xf9\x1d\xf9\x1d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x1e\x8e\x1e\x00\x00\x00\x00\x00\x00\xe3\x07\x87\x61\x00\x00\xed\x44\xba\x07\x7c\x3f\x00\x00\x00\x00\xc7\x60\x00\x00\x00\x00\xb7\x05\xa9\x07\xf3\x60\x00\x00\xa4\x4d\xf2\x0c\x00\x00\x00\x00\xa2\x07\x00\x00\x8b\x07\x00\x00\x00\x00\x58\x04\x00\x00\xba\x05\xa7\x07\x9c\x07\x00\x00\xa4\x07\x00\x00\x00\x00\x00\x00\x00\x00\x58\x04\xe8\x01\x8b\x03\xed\x07\x00\x00\xba\x05\xa5\x07\x00\x00\xab\x07\x00\x00\xab\x07\x00\x00\x00\x00\x00\x00\xb3\x07\xb5\x07\xbb\x07\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x4a\x91\x49\x00\x00\x00\x00\x12\x08\x00\x00\x00\x00\x2e\x31\xde\x07\x00\x00\x6b\x36\x1f\x26\x1f\x26\x00\x00\x00\x00\x7c\x3f\xe0\x07\x00\x00\xdb\x07\x00\x00\x03\x06\x00\x00\x26\x08\x00\x00\x36\x01\x00\x00\x00\x00\x00\x00\x26\x08\xb9\x02\x00\x00\x87\x61\x00\x00\x00\x00\x3e\x01\x00\x00\x17\x08\x00\x37\x7d\x3e\xd9\x02\x00\x00\x00\x00\x32\x08\x00\x00\xed\x44\x10\x04\x10\x04\x00\x00\xa2\x02\x09\x08\x00\x00\x00\x00\x00\x00\x00\x00\xfa\x3e\x00\x00\xdc\x07\xe7\x07\x00\x00\xf5\x07\x00\x00\x36\x08\x00\x00\x00\x00\x7c\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x2e\x31\x2e\x31\x2e\x31\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x08\xde\x27\xa4\x4d\x00\x00\x00\x00\x00\x00\x56\x01\x00\x00\x18\x08\x58\x04\xeb\x38\xf7\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xda\x00\xe9\x07\xee\x07\x80\x39\x7a\x04\x58\x04\x00\x00\x00\x00\x00\x00\x2e\x31\x00\x00\x00\x00\x29\x08\x00\x00\x00\x00\xed\x44\x00\x00\xea\x07\xf7\x07\x00\x00\x00\x00\x00\x00\x3e\x00\xfc\x07\xbb\x02\x00\x08\x0c\x08\x00\x00\x00\x00\x00\x00\x23\x1f\x00\x00\xa3\x04\x78\x43\xed\x44\x8d\x0d\xed\x44\x00\x00\x00\x00\x00\x00\xb8\x1f\x78\x43\x00\x00\x00\x00\x24\x08\x00\x00\xfe\x3f\x7b\x40\x87\x61\xf8\x40\x00\x00\x5a\x01\x12\x03\xf3\x60\xf8\x40\x00\x00\x6b\x08\x00\x00\x05\x08\x01\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x0f\x08\x00\x00\x00\x00\x8f\x4a\x00\x00\x22\x00\x58\x04\x06\x08\x16\x08\x00\x00\x00\x00\x00\x00\x87\x61\x00\x00\x60\x01\x00\x00\x3e\x00\x6d\x03\x13\x08\xf5\x43\x00\x00\x00\x00\x2c\x08\xf8\x40\xa8\x04\x00\x00\x00\x00\xf8\x40\x7a\x41\x00\x00\xed\x44\x00\x00\x2f\x08\x10\x04\x00\x00\x00\x00\xfc\x41\x00\x00\x00\x00\x2e\x31\x00\x00\xca\x04\x14\x08\x00\x00\x58\x04\x00\x00\x58\x04\x00\x00\xed\x02\x00\x00\x7b\x08\xa8\x02\x00\x00\x68\x00\x67\x08\x1d\x08\x00\x00\x00\x00\x00\x00\xfc\x41\x00\x00\x30\x08\x46\x1c\x7a\x3c\x00\x00\x00\x00\x53\x61\x00\x00\x00\x00\x0e\x05\x00\x00\x00\x00\x72\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\x08\x65\x49\x00\x00\x23\x08\x65\x49\x00\x00\x77\x08\x89\x08\x64\x3a\x87\x61\x00\x00\x82\x08\x07\x06\x43\x34\x58\x04\x00\x00\x58\x04\x58\x04\x00\x00\x58\x04\x00\x00\x00\x00\x00\x00\x28\x08\x57\x08\x00\x00\x58\x04\x00\x00\x07\x06\x00\x00\x00\x00\x8c\x08\x37\x08\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x08\x58\x04\x00\x00\x00\x00\x00\x00\x00\x00"#--happyGotoOffsets :: HappyAddr-happyGotoOffsets = HappyA# "\x5b\x04\x92\x08\x78\x08\x4b\x52\xcc\x01\xeb\x55\x19\x55\xdc\x04\x93\x52\x01\x00\xec\x0d\x95\x01\x80\x03\xf6\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x05\x00\x00\x00\x00\x3d\x02\x00\x00\x00\x00\x79\x07\x7c\x07\x40\x02\x00\x00\x5d\x05\x78\x05\xd2\x13\xc2\x10\x00\x00\x00\x00\x00\x00\x00\x00\x19\x08\x00\x00\x23\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\x3c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x03\x4b\x04\x00\x00\x00\x00\x00\x01\x24\x0e\x4b\x08\xf4\x07\x72\x02\x04\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x03\x7a\x07\x6f\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x08\x00\x00\x31\x56\xb7\x62\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x77\x56\xfd\x53\x73\x05\xf0\x62\xc2\x07\x01\x63\x00\x00\xf5\x61\x6d\x62\x3a\x63\x73\x63\x84\x63\xd4\x4d\x75\x4c\x5f\x4d\xbd\x63\x04\x07\xc4\x07\xc6\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbd\x56\x03\x61\x58\x0e\xdf\x07\x03\x57\xf1\x64\xd0\x04\x74\x08\x00\x00\x00\x00\x49\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbd\x05\x43\x01\x77\x05\xed\x03\x7b\x05\x9c\x05\x1c\x04\x97\x0c\x73\x02\xea\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x01\xa8\x05\x00\x00\x00\x00\x16\x06\x6c\x08\x00\x00\xa4\x01\x2e\x08\xa4\xff\x15\x06\x45\x01\xb4\xff\x6b\x02\x00\x00\x00\x00\x00\x00\x84\x08\x00\x00\x88\x07\x00\x00\x91\x00\x00\x00\x89\x07\xa1\x00\x00\x00\xb6\x02\xa0\x08\x00\x00\x00\x00\x8e\x07\xaa\x08\x9b\x08\x00\x00\xf6\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x64\xca\x02\x10\x03\x00\x00\x00\x00\x4c\x08\x00\x00\x00\x00\x00\x00\x4f\x08\x00\x00\x00\x00\x0b\x06\x00\x00\xab\xff\x00\x00\x3f\xff\xad\x03\x00\x00\x4d\x08\x51\x08\x00\x00\x00\x00\x3d\x08\x00\x00\x00\x00\x38\x03\x75\x12\xa4\x03\xec\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x09\x4e\x0c\xb9\x12\x31\x08\x00\x00\x00\x00\x43\x04\x00\x00\xec\x4b\x00\x00\x00\x00\xf1\x0a\x6f\x04\x7c\x08\x52\x07\x00\x00\x00\x00\x54\x0a\x00\x00\x59\xff\x00\x00\x00\x00\x14\x61\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x4e\x21\x4f\x00\x00\x6d\x62\x45\x03\x00\x00\x00\x00\x9f\x04\x00\x00\x4e\x08\x77\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\x07\x00\x00\x8e\x04\x00\x00\x6f\x08\xe0\x04\xff\x09\x00\x00\xc2\xff\x00\x00\x00\x00\x00\x00\x57\x03\xa0\x03\x9f\xff\x04\x0b\xf0\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\x57\x05\x00\x00\x00\x00\x00\x00\x00\x00\xe1\xff\xfd\xff\x00\x00\xab\x0a\x00\x00\x00\x00\xdb\x52\x23\x53\x00\x00\x00\x00\x00\x00\x85\x03\x11\x08\x59\xff\x00\x00\x00\x00\x00\x00\x43\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x64\x00\x00\x06\x62\x00\x00\xb1\x07\xb8\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x08\x57\xff\x00\x00\x00\x00\x6a\x53\xf7\x05\x00\x00\x79\x64\x49\x57\xb0\x03\xd4\x02\x00\x00\x5e\x04\x00\x00\x06\x11\x8f\x57\xd5\x57\x1b\x58\x61\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\x96\x0c\x07\x08\x8d\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\xe7\x02\x00\x00\xed\x05\x00\x00\x00\x00\x00\x00\x00\x00\x67\x01\x00\x00\x00\x00\x2d\x02\xa0\x02\x19\x11\xfe\x05\x00\x00\x16\x14\x00\x00\xe5\x06\x00\x00\x5d\x11\x70\x11\xf8\x06\xb4\x11\x79\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\xc1\x07\x00\x00\xac\x02\xd5\x08\xdb\x08\x00\x00\xd3\x08\x75\x08\x76\x08\xd7\x08\x00\x00\x00\x00\xcb\x08\x00\x00\x00\x00\x00\x00\x00\x00\xfa\x08\x00\x00\xf9\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\xc7\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x01\x00\x00\x0b\x12\x27\x02\x00\x00\xb5\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x50\x0d\x84\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd3\x07\x25\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa7\x58\xed\x58\x00\x00\x00\x00\x00\x00\x0a\x47\xc3\x46\x00\x00\xee\x45\xa4\x45\x33\x59\x00\x00\x90\x4f\x00\x00\x79\x59\xbb\x51\xff\x4f\x00\x00\x60\xff\x00\x00\x00\x00\x00\x00\xb2\x4e\x00\x00\x00\x00\x7e\x62\xda\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x66\x02\xdd\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\xd6\x02\x00\x00\x00\x00\x00\x00\xe5\x07\x00\x00\x00\x00\x52\x01\x00\x00\x00\x00\x00\x00\xec\x07\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x01\x00\x00\x00\x00\x00\x00\x00\x00\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\x07\x2a\x09\x00\x00\x00\x00\x87\x05\x99\x03\x00\x00\x00\x00\x00\x00\x62\x05\x00\x00\xab\x0a\x00\x00\x00\x00\xd4\x03\x00\x00\xec\x4b\x6e\x50\x00\x00\xdd\xff\x0a\x01\x00\x00\x00\x00\x00\x00\x2f\x4c\x00\x00\x00\x00\xd6\xff\x00\x00\xbf\x59\xb1\x53\xcc\x12\x9c\x08\xe6\x04\xb4\x08\x00\x00\x00\x00\x00\x00\x00\x00\xd6\x08\x00\x00\x00\x00\x00\x00\x00\x00\xac\x08\x6d\x05\x97\x05\xc2\x08\x00\x00\x00\x00\xe5\x01\x8c\x0e\xa7\x09\x3e\x04\x8e\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xff\x86\x02\xfb\x07\x48\x0b\x00\x00\xc3\xff\xd1\xff\x5f\x55\xa5\x55\xa3\x08\x00\x00\xa6\x08\x00\x00\xaf\x08\x00\x00\xa4\x08\x00\x00\x00\x00\xbc\x00\x42\x06\x00\x00\x00\x00\x8e\x00\x00\x00\x8a\x64\x1a\x08\x00\x00\x00\x00\x00\x00\xf4\x08\x00\x00\x07\x09\x00\x00\x0d\x09\x00\x00\x00\x00\xd3\x02\x00\x00\x04\x09\x00\x00\x32\x01\x00\x00\x24\x00\x00\x00\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\x7f\x61\xe4\xff\xcd\x08\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\x55\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x0e\xeb\x08\x29\x0f\x94\x00\x00\x00\xe2\x08\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x08\x43\x0a\x58\x0f\x00\x00\x00\x00\x7a\x0f\x00\x00\x00\x00\xaf\x02\x00\x00\xcc\x08\x00\x00\x00\x00\xc4\x08\x00\x00\x00\x00\x23\x06\x00\x00\xe5\xff\x00\x00\x00\x00\x33\x02\x9e\x08\xc5\x05\xc1\x0f\xee\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\x56\x0a\x00\x00\x00\x00\x9a\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x11\x06\x00\x00\x65\x06\x05\x5a\x00\x00\x00\x00\x5b\x0b\x20\x05\x00\x00\x00\x00\x1c\x09\x00\x00\x45\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\x4b\x5a\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x04\x00\x00\x1c\x08\x00\x00\x00\x00\x37\x46\x00\x00\x00\x00\xc2\x05\x00\x00\x1e\x08\x00\x00\x00\x00\x50\x47\x00\x00\x00\x00\x00\x00\x00\x00\x91\x5a\xd3\x54\xd7\x5a\x00\x00\x00\x00\x5e\x00\xdd\x50\x9a\x01\x00\x00\x00\x00\x97\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x10\x00\x00\x2a\x10\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\x39\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2e\x09\x00\x00\x00\x00\x2f\x09\x00\x00\x99\x06\xcf\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\x8a\x08\x00\x00\x00\x00\x7f\x47\x00\x00\x00\x00\xd9\x08\x6e\x08\x1d\x5b\x00\x00\x00\x00\x80\x46\x00\x00\x00\x00\x00\x00\x00\x00\x02\x52\x8c\x54\x63\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\xf7\x03\x63\x02\x00\x00\x00\x00\x9d\x08\x00\x00\xc8\xff\x06\x06\x00\x00\x00\x00\x10\x13\xa9\x08\x3a\x06\x00\x00\x00\x00\xa9\x5b\x00\x00\x21\x04\x6a\x04\x00\x00\xb5\x08\x84\x06\x00\x00\x00\x00\x00\x00\x00\x00\xd3\xff\xe1\x02\x00\x00\x00\x00\x00\x00\x09\x09\xbe\xff\x00\x00\x23\x13\x00\x00\x9f\x0b\x00\x00\x00\x00\xd8\xff\x00\x00\x00\x00\x00\x00\x00\x00\xeb\xff\x00\x00\xab\x02\xab\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x08\x00\x00\x45\x09\x00\x00\x00\x00\x00\x00\x3c\x09\x00\x00\x00\x00\x00\x00\x00\x00\x35\x08\x66\x04\x50\x03\xd1\x05\x00\x00\x4e\x09\x3d\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x02\x1e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x50\x00\x44\x00\x00\x00\x00\x00\x34\x09\x00\x00\x00\x00\xef\x5b\x00\x00\x00\x00\x00\x00\xaa\x05\x1c\x06\x00\x00\x00\x00\xb2\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x21\x09\x00\x00\x1f\x09\x00\x00\x48\x08\x00\x00\x00\x00\x00\x00\x23\x09\x00\x00\x00\x00\xaf\x02\x00\x00\x00\x00\x50\x08\x00\x00\x25\x09\x90\x61\x63\x06\x00\x00\x00\x00\x00\x00\x4b\x06\x00\x00\x62\x12\x58\x01\xa2\x01\x00\x00\x79\xff\x31\x09\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x06\x00\x00\x00\x00\xad\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x35\x5c\x7b\x5c\xc1\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x51\x0f\x04\x00\x00\x00\x00\x00\x00\x58\x08\x00\x00\x4d\x09\x53\x08\x0e\x00\x00\x00\x00\x00\x58\x02\xa6\x02\x00\x00\x00\x00\x00\x00\x00\x00\x76\x09\x7e\x09\x00\x00\x14\x00\x77\x09\x60\x08\x00\x00\x00\x00\x00\x00\x07\x5d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x63\x08\x00\x00\x08\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x05\x00\x00\x37\x09\xba\x06\x67\x13\xab\x0a\x7a\x13\x00\x00\x00\x00\x00\x00\xef\x04\x0c\x07\x00\x00\x00\x00\x35\x09\x00\x00\x48\x02\xa7\x02\xc1\xff\x5e\x10\x00\x00\x66\x08\x00\x00\xf9\xff\x1e\x12\x00\x00\x5f\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x08\x00\x00\x00\x00\x00\x00\x48\x00\x00\x00\x00\x07\x69\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x02\x00\x00\x70\x08\x00\x00\x7e\x08\x00\x00\x00\x00\xb0\x07\x00\x00\x00\x00\x3e\x09\xf6\x0b\x3f\x09\x00\x00\x00\x00\x71\x10\xb8\x0d\x00\x00\xbe\x13\x00\x00\x00\x00\xe7\x01\x00\x00\x00\x00\x0f\x09\x00\x00\x00\x00\x4d\x5d\x00\x00\x80\x09\x7a\x09\x00\x00\xff\xff\x00\x00\xf5\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x09\x00\x00\x00\x00\x00\x00\x09\x0c\x00\x00\x00\x00\x00\x00\xab\x08\x00\x00\x00\x00\x7d\xff\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x27\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x3a\x00\x00\x00\xff\x08\x4e\x06\x00\x00\xc0\xff\x00\x00\x00\x00\x94\x09\x08\x00\x80\x08\x00\x00\x02\x00\x81\x08\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\x08\x00\x00\x99\x09\x00\x00\x00\x00\x5a\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8b\xfd\x00\x00\x00\x00\xbf\xff\xc0\xff\x00\x00\xf2\xff\x18\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\xf2\xfc\xf0\xfc\xf1\xfc\x00\x00\x12\xfd\x13\xfd\x8f\xff\x00\x00\xb1\xff\x00\x00\x00\x00\x8f\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x98\xfe\x00\x00\x93\xfe\x91\xfe\x8c\xfe\x8b\xfe\x87\xfe\x88\xfe\x71\xfe\x70\xfe\x00\x00\x7e\xfe\x4c\xfd\x82\xfe\x46\xfd\x3d\xfd\x40\xfd\x39\xfd\x7d\xfe\x81\xfe\x21\xfd\x1e\xfd\x67\xfe\x5c\xfe\x1c\xfd\x1b\xfd\x1d\xfd\x00\x00\x00\x00\x36\xfd\x35\xfd\x00\x00\x00\x00\x7c\xfe\x34\xfd\x3f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\xfd\x3c\xfd\x37\xfd\x38\xfd\x3e\xfd\x3a\xfd\x3b\xfd\x75\xfd\x69\xfe\x68\xfe\x6a\xfe\x00\x00\x15\xfe\x14\xfe\x00\x00\xf1\xff\x64\xfd\x55\xfd\x63\xfd\xef\xff\xf0\xff\x25\xfd\x09\xfd\x0a\xfd\x05\xfd\x02\xfd\x62\xfd\xed\xfc\x51\xfd\xea\xfc\xe7\xfc\xed\xff\x04\xfd\xee\xfc\xef\xfc\x00\x00\x00\x00\x00\x00\x00\x00\xeb\xfc\x03\xfd\xe8\xfc\xec\xfc\x06\xfd\xe9\xfc\xd2\xfd\x86\xfd\x0e\xfe\x0c\xfe\x00\x00\x07\xfe\xff\xfd\xf0\xfd\xed\xfd\xde\xfd\xdd\xfd\x00\x00\x00\x00\x8c\xfd\x89\xfd\xea\xfd\xe9\xfd\xeb\xfd\xec\xfd\xe8\xfd\x0d\xfe\xdf\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x93\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\xfd\xe6\xfc\xe5\xfc\xe7\xfd\xe6\xfd\xe2\xfc\xe1\xfc\xe4\xfc\xe3\xfc\xe0\xfc\xdf\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xfd\x7c\xff\x23\xfe\x00\x00\x00\x00\x00\x00\x14\xfd\x7a\xff\x79\xff\x78\xff\x00\x00\x00\x00\x19\xfe\x00\x00\x19\xfe\x19\xfe\x00\x00\x72\xfd\x00\x00\x00\x00\x98\xfd\x00\x00\x00\x00\x00\x00\x6e\xff\x6d\xff\x6c\xff\x6b\xff\x11\xff\x00\x00\x6a\xff\x69\xff\x2e\xfe\x63\xff\x62\xff\x30\xfe\x61\xff\x00\x00\x28\xff\x00\x00\x46\xff\x4f\xff\x27\xff\x00\x00\x00\x00\x00\x00\xd6\xfe\xbe\xfe\xc3\xfe\x00\x00\x00\x00\x8a\xfd\x00\x00\x89\xff\x00\x00\x00\x00\x00\x00\x8f\xff\xc1\xff\x00\x00\x8f\xff\x00\x00\x8c\xff\xbc\xff\xdc\xfc\xdb\xfc\x00\x00\xbc\xff\x87\xff\x00\x00\x00\x00\x67\xfd\x5e\xfd\x68\xfd\x1a\xfd\x60\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xc4\xfe\x00\x00\x6a\xfd\x00\x00\xbf\xfe\x00\x00\x00\x00\xd7\xfe\xd4\xfe\x00\x00\x5d\xfd\x00\x00\x00\x00\x00\x00\x67\xff\x00\x00\x00\x00\x00\x00\x00\x00\x91\xfe\x4c\xfd\x26\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x47\xff\x00\x00\x48\xff\x4a\xff\x49\xff\x00\x00\x62\xfe\x00\x00\x56\xfe\x00\x00\x18\xff\x00\x00\x2b\xfd\x00\x00\x2a\xfd\x2c\xfd\x00\x00\x00\x00\x11\xff\x00\x00\x00\x00\xc3\xfd\x0e\xfe\x00\x00\x00\x00\x00\x00\x28\xfd\x00\x00\x27\xfd\x29\xfd\x23\xfd\x07\xfd\x00\x00\x08\xfd\x51\xfd\x00\x00\x00\x00\xd5\xfc\x04\xfd\x00\x00\x59\xfd\xd9\xfc\x00\x00\x5b\xfd\xa5\xfe\x00\x00\x00\x00\x73\xfd\x71\xfd\x6f\xfd\x6e\xfd\x6b\xfd\x00\x00\x00\x00\x00\x00\x18\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\xfd\xde\xfe\x00\x00\xe1\xfe\xe1\xfe\x00\x00\x00\x00\x00\x00\x7b\xff\xd9\xfd\x4f\xfd\xda\xfd\x00\x00\x00\x00\x00\x00\xcb\xfd\xec\xfd\x00\x00\x00\x00\x73\xff\x73\xff\x00\x00\x00\x00\x00\x00\xf2\xfd\x8d\xfd\x8d\xfd\xf3\xfd\xdb\xfd\xdc\xfd\x00\x00\xc9\xfd\x00\x00\x00\x00\x07\xfd\x08\xfd\x00\x00\x57\xfd\x00\x00\xb7\xfd\x00\x00\xb6\xfd\x54\xfd\xfb\xfd\xfc\xfd\xfd\xfd\x08\xfe\x95\xfd\x93\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x88\xfd\x00\x00\x85\xfd\x05\xfe\x00\x00\xf5\xfd\x9c\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\xfd\x02\xfe\x00\x00\xcc\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcc\xfd\x6f\xfe\x66\xfd\x65\xfd\x80\xfe\x7f\xfe\x6c\xfe\x2e\xfd\x62\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x61\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x76\xfe\x00\x00\x40\xfd\x00\x00\x00\x00\x78\xfe\x00\x00\x47\xfd\x00\x00\x00\x00\x3e\xfe\x3c\xfe\x9f\xfe\x00\x00\x7a\xfe\x00\x00\x7b\xfe\x9b\xfe\x9c\xfe\x00\x00\x5c\xfe\x5b\xfe\x58\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x86\xfe\x00\x00\x84\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xfe\x89\xfe\x00\x00\xe8\xff\x00\x00\x00\x00\xae\xff\x8c\xff\xbc\xff\xbc\xff\xad\xff\xa8\xff\x00\x00\x00\x00\xa8\xff\xac\xff\xaa\xff\xab\xff\x90\xff\xec\xff\xdd\xfc\xde\xfc\xe9\xff\x00\x00\xd5\xff\xdc\xff\xd9\xff\xdb\xff\xda\xff\xdd\xff\xeb\xff\x4f\xfe\x97\xfe\x95\xfe\x8d\xfe\x8e\xfe\x90\xfe\x00\x00\x85\xfe\x8a\xfe\x83\xfe\x94\xfe\x00\x00\x00\x00\x5d\xfe\x99\xfe\x9a\xfe\x00\x00\x00\x00\x79\xfe\x00\x00\x00\x00\x73\xfe\x00\x00\x48\xfd\x4b\xfd\xda\xfc\x45\xfd\x72\xfe\x00\x00\xd6\xfc\x49\xfd\x4a\xfd\x74\xfe\x75\xfe\x00\x00\x00\x00\x20\xfd\x3f\xfd\x00\x00\x00\x00\x36\xfd\x35\xfd\x7c\xfe\x34\xfd\x37\xfd\x38\xfd\x3b\xfd\x61\xfe\x00\x00\x63\xfe\xee\xff\x58\xfd\x61\xfd\x16\xfd\x56\xfd\x50\xfd\x24\xfd\x0f\xfe\x10\xfe\x11\xfe\x12\xfe\x13\xfe\x01\xfe\x00\x00\x84\xfd\x81\xfd\x7e\xfd\x00\x00\x14\xfd\x80\xfd\xee\xfd\x15\xfd\x87\xfd\xfe\xfd\x00\x00\x00\x00\x00\x00\xa3\xfd\xa1\xfd\x9d\xfd\x9a\xfd\x00\x00\x06\xfe\x00\x00\x00\x00\x04\xfe\x03\xfe\xf7\xfd\x93\xfd\x00\x00\xf8\xfd\x00\x00\x00\x00\x00\x00\x94\xfd\x00\x00\xe0\xfd\xb5\xfd\x00\x00\x00\x00\x17\xfd\xb9\xfd\xbe\xfd\xe1\xfd\xbf\xfd\xb8\xfd\xbd\xfd\xe2\xfd\x00\x00\x00\x00\x8e\xfd\x00\x00\xd7\xfd\xd4\xfd\xd5\xfd\xc4\xfd\xc5\xfd\x00\x00\x00\x00\xd3\xfd\xd6\xfd\x4d\xfd\x00\x00\x4e\xfd\x24\xfe\x30\xfd\x76\xff\x31\xfd\x53\xfd\x2f\xfd\x00\x00\x26\xfe\xa1\xfe\x00\x00\x00\x00\x2d\xfe\xe2\xfe\xa7\xfe\x2c\xfe\xce\xfd\xcd\xfd\x00\x00\x77\xfd\xea\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xfa\xfe\xfb\xfe\x20\xfe\x66\xfe\x00\x00\x00\x00\x00\x00\xd2\xfe\xd1\xfe\x00\x00\x00\x00\x1f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\xfd\xd7\xfc\x17\xfd\xc1\xfd\xe4\xfd\xe5\xfd\x00\x00\xe3\xfd\xc2\xfd\x00\x00\x00\x00\x23\xff\x00\x00\xa1\xfe\x0b\xfe\x0a\xfe\x00\x00\x09\xfe\x2f\xfe\xda\xfe\x28\xfe\x00\x00\x00\x00\x00\x00\xef\xfe\x51\xfe\x21\xff\x00\x00\x4b\xff\xa3\xfe\xa1\xfe\x4f\xff\x50\xff\x51\xff\x53\xff\x52\xff\xe5\xfe\x0e\xff\x00\x00\x1f\xff\x56\xff\x00\x00\x5c\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xb1\xfe\xb0\xfe\xaf\xfe\xae\xfe\xad\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x05\xff\x02\xff\x00\x00\x00\x00\x00\x00\xcb\xfe\xd3\xfe\x00\x00\x64\xff\xd8\xfe\xbd\xfe\xb8\xfe\xbc\xfe\x66\xff\xc0\xfe\x00\x00\xc2\xfe\x65\xff\xc5\xfe\x33\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x8a\xff\x83\xff\x88\xff\xa8\xff\xb8\xff\xa8\xff\xb7\xff\xb4\xff\x70\xff\xb9\xff\x8e\xff\xb5\xff\xb6\xff\x00\x00\xa6\xff\x00\x00\x85\xff\x84\xff\xb7\xfe\xb5\xfe\x00\x00\x00\x00\xc6\xfe\x69\xfd\xc1\xfe\x00\x00\xb9\xfe\xd9\xfe\x00\x00\x00\x00\x00\x00\xc9\xfe\x07\xff\x08\xff\x00\x00\x00\xff\x01\xff\xfc\xfe\x00\x00\x04\xff\x00\x00\xb3\xfe\x00\x00\xab\xfe\xaa\xfe\xac\xfe\x00\x00\xb2\xfe\x59\xff\x5a\xff\x5f\xff\x00\x00\x00\x00\x45\xff\x00\x00\x00\x00\x0f\xff\x0d\xff\x0c\xff\x09\xff\x0a\xff\x57\xff\x00\x00\x00\x00\x00\x00\x68\xff\x5b\xff\x00\x00\x55\xfe\x53\xfe\x00\x00\x60\xff\x00\x00\x19\xff\x00\x00\xda\xfe\x2a\xfe\x29\xfe\x00\x00\xcb\xfc\x23\xff\x00\x00\x14\xff\x5c\xfe\x4c\xfe\x3a\xfe\x00\x00\x41\xfe\x12\xff\x00\x00\xc0\xfd\xd0\xfd\xbc\xfd\xd8\xfc\x26\xfd\x22\xfd\x5a\xfd\xa4\xfe\x22\xfe\x70\xfd\x6d\xfd\x5f\xfd\x6c\xfd\x1e\xfe\x00\x00\x17\xfe\x00\x00\x00\x00\x1b\xfe\x21\xfe\x5c\xfd\xdd\xfe\x78\xfd\xe0\xfe\xe3\xfe\x00\x00\xdc\xfe\xdf\xfe\x00\x00\x00\x00\xc7\xfd\xc6\xfd\x75\xff\x92\xfd\x8f\xfd\x91\xfd\xc8\xfd\xca\xfd\xd1\xfd\xbb\xfd\xba\xfd\xc3\xfd\xaf\xfd\xb1\xfd\xae\xfd\xac\xfd\xa9\xfd\xa8\xfd\x00\x00\xb3\xfd\xb0\xfd\xfa\xfd\x97\xfd\x00\x00\xcd\xfc\x00\x00\xc8\xfc\xc1\xfc\x00\x00\x00\x00\xce\xfc\x00\x00\xd1\xfc\x00\x00\xca\xfc\xc4\xfc\x93\xfd\x00\x00\xd2\xfc\xf1\xfd\xf9\xfd\x00\x00\x00\x00\x00\x00\x9b\xfd\xf4\xfd\x00\x00\x00\x00\x00\x00\xef\xfd\x6d\xfe\x00\x00\x2d\xfd\x60\xfe\x5f\xfe\x5e\xfe\x00\x00\x00\x00\xa0\xfe\x3b\xfe\x3d\xfe\x19\xfd\x00\x00\x5a\xfe\x00\x00\x8f\xfe\x00\x00\xd8\xff\xd7\xff\xd6\xff\x00\x00\xea\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbe\xff\xbd\xff\x00\x00\xe7\xff\x00\x00\x00\x00\xd4\xff\x00\x00\x00\x00\x6b\xfe\x77\xfe\x00\x00\x82\xfd\x7f\xfd\x7c\xfd\x7a\xfd\x99\xfd\xa2\xfd\x05\xfe\xd4\xfc\xc9\xfc\xc5\xfc\xd3\xfc\xc0\xfc\xda\xfe\x9e\xfd\x00\x00\xd0\xfc\xc7\xfc\xc2\xfc\xcf\xfc\xbf\xfc\xa7\xfd\xf6\xfc\x00\x00\x00\x00\xb4\xfd\x90\xfd\x74\xff\x91\xff\x77\xff\x25\xfe\x76\xfd\xe4\xfe\x79\xfd\x00\x00\x9e\xfe\x00\x00\x16\xfe\x00\x00\x13\xff\x47\xfe\x45\xfe\x00\x00\x5c\xfe\x22\xff\x5d\xff\x39\xfe\x37\xfe\x00\x00\x3a\xfe\x00\x00\x00\x00\x00\x00\x4c\xfe\x3a\xfe\xdb\xfe\x2b\xfe\x00\x00\xf0\xfe\xf3\xfe\xf3\xfe\x50\xfe\x51\xfe\x51\xfe\x20\xff\xa2\xfe\x10\xff\xe6\xfe\xe9\xfe\xe9\xfe\x0b\xff\x1d\xff\x1e\xff\x40\xff\x00\x00\x35\xff\x00\x00\x00\x00\x00\x00\xb4\xfe\x52\xfd\x00\x00\x03\xff\x06\xff\x00\x00\x00\x00\xc9\xfe\xc8\xfe\x00\x00\x00\x00\xd0\xfe\xce\xfe\x00\x00\xbb\xfe\x00\x00\xb6\xfe\x32\xfd\x00\x00\x86\xff\x00\x00\x00\x00\xa7\xff\xa2\xff\x9e\xff\x96\xff\x93\xff\x44\xfd\x94\xff\x00\x00\x00\x00\x00\x00\x00\x00\xa4\xff\x00\x00\x72\xff\x6f\xff\x8d\xff\x92\xff\x71\xff\xc2\xff\x8f\xff\x8f\xff\x00\x00\x00\x00\x00\x00\x9f\xff\x95\xff\xa0\xff\xa1\xff\x9c\xff\xa5\xff\xa9\xff\xc3\xff\x83\xff\xba\xfe\xcf\xfe\x00\x00\x00\x00\xca\xfe\xcc\xfe\xe1\xfe\xe1\xfe\xff\xfe\xa8\xfe\x00\x00\x00\x00\x44\xff\x00\x00\x5e\xff\x00\x00\xee\xfe\x2d\xff\xea\xfe\x00\x00\xed\xfe\x25\xff\x24\xff\x2d\xff\x00\x00\x54\xfe\x52\xfe\xf9\xfe\xf4\xfe\x00\x00\xf8\xfe\x2f\xff\x00\x00\x00\x00\x00\x00\x27\xfe\x55\xff\x3a\xfe\x15\xff\x00\x00\x49\xfe\x49\xfe\x5c\xff\x00\x00\x36\xfe\x33\xfe\x4c\xff\x4e\xff\x4d\xff\x00\x00\x38\xfe\x00\x00\x00\x00\x92\xfe\x40\xfe\x43\xfe\x41\xfe\x1c\xfe\x1d\xfe\x00\x00\xb2\xfd\xab\xfd\xaa\xfd\xad\xfd\x00\x00\x00\x00\x00\x00\xc3\xfc\x9f\xfd\xa0\xfd\xc6\xfc\x00\x00\x00\x00\x00\x00\x6e\xfe\x59\xfe\x57\xfe\x00\x00\xc8\xff\x89\xff\x00\x00\x00\x00\x00\x00\xb2\xff\x8f\xff\x8f\xff\xb3\xff\xaf\xff\xb0\xff\xcc\xff\xc9\xff\xd3\xff\xe6\xff\xf0\xfc\xbc\xff\x00\x00\xcb\xff\x7b\xfd\x7d\xfd\x00\x00\xa6\xfd\xa5\xfd\x00\x00\x9d\xfe\x46\xfe\x00\x00\x42\xfe\x65\xfe\x00\x00\x32\xfe\x34\xfe\x35\xfe\x00\x00\x4a\xfe\x00\x00\x00\x00\x00\x00\x16\xff\x54\xff\xf2\xfe\xf5\xfe\x31\xff\x1c\xff\x00\x00\x00\x00\x00\x00\x00\x00\x2e\xff\xf1\xfe\xe8\xfe\xeb\xfe\x00\x00\x2c\xff\xe7\xfe\x11\xff\x3f\xff\x37\xff\x37\xff\x00\x00\x00\x00\xa9\xfe\x00\x00\x00\x00\xc9\xfe\x00\x00\xd5\xfe\x81\xff\xa3\xff\x00\x00\x9b\xff\x99\xff\x98\xff\x97\xff\x43\xfd\x42\xfd\x41\xfd\x00\x00\x00\x00\xbb\xff\xba\xff\x00\x00\x9d\xff\x7f\xff\x00\x00\x00\x00\x00\x00\xfe\xfe\xfd\xfe\x36\xff\x43\xff\x41\xff\x00\x00\x38\xff\x00\x00\x00\x00\x00\x00\x00\x00\x2b\xff\xec\xfe\x21\xff\x00\x00\x1c\xff\x30\xff\x33\xff\x00\x00\x00\x00\xf6\xfe\x00\x00\x4e\xfe\x00\x00\x49\xfe\x4d\xfe\x31\xfe\x00\x00\x40\xfe\x44\xfe\x00\x00\xf6\xfd\xbc\xff\xa8\xff\xc4\xff\x00\x00\xc5\xff\x00\x00\xca\xff\x00\x00\xcf\xff\xcd\xff\x00\x00\xe2\xff\x00\x00\x00\x00\xa8\xff\xa4\xfd\x64\xfe\x4b\xfe\x00\x00\x17\xff\x00\x00\x7d\xfe\x00\x00\x1b\xff\x32\xff\x00\x00\xf7\xfe\x34\xff\x23\xff\x3c\xff\x3e\xff\x39\xff\x3b\xff\x3d\xff\x42\xff\xcd\xfe\xc7\xfe\x82\xff\x8b\xff\x80\xff\x00\x00\xa6\xff\x9a\xff\x00\x00\xa6\xff\x3a\xff\x4c\xfe\x3a\xfe\x7d\xfe\x00\x00\x48\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe5\xff\xe3\xff\x00\x00\xd2\xff\xd0\xff\xd1\xff\xce\xff\xe4\xff\x00\x00\x00\x00\xe1\xff\x00\x00\xc6\xff\x00\x00\x1a\xff\x2a\xff\x3a\xfe\x00\x00\x7e\xff\x7d\xff\x29\xff\xc7\xff\x00\x00\x00\x00\xe0\xff\xde\xff\xdf\xff"#--happyCheck :: HappyAddr-happyCheck = HappyA# "\xff\xff\x00\x00\x0d\x00\x0e\x00\x05\x00\x06\x00\x62\x00\x49\x00\x06\x00\x49\x00\x37\x00\x4a\x00\x04\x00\x45\x00\x63\x00\x07\x00\x08\x00\x09\x00\x04\x00\x0b\x00\x86\x00\x0e\x00\x08\x00\x09\x00\x04\x00\x0b\x00\x39\x00\x3a\x00\x08\x00\x09\x00\xa1\x00\x0b\x00\x08\x00\x09\x00\x09\x00\x0b\x00\x0b\x00\x52\x00\x63\x00\x54\x00\x38\x00\x67\x00\x8b\x00\x09\x00\xd3\x00\x01\x00\xb5\x00\x12\x00\x7c\x00\x7d\x00\x55\x00\xd3\x00\x61\x00\x64\x00\x39\x00\x3a\x00\xe1\x00\x66\x00\x55\x00\x00\x00\x64\x00\x0b\x00\x00\x00\x6c\x00\x6d\x00\x4a\x00\x00\x00\x04\x01\x50\x00\x21\x00\x22\x00\x23\x00\x18\x00\x73\x00\x12\x00\x68\x00\x28\x00\x29\x00\x00\x00\x21\x00\x22\x00\x23\x00\x48\x00\x57\x00\x4b\x00\x50\x00\x28\x00\x29\x00\x55\x00\x33\x00\x00\x00\x21\x00\x22\x00\x23\x00\x7a\x00\x7b\x00\x00\x00\x6d\x00\x28\x00\x29\x00\x81\x00\x7a\x00\x7b\x00\x23\x00\x29\x01\x72\x00\x65\x00\x33\x00\x28\x00\x29\x00\x77\x00\x27\x00\x28\x00\x29\x00\x76\x00\x7a\x00\x7b\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x71\x00\x85\x00\x86\x00\xb5\x00\x82\x00\x48\x00\x50\x00\x64\x00\x2b\x01\x00\x00\x0b\x01\x0c\x01\x2d\x01\xaa\x00\x2f\x01\xb6\x00\xb7\x00\x81\x00\x6a\x00\x2d\x01\xbb\x00\xaa\x00\xba\x00\xbe\x00\x50\x00\xc0\x00\x17\x01\xc2\x00\x19\x01\x64\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\x64\x00\xca\x00\xcb\x00\xcc\x00\x74\x00\x24\x01\x67\x00\xff\x00\x00\x01\x67\x00\x02\x01\x03\x01\x1a\x01\x67\x00\x19\x00\x70\x00\x1e\x01\xaa\x00\xfa\x00\xfb\x00\x6a\x00\xd0\x00\x24\x01\xff\x00\x4c\x00\x67\x00\x02\x01\x03\x01\x81\x00\x1a\x01\x19\x00\x75\x00\x2b\x00\x1e\x01\x70\x00\xfd\x00\xfe\x00\x67\x00\x1e\x01\x24\x01\x02\x01\x03\x01\xf3\x00\xf4\x00\x24\x01\x1e\x01\x70\x00\x27\x01\x2b\x00\xd0\x00\x1a\x01\x24\x01\xfd\x00\xfe\x00\x1e\x01\x0b\x01\x0c\x01\x02\x01\x03\x01\x19\x01\x24\x01\x19\x01\x19\x01\x27\x01\x57\x00\x1b\x01\x76\x00\x1d\x01\x1e\x01\x1e\x01\x24\x01\x86\x00\x24\x01\x24\x01\x24\x01\x24\x01\x26\x01\x27\x01\x67\x00\x1a\x01\x12\x00\x1a\x01\x1b\x01\x1e\x01\x1d\x01\x1e\x01\x1a\x01\x70\x00\x04\x01\x24\x01\x1e\x01\x24\x01\x69\x00\x26\x01\x27\x01\x76\x00\x24\x01\x2a\x01\xfd\x00\xfe\x00\x10\x01\x11\x01\x1e\x01\x02\x01\x03\x01\x96\x00\x05\x01\x82\x00\x24\x01\x1e\x01\x10\x00\x7d\x00\x96\x00\x33\x00\x34\x00\x24\x01\x1a\x01\x82\x00\x22\x01\x23\x01\x1e\x01\x25\x01\x15\x01\x1e\x01\x48\x00\x29\x01\x24\x01\x21\x00\x1b\x01\x24\x01\x1d\x01\x1e\x01\x1f\x01\x2c\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2c\x01\x24\x01\x09\x01\x2c\x01\x0b\x01\x0c\x01\x32\x00\x24\x01\x2c\x01\xa0\x00\xa1\x00\x00\x00\x09\x01\x24\x01\x0b\x01\x0c\x01\x7f\x00\x24\x01\x24\x01\x00\x00\x1b\x01\x70\x00\x1d\x01\x1e\x01\x09\x01\x4b\x00\x0b\x01\x0c\x01\x56\x00\x24\x01\x1b\x01\x59\x00\x1d\x01\x1e\x01\x09\x01\xf0\x00\x0b\x01\x0c\x01\x09\x01\x24\x01\x0b\x01\x0c\x01\x1b\x01\x00\x00\x1d\x01\x1e\x01\x09\x01\x00\x00\x0b\x01\x0c\x01\x4a\x00\x24\x01\x1b\x01\x00\x00\x1d\x01\x1e\x01\x1b\x01\x5a\x00\x1d\x01\x1e\x01\x76\x00\x24\x01\x37\x00\x48\x00\x1b\x01\x24\x01\x1d\x01\x1e\x01\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x24\x01\x43\x00\x55\x00\x1a\x01\x50\x00\x49\x00\x1c\x01\x1e\x01\x1e\x01\x61\x00\x6b\x00\x74\x00\x50\x00\x24\x01\x24\x01\x4b\x00\x71\x00\x53\x00\x54\x00\x6b\x00\xfa\x00\xfb\x00\x77\x00\x8b\x00\x81\x00\xff\x00\x5c\x00\x5d\x00\x02\x01\x03\x01\x70\x00\x61\x00\x4b\x00\x6d\x00\x01\x00\x8d\x00\x66\x00\x71\x00\x4b\x00\x91\x00\x92\x00\x67\x00\x94\x00\x95\x00\x96\x00\x71\x00\x98\x00\x99\x00\x48\x00\x67\x00\x70\x00\x4a\x00\x1a\x01\x71\x00\x15\x00\x17\x01\x1e\x01\x19\x01\x70\x00\xaf\x00\xb0\x00\xb1\x00\x24\x01\x56\x00\x82\x00\x27\x01\xfa\x00\xfb\x00\x24\x01\x4b\x00\x71\x00\xff\x00\x5f\x00\x67\x00\x02\x01\x03\x01\x71\x00\x67\x00\x52\x00\x7e\x00\x7f\x00\x13\x00\x70\x00\x67\x00\xbe\x00\x50\x00\x70\x00\x50\x00\x70\x00\x50\x00\x4a\x00\x5f\x00\x70\x00\x0d\x01\x0e\x01\x76\x00\x77\x00\xcb\x00\x1a\x01\x7a\x00\x7b\x00\x87\x00\x1e\x01\x9f\x00\xa0\x00\xa1\x00\x4c\x00\x8b\x00\x24\x01\x2f\x00\x30\x00\x27\x01\x6b\x00\x6b\x00\x42\x00\x64\x00\xb6\x00\x66\x00\x71\x00\x71\x00\x71\x00\xbb\x00\x71\x00\x6b\x00\xbe\x00\x2d\x01\xc0\x00\x61\x00\xc2\x00\x71\x00\x4b\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\x77\x00\x50\x00\xcb\x00\xcc\x00\x7b\x00\xa8\x00\xa9\x00\x48\x00\x37\x00\xb0\x00\xb1\x00\x9f\x00\xa0\x00\xa1\x00\x4c\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x51\x00\x43\x00\x65\x00\x07\x01\x08\x01\x48\x00\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x6d\x00\x1a\x01\xc3\x00\x6a\x00\x71\x00\x1e\x01\x53\x00\x54\x00\x17\x01\x18\x01\x19\x01\x24\x01\xf3\x00\xf4\x00\x75\x00\x5c\x00\x5d\x00\x49\x00\x79\x00\x19\x00\x61\x00\x24\x01\xfd\x00\xfe\x00\x8d\x00\x66\x00\x52\x00\x02\x01\x03\x01\x92\x00\x19\x00\x94\x00\x95\x00\x96\x00\x96\x00\x98\x00\x99\x00\x2b\x00\xfa\x00\xfb\x00\x0b\x00\xff\x00\x00\x01\xff\x00\x02\x01\x03\x01\x02\x01\x03\x01\x2b\x00\xa8\x00\xa9\x00\x1a\x01\x1b\x01\x82\x00\x1d\x01\x1e\x01\x1b\x00\x6a\x00\x17\x01\x6b\x00\x19\x01\x24\x01\x05\x01\x26\x01\x27\x01\x71\x00\x1e\x00\x2a\x01\x75\x00\x1e\x00\x1a\x01\x24\x01\x79\x00\xbe\x00\x1e\x01\x12\x01\xc3\x00\x14\x01\x15\x01\x2b\x00\x24\x01\x27\x01\x2b\x00\x27\x01\x61\x00\x1a\x01\xcb\x00\x64\x00\x1f\x01\x1e\x01\x21\x01\x22\x01\x23\x01\x1e\x00\x25\x01\x24\x01\x69\x00\x28\x01\x29\x01\x51\x00\x13\x00\x17\x01\x69\x00\x19\x01\x71\x00\xb6\x00\x2b\x00\x9f\x00\xa0\x00\xa1\x00\xbb\x00\xee\x00\xef\x00\xbe\x00\x24\x01\xc0\x00\x51\x00\xc2\x00\xa8\x00\xa9\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\x4d\x00\x4e\x00\xcb\x00\xcc\x00\x2f\x00\x30\x00\x31\x00\x6d\x00\x37\x00\xff\x00\x00\x01\x71\x00\x02\x01\x03\x01\x96\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x65\x00\x43\x00\xc3\x00\x07\x01\x08\x01\x00\x00\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x70\x00\x07\x00\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x53\x00\x54\x00\x17\x01\x18\x01\x19\x01\x24\x01\xf3\x00\xf4\x00\x4a\x00\x5c\x00\x5d\x00\x1e\x00\x18\x00\x27\x01\x61\x00\x24\x01\xfd\x00\xfe\x00\x1f\x00\x66\x00\x56\x00\x02\x01\x03\x01\x1a\x00\x2b\x00\x9f\x00\xa0\x00\xa1\x00\x8d\x00\x5f\x00\x54\x00\x2c\x00\x2d\x00\x92\x00\x56\x00\x94\x00\x95\x00\x96\x00\x5a\x00\x98\x00\x99\x00\x2c\x00\x2d\x00\x5f\x00\x6b\x00\x1a\x01\x1b\x01\x82\x00\x1d\x01\x1e\x01\x71\x00\x65\x00\x76\x00\x77\x00\x65\x00\x24\x01\x82\x00\x26\x01\x27\x01\x4d\x00\x4e\x00\x2a\x01\x70\x00\x4b\x00\x4c\x00\x70\x00\x76\x00\x17\x01\x50\x00\x19\x01\x52\x00\x53\x00\x2e\x00\x9f\x00\xa0\x00\xa1\x00\x69\x00\xbe\x00\xff\x00\x00\x01\x24\x01\x02\x01\x03\x01\x6a\x00\x71\x00\x3b\x00\x3c\x00\x63\x00\x69\x00\x65\x00\xcb\x00\x67\x00\x65\x00\x56\x00\x75\x00\x37\x00\x71\x00\x5a\x00\x79\x00\xb6\x00\x70\x00\x65\x00\x5f\x00\x70\x00\xbb\x00\x96\x00\x68\x00\xbe\x00\x6a\x00\xc0\x00\x6c\x00\xc2\x00\x70\x00\x96\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\x27\x01\x75\x00\xcb\x00\xcc\x00\x52\x00\x8d\x00\x54\x00\x76\x00\x3c\x00\x3d\x00\x92\x00\x7a\x00\x94\x00\x95\x00\x96\x00\x65\x00\x98\x00\x99\x00\x1a\x01\x61\x00\x96\x00\x17\x01\x1e\x01\x19\x01\x66\x00\x71\x00\x70\x00\x17\x01\x24\x01\x19\x01\x6c\x00\x6d\x00\x07\x01\x08\x01\x24\x01\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x24\x01\x6b\x00\xf3\x00\xf4\x00\x50\x00\x65\x00\x52\x00\x71\x00\x17\x01\x18\x01\x19\x01\x71\x00\xfd\x00\xfe\x00\xbe\x00\xfb\x00\x70\x00\x02\x01\x03\x01\xff\x00\x10\x00\x24\x01\x02\x01\x03\x01\x1a\x01\xfd\x00\xfe\x00\xcb\x00\x1e\x01\x01\x01\x02\x01\x03\x01\x65\x00\x42\x00\x24\x01\x17\x01\x75\x00\x19\x01\x0b\x01\x0c\x01\x79\x00\x1a\x01\x1b\x01\x70\x00\x1d\x01\x1e\x01\x1a\x01\x4e\x00\x24\x01\x6a\x00\x1e\x01\x24\x01\x19\x01\x26\x01\x27\x01\x37\x00\x24\x01\x2a\x01\x68\x00\x27\x01\x6a\x00\x14\x00\x6c\x00\x24\x01\xb6\x00\xb7\x00\x26\x01\x27\x01\x1b\x00\xbb\x00\x1d\x00\x75\x00\xbe\x00\x10\x00\xc0\x00\x79\x00\xc2\x00\x1e\x01\x81\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\x24\x01\xca\x00\xcb\x00\xcc\x00\x07\x01\x08\x01\x8d\x00\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x99\x00\x17\x01\x61\x00\x19\x01\x97\x00\x98\x00\x99\x00\x66\x00\x17\x01\x18\x01\x19\x01\xed\x00\xee\x00\xef\x00\x24\x01\x8d\x00\x17\x01\x70\x00\x19\x01\x1e\x01\x92\x00\x24\x01\x94\x00\x95\x00\x96\x00\x24\x01\x98\x00\x99\x00\x65\x00\x24\x01\xf3\x00\xf4\x00\x0c\x01\x37\x00\x68\x00\x0f\x01\x6a\x00\xbe\x00\x6c\x00\x70\x00\xfd\x00\xfe\x00\x19\x01\xbe\x00\x96\x00\x02\x01\x03\x01\x75\x00\x75\x00\x39\x00\xcb\x00\x79\x00\x79\x00\x24\x01\x4b\x00\x4c\x00\xcb\x00\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x68\x00\x1e\x01\x6a\x00\xbe\x00\x6c\x00\x24\x01\x96\x00\x24\x01\x1a\x01\x1b\x01\x27\x01\x1d\x01\x1e\x01\x75\x00\x61\x00\x65\x00\xcb\x00\x79\x00\x24\x01\x66\x00\x26\x01\x27\x01\x22\x01\x23\x01\x2a\x01\x25\x01\xb6\x00\xb7\x00\x70\x00\x70\x00\x1b\x01\xbb\x00\x1d\x01\x1e\x01\xbe\x00\x64\x00\xc0\x00\x66\x00\xc2\x00\x24\x01\x1e\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\x48\x00\xca\x00\xcb\x00\xcc\x00\x07\x01\x08\x01\x4b\x00\x4c\x00\x0b\x01\x0c\x01\x07\x01\x08\x01\x71\x00\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x22\x01\x23\x01\x17\x01\x25\x01\x19\x01\x4b\x00\x4c\x00\x29\x01\x17\x01\x18\x01\x19\x01\x2d\x01\x4b\x00\x07\x01\x08\x01\x24\x01\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x24\x01\xf1\x00\xf2\x00\xf3\x00\xf4\x00\x4c\x00\xfd\x00\xfe\x00\x17\x01\x18\x01\x19\x01\x02\x01\x03\x01\xfd\x00\xfe\x00\xb6\x00\xb7\x00\x37\x00\x02\x01\x03\x01\xbb\x00\x24\x01\x64\x00\xbe\x00\x66\x00\xc0\x00\x1c\x01\xc2\x00\x1e\x01\x50\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\x24\x01\xca\x00\xcb\x00\xcc\x00\x48\x00\x13\x00\x14\x00\x4f\x00\x1a\x01\x1b\x01\x18\x00\x1d\x01\x1e\x01\x26\x01\x27\x01\x68\x00\x48\x00\x6a\x00\x24\x01\x6c\x00\x26\x01\x27\x01\x4c\x00\x70\x00\x2a\x01\x61\x00\x50\x00\x8d\x00\x75\x00\x10\x00\x66\x00\x91\x00\x68\x00\x69\x00\x94\x00\x95\x00\x96\x00\x48\x00\x98\x00\x99\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\x6d\x00\xfd\x00\xfe\x00\x48\x00\x71\x00\x01\x01\x02\x01\x03\x01\xfd\x00\xfe\x00\x28\x01\x29\x01\x37\x00\x02\x01\x03\x01\x2d\x01\xae\x00\x21\x01\x22\x01\x23\x01\x42\x00\x25\x01\x1e\x01\x08\x01\x28\x01\x29\x01\x0b\x01\x0c\x01\x24\x01\x2d\x01\x26\x01\x27\x01\xbe\x00\x3c\x00\x3d\x00\x4c\x00\x4f\x00\x1a\x01\x1b\x01\x50\x00\x1d\x01\x1e\x01\x26\x01\x27\x01\x6d\x00\xcb\x00\x55\x00\x24\x01\x71\x00\x26\x01\x27\x01\x81\x00\x4a\x00\x2a\x01\x61\x00\x1c\x01\x75\x00\x1e\x01\x52\x00\x66\x00\x79\x00\x68\x00\x69\x00\x24\x01\x56\x00\x29\x01\xb6\x00\xb7\x00\x5a\x00\x2d\x01\x64\x00\xbb\x00\x66\x00\x5f\x00\xbe\x00\x64\x00\xc0\x00\x66\x00\xc2\x00\x99\x00\x71\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\x50\x00\xca\x00\xcb\x00\xcc\x00\x4b\x00\x4c\x00\x1c\x01\x72\x00\x1e\x01\x4b\x00\x4c\x00\x76\x00\x77\x00\x99\x00\x24\x01\x7a\x00\x7b\x00\xb8\x00\xb9\x00\xba\x00\x07\x01\x08\x01\x6b\x00\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x3c\x00\x3d\x00\x1b\x01\xbe\x00\x1d\x01\x1e\x01\x6b\x00\x8e\x00\x17\x01\x18\x01\x19\x01\x24\x01\x6b\x00\x37\x00\xf3\x00\xf4\x00\xcb\x00\x43\x00\x44\x00\x45\x00\x46\x00\x24\x01\xbe\x00\x6b\x00\xfd\x00\xfe\x00\xb6\x00\xb7\x00\x6b\x00\x02\x01\x03\x01\xbb\x00\x37\x00\x48\x00\xbe\x00\xcb\x00\xc0\x00\x1c\x01\xc2\x00\x1e\x01\x4b\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\x24\x01\xca\x00\xcb\x00\xcc\x00\x1b\x01\x71\x00\x1d\x01\x1e\x01\x1a\x01\x1b\x01\x48\x00\x1d\x01\x1e\x01\x24\x01\x52\x00\x66\x00\x54\x00\x71\x00\x24\x01\x08\x01\x26\x01\x27\x01\x0b\x01\x0c\x01\x2a\x01\x4a\x00\x4b\x00\x0c\x00\x64\x00\x61\x00\x66\x00\x07\x01\x08\x01\x90\x00\x66\x00\x0b\x01\x0c\x01\x56\x00\x4b\x00\x4c\x00\x6c\x00\x5a\x00\xf3\x00\xf4\x00\x02\x00\x03\x00\x5f\x00\x17\x01\x69\x00\x19\x01\x07\x01\x08\x01\xfd\x00\xfe\x00\x0b\x01\x0c\x01\x8e\x00\x02\x01\x03\x01\x08\x01\x24\x01\x8e\x00\x0b\x01\x0c\x01\x8e\x00\x72\x00\x17\x01\x6d\x00\x19\x01\x76\x00\x77\x00\x02\x00\x03\x00\x7a\x00\x7b\x00\x6b\x00\xdd\x00\xde\x00\xdf\x00\x24\x01\xe1\x00\x1a\x01\x1b\x01\x69\x00\x1d\x01\x1e\x01\xa3\x00\xa4\x00\xa5\x00\x1d\x01\x1e\x01\x24\x01\x71\x00\x26\x01\x27\x01\x52\x00\x24\x01\x2a\x01\x26\x01\x27\x01\xbb\x00\x37\x00\x64\x00\xbe\x00\x66\x00\xc0\x00\x64\x00\xc2\x00\x66\x00\x48\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xb6\x00\xb7\x00\xcb\x00\xcc\x00\x1b\x01\xbb\x00\x1d\x01\x1e\x01\xbe\x00\x48\x00\xc0\x00\x4f\x00\xc2\x00\x24\x01\x0c\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\x70\x00\xca\x00\xcb\x00\xcc\x00\x1d\x01\x1e\x01\x4a\x00\x4b\x00\x4c\x00\x52\x00\x61\x00\x24\x01\x50\x00\x26\x01\x27\x01\x66\x00\x14\x00\x68\x00\x56\x00\x5e\x00\x5f\x00\x60\x00\x5a\x00\xf3\x00\xf4\x00\x50\x00\x64\x00\x5f\x00\x66\x00\x72\x00\x06\x01\x07\x01\x08\x01\xfd\x00\xfe\x00\x0b\x01\x0c\x01\x72\x00\x02\x01\x03\x01\x6b\x00\x37\x00\xf3\x00\xf4\x00\x71\x00\x72\x00\x72\x00\x17\x01\x6b\x00\x19\x01\x76\x00\x77\x00\xfd\x00\xfe\x00\x7a\x00\x7b\x00\x6b\x00\x02\x01\x03\x01\x64\x00\x24\x01\x66\x00\x1a\x01\x1b\x01\x72\x00\x1d\x01\x1e\x01\x1b\x01\x72\x00\x1d\x01\x1e\x01\x6d\x00\x24\x01\x59\x00\x26\x01\x27\x01\x24\x01\x64\x00\x2a\x01\x66\x00\x6d\x00\x1a\x01\x1b\x01\x61\x00\x1d\x01\x1e\x01\x6b\x00\x64\x00\x66\x00\x66\x00\x64\x00\x24\x01\x66\x00\x26\x01\x27\x01\xb6\x00\xb7\x00\x2a\x01\x70\x00\x64\x00\xbb\x00\x66\x00\x64\x00\xbe\x00\x66\x00\xc0\x00\x71\x00\xc2\x00\x04\x01\x65\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\x4a\x00\xca\x00\xcb\x00\xcc\x00\x71\x00\x72\x00\x10\x01\x11\x01\x52\x00\xbc\x00\xbd\x00\x8d\x00\x56\x00\xbc\x00\xbd\x00\x91\x00\x92\x00\x52\x00\x94\x00\x95\x00\x96\x00\x5f\x00\x98\x00\x99\x00\x22\x01\x23\x01\x70\x00\x25\x01\x21\x01\x22\x01\x23\x01\x29\x01\x25\x01\x6b\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x71\x00\x6a\x00\x37\x00\xf3\x00\xf4\x00\x76\x00\x77\x00\xbc\x00\xbd\x00\x7a\x00\x7b\x00\x46\x00\x47\x00\xfd\x00\xfe\x00\xb6\x00\xb7\x00\x0b\x00\x02\x01\x03\x01\xbb\x00\xbe\x00\x64\x00\xbe\x00\x66\x00\xc0\x00\x64\x00\xc2\x00\x66\x00\x32\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xcb\x00\xca\x00\xcb\x00\xcc\x00\xb2\x00\xb3\x00\xb4\x00\x18\x00\x1a\x01\x1b\x01\x61\x00\x1d\x01\x1e\x01\x4b\x00\x76\x00\x66\x00\x78\x00\x2d\x01\x24\x01\x2f\x01\x26\x01\x27\x01\x74\x00\x75\x00\x2a\x01\x70\x00\x06\x01\x07\x01\x08\x01\x2e\x01\x2f\x01\x0b\x01\x0c\x01\x71\x00\x72\x00\x4a\x00\x99\x00\x6b\x00\xab\x00\xac\x00\xad\x00\x37\x00\xf3\x00\xf4\x00\xdd\x00\xde\x00\xdf\x00\x56\x00\xe1\x00\x0d\x01\x0e\x01\x5a\x00\xfd\x00\xfe\x00\x10\x00\x11\x00\x5f\x00\x02\x01\x03\x01\x71\x00\x07\x01\x08\x01\x4e\x00\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x6b\x00\xb2\x00\xb3\x00\xb4\x00\x72\x00\xbe\x00\x71\x00\x6b\x00\x17\x01\x18\x01\x19\x01\x76\x00\x77\x00\x1a\x01\x1b\x01\x61\x00\x1d\x01\x1e\x01\xcb\x00\x6b\x00\x66\x00\x24\x01\x71\x00\x24\x01\x6b\x00\x26\x01\x27\x01\xb6\x00\xb7\x00\x2a\x01\x6b\x00\xdf\x00\xbb\x00\xe1\x00\x6b\x00\xbe\x00\x6b\x00\xc0\x00\x6b\x00\xc2\x00\x10\x00\x11\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\x69\x00\xca\x00\xcb\x00\xcc\x00\xfc\x00\x65\x00\xfe\x00\xb2\x00\xb3\x00\xb4\x00\x02\x01\x8d\x00\x71\x00\x21\x01\x22\x01\x23\x01\x92\x00\x25\x01\x94\x00\x95\x00\x96\x00\x4c\x00\x98\x00\x99\x00\xb2\x00\xb3\x00\xb4\x00\xb2\x00\xb3\x00\xb4\x00\xf2\x00\xf3\x00\x07\x01\x08\x01\x1a\x01\x4e\x00\x0b\x01\x0c\x01\x1e\x01\xb2\x00\xb3\x00\xb4\x00\xf3\x00\xf4\x00\x24\x01\x61\x00\x26\x01\x27\x01\x17\x01\x61\x00\x19\x01\x52\x00\xfd\x00\xfe\x00\xb6\x00\xb7\x00\x71\x00\x02\x01\x03\x01\xbb\x00\xbe\x00\x24\x01\xbe\x00\x16\x00\xc0\x00\x50\x00\xc2\x00\xa4\x00\xa5\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xcb\x00\xca\x00\xcb\x00\xcc\x00\xac\x00\xad\x00\x34\x00\x35\x00\x1a\x01\x1b\x01\x71\x00\x1d\x01\x1e\x01\x6b\x00\xfa\x00\xfb\x00\x65\x00\x71\x00\x24\x01\xff\x00\x26\x01\x27\x01\x02\x01\x03\x01\x2a\x01\x8d\x00\x4b\x00\x48\x00\x48\x00\x82\x00\x92\x00\x69\x00\x94\x00\x95\x00\x96\x00\x4b\x00\x98\x00\x99\x00\x6b\x00\x48\x00\x6b\x00\x48\x00\xf3\x00\xf4\x00\x4e\x00\x50\x00\x1a\x01\x18\x00\x72\x00\x72\x00\x1e\x01\x71\x00\xfd\x00\xfe\x00\x4b\x00\x6b\x00\x24\x01\x02\x01\x03\x01\x27\x01\x07\x01\x08\x01\x4b\x00\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x18\x00\x75\x00\x4c\x00\x4e\x00\x81\x00\x81\x00\xbe\x00\x48\x00\x17\x01\x18\x01\x19\x01\x48\x00\x99\x00\x1a\x01\x1b\x01\x15\x00\x1d\x01\x1e\x01\x6a\x00\xcb\x00\x4a\x00\x24\x01\x0b\x00\x24\x01\x18\x00\x26\x01\x27\x01\x70\x00\x52\x00\x2a\x01\x18\x00\x99\x00\x56\x00\x81\x00\x6b\x00\x48\x00\x5a\x00\x69\x00\x18\x00\x8d\x00\x4b\x00\x5f\x00\x65\x00\x71\x00\x92\x00\x72\x00\x94\x00\x95\x00\x96\x00\xbe\x00\x98\x00\x99\x00\x4b\x00\x4b\x00\x4b\x00\x5f\x00\x71\x00\x59\x00\x4c\x00\x18\x00\x72\x00\x50\x00\xcb\x00\x18\x00\x76\x00\x77\x00\x8d\x00\x07\x00\xbe\x00\x55\x00\x19\x00\x92\x00\x50\x00\x94\x00\x95\x00\x96\x00\x48\x00\x98\x00\x99\x00\x07\x01\x08\x01\xcb\x00\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x7e\x00\xbe\x00\x65\x00\x69\x00\x65\x00\x70\x00\x50\x00\x69\x00\x17\x01\x18\x01\x19\x01\x70\x00\x70\x00\x6b\x00\xcb\x00\x18\x00\x48\x00\x48\x00\x18\x00\x6b\x00\x70\x00\x24\x01\x8d\x00\x65\x00\x18\x00\x6b\x00\x91\x00\x92\x00\xbe\x00\x94\x00\x95\x00\x96\x00\x2b\x00\x98\x00\x99\x00\x07\x01\x08\x01\x50\x00\x4c\x00\x0b\x01\x0c\x01\xcb\x00\x70\x00\x48\x00\x71\x00\x50\x00\x48\x00\x07\x00\x5f\x00\x18\x00\x18\x00\x17\x01\x07\x00\x19\x01\x07\x01\x08\x01\xfd\x00\xfe\x00\x0b\x01\x0c\x01\x4b\x00\x02\x01\x03\x01\x5f\x00\x24\x01\x5a\x00\x69\x00\x81\x00\x71\x00\x6a\x00\x17\x01\xbe\x00\x19\x01\x6b\x00\x07\x01\x08\x01\x70\x00\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x70\x00\x24\x01\xcb\x00\x6b\x00\x1b\x01\x6b\x00\x1d\x01\x1e\x01\x17\x01\x18\x01\x19\x01\x6b\x00\x15\x00\x24\x01\x4b\x00\x26\x01\x27\x01\x4c\x00\x52\x00\x07\x01\x08\x01\x24\x01\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x10\x00\x4a\x00\x21\x00\x07\x00\x31\x00\x5f\x00\x55\x00\x8d\x00\x17\x01\x18\x01\x19\x01\x91\x00\x92\x00\x56\x00\x94\x00\x95\x00\x96\x00\x5a\x00\x98\x00\x99\x00\x55\x00\x24\x01\x5f\x00\xf8\x00\xf9\x00\x19\x00\xfb\x00\x39\x00\x08\x00\x6a\x00\xff\x00\x2c\x00\x68\x00\x02\x01\x03\x01\x07\x01\x08\x01\x71\x00\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x55\x00\x6b\x00\x76\x00\x77\x00\x65\x00\x42\x00\x7a\x00\x7b\x00\x17\x01\x18\x01\x19\x01\x70\x00\x02\x00\xbe\x00\x1a\x01\x6b\x00\x6b\x00\x71\x00\x1e\x01\x65\x00\x5f\x00\x24\x01\x4b\x00\x65\x00\x24\x01\x4b\x00\xcb\x00\x27\x01\x02\x00\x6a\x00\x18\x00\x50\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x6a\x00\x94\x00\x95\x00\x96\x00\x6a\x00\x98\x00\x99\x00\x6b\x00\x18\x00\x07\x00\x9d\x00\x9e\x00\x07\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x18\x00\x94\x00\x95\x00\x96\x00\x76\x00\x98\x00\x99\x00\x4a\x00\x6b\x00\x76\x00\x12\x00\x2c\x01\x2e\x00\x2d\x01\x2c\x01\xe7\x00\x36\x00\xe7\x00\x93\x00\xe7\x00\xcf\x00\x5b\x00\x44\x00\x83\x00\xbe\x00\x2f\x00\x2c\x01\x2c\x01\x16\x00\x07\x01\x08\x01\x2b\x01\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\x16\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xbe\x00\xfb\x00\x17\x01\x18\x01\x19\x01\xff\x00\x30\x00\x80\x00\x02\x01\x03\x01\x80\x00\x93\x00\x84\x00\xcb\x00\xa2\x00\x24\x01\x84\x00\x88\x00\x5b\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xcd\x00\x94\x00\x95\x00\x96\x00\x31\x01\x98\x00\x99\x00\x1a\x01\x77\x00\xf3\x00\x30\x01\x1e\x01\xc3\x00\x16\x00\x2b\x01\x22\x01\x23\x01\x24\x01\x25\x01\x16\x00\x27\x01\x20\x00\x29\x01\x80\x00\x80\x00\x20\x00\x2d\x01\x2e\x00\xf3\x00\x07\x01\x08\x01\x03\x00\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x0a\x00\x31\x01\x2b\x01\xe1\x00\x6b\x00\x2b\x01\xbe\x00\x56\x00\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\x2b\x01\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\x2b\x01\x24\x01\x57\x00\x44\x00\x6f\x00\x79\x00\x77\x00\x17\x01\x18\x01\x19\x01\x2d\x01\x27\x01\x2f\x01\x75\x00\x81\x00\x32\x00\x20\x00\x0e\x01\x22\x01\x23\x01\x24\x01\x25\x01\x20\x00\x2a\x00\x28\x01\x29\x01\x31\x00\x65\x00\x48\x00\x2d\x01\x6e\x00\x6a\x00\x73\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xf3\x00\x94\x00\x95\x00\x96\x00\x60\x00\x98\x00\x99\x00\xa7\x00\x2a\x00\x2b\x01\x0f\x00\x2b\x01\x1c\x00\x1c\x00\x73\x00\xc3\x00\x05\x01\xe1\x00\xa7\x00\xb4\x00\x07\x01\x08\x01\x4b\x00\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xa5\x00\x12\x01\x17\x00\x14\x01\x15\x01\x2c\x01\x24\x00\x2c\x01\x17\x01\x18\x01\x19\x01\x17\x00\x32\x00\x2a\x00\x1f\x01\xbe\x00\x21\x01\x22\x01\x23\x01\x4c\x00\x25\x01\x24\x01\x51\x00\x28\x01\x29\x01\x2b\x01\x51\x00\x50\x00\xcb\x00\x46\x00\x2d\x01\x89\x00\x8a\x00\x2b\x01\x2f\x00\x8d\x00\x8e\x00\x2c\x01\x90\x00\x91\x00\x92\x00\x2b\x01\x94\x00\x95\x00\x96\x00\x11\x00\x98\x00\x99\x00\x0c\x00\x9b\x00\x2c\x01\x16\x00\x2b\x01\x58\x00\x5b\x00\x2b\x01\x33\x00\x2b\x01\x56\x00\x2c\x01\x16\x00\x58\x00\x89\x00\x8a\x00\x20\x00\x2b\x01\x8d\x00\x8e\x00\xf3\x00\x90\x00\x91\x00\x92\x00\x20\x00\x94\x00\x95\x00\x96\x00\xa7\x00\x98\x00\x99\x00\x2b\x01\x9b\x00\x17\x00\x2c\x01\x2c\x01\xbe\x00\x2c\x01\x17\x00\x2c\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xcb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x01\xff\xff\xcb\x00\xff\xff\xff\xff\x89\x00\x8a\x00\x4a\x00\xff\xff\x8d\x00\x8e\x00\xf3\x00\x90\x00\x91\x00\x92\x00\x52\x00\x94\x00\x95\x00\x96\x00\x56\x00\x98\x00\x99\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\x6b\x00\xff\xff\xf3\x00\xff\xff\xff\xff\xff\xff\x71\x00\x17\x01\x18\x01\x19\x01\xff\xff\x76\x00\x77\x00\xff\xff\xff\xff\x7a\x00\x7b\x00\xff\xff\xbe\x00\xff\xff\x24\x01\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xcb\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xff\xff\xfb\x00\x17\x01\x18\x01\x19\x01\xff\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x89\x00\x8a\x00\xff\xff\x24\x01\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\x4a\x00\x1a\x01\xff\xff\xff\xff\xf3\x00\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\x56\x00\xff\xff\x27\x01\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\x6b\x00\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x17\x01\x18\x01\x19\x01\xff\xff\x76\x00\x77\x00\xff\xff\xcb\x00\x7a\x00\x7b\x00\xff\xff\x8a\x00\xff\xff\x24\x01\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\x9a\x00\xff\xff\xff\xff\x8a\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\x9a\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xcb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\x24\x01\xff\xff\x8a\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\x9a\x00\xff\xff\xf3\x00\x8a\x00\xff\xff\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\x24\x01\x8a\x00\xff\xff\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x8a\x00\xff\xff\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\x05\x01\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\x12\x01\x24\x01\x14\x01\x15\x01\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\x1f\x01\xff\xff\x21\x01\x22\x01\x23\x01\xcb\x00\x25\x01\x24\x01\x8a\x00\x28\x01\x29\x01\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x8a\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\x05\x01\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\x12\x01\x24\x01\x14\x01\x15\x01\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\x1f\x01\xff\xff\x21\x01\x22\x01\x23\x01\xcb\x00\x25\x01\x24\x01\x8a\x00\x28\x01\x29\x01\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x8a\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\x24\x01\x8a\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x8a\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\x24\x01\x8a\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x8a\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\x24\x01\xff\xff\x4a\x00\x4b\x00\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xcb\x00\x5a\x00\x24\x01\xff\xff\xff\xff\xff\xff\x5f\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xf3\x00\x9c\x00\x9d\x00\xff\xff\x72\x00\xff\xff\xff\xff\xff\xff\x76\x00\x77\x00\xff\xff\xff\xff\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xcb\x00\x24\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x24\x01\x98\x00\x99\x00\xff\xff\xff\xff\x9c\x00\x9d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xf3\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x56\x00\x94\x00\x95\x00\x96\x00\x5a\x00\x98\x00\x99\x00\xff\xff\xff\xff\x5f\x00\x9d\x00\xff\xff\xbe\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\xff\xff\x72\x00\x17\x01\x18\x01\x19\x01\x76\x00\x77\x00\xff\xff\xff\xff\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xbe\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xcb\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x9d\x00\xff\xff\xff\xff\xf3\x00\xff\xff\xff\xff\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xff\xff\xfb\x00\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xbe\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\x1a\x01\xff\xff\xff\xff\xcb\x00\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\x24\x01\x07\x01\x08\x01\x27\x01\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\x4b\x00\x24\x01\xff\xff\xff\xff\xf3\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x56\x00\x94\x00\x95\x00\x96\x00\x5a\x00\x98\x00\x99\x00\xff\xff\xff\xff\x5f\x00\xff\xff\x9e\x00\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x17\x01\x18\x01\x19\x01\x76\x00\x77\x00\xff\xff\xff\xff\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xbe\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xcb\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x9d\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x9d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xf3\x00\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xcb\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x07\x01\x08\x01\xa1\x00\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\xbe\x00\xf3\x00\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xcb\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\x24\x01\xff\xff\xbe\x00\xf3\x00\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xcb\x00\x94\x00\x95\x00\x96\x00\x24\x01\x98\x00\x99\x00\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\xff\xff\xf3\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xcb\x00\x98\x00\x99\x00\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x24\x01\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xbe\x00\xf3\x00\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xa6\x00\x94\x00\x95\x00\x96\x00\xcb\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\xbe\x00\xf3\x00\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xcb\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\xbe\x00\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\xff\xff\xf3\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xa6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\x8d\x00\x8e\x00\xbe\x00\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xcb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa6\x00\xff\xff\xfc\x00\xff\xff\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x8d\x00\x8e\x00\x05\x01\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\x11\x01\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xff\xff\x1a\x01\xff\xff\xa6\x00\xff\xff\x1e\x01\xcb\x00\xff\xff\xff\xff\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xcb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xff\xff\x24\x01\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xa6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\xff\xff\xbe\x00\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x24\x01\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xbe\x00\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xa6\x00\xff\xff\xcb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xcb\x00\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xa6\x00\x4a\x00\xff\xff\xff\xff\xff\xff\xbe\x00\xf3\x00\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\x5a\x00\xcb\x00\xff\xff\x24\x01\xff\xff\x5f\x00\xff\xff\xbe\x00\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\xff\xff\xff\xff\x72\x00\x17\x01\x18\x01\x19\x01\x76\x00\x77\x00\xff\xff\xff\xff\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\x8d\x00\x8e\x00\xf3\x00\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xbe\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xcb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x24\x01\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\xff\xff\xff\xff\x91\x00\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xf3\x00\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\x17\x01\x18\x01\x19\x01\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\x8d\x00\xbe\x00\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xff\xff\xcb\x00\x24\x01\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\xae\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\x17\x01\x18\x01\x19\x01\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xcb\x00\x24\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\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\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\xff\xff\x24\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\x24\x01\x07\x00\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\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\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\x63\x00\x64\x00\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\x63\x00\x64\x00\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\x63\x00\x64\x00\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\x63\x00\xff\xff\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\xff\xff\xff\xff\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\xff\xff\xff\xff\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\xff\xff\xff\xff\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x00\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\x4b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\x62\x00\x63\x00\x64\x00\x65\x00\xff\xff\x67\x00\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\x70\x00\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x91\x00\x09\x00\x0a\x00\x94\x00\x95\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\xff\xff\x13\x00\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xff\xff\xff\xff\x40\x00\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x4a\x00\x4b\x00\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\x61\x00\x62\x00\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\x69\x00\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\x06\x00\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\x13\x00\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\x06\x00\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\x13\x00\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\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\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\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\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\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\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\x6d\x00\x6e\x00\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\x6d\x00\x6e\x00\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\x69\x00\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\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\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\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\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\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\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\x16\x00\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\x16\x00\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\x4e\x00\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x57\x00\x58\x00\x59\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\x81\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x57\x00\x58\x00\x59\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\x6f\x00\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\x74\x00\x75\x00\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\x81\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x57\x00\x58\x00\x59\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\x74\x00\x75\x00\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\x81\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x57\x00\x58\x00\x59\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\x81\x00\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\x4b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\x62\x00\x63\x00\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\x01\x00\x02\x00\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\x91\x00\xff\xff\xff\xff\x94\x00\x95\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\x4b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\x62\x00\x63\x00\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x01\x00\x02\x00\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\x15\x00\xff\xff\x94\x00\x95\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\x01\x00\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\xff\xff\xff\xff\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\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\xff\xff\xff\xff\x94\x00\x95\x00\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\x6d\x00\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\xff\xff\xff\xff\x94\x00\x95\x00\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\x01\x00\x02\x00\xff\xff\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\x10\x00\xff\xff\x94\x00\x95\x00\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x01\x00\x02\x00\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\x15\x00\xff\xff\x94\x00\x95\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\xff\xff\xff\xff\x94\x00\x95\x00\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\x69\x00\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\x10\x00\xff\xff\x94\x00\x95\x00\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\x1b\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x01\x00\x02\x00\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\x15\x00\xff\xff\x94\x00\x95\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\xff\xff\xff\xff\x94\x00\x95\x00\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\xff\xff\xff\xff\x94\x00\x95\x00\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x01\x00\x02\x00\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\x15\x00\xff\xff\x94\x00\x95\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x01\x00\x02\x00\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\x15\x00\xff\xff\x94\x00\x95\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\xff\xff\xff\xff\x94\x00\x95\x00\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\xff\xff\xff\xff\x94\x00\x95\x00\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\xff\xff\xff\xff\x94\x00\x95\x00\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x01\x00\x02\x00\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\x15\x00\xff\xff\x94\x00\x95\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x01\x00\x02\x00\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\x15\x00\xff\xff\x94\x00\x95\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x01\x00\x02\x00\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\x15\x00\xff\xff\x94\x00\x95\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x01\x00\x02\x00\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\x15\x00\xff\xff\x94\x00\x95\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\x01\x00\x02\x00\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\x91\x00\xff\xff\xff\xff\x94\x00\x95\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x7a\x00\x7b\x00\x01\x00\x02\x00\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\x91\x00\xff\xff\xff\xff\x94\x00\x95\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\x57\x00\x58\x00\xff\xff\x5a\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\xff\xff\x79\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\xff\xff\xff\xff\x94\x00\x95\x00\x6a\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\x81\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\x6a\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x81\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe2\x00\xe3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6a\x00\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x81\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\x2b\x01\xe2\x00\xe3\x00\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\x35\x01\xff\xff\x37\x01\xff\xff\x39\x01\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xe2\x00\xe3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\x35\x01\xff\xff\x37\x01\xff\xff\x39\x01\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xe2\x00\xe3\x00\x49\x00\x4a\x00\x4b\x00\xff\xff\xff\xff\x32\x01\xff\xff\x50\x00\x35\x01\x52\x00\x37\x01\xff\xff\x39\x01\x56\x00\xff\xff\xf3\x00\xf4\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\x65\x00\xbe\x00\x02\x01\x03\x01\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xc6\x00\xc7\x00\xc8\x00\x71\x00\x72\x00\xcb\x00\xcc\x00\xff\xff\x76\x00\x77\x00\xff\xff\xff\xff\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xe5\x00\xe6\x00\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\x39\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\x2b\x01\xe5\x00\xe6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x34\x01\xff\xff\x36\x01\xff\xff\x38\x01\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xe5\x00\xe6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\x34\x01\xff\xff\x36\x01\xff\xff\x38\x01\xf3\x00\xf4\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe5\x00\xe6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\x34\x01\xff\xff\x36\x01\xff\xff\x38\x01\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\x09\x00\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\x15\x00\x26\x01\x27\x01\xff\xff\x19\x00\x2a\x01\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\x38\x01\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\x02\x00\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\x72\x00\xff\xff\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\x72\x00\xff\xff\x74\x00\x75\x00\x76\x00\x77\x00\x09\x00\x79\x00\xff\xff\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\x2d\x00\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\x2d\x00\xff\xff\x2f\x00\x30\x00\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\x6a\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x09\x00\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\x6a\x00\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x68\x00\xff\xff\x6a\x00\x09\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\x15\x00\x78\x00\x79\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\x09\x00\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\x6a\x00\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x09\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\x15\x00\xff\xff\x79\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\x15\x00\x78\x00\x79\x00\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\x74\x00\x75\x00\x15\x00\xff\xff\xff\xff\x79\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x15\x00\xff\xff\xff\xff\x79\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\x68\x00\xff\xff\x6a\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x02\x00\xff\xff\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\x49\x00\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x02\x00\xff\xff\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\x6a\x00\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\x78\x00\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xbe\x00\xff\xff\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\x56\x00\xff\xff\xcb\x00\xcc\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xbe\x00\x02\x01\x03\x01\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x01\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd1\x00\xd2\x00\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x33\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\x05\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\x13\x01\x14\x01\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\x2f\x01\xff\xff\x02\x00\x32\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\x09\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\x15\x00\xff\xff\xd1\x00\xd2\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\x05\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\x13\x01\x14\x01\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x74\x00\x2f\x01\xff\xff\x02\x00\x32\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\x09\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\x15\x00\xff\xff\xd1\x00\xd2\x00\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\x05\x01\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\x13\x01\x14\x01\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x74\x00\x2f\x01\xff\xff\xff\xff\x32\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd1\x00\xff\xff\xff\xff\xff\xff\xd5\x00\xd6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\x05\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\x13\x01\x14\x01\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\x32\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd1\x00\xff\xff\xff\xff\xd4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\x05\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\x13\x01\x14\x01\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\x32\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd1\x00\xff\xff\xff\xff\xd4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\x05\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\x13\x01\x14\x01\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\x32\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\x05\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\x13\x01\x14\x01\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\x32\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\x05\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\x13\x01\x14\x01\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\x32\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\x05\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\x13\x01\x14\x01\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\x32\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\x05\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\x13\x01\x14\x01\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\x32\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\x05\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\x13\x01\x14\x01\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\x32\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\x05\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\x13\x01\x14\x01\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\x32\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd7\x00\xd8\x00\xd9\x00\xda\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xd8\x00\xd9\x00\xda\x00\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xea\x00\xeb\x00\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xe9\x00\x32\x01\xeb\x00\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xe4\x00\xff\xff\xff\xff\xff\xff\xe8\x00\xff\xff\x32\x01\xeb\x00\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xe4\x00\xff\xff\xff\xff\xff\xff\xe8\x00\xff\xff\x32\x01\xeb\x00\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xdb\x00\xdc\x00\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xdb\x00\xdc\x00\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xdf\x00\xe0\x00\xe1\x00\xff\xff\xff\xff\xff\xff\xff\xff\x32\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\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xeb\x00\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xda\x00\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xe2\x00\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xe2\x00\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xe2\x00\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xbe\x00\xbf\x00\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x01\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\x1b\x00\x1c\x00\x1d\x00\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\x1b\x01\x02\x00\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\x12\x00\xff\xff\xff\xff\x15\x00\xff\xff\x17\x00\x32\x01\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x09\x00\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\x74\x00\x75\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x09\x00\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\x74\x00\x75\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x09\x00\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\x74\x00\x75\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\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\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\x4c\x00\xff\xff\x15\x00\xff\xff\xff\xff\x51\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\x64\x00\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\x71\x00\xff\xff\xff\xff\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\x02\x00\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\x6a\x00\xff\xff\xff\xff\xff\xff\xbe\x00\xff\xff\xc0\x00\xff\xff\xc2\x00\xff\xff\x74\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xc0\x00\xff\xff\xc2\x00\xff\xff\xff\xff\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\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\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xbe\x00\x2a\x01\xc0\x00\xff\xff\xc2\x00\xff\xff\xff\xff\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xc0\x00\xff\xff\xc2\x00\xff\xff\xff\xff\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\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\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x00\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe5\x00\xe6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\xe5\x00\xe6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xbe\x00\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\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\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xf3\x00\xf4\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xc6\x00\xc7\x00\xc8\x00\x02\x01\x03\x01\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xc6\x00\xc7\x00\xc8\x00\x02\x01\x03\x01\xcb\x00\xcc\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xf3\x00\xf4\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xc6\x00\xc7\x00\xc8\x00\x02\x01\x03\x01\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xc6\x00\xc7\x00\xc8\x00\x02\x01\x03\x01\xcb\x00\xcc\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xf3\x00\xf4\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xc6\x00\xc7\x00\xc8\x00\x02\x01\x03\x01\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xc6\x00\xc7\x00\xc8\x00\x02\x01\x03\x01\xcb\x00\xcc\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xf3\x00\xf4\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xc6\x00\xc7\x00\xc8\x00\x02\x01\x03\x01\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xc6\x00\xc7\x00\xc8\x00\x02\x01\x03\x01\xcb\x00\xcc\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc6\x00\xc7\x00\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xf3\x00\xf4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xf3\x00\xf4\x00\xff\xff\xff\xff\xbe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xc8\x00\x02\x01\x03\x01\xcb\x00\xcc\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xbe\x00\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\xf3\x00\xf4\x00\xff\xff\xc8\x00\xff\xff\xff\xff\xcb\x00\xcc\x00\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xf3\x00\xf4\x00\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xfd\x00\xfe\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\xff\xff\xff\xff\x2a\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\xff\xff\xff\xff\xff\xff"#--happyTable :: HappyAddr-happyTable = HappyA# "\x00\x00\x70\x00\x3c\x05\x3d\x05\x3f\x05\x40\x05\x22\x01\x7b\x04\x73\x05\x7a\x05\xca\x00\x18\x05\x75\x05\x9a\x04\x01\x03\x76\x05\xcb\x04\x17\x02\xca\x04\x18\x02\x48\x03\x71\x05\xcb\x04\x17\x02\x37\x05\x18\x02\x91\x02\x92\x02\xcb\x04\x17\x02\x49\x05\x18\x02\x16\x02\x17\x02\x17\x02\x18\x02\xe4\x03\x7f\x04\x3d\x03\x80\x04\x9a\x02\xb1\x02\xa3\x02\x5e\x05\x86\x02\x55\x03\xde\x04\x05\x01\x18\x01\x19\x01\x6d\x03\x9b\x03\xe9\x00\x3b\x03\x91\x02\x92\x02\x6d\x02\xcb\x00\x1e\x04\x14\x02\x77\x04\xff\x00\x14\x02\x81\x04\x87\x04\x81\x00\x14\x02\xfe\x02\x3c\x02\x4d\x04\x4e\x04\x4f\x04\x68\x03\x65\x03\x31\x00\x0d\x03\x50\x04\x51\x04\x14\x02\x60\x05\x4e\x04\x4f\x04\xbe\x02\xba\x02\xf6\x02\xb3\x01\x50\x04\x51\x04\x63\x05\x01\x01\x14\x02\x7d\x05\x4e\x04\x4f\x04\x3e\x04\x3f\x04\xff\xff\x3d\x02\x50\x04\x51\x04\x0e\x03\x73\x04\x3f\x04\x02\x05\x9e\x02\x00\x03\xbe\x03\x32\x00\x50\x04\x51\x04\x8c\x00\x5f\x05\x06\x05\x51\x04\xbb\x02\x14\x05\x3f\x04\x03\x05\x04\x05\x05\x05\x06\x05\x51\x04\xf7\x02\x41\x03\x42\x03\x9b\x04\xbc\x02\x72\x03\xe0\x02\x06\x01\x6e\x02\x14\x02\x9c\x04\x48\x00\x87\x02\x6e\x03\x88\x02\xa5\x02\x83\x04\xbf\x02\x5f\x05\x87\x02\xec\x00\x1f\x04\x66\x03\x8f\x00\xb3\x01\xa7\x02\xf0\x01\x92\x00\x4d\x00\x36\x00\x94\x00\x95\x00\x96\x00\x97\x00\x33\x00\xa8\x02\xa9\x02\xaa\x02\x56\x03\x4e\x00\x15\x02\x23\x01\x24\x01\x15\x02\x73\x00\x11\x01\x43\x03\x15\x02\x0b\x01\x16\x02\x13\x01\x64\x05\x1a\x01\x1b\x01\x17\x03\x94\x02\x11\x00\x10\x01\x6b\x05\x15\x02\x73\x00\x11\x01\x73\x03\xe6\x01\x06\x01\x64\x00\x07\x01\x13\x01\x96\x03\xb2\x02\x72\x00\x15\x02\x25\x01\x11\x00\x73\x00\x74\x00\x9e\x00\x9f\x00\x11\x00\x02\x03\x8c\x03\x14\x01\x07\x01\x93\x02\x12\x01\x11\x00\xa0\x00\x72\x00\x13\x01\x9c\x04\x48\x00\x73\x00\x74\x00\x7c\x04\x11\x00\x7c\x04\x19\x05\x14\x01\xba\x02\xb3\x02\x6c\x05\x0f\x00\x10\x00\x02\x03\x4e\x00\x38\x04\x4e\x00\x4e\x00\x11\x00\x11\x00\x7c\x00\x7d\x00\x15\x02\x3c\x03\xbf\x04\xce\x00\xa1\x00\x13\x01\x0f\x00\xcf\x00\x3c\x03\x8a\x03\x9b\x02\x11\x00\x13\x01\x11\x00\x45\x04\x7c\x00\x7d\x00\xbb\x02\x11\x00\xa2\x00\x71\x00\x72\x00\x9c\x02\x9d\x02\x40\x04\x73\x00\x74\x00\xff\xff\x75\x00\x37\x03\x11\x00\x40\x04\x25\xff\x2f\x03\xff\xff\xc0\x04\xc1\x04\x11\x00\x43\x03\x46\x04\xcf\x01\x7a\x00\x13\x01\x7b\x00\x76\x00\x40\x04\x13\x03\x9e\x02\x11\x00\x3f\x01\x0e\x00\x11\x00\x0f\x00\x10\x00\x77\x00\x3e\x05\x78\x00\x79\x00\x7a\x00\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x41\x05\x19\x02\x52\x04\x41\x05\x53\x04\x48\x00\x04\x02\x19\x02\x3e\x05\x30\x04\xef\x01\x14\x02\x52\x04\x19\x02\x53\x04\x48\x00\x31\x03\x19\x02\x19\x02\x14\x02\x54\x04\x14\x03\x0f\x00\x10\x00\x52\x04\xff\x01\x53\x04\x48\x00\xd5\x03\x11\x00\x54\x04\xd6\x03\x0f\x00\x10\x00\x52\x04\xec\x03\x53\x04\x48\x00\x52\x04\x11\x00\x53\x04\x48\x00\x54\x04\x14\x02\x0f\x00\x10\x00\x52\x04\x14\x02\x53\x04\x48\x00\x81\x00\x11\x00\x54\x04\x14\x02\x0f\x00\x10\x00\x54\x04\x69\x03\x0f\x00\x10\x00\xd7\x03\x11\x00\xca\x00\x0f\x03\x54\x04\x11\x00\x0f\x00\x10\x00\x5b\x04\x5c\x04\xe1\x00\xe2\x00\xe3\x00\x11\x00\xe4\x00\xfe\x01\x43\x03\x5d\x01\x80\x02\xed\x03\x13\x01\x65\x02\xd0\x02\x60\x01\xa9\x01\x81\x02\x11\x00\x11\x00\x58\xff\x61\x01\xe5\x00\xe6\x00\xd1\x02\x1a\x01\x1b\x01\x8c\x00\xe2\x01\xaa\x01\x10\x01\xe7\x00\xe8\x00\x73\x00\x11\x01\x10\x03\xe9\x00\x32\x02\x98\x02\x33\x00\x36\x00\xcb\x00\x61\x01\x90\x03\x6a\x03\x6b\x03\x15\x02\x3c\x00\x3d\x00\x3e\x00\x82\x02\x3f\x00\x40\x00\x0a\x03\x15\x02\xf2\x04\x57\x00\x12\x01\x58\xff\x34\x00\xf0\x01\x13\x01\x4d\x00\xe8\x04\xe3\x01\xe4\x01\xe5\x01\x11\x00\x58\x00\xea\x00\x14\x01\x1e\x01\x1b\x01\x4e\x00\xf4\x01\x33\x02\x10\x01\x5c\x00\x15\x02\x73\x00\x11\x01\x33\x02\x15\x02\x2d\x02\x1c\x01\x1d\x01\x9e\x04\xca\x04\x15\x02\x41\x00\x5d\x01\x8c\x03\x41\x02\x0b\x03\x01\x04\x81\x00\x2e\x02\x55\x05\x98\x02\x4a\x00\x65\x00\x66\x00\x42\x00\x12\x01\x68\x00\x69\x00\x42\x01\x13\x01\xed\x01\xee\x01\xef\x01\xb8\x04\xe2\x01\x11\x00\x9f\x04\xa0\x04\x14\x01\xcf\x02\x52\x02\x2a\x01\x78\x01\xeb\x00\x79\x01\x61\x01\x38\x02\x42\x02\xec\x00\x02\x04\x60\x01\x8f\x00\xdd\x01\xed\x00\xb9\x04\x92\x00\x61\x01\xd0\x03\x94\x00\x95\x00\x96\x00\x97\x00\x8c\x00\x5d\x01\x98\x00\x99\x00\x8f\x00\xe2\x04\xe0\x04\xed\x01\xca\x00\xcd\x03\xe5\x01\x2b\x02\xee\x01\xef\x01\x05\x03\xe0\x00\xe1\x00\xe2\x00\xe3\x00\x06\x03\xe4\x00\xd1\x03\x44\x00\x45\x00\xec\x01\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x8a\x02\xe6\x01\xe1\x04\xa1\x04\x61\x01\x13\x01\xe5\x00\xe6\x00\x4b\x00\x4c\x00\x4d\x00\x11\x00\x9e\x00\x9f\x00\x64\x00\xe7\x00\xe8\x00\x03\x04\x67\x00\x0c\x05\xe9\x00\x4e\x00\xa0\x00\x72\x00\x36\x00\xcb\x00\xd3\x02\x73\x00\x74\x00\x2b\x01\x0b\x05\x2c\x01\x3d\x00\x3e\x00\xff\xff\x3f\x00\x40\x00\x07\x01\x1e\x01\x1b\x01\x29\x01\x74\x01\x24\x01\x10\x01\x73\x00\x11\x01\x73\x00\x11\x01\x07\x01\xdf\x04\xe0\x04\xce\x00\xa1\x00\xea\x00\x0f\x00\xcf\x00\x2a\x01\xf0\x02\xf0\x01\x3a\x02\x4d\x00\x11\x00\x43\x01\x7c\x00\x7d\x00\x3b\x02\x09\x02\xa2\x00\x64\x00\x05\x02\x12\x01\x4e\x00\x67\x00\x41\x00\x13\x01\x44\x01\xe1\x04\x45\x01\x46\x01\x06\x02\x11\x00\x14\x01\x06\x02\x14\x01\xb8\x01\xe6\x01\x42\x00\xb9\x01\x77\x00\x13\x01\x78\x00\x79\x00\x7a\x00\xc7\x04\x7b\x00\x11\x00\x34\x02\x7e\x00\x7f\x00\x96\xfd\x3a\x01\xf0\x01\x9f\x01\x4d\x00\x35\x02\xeb\x00\x06\x02\x4c\x03\xee\x01\xef\x01\xec\x00\xea\x03\x5f\x02\x8f\x00\x4e\x00\xed\x00\xb7\x01\x92\x00\x46\x05\xe0\x04\x94\x00\x95\x00\x96\x00\x97\x00\x1d\x05\x1b\x05\x98\x00\x99\x00\x3b\x01\x3c\x01\x3d\x01\x9a\x01\xca\x00\x74\x01\x87\x03\x61\x01\x73\x00\x11\x01\xff\xff\x93\x03\xe1\x00\xe2\x00\xe3\x00\x1e\x02\xe4\x00\xe1\x04\x44\x00\x2d\x01\x91\xfe\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x16\x02\x91\xfe\x60\x02\x61\x02\x0f\x00\x62\x02\xe5\x00\xe6\x00\x4b\x00\x4c\x00\x4d\x00\x11\x00\x9e\x00\x9f\x00\x57\x00\xe7\x00\xe8\x00\xc6\x04\x91\xfe\x14\x01\xe9\x00\x4e\x00\xa0\x00\x72\x00\x0e\x02\xcb\x00\x58\x00\x73\x00\x74\x00\x1f\x03\x06\x02\x1c\x04\xee\x01\xef\x01\x36\x00\x5c\x00\xb6\x01\x0f\x02\x10\x02\xf2\x02\x83\x00\x2c\x01\x3d\x00\x3e\x00\x84\x00\x3f\x00\x40\x00\x20\x03\x21\x03\x85\x00\x37\x02\xce\x00\xa1\x00\xea\x00\x0f\x00\xcf\x00\x38\x02\x95\x03\x65\x00\x66\x00\x8b\x03\x11\x00\x7d\x01\x7c\x00\x7d\x00\x1a\x05\x1b\x05\xa2\x00\x96\x03\x91\xfe\x91\xfe\x8c\x03\x8b\x00\xf0\x01\x91\xfe\x4d\x00\xfb\x01\xfc\x01\x23\x03\xa2\x04\xee\x01\xef\x01\x47\x04\x41\x00\x74\x01\x2c\x05\x4e\x00\x73\x00\x11\x01\xa1\x04\x48\x04\x24\x03\x25\x03\xfd\x01\x6d\x05\x91\xfe\x42\x00\x91\xfe\x89\x03\x83\x00\x64\x00\xca\x00\x6e\x05\x84\x00\x67\x00\xeb\x00\x91\xfe\xf1\x04\x85\x00\x8a\x03\xec\x00\xff\xff\x86\x00\x8f\x00\x27\x01\xed\x00\x88\x00\x92\x00\xf2\x04\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x14\x01\x8a\x00\x98\x00\x99\x00\x7f\x04\x36\x00\x80\x04\x8b\x00\x0c\x02\x0d\x02\xf2\x02\x8e\x00\x2c\x01\x3d\x00\x3e\x00\xe7\x04\x3f\x00\x40\x00\xcb\x03\xe9\x00\x91\xfe\x2a\x02\x13\x01\x4d\x00\xcb\x00\x7a\x01\xe8\x04\xf0\x01\x11\x00\x4d\x00\x81\x04\x82\x04\x44\x00\x45\x00\x4e\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4e\x00\x70\x05\x9e\x00\x9f\x00\xb3\x01\xc9\x04\xf9\x03\x71\x05\x4b\x00\x4c\x00\x4d\x00\x1a\xfd\xa0\x00\x72\x00\x41\x00\x0f\x01\xca\x04\x73\x00\x74\x00\x10\x01\x4a\x01\x4e\x00\x73\x00\x11\x01\x36\x04\x62\x01\x72\x00\x42\x00\x13\x01\x63\x01\x73\x00\x74\x00\x16\x05\x4c\x01\x11\x00\xf0\x01\x0a\x01\x4d\x00\xd3\x01\x48\x00\x0b\x01\xce\x00\xa1\x00\x8c\x03\x0f\x00\xcf\x00\x12\x01\xf1\x02\x4e\x00\x3e\x01\x13\x01\x11\x00\xd4\x01\x7c\x00\x7d\x00\xca\x00\x11\x00\xa2\x00\x86\x00\x14\x01\x65\x01\x2d\x00\x88\x00\x4e\x00\xa5\x02\x83\x04\x7c\x00\x7d\x00\x2e\x00\xec\x00\x2f\x00\x8a\x00\x8f\x00\x24\xff\xa7\x02\x8d\x00\x92\x00\x40\x03\x22\x01\x94\x00\x95\x00\x96\x00\x97\x00\x11\x00\xa8\x02\xa9\x02\xaa\x02\x44\x00\x45\x00\xf4\x01\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\xea\x01\x29\x02\xe9\x00\x4d\x00\xf5\x01\xf6\x01\xf7\x01\xcb\x00\x4b\x00\x4c\x00\x4d\x00\x5d\x02\x5e\x02\x5f\x02\x4e\x00\x36\x00\x26\x04\xae\x02\x4d\x00\x72\x04\xf2\x02\x4e\x00\x2c\x01\x3d\x00\x3e\x00\x11\x00\x3f\x00\x40\x00\x54\x05\x4e\x00\x9e\x00\x9f\x00\x14\x03\xca\x00\x81\x01\x15\x03\x82\x01\x41\x00\x83\x01\x55\x05\xa0\x00\x72\x00\x57\x05\x41\x00\xff\xff\x73\x00\x74\x00\x64\x00\x0a\x01\x0f\x01\x42\x00\x67\x00\x0b\x01\x4e\x00\x70\x03\x71\x03\x42\x00\x60\x02\x61\x02\x0f\x00\x62\x02\x86\x00\x44\x02\x65\x01\x41\x00\x88\x00\x11\x00\xff\xff\x11\x00\xce\x00\xa1\x00\x3f\x03\x0f\x00\xcf\x00\x8a\x00\xe9\x00\x23\x03\x42\x00\x8d\x00\x11\x00\xcb\x00\x7c\x00\x7d\x00\x2e\x02\x7a\x00\xa2\x00\x7b\x00\xa5\x02\xa6\x02\x12\x02\xa4\x02\x0e\x00\xec\x00\x0f\x00\x10\x00\x8f\x00\x8e\x01\xa7\x02\x8f\x01\x92\x00\x11\x00\x1c\x03\x94\x00\x95\x00\x96\x00\x97\x00\x1a\x03\xa8\x02\xa9\x02\xaa\x02\x44\x00\x45\x00\x50\x03\x51\x03\x47\x00\x48\x00\x44\x00\x45\x00\x11\x03\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x2e\x02\x7a\x00\x4b\x00\x7b\x00\x4d\x00\x70\x03\x71\x03\xc0\x02\x4b\x00\x4c\x00\x4d\x00\xc6\x01\x01\x03\x44\x00\x45\x00\x4e\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4e\x00\xaf\x02\xac\x02\xad\x02\x9f\x00\xf5\x02\x66\x04\x72\x00\x4b\x00\x4c\x00\x4d\x00\x73\x00\x74\x00\xa0\x00\x72\x00\xa5\x02\xa6\x02\xca\x00\x73\x00\x74\x00\xec\x00\x4e\x00\x88\x01\x8f\x00\x89\x01\xa7\x02\xc9\x02\x92\x00\x65\x02\xe3\x02\x94\x00\x95\x00\x96\x00\x97\x00\x11\x00\xa8\x02\xa9\x02\xaa\x02\xed\x02\x01\x01\x02\x01\x8a\x04\xce\x00\xa1\x00\x03\x01\x0f\x00\xcf\x00\x7c\x00\x7d\x00\x05\xfe\xec\x02\x05\xfe\x11\x00\x05\xfe\x7c\x00\x7d\x00\xdf\x02\x71\x02\xa2\x00\xe9\x00\xe0\x02\x36\x00\x05\xfe\xe9\x02\xcb\x00\xa3\x04\x8b\x04\x91\x04\xa4\x04\xa5\x04\x3e\x00\xeb\x02\x3f\x00\x40\x00\xab\x02\xac\x02\xad\x02\x9f\x00\x55\x02\x62\x01\x72\x00\xea\x02\x38\x02\x79\x03\x73\x00\x74\x00\xa0\x00\x72\x00\xc5\x01\x7f\x00\xca\x00\x73\x00\x74\x00\xc6\x01\xa6\x04\xc4\x01\x9a\x01\x7a\x00\x4c\x01\x7b\x00\x44\x02\xee\x02\xc5\x01\x7f\x00\x47\x00\x48\x00\x11\x00\xc6\x01\xc2\x01\x7d\x00\x41\x00\x0c\x02\x0d\x02\xa6\xfe\x8a\x04\xce\x00\xa1\x00\xa6\xfe\x0f\x00\xcf\x00\x7c\x00\x7d\x00\x3e\x02\x42\x00\xe1\x02\x11\x00\x38\x02\x7c\x00\x7d\x00\xd4\x02\x81\x00\xa2\x00\xe9\x00\x64\x02\x0a\x01\x65\x02\xd3\x02\xcb\x00\x0b\x01\x8b\x04\x8c\x04\x11\x00\x83\x00\xc0\x02\xa5\x02\x8d\x04\x84\x00\xc6\x01\x78\x01\xec\x00\x79\x01\x85\x00\x8f\x00\x7a\x02\xa7\x02\x7b\x02\x92\x00\xe8\x01\xc7\x02\x94\x00\x95\x00\x96\x00\x97\x00\xc3\x02\xa8\x02\xa9\x02\xaa\x02\x28\x05\x29\x05\x74\x03\x49\x01\x65\x02\x28\x05\x4f\x05\x8b\x00\x8c\x00\x5c\x02\x11\x00\x8e\x00\x8f\x00\xdb\x02\xdc\x02\xdd\x02\x44\x00\x45\x00\xce\x02\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x0c\x02\x0d\x02\x72\x01\x41\x00\x0f\x00\x10\x00\x54\x02\x90\x02\x4b\x00\x4c\x00\x4d\x00\x11\x00\xcc\x02\xca\x00\x9e\x00\x9f\x00\x42\x00\x34\x01\x35\x01\x36\x01\x37\x01\x4e\x00\x41\x00\x05\xfd\xa0\x00\x72\x00\xa5\x02\x8d\x04\x53\x02\x73\x00\x74\x00\xec\x00\xca\x00\xc4\x02\x8f\x00\x42\x00\xa7\x02\xd0\x04\x92\x00\x65\x02\xc6\x02\x94\x00\x95\x00\x96\x00\x97\x00\x11\x00\xa8\x02\xa9\x02\xaa\x02\x6c\x01\xc2\x02\x0f\x00\x10\x00\xce\x00\xa1\x00\xb5\x02\x0f\x00\xcf\x00\x11\x00\x7f\x04\xcb\x00\x80\x04\xb1\x02\x11\x00\x49\x03\x7c\x00\x7d\x00\x47\x00\x48\x00\xa2\x00\x81\x00\x7b\x01\x72\x02\x77\x02\xe9\x00\x78\x02\x44\x00\x45\x00\x97\x02\xcb\x00\x47\x00\x48\x00\x83\x00\x70\x03\x71\x03\x21\x05\x84\x00\x9e\x00\x9f\x00\x04\x02\x02\x02\x85\x00\x4b\x00\xe2\x01\x4d\x00\x44\x00\x45\x00\xa0\x00\x72\x00\x47\x00\x48\x00\x96\x02\x73\x00\x74\x00\x67\x04\x4e\x00\x91\x02\x47\x00\x48\x00\x8f\x02\x49\x01\x4b\x00\x86\x02\x4d\x00\x8b\x00\x8c\x00\x01\x02\x02\x02\x8e\x00\x8f\x00\x83\x02\xfd\x03\xf6\x03\xf7\x03\x4e\x00\xb1\x01\xce\x00\xa1\x00\x7f\x02\x0f\x00\xcf\x00\x5d\x03\x5e\x03\x5f\x03\xc1\x01\x10\x00\x11\x00\x7e\x02\x7c\x00\x7d\x00\x7c\x02\x11\x00\xa2\x00\xc2\x01\x7d\x00\xcc\x00\xca\x00\x7a\x02\x8f\x00\x7b\x02\xcd\x00\x2e\x04\x92\x00\x2f\x04\x75\x02\x94\x00\x95\x00\x96\x00\x97\x00\xa5\x02\x83\x04\x98\x00\x99\x00\xbc\x02\xec\x00\x0f\x00\x10\x00\x8f\x00\x74\x02\xa7\x02\x8a\x04\x92\x00\x11\x00\x72\x02\x94\x00\x95\x00\x96\x00\x97\x00\x71\x02\xa8\x02\xa9\x02\xaa\x02\xc7\x02\x10\x00\x81\x00\x48\x01\xa7\xfe\x73\x02\xe9\x00\x11\x00\xa7\xfe\xc2\x01\x7d\x00\xcb\x00\x69\x02\x29\x05\x83\x00\x51\x03\x52\x03\x53\x03\x84\x00\x9e\x00\x9f\x00\xb3\x01\x25\x04\x85\x00\x26\x04\x57\x02\x7d\x01\x7e\x01\x45\x00\xa0\x00\x72\x00\x47\x00\x48\x00\x56\x02\x73\x00\x74\x00\x54\x02\xca\x00\x9e\x00\x9f\x00\x75\x01\xad\x01\x49\x01\x7f\x01\x53\x02\x4d\x00\x8b\x00\x8c\x00\xa0\x00\x72\x00\x8e\x00\x8f\x00\x51\x02\x73\x00\x74\x00\x78\x01\x4e\x00\x79\x01\xce\x00\xa1\x00\x44\x02\x0f\x00\xcf\x00\xb7\x02\x43\x02\x0f\x00\x10\x00\x40\x02\x11\x00\x3f\x01\x7c\x00\x7d\x00\x11\x00\xe3\x03\xa2\x00\xe4\x03\x3f\x02\xce\x00\xa1\x00\xe9\x00\x0f\x00\xcf\x00\x36\x02\xc4\x04\xcb\x00\xc5\x04\x98\x04\x11\x00\x99\x04\x7c\x00\x7d\x00\xa5\x02\x8d\x04\xa2\x00\xfd\x04\x76\x04\xec\x00\x77\x04\x62\x04\x8f\x00\x63\x04\xa7\x02\x30\x02\x92\x00\x9b\x02\x31\x02\x94\x00\x95\x00\x96\x00\x97\x00\x57\x00\xa8\x02\xa9\x02\xaa\x02\x75\x01\x76\x01\x06\x04\x9d\x02\xdf\x01\x73\x01\x6e\x01\x36\x00\x58\x00\x70\x01\x6e\x01\x40\x01\x41\x01\x25\x02\x3c\x00\x3d\x00\x3e\x00\x5c\x00\x3f\x00\x40\x00\xcf\x01\x7a\x00\x12\x02\x7b\x00\xc4\x01\x9a\x01\x7a\x00\x9e\x02\x7b\x00\x9a\x02\xf9\x02\xfa\x02\xfb\x02\xfc\x02\xfd\x02\x61\x01\x28\x03\xca\x00\x9e\x00\x9f\x00\x65\x00\x66\x00\x6d\x01\x6e\x01\x68\x00\x69\x00\x37\x01\x38\x01\xa0\x00\x72\x00\xa5\x02\xa6\x02\xff\x00\x73\x00\x74\x00\xec\x00\x41\x00\xf8\x04\x8f\x00\xf9\x04\xa7\x02\x62\x04\x92\x00\x63\x04\x04\x02\x94\x00\x95\x00\x96\x00\x97\x00\x42\x00\xa8\x02\xa9\x02\xaa\x02\x16\x04\x17\x04\x18\x04\xd8\x03\xce\x00\xa1\x00\xe9\x00\x0f\x00\xcf\x00\xd2\x03\x06\x03\xcb\x00\x07\x03\xd8\x01\x11\x00\xd9\x01\x7c\x00\x7d\x00\x1f\x01\x20\x01\xa2\x00\xfc\x04\x7a\x03\x7e\x01\x45\x00\x75\x03\x76\x03\x47\x00\x48\x00\x75\x01\x20\x04\x81\x00\x27\x02\xcf\x03\x11\x04\x12\x04\x13\x04\xca\x00\x9e\x00\x9f\x00\xf5\x03\xf6\x03\xf7\x03\x83\x00\xb1\x01\x98\x02\x4a\x00\x84\x00\xa0\x00\x72\x00\xc1\x04\xbd\x04\x85\x00\x73\x00\x74\x00\xc5\x03\x44\x00\x45\x00\xe8\x04\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x60\x01\x99\x04\x17\x04\x18\x04\xc6\x03\x41\x00\x61\x01\xe7\xfc\x4b\x00\x4c\x00\x4d\x00\x8b\x00\x8c\x00\xce\x00\xa1\x00\xe9\x00\x0f\x00\xcf\x00\x42\x00\x04\xfd\xcb\x00\x4e\x00\x42\x02\x11\x00\xee\xfc\x7c\x00\x7d\x00\xa5\x02\xa6\x02\xa2\x00\xef\xfc\x69\x02\xec\x00\xb1\x01\x03\xfd\x8f\x00\xe8\xfc\xa7\x02\xe9\xfc\x92\x00\xbc\x04\xbd\x04\x94\x00\x95\x00\x96\x00\x97\x00\xc4\x03\xa8\x02\xa9\x02\xaa\x02\xc9\x01\xc3\x03\xca\x01\x93\x04\x17\x04\x18\x04\xcb\x01\x36\x00\xc2\x03\xc4\x01\x9a\x01\x7a\x00\xe9\x04\x7b\x00\x2c\x01\x3d\x00\x3e\x00\xc1\x03\x3f\x00\x40\x00\xe5\x04\x17\x04\x18\x04\x7b\x05\x17\x04\x18\x04\x0a\x04\x0b\x04\x44\x00\x45\x00\xce\x01\x25\x05\x47\x00\x48\x00\x13\x01\x80\x05\x17\x04\x18\x04\x9e\x00\x9f\x00\x11\x00\xc0\x03\x7c\x00\x7d\x00\x4b\x00\x15\xfd\x4d\x00\xbd\x03\xa0\x00\x72\x00\xa5\x02\x09\x04\xbc\x03\x73\x00\x74\x00\xec\x00\x41\x00\x4e\x00\x8f\x00\xbb\x03\xa7\x02\x3c\x02\x92\x00\x88\x04\x5f\x03\x94\x00\x95\x00\x96\x00\x97\x00\x42\x00\xa8\x02\xa9\x02\xaa\x02\xd7\x04\x13\x04\x5b\x05\x5c\x05\xce\x00\xa1\x00\x61\x01\x0f\x00\xcf\x00\x39\x02\x30\x03\x1b\x01\x92\x03\x91\x03\x11\x00\x10\x01\x7c\x00\x7d\x00\x73\x00\x11\x01\xa2\x00\x36\x00\x85\x03\x87\x03\x86\x03\x84\x03\xf2\x02\x83\x03\x2c\x01\x3d\x00\x3e\x00\x82\x03\x3f\x00\x40\x00\x80\x03\x81\x03\x7f\x03\x7c\x03\x9e\x00\x9f\x00\x20\x05\x5d\x01\x12\x01\x62\x03\x79\x03\x78\x03\x13\x01\x19\xfd\xa0\x00\x72\x00\x5d\x03\x5b\x03\x11\x00\x73\x00\x74\x00\x14\x01\x44\x00\x45\x00\x5a\x03\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x58\x03\x8a\x00\x4e\x03\x62\x05\x22\x01\x34\x03\x41\x00\x2d\x03\x4b\x00\x4c\x00\x4d\x00\x2c\x03\x25\x02\xce\x00\xa1\x00\x2b\x03\x0f\x00\xcf\x00\x28\x03\x42\x00\x81\x00\x4e\x00\xff\x00\x11\x00\x5b\x04\x7c\x00\x7d\x00\x06\x04\xa0\x02\xa2\x00\x4d\x04\x21\x02\x83\x00\x4c\x04\x4a\x04\x49\x04\x84\x00\x44\x04\x3e\x04\x36\x00\x38\x04\x85\x00\x3c\x04\x3b\x04\xf2\x02\x3a\x04\x2c\x01\x3d\x00\x3e\x00\x41\x00\x3f\x00\x40\x00\x0f\xfd\x0e\xfd\x10\xfd\x36\x04\x29\x04\xd4\x02\x23\x04\x68\x03\xa1\x02\x34\x04\x42\x00\x1c\x04\x8b\x00\x8c\x00\x36\x00\x1a\x04\x41\x00\x1e\x04\x15\x04\xf2\x02\x3c\x02\x2c\x01\x3d\x00\x3e\x00\x11\x04\x3f\x00\x40\x00\x44\x00\x45\x00\x42\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x6a\x00\x41\x00\xfa\x03\x0f\x04\xf2\x03\x06\x04\x41\x02\xe8\x03\x4b\x00\x4c\x00\x4d\x00\xfc\x03\xf4\x03\xe9\x03\x42\x00\xe1\x03\xe0\x03\xdf\x03\xde\x03\xbc\x04\x71\x02\x4e\x00\x36\x00\xbb\x04\x68\x03\xba\x04\x40\x01\x41\x01\x41\x00\x3c\x00\x3d\x00\x3e\x00\xb2\x04\x3f\x00\x40\x00\x44\x00\x45\x00\xb3\x01\x8d\x03\x47\x00\x48\x00\x42\x00\x5f\x04\xaa\x04\xab\x04\xa8\x04\xa9\x04\x1a\x04\x97\x04\x1c\x04\x7f\x04\x4b\x00\x1a\x04\x4d\x00\x44\x00\x45\x00\x90\x01\x72\x00\x47\x00\x48\x00\x7a\x04\x73\x00\x74\x00\x75\x04\x4e\x00\x51\x05\x71\x04\x70\x04\x6c\x04\x6b\x04\x4b\x00\x41\x00\x4d\x00\x6d\x04\x44\x00\x45\x00\x06\x04\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x5f\x04\x4e\x00\x42\x00\x0b\x05\x91\x01\x0a\x05\x0f\x00\x10\x00\x4b\x00\x4c\x00\x4d\x00\x09\x05\x2b\x03\x11\x00\x00\x05\x7c\x00\x7d\x00\xfb\x04\xfa\x04\x44\x00\x45\x00\x4e\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\xf4\x04\x64\x04\xef\x04\x1a\x04\x3d\x01\xda\x04\xd9\x04\x36\x00\x4b\x00\x4c\x00\x4d\x00\x6a\x03\x6b\x03\x83\x00\x3c\x00\x3d\x00\x3e\x00\x84\x00\x3f\x00\x40\x00\x8c\xfe\x4e\x00\x85\x00\x7d\x03\x69\x01\x15\x04\x6a\x01\x0f\x01\xd3\x04\x3b\x05\x10\x01\x34\x05\x39\x05\x73\x00\x11\x01\x44\x00\x45\x00\x31\x05\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x2b\x05\x30\x05\x8b\x00\x65\x04\x2c\x05\x4c\x01\x8e\x00\x66\x04\x4b\x00\x4c\x00\x4d\x00\x2e\x05\x13\x05\x41\x00\x12\x01\x11\x05\x5a\x05\x10\x05\x13\x01\x0e\x05\x59\x05\x4e\x00\x5d\x03\x53\x05\x11\x00\x48\x05\x42\x00\x14\x01\x6f\x05\x28\x03\x6a\x05\x67\x05\x36\x00\x37\x00\xd5\x01\x39\x00\x3a\x00\x3b\x00\x28\x03\x3c\x00\x3d\x00\x3e\x00\x62\x05\x3f\x00\x40\x00\x7f\x05\x1c\x04\x1a\x04\xd6\x01\xd7\x01\x1a\x04\x36\x00\x37\x00\x45\x02\x39\x00\x3a\x00\x3b\x00\x7a\x05\x3c\x00\x3d\x00\x3e\x00\x85\x05\x3f\x00\x40\x00\x84\x05\x80\x05\x87\x05\xff\x00\x08\x02\xfd\x00\xc3\x01\x07\x02\xab\x01\x7b\x01\x8f\x01\xf9\x01\x8c\x01\x86\x01\x4a\x01\x32\x01\x27\x01\x41\x00\x0d\x01\x0c\x01\x08\x01\x1e\x03\x44\x00\x45\x00\x1d\x03\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x1c\x03\xbf\x02\x67\x01\x68\x01\x69\x01\x41\x00\x6a\x01\x4b\x00\x4c\x00\x4d\x00\x10\x01\x1a\x03\x11\x03\x73\x00\x11\x01\x0b\x03\xf9\x01\xfd\x02\x42\x00\xe1\x02\x4e\x00\xf7\x02\xc4\x02\xd5\x02\x36\x00\x37\x00\xdb\x01\x39\x00\x3a\x00\x3b\x00\x8a\x02\x3c\x00\x3d\x00\x3e\x00\x78\x02\x3f\x00\x40\x00\x12\x01\xb8\x02\x43\x00\x75\x02\x13\x01\x6f\x02\x0d\x02\x12\x02\x2e\x02\x7a\x00\x11\x00\x7b\x00\x0a\x02\x14\x01\xdc\x03\xc0\x02\xdb\x03\xda\x03\xd9\x03\xc6\x01\x23\x03\x43\x00\x44\x00\x45\x00\xd8\x03\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\xd3\x03\xbe\x03\x96\x03\x6d\x02\x60\x03\x92\x03\x41\x00\x5b\x03\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x8e\x03\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x8d\x03\x4e\x00\x4e\x03\x58\x03\x56\x03\x37\x03\x35\x03\x4b\x00\x4c\x00\x4d\x00\xd8\x01\x3f\x03\xd9\x01\x34\x03\x32\x03\x29\x03\x28\x03\x2d\x03\x2e\x02\x7a\x00\x4e\x00\x7b\x00\x26\x03\x5d\x04\xc5\x01\x7f\x00\x4a\x04\x3c\x04\x32\x04\xc6\x01\x2c\x04\x23\x04\x21\x04\x36\x00\x37\x00\xdb\x01\x39\x00\x3a\x00\x3b\x00\x43\x00\x3c\x00\x3d\x00\x3e\x00\x2f\x04\x3f\x00\x40\x00\x1a\x04\x04\x04\xfc\x03\xe1\x03\xf4\x03\xc5\x04\xc2\x04\xb4\x04\xb6\x04\x43\x01\x6d\x02\x94\x04\xa1\x04\x44\x00\x45\x00\x7d\x04\x46\x00\x47\x00\x48\x00\xdc\x01\x4a\x00\x89\x04\x44\x01\x6d\x04\x45\x01\x46\x01\x6e\x04\x69\x04\x68\x04\x4b\x00\x4c\x00\x4d\x00\x60\x04\x01\x05\x5f\x04\x77\x00\x41\x00\x78\x00\x79\x00\x7a\x00\xf6\x04\x7b\x00\x4e\x00\xf5\x04\x7e\x00\x7f\x00\xf4\x04\xf2\x04\xed\x04\x42\x00\xdd\x04\xdd\x01\xda\x04\xe6\x02\xef\x04\xce\x04\x36\x00\x37\x00\xcd\x04\xe7\x02\x3a\x00\x3b\x00\xcf\x04\x3c\x00\x3d\x00\x3e\x00\x3b\x05\x3f\x00\x40\x00\x39\x05\xdb\x04\x35\x05\x36\x05\x2e\x05\x26\x05\x1f\x05\x16\x05\x11\x05\x0e\x05\x50\x05\x5a\x05\x43\x05\x4d\x05\xda\x04\xe6\x02\x42\x05\x56\x05\x36\x00\x37\x00\x43\x00\xe7\x02\x3a\x00\x3b\x00\x68\x05\x3c\x00\x3d\x00\x3e\x00\x7c\x05\x3f\x00\x40\x00\x55\x05\x45\x05\x78\x05\x74\x05\x72\x05\x41\x00\x82\x05\x81\x05\x85\x05\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\xdc\x01\x4a\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x65\x05\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x01\x00\x00\x42\x00\x00\x00\x00\x00\xe5\x02\xe6\x02\x81\x00\x00\x00\x36\x00\x37\x00\x43\x00\xe7\x02\x3a\x00\x3b\x00\xc8\x01\x3c\x00\x3d\x00\x3e\x00\x83\x00\x3f\x00\x40\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x60\x01\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x61\x01\x4b\x00\x4c\x00\x4d\x00\x00\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x8e\x00\x8f\x00\x00\x00\x41\x00\x00\x00\x4e\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x42\x00\x7c\x03\x67\x01\x68\x01\x69\x01\x00\x00\x6a\x01\x4b\x00\x4c\x00\x4d\x00\x10\x01\x00\x00\x00\x00\x73\x00\x11\x01\x00\x00\x00\x00\x4a\x03\xe6\x02\x00\x00\x4e\x00\x36\x00\x37\x00\x00\x00\xe7\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x81\x00\x12\x01\x00\x00\x00\x00\x43\x00\x13\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x83\x00\x00\x00\x14\x01\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x60\x01\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x01\x4b\x00\x4c\x00\x4d\x00\x00\x00\x8b\x00\x8c\x00\x00\x00\x42\x00\x8e\x00\x8f\x00\x00\x00\xb5\x02\x00\x00\x4e\x00\x36\x00\x37\x00\x00\x00\xa2\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\xed\x02\x00\x00\x00\x00\xb5\x02\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xa2\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\xb6\x02\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\x41\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x4e\x00\x00\x00\xb5\x02\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xa2\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x2b\x04\x00\x00\x43\x00\x0c\x04\x00\x00\x0f\x04\x36\x00\x37\x00\x00\x00\xa2\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x0c\x04\x00\x00\x0d\x04\x36\x00\x37\x00\x00\x00\xa2\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x0c\x04\x00\x00\xd6\x04\x36\x00\x37\x00\x00\x00\xa2\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x43\x01\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\xd1\x02\x4e\x00\x45\x01\x46\x01\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x77\x00\x00\x00\x78\x00\x79\x00\x7a\x00\x42\x00\x7b\x00\x4e\x00\xa1\x02\x7e\x00\x7f\x00\x36\x00\x37\x00\x00\x00\xd6\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\xa1\x02\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xa2\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x43\x01\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x44\x01\x4e\x00\x45\x01\x46\x01\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x77\x00\x00\x00\x78\x00\x79\x00\x7a\x00\x42\x00\x7b\x00\x4e\x00\x3e\x03\x7e\x00\x7f\x00\x36\x00\x37\x00\x00\x00\xa2\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x07\x04\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xa2\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x78\x04\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xa2\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\xfb\x04\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xa2\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x4f\x05\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xa2\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x67\x05\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xa2\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x81\x00\x48\x01\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x42\x00\x84\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x85\x00\x36\x00\x37\x00\x4d\x02\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x43\x00\xe4\x02\x4f\x02\x00\x00\x49\x01\x00\x00\x00\x00\x00\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x8e\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x42\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x36\x00\x37\x00\x4d\x02\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x4e\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x4e\x02\x4f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x72\x04\x00\x00\x00\x00\x43\x00\x36\x00\x37\x00\x4d\x02\x39\x00\x3a\x00\x3b\x00\x83\x00\x3c\x00\x3d\x00\x3e\x00\x84\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x85\x00\xca\x03\x00\x00\x41\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x49\x01\x4b\x00\x4c\x00\x4d\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x8e\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x41\x00\x00\x00\x00\x00\x36\x00\x37\x00\x4d\x02\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\xc9\x03\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x65\x01\x66\x01\x67\x01\x68\x01\x69\x01\x00\x00\x6a\x01\x00\x00\x00\x00\x00\x00\x10\x01\x00\x00\x00\x00\x73\x00\x11\x01\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x41\x00\x43\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x12\x01\x00\x00\x00\x00\x42\x00\x13\x01\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x11\x00\x44\x00\x45\x00\x14\x01\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x24\x05\x4e\x00\x00\x00\x00\x00\x43\x00\x36\x00\x37\x00\xc7\x03\x39\x00\x3a\x00\x3b\x00\x83\x00\x3c\x00\x3d\x00\x3e\x00\x84\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x85\x00\x00\x00\xc8\x03\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x01\x4b\x00\x4c\x00\x4d\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x8e\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x41\x00\x00\x00\x00\x00\x36\x00\x37\x00\x4d\x02\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\xc6\x03\x00\x00\x00\x00\x36\x00\x37\x00\x4d\x02\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\xe9\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\x41\x00\x43\x00\x00\x00\x36\x00\x37\x00\x34\x04\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x44\x00\x45\x00\x49\x05\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x41\x00\x43\x00\x00\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x41\x00\x43\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x36\x00\x37\x00\xe0\x01\x39\x00\x3a\x00\x3b\x00\x42\x00\x3c\x00\x3d\x00\x3e\x00\x4e\x00\x3f\x00\x40\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x05\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x36\x00\x37\x00\x89\x01\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x36\x00\x37\x00\x00\x00\x1e\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x4e\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x41\x00\x43\x00\x00\x00\x36\x00\x37\x00\x4b\x03\x39\x00\x3a\x00\x3b\x00\x1f\x02\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x41\x00\x43\x00\x00\x00\x36\x00\x37\x00\x34\x04\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x41\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x1e\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x31\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x36\x00\x37\x00\x41\x00\x1e\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\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\x2a\x04\x00\x00\xc9\x01\x00\x00\xca\x01\x00\x00\x00\x00\x00\x00\xcb\x01\x36\x00\x37\x00\xcc\x01\x1e\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\xcd\x01\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\xce\x01\x00\x00\x29\x04\x00\x00\x13\x01\x42\x00\x00\x00\x00\x00\xcf\x01\x7a\x00\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\x4e\x00\x36\x00\x37\x00\x00\x00\x1e\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x15\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x41\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x36\x00\x37\x00\x00\x00\x1e\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x4e\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe6\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x1e\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x41\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\xe5\x03\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x36\x00\x37\x00\x17\x05\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x1e\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x4c\x05\x81\x00\x00\x00\x00\x00\x00\x00\x41\x00\x43\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x84\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x85\x00\x00\x00\x41\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x49\x01\x4b\x00\x4c\x00\x4d\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x8e\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x36\x00\x37\x00\x43\x00\xff\x01\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x41\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x4e\x00\x5b\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x28\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\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\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x23\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x22\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x20\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xd2\x03\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xcc\x03\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x13\x05\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\xe3\x04\xe4\x04\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x02\x00\x00\x2c\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe3\x02\x00\x00\x2c\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x03\x00\x00\x2c\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95\x04\x00\x00\x2c\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\x04\x00\x00\x2c\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x05\x00\x00\x2c\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x05\x00\x00\x2c\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x48\x05\x00\x00\x2c\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x41\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x31\x05\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x42\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x26\x02\x3e\x00\x00\x00\x3f\x00\x40\x00\x32\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\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\x00\x00\x4e\x00\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xfc\xf6\xfc\x00\x00\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\xf6\xfc\xf6\xfc\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xfc\xf6\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xea\xfd\xea\xfd\xea\xfd\xea\xfd\x00\x00\x00\x00\x00\x00\xea\xfd\xea\xfd\xea\xfd\xea\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\xfd\xea\xfd\x00\x00\x00\x00\xea\xfd\xea\xfd\xea\xfd\x00\x00\xea\xfd\xea\xfd\x00\x00\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\x00\x00\xea\xfd\xea\xfd\xea\xfd\x00\x00\x00\x00\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\xfd\xea\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\x00\x00\x00\x00\xea\xfd\xea\xfd\xea\xfd\xea\xfd\x00\x00\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\x00\x00\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\x00\x00\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xd8\xfd\xd8\xfd\x13\x00\xd8\xfd\x00\x00\x00\x00\x00\x00\xd8\xfd\xd8\xfd\x14\x00\xd8\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xfd\xd8\xfd\x00\x00\x00\x00\xd8\xfd\x15\x00\xd8\xfd\x00\x00\xd8\xfd\xd8\xfd\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\xd8\xfd\xd8\xfd\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xd8\xfd\x00\x00\x24\x00\xd8\xfd\xd8\xfd\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xfd\xd8\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\x00\x00\x00\x00\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\x00\x00\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\x00\x00\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\x00\x00\xd8\xfd\x81\x01\xd8\xfd\x82\x01\xd8\xfd\x83\x01\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\x63\x00\x64\x00\xd8\xfd\xd8\xfd\xd8\xfd\x67\x00\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\x8b\xfe\x50\x00\x13\x00\x8b\xfe\x00\x00\x00\x00\x00\x00\x8b\xfe\x8b\xfe\x14\x00\x8b\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8b\xfe\x8b\xfe\x00\x00\x00\x00\x8b\xfe\x15\x00\x8b\xfe\x00\x00\x8b\xfe\x8b\xfe\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x8b\xfe\x8b\xfe\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x8b\xfe\x00\x00\x24\x00\x8b\xfe\x8b\xfe\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8b\xfe\x8b\xfe\x57\x00\x8b\xfe\x8b\xfe\x8b\xfe\x00\x00\x00\x00\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x00\x00\x8b\xfe\x58\x00\x59\x00\x5a\x00\x8b\xfe\x5b\x00\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x5c\x00\x00\x00\x00\x00\xf9\x01\x8b\xfe\x5d\x00\x8b\xfe\x00\x00\x8b\xfe\x5e\x00\x8b\xfe\x5f\x00\x8b\xfe\x60\x00\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x8b\xfe\x67\x00\x68\x00\x69\x00\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x6b\x00\x6c\x00\x6d\x00\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x8b\xfe\x6e\x00\x8b\xfe\x8b\xfe\x6f\x00\x70\x00\x8b\xfe\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x00\x00\x00\x00\x00\x00\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xfd\x40\xfd\x00\x00\x00\x00\x40\xfd\x40\xfd\x40\xfd\x00\x00\x40\xfd\x40\xfd\x00\x00\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x00\x00\x40\xfd\x40\xfd\x40\xfd\x00\x00\x00\x00\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xfd\x40\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x00\x00\x00\x00\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x00\x00\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x00\x00\x00\x00\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x00\x00\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x00\x00\x00\x00\x00\x00\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x91\xfe\x91\xfe\x00\x00\x00\x00\x91\xfe\x91\xfe\x91\xfe\x00\x00\x91\xfe\x91\xfe\x00\x00\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x00\x00\x91\xfe\x91\xfe\x91\xfe\x00\x00\x00\x00\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\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\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x00\x00\x00\x00\x91\xfe\x91\xfe\xfb\x01\xfc\x01\x00\x00\x92\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x00\x00\x00\x00\x91\xfe\xfd\x01\x00\x00\x91\xfe\x00\x00\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x91\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x0e\xfe\x0e\xfe\x0e\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\xfe\x00\x00\x00\x00\x0e\xfe\x0e\xfe\x0e\xfe\x00\x00\x0e\xfe\x0e\xfe\x00\x00\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x00\x00\x0e\xfe\x0e\xfe\x0e\xfe\x00\x00\x00\x00\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\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\x0e\xfe\x0e\xfe\x81\x00\xbd\x01\x0e\xfe\x0e\xfe\x00\x00\x00\x00\x0e\xfe\x0e\xfe\x0e\xfe\x00\x00\x00\x00\x00\x00\x83\x00\x0e\xfe\x0e\xfe\x0e\xfe\x84\x00\xbe\x01\xbf\x01\xc0\x01\xc1\x01\x85\x00\x00\x00\x00\x00\x0e\xfe\x00\x00\x00\x00\x0e\xfe\x00\x00\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x49\x01\x0e\xfe\x0e\xfe\x0e\xfe\x8b\x00\x8c\x00\x0e\xfe\x0e\xfe\x8e\x00\x8f\x00\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x0e\xfe\x07\xfe\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xfe\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x07\xfe\x15\x00\x07\xfe\x00\x00\x07\xfe\x16\x00\x00\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\xa9\x00\x00\x00\x24\x00\x07\xfe\x07\xfe\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xfe\x07\xfe\x07\xfe\x07\xfe\x07\xfe\xad\x00\x00\x00\x00\x00\x07\xfe\x07\xfe\x07\xfe\x00\x00\x00\x00\x00\x00\x07\xfe\xaf\x00\xb0\x00\xb1\x00\x07\xfe\x07\xfe\x07\xfe\x07\xfe\x07\xfe\x07\xfe\x00\x00\x00\x00\xbb\x01\x00\x00\x00\x00\x07\xfe\x00\x00\x07\xfe\xb2\x00\x07\xfe\xb3\x00\x07\xfe\xb4\x00\x07\xfe\xb5\x00\x07\xfe\x07\xfe\x07\xfe\x07\xfe\xb6\x00\x2c\x00\x8a\x00\x07\xfe\x07\xfe\x2d\x00\x8d\x00\x07\xfe\x07\xfe\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x07\xfe\xc8\x00\x07\xfe\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\x07\xfe\x08\xfe\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\xfe\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x08\xfe\x15\x00\x08\xfe\x00\x00\x08\xfe\x16\x00\x00\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\xa9\x00\x00\x00\x24\x00\x08\xfe\x08\xfe\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\xfe\x08\xfe\x08\xfe\x08\xfe\x08\xfe\xad\x00\x00\x00\x00\x00\x08\xfe\x08\xfe\x08\xfe\x00\x00\x00\x00\x00\x00\x08\xfe\xaf\x00\xb0\x00\xb1\x00\x08\xfe\x08\xfe\x08\xfe\x08\xfe\x08\xfe\x08\xfe\x00\x00\x00\x00\xbb\x01\x00\x00\x00\x00\x08\xfe\x00\x00\x08\xfe\xb2\x00\x08\xfe\xb3\x00\x08\xfe\xb4\x00\x08\xfe\xb5\x00\x08\xfe\x08\xfe\x08\xfe\x08\xfe\xb6\x00\x2c\x00\x8a\x00\x08\xfe\x08\xfe\x2d\x00\x8d\x00\x08\xfe\x08\xfe\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x08\xfe\xc8\x00\x08\xfe\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\x08\xfe\x14\x02\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x02\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xae\x03\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\x14\x02\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x93\xfd\x00\x00\x93\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x02\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x03\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x58\xfe\x00\x00\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x00\x00\x7d\xfe\x00\x00\x00\x00\x00\x00\x7d\xfe\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x00\x13\x00\xa6\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\x7d\xfe\x14\x00\xa7\x00\x7d\xfe\x7d\xfe\xd1\x00\xd2\x00\xd3\x00\xf3\x00\xd4\x00\x00\x00\xf4\x00\x00\x00\x15\x00\x00\x00\xf5\x00\x00\x00\x16\x00\xf6\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\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\xf7\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\x00\x00\xf8\x00\xda\x00\xf9\x00\xfa\x00\x00\x00\x00\x00\xfb\x00\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xdd\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xfc\xf6\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xfc\x00\x00\x00\x00\x00\x00\xf6\xfc\x00\x00\x00\x00\x00\x00\xf6\xfc\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\xf6\xfc\xb0\x04\xb1\x04\x00\x00\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xfc\xf6\xfc\x00\x00\xf6\xfc\x00\x00\x00\x00\xf6\xfc\x00\x00\x00\x00\x00\x00\xf6\xfc\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\xf6\xfc\xf6\xfc\x00\x00\xf6\xfc\x00\x00\x00\x00\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\xf6\xfc\x00\x00\xf6\xfc\x00\x00\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\x00\x00\xf6\xfc\x00\x00\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xf6\xfc\xa5\x00\x13\x00\xa6\x00\x00\x00\x8f\x04\x90\x04\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd1\x00\xd2\x00\xd3\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x91\x04\x00\x00\x16\x00\x00\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\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\xf7\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\x00\x00\x00\x00\xda\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xdd\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x85\x04\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd1\x00\xd2\x00\xd3\x00\x00\x00\xd4\x00\x00\x00\x86\x04\x00\x00\x15\x00\x00\x00\x87\x04\x00\x00\x16\x00\x00\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\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\xf7\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\x00\x00\x00\x00\xda\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xdd\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x8f\x04\x90\x04\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd1\x00\xd2\x00\xd3\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x91\x04\x00\x00\x16\x00\x00\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\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\xf7\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\x00\x00\x00\x00\xda\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xdd\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x85\x04\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd1\x00\xd2\x00\xd3\x00\x00\x00\xd4\x00\x00\x00\x86\x04\x00\x00\x15\x00\x00\x00\x87\x04\x00\x00\x16\x00\x00\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\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\xf7\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\x00\x00\x00\x00\xda\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xdd\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x81\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\xaf\x00\xb0\x00\xb1\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x5f\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x60\x01\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x61\x01\x62\x01\xb6\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xde\xfd\xde\xfd\xde\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xfd\xde\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xfd\x00\x00\x00\x00\x00\x00\xde\xfd\x00\x00\x00\x00\x00\x00\xde\xfd\x00\x00\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\x00\x00\xde\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xfd\xde\xfd\xde\xfd\xde\xfd\x00\x00\x00\x00\xde\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xde\xfd\x00\x00\xde\xfd\xde\xfd\x00\x00\xde\xfd\x00\x00\x00\x00\x00\x00\xde\xfd\x00\x00\xde\xfd\x00\x00\xde\xfd\x00\x00\xde\xfd\x00\x00\x00\x00\x00\x00\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\x00\x00\xde\xfd\x00\x00\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xde\xfd\xdd\xfd\xdd\xfd\xdd\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\xfd\xdd\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\xfd\x00\x00\x00\x00\x00\x00\xdd\xfd\x00\x00\x00\x00\x00\x00\xdd\xfd\x00\x00\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\x00\x00\xdd\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\x00\x00\x00\x00\xdd\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xdd\xfd\x00\x00\xdd\xfd\xdd\xfd\x00\x00\xdd\xfd\x00\x00\x00\x00\x00\x00\xdd\xfd\x00\x00\xdd\xfd\x00\x00\xdd\xfd\x00\x00\xdd\xfd\x00\x00\x00\x00\x00\x00\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\x00\x00\xdd\xfd\x00\x00\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xdd\xfd\xea\xfd\xea\xfd\xea\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\xfd\xea\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\xfd\x00\x00\x00\x00\x00\x00\xea\xfd\x00\x00\x00\x00\x00\x00\xea\xfd\x00\x00\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\x00\x00\xea\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\xfd\xea\xfd\x8d\x03\xea\xfd\x00\x00\x00\x00\xea\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xea\xfd\x00\x00\xea\xfd\xea\xfd\x00\x00\xea\xfd\x00\x00\x00\x00\x00\x00\xea\xfd\x00\x00\xea\xfd\x00\x00\xea\xfd\x00\x00\xea\xfd\x00\x00\x00\x00\x00\x00\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\x00\x00\xea\xfd\x00\x00\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xea\xfd\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x81\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x9a\x01\xb5\x00\x00\x00\x00\x00\x61\x01\x62\x01\xb6\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x81\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\xb8\xfd\xb4\x00\xb8\xfd\xb5\x00\x00\x00\x00\x00\x38\x02\x62\x01\xb6\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd1\x00\xd2\x00\xd3\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\xd5\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\x00\x00\x00\x00\xda\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xdd\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x81\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x52\x02\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x38\x02\x62\x01\xb6\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd1\x00\xd2\x00\xd3\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\xf7\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\x00\x00\x00\x00\xda\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xdd\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x81\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x55\x02\xb5\x00\x00\x00\x00\x00\x38\x02\x62\x01\xb6\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd1\x00\xd2\x00\xd3\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\xf7\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\x00\x00\x00\x00\xda\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xdd\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x81\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x9f\x01\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x62\x01\xb6\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x81\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x3c\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x62\x01\xb6\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x81\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x62\x01\xb6\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\xb3\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x01\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x03\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xae\x03\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\xaa\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\xa4\x03\x00\x00\x00\x00\x16\x00\x00\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\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\xaa\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xae\x03\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\xa4\x03\x00\x00\x00\x00\x16\x00\x00\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\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xa7\x01\xa8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xd4\xfe\xd4\xfe\xd4\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\xfe\xd4\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\xfe\x00\x00\x00\x00\x00\x00\xd4\xfe\x00\x00\x00\x00\x00\x00\xd4\xfe\x00\x00\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\x00\x00\xd4\xfe\x00\x00\x00\x00\x00\x00\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\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\xd4\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\xfe\xd4\xfe\xd4\xfe\xd4\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\x09\x03\x00\x00\xd4\xfe\x00\x00\xd4\xfe\x00\x00\xd4\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xd4\xfe\xd4\xfe\xd4\xfe\x00\x00\x00\x00\xd4\xfe\xd4\xfe\x00\x00\x00\x00\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\x00\x00\xd4\xfe\x00\x00\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xd4\xfe\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x03\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x03\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xcb\xfe\xcb\xfe\xcb\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\xfe\xcb\xfe\x1b\x02\x1c\x02\x78\x05\x00\x00\x00\x00\x00\x00\xcb\xfe\x00\x00\x00\x00\x00\x00\xcb\xfe\x00\x00\x00\x00\x1d\x02\x39\x03\x00\x00\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\x00\x00\xcb\xfe\x00\x00\x00\x00\x00\x00\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\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\xcb\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\xfe\xcb\xfe\xcb\xfe\xcb\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\xcb\xfe\x00\x00\xcb\xfe\x00\x00\xcb\xfe\x00\x00\xcb\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xcb\xfe\xcb\xfe\xcb\xfe\x00\x00\x00\x00\xcb\xfe\xcb\xfe\x00\x00\x00\x00\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\x00\x00\xcb\xfe\x00\x00\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xcb\xfe\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x93\xfd\x00\x00\x93\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xcc\xfe\xcc\xfe\xcc\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcc\xfe\xcc\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcc\xfe\x00\x00\x00\x00\x00\x00\xcc\xfe\x00\x00\x00\x00\x00\x00\xff\x04\x00\x00\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\x00\x00\xcc\xfe\x00\x00\x00\x00\x00\x00\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\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\xcc\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcc\xfe\xcc\xfe\xcc\xfe\xcc\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\xcc\xfe\x00\x00\xcc\xfe\x00\x00\xcc\xfe\x00\x00\xcc\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xcc\xfe\xcc\xfe\xcc\xfe\x00\x00\x00\x00\xcc\xfe\xcc\xfe\x00\x00\x00\x00\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\x00\x00\xcc\xfe\x00\x00\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xcc\xfe\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xab\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x9a\x03\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x1b\x02\x1c\x02\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x1d\x02\x16\x00\x00\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\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\xcd\x04\x2a\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\x03\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\xa5\x00\x13\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa7\x00\x1b\x02\x1c\x02\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x1d\x02\x16\x00\x00\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\xa9\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\xb7\x00\xb8\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\x40\xfd\x40\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xfd\x00\x00\x1b\x02\x1c\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xfd\x00\x00\x00\x00\x1d\x02\x00\x00\x00\x00\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x00\x00\x00\x00\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x00\x00\x00\x00\x40\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xfd\x40\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xfd\x40\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xfd\x40\xfd\x00\x00\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x00\x00\x40\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x40\xfd\x00\x00\x00\x00\x40\xfd\x40\xfd\x40\xfd\x00\x00\x00\x00\x00\x00\x40\xfd\x00\x00\x40\xfd\x39\x02\x40\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x40\xfd\x00\x00\x40\xfd\x40\xfd\x40\xfd\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x40\xfd\x40\xfd\x40\xfd\x00\x00\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x40\xfd\x00\x00\x00\x00\x40\xfd\x40\xfd\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\xd2\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x7d\xfe\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\xa5\x00\x13\x00\x7d\xfe\x7d\xfe\x7d\xfe\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\x7d\xfe\x15\x00\x00\x00\x7d\xfe\x7d\xfe\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\xc9\x02\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6a\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\x6e\x00\xc9\x00\xca\x00\x6f\x00\x70\x00\x50\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x01\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\xe0\x01\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x01\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x00\x00\x6b\x00\x6c\x00\x6d\x00\x50\x00\x13\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\x6e\x00\x00\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\xdb\x01\x00\x00\x00\x00\x00\x00\x61\x01\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x00\x00\x6b\x00\x6c\x00\x6d\x00\x50\x00\x13\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\x6e\x00\x00\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x01\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\xe0\x01\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x01\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x00\x00\x6b\x00\x6c\x00\x6d\x00\x50\x00\x13\x00\x00\x00\x00\x00\x2f\x01\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\x00\x30\x01\x00\x00\x6f\x00\x70\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x31\x01\x32\x01\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x50\x00\x13\x00\x6b\x00\x6c\x00\x6d\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\x6e\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x47\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x48\x02\x59\x00\x5a\x00\x00\x00\x49\x02\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x02\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x60\x01\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x01\x61\x00\x62\x00\x63\x00\x64\x00\x4b\x02\x4c\x02\x00\x00\x67\x00\x68\x00\x4d\x02\x00\x00\x00\x00\x6a\x00\x00\x00\x6b\x00\x6c\x00\x6d\x00\x50\x00\x13\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\x6e\x00\x00\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\xe2\x01\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x00\x00\x6b\x00\x6c\x00\x6d\x00\x50\x00\x13\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\x6e\x00\xeb\x04\x00\x00\x6f\x00\x70\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\xf4\x02\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\xec\x04\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x50\x00\x13\x00\x6b\x00\x6c\x00\x6d\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\x6e\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\xdd\x04\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x00\x00\x6b\x00\x6c\x00\x6d\x00\x50\x00\x13\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\x6e\x00\x00\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x00\x00\x6b\x00\x6c\x00\x6d\x00\x50\x00\x13\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\x6e\x00\x00\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\xf4\x02\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x05\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x50\x00\x13\x00\x6b\x00\x6c\x00\x6d\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\x6e\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xf4\x02\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x05\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x50\x00\x13\x00\x6b\x00\x6c\x00\x6d\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\x6e\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x00\x00\x6b\x00\x6c\x00\x6d\x00\x50\x00\x13\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\x6e\x00\x00\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x4c\x05\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x00\x00\x6b\x00\x6c\x00\x6d\x00\x50\x00\x13\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\x6e\x00\x00\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x00\x00\x6b\x00\x6c\x00\x6d\x00\x50\x00\x13\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\x6e\x00\x00\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\xf4\x02\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x50\x00\x13\x00\x6b\x00\x6c\x00\x6d\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\x6e\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x6d\x03\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x50\x00\x13\x00\x6b\x00\x6c\x00\x6d\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\x6e\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xf4\x02\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x50\x00\x13\x00\x6b\x00\x6c\x00\x6d\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\x6e\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x6d\x03\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x50\x00\x13\x00\x6b\x00\x6c\x00\x6d\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\x6e\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xf4\x02\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x50\x00\x13\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x6d\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\x6e\x00\x00\x00\x00\x00\x6f\x00\x70\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x50\x00\x13\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x6d\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\x6e\x00\x00\x00\x00\x00\x6f\x00\x70\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\x01\x63\x00\x64\x00\x00\x00\x00\x00\x00\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x6d\x00\x00\x00\x00\x00\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\x6f\x00\x70\x00\xe8\x01\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x2c\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\x48\x03\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x45\x03\x46\x03\x47\x03\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\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x00\xdd\x00\x91\x00\x00\x00\x92\x00\xe8\x01\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\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\x48\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa7\x03\xa8\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe8\x01\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x48\x03\x00\x00\x8f\x00\xdd\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\xa9\x03\xa7\x03\xa8\x03\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\xaa\x03\x00\x00\xab\x03\x00\x00\xac\x03\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x8f\x00\xdd\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\xa7\x03\xa8\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\xae\x03\x00\x00\xab\x03\x00\x00\xac\x03\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x8f\x00\xdd\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\xa7\x03\xa8\x03\x0e\xfe\x81\x00\xbd\x01\x00\x00\x00\x00\xa3\x00\x00\x00\x0e\xfe\xfa\x03\x0e\xfe\xab\x03\x00\x00\xac\x03\x83\x00\x00\x00\x9e\x00\x9f\x00\x84\x00\xbe\x01\xbf\x01\xc0\x01\xc1\x01\x85\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x0e\xfe\x8f\x00\x73\x00\x74\x00\x0e\xfe\x00\x00\x0e\xfe\x00\x00\x0e\xfe\xa3\x01\x96\x00\x97\x00\x0e\xfe\x49\x01\x98\x00\x99\x00\x00\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x8e\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\xa4\x01\xb0\x03\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\xb2\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x01\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\xb1\x03\xa4\x01\xb0\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x03\x00\x00\xb3\x03\x00\x00\xb4\x03\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x01\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\xa4\x01\xb0\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x00\xb6\x03\x00\x00\xb3\x03\x00\x00\xb4\x03\x9e\x00\x9f\x00\xa3\x01\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x01\xb0\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\xf2\x03\x00\x00\xb3\x03\x00\x00\xb4\x03\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\x14\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x15\x00\x7c\x00\x7d\x00\x00\x00\x16\x00\xa2\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\xb5\x04\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x13\x00\x87\x00\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x89\x00\x00\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\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\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd1\x01\x00\x00\xd2\x01\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\xd3\x01\x00\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x14\x00\x8d\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x04\x00\x00\x00\x00\x15\x00\x00\x00\x57\x04\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x58\x04\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x04\x00\x00\x00\x00\x15\x00\x00\x00\x57\x04\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x58\x04\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x04\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x04\x14\x00\x00\x00\x2c\x00\x64\x00\x00\x00\x00\x00\x2d\x00\x67\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x59\x04\x19\xfe\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x19\xfe\x00\x00\x2c\x00\x64\x00\x00\x00\x00\x00\x2d\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\xfe\x00\x00\x00\x00\x00\x00\x19\xfe\x00\x00\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x00\x00\x00\x00\x19\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x93\x01\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\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\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x70\x01\x00\x00\x19\xfe\x14\x00\x19\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\xfe\x19\xfe\x00\x00\x15\x00\x19\xfe\x19\xfe\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x13\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\x57\x04\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x86\x00\x00\x00\x93\x01\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x14\x00\x00\x00\x08\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x59\x04\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x2c\x00\x64\x00\x00\x00\x00\x00\x2d\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\xd1\x01\x00\x00\xd2\x01\x14\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x15\x00\x00\x00\x8d\x00\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x15\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x19\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x72\x01\x00\x00\x00\x00\x2c\x00\x8a\x00\x19\xfe\x00\x00\x00\x00\x8d\x00\x19\xfe\x00\x00\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x00\x00\x00\x00\x19\xfe\x00\x00\x00\x00\x00\x00\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x63\x00\x64\x00\x19\xfe\x00\x00\x00\x00\x67\x00\x19\xfe\x00\x00\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x00\x00\x00\x00\x19\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x19\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x01\x00\x00\x19\xfe\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x19\xfe\x00\x00\x00\x00\x00\x00\x19\xfe\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x70\x01\x00\x00\x19\xfe\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x13\x00\x00\x00\x19\xfe\x00\x00\x00\x00\x00\x00\x19\xfe\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\x64\x02\x00\x00\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x13\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x2d\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x8f\x00\x00\x00\x00\x00\xd7\x02\xd8\x02\x00\x00\xd9\x02\x94\x00\x95\x00\x96\x00\x97\x00\x83\x00\x00\x00\x98\x00\x99\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x6c\x01\x60\x01\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x01\x00\x00\x00\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x8f\x00\x73\x00\x74\x00\x68\x03\xd8\x02\x00\x00\xd9\x02\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xda\x02\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x4c\x01\x4d\x01\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x4e\x01\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4f\x01\x50\x01\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xda\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x01\x53\x01\x00\x00\x54\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x55\x01\x56\x01\x9a\x01\x58\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x59\x01\x7f\x00\xa2\x00\x00\x00\x00\x00\x5a\x01\x00\x00\x5b\x01\x00\x00\x13\x00\xa3\x00\x8f\x00\x4c\x01\x4d\x01\x00\x00\x92\x00\x14\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x4e\x01\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x15\x00\x00\x00\x4f\x01\x50\x01\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x01\x53\x01\x00\x00\x54\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x55\x01\x56\x01\x57\x01\x58\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x59\x01\x7f\x00\xa2\x00\x00\x00\x00\x00\x5a\x01\x2c\x00\x5b\x01\x00\x00\x13\x00\xa3\x00\x8f\x00\x4c\x01\x4d\x01\x00\x00\x92\x00\x14\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x15\x00\x00\x00\x94\x01\x95\x01\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x01\x53\x01\x00\x00\x54\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x55\x01\x96\x01\x00\x00\x97\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa2\x00\x00\x00\x00\x00\x98\x01\x63\x00\x5b\x01\x00\x00\x00\x00\xa3\x00\x8f\x00\x4c\x01\x4d\x01\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x01\x00\x00\x00\x00\x00\x00\x9c\x01\x9d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x01\x53\x01\x00\x00\x54\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x55\x01\x96\x01\x00\x00\x97\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa2\x00\x00\x00\x00\x00\x8f\x00\x4c\x01\x4d\x01\x00\x00\x92\x00\xa3\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\x02\x00\x00\x00\x00\x84\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x01\x53\x01\x00\x00\x54\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x55\x01\x96\x01\x00\x00\x97\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa2\x00\x00\x00\x00\x00\x8f\x00\x4c\x01\x4d\x01\x00\x00\x92\x00\xa3\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\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\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x01\x53\x01\x00\x00\x54\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x55\x01\x96\x01\x00\x00\x97\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa2\x00\x00\x00\x00\x00\x8f\x00\x4c\x01\x4d\x01\x00\x00\x92\x00\xa3\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xca\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x01\x53\x01\x00\x00\x54\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x55\x01\x96\x01\x00\x00\x97\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa2\x00\x00\x00\x00\x00\x8f\x00\x4c\x01\x4d\x01\x00\x00\x92\x00\xa3\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x01\x53\x01\x00\x00\x54\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x55\x01\x96\x01\x00\x00\x97\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa2\x00\x00\x00\x00\x00\x8f\x00\x9c\x03\x4d\x01\x00\x00\x92\x00\xa3\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\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\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x01\x53\x01\x00\x00\x54\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x55\x01\x96\x01\x00\x00\x97\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa2\x00\x00\x00\x00\x00\x8f\x00\x4c\x01\x4d\x01\x00\x00\x92\x00\xa3\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\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\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x01\x53\x01\x00\x00\x54\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x55\x01\x96\x01\x00\x00\x97\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa2\x00\x00\x00\x00\x00\x8f\x00\x4c\x01\x4d\x01\x00\x00\x92\x00\xa3\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xeb\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\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x01\x53\x01\x00\x00\x54\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x55\x01\x96\x01\x00\x00\x97\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa2\x00\x00\x00\x00\x00\x8f\x00\x4c\x01\x4d\x01\x00\x00\x92\x00\xa3\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd1\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\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x01\x53\x01\x00\x00\x54\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x55\x01\x96\x01\x00\x00\x97\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa2\x00\x00\x00\x00\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\xa3\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\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\x9a\x00\x00\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\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\xae\x04\xa0\x03\xa1\x03\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\xa2\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\xfb\x00\xfc\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x00\xa3\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x8d\x02\x00\x00\xa3\x00\x8c\x02\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x8b\x02\x00\x00\xa3\x00\x8c\x02\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x6a\x02\x6b\x02\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x6c\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x63\x03\x6b\x02\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x6c\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x00\xae\x01\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\xaf\x01\xb0\x01\xb1\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x03\x04\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\xac\x04\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\xad\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\xef\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xdd\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\xde\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xdd\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x3a\x03\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xdd\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x39\x03\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xdf\x00\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xbb\x01\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xb4\x01\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x8b\x01\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x85\x01\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x66\x02\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x5a\x02\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x59\x02\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x58\x02\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x57\x02\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xb9\x03\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xb8\x03\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xa6\x03\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xa4\x03\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x64\x03\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x08\x04\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xfe\x03\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xf0\x03\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xee\x03\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xb3\x04\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xab\x04\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x92\x04\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x00\x05\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xd5\x04\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xd4\x04\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xd3\x04\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x34\x05\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x44\x05\x91\x00\x00\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x17\x00\x18\x00\x19\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\xa1\x00\x13\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x16\x01\x00\x00\x00\x00\x15\x00\x00\x00\x17\x01\xa3\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x02\x1c\x02\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x18\x01\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x14\x00\x00\x00\x86\x00\x00\x00\x6c\x01\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x2c\x00\x8a\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\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\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x27\x01\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x14\x00\x00\x00\x86\x00\x00\x00\x18\x01\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x2c\x00\x8a\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\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\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x6c\x01\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x14\x00\x00\x00\x86\x00\x00\x00\x18\x01\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x2c\x00\x8a\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\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\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\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\x2c\x00\x8a\x00\x00\x00\x00\x00\x02\xff\x00\x00\x15\x00\x00\x00\x00\x00\x02\xff\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x04\x03\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\xb1\x02\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xe8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\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\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\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x42\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xe8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x42\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x13\x00\x00\x00\xf2\x01\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xf3\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x63\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\xf3\x01\x00\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x8a\x01\x00\x00\x92\x00\x00\x00\x63\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x8f\x00\x00\x00\xcc\x02\x00\x00\x92\x00\x00\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x8f\x00\xa2\x00\x42\x04\x00\x00\x92\x00\x00\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x8f\x00\x00\x00\xec\x04\x00\x00\x92\x00\x00\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\xa3\x01\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x01\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x01\xa5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\xa4\x01\x7c\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x8f\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa2\x01\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x97\x03\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x98\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\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\xb9\x01\x96\x00\x97\x00\x73\x00\x74\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\xac\x01\x96\x00\x97\x00\x73\x00\x74\x00\x98\x00\x99\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x01\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\xa1\x01\x96\x00\x97\x00\x73\x00\x74\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\xa0\x01\x96\x00\x97\x00\x73\x00\x74\x00\x98\x00\x99\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x01\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x93\x01\x96\x00\x97\x00\x73\x00\x74\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x18\x03\x96\x00\x97\x00\x73\x00\x74\x00\x98\x00\x99\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x03\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\xb9\x01\x96\x00\x97\x00\x73\x00\x74\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x67\x02\x96\x00\x97\x00\x73\x00\x74\x00\x98\x00\x99\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2e\x03\x96\x00\x97\x00\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\xc8\x01\x73\x00\x74\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa1\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x8f\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x83\x01\x00\x00\x00\x00\x98\x00\x99\x00\x00\x00\x00\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x01\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\xa0\x00\x72\x00\x00\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x01\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#--happyReduceArr = Happy_Data_Array.array (13, 832) [- (13 , happyReduce_13),- (14 , happyReduce_14),- (15 , happyReduce_15),- (16 , happyReduce_16),- (17 , happyReduce_17),- (18 , happyReduce_18),- (19 , happyReduce_19),- (20 , happyReduce_20),- (21 , happyReduce_21),- (22 , happyReduce_22),- (23 , happyReduce_23),- (24 , happyReduce_24),- (25 , happyReduce_25),- (26 , happyReduce_26),- (27 , happyReduce_27),- (28 , happyReduce_28),- (29 , happyReduce_29),- (30 , happyReduce_30),- (31 , happyReduce_31),- (32 , happyReduce_32),- (33 , happyReduce_33),- (34 , happyReduce_34),- (35 , happyReduce_35),- (36 , happyReduce_36),- (37 , happyReduce_37),- (38 , happyReduce_38),- (39 , happyReduce_39),- (40 , happyReduce_40),- (41 , happyReduce_41),- (42 , happyReduce_42),- (43 , happyReduce_43),- (44 , happyReduce_44),- (45 , happyReduce_45),- (46 , happyReduce_46),- (47 , happyReduce_47),- (48 , happyReduce_48),- (49 , happyReduce_49),- (50 , happyReduce_50),- (51 , happyReduce_51),- (52 , happyReduce_52),- (53 , happyReduce_53),- (54 , happyReduce_54),- (55 , happyReduce_55),- (56 , happyReduce_56),- (57 , happyReduce_57),- (58 , happyReduce_58),- (59 , happyReduce_59),- (60 , happyReduce_60),- (61 , happyReduce_61),- (62 , happyReduce_62),- (63 , happyReduce_63),- (64 , happyReduce_64),- (65 , happyReduce_65),- (66 , happyReduce_66),- (67 , happyReduce_67),- (68 , happyReduce_68),- (69 , happyReduce_69),- (70 , happyReduce_70),- (71 , happyReduce_71),- (72 , happyReduce_72),- (73 , happyReduce_73),- (74 , happyReduce_74),- (75 , happyReduce_75),- (76 , happyReduce_76),- (77 , happyReduce_77),- (78 , happyReduce_78),- (79 , happyReduce_79),- (80 , happyReduce_80),- (81 , happyReduce_81),- (82 , happyReduce_82),- (83 , happyReduce_83),- (84 , happyReduce_84),- (85 , happyReduce_85),- (86 , happyReduce_86),- (87 , happyReduce_87),- (88 , happyReduce_88),- (89 , happyReduce_89),- (90 , happyReduce_90),- (91 , happyReduce_91),- (92 , happyReduce_92),- (93 , happyReduce_93),- (94 , happyReduce_94),- (95 , happyReduce_95),- (96 , happyReduce_96),- (97 , happyReduce_97),- (98 , happyReduce_98),- (99 , happyReduce_99),- (100 , happyReduce_100),- (101 , happyReduce_101),- (102 , happyReduce_102),- (103 , happyReduce_103),- (104 , happyReduce_104),- (105 , happyReduce_105),- (106 , happyReduce_106),- (107 , happyReduce_107),- (108 , happyReduce_108),- (109 , happyReduce_109),- (110 , happyReduce_110),- (111 , happyReduce_111),- (112 , happyReduce_112),- (113 , happyReduce_113),- (114 , happyReduce_114),- (115 , happyReduce_115),- (116 , happyReduce_116),- (117 , happyReduce_117),- (118 , happyReduce_118),- (119 , happyReduce_119),- (120 , happyReduce_120),- (121 , happyReduce_121),- (122 , happyReduce_122),- (123 , happyReduce_123),- (124 , happyReduce_124),- (125 , happyReduce_125),- (126 , happyReduce_126),- (127 , happyReduce_127),- (128 , happyReduce_128),- (129 , happyReduce_129),- (130 , happyReduce_130),- (131 , happyReduce_131),- (132 , happyReduce_132),- (133 , happyReduce_133),- (134 , happyReduce_134),- (135 , happyReduce_135),- (136 , happyReduce_136),- (137 , happyReduce_137),- (138 , happyReduce_138),- (139 , happyReduce_139),- (140 , happyReduce_140),- (141 , happyReduce_141),- (142 , happyReduce_142),- (143 , happyReduce_143),- (144 , happyReduce_144),- (145 , happyReduce_145),- (146 , happyReduce_146),- (147 , happyReduce_147),- (148 , happyReduce_148),- (149 , happyReduce_149),- (150 , happyReduce_150),- (151 , happyReduce_151),- (152 , happyReduce_152),- (153 , happyReduce_153),- (154 , happyReduce_154),- (155 , happyReduce_155),- (156 , happyReduce_156),- (157 , happyReduce_157),- (158 , happyReduce_158),- (159 , happyReduce_159),- (160 , happyReduce_160),- (161 , happyReduce_161),- (162 , happyReduce_162),- (163 , happyReduce_163),- (164 , happyReduce_164),- (165 , happyReduce_165),- (166 , happyReduce_166),- (167 , happyReduce_167),- (168 , happyReduce_168),- (169 , happyReduce_169),- (170 , happyReduce_170),- (171 , happyReduce_171),- (172 , happyReduce_172),- (173 , happyReduce_173),- (174 , happyReduce_174),- (175 , happyReduce_175),- (176 , happyReduce_176),- (177 , happyReduce_177),- (178 , happyReduce_178),- (179 , happyReduce_179),- (180 , happyReduce_180),- (181 , happyReduce_181),- (182 , happyReduce_182),- (183 , happyReduce_183),- (184 , happyReduce_184),- (185 , happyReduce_185),- (186 , happyReduce_186),- (187 , happyReduce_187),- (188 , happyReduce_188),- (189 , happyReduce_189),- (190 , happyReduce_190),- (191 , happyReduce_191),- (192 , happyReduce_192),- (193 , happyReduce_193),- (194 , happyReduce_194),- (195 , happyReduce_195),- (196 , happyReduce_196),- (197 , happyReduce_197),- (198 , happyReduce_198),- (199 , happyReduce_199),- (200 , happyReduce_200),- (201 , happyReduce_201),- (202 , happyReduce_202),- (203 , happyReduce_203),- (204 , happyReduce_204),- (205 , happyReduce_205),- (206 , happyReduce_206),- (207 , happyReduce_207),- (208 , happyReduce_208),- (209 , happyReduce_209),- (210 , happyReduce_210),- (211 , happyReduce_211),- (212 , happyReduce_212),- (213 , happyReduce_213),- (214 , happyReduce_214),- (215 , happyReduce_215),- (216 , happyReduce_216),- (217 , happyReduce_217),- (218 , happyReduce_218),- (219 , happyReduce_219),- (220 , happyReduce_220),- (221 , happyReduce_221),- (222 , happyReduce_222),- (223 , happyReduce_223),- (224 , happyReduce_224),- (225 , happyReduce_225),- (226 , happyReduce_226),- (227 , happyReduce_227),- (228 , happyReduce_228),- (229 , happyReduce_229),- (230 , happyReduce_230),- (231 , happyReduce_231),- (232 , happyReduce_232),- (233 , happyReduce_233),- (234 , happyReduce_234),- (235 , happyReduce_235),- (236 , happyReduce_236),- (237 , happyReduce_237),- (238 , happyReduce_238),- (239 , happyReduce_239),- (240 , happyReduce_240),- (241 , happyReduce_241),- (242 , happyReduce_242),- (243 , happyReduce_243),- (244 , happyReduce_244),- (245 , happyReduce_245),- (246 , happyReduce_246),- (247 , happyReduce_247),- (248 , happyReduce_248),- (249 , happyReduce_249),- (250 , happyReduce_250),- (251 , happyReduce_251),- (252 , happyReduce_252),- (253 , happyReduce_253),- (254 , happyReduce_254),- (255 , happyReduce_255),- (256 , happyReduce_256),- (257 , happyReduce_257),- (258 , happyReduce_258),- (259 , happyReduce_259),- (260 , happyReduce_260),- (261 , happyReduce_261),- (262 , happyReduce_262),- (263 , happyReduce_263),- (264 , happyReduce_264),- (265 , happyReduce_265),- (266 , happyReduce_266),- (267 , happyReduce_267),- (268 , happyReduce_268),- (269 , happyReduce_269),- (270 , happyReduce_270),- (271 , happyReduce_271),- (272 , happyReduce_272),- (273 , happyReduce_273),- (274 , happyReduce_274),- (275 , happyReduce_275),- (276 , happyReduce_276),- (277 , happyReduce_277),- (278 , happyReduce_278),- (279 , happyReduce_279),- (280 , happyReduce_280),- (281 , happyReduce_281),- (282 , happyReduce_282),- (283 , happyReduce_283),- (284 , happyReduce_284),- (285 , happyReduce_285),- (286 , happyReduce_286),- (287 , happyReduce_287),- (288 , happyReduce_288),- (289 , happyReduce_289),- (290 , happyReduce_290),- (291 , happyReduce_291),- (292 , happyReduce_292),- (293 , happyReduce_293),- (294 , happyReduce_294),- (295 , happyReduce_295),- (296 , happyReduce_296),- (297 , happyReduce_297),- (298 , happyReduce_298),- (299 , happyReduce_299),- (300 , happyReduce_300),- (301 , happyReduce_301),- (302 , happyReduce_302),- (303 , happyReduce_303),- (304 , happyReduce_304),- (305 , happyReduce_305),- (306 , happyReduce_306),- (307 , happyReduce_307),- (308 , happyReduce_308),- (309 , happyReduce_309),- (310 , happyReduce_310),- (311 , happyReduce_311),- (312 , happyReduce_312),- (313 , happyReduce_313),- (314 , happyReduce_314),- (315 , happyReduce_315),- (316 , happyReduce_316),- (317 , happyReduce_317),- (318 , happyReduce_318),- (319 , happyReduce_319),- (320 , happyReduce_320),- (321 , happyReduce_321),- (322 , happyReduce_322),- (323 , happyReduce_323),- (324 , happyReduce_324),- (325 , happyReduce_325),- (326 , happyReduce_326),- (327 , happyReduce_327),- (328 , happyReduce_328),- (329 , happyReduce_329),- (330 , happyReduce_330),- (331 , happyReduce_331),- (332 , happyReduce_332),- (333 , happyReduce_333),- (334 , happyReduce_334),- (335 , happyReduce_335),- (336 , happyReduce_336),- (337 , happyReduce_337),- (338 , happyReduce_338),- (339 , happyReduce_339),- (340 , happyReduce_340),- (341 , happyReduce_341),- (342 , happyReduce_342),- (343 , happyReduce_343),- (344 , happyReduce_344),- (345 , happyReduce_345),- (346 , happyReduce_346),- (347 , happyReduce_347),- (348 , happyReduce_348),- (349 , happyReduce_349),- (350 , happyReduce_350),- (351 , happyReduce_351),- (352 , happyReduce_352),- (353 , happyReduce_353),- (354 , happyReduce_354),- (355 , happyReduce_355),- (356 , happyReduce_356),- (357 , happyReduce_357),- (358 , happyReduce_358),- (359 , happyReduce_359),- (360 , happyReduce_360),- (361 , happyReduce_361),- (362 , happyReduce_362),- (363 , happyReduce_363),- (364 , happyReduce_364),- (365 , happyReduce_365),- (366 , happyReduce_366),- (367 , happyReduce_367),- (368 , happyReduce_368),- (369 , happyReduce_369),- (370 , happyReduce_370),- (371 , happyReduce_371),- (372 , happyReduce_372),- (373 , happyReduce_373),- (374 , happyReduce_374),- (375 , happyReduce_375),- (376 , happyReduce_376),- (377 , happyReduce_377),- (378 , happyReduce_378),- (379 , happyReduce_379),- (380 , happyReduce_380),- (381 , happyReduce_381),- (382 , happyReduce_382),- (383 , happyReduce_383),- (384 , happyReduce_384),- (385 , happyReduce_385),- (386 , happyReduce_386),- (387 , happyReduce_387),- (388 , happyReduce_388),- (389 , happyReduce_389),- (390 , happyReduce_390),- (391 , happyReduce_391),- (392 , happyReduce_392),- (393 , happyReduce_393),- (394 , happyReduce_394),- (395 , happyReduce_395),- (396 , happyReduce_396),- (397 , happyReduce_397),- (398 , happyReduce_398),- (399 , happyReduce_399),- (400 , happyReduce_400),- (401 , happyReduce_401),- (402 , happyReduce_402),- (403 , happyReduce_403),- (404 , happyReduce_404),- (405 , happyReduce_405),- (406 , happyReduce_406),- (407 , happyReduce_407),- (408 , happyReduce_408),- (409 , happyReduce_409),- (410 , happyReduce_410),- (411 , happyReduce_411),- (412 , happyReduce_412),- (413 , happyReduce_413),- (414 , happyReduce_414),- (415 , happyReduce_415),- (416 , happyReduce_416),- (417 , happyReduce_417),- (418 , happyReduce_418),- (419 , happyReduce_419),- (420 , happyReduce_420),- (421 , happyReduce_421),- (422 , happyReduce_422),- (423 , happyReduce_423),- (424 , happyReduce_424),- (425 , happyReduce_425),- (426 , happyReduce_426),- (427 , happyReduce_427),- (428 , happyReduce_428),- (429 , happyReduce_429),- (430 , happyReduce_430),- (431 , happyReduce_431),- (432 , happyReduce_432),- (433 , happyReduce_433),- (434 , happyReduce_434),- (435 , happyReduce_435),- (436 , happyReduce_436),- (437 , happyReduce_437),- (438 , happyReduce_438),- (439 , happyReduce_439),- (440 , happyReduce_440),- (441 , happyReduce_441),- (442 , happyReduce_442),- (443 , happyReduce_443),- (444 , happyReduce_444),- (445 , happyReduce_445),- (446 , happyReduce_446),- (447 , happyReduce_447),- (448 , happyReduce_448),- (449 , happyReduce_449),- (450 , happyReduce_450),- (451 , happyReduce_451),- (452 , happyReduce_452),- (453 , happyReduce_453),- (454 , happyReduce_454),- (455 , happyReduce_455),- (456 , happyReduce_456),- (457 , happyReduce_457),- (458 , happyReduce_458),- (459 , happyReduce_459),- (460 , happyReduce_460),- (461 , happyReduce_461),- (462 , happyReduce_462),- (463 , happyReduce_463),- (464 , happyReduce_464),- (465 , happyReduce_465),- (466 , happyReduce_466),- (467 , happyReduce_467),- (468 , happyReduce_468),- (469 , happyReduce_469),- (470 , happyReduce_470),- (471 , happyReduce_471),- (472 , happyReduce_472),- (473 , happyReduce_473),- (474 , happyReduce_474),- (475 , happyReduce_475),- (476 , happyReduce_476),- (477 , happyReduce_477),- (478 , happyReduce_478),- (479 , happyReduce_479),- (480 , happyReduce_480),- (481 , happyReduce_481),- (482 , happyReduce_482),- (483 , happyReduce_483),- (484 , happyReduce_484),- (485 , happyReduce_485),- (486 , happyReduce_486),- (487 , happyReduce_487),- (488 , happyReduce_488),- (489 , happyReduce_489),- (490 , happyReduce_490),- (491 , happyReduce_491),- (492 , happyReduce_492),- (493 , happyReduce_493),- (494 , happyReduce_494),- (495 , happyReduce_495),- (496 , happyReduce_496),- (497 , happyReduce_497),- (498 , happyReduce_498),- (499 , happyReduce_499),- (500 , happyReduce_500),- (501 , happyReduce_501),- (502 , happyReduce_502),- (503 , happyReduce_503),- (504 , happyReduce_504),- (505 , happyReduce_505),- (506 , happyReduce_506),- (507 , happyReduce_507),- (508 , happyReduce_508),- (509 , happyReduce_509),- (510 , happyReduce_510),- (511 , happyReduce_511),- (512 , happyReduce_512),- (513 , happyReduce_513),- (514 , happyReduce_514),- (515 , happyReduce_515),- (516 , happyReduce_516),- (517 , happyReduce_517),- (518 , happyReduce_518),- (519 , happyReduce_519),- (520 , happyReduce_520),- (521 , happyReduce_521),- (522 , happyReduce_522),- (523 , happyReduce_523),- (524 , happyReduce_524),- (525 , happyReduce_525),- (526 , happyReduce_526),- (527 , happyReduce_527),- (528 , happyReduce_528),- (529 , happyReduce_529),- (530 , happyReduce_530),- (531 , happyReduce_531),- (532 , happyReduce_532),- (533 , happyReduce_533),- (534 , happyReduce_534),- (535 , happyReduce_535),- (536 , happyReduce_536),- (537 , happyReduce_537),- (538 , happyReduce_538),- (539 , happyReduce_539),- (540 , happyReduce_540),- (541 , happyReduce_541),- (542 , happyReduce_542),- (543 , happyReduce_543),- (544 , happyReduce_544),- (545 , happyReduce_545),- (546 , happyReduce_546),- (547 , happyReduce_547),- (548 , happyReduce_548),- (549 , happyReduce_549),- (550 , happyReduce_550),- (551 , happyReduce_551),- (552 , happyReduce_552),- (553 , happyReduce_553),- (554 , happyReduce_554),- (555 , happyReduce_555),- (556 , happyReduce_556),- (557 , happyReduce_557),- (558 , happyReduce_558),- (559 , happyReduce_559),- (560 , happyReduce_560),- (561 , happyReduce_561),- (562 , happyReduce_562),- (563 , happyReduce_563),- (564 , happyReduce_564),- (565 , happyReduce_565),- (566 , happyReduce_566),- (567 , happyReduce_567),- (568 , happyReduce_568),- (569 , happyReduce_569),- (570 , happyReduce_570),- (571 , happyReduce_571),- (572 , happyReduce_572),- (573 , happyReduce_573),- (574 , happyReduce_574),- (575 , happyReduce_575),- (576 , happyReduce_576),- (577 , happyReduce_577),- (578 , happyReduce_578),- (579 , happyReduce_579),- (580 , happyReduce_580),- (581 , happyReduce_581),- (582 , happyReduce_582),- (583 , happyReduce_583),- (584 , happyReduce_584),- (585 , happyReduce_585),- (586 , happyReduce_586),- (587 , happyReduce_587),- (588 , happyReduce_588),- (589 , happyReduce_589),- (590 , happyReduce_590),- (591 , happyReduce_591),- (592 , happyReduce_592),- (593 , happyReduce_593),- (594 , happyReduce_594),- (595 , happyReduce_595),- (596 , happyReduce_596),- (597 , happyReduce_597),- (598 , happyReduce_598),- (599 , happyReduce_599),- (600 , happyReduce_600),- (601 , happyReduce_601),- (602 , happyReduce_602),- (603 , happyReduce_603),- (604 , happyReduce_604),- (605 , happyReduce_605),- (606 , happyReduce_606),- (607 , happyReduce_607),- (608 , happyReduce_608),- (609 , happyReduce_609),- (610 , happyReduce_610),- (611 , happyReduce_611),- (612 , happyReduce_612),- (613 , happyReduce_613),- (614 , happyReduce_614),- (615 , happyReduce_615),- (616 , happyReduce_616),- (617 , happyReduce_617),- (618 , happyReduce_618),- (619 , happyReduce_619),- (620 , happyReduce_620),- (621 , happyReduce_621),- (622 , happyReduce_622),- (623 , happyReduce_623),- (624 , happyReduce_624),- (625 , happyReduce_625),- (626 , happyReduce_626),- (627 , happyReduce_627),- (628 , happyReduce_628),- (629 , happyReduce_629),- (630 , happyReduce_630),- (631 , happyReduce_631),- (632 , happyReduce_632),- (633 , happyReduce_633),- (634 , happyReduce_634),- (635 , happyReduce_635),- (636 , happyReduce_636),- (637 , happyReduce_637),- (638 , happyReduce_638),- (639 , happyReduce_639),- (640 , happyReduce_640),- (641 , happyReduce_641),- (642 , happyReduce_642),- (643 , happyReduce_643),- (644 , happyReduce_644),- (645 , happyReduce_645),- (646 , happyReduce_646),- (647 , happyReduce_647),- (648 , happyReduce_648),- (649 , happyReduce_649),- (650 , happyReduce_650),- (651 , happyReduce_651),- (652 , happyReduce_652),- (653 , happyReduce_653),- (654 , happyReduce_654),- (655 , happyReduce_655),- (656 , happyReduce_656),- (657 , happyReduce_657),- (658 , happyReduce_658),- (659 , happyReduce_659),- (660 , happyReduce_660),- (661 , happyReduce_661),- (662 , happyReduce_662),- (663 , happyReduce_663),- (664 , happyReduce_664),- (665 , happyReduce_665),- (666 , happyReduce_666),- (667 , happyReduce_667),- (668 , happyReduce_668),- (669 , happyReduce_669),- (670 , happyReduce_670),- (671 , happyReduce_671),- (672 , happyReduce_672),- (673 , happyReduce_673),- (674 , happyReduce_674),- (675 , happyReduce_675),- (676 , happyReduce_676),- (677 , happyReduce_677),- (678 , happyReduce_678),- (679 , happyReduce_679),- (680 , happyReduce_680),- (681 , happyReduce_681),- (682 , happyReduce_682),- (683 , happyReduce_683),- (684 , happyReduce_684),- (685 , happyReduce_685),- (686 , happyReduce_686),- (687 , happyReduce_687),- (688 , happyReduce_688),- (689 , happyReduce_689),- (690 , happyReduce_690),- (691 , happyReduce_691),- (692 , happyReduce_692),- (693 , happyReduce_693),- (694 , happyReduce_694),- (695 , happyReduce_695),- (696 , happyReduce_696),- (697 , happyReduce_697),- (698 , happyReduce_698),- (699 , happyReduce_699),- (700 , happyReduce_700),- (701 , happyReduce_701),- (702 , happyReduce_702),- (703 , happyReduce_703),- (704 , happyReduce_704),- (705 , happyReduce_705),- (706 , happyReduce_706),- (707 , happyReduce_707),- (708 , happyReduce_708),- (709 , happyReduce_709),- (710 , happyReduce_710),- (711 , happyReduce_711),- (712 , happyReduce_712),- (713 , happyReduce_713),- (714 , happyReduce_714),- (715 , happyReduce_715),- (716 , happyReduce_716),- (717 , happyReduce_717),- (718 , happyReduce_718),- (719 , happyReduce_719),- (720 , happyReduce_720),- (721 , happyReduce_721),- (722 , happyReduce_722),- (723 , happyReduce_723),- (724 , happyReduce_724),- (725 , happyReduce_725),- (726 , happyReduce_726),- (727 , happyReduce_727),- (728 , happyReduce_728),- (729 , happyReduce_729),- (730 , happyReduce_730),- (731 , happyReduce_731),- (732 , happyReduce_732),- (733 , happyReduce_733),- (734 , happyReduce_734),- (735 , happyReduce_735),- (736 , happyReduce_736),- (737 , happyReduce_737),- (738 , happyReduce_738),- (739 , happyReduce_739),- (740 , happyReduce_740),- (741 , happyReduce_741),- (742 , happyReduce_742),- (743 , happyReduce_743),- (744 , happyReduce_744),- (745 , happyReduce_745),- (746 , happyReduce_746),- (747 , happyReduce_747),- (748 , happyReduce_748),- (749 , happyReduce_749),- (750 , happyReduce_750),- (751 , happyReduce_751),- (752 , happyReduce_752),- (753 , happyReduce_753),- (754 , happyReduce_754),- (755 , happyReduce_755),- (756 , happyReduce_756),- (757 , happyReduce_757),- (758 , happyReduce_758),- (759 , happyReduce_759),- (760 , happyReduce_760),- (761 , happyReduce_761),- (762 , happyReduce_762),- (763 , happyReduce_763),- (764 , happyReduce_764),- (765 , happyReduce_765),- (766 , happyReduce_766),- (767 , happyReduce_767),- (768 , happyReduce_768),- (769 , happyReduce_769),- (770 , happyReduce_770),- (771 , happyReduce_771),- (772 , happyReduce_772),- (773 , happyReduce_773),- (774 , happyReduce_774),- (775 , happyReduce_775),- (776 , happyReduce_776),- (777 , happyReduce_777),- (778 , happyReduce_778),- (779 , happyReduce_779),- (780 , happyReduce_780),- (781 , happyReduce_781),- (782 , happyReduce_782),- (783 , happyReduce_783),- (784 , happyReduce_784),- (785 , happyReduce_785),- (786 , happyReduce_786),- (787 , happyReduce_787),- (788 , happyReduce_788),- (789 , happyReduce_789),- (790 , happyReduce_790),- (791 , happyReduce_791),- (792 , happyReduce_792),- (793 , happyReduce_793),- (794 , happyReduce_794),- (795 , happyReduce_795),- (796 , happyReduce_796),- (797 , happyReduce_797),- (798 , happyReduce_798),- (799 , happyReduce_799),- (800 , happyReduce_800),- (801 , happyReduce_801),- (802 , happyReduce_802),- (803 , happyReduce_803),- (804 , happyReduce_804),- (805 , happyReduce_805),- (806 , happyReduce_806),- (807 , happyReduce_807),- (808 , happyReduce_808),- (809 , happyReduce_809),- (810 , happyReduce_810),- (811 , happyReduce_811),- (812 , happyReduce_812),- (813 , happyReduce_813),- (814 , happyReduce_814),- (815 , happyReduce_815),- (816 , happyReduce_816),- (817 , happyReduce_817),- (818 , happyReduce_818),- (819 , happyReduce_819),- (820 , happyReduce_820),- (821 , happyReduce_821),- (822 , happyReduce_822),- (823 , happyReduce_823),- (824 , happyReduce_824),- (825 , happyReduce_825),- (826 , happyReduce_826),- (827 , happyReduce_827),- (828 , happyReduce_828),- (829 , happyReduce_829),- (830 , happyReduce_830),- (831 , happyReduce_831),- (832 , happyReduce_832)- ]--happy_n_terms = 151 :: Prelude.Int-happy_n_nonterms = 314 :: Prelude.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 happyOut299 happy_x_1 of { (HappyWrap299 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 happyOut269 happy_x_1 of { (HappyWrap269 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 happyOut293 happy_x_1 of { (HappyWrap293 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 happyOut277 happy_x_1 of { (HappyWrap277 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 -> - ( amsrn (sLL happy_var_1 happy_var_3 $ getRdrName unrestrictedFunTyCon)- (NameAnn NameParens (glAA happy_var_1) (glAA happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn16 r))--happyReduce_18 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_18 = happyMonadReduce 1# 0# happyReduction_18-happyReduction_18 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - ( amsrn (sLL happy_var_1 happy_var_1 $ getRdrName unrestrictedFunTyCon)- (NameAnnRArrow (glAA happy_var_1) []))})- ) (\r -> happyReturn (happyIn16 r))--happyReduce_19 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_19 = happySpecReduce_3 1# happyReduction_19-happyReduction_19 happy_x_3- happy_x_2- happy_x_1- = case happyOut18 happy_x_2 of { (HappyWrap18 happy_var_2) -> - happyIn17- (fromOL happy_var_2- )}--happyReduce_20 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_20 = happySpecReduce_3 1# happyReduction_20-happyReduction_20 happy_x_3- happy_x_2- happy_x_1- = case happyOut18 happy_x_2 of { (HappyWrap18 happy_var_2) -> - happyIn17- (fromOL happy_var_2- )}--happyReduce_21 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_21 = happySpecReduce_3 2# happyReduction_21-happyReduction_21 happy_x_3- happy_x_2- happy_x_1- = case happyOut18 happy_x_1 of { (HappyWrap18 happy_var_1) -> - case happyOut19 happy_x_3 of { (HappyWrap19 happy_var_3) -> - happyIn18- (happy_var_1 `appOL` unitOL happy_var_3- )}}--happyReduce_22 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_22 = happySpecReduce_2 2# happyReduction_22-happyReduction_22 happy_x_2- happy_x_1- = case happyOut18 happy_x_1 of { (HappyWrap18 happy_var_1) -> - happyIn18- (happy_var_1- )}--happyReduce_23 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_23 = happySpecReduce_1 2# happyReduction_23-happyReduction_23 happy_x_1- = case happyOut19 happy_x_1 of { (HappyWrap19 happy_var_1) -> - happyIn18- (unitOL happy_var_1- )}--happyReduce_24 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_24 = happyReduce 4# 3# happyReduction_24-happyReduction_24 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest)- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut24 happy_x_2 of { (HappyWrap24 happy_var_2) -> - case happyOut31 happy_x_4 of { (HappyWrap31 happy_var_4) -> - happyIn19- (sL1 happy_var_1 $ HsUnit { hsunitName = happy_var_2- , hsunitBody = fromOL happy_var_4 }- ) `HappyStk` happyRest}}}--happyReduce_25 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_25 = happySpecReduce_1 4# happyReduction_25-happyReduction_25 happy_x_1- = case happyOut24 happy_x_1 of { (HappyWrap24 happy_var_1) -> - happyIn20- (sL1 happy_var_1 $ HsUnitId happy_var_1 []- )}--happyReduce_26 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_26 = happyReduce 4# 4# happyReduction_26-happyReduction_26 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest)- = case happyOut24 happy_x_1 of { (HappyWrap24 happy_var_1) -> - case happyOut21 happy_x_3 of { (HappyWrap21 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - happyIn20- (sLL happy_var_1 happy_var_4 $ HsUnitId happy_var_1 (fromOL happy_var_3)- ) `HappyStk` happyRest}}}--happyReduce_27 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_27 = happySpecReduce_3 5# happyReduction_27-happyReduction_27 happy_x_3- happy_x_2- happy_x_1- = case happyOut21 happy_x_1 of { (HappyWrap21 happy_var_1) -> - case happyOut22 happy_x_3 of { (HappyWrap22 happy_var_3) -> - happyIn21- (happy_var_1 `appOL` unitOL happy_var_3- )}}--happyReduce_28 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_28 = happySpecReduce_2 5# happyReduction_28-happyReduction_28 happy_x_2- happy_x_1- = case happyOut21 happy_x_1 of { (HappyWrap21 happy_var_1) -> - happyIn21- (happy_var_1- )}--happyReduce_29 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_29 = happySpecReduce_1 5# happyReduction_29-happyReduction_29 happy_x_1- = case happyOut22 happy_x_1 of { (HappyWrap22 happy_var_1) -> - happyIn21- (unitOL happy_var_1- )}--happyReduce_30 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_30 = happySpecReduce_3 6# happyReduction_30-happyReduction_30 happy_x_3- happy_x_2- happy_x_1- = case happyOut316 happy_x_1 of { (HappyWrap316 happy_var_1) -> - case happyOut23 happy_x_3 of { (HappyWrap23 happy_var_3) -> - happyIn22- (sLL (reLoc happy_var_1) happy_var_3 $ (reLoc happy_var_1, happy_var_3)- )}}--happyReduce_31 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_31 = happyReduce 4# 6# happyReduction_31-happyReduction_31 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest)- = case happyOut316 happy_x_1 of { (HappyWrap316 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut316 happy_x_3 of { (HappyWrap316 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - happyIn22- (sLL (reLoc happy_var_1) happy_var_4 $ (reLoc happy_var_1, sLL happy_var_2 happy_var_4 $ HsModuleVar (reLoc happy_var_3))- ) `HappyStk` happyRest}}}}--happyReduce_32 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_32 = happySpecReduce_3 7# happyReduction_32-happyReduction_32 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut316 happy_x_2 of { (HappyWrap316 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn23- (sLL happy_var_1 happy_var_3 $ HsModuleVar (reLoc happy_var_2)- )}}}--happyReduce_33 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_33 = happySpecReduce_3 7# happyReduction_33-happyReduction_33 happy_x_3- happy_x_2- happy_x_1- = case happyOut20 happy_x_1 of { (HappyWrap20 happy_var_1) -> - case happyOut316 happy_x_3 of { (HappyWrap316 happy_var_3) -> - happyIn23- (sLL happy_var_1 (reLoc happy_var_3) $ HsModuleId happy_var_1 (reLoc happy_var_3)- )}}--happyReduce_34 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_34 = happySpecReduce_1 8# happyReduction_34-happyReduction_34 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn24- (sL1 happy_var_1 $ PackageName (getSTRING happy_var_1)- )}--happyReduce_35 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_35 = happySpecReduce_1 8# happyReduction_35-happyReduction_35 happy_x_1- = case happyOut27 happy_x_1 of { (HappyWrap27 happy_var_1) -> - happyIn24- (sL1 happy_var_1 $ PackageName (unLoc happy_var_1)- )}--happyReduce_36 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_36 = happySpecReduce_1 9# happyReduction_36-happyReduction_36 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn25- (sL1 happy_var_1 $ getVARID happy_var_1- )}--happyReduce_37 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_37 = happySpecReduce_1 9# happyReduction_37-happyReduction_37 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn25- (sL1 happy_var_1 $ getCONID happy_var_1- )}--happyReduce_38 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_38 = happySpecReduce_1 9# happyReduction_38-happyReduction_38 happy_x_1- = case happyOut308 happy_x_1 of { (HappyWrap308 happy_var_1) -> - happyIn25- (happy_var_1- )}--happyReduce_39 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_39 = happySpecReduce_1 10# happyReduction_39-happyReduction_39 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn26- ([mj AnnMinus happy_var_1 ]- )}--happyReduce_40 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_40 = happySpecReduce_1 10# happyReduction_40-happyReduction_40 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn26- ([mj AnnMinus happy_var_1 ]- )}--happyReduce_41 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_41 = happyMonadReduce 1# 10# happyReduction_41-happyReduction_41 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - ( if (getVARSYM happy_var_1 == fsLit "-")- then return [mj AnnMinus happy_var_1]- else do { addError $ mkPlainErrorMsgEnvelope (getLoc happy_var_1) $ PsErrExpectedHyphen- ; return [] })})- ) (\r -> happyReturn (happyIn26 r))--happyReduce_42 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_42 = happySpecReduce_1 11# happyReduction_42-happyReduction_42 happy_x_1- = case happyOut25 happy_x_1 of { (HappyWrap25 happy_var_1) -> - happyIn27- (happy_var_1- )}--happyReduce_43 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_43 = happySpecReduce_3 11# happyReduction_43-happyReduction_43 happy_x_3- happy_x_2- happy_x_1- = case happyOut25 happy_x_1 of { (HappyWrap25 happy_var_1) -> - case happyOut27 happy_x_3 of { (HappyWrap27 happy_var_3) -> - happyIn27- (sLL happy_var_1 happy_var_3 $ concatFS [unLoc happy_var_1, fsLit "-", (unLoc happy_var_3)]- )}}--happyReduce_44 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_44 = happySpecReduce_0 12# happyReduction_44-happyReduction_44 = happyIn28- (Nothing- )--happyReduce_45 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_45 = happySpecReduce_3 12# happyReduction_45-happyReduction_45 happy_x_3- happy_x_2- happy_x_1- = case happyOut29 happy_x_2 of { (HappyWrap29 happy_var_2) -> - happyIn28- (Just (fromOL happy_var_2)- )}--happyReduce_46 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_46 = happySpecReduce_3 13# happyReduction_46-happyReduction_46 happy_x_3- happy_x_2- happy_x_1- = case happyOut29 happy_x_1 of { (HappyWrap29 happy_var_1) -> - case happyOut30 happy_x_3 of { (HappyWrap30 happy_var_3) -> - happyIn29- (happy_var_1 `appOL` unitOL happy_var_3- )}}--happyReduce_47 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_47 = happySpecReduce_2 13# happyReduction_47-happyReduction_47 happy_x_2- happy_x_1- = case happyOut29 happy_x_1 of { (HappyWrap29 happy_var_1) -> - happyIn29- (happy_var_1- )}--happyReduce_48 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_48 = happySpecReduce_1 13# happyReduction_48-happyReduction_48 happy_x_1- = case happyOut30 happy_x_1 of { (HappyWrap30 happy_var_1) -> - happyIn29- (unitOL happy_var_1- )}--happyReduce_49 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_49 = happySpecReduce_3 14# happyReduction_49-happyReduction_49 happy_x_3- happy_x_2- happy_x_1- = case happyOut316 happy_x_1 of { (HappyWrap316 happy_var_1) -> - case happyOut316 happy_x_3 of { (HappyWrap316 happy_var_3) -> - happyIn30- (sLL (reLoc happy_var_1) (reLoc happy_var_3) $ Renaming (reLoc happy_var_1) (Just (reLoc happy_var_3))- )}}--happyReduce_50 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_50 = happySpecReduce_1 14# happyReduction_50-happyReduction_50 happy_x_1- = case happyOut316 happy_x_1 of { (HappyWrap316 happy_var_1) -> - happyIn30- (sL1 (reLoc happy_var_1) $ Renaming (reLoc happy_var_1) Nothing- )}--happyReduce_51 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_51 = happySpecReduce_3 15# happyReduction_51-happyReduction_51 happy_x_3- happy_x_2- happy_x_1- = case happyOut32 happy_x_2 of { (HappyWrap32 happy_var_2) -> - happyIn31- (happy_var_2- )}--happyReduce_52 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_52 = happySpecReduce_3 15# happyReduction_52-happyReduction_52 happy_x_3- happy_x_2- happy_x_1- = case happyOut32 happy_x_2 of { (HappyWrap32 happy_var_2) -> - happyIn31- (happy_var_2- )}--happyReduce_53 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_53 = happySpecReduce_3 16# happyReduction_53-happyReduction_53 happy_x_3- happy_x_2- happy_x_1- = case happyOut32 happy_x_1 of { (HappyWrap32 happy_var_1) -> - case happyOut33 happy_x_3 of { (HappyWrap33 happy_var_3) -> - happyIn32- (happy_var_1 `appOL` unitOL happy_var_3- )}}--happyReduce_54 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_54 = happySpecReduce_2 16# happyReduction_54-happyReduction_54 happy_x_2- happy_x_1- = case happyOut32 happy_x_1 of { (HappyWrap32 happy_var_1) -> - happyIn32- (happy_var_1- )}--happyReduce_55 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_55 = happySpecReduce_1 16# happyReduction_55-happyReduction_55 happy_x_1- = case happyOut33 happy_x_1 of { (HappyWrap33 happy_var_1) -> - happyIn32- (unitOL happy_var_1- )}--happyReduce_56 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_56 = happyReduce 7# 17# happyReduction_56-happyReduction_56 (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 happyOut63 happy_x_2 of { (HappyWrap63 happy_var_2) -> - case happyOut316 happy_x_3 of { (HappyWrap316 happy_var_3) -> - case happyOut38 happy_x_4 of { (HappyWrap38 happy_var_4) -> - case happyOut48 happy_x_5 of { (HappyWrap48 happy_var_5) -> - case happyOut39 happy_x_7 of { (HappyWrap39 happy_var_7) -> - happyIn33- (sL1 happy_var_1 $ DeclD- (case snd happy_var_2 of- NotBoot -> HsSrcFile- IsBoot -> HsBootFile)- (reLoc happy_var_3)- (sL1 happy_var_1 (HsModule (XModulePs noAnn (thdOf3 happy_var_7) happy_var_4 Nothing) (Just happy_var_3) happy_var_5 (fst $ sndOf3 happy_var_7) (snd $ sndOf3 happy_var_7)))- ) `HappyStk` happyRest}}}}}}--happyReduce_57 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_57 = happyReduce 6# 17# 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 happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut316 happy_x_2 of { (HappyWrap316 happy_var_2) -> - case happyOut38 happy_x_3 of { (HappyWrap38 happy_var_3) -> - case happyOut48 happy_x_4 of { (HappyWrap48 happy_var_4) -> - case happyOut39 happy_x_6 of { (HappyWrap39 happy_var_6) -> - happyIn33- (sL1 happy_var_1 $ DeclD- HsigFile- (reLoc happy_var_2)- (sL1 happy_var_1 (HsModule (XModulePs noAnn (thdOf3 happy_var_6) happy_var_3 Nothing) (Just happy_var_2) happy_var_4 (fst $ sndOf3 happy_var_6) (snd $ sndOf3 happy_var_6)))- ) `HappyStk` happyRest}}}}}--happyReduce_58 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_58 = happySpecReduce_3 17# happyReduction_58-happyReduction_58 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut20 happy_x_2 of { (HappyWrap20 happy_var_2) -> - case happyOut28 happy_x_3 of { (HappyWrap28 happy_var_3) -> - happyIn33- (sL1 happy_var_1 $ IncludeD (IncludeDecl { idUnitId = happy_var_2- , idModRenaming = happy_var_3- , idSignatureInclude = False })- )}}}--happyReduce_59 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_59 = happySpecReduce_3 17# happyReduction_59-happyReduction_59 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut20 happy_x_3 of { (HappyWrap20 happy_var_3) -> - happyIn33- (sL1 happy_var_1 $ IncludeD (IncludeDecl { idUnitId = happy_var_3- , idModRenaming = Nothing- , idSignatureInclude = True })- )}}--happyReduce_60 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_60 = happyMonadReduce 6# 18# 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) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut316 happy_x_2 of { (HappyWrap316 happy_var_2) -> - case happyOut38 happy_x_3 of { (HappyWrap38 happy_var_3) -> - case happyOut48 happy_x_4 of { (HappyWrap48 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - case happyOut39 happy_x_6 of { (HappyWrap39 happy_var_6) -> - ( fileSrcSpan >>= \ loc ->- acs (\cs-> (L loc (HsModule (XModulePs- (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnSignature happy_var_1, mj AnnWhere happy_var_5] (fstOf3 happy_var_6)) cs)- (thdOf3 happy_var_6) happy_var_3 Nothing)- (Just happy_var_2) happy_var_4 (fst $ sndOf3 happy_var_6)- (snd $ sndOf3 happy_var_6)))- ))}}}}}})- ) (\r -> happyReturn (happyIn34 r))--happyReduce_61 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_61 = happyMonadReduce 6# 19# happyReduction_61-happyReduction_61 (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 happyOut316 happy_x_2 of { (HappyWrap316 happy_var_2) -> - case happyOut38 happy_x_3 of { (HappyWrap38 happy_var_3) -> - case happyOut48 happy_x_4 of { (HappyWrap48 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - case happyOut39 happy_x_6 of { (HappyWrap39 happy_var_6) -> - ( fileSrcSpan >>= \ loc ->- acsFinal (\cs -> (L loc (HsModule (XModulePs- (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnModule happy_var_1, mj AnnWhere happy_var_5] (fstOf3 happy_var_6)) cs)- (thdOf3 happy_var_6) happy_var_3 Nothing)- (Just happy_var_2) happy_var_4 (fst $ sndOf3 happy_var_6)- (snd $ sndOf3 happy_var_6))- )))}}}}}})- ) (\r -> happyReturn (happyIn35 r))--happyReduce_62 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_62 = happyMonadReduce 1# 19# happyReduction_62-happyReduction_62 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut40 happy_x_1 of { (HappyWrap40 happy_var_1) -> - ( fileSrcSpan >>= \ loc ->- acsFinal (\cs -> (L loc (HsModule (XModulePs- (EpAnn (spanAsAnchor loc) (AnnsModule [] (fstOf3 happy_var_1)) cs)- (thdOf3 happy_var_1) Nothing Nothing)- Nothing Nothing- (fst $ sndOf3 happy_var_1) (snd $ sndOf3 happy_var_1)))))})- ) (\r -> happyReturn (happyIn35 r))--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 happyOut144 happy_x_2 of { (HappyWrap144 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( fmap Just $ amsrp (sLL happy_var_1 happy_var_3 $ DeprecatedTxt (sL1 happy_var_1 $ getDEPRECATED_PRAGs happy_var_1) (map stringLiteralToHsDocWst $ snd $ unLoc happy_var_2))- (AnnPragma (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 happyOut144 happy_x_2 of { (HappyWrap144 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( fmap Just $ amsrp (sLL happy_var_1 happy_var_3 $ WarningTxt (sL1 happy_var_1 $ getWARNING_PRAGs happy_var_1) (map stringLiteralToHsDocWst $ snd $ unLoc happy_var_2))- (AnnPragma (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 { (HappyWrap41 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn39- ((AnnList Nothing (Just $ moc happy_var_1) (Just $ mcc happy_var_3) [] (fst happy_var_2)- , snd happy_var_2, explicitBraces happy_var_1 happy_var_3)- )}}}--happyReduce_69 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_69 = happySpecReduce_3 23# happyReduction_69-happyReduction_69 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut41 happy_x_2 of { (HappyWrap41 happy_var_2) -> - happyIn39- ((AnnList Nothing Nothing Nothing [] (fst happy_var_2)- , snd happy_var_2, VirtualBraces (getVOCURLY happy_var_1))- )}}--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 { (HappyWrap41 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn40- ((AnnList Nothing (Just $ moc happy_var_1) (Just $ mcc happy_var_3) [] (fst happy_var_2)- , snd happy_var_2, explicitBraces happy_var_1 happy_var_3)- )}}}--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 { (HappyWrap41 happy_var_2) -> - happyIn40- ((AnnList Nothing Nothing Nothing [] [], snd happy_var_2, VirtualBraces leftmostColumn)- )}--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 happyOut59 happy_x_1 of { (HappyWrap59 happy_var_1) -> - case happyOut42 happy_x_2 of { (HappyWrap42 happy_var_2) -> - happyIn41- ((reverse 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 happyOut61 happy_x_1 of { (HappyWrap61 happy_var_1) -> - case happyOut76 happy_x_2 of { (HappyWrap76 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 happyOut61 happy_x_1 of { (HappyWrap61 happy_var_1) -> - case happyOut75 happy_x_2 of { (HappyWrap75 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 happyOut60 happy_x_1 of { (HappyWrap60 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 6# 27# happyReduction_76-happyReduction_76 (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 happyOut316 happy_x_2 of { (HappyWrap316 happy_var_2) -> - case happyOut38 happy_x_3 of { (HappyWrap38 happy_var_3) -> - case happyOut48 happy_x_4 of { (HappyWrap48 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - case happyOut44 happy_x_6 of { (HappyWrap44 happy_var_6) -> - ( fileSrcSpan >>= \ loc ->- acs (\cs -> (L loc (HsModule (XModulePs- (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnModule happy_var_1,mj AnnWhere happy_var_5] (AnnList Nothing Nothing Nothing [] [])) cs)- NoLayoutInfo happy_var_3 Nothing)- (Just happy_var_2) happy_var_4 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 6# 27# happyReduction_77-happyReduction_77 (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 happyOut316 happy_x_2 of { (HappyWrap316 happy_var_2) -> - case happyOut38 happy_x_3 of { (HappyWrap38 happy_var_3) -> - case happyOut48 happy_x_4 of { (HappyWrap48 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - case happyOut44 happy_x_6 of { (HappyWrap44 happy_var_6) -> - ( fileSrcSpan >>= \ loc ->- acs (\cs -> (L loc (HsModule (XModulePs- (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnModule happy_var_1,mj AnnWhere happy_var_5] (AnnList Nothing Nothing Nothing [] [])) cs)- NoLayoutInfo happy_var_3 Nothing)- (Just happy_var_2) happy_var_4 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 { (HappyWrap45 happy_var_1) -> - ( fileSrcSpan >>= \ loc ->- return (L loc (HsModule (XModulePs noAnn NoLayoutInfo Nothing Nothing) Nothing Nothing happy_var_1 [])))})- ) (\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 { (HappyWrap46 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 { (HappyWrap46 happy_var_2) -> - happyIn44- (happy_var_2- )}--happyReduce_81 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_81 = happySpecReduce_2 29# happyReduction_81-happyReduction_81 happy_x_2- happy_x_1- = case happyOut46 happy_x_2 of { (HappyWrap46 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 { (HappyWrap46 happy_var_2) -> - happyIn45- (happy_var_2- )}--happyReduce_83 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_83 = happySpecReduce_2 30# happyReduction_83-happyReduction_83 happy_x_2- happy_x_1- = case happyOut47 happy_x_2 of { (HappyWrap47 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 happyOut61 happy_x_1 of { (HappyWrap61 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 happyOut60 happy_x_1 of { (HappyWrap60 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 { (HappyWrap49 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( fmap Just $ amsrl (sLL happy_var_1 happy_var_3 (fromOL $ snd happy_var_2))- (AnnList Nothing (Just $ mop happy_var_1) (Just $ mcp happy_var_3) (fst 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 = happySpecReduce_1 33# happyReduction_88-happyReduction_88 happy_x_1- = case happyOut50 happy_x_1 of { (HappyWrap50 happy_var_1) -> - happyIn49- (([], happy_var_1)- )}--happyReduce_89 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_89 = happySpecReduce_0 33# happyReduction_89-happyReduction_89 = happyIn49- (([], nilOL)- )--happyReduce_90 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_90 = happyMonadReduce 2# 33# happyReduction_90-happyReduction_90 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut50 happy_x_1 of { (HappyWrap50 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( case happy_var_1 of- SnocOL hs t -> do- t' <- addTrailingCommaA t (gl happy_var_2)- return ([], snocOL hs t'))}})- ) (\r -> happyReturn (happyIn49 r))--happyReduce_91 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_91 = happySpecReduce_1 33# happyReduction_91-happyReduction_91 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn49- (([mj AnnComma happy_var_1], nilOL)- )}--happyReduce_92 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_92 = happyMonadReduce 3# 34# happyReduction_92-happyReduction_92 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut50 happy_x_1 of { (HappyWrap50 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut51 happy_x_3 of { (HappyWrap51 happy_var_3) -> - ( let ls = happy_var_1- in if isNilOL ls- then return (ls `appOL` happy_var_3)- else case ls of- SnocOL hs t -> do- t' <- addTrailingCommaA t (gl happy_var_2)- return (snocOL hs t' `appOL` happy_var_3))}}})- ) (\r -> happyReturn (happyIn50 r))--happyReduce_93 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_93 = happySpecReduce_1 34# happyReduction_93-happyReduction_93 happy_x_1- = case happyOut51 happy_x_1 of { (HappyWrap51 happy_var_1) -> - happyIn50- (happy_var_1- )}--happyReduce_94 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_94 = happyMonadReduce 2# 35# happyReduction_94-happyReduction_94 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut56 happy_x_1 of { (HappyWrap56 happy_var_1) -> - case happyOut52 happy_x_2 of { (HappyWrap52 happy_var_2) -> - ( mkModuleImpExp (fst $ unLoc happy_var_2) happy_var_1 (snd $ unLoc happy_var_2)- >>= \ie -> fmap (unitOL . reLocA) (return (sLL (reLoc happy_var_1) happy_var_2 ie)))}})- ) (\r -> happyReturn (happyIn51 r))--happyReduce_95 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_95 = happyMonadReduce 2# 35# happyReduction_95-happyReduction_95 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut316 happy_x_2 of { (HappyWrap316 happy_var_2) -> - ( fmap (unitOL . reLocA) (acs (\cs -> sLL happy_var_1 (reLoc happy_var_2) (IEModuleContents (EpAnn (glR happy_var_1) [mj AnnModule happy_var_1] cs) happy_var_2))))}})- ) (\r -> happyReturn (happyIn51 r))--happyReduce_96 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_96 = happySpecReduce_2 35# happyReduction_96-happyReduction_96 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut269 happy_x_2 of { (HappyWrap269 happy_var_2) -> - happyIn51- (unitOL (reLocA (sLL happy_var_1 (reLocN happy_var_2)- (IEVar noExtField (sLLa happy_var_1 (reLocN happy_var_2) (IEPattern (glAA happy_var_1) happy_var_2)))))- )}}--happyReduce_97 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_97 = happySpecReduce_0 36# happyReduction_97-happyReduction_97 = happyIn52- (sL0 ([],ImpExpAbs)- )--happyReduce_98 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_98 = happyMonadReduce 3# 36# happyReduction_98-happyReduction_98 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut53 happy_x_2 of { (HappyWrap53 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 (happyIn52 r))--happyReduce_99 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_99 = happySpecReduce_0 37# happyReduction_99-happyReduction_99 = happyIn53- (([],[])- )--happyReduce_100 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_100 = happySpecReduce_1 37# happyReduction_100-happyReduction_100 happy_x_1- = case happyOut54 happy_x_1 of { (HappyWrap54 happy_var_1) -> - happyIn53- (happy_var_1- )}--happyReduce_101 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_101 = happyMonadReduce 3# 38# happyReduction_101-happyReduction_101 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut54 happy_x_1 of { (HappyWrap54 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut55 happy_x_3 of { (HappyWrap55 happy_var_3) -> - ( case (snd happy_var_1) of- (l@(L la ImpExpQcWildcard):t) ->- do { l' <- addTrailingCommaA l (gl happy_var_2)- ; return ([mj AnnDotdot (reLoc l),- mj AnnComma happy_var_2]- ,(snd (unLoc happy_var_3) : l' : t)) }- (l:t) ->- do { l' <- addTrailingCommaA l (gl happy_var_2)- ; return (fst happy_var_1 ++ fst (unLoc happy_var_3)- , snd (unLoc happy_var_3) : l' : t)})}}})- ) (\r -> happyReturn (happyIn54 r))--happyReduce_102 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_102 = happySpecReduce_1 38# happyReduction_102-happyReduction_102 happy_x_1- = case happyOut55 happy_x_1 of { (HappyWrap55 happy_var_1) -> - happyIn54- ((fst (unLoc happy_var_1),[snd (unLoc happy_var_1)])- )}--happyReduce_103 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_103 = happySpecReduce_1 39# happyReduction_103-happyReduction_103 happy_x_1- = case happyOut56 happy_x_1 of { (HappyWrap56 happy_var_1) -> - happyIn55- (sL1A happy_var_1 ([],happy_var_1)- )}--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 happyOutTok happy_x_1 of { happy_var_1 -> - happyIn55- (sL1 happy_var_1 ([mj AnnDotdot happy_var_1], sL1a happy_var_1 ImpExpQcWildcard)- )}--happyReduce_105 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_105 = happySpecReduce_1 40# happyReduction_105-happyReduction_105 happy_x_1- = case happyOut57 happy_x_1 of { (HappyWrap57 happy_var_1) -> - happyIn56- (reLocA $ sL1N happy_var_1 (ImpExpQcName happy_var_1)- )}--happyReduce_106 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_106 = happyMonadReduce 2# 40# happyReduction_106-happyReduction_106 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut280 happy_x_2 of { (HappyWrap280 happy_var_2) -> - ( do { n <- mkTypeImpExp happy_var_2- ; return $ sLLa happy_var_1 (reLocN happy_var_2) (ImpExpQcType (glAA happy_var_1) n) })}})- ) (\r -> happyReturn (happyIn56 r))--happyReduce_107 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_107 = happySpecReduce_1 41# happyReduction_107-happyReduction_107 happy_x_1- = case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> - happyIn57- (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 happyOut281 happy_x_1 of { (HappyWrap281 happy_var_1) -> - happyIn57- (happy_var_1- )}--happyReduce_109 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_109 = happySpecReduce_2 42# happyReduction_109-happyReduction_109 happy_x_2- happy_x_1- = case happyOut58 happy_x_1 of { (HappyWrap58 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn58- (sLL happy_var_1 happy_var_2 $ if isZeroWidthSpan (gl happy_var_2) then (unLoc happy_var_1) else (AddSemiAnn (glAA happy_var_2) : (unLoc happy_var_1))- )}}--happyReduce_110 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_110 = happySpecReduce_1 42# happyReduction_110-happyReduction_110 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn58- (sL1 happy_var_1 $ msemi happy_var_1- )}--happyReduce_111 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_111 = happySpecReduce_2 43# happyReduction_111-happyReduction_111 happy_x_2- happy_x_1- = case happyOut59 happy_x_1 of { (HappyWrap59 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn59- (if isZeroWidthSpan (gl happy_var_2) then happy_var_1 else (AddSemiAnn (glAA happy_var_2) : happy_var_1)- )}}--happyReduce_112 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_112 = happySpecReduce_0 43# happyReduction_112-happyReduction_112 = happyIn59- ([]- )--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 happyOut61 happy_x_1 of { (HappyWrap61 happy_var_1) -> - case happyOut62 happy_x_2 of { (HappyWrap62 happy_var_2) -> - happyIn60- (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 = happyMonadReduce 3# 45# happyReduction_114-happyReduction_114 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut61 happy_x_1 of { (HappyWrap61 happy_var_1) -> - case happyOut62 happy_x_2 of { (HappyWrap62 happy_var_2) -> - case happyOut58 happy_x_3 of { (HappyWrap58 happy_var_3) -> - ( do { i <- amsAl happy_var_2 (comb2 (reLoc happy_var_2) happy_var_3) (reverse $ unLoc happy_var_3)- ; return (i : happy_var_1)})}}})- ) (\r -> happyReturn (happyIn61 r))--happyReduce_115 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_115 = happySpecReduce_0 45# happyReduction_115-happyReduction_115 = happyIn61- ([]- )--happyReduce_116 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_116 = happyMonadReduce 9# 46# happyReduction_116-happyReduction_116 (happy_x_9 `HappyStk`- happy_x_8 `HappyStk`- happy_x_7 `HappyStk`- happy_x_6 `HappyStk`- happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut63 happy_x_2 of { (HappyWrap63 happy_var_2) -> - case happyOut64 happy_x_3 of { (HappyWrap64 happy_var_3) -> - case happyOut66 happy_x_4 of { (HappyWrap66 happy_var_4) -> - case happyOut65 happy_x_5 of { (HappyWrap65 happy_var_5) -> - case happyOut316 happy_x_6 of { (HappyWrap316 happy_var_6) -> - case happyOut66 happy_x_7 of { (HappyWrap66 happy_var_7) -> - case happyOut67 happy_x_8 of { (HappyWrap67 happy_var_8) -> - case happyOut68 happy_x_9 of { (HappyWrap68 happy_var_9) -> - ( do {- ; let { ; mPreQual = unLoc happy_var_4- ; mPostQual = unLoc happy_var_7 }- ; checkImportDecl mPreQual mPostQual- ; let anns- = EpAnnImportDecl- { importDeclAnnImport = glAA happy_var_1- , importDeclAnnPragma = fst $ fst happy_var_2- , importDeclAnnSafe = fst happy_var_3- , importDeclAnnQualified = fst $ importDeclQualifiedStyle mPreQual mPostQual- , importDeclAnnPackage = fst happy_var_5- , importDeclAnnAs = fst happy_var_8- }- ; fmap reLocA $ acs (\cs -> L (comb5 happy_var_1 (reLoc happy_var_6) happy_var_7 (snd happy_var_8) happy_var_9) $- ImportDecl { ideclExt = XImportDeclPass (EpAnn (glR happy_var_1) anns cs) (snd $ fst happy_var_2) False- , ideclName = happy_var_6, ideclPkgQual = snd happy_var_5- , ideclSource = snd happy_var_2, ideclSafe = snd happy_var_3- , ideclQualified = snd $ importDeclQualifiedStyle mPreQual mPostQual- , ideclAs = unLoc (snd happy_var_8)- , ideclImportList = unLoc happy_var_9 })- })}}}}}}}}})- ) (\r -> happyReturn (happyIn62 r))--happyReduce_117 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_117 = happySpecReduce_2 47# happyReduction_117-happyReduction_117 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn63- (((Just (glAA happy_var_1,glAA happy_var_2),getSOURCE_PRAGs happy_var_1)- , IsBoot)- )}}--happyReduce_118 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_118 = happySpecReduce_0 47# happyReduction_118-happyReduction_118 = happyIn63- (((Nothing,NoSourceText),NotBoot)- )--happyReduce_119 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_119 = happySpecReduce_1 48# happyReduction_119-happyReduction_119 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn64- ((Just (glAA happy_var_1),True)- )}--happyReduce_120 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_120 = happySpecReduce_0 48# happyReduction_120-happyReduction_120 = happyIn64- ((Nothing, False)- )--happyReduce_121 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_121 = happyMonadReduce 1# 49# happyReduction_121-happyReduction_121 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - ( do { let { pkgFS = getSTRING happy_var_1 }- ; unless (looksLikePackageName (unpackFS pkgFS)) $- addError $ mkPlainErrorMsgEnvelope (getLoc happy_var_1) $- (PsErrInvalidPackageName pkgFS)- ; return (Just (glAA happy_var_1), RawPkgQual (StringLiteral (getSTRINGs happy_var_1) pkgFS Nothing)) })})- ) (\r -> happyReturn (happyIn65 r))--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- ((Nothing,NoRawPkgQual)- )--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- (sL1 happy_var_1 (Just (glAA happy_var_1))- )}--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- (noLoc Nothing- )--happyReduce_125 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_125 = happySpecReduce_2 51# happyReduction_125-happyReduction_125 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut316 happy_x_2 of { (HappyWrap316 happy_var_2) -> - happyIn67- ((Just (glAA happy_var_1)- ,sLL happy_var_1 (reLoc happy_var_2) (Just happy_var_2))- )}}--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,noLoc Nothing)- )--happyReduce_127 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_127 = happyMonadReduce 1# 52# happyReduction_127-happyReduction_127 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut69 happy_x_1 of { (HappyWrap69 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 (happyIn68 r))--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- (noLoc Nothing- )--happyReduce_129 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_129 = happyMonadReduce 3# 53# happyReduction_129-happyReduction_129 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut49 happy_x_2 of { (HappyWrap49 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( do { es <- amsrl (sLL happy_var_1 happy_var_3 $ fromOL $ snd happy_var_2)- (AnnList Nothing (Just $ mop happy_var_1) (Just $ mcp happy_var_3) (fst happy_var_2) [])- ; return $ sLL happy_var_1 happy_var_3 (Exactly, es)})}}})- ) (\r -> happyReturn (happyIn69 r))--happyReduce_130 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_130 = happyMonadReduce 4# 53# happyReduction_130-happyReduction_130 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut49 happy_x_3 of { (HappyWrap49 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - ( do { es <- amsrl (sLL happy_var_1 happy_var_4 $ fromOL $ snd happy_var_3)- (AnnList Nothing (Just $ mop happy_var_2) (Just $ mcp happy_var_4) (mj AnnHiding happy_var_1:fst happy_var_3) [])- ; return $ sLL happy_var_1 happy_var_4 (EverythingBut, es)})}}}})- ) (\r -> happyReturn (happyIn69 r))--happyReduce_131 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_131 = happySpecReduce_0 54# happyReduction_131-happyReduction_131 = happyIn70- (Nothing- )--happyReduce_132 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_132 = happySpecReduce_1 54# happyReduction_132-happyReduction_132 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn70- (Just (sL1 happy_var_1 (getINTEGERs happy_var_1,fromInteger (il_value (getINTEGER happy_var_1))))- )}--happyReduce_133 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_133 = happySpecReduce_1 55# happyReduction_133-happyReduction_133 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn71- (sL1 happy_var_1 InfixN- )}--happyReduce_134 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_134 = happySpecReduce_1 55# happyReduction_134-happyReduction_134 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn71- (sL1 happy_var_1 InfixL- )}--happyReduce_135 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_135 = happySpecReduce_1 55# happyReduction_135-happyReduction_135 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn71- (sL1 happy_var_1 InfixR- )}--happyReduce_136 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_136 = happyMonadReduce 3# 56# happyReduction_136-happyReduction_136 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut72 happy_x_1 of { (HappyWrap72 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut288 happy_x_3 of { (HappyWrap288 happy_var_3) -> - ( case (unLoc happy_var_1) of- SnocOL hs t -> do- t' <- addTrailingCommaN t (gl happy_var_2)- return (sLL happy_var_1 (reLocN happy_var_3) (snocOL hs t' `appOL` unitOL happy_var_3)))}}})- ) (\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 56# happyReduction_137-happyReduction_137 happy_x_1- = case happyOut288 happy_x_1 of { (HappyWrap288 happy_var_1) -> - happyIn72- (sL1N happy_var_1 (unitOL happy_var_1)- )}--happyReduce_138 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_138 = happySpecReduce_2 57# happyReduction_138-happyReduction_138 happy_x_2- happy_x_1- = case happyOut74 happy_x_1 of { (HappyWrap74 happy_var_1) -> - case happyOut78 happy_x_2 of { (HappyWrap78 happy_var_2) -> - happyIn73- (happy_var_1 `snocOL` happy_var_2- )}}--happyReduce_139 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_139 = happyMonadReduce 3# 58# happyReduction_139-happyReduction_139 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut74 happy_x_1 of { (HappyWrap74 happy_var_1) -> - case happyOut78 happy_x_2 of { (HappyWrap78 happy_var_2) -> - case happyOut58 happy_x_3 of { (HappyWrap58 happy_var_3) -> - ( do { t <- amsAl happy_var_2 (comb2 (reLoc happy_var_2) happy_var_3) (reverse $ unLoc happy_var_3)- ; return (happy_var_1 `snocOL` t) })}}})- ) (\r -> happyReturn (happyIn74 r))--happyReduce_140 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_140 = happySpecReduce_0 58# happyReduction_140-happyReduction_140 = happyIn74- (nilOL- )--happyReduce_141 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_141 = happySpecReduce_2 59# happyReduction_141-happyReduction_141 happy_x_2- happy_x_1- = case happyOut76 happy_x_1 of { (HappyWrap76 happy_var_1) -> - case happyOut77 happy_x_2 of { (HappyWrap77 happy_var_2) -> - happyIn75- (happy_var_1 `snocOL` happy_var_2- )}}--happyReduce_142 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_142 = happyMonadReduce 3# 60# happyReduction_142-happyReduction_142 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut76 happy_x_1 of { (HappyWrap76 happy_var_1) -> - case happyOut77 happy_x_2 of { (HappyWrap77 happy_var_2) -> - case happyOut58 happy_x_3 of { (HappyWrap58 happy_var_3) -> - ( do { t <- amsAl happy_var_2 (comb2 (reLoc happy_var_2) happy_var_3) (reverse $ unLoc happy_var_3)- ; return (happy_var_1 `snocOL` t) })}}})- ) (\r -> happyReturn (happyIn76 r))--happyReduce_143 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_143 = happySpecReduce_0 60# happyReduction_143-happyReduction_143 = happyIn76- (nilOL- )--happyReduce_144 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_144 = happyMonadReduce 1# 61# happyReduction_144-happyReduction_144 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut78 happy_x_1 of { (HappyWrap78 happy_var_1) -> - ( commentsPA happy_var_1)})- ) (\r -> happyReturn (happyIn77 r))--happyReduce_145 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_145 = happySpecReduce_1 62# happyReduction_145-happyReduction_145 happy_x_1- = case happyOut79 happy_x_1 of { (HappyWrap79 happy_var_1) -> - happyIn78- (sL1 happy_var_1 (TyClD noExtField (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 62# happyReduction_146-happyReduction_146 happy_x_1- = case happyOut80 happy_x_1 of { (HappyWrap80 happy_var_1) -> - happyIn78- (sL1 happy_var_1 (TyClD noExtField (unLoc happy_var_1))- )}--happyReduce_147 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_147 = happySpecReduce_1 62# happyReduction_147-happyReduction_147 happy_x_1- = case happyOut81 happy_x_1 of { (HappyWrap81 happy_var_1) -> - happyIn78- (sL1 happy_var_1 (KindSigD noExtField (unLoc happy_var_1))- )}--happyReduce_148 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_148 = happySpecReduce_1 62# happyReduction_148-happyReduction_148 happy_x_1- = case happyOut83 happy_x_1 of { (HappyWrap83 happy_var_1) -> - happyIn78- (sL1 happy_var_1 (InstD noExtField (unLoc happy_var_1))- )}--happyReduce_149 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_149 = happySpecReduce_1 62# happyReduction_149-happyReduction_149 happy_x_1- = case happyOut108 happy_x_1 of { (HappyWrap108 happy_var_1) -> - happyIn78- (sL1 happy_var_1 (DerivD noExtField (unLoc happy_var_1))- )}--happyReduce_150 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_150 = happySpecReduce_1 62# happyReduction_150-happyReduction_150 happy_x_1- = case happyOut109 happy_x_1 of { (HappyWrap109 happy_var_1) -> - happyIn78- (sL1 happy_var_1 (RoleAnnotD noExtField (unLoc happy_var_1))- )}--happyReduce_151 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_151 = happyMonadReduce 4# 62# happyReduction_151-happyReduction_151 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut172 happy_x_3 of { (HappyWrap172 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_4- (DefD noExtField (DefaultDecl (EpAnn (glR happy_var_1) [mj AnnDefault happy_var_1,mop happy_var_2,mcp happy_var_4] cs) happy_var_3))))}}}})- ) (\r -> happyReturn (happyIn78 r))--happyReduce_152 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_152 = happyMonadReduce 2# 62# happyReduction_152-happyReduction_152 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut147 happy_x_2 of { (HappyWrap147 happy_var_2) -> - ( acsA (\cs -> sLL happy_var_1 happy_var_2 ((snd $ unLoc happy_var_2) (EpAnn (glR happy_var_1) (mj AnnForeign happy_var_1:(fst $ unLoc happy_var_2)) cs))))}})- ) (\r -> happyReturn (happyIn78 r))--happyReduce_153 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_153 = happyMonadReduce 3# 62# 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 happyOut142 happy_x_2 of { (HappyWrap142 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ WarningD noExtField (Warnings ((EpAnn (glR happy_var_1) [mo happy_var_1,mc happy_var_3] cs), (getDEPRECATED_PRAGs happy_var_1)) (fromOL happy_var_2))))}}})- ) (\r -> happyReturn (happyIn78 r))--happyReduce_154 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_154 = happyMonadReduce 3# 62# 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 happyOut140 happy_x_2 of { (HappyWrap140 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ WarningD noExtField (Warnings ((EpAnn (glR happy_var_1) [mo happy_var_1,mc happy_var_3] cs), (getWARNING_PRAGs happy_var_1)) (fromOL happy_var_2))))}}})- ) (\r -> happyReturn (happyIn78 r))--happyReduce_155 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_155 = happyMonadReduce 3# 62# happyReduction_155-happyReduction_155 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut132 happy_x_2 of { (HappyWrap132 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ RuleD noExtField (HsRules ((EpAnn (glR happy_var_1) [mo happy_var_1,mc happy_var_3] cs), (getRULES_PRAGs happy_var_1)) (reverse happy_var_2))))}}})- ) (\r -> happyReturn (happyIn78 r))--happyReduce_156 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_156 = happySpecReduce_1 62# happyReduction_156-happyReduction_156 happy_x_1- = case happyOut146 happy_x_1 of { (HappyWrap146 happy_var_1) -> - happyIn78- (happy_var_1- )}--happyReduce_157 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_157 = happySpecReduce_1 62# happyReduction_157-happyReduction_157 happy_x_1- = case happyOut198 happy_x_1 of { (HappyWrap198 happy_var_1) -> - happyIn78- (happy_var_1- )}--happyReduce_158 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_158 = happyMonadReduce 1# 62# happyReduction_158-happyReduction_158 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> - ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->- do { d <- mkSpliceDecl happy_var_1- ; commentsPA d })})- ) (\r -> happyReturn (happyIn78 r))--happyReduce_159 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_159 = happyMonadReduce 4# 63# happyReduction_159-happyReduction_159 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut105 happy_x_2 of { (HappyWrap105 happy_var_2) -> - case happyOut178 happy_x_3 of { (HappyWrap178 happy_var_3) -> - case happyOut123 happy_x_4 of { (HappyWrap123 happy_var_4) -> - ( (mkClassDecl (comb4 happy_var_1 happy_var_2 happy_var_3 happy_var_4) happy_var_2 happy_var_3 (sndOf3 $ unLoc happy_var_4) (thdOf3 $ unLoc happy_var_4))- (mj AnnClass happy_var_1:(fst $ unLoc happy_var_3)++(fstOf3 $ unLoc happy_var_4)))}}}})- ) (\r -> happyReturn (happyIn79 r))--happyReduce_160 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_160 = happyMonadReduce 4# 64# happyReduction_160-happyReduction_160 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut162 happy_x_2 of { (HappyWrap162 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut159 happy_x_4 of { (HappyWrap159 happy_var_4) -> - ( mkTySynonym (comb2A happy_var_1 happy_var_4) happy_var_2 happy_var_4 [mj AnnType happy_var_1,mj AnnEqual happy_var_3])}}}})- ) (\r -> happyReturn (happyIn80 r))--happyReduce_161 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_161 = happyMonadReduce 6# 64# happyReduction_161-happyReduction_161 (happy_x_6 `HappyStk`- happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut162 happy_x_3 of { (HappyWrap162 happy_var_3) -> - case happyOut103 happy_x_4 of { (HappyWrap103 happy_var_4) -> - case happyOut88 happy_x_5 of { (HappyWrap88 happy_var_5) -> - case happyOut91 happy_x_6 of { (HappyWrap91 happy_var_6) -> - ( mkFamDecl (comb5 happy_var_1 (reLoc happy_var_3) happy_var_4 happy_var_5 happy_var_6) (snd $ unLoc happy_var_6) TopLevel 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 (happyIn80 r))--happyReduce_162 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_162 = happyMonadReduce 5# 64# happyReduction_162-happyReduction_162 (happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut99 happy_x_1 of { (HappyWrap99 happy_var_1) -> - case happyOut107 happy_x_2 of { (HappyWrap107 happy_var_2) -> - case happyOut105 happy_x_3 of { (HappyWrap105 happy_var_3) -> - case happyOut186 happy_x_4 of { (HappyWrap186 happy_var_4) -> - case happyOut194 happy_x_5 of { (HappyWrap194 happy_var_5) -> - ( mkTyData (comb4 happy_var_1 happy_var_3 happy_var_4 happy_var_5) (sndOf3 $ unLoc happy_var_1) (thdOf3 $ unLoc happy_var_1) happy_var_2 happy_var_3- Nothing (reverse (snd $ unLoc happy_var_4))- (fmap reverse happy_var_5)- ((fstOf3 $ unLoc happy_var_1)++(fst $ unLoc happy_var_4)))}}}}})- ) (\r -> happyReturn (happyIn80 r))--happyReduce_163 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_163 = happyMonadReduce 6# 64# happyReduction_163-happyReduction_163 (happy_x_6 `HappyStk`- happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut99 happy_x_1 of { (HappyWrap99 happy_var_1) -> - case happyOut107 happy_x_2 of { (HappyWrap107 happy_var_2) -> - case happyOut105 happy_x_3 of { (HappyWrap105 happy_var_3) -> - case happyOut101 happy_x_4 of { (HappyWrap101 happy_var_4) -> - case happyOut183 happy_x_5 of { (HappyWrap183 happy_var_5) -> - case happyOut194 happy_x_6 of { (HappyWrap194 happy_var_6) -> - ( mkTyData (comb4 happy_var_1 happy_var_3 happy_var_5 happy_var_6) (sndOf3 $ unLoc happy_var_1) (thdOf3 $ 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)- ((fstOf3 $ unLoc happy_var_1)++(fst $ unLoc happy_var_4)++(fst $ unLoc happy_var_5)))}}}}}})- ) (\r -> happyReturn (happyIn80 r))--happyReduce_164 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_164 = happyMonadReduce 4# 64# happyReduction_164-happyReduction_164 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut162 happy_x_3 of { (HappyWrap162 happy_var_3) -> - case happyOut102 happy_x_4 of { (HappyWrap102 happy_var_4) -> - ( mkFamDecl (comb3 happy_var_1 happy_var_2 happy_var_4) DataFamily TopLevel 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 (happyIn80 r))--happyReduce_165 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_165 = happyMonadReduce 4# 65# 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 happyOut82 happy_x_2 of { (HappyWrap82 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut153 happy_x_4 of { (HappyWrap153 happy_var_4) -> - ( mkStandaloneKindSig (comb2A happy_var_1 happy_var_4) (L (gl happy_var_2) $ unLoc happy_var_2) happy_var_4- [mj AnnType happy_var_1,mu AnnDcolon happy_var_3])}}}})- ) (\r -> happyReturn (happyIn81 r))--happyReduce_166 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_166 = happyMonadReduce 3# 66# happyReduction_166-happyReduction_166 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut82 happy_x_1 of { (HappyWrap82 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut280 happy_x_3 of { (HappyWrap280 happy_var_3) -> - ( case unLoc happy_var_1 of- (h:t) -> do- h' <- addTrailingCommaN h (gl happy_var_2)- return (sLL happy_var_1 (reLocN happy_var_3) (happy_var_3 : h' : t)))}}})- ) (\r -> happyReturn (happyIn82 r))--happyReduce_167 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_167 = happySpecReduce_1 66# happyReduction_167-happyReduction_167 happy_x_1- = case happyOut280 happy_x_1 of { (HappyWrap280 happy_var_1) -> - happyIn82- (sL1N happy_var_1 [happy_var_1]- )}--happyReduce_168 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_168 = happyMonadReduce 4# 67# happyReduction_168-happyReduction_168 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut84 happy_x_2 of { (HappyWrap84 happy_var_2) -> - case happyOut170 happy_x_3 of { (HappyWrap170 happy_var_3) -> - case happyOut127 happy_x_4 of { (HappyWrap127 happy_var_4) -> - ( do { (binds, sigs, _, ats, adts, _) <- cvBindsAndSigs (snd $ unLoc happy_var_4)- ; let anns = (mj AnnInstance happy_var_1 : (fst $ unLoc happy_var_4))- ; let cid cs = ClsInstDecl- { cid_ext = (EpAnn (glR happy_var_1) anns cs, NoAnnSortKey)- , 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 }- ; acsA (\cs -> L (comb3 happy_var_1 (reLoc happy_var_3) happy_var_4)- (ClsInstD { cid_d_ext = noExtField, cid_inst = cid cs }))- })}}}})- ) (\r -> happyReturn (happyIn83 r))--happyReduce_169 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_169 = happyMonadReduce 3# 67# happyReduction_169-happyReduction_169 (happy_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 happyOut94 happy_x_3 of { (HappyWrap94 happy_var_3) -> - ( mkTyFamInst (comb2A happy_var_1 happy_var_3) (unLoc happy_var_3)- (mj AnnType happy_var_1:mj AnnInstance happy_var_2:[]))}}})- ) (\r -> happyReturn (happyIn83 r))--happyReduce_170 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_170 = happyMonadReduce 6# 67# happyReduction_170-happyReduction_170 (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 happyOut100 happy_x_1 of { (HappyWrap100 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut107 happy_x_3 of { (HappyWrap107 happy_var_3) -> - case happyOut106 happy_x_4 of { (HappyWrap106 happy_var_4) -> - case happyOut186 happy_x_5 of { (HappyWrap186 happy_var_5) -> - case happyOut194 happy_x_6 of { (HappyWrap194 happy_var_6) -> - ( mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_5 happy_var_6) (snd $ unLoc happy_var_1) happy_var_3 (unLoc happy_var_4)- Nothing (reverse (snd $ unLoc happy_var_5))- (fmap reverse happy_var_6)- ((fst $ unLoc happy_var_1):mj AnnInstance happy_var_2:(fst $ unLoc happy_var_5)))}}}}}})- ) (\r -> happyReturn (happyIn83 r))--happyReduce_171 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_171 = happyMonadReduce 7# 67# happyReduction_171-happyReduction_171 (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 happyOut100 happy_x_1 of { (HappyWrap100 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut107 happy_x_3 of { (HappyWrap107 happy_var_3) -> - case happyOut106 happy_x_4 of { (HappyWrap106 happy_var_4) -> - case happyOut101 happy_x_5 of { (HappyWrap101 happy_var_5) -> - case happyOut183 happy_x_6 of { (HappyWrap183 happy_var_6) -> - case happyOut194 happy_x_7 of { (HappyWrap194 happy_var_7) -> - ( mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_6 happy_var_7) (snd $ unLoc happy_var_1) happy_var_3 (unLoc happy_var_4)- (snd $ unLoc happy_var_5) (snd $ unLoc happy_var_6)- (fmap reverse happy_var_7)- ((fst $ unLoc happy_var_1):mj AnnInstance happy_var_2- :(fst $ unLoc happy_var_5)++(fst $ unLoc happy_var_6)))}}}}}}})- ) (\r -> happyReturn (happyIn83 r))--happyReduce_172 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_172 = happyMonadReduce 2# 68# happyReduction_172-happyReduction_172 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( fmap Just $ amsrp (sLL happy_var_1 happy_var_2 (Overlappable (getOVERLAPPABLE_PRAGs happy_var_1)))- (AnnPragma (mo happy_var_1) (mc happy_var_2) []))}})- ) (\r -> happyReturn (happyIn84 r))--happyReduce_173 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_173 = happyMonadReduce 2# 68# happyReduction_173-happyReduction_173 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( fmap Just $ amsrp (sLL happy_var_1 happy_var_2 (Overlapping (getOVERLAPPING_PRAGs happy_var_1)))- (AnnPragma (mo happy_var_1) (mc happy_var_2) []))}})- ) (\r -> happyReturn (happyIn84 r))--happyReduce_174 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_174 = happyMonadReduce 2# 68# happyReduction_174-happyReduction_174 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( fmap Just $ amsrp (sLL happy_var_1 happy_var_2 (Overlaps (getOVERLAPS_PRAGs happy_var_1)))- (AnnPragma (mo happy_var_1) (mc happy_var_2) []))}})- ) (\r -> happyReturn (happyIn84 r))--happyReduce_175 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_175 = happyMonadReduce 2# 68# 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 -> - ( fmap Just $ amsrp (sLL happy_var_1 happy_var_2 (Incoherent (getINCOHERENT_PRAGs happy_var_1)))- (AnnPragma (mo happy_var_1) (mc happy_var_2) []))}})- ) (\r -> happyReturn (happyIn84 r))--happyReduce_176 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_176 = happySpecReduce_0 68# happyReduction_176-happyReduction_176 = happyIn84- (Nothing- )--happyReduce_177 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_177 = happyMonadReduce 1# 69# happyReduction_177-happyReduction_177 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - ( acsA (\cs -> sL1 happy_var_1 (StockStrategy (EpAnn (glR happy_var_1) [mj AnnStock happy_var_1] cs))))})- ) (\r -> happyReturn (happyIn85 r))--happyReduce_178 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_178 = happyMonadReduce 1# 69# happyReduction_178-happyReduction_178 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - ( acsA (\cs -> sL1 happy_var_1 (AnyclassStrategy (EpAnn (glR happy_var_1) [mj AnnAnyclass happy_var_1] cs))))})- ) (\r -> happyReturn (happyIn85 r))--happyReduce_179 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_179 = happyMonadReduce 1# 69# happyReduction_179-happyReduction_179 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - ( acsA (\cs -> sL1 happy_var_1 (NewtypeStrategy (EpAnn (glR happy_var_1) [mj AnnNewtype happy_var_1] cs))))})- ) (\r -> happyReturn (happyIn85 r))--happyReduce_180 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_180 = happyMonadReduce 2# 70# happyReduction_180-happyReduction_180 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut153 happy_x_2 of { (HappyWrap153 happy_var_2) -> - ( acsA (\cs -> sLLlA happy_var_1 happy_var_2 (ViaStrategy (XViaStrategyPs (EpAnn (glR happy_var_1) [mj AnnVia happy_var_1] cs)- happy_var_2))))}})- ) (\r -> happyReturn (happyIn86 r))--happyReduce_181 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_181 = happyMonadReduce 1# 71# happyReduction_181-happyReduction_181 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - ( fmap Just $ acsA (\cs -> sL1 happy_var_1 (StockStrategy (EpAnn (glR happy_var_1) [mj AnnStock happy_var_1] cs))))})- ) (\r -> happyReturn (happyIn87 r))--happyReduce_182 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_182 = happyMonadReduce 1# 71# happyReduction_182-happyReduction_182 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - ( fmap Just $ acsA (\cs -> sL1 happy_var_1 (AnyclassStrategy (EpAnn (glR happy_var_1) [mj AnnAnyclass happy_var_1] cs))))})- ) (\r -> happyReturn (happyIn87 r))--happyReduce_183 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_183 = happyMonadReduce 1# 71# happyReduction_183-happyReduction_183 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - ( fmap Just $ acsA (\cs -> sL1 happy_var_1 (NewtypeStrategy (EpAnn (glR happy_var_1) [mj AnnNewtype happy_var_1] cs))))})- ) (\r -> happyReturn (happyIn87 r))--happyReduce_184 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_184 = happySpecReduce_1 71# happyReduction_184-happyReduction_184 happy_x_1- = case happyOut86 happy_x_1 of { (HappyWrap86 happy_var_1) -> - happyIn87- (Just happy_var_1- )}--happyReduce_185 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_185 = happySpecReduce_0 71# happyReduction_185-happyReduction_185 = happyIn87- (Nothing- )--happyReduce_186 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_186 = happySpecReduce_0 72# happyReduction_186-happyReduction_186 = happyIn88- (noLoc ([], Nothing)- )--happyReduce_187 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_187 = happySpecReduce_2 72# happyReduction_187-happyReduction_187 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut89 happy_x_2 of { (HappyWrap89 happy_var_2) -> - happyIn88- (sLL happy_var_1 (reLoc happy_var_2) ([mj AnnVbar happy_var_1]- , Just (happy_var_2))- )}}--happyReduce_188 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_188 = happyMonadReduce 3# 73# happyReduction_188-happyReduction_188 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut297 happy_x_1 of { (HappyWrap297 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut90 happy_x_3 of { (HappyWrap90 happy_var_3) -> - ( acsA (\cs -> sLL (reLocN happy_var_1) happy_var_3 (InjectivityAnn (EpAnn (glNR happy_var_1) [mu AnnRarrow happy_var_2] cs) happy_var_1 (reverse (unLoc happy_var_3)))))}}})- ) (\r -> happyReturn (happyIn89 r))--happyReduce_189 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_189 = happySpecReduce_2 74# happyReduction_189-happyReduction_189 happy_x_2- happy_x_1- = case happyOut90 happy_x_1 of { (HappyWrap90 happy_var_1) -> - case happyOut297 happy_x_2 of { (HappyWrap297 happy_var_2) -> - happyIn90- (sLL happy_var_1 (reLocN happy_var_2) (happy_var_2 : unLoc happy_var_1)- )}}--happyReduce_190 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_190 = happySpecReduce_1 74# happyReduction_190-happyReduction_190 happy_x_1- = case happyOut297 happy_x_1 of { (HappyWrap297 happy_var_1) -> - happyIn90- (sL1N happy_var_1 [happy_var_1]- )}--happyReduce_191 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_191 = happySpecReduce_0 75# happyReduction_191-happyReduction_191 = happyIn91- (noLoc ([],OpenTypeFamily)- )--happyReduce_192 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_192 = happySpecReduce_2 75# happyReduction_192-happyReduction_192 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut92 happy_x_2 of { (HappyWrap92 happy_var_2) -> - happyIn91- (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_193 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_193 = happySpecReduce_3 76# happyReduction_193-happyReduction_193 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut93 happy_x_2 of { (HappyWrap93 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn92- (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mcc happy_var_3]- ,Just (unLoc happy_var_2))- )}}}--happyReduce_194 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_194 = happySpecReduce_3 76# happyReduction_194-happyReduction_194 happy_x_3- happy_x_2- happy_x_1- = case happyOut93 happy_x_2 of { (HappyWrap93 happy_var_2) -> - happyIn92- (let (L loc _) = happy_var_2 in- L loc ([],Just (unLoc happy_var_2))- )}--happyReduce_195 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_195 = happySpecReduce_3 76# happyReduction_195-happyReduction_195 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 -> - happyIn92- (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mj AnnDotdot happy_var_2- ,mcc happy_var_3],Nothing)- )}}}--happyReduce_196 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_196 = happySpecReduce_3 76# happyReduction_196-happyReduction_196 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn92- (let (L loc _) = happy_var_2 in- L loc ([mj AnnDotdot happy_var_2],Nothing)- )}--happyReduce_197 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_197 = happyMonadReduce 3# 77# happyReduction_197-happyReduction_197 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut93 happy_x_1 of { (HappyWrap93 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut94 happy_x_3 of { (HappyWrap94 happy_var_3) -> - ( let (L loc eqn) = happy_var_3 in- case unLoc happy_var_1 of- [] -> return (sLLlA happy_var_1 happy_var_3 (L loc eqn : unLoc happy_var_1))- (h:t) -> do- h' <- addTrailingSemiA h (gl happy_var_2)- return (sLLlA happy_var_1 happy_var_3 (happy_var_3 : h' : t)))}}})- ) (\r -> happyReturn (happyIn93 r))--happyReduce_198 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_198 = happyMonadReduce 2# 77# happyReduction_198-happyReduction_198 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut93 happy_x_1 of { (HappyWrap93 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( case unLoc happy_var_1 of- [] -> return (sLL happy_var_1 happy_var_2 (unLoc happy_var_1))- (h:t) -> do- h' <- addTrailingSemiA h (gl happy_var_2)- return (sLL happy_var_1 happy_var_2 (h':t)))}})- ) (\r -> happyReturn (happyIn93 r))--happyReduce_199 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_199 = happySpecReduce_1 77# happyReduction_199-happyReduction_199 happy_x_1- = case happyOut94 happy_x_1 of { (HappyWrap94 happy_var_1) -> - happyIn93- (sLLAA happy_var_1 happy_var_1 [happy_var_1]- )}--happyReduce_200 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_200 = happySpecReduce_0 77# happyReduction_200-happyReduction_200 = happyIn93- (noLoc []- )--happyReduce_201 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_201 = happyMonadReduce 6# 78# happyReduction_201-happyReduction_201 (happy_x_6 `HappyStk`- happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut162 happy_x_4 of { (HappyWrap162 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - case happyOut159 happy_x_6 of { (HappyWrap159 happy_var_6) -> - ( do { hintExplicitForall happy_var_1- ; tvbs <- fromSpecTyVarBndrs happy_var_2- ; let loc = comb2A happy_var_1 happy_var_6- ; cs <- getCommentsFor loc- ; mkTyFamInstEqn loc (mkHsOuterExplicit (EpAnn (glR happy_var_1) (mu AnnForall happy_var_1, mj AnnDot happy_var_3) cs) tvbs) happy_var_4 happy_var_6 [mj AnnEqual happy_var_5] })}}}}}})- ) (\r -> happyReturn (happyIn94 r))--happyReduce_202 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_202 = happyMonadReduce 3# 78# happyReduction_202-happyReduction_202 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut162 happy_x_1 of { (HappyWrap162 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut159 happy_x_3 of { (HappyWrap159 happy_var_3) -> - ( mkTyFamInstEqn (comb2A (reLoc happy_var_1) happy_var_3) mkHsOuterImplicit happy_var_1 happy_var_3 (mj AnnEqual happy_var_2:[]))}}})- ) (\r -> happyReturn (happyIn94 r))--happyReduce_203 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_203 = happyMonadReduce 4# 79# happyReduction_203-happyReduction_203 (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 happyOut96 happy_x_2 of { (HappyWrap96 happy_var_2) -> - case happyOut162 happy_x_3 of { (HappyWrap162 happy_var_3) -> - case happyOut102 happy_x_4 of { (HappyWrap102 happy_var_4) -> - ( liftM mkTyClD (mkFamDecl (comb3 happy_var_1 (reLoc happy_var_3) happy_var_4) DataFamily NotTopLevel happy_var_3- (snd $ unLoc happy_var_4) Nothing- (mj AnnData happy_var_1:happy_var_2++(fst $ unLoc happy_var_4))))}}}})- ) (\r -> happyReturn (happyIn95 r))--happyReduce_204 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_204 = happyMonadReduce 3# 79# 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 happyOut162 happy_x_2 of { (HappyWrap162 happy_var_2) -> - case happyOut104 happy_x_3 of { (HappyWrap104 happy_var_3) -> - ( liftM mkTyClD- (mkFamDecl (comb3 happy_var_1 (reLoc happy_var_2) happy_var_3) OpenTypeFamily NotTopLevel 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 (happyIn95 r))--happyReduce_205 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_205 = happyMonadReduce 4# 79# happyReduction_205-happyReduction_205 (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 { (HappyWrap162 happy_var_3) -> - case happyOut104 happy_x_4 of { (HappyWrap104 happy_var_4) -> - ( liftM mkTyClD- (mkFamDecl (comb3 happy_var_1 (reLoc happy_var_3) happy_var_4) OpenTypeFamily NotTopLevel 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 (happyIn95 r))--happyReduce_206 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_206 = happyMonadReduce 2# 79# happyReduction_206-happyReduction_206 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut94 happy_x_2 of { (HappyWrap94 happy_var_2) -> - ( liftM mkInstD (mkTyFamInst (comb2A happy_var_1 happy_var_2) (unLoc happy_var_2)- [mj AnnType happy_var_1]))}})- ) (\r -> happyReturn (happyIn95 r))--happyReduce_207 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_207 = happyMonadReduce 3# 79# happyReduction_207-happyReduction_207 (happy_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 happyOut94 happy_x_3 of { (HappyWrap94 happy_var_3) -> - ( liftM mkInstD (mkTyFamInst (comb2A happy_var_1 happy_var_3) (unLoc happy_var_3)- (mj AnnType happy_var_1:mj AnnInstance happy_var_2:[]) ))}}})- ) (\r -> happyReturn (happyIn95 r))--happyReduce_208 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_208 = happySpecReduce_0 80# happyReduction_208-happyReduction_208 = happyIn96- ([]- )--happyReduce_209 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_209 = happySpecReduce_1 80# happyReduction_209-happyReduction_209 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn96- ([mj AnnFamily happy_var_1]- )}--happyReduce_210 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_210 = happySpecReduce_0 81# happyReduction_210-happyReduction_210 = happyIn97- ([]- )--happyReduce_211 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_211 = happySpecReduce_1 81# happyReduction_211-happyReduction_211 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn97- ([mj AnnInstance happy_var_1]- )}--happyReduce_212 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_212 = happyMonadReduce 3# 82# happyReduction_212-happyReduction_212 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut97 happy_x_2 of { (HappyWrap97 happy_var_2) -> - case happyOut94 happy_x_3 of { (HappyWrap94 happy_var_3) -> - ( mkTyFamInst (comb2A happy_var_1 happy_var_3) (unLoc happy_var_3)- (mj AnnType happy_var_1:happy_var_2))}}})- ) (\r -> happyReturn (happyIn98 r))--happyReduce_213 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_213 = happyMonadReduce 6# 82# happyReduction_213-happyReduction_213 (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 happyOut100 happy_x_1 of { (HappyWrap100 happy_var_1) -> - case happyOut97 happy_x_2 of { (HappyWrap97 happy_var_2) -> - case happyOut107 happy_x_3 of { (HappyWrap107 happy_var_3) -> - case happyOut106 happy_x_4 of { (HappyWrap106 happy_var_4) -> - case happyOut186 happy_x_5 of { (HappyWrap186 happy_var_5) -> - case happyOut194 happy_x_6 of { (HappyWrap194 happy_var_6) -> - ( mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_5 happy_var_6) (snd $ unLoc happy_var_1) happy_var_3 (unLoc happy_var_4)- Nothing (reverse (snd $ unLoc happy_var_5))- (fmap reverse happy_var_6)- ((fst $ unLoc happy_var_1):happy_var_2++(fst $ unLoc happy_var_5)))}}}}}})- ) (\r -> happyReturn (happyIn98 r))--happyReduce_214 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_214 = happyMonadReduce 7# 82# happyReduction_214-happyReduction_214 (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 happyOut100 happy_x_1 of { (HappyWrap100 happy_var_1) -> - case happyOut97 happy_x_2 of { (HappyWrap97 happy_var_2) -> - case happyOut107 happy_x_3 of { (HappyWrap107 happy_var_3) -> - case happyOut106 happy_x_4 of { (HappyWrap106 happy_var_4) -> - case happyOut101 happy_x_5 of { (HappyWrap101 happy_var_5) -> - case happyOut183 happy_x_6 of { (HappyWrap183 happy_var_6) -> - case happyOut194 happy_x_7 of { (HappyWrap194 happy_var_7) -> - ( mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_6 happy_var_7) (snd $ unLoc happy_var_1) happy_var_3- (unLoc happy_var_4) (snd $ unLoc happy_var_5) (snd $ unLoc happy_var_6)- (fmap reverse happy_var_7)- ((fst $ unLoc happy_var_1):happy_var_2++(fst $ unLoc happy_var_5)++(fst $ unLoc happy_var_6)))}}}}}}})- ) (\r -> happyReturn (happyIn98 r))--happyReduce_215 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_215 = happySpecReduce_1 83# happyReduction_215-happyReduction_215 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn99- (sL1 happy_var_1 ([mj AnnData happy_var_1], False,DataType)- )}--happyReduce_216 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_216 = happySpecReduce_1 83# happyReduction_216-happyReduction_216 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn99- (sL1 happy_var_1 ([mj AnnNewtype happy_var_1], False,NewType)- )}--happyReduce_217 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_217 = happySpecReduce_2 83# happyReduction_217-happyReduction_217 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn99- (sL1 happy_var_1 ([mj AnnType happy_var_1, mj AnnData happy_var_2],True ,DataType)- )}}--happyReduce_218 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_218 = happySpecReduce_1 84# happyReduction_218-happyReduction_218 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn100- (sL1 happy_var_1 (mj AnnData happy_var_1,DataType)- )}--happyReduce_219 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_219 = happySpecReduce_1 84# happyReduction_219-happyReduction_219 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn100- (sL1 happy_var_1 (mj AnnNewtype happy_var_1,NewType)- )}--happyReduce_220 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_220 = happySpecReduce_0 85# happyReduction_220-happyReduction_220 = happyIn101- (noLoc ([] , Nothing)- )--happyReduce_221 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_221 = happySpecReduce_2 85# happyReduction_221-happyReduction_221 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut182 happy_x_2 of { (HappyWrap182 happy_var_2) -> - happyIn101- (sLL happy_var_1 (reLoc happy_var_2) ([mu AnnDcolon happy_var_1], Just happy_var_2)- )}}--happyReduce_222 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_222 = happySpecReduce_0 86# happyReduction_222-happyReduction_222 = happyIn102- (noLoc ([] , noLocA (NoSig noExtField) )- )--happyReduce_223 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_223 = happySpecReduce_2 86# happyReduction_223-happyReduction_223 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut182 happy_x_2 of { (HappyWrap182 happy_var_2) -> - happyIn102- (sLL happy_var_1 (reLoc happy_var_2) ([mu AnnDcolon happy_var_1], sLLa happy_var_1 (reLoc happy_var_2) (KindSig noExtField happy_var_2))- )}}--happyReduce_224 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_224 = happySpecReduce_0 87# happyReduction_224-happyReduction_224 = happyIn103- (noLoc ([] , noLocA (NoSig noExtField) )- )--happyReduce_225 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_225 = happySpecReduce_2 87# happyReduction_225-happyReduction_225 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut182 happy_x_2 of { (HappyWrap182 happy_var_2) -> - happyIn103- (sLL happy_var_1 (reLoc happy_var_2) ([mu AnnDcolon happy_var_1], sLLa happy_var_1 (reLoc happy_var_2) (KindSig noExtField happy_var_2))- )}}--happyReduce_226 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_226 = happyMonadReduce 2# 87# happyReduction_226-happyReduction_226 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut176 happy_x_2 of { (HappyWrap176 happy_var_2) -> - ( do { tvb <- fromSpecTyVarBndr happy_var_2- ; return $ sLL happy_var_1 (reLoc happy_var_2) ([mj AnnEqual happy_var_1], sLLa happy_var_1 (reLoc happy_var_2) (TyVarSig noExtField tvb))})}})- ) (\r -> happyReturn (happyIn103 r))--happyReduce_227 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_227 = happySpecReduce_0 88# happyReduction_227-happyReduction_227 = happyIn104- (noLoc ([], (noLocA (NoSig noExtField), Nothing))- )--happyReduce_228 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_228 = happySpecReduce_2 88# happyReduction_228-happyReduction_228 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut182 happy_x_2 of { (HappyWrap182 happy_var_2) -> - happyIn104- (sLL happy_var_1 (reLoc happy_var_2) ( [mu AnnDcolon happy_var_1]- , (sL1a (reLoc happy_var_2) (KindSig noExtField happy_var_2), Nothing))- )}}--happyReduce_229 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_229 = happyMonadReduce 4# 88# happyReduction_229-happyReduction_229 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut177 happy_x_2 of { (HappyWrap177 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut89 happy_x_4 of { (HappyWrap89 happy_var_4) -> - ( do { tvb <- fromSpecTyVarBndr happy_var_2- ; return $ sLL happy_var_1 (reLoc happy_var_4) ([mj AnnEqual happy_var_1, mj AnnVbar happy_var_3]- , (sLLa happy_var_1 (reLoc happy_var_2) (TyVarSig noExtField tvb), Just happy_var_4))})}}}})- ) (\r -> happyReturn (happyIn104 r))--happyReduce_230 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_230 = happyMonadReduce 3# 89# happyReduction_230-happyReduction_230 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut161 happy_x_1 of { (HappyWrap161 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut162 happy_x_3 of { (HappyWrap162 happy_var_3) -> - ( acs (\cs -> (sLLAA happy_var_1 happy_var_3 (Just (addTrailingDarrowC happy_var_1 happy_var_2 cs), happy_var_3))))}}})- ) (\r -> happyReturn (happyIn105 r))--happyReduce_231 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_231 = happySpecReduce_1 89# happyReduction_231-happyReduction_231 happy_x_1- = case happyOut162 happy_x_1 of { (HappyWrap162 happy_var_1) -> - happyIn105- (sL1A happy_var_1 (Nothing, happy_var_1)- )}--happyReduce_232 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_232 = happyMonadReduce 6# 90# happyReduction_232-happyReduction_232 (happy_x_6 `HappyStk`- happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut161 happy_x_4 of { (HappyWrap161 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - case happyOut162 happy_x_6 of { (HappyWrap162 happy_var_6) -> - ( hintExplicitForall happy_var_1- >> fromSpecTyVarBndrs happy_var_2- >>= \tvbs ->- (acs (\cs -> (sLL happy_var_1 (reLoc happy_var_6)- (Just ( addTrailingDarrowC happy_var_4 happy_var_5 cs)- , mkHsOuterExplicit (EpAnn (glR happy_var_1) (mu AnnForall happy_var_1, mj AnnDot happy_var_3) emptyComments) tvbs, happy_var_6)))))}}}}}})- ) (\r -> happyReturn (happyIn106 r))--happyReduce_233 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_233 = happyMonadReduce 4# 90# happyReduction_233-happyReduction_233 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut162 happy_x_4 of { (HappyWrap162 happy_var_4) -> - ( do { hintExplicitForall happy_var_1- ; tvbs <- fromSpecTyVarBndrs happy_var_2- ; let loc = comb2 happy_var_1 (reLoc happy_var_4)- ; cs <- getCommentsFor loc- ; return (sL loc (Nothing, mkHsOuterExplicit (EpAnn (glR happy_var_1) (mu AnnForall happy_var_1, mj AnnDot happy_var_3) cs) tvbs, happy_var_4))- })}}}})- ) (\r -> happyReturn (happyIn106 r))--happyReduce_234 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_234 = happyMonadReduce 3# 90# happyReduction_234-happyReduction_234 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut161 happy_x_1 of { (HappyWrap161 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut162 happy_x_3 of { (HappyWrap162 happy_var_3) -> - ( acs (\cs -> (sLLAA happy_var_1 happy_var_3(Just (addTrailingDarrowC happy_var_1 happy_var_2 cs), mkHsOuterImplicit, happy_var_3))))}}})- ) (\r -> happyReturn (happyIn106 r))--happyReduce_235 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_235 = happySpecReduce_1 90# happyReduction_235-happyReduction_235 happy_x_1- = case happyOut162 happy_x_1 of { (HappyWrap162 happy_var_1) -> - happyIn106- (sL1A happy_var_1 (Nothing, mkHsOuterImplicit, happy_var_1)- )}--happyReduce_236 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_236 = happyMonadReduce 4# 91# happyReduction_236-happyReduction_236 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOutTok happy_x_4 of { happy_var_4 -> - ( fmap Just $ amsrp (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)))- (AnnPragma (mo happy_var_1) (mc happy_var_4) [mj AnnHeader happy_var_2,mj AnnVal happy_var_3]))}}}})- ) (\r -> happyReturn (happyIn107 r))--happyReduce_237 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_237 = happyMonadReduce 3# 91# happyReduction_237-happyReduction_237 (happy_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 -> - ( fmap Just $ amsrp (sLL happy_var_1 happy_var_3 (CType (getCTYPEs happy_var_1) Nothing (getSTRINGs happy_var_2, getSTRING happy_var_2)))- (AnnPragma (mo happy_var_1) (mc happy_var_3) [mj AnnVal happy_var_2]))}}})- ) (\r -> happyReturn (happyIn107 r))--happyReduce_238 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_238 = happySpecReduce_0 91# happyReduction_238-happyReduction_238 = happyIn107- (Nothing- )--happyReduce_239 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_239 = happyMonadReduce 5# 92# happyReduction_239-happyReduction_239 (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 happyOut87 happy_x_2 of { (HappyWrap87 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut84 happy_x_4 of { (HappyWrap84 happy_var_4) -> - case happyOut170 happy_x_5 of { (HappyWrap170 happy_var_5) -> - ( do { let { err = text "in the stand-alone deriving instance"- <> colon <+> quotes (ppr happy_var_5) }- ; acsA (\cs -> sLL happy_var_1 (reLoc happy_var_5)- (DerivDecl (EpAnn (glR happy_var_1) [mj AnnDeriving happy_var_1, mj AnnInstance happy_var_3] cs) (mkHsWildCardBndrs happy_var_5) happy_var_2 happy_var_4)) })}}}}})- ) (\r -> happyReturn (happyIn108 r))--happyReduce_240 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_240 = happyMonadReduce 4# 93# 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 happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut280 happy_x_3 of { (HappyWrap280 happy_var_3) -> - case happyOut110 happy_x_4 of { (HappyWrap110 happy_var_4) -> - ( mkRoleAnnotDecl (comb3N happy_var_1 happy_var_4 happy_var_3) happy_var_3 (reverse (unLoc happy_var_4))- [mj AnnType happy_var_1,mj AnnRole happy_var_2])}}}})- ) (\r -> happyReturn (happyIn109 r))--happyReduce_241 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_241 = happySpecReduce_0 94# happyReduction_241-happyReduction_241 = happyIn110- (noLoc []- )--happyReduce_242 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_242 = happySpecReduce_1 94# happyReduction_242-happyReduction_242 happy_x_1- = case happyOut111 happy_x_1 of { (HappyWrap111 happy_var_1) -> - happyIn110- (happy_var_1- )}--happyReduce_243 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_243 = happySpecReduce_1 95# happyReduction_243-happyReduction_243 happy_x_1- = case happyOut112 happy_x_1 of { (HappyWrap112 happy_var_1) -> - happyIn111- (sLL happy_var_1 happy_var_1 [happy_var_1]- )}--happyReduce_244 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_244 = happySpecReduce_2 95# happyReduction_244-happyReduction_244 happy_x_2- happy_x_1- = case happyOut111 happy_x_1 of { (HappyWrap111 happy_var_1) -> - case happyOut112 happy_x_2 of { (HappyWrap112 happy_var_2) -> - happyIn111- (sLL happy_var_1 happy_var_2 $ happy_var_2 : unLoc happy_var_1- )}}--happyReduce_245 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_245 = happySpecReduce_1 96# happyReduction_245-happyReduction_245 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn112- (sL1 happy_var_1 $ Just $ getVARID happy_var_1- )}--happyReduce_246 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_246 = happySpecReduce_1 96# happyReduction_246-happyReduction_246 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn112- (sL1 happy_var_1 Nothing- )}--happyReduce_247 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_247 = happyMonadReduce 4# 97# happyReduction_247-happyReduction_247 (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 happyOut114 happy_x_2 of { (HappyWrap114 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut242 happy_x_4 of { (HappyWrap242 happy_var_4) -> - ( let (name, args, as ) = happy_var_2 in- acsA (\cs -> sLL happy_var_1 (reLoc happy_var_4) . ValD noExtField $ mkPatSynBind name args happy_var_4- ImplicitBidirectional- (EpAnn (glR happy_var_1) (as ++ [mj AnnPattern happy_var_1, mj AnnEqual happy_var_3]) cs)))}}}})- ) (\r -> happyReturn (happyIn113 r))--happyReduce_248 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_248 = happyMonadReduce 4# 97# happyReduction_248-happyReduction_248 (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 happyOut114 happy_x_2 of { (HappyWrap114 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut242 happy_x_4 of { (HappyWrap242 happy_var_4) -> - ( let (name, args, as) = happy_var_2 in- acsA (\cs -> sLL happy_var_1 (reLoc happy_var_4) . ValD noExtField $ mkPatSynBind name args happy_var_4 Unidirectional- (EpAnn (glR happy_var_1) (as ++ [mj AnnPattern happy_var_1,mu AnnLarrow happy_var_3]) cs)))}}}})- ) (\r -> happyReturn (happyIn113 r))--happyReduce_249 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_249 = happyMonadReduce 5# 97# happyReduction_249-happyReduction_249 (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 happyOut114 happy_x_2 of { (HappyWrap114 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut242 happy_x_4 of { (HappyWrap242 happy_var_4) -> - case happyOut117 happy_x_5 of { (HappyWrap117 happy_var_5) -> - ( do { let (name, args, as) = happy_var_2- ; mg <- mkPatSynMatchGroup name happy_var_5- ; acsA (\cs -> sLL happy_var_1 (reLoc happy_var_5) . ValD noExtField $- mkPatSynBind name args happy_var_4 (ExplicitBidirectional mg)- (EpAnn (glR happy_var_1) (as ++ [mj AnnPattern happy_var_1,mu AnnLarrow happy_var_3]) cs))- })}}}}})- ) (\r -> happyReturn (happyIn113 r))--happyReduce_250 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_250 = happySpecReduce_2 98# happyReduction_250-happyReduction_250 happy_x_2- happy_x_1- = case happyOut271 happy_x_1 of { (HappyWrap271 happy_var_1) -> - case happyOut115 happy_x_2 of { (HappyWrap115 happy_var_2) -> - happyIn114- ((happy_var_1, PrefixCon noTypeArgs happy_var_2, [])- )}}--happyReduce_251 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_251 = happySpecReduce_3 98# happyReduction_251-happyReduction_251 happy_x_3- happy_x_2- happy_x_1- = case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> - case happyOut276 happy_x_2 of { (HappyWrap276 happy_var_2) -> - case happyOut302 happy_x_3 of { (HappyWrap302 happy_var_3) -> - happyIn114- ((happy_var_2, InfixCon happy_var_1 happy_var_3, [])- )}}}--happyReduce_252 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_252 = happyReduce 4# 98# happyReduction_252-happyReduction_252 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest)- = case happyOut271 happy_x_1 of { (HappyWrap271 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut116 happy_x_3 of { (HappyWrap116 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - happyIn114- ((happy_var_1, RecCon happy_var_3, [moc happy_var_2, mcc happy_var_4] )- ) `HappyStk` happyRest}}}}--happyReduce_253 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_253 = happySpecReduce_0 99# happyReduction_253-happyReduction_253 = happyIn115- ([]- )--happyReduce_254 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_254 = happySpecReduce_2 99# happyReduction_254-happyReduction_254 happy_x_2- happy_x_1- = case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> - case happyOut115 happy_x_2 of { (HappyWrap115 happy_var_2) -> - happyIn115- (happy_var_1 : happy_var_2- )}}--happyReduce_255 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_255 = happySpecReduce_1 100# happyReduction_255-happyReduction_255 happy_x_1- = case happyOut298 happy_x_1 of { (HappyWrap298 happy_var_1) -> - happyIn116- ([RecordPatSynField (mkFieldOcc happy_var_1) happy_var_1]- )}--happyReduce_256 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_256 = happyMonadReduce 3# 100# happyReduction_256-happyReduction_256 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut298 happy_x_1 of { (HappyWrap298 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut116 happy_x_3 of { (HappyWrap116 happy_var_3) -> - ( do { h <- addTrailingCommaN happy_var_1 (gl happy_var_2)- ; return ((RecordPatSynField (mkFieldOcc h) h) : happy_var_3 )})}}})- ) (\r -> happyReturn (happyIn116 r))--happyReduce_257 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_257 = happyMonadReduce 4# 101# happyReduction_257-happyReduction_257 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut128 happy_x_3 of { (HappyWrap128 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - ( amsrl (sLL happy_var_1 happy_var_4 (snd $ unLoc happy_var_3))- (AnnList (Just $ glR happy_var_3) (Just $ moc happy_var_2) (Just $ mcc happy_var_4) [mj AnnWhere happy_var_1] (fst $ unLoc happy_var_3)))}}}})- ) (\r -> happyReturn (happyIn117 r))--happyReduce_258 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_258 = happyMonadReduce 4# 101# happyReduction_258-happyReduction_258 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut128 happy_x_3 of { (HappyWrap128 happy_var_3) -> - ( amsrl (sLL happy_var_1 happy_var_3 (snd $ unLoc happy_var_3))- (AnnList (Just $ glR happy_var_3) Nothing Nothing [mj AnnWhere happy_var_1] (fst $ unLoc happy_var_3)))}})- ) (\r -> happyReturn (happyIn117 r))--happyReduce_259 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_259 = happyMonadReduce 4# 102# happyReduction_259-happyReduction_259 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut272 happy_x_2 of { (HappyWrap272 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut154 happy_x_4 of { (HappyWrap154 happy_var_4) -> - ( acsA (\cs -> sLL happy_var_1 (reLoc happy_var_4)- $ PatSynSig (EpAnn (glR happy_var_1) (AnnSig (mu AnnDcolon happy_var_3) [mj AnnPattern happy_var_1]) cs)- (toList $ unLoc happy_var_2) happy_var_4))}}}})- ) (\r -> happyReturn (happyIn118 r))--happyReduce_260 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_260 = happySpecReduce_1 103# happyReduction_260-happyReduction_260 happy_x_1- = case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> - happyIn119- (happy_var_1- )}--happyReduce_261 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_261 = happySpecReduce_1 103# happyReduction_261-happyReduction_261 happy_x_1- = case happyOut269 happy_x_1 of { (HappyWrap269 happy_var_1) -> - happyIn119- (happy_var_1- )}--happyReduce_262 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_262 = happySpecReduce_1 104# happyReduction_262-happyReduction_262 happy_x_1- = case happyOut95 happy_x_1 of { (HappyWrap95 happy_var_1) -> - happyIn120- (happy_var_1- )}--happyReduce_263 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_263 = happySpecReduce_1 104# happyReduction_263-happyReduction_263 happy_x_1- = case happyOut199 happy_x_1 of { (HappyWrap199 happy_var_1) -> - happyIn120- (happy_var_1- )}--happyReduce_264 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_264 = happyMonadReduce 4# 104# happyReduction_264-happyReduction_264 (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 happyOut208 happy_x_2 of { (HappyWrap208 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut154 happy_x_4 of { (HappyWrap154 happy_var_4) -> - ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->- do { v <- checkValSigLhs happy_var_2- ; let err = text "in default signature" <> colon <+>- quotes (ppr happy_var_2)- ; acsA (\cs -> sLL happy_var_1 (reLoc happy_var_4) $ SigD noExtField $ ClassOpSig (EpAnn (glR happy_var_1) (AnnSig (mu AnnDcolon happy_var_3) [mj AnnDefault happy_var_1]) cs) True [v] happy_var_4) })}}}})- ) (\r -> happyReturn (happyIn120 r))--happyReduce_265 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_265 = happyMonadReduce 3# 105# happyReduction_265-happyReduction_265 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut121 happy_x_1 of { (HappyWrap121 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut120 happy_x_3 of { (HappyWrap120 happy_var_3) -> - ( if isNilOL (snd $ unLoc happy_var_1)- then return (sLLlA happy_var_1 happy_var_3 ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)- , unitOL happy_var_3))- else case (snd $ unLoc happy_var_1) of- SnocOL hs t -> do- t' <- addTrailingSemiA t (gl happy_var_2)- return (sLLlA happy_var_1 happy_var_3 (fst $ unLoc happy_var_1- , snocOL hs t' `appOL` unitOL happy_var_3)))}}})- ) (\r -> happyReturn (happyIn121 r))--happyReduce_266 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_266 = happyMonadReduce 2# 105# happyReduction_266-happyReduction_266 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut121 happy_x_1 of { (HappyWrap121 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 ( (fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)- ,snd $ unLoc happy_var_1))- else case (snd $ unLoc happy_var_1) of- SnocOL hs t -> do- t' <- addTrailingSemiA t (gl happy_var_2)- return (sLL happy_var_1 happy_var_2 (fst $ unLoc happy_var_1- , snocOL hs t')))}})- ) (\r -> happyReturn (happyIn121 r))--happyReduce_267 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_267 = happySpecReduce_1 105# happyReduction_267-happyReduction_267 happy_x_1- = case happyOut120 happy_x_1 of { (HappyWrap120 happy_var_1) -> - happyIn121- (sL1A happy_var_1 ([], unitOL 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 105# happyReduction_268-happyReduction_268 = happyIn121- (noLoc ([],nilOL)- )--happyReduce_269 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_269 = happySpecReduce_3 106# happyReduction_269-happyReduction_269 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut121 happy_x_2 of { (HappyWrap121 happy_var_2) -> - 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:(fst $ unLoc happy_var_2)- ,snd $ unLoc happy_var_2, explicitBraces happy_var_1 happy_var_3)- )}}}--happyReduce_270 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_270 = happySpecReduce_3 106# happyReduction_270-happyReduction_270 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut121 happy_x_2 of { (HappyWrap121 happy_var_2) -> - happyIn122- (let { L l (anns, decls) = happy_var_2 }- in L l (anns, decls, VirtualBraces (getVOCURLY happy_var_1))- )}}--happyReduce_271 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_271 = happySpecReduce_2 107# happyReduction_271-happyReduction_271 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut122 happy_x_2 of { (HappyWrap122 happy_var_2) -> - happyIn123- (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1:(fstOf3 $ unLoc happy_var_2)- ,sndOf3 $ unLoc happy_var_2,thdOf3 $ 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 107# happyReduction_272-happyReduction_272 = happyIn123- (noLoc ([],nilOL,NoLayoutInfo)- )--happyReduce_273 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_273 = happySpecReduce_1 108# happyReduction_273-happyReduction_273 happy_x_1- = case happyOut98 happy_x_1 of { (HappyWrap98 happy_var_1) -> - happyIn124- (sL1A happy_var_1 (unitOL (sL1 happy_var_1 (InstD noExtField (unLoc happy_var_1))))- )}--happyReduce_274 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_274 = happySpecReduce_1 108# happyReduction_274-happyReduction_274 happy_x_1- = case happyOut199 happy_x_1 of { (HappyWrap199 happy_var_1) -> - happyIn124- (sL1A happy_var_1 (unitOL happy_var_1)- )}--happyReduce_275 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_275 = happyMonadReduce 3# 109# happyReduction_275-happyReduction_275 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut125 happy_x_1 of { (HappyWrap125 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut124 happy_x_3 of { (HappyWrap124 happy_var_3) -> - ( if isNilOL (snd $ unLoc happy_var_1)- then return (sLL happy_var_1 happy_var_3 ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)- , unLoc happy_var_3))- else case (snd $ unLoc happy_var_1) of- SnocOL hs t -> do- t' <- addTrailingSemiA t (gl happy_var_2)- return (sLL happy_var_1 happy_var_3 (fst $ unLoc happy_var_1- , snocOL hs t' `appOL` unLoc happy_var_3)))}}})- ) (\r -> happyReturn (happyIn125 r))--happyReduce_276 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_276 = happyMonadReduce 2# 109# happyReduction_276-happyReduction_276 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut125 happy_x_1 of { (HappyWrap125 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( if isNilOL (snd $ unLoc happy_var_1)- then return (sLL happy_var_1 happy_var_2 ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)- ,snd $ unLoc happy_var_1))- else case (snd $ unLoc happy_var_1) of- SnocOL hs t -> do- t' <- addTrailingSemiA t (gl happy_var_2)- return (sLL happy_var_1 happy_var_2 (fst $ unLoc happy_var_1- , snocOL hs t')))}})- ) (\r -> happyReturn (happyIn125 r))--happyReduce_277 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_277 = happySpecReduce_1 109# happyReduction_277-happyReduction_277 happy_x_1- = case happyOut124 happy_x_1 of { (HappyWrap124 happy_var_1) -> - happyIn125- (sL1 happy_var_1 ([],unLoc happy_var_1)- )}--happyReduce_278 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_278 = happySpecReduce_0 109# happyReduction_278-happyReduction_278 = happyIn125- (noLoc ([],nilOL)- )--happyReduce_279 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_279 = happySpecReduce_3 110# happyReduction_279-happyReduction_279 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut125 happy_x_2 of { (HappyWrap125 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn126- (sLL happy_var_1 happy_var_3 (moc happy_var_1:mcc happy_var_3:(fst $ unLoc happy_var_2),snd $ unLoc happy_var_2)- )}}}--happyReduce_280 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_280 = happySpecReduce_3 110# happyReduction_280-happyReduction_280 happy_x_3- happy_x_2- happy_x_1- = case happyOut125 happy_x_2 of { (HappyWrap125 happy_var_2) -> - happyIn126- (L (gl happy_var_2) (unLoc happy_var_2)- )}--happyReduce_281 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_281 = happySpecReduce_2 111# happyReduction_281-happyReduction_281 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut126 happy_x_2 of { (HappyWrap126 happy_var_2) -> - happyIn127- (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1:(fst $ unLoc happy_var_2)- ,(snd $ unLoc happy_var_2))- )}}--happyReduce_282 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_282 = happySpecReduce_0 111# happyReduction_282-happyReduction_282 = happyIn127- (noLoc ([],nilOL)- )--happyReduce_283 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_283 = happyMonadReduce 3# 112# happyReduction_283-happyReduction_283 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut128 happy_x_1 of { (HappyWrap128 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut199 happy_x_3 of { (HappyWrap199 happy_var_3) -> - ( if isNilOL (snd $ unLoc happy_var_1)- then return (sLLlA happy_var_1 happy_var_3 ((fst $ unLoc happy_var_1) ++ (msemi happy_var_2)- , unitOL happy_var_3))- else case (snd $ unLoc happy_var_1) of- SnocOL hs t -> do- t' <- addTrailingSemiA t (gl happy_var_2)- let { this = unitOL happy_var_3;- rest = snocOL hs t';- these = rest `appOL` this }- return (rest `seq` this `seq` these `seq`- (sLLlA happy_var_1 happy_var_3 (fst $ unLoc happy_var_1, these))))}}})- ) (\r -> happyReturn (happyIn128 r))--happyReduce_284 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_284 = happyMonadReduce 2# 112# happyReduction_284-happyReduction_284 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut128 happy_x_1 of { (HappyWrap128 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 (((fst $ unLoc happy_var_1) ++ (msemi happy_var_2)- ,snd $ unLoc happy_var_1)))- else case (snd $ unLoc happy_var_1) of- SnocOL hs t -> do- t' <- addTrailingSemiA t (gl happy_var_2)- return (sLL happy_var_1 happy_var_2 (fst $ unLoc happy_var_1- , snocOL hs t')))}})- ) (\r -> happyReturn (happyIn128 r))--happyReduce_285 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_285 = happySpecReduce_1 112# happyReduction_285-happyReduction_285 happy_x_1- = case happyOut199 happy_x_1 of { (HappyWrap199 happy_var_1) -> - happyIn128- (sL1A happy_var_1 ([], unitOL happy_var_1)- )}--happyReduce_286 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_286 = happySpecReduce_0 112# happyReduction_286-happyReduction_286 = happyIn128- (noLoc ([],nilOL)- )--happyReduce_287 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_287 = happySpecReduce_3 113# happyReduction_287-happyReduction_287 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut128 happy_x_2 of { (HappyWrap128 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn129- (sLL happy_var_1 happy_var_3 (AnnList (Just $ glR happy_var_2) (Just $ moc happy_var_1) (Just $ mcc happy_var_3) [] (fst $ unLoc happy_var_2)- ,sL1 happy_var_2 $ snd $ unLoc happy_var_2)- )}}}--happyReduce_288 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_288 = happySpecReduce_3 113# happyReduction_288-happyReduction_288 happy_x_3- happy_x_2- happy_x_1- = case happyOut128 happy_x_2 of { (HappyWrap128 happy_var_2) -> - happyIn129- (L (gl happy_var_2) (AnnList (Just $ glR happy_var_2) Nothing Nothing [] (fst $ unLoc happy_var_2)- ,sL1 happy_var_2 $ snd $ unLoc happy_var_2)- )}--happyReduce_289 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_289 = happyMonadReduce 1# 114# happyReduction_289-happyReduction_289 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut129 happy_x_1 of { (HappyWrap129 happy_var_1) -> - ( do { val_binds <- cvBindGroup (unLoc $ snd $ unLoc happy_var_1)- ; cs <- getCommentsFor (gl happy_var_1)- ; return (sL1 happy_var_1 $ HsValBinds (fixValbindsAnn $ EpAnn (glR happy_var_1) (fst $ unLoc happy_var_1) cs) val_binds)})})- ) (\r -> happyReturn (happyIn130 r))--happyReduce_290 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_290 = happyMonadReduce 3# 114# happyReduction_290-happyReduction_290 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut257 happy_x_2 of { (HappyWrap257 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( acs (\cs -> (L (comb3 happy_var_1 happy_var_2 happy_var_3)- $ HsIPBinds (EpAnn (glR happy_var_1) (AnnList (Just$ glR happy_var_2) (Just $ moc happy_var_1) (Just $ mcc happy_var_3) [] []) cs) (IPBinds noExtField (reverse $ unLoc happy_var_2)))))}}})- ) (\r -> happyReturn (happyIn130 r))--happyReduce_291 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_291 = happyMonadReduce 3# 114# happyReduction_291-happyReduction_291 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut257 happy_x_2 of { (HappyWrap257 happy_var_2) -> - ( acs (\cs -> (L (gl happy_var_2)- $ HsIPBinds (EpAnn (glR happy_var_1) (AnnList (Just $ glR happy_var_2) Nothing Nothing [] []) cs) (IPBinds noExtField (reverse $ unLoc happy_var_2)))))}})- ) (\r -> happyReturn (happyIn130 r))--happyReduce_292 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_292 = happyMonadReduce 2# 115# happyReduction_292-happyReduction_292 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut130 happy_x_2 of { (HappyWrap130 happy_var_2) -> - ( do { r <- acs (\cs ->- (sLL happy_var_1 happy_var_2 (annBinds (mj AnnWhere happy_var_1) cs (unLoc happy_var_2))))- ; return $ Just r})}})- ) (\r -> happyReturn (happyIn131 r))--happyReduce_293 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_293 = happySpecReduce_0 115# happyReduction_293-happyReduction_293 = happyIn131- (Nothing- )--happyReduce_294 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_294 = happyMonadReduce 3# 116# happyReduction_294-happyReduction_294 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut132 happy_x_1 of { (HappyWrap132 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut133 happy_x_3 of { (HappyWrap133 happy_var_3) -> - ( case happy_var_1 of- [] -> return (happy_var_3:happy_var_1)- (h:t) -> do- h' <- addTrailingSemiA h (gl happy_var_2)- return (happy_var_3:h':t))}}})- ) (\r -> happyReturn (happyIn132 r))--happyReduce_295 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_295 = happyMonadReduce 2# 116# happyReduction_295-happyReduction_295 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut132 happy_x_1 of { (HappyWrap132 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( case happy_var_1 of- [] -> return happy_var_1- (h:t) -> do- h' <- addTrailingSemiA h (gl happy_var_2)- return (h':t))}})- ) (\r -> happyReturn (happyIn132 r))--happyReduce_296 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_296 = happySpecReduce_1 116# happyReduction_296-happyReduction_296 happy_x_1- = case happyOut133 happy_x_1 of { (HappyWrap133 happy_var_1) -> - happyIn132- ([happy_var_1]- )}--happyReduce_297 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_297 = happySpecReduce_0 116# happyReduction_297-happyReduction_297 = happyIn132- ([]- )--happyReduce_298 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_298 = happyMonadReduce 6# 117# happyReduction_298-happyReduction_298 (happy_x_6 `HappyStk`- happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut134 happy_x_2 of { (HappyWrap134 happy_var_2) -> - case happyOut137 happy_x_3 of { (HappyWrap137 happy_var_3) -> - case happyOut208 happy_x_4 of { (HappyWrap208 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - case happyOut207 happy_x_6 of { (HappyWrap207 happy_var_6) -> - (runPV (unECP happy_var_4) >>= \ happy_var_4 ->- runPV (unECP happy_var_6) >>= \ happy_var_6 ->- acsA (\cs -> (sLLlA happy_var_1 happy_var_6 $ HsRule- { rd_ext = (EpAnn (glR happy_var_1) ((fstOf3 happy_var_3) (mj AnnEqual happy_var_5 : (fst happy_var_2))) cs, getSTRINGs happy_var_1)- , rd_name = L (noAnnSrcSpan $ gl happy_var_1) (getSTRING happy_var_1)- , rd_act = (snd happy_var_2) `orElse` AlwaysActive- , rd_tyvs = sndOf3 happy_var_3, rd_tmvs = thdOf3 happy_var_3- , rd_lhs = happy_var_4, rd_rhs = happy_var_6 })))}}}}}})- ) (\r -> happyReturn (happyIn133 r))--happyReduce_299 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_299 = happySpecReduce_0 118# happyReduction_299-happyReduction_299 = happyIn134- (([],Nothing)- )--happyReduce_300 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_300 = happySpecReduce_1 118# happyReduction_300-happyReduction_300 happy_x_1- = case happyOut136 happy_x_1 of { (HappyWrap136 happy_var_1) -> - happyIn134- ((fst happy_var_1,Just (snd happy_var_1))- )}--happyReduce_301 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_301 = happySpecReduce_1 119# happyReduction_301-happyReduction_301 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn135- ([mj AnnTilde happy_var_1]- )}--happyReduce_302 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_302 = happyMonadReduce 1# 119# happyReduction_302-happyReduction_302 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - ( if (getVARSYM happy_var_1 == fsLit "~")- then return [mj AnnTilde happy_var_1]- else do { addError $ mkPlainErrorMsgEnvelope (getLoc happy_var_1) $- PsErrInvalidRuleActivationMarker- ; return [] })})- ) (\r -> happyReturn (happyIn135 r))--happyReduce_303 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_303 = happySpecReduce_3 120# happyReduction_303-happyReduction_303 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 -> - happyIn136- (([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_304 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_304 = happyReduce 4# 120# happyReduction_304-happyReduction_304 (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 happyOut135 happy_x_2 of { (HappyWrap135 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOutTok happy_x_4 of { happy_var_4 -> - happyIn136- ((happy_var_2++[mos happy_var_1,mj AnnVal happy_var_3,mcs happy_var_4]- ,ActiveBefore (getINTEGERs happy_var_3) (fromInteger (il_value (getINTEGER happy_var_3))))- ) `HappyStk` happyRest}}}}--happyReduce_305 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_305 = happySpecReduce_3 120# happyReduction_305-happyReduction_305 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut135 happy_x_2 of { (HappyWrap135 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn136- ((happy_var_2++[mos happy_var_1,mcs happy_var_3]- ,NeverActive)- )}}}--happyReduce_306 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_306 = happyMonadReduce 6# 121# happyReduction_306-happyReduction_306 (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 happyOut138 happy_x_2 of { (HappyWrap138 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOutTok happy_x_4 of { happy_var_4 -> - case happyOut138 happy_x_5 of { (HappyWrap138 happy_var_5) -> - case happyOutTok happy_x_6 of { happy_var_6 -> - ( let tyvs = mkRuleTyVarBndrs happy_var_2- in hintExplicitForall happy_var_1- >> checkRuleTyVarBndrNames (mkRuleTyVarBndrs happy_var_2)- >> return (\anns -> HsRuleAnn- (Just (mu AnnForall happy_var_1,mj AnnDot happy_var_3))- (Just (mu AnnForall happy_var_4,mj AnnDot happy_var_6))- anns,- Just (mkRuleTyVarBndrs happy_var_2), mkRuleBndrs happy_var_5))}}}}}})- ) (\r -> happyReturn (happyIn137 r))--happyReduce_307 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_307 = happySpecReduce_3 121# happyReduction_307-happyReduction_307 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut138 happy_x_2 of { (HappyWrap138 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn137- ((\anns -> HsRuleAnn Nothing (Just (mu AnnForall happy_var_1,mj AnnDot happy_var_3)) anns,- Nothing, mkRuleBndrs happy_var_2)- )}}}--happyReduce_308 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_308 = happySpecReduce_0 121# happyReduction_308-happyReduction_308 = happyIn137- ((\anns -> HsRuleAnn Nothing Nothing anns, Nothing, [])- )--happyReduce_309 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_309 = happySpecReduce_2 122# happyReduction_309-happyReduction_309 happy_x_2- happy_x_1- = case happyOut139 happy_x_1 of { (HappyWrap139 happy_var_1) -> - case happyOut138 happy_x_2 of { (HappyWrap138 happy_var_2) -> - happyIn138- (happy_var_1 : happy_var_2- )}}--happyReduce_310 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_310 = happySpecReduce_0 122# happyReduction_310-happyReduction_310 = happyIn138- ([]- )--happyReduce_311 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_311 = happySpecReduce_1 123# happyReduction_311-happyReduction_311 happy_x_1- = case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> - happyIn139- (sL1l happy_var_1 (RuleTyTmVar noAnn happy_var_1 Nothing)- )}--happyReduce_312 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_312 = happyMonadReduce 5# 123# happyReduction_312-happyReduction_312 (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 happyOut302 happy_x_2 of { (HappyWrap302 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut160 happy_x_4 of { (HappyWrap160 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_5 (RuleTyTmVar (EpAnn (glR happy_var_1) [mop happy_var_1,mu AnnDcolon happy_var_3,mcp happy_var_5] cs) happy_var_2 (Just happy_var_4))))}}}}})- ) (\r -> happyReturn (happyIn139 r))--happyReduce_313 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_313 = happyMonadReduce 3# 124# happyReduction_313-happyReduction_313 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut140 happy_x_1 of { (HappyWrap140 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut141 happy_x_3 of { (HappyWrap141 happy_var_3) -> - ( if isNilOL happy_var_1- then return (happy_var_1 `appOL` happy_var_3)- else case happy_var_1 of- SnocOL hs t -> do- t' <- addTrailingSemiA t (gl happy_var_2)- return (snocOL hs t' `appOL` happy_var_3))}}})- ) (\r -> happyReturn (happyIn140 r))--happyReduce_314 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_314 = happyMonadReduce 2# 124# happyReduction_314-happyReduction_314 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut140 happy_x_1 of { (HappyWrap140 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( if isNilOL happy_var_1- then return happy_var_1- else case happy_var_1 of- SnocOL hs t -> do- t' <- addTrailingSemiA t (gl happy_var_2)- return (snocOL hs t'))}})- ) (\r -> happyReturn (happyIn140 r))--happyReduce_315 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_315 = happySpecReduce_1 124# happyReduction_315-happyReduction_315 happy_x_1- = case happyOut141 happy_x_1 of { (HappyWrap141 happy_var_1) -> - happyIn140- (happy_var_1- )}--happyReduce_316 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_316 = happySpecReduce_0 124# happyReduction_316-happyReduction_316 = happyIn140- (nilOL- )--happyReduce_317 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_317 = happyMonadReduce 2# 125# happyReduction_317-happyReduction_317 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut266 happy_x_1 of { (HappyWrap266 happy_var_1) -> - case happyOut144 happy_x_2 of { (HappyWrap144 happy_var_2) -> - ( fmap unitOL $ acsA (\cs -> sLL happy_var_1 happy_var_2- (Warning (EpAnn (glR happy_var_1) (fst $ unLoc happy_var_2) cs) (unLoc happy_var_1)- (WarningTxt (noLoc NoSourceText) $ map stringLiteralToHsDocWst $ snd $ unLoc happy_var_2))))}})- ) (\r -> happyReturn (happyIn141 r))--happyReduce_318 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_318 = happyMonadReduce 3# 126# happyReduction_318-happyReduction_318 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut142 happy_x_1 of { (HappyWrap142 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut143 happy_x_3 of { (HappyWrap143 happy_var_3) -> - ( if isNilOL happy_var_1- then return (happy_var_1 `appOL` happy_var_3)- else case happy_var_1 of- SnocOL hs t -> do- t' <- addTrailingSemiA t (gl happy_var_2)- return (snocOL hs t' `appOL` happy_var_3))}}})- ) (\r -> happyReturn (happyIn142 r))--happyReduce_319 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_319 = happyMonadReduce 2# 126# happyReduction_319-happyReduction_319 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut142 happy_x_1 of { (HappyWrap142 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( if isNilOL happy_var_1- then return happy_var_1- else case happy_var_1 of- SnocOL hs t -> do- t' <- addTrailingSemiA t (gl happy_var_2)- return (snocOL hs t'))}})- ) (\r -> happyReturn (happyIn142 r))--happyReduce_320 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_320 = happySpecReduce_1 126# happyReduction_320-happyReduction_320 happy_x_1- = case happyOut143 happy_x_1 of { (HappyWrap143 happy_var_1) -> - happyIn142- (happy_var_1- )}--happyReduce_321 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_321 = happySpecReduce_0 126# happyReduction_321-happyReduction_321 = happyIn142- (nilOL- )--happyReduce_322 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_322 = happyMonadReduce 2# 127# happyReduction_322-happyReduction_322 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut266 happy_x_1 of { (HappyWrap266 happy_var_1) -> - case happyOut144 happy_x_2 of { (HappyWrap144 happy_var_2) -> - ( fmap unitOL $ acsA (\cs -> sLL happy_var_1 happy_var_2 $ (Warning (EpAnn (glR happy_var_1) (fst $ unLoc happy_var_2) cs) (unLoc happy_var_1)- (DeprecatedTxt (noLoc NoSourceText) $ map stringLiteralToHsDocWst $ snd $ unLoc happy_var_2))))}})- ) (\r -> happyReturn (happyIn143 r))--happyReduce_323 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_323 = happySpecReduce_1 128# happyReduction_323-happyReduction_323 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn144- (sL1 happy_var_1 ([],[L (gl happy_var_1) (getStringLiteral happy_var_1)])- )}--happyReduce_324 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_324 = happySpecReduce_3 128# happyReduction_324-happyReduction_324 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut145 happy_x_2 of { (HappyWrap145 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn144- (sLL happy_var_1 happy_var_3 $ ([mos happy_var_1,mcs happy_var_3],fromOL (unLoc happy_var_2))- )}}}--happyReduce_325 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_325 = happyMonadReduce 3# 129# happyReduction_325-happyReduction_325 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut145 happy_x_1 of { (HappyWrap145 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( if isNilOL (unLoc happy_var_1)- then return (sLL happy_var_1 happy_var_3 (unLoc happy_var_1 `snocOL`- (L (gl happy_var_3) (getStringLiteral happy_var_3))))- else case (unLoc happy_var_1) of- SnocOL hs t -> do- let { t' = addTrailingCommaS t (glAA happy_var_2) }- return (sLL happy_var_1 happy_var_3 (snocOL hs t' `snocOL`- (L (gl happy_var_3) (getStringLiteral happy_var_3)))))}}})- ) (\r -> happyReturn (happyIn145 r))--happyReduce_326 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_326 = happySpecReduce_1 129# happyReduction_326-happyReduction_326 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn145- (sLL happy_var_1 happy_var_1 (unitOL (L (gl happy_var_1) (getStringLiteral happy_var_1)))- )}--happyReduce_327 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_327 = happySpecReduce_0 129# happyReduction_327-happyReduction_327 = happyIn145- (noLoc nilOL- )--happyReduce_328 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_328 = happyMonadReduce 4# 130# happyReduction_328-happyReduction_328 (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 happyOut267 happy_x_2 of { (HappyWrap267 happy_var_2) -> - case happyOut214 happy_x_3 of { (HappyWrap214 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - ( runPV (unECP happy_var_3) >>= \ happy_var_3 ->- acsA (\cs -> sLL happy_var_1 happy_var_4 (AnnD noExtField $ HsAnnotation- ((EpAnn (glR happy_var_1) (AnnPragma (mo happy_var_1) (mc happy_var_4) []) cs),- (getANN_PRAGs happy_var_1))- (ValueAnnProvenance happy_var_2) happy_var_3)))}}}})- ) (\r -> happyReturn (happyIn146 r))--happyReduce_329 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_329 = happyMonadReduce 5# 130# happyReduction_329-happyReduction_329 (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 happyOut287 happy_x_3 of { (HappyWrap287 happy_var_3) -> - case happyOut214 happy_x_4 of { (HappyWrap214 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - ( runPV (unECP happy_var_4) >>= \ happy_var_4 ->- acsA (\cs -> sLL happy_var_1 happy_var_5 (AnnD noExtField $ HsAnnotation- ((EpAnn (glR happy_var_1) (AnnPragma (mo happy_var_1) (mc happy_var_5) [mj AnnType happy_var_2]) cs),- (getANN_PRAGs happy_var_1))- (TypeAnnProvenance happy_var_3) happy_var_4)))}}}}})- ) (\r -> happyReturn (happyIn146 r))--happyReduce_330 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_330 = happyMonadReduce 4# 130# happyReduction_330-happyReduction_330 (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 happyOut214 happy_x_3 of { (HappyWrap214 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - ( runPV (unECP happy_var_3) >>= \ happy_var_3 ->- acsA (\cs -> sLL happy_var_1 happy_var_4 (AnnD noExtField $ HsAnnotation- ((EpAnn (glR happy_var_1) (AnnPragma (mo happy_var_1) (mc happy_var_4) [mj AnnModule happy_var_2]) cs),- (getANN_PRAGs happy_var_1))- ModuleAnnProvenance happy_var_3)))}}}})- ) (\r -> happyReturn (happyIn146 r))--happyReduce_331 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_331 = happyMonadReduce 4# 131# happyReduction_331-happyReduction_331 (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 happyOut148 happy_x_2 of { (HappyWrap148 happy_var_2) -> - case happyOut149 happy_x_3 of { (HappyWrap149 happy_var_3) -> - case happyOut150 happy_x_4 of { (HappyWrap150 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 (happyIn147 r))--happyReduce_332 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_332 = happyMonadReduce 3# 131# happyReduction_332-happyReduction_332 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut148 happy_x_2 of { (HappyWrap148 happy_var_2) -> - case happyOut150 happy_x_3 of { (HappyWrap150 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 (happyIn147 r))--happyReduce_333 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_333 = happyMonadReduce 3# 131# happyReduction_333-happyReduction_333 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut148 happy_x_2 of { (HappyWrap148 happy_var_2) -> - case happyOut150 happy_x_3 of { (HappyWrap150 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 (happyIn147 r))--happyReduce_334 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_334 = happySpecReduce_1 132# happyReduction_334-happyReduction_334 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn148- (sLL happy_var_1 happy_var_1 StdCallConv- )}--happyReduce_335 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_335 = happySpecReduce_1 132# happyReduction_335-happyReduction_335 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn148- (sLL happy_var_1 happy_var_1 CCallConv- )}--happyReduce_336 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_336 = happySpecReduce_1 132# happyReduction_336-happyReduction_336 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn148- (sLL happy_var_1 happy_var_1 CApiConv- )}--happyReduce_337 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_337 = happySpecReduce_1 132# happyReduction_337-happyReduction_337 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn148- (sLL happy_var_1 happy_var_1 PrimCallConv- )}--happyReduce_338 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_338 = happySpecReduce_1 132# happyReduction_338-happyReduction_338 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn148- (sLL happy_var_1 happy_var_1 JavaScriptCallConv- )}--happyReduce_339 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_339 = happySpecReduce_1 133# happyReduction_339-happyReduction_339 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn149- (sLL happy_var_1 happy_var_1 PlayRisky- )}--happyReduce_340 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_340 = happySpecReduce_1 133# happyReduction_340-happyReduction_340 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn149- (sLL happy_var_1 happy_var_1 PlaySafe- )}--happyReduce_341 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_341 = happySpecReduce_1 133# happyReduction_341-happyReduction_341 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn149- (sLL happy_var_1 happy_var_1 PlayInterruptible- )}--happyReduce_342 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_342 = happyReduce 4# 134# happyReduction_342-happyReduction_342 (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 happyOut298 happy_x_2 of { (HappyWrap298 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut154 happy_x_4 of { (HappyWrap154 happy_var_4) -> - happyIn150- (sLL happy_var_1 (reLoc happy_var_4) ([mu AnnDcolon happy_var_3]- ,(L (getLoc happy_var_1)- (getStringLiteral happy_var_1), happy_var_2, happy_var_4))- ) `HappyStk` happyRest}}}}--happyReduce_343 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_343 = happySpecReduce_3 134# happyReduction_343-happyReduction_343 happy_x_3- happy_x_2- happy_x_1- = case happyOut298 happy_x_1 of { (HappyWrap298 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut154 happy_x_3 of { (HappyWrap154 happy_var_3) -> - happyIn150- (sLL (reLocN happy_var_1) (reLoc happy_var_3) ([mu AnnDcolon happy_var_2]- ,(noLoc (StringLiteral NoSourceText nilFS Nothing), happy_var_1, happy_var_3))- )}}}--happyReduce_344 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_344 = happySpecReduce_0 135# happyReduction_344-happyReduction_344 = happyIn151- (Nothing- )--happyReduce_345 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_345 = happySpecReduce_2 135# happyReduction_345-happyReduction_345 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut160 happy_x_2 of { (HappyWrap160 happy_var_2) -> - happyIn151- (Just (mu AnnDcolon happy_var_1, happy_var_2)- )}}--happyReduce_346 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_346 = happySpecReduce_0 136# happyReduction_346-happyReduction_346 = happyIn152- (([], Nothing)- )--happyReduce_347 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_347 = happySpecReduce_2 136# happyReduction_347-happyReduction_347 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut278 happy_x_2 of { (HappyWrap278 happy_var_2) -> - happyIn152- (([mu AnnDcolon happy_var_1], Just happy_var_2)- )}}--happyReduce_348 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_348 = happySpecReduce_1 137# happyReduction_348-happyReduction_348 happy_x_1- = case happyOut154 happy_x_1 of { (HappyWrap154 happy_var_1) -> - happyIn153- (happy_var_1- )}--happyReduce_349 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_349 = happyMonadReduce 3# 137# happyReduction_349-happyReduction_349 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut160 happy_x_1 of { (HappyWrap160 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut182 happy_x_3 of { (HappyWrap182 happy_var_3) -> - ( acsA (\cs -> sLLAA happy_var_1 happy_var_3 $ mkHsImplicitSigType $- sLLa (reLoc happy_var_1) (reLoc happy_var_3) $ HsKindSig (EpAnn (glAR happy_var_1) [mu AnnDcolon happy_var_2] cs) happy_var_1 happy_var_3))}}})- ) (\r -> happyReturn (happyIn153 r))--happyReduce_350 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_350 = happySpecReduce_1 138# happyReduction_350-happyReduction_350 happy_x_1- = case happyOut160 happy_x_1 of { (HappyWrap160 happy_var_1) -> - happyIn154- (hsTypeToHsSigType happy_var_1- )}--happyReduce_351 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_351 = happyMonadReduce 3# 139# happyReduction_351-happyReduction_351 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut155 happy_x_1 of { (HappyWrap155 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut298 happy_x_3 of { (HappyWrap298 happy_var_3) -> - ( case unLoc happy_var_1 of- [] -> return (sLL happy_var_1 (reLocN happy_var_3) (happy_var_3 : unLoc happy_var_1))- (h:t) -> do- h' <- addTrailingCommaN h (gl happy_var_2)- return (sLL happy_var_1 (reLocN happy_var_3) (happy_var_3 : h' : t)))}}})- ) (\r -> happyReturn (happyIn155 r))--happyReduce_352 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_352 = happySpecReduce_1 139# happyReduction_352-happyReduction_352 happy_x_1- = case happyOut298 happy_x_1 of { (HappyWrap298 happy_var_1) -> - happyIn155- (sL1N happy_var_1 [happy_var_1]- )}--happyReduce_353 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_353 = happySpecReduce_1 140# happyReduction_353-happyReduction_353 happy_x_1- = case happyOut154 happy_x_1 of { (HappyWrap154 happy_var_1) -> - happyIn156- (unitOL happy_var_1- )}--happyReduce_354 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_354 = happyMonadReduce 3# 140# happyReduction_354-happyReduction_354 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut154 happy_x_1 of { (HappyWrap154 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut156 happy_x_3 of { (HappyWrap156 happy_var_3) -> - ( do { st <- addTrailingCommaA happy_var_1 (gl happy_var_2)- ; return $ unitOL st `appOL` happy_var_3 })}}})- ) (\r -> happyReturn (happyIn156 r))--happyReduce_355 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_355 = happySpecReduce_2 141# happyReduction_355-happyReduction_355 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn157- (sLL happy_var_1 happy_var_2 (UnpackednessPragma [mo happy_var_1, mc happy_var_2] (getUNPACK_PRAGs happy_var_1) SrcUnpack)- )}}--happyReduce_356 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_356 = happySpecReduce_2 141# happyReduction_356-happyReduction_356 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn157- (sLL happy_var_1 happy_var_2 (UnpackednessPragma [mo happy_var_1, mc happy_var_2] (getNOUNPACK_PRAGs happy_var_1) SrcNoUnpack)- )}}--happyReduce_357 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_357 = happyMonadReduce 3# 142# happyReduction_357-happyReduction_357 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( do { hintExplicitForall happy_var_1- ; acs (\cs -> (sLL happy_var_1 happy_var_3 $- mkHsForAllInvisTele (EpAnn (glR happy_var_1) (mu AnnForall happy_var_1,mu AnnDot happy_var_3) cs) happy_var_2 )) })}}})- ) (\r -> happyReturn (happyIn158 r))--happyReduce_358 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_358 = happyMonadReduce 3# 142# happyReduction_358-happyReduction_358 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( do { hintExplicitForall happy_var_1- ; req_tvbs <- fromSpecTyVarBndrs happy_var_2- ; acs (\cs -> (sLL happy_var_1 happy_var_3 $- mkHsForAllVisTele (EpAnn (glR happy_var_1) (mu AnnForall happy_var_1,mu AnnRarrow happy_var_3) cs) req_tvbs )) })}}})- ) (\r -> happyReturn (happyIn158 r))--happyReduce_359 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_359 = happySpecReduce_1 143# happyReduction_359-happyReduction_359 happy_x_1- = case happyOut160 happy_x_1 of { (HappyWrap160 happy_var_1) -> - happyIn159- (happy_var_1- )}--happyReduce_360 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_360 = happyMonadReduce 3# 143# happyReduction_360-happyReduction_360 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut160 happy_x_1 of { (HappyWrap160 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut182 happy_x_3 of { (HappyWrap182 happy_var_3) -> - ( acsA (\cs -> sLLAA happy_var_1 happy_var_3 $ HsKindSig (EpAnn (glAR happy_var_1) [mu AnnDcolon happy_var_2] cs) happy_var_1 happy_var_3))}}})- ) (\r -> happyReturn (happyIn159 r))--happyReduce_361 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_361 = happySpecReduce_2 144# happyReduction_361-happyReduction_361 happy_x_2- happy_x_1- = case happyOut158 happy_x_1 of { (HappyWrap158 happy_var_1) -> - case happyOut160 happy_x_2 of { (HappyWrap160 happy_var_2) -> - happyIn160- (reLocA $ sLL happy_var_1 (reLoc happy_var_2) $- HsForAllTy { hst_tele = unLoc happy_var_1- , hst_xforall = noExtField- , hst_body = 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# 144# happyReduction_362-happyReduction_362 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut161 happy_x_1 of { (HappyWrap161 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut160 happy_x_3 of { (HappyWrap160 happy_var_3) -> - ( acsA (\cs -> (sLL (reLoc happy_var_1) (reLoc happy_var_3) $- HsQualTy { hst_ctxt = addTrailingDarrowC happy_var_1 happy_var_2 cs- , hst_xqual = NoExtField- , hst_body = happy_var_3 })))}}})- ) (\r -> happyReturn (happyIn160 r))--happyReduce_363 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_363 = happyMonadReduce 3# 144# happyReduction_363-happyReduction_363 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut259 happy_x_1 of { (HappyWrap259 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut160 happy_x_3 of { (HappyWrap160 happy_var_3) -> - ( acsA (\cs -> sLL happy_var_1 (reLoc happy_var_3) (HsIParamTy (EpAnn (glR happy_var_1) [mu AnnDcolon happy_var_2] cs) (reLocA happy_var_1) happy_var_3)))}}})- ) (\r -> happyReturn (happyIn160 r))--happyReduce_364 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_364 = happySpecReduce_1 144# happyReduction_364-happyReduction_364 happy_x_1- = case happyOut162 happy_x_1 of { (HappyWrap162 happy_var_1) -> - happyIn160- (happy_var_1- )}--happyReduce_365 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_365 = happyMonadReduce 1# 145# happyReduction_365-happyReduction_365 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> - ( checkContext happy_var_1)})- ) (\r -> happyReturn (happyIn161 r))--happyReduce_366 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_366 = happySpecReduce_1 146# happyReduction_366-happyReduction_366 happy_x_1- = case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> - happyIn162- (happy_var_1- )}--happyReduce_367 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_367 = happyMonadReduce 3# 146# happyReduction_367-happyReduction_367 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut160 happy_x_3 of { (HappyWrap160 happy_var_3) -> - ( acsA (\cs -> sLL (reLoc happy_var_1) (reLoc happy_var_3)- $ HsFunTy (EpAnn (glAR happy_var_1) NoEpAnns cs) (HsUnrestrictedArrow (hsUniTok happy_var_2)) happy_var_1 happy_var_3))}}})- ) (\r -> happyReturn (happyIn162 r))--happyReduce_368 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_368 = happyMonadReduce 4# 146# happyReduction_368-happyReduction_368 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> - case happyOut163 happy_x_2 of { (HappyWrap163 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut160 happy_x_4 of { (HappyWrap160 happy_var_4) -> - ( hintLinear (getLoc happy_var_2)- >> let arr = (unLoc happy_var_2) (hsUniTok happy_var_3)- in acsA (\cs -> sLL (reLoc happy_var_1) (reLoc happy_var_4)- $ HsFunTy (EpAnn (glAR happy_var_1) NoEpAnns cs) arr happy_var_1 happy_var_4))}}}})- ) (\r -> happyReturn (happyIn162 r))--happyReduce_369 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_369 = happyMonadReduce 3# 146# happyReduction_369-happyReduction_369 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut160 happy_x_3 of { (HappyWrap160 happy_var_3) -> - ( hintLinear (getLoc happy_var_2) >>- acsA (\cs -> sLL (reLoc happy_var_1) (reLoc happy_var_3)- $ HsFunTy (EpAnn (glAR happy_var_1) NoEpAnns cs) (HsLinearArrow (HsLolly (hsTok happy_var_2))) happy_var_1 happy_var_3))}}})- ) (\r -> happyReturn (happyIn162 r))--happyReduce_370 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_370 = happySpecReduce_2 147# happyReduction_370-happyReduction_370 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut169 happy_x_2 of { (HappyWrap169 happy_var_2) -> - happyIn163- (sLL happy_var_1 (reLoc happy_var_2) (mkMultTy (hsTok happy_var_1) happy_var_2)- )}}--happyReduce_371 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_371 = happyMonadReduce 1# 148# happyReduction_371-happyReduction_371 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut165 happy_x_1 of { (HappyWrap165 happy_var_1) -> - ( runPV happy_var_1)})- ) (\r -> happyReturn (happyIn164 r))--happyReduce_372 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_372 = happySpecReduce_1 149# happyReduction_372-happyReduction_372 happy_x_1- = case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> - happyIn165- (happy_var_1- )}--happyReduce_373 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_373 = happySpecReduce_3 149# happyReduction_373-happyReduction_373 happy_x_3- happy_x_2- happy_x_1- = case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> - case happyOut168 happy_x_2 of { (HappyWrap168 happy_var_2) -> - case happyOut165 happy_x_3 of { (HappyWrap165 happy_var_3) -> - happyIn165- (happy_var_1 >>= \ happy_var_1 ->- happy_var_3 >>= \ happy_var_3 ->- do { let (op, prom) = happy_var_2- ; when (looksLikeMult happy_var_1 op happy_var_3) $ hintLinear (getLocA op)- ; mkHsOpTyPV prom happy_var_1 op happy_var_3 }- )}}}--happyReduce_374 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_374 = happySpecReduce_2 149# happyReduction_374-happyReduction_374 happy_x_2- happy_x_1- = case happyOut157 happy_x_1 of { (HappyWrap157 happy_var_1) -> - case happyOut165 happy_x_2 of { (HappyWrap165 happy_var_2) -> - happyIn165- (happy_var_2 >>= \ happy_var_2 ->- mkUnpackednessPV happy_var_1 happy_var_2- )}}--happyReduce_375 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_375 = happySpecReduce_1 150# happyReduction_375-happyReduction_375 happy_x_1- = case happyOut169 happy_x_1 of { (HappyWrap169 happy_var_1) -> - happyIn166- (mkHsAppTyHeadPV happy_var_1- )}--happyReduce_376 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_376 = happySpecReduce_1 150# happyReduction_376-happyReduction_376 happy_x_1- = case happyOut168 happy_x_1 of { (HappyWrap168 happy_var_1) -> - happyIn166- (failOpFewArgs (fst happy_var_1)- )}--happyReduce_377 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_377 = happySpecReduce_2 150# happyReduction_377-happyReduction_377 happy_x_2- happy_x_1- = case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> - case happyOut167 happy_x_2 of { (HappyWrap167 happy_var_2) -> - happyIn166- (happy_var_1 >>= \ happy_var_1 ->- mkHsAppTyPV happy_var_1 happy_var_2- )}}--happyReduce_378 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_378 = happySpecReduce_3 150# happyReduction_378-happyReduction_378 happy_x_3- happy_x_2- happy_x_1- = case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut169 happy_x_3 of { (HappyWrap169 happy_var_3) -> - happyIn166- (happy_var_1 >>= \ happy_var_1 ->- mkHsAppKindTyPV happy_var_1 (getLoc happy_var_2) happy_var_3- )}}}--happyReduce_379 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_379 = happySpecReduce_1 151# happyReduction_379-happyReduction_379 happy_x_1- = case happyOut169 happy_x_1 of { (HappyWrap169 happy_var_1) -> - happyIn167- (happy_var_1- )}--happyReduce_380 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_380 = happyMonadReduce 2# 151# happyReduction_380-happyReduction_380 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut157 happy_x_1 of { (HappyWrap157 happy_var_1) -> - case happyOut169 happy_x_2 of { (HappyWrap169 happy_var_2) -> - ( addUnpackednessP happy_var_1 happy_var_2)}})- ) (\r -> happyReturn (happyIn167 r))--happyReduce_381 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_381 = happySpecReduce_1 152# happyReduction_381-happyReduction_381 happy_x_1- = case happyOut282 happy_x_1 of { (HappyWrap282 happy_var_1) -> - happyIn168- ((happy_var_1, NotPromoted)- )}--happyReduce_382 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_382 = happySpecReduce_1 152# happyReduction_382-happyReduction_382 happy_x_1- = case happyOut296 happy_x_1 of { (HappyWrap296 happy_var_1) -> - happyIn168- ((happy_var_1, NotPromoted)- )}--happyReduce_383 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_383 = happyMonadReduce 2# 152# happyReduction_383-happyReduction_383 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut277 happy_x_2 of { (HappyWrap277 happy_var_2) -> - ( do { op <- amsrn (sLL happy_var_1 (reLoc happy_var_2) (unLoc happy_var_2))- (NameAnnQuote (glAA happy_var_1) (gl happy_var_2) [])- ; return (op, IsPromoted) })}})- ) (\r -> happyReturn (happyIn168 r))--happyReduce_384 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_384 = happyMonadReduce 2# 152# happyReduction_384-happyReduction_384 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut289 happy_x_2 of { (HappyWrap289 happy_var_2) -> - ( do { op <- amsrn (sLL happy_var_1 (reLoc happy_var_2) (unLoc happy_var_2))- (NameAnnQuote (glAA happy_var_1) (gl happy_var_2) [])- ; return (op, IsPromoted) })}})- ) (\r -> happyReturn (happyIn168 r))--happyReduce_385 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_385 = happyMonadReduce 1# 153# happyReduction_385-happyReduction_385 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut279 happy_x_1 of { (HappyWrap279 happy_var_1) -> - ( acsa (\cs -> sL1a (reLocN happy_var_1) (HsTyVar (EpAnn (glNR happy_var_1) [] cs) NotPromoted happy_var_1)))})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_386 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_386 = happyMonadReduce 1# 153# happyReduction_386-happyReduction_386 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut295 happy_x_1 of { (HappyWrap295 happy_var_1) -> - ( acsa (\cs -> sL1a (reLocN happy_var_1) (HsTyVar (EpAnn (glNR happy_var_1) [] cs) NotPromoted happy_var_1)))})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_387 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_387 = happyMonadReduce 1# 153# happyReduction_387-happyReduction_387 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - ( do { warnStarIsType (getLoc happy_var_1)- ; return $ reLocA $ sL1 happy_var_1 (HsStarTy noExtField (isUnicode happy_var_1)) })})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_388 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_388 = happyMonadReduce 2# 153# happyReduction_388-happyReduction_388 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut169 happy_x_2 of { (HappyWrap169 happy_var_2) -> - ( acsA (\cs -> sLLlA happy_var_1 happy_var_2 (mkBangTy (EpAnn (glR happy_var_1) [mj AnnTilde happy_var_1] cs) SrcLazy happy_var_2)))}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_389 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_389 = happyMonadReduce 2# 153# happyReduction_389-happyReduction_389 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut169 happy_x_2 of { (HappyWrap169 happy_var_2) -> - ( acsA (\cs -> sLLlA happy_var_1 happy_var_2 (mkBangTy (EpAnn (glR happy_var_1) [mj AnnBang happy_var_1] cs) SrcStrict happy_var_2)))}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_390 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_390 = happyMonadReduce 3# 153# happyReduction_390-happyReduction_390 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut191 happy_x_2 of { (HappyWrap191 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( do { decls <- acsA (\cs -> (sLL happy_var_1 happy_var_3 $ HsRecTy (EpAnn (glR happy_var_1) (AnnList (Just $ listAsAnchor happy_var_2) (Just $ moc happy_var_1) (Just $ mcc happy_var_3) [] []) cs) happy_var_2))- ; checkRecordSyntax decls })}}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_391 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_391 = happyMonadReduce 2# 153# happyReduction_391-happyReduction_391 (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 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_2 $ HsTupleTy (EpAnn (glR happy_var_1) (AnnParen AnnParens (glAA happy_var_1) (glAA happy_var_2)) cs)- HsBoxedOrConstraintTuple []))}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_392 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_392 = happyMonadReduce 5# 153# happyReduction_392-happyReduction_392 (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 happyOut159 happy_x_2 of { (HappyWrap159 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut173 happy_x_4 of { (HappyWrap173 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - ( do { h <- addTrailingCommaA happy_var_2 (gl happy_var_3)- ; acsA (\cs -> sLL happy_var_1 happy_var_5 $ HsTupleTy (EpAnn (glR happy_var_1) (AnnParen AnnParens (glAA happy_var_1) (glAA happy_var_5)) cs)- HsBoxedOrConstraintTuple (h : happy_var_4)) })}}}}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_393 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_393 = happyMonadReduce 2# 153# happyReduction_393-happyReduction_393 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_2 $ HsTupleTy (EpAnn (glR happy_var_1) (AnnParen AnnParensHash (glAA happy_var_1) (glAA happy_var_2)) cs) HsUnboxedTuple []))}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_394 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_394 = happyMonadReduce 3# 153# happyReduction_394-happyReduction_394 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut173 happy_x_2 of { (HappyWrap173 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsTupleTy (EpAnn (glR happy_var_1) (AnnParen AnnParensHash (glAA happy_var_1) (glAA happy_var_3)) cs) HsUnboxedTuple happy_var_2))}}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_395 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_395 = happyMonadReduce 3# 153# happyReduction_395-happyReduction_395 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut174 happy_x_2 of { (HappyWrap174 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsSumTy (EpAnn (glR happy_var_1) (AnnParen AnnParensHash (glAA happy_var_1) (glAA happy_var_3)) cs) happy_var_2))}}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_396 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_396 = happyMonadReduce 3# 153# happyReduction_396-happyReduction_396 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut159 happy_x_2 of { (HappyWrap159 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsListTy (EpAnn (glR happy_var_1) (AnnParen AnnParensSquare (glAA happy_var_1) (glAA happy_var_3)) cs) happy_var_2))}}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_397 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_397 = happyMonadReduce 3# 153# happyReduction_397-happyReduction_397 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut159 happy_x_2 of { (HappyWrap159 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsParTy (EpAnn (glR happy_var_1) (AnnParen AnnParens (glAA happy_var_1) (glAA happy_var_3)) cs) happy_var_2))}}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_398 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_398 = happySpecReduce_1 153# happyReduction_398-happyReduction_398 happy_x_1- = case happyOut206 happy_x_1 of { (HappyWrap206 happy_var_1) -> - happyIn169- (mapLocA (HsSpliceTy noExtField) 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 153# happyReduction_399-happyReduction_399 happy_x_1- = case happyOut219 happy_x_1 of { (HappyWrap219 happy_var_1) -> - happyIn169- (mapLocA (HsSpliceTy noExtField) happy_var_1- )}--happyReduce_400 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_400 = happyMonadReduce 2# 153# happyReduction_400-happyReduction_400 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut268 happy_x_2 of { (HappyWrap268 happy_var_2) -> - ( acsA (\cs -> sLL happy_var_1 (reLocN happy_var_2) $ HsTyVar (EpAnn (glR happy_var_1) [mj AnnSimpleQuote happy_var_1,mjN AnnName happy_var_2] cs) IsPromoted happy_var_2))}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_401 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_401 = happyMonadReduce 6# 153# happyReduction_401-happyReduction_401 (happy_x_6 `HappyStk`- happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut159 happy_x_3 of { (HappyWrap159 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - case happyOut173 happy_x_5 of { (HappyWrap173 happy_var_5) -> - case happyOutTok happy_x_6 of { happy_var_6 -> - ( do { h <- addTrailingCommaA happy_var_3 (gl happy_var_4)- ; acsA (\cs -> sLL happy_var_1 happy_var_6 $ HsExplicitTupleTy (EpAnn (glR happy_var_1) [mj AnnSimpleQuote happy_var_1,mop happy_var_2,mcp happy_var_6] cs) (h : happy_var_5)) })}}}}}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_402 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_402 = happyMonadReduce 4# 153# happyReduction_402-happyReduction_402 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut172 happy_x_3 of { (HappyWrap172 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_4 $ HsExplicitListTy (EpAnn (glR happy_var_1) [mj AnnSimpleQuote happy_var_1,mos happy_var_2,mcs happy_var_4] cs) IsPromoted happy_var_3))}}}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_403 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_403 = happyMonadReduce 2# 153# happyReduction_403-happyReduction_403 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut298 happy_x_2 of { (HappyWrap298 happy_var_2) -> - ( acsA (\cs -> sLL happy_var_1 (reLocN happy_var_2) $ HsTyVar (EpAnn (glR happy_var_1) [mj AnnSimpleQuote happy_var_1,mjN AnnName happy_var_2] cs) IsPromoted happy_var_2))}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_404 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_404 = happyMonadReduce 5# 153# happyReduction_404-happyReduction_404 (happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut159 happy_x_2 of { (HappyWrap159 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut173 happy_x_4 of { (HappyWrap173 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - ( do { h <- addTrailingCommaA happy_var_2 (gl happy_var_3)- ; acsA (\cs -> sLL happy_var_1 happy_var_5 $ HsExplicitListTy (EpAnn (glR happy_var_1) [mos happy_var_1,mcs happy_var_5] cs) NotPromoted (h:happy_var_4)) })}}}}})- ) (\r -> happyReturn (happyIn169 r))--happyReduce_405 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_405 = happySpecReduce_1 153# happyReduction_405-happyReduction_405 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn169- (reLocA $ sLL happy_var_1 happy_var_1 $ HsTyLit noExtField $ HsNumTy (getINTEGERs happy_var_1)- (il_value (getINTEGER happy_var_1))- )}--happyReduce_406 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_406 = happySpecReduce_1 153# happyReduction_406-happyReduction_406 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn169- (reLocA $ sLL happy_var_1 happy_var_1 $ HsTyLit noExtField $ HsCharTy (getCHARs happy_var_1)- (getCHAR happy_var_1)- )}--happyReduce_407 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_407 = happySpecReduce_1 153# happyReduction_407-happyReduction_407 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn169- (reLocA $ sLL happy_var_1 happy_var_1 $ HsTyLit noExtField $ HsStrTy (getSTRINGs happy_var_1)- (getSTRING happy_var_1)- )}--happyReduce_408 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_408 = happySpecReduce_1 153# happyReduction_408-happyReduction_408 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn169- (reLocA $ sL1 happy_var_1 $ mkAnonWildCardTy- )}--happyReduce_409 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_409 = happySpecReduce_1 154# happyReduction_409-happyReduction_409 happy_x_1- = case happyOut154 happy_x_1 of { (HappyWrap154 happy_var_1) -> - happyIn170- (happy_var_1- )}--happyReduce_410 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_410 = happySpecReduce_1 155# happyReduction_410-happyReduction_410 happy_x_1- = case happyOut153 happy_x_1 of { (HappyWrap153 happy_var_1) -> - happyIn171- ([happy_var_1]- )}--happyReduce_411 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_411 = happyMonadReduce 3# 155# happyReduction_411-happyReduction_411 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut153 happy_x_1 of { (HappyWrap153 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut171 happy_x_3 of { (HappyWrap171 happy_var_3) -> - ( do { h <- addTrailingCommaA happy_var_1 (gl happy_var_2)- ; return (h : happy_var_3) })}}})- ) (\r -> happyReturn (happyIn171 r))--happyReduce_412 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_412 = happySpecReduce_1 156# happyReduction_412-happyReduction_412 happy_x_1- = case happyOut173 happy_x_1 of { (HappyWrap173 happy_var_1) -> - happyIn172- (happy_var_1- )}--happyReduce_413 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_413 = happySpecReduce_0 156# happyReduction_413-happyReduction_413 = happyIn172- ([]- )--happyReduce_414 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_414 = happySpecReduce_1 157# happyReduction_414-happyReduction_414 happy_x_1- = case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> - happyIn173- ([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# 157# happyReduction_415-happyReduction_415 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut173 happy_x_3 of { (HappyWrap173 happy_var_3) -> - ( do { h <- addTrailingCommaA happy_var_1 (gl happy_var_2)- ; return (h : happy_var_3) })}}})- ) (\r -> happyReturn (happyIn173 r))--happyReduce_416 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_416 = happyMonadReduce 3# 158# happyReduction_416-happyReduction_416 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut159 happy_x_3 of { (HappyWrap159 happy_var_3) -> - ( do { h <- addTrailingVbarA happy_var_1 (gl happy_var_2)- ; return [h,happy_var_3] })}}})- ) (\r -> happyReturn (happyIn174 r))--happyReduce_417 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_417 = happyMonadReduce 3# 158# happyReduction_417-happyReduction_417 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut174 happy_x_3 of { (HappyWrap174 happy_var_3) -> - ( do { h <- addTrailingVbarA happy_var_1 (gl happy_var_2)- ; return (h : happy_var_3) })}}})- ) (\r -> happyReturn (happyIn174 r))--happyReduce_418 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_418 = happySpecReduce_2 159# happyReduction_418-happyReduction_418 happy_x_2- happy_x_1- = case happyOut176 happy_x_1 of { (HappyWrap176 happy_var_1) -> - case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> - happyIn175- (happy_var_1 : happy_var_2- )}}--happyReduce_419 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_419 = happySpecReduce_0 159# happyReduction_419-happyReduction_419 = happyIn175- ([]- )--happyReduce_420 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_420 = happySpecReduce_1 160# happyReduction_420-happyReduction_420 happy_x_1- = case happyOut177 happy_x_1 of { (HappyWrap177 happy_var_1) -> - happyIn176- (happy_var_1- )}--happyReduce_421 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_421 = happyMonadReduce 3# 160# happyReduction_421-happyReduction_421 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut295 happy_x_2 of { (HappyWrap295 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_3 (UserTyVar (EpAnn (glR happy_var_1) [moc happy_var_1, mcc happy_var_3] cs) InferredSpec happy_var_2)))}}})- ) (\r -> happyReturn (happyIn176 r))--happyReduce_422 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_422 = happyMonadReduce 5# 160# happyReduction_422-happyReduction_422 (happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut295 happy_x_2 of { (HappyWrap295 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut182 happy_x_4 of { (HappyWrap182 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_5 (KindedTyVar (EpAnn (glR happy_var_1) [moc happy_var_1,mu AnnDcolon happy_var_3 ,mcc happy_var_5] cs) InferredSpec happy_var_2 happy_var_4)))}}}}})- ) (\r -> happyReturn (happyIn176 r))--happyReduce_423 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_423 = happyMonadReduce 1# 161# happyReduction_423-happyReduction_423 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut295 happy_x_1 of { (HappyWrap295 happy_var_1) -> - ( acsA (\cs -> (sL1 (reLocN happy_var_1) (UserTyVar (EpAnn (glNR happy_var_1) [] cs) SpecifiedSpec happy_var_1))))})- ) (\r -> happyReturn (happyIn177 r))--happyReduce_424 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_424 = happyMonadReduce 5# 161# happyReduction_424-happyReduction_424 (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 happyOut295 happy_x_2 of { (HappyWrap295 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut182 happy_x_4 of { (HappyWrap182 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - ( acsA (\cs -> (sLL happy_var_1 happy_var_5 (KindedTyVar (EpAnn (glR happy_var_1) [mop happy_var_1,mu AnnDcolon happy_var_3 ,mcp happy_var_5] cs) SpecifiedSpec happy_var_2 happy_var_4))))}}}}})- ) (\r -> happyReturn (happyIn177 r))--happyReduce_425 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_425 = happySpecReduce_0 162# happyReduction_425-happyReduction_425 = happyIn178- (noLoc ([],[])- )--happyReduce_426 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_426 = happySpecReduce_2 162# happyReduction_426-happyReduction_426 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut179 happy_x_2 of { (HappyWrap179 happy_var_2) -> - happyIn178- ((sLL happy_var_1 happy_var_2 ([mj AnnVbar happy_var_1]- ,reverse (unLoc happy_var_2)))- )}}--happyReduce_427 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_427 = happyMonadReduce 3# 163# happyReduction_427-happyReduction_427 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut179 happy_x_1 of { (HappyWrap179 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut180 happy_x_3 of { (HappyWrap180 happy_var_3) -> - (- do { let (h:t) = unLoc happy_var_1 -- Safe from fds1 rules- ; h' <- addTrailingCommaA h (gl happy_var_2)- ; return (sLLlA happy_var_1 happy_var_3 (happy_var_3 : h' : t)) })}}})- ) (\r -> happyReturn (happyIn179 r))--happyReduce_428 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_428 = happySpecReduce_1 163# happyReduction_428-happyReduction_428 happy_x_1- = case happyOut180 happy_x_1 of { (HappyWrap180 happy_var_1) -> - happyIn179- (sL1A happy_var_1 [happy_var_1]- )}--happyReduce_429 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_429 = happyMonadReduce 3# 164# happyReduction_429-happyReduction_429 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut181 happy_x_1 of { (HappyWrap181 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut181 happy_x_3 of { (HappyWrap181 happy_var_3) -> - ( acsA (\cs -> L (comb3 happy_var_1 happy_var_2 happy_var_3)- (FunDep (EpAnn (glR happy_var_1) [mu AnnRarrow happy_var_2] cs)- (reverse (unLoc happy_var_1))- (reverse (unLoc happy_var_3)))))}}})- ) (\r -> happyReturn (happyIn180 r))--happyReduce_430 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_430 = happySpecReduce_0 165# happyReduction_430-happyReduction_430 = happyIn181- (noLoc []- )--happyReduce_431 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_431 = happySpecReduce_2 165# happyReduction_431-happyReduction_431 happy_x_2- happy_x_1- = case happyOut181 happy_x_1 of { (HappyWrap181 happy_var_1) -> - case happyOut295 happy_x_2 of { (HappyWrap295 happy_var_2) -> - happyIn181- (sLL happy_var_1 (reLocN happy_var_2) (happy_var_2 : (unLoc happy_var_1))- )}}--happyReduce_432 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_432 = happySpecReduce_1 166# happyReduction_432-happyReduction_432 happy_x_1- = case happyOut160 happy_x_1 of { (HappyWrap160 happy_var_1) -> - happyIn182- (happy_var_1- )}--happyReduce_433 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_433 = happyMonadReduce 4# 167# happyReduction_433-happyReduction_433 (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 happyOut184 happy_x_3 of { (HappyWrap184 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - ( checkEmptyGADTs $- 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))}}}})- ) (\r -> happyReturn (happyIn183 r))--happyReduce_434 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_434 = happyMonadReduce 4# 167# happyReduction_434-happyReduction_434 (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 happyOut184 happy_x_3 of { (HappyWrap184 happy_var_3) -> - ( checkEmptyGADTs $- L (comb2 happy_var_1 happy_var_3)- ([mj AnnWhere happy_var_1]- , unLoc happy_var_3))}})- ) (\r -> happyReturn (happyIn183 r))--happyReduce_435 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_435 = happySpecReduce_0 167# happyReduction_435-happyReduction_435 = happyIn183- (noLoc ([],[])- )--happyReduce_436 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_436 = happyMonadReduce 3# 168# happyReduction_436-happyReduction_436 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut185 happy_x_1 of { (HappyWrap185 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut184 happy_x_3 of { (HappyWrap184 happy_var_3) -> - ( do { h <- addTrailingSemiA happy_var_1 (gl happy_var_2)- ; return (L (comb2 (reLoc happy_var_1) happy_var_3) (h : unLoc happy_var_3)) })}}})- ) (\r -> happyReturn (happyIn184 r))--happyReduce_437 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_437 = happySpecReduce_1 168# happyReduction_437-happyReduction_437 happy_x_1- = case happyOut185 happy_x_1 of { (HappyWrap185 happy_var_1) -> - happyIn184- (L (glA happy_var_1) [happy_var_1]- )}--happyReduce_438 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_438 = happySpecReduce_0 168# happyReduction_438-happyReduction_438 = happyIn184- (noLoc []- )--happyReduce_439 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_439 = happyMonadReduce 4# 169# happyReduction_439-happyReduction_439 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut272 happy_x_2 of { (HappyWrap272 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut154 happy_x_4 of { (HappyWrap154 happy_var_4) -> - ( mkGadtDecl (comb2A happy_var_2 happy_var_4) (unLoc happy_var_2) (hsUniTok happy_var_3) happy_var_4)}}})- ) (\r -> happyReturn (happyIn185 r))--happyReduce_440 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_440 = happySpecReduce_2 170# happyReduction_440-happyReduction_440 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut187 happy_x_2 of { (HappyWrap187 happy_var_2) -> - happyIn186- (sLL happy_var_1 happy_var_2 ([mj AnnEqual happy_var_1],unLoc happy_var_2)- )}}--happyReduce_441 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_441 = happyMonadReduce 3# 171# happyReduction_441-happyReduction_441 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut187 happy_x_1 of { (HappyWrap187 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut188 happy_x_3 of { (HappyWrap188 happy_var_3) -> - ( do { let (h:t) = unLoc happy_var_1- ; h' <- addTrailingVbarA h (gl happy_var_2)- ; return (sLLlA happy_var_1 happy_var_3 (happy_var_3 : h' : t)) })}}})- ) (\r -> happyReturn (happyIn187 r))--happyReduce_442 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_442 = happySpecReduce_1 171# happyReduction_442-happyReduction_442 happy_x_1- = case happyOut188 happy_x_1 of { (HappyWrap188 happy_var_1) -> - happyIn187- (sL1A happy_var_1 [happy_var_1]- )}--happyReduce_443 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_443 = happyMonadReduce 4# 172# happyReduction_443-happyReduction_443 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut189 happy_x_1 of { (HappyWrap189 happy_var_1) -> - case happyOut161 happy_x_2 of { (HappyWrap161 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut190 happy_x_4 of { (HappyWrap190 happy_var_4) -> - ( acsA (\cs -> let (con,details) = unLoc happy_var_4 in- (L (comb4 happy_var_1 (reLoc happy_var_2) happy_var_3 happy_var_4) (mkConDeclH98- (EpAnn (spanAsAnchor (comb4 happy_var_1 (reLoc happy_var_2) happy_var_3 happy_var_4))- (mu AnnDarrow happy_var_3:(fst $ unLoc happy_var_1)) cs)- con- (snd $ unLoc happy_var_1)- (Just happy_var_2)- details))))}}}})- ) (\r -> happyReturn (happyIn188 r))--happyReduce_444 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_444 = happyMonadReduce 2# 172# happyReduction_444-happyReduction_444 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut189 happy_x_1 of { (HappyWrap189 happy_var_1) -> - case happyOut190 happy_x_2 of { (HappyWrap190 happy_var_2) -> - ( acsA (\cs -> let (con,details) = unLoc happy_var_2 in- (L (comb2 happy_var_1 happy_var_2) (mkConDeclH98 (EpAnn (spanAsAnchor (comb2 happy_var_1 happy_var_2)) (fst $ unLoc happy_var_1) cs)- con- (snd $ unLoc happy_var_1)- Nothing -- No context- details))))}})- ) (\r -> happyReturn (happyIn188 r))--happyReduce_445 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_445 = happySpecReduce_3 173# happyReduction_445-happyReduction_445 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn189- (sLL happy_var_1 happy_var_3 ([mu AnnForall happy_var_1,mj AnnDot happy_var_3], Just happy_var_2)- )}}}--happyReduce_446 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_446 = happySpecReduce_0 173# happyReduction_446-happyReduction_446 = happyIn189- (noLoc ([], Nothing)- )--happyReduce_447 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_447 = happyMonadReduce 1# 174# happyReduction_447-happyReduction_447 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut165 happy_x_1 of { (HappyWrap165 happy_var_1) -> - ( fmap (reLoc. (fmap (\b -> (dataConBuilderCon b,- dataConBuilderDetails b))))- (runPV happy_var_1))})- ) (\r -> happyReturn (happyIn190 r))--happyReduce_448 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_448 = happySpecReduce_0 175# happyReduction_448-happyReduction_448 = happyIn191- ([]- )--happyReduce_449 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_449 = happySpecReduce_1 175# happyReduction_449-happyReduction_449 happy_x_1- = case happyOut192 happy_x_1 of { (HappyWrap192 happy_var_1) -> - happyIn191- (happy_var_1- )}--happyReduce_450 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_450 = happyMonadReduce 3# 176# happyReduction_450-happyReduction_450 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut193 happy_x_1 of { (HappyWrap193 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut192 happy_x_3 of { (HappyWrap192 happy_var_3) -> - ( do { h <- addTrailingCommaA happy_var_1 (gl happy_var_2)- ; return (h : happy_var_3) })}}})- ) (\r -> happyReturn (happyIn192 r))--happyReduce_451 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_451 = happySpecReduce_1 176# happyReduction_451-happyReduction_451 happy_x_1- = case happyOut193 happy_x_1 of { (HappyWrap193 happy_var_1) -> - happyIn192- ([happy_var_1]- )}--happyReduce_452 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_452 = happyMonadReduce 3# 177# happyReduction_452-happyReduction_452 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut155 happy_x_1 of { (HappyWrap155 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut160 happy_x_3 of { (HappyWrap160 happy_var_3) -> - ( acsA (\cs -> L (comb2 happy_var_1 (reLoc happy_var_3))- (ConDeclField (EpAnn (glR happy_var_1) [mu AnnDcolon happy_var_2] cs)- (reverse (map (\ln@(L l n) -> L (l2l l) $ FieldOcc noExtField ln) (unLoc happy_var_1))) happy_var_3 Nothing)))}}})- ) (\r -> happyReturn (happyIn193 r))--happyReduce_453 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_453 = happySpecReduce_0 178# happyReduction_453-happyReduction_453 = happyIn194- (noLoc []- )--happyReduce_454 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_454 = happySpecReduce_1 178# happyReduction_454-happyReduction_454 happy_x_1- = case happyOut195 happy_x_1 of { (HappyWrap195 happy_var_1) -> - happyIn194- (happy_var_1- )}--happyReduce_455 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_455 = happySpecReduce_2 179# happyReduction_455-happyReduction_455 happy_x_2- happy_x_1- = case happyOut195 happy_x_1 of { (HappyWrap195 happy_var_1) -> - case happyOut196 happy_x_2 of { (HappyWrap196 happy_var_2) -> - happyIn195- (sLL happy_var_1 (reLoc happy_var_2) (happy_var_2 : unLoc happy_var_1)- )}}--happyReduce_456 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_456 = happySpecReduce_1 179# happyReduction_456-happyReduction_456 happy_x_1- = case happyOut196 happy_x_1 of { (HappyWrap196 happy_var_1) -> - happyIn195- (sL1 (reLoc happy_var_1) [happy_var_1]- )}--happyReduce_457 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_457 = happyMonadReduce 2# 180# happyReduction_457-happyReduction_457 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut197 happy_x_2 of { (HappyWrap197 happy_var_2) -> - ( let { full_loc = comb2A happy_var_1 happy_var_2 }- in acsA (\cs -> L full_loc $ HsDerivingClause (EpAnn (glR happy_var_1) [mj AnnDeriving happy_var_1] cs) Nothing happy_var_2))}})- ) (\r -> happyReturn (happyIn196 r))--happyReduce_458 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_458 = happyMonadReduce 3# 180# happyReduction_458-happyReduction_458 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut85 happy_x_2 of { (HappyWrap85 happy_var_2) -> - case happyOut197 happy_x_3 of { (HappyWrap197 happy_var_3) -> - ( let { full_loc = comb2A happy_var_1 happy_var_3 }- in acsA (\cs -> L full_loc $ HsDerivingClause (EpAnn (glR happy_var_1) [mj AnnDeriving happy_var_1] cs) (Just happy_var_2) happy_var_3))}}})- ) (\r -> happyReturn (happyIn196 r))--happyReduce_459 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_459 = happyMonadReduce 3# 180# happyReduction_459-happyReduction_459 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut197 happy_x_2 of { (HappyWrap197 happy_var_2) -> - case happyOut86 happy_x_3 of { (HappyWrap86 happy_var_3) -> - ( let { full_loc = comb2 happy_var_1 (reLoc happy_var_3) }- in acsA (\cs -> L full_loc $ HsDerivingClause (EpAnn (glR happy_var_1) [mj AnnDeriving happy_var_1] cs) (Just happy_var_3) happy_var_2))}}})- ) (\r -> happyReturn (happyIn196 r))--happyReduce_460 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_460 = happySpecReduce_1 181# happyReduction_460-happyReduction_460 happy_x_1- = case happyOut283 happy_x_1 of { (HappyWrap283 happy_var_1) -> - happyIn197- (let { tc = sL1 (reLocL happy_var_1) $ mkHsImplicitSigType $- sL1 (reLocL happy_var_1) $ HsTyVar noAnn NotPromoted happy_var_1 } in- sL1 (reLocC happy_var_1) (DctSingle noExtField tc)- )}--happyReduce_461 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_461 = happyMonadReduce 2# 181# happyReduction_461-happyReduction_461 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( amsrc (sLL happy_var_1 happy_var_2 (DctMulti noExtField []))- (AnnContext Nothing [glAA happy_var_1] [glAA happy_var_2]))}})- ) (\r -> happyReturn (happyIn197 r))--happyReduce_462 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_462 = happyMonadReduce 3# 181# happyReduction_462-happyReduction_462 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut171 happy_x_2 of { (HappyWrap171 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrc (sLL happy_var_1 happy_var_3 (DctMulti noExtField happy_var_2))- (AnnContext Nothing [glAA happy_var_1] [glAA happy_var_3]))}}})- ) (\r -> happyReturn (happyIn197 r))--happyReduce_463 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_463 = happySpecReduce_1 182# happyReduction_463-happyReduction_463 happy_x_1- = case happyOut203 happy_x_1 of { (HappyWrap203 happy_var_1) -> - happyIn198- (happy_var_1- )}--happyReduce_464 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_464 = happyMonadReduce 3# 182# happyReduction_464-happyReduction_464 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> - case happyOut151 happy_x_2 of { (HappyWrap151 happy_var_2) -> - case happyOut200 happy_x_3 of { (HappyWrap200 happy_var_3) -> - ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->- do { let { l = comb2Al happy_var_1 happy_var_3 }- ; r <- checkValDef l happy_var_1 happy_var_2 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]- ; cs <- getCommentsFor l- ; return $! (sL (commentsA l cs) $ ValD noExtField r) })}}})- ) (\r -> happyReturn (happyIn198 r))--happyReduce_465 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_465 = happySpecReduce_1 182# happyReduction_465-happyReduction_465 happy_x_1- = case happyOut113 happy_x_1 of { (HappyWrap113 happy_var_1) -> - happyIn198- (happy_var_1- )}--happyReduce_466 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_466 = happySpecReduce_1 183# happyReduction_466-happyReduction_466 happy_x_1- = case happyOut198 happy_x_1 of { (HappyWrap198 happy_var_1) -> - happyIn199- (happy_var_1- )}--happyReduce_467 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_467 = happyMonadReduce 1# 183# happyReduction_467-happyReduction_467 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut218 happy_x_1 of { (HappyWrap218 happy_var_1) -> - ( mkSpliceDecl happy_var_1)})- ) (\r -> happyReturn (happyIn199 r))--happyReduce_468 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_468 = happyMonadReduce 3# 184# happyReduction_468-happyReduction_468 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut207 happy_x_2 of { (HappyWrap207 happy_var_2) -> - case happyOut131 happy_x_3 of { (HappyWrap131 happy_var_3) -> - ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->- do { let L l (bs, csw) = adaptWhereBinds happy_var_3- ; let loc = (comb3 happy_var_1 (reLoc happy_var_2) (L l bs))- ; acs (\cs ->- sL loc (GRHSs csw (unguardedRHS (EpAnn (anc $ rs loc) (GrhsAnn Nothing (mj AnnEqual happy_var_1)) cs) loc happy_var_2)- bs)) })}}})- ) (\r -> happyReturn (happyIn200 r))--happyReduce_469 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_469 = happyMonadReduce 2# 184# happyReduction_469-happyReduction_469 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut201 happy_x_1 of { (HappyWrap201 happy_var_1) -> - case happyOut131 happy_x_2 of { (HappyWrap131 happy_var_2) -> - ( do { let {L l (bs, csw) = adaptWhereBinds happy_var_2}- ; acs (\cs -> sL (comb2 happy_var_1 (L l bs))- (GRHSs (cs Semi.<> csw) (reverse (unLoc happy_var_1)) bs)) })}})- ) (\r -> happyReturn (happyIn200 r))--happyReduce_470 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_470 = happySpecReduce_2 185# happyReduction_470-happyReduction_470 happy_x_2- happy_x_1- = case happyOut201 happy_x_1 of { (HappyWrap201 happy_var_1) -> - case happyOut202 happy_x_2 of { (HappyWrap202 happy_var_2) -> - happyIn201- (sLL happy_var_1 (reLoc happy_var_2) (happy_var_2 : unLoc happy_var_1)- )}}--happyReduce_471 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_471 = happySpecReduce_1 185# happyReduction_471-happyReduction_471 happy_x_1- = case happyOut202 happy_x_1 of { (HappyWrap202 happy_var_1) -> - happyIn201- (sL1 (reLoc happy_var_1) [happy_var_1]- )}--happyReduce_472 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_472 = happyMonadReduce 4# 186# happyReduction_472-happyReduction_472 (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 happyOut235 happy_x_2 of { (HappyWrap235 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut207 happy_x_4 of { (HappyWrap207 happy_var_4) -> - ( runPV (unECP happy_var_4) >>= \ happy_var_4 ->- acsA (\cs -> sL (comb2A happy_var_1 happy_var_4) $ GRHS (EpAnn (glR happy_var_1) (GrhsAnn (Just $ glAA happy_var_1) (mj AnnEqual happy_var_3)) cs) (unLoc happy_var_2) happy_var_4))}}}})- ) (\r -> happyReturn (happyIn202 r))--happyReduce_473 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_473 = happyMonadReduce 3# 187# happyReduction_473-happyReduction_473 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut154 happy_x_3 of { (HappyWrap154 happy_var_3) -> - ( do { happy_var_1 <- runPV (unECP happy_var_1)- ; v <- checkValSigLhs happy_var_1- ; acsA (\cs -> (sLLAl happy_var_1 (reLoc happy_var_3) $ SigD noExtField $- TypeSig (EpAnn (glAR happy_var_1) (AnnSig (mu AnnDcolon happy_var_2) []) cs) [v] (mkHsWildCardBndrs happy_var_3)))})}}})- ) (\r -> happyReturn (happyIn203 r))--happyReduce_474 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_474 = happyMonadReduce 5# 187# happyReduction_474-happyReduction_474 (happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut298 happy_x_1 of { (HappyWrap298 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut155 happy_x_3 of { (HappyWrap155 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - case happyOut154 happy_x_5 of { (HappyWrap154 happy_var_5) -> - ( do { v <- addTrailingCommaN happy_var_1 (gl happy_var_2)- ; let sig cs = TypeSig (EpAnn (glNR happy_var_1) (AnnSig (mu AnnDcolon happy_var_4) []) cs) (v : reverse (unLoc happy_var_3))- (mkHsWildCardBndrs happy_var_5)- ; acsA (\cs -> sLL (reLocN happy_var_1) (reLoc happy_var_5) $ SigD noExtField (sig cs) ) })}}}}})- ) (\r -> happyReturn (happyIn203 r))--happyReduce_475 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_475 = happyMonadReduce 3# 187# happyReduction_475-happyReduction_475 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut71 happy_x_1 of { (HappyWrap71 happy_var_1) -> - case happyOut70 happy_x_2 of { (HappyWrap70 happy_var_2) -> - case happyOut72 happy_x_3 of { (HappyWrap72 happy_var_3) -> - ( do { mbPrecAnn <- traverse (\l2 -> do { checkPrecP l2 happy_var_3- ; pure (mj AnnVal l2) })- happy_var_2- ; let (fixText, fixPrec) = case happy_var_2 of- -- If an explicit precedence isn't supplied,- -- it defaults to maxPrecedence- Nothing -> (NoSourceText, maxPrecedence)- Just l2 -> (fst $ unLoc l2, snd $ unLoc l2)- ; acsA (\cs -> sLL happy_var_1 happy_var_3 $ SigD noExtField- (FixSig (EpAnn (glR happy_var_1) (mj AnnInfix happy_var_1 : maybeToList mbPrecAnn) cs) (FixitySig noExtField (fromOL $ unLoc happy_var_3)- (Fixity fixText fixPrec (unLoc happy_var_1)))))- })}}})- ) (\r -> happyReturn (happyIn203 r))--happyReduce_476 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_476 = happySpecReduce_1 187# happyReduction_476-happyReduction_476 happy_x_1- = case happyOut118 happy_x_1 of { (HappyWrap118 happy_var_1) -> - happyIn203- (sL1 happy_var_1 . SigD noExtField . unLoc $ happy_var_1- )}--happyReduce_477 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_477 = happyMonadReduce 4# 187# happyReduction_477-happyReduction_477 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut273 happy_x_2 of { (HappyWrap273 happy_var_2) -> - case happyOut152 happy_x_3 of { (HappyWrap152 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - ( let (dcolon, tc) = happy_var_3- in acsA- (\cs -> sLL happy_var_1 happy_var_4- (SigD noExtField (CompleteMatchSig ((EpAnn (glR happy_var_1) ([ mo happy_var_1 ] ++ dcolon ++ [mc happy_var_4]) cs), (getCOMPLETE_PRAGs happy_var_1)) happy_var_2 tc))))}}}})- ) (\r -> happyReturn (happyIn203 r))--happyReduce_478 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_478 = happyMonadReduce 4# 187# happyReduction_478-happyReduction_478 (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 happyOut204 happy_x_2 of { (HappyWrap204 happy_var_2) -> - case happyOut119 happy_x_3 of { (HappyWrap119 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - ( acsA (\cs -> (sLL happy_var_1 happy_var_4 $ SigD noExtField (InlineSig (EpAnn (glR happy_var_1) ((mo happy_var_1:fst happy_var_2) ++ [mc happy_var_4]) cs) happy_var_3- (mkInlinePragma (getINLINE_PRAGs happy_var_1) (getINLINE happy_var_1)- (snd happy_var_2))))))}}}})- ) (\r -> happyReturn (happyIn203 r))--happyReduce_479 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_479 = happyMonadReduce 3# 187# happyReduction_479-happyReduction_479 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut299 happy_x_2 of { (HappyWrap299 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( acsA (\cs -> (sLL happy_var_1 happy_var_3 $ SigD noExtField (InlineSig (EpAnn (glR happy_var_1) [mo happy_var_1, mc happy_var_3] cs) happy_var_2- (mkOpaquePragma (getOPAQUE_PRAGs happy_var_1))))))}}})- ) (\r -> happyReturn (happyIn203 r))--happyReduce_480 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_480 = happyMonadReduce 3# 187# happyReduction_480-happyReduction_480 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut299 happy_x_2 of { (HappyWrap299 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_3 (SigD noExtField (SCCFunSig ((EpAnn (glR happy_var_1) [mo happy_var_1, mc happy_var_3] cs), (getSCC_PRAGs happy_var_1)) happy_var_2 Nothing))))}}})- ) (\r -> happyReturn (happyIn203 r))--happyReduce_481 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_481 = happyMonadReduce 4# 187# happyReduction_481-happyReduction_481 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut299 happy_x_2 of { (HappyWrap299 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOutTok happy_x_4 of { happy_var_4 -> - ( do { scc <- getSCC happy_var_3- ; let str_lit = StringLiteral (getSTRINGs happy_var_3) scc Nothing- ; acsA (\cs -> sLL happy_var_1 happy_var_4 (SigD noExtField (SCCFunSig ((EpAnn (glR happy_var_1) [mo happy_var_1, mc happy_var_4] cs), (getSCC_PRAGs happy_var_1)) happy_var_2 (Just ( sL1a happy_var_3 str_lit))))) })}}}})- ) (\r -> happyReturn (happyIn203 r))--happyReduce_482 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_482 = happyMonadReduce 6# 187# happyReduction_482-happyReduction_482 (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 happyOut204 happy_x_2 of { (HappyWrap204 happy_var_2) -> - case happyOut299 happy_x_3 of { (HappyWrap299 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - case happyOut156 happy_x_5 of { (HappyWrap156 happy_var_5) -> - case happyOutTok happy_x_6 of { happy_var_6 -> - ( acsA (\cs ->- let inl_prag = mkInlinePragma (getSPEC_PRAGs happy_var_1)- (NoUserInlinePrag, FunLike) (snd happy_var_2)- in sLL happy_var_1 happy_var_6 $ SigD noExtField (SpecSig (EpAnn (glR happy_var_1) (mo happy_var_1:mu AnnDcolon happy_var_4:mc happy_var_6:(fst happy_var_2)) cs) happy_var_3 (fromOL happy_var_5) inl_prag)))}}}}}})- ) (\r -> happyReturn (happyIn203 r))--happyReduce_483 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_483 = happyMonadReduce 6# 187# happyReduction_483-happyReduction_483 (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 happyOut204 happy_x_2 of { (HappyWrap204 happy_var_2) -> - case happyOut299 happy_x_3 of { (HappyWrap299 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - case happyOut156 happy_x_5 of { (HappyWrap156 happy_var_5) -> - case happyOutTok happy_x_6 of { happy_var_6 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_6 $ SigD noExtField (SpecSig (EpAnn (glR happy_var_1) (mo happy_var_1:mu AnnDcolon happy_var_4:mc happy_var_6:(fst happy_var_2)) cs) happy_var_3 (fromOL happy_var_5)- (mkInlinePragma (getSPEC_INLINE_PRAGs happy_var_1)- (getSPEC_INLINE happy_var_1) (snd happy_var_2)))))}}}}}})- ) (\r -> happyReturn (happyIn203 r))--happyReduce_484 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_484 = happyMonadReduce 4# 187# happyReduction_484-happyReduction_484 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut170 happy_x_3 of { (HappyWrap170 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_4- $ SigD noExtField (SpecInstSig ((EpAnn (glR happy_var_1) [mo happy_var_1,mj AnnInstance happy_var_2,mc happy_var_4] cs), (getSPEC_PRAGs happy_var_1)) happy_var_3)))}}}})- ) (\r -> happyReturn (happyIn203 r))--happyReduce_485 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_485 = happyMonadReduce 3# 187# happyReduction_485-happyReduction_485 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut261 happy_x_2 of { (HappyWrap261 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ SigD noExtField (MinimalSig ((EpAnn (glR happy_var_1) [mo happy_var_1,mc happy_var_3] cs), (getMINIMAL_PRAGs happy_var_1)) happy_var_2)))}}})- ) (\r -> happyReturn (happyIn203 r))--happyReduce_486 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_486 = happySpecReduce_0 188# happyReduction_486-happyReduction_486 = happyIn204- (([],Nothing)- )--happyReduce_487 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_487 = happySpecReduce_1 188# happyReduction_487-happyReduction_487 happy_x_1- = case happyOut205 happy_x_1 of { (HappyWrap205 happy_var_1) -> - happyIn204- ((fst happy_var_1,Just (snd happy_var_1))- )}--happyReduce_488 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_488 = happySpecReduce_3 189# happyReduction_488-happyReduction_488 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 -> - happyIn205- (([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_489 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_489 = happyReduce 4# 189# happyReduction_489-happyReduction_489 (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 happyOut135 happy_x_2 of { (HappyWrap135 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOutTok happy_x_4 of { happy_var_4 -> - happyIn205- ((happy_var_2++[mj AnnOpenS happy_var_1,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_490 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_490 = happySpecReduce_1 190# happyReduction_490-happyReduction_490 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn206- (let { loc = getLoc happy_var_1- ; ITquasiQuote (quoter, quote, quoteSpan) = unLoc happy_var_1- ; quoterId = mkUnqual varName quoter }- in sL1 happy_var_1 (HsQuasiQuote noExtField quoterId (L (noAnnSrcSpan (mkSrcSpanPs quoteSpan)) quote))- )}--happyReduce_491 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_491 = happySpecReduce_1 190# happyReduction_491-happyReduction_491 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn206- (let { loc = getLoc happy_var_1- ; ITqQuasiQuote (qual, quoter, quote, quoteSpan) = unLoc happy_var_1- ; quoterId = mkQual varName (qual, quoter) }- in sL1 happy_var_1 (HsQuasiQuote noExtField quoterId (L (noAnnSrcSpan (mkSrcSpanPs quoteSpan)) quote))- )}--happyReduce_492 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_492 = happySpecReduce_3 191# happyReduction_492-happyReduction_492 happy_x_3- happy_x_2- happy_x_1- = case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut160 happy_x_3 of { (HappyWrap160 happy_var_3) -> - happyIn207- (ECP $- unECP happy_var_1 >>= \ happy_var_1 ->- rejectPragmaPV happy_var_1 >>- mkHsTySigPV (noAnnSrcSpan $ comb2Al happy_var_1 (reLoc happy_var_3)) happy_var_1 happy_var_3- [(mu AnnDcolon happy_var_2)]- )}}}--happyReduce_493 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_493 = happyMonadReduce 3# 191# happyReduction_493-happyReduction_493 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut207 happy_x_3 of { (HappyWrap207 happy_var_3) -> - ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->- runPV (unECP happy_var_3) >>= \ happy_var_3 ->- fmap ecpFromCmd $- acsA (\cs -> sLLAA happy_var_1 happy_var_3 $ HsCmdArrApp (EpAnn (glAR happy_var_1) (mu Annlarrowtail happy_var_2) cs) happy_var_1 happy_var_3- HsFirstOrderApp True))}}})- ) (\r -> happyReturn (happyIn207 r))--happyReduce_494 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_494 = happyMonadReduce 3# 191# happyReduction_494-happyReduction_494 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut207 happy_x_3 of { (HappyWrap207 happy_var_3) -> - ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->- runPV (unECP happy_var_3) >>= \ happy_var_3 ->- fmap ecpFromCmd $- acsA (\cs -> sLLAA happy_var_1 happy_var_3 $ HsCmdArrApp (EpAnn (glAR happy_var_1) (mu Annrarrowtail happy_var_2) cs) happy_var_3 happy_var_1- HsFirstOrderApp False))}}})- ) (\r -> happyReturn (happyIn207 r))--happyReduce_495 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_495 = happyMonadReduce 3# 191# happyReduction_495-happyReduction_495 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut207 happy_x_3 of { (HappyWrap207 happy_var_3) -> - ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->- runPV (unECP happy_var_3) >>= \ happy_var_3 ->- fmap ecpFromCmd $- acsA (\cs -> sLLAA happy_var_1 happy_var_3 $ HsCmdArrApp (EpAnn (glAR happy_var_1) (mu AnnLarrowtail happy_var_2) cs) happy_var_1 happy_var_3- HsHigherOrderApp True))}}})- ) (\r -> happyReturn (happyIn207 r))--happyReduce_496 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_496 = happyMonadReduce 3# 191# happyReduction_496-happyReduction_496 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut207 happy_x_3 of { (HappyWrap207 happy_var_3) -> - ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->- runPV (unECP happy_var_3) >>= \ happy_var_3 ->- fmap ecpFromCmd $- acsA (\cs -> sLLAA happy_var_1 happy_var_3 $ HsCmdArrApp (EpAnn (glAR happy_var_1) (mu AnnRarrowtail happy_var_2) cs) happy_var_3 happy_var_1- HsHigherOrderApp False))}}})- ) (\r -> happyReturn (happyIn207 r))--happyReduce_497 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_497 = happySpecReduce_1 191# happyReduction_497-happyReduction_497 happy_x_1- = case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> - happyIn207- (happy_var_1- )}--happyReduce_498 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_498 = happySpecReduce_1 191# happyReduction_498-happyReduction_498 happy_x_1- = case happyOut322 happy_x_1 of { (HappyWrap322 happy_var_1) -> - happyIn207- (happy_var_1- )}--happyReduce_499 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_499 = happySpecReduce_1 192# happyReduction_499-happyReduction_499 happy_x_1- = case happyOut210 happy_x_1 of { (HappyWrap210 happy_var_1) -> - happyIn208- (happy_var_1- )}--happyReduce_500 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_500 = happySpecReduce_3 192# happyReduction_500-happyReduction_500 happy_x_3- happy_x_2- happy_x_1- = case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> - case happyOut290 happy_x_2 of { (HappyWrap290 happy_var_2) -> - case happyOut209 happy_x_3 of { (HappyWrap209 happy_var_3) -> - happyIn208- (ECP $- superInfixOp $- happy_var_2 >>= \ happy_var_2 ->- unECP happy_var_1 >>= \ happy_var_1 ->- unECP happy_var_3 >>= \ happy_var_3 ->- rejectPragmaPV happy_var_1 >>- (mkHsOpAppPV (comb2A (reLoc happy_var_1) happy_var_3) happy_var_1 happy_var_2 happy_var_3)- )}}}--happyReduce_501 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_501 = happySpecReduce_1 193# happyReduction_501-happyReduction_501 happy_x_1- = case happyOut210 happy_x_1 of { (HappyWrap210 happy_var_1) -> - happyIn209- (happy_var_1- )}--happyReduce_502 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_502 = happySpecReduce_1 193# happyReduction_502-happyReduction_502 happy_x_1- = case happyOut323 happy_x_1 of { (HappyWrap323 happy_var_1) -> - happyIn209- (happy_var_1- )}--happyReduce_503 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_503 = happySpecReduce_2 194# happyReduction_503-happyReduction_503 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut213 happy_x_2 of { (HappyWrap213 happy_var_2) -> - happyIn210- (ECP $- unECP happy_var_2 >>= \ happy_var_2 ->- mkHsNegAppPV (comb2A happy_var_1 happy_var_2) happy_var_2- [mj AnnMinus happy_var_1]- )}}--happyReduce_504 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_504 = happySpecReduce_1 194# happyReduction_504-happyReduction_504 happy_x_1- = case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> - happyIn210- (happy_var_1- )}--happyReduce_505 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_505 = happySpecReduce_1 195# happyReduction_505-happyReduction_505 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn211- ((msemim happy_var_1,True)- )}--happyReduce_506 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_506 = happySpecReduce_0 195# happyReduction_506-happyReduction_506 = happyIn211- ((Nothing,False)- )--happyReduce_507 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_507 = happyMonadReduce 3# 196# happyReduction_507-happyReduction_507 (happy_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- ; acs (\cs -> (sLL happy_var_1 happy_var_3- (HsPragSCC- ((EpAnn (glR happy_var_1) (AnnPragma (mo happy_var_1) (mc happy_var_3) [mj AnnValStr happy_var_2]) cs),- (getSCC_PRAGs happy_var_1))- (StringLiteral (getSTRINGs happy_var_2) scc Nothing))))})}}})- ) (\r -> happyReturn (happyIn212 r))--happyReduce_508 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_508 = happyMonadReduce 3# 196# happyReduction_508-happyReduction_508 (happy_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 -> - ( acs (\cs -> (sLL happy_var_1 happy_var_3- (HsPragSCC- ((EpAnn (glR happy_var_1) (AnnPragma (mo happy_var_1) (mc happy_var_3) [mj AnnVal happy_var_2]) cs),- (getSCC_PRAGs happy_var_1))- (StringLiteral NoSourceText (getVARID happy_var_2) Nothing)))))}}})- ) (\r -> happyReturn (happyIn212 r))--happyReduce_509 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_509 = happySpecReduce_2 197# happyReduction_509-happyReduction_509 happy_x_2- happy_x_1- = case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> - case happyOut214 happy_x_2 of { (HappyWrap214 happy_var_2) -> - happyIn213- (ECP $- superFunArg $- unECP happy_var_1 >>= \ happy_var_1 ->- unECP happy_var_2 >>= \ happy_var_2 ->- mkHsAppPV (noAnnSrcSpan $ comb2A (reLoc happy_var_1) happy_var_2) happy_var_1 happy_var_2- )}}--happyReduce_510 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_510 = happySpecReduce_3 197# happyReduction_510-happyReduction_510 happy_x_3- happy_x_2- happy_x_1- = case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut169 happy_x_3 of { (HappyWrap169 happy_var_3) -> - happyIn213- (ECP $- unECP happy_var_1 >>= \ happy_var_1 ->- mkHsAppTypePV (noAnnSrcSpan $ comb2 (reLoc happy_var_1) (reLoc happy_var_3)) happy_var_1 (hsTok happy_var_2) happy_var_3- )}}}--happyReduce_511 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_511 = happyMonadReduce 2# 197# happyReduction_511-happyReduction_511 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut214 happy_x_2 of { (HappyWrap214 happy_var_2) -> - ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->- fmap ecpFromExp $- acsA (\cs -> sLL happy_var_1 (reLoc happy_var_2) $ HsStatic (EpAnn (glR happy_var_1) [mj AnnStatic happy_var_1] cs) happy_var_2))}})- ) (\r -> happyReturn (happyIn213 r))--happyReduce_512 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_512 = happySpecReduce_1 197# happyReduction_512-happyReduction_512 happy_x_1- = case happyOut214 happy_x_1 of { (HappyWrap214 happy_var_1) -> - happyIn213- (happy_var_1- )}--happyReduce_513 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_513 = happySpecReduce_3 198# happyReduction_513-happyReduction_513 happy_x_3- happy_x_2- happy_x_1- = case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut214 happy_x_3 of { (HappyWrap214 happy_var_3) -> - happyIn214- (ECP $- unECP happy_var_3 >>= \ happy_var_3 ->- mkHsAsPatPV (comb2 (reLocN happy_var_1) (reLoc happy_var_3)) happy_var_1 (hsTok happy_var_2) happy_var_3- )}}}--happyReduce_514 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_514 = happySpecReduce_2 198# happyReduction_514-happyReduction_514 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut214 happy_x_2 of { (HappyWrap214 happy_var_2) -> - happyIn214- (ECP $- unECP happy_var_2 >>= \ happy_var_2 ->- mkHsLazyPatPV (comb2 happy_var_1 (reLoc happy_var_2)) happy_var_2 [mj AnnTilde happy_var_1]- )}}--happyReduce_515 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_515 = happySpecReduce_2 198# happyReduction_515-happyReduction_515 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut214 happy_x_2 of { (HappyWrap214 happy_var_2) -> - happyIn214- (ECP $- unECP happy_var_2 >>= \ happy_var_2 ->- mkHsBangPatPV (comb2 happy_var_1 (reLoc happy_var_2)) happy_var_2 [mj AnnBang happy_var_1]- )}}--happyReduce_516 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_516 = happySpecReduce_2 198# happyReduction_516-happyReduction_516 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut214 happy_x_2 of { (HappyWrap214 happy_var_2) -> - happyIn214- (ECP $- unECP happy_var_2 >>= \ happy_var_2 ->- mkHsNegAppPV (comb2A happy_var_1 happy_var_2) happy_var_2 [mj AnnMinus happy_var_1]- )}}--happyReduce_517 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_517 = happyReduce 4# 198# happyReduction_517-happyReduction_517 (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 happyOut246 happy_x_2 of { (HappyWrap246 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut207 happy_x_4 of { (HappyWrap207 happy_var_4) -> - happyIn214- (ECP $- unECP happy_var_4 >>= \ happy_var_4 ->- mkHsLamPV (comb2 happy_var_1 (reLoc happy_var_4)) (\cs -> mkMatchGroup FromSource- (reLocA $ sLLlA happy_var_1 happy_var_4- [reLocA $ sLLlA happy_var_1 happy_var_4- $ Match { m_ext = EpAnn (glR happy_var_1) [mj AnnLam happy_var_1] cs- , m_ctxt = LambdaExpr- , m_pats = happy_var_2- , m_grhss = unguardedGRHSs (comb2 happy_var_3 (reLoc happy_var_4)) happy_var_4 (EpAnn (glR happy_var_3) (GrhsAnn Nothing (mu AnnRarrow happy_var_3)) emptyComments) }]))- ) `HappyStk` happyRest}}}}--happyReduce_518 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_518 = happyReduce 4# 198# happyReduction_518-happyReduction_518 (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 happyOut130 happy_x_2 of { (HappyWrap130 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut207 happy_x_4 of { (HappyWrap207 happy_var_4) -> - happyIn214- (ECP $- unECP happy_var_4 >>= \ happy_var_4 ->- mkHsLetPV (comb2A happy_var_1 happy_var_4) (hsTok happy_var_1) (unLoc happy_var_2) (hsTok happy_var_3) happy_var_4- ) `HappyStk` happyRest}}}}--happyReduce_519 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_519 = happySpecReduce_3 198# happyReduction_519-happyReduction_519 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 happyOut321 happy_x_3 of { (HappyWrap321 happy_var_3) -> - happyIn214- (ECP $ happy_var_3 >>= \ happy_var_3 ->- mkHsLamCasePV (comb2 happy_var_1 (reLoc happy_var_3)) LamCase happy_var_3 [mj AnnLam happy_var_1,mj AnnCase happy_var_2]- )}}}--happyReduce_520 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_520 = happySpecReduce_3 198# happyReduction_520-happyReduction_520 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 happyOut320 happy_x_3 of { (HappyWrap320 happy_var_3) -> - happyIn214- (ECP $ happy_var_3 >>= \ happy_var_3 ->- mkHsLamCasePV (comb2 happy_var_1 (reLoc happy_var_3)) LamCases happy_var_3 [mj AnnLam happy_var_1,mj AnnCases happy_var_2]- )}}}--happyReduce_521 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_521 = happyMonadReduce 8# 198# happyReduction_521-happyReduction_521 (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 happyOut207 happy_x_2 of { (HappyWrap207 happy_var_2) -> - case happyOut211 happy_x_3 of { (HappyWrap211 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - case happyOut207 happy_x_5 of { (HappyWrap207 happy_var_5) -> - case happyOut211 happy_x_6 of { (HappyWrap211 happy_var_6) -> - case happyOutTok happy_x_7 of { happy_var_7 -> - case happyOut207 happy_x_8 of { (HappyWrap207 happy_var_8) -> - ( runPV (unECP happy_var_2) >>= \ (happy_var_2 :: LHsExpr GhcPs) ->- return $ ECP $- unECP happy_var_5 >>= \ happy_var_5 ->- unECP happy_var_8 >>= \ happy_var_8 ->- mkHsIfPV (comb2A happy_var_1 happy_var_8) happy_var_2 (snd happy_var_3) happy_var_5 (snd happy_var_6) happy_var_8- (AnnsIf- { aiIf = glAA happy_var_1- , aiThen = glAA happy_var_4- , aiElse = glAA happy_var_7- , aiThenSemi = fst happy_var_3- , aiElseSemi = fst happy_var_6}))}}}}}}}})- ) (\r -> happyReturn (happyIn214 r))--happyReduce_522 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_522 = happyMonadReduce 2# 198# happyReduction_522-happyReduction_522 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut240 happy_x_2 of { (HappyWrap240 happy_var_2) -> - ( hintMultiWayIf (getLoc happy_var_1) >>= \_ ->- fmap ecpFromExp $- acsA (\cs -> sLL happy_var_1 happy_var_2 $ HsMultiIf (EpAnn (glR happy_var_1) (mj AnnIf happy_var_1:(fst $ unLoc happy_var_2)) cs)- (reverse $ snd $ unLoc happy_var_2)))}})- ) (\r -> happyReturn (happyIn214 r))--happyReduce_523 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_523 = happyMonadReduce 4# 198# happyReduction_523-happyReduction_523 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut207 happy_x_2 of { (HappyWrap207 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut321 happy_x_4 of { (HappyWrap321 happy_var_4) -> - ( runPV (unECP happy_var_2) >>= \ (happy_var_2 :: LHsExpr GhcPs) ->- return $ ECP $- happy_var_4 >>= \ happy_var_4 ->- mkHsCasePV (comb3 happy_var_1 happy_var_3 (reLoc happy_var_4)) happy_var_2 happy_var_4- (EpAnnHsCase (glAA happy_var_1) (glAA happy_var_3) []))}}}})- ) (\r -> happyReturn (happyIn214 r))--happyReduce_524 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_524 = happyMonadReduce 2# 198# happyReduction_524-happyReduction_524 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut247 happy_x_2 of { (HappyWrap247 happy_var_2) -> - ( do- hintQualifiedDo happy_var_1- return $ ECP $- happy_var_2 >>= \ happy_var_2 ->- mkHsDoPV (comb2A happy_var_1 happy_var_2)- (fmap mkModuleNameFS (getDO happy_var_1))- happy_var_2- (AnnList (Just $ glAR happy_var_2) Nothing Nothing [mj AnnDo happy_var_1] []))}})- ) (\r -> happyReturn (happyIn214 r))--happyReduce_525 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_525 = happyMonadReduce 2# 198# happyReduction_525-happyReduction_525 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut247 happy_x_2 of { (HappyWrap247 happy_var_2) -> - ( hintQualifiedDo happy_var_1 >> runPV happy_var_2 >>= \ happy_var_2 ->- fmap ecpFromExp $- acsA (\cs -> L (comb2A happy_var_1 happy_var_2)- (mkHsDoAnns (MDoExpr $- fmap mkModuleNameFS (getMDO happy_var_1))- happy_var_2- (EpAnn (glR happy_var_1) (AnnList (Just $ glAR happy_var_2) Nothing Nothing [mj AnnMdo happy_var_1] []) cs) )))}})- ) (\r -> happyReturn (happyIn214 r))--happyReduce_526 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_526 = happyMonadReduce 4# 198# happyReduction_526-happyReduction_526 (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 happyOut214 happy_x_2 of { (HappyWrap214 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut207 happy_x_4 of { (HappyWrap207 happy_var_4) -> - ( (checkPattern <=< runPV) (unECP happy_var_2) >>= \ p ->- runPV (unECP happy_var_4) >>= \ happy_var_4@cmd ->- fmap ecpFromExp $- acsA (\cs -> sLLlA happy_var_1 happy_var_4 $ HsProc (EpAnn (glR happy_var_1) [mj AnnProc happy_var_1,mu AnnRarrow happy_var_3] cs) p (sLLa happy_var_1 (reLoc happy_var_4) $ HsCmdTop noExtField cmd)))}}}})- ) (\r -> happyReturn (happyIn214 r))--happyReduce_527 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_527 = happySpecReduce_1 198# happyReduction_527-happyReduction_527 happy_x_1- = case happyOut215 happy_x_1 of { (HappyWrap215 happy_var_1) -> - happyIn214- (happy_var_1- )}--happyReduce_528 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_528 = happyReduce 4# 199# happyReduction_528-happyReduction_528 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest)- = case happyOut215 happy_x_1 of { (HappyWrap215 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut253 happy_x_3 of { (HappyWrap253 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - happyIn215- (ECP $- getBit OverloadedRecordUpdateBit >>= \ overloaded ->- unECP happy_var_1 >>= \ happy_var_1 ->- happy_var_3 >>= \ happy_var_3 ->- mkHsRecordPV overloaded (comb2 (reLoc happy_var_1) happy_var_4) (comb2 happy_var_2 happy_var_4) happy_var_1 happy_var_3- [moc happy_var_2,mcc happy_var_4]- ) `HappyStk` happyRest}}}}--happyReduce_529 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_529 = happyMonadReduce 3# 199# happyReduction_529-happyReduction_529 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut215 happy_x_1 of { (HappyWrap215 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut300 happy_x_3 of { (HappyWrap300 happy_var_3) -> - ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->- fmap ecpFromExp $ acsa (\cs ->- let fl = sLLa happy_var_2 (reLoc happy_var_3) (DotFieldOcc ((EpAnn (glR happy_var_2) (AnnFieldLabel (Just $ glAA happy_var_2)) emptyComments)) happy_var_3) in- mkRdrGetField (noAnnSrcSpan $ comb2 (reLoc happy_var_1) (reLoc happy_var_3)) happy_var_1 fl (EpAnn (glAR happy_var_1) NoEpAnns cs)))}}})- ) (\r -> happyReturn (happyIn215 r))--happyReduce_530 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_530 = happySpecReduce_1 199# happyReduction_530-happyReduction_530 happy_x_1- = case happyOut216 happy_x_1 of { (HappyWrap216 happy_var_1) -> - happyIn215- (happy_var_1- )}--happyReduce_531 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_531 = happySpecReduce_1 200# happyReduction_531-happyReduction_531 happy_x_1- = case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> - happyIn216- (ECP $ mkHsVarPV $! happy_var_1- )}--happyReduce_532 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_532 = happySpecReduce_1 200# happyReduction_532-happyReduction_532 happy_x_1- = case happyOut269 happy_x_1 of { (HappyWrap269 happy_var_1) -> - happyIn216- (ECP $ mkHsVarPV $! happy_var_1- )}--happyReduce_533 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_533 = happyMonadReduce 1# 200# happyReduction_533-happyReduction_533 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut259 happy_x_1 of { (HappyWrap259 happy_var_1) -> - ( acsExpr (\cs -> sL1a happy_var_1 (HsIPVar (comment (glRR happy_var_1) cs) $! unLoc happy_var_1)))})- ) (\r -> happyReturn (happyIn216 r))--happyReduce_534 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_534 = happyMonadReduce 1# 200# happyReduction_534-happyReduction_534 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut260 happy_x_1 of { (HappyWrap260 happy_var_1) -> - ( acsExpr (\cs -> sL1a happy_var_1 (HsOverLabel (comment (glRR happy_var_1) cs) (fst $! unLoc happy_var_1) (snd $! unLoc happy_var_1))))})- ) (\r -> happyReturn (happyIn216 r))--happyReduce_535 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_535 = happySpecReduce_1 200# happyReduction_535-happyReduction_535 happy_x_1- = case happyOut314 happy_x_1 of { (HappyWrap314 happy_var_1) -> - happyIn216- (ECP $ pvA (mkHsLitPV $! happy_var_1)- )}--happyReduce_536 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_536 = happySpecReduce_1 200# happyReduction_536-happyReduction_536 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn216- (ECP $ mkHsOverLitPV (sL1a happy_var_1 $ mkHsIntegral (getINTEGER happy_var_1))- )}--happyReduce_537 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_537 = happySpecReduce_1 200# happyReduction_537-happyReduction_537 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn216- (ECP $ mkHsOverLitPV (sL1a happy_var_1 $ mkHsFractional (getRATIONAL happy_var_1))- )}--happyReduce_538 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_538 = happySpecReduce_3 200# happyReduction_538-happyReduction_538 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut225 happy_x_2 of { (HappyWrap225 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn216- (ECP $- unECP happy_var_2 >>= \ happy_var_2 ->- mkHsParPV (comb2 happy_var_1 happy_var_3) (hsTok happy_var_1) happy_var_2 (hsTok happy_var_3)- )}}}--happyReduce_539 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_539 = happySpecReduce_3 200# happyReduction_539-happyReduction_539 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut226 happy_x_2 of { (HappyWrap226 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn216- (ECP $- happy_var_2 >>= \ happy_var_2 ->- mkSumOrTuplePV (noAnnSrcSpan $ comb2 happy_var_1 happy_var_3) Boxed happy_var_2- [mop happy_var_1,mcp happy_var_3]- )}}}--happyReduce_540 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_540 = happySpecReduce_3 200# happyReduction_540-happyReduction_540 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut217 happy_x_2 of { (HappyWrap217 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn216- (ECP $- acsA (\cs -> sLL happy_var_1 happy_var_3 $ mkRdrProjection (NE.reverse (unLoc happy_var_2)) (EpAnn (glR happy_var_1) (AnnProjection (glAA happy_var_1) (glAA happy_var_3)) cs))- >>= ecpFromExp'- )}}}--happyReduce_541 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_541 = happySpecReduce_3 200# happyReduction_541-happyReduction_541 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut225 happy_x_2 of { (HappyWrap225 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn216- (ECP $- unECP happy_var_2 >>= \ happy_var_2 ->- mkSumOrTuplePV (noAnnSrcSpan $ comb2 happy_var_1 happy_var_3) Unboxed (Tuple [Right happy_var_2])- [moh happy_var_1,mch happy_var_3]- )}}}--happyReduce_542 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_542 = happySpecReduce_3 200# happyReduction_542-happyReduction_542 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut226 happy_x_2 of { (HappyWrap226 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn216- (ECP $- happy_var_2 >>= \ happy_var_2 ->- mkSumOrTuplePV (noAnnSrcSpan $ comb2 happy_var_1 happy_var_3) Unboxed happy_var_2- [moh happy_var_1,mch happy_var_3]- )}}}--happyReduce_543 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_543 = happySpecReduce_3 200# happyReduction_543-happyReduction_543 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut229 happy_x_2 of { (HappyWrap229 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn216- (ECP $ happy_var_2 (comb2 happy_var_1 happy_var_3) (mos happy_var_1,mcs happy_var_3)- )}}}--happyReduce_544 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_544 = happySpecReduce_1 200# happyReduction_544-happyReduction_544 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn216- (ECP $ pvA $ mkHsWildCardPV (getLoc happy_var_1)- )}--happyReduce_545 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_545 = happySpecReduce_1 200# happyReduction_545-happyReduction_545 happy_x_1- = case happyOut219 happy_x_1 of { (HappyWrap219 happy_var_1) -> - happyIn216- (ECP $ pvA $ mkHsSplicePV happy_var_1- )}--happyReduce_546 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_546 = happySpecReduce_1 200# happyReduction_546-happyReduction_546 happy_x_1- = case happyOut220 happy_x_1 of { (HappyWrap220 happy_var_1) -> - happyIn216- (ecpFromExp $ fmap (uncurry HsTypedSplice) (reLocA happy_var_1)- )}--happyReduce_547 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_547 = happyMonadReduce 2# 200# happyReduction_547-happyReduction_547 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut299 happy_x_2 of { (HappyWrap299 happy_var_2) -> - ( fmap ecpFromExp $ acsA (\cs -> sLL happy_var_1 (reLocN happy_var_2) $ HsUntypedBracket (EpAnn (glR happy_var_1) [mj AnnSimpleQuote happy_var_1] cs) (VarBr noExtField True happy_var_2)))}})- ) (\r -> happyReturn (happyIn216 r))--happyReduce_548 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_548 = happyMonadReduce 2# 200# happyReduction_548-happyReduction_548 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut269 happy_x_2 of { (HappyWrap269 happy_var_2) -> - ( fmap ecpFromExp $ acsA (\cs -> sLL happy_var_1 (reLocN happy_var_2) $ HsUntypedBracket (EpAnn (glR happy_var_1) [mj AnnSimpleQuote happy_var_1] cs) (VarBr noExtField True happy_var_2)))}})- ) (\r -> happyReturn (happyIn216 r))--happyReduce_549 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_549 = happyMonadReduce 2# 200# happyReduction_549-happyReduction_549 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut295 happy_x_2 of { (HappyWrap295 happy_var_2) -> - ( fmap ecpFromExp $ acsA (\cs -> sLL happy_var_1 (reLocN happy_var_2) $ HsUntypedBracket (EpAnn (glR happy_var_1) [mj AnnThTyQuote happy_var_1 ] cs) (VarBr noExtField False happy_var_2)))}})- ) (\r -> happyReturn (happyIn216 r))--happyReduce_550 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_550 = happyMonadReduce 2# 200# happyReduction_550-happyReduction_550 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut278 happy_x_2 of { (HappyWrap278 happy_var_2) -> - ( fmap ecpFromExp $ acsA (\cs -> sLL happy_var_1 (reLocN happy_var_2) $ HsUntypedBracket (EpAnn (glR happy_var_1) [mj AnnThTyQuote happy_var_1 ] cs) (VarBr noExtField False happy_var_2)))}})- ) (\r -> happyReturn (happyIn216 r))--happyReduce_551 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_551 = happyMonadReduce 1# 200# happyReduction_551-happyReduction_551 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - ( reportEmptyDoubleQuotes (getLoc happy_var_1))})- ) (\r -> happyReturn (happyIn216 r))--happyReduce_552 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_552 = happyMonadReduce 3# 200# 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 happyOut207 happy_x_2 of { (HappyWrap207 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->- fmap ecpFromExp $- acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsUntypedBracket (EpAnn (glR happy_var_1) (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]) cs) (ExpBr noExtField happy_var_2)))}}})- ) (\r -> happyReturn (happyIn216 r))--happyReduce_553 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_553 = happyMonadReduce 3# 200# happyReduction_553-happyReduction_553 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut207 happy_x_2 of { (HappyWrap207 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->- fmap ecpFromExp $- acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsTypedBracket (EpAnn (glR happy_var_1) (if (hasE happy_var_1) then [mj AnnOpenE happy_var_1,mc happy_var_3] else [mo happy_var_1,mc happy_var_3]) cs) happy_var_2))}}})- ) (\r -> happyReturn (happyIn216 r))--happyReduce_554 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_554 = happyMonadReduce 3# 200# happyReduction_554-happyReduction_554 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut159 happy_x_2 of { (HappyWrap159 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( fmap ecpFromExp $- acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsUntypedBracket (EpAnn (glR happy_var_1) [mo happy_var_1,mu AnnCloseQ happy_var_3] cs) (TypBr noExtField happy_var_2)))}}})- ) (\r -> happyReturn (happyIn216 r))--happyReduce_555 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_555 = happyMonadReduce 3# 200# happyReduction_555-happyReduction_555 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut208 happy_x_2 of { (HappyWrap208 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( (checkPattern <=< runPV) (unECP happy_var_2) >>= \p ->- fmap ecpFromExp $- acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsUntypedBracket (EpAnn (glR happy_var_1) [mo happy_var_1,mu AnnCloseQ happy_var_3] cs) (PatBr noExtField p)))}}})- ) (\r -> happyReturn (happyIn216 r))--happyReduce_556 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_556 = happyMonadReduce 3# 200# happyReduction_556-happyReduction_556 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut223 happy_x_2 of { (HappyWrap223 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( fmap ecpFromExp $- acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsUntypedBracket (EpAnn (glR happy_var_1) (mo happy_var_1:mu AnnCloseQ happy_var_3:fst happy_var_2) cs) (DecBrL noExtField (snd happy_var_2))))}}})- ) (\r -> happyReturn (happyIn216 r))--happyReduce_557 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_557 = happySpecReduce_1 200# happyReduction_557-happyReduction_557 happy_x_1- = case happyOut206 happy_x_1 of { (HappyWrap206 happy_var_1) -> - happyIn216- (ECP $ pvA $ mkHsSplicePV happy_var_1- )}--happyReduce_558 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_558 = happyMonadReduce 4# 200# happyReduction_558-happyReduction_558 (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 happyOut214 happy_x_2 of { (HappyWrap214 happy_var_2) -> - case happyOut221 happy_x_3 of { (HappyWrap221 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->- fmap ecpFromCmd $- acsA (\cs -> sLL happy_var_1 happy_var_4 $ HsCmdArrForm (EpAnn (glR happy_var_1) (AnnList (Just $ glR happy_var_1) (Just $ mu AnnOpenB happy_var_1) (Just $ mu AnnCloseB happy_var_4) [] []) cs) happy_var_2 Prefix- Nothing (reverse happy_var_3)))}}}})- ) (\r -> happyReturn (happyIn216 r))--happyReduce_559 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_559 = happyMonadReduce 3# 201# happyReduction_559-happyReduction_559 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut217 happy_x_1 of { (HappyWrap217 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut300 happy_x_3 of { (HappyWrap300 happy_var_3) -> - ( acs (\cs -> sLL happy_var_1 (reLoc happy_var_3) ((sLLa happy_var_2 (reLoc happy_var_3) $ DotFieldOcc (EpAnn (glR happy_var_1) (AnnFieldLabel (Just $ glAA happy_var_2)) cs) happy_var_3) `NE.cons` unLoc happy_var_1)))}}})- ) (\r -> happyReturn (happyIn217 r))--happyReduce_560 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_560 = happyMonadReduce 2# 201# happyReduction_560-happyReduction_560 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut300 happy_x_2 of { (HappyWrap300 happy_var_2) -> - ( acs (\cs -> sLL happy_var_1 (reLoc happy_var_2) ((sLLa happy_var_1 (reLoc happy_var_2) $ DotFieldOcc (EpAnn (glR happy_var_1) (AnnFieldLabel (Just $ glAA happy_var_1)) cs) happy_var_2) :| [])))}})- ) (\r -> happyReturn (happyIn217 r))--happyReduce_561 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_561 = happySpecReduce_1 202# happyReduction_561-happyReduction_561 happy_x_1- = case happyOut219 happy_x_1 of { (HappyWrap219 happy_var_1) -> - happyIn218- (fmap (HsUntypedSplice noAnn) (reLocA happy_var_1)- )}--happyReduce_562 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_562 = happySpecReduce_1 202# happyReduction_562-happyReduction_562 happy_x_1- = case happyOut220 happy_x_1 of { (HappyWrap220 happy_var_1) -> - happyIn218- (fmap (uncurry HsTypedSplice) (reLocA happy_var_1)- )}--happyReduce_563 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_563 = happyMonadReduce 2# 203# happyReduction_563-happyReduction_563 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut216 happy_x_2 of { (HappyWrap216 happy_var_2) -> - ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->- acs (\cs -> sLLlA happy_var_1 happy_var_2 $ HsUntypedSpliceExpr (EpAnn (glR happy_var_1) [mj AnnDollar happy_var_1] cs) happy_var_2))}})- ) (\r -> happyReturn (happyIn219 r))--happyReduce_564 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_564 = happyMonadReduce 2# 204# happyReduction_564-happyReduction_564 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut216 happy_x_2 of { (HappyWrap216 happy_var_2) -> - ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->- acs (\cs -> sLLlA happy_var_1 happy_var_2 $ ((noAnn, EpAnn (glR happy_var_1) [mj AnnDollarDollar happy_var_1] cs), happy_var_2)))}})- ) (\r -> happyReturn (happyIn220 r))--happyReduce_565 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_565 = happySpecReduce_2 205# happyReduction_565-happyReduction_565 happy_x_2- happy_x_1- = case happyOut221 happy_x_1 of { (HappyWrap221 happy_var_1) -> - case happyOut222 happy_x_2 of { (HappyWrap222 happy_var_2) -> - happyIn221- (happy_var_2 : happy_var_1- )}}--happyReduce_566 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_566 = happySpecReduce_0 205# happyReduction_566-happyReduction_566 = happyIn221- ([]- )--happyReduce_567 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_567 = happyMonadReduce 1# 206# happyReduction_567-happyReduction_567 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut214 happy_x_1 of { (HappyWrap214 happy_var_1) -> - ( runPV (unECP happy_var_1) >>= \ (cmd :: LHsCmd GhcPs) ->- runPV (checkCmdBlockArguments cmd) >>= \ _ ->- return (sL1a (reLoc cmd) $ HsCmdTop noExtField cmd))})- ) (\r -> happyReturn (happyIn222 r))--happyReduce_568 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_568 = happySpecReduce_3 207# happyReduction_568-happyReduction_568 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut224 happy_x_2 of { (HappyWrap224 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn223- (([mj AnnOpenC happy_var_1- ,mj AnnCloseC happy_var_3],happy_var_2)- )}}}--happyReduce_569 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_569 = happySpecReduce_3 207# happyReduction_569-happyReduction_569 happy_x_3- happy_x_2- happy_x_1- = case happyOut224 happy_x_2 of { (HappyWrap224 happy_var_2) -> - happyIn223- (([],happy_var_2)- )}--happyReduce_570 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_570 = happySpecReduce_1 208# happyReduction_570-happyReduction_570 happy_x_1- = case happyOut74 happy_x_1 of { (HappyWrap74 happy_var_1) -> - happyIn224- (cvTopDecls happy_var_1- )}--happyReduce_571 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_571 = happySpecReduce_1 208# happyReduction_571-happyReduction_571 happy_x_1- = case happyOut73 happy_x_1 of { (HappyWrap73 happy_var_1) -> - happyIn224- (cvTopDecls happy_var_1- )}--happyReduce_572 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_572 = happySpecReduce_1 209# happyReduction_572-happyReduction_572 happy_x_1- = case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> - happyIn225- (happy_var_1- )}--happyReduce_573 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_573 = happyMonadReduce 2# 209# happyReduction_573-happyReduction_573 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> - case happyOut290 happy_x_2 of { (HappyWrap290 happy_var_2) -> - ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->- runPV (rejectPragmaPV happy_var_1) >>- runPV happy_var_2 >>= \ happy_var_2 ->- return $ ecpFromExp $- reLocA $ sLL (reLoc happy_var_1) (reLocN happy_var_2) $ SectionL noAnn happy_var_1 (n2l happy_var_2))}})- ) (\r -> happyReturn (happyIn225 r))--happyReduce_574 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_574 = happySpecReduce_2 209# happyReduction_574-happyReduction_574 happy_x_2- happy_x_1- = case happyOut291 happy_x_1 of { (HappyWrap291 happy_var_1) -> - case happyOut208 happy_x_2 of { (HappyWrap208 happy_var_2) -> - happyIn225- (ECP $- superInfixOp $- unECP happy_var_2 >>= \ happy_var_2 ->- happy_var_1 >>= \ happy_var_1 ->- pvA $ mkHsSectionR_PV (comb2 (reLocN happy_var_1) (reLoc happy_var_2)) (n2l happy_var_1) happy_var_2- )}}--happyReduce_575 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_575 = happySpecReduce_3 209# happyReduction_575-happyReduction_575 happy_x_3- happy_x_2- happy_x_1- = case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut225 happy_x_3 of { (HappyWrap225 happy_var_3) -> - happyIn225- (ECP $- unECP happy_var_1 >>= \ happy_var_1 ->- unECP happy_var_3 >>= \ happy_var_3 ->- mkHsViewPatPV (comb2 (reLoc happy_var_1) (reLoc happy_var_3)) happy_var_1 happy_var_3 [mu AnnRarrow happy_var_2]- )}}}--happyReduce_576 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_576 = happySpecReduce_2 210# happyReduction_576-happyReduction_576 happy_x_2- happy_x_1- = case happyOut225 happy_x_1 of { (HappyWrap225 happy_var_1) -> - case happyOut227 happy_x_2 of { (HappyWrap227 happy_var_2) -> - happyIn226- (unECP happy_var_1 >>= \ happy_var_1 ->- happy_var_2 >>= \ happy_var_2 ->- do { t <- amsA happy_var_1 [AddCommaAnn (srcSpan2e $ fst happy_var_2)]- ; return (Tuple (Right t : snd happy_var_2)) }- )}}--happyReduce_577 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_577 = happySpecReduce_2 210# happyReduction_577-happyReduction_577 happy_x_2- happy_x_1- = case happyOut317 happy_x_1 of { (HappyWrap317 happy_var_1) -> - case happyOut228 happy_x_2 of { (HappyWrap228 happy_var_2) -> - happyIn226- (happy_var_2 >>= \ happy_var_2 ->- do { let {cos = map (\ll -> (Left (EpAnn (anc $ rs ll) (srcSpan2e ll) emptyComments))) (fst happy_var_1) }- ; return (Tuple (cos ++ happy_var_2)) }- )}}--happyReduce_578 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_578 = happySpecReduce_2 210# happyReduction_578-happyReduction_578 happy_x_2- happy_x_1- = case happyOut225 happy_x_1 of { (HappyWrap225 happy_var_1) -> - case happyOut319 happy_x_2 of { (HappyWrap319 happy_var_2) -> - happyIn226- (unECP happy_var_1 >>= \ happy_var_1 -> return $- (Sum 1 (snd happy_var_2 + 1) happy_var_1 [] (map srcSpan2e $ fst happy_var_2))- )}}--happyReduce_579 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_579 = happySpecReduce_3 210# happyReduction_579-happyReduction_579 happy_x_3- happy_x_2- happy_x_1- = case happyOut319 happy_x_1 of { (HappyWrap319 happy_var_1) -> - case happyOut225 happy_x_2 of { (HappyWrap225 happy_var_2) -> - case happyOut318 happy_x_3 of { (HappyWrap318 happy_var_3) -> - happyIn226- (unECP happy_var_2 >>= \ happy_var_2 -> return $- (Sum (snd happy_var_1 + 1) (snd happy_var_1 + snd happy_var_3 + 1) happy_var_2- (map srcSpan2e $ fst happy_var_1)- (map srcSpan2e $ fst happy_var_3))- )}}}--happyReduce_580 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_580 = happySpecReduce_2 211# happyReduction_580-happyReduction_580 happy_x_2- happy_x_1- = case happyOut317 happy_x_1 of { (HappyWrap317 happy_var_1) -> - case happyOut228 happy_x_2 of { (HappyWrap228 happy_var_2) -> - happyIn227- (happy_var_2 >>= \ happy_var_2 ->- do { let {cos = map (\l -> (Left (EpAnn (anc $ rs l) (srcSpan2e l) emptyComments))) (tail $ fst happy_var_1) }- ; return ((head $ fst happy_var_1, cos ++ happy_var_2)) }- )}}--happyReduce_581 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_581 = happySpecReduce_2 212# happyReduction_581-happyReduction_581 happy_x_2- happy_x_1- = case happyOut225 happy_x_1 of { (HappyWrap225 happy_var_1) -> - case happyOut227 happy_x_2 of { (HappyWrap227 happy_var_2) -> - happyIn228- (unECP happy_var_1 >>= \ happy_var_1 ->- happy_var_2 >>= \ happy_var_2 ->- do { t <- amsA happy_var_1 [AddCommaAnn (srcSpan2e $ fst happy_var_2)]- ; return (Right t : snd happy_var_2) }- )}}--happyReduce_582 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_582 = happySpecReduce_1 212# happyReduction_582-happyReduction_582 happy_x_1- = case happyOut225 happy_x_1 of { (HappyWrap225 happy_var_1) -> - happyIn228- (unECP happy_var_1 >>= \ happy_var_1 ->- return [Right happy_var_1]- )}--happyReduce_583 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_583 = happySpecReduce_0 212# happyReduction_583-happyReduction_583 = happyIn228- (return [Left noAnn]- )--happyReduce_584 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_584 = happySpecReduce_1 213# happyReduction_584-happyReduction_584 happy_x_1- = case happyOut225 happy_x_1 of { (HappyWrap225 happy_var_1) -> - happyIn229- (\loc (ao,ac) -> unECP happy_var_1 >>= \ happy_var_1 ->- mkHsExplicitListPV loc [happy_var_1] (AnnList Nothing (Just ao) (Just ac) [] [])- )}--happyReduce_585 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_585 = happySpecReduce_1 213# happyReduction_585-happyReduction_585 happy_x_1- = case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> - happyIn229- (\loc (ao,ac) -> happy_var_1 >>= \ happy_var_1 ->- mkHsExplicitListPV loc (reverse happy_var_1) (AnnList Nothing (Just ao) (Just ac) [] [])- )}--happyReduce_586 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_586 = happySpecReduce_2 213# happyReduction_586-happyReduction_586 happy_x_2- happy_x_1- = case happyOut225 happy_x_1 of { (HappyWrap225 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn229- (\loc (ao,ac) -> unECP happy_var_1 >>= \ happy_var_1 ->- acsA (\cs -> L loc $ ArithSeq (EpAnn (spanAsAnchor loc) [ao,mj AnnDotdot happy_var_2,ac] cs) Nothing (From happy_var_1))- >>= ecpFromExp'- )}}--happyReduce_587 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_587 = happyReduce 4# 213# happyReduction_587-happyReduction_587 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest)- = case happyOut225 happy_x_1 of { (HappyWrap225 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut207 happy_x_3 of { (HappyWrap207 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - happyIn229- (\loc (ao,ac) ->- unECP happy_var_1 >>= \ happy_var_1 ->- unECP happy_var_3 >>= \ happy_var_3 ->- acsA (\cs -> L loc $ ArithSeq (EpAnn (spanAsAnchor loc) [ao,mj AnnComma happy_var_2,mj AnnDotdot happy_var_4,ac] cs) Nothing (FromThen happy_var_1 happy_var_3))- >>= ecpFromExp'- ) `HappyStk` happyRest}}}}--happyReduce_588 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_588 = happySpecReduce_3 213# happyReduction_588-happyReduction_588 happy_x_3- happy_x_2- happy_x_1- = case happyOut225 happy_x_1 of { (HappyWrap225 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut207 happy_x_3 of { (HappyWrap207 happy_var_3) -> - happyIn229- (\loc (ao,ac) ->- unECP happy_var_1 >>= \ happy_var_1 ->- unECP happy_var_3 >>= \ happy_var_3 ->- acsA (\cs -> L loc $ ArithSeq (EpAnn (spanAsAnchor loc) [ao,mj AnnDotdot happy_var_2,ac] cs) Nothing (FromTo happy_var_1 happy_var_3))- >>= ecpFromExp'- )}}}--happyReduce_589 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_589 = happyReduce 5# 213# happyReduction_589-happyReduction_589 (happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest)- = case happyOut225 happy_x_1 of { (HappyWrap225 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut207 happy_x_3 of { (HappyWrap207 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - case happyOut207 happy_x_5 of { (HappyWrap207 happy_var_5) -> - happyIn229- (\loc (ao,ac) ->- unECP happy_var_1 >>= \ happy_var_1 ->- unECP happy_var_3 >>= \ happy_var_3 ->- unECP happy_var_5 >>= \ happy_var_5 ->- acsA (\cs -> L loc $ ArithSeq (EpAnn (spanAsAnchor loc) [ao,mj AnnComma happy_var_2,mj AnnDotdot happy_var_4,ac] cs) Nothing (FromThenTo happy_var_1 happy_var_3 happy_var_5))- >>= ecpFromExp'- ) `HappyStk` happyRest}}}}}--happyReduce_590 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_590 = happySpecReduce_3 213# happyReduction_590-happyReduction_590 happy_x_3- happy_x_2- happy_x_1- = case happyOut225 happy_x_1 of { (HappyWrap225 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut231 happy_x_3 of { (HappyWrap231 happy_var_3) -> - happyIn229- (\loc (ao,ac) ->- checkMonadComp >>= \ ctxt ->- unECP happy_var_1 >>= \ happy_var_1 -> do { t <- addTrailingVbarA happy_var_1 (gl happy_var_2)- ; acsA (\cs -> L loc $ mkHsCompAnns ctxt (unLoc happy_var_3) t (EpAnn (spanAsAnchor loc) (AnnList Nothing (Just ao) (Just ac) [] []) cs))- >>= ecpFromExp' }- )}}}--happyReduce_591 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_591 = happySpecReduce_3 214# happyReduction_591-happyReduction_591 happy_x_3- happy_x_2- happy_x_1- = case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut225 happy_x_3 of { (HappyWrap225 happy_var_3) -> - happyIn230- (happy_var_1 >>= \ happy_var_1 ->- unECP happy_var_3 >>= \ happy_var_3 ->- case happy_var_1 of- (h:t) -> do- h' <- addTrailingCommaA h (gl happy_var_2)- return (((:) $! happy_var_3) $! (h':t))- )}}}--happyReduce_592 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_592 = happySpecReduce_3 214# happyReduction_592-happyReduction_592 happy_x_3- happy_x_2- happy_x_1- = case happyOut225 happy_x_1 of { (HappyWrap225 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut225 happy_x_3 of { (HappyWrap225 happy_var_3) -> - happyIn230- (unECP happy_var_1 >>= \ happy_var_1 ->- unECP happy_var_3 >>= \ happy_var_3 ->- do { h <- addTrailingCommaA happy_var_1 (gl happy_var_2)- ; return [happy_var_3,h] }- )}}}--happyReduce_593 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_593 = happySpecReduce_1 215# happyReduction_593-happyReduction_593 happy_x_1- = case happyOut232 happy_x_1 of { (HappyWrap232 happy_var_1) -> - happyIn231- (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 [sL1a happy_var_1 $ ParStmt noExtField [ParStmtBlock noExtField qs [] noSyntaxExpr |- qs <- qss]- noExpr noSyntaxExpr]- -- We actually found some actual parallel lists so- -- we wrap them into as a ParStmt- )}--happyReduce_594 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_594 = happyMonadReduce 3# 216# happyReduction_594-happyReduction_594 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut233 happy_x_1 of { (HappyWrap233 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut232 happy_x_3 of { (HappyWrap232 happy_var_3) -> - ( case unLoc happy_var_1 of- (h:t) -> do- h' <- addTrailingVbarA h (gl happy_var_2)- return (sLL happy_var_1 happy_var_3 (reverse (h':t) : unLoc happy_var_3)))}}})- ) (\r -> happyReturn (happyIn232 r))--happyReduce_595 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_595 = happySpecReduce_1 216# happyReduction_595-happyReduction_595 happy_x_1- = case happyOut233 happy_x_1 of { (HappyWrap233 happy_var_1) -> - happyIn232- (L (getLoc happy_var_1) [reverse (unLoc happy_var_1)]- )}--happyReduce_596 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_596 = happyMonadReduce 3# 217# happyReduction_596-happyReduction_596 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut233 happy_x_1 of { (HappyWrap233 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut234 happy_x_3 of { (HappyWrap234 happy_var_3) -> - ( case unLoc happy_var_1 of- (h:t) -> do- h' <- addTrailingCommaA h (gl happy_var_2)- return (sLL happy_var_1 happy_var_3 [sLLa happy_var_1 happy_var_3 ((unLoc happy_var_3) (glRR happy_var_1) (reverse (h':t)))]))}}})- ) (\r -> happyReturn (happyIn233 r))--happyReduce_597 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_597 = happyMonadReduce 3# 217# happyReduction_597-happyReduction_597 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut233 happy_x_1 of { (HappyWrap233 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut252 happy_x_3 of { (HappyWrap252 happy_var_3) -> - ( runPV happy_var_3 >>= \ happy_var_3 ->- case unLoc happy_var_1 of- (h:t) -> do- h' <- addTrailingCommaA h (gl happy_var_2)- return (sLL happy_var_1 (reLoc happy_var_3) (happy_var_3 : (h':t))))}}})- ) (\r -> happyReturn (happyIn233 r))--happyReduce_598 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_598 = happyMonadReduce 1# 217# happyReduction_598-happyReduction_598 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut234 happy_x_1 of { (HappyWrap234 happy_var_1) -> - ( return (sLL happy_var_1 happy_var_1 [L (getLocAnn happy_var_1) ((unLoc happy_var_1) (glRR happy_var_1) [])]))})- ) (\r -> happyReturn (happyIn233 r))--happyReduce_599 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_599 = happyMonadReduce 1# 217# happyReduction_599-happyReduction_599 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut252 happy_x_1 of { (HappyWrap252 happy_var_1) -> - ( runPV happy_var_1 >>= \ happy_var_1 ->- return $ sL1A happy_var_1 [happy_var_1])})- ) (\r -> happyReturn (happyIn233 r))--happyReduce_600 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_600 = happyMonadReduce 2# 218# happyReduction_600-happyReduction_600 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut207 happy_x_2 of { (HappyWrap207 happy_var_2) -> - ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->- acs (\cs->- sLLlA happy_var_1 happy_var_2 (\r ss -> (mkTransformStmt (EpAnn (anc r) [mj AnnThen happy_var_1] cs) ss happy_var_2))))}})- ) (\r -> happyReturn (happyIn234 r))--happyReduce_601 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_601 = happyMonadReduce 4# 218# happyReduction_601-happyReduction_601 (happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut207 happy_x_2 of { (HappyWrap207 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut207 happy_x_4 of { (HappyWrap207 happy_var_4) -> - ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->- runPV (unECP happy_var_4) >>= \ happy_var_4 ->- acs (\cs -> sLLlA happy_var_1 happy_var_4 (- \r ss -> (mkTransformByStmt (EpAnn (anc r) [mj AnnThen happy_var_1,mj AnnBy happy_var_3] cs) ss happy_var_2 happy_var_4))))}}}})- ) (\r -> happyReturn (happyIn234 r))--happyReduce_602 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_602 = happyMonadReduce 4# 218# happyReduction_602-happyReduction_602 (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 happyOut207 happy_x_4 of { (HappyWrap207 happy_var_4) -> - ( runPV (unECP happy_var_4) >>= \ happy_var_4 ->- acs (\cs -> sLLlA happy_var_1 happy_var_4 (- \r ss -> (mkGroupUsingStmt (EpAnn (anc r) [mj AnnThen happy_var_1,mj AnnGroup happy_var_2,mj AnnUsing happy_var_3] cs) ss happy_var_4))))}}}})- ) (\r -> happyReturn (happyIn234 r))--happyReduce_603 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_603 = happyMonadReduce 6# 218# happyReduction_603-happyReduction_603 (happy_x_6 `HappyStk`- happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) 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 happyOut207 happy_x_4 of { (HappyWrap207 happy_var_4) -> - case happyOutTok happy_x_5 of { happy_var_5 -> - case happyOut207 happy_x_6 of { (HappyWrap207 happy_var_6) -> - ( runPV (unECP happy_var_4) >>= \ happy_var_4 ->- runPV (unECP happy_var_6) >>= \ happy_var_6 ->- acs (\cs -> sLLlA happy_var_1 happy_var_6 (- \r ss -> (mkGroupByUsingStmt (EpAnn (anc r) [mj AnnThen happy_var_1,mj AnnGroup happy_var_2,mj AnnBy happy_var_3,mj AnnUsing happy_var_5] cs) ss happy_var_4 happy_var_6))))}}}}}})- ) (\r -> happyReturn (happyIn234 r))--happyReduce_604 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_604 = happySpecReduce_1 219# happyReduction_604-happyReduction_604 happy_x_1- = case happyOut236 happy_x_1 of { (HappyWrap236 happy_var_1) -> - happyIn235- (L (getLoc happy_var_1) (reverse (unLoc happy_var_1))- )}--happyReduce_605 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_605 = happyMonadReduce 3# 220# happyReduction_605-happyReduction_605 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut236 happy_x_1 of { (HappyWrap236 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut252 happy_x_3 of { (HappyWrap252 happy_var_3) -> - ( runPV happy_var_3 >>= \ happy_var_3 ->- case unLoc happy_var_1 of- (h:t) -> do- h' <- addTrailingCommaA h (gl happy_var_2)- return (sLL happy_var_1 (reLoc happy_var_3) (happy_var_3 : (h':t))))}}})- ) (\r -> happyReturn (happyIn236 r))--happyReduce_606 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_606 = happyMonadReduce 1# 220# happyReduction_606-happyReduction_606 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut252 happy_x_1 of { (HappyWrap252 happy_var_1) -> - ( runPV happy_var_1 >>= \ happy_var_1 ->- return $ sL1A happy_var_1 [happy_var_1])})- ) (\r -> happyReturn (happyIn236 r))--happyReduce_607 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_607 = happySpecReduce_2 221# happyReduction_607-happyReduction_607 happy_x_2- happy_x_1- = case happyOut238 happy_x_1 of { (HappyWrap238 happy_var_1) -> - case happyOut131 happy_x_2 of { (HappyWrap131 happy_var_2) -> - happyIn237- (happy_var_1 >>= \alt ->- do { let {L l (bs, csw) = adaptWhereBinds happy_var_2}- ; acs (\cs -> sLL alt (L l bs) (GRHSs (cs Semi.<> csw) (unLoc alt) bs)) }- )}}--happyReduce_608 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_608 = happySpecReduce_2 222# happyReduction_608-happyReduction_608 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut207 happy_x_2 of { (HappyWrap207 happy_var_2) -> - happyIn238- (unECP happy_var_2 >>= \ happy_var_2 ->- acs (\cs -> sLLlA happy_var_1 happy_var_2 (unguardedRHS (EpAnn (glR happy_var_1) (GrhsAnn Nothing (mu AnnRarrow happy_var_1)) cs) (comb2 happy_var_1 (reLoc happy_var_2)) happy_var_2))- )}}--happyReduce_609 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_609 = happySpecReduce_1 222# happyReduction_609-happyReduction_609 happy_x_1- = case happyOut239 happy_x_1 of { (HappyWrap239 happy_var_1) -> - happyIn238- (happy_var_1 >>= \gdpats ->- return $ sL1 gdpats (reverse (unLoc gdpats))- )}--happyReduce_610 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_610 = happySpecReduce_2 223# happyReduction_610-happyReduction_610 happy_x_2- happy_x_1- = case happyOut239 happy_x_1 of { (HappyWrap239 happy_var_1) -> - case happyOut241 happy_x_2 of { (HappyWrap241 happy_var_2) -> - happyIn239- (happy_var_1 >>= \gdpats ->- happy_var_2 >>= \gdpat ->- return $ sLL gdpats (reLoc gdpat) (gdpat : unLoc gdpats)- )}}--happyReduce_611 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_611 = happySpecReduce_1 223# happyReduction_611-happyReduction_611 happy_x_1- = case happyOut241 happy_x_1 of { (HappyWrap241 happy_var_1) -> - happyIn239- (happy_var_1 >>= \gdpat -> return $ sL1A gdpat [gdpat]- )}--happyReduce_612 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_612 = happyMonadReduce 3# 224# happyReduction_612-happyReduction_612 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut239 happy_x_2 of { (HappyWrap239 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( runPV happy_var_2 >>= \ happy_var_2 ->- return $ sLL happy_var_1 happy_var_3 ([moc happy_var_1,mcc happy_var_3],unLoc happy_var_2))}}})- ) (\r -> happyReturn (happyIn240 r))--happyReduce_613 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_613 = happyMonadReduce 2# 224# happyReduction_613-happyReduction_613 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut239 happy_x_1 of { (HappyWrap239 happy_var_1) -> - ( runPV happy_var_1 >>= \ happy_var_1 ->- return $ sL1 happy_var_1 ([],unLoc happy_var_1))})- ) (\r -> happyReturn (happyIn240 r))--happyReduce_614 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_614 = happyReduce 4# 225# happyReduction_614-happyReduction_614 (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 happyOut235 happy_x_2 of { (HappyWrap235 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - case happyOut207 happy_x_4 of { (HappyWrap207 happy_var_4) -> - happyIn241- (unECP happy_var_4 >>= \ happy_var_4 ->- acsA (\cs -> sL (comb2A happy_var_1 happy_var_4) $ GRHS (EpAnn (glR happy_var_1) (GrhsAnn (Just $ glAA happy_var_1) (mu AnnRarrow happy_var_3)) cs) (unLoc happy_var_2) happy_var_4)- ) `HappyStk` happyRest}}}}--happyReduce_615 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_615 = happyMonadReduce 1# 226# happyReduction_615-happyReduction_615 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> - ( (checkPattern <=< runPV) (unECP happy_var_1))})- ) (\r -> happyReturn (happyIn242 r))--happyReduce_616 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_616 = happySpecReduce_1 227# happyReduction_616-happyReduction_616 happy_x_1- = case happyOut242 happy_x_1 of { (HappyWrap242 happy_var_1) -> - happyIn243- ([ happy_var_1 ]- )}--happyReduce_617 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_617 = happyMonadReduce 1# 228# happyReduction_617-happyReduction_617 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> - ( -- See Note [Parser-Validator Details] in GHC.Parser.PostProcess- checkPattern_details incompleteDoBlock- (unECP happy_var_1))})- ) (\r -> happyReturn (happyIn244 r))--happyReduce_618 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_618 = happyMonadReduce 1# 229# happyReduction_618-happyReduction_618 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut214 happy_x_1 of { (HappyWrap214 happy_var_1) -> - ( (checkPattern <=< runPV) (unECP happy_var_1))})- ) (\r -> happyReturn (happyIn245 r))--happyReduce_619 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_619 = happySpecReduce_2 230# happyReduction_619-happyReduction_619 happy_x_2- happy_x_1- = case happyOut245 happy_x_1 of { (HappyWrap245 happy_var_1) -> - case happyOut246 happy_x_2 of { (HappyWrap246 happy_var_2) -> - happyIn246- (happy_var_1 : happy_var_2- )}}--happyReduce_620 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_620 = happySpecReduce_0 230# happyReduction_620-happyReduction_620 = happyIn246- ([]- )--happyReduce_621 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_621 = happySpecReduce_3 231# happyReduction_621-happyReduction_621 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut248 happy_x_2 of { (HappyWrap248 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn247- (happy_var_2 >>= \ happy_var_2 ->- amsrl (sLL happy_var_1 happy_var_3 (reverse $ snd $ unLoc happy_var_2)) (AnnList (Just $ stmtsAnchor happy_var_2) (Just $ moc happy_var_1) (Just $ mcc happy_var_3) (fromOL $ fst $ unLoc happy_var_2) [])- )}}}--happyReduce_622 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_622 = happySpecReduce_3 231# happyReduction_622-happyReduction_622 happy_x_3- happy_x_2- happy_x_1- = case happyOut248 happy_x_2 of { (HappyWrap248 happy_var_2) -> - happyIn247- (happy_var_2 >>= \ happy_var_2 -> amsrl- (L (stmtsLoc happy_var_2) (reverse $ snd $ unLoc happy_var_2)) (AnnList (Just $ stmtsAnchor happy_var_2) Nothing Nothing (fromOL $ fst $ unLoc happy_var_2) [])- )}--happyReduce_623 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_623 = happySpecReduce_3 232# happyReduction_623-happyReduction_623 happy_x_3- happy_x_2- happy_x_1- = case happyOut248 happy_x_1 of { (HappyWrap248 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut251 happy_x_3 of { (HappyWrap251 happy_var_3) -> - happyIn248- (happy_var_1 >>= \ happy_var_1 ->- happy_var_3 >>= \ (happy_var_3 :: LStmt GhcPs (LocatedA b)) ->- case (snd $ unLoc happy_var_1) of- [] -> return (sLL happy_var_1 (reLoc happy_var_3) ((fst $ unLoc happy_var_1) `snocOL` (mj AnnSemi happy_var_2)- ,happy_var_3 : (snd $ unLoc happy_var_1)))- (h:t) -> do- { h' <- addTrailingSemiA h (gl happy_var_2)- ; return $ sLL happy_var_1 (reLoc happy_var_3) (fst $ unLoc happy_var_1,happy_var_3 :(h':t)) }- )}}}--happyReduce_624 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_624 = happySpecReduce_2 232# happyReduction_624-happyReduction_624 happy_x_2- happy_x_1- = case happyOut248 happy_x_1 of { (HappyWrap248 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn248- (happy_var_1 >>= \ happy_var_1 ->- case (snd $ unLoc happy_var_1) of- [] -> return (sLL happy_var_1 happy_var_2 ((fst $ unLoc happy_var_1) `snocOL` (mj AnnSemi happy_var_2),snd $ unLoc happy_var_1))- (h:t) -> do- { h' <- addTrailingSemiA h (gl happy_var_2)- ; return $ sL1 happy_var_1 (fst $ unLoc happy_var_1,h':t) }- )}}--happyReduce_625 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_625 = happySpecReduce_1 232# happyReduction_625-happyReduction_625 happy_x_1- = case happyOut251 happy_x_1 of { (HappyWrap251 happy_var_1) -> - happyIn248- (happy_var_1 >>= \ happy_var_1 ->- return $ sL1A happy_var_1 (nilOL,[happy_var_1])- )}--happyReduce_626 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_626 = happySpecReduce_0 232# happyReduction_626-happyReduction_626 = happyIn248- (return $ noLoc (nilOL,[])- )--happyReduce_627 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_627 = happyMonadReduce 1# 233# happyReduction_627-happyReduction_627 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut251 happy_x_1 of { (HappyWrap251 happy_var_1) -> - ( fmap Just (runPV happy_var_1))})- ) (\r -> happyReturn (happyIn249 r))--happyReduce_628 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_628 = happySpecReduce_0 233# happyReduction_628-happyReduction_628 = happyIn249- (Nothing- )--happyReduce_629 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_629 = happyMonadReduce 1# 234# happyReduction_629-happyReduction_629 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut251 happy_x_1 of { (HappyWrap251 happy_var_1) -> - ( runPV happy_var_1)})- ) (\r -> happyReturn (happyIn250 r))--happyReduce_630 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_630 = happySpecReduce_1 235# happyReduction_630-happyReduction_630 happy_x_1- = case happyOut252 happy_x_1 of { (HappyWrap252 happy_var_1) -> - happyIn251- (happy_var_1- )}--happyReduce_631 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_631 = happySpecReduce_2 235# happyReduction_631-happyReduction_631 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut247 happy_x_2 of { (HappyWrap247 happy_var_2) -> - happyIn251- (happy_var_2 >>= \ happy_var_2 ->- acsA (\cs -> (sLL happy_var_1 (reLoc happy_var_2) $ mkRecStmt- (EpAnn (glR happy_var_1) (hsDoAnn happy_var_1 happy_var_2 AnnRec) cs)- happy_var_2))- )}}--happyReduce_632 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_632 = happySpecReduce_3 236# happyReduction_632-happyReduction_632 happy_x_3- happy_x_2- happy_x_1- = case happyOut244 happy_x_1 of { (HappyWrap244 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut207 happy_x_3 of { (HappyWrap207 happy_var_3) -> - happyIn252- (unECP happy_var_3 >>= \ happy_var_3 ->- acsA (\cs -> sLLlA (reLoc happy_var_1) happy_var_3- $ mkPsBindStmt (EpAnn (glAR happy_var_1) [mu AnnLarrow happy_var_2] cs) happy_var_1 happy_var_3)- )}}}--happyReduce_633 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_633 = happySpecReduce_1 236# happyReduction_633-happyReduction_633 happy_x_1- = case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> - happyIn252- (unECP happy_var_1 >>= \ happy_var_1 ->- return $ sL1 happy_var_1 $ mkBodyStmt happy_var_1- )}--happyReduce_634 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_634 = happySpecReduce_2 236# happyReduction_634-happyReduction_634 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut130 happy_x_2 of { (HappyWrap130 happy_var_2) -> - happyIn252- (acsA (\cs -> (sLL happy_var_1 happy_var_2- $ mkLetStmt (EpAnn (glR happy_var_1) [mj AnnLet happy_var_1] cs) (unLoc happy_var_2)))- )}}--happyReduce_635 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_635 = happySpecReduce_1 237# happyReduction_635-happyReduction_635 happy_x_1- = case happyOut254 happy_x_1 of { (HappyWrap254 happy_var_1) -> - happyIn253- (happy_var_1- )}--happyReduce_636 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_636 = happySpecReduce_0 237# happyReduction_636-happyReduction_636 = happyIn253- (return ([], Nothing)- )--happyReduce_637 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_637 = happySpecReduce_3 238# happyReduction_637-happyReduction_637 happy_x_3- happy_x_2- happy_x_1- = case happyOut255 happy_x_1 of { (HappyWrap255 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut254 happy_x_3 of { (HappyWrap254 happy_var_3) -> - happyIn254- (happy_var_1 >>= \ happy_var_1 ->- happy_var_3 >>= \ happy_var_3 -> do- h <- addTrailingCommaFBind happy_var_1 (gl happy_var_2)- return (case happy_var_3 of (flds, dd) -> (h : flds, dd))- )}}}--happyReduce_638 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_638 = happySpecReduce_1 238# happyReduction_638-happyReduction_638 happy_x_1- = case happyOut255 happy_x_1 of { (HappyWrap255 happy_var_1) -> - happyIn254- (happy_var_1 >>= \ happy_var_1 ->- return ([happy_var_1], Nothing)- )}--happyReduce_639 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_639 = happySpecReduce_1 238# happyReduction_639-happyReduction_639 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn254- (return ([], Just (getLoc happy_var_1))- )}--happyReduce_640 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_640 = happySpecReduce_3 239# happyReduction_640-happyReduction_640 happy_x_3- happy_x_2- happy_x_1- = case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut225 happy_x_3 of { (HappyWrap225 happy_var_3) -> - happyIn255- (unECP happy_var_3 >>= \ happy_var_3 ->- fmap Left $ acsA (\cs -> sLL (reLocN happy_var_1) (reLoc happy_var_3) $ HsFieldBind (EpAnn (glNR happy_var_1) [mj AnnEqual happy_var_2] cs) (sL1l happy_var_1 $ mkFieldOcc happy_var_1) happy_var_3 False)- )}}}--happyReduce_641 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_641 = happySpecReduce_1 239# happyReduction_641-happyReduction_641 happy_x_1- = case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> - happyIn255- (placeHolderPunRhs >>= \rhs ->- fmap Left $ acsa (\cs -> sL1a (reLocN happy_var_1) $ HsFieldBind (EpAnn (glNR happy_var_1) [] cs) (sL1l happy_var_1 $ mkFieldOcc happy_var_1) rhs True)- )}--happyReduce_642 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_642 = happyReduce 5# 239# happyReduction_642-happyReduction_642 (happy_x_5 `HappyStk`- happy_x_4 `HappyStk`- happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest)- = case happyOut300 happy_x_1 of { (HappyWrap300 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut256 happy_x_3 of { (HappyWrap256 happy_var_3) -> - case happyOutTok happy_x_4 of { happy_var_4 -> - case happyOut225 happy_x_5 of { (HappyWrap225 happy_var_5) -> - happyIn255- (do- let top = sL1 (la2la happy_var_1) $ DotFieldOcc noAnn happy_var_1- ((L lf (DotFieldOcc _ f)):t) = reverse (unLoc happy_var_3)- lf' = comb2 happy_var_2 (reLoc $ L lf ())- fields = top : L (noAnnSrcSpan lf') (DotFieldOcc (EpAnn (spanAsAnchor lf') (AnnFieldLabel (Just $ glAA happy_var_2)) emptyComments) f) : t- final = last fields- l = comb2 (reLoc happy_var_1) happy_var_3- isPun = False- happy_var_5 <- unECP happy_var_5- fmap Right $ mkHsProjUpdatePV (comb2 (reLoc happy_var_1) (reLoc happy_var_5)) (L l fields) happy_var_5 isPun- [mj AnnEqual happy_var_4]- ) `HappyStk` happyRest}}}}}--happyReduce_643 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_643 = happySpecReduce_3 239# happyReduction_643-happyReduction_643 happy_x_3- happy_x_2- happy_x_1- = case happyOut300 happy_x_1 of { (HappyWrap300 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut256 happy_x_3 of { (HappyWrap256 happy_var_3) -> - happyIn255- (do- let top = sL1 (la2la happy_var_1) $ DotFieldOcc noAnn happy_var_1- ((L lf (DotFieldOcc _ f)):t) = reverse (unLoc happy_var_3)- lf' = comb2 happy_var_2 (reLoc $ L lf ())- fields = top : L (noAnnSrcSpan lf') (DotFieldOcc (EpAnn (spanAsAnchor lf') (AnnFieldLabel (Just $ glAA happy_var_2)) emptyComments) f) : t- final = last fields- l = comb2 (reLoc happy_var_1) happy_var_3- isPun = True- var <- mkHsVarPV (L (noAnnSrcSpan $ getLocA final) (mkRdrUnqual . mkVarOccFS . field_label . unLoc . dfoLabel . unLoc $ final))- fmap Right $ mkHsProjUpdatePV l (L l fields) var isPun []- )}}}--happyReduce_644 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_644 = happyMonadReduce 3# 240# happyReduction_644-happyReduction_644 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut256 happy_x_1 of { (HappyWrap256 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut300 happy_x_3 of { (HappyWrap300 happy_var_3) -> - ( getCommentsFor (getLocA happy_var_3) >>= \cs ->- return (sLL happy_var_1 (reLoc happy_var_3) ((sLLa happy_var_2 (reLoc happy_var_3) (DotFieldOcc (EpAnn (glR happy_var_2) (AnnFieldLabel $ Just $ glAA happy_var_2) cs) happy_var_3)) : unLoc happy_var_1)))}}})- ) (\r -> happyReturn (happyIn256 r))--happyReduce_645 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_645 = happyMonadReduce 1# 240# happyReduction_645-happyReduction_645 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut300 happy_x_1 of { (HappyWrap300 happy_var_1) -> - ( getCommentsFor (getLocA happy_var_1) >>= \cs ->- return (sL1 (reLoc happy_var_1) [sL1a (reLoc happy_var_1) (DotFieldOcc (EpAnn (glNR happy_var_1) (AnnFieldLabel Nothing) cs) happy_var_1)]))})- ) (\r -> happyReturn (happyIn256 r))--happyReduce_646 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_646 = happyMonadReduce 3# 241# happyReduction_646-happyReduction_646 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut257 happy_x_1 of { (HappyWrap257 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut258 happy_x_3 of { (HappyWrap258 happy_var_3) -> - ( case unLoc happy_var_1 of- (h:t) -> do- h' <- addTrailingSemiA h (gl happy_var_2)- return (let { this = happy_var_3; rest = h':t }- in rest `seq` this `seq` sLL happy_var_1 (reLoc happy_var_3) (this : rest)))}}})- ) (\r -> happyReturn (happyIn257 r))--happyReduce_647 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_647 = happyMonadReduce 2# 241# happyReduction_647-happyReduction_647 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut257 happy_x_1 of { (HappyWrap257 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( case unLoc happy_var_1 of- (h:t) -> do- h' <- addTrailingSemiA h (gl happy_var_2)- return (sLL happy_var_1 happy_var_2 (h':t)))}})- ) (\r -> happyReturn (happyIn257 r))--happyReduce_648 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_648 = happySpecReduce_1 241# happyReduction_648-happyReduction_648 happy_x_1- = case happyOut258 happy_x_1 of { (HappyWrap258 happy_var_1) -> - happyIn257- (let this = happy_var_1 in this `seq` (sL1 (reLoc happy_var_1) [this])- )}--happyReduce_649 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_649 = happyMonadReduce 3# 242# happyReduction_649-happyReduction_649 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut259 happy_x_1 of { (HappyWrap259 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut207 happy_x_3 of { (HappyWrap207 happy_var_3) -> - ( runPV (unECP happy_var_3) >>= \ happy_var_3 ->- acsA (\cs -> sLLlA happy_var_1 happy_var_3 (IPBind (EpAnn (glR happy_var_1) [mj AnnEqual happy_var_2] cs) (reLocA happy_var_1) happy_var_3)))}}})- ) (\r -> happyReturn (happyIn258 r))--happyReduce_650 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_650 = happySpecReduce_1 243# happyReduction_650-happyReduction_650 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn259- (sL1 happy_var_1 (HsIPName (getIPDUPVARID happy_var_1))- )}--happyReduce_651 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_651 = happySpecReduce_1 244# happyReduction_651-happyReduction_651 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn260- (sL1 happy_var_1 (getLABELVARIDs happy_var_1, getLABELVARID 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 245# happyReduction_652-happyReduction_652 happy_x_1- = case happyOut262 happy_x_1 of { (HappyWrap262 happy_var_1) -> - happyIn261- (happy_var_1- )}--happyReduce_653 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_653 = happySpecReduce_0 245# happyReduction_653-happyReduction_653 = happyIn261- (noLocA mkTrue- )--happyReduce_654 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_654 = happySpecReduce_1 246# happyReduction_654-happyReduction_654 happy_x_1- = case happyOut263 happy_x_1 of { (HappyWrap263 happy_var_1) -> - happyIn262- (happy_var_1- )}--happyReduce_655 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_655 = happyMonadReduce 3# 246# happyReduction_655-happyReduction_655 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut263 happy_x_1 of { (HappyWrap263 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut262 happy_x_3 of { (HappyWrap262 happy_var_3) -> - ( do { h <- addTrailingVbarL happy_var_1 (gl happy_var_2)- ; return (reLocA $ sLLAA happy_var_1 happy_var_3 (Or [h,happy_var_3])) })}}})- ) (\r -> happyReturn (happyIn262 r))--happyReduce_656 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_656 = happySpecReduce_1 247# happyReduction_656-happyReduction_656 happy_x_1- = case happyOut264 happy_x_1 of { (HappyWrap264 happy_var_1) -> - happyIn263- (reLocA $ sLLAA (head happy_var_1) (last happy_var_1) (And (happy_var_1))- )}--happyReduce_657 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_657 = happySpecReduce_1 248# happyReduction_657-happyReduction_657 happy_x_1- = case happyOut265 happy_x_1 of { (HappyWrap265 happy_var_1) -> - happyIn264- ([happy_var_1]- )}--happyReduce_658 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_658 = happyMonadReduce 3# 248# happyReduction_658-happyReduction_658 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut265 happy_x_1 of { (HappyWrap265 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut264 happy_x_3 of { (HappyWrap264 happy_var_3) -> - ( do { h <- addTrailingCommaL happy_var_1 (gl happy_var_2)- ; return (h : happy_var_3) })}}})- ) (\r -> happyReturn (happyIn264 r))--happyReduce_659 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_659 = happyMonadReduce 3# 249# happyReduction_659-happyReduction_659 (happy_x_3 `HappyStk`- 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 { (HappyWrap262 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrl (sLL happy_var_1 happy_var_3 (Parens happy_var_2))- (AnnList Nothing (Just (mop happy_var_1)) (Just (mcp happy_var_3)) [] []))}}})- ) (\r -> happyReturn (happyIn265 r))--happyReduce_660 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_660 = happySpecReduce_1 249# happyReduction_660-happyReduction_660 happy_x_1- = case happyOut267 happy_x_1 of { (HappyWrap267 happy_var_1) -> - happyIn265- (reLocA $ sL1N happy_var_1 (Var happy_var_1)- )}--happyReduce_661 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_661 = happySpecReduce_1 250# happyReduction_661-happyReduction_661 happy_x_1- = case happyOut267 happy_x_1 of { (HappyWrap267 happy_var_1) -> - happyIn266- (sL1N happy_var_1 [happy_var_1]- )}--happyReduce_662 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_662 = happyMonadReduce 3# 250# happyReduction_662-happyReduction_662 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut267 happy_x_1 of { (HappyWrap267 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut266 happy_x_3 of { (HappyWrap266 happy_var_3) -> - ( do { h <- addTrailingCommaN happy_var_1 (gl happy_var_2)- ; return (sLL (reLocN happy_var_1) happy_var_3 (h : unLoc happy_var_3)) })}}})- ) (\r -> happyReturn (happyIn266 r))--happyReduce_663 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_663 = happySpecReduce_1 251# happyReduction_663-happyReduction_663 happy_x_1- = case happyOut298 happy_x_1 of { (HappyWrap298 happy_var_1) -> - happyIn267- (happy_var_1- )}--happyReduce_664 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_664 = happySpecReduce_1 251# happyReduction_664-happyReduction_664 happy_x_1- = case happyOut271 happy_x_1 of { (HappyWrap271 happy_var_1) -> - happyIn267- (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 252# happyReduction_665-happyReduction_665 happy_x_1- = case happyOut270 happy_x_1 of { (HappyWrap270 happy_var_1) -> - happyIn268- (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 252# happyReduction_666-happyReduction_666 happy_x_1- = case happyOut274 happy_x_1 of { (HappyWrap274 happy_var_1) -> - happyIn268- (L (getLoc happy_var_1) $ nameRdrName (dataConName (unLoc 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 253# happyReduction_667-happyReduction_667 happy_x_1- = case happyOut270 happy_x_1 of { (HappyWrap270 happy_var_1) -> - happyIn269- (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 253# happyReduction_668-happyReduction_668 happy_x_1- = case happyOut275 happy_x_1 of { (HappyWrap275 happy_var_1) -> - happyIn269- (L (getLoc happy_var_1) $ nameRdrName (dataConName (unLoc 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 254# happyReduction_669-happyReduction_669 happy_x_1- = case happyOut310 happy_x_1 of { (HappyWrap310 happy_var_1) -> - happyIn270- (happy_var_1- )}--happyReduce_670 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_670 = happyMonadReduce 3# 254# happyReduction_670-happyReduction_670 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut312 happy_x_2 of { (HappyWrap312 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn270 r))--happyReduce_671 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_671 = happySpecReduce_1 255# happyReduction_671-happyReduction_671 happy_x_1- = case happyOut311 happy_x_1 of { (HappyWrap311 happy_var_1) -> - happyIn271- (happy_var_1- )}--happyReduce_672 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_672 = happyMonadReduce 3# 255# happyReduction_672-happyReduction_672 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut313 happy_x_2 of { (HappyWrap313 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn271 r))--happyReduce_673 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_673 = happySpecReduce_1 255# happyReduction_673-happyReduction_673 happy_x_1- = case happyOut275 happy_x_1 of { (HappyWrap275 happy_var_1) -> - happyIn271- (L (getLoc happy_var_1) $ nameRdrName (dataConName (unLoc happy_var_1))- )}--happyReduce_674 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_674 = happySpecReduce_1 256# happyReduction_674-happyReduction_674 happy_x_1- = case happyOut271 happy_x_1 of { (HappyWrap271 happy_var_1) -> - happyIn272- (sL1N happy_var_1 (pure happy_var_1)- )}--happyReduce_675 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_675 = happyMonadReduce 3# 256# happyReduction_675-happyReduction_675 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut271 happy_x_1 of { (HappyWrap271 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut272 happy_x_3 of { (HappyWrap272 happy_var_3) -> - ( sLL (reLocN happy_var_1) happy_var_3 . (:| toList (unLoc happy_var_3)) <$> addTrailingCommaN happy_var_1 (gl happy_var_2))}}})- ) (\r -> happyReturn (happyIn272 r))--happyReduce_676 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_676 = happySpecReduce_1 257# happyReduction_676-happyReduction_676 happy_x_1- = case happyOut269 happy_x_1 of { (HappyWrap269 happy_var_1) -> - happyIn273- (sL1N happy_var_1 [happy_var_1]- )}--happyReduce_677 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_677 = happyMonadReduce 3# 257# happyReduction_677-happyReduction_677 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut269 happy_x_1 of { (HappyWrap269 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut273 happy_x_3 of { (HappyWrap273 happy_var_3) -> - ( do { h <- addTrailingCommaN happy_var_1 (gl happy_var_2)- ; return (sLL (reLocN happy_var_1) happy_var_3 (h : unLoc happy_var_3)) })}}})- ) (\r -> happyReturn (happyIn273 r))--happyReduce_678 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_678 = happyMonadReduce 2# 258# happyReduction_678-happyReduction_678 (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 -> - ( amsrn (sLL happy_var_1 happy_var_2 unitDataCon) (NameAnnOnly NameParens (glAA happy_var_1) (glAA happy_var_2) []))}})- ) (\r -> happyReturn (happyIn274 r))--happyReduce_679 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_679 = happyMonadReduce 3# 258# happyReduction_679-happyReduction_679 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut317 happy_x_2 of { (HappyWrap317 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 $ tupleDataCon Boxed (snd happy_var_2 + 1))- (NameAnnCommas NameParens (glAA happy_var_1) (map srcSpan2e (fst happy_var_2)) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn274 r))--happyReduce_680 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_680 = happyMonadReduce 2# 258# happyReduction_680-happyReduction_680 (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 -> - ( amsrn (sLL happy_var_1 happy_var_2 $ unboxedUnitDataCon) (NameAnnOnly NameParensHash (glAA happy_var_1) (glAA happy_var_2) []))}})- ) (\r -> happyReturn (happyIn274 r))--happyReduce_681 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_681 = happyMonadReduce 3# 258# happyReduction_681-happyReduction_681 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut317 happy_x_2 of { (HappyWrap317 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 $ tupleDataCon Unboxed (snd happy_var_2 + 1))- (NameAnnCommas NameParensHash (glAA happy_var_1) (map srcSpan2e (fst happy_var_2)) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn274 r))--happyReduce_682 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_682 = happySpecReduce_1 259# happyReduction_682-happyReduction_682 happy_x_1- = case happyOut274 happy_x_1 of { (HappyWrap274 happy_var_1) -> - happyIn275- (happy_var_1- )}--happyReduce_683 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_683 = happyMonadReduce 2# 259# happyReduction_683-happyReduction_683 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( amsrn (sLL happy_var_1 happy_var_2 nilDataCon) (NameAnnOnly NameSquare (glAA happy_var_1) (glAA happy_var_2) []))}})- ) (\r -> happyReturn (happyIn275 r))--happyReduce_684 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_684 = happySpecReduce_1 260# happyReduction_684-happyReduction_684 happy_x_1- = case happyOut313 happy_x_1 of { (HappyWrap313 happy_var_1) -> - happyIn276- (happy_var_1- )}--happyReduce_685 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_685 = happyMonadReduce 3# 260# happyReduction_685-happyReduction_685 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut311 happy_x_2 of { (HappyWrap311 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn276 r))--happyReduce_686 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_686 = happySpecReduce_1 261# happyReduction_686-happyReduction_686 happy_x_1- = case happyOut312 happy_x_1 of { (HappyWrap312 happy_var_1) -> - happyIn277- (happy_var_1- )}--happyReduce_687 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_687 = happyMonadReduce 3# 261# happyReduction_687-happyReduction_687 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut310 happy_x_2 of { (HappyWrap310 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn277 r))--happyReduce_688 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_688 = happySpecReduce_1 262# happyReduction_688-happyReduction_688 happy_x_1- = case happyOut279 happy_x_1 of { (HappyWrap279 happy_var_1) -> - happyIn278- (happy_var_1- )}--happyReduce_689 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_689 = happyMonadReduce 2# 262# happyReduction_689-happyReduction_689 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - ( amsrn (sLL happy_var_1 happy_var_2 $ getRdrName unitTyCon)- (NameAnnOnly NameParens (glAA happy_var_1) (glAA happy_var_2) []))}})- ) (\r -> happyReturn (happyIn278 r))--happyReduce_690 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_690 = happyMonadReduce 2# 262# happyReduction_690-happyReduction_690 (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 -> - ( amsrn (sLL happy_var_1 happy_var_2 $ getRdrName unboxedUnitTyCon)- (NameAnnOnly NameParensHash (glAA happy_var_1) (glAA happy_var_2) []))}})- ) (\r -> happyReturn (happyIn278 r))--happyReduce_691 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_691 = happySpecReduce_1 263# happyReduction_691-happyReduction_691 happy_x_1- = case happyOut280 happy_x_1 of { (HappyWrap280 happy_var_1) -> - happyIn279- (happy_var_1- )}--happyReduce_692 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_692 = happyMonadReduce 3# 263# 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 happyOut317 happy_x_2 of { (HappyWrap317 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 $ getRdrName (tupleTyCon Boxed- (snd happy_var_2 + 1)))- (NameAnnCommas NameParens (glAA happy_var_1) (map srcSpan2e (fst happy_var_2)) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn279 r))--happyReduce_693 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_693 = happyMonadReduce 3# 263# 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 happyOut317 happy_x_2 of { (HappyWrap317 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 $ getRdrName (tupleTyCon Unboxed- (snd happy_var_2 + 1)))- (NameAnnCommas NameParensHash (glAA happy_var_1) (map srcSpan2e (fst happy_var_2)) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn279 r))--happyReduce_694 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_694 = happyMonadReduce 3# 263# happyReduction_694-happyReduction_694 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut319 happy_x_2 of { (HappyWrap319 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 $ getRdrName (sumTyCon (snd happy_var_2 + 1)))- (NameAnnBars NameParensHash (glAA happy_var_1) (map srcSpan2e (fst happy_var_2)) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn279 r))--happyReduce_695 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_695 = happyMonadReduce 3# 263# happyReduction_695-happyReduction_695 (happy_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 -> - ( amsrn (sLL happy_var_1 happy_var_3 $ getRdrName unrestrictedFunTyCon)- (NameAnn NameParens (glAA happy_var_1) (glAA happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn279 r))--happyReduce_696 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_696 = happyMonadReduce 2# 263# happyReduction_696-happyReduction_696 (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 -> - ( amsrn (sLL happy_var_1 happy_var_2 $ listTyCon_RDR)- (NameAnnOnly NameSquare (glAA happy_var_1) (glAA happy_var_2) []))}})- ) (\r -> happyReturn (happyIn279 r))--happyReduce_697 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_697 = happySpecReduce_1 264# happyReduction_697-happyReduction_697 happy_x_1- = case happyOut283 happy_x_1 of { (HappyWrap283 happy_var_1) -> - happyIn280- (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# 264# 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 happyOut285 happy_x_2 of { (HappyWrap285 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn280 r))--happyReduce_699 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_699 = happySpecReduce_1 265# happyReduction_699-happyReduction_699 happy_x_1- = case happyOut283 happy_x_1 of { (HappyWrap283 happy_var_1) -> - happyIn281- (happy_var_1- )}--happyReduce_700 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_700 = happyMonadReduce 3# 265# happyReduction_700-happyReduction_700 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( let { name :: Located RdrName- ; name = sL1 happy_var_2 $! mkQual tcClsName (getQCONSYM happy_var_2) }- in amsrn (sLL happy_var_1 happy_var_3 (unLoc name)) (NameAnn NameParens (glAA happy_var_1) (glAA happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn281 r))--happyReduce_701 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_701 = happyMonadReduce 3# 265# 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 :: Located RdrName- ; name = sL1 happy_var_2 $! mkUnqual tcClsName (getCONSYM happy_var_2) }- in amsrn (sLL happy_var_1 happy_var_3 (unLoc name)) (NameAnn NameParens (glAA happy_var_1) (glAA happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn281 r))--happyReduce_702 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_702 = happyMonadReduce 3# 265# 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 :: Located RdrName- ; name = sL1 happy_var_2 $! consDataCon_RDR }- in amsrn (sLL happy_var_1 happy_var_3 (unLoc name)) (NameAnn NameParens (glAA happy_var_1) (glAA happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn281 r))--happyReduce_703 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_703 = happySpecReduce_1 266# happyReduction_703-happyReduction_703 happy_x_1- = case happyOut285 happy_x_1 of { (HappyWrap285 happy_var_1) -> - happyIn282- (happy_var_1- )}--happyReduce_704 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_704 = happyMonadReduce 3# 266# 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 happyOut283 happy_x_2 of { (HappyWrap283 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn282 r))--happyReduce_705 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_705 = happySpecReduce_1 267# happyReduction_705-happyReduction_705 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn283- (sL1n happy_var_1 $! mkQual tcClsName (getQCONID happy_var_1)- )}--happyReduce_706 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_706 = happySpecReduce_1 267# happyReduction_706-happyReduction_706 happy_x_1- = case happyOut284 happy_x_1 of { (HappyWrap284 happy_var_1) -> - happyIn283- (happy_var_1- )}--happyReduce_707 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_707 = happySpecReduce_1 268# happyReduction_707-happyReduction_707 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn284- (sL1n happy_var_1 $! mkUnqual tcClsName (getCONID 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 269# happyReduction_708-happyReduction_708 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn285- (sL1n happy_var_1 $! mkQual tcClsName (getQCONSYM 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 269# happyReduction_709-happyReduction_709 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn285- (sL1n happy_var_1 $! mkQual tcClsName (getQVARSYM happy_var_1)- )}--happyReduce_710 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_710 = happySpecReduce_1 269# happyReduction_710-happyReduction_710 happy_x_1- = case happyOut286 happy_x_1 of { (HappyWrap286 happy_var_1) -> - happyIn285- (happy_var_1- )}--happyReduce_711 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_711 = happySpecReduce_1 270# happyReduction_711-happyReduction_711 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn286- (sL1n happy_var_1 $! mkUnqual tcClsName (getCONSYM 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 270# happyReduction_712-happyReduction_712 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn286- (sL1n happy_var_1 $! mkUnqual tcClsName (getVARSYM 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 270# happyReduction_713-happyReduction_713 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn286- (sL1n happy_var_1 $! consDataCon_RDR- )}--happyReduce_714 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_714 = happySpecReduce_1 270# happyReduction_714-happyReduction_714 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn286- (sL1n happy_var_1 $! mkUnqual tcClsName (fsLit "-")- )}--happyReduce_715 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_715 = happySpecReduce_1 270# happyReduction_715-happyReduction_715 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn286- (sL1n happy_var_1 $! mkUnqual tcClsName (fsLit ".")- )}--happyReduce_716 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_716 = happySpecReduce_1 271# happyReduction_716-happyReduction_716 happy_x_1- = case happyOut284 happy_x_1 of { (HappyWrap284 happy_var_1) -> - happyIn287- (happy_var_1- )}--happyReduce_717 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_717 = happyMonadReduce 3# 271# happyReduction_717-happyReduction_717 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut286 happy_x_2 of { (HappyWrap286 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn287 r))--happyReduce_718 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_718 = happySpecReduce_1 272# happyReduction_718-happyReduction_718 happy_x_1- = case happyOut289 happy_x_1 of { (HappyWrap289 happy_var_1) -> - happyIn288- (happy_var_1- )}--happyReduce_719 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_719 = happySpecReduce_1 272# happyReduction_719-happyReduction_719 happy_x_1- = case happyOut276 happy_x_1 of { (HappyWrap276 happy_var_1) -> - happyIn288- (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 272# happyReduction_720-happyReduction_720 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn288- (sL1n happy_var_1 $ getRdrName unrestrictedFunTyCon- )}--happyReduce_721 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_721 = happySpecReduce_1 273# happyReduction_721-happyReduction_721 happy_x_1- = case happyOut306 happy_x_1 of { (HappyWrap306 happy_var_1) -> - happyIn289- (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# 273# 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 happyOut302 happy_x_2 of { (HappyWrap302 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn289 r))--happyReduce_723 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_723 = happySpecReduce_1 274# happyReduction_723-happyReduction_723 happy_x_1- = case happyOut293 happy_x_1 of { (HappyWrap293 happy_var_1) -> - happyIn290- (mkHsVarOpPV 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 274# happyReduction_724-happyReduction_724 happy_x_1- = case happyOut277 happy_x_1 of { (HappyWrap277 happy_var_1) -> - happyIn290- (mkHsConOpPV 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 274# happyReduction_725-happyReduction_725 happy_x_1- = case happyOut292 happy_x_1 of { (HappyWrap292 happy_var_1) -> - happyIn290- (pvN happy_var_1- )}--happyReduce_726 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_726 = happySpecReduce_1 275# happyReduction_726-happyReduction_726 happy_x_1- = case happyOut294 happy_x_1 of { (HappyWrap294 happy_var_1) -> - happyIn291- (mkHsVarOpPV 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 275# happyReduction_727-happyReduction_727 happy_x_1- = case happyOut277 happy_x_1 of { (HappyWrap277 happy_var_1) -> - happyIn291- (mkHsConOpPV 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 275# happyReduction_728-happyReduction_728 happy_x_1- = case happyOut292 happy_x_1 of { (HappyWrap292 happy_var_1) -> - happyIn291- (pvN happy_var_1- )}--happyReduce_729 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_729 = happySpecReduce_3 276# happyReduction_729-happyReduction_729 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 -> - happyIn292- (mkHsInfixHolePV (comb2 happy_var_1 happy_var_3)- (\cs -> EpAnn (glR happy_var_1) (EpAnnUnboundVar (glAA happy_var_1, glAA happy_var_3) (glAA happy_var_2)) cs)- )}}}--happyReduce_730 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_730 = happySpecReduce_1 277# happyReduction_730-happyReduction_730 happy_x_1- = case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> - happyIn293- (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# 277# 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 happyOut301 happy_x_2 of { (HappyWrap301 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn293 r))--happyReduce_732 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_732 = happySpecReduce_1 278# happyReduction_732-happyReduction_732 happy_x_1- = case happyOut304 happy_x_1 of { (HappyWrap304 happy_var_1) -> - happyIn294- (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# 278# 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 happyOut301 happy_x_2 of { (HappyWrap301 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn294 r))--happyReduce_734 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_734 = happySpecReduce_1 279# happyReduction_734-happyReduction_734 happy_x_1- = case happyOut297 happy_x_1 of { (HappyWrap297 happy_var_1) -> - happyIn295- (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# 280# 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 happyOut297 happy_x_2 of { (HappyWrap297 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn296 r))--happyReduce_736 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_736 = happySpecReduce_1 281# happyReduction_736-happyReduction_736 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn297- (sL1n happy_var_1 $! mkUnqual tvName (getVARID happy_var_1)- )}--happyReduce_737 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_737 = happySpecReduce_1 281# happyReduction_737-happyReduction_737 happy_x_1- = case happyOut308 happy_x_1 of { (HappyWrap308 happy_var_1) -> - happyIn297- (sL1n happy_var_1 $! mkUnqual tvName (unLoc 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 281# happyReduction_738-happyReduction_738 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn297- (sL1n happy_var_1 $! mkUnqual tvName (fsLit "unsafe")- )}--happyReduce_739 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_739 = happySpecReduce_1 281# happyReduction_739-happyReduction_739 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn297- (sL1n happy_var_1 $! mkUnqual tvName (fsLit "safe")- )}--happyReduce_740 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_740 = happySpecReduce_1 281# happyReduction_740-happyReduction_740 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn297- (sL1n happy_var_1 $! mkUnqual tvName (fsLit "interruptible")- )}--happyReduce_741 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_741 = happySpecReduce_1 282# happyReduction_741-happyReduction_741 happy_x_1- = case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> - happyIn298- (happy_var_1- )}--happyReduce_742 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_742 = happyMonadReduce 3# 282# happyReduction_742-happyReduction_742 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut306 happy_x_2 of { (HappyWrap306 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn298 r))--happyReduce_743 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_743 = happySpecReduce_1 283# happyReduction_743-happyReduction_743 happy_x_1- = case happyOut301 happy_x_1 of { (HappyWrap301 happy_var_1) -> - happyIn299- (happy_var_1- )}--happyReduce_744 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_744 = happyMonadReduce 3# 283# happyReduction_744-happyReduction_744 (happy_x_3 `HappyStk`- happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut306 happy_x_2 of { (HappyWrap306 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn299 r))--happyReduce_745 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_745 = happyMonadReduce 3# 283# 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 happyOut305 happy_x_2 of { (HappyWrap305 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))- (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})- ) (\r -> happyReturn (happyIn299 r))--happyReduce_746 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_746 = happySpecReduce_1 284# happyReduction_746-happyReduction_746 happy_x_1- = case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> - happyIn300- (fmap (FieldLabelString . occNameFS . rdrNameOcc) happy_var_1- )}--happyReduce_747 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_747 = happySpecReduce_1 285# happyReduction_747-happyReduction_747 happy_x_1- = case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> - happyIn301- (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 285# happyReduction_748-happyReduction_748 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn301- (sL1n 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 286# happyReduction_749-happyReduction_749 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn302- (sL1n 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 286# happyReduction_750-happyReduction_750 happy_x_1- = case happyOut308 happy_x_1 of { (HappyWrap308 happy_var_1) -> - happyIn302- (sL1n 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 286# happyReduction_751-happyReduction_751 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn302- (sL1n 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 286# happyReduction_752-happyReduction_752 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn302- (sL1n 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 286# happyReduction_753-happyReduction_753 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn302- (sL1n 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 286# happyReduction_754-happyReduction_754 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn302- (sL1n 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 286# happyReduction_755-happyReduction_755 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn302- (sL1n 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 286# happyReduction_756-happyReduction_756 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn302- (sL1n 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 287# happyReduction_757-happyReduction_757 happy_x_1- = case happyOut306 happy_x_1 of { (HappyWrap306 happy_var_1) -> - happyIn303- (happy_var_1- )}--happyReduce_758 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_758 = happySpecReduce_1 287# happyReduction_758-happyReduction_758 happy_x_1- = case happyOut305 happy_x_1 of { (HappyWrap305 happy_var_1) -> - happyIn303- (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 288# happyReduction_759-happyReduction_759 happy_x_1- = case happyOut307 happy_x_1 of { (HappyWrap307 happy_var_1) -> - happyIn304- (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 288# happyReduction_760-happyReduction_760 happy_x_1- = case happyOut305 happy_x_1 of { (HappyWrap305 happy_var_1) -> - happyIn304- (happy_var_1- )}--happyReduce_761 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_761 = happySpecReduce_1 289# happyReduction_761-happyReduction_761 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn305- (sL1n 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 290# happyReduction_762-happyReduction_762 happy_x_1- = case happyOut307 happy_x_1 of { (HappyWrap307 happy_var_1) -> - happyIn306- (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 290# happyReduction_763-happyReduction_763 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn306- (sL1n 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 291# happyReduction_764-happyReduction_764 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn307- (sL1n 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 291# happyReduction_765-happyReduction_765 happy_x_1- = case happyOut309 happy_x_1 of { (HappyWrap309 happy_var_1) -> - happyIn307- (sL1n 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 292# happyReduction_766-happyReduction_766 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_767-happyReduction_767 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_768-happyReduction_768 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_769-happyReduction_769 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_770-happyReduction_770 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_771-happyReduction_771 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_772-happyReduction_772 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_773-happyReduction_773 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_774-happyReduction_774 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_775-happyReduction_775 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_776-happyReduction_776 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_777-happyReduction_777 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_778-happyReduction_778 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_779-happyReduction_779 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (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 292# happyReduction_780-happyReduction_780 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (sL1 happy_var_1 (fsLit "via")- )}--happyReduce_781 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_781 = happySpecReduce_1 292# happyReduction_781-happyReduction_781 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (sL1 happy_var_1 (fsLit "unit")- )}--happyReduce_782 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_782 = happySpecReduce_1 292# happyReduction_782-happyReduction_782 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (sL1 happy_var_1 (fsLit "dependency")- )}--happyReduce_783 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_783 = happySpecReduce_1 292# happyReduction_783-happyReduction_783 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn308- (sL1 happy_var_1 (fsLit "signature")- )}--happyReduce_784 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_784 = happySpecReduce_1 293# happyReduction_784-happyReduction_784 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn309- (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 293# happyReduction_785-happyReduction_785 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn309- (sL1 happy_var_1 (starSym (isUnicode 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 294# happyReduction_786-happyReduction_786 happy_x_1- = case happyOut311 happy_x_1 of { (HappyWrap311 happy_var_1) -> - happyIn310- (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 294# happyReduction_787-happyReduction_787 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn310- (sL1n happy_var_1 $! mkQual dataName (getQCONID 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 295# happyReduction_788-happyReduction_788 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn311- (sL1n happy_var_1 $ mkUnqual dataName (getCONID 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 296# happyReduction_789-happyReduction_789 happy_x_1- = case happyOut313 happy_x_1 of { (HappyWrap313 happy_var_1) -> - happyIn312- (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 296# happyReduction_790-happyReduction_790 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn312- (sL1n happy_var_1 $ mkQual dataName (getQCONSYM 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 297# happyReduction_791-happyReduction_791 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn313- (sL1n happy_var_1 $ mkUnqual dataName (getCONSYM happy_var_1)- )}--happyReduce_792 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_792 = happySpecReduce_1 297# happyReduction_792-happyReduction_792 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn313- (sL1n happy_var_1 $ consDataCon_RDR- )}--happyReduce_793 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_793 = happySpecReduce_1 298# happyReduction_793-happyReduction_793 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn314- (sL1 happy_var_1 $ HsChar (getCHARs happy_var_1) $ getCHAR 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 298# happyReduction_794-happyReduction_794 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn314- (sL1 happy_var_1 $ HsString (getSTRINGs happy_var_1)- $ getSTRING 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 298# happyReduction_795-happyReduction_795 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn314- (sL1 happy_var_1 $ HsIntPrim (getPRIMINTEGERs happy_var_1)- $ getPRIMINTEGER 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 298# happyReduction_796-happyReduction_796 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn314- (sL1 happy_var_1 $ HsWordPrim (getPRIMWORDs happy_var_1)- $ getPRIMWORD 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 298# happyReduction_797-happyReduction_797 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn314- (sL1 happy_var_1 $ HsCharPrim (getPRIMCHARs happy_var_1)- $ getPRIMCHAR 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 298# happyReduction_798-happyReduction_798 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn314- (sL1 happy_var_1 $ HsStringPrim (getPRIMSTRINGs happy_var_1)- $ getPRIMSTRING 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 298# happyReduction_799-happyReduction_799 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn314- (sL1 happy_var_1 $ HsFloatPrim noExtField $ getPRIMFLOAT 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 298# happyReduction_800-happyReduction_800 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn314- (sL1 happy_var_1 $ HsDoublePrim noExtField $ getPRIMDOUBLE happy_var_1- )}--happyReduce_801 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_801 = happySpecReduce_1 299# happyReduction_801-happyReduction_801 happy_x_1- = happyIn315- (()- )--happyReduce_802 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_802 = happyMonadReduce 1# 299# happyReduction_802-happyReduction_802 (happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((( popContext))- ) (\r -> happyReturn (happyIn315 r))--happyReduce_803 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_803 = happySpecReduce_1 300# happyReduction_803-happyReduction_803 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn316- (sL1a happy_var_1 $ mkModuleNameFS (getCONID happy_var_1)- )}--happyReduce_804 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_804 = happySpecReduce_1 300# happyReduction_804-happyReduction_804 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn316- (sL1a happy_var_1 $ let (mod,c) = getQCONID happy_var_1 in- mkModuleNameFS- (concatFS [mod, fsLit ".", c])- )}--happyReduce_805 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_805 = happySpecReduce_2 301# happyReduction_805-happyReduction_805 happy_x_2- happy_x_1- = case happyOut317 happy_x_1 of { (HappyWrap317 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn317- (((fst happy_var_1)++[gl happy_var_2],snd 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 301# happyReduction_806-happyReduction_806 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn317- (([gl happy_var_1],1)- )}--happyReduce_807 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_807 = happySpecReduce_1 302# happyReduction_807-happyReduction_807 happy_x_1- = case happyOut319 happy_x_1 of { (HappyWrap319 happy_var_1) -> - happyIn318- (happy_var_1- )}--happyReduce_808 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_808 = happySpecReduce_0 302# happyReduction_808-happyReduction_808 = happyIn318- (([], 0)- )--happyReduce_809 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_809 = happySpecReduce_2 303# happyReduction_809-happyReduction_809 happy_x_2- happy_x_1- = case happyOut319 happy_x_1 of { (HappyWrap319 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn319- (((fst happy_var_1)++[gl happy_var_2],snd happy_var_1 + 1)- )}}--happyReduce_810 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_810 = happySpecReduce_1 303# happyReduction_810-happyReduction_810 happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - happyIn319- (([gl happy_var_1],1)- )}--happyReduce_811 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_811 = happySpecReduce_3 304# happyReduction_811-happyReduction_811 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut324 happy_x_2 of { (HappyWrap324 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn320- (happy_var_2 >>= \ happy_var_2 -> amsrl- (sLL happy_var_1 happy_var_3 (reverse (snd $ unLoc happy_var_2)))- (AnnList (Just $ glR happy_var_2) (Just $ moc happy_var_1) (Just $ mcc happy_var_3) (fst $ unLoc happy_var_2) [])- )}}}--happyReduce_812 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_812 = happySpecReduce_3 304# happyReduction_812-happyReduction_812 happy_x_3- happy_x_2- happy_x_1- = case happyOut324 happy_x_2 of { (HappyWrap324 happy_var_2) -> - happyIn320- (happy_var_2 >>= \ happy_var_2 -> amsrl- (L (getLoc happy_var_2) (reverse (snd $ unLoc happy_var_2)))- (AnnList (Just $ glR happy_var_2) Nothing Nothing (fst $ unLoc happy_var_2) [])- )}--happyReduce_813 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_813 = happySpecReduce_2 304# happyReduction_813-happyReduction_813 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn320- (amsrl (sLL happy_var_1 happy_var_2 []) (AnnList Nothing (Just $ moc happy_var_1) (Just $ mcc happy_var_2) [] [])- )}}--happyReduce_814 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_814 = happySpecReduce_2 304# happyReduction_814-happyReduction_814 happy_x_2- happy_x_1- = happyIn320- (return $ noLocA []- )--happyReduce_815 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_815 = happySpecReduce_3 305# happyReduction_815-happyReduction_815 happy_x_3- happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut325 happy_x_2 of { (HappyWrap325 happy_var_2) -> - case happyOutTok happy_x_3 of { happy_var_3 -> - happyIn321- (happy_var_2 >>= \ happy_var_2 -> amsrl- (sLL happy_var_1 happy_var_3 (reverse (snd $ unLoc happy_var_2)))- (AnnList (Just $ glR happy_var_2) (Just $ moc happy_var_1) (Just $ mcc happy_var_3) (fst $ unLoc happy_var_2) [])- )}}}--happyReduce_816 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_816 = happySpecReduce_3 305# happyReduction_816-happyReduction_816 happy_x_3- happy_x_2- happy_x_1- = case happyOut325 happy_x_2 of { (HappyWrap325 happy_var_2) -> - happyIn321- (happy_var_2 >>= \ happy_var_2 -> amsrl- (L (getLoc happy_var_2) (reverse (snd $ unLoc happy_var_2)))- (AnnList (Just $ glR happy_var_2) Nothing Nothing (fst $ unLoc happy_var_2) [])- )}--happyReduce_817 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_817 = happySpecReduce_2 305# happyReduction_817-happyReduction_817 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn321- (amsrl (sLL happy_var_1 happy_var_2 []) (AnnList Nothing (Just $ moc happy_var_1) (Just $ mcc happy_var_2) [] [])- )}}--happyReduce_818 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_818 = happySpecReduce_2 305# happyReduction_818-happyReduction_818 happy_x_2- happy_x_1- = happyIn321- (return $ noLocA []- )--happyReduce_819 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_819 = happyMonadReduce 2# 306# happyReduction_819-happyReduction_819 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut212 happy_x_1 of { (HappyWrap212 happy_var_1) -> - case happyOut207 happy_x_2 of { (HappyWrap207 happy_var_2) -> - ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->- fmap ecpFromExp $- return $ (reLocA $ sLLlA happy_var_1 happy_var_2 $ HsPragE noExtField (unLoc happy_var_1) happy_var_2))}})- ) (\r -> happyReturn (happyIn322 r))--happyReduce_820 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_820 = happyMonadReduce 2# 307# happyReduction_820-happyReduction_820 (happy_x_2 `HappyStk`- happy_x_1 `HappyStk`- happyRest) tk- = happyThen ((case happyOut212 happy_x_1 of { (HappyWrap212 happy_var_1) -> - case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> - ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->- fmap ecpFromExp $- return $ (reLocA $ sLLlA happy_var_1 happy_var_2 $ HsPragE noExtField (unLoc happy_var_1) happy_var_2))}})- ) (\r -> happyReturn (happyIn323 r))--happyReduce_821 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_821 = happySpecReduce_1 308# happyReduction_821-happyReduction_821 happy_x_1- = case happyOut326 happy_x_1 of { (HappyWrap326 happy_var_1) -> - happyIn324- (happy_var_1 >>= \ happy_var_1 -> return $- sL1 happy_var_1 (fst $ unLoc happy_var_1,snd $ unLoc happy_var_1)- )}--happyReduce_822 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_822 = happySpecReduce_2 308# happyReduction_822-happyReduction_822 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut324 happy_x_2 of { (HappyWrap324 happy_var_2) -> - happyIn324- (happy_var_2 >>= \ happy_var_2 -> return $- sLL happy_var_1 happy_var_2 (((mz AnnSemi happy_var_1) ++ (fst $ unLoc happy_var_2) )- ,snd $ unLoc happy_var_2)- )}}--happyReduce_823 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_823 = happySpecReduce_1 309# happyReduction_823-happyReduction_823 happy_x_1- = case happyOut327 happy_x_1 of { (HappyWrap327 happy_var_1) -> - happyIn325- (happy_var_1 >>= \ happy_var_1 -> return $- sL1 happy_var_1 (fst $ unLoc happy_var_1,snd $ unLoc happy_var_1)- )}--happyReduce_824 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_824 = happySpecReduce_2 309# happyReduction_824-happyReduction_824 happy_x_2- happy_x_1- = case happyOutTok happy_x_1 of { happy_var_1 -> - case happyOut325 happy_x_2 of { (HappyWrap325 happy_var_2) -> - happyIn325- (happy_var_2 >>= \ happy_var_2 -> return $- sLL happy_var_1 happy_var_2 (((mz AnnSemi happy_var_1) ++ (fst $ unLoc happy_var_2) )- ,snd $ unLoc happy_var_2)- )}}--happyReduce_825 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_825 = happySpecReduce_3 310# happyReduction_825-happyReduction_825 happy_x_3- happy_x_2- happy_x_1- = case happyOut326 happy_x_1 of { (HappyWrap326 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut328 happy_x_3 of { (HappyWrap328 happy_var_3) -> - happyIn326- (happy_var_1 >>= \ happy_var_1 ->- happy_var_3 >>= \ happy_var_3 ->- case snd $ unLoc happy_var_1 of- [] -> return (sLL happy_var_1 (reLoc happy_var_3) ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)- ,[happy_var_3]))- (h:t) -> do- h' <- addTrailingSemiA h (gl happy_var_2)- return (sLL happy_var_1 (reLoc happy_var_3) (fst $ unLoc happy_var_1,happy_var_3 : h' : t))- )}}}--happyReduce_826 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_826 = happySpecReduce_2 310# happyReduction_826-happyReduction_826 happy_x_2- happy_x_1- = case happyOut326 happy_x_1 of { (HappyWrap326 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn326- (happy_var_1 >>= \ happy_var_1 ->- case snd $ unLoc happy_var_1 of- [] -> return (sLL happy_var_1 happy_var_2 ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)- ,[]))- (h:t) -> do- h' <- addTrailingSemiA h (gl happy_var_2)- return (sLL happy_var_1 happy_var_2 (fst $ unLoc happy_var_1, h' : t))- )}}--happyReduce_827 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_827 = happySpecReduce_1 310# happyReduction_827-happyReduction_827 happy_x_1- = case happyOut328 happy_x_1 of { (HappyWrap328 happy_var_1) -> - happyIn326- (happy_var_1 >>= \ happy_var_1 -> return $ sL1 (reLoc happy_var_1) ([],[happy_var_1])- )}--happyReduce_828 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_828 = happySpecReduce_3 311# happyReduction_828-happyReduction_828 happy_x_3- happy_x_2- happy_x_1- = case happyOut327 happy_x_1 of { (HappyWrap327 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - case happyOut329 happy_x_3 of { (HappyWrap329 happy_var_3) -> - happyIn327- (happy_var_1 >>= \ happy_var_1 ->- happy_var_3 >>= \ happy_var_3 ->- case snd $ unLoc happy_var_1 of- [] -> return (sLL happy_var_1 (reLoc happy_var_3) ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)- ,[happy_var_3]))- (h:t) -> do- h' <- addTrailingSemiA h (gl happy_var_2)- return (sLL happy_var_1 (reLoc happy_var_3) (fst $ unLoc happy_var_1,happy_var_3 : h' : t))- )}}}--happyReduce_829 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_829 = happySpecReduce_2 311# happyReduction_829-happyReduction_829 happy_x_2- happy_x_1- = case happyOut327 happy_x_1 of { (HappyWrap327 happy_var_1) -> - case happyOutTok happy_x_2 of { happy_var_2 -> - happyIn327- (happy_var_1 >>= \ happy_var_1 ->- case snd $ unLoc happy_var_1 of- [] -> return (sLL happy_var_1 happy_var_2 ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)- ,[]))- (h:t) -> do- h' <- addTrailingSemiA h (gl happy_var_2)- return (sLL happy_var_1 happy_var_2 (fst $ unLoc happy_var_1, h' : t))- )}}--happyReduce_830 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_830 = happySpecReduce_1 311# happyReduction_830-happyReduction_830 happy_x_1- = case happyOut329 happy_x_1 of { (HappyWrap329 happy_var_1) -> - happyIn327- (happy_var_1 >>= \ happy_var_1 -> return $ sL1 (reLoc happy_var_1) ([],[happy_var_1])- )}--happyReduce_831 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_831 = happySpecReduce_2 312# happyReduction_831-happyReduction_831 happy_x_2- happy_x_1- = case happyOut246 happy_x_1 of { (HappyWrap246 happy_var_1) -> - case happyOut237 happy_x_2 of { (HappyWrap237 happy_var_2) -> - happyIn328- (happy_var_2 >>= \ happy_var_2 ->- acsA (\cs -> sLLAsl happy_var_1 happy_var_2- (Match { m_ext = EpAnn (listAsAnchor happy_var_1) [] cs- , m_ctxt = CaseAlt -- for \case and \cases, this will be changed during post-processing- , m_pats = happy_var_1- , m_grhss = unLoc happy_var_2 }))- )}}--happyReduce_832 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_832 = happySpecReduce_2 313# happyReduction_832-happyReduction_832 happy_x_2- happy_x_1- = case happyOut243 happy_x_1 of { (HappyWrap243 happy_var_1) -> - case happyOut237 happy_x_2 of { (HappyWrap237 happy_var_2) -> - happyIn329- (happy_var_2 >>= \ happy_var_2 ->- acsA (\cs -> sLLAsl happy_var_1 happy_var_2- (Match { m_ext = EpAnn (listAsAnchor happy_var_1) [] cs- , m_ctxt = CaseAlt -- for \case and \cases, this will be changed during post-processing- , m_pats = happy_var_1- , m_grhss = unLoc happy_var_2 }))- )}}--happyNewToken action sts stk- = (lexer True)(\tk -> - let cont i = happyDoAction i tk action sts stk in- case tk of {- L _ ITeof -> happyDoAction 150# 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 _ ITelse -> cont 8#;- L _ IThiding -> cont 9#;- L _ ITif -> cont 10#;- L _ ITimport -> cont 11#;- L _ ITin -> cont 12#;- L _ ITinfix -> cont 13#;- L _ ITinfixl -> cont 14#;- L _ ITinfixr -> cont 15#;- L _ ITinstance -> cont 16#;- L _ ITlet -> cont 17#;- L _ ITmodule -> cont 18#;- L _ ITnewtype -> cont 19#;- L _ ITof -> cont 20#;- L _ ITqualified -> cont 21#;- L _ ITthen -> cont 22#;- L _ ITtype -> cont 23#;- L _ ITwhere -> cont 24#;- L _ (ITforall _) -> cont 25#;- L _ ITforeign -> cont 26#;- L _ ITexport -> cont 27#;- L _ ITlabel -> cont 28#;- L _ ITdynamic -> cont 29#;- L _ ITsafe -> cont 30#;- L _ ITinterruptible -> cont 31#;- L _ ITunsafe -> cont 32#;- L _ ITfamily -> cont 33#;- L _ ITrole -> cont 34#;- L _ ITstdcallconv -> cont 35#;- L _ ITccallconv -> cont 36#;- L _ ITcapiconv -> cont 37#;- L _ ITprimcallconv -> cont 38#;- L _ ITjavascriptcallconv -> cont 39#;- L _ ITproc -> cont 40#;- L _ ITrec -> cont 41#;- L _ ITgroup -> cont 42#;- L _ ITby -> cont 43#;- L _ ITusing -> cont 44#;- L _ ITpattern -> cont 45#;- L _ ITstatic -> cont 46#;- L _ ITstock -> cont 47#;- L _ ITanyclass -> cont 48#;- L _ ITvia -> cont 49#;- L _ ITunit -> cont 50#;- L _ ITsignature -> cont 51#;- L _ ITdependency -> cont 52#;- L _ (ITinline_prag _ _ _) -> cont 53#;- L _ (ITopaque_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 _ (ITscc_prag _) -> cont 59#;- L _ (ITdeprecated_prag _) -> cont 60#;- L _ (ITwarning_prag _) -> cont 61#;- L _ (ITunpack_prag _) -> cont 62#;- L _ (ITnounpack_prag _) -> cont 63#;- L _ (ITann_prag _) -> cont 64#;- L _ (ITminimal_prag _) -> cont 65#;- L _ (ITctype _) -> cont 66#;- L _ (IToverlapping_prag _) -> cont 67#;- L _ (IToverlappable_prag _) -> cont 68#;- L _ (IToverlaps_prag _) -> cont 69#;- L _ (ITincoherent_prag _) -> cont 70#;- L _ (ITcomplete_prag _) -> cont 71#;- L _ ITclose_prag -> cont 72#;- L _ ITdotdot -> cont 73#;- L _ ITcolon -> cont 74#;- L _ (ITdcolon _) -> cont 75#;- L _ ITequal -> cont 76#;- L _ ITlam -> cont 77#;- L _ ITlcase -> cont 78#;- L _ ITlcases -> cont 79#;- L _ ITvbar -> cont 80#;- L _ (ITlarrow _) -> cont 81#;- L _ (ITrarrow _) -> cont 82#;- L _ ITlolly -> cont 83#;- L _ ITat -> cont 84#;- L _ (ITdarrow _) -> cont 85#;- L _ ITminus -> cont 86#;- L _ ITtilde -> cont 87#;- L _ ITbang -> cont 88#;- L _ ITprefixminus -> cont 89#;- L _ (ITstar _) -> cont 90#;- L _ (ITlarrowtail _) -> cont 91#;- L _ (ITrarrowtail _) -> cont 92#;- L _ (ITLarrowtail _) -> cont 93#;- L _ (ITRarrowtail _) -> cont 94#;- L _ ITdot -> cont 95#;- L _ (ITproj True) -> cont 96#;- L _ (ITproj False) -> cont 97#;- L _ ITtypeApp -> cont 98#;- L _ ITpercent -> cont 99#;- L _ ITocurly -> cont 100#;- L _ ITccurly -> cont 101#;- L _ ITvocurly -> cont 102#;- L _ ITvccurly -> cont 103#;- L _ ITobrack -> cont 104#;- L _ ITcbrack -> cont 105#;- L _ IToparen -> cont 106#;- L _ ITcparen -> cont 107#;- L _ IToubxparen -> cont 108#;- L _ ITcubxparen -> cont 109#;- L _ (IToparenbar _) -> cont 110#;- L _ (ITcparenbar _) -> cont 111#;- L _ ITsemi -> cont 112#;- L _ ITcomma -> cont 113#;- L _ ITbackquote -> cont 114#;- L _ ITsimpleQuote -> cont 115#;- L _ (ITvarid _) -> cont 116#;- L _ (ITconid _) -> cont 117#;- L _ (ITvarsym _) -> cont 118#;- L _ (ITconsym _) -> cont 119#;- L _ (ITqvarid _) -> cont 120#;- L _ (ITqconid _) -> cont 121#;- L _ (ITqvarsym _) -> cont 122#;- L _ (ITqconsym _) -> cont 123#;- L _ (ITdo _) -> cont 124#;- L _ (ITmdo _) -> cont 125#;- L _ (ITdupipvarid _) -> cont 126#;- L _ (ITlabelvarid _ _) -> cont 127#;- L _ (ITchar _ _) -> cont 128#;- L _ (ITstring _ _) -> cont 129#;- L _ (ITinteger _) -> cont 130#;- L _ (ITrational _) -> cont 131#;- L _ (ITprimchar _ _) -> cont 132#;- L _ (ITprimstring _ _) -> cont 133#;- L _ (ITprimint _ _) -> cont 134#;- L _ (ITprimword _ _) -> cont 135#;- L _ (ITprimfloat _) -> cont 136#;- L _ (ITprimdouble _) -> cont 137#;- L _ (ITopenExpQuote _ _) -> cont 138#;- L _ ITopenPatQuote -> cont 139#;- L _ ITopenTypQuote -> cont 140#;- L _ ITopenDecQuote -> cont 141#;- L _ (ITcloseQuote _) -> cont 142#;- L _ (ITopenTExpQuote _) -> cont 143#;- L _ ITcloseTExpQuote -> cont 144#;- L _ ITdollar -> cont 145#;- L _ ITdollardollar -> cont 146#;- L _ ITtyQuote -> cont 147#;- L _ (ITquasiQuote _) -> cont 148#;- L _ (ITqQuasiQuote _) -> cont 149#;- _ -> happyError' (tk, [])- })--happyError_ explist 150# 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 Prelude.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)), [Prelude.String]) -> P a-happyError' tk = (\(tokens, explist) -> happyError) tk-parseModuleNoHaddock = happySomeParser where- happySomeParser = happyThen (happyParse 0#) (\x -> happyReturn (let {(HappyWrap35 x') = happyOut35 x} in x'))--parseSignature = happySomeParser where- happySomeParser = happyThen (happyParse 1#) (\x -> happyReturn (let {(HappyWrap34 x') = happyOut34 x} in x'))--parseImport = happySomeParser where- happySomeParser = happyThen (happyParse 2#) (\x -> happyReturn (let {(HappyWrap62 x') = happyOut62 x} in x'))--parseStatement = happySomeParser where- happySomeParser = happyThen (happyParse 3#) (\x -> happyReturn (let {(HappyWrap250 x') = happyOut250 x} in x'))--parseDeclaration = happySomeParser where- happySomeParser = happyThen (happyParse 4#) (\x -> happyReturn (let {(HappyWrap78 x') = happyOut78 x} in x'))--parseExpression = happySomeParser where- happySomeParser = happyThen (happyParse 5#) (\x -> happyReturn (let {(HappyWrap207 x') = happyOut207 x} in x'))--parsePattern = happySomeParser where- happySomeParser = happyThen (happyParse 6#) (\x -> happyReturn (let {(HappyWrap242 x') = happyOut242 x} in x'))--parseTypeSignature = happySomeParser where- happySomeParser = happyThen (happyParse 7#) (\x -> happyReturn (let {(HappyWrap203 x') = happyOut203 x} in x'))--parseStmt = happySomeParser where- happySomeParser = happyThen (happyParse 8#) (\x -> happyReturn (let {(HappyWrap249 x') = happyOut249 x} in x'))--parseIdentifier = happySomeParser where- happySomeParser = happyThen (happyParse 9#) (\x -> happyReturn (let {(HappyWrap16 x') = happyOut16 x} in x'))--parseType = happySomeParser where- happySomeParser = happyThen (happyParse 10#) (\x -> happyReturn (let {(HappyWrap159 x') = happyOut159 x} in x'))--parseBackpack = happySomeParser where- happySomeParser = happyThen (happyParse 11#) (\x -> happyReturn (let {(HappyWrap17 x') = happyOut17 x} in x'))--parseHeader = happySomeParser where- happySomeParser = happyThen (happyParse 12#) (\x -> happyReturn (let {(HappyWrap43 x') = happyOut43 x} in x'))--happySeq = happyDoSeq---happyError :: P a-happyError = srcParseFail--getVARID (L _ (ITvarid x)) = x-getCONID (L _ (ITconid x)) = x-getVARSYM (L _ (ITvarsym x)) = x-getCONSYM (L _ (ITconsym x)) = x-getDO (L _ (ITdo x)) = x-getMDO (L _ (ITmdo 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-getINLINE (L _ (ITinline_prag _ inl conl)) = (inl,conl)-getSPEC_INLINE (L _ (ITspec_inline_prag src True)) = (Inline src,FunLike)-getSPEC_INLINE (L _ (ITspec_inline_prag src False)) = (NoInline src,FunLike)-getCOMPLETE_PRAGs (L _ (ITcomplete_prag x)) = x-getVOCURLY (L (RealSrcSpan l _) ITvocurly) = srcSpanStartCol l--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--getLABELVARIDs (L _ (ITlabelvarid src _)) = src---- See Note [Pragma source text] in "GHC.Types.Basic" for the following-getINLINE_PRAGs (L _ (ITinline_prag _ inl _)) = inlineSpecSource inl-getOPAQUE_PRAGs (L _ (ITopaque_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-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) Nothing--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 (L _ ITlolly) = True-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- -- We probably actually want to be more restrictive than this- if ' ' `elem` unpackFS s- then addFatalError $ mkPlainErrorMsgEnvelope (getLoc lt) $ PsErrSpaceInSCC- else return s--stringLiteralToHsDocWst :: Located StringLiteral -> Located (WithHsDocIdentifiers StringLiteral GhcPs)-stringLiteralToHsDocWst = lexStringLiteral parseIdentifier---- Utilities for combining source spans-comb2 :: Located a -> Located b -> SrcSpan-comb2 a b = a `seq` b `seq` combineLocs a b---- Utilities for combining source spans-comb2A :: Located a -> LocatedAn t b -> SrcSpan-comb2A a b = a `seq` b `seq` combineLocs a (reLoc b)--comb2N :: Located a -> LocatedN b -> SrcSpan-comb2N a b = a `seq` b `seq` combineLocs a (reLocN b)--comb2Al :: LocatedAn t a -> Located b -> SrcSpan-comb2Al a b = a `seq` b `seq` combineLocs (reLoc 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))--comb3A :: Located a -> Located b -> LocatedAn t c -> SrcSpan-comb3A a b c = a `seq` b `seq` c `seq`- combineSrcSpans (getLoc a) (combineSrcSpans (getLoc b) (getLocA c))--comb3N :: Located a -> Located b -> LocatedN c -> SrcSpan-comb3N a b c = a `seq` b `seq` c `seq`- combineSrcSpans (getLoc a) (combineSrcSpans (getLoc b) (getLocA 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))--comb5 :: Located a -> Located b -> Located c -> Located d -> Located e -> SrcSpan-comb5 a b c d e = a `seq` b `seq` c `seq` d `seq` e `seq`- (combineSrcSpans (getLoc a) $ combineSrcSpans (getLoc b) $- combineSrcSpans (getLoc c) $ combineSrcSpans (getLoc d) (getLoc e))---- strict constructor version:-{-# INLINE sL #-}-sL :: l -> a -> GenLocated l a-sL loc a = loc `seq` a `seq` L loc 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 :: GenLocated l a -> b -> GenLocated l b-sL1 x = sL (getLoc x) -- #define sL1 sL (getLoc $1)--{-# INLINE sL1A #-}-sL1A :: LocatedAn t a -> b -> Located b-sL1A x = sL (getLocA x) -- #define sL1 sL (getLoc $1)--{-# INLINE sL1N #-}-sL1N :: LocatedN a -> b -> Located b-sL1N x = sL (getLocA x) -- #define sL1 sL (getLoc $1)--{-# INLINE sL1a #-}-sL1a :: Located a -> b -> LocatedAn t b-sL1a x = sL (noAnnSrcSpan $ getLoc x) -- #define sL1 sL (getLoc $1)--{-# INLINE sL1l #-}-sL1l :: LocatedAn t a -> b -> LocatedAn u b-sL1l x = sL (l2l $ getLoc x) -- #define sL1 sL (getLoc $1)--{-# INLINE sL1n #-}-sL1n :: Located a -> b -> LocatedN b-sL1n x = L (noAnnSrcSpan $ 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 $>)--{-# INLINE sLLa #-}-sLLa :: Located a -> Located b -> c -> LocatedAn t c-sLLa x y = sL (noAnnSrcSpan $ comb2 x y) -- #define LL sL (comb2 $1 $>)--{-# INLINE sLLlA #-}-sLLlA :: Located a -> LocatedAn t b -> c -> Located c-sLLlA x y = sL (comb2A x y) -- #define LL sL (comb2 $1 $>)--{-# INLINE sLLAl #-}-sLLAl :: LocatedAn t a -> Located b -> c -> Located c-sLLAl x y = sL (comb2A y x) -- #define LL sL (comb2 $1 $>)--{-# INLINE sLLAsl #-}-sLLAsl :: [LocatedAn t a] -> Located b -> c -> Located c-sLLAsl [] = sL1-sLLAsl (x:_) = sLLAl x--{-# INLINE sLLAA #-}-sLLAA :: LocatedAn t a -> LocatedAn u b -> c -> Located c-sLLAA x y = sL (comb2 (reLoc y) (reLoc x)) -- #define LL sL (comb2 $1 $>)---{- Note [Adding location info]- ~~~~~~~~~~~~~~~~~~~~~~~~~~~--This is done using the three functions below, sL0, sL1-and sLL. Note that these functions were mechanically-converted from the three macros that used to exist before,-namely L0, L1 and LL.--They each add a SrcSpan to their argument.-- sL0 adds 'noSrcSpan', used for empty productions- -- This doesn't seem to work anymore -=chak-- sL1 for a production with a single token on the lhs. Grabs the SrcSpan- from that token.-- sLL for a production with >1 token on the lhs. Makes up a SrcSpan from- the first and last tokens.--These suffice for the majority of cases. However, we must be-especially careful with empty productions: sLL won't work if the first-or last token on the lhs can represent an empty span. In these cases,-we have to calculate the span using more of the tokens from the lhs, eg.-- | 'newtype' tycl_hdr '=' newconstr deriving- { L (comb3 $1 $4 $5)- (mkTyData NewType (unLoc $2) $4 (unLoc $5)) }--We provide comb3 and comb4 functions which are useful in such cases.--Be careful: there's no checking that you actually got this right, the-only symptom will be that the SrcSpans of your syntax will be-incorrect.---}---- Make a source location for the file. We're a bit lazy here and just--- make a point SrcSpan at line 1, column 0. Strictly speaking we should--- try to find the span of the whole file (ToDo).-fileSrcSpan :: P SrcSpan-fileSrcSpan = do- l <- getRealSrcLoc;- let loc = mkSrcLoc (srcLocFile l) 1 1;- return (mkSrcSpan loc loc)---- Hint about linear types-hintLinear :: MonadP m => SrcSpan -> m ()-hintLinear span = do- linearEnabled <- getBit LinearTypesBit- unless linearEnabled $ addError $ mkPlainErrorMsgEnvelope span $ PsErrLinearFunction---- Does this look like (a %m)?-looksLikeMult :: LHsType GhcPs -> LocatedN RdrName -> LHsType GhcPs -> Bool-looksLikeMult ty1 l_op ty2- | Unqual op_name <- unLoc l_op- , occNameFS op_name == fsLit "%"- , Strict.Just ty1_pos <- getBufSpan (getLocA ty1)- , Strict.Just pct_pos <- getBufSpan (getLocA l_op)- , Strict.Just ty2_pos <- getBufSpan (getLocA ty2)- , bufSpanEnd ty1_pos /= bufSpanStart pct_pos- , bufSpanEnd pct_pos == bufSpanStart ty2_pos- = True- | otherwise = False---- Hint about the MultiWayIf extension-hintMultiWayIf :: SrcSpan -> P ()-hintMultiWayIf span = do- mwiEnabled <- getBit MultiWayIfBit- unless mwiEnabled $ addError $ mkPlainErrorMsgEnvelope span PsErrMultiWayIf---- Hint about explicit-forall-hintExplicitForall :: Located Token -> P ()-hintExplicitForall tok = do- forall <- getBit ExplicitForallBit- rulePrag <- getBit InRulePragBit- unless (forall || rulePrag) $ addError $ mkPlainErrorMsgEnvelope (getLoc tok) $- (PsErrExplicitForall (isUnicode tok))---- Hint about qualified-do-hintQualifiedDo :: Located Token -> P ()-hintQualifiedDo tok = do- qualifiedDo <- getBit QualifiedDoBit- case maybeQDoDoc of- Just qdoDoc | not qualifiedDo ->- addError $ mkPlainErrorMsgEnvelope (getLoc tok) $- (PsErrIllegalQualifiedDo qdoDoc)- _ -> return ()- where- maybeQDoDoc = case unLoc tok of- ITdo (Just m) -> Just $ ftext m <> text ".do"- ITmdo (Just m) -> Just $ ftext m <> text ".mdo"- t -> Nothing---- When two single quotes don't followed by tyvar or gtycon, we report the--- error as empty character literal, or TH quote that missing proper type--- variable or constructor. See #13450.-reportEmptyDoubleQuotes :: SrcSpan -> P a-reportEmptyDoubleQuotes span = do- thQuotes <- getBit ThQuotesBit- addFatalError $ mkPlainErrorMsgEnvelope span $ PsErrEmptyDoubleQuotes thQuotes--{--%************************************************************************-%* *- Helper functions for generating annotations in the parser-%* *-%************************************************************************--For the general principles of the following routines, see Note [exact print annotations]-in GHC.Parser.Annotation---}---- |Construct an AddEpAnn from the annotation keyword and the location--- of the keyword itself-mj :: AnnKeywordId -> Located e -> AddEpAnn-mj a l = AddEpAnn a (srcSpan2e $ gl l)--mjN :: AnnKeywordId -> LocatedN e -> AddEpAnn-mjN a l = AddEpAnn a (srcSpan2e $ glN l)---- |Construct an AddEpAnn from the annotation keyword and the location--- of the keyword itself, provided the span is not zero width-mz :: AnnKeywordId -> Located e -> [AddEpAnn]-mz a l = if isZeroWidthSpan (gl l) then [] else [AddEpAnn a (srcSpan2e $ gl l)]--msemi :: Located e -> [TrailingAnn]-msemi l = if isZeroWidthSpan (gl l) then [] else [AddSemiAnn (srcSpan2e $ gl l)]--msemim :: Located e -> Maybe EpaLocation-msemim l = if isZeroWidthSpan (gl l) then Nothing else Just (srcSpan2e $ gl l)---- |Construct an AddEpAnn 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 -> AddEpAnn-mu a lt@(L l t) = AddEpAnn (toUnicodeAnn a lt) (srcSpan2e 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--toUnicode :: Located Token -> IsUnicodeSyntax-toUnicode t = if isUnicode t then UnicodeSyntax else NormalSyntax--gl :: GenLocated l a -> l-gl = getLoc--glA :: LocatedAn t a -> SrcSpan-glA = getLocA--glN :: LocatedN a -> SrcSpan-glN = getLocA--glR :: Located a -> Anchor-glR la = Anchor (realSrcSpan $ getLoc la) UnchangedAnchor--glAA :: Located a -> EpaLocation-glAA = srcSpan2e . getLoc--glRR :: Located a -> RealSrcSpan-glRR = realSrcSpan . getLoc--glAR :: LocatedAn t a -> Anchor-glAR la = Anchor (realSrcSpan $ getLocA la) UnchangedAnchor--glNR :: LocatedN a -> Anchor-glNR ln = Anchor (realSrcSpan $ getLocA ln) UnchangedAnchor--glNRR :: LocatedN a -> EpaLocation-glNRR = srcSpan2e . getLocA--anc :: RealSrcSpan -> Anchor-anc r = Anchor r UnchangedAnchor--acs :: MonadP m => (EpAnnComments -> Located a) -> m (Located a)-acs a = do- let (L l _) = a emptyComments- cs <- getCommentsFor l- return (a cs)---- Called at the very end to pick up the EOF position, as well as any comments not allocated yet.-acsFinal :: (EpAnnComments -> Located a) -> P (Located a)-acsFinal a = do- let (L l _) = a emptyComments- cs <- getCommentsFor l- csf <- getFinalCommentsFor l- meof <- getEofPos- let ce = case meof of- Strict.Nothing -> EpaComments []- Strict.Just (pos `Strict.And` gap) ->- EpaCommentsBalanced [] [L (realSpanAsAnchor pos) (EpaComment EpaEofComment gap)]- return (a (cs Semi.<> csf Semi.<> ce))--acsa :: MonadP m => (EpAnnComments -> LocatedAn t a) -> m (LocatedAn t a)-acsa a = do- let (L l _) = a emptyComments- cs <- getCommentsFor (locA l)- return (a cs)--acsA :: MonadP m => (EpAnnComments -> Located a) -> m (LocatedAn t a)-acsA a = reLocA <$> acs a--acsExpr :: (EpAnnComments -> LHsExpr GhcPs) -> P ECP-acsExpr a = do { expr :: (LHsExpr GhcPs) <- runPV $ acsa a- ; return (ecpFromExp $ expr) }--amsA :: MonadP m => LocatedA a -> [TrailingAnn] -> m (LocatedA a)-amsA (L l a) bs = do- cs <- getCommentsFor (locA l)- return (L (addAnnsA l bs cs) a)--amsAl :: MonadP m => LocatedA a -> SrcSpan -> [TrailingAnn] -> m (LocatedA a)-amsAl (L l a) loc bs = do- cs <- getCommentsFor loc- return (L (addAnnsA l bs cs) a)--amsrc :: MonadP m => Located a -> AnnContext -> m (LocatedC a)-amsrc a@(L l _) bs = do- cs <- getCommentsFor l- return (reAnnC bs cs a)--amsrl :: MonadP m => Located a -> AnnList -> m (LocatedL a)-amsrl a@(L l _) bs = do- cs <- getCommentsFor l- return (reAnnL bs cs a)--amsrp :: MonadP m => Located a -> AnnPragma -> m (LocatedP a)-amsrp a@(L l _) bs = do- cs <- getCommentsFor l- return (reAnnL bs cs a)--amsrn :: MonadP m => Located a -> NameAnn -> m (LocatedN a)-amsrn (L l a) an = do- cs <- getCommentsFor l- let ann = (EpAnn (spanAsAnchor l) an cs)- return (L (SrcSpanAnn ann l) a)---- |Synonyms for AddEpAnn versions of AnnOpen and AnnClose-mo,mc :: Located Token -> AddEpAnn-mo ll = mj AnnOpen ll-mc ll = mj AnnClose ll--moc,mcc :: Located Token -> AddEpAnn-moc ll = mj AnnOpenC ll-mcc ll = mj AnnCloseC ll--mop,mcp :: Located Token -> AddEpAnn-mop ll = mj AnnOpenP ll-mcp ll = mj AnnCloseP ll--moh,mch :: Located Token -> AddEpAnn-moh ll = mj AnnOpenPH ll-mch ll = mj AnnClosePH ll--mos,mcs :: Located Token -> AddEpAnn-mos ll = mj AnnOpenS ll-mcs ll = mj AnnCloseS ll--pvA :: MonadP m => m (Located a) -> m (LocatedAn t a)-pvA a = do { av <- a- ; return (reLocA av) }--pvN :: MonadP m => m (Located a) -> m (LocatedN a)-pvN a = do { (L l av) <- a- ; return (L (noAnnSrcSpan l) av) }--pvL :: MonadP m => m (LocatedAn t a) -> m (Located a)-pvL a = do { av <- a- ; return (reLoc av) }---- | Parse a Haskell module with Haddock comments.--- This is done in two steps:------ * 'parseModuleNoHaddock' to build the AST--- * 'addHaddockToModule' to insert Haddock comments into it------ This is the only parser entry point that deals with Haddock comments.--- The other entry points ('parseDeclaration', 'parseExpression', etc) do--- not insert them into the AST.-parseModule :: P (Located (HsModule GhcPs))-parseModule = parseModuleNoHaddock >>= addHaddockToModule--commentsA :: (Monoid ann) => SrcSpan -> EpAnnComments -> SrcSpanAnn' (EpAnn ann)-commentsA loc cs = SrcSpanAnn (EpAnn (Anchor (rs loc) UnchangedAnchor) mempty cs) loc---- | Instead of getting the *enclosed* comments, this includes the--- *preceding* ones. It is used at the top level to get comments--- between top level declarations.-commentsPA :: (Monoid ann) => LocatedAn ann a -> P (LocatedAn ann a)-commentsPA la@(L l a) = do- cs <- getPriorCommentsFor (getLocA la)- return (L (addCommentsToSrcAnn l cs) a)--rs :: SrcSpan -> RealSrcSpan-rs (RealSrcSpan l _) = l-rs _ = panic "Parser should only have RealSrcSpan"--hsDoAnn :: Located a -> LocatedAn t b -> AnnKeywordId -> AnnList-hsDoAnn (L l _) (L ll _) kw- = AnnList (Just $ spanAsAnchor (locA ll)) Nothing Nothing [AddEpAnn kw (srcSpan2e l)] []--listAsAnchor :: [LocatedAn t a] -> Anchor-listAsAnchor [] = spanAsAnchor noSrcSpan-listAsAnchor (L l _:_) = spanAsAnchor (locA l)--hsTok :: Located Token -> LHsToken tok GhcPs-hsTok (L l _) = L (mkTokenLocation l) HsTok+-- parser produced by Happy Version 1.20.1.1++newtype HappyAbsSyn = HappyAbsSyn HappyAny+#if __GLASGOW_HASKELL__ >= 607+type HappyAny = Happy_GHC_Exts.Any+#else+type HappyAny = forall a . a+#endif+newtype HappyWrap16 = HappyWrap16 (LocatedN RdrName)+happyIn16 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn16 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap16 x)+{-# INLINE happyIn16 #-}+happyOut16 :: (HappyAbsSyn ) -> HappyWrap16+happyOut16 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut16 #-}+newtype HappyWrap17 = HappyWrap17 ([LHsUnit PackageName])+happyIn17 :: ([LHsUnit PackageName]) -> (HappyAbsSyn )+happyIn17 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap17 x)+{-# INLINE happyIn17 #-}+happyOut17 :: (HappyAbsSyn ) -> HappyWrap17+happyOut17 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut17 #-}+newtype HappyWrap18 = HappyWrap18 (OrdList (LHsUnit PackageName))+happyIn18 :: (OrdList (LHsUnit PackageName)) -> (HappyAbsSyn )+happyIn18 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap18 x)+{-# INLINE happyIn18 #-}+happyOut18 :: (HappyAbsSyn ) -> HappyWrap18+happyOut18 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut18 #-}+newtype HappyWrap19 = HappyWrap19 (LHsUnit PackageName)+happyIn19 :: (LHsUnit PackageName) -> (HappyAbsSyn )+happyIn19 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap19 x)+{-# INLINE happyIn19 #-}+happyOut19 :: (HappyAbsSyn ) -> HappyWrap19+happyOut19 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut19 #-}+newtype HappyWrap20 = HappyWrap20 (LHsUnitId PackageName)+happyIn20 :: (LHsUnitId PackageName) -> (HappyAbsSyn )+happyIn20 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap20 x)+{-# INLINE happyIn20 #-}+happyOut20 :: (HappyAbsSyn ) -> HappyWrap20+happyOut20 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut20 #-}+newtype HappyWrap21 = HappyWrap21 (OrdList (LHsModuleSubst PackageName))+happyIn21 :: (OrdList (LHsModuleSubst PackageName)) -> (HappyAbsSyn )+happyIn21 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap21 x)+{-# INLINE happyIn21 #-}+happyOut21 :: (HappyAbsSyn ) -> HappyWrap21+happyOut21 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut21 #-}+newtype HappyWrap22 = HappyWrap22 (LHsModuleSubst PackageName)+happyIn22 :: (LHsModuleSubst PackageName) -> (HappyAbsSyn )+happyIn22 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap22 x)+{-# INLINE happyIn22 #-}+happyOut22 :: (HappyAbsSyn ) -> HappyWrap22+happyOut22 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut22 #-}+newtype HappyWrap23 = HappyWrap23 (LHsModuleId PackageName)+happyIn23 :: (LHsModuleId PackageName) -> (HappyAbsSyn )+happyIn23 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap23 x)+{-# INLINE happyIn23 #-}+happyOut23 :: (HappyAbsSyn ) -> HappyWrap23+happyOut23 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut23 #-}+newtype HappyWrap24 = HappyWrap24 (Located PackageName)+happyIn24 :: (Located PackageName) -> (HappyAbsSyn )+happyIn24 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap24 x)+{-# INLINE happyIn24 #-}+happyOut24 :: (HappyAbsSyn ) -> HappyWrap24+happyOut24 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut24 #-}+newtype HappyWrap25 = HappyWrap25 (Located FastString)+happyIn25 :: (Located FastString) -> (HappyAbsSyn )+happyIn25 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap25 x)+{-# INLINE happyIn25 #-}+happyOut25 :: (HappyAbsSyn ) -> HappyWrap25+happyOut25 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut25 #-}+newtype HappyWrap26 = HappyWrap26 ([AddEpAnn])+happyIn26 :: ([AddEpAnn]) -> (HappyAbsSyn )+happyIn26 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap26 x)+{-# INLINE happyIn26 #-}+happyOut26 :: (HappyAbsSyn ) -> HappyWrap26+happyOut26 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut26 #-}+newtype HappyWrap27 = HappyWrap27 (Located FastString)+happyIn27 :: (Located FastString) -> (HappyAbsSyn )+happyIn27 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap27 x)+{-# INLINE happyIn27 #-}+happyOut27 :: (HappyAbsSyn ) -> HappyWrap27+happyOut27 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut27 #-}+newtype HappyWrap28 = HappyWrap28 (Maybe [LRenaming])+happyIn28 :: (Maybe [LRenaming]) -> (HappyAbsSyn )+happyIn28 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap28 x)+{-# INLINE happyIn28 #-}+happyOut28 :: (HappyAbsSyn ) -> HappyWrap28+happyOut28 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut28 #-}+newtype HappyWrap29 = HappyWrap29 (OrdList LRenaming)+happyIn29 :: (OrdList LRenaming) -> (HappyAbsSyn )+happyIn29 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap29 x)+{-# INLINE happyIn29 #-}+happyOut29 :: (HappyAbsSyn ) -> HappyWrap29+happyOut29 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut29 #-}+newtype HappyWrap30 = HappyWrap30 (LRenaming)+happyIn30 :: (LRenaming) -> (HappyAbsSyn )+happyIn30 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap30 x)+{-# INLINE happyIn30 #-}+happyOut30 :: (HappyAbsSyn ) -> HappyWrap30+happyOut30 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut30 #-}+newtype HappyWrap31 = HappyWrap31 (OrdList (LHsUnitDecl PackageName))+happyIn31 :: (OrdList (LHsUnitDecl PackageName)) -> (HappyAbsSyn )+happyIn31 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap31 x)+{-# INLINE happyIn31 #-}+happyOut31 :: (HappyAbsSyn ) -> HappyWrap31+happyOut31 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut31 #-}+newtype HappyWrap32 = HappyWrap32 (OrdList (LHsUnitDecl PackageName))+happyIn32 :: (OrdList (LHsUnitDecl PackageName)) -> (HappyAbsSyn )+happyIn32 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap32 x)+{-# INLINE happyIn32 #-}+happyOut32 :: (HappyAbsSyn ) -> HappyWrap32+happyOut32 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut32 #-}+newtype HappyWrap33 = HappyWrap33 (LHsUnitDecl PackageName)+happyIn33 :: (LHsUnitDecl PackageName) -> (HappyAbsSyn )+happyIn33 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap33 x)+{-# INLINE happyIn33 #-}+happyOut33 :: (HappyAbsSyn ) -> HappyWrap33+happyOut33 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut33 #-}+newtype HappyWrap34 = HappyWrap34 (Located (HsModule GhcPs))+happyIn34 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )+happyIn34 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap34 x)+{-# INLINE happyIn34 #-}+happyOut34 :: (HappyAbsSyn ) -> HappyWrap34+happyOut34 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut34 #-}+newtype HappyWrap35 = HappyWrap35 (Located (HsModule GhcPs))+happyIn35 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )+happyIn35 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap35 x)+{-# INLINE happyIn35 #-}+happyOut35 :: (HappyAbsSyn ) -> HappyWrap35+happyOut35 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut35 #-}+newtype HappyWrap36 = HappyWrap36 (())+happyIn36 :: (()) -> (HappyAbsSyn )+happyIn36 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap36 x)+{-# INLINE happyIn36 #-}+happyOut36 :: (HappyAbsSyn ) -> HappyWrap36+happyOut36 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut36 #-}+newtype HappyWrap37 = HappyWrap37 (())+happyIn37 :: (()) -> (HappyAbsSyn )+happyIn37 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap37 x)+{-# INLINE happyIn37 #-}+happyOut37 :: (HappyAbsSyn ) -> HappyWrap37+happyOut37 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut37 #-}+newtype HappyWrap38 = HappyWrap38 (Maybe (LocatedP (WarningTxt GhcPs)))+happyIn38 :: (Maybe (LocatedP (WarningTxt GhcPs))) -> (HappyAbsSyn )+happyIn38 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap38 x)+{-# INLINE happyIn38 #-}+happyOut38 :: (HappyAbsSyn ) -> HappyWrap38+happyOut38 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut38 #-}+newtype HappyWrap39 = HappyWrap39 (([TrailingAnn]+ ,([LImportDecl GhcPs], [LHsDecl GhcPs])+ ,LayoutInfo GhcPs))+happyIn39 :: (([TrailingAnn]+ ,([LImportDecl GhcPs], [LHsDecl GhcPs])+ ,LayoutInfo GhcPs)) -> (HappyAbsSyn )+happyIn39 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap39 x)+{-# INLINE happyIn39 #-}+happyOut39 :: (HappyAbsSyn ) -> HappyWrap39+happyOut39 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut39 #-}+newtype HappyWrap40 = HappyWrap40 (([TrailingAnn]+ ,([LImportDecl GhcPs], [LHsDecl GhcPs])+ ,LayoutInfo GhcPs))+happyIn40 :: (([TrailingAnn]+ ,([LImportDecl GhcPs], [LHsDecl GhcPs])+ ,LayoutInfo GhcPs)) -> (HappyAbsSyn )+happyIn40 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap40 x)+{-# INLINE happyIn40 #-}+happyOut40 :: (HappyAbsSyn ) -> HappyWrap40+happyOut40 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut40 #-}+newtype HappyWrap41 = HappyWrap41 (([TrailingAnn]+ ,([LImportDecl GhcPs], [LHsDecl GhcPs])))+happyIn41 :: (([TrailingAnn]+ ,([LImportDecl GhcPs], [LHsDecl GhcPs]))) -> (HappyAbsSyn )+happyIn41 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap41 x)+{-# INLINE happyIn41 #-}+happyOut41 :: (HappyAbsSyn ) -> HappyWrap41+happyOut41 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut41 #-}+newtype HappyWrap42 = HappyWrap42 (([LImportDecl GhcPs], [LHsDecl GhcPs]))+happyIn42 :: (([LImportDecl GhcPs], [LHsDecl GhcPs])) -> (HappyAbsSyn )+happyIn42 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap42 x)+{-# INLINE happyIn42 #-}+happyOut42 :: (HappyAbsSyn ) -> HappyWrap42+happyOut42 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut42 #-}+newtype HappyWrap43 = HappyWrap43 (Located (HsModule GhcPs))+happyIn43 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )+happyIn43 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap43 x)+{-# INLINE happyIn43 #-}+happyOut43 :: (HappyAbsSyn ) -> HappyWrap43+happyOut43 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut43 #-}+newtype HappyWrap44 = HappyWrap44 ([LImportDecl GhcPs])+happyIn44 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )+happyIn44 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap44 x)+{-# INLINE happyIn44 #-}+happyOut44 :: (HappyAbsSyn ) -> HappyWrap44+happyOut44 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut44 #-}+newtype HappyWrap45 = HappyWrap45 ([LImportDecl GhcPs])+happyIn45 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )+happyIn45 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap45 x)+{-# INLINE happyIn45 #-}+happyOut45 :: (HappyAbsSyn ) -> HappyWrap45+happyOut45 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut45 #-}+newtype HappyWrap46 = HappyWrap46 ([LImportDecl GhcPs])+happyIn46 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )+happyIn46 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap46 x)+{-# INLINE happyIn46 #-}+happyOut46 :: (HappyAbsSyn ) -> HappyWrap46+happyOut46 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut46 #-}+newtype HappyWrap47 = HappyWrap47 ([LImportDecl GhcPs])+happyIn47 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )+happyIn47 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap47 x)+{-# INLINE happyIn47 #-}+happyOut47 :: (HappyAbsSyn ) -> HappyWrap47+happyOut47 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut47 #-}+newtype HappyWrap48 = HappyWrap48 ((Maybe (LocatedL [LIE GhcPs])))+happyIn48 :: ((Maybe (LocatedL [LIE GhcPs]))) -> (HappyAbsSyn )+happyIn48 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap48 x)+{-# INLINE happyIn48 #-}+happyOut48 :: (HappyAbsSyn ) -> HappyWrap48+happyOut48 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut48 #-}+newtype HappyWrap49 = HappyWrap49 (([AddEpAnn], OrdList (LIE GhcPs)))+happyIn49 :: (([AddEpAnn], OrdList (LIE GhcPs))) -> (HappyAbsSyn )+happyIn49 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap49 x)+{-# INLINE happyIn49 #-}+happyOut49 :: (HappyAbsSyn ) -> HappyWrap49+happyOut49 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut49 #-}+newtype HappyWrap50 = HappyWrap50 (OrdList (LIE GhcPs))+happyIn50 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )+happyIn50 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap50 x)+{-# INLINE happyIn50 #-}+happyOut50 :: (HappyAbsSyn ) -> HappyWrap50+happyOut50 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut50 #-}+newtype HappyWrap51 = HappyWrap51 (OrdList (LIE GhcPs))+happyIn51 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )+happyIn51 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap51 x)+{-# INLINE happyIn51 #-}+happyOut51 :: (HappyAbsSyn ) -> HappyWrap51+happyOut51 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut51 #-}+newtype HappyWrap52 = HappyWrap52 (Maybe (LocatedP (WarningTxt GhcPs)))+happyIn52 :: (Maybe (LocatedP (WarningTxt GhcPs))) -> (HappyAbsSyn )+happyIn52 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap52 x)+{-# INLINE happyIn52 #-}+happyOut52 :: (HappyAbsSyn ) -> HappyWrap52+happyOut52 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut52 #-}+newtype HappyWrap53 = HappyWrap53 (Located ([AddEpAnn],ImpExpSubSpec))+happyIn53 :: (Located ([AddEpAnn],ImpExpSubSpec)) -> (HappyAbsSyn )+happyIn53 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap53 x)+{-# INLINE happyIn53 #-}+happyOut53 :: (HappyAbsSyn ) -> HappyWrap53+happyOut53 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut53 #-}+newtype HappyWrap54 = HappyWrap54 (([AddEpAnn], [LocatedA ImpExpQcSpec]))+happyIn54 :: (([AddEpAnn], [LocatedA ImpExpQcSpec])) -> (HappyAbsSyn )+happyIn54 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap54 x)+{-# INLINE happyIn54 #-}+happyOut54 :: (HappyAbsSyn ) -> HappyWrap54+happyOut54 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut54 #-}+newtype HappyWrap55 = HappyWrap55 (([AddEpAnn], [LocatedA ImpExpQcSpec]))+happyIn55 :: (([AddEpAnn], [LocatedA ImpExpQcSpec])) -> (HappyAbsSyn )+happyIn55 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap55 x)+{-# INLINE happyIn55 #-}+happyOut55 :: (HappyAbsSyn ) -> HappyWrap55+happyOut55 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut55 #-}+newtype HappyWrap56 = HappyWrap56 (Located ([AddEpAnn], LocatedA ImpExpQcSpec))+happyIn56 :: (Located ([AddEpAnn], LocatedA ImpExpQcSpec)) -> (HappyAbsSyn )+happyIn56 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap56 x)+{-# INLINE happyIn56 #-}+happyOut56 :: (HappyAbsSyn ) -> HappyWrap56+happyOut56 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut56 #-}+newtype HappyWrap57 = HappyWrap57 (LocatedA ImpExpQcSpec)+happyIn57 :: (LocatedA ImpExpQcSpec) -> (HappyAbsSyn )+happyIn57 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap57 x)+{-# INLINE happyIn57 #-}+happyOut57 :: (HappyAbsSyn ) -> HappyWrap57+happyOut57 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut57 #-}+newtype HappyWrap58 = HappyWrap58 (LocatedN RdrName)+happyIn58 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn58 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap58 x)+{-# INLINE happyIn58 #-}+happyOut58 :: (HappyAbsSyn ) -> HappyWrap58+happyOut58 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut58 #-}+newtype HappyWrap59 = HappyWrap59 (Located [TrailingAnn])+happyIn59 :: (Located [TrailingAnn]) -> (HappyAbsSyn )+happyIn59 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap59 x)+{-# INLINE happyIn59 #-}+happyOut59 :: (HappyAbsSyn ) -> HappyWrap59+happyOut59 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut59 #-}+newtype HappyWrap60 = HappyWrap60 ([TrailingAnn])+happyIn60 :: ([TrailingAnn]) -> (HappyAbsSyn )+happyIn60 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap60 x)+{-# INLINE happyIn60 #-}+happyOut60 :: (HappyAbsSyn ) -> HappyWrap60+happyOut60 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut60 #-}+newtype HappyWrap61 = HappyWrap61 ([LImportDecl GhcPs])+happyIn61 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )+happyIn61 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap61 x)+{-# INLINE happyIn61 #-}+happyOut61 :: (HappyAbsSyn ) -> HappyWrap61+happyOut61 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut61 #-}+newtype HappyWrap62 = HappyWrap62 ([LImportDecl GhcPs])+happyIn62 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )+happyIn62 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap62 x)+{-# INLINE happyIn62 #-}+happyOut62 :: (HappyAbsSyn ) -> HappyWrap62+happyOut62 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut62 #-}+newtype HappyWrap63 = HappyWrap63 (LImportDecl GhcPs)+happyIn63 :: (LImportDecl GhcPs) -> (HappyAbsSyn )+happyIn63 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap63 x)+{-# INLINE happyIn63 #-}+happyOut63 :: (HappyAbsSyn ) -> HappyWrap63+happyOut63 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut63 #-}+newtype HappyWrap64 = HappyWrap64 (((Maybe (EpaLocation,EpaLocation),SourceText),IsBootInterface))+happyIn64 :: (((Maybe (EpaLocation,EpaLocation),SourceText),IsBootInterface)) -> (HappyAbsSyn )+happyIn64 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap64 x)+{-# INLINE happyIn64 #-}+happyOut64 :: (HappyAbsSyn ) -> HappyWrap64+happyOut64 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut64 #-}+newtype HappyWrap65 = HappyWrap65 ((Maybe EpaLocation,Bool))+happyIn65 :: ((Maybe EpaLocation,Bool)) -> (HappyAbsSyn )+happyIn65 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap65 x)+{-# INLINE happyIn65 #-}+happyOut65 :: (HappyAbsSyn ) -> HappyWrap65+happyOut65 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut65 #-}+newtype HappyWrap66 = HappyWrap66 ((Maybe EpaLocation, RawPkgQual))+happyIn66 :: ((Maybe EpaLocation, RawPkgQual)) -> (HappyAbsSyn )+happyIn66 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap66 x)+{-# INLINE happyIn66 #-}+happyOut66 :: (HappyAbsSyn ) -> HappyWrap66+happyOut66 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut66 #-}+newtype HappyWrap67 = HappyWrap67 (Located (Maybe EpaLocation))+happyIn67 :: (Located (Maybe EpaLocation)) -> (HappyAbsSyn )+happyIn67 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap67 x)+{-# INLINE happyIn67 #-}+happyOut67 :: (HappyAbsSyn ) -> HappyWrap67+happyOut67 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut67 #-}+newtype HappyWrap68 = HappyWrap68 ((Maybe EpaLocation,Located (Maybe (LocatedA ModuleName))))+happyIn68 :: ((Maybe EpaLocation,Located (Maybe (LocatedA ModuleName)))) -> (HappyAbsSyn )+happyIn68 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap68 x)+{-# INLINE happyIn68 #-}+happyOut68 :: (HappyAbsSyn ) -> HappyWrap68+happyOut68 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut68 #-}+newtype HappyWrap69 = HappyWrap69 (Located (Maybe (ImportListInterpretation, LocatedL [LIE GhcPs])))+happyIn69 :: (Located (Maybe (ImportListInterpretation, LocatedL [LIE GhcPs]))) -> (HappyAbsSyn )+happyIn69 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap69 x)+{-# INLINE happyIn69 #-}+happyOut69 :: (HappyAbsSyn ) -> HappyWrap69+happyOut69 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut69 #-}+newtype HappyWrap70 = HappyWrap70 (Located (ImportListInterpretation, LocatedL [LIE GhcPs]))+happyIn70 :: (Located (ImportListInterpretation, LocatedL [LIE GhcPs])) -> (HappyAbsSyn )+happyIn70 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap70 x)+{-# INLINE happyIn70 #-}+happyOut70 :: (HappyAbsSyn ) -> HappyWrap70+happyOut70 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut70 #-}+newtype HappyWrap71 = HappyWrap71 (([AddEpAnn], OrdList (LIE GhcPs)))+happyIn71 :: (([AddEpAnn], OrdList (LIE GhcPs))) -> (HappyAbsSyn )+happyIn71 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap71 x)+{-# INLINE happyIn71 #-}+happyOut71 :: (HappyAbsSyn ) -> HappyWrap71+happyOut71 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut71 #-}+newtype HappyWrap72 = HappyWrap72 (OrdList (LIE GhcPs))+happyIn72 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )+happyIn72 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap72 x)+{-# INLINE happyIn72 #-}+happyOut72 :: (HappyAbsSyn ) -> HappyWrap72+happyOut72 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut72 #-}+newtype HappyWrap73 = HappyWrap73 (OrdList (LIE GhcPs))+happyIn73 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )+happyIn73 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap73 x)+{-# INLINE happyIn73 #-}+happyOut73 :: (HappyAbsSyn ) -> HappyWrap73+happyOut73 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut73 #-}+newtype HappyWrap74 = HappyWrap74 (Maybe (Located (SourceText,Int)))+happyIn74 :: (Maybe (Located (SourceText,Int))) -> (HappyAbsSyn )+happyIn74 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap74 x)+{-# INLINE happyIn74 #-}+happyOut74 :: (HappyAbsSyn ) -> HappyWrap74+happyOut74 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut74 #-}+newtype HappyWrap75 = HappyWrap75 (Located FixityDirection)+happyIn75 :: (Located FixityDirection) -> (HappyAbsSyn )+happyIn75 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap75 x)+{-# INLINE happyIn75 #-}+happyOut75 :: (HappyAbsSyn ) -> HappyWrap75+happyOut75 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut75 #-}+newtype HappyWrap76 = HappyWrap76 (Located (OrdList (LocatedN RdrName)))+happyIn76 :: (Located (OrdList (LocatedN RdrName))) -> (HappyAbsSyn )+happyIn76 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap76 x)+{-# INLINE happyIn76 #-}+happyOut76 :: (HappyAbsSyn ) -> HappyWrap76+happyOut76 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut76 #-}+newtype HappyWrap77 = HappyWrap77 (OrdList (LHsDecl GhcPs))+happyIn77 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )+happyIn77 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap77 x)+{-# INLINE happyIn77 #-}+happyOut77 :: (HappyAbsSyn ) -> HappyWrap77+happyOut77 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut77 #-}+newtype HappyWrap78 = HappyWrap78 (OrdList (LHsDecl GhcPs))+happyIn78 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )+happyIn78 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap78 x)+{-# INLINE happyIn78 #-}+happyOut78 :: (HappyAbsSyn ) -> HappyWrap78+happyOut78 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut78 #-}+newtype HappyWrap79 = HappyWrap79 (OrdList (LHsDecl GhcPs))+happyIn79 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )+happyIn79 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap79 x)+{-# INLINE happyIn79 #-}+happyOut79 :: (HappyAbsSyn ) -> HappyWrap79+happyOut79 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut79 #-}+newtype HappyWrap80 = HappyWrap80 (OrdList (LHsDecl GhcPs))+happyIn80 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )+happyIn80 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap80 x)+{-# INLINE happyIn80 #-}+happyOut80 :: (HappyAbsSyn ) -> HappyWrap80+happyOut80 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut80 #-}+newtype HappyWrap81 = HappyWrap81 (LHsDecl GhcPs)+happyIn81 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn81 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap81 x)+{-# INLINE happyIn81 #-}+happyOut81 :: (HappyAbsSyn ) -> HappyWrap81+happyOut81 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut81 #-}+newtype HappyWrap82 = HappyWrap82 (LHsDecl GhcPs)+happyIn82 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn82 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap82 x)+{-# INLINE happyIn82 #-}+happyOut82 :: (HappyAbsSyn ) -> HappyWrap82+happyOut82 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut82 #-}+newtype HappyWrap83 = HappyWrap83 (LTyClDecl GhcPs)+happyIn83 :: (LTyClDecl GhcPs) -> (HappyAbsSyn )+happyIn83 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap83 x)+{-# INLINE happyIn83 #-}+happyOut83 :: (HappyAbsSyn ) -> HappyWrap83+happyOut83 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut83 #-}+newtype HappyWrap84 = HappyWrap84 (LTyClDecl GhcPs)+happyIn84 :: (LTyClDecl GhcPs) -> (HappyAbsSyn )+happyIn84 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap84 x)+{-# INLINE happyIn84 #-}+happyOut84 :: (HappyAbsSyn ) -> HappyWrap84+happyOut84 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut84 #-}+newtype HappyWrap85 = HappyWrap85 (LStandaloneKindSig GhcPs)+happyIn85 :: (LStandaloneKindSig GhcPs) -> (HappyAbsSyn )+happyIn85 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap85 x)+{-# INLINE happyIn85 #-}+happyOut85 :: (HappyAbsSyn ) -> HappyWrap85+happyOut85 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut85 #-}+newtype HappyWrap86 = HappyWrap86 (Located [LocatedN RdrName])+happyIn86 :: (Located [LocatedN RdrName]) -> (HappyAbsSyn )+happyIn86 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap86 x)+{-# INLINE happyIn86 #-}+happyOut86 :: (HappyAbsSyn ) -> HappyWrap86+happyOut86 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut86 #-}+newtype HappyWrap87 = HappyWrap87 (LInstDecl GhcPs)+happyIn87 :: (LInstDecl GhcPs) -> (HappyAbsSyn )+happyIn87 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap87 x)+{-# INLINE happyIn87 #-}+happyOut87 :: (HappyAbsSyn ) -> HappyWrap87+happyOut87 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut87 #-}+newtype HappyWrap88 = HappyWrap88 (Maybe (LocatedP OverlapMode))+happyIn88 :: (Maybe (LocatedP OverlapMode)) -> (HappyAbsSyn )+happyIn88 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap88 x)+{-# INLINE happyIn88 #-}+happyOut88 :: (HappyAbsSyn ) -> HappyWrap88+happyOut88 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut88 #-}+newtype HappyWrap89 = HappyWrap89 (LDerivStrategy GhcPs)+happyIn89 :: (LDerivStrategy GhcPs) -> (HappyAbsSyn )+happyIn89 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap89 x)+{-# INLINE happyIn89 #-}+happyOut89 :: (HappyAbsSyn ) -> HappyWrap89+happyOut89 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut89 #-}+newtype HappyWrap90 = HappyWrap90 (LDerivStrategy GhcPs)+happyIn90 :: (LDerivStrategy GhcPs) -> (HappyAbsSyn )+happyIn90 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap90 x)+{-# INLINE happyIn90 #-}+happyOut90 :: (HappyAbsSyn ) -> HappyWrap90+happyOut90 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut90 #-}+newtype HappyWrap91 = HappyWrap91 (Maybe (LDerivStrategy GhcPs))+happyIn91 :: (Maybe (LDerivStrategy GhcPs)) -> (HappyAbsSyn )+happyIn91 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap91 x)+{-# INLINE happyIn91 #-}+happyOut91 :: (HappyAbsSyn ) -> HappyWrap91+happyOut91 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut91 #-}+newtype HappyWrap92 = HappyWrap92 (Located ([AddEpAnn], Maybe (LInjectivityAnn GhcPs)))+happyIn92 :: (Located ([AddEpAnn], Maybe (LInjectivityAnn GhcPs))) -> (HappyAbsSyn )+happyIn92 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap92 x)+{-# INLINE happyIn92 #-}+happyOut92 :: (HappyAbsSyn ) -> HappyWrap92+happyOut92 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut92 #-}+newtype HappyWrap93 = HappyWrap93 (LInjectivityAnn GhcPs)+happyIn93 :: (LInjectivityAnn GhcPs) -> (HappyAbsSyn )+happyIn93 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap93 x)+{-# INLINE happyIn93 #-}+happyOut93 :: (HappyAbsSyn ) -> HappyWrap93+happyOut93 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut93 #-}+newtype HappyWrap94 = HappyWrap94 (Located [LocatedN RdrName])+happyIn94 :: (Located [LocatedN RdrName]) -> (HappyAbsSyn )+happyIn94 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap94 x)+{-# INLINE happyIn94 #-}+happyOut94 :: (HappyAbsSyn ) -> HappyWrap94+happyOut94 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut94 #-}+newtype HappyWrap95 = HappyWrap95 (Located ([AddEpAnn],FamilyInfo GhcPs))+happyIn95 :: (Located ([AddEpAnn],FamilyInfo GhcPs)) -> (HappyAbsSyn )+happyIn95 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap95 x)+{-# INLINE happyIn95 #-}+happyOut95 :: (HappyAbsSyn ) -> HappyWrap95+happyOut95 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut95 #-}+newtype HappyWrap96 = HappyWrap96 (Located ([AddEpAnn],Maybe [LTyFamInstEqn GhcPs]))+happyIn96 :: (Located ([AddEpAnn],Maybe [LTyFamInstEqn GhcPs])) -> (HappyAbsSyn )+happyIn96 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap96 x)+{-# INLINE happyIn96 #-}+happyOut96 :: (HappyAbsSyn ) -> HappyWrap96+happyOut96 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut96 #-}+newtype HappyWrap97 = HappyWrap97 (Located [LTyFamInstEqn GhcPs])+happyIn97 :: (Located [LTyFamInstEqn GhcPs]) -> (HappyAbsSyn )+happyIn97 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap97 x)+{-# INLINE happyIn97 #-}+happyOut97 :: (HappyAbsSyn ) -> HappyWrap97+happyOut97 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut97 #-}+newtype HappyWrap98 = HappyWrap98 (LTyFamInstEqn GhcPs)+happyIn98 :: (LTyFamInstEqn GhcPs) -> (HappyAbsSyn )+happyIn98 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap98 x)+{-# INLINE happyIn98 #-}+happyOut98 :: (HappyAbsSyn ) -> HappyWrap98+happyOut98 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut98 #-}+newtype HappyWrap99 = HappyWrap99 (LHsDecl GhcPs)+happyIn99 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn99 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap99 x)+{-# INLINE happyIn99 #-}+happyOut99 :: (HappyAbsSyn ) -> HappyWrap99+happyOut99 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut99 #-}+newtype HappyWrap100 = HappyWrap100 ([AddEpAnn])+happyIn100 :: ([AddEpAnn]) -> (HappyAbsSyn )+happyIn100 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap100 x)+{-# INLINE happyIn100 #-}+happyOut100 :: (HappyAbsSyn ) -> HappyWrap100+happyOut100 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut100 #-}+newtype HappyWrap101 = HappyWrap101 ([AddEpAnn])+happyIn101 :: ([AddEpAnn]) -> (HappyAbsSyn )+happyIn101 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap101 x)+{-# INLINE happyIn101 #-}+happyOut101 :: (HappyAbsSyn ) -> HappyWrap101+happyOut101 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut101 #-}+newtype HappyWrap102 = HappyWrap102 (LInstDecl GhcPs)+happyIn102 :: (LInstDecl GhcPs) -> (HappyAbsSyn )+happyIn102 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap102 x)+{-# INLINE happyIn102 #-}+happyOut102 :: (HappyAbsSyn ) -> HappyWrap102+happyOut102 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut102 #-}+newtype HappyWrap103 = HappyWrap103 (Located ([AddEpAnn], Bool, NewOrData))+happyIn103 :: (Located ([AddEpAnn], Bool, NewOrData)) -> (HappyAbsSyn )+happyIn103 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap103 x)+{-# INLINE happyIn103 #-}+happyOut103 :: (HappyAbsSyn ) -> HappyWrap103+happyOut103 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut103 #-}+newtype HappyWrap104 = HappyWrap104 (Located (AddEpAnn, NewOrData))+happyIn104 :: (Located (AddEpAnn, NewOrData)) -> (HappyAbsSyn )+happyIn104 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap104 x)+{-# INLINE happyIn104 #-}+happyOut104 :: (HappyAbsSyn ) -> HappyWrap104+happyOut104 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut104 #-}+newtype HappyWrap105 = HappyWrap105 (Located ([AddEpAnn], Maybe (LHsKind GhcPs)))+happyIn105 :: (Located ([AddEpAnn], Maybe (LHsKind GhcPs))) -> (HappyAbsSyn )+happyIn105 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap105 x)+{-# INLINE happyIn105 #-}+happyOut105 :: (HappyAbsSyn ) -> HappyWrap105+happyOut105 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut105 #-}+newtype HappyWrap106 = HappyWrap106 (Located ([AddEpAnn], LFamilyResultSig GhcPs))+happyIn106 :: (Located ([AddEpAnn], LFamilyResultSig GhcPs)) -> (HappyAbsSyn )+happyIn106 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap106 x)+{-# INLINE happyIn106 #-}+happyOut106 :: (HappyAbsSyn ) -> HappyWrap106+happyOut106 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut106 #-}+newtype HappyWrap107 = HappyWrap107 (Located ([AddEpAnn], LFamilyResultSig GhcPs))+happyIn107 :: (Located ([AddEpAnn], LFamilyResultSig GhcPs)) -> (HappyAbsSyn )+happyIn107 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap107 x)+{-# INLINE happyIn107 #-}+happyOut107 :: (HappyAbsSyn ) -> HappyWrap107+happyOut107 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut107 #-}+newtype HappyWrap108 = HappyWrap108 (Located ([AddEpAnn], ( LFamilyResultSig GhcPs+ , Maybe (LInjectivityAnn GhcPs))))+happyIn108 :: (Located ([AddEpAnn], ( LFamilyResultSig GhcPs+ , Maybe (LInjectivityAnn GhcPs)))) -> (HappyAbsSyn )+happyIn108 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap108 x)+{-# INLINE happyIn108 #-}+happyOut108 :: (HappyAbsSyn ) -> HappyWrap108+happyOut108 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut108 #-}+newtype HappyWrap109 = HappyWrap109 (Located (Maybe (LHsContext GhcPs), LHsType GhcPs))+happyIn109 :: (Located (Maybe (LHsContext GhcPs), LHsType GhcPs)) -> (HappyAbsSyn )+happyIn109 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap109 x)+{-# INLINE happyIn109 #-}+happyOut109 :: (HappyAbsSyn ) -> HappyWrap109+happyOut109 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut109 #-}+newtype HappyWrap110 = HappyWrap110 (Located (Maybe (LHsContext GhcPs), HsOuterFamEqnTyVarBndrs GhcPs, LHsType GhcPs))+happyIn110 :: (Located (Maybe (LHsContext GhcPs), HsOuterFamEqnTyVarBndrs GhcPs, LHsType GhcPs)) -> (HappyAbsSyn )+happyIn110 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap110 x)+{-# INLINE happyIn110 #-}+happyOut110 :: (HappyAbsSyn ) -> HappyWrap110+happyOut110 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut110 #-}+newtype HappyWrap111 = HappyWrap111 (Maybe (LocatedP CType))+happyIn111 :: (Maybe (LocatedP CType)) -> (HappyAbsSyn )+happyIn111 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap111 x)+{-# INLINE happyIn111 #-}+happyOut111 :: (HappyAbsSyn ) -> HappyWrap111+happyOut111 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut111 #-}+newtype HappyWrap112 = HappyWrap112 (LDerivDecl GhcPs)+happyIn112 :: (LDerivDecl GhcPs) -> (HappyAbsSyn )+happyIn112 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap112 x)+{-# INLINE happyIn112 #-}+happyOut112 :: (HappyAbsSyn ) -> HappyWrap112+happyOut112 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut112 #-}+newtype HappyWrap113 = HappyWrap113 (LRoleAnnotDecl GhcPs)+happyIn113 :: (LRoleAnnotDecl GhcPs) -> (HappyAbsSyn )+happyIn113 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap113 x)+{-# INLINE happyIn113 #-}+happyOut113 :: (HappyAbsSyn ) -> HappyWrap113+happyOut113 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut113 #-}+newtype HappyWrap114 = HappyWrap114 (Located [Located (Maybe FastString)])+happyIn114 :: (Located [Located (Maybe FastString)]) -> (HappyAbsSyn )+happyIn114 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap114 x)+{-# INLINE happyIn114 #-}+happyOut114 :: (HappyAbsSyn ) -> HappyWrap114+happyOut114 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut114 #-}+newtype HappyWrap115 = HappyWrap115 (Located [Located (Maybe FastString)])+happyIn115 :: (Located [Located (Maybe FastString)]) -> (HappyAbsSyn )+happyIn115 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap115 x)+{-# INLINE happyIn115 #-}+happyOut115 :: (HappyAbsSyn ) -> HappyWrap115+happyOut115 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut115 #-}+newtype HappyWrap116 = HappyWrap116 (Located (Maybe FastString))+happyIn116 :: (Located (Maybe FastString)) -> (HappyAbsSyn )+happyIn116 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap116 x)+{-# INLINE happyIn116 #-}+happyOut116 :: (HappyAbsSyn ) -> HappyWrap116+happyOut116 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut116 #-}+newtype HappyWrap117 = HappyWrap117 (LHsDecl GhcPs)+happyIn117 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn117 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap117 x)+{-# INLINE happyIn117 #-}+happyOut117 :: (HappyAbsSyn ) -> HappyWrap117+happyOut117 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut117 #-}+newtype HappyWrap118 = HappyWrap118 ((LocatedN RdrName, HsPatSynDetails GhcPs, [AddEpAnn]))+happyIn118 :: ((LocatedN RdrName, HsPatSynDetails GhcPs, [AddEpAnn])) -> (HappyAbsSyn )+happyIn118 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap118 x)+{-# INLINE happyIn118 #-}+happyOut118 :: (HappyAbsSyn ) -> HappyWrap118+happyOut118 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut118 #-}+newtype HappyWrap119 = HappyWrap119 ([LocatedN RdrName])+happyIn119 :: ([LocatedN RdrName]) -> (HappyAbsSyn )+happyIn119 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap119 x)+{-# INLINE happyIn119 #-}+happyOut119 :: (HappyAbsSyn ) -> HappyWrap119+happyOut119 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut119 #-}+newtype HappyWrap120 = HappyWrap120 ([RecordPatSynField GhcPs])+happyIn120 :: ([RecordPatSynField GhcPs]) -> (HappyAbsSyn )+happyIn120 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap120 x)+{-# INLINE happyIn120 #-}+happyOut120 :: (HappyAbsSyn ) -> HappyWrap120+happyOut120 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut120 #-}+newtype HappyWrap121 = HappyWrap121 (LocatedL (OrdList (LHsDecl GhcPs)))+happyIn121 :: (LocatedL (OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn121 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap121 x)+{-# INLINE happyIn121 #-}+happyOut121 :: (HappyAbsSyn ) -> HappyWrap121+happyOut121 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut121 #-}+newtype HappyWrap122 = HappyWrap122 (LSig GhcPs)+happyIn122 :: (LSig GhcPs) -> (HappyAbsSyn )+happyIn122 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap122 x)+{-# INLINE happyIn122 #-}+happyOut122 :: (HappyAbsSyn ) -> HappyWrap122+happyOut122 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut122 #-}+newtype HappyWrap123 = HappyWrap123 (LocatedN RdrName)+happyIn123 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn123 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap123 x)+{-# INLINE happyIn123 #-}+happyOut123 :: (HappyAbsSyn ) -> HappyWrap123+happyOut123 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut123 #-}+newtype HappyWrap124 = HappyWrap124 (LHsDecl GhcPs)+happyIn124 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn124 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap124 x)+{-# INLINE happyIn124 #-}+happyOut124 :: (HappyAbsSyn ) -> HappyWrap124+happyOut124 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut124 #-}+newtype HappyWrap125 = HappyWrap125 (Located ([AddEpAnn],OrdList (LHsDecl GhcPs)))+happyIn125 :: (Located ([AddEpAnn],OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn125 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap125 x)+{-# INLINE happyIn125 #-}+happyOut125 :: (HappyAbsSyn ) -> HappyWrap125+happyOut125 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut125 #-}+newtype HappyWrap126 = HappyWrap126 (Located ([AddEpAnn]+ , OrdList (LHsDecl GhcPs)+ , LayoutInfo GhcPs))+happyIn126 :: (Located ([AddEpAnn]+ , OrdList (LHsDecl GhcPs)+ , LayoutInfo GhcPs)) -> (HappyAbsSyn )+happyIn126 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap126 x)+{-# INLINE happyIn126 #-}+happyOut126 :: (HappyAbsSyn ) -> HappyWrap126+happyOut126 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut126 #-}+newtype HappyWrap127 = HappyWrap127 (Located ([AddEpAnn]+ ,(OrdList (LHsDecl GhcPs)) -- Reversed+ ,LayoutInfo GhcPs))+happyIn127 :: (Located ([AddEpAnn]+ ,(OrdList (LHsDecl GhcPs)) -- Reversed+ ,LayoutInfo GhcPs)) -> (HappyAbsSyn )+happyIn127 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap127 x)+{-# INLINE happyIn127 #-}+happyOut127 :: (HappyAbsSyn ) -> HappyWrap127+happyOut127 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut127 #-}+newtype HappyWrap128 = HappyWrap128 (Located (OrdList (LHsDecl GhcPs)))+happyIn128 :: (Located (OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn128 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap128 x)+{-# INLINE happyIn128 #-}+happyOut128 :: (HappyAbsSyn ) -> HappyWrap128+happyOut128 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut128 #-}+newtype HappyWrap129 = HappyWrap129 (Located ([AddEpAnn],OrdList (LHsDecl GhcPs)))+happyIn129 :: (Located ([AddEpAnn],OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn129 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap129 x)+{-# INLINE happyIn129 #-}+happyOut129 :: (HappyAbsSyn ) -> HappyWrap129+happyOut129 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut129 #-}+newtype HappyWrap130 = HappyWrap130 (Located ([AddEpAnn]+ , OrdList (LHsDecl GhcPs)))+happyIn130 :: (Located ([AddEpAnn]+ , OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn130 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap130 x)+{-# INLINE happyIn130 #-}+happyOut130 :: (HappyAbsSyn ) -> HappyWrap130+happyOut130 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut130 #-}+newtype HappyWrap131 = HappyWrap131 (Located ([AddEpAnn]+ , OrdList (LHsDecl GhcPs)))+happyIn131 :: (Located ([AddEpAnn]+ , OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn131 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap131 x)+{-# INLINE happyIn131 #-}+happyOut131 :: (HappyAbsSyn ) -> HappyWrap131+happyOut131 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut131 #-}+newtype HappyWrap132 = HappyWrap132 (Located ([TrailingAnn], OrdList (LHsDecl GhcPs)))+happyIn132 :: (Located ([TrailingAnn], OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn132 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap132 x)+{-# INLINE happyIn132 #-}+happyOut132 :: (HappyAbsSyn ) -> HappyWrap132+happyOut132 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut132 #-}+newtype HappyWrap133 = HappyWrap133 (Located (AnnList,Located (OrdList (LHsDecl GhcPs))))+happyIn133 :: (Located (AnnList,Located (OrdList (LHsDecl GhcPs)))) -> (HappyAbsSyn )+happyIn133 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap133 x)+{-# INLINE happyIn133 #-}+happyOut133 :: (HappyAbsSyn ) -> HappyWrap133+happyOut133 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut133 #-}+newtype HappyWrap134 = HappyWrap134 (Located (HsLocalBinds GhcPs))+happyIn134 :: (Located (HsLocalBinds GhcPs)) -> (HappyAbsSyn )+happyIn134 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap134 x)+{-# INLINE happyIn134 #-}+happyOut134 :: (HappyAbsSyn ) -> HappyWrap134+happyOut134 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut134 #-}+newtype HappyWrap135 = HappyWrap135 (Maybe (Located (HsLocalBinds GhcPs, Maybe EpAnnComments )))+happyIn135 :: (Maybe (Located (HsLocalBinds GhcPs, Maybe EpAnnComments ))) -> (HappyAbsSyn )+happyIn135 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap135 x)+{-# INLINE happyIn135 #-}+happyOut135 :: (HappyAbsSyn ) -> HappyWrap135+happyOut135 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut135 #-}+newtype HappyWrap136 = HappyWrap136 ([LRuleDecl GhcPs])+happyIn136 :: ([LRuleDecl GhcPs]) -> (HappyAbsSyn )+happyIn136 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap136 x)+{-# INLINE happyIn136 #-}+happyOut136 :: (HappyAbsSyn ) -> HappyWrap136+happyOut136 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut136 #-}+newtype HappyWrap137 = HappyWrap137 (LRuleDecl GhcPs)+happyIn137 :: (LRuleDecl GhcPs) -> (HappyAbsSyn )+happyIn137 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap137 x)+{-# INLINE happyIn137 #-}+happyOut137 :: (HappyAbsSyn ) -> HappyWrap137+happyOut137 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut137 #-}+newtype HappyWrap138 = HappyWrap138 (([AddEpAnn],Maybe Activation))+happyIn138 :: (([AddEpAnn],Maybe Activation)) -> (HappyAbsSyn )+happyIn138 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap138 x)+{-# INLINE happyIn138 #-}+happyOut138 :: (HappyAbsSyn ) -> HappyWrap138+happyOut138 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut138 #-}+newtype HappyWrap139 = HappyWrap139 ([AddEpAnn])+happyIn139 :: ([AddEpAnn]) -> (HappyAbsSyn )+happyIn139 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap139 x)+{-# INLINE happyIn139 #-}+happyOut139 :: (HappyAbsSyn ) -> HappyWrap139+happyOut139 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut139 #-}+newtype HappyWrap140 = HappyWrap140 (([AddEpAnn]+ ,Activation))+happyIn140 :: (([AddEpAnn]+ ,Activation)) -> (HappyAbsSyn )+happyIn140 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap140 x)+{-# INLINE happyIn140 #-}+happyOut140 :: (HappyAbsSyn ) -> HappyWrap140+happyOut140 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut140 #-}+newtype HappyWrap141 = HappyWrap141 (([AddEpAnn] -> HsRuleAnn, Maybe [LHsTyVarBndr () GhcPs], [LRuleBndr GhcPs]))+happyIn141 :: (([AddEpAnn] -> HsRuleAnn, Maybe [LHsTyVarBndr () GhcPs], [LRuleBndr GhcPs])) -> (HappyAbsSyn )+happyIn141 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap141 x)+{-# INLINE happyIn141 #-}+happyOut141 :: (HappyAbsSyn ) -> HappyWrap141+happyOut141 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut141 #-}+newtype HappyWrap142 = HappyWrap142 ([LRuleTyTmVar])+happyIn142 :: ([LRuleTyTmVar]) -> (HappyAbsSyn )+happyIn142 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap142 x)+{-# INLINE happyIn142 #-}+happyOut142 :: (HappyAbsSyn ) -> HappyWrap142+happyOut142 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut142 #-}+newtype HappyWrap143 = HappyWrap143 (LRuleTyTmVar)+happyIn143 :: (LRuleTyTmVar) -> (HappyAbsSyn )+happyIn143 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap143 x)+{-# INLINE happyIn143 #-}+happyOut143 :: (HappyAbsSyn ) -> HappyWrap143+happyOut143 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut143 #-}+newtype HappyWrap144 = HappyWrap144 (Maybe (Located InWarningCategory))+happyIn144 :: (Maybe (Located InWarningCategory)) -> (HappyAbsSyn )+happyIn144 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap144 x)+{-# INLINE happyIn144 #-}+happyOut144 :: (HappyAbsSyn ) -> HappyWrap144+happyOut144 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut144 #-}+newtype HappyWrap145 = HappyWrap145 (OrdList (LWarnDecl GhcPs))+happyIn145 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )+happyIn145 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap145 x)+{-# INLINE happyIn145 #-}+happyOut145 :: (HappyAbsSyn ) -> HappyWrap145+happyOut145 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut145 #-}+newtype HappyWrap146 = HappyWrap146 (OrdList (LWarnDecl GhcPs))+happyIn146 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )+happyIn146 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap146 x)+{-# INLINE happyIn146 #-}+happyOut146 :: (HappyAbsSyn ) -> HappyWrap146+happyOut146 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut146 #-}+newtype HappyWrap147 = HappyWrap147 (OrdList (LWarnDecl GhcPs))+happyIn147 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )+happyIn147 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap147 x)+{-# INLINE happyIn147 #-}+happyOut147 :: (HappyAbsSyn ) -> HappyWrap147+happyOut147 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut147 #-}+newtype HappyWrap148 = HappyWrap148 (OrdList (LWarnDecl GhcPs))+happyIn148 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )+happyIn148 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap148 x)+{-# INLINE happyIn148 #-}+happyOut148 :: (HappyAbsSyn ) -> HappyWrap148+happyOut148 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut148 #-}+newtype HappyWrap149 = HappyWrap149 (Located ([AddEpAnn],[Located StringLiteral]))+happyIn149 :: (Located ([AddEpAnn],[Located StringLiteral])) -> (HappyAbsSyn )+happyIn149 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap149 x)+{-# INLINE happyIn149 #-}+happyOut149 :: (HappyAbsSyn ) -> HappyWrap149+happyOut149 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut149 #-}+newtype HappyWrap150 = HappyWrap150 (Located (OrdList (Located StringLiteral)))+happyIn150 :: (Located (OrdList (Located StringLiteral))) -> (HappyAbsSyn )+happyIn150 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap150 x)+{-# INLINE happyIn150 #-}+happyOut150 :: (HappyAbsSyn ) -> HappyWrap150+happyOut150 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut150 #-}+newtype HappyWrap151 = HappyWrap151 (LHsDecl GhcPs)+happyIn151 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn151 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap151 x)+{-# INLINE happyIn151 #-}+happyOut151 :: (HappyAbsSyn ) -> HappyWrap151+happyOut151 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut151 #-}+newtype HappyWrap152 = HappyWrap152 (Located ([AddEpAnn],EpAnn [AddEpAnn] -> HsDecl GhcPs))+happyIn152 :: (Located ([AddEpAnn],EpAnn [AddEpAnn] -> HsDecl GhcPs)) -> (HappyAbsSyn )+happyIn152 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap152 x)+{-# INLINE happyIn152 #-}+happyOut152 :: (HappyAbsSyn ) -> HappyWrap152+happyOut152 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut152 #-}+newtype HappyWrap153 = HappyWrap153 (Located CCallConv)+happyIn153 :: (Located CCallConv) -> (HappyAbsSyn )+happyIn153 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap153 x)+{-# INLINE happyIn153 #-}+happyOut153 :: (HappyAbsSyn ) -> HappyWrap153+happyOut153 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut153 #-}+newtype HappyWrap154 = HappyWrap154 (Located Safety)+happyIn154 :: (Located Safety) -> (HappyAbsSyn )+happyIn154 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap154 x)+{-# INLINE happyIn154 #-}+happyOut154 :: (HappyAbsSyn ) -> HappyWrap154+happyOut154 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut154 #-}+newtype HappyWrap155 = HappyWrap155 (Located ([AddEpAnn]+ ,(Located StringLiteral, LocatedN RdrName, LHsSigType GhcPs)))+happyIn155 :: (Located ([AddEpAnn]+ ,(Located StringLiteral, LocatedN RdrName, LHsSigType GhcPs))) -> (HappyAbsSyn )+happyIn155 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap155 x)+{-# INLINE happyIn155 #-}+happyOut155 :: (HappyAbsSyn ) -> HappyWrap155+happyOut155 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut155 #-}+newtype HappyWrap156 = HappyWrap156 (Maybe (AddEpAnn, LHsType GhcPs))+happyIn156 :: (Maybe (AddEpAnn, LHsType GhcPs)) -> (HappyAbsSyn )+happyIn156 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap156 x)+{-# INLINE happyIn156 #-}+happyOut156 :: (HappyAbsSyn ) -> HappyWrap156+happyOut156 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut156 #-}+newtype HappyWrap157 = HappyWrap157 (([AddEpAnn], Maybe (LocatedN RdrName)))+happyIn157 :: (([AddEpAnn], Maybe (LocatedN RdrName))) -> (HappyAbsSyn )+happyIn157 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap157 x)+{-# INLINE happyIn157 #-}+happyOut157 :: (HappyAbsSyn ) -> HappyWrap157+happyOut157 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut157 #-}+newtype HappyWrap158 = HappyWrap158 (LHsSigType GhcPs)+happyIn158 :: (LHsSigType GhcPs) -> (HappyAbsSyn )+happyIn158 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap158 x)+{-# INLINE happyIn158 #-}+happyOut158 :: (HappyAbsSyn ) -> HappyWrap158+happyOut158 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut158 #-}+newtype HappyWrap159 = HappyWrap159 (LHsSigType GhcPs)+happyIn159 :: (LHsSigType GhcPs) -> (HappyAbsSyn )+happyIn159 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap159 x)+{-# INLINE happyIn159 #-}+happyOut159 :: (HappyAbsSyn ) -> HappyWrap159+happyOut159 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut159 #-}+newtype HappyWrap160 = HappyWrap160 (Located [LocatedN RdrName])+happyIn160 :: (Located [LocatedN RdrName]) -> (HappyAbsSyn )+happyIn160 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap160 x)+{-# INLINE happyIn160 #-}+happyOut160 :: (HappyAbsSyn ) -> HappyWrap160+happyOut160 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut160 #-}+newtype HappyWrap161 = HappyWrap161 (OrdList (LHsSigType GhcPs))+happyIn161 :: (OrdList (LHsSigType GhcPs)) -> (HappyAbsSyn )+happyIn161 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap161 x)+{-# INLINE happyIn161 #-}+happyOut161 :: (HappyAbsSyn ) -> HappyWrap161+happyOut161 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut161 #-}+newtype HappyWrap162 = HappyWrap162 (Located UnpackednessPragma)+happyIn162 :: (Located UnpackednessPragma) -> (HappyAbsSyn )+happyIn162 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap162 x)+{-# INLINE happyIn162 #-}+happyOut162 :: (HappyAbsSyn ) -> HappyWrap162+happyOut162 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut162 #-}+newtype HappyWrap163 = HappyWrap163 (Located (HsForAllTelescope GhcPs))+happyIn163 :: (Located (HsForAllTelescope GhcPs)) -> (HappyAbsSyn )+happyIn163 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap163 x)+{-# INLINE happyIn163 #-}+happyOut163 :: (HappyAbsSyn ) -> HappyWrap163+happyOut163 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut163 #-}+newtype HappyWrap164 = HappyWrap164 (LHsType GhcPs)+happyIn164 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn164 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap164 x)+{-# INLINE happyIn164 #-}+happyOut164 :: (HappyAbsSyn ) -> HappyWrap164+happyOut164 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut164 #-}+newtype HappyWrap165 = HappyWrap165 (LHsType GhcPs)+happyIn165 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn165 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap165 x)+{-# INLINE happyIn165 #-}+happyOut165 :: (HappyAbsSyn ) -> HappyWrap165+happyOut165 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut165 #-}+newtype HappyWrap166 = HappyWrap166 (LHsContext GhcPs)+happyIn166 :: (LHsContext GhcPs) -> (HappyAbsSyn )+happyIn166 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap166 x)+{-# INLINE happyIn166 #-}+happyOut166 :: (HappyAbsSyn ) -> HappyWrap166+happyOut166 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut166 #-}+newtype HappyWrap167 = HappyWrap167 (LHsType GhcPs)+happyIn167 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn167 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap167 x)+{-# INLINE happyIn167 #-}+happyOut167 :: (HappyAbsSyn ) -> HappyWrap167+happyOut167 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut167 #-}+newtype HappyWrap168 = HappyWrap168 (Located (LHsUniToken "->" "\8594" GhcPs -> HsArrow GhcPs))+happyIn168 :: (Located (LHsUniToken "->" "\8594" GhcPs -> HsArrow GhcPs)) -> (HappyAbsSyn )+happyIn168 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap168 x)+{-# INLINE happyIn168 #-}+happyOut168 :: (HappyAbsSyn ) -> HappyWrap168+happyOut168 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut168 #-}+newtype HappyWrap169 = HappyWrap169 (LHsType GhcPs)+happyIn169 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn169 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap169 x)+{-# INLINE happyIn169 #-}+happyOut169 :: (HappyAbsSyn ) -> HappyWrap169+happyOut169 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut169 #-}+newtype HappyWrap170 = HappyWrap170 (forall b. DisambTD b => PV (LocatedA b))+happyIn170 :: (forall b. DisambTD b => PV (LocatedA b)) -> (HappyAbsSyn )+happyIn170 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap170 x)+{-# INLINE happyIn170 #-}+happyOut170 :: (HappyAbsSyn ) -> HappyWrap170+happyOut170 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut170 #-}+newtype HappyWrap171 = HappyWrap171 (forall b. DisambTD b => PV (LocatedA b))+happyIn171 :: (forall b. DisambTD b => PV (LocatedA b)) -> (HappyAbsSyn )+happyIn171 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap171 x)+{-# INLINE happyIn171 #-}+happyOut171 :: (HappyAbsSyn ) -> HappyWrap171+happyOut171 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut171 #-}+newtype HappyWrap172 = HappyWrap172 (LHsType GhcPs)+happyIn172 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn172 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap172 x)+{-# INLINE happyIn172 #-}+happyOut172 :: (HappyAbsSyn ) -> HappyWrap172+happyOut172 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut172 #-}+newtype HappyWrap173 = HappyWrap173 ((LocatedN RdrName, PromotionFlag))+happyIn173 :: ((LocatedN RdrName, PromotionFlag)) -> (HappyAbsSyn )+happyIn173 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap173 x)+{-# INLINE happyIn173 #-}+happyOut173 :: (HappyAbsSyn ) -> HappyWrap173+happyOut173 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut173 #-}+newtype HappyWrap174 = HappyWrap174 (LHsType GhcPs)+happyIn174 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn174 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap174 x)+{-# INLINE happyIn174 #-}+happyOut174 :: (HappyAbsSyn ) -> HappyWrap174+happyOut174 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut174 #-}+newtype HappyWrap175 = HappyWrap175 (LHsSigType GhcPs)+happyIn175 :: (LHsSigType GhcPs) -> (HappyAbsSyn )+happyIn175 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap175 x)+{-# INLINE happyIn175 #-}+happyOut175 :: (HappyAbsSyn ) -> HappyWrap175+happyOut175 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut175 #-}+newtype HappyWrap176 = HappyWrap176 ([LHsSigType GhcPs])+happyIn176 :: ([LHsSigType GhcPs]) -> (HappyAbsSyn )+happyIn176 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap176 x)+{-# INLINE happyIn176 #-}+happyOut176 :: (HappyAbsSyn ) -> HappyWrap176+happyOut176 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut176 #-}+newtype HappyWrap177 = HappyWrap177 ([LHsType GhcPs])+happyIn177 :: ([LHsType GhcPs]) -> (HappyAbsSyn )+happyIn177 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap177 x)+{-# INLINE happyIn177 #-}+happyOut177 :: (HappyAbsSyn ) -> HappyWrap177+happyOut177 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut177 #-}+newtype HappyWrap178 = HappyWrap178 ([LHsType GhcPs])+happyIn178 :: ([LHsType GhcPs]) -> (HappyAbsSyn )+happyIn178 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap178 x)+{-# INLINE happyIn178 #-}+happyOut178 :: (HappyAbsSyn ) -> HappyWrap178+happyOut178 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut178 #-}+newtype HappyWrap179 = HappyWrap179 ([LHsType GhcPs])+happyIn179 :: ([LHsType GhcPs]) -> (HappyAbsSyn )+happyIn179 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap179 x)+{-# INLINE happyIn179 #-}+happyOut179 :: (HappyAbsSyn ) -> HappyWrap179+happyOut179 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut179 #-}+newtype HappyWrap180 = HappyWrap180 ([LHsTyVarBndr Specificity GhcPs])+happyIn180 :: ([LHsTyVarBndr Specificity GhcPs]) -> (HappyAbsSyn )+happyIn180 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap180 x)+{-# INLINE happyIn180 #-}+happyOut180 :: (HappyAbsSyn ) -> HappyWrap180+happyOut180 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut180 #-}+newtype HappyWrap181 = HappyWrap181 (LHsTyVarBndr Specificity GhcPs)+happyIn181 :: (LHsTyVarBndr Specificity GhcPs) -> (HappyAbsSyn )+happyIn181 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap181 x)+{-# INLINE happyIn181 #-}+happyOut181 :: (HappyAbsSyn ) -> HappyWrap181+happyOut181 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut181 #-}+newtype HappyWrap182 = HappyWrap182 (LHsTyVarBndr Specificity GhcPs)+happyIn182 :: (LHsTyVarBndr Specificity GhcPs) -> (HappyAbsSyn )+happyIn182 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap182 x)+{-# INLINE happyIn182 #-}+happyOut182 :: (HappyAbsSyn ) -> HappyWrap182+happyOut182 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut182 #-}+newtype HappyWrap183 = HappyWrap183 (Located ([AddEpAnn],[LHsFunDep GhcPs]))+happyIn183 :: (Located ([AddEpAnn],[LHsFunDep GhcPs])) -> (HappyAbsSyn )+happyIn183 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap183 x)+{-# INLINE happyIn183 #-}+happyOut183 :: (HappyAbsSyn ) -> HappyWrap183+happyOut183 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut183 #-}+newtype HappyWrap184 = HappyWrap184 (Located [LHsFunDep GhcPs])+happyIn184 :: (Located [LHsFunDep GhcPs]) -> (HappyAbsSyn )+happyIn184 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap184 x)+{-# INLINE happyIn184 #-}+happyOut184 :: (HappyAbsSyn ) -> HappyWrap184+happyOut184 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut184 #-}+newtype HappyWrap185 = HappyWrap185 (LHsFunDep GhcPs)+happyIn185 :: (LHsFunDep GhcPs) -> (HappyAbsSyn )+happyIn185 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap185 x)+{-# INLINE happyIn185 #-}+happyOut185 :: (HappyAbsSyn ) -> HappyWrap185+happyOut185 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut185 #-}+newtype HappyWrap186 = HappyWrap186 (Located [LocatedN RdrName])+happyIn186 :: (Located [LocatedN RdrName]) -> (HappyAbsSyn )+happyIn186 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap186 x)+{-# INLINE happyIn186 #-}+happyOut186 :: (HappyAbsSyn ) -> HappyWrap186+happyOut186 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut186 #-}+newtype HappyWrap187 = HappyWrap187 (LHsKind GhcPs)+happyIn187 :: (LHsKind GhcPs) -> (HappyAbsSyn )+happyIn187 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap187 x)+{-# INLINE happyIn187 #-}+happyOut187 :: (HappyAbsSyn ) -> HappyWrap187+happyOut187 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut187 #-}+newtype HappyWrap188 = HappyWrap188 (Located ([AddEpAnn]+ ,[LConDecl GhcPs]))+happyIn188 :: (Located ([AddEpAnn]+ ,[LConDecl GhcPs])) -> (HappyAbsSyn )+happyIn188 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap188 x)+{-# INLINE happyIn188 #-}+happyOut188 :: (HappyAbsSyn ) -> HappyWrap188+happyOut188 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut188 #-}+newtype HappyWrap189 = HappyWrap189 (Located [LConDecl GhcPs])+happyIn189 :: (Located [LConDecl GhcPs]) -> (HappyAbsSyn )+happyIn189 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap189 x)+{-# INLINE happyIn189 #-}+happyOut189 :: (HappyAbsSyn ) -> HappyWrap189+happyOut189 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut189 #-}+newtype HappyWrap190 = HappyWrap190 (LConDecl GhcPs)+happyIn190 :: (LConDecl GhcPs) -> (HappyAbsSyn )+happyIn190 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap190 x)+{-# INLINE happyIn190 #-}+happyOut190 :: (HappyAbsSyn ) -> HappyWrap190+happyOut190 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut190 #-}+newtype HappyWrap191 = HappyWrap191 (Located ([AddEpAnn],[LConDecl GhcPs]))+happyIn191 :: (Located ([AddEpAnn],[LConDecl GhcPs])) -> (HappyAbsSyn )+happyIn191 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap191 x)+{-# INLINE happyIn191 #-}+happyOut191 :: (HappyAbsSyn ) -> HappyWrap191+happyOut191 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut191 #-}+newtype HappyWrap192 = HappyWrap192 (Located [LConDecl GhcPs])+happyIn192 :: (Located [LConDecl GhcPs]) -> (HappyAbsSyn )+happyIn192 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap192 x)+{-# INLINE happyIn192 #-}+happyOut192 :: (HappyAbsSyn ) -> HappyWrap192+happyOut192 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut192 #-}+newtype HappyWrap193 = HappyWrap193 (LConDecl GhcPs)+happyIn193 :: (LConDecl GhcPs) -> (HappyAbsSyn )+happyIn193 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap193 x)+{-# INLINE happyIn193 #-}+happyOut193 :: (HappyAbsSyn ) -> HappyWrap193+happyOut193 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut193 #-}+newtype HappyWrap194 = HappyWrap194 (Located ([AddEpAnn], Maybe [LHsTyVarBndr Specificity GhcPs]))+happyIn194 :: (Located ([AddEpAnn], Maybe [LHsTyVarBndr Specificity GhcPs])) -> (HappyAbsSyn )+happyIn194 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap194 x)+{-# INLINE happyIn194 #-}+happyOut194 :: (HappyAbsSyn ) -> HappyWrap194+happyOut194 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut194 #-}+newtype HappyWrap195 = HappyWrap195 (Located (LocatedN RdrName, HsConDeclH98Details GhcPs))+happyIn195 :: (Located (LocatedN RdrName, HsConDeclH98Details GhcPs)) -> (HappyAbsSyn )+happyIn195 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap195 x)+{-# INLINE happyIn195 #-}+happyOut195 :: (HappyAbsSyn ) -> HappyWrap195+happyOut195 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut195 #-}+newtype HappyWrap196 = HappyWrap196 ([LConDeclField GhcPs])+happyIn196 :: ([LConDeclField GhcPs]) -> (HappyAbsSyn )+happyIn196 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap196 x)+{-# INLINE happyIn196 #-}+happyOut196 :: (HappyAbsSyn ) -> HappyWrap196+happyOut196 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut196 #-}+newtype HappyWrap197 = HappyWrap197 ([LConDeclField GhcPs])+happyIn197 :: ([LConDeclField GhcPs]) -> (HappyAbsSyn )+happyIn197 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap197 x)+{-# INLINE happyIn197 #-}+happyOut197 :: (HappyAbsSyn ) -> HappyWrap197+happyOut197 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut197 #-}+newtype HappyWrap198 = HappyWrap198 (LConDeclField GhcPs)+happyIn198 :: (LConDeclField GhcPs) -> (HappyAbsSyn )+happyIn198 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap198 x)+{-# INLINE happyIn198 #-}+happyOut198 :: (HappyAbsSyn ) -> HappyWrap198+happyOut198 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut198 #-}+newtype HappyWrap199 = HappyWrap199 (Located (HsDeriving GhcPs))+happyIn199 :: (Located (HsDeriving GhcPs)) -> (HappyAbsSyn )+happyIn199 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap199 x)+{-# INLINE happyIn199 #-}+happyOut199 :: (HappyAbsSyn ) -> HappyWrap199+happyOut199 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut199 #-}+newtype HappyWrap200 = HappyWrap200 (Located (HsDeriving GhcPs))+happyIn200 :: (Located (HsDeriving GhcPs)) -> (HappyAbsSyn )+happyIn200 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap200 x)+{-# INLINE happyIn200 #-}+happyOut200 :: (HappyAbsSyn ) -> HappyWrap200+happyOut200 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut200 #-}+newtype HappyWrap201 = HappyWrap201 (LHsDerivingClause GhcPs)+happyIn201 :: (LHsDerivingClause GhcPs) -> (HappyAbsSyn )+happyIn201 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap201 x)+{-# INLINE happyIn201 #-}+happyOut201 :: (HappyAbsSyn ) -> HappyWrap201+happyOut201 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut201 #-}+newtype HappyWrap202 = HappyWrap202 (LDerivClauseTys GhcPs)+happyIn202 :: (LDerivClauseTys GhcPs) -> (HappyAbsSyn )+happyIn202 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap202 x)+{-# INLINE happyIn202 #-}+happyOut202 :: (HappyAbsSyn ) -> HappyWrap202+happyOut202 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut202 #-}+newtype HappyWrap203 = HappyWrap203 (LHsDecl GhcPs)+happyIn203 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn203 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap203 x)+{-# INLINE happyIn203 #-}+happyOut203 :: (HappyAbsSyn ) -> HappyWrap203+happyOut203 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut203 #-}+newtype HappyWrap204 = HappyWrap204 (LHsDecl GhcPs)+happyIn204 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn204 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap204 x)+{-# INLINE happyIn204 #-}+happyOut204 :: (HappyAbsSyn ) -> HappyWrap204+happyOut204 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut204 #-}+newtype HappyWrap205 = HappyWrap205 (Located (GRHSs GhcPs (LHsExpr GhcPs)))+happyIn205 :: (Located (GRHSs GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )+happyIn205 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap205 x)+{-# INLINE happyIn205 #-}+happyOut205 :: (HappyAbsSyn ) -> HappyWrap205+happyOut205 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut205 #-}+newtype HappyWrap206 = HappyWrap206 (Located [LGRHS GhcPs (LHsExpr GhcPs)])+happyIn206 :: (Located [LGRHS GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )+happyIn206 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap206 x)+{-# INLINE happyIn206 #-}+happyOut206 :: (HappyAbsSyn ) -> HappyWrap206+happyOut206 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut206 #-}+newtype HappyWrap207 = HappyWrap207 (LGRHS GhcPs (LHsExpr GhcPs))+happyIn207 :: (LGRHS GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )+happyIn207 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap207 x)+{-# INLINE happyIn207 #-}+happyOut207 :: (HappyAbsSyn ) -> HappyWrap207+happyOut207 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut207 #-}+newtype HappyWrap208 = HappyWrap208 (LHsDecl GhcPs)+happyIn208 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn208 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap208 x)+{-# INLINE happyIn208 #-}+happyOut208 :: (HappyAbsSyn ) -> HappyWrap208+happyOut208 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut208 #-}+newtype HappyWrap209 = HappyWrap209 (([AddEpAnn],Maybe Activation))+happyIn209 :: (([AddEpAnn],Maybe Activation)) -> (HappyAbsSyn )+happyIn209 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap209 x)+{-# INLINE happyIn209 #-}+happyOut209 :: (HappyAbsSyn ) -> HappyWrap209+happyOut209 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut209 #-}+newtype HappyWrap210 = HappyWrap210 (([AddEpAnn],Activation))+happyIn210 :: (([AddEpAnn],Activation)) -> (HappyAbsSyn )+happyIn210 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap210 x)+{-# INLINE happyIn210 #-}+happyOut210 :: (HappyAbsSyn ) -> HappyWrap210+happyOut210 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut210 #-}+newtype HappyWrap211 = HappyWrap211 (Located (HsUntypedSplice GhcPs))+happyIn211 :: (Located (HsUntypedSplice GhcPs)) -> (HappyAbsSyn )+happyIn211 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap211 x)+{-# INLINE happyIn211 #-}+happyOut211 :: (HappyAbsSyn ) -> HappyWrap211+happyOut211 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut211 #-}+newtype HappyWrap212 = HappyWrap212 (ECP)+happyIn212 :: (ECP) -> (HappyAbsSyn )+happyIn212 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap212 x)+{-# INLINE happyIn212 #-}+happyOut212 :: (HappyAbsSyn ) -> HappyWrap212+happyOut212 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut212 #-}+newtype HappyWrap213 = HappyWrap213 (ECP)+happyIn213 :: (ECP) -> (HappyAbsSyn )+happyIn213 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap213 x)+{-# INLINE happyIn213 #-}+happyOut213 :: (HappyAbsSyn ) -> HappyWrap213+happyOut213 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut213 #-}+newtype HappyWrap214 = HappyWrap214 (ECP)+happyIn214 :: (ECP) -> (HappyAbsSyn )+happyIn214 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap214 x)+{-# INLINE happyIn214 #-}+happyOut214 :: (HappyAbsSyn ) -> HappyWrap214+happyOut214 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut214 #-}+newtype HappyWrap215 = HappyWrap215 (ECP)+happyIn215 :: (ECP) -> (HappyAbsSyn )+happyIn215 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap215 x)+{-# INLINE happyIn215 #-}+happyOut215 :: (HappyAbsSyn ) -> HappyWrap215+happyOut215 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut215 #-}+newtype HappyWrap216 = HappyWrap216 ((Maybe EpaLocation,Bool))+happyIn216 :: ((Maybe EpaLocation,Bool)) -> (HappyAbsSyn )+happyIn216 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap216 x)+{-# INLINE happyIn216 #-}+happyOut216 :: (HappyAbsSyn ) -> HappyWrap216+happyOut216 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut216 #-}+newtype HappyWrap217 = HappyWrap217 (Located (HsPragE GhcPs))+happyIn217 :: (Located (HsPragE GhcPs)) -> (HappyAbsSyn )+happyIn217 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap217 x)+{-# INLINE happyIn217 #-}+happyOut217 :: (HappyAbsSyn ) -> HappyWrap217+happyOut217 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut217 #-}+newtype HappyWrap218 = HappyWrap218 (ECP)+happyIn218 :: (ECP) -> (HappyAbsSyn )+happyIn218 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap218 x)+{-# INLINE happyIn218 #-}+happyOut218 :: (HappyAbsSyn ) -> HappyWrap218+happyOut218 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut218 #-}+newtype HappyWrap219 = HappyWrap219 (ECP)+happyIn219 :: (ECP) -> (HappyAbsSyn )+happyIn219 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap219 x)+{-# INLINE happyIn219 #-}+happyOut219 :: (HappyAbsSyn ) -> HappyWrap219+happyOut219 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut219 #-}+newtype HappyWrap220 = HappyWrap220 (ECP)+happyIn220 :: (ECP) -> (HappyAbsSyn )+happyIn220 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap220 x)+{-# INLINE happyIn220 #-}+happyOut220 :: (HappyAbsSyn ) -> HappyWrap220+happyOut220 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut220 #-}+newtype HappyWrap221 = HappyWrap221 (ECP)+happyIn221 :: (ECP) -> (HappyAbsSyn )+happyIn221 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap221 x)+{-# INLINE happyIn221 #-}+happyOut221 :: (HappyAbsSyn ) -> HappyWrap221+happyOut221 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut221 #-}+newtype HappyWrap222 = HappyWrap222 (Located (NonEmpty (LocatedAn NoEpAnns (DotFieldOcc GhcPs))))+happyIn222 :: (Located (NonEmpty (LocatedAn NoEpAnns (DotFieldOcc GhcPs)))) -> (HappyAbsSyn )+happyIn222 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap222 x)+{-# INLINE happyIn222 #-}+happyOut222 :: (HappyAbsSyn ) -> HappyWrap222+happyOut222 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut222 #-}+newtype HappyWrap223 = HappyWrap223 (LHsExpr GhcPs)+happyIn223 :: (LHsExpr GhcPs) -> (HappyAbsSyn )+happyIn223 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap223 x)+{-# INLINE happyIn223 #-}+happyOut223 :: (HappyAbsSyn ) -> HappyWrap223+happyOut223 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut223 #-}+newtype HappyWrap224 = HappyWrap224 (Located (HsUntypedSplice GhcPs))+happyIn224 :: (Located (HsUntypedSplice GhcPs)) -> (HappyAbsSyn )+happyIn224 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap224 x)+{-# INLINE happyIn224 #-}+happyOut224 :: (HappyAbsSyn ) -> HappyWrap224+happyOut224 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut224 #-}+newtype HappyWrap225 = HappyWrap225 (Located ((EpAnnCO, EpAnn [AddEpAnn]), LHsExpr GhcPs))+happyIn225 :: (Located ((EpAnnCO, EpAnn [AddEpAnn]), LHsExpr GhcPs)) -> (HappyAbsSyn )+happyIn225 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap225 x)+{-# INLINE happyIn225 #-}+happyOut225 :: (HappyAbsSyn ) -> HappyWrap225+happyOut225 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut225 #-}+newtype HappyWrap226 = HappyWrap226 ([LHsCmdTop GhcPs])+happyIn226 :: ([LHsCmdTop GhcPs]) -> (HappyAbsSyn )+happyIn226 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap226 x)+{-# INLINE happyIn226 #-}+happyOut226 :: (HappyAbsSyn ) -> HappyWrap226+happyOut226 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut226 #-}+newtype HappyWrap227 = HappyWrap227 (LHsCmdTop GhcPs)+happyIn227 :: (LHsCmdTop GhcPs) -> (HappyAbsSyn )+happyIn227 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap227 x)+{-# INLINE happyIn227 #-}+happyOut227 :: (HappyAbsSyn ) -> HappyWrap227+happyOut227 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut227 #-}+newtype HappyWrap228 = HappyWrap228 (([AddEpAnn],[LHsDecl GhcPs]))+happyIn228 :: (([AddEpAnn],[LHsDecl GhcPs])) -> (HappyAbsSyn )+happyIn228 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap228 x)+{-# INLINE happyIn228 #-}+happyOut228 :: (HappyAbsSyn ) -> HappyWrap228+happyOut228 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut228 #-}+newtype HappyWrap229 = HappyWrap229 ([LHsDecl GhcPs])+happyIn229 :: ([LHsDecl GhcPs]) -> (HappyAbsSyn )+happyIn229 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap229 x)+{-# INLINE happyIn229 #-}+happyOut229 :: (HappyAbsSyn ) -> HappyWrap229+happyOut229 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut229 #-}+newtype HappyWrap230 = HappyWrap230 (ECP)+happyIn230 :: (ECP) -> (HappyAbsSyn )+happyIn230 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap230 x)+{-# INLINE happyIn230 #-}+happyOut230 :: (HappyAbsSyn ) -> HappyWrap230+happyOut230 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut230 #-}+newtype HappyWrap231 = HappyWrap231 (forall b. DisambECP b => PV (SumOrTuple b))+happyIn231 :: (forall b. DisambECP b => PV (SumOrTuple b)) -> (HappyAbsSyn )+happyIn231 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap231 x)+{-# INLINE happyIn231 #-}+happyOut231 :: (HappyAbsSyn ) -> HappyWrap231+happyOut231 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut231 #-}+newtype HappyWrap232 = HappyWrap232 (forall b. DisambECP b => PV (SrcSpan,[Either (EpAnn EpaLocation) (LocatedA b)]))+happyIn232 :: (forall b. DisambECP b => PV (SrcSpan,[Either (EpAnn EpaLocation) (LocatedA b)])) -> (HappyAbsSyn )+happyIn232 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap232 x)+{-# INLINE happyIn232 #-}+happyOut232 :: (HappyAbsSyn ) -> HappyWrap232+happyOut232 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut232 #-}+newtype HappyWrap233 = HappyWrap233 (forall b. DisambECP b => PV [Either (EpAnn EpaLocation) (LocatedA b)])+happyIn233 :: (forall b. DisambECP b => PV [Either (EpAnn EpaLocation) (LocatedA b)]) -> (HappyAbsSyn )+happyIn233 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap233 x)+{-# INLINE happyIn233 #-}+happyOut233 :: (HappyAbsSyn ) -> HappyWrap233+happyOut233 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut233 #-}+newtype HappyWrap234 = HappyWrap234 (forall b. DisambECP b => SrcSpan -> (AddEpAnn, AddEpAnn) -> PV (LocatedA b))+happyIn234 :: (forall b. DisambECP b => SrcSpan -> (AddEpAnn, AddEpAnn) -> PV (LocatedA b)) -> (HappyAbsSyn )+happyIn234 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap234 x)+{-# INLINE happyIn234 #-}+happyOut234 :: (HappyAbsSyn ) -> HappyWrap234+happyOut234 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut234 #-}+newtype HappyWrap235 = HappyWrap235 (forall b. DisambECP b => PV [LocatedA b])+happyIn235 :: (forall b. DisambECP b => PV [LocatedA b]) -> (HappyAbsSyn )+happyIn235 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap235 x)+{-# INLINE happyIn235 #-}+happyOut235 :: (HappyAbsSyn ) -> HappyWrap235+happyOut235 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut235 #-}+newtype HappyWrap236 = HappyWrap236 (Located [LStmt GhcPs (LHsExpr GhcPs)])+happyIn236 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )+happyIn236 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap236 x)+{-# INLINE happyIn236 #-}+happyOut236 :: (HappyAbsSyn ) -> HappyWrap236+happyOut236 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut236 #-}+newtype HappyWrap237 = HappyWrap237 (Located [[LStmt GhcPs (LHsExpr GhcPs)]])+happyIn237 :: (Located [[LStmt GhcPs (LHsExpr GhcPs)]]) -> (HappyAbsSyn )+happyIn237 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap237 x)+{-# INLINE happyIn237 #-}+happyOut237 :: (HappyAbsSyn ) -> HappyWrap237+happyOut237 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut237 #-}+newtype HappyWrap238 = HappyWrap238 (Located [LStmt GhcPs (LHsExpr GhcPs)])+happyIn238 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )+happyIn238 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap238 x)+{-# INLINE happyIn238 #-}+happyOut238 :: (HappyAbsSyn ) -> HappyWrap238+happyOut238 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut238 #-}+newtype HappyWrap239 = HappyWrap239 (Located (RealSrcSpan -> [LStmt GhcPs (LHsExpr GhcPs)] -> Stmt GhcPs (LHsExpr GhcPs)))+happyIn239 :: (Located (RealSrcSpan -> [LStmt GhcPs (LHsExpr GhcPs)] -> Stmt GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )+happyIn239 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap239 x)+{-# INLINE happyIn239 #-}+happyOut239 :: (HappyAbsSyn ) -> HappyWrap239+happyOut239 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut239 #-}+newtype HappyWrap240 = HappyWrap240 (Located [LStmt GhcPs (LHsExpr GhcPs)])+happyIn240 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )+happyIn240 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap240 x)+{-# INLINE happyIn240 #-}+happyOut240 :: (HappyAbsSyn ) -> HappyWrap240+happyOut240 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut240 #-}+newtype HappyWrap241 = HappyWrap241 (Located [LStmt GhcPs (LHsExpr GhcPs)])+happyIn241 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )+happyIn241 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap241 x)+{-# INLINE happyIn241 #-}+happyOut241 :: (HappyAbsSyn ) -> HappyWrap241+happyOut241 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut241 #-}+newtype HappyWrap242 = HappyWrap242 (forall b. DisambECP b => PV (Located (GRHSs GhcPs (LocatedA b))))+happyIn242 :: (forall b. DisambECP b => PV (Located (GRHSs GhcPs (LocatedA b)))) -> (HappyAbsSyn )+happyIn242 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap242 x)+{-# INLINE happyIn242 #-}+happyOut242 :: (HappyAbsSyn ) -> HappyWrap242+happyOut242 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut242 #-}+newtype HappyWrap243 = HappyWrap243 (forall b. DisambECP b => PV (Located [LGRHS GhcPs (LocatedA b)]))+happyIn243 :: (forall b. DisambECP b => PV (Located [LGRHS GhcPs (LocatedA b)])) -> (HappyAbsSyn )+happyIn243 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap243 x)+{-# INLINE happyIn243 #-}+happyOut243 :: (HappyAbsSyn ) -> HappyWrap243+happyOut243 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut243 #-}+newtype HappyWrap244 = HappyWrap244 (forall b. DisambECP b => PV (Located [LGRHS GhcPs (LocatedA b)]))+happyIn244 :: (forall b. DisambECP b => PV (Located [LGRHS GhcPs (LocatedA b)])) -> (HappyAbsSyn )+happyIn244 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap244 x)+{-# INLINE happyIn244 #-}+happyOut244 :: (HappyAbsSyn ) -> HappyWrap244+happyOut244 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut244 #-}+newtype HappyWrap245 = HappyWrap245 (Located ([AddEpAnn],[LGRHS GhcPs (LHsExpr GhcPs)]))+happyIn245 :: (Located ([AddEpAnn],[LGRHS GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )+happyIn245 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap245 x)+{-# INLINE happyIn245 #-}+happyOut245 :: (HappyAbsSyn ) -> HappyWrap245+happyOut245 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut245 #-}+newtype HappyWrap246 = HappyWrap246 (forall b. DisambECP b => PV (LGRHS GhcPs (LocatedA b)))+happyIn246 :: (forall b. DisambECP b => PV (LGRHS GhcPs (LocatedA b))) -> (HappyAbsSyn )+happyIn246 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap246 x)+{-# INLINE happyIn246 #-}+happyOut246 :: (HappyAbsSyn ) -> HappyWrap246+happyOut246 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut246 #-}+newtype HappyWrap247 = HappyWrap247 (LPat GhcPs)+happyIn247 :: (LPat GhcPs) -> (HappyAbsSyn )+happyIn247 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap247 x)+{-# INLINE happyIn247 #-}+happyOut247 :: (HappyAbsSyn ) -> HappyWrap247+happyOut247 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut247 #-}+newtype HappyWrap248 = HappyWrap248 ([LPat GhcPs])+happyIn248 :: ([LPat GhcPs]) -> (HappyAbsSyn )+happyIn248 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap248 x)+{-# INLINE happyIn248 #-}+happyOut248 :: (HappyAbsSyn ) -> HappyWrap248+happyOut248 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut248 #-}+newtype HappyWrap249 = HappyWrap249 (LPat GhcPs)+happyIn249 :: (LPat GhcPs) -> (HappyAbsSyn )+happyIn249 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap249 x)+{-# INLINE happyIn249 #-}+happyOut249 :: (HappyAbsSyn ) -> HappyWrap249+happyOut249 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut249 #-}+newtype HappyWrap250 = HappyWrap250 (LPat GhcPs)+happyIn250 :: (LPat GhcPs) -> (HappyAbsSyn )+happyIn250 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap250 x)+{-# INLINE happyIn250 #-}+happyOut250 :: (HappyAbsSyn ) -> HappyWrap250+happyOut250 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut250 #-}+newtype HappyWrap251 = HappyWrap251 ([LPat GhcPs])+happyIn251 :: ([LPat GhcPs]) -> (HappyAbsSyn )+happyIn251 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap251 x)+{-# INLINE happyIn251 #-}+happyOut251 :: (HappyAbsSyn ) -> HappyWrap251+happyOut251 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut251 #-}+newtype HappyWrap252 = HappyWrap252 (forall b. DisambECP b => PV (LocatedL [LocatedA (Stmt GhcPs (LocatedA b))]))+happyIn252 :: (forall b. DisambECP b => PV (LocatedL [LocatedA (Stmt GhcPs (LocatedA b))])) -> (HappyAbsSyn )+happyIn252 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap252 x)+{-# INLINE happyIn252 #-}+happyOut252 :: (HappyAbsSyn ) -> HappyWrap252+happyOut252 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut252 #-}+newtype HappyWrap253 = HappyWrap253 (forall b. DisambECP b => PV (Located (OrdList AddEpAnn,[LStmt GhcPs (LocatedA b)])))+happyIn253 :: (forall b. DisambECP b => PV (Located (OrdList AddEpAnn,[LStmt GhcPs (LocatedA b)]))) -> (HappyAbsSyn )+happyIn253 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap253 x)+{-# INLINE happyIn253 #-}+happyOut253 :: (HappyAbsSyn ) -> HappyWrap253+happyOut253 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut253 #-}+newtype HappyWrap254 = HappyWrap254 (Maybe (LStmt GhcPs (LHsExpr GhcPs)))+happyIn254 :: (Maybe (LStmt GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )+happyIn254 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap254 x)+{-# INLINE happyIn254 #-}+happyOut254 :: (HappyAbsSyn ) -> HappyWrap254+happyOut254 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut254 #-}+newtype HappyWrap255 = HappyWrap255 (LStmt GhcPs (LHsExpr GhcPs))+happyIn255 :: (LStmt GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )+happyIn255 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap255 x)+{-# INLINE happyIn255 #-}+happyOut255 :: (HappyAbsSyn ) -> HappyWrap255+happyOut255 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut255 #-}+newtype HappyWrap256 = HappyWrap256 (forall b. DisambECP b => PV (LStmt GhcPs (LocatedA b)))+happyIn256 :: (forall b. DisambECP b => PV (LStmt GhcPs (LocatedA b))) -> (HappyAbsSyn )+happyIn256 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap256 x)+{-# INLINE happyIn256 #-}+happyOut256 :: (HappyAbsSyn ) -> HappyWrap256+happyOut256 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut256 #-}+newtype HappyWrap257 = HappyWrap257 (forall b. DisambECP b => PV (LStmt GhcPs (LocatedA b)))+happyIn257 :: (forall b. DisambECP b => PV (LStmt GhcPs (LocatedA b))) -> (HappyAbsSyn )+happyIn257 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap257 x)+{-# INLINE happyIn257 #-}+happyOut257 :: (HappyAbsSyn ) -> HappyWrap257+happyOut257 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut257 #-}+newtype HappyWrap258 = HappyWrap258 (forall b. DisambECP b => PV ([Fbind b], Maybe SrcSpan))+happyIn258 :: (forall b. DisambECP b => PV ([Fbind b], Maybe SrcSpan)) -> (HappyAbsSyn )+happyIn258 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap258 x)+{-# INLINE happyIn258 #-}+happyOut258 :: (HappyAbsSyn ) -> HappyWrap258+happyOut258 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut258 #-}+newtype HappyWrap259 = HappyWrap259 (forall b. DisambECP b => PV ([Fbind b], Maybe SrcSpan))+happyIn259 :: (forall b. DisambECP b => PV ([Fbind b], Maybe SrcSpan)) -> (HappyAbsSyn )+happyIn259 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap259 x)+{-# INLINE happyIn259 #-}+happyOut259 :: (HappyAbsSyn ) -> HappyWrap259+happyOut259 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut259 #-}+newtype HappyWrap260 = HappyWrap260 (forall b. DisambECP b => PV (Fbind b))+happyIn260 :: (forall b. DisambECP b => PV (Fbind b)) -> (HappyAbsSyn )+happyIn260 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap260 x)+{-# INLINE happyIn260 #-}+happyOut260 :: (HappyAbsSyn ) -> HappyWrap260+happyOut260 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut260 #-}+newtype HappyWrap261 = HappyWrap261 (Located [LocatedAn NoEpAnns (DotFieldOcc GhcPs)])+happyIn261 :: (Located [LocatedAn NoEpAnns (DotFieldOcc GhcPs)]) -> (HappyAbsSyn )+happyIn261 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap261 x)+{-# INLINE happyIn261 #-}+happyOut261 :: (HappyAbsSyn ) -> HappyWrap261+happyOut261 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut261 #-}+newtype HappyWrap262 = HappyWrap262 (Located [LIPBind GhcPs])+happyIn262 :: (Located [LIPBind GhcPs]) -> (HappyAbsSyn )+happyIn262 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap262 x)+{-# INLINE happyIn262 #-}+happyOut262 :: (HappyAbsSyn ) -> HappyWrap262+happyOut262 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut262 #-}+newtype HappyWrap263 = HappyWrap263 (LIPBind GhcPs)+happyIn263 :: (LIPBind GhcPs) -> (HappyAbsSyn )+happyIn263 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap263 x)+{-# INLINE happyIn263 #-}+happyOut263 :: (HappyAbsSyn ) -> HappyWrap263+happyOut263 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut263 #-}+newtype HappyWrap264 = HappyWrap264 (Located HsIPName)+happyIn264 :: (Located HsIPName) -> (HappyAbsSyn )+happyIn264 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap264 x)+{-# INLINE happyIn264 #-}+happyOut264 :: (HappyAbsSyn ) -> HappyWrap264+happyOut264 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut264 #-}+newtype HappyWrap265 = HappyWrap265 (Located (SourceText, FastString))+happyIn265 :: (Located (SourceText, FastString)) -> (HappyAbsSyn )+happyIn265 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap265 x)+{-# INLINE happyIn265 #-}+happyOut265 :: (HappyAbsSyn ) -> HappyWrap265+happyOut265 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut265 #-}+newtype HappyWrap266 = HappyWrap266 (LBooleanFormula (LocatedN RdrName))+happyIn266 :: (LBooleanFormula (LocatedN RdrName)) -> (HappyAbsSyn )+happyIn266 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap266 x)+{-# INLINE happyIn266 #-}+happyOut266 :: (HappyAbsSyn ) -> HappyWrap266+happyOut266 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut266 #-}+newtype HappyWrap267 = HappyWrap267 (LBooleanFormula (LocatedN RdrName))+happyIn267 :: (LBooleanFormula (LocatedN RdrName)) -> (HappyAbsSyn )+happyIn267 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap267 x)+{-# INLINE happyIn267 #-}+happyOut267 :: (HappyAbsSyn ) -> HappyWrap267+happyOut267 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut267 #-}+newtype HappyWrap268 = HappyWrap268 (LBooleanFormula (LocatedN RdrName))+happyIn268 :: (LBooleanFormula (LocatedN RdrName)) -> (HappyAbsSyn )+happyIn268 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap268 x)+{-# INLINE happyIn268 #-}+happyOut268 :: (HappyAbsSyn ) -> HappyWrap268+happyOut268 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut268 #-}+newtype HappyWrap269 = HappyWrap269 ([LBooleanFormula (LocatedN RdrName)])+happyIn269 :: ([LBooleanFormula (LocatedN RdrName)]) -> (HappyAbsSyn )+happyIn269 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap269 x)+{-# INLINE happyIn269 #-}+happyOut269 :: (HappyAbsSyn ) -> HappyWrap269+happyOut269 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut269 #-}+newtype HappyWrap270 = HappyWrap270 (LBooleanFormula (LocatedN RdrName))+happyIn270 :: (LBooleanFormula (LocatedN RdrName)) -> (HappyAbsSyn )+happyIn270 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap270 x)+{-# INLINE happyIn270 #-}+happyOut270 :: (HappyAbsSyn ) -> HappyWrap270+happyOut270 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut270 #-}+newtype HappyWrap271 = HappyWrap271 (Located [LocatedN RdrName])+happyIn271 :: (Located [LocatedN RdrName]) -> (HappyAbsSyn )+happyIn271 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap271 x)+{-# INLINE happyIn271 #-}+happyOut271 :: (HappyAbsSyn ) -> HappyWrap271+happyOut271 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut271 #-}+newtype HappyWrap272 = HappyWrap272 (LocatedN RdrName)+happyIn272 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn272 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap272 x)+{-# INLINE happyIn272 #-}+happyOut272 :: (HappyAbsSyn ) -> HappyWrap272+happyOut272 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut272 #-}+newtype HappyWrap273 = HappyWrap273 (LocatedN RdrName)+happyIn273 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn273 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap273 x)+{-# INLINE happyIn273 #-}+happyOut273 :: (HappyAbsSyn ) -> HappyWrap273+happyOut273 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut273 #-}+newtype HappyWrap274 = HappyWrap274 (LocatedN RdrName)+happyIn274 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn274 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap274 x)+{-# INLINE happyIn274 #-}+happyOut274 :: (HappyAbsSyn ) -> HappyWrap274+happyOut274 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut274 #-}+newtype HappyWrap275 = HappyWrap275 (LocatedN RdrName)+happyIn275 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn275 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap275 x)+{-# INLINE happyIn275 #-}+happyOut275 :: (HappyAbsSyn ) -> HappyWrap275+happyOut275 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut275 #-}+newtype HappyWrap276 = HappyWrap276 (LocatedN RdrName)+happyIn276 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn276 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap276 x)+{-# INLINE happyIn276 #-}+happyOut276 :: (HappyAbsSyn ) -> HappyWrap276+happyOut276 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut276 #-}+newtype HappyWrap277 = HappyWrap277 (Located (NonEmpty (LocatedN RdrName)))+happyIn277 :: (Located (NonEmpty (LocatedN RdrName))) -> (HappyAbsSyn )+happyIn277 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap277 x)+{-# INLINE happyIn277 #-}+happyOut277 :: (HappyAbsSyn ) -> HappyWrap277+happyOut277 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut277 #-}+newtype HappyWrap278 = HappyWrap278 (Located [LocatedN RdrName])+happyIn278 :: (Located [LocatedN RdrName]) -> (HappyAbsSyn )+happyIn278 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap278 x)+{-# INLINE happyIn278 #-}+happyOut278 :: (HappyAbsSyn ) -> HappyWrap278+happyOut278 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut278 #-}+newtype HappyWrap279 = HappyWrap279 (LocatedN DataCon)+happyIn279 :: (LocatedN DataCon) -> (HappyAbsSyn )+happyIn279 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap279 x)+{-# INLINE happyIn279 #-}+happyOut279 :: (HappyAbsSyn ) -> HappyWrap279+happyOut279 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut279 #-}+newtype HappyWrap280 = HappyWrap280 (LocatedN DataCon)+happyIn280 :: (LocatedN DataCon) -> (HappyAbsSyn )+happyIn280 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap280 x)+{-# INLINE happyIn280 #-}+happyOut280 :: (HappyAbsSyn ) -> HappyWrap280+happyOut280 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut280 #-}+newtype HappyWrap281 = HappyWrap281 (LocatedN RdrName)+happyIn281 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn281 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap281 x)+{-# INLINE happyIn281 #-}+happyOut281 :: (HappyAbsSyn ) -> HappyWrap281+happyOut281 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut281 #-}+newtype HappyWrap282 = HappyWrap282 (LocatedN RdrName)+happyIn282 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn282 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap282 x)+{-# INLINE happyIn282 #-}+happyOut282 :: (HappyAbsSyn ) -> HappyWrap282+happyOut282 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut282 #-}+newtype HappyWrap283 = HappyWrap283 (LocatedN RdrName)+happyIn283 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn283 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap283 x)+{-# INLINE happyIn283 #-}+happyOut283 :: (HappyAbsSyn ) -> HappyWrap283+happyOut283 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut283 #-}+newtype HappyWrap284 = HappyWrap284 (LocatedN RdrName)+happyIn284 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn284 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap284 x)+{-# INLINE happyIn284 #-}+happyOut284 :: (HappyAbsSyn ) -> HappyWrap284+happyOut284 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut284 #-}+newtype HappyWrap285 = HappyWrap285 (LocatedN RdrName)+happyIn285 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn285 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap285 x)+{-# INLINE happyIn285 #-}+happyOut285 :: (HappyAbsSyn ) -> HappyWrap285+happyOut285 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut285 #-}+newtype HappyWrap286 = HappyWrap286 (LocatedN RdrName)+happyIn286 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn286 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap286 x)+{-# INLINE happyIn286 #-}+happyOut286 :: (HappyAbsSyn ) -> HappyWrap286+happyOut286 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut286 #-}+newtype HappyWrap287 = HappyWrap287 (LocatedN RdrName)+happyIn287 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn287 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap287 x)+{-# INLINE happyIn287 #-}+happyOut287 :: (HappyAbsSyn ) -> HappyWrap287+happyOut287 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut287 #-}+newtype HappyWrap288 = HappyWrap288 (LocatedN RdrName)+happyIn288 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn288 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap288 x)+{-# INLINE happyIn288 #-}+happyOut288 :: (HappyAbsSyn ) -> HappyWrap288+happyOut288 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut288 #-}+newtype HappyWrap289 = HappyWrap289 (LocatedN RdrName)+happyIn289 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn289 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap289 x)+{-# INLINE happyIn289 #-}+happyOut289 :: (HappyAbsSyn ) -> HappyWrap289+happyOut289 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut289 #-}+newtype HappyWrap290 = HappyWrap290 (LocatedN RdrName)+happyIn290 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn290 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap290 x)+{-# INLINE happyIn290 #-}+happyOut290 :: (HappyAbsSyn ) -> HappyWrap290+happyOut290 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut290 #-}+newtype HappyWrap291 = HappyWrap291 (LocatedN RdrName)+happyIn291 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn291 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap291 x)+{-# INLINE happyIn291 #-}+happyOut291 :: (HappyAbsSyn ) -> HappyWrap291+happyOut291 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut291 #-}+newtype HappyWrap292 = HappyWrap292 (LocatedN RdrName)+happyIn292 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn292 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap292 x)+{-# INLINE happyIn292 #-}+happyOut292 :: (HappyAbsSyn ) -> HappyWrap292+happyOut292 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut292 #-}+newtype HappyWrap293 = HappyWrap293 (LocatedN RdrName)+happyIn293 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn293 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap293 x)+{-# INLINE happyIn293 #-}+happyOut293 :: (HappyAbsSyn ) -> HappyWrap293+happyOut293 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut293 #-}+newtype HappyWrap294 = HappyWrap294 (LocatedN RdrName)+happyIn294 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn294 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap294 x)+{-# INLINE happyIn294 #-}+happyOut294 :: (HappyAbsSyn ) -> HappyWrap294+happyOut294 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut294 #-}+newtype HappyWrap295 = HappyWrap295 (forall b. DisambInfixOp b => PV (LocatedN b))+happyIn295 :: (forall b. DisambInfixOp b => PV (LocatedN b)) -> (HappyAbsSyn )+happyIn295 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap295 x)+{-# INLINE happyIn295 #-}+happyOut295 :: (HappyAbsSyn ) -> HappyWrap295+happyOut295 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut295 #-}+newtype HappyWrap296 = HappyWrap296 (forall b. DisambInfixOp b => PV (LocatedN b))+happyIn296 :: (forall b. DisambInfixOp b => PV (LocatedN b)) -> (HappyAbsSyn )+happyIn296 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap296 x)+{-# INLINE happyIn296 #-}+happyOut296 :: (HappyAbsSyn ) -> HappyWrap296+happyOut296 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut296 #-}+newtype HappyWrap297 = HappyWrap297 (forall b. DisambInfixOp b => PV (Located b))+happyIn297 :: (forall b. DisambInfixOp b => PV (Located b)) -> (HappyAbsSyn )+happyIn297 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap297 x)+{-# INLINE happyIn297 #-}+happyOut297 :: (HappyAbsSyn ) -> HappyWrap297+happyOut297 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut297 #-}+newtype HappyWrap298 = HappyWrap298 (LocatedN RdrName)+happyIn298 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn298 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap298 x)+{-# INLINE happyIn298 #-}+happyOut298 :: (HappyAbsSyn ) -> HappyWrap298+happyOut298 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut298 #-}+newtype HappyWrap299 = HappyWrap299 (LocatedN RdrName)+happyIn299 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn299 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap299 x)+{-# INLINE happyIn299 #-}+happyOut299 :: (HappyAbsSyn ) -> HappyWrap299+happyOut299 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut299 #-}+newtype HappyWrap300 = HappyWrap300 (LocatedN RdrName)+happyIn300 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn300 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap300 x)+{-# INLINE happyIn300 #-}+happyOut300 :: (HappyAbsSyn ) -> HappyWrap300+happyOut300 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut300 #-}+newtype HappyWrap301 = HappyWrap301 (LocatedN RdrName)+happyIn301 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn301 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap301 x)+{-# INLINE happyIn301 #-}+happyOut301 :: (HappyAbsSyn ) -> HappyWrap301+happyOut301 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut301 #-}+newtype HappyWrap302 = HappyWrap302 (LocatedN RdrName)+happyIn302 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn302 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap302 x)+{-# INLINE happyIn302 #-}+happyOut302 :: (HappyAbsSyn ) -> HappyWrap302+happyOut302 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut302 #-}+newtype HappyWrap303 = HappyWrap303 (LocatedN RdrName)+happyIn303 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn303 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap303 x)+{-# INLINE happyIn303 #-}+happyOut303 :: (HappyAbsSyn ) -> HappyWrap303+happyOut303 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut303 #-}+newtype HappyWrap304 = HappyWrap304 (LocatedN RdrName)+happyIn304 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn304 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap304 x)+{-# INLINE happyIn304 #-}+happyOut304 :: (HappyAbsSyn ) -> HappyWrap304+happyOut304 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut304 #-}+newtype HappyWrap305 = HappyWrap305 (LocatedN FieldLabelString)+happyIn305 :: (LocatedN FieldLabelString) -> (HappyAbsSyn )+happyIn305 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap305 x)+{-# INLINE happyIn305 #-}+happyOut305 :: (HappyAbsSyn ) -> HappyWrap305+happyOut305 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut305 #-}+newtype HappyWrap306 = HappyWrap306 (LocatedN RdrName)+happyIn306 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn306 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap306 x)+{-# INLINE happyIn306 #-}+happyOut306 :: (HappyAbsSyn ) -> HappyWrap306+happyOut306 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut306 #-}+newtype HappyWrap307 = HappyWrap307 (LocatedN RdrName)+happyIn307 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn307 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap307 x)+{-# INLINE happyIn307 #-}+happyOut307 :: (HappyAbsSyn ) -> HappyWrap307+happyOut307 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut307 #-}+newtype HappyWrap308 = HappyWrap308 (LocatedN RdrName)+happyIn308 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn308 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap308 x)+{-# INLINE happyIn308 #-}+happyOut308 :: (HappyAbsSyn ) -> HappyWrap308+happyOut308 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut308 #-}+newtype HappyWrap309 = HappyWrap309 (LocatedN RdrName)+happyIn309 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn309 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap309 x)+{-# INLINE happyIn309 #-}+happyOut309 :: (HappyAbsSyn ) -> HappyWrap309+happyOut309 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut309 #-}+newtype HappyWrap310 = HappyWrap310 (LocatedN RdrName)+happyIn310 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn310 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap310 x)+{-# INLINE happyIn310 #-}+happyOut310 :: (HappyAbsSyn ) -> HappyWrap310+happyOut310 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut310 #-}+newtype HappyWrap311 = HappyWrap311 (LocatedN RdrName)+happyIn311 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn311 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap311 x)+{-# INLINE happyIn311 #-}+happyOut311 :: (HappyAbsSyn ) -> HappyWrap311+happyOut311 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut311 #-}+newtype HappyWrap312 = HappyWrap312 (LocatedN RdrName)+happyIn312 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn312 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap312 x)+{-# INLINE happyIn312 #-}+happyOut312 :: (HappyAbsSyn ) -> HappyWrap312+happyOut312 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut312 #-}+newtype HappyWrap313 = HappyWrap313 (Located FastString)+happyIn313 :: (Located FastString) -> (HappyAbsSyn )+happyIn313 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap313 x)+{-# INLINE happyIn313 #-}+happyOut313 :: (HappyAbsSyn ) -> HappyWrap313+happyOut313 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut313 #-}+newtype HappyWrap314 = HappyWrap314 (Located FastString)+happyIn314 :: (Located FastString) -> (HappyAbsSyn )+happyIn314 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap314 x)+{-# INLINE happyIn314 #-}+happyOut314 :: (HappyAbsSyn ) -> HappyWrap314+happyOut314 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut314 #-}+newtype HappyWrap315 = HappyWrap315 (LocatedN RdrName)+happyIn315 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn315 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap315 x)+{-# INLINE happyIn315 #-}+happyOut315 :: (HappyAbsSyn ) -> HappyWrap315+happyOut315 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut315 #-}+newtype HappyWrap316 = HappyWrap316 (LocatedN RdrName)+happyIn316 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn316 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap316 x)+{-# INLINE happyIn316 #-}+happyOut316 :: (HappyAbsSyn ) -> HappyWrap316+happyOut316 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut316 #-}+newtype HappyWrap317 = HappyWrap317 (LocatedN RdrName)+happyIn317 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn317 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap317 x)+{-# INLINE happyIn317 #-}+happyOut317 :: (HappyAbsSyn ) -> HappyWrap317+happyOut317 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut317 #-}+newtype HappyWrap318 = HappyWrap318 (LocatedN RdrName)+happyIn318 :: (LocatedN RdrName) -> (HappyAbsSyn )+happyIn318 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap318 x)+{-# INLINE happyIn318 #-}+happyOut318 :: (HappyAbsSyn ) -> HappyWrap318+happyOut318 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut318 #-}+newtype HappyWrap319 = HappyWrap319 (Located (HsLit GhcPs))+happyIn319 :: (Located (HsLit GhcPs)) -> (HappyAbsSyn )+happyIn319 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap319 x)+{-# INLINE happyIn319 #-}+happyOut319 :: (HappyAbsSyn ) -> HappyWrap319+happyOut319 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut319 #-}+newtype HappyWrap320 = HappyWrap320 (())+happyIn320 :: (()) -> (HappyAbsSyn )+happyIn320 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap320 x)+{-# INLINE happyIn320 #-}+happyOut320 :: (HappyAbsSyn ) -> HappyWrap320+happyOut320 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut320 #-}+newtype HappyWrap321 = HappyWrap321 (LocatedA ModuleName)+happyIn321 :: (LocatedA ModuleName) -> (HappyAbsSyn )+happyIn321 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap321 x)+{-# INLINE happyIn321 #-}+happyOut321 :: (HappyAbsSyn ) -> HappyWrap321+happyOut321 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut321 #-}+newtype HappyWrap322 = HappyWrap322 (([SrcSpan],Int))+happyIn322 :: (([SrcSpan],Int)) -> (HappyAbsSyn )+happyIn322 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap322 x)+{-# INLINE happyIn322 #-}+happyOut322 :: (HappyAbsSyn ) -> HappyWrap322+happyOut322 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut322 #-}+newtype HappyWrap323 = HappyWrap323 (([SrcSpan],Int))+happyIn323 :: (([SrcSpan],Int)) -> (HappyAbsSyn )+happyIn323 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap323 x)+{-# INLINE happyIn323 #-}+happyOut323 :: (HappyAbsSyn ) -> HappyWrap323+happyOut323 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut323 #-}+newtype HappyWrap324 = HappyWrap324 (([SrcSpan],Int))+happyIn324 :: (([SrcSpan],Int)) -> (HappyAbsSyn )+happyIn324 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap324 x)+{-# INLINE happyIn324 #-}+happyOut324 :: (HappyAbsSyn ) -> HappyWrap324+happyOut324 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut324 #-}+newtype HappyWrap325 = HappyWrap325 (forall b. DisambECP b => PV (LocatedL [LMatch GhcPs (LocatedA b)]))+happyIn325 :: (forall b. DisambECP b => PV (LocatedL [LMatch GhcPs (LocatedA b)])) -> (HappyAbsSyn )+happyIn325 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap325 x)+{-# INLINE happyIn325 #-}+happyOut325 :: (HappyAbsSyn ) -> HappyWrap325+happyOut325 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut325 #-}+newtype HappyWrap326 = HappyWrap326 (forall b. DisambECP b => PV (LocatedL [LMatch GhcPs (LocatedA b)]))+happyIn326 :: (forall b. DisambECP b => PV (LocatedL [LMatch GhcPs (LocatedA b)])) -> (HappyAbsSyn )+happyIn326 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap326 x)+{-# INLINE happyIn326 #-}+happyOut326 :: (HappyAbsSyn ) -> HappyWrap326+happyOut326 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut326 #-}+newtype HappyWrap327 = HappyWrap327 (ECP)+happyIn327 :: (ECP) -> (HappyAbsSyn )+happyIn327 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap327 x)+{-# INLINE happyIn327 #-}+happyOut327 :: (HappyAbsSyn ) -> HappyWrap327+happyOut327 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut327 #-}+newtype HappyWrap328 = HappyWrap328 (ECP)+happyIn328 :: (ECP) -> (HappyAbsSyn )+happyIn328 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap328 x)+{-# INLINE happyIn328 #-}+happyOut328 :: (HappyAbsSyn ) -> HappyWrap328+happyOut328 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut328 #-}+newtype HappyWrap329 = HappyWrap329 (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)])))+happyIn329 :: (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)]))) -> (HappyAbsSyn )+happyIn329 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap329 x)+{-# INLINE happyIn329 #-}+happyOut329 :: (HappyAbsSyn ) -> HappyWrap329+happyOut329 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut329 #-}+newtype HappyWrap330 = HappyWrap330 (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)])))+happyIn330 :: (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)]))) -> (HappyAbsSyn )+happyIn330 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap330 x)+{-# INLINE happyIn330 #-}+happyOut330 :: (HappyAbsSyn ) -> HappyWrap330+happyOut330 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut330 #-}+newtype HappyWrap331 = HappyWrap331 (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)])))+happyIn331 :: (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)]))) -> (HappyAbsSyn )+happyIn331 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap331 x)+{-# INLINE happyIn331 #-}+happyOut331 :: (HappyAbsSyn ) -> HappyWrap331+happyOut331 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut331 #-}+newtype HappyWrap332 = HappyWrap332 (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)])))+happyIn332 :: (forall b. DisambECP b => PV (Located ([AddEpAnn],[LMatch GhcPs (LocatedA b)]))) -> (HappyAbsSyn )+happyIn332 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap332 x)+{-# INLINE happyIn332 #-}+happyOut332 :: (HappyAbsSyn ) -> HappyWrap332+happyOut332 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut332 #-}+newtype HappyWrap333 = HappyWrap333 (forall b. DisambECP b => PV (LMatch GhcPs (LocatedA b)))+happyIn333 :: (forall b. DisambECP b => PV (LMatch GhcPs (LocatedA b))) -> (HappyAbsSyn )+happyIn333 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap333 x)+{-# INLINE happyIn333 #-}+happyOut333 :: (HappyAbsSyn ) -> HappyWrap333+happyOut333 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut333 #-}+newtype HappyWrap334 = HappyWrap334 (forall b. DisambECP b => PV (LMatch GhcPs (LocatedA b)))+happyIn334 :: (forall b. DisambECP b => PV (LMatch GhcPs (LocatedA b))) -> (HappyAbsSyn )+happyIn334 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap334 x)+{-# INLINE happyIn334 #-}+happyOut334 :: (HappyAbsSyn ) -> HappyWrap334+happyOut334 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut334 #-}+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\x80\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\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x8f\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xdf\x7c\xd5\xff\xbf\xfc\xbf\x67\x10\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\xcc\x45\xf4\xff\xcb\xff\x13\x04\x41\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xff\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x08\x88\x08\x01\x2a\xe8\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x01\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\x08\x04\x40\xf4\xff\x09\x3f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\xc0\x40\x00\x04\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe1\x00\x00\x40\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x80\x01\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x04\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x90\xa2\x82\xff\xe1\x00\x00\x40\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x40\x00\x04\x3f\x9f\xf0\x03\x00\x00\x00\x00\x00\x82\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x04\x3f\x9f\xf0\x03\x00\x00\x00\xb0\x00\xa2\x02\x67\xe0\x00\x00\x40\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\x0c\x04\x40\xf0\xf3\x09\x3f\x00\x00\x00\x00\x0b\x20\x2a\x70\x06\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x44\xff\x9f\xf0\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2e\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x80\xb8\x10\xa2\xc3\xff\xe9\x00\x00\x40\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x82\x0b\x21\x6a\xfc\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x04\x3f\x9f\xf0\x03\x00\x00\x00\x00\x00\x00\x00\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x08\x80\x08\x01\x2a\xe8\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x44\xff\x9f\xf0\x03\x00\x00\x00\x00\x00\xa0\x0a\x67\xf8\xff\xff\xd7\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x88\x08\x01\x10\x84\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x00\x60\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x88\x1f\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x0b\x3f\x00\x00\x40\x00\x07\x08\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x82\x07\x20\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\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\x1c\x0c\x44\xf4\xff\x0b\x3f\x00\x00\x40\x00\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\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\x1c\x0c\x44\xf4\xff\x0b\x3f\x00\x00\x40\x00\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\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\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\x1c\x0c\x44\xf4\xff\x0b\x3f\x00\x00\xc0\x01\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x00\x00\x04\x70\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x0b\x3f\x00\x00\x40\x00\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf0\x03\x00\x00\x04\x70\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x0b\x3f\x00\x00\x40\x00\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x80\x04\xf8\x10\xe0\x8a\xff\xff\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x48\x82\x0f\x03\xba\xfc\xff\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x80\x24\xf8\x10\xa0\xce\xff\xff\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x0b\x3f\x00\x00\x40\x00\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x40\x00\x44\xff\x9f\xf0\x03\x00\x00\x00\x00\x00\xa0\x02\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x00\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x0c\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\xaa\x70\x86\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x40\x00\x04\x3f\x9f\xf0\x03\x00\x00\x00\x00\x00\xa0\x02\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x01\x88\x10\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\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\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\x2a\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\x08\x04\x40\xf4\xff\x09\x3f\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\x00\x00\x00\x00\x20\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x44\xff\x9f\xf0\x03\x00\x00\x00\x00\x00\x80\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x2a\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\xa0\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x48\x82\x0f\x03\xba\xfc\xff\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x88\x10\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\x0c\x04\x40\xf0\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x01\x00\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x04\x42\xf0\xff\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x2a\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\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\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x2a\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x04\x48\xf5\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x2a\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\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\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf0\x03\x00\x00\x04\x70\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\xc0\xc1\x40\x44\xff\xbf\xf0\x03\x00\x00\x04\x70\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\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\x80\x00\x88\x10\x00\x41\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\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x2a\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\x20\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\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\x02\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\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\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\x02\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x20\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x08\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x41\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x04\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe1\x00\x00\x40\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\x08\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x04\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe1\x00\x00\x40\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x44\xff\x9f\xf0\x03\x00\x00\x00\x00\x00\x00\x00\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\x40\x00\x04\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe1\x00\x00\x40\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\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\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\x18\x80\xf8\x01\x00\x88\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x10\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x00\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x80\x04\xf8\x10\xa0\xcb\xff\xff\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x48\x82\x0f\x01\xaa\xf8\xff\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x8b\x3f\x00\x00\x40\x00\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x40\x00\x44\xff\x9f\xf0\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x00\x60\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x80\x00\x00\x00\x00\x41\x10\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x04\x40\xf4\xff\x09\x3f\x00\x00\x08\x80\x08\x01\x3a\xe4\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x04\x40\xf4\xff\x09\x3f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\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\x80\x40\x00\x44\xff\x9f\xf0\x03\x00\x00\x00\x00\x00\x80\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x2a\x60\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xcc\x45\xf4\xff\xcb\xff\x13\x04\x41\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x5c\x44\xff\xbf\xfc\x3f\x41\x10\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x08\x04\x40\xf4\xff\x09\x3f\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\x08\x88\x08\x01\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x88\x00\x01\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\x20\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x88\x10\x00\x80\x98\x01\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\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\x1c\x0c\x44\xf4\xff\x8f\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xff\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x80\x00\x88\x10\x00\x41\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x80\x04\xf8\x10\xa0\xce\xff\xff\xff\xff\xd7\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\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\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\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\xc0\xc1\x40\x44\xff\xbf\xf0\x03\x00\x00\x04\x70\x80\xa0\x0a\x67\xfe\xff\xff\xd7\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\xc0\xc1\x40\x44\xff\xbf\xf0\x03\x00\x00\x04\x70\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\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\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\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x20\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\x02\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x1c\x0c\x44\xf4\xff\x0b\x3f\x00\x00\x40\x00\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x08\x04\x40\xf4\xff\x09\x3f\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\x80\x40\x00\x44\xff\x9f\xf0\x03\x00\x40\x00\x00\x00\x80\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x40\x00\x04\x3f\x9f\xf0\x03\x00\x00\x00\xb0\x00\xa2\x02\x67\xe0\x00\x00\x40\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\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\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x3a\xfc\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x44\xff\x9f\xf0\x03\x00\x00\x00\x00\x00\x00\x00\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\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\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\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\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\x10\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x10\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\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\x01\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x08\x01\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\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x80\x40\x00\x04\x3f\x9f\xf0\x03\x00\x00\x00\x00\x00\x82\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\x08\x04\x40\xf0\xf3\x09\x3f\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\x80\x40\x00\x04\x3f\x9f\xf0\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x04\x3f\x9f\xf0\x03\x00\x00\x00\xb0\x00\xa2\x02\x67\xe0\x00\x00\x40\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\xc0\x40\x00\x04\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe1\x00\x00\x40\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\xc0\x40\x00\x04\x3f\x9f\xf0\x03\x00\x00\x00\xb0\x00\xa2\x02\x67\xe0\x00\x00\x40\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\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x04\x3f\x9f\xf0\x03\x00\x00\x00\xb0\x00\xa2\x02\x67\xe0\x00\x00\x40\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\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\x08\x04\x40\x70\xf0\x09\x3f\x00\x00\x00\x00\x00\x00\x00\x60\x00\x04\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\x10\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\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\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\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\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x04\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x04\x40\xf4\xff\x09\x3f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x44\xff\x9f\xf0\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\x00\x00\x00\x00\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\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\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\xc0\xc1\x40\x44\xff\xbf\xf0\x03\x00\x00\x04\x70\x00\xa4\x2a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x0b\x3f\x00\x00\x40\x00\x07\x00\xab\x72\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x40\xaa\x72\xe6\xff\xff\x7f\x7d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xb0\x2a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x48\x80\x0f\x01\xaa\xf8\xff\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x4c\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x48\x80\x0f\x01\xaa\xf8\xff\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x48\x80\x0f\x01\xaa\xfc\xff\xff\xff\x7f\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\x00\x00\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\xc0\xc1\x40\x44\xff\xbf\xf0\x03\x00\x00\x04\x70\x00\xa0\x1a\x67\xfe\xff\xff\xd7\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\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xdf\x7c\xd5\xff\xbf\xfc\xbf\x67\x10\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\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\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x40\x00\x44\xff\x9f\xf0\x03\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x04\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\x10\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\x18\x80\x08\x01\x00\x88\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\xa0\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x2a\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\x80\x40\x00\x44\xff\x9f\xf0\x03\x00\x00\x00\x00\x00\xa0\x02\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x2a\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\xa0\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\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\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\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\x80\x00\x88\x10\x00\x80\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x04\x40\xf4\xff\x09\x3f\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x80\x04\xf8\x10\xa0\x8a\xff\xff\xff\xff\xd7\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\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\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x40\x00\x04\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe1\x00\x00\x40\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\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\x80\x00\x01\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x04\x40\xf0\xf3\x09\x3f\x00\x00\x00\x00\x00\x20\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x08\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x08\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\x80\x40\x00\x44\xff\x9f\xf0\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\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\x80\x40\x00\x44\xff\x9f\xf0\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\x08\x04\x40\xf4\xff\x09\x3f\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\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\x10\x00\x00\x00\x08\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\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\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x2a\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\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\x80\x40\x00\x44\xff\x9f\xf0\x03\x00\x00\x00\x00\x00\xa0\x02\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x20\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf0\x03\x00\x00\x04\x70\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x08\x80\x00\x01\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\xdf\x7c\xd5\xff\xbf\xfc\xbf\x67\x10\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x04\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\x04\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\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x00\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x40\x00\x44\xff\x9f\xf0\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x00\x00\x00\x00\x08\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x04\x40\xf4\xff\x09\x3f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x04\x3f\x9f\xf0\x03\x00\x00\x00\x00\x00\x82\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\x40\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\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\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\x08\x04\x40\xf0\xf3\x09\x3f\x00\x00\x00\x08\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x80\x40\x00\x04\x3f\x9f\xf0\x03\x00\x00\x00\x00\x00\x82\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x1c\xcc\x45\xf4\xff\xcb\xff\x13\x04\x41\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x88\x10\x00\x80\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x8f\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x20\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x72\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\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\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x44\xf4\xff\x0b\x3f\x00\x00\x40\x00\x07\x00\xaa\x72\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x04\x40\xf4\xff\x09\x3f\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\xc1\x40\x44\xff\xbf\xf8\x03\x01\x80\x04\xf8\x10\xa0\x8a\xff\xff\xff\xff\xd7\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\x08\x04\x40\xf4\xff\x09\x3f\x00\x00\x04\x00\x00\x00\x08\x20\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x04\x40\x70\xf0\x09\x3f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\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\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\x1c\x0c\x44\xf4\xff\x0b\x3f\x00\x00\x40\x00\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\xc0\xc1\x40\x4c\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\xc4\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\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\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf0\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x04\x3f\x9f\xf0\x03\x00\x00\x00\x00\x00\x82\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x03\x00\x00\x00\x00\x00\x00\x08\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x04\x40\xf0\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\xc0\xcd\x5c\x54\xff\xbf\xfc\x3f\x41\x10\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\xdc\xcc\x45\xf5\xff\xcb\xff\x13\x04\x41\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\xcc\x55\xf5\xff\xcb\xff\x13\x04\x41\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc5\x5c\x55\xff\xbf\xfc\x3f\x41\x10\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\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\x08\x04\x40\xf0\xf3\x09\x3f\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\x0c\x04\x40\xf0\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x44\xff\x9f\xf0\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x04\x40\xf4\xff\x09\x3f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x04\x40\xf4\xff\x09\x3f\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\x80\x02\x88\x10\x00\x80\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\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\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\x80\x40\x80\x54\xff\x9f\xf4\x03\x00\x00\x00\x00\x00\x80\x00\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\x08\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\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\x08\x80\x08\x01\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\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\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\xc0\xc1\x5c\x44\xff\xbf\xfc\x3f\x41\x10\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\xcc\x45\xf4\xff\xcb\xff\x13\x04\x41\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\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\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\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x80\x40\x00\x04\x3f\x9f\xf0\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x00\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x0c\x04\x42\xf4\xf7\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf0\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x3a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x1c\x0c\x44\xf4\xff\x8b\x3f\x10\x00\x40\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf8\x03\x01\x80\x04\xf8\x10\xa0\x8a\xff\xff\xff\xff\xd7\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\x08\x04\x40\xf4\xff\x09\x3f\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x08\x04\x40\x70\xf0\x09\x3f\x00\x00\x00\x00\x00\x00\x00\x60\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x04\x07\x9f\xf0\x03\x00\x00\x00\x00\x00\x00\x00\x06\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\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\xc0\x40\x00\x04\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe1\x00\x00\x40\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\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x2a\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\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\xcc\x45\xf5\xff\xcb\xff\x13\x04\x41\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe1\x00\x00\x40\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\x0c\x04\x40\xf0\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x88\x10\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\x0c\x04\x40\xf0\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\xcc\x55\xf5\xff\xcb\xff\x13\x04\x41\x80\x07\x00\xaa\x70\xe6\xff\xff\x7f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe1\x00\x00\x40\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\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x0c\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x44\x3f\x9f\xf0\x03\x18\xc0\x00\xb8\x10\xa2\x82\xff\xe1\x00\x00\x40\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\x08\x04\x40\xf0\xf3\x09\x3f\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\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x40\x00\x44\xff\x9f\xf0\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x40\x00\x54\xff\x9f\xf0\x03\x00\x40\x00\x00\x00\x80\x00\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\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\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x04\x40\xf0\xf3\x09\x3f\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe1\x00\x00\x40\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf0\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x9f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc1\x40\x44\xff\xbf\xf8\x03\x01\x00\x04\x78\x00\xa0\x0a\x67\xfe\xff\xff\xd7\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\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\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\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x00\xb8\x10\xa2\x82\xff\xe9\x00\x00\x40\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\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\xc0\x40\x00\x44\x3f\x9f\xf0\x03\x18\x80\x80\xb8\x10\xa2\xc3\xff\xe9\x00\x00\x40\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\x08\x04\x40\xf0\xf3\x09\x3f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x40\xf4\xf3\x09\x3f\x80\x01\x08\x80\x0b\x21\x2a\xf8\x1f\x0e\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x04\x48\xf5\xff\x49\x3f\x00\x00\x00\x00\x00\x00\x08\x64\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\x80\x40\x00\x54\xff\x9f\xf0\x03\x00\x40\x00\x00\x00\x80\x00\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\xa0\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x54\xff\x9f\xf4\x03\x00\x00\x00\x00\x00\x80\x40\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x04\x40\xf0\xf3\x09\x3f\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x04\x40\x70\xf0\x09\x3f\x00\x00\x00\x00\x00\x00\x00\xe0\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\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\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\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x04\x48\xf5\xff\x49\x3f\x00\x00\x00\x00\x00\x00\x08\x60\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++{-# NOINLINE happyExpListPerState #-}+happyExpListPerState st =+ token_strs_expected+ where token_strs = ["error","%dummy","%start_parseModuleNoHaddock","%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","HYPHEN","litpkgname","mayberns","rns","rn","unitbody","unitdecls","unitdecl","signature","module","missing_module_keyword","implicit_top","maybemodwarning","body","body2","top","top1","header","header_body","header_body2","header_top","header_top_importdecls","maybeexports","exportlist","exportlist1","export","maybeexportwarning","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","importlist","importlist1","import","prec","infix","ops","topdecls","topdecls_semi","topdecls_cs","topdecls_cs_semi","topdecl_cs","topdecl","cl_decl","ty_decl","standalone_kind_sig","sks_vars","inst_decl","overlap_pragma","deriv_strategy_no_via","deriv_strategy_via","deriv_standalone_strategy","opt_injective_info","injectivity_cond","inj_varids","where_type_family","ty_fam_inst_eqn_list","ty_fam_inst_eqns","ty_fam_inst_eqn","at_decl_cls","opt_family","opt_instance","at_decl_inst","type_data_or_newtype","data_or_newtype","opt_kind_sig","opt_datafam_kind_sig","opt_tyfam_kind_sig","opt_at_kind_inj_sig","tycl_hdr","datafam_inst_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","qvarcon","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_activation_marker","rule_explicit_activation","rule_foralls","rule_vars","rule_var","warning_category","warnings","warning","deprecations","deprecation","strings","stringlist","annotation","fdecl","callconv","safety","fspec","opt_sig","opt_tyconsig","sigktype","sigtype","sig_vars","sigtypes1","unpackedness","forall_telescope","ktype","ctype","context","type","mult","btype","infixtype","ftype","tyarg","tyop","atype","inst_type","deriv_types","comma_types0","comma_types1","bar_types2","tv_bndrs","tv_bndr","tv_bndr_no_braces","fds","fds1","fd","varids0","kind","gadt_constrlist","gadt_constrs","gadt_constr","constrs","constrs1","constr","forall","constr_stuff","fielddecls","fielddecls1","fielddecl","maybe_derivings","derivings","deriving","deriv_clause_types","decl_no_th","decl","rhs","gdrhs","gdrh","sigdecl","activation","explicit_activation","quasiquote","exp","infixexp","exp10p","exp10","optSemi","prag_e","fexp","aexp","aexp1","aexp2","projection","splice_exp","splice_untyped","splice_typed","cmdargs","acmd","cvtopbody","cvtopdecls0","texp","tup_exprs","commas_tup_tail","tup_tail","list","lexps","flattenedpquals","pquals","squals","transformqual","guardquals","guardquals1","alt_rhs","ralt","gdpats","ifgdpats","gdpat","pat","pats1","bindpat","apat","apats","stmtlist","stmts","maybe_stmt","e_stmt","stmt","qual","fbinds","fbinds1","fbind","fieldToUpdate","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","qcon_list","sysdcon_nolist","sysdcon","conop","qconop","gtycon","ntgtycon","oqtycon","oqtycon_no_varcon","qtyconop","qtycon","tycon","qtyconsym","tyconsym","otycon","op","varop","qop","qopm","hole_op","qvarop","qvaropm","tyvar","tyvarop","tyvarid","var","qvar","field","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","altslist__apats__","altslist__pats1__","exp_prag__exp__","exp_prag__exp10p__","alts__apats__","alts__pats1__","alts1__apats__","alts1__pats1__","alt__apats__","alt__pats1__","'_'","'as'","'case'","'class'","'data'","'default'","'deriving'","'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'","'family'","'role'","'stdcall'","'ccall'","'capi'","'prim'","'javascript'","'proc'","'rec'","'group'","'by'","'using'","'pattern'","'static'","'stock'","'anyclass'","'via'","'unit'","'signature'","'dependency'","'{-# INLINE'","'{-# OPAQUE'","'{-# SPECIALISE'","'{-# SPECIALISE_INLINE'","'{-# SOURCE'","'{-# RULES'","'{-# SCC'","'{-# DEPRECATED'","'{-# WARNING'","'{-# UNPACK'","'{-# NOUNPACK'","'{-# ANN'","'{-# MINIMAL'","'{-# CTYPE'","'{-# OVERLAPPING'","'{-# OVERLAPPABLE'","'{-# OVERLAPS'","'{-# INCOHERENT'","'{-# COMPLETE'","'#-}'","'..'","':'","'::'","'='","'\\\\'","'lcase'","'lcases'","'|'","'<-'","'->'","'->.'","TIGHT_INFIX_AT","'=>'","'-'","PREFIX_TILDE","PREFIX_BANG","PREFIX_MINUS","'*'","'-<'","'>-'","'-<<'","'>>-'","'.'","PREFIX_PROJ","TIGHT_INFIX_PROJ","PREFIX_AT","PREFIX_PERCENT","'{'","'}'","vocurly","vccurly","'['","']'","'('","')'","'(#'","'#)'","'(|'","'|)'","';'","','","'`'","SIMPLEQUOTE","VARID","CONID","VARSYM","CONSYM","QVARID","QCONID","QVARSYM","QCONSYM","DO","MDO","IPDUPVARID","LABELVARID","CHAR","STRING","INTEGER","RATIONAL","PRIMCHAR","PRIMSTRING","PRIMINTEGER","PRIMWORD","PRIMINTEGER8","PRIMINTEGER16","PRIMINTEGER32","PRIMINTEGER64","PRIMWORD8","PRIMWORD16","PRIMWORD32","PRIMWORD64","PRIMFLOAT","PRIMDOUBLE","'[|'","'[p|'","'[t|'","'[d|'","'|]'","'[||'","'||]'","PREFIX_DOLLAR","PREFIX_DOLLAR_DOLLAR","TH_TY_QUOTE","TH_QUASIQUOTE","TH_QQUASIQUOTE","%eof"]+ bit_start = st Prelude.* 492+ bit_end = (st Prelude.+ 1) Prelude.* 492+ read_bit = readArrayBit happyExpList+ bits = Prelude.map read_bit [bit_start..bit_end Prelude.- 1]+ bits_indexed = Prelude.zip bits [0..491]+ token_strs_expected = Prelude.concatMap f bits_indexed+ f (Prelude.False, _) = []+ f (Prelude.True, nr) = [token_strs Prelude.!! nr]++happyActOffsets :: HappyAddr+happyActOffsets = HappyA# "\x91\x00\x3c\x00\xc4\x00\xf2\x1e\x74\x11\x03\x22\x03\x22\xd0\x18\xf2\x1e\xc4\x49\xe9\x35\x95\x00\x2f\x00\xc6\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x71\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x03\x00\x00\x00\x00\x00\x00\x0f\x01\x00\x00\x8b\x02\x8b\x02\x00\x00\x79\x00\x04\x01\x04\x01\x9e\x3b\xe9\x35\xe2\x00\x3f\x01\x52\x01\x00\x00\x2b\x0d\x00\x00\x4e\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x81\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\x0b\x00\x00\x8c\x0c\x00\x00\x00\x00\x00\x00\x00\x00\xc1\x62\x00\x00\x00\x00\x00\x00\xbc\x01\x05\x02\x00\x00\x00\x00\x21\x3c\x21\x3c\x00\x00\x00\x00\x01\x62\x5a\x34\xc3\x31\x48\x32\xf5\x4c\x2b\x4a\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\x30\x00\x00\x00\x00\xb9\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x61\x08\xf8\x02\x93\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xca\x0d\x00\x00\x03\x22\x69\x0e\x00\x00\xf5\x00\x00\x00\x00\x00\x00\x00\xa3\x02\x69\x02\x00\x00\x00\x00\x10\x0a\x00\x00\x00\x00\xc2\x02\x00\x00\x00\x00\x00\x00\x03\x22\xb8\x1d\xfc\x02\x81\x2f\x52\x03\x81\x2f\xf7\xff\x88\x27\xaa\x2d\x81\x2f\x81\x2f\x81\x2f\xe1\x1b\x22\x15\x96\x17\x81\x2f\x61\x4b\x52\x03\x52\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\x03\x22\x25\x28\xe9\x35\xb6\x03\x03\x22\x1e\x30\xaf\x0a\xa1\x02\x00\x00\x9f\x02\x92\x0f\xb7\x02\xe2\x02\x00\x00\x00\x00\x00\x00\xeb\x03\xdb\x02\x94\x4b\xc6\x4d\x2a\x4d\x56\x4d\xc6\x4d\x2d\x60\x23\x03\x22\x15\x00\x00\xae\x02\xae\x02\xae\x02\x00\x00\x00\x00\x00\x00\x00\x00\x14\x03\x57\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x10\x9e\x3b\x5a\x00\x07\x03\x02\x03\xcf\x04\x5c\x03\x50\x33\x53\x02\x8a\x60\xf9\x02\xb6\x60\x39\x00\x01\x60\x15\x03\x00\x00\x15\x03\x87\x03\x30\x03\x1c\x03\x30\x03\x00\x00\x00\x00\x1c\x03\x00\x00\x74\x03\x77\x03\x04\x02\x00\x00\x00\x00\x76\x00\x04\x02\xc6\x03\xaf\x03\x81\x2f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x2f\x06\x02\xc5\x02\xb6\x60\x6b\x01\x00\x00\x7b\x03\x73\x01\x00\x00\x9d\x00\x9b\x03\x78\x01\x00\x00\xc2\x28\xd4\x02\xc8\x61\xd8\x03\x6d\x00\x16\x02\x00\x00\xb8\x06\xb8\x06\xf0\xff\xdf\x03\xfb\x03\x1b\x00\x00\x00\x07\x39\x9e\x3b\x21\x02\xe9\x35\xe8\x03\xed\x03\xf2\x03\xfd\x03\x00\x00\x3c\x04\x00\x00\x00\x00\x00\x00\xe9\x35\xe9\x35\x9e\x3b\x06\x04\x27\x04\x00\x00\x90\x03\x00\x00\x03\x22\x00\x00\x00\x00\xe9\x35\x90\x4a\x1f\x04\x9e\x3b\x03\x04\x49\x04\x5c\x04\xda\x00\x94\x01\x38\x04\x00\x00\x5f\x29\x00\x00\x00\x00\x00\x00\x42\x04\x45\x04\x4a\x04\x54\x04\x6d\x19\x7e\x1c\x00\x00\xaa\x2d\x3e\x4f\x00\x00\x00\x00\x90\x4a\x4b\x04\x84\x04\x41\x01\x8c\x04\x00\x00\x99\x04\x00\x00\x7e\x04\x00\x00\xf9\x4d\x2d\x00\xc6\x4d\x00\x00\x26\x01\xc6\x4d\xe9\x35\xaa\x04\xf6\x4b\x8d\x04\x00\x00\xf9\x04\x0a\x1a\x0a\x1a\x01\x62\xe9\x35\x9b\x07\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x04\x73\x27\xa5\x01\x00\x00\x00\x00\x82\x04\x95\x04\x00\x00\x00\x00\xa4\x04\x4f\x02\xbc\x04\x00\x00\xf2\x1e\xf2\x1e\x00\x00\x00\x00\x00\x00\x13\x05\x00\x00\xd7\x01\xf7\x04\x00\x00\x00\x00\xa7\x1a\x00\x00\xd5\x04\x54\x01\x03\x05\x05\x05\x00\x00\x00\x00\x00\x00\x00\x00\x08\x0f\x00\x00\x81\x2f\x31\x05\x0c\x04\x29\x04\x47\x05\x4a\x05\x00\x00\x00\x00\x50\x05\x9b\x05\x3d\x05\x30\x00\x00\x00\x00\x00\xa0\x22\x6c\x05\xad\x05\x81\x2f\x3d\x23\x3e\x4f\x93\x4d\x00\x00\x21\x3c\x00\x00\xe9\x35\x3d\x23\x3d\x23\x3d\x23\x3d\x23\x57\x05\x5d\x05\x82\x03\x6d\x05\x7c\x05\xd5\x02\x8c\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x35\xd5\x33\xc9\x4c\xb9\x05\xc2\x05\x6f\x00\xb2\x05\xd2\x05\x97\x03\x15\x00\x00\x00\x8d\x03\xbb\x30\x9e\x03\xd9\x05\x00\x00\x2f\x02\x00\x00\x9f\x00\xe1\x05\x00\x00\xe0\x05\x00\x00\x71\x02\x00\x00\x67\x4c\x00\x00\x00\x00\x00\x00\xe6\x01\xc1\x62\x00\x00\x00\x00\x21\x63\x21\x63\xe9\x35\x21\x3c\x00\x00\x9e\x3b\x00\x00\x21\x3c\x14\x06\xe9\x35\xe9\x35\x21\x3c\xe9\x35\xe9\x35\x00\x00\x00\x00\xb9\x02\x00\x00\x3f\x47\x31\x00\x00\x00\xfa\x05\x04\x02\x04\x02\x00\x00\x03\x06\x9d\x00\x63\x06\x0b\x06\x00\x00\x00\x00\x70\x06\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x06\x6d\x06\xfb\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x35\x00\x00\x00\x00\x00\x00\x00\x00\x44\x06\x79\x01\x00\x00\x00\x00\x00\x00\x22\x06\x01\x62\x00\x00\xe9\x35\x01\x62\x00\x00\xe9\x35\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x35\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x35\xe9\x35\x00\x00\x00\x00\x2b\x06\x27\x06\x36\x06\x39\x06\x46\x06\x48\x06\x5f\x06\x76\x06\x7a\x06\x5d\x06\x6f\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\x82\x06\x00\x00\x79\x06\xa4\x06\x96\x06\x9b\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x04\x61\x01\xa1\x06\x8f\x06\x00\x00\x00\x00\x00\x00\xed\x06\x00\x00\x3d\x23\x3d\x23\x00\x00\x00\x00\x00\x00\xfc\x29\x45\x10\x00\x00\x55\x1e\xa7\x0f\x3d\x23\x00\x00\x1b\x1d\x00\x00\x3d\x23\x8f\x1f\x1b\x1d\x00\x00\x9e\x06\x00\x00\x00\x00\x00\x00\x33\x18\xc3\x06\x00\x00\x47\x2e\x48\x00\x00\x00\xc7\x02\x00\x00\x00\x00\x00\x00\x00\x00\x74\x11\x76\x00\xba\x06\x00\x00\x00\x00\x00\x00\xbd\x06\x00\x00\xa9\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x61\x00\x00\x00\x00\xee\x00\x84\x00\x00\x00\x00\x00\x0e\x15\x00\x00\xbf\x15\x5c\x16\xa6\x00\x00\x00\xf9\x16\xdf\x02\xe8\x02\xdb\x02\xdd\x06\x00\x00\x00\x00\x00\x00\x00\x00\xe2\x06\xeb\x06\xb9\x06\x00\x00\x00\x00\xd9\x06\x00\x07\x00\x00\x05\x07\xe6\x06\xe9\x06\x13\x61\x13\x61\x00\x00\x12\x07\xba\x03\xc0\x04\xec\x06\xf5\x06\x00\x00\x19\x07\xfe\x06\x76\x04\x00\x00\x00\x00\x3e\x4f\x00\x00\x3d\x23\x1b\x1d\xbf\x00\xe8\x04\x8c\x39\xe2\x03\x00\x00\x00\x00\x3d\x23\x00\x00\x00\x00\x2c\x00\x00\x00\x3d\x23\xda\x23\x9e\x3b\x5a\x07\x00\x00\x43\x07\x2a\x07\x00\x00\x00\x00\x50\x07\xcf\x04\x00\x00\x00\x00\x00\x00\x00\x00\x85\x07\x13\x00\xa1\x04\x10\x05\x00\x00\x54\x07\xc1\x62\xe9\x35\xe9\x35\x21\x02\x4a\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x46\x3e\x4f\x41\x07\xe9\x35\x00\x00\x3e\x4f\x01\x62\x77\x24\x77\x24\x99\x2a\x00\x00\x7a\x01\x00\x00\x39\x07\x3f\x61\x00\x00\x42\x07\x00\x00\x00\x00\x3f\x61\x00\x00\x00\x00\x3d\x00\x9d\x00\x00\x00\x81\x2f\x49\x02\x82\x07\x83\x07\x00\x00\xb7\x07\x00\x00\x63\x07\x00\x00\x63\x07\x00\x00\x00\x00\xc3\x07\x00\x00\x5f\x07\x00\x00\x74\x11\xbe\x07\x6e\x01\xc5\x07\x5e\x07\x00\x00\x00\x00\x00\x00\x75\x07\x9e\x07\x00\x00\x00\x00\x00\x00\x63\x02\x00\x00\x00\x00\x00\x00\x19\x01\x80\x07\x36\x2b\x2d\x62\xd2\x07\x00\x00\x87\x07\x7d\x07\x00\x00\x00\x00\x86\x07\x00\x00\x13\x47\x00\x00\xae\x07\xb0\x07\xb2\x07\xb3\x07\x61\x62\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x07\xe9\x35\xaf\x07\xe9\x35\xc1\x62\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x04\xe9\x35\xe9\x35\x00\x00\x00\x00\xe9\x35\x8f\x07\x00\x00\xb3\x4f\x00\x00\xd8\x04\x00\x00\xb6\x07\xeb\x07\x00\x00\x00\x00\xe7\x04\x00\x00\x87\x05\xbf\x07\x00\x00\xc1\x62\xec\x07\x00\x08\xe9\x35\xfa\x07\x00\x00\xd0\x07\x00\x00\x00\x00\x00\x00\xcb\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x35\x00\x00\xb4\x07\xe9\x35\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x07\x00\x00\x44\x1b\x77\x24\x00\x00\x00\x00\xe9\x35\x9b\x07\x00\x00\x00\x00\xbd\x07\x00\x00\x2c\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\xea\x00\x00\x00\x00\x00\x14\x25\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x04\x00\x00\x76\x00\xc0\x07\x00\x00\xc9\x20\xbc\x07\x00\x00\x2d\x04\x00\x00\x76\x00\xc1\x07\x00\x00\xe4\x2e\xcd\x07\x00\x00\x00\x00\x00\x00\xb1\x25\x4e\x26\xeb\x26\x00\x00\x00\x00\x3e\x4f\x1b\x1d\x93\x4d\x00\x00\x00\x00\xe9\x35\x00\x00\x00\x00\xe5\x07\x00\x00\xd1\x07\xcf\x07\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x35\x00\x00\xe9\x35\x00\x00\xcb\x5f\x00\x00\x00\x00\x00\x00\xeb\x04\x00\x00\x1e\x08\x75\x01\xf3\x07\x25\x08\x19\x05\x00\x00\xf6\x07\x19\x05\x00\x00\x28\x02\x28\x02\x00\x00\xd4\x07\xdc\x07\x00\x00\x00\x00\xd9\x07\x00\x00\x00\x00\xc7\x01\x00\x00\x00\x00\x00\x00\xd5\x07\x00\x00\x00\x00\xd3\x2b\x00\x00\x00\x00\x2f\x08\xf8\x07\xeb\x26\x00\x00\x00\x00\xeb\x26\x00\x00\x00\x00\x21\x08\x11\x12\x66\x21\x66\x21\xeb\x26\x00\x00\xe2\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfd\x07\xe4\x07\x0b\x08\x00\x00\x0e\x08\x00\x00\x07\x08\x00\x00\x9e\x3b\xc1\x62\x00\x00\x00\x00\x51\x08\x00\x00\xf3\x01\x51\x08\x59\x05\xfe\x07\x9e\x3b\x41\x08\x57\x08\x00\x00\x00\x00\xeb\x26\x00\x00\xae\x12\xae\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x13\x4b\x13\x00\x00\x00\x00\x00\x00\x47\x08\x21\x63\x00\x00\x9e\x3b\x15\x08\xe9\x35\x00\x00\x00\x00\x61\x62\x00\x00\x00\x00\x75\x05\x03\x08\x8d\x62\x00\x00\x3e\x4f\xb7\x04\x00\x00\x00\x00\xfb\x07\x00\x00\xed\x07\x00\x00\x00\x00\x19\x04\x00\x00\x80\x05\x02\x08\xf2\x07\x00\x00\xf8\x4a\x75\x01\x63\x08\x00\x00\x80\x05\x01\x08\x00\x00\x04\x08\x00\x00\x04\x08\x00\x00\x00\x00\x00\x00\x75\x01\x28\x08\x08\x08\x00\x00\x00\x00\x00\x00\x00\x00\x19\x04\x21\x02\xc0\x04\x32\x07\x1e\x00\x00\x00\x00\x00\x5e\x08\x00\x00\x00\x00\xeb\x26\x33\x08\x00\x00\x70\x2c\x44\x1b\x44\x1b\x00\x00\x00\x00\xe9\x35\x39\x08\x00\x00\x34\x08\x00\x00\xa5\x05\x00\x00\x77\x08\x00\x00\xdc\x00\x00\x00\x00\x00\x00\x00\x77\x08\xfa\x02\x00\x00\x21\x63\x00\x00\x00\x00\x0a\x01\x00\x00\x67\x08\x0d\x2d\xdf\x34\x19\x03\x00\x00\x00\x00\x83\x08\x00\x00\x9e\x3b\xd3\x04\xd3\x04\x00\x00\xa4\x02\x60\x08\x00\x00\x00\x00\x00\x00\x00\x00\x64\x35\x00\x00\x36\x08\x43\x08\x00\x00\x44\x08\x00\x00\x81\x08\x00\x00\x00\x00\xe9\x35\x00\x00\x00\x00\x00\x00\x00\x00\xeb\x26\xeb\x26\xeb\x26\x00\x00\x00\x00\x00\x00\x00\x00\x93\x08\x1b\x1d\x3e\x4f\x00\x00\x00\x00\x00\x00\x22\x01\x00\x00\x66\x08\x19\x04\x5f\x47\x44\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x02\x32\x08\x3d\x08\x93\x47\xd1\x05\x19\x04\x00\x00\x00\x00\x00\x00\xeb\x26\x00\x00\x00\x00\x7a\x08\x00\x00\x00\x00\x9e\x3b\x00\x00\x37\x08\x3c\x08\x00\x00\x00\x00\x00\x00\x76\x00\x3a\x08\xdb\x02\x4b\x08\x5d\x08\x00\x00\x00\x00\x00\x00\xe8\x13\x00\x00\xf0\x05\x11\x3a\x9e\x3b\x82\x17\x9e\x3b\x00\x00\x00\x00\x00\x00\x85\x14\x11\x3a\x00\x00\x00\x00\x6a\x08\x00\x00\x6e\x36\xf3\x36\x21\x63\x78\x37\x00\x00\x53\x01\x55\x03\x8d\x62\x78\x37\x00\x00\xb2\x08\x00\x00\x52\x08\x53\x08\x56\x08\x00\x00\x00\x00\x00\x00\x00\x00\x29\x4c\x00\x00\x85\x08\x76\x00\x69\x08\x00\x00\x00\x00\x00\x00\x64\x08\x62\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x19\x04\x6b\x08\x72\x08\x00\x00\x00\x00\x00\x00\x21\x63\x00\x00\x58\x01\x00\x00\x76\x00\x56\x03\x70\x08\x96\x3a\x00\x00\x00\x00\x8e\x08\x78\x37\x10\x06\x00\x00\x00\x00\x78\x37\xfd\x37\x00\x00\x9e\x3b\x00\x00\x94\x08\xd3\x04\x00\x00\x00\x00\x82\x38\x00\x00\x00\x00\xeb\x26\x00\x00\x26\x06\x58\x08\x00\x00\x19\x04\x00\x00\x19\x04\x00\x00\xa5\x03\x00\x00\xe4\x08\x8a\x02\x00\x00\x0d\x00\xd2\x08\x84\x08\x00\x00\x00\x00\x00\x00\x82\x38\x00\x00\x9d\x08\xe3\x10\xcd\x32\x00\x00\x00\x00\xed\x62\x00\x00\x00\x00\x2d\x06\x00\x00\x00\x00\x1b\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x08\xbc\x4a\x29\x4c\x00\x00\x00\x00\x90\x08\x91\x08\x7e\x08\x00\x00\x19\x04\xc0\x04\x00\x00\xbc\x4a\x00\x00\xe3\x08\xf7\x08\x3e\x31\x21\x63\x00\x00\xe7\x08\xbc\x05\xad\x2f\x19\x04\x00\x00\x19\x04\x19\x04\x00\x00\x19\x04\x00\x00\x00\x00\x00\x00\x8b\x08\xb6\x08\x00\x00\x19\x04\x00\x00\xbc\x05\x00\x00\x00\x00\x00\x09\xa7\x08\x00\x00\x00\x00\x2d\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x08\x19\x04\x00\x00\x00\x00\x00\x00\x00\x00"#++happyGotoOffsets :: HappyAddr+happyGotoOffsets = HappyA# "\x8f\x03\x0a\x09\xee\x08\xe0\x53\x72\x01\x80\x57\xae\x56\xc9\x05\x28\x54\x01\x00\x05\x40\x0b\x01\xb3\x01\x88\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\xc7\x05\x00\x00\x00\x00\x5a\x01\x00\x00\x00\x00\xef\x07\xf0\x07\xf2\x01\x00\x00\x7d\x06\x88\x06\xde\x3a\xdb\x42\x00\x00\x00\x00\x00\x00\x00\x00\x92\x08\x00\x00\xee\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\xff\xb1\x00\x00\x00\x00\x00\x9b\xff\x3d\x40\xf9\x07\x91\x07\x4e\xff\x10\x3c\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\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\xde\x05\xfc\x07\xab\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x10\x00\x00\xc6\x57\x0d\x64\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x92\x55\x1c\x06\x1e\x64\x40\x08\x57\x64\x00\x00\x8a\x63\x17\x07\x90\x64\xa1\x64\xda\x64\x69\x4f\x0a\x4e\xf4\x4e\x13\x65\xe9\x11\x46\x08\x48\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\x52\x58\x98\x62\x71\x40\x54\x08\x98\x58\x21\x66\x4d\x05\xf5\x08\x00\x00\x00\x00\xac\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x06\x0c\x02\x02\x06\xa8\x03\x12\x06\x38\x06\x51\x04\x29\x08\x03\x02\x7f\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x02\x08\x01\x00\x00\x00\x00\x7c\x06\xed\x08\x00\x00\x48\x03\xae\x08\xa0\xff\xcd\x06\x2c\x01\x97\x05\xb1\x07\x00\x00\x00\x00\x00\x00\x08\x09\x00\x00\x11\x08\x00\x00\x7d\x01\x00\x00\x14\x08\xf5\x01\x00\x00\x45\x02\x31\x09\x00\x00\x00\x00\x1d\x08\x38\x09\x1e\x09\x00\x00\x24\x65\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x65\x93\x01\x35\x03\xb0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\x08\x00\x00\x00\x00\x00\x00\x37\x05\x00\x00\xa7\xff\x00\x00\x67\xff\xb3\x03\x00\x00\xc8\x08\xca\x08\x00\x00\x00\x00\xbc\x08\x00\x00\x00\x00\x43\x05\x2d\x08\x77\x02\xc7\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb5\x38\x67\x3e\xd2\x44\xb0\x08\x00\x00\x00\x00\x71\x05\x00\x00\x81\x4d\x00\x00\x00\x00\x0a\x3d\xab\x04\xf9\x08\xf9\x06\x00\x00\x00\x00\x83\x12\x00\x00\xb7\x00\x00\x00\x00\x00\xa9\x62\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x4f\xb6\x50\x00\x00\x17\x07\xf6\x02\x00\x00\x00\x00\x89\x05\x00\x00\xcc\x08\xcb\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x06\x00\x00\x7d\x04\x00\x00\xe1\x08\xd6\x04\x18\x3c\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\xa8\x02\xf2\x02\xef\xff\x1d\x3d\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x01\xf1\x04\x00\x00\x00\x00\x00\x00\x00\x00\xf9\xff\x09\x00\x00\x00\x20\x13\x00\x00\x00\x00\x70\x54\xb8\x54\x00\x00\x00\x00\x00\x00\xde\x05\x95\x08\xb7\x00\x00\x00\x00\x00\x00\x00\xd8\x4f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x65\x00\x00\x9b\x63\x00\x00\x2c\x08\x2e\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x08\x58\xff\x00\x00\x00\x00\xff\x54\x53\x05\x00\x00\xa7\x65\xde\x58\x16\x03\x8a\x01\x00\x00\xe1\x02\x00\x00\x1f\x43\x24\x59\x6a\x59\xb0\x59\xf6\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\x00\xaf\x3e\xe6\x07\x27\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\x74\x04\x00\x00\x18\x08\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x52\x02\x6e\x02\x32\x43\x1c\x05\x00\x00\xea\x45\x00\x00\x25\x05\x00\x00\x76\x43\x89\x43\xfd\x05\xcd\x43\x92\x40\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x35\x08\x00\x00\xb3\x02\x50\x09\x52\x09\x00\x00\x49\x09\xe8\x08\xef\x08\x4e\x09\x00\x00\x00\x00\x41\x09\x00\x00\x00\x00\x00\x00\x00\x00\x72\x09\x00\x00\x6c\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\xe0\x43\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xff\x00\x00\x24\x44\x63\x01\x00\x00\xce\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x69\x3f\x9d\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\x49\x08\x96\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x5a\x82\x5a\x00\x00\x00\x00\x00\x00\x3a\x48\xf3\x47\x00\x00\x1e\x47\xd4\x46\xc8\x5a\x00\x00\x25\x51\x00\x00\x0e\x5b\x50\x53\x94\x51\x00\x00\x5b\xff\x00\x00\x00\x00\x00\x00\x47\x50\x00\x00\x00\x00\xd4\x63\x4d\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x02\x5b\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\xa6\x02\x00\x00\x00\x00\x00\x00\x6e\x08\x00\x00\x00\x00\x6c\x02\x00\x00\x00\x00\x00\x00\x6f\x08\x00\x00\x00\x00\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\xfc\x14\x20\x10\x00\x00\x00\x00\x4c\x06\x7a\x02\x00\x00\x00\x00\x00\x00\x50\x06\x00\x00\x20\x13\x00\x00\x00\x00\x60\x03\x00\x00\x81\x4d\x03\x52\x00\x00\xdf\xff\x3e\x07\x00\x00\x00\x00\x00\x00\xc4\x4d\x00\x00\x00\x00\xde\xff\x00\x00\x54\x5b\x46\x55\xe5\x44\x0f\x09\xa1\x05\x29\x09\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x09\x00\x00\x00\x00\x00\x00\x00\x00\x15\x09\x45\x06\x4e\x06\x3f\x09\x00\x00\x00\x00\xf3\x00\xa5\x40\xbf\x39\x16\x04\x93\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\xff\x45\x03\x7b\x08\x61\x3d\x00\x00\xbf\xff\xca\xff\xf4\x56\x3a\x57\x2b\x09\x00\x00\x2e\x09\x00\x00\x2d\x09\xa6\x05\x00\x00\x24\x09\x00\x00\x00\x00\xb2\x01\x00\x00\x00\x00\xc0\x05\x26\x09\x00\x00\xe0\x65\x99\x08\x00\x00\x00\x00\x00\x00\x7a\x09\x00\x00\x8e\x09\x00\x00\x91\x09\x00\x00\x00\x00\x1a\x03\x00\x00\x87\x09\x00\x00\x27\x01\x00\x00\x64\x05\x00\x00\x81\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\x14\x63\xb0\xff\x4b\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd9\x40\x69\x09\x42\x41\x77\x00\x00\x00\x53\x09\x00\x00\x00\x00\x00\x00\x00\x00\x44\x09\x5c\x3c\x71\x41\x00\x00\x00\x00\x93\x41\x00\x00\x00\x00\x7f\x02\x00\x00\x4a\x09\x00\x00\x00\x00\x48\x09\x00\x00\x00\x00\x11\x07\x00\x00\xfb\xff\x00\x00\x00\x00\x30\x01\x14\x09\x04\x06\xda\x41\x98\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\x6f\x3c\x00\x00\x00\x00\xb3\x3c\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x06\x00\x00\xb7\x05\x9a\x5b\x00\x00\x00\x00\x74\x3d\xbb\x04\x00\x00\x00\x00\xa6\x09\x00\x00\xda\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x06\x00\x00\xe5\x08\x00\x00\x00\x00\x67\x47\x00\x00\x00\x00\x4f\x06\x00\x00\xe6\x08\x00\x00\x00\x00\x80\x48\x00\x00\x00\x00\x00\x00\x00\x00\x26\x5c\x68\x56\x6c\x5c\x00\x00\x00\x00\x46\x01\x72\x52\x9b\x01\x00\x00\x00\x00\xb0\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x42\x00\x00\x43\x42\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\xc8\x09\x00\x00\x00\x00\x8f\x09\x00\x00\x00\x00\xff\x09\x00\x00\x00\x00\x00\x0a\x00\x00\x79\x07\x9a\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\x55\x09\x00\x00\x00\x00\xaf\x48\x00\x00\x00\x00\xa7\x09\x39\x09\xb2\x5c\x00\x00\x00\x00\xb0\x47\x00\x00\x00\x00\x00\x00\x00\x00\x97\x53\x21\x56\xf8\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\x00\x00\x00\x00\x7b\x44\x67\x01\x00\x00\x00\x00\x6a\x09\x00\x00\xc4\xff\xb4\x06\x00\x00\x00\x00\x29\x45\x76\x09\xc2\x06\x00\x00\x00\x00\x3e\x5d\x00\x00\x71\x03\xbb\x03\x00\x00\x7d\x09\x0b\x07\x00\x00\x00\x00\x00\x00\x00\x00\xcf\xff\x32\x02\x00\x00\x00\x00\x00\x00\xdb\x09\xba\xff\x00\x00\x3c\x45\x00\x00\xb8\x3d\x00\x00\x00\x00\xcd\xff\x00\x00\x00\x00\x00\x00\x00\x00\xbe\xff\x00\x00\x4c\x03\x20\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x09\x00\x00\x22\x0a\x00\x00\x00\x00\x00\x00\x50\x00\xb9\x09\xc5\x09\x00\x00\x2f\x0a\x1c\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x02\x9c\x02\xc3\x09\x00\x00\x24\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x19\x09\x56\x04\xfe\x02\x17\x06\x95\x07\x00\x00\x00\x00\x18\x0a\x00\x00\x00\x00\x84\x5d\x00\x00\x00\x00\x00\x00\xfb\x04\x45\x05\x00\x00\x00\x00\xcb\x3d\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x09\x00\x00\xf8\x09\x00\x00\x20\x09\x00\x00\x00\x00\x00\x00\xfd\x09\x00\x00\x00\x00\x7f\x02\x00\x00\x00\x00\x21\x09\x00\x00\x01\x0a\x25\x63\x05\x06\x00\x00\x00\x00\x00\x00\xc6\x06\x00\x00\x8e\x44\x55\x01\x15\x02\x00\x00\x80\xff\x09\x0a\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x07\x00\x00\x00\x00\xc6\x3c\x00\x00\x00\x00\x00\x00\x00\x00\xca\x5d\x10\x5e\x56\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe1\x52\xd3\x03\x00\x00\x00\x00\x00\x00\x27\x09\x00\x00\x26\x0a\x23\x09\x0e\x00\x00\x00\x00\x00\xdc\x02\xee\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x0a\x53\x0a\x00\x00\x14\x00\x4e\x0a\x45\x09\x00\x00\x00\x00\x00\x00\x9c\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x09\x00\x00\xdb\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x89\x04\x00\x00\x57\x0a\x64\x06\x80\x45\x20\x13\x93\x45\x00\x00\x00\x00\x00\x00\x3f\x04\x92\x06\x00\x00\x00\x00\x55\x0a\x00\x00\x87\x04\xde\x04\xbd\xff\x77\x42\x00\x00\x85\x09\x00\x00\xd4\xff\x37\x44\x00\x00\x86\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x8b\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\x8a\x07\x8c\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x02\x00\x00\x92\x09\x00\x00\x96\x09\x00\x00\x00\x00\x59\x07\x00\x00\x00\x00\x62\x0a\x0f\x3e\x65\x0a\x00\x00\x00\x00\x8a\x42\xd1\x3f\x00\x00\xd7\x45\x00\x00\x00\x00\x20\x02\x00\x00\x00\x00\x8d\x34\x00\x00\x00\x00\xe2\x5e\x00\x00\xa8\x0a\xa9\x0a\x00\x00\xff\xff\x00\x00\xf5\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x0a\x00\x00\x00\x00\x00\x00\x22\x3e\x00\x00\x00\x00\x00\x00\x4e\x08\x00\x00\x00\x00\x9d\xff\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\xb5\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf1\xff\x2e\x00\x00\x00\x00\x00\xb7\x0a\x00\x00\x00\x00\x00\x00\xac\x09\x41\x03\x00\x00\x3a\x00\x00\x00\x38\x0a\xe1\x06\x00\x00\xbc\xff\x00\x00\x00\x00\xce\x0a\x08\x00\xb5\x09\x00\x00\x02\x00\xb6\x09\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x09\x00\x00\xd2\x0a\x00\x00\x00\x00\xfa\x06\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x09\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\xfd\x00\x00\x00\x00\xbf\xff\xc0\xff\x00\x00\xf2\xff\x09\xfd\x05\xfd\x02\xfd\xf2\xfc\xf0\xfc\xf1\xfc\xfe\xfc\xef\xfc\xee\xfc\xed\xfc\x00\xfd\xff\xfc\x01\xfd\xfd\xfc\xfc\xfc\xec\xfc\xeb\xfc\xea\xfc\xe9\xfc\xe8\xfc\xe7\xfc\xe6\xfc\xe5\xfc\xe4\xfc\xe3\xfc\xe1\xfc\xe2\xfc\x00\x00\x03\xfd\x04\xfd\x8c\xff\x00\x00\xb1\xff\x00\x00\x00\x00\x8c\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\xfe\x00\x00\x85\xfe\x83\xfe\x7e\xfe\x7d\xfe\x79\xfe\x7a\xfe\x63\xfe\x62\xfe\x00\x00\x70\xfe\x3d\xfd\x74\xfe\x37\xfd\x2e\xfd\x31\xfd\x2a\xfd\x6f\xfe\x73\xfe\x12\xfd\x0f\xfd\x59\xfe\x4d\xfe\x0d\xfd\x0c\xfd\x0e\xfd\x00\x00\x00\x00\x27\xfd\x26\xfd\x00\x00\x00\x00\x6e\xfe\x25\xfd\x30\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\xfd\x2d\xfd\x28\xfd\x29\xfd\x58\xfe\x2f\xfd\x2b\xfd\x2c\xfd\x66\xfd\x5b\xfe\x5a\xfe\x5c\xfe\x00\x00\x06\xfe\x05\xfe\x00\x00\xf1\xff\x55\xfd\x46\xfd\x54\xfd\xef\xff\xf0\xff\x16\xfd\xfa\xfc\xfb\xfc\xf6\xfc\xf3\xfc\x53\xfd\xde\xfc\x42\xfd\xdb\xfc\xd8\xfc\xed\xff\xf5\xfc\xdf\xfc\xe0\xfc\x00\x00\x00\x00\x00\x00\x00\x00\xdc\xfc\xf4\xfc\xd9\xfc\xdd\xfc\xf7\xfc\xda\xfc\xc3\xfd\x77\xfd\xff\xfd\xfd\xfd\x00\x00\xf8\xfd\xf0\xfd\xe1\xfd\xde\xfd\xcf\xfd\xce\xfd\x00\x00\x00\x00\x7d\xfd\x7a\xfd\xdb\xfd\xda\xfd\xdc\xfd\xdd\xfd\xd9\xfd\xfe\xfd\xd0\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x65\xfd\xd7\xfc\xd6\xfc\xd8\xfd\xd7\xfd\xcb\xfc\xca\xfc\xd5\xfc\xd4\xfc\xd3\xfc\xd2\xfc\xd1\xfc\xd0\xfc\xcf\xfc\xce\xfc\xcd\xfc\xcc\xfc\xc9\xfc\xc8\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc9\xfd\x70\xff\x14\xfe\x00\x00\x00\x00\x00\x00\x05\xfd\x6e\xff\x6d\xff\x6c\xff\x00\x00\x00\x00\x0a\xfe\x00\x00\x0a\xfe\x0a\xfe\x00\x00\x63\xfd\x00\x00\x00\x00\x89\xfd\x00\x00\x00\x00\x00\x00\x62\xff\x61\xff\x60\xff\x5f\xff\x05\xff\x00\x00\x5e\xff\x5d\xff\x1f\xfe\x57\xff\x56\xff\x21\xfe\x55\xff\x00\x00\x1c\xff\x00\x00\x3a\xff\x43\xff\x1b\xff\x00\x00\x00\x00\x00\x00\xca\xfe\xb0\xfe\xb9\xfe\x00\x00\x00\x00\x7b\xfd\x00\x00\x86\xff\x00\x00\x00\x00\x00\x00\x8c\xff\xc1\xff\x00\x00\x8c\xff\x00\x00\x89\xff\xbc\xff\xc5\xfc\xc4\xfc\x00\x00\xbc\xff\x84\xff\x00\x00\x00\x00\x58\xfd\x4f\xfd\x59\xfd\x0b\xfd\x51\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\xfe\x00\x00\x00\x00\xb1\xfe\x00\x00\x5b\xfd\x00\x00\xcb\xfe\xc8\xfe\x00\x00\x4e\xfd\x00\x00\x00\x00\x00\x00\x5b\xff\x00\x00\x00\x00\x00\x00\x00\x00\x83\xfe\x3d\xfd\x1a\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\xff\x00\x00\x3c\xff\x3e\xff\x3d\xff\x00\x00\x53\xfe\x00\x00\x47\xfe\x00\x00\x0c\xff\x00\x00\x1c\xfd\x00\x00\x1b\xfd\x1d\xfd\x00\x00\x00\x00\x05\xff\x00\x00\x00\x00\xb4\xfd\xff\xfd\x00\x00\x00\x00\x00\x00\x19\xfd\x00\x00\x18\xfd\x1a\xfd\x14\xfd\xf8\xfc\x00\x00\xf9\xfc\x42\xfd\x00\x00\x00\x00\xbe\xfc\xf5\xfc\x00\x00\x4a\xfd\xc2\xfc\x00\x00\x4c\xfd\x97\xfe\x00\x00\x00\x00\x64\xfd\x62\xfd\x60\xfd\x5f\xfd\x5c\xfd\x00\x00\x00\x00\x00\x00\x09\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\xfd\xd2\xfe\x00\x00\xd5\xfe\xd5\xfe\x00\x00\x00\x00\x00\x00\x6f\xff\xca\xfd\x40\xfd\xcb\xfd\x00\x00\x00\x00\x00\x00\xbc\xfd\xdd\xfd\x00\x00\x00\x00\x67\xff\x67\xff\x00\x00\x00\x00\x00\x00\xe3\xfd\x7e\xfd\x7e\xfd\xe4\xfd\xcc\xfd\xcd\xfd\x00\x00\xba\xfd\x00\x00\x00\x00\xf8\xfc\xf9\xfc\x00\x00\x48\xfd\x00\x00\xa8\xfd\x00\x00\xa7\xfd\x45\xfd\xec\xfd\xed\xfd\xee\xfd\xf9\xfd\x86\xfd\x84\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf1\xfd\x79\xfd\x00\x00\x76\xfd\xf6\xfd\x00\x00\xe6\xfd\x8d\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\xfd\xf3\xfd\x00\x00\xb5\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbd\xfd\x61\xfe\x57\xfd\x56\xfd\x72\xfe\x71\xfe\x5e\xfe\x1f\xfd\x53\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x52\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x68\xfe\x00\x00\x31\xfd\x00\x00\x00\x00\x6a\xfe\x00\x00\x38\xfd\x00\x00\x00\x00\x2f\xfe\x2d\xfe\x91\xfe\x00\x00\x6c\xfe\x00\x00\x6d\xfe\x8d\xfe\x8e\xfe\x00\x00\x4d\xfe\x4c\xfe\x49\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x78\xfe\x00\x00\x76\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\xfe\x7b\xfe\x00\x00\xe8\xff\x00\x00\x00\x00\xae\xff\x89\xff\xbc\xff\xbc\xff\xad\xff\xa8\xff\x00\x00\xb9\xfe\xa8\xff\xac\xff\xaa\xff\xab\xff\x8d\xff\xec\xff\xc6\xfc\xc7\xfc\xe9\xff\x00\x00\xd5\xff\xdc\xff\xd9\xff\xdb\xff\xda\xff\xdd\xff\xeb\xff\x40\xfe\x89\xfe\x87\xfe\x7f\xfe\x80\xfe\x82\xfe\x00\x00\x77\xfe\x7c\xfe\x75\xfe\x86\xfe\x00\x00\x00\x00\x4e\xfe\x8b\xfe\x8c\xfe\x00\x00\x00\x00\x6b\xfe\x00\x00\x00\x00\x65\xfe\x00\x00\x39\xfd\x3c\xfd\xc3\xfc\x36\xfd\x64\xfe\x00\x00\xbf\xfc\x3a\xfd\x3b\xfd\x66\xfe\x67\xfe\x00\x00\x00\x00\x11\xfd\x30\xfd\x00\x00\x00\x00\x27\xfd\x26\xfd\x6e\xfe\x25\xfd\x28\xfd\x29\xfd\x2c\xfd\x52\xfe\x00\x00\x54\xfe\xee\xff\x49\xfd\x52\xfd\x07\xfd\x47\xfd\x41\xfd\x15\xfd\x00\xfe\x01\xfe\x02\xfe\x03\xfe\x04\xfe\xf2\xfd\x00\x00\x75\xfd\x72\xfd\x6f\xfd\x00\x00\x05\xfd\x71\xfd\xdf\xfd\x06\xfd\x78\xfd\xef\xfd\x00\x00\x00\x00\x00\x00\x94\xfd\x92\xfd\x8e\xfd\x8b\xfd\x00\x00\xf7\xfd\x00\x00\x00\x00\xf5\xfd\xf4\xfd\xe8\xfd\x84\xfd\x00\x00\xe9\xfd\x00\x00\x00\x00\x00\x00\x85\xfd\x00\x00\xd1\xfd\xa6\xfd\x00\x00\x00\x00\x08\xfd\xaa\xfd\xaf\xfd\xd2\xfd\xb0\xfd\xa9\xfd\xae\xfd\xd3\xfd\x00\x00\x00\x00\x7f\xfd\x00\x00\xc8\xfd\xc5\xfd\xc6\xfd\xb5\xfd\xb6\xfd\x00\x00\x00\x00\xc4\xfd\xc7\xfd\x3e\xfd\x00\x00\x3f\xfd\x15\xfe\x21\xfd\x6a\xff\x22\xfd\x44\xfd\x20\xfd\x00\x00\x17\xfe\x93\xfe\x00\x00\x00\x00\x1e\xfe\xd6\xfe\x99\xfe\x1d\xfe\xbf\xfd\xbe\xfd\x00\x00\x68\xfd\xdb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xee\xfe\xef\xfe\x11\xfe\x57\xfe\x00\x00\x00\x00\x00\x00\xc6\xfe\xc5\xfe\x00\x00\x00\x00\x10\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xfd\xc0\xfc\x08\xfd\xb2\xfd\xd5\xfd\xd6\xfd\x00\x00\xd4\xfd\xb3\xfd\x00\x00\x00\x00\x17\xff\x00\x00\x93\xfe\xfc\xfd\xfb\xfd\x00\x00\xfa\xfd\x20\xfe\xce\xfe\x19\xfe\x00\x00\x00\x00\x00\x00\xe3\xfe\x42\xfe\x15\xff\x00\x00\x3f\xff\x95\xfe\x93\xfe\x43\xff\x44\xff\x45\xff\x47\xff\x46\xff\xd9\xfe\x02\xff\x00\x00\x13\xff\x4a\xff\x00\x00\x4d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xa3\xfe\xa2\xfe\xa1\xfe\xa0\xfe\x9f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xf9\xfe\xf6\xfe\x00\x00\x00\x00\x00\x00\xbf\xfe\xc7\xfe\x00\x00\x58\xff\xcc\xfe\x00\x00\xaf\xfe\xaa\xfe\xae\xfe\x5a\xff\xb2\xfe\xba\xfe\x59\xff\xb9\xfe\x00\x00\x24\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x87\xff\x80\xff\x85\xff\xa8\xff\xb8\xff\xa8\xff\xb7\xff\xb4\xff\x64\xff\xb9\xff\x8b\xff\xb5\xff\xb6\xff\x00\x00\x9c\xff\x00\x00\x82\xff\x81\xff\xa9\xfe\xa7\xfe\x00\x00\x00\x00\xb4\xfe\xb8\xfe\xb3\xfe\x00\x00\xab\xfe\x5a\xfd\xcd\xfe\x00\x00\x00\x00\x00\x00\xbd\xfe\xfb\xfe\xfc\xfe\x00\x00\xf4\xfe\xf5\xfe\xf0\xfe\x00\x00\xf8\xfe\x00\x00\xa5\xfe\x00\x00\x9d\xfe\x9c\xfe\x9e\xfe\x00\x00\xa4\xfe\x4d\xff\x4e\xff\x53\xff\x00\x00\x00\x00\x39\xff\x00\x00\x00\x00\x03\xff\x01\xff\x00\xff\xfd\xfe\xfe\xfe\x4b\xff\x00\x00\x00\x00\x00\x00\x5c\xff\x4f\xff\x00\x00\x46\xfe\x44\xfe\x00\x00\x54\xff\x00\x00\x0d\xff\x00\x00\xce\xfe\x1b\xfe\x1a\xfe\x00\x00\xb4\xfc\x17\xff\x00\x00\x08\xff\x4d\xfe\x3d\xfe\x2b\xfe\x00\x00\x32\xfe\x06\xff\x00\x00\xb1\xfd\xc1\xfd\xad\xfd\xc1\xfc\x17\xfd\x13\xfd\x4b\xfd\x96\xfe\x13\xfe\x61\xfd\x5e\xfd\x50\xfd\x5d\xfd\x0f\xfe\x00\x00\x08\xfe\x00\x00\x00\x00\x0c\xfe\x12\xfe\x4d\xfd\xd1\xfe\x69\xfd\xd4\xfe\xd7\xfe\x00\x00\xd0\xfe\xd3\xfe\x00\x00\x00\x00\xb8\xfd\xb7\xfd\x69\xff\x83\xfd\x80\xfd\x82\xfd\xb9\xfd\xbb\xfd\xc2\xfd\xac\xfd\xab\xfd\xb4\xfd\xa0\xfd\xa2\xfd\x9f\xfd\x9d\xfd\x9a\xfd\x99\xfd\x00\x00\xa4\xfd\xa1\xfd\xeb\xfd\x88\xfd\x00\x00\xb6\xfc\x00\x00\xb1\xfc\xaa\xfc\x00\x00\x00\x00\xb7\xfc\x00\x00\xba\xfc\x00\x00\xb3\xfc\xad\xfc\x84\xfd\x00\x00\xbb\xfc\xe2\xfd\xea\xfd\x00\x00\x00\x00\x00\x00\x8c\xfd\xe5\xfd\x00\x00\x00\x00\x00\x00\xe0\xfd\x5f\xfe\x00\x00\x1e\xfd\x51\xfe\x50\xfe\x4f\xfe\x00\x00\x00\x00\x92\xfe\x2c\xfe\x2e\xfe\x0a\xfd\x00\x00\x4b\xfe\x00\x00\x81\xfe\x00\x00\xd8\xff\xd7\xff\xd6\xff\x00\x00\xea\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbe\xff\x00\x00\x00\x00\xe7\xff\x00\x00\x00\x00\xd4\xff\x00\x00\x00\x00\x5d\xfe\x69\xfe\x00\x00\x73\xfd\x70\xfd\x6d\xfd\x6b\xfd\x8a\xfd\x93\xfd\xf6\xfd\xbd\xfc\xb2\xfc\xae\xfc\xbc\xfc\xa9\xfc\xce\xfe\x8f\xfd\x00\x00\xb9\xfc\xb0\xfc\xab\xfc\xb8\xfc\xa8\xfc\x98\xfd\xe7\xfc\x00\x00\x00\x00\xa5\xfd\x81\xfd\x68\xff\x8e\xff\x6b\xff\x16\xfe\x67\xfd\xd8\xfe\x6a\xfd\x00\x00\x90\xfe\x00\x00\x07\xfe\x00\x00\x07\xff\x38\xfe\x36\xfe\x00\x00\x4d\xfe\x16\xff\x51\xff\x2a\xfe\x28\xfe\x00\x00\x2b\xfe\x00\x00\x00\x00\x00\x00\x3d\xfe\x2b\xfe\xcf\xfe\x1c\xfe\x00\x00\xe4\xfe\xe7\xfe\xe7\xfe\x41\xfe\x42\xfe\x42\xfe\x14\xff\x94\xfe\x04\xff\xda\xfe\xdd\xfe\xdd\xfe\xff\xfe\x11\xff\x12\xff\x34\xff\x00\x00\x29\xff\x00\x00\x00\x00\x00\x00\xa6\xfe\x43\xfd\x00\x00\xf7\xfe\xfa\xfe\x00\x00\x00\x00\xbd\xfe\xbc\xfe\x00\x00\x00\x00\xc4\xfe\xc2\xfe\x00\x00\xad\xfe\x00\x00\xa8\xfe\x23\xfd\x00\x00\x83\xff\x00\x00\x00\x00\xa7\xff\xa2\xff\x00\x00\x00\x00\xb9\xfe\xa4\xff\x00\x00\x66\xff\x63\xff\x8a\xff\x8f\xff\x65\xff\xc2\xff\x8c\xff\x8c\xff\x00\x00\x00\x00\x9b\xff\x93\xff\x90\xff\x35\xfd\x91\xff\x00\x00\x00\x00\x00\x00\x00\x00\x9c\xff\xa9\xff\xc3\xff\x80\xff\xac\xfe\xc3\xfe\x00\x00\x00\x00\xbe\xfe\xc0\xfe\xd5\xfe\xd5\xfe\xf3\xfe\x9a\xfe\x00\x00\x00\x00\x38\xff\x00\x00\x52\xff\x00\x00\xe2\xfe\x21\xff\xde\xfe\x00\x00\xe1\xfe\x19\xff\x18\xff\x21\xff\x00\x00\x45\xfe\x43\xfe\xed\xfe\xe8\xfe\x00\x00\xec\xfe\x23\xff\x00\x00\x00\x00\x00\x00\x18\xfe\x49\xff\x2b\xfe\x09\xff\x00\x00\x3a\xfe\x3a\xfe\x50\xff\x00\x00\x27\xfe\x24\xfe\x40\xff\x42\xff\x41\xff\x00\x00\x29\xfe\x00\x00\x00\x00\x84\xfe\x31\xfe\x34\xfe\x32\xfe\x0d\xfe\x0e\xfe\x00\x00\xa3\xfd\x9c\xfd\x9b\xfd\x9e\xfd\x00\x00\x00\x00\x00\x00\xac\xfc\x90\xfd\x91\xfd\xaf\xfc\x00\x00\x00\x00\x00\x00\x60\xfe\x4a\xfe\x48\xfe\x00\x00\xc8\xff\x86\xff\x00\x00\x00\x00\x00\x00\xb2\xff\x8c\xff\x8c\xff\xbd\xff\xb3\xff\xaf\xff\xb0\xff\xcc\xff\xc9\xff\xd3\xff\xe6\xff\xe1\xfc\xbc\xff\x00\x00\xcb\xff\x6c\xfd\x6e\xfd\x00\x00\x97\xfd\x96\xfd\x00\x00\x8f\xfe\x37\xfe\x00\x00\x33\xfe\x56\xfe\x00\x00\x23\xfe\x25\xfe\x26\xfe\x00\x00\x3b\xfe\x00\x00\x00\x00\x00\x00\x0a\xff\x48\xff\xe6\xfe\xe9\xfe\x25\xff\x10\xff\x00\x00\x00\x00\x00\x00\x00\x00\x22\xff\xe5\xfe\xdc\xfe\xdf\xfe\x00\x00\x20\xff\xdb\xfe\x05\xff\x33\xff\x2b\xff\x2b\xff\x00\x00\x00\x00\x9b\xfe\x00\x00\x00\x00\xbd\xfe\x00\x00\xc9\xfe\x7e\xff\xa3\xff\x00\x00\x00\x00\x00\x00\x9f\xff\x92\xff\xa0\xff\xa1\xff\x99\xff\x9e\xff\x00\x00\x00\x00\x00\x00\xbb\xff\xba\xff\x9d\xff\x00\x00\x98\xff\x96\xff\x95\xff\x94\xff\x34\xfd\x33\xfd\x32\xfd\x7c\xff\x00\x00\x00\x00\x00\x00\xf2\xfe\xf1\xfe\x2a\xff\x37\xff\x35\xff\x00\x00\x2c\xff\x00\x00\x00\x00\x00\x00\x00\x00\x1f\xff\xe0\xfe\x15\xff\x00\x00\x10\xff\x24\xff\x27\xff\x00\x00\x00\x00\xea\xfe\x00\x00\x3f\xfe\x00\x00\x3a\xfe\x3e\xfe\x22\xfe\x00\x00\x31\xfe\x35\xfe\x00\x00\xe7\xfd\xbc\xff\xa8\xff\xc4\xff\x00\x00\xc5\xff\x00\x00\xca\xff\x00\x00\xcf\xff\xcd\xff\x00\x00\xe2\xff\x00\x00\x00\x00\xa8\xff\x95\xfd\x55\xfe\x3c\xfe\x00\x00\x0b\xff\x00\x00\x6f\xfe\x00\x00\x0f\xff\x26\xff\x00\x00\xeb\xfe\x28\xff\x17\xff\x30\xff\x32\xff\x2d\xff\x2f\xff\x31\xff\x36\xff\xc1\xfe\xbb\xfe\x7f\xff\x88\xff\x7d\xff\x00\x00\x78\xff\x00\x00\x9a\xff\x97\xff\x9b\xff\x00\x00\x79\xff\x74\xff\x00\x00\x00\x00\x76\xff\x78\xff\x2e\xff\x3d\xfe\x2b\xfe\x6f\xfe\x00\x00\x39\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe5\xff\xe3\xff\x00\x00\xd2\xff\xd0\xff\xd1\xff\xce\xff\xe4\xff\x00\x00\x00\x00\xe1\xff\x00\x00\xc6\xff\x00\x00\x0e\xff\x1e\xff\x2b\xfe\x00\x00\x71\xff\x72\xff\x77\xff\x7b\xff\x73\xff\x75\xff\x7a\xff\x1d\xff\xc7\xff\x00\x00\x00\x00\xe0\xff\xde\xff\xdf\xff"#++happyCheck :: HappyAddr+happyCheck = HappyA# "\xff\xff\x00\x00\x0d\x00\x0e\x00\x05\x00\x06\x00\x66\x00\x4d\x00\x06\x00\x4d\x00\x3b\x00\x4e\x00\x04\x00\x49\x00\x67\x00\x07\x00\x08\x00\x09\x00\x04\x00\x0b\x00\x01\x00\x0e\x00\x08\x00\x09\x00\x04\x00\x0b\x00\x29\x00\x2a\x00\x08\x00\x09\x00\x8b\x00\x0b\x00\x08\x00\x09\x00\x09\x00\x0b\x00\x0b\x00\x56\x00\x67\x00\x58\x00\x37\x00\x38\x00\x39\x00\x90\x00\x8a\x00\x8b\x00\x7e\x00\x7f\x00\x00\x00\x00\x00\x68\x00\xd8\x00\x65\x00\x68\x00\x3d\x00\x3e\x00\x59\x00\x6a\x00\xba\x00\x4b\x00\x7e\x00\x7f\x00\xe6\x00\x70\x00\x71\x00\x12\x00\x9e\x00\xa6\x00\x18\x00\x0c\x00\x3d\x00\x3e\x00\x00\x00\x0c\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xb4\x00\xb5\x00\xb6\x00\x7e\x00\x7f\x00\x59\x00\x77\x00\x28\x00\x29\x00\x2a\x00\x4c\x00\x3c\x00\x3d\x00\x09\x00\x59\x00\x10\x01\x11\x01\x49\x00\x71\x00\x33\x00\x29\x00\x2a\x00\x50\x00\x4b\x00\xc3\x00\x8b\x00\x52\x00\x10\x00\x74\x00\x1e\x01\x29\x00\x2a\x00\x33\x00\x09\x01\x37\x00\x38\x00\x39\x00\xd0\x00\x48\x00\x00\x00\x29\x01\x81\x00\x29\x00\x2a\x00\x21\x00\x50\x00\x39\x00\xba\x00\x90\x00\x50\x00\x48\x00\x6d\x00\x76\x00\x00\x00\x48\x00\x90\x00\x74\x00\x30\x01\x6b\x00\xbb\x00\xbc\x00\x71\x00\x32\x01\xaf\x00\xc0\x00\x10\x01\x11\x01\xc3\x00\x64\x00\xc5\x00\x2e\x01\xc7\x00\x67\x00\x67\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xbf\x00\xcf\x00\xd0\x00\xd1\x00\x70\x00\x3c\x00\x12\x00\x04\x01\x05\x01\x00\x00\x07\x01\x08\x01\x70\x00\xaf\x00\xb5\x00\xb6\x00\x70\x00\x81\x00\x67\x00\x0c\x01\x0d\x01\x1f\x01\xaf\x00\x10\x01\x11\x01\x23\x01\x4a\x00\x70\x00\x1c\x01\x1f\x01\x1e\x01\x29\x01\x6a\x00\x23\x01\x50\x00\x1c\x01\x1f\x01\x1e\x01\x23\x01\x29\x01\x23\x01\x29\x01\xf8\x00\xf9\x00\x29\x01\x23\x01\x29\x01\x2c\x01\x29\x01\xd5\x00\x0b\x00\x29\x01\x02\x01\x03\x01\x23\x01\x10\x01\x11\x01\x07\x01\x08\x01\x1e\x01\x29\x01\x1e\x01\x1e\x01\x00\x00\x67\x00\xd5\x00\x72\x00\x71\x00\x23\x01\x23\x01\x29\x01\x77\x00\x29\x01\x29\x01\x29\x01\x29\x01\x1f\x01\x4b\x00\x67\x00\x1f\x01\x23\x01\x1f\x01\x20\x01\x23\x01\x22\x01\x23\x01\x29\x01\x70\x00\x64\x00\x29\x01\x23\x01\x29\x01\x64\x00\x2b\x01\x2c\x01\x1f\x01\x29\x01\x2f\x01\x0e\x01\x23\x01\x10\x01\x11\x01\x02\x01\x03\x01\x68\x00\x29\x01\x48\x00\x07\x01\x08\x01\x00\x00\x0a\x01\x01\x00\x67\x00\x1f\x01\x00\x00\x71\x00\x20\x01\x23\x01\x22\x01\x23\x01\x1f\x01\x70\x00\x9e\x00\x29\x01\x23\x01\x29\x01\x1a\x01\xa5\x00\xa6\x00\x81\x00\x29\x01\x15\x00\x20\x01\x00\x00\x22\x01\x23\x01\x24\x01\x31\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x31\x01\x29\x01\x0e\x01\x31\x01\x10\x01\x11\x01\x32\x00\x29\x01\x31\x01\x4b\x00\x50\x00\x61\x00\x0e\x01\x29\x01\x10\x01\x11\x01\x81\x00\x29\x01\x29\x01\x67\x00\x20\x01\x6b\x00\x22\x01\x23\x01\x0e\x01\x6b\x00\x10\x01\x11\x01\x70\x00\x29\x01\x20\x01\x9e\x00\x22\x01\x23\x01\x0e\x01\x00\x00\x10\x01\x11\x01\x61\x00\x29\x01\x00\x00\x64\x00\x20\x01\x71\x00\x22\x01\x23\x01\x0e\x01\x71\x00\x10\x01\x11\x01\x3b\x00\x29\x01\x20\x01\x5d\x00\x22\x01\x23\x01\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x29\x01\x47\x00\x09\x01\x20\x01\x67\x00\x22\x01\x23\x01\xc3\x00\xa4\x00\xa5\x00\xa6\x00\x1e\x00\x29\x01\x70\x00\x15\x01\x16\x01\x57\x00\x57\x00\x58\x00\x9e\x00\xd0\x00\x69\x00\xa4\x00\xa5\x00\xa6\x00\x2c\x00\x60\x00\x61\x00\x67\x00\x4b\x00\x4a\x00\x65\x00\x27\x01\x28\x01\xd8\x00\x2a\x01\x6a\x00\x70\x00\x1c\x01\x2e\x01\x1e\x01\x19\x00\xa4\x00\xa5\x00\xa6\x00\x92\x00\x82\x00\x76\x00\x49\x00\x96\x00\x97\x00\x29\x01\x99\x00\x9a\x00\x9b\x00\x50\x00\x9d\x00\x9e\x00\x55\x00\x82\x00\x2c\x00\x3c\x00\x3d\x00\x6b\x00\x3b\x00\x87\x00\x83\x00\x84\x00\x50\x00\x71\x00\x48\x00\x42\x00\x43\x00\x44\x00\x45\x00\x77\x00\x47\x00\x67\x00\x48\x00\x7b\x00\x0c\x01\x0d\x01\x67\x00\x48\x00\x10\x01\x11\x01\x70\x00\x4b\x00\x71\x00\x65\x00\x14\x00\x70\x00\x57\x00\x58\x00\xc3\x00\x4b\x00\x1c\x01\x1b\x00\x1e\x01\x1d\x00\x57\x00\x60\x00\x61\x00\xa4\x00\xa5\x00\xa6\x00\x65\x00\xd0\x00\x6b\x00\x29\x01\x70\x00\x6a\x00\x68\x00\x65\x00\x71\x00\x02\x01\x03\x01\xbb\x00\x70\x00\x50\x00\x07\x01\x08\x01\xc0\x00\x70\x00\x32\x01\xc3\x00\x34\x01\xc5\x00\x1c\x01\xc7\x00\x1e\x01\x76\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x50\x00\x81\x00\xd0\x00\xd1\x00\x87\x00\x29\x01\x1c\x01\x82\x00\x1e\x01\x20\x01\x6b\x00\x22\x01\x23\x01\xad\x00\xae\x00\x48\x00\x71\x00\x13\x00\x29\x01\x29\x01\x2b\x01\x2c\x01\xa4\x00\xa5\x00\xa6\x00\x19\x00\x1c\x01\x1e\x00\x1e\x01\x6d\x00\x4c\x00\x0c\x01\x0d\x01\x71\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x29\x01\xc8\x00\x2c\x00\xf8\x00\xf9\x00\x2c\x00\x2f\x00\x30\x00\x1c\x01\x1d\x01\x1e\x01\x50\x00\x61\x00\x02\x01\x03\x01\xff\x00\x00\x01\xbb\x00\x07\x01\x08\x01\x04\x01\x29\x01\xc0\x00\x07\x01\x08\x01\xc3\x00\x84\x00\xc5\x00\x52\x00\xc7\x00\x12\x00\xf5\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x3c\x00\x3d\x00\xd0\x00\xd1\x00\x6d\x00\x5f\x00\x1f\x01\x20\x01\x71\x00\x22\x01\x23\x01\x1f\x01\x1c\x01\x48\x00\x1e\x01\x23\x01\x29\x01\x56\x00\x2b\x01\x2c\x01\x59\x00\x29\x01\x2f\x01\x9e\x00\x2c\x01\x29\x01\x3b\x00\x33\x00\x34\x00\x6a\x00\x0b\x00\x1a\x00\x4a\x00\x42\x00\x43\x00\x44\x00\x45\x00\x19\x00\x47\x00\x21\x01\x75\x00\x23\x01\xf8\x00\xf9\x00\x79\x00\x3b\x00\x1b\x00\x29\x01\x6a\x00\x76\x00\x2d\x00\x2e\x00\x02\x01\x03\x01\x57\x00\x58\x00\x2c\x00\x07\x01\x08\x01\x75\x00\xf2\x00\xf3\x00\xf4\x00\x60\x00\x61\x00\x6b\x00\x1f\x01\x1c\x01\x65\x00\x1e\x01\x23\x01\x71\x00\x56\x00\x6a\x00\x58\x00\x6a\x00\x29\x01\x77\x00\xf3\x00\xf4\x00\x29\x01\x1f\x01\x20\x01\x4a\x00\x22\x01\x23\x01\x75\x00\x65\x00\x69\x00\x4a\x00\x79\x00\x29\x01\x6a\x00\x2b\x01\x2c\x01\x56\x00\x71\x00\x2f\x01\x70\x00\x71\x00\x11\x01\x56\x00\x87\x00\x14\x01\x5f\x00\x5a\x00\x20\x01\x21\x01\x22\x01\x23\x01\x5f\x00\xff\x00\x00\x01\xff\x00\x00\x01\x29\x01\x04\x01\x19\x00\x04\x01\x07\x01\x08\x01\x07\x01\x08\x01\x20\x01\x21\x01\x22\x01\x23\x01\x76\x00\x77\x00\x72\x00\xad\x00\xae\x00\x29\x01\x76\x00\x77\x00\x56\x00\x2c\x00\x7a\x00\x7b\x00\x5a\x00\x69\x00\xad\x00\xae\x00\x1f\x01\x5f\x00\x1f\x01\x1f\x00\x23\x01\x71\x00\x23\x01\x12\x01\x13\x01\x69\x00\x29\x01\xbb\x00\x29\x01\x2c\x01\xc8\x00\x2c\x01\xc0\x00\x2d\x00\x2e\x00\xc3\x00\x3b\x00\xc5\x00\x96\x00\xc7\x00\x76\x00\xc8\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xbb\x00\xbc\x00\xd0\x00\xd1\x00\x51\x00\xc0\x00\x69\x00\x51\x00\xc3\x00\x32\x01\xc5\x00\x8c\x00\xc7\x00\x1e\x00\x71\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x75\x00\xcf\x00\xd0\x00\xd1\x00\x79\x00\x02\x01\x03\x01\x9e\x00\x2c\x00\x06\x01\x07\x01\x08\x01\x1e\x00\x65\x00\x6a\x00\x4a\x00\x04\x01\x05\x01\x6a\x00\x07\x01\x08\x01\x13\x00\x54\x00\xf8\x00\xf9\x00\x75\x00\x2c\x00\x56\x00\x74\x00\x79\x00\x65\x00\x5a\x00\x4c\x00\x02\x01\x03\x01\x82\x00\x5f\x00\x51\x00\x07\x01\x08\x01\x71\x00\x70\x00\xf8\x00\xf9\x00\x65\x00\x3b\x00\x2b\x01\x2c\x01\x6b\x00\x2f\x00\x30\x00\x31\x00\x02\x01\x03\x01\x71\x00\x70\x00\x2c\x01\x07\x01\x08\x01\x76\x00\x77\x00\x9e\x00\x1f\x01\x20\x01\x6b\x00\x22\x01\x23\x01\x68\x00\x65\x00\x6a\x00\x71\x00\x6c\x00\x29\x01\x2f\x00\x2b\x01\x2c\x01\x9e\x00\x65\x00\x2f\x01\x70\x00\x75\x00\x1f\x01\x20\x01\x71\x00\x22\x01\x23\x01\x42\x00\x65\x00\x70\x00\x3f\x00\x40\x00\x29\x01\x6a\x00\x2b\x01\x2c\x01\x65\x00\x64\x00\x2f\x01\x66\x00\xbb\x00\xbc\x00\x6d\x00\x74\x00\x10\x00\xc0\x00\x71\x00\x70\x00\xc3\x00\x10\x00\xc5\x00\x1c\x01\xc7\x00\x1e\x01\x6a\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x0a\x01\xcf\x00\xd0\x00\xd1\x00\x81\x00\x29\x01\x02\x01\x03\x01\x65\x00\x9e\x00\x06\x01\x07\x01\x08\x01\x17\x01\x0d\x01\x19\x01\x1a\x01\x10\x01\x11\x01\x70\x00\x1c\x01\x68\x00\x1e\x01\x6a\x00\x46\x00\x6c\x00\x24\x01\x75\x00\x26\x01\x27\x01\x28\x01\x79\x00\x2a\x01\x29\x01\x75\x00\x2d\x01\x2e\x01\x1c\x01\x79\x00\x1e\x01\xf6\x00\xf7\x00\xf8\x00\xf9\x00\x13\x00\x14\x00\xc3\x00\x2b\x01\x2c\x01\x18\x00\x29\x01\x65\x00\x02\x01\x03\x01\x3b\x00\xbb\x00\xbc\x00\x07\x01\x08\x01\xd0\x00\xc0\x00\x9e\x00\x70\x00\xc3\x00\x64\x00\xc5\x00\x66\x00\xc7\x00\x65\x00\x65\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x39\x00\xcf\x00\xd0\x00\xd1\x00\x53\x00\x70\x00\x70\x00\x1f\x01\x20\x01\x23\x01\x22\x01\x23\x01\x56\x00\x1e\x01\x9e\x00\x29\x01\x5a\x00\x29\x01\x2c\x01\x2b\x01\x2c\x01\x5f\x00\x65\x00\x2f\x01\x29\x01\x65\x00\x92\x00\x6a\x00\x4c\x00\x6c\x00\x6d\x00\x97\x00\x50\x00\x99\x00\x9a\x00\x9b\x00\x1e\x00\x9d\x00\x9e\x00\x70\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\x76\x00\x0c\x01\x0d\x01\x6d\x00\x7a\x00\x10\x01\x11\x01\x71\x00\x02\x01\x03\x01\x3b\x00\x48\x00\x6b\x00\x07\x01\x08\x01\x00\x00\x81\x00\x1c\x01\x71\x00\x1e\x01\x02\x01\x03\x01\x07\x00\x1f\x01\x6d\x00\x07\x01\x08\x01\x23\x01\x71\x00\x6b\x00\x29\x01\xc3\x00\x71\x00\x29\x01\x53\x00\x71\x00\x6b\x00\x1f\x01\x20\x01\x18\x00\x22\x01\x23\x01\x71\x00\x21\x01\xd0\x00\x23\x01\x64\x00\x29\x01\x66\x00\x2b\x01\x2c\x01\x29\x01\x65\x00\x2f\x01\x68\x00\x4b\x00\x6a\x00\x6a\x00\x6c\x00\x6c\x00\x6d\x00\x2b\x01\x2c\x01\x4c\x00\xbb\x00\xbc\x00\x4c\x00\x75\x00\x48\x00\xc0\x00\x50\x00\x79\x00\xc3\x00\x48\x00\xc5\x00\x21\x01\xc7\x00\x23\x01\x48\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x29\x01\xcf\x00\xd0\x00\xd1\x00\x02\x01\x03\x01\x48\x00\x4b\x00\x4c\x00\x07\x01\x08\x01\x23\x01\x50\x00\x10\x00\x52\x00\x53\x00\x64\x00\x29\x01\x66\x00\x2b\x01\x2c\x01\x0c\x01\x0d\x01\x50\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x27\x01\x28\x01\x63\x00\x2a\x01\x65\x00\x42\x00\x67\x00\x2e\x01\x1c\x01\x1d\x01\x1e\x01\x32\x01\x23\x01\xf8\x00\xf9\x00\x70\x00\x2b\x01\x2c\x01\x29\x01\x23\x01\x64\x00\x29\x01\x66\x00\x02\x01\x03\x01\x29\x01\xbb\x00\xbc\x00\x07\x01\x08\x01\x3b\x00\xc0\x00\x55\x00\x50\x00\xc3\x00\x52\x00\xc5\x00\x21\x01\xc7\x00\x23\x01\x81\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x29\x01\xcf\x00\xd0\x00\xd1\x00\x64\x00\x75\x00\x66\x00\x1f\x01\x20\x01\x79\x00\x22\x01\x23\x01\x56\x00\x64\x00\x58\x00\x66\x00\x9e\x00\x29\x01\x52\x00\x2b\x01\x2c\x01\x04\x01\x05\x01\x2f\x01\x07\x01\x08\x01\x6b\x00\x65\x00\x49\x00\x4a\x00\x4b\x00\x20\x01\x6a\x00\x22\x01\x23\x01\x50\x00\x6b\x00\x52\x00\x70\x00\x6b\x00\x29\x01\x56\x00\xf8\x00\xf9\x00\x6b\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x71\x00\x02\x01\x03\x01\x6b\x00\x4a\x00\x65\x00\x07\x01\x08\x01\x3b\x00\x69\x00\x2c\x01\x6b\x00\x20\x01\x6d\x00\x22\x01\x23\x01\x56\x00\x71\x00\x72\x00\x4b\x00\x5a\x00\x29\x01\x76\x00\x77\x00\x48\x00\x5f\x00\x7a\x00\x7b\x00\x51\x00\x52\x00\x1f\x01\x20\x01\x53\x00\x22\x01\x23\x01\x04\x01\x05\x01\x2e\x01\x07\x01\x08\x01\x29\x01\x32\x01\x2b\x01\x2c\x01\x72\x00\x50\x00\x2f\x01\x4a\x00\x76\x00\x77\x00\x65\x00\x71\x00\x7a\x00\x7b\x00\x48\x00\x6a\x00\x21\x01\x6c\x00\x23\x01\x56\x00\x2d\x01\x2e\x01\xbb\x00\xbc\x00\x29\x01\x32\x01\x71\x00\xc0\x00\x5f\x00\x4a\x00\xc3\x00\x4c\x00\xc5\x00\x0c\x00\xc7\x00\x2c\x01\x69\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x56\x00\xcf\x00\xd0\x00\xd1\x00\x5a\x00\x43\x00\x44\x00\x45\x00\x46\x00\x5f\x00\x76\x00\x77\x00\x92\x00\x98\x00\x7a\x00\x7b\x00\x64\x00\x97\x00\x66\x00\x99\x00\x9a\x00\x9b\x00\x0d\x01\x9d\x00\x9e\x00\x10\x01\x11\x01\x68\x00\x72\x00\x6a\x00\x96\x00\x6c\x00\x76\x00\x77\x00\x51\x00\x52\x00\x7a\x00\x7b\x00\x4b\x00\x4c\x00\x75\x00\x3b\x00\xf8\x00\xf9\x00\x79\x00\x96\x00\x68\x00\x64\x00\x6a\x00\x66\x00\x6c\x00\x6b\x00\x02\x01\x03\x01\x70\x00\xbb\x00\xbc\x00\x07\x01\x08\x01\x75\x00\xc0\x00\xc3\x00\x64\x00\xc3\x00\x66\x00\xc5\x00\x64\x00\xc7\x00\x66\x00\x96\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xd0\x00\xcf\x00\xd0\x00\xd1\x00\x4b\x00\x4c\x00\x4a\x00\x1f\x01\x20\x01\x65\x00\x22\x01\x23\x01\x0d\x01\x6d\x00\x6a\x00\x10\x01\x11\x01\x29\x01\x56\x00\x2b\x01\x2c\x01\x69\x00\x5a\x00\x2f\x01\x74\x00\x92\x00\x20\x01\x5f\x00\x22\x01\x23\x01\x97\x00\x71\x00\x99\x00\x9a\x00\x9b\x00\x29\x01\x9d\x00\x9e\x00\x64\x00\x6b\x00\x66\x00\x3b\x00\xf8\x00\xf9\x00\x52\x00\x71\x00\x21\x00\x22\x00\x23\x00\x24\x00\x76\x00\x77\x00\x02\x01\x03\x01\x7a\x00\x7b\x00\x48\x00\x07\x01\x08\x01\x48\x00\x0c\x01\x0d\x01\x52\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x27\x01\x28\x01\x20\x01\x2a\x01\x22\x01\x23\x01\xc3\x00\x52\x00\x1c\x01\x1d\x01\x1e\x01\x29\x01\x0c\x00\x1f\x01\x20\x01\x65\x00\x22\x01\x23\x01\x70\x00\xd0\x00\x6a\x00\x29\x01\x7a\x00\x29\x01\x7c\x00\x2b\x01\x2c\x01\xbb\x00\xbc\x00\x2f\x01\x74\x00\x9e\x00\xc0\x00\x50\x00\x64\x00\xc3\x00\x66\x00\xc5\x00\x14\x00\xc7\x00\x9e\x00\x09\x01\xca\x00\xcb\x00\xcc\x00\xcd\x00\x72\x00\xcf\x00\xd0\x00\xd1\x00\x22\x01\x23\x01\x72\x00\x15\x01\x16\x01\x4b\x00\x4c\x00\x29\x01\x92\x00\x2b\x01\x2c\x01\x6b\x00\x64\x00\x97\x00\x66\x00\x99\x00\x9a\x00\x9b\x00\xc3\x00\x9d\x00\x9e\x00\x27\x01\x28\x01\x64\x00\x2a\x01\x66\x00\x6b\x00\xc3\x00\x2e\x01\x0c\x01\x0d\x01\xd0\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x3b\x00\xf8\x00\xf9\x00\xd0\x00\x20\x01\x6b\x00\x22\x01\x23\x01\x1c\x01\x1d\x01\x1e\x01\x02\x01\x03\x01\x29\x01\xbb\x00\xbc\x00\x07\x01\x08\x01\x3b\x00\xc0\x00\xc3\x00\x29\x01\xc3\x00\x64\x00\xc5\x00\x66\x00\xc7\x00\x3c\x00\x3d\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xd0\x00\xcf\x00\xd0\x00\xd1\x00\x80\x00\x81\x00\x82\x00\x1f\x01\x20\x01\x65\x00\x22\x01\x23\x01\x6d\x00\x64\x00\x6a\x00\x66\x00\x32\x01\x29\x01\x34\x01\x2b\x01\x2c\x01\x0c\x01\x0d\x01\x2f\x01\x72\x00\x10\x01\x11\x01\xbd\x00\xbe\x00\xbf\x00\x0c\x01\x0d\x01\x6a\x00\x72\x00\x10\x01\x11\x01\xe4\x00\x1c\x01\xe6\x00\x1e\x01\x4b\x00\x4c\x00\xf8\x00\xf9\x00\x6d\x00\x80\x00\x1c\x01\x82\x00\x1e\x01\x6b\x00\x29\x01\x65\x00\x02\x01\x03\x01\xa8\x00\xa9\x00\xaa\x00\x07\x01\x08\x01\x29\x01\x0c\x01\x0d\x01\x71\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x52\x00\x0b\x01\x0c\x01\x0d\x01\x4b\x00\x4c\x00\x10\x01\x11\x01\x1c\x01\x1d\x01\x1e\x01\x3c\x00\x3d\x00\x1f\x01\x20\x01\x52\x00\x22\x01\x23\x01\x1c\x01\x70\x00\x1e\x01\x29\x01\x6a\x00\x29\x01\x0c\x00\x2b\x01\x2c\x01\xbb\x00\xbc\x00\x2f\x01\x6a\x00\x29\x01\xc0\x00\x4b\x00\x4c\x00\xc3\x00\x0b\x00\xc5\x00\x32\x00\xc7\x00\x02\x00\x03\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x18\x00\xcf\x00\xd0\x00\xd1\x00\xc0\x00\x02\x00\x03\x00\xc3\x00\x6b\x00\xc5\x00\x4b\x00\xc7\x00\x75\x00\x76\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x92\x00\x71\x00\xd0\x00\xd1\x00\x9e\x00\x97\x00\x72\x00\x99\x00\x9a\x00\x9b\x00\x6b\x00\x9d\x00\x9e\x00\x6b\x00\xff\x00\x00\x01\x62\x00\x63\x00\x64\x00\x04\x01\x22\x01\x23\x01\x07\x01\x08\x01\xf8\x00\xf9\x00\x6b\x00\x29\x01\x6b\x00\x2b\x01\x2c\x01\x52\x00\x75\x00\x76\x00\x02\x01\x03\x01\xb7\x00\xb8\x00\xb9\x00\x07\x01\x08\x01\xc3\x00\xf8\x00\xf9\x00\xc1\x00\xc2\x00\x1f\x01\x4a\x00\x4b\x00\xc3\x00\x23\x01\x6b\x00\x02\x01\x03\x01\xd0\x00\x71\x00\x29\x01\x07\x01\x08\x01\x2c\x01\xc1\x00\xc2\x00\xd0\x00\x1f\x01\x20\x01\x69\x00\x22\x01\x23\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x29\x01\x6b\x00\x2b\x01\x2c\x01\x52\x00\x6b\x00\x2f\x01\x65\x00\x1f\x01\x20\x01\x71\x00\x22\x01\x23\x01\x26\x01\x27\x01\x28\x01\x4c\x00\x2a\x01\x29\x01\x52\x00\x2b\x01\x2c\x01\x92\x00\x61\x00\x2f\x01\xc1\x00\xc2\x00\x97\x00\x61\x00\x99\x00\x9a\x00\x9b\x00\x71\x00\x9d\x00\x9e\x00\x16\x00\x26\x01\x27\x01\x28\x01\x52\x00\x2a\x01\x0c\x01\x0d\x01\x2d\x01\x2e\x01\x10\x01\x11\x01\x71\x00\x32\x01\x0c\x01\x0d\x01\x50\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x1c\x01\x71\x00\x1e\x01\xe2\x00\xe3\x00\xe4\x00\x65\x00\xe6\x00\x1c\x01\x1d\x01\x1e\x01\x92\x00\x48\x00\x29\x01\xc3\x00\x6b\x00\x97\x00\x48\x00\x99\x00\x9a\x00\x9b\x00\x29\x01\x9d\x00\x9e\x00\xe2\x00\xe3\x00\xe4\x00\xd0\x00\xe6\x00\x4b\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\x82\x00\x00\x01\x26\x01\x27\x01\x28\x01\x04\x01\x2a\x01\x69\x00\x07\x01\x08\x01\x78\x00\x79\x00\x92\x00\xb0\x00\xb1\x00\xb2\x00\x4b\x00\x97\x00\x48\x00\x99\x00\x9a\x00\x9b\x00\x6b\x00\x9d\x00\x9e\x00\x6b\x00\xc3\x00\x5d\x00\x0b\x01\x0c\x01\x0d\x01\x48\x00\x1f\x01\x10\x01\x11\x01\x72\x00\x23\x01\x12\x01\x13\x01\xd0\x00\x27\x01\x28\x01\x29\x01\x2a\x01\x72\x00\x2c\x01\x50\x00\x2e\x01\xb7\x00\xb8\x00\xb9\x00\x32\x01\x71\x00\x0c\x01\x0d\x01\x18\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xc3\x00\xb7\x00\xb8\x00\xb9\x00\x4a\x00\xb7\x00\xb8\x00\xb9\x00\x1c\x01\x1d\x01\x1e\x01\x33\x01\x34\x01\xd0\x00\x75\x00\x76\x00\x56\x00\x10\x00\x11\x00\x92\x00\x5a\x00\x29\x01\x4b\x00\x96\x00\x97\x00\x5f\x00\x99\x00\x9a\x00\x9b\x00\x6b\x00\x9d\x00\x9e\x00\xb7\x00\xb8\x00\xb9\x00\x4b\x00\x5e\x00\x18\x00\x0c\x01\x0d\x01\x4c\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xf7\x00\xf8\x00\x76\x00\x77\x00\x10\x00\x11\x00\x7a\x00\x7b\x00\x1c\x01\x1d\x01\x1e\x01\xb7\x00\xb8\x00\xb9\x00\xa9\x00\xaa\x00\x75\x00\x5e\x00\x23\x00\x24\x00\x81\x00\x29\x01\xc3\x00\xb1\x00\xb2\x00\x35\x00\x36\x00\x0c\x01\x0d\x01\x81\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\x48\x00\x48\x00\x15\x00\x6a\x00\x0b\x00\x70\x00\x92\x00\x1c\x01\x1d\x01\x1e\x01\x96\x00\x97\x00\x18\x00\x99\x00\x9a\x00\x9b\x00\xc3\x00\x9d\x00\x9e\x00\x18\x00\x29\x01\x81\x00\x6b\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x4a\x00\x48\x00\xd0\x00\xd1\x00\x69\x00\x18\x00\x92\x00\x65\x00\x52\x00\x71\x00\x96\x00\x97\x00\x56\x00\x99\x00\x9a\x00\x9b\x00\x5a\x00\x9d\x00\x9e\x00\x72\x00\x4b\x00\x5f\x00\x4b\x00\x5f\x00\x4b\x00\x4b\x00\x50\x00\x71\x00\xc3\x00\x4c\x00\x18\x00\x18\x00\x0c\x01\x0d\x01\x07\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x72\x00\xd0\x00\xf8\x00\xf9\x00\x76\x00\x77\x00\x19\x00\x55\x00\x1c\x01\x1d\x01\x1e\x01\x48\x00\x02\x01\x03\x01\x50\x00\xc3\x00\x69\x00\x07\x01\x08\x01\x7e\x00\x65\x00\x29\x01\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xd0\x00\x99\x00\x9a\x00\x9b\x00\x70\x00\x9d\x00\x9e\x00\x70\x00\x70\x00\x65\x00\xa2\x00\xa3\x00\x50\x00\x18\x00\x20\x01\x69\x00\x22\x01\x23\x01\x48\x00\x6b\x00\x18\x00\x48\x00\x6b\x00\x29\x01\x65\x00\x2b\x01\x2c\x01\x6b\x00\x70\x00\x2f\x01\x18\x00\x50\x00\x4c\x00\x0c\x01\x0d\x01\x2b\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x70\x00\x48\x00\xc3\x00\x71\x00\x48\x00\x50\x00\x07\x00\x18\x00\x1c\x01\x1d\x01\x1e\x01\x5f\x00\x07\x00\x18\x00\x4b\x00\xd0\x00\x5f\x00\x71\x00\x69\x00\x0c\x01\x0d\x01\x29\x01\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x6b\x00\x81\x00\x0c\x00\x48\x00\x70\x00\x6a\x00\x15\x00\x70\x00\x1c\x01\x1d\x01\x1e\x01\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x4b\x00\x99\x00\x9a\x00\x9b\x00\x29\x01\x9d\x00\x9e\x00\x4c\x00\x52\x00\x10\x00\x21\x00\xf8\x00\x07\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x31\x00\x99\x00\x9a\x00\x9b\x00\x5f\x00\x9d\x00\x9e\x00\x55\x00\x55\x00\x19\x00\x08\x00\x6a\x00\x0c\x01\x0d\x01\x39\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x68\x00\x2c\x00\x6b\x00\x71\x00\xc3\x00\x70\x00\x4a\x00\x42\x00\x1c\x01\x1d\x01\x1e\x01\x65\x00\x00\x01\x55\x00\x52\x00\x02\x00\x04\x01\xd0\x00\x56\x00\x07\x01\x08\x01\x29\x01\x5a\x00\xc3\x00\x6b\x00\x6b\x00\x92\x00\x5f\x00\x6b\x00\x6a\x00\x32\x01\x97\x00\x34\x01\x99\x00\x9a\x00\x9b\x00\xd0\x00\x9d\x00\x9e\x00\x6b\x00\x48\x00\x65\x00\x6b\x00\x1f\x01\x5f\x00\x71\x00\x71\x00\x23\x01\x65\x00\x6b\x00\x76\x00\x77\x00\x4b\x00\x29\x01\x7a\x00\x7b\x00\x2c\x01\xf8\x00\x4b\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x02\x00\x99\x00\x9a\x00\x9b\x00\x18\x00\x9d\x00\x9e\x00\x50\x00\x6a\x00\x71\x00\xc3\x00\xf8\x00\x0c\x01\x0d\x01\x6a\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x6a\x00\x18\x00\x6b\x00\xd0\x00\x07\x00\x18\x00\x4a\x00\x76\x00\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\x07\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x27\x01\x28\x01\x29\x01\x2a\x01\xc3\x00\x6b\x00\x2d\x01\x2e\x01\x1c\x01\x1d\x01\x1e\x01\x32\x01\x01\x01\x76\x00\x03\x01\x12\x00\x2f\x00\xd0\x00\x07\x01\x31\x01\x31\x01\x29\x01\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xd4\x00\x00\x01\x98\x00\x32\x01\xec\x00\x04\x01\x32\x01\x3a\x00\x07\x01\x08\x01\xec\x00\x5f\x00\xec\x00\x48\x00\x88\x00\x1f\x01\x30\x00\x0c\x01\x0d\x01\x23\x01\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x29\x01\x31\x01\x2b\x01\x2c\x01\x31\x01\xf8\x00\x16\x00\x1f\x01\x1c\x01\x1d\x01\x1e\x01\x23\x01\x30\x01\x16\x00\x31\x00\x85\x00\x89\x00\x29\x01\x89\x00\x98\x00\x2c\x01\x29\x01\xa7\x00\x5f\x00\x8d\x00\x0c\x01\x0d\x01\x7b\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x36\x01\x35\x01\xc8\x00\x30\x01\x16\x00\xd2\x00\x16\x00\x20\x00\x1c\x01\x1d\x01\x1e\x01\x85\x00\x20\x00\x80\x00\x2f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x03\x00\x0a\x00\x29\x01\x07\x00\x08\x00\x09\x00\x0a\x00\xe6\x00\x30\x01\x6f\x00\x36\x01\x32\x01\x10\x00\x11\x00\x5a\x00\x48\x00\x14\x00\x15\x00\x16\x00\x73\x00\x18\x00\x19\x00\x30\x01\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\x5b\x00\x2a\x00\x2b\x00\x2c\x00\x30\x01\x30\x01\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x79\x00\x2c\x01\x7d\x00\x7b\x00\x86\x00\x85\x00\x13\x01\x33\x00\x20\x00\x3e\x00\x3f\x00\x20\x00\x2b\x00\x32\x00\x69\x00\x4c\x00\x72\x00\x64\x00\x6e\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x77\x00\xac\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\x2b\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x0f\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\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\x00\x00\x01\x00\x02\x00\x03\x00\x85\x00\x30\x01\x30\x01\x07\x00\x08\x00\x09\x00\x0a\x00\x1c\x00\x1c\x00\xc8\x00\x77\x00\xe6\x00\x10\x00\x11\x00\xac\x00\xb9\x00\x14\x00\x15\x00\x16\x00\xaa\x00\x18\x00\x19\x00\x4f\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\x17\x00\x2a\x00\x2b\x00\x2c\x00\x31\x01\x85\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x80\x00\x17\x00\x2b\x00\x85\x00\x25\x00\x31\x01\x33\x00\x50\x00\x55\x00\x3e\x00\x3f\x00\x30\x01\x30\x01\x55\x00\x4a\x00\x31\x01\x54\x00\x30\x00\x30\x01\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x11\x00\x0c\x00\x50\x00\x51\x00\x52\x00\x53\x00\x16\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x30\x01\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x31\x01\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\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\x00\x00\x01\x00\x02\x00\x03\x00\x5c\x00\x5f\x00\x30\x01\x07\x00\x08\x00\x09\x00\x0a\x00\x34\x00\x30\x01\x5a\x00\x31\x01\x16\x00\x10\x00\x11\x00\x5c\x00\x30\x01\x14\x00\x15\x00\x16\x00\x30\x01\x18\x00\x19\x00\x20\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\x20\x00\x2a\x00\x2b\x00\x2c\x00\x25\x00\x31\x01\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xac\x00\x17\x00\x31\x01\x31\x01\x31\x01\x17\x00\xff\xff\x31\x01\xff\xff\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\x63\x00\x64\x00\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\x63\x00\x64\x00\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\x63\x00\x64\x00\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\x63\x00\xff\xff\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\xff\xff\xff\xff\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\xff\xff\xff\xff\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\x14\x00\x15\x00\x16\x00\xff\xff\x18\x00\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\x51\x00\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\x62\x00\xff\xff\xff\xff\x65\x00\xff\xff\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\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x4a\x00\x4b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\x72\x00\xff\xff\xff\xff\xff\xff\x76\x00\x77\x00\xff\xff\xff\xff\x7a\x00\x7b\x00\x67\x00\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x4a\x00\x4b\x00\x4c\x00\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\x72\x00\xff\xff\xff\xff\xff\xff\x76\x00\x77\x00\xff\xff\xff\xff\x7a\x00\x7b\x00\x67\x00\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x00\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\xff\x00\x01\x3e\x00\x3f\x00\xff\xff\x04\x01\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\x4b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\x1f\x01\xff\xff\xff\xff\x5f\x00\x23\x01\xff\xff\x62\x00\x63\x00\x64\x00\x65\x00\x29\x01\x67\x00\x68\x00\x2c\x01\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\x70\x00\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x99\x00\x09\x00\x0a\x00\x9c\x00\x9d\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\xff\xff\x13\x00\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xff\xff\xff\xff\x40\x00\x41\x00\x0a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\x17\x01\xff\xff\x19\x01\x1a\x01\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\x28\x01\xff\xff\x2a\x01\xff\xff\xff\xff\x2d\x01\x2e\x01\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\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\x4a\x00\x4b\x00\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\x61\x00\x62\x00\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\x69\x00\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\x06\x00\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x41\x00\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\x13\x00\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x0a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\x17\x01\xff\xff\x19\x01\x1a\x01\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\x28\x01\xff\xff\x2a\x01\xff\xff\xff\xff\x2d\x01\x2e\x01\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\x06\x00\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x0a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\x17\x01\xff\xff\x19\x01\x1a\x01\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\x24\x01\xff\xff\x26\x01\x27\x01\x28\x01\xff\xff\x2a\x01\xff\xff\xff\xff\x2d\x01\x2e\x01\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\x13\x00\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\x4a\x00\x4b\x00\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\x4a\x00\x5f\x00\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\x72\x00\x5f\x00\x60\x00\xff\xff\x76\x00\x77\x00\xff\xff\xff\xff\x7a\x00\x7b\x00\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\x00\xfe\x00\xff\xff\x00\x01\xff\xff\xff\xff\xff\xff\x04\x01\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\x1f\x01\xff\xff\xff\xff\x5f\x00\x23\x01\x61\x00\x62\x00\xff\xff\x64\x00\xff\xff\x29\x01\xff\xff\x68\x00\x2c\x01\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\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\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\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\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x4a\x00\x4b\x00\x4c\x00\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\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\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\x4a\x00\x4b\x00\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\x4a\x00\x5f\x00\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\x72\x00\x5f\x00\xff\xff\xff\xff\x76\x00\x77\x00\xff\xff\xff\xff\x7a\x00\x7b\x00\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\x6d\x00\x6e\x00\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\x6d\x00\x6e\x00\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\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\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\x69\x00\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\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\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\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\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\x9c\x00\x9d\x00\x9e\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\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\xc3\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\x16\x00\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\x16\x00\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\x4d\x00\x4e\x00\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6b\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\x71\x00\xff\xff\xff\xff\xff\xff\xff\xff\x76\x00\x77\x00\xff\xff\xff\xff\x7a\x00\x7b\x00\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2e\x00\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\x6f\x00\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x57\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\x57\x00\x58\x00\x59\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\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\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x81\x00\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\xff\xff\xff\xff\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\x6a\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x01\x00\x02\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x81\x00\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\x4b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\x62\x00\x63\x00\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\x99\x00\xff\xff\xff\xff\x9c\x00\x9d\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\x4b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\x53\x00\xff\xff\x55\x00\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\x62\x00\x63\x00\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\x6d\x00\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\x99\x00\xff\xff\xff\xff\x9c\x00\x9d\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\x8f\x00\x3e\x00\x3f\x00\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x4a\x00\x9d\x00\x9e\x00\xff\xff\xa0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xd0\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xf8\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\x69\x00\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\x8f\x00\x3e\x00\x3f\x00\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x4a\x00\x9d\x00\x9e\x00\xff\xff\xa0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xd0\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xf8\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\x8f\x00\x3e\x00\x3f\x00\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x4a\x00\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xd0\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xf8\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\x8f\x00\x3e\x00\x3f\x00\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x4a\x00\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xd0\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xf8\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\x3e\x00\x3f\x00\x92\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\x9a\x00\x9b\x00\x4a\x00\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xb3\x00\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xd0\x00\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x15\x00\xff\xff\x9c\x00\x9d\x00\x19\x00\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xff\xff\x92\x00\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\x9a\x00\x9b\x00\x5f\x00\x9d\x00\x9e\x00\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\x01\x00\x02\x00\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\x99\x00\xff\xff\xff\xff\x9c\x00\x9d\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\x29\x01\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\x99\x00\xff\xff\xff\xff\x9c\x00\x9d\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x8f\x00\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\x9f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x57\x00\x58\x00\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x68\x00\xc3\x00\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\xd0\x00\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\xff\xff\xff\xff\xff\xff\x8f\x00\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\x9f\x00\xff\xff\xff\xff\x99\x00\xff\xff\xff\xff\x9c\x00\x9d\x00\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x10\x01\x11\x01\x12\x01\x13\x01\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\x8f\x00\xff\xff\xff\xff\x92\x00\x93\x00\x29\x01\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\x9f\x00\xff\xff\xff\xff\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x01\x01\xff\xff\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\xff\xff\xff\xff\x0a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\x16\x01\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\xff\xff\x1f\x01\xff\xff\xff\xff\xc3\x00\x23\x01\x1c\x01\x1d\x01\x1e\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\xd0\x00\xff\xff\x29\x01\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x8f\x00\xff\xff\x91\x00\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\x8f\x00\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x8f\x00\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\x8f\x00\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x8f\x00\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\x8f\x00\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x8f\x00\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\x8f\x00\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x8f\x00\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xf8\x00\xa1\x00\xa2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xd0\x00\x29\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x29\x01\x9d\x00\x9e\x00\xff\xff\xff\xff\xa1\x00\xa2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xa2\x00\xff\xff\xc3\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xc3\x00\xff\xff\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xd0\x00\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xa2\x00\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xc3\x00\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xff\xff\xf8\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xa3\x00\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xc3\x00\xff\xff\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xd0\x00\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xa2\x00\xff\xff\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xa2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xf8\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xd0\x00\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x0c\x01\x0d\x01\xa6\x00\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xc3\x00\xf8\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xd0\x00\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\x29\x01\xff\xff\xc3\x00\xf8\x00\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xd0\x00\x99\x00\x9a\x00\x9b\x00\x29\x01\x9d\x00\x9e\x00\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xd0\x00\x9d\x00\x9e\x00\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x29\x01\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xc3\x00\xf8\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xab\x00\x99\x00\x9a\x00\x9b\x00\xd0\x00\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xc3\x00\xf8\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xd0\x00\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xc3\x00\xf8\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xab\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\x92\x00\x93\x00\xc3\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xab\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xab\x00\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\x29\x01\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xab\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xff\xff\xc3\x00\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\x29\x01\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xab\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xc3\x00\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xab\x00\xff\xff\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xd0\x00\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xab\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xf8\x00\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\x92\x00\x93\x00\xf8\x00\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xc3\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\x29\x01\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x95\x00\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\x96\x00\xff\xff\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xb3\x00\xf8\x00\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\xff\xff\x97\x00\xff\xff\x99\x00\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x9a\x00\x9b\x00\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\x02\x00\xc3\x00\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x00\xff\xff\x29\x01\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\x0c\x01\x0d\x01\xff\xff\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\x29\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1d\x01\x1e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\x6a\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\x81\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\x09\x00\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x74\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x81\x00\x02\x00\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\x09\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xe7\x00\xe8\x00\x2a\x00\xff\xff\xff\xff\x81\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\x81\x00\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\x30\x01\xe7\x00\xe8\x00\x74\x00\x75\x00\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\x3a\x01\xff\xff\x3c\x01\xff\xff\x3e\x01\xff\xff\x81\x00\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xe7\x00\xe8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\x3a\x01\xff\xff\x3c\x01\xff\xff\x3e\x01\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xe7\x00\xe8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\x3a\x01\xff\xff\x3c\x01\xff\xff\x3e\x01\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xc3\x00\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xea\x00\xeb\x00\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\x3e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\x30\x01\xea\x00\xeb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x39\x01\xff\xff\x3b\x01\xff\xff\x3d\x01\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xea\x00\xeb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\x39\x01\xff\xff\x3b\x01\xff\xff\x3d\x01\xf8\x00\xf9\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\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\xea\x00\xeb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x39\x01\xff\xff\x3b\x01\xff\xff\x3d\x01\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\x09\x00\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\x15\x00\x2b\x01\x2c\x01\xff\xff\x19\x00\x2f\x01\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\x3d\x01\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\x02\x00\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\x72\x00\xff\xff\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\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\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\x72\x00\xff\xff\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\x79\x00\x15\x00\x7b\x00\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\x2d\x00\xff\xff\x2f\x00\x30\x00\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\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\x12\x00\xff\xff\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\x2d\x00\x6a\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x71\x00\xff\xff\x02\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\x2d\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x6a\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x02\x00\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x68\x00\xff\xff\x6a\x00\x09\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\x15\x00\x78\x00\x79\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\x17\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\x09\x00\xff\xff\x49\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\x6a\x00\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\x74\x00\x75\x00\xff\xff\xff\xff\x78\x00\x79\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x09\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\x15\x00\xff\xff\x79\x00\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\x15\x00\x78\x00\x79\x00\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\x74\x00\x75\x00\x15\x00\xff\xff\xff\xff\x79\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x15\x00\xff\xff\xff\xff\x79\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\x68\x00\xff\xff\x6a\x00\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x02\x00\xff\xff\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\x49\x00\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x02\x00\xff\xff\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\x6a\x00\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\x78\x00\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xc3\x00\xff\xff\xff\xff\xc6\x00\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x56\x00\xff\xff\xd0\x00\xd1\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\x77\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xc3\x00\x07\x01\x08\x01\xc6\x00\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x38\x01\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd6\x00\xd7\x00\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x38\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\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\x18\x01\x19\x01\xff\xff\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x2f\x01\xff\xff\xff\xff\x32\x01\xff\xff\x34\x01\xff\xff\x02\x00\x37\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\x09\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\x15\x00\xff\xff\xd6\x00\xd7\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\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\x18\x01\x19\x01\xff\xff\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x2f\x01\xff\xff\xff\xff\x32\x01\x74\x00\x34\x01\xff\xff\x02\x00\x37\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\x09\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\x15\x00\xff\xff\xd6\x00\xd7\x00\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\x01\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\x18\x01\x19\x01\xff\xff\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\x25\x01\x26\x01\xff\xff\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x2f\x01\xff\xff\xff\xff\x32\x01\x74\x00\x34\x01\xff\xff\xff\xff\x37\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd6\x00\xff\xff\xff\xff\xff\xff\xda\x00\xdb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\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\x18\x01\x19\x01\xff\xff\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\x25\x01\x26\x01\xff\xff\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x2f\x01\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\x37\x01\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd6\x00\xff\xff\xff\xff\xd9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\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\x18\x01\x19\x01\xff\xff\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\x25\x01\x26\x01\xff\xff\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x2f\x01\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\x37\x01\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd6\x00\xff\xff\xff\xff\xd9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\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\x18\x01\x19\x01\xff\xff\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\x25\x01\x26\x01\xff\xff\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x2f\x01\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\x37\x01\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\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\x18\x01\x19\x01\xff\xff\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\x25\x01\x26\x01\xff\xff\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x2f\x01\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\x37\x01\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\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\x18\x01\x19\x01\xff\xff\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\x25\x01\x26\x01\xff\xff\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x2f\x01\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\x37\x01\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\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\x18\x01\x19\x01\xff\xff\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\x25\x01\x26\x01\xff\xff\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x2f\x01\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\x37\x01\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\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\x18\x01\x19\x01\xff\xff\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\x25\x01\x26\x01\xff\xff\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x2f\x01\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\x37\x01\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\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\x18\x01\x19\x01\xff\xff\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\x25\x01\x26\x01\xff\xff\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x2f\x01\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\x37\x01\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\x0a\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\x18\x01\x19\x01\xff\xff\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\x25\x01\x26\x01\xff\xff\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x2e\x01\x2f\x01\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\x37\x01\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xdc\x00\xdd\x00\xde\x00\xdf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xdd\x00\xde\x00\xdf\x00\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xf1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xef\x00\xf0\x00\xf1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xee\x00\x37\x01\xf0\x00\xf1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xe9\x00\xff\xff\xff\xff\xff\xff\xed\x00\xff\xff\x37\x01\xf0\x00\xf1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xe9\x00\xff\xff\xff\xff\xff\xff\xed\x00\xff\xff\x37\x01\xf0\x00\xf1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xe0\x00\xe1\x00\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xf1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xe0\x00\xe1\x00\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xf1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xe4\x00\xe5\x00\xe6\x00\xff\xff\xff\xff\xff\xff\xff\xff\x37\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\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xf0\x00\xf1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xdf\x00\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xf1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xf1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xe7\x00\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xe7\x00\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xe7\x00\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xc3\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x37\x01\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\x1b\x00\x1c\x00\x1d\x00\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\x20\x01\x02\x00\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\x12\x00\xff\xff\xff\xff\x15\x00\xff\xff\x17\x00\x37\x01\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x09\x00\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\x74\x00\x75\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x09\x00\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\x74\x00\x75\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x09\x00\xff\xff\x68\x00\xff\xff\x6a\x00\xff\xff\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\x74\x00\x75\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\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\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\xff\xff\xff\xff\x4c\x00\xff\xff\x15\x00\xff\xff\xff\xff\x51\x00\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\x64\x00\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\xff\xff\xff\xff\x71\x00\xff\xff\xff\xff\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x15\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\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\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x02\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x09\x00\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\x02\x00\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\x6a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\xff\xff\x6a\x00\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\xc5\x00\xff\xff\xc7\x00\xff\xff\x74\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xc5\x00\xff\xff\xc7\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xc3\x00\x2f\x01\xc5\x00\xff\xff\xc7\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xc5\x00\xff\xff\xc7\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xea\x00\xeb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xea\x00\xeb\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xf8\x00\xf9\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xcb\x00\xcc\x00\xcd\x00\x07\x01\x08\x01\xd0\x00\xd1\x00\xff\xff\xd3\x00\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xcb\x00\xcc\x00\xcd\x00\x07\x01\x08\x01\xd0\x00\xd1\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xf8\x00\xf9\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xcb\x00\xcc\x00\xcd\x00\x07\x01\x08\x01\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xcb\x00\xcc\x00\xcd\x00\x07\x01\x08\x01\xd0\x00\xd1\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xf8\x00\xf9\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xcb\x00\xcc\x00\xcd\x00\x07\x01\x08\x01\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xcb\x00\xcc\x00\xcd\x00\x07\x01\x08\x01\xd0\x00\xd1\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xf8\x00\xf9\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xcb\x00\xcc\x00\xcd\x00\x07\x01\x08\x01\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xcb\x00\xcc\x00\xcd\x00\x07\x01\x08\x01\xd0\x00\xd1\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x00\xcc\x00\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xf8\x00\xf9\x00\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xcb\x00\xcc\x00\xcd\x00\x07\x01\x08\x01\xd0\x00\xd1\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xc3\x00\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xf8\x00\xf9\x00\xff\xff\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\xff\xff\x02\x01\x03\x01\xc3\x00\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcd\x00\xff\xff\xff\xff\xd0\x00\xd1\x00\xff\xff\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\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\xff\xff\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\x01\xff\xff\xff\xff\xff\xff\x20\x01\xff\xff\x22\x01\x23\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x29\x01\xff\xff\x2b\x01\x2c\x01\xff\xff\xff\xff\x2f\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\xff\xff\xff\xff\xff\xff"#++happyTable :: HappyAddr+happyTable = HappyA# "\x00\x00\x71\x00\x4f\x05\x50\x05\x52\x05\x53\x05\x2c\x01\x84\x04\x8e\x05\x95\x05\xd3\x00\x2b\x05\x90\x05\xa3\x04\x0b\x03\x91\x05\xd5\x04\x21\x02\xd4\x04\x22\x02\x61\x03\x8c\x05\xd5\x04\x21\x02\x4a\x05\x22\x02\x75\x05\x6c\x04\xd5\x04\x21\x02\x54\x03\x22\x02\x20\x02\x21\x02\x21\x02\x22\x02\xf0\x03\x88\x04\x49\x03\x89\x04\x76\x05\x77\x05\x78\x05\xec\x01\x4d\x03\x4e\x03\x4a\x04\x4b\x04\x1e\x02\x1e\x02\x47\x03\xa7\x03\xf2\x00\x80\x04\x9b\x02\x9c\x02\x79\x03\xd4\x00\xe8\x04\x00\x03\x7c\x04\x4b\x04\x77\x02\x8a\x04\x90\x04\x31\x00\xf4\x01\x5c\x05\x74\x03\x25\x01\x9b\x02\x9c\x02\x1e\x02\x25\x01\x1c\x05\x1d\x05\x1e\x05\x1f\x05\x6c\x04\xed\x01\xee\x01\xef\x01\x27\x05\x4b\x04\x2a\x04\x71\x03\x74\x05\x1f\x05\x6c\x04\x86\x05\x5e\x04\x5f\x04\x71\x05\x7e\x05\xdd\x01\x48\x00\x0f\x04\x01\x03\x32\x00\x75\x05\x6c\x04\x46\x02\x4c\xff\x41\x00\x44\x04\xdd\x02\x19\xff\xb3\x01\xde\x01\x75\x05\x6c\x04\x0a\x01\x08\x03\x98\x05\x77\x05\x78\x05\x42\x00\xc8\x02\x1e\x02\x4e\x00\xb4\x01\x6b\x04\x6c\x04\x49\x01\xea\x02\x9e\x05\xa4\x04\xad\x02\xbd\x01\xb5\xfe\x47\x02\x87\x05\x1e\x02\xb7\xfe\xec\x01\x62\x03\x78\x02\xa5\xff\xaf\x02\x8c\x04\x4c\xff\x91\x02\x7a\x03\xf5\x00\xa5\x04\x48\x00\x90\x00\x33\x00\xb1\x02\xa8\x02\x93\x00\x1f\x02\x1f\x02\x95\x00\x96\x00\x97\x00\x98\x00\x72\x03\xb2\x02\xb3\x02\xb4\x02\x20\x02\xa4\x02\x0e\x01\x2d\x01\x2e\x01\x1e\x02\x74\x00\x1a\x01\xb5\xfe\x2b\x04\xd9\x03\xef\x01\xb7\xfe\xc9\x02\x1f\x02\x44\x00\x45\x00\x4f\x03\x7f\x05\x47\x00\x48\x00\x1c\x01\x82\x00\xa2\x03\xfa\x01\xf0\x01\x4d\x00\x11\x00\x72\x05\x1c\x01\x4b\x02\x4b\x00\x4f\x03\x4d\x00\x2f\x01\x11\x00\x1c\x01\x4e\x00\x9f\x00\xa0\x00\x11\x00\x0c\x03\x11\x00\x1d\x01\x4e\x00\x9e\x02\x08\x01\x11\x00\xa1\x00\x73\x00\x4c\x04\xa5\x04\x48\x00\x74\x00\x75\x00\x85\x04\x11\x00\x85\x04\x2c\x05\x1e\x02\x1f\x02\x9d\x02\x0a\x03\x4c\x02\x4c\x04\x0c\x03\x4e\x00\x8d\x00\x4e\x00\x4e\x00\x11\x00\x11\x00\x48\x03\x3c\x02\x1f\x02\x48\x03\x1c\x01\xd7\x00\xa2\x00\x1c\x01\x0f\x00\xd8\x00\x11\x00\x98\x03\x0f\x01\x11\x00\x4c\x04\x11\x00\x36\x00\x7d\x00\x7e\x00\x4f\x03\x11\x00\xa3\x00\x6d\x04\x1c\x01\x6e\x04\x48\x00\x72\x00\x73\x00\x18\x03\x11\x00\x7e\x03\x74\x00\x75\x00\x1e\x02\x76\x00\x33\x00\x1f\x02\xf0\x01\xff\xff\x3d\x02\x6f\x04\x1c\x01\x0f\x00\x10\x00\xf0\x01\x96\x03\xff\xff\x11\x00\x1c\x01\x11\x00\x77\x00\x3c\x04\xf9\x01\x19\x03\x11\x00\x34\x00\x0e\x00\x1e\x02\x0f\x00\x10\x00\x78\x00\x51\x05\x79\x00\x7a\x00\x7b\x00\x11\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x54\x05\x23\x02\x6d\x04\x54\x05\x6e\x04\x48\x00\x0e\x02\x23\x02\x51\x05\x9c\x03\x0d\x04\xda\x02\x6d\x04\x23\x02\x6e\x04\x48\x00\x7f\x03\x23\x02\x23\x02\x1f\x02\x6f\x04\xdb\x02\x0f\x00\x10\x00\x6d\x04\xbb\x02\x6e\x04\x48\x00\xfc\x04\x11\x00\x6f\x04\xf2\x01\x0f\x00\x10\x00\x6d\x04\x1e\x02\x6e\x04\x48\x00\xc2\x01\x11\x00\x1e\x02\xc3\x01\x6f\x04\x0e\x04\x0f\x00\x10\x00\x6d\x04\x3d\x02\x6e\x04\x48\x00\xd3\x00\x11\x00\x6f\x04\x49\x01\x0f\x00\x10\x00\x61\x04\x62\x04\xea\x00\xeb\x00\xec\x00\x11\x00\xed\x00\xa5\x02\x6f\x04\x1f\x02\x0f\x00\x10\x00\x41\x00\xf7\x01\xf8\x01\xf9\x01\x13\x02\x11\x00\xf2\x04\xa6\x02\xa7\x02\xc4\x02\xee\x00\xef\x00\xff\xff\x42\x00\x51\x04\x35\x02\xf8\x01\xf9\x01\x10\x02\xf0\x00\xf1\x00\x1f\x02\x09\x02\x82\x00\xf2\x00\xd9\x01\x7b\x00\x90\x02\x7c\x00\xd4\x00\xd4\x04\xfa\x01\xa8\x02\x4d\x00\x14\x01\x58\x03\xf8\x01\xf9\x01\x36\x00\x52\x04\xc5\x02\x8a\x02\x4a\x01\x4b\x01\x4e\x00\x3c\x00\x3d\x00\x3e\x00\x8b\x02\x3f\x00\x40\x00\x08\x02\xc6\x02\x10\x01\x5e\x04\x5f\x04\x6a\x01\xd3\x00\xf3\x00\x25\x01\x26\x01\xbd\x01\x6b\x01\x1d\x03\xe9\x00\xea\x00\xeb\x00\xec\x00\x8d\x00\xed\x00\x1f\x02\x1a\x03\x90\x00\x44\x00\x45\x00\x1f\x02\x14\x03\x47\x00\x48\x00\x98\x03\xdc\x03\x8c\x02\xca\x03\x2d\x00\x68\x05\xee\x00\xef\x00\x41\x00\xfe\x01\x4b\x00\x2e\x00\x4d\x00\x2f\x00\xc4\x02\xf0\x00\xf1\x00\x28\x04\xf8\x01\xf9\x01\xf2\x00\x42\x00\xa6\xff\x4e\x00\x1e\x03\xd4\x00\x18\x03\xdd\x03\x60\x04\xbc\x02\x73\x00\xf4\x00\x1b\x03\x67\x01\x74\x00\x75\x00\xf5\x00\x15\x03\x91\x02\x90\x00\x92\x02\xf6\x00\xfa\x01\x93\x00\x4d\x00\xc5\x02\x95\x00\x96\x00\x97\x00\x98\x00\x67\x01\x19\x03\x99\x00\x9a\x00\xf3\x00\x4e\x00\xfa\x01\x43\x03\x4d\x00\xbd\x02\xd9\x02\x0f\x00\x10\x00\xec\x04\xea\x04\xf7\x01\x6b\x01\xa7\x04\x11\x00\x4e\x00\x7d\x00\x7e\x00\xab\x04\xf8\x01\xf9\x01\x0f\x01\xfa\x01\x0f\x02\x4d\x00\xa2\x02\xc1\x04\x44\x00\x45\x00\x6b\x01\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4e\x00\xeb\x04\x10\x02\x9f\x00\xa0\x00\x10\x01\xa8\x04\xa9\x04\x4b\x00\x4c\x00\x4d\x00\x67\x01\xc2\x04\xa1\x00\x73\x00\x27\x01\x28\x01\xf4\x00\x74\x00\x75\x00\x19\x01\x4e\x00\xf5\x00\x74\x00\x1a\x01\x90\x00\x3c\x03\xf6\x00\x37\x02\x93\x00\xc8\x04\xf8\x03\x95\x00\x96\x00\x97\x00\x98\x00\x16\x02\x17\x02\x99\x00\x9a\x00\x94\x02\x38\x02\xd7\x00\xa2\x00\x6b\x01\x0f\x00\xd8\x00\x1b\x01\xfa\x01\xf6\x01\x4d\x00\x1c\x01\x11\x00\xe1\x03\x7d\x00\x7e\x00\xe2\x03\x11\x00\xa3\x00\xff\xff\x1d\x01\x4e\x00\xd3\x00\xc9\x04\xca\x04\xaa\x04\x33\x01\x2a\x03\x82\x00\x9f\x03\xea\x00\xeb\x00\xec\x00\x18\x05\xed\x00\xf9\x03\x64\x00\x6f\x02\x9f\x00\xa0\x00\x68\x00\xd3\x00\x34\x01\x11\x00\x22\x03\xe3\x03\x2b\x03\x2c\x03\xa1\x00\x73\x00\xee\x00\xef\x00\x10\x01\x74\x00\x75\x00\x64\x00\x67\x02\x68\x02\x69\x02\xf0\x00\xf1\x00\x6a\x01\xd7\x03\xfa\x01\xf2\x00\x4d\x00\x1c\x01\x6b\x01\x88\x04\xd4\x00\x89\x04\xfa\x02\x11\x00\x8d\x00\xf6\x03\x69\x02\x4e\x00\xd7\x00\xa2\x00\x57\x00\x0f\x00\xd8\x00\x64\x00\xf2\x00\x3e\x02\x82\x00\x68\x00\x11\x00\xd4\x00\x7d\x00\x7e\x00\x58\x00\x3f\x02\xa3\x00\x8a\x04\x8b\x04\x1f\x03\x84\x00\xf3\x00\x20\x03\x5c\x00\x85\x00\x6a\x02\x6b\x02\x0f\x00\x6c\x02\x86\x00\x1e\x03\x28\x01\x27\x01\x28\x01\x11\x00\x19\x01\x17\x05\x19\x01\x74\x00\x1a\x01\x74\x00\x1a\x01\x6a\x02\x6b\x02\x0f\x00\x6c\x02\x65\x00\x66\x00\x53\x01\xe9\x04\xea\x04\x11\x00\x8c\x00\x8d\x00\x84\x00\x10\x01\x8f\x00\x90\x00\x85\x00\x53\x04\x59\x05\xea\x04\x1b\x01\x86\x00\x1b\x01\x18\x02\x1c\x01\x54\x04\x1c\x01\xa2\x02\x4a\x00\xa9\x01\x11\x00\xf4\x00\x11\x00\x1d\x01\xeb\x04\x1d\x01\xf5\x00\x19\x02\x1a\x02\x90\x00\xd3\x00\xf6\x00\x9a\x02\x93\x00\x8c\x00\xeb\x04\x95\x00\x96\x00\x97\x00\x98\x00\xaf\x02\x8c\x04\x99\x00\x9a\x00\x87\xfd\xf5\x00\x88\x05\xc1\x01\x90\x00\xe7\x01\xb1\x02\x4c\x01\x93\x00\xd1\x04\x89\x05\x95\x00\x96\x00\x97\x00\x98\x00\x13\x01\xb2\x02\xb3\x02\xb4\x02\x14\x01\x6c\x01\x73\x00\xff\xff\x10\x02\x6d\x01\x74\x00\x75\x00\xd0\x04\xf2\x00\xaa\x04\x82\x00\x7e\x01\x2e\x01\xd4\x00\x74\x00\x1a\x01\x44\x01\xc0\x01\x9f\x00\xa0\x00\x64\x00\x10\x02\x84\x00\xb8\x02\x68\x00\x28\x02\x85\x00\x0f\x03\xa1\x00\x73\x00\x87\x01\x86\x00\x10\x03\x74\x00\x75\x00\x84\x01\x20\x02\x9f\x00\xa0\x00\xa1\x03\xd3\x00\x7d\x00\x7e\x00\x6a\x01\x45\x01\x46\x01\x47\x01\xa1\x00\x73\x00\x6b\x01\xa2\x03\x1d\x01\x74\x00\x75\x00\x8c\x00\x8d\x00\xff\xff\xd7\x00\xa2\x00\x5c\x02\x0f\x00\xd8\x00\x87\x00\x97\x03\x31\x01\x42\x02\x89\x00\x11\x00\x2e\x03\x7d\x00\x7e\x00\xff\xff\x95\x03\xa3\x00\x98\x03\x8b\x00\xd7\x00\xa2\x00\x0b\xfd\x0f\x00\xd8\x00\x56\x01\xf2\x00\x96\x03\x2f\x03\x30\x03\x11\x00\xd4\x00\x7d\x00\x7e\x00\xfb\x04\x82\x01\xa3\x00\x83\x01\xaf\x02\xb0\x02\xa4\x01\xae\x02\x54\x01\xf5\x00\x6b\x01\xfc\x04\x90\x00\x18\xff\xb1\x02\x34\x02\x93\x00\x4d\x00\x48\x01\x95\x00\x96\x00\x97\x00\x98\x00\x4d\x01\xb2\x02\xb3\x02\xb4\x02\x2c\x01\x4e\x00\x6c\x01\x73\x00\xf1\x04\x66\x02\x85\x03\x74\x00\x75\x00\x4e\x01\xf8\x02\x4f\x01\x50\x01\x47\x00\x48\x00\xf2\x04\x33\x02\x87\x00\x4d\x00\x6f\x01\x34\x01\x89\x00\x78\x00\x13\x01\x79\x00\x7a\x00\x7b\x00\x14\x01\x7c\x00\x4e\x00\x8b\x00\x7f\x00\x80\x00\x32\x04\x8e\x00\x4d\x00\xb9\x02\xb6\x02\xb7\x02\xa0\x00\x0a\x01\x0b\x01\x41\x00\x7d\x00\x7e\x00\x0c\x01\x4e\x00\xd3\x04\xa1\x00\x73\x00\xd3\x00\xaf\x02\xb0\x02\x74\x00\x75\x00\x42\x00\xf5\x00\xff\xff\xd4\x04\x90\x00\x98\x01\xb1\x02\x99\x01\x93\x00\x29\x05\x67\x05\x95\x00\x96\x00\x97\x00\x98\x00\x18\x01\xb2\x02\xb3\x02\xb4\x02\x93\x04\x98\x03\x68\x05\xd7\x00\xa2\x00\x4e\x02\x0f\x00\xd8\x00\x84\x00\x6a\x05\xff\xff\x11\x00\x85\x00\x11\x00\x4b\x03\x7d\x00\x7e\x00\x86\x00\xf2\x00\xa3\x00\x4e\x00\x2e\x03\x36\x00\xd4\x00\xe9\x02\x94\x04\x9a\x04\x35\x01\xea\x02\x36\x01\x3d\x00\x3e\x00\x27\x03\x3f\x00\x40\x00\x1c\x02\xb5\x02\xb6\x02\xb7\x02\xa0\x00\x8c\x00\x44\x00\x45\x00\x5f\x02\x8f\x00\x47\x00\x48\x00\x42\x02\xa1\x00\x73\x00\xd3\x00\x25\x03\x44\x02\x74\x00\x75\x00\x83\xfe\x1c\x03\x4b\x00\x45\x02\x4d\x00\x10\x05\x73\x00\x83\xfe\x42\x04\x48\x02\x74\x00\x75\x00\x1c\x01\x42\x02\x41\x02\x4e\x00\x41\x00\x16\x03\x11\x00\x93\x04\x42\x02\x8b\x05\xd7\x00\xa2\x00\x83\xfe\x0f\x00\xd8\x00\x8c\x05\xd3\x02\x42\x00\x6f\x02\x92\x01\x11\x00\x93\x01\x7d\x00\x7e\x00\x11\x00\xf2\x00\xa3\x00\x8b\x01\x0b\x03\x8c\x01\xd4\x00\x8d\x01\x94\x04\x95\x04\x7d\x00\x7e\x00\xff\x02\xaf\x02\x96\x04\x98\xfe\x64\x00\xf7\x02\xf5\x00\x98\xfe\x68\x00\x90\x00\xf6\x02\xb1\x02\x6e\x02\x93\x00\x6f\x02\xf5\x02\x95\x00\x96\x00\x97\x00\x98\x00\x11\x00\xb2\x02\xb3\x02\xb4\x02\x99\x05\x73\x00\xf4\x02\x83\xfe\x83\xfe\x74\x00\x75\x00\x4e\x02\x83\xfe\xf3\x02\x05\x02\x06\x02\x82\x01\x11\x00\x83\x01\xcc\x01\x7e\x00\x44\x00\x37\x01\xed\x02\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x38\x02\x7b\x00\x07\x02\x7c\x00\x83\xfe\x56\x01\x83\xfe\xca\x02\x4b\x00\x4c\x00\x4d\x00\xd0\x01\x4c\x03\x9f\x00\xa0\x00\x83\xfe\x7d\x00\x7e\x00\x11\x00\x7b\x04\x84\x02\x4e\x00\x85\x02\xa1\x00\x73\x00\x11\x00\xaf\x02\x96\x04\x74\x00\x75\x00\xd3\x00\xf5\x00\xeb\x02\xbd\x01\x90\x00\x05\x04\xb1\x02\x80\x03\x93\x00\x6f\x02\xde\x02\x95\x00\x96\x00\x97\x00\x98\x00\x11\x00\xb2\x02\xb3\x02\xb4\x02\x81\x02\x13\x01\x82\x02\xd7\x00\xa2\x00\x14\x01\x0f\x00\xd8\x00\x88\x04\x84\x02\x89\x04\x85\x02\x83\xfe\x11\x00\xdd\x02\x7d\x00\x7e\x00\x7e\x01\x93\x03\xa3\x00\x74\x00\x1a\x01\xd8\x02\xf2\x00\xff\xfd\x82\x00\xc7\x01\x0e\x00\xd4\x00\x0f\x00\x10\x00\xff\xfd\x5e\x02\xff\xfd\x34\x05\xd6\x02\x11\x00\x84\x00\x9f\x00\xa0\x00\xf6\xfc\x85\x00\xc8\x01\xc9\x01\xca\x01\xcb\x01\x86\x00\xd1\x02\xa1\x00\x73\x00\x5d\x02\x82\x00\xff\xfd\x74\x00\x75\x00\xd3\x00\xff\xfd\x1d\x01\xff\xfd\x7c\x01\xff\xfd\x0f\x00\x10\x00\x84\x00\xff\xfd\x53\x01\xd0\x02\x85\x00\x11\x00\x8c\x00\x8d\x00\xce\x02\x86\x00\x8f\x00\x90\x00\x30\x05\x2e\x05\xd7\x00\xa2\x00\x93\x04\x0f\x00\xd8\x00\x7e\x01\x3f\x05\xca\x02\x74\x00\x1a\x01\x11\x00\xd0\x01\x7d\x00\x7e\x00\x53\x01\xcd\x02\xa3\x00\x57\x00\x8c\x00\x8d\x00\xf2\x00\xcc\x02\x8f\x00\x90\x00\xbf\x02\xd4\x00\xda\x04\x3c\x05\x6f\x02\x58\x00\xcf\x01\x80\x00\xaf\x02\x8c\x04\x11\x00\xd0\x01\xbb\x02\xf5\x00\x5c\x00\x82\x00\x90\x00\x7b\x04\xb1\x02\x7c\x02\x93\x00\x1d\x01\xec\x01\x95\x00\x96\x00\x97\x00\x98\x00\x84\x00\xb2\x02\xb3\x02\xb4\x02\x85\x00\x3e\x01\x3f\x01\x40\x01\x41\x01\x86\x00\x65\x00\x66\x00\x36\x00\xa1\x02\x69\x00\x6a\x00\x3a\x04\xfc\x02\x3b\x04\x36\x01\x3d\x00\x3e\x00\x55\x03\x3f\x00\x40\x00\x47\x00\x48\x00\x87\x00\x53\x01\x6f\x01\xa0\x02\x89\x00\x8c\x00\x8d\x00\x2d\x05\x2e\x05\x8f\x00\x90\x00\x7c\x03\x7d\x03\x8b\x00\xd3\x00\x9f\x00\xa0\x00\x8e\x00\x9b\x02\xf6\xfd\x31\x04\xf6\xfd\x32\x04\xf6\xfd\x8d\x02\xa1\x00\x73\x00\x7b\x02\xaf\x02\x96\x04\x74\x00\x75\x00\xf6\xfd\xf5\x00\x41\x00\x82\x01\x90\x00\x83\x01\xb1\x02\xef\x03\x93\x00\xf0\x03\x99\x02\x95\x00\x96\x00\x97\x00\x98\x00\x42\x00\xb2\x02\xb3\x02\xb4\x02\x5c\x03\x5d\x03\x82\x00\xd7\x00\xa2\x00\xf2\x00\x0f\x00\xd8\x00\x11\x05\x90\x02\xd4\x00\x47\x00\x48\x00\x11\x00\x84\x00\x7d\x00\x7e\x00\x89\x02\x85\x00\xa3\x00\x07\x05\x36\x00\x76\x01\x86\x00\x0f\x00\x10\x00\xfc\x02\x88\x02\x36\x01\x3d\x00\x3e\x00\x11\x00\x3f\x00\x40\x00\xcd\x04\x6a\x01\xce\x04\xd3\x00\x9f\x00\xa0\x00\x86\x02\x6b\x01\x59\x04\x5a\x04\x5b\x04\x5c\x04\x8c\x00\x8d\x00\xa1\x00\x73\x00\x8f\x00\x90\x00\x7f\x02\x74\x00\x75\x00\x7e\x02\x44\x00\x45\x00\xfb\x02\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x38\x02\x7b\x00\xc6\x02\x7c\x00\x0f\x00\x10\x00\x41\x00\x7d\x02\x4b\x00\x4c\x00\x4d\x00\x11\x00\x7c\x02\xd7\x00\xa2\x00\xf2\x00\x0f\x00\xd8\x00\x7b\x02\x42\x00\xd4\x00\x4e\x00\x10\x03\x11\x00\x11\x03\x7d\x00\x7e\x00\xaf\x02\xb0\x02\xa3\x00\x06\x05\x31\x02\xf5\x00\xbd\x01\xa1\x04\x90\x00\xa2\x04\xb1\x02\x73\x02\x93\x00\x2f\x02\xa5\x02\x95\x00\x96\x00\x97\x00\x98\x00\x61\x02\xb2\x02\xb3\x02\xb4\x02\xcb\x01\x10\x00\x60\x02\x12\x04\xa7\x02\x7c\x03\x7d\x03\x11\x00\x36\x00\xcc\x01\x7e\x00\x5e\x02\x7f\x04\xfc\x02\x80\x04\x36\x01\x3d\x00\x3e\x00\x41\x00\x3f\x00\x40\x00\xd9\x01\x7b\x00\x68\x04\x7c\x00\x69\x04\x5d\x02\x41\x00\xa8\x02\x44\x00\x45\x00\x42\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\xd3\x00\x9f\x00\xa0\x00\x42\x00\xc1\x02\x5b\x02\x0f\x00\x10\x00\x4b\x00\x4c\x00\x4d\x00\xa1\x00\x73\x00\x11\x00\xaf\x02\xb0\x02\x74\x00\x75\x00\xd3\x00\xf5\x00\x41\x00\x4e\x00\x90\x00\x02\x05\xb1\x02\x03\x05\x93\x00\x16\x02\x17\x02\x95\x00\x96\x00\x97\x00\x98\x00\x42\x00\xb2\x02\xb3\x02\xb4\x02\x21\x01\x22\x01\x23\x01\xd7\x00\xa2\x00\xf2\x00\x0f\x00\xd8\x00\x4a\x02\x68\x04\xd4\x00\x69\x04\xe2\x01\x11\x00\xe3\x01\x7d\x00\x7e\x00\x44\x00\x45\x00\xa3\x00\x4e\x02\x47\x00\x48\x00\xe5\x02\xe6\x02\xe7\x02\x44\x00\x45\x00\xd4\x00\x4d\x02\x47\x00\x48\x00\x73\x02\x4b\x00\xbb\x01\x4d\x00\x3b\x05\x3c\x05\x9f\x00\xa0\x00\x49\x02\x21\x01\x4b\x00\x3b\x03\x4d\x00\x40\x02\x4e\x00\x3b\x02\xa1\x00\x73\x00\x69\x03\x6a\x03\x6b\x03\x74\x00\x75\x00\x4e\x00\x44\x00\x45\x00\x3a\x02\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\xf2\x04\x87\x01\x88\x01\x45\x00\x3b\x05\x62\x05\x47\x00\x48\x00\x4b\x00\x4c\x00\x4d\x00\x16\x02\x17\x02\xd7\x00\xa2\x00\x2f\x02\x0f\x00\xd8\x00\x89\x01\x1c\x02\x4d\x00\x4e\x00\x33\x03\x11\x00\x25\x01\x7d\x00\x7e\x00\xaf\x02\x15\x04\xa3\x00\x33\x03\x4e\x00\xf5\x00\x7c\x03\x7d\x03\x90\x00\x08\x01\xb1\x02\x0e\x02\x93\x00\x0e\x02\x0c\x02\x95\x00\x96\x00\x97\x00\x98\x00\xe4\x03\xb2\x02\xb3\x02\xb4\x02\xd5\x00\x0b\x02\x0c\x02\x90\x00\xdb\x03\xd6\x00\xde\x03\x93\x00\x7f\x01\xb7\x01\x95\x00\x96\x00\x97\x00\x98\x00\x36\x00\xd1\x03\x99\x00\x9a\x00\x2b\x02\xf3\x04\xd2\x03\x36\x01\x3d\x00\x3e\x00\xd8\xfc\x3f\x00\x40\x00\xf5\xfc\x3f\x03\x28\x01\x5d\x03\x5e\x03\x5f\x03\x19\x01\xd1\x02\x10\x00\x74\x00\x1a\x01\x9f\x00\xa0\x00\xdf\xfc\x11\x00\xe0\xfc\xcc\x01\x7e\x00\x38\x05\x7f\x01\x80\x01\xa1\x00\x73\x00\x22\x04\x23\x04\x24\x04\x74\x00\x75\x00\x41\x00\x9f\x00\xa0\x00\x7d\x01\x78\x01\x1b\x01\x41\x01\x42\x01\x41\x00\x1c\x01\xf4\xfc\xa1\x00\x73\x00\x42\x00\x4c\x02\x11\x00\x74\x00\x75\x00\x1d\x01\x7a\x01\x78\x01\x42\x00\xd7\x00\xa2\x00\xd0\x03\x0f\x00\xd8\x00\x03\x03\x04\x03\x05\x03\x06\x03\x07\x03\x11\x00\xd9\xfc\x7d\x00\x7e\x00\x33\x05\xda\xfc\xa3\x00\xcf\x03\xd7\x00\xa2\x00\xce\x03\x0f\x00\xd8\x00\xce\x01\xa4\x01\x7b\x00\xcd\x03\x7c\x00\x11\x00\xc9\x03\x7d\x00\x7e\x00\x36\x00\xcc\x03\xa3\x00\x77\x01\x78\x01\xfc\x02\x06\xfd\x36\x01\x3d\x00\x3e\x00\xc8\x03\x3f\x00\x40\x00\xc7\x03\xce\x01\xa4\x01\x7b\x00\x7d\x05\x7c\x00\x44\x00\x45\x00\xcf\x01\x80\x00\x47\x00\x48\x00\x6b\x01\xd0\x01\x44\x00\x45\x00\x46\x02\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x9d\x03\x4d\x00\x09\x04\x02\x04\x03\x04\x9e\x03\xbb\x01\x4b\x00\x4c\x00\x4d\x00\x36\x00\x93\x03\x4e\x00\x41\x00\x43\x02\xfc\x02\x92\x03\x36\x01\x3d\x00\x3e\x00\x4e\x00\x3f\x00\x40\x00\x01\x04\x02\x04\x03\x04\x42\x00\xbb\x01\x91\x03\xc9\x02\x71\x01\x72\x01\x73\x01\x90\x03\x74\x01\xce\x01\xa4\x01\x7b\x00\x19\x01\x7c\x00\x8f\x03\x74\x00\x1a\x01\x29\x01\x2a\x01\x36\x00\x1d\x04\x1e\x04\x1f\x04\x8e\x03\xfc\x02\x8d\x03\x36\x01\x3d\x00\x3e\x00\x8c\x03\x3f\x00\x40\x00\x8b\x03\x41\x00\xde\x02\x86\x03\x88\x01\x45\x00\x88\x03\x1b\x01\x47\x00\x48\x00\x85\x03\x1c\x01\xa2\x02\x4a\x00\x42\x00\x38\x02\x7b\x00\x11\x00\x7c\x00\x84\x03\x1d\x01\x67\x01\xca\x02\xa2\x04\x23\x04\x24\x04\xd0\x01\x0a\xfd\x44\x00\x45\x00\x6e\x03\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x41\x00\x9c\x04\x23\x04\x24\x04\x0e\x05\xef\x04\x23\x04\x24\x04\x4b\x00\x4c\x00\x4d\x00\x81\x03\x82\x03\x42\x00\x7f\x01\x2c\x04\x84\x00\xca\x04\xc6\x04\x36\x00\x85\x00\x4e\x00\x69\x03\x4a\x01\x4b\x01\x86\x00\x3c\x00\x3d\x00\x3e\x00\x67\x03\x3f\x00\x40\x00\x96\x05\x23\x04\x24\x04\x66\x03\x75\x03\x64\x03\x44\x00\x45\x00\x5a\x03\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x16\x04\x17\x04\x8c\x00\x0f\x05\xc5\x04\xc6\x04\x8f\x00\x10\x05\x4b\x00\x4c\x00\x4d\x00\xa0\x05\x23\x04\x24\x04\x91\x04\x6b\x03\x8b\x00\x64\x05\x0c\x05\x5c\x04\x2c\x01\x4e\x00\x41\x00\xe1\x04\x1f\x04\x6e\x05\x6f\x05\x44\x00\x45\x00\x3f\x03\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x38\x03\x37\x03\x36\x03\x33\x03\x08\x01\x12\x04\x36\x00\x4b\x00\x4c\x00\x4d\x00\x76\x03\x77\x03\x61\x04\x3c\x00\x3d\x00\x3e\x00\x90\x00\x3f\x00\x40\x00\x59\x04\x4e\x00\x58\x04\x56\x04\xac\x01\x96\x00\x97\x00\x98\x00\x82\x00\x55\x04\x99\x00\x9a\x00\x50\x04\x4a\x04\x36\x00\x48\x04\xaa\x02\x47\x04\x76\x03\x77\x03\x84\x00\x3c\x00\x3d\x00\x3e\x00\x85\x00\x3f\x00\x40\x00\x46\x04\x44\x04\x86\x00\x00\xfd\x42\x04\xff\xfc\x01\xfd\x40\x04\x35\x04\x41\x00\x2f\x04\x74\x03\x28\x04\x44\x00\x45\x00\x26\x04\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\xab\x02\x42\x00\x9f\x00\xa0\x00\x8c\x00\x8d\x00\x21\x04\x2a\x04\x4b\x00\x4c\x00\x4d\x00\x1d\x04\xa1\x00\x73\x00\x46\x02\x41\x00\x1b\x04\x74\x00\x75\x00\x6b\x00\x06\x04\x4e\x00\x36\x00\x37\x00\xdf\x01\x39\x00\x3a\x00\x3b\x00\x42\x00\x3c\x00\x3d\x00\x3e\x00\x12\x04\x3f\x00\x40\x00\x08\x04\x00\x04\xfe\x03\xe0\x01\xe1\x01\x4b\x02\xed\x03\xa2\x00\xf4\x03\x0f\x00\x10\x00\xeb\x03\xf5\x03\xea\x03\xcf\x04\xc5\x04\x11\x00\xc4\x04\x7d\x00\x7e\x00\xc3\x04\x7b\x02\xa3\x00\x74\x03\xbd\x01\x99\x03\x44\x00\x45\x00\xbb\x04\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x65\x04\xb3\x04\x41\x00\xb4\x04\xb2\x04\xb1\x04\x26\x04\x28\x04\x4b\x00\x4c\x00\x4d\x00\xa0\x04\x26\x04\x88\x04\x83\x04\x42\x00\x7e\x04\x75\x04\x7a\x04\x44\x00\x45\x00\x4e\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x76\x04\x79\x04\x25\x01\x16\x05\x12\x04\x15\x05\x36\x03\x65\x04\x4b\x00\x4c\x00\x4d\x00\x36\x00\x37\x00\x4f\x02\x39\x00\x3a\x00\x3b\x00\x0a\x05\x3c\x00\x3d\x00\x3e\x00\x4e\x00\x3f\x00\x40\x00\x05\x05\x04\x05\xfe\x04\xf9\x04\x43\x00\x26\x04\x36\x00\x37\x00\xe5\x01\x39\x00\x3a\x00\x3b\x00\x47\x01\x3c\x00\x3d\x00\x3e\x00\xe4\x04\x3f\x00\x40\x00\xe3\x04\x7e\xfe\x21\x04\xdd\x04\x4e\x05\x44\x00\x45\x00\x18\x01\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4c\x05\x47\x05\x43\x05\x44\x05\x41\x00\x41\x05\x82\x00\x56\x01\x4b\x00\x4c\x00\x4d\x00\x3f\x05\x18\x01\x3e\x05\xd2\x01\x26\x05\x19\x01\x42\x00\x84\x00\x74\x00\x1a\x01\x4e\x00\x85\x00\x41\x00\x24\x05\x23\x05\x36\x00\x86\x00\x22\x05\x33\x03\xe2\x01\xfa\x02\xe3\x01\x36\x01\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x6a\x01\x1c\x05\x1a\x05\x74\x05\x1b\x01\x6c\x05\x6b\x01\x73\x05\x1c\x01\x66\x05\x6d\x05\x8c\x00\x8d\x00\x69\x03\x11\x00\x8f\x00\x90\x00\x1d\x01\x43\x00\x5b\x05\x36\x00\x37\x00\xe5\x01\x39\x00\x3a\x00\x3b\x00\x8a\x05\x3c\x00\x3d\x00\x3e\x00\x85\x05\x3f\x00\x40\x00\x82\x05\x33\x03\x9c\x05\x41\x00\x43\x00\x44\x00\x45\x00\x7d\x05\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x15\x05\x28\x04\x9d\x05\x42\x00\x26\x04\x95\x05\xa4\x05\xa5\x05\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x26\x04\x46\x00\x47\x00\x48\x00\xe6\x01\x4a\x00\x38\x02\x7b\x00\x4e\x00\x7c\x00\x41\x00\xa0\x05\xcf\x01\x80\x00\x4b\x00\x4c\x00\x4d\x00\xd0\x01\xd3\x01\xa7\x05\xd4\x01\x08\x01\x06\x01\x42\x00\xd5\x01\x12\x02\x11\x02\x4e\x00\x6f\x01\x70\x01\x71\x01\x72\x01\x73\x01\x90\x01\x74\x01\x03\x02\xe7\x01\xb5\x01\x19\x01\xcd\x01\x85\x01\x74\x00\x1a\x01\x99\x01\x54\x01\x96\x01\x3c\x01\x31\x01\xd8\x01\x16\x01\x44\x00\x45\x00\x1c\x01\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x11\x00\x15\x01\x7d\x00\x7e\x00\x11\x01\x43\x00\x29\x03\x1b\x01\x4b\x00\x4c\x00\x4d\x00\x1c\x01\x28\x03\x27\x03\x25\x03\x16\x03\x07\x03\x11\x00\x01\x03\x03\x02\x1d\x01\x4e\x00\xeb\x02\xdf\x02\xce\x02\x44\x00\x45\x00\xc2\x02\x46\x00\x47\x00\x48\x00\xe6\x01\x4a\x00\x82\x02\x7f\x02\x79\x02\x1c\x02\x17\x02\x94\x02\x14\x02\xe8\x03\x80\x05\x4c\x00\x4d\x00\xe7\x03\xe5\x03\xe6\x03\x2e\x03\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe4\x03\xdf\x03\x4e\x00\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\x77\x02\xa2\x03\x6c\x03\xca\x03\xe7\x01\xe7\xfc\xe7\xfc\x67\x03\x64\x03\xe7\xfc\xe7\xfc\xe7\xfc\x62\x03\xe7\xfc\xe7\xfc\x9e\x03\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\x5a\x03\xe7\xfc\xe7\xfc\xe7\xfc\x9a\x03\x99\x03\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\x40\x03\x4b\x03\x43\x03\x41\x03\x3d\x03\x3a\x03\x38\x03\x34\x03\x33\x03\xe7\xfc\xe7\xfc\x31\x03\x63\x04\x56\x04\x48\x04\x3e\x04\x38\x04\x3b\x04\x2f\x04\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\x2d\x04\x26\x04\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\x10\x04\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xed\x03\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xeb\x03\x08\x04\x00\x04\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xcf\x04\xcb\x04\xbf\x04\xbd\x04\x77\x02\xdb\xfd\xdb\xfd\x9d\x04\xaa\x04\xdb\xfd\xdb\xfd\xdb\xfd\x92\x04\xdb\xfd\xdb\xfd\x86\x04\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x76\x04\xdb\xfd\xdb\xfd\xdb\xfd\x77\x04\x6a\x04\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x69\x04\x66\x04\x65\x04\x16\x05\x13\x05\x12\x05\x0b\x05\x00\x05\xff\x04\xdb\xfd\xdb\xfd\xfe\x04\xf9\x04\xfc\x04\xe7\x04\xd7\x04\xf7\x04\xd8\x04\xd9\x04\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x4e\x05\x4c\x05\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x49\x05\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x41\x05\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x48\x05\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xc9\xfd\xc9\xfd\x13\x00\xc9\xfd\x39\x05\x32\x05\x29\x05\xc9\xfd\xc9\xfd\x14\x00\xc9\xfd\x24\x05\x1a\x05\x63\x05\x6d\x05\x56\x05\xc9\xfd\xc9\xfd\x60\x05\x69\x05\xc9\xfd\x15\x00\xc9\xfd\x68\x05\xc9\xfd\xc9\xfd\x55\x05\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\xc9\xfd\xc9\xfd\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xc9\xfd\x83\x05\x24\x00\xc9\xfd\xc9\xfd\x9d\x05\x9a\x05\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x97\x05\x93\x05\x8f\x05\x8d\x05\xa2\x05\xa1\x05\x00\x00\xa5\x05\x00\x00\xc9\xfd\xc9\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\x00\x00\x00\x00\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\x00\x00\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\x00\x00\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\x00\x00\xc9\xfd\x8b\x01\xc9\xfd\x8c\x01\xc9\xfd\x8d\x01\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\x63\x00\x64\x00\xc9\xfd\xc9\xfd\xc9\xfd\x68\x00\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\xc9\xfd\x7d\xfe\x50\x00\x13\x00\x7d\xfe\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x14\x00\x7d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x7d\xfe\x15\x00\x7d\xfe\x00\x00\x7d\xfe\x7d\xfe\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x7d\xfe\x7d\xfe\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x7d\xfe\x00\x00\x24\x00\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x57\x00\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x00\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x00\x00\x7d\xfe\x58\x00\x59\x00\x5a\x00\x7d\xfe\x5b\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x5c\x00\x00\x00\x00\x00\x03\x02\x7d\xfe\x5d\x00\x7d\xfe\x00\x00\x7d\xfe\x5e\x00\x7d\xfe\x5f\x00\x7d\xfe\x60\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x6c\x00\x6d\x00\x6e\x00\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x7d\xfe\x6f\x00\x7d\xfe\x7d\xfe\x70\x00\x71\x00\x7d\xfe\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x00\x00\x00\x00\x00\x00\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\xfd\x31\xfd\x00\x00\x00\x00\x31\xfd\x31\xfd\x31\xfd\x00\x00\x31\xfd\x31\xfd\x00\x00\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x00\x00\x31\xfd\x31\xfd\x31\xfd\x00\x00\x00\x00\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\xfd\x31\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x00\x00\x00\x00\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x00\x00\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x00\x00\x00\x00\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x00\x00\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x6f\xfe\x6f\xfe\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x00\x00\x00\x00\x00\x00\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\xfe\x83\xfe\x00\x00\x00\x00\x83\xfe\x83\xfe\x83\xfe\x00\x00\x83\xfe\x83\xfe\x00\x00\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x00\x00\x83\xfe\x83\xfe\x83\xfe\x00\x00\x00\x00\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\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\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x00\x00\x00\x00\x83\xfe\x83\xfe\x05\x02\x06\x02\x00\x00\x84\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x00\x00\x00\x00\x83\xfe\x07\x02\x00\x00\x83\xfe\x00\x00\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\x83\xfe\xff\xfd\xff\xfd\xff\xfd\xff\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xff\xfd\xff\xfd\xff\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xfd\x00\x00\x00\x00\xff\xfd\xff\xfd\xff\xfd\x00\x00\xff\xfd\xff\xfd\x00\x00\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\x00\x00\xff\xfd\xff\xfd\xff\xfd\x00\x00\x00\x00\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xfd\xff\xfd\x82\x00\xc7\x01\xff\xfd\xff\xfd\x00\x00\x00\x00\xff\xfd\xff\xfd\xff\xfd\x00\x00\x00\x00\x00\x00\x84\x00\xff\xfd\xff\xfd\xff\xfd\x85\x00\xc8\x01\xc9\x01\xca\x01\xcb\x01\x86\x00\x00\x00\x00\x00\xff\xfd\x00\x00\x00\x00\xff\xfd\x00\x00\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\x53\x01\xff\xfd\xff\xfd\xff\xfd\x8c\x00\x8d\x00\xff\xfd\xff\xfd\x8f\x00\x90\x00\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xff\xfd\xf8\xfd\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\xfd\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x00\x00\x00\x00\x00\xf8\xfd\x15\x00\xf8\xfd\x00\x00\xf8\xfd\x16\x00\x00\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\xaa\x00\x00\x00\x24\x00\xf8\xfd\xf8\xfd\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\xfd\xf8\xfd\xf8\xfd\xf8\xfd\xf8\xfd\xae\x00\x00\x00\x00\x00\xf8\xfd\xf8\xfd\xf8\xfd\x00\x00\x00\x00\x00\x00\xf8\xfd\xb0\x00\xb1\x00\xb2\x00\xf8\xfd\xf8\xfd\xf8\xfd\xf8\xfd\xf8\xfd\xf8\xfd\x00\x00\x00\x00\xc5\x01\x00\x00\x00\x00\xf8\xfd\x00\x00\xf8\xfd\xb3\x00\xf8\xfd\xb4\x00\xf8\xfd\xb5\x00\xf8\xfd\xb6\x00\xf8\xfd\xf8\xfd\xf8\xfd\xf8\xfd\xb7\x00\x2c\x00\x8b\x00\xf8\xfd\xf8\xfd\x2d\x00\x8e\x00\xf8\xfd\xf8\xfd\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\xf8\xfd\xd1\x00\xf8\xfd\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xf8\xfd\xf9\xfd\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf9\xfd\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x00\x00\x00\x00\x00\xf9\xfd\x15\x00\xf9\xfd\x00\x00\xf9\xfd\x16\x00\x00\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\xaa\x00\x00\x00\x24\x00\xf9\xfd\xf9\xfd\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf9\xfd\xf9\xfd\xf9\xfd\xf9\xfd\xf9\xfd\xae\x00\x00\x00\x00\x00\xf9\xfd\xf9\xfd\xf9\xfd\x00\x00\x00\x00\x00\x00\xf9\xfd\xb0\x00\xb1\x00\xb2\x00\xf9\xfd\xf9\xfd\xf9\xfd\xf9\xfd\xf9\xfd\xf9\xfd\x00\x00\x00\x00\xc5\x01\x00\x00\x00\x00\xf9\xfd\x00\x00\xf9\xfd\xb3\x00\xf9\xfd\xb4\x00\xf9\xfd\xb5\x00\xf9\xfd\xb6\x00\xf9\xfd\xf9\xfd\xf9\xfd\xf9\xfd\xb7\x00\x2c\x00\x8b\x00\xf9\xfd\xf9\xfd\x2d\x00\x8e\x00\xf9\xfd\xf9\xfd\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\xf9\xfd\xd1\x00\xf9\xfd\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xf9\xfd\x1e\x02\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x82\x00\x85\x01\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x53\x01\x00\x00\x00\x00\x00\x00\x8c\x00\x8d\x00\x00\x00\x00\x00\x8f\x00\x90\x00\x1f\x02\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xba\x03\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\x1e\x02\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x82\x00\x52\x01\x99\xfe\x00\x00\x00\x00\x00\x00\x99\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x84\xfd\x00\x00\x84\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\xb1\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x53\x01\x00\x00\x00\x00\x00\x00\x8c\x00\x8d\x00\x00\x00\x00\x00\x8f\x00\x90\x00\x1f\x02\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xc2\x03\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x88\x03\x71\x01\x72\x01\x73\x01\x00\x00\x74\x01\x6f\xfe\x6f\xfe\x00\x00\x19\x01\x00\x00\x00\x00\x74\x00\x1a\x01\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x49\xfe\x00\x00\x6f\xfe\x6f\xfe\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x6f\xfe\x00\x00\x1b\x01\x00\x00\x00\x00\x6f\xfe\x1c\x01\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x11\x00\x6f\xfe\x6f\xfe\x1d\x01\x6f\xfe\x00\x00\x6f\xfe\x00\x00\x00\x00\x00\x00\x6f\xfe\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\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\xa6\x00\x13\x00\xa7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\x6f\xfe\x14\x00\xa8\x00\x6f\xfe\x6f\xfe\xda\x00\xdb\x00\xdc\x00\xfc\x00\xdd\x00\x00\x00\xfd\x00\x00\x00\x15\x00\x00\x00\xfe\x00\x00\x00\x16\x00\xff\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x01\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\x00\x00\x01\x01\xe3\x00\x02\x01\x03\x01\x00\x00\x00\x00\x04\x01\xe4\x00\x4d\x01\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x4e\x01\x00\x00\x4f\x01\x50\x01\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x00\x00\x00\x00\x78\x00\x00\x00\x79\x00\x7a\x00\x7b\x00\x00\x00\x7c\x00\x00\x00\x00\x00\x7f\x00\x80\x00\x00\x00\xb3\x00\x00\x00\xe6\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xe7\xfc\xe7\xfc\xe7\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe7\xfc\xe7\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe7\xfc\x00\x00\x00\x00\x00\x00\xe7\xfc\x00\x00\x00\x00\x00\x00\xe7\xfc\x00\x00\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\x00\x00\xe7\xfc\xb9\x04\xba\x04\x00\x00\x00\x00\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe7\xfc\xe7\xfc\x00\x00\xe7\xfc\x00\x00\x00\x00\xe7\xfc\x00\x00\x00\x00\x00\x00\xe7\xfc\x00\x00\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\x00\x00\xe7\xfc\xe7\xfc\x00\x00\xe7\xfc\x00\x00\x00\x00\x00\x00\xe7\xfc\xe7\xfc\xe7\xfc\x00\x00\xe7\xfc\x00\x00\xe7\xfc\x00\x00\x00\x00\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\x00\x00\xe7\xfc\x00\x00\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xe7\xfc\xa6\x00\x13\x00\xa7\x00\x00\x00\x98\x04\x99\x04\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\xdd\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x9a\x04\x00\x00\x16\x00\x00\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\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x01\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\x00\x00\x00\x00\xe3\x00\x00\x00\x9a\x01\x73\x00\x00\x00\x00\x00\xe4\x00\x74\x00\x75\x00\x00\x00\x00\x00\x00\x00\xe5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x00\x00\x9b\x01\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\xb3\x00\x00\x00\xe6\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x8e\x04\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\xdd\x00\x00\x00\x8f\x04\x00\x00\x15\x00\x00\x00\x90\x04\x00\x00\x16\x00\x00\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\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x01\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\x00\x00\x00\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x00\x4d\x01\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\xdb\x02\x00\x00\x4f\x01\x50\x01\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x00\x00\x00\x00\x78\x00\x00\x00\x79\x00\x7a\x00\x7b\x00\x00\x00\x7c\x00\x00\x00\x00\x00\x7f\x00\x80\x00\x00\x00\xb3\x00\x00\x00\xe6\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x98\x04\x99\x04\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\xdd\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x9a\x04\x00\x00\x16\x00\x00\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\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x01\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\x00\x00\x00\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x00\x4d\x01\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x4e\x01\x00\x00\x4f\x01\x50\x01\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x00\x00\x00\x00\x78\x00\x00\x00\x79\x00\x7a\x00\x7b\x00\x00\x00\x7c\x00\x00\x00\x00\x00\x7f\x00\x80\x00\x00\x00\xb3\x00\x00\x00\xe6\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x8e\x04\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\xdd\x00\x00\x00\x8f\x04\x00\x00\x15\x00\x00\x00\x90\x04\x00\x00\x16\x00\x00\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\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x01\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\x00\x00\x00\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xe6\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x82\x00\x52\x01\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x82\x00\x86\x00\x00\x00\xae\x00\x00\x00\x00\x00\x67\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x01\xb0\x00\xb1\x00\xb2\x00\x85\x00\x00\x00\x00\x00\x00\x00\x53\x01\x86\x00\x69\x01\x00\x00\x8c\x00\x8d\x00\x00\x00\x00\x00\x8f\x00\x90\x00\xb3\x00\x00\x00\xb4\x00\x6a\x01\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x6b\x01\x6c\x01\xb7\x00\x2c\x00\x8b\x00\x8c\x00\x8d\x00\x2d\x00\x8e\x00\x8f\x00\x90\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xcf\xfd\xcf\xfd\xcf\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\xfd\xcf\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\xfd\x00\x00\x00\x00\x00\x00\xcf\xfd\x00\x00\x00\x00\x00\x00\xcf\xfd\x00\x00\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\x00\x00\xcf\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x89\x03\x73\x01\x00\x00\x74\x01\x00\x00\x00\x00\x00\x00\x19\x01\x00\x00\x00\x00\x74\x00\x1a\x01\x00\x00\x00\x00\x00\x00\x00\x00\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\x00\x00\x00\x00\xcf\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\x00\x00\x1b\x01\x00\x00\x00\x00\xcf\xfd\x1c\x01\xcf\xfd\xcf\xfd\x00\x00\xcf\xfd\x00\x00\x11\x00\x00\x00\xcf\xfd\x1d\x01\xcf\xfd\x00\x00\xcf\xfd\x00\x00\xcf\xfd\x00\x00\x00\x00\x00\x00\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\x00\x00\xcf\xfd\x00\x00\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xcf\xfd\xce\xfd\xce\xfd\xce\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\xfd\xce\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\xfd\x00\x00\x00\x00\x00\x00\xce\xfd\x00\x00\x00\x00\x00\x00\xce\xfd\x00\x00\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\x00\x00\xce\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\xfd\xce\xfd\xce\xfd\xce\xfd\x00\x00\x00\x00\xce\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xce\xfd\x00\x00\xce\xfd\xce\xfd\x00\x00\xce\xfd\x00\x00\x00\x00\x00\x00\xce\xfd\x00\x00\xce\xfd\x00\x00\xce\xfd\x00\x00\xce\xfd\x00\x00\x00\x00\x00\x00\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\x00\x00\xce\xfd\x00\x00\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xce\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xfd\xdb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xfd\x00\x00\x00\x00\x00\x00\xdb\xfd\x00\x00\x00\x00\x00\x00\xdb\xfd\x00\x00\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x00\x00\xdb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xfd\xdb\xfd\x99\x03\xdb\xfd\x00\x00\x00\x00\xdb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xfd\x00\x00\xdb\xfd\xdb\xfd\x00\x00\xdb\xfd\x00\x00\x00\x00\x00\x00\xdb\xfd\x00\x00\xdb\xfd\x00\x00\xdb\xfd\x00\x00\xdb\xfd\x00\x00\x00\x00\x00\x00\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x00\x00\xdb\xfd\x00\x00\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x82\x00\x37\x05\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x82\x00\x86\x00\x00\x00\xae\x00\x00\x00\x00\x00\x67\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x85\x00\x00\x00\x00\x00\x00\x00\x53\x01\x86\x00\x00\x00\x00\x00\x8c\x00\x8d\x00\x00\x00\x00\x00\x8f\x00\x90\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\xa4\x01\xb6\x00\x00\x00\x00\x00\x6b\x01\x6c\x01\xb7\x00\x2c\x00\x8b\x00\x8c\x00\x8d\x00\x2d\x00\x8e\x00\x8f\x00\x90\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x82\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xa9\xfd\xb5\x00\xa9\xfd\xb6\x00\x00\x00\x00\x00\x42\x02\x6c\x01\xb7\x00\x2c\x00\x8b\x00\x8c\x00\x8d\x00\x2d\x00\x8e\x00\x8f\x00\x90\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\xde\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\x00\x00\x00\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xe6\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x82\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x5c\x02\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x42\x02\x6c\x01\xb7\x00\x2c\x00\x8b\x00\x8c\x00\x8d\x00\x2d\x00\x8e\x00\x8f\x00\x90\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x01\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\x00\x00\x00\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xe6\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x82\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x5f\x02\xb6\x00\x00\x00\x00\x00\x42\x02\x6c\x01\xb7\x00\x2c\x00\x8b\x00\x8c\x00\x8d\x00\x2d\x00\x8e\x00\x8f\x00\x90\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x01\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\x00\x00\x00\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xe6\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x82\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\xa9\x01\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x6c\x01\xb7\x00\x2c\x00\x8b\x00\x8c\x00\x8d\x00\x2d\x00\x8e\x00\x8f\x00\x90\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x82\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x46\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x6c\x01\xb7\x00\x2c\x00\x8b\x00\x8c\x00\x8d\x00\x2d\x00\x8e\x00\x8f\x00\x90\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x82\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x01\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\xff\x01\x00\x02\x01\x02\x6c\x01\xb7\x00\x2c\x00\x8b\x00\x8c\x00\x8d\x00\x2d\x00\x8e\x00\x8f\x00\x90\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x41\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\xbd\x01\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbe\x01\x00\x00\x00\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\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xbc\x03\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xba\x03\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\xab\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x15\x00\xb0\x03\x00\x00\x00\x00\x16\x00\x00\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\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\xab\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xba\x03\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x15\x00\xb0\x03\x00\x00\x00\x00\x16\x00\x00\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\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x0c\x04\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x01\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\xae\x00\xb1\x01\xb2\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x02\xb0\x00\xb1\x00\xb2\x00\x00\x00\x00\x00\x6b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x65\x00\x66\x00\x00\x00\x00\x00\x69\x00\x6a\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\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xc8\xfe\xc8\xfe\xc8\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc8\xfe\xc8\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc8\xfe\x00\x00\x00\x00\x00\x00\xc8\xfe\x00\x00\x00\x00\x00\x00\xc8\xfe\x00\x00\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\x00\x00\xc8\xfe\x00\x00\x00\x00\x00\x00\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\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\xc8\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc8\xfe\xc8\xfe\xc8\xfe\xc8\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\x13\x03\x00\x00\xc8\xfe\x00\x00\xc8\xfe\x00\x00\xc8\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xc8\xfe\xc8\xfe\xc8\xfe\x00\x00\x00\x00\xc8\xfe\xc8\xfe\x00\x00\x00\x00\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\x00\x00\xc8\xfe\x00\x00\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xc8\xfe\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\xb1\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\xc4\x03\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xc2\x03\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xbf\xfe\xbf\xfe\xbf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbf\xfe\xbf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbf\xfe\x00\x00\x00\x00\x00\x00\xbf\xfe\x00\x00\x00\x00\x00\x00\x45\x03\x00\x00\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\x00\x00\xbf\xfe\x00\x00\x00\x00\x00\x00\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\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\xbf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbf\xfe\xbf\xfe\xbf\xfe\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\xbf\xfe\x00\x00\xbf\xfe\x00\x00\xbf\xfe\x00\x00\xbf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xbf\xfe\xbf\xfe\xbf\xfe\x00\x00\x00\x00\xbf\xfe\xbf\xfe\x00\x00\x00\x00\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\x00\x00\xbf\xfe\x00\x00\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xbf\xfe\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x84\xfd\x00\x00\x84\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xc0\xfe\xc0\xfe\xc0\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xfe\xc0\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xfe\x00\x00\x00\x00\x00\x00\xc0\xfe\x00\x00\x00\x00\x00\x00\x09\x05\x00\x00\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\x00\x00\xc0\xfe\x00\x00\x00\x00\x00\x00\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\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\xc0\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xfe\xc0\xfe\xc0\xfe\xc0\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\xc0\xfe\x00\x00\xc0\xfe\x00\x00\xc0\xfe\x00\x00\xc0\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xfe\xc0\xfe\xc0\xfe\x00\x00\x00\x00\xc0\xfe\xc0\xfe\x00\x00\x00\x00\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\x00\x00\xc0\xfe\x00\x00\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xc0\xfe\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\xa6\x03\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\xb1\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xc2\x03\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\xb0\x00\xb1\x00\xb2\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\xb8\x00\xb9\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\xa6\x00\x13\x00\x25\x02\x26\x02\x93\x05\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x02\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\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\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\xf2\x01\xd1\x00\x00\x00\x6f\x00\xd2\x00\xd3\x00\x70\x00\x71\x00\x31\xfd\x31\xfd\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x03\x00\x00\x00\x00\x00\x00\x00\x00\x31\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x00\x00\x00\x00\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x00\x00\x00\x00\x31\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\xfd\x31\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\xfd\x31\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\xfd\x31\xfd\x00\x00\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x00\x00\x31\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x31\xfd\x00\x00\x00\x00\x31\xfd\x31\xfd\x31\xfd\x00\x00\x00\x00\x00\x00\x31\xfd\x00\x00\x31\xfd\x43\x02\x31\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x31\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x31\xfd\x31\xfd\x31\xfd\x00\x00\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x31\xfd\x00\x00\x00\x00\x31\xfd\x31\xfd\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\xde\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x6f\xfe\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x6f\xfe\x6f\xfe\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\xfe\x15\x00\x00\x00\x6f\xfe\x6f\xfe\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x01\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\xea\x01\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x01\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\xe5\x01\x00\x00\x00\x00\x00\x00\x6b\x01\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x01\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\xea\x01\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x01\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x50\x00\x13\x00\x00\x00\x00\x00\x39\x01\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x01\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x6f\x00\x00\x00\x00\x00\x70\x00\x71\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x3b\x01\x3c\x01\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x04\xf0\x02\x55\x00\x56\x00\x36\x00\x37\x00\x00\x00\xf1\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x57\x00\x3f\x00\x40\x00\x00\x00\xe5\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x42\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x43\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x51\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x52\x02\x59\x00\x5a\x00\x00\x00\x53\x02\x00\x00\x00\x00\x00\x00\x00\x00\x54\x02\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x6a\x01\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x01\x61\x00\x62\x00\x63\x00\x64\x00\x55\x02\x56\x02\x67\x00\x68\x00\x69\x00\x57\x02\x00\x00\x00\x00\x6b\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\xec\x01\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\xf5\x04\x00\x00\x00\x00\x00\x00\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\xfe\x02\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\xf6\x04\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x04\xf0\x02\x55\x00\x56\x00\x36\x00\x37\x00\x00\x00\xf1\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x57\x00\x3f\x00\x40\x00\x00\x00\x58\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x42\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x43\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\xe7\x04\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\xfe\x02\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x05\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\xfe\x02\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x05\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x05\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\x51\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\xfe\x02\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xef\x02\xf0\x02\x55\x00\x56\x00\x36\x00\x37\x00\x00\x00\xf1\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x57\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x42\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\x79\x03\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x43\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\xfe\x02\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x03\xf0\x02\x55\x00\x56\x00\x36\x00\x37\x00\x00\x00\xf1\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x57\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x42\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\x79\x03\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x43\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x55\x00\x56\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x05\x3e\x00\x57\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x45\x05\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x42\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x50\x00\x13\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\x6f\x00\x15\x00\x00\x00\x70\x00\x71\x00\xfe\x02\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x36\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x0a\x02\x3e\x00\x5c\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x50\x00\x13\x00\x41\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\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x6f\x00\x00\x00\x00\x00\x70\x00\x71\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x4e\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x50\x00\x13\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\x6f\x00\x00\x00\x00\x00\x70\x00\x71\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xbf\x02\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xac\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\xf7\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x5a\x00\x00\x00\x5b\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\x5e\x00\x41\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\x01\x63\x00\x64\x00\x42\x00\x00\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\xbf\x02\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xac\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\xc0\x02\x00\x00\x00\x00\x6f\x00\x00\x00\x00\x00\x70\x00\x71\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\xbf\x02\x00\x00\x00\x00\x36\x00\x37\x00\x4e\x00\xac\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x37\x04\x00\x00\x00\x00\x18\x04\x00\x00\x1b\x04\x36\x00\x37\x00\x00\x00\xac\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\xd3\x01\x00\x00\xd4\x01\x00\x00\x00\x00\x00\x00\xd5\x01\x00\x00\x00\x00\xd6\x01\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\xd7\x01\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x00\x00\xd8\x01\x00\x00\x00\x00\x41\x00\x1c\x01\x4b\x00\x4c\x00\x4d\x00\xd9\x01\x7b\x00\x11\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x42\x00\x00\x00\x4e\x00\x18\x04\x00\x00\x19\x04\x36\x00\x37\x00\x00\x00\xac\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x18\x04\x00\x00\xe0\x04\x36\x00\x37\x00\x00\x00\xac\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\xab\x02\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xe0\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\xab\x02\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xac\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x4a\x03\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xac\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x13\x04\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xac\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x81\x04\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xac\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x05\x05\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xac\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x62\x05\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xac\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x82\x05\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xac\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x57\x02\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x43\x00\xee\x02\x59\x02\x00\x00\x00\x00\x00\x00\x00\x00\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\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x42\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x36\x00\x37\x00\x57\x02\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x4e\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x58\x02\x59\x02\x00\x00\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\x36\x00\x37\x00\x57\x02\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\xd6\x03\x00\x00\x41\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x41\x00\x00\x00\x00\x00\x36\x00\x37\x00\x57\x02\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\xd5\x03\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x41\x00\x43\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x43\x00\x36\x00\x37\x00\xd3\x03\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x03\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x41\x00\x00\x00\x00\x00\x36\x00\x37\x00\x57\x02\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\xd2\x03\x00\x00\x00\x00\x36\x00\x37\x00\x57\x02\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\xf5\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\x41\x00\x43\x00\x00\x00\x36\x00\x37\x00\x40\x04\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x44\x00\x45\x00\x5c\x05\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x41\x00\x43\x00\x00\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x41\x00\x43\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x36\x00\x37\x00\xea\x01\x39\x00\x3a\x00\x3b\x00\x42\x00\x3c\x00\x3d\x00\x3e\x00\x4e\x00\x3f\x00\x40\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x05\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x36\x00\x37\x00\x93\x01\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x36\x00\x37\x00\x00\x00\x28\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x4e\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x41\x00\x43\x00\x00\x00\x36\x00\x37\x00\x57\x03\x39\x00\x3a\x00\x3b\x00\x29\x02\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x41\x00\x43\x00\x00\x00\x36\x00\x37\x00\x40\x04\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x41\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x28\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x3d\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x36\x00\x37\x00\x41\x00\x28\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\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\x36\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x28\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x35\x04\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\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\x4e\x00\x36\x00\x37\x00\x00\x00\x28\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x21\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x41\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x36\x00\x37\x00\x00\x00\x28\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x4e\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf2\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x28\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x41\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\xf1\x03\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x36\x00\x37\x00\x2a\x05\x39\x00\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x42\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x28\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x5f\x05\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x43\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x36\x00\x37\x00\x43\x00\x09\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x41\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x4e\x00\x65\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x32\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\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\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x2d\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x2c\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x2a\x02\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xde\x03\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\xd8\x03\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x00\x00\x26\x05\x3a\x00\x3b\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\xac\x04\x00\x00\x00\x00\xad\x04\xae\x04\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\xed\x04\xee\x04\x00\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\xaf\x04\x43\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\x02\x00\x00\x36\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\x03\x00\x00\x36\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x04\x00\x00\x36\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\x04\x00\x00\x36\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x05\x00\x00\x36\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x35\x05\x00\x00\x36\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x05\x00\x00\x36\x01\x3d\x00\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x02\x3e\x00\x00\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x13\x00\x41\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x03\x52\x03\x53\x03\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x00\x00\x00\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x00\xf2\x01\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x2c\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\x54\x03\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x14\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\xf2\x01\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x2c\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\xd7\x04\x2a\x00\x54\x03\x13\x00\x00\x00\x90\x00\xe6\x00\x92\x00\x00\x00\x93\x00\x14\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\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\x25\x02\x26\x02\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xb3\x03\xb4\x03\x24\x00\x00\x00\x00\x00\x27\x02\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x02\x26\x02\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x00\x00\x27\x02\x90\x00\xe6\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\xb5\x03\xb3\x03\xb4\x03\x25\x02\x26\x02\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\xb6\x03\x00\x00\xb7\x03\x00\x00\xb8\x03\x00\x00\x27\x02\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x00\x00\x90\x00\xe6\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\xb3\x03\xb4\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\xba\x03\x00\x00\xb7\x03\x00\x00\xb8\x03\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x00\x00\x90\x00\xe6\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\xb3\x03\xb4\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x06\x04\x00\x00\xb7\x03\x00\x00\xb8\x03\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x90\x00\x74\x00\x75\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x01\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\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\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\xae\x01\xbc\x03\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\xbb\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x01\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\xbd\x03\xae\x01\xbc\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbe\x03\x00\x00\xbf\x03\x00\x00\xc0\x03\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x01\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\xae\x01\xbc\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x00\xc2\x03\x00\x00\xbf\x03\x00\x00\xc0\x03\x9f\x00\xa0\x00\xad\x01\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\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\xae\x01\xbc\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\xfe\x03\x00\x00\xbf\x03\x00\x00\xc0\x03\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\x14\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x15\x00\x7d\x00\x7e\x00\x00\x00\x16\x00\xa3\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\xbe\x04\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x00\x13\x00\x88\x00\x00\x00\x89\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x8a\x00\x00\x00\x2c\x00\x8b\x00\x8c\x00\x8d\x00\x2d\x00\x8e\x00\x8f\x00\x90\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd3\x02\x13\x00\xdb\x01\x00\x00\xdc\x01\x00\x00\x89\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\xdd\x01\x00\x00\x2c\x00\x8b\x00\x8c\x00\x8d\x00\x00\x00\x8e\x00\x15\x00\x90\x00\x00\x00\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\x05\x00\x00\x00\x00\x15\x00\x00\x00\x72\x04\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x7b\x05\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x71\x04\x00\x00\x00\x00\x15\x00\x00\x00\x72\x04\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x73\x04\x74\x04\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x7c\x05\x00\x00\x13\x00\x2c\x00\x64\x00\x00\x00\x00\x00\x2d\x00\x68\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\x05\x00\x00\x00\x00\x15\x00\x00\x00\x72\x04\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x7b\x05\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x74\x04\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x2c\x00\x64\x00\x00\x00\x00\x00\x2d\x00\x68\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x0a\xfe\x74\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\xfe\x00\x00\x00\x00\x00\x00\x2c\x00\x64\x00\x00\x00\x00\x00\x2d\x00\x68\x00\x00\x00\x00\x00\x0a\xfe\x00\x00\x00\x00\x00\x00\x0a\xfe\x00\x00\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x00\x00\x00\x00\x0a\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x87\x00\x00\x00\x9d\x01\x00\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x7a\x01\x00\x00\x0a\xfe\x14\x00\x0a\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\xfe\x0a\xfe\x00\x00\x15\x00\x0a\xfe\x0a\xfe\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x13\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\x72\x04\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x87\x00\x00\x00\x9d\x01\x00\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x2c\x00\x8b\x00\x00\x00\x00\x00\x2d\x00\x8e\x00\x14\x00\x00\x00\x21\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x74\x04\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x2c\x00\x64\x00\x00\x00\x00\x00\x2d\x00\x68\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\xdb\x01\x00\x00\xdc\x01\x14\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x8b\x00\x00\x00\x15\x00\x00\x00\x8e\x00\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x8b\x00\x00\x00\x15\x00\x2d\x00\x8e\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x0a\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x01\x00\x00\x00\x00\x2c\x00\x8b\x00\x0a\xfe\x00\x00\x00\x00\x8e\x00\x0a\xfe\x00\x00\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x00\x00\x00\x00\x0a\xfe\x00\x00\x00\x00\x00\x00\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x63\x00\x64\x00\x0a\xfe\x00\x00\x00\x00\x68\x00\x0a\xfe\x00\x00\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x00\x00\x00\x00\x0a\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x0a\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\x01\x00\x00\x0a\xfe\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x0a\xfe\x00\x00\x00\x00\x00\x00\x0a\xfe\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x7a\x01\x00\x00\x0a\xfe\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x13\x00\x00\x00\x0a\xfe\x00\x00\x00\x00\x00\x00\x0a\xfe\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\x6e\x02\x00\x00\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x13\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x2d\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x90\x00\x00\x00\x00\x00\xe1\x02\xe2\x02\x00\x00\xe3\x02\x95\x00\x96\x00\x97\x00\x98\x00\x84\x00\x00\x00\x99\x00\x9a\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x00\x00\x00\x76\x01\x6a\x01\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x01\x00\x00\x00\x00\x2c\x00\x8b\x00\x8c\x00\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x90\x00\x74\x00\x75\x00\x74\x03\xe2\x02\x00\x00\xe3\x02\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\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\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x02\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x56\x01\x57\x01\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x58\x01\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x01\x5a\x01\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x5b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x5d\x01\x00\x00\x5e\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x5f\x01\x60\x01\xa4\x01\x62\x01\x11\x00\x7c\x00\x7d\x00\x7e\x00\x63\x01\x80\x00\xa3\x00\x00\x00\x00\x00\x64\x01\x00\x00\x65\x01\x00\x00\x13\x00\xa4\x00\x90\x00\x56\x01\x57\x01\x00\x00\x93\x00\x14\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x58\x01\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x15\x00\x00\x00\x59\x01\x5a\x01\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x5b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x5d\x01\x00\x00\x5e\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x5f\x01\x60\x01\x61\x01\x62\x01\x11\x00\x7c\x00\x7d\x00\x7e\x00\x63\x01\x80\x00\xa3\x00\x00\x00\x00\x00\x64\x01\x2c\x00\x65\x01\x00\x00\x13\x00\xa4\x00\x90\x00\x56\x01\x57\x01\x00\x00\x93\x00\x14\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x15\x00\x00\x00\x9e\x01\x9f\x01\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x5b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x5d\x01\x00\x00\x5e\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x5f\x01\xa0\x01\x00\x00\xa1\x01\x11\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\xa3\x00\x00\x00\x00\x00\xa2\x01\x63\x00\x65\x01\x00\x00\x00\x00\xa4\x00\x90\x00\x56\x01\x57\x01\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\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\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x5b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x5d\x01\x00\x00\x5e\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x5f\x01\xa0\x01\x00\x00\xa1\x01\x11\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\xa3\x00\x00\x00\x00\x00\x90\x00\x56\x01\x57\x01\x00\x00\x93\x00\xa4\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8d\x02\x00\x00\x00\x00\x8e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x5b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x5d\x01\x00\x00\x5e\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x5f\x01\xa0\x01\x00\x00\xa1\x01\x11\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\xa3\x00\x00\x00\x00\x00\x90\x00\x56\x01\x57\x01\x00\x00\x93\x00\xa4\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8d\x02\x00\x00\x00\x00\xa6\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\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x5b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x5d\x01\x00\x00\x5e\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x5f\x01\xa0\x01\x00\x00\xa1\x01\x11\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\xa3\x00\x00\x00\x00\x00\x90\x00\x56\x01\x57\x01\x00\x00\x93\x00\xa4\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x5b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x5d\x01\x00\x00\x5e\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x5f\x01\xa0\x01\x00\x00\xa1\x01\x11\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\xa3\x00\x00\x00\x00\x00\x90\x00\x56\x01\x57\x01\x00\x00\x93\x00\xa4\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\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\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x5b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x5d\x01\x00\x00\x5e\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x5f\x01\xa0\x01\x00\x00\xa1\x01\x11\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\xa3\x00\x00\x00\x00\x00\x90\x00\xa8\x03\x57\x01\x00\x00\x93\x00\xa4\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\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\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x5b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x5d\x01\x00\x00\x5e\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x5f\x01\xa0\x01\x00\x00\xa1\x01\x11\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\xa3\x00\x00\x00\x00\x00\x90\x00\x56\x01\x57\x01\x00\x00\x93\x00\xa4\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\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\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x5b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x5d\x01\x00\x00\x5e\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x5f\x01\xa0\x01\x00\x00\xa1\x01\x11\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\xa3\x00\x00\x00\x00\x00\x90\x00\x56\x01\x57\x01\x00\x00\x93\x00\xa4\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf7\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\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x5b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x5d\x01\x00\x00\x5e\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x5f\x01\xa0\x01\x00\x00\xa1\x01\x11\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\xa3\x00\x00\x00\x00\x00\x90\x00\x56\x01\x57\x01\x00\x00\x93\x00\xa4\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\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\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x5b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\x5d\x01\x00\x00\x5e\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x5f\x01\xa0\x01\x00\x00\xa1\x01\x11\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\xa3\x00\x00\x00\x00\x00\x90\x00\x91\x00\x92\x00\x00\x00\x93\x00\xa4\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x03\xab\x03\xac\x03\xad\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x90\x00\x91\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\xb7\x04\xac\x03\xad\x03\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\xae\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x00\x00\x90\x00\x91\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x04\x01\x05\x01\x9e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x90\x00\x91\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\xa4\x00\x9d\x00\x9e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x90\x00\x91\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x97\x02\x00\x00\xa4\x00\x96\x02\x9e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x90\x00\x91\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x95\x02\x00\x00\xa4\x00\x96\x02\x9e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x90\x00\x91\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x74\x02\x75\x02\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x76\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x90\x00\x91\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x6f\x03\x75\x02\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x76\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x00\xb8\x01\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\xb9\x01\xba\x01\xbb\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x90\x00\x91\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x0f\x04\x9e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x90\x00\x91\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\xb5\x04\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\xb6\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x90\x00\x91\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\xfb\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xe6\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\xe7\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xe6\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x46\x03\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xe6\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x45\x03\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xe8\x00\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xc5\x01\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xbe\x01\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x95\x01\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x8f\x01\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x70\x02\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x64\x02\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x63\x02\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x62\x02\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x61\x02\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xc5\x03\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xc4\x03\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xb2\x03\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xb0\x03\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x70\x03\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x14\x04\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x0a\x04\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xfc\x03\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xfa\x03\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xbc\x04\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xb4\x04\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x9b\x04\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x0a\x05\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xdf\x04\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xde\x04\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\xdd\x04\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x47\x05\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x90\x00\x57\x05\x92\x00\x00\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x17\x00\x18\x00\x19\x00\x74\x00\x75\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\xa2\x00\x13\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x1f\x01\x00\x00\x00\x00\x15\x00\x00\x00\x20\x01\xa4\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x02\x26\x02\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x00\x00\x00\x21\x01\x00\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\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\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x87\x00\x00\x00\x76\x01\x00\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x2c\x00\x8b\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x00\x00\x00\x31\x01\x00\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\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\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x87\x00\x00\x00\x21\x01\x00\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x2c\x00\x8b\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x00\x00\x00\x76\x01\x00\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\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\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x87\x00\x00\x00\x21\x01\x00\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x2c\x00\x8b\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\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\x2c\x00\x8b\x00\x00\x00\x00\x00\xf6\xfe\x00\x00\x15\x00\x00\x00\x00\x00\xf6\xfe\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x0e\x03\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\xbb\x02\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\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\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xf2\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\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\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\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x4e\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\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\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xf2\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x4e\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x13\x00\x00\x00\xfc\x01\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x63\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x52\x00\x53\x00\x54\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\xfd\x01\x00\x00\x00\x00\x00\x00\x90\x00\x00\x00\x94\x01\x00\x00\x93\x00\x00\x00\x63\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x90\x00\x00\x00\xd6\x02\x00\x00\x93\x00\x00\x00\x00\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xa0\x00\x00\x00\x00\x00\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x90\x00\xa3\x00\x4e\x04\x00\x00\x93\x00\x00\x00\x00\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x90\x00\x00\x00\xf6\x04\x00\x00\x93\x00\x00\x00\x00\x00\x95\x00\x96\x00\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\xad\x01\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x01\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x01\xaf\x01\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\xa0\x00\x00\x00\xae\x01\x86\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\xa3\x03\x97\x00\x98\x00\x74\x00\x75\x00\x99\x00\x9a\x00\x00\x00\xa4\x03\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\xc3\x01\x97\x00\x98\x00\x74\x00\x75\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x01\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\xb4\x01\x97\x00\x98\x00\x74\x00\x75\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\xab\x01\x97\x00\x98\x00\x74\x00\x75\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x01\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\xa9\x01\x97\x00\x98\x00\x74\x00\x75\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x9d\x01\x97\x00\x98\x00\x74\x00\x75\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x03\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x22\x03\x97\x00\x98\x00\x74\x00\x75\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\xc3\x01\x97\x00\x98\x00\x74\x00\x75\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x71\x02\x97\x00\x98\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x39\x03\x97\x00\x98\x00\x74\x00\x75\x00\x99\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\xa2\x00\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x90\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\xd2\x01\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x90\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8d\x01\x00\x00\x00\x00\x99\x00\x9a\x00\x00\x00\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\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x9f\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x73\x00\x00\x00\x00\x00\x00\x00\x74\x00\x75\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x01\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x8e\x01\x00\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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, 855) [+ (13 , happyReduce_13),+ (14 , happyReduce_14),+ (15 , happyReduce_15),+ (16 , happyReduce_16),+ (17 , happyReduce_17),+ (18 , happyReduce_18),+ (19 , happyReduce_19),+ (20 , happyReduce_20),+ (21 , happyReduce_21),+ (22 , happyReduce_22),+ (23 , happyReduce_23),+ (24 , happyReduce_24),+ (25 , happyReduce_25),+ (26 , happyReduce_26),+ (27 , happyReduce_27),+ (28 , happyReduce_28),+ (29 , happyReduce_29),+ (30 , happyReduce_30),+ (31 , happyReduce_31),+ (32 , happyReduce_32),+ (33 , happyReduce_33),+ (34 , happyReduce_34),+ (35 , happyReduce_35),+ (36 , happyReduce_36),+ (37 , happyReduce_37),+ (38 , happyReduce_38),+ (39 , happyReduce_39),+ (40 , happyReduce_40),+ (41 , happyReduce_41),+ (42 , happyReduce_42),+ (43 , happyReduce_43),+ (44 , happyReduce_44),+ (45 , happyReduce_45),+ (46 , happyReduce_46),+ (47 , happyReduce_47),+ (48 , happyReduce_48),+ (49 , happyReduce_49),+ (50 , happyReduce_50),+ (51 , happyReduce_51),+ (52 , happyReduce_52),+ (53 , happyReduce_53),+ (54 , happyReduce_54),+ (55 , happyReduce_55),+ (56 , happyReduce_56),+ (57 , happyReduce_57),+ (58 , happyReduce_58),+ (59 , happyReduce_59),+ (60 , happyReduce_60),+ (61 , happyReduce_61),+ (62 , happyReduce_62),+ (63 , happyReduce_63),+ (64 , happyReduce_64),+ (65 , happyReduce_65),+ (66 , happyReduce_66),+ (67 , happyReduce_67),+ (68 , happyReduce_68),+ (69 , happyReduce_69),+ (70 , happyReduce_70),+ (71 , happyReduce_71),+ (72 , happyReduce_72),+ (73 , happyReduce_73),+ (74 , happyReduce_74),+ (75 , happyReduce_75),+ (76 , happyReduce_76),+ (77 , happyReduce_77),+ (78 , happyReduce_78),+ (79 , happyReduce_79),+ (80 , happyReduce_80),+ (81 , happyReduce_81),+ (82 , happyReduce_82),+ (83 , happyReduce_83),+ (84 , happyReduce_84),+ (85 , happyReduce_85),+ (86 , happyReduce_86),+ (87 , happyReduce_87),+ (88 , happyReduce_88),+ (89 , happyReduce_89),+ (90 , happyReduce_90),+ (91 , happyReduce_91),+ (92 , happyReduce_92),+ (93 , happyReduce_93),+ (94 , happyReduce_94),+ (95 , happyReduce_95),+ (96 , happyReduce_96),+ (97 , happyReduce_97),+ (98 , happyReduce_98),+ (99 , happyReduce_99),+ (100 , happyReduce_100),+ (101 , happyReduce_101),+ (102 , happyReduce_102),+ (103 , happyReduce_103),+ (104 , happyReduce_104),+ (105 , happyReduce_105),+ (106 , happyReduce_106),+ (107 , happyReduce_107),+ (108 , happyReduce_108),+ (109 , happyReduce_109),+ (110 , happyReduce_110),+ (111 , happyReduce_111),+ (112 , happyReduce_112),+ (113 , happyReduce_113),+ (114 , happyReduce_114),+ (115 , happyReduce_115),+ (116 , happyReduce_116),+ (117 , happyReduce_117),+ (118 , happyReduce_118),+ (119 , happyReduce_119),+ (120 , happyReduce_120),+ (121 , happyReduce_121),+ (122 , happyReduce_122),+ (123 , happyReduce_123),+ (124 , happyReduce_124),+ (125 , happyReduce_125),+ (126 , happyReduce_126),+ (127 , happyReduce_127),+ (128 , happyReduce_128),+ (129 , happyReduce_129),+ (130 , happyReduce_130),+ (131 , happyReduce_131),+ (132 , happyReduce_132),+ (133 , happyReduce_133),+ (134 , happyReduce_134),+ (135 , happyReduce_135),+ (136 , happyReduce_136),+ (137 , happyReduce_137),+ (138 , happyReduce_138),+ (139 , happyReduce_139),+ (140 , happyReduce_140),+ (141 , happyReduce_141),+ (142 , happyReduce_142),+ (143 , happyReduce_143),+ (144 , happyReduce_144),+ (145 , happyReduce_145),+ (146 , happyReduce_146),+ (147 , happyReduce_147),+ (148 , happyReduce_148),+ (149 , happyReduce_149),+ (150 , happyReduce_150),+ (151 , happyReduce_151),+ (152 , happyReduce_152),+ (153 , happyReduce_153),+ (154 , happyReduce_154),+ (155 , happyReduce_155),+ (156 , happyReduce_156),+ (157 , happyReduce_157),+ (158 , happyReduce_158),+ (159 , happyReduce_159),+ (160 , happyReduce_160),+ (161 , happyReduce_161),+ (162 , happyReduce_162),+ (163 , happyReduce_163),+ (164 , happyReduce_164),+ (165 , happyReduce_165),+ (166 , happyReduce_166),+ (167 , happyReduce_167),+ (168 , happyReduce_168),+ (169 , happyReduce_169),+ (170 , happyReduce_170),+ (171 , happyReduce_171),+ (172 , happyReduce_172),+ (173 , happyReduce_173),+ (174 , happyReduce_174),+ (175 , happyReduce_175),+ (176 , happyReduce_176),+ (177 , happyReduce_177),+ (178 , happyReduce_178),+ (179 , happyReduce_179),+ (180 , happyReduce_180),+ (181 , happyReduce_181),+ (182 , happyReduce_182),+ (183 , happyReduce_183),+ (184 , happyReduce_184),+ (185 , happyReduce_185),+ (186 , happyReduce_186),+ (187 , happyReduce_187),+ (188 , happyReduce_188),+ (189 , happyReduce_189),+ (190 , happyReduce_190),+ (191 , happyReduce_191),+ (192 , happyReduce_192),+ (193 , happyReduce_193),+ (194 , happyReduce_194),+ (195 , happyReduce_195),+ (196 , happyReduce_196),+ (197 , happyReduce_197),+ (198 , happyReduce_198),+ (199 , happyReduce_199),+ (200 , happyReduce_200),+ (201 , happyReduce_201),+ (202 , happyReduce_202),+ (203 , happyReduce_203),+ (204 , happyReduce_204),+ (205 , happyReduce_205),+ (206 , happyReduce_206),+ (207 , happyReduce_207),+ (208 , happyReduce_208),+ (209 , happyReduce_209),+ (210 , happyReduce_210),+ (211 , happyReduce_211),+ (212 , happyReduce_212),+ (213 , happyReduce_213),+ (214 , happyReduce_214),+ (215 , happyReduce_215),+ (216 , happyReduce_216),+ (217 , happyReduce_217),+ (218 , happyReduce_218),+ (219 , happyReduce_219),+ (220 , happyReduce_220),+ (221 , happyReduce_221),+ (222 , happyReduce_222),+ (223 , happyReduce_223),+ (224 , happyReduce_224),+ (225 , happyReduce_225),+ (226 , happyReduce_226),+ (227 , happyReduce_227),+ (228 , happyReduce_228),+ (229 , happyReduce_229),+ (230 , happyReduce_230),+ (231 , happyReduce_231),+ (232 , happyReduce_232),+ (233 , happyReduce_233),+ (234 , happyReduce_234),+ (235 , happyReduce_235),+ (236 , happyReduce_236),+ (237 , happyReduce_237),+ (238 , happyReduce_238),+ (239 , happyReduce_239),+ (240 , happyReduce_240),+ (241 , happyReduce_241),+ (242 , happyReduce_242),+ (243 , happyReduce_243),+ (244 , happyReduce_244),+ (245 , happyReduce_245),+ (246 , happyReduce_246),+ (247 , happyReduce_247),+ (248 , happyReduce_248),+ (249 , happyReduce_249),+ (250 , happyReduce_250),+ (251 , happyReduce_251),+ (252 , happyReduce_252),+ (253 , happyReduce_253),+ (254 , happyReduce_254),+ (255 , happyReduce_255),+ (256 , happyReduce_256),+ (257 , happyReduce_257),+ (258 , happyReduce_258),+ (259 , happyReduce_259),+ (260 , happyReduce_260),+ (261 , happyReduce_261),+ (262 , happyReduce_262),+ (263 , happyReduce_263),+ (264 , happyReduce_264),+ (265 , happyReduce_265),+ (266 , happyReduce_266),+ (267 , happyReduce_267),+ (268 , happyReduce_268),+ (269 , happyReduce_269),+ (270 , happyReduce_270),+ (271 , happyReduce_271),+ (272 , happyReduce_272),+ (273 , happyReduce_273),+ (274 , happyReduce_274),+ (275 , happyReduce_275),+ (276 , happyReduce_276),+ (277 , happyReduce_277),+ (278 , happyReduce_278),+ (279 , happyReduce_279),+ (280 , happyReduce_280),+ (281 , happyReduce_281),+ (282 , happyReduce_282),+ (283 , happyReduce_283),+ (284 , happyReduce_284),+ (285 , happyReduce_285),+ (286 , happyReduce_286),+ (287 , happyReduce_287),+ (288 , happyReduce_288),+ (289 , happyReduce_289),+ (290 , happyReduce_290),+ (291 , happyReduce_291),+ (292 , happyReduce_292),+ (293 , happyReduce_293),+ (294 , happyReduce_294),+ (295 , happyReduce_295),+ (296 , happyReduce_296),+ (297 , happyReduce_297),+ (298 , happyReduce_298),+ (299 , happyReduce_299),+ (300 , happyReduce_300),+ (301 , happyReduce_301),+ (302 , happyReduce_302),+ (303 , happyReduce_303),+ (304 , happyReduce_304),+ (305 , happyReduce_305),+ (306 , happyReduce_306),+ (307 , happyReduce_307),+ (308 , happyReduce_308),+ (309 , happyReduce_309),+ (310 , happyReduce_310),+ (311 , happyReduce_311),+ (312 , happyReduce_312),+ (313 , happyReduce_313),+ (314 , happyReduce_314),+ (315 , happyReduce_315),+ (316 , happyReduce_316),+ (317 , happyReduce_317),+ (318 , happyReduce_318),+ (319 , happyReduce_319),+ (320 , happyReduce_320),+ (321 , happyReduce_321),+ (322 , happyReduce_322),+ (323 , happyReduce_323),+ (324 , happyReduce_324),+ (325 , happyReduce_325),+ (326 , happyReduce_326),+ (327 , happyReduce_327),+ (328 , happyReduce_328),+ (329 , happyReduce_329),+ (330 , happyReduce_330),+ (331 , happyReduce_331),+ (332 , happyReduce_332),+ (333 , happyReduce_333),+ (334 , happyReduce_334),+ (335 , happyReduce_335),+ (336 , happyReduce_336),+ (337 , happyReduce_337),+ (338 , happyReduce_338),+ (339 , happyReduce_339),+ (340 , happyReduce_340),+ (341 , happyReduce_341),+ (342 , happyReduce_342),+ (343 , happyReduce_343),+ (344 , happyReduce_344),+ (345 , happyReduce_345),+ (346 , happyReduce_346),+ (347 , happyReduce_347),+ (348 , happyReduce_348),+ (349 , happyReduce_349),+ (350 , happyReduce_350),+ (351 , happyReduce_351),+ (352 , happyReduce_352),+ (353 , happyReduce_353),+ (354 , happyReduce_354),+ (355 , happyReduce_355),+ (356 , happyReduce_356),+ (357 , happyReduce_357),+ (358 , happyReduce_358),+ (359 , happyReduce_359),+ (360 , happyReduce_360),+ (361 , happyReduce_361),+ (362 , happyReduce_362),+ (363 , happyReduce_363),+ (364 , happyReduce_364),+ (365 , happyReduce_365),+ (366 , happyReduce_366),+ (367 , happyReduce_367),+ (368 , happyReduce_368),+ (369 , happyReduce_369),+ (370 , happyReduce_370),+ (371 , happyReduce_371),+ (372 , happyReduce_372),+ (373 , happyReduce_373),+ (374 , happyReduce_374),+ (375 , happyReduce_375),+ (376 , happyReduce_376),+ (377 , happyReduce_377),+ (378 , happyReduce_378),+ (379 , happyReduce_379),+ (380 , happyReduce_380),+ (381 , happyReduce_381),+ (382 , happyReduce_382),+ (383 , happyReduce_383),+ (384 , happyReduce_384),+ (385 , happyReduce_385),+ (386 , happyReduce_386),+ (387 , happyReduce_387),+ (388 , happyReduce_388),+ (389 , happyReduce_389),+ (390 , happyReduce_390),+ (391 , happyReduce_391),+ (392 , happyReduce_392),+ (393 , happyReduce_393),+ (394 , happyReduce_394),+ (395 , happyReduce_395),+ (396 , happyReduce_396),+ (397 , happyReduce_397),+ (398 , happyReduce_398),+ (399 , happyReduce_399),+ (400 , happyReduce_400),+ (401 , happyReduce_401),+ (402 , happyReduce_402),+ (403 , happyReduce_403),+ (404 , happyReduce_404),+ (405 , happyReduce_405),+ (406 , happyReduce_406),+ (407 , happyReduce_407),+ (408 , happyReduce_408),+ (409 , happyReduce_409),+ (410 , happyReduce_410),+ (411 , happyReduce_411),+ (412 , happyReduce_412),+ (413 , happyReduce_413),+ (414 , happyReduce_414),+ (415 , happyReduce_415),+ (416 , happyReduce_416),+ (417 , happyReduce_417),+ (418 , happyReduce_418),+ (419 , happyReduce_419),+ (420 , happyReduce_420),+ (421 , happyReduce_421),+ (422 , happyReduce_422),+ (423 , happyReduce_423),+ (424 , happyReduce_424),+ (425 , happyReduce_425),+ (426 , happyReduce_426),+ (427 , happyReduce_427),+ (428 , happyReduce_428),+ (429 , happyReduce_429),+ (430 , happyReduce_430),+ (431 , happyReduce_431),+ (432 , happyReduce_432),+ (433 , happyReduce_433),+ (434 , happyReduce_434),+ (435 , happyReduce_435),+ (436 , happyReduce_436),+ (437 , happyReduce_437),+ (438 , happyReduce_438),+ (439 , happyReduce_439),+ (440 , happyReduce_440),+ (441 , happyReduce_441),+ (442 , happyReduce_442),+ (443 , happyReduce_443),+ (444 , happyReduce_444),+ (445 , happyReduce_445),+ (446 , happyReduce_446),+ (447 , happyReduce_447),+ (448 , happyReduce_448),+ (449 , happyReduce_449),+ (450 , happyReduce_450),+ (451 , happyReduce_451),+ (452 , happyReduce_452),+ (453 , happyReduce_453),+ (454 , happyReduce_454),+ (455 , happyReduce_455),+ (456 , happyReduce_456),+ (457 , happyReduce_457),+ (458 , happyReduce_458),+ (459 , happyReduce_459),+ (460 , happyReduce_460),+ (461 , happyReduce_461),+ (462 , happyReduce_462),+ (463 , happyReduce_463),+ (464 , happyReduce_464),+ (465 , happyReduce_465),+ (466 , happyReduce_466),+ (467 , happyReduce_467),+ (468 , happyReduce_468),+ (469 , happyReduce_469),+ (470 , happyReduce_470),+ (471 , happyReduce_471),+ (472 , happyReduce_472),+ (473 , happyReduce_473),+ (474 , happyReduce_474),+ (475 , happyReduce_475),+ (476 , happyReduce_476),+ (477 , happyReduce_477),+ (478 , happyReduce_478),+ (479 , happyReduce_479),+ (480 , happyReduce_480),+ (481 , happyReduce_481),+ (482 , happyReduce_482),+ (483 , happyReduce_483),+ (484 , happyReduce_484),+ (485 , happyReduce_485),+ (486 , happyReduce_486),+ (487 , happyReduce_487),+ (488 , happyReduce_488),+ (489 , happyReduce_489),+ (490 , happyReduce_490),+ (491 , happyReduce_491),+ (492 , happyReduce_492),+ (493 , happyReduce_493),+ (494 , happyReduce_494),+ (495 , happyReduce_495),+ (496 , happyReduce_496),+ (497 , happyReduce_497),+ (498 , happyReduce_498),+ (499 , happyReduce_499),+ (500 , happyReduce_500),+ (501 , happyReduce_501),+ (502 , happyReduce_502),+ (503 , happyReduce_503),+ (504 , happyReduce_504),+ (505 , happyReduce_505),+ (506 , happyReduce_506),+ (507 , happyReduce_507),+ (508 , happyReduce_508),+ (509 , happyReduce_509),+ (510 , happyReduce_510),+ (511 , happyReduce_511),+ (512 , happyReduce_512),+ (513 , happyReduce_513),+ (514 , happyReduce_514),+ (515 , happyReduce_515),+ (516 , happyReduce_516),+ (517 , happyReduce_517),+ (518 , happyReduce_518),+ (519 , happyReduce_519),+ (520 , happyReduce_520),+ (521 , happyReduce_521),+ (522 , happyReduce_522),+ (523 , happyReduce_523),+ (524 , happyReduce_524),+ (525 , happyReduce_525),+ (526 , happyReduce_526),+ (527 , happyReduce_527),+ (528 , happyReduce_528),+ (529 , happyReduce_529),+ (530 , happyReduce_530),+ (531 , happyReduce_531),+ (532 , happyReduce_532),+ (533 , happyReduce_533),+ (534 , happyReduce_534),+ (535 , happyReduce_535),+ (536 , happyReduce_536),+ (537 , happyReduce_537),+ (538 , happyReduce_538),+ (539 , happyReduce_539),+ (540 , happyReduce_540),+ (541 , happyReduce_541),+ (542 , happyReduce_542),+ (543 , happyReduce_543),+ (544 , happyReduce_544),+ (545 , happyReduce_545),+ (546 , happyReduce_546),+ (547 , happyReduce_547),+ (548 , happyReduce_548),+ (549 , happyReduce_549),+ (550 , happyReduce_550),+ (551 , happyReduce_551),+ (552 , happyReduce_552),+ (553 , happyReduce_553),+ (554 , happyReduce_554),+ (555 , happyReduce_555),+ (556 , happyReduce_556),+ (557 , happyReduce_557),+ (558 , happyReduce_558),+ (559 , happyReduce_559),+ (560 , happyReduce_560),+ (561 , happyReduce_561),+ (562 , happyReduce_562),+ (563 , happyReduce_563),+ (564 , happyReduce_564),+ (565 , happyReduce_565),+ (566 , happyReduce_566),+ (567 , happyReduce_567),+ (568 , happyReduce_568),+ (569 , happyReduce_569),+ (570 , happyReduce_570),+ (571 , happyReduce_571),+ (572 , happyReduce_572),+ (573 , happyReduce_573),+ (574 , happyReduce_574),+ (575 , happyReduce_575),+ (576 , happyReduce_576),+ (577 , happyReduce_577),+ (578 , happyReduce_578),+ (579 , happyReduce_579),+ (580 , happyReduce_580),+ (581 , happyReduce_581),+ (582 , happyReduce_582),+ (583 , happyReduce_583),+ (584 , happyReduce_584),+ (585 , happyReduce_585),+ (586 , happyReduce_586),+ (587 , happyReduce_587),+ (588 , happyReduce_588),+ (589 , happyReduce_589),+ (590 , happyReduce_590),+ (591 , happyReduce_591),+ (592 , happyReduce_592),+ (593 , happyReduce_593),+ (594 , happyReduce_594),+ (595 , happyReduce_595),+ (596 , happyReduce_596),+ (597 , happyReduce_597),+ (598 , happyReduce_598),+ (599 , happyReduce_599),+ (600 , happyReduce_600),+ (601 , happyReduce_601),+ (602 , happyReduce_602),+ (603 , happyReduce_603),+ (604 , happyReduce_604),+ (605 , happyReduce_605),+ (606 , happyReduce_606),+ (607 , happyReduce_607),+ (608 , happyReduce_608),+ (609 , happyReduce_609),+ (610 , happyReduce_610),+ (611 , happyReduce_611),+ (612 , happyReduce_612),+ (613 , happyReduce_613),+ (614 , happyReduce_614),+ (615 , happyReduce_615),+ (616 , happyReduce_616),+ (617 , happyReduce_617),+ (618 , happyReduce_618),+ (619 , happyReduce_619),+ (620 , happyReduce_620),+ (621 , happyReduce_621),+ (622 , happyReduce_622),+ (623 , happyReduce_623),+ (624 , happyReduce_624),+ (625 , happyReduce_625),+ (626 , happyReduce_626),+ (627 , happyReduce_627),+ (628 , happyReduce_628),+ (629 , happyReduce_629),+ (630 , happyReduce_630),+ (631 , happyReduce_631),+ (632 , happyReduce_632),+ (633 , happyReduce_633),+ (634 , happyReduce_634),+ (635 , happyReduce_635),+ (636 , happyReduce_636),+ (637 , happyReduce_637),+ (638 , happyReduce_638),+ (639 , happyReduce_639),+ (640 , happyReduce_640),+ (641 , happyReduce_641),+ (642 , happyReduce_642),+ (643 , happyReduce_643),+ (644 , happyReduce_644),+ (645 , happyReduce_645),+ (646 , happyReduce_646),+ (647 , happyReduce_647),+ (648 , happyReduce_648),+ (649 , happyReduce_649),+ (650 , happyReduce_650),+ (651 , happyReduce_651),+ (652 , happyReduce_652),+ (653 , happyReduce_653),+ (654 , happyReduce_654),+ (655 , happyReduce_655),+ (656 , happyReduce_656),+ (657 , happyReduce_657),+ (658 , happyReduce_658),+ (659 , happyReduce_659),+ (660 , happyReduce_660),+ (661 , happyReduce_661),+ (662 , happyReduce_662),+ (663 , happyReduce_663),+ (664 , happyReduce_664),+ (665 , happyReduce_665),+ (666 , happyReduce_666),+ (667 , happyReduce_667),+ (668 , happyReduce_668),+ (669 , happyReduce_669),+ (670 , happyReduce_670),+ (671 , happyReduce_671),+ (672 , happyReduce_672),+ (673 , happyReduce_673),+ (674 , happyReduce_674),+ (675 , happyReduce_675),+ (676 , happyReduce_676),+ (677 , happyReduce_677),+ (678 , happyReduce_678),+ (679 , happyReduce_679),+ (680 , happyReduce_680),+ (681 , happyReduce_681),+ (682 , happyReduce_682),+ (683 , happyReduce_683),+ (684 , happyReduce_684),+ (685 , happyReduce_685),+ (686 , happyReduce_686),+ (687 , happyReduce_687),+ (688 , happyReduce_688),+ (689 , happyReduce_689),+ (690 , happyReduce_690),+ (691 , happyReduce_691),+ (692 , happyReduce_692),+ (693 , happyReduce_693),+ (694 , happyReduce_694),+ (695 , happyReduce_695),+ (696 , happyReduce_696),+ (697 , happyReduce_697),+ (698 , happyReduce_698),+ (699 , happyReduce_699),+ (700 , happyReduce_700),+ (701 , happyReduce_701),+ (702 , happyReduce_702),+ (703 , happyReduce_703),+ (704 , happyReduce_704),+ (705 , happyReduce_705),+ (706 , happyReduce_706),+ (707 , happyReduce_707),+ (708 , happyReduce_708),+ (709 , happyReduce_709),+ (710 , happyReduce_710),+ (711 , happyReduce_711),+ (712 , happyReduce_712),+ (713 , happyReduce_713),+ (714 , happyReduce_714),+ (715 , happyReduce_715),+ (716 , happyReduce_716),+ (717 , happyReduce_717),+ (718 , happyReduce_718),+ (719 , happyReduce_719),+ (720 , happyReduce_720),+ (721 , happyReduce_721),+ (722 , happyReduce_722),+ (723 , happyReduce_723),+ (724 , happyReduce_724),+ (725 , happyReduce_725),+ (726 , happyReduce_726),+ (727 , happyReduce_727),+ (728 , happyReduce_728),+ (729 , happyReduce_729),+ (730 , happyReduce_730),+ (731 , happyReduce_731),+ (732 , happyReduce_732),+ (733 , happyReduce_733),+ (734 , happyReduce_734),+ (735 , happyReduce_735),+ (736 , happyReduce_736),+ (737 , happyReduce_737),+ (738 , happyReduce_738),+ (739 , happyReduce_739),+ (740 , happyReduce_740),+ (741 , happyReduce_741),+ (742 , happyReduce_742),+ (743 , happyReduce_743),+ (744 , happyReduce_744),+ (745 , happyReduce_745),+ (746 , happyReduce_746),+ (747 , happyReduce_747),+ (748 , happyReduce_748),+ (749 , happyReduce_749),+ (750 , happyReduce_750),+ (751 , happyReduce_751),+ (752 , happyReduce_752),+ (753 , happyReduce_753),+ (754 , happyReduce_754),+ (755 , happyReduce_755),+ (756 , happyReduce_756),+ (757 , happyReduce_757),+ (758 , happyReduce_758),+ (759 , happyReduce_759),+ (760 , happyReduce_760),+ (761 , happyReduce_761),+ (762 , happyReduce_762),+ (763 , happyReduce_763),+ (764 , happyReduce_764),+ (765 , happyReduce_765),+ (766 , happyReduce_766),+ (767 , happyReduce_767),+ (768 , happyReduce_768),+ (769 , happyReduce_769),+ (770 , happyReduce_770),+ (771 , happyReduce_771),+ (772 , happyReduce_772),+ (773 , happyReduce_773),+ (774 , happyReduce_774),+ (775 , happyReduce_775),+ (776 , happyReduce_776),+ (777 , happyReduce_777),+ (778 , happyReduce_778),+ (779 , happyReduce_779),+ (780 , happyReduce_780),+ (781 , happyReduce_781),+ (782 , happyReduce_782),+ (783 , happyReduce_783),+ (784 , happyReduce_784),+ (785 , happyReduce_785),+ (786 , happyReduce_786),+ (787 , happyReduce_787),+ (788 , happyReduce_788),+ (789 , happyReduce_789),+ (790 , happyReduce_790),+ (791 , happyReduce_791),+ (792 , happyReduce_792),+ (793 , happyReduce_793),+ (794 , happyReduce_794),+ (795 , happyReduce_795),+ (796 , happyReduce_796),+ (797 , happyReduce_797),+ (798 , happyReduce_798),+ (799 , happyReduce_799),+ (800 , happyReduce_800),+ (801 , happyReduce_801),+ (802 , happyReduce_802),+ (803 , happyReduce_803),+ (804 , happyReduce_804),+ (805 , happyReduce_805),+ (806 , happyReduce_806),+ (807 , happyReduce_807),+ (808 , happyReduce_808),+ (809 , happyReduce_809),+ (810 , happyReduce_810),+ (811 , happyReduce_811),+ (812 , happyReduce_812),+ (813 , happyReduce_813),+ (814 , happyReduce_814),+ (815 , happyReduce_815),+ (816 , happyReduce_816),+ (817 , happyReduce_817),+ (818 , happyReduce_818),+ (819 , happyReduce_819),+ (820 , happyReduce_820),+ (821 , happyReduce_821),+ (822 , happyReduce_822),+ (823 , happyReduce_823),+ (824 , happyReduce_824),+ (825 , happyReduce_825),+ (826 , happyReduce_826),+ (827 , happyReduce_827),+ (828 , happyReduce_828),+ (829 , happyReduce_829),+ (830 , happyReduce_830),+ (831 , happyReduce_831),+ (832 , happyReduce_832),+ (833 , happyReduce_833),+ (834 , happyReduce_834),+ (835 , happyReduce_835),+ (836 , happyReduce_836),+ (837 , happyReduce_837),+ (838 , happyReduce_838),+ (839 , happyReduce_839),+ (840 , happyReduce_840),+ (841 , happyReduce_841),+ (842 , happyReduce_842),+ (843 , happyReduce_843),+ (844 , happyReduce_844),+ (845 , happyReduce_845),+ (846 , happyReduce_846),+ (847 , happyReduce_847),+ (848 , happyReduce_848),+ (849 , happyReduce_849),+ (850 , happyReduce_850),+ (851 , happyReduce_851),+ (852 , happyReduce_852),+ (853 , happyReduce_853),+ (854 , happyReduce_854),+ (855 , happyReduce_855)+ ]++happy_n_terms = 159 :: Prelude.Int+happy_n_nonterms = 319 :: Prelude.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 happyOut304 happy_x_1 of { (HappyWrap304 happy_var_1) -> + happyIn16+ (happy_var_1+ )}++happyReduce_14 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_14 = happySpecReduce_1 0# happyReduction_14+happyReduction_14 happy_x_1+ = case happyOut274 happy_x_1 of { (HappyWrap274 happy_var_1) -> + happyIn16+ (happy_var_1+ )}++happyReduce_15 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_15 = happySpecReduce_1 0# happyReduction_15+happyReduction_15 happy_x_1+ = case happyOut298 happy_x_1 of { (HappyWrap298 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 happyOut282 happy_x_1 of { (HappyWrap282 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 -> + ( amsrn (sLL happy_var_1 happy_var_3 $ getRdrName unrestrictedFunTyCon)+ (NameAnnRArrow (isUnicode happy_var_2) (Just $ glAA happy_var_1) (glAA happy_var_2) (Just $ glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn16 r))++happyReduce_18 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_18 = happyMonadReduce 1# 0# happyReduction_18+happyReduction_18 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( amsrn (sLL happy_var_1 happy_var_1 $ getRdrName unrestrictedFunTyCon)+ (NameAnnRArrow (isUnicode happy_var_1) Nothing (glAA happy_var_1) Nothing []))})+ ) (\r -> happyReturn (happyIn16 r))++happyReduce_19 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_19 = happySpecReduce_3 1# happyReduction_19+happyReduction_19 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut18 happy_x_2 of { (HappyWrap18 happy_var_2) -> + happyIn17+ (fromOL happy_var_2+ )}++happyReduce_20 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_20 = happySpecReduce_3 1# happyReduction_20+happyReduction_20 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut18 happy_x_2 of { (HappyWrap18 happy_var_2) -> + happyIn17+ (fromOL happy_var_2+ )}++happyReduce_21 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_21 = happySpecReduce_3 2# happyReduction_21+happyReduction_21 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut18 happy_x_1 of { (HappyWrap18 happy_var_1) -> + case happyOut19 happy_x_3 of { (HappyWrap19 happy_var_3) -> + happyIn18+ (happy_var_1 `appOL` unitOL happy_var_3+ )}}++happyReduce_22 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_22 = happySpecReduce_2 2# happyReduction_22+happyReduction_22 happy_x_2+ happy_x_1+ = case happyOut18 happy_x_1 of { (HappyWrap18 happy_var_1) -> + happyIn18+ (happy_var_1+ )}++happyReduce_23 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_23 = happySpecReduce_1 2# happyReduction_23+happyReduction_23 happy_x_1+ = case happyOut19 happy_x_1 of { (HappyWrap19 happy_var_1) -> + happyIn18+ (unitOL happy_var_1+ )}++happyReduce_24 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_24 = happyReduce 4# 3# happyReduction_24+happyReduction_24 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut24 happy_x_2 of { (HappyWrap24 happy_var_2) -> + case happyOut31 happy_x_4 of { (HappyWrap31 happy_var_4) -> + happyIn19+ (sL1 happy_var_1 $ HsUnit { hsunitName = happy_var_2+ , hsunitBody = fromOL happy_var_4 }+ ) `HappyStk` happyRest}}}++happyReduce_25 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_25 = happySpecReduce_1 4# happyReduction_25+happyReduction_25 happy_x_1+ = case happyOut24 happy_x_1 of { (HappyWrap24 happy_var_1) -> + happyIn20+ (sL1 happy_var_1 $ HsUnitId happy_var_1 []+ )}++happyReduce_26 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_26 = happyReduce 4# 4# happyReduction_26+happyReduction_26 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOut24 happy_x_1 of { (HappyWrap24 happy_var_1) -> + case happyOut21 happy_x_3 of { (HappyWrap21 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + happyIn20+ (sLL happy_var_1 happy_var_4 $ HsUnitId happy_var_1 (fromOL happy_var_3)+ ) `HappyStk` happyRest}}}++happyReduce_27 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_27 = happySpecReduce_3 5# happyReduction_27+happyReduction_27 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut21 happy_x_1 of { (HappyWrap21 happy_var_1) -> + case happyOut22 happy_x_3 of { (HappyWrap22 happy_var_3) -> + happyIn21+ (happy_var_1 `appOL` unitOL happy_var_3+ )}}++happyReduce_28 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_28 = happySpecReduce_2 5# happyReduction_28+happyReduction_28 happy_x_2+ happy_x_1+ = case happyOut21 happy_x_1 of { (HappyWrap21 happy_var_1) -> + happyIn21+ (happy_var_1+ )}++happyReduce_29 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_29 = happySpecReduce_1 5# happyReduction_29+happyReduction_29 happy_x_1+ = case happyOut22 happy_x_1 of { (HappyWrap22 happy_var_1) -> + happyIn21+ (unitOL happy_var_1+ )}++happyReduce_30 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_30 = happySpecReduce_3 6# happyReduction_30+happyReduction_30 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut321 happy_x_1 of { (HappyWrap321 happy_var_1) -> + case happyOut23 happy_x_3 of { (HappyWrap23 happy_var_3) -> + happyIn22+ (sLL (reLoc happy_var_1) happy_var_3 $ (reLoc happy_var_1, happy_var_3)+ )}}++happyReduce_31 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_31 = happyReduce 4# 6# happyReduction_31+happyReduction_31 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOut321 happy_x_1 of { (HappyWrap321 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut321 happy_x_3 of { (HappyWrap321 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + happyIn22+ (sLL (reLoc happy_var_1) happy_var_4 $ (reLoc happy_var_1, sLL happy_var_2 happy_var_4 $ HsModuleVar (reLoc happy_var_3))+ ) `HappyStk` happyRest}}}}++happyReduce_32 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_32 = happySpecReduce_3 7# happyReduction_32+happyReduction_32 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut321 happy_x_2 of { (HappyWrap321 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn23+ (sLL happy_var_1 happy_var_3 $ HsModuleVar (reLoc happy_var_2)+ )}}}++happyReduce_33 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_33 = happySpecReduce_3 7# happyReduction_33+happyReduction_33 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut20 happy_x_1 of { (HappyWrap20 happy_var_1) -> + case happyOut321 happy_x_3 of { (HappyWrap321 happy_var_3) -> + happyIn23+ (sLL happy_var_1 (reLoc happy_var_3) $ HsModuleId happy_var_1 (reLoc happy_var_3)+ )}}++happyReduce_34 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_34 = happySpecReduce_1 8# happyReduction_34+happyReduction_34 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn24+ (sL1 happy_var_1 $ PackageName (getSTRING happy_var_1)+ )}++happyReduce_35 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_35 = happySpecReduce_1 8# happyReduction_35+happyReduction_35 happy_x_1+ = case happyOut27 happy_x_1 of { (HappyWrap27 happy_var_1) -> + happyIn24+ (sL1 happy_var_1 $ PackageName (unLoc happy_var_1)+ )}++happyReduce_36 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_36 = happySpecReduce_1 9# happyReduction_36+happyReduction_36 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn25+ (sL1 happy_var_1 $ getVARID happy_var_1+ )}++happyReduce_37 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_37 = happySpecReduce_1 9# happyReduction_37+happyReduction_37 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn25+ (sL1 happy_var_1 $ getCONID happy_var_1+ )}++happyReduce_38 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_38 = happySpecReduce_1 9# happyReduction_38+happyReduction_38 happy_x_1+ = case happyOut313 happy_x_1 of { (HappyWrap313 happy_var_1) -> + happyIn25+ (happy_var_1+ )}++happyReduce_39 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_39 = happySpecReduce_1 10# happyReduction_39+happyReduction_39 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn26+ ([mj AnnMinus happy_var_1 ]+ )}++happyReduce_40 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_40 = happySpecReduce_1 10# happyReduction_40+happyReduction_40 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn26+ ([mj AnnMinus happy_var_1 ]+ )}++happyReduce_41 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_41 = happyMonadReduce 1# 10# happyReduction_41+happyReduction_41 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( if (getVARSYM happy_var_1 == fsLit "-")+ then return [mj AnnMinus happy_var_1]+ else do { addError $ mkPlainErrorMsgEnvelope (getLoc happy_var_1) $ PsErrExpectedHyphen+ ; return [] })})+ ) (\r -> happyReturn (happyIn26 r))++happyReduce_42 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_42 = happySpecReduce_1 11# happyReduction_42+happyReduction_42 happy_x_1+ = case happyOut25 happy_x_1 of { (HappyWrap25 happy_var_1) -> + happyIn27+ (happy_var_1+ )}++happyReduce_43 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_43 = happySpecReduce_3 11# happyReduction_43+happyReduction_43 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut25 happy_x_1 of { (HappyWrap25 happy_var_1) -> + case happyOut27 happy_x_3 of { (HappyWrap27 happy_var_3) -> + happyIn27+ (sLL happy_var_1 happy_var_3 $ concatFS [unLoc happy_var_1, fsLit "-", (unLoc happy_var_3)]+ )}}++happyReduce_44 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_44 = happySpecReduce_0 12# happyReduction_44+happyReduction_44 = happyIn28+ (Nothing+ )++happyReduce_45 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_45 = happySpecReduce_3 12# happyReduction_45+happyReduction_45 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut29 happy_x_2 of { (HappyWrap29 happy_var_2) -> + happyIn28+ (Just (fromOL happy_var_2)+ )}++happyReduce_46 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_46 = happySpecReduce_3 13# happyReduction_46+happyReduction_46 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut29 happy_x_1 of { (HappyWrap29 happy_var_1) -> + case happyOut30 happy_x_3 of { (HappyWrap30 happy_var_3) -> + happyIn29+ (happy_var_1 `appOL` unitOL happy_var_3+ )}}++happyReduce_47 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_47 = happySpecReduce_2 13# happyReduction_47+happyReduction_47 happy_x_2+ happy_x_1+ = case happyOut29 happy_x_1 of { (HappyWrap29 happy_var_1) -> + happyIn29+ (happy_var_1+ )}++happyReduce_48 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_48 = happySpecReduce_1 13# happyReduction_48+happyReduction_48 happy_x_1+ = case happyOut30 happy_x_1 of { (HappyWrap30 happy_var_1) -> + happyIn29+ (unitOL happy_var_1+ )}++happyReduce_49 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_49 = happySpecReduce_3 14# happyReduction_49+happyReduction_49 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut321 happy_x_1 of { (HappyWrap321 happy_var_1) -> + case happyOut321 happy_x_3 of { (HappyWrap321 happy_var_3) -> + happyIn30+ (sLL (reLoc happy_var_1) (reLoc happy_var_3) $ Renaming (reLoc happy_var_1) (Just (reLoc happy_var_3))+ )}}++happyReduce_50 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_50 = happySpecReduce_1 14# happyReduction_50+happyReduction_50 happy_x_1+ = case happyOut321 happy_x_1 of { (HappyWrap321 happy_var_1) -> + happyIn30+ (sL1 (reLoc happy_var_1) $ Renaming (reLoc happy_var_1) Nothing+ )}++happyReduce_51 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_51 = happySpecReduce_3 15# happyReduction_51+happyReduction_51 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut32 happy_x_2 of { (HappyWrap32 happy_var_2) -> + happyIn31+ (happy_var_2+ )}++happyReduce_52 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_52 = happySpecReduce_3 15# happyReduction_52+happyReduction_52 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut32 happy_x_2 of { (HappyWrap32 happy_var_2) -> + happyIn31+ (happy_var_2+ )}++happyReduce_53 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_53 = happySpecReduce_3 16# happyReduction_53+happyReduction_53 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut32 happy_x_1 of { (HappyWrap32 happy_var_1) -> + case happyOut33 happy_x_3 of { (HappyWrap33 happy_var_3) -> + happyIn32+ (happy_var_1 `appOL` unitOL happy_var_3+ )}}++happyReduce_54 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_54 = happySpecReduce_2 16# happyReduction_54+happyReduction_54 happy_x_2+ happy_x_1+ = case happyOut32 happy_x_1 of { (HappyWrap32 happy_var_1) -> + happyIn32+ (happy_var_1+ )}++happyReduce_55 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_55 = happySpecReduce_1 16# happyReduction_55+happyReduction_55 happy_x_1+ = case happyOut33 happy_x_1 of { (HappyWrap33 happy_var_1) -> + happyIn32+ (unitOL happy_var_1+ )}++happyReduce_56 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_56 = happyReduce 7# 17# happyReduction_56+happyReduction_56 (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 happyOut64 happy_x_2 of { (HappyWrap64 happy_var_2) -> + case happyOut321 happy_x_3 of { (HappyWrap321 happy_var_3) -> + case happyOut38 happy_x_4 of { (HappyWrap38 happy_var_4) -> + case happyOut48 happy_x_5 of { (HappyWrap48 happy_var_5) -> + case happyOut39 happy_x_7 of { (HappyWrap39 happy_var_7) -> + happyIn33+ (sL1 happy_var_1 $ DeclD+ (case snd happy_var_2 of+ NotBoot -> HsSrcFile+ IsBoot -> HsBootFile)+ (reLoc happy_var_3)+ (sL1 happy_var_1 (HsModule (XModulePs noAnn (thdOf3 happy_var_7) happy_var_4 Nothing) (Just happy_var_3) happy_var_5 (fst $ sndOf3 happy_var_7) (snd $ sndOf3 happy_var_7)))+ ) `HappyStk` happyRest}}}}}}++happyReduce_57 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_57 = happyReduce 6# 17# 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 happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut321 happy_x_2 of { (HappyWrap321 happy_var_2) -> + case happyOut38 happy_x_3 of { (HappyWrap38 happy_var_3) -> + case happyOut48 happy_x_4 of { (HappyWrap48 happy_var_4) -> + case happyOut39 happy_x_6 of { (HappyWrap39 happy_var_6) -> + happyIn33+ (sL1 happy_var_1 $ DeclD+ HsigFile+ (reLoc happy_var_2)+ (sL1 happy_var_1 (HsModule (XModulePs noAnn (thdOf3 happy_var_6) happy_var_3 Nothing) (Just happy_var_2) happy_var_4 (fst $ sndOf3 happy_var_6) (snd $ sndOf3 happy_var_6)))+ ) `HappyStk` happyRest}}}}}++happyReduce_58 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_58 = happySpecReduce_3 17# happyReduction_58+happyReduction_58 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut20 happy_x_2 of { (HappyWrap20 happy_var_2) -> + case happyOut28 happy_x_3 of { (HappyWrap28 happy_var_3) -> + happyIn33+ (sL1 happy_var_1 $ IncludeD (IncludeDecl { idUnitId = happy_var_2+ , idModRenaming = happy_var_3+ , idSignatureInclude = False })+ )}}}++happyReduce_59 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_59 = happySpecReduce_3 17# happyReduction_59+happyReduction_59 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut20 happy_x_3 of { (HappyWrap20 happy_var_3) -> + happyIn33+ (sL1 happy_var_1 $ IncludeD (IncludeDecl { idUnitId = happy_var_3+ , idModRenaming = Nothing+ , idSignatureInclude = True })+ )}}++happyReduce_60 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_60 = happyMonadReduce 6# 18# 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) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut321 happy_x_2 of { (HappyWrap321 happy_var_2) -> + case happyOut38 happy_x_3 of { (HappyWrap38 happy_var_3) -> + case happyOut48 happy_x_4 of { (HappyWrap48 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + case happyOut39 happy_x_6 of { (HappyWrap39 happy_var_6) -> + ( fileSrcSpan >>= \ loc ->+ acs (\cs-> (L loc (HsModule (XModulePs+ (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnSignature happy_var_1, mj AnnWhere happy_var_5] (fstOf3 happy_var_6) Nothing) cs)+ (thdOf3 happy_var_6) happy_var_3 Nothing)+ (Just happy_var_2) happy_var_4 (fst $ sndOf3 happy_var_6)+ (snd $ sndOf3 happy_var_6)))+ ))}}}}}})+ ) (\r -> happyReturn (happyIn34 r))++happyReduce_61 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_61 = happyMonadReduce 6# 19# happyReduction_61+happyReduction_61 (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 happyOut321 happy_x_2 of { (HappyWrap321 happy_var_2) -> + case happyOut38 happy_x_3 of { (HappyWrap38 happy_var_3) -> + case happyOut48 happy_x_4 of { (HappyWrap48 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + case happyOut39 happy_x_6 of { (HappyWrap39 happy_var_6) -> + ( fileSrcSpan >>= \ loc ->+ acsFinal (\cs eof -> (L loc (HsModule (XModulePs+ (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnModule happy_var_1, mj AnnWhere happy_var_5] (fstOf3 happy_var_6) eof) cs)+ (thdOf3 happy_var_6) happy_var_3 Nothing)+ (Just happy_var_2) happy_var_4 (fst $ sndOf3 happy_var_6)+ (snd $ sndOf3 happy_var_6))+ )))}}}}}})+ ) (\r -> happyReturn (happyIn35 r))++happyReduce_62 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_62 = happyMonadReduce 1# 19# happyReduction_62+happyReduction_62 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut40 happy_x_1 of { (HappyWrap40 happy_var_1) -> + ( fileSrcSpan >>= \ loc ->+ acsFinal (\cs eof -> (L loc (HsModule (XModulePs+ (EpAnn (spanAsAnchor loc) (AnnsModule [] (fstOf3 happy_var_1) eof) cs)+ (thdOf3 happy_var_1) Nothing Nothing)+ Nothing Nothing+ (fst $ sndOf3 happy_var_1) (snd $ sndOf3 happy_var_1)))))})+ ) (\r -> happyReturn (happyIn35 r))++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 happyOut149 happy_x_2 of { (HappyWrap149 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( fmap Just $ amsrp (sLL happy_var_1 happy_var_3 $ DeprecatedTxt (sL1 happy_var_1 $ getDEPRECATED_PRAGs happy_var_1) (map stringLiteralToHsDocWst $ snd $ unLoc happy_var_2))+ (AnnPragma (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 4# 22# happyReduction_66+happyReduction_66 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut144 happy_x_2 of { (HappyWrap144 happy_var_2) -> + case happyOut149 happy_x_3 of { (HappyWrap149 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + ( fmap Just $ amsrp (sLL happy_var_1 happy_var_4 $ WarningTxt happy_var_2 (sL1 happy_var_1 $ getWARNING_PRAGs happy_var_1) (map stringLiteralToHsDocWst $ snd $ unLoc happy_var_3))+ (AnnPragma (mo happy_var_1) (mc happy_var_4) (fst $ unLoc happy_var_3)))}}}})+ ) (\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 { (HappyWrap41 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn39+ ((fst happy_var_2, snd happy_var_2, explicitBraces happy_var_1 happy_var_3)+ )}}}++happyReduce_69 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_69 = happySpecReduce_3 23# happyReduction_69+happyReduction_69 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut41 happy_x_2 of { (HappyWrap41 happy_var_2) -> + happyIn39+ ((fst happy_var_2, snd happy_var_2, VirtualBraces (getVOCURLY happy_var_1))+ )}}++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 { (HappyWrap41 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn40+ ((fst happy_var_2, snd happy_var_2, explicitBraces happy_var_1 happy_var_3)+ )}}}++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 { (HappyWrap41 happy_var_2) -> + happyIn40+ (([], snd happy_var_2, VirtualBraces leftmostColumn)+ )}++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 happyOut60 happy_x_1 of { (HappyWrap60 happy_var_1) -> + case happyOut42 happy_x_2 of { (HappyWrap42 happy_var_2) -> + happyIn41+ ((reverse 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 happyOut62 happy_x_1 of { (HappyWrap62 happy_var_1) -> + case happyOut80 happy_x_2 of { (HappyWrap80 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 happyOut62 happy_x_1 of { (HappyWrap62 happy_var_1) -> + case happyOut79 happy_x_2 of { (HappyWrap79 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 happyOut61 happy_x_1 of { (HappyWrap61 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 6# 27# happyReduction_76+happyReduction_76 (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 happyOut321 happy_x_2 of { (HappyWrap321 happy_var_2) -> + case happyOut38 happy_x_3 of { (HappyWrap38 happy_var_3) -> + case happyOut48 happy_x_4 of { (HappyWrap48 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + case happyOut44 happy_x_6 of { (HappyWrap44 happy_var_6) -> + ( fileSrcSpan >>= \ loc ->+ acs (\cs -> (L loc (HsModule (XModulePs+ (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnModule happy_var_1,mj AnnWhere happy_var_5] [] Nothing) cs)+ NoLayoutInfo happy_var_3 Nothing)+ (Just happy_var_2) happy_var_4 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 6# 27# happyReduction_77+happyReduction_77 (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 happyOut321 happy_x_2 of { (HappyWrap321 happy_var_2) -> + case happyOut38 happy_x_3 of { (HappyWrap38 happy_var_3) -> + case happyOut48 happy_x_4 of { (HappyWrap48 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + case happyOut44 happy_x_6 of { (HappyWrap44 happy_var_6) -> + ( fileSrcSpan >>= \ loc ->+ acs (\cs -> (L loc (HsModule (XModulePs+ (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnModule happy_var_1,mj AnnWhere happy_var_5] [] Nothing) cs)+ NoLayoutInfo happy_var_3 Nothing)+ (Just happy_var_2) happy_var_4 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 { (HappyWrap45 happy_var_1) -> + ( fileSrcSpan >>= \ loc ->+ return (L loc (HsModule (XModulePs noAnn NoLayoutInfo Nothing Nothing) Nothing Nothing happy_var_1 [])))})+ ) (\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 { (HappyWrap46 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 { (HappyWrap46 happy_var_2) -> + happyIn44+ (happy_var_2+ )}++happyReduce_81 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_81 = happySpecReduce_2 29# happyReduction_81+happyReduction_81 happy_x_2+ happy_x_1+ = case happyOut46 happy_x_2 of { (HappyWrap46 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 { (HappyWrap46 happy_var_2) -> + happyIn45+ (happy_var_2+ )}++happyReduce_83 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_83 = happySpecReduce_2 30# happyReduction_83+happyReduction_83 happy_x_2+ happy_x_1+ = case happyOut47 happy_x_2 of { (HappyWrap47 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 happyOut62 happy_x_1 of { (HappyWrap62 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 happyOut61 happy_x_1 of { (HappyWrap61 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 { (HappyWrap49 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( fmap Just $ amsrl (sLL happy_var_1 happy_var_3 (fromOL $ snd happy_var_2))+ (AnnList Nothing (Just $ mop happy_var_1) (Just $ mcp happy_var_3) (fst 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 = happySpecReduce_1 33# happyReduction_88+happyReduction_88 happy_x_1+ = case happyOut50 happy_x_1 of { (HappyWrap50 happy_var_1) -> + happyIn49+ (([], happy_var_1)+ )}++happyReduce_89 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_89 = happySpecReduce_0 33# happyReduction_89+happyReduction_89 = happyIn49+ (([], nilOL)+ )++happyReduce_90 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_90 = happyMonadReduce 2# 33# happyReduction_90+happyReduction_90 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut50 happy_x_1 of { (HappyWrap50 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + ( case happy_var_1 of+ SnocOL hs t -> do+ t' <- addTrailingCommaA t (gl happy_var_2)+ return ([], snocOL hs t'))}})+ ) (\r -> happyReturn (happyIn49 r))++happyReduce_91 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_91 = happySpecReduce_1 33# happyReduction_91+happyReduction_91 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn49+ (([mj AnnComma happy_var_1], nilOL)+ )}++happyReduce_92 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_92 = happyMonadReduce 3# 34# happyReduction_92+happyReduction_92 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut50 happy_x_1 of { (HappyWrap50 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut51 happy_x_3 of { (HappyWrap51 happy_var_3) -> + ( let ls = happy_var_1+ in if isNilOL ls+ then return (ls `appOL` happy_var_3)+ else case ls of+ SnocOL hs t -> do+ t' <- addTrailingCommaA t (gl happy_var_2)+ return (snocOL hs t' `appOL` happy_var_3))}}})+ ) (\r -> happyReturn (happyIn50 r))++happyReduce_93 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_93 = happySpecReduce_1 34# happyReduction_93+happyReduction_93 happy_x_1+ = case happyOut51 happy_x_1 of { (HappyWrap51 happy_var_1) -> + happyIn50+ (happy_var_1+ )}++happyReduce_94 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_94 = happyMonadReduce 3# 35# happyReduction_94+happyReduction_94 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut52 happy_x_1 of { (HappyWrap52 happy_var_1) -> + case happyOut57 happy_x_2 of { (HappyWrap57 happy_var_2) -> + case happyOut53 happy_x_3 of { (HappyWrap53 happy_var_3) -> + ( do { let { span = (maybe comb2 (comb3 . reLoc) happy_var_1) (reLoc happy_var_2) happy_var_3 }+ ; impExp <- mkModuleImpExp happy_var_1 (fst $ unLoc happy_var_3) happy_var_2 (snd $ unLoc happy_var_3)+ ; return $ unitOL $ reLocA $ sL span $ impExp })}}})+ ) (\r -> happyReturn (happyIn51 r))++happyReduce_95 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_95 = happyMonadReduce 3# 35# happyReduction_95+happyReduction_95 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut52 happy_x_1 of { (HappyWrap52 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut321 happy_x_3 of { (HappyWrap321 happy_var_3) -> + ( do { let { span = (maybe comb2 (comb3 . reLoc) happy_var_1) happy_var_2 (reLoc happy_var_3)+ ; anchor = (maybe glR (\loc -> spanAsAnchor . comb2 (reLoc loc)) happy_var_1) happy_var_2 }+ ; locImpExp <- acs (\cs -> sL span (IEModuleContents (happy_var_1, EpAnn anchor [mj AnnModule happy_var_2] cs) happy_var_3))+ ; return $ unitOL $ reLocA $ locImpExp })}}})+ ) (\r -> happyReturn (happyIn51 r))++happyReduce_96 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_96 = happySpecReduce_3 35# happyReduction_96+happyReduction_96 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut52 happy_x_1 of { (HappyWrap52 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut274 happy_x_3 of { (HappyWrap274 happy_var_3) -> + happyIn51+ (let span = (maybe comb2 (comb3 . reLoc) happy_var_1) happy_var_2 (reLoc happy_var_3)+ in unitOL $ reLocA $ sL span $ IEVar happy_var_1 (sLLa happy_var_2 (reLocN happy_var_3) (IEPattern (glAA happy_var_2) happy_var_3))+ )}}}++happyReduce_97 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_97 = happyMonadReduce 3# 36# happyReduction_97+happyReduction_97 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut149 happy_x_2 of { (HappyWrap149 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( fmap Just $ amsrp (sLL happy_var_1 happy_var_3 $ DeprecatedTxt (sL1 happy_var_1 $ getDEPRECATED_PRAGs happy_var_1) (map stringLiteralToHsDocWst $ snd $ unLoc happy_var_2))+ (AnnPragma (mo happy_var_1) (mc happy_var_3) (fst $ unLoc happy_var_2)))}}})+ ) (\r -> happyReturn (happyIn52 r))++happyReduce_98 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_98 = happyMonadReduce 4# 36# happyReduction_98+happyReduction_98 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut144 happy_x_2 of { (HappyWrap144 happy_var_2) -> + case happyOut149 happy_x_3 of { (HappyWrap149 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + ( fmap Just $ amsrp (sLL happy_var_1 happy_var_4 $ WarningTxt happy_var_2 (sL1 happy_var_1 $ getWARNING_PRAGs happy_var_1) (map stringLiteralToHsDocWst $ snd $ unLoc happy_var_3))+ (AnnPragma (mo happy_var_1) (mc happy_var_4) (fst $ unLoc happy_var_3)))}}}})+ ) (\r -> happyReturn (happyIn52 r))++happyReduce_99 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_99 = happySpecReduce_0 36# happyReduction_99+happyReduction_99 = happyIn52+ (Nothing+ )++happyReduce_100 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_100 = happySpecReduce_0 37# happyReduction_100+happyReduction_100 = happyIn53+ (sL0 ([],ImpExpAbs)+ )++happyReduce_101 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_101 = happyMonadReduce 3# 37# happyReduction_101+happyReduction_101 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut54 happy_x_2 of { (HappyWrap54 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 (happyIn53 r))++happyReduce_102 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_102 = happySpecReduce_0 38# happyReduction_102+happyReduction_102 = happyIn54+ (([],[])+ )++happyReduce_103 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_103 = happySpecReduce_1 38# happyReduction_103+happyReduction_103 happy_x_1+ = case happyOut55 happy_x_1 of { (HappyWrap55 happy_var_1) -> + happyIn54+ (happy_var_1+ )}++happyReduce_104 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_104 = happyMonadReduce 3# 39# happyReduction_104+happyReduction_104 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut55 happy_x_1 of { (HappyWrap55 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut56 happy_x_3 of { (HappyWrap56 happy_var_3) -> + ( case (snd happy_var_1) of+ (l@(L la ImpExpQcWildcard):t) ->+ do { l' <- addTrailingCommaA l (gl happy_var_2)+ ; return ([mj AnnDotdot (reLoc l),+ mj AnnComma happy_var_2]+ ,(snd (unLoc happy_var_3) : l' : t)) }+ (l:t) ->+ do { l' <- addTrailingCommaA l (gl happy_var_2)+ ; return (fst happy_var_1 ++ fst (unLoc happy_var_3)+ , snd (unLoc happy_var_3) : l' : t)})}}})+ ) (\r -> happyReturn (happyIn55 r))++happyReduce_105 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_105 = happySpecReduce_1 39# happyReduction_105+happyReduction_105 happy_x_1+ = case happyOut56 happy_x_1 of { (HappyWrap56 happy_var_1) -> + happyIn55+ ((fst (unLoc happy_var_1),[snd (unLoc happy_var_1)])+ )}++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 { (HappyWrap57 happy_var_1) -> + happyIn56+ (sL1A happy_var_1 ([],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 40# happyReduction_107+happyReduction_107 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn56+ (sL1 happy_var_1 ([mj AnnDotdot happy_var_1], sL1a happy_var_1 ImpExpQcWildcard)+ )}++happyReduce_108 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_108 = happySpecReduce_1 41# happyReduction_108+happyReduction_108 happy_x_1+ = case happyOut58 happy_x_1 of { (HappyWrap58 happy_var_1) -> + happyIn57+ (reLocA $ sL1N happy_var_1 (ImpExpQcName happy_var_1)+ )}++happyReduce_109 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_109 = happyMonadReduce 2# 41# happyReduction_109+happyReduction_109 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut285 happy_x_2 of { (HappyWrap285 happy_var_2) -> + ( do { n <- mkTypeImpExp happy_var_2+ ; return $ sLLa happy_var_1 (reLocN happy_var_2) (ImpExpQcType (glAA happy_var_1) n) })}})+ ) (\r -> happyReturn (happyIn57 r))++happyReduce_110 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_110 = happySpecReduce_1 42# happyReduction_110+happyReduction_110 happy_x_1+ = case happyOut304 happy_x_1 of { (HappyWrap304 happy_var_1) -> + happyIn58+ (happy_var_1+ )}++happyReduce_111 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_111 = happySpecReduce_1 42# happyReduction_111+happyReduction_111 happy_x_1+ = case happyOut286 happy_x_1 of { (HappyWrap286 happy_var_1) -> + happyIn58+ (happy_var_1+ )}++happyReduce_112 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_112 = happySpecReduce_2 43# happyReduction_112+happyReduction_112 happy_x_2+ happy_x_1+ = case happyOut59 happy_x_1 of { (HappyWrap59 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn59+ (if isZeroWidthSpan (gl happy_var_2) then (sL1 happy_var_1 $ unLoc happy_var_1) else (sLL happy_var_1 happy_var_2 $ AddSemiAnn (glAA happy_var_2) : (unLoc happy_var_1))+ )}}++happyReduce_113 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_113 = happySpecReduce_1 43# happyReduction_113+happyReduction_113 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn59+ (case msemi happy_var_1 of+ [] -> noLoc []+ ms -> sL1 happy_var_1 $ ms+ )}++happyReduce_114 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_114 = happySpecReduce_2 44# happyReduction_114+happyReduction_114 happy_x_2+ happy_x_1+ = case happyOut60 happy_x_1 of { (HappyWrap60 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn60+ (if isZeroWidthSpan (gl happy_var_2) then happy_var_1 else (AddSemiAnn (glAA happy_var_2) : happy_var_1)+ )}}++happyReduce_115 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_115 = happySpecReduce_0 44# happyReduction_115+happyReduction_115 = happyIn60+ ([]+ )++happyReduce_116 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_116 = happySpecReduce_2 45# happyReduction_116+happyReduction_116 happy_x_2+ happy_x_1+ = case happyOut62 happy_x_1 of { (HappyWrap62 happy_var_1) -> + case happyOut63 happy_x_2 of { (HappyWrap63 happy_var_2) -> + happyIn61+ (happy_var_2 : happy_var_1+ )}}++happyReduce_117 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_117 = happyMonadReduce 3# 46# happyReduction_117+happyReduction_117 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut62 happy_x_1 of { (HappyWrap62 happy_var_1) -> + case happyOut63 happy_x_2 of { (HappyWrap63 happy_var_2) -> + case happyOut59 happy_x_3 of { (HappyWrap59 happy_var_3) -> + ( do { i <- amsAl happy_var_2 (comb2 (reLoc happy_var_2) happy_var_3) (reverse $ unLoc happy_var_3)+ ; return (i : happy_var_1)})}}})+ ) (\r -> happyReturn (happyIn62 r))++happyReduce_118 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_118 = happySpecReduce_0 46# happyReduction_118+happyReduction_118 = happyIn62+ ([]+ )++happyReduce_119 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_119 = happyMonadReduce 9# 47# happyReduction_119+happyReduction_119 (happy_x_9 `HappyStk`+ happy_x_8 `HappyStk`+ happy_x_7 `HappyStk`+ happy_x_6 `HappyStk`+ happy_x_5 `HappyStk`+ happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut64 happy_x_2 of { (HappyWrap64 happy_var_2) -> + case happyOut65 happy_x_3 of { (HappyWrap65 happy_var_3) -> + case happyOut67 happy_x_4 of { (HappyWrap67 happy_var_4) -> + case happyOut66 happy_x_5 of { (HappyWrap66 happy_var_5) -> + case happyOut321 happy_x_6 of { (HappyWrap321 happy_var_6) -> + case happyOut67 happy_x_7 of { (HappyWrap67 happy_var_7) -> + case happyOut68 happy_x_8 of { (HappyWrap68 happy_var_8) -> + case happyOut69 happy_x_9 of { (HappyWrap69 happy_var_9) -> + ( do {+ ; let { ; mPreQual = unLoc happy_var_4+ ; mPostQual = unLoc happy_var_7 }+ ; checkImportDecl mPreQual mPostQual+ ; let anns+ = EpAnnImportDecl+ { importDeclAnnImport = glAA happy_var_1+ , importDeclAnnPragma = fst $ fst happy_var_2+ , importDeclAnnSafe = fst happy_var_3+ , importDeclAnnQualified = fst $ importDeclQualifiedStyle mPreQual mPostQual+ , importDeclAnnPackage = fst happy_var_5+ , importDeclAnnAs = fst happy_var_8+ }+ ; fmap reLocA $ acs (\cs -> L (comb5 happy_var_1 (reLoc happy_var_6) happy_var_7 (snd happy_var_8) happy_var_9) $+ ImportDecl { ideclExt = XImportDeclPass (EpAnn (glR happy_var_1) anns cs) (snd $ fst happy_var_2) False+ , ideclName = happy_var_6, ideclPkgQual = snd happy_var_5+ , ideclSource = snd happy_var_2, ideclSafe = snd happy_var_3+ , ideclQualified = snd $ importDeclQualifiedStyle mPreQual mPostQual+ , ideclAs = unLoc (snd happy_var_8)+ , ideclImportList = unLoc happy_var_9 })+ })}}}}}}}}})+ ) (\r -> happyReturn (happyIn63 r))++happyReduce_120 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_120 = happySpecReduce_2 48# happyReduction_120+happyReduction_120 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn64+ (((Just (glAA happy_var_1,glAA happy_var_2),getSOURCE_PRAGs happy_var_1)+ , IsBoot)+ )}}++happyReduce_121 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_121 = happySpecReduce_0 48# happyReduction_121+happyReduction_121 = happyIn64+ (((Nothing,NoSourceText),NotBoot)+ )++happyReduce_122 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_122 = happySpecReduce_1 49# happyReduction_122+happyReduction_122 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn65+ ((Just (glAA happy_var_1),True)+ )}++happyReduce_123 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_123 = happySpecReduce_0 49# happyReduction_123+happyReduction_123 = happyIn65+ ((Nothing, False)+ )++happyReduce_124 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_124 = happyMonadReduce 1# 50# happyReduction_124+happyReduction_124 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( do { let { pkgFS = getSTRING happy_var_1 }+ ; unless (looksLikePackageName (unpackFS pkgFS)) $+ addError $ mkPlainErrorMsgEnvelope (getLoc happy_var_1) $+ (PsErrInvalidPackageName pkgFS)+ ; return (Just (glAA happy_var_1), RawPkgQual (StringLiteral (getSTRINGs happy_var_1) pkgFS Nothing)) })})+ ) (\r -> happyReturn (happyIn66 r))++happyReduce_125 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_125 = happySpecReduce_0 50# happyReduction_125+happyReduction_125 = happyIn66+ ((Nothing,NoRawPkgQual)+ )++happyReduce_126 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_126 = happySpecReduce_1 51# happyReduction_126+happyReduction_126 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn67+ (sL1 happy_var_1 (Just (glAA happy_var_1))+ )}++happyReduce_127 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_127 = happySpecReduce_0 51# happyReduction_127+happyReduction_127 = happyIn67+ (noLoc Nothing+ )++happyReduce_128 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_128 = happySpecReduce_2 52# happyReduction_128+happyReduction_128 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut321 happy_x_2 of { (HappyWrap321 happy_var_2) -> + happyIn68+ ((Just (glAA happy_var_1)+ ,sLL happy_var_1 (reLoc happy_var_2) (Just happy_var_2))+ )}}++happyReduce_129 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_129 = happySpecReduce_0 52# happyReduction_129+happyReduction_129 = happyIn68+ ((Nothing,noLoc Nothing)+ )++happyReduce_130 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_130 = happyMonadReduce 1# 53# happyReduction_130+happyReduction_130 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut70 happy_x_1 of { (HappyWrap70 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 (happyIn69 r))++happyReduce_131 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_131 = happySpecReduce_0 53# happyReduction_131+happyReduction_131 = happyIn69+ (noLoc Nothing+ )++happyReduce_132 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_132 = happyMonadReduce 3# 54# happyReduction_132+happyReduction_132 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut71 happy_x_2 of { (HappyWrap71 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( do { es <- amsrl (sLL happy_var_1 happy_var_3 $ fromOL $ snd happy_var_2)+ (AnnList Nothing (Just $ mop happy_var_1) (Just $ mcp happy_var_3) (fst happy_var_2) [])+ ; return $ sLL happy_var_1 happy_var_3 (Exactly, es)})}}})+ ) (\r -> happyReturn (happyIn70 r))++happyReduce_133 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_133 = happyMonadReduce 4# 54# happyReduction_133+happyReduction_133 (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 happyOut71 happy_x_3 of { (HappyWrap71 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + ( do { es <- amsrl (sLL happy_var_1 happy_var_4 $ fromOL $ snd happy_var_3)+ (AnnList Nothing (Just $ mop happy_var_2) (Just $ mcp happy_var_4) (mj AnnHiding happy_var_1:fst happy_var_3) [])+ ; return $ sLL happy_var_1 happy_var_4 (EverythingBut, es)})}}}})+ ) (\r -> happyReturn (happyIn70 r))++happyReduce_134 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_134 = happySpecReduce_1 55# happyReduction_134+happyReduction_134 happy_x_1+ = case happyOut72 happy_x_1 of { (HappyWrap72 happy_var_1) -> + happyIn71+ (([], happy_var_1)+ )}++happyReduce_135 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_135 = happySpecReduce_0 55# happyReduction_135+happyReduction_135 = happyIn71+ (([], nilOL)+ )++happyReduce_136 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_136 = happyMonadReduce 2# 55# happyReduction_136+happyReduction_136 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut72 happy_x_1 of { (HappyWrap72 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + ( case happy_var_1 of+ SnocOL hs t -> do+ t' <- addTrailingCommaA t (gl happy_var_2)+ return ([], snocOL hs t'))}})+ ) (\r -> happyReturn (happyIn71 r))++happyReduce_137 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_137 = happySpecReduce_1 55# happyReduction_137+happyReduction_137 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn71+ (([mj AnnComma happy_var_1], nilOL)+ )}++happyReduce_138 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_138 = happyMonadReduce 3# 56# happyReduction_138+happyReduction_138 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut72 happy_x_1 of { (HappyWrap72 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut73 happy_x_3 of { (HappyWrap73 happy_var_3) -> + ( let ls = happy_var_1+ in if isNilOL ls+ then return (ls `appOL` happy_var_3)+ else case ls of+ SnocOL hs t -> do+ t' <- addTrailingCommaA t (gl happy_var_2)+ return (snocOL hs t' `appOL` happy_var_3))}}})+ ) (\r -> happyReturn (happyIn72 r))++happyReduce_139 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_139 = happySpecReduce_1 56# happyReduction_139+happyReduction_139 happy_x_1+ = case happyOut73 happy_x_1 of { (HappyWrap73 happy_var_1) -> + happyIn72+ (happy_var_1+ )}++happyReduce_140 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_140 = happyMonadReduce 2# 57# happyReduction_140+happyReduction_140 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut57 happy_x_1 of { (HappyWrap57 happy_var_1) -> + case happyOut53 happy_x_2 of { (HappyWrap53 happy_var_2) -> + ( fmap (unitOL . reLocA . (sLL (reLoc happy_var_1) happy_var_2)) $ mkModuleImpExp Nothing (fst $ unLoc happy_var_2) happy_var_1 (snd $ unLoc happy_var_2))}})+ ) (\r -> happyReturn (happyIn73 r))++happyReduce_141 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_141 = happyMonadReduce 2# 57# happyReduction_141+happyReduction_141 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut321 happy_x_2 of { (HappyWrap321 happy_var_2) -> + ( fmap (unitOL . reLocA) $ acs (\cs -> sLL happy_var_1 (reLoc happy_var_2) (IEModuleContents (Nothing, EpAnn (glR happy_var_1) [mj AnnModule happy_var_1] cs) happy_var_2)))}})+ ) (\r -> happyReturn (happyIn73 r))++happyReduce_142 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_142 = happySpecReduce_2 57# happyReduction_142+happyReduction_142 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut274 happy_x_2 of { (HappyWrap274 happy_var_2) -> + happyIn73+ (unitOL $ reLocA $ sLL happy_var_1 (reLocN happy_var_2) $ IEVar Nothing (sLLa happy_var_1 (reLocN happy_var_2) (IEPattern (glAA happy_var_1) happy_var_2))+ )}}++happyReduce_143 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_143 = happySpecReduce_0 58# happyReduction_143+happyReduction_143 = happyIn74+ (Nothing+ )++happyReduce_144 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_144 = happySpecReduce_1 58# happyReduction_144+happyReduction_144 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn74+ (Just (sL1 happy_var_1 (getINTEGERs happy_var_1,fromInteger (il_value (getINTEGER happy_var_1))))+ )}++happyReduce_145 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_145 = happySpecReduce_1 59# happyReduction_145+happyReduction_145 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn75+ (sL1 happy_var_1 InfixN+ )}++happyReduce_146 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_146 = happySpecReduce_1 59# happyReduction_146+happyReduction_146 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn75+ (sL1 happy_var_1 InfixL+ )}++happyReduce_147 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_147 = happySpecReduce_1 59# happyReduction_147+happyReduction_147 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn75+ (sL1 happy_var_1 InfixR+ )}++happyReduce_148 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_148 = happyMonadReduce 3# 60# happyReduction_148+happyReduction_148 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut76 happy_x_1 of { (HappyWrap76 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut293 happy_x_3 of { (HappyWrap293 happy_var_3) -> + ( case (unLoc happy_var_1) of+ SnocOL hs t -> do+ t' <- addTrailingCommaN t (gl happy_var_2)+ return (sLL happy_var_1 (reLocN happy_var_3) (snocOL hs t' `appOL` unitOL happy_var_3)))}}})+ ) (\r -> happyReturn (happyIn76 r))++happyReduce_149 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_149 = happySpecReduce_1 60# happyReduction_149+happyReduction_149 happy_x_1+ = case happyOut293 happy_x_1 of { (HappyWrap293 happy_var_1) -> + happyIn76+ (sL1N happy_var_1 (unitOL happy_var_1)+ )}++happyReduce_150 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_150 = happySpecReduce_2 61# happyReduction_150+happyReduction_150 happy_x_2+ happy_x_1+ = case happyOut78 happy_x_1 of { (HappyWrap78 happy_var_1) -> + case happyOut82 happy_x_2 of { (HappyWrap82 happy_var_2) -> + happyIn77+ (happy_var_1 `snocOL` happy_var_2+ )}}++happyReduce_151 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_151 = happyMonadReduce 3# 62# happyReduction_151+happyReduction_151 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut78 happy_x_1 of { (HappyWrap78 happy_var_1) -> + case happyOut82 happy_x_2 of { (HappyWrap82 happy_var_2) -> + case happyOut59 happy_x_3 of { (HappyWrap59 happy_var_3) -> + ( do { t <- amsAl happy_var_2 (comb2 (reLoc happy_var_2) happy_var_3) (reverse $ unLoc happy_var_3)+ ; return (happy_var_1 `snocOL` t) })}}})+ ) (\r -> happyReturn (happyIn78 r))++happyReduce_152 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_152 = happySpecReduce_0 62# happyReduction_152+happyReduction_152 = happyIn78+ (nilOL+ )++happyReduce_153 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_153 = happySpecReduce_2 63# happyReduction_153+happyReduction_153 happy_x_2+ happy_x_1+ = case happyOut80 happy_x_1 of { (HappyWrap80 happy_var_1) -> + case happyOut81 happy_x_2 of { (HappyWrap81 happy_var_2) -> + happyIn79+ (happy_var_1 `snocOL` happy_var_2+ )}}++happyReduce_154 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_154 = happyMonadReduce 3# 64# happyReduction_154+happyReduction_154 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut80 happy_x_1 of { (HappyWrap80 happy_var_1) -> + case happyOut81 happy_x_2 of { (HappyWrap81 happy_var_2) -> + case happyOut59 happy_x_3 of { (HappyWrap59 happy_var_3) -> + ( do { t <- amsAl happy_var_2 (comb2 (reLoc happy_var_2) happy_var_3) (reverse $ unLoc happy_var_3)+ ; return (happy_var_1 `snocOL` t) })}}})+ ) (\r -> happyReturn (happyIn80 r))++happyReduce_155 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_155 = happySpecReduce_0 64# happyReduction_155+happyReduction_155 = happyIn80+ (nilOL+ )++happyReduce_156 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_156 = happyMonadReduce 1# 65# happyReduction_156+happyReduction_156 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut82 happy_x_1 of { (HappyWrap82 happy_var_1) -> + ( commentsPA happy_var_1)})+ ) (\r -> happyReturn (happyIn81 r))++happyReduce_157 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_157 = happySpecReduce_1 66# happyReduction_157+happyReduction_157 happy_x_1+ = case happyOut83 happy_x_1 of { (HappyWrap83 happy_var_1) -> + happyIn82+ (sL1 happy_var_1 (TyClD noExtField (unLoc happy_var_1))+ )}++happyReduce_158 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_158 = happySpecReduce_1 66# happyReduction_158+happyReduction_158 happy_x_1+ = case happyOut84 happy_x_1 of { (HappyWrap84 happy_var_1) -> + happyIn82+ (sL1 happy_var_1 (TyClD noExtField (unLoc happy_var_1))+ )}++happyReduce_159 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_159 = happySpecReduce_1 66# happyReduction_159+happyReduction_159 happy_x_1+ = case happyOut85 happy_x_1 of { (HappyWrap85 happy_var_1) -> + happyIn82+ (sL1 happy_var_1 (KindSigD noExtField (unLoc happy_var_1))+ )}++happyReduce_160 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_160 = happySpecReduce_1 66# happyReduction_160+happyReduction_160 happy_x_1+ = case happyOut87 happy_x_1 of { (HappyWrap87 happy_var_1) -> + happyIn82+ (sL1 happy_var_1 (InstD noExtField (unLoc happy_var_1))+ )}++happyReduce_161 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_161 = happySpecReduce_1 66# happyReduction_161+happyReduction_161 happy_x_1+ = case happyOut112 happy_x_1 of { (HappyWrap112 happy_var_1) -> + happyIn82+ (sL1 happy_var_1 (DerivD noExtField (unLoc happy_var_1))+ )}++happyReduce_162 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_162 = happySpecReduce_1 66# happyReduction_162+happyReduction_162 happy_x_1+ = case happyOut113 happy_x_1 of { (HappyWrap113 happy_var_1) -> + happyIn82+ (sL1 happy_var_1 (RoleAnnotD noExtField (unLoc happy_var_1))+ )}++happyReduce_163 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_163 = happyMonadReduce 4# 66# happyReduction_163+happyReduction_163 (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 happyOut177 happy_x_3 of { (HappyWrap177 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_4+ (DefD noExtField (DefaultDecl (EpAnn (glR happy_var_1) [mj AnnDefault happy_var_1,mop happy_var_2,mcp happy_var_4] cs) happy_var_3))))}}}})+ ) (\r -> happyReturn (happyIn82 r))++happyReduce_164 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_164 = happyMonadReduce 2# 66# happyReduction_164+happyReduction_164 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut152 happy_x_2 of { (HappyWrap152 happy_var_2) -> + ( acsA (\cs -> sLL happy_var_1 happy_var_2 ((snd $ unLoc happy_var_2) (EpAnn (glR happy_var_1) (mj AnnForeign happy_var_1:(fst $ unLoc happy_var_2)) cs))))}})+ ) (\r -> happyReturn (happyIn82 r))++happyReduce_165 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_165 = happyMonadReduce 3# 66# happyReduction_165+happyReduction_165 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut147 happy_x_2 of { (HappyWrap147 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ WarningD noExtField (Warnings ((EpAnn (glR happy_var_1) [mo happy_var_1,mc happy_var_3] cs), (getDEPRECATED_PRAGs happy_var_1)) (fromOL happy_var_2))))}}})+ ) (\r -> happyReturn (happyIn82 r))++happyReduce_166 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_166 = happyMonadReduce 3# 66# happyReduction_166+happyReduction_166 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut145 happy_x_2 of { (HappyWrap145 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ WarningD noExtField (Warnings ((EpAnn (glR happy_var_1) [mo happy_var_1,mc happy_var_3] cs), (getWARNING_PRAGs happy_var_1)) (fromOL happy_var_2))))}}})+ ) (\r -> happyReturn (happyIn82 r))++happyReduce_167 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_167 = happyMonadReduce 3# 66# happyReduction_167+happyReduction_167 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut136 happy_x_2 of { (HappyWrap136 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ RuleD noExtField (HsRules ((EpAnn (glR happy_var_1) [mo happy_var_1,mc happy_var_3] cs), (getRULES_PRAGs happy_var_1)) (reverse happy_var_2))))}}})+ ) (\r -> happyReturn (happyIn82 r))++happyReduce_168 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_168 = happySpecReduce_1 66# happyReduction_168+happyReduction_168 happy_x_1+ = case happyOut151 happy_x_1 of { (HappyWrap151 happy_var_1) -> + happyIn82+ (happy_var_1+ )}++happyReduce_169 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_169 = happySpecReduce_1 66# happyReduction_169+happyReduction_169 happy_x_1+ = case happyOut203 happy_x_1 of { (HappyWrap203 happy_var_1) -> + happyIn82+ (happy_var_1+ )}++happyReduce_170 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_170 = happyMonadReduce 1# 66# happyReduction_170+happyReduction_170 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> + ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->+ do { d <- mkSpliceDecl happy_var_1+ ; commentsPA d })})+ ) (\r -> happyReturn (happyIn82 r))++happyReduce_171 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_171 = happyMonadReduce 4# 67# 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 happyOut109 happy_x_2 of { (HappyWrap109 happy_var_2) -> + case happyOut183 happy_x_3 of { (HappyWrap183 happy_var_3) -> + case happyOut127 happy_x_4 of { (HappyWrap127 happy_var_4) -> + ( (mkClassDecl (comb4 happy_var_1 happy_var_2 happy_var_3 happy_var_4) happy_var_2 happy_var_3 (sndOf3 $ unLoc happy_var_4) (thdOf3 $ unLoc happy_var_4))+ (mj AnnClass happy_var_1:(fst $ unLoc happy_var_3)++(fstOf3 $ unLoc happy_var_4)))}}}})+ ) (\r -> happyReturn (happyIn83 r))++happyReduce_172 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_172 = happyMonadReduce 4# 68# happyReduction_172+happyReduction_172 (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 { (HappyWrap167 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut164 happy_x_4 of { (HappyWrap164 happy_var_4) -> + ( mkTySynonym (comb2A happy_var_1 happy_var_4) happy_var_2 happy_var_4 [mj AnnType happy_var_1,mj AnnEqual happy_var_3])}}}})+ ) (\r -> happyReturn (happyIn84 r))++happyReduce_173 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_173 = happyMonadReduce 6# 68# 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 happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut167 happy_x_3 of { (HappyWrap167 happy_var_3) -> + case happyOut107 happy_x_4 of { (HappyWrap107 happy_var_4) -> + case happyOut92 happy_x_5 of { (HappyWrap92 happy_var_5) -> + case happyOut95 happy_x_6 of { (HappyWrap95 happy_var_6) -> + ( mkFamDecl (comb5 happy_var_1 (reLoc happy_var_3) happy_var_4 happy_var_5 happy_var_6) (snd $ unLoc happy_var_6) TopLevel 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 (happyIn84 r))++happyReduce_174 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_174 = happyMonadReduce 5# 68# happyReduction_174+happyReduction_174 (happy_x_5 `HappyStk`+ happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut103 happy_x_1 of { (HappyWrap103 happy_var_1) -> + case happyOut111 happy_x_2 of { (HappyWrap111 happy_var_2) -> + case happyOut109 happy_x_3 of { (HappyWrap109 happy_var_3) -> + case happyOut191 happy_x_4 of { (HappyWrap191 happy_var_4) -> + case happyOut199 happy_x_5 of { (HappyWrap199 happy_var_5) -> + ( mkTyData (comb4 happy_var_1 happy_var_3 happy_var_4 happy_var_5) (sndOf3 $ unLoc happy_var_1) (thdOf3 $ unLoc happy_var_1) happy_var_2 happy_var_3+ Nothing (reverse (snd $ unLoc happy_var_4))+ (fmap reverse happy_var_5)+ ((fstOf3 $ unLoc happy_var_1)++(fst $ unLoc happy_var_4)))}}}}})+ ) (\r -> happyReturn (happyIn84 r))++happyReduce_175 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_175 = happyMonadReduce 6# 68# happyReduction_175+happyReduction_175 (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 happyOut103 happy_x_1 of { (HappyWrap103 happy_var_1) -> + case happyOut111 happy_x_2 of { (HappyWrap111 happy_var_2) -> + case happyOut109 happy_x_3 of { (HappyWrap109 happy_var_3) -> + case happyOut105 happy_x_4 of { (HappyWrap105 happy_var_4) -> + case happyOut188 happy_x_5 of { (HappyWrap188 happy_var_5) -> + case happyOut199 happy_x_6 of { (HappyWrap199 happy_var_6) -> + ( mkTyData (comb4 happy_var_1 happy_var_3 happy_var_5 happy_var_6) (sndOf3 $ unLoc happy_var_1) (thdOf3 $ 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)+ ((fstOf3 $ unLoc happy_var_1)++(fst $ unLoc happy_var_4)++(fst $ unLoc happy_var_5)))}}}}}})+ ) (\r -> happyReturn (happyIn84 r))++happyReduce_176 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_176 = happyMonadReduce 4# 68# happyReduction_176+happyReduction_176 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut167 happy_x_3 of { (HappyWrap167 happy_var_3) -> + case happyOut106 happy_x_4 of { (HappyWrap106 happy_var_4) -> + ( mkFamDecl (comb3 happy_var_1 happy_var_2 happy_var_4) DataFamily TopLevel 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 (happyIn84 r))++happyReduce_177 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_177 = happyMonadReduce 4# 69# happyReduction_177+happyReduction_177 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut86 happy_x_2 of { (HappyWrap86 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut158 happy_x_4 of { (HappyWrap158 happy_var_4) -> + ( mkStandaloneKindSig (comb2A happy_var_1 happy_var_4) (L (gl happy_var_2) $ unLoc happy_var_2) happy_var_4+ [mj AnnType happy_var_1,mu AnnDcolon happy_var_3])}}}})+ ) (\r -> happyReturn (happyIn85 r))++happyReduce_178 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_178 = happyMonadReduce 3# 70# happyReduction_178+happyReduction_178 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut86 happy_x_1 of { (HappyWrap86 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut285 happy_x_3 of { (HappyWrap285 happy_var_3) -> + ( case unLoc happy_var_1 of+ (h:t) -> do+ h' <- addTrailingCommaN h (gl happy_var_2)+ return (sLL happy_var_1 (reLocN happy_var_3) (happy_var_3 : h' : t)))}}})+ ) (\r -> happyReturn (happyIn86 r))++happyReduce_179 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_179 = happySpecReduce_1 70# happyReduction_179+happyReduction_179 happy_x_1+ = case happyOut285 happy_x_1 of { (HappyWrap285 happy_var_1) -> + happyIn86+ (sL1N happy_var_1 [happy_var_1]+ )}++happyReduce_180 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_180 = happyMonadReduce 4# 71# happyReduction_180+happyReduction_180 (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 happyOut88 happy_x_2 of { (HappyWrap88 happy_var_2) -> + case happyOut175 happy_x_3 of { (HappyWrap175 happy_var_3) -> + case happyOut131 happy_x_4 of { (HappyWrap131 happy_var_4) -> + ( do { (binds, sigs, _, ats, adts, _) <- cvBindsAndSigs (snd $ unLoc happy_var_4)+ ; let anns = (mj AnnInstance happy_var_1 : (fst $ unLoc happy_var_4))+ ; let cid cs = ClsInstDecl+ { cid_ext = (EpAnn (glR happy_var_1) anns cs, NoAnnSortKey)+ , 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 }+ ; acsA (\cs -> L (comb3 happy_var_1 (reLoc happy_var_3) happy_var_4)+ (ClsInstD { cid_d_ext = noExtField, cid_inst = cid cs }))+ })}}}})+ ) (\r -> happyReturn (happyIn87 r))++happyReduce_181 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_181 = happyMonadReduce 3# 71# happyReduction_181+happyReduction_181 (happy_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 happyOut98 happy_x_3 of { (HappyWrap98 happy_var_3) -> + ( mkTyFamInst (comb2A happy_var_1 happy_var_3) (unLoc happy_var_3)+ (mj AnnType happy_var_1:mj AnnInstance happy_var_2:[]))}}})+ ) (\r -> happyReturn (happyIn87 r))++happyReduce_182 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_182 = happyMonadReduce 6# 71# happyReduction_182+happyReduction_182 (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 happyOut104 happy_x_1 of { (HappyWrap104 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut111 happy_x_3 of { (HappyWrap111 happy_var_3) -> + case happyOut110 happy_x_4 of { (HappyWrap110 happy_var_4) -> + case happyOut191 happy_x_5 of { (HappyWrap191 happy_var_5) -> + case happyOut199 happy_x_6 of { (HappyWrap199 happy_var_6) -> + ( mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_5 happy_var_6) (snd $ unLoc happy_var_1) happy_var_3 (unLoc happy_var_4)+ Nothing (reverse (snd $ unLoc happy_var_5))+ (fmap reverse happy_var_6)+ ((fst $ unLoc happy_var_1):mj AnnInstance happy_var_2:(fst $ unLoc happy_var_5)))}}}}}})+ ) (\r -> happyReturn (happyIn87 r))++happyReduce_183 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_183 = happyMonadReduce 7# 71# happyReduction_183+happyReduction_183 (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 happyOut104 happy_x_1 of { (HappyWrap104 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut111 happy_x_3 of { (HappyWrap111 happy_var_3) -> + case happyOut110 happy_x_4 of { (HappyWrap110 happy_var_4) -> + case happyOut105 happy_x_5 of { (HappyWrap105 happy_var_5) -> + case happyOut188 happy_x_6 of { (HappyWrap188 happy_var_6) -> + case happyOut199 happy_x_7 of { (HappyWrap199 happy_var_7) -> + ( mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_6 happy_var_7) (snd $ unLoc happy_var_1) happy_var_3 (unLoc happy_var_4)+ (snd $ unLoc happy_var_5) (snd $ unLoc happy_var_6)+ (fmap reverse happy_var_7)+ ((fst $ unLoc happy_var_1):mj AnnInstance happy_var_2+ :(fst $ unLoc happy_var_5)++(fst $ unLoc happy_var_6)))}}}}}}})+ ) (\r -> happyReturn (happyIn87 r))++happyReduce_184 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_184 = happyMonadReduce 2# 72# happyReduction_184+happyReduction_184 (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 -> + ( fmap Just $ amsrp (sLL happy_var_1 happy_var_2 (Overlappable (getOVERLAPPABLE_PRAGs happy_var_1)))+ (AnnPragma (mo happy_var_1) (mc happy_var_2) []))}})+ ) (\r -> happyReturn (happyIn88 r))++happyReduce_185 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_185 = happyMonadReduce 2# 72# happyReduction_185+happyReduction_185 (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 -> + ( fmap Just $ amsrp (sLL happy_var_1 happy_var_2 (Overlapping (getOVERLAPPING_PRAGs happy_var_1)))+ (AnnPragma (mo happy_var_1) (mc happy_var_2) []))}})+ ) (\r -> happyReturn (happyIn88 r))++happyReduce_186 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_186 = happyMonadReduce 2# 72# happyReduction_186+happyReduction_186 (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 -> + ( fmap Just $ amsrp (sLL happy_var_1 happy_var_2 (Overlaps (getOVERLAPS_PRAGs happy_var_1)))+ (AnnPragma (mo happy_var_1) (mc happy_var_2) []))}})+ ) (\r -> happyReturn (happyIn88 r))++happyReduce_187 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_187 = happyMonadReduce 2# 72# happyReduction_187+happyReduction_187 (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 -> + ( fmap Just $ amsrp (sLL happy_var_1 happy_var_2 (Incoherent (getINCOHERENT_PRAGs happy_var_1)))+ (AnnPragma (mo happy_var_1) (mc happy_var_2) []))}})+ ) (\r -> happyReturn (happyIn88 r))++happyReduce_188 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_188 = happySpecReduce_0 72# happyReduction_188+happyReduction_188 = happyIn88+ (Nothing+ )++happyReduce_189 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_189 = happyMonadReduce 1# 73# happyReduction_189+happyReduction_189 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( acsA (\cs -> sL1 happy_var_1 (StockStrategy (EpAnn (glR happy_var_1) [mj AnnStock happy_var_1] cs))))})+ ) (\r -> happyReturn (happyIn89 r))++happyReduce_190 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_190 = happyMonadReduce 1# 73# happyReduction_190+happyReduction_190 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( acsA (\cs -> sL1 happy_var_1 (AnyclassStrategy (EpAnn (glR happy_var_1) [mj AnnAnyclass happy_var_1] cs))))})+ ) (\r -> happyReturn (happyIn89 r))++happyReduce_191 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_191 = happyMonadReduce 1# 73# happyReduction_191+happyReduction_191 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( acsA (\cs -> sL1 happy_var_1 (NewtypeStrategy (EpAnn (glR happy_var_1) [mj AnnNewtype happy_var_1] cs))))})+ ) (\r -> happyReturn (happyIn89 r))++happyReduce_192 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_192 = happyMonadReduce 2# 74# happyReduction_192+happyReduction_192 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut158 happy_x_2 of { (HappyWrap158 happy_var_2) -> + ( acsA (\cs -> sLLlA happy_var_1 happy_var_2 (ViaStrategy (XViaStrategyPs (EpAnn (glR happy_var_1) [mj AnnVia happy_var_1] cs)+ happy_var_2))))}})+ ) (\r -> happyReturn (happyIn90 r))++happyReduce_193 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_193 = happyMonadReduce 1# 75# happyReduction_193+happyReduction_193 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( fmap Just $ acsA (\cs -> sL1 happy_var_1 (StockStrategy (EpAnn (glR happy_var_1) [mj AnnStock happy_var_1] cs))))})+ ) (\r -> happyReturn (happyIn91 r))++happyReduce_194 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_194 = happyMonadReduce 1# 75# happyReduction_194+happyReduction_194 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( fmap Just $ acsA (\cs -> sL1 happy_var_1 (AnyclassStrategy (EpAnn (glR happy_var_1) [mj AnnAnyclass happy_var_1] cs))))})+ ) (\r -> happyReturn (happyIn91 r))++happyReduce_195 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_195 = happyMonadReduce 1# 75# happyReduction_195+happyReduction_195 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( fmap Just $ acsA (\cs -> sL1 happy_var_1 (NewtypeStrategy (EpAnn (glR happy_var_1) [mj AnnNewtype happy_var_1] cs))))})+ ) (\r -> happyReturn (happyIn91 r))++happyReduce_196 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_196 = happySpecReduce_1 75# happyReduction_196+happyReduction_196 happy_x_1+ = case happyOut90 happy_x_1 of { (HappyWrap90 happy_var_1) -> + happyIn91+ (Just happy_var_1+ )}++happyReduce_197 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_197 = happySpecReduce_0 75# happyReduction_197+happyReduction_197 = happyIn91+ (Nothing+ )++happyReduce_198 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_198 = happySpecReduce_0 76# happyReduction_198+happyReduction_198 = happyIn92+ (noLoc ([], Nothing)+ )++happyReduce_199 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_199 = happySpecReduce_2 76# happyReduction_199+happyReduction_199 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut93 happy_x_2 of { (HappyWrap93 happy_var_2) -> + happyIn92+ (sLL happy_var_1 (reLoc happy_var_2) ([mj AnnVbar happy_var_1]+ , Just (happy_var_2))+ )}}++happyReduce_200 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_200 = happyMonadReduce 3# 77# happyReduction_200+happyReduction_200 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut94 happy_x_3 of { (HappyWrap94 happy_var_3) -> + ( acsA (\cs -> sLL (reLocN happy_var_1) happy_var_3 (InjectivityAnn (EpAnn (glNR happy_var_1) [mu AnnRarrow happy_var_2] cs) happy_var_1 (reverse (unLoc happy_var_3)))))}}})+ ) (\r -> happyReturn (happyIn93 r))++happyReduce_201 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_201 = happySpecReduce_2 78# happyReduction_201+happyReduction_201 happy_x_2+ happy_x_1+ = case happyOut94 happy_x_1 of { (HappyWrap94 happy_var_1) -> + case happyOut302 happy_x_2 of { (HappyWrap302 happy_var_2) -> + happyIn94+ (sLL happy_var_1 (reLocN happy_var_2) (happy_var_2 : unLoc happy_var_1)+ )}}++happyReduce_202 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_202 = happySpecReduce_1 78# happyReduction_202+happyReduction_202 happy_x_1+ = case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> + happyIn94+ (sL1N happy_var_1 [happy_var_1]+ )}++happyReduce_203 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_203 = happySpecReduce_0 79# happyReduction_203+happyReduction_203 = happyIn95+ (noLoc ([],OpenTypeFamily)+ )++happyReduce_204 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_204 = happySpecReduce_2 79# happyReduction_204+happyReduction_204 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut96 happy_x_2 of { (HappyWrap96 happy_var_2) -> + happyIn95+ (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_205 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_205 = happySpecReduce_3 80# happyReduction_205+happyReduction_205 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut97 happy_x_2 of { (HappyWrap97 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn96+ (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mcc happy_var_3]+ ,Just (unLoc happy_var_2))+ )}}}++happyReduce_206 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_206 = happySpecReduce_3 80# happyReduction_206+happyReduction_206 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut97 happy_x_2 of { (HappyWrap97 happy_var_2) -> + happyIn96+ (let (L loc _) = happy_var_2 in+ L loc ([],Just (unLoc happy_var_2))+ )}++happyReduce_207 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_207 = happySpecReduce_3 80# happyReduction_207+happyReduction_207 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 -> + happyIn96+ (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mj AnnDotdot happy_var_2+ ,mcc happy_var_3],Nothing)+ )}}}++happyReduce_208 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_208 = happySpecReduce_3 80# happyReduction_208+happyReduction_208 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn96+ (let (L loc _) = happy_var_2 in+ L loc ([mj AnnDotdot happy_var_2],Nothing)+ )}++happyReduce_209 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_209 = happyMonadReduce 3# 81# happyReduction_209+happyReduction_209 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut97 happy_x_1 of { (HappyWrap97 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut98 happy_x_3 of { (HappyWrap98 happy_var_3) -> + ( let (L loc eqn) = happy_var_3 in+ case unLoc happy_var_1 of+ [] -> return (sLLlA happy_var_1 happy_var_3 (L loc eqn : unLoc happy_var_1))+ (h:t) -> do+ h' <- addTrailingSemiA h (gl happy_var_2)+ return (sLLlA happy_var_1 happy_var_3 (happy_var_3 : h' : t)))}}})+ ) (\r -> happyReturn (happyIn97 r))++happyReduce_210 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_210 = happyMonadReduce 2# 81# happyReduction_210+happyReduction_210 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut97 happy_x_1 of { (HappyWrap97 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + ( case unLoc happy_var_1 of+ [] -> return (sLL happy_var_1 happy_var_2 (unLoc happy_var_1))+ (h:t) -> do+ h' <- addTrailingSemiA h (gl happy_var_2)+ return (sLL happy_var_1 happy_var_2 (h':t)))}})+ ) (\r -> happyReturn (happyIn97 r))++happyReduce_211 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_211 = happySpecReduce_1 81# happyReduction_211+happyReduction_211 happy_x_1+ = case happyOut98 happy_x_1 of { (HappyWrap98 happy_var_1) -> + happyIn97+ (sLLAA happy_var_1 happy_var_1 [happy_var_1]+ )}++happyReduce_212 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_212 = happySpecReduce_0 81# happyReduction_212+happyReduction_212 = happyIn97+ (noLoc []+ )++happyReduce_213 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_213 = happyMonadReduce 6# 82# happyReduction_213+happyReduction_213 (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 happyOut180 happy_x_2 of { (HappyWrap180 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut167 happy_x_4 of { (HappyWrap167 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + case happyOut164 happy_x_6 of { (HappyWrap164 happy_var_6) -> + ( do { hintExplicitForall happy_var_1+ ; tvbs <- fromSpecTyVarBndrs happy_var_2+ ; let loc = comb2A happy_var_1 happy_var_6+ ; cs <- getCommentsFor loc+ ; mkTyFamInstEqn loc (mkHsOuterExplicit (EpAnn (glR happy_var_1) (mu AnnForall happy_var_1, mj AnnDot happy_var_3) cs) tvbs) happy_var_4 happy_var_6 [mj AnnEqual happy_var_5] })}}}}}})+ ) (\r -> happyReturn (happyIn98 r))++happyReduce_214 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_214 = happyMonadReduce 3# 82# happyReduction_214+happyReduction_214 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut167 happy_x_1 of { (HappyWrap167 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut164 happy_x_3 of { (HappyWrap164 happy_var_3) -> + ( mkTyFamInstEqn (comb2A (reLoc happy_var_1) happy_var_3) mkHsOuterImplicit happy_var_1 happy_var_3 (mj AnnEqual happy_var_2:[]))}}})+ ) (\r -> happyReturn (happyIn98 r))++happyReduce_215 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_215 = happyMonadReduce 4# 83# happyReduction_215+happyReduction_215 (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 happyOut100 happy_x_2 of { (HappyWrap100 happy_var_2) -> + case happyOut167 happy_x_3 of { (HappyWrap167 happy_var_3) -> + case happyOut106 happy_x_4 of { (HappyWrap106 happy_var_4) -> + ( liftM mkTyClD (mkFamDecl (comb3 happy_var_1 (reLoc happy_var_3) happy_var_4) DataFamily NotTopLevel happy_var_3+ (snd $ unLoc happy_var_4) Nothing+ (mj AnnData happy_var_1:happy_var_2++(fst $ unLoc happy_var_4))))}}}})+ ) (\r -> happyReturn (happyIn99 r))++happyReduce_216 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_216 = happyMonadReduce 3# 83# happyReduction_216+happyReduction_216 (happy_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 { (HappyWrap167 happy_var_2) -> + case happyOut108 happy_x_3 of { (HappyWrap108 happy_var_3) -> + ( liftM mkTyClD+ (mkFamDecl (comb3 happy_var_1 (reLoc happy_var_2) happy_var_3) OpenTypeFamily NotTopLevel 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 (happyIn99 r))++happyReduce_217 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_217 = happyMonadReduce 4# 83# happyReduction_217+happyReduction_217 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut167 happy_x_3 of { (HappyWrap167 happy_var_3) -> + case happyOut108 happy_x_4 of { (HappyWrap108 happy_var_4) -> + ( liftM mkTyClD+ (mkFamDecl (comb3 happy_var_1 (reLoc happy_var_3) happy_var_4) OpenTypeFamily NotTopLevel 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 (happyIn99 r))++happyReduce_218 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_218 = happyMonadReduce 2# 83# happyReduction_218+happyReduction_218 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut98 happy_x_2 of { (HappyWrap98 happy_var_2) -> + ( liftM mkInstD (mkTyFamInst (comb2A happy_var_1 happy_var_2) (unLoc happy_var_2)+ [mj AnnType happy_var_1]))}})+ ) (\r -> happyReturn (happyIn99 r))++happyReduce_219 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_219 = happyMonadReduce 3# 83# happyReduction_219+happyReduction_219 (happy_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 happyOut98 happy_x_3 of { (HappyWrap98 happy_var_3) -> + ( liftM mkInstD (mkTyFamInst (comb2A happy_var_1 happy_var_3) (unLoc happy_var_3)+ (mj AnnType happy_var_1:mj AnnInstance happy_var_2:[]) ))}}})+ ) (\r -> happyReturn (happyIn99 r))++happyReduce_220 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_220 = happySpecReduce_0 84# happyReduction_220+happyReduction_220 = happyIn100+ ([]+ )++happyReduce_221 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_221 = happySpecReduce_1 84# happyReduction_221+happyReduction_221 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn100+ ([mj AnnFamily happy_var_1]+ )}++happyReduce_222 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_222 = happySpecReduce_0 85# happyReduction_222+happyReduction_222 = happyIn101+ ([]+ )++happyReduce_223 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_223 = happySpecReduce_1 85# happyReduction_223+happyReduction_223 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn101+ ([mj AnnInstance happy_var_1]+ )}++happyReduce_224 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_224 = happyMonadReduce 3# 86# happyReduction_224+happyReduction_224 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut101 happy_x_2 of { (HappyWrap101 happy_var_2) -> + case happyOut98 happy_x_3 of { (HappyWrap98 happy_var_3) -> + ( mkTyFamInst (comb2A happy_var_1 happy_var_3) (unLoc happy_var_3)+ (mj AnnType happy_var_1:happy_var_2))}}})+ ) (\r -> happyReturn (happyIn102 r))++happyReduce_225 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_225 = happyMonadReduce 6# 86# happyReduction_225+happyReduction_225 (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 happyOut104 happy_x_1 of { (HappyWrap104 happy_var_1) -> + case happyOut101 happy_x_2 of { (HappyWrap101 happy_var_2) -> + case happyOut111 happy_x_3 of { (HappyWrap111 happy_var_3) -> + case happyOut110 happy_x_4 of { (HappyWrap110 happy_var_4) -> + case happyOut191 happy_x_5 of { (HappyWrap191 happy_var_5) -> + case happyOut199 happy_x_6 of { (HappyWrap199 happy_var_6) -> + ( mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_5 happy_var_6) (snd $ unLoc happy_var_1) happy_var_3 (unLoc happy_var_4)+ Nothing (reverse (snd $ unLoc happy_var_5))+ (fmap reverse happy_var_6)+ ((fst $ unLoc happy_var_1):happy_var_2++(fst $ unLoc happy_var_5)))}}}}}})+ ) (\r -> happyReturn (happyIn102 r))++happyReduce_226 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_226 = happyMonadReduce 7# 86# happyReduction_226+happyReduction_226 (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 happyOut104 happy_x_1 of { (HappyWrap104 happy_var_1) -> + case happyOut101 happy_x_2 of { (HappyWrap101 happy_var_2) -> + case happyOut111 happy_x_3 of { (HappyWrap111 happy_var_3) -> + case happyOut110 happy_x_4 of { (HappyWrap110 happy_var_4) -> + case happyOut105 happy_x_5 of { (HappyWrap105 happy_var_5) -> + case happyOut188 happy_x_6 of { (HappyWrap188 happy_var_6) -> + case happyOut199 happy_x_7 of { (HappyWrap199 happy_var_7) -> + ( mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_6 happy_var_7) (snd $ unLoc happy_var_1) happy_var_3+ (unLoc happy_var_4) (snd $ unLoc happy_var_5) (snd $ unLoc happy_var_6)+ (fmap reverse happy_var_7)+ ((fst $ unLoc happy_var_1):happy_var_2++(fst $ unLoc happy_var_5)++(fst $ unLoc happy_var_6)))}}}}}}})+ ) (\r -> happyReturn (happyIn102 r))++happyReduce_227 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_227 = happySpecReduce_1 87# happyReduction_227+happyReduction_227 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn103+ (sL1 happy_var_1 ([mj AnnData happy_var_1], False,DataType)+ )}++happyReduce_228 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_228 = happySpecReduce_1 87# happyReduction_228+happyReduction_228 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn103+ (sL1 happy_var_1 ([mj AnnNewtype happy_var_1], False,NewType)+ )}++happyReduce_229 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_229 = happySpecReduce_2 87# happyReduction_229+happyReduction_229 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn103+ (sL1 happy_var_1 ([mj AnnType happy_var_1, mj AnnData happy_var_2],True ,DataType)+ )}}++happyReduce_230 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_230 = happySpecReduce_1 88# happyReduction_230+happyReduction_230 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn104+ (sL1 happy_var_1 (mj AnnData happy_var_1,DataType)+ )}++happyReduce_231 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_231 = happySpecReduce_1 88# happyReduction_231+happyReduction_231 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn104+ (sL1 happy_var_1 (mj AnnNewtype happy_var_1,NewType)+ )}++happyReduce_232 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_232 = happySpecReduce_0 89# happyReduction_232+happyReduction_232 = happyIn105+ (noLoc ([] , Nothing)+ )++happyReduce_233 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_233 = happySpecReduce_2 89# happyReduction_233+happyReduction_233 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut187 happy_x_2 of { (HappyWrap187 happy_var_2) -> + happyIn105+ (sLL happy_var_1 (reLoc happy_var_2) ([mu AnnDcolon happy_var_1], Just happy_var_2)+ )}}++happyReduce_234 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_234 = happySpecReduce_0 90# happyReduction_234+happyReduction_234 = happyIn106+ (noLoc ([] , noLocA (NoSig noExtField) )+ )++happyReduce_235 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_235 = happySpecReduce_2 90# happyReduction_235+happyReduction_235 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut187 happy_x_2 of { (HappyWrap187 happy_var_2) -> + happyIn106+ (sLL happy_var_1 (reLoc happy_var_2) ([mu AnnDcolon happy_var_1], sLLa happy_var_1 (reLoc happy_var_2) (KindSig noExtField happy_var_2))+ )}}++happyReduce_236 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_236 = happySpecReduce_0 91# happyReduction_236+happyReduction_236 = happyIn107+ (noLoc ([] , noLocA (NoSig noExtField) )+ )++happyReduce_237 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_237 = happySpecReduce_2 91# happyReduction_237+happyReduction_237 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut187 happy_x_2 of { (HappyWrap187 happy_var_2) -> + happyIn107+ (sLL happy_var_1 (reLoc happy_var_2) ([mu AnnDcolon happy_var_1], sLLa happy_var_1 (reLoc happy_var_2) (KindSig noExtField happy_var_2))+ )}}++happyReduce_238 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_238 = happyMonadReduce 2# 91# happyReduction_238+happyReduction_238 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut181 happy_x_2 of { (HappyWrap181 happy_var_2) -> + ( do { tvb <- fromSpecTyVarBndr happy_var_2+ ; return $ sLL happy_var_1 (reLoc happy_var_2) ([mj AnnEqual happy_var_1], sLLa happy_var_1 (reLoc happy_var_2) (TyVarSig noExtField tvb))})}})+ ) (\r -> happyReturn (happyIn107 r))++happyReduce_239 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_239 = happySpecReduce_0 92# happyReduction_239+happyReduction_239 = happyIn108+ (noLoc ([], (noLocA (NoSig noExtField), Nothing))+ )++happyReduce_240 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_240 = happySpecReduce_2 92# happyReduction_240+happyReduction_240 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut187 happy_x_2 of { (HappyWrap187 happy_var_2) -> + happyIn108+ (sLL happy_var_1 (reLoc happy_var_2) ( [mu AnnDcolon happy_var_1]+ , (sL1a (reLoc happy_var_2) (KindSig noExtField happy_var_2), Nothing))+ )}}++happyReduce_241 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_241 = happyMonadReduce 4# 92# happyReduction_241+happyReduction_241 (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 happyOut182 happy_x_2 of { (HappyWrap182 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut93 happy_x_4 of { (HappyWrap93 happy_var_4) -> + ( do { tvb <- fromSpecTyVarBndr happy_var_2+ ; return $ sLL happy_var_1 (reLoc happy_var_4) ([mj AnnEqual happy_var_1, mj AnnVbar happy_var_3]+ , (sLLa happy_var_1 (reLoc happy_var_2) (TyVarSig noExtField tvb), Just happy_var_4))})}}}})+ ) (\r -> happyReturn (happyIn108 r))++happyReduce_242 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_242 = happyMonadReduce 3# 93# happyReduction_242+happyReduction_242 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut167 happy_x_3 of { (HappyWrap167 happy_var_3) -> + ( acs (\cs -> (sLLAA happy_var_1 happy_var_3 (Just (addTrailingDarrowC happy_var_1 happy_var_2 cs), happy_var_3))))}}})+ ) (\r -> happyReturn (happyIn109 r))++happyReduce_243 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_243 = happySpecReduce_1 93# happyReduction_243+happyReduction_243 happy_x_1+ = case happyOut167 happy_x_1 of { (HappyWrap167 happy_var_1) -> + happyIn109+ (sL1A happy_var_1 (Nothing, happy_var_1)+ )}++happyReduce_244 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_244 = happyMonadReduce 6# 94# happyReduction_244+happyReduction_244 (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 happyOut180 happy_x_2 of { (HappyWrap180 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut166 happy_x_4 of { (HappyWrap166 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + case happyOut167 happy_x_6 of { (HappyWrap167 happy_var_6) -> + ( hintExplicitForall happy_var_1+ >> fromSpecTyVarBndrs happy_var_2+ >>= \tvbs ->+ (acs (\cs -> (sLL happy_var_1 (reLoc happy_var_6)+ (Just ( addTrailingDarrowC happy_var_4 happy_var_5 cs)+ , mkHsOuterExplicit (EpAnn (glR happy_var_1) (mu AnnForall happy_var_1, mj AnnDot happy_var_3) emptyComments) tvbs, happy_var_6)))))}}}}}})+ ) (\r -> happyReturn (happyIn110 r))++happyReduce_245 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_245 = happyMonadReduce 4# 94# happyReduction_245+happyReduction_245 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut180 happy_x_2 of { (HappyWrap180 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut167 happy_x_4 of { (HappyWrap167 happy_var_4) -> + ( do { hintExplicitForall happy_var_1+ ; tvbs <- fromSpecTyVarBndrs happy_var_2+ ; let loc = comb2 happy_var_1 (reLoc happy_var_4)+ ; cs <- getCommentsFor loc+ ; return (sL loc (Nothing, mkHsOuterExplicit (EpAnn (glR happy_var_1) (mu AnnForall happy_var_1, mj AnnDot happy_var_3) cs) tvbs, happy_var_4))+ })}}}})+ ) (\r -> happyReturn (happyIn110 r))++happyReduce_246 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_246 = happyMonadReduce 3# 94# happyReduction_246+happyReduction_246 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut167 happy_x_3 of { (HappyWrap167 happy_var_3) -> + ( acs (\cs -> (sLLAA happy_var_1 happy_var_3(Just (addTrailingDarrowC happy_var_1 happy_var_2 cs), mkHsOuterImplicit, happy_var_3))))}}})+ ) (\r -> happyReturn (happyIn110 r))++happyReduce_247 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_247 = happySpecReduce_1 94# happyReduction_247+happyReduction_247 happy_x_1+ = case happyOut167 happy_x_1 of { (HappyWrap167 happy_var_1) -> + happyIn110+ (sL1A happy_var_1 (Nothing, mkHsOuterImplicit, happy_var_1)+ )}++happyReduce_248 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_248 = happyMonadReduce 4# 95# happyReduction_248+happyReduction_248 (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 -> + ( fmap Just $ amsrp (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)))+ (AnnPragma (mo happy_var_1) (mc happy_var_4) [mj AnnHeader happy_var_2,mj AnnVal happy_var_3]))}}}})+ ) (\r -> happyReturn (happyIn111 r))++happyReduce_249 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_249 = happyMonadReduce 3# 95# happyReduction_249+happyReduction_249 (happy_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 -> + ( fmap Just $ amsrp (sLL happy_var_1 happy_var_3 (CType (getCTYPEs happy_var_1) Nothing (getSTRINGs happy_var_2, getSTRING happy_var_2)))+ (AnnPragma (mo happy_var_1) (mc happy_var_3) [mj AnnVal happy_var_2]))}}})+ ) (\r -> happyReturn (happyIn111 r))++happyReduce_250 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_250 = happySpecReduce_0 95# happyReduction_250+happyReduction_250 = happyIn111+ (Nothing+ )++happyReduce_251 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_251 = happyMonadReduce 5# 96# happyReduction_251+happyReduction_251 (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 happyOut91 happy_x_2 of { (HappyWrap91 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut88 happy_x_4 of { (HappyWrap88 happy_var_4) -> + case happyOut175 happy_x_5 of { (HappyWrap175 happy_var_5) -> + ( do { let { err = text "in the stand-alone deriving instance"+ <> colon <+> quotes (ppr happy_var_5) }+ ; acsA (\cs -> sLL happy_var_1 (reLoc happy_var_5)+ (DerivDecl (EpAnn (glR happy_var_1) [mj AnnDeriving happy_var_1, mj AnnInstance happy_var_3] cs) (mkHsWildCardBndrs happy_var_5) happy_var_2 happy_var_4)) })}}}}})+ ) (\r -> happyReturn (happyIn112 r))++happyReduce_252 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_252 = happyMonadReduce 4# 97# happyReduction_252+happyReduction_252 (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 happyOut285 happy_x_3 of { (HappyWrap285 happy_var_3) -> + case happyOut114 happy_x_4 of { (HappyWrap114 happy_var_4) -> + ( mkRoleAnnotDecl (comb3N happy_var_1 happy_var_4 happy_var_3) happy_var_3 (reverse (unLoc happy_var_4))+ [mj AnnType happy_var_1,mj AnnRole happy_var_2])}}}})+ ) (\r -> happyReturn (happyIn113 r))++happyReduce_253 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_253 = happySpecReduce_0 98# happyReduction_253+happyReduction_253 = happyIn114+ (noLoc []+ )++happyReduce_254 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_254 = happySpecReduce_1 98# happyReduction_254+happyReduction_254 happy_x_1+ = case happyOut115 happy_x_1 of { (HappyWrap115 happy_var_1) -> + happyIn114+ (happy_var_1+ )}++happyReduce_255 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_255 = happySpecReduce_1 99# happyReduction_255+happyReduction_255 happy_x_1+ = case happyOut116 happy_x_1 of { (HappyWrap116 happy_var_1) -> + happyIn115+ (sLL happy_var_1 happy_var_1 [happy_var_1]+ )}++happyReduce_256 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_256 = happySpecReduce_2 99# happyReduction_256+happyReduction_256 happy_x_2+ happy_x_1+ = case happyOut115 happy_x_1 of { (HappyWrap115 happy_var_1) -> + case happyOut116 happy_x_2 of { (HappyWrap116 happy_var_2) -> + happyIn115+ (sLL happy_var_1 happy_var_2 $ happy_var_2 : unLoc happy_var_1+ )}}++happyReduce_257 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_257 = happySpecReduce_1 100# happyReduction_257+happyReduction_257 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn116+ (sL1 happy_var_1 $ Just $ getVARID happy_var_1+ )}++happyReduce_258 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_258 = happySpecReduce_1 100# happyReduction_258+happyReduction_258 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn116+ (sL1 happy_var_1 Nothing+ )}++happyReduce_259 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_259 = happyMonadReduce 4# 101# happyReduction_259+happyReduction_259 (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 happyOut118 happy_x_2 of { (HappyWrap118 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut247 happy_x_4 of { (HappyWrap247 happy_var_4) -> + ( let (name, args, as ) = happy_var_2 in+ acsA (\cs -> sLL happy_var_1 (reLoc happy_var_4) . ValD noExtField $ mkPatSynBind name args happy_var_4+ ImplicitBidirectional+ (EpAnn (glR happy_var_1) (as ++ [mj AnnPattern happy_var_1, mj AnnEqual happy_var_3]) cs)))}}}})+ ) (\r -> happyReturn (happyIn117 r))++happyReduce_260 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_260 = happyMonadReduce 4# 101# happyReduction_260+happyReduction_260 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut118 happy_x_2 of { (HappyWrap118 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut247 happy_x_4 of { (HappyWrap247 happy_var_4) -> + ( let (name, args, as) = happy_var_2 in+ acsA (\cs -> sLL happy_var_1 (reLoc happy_var_4) . ValD noExtField $ mkPatSynBind name args happy_var_4 Unidirectional+ (EpAnn (glR happy_var_1) (as ++ [mj AnnPattern happy_var_1,mu AnnLarrow happy_var_3]) cs)))}}}})+ ) (\r -> happyReturn (happyIn117 r))++happyReduce_261 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_261 = happyMonadReduce 5# 101# happyReduction_261+happyReduction_261 (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 happyOut118 happy_x_2 of { (HappyWrap118 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut247 happy_x_4 of { (HappyWrap247 happy_var_4) -> + case happyOut121 happy_x_5 of { (HappyWrap121 happy_var_5) -> + ( do { let (name, args, as) = happy_var_2+ ; mg <- mkPatSynMatchGroup name happy_var_5+ ; acsA (\cs -> sLL happy_var_1 (reLoc happy_var_5) . ValD noExtField $+ mkPatSynBind name args happy_var_4 (ExplicitBidirectional mg)+ (EpAnn (glR happy_var_1) (as ++ [mj AnnPattern happy_var_1,mu AnnLarrow happy_var_3]) cs))+ })}}}}})+ ) (\r -> happyReturn (happyIn117 r))++happyReduce_262 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_262 = happySpecReduce_2 102# happyReduction_262+happyReduction_262 happy_x_2+ happy_x_1+ = case happyOut276 happy_x_1 of { (HappyWrap276 happy_var_1) -> + case happyOut119 happy_x_2 of { (HappyWrap119 happy_var_2) -> + happyIn118+ ((happy_var_1, PrefixCon noTypeArgs happy_var_2, [])+ )}}++happyReduce_263 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_263 = happySpecReduce_3 102# happyReduction_263+happyReduction_263 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut307 happy_x_1 of { (HappyWrap307 happy_var_1) -> + case happyOut281 happy_x_2 of { (HappyWrap281 happy_var_2) -> + case happyOut307 happy_x_3 of { (HappyWrap307 happy_var_3) -> + happyIn118+ ((happy_var_2, InfixCon happy_var_1 happy_var_3, [])+ )}}}++happyReduce_264 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_264 = happyReduce 4# 102# happyReduction_264+happyReduction_264 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOut276 happy_x_1 of { (HappyWrap276 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut120 happy_x_3 of { (HappyWrap120 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + happyIn118+ ((happy_var_1, RecCon happy_var_3, [moc happy_var_2, mcc happy_var_4] )+ ) `HappyStk` happyRest}}}}++happyReduce_265 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_265 = happySpecReduce_0 103# happyReduction_265+happyReduction_265 = happyIn119+ ([]+ )++happyReduce_266 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_266 = happySpecReduce_2 103# happyReduction_266+happyReduction_266 happy_x_2+ happy_x_1+ = case happyOut307 happy_x_1 of { (HappyWrap307 happy_var_1) -> + case happyOut119 happy_x_2 of { (HappyWrap119 happy_var_2) -> + happyIn119+ (happy_var_1 : happy_var_2+ )}}++happyReduce_267 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_267 = happySpecReduce_1 104# happyReduction_267+happyReduction_267 happy_x_1+ = case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> + happyIn120+ ([RecordPatSynField (mkFieldOcc happy_var_1) happy_var_1]+ )}++happyReduce_268 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_268 = happyMonadReduce 3# 104# happyReduction_268+happyReduction_268 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut120 happy_x_3 of { (HappyWrap120 happy_var_3) -> + ( do { h <- addTrailingCommaN happy_var_1 (gl happy_var_2)+ ; return ((RecordPatSynField (mkFieldOcc h) h) : happy_var_3 )})}}})+ ) (\r -> happyReturn (happyIn120 r))++happyReduce_269 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_269 = happyMonadReduce 4# 105# happyReduction_269+happyReduction_269 (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 happyOut132 happy_x_3 of { (HappyWrap132 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + ( amsrl (sLL happy_var_1 happy_var_4 (snd $ unLoc happy_var_3))+ (AnnList (Just $ glR happy_var_3) (Just $ moc happy_var_2) (Just $ mcc happy_var_4) [mj AnnWhere happy_var_1] (fst $ unLoc happy_var_3)))}}}})+ ) (\r -> happyReturn (happyIn121 r))++happyReduce_270 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_270 = happyMonadReduce 4# 105# happyReduction_270+happyReduction_270 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut132 happy_x_3 of { (HappyWrap132 happy_var_3) -> + ( amsrl (sLL happy_var_1 happy_var_3 (snd $ unLoc happy_var_3))+ (AnnList (Just $ glR happy_var_3) Nothing Nothing [mj AnnWhere happy_var_1] (fst $ unLoc happy_var_3)))}})+ ) (\r -> happyReturn (happyIn121 r))++happyReduce_271 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_271 = happyMonadReduce 4# 106# happyReduction_271+happyReduction_271 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut277 happy_x_2 of { (HappyWrap277 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut159 happy_x_4 of { (HappyWrap159 happy_var_4) -> + ( acsA (\cs -> sLL happy_var_1 (reLoc happy_var_4)+ $ PatSynSig (EpAnn (glR happy_var_1) (AnnSig (mu AnnDcolon happy_var_3) [mj AnnPattern happy_var_1]) cs)+ (toList $ unLoc happy_var_2) happy_var_4))}}}})+ ) (\r -> happyReturn (happyIn122 r))++happyReduce_272 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_272 = happySpecReduce_1 107# happyReduction_272+happyReduction_272 happy_x_1+ = case happyOut304 happy_x_1 of { (HappyWrap304 happy_var_1) -> + happyIn123+ (happy_var_1+ )}++happyReduce_273 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_273 = happySpecReduce_1 107# happyReduction_273+happyReduction_273 happy_x_1+ = case happyOut274 happy_x_1 of { (HappyWrap274 happy_var_1) -> + happyIn123+ (happy_var_1+ )}++happyReduce_274 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_274 = happySpecReduce_1 108# happyReduction_274+happyReduction_274 happy_x_1+ = case happyOut99 happy_x_1 of { (HappyWrap99 happy_var_1) -> + happyIn124+ (happy_var_1+ )}++happyReduce_275 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_275 = happySpecReduce_1 108# happyReduction_275+happyReduction_275 happy_x_1+ = case happyOut204 happy_x_1 of { (HappyWrap204 happy_var_1) -> + happyIn124+ (happy_var_1+ )}++happyReduce_276 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_276 = happyMonadReduce 4# 108# happyReduction_276+happyReduction_276 (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 happyOut213 happy_x_2 of { (HappyWrap213 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut159 happy_x_4 of { (HappyWrap159 happy_var_4) -> + ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->+ do { v <- checkValSigLhs happy_var_2+ ; let err = text "in default signature" <> colon <+>+ quotes (ppr happy_var_2)+ ; acsA (\cs -> sLL happy_var_1 (reLoc happy_var_4) $ SigD noExtField $ ClassOpSig (EpAnn (glR happy_var_1) (AnnSig (mu AnnDcolon happy_var_3) [mj AnnDefault happy_var_1]) cs) True [v] happy_var_4) })}}}})+ ) (\r -> happyReturn (happyIn124 r))++happyReduce_277 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_277 = happyMonadReduce 3# 109# happyReduction_277+happyReduction_277 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut125 happy_x_1 of { (HappyWrap125 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut124 happy_x_3 of { (HappyWrap124 happy_var_3) -> + ( if isNilOL (snd $ unLoc happy_var_1)+ then return (sLLlA happy_var_1 happy_var_3 ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)+ , unitOL happy_var_3))+ else case (snd $ unLoc happy_var_1) of+ SnocOL hs t -> do+ t' <- addTrailingSemiA t (gl happy_var_2)+ return (sLLlA happy_var_1 happy_var_3 (fst $ unLoc happy_var_1+ , snocOL hs t' `appOL` unitOL happy_var_3)))}}})+ ) (\r -> happyReturn (happyIn125 r))++happyReduce_278 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_278 = happyMonadReduce 2# 109# happyReduction_278+happyReduction_278 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut125 happy_x_1 of { (HappyWrap125 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + ( if isNilOL (snd $ unLoc happy_var_1)+ then return (sLL happy_var_1 happy_var_2 ( (fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)+ ,snd $ unLoc happy_var_1))+ else case (snd $ unLoc happy_var_1) of+ SnocOL hs t -> do+ t' <- addTrailingSemiA t (gl happy_var_2)+ return (sLL happy_var_1 happy_var_2 (fst $ unLoc happy_var_1+ , snocOL hs t')))}})+ ) (\r -> happyReturn (happyIn125 r))++happyReduce_279 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_279 = happySpecReduce_1 109# happyReduction_279+happyReduction_279 happy_x_1+ = case happyOut124 happy_x_1 of { (HappyWrap124 happy_var_1) -> + happyIn125+ (sL1A happy_var_1 ([], unitOL happy_var_1)+ )}++happyReduce_280 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_280 = happySpecReduce_0 109# happyReduction_280+happyReduction_280 = happyIn125+ (noLoc ([],nilOL)+ )++happyReduce_281 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_281 = happySpecReduce_3 110# happyReduction_281+happyReduction_281 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut125 happy_x_2 of { (HappyWrap125 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn126+ (sLL happy_var_1 happy_var_3 (moc happy_var_1:mcc happy_var_3:(fst $ unLoc happy_var_2)+ ,snd $ unLoc happy_var_2, explicitBraces happy_var_1 happy_var_3)+ )}}}++happyReduce_282 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_282 = happySpecReduce_3 110# happyReduction_282+happyReduction_282 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut125 happy_x_2 of { (HappyWrap125 happy_var_2) -> + happyIn126+ (let { L l (anns, decls) = happy_var_2 }+ in L l (anns, decls, VirtualBraces (getVOCURLY happy_var_1))+ )}}++happyReduce_283 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_283 = happySpecReduce_2 111# happyReduction_283+happyReduction_283 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut126 happy_x_2 of { (HappyWrap126 happy_var_2) -> + happyIn127+ (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1:(fstOf3 $ unLoc happy_var_2)+ ,sndOf3 $ unLoc happy_var_2,thdOf3 $ unLoc happy_var_2)+ )}}++happyReduce_284 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_284 = happySpecReduce_0 111# happyReduction_284+happyReduction_284 = happyIn127+ (noLoc ([],nilOL,NoLayoutInfo)+ )++happyReduce_285 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_285 = happySpecReduce_1 112# happyReduction_285+happyReduction_285 happy_x_1+ = case happyOut102 happy_x_1 of { (HappyWrap102 happy_var_1) -> + happyIn128+ (sL1A happy_var_1 (unitOL (sL1 happy_var_1 (InstD noExtField (unLoc happy_var_1))))+ )}++happyReduce_286 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_286 = happySpecReduce_1 112# happyReduction_286+happyReduction_286 happy_x_1+ = case happyOut204 happy_x_1 of { (HappyWrap204 happy_var_1) -> + happyIn128+ (sL1A happy_var_1 (unitOL happy_var_1)+ )}++happyReduce_287 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_287 = happyMonadReduce 3# 113# happyReduction_287+happyReduction_287 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut129 happy_x_1 of { (HappyWrap129 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut128 happy_x_3 of { (HappyWrap128 happy_var_3) -> + ( if isNilOL (snd $ unLoc happy_var_1)+ then return (sLL happy_var_1 happy_var_3 ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)+ , unLoc happy_var_3))+ else case (snd $ unLoc happy_var_1) of+ SnocOL hs t -> do+ t' <- addTrailingSemiA t (gl happy_var_2)+ return (sLL happy_var_1 happy_var_3 (fst $ unLoc happy_var_1+ , snocOL hs t' `appOL` unLoc happy_var_3)))}}})+ ) (\r -> happyReturn (happyIn129 r))++happyReduce_288 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_288 = happyMonadReduce 2# 113# happyReduction_288+happyReduction_288 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut129 happy_x_1 of { (HappyWrap129 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + ( if isNilOL (snd $ unLoc happy_var_1)+ then return (sLL happy_var_1 happy_var_2 ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)+ ,snd $ unLoc happy_var_1))+ else case (snd $ unLoc happy_var_1) of+ SnocOL hs t -> do+ t' <- addTrailingSemiA t (gl happy_var_2)+ return (sLL happy_var_1 happy_var_2 (fst $ unLoc happy_var_1+ , snocOL hs t')))}})+ ) (\r -> happyReturn (happyIn129 r))++happyReduce_289 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_289 = happySpecReduce_1 113# happyReduction_289+happyReduction_289 happy_x_1+ = case happyOut128 happy_x_1 of { (HappyWrap128 happy_var_1) -> + happyIn129+ (sL1 happy_var_1 ([],unLoc happy_var_1)+ )}++happyReduce_290 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_290 = happySpecReduce_0 113# happyReduction_290+happyReduction_290 = happyIn129+ (noLoc ([],nilOL)+ )++happyReduce_291 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_291 = happySpecReduce_3 114# happyReduction_291+happyReduction_291 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut129 happy_x_2 of { (HappyWrap129 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn130+ (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_292 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_292 = happySpecReduce_3 114# happyReduction_292+happyReduction_292 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut129 happy_x_2 of { (HappyWrap129 happy_var_2) -> + happyIn130+ (L (gl happy_var_2) (unLoc happy_var_2)+ )}++happyReduce_293 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_293 = happySpecReduce_2 115# happyReduction_293+happyReduction_293 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut130 happy_x_2 of { (HappyWrap130 happy_var_2) -> + happyIn131+ (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1:(fst $ unLoc happy_var_2)+ ,(snd $ unLoc happy_var_2))+ )}}++happyReduce_294 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_294 = happySpecReduce_0 115# happyReduction_294+happyReduction_294 = happyIn131+ (noLoc ([],nilOL)+ )++happyReduce_295 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_295 = happyMonadReduce 3# 116# happyReduction_295+happyReduction_295 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut132 happy_x_1 of { (HappyWrap132 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut204 happy_x_3 of { (HappyWrap204 happy_var_3) -> + ( if isNilOL (snd $ unLoc happy_var_1)+ then return (sLLlA happy_var_1 happy_var_3 ((fst $ unLoc happy_var_1) ++ (msemi happy_var_2)+ , unitOL happy_var_3))+ else case (snd $ unLoc happy_var_1) of+ SnocOL hs t -> do+ t' <- addTrailingSemiA t (gl happy_var_2)+ let { this = unitOL happy_var_3;+ rest = snocOL hs t';+ these = rest `appOL` this }+ return (rest `seq` this `seq` these `seq`+ (sLLlA happy_var_1 happy_var_3 (fst $ unLoc happy_var_1, these))))}}})+ ) (\r -> happyReturn (happyIn132 r))++happyReduce_296 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_296 = happyMonadReduce 2# 116# happyReduction_296+happyReduction_296 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut132 happy_x_1 of { (HappyWrap132 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 (((fst $ unLoc happy_var_1) ++ (msemi happy_var_2)+ ,snd $ unLoc happy_var_1)))+ else case (snd $ unLoc happy_var_1) of+ SnocOL hs t -> do+ t' <- addTrailingSemiA t (gl happy_var_2)+ return (sLL happy_var_1 happy_var_2 (fst $ unLoc happy_var_1+ , snocOL hs t')))}})+ ) (\r -> happyReturn (happyIn132 r))++happyReduce_297 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_297 = happySpecReduce_1 116# happyReduction_297+happyReduction_297 happy_x_1+ = case happyOut204 happy_x_1 of { (HappyWrap204 happy_var_1) -> + happyIn132+ (sL1A happy_var_1 ([], unitOL happy_var_1)+ )}++happyReduce_298 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_298 = happySpecReduce_0 116# happyReduction_298+happyReduction_298 = happyIn132+ (noLoc ([],nilOL)+ )++happyReduce_299 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_299 = happySpecReduce_3 117# happyReduction_299+happyReduction_299 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut132 happy_x_2 of { (HappyWrap132 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn133+ (sLL happy_var_1 happy_var_3 (AnnList (Just $ glR happy_var_2) (Just $ moc happy_var_1) (Just $ mcc happy_var_3) [] (fst $ unLoc happy_var_2)+ ,sL1 happy_var_2 $ snd $ unLoc happy_var_2)+ )}}}++happyReduce_300 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_300 = happySpecReduce_3 117# happyReduction_300+happyReduction_300 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut132 happy_x_2 of { (HappyWrap132 happy_var_2) -> + happyIn133+ (L (gl happy_var_2) (AnnList (Just $ glR happy_var_2) Nothing Nothing [] (fst $ unLoc happy_var_2)+ ,sL1 happy_var_2 $ snd $ unLoc happy_var_2)+ )}++happyReduce_301 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_301 = happyMonadReduce 1# 118# happyReduction_301+happyReduction_301 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut133 happy_x_1 of { (HappyWrap133 happy_var_1) -> + ( do { val_binds <- cvBindGroup (unLoc $ snd $ unLoc happy_var_1)+ ; cs <- getCommentsFor (gl happy_var_1)+ ; return (sL1 happy_var_1 $ HsValBinds (fixValbindsAnn $ EpAnn (glR happy_var_1) (fst $ unLoc happy_var_1) cs) val_binds)})})+ ) (\r -> happyReturn (happyIn134 r))++happyReduce_302 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_302 = happyMonadReduce 3# 118# happyReduction_302+happyReduction_302 (happy_x_3 `HappyStk`+ 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 { (HappyWrap262 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( acs (\cs -> (L (comb3 happy_var_1 happy_var_2 happy_var_3)+ $ HsIPBinds (EpAnn (glR happy_var_1) (AnnList (Just$ glR happy_var_2) (Just $ moc happy_var_1) (Just $ mcc happy_var_3) [] []) cs) (IPBinds noExtField (reverse $ unLoc happy_var_2)))))}}})+ ) (\r -> happyReturn (happyIn134 r))++happyReduce_303 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_303 = happyMonadReduce 3# 118# happyReduction_303+happyReduction_303 (happy_x_3 `HappyStk`+ 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 { (HappyWrap262 happy_var_2) -> + ( acs (\cs -> (L (gl happy_var_2)+ $ HsIPBinds (EpAnn (glR happy_var_1) (AnnList (Just $ glR happy_var_2) Nothing Nothing [] []) cs) (IPBinds noExtField (reverse $ unLoc happy_var_2)))))}})+ ) (\r -> happyReturn (happyIn134 r))++happyReduce_304 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_304 = happyMonadReduce 2# 119# happyReduction_304+happyReduction_304 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut134 happy_x_2 of { (HappyWrap134 happy_var_2) -> + ( do { r <- acs (\cs ->+ (sLL happy_var_1 happy_var_2 (annBinds (mj AnnWhere happy_var_1) cs (unLoc happy_var_2))))+ ; return $ Just r})}})+ ) (\r -> happyReturn (happyIn135 r))++happyReduce_305 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_305 = happySpecReduce_0 119# happyReduction_305+happyReduction_305 = happyIn135+ (Nothing+ )++happyReduce_306 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_306 = happyMonadReduce 3# 120# happyReduction_306+happyReduction_306 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut136 happy_x_1 of { (HappyWrap136 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut137 happy_x_3 of { (HappyWrap137 happy_var_3) -> + ( case happy_var_1 of+ [] -> return (happy_var_3:happy_var_1)+ (h:t) -> do+ h' <- addTrailingSemiA h (gl happy_var_2)+ return (happy_var_3:h':t))}}})+ ) (\r -> happyReturn (happyIn136 r))++happyReduce_307 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_307 = happyMonadReduce 2# 120# happyReduction_307+happyReduction_307 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut136 happy_x_1 of { (HappyWrap136 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + ( case happy_var_1 of+ [] -> return happy_var_1+ (h:t) -> do+ h' <- addTrailingSemiA h (gl happy_var_2)+ return (h':t))}})+ ) (\r -> happyReturn (happyIn136 r))++happyReduce_308 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_308 = happySpecReduce_1 120# happyReduction_308+happyReduction_308 happy_x_1+ = case happyOut137 happy_x_1 of { (HappyWrap137 happy_var_1) -> + happyIn136+ ([happy_var_1]+ )}++happyReduce_309 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_309 = happySpecReduce_0 120# happyReduction_309+happyReduction_309 = happyIn136+ ([]+ )++happyReduce_310 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_310 = happyMonadReduce 6# 121# happyReduction_310+happyReduction_310 (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 happyOut138 happy_x_2 of { (HappyWrap138 happy_var_2) -> + case happyOut141 happy_x_3 of { (HappyWrap141 happy_var_3) -> + case happyOut213 happy_x_4 of { (HappyWrap213 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + case happyOut212 happy_x_6 of { (HappyWrap212 happy_var_6) -> + (runPV (unECP happy_var_4) >>= \ happy_var_4 ->+ runPV (unECP happy_var_6) >>= \ happy_var_6 ->+ acsA (\cs -> (sLLlA happy_var_1 happy_var_6 $ HsRule+ { rd_ext = (EpAnn (glR happy_var_1) ((fstOf3 happy_var_3) (mj AnnEqual happy_var_5 : (fst happy_var_2))) cs, getSTRINGs happy_var_1)+ , rd_name = L (noAnnSrcSpan $ gl happy_var_1) (getSTRING happy_var_1)+ , rd_act = (snd happy_var_2) `orElse` AlwaysActive+ , rd_tyvs = sndOf3 happy_var_3, rd_tmvs = thdOf3 happy_var_3+ , rd_lhs = happy_var_4, rd_rhs = happy_var_6 })))}}}}}})+ ) (\r -> happyReturn (happyIn137 r))++happyReduce_311 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_311 = happySpecReduce_0 122# happyReduction_311+happyReduction_311 = happyIn138+ (([],Nothing)+ )++happyReduce_312 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_312 = happySpecReduce_1 122# happyReduction_312+happyReduction_312 happy_x_1+ = case happyOut140 happy_x_1 of { (HappyWrap140 happy_var_1) -> + happyIn138+ ((fst happy_var_1,Just (snd happy_var_1))+ )}++happyReduce_313 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_313 = happySpecReduce_1 123# happyReduction_313+happyReduction_313 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn139+ ([mj AnnTilde happy_var_1]+ )}++happyReduce_314 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_314 = happyMonadReduce 1# 123# happyReduction_314+happyReduction_314 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( if (getVARSYM happy_var_1 == fsLit "~")+ then return [mj AnnTilde happy_var_1]+ else do { addError $ mkPlainErrorMsgEnvelope (getLoc happy_var_1) $+ PsErrInvalidRuleActivationMarker+ ; return [] })})+ ) (\r -> happyReturn (happyIn139 r))++happyReduce_315 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_315 = happySpecReduce_3 124# happyReduction_315+happyReduction_315 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 -> + happyIn140+ (([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_316 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_316 = happyReduce 4# 124# happyReduction_316+happyReduction_316 (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 happyOut139 happy_x_2 of { (HappyWrap139 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOutTok happy_x_4 of { happy_var_4 -> + happyIn140+ ((happy_var_2++[mos happy_var_1,mj AnnVal happy_var_3,mcs happy_var_4]+ ,ActiveBefore (getINTEGERs happy_var_3) (fromInteger (il_value (getINTEGER happy_var_3))))+ ) `HappyStk` happyRest}}}}++happyReduce_317 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_317 = happySpecReduce_3 124# happyReduction_317+happyReduction_317 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut139 happy_x_2 of { (HappyWrap139 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn140+ ((happy_var_2++[mos happy_var_1,mcs happy_var_3]+ ,NeverActive)+ )}}}++happyReduce_318 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_318 = happyMonadReduce 6# 125# happyReduction_318+happyReduction_318 (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 happyOut142 happy_x_2 of { (HappyWrap142 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOutTok happy_x_4 of { happy_var_4 -> + case happyOut142 happy_x_5 of { (HappyWrap142 happy_var_5) -> + case happyOutTok happy_x_6 of { happy_var_6 -> + ( let tyvs = mkRuleTyVarBndrs happy_var_2+ in hintExplicitForall happy_var_1+ >> checkRuleTyVarBndrNames (mkRuleTyVarBndrs happy_var_2)+ >> return (\anns -> HsRuleAnn+ (Just (mu AnnForall happy_var_1,mj AnnDot happy_var_3))+ (Just (mu AnnForall happy_var_4,mj AnnDot happy_var_6))+ anns,+ Just (mkRuleTyVarBndrs happy_var_2), mkRuleBndrs happy_var_5))}}}}}})+ ) (\r -> happyReturn (happyIn141 r))++happyReduce_319 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_319 = happySpecReduce_3 125# happyReduction_319+happyReduction_319 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut142 happy_x_2 of { (HappyWrap142 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn141+ ((\anns -> HsRuleAnn Nothing (Just (mu AnnForall happy_var_1,mj AnnDot happy_var_3)) anns,+ Nothing, mkRuleBndrs happy_var_2)+ )}}}++happyReduce_320 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_320 = happySpecReduce_0 125# happyReduction_320+happyReduction_320 = happyIn141+ ((\anns -> HsRuleAnn Nothing Nothing anns, Nothing, [])+ )++happyReduce_321 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_321 = happySpecReduce_2 126# happyReduction_321+happyReduction_321 happy_x_2+ happy_x_1+ = case happyOut143 happy_x_1 of { (HappyWrap143 happy_var_1) -> + case happyOut142 happy_x_2 of { (HappyWrap142 happy_var_2) -> + happyIn142+ (happy_var_1 : happy_var_2+ )}}++happyReduce_322 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_322 = happySpecReduce_0 126# happyReduction_322+happyReduction_322 = happyIn142+ ([]+ )++happyReduce_323 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_323 = happySpecReduce_1 127# happyReduction_323+happyReduction_323 happy_x_1+ = case happyOut307 happy_x_1 of { (HappyWrap307 happy_var_1) -> + happyIn143+ (sL1l happy_var_1 (RuleTyTmVar noAnn happy_var_1 Nothing)+ )}++happyReduce_324 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_324 = happyMonadReduce 5# 127# happyReduction_324+happyReduction_324 (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 happyOut307 happy_x_2 of { (HappyWrap307 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut165 happy_x_4 of { (HappyWrap165 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_5 (RuleTyTmVar (EpAnn (glR happy_var_1) [mop happy_var_1,mu AnnDcolon happy_var_3,mcp happy_var_5] cs) happy_var_2 (Just happy_var_4))))}}}}})+ ) (\r -> happyReturn (happyIn143 r))++happyReduce_325 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_325 = happySpecReduce_2 128# happyReduction_325+happyReduction_325 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn144+ (Just (sLL happy_var_1 happy_var_2 $ InWarningCategory (hsTok' happy_var_1) (getSTRINGs happy_var_2)+ (sL1 happy_var_2 $ mkWarningCategory (getSTRING happy_var_2)))+ )}}++happyReduce_326 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_326 = happySpecReduce_0 128# happyReduction_326+happyReduction_326 = happyIn144+ (Nothing+ )++happyReduce_327 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_327 = happyMonadReduce 3# 129# happyReduction_327+happyReduction_327 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut145 happy_x_1 of { (HappyWrap145 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut146 happy_x_3 of { (HappyWrap146 happy_var_3) -> + ( if isNilOL happy_var_1+ then return (happy_var_1 `appOL` happy_var_3)+ else case happy_var_1 of+ SnocOL hs t -> do+ t' <- addTrailingSemiA t (gl happy_var_2)+ return (snocOL hs t' `appOL` happy_var_3))}}})+ ) (\r -> happyReturn (happyIn145 r))++happyReduce_328 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_328 = happyMonadReduce 2# 129# happyReduction_328+happyReduction_328 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut145 happy_x_1 of { (HappyWrap145 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + ( if isNilOL happy_var_1+ then return happy_var_1+ else case happy_var_1 of+ SnocOL hs t -> do+ t' <- addTrailingSemiA t (gl happy_var_2)+ return (snocOL hs t'))}})+ ) (\r -> happyReturn (happyIn145 r))++happyReduce_329 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_329 = happySpecReduce_1 129# happyReduction_329+happyReduction_329 happy_x_1+ = case happyOut146 happy_x_1 of { (HappyWrap146 happy_var_1) -> + happyIn145+ (happy_var_1+ )}++happyReduce_330 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_330 = happySpecReduce_0 129# happyReduction_330+happyReduction_330 = happyIn145+ (nilOL+ )++happyReduce_331 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_331 = happyMonadReduce 3# 130# happyReduction_331+happyReduction_331 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut144 happy_x_1 of { (HappyWrap144 happy_var_1) -> + case happyOut271 happy_x_2 of { (HappyWrap271 happy_var_2) -> + case happyOut149 happy_x_3 of { (HappyWrap149 happy_var_3) -> + ( fmap unitOL $ acsA (\cs -> L (comb3M happy_var_1 happy_var_2 happy_var_3)+ (Warning (EpAnn (glMR happy_var_1 happy_var_2) (fst $ unLoc happy_var_3) cs) (unLoc happy_var_2)+ (WarningTxt happy_var_1 (noLoc NoSourceText) $ map stringLiteralToHsDocWst $ snd $ unLoc happy_var_3))))}}})+ ) (\r -> happyReturn (happyIn146 r))++happyReduce_332 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_332 = happyMonadReduce 3# 131# happyReduction_332+happyReduction_332 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut147 happy_x_1 of { (HappyWrap147 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut148 happy_x_3 of { (HappyWrap148 happy_var_3) -> + ( if isNilOL happy_var_1+ then return (happy_var_1 `appOL` happy_var_3)+ else case happy_var_1 of+ SnocOL hs t -> do+ t' <- addTrailingSemiA t (gl happy_var_2)+ return (snocOL hs t' `appOL` happy_var_3))}}})+ ) (\r -> happyReturn (happyIn147 r))++happyReduce_333 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_333 = happyMonadReduce 2# 131# happyReduction_333+happyReduction_333 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut147 happy_x_1 of { (HappyWrap147 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + ( if isNilOL happy_var_1+ then return happy_var_1+ else case happy_var_1 of+ SnocOL hs t -> do+ t' <- addTrailingSemiA t (gl happy_var_2)+ return (snocOL hs t'))}})+ ) (\r -> happyReturn (happyIn147 r))++happyReduce_334 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_334 = happySpecReduce_1 131# happyReduction_334+happyReduction_334 happy_x_1+ = case happyOut148 happy_x_1 of { (HappyWrap148 happy_var_1) -> + happyIn147+ (happy_var_1+ )}++happyReduce_335 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_335 = happySpecReduce_0 131# happyReduction_335+happyReduction_335 = happyIn147+ (nilOL+ )++happyReduce_336 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_336 = happyMonadReduce 2# 132# happyReduction_336+happyReduction_336 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut271 happy_x_1 of { (HappyWrap271 happy_var_1) -> + case happyOut149 happy_x_2 of { (HappyWrap149 happy_var_2) -> + ( fmap unitOL $ acsA (\cs -> sLL happy_var_1 happy_var_2 $ (Warning (EpAnn (glR happy_var_1) (fst $ unLoc happy_var_2) cs) (unLoc happy_var_1)+ (DeprecatedTxt (noLoc NoSourceText) $ map stringLiteralToHsDocWst $ snd $ unLoc happy_var_2))))}})+ ) (\r -> happyReturn (happyIn148 r))++happyReduce_337 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_337 = happySpecReduce_1 133# happyReduction_337+happyReduction_337 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn149+ (sL1 happy_var_1 ([],[L (gl happy_var_1) (getStringLiteral happy_var_1)])+ )}++happyReduce_338 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_338 = happySpecReduce_3 133# happyReduction_338+happyReduction_338 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut150 happy_x_2 of { (HappyWrap150 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn149+ (sLL happy_var_1 happy_var_3 $ ([mos happy_var_1,mcs happy_var_3],fromOL (unLoc happy_var_2))+ )}}}++happyReduce_339 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_339 = happyMonadReduce 3# 134# happyReduction_339+happyReduction_339 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut150 happy_x_1 of { (HappyWrap150 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( if isNilOL (unLoc happy_var_1)+ then return (sLL happy_var_1 happy_var_3 (unLoc happy_var_1 `snocOL`+ (L (gl happy_var_3) (getStringLiteral happy_var_3))))+ else case (unLoc happy_var_1) of+ SnocOL hs t -> do+ let { t' = addTrailingCommaS t (glAA happy_var_2) }+ return (sLL happy_var_1 happy_var_3 (snocOL hs t' `snocOL`+ (L (gl happy_var_3) (getStringLiteral happy_var_3)))))}}})+ ) (\r -> happyReturn (happyIn150 r))++happyReduce_340 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_340 = happySpecReduce_1 134# happyReduction_340+happyReduction_340 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn150+ (sLL happy_var_1 happy_var_1 (unitOL (L (gl happy_var_1) (getStringLiteral happy_var_1)))+ )}++happyReduce_341 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_341 = happySpecReduce_0 134# happyReduction_341+happyReduction_341 = happyIn150+ (noLoc nilOL+ )++happyReduce_342 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_342 = happyMonadReduce 4# 135# happyReduction_342+happyReduction_342 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut272 happy_x_2 of { (HappyWrap272 happy_var_2) -> + case happyOut219 happy_x_3 of { (HappyWrap219 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + ( runPV (unECP happy_var_3) >>= \ happy_var_3 ->+ acsA (\cs -> sLL happy_var_1 happy_var_4 (AnnD noExtField $ HsAnnotation+ ((EpAnn (glR happy_var_1) (AnnPragma (mo happy_var_1) (mc happy_var_4) []) cs),+ (getANN_PRAGs happy_var_1))+ (ValueAnnProvenance happy_var_2) happy_var_3)))}}}})+ ) (\r -> happyReturn (happyIn151 r))++happyReduce_343 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_343 = happyMonadReduce 5# 135# happyReduction_343+happyReduction_343 (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 happyOut292 happy_x_3 of { (HappyWrap292 happy_var_3) -> + case happyOut219 happy_x_4 of { (HappyWrap219 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + ( runPV (unECP happy_var_4) >>= \ happy_var_4 ->+ acsA (\cs -> sLL happy_var_1 happy_var_5 (AnnD noExtField $ HsAnnotation+ ((EpAnn (glR happy_var_1) (AnnPragma (mo happy_var_1) (mc happy_var_5) [mj AnnType happy_var_2]) cs),+ (getANN_PRAGs happy_var_1))+ (TypeAnnProvenance happy_var_3) happy_var_4)))}}}}})+ ) (\r -> happyReturn (happyIn151 r))++happyReduce_344 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_344 = happyMonadReduce 4# 135# happyReduction_344+happyReduction_344 (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 happyOut219 happy_x_3 of { (HappyWrap219 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + ( runPV (unECP happy_var_3) >>= \ happy_var_3 ->+ acsA (\cs -> sLL happy_var_1 happy_var_4 (AnnD noExtField $ HsAnnotation+ ((EpAnn (glR happy_var_1) (AnnPragma (mo happy_var_1) (mc happy_var_4) [mj AnnModule happy_var_2]) cs),+ (getANN_PRAGs happy_var_1))+ ModuleAnnProvenance happy_var_3)))}}}})+ ) (\r -> happyReturn (happyIn151 r))++happyReduce_345 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_345 = happyMonadReduce 4# 136# happyReduction_345+happyReduction_345 (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 happyOut153 happy_x_2 of { (HappyWrap153 happy_var_2) -> + case happyOut154 happy_x_3 of { (HappyWrap154 happy_var_3) -> + case happyOut155 happy_x_4 of { (HappyWrap155 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 (happyIn152 r))++happyReduce_346 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_346 = happyMonadReduce 3# 136# happyReduction_346+happyReduction_346 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut153 happy_x_2 of { (HappyWrap153 happy_var_2) -> + case happyOut155 happy_x_3 of { (HappyWrap155 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 (happyIn152 r))++happyReduce_347 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_347 = happyMonadReduce 3# 136# happyReduction_347+happyReduction_347 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut153 happy_x_2 of { (HappyWrap153 happy_var_2) -> + case happyOut155 happy_x_3 of { (HappyWrap155 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 (happyIn152 r))++happyReduce_348 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_348 = happySpecReduce_1 137# happyReduction_348+happyReduction_348 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn153+ (sLL happy_var_1 happy_var_1 StdCallConv+ )}++happyReduce_349 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_349 = happySpecReduce_1 137# happyReduction_349+happyReduction_349 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn153+ (sLL happy_var_1 happy_var_1 CCallConv+ )}++happyReduce_350 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_350 = happySpecReduce_1 137# happyReduction_350+happyReduction_350 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn153+ (sLL happy_var_1 happy_var_1 CApiConv+ )}++happyReduce_351 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_351 = happySpecReduce_1 137# happyReduction_351+happyReduction_351 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn153+ (sLL happy_var_1 happy_var_1 PrimCallConv+ )}++happyReduce_352 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_352 = happySpecReduce_1 137# happyReduction_352+happyReduction_352 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn153+ (sLL happy_var_1 happy_var_1 JavaScriptCallConv+ )}++happyReduce_353 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_353 = happySpecReduce_1 138# happyReduction_353+happyReduction_353 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn154+ (sLL happy_var_1 happy_var_1 PlayRisky+ )}++happyReduce_354 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_354 = happySpecReduce_1 138# happyReduction_354+happyReduction_354 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn154+ (sLL happy_var_1 happy_var_1 PlaySafe+ )}++happyReduce_355 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_355 = happySpecReduce_1 138# happyReduction_355+happyReduction_355 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn154+ (sLL happy_var_1 happy_var_1 PlayInterruptible+ )}++happyReduce_356 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_356 = happyReduce 4# 139# happyReduction_356+happyReduction_356 (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 happyOut303 happy_x_2 of { (HappyWrap303 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut159 happy_x_4 of { (HappyWrap159 happy_var_4) -> + happyIn155+ (sLL happy_var_1 (reLoc happy_var_4) ([mu AnnDcolon happy_var_3]+ ,(L (getLoc happy_var_1)+ (getStringLiteral happy_var_1), happy_var_2, happy_var_4))+ ) `HappyStk` happyRest}}}}++happyReduce_357 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_357 = happySpecReduce_3 139# happyReduction_357+happyReduction_357 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut159 happy_x_3 of { (HappyWrap159 happy_var_3) -> + happyIn155+ (sLL (reLocN happy_var_1) (reLoc happy_var_3) ([mu AnnDcolon happy_var_2]+ ,(noLoc (StringLiteral NoSourceText nilFS Nothing), happy_var_1, happy_var_3))+ )}}}++happyReduce_358 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_358 = happySpecReduce_0 140# happyReduction_358+happyReduction_358 = happyIn156+ (Nothing+ )++happyReduce_359 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_359 = happySpecReduce_2 140# happyReduction_359+happyReduction_359 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut165 happy_x_2 of { (HappyWrap165 happy_var_2) -> + happyIn156+ (Just (mu AnnDcolon happy_var_1, happy_var_2)+ )}}++happyReduce_360 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_360 = happySpecReduce_0 141# happyReduction_360+happyReduction_360 = happyIn157+ (([], Nothing)+ )++happyReduce_361 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_361 = happySpecReduce_2 141# happyReduction_361+happyReduction_361 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut283 happy_x_2 of { (HappyWrap283 happy_var_2) -> + happyIn157+ (([mu AnnDcolon happy_var_1], Just happy_var_2)+ )}}++happyReduce_362 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_362 = happySpecReduce_1 142# happyReduction_362+happyReduction_362 happy_x_1+ = case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> + happyIn158+ (happy_var_1+ )}++happyReduce_363 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_363 = happyMonadReduce 3# 142# happyReduction_363+happyReduction_363 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut165 happy_x_1 of { (HappyWrap165 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut187 happy_x_3 of { (HappyWrap187 happy_var_3) -> + ( acsA (\cs -> sLLAA happy_var_1 happy_var_3 $ mkHsImplicitSigType $+ sLLa (reLoc happy_var_1) (reLoc happy_var_3) $ HsKindSig (EpAnn (glAR happy_var_1) [mu AnnDcolon happy_var_2] cs) happy_var_1 happy_var_3))}}})+ ) (\r -> happyReturn (happyIn158 r))++happyReduce_364 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_364 = happySpecReduce_1 143# happyReduction_364+happyReduction_364 happy_x_1+ = case happyOut165 happy_x_1 of { (HappyWrap165 happy_var_1) -> + happyIn159+ (hsTypeToHsSigType happy_var_1+ )}++happyReduce_365 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_365 = happyMonadReduce 3# 144# happyReduction_365+happyReduction_365 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut160 happy_x_1 of { (HappyWrap160 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut303 happy_x_3 of { (HappyWrap303 happy_var_3) -> + ( case unLoc happy_var_1 of+ [] -> return (sLL happy_var_1 (reLocN happy_var_3) (happy_var_3 : unLoc happy_var_1))+ (h:t) -> do+ h' <- addTrailingCommaN h (gl happy_var_2)+ return (sLL happy_var_1 (reLocN happy_var_3) (happy_var_3 : h' : t)))}}})+ ) (\r -> happyReturn (happyIn160 r))++happyReduce_366 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_366 = happySpecReduce_1 144# happyReduction_366+happyReduction_366 happy_x_1+ = case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> + happyIn160+ (sL1N happy_var_1 [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 145# happyReduction_367+happyReduction_367 happy_x_1+ = case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> + happyIn161+ (unitOL happy_var_1+ )}++happyReduce_368 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_368 = happyMonadReduce 3# 145# happyReduction_368+happyReduction_368 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut161 happy_x_3 of { (HappyWrap161 happy_var_3) -> + ( do { st <- addTrailingCommaA happy_var_1 (gl happy_var_2)+ ; return $ unitOL st `appOL` happy_var_3 })}}})+ ) (\r -> happyReturn (happyIn161 r))++happyReduce_369 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_369 = happySpecReduce_2 146# happyReduction_369+happyReduction_369 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn162+ (sLL happy_var_1 happy_var_2 (UnpackednessPragma [mo happy_var_1, mc happy_var_2] (getUNPACK_PRAGs happy_var_1) SrcUnpack)+ )}}++happyReduce_370 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_370 = happySpecReduce_2 146# happyReduction_370+happyReduction_370 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn162+ (sLL happy_var_1 happy_var_2 (UnpackednessPragma [mo happy_var_1, mc happy_var_2] (getNOUNPACK_PRAGs happy_var_1) SrcNoUnpack)+ )}}++happyReduce_371 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_371 = happyMonadReduce 3# 147# happyReduction_371+happyReduction_371 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut180 happy_x_2 of { (HappyWrap180 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( do { hintExplicitForall happy_var_1+ ; acs (\cs -> (sLL happy_var_1 happy_var_3 $+ mkHsForAllInvisTele (EpAnn (glR happy_var_1) (mu AnnForall happy_var_1,mu AnnDot happy_var_3) cs) happy_var_2 )) })}}})+ ) (\r -> happyReturn (happyIn163 r))++happyReduce_372 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_372 = happyMonadReduce 3# 147# happyReduction_372+happyReduction_372 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut180 happy_x_2 of { (HappyWrap180 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( do { hintExplicitForall happy_var_1+ ; req_tvbs <- fromSpecTyVarBndrs happy_var_2+ ; acs (\cs -> (sLL happy_var_1 happy_var_3 $+ mkHsForAllVisTele (EpAnn (glR happy_var_1) (mu AnnForall happy_var_1,mu AnnRarrow happy_var_3) cs) req_tvbs )) })}}})+ ) (\r -> happyReturn (happyIn163 r))++happyReduce_373 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_373 = happySpecReduce_1 148# happyReduction_373+happyReduction_373 happy_x_1+ = case happyOut165 happy_x_1 of { (HappyWrap165 happy_var_1) -> + happyIn164+ (happy_var_1+ )}++happyReduce_374 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_374 = happyMonadReduce 3# 148# happyReduction_374+happyReduction_374 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut165 happy_x_1 of { (HappyWrap165 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut187 happy_x_3 of { (HappyWrap187 happy_var_3) -> + ( acsA (\cs -> sLLAA happy_var_1 happy_var_3 $ HsKindSig (EpAnn (glAR happy_var_1) [mu AnnDcolon happy_var_2] cs) happy_var_1 happy_var_3))}}})+ ) (\r -> happyReturn (happyIn164 r))++happyReduce_375 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_375 = happySpecReduce_2 149# happyReduction_375+happyReduction_375 happy_x_2+ happy_x_1+ = case happyOut163 happy_x_1 of { (HappyWrap163 happy_var_1) -> + case happyOut165 happy_x_2 of { (HappyWrap165 happy_var_2) -> + happyIn165+ (reLocA $ sLL happy_var_1 (reLoc happy_var_2) $+ HsForAllTy { hst_tele = unLoc happy_var_1+ , hst_xforall = noExtField+ , hst_body = happy_var_2 }+ )}}++happyReduce_376 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_376 = happyMonadReduce 3# 149# happyReduction_376+happyReduction_376 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut165 happy_x_3 of { (HappyWrap165 happy_var_3) -> + ( acsA (\cs -> (sLL (reLoc happy_var_1) (reLoc happy_var_3) $+ HsQualTy { hst_ctxt = addTrailingDarrowC happy_var_1 happy_var_2 cs+ , hst_xqual = NoExtField+ , hst_body = happy_var_3 })))}}})+ ) (\r -> happyReturn (happyIn165 r))++happyReduce_377 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_377 = happyMonadReduce 3# 149# happyReduction_377+happyReduction_377 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut264 happy_x_1 of { (HappyWrap264 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut165 happy_x_3 of { (HappyWrap165 happy_var_3) -> + ( acsA (\cs -> sLL happy_var_1 (reLoc happy_var_3) (HsIParamTy (EpAnn (glR happy_var_1) [mu AnnDcolon happy_var_2] cs) (reLocA happy_var_1) happy_var_3)))}}})+ ) (\r -> happyReturn (happyIn165 r))++happyReduce_378 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_378 = happySpecReduce_1 149# happyReduction_378+happyReduction_378 happy_x_1+ = case happyOut167 happy_x_1 of { (HappyWrap167 happy_var_1) -> + happyIn165+ (happy_var_1+ )}++happyReduce_379 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_379 = happyMonadReduce 1# 150# happyReduction_379+happyReduction_379 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut169 happy_x_1 of { (HappyWrap169 happy_var_1) -> + ( checkContext happy_var_1)})+ ) (\r -> happyReturn (happyIn166 r))++happyReduce_380 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_380 = happySpecReduce_1 151# happyReduction_380+happyReduction_380 happy_x_1+ = case happyOut169 happy_x_1 of { (HappyWrap169 happy_var_1) -> + happyIn167+ (happy_var_1+ )}++happyReduce_381 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_381 = happyMonadReduce 3# 151# happyReduction_381+happyReduction_381 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut169 happy_x_1 of { (HappyWrap169 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut165 happy_x_3 of { (HappyWrap165 happy_var_3) -> + ( acsA (\cs -> sLL (reLoc happy_var_1) (reLoc happy_var_3)+ $ HsFunTy (EpAnn (glAR happy_var_1) NoEpAnns cs) (HsUnrestrictedArrow (hsUniTok happy_var_2)) happy_var_1 happy_var_3))}}})+ ) (\r -> happyReturn (happyIn167 r))++happyReduce_382 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_382 = happyMonadReduce 4# 151# happyReduction_382+happyReduction_382 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut169 happy_x_1 of { (HappyWrap169 happy_var_1) -> + case happyOut168 happy_x_2 of { (HappyWrap168 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut165 happy_x_4 of { (HappyWrap165 happy_var_4) -> + ( hintLinear (getLoc happy_var_2)+ >> let arr = (unLoc happy_var_2) (hsUniTok happy_var_3)+ in acsA (\cs -> sLL (reLoc happy_var_1) (reLoc happy_var_4)+ $ HsFunTy (EpAnn (glAR happy_var_1) NoEpAnns cs) arr happy_var_1 happy_var_4))}}}})+ ) (\r -> happyReturn (happyIn167 r))++happyReduce_383 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_383 = happyMonadReduce 3# 151# happyReduction_383+happyReduction_383 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut169 happy_x_1 of { (HappyWrap169 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut165 happy_x_3 of { (HappyWrap165 happy_var_3) -> + ( hintLinear (getLoc happy_var_2) >>+ acsA (\cs -> sLL (reLoc happy_var_1) (reLoc happy_var_3)+ $ HsFunTy (EpAnn (glAR happy_var_1) NoEpAnns cs) (HsLinearArrow (HsLolly (hsTok happy_var_2))) happy_var_1 happy_var_3))}}})+ ) (\r -> happyReturn (happyIn167 r))++happyReduce_384 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_384 = happySpecReduce_2 152# happyReduction_384+happyReduction_384 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut174 happy_x_2 of { (HappyWrap174 happy_var_2) -> + happyIn168+ (sLL happy_var_1 (reLoc happy_var_2) (mkMultTy (hsTok happy_var_1) happy_var_2)+ )}}++happyReduce_385 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_385 = happyMonadReduce 1# 153# happyReduction_385+happyReduction_385 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut170 happy_x_1 of { (HappyWrap170 happy_var_1) -> + ( runPV happy_var_1)})+ ) (\r -> happyReturn (happyIn169 r))++happyReduce_386 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_386 = happySpecReduce_1 154# happyReduction_386+happyReduction_386 happy_x_1+ = case happyOut171 happy_x_1 of { (HappyWrap171 happy_var_1) -> + happyIn170+ (happy_var_1+ )}++happyReduce_387 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_387 = happySpecReduce_3 154# happyReduction_387+happyReduction_387 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut171 happy_x_1 of { (HappyWrap171 happy_var_1) -> + case happyOut173 happy_x_2 of { (HappyWrap173 happy_var_2) -> + case happyOut170 happy_x_3 of { (HappyWrap170 happy_var_3) -> + happyIn170+ (happy_var_1 >>= \ happy_var_1 ->+ happy_var_3 >>= \ happy_var_3 ->+ do { let (op, prom) = happy_var_2+ ; when (looksLikeMult happy_var_1 op happy_var_3) $ hintLinear (getLocA op)+ ; mkHsOpTyPV prom happy_var_1 op happy_var_3 }+ )}}}++happyReduce_388 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_388 = happySpecReduce_2 154# happyReduction_388+happyReduction_388 happy_x_2+ happy_x_1+ = case happyOut162 happy_x_1 of { (HappyWrap162 happy_var_1) -> + case happyOut170 happy_x_2 of { (HappyWrap170 happy_var_2) -> + happyIn170+ (happy_var_2 >>= \ happy_var_2 ->+ mkUnpackednessPV happy_var_1 happy_var_2+ )}}++happyReduce_389 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_389 = happySpecReduce_1 155# happyReduction_389+happyReduction_389 happy_x_1+ = case happyOut174 happy_x_1 of { (HappyWrap174 happy_var_1) -> + happyIn171+ (mkHsAppTyHeadPV happy_var_1+ )}++happyReduce_390 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_390 = happySpecReduce_1 155# happyReduction_390+happyReduction_390 happy_x_1+ = case happyOut173 happy_x_1 of { (HappyWrap173 happy_var_1) -> + happyIn171+ (failOpFewArgs (fst happy_var_1)+ )}++happyReduce_391 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_391 = happySpecReduce_2 155# happyReduction_391+happyReduction_391 happy_x_2+ happy_x_1+ = case happyOut171 happy_x_1 of { (HappyWrap171 happy_var_1) -> + case happyOut172 happy_x_2 of { (HappyWrap172 happy_var_2) -> + happyIn171+ (happy_var_1 >>= \ happy_var_1 ->+ mkHsAppTyPV happy_var_1 happy_var_2+ )}}++happyReduce_392 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_392 = happySpecReduce_3 155# happyReduction_392+happyReduction_392 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut171 happy_x_1 of { (HappyWrap171 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut174 happy_x_3 of { (HappyWrap174 happy_var_3) -> + happyIn171+ (happy_var_1 >>= \ happy_var_1 ->+ mkHsAppKindTyPV happy_var_1 (hsTok happy_var_2) happy_var_3+ )}}}++happyReduce_393 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_393 = happySpecReduce_1 156# happyReduction_393+happyReduction_393 happy_x_1+ = case happyOut174 happy_x_1 of { (HappyWrap174 happy_var_1) -> + happyIn172+ (happy_var_1+ )}++happyReduce_394 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_394 = happyMonadReduce 2# 156# happyReduction_394+happyReduction_394 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut162 happy_x_1 of { (HappyWrap162 happy_var_1) -> + case happyOut174 happy_x_2 of { (HappyWrap174 happy_var_2) -> + ( addUnpackednessP happy_var_1 happy_var_2)}})+ ) (\r -> happyReturn (happyIn172 r))++happyReduce_395 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_395 = happySpecReduce_1 157# happyReduction_395+happyReduction_395 happy_x_1+ = case happyOut287 happy_x_1 of { (HappyWrap287 happy_var_1) -> + happyIn173+ ((happy_var_1, NotPromoted)+ )}++happyReduce_396 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_396 = happySpecReduce_1 157# happyReduction_396+happyReduction_396 happy_x_1+ = case happyOut301 happy_x_1 of { (HappyWrap301 happy_var_1) -> + happyIn173+ ((happy_var_1, NotPromoted)+ )}++happyReduce_397 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_397 = happyMonadReduce 2# 157# happyReduction_397+happyReduction_397 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut282 happy_x_2 of { (HappyWrap282 happy_var_2) -> + ( do { op <- amsrn (sLL happy_var_1 (reLoc happy_var_2) (unLoc happy_var_2))+ (NameAnnQuote (glAA happy_var_1) (gl happy_var_2) [])+ ; return (op, IsPromoted) })}})+ ) (\r -> happyReturn (happyIn173 r))++happyReduce_398 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_398 = happyMonadReduce 2# 157# happyReduction_398+happyReduction_398 (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 { (HappyWrap294 happy_var_2) -> + ( do { op <- amsrn (sLL happy_var_1 (reLoc happy_var_2) (unLoc happy_var_2))+ (NameAnnQuote (glAA happy_var_1) (gl happy_var_2) [])+ ; return (op, IsPromoted) })}})+ ) (\r -> happyReturn (happyIn173 r))++happyReduce_399 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_399 = happyMonadReduce 1# 158# happyReduction_399+happyReduction_399 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut284 happy_x_1 of { (HappyWrap284 happy_var_1) -> + ( acsa (\cs -> sL1a (reLocN happy_var_1) (HsTyVar (EpAnn (glNR happy_var_1) [] cs) NotPromoted happy_var_1)))})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_400 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_400 = happyMonadReduce 1# 158# happyReduction_400+happyReduction_400 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut300 happy_x_1 of { (HappyWrap300 happy_var_1) -> + ( acsa (\cs -> sL1a (reLocN happy_var_1) (HsTyVar (EpAnn (glNR happy_var_1) [] cs) NotPromoted happy_var_1)))})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_401 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_401 = happyMonadReduce 1# 158# happyReduction_401+happyReduction_401 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( do { warnStarIsType (getLoc happy_var_1)+ ; return $ reLocA $ sL1 happy_var_1 (HsStarTy noExtField (isUnicode happy_var_1)) })})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_402 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_402 = happyMonadReduce 2# 158# happyReduction_402+happyReduction_402 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut174 happy_x_2 of { (HappyWrap174 happy_var_2) -> + ( acsA (\cs -> sLLlA happy_var_1 happy_var_2 (mkBangTy (EpAnn (glR happy_var_1) [mj AnnTilde happy_var_1] cs) SrcLazy happy_var_2)))}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_403 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_403 = happyMonadReduce 2# 158# happyReduction_403+happyReduction_403 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut174 happy_x_2 of { (HappyWrap174 happy_var_2) -> + ( acsA (\cs -> sLLlA happy_var_1 happy_var_2 (mkBangTy (EpAnn (glR happy_var_1) [mj AnnBang happy_var_1] cs) SrcStrict happy_var_2)))}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_404 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_404 = happyMonadReduce 3# 158# happyReduction_404+happyReduction_404 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut196 happy_x_2 of { (HappyWrap196 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( do { decls <- acsA (\cs -> (sLL happy_var_1 happy_var_3 $ HsRecTy (EpAnn (glR happy_var_1) (AnnList (Just $ listAsAnchor happy_var_2) (Just $ moc happy_var_1) (Just $ mcc happy_var_3) [] []) cs) happy_var_2))+ ; checkRecordSyntax decls })}}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_405 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_405 = happyMonadReduce 2# 158# happyReduction_405+happyReduction_405 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_2 $ HsTupleTy (EpAnn (glR happy_var_1) (AnnParen AnnParens (glAA happy_var_1) (glAA happy_var_2)) cs)+ HsBoxedOrConstraintTuple []))}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_406 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_406 = happyMonadReduce 5# 158# happyReduction_406+happyReduction_406 (happy_x_5 `HappyStk`+ happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut164 happy_x_2 of { (HappyWrap164 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut178 happy_x_4 of { (HappyWrap178 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + ( do { h <- addTrailingCommaA happy_var_2 (gl happy_var_3)+ ; acsA (\cs -> sLL happy_var_1 happy_var_5 $ HsTupleTy (EpAnn (glR happy_var_1) (AnnParen AnnParens (glAA happy_var_1) (glAA happy_var_5)) cs)+ HsBoxedOrConstraintTuple (h : happy_var_4)) })}}}}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_407 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_407 = happyMonadReduce 2# 158# happyReduction_407+happyReduction_407 (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 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_2 $ HsTupleTy (EpAnn (glR happy_var_1) (AnnParen AnnParensHash (glAA happy_var_1) (glAA happy_var_2)) cs) HsUnboxedTuple []))}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_408 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_408 = happyMonadReduce 3# 158# happyReduction_408+happyReduction_408 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut178 happy_x_2 of { (HappyWrap178 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsTupleTy (EpAnn (glR happy_var_1) (AnnParen AnnParensHash (glAA happy_var_1) (glAA happy_var_3)) cs) HsUnboxedTuple happy_var_2))}}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_409 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_409 = happyMonadReduce 3# 158# happyReduction_409+happyReduction_409 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut179 happy_x_2 of { (HappyWrap179 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsSumTy (EpAnn (glR happy_var_1) (AnnParen AnnParensHash (glAA happy_var_1) (glAA happy_var_3)) cs) happy_var_2))}}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_410 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_410 = happyMonadReduce 3# 158# happyReduction_410+happyReduction_410 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut164 happy_x_2 of { (HappyWrap164 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsListTy (EpAnn (glR happy_var_1) (AnnParen AnnParensSquare (glAA happy_var_1) (glAA happy_var_3)) cs) happy_var_2))}}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_411 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_411 = happyMonadReduce 3# 158# happyReduction_411+happyReduction_411 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut164 happy_x_2 of { (HappyWrap164 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsParTy (EpAnn (glR happy_var_1) (AnnParen AnnParens (glAA happy_var_1) (glAA happy_var_3)) cs) happy_var_2))}}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_412 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_412 = happySpecReduce_1 158# happyReduction_412+happyReduction_412 happy_x_1+ = case happyOut211 happy_x_1 of { (HappyWrap211 happy_var_1) -> + happyIn174+ (mapLocA (HsSpliceTy noExtField) happy_var_1+ )}++happyReduce_413 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_413 = happySpecReduce_1 158# happyReduction_413+happyReduction_413 happy_x_1+ = case happyOut224 happy_x_1 of { (HappyWrap224 happy_var_1) -> + happyIn174+ (mapLocA (HsSpliceTy noExtField) happy_var_1+ )}++happyReduce_414 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_414 = happyMonadReduce 2# 158# happyReduction_414+happyReduction_414 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut273 happy_x_2 of { (HappyWrap273 happy_var_2) -> + ( acsA (\cs -> sLL happy_var_1 (reLocN happy_var_2) $ HsTyVar (EpAnn (glR happy_var_1) [mj AnnSimpleQuote happy_var_1,mjN AnnName happy_var_2] cs) IsPromoted happy_var_2))}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_415 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_415 = happyMonadReduce 6# 158# happyReduction_415+happyReduction_415 (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 happyOut164 happy_x_3 of { (HappyWrap164 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + case happyOut178 happy_x_5 of { (HappyWrap178 happy_var_5) -> + case happyOutTok happy_x_6 of { happy_var_6 -> + ( do { h <- addTrailingCommaA happy_var_3 (gl happy_var_4)+ ; acsA (\cs -> sLL happy_var_1 happy_var_6 $ HsExplicitTupleTy (EpAnn (glR happy_var_1) [mj AnnSimpleQuote happy_var_1,mop happy_var_2,mcp happy_var_6] cs) (h : happy_var_5)) })}}}}}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_416 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_416 = happyMonadReduce 4# 158# happyReduction_416+happyReduction_416 (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 happyOut177 happy_x_3 of { (HappyWrap177 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_4 $ HsExplicitListTy (EpAnn (glR happy_var_1) [mj AnnSimpleQuote happy_var_1,mos happy_var_2,mcs happy_var_4] cs) IsPromoted happy_var_3))}}}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_417 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_417 = happyMonadReduce 2# 158# happyReduction_417+happyReduction_417 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut303 happy_x_2 of { (HappyWrap303 happy_var_2) -> + ( acsA (\cs -> sLL happy_var_1 (reLocN happy_var_2) $ HsTyVar (EpAnn (glR happy_var_1) [mj AnnSimpleQuote happy_var_1,mjN AnnName happy_var_2] cs) IsPromoted happy_var_2))}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_418 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_418 = happyMonadReduce 5# 158# happyReduction_418+happyReduction_418 (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 happyOut164 happy_x_2 of { (HappyWrap164 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut178 happy_x_4 of { (HappyWrap178 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + ( do { h <- addTrailingCommaA happy_var_2 (gl happy_var_3)+ ; acsA (\cs -> sLL happy_var_1 happy_var_5 $ HsExplicitListTy (EpAnn (glR happy_var_1) [mos happy_var_1,mcs happy_var_5] cs) NotPromoted (h:happy_var_4)) })}}}}})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_419 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_419 = happySpecReduce_1 158# happyReduction_419+happyReduction_419 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn174+ (reLocA $ sLL happy_var_1 happy_var_1 $ HsTyLit noExtField $ HsNumTy (getINTEGERs happy_var_1)+ (il_value (getINTEGER happy_var_1))+ )}++happyReduce_420 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_420 = happySpecReduce_1 158# happyReduction_420+happyReduction_420 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn174+ (reLocA $ sLL happy_var_1 happy_var_1 $ HsTyLit noExtField $ HsCharTy (getCHARs happy_var_1)+ (getCHAR happy_var_1)+ )}++happyReduce_421 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_421 = happySpecReduce_1 158# happyReduction_421+happyReduction_421 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn174+ (reLocA $ sLL happy_var_1 happy_var_1 $ HsTyLit noExtField $ HsStrTy (getSTRINGs happy_var_1)+ (getSTRING happy_var_1)+ )}++happyReduce_422 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_422 = happySpecReduce_1 158# happyReduction_422+happyReduction_422 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn174+ (reLocA $ sL1 happy_var_1 $ mkAnonWildCardTy+ )}++happyReduce_423 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_423 = happyMonadReduce 1# 158# happyReduction_423+happyReduction_423 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( let qname = mkQual tvName (getQVARID happy_var_1)+ in acsa (\cs -> sL1a happy_var_1 (HsTyVar (EpAnn (glR happy_var_1) [] cs) NotPromoted (sL1n happy_var_1 $ qname))))})+ ) (\r -> happyReturn (happyIn174 r))++happyReduce_424 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_424 = happySpecReduce_1 159# happyReduction_424+happyReduction_424 happy_x_1+ = case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> + happyIn175+ (happy_var_1+ )}++happyReduce_425 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_425 = happySpecReduce_1 160# happyReduction_425+happyReduction_425 happy_x_1+ = case happyOut158 happy_x_1 of { (HappyWrap158 happy_var_1) -> + happyIn176+ ([happy_var_1]+ )}++happyReduce_426 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_426 = happyMonadReduce 3# 160# happyReduction_426+happyReduction_426 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut158 happy_x_1 of { (HappyWrap158 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut176 happy_x_3 of { (HappyWrap176 happy_var_3) -> + ( do { h <- addTrailingCommaA happy_var_1 (gl happy_var_2)+ ; return (h : happy_var_3) })}}})+ ) (\r -> happyReturn (happyIn176 r))++happyReduce_427 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_427 = happySpecReduce_1 161# happyReduction_427+happyReduction_427 happy_x_1+ = case happyOut178 happy_x_1 of { (HappyWrap178 happy_var_1) -> + happyIn177+ (happy_var_1+ )}++happyReduce_428 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_428 = happySpecReduce_0 161# happyReduction_428+happyReduction_428 = happyIn177+ ([]+ )++happyReduce_429 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_429 = happySpecReduce_1 162# happyReduction_429+happyReduction_429 happy_x_1+ = case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> + happyIn178+ ([happy_var_1]+ )}++happyReduce_430 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_430 = happyMonadReduce 3# 162# happyReduction_430+happyReduction_430 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut178 happy_x_3 of { (HappyWrap178 happy_var_3) -> + ( do { h <- addTrailingCommaA happy_var_1 (gl happy_var_2)+ ; return (h : happy_var_3) })}}})+ ) (\r -> happyReturn (happyIn178 r))++happyReduce_431 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_431 = happyMonadReduce 3# 163# happyReduction_431+happyReduction_431 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut164 happy_x_3 of { (HappyWrap164 happy_var_3) -> + ( do { h <- addTrailingVbarA happy_var_1 (gl happy_var_2)+ ; return [h,happy_var_3] })}}})+ ) (\r -> happyReturn (happyIn179 r))++happyReduce_432 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_432 = happyMonadReduce 3# 163# happyReduction_432+happyReduction_432 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut179 happy_x_3 of { (HappyWrap179 happy_var_3) -> + ( do { h <- addTrailingVbarA happy_var_1 (gl happy_var_2)+ ; return (h : happy_var_3) })}}})+ ) (\r -> happyReturn (happyIn179 r))++happyReduce_433 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_433 = happySpecReduce_2 164# happyReduction_433+happyReduction_433 happy_x_2+ happy_x_1+ = case happyOut181 happy_x_1 of { (HappyWrap181 happy_var_1) -> + case happyOut180 happy_x_2 of { (HappyWrap180 happy_var_2) -> + happyIn180+ (happy_var_1 : 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 164# happyReduction_434+happyReduction_434 = happyIn180+ ([]+ )++happyReduce_435 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_435 = happySpecReduce_1 165# happyReduction_435+happyReduction_435 happy_x_1+ = case happyOut182 happy_x_1 of { (HappyWrap182 happy_var_1) -> + happyIn181+ (happy_var_1+ )}++happyReduce_436 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_436 = happyMonadReduce 3# 165# happyReduction_436+happyReduction_436 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut300 happy_x_2 of { (HappyWrap300 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_3 (UserTyVar (EpAnn (glR happy_var_1) [moc happy_var_1, mcc happy_var_3] cs) InferredSpec happy_var_2)))}}})+ ) (\r -> happyReturn (happyIn181 r))++happyReduce_437 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_437 = happyMonadReduce 5# 165# happyReduction_437+happyReduction_437 (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 happyOut300 happy_x_2 of { (HappyWrap300 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut187 happy_x_4 of { (HappyWrap187 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_5 (KindedTyVar (EpAnn (glR happy_var_1) [moc happy_var_1,mu AnnDcolon happy_var_3 ,mcc happy_var_5] cs) InferredSpec happy_var_2 happy_var_4)))}}}}})+ ) (\r -> happyReturn (happyIn181 r))++happyReduce_438 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_438 = happyMonadReduce 1# 166# happyReduction_438+happyReduction_438 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut300 happy_x_1 of { (HappyWrap300 happy_var_1) -> + ( acsA (\cs -> (sL1 (reLocN happy_var_1) (UserTyVar (EpAnn (glNR happy_var_1) [] cs) SpecifiedSpec happy_var_1))))})+ ) (\r -> happyReturn (happyIn182 r))++happyReduce_439 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_439 = happyMonadReduce 5# 166# 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 happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut300 happy_x_2 of { (HappyWrap300 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut187 happy_x_4 of { (HappyWrap187 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + ( acsA (\cs -> (sLL happy_var_1 happy_var_5 (KindedTyVar (EpAnn (glR happy_var_1) [mop happy_var_1,mu AnnDcolon happy_var_3 ,mcp happy_var_5] cs) SpecifiedSpec happy_var_2 happy_var_4))))}}}}})+ ) (\r -> happyReturn (happyIn182 r))++happyReduce_440 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_440 = happySpecReduce_0 167# happyReduction_440+happyReduction_440 = happyIn183+ (noLoc ([],[])+ )++happyReduce_441 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_441 = happySpecReduce_2 167# happyReduction_441+happyReduction_441 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut184 happy_x_2 of { (HappyWrap184 happy_var_2) -> + happyIn183+ ((sLL happy_var_1 happy_var_2 ([mj AnnVbar happy_var_1]+ ,reverse (unLoc happy_var_2)))+ )}}++happyReduce_442 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_442 = happyMonadReduce 3# 168# happyReduction_442+happyReduction_442 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut184 happy_x_1 of { (HappyWrap184 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut185 happy_x_3 of { (HappyWrap185 happy_var_3) -> + (+ do { let (h:t) = unLoc happy_var_1 -- Safe from fds1 rules+ ; h' <- addTrailingCommaA h (gl happy_var_2)+ ; return (sLLlA happy_var_1 happy_var_3 (happy_var_3 : h' : t)) })}}})+ ) (\r -> happyReturn (happyIn184 r))++happyReduce_443 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_443 = happySpecReduce_1 168# happyReduction_443+happyReduction_443 happy_x_1+ = case happyOut185 happy_x_1 of { (HappyWrap185 happy_var_1) -> + happyIn184+ (sL1A happy_var_1 [happy_var_1]+ )}++happyReduce_444 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_444 = happyMonadReduce 3# 169# happyReduction_444+happyReduction_444 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut186 happy_x_1 of { (HappyWrap186 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut186 happy_x_3 of { (HappyWrap186 happy_var_3) -> + ( acsA (\cs -> L (comb3 happy_var_1 happy_var_2 happy_var_3)+ (FunDep (EpAnn (glR happy_var_1) [mu AnnRarrow happy_var_2] cs)+ (reverse (unLoc happy_var_1))+ (reverse (unLoc happy_var_3)))))}}})+ ) (\r -> happyReturn (happyIn185 r))++happyReduce_445 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_445 = happySpecReduce_0 170# happyReduction_445+happyReduction_445 = happyIn186+ (noLoc []+ )++happyReduce_446 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_446 = happySpecReduce_2 170# happyReduction_446+happyReduction_446 happy_x_2+ happy_x_1+ = case happyOut186 happy_x_1 of { (HappyWrap186 happy_var_1) -> + case happyOut300 happy_x_2 of { (HappyWrap300 happy_var_2) -> + happyIn186+ (sLL happy_var_1 (reLocN happy_var_2) (happy_var_2 : (unLoc happy_var_1))+ )}}++happyReduce_447 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_447 = happySpecReduce_1 171# happyReduction_447+happyReduction_447 happy_x_1+ = case happyOut165 happy_x_1 of { (HappyWrap165 happy_var_1) -> + happyIn187+ (happy_var_1+ )}++happyReduce_448 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_448 = happyMonadReduce 4# 172# happyReduction_448+happyReduction_448 (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 happyOut189 happy_x_3 of { (HappyWrap189 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + ( checkEmptyGADTs $+ 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))}}}})+ ) (\r -> happyReturn (happyIn188 r))++happyReduce_449 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_449 = happyMonadReduce 4# 172# happyReduction_449+happyReduction_449 (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 happyOut189 happy_x_3 of { (HappyWrap189 happy_var_3) -> + ( checkEmptyGADTs $+ L (comb2 happy_var_1 happy_var_3)+ ([mj AnnWhere happy_var_1]+ , unLoc happy_var_3))}})+ ) (\r -> happyReturn (happyIn188 r))++happyReduce_450 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_450 = happySpecReduce_0 172# happyReduction_450+happyReduction_450 = happyIn188+ (noLoc ([],[])+ )++happyReduce_451 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_451 = happyMonadReduce 3# 173# happyReduction_451+happyReduction_451 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut190 happy_x_1 of { (HappyWrap190 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut189 happy_x_3 of { (HappyWrap189 happy_var_3) -> + ( do { h <- addTrailingSemiA happy_var_1 (gl happy_var_2)+ ; return (L (comb2 (reLoc happy_var_1) happy_var_3) (h : unLoc happy_var_3)) })}}})+ ) (\r -> happyReturn (happyIn189 r))++happyReduce_452 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_452 = happySpecReduce_1 173# happyReduction_452+happyReduction_452 happy_x_1+ = case happyOut190 happy_x_1 of { (HappyWrap190 happy_var_1) -> + happyIn189+ (L (glA happy_var_1) [happy_var_1]+ )}++happyReduce_453 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_453 = happySpecReduce_0 173# happyReduction_453+happyReduction_453 = happyIn189+ (noLoc []+ )++happyReduce_454 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_454 = happyMonadReduce 4# 174# happyReduction_454+happyReduction_454 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut277 happy_x_2 of { (HappyWrap277 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut159 happy_x_4 of { (HappyWrap159 happy_var_4) -> + ( mkGadtDecl (comb2A happy_var_2 happy_var_4) (unLoc happy_var_2) (hsUniTok happy_var_3) happy_var_4)}}})+ ) (\r -> happyReturn (happyIn190 r))++happyReduce_455 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_455 = happySpecReduce_2 175# happyReduction_455+happyReduction_455 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut192 happy_x_2 of { (HappyWrap192 happy_var_2) -> + happyIn191+ (sLL happy_var_1 happy_var_2 ([mj AnnEqual happy_var_1],unLoc happy_var_2)+ )}}++happyReduce_456 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_456 = happyMonadReduce 3# 176# happyReduction_456+happyReduction_456 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut192 happy_x_1 of { (HappyWrap192 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut193 happy_x_3 of { (HappyWrap193 happy_var_3) -> + ( do { let (h:t) = unLoc happy_var_1+ ; h' <- addTrailingVbarA h (gl happy_var_2)+ ; return (sLLlA happy_var_1 happy_var_3 (happy_var_3 : h' : t)) })}}})+ ) (\r -> happyReturn (happyIn192 r))++happyReduce_457 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_457 = happySpecReduce_1 176# happyReduction_457+happyReduction_457 happy_x_1+ = case happyOut193 happy_x_1 of { (HappyWrap193 happy_var_1) -> + happyIn192+ (sL1A happy_var_1 [happy_var_1]+ )}++happyReduce_458 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_458 = happyMonadReduce 4# 177# happyReduction_458+happyReduction_458 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut194 happy_x_1 of { (HappyWrap194 happy_var_1) -> + case happyOut166 happy_x_2 of { (HappyWrap166 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut195 happy_x_4 of { (HappyWrap195 happy_var_4) -> + ( acsA (\cs -> let (con,details) = unLoc happy_var_4 in+ (L (comb4 happy_var_1 (reLoc happy_var_2) happy_var_3 happy_var_4) (mkConDeclH98+ (EpAnn (spanAsAnchor (comb4 happy_var_1 (reLoc happy_var_2) happy_var_3 happy_var_4))+ (mu AnnDarrow happy_var_3:(fst $ unLoc happy_var_1)) cs)+ con+ (snd $ unLoc happy_var_1)+ (Just happy_var_2)+ details))))}}}})+ ) (\r -> happyReturn (happyIn193 r))++happyReduce_459 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_459 = happyMonadReduce 2# 177# happyReduction_459+happyReduction_459 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut194 happy_x_1 of { (HappyWrap194 happy_var_1) -> + case happyOut195 happy_x_2 of { (HappyWrap195 happy_var_2) -> + ( acsA (\cs -> let (con,details) = unLoc happy_var_2 in+ (L (comb2 happy_var_1 happy_var_2) (mkConDeclH98 (EpAnn (spanAsAnchor (comb2 happy_var_1 happy_var_2)) (fst $ unLoc happy_var_1) cs)+ con+ (snd $ unLoc happy_var_1)+ Nothing -- No context+ details))))}})+ ) (\r -> happyReturn (happyIn193 r))++happyReduce_460 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_460 = happySpecReduce_3 178# happyReduction_460+happyReduction_460 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut180 happy_x_2 of { (HappyWrap180 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn194+ (sLL happy_var_1 happy_var_3 ([mu AnnForall happy_var_1,mj AnnDot happy_var_3], Just happy_var_2)+ )}}}++happyReduce_461 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_461 = happySpecReduce_0 178# happyReduction_461+happyReduction_461 = happyIn194+ (noLoc ([], Nothing)+ )++happyReduce_462 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_462 = happyMonadReduce 1# 179# happyReduction_462+happyReduction_462 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut170 happy_x_1 of { (HappyWrap170 happy_var_1) -> + ( fmap (reLoc. (fmap (\b -> (dataConBuilderCon b,+ dataConBuilderDetails b))))+ (runPV happy_var_1))})+ ) (\r -> happyReturn (happyIn195 r))++happyReduce_463 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_463 = happySpecReduce_0 180# happyReduction_463+happyReduction_463 = happyIn196+ ([]+ )++happyReduce_464 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_464 = happySpecReduce_1 180# happyReduction_464+happyReduction_464 happy_x_1+ = case happyOut197 happy_x_1 of { (HappyWrap197 happy_var_1) -> + happyIn196+ (happy_var_1+ )}++happyReduce_465 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_465 = happyMonadReduce 3# 181# happyReduction_465+happyReduction_465 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut198 happy_x_1 of { (HappyWrap198 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut197 happy_x_3 of { (HappyWrap197 happy_var_3) -> + ( do { h <- addTrailingCommaA happy_var_1 (gl happy_var_2)+ ; return (h : happy_var_3) })}}})+ ) (\r -> happyReturn (happyIn197 r))++happyReduce_466 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_466 = happySpecReduce_1 181# happyReduction_466+happyReduction_466 happy_x_1+ = case happyOut198 happy_x_1 of { (HappyWrap198 happy_var_1) -> + happyIn197+ ([happy_var_1]+ )}++happyReduce_467 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_467 = happyMonadReduce 3# 182# happyReduction_467+happyReduction_467 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut160 happy_x_1 of { (HappyWrap160 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut165 happy_x_3 of { (HappyWrap165 happy_var_3) -> + ( acsA (\cs -> L (comb2 happy_var_1 (reLoc happy_var_3))+ (ConDeclField (EpAnn (glR happy_var_1) [mu AnnDcolon happy_var_2] cs)+ (reverse (map (\ln@(L l n) -> L (l2l l) $ FieldOcc noExtField ln) (unLoc happy_var_1))) happy_var_3 Nothing)))}}})+ ) (\r -> happyReturn (happyIn198 r))++happyReduce_468 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_468 = happySpecReduce_0 183# happyReduction_468+happyReduction_468 = happyIn199+ (noLoc []+ )++happyReduce_469 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_469 = happySpecReduce_1 183# happyReduction_469+happyReduction_469 happy_x_1+ = case happyOut200 happy_x_1 of { (HappyWrap200 happy_var_1) -> + happyIn199+ (happy_var_1+ )}++happyReduce_470 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_470 = happySpecReduce_2 184# happyReduction_470+happyReduction_470 happy_x_2+ happy_x_1+ = case happyOut200 happy_x_1 of { (HappyWrap200 happy_var_1) -> + case happyOut201 happy_x_2 of { (HappyWrap201 happy_var_2) -> + happyIn200+ (sLL happy_var_1 (reLoc happy_var_2) (happy_var_2 : unLoc happy_var_1)+ )}}++happyReduce_471 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_471 = happySpecReduce_1 184# happyReduction_471+happyReduction_471 happy_x_1+ = case happyOut201 happy_x_1 of { (HappyWrap201 happy_var_1) -> + happyIn200+ (sL1 (reLoc happy_var_1) [happy_var_1]+ )}++happyReduce_472 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_472 = happyMonadReduce 2# 185# happyReduction_472+happyReduction_472 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut202 happy_x_2 of { (HappyWrap202 happy_var_2) -> + ( let { full_loc = comb2A happy_var_1 happy_var_2 }+ in acsA (\cs -> L full_loc $ HsDerivingClause (EpAnn (glR happy_var_1) [mj AnnDeriving happy_var_1] cs) Nothing happy_var_2))}})+ ) (\r -> happyReturn (happyIn201 r))++happyReduce_473 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_473 = happyMonadReduce 3# 185# happyReduction_473+happyReduction_473 (happy_x_3 `HappyStk`+ 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 { (HappyWrap89 happy_var_2) -> + case happyOut202 happy_x_3 of { (HappyWrap202 happy_var_3) -> + ( let { full_loc = comb2A happy_var_1 happy_var_3 }+ in acsA (\cs -> L full_loc $ HsDerivingClause (EpAnn (glR happy_var_1) [mj AnnDeriving happy_var_1] cs) (Just happy_var_2) happy_var_3))}}})+ ) (\r -> happyReturn (happyIn201 r))++happyReduce_474 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_474 = happyMonadReduce 3# 185# happyReduction_474+happyReduction_474 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut202 happy_x_2 of { (HappyWrap202 happy_var_2) -> + case happyOut90 happy_x_3 of { (HappyWrap90 happy_var_3) -> + ( let { full_loc = comb2 happy_var_1 (reLoc happy_var_3) }+ in acsA (\cs -> L full_loc $ HsDerivingClause (EpAnn (glR happy_var_1) [mj AnnDeriving happy_var_1] cs) (Just happy_var_3) happy_var_2))}}})+ ) (\r -> happyReturn (happyIn201 r))++happyReduce_475 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_475 = happySpecReduce_1 186# happyReduction_475+happyReduction_475 happy_x_1+ = case happyOut288 happy_x_1 of { (HappyWrap288 happy_var_1) -> + happyIn202+ (let { tc = sL1 (reLocL happy_var_1) $ mkHsImplicitSigType $+ sL1 (reLocL happy_var_1) $ HsTyVar noAnn NotPromoted happy_var_1 } in+ sL1 (reLocC happy_var_1) (DctSingle noExtField tc)+ )}++happyReduce_476 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_476 = happyMonadReduce 2# 186# happyReduction_476+happyReduction_476 (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 -> + ( amsrc (sLL happy_var_1 happy_var_2 (DctMulti noExtField []))+ (AnnContext Nothing [glAA happy_var_1] [glAA happy_var_2]))}})+ ) (\r -> happyReturn (happyIn202 r))++happyReduce_477 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_477 = happyMonadReduce 3# 186# 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 happyOut176 happy_x_2 of { (HappyWrap176 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrc (sLL happy_var_1 happy_var_3 (DctMulti noExtField happy_var_2))+ (AnnContext Nothing [glAA happy_var_1] [glAA happy_var_3]))}}})+ ) (\r -> happyReturn (happyIn202 r))++happyReduce_478 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_478 = happySpecReduce_1 187# happyReduction_478+happyReduction_478 happy_x_1+ = case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> + happyIn203+ (happy_var_1+ )}++happyReduce_479 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_479 = happyMonadReduce 3# 187# happyReduction_479+happyReduction_479 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> + case happyOut156 happy_x_2 of { (HappyWrap156 happy_var_2) -> + case happyOut205 happy_x_3 of { (HappyWrap205 happy_var_3) -> + ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->+ do { let { l = comb2Al happy_var_1 happy_var_3 }+ ; r <- checkValDef l happy_var_1 happy_var_2 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]+ ; cs <- getCommentsFor l+ ; return $! (sL (commentsA l cs) $ ValD noExtField r) })}}})+ ) (\r -> happyReturn (happyIn203 r))++happyReduce_480 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_480 = happySpecReduce_1 187# happyReduction_480+happyReduction_480 happy_x_1+ = case happyOut117 happy_x_1 of { (HappyWrap117 happy_var_1) -> + happyIn203+ (happy_var_1+ )}++happyReduce_481 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_481 = happySpecReduce_1 188# happyReduction_481+happyReduction_481 happy_x_1+ = case happyOut203 happy_x_1 of { (HappyWrap203 happy_var_1) -> + happyIn204+ (happy_var_1+ )}++happyReduce_482 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_482 = happyMonadReduce 1# 188# happyReduction_482+happyReduction_482 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> + ( mkSpliceDecl happy_var_1)})+ ) (\r -> happyReturn (happyIn204 r))++happyReduce_483 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_483 = happyMonadReduce 3# 189# happyReduction_483+happyReduction_483 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut212 happy_x_2 of { (HappyWrap212 happy_var_2) -> + case happyOut135 happy_x_3 of { (HappyWrap135 happy_var_3) -> + ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->+ do { let L l (bs, csw) = adaptWhereBinds happy_var_3+ ; let loc = (comb3 happy_var_1 (reLoc happy_var_2) (L l bs))+ ; acs (\cs ->+ sL loc (GRHSs csw (unguardedRHS (EpAnn (anc $ rs loc) (GrhsAnn Nothing (mj AnnEqual happy_var_1)) cs) loc happy_var_2)+ bs)) })}}})+ ) (\r -> happyReturn (happyIn205 r))++happyReduce_484 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_484 = happyMonadReduce 2# 189# happyReduction_484+happyReduction_484 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut206 happy_x_1 of { (HappyWrap206 happy_var_1) -> + case happyOut135 happy_x_2 of { (HappyWrap135 happy_var_2) -> + ( do { let {L l (bs, csw) = adaptWhereBinds happy_var_2}+ ; acs (\cs -> sL (comb2 happy_var_1 (L l bs))+ (GRHSs (cs Semi.<> csw) (reverse (unLoc happy_var_1)) bs)) })}})+ ) (\r -> happyReturn (happyIn205 r))++happyReduce_485 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_485 = happySpecReduce_2 190# happyReduction_485+happyReduction_485 happy_x_2+ happy_x_1+ = case happyOut206 happy_x_1 of { (HappyWrap206 happy_var_1) -> + case happyOut207 happy_x_2 of { (HappyWrap207 happy_var_2) -> + happyIn206+ (sLL happy_var_1 (reLoc happy_var_2) (happy_var_2 : unLoc happy_var_1)+ )}}++happyReduce_486 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_486 = happySpecReduce_1 190# happyReduction_486+happyReduction_486 happy_x_1+ = case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> + happyIn206+ (sL1 (reLoc happy_var_1) [happy_var_1]+ )}++happyReduce_487 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_487 = happyMonadReduce 4# 191# happyReduction_487+happyReduction_487 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut240 happy_x_2 of { (HappyWrap240 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut212 happy_x_4 of { (HappyWrap212 happy_var_4) -> + ( runPV (unECP happy_var_4) >>= \ happy_var_4 ->+ acsA (\cs -> sL (comb2A happy_var_1 happy_var_4) $ GRHS (EpAnn (glR happy_var_1) (GrhsAnn (Just $ glAA happy_var_1) (mj AnnEqual happy_var_3)) cs) (unLoc happy_var_2) happy_var_4))}}}})+ ) (\r -> happyReturn (happyIn207 r))++happyReduce_488 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_488 = happyMonadReduce 3# 192# happyReduction_488+happyReduction_488 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut159 happy_x_3 of { (HappyWrap159 happy_var_3) -> + ( do { happy_var_1 <- runPV (unECP happy_var_1)+ ; v <- checkValSigLhs happy_var_1+ ; acsA (\cs -> (sLLAl happy_var_1 (reLoc happy_var_3) $ SigD noExtField $+ TypeSig (EpAnn (glAR happy_var_1) (AnnSig (mu AnnDcolon happy_var_2) []) cs) [v] (mkHsWildCardBndrs happy_var_3)))})}}})+ ) (\r -> happyReturn (happyIn208 r))++happyReduce_489 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_489 = happyMonadReduce 5# 192# happyReduction_489+happyReduction_489 (happy_x_5 `HappyStk`+ happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut160 happy_x_3 of { (HappyWrap160 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + case happyOut159 happy_x_5 of { (HappyWrap159 happy_var_5) -> + ( do { v <- addTrailingCommaN happy_var_1 (gl happy_var_2)+ ; let sig cs = TypeSig (EpAnn (glNR happy_var_1) (AnnSig (mu AnnDcolon happy_var_4) []) cs) (v : reverse (unLoc happy_var_3))+ (mkHsWildCardBndrs happy_var_5)+ ; acsA (\cs -> sLL (reLocN happy_var_1) (reLoc happy_var_5) $ SigD noExtField (sig cs) ) })}}}}})+ ) (\r -> happyReturn (happyIn208 r))++happyReduce_490 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_490 = happyMonadReduce 3# 192# happyReduction_490+happyReduction_490 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut75 happy_x_1 of { (HappyWrap75 happy_var_1) -> + case happyOut74 happy_x_2 of { (HappyWrap74 happy_var_2) -> + case happyOut76 happy_x_3 of { (HappyWrap76 happy_var_3) -> + ( do { mbPrecAnn <- traverse (\l2 -> do { checkPrecP l2 happy_var_3+ ; pure (mj AnnVal l2) })+ happy_var_2+ ; let (fixText, fixPrec) = case happy_var_2 of+ -- If an explicit precedence isn't supplied,+ -- it defaults to maxPrecedence+ Nothing -> (NoSourceText, maxPrecedence)+ Just l2 -> (fst $ unLoc l2, snd $ unLoc l2)+ ; acsA (\cs -> sLL happy_var_1 happy_var_3 $ SigD noExtField+ (FixSig (EpAnn (glR happy_var_1) (mj AnnInfix happy_var_1 : maybeToList mbPrecAnn) cs) (FixitySig noExtField (fromOL $ unLoc happy_var_3)+ (Fixity fixText fixPrec (unLoc happy_var_1)))))+ })}}})+ ) (\r -> happyReturn (happyIn208 r))++happyReduce_491 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_491 = happySpecReduce_1 192# happyReduction_491+happyReduction_491 happy_x_1+ = case happyOut122 happy_x_1 of { (HappyWrap122 happy_var_1) -> + happyIn208+ (sL1 happy_var_1 . SigD noExtField . unLoc $ happy_var_1+ )}++happyReduce_492 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_492 = happyMonadReduce 4# 192# happyReduction_492+happyReduction_492 (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 happyOut278 happy_x_2 of { (HappyWrap278 happy_var_2) -> + case happyOut157 happy_x_3 of { (HappyWrap157 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + ( let (dcolon, tc) = happy_var_3+ in acsA+ (\cs -> sLL happy_var_1 happy_var_4+ (SigD noExtField (CompleteMatchSig ((EpAnn (glR happy_var_1) ([ mo happy_var_1 ] ++ dcolon ++ [mc happy_var_4]) cs), (getCOMPLETE_PRAGs happy_var_1)) happy_var_2 tc))))}}}})+ ) (\r -> happyReturn (happyIn208 r))++happyReduce_493 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_493 = happyMonadReduce 4# 192# happyReduction_493+happyReduction_493 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> + case happyOut123 happy_x_3 of { (HappyWrap123 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + ( acsA (\cs -> (sLL happy_var_1 happy_var_4 $ SigD noExtField (InlineSig (EpAnn (glR happy_var_1) ((mo happy_var_1:fst happy_var_2) ++ [mc happy_var_4]) cs) happy_var_3+ (mkInlinePragma (getINLINE_PRAGs happy_var_1) (getINLINE happy_var_1)+ (snd happy_var_2))))))}}}})+ ) (\r -> happyReturn (happyIn208 r))++happyReduce_494 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_494 = happyMonadReduce 3# 192# happyReduction_494+happyReduction_494 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut304 happy_x_2 of { (HappyWrap304 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( acsA (\cs -> (sLL happy_var_1 happy_var_3 $ SigD noExtField (InlineSig (EpAnn (glR happy_var_1) [mo happy_var_1, mc happy_var_3] cs) happy_var_2+ (mkOpaquePragma (getOPAQUE_PRAGs happy_var_1))))))}}})+ ) (\r -> happyReturn (happyIn208 r))++happyReduce_495 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_495 = happyMonadReduce 3# 192# happyReduction_495+happyReduction_495 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut304 happy_x_2 of { (HappyWrap304 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_3 (SigD noExtField (SCCFunSig ((EpAnn (glR happy_var_1) [mo happy_var_1, mc happy_var_3] cs), (getSCC_PRAGs happy_var_1)) happy_var_2 Nothing))))}}})+ ) (\r -> happyReturn (happyIn208 r))++happyReduce_496 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_496 = happyMonadReduce 4# 192# happyReduction_496+happyReduction_496 (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 happyOut304 happy_x_2 of { (HappyWrap304 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 Nothing+ ; acsA (\cs -> sLL happy_var_1 happy_var_4 (SigD noExtField (SCCFunSig ((EpAnn (glR happy_var_1) [mo happy_var_1, mc happy_var_4] cs), (getSCC_PRAGs happy_var_1)) happy_var_2 (Just ( sL1a happy_var_3 str_lit))))) })}}}})+ ) (\r -> happyReturn (happyIn208 r))++happyReduce_497 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_497 = happyMonadReduce 6# 192# happyReduction_497+happyReduction_497 (happy_x_6 `HappyStk`+ happy_x_5 `HappyStk`+ happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> + case happyOut304 happy_x_3 of { (HappyWrap304 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + case happyOut161 happy_x_5 of { (HappyWrap161 happy_var_5) -> + case happyOutTok happy_x_6 of { happy_var_6 -> + ( acsA (\cs ->+ let inl_prag = mkInlinePragma (getSPEC_PRAGs happy_var_1)+ (NoUserInlinePrag, FunLike) (snd happy_var_2)+ in sLL happy_var_1 happy_var_6 $ SigD noExtField (SpecSig (EpAnn (glR happy_var_1) (mo happy_var_1:mu AnnDcolon happy_var_4:mc happy_var_6:(fst happy_var_2)) cs) happy_var_3 (fromOL happy_var_5) inl_prag)))}}}}}})+ ) (\r -> happyReturn (happyIn208 r))++happyReduce_498 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_498 = happyMonadReduce 6# 192# happyReduction_498+happyReduction_498 (happy_x_6 `HappyStk`+ happy_x_5 `HappyStk`+ happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> + case happyOut304 happy_x_3 of { (HappyWrap304 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + case happyOut161 happy_x_5 of { (HappyWrap161 happy_var_5) -> + case happyOutTok happy_x_6 of { happy_var_6 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_6 $ SigD noExtField (SpecSig (EpAnn (glR happy_var_1) (mo happy_var_1:mu AnnDcolon happy_var_4:mc happy_var_6:(fst happy_var_2)) cs) happy_var_3 (fromOL happy_var_5)+ (mkInlinePragma (getSPEC_INLINE_PRAGs happy_var_1)+ (getSPEC_INLINE happy_var_1) (snd happy_var_2)))))}}}}}})+ ) (\r -> happyReturn (happyIn208 r))++happyReduce_499 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_499 = happyMonadReduce 4# 192# 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 happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut175 happy_x_3 of { (HappyWrap175 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_4+ $ SigD noExtField (SpecInstSig ((EpAnn (glR happy_var_1) [mo happy_var_1,mj AnnInstance happy_var_2,mc happy_var_4] cs), (getSPEC_PRAGs happy_var_1)) happy_var_3)))}}}})+ ) (\r -> happyReturn (happyIn208 r))++happyReduce_500 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_500 = happyMonadReduce 3# 192# happyReduction_500+happyReduction_500 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut266 happy_x_2 of { (HappyWrap266 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( acsA (\cs -> sLL happy_var_1 happy_var_3 $ SigD noExtField (MinimalSig ((EpAnn (glR happy_var_1) [mo happy_var_1,mc happy_var_3] cs), (getMINIMAL_PRAGs happy_var_1)) happy_var_2)))}}})+ ) (\r -> happyReturn (happyIn208 r))++happyReduce_501 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_501 = happySpecReduce_0 193# happyReduction_501+happyReduction_501 = happyIn209+ (([],Nothing)+ )++happyReduce_502 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_502 = happySpecReduce_1 193# happyReduction_502+happyReduction_502 happy_x_1+ = case happyOut210 happy_x_1 of { (HappyWrap210 happy_var_1) -> + happyIn209+ ((fst happy_var_1,Just (snd happy_var_1))+ )}++happyReduce_503 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_503 = happySpecReduce_3 194# happyReduction_503+happyReduction_503 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 -> + happyIn210+ (([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_504 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_504 = happyReduce 4# 194# happyReduction_504+happyReduction_504 (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 happyOut139 happy_x_2 of { (HappyWrap139 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOutTok happy_x_4 of { happy_var_4 -> + happyIn210+ ((happy_var_2++[mj AnnOpenS happy_var_1,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_505 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_505 = happySpecReduce_1 195# happyReduction_505+happyReduction_505 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn211+ (let { loc = getLoc happy_var_1+ ; ITquasiQuote (quoter, quote, quoteSpan) = unLoc happy_var_1+ ; quoterId = mkUnqual varName quoter }+ in sL1 happy_var_1 (HsQuasiQuote noExtField quoterId (L (noAnnSrcSpan (mkSrcSpanPs quoteSpan)) quote))+ )}++happyReduce_506 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_506 = happySpecReduce_1 195# happyReduction_506+happyReduction_506 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn211+ (let { loc = getLoc happy_var_1+ ; ITqQuasiQuote (qual, quoter, quote, quoteSpan) = unLoc happy_var_1+ ; quoterId = mkQual varName (qual, quoter) }+ in sL1 happy_var_1 (HsQuasiQuote noExtField quoterId (L (noAnnSrcSpan (mkSrcSpanPs quoteSpan)) quote))+ )}++happyReduce_507 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_507 = happySpecReduce_3 196# happyReduction_507+happyReduction_507 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut165 happy_x_3 of { (HappyWrap165 happy_var_3) -> + happyIn212+ (ECP $+ unECP happy_var_1 >>= \ happy_var_1 ->+ rejectPragmaPV happy_var_1 >>+ mkHsTySigPV (noAnnSrcSpan $ comb2Al happy_var_1 (reLoc happy_var_3)) happy_var_1 happy_var_3+ [(mu AnnDcolon happy_var_2)]+ )}}}++happyReduce_508 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_508 = happyMonadReduce 3# 196# happyReduction_508+happyReduction_508 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut212 happy_x_3 of { (HappyWrap212 happy_var_3) -> + ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->+ runPV (unECP happy_var_3) >>= \ happy_var_3 ->+ fmap ecpFromCmd $+ acsA (\cs -> sLLAA happy_var_1 happy_var_3 $ HsCmdArrApp (EpAnn (glAR happy_var_1) (mu Annlarrowtail happy_var_2) cs) happy_var_1 happy_var_3+ HsFirstOrderApp True))}}})+ ) (\r -> happyReturn (happyIn212 r))++happyReduce_509 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_509 = happyMonadReduce 3# 196# happyReduction_509+happyReduction_509 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut212 happy_x_3 of { (HappyWrap212 happy_var_3) -> + ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->+ runPV (unECP happy_var_3) >>= \ happy_var_3 ->+ fmap ecpFromCmd $+ acsA (\cs -> sLLAA happy_var_1 happy_var_3 $ HsCmdArrApp (EpAnn (glAR happy_var_1) (mu Annrarrowtail happy_var_2) cs) happy_var_3 happy_var_1+ HsFirstOrderApp False))}}})+ ) (\r -> happyReturn (happyIn212 r))++happyReduce_510 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_510 = happyMonadReduce 3# 196# happyReduction_510+happyReduction_510 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut212 happy_x_3 of { (HappyWrap212 happy_var_3) -> + ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->+ runPV (unECP happy_var_3) >>= \ happy_var_3 ->+ fmap ecpFromCmd $+ acsA (\cs -> sLLAA happy_var_1 happy_var_3 $ HsCmdArrApp (EpAnn (glAR happy_var_1) (mu AnnLarrowtail happy_var_2) cs) happy_var_1 happy_var_3+ HsHigherOrderApp True))}}})+ ) (\r -> happyReturn (happyIn212 r))++happyReduce_511 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_511 = happyMonadReduce 3# 196# happyReduction_511+happyReduction_511 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut212 happy_x_3 of { (HappyWrap212 happy_var_3) -> + ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->+ runPV (unECP happy_var_3) >>= \ happy_var_3 ->+ fmap ecpFromCmd $+ acsA (\cs -> sLLAA happy_var_1 happy_var_3 $ HsCmdArrApp (EpAnn (glAR happy_var_1) (mu AnnRarrowtail happy_var_2) cs) happy_var_3 happy_var_1+ HsHigherOrderApp False))}}})+ ) (\r -> happyReturn (happyIn212 r))++happyReduce_512 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_512 = happySpecReduce_1 196# happyReduction_512+happyReduction_512 happy_x_1+ = case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> + happyIn212+ (happy_var_1+ )}++happyReduce_513 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_513 = happySpecReduce_1 196# happyReduction_513+happyReduction_513 happy_x_1+ = case happyOut327 happy_x_1 of { (HappyWrap327 happy_var_1) -> + happyIn212+ (happy_var_1+ )}++happyReduce_514 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_514 = happySpecReduce_1 197# happyReduction_514+happyReduction_514 happy_x_1+ = case happyOut215 happy_x_1 of { (HappyWrap215 happy_var_1) -> + happyIn213+ (happy_var_1+ )}++happyReduce_515 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_515 = happySpecReduce_3 197# happyReduction_515+happyReduction_515 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> + case happyOut295 happy_x_2 of { (HappyWrap295 happy_var_2) -> + case happyOut214 happy_x_3 of { (HappyWrap214 happy_var_3) -> + happyIn213+ (ECP $+ superInfixOp $+ happy_var_2 >>= \ happy_var_2 ->+ unECP happy_var_1 >>= \ happy_var_1 ->+ unECP happy_var_3 >>= \ happy_var_3 ->+ rejectPragmaPV happy_var_1 >>+ (mkHsOpAppPV (comb2A (reLoc happy_var_1) happy_var_3) happy_var_1 happy_var_2 happy_var_3)+ )}}}++happyReduce_516 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_516 = happySpecReduce_1 198# happyReduction_516+happyReduction_516 happy_x_1+ = case happyOut215 happy_x_1 of { (HappyWrap215 happy_var_1) -> + happyIn214+ (happy_var_1+ )}++happyReduce_517 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_517 = happySpecReduce_1 198# happyReduction_517+happyReduction_517 happy_x_1+ = case happyOut328 happy_x_1 of { (HappyWrap328 happy_var_1) -> + happyIn214+ (happy_var_1+ )}++happyReduce_518 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_518 = happySpecReduce_2 199# happyReduction_518+happyReduction_518 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut218 happy_x_2 of { (HappyWrap218 happy_var_2) -> + happyIn215+ (ECP $+ unECP happy_var_2 >>= \ happy_var_2 ->+ mkHsNegAppPV (comb2A happy_var_1 happy_var_2) happy_var_2+ [mj AnnMinus happy_var_1]+ )}}++happyReduce_519 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_519 = happySpecReduce_1 199# happyReduction_519+happyReduction_519 happy_x_1+ = case happyOut218 happy_x_1 of { (HappyWrap218 happy_var_1) -> + happyIn215+ (happy_var_1+ )}++happyReduce_520 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_520 = happySpecReduce_1 200# happyReduction_520+happyReduction_520 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn216+ ((msemim happy_var_1,True)+ )}++happyReduce_521 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_521 = happySpecReduce_0 200# happyReduction_521+happyReduction_521 = happyIn216+ ((Nothing,False)+ )++happyReduce_522 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_522 = happyMonadReduce 3# 201# happyReduction_522+happyReduction_522 (happy_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+ ; acs (\cs -> (sLL happy_var_1 happy_var_3+ (HsPragSCC+ ((EpAnn (glR happy_var_1) (AnnPragma (mo happy_var_1) (mc happy_var_3) [mj AnnValStr happy_var_2]) cs),+ (getSCC_PRAGs happy_var_1))+ (StringLiteral (getSTRINGs happy_var_2) scc Nothing))))})}}})+ ) (\r -> happyReturn (happyIn217 r))++happyReduce_523 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_523 = happyMonadReduce 3# 201# happyReduction_523+happyReduction_523 (happy_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 -> + ( acs (\cs -> (sLL happy_var_1 happy_var_3+ (HsPragSCC+ ((EpAnn (glR happy_var_1) (AnnPragma (mo happy_var_1) (mc happy_var_3) [mj AnnVal happy_var_2]) cs),+ (getSCC_PRAGs happy_var_1))+ (StringLiteral NoSourceText (getVARID happy_var_2) Nothing)))))}}})+ ) (\r -> happyReturn (happyIn217 r))++happyReduce_524 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_524 = happySpecReduce_2 202# happyReduction_524+happyReduction_524 happy_x_2+ happy_x_1+ = case happyOut218 happy_x_1 of { (HappyWrap218 happy_var_1) -> + case happyOut219 happy_x_2 of { (HappyWrap219 happy_var_2) -> + happyIn218+ (ECP $+ superFunArg $+ unECP happy_var_1 >>= \ happy_var_1 ->+ unECP happy_var_2 >>= \ happy_var_2 ->+ mkHsAppPV (noAnnSrcSpan $ comb2A (reLoc happy_var_1) happy_var_2) happy_var_1 happy_var_2+ )}}++happyReduce_525 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_525 = happySpecReduce_3 202# happyReduction_525+happyReduction_525 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut218 happy_x_1 of { (HappyWrap218 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut174 happy_x_3 of { (HappyWrap174 happy_var_3) -> + happyIn218+ (ECP $+ unECP happy_var_1 >>= \ happy_var_1 ->+ mkHsAppTypePV (noAnnSrcSpan $ comb2 (reLoc happy_var_1) (reLoc happy_var_3)) happy_var_1 (hsTok happy_var_2) happy_var_3+ )}}}++happyReduce_526 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_526 = happyMonadReduce 2# 202# happyReduction_526+happyReduction_526 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut219 happy_x_2 of { (HappyWrap219 happy_var_2) -> + ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->+ fmap ecpFromExp $+ acsA (\cs -> sLL happy_var_1 (reLoc happy_var_2) $ HsStatic (EpAnn (glR happy_var_1) [mj AnnStatic happy_var_1] cs) happy_var_2))}})+ ) (\r -> happyReturn (happyIn218 r))++happyReduce_527 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_527 = happySpecReduce_1 202# happyReduction_527+happyReduction_527 happy_x_1+ = case happyOut219 happy_x_1 of { (HappyWrap219 happy_var_1) -> + happyIn218+ (happy_var_1+ )}++happyReduce_528 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_528 = happySpecReduce_3 203# happyReduction_528+happyReduction_528 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut304 happy_x_1 of { (HappyWrap304 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut219 happy_x_3 of { (HappyWrap219 happy_var_3) -> + happyIn219+ (ECP $+ unECP happy_var_3 >>= \ happy_var_3 ->+ mkHsAsPatPV (comb2 (reLocN happy_var_1) (reLoc happy_var_3)) happy_var_1 (hsTok happy_var_2) happy_var_3+ )}}}++happyReduce_529 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_529 = happySpecReduce_2 203# happyReduction_529+happyReduction_529 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut219 happy_x_2 of { (HappyWrap219 happy_var_2) -> + happyIn219+ (ECP $+ unECP happy_var_2 >>= \ happy_var_2 ->+ mkHsLazyPatPV (comb2 happy_var_1 (reLoc happy_var_2)) happy_var_2 [mj AnnTilde happy_var_1]+ )}}++happyReduce_530 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_530 = happySpecReduce_2 203# happyReduction_530+happyReduction_530 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut219 happy_x_2 of { (HappyWrap219 happy_var_2) -> + happyIn219+ (ECP $+ unECP happy_var_2 >>= \ happy_var_2 ->+ mkHsBangPatPV (comb2 happy_var_1 (reLoc happy_var_2)) happy_var_2 [mj AnnBang happy_var_1]+ )}}++happyReduce_531 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_531 = happySpecReduce_2 203# happyReduction_531+happyReduction_531 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut219 happy_x_2 of { (HappyWrap219 happy_var_2) -> + happyIn219+ (ECP $+ unECP happy_var_2 >>= \ happy_var_2 ->+ mkHsNegAppPV (comb2A happy_var_1 happy_var_2) happy_var_2 [mj AnnMinus happy_var_1]+ )}}++happyReduce_532 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_532 = happyReduce 4# 203# happyReduction_532+happyReduction_532 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut251 happy_x_2 of { (HappyWrap251 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut212 happy_x_4 of { (HappyWrap212 happy_var_4) -> + happyIn219+ (ECP $+ unECP happy_var_4 >>= \ happy_var_4 ->+ mkHsLamPV (comb2 happy_var_1 (reLoc happy_var_4)) (\cs -> mkMatchGroup FromSource+ (reLocA $ sLLlA happy_var_1 happy_var_4+ [reLocA $ sLLlA happy_var_1 happy_var_4+ $ Match { m_ext = EpAnn (glR happy_var_1) [mj AnnLam happy_var_1] cs+ , m_ctxt = LambdaExpr+ , m_pats = happy_var_2+ , m_grhss = unguardedGRHSs (comb2 happy_var_3 (reLoc happy_var_4)) happy_var_4 (EpAnn (glR happy_var_3) (GrhsAnn Nothing (mu AnnRarrow happy_var_3)) emptyComments) }]))+ ) `HappyStk` happyRest}}}}++happyReduce_533 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_533 = happyReduce 4# 203# happyReduction_533+happyReduction_533 (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 happyOut134 happy_x_2 of { (HappyWrap134 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut212 happy_x_4 of { (HappyWrap212 happy_var_4) -> + happyIn219+ (ECP $+ unECP happy_var_4 >>= \ happy_var_4 ->+ mkHsLetPV (comb2A happy_var_1 happy_var_4) (hsTok happy_var_1) (unLoc happy_var_2) (hsTok happy_var_3) happy_var_4+ ) `HappyStk` happyRest}}}}++happyReduce_534 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_534 = happySpecReduce_3 203# happyReduction_534+happyReduction_534 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 happyOut326 happy_x_3 of { (HappyWrap326 happy_var_3) -> + happyIn219+ (ECP $ happy_var_3 >>= \ happy_var_3 ->+ mkHsLamCasePV (comb2 happy_var_1 (reLoc happy_var_3)) LamCase happy_var_3 [mj AnnLam happy_var_1,mj AnnCase happy_var_2]+ )}}}++happyReduce_535 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_535 = happySpecReduce_3 203# happyReduction_535+happyReduction_535 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 happyOut325 happy_x_3 of { (HappyWrap325 happy_var_3) -> + happyIn219+ (ECP $ happy_var_3 >>= \ happy_var_3 ->+ mkHsLamCasePV (comb2 happy_var_1 (reLoc happy_var_3)) LamCases happy_var_3 [mj AnnLam happy_var_1,mj AnnCases happy_var_2]+ )}}}++happyReduce_536 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_536 = happyMonadReduce 8# 203# happyReduction_536+happyReduction_536 (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 happyOut212 happy_x_2 of { (HappyWrap212 happy_var_2) -> + case happyOut216 happy_x_3 of { (HappyWrap216 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + case happyOut212 happy_x_5 of { (HappyWrap212 happy_var_5) -> + case happyOut216 happy_x_6 of { (HappyWrap216 happy_var_6) -> + case happyOutTok happy_x_7 of { happy_var_7 -> + case happyOut212 happy_x_8 of { (HappyWrap212 happy_var_8) -> + ( runPV (unECP happy_var_2) >>= \ (happy_var_2 :: LHsExpr GhcPs) ->+ return $ ECP $+ unECP happy_var_5 >>= \ happy_var_5 ->+ unECP happy_var_8 >>= \ happy_var_8 ->+ mkHsIfPV (comb2A happy_var_1 happy_var_8) happy_var_2 (snd happy_var_3) happy_var_5 (snd happy_var_6) happy_var_8+ (AnnsIf+ { aiIf = glAA happy_var_1+ , aiThen = glAA happy_var_4+ , aiElse = glAA happy_var_7+ , aiThenSemi = fst happy_var_3+ , aiElseSemi = fst happy_var_6}))}}}}}}}})+ ) (\r -> happyReturn (happyIn219 r))++happyReduce_537 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_537 = happyMonadReduce 2# 203# happyReduction_537+happyReduction_537 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut245 happy_x_2 of { (HappyWrap245 happy_var_2) -> + ( hintMultiWayIf (getLoc happy_var_1) >>= \_ ->+ fmap ecpFromExp $+ acsA (\cs -> sLL happy_var_1 happy_var_2 $ HsMultiIf (EpAnn (glR happy_var_1) (mj AnnIf happy_var_1:(fst $ unLoc happy_var_2)) cs)+ (reverse $ snd $ unLoc happy_var_2)))}})+ ) (\r -> happyReturn (happyIn219 r))++happyReduce_538 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_538 = happyMonadReduce 4# 203# happyReduction_538+happyReduction_538 (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 happyOut212 happy_x_2 of { (HappyWrap212 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut326 happy_x_4 of { (HappyWrap326 happy_var_4) -> + ( runPV (unECP happy_var_2) >>= \ (happy_var_2 :: LHsExpr GhcPs) ->+ return $ ECP $+ happy_var_4 >>= \ happy_var_4 ->+ mkHsCasePV (comb3 happy_var_1 happy_var_3 (reLoc happy_var_4)) happy_var_2 happy_var_4+ (EpAnnHsCase (glAA happy_var_1) (glAA happy_var_3) []))}}}})+ ) (\r -> happyReturn (happyIn219 r))++happyReduce_539 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_539 = happyMonadReduce 2# 203# 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 happyOut252 happy_x_2 of { (HappyWrap252 happy_var_2) -> + ( do+ hintQualifiedDo happy_var_1+ return $ ECP $+ happy_var_2 >>= \ happy_var_2 ->+ mkHsDoPV (comb2A happy_var_1 happy_var_2)+ (fmap mkModuleNameFS (getDO happy_var_1))+ happy_var_2+ (AnnList (Just $ glAR happy_var_2) Nothing Nothing [mj AnnDo happy_var_1] []))}})+ ) (\r -> happyReturn (happyIn219 r))++happyReduce_540 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_540 = happyMonadReduce 2# 203# 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 happyOut252 happy_x_2 of { (HappyWrap252 happy_var_2) -> + ( hintQualifiedDo happy_var_1 >> runPV happy_var_2 >>= \ happy_var_2 ->+ fmap ecpFromExp $+ acsA (\cs -> L (comb2A happy_var_1 happy_var_2)+ (mkHsDoAnns (MDoExpr $+ fmap mkModuleNameFS (getMDO happy_var_1))+ happy_var_2+ (EpAnn (glR happy_var_1) (AnnList (Just $ glAR happy_var_2) Nothing Nothing [mj AnnMdo happy_var_1] []) cs) )))}})+ ) (\r -> happyReturn (happyIn219 r))++happyReduce_541 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_541 = happyMonadReduce 4# 203# happyReduction_541+happyReduction_541 (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 happyOut219 happy_x_2 of { (HappyWrap219 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut212 happy_x_4 of { (HappyWrap212 happy_var_4) -> + ( (checkPattern <=< runPV) (unECP happy_var_2) >>= \ p ->+ runPV (unECP happy_var_4) >>= \ happy_var_4@cmd ->+ fmap ecpFromExp $+ acsA (\cs -> sLLlA happy_var_1 happy_var_4 $ HsProc (EpAnn (glR happy_var_1) [mj AnnProc happy_var_1,mu AnnRarrow happy_var_3] cs) p (sLLa happy_var_1 (reLoc happy_var_4) $ HsCmdTop noExtField cmd)))}}}})+ ) (\r -> happyReturn (happyIn219 r))++happyReduce_542 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_542 = happySpecReduce_1 203# happyReduction_542+happyReduction_542 happy_x_1+ = case happyOut220 happy_x_1 of { (HappyWrap220 happy_var_1) -> + happyIn219+ (happy_var_1+ )}++happyReduce_543 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_543 = happyReduce 4# 204# happyReduction_543+happyReduction_543 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOut220 happy_x_1 of { (HappyWrap220 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut258 happy_x_3 of { (HappyWrap258 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + happyIn220+ (ECP $+ getBit OverloadedRecordUpdateBit >>= \ overloaded ->+ unECP happy_var_1 >>= \ happy_var_1 ->+ happy_var_3 >>= \ happy_var_3 ->+ mkHsRecordPV overloaded (comb2 (reLoc happy_var_1) happy_var_4) (comb2 happy_var_2 happy_var_4) happy_var_1 happy_var_3+ [moc happy_var_2,mcc happy_var_4]+ ) `HappyStk` happyRest}}}}++happyReduce_544 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_544 = happyMonadReduce 3# 204# happyReduction_544+happyReduction_544 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut220 happy_x_1 of { (HappyWrap220 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut305 happy_x_3 of { (HappyWrap305 happy_var_3) -> + ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->+ fmap ecpFromExp $ acsa (\cs ->+ let fl = sLLa happy_var_2 (reLoc happy_var_3) (DotFieldOcc ((EpAnn (glR happy_var_2) (AnnFieldLabel (Just $ glAA happy_var_2)) emptyComments)) happy_var_3) in+ mkRdrGetField (noAnnSrcSpan $ comb2 (reLoc happy_var_1) (reLoc happy_var_3)) happy_var_1 fl (EpAnn (glAR happy_var_1) NoEpAnns cs)))}}})+ ) (\r -> happyReturn (happyIn220 r))++happyReduce_545 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_545 = happySpecReduce_1 204# happyReduction_545+happyReduction_545 happy_x_1+ = case happyOut221 happy_x_1 of { (HappyWrap221 happy_var_1) -> + happyIn220+ (happy_var_1+ )}++happyReduce_546 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_546 = happySpecReduce_1 205# happyReduction_546+happyReduction_546 happy_x_1+ = case happyOut304 happy_x_1 of { (HappyWrap304 happy_var_1) -> + happyIn221+ (ECP $ mkHsVarPV $! happy_var_1+ )}++happyReduce_547 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_547 = happySpecReduce_1 205# happyReduction_547+happyReduction_547 happy_x_1+ = case happyOut274 happy_x_1 of { (HappyWrap274 happy_var_1) -> + happyIn221+ (ECP $ mkHsVarPV $! happy_var_1+ )}++happyReduce_548 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_548 = happyMonadReduce 1# 205# happyReduction_548+happyReduction_548 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut264 happy_x_1 of { (HappyWrap264 happy_var_1) -> + ( acsExpr (\cs -> sL1a happy_var_1 (HsIPVar (comment (glRR happy_var_1) cs) $! unLoc happy_var_1)))})+ ) (\r -> happyReturn (happyIn221 r))++happyReduce_549 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_549 = happyMonadReduce 1# 205# happyReduction_549+happyReduction_549 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut265 happy_x_1 of { (HappyWrap265 happy_var_1) -> + ( acsExpr (\cs -> sL1a happy_var_1 (HsOverLabel (comment (glRR happy_var_1) cs) (fst $! unLoc happy_var_1) (snd $! unLoc happy_var_1))))})+ ) (\r -> happyReturn (happyIn221 r))++happyReduce_550 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_550 = happySpecReduce_1 205# happyReduction_550+happyReduction_550 happy_x_1+ = case happyOut319 happy_x_1 of { (HappyWrap319 happy_var_1) -> + happyIn221+ (ECP $ pvA (mkHsLitPV $! happy_var_1)+ )}++happyReduce_551 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_551 = happySpecReduce_1 205# happyReduction_551+happyReduction_551 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn221+ (ECP $ mkHsOverLitPV (sL1a happy_var_1 $ mkHsIntegral (getINTEGER happy_var_1))+ )}++happyReduce_552 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_552 = happySpecReduce_1 205# happyReduction_552+happyReduction_552 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn221+ (ECP $ mkHsOverLitPV (sL1a happy_var_1 $ mkHsFractional (getRATIONAL happy_var_1))+ )}++happyReduce_553 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_553 = happySpecReduce_3 205# happyReduction_553+happyReduction_553 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut230 happy_x_2 of { (HappyWrap230 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn221+ (ECP $+ unECP happy_var_2 >>= \ happy_var_2 ->+ mkHsParPV (comb2 happy_var_1 happy_var_3) (hsTok happy_var_1) happy_var_2 (hsTok happy_var_3)+ )}}}++happyReduce_554 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_554 = happySpecReduce_3 205# happyReduction_554+happyReduction_554 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut231 happy_x_2 of { (HappyWrap231 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn221+ (ECP $+ happy_var_2 >>= \ happy_var_2 ->+ mkSumOrTuplePV (noAnnSrcSpan $ comb2 happy_var_1 happy_var_3) Boxed happy_var_2+ [mop happy_var_1,mcp happy_var_3]+ )}}}++happyReduce_555 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_555 = happySpecReduce_3 205# happyReduction_555+happyReduction_555 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut222 happy_x_2 of { (HappyWrap222 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn221+ (ECP $+ acsA (\cs -> sLL happy_var_1 happy_var_3 $ mkRdrProjection (NE.reverse (unLoc happy_var_2)) (EpAnn (glR happy_var_1) (AnnProjection (glAA happy_var_1) (glAA happy_var_3)) cs))+ >>= ecpFromExp'+ )}}}++happyReduce_556 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_556 = happySpecReduce_3 205# happyReduction_556+happyReduction_556 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut230 happy_x_2 of { (HappyWrap230 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn221+ (ECP $+ unECP happy_var_2 >>= \ happy_var_2 ->+ mkSumOrTuplePV (noAnnSrcSpan $ comb2 happy_var_1 happy_var_3) Unboxed (Tuple [Right happy_var_2])+ [moh happy_var_1,mch happy_var_3]+ )}}}++happyReduce_557 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_557 = happySpecReduce_3 205# happyReduction_557+happyReduction_557 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut231 happy_x_2 of { (HappyWrap231 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn221+ (ECP $+ happy_var_2 >>= \ happy_var_2 ->+ mkSumOrTuplePV (noAnnSrcSpan $ comb2 happy_var_1 happy_var_3) Unboxed happy_var_2+ [moh happy_var_1,mch happy_var_3]+ )}}}++happyReduce_558 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_558 = happySpecReduce_3 205# happyReduction_558+happyReduction_558 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut234 happy_x_2 of { (HappyWrap234 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn221+ (ECP $ happy_var_2 (comb2 happy_var_1 happy_var_3) (mos happy_var_1,mcs happy_var_3)+ )}}}++happyReduce_559 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_559 = happySpecReduce_1 205# happyReduction_559+happyReduction_559 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn221+ (ECP $ pvA $ mkHsWildCardPV (getLoc 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 205# happyReduction_560+happyReduction_560 happy_x_1+ = case happyOut224 happy_x_1 of { (HappyWrap224 happy_var_1) -> + happyIn221+ (ECP $ pvA $ mkHsSplicePV happy_var_1+ )}++happyReduce_561 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_561 = happySpecReduce_1 205# happyReduction_561+happyReduction_561 happy_x_1+ = case happyOut225 happy_x_1 of { (HappyWrap225 happy_var_1) -> + happyIn221+ (ecpFromExp $ fmap (uncurry HsTypedSplice) (reLocA happy_var_1)+ )}++happyReduce_562 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_562 = happyMonadReduce 2# 205# happyReduction_562+happyReduction_562 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut304 happy_x_2 of { (HappyWrap304 happy_var_2) -> + ( fmap ecpFromExp $ acsA (\cs -> sLL happy_var_1 (reLocN happy_var_2) $ HsUntypedBracket (EpAnn (glR happy_var_1) [mj AnnSimpleQuote happy_var_1] cs) (VarBr noExtField True happy_var_2)))}})+ ) (\r -> happyReturn (happyIn221 r))++happyReduce_563 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_563 = happyMonadReduce 2# 205# happyReduction_563+happyReduction_563 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut274 happy_x_2 of { (HappyWrap274 happy_var_2) -> + ( fmap ecpFromExp $ acsA (\cs -> sLL happy_var_1 (reLocN happy_var_2) $ HsUntypedBracket (EpAnn (glR happy_var_1) [mj AnnSimpleQuote happy_var_1] cs) (VarBr noExtField True happy_var_2)))}})+ ) (\r -> happyReturn (happyIn221 r))++happyReduce_564 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_564 = happyMonadReduce 2# 205# happyReduction_564+happyReduction_564 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut300 happy_x_2 of { (HappyWrap300 happy_var_2) -> + ( fmap ecpFromExp $ acsA (\cs -> sLL happy_var_1 (reLocN happy_var_2) $ HsUntypedBracket (EpAnn (glR happy_var_1) [mj AnnThTyQuote happy_var_1 ] cs) (VarBr noExtField False happy_var_2)))}})+ ) (\r -> happyReturn (happyIn221 r))++happyReduce_565 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_565 = happyMonadReduce 2# 205# happyReduction_565+happyReduction_565 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut283 happy_x_2 of { (HappyWrap283 happy_var_2) -> + ( fmap ecpFromExp $ acsA (\cs -> sLL happy_var_1 (reLocN happy_var_2) $ HsUntypedBracket (EpAnn (glR happy_var_1) [mj AnnThTyQuote happy_var_1 ] cs) (VarBr noExtField False happy_var_2)))}})+ ) (\r -> happyReturn (happyIn221 r))++happyReduce_566 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_566 = happyMonadReduce 1# 205# happyReduction_566+happyReduction_566 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( reportEmptyDoubleQuotes (getLoc happy_var_1))})+ ) (\r -> happyReturn (happyIn221 r))++happyReduce_567 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_567 = happyMonadReduce 3# 205# happyReduction_567+happyReduction_567 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut212 happy_x_2 of { (HappyWrap212 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->+ fmap ecpFromExp $+ acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsUntypedBracket (EpAnn (glR happy_var_1) (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]) cs) (ExpBr noExtField happy_var_2)))}}})+ ) (\r -> happyReturn (happyIn221 r))++happyReduce_568 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_568 = happyMonadReduce 3# 205# happyReduction_568+happyReduction_568 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut212 happy_x_2 of { (HappyWrap212 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->+ fmap ecpFromExp $+ acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsTypedBracket (EpAnn (glR happy_var_1) (if (hasE happy_var_1) then [mj AnnOpenE happy_var_1,mc happy_var_3] else [mo happy_var_1,mc happy_var_3]) cs) happy_var_2))}}})+ ) (\r -> happyReturn (happyIn221 r))++happyReduce_569 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_569 = happyMonadReduce 3# 205# happyReduction_569+happyReduction_569 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut164 happy_x_2 of { (HappyWrap164 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( fmap ecpFromExp $+ acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsUntypedBracket (EpAnn (glR happy_var_1) [mo happy_var_1,mu AnnCloseQ happy_var_3] cs) (TypBr noExtField happy_var_2)))}}})+ ) (\r -> happyReturn (happyIn221 r))++happyReduce_570 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_570 = happyMonadReduce 3# 205# happyReduction_570+happyReduction_570 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut213 happy_x_2 of { (HappyWrap213 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( (checkPattern <=< runPV) (unECP happy_var_2) >>= \p ->+ fmap ecpFromExp $+ acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsUntypedBracket (EpAnn (glR happy_var_1) [mo happy_var_1,mu AnnCloseQ happy_var_3] cs) (PatBr noExtField p)))}}})+ ) (\r -> happyReturn (happyIn221 r))++happyReduce_571 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_571 = happyMonadReduce 3# 205# happyReduction_571+happyReduction_571 (happy_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 { (HappyWrap228 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( fmap ecpFromExp $+ acsA (\cs -> sLL happy_var_1 happy_var_3 $ HsUntypedBracket (EpAnn (glR happy_var_1) (mo happy_var_1:mu AnnCloseQ happy_var_3:fst happy_var_2) cs) (DecBrL noExtField (snd happy_var_2))))}}})+ ) (\r -> happyReturn (happyIn221 r))++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 happyOut211 happy_x_1 of { (HappyWrap211 happy_var_1) -> + happyIn221+ (ECP $ pvA $ mkHsSplicePV happy_var_1+ )}++happyReduce_573 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_573 = happyMonadReduce 4# 205# happyReduction_573+happyReduction_573 (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 happyOut219 happy_x_2 of { (HappyWrap219 happy_var_2) -> + case happyOut226 happy_x_3 of { (HappyWrap226 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->+ fmap ecpFromCmd $+ acsA (\cs -> sLL happy_var_1 happy_var_4 $ HsCmdArrForm (EpAnn (glR happy_var_1) (AnnList (Just $ glR happy_var_1) (Just $ mu AnnOpenB happy_var_1) (Just $ mu AnnCloseB happy_var_4) [] []) cs) happy_var_2 Prefix+ Nothing (reverse happy_var_3)))}}}})+ ) (\r -> happyReturn (happyIn221 r))++happyReduce_574 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_574 = happyMonadReduce 3# 206# happyReduction_574+happyReduction_574 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut222 happy_x_1 of { (HappyWrap222 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut305 happy_x_3 of { (HappyWrap305 happy_var_3) -> + ( acs (\cs -> sLL happy_var_1 (reLoc happy_var_3) ((sLLa happy_var_2 (reLoc happy_var_3) $ DotFieldOcc (EpAnn (glR happy_var_1) (AnnFieldLabel (Just $ glAA happy_var_2)) cs) happy_var_3) `NE.cons` unLoc happy_var_1)))}}})+ ) (\r -> happyReturn (happyIn222 r))++happyReduce_575 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_575 = happyMonadReduce 2# 206# happyReduction_575+happyReduction_575 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut305 happy_x_2 of { (HappyWrap305 happy_var_2) -> + ( acs (\cs -> sLL happy_var_1 (reLoc happy_var_2) ((sLLa happy_var_1 (reLoc happy_var_2) $ DotFieldOcc (EpAnn (glR happy_var_1) (AnnFieldLabel (Just $ glAA happy_var_1)) cs) happy_var_2) :| [])))}})+ ) (\r -> happyReturn (happyIn222 r))++happyReduce_576 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_576 = happySpecReduce_1 207# happyReduction_576+happyReduction_576 happy_x_1+ = case happyOut224 happy_x_1 of { (HappyWrap224 happy_var_1) -> + happyIn223+ (fmap (HsUntypedSplice noAnn) (reLocA happy_var_1)+ )}++happyReduce_577 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_577 = happySpecReduce_1 207# happyReduction_577+happyReduction_577 happy_x_1+ = case happyOut225 happy_x_1 of { (HappyWrap225 happy_var_1) -> + happyIn223+ (fmap (uncurry HsTypedSplice) (reLocA happy_var_1)+ )}++happyReduce_578 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_578 = happyMonadReduce 2# 208# happyReduction_578+happyReduction_578 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut221 happy_x_2 of { (HappyWrap221 happy_var_2) -> + ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->+ acs (\cs -> sLLlA happy_var_1 happy_var_2 $ HsUntypedSpliceExpr (EpAnn (glR happy_var_1) [mj AnnDollar happy_var_1] cs) happy_var_2))}})+ ) (\r -> happyReturn (happyIn224 r))++happyReduce_579 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_579 = happyMonadReduce 2# 209# happyReduction_579+happyReduction_579 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut221 happy_x_2 of { (HappyWrap221 happy_var_2) -> + ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->+ acs (\cs -> sLLlA happy_var_1 happy_var_2 $ ((noAnn, EpAnn (glR happy_var_1) [mj AnnDollarDollar happy_var_1] cs), happy_var_2)))}})+ ) (\r -> happyReturn (happyIn225 r))++happyReduce_580 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_580 = happySpecReduce_2 210# happyReduction_580+happyReduction_580 happy_x_2+ happy_x_1+ = case happyOut226 happy_x_1 of { (HappyWrap226 happy_var_1) -> + case happyOut227 happy_x_2 of { (HappyWrap227 happy_var_2) -> + happyIn226+ (happy_var_2 : happy_var_1+ )}}++happyReduce_581 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_581 = happySpecReduce_0 210# happyReduction_581+happyReduction_581 = happyIn226+ ([]+ )++happyReduce_582 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_582 = happyMonadReduce 1# 211# happyReduction_582+happyReduction_582 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut219 happy_x_1 of { (HappyWrap219 happy_var_1) -> + ( runPV (unECP happy_var_1) >>= \ (cmd :: LHsCmd GhcPs) ->+ runPV (checkCmdBlockArguments cmd) >>= \ _ ->+ return (sL1a (reLoc cmd) $ HsCmdTop noExtField cmd))})+ ) (\r -> happyReturn (happyIn227 r))++happyReduce_583 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_583 = happySpecReduce_3 212# happyReduction_583+happyReduction_583 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut229 happy_x_2 of { (HappyWrap229 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn228+ (([mj AnnOpenC happy_var_1+ ,mj AnnCloseC happy_var_3],happy_var_2)+ )}}}++happyReduce_584 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_584 = happySpecReduce_3 212# happyReduction_584+happyReduction_584 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut229 happy_x_2 of { (HappyWrap229 happy_var_2) -> + happyIn228+ (([],happy_var_2)+ )}++happyReduce_585 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_585 = happySpecReduce_1 213# happyReduction_585+happyReduction_585 happy_x_1+ = case happyOut78 happy_x_1 of { (HappyWrap78 happy_var_1) -> + happyIn229+ (cvTopDecls happy_var_1+ )}++happyReduce_586 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_586 = happySpecReduce_1 213# happyReduction_586+happyReduction_586 happy_x_1+ = case happyOut77 happy_x_1 of { (HappyWrap77 happy_var_1) -> + happyIn229+ (cvTopDecls happy_var_1+ )}++happyReduce_587 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_587 = happySpecReduce_1 214# happyReduction_587+happyReduction_587 happy_x_1+ = case happyOut212 happy_x_1 of { (HappyWrap212 happy_var_1) -> + happyIn230+ (happy_var_1+ )}++happyReduce_588 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_588 = happyMonadReduce 2# 214# happyReduction_588+happyReduction_588 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> + case happyOut295 happy_x_2 of { (HappyWrap295 happy_var_2) -> + ( runPV (unECP happy_var_1) >>= \ happy_var_1 ->+ runPV (rejectPragmaPV happy_var_1) >>+ runPV happy_var_2 >>= \ happy_var_2 ->+ return $ ecpFromExp $+ reLocA $ sLL (reLoc happy_var_1) (reLocN happy_var_2) $ SectionL noAnn happy_var_1 (n2l happy_var_2))}})+ ) (\r -> happyReturn (happyIn230 r))++happyReduce_589 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_589 = happySpecReduce_2 214# happyReduction_589+happyReduction_589 happy_x_2+ happy_x_1+ = case happyOut296 happy_x_1 of { (HappyWrap296 happy_var_1) -> + case happyOut213 happy_x_2 of { (HappyWrap213 happy_var_2) -> + happyIn230+ (ECP $+ superInfixOp $+ unECP happy_var_2 >>= \ happy_var_2 ->+ happy_var_1 >>= \ happy_var_1 ->+ pvA $ mkHsSectionR_PV (comb2 (reLocN happy_var_1) (reLoc happy_var_2)) (n2l happy_var_1) happy_var_2+ )}}++happyReduce_590 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_590 = happySpecReduce_3 214# happyReduction_590+happyReduction_590 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut212 happy_x_1 of { (HappyWrap212 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut230 happy_x_3 of { (HappyWrap230 happy_var_3) -> + happyIn230+ (ECP $+ unECP happy_var_1 >>= \ happy_var_1 ->+ unECP happy_var_3 >>= \ happy_var_3 ->+ mkHsViewPatPV (comb2 (reLoc happy_var_1) (reLoc happy_var_3)) happy_var_1 happy_var_3 [mu AnnRarrow happy_var_2]+ )}}}++happyReduce_591 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_591 = happySpecReduce_2 215# happyReduction_591+happyReduction_591 happy_x_2+ happy_x_1+ = case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> + case happyOut232 happy_x_2 of { (HappyWrap232 happy_var_2) -> + happyIn231+ (unECP happy_var_1 >>= \ happy_var_1 ->+ happy_var_2 >>= \ happy_var_2 ->+ do { t <- amsA happy_var_1 [AddCommaAnn (srcSpan2e $ fst happy_var_2)]+ ; return (Tuple (Right t : snd happy_var_2)) }+ )}}++happyReduce_592 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_592 = happySpecReduce_2 215# happyReduction_592+happyReduction_592 happy_x_2+ happy_x_1+ = case happyOut322 happy_x_1 of { (HappyWrap322 happy_var_1) -> + case happyOut233 happy_x_2 of { (HappyWrap233 happy_var_2) -> + happyIn231+ (happy_var_2 >>= \ happy_var_2 ->+ do { let {cos = map (\ll -> (Left (EpAnn (anc $ rs ll) (srcSpan2e ll) emptyComments))) (fst happy_var_1) }+ ; return (Tuple (cos ++ happy_var_2)) }+ )}}++happyReduce_593 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_593 = happySpecReduce_2 215# happyReduction_593+happyReduction_593 happy_x_2+ happy_x_1+ = case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> + case happyOut324 happy_x_2 of { (HappyWrap324 happy_var_2) -> + happyIn231+ (unECP happy_var_1 >>= \ happy_var_1 -> return $+ (Sum 1 (snd happy_var_2 + 1) happy_var_1 [] (map srcSpan2e $ fst happy_var_2))+ )}}++happyReduce_594 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_594 = happySpecReduce_3 215# happyReduction_594+happyReduction_594 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut324 happy_x_1 of { (HappyWrap324 happy_var_1) -> + case happyOut230 happy_x_2 of { (HappyWrap230 happy_var_2) -> + case happyOut323 happy_x_3 of { (HappyWrap323 happy_var_3) -> + happyIn231+ (unECP happy_var_2 >>= \ happy_var_2 -> return $+ (Sum (snd happy_var_1 + 1) (snd happy_var_1 + snd happy_var_3 + 1) happy_var_2+ (map srcSpan2e $ fst happy_var_1)+ (map srcSpan2e $ fst happy_var_3))+ )}}}++happyReduce_595 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_595 = happySpecReduce_2 216# happyReduction_595+happyReduction_595 happy_x_2+ happy_x_1+ = case happyOut322 happy_x_1 of { (HappyWrap322 happy_var_1) -> + case happyOut233 happy_x_2 of { (HappyWrap233 happy_var_2) -> + happyIn232+ (happy_var_2 >>= \ happy_var_2 ->+ do { let {cos = map (\l -> (Left (EpAnn (anc $ rs l) (srcSpan2e l) emptyComments))) (tail $ fst happy_var_1) }+ ; return ((head $ fst happy_var_1, cos ++ happy_var_2)) }+ )}}++happyReduce_596 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_596 = happySpecReduce_2 217# happyReduction_596+happyReduction_596 happy_x_2+ happy_x_1+ = case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> + case happyOut232 happy_x_2 of { (HappyWrap232 happy_var_2) -> + happyIn233+ (unECP happy_var_1 >>= \ happy_var_1 ->+ happy_var_2 >>= \ happy_var_2 ->+ do { t <- amsA happy_var_1 [AddCommaAnn (srcSpan2e $ fst happy_var_2)]+ ; return (Right t : snd happy_var_2) }+ )}}++happyReduce_597 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_597 = happySpecReduce_1 217# happyReduction_597+happyReduction_597 happy_x_1+ = case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> + happyIn233+ (unECP happy_var_1 >>= \ happy_var_1 ->+ return [Right happy_var_1]+ )}++happyReduce_598 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_598 = happySpecReduce_0 217# happyReduction_598+happyReduction_598 = happyIn233+ (return [Left noAnn]+ )++happyReduce_599 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_599 = happySpecReduce_1 218# happyReduction_599+happyReduction_599 happy_x_1+ = case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> + happyIn234+ (\loc (ao,ac) -> unECP happy_var_1 >>= \ happy_var_1 ->+ mkHsExplicitListPV loc [happy_var_1] (AnnList Nothing (Just ao) (Just ac) [] [])+ )}++happyReduce_600 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_600 = happySpecReduce_1 218# happyReduction_600+happyReduction_600 happy_x_1+ = case happyOut235 happy_x_1 of { (HappyWrap235 happy_var_1) -> + happyIn234+ (\loc (ao,ac) -> happy_var_1 >>= \ happy_var_1 ->+ mkHsExplicitListPV loc (reverse happy_var_1) (AnnList Nothing (Just ao) (Just ac) [] [])+ )}++happyReduce_601 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_601 = happySpecReduce_2 218# happyReduction_601+happyReduction_601 happy_x_2+ happy_x_1+ = case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn234+ (\loc (ao,ac) -> unECP happy_var_1 >>= \ happy_var_1 ->+ acsA (\cs -> L loc $ ArithSeq (EpAnn (spanAsAnchor loc) [ao,mj AnnDotdot happy_var_2,ac] cs) Nothing (From happy_var_1))+ >>= ecpFromExp'+ )}}++happyReduce_602 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_602 = happyReduce 4# 218# happyReduction_602+happyReduction_602 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut212 happy_x_3 of { (HappyWrap212 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + happyIn234+ (\loc (ao,ac) ->+ unECP happy_var_1 >>= \ happy_var_1 ->+ unECP happy_var_3 >>= \ happy_var_3 ->+ acsA (\cs -> L loc $ ArithSeq (EpAnn (spanAsAnchor loc) [ao,mj AnnComma happy_var_2,mj AnnDotdot happy_var_4,ac] cs) Nothing (FromThen happy_var_1 happy_var_3))+ >>= ecpFromExp'+ ) `HappyStk` happyRest}}}}++happyReduce_603 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_603 = happySpecReduce_3 218# happyReduction_603+happyReduction_603 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut212 happy_x_3 of { (HappyWrap212 happy_var_3) -> + happyIn234+ (\loc (ao,ac) ->+ unECP happy_var_1 >>= \ happy_var_1 ->+ unECP happy_var_3 >>= \ happy_var_3 ->+ acsA (\cs -> L loc $ ArithSeq (EpAnn (spanAsAnchor loc) [ao,mj AnnDotdot happy_var_2,ac] cs) Nothing (FromTo happy_var_1 happy_var_3))+ >>= ecpFromExp'+ )}}}++happyReduce_604 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_604 = happyReduce 5# 218# happyReduction_604+happyReduction_604 (happy_x_5 `HappyStk`+ happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut212 happy_x_3 of { (HappyWrap212 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + case happyOut212 happy_x_5 of { (HappyWrap212 happy_var_5) -> + happyIn234+ (\loc (ao,ac) ->+ unECP happy_var_1 >>= \ happy_var_1 ->+ unECP happy_var_3 >>= \ happy_var_3 ->+ unECP happy_var_5 >>= \ happy_var_5 ->+ acsA (\cs -> L loc $ ArithSeq (EpAnn (spanAsAnchor loc) [ao,mj AnnComma happy_var_2,mj AnnDotdot happy_var_4,ac] cs) Nothing (FromThenTo happy_var_1 happy_var_3 happy_var_5))+ >>= ecpFromExp'+ ) `HappyStk` happyRest}}}}}++happyReduce_605 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_605 = happySpecReduce_3 218# happyReduction_605+happyReduction_605 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut236 happy_x_3 of { (HappyWrap236 happy_var_3) -> + happyIn234+ (\loc (ao,ac) ->+ checkMonadComp >>= \ ctxt ->+ unECP happy_var_1 >>= \ happy_var_1 -> do { t <- addTrailingVbarA happy_var_1 (gl happy_var_2)+ ; acsA (\cs -> L loc $ mkHsCompAnns ctxt (unLoc happy_var_3) t (EpAnn (spanAsAnchor loc) (AnnList Nothing (Just ao) (Just ac) [] []) cs))+ >>= ecpFromExp' }+ )}}}++happyReduce_606 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_606 = happySpecReduce_3 219# happyReduction_606+happyReduction_606 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut235 happy_x_1 of { (HappyWrap235 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut230 happy_x_3 of { (HappyWrap230 happy_var_3) -> + happyIn235+ (happy_var_1 >>= \ happy_var_1 ->+ unECP happy_var_3 >>= \ happy_var_3 ->+ case happy_var_1 of+ (h:t) -> do+ h' <- addTrailingCommaA h (gl happy_var_2)+ return (((:) $! happy_var_3) $! (h':t))+ )}}}++happyReduce_607 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_607 = happySpecReduce_3 219# happyReduction_607+happyReduction_607 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut230 happy_x_3 of { (HappyWrap230 happy_var_3) -> + happyIn235+ (unECP happy_var_1 >>= \ happy_var_1 ->+ unECP happy_var_3 >>= \ happy_var_3 ->+ do { h <- addTrailingCommaA happy_var_1 (gl happy_var_2)+ ; return [happy_var_3,h] }+ )}}}++happyReduce_608 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_608 = happySpecReduce_1 220# happyReduction_608+happyReduction_608 happy_x_1+ = case happyOut237 happy_x_1 of { (HappyWrap237 happy_var_1) -> + happyIn236+ (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 [sL1a happy_var_1 $ ParStmt noExtField [ParStmtBlock noExtField qs [] noSyntaxExpr |+ qs <- qss]+ noExpr noSyntaxExpr]+ -- We actually found some actual parallel lists so+ -- we wrap them into as a ParStmt+ )}++happyReduce_609 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_609 = happyMonadReduce 3# 221# happyReduction_609+happyReduction_609 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut238 happy_x_1 of { (HappyWrap238 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut237 happy_x_3 of { (HappyWrap237 happy_var_3) -> + ( case unLoc happy_var_1 of+ (h:t) -> do+ h' <- addTrailingVbarA h (gl happy_var_2)+ return (sLL happy_var_1 happy_var_3 (reverse (h':t) : unLoc happy_var_3)))}}})+ ) (\r -> happyReturn (happyIn237 r))++happyReduce_610 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_610 = happySpecReduce_1 221# happyReduction_610+happyReduction_610 happy_x_1+ = case happyOut238 happy_x_1 of { (HappyWrap238 happy_var_1) -> + happyIn237+ (L (getLoc happy_var_1) [reverse (unLoc happy_var_1)]+ )}++happyReduce_611 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_611 = happyMonadReduce 3# 222# happyReduction_611+happyReduction_611 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut238 happy_x_1 of { (HappyWrap238 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut239 happy_x_3 of { (HappyWrap239 happy_var_3) -> + ( case unLoc happy_var_1 of+ (h:t) -> do+ h' <- addTrailingCommaA h (gl happy_var_2)+ return (sLL happy_var_1 happy_var_3 [sLLa happy_var_1 happy_var_3 ((unLoc happy_var_3) (glRR happy_var_1) (reverse (h':t)))]))}}})+ ) (\r -> happyReturn (happyIn238 r))++happyReduce_612 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_612 = happyMonadReduce 3# 222# happyReduction_612+happyReduction_612 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut238 happy_x_1 of { (HappyWrap238 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut257 happy_x_3 of { (HappyWrap257 happy_var_3) -> + ( runPV happy_var_3 >>= \ happy_var_3 ->+ case unLoc happy_var_1 of+ (h:t) -> do+ h' <- addTrailingCommaA h (gl happy_var_2)+ return (sLL happy_var_1 (reLoc happy_var_3) (happy_var_3 : (h':t))))}}})+ ) (\r -> happyReturn (happyIn238 r))++happyReduce_613 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_613 = happyMonadReduce 1# 222# happyReduction_613+happyReduction_613 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut239 happy_x_1 of { (HappyWrap239 happy_var_1) -> + ( return (sLL happy_var_1 happy_var_1 [L (getLocAnn happy_var_1) ((unLoc happy_var_1) (glRR happy_var_1) [])]))})+ ) (\r -> happyReturn (happyIn238 r))++happyReduce_614 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_614 = happyMonadReduce 1# 222# happyReduction_614+happyReduction_614 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut257 happy_x_1 of { (HappyWrap257 happy_var_1) -> + ( runPV happy_var_1 >>= \ happy_var_1 ->+ return $ sL1A happy_var_1 [happy_var_1])})+ ) (\r -> happyReturn (happyIn238 r))++happyReduce_615 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_615 = happyMonadReduce 2# 223# happyReduction_615+happyReduction_615 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut212 happy_x_2 of { (HappyWrap212 happy_var_2) -> + ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->+ acs (\cs->+ sLLlA happy_var_1 happy_var_2 (\r ss -> (mkTransformStmt (EpAnn (anc r) [mj AnnThen happy_var_1] cs) ss happy_var_2))))}})+ ) (\r -> happyReturn (happyIn239 r))++happyReduce_616 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_616 = happyMonadReduce 4# 223# happyReduction_616+happyReduction_616 (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 happyOut212 happy_x_2 of { (HappyWrap212 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut212 happy_x_4 of { (HappyWrap212 happy_var_4) -> + ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->+ runPV (unECP happy_var_4) >>= \ happy_var_4 ->+ acs (\cs -> sLLlA happy_var_1 happy_var_4 (+ \r ss -> (mkTransformByStmt (EpAnn (anc r) [mj AnnThen happy_var_1,mj AnnBy happy_var_3] cs) ss happy_var_2 happy_var_4))))}}}})+ ) (\r -> happyReturn (happyIn239 r))++happyReduce_617 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_617 = happyMonadReduce 4# 223# happyReduction_617+happyReduction_617 (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 happyOut212 happy_x_4 of { (HappyWrap212 happy_var_4) -> + ( runPV (unECP happy_var_4) >>= \ happy_var_4 ->+ acs (\cs -> sLLlA happy_var_1 happy_var_4 (+ \r ss -> (mkGroupUsingStmt (EpAnn (anc r) [mj AnnThen happy_var_1,mj AnnGroup happy_var_2,mj AnnUsing happy_var_3] cs) ss happy_var_4))))}}}})+ ) (\r -> happyReturn (happyIn239 r))++happyReduce_618 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_618 = happyMonadReduce 6# 223# happyReduction_618+happyReduction_618 (happy_x_6 `HappyStk`+ happy_x_5 `HappyStk`+ happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut212 happy_x_4 of { (HappyWrap212 happy_var_4) -> + case happyOutTok happy_x_5 of { happy_var_5 -> + case happyOut212 happy_x_6 of { (HappyWrap212 happy_var_6) -> + ( runPV (unECP happy_var_4) >>= \ happy_var_4 ->+ runPV (unECP happy_var_6) >>= \ happy_var_6 ->+ acs (\cs -> sLLlA happy_var_1 happy_var_6 (+ \r ss -> (mkGroupByUsingStmt (EpAnn (anc r) [mj AnnThen happy_var_1,mj AnnGroup happy_var_2,mj AnnBy happy_var_3,mj AnnUsing happy_var_5] cs) ss happy_var_4 happy_var_6))))}}}}}})+ ) (\r -> happyReturn (happyIn239 r))++happyReduce_619 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_619 = happySpecReduce_1 224# happyReduction_619+happyReduction_619 happy_x_1+ = case happyOut241 happy_x_1 of { (HappyWrap241 happy_var_1) -> + happyIn240+ (L (getLoc happy_var_1) (reverse (unLoc happy_var_1))+ )}++happyReduce_620 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_620 = happyMonadReduce 3# 225# happyReduction_620+happyReduction_620 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut241 happy_x_1 of { (HappyWrap241 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut257 happy_x_3 of { (HappyWrap257 happy_var_3) -> + ( runPV happy_var_3 >>= \ happy_var_3 ->+ case unLoc happy_var_1 of+ (h:t) -> do+ h' <- addTrailingCommaA h (gl happy_var_2)+ return (sLL happy_var_1 (reLoc happy_var_3) (happy_var_3 : (h':t))))}}})+ ) (\r -> happyReturn (happyIn241 r))++happyReduce_621 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_621 = happyMonadReduce 1# 225# happyReduction_621+happyReduction_621 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut257 happy_x_1 of { (HappyWrap257 happy_var_1) -> + ( runPV happy_var_1 >>= \ happy_var_1 ->+ return $ sL1A happy_var_1 [happy_var_1])})+ ) (\r -> happyReturn (happyIn241 r))++happyReduce_622 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_622 = happySpecReduce_2 226# happyReduction_622+happyReduction_622 happy_x_2+ happy_x_1+ = case happyOut243 happy_x_1 of { (HappyWrap243 happy_var_1) -> + case happyOut135 happy_x_2 of { (HappyWrap135 happy_var_2) -> + happyIn242+ (happy_var_1 >>= \alt ->+ do { let {L l (bs, csw) = adaptWhereBinds happy_var_2}+ ; acs (\cs -> sLL alt (L l bs) (GRHSs (cs Semi.<> csw) (unLoc alt) bs)) }+ )}}++happyReduce_623 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_623 = happySpecReduce_2 227# happyReduction_623+happyReduction_623 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut212 happy_x_2 of { (HappyWrap212 happy_var_2) -> + happyIn243+ (unECP happy_var_2 >>= \ happy_var_2 ->+ acs (\cs -> sLLlA happy_var_1 happy_var_2 (unguardedRHS (EpAnn (glR happy_var_1) (GrhsAnn Nothing (mu AnnRarrow happy_var_1)) cs) (comb2 happy_var_1 (reLoc happy_var_2)) happy_var_2))+ )}}++happyReduce_624 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_624 = happySpecReduce_1 227# happyReduction_624+happyReduction_624 happy_x_1+ = case happyOut244 happy_x_1 of { (HappyWrap244 happy_var_1) -> + happyIn243+ (happy_var_1 >>= \gdpats ->+ return $ sL1 gdpats (reverse (unLoc gdpats))+ )}++happyReduce_625 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_625 = happySpecReduce_2 228# happyReduction_625+happyReduction_625 happy_x_2+ happy_x_1+ = case happyOut244 happy_x_1 of { (HappyWrap244 happy_var_1) -> + case happyOut246 happy_x_2 of { (HappyWrap246 happy_var_2) -> + happyIn244+ (happy_var_1 >>= \gdpats ->+ happy_var_2 >>= \gdpat ->+ return $ sLL gdpats (reLoc gdpat) (gdpat : unLoc gdpats)+ )}}++happyReduce_626 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_626 = happySpecReduce_1 228# happyReduction_626+happyReduction_626 happy_x_1+ = case happyOut246 happy_x_1 of { (HappyWrap246 happy_var_1) -> + happyIn244+ (happy_var_1 >>= \gdpat -> return $ sL1A gdpat [gdpat]+ )}++happyReduce_627 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_627 = happyMonadReduce 3# 229# happyReduction_627+happyReduction_627 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut244 happy_x_2 of { (HappyWrap244 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( runPV happy_var_2 >>= \ happy_var_2 ->+ return $ sLL happy_var_1 happy_var_3 ([moc happy_var_1,mcc happy_var_3],unLoc happy_var_2))}}})+ ) (\r -> happyReturn (happyIn245 r))++happyReduce_628 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_628 = happyMonadReduce 2# 229# happyReduction_628+happyReduction_628 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut244 happy_x_1 of { (HappyWrap244 happy_var_1) -> + ( runPV happy_var_1 >>= \ happy_var_1 ->+ return $ sL1 happy_var_1 ([],unLoc happy_var_1))})+ ) (\r -> happyReturn (happyIn245 r))++happyReduce_629 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_629 = happyReduce 4# 230# happyReduction_629+happyReduction_629 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut240 happy_x_2 of { (HappyWrap240 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + case happyOut212 happy_x_4 of { (HappyWrap212 happy_var_4) -> + happyIn246+ (unECP happy_var_4 >>= \ happy_var_4 ->+ acsA (\cs -> sL (comb2A happy_var_1 happy_var_4) $ GRHS (EpAnn (glR happy_var_1) (GrhsAnn (Just $ glAA happy_var_1) (mu AnnRarrow happy_var_3)) cs) (unLoc happy_var_2) happy_var_4)+ ) `HappyStk` happyRest}}}}++happyReduce_630 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_630 = happyMonadReduce 1# 231# happyReduction_630+happyReduction_630 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut212 happy_x_1 of { (HappyWrap212 happy_var_1) -> + ( (checkPattern <=< runPV) (unECP happy_var_1))})+ ) (\r -> happyReturn (happyIn247 r))++happyReduce_631 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_631 = happySpecReduce_1 232# happyReduction_631+happyReduction_631 happy_x_1+ = case happyOut247 happy_x_1 of { (HappyWrap247 happy_var_1) -> + happyIn248+ ([ happy_var_1 ]+ )}++happyReduce_632 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_632 = happyMonadReduce 1# 233# happyReduction_632+happyReduction_632 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut212 happy_x_1 of { (HappyWrap212 happy_var_1) -> + ( -- See Note [Parser-Validator Details] in GHC.Parser.PostProcess+ checkPattern_details incompleteDoBlock+ (unECP happy_var_1))})+ ) (\r -> happyReturn (happyIn249 r))++happyReduce_633 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_633 = happyMonadReduce 1# 234# happyReduction_633+happyReduction_633 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut219 happy_x_1 of { (HappyWrap219 happy_var_1) -> + ( (checkPattern <=< runPV) (unECP happy_var_1))})+ ) (\r -> happyReturn (happyIn250 r))++happyReduce_634 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_634 = happySpecReduce_2 235# happyReduction_634+happyReduction_634 happy_x_2+ happy_x_1+ = case happyOut250 happy_x_1 of { (HappyWrap250 happy_var_1) -> + case happyOut251 happy_x_2 of { (HappyWrap251 happy_var_2) -> + happyIn251+ (happy_var_1 : happy_var_2+ )}}++happyReduce_635 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_635 = happySpecReduce_0 235# happyReduction_635+happyReduction_635 = happyIn251+ ([]+ )++happyReduce_636 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_636 = happySpecReduce_3 236# happyReduction_636+happyReduction_636 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut253 happy_x_2 of { (HappyWrap253 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn252+ (happy_var_2 >>= \ happy_var_2 ->+ amsrl (sLL happy_var_1 happy_var_3 (reverse $ snd $ unLoc happy_var_2)) (AnnList (Just $ stmtsAnchor happy_var_2) (Just $ moc happy_var_1) (Just $ mcc happy_var_3) (fromOL $ fst $ unLoc happy_var_2) [])+ )}}}++happyReduce_637 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_637 = happySpecReduce_3 236# happyReduction_637+happyReduction_637 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut253 happy_x_2 of { (HappyWrap253 happy_var_2) -> + happyIn252+ (happy_var_2 >>= \ happy_var_2 -> amsrl+ (L (stmtsLoc happy_var_2) (reverse $ snd $ unLoc happy_var_2)) (AnnList (Just $ stmtsAnchor happy_var_2) Nothing Nothing (fromOL $ fst $ unLoc happy_var_2) [])+ )}++happyReduce_638 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_638 = happySpecReduce_3 237# happyReduction_638+happyReduction_638 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut253 happy_x_1 of { (HappyWrap253 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut256 happy_x_3 of { (HappyWrap256 happy_var_3) -> + happyIn253+ (happy_var_1 >>= \ happy_var_1 ->+ happy_var_3 >>= \ (happy_var_3 :: LStmt GhcPs (LocatedA b)) ->+ case (snd $ unLoc happy_var_1) of+ [] -> return (sLL happy_var_1 (reLoc happy_var_3) ((fst $ unLoc happy_var_1) `snocOL` (mj AnnSemi happy_var_2)+ ,happy_var_3 : (snd $ unLoc happy_var_1)))+ (h:t) -> do+ { h' <- addTrailingSemiA h (gl happy_var_2)+ ; return $ sLL happy_var_1 (reLoc happy_var_3) (fst $ unLoc happy_var_1,happy_var_3 :(h':t)) }+ )}}}++happyReduce_639 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_639 = happySpecReduce_2 237# happyReduction_639+happyReduction_639 happy_x_2+ happy_x_1+ = case happyOut253 happy_x_1 of { (HappyWrap253 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn253+ (happy_var_1 >>= \ happy_var_1 ->+ case (snd $ unLoc happy_var_1) of+ [] -> return (sLL happy_var_1 happy_var_2 ((fst $ unLoc happy_var_1) `snocOL` (mj AnnSemi happy_var_2),snd $ unLoc happy_var_1))+ (h:t) -> do+ { h' <- addTrailingSemiA h (gl happy_var_2)+ ; return $ sL1 happy_var_1 (fst $ unLoc happy_var_1,h':t) }+ )}}++happyReduce_640 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_640 = happySpecReduce_1 237# happyReduction_640+happyReduction_640 happy_x_1+ = case happyOut256 happy_x_1 of { (HappyWrap256 happy_var_1) -> + happyIn253+ (happy_var_1 >>= \ happy_var_1 ->+ return $ sL1A happy_var_1 (nilOL,[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 237# happyReduction_641+happyReduction_641 = happyIn253+ (return $ noLoc (nilOL,[])+ )++happyReduce_642 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_642 = happyMonadReduce 1# 238# happyReduction_642+happyReduction_642 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut256 happy_x_1 of { (HappyWrap256 happy_var_1) -> + ( fmap Just (runPV happy_var_1))})+ ) (\r -> happyReturn (happyIn254 r))++happyReduce_643 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_643 = happySpecReduce_0 238# happyReduction_643+happyReduction_643 = happyIn254+ (Nothing+ )++happyReduce_644 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_644 = happyMonadReduce 1# 239# happyReduction_644+happyReduction_644 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut256 happy_x_1 of { (HappyWrap256 happy_var_1) -> + ( runPV happy_var_1)})+ ) (\r -> happyReturn (happyIn255 r))++happyReduce_645 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_645 = happySpecReduce_1 240# happyReduction_645+happyReduction_645 happy_x_1+ = case happyOut257 happy_x_1 of { (HappyWrap257 happy_var_1) -> + happyIn256+ (happy_var_1+ )}++happyReduce_646 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_646 = happySpecReduce_2 240# happyReduction_646+happyReduction_646 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut252 happy_x_2 of { (HappyWrap252 happy_var_2) -> + happyIn256+ (happy_var_2 >>= \ happy_var_2 ->+ acsA (\cs -> (sLL happy_var_1 (reLoc happy_var_2) $ mkRecStmt+ (EpAnn (glR happy_var_1) (hsDoAnn happy_var_1 happy_var_2 AnnRec) cs)+ happy_var_2))+ )}}++happyReduce_647 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_647 = happySpecReduce_3 241# happyReduction_647+happyReduction_647 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut249 happy_x_1 of { (HappyWrap249 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut212 happy_x_3 of { (HappyWrap212 happy_var_3) -> + happyIn257+ (unECP happy_var_3 >>= \ happy_var_3 ->+ acsA (\cs -> sLLlA (reLoc happy_var_1) happy_var_3+ $ mkPsBindStmt (EpAnn (glAR happy_var_1) [mu AnnLarrow happy_var_2] cs) happy_var_1 happy_var_3)+ )}}}++happyReduce_648 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_648 = happySpecReduce_1 241# happyReduction_648+happyReduction_648 happy_x_1+ = case happyOut212 happy_x_1 of { (HappyWrap212 happy_var_1) -> + happyIn257+ (unECP happy_var_1 >>= \ happy_var_1 ->+ return $ sL1 happy_var_1 $ mkBodyStmt happy_var_1+ )}++happyReduce_649 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_649 = happySpecReduce_2 241# happyReduction_649+happyReduction_649 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut134 happy_x_2 of { (HappyWrap134 happy_var_2) -> + happyIn257+ (acsA (\cs -> (sLL happy_var_1 happy_var_2+ $ mkLetStmt (EpAnn (glR happy_var_1) [mj AnnLet happy_var_1] cs) (unLoc happy_var_2)))+ )}}++happyReduce_650 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_650 = happySpecReduce_1 242# happyReduction_650+happyReduction_650 happy_x_1+ = case happyOut259 happy_x_1 of { (HappyWrap259 happy_var_1) -> + happyIn258+ (happy_var_1+ )}++happyReduce_651 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_651 = happySpecReduce_0 242# happyReduction_651+happyReduction_651 = happyIn258+ (return ([], Nothing)+ )++happyReduce_652 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_652 = happySpecReduce_3 243# happyReduction_652+happyReduction_652 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut260 happy_x_1 of { (HappyWrap260 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut259 happy_x_3 of { (HappyWrap259 happy_var_3) -> + happyIn259+ (happy_var_1 >>= \ happy_var_1 ->+ happy_var_3 >>= \ happy_var_3 -> do+ h <- addTrailingCommaFBind happy_var_1 (gl happy_var_2)+ return (case happy_var_3 of (flds, dd) -> (h : flds, dd))+ )}}}++happyReduce_653 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_653 = happySpecReduce_1 243# happyReduction_653+happyReduction_653 happy_x_1+ = case happyOut260 happy_x_1 of { (HappyWrap260 happy_var_1) -> + happyIn259+ (happy_var_1 >>= \ happy_var_1 ->+ return ([happy_var_1], Nothing)+ )}++happyReduce_654 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_654 = happySpecReduce_1 243# happyReduction_654+happyReduction_654 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn259+ (return ([], Just (getLoc happy_var_1))+ )}++happyReduce_655 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_655 = happySpecReduce_3 244# happyReduction_655+happyReduction_655 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut304 happy_x_1 of { (HappyWrap304 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut230 happy_x_3 of { (HappyWrap230 happy_var_3) -> + happyIn260+ (unECP happy_var_3 >>= \ happy_var_3 ->+ fmap Left $ acsA (\cs -> sLL (reLocN happy_var_1) (reLoc happy_var_3) $ HsFieldBind (EpAnn (glNR happy_var_1) [mj AnnEqual happy_var_2] cs) (sL1l happy_var_1 $ mkFieldOcc happy_var_1) happy_var_3 False)+ )}}}++happyReduce_656 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_656 = happySpecReduce_1 244# happyReduction_656+happyReduction_656 happy_x_1+ = case happyOut304 happy_x_1 of { (HappyWrap304 happy_var_1) -> + happyIn260+ (placeHolderPunRhs >>= \rhs ->+ fmap Left $ acsa (\cs -> sL1a (reLocN happy_var_1) $ HsFieldBind (EpAnn (glNR happy_var_1) [] cs) (sL1l happy_var_1 $ mkFieldOcc happy_var_1) rhs True)+ )}++happyReduce_657 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_657 = happyReduce 5# 244# happyReduction_657+happyReduction_657 (happy_x_5 `HappyStk`+ happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOut305 happy_x_1 of { (HappyWrap305 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut261 happy_x_3 of { (HappyWrap261 happy_var_3) -> + case happyOutTok happy_x_4 of { happy_var_4 -> + case happyOut230 happy_x_5 of { (HappyWrap230 happy_var_5) -> + happyIn260+ (do+ let top = sL1 (la2la happy_var_1) $ DotFieldOcc noAnn happy_var_1+ ((L lf (DotFieldOcc _ f)):t) = reverse (unLoc happy_var_3)+ lf' = comb2 happy_var_2 (reLoc $ L lf ())+ fields = top : L (noAnnSrcSpan lf') (DotFieldOcc (EpAnn (spanAsAnchor lf') (AnnFieldLabel (Just $ glAA happy_var_2)) emptyComments) f) : t+ final = last fields+ l = comb2 (reLoc happy_var_1) happy_var_3+ isPun = False+ happy_var_5 <- unECP happy_var_5+ fmap Right $ mkHsProjUpdatePV (comb2 (reLoc happy_var_1) (reLoc happy_var_5)) (L l fields) happy_var_5 isPun+ [mj AnnEqual happy_var_4]+ ) `HappyStk` happyRest}}}}}++happyReduce_658 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_658 = happySpecReduce_3 244# happyReduction_658+happyReduction_658 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut305 happy_x_1 of { (HappyWrap305 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut261 happy_x_3 of { (HappyWrap261 happy_var_3) -> + happyIn260+ (do+ let top = sL1 (la2la happy_var_1) $ DotFieldOcc noAnn happy_var_1+ ((L lf (DotFieldOcc _ f)):t) = reverse (unLoc happy_var_3)+ lf' = comb2 happy_var_2 (reLoc $ L lf ())+ fields = top : L (noAnnSrcSpan lf') (DotFieldOcc (EpAnn (spanAsAnchor lf') (AnnFieldLabel (Just $ glAA happy_var_2)) emptyComments) f) : t+ final = last fields+ l = comb2 (reLoc happy_var_1) happy_var_3+ isPun = True+ var <- mkHsVarPV (L (noAnnSrcSpan $ getLocA final) (mkRdrUnqual . mkVarOccFS . field_label . unLoc . dfoLabel . unLoc $ final))+ fmap Right $ mkHsProjUpdatePV l (L l fields) var isPun []+ )}}}++happyReduce_659 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_659 = happyMonadReduce 3# 245# happyReduction_659+happyReduction_659 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut261 happy_x_1 of { (HappyWrap261 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut305 happy_x_3 of { (HappyWrap305 happy_var_3) -> + ( getCommentsFor (getLocA happy_var_3) >>= \cs ->+ return (sLL happy_var_1 (reLoc happy_var_3) ((sLLa happy_var_2 (reLoc happy_var_3) (DotFieldOcc (EpAnn (glR happy_var_2) (AnnFieldLabel $ Just $ glAA happy_var_2) cs) happy_var_3)) : unLoc happy_var_1)))}}})+ ) (\r -> happyReturn (happyIn261 r))++happyReduce_660 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_660 = happyMonadReduce 1# 245# happyReduction_660+happyReduction_660 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut305 happy_x_1 of { (HappyWrap305 happy_var_1) -> + ( getCommentsFor (getLocA happy_var_1) >>= \cs ->+ return (sL1 (reLoc happy_var_1) [sL1a (reLoc happy_var_1) (DotFieldOcc (EpAnn (glNR happy_var_1) (AnnFieldLabel Nothing) cs) happy_var_1)]))})+ ) (\r -> happyReturn (happyIn261 r))++happyReduce_661 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_661 = happyMonadReduce 3# 246# happyReduction_661+happyReduction_661 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut262 happy_x_1 of { (HappyWrap262 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut263 happy_x_3 of { (HappyWrap263 happy_var_3) -> + ( case unLoc happy_var_1 of+ (h:t) -> do+ h' <- addTrailingSemiA h (gl happy_var_2)+ return (let { this = happy_var_3; rest = h':t }+ in rest `seq` this `seq` sLL happy_var_1 (reLoc happy_var_3) (this : rest)))}}})+ ) (\r -> happyReturn (happyIn262 r))++happyReduce_662 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_662 = happyMonadReduce 2# 246# happyReduction_662+happyReduction_662 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut262 happy_x_1 of { (HappyWrap262 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + ( case unLoc happy_var_1 of+ (h:t) -> do+ h' <- addTrailingSemiA h (gl happy_var_2)+ return (sLL happy_var_1 happy_var_2 (h':t)))}})+ ) (\r -> happyReturn (happyIn262 r))++happyReduce_663 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_663 = happySpecReduce_1 246# happyReduction_663+happyReduction_663 happy_x_1+ = case happyOut263 happy_x_1 of { (HappyWrap263 happy_var_1) -> + happyIn262+ (let this = happy_var_1 in this `seq` (sL1 (reLoc happy_var_1) [this])+ )}++happyReduce_664 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_664 = happyMonadReduce 3# 247# happyReduction_664+happyReduction_664 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut264 happy_x_1 of { (HappyWrap264 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut212 happy_x_3 of { (HappyWrap212 happy_var_3) -> + ( runPV (unECP happy_var_3) >>= \ happy_var_3 ->+ acsA (\cs -> sLLlA happy_var_1 happy_var_3 (IPBind (EpAnn (glR happy_var_1) [mj AnnEqual happy_var_2] cs) (reLocA happy_var_1) happy_var_3)))}}})+ ) (\r -> happyReturn (happyIn263 r))++happyReduce_665 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_665 = happySpecReduce_1 248# happyReduction_665+happyReduction_665 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn264+ (sL1 happy_var_1 (HsIPName (getIPDUPVARID 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 249# happyReduction_666+happyReduction_666 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn265+ (sL1 happy_var_1 (getLABELVARIDs happy_var_1, getLABELVARID 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 250# happyReduction_667+happyReduction_667 happy_x_1+ = case happyOut267 happy_x_1 of { (HappyWrap267 happy_var_1) -> + happyIn266+ (happy_var_1+ )}++happyReduce_668 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_668 = happySpecReduce_0 250# happyReduction_668+happyReduction_668 = happyIn266+ (noLocA mkTrue+ )++happyReduce_669 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_669 = happySpecReduce_1 251# happyReduction_669+happyReduction_669 happy_x_1+ = case happyOut268 happy_x_1 of { (HappyWrap268 happy_var_1) -> + happyIn267+ (happy_var_1+ )}++happyReduce_670 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_670 = happyMonadReduce 3# 251# happyReduction_670+happyReduction_670 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut268 happy_x_1 of { (HappyWrap268 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut267 happy_x_3 of { (HappyWrap267 happy_var_3) -> + ( do { h <- addTrailingVbarL happy_var_1 (gl happy_var_2)+ ; return (reLocA $ sLLAA happy_var_1 happy_var_3 (Or [h,happy_var_3])) })}}})+ ) (\r -> happyReturn (happyIn267 r))++happyReduce_671 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_671 = happySpecReduce_1 252# happyReduction_671+happyReduction_671 happy_x_1+ = case happyOut269 happy_x_1 of { (HappyWrap269 happy_var_1) -> + happyIn268+ (reLocA $ sLLAA (head happy_var_1) (last happy_var_1) (And (happy_var_1))+ )}++happyReduce_672 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_672 = happySpecReduce_1 253# happyReduction_672+happyReduction_672 happy_x_1+ = case happyOut270 happy_x_1 of { (HappyWrap270 happy_var_1) -> + happyIn269+ ([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# 253# happyReduction_673+happyReduction_673 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut270 happy_x_1 of { (HappyWrap270 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut269 happy_x_3 of { (HappyWrap269 happy_var_3) -> + ( do { h <- addTrailingCommaL happy_var_1 (gl happy_var_2)+ ; return (h : happy_var_3) })}}})+ ) (\r -> happyReturn (happyIn269 r))++happyReduce_674 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_674 = happyMonadReduce 3# 254# happyReduction_674+happyReduction_674 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut267 happy_x_2 of { (HappyWrap267 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrl (sLL happy_var_1 happy_var_3 (Parens happy_var_2))+ (AnnList Nothing (Just (mop happy_var_1)) (Just (mcp happy_var_3)) [] []))}}})+ ) (\r -> happyReturn (happyIn270 r))++happyReduce_675 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_675 = happySpecReduce_1 254# happyReduction_675+happyReduction_675 happy_x_1+ = case happyOut272 happy_x_1 of { (HappyWrap272 happy_var_1) -> + happyIn270+ (reLocA $ sL1N happy_var_1 (Var happy_var_1)+ )}++happyReduce_676 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_676 = happySpecReduce_1 255# happyReduction_676+happyReduction_676 happy_x_1+ = case happyOut272 happy_x_1 of { (HappyWrap272 happy_var_1) -> + happyIn271+ (sL1N happy_var_1 [happy_var_1]+ )}++happyReduce_677 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_677 = happyMonadReduce 3# 255# happyReduction_677+happyReduction_677 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut272 happy_x_1 of { (HappyWrap272 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut271 happy_x_3 of { (HappyWrap271 happy_var_3) -> + ( do { h <- addTrailingCommaN happy_var_1 (gl happy_var_2)+ ; return (sLL (reLocN happy_var_1) happy_var_3 (h : unLoc happy_var_3)) })}}})+ ) (\r -> happyReturn (happyIn271 r))++happyReduce_678 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_678 = happySpecReduce_1 256# happyReduction_678+happyReduction_678 happy_x_1+ = case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> + happyIn272+ (happy_var_1+ )}++happyReduce_679 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_679 = happySpecReduce_1 256# happyReduction_679+happyReduction_679 happy_x_1+ = case happyOut276 happy_x_1 of { (HappyWrap276 happy_var_1) -> + happyIn272+ (happy_var_1+ )}++happyReduce_680 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_680 = happySpecReduce_1 257# happyReduction_680+happyReduction_680 happy_x_1+ = case happyOut275 happy_x_1 of { (HappyWrap275 happy_var_1) -> + happyIn273+ (happy_var_1+ )}++happyReduce_681 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_681 = happySpecReduce_1 257# happyReduction_681+happyReduction_681 happy_x_1+ = case happyOut279 happy_x_1 of { (HappyWrap279 happy_var_1) -> + happyIn273+ (L (getLoc happy_var_1) $ nameRdrName (dataConName (unLoc happy_var_1))+ )}++happyReduce_682 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_682 = happySpecReduce_1 258# happyReduction_682+happyReduction_682 happy_x_1+ = case happyOut275 happy_x_1 of { (HappyWrap275 happy_var_1) -> + happyIn274+ (happy_var_1+ )}++happyReduce_683 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_683 = happySpecReduce_1 258# happyReduction_683+happyReduction_683 happy_x_1+ = case happyOut280 happy_x_1 of { (HappyWrap280 happy_var_1) -> + happyIn274+ (L (getLoc happy_var_1) $ nameRdrName (dataConName (unLoc happy_var_1))+ )}++happyReduce_684 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_684 = happySpecReduce_1 259# happyReduction_684+happyReduction_684 happy_x_1+ = case happyOut315 happy_x_1 of { (HappyWrap315 happy_var_1) -> + happyIn275+ (happy_var_1+ )}++happyReduce_685 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_685 = happyMonadReduce 3# 259# happyReduction_685+happyReduction_685 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut317 happy_x_2 of { (HappyWrap317 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn275 r))++happyReduce_686 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_686 = happySpecReduce_1 260# happyReduction_686+happyReduction_686 happy_x_1+ = case happyOut316 happy_x_1 of { (HappyWrap316 happy_var_1) -> + happyIn276+ (happy_var_1+ )}++happyReduce_687 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_687 = happyMonadReduce 3# 260# happyReduction_687+happyReduction_687 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut318 happy_x_2 of { (HappyWrap318 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn276 r))++happyReduce_688 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_688 = happySpecReduce_1 260# happyReduction_688+happyReduction_688 happy_x_1+ = case happyOut280 happy_x_1 of { (HappyWrap280 happy_var_1) -> + happyIn276+ (L (getLoc happy_var_1) $ nameRdrName (dataConName (unLoc happy_var_1))+ )}++happyReduce_689 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_689 = happySpecReduce_1 261# happyReduction_689+happyReduction_689 happy_x_1+ = case happyOut276 happy_x_1 of { (HappyWrap276 happy_var_1) -> + happyIn277+ (sL1N happy_var_1 (pure happy_var_1)+ )}++happyReduce_690 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_690 = happyMonadReduce 3# 261# happyReduction_690+happyReduction_690 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut276 happy_x_1 of { (HappyWrap276 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut277 happy_x_3 of { (HappyWrap277 happy_var_3) -> + ( sLL (reLocN happy_var_1) happy_var_3 . (:| toList (unLoc happy_var_3)) <$> addTrailingCommaN happy_var_1 (gl happy_var_2))}}})+ ) (\r -> happyReturn (happyIn277 r))++happyReduce_691 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_691 = happySpecReduce_1 262# happyReduction_691+happyReduction_691 happy_x_1+ = case happyOut274 happy_x_1 of { (HappyWrap274 happy_var_1) -> + happyIn278+ (sL1N happy_var_1 [happy_var_1]+ )}++happyReduce_692 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_692 = happyMonadReduce 3# 262# happyReduction_692+happyReduction_692 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut274 happy_x_1 of { (HappyWrap274 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut278 happy_x_3 of { (HappyWrap278 happy_var_3) -> + ( do { h <- addTrailingCommaN happy_var_1 (gl happy_var_2)+ ; return (sLL (reLocN happy_var_1) happy_var_3 (h : unLoc happy_var_3)) })}}})+ ) (\r -> happyReturn (happyIn278 r))++happyReduce_693 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_693 = happyMonadReduce 2# 263# happyReduction_693+happyReduction_693 (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 -> + ( amsrn (sLL happy_var_1 happy_var_2 unitDataCon) (NameAnnOnly NameParens (glAA happy_var_1) (glAA happy_var_2) []))}})+ ) (\r -> happyReturn (happyIn279 r))++happyReduce_694 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_694 = happyMonadReduce 3# 263# happyReduction_694+happyReduction_694 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut322 happy_x_2 of { (HappyWrap322 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 $ tupleDataCon Boxed (snd happy_var_2 + 1))+ (NameAnnCommas NameParens (glAA happy_var_1) (map srcSpan2e (fst happy_var_2)) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn279 r))++happyReduce_695 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_695 = happyMonadReduce 2# 263# 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 -> + ( amsrn (sLL happy_var_1 happy_var_2 $ unboxedUnitDataCon) (NameAnnOnly NameParensHash (glAA happy_var_1) (glAA happy_var_2) []))}})+ ) (\r -> happyReturn (happyIn279 r))++happyReduce_696 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_696 = happyMonadReduce 3# 263# 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 happyOut322 happy_x_2 of { (HappyWrap322 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 $ tupleDataCon Unboxed (snd happy_var_2 + 1))+ (NameAnnCommas NameParensHash (glAA happy_var_1) (map srcSpan2e (fst happy_var_2)) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn279 r))++happyReduce_697 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_697 = happySpecReduce_1 264# happyReduction_697+happyReduction_697 happy_x_1+ = case happyOut279 happy_x_1 of { (HappyWrap279 happy_var_1) -> + happyIn280+ (happy_var_1+ )}++happyReduce_698 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_698 = happyMonadReduce 2# 264# happyReduction_698+happyReduction_698 (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 -> + ( amsrn (sLL happy_var_1 happy_var_2 nilDataCon) (NameAnnOnly NameSquare (glAA happy_var_1) (glAA happy_var_2) []))}})+ ) (\r -> happyReturn (happyIn280 r))++happyReduce_699 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_699 = happySpecReduce_1 265# happyReduction_699+happyReduction_699 happy_x_1+ = case happyOut318 happy_x_1 of { (HappyWrap318 happy_var_1) -> + happyIn281+ (happy_var_1+ )}++happyReduce_700 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_700 = happyMonadReduce 3# 265# happyReduction_700+happyReduction_700 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut316 happy_x_2 of { (HappyWrap316 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn281 r))++happyReduce_701 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_701 = happySpecReduce_1 266# happyReduction_701+happyReduction_701 happy_x_1+ = case happyOut317 happy_x_1 of { (HappyWrap317 happy_var_1) -> + happyIn282+ (happy_var_1+ )}++happyReduce_702 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_702 = happyMonadReduce 3# 266# 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 happyOut315 happy_x_2 of { (HappyWrap315 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn282 r))++happyReduce_703 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_703 = happySpecReduce_1 267# happyReduction_703+happyReduction_703 happy_x_1+ = case happyOut284 happy_x_1 of { (HappyWrap284 happy_var_1) -> + happyIn283+ (happy_var_1+ )}++happyReduce_704 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_704 = happyMonadReduce 2# 267# happyReduction_704+happyReduction_704 (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 -> + ( amsrn (sLL happy_var_1 happy_var_2 $ getRdrName unitTyCon)+ (NameAnnOnly NameParens (glAA happy_var_1) (glAA happy_var_2) []))}})+ ) (\r -> happyReturn (happyIn283 r))++happyReduce_705 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_705 = happyMonadReduce 2# 267# happyReduction_705+happyReduction_705 (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 -> + ( amsrn (sLL happy_var_1 happy_var_2 $ getRdrName unboxedUnitTyCon)+ (NameAnnOnly NameParensHash (glAA happy_var_1) (glAA happy_var_2) []))}})+ ) (\r -> happyReturn (happyIn283 r))++happyReduce_706 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_706 = happySpecReduce_1 268# happyReduction_706+happyReduction_706 happy_x_1+ = case happyOut285 happy_x_1 of { (HappyWrap285 happy_var_1) -> + happyIn284+ (happy_var_1+ )}++happyReduce_707 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_707 = happyMonadReduce 3# 268# happyReduction_707+happyReduction_707 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut322 happy_x_2 of { (HappyWrap322 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 $ getRdrName (tupleTyCon Boxed+ (snd happy_var_2 + 1)))+ (NameAnnCommas NameParens (glAA happy_var_1) (map srcSpan2e (fst happy_var_2)) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn284 r))++happyReduce_708 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_708 = happyMonadReduce 3# 268# happyReduction_708+happyReduction_708 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut322 happy_x_2 of { (HappyWrap322 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 $ getRdrName (tupleTyCon Unboxed+ (snd happy_var_2 + 1)))+ (NameAnnCommas NameParensHash (glAA happy_var_1) (map srcSpan2e (fst happy_var_2)) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn284 r))++happyReduce_709 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_709 = happyMonadReduce 3# 268# happyReduction_709+happyReduction_709 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut324 happy_x_2 of { (HappyWrap324 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 $ getRdrName (sumTyCon (snd happy_var_2 + 1)))+ (NameAnnBars NameParensHash (glAA happy_var_1) (map srcSpan2e (fst happy_var_2)) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn284 r))++happyReduce_710 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_710 = happyMonadReduce 3# 268# happyReduction_710+happyReduction_710 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 $ getRdrName unrestrictedFunTyCon)+ (NameAnnRArrow (isUnicode happy_var_2) (Just $ glAA happy_var_1) (glAA happy_var_2) (Just $ glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn284 r))++happyReduce_711 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_711 = happyMonadReduce 2# 268# happyReduction_711+happyReduction_711 (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 -> + ( amsrn (sLL happy_var_1 happy_var_2 $ listTyCon_RDR)+ (NameAnnOnly NameSquare (glAA happy_var_1) (glAA happy_var_2) []))}})+ ) (\r -> happyReturn (happyIn284 r))++happyReduce_712 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_712 = happySpecReduce_1 269# happyReduction_712+happyReduction_712 happy_x_1+ = case happyOut288 happy_x_1 of { (HappyWrap288 happy_var_1) -> + happyIn285+ (happy_var_1+ )}++happyReduce_713 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_713 = happyMonadReduce 3# 269# happyReduction_713+happyReduction_713 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut290 happy_x_2 of { (HappyWrap290 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn285 r))++happyReduce_714 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_714 = happySpecReduce_1 270# happyReduction_714+happyReduction_714 happy_x_1+ = case happyOut288 happy_x_1 of { (HappyWrap288 happy_var_1) -> + happyIn286+ (happy_var_1+ )}++happyReduce_715 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_715 = happyMonadReduce 3# 270# happyReduction_715+happyReduction_715 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( let { name :: Located RdrName+ ; name = sL1 happy_var_2 $! mkQual tcClsName (getQCONSYM happy_var_2) }+ in amsrn (sLL happy_var_1 happy_var_3 (unLoc name)) (NameAnn NameParens (glAA happy_var_1) (glAA happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn286 r))++happyReduce_716 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_716 = happyMonadReduce 3# 270# happyReduction_716+happyReduction_716 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( let { name :: Located RdrName+ ; name = sL1 happy_var_2 $! mkUnqual tcClsName (getCONSYM happy_var_2) }+ in amsrn (sLL happy_var_1 happy_var_3 (unLoc name)) (NameAnn NameParens (glAA happy_var_1) (glAA happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn286 r))++happyReduce_717 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_717 = happyMonadReduce 3# 270# happyReduction_717+happyReduction_717 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( let { name :: Located RdrName+ ; name = sL1 happy_var_2 $! consDataCon_RDR }+ in amsrn (sLL happy_var_1 happy_var_3 (unLoc name)) (NameAnn NameParens (glAA happy_var_1) (glAA happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn286 r))++happyReduce_718 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_718 = happySpecReduce_1 271# happyReduction_718+happyReduction_718 happy_x_1+ = case happyOut290 happy_x_1 of { (HappyWrap290 happy_var_1) -> + happyIn287+ (happy_var_1+ )}++happyReduce_719 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_719 = happyMonadReduce 3# 271# happyReduction_719+happyReduction_719 (happy_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 { (HappyWrap288 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn287 r))++happyReduce_720 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_720 = happySpecReduce_1 272# happyReduction_720+happyReduction_720 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn288+ (sL1n happy_var_1 $! mkQual tcClsName (getQCONID 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 272# happyReduction_721+happyReduction_721 happy_x_1+ = case happyOut289 happy_x_1 of { (HappyWrap289 happy_var_1) -> + happyIn288+ (happy_var_1+ )}++happyReduce_722 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_722 = happySpecReduce_1 273# happyReduction_722+happyReduction_722 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn289+ (sL1n happy_var_1 $! mkUnqual tcClsName (getCONID happy_var_1)+ )}++happyReduce_723 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_723 = happySpecReduce_1 274# happyReduction_723+happyReduction_723 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn290+ (sL1n happy_var_1 $! mkQual tcClsName (getQCONSYM 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 274# happyReduction_724+happyReduction_724 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn290+ (sL1n happy_var_1 $! mkQual tcClsName (getQVARSYM 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 274# happyReduction_725+happyReduction_725 happy_x_1+ = case happyOut291 happy_x_1 of { (HappyWrap291 happy_var_1) -> + happyIn290+ (happy_var_1+ )}++happyReduce_726 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_726 = happySpecReduce_1 275# happyReduction_726+happyReduction_726 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn291+ (sL1n happy_var_1 $! mkUnqual tcClsName (getCONSYM 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 275# happyReduction_727+happyReduction_727 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn291+ (sL1n happy_var_1 $! mkUnqual tcClsName (getVARSYM 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 275# happyReduction_728+happyReduction_728 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn291+ (sL1n happy_var_1 $! consDataCon_RDR+ )}++happyReduce_729 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_729 = happySpecReduce_1 275# happyReduction_729+happyReduction_729 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn291+ (sL1n happy_var_1 $! mkUnqual tcClsName (fsLit "-")+ )}++happyReduce_730 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_730 = happySpecReduce_1 275# happyReduction_730+happyReduction_730 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn291+ (sL1n happy_var_1 $! mkUnqual tcClsName (fsLit ".")+ )}++happyReduce_731 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_731 = happySpecReduce_1 276# happyReduction_731+happyReduction_731 happy_x_1+ = case happyOut289 happy_x_1 of { (HappyWrap289 happy_var_1) -> + happyIn292+ (happy_var_1+ )}++happyReduce_732 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_732 = happyMonadReduce 3# 276# happyReduction_732+happyReduction_732 (happy_x_3 `HappyStk`+ 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 { (HappyWrap291 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn292 r))++happyReduce_733 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_733 = happySpecReduce_1 277# happyReduction_733+happyReduction_733 happy_x_1+ = case happyOut294 happy_x_1 of { (HappyWrap294 happy_var_1) -> + happyIn293+ (happy_var_1+ )}++happyReduce_734 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_734 = happySpecReduce_1 277# happyReduction_734+happyReduction_734 happy_x_1+ = case happyOut281 happy_x_1 of { (HappyWrap281 happy_var_1) -> + happyIn293+ (happy_var_1+ )}++happyReduce_735 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_735 = happyMonadReduce 1# 277# happyReduction_735+happyReduction_735 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + ( amsrn (sLL happy_var_1 happy_var_1 $ getRdrName unrestrictedFunTyCon)+ (NameAnnRArrow (isUnicode happy_var_1) Nothing (glAA happy_var_1) Nothing []))})+ ) (\r -> happyReturn (happyIn293 r))++happyReduce_736 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_736 = happySpecReduce_1 278# happyReduction_736+happyReduction_736 happy_x_1+ = case happyOut311 happy_x_1 of { (HappyWrap311 happy_var_1) -> + happyIn294+ (happy_var_1+ )}++happyReduce_737 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_737 = happyMonadReduce 3# 278# happyReduction_737+happyReduction_737 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut307 happy_x_2 of { (HappyWrap307 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn294 r))++happyReduce_738 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_738 = happySpecReduce_1 279# happyReduction_738+happyReduction_738 happy_x_1+ = case happyOut298 happy_x_1 of { (HappyWrap298 happy_var_1) -> + happyIn295+ (mkHsVarOpPV 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 279# happyReduction_739+happyReduction_739 happy_x_1+ = case happyOut282 happy_x_1 of { (HappyWrap282 happy_var_1) -> + happyIn295+ (mkHsConOpPV happy_var_1+ )}++happyReduce_740 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_740 = happySpecReduce_1 279# happyReduction_740+happyReduction_740 happy_x_1+ = case happyOut297 happy_x_1 of { (HappyWrap297 happy_var_1) -> + happyIn295+ (pvN happy_var_1+ )}++happyReduce_741 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_741 = happySpecReduce_1 280# happyReduction_741+happyReduction_741 happy_x_1+ = case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> + happyIn296+ (mkHsVarOpPV happy_var_1+ )}++happyReduce_742 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_742 = happySpecReduce_1 280# happyReduction_742+happyReduction_742 happy_x_1+ = case happyOut282 happy_x_1 of { (HappyWrap282 happy_var_1) -> + happyIn296+ (mkHsConOpPV happy_var_1+ )}++happyReduce_743 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_743 = happySpecReduce_1 280# happyReduction_743+happyReduction_743 happy_x_1+ = case happyOut297 happy_x_1 of { (HappyWrap297 happy_var_1) -> + happyIn296+ (pvN happy_var_1+ )}++happyReduce_744 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_744 = happySpecReduce_3 281# happyReduction_744+happyReduction_744 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 -> + happyIn297+ (mkHsInfixHolePV (comb2 happy_var_1 happy_var_3)+ (\cs -> EpAnn (glR happy_var_1) (EpAnnUnboundVar (glAA happy_var_1, glAA happy_var_3) (glAA happy_var_2)) cs)+ )}}}++happyReduce_745 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_745 = happySpecReduce_1 282# happyReduction_745+happyReduction_745 happy_x_1+ = case happyOut308 happy_x_1 of { (HappyWrap308 happy_var_1) -> + happyIn298+ (happy_var_1+ )}++happyReduce_746 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_746 = happyMonadReduce 3# 282# 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 happyOut306 happy_x_2 of { (HappyWrap306 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn298 r))++happyReduce_747 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_747 = happySpecReduce_1 283# happyReduction_747+happyReduction_747 happy_x_1+ = case happyOut309 happy_x_1 of { (HappyWrap309 happy_var_1) -> + happyIn299+ (happy_var_1+ )}++happyReduce_748 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_748 = happyMonadReduce 3# 283# happyReduction_748+happyReduction_748 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut306 happy_x_2 of { (HappyWrap306 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn299 r))++happyReduce_749 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_749 = happySpecReduce_1 284# happyReduction_749+happyReduction_749 happy_x_1+ = case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> + happyIn300+ (happy_var_1+ )}++happyReduce_750 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_750 = happyMonadReduce 3# 285# happyReduction_750+happyReduction_750 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut302 happy_x_2 of { (HappyWrap302 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameBackquotes (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn301 r))++happyReduce_751 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_751 = happySpecReduce_1 286# happyReduction_751+happyReduction_751 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn302+ (sL1n happy_var_1 $! mkUnqual tvName (getVARID happy_var_1)+ )}++happyReduce_752 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_752 = happySpecReduce_1 286# happyReduction_752+happyReduction_752 happy_x_1+ = case happyOut313 happy_x_1 of { (HappyWrap313 happy_var_1) -> + happyIn302+ (sL1n happy_var_1 $! mkUnqual tvName (unLoc happy_var_1)+ )}++happyReduce_753 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_753 = happySpecReduce_1 286# happyReduction_753+happyReduction_753 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn302+ (sL1n happy_var_1 $! mkUnqual tvName (fsLit "unsafe")+ )}++happyReduce_754 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_754 = happySpecReduce_1 286# happyReduction_754+happyReduction_754 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn302+ (sL1n happy_var_1 $! mkUnqual tvName (fsLit "safe")+ )}++happyReduce_755 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_755 = happySpecReduce_1 286# happyReduction_755+happyReduction_755 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn302+ (sL1n happy_var_1 $! mkUnqual tvName (fsLit "interruptible")+ )}++happyReduce_756 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_756 = happySpecReduce_1 287# happyReduction_756+happyReduction_756 happy_x_1+ = case happyOut307 happy_x_1 of { (HappyWrap307 happy_var_1) -> + happyIn303+ (happy_var_1+ )}++happyReduce_757 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_757 = happyMonadReduce 3# 287# happyReduction_757+happyReduction_757 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut311 happy_x_2 of { (HappyWrap311 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn303 r))++happyReduce_758 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_758 = happySpecReduce_1 288# happyReduction_758+happyReduction_758 happy_x_1+ = case happyOut306 happy_x_1 of { (HappyWrap306 happy_var_1) -> + happyIn304+ (happy_var_1+ )}++happyReduce_759 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_759 = happyMonadReduce 3# 288# happyReduction_759+happyReduction_759 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut311 happy_x_2 of { (HappyWrap311 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn304 r))++happyReduce_760 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_760 = happyMonadReduce 3# 288# happyReduction_760+happyReduction_760 (happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut310 happy_x_2 of { (HappyWrap310 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + ( amsrn (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+ (NameAnn NameParens (glAA happy_var_1) (glNRR happy_var_2) (glAA happy_var_3) []))}}})+ ) (\r -> happyReturn (happyIn304 r))++happyReduce_761 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_761 = happySpecReduce_1 289# happyReduction_761+happyReduction_761 happy_x_1+ = case happyOut307 happy_x_1 of { (HappyWrap307 happy_var_1) -> + happyIn305+ (fmap (FieldLabelString . occNameFS . rdrNameOcc) 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 290# happyReduction_762+happyReduction_762 happy_x_1+ = case happyOut307 happy_x_1 of { (HappyWrap307 happy_var_1) -> + happyIn306+ (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 290# happyReduction_763+happyReduction_763 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn306+ (sL1n happy_var_1 $! mkQual varName (getQVARID happy_var_1)+ )}++happyReduce_764 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_764 = happySpecReduce_1 291# happyReduction_764+happyReduction_764 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn307+ (sL1n happy_var_1 $! mkUnqual varName (getVARID 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 291# happyReduction_765+happyReduction_765 happy_x_1+ = case happyOut313 happy_x_1 of { (HappyWrap313 happy_var_1) -> + happyIn307+ (sL1n 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 291# happyReduction_766+happyReduction_766 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn307+ (sL1n happy_var_1 $! mkUnqual varName (fsLit "unsafe")+ )}++happyReduce_767 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_767 = happySpecReduce_1 291# happyReduction_767+happyReduction_767 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn307+ (sL1n happy_var_1 $! mkUnqual varName (fsLit "safe")+ )}++happyReduce_768 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_768 = happySpecReduce_1 291# happyReduction_768+happyReduction_768 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn307+ (sL1n happy_var_1 $! mkUnqual varName (fsLit "interruptible")+ )}++happyReduce_769 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_769 = happySpecReduce_1 291# happyReduction_769+happyReduction_769 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn307+ (sL1n happy_var_1 $! mkUnqual varName (fsLit "forall")+ )}++happyReduce_770 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_770 = happySpecReduce_1 291# happyReduction_770+happyReduction_770 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn307+ (sL1n happy_var_1 $! mkUnqual varName (fsLit "family")+ )}++happyReduce_771 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_771 = happySpecReduce_1 291# happyReduction_771+happyReduction_771 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn307+ (sL1n happy_var_1 $! mkUnqual varName (fsLit "role")+ )}++happyReduce_772 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_772 = happySpecReduce_1 292# happyReduction_772+happyReduction_772 happy_x_1+ = case happyOut311 happy_x_1 of { (HappyWrap311 happy_var_1) -> + happyIn308+ (happy_var_1+ )}++happyReduce_773 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_773 = happySpecReduce_1 292# happyReduction_773+happyReduction_773 happy_x_1+ = case happyOut310 happy_x_1 of { (HappyWrap310 happy_var_1) -> + happyIn308+ (happy_var_1+ )}++happyReduce_774 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_774 = happySpecReduce_1 293# happyReduction_774+happyReduction_774 happy_x_1+ = case happyOut312 happy_x_1 of { (HappyWrap312 happy_var_1) -> + happyIn309+ (happy_var_1+ )}++happyReduce_775 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_775 = happySpecReduce_1 293# happyReduction_775+happyReduction_775 happy_x_1+ = case happyOut310 happy_x_1 of { (HappyWrap310 happy_var_1) -> + happyIn309+ (happy_var_1+ )}++happyReduce_776 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_776 = happySpecReduce_1 294# happyReduction_776+happyReduction_776 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn310+ (sL1n happy_var_1 $ mkQual varName (getQVARSYM happy_var_1)+ )}++happyReduce_777 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_777 = happySpecReduce_1 295# happyReduction_777+happyReduction_777 happy_x_1+ = case happyOut312 happy_x_1 of { (HappyWrap312 happy_var_1) -> + happyIn311+ (happy_var_1+ )}++happyReduce_778 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_778 = happySpecReduce_1 295# happyReduction_778+happyReduction_778 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn311+ (sL1n happy_var_1 $ mkUnqual varName (fsLit "-")+ )}++happyReduce_779 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_779 = happySpecReduce_1 296# happyReduction_779+happyReduction_779 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn312+ (sL1n happy_var_1 $ mkUnqual varName (getVARSYM happy_var_1)+ )}++happyReduce_780 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_780 = happySpecReduce_1 296# happyReduction_780+happyReduction_780 happy_x_1+ = case happyOut314 happy_x_1 of { (HappyWrap314 happy_var_1) -> + happyIn312+ (sL1n happy_var_1 $ mkUnqual varName (unLoc happy_var_1)+ )}++happyReduce_781 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_781 = happySpecReduce_1 297# happyReduction_781+happyReduction_781 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "as")+ )}++happyReduce_782 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_782 = happySpecReduce_1 297# happyReduction_782+happyReduction_782 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "qualified")+ )}++happyReduce_783 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_783 = happySpecReduce_1 297# happyReduction_783+happyReduction_783 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "hiding")+ )}++happyReduce_784 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_784 = happySpecReduce_1 297# happyReduction_784+happyReduction_784 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "export")+ )}++happyReduce_785 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_785 = happySpecReduce_1 297# happyReduction_785+happyReduction_785 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "label")+ )}++happyReduce_786 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_786 = happySpecReduce_1 297# happyReduction_786+happyReduction_786 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "dynamic")+ )}++happyReduce_787 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_787 = happySpecReduce_1 297# happyReduction_787+happyReduction_787 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "stdcall")+ )}++happyReduce_788 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_788 = happySpecReduce_1 297# happyReduction_788+happyReduction_788 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "ccall")+ )}++happyReduce_789 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_789 = happySpecReduce_1 297# happyReduction_789+happyReduction_789 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "capi")+ )}++happyReduce_790 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_790 = happySpecReduce_1 297# happyReduction_790+happyReduction_790 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "prim")+ )}++happyReduce_791 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_791 = happySpecReduce_1 297# happyReduction_791+happyReduction_791 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "javascript")+ )}++happyReduce_792 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_792 = happySpecReduce_1 297# happyReduction_792+happyReduction_792 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "group")+ )}++happyReduce_793 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_793 = happySpecReduce_1 297# happyReduction_793+happyReduction_793 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "stock")+ )}++happyReduce_794 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_794 = happySpecReduce_1 297# happyReduction_794+happyReduction_794 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "anyclass")+ )}++happyReduce_795 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_795 = happySpecReduce_1 297# happyReduction_795+happyReduction_795 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "via")+ )}++happyReduce_796 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_796 = happySpecReduce_1 297# happyReduction_796+happyReduction_796 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "unit")+ )}++happyReduce_797 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_797 = happySpecReduce_1 297# happyReduction_797+happyReduction_797 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "dependency")+ )}++happyReduce_798 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_798 = happySpecReduce_1 297# happyReduction_798+happyReduction_798 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn313+ (sL1 happy_var_1 (fsLit "signature")+ )}++happyReduce_799 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_799 = happySpecReduce_1 298# happyReduction_799+happyReduction_799 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn314+ (sL1 happy_var_1 (fsLit ".")+ )}++happyReduce_800 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_800 = happySpecReduce_1 298# happyReduction_800+happyReduction_800 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn314+ (sL1 happy_var_1 (starSym (isUnicode happy_var_1))+ )}++happyReduce_801 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_801 = happySpecReduce_1 299# happyReduction_801+happyReduction_801 happy_x_1+ = case happyOut316 happy_x_1 of { (HappyWrap316 happy_var_1) -> + happyIn315+ (happy_var_1+ )}++happyReduce_802 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_802 = happySpecReduce_1 299# happyReduction_802+happyReduction_802 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn315+ (sL1n happy_var_1 $! mkQual dataName (getQCONID 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 300# happyReduction_803+happyReduction_803 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn316+ (sL1n happy_var_1 $ mkUnqual dataName (getCONID happy_var_1)+ )}++happyReduce_804 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_804 = happySpecReduce_1 301# happyReduction_804+happyReduction_804 happy_x_1+ = case happyOut318 happy_x_1 of { (HappyWrap318 happy_var_1) -> + happyIn317+ (happy_var_1+ )}++happyReduce_805 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_805 = happySpecReduce_1 301# happyReduction_805+happyReduction_805 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn317+ (sL1n happy_var_1 $ mkQual dataName (getQCONSYM happy_var_1)+ )}++happyReduce_806 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_806 = happySpecReduce_1 302# happyReduction_806+happyReduction_806 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn318+ (sL1n happy_var_1 $ mkUnqual dataName (getCONSYM happy_var_1)+ )}++happyReduce_807 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_807 = happySpecReduce_1 302# happyReduction_807+happyReduction_807 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn318+ (sL1n happy_var_1 $ consDataCon_RDR+ )}++happyReduce_808 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_808 = happySpecReduce_1 303# happyReduction_808+happyReduction_808 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsChar (getCHARs happy_var_1) $ getCHAR happy_var_1+ )}++happyReduce_809 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_809 = happySpecReduce_1 303# happyReduction_809+happyReduction_809 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsString (getSTRINGs happy_var_1)+ $ getSTRING happy_var_1+ )}++happyReduce_810 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_810 = happySpecReduce_1 303# happyReduction_810+happyReduction_810 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsIntPrim (getPRIMINTEGERs happy_var_1)+ $ getPRIMINTEGER happy_var_1+ )}++happyReduce_811 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_811 = happySpecReduce_1 303# happyReduction_811+happyReduction_811 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsWordPrim (getPRIMWORDs happy_var_1)+ $ getPRIMWORD happy_var_1+ )}++happyReduce_812 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_812 = happySpecReduce_1 303# happyReduction_812+happyReduction_812 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsInt8Prim (getPRIMINTEGER8s happy_var_1)+ $ getPRIMINTEGER8 happy_var_1+ )}++happyReduce_813 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_813 = happySpecReduce_1 303# happyReduction_813+happyReduction_813 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsInt16Prim (getPRIMINTEGER16s happy_var_1)+ $ getPRIMINTEGER16 happy_var_1+ )}++happyReduce_814 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_814 = happySpecReduce_1 303# happyReduction_814+happyReduction_814 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsInt32Prim (getPRIMINTEGER32s happy_var_1)+ $ getPRIMINTEGER32 happy_var_1+ )}++happyReduce_815 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_815 = happySpecReduce_1 303# happyReduction_815+happyReduction_815 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsInt64Prim (getPRIMINTEGER64s happy_var_1)+ $ getPRIMINTEGER64 happy_var_1+ )}++happyReduce_816 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_816 = happySpecReduce_1 303# happyReduction_816+happyReduction_816 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsWord8Prim (getPRIMWORD8s happy_var_1)+ $ getPRIMWORD8 happy_var_1+ )}++happyReduce_817 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_817 = happySpecReduce_1 303# happyReduction_817+happyReduction_817 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsWord16Prim (getPRIMWORD16s happy_var_1)+ $ getPRIMWORD16 happy_var_1+ )}++happyReduce_818 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_818 = happySpecReduce_1 303# happyReduction_818+happyReduction_818 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsWord32Prim (getPRIMWORD32s happy_var_1)+ $ getPRIMWORD32 happy_var_1+ )}++happyReduce_819 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_819 = happySpecReduce_1 303# happyReduction_819+happyReduction_819 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsWord64Prim (getPRIMWORD64s happy_var_1)+ $ getPRIMWORD64 happy_var_1+ )}++happyReduce_820 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_820 = happySpecReduce_1 303# happyReduction_820+happyReduction_820 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsCharPrim (getPRIMCHARs happy_var_1)+ $ getPRIMCHAR happy_var_1+ )}++happyReduce_821 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_821 = happySpecReduce_1 303# happyReduction_821+happyReduction_821 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsStringPrim (getPRIMSTRINGs happy_var_1)+ $ getPRIMSTRING happy_var_1+ )}++happyReduce_822 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_822 = happySpecReduce_1 303# happyReduction_822+happyReduction_822 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsFloatPrim noExtField $ getPRIMFLOAT happy_var_1+ )}++happyReduce_823 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_823 = happySpecReduce_1 303# happyReduction_823+happyReduction_823 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn319+ (sL1 happy_var_1 $ HsDoublePrim noExtField $ getPRIMDOUBLE happy_var_1+ )}++happyReduce_824 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_824 = happySpecReduce_1 304# happyReduction_824+happyReduction_824 happy_x_1+ = happyIn320+ (()+ )++happyReduce_825 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_825 = happyMonadReduce 1# 304# happyReduction_825+happyReduction_825 (happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((( popContext))+ ) (\r -> happyReturn (happyIn320 r))++happyReduce_826 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_826 = happySpecReduce_1 305# happyReduction_826+happyReduction_826 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn321+ (sL1a happy_var_1 $ mkModuleNameFS (getCONID happy_var_1)+ )}++happyReduce_827 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_827 = happySpecReduce_1 305# happyReduction_827+happyReduction_827 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn321+ (sL1a happy_var_1 $ let (mod,c) = getQCONID happy_var_1 in+ mkModuleNameFS+ (concatFS [mod, fsLit ".", c])+ )}++happyReduce_828 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_828 = happySpecReduce_2 306# happyReduction_828+happyReduction_828 happy_x_2+ happy_x_1+ = case happyOut322 happy_x_1 of { (HappyWrap322 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn322+ (((fst happy_var_1)++[gl happy_var_2],snd happy_var_1 + 1)+ )}}++happyReduce_829 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_829 = happySpecReduce_1 306# happyReduction_829+happyReduction_829 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn322+ (([gl happy_var_1],1)+ )}++happyReduce_830 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_830 = happySpecReduce_1 307# happyReduction_830+happyReduction_830 happy_x_1+ = case happyOut324 happy_x_1 of { (HappyWrap324 happy_var_1) -> + happyIn323+ (happy_var_1+ )}++happyReduce_831 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_831 = happySpecReduce_0 307# happyReduction_831+happyReduction_831 = happyIn323+ (([], 0)+ )++happyReduce_832 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_832 = happySpecReduce_2 308# happyReduction_832+happyReduction_832 happy_x_2+ happy_x_1+ = case happyOut324 happy_x_1 of { (HappyWrap324 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn324+ (((fst happy_var_1)++[gl happy_var_2],snd happy_var_1 + 1)+ )}}++happyReduce_833 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_833 = happySpecReduce_1 308# happyReduction_833+happyReduction_833 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn324+ (([gl happy_var_1],1)+ )}++happyReduce_834 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_834 = happySpecReduce_3 309# happyReduction_834+happyReduction_834 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut329 happy_x_2 of { (HappyWrap329 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn325+ (happy_var_2 >>= \ happy_var_2 -> amsrl+ (sLL happy_var_1 happy_var_3 (reverse (snd $ unLoc happy_var_2)))+ (AnnList (Just $ glR happy_var_2) (Just $ moc happy_var_1) (Just $ mcc happy_var_3) (fst $ unLoc happy_var_2) [])+ )}}}++happyReduce_835 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_835 = happySpecReduce_3 309# happyReduction_835+happyReduction_835 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut329 happy_x_2 of { (HappyWrap329 happy_var_2) -> + happyIn325+ (happy_var_2 >>= \ happy_var_2 -> amsrl+ (L (getLoc happy_var_2) (reverse (snd $ unLoc happy_var_2)))+ (AnnList (Just $ glR happy_var_2) Nothing Nothing (fst $ unLoc happy_var_2) [])+ )}++happyReduce_836 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_836 = happySpecReduce_2 309# happyReduction_836+happyReduction_836 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn325+ (amsrl (sLL happy_var_1 happy_var_2 []) (AnnList Nothing (Just $ moc happy_var_1) (Just $ mcc happy_var_2) [] [])+ )}}++happyReduce_837 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_837 = happySpecReduce_2 309# happyReduction_837+happyReduction_837 happy_x_2+ happy_x_1+ = happyIn325+ (return $ noLocA []+ )++happyReduce_838 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_838 = happySpecReduce_3 310# happyReduction_838+happyReduction_838 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut330 happy_x_2 of { (HappyWrap330 happy_var_2) -> + case happyOutTok happy_x_3 of { happy_var_3 -> + happyIn326+ (happy_var_2 >>= \ happy_var_2 -> amsrl+ (sLL happy_var_1 happy_var_3 (reverse (snd $ unLoc happy_var_2)))+ (AnnList (Just $ glR happy_var_2) (Just $ moc happy_var_1) (Just $ mcc happy_var_3) (fst $ unLoc happy_var_2) [])+ )}}}++happyReduce_839 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_839 = happySpecReduce_3 310# happyReduction_839+happyReduction_839 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut330 happy_x_2 of { (HappyWrap330 happy_var_2) -> + happyIn326+ (happy_var_2 >>= \ happy_var_2 -> amsrl+ (L (getLoc happy_var_2) (reverse (snd $ unLoc happy_var_2)))+ (AnnList (Just $ glR happy_var_2) Nothing Nothing (fst $ unLoc happy_var_2) [])+ )}++happyReduce_840 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_840 = happySpecReduce_2 310# happyReduction_840+happyReduction_840 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn326+ (amsrl (sLL happy_var_1 happy_var_2 []) (AnnList Nothing (Just $ moc happy_var_1) (Just $ mcc happy_var_2) [] [])+ )}}++happyReduce_841 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_841 = happySpecReduce_2 310# happyReduction_841+happyReduction_841 happy_x_2+ happy_x_1+ = happyIn326+ (return $ noLocA []+ )++happyReduce_842 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_842 = happyMonadReduce 2# 311# happyReduction_842+happyReduction_842 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut217 happy_x_1 of { (HappyWrap217 happy_var_1) -> + case happyOut212 happy_x_2 of { (HappyWrap212 happy_var_2) -> + ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->+ fmap ecpFromExp $+ return $ (reLocA $ sLLlA happy_var_1 happy_var_2 $ HsPragE noExtField (unLoc happy_var_1) happy_var_2))}})+ ) (\r -> happyReturn (happyIn327 r))++happyReduce_843 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_843 = happyMonadReduce 2# 312# happyReduction_843+happyReduction_843 (happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest) tk+ = happyThen ((case happyOut217 happy_x_1 of { (HappyWrap217 happy_var_1) -> + case happyOut214 happy_x_2 of { (HappyWrap214 happy_var_2) -> + ( runPV (unECP happy_var_2) >>= \ happy_var_2 ->+ fmap ecpFromExp $+ return $ (reLocA $ sLLlA happy_var_1 happy_var_2 $ HsPragE noExtField (unLoc happy_var_1) happy_var_2))}})+ ) (\r -> happyReturn (happyIn328 r))++happyReduce_844 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_844 = happySpecReduce_1 313# happyReduction_844+happyReduction_844 happy_x_1+ = case happyOut331 happy_x_1 of { (HappyWrap331 happy_var_1) -> + happyIn329+ (happy_var_1 >>= \ happy_var_1 -> return $+ sL1 happy_var_1 (fst $ unLoc happy_var_1,snd $ unLoc happy_var_1)+ )}++happyReduce_845 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_845 = happySpecReduce_2 313# happyReduction_845+happyReduction_845 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut329 happy_x_2 of { (HappyWrap329 happy_var_2) -> + happyIn329+ (happy_var_2 >>= \ happy_var_2 -> return $+ sLL happy_var_1 happy_var_2 (((mz AnnSemi happy_var_1) ++ (fst $ unLoc happy_var_2) )+ ,snd $ unLoc happy_var_2)+ )}}++happyReduce_846 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_846 = happySpecReduce_1 314# happyReduction_846+happyReduction_846 happy_x_1+ = case happyOut332 happy_x_1 of { (HappyWrap332 happy_var_1) -> + happyIn330+ (happy_var_1 >>= \ happy_var_1 -> return $+ sL1 happy_var_1 (fst $ unLoc happy_var_1,snd $ unLoc happy_var_1)+ )}++happyReduce_847 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_847 = happySpecReduce_2 314# happyReduction_847+happyReduction_847 happy_x_2+ happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + case happyOut330 happy_x_2 of { (HappyWrap330 happy_var_2) -> + happyIn330+ (happy_var_2 >>= \ happy_var_2 -> return $+ sLL happy_var_1 happy_var_2 (((mz AnnSemi happy_var_1) ++ (fst $ unLoc happy_var_2) )+ ,snd $ unLoc happy_var_2)+ )}}++happyReduce_848 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_848 = happySpecReduce_3 315# happyReduction_848+happyReduction_848 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut331 happy_x_1 of { (HappyWrap331 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut333 happy_x_3 of { (HappyWrap333 happy_var_3) -> + happyIn331+ (happy_var_1 >>= \ happy_var_1 ->+ happy_var_3 >>= \ happy_var_3 ->+ case snd $ unLoc happy_var_1 of+ [] -> return (sLL happy_var_1 (reLoc happy_var_3) ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)+ ,[happy_var_3]))+ (h:t) -> do+ h' <- addTrailingSemiA h (gl happy_var_2)+ return (sLL happy_var_1 (reLoc happy_var_3) (fst $ unLoc happy_var_1,happy_var_3 : h' : t))+ )}}}++happyReduce_849 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_849 = happySpecReduce_2 315# happyReduction_849+happyReduction_849 happy_x_2+ happy_x_1+ = case happyOut331 happy_x_1 of { (HappyWrap331 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn331+ (happy_var_1 >>= \ happy_var_1 ->+ case snd $ unLoc happy_var_1 of+ [] -> return (sLL happy_var_1 happy_var_2 ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)+ ,[]))+ (h:t) -> do+ h' <- addTrailingSemiA h (gl happy_var_2)+ return (sLL happy_var_1 happy_var_2 (fst $ unLoc happy_var_1, h' : t))+ )}}++happyReduce_850 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_850 = happySpecReduce_1 315# happyReduction_850+happyReduction_850 happy_x_1+ = case happyOut333 happy_x_1 of { (HappyWrap333 happy_var_1) -> + happyIn331+ (happy_var_1 >>= \ happy_var_1 -> return $ sL1 (reLoc happy_var_1) ([],[happy_var_1])+ )}++happyReduce_851 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_851 = happySpecReduce_3 316# happyReduction_851+happyReduction_851 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut332 happy_x_1 of { (HappyWrap332 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + case happyOut334 happy_x_3 of { (HappyWrap334 happy_var_3) -> + happyIn332+ (happy_var_1 >>= \ happy_var_1 ->+ happy_var_3 >>= \ happy_var_3 ->+ case snd $ unLoc happy_var_1 of+ [] -> return (sLL happy_var_1 (reLoc happy_var_3) ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)+ ,[happy_var_3]))+ (h:t) -> do+ h' <- addTrailingSemiA h (gl happy_var_2)+ return (sLL happy_var_1 (reLoc happy_var_3) (fst $ unLoc happy_var_1,happy_var_3 : h' : t))+ )}}}++happyReduce_852 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_852 = happySpecReduce_2 316# happyReduction_852+happyReduction_852 happy_x_2+ happy_x_1+ = case happyOut332 happy_x_1 of { (HappyWrap332 happy_var_1) -> + case happyOutTok happy_x_2 of { happy_var_2 -> + happyIn332+ (happy_var_1 >>= \ happy_var_1 ->+ case snd $ unLoc happy_var_1 of+ [] -> return (sLL happy_var_1 happy_var_2 ((fst $ unLoc happy_var_1) ++ (mz AnnSemi happy_var_2)+ ,[]))+ (h:t) -> do+ h' <- addTrailingSemiA h (gl happy_var_2)+ return (sLL happy_var_1 happy_var_2 (fst $ unLoc happy_var_1, h' : t))+ )}}++happyReduce_853 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_853 = happySpecReduce_1 316# happyReduction_853+happyReduction_853 happy_x_1+ = case happyOut334 happy_x_1 of { (HappyWrap334 happy_var_1) -> + happyIn332+ (happy_var_1 >>= \ happy_var_1 -> return $ sL1 (reLoc happy_var_1) ([],[happy_var_1])+ )}++happyReduce_854 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_854 = happySpecReduce_2 317# happyReduction_854+happyReduction_854 happy_x_2+ happy_x_1+ = case happyOut251 happy_x_1 of { (HappyWrap251 happy_var_1) -> + case happyOut242 happy_x_2 of { (HappyWrap242 happy_var_2) -> + happyIn333+ (happy_var_2 >>= \ happy_var_2 ->+ acsA (\cs -> sLLAsl happy_var_1 happy_var_2+ (Match { m_ext = EpAnn (listAsAnchor happy_var_1) [] cs+ , m_ctxt = CaseAlt -- for \case and \cases, this will be changed during post-processing+ , m_pats = happy_var_1+ , m_grhss = unLoc happy_var_2 }))+ )}}++happyReduce_855 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_855 = happySpecReduce_2 318# happyReduction_855+happyReduction_855 happy_x_2+ happy_x_1+ = case happyOut248 happy_x_1 of { (HappyWrap248 happy_var_1) -> + case happyOut242 happy_x_2 of { (HappyWrap242 happy_var_2) -> + happyIn334+ (happy_var_2 >>= \ happy_var_2 ->+ acsA (\cs -> sLLAsl happy_var_1 happy_var_2+ (Match { m_ext = EpAnn (listAsAnchor happy_var_1) [] cs+ , m_ctxt = CaseAlt -- for \case and \cases, this will be changed during post-processing+ , m_pats = happy_var_1+ , m_grhss = unLoc happy_var_2 }))+ )}}++happyNewToken action sts stk+ = (lexer True)(\tk -> + let cont i = happyDoAction i tk action sts stk in+ case tk of {+ L _ ITeof -> happyDoAction 158# 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 _ ITelse -> cont 8#;+ L _ IThiding -> cont 9#;+ L _ ITif -> cont 10#;+ L _ ITimport -> cont 11#;+ L _ ITin -> cont 12#;+ L _ ITinfix -> cont 13#;+ L _ ITinfixl -> cont 14#;+ L _ ITinfixr -> cont 15#;+ L _ ITinstance -> cont 16#;+ L _ ITlet -> cont 17#;+ L _ ITmodule -> cont 18#;+ L _ ITnewtype -> cont 19#;+ L _ ITof -> cont 20#;+ L _ ITqualified -> cont 21#;+ L _ ITthen -> cont 22#;+ L _ ITtype -> cont 23#;+ L _ ITwhere -> cont 24#;+ L _ (ITforall _) -> cont 25#;+ L _ ITforeign -> cont 26#;+ L _ ITexport -> cont 27#;+ L _ ITlabel -> cont 28#;+ L _ ITdynamic -> cont 29#;+ L _ ITsafe -> cont 30#;+ L _ ITinterruptible -> cont 31#;+ L _ ITunsafe -> cont 32#;+ L _ ITfamily -> cont 33#;+ L _ ITrole -> cont 34#;+ L _ ITstdcallconv -> cont 35#;+ L _ ITccallconv -> cont 36#;+ L _ ITcapiconv -> cont 37#;+ L _ ITprimcallconv -> cont 38#;+ L _ ITjavascriptcallconv -> cont 39#;+ L _ ITproc -> cont 40#;+ L _ ITrec -> cont 41#;+ L _ ITgroup -> cont 42#;+ L _ ITby -> cont 43#;+ L _ ITusing -> cont 44#;+ L _ ITpattern -> cont 45#;+ L _ ITstatic -> cont 46#;+ L _ ITstock -> cont 47#;+ L _ ITanyclass -> cont 48#;+ L _ ITvia -> cont 49#;+ L _ ITunit -> cont 50#;+ L _ ITsignature -> cont 51#;+ L _ ITdependency -> cont 52#;+ L _ (ITinline_prag _ _ _) -> cont 53#;+ L _ (ITopaque_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 _ (ITscc_prag _) -> cont 59#;+ L _ (ITdeprecated_prag _) -> cont 60#;+ L _ (ITwarning_prag _) -> cont 61#;+ L _ (ITunpack_prag _) -> cont 62#;+ L _ (ITnounpack_prag _) -> cont 63#;+ L _ (ITann_prag _) -> cont 64#;+ L _ (ITminimal_prag _) -> cont 65#;+ L _ (ITctype _) -> cont 66#;+ L _ (IToverlapping_prag _) -> cont 67#;+ L _ (IToverlappable_prag _) -> cont 68#;+ L _ (IToverlaps_prag _) -> cont 69#;+ L _ (ITincoherent_prag _) -> cont 70#;+ L _ (ITcomplete_prag _) -> cont 71#;+ L _ ITclose_prag -> cont 72#;+ L _ ITdotdot -> cont 73#;+ L _ ITcolon -> cont 74#;+ L _ (ITdcolon _) -> cont 75#;+ L _ ITequal -> cont 76#;+ L _ ITlam -> cont 77#;+ L _ ITlcase -> cont 78#;+ L _ ITlcases -> cont 79#;+ L _ ITvbar -> cont 80#;+ L _ (ITlarrow _) -> cont 81#;+ L _ (ITrarrow _) -> cont 82#;+ L _ ITlolly -> cont 83#;+ L _ ITat -> cont 84#;+ L _ (ITdarrow _) -> cont 85#;+ L _ ITminus -> cont 86#;+ L _ ITtilde -> cont 87#;+ L _ ITbang -> cont 88#;+ L _ ITprefixminus -> cont 89#;+ L _ (ITstar _) -> cont 90#;+ L _ (ITlarrowtail _) -> cont 91#;+ L _ (ITrarrowtail _) -> cont 92#;+ L _ (ITLarrowtail _) -> cont 93#;+ L _ (ITRarrowtail _) -> cont 94#;+ L _ ITdot -> cont 95#;+ L _ (ITproj True) -> cont 96#;+ L _ (ITproj False) -> cont 97#;+ L _ ITtypeApp -> cont 98#;+ L _ ITpercent -> cont 99#;+ L _ ITocurly -> cont 100#;+ L _ ITccurly -> cont 101#;+ L _ ITvocurly -> cont 102#;+ L _ ITvccurly -> cont 103#;+ L _ ITobrack -> cont 104#;+ L _ ITcbrack -> cont 105#;+ L _ IToparen -> cont 106#;+ L _ ITcparen -> cont 107#;+ L _ IToubxparen -> cont 108#;+ L _ ITcubxparen -> cont 109#;+ L _ (IToparenbar _) -> cont 110#;+ L _ (ITcparenbar _) -> cont 111#;+ L _ ITsemi -> cont 112#;+ L _ ITcomma -> cont 113#;+ L _ ITbackquote -> cont 114#;+ L _ ITsimpleQuote -> cont 115#;+ L _ (ITvarid _) -> cont 116#;+ L _ (ITconid _) -> cont 117#;+ L _ (ITvarsym _) -> cont 118#;+ L _ (ITconsym _) -> cont 119#;+ L _ (ITqvarid _) -> cont 120#;+ L _ (ITqconid _) -> cont 121#;+ L _ (ITqvarsym _) -> cont 122#;+ L _ (ITqconsym _) -> cont 123#;+ L _ (ITdo _) -> cont 124#;+ L _ (ITmdo _) -> cont 125#;+ L _ (ITdupipvarid _) -> cont 126#;+ L _ (ITlabelvarid _ _) -> cont 127#;+ L _ (ITchar _ _) -> cont 128#;+ L _ (ITstring _ _) -> cont 129#;+ L _ (ITinteger _) -> cont 130#;+ L _ (ITrational _) -> cont 131#;+ L _ (ITprimchar _ _) -> cont 132#;+ L _ (ITprimstring _ _) -> cont 133#;+ L _ (ITprimint _ _) -> cont 134#;+ L _ (ITprimword _ _) -> cont 135#;+ L _ (ITprimint8 _ _) -> cont 136#;+ L _ (ITprimint16 _ _) -> cont 137#;+ L _ (ITprimint32 _ _) -> cont 138#;+ L _ (ITprimint64 _ _) -> cont 139#;+ L _ (ITprimword8 _ _) -> cont 140#;+ L _ (ITprimword16 _ _) -> cont 141#;+ L _ (ITprimword32 _ _) -> cont 142#;+ L _ (ITprimword64 _ _) -> cont 143#;+ L _ (ITprimfloat _) -> cont 144#;+ L _ (ITprimdouble _) -> cont 145#;+ L _ (ITopenExpQuote _ _) -> cont 146#;+ L _ ITopenPatQuote -> cont 147#;+ L _ ITopenTypQuote -> cont 148#;+ L _ ITopenDecQuote -> cont 149#;+ L _ (ITcloseQuote _) -> cont 150#;+ L _ (ITopenTExpQuote _) -> cont 151#;+ L _ ITcloseTExpQuote -> cont 152#;+ L _ ITdollar -> cont 153#;+ L _ ITdollardollar -> cont 154#;+ L _ ITtyQuote -> cont 155#;+ L _ (ITquasiQuote _) -> cont 156#;+ L _ (ITqQuasiQuote _) -> cont 157#;+ _ -> happyError' (tk, [])+ })++happyError_ explist 158# 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 Prelude.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)), [Prelude.String]) -> P a+happyError' tk = (\(tokens, explist) -> happyError) tk+parseModuleNoHaddock = happySomeParser where+ happySomeParser = happyThen (happyParse 0#) (\x -> happyReturn (let {(HappyWrap35 x') = happyOut35 x} in x'))++parseSignature = happySomeParser where+ happySomeParser = happyThen (happyParse 1#) (\x -> happyReturn (let {(HappyWrap34 x') = happyOut34 x} in x'))++parseImport = happySomeParser where+ happySomeParser = happyThen (happyParse 2#) (\x -> happyReturn (let {(HappyWrap63 x') = happyOut63 x} in x'))++parseStatement = happySomeParser where+ happySomeParser = happyThen (happyParse 3#) (\x -> happyReturn (let {(HappyWrap255 x') = happyOut255 x} in x'))++parseDeclaration = happySomeParser where+ happySomeParser = happyThen (happyParse 4#) (\x -> happyReturn (let {(HappyWrap82 x') = happyOut82 x} in x'))++parseExpression = happySomeParser where+ happySomeParser = happyThen (happyParse 5#) (\x -> happyReturn (let {(HappyWrap212 x') = happyOut212 x} in x'))++parsePattern = happySomeParser where+ happySomeParser = happyThen (happyParse 6#) (\x -> happyReturn (let {(HappyWrap247 x') = happyOut247 x} in x'))++parseTypeSignature = happySomeParser where+ happySomeParser = happyThen (happyParse 7#) (\x -> happyReturn (let {(HappyWrap208 x') = happyOut208 x} in x'))++parseStmt = happySomeParser where+ happySomeParser = happyThen (happyParse 8#) (\x -> happyReturn (let {(HappyWrap254 x') = happyOut254 x} in x'))++parseIdentifier = happySomeParser where+ happySomeParser = happyThen (happyParse 9#) (\x -> happyReturn (let {(HappyWrap16 x') = happyOut16 x} in x'))++parseType = happySomeParser where+ happySomeParser = happyThen (happyParse 10#) (\x -> happyReturn (let {(HappyWrap164 x') = happyOut164 x} in x'))++parseBackpack = happySomeParser where+ happySomeParser = happyThen (happyParse 11#) (\x -> happyReturn (let {(HappyWrap17 x') = happyOut17 x} in x'))++parseHeader = happySomeParser where+ happySomeParser = happyThen (happyParse 12#) (\x -> happyReturn (let {(HappyWrap43 x') = happyOut43 x} in x'))++happySeq = happyDoSeq+++happyError :: P a+happyError = srcParseFail++getVARID (L _ (ITvarid x)) = x+getCONID (L _ (ITconid x)) = x+getVARSYM (L _ (ITvarsym x)) = x+getCONSYM (L _ (ITconsym x)) = x+getDO (L _ (ITdo x)) = x+getMDO (L _ (ITmdo 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+getPRIMINTEGER8 (L _ (ITprimint8 _ x)) = x+getPRIMINTEGER16 (L _ (ITprimint16 _ x)) = x+getPRIMINTEGER32 (L _ (ITprimint32 _ x)) = x+getPRIMINTEGER64 (L _ (ITprimint64 _ x)) = x+getPRIMWORD8 (L _ (ITprimword8 _ x)) = x+getPRIMWORD16 (L _ (ITprimword16 _ x)) = x+getPRIMWORD32 (L _ (ITprimword32 _ x)) = x+getPRIMWORD64 (L _ (ITprimword64 _ x)) = x+getPRIMFLOAT (L _ (ITprimfloat x)) = x+getPRIMDOUBLE (L _ (ITprimdouble x)) = x+getINLINE (L _ (ITinline_prag _ inl conl)) = (inl,conl)+getSPEC_INLINE (L _ (ITspec_inline_prag src True)) = (Inline src,FunLike)+getSPEC_INLINE (L _ (ITspec_inline_prag src False)) = (NoInline src,FunLike)+getCOMPLETE_PRAGs (L _ (ITcomplete_prag x)) = x+getVOCURLY (L (RealSrcSpan l _) ITvocurly) = srcSpanStartCol l++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+getPRIMINTEGER8s (L _ (ITprimint8 src _)) = src+getPRIMINTEGER16s (L _ (ITprimint16 src _)) = src+getPRIMINTEGER32s (L _ (ITprimint32 src _)) = src+getPRIMINTEGER64s (L _ (ITprimint64 src _)) = src+getPRIMWORD8s (L _ (ITprimword8 src _)) = src+getPRIMWORD16s (L _ (ITprimword16 src _)) = src+getPRIMWORD32s (L _ (ITprimword32 src _)) = src+getPRIMWORD64s (L _ (ITprimword64 src _)) = src++getLABELVARIDs (L _ (ITlabelvarid src _)) = src++-- See Note [Pragma source text] in "GHC.Types.SourceText" for the following+getINLINE_PRAGs (L _ (ITinline_prag _ inl _)) = inlineSpecSource inl+getOPAQUE_PRAGs (L _ (ITopaque_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+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) Nothing++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 (L _ ITlolly) = True+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+ -- We probably actually want to be more restrictive than this+ if ' ' `elem` unpackFS s+ then addFatalError $ mkPlainErrorMsgEnvelope (getLoc lt) $ PsErrSpaceInSCC+ else return s++stringLiteralToHsDocWst :: Located StringLiteral -> Located (WithHsDocIdentifiers StringLiteral GhcPs)+stringLiteralToHsDocWst = lexStringLiteral parseIdentifier++-- Utilities for combining source spans+comb2 :: Located a -> Located b -> SrcSpan+comb2 a b = a `seq` b `seq` combineLocs a b++-- Utilities for combining source spans+comb2A :: Located a -> LocatedAn t b -> SrcSpan+comb2A a b = a `seq` b `seq` combineLocs a (reLoc b)++comb2N :: Located a -> LocatedN b -> SrcSpan+comb2N a b = a `seq` b `seq` combineLocs a (reLocN b)++comb2Al :: LocatedAn t a -> Located b -> SrcSpan+comb2Al a b = a `seq` b `seq` combineLocs (reLoc 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))++comb3A :: Located a -> Located b -> LocatedAn t c -> SrcSpan+comb3A a b c = a `seq` b `seq` c `seq`+ combineSrcSpans (getLoc a) (combineSrcSpans (getLoc b) (getLocA c))++comb3N :: Located a -> Located b -> LocatedN c -> SrcSpan+comb3N a b c = a `seq` b `seq` c `seq`+ combineSrcSpans (getLoc a) (combineSrcSpans (getLoc b) (getLocA c))++comb3M :: Maybe (Located a) -> Located b -> Located c -> SrcSpan+comb3M (Just a) b c = a `seq` b `seq` c `seq`+ combineSrcSpans (getLoc a) (combineSrcSpans (getLoc b) (getLoc c))+comb3M Nothing b c = b `seq` c `seq`+ (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))++comb5 :: Located a -> Located b -> Located c -> Located d -> Located e -> SrcSpan+comb5 a b c d e = a `seq` b `seq` c `seq` d `seq` e `seq`+ (combineSrcSpans (getLoc a) $ combineSrcSpans (getLoc b) $+ combineSrcSpans (getLoc c) $ combineSrcSpans (getLoc d) (getLoc e))++-- strict constructor version:+{-# INLINE sL #-}+sL :: l -> a -> GenLocated l a+sL loc a = loc `seq` a `seq` L loc 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 :: GenLocated l a -> b -> GenLocated l b+sL1 x = sL (getLoc x) -- #define sL1 sL (getLoc $1)++{-# INLINE sL1A #-}+sL1A :: LocatedAn t a -> b -> Located b+sL1A x = sL (getLocA x) -- #define sL1 sL (getLoc $1)++{-# INLINE sL1N #-}+sL1N :: LocatedN a -> b -> Located b+sL1N x = sL (getLocA x) -- #define sL1 sL (getLoc $1)++{-# INLINE sL1a #-}+sL1a :: Located a -> b -> LocatedAn t b+sL1a x = sL (noAnnSrcSpan $ getLoc x) -- #define sL1 sL (getLoc $1)++{-# INLINE sL1l #-}+sL1l :: LocatedAn t a -> b -> LocatedAn u b+sL1l x = sL (l2l $ getLoc x) -- #define sL1 sL (getLoc $1)++{-# INLINE sL1n #-}+sL1n :: Located a -> b -> LocatedN b+sL1n x = L (noAnnSrcSpan $ 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 $>)++{-# INLINE sLLa #-}+sLLa :: Located a -> Located b -> c -> LocatedAn t c+sLLa x y = sL (noAnnSrcSpan $ comb2 x y) -- #define LL sL (comb2 $1 $>)++{-# INLINE sLLlA #-}+sLLlA :: Located a -> LocatedAn t b -> c -> Located c+sLLlA x y = sL (comb2A x y) -- #define LL sL (comb2 $1 $>)++{-# INLINE sLLAl #-}+sLLAl :: LocatedAn t a -> Located b -> c -> Located c+sLLAl x y = sL (comb2A y x) -- #define LL sL (comb2 $1 $>)++{-# INLINE sLLAsl #-}+sLLAsl :: [LocatedAn t a] -> Located b -> c -> Located c+sLLAsl [] = sL1+sLLAsl (x:_) = sLLAl x++{-# INLINE sLLAA #-}+sLLAA :: LocatedAn t a -> LocatedAn u b -> c -> Located c+sLLAA x y = sL (comb2 (reLoc y) (reLoc x)) -- #define LL sL (comb2 $1 $>)+++{- Note [Adding location info]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~++This is done using the three functions below, sL0, sL1+and sLL. Note that these functions were mechanically+converted from the three macros that used to exist before,+namely L0, L1 and LL.++They each add a SrcSpan to their argument.++ sL0 adds 'noSrcSpan', used for empty productions+ -- This doesn't seem to work anymore -=chak++ sL1 for a production with a single token on the lhs. Grabs the SrcSpan+ from that token.++ sLL for a production with >1 token on the lhs. Makes up a SrcSpan from+ the first and last tokens.++These suffice for the majority of cases. However, we must be+especially careful with empty productions: sLL won't work if the first+or last token on the lhs can represent an empty span. In these cases,+we have to calculate the span using more of the tokens from the lhs, eg.++ | 'newtype' tycl_hdr '=' newconstr deriving+ { L (comb3 $1 $4 $5)+ (mkTyData NewType (unLoc $2) $4 (unLoc $5)) }++We provide comb3 and comb4 functions which are useful in such cases.++Be careful: there's no checking that you actually got this right, the+only symptom will be that the SrcSpans of your syntax will be+incorrect.++-}++-- Make a source location for the file. We're a bit lazy here and just+-- make a point SrcSpan at line 1, column 0. Strictly speaking we should+-- try to find the span of the whole file (ToDo).+fileSrcSpan :: P SrcSpan+fileSrcSpan = do+ l <- getRealSrcLoc;+ let loc = mkSrcLoc (srcLocFile l) 1 1;+ return (mkSrcSpan loc loc)++-- Hint about linear types+hintLinear :: MonadP m => SrcSpan -> m ()+hintLinear span = do+ linearEnabled <- getBit LinearTypesBit+ unless linearEnabled $ addError $ mkPlainErrorMsgEnvelope span $ PsErrLinearFunction++-- Does this look like (a %m)?+looksLikeMult :: LHsType GhcPs -> LocatedN RdrName -> LHsType GhcPs -> Bool+looksLikeMult ty1 l_op ty2+ | Unqual op_name <- unLoc l_op+ , occNameFS op_name == fsLit "%"+ , Strict.Just ty1_pos <- getBufSpan (getLocA ty1)+ , Strict.Just pct_pos <- getBufSpan (getLocA l_op)+ , Strict.Just ty2_pos <- getBufSpan (getLocA ty2)+ , bufSpanEnd ty1_pos /= bufSpanStart pct_pos+ , bufSpanEnd pct_pos == bufSpanStart ty2_pos+ = True+ | otherwise = False++-- Hint about the MultiWayIf extension+hintMultiWayIf :: SrcSpan -> P ()+hintMultiWayIf span = do+ mwiEnabled <- getBit MultiWayIfBit+ unless mwiEnabled $ addError $ mkPlainErrorMsgEnvelope span PsErrMultiWayIf++-- Hint about explicit-forall+hintExplicitForall :: Located Token -> P ()+hintExplicitForall tok = do+ forall <- getBit ExplicitForallBit+ rulePrag <- getBit InRulePragBit+ unless (forall || rulePrag) $ addError $ mkPlainErrorMsgEnvelope (getLoc tok) $+ (PsErrExplicitForall (isUnicode tok))++-- Hint about qualified-do+hintQualifiedDo :: Located Token -> P ()+hintQualifiedDo tok = do+ qualifiedDo <- getBit QualifiedDoBit+ case maybeQDoDoc of+ Just qdoDoc | not qualifiedDo ->+ addError $ mkPlainErrorMsgEnvelope (getLoc tok) $+ (PsErrIllegalQualifiedDo qdoDoc)+ _ -> return ()+ where+ maybeQDoDoc = case unLoc tok of+ ITdo (Just m) -> Just $ ftext m <> text ".do"+ ITmdo (Just m) -> Just $ ftext m <> text ".mdo"+ t -> Nothing++-- When two single quotes don't followed by tyvar or gtycon, we report the+-- error as empty character literal, or TH quote that missing proper type+-- variable or constructor. See #13450.+reportEmptyDoubleQuotes :: SrcSpan -> P a+reportEmptyDoubleQuotes span = do+ thQuotes <- getBit ThQuotesBit+ addFatalError $ mkPlainErrorMsgEnvelope span $ PsErrEmptyDoubleQuotes thQuotes++{-+%************************************************************************+%* *+ Helper functions for generating annotations in the parser+%* *+%************************************************************************++For the general principles of the following routines, see Note [exact print annotations]+in GHC.Parser.Annotation++-}++-- |Construct an AddEpAnn from the annotation keyword and the location+-- of the keyword itself+mj :: AnnKeywordId -> Located e -> AddEpAnn+mj a l = AddEpAnn a (srcSpan2e $ gl l)++mjN :: AnnKeywordId -> LocatedN e -> AddEpAnn+mjN a l = AddEpAnn a (srcSpan2e $ glN l)++-- |Construct an AddEpAnn from the annotation keyword and the location+-- of the keyword itself, provided the span is not zero width+mz :: AnnKeywordId -> Located e -> [AddEpAnn]+mz a l = if isZeroWidthSpan (gl l) then [] else [AddEpAnn a (srcSpan2e $ gl l)]++msemi :: Located e -> [TrailingAnn]+msemi l = if isZeroWidthSpan (gl l) then [] else [AddSemiAnn (srcSpan2e $ gl l)]++msemim :: Located e -> Maybe EpaLocation+msemim l = if isZeroWidthSpan (gl l) then Nothing else Just (srcSpan2e $ gl l)++-- |Construct an AddEpAnn 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 -> AddEpAnn+mu a lt@(L l t) = AddEpAnn (toUnicodeAnn a lt) (srcSpan2e 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++toUnicode :: Located Token -> IsUnicodeSyntax+toUnicode t = if isUnicode t then UnicodeSyntax else NormalSyntax++gl :: GenLocated l a -> l+gl = getLoc++glA :: LocatedAn t a -> SrcSpan+glA = getLocA++glN :: LocatedN a -> SrcSpan+glN = getLocA++glR :: Located a -> Anchor+glR la = Anchor (realSrcSpan $ getLoc la) UnchangedAnchor++glMR :: Maybe (Located a) -> Located b -> Anchor+glMR (Just la) _ = glR la+glMR _ la = glR la++glAA :: Located a -> EpaLocation+glAA = srcSpan2e . getLoc++glRR :: Located a -> RealSrcSpan+glRR = realSrcSpan . getLoc++glAR :: LocatedAn t a -> Anchor+glAR la = Anchor (realSrcSpan $ getLocA la) UnchangedAnchor++glNR :: LocatedN a -> Anchor+glNR ln = Anchor (realSrcSpan $ getLocA ln) UnchangedAnchor++glNRR :: LocatedN a -> EpaLocation+glNRR = srcSpan2e . getLocA++anc :: RealSrcSpan -> Anchor+anc r = Anchor r UnchangedAnchor++acs :: MonadP m => (EpAnnComments -> Located a) -> m (Located a)+acs a = do+ let (L l _) = a emptyComments+ cs <- getCommentsFor l+ return (a cs)++-- Called at the very end to pick up the EOF position, as well as any comments not allocated yet.+acsFinal :: (EpAnnComments -> Maybe (RealSrcSpan, RealSrcSpan) -> Located a) -> P (Located a)+acsFinal a = do+ let (L l _) = a emptyComments Nothing+ cs <- getCommentsFor l+ csf <- getFinalCommentsFor l+ meof <- getEofPos+ let ce = case meof of+ Strict.Nothing -> Nothing+ Strict.Just (pos `Strict.And` gap) -> Just (pos,gap)+ return (a (cs Semi.<> csf) ce)+++acsa :: MonadP m => (EpAnnComments -> LocatedAn t a) -> m (LocatedAn t a)+acsa a = do+ let (L l _) = a emptyComments+ cs <- getCommentsFor (locA l)+ return (a cs)++acsA :: MonadP m => (EpAnnComments -> Located a) -> m (LocatedAn t a)+acsA a = reLocA <$> acs a++acsExpr :: (EpAnnComments -> LHsExpr GhcPs) -> P ECP+acsExpr a = do { expr :: (LHsExpr GhcPs) <- runPV $ acsa a+ ; return (ecpFromExp $ expr) }++amsA :: MonadP m => LocatedA a -> [TrailingAnn] -> m (LocatedA a)+amsA (L l a) bs = do+ cs <- getCommentsFor (locA l)+ return (L (addAnnsA l bs cs) a)++amsAl :: MonadP m => LocatedA a -> SrcSpan -> [TrailingAnn] -> m (LocatedA a)+amsAl (L l a) loc bs = do+ cs <- getCommentsFor loc+ return (L (addAnnsA l bs cs) a)++amsrc :: MonadP m => Located a -> AnnContext -> m (LocatedC a)+amsrc a@(L l _) bs = do+ cs <- getCommentsFor l+ return (reAnnC bs cs a)++amsrl :: MonadP m => Located a -> AnnList -> m (LocatedL a)+amsrl a@(L l _) bs = do+ cs <- getCommentsFor l+ return (reAnnL bs cs a)++amsrp :: MonadP m => Located a -> AnnPragma -> m (LocatedP a)+amsrp a@(L l _) bs = do+ cs <- getCommentsFor l+ return (reAnnL bs cs a)++amsrn :: MonadP m => Located a -> NameAnn -> m (LocatedN a)+amsrn (L l a) an = do+ cs <- getCommentsFor l+ let ann = (EpAnn (spanAsAnchor l) an cs)+ return (L (SrcSpanAnn ann l) a)++-- |Synonyms for AddEpAnn versions of AnnOpen and AnnClose+mo,mc :: Located Token -> AddEpAnn+mo ll = mj AnnOpen ll+mc ll = mj AnnClose ll++moc,mcc :: Located Token -> AddEpAnn+moc ll = mj AnnOpenC ll+mcc ll = mj AnnCloseC ll++mop,mcp :: Located Token -> AddEpAnn+mop ll = mj AnnOpenP ll+mcp ll = mj AnnCloseP ll++moh,mch :: Located Token -> AddEpAnn+moh ll = mj AnnOpenPH ll+mch ll = mj AnnClosePH ll++mos,mcs :: Located Token -> AddEpAnn+mos ll = mj AnnOpenS ll+mcs ll = mj AnnCloseS ll++pvA :: MonadP m => m (Located a) -> m (LocatedAn t a)+pvA a = do { av <- a+ ; return (reLocA av) }++pvN :: MonadP m => m (Located a) -> m (LocatedN a)+pvN a = do { (L l av) <- a+ ; return (L (noAnnSrcSpan l) av) }++pvL :: MonadP m => m (LocatedAn t a) -> m (Located a)+pvL a = do { av <- a+ ; return (reLoc av) }++-- | Parse a Haskell module with Haddock comments.+-- This is done in two steps:+--+-- * 'parseModuleNoHaddock' to build the AST+-- * 'addHaddockToModule' to insert Haddock comments into it+--+-- This is the only parser entry point that deals with Haddock comments.+-- The other entry points ('parseDeclaration', 'parseExpression', etc) do+-- not insert them into the AST.+parseModule :: P (Located (HsModule GhcPs))+parseModule = parseModuleNoHaddock >>= addHaddockToModule++commentsA :: (Monoid ann) => SrcSpan -> EpAnnComments -> SrcSpanAnn' (EpAnn ann)+commentsA loc cs = SrcSpanAnn (EpAnn (Anchor (rs loc) UnchangedAnchor) mempty cs) loc++-- | Instead of getting the *enclosed* comments, this includes the+-- *preceding* ones. It is used at the top level to get comments+-- between top level declarations.+commentsPA :: (Monoid ann) => LocatedAn ann a -> P (LocatedAn ann a)+commentsPA la@(L l a) = do+ cs <- getPriorCommentsFor (getLocA la)+ return (L (addCommentsToSrcAnn l cs) a)++rs :: SrcSpan -> RealSrcSpan+rs (RealSrcSpan l _) = l+rs _ = panic "Parser should only have RealSrcSpan"++hsDoAnn :: Located a -> LocatedAn t b -> AnnKeywordId -> AnnList+hsDoAnn (L l _) (L ll _) kw+ = AnnList (Just $ spanAsAnchor (locA ll)) Nothing Nothing [AddEpAnn kw (srcSpan2e l)] []++listAsAnchor :: [LocatedAn t a] -> Anchor+listAsAnchor [] = spanAsAnchor noSrcSpan+listAsAnchor (L l _:_) = spanAsAnchor (locA l)++hsTok :: Located Token -> LHsToken tok GhcPs+hsTok (L l _) = L (mkTokenLocation l) HsTok++hsTok' :: Located Token -> Located (HsToken tok)+hsTok' (L l _) = L l HsTok hsUniTok :: Located Token -> LHsUniToken tok utok GhcPs hsUniTok t@(L l _) =
GHC/Parser/Annotation.hs view
@@ -15,6 +15,7 @@ AddEpAnn(..), EpaLocation(..), epaLocationRealSrcSpan, epaLocationFromSrcAnn, TokenLocation(..),+ getTokenSrcSpan, DeltaPos(..), deltaPos, getDeltaLine, EpAnn(..), Anchor(..), AnchorOperation(..),@@ -412,6 +413,11 @@ data TokenLocation = NoTokenLoc | TokenLoc !EpaLocation deriving (Data,Eq) +getTokenSrcSpan :: TokenLocation -> SrcSpan+getTokenSrcSpan NoTokenLoc = noSrcSpan+getTokenSrcSpan (TokenLoc EpaDelta{}) = noSrcSpan+getTokenSrcSpan (TokenLoc (EpaSpan rspan mbufpos)) = RealSrcSpan rspan mbufpos+ instance Outputable a => Outputable (GenLocated TokenLocation a) where ppr (L _ x) = ppr x @@ -751,7 +757,10 @@ } -- | Used for @->@, as an identifier | NameAnnRArrow {+ nann_unicode :: Bool,+ nann_mopen :: Maybe EpaLocation, nann_name :: EpaLocation,+ nann_mclose :: Maybe EpaLocation, nann_trailing :: [TrailingAnn] } -- | Used for an item with a leading @'@. The annotation for@@ -914,7 +923,7 @@ realSrcSpan (RealSrcSpan s _) = s realSrcSpan _ = mkRealSrcSpan l l -- AZ temporary where- l = mkRealSrcLoc (fsLit "foo") (-1) (-1)+ l = mkRealSrcLoc (fsLit "realSrcSpan") (-1) (-1) srcSpan2e :: SrcSpan -> EpaLocation srcSpan2e (RealSrcSpan s mb) = EpaSpan s mb@@ -1282,8 +1291,8 @@ = text "NameAnnBars" <+> ppr a <+> ppr o <+> ppr n <+> ppr b <+> ppr t ppr (NameAnnOnly a o c t) = text "NameAnnOnly" <+> ppr a <+> ppr o <+> ppr c <+> ppr t- ppr (NameAnnRArrow n t)- = text "NameAnnRArrow" <+> ppr n <+> ppr t+ ppr (NameAnnRArrow u o n c t)+ = text "NameAnnRArrow" <+> ppr u <+> ppr o <+> ppr n <+> ppr c <+> ppr t ppr (NameAnnQuote q n t) = text "NameAnnQuote" <+> ppr q <+> ppr n <+> ppr t ppr (NameAnnTrailing t)
GHC/Parser/Errors/Ppr.hs view
@@ -39,10 +39,9 @@ instance Diagnostic PsMessage where type DiagnosticOpts PsMessage = NoDiagnosticOpts- defaultDiagnosticOpts = NoDiagnosticOpts- diagnosticMessage _ = \case- PsUnknownMessage (UnknownDiagnostic @e m)- -> diagnosticMessage (defaultDiagnosticOpts @e) m+ diagnosticMessage opts = \case+ PsUnknownMessage (UnknownDiagnostic f m)+ -> diagnosticMessage (f opts) m PsHeaderMessage m -> psHeaderMessageDiagnostic m@@ -430,14 +429,6 @@ -> mkSimpleDecorated $ text "Malformed" <+> what <+> text "declaration for" <+> quotes (ppr for)- PsErrUnexpectedTypeAppInDecl ki what for- -> mkSimpleDecorated $- vcat [ text "Unexpected type application"- <+> text "@" <> ppr ki- , text "In the" <+> what- <+> text "declaration for"- <+> quotes (ppr for)- ] PsErrNotADataCon name -> mkSimpleDecorated $ text "Not a data constructor:" <+> quotes (ppr name) PsErrInferredTypeVarNotAllowed@@ -626,7 +617,6 @@ PsErrAtInPatPos -> ErrorWithoutFlag PsErrParseErrorOnInput{} -> ErrorWithoutFlag PsErrMalformedDecl{} -> ErrorWithoutFlag- PsErrUnexpectedTypeAppInDecl{} -> ErrorWithoutFlag PsErrNotADataCon{} -> ErrorWithoutFlag PsErrInferredTypeVarNotAllowed -> ErrorWithoutFlag PsErrIllegalTraditionalRecordSyntax{} -> ErrorWithoutFlag@@ -767,7 +757,6 @@ PsErrAtInPatPos -> noHints PsErrParseErrorOnInput{} -> noHints PsErrMalformedDecl{} -> noHints- PsErrUnexpectedTypeAppInDecl{} -> noHints PsErrNotADataCon{} -> noHints PsErrInferredTypeVarNotAllowed -> noHints PsErrIllegalTraditionalRecordSyntax{} -> [suggestExtension LangExt.TraditionalRecordSyntax]
GHC/Parser/Errors/Types.hs view
@@ -68,7 +68,7 @@ arbitrary messages to be embedded. The typical use case would be GHC plugins willing to emit custom diagnostics. -}- PsUnknownMessage UnknownDiagnostic+ PsUnknownMessage (UnknownDiagnostic (DiagnosticOpts PsMessage)) {-| A group of parser messages emitted in 'GHC.Parser.Header'. See Note [Messages from GHC.Parser.Header].@@ -366,9 +366,6 @@ -- | Malformed ... declaration for ... | PsErrMalformedDecl !SDoc !RdrName-- -- | Unexpected type application in a declaration- | PsErrUnexpectedTypeAppInDecl !(LHsType GhcPs) !SDoc !RdrName -- | Not a data constructor | PsErrNotADataCon !RdrName
GHC/Parser/HaddockLex.hs view
@@ -1,7 +1,7 @@ {-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-missing-signatures #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-}-{-# LINE 1 "_build/source-dist/ghc-9.6.7-src/ghc-9.6.7/compiler/GHC/Parser/HaddockLex.x" #-}+{-# LINE 1 "_build/source-dist/ghc-9.8.1-src/ghc-9.8.1/compiler/GHC/Parser/HaddockLex.x" #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -funbox-strict-fields #-}@@ -19,7 +19,6 @@ import GHC.Data.StringBuffer import qualified GHC.Data.Strict as Strict import GHC.Types.Name.Reader-import GHC.Utils.Outputable import GHC.Utils.Error import GHC.Utils.Encoding import GHC.Hs.Extension@@ -110,7 +109,7 @@ , (0,alex_action_1) ] -{-# LINE 87 "_build/source-dist/ghc-9.6.7-src/ghc-9.6.7/compiler/GHC/Parser/HaddockLex.x" #-}+{-# LINE 86 "_build/source-dist/ghc-9.8.1-src/ghc-9.8.1/compiler/GHC/Parser/HaddockLex.x" #-} data AlexInput = AlexInput { alexInput_position :: !RealSrcLoc , alexInput_string :: !ByteString@@ -206,14 +205,7 @@ dopts [] False False False False- dopts = DiagOpts- { diag_warning_flags = EnumSet.empty- , diag_fatal_warning_flags = EnumSet.empty- , diag_warn_is_error = False- , diag_reverse_errors = False- , diag_max_errors = Nothing- , diag_ppr_ctx = defaultSDocContext- }+ dopts = emptyDiagOpts buffer = stringBufferFromByteString str0 realSrcLc = case mloc of RealSrcSpan loc _ -> realSrcSpanStart loc
GHC/Parser/Lexer.hs view
@@ -1,3773 +1,4066 @@ {-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-missing-signatures #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-}-{-# LINE 43 "_build/source-dist/ghc-9.6.7-src/ghc-9.6.7/compiler/GHC/Parser/Lexer.x" #-}-{-# LANGUAGE BangPatterns #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE MultiWayIf #-}-{-# LANGUAGE UnboxedTuples #-}-{-# LANGUAGE UnboxedSums #-}-{-# LANGUAGE UnliftedNewtypes #-}-{-# LANGUAGE PatternSynonyms #-}---{-# OPTIONS_GHC -funbox-strict-fields #-}-{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}--module GHC.Parser.Lexer (- Token(..), lexer, lexerDbg,- ParserOpts(..), mkParserOpts,- PState (..), initParserState, initPragState,- P(..), ParseResult(POk, PFailed),- allocateComments, allocatePriorComments, allocateFinalComments,- MonadP(..),- getRealSrcLoc, getPState,- failMsgP, failLocMsgP, srcParseFail,- getPsErrorMessages, getPsMessages,- popContext, pushModuleContext, setLastToken, setSrcLoc,- activeContext, nextIsEOF,- getLexState, popLexState, pushLexState,- ExtBits(..),- xtest, xunset, xset,- disableHaddock,- lexTokenStream,- mkParensEpAnn,- getCommentsFor, getPriorCommentsFor, getFinalCommentsFor,- getEofPos,- commentToAnnotation,- HdkComment(..),- warnopt,- adjustChar,- addPsMessage- ) where--import GHC.Prelude-import qualified GHC.Data.Strict as Strict---- base-import Control.Monad-import Control.Applicative-import Data.Char-import Data.List (stripPrefix, isInfixOf, partition)-import Data.List.NonEmpty ( NonEmpty(..) )-import qualified Data.List.NonEmpty as NE-import Data.Maybe-import Data.Word-import Debug.Trace (trace)--import GHC.Data.EnumSet as 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-import GHC.Utils.Error-import GHC.Utils.Outputable-import GHC.Utils.Panic-import GHC.Data.StringBuffer-import GHC.Data.FastString-import GHC.Types.Error-import GHC.Types.Unique.FM-import GHC.Data.Maybe-import GHC.Data.OrdList-import GHC.Utils.Misc ( readSignificandExponentPair, readHexSignificandExponentPair )--import GHC.Types.SrcLoc-import GHC.Types.SourceText-import GHC.Types.Basic ( InlineSpec(..), RuleMatchInfo(..))-import GHC.Hs.Doc--import GHC.Parser.CharClass--import GHC.Parser.Annotation-import GHC.Driver.Flags-import GHC.Parser.Errors.Basic-import GHC.Parser.Errors.Types-import GHC.Parser.Errors.Ppr ()-#if __GLASGOW_HASKELL__ >= 603-#include "ghcconfig.h"-#elif defined(__GLASGOW_HASKELL__)-#include "config.h"-#endif-#if __GLASGOW_HASKELL__ >= 503-import Data.Array-#else-import Array-#endif-#if __GLASGOW_HASKELL__ >= 503-import Data.Array.Base (unsafeAt)-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\xf7\x00\x00\x00\x05\x01\x00\x00\x2f\x01\x00\x00\x4b\x01\x00\x00\x86\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\xff\xff\xff\x00\x00\x00\x00\x03\x02\x00\x00\xd7\xff\xff\xff\xc3\x00\x00\x00\x7d\x02\x00\x00\x8b\xff\xff\xff\xd7\x02\x00\x00\x00\x00\x00\x00\x17\x03\x00\x00\x91\x03\x00\x00\xcb\x03\x00\x00\x25\x04\x00\x00\x9f\x04\x00\x00\x64\x01\x00\x00\xfc\x00\x00\x00\x15\x05\x00\x00\xdc\xff\xff\xff\x2e\x05\x00\x00\x92\xff\xff\xff\x00\x00\x00\x00\xe3\xff\xff\xff\x94\xff\xff\xff\x61\x00\x00\x00\x00\x00\x00\x00\x85\x01\x00\x00\xa4\x05\x00\x00\x39\x01\x00\x00\xe4\x05\x00\x00\x62\x06\x00\x00\x81\x00\x00\x00\x82\x00\x00\x00\x6a\x01\x00\x00\x08\x00\x00\x00\x09\x00\x00\x00\xe0\x06\x00\x00\xe1\x01\x00\x00\x56\x07\x00\x00\xa0\x01\x00\x00\x96\x07\x00\x00\x14\x08\x00\x00\x92\x08\x00\x00\x0c\x09\x00\x00\x86\x09\x00\x00\x00\x0a\x00\x00\x7a\x0a\x00\x00\x28\x01\x00\x00\xf4\x0a\x00\x00\x6e\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe7\xff\xff\xff\xe8\x0b\x00\x00\x62\x0c\x00\x00\x1f\x02\x00\x00\xf4\xff\xff\xff\x0c\x00\x00\x00\x00\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\xa6\xff\xff\xff\xbc\x0c\x00\x00\xb8\xff\xff\xff\xb3\xff\xff\xff\xae\xff\xff\xff\xbb\xff\xff\xff\x13\x00\x00\x00\x00\x00\x00\x00\x71\x00\x00\x00\xb5\xff\xff\xff\xb1\xff\xff\xff\x6c\x03\x00\x00\x5b\x02\x00\x00\x8a\x05\x00\x00\x7a\x04\x00\x00\x36\x07\x00\x00\x6e\x02\x00\x00\x14\x0d\x00\x00\x4c\x07\x00\x00\x1d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf7\x02\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x21\x04\x00\x00\xf0\x00\x00\x00\x49\x01\x00\x00\x51\x0d\x00\x00\x79\x0d\x00\x00\xbc\x0d\x00\x00\xe4\x0d\x00\x00\x56\x00\x00\x00\x27\x0e\x00\x00\x4f\x0e\x00\x00\x89\x00\x00\x00\x8a\x00\x00\x00\x8b\x00\x00\x00\x8c\x00\x00\x00\x8d\x00\x00\x00\x8e\x00\x00\x00\x8f\x00\x00\x00\x6d\x00\x00\x00\x05\x02\x00\x00\x00\x00\x00\x00\xec\x00\x00\x00\x8f\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x00\x00\x00\x7d\x00\x00\x00\x7e\x00\x00\x00\x7f\x00\x00\x00\xf6\x04\x00\x00\xdc\x0e\x00\x00\x08\x03\x00\x00\x1d\x0f\x00\x00\x90\x04\x00\x00\x47\x0b\x00\x00\x5e\x0f\x00\x00\x0a\x05\x00\x00\x9f\x0f\x00\x00\x76\x03\x00\x00\xe0\x0f\x00\x00\x45\x05\x00\x00\xc1\x0b\x00\x00\x21\x10\x00\x00\x95\x05\x00\x00\x2b\x04\x00\x00\x4f\x05\x00\x00\x55\x0a\x00\x00\xbe\x06\x00\x00\x3d\x0c\x00\x00\xc5\x05\x00\x00\x73\x08\x00\x00\x3a\x06\x00\x00\xea\x08\x00\x00\xd1\x06\x00\x00\x65\x10\x00\x00\xa6\x10\x00\x00\x67\x09\x00\x00\x2f\x05\x00\x00\xbf\x00\x00\x00\xba\x00\x00\x00\x33\x0d\x00\x00\xbf\x10\x00\x00\x08\x11\x00\x00\x49\x11\x00\x00\xe1\x09\x00\x00\xd2\x0a\x00\x00\x79\x02\x00\x00\xc4\x00\x00\x00\x62\x11\x00\x00\x83\x11\x00\x00\xc6\x11\x00\x00\xfb\x11\x00\x00\x41\x12\x00\x00\x64\x12\x00\x00\x87\x12\x00\x00\x80\x00\x00\x00\x90\x00\x00\x00\x9b\x00\x00\x00\x9c\x00\x00\x00\xa1\x00\x00\x00\xa9\x00\x00\x00\xc7\x12\x00\x00\x41\x13\x00\x00\xbb\x13\x00\x00\x35\x14\x00\x00\xaf\x14\x00\x00\x29\x15\x00\x00\xa3\x15\x00\x00\x1d\x16\x00\x00\x97\x16\x00\x00\x11\x17\x00\x00\x4b\x17\x00\x00\xc5\x17\x00\x00\x3f\x18\x00\x00\xb9\x18\x00\x00\x42\x00\x00\x00\x67\x00\x00\x00\x47\x00\x00\x00\x6a\x00\x00\x00\x33\x19\x00\x00\xad\x19\x00\x00\x27\x1a\x00\x00\xa1\x1a\x00\x00\x1b\x1b\x00\x00\x95\x1b\x00\x00\x0f\x1c\x00\x00\x89\x1c\x00\x00\x03\x1d\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\x7d\x1d\x00\x00\x00\x00\x00\x00\xbd\x00\x00\x00\x00\x00\x00\x00\xfb\x1d\x00\x00\x75\x1e\x00\x00\x00\x00\x00\x00\xcf\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x1f\x00\x00\x00\x00\x00\x00\x8b\x1f\x00\x00\x23\x01\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x07\x20\x00\x00\x00\x00\x00\x00\x83\x20\x00\x00\x00\x00\x00\x00\xff\x20\x00\x00\x00\x00\x00\x00\x70\x00\x00\x00\x00\x00\x00\x00\x59\x21\x00\x00"#--alex_table :: AlexAddr-alex_table = AlexA#- "\x00\x00\x0d\x00\xc2\x00\x44\x00\x12\x00\xb9\x00\x7a\x00\x63\x00\x16\x00\x21\x00\x79\x00\x3f\x00\x7a\x00\x7a\x00\x7a\x00\x22\x00\x24\x00\x26\x00\xff\xff\xff\xff\x3c\x00\x48\x00\x49\x00\x4b\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x56\x00\x5f\x00\xff\xff\x7a\x00\xb9\x00\x7c\x00\xe7\x00\xb9\x00\xb9\x00\xb9\x00\x7d\x00\xe9\x00\xe4\x00\xb9\x00\xb9\x00\xe1\x00\xb8\x00\xb9\x00\xb9\x00\xb6\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb7\x00\xe0\x00\xb9\x00\xb9\x00\xb9\x00\x20\x00\xb9\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\x19\x00\xb9\x00\xe2\x00\xb9\x00\xc5\x00\xdf\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x11\x00\xee\x00\xdd\x00\xb9\x00\x7a\x00\x65\x00\x60\x00\x6e\x00\x79\x00\x61\x00\x7a\x00\x7a\x00\x7a\x00\x7a\x00\x65\x00\xff\xff\xff\xff\x79\x00\x6e\x00\x7a\x00\x7a\x00\x7a\x00\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x46\x00\x7e\x00\x80\x00\x54\x00\x82\x00\x83\x00\x84\x00\x85\x00\xbc\x00\x7a\x00\x7a\x00\x65\x00\x41\x00\x6d\x00\x79\x00\x42\x00\x7a\x00\x7a\x00\x7a\x00\x76\x00\x6b\x00\xd1\x00\x6d\x00\x31\x00\xbf\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\xbd\x00\xbf\x00\x7a\x00\x7a\x00\x65\x00\xd3\x00\xc0\x00\x79\x00\x42\x00\x7a\x00\x7a\x00\x7a\x00\x7a\x00\x65\x00\xc1\x00\x6d\x00\x79\x00\x42\x00\x7a\x00\x7a\x00\x7a\x00\x7a\x00\x65\x00\xd0\x00\xd2\x00\x79\x00\x78\x00\x7a\x00\x7a\x00\x7a\x00\x7a\x00\x55\x00\x26\x00\xd3\x00\xe8\x00\x4c\x00\x88\x00\xf4\x00\x14\x00\x7a\x00\x13\x00\x0f\x00\xd3\x00\x6d\x00\xab\x00\xab\x00\xfc\x00\x0f\x00\x7a\x00\xab\x00\xab\x00\x7a\x00\x6d\x00\x00\x00\xb3\x00\xb3\x00\x77\x00\x7a\x00\x7a\x00\x7a\x00\xff\xff\x6d\x00\x7a\x00\x65\x00\x00\x00\x77\x00\x79\x00\x1d\x00\x7a\x00\x7a\x00\x7a\x00\x00\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x2e\x00\x64\x00\x7a\x00\x00\x00\x2f\x00\xff\xff\x2e\x00\x2e\x00\x2e\x00\x00\x00\x72\x00\x00\x00\x00\x00\x7a\x00\x00\x00\xac\x00\x72\x00\x43\x00\x1d\x00\x00\x00\xac\x00\x1f\x00\x00\x00\x0f\x00\x00\x00\xb4\x00\x6d\x00\x2e\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x2d\x00\x00\x00\x7a\x00\x65\x00\x00\x00\x43\x00\x79\x00\xef\x00\x7a\x00\x7a\x00\x7a\x00\x00\x00\x29\x00\x0f\x00\x43\x00\x40\x00\x00\x00\x00\x00\x29\x00\x29\x00\x29\x00\x0f\x00\xf4\x00\x77\x00\x00\x00\x3d\x00\x0f\x00\x0f\x00\x72\x00\x7a\x00\x7a\x00\x65\x00\x0f\x00\xff\xff\x79\x00\x00\x00\x7a\x00\x7a\x00\x7a\x00\x29\x00\x00\x00\x2a\x00\x6d\x00\x00\x00\x00\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x00\x00\x00\x00\x7a\x00\x72\x00\x71\x00\x23\x00\x2e\x00\x00\x00\x00\x00\x77\x00\x71\x00\xff\xff\x2e\x00\x2e\x00\x2e\x00\x25\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\xc3\x00\xc4\x00\x00\x00\x2e\x00\x7a\x00\x65\x00\x00\x00\x00\x00\x79\x00\x3f\x00\x7a\x00\x7a\x00\x7a\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x00\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x34\x00\x7a\x00\x71\x00\x00\x00\xf5\x00\x77\x00\x34\x00\x34\x00\x34\x00\xe5\x00\xe4\x00\x00\x00\x00\x00\xe1\x00\x6d\x00\x00\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x00\x00\x34\x00\xe0\x00\x35\x00\x1c\x00\x00\x00\x71\x00\x77\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xe3\x00\x00\x00\xe2\x00\x27\x00\xc4\x00\xdf\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xde\x00\x00\x00\xdd\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x00\x00\x39\x00\x39\x00\x39\x00\x39\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x7a\x00\xf4\x00\x00\x00\x00\x00\x10\x00\x0f\x00\x7a\x00\x7a\x00\x7a\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x7a\x00\x32\x00\x00\x00\x47\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x0f\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x38\x00\x38\x00\x38\x00\x0f\x00\x37\x00\x00\x00\x38\x00\x00\x00\x00\x00\x37\x00\x37\x00\x37\x00\x37\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x37\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x00\x00\xb3\x00\xb3\x00\x00\x00\x00\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\xb4\x00\x00\x00\x00\x00\xb9\x00\x38\x00\x00\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\x00\x00\x00\x00\x00\x00\xb9\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\x1b\x00\x1b\x00\x1b\x00\x00\x00\x17\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x17\x00\x17\x00\x17\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\xb9\x00\x00\x00\xb9\x00\x00\x00\x17\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x00\x00\x00\x00\xb9\x00\x16\x00\xb9\x00\x62\x00\x00\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x18\x00\x18\x00\x18\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x00\x00\xa6\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\x1a\x00\x00\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x57\x00\x18\x00\xf3\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\xf1\x00\x00\x00\x00\x00\xf3\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf9\x00\x7b\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xfb\x00\xf3\x00\xf3\x00\xf3\x00\xf7\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x00\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x66\x00\x00\x00\x00\x00\x00\x00\xf1\x00\x00\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\x1b\x00\x1b\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x00\x00\x00\x90\x00\x00\x00\xa6\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x00\x00\x00\x00\x00\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\x8e\x00\xec\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\x1f\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\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\x66\x00\x00\x00\x00\x00\xb9\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\x00\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\x00\x00\xb9\x00\x62\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\x00\x00\x97\x00\x00\x00\x97\x00\x00\x00\x1c\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\xec\x00\xaa\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\x29\x00\xb9\x00\x00\x00\xb9\x00\x81\x00\x9e\x00\x29\x00\x29\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x00\x00\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x59\x00\x29\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x57\x00\x2a\x00\x2a\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x9d\x00\x00\x00\x9d\x00\x00\x00\x9e\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x00\x2a\x00\x2a\x00\x2b\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x00\x00\x2a\x00\x2a\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\x00\x00\x00\x00\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\x2a\x00\x2b\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x31\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x3d\x00\x31\x00\x31\x00\x31\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\xa4\x00\x00\x00\x31\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x35\x00\x35\x00\x35\x00\x35\x00\xa2\x00\x35\x00\x35\x00\x00\x00\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\xa2\x00\x00\x00\x00\x00\x00\x00\x32\x00\x35\x00\x35\x00\x36\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x00\x00\x35\x00\x35\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x35\x00\x35\x00\x36\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x35\x00\x38\x00\x38\x00\x38\x00\x81\x00\x37\x00\x00\x00\x38\x00\x00\x00\x00\x00\x37\x00\x37\x00\x37\x00\x37\x00\x00\x00\x00\x00\x00\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x00\x00\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x00\x00\x17\x00\x00\x00\x38\x00\x00\x00\x00\x00\x17\x00\x17\x00\x17\x00\x17\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x00\x00\x00\x00\x00\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x00\x00\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x3a\x00\x3a\x00\x3a\x00\x87\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x00\x00\x39\x00\x39\x00\x39\x00\x39\x00\x00\x00\x00\x00\x00\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\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\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x8b\x00\x17\x00\x00\x00\x3a\x00\x00\x00\x00\x00\x17\x00\x17\x00\x17\x00\x17\x00\x00\x00\x00\x00\x00\x00\xb1\x00\xb1\x00\xb1\x00\xb1\x00\xb1\x00\xb1\x00\xb1\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x00\x00\x5c\x00\xff\xff\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\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\x00\x00\x00\x00\x00\x00\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\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3e\x00\x3e\x00\x3e\x00\x00\x00\x3d\x00\x00\x00\x3e\x00\x00\x00\x00\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\xb1\x00\xb1\x00\xb1\x00\xb1\x00\xb1\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\x3d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\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\x3e\x00\x00\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\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\x3e\x00\x00\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x00\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\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\x3e\x00\x00\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x44\x00\x44\x00\x44\x00\x00\x00\x00\x00\x00\x00\x44\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\x00\x00\x00\x00\x00\x00\xbf\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\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x00\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\x00\x9f\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\x00\x00\x00\x00\xbf\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\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x44\x00\x44\x00\x44\x00\x44\x00\xc9\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\xca\x00\xd4\x00\x00\x00\xbb\x00\x45\x00\x00\x00\x44\x00\x44\x00\x44\x00\x44\x00\xc9\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\xbb\x00\x00\x00\xbb\x00\xbb\x00\xbb\x00\xbb\x00\x00\x00\x00\x00\x00\x00\xbb\x00\xbb\x00\x00\x00\xbb\x00\xbb\x00\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x00\x00\xbb\x00\xbb\x00\xbb\x00\xbb\x00\xbb\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\x00\x00\xbb\x00\x00\x00\xbb\x00\xd4\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd5\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd6\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x7f\x00\xbb\x00\x00\x00\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x89\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x00\xb9\x00\x5b\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xa2\x00\xa2\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\x6a\x00\xb9\x00\xb9\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\x00\x00\x00\x00\x00\x00\xb9\x00\xb9\x00\x00\x00\x6a\x00\xb9\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xb9\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\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x00\x30\x00\x00\x00\x30\x00\x30\x00\x30\x00\x30\x00\x00\x00\x00\x00\x00\x00\x30\x00\x30\x00\x30\x00\x6c\x00\x30\x00\x30\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x30\x00\xb9\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x30\x00\x30\x00\x30\x00\x30\x00\x00\x00\x00\x00\x00\x00\x30\x00\x30\x00\x00\x00\x6c\x00\x30\x00\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\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\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x00\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\x6f\x00\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\xff\xff\x30\x00\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\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x6f\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\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\xf3\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\xfd\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x92\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x00\x00\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x92\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x92\x00\x00\x00\x00\x00\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\x00\x00\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\x00\x00\x00\x00\x92\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x92\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x00\x00\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x92\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x00\x00\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\x99\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x00\x00\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\x00\x00\x93\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x92\x00\x00\x00\x00\x00\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\x00\x00\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\x00\x00\x00\x00\x92\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\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\x5c\x00\x00\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x00\x00\x00\x00\x00\xa2\x00\xa8\x00\x00\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\x00\x00\xaa\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\x5e\x00\x00\x00\x00\x00\xac\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x00\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x00\xa8\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\x00\x00\x00\x00\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\x58\x00\x00\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8d\x00\xa6\x00\xb0\x00\x00\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\xaf\x00\x00\x00\x58\x00\x00\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\xa6\x00\xa6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x00\x00\x00\x00\xb4\x00\x00\x00\xb7\x00\xa6\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\xb7\x00\xb7\x00\xb2\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\xb9\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\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xb7\x00\x00\x00\xb7\x00\xb9\x00\xb9\x00\x00\x00\x69\x00\xb9\x00\xb9\x00\xae\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xad\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xba\x00\x00\x00\x00\x00\xb9\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\x00\x00\x00\x00\x00\x00\xba\x00\x00\x00\xba\x00\xba\x00\xba\x00\xba\x00\xbb\x00\x00\x00\x00\x00\xba\x00\xba\x00\x00\x00\xba\x00\xba\x00\xba\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\xba\x00\xb9\x00\xba\x00\xba\x00\xba\x00\xba\x00\xba\x00\x00\x00\x00\x00\x00\x00\xbb\x00\x00\x00\xbb\x00\xbb\x00\xbb\x00\xbb\x00\x00\x00\x00\x00\x00\x00\xbb\x00\xbb\x00\x00\x00\xbb\x00\xbb\x00\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\xba\x00\xbb\x00\xba\x00\xbb\x00\xbb\x00\xbb\x00\xbb\x00\xbb\x00\xc2\x00\xc2\x00\xc2\x00\x00\x00\x00\x00\x00\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x00\x00\xba\x00\xbb\x00\x00\x00\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\x00\x00\x00\x00\x00\x00\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x00\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\xbb\x00\x00\x00\xbb\x00\x00\x00\x00\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\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\xc2\x00\x00\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc3\x00\xc3\x00\xc3\x00\x00\x00\x00\x00\x00\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcc\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\x00\x00\x00\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\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\xc3\x00\x00\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc4\x00\xc4\x00\xc4\x00\x00\x00\x00\x00\x00\x00\xc4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\x00\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\xc4\x00\x44\x00\x44\x00\x44\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\xbf\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\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\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc5\x00\x00\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\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\xbe\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\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x00\x00\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\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\xbf\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\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x00\x00\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\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\xbf\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\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\x44\x00\x44\x00\x44\x00\x44\x00\xc9\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x45\x00\x00\x00\x44\x00\x44\x00\x44\x00\x44\x00\xc9\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\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\xbf\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\xa4\x00\x00\x00\x00\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\x44\x00\xca\x00\xca\x00\xca\x00\x00\x00\x00\x00\x00\x00\xca\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x00\xca\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x00\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\x00\x00\x00\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\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\xca\x00\x00\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xcb\x00\xcb\x00\xcb\x00\x00\x00\x00\x00\x00\x00\xcb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcc\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\xcb\x00\xcd\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\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\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\xcb\x00\x00\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\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\xcd\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xce\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcf\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xdb\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xd8\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc1\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc1\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xdc\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc1\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xda\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xd7\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc1\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc1\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd9\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc1\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xd4\x00\xeb\x00\xeb\x00\xeb\x00\xb9\x00\x00\x00\x00\x00\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\xea\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xeb\x00\x00\x00\xe6\x00\xb9\x00\xb9\x00\x00\x00\x15\x00\xb9\x00\xb9\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\xeb\x00\x00\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\xeb\x00\xeb\x00\xeb\x00\x00\x00\x00\x00\x00\x00\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\xeb\x00\x00\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xeb\x00\xec\x00\xec\x00\xec\x00\x00\x00\x00\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xec\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\x00\x00\x00\x00\x00\x00\xb9\x00\xec\x00\x00\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xec\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\x00\x00\x00\x00\xed\x00\xb9\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xf1\x00\xf1\x00\xf1\x00\x00\x00\x00\x00\x00\x00\xf1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x0c\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\x00\x00\x00\x00\xff\x00\x00\x00\xb9\x00\x00\x00\x00\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf1\x00\x00\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\xf1\x00\x00\x00\xf0\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\xf2\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\xf6\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\xf8\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\x00\x00\x00\x00\x00\x00\xb9\x00\xf3\x00\x00\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xf3\x00\xb9\x00\xfa\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\x00\x00\x00\x00\x00\x00\xb9\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\xfe\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x7c\x00\x01\x00\x02\x00\x2d\x00\x04\x00\x05\x00\x06\x00\x7d\x00\x2d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x7d\x00\x2d\x00\x7d\x00\x0a\x00\x0a\x00\x2d\x00\x21\x00\x0a\x00\x0a\x00\x72\x00\x61\x00\x67\x00\x6d\x00\x61\x00\x0a\x00\x69\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\x06\x00\x65\x00\x2d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x05\x00\x06\x00\x0a\x00\x0a\x00\x09\x00\x2d\x00\x0b\x00\x0c\x00\x0d\x00\x21\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x2d\x00\x20\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x20\x00\x05\x00\x06\x00\x65\x00\x2d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x2d\x00\x2d\x00\x69\x00\x2d\x00\x23\x00\x23\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x23\x00\x23\x00\x20\x00\x05\x00\x06\x00\x23\x00\x23\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x05\x00\x06\x00\x23\x00\x2d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x05\x00\x06\x00\x6e\x00\x6c\x00\x09\x00\x2d\x00\x0b\x00\x0c\x00\x0d\x00\x20\x00\x6c\x00\x7d\x00\x23\x00\x23\x00\x70\x00\x23\x00\x20\x00\x2d\x00\x20\x00\x23\x00\x24\x00\x23\x00\x2d\x00\x30\x00\x31\x00\x7c\x00\x2a\x00\x20\x00\x30\x00\x31\x00\x05\x00\x2d\x00\xff\xff\x30\x00\x31\x00\x7b\x00\x0b\x00\x0c\x00\x0d\x00\x0a\x00\x2d\x00\x05\x00\x06\x00\xff\xff\x7b\x00\x09\x00\x05\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x05\x00\x06\x00\x20\x00\xff\xff\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\x24\x00\xff\xff\xff\xff\x20\x00\xff\xff\x5f\x00\x2a\x00\x7b\x00\x20\x00\xff\xff\x5f\x00\x23\x00\xff\xff\x5e\x00\xff\xff\x5f\x00\x2d\x00\x20\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\x2d\x00\xff\xff\x05\x00\x06\x00\xff\xff\x7b\x00\x09\x00\x7c\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\x05\x00\x7c\x00\x7b\x00\x7c\x00\xff\xff\xff\xff\x0b\x00\x0c\x00\x0d\x00\x24\x00\x20\x00\x7b\x00\xff\xff\x23\x00\x24\x00\x2a\x00\x5e\x00\x20\x00\x05\x00\x06\x00\x2a\x00\x0a\x00\x09\x00\xff\xff\x0b\x00\x0c\x00\x0d\x00\x20\x00\xff\xff\x22\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\xff\xff\xff\xff\x20\x00\x7c\x00\x24\x00\x23\x00\x05\x00\xff\xff\xff\xff\x7b\x00\x2a\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5e\x00\x01\x00\x02\x00\xff\xff\x20\x00\x05\x00\x06\x00\xff\xff\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\xff\xff\x7c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x7c\x00\x05\x00\x20\x00\x5e\x00\xff\xff\x23\x00\x7b\x00\x0b\x00\x0c\x00\x0d\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\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\x3b\x00\x22\x00\x5f\x00\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\x5f\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\xff\xff\x7d\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\x07\x00\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\x05\x00\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\x0b\x00\x0c\x00\x0d\x00\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\x20\x00\x5f\x00\xff\xff\x23\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\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\x01\x00\x02\x00\x03\x00\x7c\x00\x05\x00\xff\xff\x07\x00\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\x23\x00\x20\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x30\x00\x31\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\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\x5f\x00\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\x05\x00\xff\xff\x07\x00\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\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\x5c\x00\xff\xff\x5e\x00\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\x7c\x00\x7d\x00\x7e\x00\x5f\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\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\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\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\x5f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\x65\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\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\x7c\x00\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\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\x5f\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\x07\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\x2b\x00\xff\xff\x2d\x00\xff\xff\x45\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\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\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\x02\x00\xff\xff\x04\x00\xff\xff\xff\xff\x20\x00\xff\xff\xff\xff\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x5f\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\xff\xff\x3a\x00\x5f\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\x2b\x00\xff\xff\x2d\x00\xff\xff\x5f\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\x5c\x00\xff\xff\x5e\x00\x5f\x00\x5f\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\x7c\x00\xff\xff\x7e\x00\x23\x00\x5f\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x23\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x20\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x45\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\x03\x00\x04\x00\x5f\x00\x06\x00\x07\x00\xff\xff\xff\xff\xff\xff\x65\x00\x2b\x00\xff\xff\x2d\x00\xff\xff\x5f\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\x5f\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\x01\x00\x02\x00\x03\x00\x04\x00\xff\xff\x06\x00\x07\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\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\x07\x00\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\x2b\x00\xff\xff\x2d\x00\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\x5f\x00\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\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x00\x0c\x00\x0d\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\xff\xff\xff\xff\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\x45\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\x5f\x00\xff\xff\x01\x00\x02\x00\x03\x00\x04\x00\x65\x00\x06\x00\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\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x5f\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\x01\x00\x02\x00\x03\x00\x04\x00\xff\xff\x06\x00\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\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\x23\x00\x05\x00\xff\xff\x07\x00\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\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\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\x5f\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\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\x07\x00\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\xff\xff\xff\xff\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\x5f\x00\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\x23\x00\x05\x00\xff\xff\x07\x00\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\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\x5f\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\x01\x00\x02\x00\x03\x00\x23\x00\x05\x00\xff\xff\x07\x00\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\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\x5f\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\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\xff\xff\x2e\x00\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\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\x07\x00\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\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\x5f\x00\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\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\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\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\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\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\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\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\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\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\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\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\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\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\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\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\x04\x00\x23\x00\xff\xff\xff\xff\x45\x00\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\x20\x00\x21\x00\x5f\x00\x23\x00\x24\x00\x25\x00\x26\x00\x45\x00\x65\x00\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\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\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\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\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\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\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\xff\xff\x7c\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\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\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\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\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\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\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\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\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\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\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x23\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x70\x00\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\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x23\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\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\xff\xff\x45\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\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\x5f\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x23\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\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\x23\x00\x45\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\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\x5f\x00\xff\xff\xff\xff\xff\xff\x42\x00\xff\xff\x65\x00\x45\x00\xff\xff\x04\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\x62\x00\xff\xff\x21\x00\x65\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\x6f\x00\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x78\x00\xff\xff\xff\xff\xff\xff\x04\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\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x5c\x00\xff\xff\x5e\x00\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\xff\xff\xff\xff\xff\xff\x7c\x00\xff\xff\x7e\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\x5c\x00\xff\xff\x5e\x00\x5f\x00\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\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\x7c\x00\xff\xff\x7e\x00\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\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\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\x7c\x00\xff\xff\x7e\x00\x5c\x00\x3a\x00\x5e\x00\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\x7c\x00\xff\xff\x7e\x00\x5c\x00\xff\xff\x5e\x00\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\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\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\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\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\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\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\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\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\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\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\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\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\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\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\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\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\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\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\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\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\x29\x00\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\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\xff\xff\x7c\x00\xff\xff\x7e\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\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\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\x5d\x00\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\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\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\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\x7c\x00\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\x5d\x00\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x30\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\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\xff\xff\x4a\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\xff\xff\xff\xff\x75\x00\x75\x00\x74\x00\x70\x00\x74\x00\x70\x00\xff\xff\x74\x00\x70\x00\x70\x00\x73\x00\x72\x00\x73\x00\x74\x00\x75\x00\x30\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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, 255)- [ AlexAccNone- , AlexAcc 189- , AlexAccNone- , AlexAcc 188- , AlexAcc 187- , AlexAcc 186- , AlexAcc 185- , AlexAcc 184- , AlexAcc 183- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAcc 182- , AlexAcc 181- , AlexAcc 180- , AlexAccPred 179 (ifExtension HaddockBit)(AlexAccNone)- , AlexAcc 178- , AlexAcc 177- , AlexAccPred 176 (isNormalComment)(AlexAccNone)- , AlexAcc 175- , AlexAccNone- , AlexAcc 174- , AlexAcc 173- , AlexAccNone- , AlexAccNone- , AlexAcc 172- , AlexAccNone- , AlexAccPred 171 (known_pragma twoWordPrags)(AlexAccNone)- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAcc 170- , AlexAccNone- , AlexAcc 169- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAcc 168- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAcc 167- , AlexAcc 166- , AlexAcc 165- , AlexAccSkip- , AlexAcc 164- , AlexAcc 163- , AlexAcc 162- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAcc 161- , AlexAccNone- , AlexAccPred 160 (known_pragma linePrags)(AlexAccPred 159 (known_pragma oneWordPrags)(AlexAccPred 158 (known_pragma ignoredPrags)(AlexAccPred 157 (known_pragma fileHeaderPrags)(AlexAcc 156))))- , AlexAccNone- , AlexAccPred 155 (known_pragma linePrags)(AlexAccPred 154 (known_pragma oneWordPrags)(AlexAccPred 153 (known_pragma ignoredPrags)(AlexAccPred 152 (known_pragma fileHeaderPrags)(AlexAcc 151))))- , AlexAccPred 150 (known_pragma linePrags)(AlexAcc 149)- , AlexAccPred 148 (isNormalComment)(AlexAccNone)- , AlexAccNone- , AlexAccPred 147 (known_pragma linePrags)(AlexAccNone)- , AlexAcc 146- , AlexAccPred 145 (notFollowedBySymbol)(AlexAccNone)- , AlexAccPred 144 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)- , AlexAccSkip- , AlexAccPred 143 (notFollowedBy '-')(AlexAccNone)- , AlexAcc 142- , AlexAcc 141- , AlexAccSkip- , AlexAccNone- , AlexAccNone- , AlexAccSkipPred (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)- , AlexAccNone- , AlexAccSkipPred (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccSkipPred (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)- , AlexAccPred 140 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False) `alexAndPred` followedByDigit)(AlexAccNone)- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAcc 139- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccPred 138 (negLitPred)(AlexAccNone)- , AlexAccNone- , AlexAccNone- , AlexAccPred 137 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)- , AlexAccSkip- , AlexAccNone- , AlexAccPred 136 (isSmartQuote)(AlexAccPred 135 (ifCurrentChar '⟦' `alexAndPred`- ifExtension UnicodeSyntaxBit `alexAndPred`- ifExtension ThQuotesBit)(AlexAccPred 134 (ifCurrentChar '⟧' `alexAndPred`- ifExtension UnicodeSyntaxBit `alexAndPred`- ifExtension ThQuotesBit)(AlexAccPred 133 (ifCurrentChar '⦇' `alexAndPred`- ifExtension UnicodeSyntaxBit `alexAndPred`- ifExtension ArrowsBit)(AlexAccPred 132 (ifCurrentChar '⦈' `alexAndPred`- ifExtension UnicodeSyntaxBit `alexAndPred`- ifExtension ArrowsBit)(AlexAccNone)))))- , AlexAccPred 131 (isSmartQuote)(AlexAcc 130)- , AlexAccPred 129 (isSmartQuote)(AlexAccNone)- , AlexAccNone- , AlexAccPred 128 (atEOL)(AlexAcc 127)- , AlexAccPred 126 (atEOL)(AlexAccNone)- , AlexAccPred 125 (atEOL)(AlexAcc 124)- , AlexAccPred 123 (atEOL)(AlexAcc 122)- , AlexAccPred 121 (atEOL)(AlexAcc 120)- , AlexAccPred 119 (atEOL)(AlexAcc 118)- , AlexAccNone- , AlexAccPred 117 (atEOL)(AlexAccNone)- , AlexAccPred 116 (atEOL)(AlexAccNone)- , AlexAcc 115- , AlexAccPred 114 (alexNotPred (ifExtension HaddockBit))(AlexAccPred 113 (ifExtension HaddockBit)(AlexAccNone))- , AlexAccPred 112 (alexNotPred (ifExtension HaddockBit))(AlexAcc 111)- , AlexAccPred 110 (alexNotPred (ifExtension HaddockBit))(AlexAccNone)- , AlexAcc 109- , AlexAcc 108- , AlexAccPred 107 (isNormalComment)(AlexAcc 106)- , AlexAccNone- , AlexAccPred 105 (isNormalComment)(AlexAccNone)- , AlexAcc 104- , AlexAccSkip- , AlexAccNone- , AlexAcc 103- , AlexAcc 102- , AlexAccPred 101 (negHashLitPred)(AlexAccNone)- , AlexAccPred 100 (negHashLitPred)(AlexAccNone)- , AlexAccPred 99 (ifExtension MagicHashBit)(AlexAccNone)- , AlexAccPred 98 (ifExtension MagicHashBit)(AlexAccNone)- , AlexAccPred 97 (ifExtension MagicHashBit)(AlexAccNone)- , AlexAccPred 96 (ifExtension MagicHashBit)(AlexAccNone)- , AlexAccPred 95 (ifExtension MagicHashBit `alexAndPred`- ifExtension BinaryLiteralsBit)(AlexAccNone)- , AlexAccPred 94 (ifExtension MagicHashBit)(AlexAccNone)- , AlexAccPred 93 (negHashLitPred)(AlexAccNone)- , AlexAccPred 92 (negHashLitPred)(AlexAccNone)- , AlexAccPred 91 (negHashLitPred `alexAndPred`- ifExtension BinaryLiteralsBit)(AlexAccNone)- , AlexAccPred 90 (negHashLitPred)(AlexAccNone)- , AlexAccPred 89 (ifExtension MagicHashBit)(AlexAccNone)- , AlexAccPred 88 (ifExtension MagicHashBit)(AlexAccNone)- , AlexAccPred 87 (ifExtension MagicHashBit `alexAndPred`- ifExtension BinaryLiteralsBit)(AlexAccNone)- , AlexAccPred 86 (ifExtension MagicHashBit)(AlexAccNone)- , AlexAccPred 85 (ifExtension HexFloatLiteralsBit `alexAndPred`- negLitPred)(AlexAccNone)- , AlexAccPred 84 (ifExtension HexFloatLiteralsBit `alexAndPred`- negLitPred)(AlexAccNone)- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccPred 83 (ifExtension HexFloatLiteralsBit)(AlexAccNone)- , AlexAccPred 82 (ifExtension HexFloatLiteralsBit)(AlexAccNone)- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccPred 81 (negLitPred)(AlexAccNone)- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAcc 80- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccPred 79 (negLitPred)(AlexAccNone)- , AlexAccNone- , AlexAccPred 78 (negLitPred)(AlexAccNone)- , AlexAccNone- , AlexAccPred 77 (negLitPred `alexAndPred`- ifExtension BinaryLiteralsBit)(AlexAccNone)- , AlexAccNone- , AlexAccPred 76 (negLitPred)(AlexAccNone)- , AlexAccPred 75 (negLitPred)(AlexAccNone)- , AlexAcc 74- , AlexAccNone- , AlexAcc 73- , AlexAccNone- , AlexAccPred 72 (ifExtension BinaryLiteralsBit)(AlexAccNone)- , AlexAccNone- , AlexAcc 71- , AlexAcc 70- , AlexAcc 69- , AlexAcc 68- , AlexAcc 67- , AlexAcc 66- , AlexAcc 65- , AlexAccPred 64 (ifExtension MagicHashBit)(AlexAccNone)- , AlexAccPred 63 (ifExtension MagicHashBit)(AlexAccPred 62 (ifExtension MagicHashBit)(AlexAccNone))- , AlexAccPred 61 (ifExtension MagicHashBit)(AlexAccPred 60 (ifExtension MagicHashBit)(AlexAccNone))- , AlexAccPred 59 (ifExtension MagicHashBit)(AlexAccNone)- , AlexAccPred 58 (ifExtension MagicHashBit)(AlexAccNone)- , AlexAccPred 57 (ifExtension MagicHashBit)(AlexAccNone)- , AlexAcc 56- , AlexAcc 55- , AlexAcc 54- , AlexAcc 53- , AlexAcc 52- , AlexAcc 51- , AlexAcc 50- , AlexAcc 49- , AlexAcc 48- , AlexAcc 47- , AlexAccNone- , AlexAcc 46- , AlexAcc 45- , AlexAcc 44- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccPred 43 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)- , AlexAcc 42- , AlexAcc 41- , AlexAcc 40- , AlexAccPred 39 (ifExtension RecursiveDoBit)(AlexAcc 38)- , AlexAcc 37- , AlexAccPred 36 (ifExtension RecursiveDoBit)(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- , AlexAccPred 22 (ifExtension UnboxedParensBit)(AlexAccNone)- , AlexAcc 21- , AlexAccPred 20 (ifExtension UnboxedParensBit)(AlexAccNone)- , AlexAcc 19- , AlexAccPred 18 (ifExtension OverloadedLabelsBit)(AlexAccNone)- , AlexAccPred 17 (ifExtension OverloadedLabelsBit)(AlexAccNone)- , AlexAccPred 16 (ifExtension IpBit)(AlexAccNone)- , AlexAccPred 15 (ifExtension ArrowsBit)(AlexAccNone)- , AlexAcc 14- , AlexAccPred 13 (ifExtension ArrowsBit `alexAndPred`- notFollowedBySymbol)(AlexAccNone)- , AlexAccPred 12 (ifExtension QqBit)(AlexAccNone)- , AlexAccNone- , AlexAccPred 11 (ifExtension QqBit)(AlexAccNone)- , AlexAccNone- , AlexAccNone- , AlexAccNone- , AlexAccPred 10 (ifExtension ThQuotesBit)(AlexAccPred 9 (ifExtension QqBit)(AlexAccNone))- , AlexAccNone- , AlexAccPred 8 (ifExtension ThQuotesBit)(AlexAccPred 7 (ifExtension QqBit)(AlexAccNone))- , AlexAccNone- , AlexAccPred 6 (ifExtension ThQuotesBit)(AlexAccPred 5 (ifExtension QqBit)(AlexAccNone))- , AlexAccNone- , AlexAccPred 4 (ifExtension ThQuotesBit)(AlexAccNone)- , AlexAccPred 3 (ifExtension ThQuotesBit)(AlexAccPred 2 (ifExtension QqBit)(AlexAccNone))- , AlexAcc 1- , AlexAcc 0- ]--alex_actions = array (0 :: Int, 190)- [ (189,alex_action_16)- , (188,alex_action_22)- , (187,alex_action_23)- , (186,alex_action_21)- , (185,alex_action_24)- , (184,alex_action_28)- , (183,alex_action_29)- , (182,alex_action_45)- , (181,alex_action_44)- , (180,alex_action_43)- , (179,alex_action_42)- , (178,alex_action_40)- , (177,alex_action_72)- , (176,alex_action_2)- , (175,alex_action_40)- , (174,alex_action_86)- , (173,alex_action_36)- , (172,alex_action_67)- , (171,alex_action_33)- , (170,alex_action_86)- , (169,alex_action_32)- , (168,alex_action_31)- , (167,alex_action_30)- , (166,alex_action_29)- , (165,alex_action_29)- , (164,alex_action_1)- , (163,alex_action_29)- , (162,alex_action_29)- , (161,alex_action_27)- , (160,alex_action_26)- , (159,alex_action_34)- , (158,alex_action_35)- , (157,alex_action_38)- , (156,alex_action_39)- , (155,alex_action_26)- , (154,alex_action_34)- , (153,alex_action_35)- , (152,alex_action_37)- , (151,alex_action_39)- , (150,alex_action_26)- , (149,alex_action_29)- , (148,alex_action_2)- , (147,alex_action_26)- , (146,alex_action_25)- , (145,alex_action_20)- , (144,alex_action_19)- , (143,alex_action_17)- , (142,alex_action_78)- , (141,alex_action_78)- , (140,alex_action_12)- , (139,alex_action_96)- , (138,alex_action_97)- , (137,alex_action_11)- , (136,alex_action_9)- , (135,alex_action_54)- , (134,alex_action_55)- , (133,alex_action_58)- , (132,alex_action_59)- , (131,alex_action_9)- , (130,alex_action_29)- , (129,alex_action_9)- , (128,alex_action_8)- , (127,alex_action_29)- , (126,alex_action_8)- , (125,alex_action_7)- , (124,alex_action_86)- , (123,alex_action_7)- , (122,alex_action_86)- , (121,alex_action_7)- , (120,alex_action_29)- , (119,alex_action_7)- , (118,alex_action_29)- , (117,alex_action_7)- , (116,alex_action_7)- , (115,alex_action_6)- , (114,alex_action_5)- , (113,alex_action_41)- , (112,alex_action_5)- , (111,alex_action_29)- , (110,alex_action_5)- , (109,alex_action_4)- , (108,alex_action_3)- , (107,alex_action_2)- , (106,alex_action_29)- , (105,alex_action_2)- , (104,alex_action_1)- , (103,alex_action_117)- , (102,alex_action_116)- , (101,alex_action_115)- , (100,alex_action_114)- , (99,alex_action_113)- , (98,alex_action_112)- , (97,alex_action_111)- , (96,alex_action_110)- , (95,alex_action_109)- , (94,alex_action_108)- , (93,alex_action_107)- , (92,alex_action_106)- , (91,alex_action_105)- , (90,alex_action_104)- , (89,alex_action_103)- , (88,alex_action_102)- , (87,alex_action_101)- , (86,alex_action_100)- , (85,alex_action_99)- , (84,alex_action_99)- , (83,alex_action_98)- , (82,alex_action_98)- , (81,alex_action_97)- , (80,alex_action_96)- , (79,alex_action_95)- , (78,alex_action_94)- , (77,alex_action_93)- , (76,alex_action_92)- , (75,alex_action_92)- , (74,alex_action_91)- , (73,alex_action_90)- , (72,alex_action_89)- , (71,alex_action_88)- , (70,alex_action_88)- , (69,alex_action_87)- , (68,alex_action_86)- , (67,alex_action_86)- , (66,alex_action_85)- , (65,alex_action_84)- , (64,alex_action_83)- , (63,alex_action_82)- , (62,alex_action_113)- , (61,alex_action_82)- , (60,alex_action_112)- , (59,alex_action_82)- , (58,alex_action_81)- , (57,alex_action_80)- , (56,alex_action_79)- , (55,alex_action_79)- , (54,alex_action_78)- , (53,alex_action_78)- , (52,alex_action_78)- , (51,alex_action_78)- , (50,alex_action_78)- , (49,alex_action_78)- , (48,alex_action_77)- , (47,alex_action_77)- , (46,alex_action_76)- , (45,alex_action_76)- , (44,alex_action_76)- , (43,alex_action_19)- , (42,alex_action_76)- , (41,alex_action_76)- , (40,alex_action_76)- , (39,alex_action_75)- , (38,alex_action_76)- , (37,alex_action_76)- , (36,alex_action_75)- , (35,alex_action_76)- , (34,alex_action_76)- , (33,alex_action_74)- , (32,alex_action_74)- , (31,alex_action_73)- , (30,alex_action_72)- , (29,alex_action_71)- , (28,alex_action_70)- , (27,alex_action_69)- , (26,alex_action_68)- , (25,alex_action_67)- , (24,alex_action_66)- , (23,alex_action_65)- , (22,alex_action_64)- , (21,alex_action_86)- , (20,alex_action_63)- , (19,alex_action_65)- , (18,alex_action_62)- , (17,alex_action_61)- , (16,alex_action_60)- , (15,alex_action_57)- , (14,alex_action_86)- , (13,alex_action_56)- , (12,alex_action_53)- , (11,alex_action_52)- , (10,alex_action_51)- , (9,alex_action_52)- , (8,alex_action_50)- , (7,alex_action_52)- , (6,alex_action_49)- , (5,alex_action_52)- , (4,alex_action_48)- , (3,alex_action_47)- , (2,alex_action_52)- , (1,alex_action_46)- , (0,alex_action_86)- ]--{-# LINE 704 "_build/source-dist/ghc-9.6.7-src/ghc-9.6.7/compiler/GHC/Parser/Lexer.x" #-}--- Operator whitespace occurrence. See Note [Whitespace-sensitive operator parsing].-data OpWs- = OpWsPrefix -- a !b- | OpWsSuffix -- a! b- | OpWsTightInfix -- a!b- | OpWsLooseInfix -- a ! b- deriving Show---- -------------------------------------------------------------------------------- The token type--data Token- = ITas -- Haskell keywords- | ITcase- | ITclass- | ITdata- | ITdefault- | ITderiving- | ITdo (Maybe FastString)- | 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 (Maybe FastString)- | ITfamily- | ITrole- | ITgroup- | ITby- | ITusing- | ITpattern- | ITstatic- | ITstock- | ITanyclass- | ITvia-- -- Backpack tokens- | ITunit- | ITsignature- | ITdependency- | ITrequires-- -- Pragmas, see Note [Pragma source text] in "GHC.Types.Basic"- | ITinline_prag SourceText InlineSpec RuleMatchInfo- | ITopaque_prag SourceText- | 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 'UsePosPragsBit'- | ITcolumn_prag SourceText -- not usually produced, see 'UsePosPragsBit'- | ITscc_prag SourceText- | 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- | ITcomment_line_prag -- See Note [Nested comment line pragmas]-- | ITdotdot -- reserved symbols- | ITcolon- | ITdcolon IsUnicodeSyntax- | ITequal- | ITlam- | ITlcase- | ITlcases- | ITvbar- | ITlarrow IsUnicodeSyntax- | ITrarrow IsUnicodeSyntax- | ITdarrow IsUnicodeSyntax- | ITlolly -- The (⊸) arrow (for LinearTypes)- | ITminus -- See Note [Minus tokens]- | ITprefixminus -- See Note [Minus tokens]- | ITbang -- Prefix (!) only, e.g. f !x = rhs- | ITtilde -- Prefix (~) only, e.g. f ~x = rhs- | ITat -- Tight infix (@) only, e.g. f x@pat = rhs- | ITtypeApp -- Prefix (@) only, e.g. f @t- | ITpercent -- Prefix (%) only, e.g. a %1 -> b- | ITstar IsUnicodeSyntax- | ITdot- | ITproj Bool -- Extension: OverloadedRecordDotBit-- | 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 SourceText FastString -- Overloaded label: #x- -- The SourceText is required because we can- -- have a string literal as a label- -- Note [Literal source text] in "GHC.Types.Basic"-- | ITchar SourceText Char -- Note [Literal source text] in "GHC.Types.Basic"- | ITstring SourceText FastString -- Note [Literal source text] in "GHC.Types.Basic"- | ITinteger IntegralLit -- Note [Literal source text] in "GHC.Types.Basic"- | ITrational FractionalLit-- | ITprimchar SourceText Char -- Note [Literal source text] in "GHC.Types.Basic"- | ITprimstring SourceText ByteString -- Note [Literal source text] in "GHC.Types.Basic"- | ITprimint SourceText Integer -- Note [Literal source text] in "GHC.Types.Basic"- | ITprimword SourceText Integer -- Note [Literal source text] in "GHC.Types.Basic"- | 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 -- ||]- | ITdollar -- prefix $- | ITdollardollar -- prefix $$- | ITtyQuote -- ''- | ITquasiQuote (FastString,FastString,PsSpan)- -- ITquasiQuote(quoter, quote, loc)- -- represents a quasi-quote of the form- -- [quoter| quote |]- | ITqQuasiQuote (FastString,FastString,FastString,PsSpan)- -- 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 -- ^ @>>-@-- | ITunknown String -- ^ Used when the lexer can't make sense of it- | ITeof -- ^ end of file token-- -- Documentation annotations. See Note [PsSpan in Comments]- | ITdocComment HsDocString PsSpan -- ^ The HsDocString contains more details about what- -- this is and how to pretty print it- | ITdocOptions String PsSpan -- ^ doc options (prune, ignore-exports, etc)- | ITlineComment String PsSpan -- ^ comment starting by "--"- | ITblockComment String PsSpan -- ^ comment in {- -}-- deriving Show--instance Outputable Token where- ppr x = text (show x)--{- Note [PsSpan in Comments]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When using the Api Annotations to exact print a modified AST, managing-the space before a comment is important. The PsSpan in the comment-token allows this to happen.--We also need to track the space before the end of file. The normal-mechanism of using the previous token does not work, as the ITeof is-synthesised to come at the same location of the last token, and the-normal previous token updating has by then updated the required-location.--We track this using a 2-back location, prev_loc2. This adds extra-processing to every single token, which is a performance hit for-something needed only at the end of the file. This needs-improving. Perhaps a backward scan on eof?--}--{- Note [Minus tokens]-~~~~~~~~~~~~~~~~~~~~~~-A minus sign can be used in prefix form (-x) and infix form (a - b).--When LexicalNegation is on:- * ITprefixminus represents the prefix form- * ITvarsym "-" represents the infix form- * ITminus is not used--When LexicalNegation is off:- * ITminus represents all forms- * ITprefixminus is not used- * ITvarsym "-" is not used--}--{- Note [Why not LexicalNegationBit]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-One might wonder why we define NoLexicalNegationBit instead of-LexicalNegationBit. The problem lies in the following line in reservedSymsFM:-- ,("-", ITminus, NormalSyntax, xbit NoLexicalNegationBit)--We want to generate ITminus only when LexicalNegation is off. How would one-do it if we had LexicalNegationBit? I (int-index) tried to use bitwise-complement:-- ,("-", ITminus, NormalSyntax, complement (xbit LexicalNegationBit))--This did not work, so I opted for NoLexicalNegationBit instead.--}----- 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 FastString (Token, ExtsBitmap)-reservedWordsFM = listToUFM $- map (\(x, y, z) -> (mkFastString x, (y, z)))- [( "_", ITunderscore, 0 ),- ( "as", ITas, 0 ),- ( "case", ITcase, 0 ),- ( "cases", ITlcases, xbit LambdaCaseBit ),- ( "class", ITclass, 0 ),- ( "data", ITdata, 0 ),- ( "default", ITdefault, 0 ),- ( "deriving", ITderiving, 0 ),- ( "do", ITdo Nothing, 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, 0),- ( "mdo", ITmdo Nothing, xbit RecursiveDoBit),- -- See Note [Lexing type pseudo-keywords]- ( "family", ITfamily, 0 ),- ( "role", ITrole, 0 ),- ( "pattern", ITpattern, xbit PatternSynonymsBit),- ( "static", ITstatic, xbit StaticPointersBit ),- ( "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 (GHC.Tc.TyCl) 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 FastString (Token, IsUnicodeSyntax, ExtsBitmap)-reservedSymsFM = listToUFM $- map (\ (x,w,y,z) -> (mkFastString x,(w,y,z)))- [ ("..", ITdotdot, NormalSyntax, 0 )- -- (:) is a reserved op, meaning only list cons- ,(":", ITcolon, NormalSyntax, 0 )- ,("::", ITdcolon NormalSyntax, NormalSyntax, 0 )- ,("=", ITequal, NormalSyntax, 0 )- ,("\\", ITlam, NormalSyntax, 0 )- ,("|", ITvbar, NormalSyntax, 0 )- ,("<-", ITlarrow NormalSyntax, NormalSyntax, 0 )- ,("->", ITrarrow NormalSyntax, NormalSyntax, 0 )- ,("=>", ITdarrow NormalSyntax, NormalSyntax, 0 )- ,("-", ITminus, NormalSyntax, xbit NoLexicalNegationBit)-- ,("*", ITstar NormalSyntax, NormalSyntax, xbit StarIsTypeBit)-- ,("-<", ITlarrowtail NormalSyntax, NormalSyntax, xbit ArrowsBit)- ,(">-", ITrarrowtail NormalSyntax, NormalSyntax, xbit ArrowsBit)- ,("-<<", ITLarrowtail NormalSyntax, NormalSyntax, xbit ArrowsBit)- ,(">>-", ITRarrowtail NormalSyntax, NormalSyntax, xbit ArrowsBit)-- ,("∷", ITdcolon UnicodeSyntax, UnicodeSyntax, 0 )- ,("⇒", ITdarrow UnicodeSyntax, UnicodeSyntax, 0 )- ,("∀", ITforall UnicodeSyntax, UnicodeSyntax, 0 )- ,("→", ITrarrow UnicodeSyntax, UnicodeSyntax, 0 )- ,("←", ITlarrow UnicodeSyntax, UnicodeSyntax, 0 )-- ,("⊸", ITlolly, UnicodeSyntax, 0)-- ,("⤙", ITlarrowtail UnicodeSyntax, UnicodeSyntax, xbit ArrowsBit)- ,("⤚", ITrarrowtail UnicodeSyntax, UnicodeSyntax, xbit ArrowsBit)- ,("⤛", ITLarrowtail UnicodeSyntax, UnicodeSyntax, xbit ArrowsBit)- ,("⤜", ITRarrowtail UnicodeSyntax, UnicodeSyntax, xbit ArrowsBit)-- ,("★", ITstar UnicodeSyntax, UnicodeSyntax, xbit StarIsTypeBit)-- -- 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 = PsSpan -> StringBuffer -> Int -> StringBuffer -> P (PsLocated Token)--special :: Token -> Action-special tok span _buf _len _buf2 = return (L span tok)--token, layout_token :: Token -> Action-token t span _buf _len _buf2 = return (L span t)-layout_token t span _buf _len _buf2 = pushLexState layout >> return (L span t)--idtoken :: (StringBuffer -> Int -> Token) -> Action-idtoken f span buf len _buf2 = return (L span $! (f buf len))--qdo_token :: (Maybe FastString -> Token) -> Action-qdo_token con span buf len _buf2 = do- maybe_layout token- return (L span $! token)- where- !token = con $! Just $! fst $! splitQualName buf len False--skip_one_varid :: (FastString -> Token) -> Action-skip_one_varid f span buf len _buf2- = return (L span $! f (lexemeToFastString (stepOn buf) (len-1)))--skip_one_varid_src :: (SourceText -> FastString -> Token) -> Action-skip_one_varid_src f span buf len _buf2- = return (L span $! f (SourceText $ lexemeToString (stepOn buf) (len-1))- (lexemeToFastString (stepOn buf) (len-1)))--skip_two_varid :: (FastString -> Token) -> Action-skip_two_varid f span buf len _buf2- = return (L span $! f (lexemeToFastString (stepOn (stepOn buf)) (len-2)))--strtoken :: (String -> Token) -> Action-strtoken f span buf len _buf2 =- return (L span $! (f $! lexemeToString buf len))--begin :: Int -> Action-begin code _span _str _len _buf2 = do pushLexState code; lexToken--pop :: Action-pop _span _buf _len _buf2 =- do _ <- popLexState- lexToken--- See Note [Nested comment line pragmas]-failLinePrag1 :: Action-failLinePrag1 span _buf _len _buf2 = do- b <- getBit InNestedCommentBit- if b then return (L span ITcomment_line_prag)- else lexError LexErrorInPragma---- See Note [Nested comment line pragmas]-popLinePrag1 :: Action-popLinePrag1 span _buf _len _buf2 = do- b <- getBit InNestedCommentBit- if b then return (L span ITcomment_line_prag) else do- _ <- popLexState- lexToken--hopefully_open_brace :: Action-hopefully_open_brace span buf len buf2- = do relaxed <- getBit RelaxedLayoutBit- ctx <- getContext- (AI l _) <- getInput- let offset = srcLocCol (psRealLoc l)- isOK = relaxed ||- case ctx of- Layout prev_off _ : _ -> prev_off < offset- _ -> True- if isOK then pop_and open_brace span buf len buf2- else addFatalError $- mkPlainErrorMsgEnvelope (mkSrcSpanPs span) PsErrMissingBlock--pop_and :: Action -> Action-pop_and act span buf len buf2 =- do _ <- popLexState- act span buf len buf2---- See Note [Whitespace-sensitive operator parsing]-followedByOpeningToken, precededByClosingToken :: AlexAccPred ExtsBitmap-followedByOpeningToken _ _ _ (AI _ buf) = followedByOpeningToken' buf-precededByClosingToken _ (AI _ buf) _ _ = precededByClosingToken' buf---- The input is the buffer *after* the token.-followedByOpeningToken' :: StringBuffer -> Bool-followedByOpeningToken' buf- | atEnd buf = False- | otherwise =- case nextChar buf of- ('{', buf') -> nextCharIsNot buf' (== '-')- ('(', _) -> True- ('[', _) -> True- ('\"', _) -> True- ('\'', _) -> True- ('_', _) -> True- ('⟦', _) -> True- ('⦇', _) -> True- (c, _) -> isAlphaNum c---- The input is the buffer *before* the token.-precededByClosingToken' :: StringBuffer -> Bool-precededByClosingToken' buf =- case prevChar buf '\n' of- '}' -> decodePrevNChars 1 buf /= "-"- ')' -> True- ']' -> True- '\"' -> True- '\'' -> True- '_' -> True- '⟧' -> True- '⦈' -> True- c -> isAlphaNum c--get_op_ws :: StringBuffer -> StringBuffer -> OpWs-get_op_ws buf1 buf2 =- mk_op_ws (precededByClosingToken' buf1) (followedByOpeningToken' buf2)- where- mk_op_ws False True = OpWsPrefix- mk_op_ws True False = OpWsSuffix- mk_op_ws True True = OpWsTightInfix- mk_op_ws False False = OpWsLooseInfix--{-# INLINE with_op_ws #-}-with_op_ws :: (OpWs -> Action) -> Action-with_op_ws act span buf len buf2 = act (get_op_ws buf buf2) span buf len buf2--{-# 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)- | HaddockBit `xtest` 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'---- Check if we should parse a negative literal (e.g. -123) as a single token.-negLitPred :: AlexAccPred ExtsBitmap-negLitPred =- prefix_minus `alexAndPred`- (negative_literals `alexOrPred` lexical_negation)- where- negative_literals = ifExtension NegativeLiteralsBit-- lexical_negation =- -- See Note [Why not LexicalNegationBit]- alexNotPred (ifExtension NoLexicalNegationBit)-- prefix_minus =- -- Note [prefix_minus in negLitPred and negHashLitPred]- alexNotPred precededByClosingToken---- Check if we should parse an unboxed negative literal (e.g. -123#) as a single token.-negHashLitPred :: AlexAccPred ExtsBitmap-negHashLitPred = prefix_minus `alexAndPred` magic_hash- where- magic_hash = ifExtension MagicHashBit- prefix_minus =- -- Note [prefix_minus in negLitPred and negHashLitPred]- alexNotPred precededByClosingToken--{- Note [prefix_minus in negLitPred and negHashLitPred]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We want to parse -1 as a single token, but x-1 as three tokens.-So in negLitPred (and negHashLitPred) we require that we have a prefix-occurrence of the minus sign. See Note [Whitespace-sensitive operator parsing]-for a detailed definition of a prefix occurrence.--The condition for a prefix occurrence of an operator is:-- not precededByClosingToken && followedByOpeningToken--but we don't check followedByOpeningToken when parsing a negative literal.-It holds simply because we immediately lex a literal after the minus.--}--ifExtension :: ExtBits -> AlexAccPred ExtsBitmap-ifExtension extBits bits _ _ _ = extBits `xtest` bits--alexNotPred p userState in1 len in2- = not (p userState in1 len in2)--alexOrPred p1 p2 userState in1 len in2- = p1 userState in1 len in2 || p2 userState in1 len in2--multiline_doc_comment :: Action-multiline_doc_comment span buf _len _buf2 = {-# SCC "multiline_doc_comment" #-} withLexedDocType worker- where- worker input@(AI start_loc _) docType checkNextLine = go start_loc "" [] input- where- go start_loc curLine prevLines input@(AI end_loc _) = case alexGetChar' input of- Just ('\n', input')- | checkNextLine -> case checkIfCommentLine input' of- Just input@(AI next_start _) -> go next_start "" (locatedLine : prevLines) input -- Start a new line- Nothing -> endComment- | otherwise -> endComment- Just (c, input) -> go start_loc (c:curLine) prevLines input- Nothing -> endComment- where- lineSpan = mkSrcSpanPs $ mkPsSpan start_loc end_loc- locatedLine = L lineSpan (mkHsDocStringChunk $ reverse curLine)- commentLines = NE.reverse $ locatedLine :| prevLines- endComment = docCommentEnd input (docType (\dec -> MultiLineDocString dec commentLines)) 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 buf2 = do- b <- getBit RawTokenStreamBit- if b then do- lt <- getLastLocComment- strtoken (\s -> ITlineComment s lt) span buf len buf2- else lexToken---{-- nested comments require traversing by hand, they can't be parsed- using regular expressions.--}-nested_comment :: Action-nested_comment span buf len _buf2 = {-# SCC "nested_comment" #-} do- l <- getLastLocComment- let endComment input (L _ comment) = commentEnd lexToken input (Nothing, ITblockComment comment l) buf span- input <- getInput- -- Include decorator in comment- let start_decorator = reverse $ lexemeToString buf len- nested_comment_logic endComment start_decorator input span--nested_doc_comment :: Action-nested_doc_comment span buf _len _buf2 = {-# SCC "nested_doc_comment" #-} withLexedDocType worker- where- worker input@(AI start_loc _) docType _checkNextLine = nested_comment_logic endComment "" input (mkPsSpan start_loc (psSpanEnd span))- where- endComment input lcomment- = docCommentEnd input (docType (\d -> NestedDocString d (mkHsDocStringChunk . dropTrailingDec <$> lcomment))) buf span-- dropTrailingDec [] = []- dropTrailingDec "-}" = ""- dropTrailingDec (x:xs) = x:dropTrailingDec xs--{-# INLINE nested_comment_logic #-}--- | Includes the trailing '-}' decorators--- drop the last two elements with the callback if you don't want them to be included-nested_comment_logic- :: (AlexInput -> Located String -> P (PsLocated Token)) -- ^ Continuation that gets the rest of the input and the lexed comment- -> String -- ^ starting value for accumulator (reversed) - When we want to include a decorator '{-' in the comment- -> AlexInput- -> PsSpan- -> P (PsLocated Token)-nested_comment_logic endComment commentAcc input span = go commentAcc (1::Int) input- where- go commentAcc 0 input@(AI end_loc _) = do- let comment = reverse commentAcc- cspan = mkSrcSpanPs $ mkPsSpan (psSpanStart span) end_loc- lcomment = L cspan comment- endComment input lcomment- go commentAcc n input = case alexGetChar' input of- Nothing -> errBrace input (psRealSpan span)- Just ('-',input) -> case alexGetChar' input of- Nothing -> errBrace input (psRealSpan 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 (psRealSpan span)- Just ('-',input) -> go ('-':'\123':commentAcc) (n+1) input- Just (_,_) -> go ('\123':commentAcc) n input- -- See Note [Nested comment line pragmas]- Just ('\n',input) -> case alexGetChar' input of- Nothing -> errBrace input (psRealSpan span)- Just ('#',_) -> do (parsedAcc,input) <- parseNestedPragma input- go (parsedAcc ++ '\n':commentAcc) n input- Just (_,_) -> go ('\n':commentAcc) n input- Just (c,input) -> go (c:commentAcc) n input---- See Note [Nested comment line pragmas]-parseNestedPragma :: AlexInput -> P (String,AlexInput)-parseNestedPragma input@(AI _ buf) = do- origInput <- getInput- setInput input- setExts (.|. xbit InNestedCommentBit)- pushLexState bol- lt <- lexToken- _ <- popLexState- setExts (.&. complement (xbit InNestedCommentBit))- postInput@(AI _ postBuf) <- getInput- setInput origInput- case unLoc lt of- ITcomment_line_prag -> do- let bytes = byteDiff buf postBuf- diff = lexemeToString buf bytes- return (reverse diff, postInput)- lt' -> panic ("parseNestedPragma: unexpected token" ++ (show lt'))--{--Note [Nested comment line pragmas]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We used to ignore cpp-preprocessor-generated #line pragmas if they were inside-nested comments.--Now, when parsing a nested comment, if we encounter a line starting with '#' we-call parseNestedPragma, which executes the following:-1. Save the current lexer input (loc, buf) for later-2. Set the current lexer input to the beginning of the line starting with '#'-3. Turn the 'InNestedComment' extension on-4. Push the 'bol' lexer state-5. Lex a token. Due to (2), (3), and (4), this should always lex a single line- or less and return the ITcomment_line_prag token. This may set source line- and file location if a #line pragma is successfully parsed-6. Restore lexer input and state to what they were before we did all this-7. Return control to the function parsing a nested comment, informing it of- what the lexer parsed--Regarding (5) above:-Every exit from the 'bol' lexer state (do_bol, popLinePrag1, failLinePrag1)-checks if the 'InNestedComment' extension is set. If it is, that function will-return control to parseNestedPragma by returning the ITcomment_line_prag token.--See #314 for more background on the bug this fixes.--}--{-# INLINE withLexedDocType #-}-withLexedDocType :: (AlexInput -> ((HsDocStringDecorator -> HsDocString) -> (HdkComment, Token)) -> Bool -> P (PsLocated Token))- -> P (PsLocated Token)-withLexedDocType lexDocComment = do- input@(AI _ buf) <- getInput- l <- getLastLocComment- 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 (mkHdkCommentNext l) True- '^' -> lexDocComment input (mkHdkCommentPrev l) True- '$' -> case lexDocName input of- Nothing -> do setInput input; lexToken -- eof reached, lex it normally- Just (name, input) -> lexDocComment input (mkHdkCommentNamed l name) True- '*' -> lexDocSection l 1 input- _ -> panic "withLexedDocType: Bad doc type"- where- lexDocSection l n input = case alexGetChar' input of- Just ('*', input) -> lexDocSection l (n+1) input- Just (_, _) -> lexDocComment input (mkHdkCommentSection l n) False- Nothing -> do setInput input; lexToken -- eof reached, lex it normally-- lexDocName :: AlexInput -> Maybe (String, AlexInput)- lexDocName = go ""- where- go acc input = case alexGetChar' input of- Just (c, input')- | isSpace c -> Just (reverse acc, input)- | otherwise -> go (c:acc) input'- Nothing -> Nothing--mkHdkCommentNext, mkHdkCommentPrev :: PsSpan -> (HsDocStringDecorator -> HsDocString) -> (HdkComment, Token)-mkHdkCommentNext loc mkDS = (HdkCommentNext ds,ITdocComment ds loc)- where ds = mkDS HsDocStringNext-mkHdkCommentPrev loc mkDS = (HdkCommentPrev ds,ITdocComment ds loc)- where ds = mkDS HsDocStringPrevious--mkHdkCommentNamed :: PsSpan -> String -> (HsDocStringDecorator -> HsDocString) -> (HdkComment, Token)-mkHdkCommentNamed loc name mkDS = (HdkCommentNamed name ds, ITdocComment ds loc)- where ds = mkDS (HsDocStringNamed name)--mkHdkCommentSection :: PsSpan -> Int -> (HsDocStringDecorator -> HsDocString) -> (HdkComment, Token)-mkHdkCommentSection loc n mkDS = (HdkCommentSection n ds, ITdocComment ds loc)- where ds = mkDS (HsDocStringGroup n)---- 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 _buf2 = do- setExts (.|. xbit InRulePragBit)- let !src = lexemeToString buf len- return (L span (ITrules_prag (SourceText src)))---- When 'UsePosPragsBit' is not set, it is expected that we emit a token instead--- of updating the position in 'PState'-linePrag :: Action-linePrag span buf len buf2 = do- usePosPrags <- getBit UsePosPragsBit- if usePosPrags- then begin line_prag2 span buf len buf2- else let !src = lexemeToString buf len- in return (L span (ITline_prag (SourceText src)))---- When 'UsePosPragsBit' is not set, it is expected that we emit a token instead--- of updating the position in 'PState'-columnPrag :: Action-columnPrag span buf len buf2 = do- usePosPrags <- getBit UsePosPragsBit- let !src = lexemeToString buf len- if usePosPrags- then begin column_prag span buf len buf2- else let !src = lexemeToString buf len- in return (L span (ITcolumn_prag (SourceText src)))--endPrag :: Action-endPrag span _buf _len _buf2 = 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.--{-# INLINE commentEnd #-}-commentEnd :: P (PsLocated Token)- -> AlexInput- -> (Maybe HdkComment, Token)- -> StringBuffer- -> PsSpan- -> P (PsLocated Token)-commentEnd cont input (m_hdk_comment, hdk_token) buf span = do- setInput input- let (AI loc nextBuf) = input- span' = mkPsSpan (psSpanStart span) loc- last_len = byteDiff buf nextBuf- span `seq` setLastToken span' last_len- whenIsJust m_hdk_comment $ \hdk_comment ->- P $ \s -> POk (s {hdk_comments = hdk_comments s `snocOL` L span' hdk_comment}) ()- b <- getBit RawTokenStreamBit- if b then return (L span' hdk_token)- else cont--{-# INLINE docCommentEnd #-}-docCommentEnd :: AlexInput -> (HdkComment, Token) -> StringBuffer ->- PsSpan -> P (PsLocated Token)-docCommentEnd input (hdk_comment, tok) buf span- = commentEnd lexToken input (Just hdk_comment, tok) buf span--errBrace :: AlexInput -> RealSrcSpan -> P a-errBrace (AI end _) span =- failLocMsgP (realSrcSpanStart span)- (psRealLoc end)- (\srcLoc -> mkPlainErrorMsgEnvelope srcLoc (PsErrLexer LexUnterminatedComment LexErrKind_EOF))--open_brace, close_brace :: Action-open_brace span _str _len _buf2 = do- ctx <- getContext- setContext (NoLayout:ctx)- return (L span ITocurly)-close_brace span _str _len _buf2 = 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.------ Throws an error if the name is not qualified.-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- | qual_size < 1 = error "splitQualName got an unqualified named"- | otherwise =- (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 _buf2 =- case lookupUFM reservedWordsFM fs of- Just (ITcase, _) -> do- lastTk <- getLastTk- keyword <- case lastTk of- Strict.Just (L _ ITlam) -> do- lambdaCase <- getBit LambdaCaseBit- unless lambdaCase $ do- pState <- getPState- addError $ mkPlainErrorMsgEnvelope (mkSrcSpanPs (last_loc pState)) PsErrLambdaCase- return ITlcase- _ -> return ITcase- maybe_layout keyword- return $ L span keyword- Just (ITlcases, _) -> do- lastTk <- getLastTk- lambdaCase <- getBit LambdaCaseBit- token <- case lastTk of- Strict.Just (L _ ITlam) | lambdaCase -> return ITlcases- _ -> return $ ITvarid fs- maybe_layout token- return $ L span token- Just (keyword, 0) -> do- maybe_layout keyword- return $ L span keyword- Just (keyword, i) -> do- exts <- getExts- if exts .&. i /= 0- 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---- See Note [Whitespace-sensitive operator parsing]-varsym :: OpWs -> Action-varsym opws@OpWsPrefix = sym $ \span exts s ->- let warnExtConflict errtok =- do { addPsMessage (mkSrcSpanPs span) (PsWarnOperatorWhitespaceExtConflict errtok)- ; return (ITvarsym s) }- in- if | s == fsLit "@" ->- return ITtypeApp -- regardless of TypeApplications for better error messages- | s == fsLit "%" ->- if xtest LinearTypesBit exts- then return ITpercent- else warnExtConflict OperatorWhitespaceSymbol_PrefixPercent- | s == fsLit "$" ->- if xtest ThQuotesBit exts- then return ITdollar- else warnExtConflict OperatorWhitespaceSymbol_PrefixDollar- | s == fsLit "$$" ->- if xtest ThQuotesBit exts- then return ITdollardollar- else warnExtConflict OperatorWhitespaceSymbol_PrefixDollarDollar- | s == fsLit "-" ->- return ITprefixminus -- Only when LexicalNegation is on, otherwise we get ITminus- -- and don't hit this code path. See Note [Minus tokens]- | s == fsLit ".", OverloadedRecordDotBit `xtest` exts ->- return (ITproj True) -- e.g. '(.x)'- | s == fsLit "." -> return ITdot- | s == fsLit "!" -> return ITbang- | s == fsLit "~" -> return ITtilde- | otherwise ->- do { warnOperatorWhitespace opws span s- ; return (ITvarsym s) }-varsym opws@OpWsSuffix = sym $ \span _ s ->- if | s == fsLit "@" -> failMsgP (\srcLoc -> mkPlainErrorMsgEnvelope srcLoc $ PsErrSuffixAT)- | s == fsLit "." -> return ITdot- | otherwise ->- do { warnOperatorWhitespace opws span s- ; return (ITvarsym s) }-varsym opws@OpWsTightInfix = sym $ \span exts s ->- if | s == fsLit "@" -> return ITat- | s == fsLit ".", OverloadedRecordDotBit `xtest` exts -> return (ITproj False)- | s == fsLit "." -> return ITdot- | otherwise ->- do { warnOperatorWhitespace opws span s- ; return (ITvarsym s) }-varsym OpWsLooseInfix = sym $ \_ _ s ->- if | s == fsLit "."- -> return ITdot- | otherwise- -> return $ ITvarsym s--consym :: OpWs -> Action-consym opws = sym $ \span _exts s ->- do { warnOperatorWhitespace opws span s- ; return (ITconsym s) }--warnOperatorWhitespace :: OpWs -> PsSpan -> FastString -> P ()-warnOperatorWhitespace opws span s =- whenIsJust (check_unusual_opws opws) $ \opws' ->- addPsMessage- (mkSrcSpanPs span)- (PsWarnOperatorWhitespace s opws')---- Check an operator occurrence for unusual whitespace (prefix, suffix, tight infix).--- This determines if -Woperator-whitespace is triggered.-check_unusual_opws :: OpWs -> Maybe OperatorWhitespaceOccurrence-check_unusual_opws opws =- case opws of- OpWsPrefix -> Just OperatorWhitespaceOccurrence_Prefix- OpWsSuffix -> Just OperatorWhitespaceOccurrence_Suffix- OpWsTightInfix -> Just OperatorWhitespaceOccurrence_TightInfix- OpWsLooseInfix -> Nothing--sym :: (PsSpan -> ExtsBitmap -> FastString -> P Token) -> Action-sym con span buf len _buf2 =- case lookupUFM reservedSymsFM fs of- Just (keyword, NormalSyntax, 0) ->- return $ L span keyword- Just (keyword, NormalSyntax, i) -> do- exts <- getExts- if exts .&. i /= 0- then return $ L span keyword- else L span <$!> con span exts fs- Just (keyword, UnicodeSyntax, 0) -> do- exts <- getExts- if xtest UnicodeSyntaxBit exts- then return $ L span keyword- else L span <$!> con span exts fs- Just (keyword, UnicodeSyntax, i) -> do- exts <- getExts- if exts .&. i /= 0 && xtest UnicodeSyntaxBit exts- then return $ L span keyword- else L span <$!> con span exts fs- Nothing -> do- exts <- getExts- L span <$!> con span exts 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 _buf2 = do- numericUnderscores <- getBit NumericUnderscoresBit -- #14473- let src = lexemeToString buf len- when ((not numericUnderscores) && ('_' `elem` src)) $ do- pState <- getPState- let msg = PsErrNumUnderscores NumUnderscore_Integral- addError $ mkPlainErrorMsgEnvelope (mkSrcSpanPs (last_loc pState)) msg- 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 $ \case- st@(SourceText ('-':_)) -> itint st (const True)- st@(SourceText _) -> itint st (const False)- st@NoSourceText -> itint st (< 0)- where- itint :: SourceText -> (Integer -> Bool) -> Integer -> Token- itint !st is_negative !val = ITinteger ((IL st $! is_negative val) 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)---- readSignificandExponentPair can understand negative rationals, exponents, everything.-tok_frac :: Int -> (String -> Token) -> Action-tok_frac drop f span buf len _buf2 = do- numericUnderscores <- getBit NumericUnderscoresBit -- #14473- let src = lexemeToString buf (len-drop)- when ((not numericUnderscores) && ('_' `elem` src)) $ do- pState <- getPState- let msg = PsErrNumUnderscores NumUnderscore_Float- addError $ mkPlainErrorMsgEnvelope (mkSrcSpanPs (last_loc pState)) msg- 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, readHexFractionalLit :: String -> FractionalLit-readHexFractionalLit = readFractionalLitX readHexSignificandExponentPair Base2-readFractionalLit = readFractionalLitX readSignificandExponentPair Base10--readFractionalLitX :: (String -> (Integer, Integer))- -> FractionalExponentBase- -> String -> FractionalLit-readFractionalLitX readStr b str =- mkSourceFractionalLit str is_neg i e b- where- is_neg = case str of- '-' : _ -> True- _ -> False- (i, e) = readStr 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 _buf2 = do- -- See Note [Nested comment line pragmas]- b <- getBit InNestedCommentBit- if b then return (L span ITcomment_line_prag) else 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 <- getBit AlternativeLayoutRuleBit- unless alr $ f t- where f (ITdo _) = pushLexState layout_do- f (ITmdo _) = pushLexState layout_do- f ITof = pushLexState layout- f ITlcase = pushLexState layout- f ITlcases = 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 _buf2 = do- _ <- popLexState- (AI l _) <- getInput- let offset = srcLocCol (psRealLoc l) - len- ctx <- getContext- nondecreasing <- getBit NondecreasingIndentationBit- 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 _buf2 = do- _ <- popLexState- pushLexState bol -- we must be at the start of a line- return (L span ITvccurly)---- -------------------------------------------------------------------------------- LINE pragmas--setLineAndFile :: Int -> Action-setLineAndFile code (PsSpan span _) buf len _buf2 = do- let src = lexemeToString buf (len - 1) -- drop trailing quotation mark- linenumLen = length $ head $ words src- linenum = parseUnsignedInteger buf linenumLen 10 octDecDigit- file = mkFastString $ go $ drop 1 $ dropWhile (/= '"') src- -- skip everything through first quotation mark to get to the filename- 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?).- resetAlrLastLoc file- setSrcLoc (mkRealSrcLoc file (fromIntegral linenum - 1) (srcSpanEndCol span))- -- subtract one: the line number refers to the *following* line- addSrcFile file- _ <- popLexState- pushLexState code- lexToken--setColumn :: Action-setColumn (PsSpan span _) buf len _buf2 = 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--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 = lex_string_prag_comment mkTok'- where- mkTok' s _ = mkTok s--lex_string_prag_comment :: (String -> PsSpan -> Token) -> Action-lex_string_prag_comment mkTok span _buf _len _buf2- = do input <- getInput- start <- getParsedLoc- l <- getLastLocComment- tok <- go l [] input- end <- getParsedLoc- return (L (mkPsSpan start end) tok)- where go l acc input- = if isString input "#-}"- then do setInput input- return (mkTok (reverse acc) l)- else case alexGetChar input of- Just (c,i) -> go l (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 (psRealSpan span))- (psRealLoc end)- (\srcLoc -> mkPlainErrorMsgEnvelope srcLoc $ PsErrLexer LexUnterminatedOptions LexErrKind_EOF)---- -------------------------------------------------------------------------------- Strings & Chars---- This stuff is horrible. I hates it.--lex_string_tok :: Action-lex_string_tok span buf _len _buf2 = do- lexed <- lex_string- (AI end bufEnd) <- getInput- let- tok = case lexed of- LexedPrimString s -> ITprimstring (SourceText src) (unsafeMkByteString s)- LexedRegularString s -> ITstring (SourceText src) (mkFastString s)- src = lexemeToString buf (cur bufEnd - cur buf)- return $ L (mkPsSpan (psSpanStart span) end) tok---lex_quoted_label :: Action-lex_quoted_label span buf _len _buf2 = do- start <- getInput- s <- lex_string_helper "" start- (AI end bufEnd) <- getInput- let- token = ITlabelvarid (SourceText src) (mkFastString s)- src = lexemeToString (stepOn buf) (cur bufEnd - cur buf - 1)- start = psSpanStart span-- return $ L (mkPsSpan start end) token---data LexedString = LexedRegularString String | LexedPrimString String--lex_string :: P LexedString-lex_string = do- start <- getInput- s <- lex_string_helper "" start- magicHash <- getBit MagicHashBit- if magicHash- then do- i <- getInput- case alexGetChar' i of- Just ('#',i) -> do- setInput i- when (any (> '\xFF') s) $ do- pState <- getPState- let msg = PsErrPrimStringInvalidChar- let err = mkPlainErrorMsgEnvelope (mkSrcSpanPs (last_loc pState)) msg- addError err- return $ LexedPrimString s- _other ->- return $ LexedRegularString s- else- return $ LexedRegularString s---lex_string_helper :: String -> AlexInput -> P String-lex_string_helper s start = do- i <- getInput- case alexGetChar' i of- Nothing -> lit_error i-- Just ('"',i) -> do- setInput i- return (reverse s)-- Just ('\\',i)- | Just ('&',i) <- next -> do- setInput i; lex_string_helper s start- | Just (c,i) <- next, c <= '\x7f' && is_space c -> do- -- is_space only works for <= '\x7f' (#3751, #5425)- setInput i; lex_stringgap s start- where next = alexGetChar' i-- Just (c, i1) -> do- case c of- '\\' -> do setInput i1; c' <- lex_escape; lex_string_helper (c':s) start- c | isAny c -> do setInput i1; lex_string_helper (c:s) start- _other | any isDoubleSmartQuote s -> do- -- if the built-up string s contains a smart double quote character, it was- -- likely the reason why the string literal was not lexed correctly- setInput start -- rewind to the first character in the string literal- -- so we can find the smart quote character's location- advance_to_smart_quote_character- i2@(AI loc _) <- getInput- case alexGetChar' i2 of- Just (c, _) -> do add_nonfatal_smart_quote_error c loc; lit_error i- Nothing -> lit_error i -- should never get here- _other -> lit_error i---lex_stringgap :: String -> AlexInput -> P String-lex_stringgap s start = do- i <- getInput- c <- getCharOrFail i- case c of- '\\' -> lex_string_helper s start- c | c <= '\x7f' && is_space c -> lex_stringgap s start- -- 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 _buf2 = do -- We've seen '- i1 <- getInput -- Look ahead to first character- let loc = psSpanStart span- case alexGetChar' i1 of- Nothing -> lit_error i1-- Just ('\'', i2@(AI end2 _)) -> do -- We've seen ''- setInput i2- return (L (mkPsSpan 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 if isSingleSmartQuote mc then add_smart_quote_error mc end2- 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- Just (c, _) | isSingleSmartQuote c -> add_smart_quote_error c end2- _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 (mkPsSpan loc end) ITsimpleQuote)--finish_char_tok :: StringBuffer -> PsLoc -> Char -> P (PsLocated Token)-finish_char_tok buf loc ch -- We've already seen the closing quote- -- Just need to check for trailing #- = do magicHash <- getBit MagicHashBit- 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 bufEnd')) -> do- setInput i- -- Include the trailing # in SourceText- let src' = lexemeToString buf (cur bufEnd' - cur buf)- return (L (mkPsSpan loc end)- (ITprimchar (SourceText src') ch))- _other ->- return (L (mkPsSpan loc end)- (ITchar (SourceText src) ch))- else do- return (L (mkPsSpan 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@(AI loc _) <- 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 '\''- -- the next two patterns build up a Unicode smart quote error (#21843)- smart_double_quote | isDoubleSmartQuote smart_double_quote ->- add_smart_quote_error smart_double_quote loc- smart_single_quote | isSingleSmartQuote smart_single_quote ->- add_smart_quote_error smart_single_quote loc- '^' -> 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 LexNumEscapeRange- 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 LexStringCharLit--getCharOrFail :: AlexInput -> P Char-getCharOrFail i = do- case alexGetChar' i of- Nothing -> lexError LexStringCharLitEOF- Just (c,i) -> do setInput i; return c---- -------------------------------------------------------------------------------- QuasiQuote--lex_qquasiquote_tok :: Action-lex_qquasiquote_tok span buf len _buf2 = do- let (qual, quoter) = splitQualName (stepOn buf) (len - 2) False- quoteStart <- getParsedLoc- quote <- lex_quasiquote (psRealLoc quoteStart) ""- end <- getParsedLoc- return (L (mkPsSpan (psSpanStart span) end)- (ITqQuasiQuote (qual,- quoter,- mkFastString (reverse quote),- mkPsSpan quoteStart end)))--lex_quasiquote_tok :: Action-lex_quasiquote_tok span buf len _buf2 = do- let quoter = tail (lexemeToString buf (len - 1))- -- 'tail' drops the initial '[',- -- while the -1 drops the trailing '|'- quoteStart <- getParsedLoc- quote <- lex_quasiquote (psRealLoc quoteStart) ""- end <- getParsedLoc- return (L (mkPsSpan (psSpanStart span) end)- (ITquasiQuote (mkFastString quoter,- mkFastString (reverse quote),- mkPsSpan 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 #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 (psRealLoc end) buf- (\k srcLoc -> mkPlainErrorMsgEnvelope srcLoc (PsErrLexer LexUnterminatedQQ k))---- -------------------------------------------------------------------------------- Unicode Smart Quote detection (#21843)--isDoubleSmartQuote :: Char -> Bool-isDoubleSmartQuote '“' = True-isDoubleSmartQuote '”' = True-isDoubleSmartQuote _ = False--isSingleSmartQuote :: Char -> Bool-isSingleSmartQuote '‘' = True-isSingleSmartQuote '’' = True-isSingleSmartQuote _ = False--isSmartQuote :: AlexAccPred ExtsBitmap-isSmartQuote _ _ _ (AI _ buf) = let c = prevChar buf ' ' in isSingleSmartQuote c || isDoubleSmartQuote c--smart_quote_error_message :: Char -> PsLoc -> MsgEnvelope PsMessage-smart_quote_error_message c loc =- let (correct_char, correct_char_name) =- if isSingleSmartQuote c then ('\'', "Single Quote") else ('"', "Quotation Mark")- err = mkPlainErrorMsgEnvelope (mkSrcSpanPs (mkPsSpan loc loc)) $- PsErrUnicodeCharLooksLike c correct_char correct_char_name in- err--smart_quote_error :: Action-smart_quote_error span buf _len _buf2 = do- let c = currentChar buf- addFatalError (smart_quote_error_message c (psSpanStart span))--add_smart_quote_error :: Char -> PsLoc -> P a-add_smart_quote_error c loc = addFatalError (smart_quote_error_message c loc)--add_nonfatal_smart_quote_error :: Char -> PsLoc -> P ()-add_nonfatal_smart_quote_error c loc = addError (smart_quote_error_message c loc)--advance_to_smart_quote_character :: P ()-advance_to_smart_quote_character = do- i <- getInput- case alexGetChar' i of- Just (c, _) | isDoubleSmartQuote c -> return ()- Just (_, i2) -> do setInput i2; advance_to_smart_quote_character- Nothing -> return () -- should never get here---- -------------------------------------------------------------------------------- Warnings--warnTab :: Action-warnTab srcspan _buf _len _buf2 = do- addTabWarning (psRealSpan srcspan)- lexToken--warnThen :: PsMessage -> Action -> Action-warnThen warning action srcspan buf len buf2 = do- addPsMessage (RealSrcSpan (psRealSpan srcspan) Strict.Nothing) warning- action srcspan buf len buf2---- -------------------------------------------------------------------------------- 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---- | The result of running a parser.-newtype ParseResult a = PR (# (# PState, a #) | PState #)---- | The parser has consumed a (possibly empty) prefix of the input and produced--- a result. Use 'getPsMessages' to check for accumulated warnings and non-fatal--- errors.------ The carried parsing state can be used to resume parsing.-pattern POk :: PState -> a -> ParseResult a-pattern POk s a = PR (# (# s , a #) | #)---- | The parser has consumed a (possibly empty) prefix of the input and failed.------ The carried parsing state can be used to resume parsing. It is the state--- right before failure, including the fatal parse error. 'getPsMessages' and--- 'getPsErrorMessages' must return a non-empty bag of errors.-pattern PFailed :: PState -> ParseResult a-pattern PFailed s = PR (# | s #)--{-# COMPLETE POk, PFailed #-}---- | Test whether a 'WarningFlag' is set-warnopt :: WarningFlag -> ParserOpts -> Bool-warnopt f options = f `EnumSet.member` pWarningFlags options---- | Parser options.------ See 'mkParserOpts' to construct this.-data ParserOpts = ParserOpts- { pExtsBitmap :: !ExtsBitmap -- ^ bitmap of permitted extensions- , pDiagOpts :: !DiagOpts- -- ^ Options to construct diagnostic messages.- , pSupportedExts :: [String]- -- ^ supported extensions (only used for suggestions in error messages)- }--pWarningFlags :: ParserOpts -> EnumSet WarningFlag-pWarningFlags opts = diag_warning_flags (pDiagOpts opts)---- | Haddock comment as produced by the lexer. These are accumulated in 'PState'--- and then processed in "GHC.Parser.PostProcess.Haddock". The location of the--- 'HsDocString's spans over the contents of the docstring - i.e. it does not--- include the decorator ("-- |", "{-|" etc.)-data HdkComment- = HdkCommentNext HsDocString- | HdkCommentPrev HsDocString- | HdkCommentNamed String HsDocString- | HdkCommentSection Int HsDocString- deriving Show--data PState = PState {- buffer :: StringBuffer,- options :: ParserOpts,- warnings :: Messages PsMessage,- errors :: Messages PsMessage,- tab_first :: Strict.Maybe RealSrcSpan, -- pos of first tab warning in the file- tab_count :: !Word, -- number of tab warnings in the file- last_tk :: Strict.Maybe (PsLocated Token), -- last non-comment token- prev_loc :: PsSpan, -- pos of previous token, including comments,- prev_loc2 :: PsSpan, -- pos of two back token, including comments,- -- see Note [PsSpan in Comments]- last_loc :: PsSpan, -- pos of current token- last_len :: !Int, -- len of current token- loc :: PsLoc, -- 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 :: [PsLocated 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 (PsLocated Token),- -- This is what we consider to be the location of the last token- -- emitted:- alr_last_loc :: PsSpan,- -- 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,-- -- 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 [exact print annotations] in GHC.Parser.Annotation- eof_pos :: Strict.Maybe (Strict.Pair RealSrcSpan RealSrcSpan), -- pos, gap to prior token- header_comments :: Strict.Maybe [LEpaComment],- comment_q :: [LEpaComment],-- -- Haddock comments accumulated in ascending order of their location- -- (BufPos). We use OrdList to get O(1) snoc.- --- -- See Note [Adding Haddock comments to the syntax tree] in GHC.Parser.PostProcess.Haddock- hdk_comments :: OrdList (PsLocated HdkComment)- }- -- 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).-- -- AZ question: setLastToken which sets last_loc and last_len- -- is called when processing AlexToken, immediately prior to- -- calling the action in the token. So from the perspective- -- of the action, it is the *current* token. Do I understand- -- correctly?--data ALRContext = ALRNoLayout Bool{- does it contain commas? -}- Bool{- is it a 'let' block? -}- | ALRLayout ALRLayout Int-data ALRLayout = ALRLayoutLet- | ALRLayoutWhere- | ALRLayoutOf- | ALRLayoutDo---- | The parsing monad, isomorphic to @StateT PState Maybe@.-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--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 s1 -> PFailed s1--failMsgP :: (SrcSpan -> MsgEnvelope PsMessage) -> P a-failMsgP f = do- pState <- getPState- addFatalError (f (mkSrcSpanPs (last_loc pState)))--failLocMsgP :: RealSrcLoc -> RealSrcLoc -> (SrcSpan -> MsgEnvelope PsMessage) -> P a-failLocMsgP loc1 loc2 f =- addFatalError (f (RealSrcSpan (mkRealSrcSpan loc1 loc2) Strict.Nothing))--getPState :: P PState-getPState = P $ \s -> POk s 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@(PState{ loc = PsLoc _ buf_loc }) ->- POk s{ loc = PsLoc new_loc buf_loc } ()--getRealSrcLoc :: P RealSrcLoc-getRealSrcLoc = P $ \s@(PState{ loc=loc }) -> POk s (psRealLoc loc)--getParsedLoc :: P PsLoc-getParsedLoc = P $ \s@(PState{ loc=loc }) -> POk s loc--addSrcFile :: FastString -> P ()-addSrcFile f = P $ \s -> POk s{ srcfiles = f : srcfiles s } ()--setEofPos :: RealSrcSpan -> RealSrcSpan -> P ()-setEofPos span gap = P $ \s -> POk s{ eof_pos = Strict.Just (span `Strict.And` gap) } ()--setLastToken :: PsSpan -> Int -> P ()-setLastToken loc len = P $ \s -> POk s {- last_loc=loc,- last_len=len- } ()--setLastTk :: PsLocated Token -> P ()-setLastTk tk@(L l _) = P $ \s -> POk s { last_tk = Strict.Just tk- , prev_loc = l- , prev_loc2 = prev_loc s} ()--setLastComment :: PsLocated Token -> P ()-setLastComment (L l _) = P $ \s -> POk s { prev_loc = l- , prev_loc2 = prev_loc s} ()--getLastTk :: P (Strict.Maybe (PsLocated Token))-getLastTk = P $ \s@(PState { last_tk = last_tk }) -> POk s last_tk---- see Note [PsSpan in Comments]-getLastLocComment :: P PsSpan-getLastLocComment = P $ \s@(PState { prev_loc = prev_loc }) -> POk s prev_loc---- see Note [PsSpan in Comments]-getLastLocEof :: P PsSpan-getLastLocEof = P $ \s@(PState { prev_loc2 = prev_loc2 }) -> POk s prev_loc2--getLastLoc :: P PsSpan-getLastLoc = P $ \s@(PState { last_loc = last_loc }) -> POk s last_loc--data AlexInput = AI !PsLoc !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 "GHC.Utils.Lexeme"- -- 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 -> digit- 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' = advancePsLoc loc c- byte = adjustChar c--{-# INLINE alexGetChar' #-}--- 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' = advancePsLoc 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 (PsLocated 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--resetAlrLastLoc :: FastString -> P ()-resetAlrLastLoc file =- P $ \s@(PState {alr_last_loc = PsSpan _ buf_span}) ->- POk s{ alr_last_loc = PsSpan (alrInitialLoc file) buf_span } ()--setAlrLastLoc :: PsSpan -> P ()-setAlrLastLoc l = P $ \s -> POk (s {alr_last_loc = l}) ()--getAlrLastLoc :: P PsSpan-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}) ()--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 :: PsLocated 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 (PsLocated 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 :: [PsLocated 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, boolean parsing flags (eg, language extensions--- or whether we are currently in a @RULE@ pragma) are represented by a bitmap--- stored in a @Word64@.-type ExtsBitmap = Word64--xbit :: ExtBits -> ExtsBitmap-xbit = bit . fromEnum--xtest :: ExtBits -> ExtsBitmap -> Bool-xtest ext xmap = testBit xmap (fromEnum ext)--xset :: ExtBits -> ExtsBitmap -> ExtsBitmap-xset ext xmap = setBit xmap (fromEnum ext)--xunset :: ExtBits -> ExtsBitmap -> ExtsBitmap-xunset ext xmap = clearBit xmap (fromEnum ext)---- | Various boolean flags, mostly language extensions, that impact lexing and--- parsing. Note that a handful of these can change during lexing/parsing.-data ExtBits- -- Flags that are constant once parsing starts- = FfiBit- | InterruptibleFfiBit- | CApiFfiBit- | ArrowsBit- | ThBit- | ThQuotesBit- | IpBit- | OverloadedLabelsBit -- #x overloaded labels- | ExplicitForallBit -- the 'forall' keyword- | 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- | QualifiedDoBit -- .do and .mdo- | UnicodeSyntaxBit -- the forall symbol, arrow symbols, etc- | UnboxedParensBit -- (# and #)- | DatatypeContextsBit- | MonadComprehensionsBit- | TransformComprehensionsBit- | QqBit -- enable quasiquoting- | RawTokenStreamBit -- producing a token stream with all comments included- | AlternativeLayoutRuleBit- | ALRTransitionalBit- | RelaxedLayoutBit- | NondecreasingIndentationBit- | SafeHaskellBit- | TraditionalRecordSyntaxBit- | ExplicitNamespacesBit- | LambdaCaseBit- | BinaryLiteralsBit- | NegativeLiteralsBit- | HexFloatLiteralsBit- | StaticPointersBit- | NumericUnderscoresBit- | StarIsTypeBit- | BlockArgumentsBit- | NPlusKPatternsBit- | DoAndIfThenElseBit- | MultiWayIfBit- | GadtSyntaxBit- | ImportQualifiedPostBit- | LinearTypesBit- | NoLexicalNegationBit -- See Note [Why not LexicalNegationBit]- | OverloadedRecordDotBit- | OverloadedRecordUpdateBit-- -- Flags that are updated once parsing starts- | InRulePragBit- | InNestedCommentBit -- See Note [Nested comment line pragmas]- | UsePosPragsBit- -- ^ If this is enabled, '{-# LINE ... -#}' and '{-# COLUMN ... #-}'- -- update the internal position. Otherwise, those pragmas are lexed as- -- tokens of their own.- deriving Enum--{-# INLINE mkParserOpts #-}-mkParserOpts- :: EnumSet LangExt.Extension -- ^ permitted language extensions enabled- -> DiagOpts -- ^ diagnostic options- -> [String] -- ^ Supported Languages and Extensions- -> Bool -- ^ are safe imports on?- -> Bool -- ^ keeping Haddock comment tokens- -> Bool -- ^ keep regular comment tokens-- -> Bool- -- ^ If this is enabled, '{-# LINE ... -#}' and '{-# COLUMN ... #-}' update- -- the internal position kept by the parser. Otherwise, those pragmas are- -- lexed as 'ITline_prag' and 'ITcolumn_prag' tokens.-- -> ParserOpts--- ^ Given exactly the information needed, set up the 'ParserOpts'-mkParserOpts extensionFlags diag_opts supported- safeImports isHaddock rawTokStream usePosPrags =- ParserOpts {- pDiagOpts = diag_opts- , pExtsBitmap = safeHaskellBit .|. langExtBits .|. optBits- , pSupportedExts = supported- }- where- safeHaskellBit = SafeHaskellBit `setBitIf` safeImports- 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- .|. QualifiedDoBit `xoptBit` LangExt.QualifiedDo- .|. UnicodeSyntaxBit `xoptBit` LangExt.UnicodeSyntax- .|. UnboxedParensBit `orXoptsBit` [LangExt.UnboxedTuples, LangExt.UnboxedSums]- .|. DatatypeContextsBit `xoptBit` LangExt.DatatypeContexts- .|. TransformComprehensionsBit `xoptBit` LangExt.TransformListComp- .|. MonadComprehensionsBit `xoptBit` LangExt.MonadComprehensions- .|. AlternativeLayoutRuleBit `xoptBit` LangExt.AlternativeLayoutRule- .|. ALRTransitionalBit `xoptBit` LangExt.AlternativeLayoutRuleTransitional- .|. 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- .|. StaticPointersBit `xoptBit` LangExt.StaticPointers- .|. NumericUnderscoresBit `xoptBit` LangExt.NumericUnderscores- .|. StarIsTypeBit `xoptBit` LangExt.StarIsType- .|. BlockArgumentsBit `xoptBit` LangExt.BlockArguments- .|. NPlusKPatternsBit `xoptBit` LangExt.NPlusKPatterns- .|. DoAndIfThenElseBit `xoptBit` LangExt.DoAndIfThenElse- .|. MultiWayIfBit `xoptBit` LangExt.MultiWayIf- .|. GadtSyntaxBit `xoptBit` LangExt.GADTSyntax- .|. ImportQualifiedPostBit `xoptBit` LangExt.ImportQualifiedPost- .|. LinearTypesBit `xoptBit` LangExt.LinearTypes- .|. NoLexicalNegationBit `xoptNotBit` LangExt.LexicalNegation -- See Note [Why not LexicalNegationBit]- .|. OverloadedRecordDotBit `xoptBit` LangExt.OverloadedRecordDot- .|. OverloadedRecordUpdateBit `xoptBit` LangExt.OverloadedRecordUpdate -- Enable testing via 'getBit OverloadedRecordUpdateBit' in the parser (RecordDotSyntax parsing uses that information).- optBits =- HaddockBit `setBitIf` isHaddock- .|. RawTokenStreamBit `setBitIf` rawTokStream- .|. UsePosPragsBit `setBitIf` usePosPrags-- xoptBit bit ext = bit `setBitIf` EnumSet.member ext extensionFlags- xoptNotBit bit ext = bit `setBitIf` not (EnumSet.member ext extensionFlags)-- orXoptsBit bit exts = bit `setBitIf` any (`EnumSet.member` extensionFlags) exts-- setBitIf :: ExtBits -> Bool -> ExtsBitmap- b `setBitIf` cond | cond = xbit b- | otherwise = 0--disableHaddock :: ParserOpts -> ParserOpts-disableHaddock opts = upd_bitmap (xunset HaddockBit)- where- upd_bitmap f = opts { pExtsBitmap = f (pExtsBitmap opts) }----- | Set parser options for parsing OPTIONS pragmas-initPragState :: ParserOpts -> StringBuffer -> RealSrcLoc -> PState-initPragState options buf loc = (initParserState options buf loc)- { lex_state = [bol, option_prags, 0]- }---- | Creates a parse state from a 'ParserOpts' value-initParserState :: ParserOpts -> StringBuffer -> RealSrcLoc -> PState-initParserState options buf loc =- PState {- buffer = buf,- options = options,- errors = emptyMessages,- warnings = emptyMessages,- tab_first = Strict.Nothing,- tab_count = 0,- last_tk = Strict.Nothing,- prev_loc = mkPsSpan init_loc init_loc,- prev_loc2 = mkPsSpan init_loc init_loc,- last_loc = mkPsSpan init_loc init_loc,- last_len = 0,- loc = init_loc,- context = [],- lex_state = [bol, 0],- srcfiles = [],- alr_pending_implicit_tokens = [],- alr_next_token = Nothing,- alr_last_loc = PsSpan (alrInitialLoc (fsLit "<no file>")) (BufSpan (BufPos 0) (BufPos 0)),- alr_context = [],- alr_expecting_ocurly = Nothing,- alr_justClosedExplicitLetBlock = False,- eof_pos = Strict.Nothing,- header_comments = Strict.Nothing,- comment_q = [],- hdk_comments = nilOL- }- where init_loc = PsLoc loc (BufPos 0)---- | An mtl-style class for monads that support parsing-related operations.--- For example, sometimes we make a second pass over the parsing results to validate,--- disambiguate, or rearrange them, and we do so in the PV monad which cannot consume--- input but can report parsing errors, check for extension bits, and accumulate--- parsing annotations. Both P and PV are instances of MonadP.------ MonadP grants us convenient overloading. The other option is to have separate operations--- for each monad: addErrorP vs addErrorPV, getBitP vs getBitPV, and so on.----class Monad m => MonadP m where- -- | Add a non-fatal error. Use this when the parser can produce a result- -- despite the error.- --- -- For example, when GHC encounters a @forall@ in a type,- -- but @-XExplicitForAll@ is disabled, the parser constructs @ForAllTy@- -- as if @-XExplicitForAll@ was enabled, adding a non-fatal error to- -- the accumulator.- --- -- Control flow wise, non-fatal errors act like warnings: they are added- -- to the accumulator and parsing continues. This allows GHC to report- -- more than one parse error per file.- --- addError :: MsgEnvelope PsMessage -> m ()-- -- | Add a warning to the accumulator.- -- Use 'getPsMessages' to get the accumulated warnings.- addWarning :: MsgEnvelope PsMessage -> m ()-- -- | Add a fatal error. This will be the last error reported by the parser, and- -- the parser will not produce any result, ending in a 'PFailed' state.- addFatalError :: MsgEnvelope PsMessage -> m a-- -- | Check if a given flag is currently set in the bitmap.- getBit :: ExtBits -> m Bool- -- | Go through the @comment_q@ in @PState@ and remove all comments- -- that belong within the given span- allocateCommentsP :: RealSrcSpan -> m EpAnnComments- -- | Go through the @comment_q@ in @PState@ and remove all comments- -- that come before or within the given span- allocatePriorCommentsP :: RealSrcSpan -> m EpAnnComments- -- | Go through the @comment_q@ in @PState@ and remove all comments- -- that come after the given span- allocateFinalCommentsP :: RealSrcSpan -> m EpAnnComments--instance MonadP P where- addError err- = P $ \s -> POk s { errors = err `addMessage` errors s} ()-- -- If the warning is meant to be suppressed, GHC will assign- -- a `SevIgnore` severity and the message will be discarded,- -- so we can simply add it no matter what.- addWarning w- = P $ \s -> POk (s { warnings = w `addMessage` warnings s }) ()-- addFatalError err =- addError err >> P PFailed-- getBit ext = P $ \s -> let b = ext `xtest` pExtsBitmap (options s)- in b `seq` POk s b- allocateCommentsP ss = P $ \s ->- let (comment_q', newAnns) = allocateComments ss (comment_q s) in- POk s {- comment_q = comment_q'- } (EpaComments newAnns)- allocatePriorCommentsP ss = P $ \s ->- let (header_comments', comment_q', newAnns)- = allocatePriorComments ss (comment_q s) (header_comments s) in- POk s {- header_comments = header_comments',- comment_q = comment_q'- } (EpaComments newAnns)- allocateFinalCommentsP ss = P $ \s ->- let (header_comments', comment_q', newAnns)- = allocateFinalComments ss (comment_q s) (header_comments s) in- POk s {- header_comments = header_comments',- comment_q = comment_q'- } (EpaCommentsBalanced (Strict.fromMaybe [] header_comments') newAnns)--getCommentsFor :: (MonadP m) => SrcSpan -> m EpAnnComments-getCommentsFor (RealSrcSpan l _) = allocateCommentsP l-getCommentsFor _ = return emptyComments--getPriorCommentsFor :: (MonadP m) => SrcSpan -> m EpAnnComments-getPriorCommentsFor (RealSrcSpan l _) = allocatePriorCommentsP l-getPriorCommentsFor _ = return emptyComments--getFinalCommentsFor :: (MonadP m) => SrcSpan -> m EpAnnComments-getFinalCommentsFor (RealSrcSpan l _) = allocateFinalCommentsP l-getFinalCommentsFor _ = return emptyComments--getEofPos :: P (Strict.Maybe (Strict.Pair RealSrcSpan RealSrcSpan))-getEofPos = P $ \s@(PState { eof_pos = pos }) -> POk s pos--addPsMessage :: SrcSpan -> PsMessage -> P ()-addPsMessage srcspan msg = do- diag_opts <- (pDiagOpts . options) <$> getPState- addWarning (mkPlainMsgEnvelope diag_opts srcspan msg)--addTabWarning :: RealSrcSpan -> P ()-addTabWarning srcspan- = P $ \s@PState{tab_first=tf, tab_count=tc, options=o} ->- let tf' = tf <|> Strict.Just srcspan- tc' = tc + 1- s' = if warnopt Opt_WarnTabs o- then s{tab_first = tf', tab_count = tc'}- else s- in POk s' ()---- | Get a bag of the errors that have been accumulated so far.--- Does not take -Werror into account.-getPsErrorMessages :: PState -> Messages PsMessage-getPsErrorMessages p = errors p---- | Get the warnings and errors accumulated so far.--- Does not take -Werror into account.-getPsMessages :: PState -> (Messages PsMessage, Messages PsMessage)-getPsMessages p =- let ws = warnings p- diag_opts = pDiagOpts (options p)- -- we add the tabulation warning on the fly because- -- we count the number of occurrences of tab characters- ws' = case tab_first p of- Strict.Nothing -> ws- Strict.Just tf ->- let msg = mkPlainMsgEnvelope diag_opts- (RealSrcSpan tf Strict.Nothing)- (PsWarnTab (tab_count p))- in msg `addMessage` ws- in (ws', errors p)--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 } ()- [] ->- unP (addFatalError $ srcParseErr o buf len (mkSrcSpanPs last_loc)) s---- 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 (psRealSpan 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 (psRealSpan 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- :: ParserOpts- -> StringBuffer -- current buffer (placed just after the last token)- -> Int -- length of the previous token- -> SrcSpan- -> MsgEnvelope PsMessage-srcParseErr options buf len loc = mkPlainErrorMsgEnvelope loc (PsErrParse token details)- where- token = lexemeToString (offsetBytes (-len) buf) len- pattern_ = decodePrevNChars 8 buf- last100 = decodePrevNChars 100 buf- doInLast100 = "do" `isInfixOf` last100- mdoInLast100 = "mdo" `isInfixOf` last100- th_enabled = ThQuotesBit `xtest` pExtsBitmap options- ps_enabled = PatternSynonymsBit `xtest` pExtsBitmap options- details = PsErrParseDetails {- ped_th_enabled = th_enabled- , ped_do_in_last_100 = doInLast100- , ped_mdo_in_last_100 = mdoInLast100- , ped_pat_syn_enabled = ps_enabled- , ped_pattern_parsed = pattern_ == "pattern "- }---- 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 } ->- unP (addFatalError $ srcParseErr o buf len (mkSrcSpanPs last_loc)) s---- A lexical error is reported at a particular position in the source file,--- not over a token range.-lexError :: LexErr -> P a-lexError e = do- loc <- getRealSrcLoc- (AI end buf) <- getInput- reportLexError loc (psRealLoc end) buf- (\k srcLoc -> mkPlainErrorMsgEnvelope srcLoc $ PsErrLexer e k)---- -------------------------------------------------------------------------------- This is the top-level function: called from the parser each time a--- new token is to be read from the input.--lexer, lexerDbg :: Bool -> (Located Token -> P a) -> P a--lexer queueComments cont = do- alr <- getBit AlternativeLayoutRuleBit- let lexTokenFun = if alr then lexTokenAlr else lexToken- (L span tok) <- lexTokenFun- --trace ("token: " ++ show tok) $ do-- if (queueComments && isComment tok)- then queueComment (L (psRealSpan span) tok) >> lexer queueComments cont- else cont (L (mkSrcSpanPs span) tok)---- Use this instead of 'lexer' in GHC.Parser to dump the tokens for debugging.-lexerDbg queueComments cont = lexer queueComments contDbg- where- contDbg tok = trace ("token: " ++ show (unLoc tok)) (cont tok)--lexTokenAlr :: P (PsLocated 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)- ITlcase -> setAlrExpectingOCurly (Just ALRLayoutOf)- ITlcases -> setAlrExpectingOCurly (Just ALRLayoutOf)- ITdo _ -> setAlrExpectingOCurly (Just ALRLayoutDo)- ITmdo _ -> setAlrExpectingOCurly (Just ALRLayoutDo)- ITrec -> setAlrExpectingOCurly (Just ALRLayoutDo)- _ -> return ()- return t--alternativeLayoutRuleToken :: PsLocated Token -> P (PsLocated Token)-alternativeLayoutRuleToken t- = do context <- getALRContext- lastLoc <- getAlrLastLoc- mExpectingOCurly <- getAlrExpectingOCurly- transitional <- getBit ALRTransitionalBit- justClosedExplicitLetBlock <- getJustClosedExplicitLetBlock- setJustClosedExplicitLetBlock False- let thisLoc = getLoc t- thisCol = srcSpanStartCol (psRealSpan thisLoc)- newLine = srcSpanStartLine (psRealSpan thisLoc) > srcSpanEndLine (psRealSpan 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 ITvocurly)- | otherwise ->- do setAlrExpectingOCurly Nothing- setPendingImplicitTokens [L lastLoc ITvccurly]- setNextToken t- return (L lastLoc ITvocurly)- (_, _, Just expectingOCurly) ->- do setAlrExpectingOCurly Nothing- setALRContext (ALRLayout expectingOCurly thisCol : context)- setNextToken t- return (L thisLoc ITvocurly)- -- 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 ITvccurly)- (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 ITvccurly)- -- This next case is to handle a transitional issue:- (ITwhere, ALRLayout _ col : ls, _)- | newLine && thisCol == col && transitional ->- do addPsMessage- (mkSrcSpanPs thisLoc)- (PsWarnTransitionalLayout TransLayout_Where)- setALRContext ls- setNextToken t- -- Note that we use lastLoc, as we may need to close- -- more layouts, or give a semicolon- return (L lastLoc ITvccurly)- -- This next case is to handle a transitional issue:- (ITvbar, ALRLayout _ col : ls, _)- | newLine && thisCol == col && transitional ->- do addPsMessage- (mkSrcSpanPs thisLoc)- (PsWarnTransitionalLayout TransLayout_Pipe)- setALRContext ls- setNextToken t- -- Note that we use lastLoc, as we may need to close- -- more layouts, or give a semicolon- return (L lastLoc ITvccurly)- (_, ALRLayout _ col : ls, _)- | newLine && thisCol == col ->- do setNextToken t- let loc = psSpanStart thisLoc- zeroWidthLoc = mkPsSpan loc loc- return (L zeroWidthLoc 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 ITvccurly)- -- 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 ITvccurly)- 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 ITvccurly)- (ITin, ALRLayout _ _ : ls, _) ->- do setALRContext ls- setNextToken t- return (L thisLoc ITvccurly)- -- the other ITin case omitted; general case below covers it- (ITcomma, ALRLayout _ _ : ls, _)- | topNoLayoutContainsCommas ls ->- do setALRContext ls- setNextToken t- return (L thisLoc ITvccurly)- (ITwhere, ALRLayout ALRLayoutDo _ : ls, _) ->- do setALRContext ls- setPendingImplicitTokens [t]- return (L thisLoc ITvccurly)- -- the other ITwhere case omitted; general case below covers it- (_, _, _) -> return t--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 _ = 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 (PsLocated Token)-lexToken = do- inp@(AI loc1 buf) <- getInput- sc <- getLexState- exts <- getExts- case alexScanUser exts inp sc of- AlexEOF -> do- let span = mkPsSpan loc1 loc1- lt <- getLastLocEof- setEofPos (psRealSpan span) (psRealSpan lt)- setLastToken span 0- return (L span ITeof)- AlexError (AI loc2 buf) ->- reportLexError (psRealLoc loc1) (psRealLoc loc2) buf- (\k srcLoc -> mkPlainErrorMsgEnvelope srcLoc $ PsErrLexer LexError k)- AlexSkip inp2 _ -> do- setInput inp2- lexToken- AlexToken inp2@(AI end buf2) _ t -> do- setInput inp2- let span = mkPsSpan loc1 end- let bytes = byteDiff buf buf2- span `seq` setLastToken span bytes- lt <- t span buf bytes buf2- let lt' = unLoc lt- if (isComment lt') then setLastComment lt else setLastTk lt- return lt--reportLexError :: RealSrcLoc- -> RealSrcLoc- -> StringBuffer- -> (LexErrKind -> SrcSpan -> MsgEnvelope PsMessage)- -> P a-reportLexError loc1 loc2 buf f- | atEnd buf = failLocMsgP loc1 loc2 (f LexErrKind_EOF)- | otherwise =- let c = fst (nextChar buf)- in if c == '\0' -- decoding errors are mapped to '\0', see utf8DecodeChar#- then failLocMsgP loc2 loc2 (f LexErrKind_UTF8)- else failLocMsgP loc1 loc2 (f (LexErrKind_Char c))--lexTokenStream :: ParserOpts -> StringBuffer -> RealSrcLoc -> ParseResult [Located Token]-lexTokenStream opts buf loc = unP go initState{ options = opts' }- where- new_exts = xunset UsePosPragsBit -- parse LINE/COLUMN pragmas as tokens- $ xset RawTokenStreamBit -- include comments- $ pExtsBitmap opts- opts' = opts { pExtsBitmap = new_exts }- initState = initParserState opts' buf loc- 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_comment ITdocOptions),- ("language", token ITlanguage_prag),- ("include", lex_string_prag ITinclude_prag)])--ignoredPrags = Map.fromList (map ignored pragmas)- where ignored opt = (opt, nested_comment)- 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 (SourceText s)) FunLike))),- ("inlinable",- strtoken (\s -> (ITinline_prag (SourceText s) (Inlinable (SourceText s)) FunLike))),- ("inlineable",- strtoken (\s -> (ITinline_prag (SourceText s) (Inlinable (SourceText s)) FunLike))),- -- Spelling variant- ("notinline",- strtoken (\s -> (ITinline_prag (SourceText s) (NoInline (SourceText s)) FunLike))),- ("opaque", strtoken (\s -> ITopaque_prag (SourceText s))),- ("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))),- ("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 (SourceText s)) ConLike))),- ("notinline conlike",- strtoken (\s -> (ITinline_prag (SourceText s) (NoInline (SourceText s)) 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 buf2 =- case Map.lookup (clean_pragma (lexemeToString buf len)) prags of- Just found -> found span buf len buf2- Nothing -> lexError LexUnknownPragma--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))--warn_unknown_prag :: Map String Action -> Action-warn_unknown_prag prags span buf len buf2 = do- let uppercase = map toUpper- unknown_prag = uppercase (clean_pragma (lexemeToString buf len))- suggestions = map uppercase (Map.keys prags)- addPsMessage (RealSrcSpan (psRealSpan span) Strict.Nothing) $- PsWarnUnrecognisedPragma unknown_prag suggestions- nested_comment span buf len buf2--{--%************************************************************************-%* *- Helper functions for generating annotations in the parser-%* *-%************************************************************************--}----- |Given a 'RealSrcSpan' that surrounds a 'HsPar' or 'HsParTy', generate--- 'AddEpAnn' values for the opening and closing bordering on the start--- and end of the span-mkParensEpAnn :: RealSrcSpan -> (AddEpAnn, AddEpAnn)-mkParensEpAnn ss = (AddEpAnn AnnOpenP (EpaSpan lo Strict.Nothing),AddEpAnn AnnCloseP (EpaSpan lc Strict.Nothing))- where- f = srcSpanFile ss- sl = srcSpanStartLine ss- sc = srcSpanStartCol ss- el = srcSpanEndLine ss- ec = srcSpanEndCol ss- lo = mkRealSrcSpan (realSrcSpanStart ss) (mkRealSrcLoc f sl (sc+1))- lc = mkRealSrcSpan (mkRealSrcLoc f el (ec - 1)) (realSrcSpanEnd ss)--queueComment :: RealLocated Token -> P()-queueComment c = P $ \s -> POk s {- comment_q = commentToAnnotation c : comment_q s- } ()--allocateComments- :: RealSrcSpan- -> [LEpaComment]- -> ([LEpaComment], [LEpaComment])-allocateComments ss comment_q =- let- (before,rest) = break (\(L l _) -> isRealSubspanOf (anchor l) ss) comment_q- (middle,after) = break (\(L l _) -> not (isRealSubspanOf (anchor l) ss)) rest- comment_q' = before ++ after- newAnns = middle- in- (comment_q', reverse newAnns)---- Comments appearing without a line-break before the first--- declaration are associated with the declaration-splitPriorComments- :: RealSrcSpan- -> [LEpaComment]- -> ([LEpaComment], [LEpaComment])-splitPriorComments ss prior_comments =- let- -- True if there is only one line between the earlier and later span- cmp later earlier- = srcSpanStartLine later - srcSpanEndLine earlier == 1-- go decl _ [] = ([],decl)- go decl r (c@(L l _):cs) = if cmp r (anchor l)- then go (c:decl) (anchor l) cs- else (reverse (c:cs), decl)- in- go [] ss prior_comments--allocatePriorComments- :: RealSrcSpan- -> [LEpaComment]- -> Strict.Maybe [LEpaComment]- -> (Strict.Maybe [LEpaComment], [LEpaComment], [LEpaComment])-allocatePriorComments ss comment_q mheader_comments =- let- cmp (L l _) = anchor l <= ss- (newAnns,after) = partition cmp comment_q- comment_q'= after- (prior_comments, decl_comments)- = case mheader_comments of- Strict.Nothing -> (reverse newAnns, [])- _ -> splitPriorComments ss newAnns- in- case mheader_comments of- Strict.Nothing -> (Strict.Just prior_comments, comment_q', decl_comments)- Strict.Just _ -> (mheader_comments, comment_q', reverse newAnns)--allocateFinalComments- :: RealSrcSpan- -> [LEpaComment]- -> Strict.Maybe [LEpaComment]- -> (Strict.Maybe [LEpaComment], [LEpaComment], [LEpaComment])-allocateFinalComments _ss comment_q mheader_comments =- -- We ignore the RealSrcSpan as the parser currently provides a- -- point span at (1,1).- case mheader_comments of- Strict.Nothing -> (Strict.Just (reverse comment_q), [], [])- Strict.Just _ -> (mheader_comments, [], reverse comment_q)--commentToAnnotation :: RealLocated Token -> LEpaComment-commentToAnnotation (L l (ITdocComment s ll)) = mkLEpaComment l ll (EpaDocComment s)-commentToAnnotation (L l (ITdocOptions s ll)) = mkLEpaComment l ll (EpaDocOptions s)-commentToAnnotation (L l (ITlineComment s ll)) = mkLEpaComment l ll (EpaLineComment s)-commentToAnnotation (L l (ITblockComment s ll)) = mkLEpaComment l ll (EpaBlockComment s)-commentToAnnotation _ = panic "commentToAnnotation"---- see Note [PsSpan in Comments]-mkLEpaComment :: RealSrcSpan -> PsSpan -> EpaCommentTok -> LEpaComment-mkLEpaComment l ll tok = L (realSpanAsAnchor l) (EpaComment tok (psRealSpan ll))---- -----------------------------------------------------------------------isComment :: Token -> Bool-isComment (ITlineComment _ _) = True-isComment (ITblockComment _ _) = True-isComment (ITdocComment _ _) = True-isComment (ITdocOptions _ _) = True-isComment _ = False--bol,column_prag,layout,layout_do,layout_if,layout_left,line_prag1,line_prag1a,line_prag2,line_prag2a,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_prag2 = 9-line_prag2a = 10-option_prags = 11-alex_action_1 = warnTab-alex_action_2 = nested_comment-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_9 = smart_quote_error-alex_action_11 = begin line_prag1-alex_action_12 = begin line_prag1-alex_action_16 = do_bol-alex_action_17 = hopefully_open_brace-alex_action_19 = begin line_prag1-alex_action_20 = new_layout_context True dontGenerateSemic ITvbar-alex_action_21 = pop-alex_action_22 = new_layout_context True generateSemic ITvocurly-alex_action_23 = new_layout_context False generateSemic ITvocurly-alex_action_24 = do_layout_left-alex_action_25 = begin bol-alex_action_26 = dispatch_pragmas linePrags-alex_action_27 = setLineAndFile line_prag1a-alex_action_28 = failLinePrag1-alex_action_29 = popLinePrag1-alex_action_30 = setLineAndFile line_prag2a-alex_action_31 = pop-alex_action_32 = setColumn-alex_action_33 = dispatch_pragmas twoWordPrags-alex_action_34 = dispatch_pragmas oneWordPrags-alex_action_35 = dispatch_pragmas ignoredPrags-alex_action_36 = endPrag-alex_action_37 = dispatch_pragmas fileHeaderPrags-alex_action_38 = nested_comment-alex_action_39 = warn_unknown_prag (Map.unions [ oneWordPrags, fileHeaderPrags, ignoredPrags, linePrags ])-alex_action_40 = warn_unknown_prag Map.empty-alex_action_41 = multiline_doc_comment-alex_action_42 = nested_doc_comment-alex_action_43 = token (ITopenExpQuote NoE NormalSyntax)-alex_action_44 = token (ITopenTExpQuote NoE)-alex_action_45 = token (ITcloseQuote NormalSyntax)-alex_action_46 = token ITcloseTExpQuote-alex_action_47 = token (ITopenExpQuote HasE NormalSyntax)-alex_action_48 = token (ITopenTExpQuote HasE)-alex_action_49 = token ITopenPatQuote-alex_action_50 = layout_token ITopenDecQuote-alex_action_51 = token ITopenTypQuote-alex_action_52 = lex_quasiquote_tok-alex_action_53 = lex_qquasiquote_tok-alex_action_54 = token (ITopenExpQuote NoE UnicodeSyntax)-alex_action_55 = token (ITcloseQuote UnicodeSyntax)-alex_action_56 = special (IToparenbar NormalSyntax)-alex_action_57 = special (ITcparenbar NormalSyntax)-alex_action_58 = special (IToparenbar UnicodeSyntax)-alex_action_59 = special (ITcparenbar UnicodeSyntax)-alex_action_60 = skip_one_varid ITdupipvarid-alex_action_61 = skip_one_varid_src ITlabelvarid-alex_action_62 = lex_quoted_label-alex_action_63 = token IToubxparen-alex_action_64 = token ITcubxparen-alex_action_65 = special IToparen-alex_action_66 = special ITcparen-alex_action_67 = special ITobrack-alex_action_68 = special ITcbrack-alex_action_69 = special ITcomma-alex_action_70 = special ITsemi-alex_action_71 = special ITbackquote-alex_action_72 = open_brace-alex_action_73 = close_brace-alex_action_74 = qdo_token ITdo-alex_action_75 = qdo_token ITmdo-alex_action_76 = idtoken qvarid-alex_action_77 = idtoken qconid-alex_action_78 = varid-alex_action_79 = idtoken conid-alex_action_80 = idtoken qvarid-alex_action_81 = idtoken qconid-alex_action_82 = varid-alex_action_83 = idtoken conid-alex_action_84 = idtoken qvarsym-alex_action_85 = idtoken qconsym-alex_action_86 = with_op_ws varsym-alex_action_87 = with_op_ws consym-alex_action_88 = tok_num positive 0 0 decimal-alex_action_89 = tok_num positive 2 2 binary-alex_action_90 = tok_num positive 2 2 octal-alex_action_91 = tok_num positive 2 2 hexadecimal-alex_action_92 = tok_num negative 1 1 decimal-alex_action_93 = tok_num negative 3 3 binary-alex_action_94 = tok_num negative 3 3 octal-alex_action_95 = tok_num negative 3 3 hexadecimal-alex_action_96 = tok_frac 0 tok_float-alex_action_97 = tok_frac 0 tok_float-alex_action_98 = tok_frac 0 tok_hex_float-alex_action_99 = tok_frac 0 tok_hex_float-alex_action_100 = tok_primint positive 0 1 decimal-alex_action_101 = tok_primint positive 2 3 binary-alex_action_102 = tok_primint positive 2 3 octal-alex_action_103 = tok_primint positive 2 3 hexadecimal-alex_action_104 = tok_primint negative 1 2 decimal-alex_action_105 = tok_primint negative 3 4 binary-alex_action_106 = tok_primint negative 3 4 octal-alex_action_107 = tok_primint negative 3 4 hexadecimal-alex_action_108 = tok_primword 0 2 decimal-alex_action_109 = tok_primword 2 4 binary-alex_action_110 = tok_primword 2 4 octal-alex_action_111 = tok_primword 2 4 hexadecimal-alex_action_112 = tok_frac 1 tok_primfloat-alex_action_113 = tok_frac 2 tok_primdouble-alex_action_114 = tok_frac 1 tok_primfloat-alex_action_115 = tok_frac 2 tok_primdouble-alex_action_116 = lex_char_tok-alex_action_117 = lex_string_tok+{-# LINE 43 "_build/source-dist/ghc-9.8.1-src/ghc-9.8.1/compiler/GHC/Parser/Lexer.x" #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE MultiWayIf #-}+{-# LANGUAGE UnboxedTuples #-}+{-# LANGUAGE UnboxedSums #-}+{-# LANGUAGE UnliftedNewtypes #-}+{-# LANGUAGE PatternSynonyms #-}+++{-# OPTIONS_GHC -funbox-strict-fields #-}+{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}++module GHC.Parser.Lexer (+ Token(..), lexer, lexerDbg,+ ParserOpts(..), mkParserOpts,+ PState (..), initParserState, initPragState,+ P(..), ParseResult(POk, PFailed),+ allocateComments, allocatePriorComments, allocateFinalComments,+ MonadP(..),+ getRealSrcLoc, getPState,+ failMsgP, failLocMsgP, srcParseFail,+ getPsErrorMessages, getPsMessages,+ popContext, pushModuleContext, setLastToken, setSrcLoc,+ activeContext, nextIsEOF,+ getLexState, popLexState, pushLexState,+ ExtBits(..),+ xtest, xunset, xset,+ disableHaddock,+ lexTokenStream,+ mkParensEpAnn,+ getCommentsFor, getPriorCommentsFor, getFinalCommentsFor,+ getEofPos,+ commentToAnnotation,+ HdkComment(..),+ warnopt,+ adjustChar,+ addPsMessage+ ) where++import GHC.Prelude+import qualified GHC.Data.Strict as Strict++-- base+import Control.Monad+import Control.Applicative+import Data.Char+import Data.List (stripPrefix, isInfixOf, partition)+import Data.List.NonEmpty ( NonEmpty(..) )+import qualified Data.List.NonEmpty as NE+import Data.Maybe+import Data.Word+import Debug.Trace (trace)++import GHC.Data.EnumSet as 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+import GHC.Utils.Error+import GHC.Utils.Outputable+import GHC.Utils.Panic+import GHC.Data.StringBuffer+import GHC.Data.FastString+import GHC.Types.Error+import GHC.Types.Unique.FM+import GHC.Data.Maybe+import GHC.Data.OrdList+import GHC.Utils.Misc ( readSignificandExponentPair, readHexSignificandExponentPair )++import GHC.Types.SrcLoc+import GHC.Types.SourceText+import GHC.Types.Basic ( InlineSpec(..), RuleMatchInfo(..))+import GHC.Hs.Doc++import GHC.Parser.CharClass++import GHC.Parser.Annotation+import GHC.Driver.Flags+import GHC.Parser.Errors.Basic+import GHC.Parser.Errors.Types+import GHC.Parser.Errors.Ppr ()+#if __GLASGOW_HASKELL__ >= 603+#include "ghcconfig.h"+#elif defined(__GLASGOW_HASKELL__)+#include "config.h"+#endif+#if __GLASGOW_HASKELL__ >= 503+import Data.Array+#else+import Array+#endif+#if __GLASGOW_HASKELL__ >= 503+import Data.Array.Base (unsafeAt)+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\xf7\x00\x00\x00\x05\x01\x00\x00\x2f\x01\x00\x00\x4b\x01\x00\x00\x86\x01\x00\x00\x75\x00\x00\x00\xd4\x01\x00\x00\xeb\x01\x00\x00\x64\x01\x00\x00\x2c\x02\x00\x00\x6d\x02\x00\x00\xe4\xff\xff\xff\x84\x02\x00\x00\x84\x01\x00\x00\xc5\x02\x00\x00\x0c\x02\x00\x00\x4d\x02\x00\x00\xa5\x02\x00\x00\xe8\x02\x00\x00\x06\x03\x00\x00\x1e\x03\x00\x00\x28\x03\x00\x00\x37\x03\x00\x00\x70\x03\x00\x00\x4b\x03\x00\x00\x58\x03\x00\x00\xc8\x03\x00\x00\xd2\x03\x00\x00\x16\x04\x00\x00\xec\x00\x00\x00\x64\x02\x00\x00\x3b\x04\x00\x00\x65\x00\x00\x00\x7e\x00\x00\x00\x84\x04\x00\x00\x9c\x04\x00\x00\xc1\x04\x00\x00\xfa\x04\x00\x00\xbc\x03\x00\x00\x7b\x04\x00\x00\x1f\x05\x00\x00\x82\x00\x00\x00\xbb\x00\x00\x00\x68\x05\x00\x00\x80\x05\x00\x00\xbd\x05\x00\x00\xf2\x05\x00\x00\x38\x06\x00\x00\x5b\x06\x00\x00\x83\x06\x00\x00\xe1\x06\x00\x00\x3d\x07\x00\x00\x62\x07\x00\x00\xbe\x07\x00\x00\xe1\x07\x00\x00\xde\xff\xff\xff\xe1\xff\xff\xff\x21\x08\x00\x00\xe5\xff\xff\xff\x9b\x08\x00\x00\x15\x09\x00\x00\xe6\xff\xff\xff\xed\xff\xff\xff\x8f\x09\x00\x00\x09\x0a\x00\x00\x83\x0a\x00\x00\xfd\x0a\x00\x00\x77\x0b\x00\x00\xf1\x0b\x00\x00\x6b\x0c\x00\x00\xc5\x0c\x00\x00\x43\x0d\x00\x00\xef\xff\xff\xff\xbd\x0d\x00\x00\x37\x0e\x00\x00\xb1\x0e\x00\x00\x2b\x0f\x00\x00\xa5\x0f\x00\x00\x1f\x10\x00\x00\x99\x10\x00\x00\x13\x11\x00\x00\x00\x00\x00\x00\xf1\xff\xff\xff\xf2\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x11\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\xc9\x11\x00\x00\x43\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbd\x12\x00\x00\x00\x00\x00\x00\x39\x13\x00\x00\x00\x00\x00\x00\xb5\x13\x00\x00\x00\x00\x00\x00\x31\x14\x00\x00\x00\x00\x00\x00\xad\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x29\x15\x00\x00\x97\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\xff\xff\xff\x78\x00\x00\x00\x00\x00\x00\x00\xa5\x15\x00\x00\x23\x01\x00\x00\x1f\x16\x00\x00\x55\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x99\x16\x00\x00\x13\x17\x00\x00\xd8\x04\x00\x00\x6a\x01\x00\x00\x9f\x05\x00\x00\x5f\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x66\x00\x00\x00\x15\x00\x00\x00\x6a\x00\x00\x00\x00\x00\x00\x00\xe2\x04\x00\x00\x89\x17\x00\x00\xa0\x01\x00\x00\xc9\x17\x00\x00\x47\x18\x00\x00\xb5\x00\x00\x00\xcb\x00\x00\x00\x8f\x03\x00\x00\x8a\x00\x00\x00\x8f\x00\x00\x00\xc5\x18\x00\x00\xd4\x05\x00\x00\x3b\x19\x00\x00\x1e\x04\x00\x00\x7b\x19\x00\x00\xf9\x19\x00\x00\x77\x1a\x00\x00\xf1\x1a\x00\x00\x6b\x1b\x00\x00\xe5\x1b\x00\x00\x5f\x1c\x00\x00\x49\x01\x00\x00\xd9\x1c\x00\x00\x53\x1d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x00\x00\x7c\x04\x00\x00\x7c\x00\x00\x00\x95\x00\x00\x00\x00\x00\x00\x00\x96\x00\x00\x00\x00\x00\x00\x00\x31\x00\x00\x00\x46\x00\x00\x00\x49\x00\x00\x00\x6b\x00\x00\x00\x7f\x00\x00\x00\xd9\x00\x00\x00\x00\x00\x00\x00\xd2\x00\x00\x00\x7d\x00\x00\x00\x81\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x4f\x02\x00\x00\x02\x04\x00\x00\xca\x1d\x00\x00\xf2\x1d\x00\x00\x35\x1e\x00\x00\x5d\x1e\x00\x00\xc3\x00\x00\x00\xa0\x1e\x00\x00\xc8\x1e\x00\x00\xe7\x00\x00\x00\xeb\x00\x00\x00\xed\x00\x00\x00\xef\x00\x00\x00\xf0\x00\x00\x00\xf4\x00\x00\x00\x03\x01\x00\x00\xd4\x00\x00\x00\x48\x05\x00\x00\x00\x00\x00\x00\x23\x04\x00\x00\x0d\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x01\x00\x00\xa1\x00\x00\x00\x94\x00\x00\x00\x98\x00\x00\x00\x22\x02\x00\x00\xa4\x00\x00\x00\x97\x00\x00\x00\x9d\x00\x00\x00\xba\x02\x00\x00\xaf\x00\x00\x00\xa2\x00\x00\x00\xa6\x00\x00\x00\xbb\x02\x00\x00\xb2\x00\x00\x00\xa7\x00\x00\x00\xa9\x00\x00\x00\x00\x00\x00\x00\xfd\x00\x00\x00\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x02\x01\x00\x00\x00\x00\x00\x00\x09\x01\x00\x00\x00\x00\x00\x00\x07\x01\x00\x00\x00\x00\x00\x00\x0d\x01\x00\x00\x00\x00\x00\x00\x12\x01\x00\x00\x00\x00\x00\x00\x13\x01\x00\x00\x00\x00\x00\x00\x14\x01\x00\x00\x00\x00\x00\x00\x16\x01\x00\x00\x00\x00\x00\x00\x18\x01\x00\x00\x00\x00\x00\x00\x1c\x01\x00\x00\x00\x00\x00\x00\xee\x00\x00\x00\xda\x00\x00\x00\xf1\x00\x00\x00\xe9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\x02\x00\x00\xe5\x00\x00\x00\xfc\x00\x00\x00\xdc\x02\x00\x00\xea\x00\x00\x00\x0b\x01\x00\x00\xfb\x02\x00\x00\x06\x01\x00\x00\x0e\x01\x00\x00\x10\x03\x00\x00\x0a\x01\x00\x00\x15\x01\x00\x00\xe9\x03\x00\x00\x11\x01\x00\x00\x1b\x01\x00\x00\x09\x04\x00\x00\x1a\x01\x00\x00\x30\x01\x00\x00\x2c\x04\x00\x00\x2c\x01\x00\x00\x33\x01\x00\x00\x32\x04\x00\x00\x2e\x01\x00\x00\x35\x01\x00\x00\x00\x00\x00\x00\x27\x01\x00\x00\x00\x00\x00\x00\x29\x01\x00\x00\x00\x00\x00\x00\x3c\x01\x00\x00\x00\x00\x00\x00\x3d\x01\x00\x00\x00\x00\x00\x00\x47\x01\x00\x00\x00\x00\x00\x00\x52\x01\x00\x00\x00\x00\x00\x00\x70\x01\x00\x00\x00\x00\x00\x00\x74\x01\x00\x00\x00\x00\x00\x00\x7e\x01\x00\x00\x00\x00\x00\x00\x7f\x01\x00\x00\x00\x00\x00\x00\xe6\x1e\x00\x00\x60\x1f\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x8d\x01\x00\x00\x00\x00\x00\x00\x92\x01\x00\x00\x00\x00\x00\x00\xb0\x01\x00\x00\x00\x00\x00\x00\xb2\x01\x00\x00\x00\x00\x00\x00\xd0\x01\x00\x00\x00\x00\x00\x00\xd8\x01\x00\x00\x00\x00\x00\x00\xd9\x01\x00\x00\x00\x00\x00\x00\xda\x01\x00\x00\x00\x00\x00\x00\xda\x1f\x00\x00\x14\x20\x00\x00\xdb\x01\x00\x00\x00\x00\x00\x00\xdc\x01\x00\x00\x00\x00\x00\x00\xdd\x01\x00\x00\x00\x00\x00\x00\xde\x01\x00\x00\x00\x00\x00\x00\xef\x01\x00\x00\x8e\x20\x00\x00\x08\x21\x00\x00\x82\x21\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x04\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x01\x00\x00\xe0\x01\x00\x00\xe1\x01\x00\x00\xe2\x01\x00\x00\x1d\x03\x00\x00\x97\x06\x00\x00\xb9\x06\x00\x00\xfc\x07\x00\x00\x76\x08\x00\x00\x6f\x17\x00\x00\x73\x07\x00\x00\x7e\x07\x00\x00\xf0\x08\x00\x00\x55\x03\x00\x00\x56\x03\x00\x00\xcd\x21\x00\x00"#++alex_table :: AlexAddr+alex_table = AlexA#+ "\x00\x00\x3e\x00\x4c\x00\x51\x00\x44\x00\x3a\x00\xd6\x00\xc0\x00\x3f\x00\x44\x00\xd5\x00\xa8\x00\xd6\x00\xd6\x00\xd6\x00\x14\x00\x45\x00\x14\x00\x4f\x00\x75\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x7f\x00\xd4\x00\x7a\x00\xd6\x00\x3a\x00\xd8\x00\x39\x00\x3a\x00\x3a\x00\x3a\x00\xd9\x00\x62\x00\x61\x00\x3a\x00\x3a\x00\x5d\x00\x35\x00\x3a\x00\x3a\x00\x2f\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x34\x00\x5c\x00\x3a\x00\x3a\x00\x3a\x00\x3b\x00\x3a\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x5f\x00\x3a\x00\x5e\x00\x3a\x00\x58\x01\x5b\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x59\x00\x37\x00\x58\x00\x3a\x00\xd6\x00\xc2\x00\x82\x00\x83\x00\xd5\x00\xbf\x00\xd6\x00\xd6\x00\xd6\x00\xd6\x00\xc2\x00\x65\x00\x8a\x00\xd5\x00\x8b\x00\xd6\x00\xd6\x00\xd6\x00\x8f\x00\x8d\x00\xff\xff\x28\x00\x28\x00\xca\x00\x68\x01\xff\xff\xa5\x00\xad\x00\x7d\x00\xaf\x00\xba\x00\xb0\x00\xb2\x00\x6b\x01\x7d\x00\xb4\x00\xd6\x00\xd6\x00\xc2\x00\xb5\x00\xc9\x00\xd5\x00\xab\x00\xd6\x00\xd6\x00\xd6\x00\x28\x00\x28\x00\xb6\x00\xc9\x00\x31\x00\x31\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x21\x01\xff\xff\xd6\x00\xd6\x00\xc2\x00\x06\x01\x27\x00\xd5\x00\xab\x00\xd6\x00\xd6\x00\xd6\x00\xd6\x00\xc2\x00\xe9\x00\xc9\x00\xd5\x00\xab\x00\xd6\x00\xd6\x00\xd6\x00\xd6\x00\xc2\x00\xff\xff\x7d\x00\xd5\x00\xb7\x00\xd6\x00\xd6\x00\xd6\x00\xd6\x00\x27\x00\x77\x01\x06\x01\xb8\x00\x30\x00\xd2\x00\xb9\x00\x6a\x00\xd6\x00\xbc\x00\x8f\x00\x06\x01\xc9\x00\xbe\x00\x31\x00\x31\x00\xff\xff\xd6\x00\xbd\x00\xca\x00\xff\xff\xc9\x00\xb1\x00\x7d\x00\xff\xff\xd3\x00\xff\xff\xc7\x00\xff\xff\xff\xff\xc9\x00\xd6\x00\xc2\x00\xff\xff\xd3\x00\xd5\x00\xa5\x00\xd6\x00\xd6\x00\xd6\x00\xda\x00\xdb\x00\xdc\x00\xde\x00\xdf\x00\x97\x00\xc1\x00\xe0\x00\xff\xff\x98\x00\xff\xff\x97\x00\x97\x00\x97\x00\xe2\x00\xe3\x00\xe4\x00\xe6\x00\xd6\x00\xe8\x00\xe7\x00\x30\x00\xac\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\xc9\x00\x97\x00\x9a\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\xea\x00\x96\x00\xec\x00\xd6\x00\xc2\x00\xee\x00\xac\x00\xd5\x00\xf2\x00\xd6\x00\xd6\x00\xd6\x00\xf0\x00\xbb\x00\xf4\x00\xac\x00\xa9\x00\xb3\x00\x7c\x00\xf6\x00\xf8\x00\x80\x00\x7d\x00\x03\x01\xd3\x00\xfa\x00\x24\x00\xfc\x00\x7d\x00\xfe\x00\xd6\x00\xd6\x00\xc2\x00\x00\x01\xaa\x00\xd5\x00\x05\x01\xd6\x00\xd6\x00\xd6\x00\x0a\x01\x04\x01\x22\x01\xc9\x00\x24\x01\x0d\x01\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x7c\x00\x0b\x01\xd6\x00\xa6\x00\x7d\x00\x8c\x00\x87\x00\x26\x01\x28\x01\xd3\x00\x7d\x00\x87\x00\x87\x00\x87\x00\x87\x00\x8e\x00\x0e\x01\x10\x01\x2a\x01\x11\x01\xfb\x00\x13\x01\xf3\x00\x95\x00\x7d\x00\xeb\x00\x14\x01\x02\x01\x16\x01\x2c\x01\x50\x00\x42\x00\x17\x01\x87\x00\xd6\x00\xc2\x00\x89\x00\x19\x01\xd5\x00\xa8\x00\xd6\x00\xd6\x00\xd6\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x1a\x01\x7d\x00\x1c\x01\x1d\x01\x1f\x01\x20\x01\x2e\x01\x92\x00\xd6\x00\x7d\x00\x30\x01\x81\x00\xd3\x00\x92\x00\x92\x00\x92\x00\x63\x00\x61\x00\x32\x01\x34\x01\x5d\x00\xc9\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x36\x01\x3a\x01\x92\x00\x5c\x00\x93\x00\xd7\x00\x3c\x01\x7d\x00\xd3\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x60\x00\x3e\x01\x5e\x00\x40\x01\x42\x00\x5b\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x5a\x00\x42\x01\x58\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x44\x01\x46\x01\x48\x01\x4a\x01\x4e\x01\x50\x01\x52\x01\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x54\x01\x61\x01\x63\x01\x0c\x01\x0f\x01\x12\x01\x15\x01\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\xd7\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x78\x01\x00\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x00\x00\xfd\x00\x00\x00\xf5\x00\x00\x00\x00\x00\xed\x00\xff\xff\x07\x01\xd7\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x01\x00\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\xce\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\xce\x00\x1b\x00\x00\x00\x12\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x6a\x01\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x00\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x12\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x00\x00\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\xce\x00\x00\x00\x00\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x12\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\xff\x00\x01\x01\xf7\x00\xf9\x00\x00\x00\xef\x00\xf1\x00\x08\x01\x09\x01\x12\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x45\x01\x47\x01\x33\x01\x35\x01\x00\x00\x23\x01\x25\x01\x59\x01\x5a\x01\x12\x00\x73\x01\x00\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x00\x00\x00\x00\x10\x00\x00\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x49\x01\x17\x00\x39\x01\x00\x00\x00\x00\x27\x01\x00\x00\x5b\x01\x00\x00\x12\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x65\x01\x4d\x01\x00\x00\x3b\x01\x00\x00\x00\x00\x29\x01\x71\x01\x5c\x01\x00\x00\x00\x00\x62\x01\x00\x00\x17\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x20\x00\x00\x00\x20\x00\x1a\x00\x18\x01\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x51\x00\x51\x00\x51\x00\xdd\x00\x00\x00\x00\x00\x51\x00\x66\x01\x67\x01\x00\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x00\x00\x00\x00\x1a\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x00\x00\x44\x00\x97\x00\x00\x00\x00\x00\x51\x00\x00\x00\xff\xff\x97\x00\x97\x00\x97\x00\x00\x00\x1b\x01\x1e\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x1f\x00\x00\x00\xe1\x00\xe5\x00\x00\x00\x97\x00\x00\x00\x51\x00\x51\x00\x51\x00\x51\x00\x56\x01\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x51\x00\x51\x00\x51\x00\x51\x00\x56\x01\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x64\x01\x2e\x00\x2e\x00\x2e\x00\x2e\x00\x2e\x00\x2e\x00\x2e\x00\x2e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x4f\x01\x2d\x00\x3d\x01\x00\x00\x00\x00\x2b\x01\x00\x00\x5d\x01\xd7\x00\x9d\x00\x00\x00\x00\x00\xcd\x00\x1f\x00\xd6\x00\x9d\x00\x9d\x00\x9d\x00\xcd\x00\x00\x00\xd6\x00\xd6\x00\xd6\x00\x22\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x69\x01\x51\x01\x00\x00\x3f\x01\x00\x00\x9d\x00\x2d\x01\x9e\x00\x5e\x01\xd7\x00\xd6\x00\x0d\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x53\x01\x6c\x01\x41\x01\xcd\x00\x00\x00\x2f\x01\x55\x01\x5f\x01\x43\x01\xd7\x00\x00\x00\x31\x01\x73\x01\x60\x01\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x22\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x27\x00\xcd\x00\x00\x00\x17\x00\xd6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\x00\xd6\x00\xd6\x00\xd6\x00\x24\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\x29\x00\x00\x00\xd6\x00\x27\x00\x76\x01\xae\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x00\x2e\x00\x2e\x00\x2e\x00\x2e\x00\x2e\x00\x2e\x00\x2e\x00\x2e\x00\x22\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x00\x00\x6c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x73\x01\x00\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x00\x00\x6d\x01\x00\x00\x00\x00\x2b\x00\x00\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x11\x00\x00\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x90\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00\x00\x00\x00\x00\x6f\x01\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x13\x00\x00\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x30\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\x00\x00\x7c\x00\x00\x00\x12\x00\x7e\x00\x7d\x00\x00\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x7d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x0c\x00\x87\x00\x00\x00\x7d\x00\x00\x00\x00\x00\x87\x00\x87\x00\x87\x00\x87\x00\x1d\x00\x6f\x01\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x00\x00\x00\x34\x00\x89\x00\x00\x00\x7d\x00\x1d\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\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\x34\x00\x32\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x1d\x00\x00\x00\x34\x00\x34\x00\x00\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x34\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x34\x00\x00\x00\x34\x00\x3a\x00\x3a\x00\x00\x00\xc5\x00\x3a\x00\x3a\x00\x26\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x2a\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\x00\x34\x00\xd7\x00\x34\x00\x3a\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x3a\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x69\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x3a\x00\x83\x00\x3a\x00\x3a\x00\x79\x00\x3a\x00\x64\x01\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x00\x00\x00\x3a\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\x3a\x00\x78\x00\x3a\x00\x67\x00\x67\x00\x67\x00\x3a\x00\x00\x00\x00\x00\x67\x00\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x00\x00\x00\x00\x00\x00\x70\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x66\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x67\x00\x00\x00\x64\x00\x3a\x00\x3a\x00\x00\x00\x36\x00\x3a\x00\x3a\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x67\x00\x3a\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x68\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x00\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x68\x00\x3c\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x74\x01\x3a\x00\x3c\x00\x3a\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3d\x00\x00\x00\x00\x00\x3c\x00\x3c\x00\x00\x00\x3c\x00\x3c\x00\x3c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x00\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x3d\x00\x00\x00\x3d\x00\x3d\x00\x3d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3c\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x51\x00\x51\x00\x51\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x00\x00\x00\x00\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x6e\x01\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x00\x00\x3c\x00\x3d\x00\x00\x00\x3d\x00\x00\x00\x1d\x00\x00\x00\x00\x00\x44\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\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x70\x01\x00\x00\x3d\x00\x00\x00\x3d\x00\x00\x00\x1d\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x42\x00\x42\x00\x42\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\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\x17\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\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x71\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x42\x00\x51\x00\x51\x00\x51\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x00\x00\x00\x00\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\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\x41\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\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x75\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x49\x00\x49\x00\x49\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4f\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\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x00\x00\x49\x00\x49\x00\x49\x00\x4a\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4f\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\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x00\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4f\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\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x00\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4f\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\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x00\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4f\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\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x00\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x48\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x4b\x00\x4b\x00\x4b\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x45\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x00\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x00\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4c\x00\x4c\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x00\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4b\x00\x49\x00\x00\x00\x3d\x00\x4c\x00\x00\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x4c\x00\x3d\x00\x00\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x3d\x00\x00\x00\x3d\x00\x3d\x00\x3d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x4b\x00\x00\x00\x3d\x00\x00\x00\x3d\x00\x49\x00\x00\x00\x49\x00\x49\x00\x49\x00\x4e\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x46\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x00\x00\x3d\x00\x00\x00\x3d\x00\x49\x00\x49\x00\x49\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4f\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\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x00\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x47\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x49\x00\x50\x00\x50\x00\x50\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\x50\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x01\x00\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x00\x00\x00\x00\x00\x00\x00\x00\x50\x00\x00\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x50\x00\x51\x00\x51\x00\x51\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\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\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x52\x00\x52\x00\x52\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x4c\x01\x00\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x00\x00\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x55\x00\x55\x00\x55\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x57\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x56\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x00\x00\x38\x01\x6d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x00\x00\x6d\x00\x6d\x00\x6d\x00\x71\x00\x76\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x73\x00\x6d\x00\x6d\x00\x6d\x00\x6f\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x00\x00\x7b\x00\x67\x00\x67\x00\x67\x00\x00\x00\x00\x00\x00\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x00\x00\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x67\x00\x68\x00\x68\x00\x68\x00\x00\x00\x00\x00\x00\x00\x68\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x00\x00\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x68\x00\x6b\x00\x6b\x00\x6b\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x00\x00\x6c\x00\x6d\x00\x6d\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x00\x00\x6e\x00\x6d\x00\x6d\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x00\x00\x70\x00\x6d\x00\x6d\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x00\x00\x72\x00\x6d\x00\x6d\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x00\x00\x74\x00\x6d\x00\x6d\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x00\x00\x77\x00\xa3\x00\xa3\x00\xa3\x00\x00\x00\xa2\x00\x00\x00\xa3\x00\x00\x00\x00\x00\xa2\x00\xa2\x00\xa2\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa1\x00\xa1\x00\xa1\x00\x00\x00\xa0\x00\x00\x00\xa1\x00\x00\x00\x00\x00\xa0\x00\xa0\x00\xa0\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\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\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\x85\x00\x85\x00\x85\x00\x00\x00\x84\x00\x00\x00\x85\x00\x00\x00\x00\x00\x84\x00\x84\x00\x84\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x85\x00\x92\x00\x00\x00\x00\x00\x00\x00\x62\x01\x00\x00\x92\x00\x92\x00\x92\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x72\x01\x92\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\x00\x00\x00\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x91\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x93\x00\x93\x00\x93\x00\x93\x00\x75\x01\x93\x00\x93\x00\x00\x00\x00\x00\x00\x00\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\x90\x00\x93\x00\x93\x00\x94\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x00\x00\x93\x00\x93\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x93\x00\x93\x00\x94\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\x93\x00\xa4\x00\xa4\x00\xa4\x00\x00\x00\x9a\x00\x00\x00\xa4\x00\x00\x00\x00\x00\xa6\x00\x9a\x00\x9a\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x00\x9d\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x00\x00\x00\x00\x00\x00\x00\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\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x00\x00\x9e\x00\x9e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x00\x9e\x00\x9e\x00\x9f\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x00\x00\x9e\x00\x9e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9e\x00\x9f\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\x9e\x00\xa1\x00\xa1\x00\xa1\x00\x00\x00\xa0\x00\x00\x00\xa1\x00\x00\x00\x00\x00\xa0\x00\xa0\x00\xa0\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\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\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\x00\x00\x84\x00\x00\x00\xa1\x00\x00\x00\x00\x00\x84\x00\x84\x00\x84\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x00\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa1\x00\xa3\x00\xa3\x00\xa3\x00\x00\x00\xa2\x00\x00\x00\xa3\x00\x00\x00\x00\x00\xa2\x00\xa2\x00\xa2\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\x00\x00\x84\x00\x00\x00\xa3\x00\x00\x00\x00\x00\x84\x00\x84\x00\x84\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa3\x00\xa4\x00\xa4\x00\xa4\x00\x00\x00\x00\x00\x00\x00\xa4\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\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa4\x00\xa7\x00\xa7\x00\xa7\x00\x00\x00\xa6\x00\x00\x00\xa7\x00\x00\x00\x00\x00\xa6\x00\xa6\x00\xa6\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\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x3a\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\xc4\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\xc6\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x3a\x00\x00\x00\xc6\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\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\x3a\x00\x00\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\x99\x00\x00\x00\x99\x00\x99\x00\x99\x00\x99\x00\x00\x00\x00\x00\x00\x00\x99\x00\x99\x00\x99\x00\xc8\x00\x99\x00\x99\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x99\x00\x3a\x00\x99\x00\x99\x00\x99\x00\x99\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\x00\x00\x99\x00\x99\x00\x99\x00\x99\x00\x00\x00\x00\x00\x00\x00\x99\x00\x99\x00\x00\x00\xc8\x00\x99\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x99\x00\x00\x00\x99\x00\x99\x00\x99\x00\x99\x00\x99\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\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xcb\x00\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\xff\xff\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x01\x6b\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\xcb\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\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x00\x00\x00\x00\x00\x00\xff\xff\x6b\x00\xff\xff\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x6b\x00\x38\x01\x38\x01\x38\x01\x00\x00\x00\x00\x00\x00\x38\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x01\x00\x00\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x00\x00\x00\x00\x00\x00\x00\x00\x38\x01\x00\x00\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x38\x01\x55\x00\x55\x00\x55\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x00\x00\x52\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x55\x00\x55\x00\x55\x00\x54\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x52\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x55\x00\x55\x00\x55\x00\x53\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x4b\x01\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x55\x00\x51\x00\x51\x00\x51\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\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\x51\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x20\x00\x00\x00\x00\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x43\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\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\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\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x01\x00\x00\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x00\x51\x00\x51\x00\x51\x00\x56\x01\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x51\x00\x51\x00\x51\x00\x51\x00\x56\x01\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\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\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\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x57\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x01\x00\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x51\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\x00\x00\x00\x00\x00\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\x01\x00\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x23\x00\x01\x00\x02\x00\x23\x00\x04\x00\x05\x00\x06\x00\x23\x00\x23\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x2b\x00\x23\x00\x2d\x00\x23\x00\x7c\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x2d\x00\x2d\x00\x7c\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\x06\x00\x2d\x00\x7d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x05\x00\x06\x00\x23\x00\x2d\x00\x09\x00\x7d\x00\x0b\x00\x0c\x00\x0d\x00\x7d\x00\x2d\x00\x0a\x00\x30\x00\x31\x00\x2d\x00\x23\x00\x0a\x00\x2d\x00\x20\x00\x24\x00\x21\x00\x23\x00\x0a\x00\x0a\x00\x23\x00\x2a\x00\x72\x00\x20\x00\x05\x00\x06\x00\x61\x00\x2d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x30\x00\x31\x00\x67\x00\x2d\x00\x30\x00\x31\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x49\x00\x0a\x00\x20\x00\x05\x00\x06\x00\x23\x00\x5f\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x05\x00\x06\x00\x57\x00\x2d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x05\x00\x06\x00\x0a\x00\x5e\x00\x09\x00\x6d\x00\x0b\x00\x0c\x00\x0d\x00\x20\x00\x5f\x00\x23\x00\x23\x00\x61\x00\x5f\x00\x2d\x00\x0a\x00\x7c\x00\x20\x00\x69\x00\x7d\x00\x23\x00\x2d\x00\x65\x00\x30\x00\x31\x00\x0a\x00\x20\x00\x6e\x00\x2d\x00\x0a\x00\x2d\x00\x21\x00\x7c\x00\x0a\x00\x7b\x00\x0a\x00\x2d\x00\x0a\x00\x0a\x00\x2d\x00\x05\x00\x06\x00\x0a\x00\x7b\x00\x09\x00\x2d\x00\x0b\x00\x0c\x00\x0d\x00\x64\x00\x72\x00\x6f\x00\x64\x00\x72\x00\x05\x00\x06\x00\x6f\x00\x0a\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x64\x00\x72\x00\x6f\x00\x64\x00\x20\x00\x6f\x00\x72\x00\x5f\x00\x7b\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x2d\x00\x20\x00\x23\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x34\x00\x2d\x00\x34\x00\x05\x00\x06\x00\x34\x00\x7b\x00\x09\x00\x32\x00\x0b\x00\x0c\x00\x0d\x00\x34\x00\x6c\x00\x32\x00\x7b\x00\x7c\x00\x70\x00\x20\x00\x32\x00\x32\x00\x23\x00\x24\x00\x6e\x00\x7b\x00\x36\x00\x5f\x00\x36\x00\x2a\x00\x36\x00\x20\x00\x05\x00\x06\x00\x36\x00\x65\x00\x09\x00\x6c\x00\x0b\x00\x0c\x00\x0d\x00\x74\x00\x69\x00\x34\x00\x2d\x00\x34\x00\x74\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x20\x00\x6e\x00\x20\x00\x23\x00\x24\x00\x23\x00\x05\x00\x34\x00\x34\x00\x7b\x00\x2a\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x2d\x00\x6e\x00\x74\x00\x34\x00\x6e\x00\x31\x00\x74\x00\x33\x00\x7b\x00\x5e\x00\x36\x00\x6e\x00\x38\x00\x74\x00\x34\x00\x01\x00\x02\x00\x6e\x00\x20\x00\x05\x00\x06\x00\x23\x00\x74\x00\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\x6e\x00\x7c\x00\x74\x00\x6e\x00\x74\x00\x6e\x00\x34\x00\x05\x00\x20\x00\x5e\x00\x34\x00\x23\x00\x7b\x00\x0b\x00\x0c\x00\x0d\x00\x28\x00\x29\x00\x32\x00\x32\x00\x2c\x00\x2d\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x32\x00\x32\x00\x20\x00\x3b\x00\x22\x00\x5f\x00\x32\x00\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\x32\x00\x5d\x00\x32\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\x32\x00\x7d\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x36\x00\x36\x00\x36\x00\x36\x00\x36\x00\x36\x00\x36\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\x36\x00\x23\x00\x23\x00\x49\x00\x49\x00\x49\x00\x49\x00\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\x50\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\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\x31\x00\xff\xff\x33\x00\xff\xff\xff\xff\x36\x00\x0a\x00\x38\x00\x70\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\x5f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x2a\x00\x2d\x00\xff\xff\x50\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x23\x00\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x70\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\x5e\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x7c\x00\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x50\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\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x31\x00\x31\x00\x33\x00\x33\x00\xff\xff\x36\x00\x36\x00\x38\x00\x38\x00\x70\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\x5f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x31\x00\x31\x00\x33\x00\x33\x00\xff\xff\x36\x00\x36\x00\x38\x00\x38\x00\x50\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\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x31\x00\x45\x00\x33\x00\xff\xff\xff\xff\x36\x00\xff\xff\x38\x00\xff\xff\x70\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x23\x00\x31\x00\xff\xff\x33\x00\xff\xff\xff\xff\x36\x00\x5f\x00\x38\x00\xff\xff\xff\xff\x23\x00\xff\xff\x65\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\x2b\x00\xff\xff\x2d\x00\x5f\x00\x49\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\x03\x00\x57\x00\xff\xff\xff\xff\x07\x00\x23\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\x5f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x23\x00\x05\x00\xff\xff\xff\xff\x27\x00\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\x49\x00\x49\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x5f\x00\xff\xff\x57\x00\x57\x00\xff\xff\x20\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\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\x23\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x0a\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\xff\xff\x31\x00\x5f\x00\x33\x00\xff\xff\xff\xff\x36\x00\xff\xff\x38\x00\x50\x00\x05\x00\xff\xff\xff\xff\x24\x00\x5f\x00\x05\x00\x0b\x00\x0c\x00\x0d\x00\x2a\x00\xff\xff\x0b\x00\x0c\x00\x0d\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x23\x00\x31\x00\xff\xff\x33\x00\xff\xff\x20\x00\x36\x00\x22\x00\x38\x00\x70\x00\x20\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\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x31\x00\x23\x00\x33\x00\x5e\x00\xff\xff\x36\x00\x31\x00\x38\x00\x33\x00\x50\x00\xff\xff\x36\x00\x2e\x00\x38\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x42\x00\x7c\x00\xff\xff\x45\x00\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\x70\x00\x0b\x00\x0c\x00\x0d\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\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x20\x00\x62\x00\x23\x00\x23\x00\x65\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\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\x23\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\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\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x23\x00\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\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\x5f\x00\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x5f\x00\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\x5f\x00\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\x20\x00\xff\xff\x70\x00\x23\x00\x24\x00\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\x62\x00\xff\xff\xff\xff\x65\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\x78\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x23\x00\x05\x00\xff\xff\x5e\x00\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x45\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\x20\x00\xff\xff\x04\x00\x23\x00\xff\xff\x7c\x00\x45\x00\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\x5f\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\x65\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\x04\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x5f\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\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x5c\x00\xff\xff\x5e\x00\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\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x7c\x00\x2d\x00\x7e\x00\x04\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\x5c\x00\xff\xff\x5e\x00\x5f\x00\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\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\x5f\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\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\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\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\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\x23\x00\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\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\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\x5c\x00\x5d\x00\x5e\x00\x01\x00\x02\x00\x03\x00\x04\x00\xff\xff\xff\xff\x07\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\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\x7c\x00\xff\xff\x7e\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\xff\xff\x29\x00\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\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\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\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\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\xff\xff\x5c\x00\xff\xff\x5e\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\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\x7c\x00\xff\xff\x7e\x00\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\x5f\x00\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\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\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x7c\x00\xff\xff\x7e\x00\x5c\x00\xff\xff\x5e\x00\xff\xff\x45\x00\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\x5f\x00\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\x65\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\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\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\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\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\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\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\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\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\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\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\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\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\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\xff\xff\x7c\x00\xff\xff\x7e\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\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\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\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\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\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\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\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\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\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\xff\xff\x05\x00\xff\xff\x07\x00\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\x07\x00\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\x07\x00\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\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\x05\x00\xff\xff\xff\xff\xff\xff\x23\x00\xff\xff\x0b\x00\x0c\x00\x0d\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\x20\x00\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\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\x01\x00\x02\x00\x03\x00\x04\x00\x5f\x00\x06\x00\x07\x00\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\x5f\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\x01\x00\x02\x00\x03\x00\x04\x00\xff\xff\x06\x00\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\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\x07\x00\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\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x01\x00\x02\x00\x03\x00\x04\x00\xff\xff\x06\x00\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\x5f\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\x01\x00\x02\x00\x03\x00\x04\x00\xff\xff\x06\x00\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\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\x07\x00\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\x07\x00\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\x07\x00\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\x07\x00\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\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\x07\x00\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\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\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\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\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\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\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\x01\x00\x02\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\xff\xff\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\xff\xff\x5e\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\x7c\x00\x5f\x00\x7e\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\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\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\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\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\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\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\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\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\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\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\x99\x00\x99\x00\x99\x00\x99\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xaf\x00\xff\xff\xb1\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x99\x00\xff\xff\xd1\x00\xd1\x00\xd0\x00\xcc\x00\xd0\x00\xcc\x00\xff\xff\xd0\x00\xcc\x00\xcc\x00\xcf\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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, 376)+ [ AlexAccNone+ , AlexAcc 249+ , AlexAccNone+ , AlexAcc 248+ , AlexAcc 247+ , AlexAcc 246+ , AlexAcc 245+ , AlexAcc 244+ , AlexAcc 243+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 242 (ifExtension MagicHashBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 241 (ifExtension HexFloatLiteralsBit `alexAndPred`+ negLitPred)(AlexAccNone)+ , AlexAccPred 240 (ifExtension HexFloatLiteralsBit `alexAndPred`+ negLitPred)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 239 (ifExtension HexFloatLiteralsBit)(AlexAccNone)+ , AlexAccPred 238 (ifExtension HexFloatLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 237 (negLitPred)(AlexAccNone)+ , AlexAccNone+ , AlexAcc 236+ , AlexAccNone+ , AlexAccNone+ , AlexAcc 235+ , AlexAccNone+ , AlexAccPred 234 (negLitPred)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 233 (negLitPred)(AlexAccNone)+ , AlexAccPred 232 (negLitPred)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 231 (negLitPred `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 230 (negLitPred)(AlexAccNone)+ , AlexAccNone+ , AlexAcc 229+ , AlexAccNone+ , AlexAcc 228+ , AlexAcc 227+ , AlexAccNone+ , AlexAccPred 226 (ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAcc 225+ , AlexAcc 224+ , AlexAcc 223+ , AlexAcc 222+ , AlexAcc 221+ , AlexAcc 220+ , AlexAcc 219+ , AlexAcc 218+ , AlexAcc 217+ , AlexAcc 216+ , AlexAcc 215+ , AlexAccPred 214 (ifExtension MagicHashBit)(AlexAccNone)+ , AlexAccPred 213 (ifExtension MagicHashBit)(AlexAccPred 212 (ifExtension MagicHashBit)(AlexAccNone))+ , AlexAcc 211+ , AlexAccPred 210 (ifExtension MagicHashBit)(AlexAccPred 209 (ifExtension MagicHashBit)(AlexAccNone))+ , AlexAcc 208+ , AlexAcc 207+ , AlexAccPred 206 (ifExtension MagicHashBit)(AlexAccNone)+ , AlexAccPred 205 (ifExtension MagicHashBit)(AlexAccNone)+ , AlexAcc 204+ , AlexAcc 203+ , AlexAccPred 202 (ifExtension RecursiveDoBit)(AlexAcc 201)+ , AlexAcc 200+ , AlexAcc 199+ , AlexAcc 198+ , AlexAcc 197+ , AlexAccNone+ , AlexAcc 196+ , AlexAccPred 195 (ifExtension MagicHashBit)(AlexAccNone)+ , AlexAcc 194+ , AlexAcc 193+ , AlexAcc 192+ , AlexAcc 191+ , AlexAcc 190+ , AlexAcc 189+ , AlexAccPred 188 (ifExtension RecursiveDoBit)(AlexAcc 187)+ , AlexAcc 186+ , AlexAcc 185+ , AlexAcc 184+ , AlexAcc 183+ , AlexAcc 182+ , AlexAcc 181+ , AlexAcc 180+ , AlexAcc 179+ , AlexAcc 178+ , AlexAcc 177+ , AlexAcc 176+ , AlexAcc 175+ , AlexAcc 174+ , AlexAccPred 173 (ifExtension UnboxedParensBit)(AlexAccNone)+ , AlexAccPred 172 (ifExtension UnboxedParensBit)(AlexAccNone)+ , AlexAccPred 171 (ifExtension OverloadedLabelsBit)(AlexAccNone)+ , AlexAccPred 170 (ifExtension OverloadedLabelsBit)(AlexAccNone)+ , AlexAccPred 169 (ifExtension IpBit)(AlexAccNone)+ , AlexAccPred 168 (ifExtension ArrowsBit)(AlexAccNone)+ , AlexAccPred 167 (ifExtension ArrowsBit `alexAndPred`+ notFollowedBySymbol)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 166 (ifExtension QqBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 165 (ifExtension QqBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 164 (ifExtension ThQuotesBit)(AlexAccPred 163 (ifExtension QqBit)(AlexAccNone))+ , AlexAccNone+ , AlexAccPred 162 (ifExtension ThQuotesBit)(AlexAccPred 161 (ifExtension QqBit)(AlexAccNone))+ , AlexAccNone+ , AlexAccPred 160 (ifExtension ThQuotesBit)(AlexAccPred 159 (ifExtension QqBit)(AlexAccNone))+ , AlexAccPred 158 (ifExtension ThQuotesBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 157 (ifExtension ThQuotesBit)(AlexAccPred 156 (ifExtension QqBit)(AlexAccNone))+ , AlexAcc 155+ , AlexAcc 154+ , AlexAcc 153+ , AlexAcc 152+ , AlexAccNone+ , AlexAccPred 151 (ifExtension HaddockBit)(AlexAccNone)+ , AlexAcc 150+ , AlexAccPred 149 (isNormalComment)(AlexAccNone)+ , AlexAcc 148+ , AlexAccNone+ , AlexAccNone+ , AlexAcc 147+ , AlexAccNone+ , AlexAccPred 146 (known_pragma twoWordPrags)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAcc 145+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAcc 144+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAcc 143+ , AlexAcc 142+ , AlexAcc 141+ , AlexAccSkip+ , AlexAcc 140+ , AlexAcc 139+ , AlexAcc 138+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAcc 137+ , AlexAccNone+ , AlexAccPred 136 (known_pragma linePrags)(AlexAccPred 135 (known_pragma oneWordPrags)(AlexAccPred 134 (known_pragma ignoredPrags)(AlexAccPred 133 (known_pragma fileHeaderPrags)(AlexAcc 132))))+ , AlexAccNone+ , AlexAccPred 131 (known_pragma linePrags)(AlexAccPred 130 (known_pragma oneWordPrags)(AlexAccPred 129 (known_pragma ignoredPrags)(AlexAccPred 128 (known_pragma fileHeaderPrags)(AlexAcc 127))))+ , AlexAccPred 126 (known_pragma linePrags)(AlexAcc 125)+ , AlexAccPred 124 (isNormalComment)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 123 (known_pragma linePrags)(AlexAccNone)+ , AlexAcc 122+ , AlexAccPred 121 (notFollowedBySymbol)(AlexAccNone)+ , AlexAccPred 120 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)+ , AlexAccSkip+ , AlexAccPred 119 (notFollowedBy '-')(AlexAccNone)+ , AlexAccSkip+ , AlexAccNone+ , AlexAccNone+ , AlexAccSkipPred (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)+ , AlexAccNone+ , AlexAccSkipPred (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccSkipPred (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)+ , AlexAccPred 118 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False) `alexAndPred` followedByDigit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 117 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)+ , AlexAccSkip+ , AlexAccPred 116 (isSmartQuote)(AlexAccPred 115 (ifCurrentChar '⟦' `alexAndPred`+ ifExtension UnicodeSyntaxBit `alexAndPred`+ ifExtension ThQuotesBit)(AlexAccPred 114 (ifCurrentChar '⟧' `alexAndPred`+ ifExtension UnicodeSyntaxBit `alexAndPred`+ ifExtension ThQuotesBit)(AlexAccPred 113 (ifCurrentChar '⦇' `alexAndPred`+ ifExtension UnicodeSyntaxBit `alexAndPred`+ ifExtension ArrowsBit)(AlexAccPred 112 (ifCurrentChar '⦈' `alexAndPred`+ ifExtension UnicodeSyntaxBit `alexAndPred`+ ifExtension ArrowsBit)(AlexAccNone)))))+ , AlexAccPred 111 (isSmartQuote)(AlexAcc 110)+ , AlexAccPred 109 (isSmartQuote)(AlexAccNone)+ , AlexAccPred 108 (atEOL)(AlexAcc 107)+ , AlexAccPred 106 (atEOL)(AlexAccNone)+ , AlexAccPred 105 (atEOL)(AlexAcc 104)+ , AlexAccPred 103 (atEOL)(AlexAcc 102)+ , AlexAccPred 101 (atEOL)(AlexAcc 100)+ , AlexAccPred 99 (atEOL)(AlexAcc 98)+ , AlexAccNone+ , AlexAccPred 97 (atEOL)(AlexAccNone)+ , AlexAccPred 96 (atEOL)(AlexAccNone)+ , AlexAcc 95+ , AlexAccPred 94 (alexNotPred (ifExtension HaddockBit))(AlexAccPred 93 (ifExtension HaddockBit)(AlexAccNone))+ , AlexAccPred 92 (alexNotPred (ifExtension HaddockBit))(AlexAcc 91)+ , AlexAccPred 90 (alexNotPred (ifExtension HaddockBit))(AlexAccNone)+ , AlexAcc 89+ , AlexAcc 88+ , AlexAccPred 87 (isNormalComment)(AlexAcc 86)+ , AlexAccNone+ , AlexAccPred 85 (isNormalComment)(AlexAccNone)+ , AlexAcc 84+ , AlexAccSkip+ , AlexAccNone+ , AlexAcc 83+ , AlexAcc 82+ , AlexAccPred 81 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 80 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 79 (ifExtension ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 78 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 77 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 76 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 75 (ifExtension ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 74 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 73 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 72 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 71 (ifExtension ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 70 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 69 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 68 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 67 (ifExtension ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 66 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 65 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 64 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)+ , AlexAccPred 63 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccPred 62 (ifExtension ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccPred 61 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccPred 60 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 59 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 58 (negHashLitPred ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 57 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 56 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 55 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 54 (ifExtension ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 53 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 52 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 51 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 50 (negHashLitPred ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 49 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 48 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 47 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 46 (ifExtension ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 45 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 44 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 43 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 42 (negHashLitPred ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 41 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 40 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 39 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 38 (ifExtension ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 37 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 36 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 35 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 34 (negHashLitPred ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 33 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAcc 32+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 31 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 30 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 29 (ifExtension ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAccPred 28 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccNone+ , AlexAcc 27+ , AlexAcc 26+ , AlexAcc 25+ , AlexAccPred 24 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccPred 23 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccPred 22 (negHashLitPred ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccPred 21 (negHashLitPred ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccPred 20 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccPred 19 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccPred 18 (ifExtension ExtendedLiteralsBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccPred 17 (ifExtension ExtendedLiteralsBit)(AlexAccNone)+ , AlexAccPred 16 (negHashLitPred MagicHashBit)(AlexAccNone)+ , AlexAccPred 15 (negHashLitPred MagicHashBit)(AlexAccNone)+ , AlexAccPred 14 (ifExtension MagicHashBit)(AlexAccNone)+ , AlexAccPred 13 (ifExtension MagicHashBit)(AlexAccNone)+ , AlexAccPred 12 (ifExtension MagicHashBit)(AlexAccNone)+ , AlexAccPred 11 (ifExtension MagicHashBit)(AlexAccNone)+ , AlexAccPred 10 (ifExtension MagicHashBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccPred 9 (ifExtension MagicHashBit)(AlexAccNone)+ , AlexAccPred 8 (negHashLitPred MagicHashBit)(AlexAccNone)+ , AlexAccPred 7 (negHashLitPred MagicHashBit)(AlexAccNone)+ , AlexAccPred 6 (negHashLitPred MagicHashBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccPred 5 (negHashLitPred MagicHashBit)(AlexAccNone)+ , AlexAccPred 4 (ifExtension MagicHashBit)(AlexAccNone)+ , AlexAcc 3+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 2 (negLitPred)(AlexAccNone)+ , AlexAccNone+ , AlexAccNone+ , AlexAccNone+ , AlexAccPred 1 (ifExtension MagicHashBit)(AlexAccNone)+ , AlexAccPred 0 (ifExtension MagicHashBit `alexAndPred`+ ifExtension BinaryLiteralsBit)(AlexAccNone)+ , AlexAccNone+ ]++alex_actions = array (0 :: Int, 250)+ [ (249,alex_action_16)+ , (248,alex_action_22)+ , (247,alex_action_23)+ , (246,alex_action_21)+ , (245,alex_action_24)+ , (244,alex_action_28)+ , (243,alex_action_29)+ , (242,alex_action_100)+ , (241,alex_action_99)+ , (240,alex_action_99)+ , (239,alex_action_98)+ , (238,alex_action_98)+ , (237,alex_action_97)+ , (236,alex_action_78)+ , (235,alex_action_96)+ , (234,alex_action_95)+ , (233,alex_action_94)+ , (232,alex_action_92)+ , (231,alex_action_93)+ , (230,alex_action_92)+ , (229,alex_action_91)+ , (228,alex_action_90)+ , (227,alex_action_88)+ , (226,alex_action_89)+ , (225,alex_action_88)+ , (224,alex_action_87)+ , (223,alex_action_86)+ , (222,alex_action_86)+ , (221,alex_action_86)+ , (220,alex_action_86)+ , (219,alex_action_86)+ , (218,alex_action_86)+ , (217,alex_action_86)+ , (216,alex_action_85)+ , (215,alex_action_84)+ , (214,alex_action_83)+ , (213,alex_action_82)+ , (212,alex_action_113)+ , (211,alex_action_78)+ , (210,alex_action_82)+ , (209,alex_action_112)+ , (208,alex_action_78)+ , (207,alex_action_78)+ , (206,alex_action_82)+ , (205,alex_action_81)+ , (204,alex_action_76)+ , (203,alex_action_74)+ , (202,alex_action_75)+ , (201,alex_action_76)+ , (200,alex_action_76)+ , (199,alex_action_76)+ , (198,alex_action_77)+ , (197,alex_action_79)+ , (196,alex_action_76)+ , (195,alex_action_80)+ , (194,alex_action_79)+ , (193,alex_action_78)+ , (192,alex_action_77)+ , (191,alex_action_76)+ , (190,alex_action_76)+ , (189,alex_action_76)+ , (188,alex_action_75)+ , (187,alex_action_76)+ , (186,alex_action_74)+ , (185,alex_action_73)+ , (184,alex_action_72)+ , (183,alex_action_72)+ , (182,alex_action_71)+ , (181,alex_action_70)+ , (180,alex_action_69)+ , (179,alex_action_68)+ , (178,alex_action_67)+ , (177,alex_action_67)+ , (176,alex_action_66)+ , (175,alex_action_65)+ , (174,alex_action_65)+ , (173,alex_action_64)+ , (172,alex_action_63)+ , (171,alex_action_62)+ , (170,alex_action_61)+ , (169,alex_action_60)+ , (168,alex_action_57)+ , (167,alex_action_56)+ , (166,alex_action_53)+ , (165,alex_action_52)+ , (164,alex_action_51)+ , (163,alex_action_52)+ , (162,alex_action_50)+ , (161,alex_action_52)+ , (160,alex_action_49)+ , (159,alex_action_52)+ , (158,alex_action_48)+ , (157,alex_action_47)+ , (156,alex_action_52)+ , (155,alex_action_46)+ , (154,alex_action_45)+ , (153,alex_action_44)+ , (152,alex_action_43)+ , (151,alex_action_42)+ , (150,alex_action_40)+ , (149,alex_action_2)+ , (148,alex_action_40)+ , (147,alex_action_36)+ , (146,alex_action_33)+ , (145,alex_action_32)+ , (144,alex_action_31)+ , (143,alex_action_30)+ , (142,alex_action_29)+ , (141,alex_action_29)+ , (140,alex_action_1)+ , (139,alex_action_29)+ , (138,alex_action_29)+ , (137,alex_action_27)+ , (136,alex_action_26)+ , (135,alex_action_34)+ , (134,alex_action_35)+ , (133,alex_action_38)+ , (132,alex_action_39)+ , (131,alex_action_26)+ , (130,alex_action_34)+ , (129,alex_action_35)+ , (128,alex_action_37)+ , (127,alex_action_39)+ , (126,alex_action_26)+ , (125,alex_action_29)+ , (124,alex_action_2)+ , (123,alex_action_26)+ , (122,alex_action_25)+ , (121,alex_action_20)+ , (120,alex_action_19)+ , (119,alex_action_17)+ , (118,alex_action_12)+ , (117,alex_action_11)+ , (116,alex_action_9)+ , (115,alex_action_54)+ , (114,alex_action_55)+ , (113,alex_action_58)+ , (112,alex_action_59)+ , (111,alex_action_9)+ , (110,alex_action_29)+ , (109,alex_action_9)+ , (108,alex_action_8)+ , (107,alex_action_29)+ , (106,alex_action_8)+ , (105,alex_action_7)+ , (104,alex_action_86)+ , (103,alex_action_7)+ , (102,alex_action_86)+ , (101,alex_action_7)+ , (100,alex_action_29)+ , (99,alex_action_7)+ , (98,alex_action_29)+ , (97,alex_action_7)+ , (96,alex_action_7)+ , (95,alex_action_6)+ , (94,alex_action_5)+ , (93,alex_action_41)+ , (92,alex_action_5)+ , (91,alex_action_29)+ , (90,alex_action_5)+ , (89,alex_action_4)+ , (88,alex_action_3)+ , (87,alex_action_2)+ , (86,alex_action_29)+ , (85,alex_action_2)+ , (84,alex_action_1)+ , (83,alex_action_177)+ , (82,alex_action_176)+ , (81,alex_action_175)+ , (80,alex_action_174)+ , (79,alex_action_173)+ , (78,alex_action_172)+ , (77,alex_action_171)+ , (76,alex_action_170)+ , (75,alex_action_169)+ , (74,alex_action_168)+ , (73,alex_action_167)+ , (72,alex_action_166)+ , (71,alex_action_165)+ , (70,alex_action_164)+ , (69,alex_action_163)+ , (68,alex_action_162)+ , (67,alex_action_161)+ , (66,alex_action_160)+ , (65,alex_action_159)+ , (64,alex_action_19)+ , (63,alex_action_158)+ , (62,alex_action_157)+ , (61,alex_action_156)+ , (60,alex_action_155)+ , (59,alex_action_154)+ , (58,alex_action_153)+ , (57,alex_action_152)+ , (56,alex_action_151)+ , (55,alex_action_150)+ , (54,alex_action_149)+ , (53,alex_action_148)+ , (52,alex_action_147)+ , (51,alex_action_146)+ , (50,alex_action_145)+ , (49,alex_action_144)+ , (48,alex_action_143)+ , (47,alex_action_142)+ , (46,alex_action_141)+ , (45,alex_action_140)+ , (44,alex_action_139)+ , (43,alex_action_138)+ , (42,alex_action_137)+ , (41,alex_action_136)+ , (40,alex_action_135)+ , (39,alex_action_134)+ , (38,alex_action_133)+ , (37,alex_action_132)+ , (36,alex_action_131)+ , (35,alex_action_130)+ , (34,alex_action_129)+ , (33,alex_action_128)+ , (32,alex_action_76)+ , (31,alex_action_127)+ , (30,alex_action_126)+ , (29,alex_action_125)+ , (28,alex_action_124)+ , (27,alex_action_78)+ , (26,alex_action_78)+ , (25,alex_action_78)+ , (24,alex_action_123)+ , (23,alex_action_122)+ , (22,alex_action_121)+ , (21,alex_action_120)+ , (20,alex_action_119)+ , (19,alex_action_118)+ , (18,alex_action_117)+ , (17,alex_action_116)+ , (16,alex_action_115)+ , (15,alex_action_114)+ , (14,alex_action_113)+ , (13,alex_action_112)+ , (12,alex_action_111)+ , (11,alex_action_110)+ , (10,alex_action_109)+ , (9,alex_action_108)+ , (8,alex_action_107)+ , (7,alex_action_106)+ , (6,alex_action_105)+ , (5,alex_action_104)+ , (4,alex_action_103)+ , (3,alex_action_96)+ , (2,alex_action_97)+ , (1,alex_action_102)+ , (0,alex_action_101)+ ]++{-# LINE 794 "_build/source-dist/ghc-9.8.1-src/ghc-9.8.1/compiler/GHC/Parser/Lexer.x" #-}+-- Operator whitespace occurrence. See Note [Whitespace-sensitive operator parsing].+data OpWs+ = OpWsPrefix -- a !b+ | OpWsSuffix -- a! b+ | OpWsTightInfix -- a!b+ | OpWsLooseInfix -- a ! b+ deriving Show++-- -----------------------------------------------------------------------------+-- The token type++data Token+ = ITas -- Haskell keywords+ | ITcase+ | ITclass+ | ITdata+ | ITdefault+ | ITderiving+ | ITdo (Maybe FastString)+ | 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 (Maybe FastString)+ | ITfamily+ | ITrole+ | ITgroup+ | ITby+ | ITusing+ | ITpattern+ | ITstatic+ | ITstock+ | ITanyclass+ | ITvia++ -- Backpack tokens+ | ITunit+ | ITsignature+ | ITdependency+ | ITrequires++ -- Pragmas, see Note [Pragma source text] in "GHC.Types.SourceText"+ | ITinline_prag SourceText InlineSpec RuleMatchInfo+ | ITopaque_prag SourceText+ | 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 'UsePosPragsBit'+ | ITcolumn_prag SourceText -- not usually produced, see 'UsePosPragsBit'+ | ITscc_prag SourceText+ | 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+ | ITcomment_line_prag -- See Note [Nested comment line pragmas]++ | ITdotdot -- reserved symbols+ | ITcolon+ | ITdcolon IsUnicodeSyntax+ | ITequal+ | ITlam+ | ITlcase+ | ITlcases+ | ITvbar+ | ITlarrow IsUnicodeSyntax+ | ITrarrow IsUnicodeSyntax+ | ITdarrow IsUnicodeSyntax+ | ITlolly -- The (⊸) arrow (for LinearTypes)+ | ITminus -- See Note [Minus tokens]+ | ITprefixminus -- See Note [Minus tokens]+ | ITbang -- Prefix (!) only, e.g. f !x = rhs+ | ITtilde -- Prefix (~) only, e.g. f ~x = rhs+ | ITat -- Tight infix (@) only, e.g. f x@pat = rhs+ | ITtypeApp -- Prefix (@) only, e.g. f @t+ | ITpercent -- Prefix (%) only, e.g. a %1 -> b+ | ITstar IsUnicodeSyntax+ | ITdot+ | ITproj Bool -- Extension: OverloadedRecordDotBit++ | 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 SourceText FastString -- Overloaded label: #x+ -- The SourceText is required because we can+ -- have a string literal as a label+ -- Note [Literal source text] in "GHC.Types.SourceText"++ | ITchar SourceText Char -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITstring SourceText FastString -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITinteger IntegralLit -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITrational FractionalLit++ | ITprimchar SourceText Char -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITprimstring SourceText ByteString -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITprimint SourceText Integer -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITprimword SourceText Integer -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITprimint8 SourceText Integer -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITprimint16 SourceText Integer -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITprimint32 SourceText Integer -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITprimint64 SourceText Integer -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITprimword8 SourceText Integer -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITprimword16 SourceText Integer -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITprimword32 SourceText Integer -- Note [Literal source text] in "GHC.Types.SourceText"+ | ITprimword64 SourceText Integer -- Note [Literal source text] in "GHC.Types.SourceText"+ | 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 -- ||]+ | ITdollar -- prefix $+ | ITdollardollar -- prefix $$+ | ITtyQuote -- ''+ | ITquasiQuote (FastString,FastString,PsSpan)+ -- ITquasiQuote(quoter, quote, loc)+ -- represents a quasi-quote of the form+ -- [quoter| quote |]+ | ITqQuasiQuote (FastString,FastString,FastString,PsSpan)+ -- 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 -- ^ @>>-@++ | ITunknown String -- ^ Used when the lexer can't make sense of it+ | ITeof -- ^ end of file token++ -- Documentation annotations. See Note [PsSpan in Comments]+ | ITdocComment HsDocString PsSpan -- ^ The HsDocString contains more details about what+ -- this is and how to pretty print it+ | ITdocOptions String PsSpan -- ^ doc options (prune, ignore-exports, etc)+ | ITlineComment String PsSpan -- ^ comment starting by "--"+ | ITblockComment String PsSpan -- ^ comment in {- -}++ deriving Show++instance Outputable Token where+ ppr x = text (show x)++{- Note [PsSpan in Comments]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When using the Api Annotations to exact print a modified AST, managing+the space before a comment is important. The PsSpan in the comment+token allows this to happen, and this location is tracked in prev_loc+in PState. This only tracks physical tokens, so is not updated for+zero-width ones.++We also use this to track the space before the end-of-file marker.+-}++{- Note [Minus tokens]+~~~~~~~~~~~~~~~~~~~~~~+A minus sign can be used in prefix form (-x) and infix form (a - b).++When LexicalNegation is on:+ * ITprefixminus represents the prefix form+ * ITvarsym "-" represents the infix form+ * ITminus is not used++When LexicalNegation is off:+ * ITminus represents all forms+ * ITprefixminus is not used+ * ITvarsym "-" is not used+-}++{- Note [Why not LexicalNegationBit]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+One might wonder why we define NoLexicalNegationBit instead of+LexicalNegationBit. The problem lies in the following line in reservedSymsFM:++ ,("-", ITminus, NormalSyntax, xbit NoLexicalNegationBit)++We want to generate ITminus only when LexicalNegation is off. How would one+do it if we had LexicalNegationBit? I (int-index) tried to use bitwise+complement:++ ,("-", ITminus, NormalSyntax, complement (xbit LexicalNegationBit))++This did not work, so I opted for NoLexicalNegationBit instead.+-}+++-- 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 FastString (Token, ExtsBitmap)+reservedWordsFM = listToUFM $+ map (\(x, y, z) -> (mkFastString x, (y, z)))+ [( "_", ITunderscore, 0 ),+ ( "as", ITas, 0 ),+ ( "case", ITcase, 0 ),+ ( "cases", ITlcases, xbit LambdaCaseBit ),+ ( "class", ITclass, 0 ),+ ( "data", ITdata, 0 ),+ ( "default", ITdefault, 0 ),+ ( "deriving", ITderiving, 0 ),+ ( "do", ITdo Nothing, 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, 0),+ ( "mdo", ITmdo Nothing, xbit RecursiveDoBit),+ -- See Note [Lexing type pseudo-keywords]+ ( "family", ITfamily, 0 ),+ ( "role", ITrole, 0 ),+ ( "pattern", ITpattern, xbit PatternSynonymsBit),+ ( "static", ITstatic, xbit StaticPointersBit ),+ ( "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 (GHC.Tc.TyCl) 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 FastString (Token, IsUnicodeSyntax, ExtsBitmap)+reservedSymsFM = listToUFM $+ map (\ (x,w,y,z) -> (mkFastString x,(w,y,z)))+ [ ("..", ITdotdot, NormalSyntax, 0 )+ -- (:) is a reserved op, meaning only list cons+ ,(":", ITcolon, NormalSyntax, 0 )+ ,("::", ITdcolon NormalSyntax, NormalSyntax, 0 )+ ,("=", ITequal, NormalSyntax, 0 )+ ,("\\", ITlam, NormalSyntax, 0 )+ ,("|", ITvbar, NormalSyntax, 0 )+ ,("<-", ITlarrow NormalSyntax, NormalSyntax, 0 )+ ,("->", ITrarrow NormalSyntax, NormalSyntax, 0 )+ ,("=>", ITdarrow NormalSyntax, NormalSyntax, 0 )+ ,("-", ITminus, NormalSyntax, xbit NoLexicalNegationBit)++ ,("*", ITstar NormalSyntax, NormalSyntax, xbit StarIsTypeBit)++ ,("-<", ITlarrowtail NormalSyntax, NormalSyntax, xbit ArrowsBit)+ ,(">-", ITrarrowtail NormalSyntax, NormalSyntax, xbit ArrowsBit)+ ,("-<<", ITLarrowtail NormalSyntax, NormalSyntax, xbit ArrowsBit)+ ,(">>-", ITRarrowtail NormalSyntax, NormalSyntax, xbit ArrowsBit)++ ,("∷", ITdcolon UnicodeSyntax, UnicodeSyntax, 0 )+ ,("⇒", ITdarrow UnicodeSyntax, UnicodeSyntax, 0 )+ ,("∀", ITforall UnicodeSyntax, UnicodeSyntax, 0 )+ ,("→", ITrarrow UnicodeSyntax, UnicodeSyntax, 0 )+ ,("←", ITlarrow UnicodeSyntax, UnicodeSyntax, 0 )++ ,("⊸", ITlolly, UnicodeSyntax, 0)++ ,("⤙", ITlarrowtail UnicodeSyntax, UnicodeSyntax, xbit ArrowsBit)+ ,("⤚", ITrarrowtail UnicodeSyntax, UnicodeSyntax, xbit ArrowsBit)+ ,("⤛", ITLarrowtail UnicodeSyntax, UnicodeSyntax, xbit ArrowsBit)+ ,("⤜", ITRarrowtail UnicodeSyntax, UnicodeSyntax, xbit ArrowsBit)++ ,("★", ITstar UnicodeSyntax, UnicodeSyntax, xbit StarIsTypeBit)++ -- 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 = PsSpan -> StringBuffer -> Int -> StringBuffer -> P (PsLocated Token)++special :: Token -> Action+special tok span _buf _len _buf2 = return (L span tok)++token, layout_token :: Token -> Action+token t span _buf _len _buf2 = return (L span t)+layout_token t span _buf _len _buf2 = pushLexState layout >> return (L span t)++idtoken :: (StringBuffer -> Int -> Token) -> Action+idtoken f span buf len _buf2 = return (L span $! (f buf len))++qdo_token :: (Maybe FastString -> Token) -> Action+qdo_token con span buf len _buf2 = do+ maybe_layout token+ return (L span $! token)+ where+ !token = con $! Just $! fst $! splitQualName buf len False++skip_one_varid :: (FastString -> Token) -> Action+skip_one_varid f span buf len _buf2+ = return (L span $! f (lexemeToFastString (stepOn buf) (len-1)))++skip_one_varid_src :: (SourceText -> FastString -> Token) -> Action+skip_one_varid_src f span buf len _buf2+ = return (L span $! f (SourceText $ lexemeToFastString (stepOn buf) (len-1))+ (lexemeToFastString (stepOn buf) (len-1)))++skip_two_varid :: (FastString -> Token) -> Action+skip_two_varid f span buf len _buf2+ = return (L span $! f (lexemeToFastString (stepOn (stepOn buf)) (len-2)))++strtoken :: (String -> Token) -> Action+strtoken f span buf len _buf2 =+ return (L span $! (f $! lexemeToString buf len))++fstrtoken :: (FastString -> Token) -> Action+fstrtoken f span buf len _buf2 =+ return (L span $! (f $! lexemeToFastString buf len))++begin :: Int -> Action+begin code _span _str _len _buf2 = do pushLexState code; lexToken++pop :: Action+pop _span _buf _len _buf2 =+ do _ <- popLexState+ lexToken+-- See Note [Nested comment line pragmas]+failLinePrag1 :: Action+failLinePrag1 span _buf _len _buf2 = do+ b <- getBit InNestedCommentBit+ if b then return (L span ITcomment_line_prag)+ else lexError LexErrorInPragma++-- See Note [Nested comment line pragmas]+popLinePrag1 :: Action+popLinePrag1 span _buf _len _buf2 = do+ b <- getBit InNestedCommentBit+ if b then return (L span ITcomment_line_prag) else do+ _ <- popLexState+ lexToken++hopefully_open_brace :: Action+hopefully_open_brace span buf len buf2+ = do relaxed <- getBit RelaxedLayoutBit+ ctx <- getContext+ (AI l _) <- getInput+ let offset = srcLocCol (psRealLoc l)+ isOK = relaxed ||+ case ctx of+ Layout prev_off _ : _ -> prev_off < offset+ _ -> True+ if isOK then pop_and open_brace span buf len buf2+ else addFatalError $+ mkPlainErrorMsgEnvelope (mkSrcSpanPs span) PsErrMissingBlock++pop_and :: Action -> Action+pop_and act span buf len buf2 =+ do _ <- popLexState+ act span buf len buf2++-- See Note [Whitespace-sensitive operator parsing]+followedByOpeningToken, precededByClosingToken :: AlexAccPred ExtsBitmap+followedByOpeningToken _ _ _ (AI _ buf) = followedByOpeningToken' buf+precededByClosingToken _ (AI _ buf) _ _ = precededByClosingToken' buf++-- The input is the buffer *after* the token.+followedByOpeningToken' :: StringBuffer -> Bool+followedByOpeningToken' buf+ | atEnd buf = False+ | otherwise =+ case nextChar buf of+ ('{', buf') -> nextCharIsNot buf' (== '-')+ ('(', _) -> True+ ('[', _) -> True+ ('\"', _) -> True+ ('\'', _) -> True+ ('_', _) -> True+ ('⟦', _) -> True+ ('⦇', _) -> True+ (c, _) -> isAlphaNum c++-- The input is the buffer *before* the token.+precededByClosingToken' :: StringBuffer -> Bool+precededByClosingToken' buf =+ case prevChar buf '\n' of+ '}' -> decodePrevNChars 1 buf /= "-"+ ')' -> True+ ']' -> True+ '\"' -> True+ '\'' -> True+ '_' -> True+ '⟧' -> True+ '⦈' -> True+ c -> isAlphaNum c++get_op_ws :: StringBuffer -> StringBuffer -> OpWs+get_op_ws buf1 buf2 =+ mk_op_ws (precededByClosingToken' buf1) (followedByOpeningToken' buf2)+ where+ mk_op_ws False True = OpWsPrefix+ mk_op_ws True False = OpWsSuffix+ mk_op_ws True True = OpWsTightInfix+ mk_op_ws False False = OpWsLooseInfix++{-# INLINE with_op_ws #-}+with_op_ws :: (OpWs -> Action) -> Action+with_op_ws act span buf len buf2 = act (get_op_ws buf buf2) span buf len buf2++{-# 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)+ | HaddockBit `xtest` 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'++-- Check if we should parse a negative literal (e.g. -123) as a single token.+negLitPred :: AlexAccPred ExtsBitmap+negLitPred =+ prefix_minus `alexAndPred`+ (negative_literals `alexOrPred` lexical_negation)+ where+ negative_literals = ifExtension NegativeLiteralsBit++ lexical_negation =+ -- See Note [Why not LexicalNegationBit]+ alexNotPred (ifExtension NoLexicalNegationBit)++ prefix_minus =+ -- Note [prefix_minus in negLitPred and negHashLitPred]+ alexNotPred precededByClosingToken++-- Check if we should parse an unboxed negative literal (e.g. -123#) as a single token.+negHashLitPred :: ExtBits -> AlexAccPred ExtsBitmap+negHashLitPred ext = prefix_minus `alexAndPred` magic_hash+ where+ magic_hash = ifExtension ext -- Either MagicHashBit or ExtendedLiteralsBit+ prefix_minus =+ -- Note [prefix_minus in negLitPred and negHashLitPred]+ alexNotPred precededByClosingToken++{- Note [prefix_minus in negLitPred and negHashLitPred]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We want to parse -1 as a single token, but x-1 as three tokens.+So in negLitPred (and negHashLitPred) we require that we have a prefix+occurrence of the minus sign. See Note [Whitespace-sensitive operator parsing]+for a detailed definition of a prefix occurrence.++The condition for a prefix occurrence of an operator is:++ not precededByClosingToken && followedByOpeningToken++but we don't check followedByOpeningToken when parsing a negative literal.+It holds simply because we immediately lex a literal after the minus.+-}++ifExtension :: ExtBits -> AlexAccPred ExtsBitmap+ifExtension extBits bits _ _ _ = extBits `xtest` bits++alexNotPred p userState in1 len in2+ = not (p userState in1 len in2)++alexOrPred p1 p2 userState in1 len in2+ = p1 userState in1 len in2 || p2 userState in1 len in2++multiline_doc_comment :: Action+multiline_doc_comment span buf _len _buf2 = {-# SCC "multiline_doc_comment" #-} withLexedDocType worker+ where+ worker input@(AI start_loc _) docType checkNextLine = go start_loc "" [] input+ where+ go start_loc curLine prevLines input@(AI end_loc _) = case alexGetChar' input of+ Just ('\n', input')+ | checkNextLine -> case checkIfCommentLine input' of+ Just input@(AI next_start _) -> go next_start "" (locatedLine : prevLines) input -- Start a new line+ Nothing -> endComment+ | otherwise -> endComment+ Just (c, input) -> go start_loc (c:curLine) prevLines input+ Nothing -> endComment+ where+ lineSpan = mkSrcSpanPs $ mkPsSpan start_loc end_loc+ locatedLine = L lineSpan (mkHsDocStringChunk $ reverse curLine)+ commentLines = NE.reverse $ locatedLine :| prevLines+ endComment = docCommentEnd input (docType (\dec -> MultiLineDocString dec commentLines)) 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 buf2 = do+ b <- getBit RawTokenStreamBit+ if b then do+ lt <- getLastLocIncludingComments+ strtoken (\s -> ITlineComment s lt) span buf len buf2+ else lexToken+++{-+ nested comments require traversing by hand, they can't be parsed+ using regular expressions.+-}+nested_comment :: Action+nested_comment span buf len _buf2 = {-# SCC "nested_comment" #-} do+ l <- getLastLocIncludingComments+ let endComment input (L _ comment) = commentEnd lexToken input (Nothing, ITblockComment comment l) buf span+ input <- getInput+ -- Include decorator in comment+ let start_decorator = reverse $ lexemeToString buf len+ nested_comment_logic endComment start_decorator input span++nested_doc_comment :: Action+nested_doc_comment span buf _len _buf2 = {-# SCC "nested_doc_comment" #-} withLexedDocType worker+ where+ worker input docType _checkNextLine = nested_comment_logic endComment "" input span+ where+ endComment input lcomment+ = docCommentEnd input (docType (\d -> NestedDocString d (mkHsDocStringChunk . dropTrailingDec <$> lcomment))) buf span++ dropTrailingDec [] = []+ dropTrailingDec "-}" = ""+ dropTrailingDec (x:xs) = x:dropTrailingDec xs++{-# INLINE nested_comment_logic #-}+-- | Includes the trailing '-}' decorators+-- drop the last two elements with the callback if you don't want them to be included+nested_comment_logic+ :: (AlexInput -> Located String -> P (PsLocated Token)) -- ^ Continuation that gets the rest of the input and the lexed comment+ -> String -- ^ starting value for accumulator (reversed) - When we want to include a decorator '{-' in the comment+ -> AlexInput+ -> PsSpan+ -> P (PsLocated Token)+nested_comment_logic endComment commentAcc input span = go commentAcc (1::Int) input+ where+ go commentAcc 0 input@(AI end_loc _) = do+ let comment = reverse commentAcc+ cspan = mkSrcSpanPs $ mkPsSpan (psSpanStart span) end_loc+ lcomment = L cspan comment+ endComment input lcomment+ go commentAcc n input = case alexGetChar' input of+ Nothing -> errBrace input (psRealSpan span)+ Just ('-',input) -> case alexGetChar' input of+ Nothing -> errBrace input (psRealSpan 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 (psRealSpan span)+ Just ('-',input) -> go ('-':'\123':commentAcc) (n+1) input+ Just (_,_) -> go ('\123':commentAcc) n input+ -- See Note [Nested comment line pragmas]+ Just ('\n',input) -> case alexGetChar' input of+ Nothing -> errBrace input (psRealSpan span)+ Just ('#',_) -> do (parsedAcc,input) <- parseNestedPragma input+ go (parsedAcc ++ '\n':commentAcc) n input+ Just (_,_) -> go ('\n':commentAcc) n input+ Just (c,input) -> go (c:commentAcc) n input++-- See Note [Nested comment line pragmas]+parseNestedPragma :: AlexInput -> P (String,AlexInput)+parseNestedPragma input@(AI _ buf) = do+ origInput <- getInput+ setInput input+ setExts (.|. xbit InNestedCommentBit)+ pushLexState bol+ lt <- lexToken+ _ <- popLexState+ setExts (.&. complement (xbit InNestedCommentBit))+ postInput@(AI _ postBuf) <- getInput+ setInput origInput+ case unLoc lt of+ ITcomment_line_prag -> do+ let bytes = byteDiff buf postBuf+ diff = lexemeToString buf bytes+ return (reverse diff, postInput)+ lt' -> panic ("parseNestedPragma: unexpected token" ++ (show lt'))++{-+Note [Nested comment line pragmas]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We used to ignore cpp-preprocessor-generated #line pragmas if they were inside+nested comments.++Now, when parsing a nested comment, if we encounter a line starting with '#' we+call parseNestedPragma, which executes the following:+1. Save the current lexer input (loc, buf) for later+2. Set the current lexer input to the beginning of the line starting with '#'+3. Turn the 'InNestedComment' extension on+4. Push the 'bol' lexer state+5. Lex a token. Due to (2), (3), and (4), this should always lex a single line+ or less and return the ITcomment_line_prag token. This may set source line+ and file location if a #line pragma is successfully parsed+6. Restore lexer input and state to what they were before we did all this+7. Return control to the function parsing a nested comment, informing it of+ what the lexer parsed++Regarding (5) above:+Every exit from the 'bol' lexer state (do_bol, popLinePrag1, failLinePrag1)+checks if the 'InNestedComment' extension is set. If it is, that function will+return control to parseNestedPragma by returning the ITcomment_line_prag token.++See #314 for more background on the bug this fixes.+-}++{-# INLINE withLexedDocType #-}+withLexedDocType :: (AlexInput -> ((HsDocStringDecorator -> HsDocString) -> (HdkComment, Token)) -> Bool -> P (PsLocated Token))+ -> P (PsLocated Token)+withLexedDocType lexDocComment = do+ input@(AI _ buf) <- getInput+ l <- getLastLocIncludingComments+ 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 (mkHdkCommentNext l) True+ '^' -> lexDocComment input (mkHdkCommentPrev l) True+ '$' -> case lexDocName input of+ Nothing -> do setInput input; lexToken -- eof reached, lex it normally+ Just (name, input) -> lexDocComment input (mkHdkCommentNamed l name) True+ '*' -> lexDocSection l 1 input+ _ -> panic "withLexedDocType: Bad doc type"+ where+ lexDocSection l n input = case alexGetChar' input of+ Just ('*', input) -> lexDocSection l (n+1) input+ Just (_, _) -> lexDocComment input (mkHdkCommentSection l n) False+ Nothing -> do setInput input; lexToken -- eof reached, lex it normally++ lexDocName :: AlexInput -> Maybe (String, AlexInput)+ lexDocName = go ""+ where+ go acc input = case alexGetChar' input of+ Just (c, input')+ | isSpace c -> Just (reverse acc, input)+ | otherwise -> go (c:acc) input'+ Nothing -> Nothing++mkHdkCommentNext, mkHdkCommentPrev :: PsSpan -> (HsDocStringDecorator -> HsDocString) -> (HdkComment, Token)+mkHdkCommentNext loc mkDS = (HdkCommentNext ds,ITdocComment ds loc)+ where ds = mkDS HsDocStringNext+mkHdkCommentPrev loc mkDS = (HdkCommentPrev ds,ITdocComment ds loc)+ where ds = mkDS HsDocStringPrevious++mkHdkCommentNamed :: PsSpan -> String -> (HsDocStringDecorator -> HsDocString) -> (HdkComment, Token)+mkHdkCommentNamed loc name mkDS = (HdkCommentNamed name ds, ITdocComment ds loc)+ where ds = mkDS (HsDocStringNamed name)++mkHdkCommentSection :: PsSpan -> Int -> (HsDocStringDecorator -> HsDocString) -> (HdkComment, Token)+mkHdkCommentSection loc n mkDS = (HdkCommentSection n ds, ITdocComment ds loc)+ where ds = mkDS (HsDocStringGroup n)++-- 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 _buf2 = do+ setExts (.|. xbit InRulePragBit)+ let !src = lexemeToFastString buf len+ return (L span (ITrules_prag (SourceText src)))++-- When 'UsePosPragsBit' is not set, it is expected that we emit a token instead+-- of updating the position in 'PState'+linePrag :: Action+linePrag span buf len buf2 = do+ usePosPrags <- getBit UsePosPragsBit+ if usePosPrags+ then begin line_prag2 span buf len buf2+ else let !src = lexemeToFastString buf len+ in return (L span (ITline_prag (SourceText src)))++-- When 'UsePosPragsBit' is not set, it is expected that we emit a token instead+-- of updating the position in 'PState'+columnPrag :: Action+columnPrag span buf len buf2 = do+ usePosPrags <- getBit UsePosPragsBit+ if usePosPrags+ then begin column_prag span buf len buf2+ else let !src = lexemeToFastString buf len+ in return (L span (ITcolumn_prag (SourceText src)))++endPrag :: Action+endPrag span _buf _len _buf2 = 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.++{-# INLINE commentEnd #-}+commentEnd :: P (PsLocated Token)+ -> AlexInput+ -> (Maybe HdkComment, Token)+ -> StringBuffer+ -> PsSpan+ -> P (PsLocated Token)+commentEnd cont input (m_hdk_comment, hdk_token) buf span = do+ setInput input+ let (AI loc nextBuf) = input+ span' = mkPsSpan (psSpanStart span) loc+ last_len = byteDiff buf nextBuf+ span `seq` setLastToken span' last_len+ whenIsJust m_hdk_comment $ \hdk_comment ->+ P $ \s -> POk (s {hdk_comments = hdk_comments s `snocOL` L span' hdk_comment}) ()+ b <- getBit RawTokenStreamBit+ if b then return (L span' hdk_token)+ else cont++{-# INLINE docCommentEnd #-}+docCommentEnd :: AlexInput -> (HdkComment, Token) -> StringBuffer ->+ PsSpan -> P (PsLocated Token)+docCommentEnd input (hdk_comment, tok) buf span+ = commentEnd lexToken input (Just hdk_comment, tok) buf span++errBrace :: AlexInput -> RealSrcSpan -> P a+errBrace (AI end _) span =+ failLocMsgP (realSrcSpanStart span)+ (psRealLoc end)+ (\srcLoc -> mkPlainErrorMsgEnvelope srcLoc (PsErrLexer LexUnterminatedComment LexErrKind_EOF))++open_brace, close_brace :: Action+open_brace span _str _len _buf2 = do+ ctx <- getContext+ setContext (NoLayout:ctx)+ return (L span ITocurly)+close_brace span _str _len _buf2 = 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.+--+-- Throws an error if the name is not qualified.+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+ | qual_size < 1 = error "splitQualName got an unqualified named"+ | otherwise =+ (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 _buf2 =+ case lookupUFM reservedWordsFM fs of+ Just (ITcase, _) -> do+ lastTk <- getLastTk+ keyword <- case lastTk of+ Strict.Just (L _ ITlam) -> do+ lambdaCase <- getBit LambdaCaseBit+ unless lambdaCase $ do+ pState <- getPState+ addError $ mkPlainErrorMsgEnvelope (mkSrcSpanPs (last_loc pState)) PsErrLambdaCase+ return ITlcase+ _ -> return ITcase+ maybe_layout keyword+ return $ L span keyword+ Just (ITlcases, _) -> do+ lastTk <- getLastTk+ lambdaCase <- getBit LambdaCaseBit+ token <- case lastTk of+ Strict.Just (L _ ITlam) | lambdaCase -> return ITlcases+ _ -> return $ ITvarid fs+ maybe_layout token+ return $ L span token+ Just (keyword, 0) -> do+ maybe_layout keyword+ return $ L span keyword+ Just (keyword, i) -> do+ exts <- getExts+ if exts .&. i /= 0+ 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++-- See Note [Whitespace-sensitive operator parsing]+varsym :: OpWs -> Action+varsym opws@OpWsPrefix = sym $ \span exts s ->+ let warnExtConflict errtok =+ do { addPsMessage (mkSrcSpanPs span) (PsWarnOperatorWhitespaceExtConflict errtok)+ ; return (ITvarsym s) }+ in+ if | s == fsLit "@" ->+ return ITtypeApp -- regardless of TypeApplications for better error messages+ | s == fsLit "%" ->+ if xtest LinearTypesBit exts+ then return ITpercent+ else warnExtConflict OperatorWhitespaceSymbol_PrefixPercent+ | s == fsLit "$" ->+ if xtest ThQuotesBit exts+ then return ITdollar+ else warnExtConflict OperatorWhitespaceSymbol_PrefixDollar+ | s == fsLit "$$" ->+ if xtest ThQuotesBit exts+ then return ITdollardollar+ else warnExtConflict OperatorWhitespaceSymbol_PrefixDollarDollar+ | s == fsLit "-" ->+ return ITprefixminus -- Only when LexicalNegation is on, otherwise we get ITminus+ -- and don't hit this code path. See Note [Minus tokens]+ | s == fsLit ".", OverloadedRecordDotBit `xtest` exts ->+ return (ITproj True) -- e.g. '(.x)'+ | s == fsLit "." -> return ITdot+ | s == fsLit "!" -> return ITbang+ | s == fsLit "~" -> return ITtilde+ | otherwise ->+ do { warnOperatorWhitespace opws span s+ ; return (ITvarsym s) }+varsym opws@OpWsSuffix = sym $ \span _ s ->+ if | s == fsLit "@" -> failMsgP (\srcLoc -> mkPlainErrorMsgEnvelope srcLoc $ PsErrSuffixAT)+ | s == fsLit "." -> return ITdot+ | otherwise ->+ do { warnOperatorWhitespace opws span s+ ; return (ITvarsym s) }+varsym opws@OpWsTightInfix = sym $ \span exts s ->+ if | s == fsLit "@" -> return ITat+ | s == fsLit ".", OverloadedRecordDotBit `xtest` exts -> return (ITproj False)+ | s == fsLit "." -> return ITdot+ | otherwise ->+ do { warnOperatorWhitespace opws span s+ ; return (ITvarsym s) }+varsym OpWsLooseInfix = sym $ \_ _ s ->+ if | s == fsLit "."+ -> return ITdot+ | otherwise+ -> return $ ITvarsym s++consym :: OpWs -> Action+consym opws = sym $ \span _exts s ->+ do { warnOperatorWhitespace opws span s+ ; return (ITconsym s) }++warnOperatorWhitespace :: OpWs -> PsSpan -> FastString -> P ()+warnOperatorWhitespace opws span s =+ whenIsJust (check_unusual_opws opws) $ \opws' ->+ addPsMessage+ (mkSrcSpanPs span)+ (PsWarnOperatorWhitespace s opws')++-- Check an operator occurrence for unusual whitespace (prefix, suffix, tight infix).+-- This determines if -Woperator-whitespace is triggered.+check_unusual_opws :: OpWs -> Maybe OperatorWhitespaceOccurrence+check_unusual_opws opws =+ case opws of+ OpWsPrefix -> Just OperatorWhitespaceOccurrence_Prefix+ OpWsSuffix -> Just OperatorWhitespaceOccurrence_Suffix+ OpWsTightInfix -> Just OperatorWhitespaceOccurrence_TightInfix+ OpWsLooseInfix -> Nothing++sym :: (PsSpan -> ExtsBitmap -> FastString -> P Token) -> Action+sym con span buf len _buf2 =+ case lookupUFM reservedSymsFM fs of+ Just (keyword, NormalSyntax, 0) ->+ return $ L span keyword+ Just (keyword, NormalSyntax, i) -> do+ exts <- getExts+ if exts .&. i /= 0+ then return $ L span keyword+ else L span <$!> con span exts fs+ Just (keyword, UnicodeSyntax, 0) -> do+ exts <- getExts+ if xtest UnicodeSyntaxBit exts+ then return $ L span keyword+ else L span <$!> con span exts fs+ Just (keyword, UnicodeSyntax, i) -> do+ exts <- getExts+ if exts .&. i /= 0 && xtest UnicodeSyntaxBit exts+ then return $ L span keyword+ else L span <$!> con span exts fs+ Nothing -> do+ exts <- getExts+ L span <$!> con span exts 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 _buf2 = do+ numericUnderscores <- getBit NumericUnderscoresBit -- #14473+ let src = lexemeToFastString buf len+ when ((not numericUnderscores) && ('_' `elem` unpackFS src)) $ do+ pState <- getPState+ let msg = PsErrNumUnderscores NumUnderscore_Integral+ addError $ mkPlainErrorMsgEnvelope (mkSrcSpanPs (last_loc pState)) msg+ 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 $ \case+ st@(SourceText (unconsFS -> Just ('-',_))) -> itint st (const True)+ st@(SourceText _) -> itint st (const False)+ st@NoSourceText -> itint st (< 0)+ where+ itint :: SourceText -> (Integer -> Bool) -> Integer -> Token+ itint !st is_negative !val = ITinteger ((IL st $! is_negative val) 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)++-- | Helper for defining @IntX@ primitive literal parsers (specifically for+-- the ExtendedLiterals extension, such as @123#Int8@).+tok_primintX :: (SourceText -> Integer -> Token)+ -> Int+ -> (Integer -> Integer)+ -> Int+ -> (Integer, (Char->Int)) -> Action+tok_primintX itint addlen transint transbuf =+ tok_integral itint transint transbuf (transbuf+addlen)++tok_primint8, tok_primint16, tok_primint32, tok_primint64+ :: (Integer -> Integer)+ -> Int -> (Integer, (Char->Int)) -> Action+tok_primint8 = tok_primintX ITprimint8 5+tok_primint16 = tok_primintX ITprimint16 6+tok_primint32 = tok_primintX ITprimint32 6+tok_primint64 = tok_primintX ITprimint64 6++-- | Helper for defining @WordX@ primitive literal parsers (specifically for+-- the ExtendedLiterals extension, such as @234#Word8@).+tok_primwordX :: (SourceText -> Integer -> Token)+ -> Int+ -> Int+ -> (Integer, (Char->Int)) -> Action+tok_primwordX itint addlen transbuf =+ tok_integral itint positive transbuf (transbuf+addlen)++tok_primword8, tok_primword16, tok_primword32, tok_primword64+ :: Int -> (Integer, (Char->Int)) -> Action+tok_primword8 = tok_primwordX ITprimword8 6+tok_primword16 = tok_primwordX ITprimword16 7+tok_primword32 = tok_primwordX ITprimword32 7+tok_primword64 = tok_primwordX ITprimword64 7++-- readSignificandExponentPair can understand negative rationals, exponents, everything.+tok_frac :: Int -> (String -> Token) -> Action+tok_frac drop f span buf len _buf2 = do+ numericUnderscores <- getBit NumericUnderscoresBit -- #14473+ let src = lexemeToString buf (len-drop)+ when ((not numericUnderscores) && ('_' `elem` src)) $ do+ pState <- getPState+ let msg = PsErrNumUnderscores NumUnderscore_Float+ addError $ mkPlainErrorMsgEnvelope (mkSrcSpanPs (last_loc pState)) msg+ 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, readHexFractionalLit :: String -> FractionalLit+readHexFractionalLit = readFractionalLitX readHexSignificandExponentPair Base2+readFractionalLit = readFractionalLitX readSignificandExponentPair Base10++readFractionalLitX :: (String -> (Integer, Integer))+ -> FractionalExponentBase+ -> String -> FractionalLit+readFractionalLitX readStr b str =+ mkSourceFractionalLit str is_neg i e b+ where+ is_neg = case str of+ '-' : _ -> True+ _ -> False+ (i, e) = readStr 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 _buf2 = do+ -- See Note [Nested comment line pragmas]+ b <- getBit InNestedCommentBit+ if b then return (L span ITcomment_line_prag) else 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 <- getBit AlternativeLayoutRuleBit+ unless alr $ f t+ where f (ITdo _) = pushLexState layout_do+ f (ITmdo _) = pushLexState layout_do+ f ITof = pushLexState layout+ f ITlcase = pushLexState layout+ f ITlcases = 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 _buf2 = do+ _ <- popLexState+ (AI l _) <- getInput+ let offset = srcLocCol (psRealLoc l) - len+ ctx <- getContext+ nondecreasing <- getBit NondecreasingIndentationBit+ 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 _buf2 = do+ _ <- popLexState+ pushLexState bol -- we must be at the start of a line+ return (L span ITvccurly)++-- -----------------------------------------------------------------------------+-- LINE pragmas++setLineAndFile :: Int -> Action+setLineAndFile code (PsSpan span _) buf len _buf2 = do+ let src = lexemeToString buf (len - 1) -- drop trailing quotation mark+ linenumLen = length $ head $ words src+ linenum = parseUnsignedInteger buf linenumLen 10 octDecDigit+ file = mkFastString $ go $ drop 1 $ dropWhile (/= '"') src+ -- skip everything through first quotation mark to get to the filename+ 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?).+ resetAlrLastLoc file+ setSrcLoc (mkRealSrcLoc file (fromIntegral linenum - 1) (srcSpanEndCol span))+ -- subtract one: the line number refers to the *following* line+ addSrcFile file+ _ <- popLexState+ pushLexState code+ lexToken++setColumn :: Action+setColumn (PsSpan span _) buf len _buf2 = 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++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 = lex_string_prag_comment mkTok'+ where+ mkTok' s _ = mkTok s++lex_string_prag_comment :: (String -> PsSpan -> Token) -> Action+lex_string_prag_comment mkTok span _buf _len _buf2+ = do input <- getInput+ start <- getParsedLoc+ l <- getLastLocIncludingComments+ tok <- go l [] input+ end <- getParsedLoc+ return (L (mkPsSpan start end) tok)+ where go l acc input+ = if isString input "#-}"+ then do setInput input+ return (mkTok (reverse acc) l)+ else case alexGetChar input of+ Just (c,i) -> go l (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 (psRealSpan span))+ (psRealLoc end)+ (\srcLoc -> mkPlainErrorMsgEnvelope srcLoc $ PsErrLexer LexUnterminatedOptions LexErrKind_EOF)++-- -----------------------------------------------------------------------------+-- Strings & Chars++-- This stuff is horrible. I hates it.++lex_string_tok :: Action+lex_string_tok span buf _len _buf2 = do+ lexed <- lex_string+ (AI end bufEnd) <- getInput+ let+ tok = case lexed of+ LexedPrimString s -> ITprimstring (SourceText src) (unsafeMkByteString s)+ LexedRegularString s -> ITstring (SourceText src) (mkFastString s)+ src = lexemeToFastString buf (cur bufEnd - cur buf)+ return $ L (mkPsSpan (psSpanStart span) end) tok+++lex_quoted_label :: Action+lex_quoted_label span buf _len _buf2 = do+ start <- getInput+ s <- lex_string_helper "" start+ (AI end bufEnd) <- getInput+ let+ token = ITlabelvarid (SourceText src) (mkFastString s)+ src = lexemeToFastString (stepOn buf) (cur bufEnd - cur buf - 1)+ start = psSpanStart span++ return $ L (mkPsSpan start end) token+++data LexedString = LexedRegularString String | LexedPrimString String++lex_string :: P LexedString+lex_string = do+ start <- getInput+ s <- lex_string_helper "" start+ magicHash <- getBit MagicHashBit+ if magicHash+ then do+ i <- getInput+ case alexGetChar' i of+ Just ('#',i) -> do+ setInput i+ when (any (> '\xFF') s) $ do+ pState <- getPState+ let msg = PsErrPrimStringInvalidChar+ let err = mkPlainErrorMsgEnvelope (mkSrcSpanPs (last_loc pState)) msg+ addError err+ return $ LexedPrimString s+ _other ->+ return $ LexedRegularString s+ else+ return $ LexedRegularString s+++lex_string_helper :: String -> AlexInput -> P String+lex_string_helper s start = do+ i <- getInput+ case alexGetChar' i of+ Nothing -> lit_error i++ Just ('"',i) -> do+ setInput i+ return (reverse s)++ Just ('\\',i)+ | Just ('&',i) <- next -> do+ setInput i; lex_string_helper s start+ | Just (c,i) <- next, c <= '\x7f' && is_space c -> do+ -- is_space only works for <= '\x7f' (#3751, #5425)+ setInput i; lex_stringgap s start+ where next = alexGetChar' i++ Just (c, i1) -> do+ case c of+ '\\' -> do setInput i1; c' <- lex_escape; lex_string_helper (c':s) start+ c | isAny c -> do setInput i1; lex_string_helper (c:s) start+ _other | any isDoubleSmartQuote s -> do+ -- if the built-up string s contains a smart double quote character, it was+ -- likely the reason why the string literal was not lexed correctly+ setInput start -- rewind to the first character in the string literal+ -- so we can find the smart quote character's location+ advance_to_smart_quote_character+ i2@(AI loc _) <- getInput+ case alexGetChar' i2 of+ Just (c, _) -> do add_nonfatal_smart_quote_error c loc; lit_error i+ Nothing -> lit_error i -- should never get here+ _other -> lit_error i+++lex_stringgap :: String -> AlexInput -> P String+lex_stringgap s start = do+ i <- getInput+ c <- getCharOrFail i+ case c of+ '\\' -> lex_string_helper s start+ c | c <= '\x7f' && is_space c -> lex_stringgap s start+ -- 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 _buf2 = do -- We've seen '+ i1 <- getInput -- Look ahead to first character+ let loc = psSpanStart span+ case alexGetChar' i1 of+ Nothing -> lit_error i1++ Just ('\'', i2@(AI end2 _)) -> do -- We've seen ''+ setInput i2+ return (L (mkPsSpan 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 if isSingleSmartQuote mc then add_smart_quote_error mc end2+ 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+ Just (c, _) | isSingleSmartQuote c -> add_smart_quote_error c end2+ _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 (mkPsSpan loc end) ITsimpleQuote)++finish_char_tok :: StringBuffer -> PsLoc -> Char -> P (PsLocated Token)+finish_char_tok buf loc ch -- We've already seen the closing quote+ -- Just need to check for trailing #+ = do magicHash <- getBit MagicHashBit+ i@(AI end bufEnd) <- getInput+ let src = lexemeToFastString buf (cur bufEnd - cur buf)+ if magicHash then do+ case alexGetChar' i of+ Just ('#',i@(AI end bufEnd')) -> do+ setInput i+ -- Include the trailing # in SourceText+ let src' = lexemeToFastString buf (cur bufEnd' - cur buf)+ return (L (mkPsSpan loc end)+ (ITprimchar (SourceText src') ch))+ _other ->+ return (L (mkPsSpan loc end)+ (ITchar (SourceText src) ch))+ else do+ return (L (mkPsSpan 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@(AI loc _) <- 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 '\''+ -- the next two patterns build up a Unicode smart quote error (#21843)+ smart_double_quote | isDoubleSmartQuote smart_double_quote ->+ add_smart_quote_error smart_double_quote loc+ smart_single_quote | isSingleSmartQuote smart_single_quote ->+ add_smart_quote_error smart_single_quote loc+ '^' -> 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 LexNumEscapeRange+ 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 LexStringCharLit++getCharOrFail :: AlexInput -> P Char+getCharOrFail i = do+ case alexGetChar' i of+ Nothing -> lexError LexStringCharLitEOF+ Just (c,i) -> do setInput i; return c++-- -----------------------------------------------------------------------------+-- QuasiQuote++lex_qquasiquote_tok :: Action+lex_qquasiquote_tok span buf len _buf2 = do+ let (qual, quoter) = splitQualName (stepOn buf) (len - 2) False+ quoteStart <- getParsedLoc+ quote <- lex_quasiquote (psRealLoc quoteStart) ""+ end <- getParsedLoc+ return (L (mkPsSpan (psSpanStart span) end)+ (ITqQuasiQuote (qual,+ quoter,+ mkFastString (reverse quote),+ mkPsSpan quoteStart end)))++lex_quasiquote_tok :: Action+lex_quasiquote_tok span buf len _buf2 = do+ let quoter = tail (lexemeToString buf (len - 1))+ -- 'tail' drops the initial '[',+ -- while the -1 drops the trailing '|'+ quoteStart <- getParsedLoc+ quote <- lex_quasiquote (psRealLoc quoteStart) ""+ end <- getParsedLoc+ return (L (mkPsSpan (psSpanStart span) end)+ (ITquasiQuote (mkFastString quoter,+ mkFastString (reverse quote),+ mkPsSpan 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 #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 (psRealLoc end) buf+ (\k srcLoc -> mkPlainErrorMsgEnvelope srcLoc (PsErrLexer LexUnterminatedQQ k))++-- -----------------------------------------------------------------------------+-- Unicode Smart Quote detection (#21843)++isDoubleSmartQuote :: Char -> Bool+isDoubleSmartQuote '“' = True+isDoubleSmartQuote '”' = True+isDoubleSmartQuote _ = False++isSingleSmartQuote :: Char -> Bool+isSingleSmartQuote '‘' = True+isSingleSmartQuote '’' = True+isSingleSmartQuote _ = False++isSmartQuote :: AlexAccPred ExtsBitmap+isSmartQuote _ _ _ (AI _ buf) = let c = prevChar buf ' ' in isSingleSmartQuote c || isDoubleSmartQuote c++smart_quote_error_message :: Char -> PsLoc -> MsgEnvelope PsMessage+smart_quote_error_message c loc =+ let (correct_char, correct_char_name) =+ if isSingleSmartQuote c then ('\'', "Single Quote") else ('"', "Quotation Mark")+ err = mkPlainErrorMsgEnvelope (mkSrcSpanPs (mkPsSpan loc loc)) $+ PsErrUnicodeCharLooksLike c correct_char correct_char_name in+ err++smart_quote_error :: Action+smart_quote_error span buf _len _buf2 = do+ let c = currentChar buf+ addFatalError (smart_quote_error_message c (psSpanStart span))++add_smart_quote_error :: Char -> PsLoc -> P a+add_smart_quote_error c loc = addFatalError (smart_quote_error_message c loc)++add_nonfatal_smart_quote_error :: Char -> PsLoc -> P ()+add_nonfatal_smart_quote_error c loc = addError (smart_quote_error_message c loc)++advance_to_smart_quote_character :: P ()+advance_to_smart_quote_character = do+ i <- getInput+ case alexGetChar' i of+ Just (c, _) | isDoubleSmartQuote c -> return ()+ Just (_, i2) -> do setInput i2; advance_to_smart_quote_character+ Nothing -> return () -- should never get here++-- -----------------------------------------------------------------------------+-- Warnings++warnTab :: Action+warnTab srcspan _buf _len _buf2 = do+ addTabWarning (psRealSpan srcspan)+ lexToken++warnThen :: PsMessage -> Action -> Action+warnThen warning action srcspan buf len buf2 = do+ addPsMessage (RealSrcSpan (psRealSpan srcspan) Strict.Nothing) warning+ action srcspan buf len buf2++-- -----------------------------------------------------------------------------+-- 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++-- | The result of running a parser.+newtype ParseResult a = PR (# (# PState, a #) | PState #)++-- | The parser has consumed a (possibly empty) prefix of the input and produced+-- a result. Use 'getPsMessages' to check for accumulated warnings and non-fatal+-- errors.+--+-- The carried parsing state can be used to resume parsing.+pattern POk :: PState -> a -> ParseResult a+pattern POk s a = PR (# (# s , a #) | #)++-- | The parser has consumed a (possibly empty) prefix of the input and failed.+--+-- The carried parsing state can be used to resume parsing. It is the state+-- right before failure, including the fatal parse error. 'getPsMessages' and+-- 'getPsErrorMessages' must return a non-empty bag of errors.+pattern PFailed :: PState -> ParseResult a+pattern PFailed s = PR (# | s #)++{-# COMPLETE POk, PFailed #-}++-- | Test whether a 'WarningFlag' is set+warnopt :: WarningFlag -> ParserOpts -> Bool+warnopt f options = f `EnumSet.member` pWarningFlags options++-- | Parser options.+--+-- See 'mkParserOpts' to construct this.+data ParserOpts = ParserOpts+ { pExtsBitmap :: !ExtsBitmap -- ^ bitmap of permitted extensions+ , pDiagOpts :: !DiagOpts+ -- ^ Options to construct diagnostic messages.+ , pSupportedExts :: [String]+ -- ^ supported extensions (only used for suggestions in error messages)+ }++pWarningFlags :: ParserOpts -> EnumSet WarningFlag+pWarningFlags opts = diag_warning_flags (pDiagOpts opts)++-- | Haddock comment as produced by the lexer. These are accumulated in 'PState'+-- and then processed in "GHC.Parser.PostProcess.Haddock". The location of the+-- 'HsDocString's spans over the contents of the docstring - i.e. it does not+-- include the decorator ("-- |", "{-|" etc.)+data HdkComment+ = HdkCommentNext HsDocString+ | HdkCommentPrev HsDocString+ | HdkCommentNamed String HsDocString+ | HdkCommentSection Int HsDocString+ deriving Show++data PState = PState {+ buffer :: StringBuffer,+ options :: ParserOpts,+ warnings :: Messages PsMessage,+ errors :: Messages PsMessage,+ tab_first :: Strict.Maybe RealSrcSpan, -- pos of first tab warning in the file+ tab_count :: !Word, -- number of tab warnings in the file+ last_tk :: Strict.Maybe (PsLocated Token), -- last non-comment token+ prev_loc :: PsSpan, -- pos of previous non-virtual token, including comments,+ last_loc :: PsSpan, -- pos of current token+ last_len :: !Int, -- len of current token+ loc :: PsLoc, -- 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 :: [PsLocated 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 (PsLocated Token),+ -- This is what we consider to be the location of the last token+ -- emitted:+ alr_last_loc :: PsSpan,+ -- 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,++ -- 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 [exact print annotations] in GHC.Parser.Annotation+ eof_pos :: Strict.Maybe (Strict.Pair RealSrcSpan RealSrcSpan), -- pos, gap to prior token+ header_comments :: Strict.Maybe [LEpaComment],+ comment_q :: [LEpaComment],++ -- Haddock comments accumulated in ascending order of their location+ -- (BufPos). We use OrdList to get O(1) snoc.+ --+ -- See Note [Adding Haddock comments to the syntax tree] in GHC.Parser.PostProcess.Haddock+ hdk_comments :: OrdList (PsLocated HdkComment)+ }+ -- 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).++ -- AZ question: setLastToken which sets last_loc and last_len+ -- is called when processing AlexToken, immediately prior to+ -- calling the action in the token. So from the perspective+ -- of the action, it is the *current* token. Do I understand+ -- correctly?++data ALRContext = ALRNoLayout Bool{- does it contain commas? -}+ Bool{- is it a 'let' block? -}+ | ALRLayout ALRLayout Int+data ALRLayout = ALRLayoutLet+ | ALRLayoutWhere+ | ALRLayoutOf+ | ALRLayoutDo++-- | The parsing monad, isomorphic to @StateT PState Maybe@.+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++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 s1 -> PFailed s1++failMsgP :: (SrcSpan -> MsgEnvelope PsMessage) -> P a+failMsgP f = do+ pState <- getPState+ addFatalError (f (mkSrcSpanPs (last_loc pState)))++failLocMsgP :: RealSrcLoc -> RealSrcLoc -> (SrcSpan -> MsgEnvelope PsMessage) -> P a+failLocMsgP loc1 loc2 f =+ addFatalError (f (RealSrcSpan (mkRealSrcSpan loc1 loc2) Strict.Nothing))++getPState :: P PState+getPState = P $ \s -> POk s 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@(PState{ loc = PsLoc _ buf_loc }) ->+ POk s{ loc = PsLoc new_loc buf_loc } ()++getRealSrcLoc :: P RealSrcLoc+getRealSrcLoc = P $ \s@(PState{ loc=loc }) -> POk s (psRealLoc loc)++getParsedLoc :: P PsLoc+getParsedLoc = P $ \s@(PState{ loc=loc }) -> POk s loc++addSrcFile :: FastString -> P ()+addSrcFile f = P $ \s -> POk s{ srcfiles = f : srcfiles s } ()++setEofPos :: RealSrcSpan -> RealSrcSpan -> P ()+setEofPos span gap = P $ \s -> POk s{ eof_pos = Strict.Just (span `Strict.And` gap) } ()++setLastToken :: PsSpan -> Int -> P ()+setLastToken loc len = P $ \s -> POk s {+ last_loc=loc,+ last_len=len+ } ()++setLastTk :: PsLocated Token -> P ()+setLastTk tk@(L l _) = P $ \s ->+ if isPointRealSpan (psRealSpan l)+ then POk s { last_tk = Strict.Just tk } ()+ else POk s { last_tk = Strict.Just tk+ , prev_loc = l } ()++setLastComment :: PsLocated Token -> P ()+setLastComment (L l _) = P $ \s -> POk s { prev_loc = l } ()++getLastTk :: P (Strict.Maybe (PsLocated Token))+getLastTk = P $ \s@(PState { last_tk = last_tk }) -> POk s last_tk++-- see Note [PsSpan in Comments]+getLastLocIncludingComments :: P PsSpan+getLastLocIncludingComments = P $ \s@(PState { prev_loc = prev_loc }) -> POk s prev_loc++getLastLoc :: P PsSpan+getLastLoc = P $ \s@(PState { last_loc = last_loc }) -> POk s last_loc++data AlexInput = AI !PsLoc !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 "GHC.Utils.Lexeme"+ -- 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 -> digit+ 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' = advancePsLoc loc c+ byte = adjustChar c++{-# INLINE alexGetChar' #-}+-- 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' = advancePsLoc 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 (PsLocated 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++resetAlrLastLoc :: FastString -> P ()+resetAlrLastLoc file =+ P $ \s@(PState {alr_last_loc = PsSpan _ buf_span}) ->+ POk s{ alr_last_loc = PsSpan (alrInitialLoc file) buf_span } ()++setAlrLastLoc :: PsSpan -> P ()+setAlrLastLoc l = P $ \s -> POk (s {alr_last_loc = l}) ()++getAlrLastLoc :: P PsSpan+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}) ()++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 :: PsLocated 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 (PsLocated 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 :: [PsLocated 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, boolean parsing flags (eg, language extensions+-- or whether we are currently in a @RULE@ pragma) are represented by a bitmap+-- stored in a @Word64@.+type ExtsBitmap = Word64++xbit :: ExtBits -> ExtsBitmap+xbit = bit . fromEnum++xtest :: ExtBits -> ExtsBitmap -> Bool+xtest ext xmap = testBit xmap (fromEnum ext)++xset :: ExtBits -> ExtsBitmap -> ExtsBitmap+xset ext xmap = setBit xmap (fromEnum ext)++xunset :: ExtBits -> ExtsBitmap -> ExtsBitmap+xunset ext xmap = clearBit xmap (fromEnum ext)++-- | Various boolean flags, mostly language extensions, that impact lexing and+-- parsing. Note that a handful of these can change during lexing/parsing.+data ExtBits+ -- Flags that are constant once parsing starts+ = FfiBit+ | InterruptibleFfiBit+ | CApiFfiBit+ | ArrowsBit+ | ThBit+ | ThQuotesBit+ | IpBit+ | OverloadedLabelsBit -- #x overloaded labels+ | ExplicitForallBit -- the 'forall' keyword+ | 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+ | QualifiedDoBit -- .do and .mdo+ | UnicodeSyntaxBit -- the forall symbol, arrow symbols, etc+ | UnboxedParensBit -- (# and #)+ | DatatypeContextsBit+ | MonadComprehensionsBit+ | TransformComprehensionsBit+ | QqBit -- enable quasiquoting+ | RawTokenStreamBit -- producing a token stream with all comments included+ | AlternativeLayoutRuleBit+ | ALRTransitionalBit+ | RelaxedLayoutBit+ | NondecreasingIndentationBit+ | SafeHaskellBit+ | TraditionalRecordSyntaxBit+ | ExplicitNamespacesBit+ | LambdaCaseBit+ | BinaryLiteralsBit+ | NegativeLiteralsBit+ | HexFloatLiteralsBit+ | StaticPointersBit+ | NumericUnderscoresBit+ | StarIsTypeBit+ | BlockArgumentsBit+ | NPlusKPatternsBit+ | DoAndIfThenElseBit+ | MultiWayIfBit+ | GadtSyntaxBit+ | ImportQualifiedPostBit+ | LinearTypesBit+ | NoLexicalNegationBit -- See Note [Why not LexicalNegationBit]+ | OverloadedRecordDotBit+ | OverloadedRecordUpdateBit+ | ExtendedLiteralsBit++ -- Flags that are updated once parsing starts+ | InRulePragBit+ | InNestedCommentBit -- See Note [Nested comment line pragmas]+ | UsePosPragsBit+ -- ^ If this is enabled, '{-# LINE ... -#}' and '{-# COLUMN ... #-}'+ -- update the internal position. Otherwise, those pragmas are lexed as+ -- tokens of their own.+ deriving Enum++{-# INLINE mkParserOpts #-}+mkParserOpts+ :: EnumSet LangExt.Extension -- ^ permitted language extensions enabled+ -> DiagOpts -- ^ diagnostic options+ -> [String] -- ^ Supported Languages and Extensions+ -> Bool -- ^ are safe imports on?+ -> Bool -- ^ keeping Haddock comment tokens+ -> Bool -- ^ keep regular comment tokens++ -> Bool+ -- ^ If this is enabled, '{-# LINE ... -#}' and '{-# COLUMN ... #-}' update+ -- the internal position kept by the parser. Otherwise, those pragmas are+ -- lexed as 'ITline_prag' and 'ITcolumn_prag' tokens.++ -> ParserOpts+-- ^ Given exactly the information needed, set up the 'ParserOpts'+mkParserOpts extensionFlags diag_opts supported+ safeImports isHaddock rawTokStream usePosPrags =+ ParserOpts {+ pDiagOpts = diag_opts+ , pExtsBitmap = safeHaskellBit .|. langExtBits .|. optBits+ , pSupportedExts = supported+ }+ where+ safeHaskellBit = SafeHaskellBit `setBitIf` safeImports+ 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+ .|. QualifiedDoBit `xoptBit` LangExt.QualifiedDo+ .|. UnicodeSyntaxBit `xoptBit` LangExt.UnicodeSyntax+ .|. UnboxedParensBit `orXoptsBit` [LangExt.UnboxedTuples, LangExt.UnboxedSums]+ .|. DatatypeContextsBit `xoptBit` LangExt.DatatypeContexts+ .|. TransformComprehensionsBit `xoptBit` LangExt.TransformListComp+ .|. MonadComprehensionsBit `xoptBit` LangExt.MonadComprehensions+ .|. AlternativeLayoutRuleBit `xoptBit` LangExt.AlternativeLayoutRule+ .|. ALRTransitionalBit `xoptBit` LangExt.AlternativeLayoutRuleTransitional+ .|. 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+ .|. StaticPointersBit `xoptBit` LangExt.StaticPointers+ .|. NumericUnderscoresBit `xoptBit` LangExt.NumericUnderscores+ .|. StarIsTypeBit `xoptBit` LangExt.StarIsType+ .|. BlockArgumentsBit `xoptBit` LangExt.BlockArguments+ .|. NPlusKPatternsBit `xoptBit` LangExt.NPlusKPatterns+ .|. DoAndIfThenElseBit `xoptBit` LangExt.DoAndIfThenElse+ .|. MultiWayIfBit `xoptBit` LangExt.MultiWayIf+ .|. GadtSyntaxBit `xoptBit` LangExt.GADTSyntax+ .|. ImportQualifiedPostBit `xoptBit` LangExt.ImportQualifiedPost+ .|. LinearTypesBit `xoptBit` LangExt.LinearTypes+ .|. NoLexicalNegationBit `xoptNotBit` LangExt.LexicalNegation -- See Note [Why not LexicalNegationBit]+ .|. OverloadedRecordDotBit `xoptBit` LangExt.OverloadedRecordDot+ .|. OverloadedRecordUpdateBit `xoptBit` LangExt.OverloadedRecordUpdate -- Enable testing via 'getBit OverloadedRecordUpdateBit' in the parser (RecordDotSyntax parsing uses that information).+ .|. ExtendedLiteralsBit `xoptBit` LangExt.ExtendedLiterals+ optBits =+ HaddockBit `setBitIf` isHaddock+ .|. RawTokenStreamBit `setBitIf` rawTokStream+ .|. UsePosPragsBit `setBitIf` usePosPrags++ xoptBit bit ext = bit `setBitIf` EnumSet.member ext extensionFlags+ xoptNotBit bit ext = bit `setBitIf` not (EnumSet.member ext extensionFlags)++ orXoptsBit bit exts = bit `setBitIf` any (`EnumSet.member` extensionFlags) exts++ setBitIf :: ExtBits -> Bool -> ExtsBitmap+ b `setBitIf` cond | cond = xbit b+ | otherwise = 0++disableHaddock :: ParserOpts -> ParserOpts+disableHaddock opts = upd_bitmap (xunset HaddockBit)+ where+ upd_bitmap f = opts { pExtsBitmap = f (pExtsBitmap opts) }+++-- | Set parser options for parsing OPTIONS pragmas+initPragState :: ParserOpts -> StringBuffer -> RealSrcLoc -> PState+initPragState options buf loc = (initParserState options buf loc)+ { lex_state = [bol, option_prags, 0]+ }++-- | Creates a parse state from a 'ParserOpts' value+initParserState :: ParserOpts -> StringBuffer -> RealSrcLoc -> PState+initParserState options buf loc =+ PState {+ buffer = buf,+ options = options,+ errors = emptyMessages,+ warnings = emptyMessages,+ tab_first = Strict.Nothing,+ tab_count = 0,+ last_tk = Strict.Nothing,+ prev_loc = mkPsSpan init_loc init_loc,+ last_loc = mkPsSpan init_loc init_loc,+ last_len = 0,+ loc = init_loc,+ context = [],+ lex_state = [bol, 0],+ srcfiles = [],+ alr_pending_implicit_tokens = [],+ alr_next_token = Nothing,+ alr_last_loc = PsSpan (alrInitialLoc (fsLit "<no file>")) (BufSpan (BufPos 0) (BufPos 0)),+ alr_context = [],+ alr_expecting_ocurly = Nothing,+ alr_justClosedExplicitLetBlock = False,+ eof_pos = Strict.Nothing,+ header_comments = Strict.Nothing,+ comment_q = [],+ hdk_comments = nilOL+ }+ where init_loc = PsLoc loc (BufPos 0)++-- | An mtl-style class for monads that support parsing-related operations.+-- For example, sometimes we make a second pass over the parsing results to validate,+-- disambiguate, or rearrange them, and we do so in the PV monad which cannot consume+-- input but can report parsing errors, check for extension bits, and accumulate+-- parsing annotations. Both P and PV are instances of MonadP.+--+-- MonadP grants us convenient overloading. The other option is to have separate operations+-- for each monad: addErrorP vs addErrorPV, getBitP vs getBitPV, and so on.+--+class Monad m => MonadP m where+ -- | Add a non-fatal error. Use this when the parser can produce a result+ -- despite the error.+ --+ -- For example, when GHC encounters a @forall@ in a type,+ -- but @-XExplicitForAll@ is disabled, the parser constructs @ForAllTy@+ -- as if @-XExplicitForAll@ was enabled, adding a non-fatal error to+ -- the accumulator.+ --+ -- Control flow wise, non-fatal errors act like warnings: they are added+ -- to the accumulator and parsing continues. This allows GHC to report+ -- more than one parse error per file.+ --+ addError :: MsgEnvelope PsMessage -> m ()++ -- | Add a warning to the accumulator.+ -- Use 'getPsMessages' to get the accumulated warnings.+ addWarning :: MsgEnvelope PsMessage -> m ()++ -- | Add a fatal error. This will be the last error reported by the parser, and+ -- the parser will not produce any result, ending in a 'PFailed' state.+ addFatalError :: MsgEnvelope PsMessage -> m a++ -- | Check if a given flag is currently set in the bitmap.+ getBit :: ExtBits -> m Bool+ -- | Go through the @comment_q@ in @PState@ and remove all comments+ -- that belong within the given span+ allocateCommentsP :: RealSrcSpan -> m EpAnnComments+ -- | Go through the @comment_q@ in @PState@ and remove all comments+ -- that come before or within the given span+ allocatePriorCommentsP :: RealSrcSpan -> m EpAnnComments+ -- | Go through the @comment_q@ in @PState@ and remove all comments+ -- that come after the given span+ allocateFinalCommentsP :: RealSrcSpan -> m EpAnnComments++instance MonadP P where+ addError err+ = P $ \s -> POk s { errors = err `addMessage` errors s} ()++ -- If the warning is meant to be suppressed, GHC will assign+ -- a `SevIgnore` severity and the message will be discarded,+ -- so we can simply add it no matter what.+ addWarning w+ = P $ \s -> POk (s { warnings = w `addMessage` warnings s }) ()++ addFatalError err =+ addError err >> P PFailed++ getBit ext = P $ \s -> let b = ext `xtest` pExtsBitmap (options s)+ in b `seq` POk s b+ allocateCommentsP ss = P $ \s ->+ let (comment_q', newAnns) = allocateComments ss (comment_q s) in+ POk s {+ comment_q = comment_q'+ } (EpaComments newAnns)+ allocatePriorCommentsP ss = P $ \s ->+ let (header_comments', comment_q', newAnns)+ = allocatePriorComments ss (comment_q s) (header_comments s) in+ POk s {+ header_comments = header_comments',+ comment_q = comment_q'+ } (EpaComments newAnns)+ allocateFinalCommentsP ss = P $ \s ->+ let (header_comments', comment_q', newAnns)+ = allocateFinalComments ss (comment_q s) (header_comments s) in+ POk s {+ header_comments = header_comments',+ comment_q = comment_q'+ } (EpaCommentsBalanced (Strict.fromMaybe [] header_comments') newAnns)++getCommentsFor :: (MonadP m) => SrcSpan -> m EpAnnComments+getCommentsFor (RealSrcSpan l _) = allocateCommentsP l+getCommentsFor _ = return emptyComments++getPriorCommentsFor :: (MonadP m) => SrcSpan -> m EpAnnComments+getPriorCommentsFor (RealSrcSpan l _) = allocatePriorCommentsP l+getPriorCommentsFor _ = return emptyComments++getFinalCommentsFor :: (MonadP m) => SrcSpan -> m EpAnnComments+getFinalCommentsFor (RealSrcSpan l _) = allocateFinalCommentsP l+getFinalCommentsFor _ = return emptyComments++getEofPos :: P (Strict.Maybe (Strict.Pair RealSrcSpan RealSrcSpan))+getEofPos = P $ \s@(PState { eof_pos = pos }) -> POk s pos++addPsMessage :: SrcSpan -> PsMessage -> P ()+addPsMessage srcspan msg = do+ diag_opts <- (pDiagOpts . options) <$> getPState+ addWarning (mkPlainMsgEnvelope diag_opts srcspan msg)++addTabWarning :: RealSrcSpan -> P ()+addTabWarning srcspan+ = P $ \s@PState{tab_first=tf, tab_count=tc, options=o} ->+ let tf' = tf <|> Strict.Just srcspan+ tc' = tc + 1+ s' = if warnopt Opt_WarnTabs o+ then s{tab_first = tf', tab_count = tc'}+ else s+ in POk s' ()++-- | Get a bag of the errors that have been accumulated so far.+-- Does not take -Werror into account.+getPsErrorMessages :: PState -> Messages PsMessage+getPsErrorMessages p = errors p++-- | Get the warnings and errors accumulated so far.+-- Does not take -Werror into account.+getPsMessages :: PState -> (Messages PsMessage, Messages PsMessage)+getPsMessages p =+ let ws = warnings p+ diag_opts = pDiagOpts (options p)+ -- we add the tabulation warning on the fly because+ -- we count the number of occurrences of tab characters+ ws' = case tab_first p of+ Strict.Nothing -> ws+ Strict.Just tf ->+ let msg = mkPlainMsgEnvelope diag_opts+ (RealSrcSpan tf Strict.Nothing)+ (PsWarnTab (tab_count p))+ in msg `addMessage` ws+ in (ws', errors p)++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 } ()+ [] ->+ unP (addFatalError $ srcParseErr o buf len (mkSrcSpanPs last_loc)) s++-- 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 (psRealSpan 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 (psRealSpan 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+ :: ParserOpts+ -> StringBuffer -- current buffer (placed just after the last token)+ -> Int -- length of the previous token+ -> SrcSpan+ -> MsgEnvelope PsMessage+srcParseErr options buf len loc = mkPlainErrorMsgEnvelope loc (PsErrParse token details)+ where+ token = lexemeToString (offsetBytes (-len) buf) len+ pattern_ = decodePrevNChars 8 buf+ last100 = decodePrevNChars 100 buf+ doInLast100 = "do" `isInfixOf` last100+ mdoInLast100 = "mdo" `isInfixOf` last100+ th_enabled = ThQuotesBit `xtest` pExtsBitmap options+ ps_enabled = PatternSynonymsBit `xtest` pExtsBitmap options+ details = PsErrParseDetails {+ ped_th_enabled = th_enabled+ , ped_do_in_last_100 = doInLast100+ , ped_mdo_in_last_100 = mdoInLast100+ , ped_pat_syn_enabled = ps_enabled+ , ped_pattern_parsed = pattern_ == "pattern "+ }++-- 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 } ->+ unP (addFatalError $ srcParseErr o buf len (mkSrcSpanPs last_loc)) s++-- A lexical error is reported at a particular position in the source file,+-- not over a token range.+lexError :: LexErr -> P a+lexError e = do+ loc <- getRealSrcLoc+ (AI end buf) <- getInput+ reportLexError loc (psRealLoc end) buf+ (\k srcLoc -> mkPlainErrorMsgEnvelope srcLoc $ PsErrLexer e k)++-- -----------------------------------------------------------------------------+-- This is the top-level function: called from the parser each time a+-- new token is to be read from the input.++lexer, lexerDbg :: Bool -> (Located Token -> P a) -> P a++lexer queueComments cont = do+ alr <- getBit AlternativeLayoutRuleBit+ let lexTokenFun = if alr then lexTokenAlr else lexToken+ (L span tok) <- lexTokenFun+ --trace ("token: " ++ show tok) $ do++ if (queueComments && isComment tok)+ then queueComment (L (psRealSpan span) tok) >> lexer queueComments cont+ else cont (L (mkSrcSpanPs span) tok)++-- Use this instead of 'lexer' in GHC.Parser to dump the tokens for debugging.+lexerDbg queueComments cont = lexer queueComments contDbg+ where+ contDbg tok = trace ("token: " ++ show (unLoc tok)) (cont tok)++lexTokenAlr :: P (PsLocated 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)+ ITlcase -> setAlrExpectingOCurly (Just ALRLayoutOf)+ ITlcases -> setAlrExpectingOCurly (Just ALRLayoutOf)+ ITdo _ -> setAlrExpectingOCurly (Just ALRLayoutDo)+ ITmdo _ -> setAlrExpectingOCurly (Just ALRLayoutDo)+ ITrec -> setAlrExpectingOCurly (Just ALRLayoutDo)+ _ -> return ()+ return t++alternativeLayoutRuleToken :: PsLocated Token -> P (PsLocated Token)+alternativeLayoutRuleToken t+ = do context <- getALRContext+ lastLoc <- getAlrLastLoc+ mExpectingOCurly <- getAlrExpectingOCurly+ transitional <- getBit ALRTransitionalBit+ justClosedExplicitLetBlock <- getJustClosedExplicitLetBlock+ setJustClosedExplicitLetBlock False+ let thisLoc = getLoc t+ thisCol = srcSpanStartCol (psRealSpan thisLoc)+ newLine = srcSpanStartLine (psRealSpan thisLoc) > srcSpanEndLine (psRealSpan 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 ITvocurly)+ | otherwise ->+ do setAlrExpectingOCurly Nothing+ setPendingImplicitTokens [L lastLoc ITvccurly]+ setNextToken t+ return (L lastLoc ITvocurly)+ (_, _, Just expectingOCurly) ->+ do setAlrExpectingOCurly Nothing+ setALRContext (ALRLayout expectingOCurly thisCol : context)+ setNextToken t+ return (L thisLoc ITvocurly)+ -- 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 ITvccurly)+ (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 ITvccurly)+ -- This next case is to handle a transitional issue:+ (ITwhere, ALRLayout _ col : ls, _)+ | newLine && thisCol == col && transitional ->+ do addPsMessage+ (mkSrcSpanPs thisLoc)+ (PsWarnTransitionalLayout TransLayout_Where)+ setALRContext ls+ setNextToken t+ -- Note that we use lastLoc, as we may need to close+ -- more layouts, or give a semicolon+ return (L lastLoc ITvccurly)+ -- This next case is to handle a transitional issue:+ (ITvbar, ALRLayout _ col : ls, _)+ | newLine && thisCol == col && transitional ->+ do addPsMessage+ (mkSrcSpanPs thisLoc)+ (PsWarnTransitionalLayout TransLayout_Pipe)+ setALRContext ls+ setNextToken t+ -- Note that we use lastLoc, as we may need to close+ -- more layouts, or give a semicolon+ return (L lastLoc ITvccurly)+ (_, ALRLayout _ col : ls, _)+ | newLine && thisCol == col ->+ do setNextToken t+ let loc = psSpanStart thisLoc+ zeroWidthLoc = mkPsSpan loc loc+ return (L zeroWidthLoc 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 ITvccurly)+ -- 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 ITvccurly)+ 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 ITvccurly)+ (ITin, ALRLayout _ _ : ls, _) ->+ do setALRContext ls+ setNextToken t+ return (L thisLoc ITvccurly)+ -- the other ITin case omitted; general case below covers it+ (ITcomma, ALRLayout _ _ : ls, _)+ | topNoLayoutContainsCommas ls ->+ do setALRContext ls+ setNextToken t+ return (L thisLoc ITvccurly)+ (ITwhere, ALRLayout ALRLayoutDo _ : ls, _) ->+ do setALRContext ls+ setPendingImplicitTokens [t]+ return (L thisLoc ITvccurly)+ -- the other ITwhere case omitted; general case below covers it+ (_, _, _) -> return t++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 _ = 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 (PsLocated Token)+lexToken = do+ inp@(AI loc1 buf) <- getInput+ sc <- getLexState+ exts <- getExts+ case alexScanUser exts inp sc of+ AlexEOF -> do+ let span = mkPsSpan loc1 loc1+ lc <- getLastLocIncludingComments+ setEofPos (psRealSpan span) (psRealSpan lc)+ setLastToken span 0+ return (L span ITeof)+ AlexError (AI loc2 buf) ->+ reportLexError (psRealLoc loc1) (psRealLoc loc2) buf+ (\k srcLoc -> mkPlainErrorMsgEnvelope srcLoc $ PsErrLexer LexError k)+ AlexSkip inp2 _ -> do+ setInput inp2+ lexToken+ AlexToken inp2@(AI end buf2) _ t -> do+ setInput inp2+ let span = mkPsSpan loc1 end+ let bytes = byteDiff buf buf2+ span `seq` setLastToken span bytes+ lt <- t span buf bytes buf2+ let lt' = unLoc lt+ if (isComment lt') then setLastComment lt else setLastTk lt+ return lt++reportLexError :: RealSrcLoc+ -> RealSrcLoc+ -> StringBuffer+ -> (LexErrKind -> SrcSpan -> MsgEnvelope PsMessage)+ -> P a+reportLexError loc1 loc2 buf f+ | atEnd buf = failLocMsgP loc1 loc2 (f LexErrKind_EOF)+ | otherwise =+ let c = fst (nextChar buf)+ in if c == '\0' -- decoding errors are mapped to '\0', see utf8DecodeChar#+ then failLocMsgP loc2 loc2 (f LexErrKind_UTF8)+ else failLocMsgP loc1 loc2 (f (LexErrKind_Char c))++lexTokenStream :: ParserOpts -> StringBuffer -> RealSrcLoc -> ParseResult [Located Token]+lexTokenStream opts buf loc = unP go initState{ options = opts' }+ where+ new_exts = xunset UsePosPragsBit -- parse LINE/COLUMN pragmas as tokens+ $ xset RawTokenStreamBit -- include comments+ $ pExtsBitmap opts+ opts' = opts { pExtsBitmap = new_exts }+ initState = initParserState opts' buf loc+ 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_comment ITdocOptions),+ ("language", token ITlanguage_prag),+ ("include", lex_string_prag ITinclude_prag)])++ignoredPrags = Map.fromList (map ignored pragmas)+ where ignored opt = (opt, nested_comment)+ 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",+ fstrtoken (\s -> (ITinline_prag (SourceText s) (Inline (SourceText s)) FunLike))),+ ("inlinable",+ fstrtoken (\s -> (ITinline_prag (SourceText s) (Inlinable (SourceText s)) FunLike))),+ ("inlineable",+ fstrtoken (\s -> (ITinline_prag (SourceText s) (Inlinable (SourceText s)) FunLike))),+ -- Spelling variant+ ("notinline",+ fstrtoken (\s -> (ITinline_prag (SourceText s) (NoInline (SourceText s)) FunLike))),+ ("opaque", fstrtoken (\s -> ITopaque_prag (SourceText s))),+ ("specialize", fstrtoken (\s -> ITspec_prag (SourceText s))),+ ("source", fstrtoken (\s -> ITsource_prag (SourceText s))),+ ("warning", fstrtoken (\s -> ITwarning_prag (SourceText s))),+ ("deprecated", fstrtoken (\s -> ITdeprecated_prag (SourceText s))),+ ("scc", fstrtoken (\s -> ITscc_prag (SourceText s))),+ ("unpack", fstrtoken (\s -> ITunpack_prag (SourceText s))),+ ("nounpack", fstrtoken (\s -> ITnounpack_prag (SourceText s))),+ ("ann", fstrtoken (\s -> ITann_prag (SourceText s))),+ ("minimal", fstrtoken (\s -> ITminimal_prag (SourceText s))),+ ("overlaps", fstrtoken (\s -> IToverlaps_prag (SourceText s))),+ ("overlappable", fstrtoken (\s -> IToverlappable_prag (SourceText s))),+ ("overlapping", fstrtoken (\s -> IToverlapping_prag (SourceText s))),+ ("incoherent", fstrtoken (\s -> ITincoherent_prag (SourceText s))),+ ("ctype", fstrtoken (\s -> ITctype (SourceText s))),+ ("complete", fstrtoken (\s -> ITcomplete_prag (SourceText s))),+ ("column", columnPrag)+ ]++twoWordPrags = Map.fromList [+ ("inline conlike",+ fstrtoken (\s -> (ITinline_prag (SourceText s) (Inline (SourceText s)) ConLike))),+ ("notinline conlike",+ fstrtoken (\s -> (ITinline_prag (SourceText s) (NoInline (SourceText s)) ConLike))),+ ("specialize inline",+ fstrtoken (\s -> (ITspec_inline_prag (SourceText s) True))),+ ("specialize notinline",+ fstrtoken (\s -> (ITspec_inline_prag (SourceText s) False)))+ ]++dispatch_pragmas :: Map String Action -> Action+dispatch_pragmas prags span buf len buf2 =+ case Map.lookup (clean_pragma (lexemeToString buf len)) prags of+ Just found -> found span buf len buf2+ Nothing -> lexError LexUnknownPragma++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))++warn_unknown_prag :: Map String Action -> Action+warn_unknown_prag prags span buf len buf2 = do+ let uppercase = map toUpper+ unknown_prag = uppercase (clean_pragma (lexemeToString buf len))+ suggestions = map uppercase (Map.keys prags)+ addPsMessage (RealSrcSpan (psRealSpan span) Strict.Nothing) $+ PsWarnUnrecognisedPragma unknown_prag suggestions+ nested_comment span buf len buf2++{-+%************************************************************************+%* *+ Helper functions for generating annotations in the parser+%* *+%************************************************************************+-}+++-- |Given a 'RealSrcSpan' that surrounds a 'HsPar' or 'HsParTy', generate+-- 'AddEpAnn' values for the opening and closing bordering on the start+-- and end of the span+mkParensEpAnn :: RealSrcSpan -> (AddEpAnn, AddEpAnn)+mkParensEpAnn ss = (AddEpAnn AnnOpenP (EpaSpan lo Strict.Nothing),AddEpAnn AnnCloseP (EpaSpan lc Strict.Nothing))+ where+ f = srcSpanFile ss+ sl = srcSpanStartLine ss+ sc = srcSpanStartCol ss+ el = srcSpanEndLine ss+ ec = srcSpanEndCol ss+ lo = mkRealSrcSpan (realSrcSpanStart ss) (mkRealSrcLoc f sl (sc+1))+ lc = mkRealSrcSpan (mkRealSrcLoc f el (ec - 1)) (realSrcSpanEnd ss)++queueComment :: RealLocated Token -> P()+queueComment c = P $ \s -> POk s {+ comment_q = commentToAnnotation c : comment_q s+ } ()++allocateComments+ :: RealSrcSpan+ -> [LEpaComment]+ -> ([LEpaComment], [LEpaComment])+allocateComments ss comment_q =+ let+ (before,rest) = break (\(L l _) -> isRealSubspanOf (anchor l) ss) comment_q+ (middle,after) = break (\(L l _) -> not (isRealSubspanOf (anchor l) ss)) rest+ comment_q' = before ++ after+ newAnns = middle+ in+ (comment_q', reverse newAnns)++-- Comments appearing without a line-break before the first+-- declaration are associated with the declaration+splitPriorComments+ :: RealSrcSpan+ -> [LEpaComment]+ -> ([LEpaComment], [LEpaComment])+splitPriorComments ss prior_comments =+ let+ -- True if there is only one line between the earlier and later span,+ -- And the token preceding the comment is on a different line+ cmp :: RealSrcSpan -> LEpaComment -> Bool+ cmp later (L l c)+ = srcSpanStartLine later - srcSpanEndLine (anchor l) == 1+ && srcSpanEndLine (ac_prior_tok c) /= srcSpanStartLine (anchor l)++ go :: [LEpaComment] -> RealSrcSpan -> [LEpaComment]+ -> ([LEpaComment], [LEpaComment])+ go decl_comments _ [] = ([],decl_comments)+ go decl_comments r (c@(L l _):cs) = if cmp r c+ then go (c:decl_comments) (anchor l) cs+ else (reverse (c:cs), decl_comments)+ in+ go [] ss prior_comments++allocatePriorComments+ :: RealSrcSpan+ -> [LEpaComment]+ -> Strict.Maybe [LEpaComment]+ -> (Strict.Maybe [LEpaComment], [LEpaComment], [LEpaComment])+allocatePriorComments ss comment_q mheader_comments =+ let+ cmp (L l _) = anchor l <= ss+ (newAnns,after) = partition cmp comment_q+ comment_q'= after+ (prior_comments, decl_comments) = splitPriorComments ss newAnns+ in+ case mheader_comments of+ Strict.Nothing -> (Strict.Just prior_comments, comment_q', decl_comments)+ Strict.Just _ -> (mheader_comments, comment_q', reverse newAnns)++allocateFinalComments+ :: RealSrcSpan+ -> [LEpaComment]+ -> Strict.Maybe [LEpaComment]+ -> (Strict.Maybe [LEpaComment], [LEpaComment], [LEpaComment])+allocateFinalComments _ss comment_q mheader_comments =+ -- We ignore the RealSrcSpan as the parser currently provides a+ -- point span at (1,1).+ case mheader_comments of+ Strict.Nothing -> (Strict.Just (reverse comment_q), [], [])+ Strict.Just _ -> (mheader_comments, [], reverse comment_q)++commentToAnnotation :: RealLocated Token -> LEpaComment+commentToAnnotation (L l (ITdocComment s ll)) = mkLEpaComment l ll (EpaDocComment s)+commentToAnnotation (L l (ITdocOptions s ll)) = mkLEpaComment l ll (EpaDocOptions s)+commentToAnnotation (L l (ITlineComment s ll)) = mkLEpaComment l ll (EpaLineComment s)+commentToAnnotation (L l (ITblockComment s ll)) = mkLEpaComment l ll (EpaBlockComment s)+commentToAnnotation _ = panic "commentToAnnotation"++-- see Note [PsSpan in Comments]+mkLEpaComment :: RealSrcSpan -> PsSpan -> EpaCommentTok -> LEpaComment+mkLEpaComment l ll tok = L (realSpanAsAnchor l) (EpaComment tok (psRealSpan ll))++-- ---------------------------------------------------------------------++isComment :: Token -> Bool+isComment (ITlineComment _ _) = True+isComment (ITblockComment _ _) = True+isComment (ITdocComment _ _) = True+isComment (ITdocOptions _ _) = True+isComment _ = False++bol,column_prag,layout,layout_do,layout_if,layout_left,line_prag1,line_prag1a,line_prag2,line_prag2a,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_prag2 = 9+line_prag2a = 10+option_prags = 11+alex_action_1 = warnTab+alex_action_2 = nested_comment+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_9 = smart_quote_error+alex_action_11 = begin line_prag1+alex_action_12 = begin line_prag1+alex_action_16 = do_bol+alex_action_17 = hopefully_open_brace+alex_action_19 = begin line_prag1+alex_action_20 = new_layout_context True dontGenerateSemic ITvbar+alex_action_21 = pop+alex_action_22 = new_layout_context True generateSemic ITvocurly+alex_action_23 = new_layout_context False generateSemic ITvocurly+alex_action_24 = do_layout_left+alex_action_25 = begin bol+alex_action_26 = dispatch_pragmas linePrags+alex_action_27 = setLineAndFile line_prag1a+alex_action_28 = failLinePrag1+alex_action_29 = popLinePrag1+alex_action_30 = setLineAndFile line_prag2a+alex_action_31 = pop+alex_action_32 = setColumn+alex_action_33 = dispatch_pragmas twoWordPrags+alex_action_34 = dispatch_pragmas oneWordPrags+alex_action_35 = dispatch_pragmas ignoredPrags+alex_action_36 = endPrag+alex_action_37 = dispatch_pragmas fileHeaderPrags+alex_action_38 = nested_comment+alex_action_39 = warn_unknown_prag (Map.unions [ oneWordPrags, fileHeaderPrags, ignoredPrags, linePrags ])+alex_action_40 = warn_unknown_prag Map.empty+alex_action_41 = multiline_doc_comment+alex_action_42 = nested_doc_comment+alex_action_43 = token (ITopenExpQuote NoE NormalSyntax)+alex_action_44 = token (ITopenTExpQuote NoE)+alex_action_45 = token (ITcloseQuote NormalSyntax)+alex_action_46 = token ITcloseTExpQuote+alex_action_47 = token (ITopenExpQuote HasE NormalSyntax)+alex_action_48 = token (ITopenTExpQuote HasE)+alex_action_49 = token ITopenPatQuote+alex_action_50 = layout_token ITopenDecQuote+alex_action_51 = token ITopenTypQuote+alex_action_52 = lex_quasiquote_tok+alex_action_53 = lex_qquasiquote_tok+alex_action_54 = token (ITopenExpQuote NoE UnicodeSyntax)+alex_action_55 = token (ITcloseQuote UnicodeSyntax)+alex_action_56 = special (IToparenbar NormalSyntax)+alex_action_57 = special (ITcparenbar NormalSyntax)+alex_action_58 = special (IToparenbar UnicodeSyntax)+alex_action_59 = special (ITcparenbar UnicodeSyntax)+alex_action_60 = skip_one_varid ITdupipvarid+alex_action_61 = skip_one_varid_src ITlabelvarid+alex_action_62 = lex_quoted_label+alex_action_63 = token IToubxparen+alex_action_64 = token ITcubxparen+alex_action_65 = special IToparen+alex_action_66 = special ITcparen+alex_action_67 = special ITobrack+alex_action_68 = special ITcbrack+alex_action_69 = special ITcomma+alex_action_70 = special ITsemi+alex_action_71 = special ITbackquote+alex_action_72 = open_brace+alex_action_73 = close_brace+alex_action_74 = qdo_token ITdo+alex_action_75 = qdo_token ITmdo+alex_action_76 = idtoken qvarid+alex_action_77 = idtoken qconid+alex_action_78 = varid+alex_action_79 = idtoken conid+alex_action_80 = idtoken qvarid+alex_action_81 = idtoken qconid+alex_action_82 = varid+alex_action_83 = idtoken conid+alex_action_84 = idtoken qvarsym+alex_action_85 = idtoken qconsym+alex_action_86 = with_op_ws varsym+alex_action_87 = with_op_ws consym+alex_action_88 = tok_num positive 0 0 decimal+alex_action_89 = tok_num positive 2 2 binary+alex_action_90 = tok_num positive 2 2 octal+alex_action_91 = tok_num positive 2 2 hexadecimal+alex_action_92 = tok_num negative 1 1 decimal+alex_action_93 = tok_num negative 3 3 binary+alex_action_94 = tok_num negative 3 3 octal+alex_action_95 = tok_num negative 3 3 hexadecimal+alex_action_96 = tok_frac 0 tok_float+alex_action_97 = tok_frac 0 tok_float+alex_action_98 = tok_frac 0 tok_hex_float+alex_action_99 = tok_frac 0 tok_hex_float+alex_action_100 = tok_primint positive 0 1 decimal+alex_action_101 = tok_primint positive 2 3 binary+alex_action_102 = tok_primint positive 2 3 octal+alex_action_103 = tok_primint positive 2 3 hexadecimal+alex_action_104 = tok_primint negative 1 2 decimal+alex_action_105 = tok_primint negative 3 4 binary+alex_action_106 = tok_primint negative 3 4 octal+alex_action_107 = tok_primint negative 3 4 hexadecimal+alex_action_108 = tok_primword 0 2 decimal+alex_action_109 = tok_primword 2 4 binary+alex_action_110 = tok_primword 2 4 octal+alex_action_111 = tok_primword 2 4 hexadecimal+alex_action_112 = tok_frac 1 tok_primfloat+alex_action_113 = tok_frac 2 tok_primdouble+alex_action_114 = tok_frac 1 tok_primfloat+alex_action_115 = tok_frac 2 tok_primdouble+alex_action_116 = tok_primint8 positive 0 decimal+alex_action_117 = tok_primint8 positive 2 binary+alex_action_118 = tok_primint8 positive 2 octal+alex_action_119 = tok_primint8 positive 2 hexadecimal+alex_action_120 = tok_primint8 negative 1 decimal+alex_action_121 = tok_primint8 negative 3 binary+alex_action_122 = tok_primint8 negative 3 octal+alex_action_123 = tok_primint8 negative 3 hexadecimal+alex_action_124 = tok_primint16 positive 0 decimal+alex_action_125 = tok_primint16 positive 2 binary+alex_action_126 = tok_primint16 positive 2 octal+alex_action_127 = tok_primint16 positive 2 hexadecimal+alex_action_128 = tok_primint16 negative 1 decimal+alex_action_129 = tok_primint16 negative 3 binary+alex_action_130 = tok_primint16 negative 3 octal+alex_action_131 = tok_primint16 negative 3 hexadecimal+alex_action_132 = tok_primint32 positive 0 decimal+alex_action_133 = tok_primint32 positive 2 binary+alex_action_134 = tok_primint32 positive 2 octal+alex_action_135 = tok_primint32 positive 2 hexadecimal+alex_action_136 = tok_primint32 negative 1 decimal+alex_action_137 = tok_primint32 negative 3 binary+alex_action_138 = tok_primint32 negative 3 octal+alex_action_139 = tok_primint32 negative 3 hexadecimal+alex_action_140 = tok_primint64 positive 0 decimal+alex_action_141 = tok_primint64 positive 2 binary+alex_action_142 = tok_primint64 positive 2 octal+alex_action_143 = tok_primint64 positive 2 hexadecimal+alex_action_144 = tok_primint64 negative 1 decimal+alex_action_145 = tok_primint64 negative 3 binary+alex_action_146 = tok_primint64 negative 3 octal+alex_action_147 = tok_primint64 negative 3 hexadecimal+alex_action_148 = tok_primint positive 0 4 decimal+alex_action_149 = tok_primint positive 2 6 binary+alex_action_150 = tok_primint positive 2 6 octal+alex_action_151 = tok_primint positive 2 6 hexadecimal+alex_action_152 = tok_primint negative 1 5 decimal+alex_action_153 = tok_primint negative 3 7 binary+alex_action_154 = tok_primint negative 3 7 octal+alex_action_155 = tok_primint negative 3 7 hexadecimal+alex_action_156 = tok_primword8 0 decimal+alex_action_157 = tok_primword8 2 binary+alex_action_158 = tok_primword8 2 octal+alex_action_159 = tok_primword8 2 hexadecimal+alex_action_160 = tok_primword16 0 decimal+alex_action_161 = tok_primword16 2 binary+alex_action_162 = tok_primword16 2 octal+alex_action_163 = tok_primword16 2 hexadecimal+alex_action_164 = tok_primword32 0 decimal+alex_action_165 = tok_primword32 2 binary+alex_action_166 = tok_primword32 2 octal+alex_action_167 = tok_primword32 2 hexadecimal+alex_action_168 = tok_primword64 0 decimal+alex_action_169 = tok_primword64 2 binary+alex_action_170 = tok_primword64 2 octal+alex_action_171 = tok_primword64 2 hexadecimal+alex_action_172 = tok_primword 0 5 decimal+alex_action_173 = tok_primword 2 7 binary+alex_action_174 = tok_primword 2 7 octal+alex_action_175 = tok_primword 2 7 hexadecimal+alex_action_176 = lex_char_tok+alex_action_177 = lex_string_tok #define ALEX_GHC 1 #define ALEX_LATIN1 1
GHC/Parser/PostProcess.hs view
@@ -153,6 +153,7 @@ import Data.List ( findIndex ) import Data.Foldable import qualified Data.Semigroup as Semi+import GHC.Unit.Module.Warnings import GHC.Utils.Panic import GHC.Utils.Panic.Plain import qualified GHC.Data.Strict as Strict@@ -890,42 +891,52 @@ = do { tvs <- mapM check tparms ; return (mkHsQTvs tvs) } where- check (HsTypeArg _ ki@(L loc _)) = addFatalError $ mkPlainErrorMsgEnvelope (locA loc) $- (PsErrUnexpectedTypeAppInDecl ki pp_what (unLoc tc))- check (HsValArg ty) = chkParens [] [] emptyComments ty+ check (HsTypeArg at ki) = chkParens [] [] emptyComments (HsBndrInvisible at) ki+ check (HsValArg ty) = chkParens [] [] emptyComments HsBndrRequired ty check (HsArgPar sp) = addFatalError $ mkPlainErrorMsgEnvelope sp $ (PsErrMalformedDecl pp_what (unLoc tc)) -- Keep around an action for adjusting the annotations of extra parens- chkParens :: [AddEpAnn] -> [AddEpAnn] -> EpAnnComments -> LHsType GhcPs- -> P (LHsTyVarBndr () GhcPs)- chkParens ops cps cs (L l (HsParTy an ty))+ chkParens :: [AddEpAnn] -> [AddEpAnn] -> EpAnnComments -> HsBndrVis GhcPs -> LHsType GhcPs+ -> P (LHsTyVarBndr (HsBndrVis GhcPs) GhcPs)+ chkParens ops cps cs bvis (L l (HsParTy an ty)) = let (o,c) = mkParensEpAnn (realSrcSpan $ locA l) in- chkParens (o:ops) (c:cps) (cs Semi.<> epAnnComments an) ty- chkParens ops cps cs ty = chk ops cps cs ty+ chkParens (o:ops) (c:cps) (cs Semi.<> epAnnComments an) bvis ty+ chkParens ops cps cs bvis ty = chk ops cps cs bvis ty -- Check that the name space is correct!- chk :: [AddEpAnn] -> [AddEpAnn] -> EpAnnComments -> LHsType GhcPs -> P (LHsTyVarBndr () GhcPs)- chk ops cps cs (L l (HsKindSig annk (L annt (HsTyVar ann _ (L lv tv))) k))+ chk :: [AddEpAnn] -> [AddEpAnn] -> EpAnnComments -> HsBndrVis GhcPs -> LHsType GhcPs -> P (LHsTyVarBndr (HsBndrVis GhcPs) GhcPs)+ chk ops cps cs bvis (L l (HsKindSig annk (L annt (HsTyVar ann _ (L lv tv))) k)) | isRdrTyVar tv = let an = (reverse ops) ++ cps in- return (L (widenLocatedAn (l Semi.<> annt) an)- (KindedTyVar (addAnns (annk Semi.<> ann) an cs) () (L lv tv) k))- chk ops cps cs (L l (HsTyVar ann _ (L ltv tv)))+ return (L (widenLocatedAn (l Semi.<> annt) (for_widening bvis:an))+ (KindedTyVar (addAnns (annk Semi.<> ann Semi.<> for_widening_ann bvis) an cs)+ bvis (L lv tv) k))+ chk ops cps cs bvis (L l (HsTyVar ann _ (L ltv tv))) | isRdrTyVar tv = let an = (reverse ops) ++ cps in- return (L (widenLocatedAn l an)- (UserTyVar (addAnns ann an cs) () (L ltv tv)))- chk _ _ _ t@(L loc _)+ return (L (widenLocatedAn l (for_widening bvis:an))+ (UserTyVar (addAnns (ann Semi.<> for_widening_ann bvis) an cs)+ bvis (L ltv tv)))+ chk _ _ _ _ t@(L loc _) = addFatalError $ mkPlainErrorMsgEnvelope (locA loc) $ (PsErrUnexpectedTypeInDecl t pp_what (unLoc tc) tparms equals_or_where) + -- Return an AddEpAnn for use in widenLocatedAn. The AnnKeywordId is not used.+ for_widening :: HsBndrVis GhcPs -> AddEpAnn+ for_widening (HsBndrInvisible (L (TokenLoc loc) _)) = AddEpAnn AnnAnyclass loc+ for_widening _ = AddEpAnn AnnAnyclass (EpaDelta (SameLine 0) []) + for_widening_ann :: HsBndrVis GhcPs -> EpAnn [AddEpAnn]+ for_widening_ann (HsBndrInvisible (L (TokenLoc (EpaSpan r _mb)) _)) = EpAnn (realSpanAsAnchor r) [] emptyComments+ for_widening_ann _ = EpAnnNotUsed++ whereDots, equalsDots :: SDoc -- Second argument to checkTyVars whereDots = text "where ..."@@ -1020,7 +1031,7 @@ where (o,c) = mkParensEpAnn (realSrcSpan l) go _ (HsAppTy _ t1 t2) acc ops cps fix = goL t1 (HsValArg t2:acc) ops cps fix- go _ (HsAppKindTy l ty ki) acc ops cps fix = goL ty (HsTypeArg l ki:acc) ops cps fix+ go _ (HsAppKindTy _ ty at ki) acc ops cps fix = goL ty (HsTypeArg at ki:acc) ops cps fix go l (HsTupleTy _ HsBoxedOrConstraintTuple ts) [] ops cps fix = return (L (noAnnSrcSpan l) (nameRdrName tup_name) , map HsValArg ts, fix, (reverse ops)++cps)@@ -1817,11 +1828,6 @@ hsHoleExpr :: EpAnn EpAnnUnboundVar -> HsExpr GhcPs hsHoleExpr anns = HsUnboundVar anns (mkRdrUnqual (mkVarOccFS (fsLit "_"))) -type instance Anno (GRHS GhcPs (LocatedA (PatBuilder GhcPs))) = SrcAnn NoEpAnns-type instance Anno [LocatedA (Match GhcPs (LocatedA (PatBuilder GhcPs)))] = SrcSpanAnnL-type instance Anno (Match GhcPs (LocatedA (PatBuilder GhcPs))) = SrcSpanAnnA-type instance Anno (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs))) = SrcSpanAnnA- instance DisambECP (PatBuilder GhcPs) where type Body (PatBuilder GhcPs) = PatBuilder ecpFromCmd' (L l c) = addFatalError $ mkPlainErrorMsgEnvelope (locA l) $ PsErrArrowCmdInPat c@@ -1957,7 +1963,7 @@ -- | Disambiguate @f x@ (function application or prefix data constructor). mkHsAppTyPV :: LocatedA b -> LHsType GhcPs -> PV (LocatedA b) -- | Disambiguate @f \@t@ (visible kind application)- mkHsAppKindTyPV :: LocatedA b -> SrcSpan -> LHsType GhcPs -> PV (LocatedA b)+ mkHsAppKindTyPV :: LocatedA b -> LHsToken "@" GhcPs -> LHsType GhcPs -> PV (LocatedA b) -- | Disambiguate @f \# x@ (infix operator) mkHsOpTyPV :: PromotionFlag -> LHsType GhcPs -> LocatedN RdrName -> LHsType GhcPs -> PV (LocatedA b) -- | Disambiguate @{-\# UNPACK \#-} t@ (unpack/nounpack pragma)@@ -1966,7 +1972,7 @@ instance DisambTD (HsType GhcPs) where mkHsAppTyHeadPV = return mkHsAppTyPV t1 t2 = return (mkHsAppTy t1 t2)- mkHsAppKindTyPV t l_at ki = return (mkHsAppKindTy l_at t ki)+ mkHsAppKindTyPV t at ki = return (mkHsAppKindTy t at ki) mkHsOpTyPV prom t1 op t2 = return (mkLHsOpTy prom t1 op t2) mkUnpackednessPV = addUnpackednessP @@ -2002,8 +2008,8 @@ -- the grammar in Parser.y is written (see infixtype/ftype). panic "mkHsAppTyPV: InfixDataConBuilder" - mkHsAppKindTyPV lhs l_at ki =- addFatalError $ mkPlainErrorMsgEnvelope l_at $+ mkHsAppKindTyPV lhs at ki =+ addFatalError $ mkPlainErrorMsgEnvelope (getTokenSrcSpan (getLoc at)) $ (PsErrUnexpectedKindAppInDataCon (unLoc lhs) (unLoc ki)) mkHsOpTyPV prom lhs tc rhs = do@@ -2528,7 +2534,7 @@ -- overloaded_on) is in effect because it affects the Left/Right nature -- of the RecordUpd value we calculate. let (fs, ps) = partitionEithers fbinds- fs' :: [LHsRecUpdField GhcPs]+ fs' :: [LHsRecUpdField GhcPs GhcPs] fs' = map (fmap mk_rec_upd_field) fs case overloaded_on of False | not $ null ps ->@@ -2539,19 +2545,27 @@ return RecordUpd { rupd_ext = anns , rupd_expr = exp- , rupd_flds = Left fs' }+ , rupd_flds =+ RegularRecUpdFields+ { xRecUpdFields = noExtField+ , recUpdFields = fs' } }+ -- This is a RecordDotSyntax update. True -> do let qualifiedFields = [ L l lbl | L _ (HsFieldBind _ (L l lbl) _ _) <- fs'- , isQual . rdrNameAmbiguousFieldOcc $ lbl+ , isQual . ambiguousFieldOccRdrName $ lbl ] case qualifiedFields of qf:_ -> addFatalError $ mkPlainErrorMsgEnvelope (getLocA qf) $- PsErrOverloadedRecordUpdateNoQualifiedFields- _ -> return RecordUpd -- This is a RecordDotSyntax update.- { rupd_ext = anns- , rupd_expr = exp- , rupd_flds = Right (toProjUpdates fbinds) }+ PsErrOverloadedRecordUpdateNoQualifiedFields+ _ -> return $+ RecordUpd+ { rupd_ext = anns+ , rupd_expr = exp+ , rupd_flds =+ OverloadedRecUpdFields+ { xOLRecUpdFields = noExtField+ , olRecUpdFields = toProjUpdates fbinds } } where toProjUpdates :: [Fbind (HsExpr GhcPs)] -> [LHsRecUpdProj GhcPs] toProjUpdates = map (\case { Right p -> p; Left f -> recFieldToProjUpdate f })@@ -2583,7 +2597,7 @@ mk_rec_fields fs (Just s) = HsRecFields { rec_flds = fs , rec_dotdot = Just (L s (RecFieldsDotDot $ length fs)) } -mk_rec_upd_field :: HsRecField GhcPs (LHsExpr GhcPs) -> HsRecUpdField GhcPs+mk_rec_upd_field :: HsRecField GhcPs (LHsExpr GhcPs) -> HsRecUpdField GhcPs GhcPs mk_rec_upd_field (HsFieldBind noAnn (L loc (FieldOcc _ rdr)) arg pun) = HsFieldBind noAnn (L loc (Unambiguous noExtField rdr)) arg pun @@ -2592,7 +2606,7 @@ -- The (Maybe Activation) is because the user can omit -- the activation spec (and usually does) mkInlinePragma src (inl, match_info) mb_act- = InlinePragma { inl_src = src -- Note [Pragma source text] in GHC.Types.SourceText+ = InlinePragma { inl_src = src -- Note [Pragma source text] in "GHC.Types.SourceText" , inl_inline = inl , inl_sat = Nothing , inl_act = act@@ -2714,7 +2728,8 @@ ((mk Nothing <$> cimp nm) +++ (do h <- munch1 hdr_char skipSpaces- mk (Just (Header (SourceText h) (mkFastString h)))+ let src = mkFastString h+ mk (Just (Header (SourceText src) src)) <$> cimp nm)) ] skipSpaces@@ -2788,18 +2803,20 @@ | ImpExpQcType EpaLocation (LocatedN RdrName) | ImpExpQcWildcard -mkModuleImpExp :: [AddEpAnn] -> LocatedA ImpExpQcSpec -> ImpExpSubSpec -> P (IE GhcPs)-mkModuleImpExp anns (L l specname) subs = do+mkModuleImpExp :: Maybe (LocatedP (WarningTxt GhcPs)) -> [AddEpAnn] -> LocatedA ImpExpQcSpec+ -> ImpExpSubSpec -> P (IE GhcPs)+mkModuleImpExp warning anns (L l specname) subs = do cs <- getCommentsFor (locA l) -- AZ: IEVar can discard comments- let ann = EpAnn (spanAsAnchor $ locA l) anns cs+ let ann = EpAnn (spanAsAnchor $ maybe (locA l) getLocA warning) anns cs case subs of ImpExpAbs | isVarNameSpace (rdrNameSpace name)- -> return $ IEVar noExtField (L l (ieNameFromSpec specname))- | otherwise -> IEThingAbs ann . L l <$> nameT- ImpExpAll -> IEThingAll ann . L l <$> nameT+ -> return $ IEVar warning+ (L l (ieNameFromSpec specname))+ | otherwise -> IEThingAbs (warning, ann) . L l <$> nameT+ ImpExpAll -> IEThingAll (warning, ann) . L l <$> nameT ImpExpList xs ->- (\newName -> IEThingWith ann (L l newName)+ (\newName -> IEThingWith (warning, ann) (L l newName) NoIEWildcard (wrapped xs)) <$> nameT ImpExpAllWith xs -> do allowed <- getBit PatternSynonymsBit@@ -2811,7 +2828,7 @@ ies :: [LocatedA (IEWrappedName GhcPs)] ies = wrapped $ filter (not . isImpExpQcWildcard . unLoc) xs in (\newName- -> IEThingWith ann (L l newName) pos ies)+ -> IEThingWith (warning, ann) (L l newName) pos ies) <$> nameT else addFatalError $ mkPlainErrorMsgEnvelope (locA l) $ PsErrIllegalPatSynExport@@ -3113,7 +3130,7 @@ in L loc (mkHsOpTy prom x op y) mkMultTy :: LHsToken "%" GhcPs -> LHsType GhcPs -> LHsUniToken "->" "→" GhcPs -> HsArrow GhcPs-mkMultTy pct t@(L _ (HsTyLit _ (HsNumTy (SourceText "1") 1))) arr+mkMultTy pct t@(L _ (HsTyLit _ (HsNumTy (SourceText (unpackFS -> "1")) 1))) arr -- See #18888 for the use of (SourceText "1") above = HsLinearArrow (HsPct1 (L locOfPct1 HsTok) arr) where
GHC/Parser/Types.hs view
@@ -61,6 +61,12 @@ | PatBuilderVar (LocatedN RdrName) | PatBuilderOverLit (HsOverLit GhcPs) +-- These instances are here so that they are not orphans+type instance Anno (GRHS GhcPs (LocatedA (PatBuilder GhcPs))) = SrcAnn NoEpAnns+type instance Anno [LocatedA (Match GhcPs (LocatedA (PatBuilder GhcPs)))] = SrcSpanAnnL+type instance Anno (Match GhcPs (LocatedA (PatBuilder GhcPs))) = SrcSpanAnnA+type instance Anno (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs))) = SrcSpanAnnA+ instance Outputable (PatBuilder GhcPs) where ppr (PatBuilderPat p) = ppr p ppr (PatBuilderPar _ (L _ p) _) = parens (ppr p)
GHC/Platform.hs view
@@ -29,6 +29,7 @@ , platformInIntRange , platformInWordRange , platformCConvNeedsExtension+ , platformHasRTSLinker , PlatformMisc(..) , SseVersion (..) , BmiVersion (..)@@ -271,6 +272,23 @@ -- https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms | OSDarwin <- platformOS platform -> True _ -> False++-- | Does this platform have an RTS linker?+platformHasRTSLinker :: Platform -> Bool+-- Note that we've inlined this logic in hadrian's+-- Settings.Builders.RunTest.inTreeCompilerArgs.+-- If you change this, be sure to change it too+platformHasRTSLinker p = case archOS_arch (platformArchOS p) of+ ArchPPC -> False -- powerpc+ ArchPPC_64 ELF_V1 -> False -- powerpc64+ ArchPPC_64 ELF_V2 -> False -- powerpc64le+ ArchS390X -> False+ ArchRISCV64 -> False+ ArchLoongArch64 -> False+ ArchJavaScript -> False+ ArchWasm32 -> False+ _ -> True+ --------------------------------------------------
GHC/Plugins.hs view
@@ -55,6 +55,7 @@ , module GHC.Types.Unique.Supply , module GHC.Data.FastString , module GHC.Tc.Errors.Hole.FitTypes -- for hole-fit plugins+ , module GHC.Tc.Errors.Hole.Plugin -- for hole-fit plugins , module GHC.Unit.Module.ModGuts , module GHC.Unit.Module.ModSummary , module GHC.Unit.Module.ModIface@@ -148,6 +149,7 @@ import GHC.Types.Name.Cache ( NameCache ) import GHC.Tc.Errors.Hole.FitTypes+import GHC.Tc.Errors.Hole.Plugin -- For parse result plugins import GHC.Parser.Errors.Types ( PsWarning, PsError )
GHC/Prelude/Basic.hs view
@@ -2,6 +2,9 @@ {-# OPTIONS_HADDOCK not-home #-} {-# OPTIONS_GHC -O2 #-} -- See Note [-O2 Prelude] +-- See Note [Proxies for head and tail]+{-# OPTIONS_GHC -Wno-unrecognised-warning-flags -Wno-x-partial #-}+ -- | Custom minimal GHC "Prelude" -- -- This module serves as a replacement for the "Prelude" module@@ -19,6 +22,7 @@ ,Applicative (..) ,module Bits ,shiftL, shiftR+ ,head, tail ) where @@ -50,9 +54,11 @@ extensions. -} -import Prelude as X hiding ((<>), Applicative(..))+import qualified Prelude+import Prelude as X hiding ((<>), Applicative(..), head, tail) import Control.Applicative (Applicative(..)) import Data.Foldable as X (foldl')+import GHC.Stack.Types (HasCallStack) #if MIN_VERSION_base(4,16,0) import GHC.Bits as Bits hiding (shiftL, shiftR)@@ -102,3 +108,21 @@ shiftL = Bits.unsafeShiftL shiftR = Bits.unsafeShiftR #endif++{- Note [Proxies for head and tail]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Prelude.head and Prelude.tail have recently acquired {-# WARNING in "x-partial" #-},+but the GHC codebase uses them fairly extensively and insists on building warning-free.+Thus, instead of adding {-# OPTIONS_GHC -Wno-x-partial #-} to every module which+employs them, we define warning-less proxies and export them from GHC.Prelude.+-}++-- See Note [Proxies for head and tail]+head :: HasCallStack => [a] -> a+head = Prelude.head+{-# INLINE head #-}++-- See Note [Proxies for head and tail]+tail :: HasCallStack => [a] -> [a]+tail = Prelude.tail+{-# INLINE tail #-}
GHC/Rename/Bind.hs view
@@ -26,7 +26,10 @@ rnMethodBinds, renameSigs, rnMatchGroup, rnGRHSs, rnGRHS, rnSrcFixityDecl, makeMiniFixityEnv, MiniFixityEnv,- HsSigCtxt(..)+ HsSigCtxt(..),++ -- Utility for hs-boot files+ rejectBootDecls ) where import GHC.Prelude@@ -42,13 +45,13 @@ import GHC.Rename.Env import GHC.Rename.Fixity import GHC.Rename.Utils ( mapFvRn- , checkDupRdrNames, checkDupRdrNamesN+ , checkDupRdrNames , warnUnusedLocalBinds , warnForallIdentifier , checkUnusedRecordWildcard , checkDupAndShadowedNames, bindLocalNamesFV , addNoNestedForallsContextsErr, checkInferredVars )-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Unit.Module import GHC.Types.Error import GHC.Types.FieldLabel@@ -56,6 +59,7 @@ import GHC.Types.Name.Env import GHC.Types.Name.Set import GHC.Types.Name.Reader ( RdrName, rdrNameOcc )+import GHC.Types.SourceFile import GHC.Types.SrcLoc as SrcLoc import GHC.Data.List.SetOps ( findDupsEq ) import GHC.Types.Basic ( RecFlag(..), TypeOrKind(..) )@@ -72,8 +76,7 @@ import Language.Haskell.Syntax.Basic (FieldLabelString(..)) import Control.Monad-import Data.Foldable ( toList )-import Data.List ( partition, sortBy )+import Data.List ( partition ) import Data.List.NonEmpty ( NonEmpty(..) ) {-@@ -200,10 +203,20 @@ = do { topBinds <- rnTopBindsLHS fix_env binds ; case topBinds of ValBinds x mbinds sigs ->- do { mapM_ bindInHsBootFileErr mbinds+ do { rejectBootDecls HsBoot BootBindsPs (bagToList $ mbinds) ; pure (ValBinds x emptyBag sigs) } _ -> pprPanic "rnTopBindsLHSBoot" (ppr topBinds) } +rejectBootDecls :: HsBootOrSig+ -> (NonEmpty (LocatedA decl) -> BadBootDecls)+ -> [LocatedA decl]+ -> TcM ()+rejectBootDecls _ _ [] = return ()+rejectBootDecls hsc_src what (decl@(L loc _) : decls)+ = addErrAt (locA loc)+ $ TcRnIllegalHsBootOrSigDecl hsc_src+ (what $ decl :| decls)+ rnTopBindsBoot :: NameSet -> HsValBindsLR GhcRn GhcPs -> RnM (HsValBinds GhcRn, DefUses) -- A hs-boot file has no bindings.@@ -529,7 +542,7 @@ = do { (bind', name, fvs) <- rnPatSynBind sig_fn bind ; return (PatSynBind x bind', name, fvs) } -rnBind _ b = pprPanic "rnBind" (ppr b)+rnBind _ (VarBind { var_ext = x }) = dataConCantHappen x -- See Note [Pattern bindings that bind no variables] isOkNoBindPattern :: LPat GhcRn -> Bool@@ -690,17 +703,11 @@ Nothing -> return $ extendFsEnv env fs fix_item Just (L loc' _) -> do { setSrcSpan loc $- addErrAt name_loc (dupFixityDecl loc' name)+ addErrAt name_loc (TcRnMultipleFixityDecls loc' name) ; return env} } -dupFixityDecl :: SrcSpan -> RdrName -> TcRnMessage-dupFixityDecl loc rdr_name- = mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [text "Multiple fixity declarations for" <+> quotes (ppr rdr_name),- text "also at " <+> ppr loc] - {- ********************************************************************* * * Pattern synonym bindings@@ -716,7 +723,7 @@ , psb_dir = dir }) -- invariant: no free vars here when it's a FunBind = do { pattern_synonym_ok <- xoptM LangExt.PatternSynonyms- ; unless pattern_synonym_ok (addErr patternSynonymErr)+ ; unless pattern_synonym_ok (addErr TcRnIllegalPatternSynonymDecl) ; let scoped_tvs = sig_fn name ; ((pat', details'), fvs1) <- bindSigTyVarsFV scoped_tvs $@@ -726,7 +733,7 @@ -- from the left-hand side case details of PrefixCon _ vars ->- do { checkDupRdrNamesN vars+ do { checkDupRdrNames vars ; names <- mapM lookupPatSynBndr vars ; return ( (pat', PrefixCon noTypeArgs names) , mkFVs (map unLoc names)) }@@ -785,11 +792,6 @@ -- See Note [Renaming pattern synonym variables] lookupPatSynBndr = wrapLocMA lookupLocalOccRn - patternSynonymErr :: TcRnMessage- patternSynonymErr- = mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Illegal pattern synonym declaration")- 2 (text "Use -XPatternSynonyms to enable this extension") {- Note [Renaming pattern synonym variables]@@ -889,7 +891,7 @@ -- * the default method bindings in a class decl -- * the method bindings in an instance decl rnMethodBinds is_cls_decl cls ktv_names binds sigs- = do { checkDupRdrNamesN (collectMethodBinders binds)+ = do { checkDupRdrNames (collectMethodBinders binds) -- Check that the same method is not given twice in the -- same instance decl instance C T where -- f x = ...@@ -980,18 +982,11 @@ -- Report error for all other forms of bindings -- This is why we use a fold rather than map rnMethodBindLHS is_cls_decl _ (L loc bind) rest- = do { addErrAt (locA loc) $ mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ what <+> text "not allowed in" <+> decl_sort- , nest 2 (ppr bind) ]+ = do { addErrAt (locA loc) $ TcRnIllegalClassBinding decl_sort bind ; return rest } where- decl_sort | is_cls_decl = text "class declaration:"- | otherwise = text "instance declaration:"- what = case bind of- PatBind {} -> text "Pattern bindings (except simple variables)"- PatSynBind {} -> text "Pattern synonyms"- -- Associated pattern synonyms are not implemented yet- _ -> pprPanic "rnMethodBind" (ppr bind)+ decl_sort | is_cls_decl = ClassDeclSort+ | otherwise = InstanceDeclSort {- ************************************************************************@@ -1046,7 +1041,7 @@ renameSig ctxt sig@(ClassOpSig _ is_deflt vs ty) = do { defaultSigs_on <- xoptM LangExt.DefaultSignatures ; when (is_deflt && not defaultSigs_on) $- addErr (defaultSigErr sig)+ addErr (TcRnUnexpectedDefaultSig sig) ; mapM_ warnForallIdentifier vs ; new_v <- mapM (lookupSigOccRnN ctxt sig) vs ; (new_ty, fvs) <- rnHsSigType ty_ctxt TypeLevel ty@@ -1057,18 +1052,17 @@ <+> quotes (ppr v1)) renameSig _ (SpecInstSig (_, src) ty)- = do { checkInferredVars doc inf_msg ty+ = do { checkInferredVars doc ty ; (new_ty, fvs) <- rnHsSigType doc TypeLevel ty -- Check if there are any nested `forall`s or contexts, which are -- illegal in the type of an instance declaration (see -- Note [No nested foralls or contexts in instance types] in -- GHC.Hs.Type).- ; addNoNestedForallsContextsErr doc (text "SPECIALISE instance type")+ ; addNoNestedForallsContextsErr doc NFC_Specialize (getLHsInstDeclHead new_ty) ; return (SpecInstSig (noAnn, src) new_ty,fvs) } where doc = SpecInstSigCtx- inf_msg = Just (text "Inferred type variables are not allowed") -- {-# SPECIALISE #-} pragmas can refer to imported Ids -- so, in the top-level case (when mb_names is Nothing)@@ -1120,16 +1114,11 @@ this_mod <- fmap tcg_mod getGblEnv unless (any (nameIsLocalOrFrom this_mod . unLoc) new_bf) $ -- Why 'any'? See Note [Orphan COMPLETE pragmas]- addErrCtxt (text "In" <+> ppr sig) $ failWithTc orphanError+ addErrCtxt (text "In" <+> ppr sig) $ failWithTc TcRnOrphanCompletePragma return (CompleteMatchSig (noAnn, s) (L l new_bf) new_mty, emptyFVs)- where- orphanError :: TcRnMessage- orphanError = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Orphan COMPLETE pragmas not supported" $$- text "A COMPLETE pragma must mention at least one data constructor" $$- text "or pattern synonym defined in the same module." + {- Note [Orphan COMPLETE pragmas] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1233,7 +1222,7 @@ checkDupMinimalSigs :: [LSig GhcPs] -> RnM () checkDupMinimalSigs sigs = case filter isMinimalLSig sigs of- minSigs@(_:_:_) -> dupMinimalSigErr minSigs+ sig1 : sig2 : otherSigs -> dupMinimalSigErr sig1 sig2 otherSigs _ -> return () {-@@ -1283,7 +1272,7 @@ -> RnM (MatchGroup GhcRn (LocatedA (body GhcRn)), FreeVars) rnMatchGroup ctxt rnBody (MG { mg_alts = L lm ms, mg_ext = origin }) -- see Note [Empty MatchGroups]- = do { whenM ((null ms &&) <$> mustn't_be_empty) (addErr (emptyCaseErr ctxt))+ = do { whenM ((null ms &&) <$> mustn't_be_empty) (addErr (TcRnEmptyCase ctxt)) ; (new_ms, ms_fvs) <- mapFvRn (rnMatch ctxt rnBody) ms ; return (mkMatchGroup origin (L lm new_ms), ms_fvs) } where@@ -1314,30 +1303,7 @@ ; return (Match { m_ext = noAnn, m_ctxt = mf', m_pats = pats' , m_grhss = grhss'}, grhss_fvs ) } -emptyCaseErr :: HsMatchContext GhcRn -> TcRnMessage-emptyCaseErr ctxt = mkTcRnUnknownMessage $ mkPlainError noHints $ message ctxt- where- pp_ctxt :: HsMatchContext GhcRn -> SDoc- pp_ctxt c = case c of- CaseAlt -> text "case expression"- LamCaseAlt LamCase -> text "\\case expression"- ArrowMatchCtxt (ArrowLamCaseAlt LamCase) -> text "\\case command"- ArrowMatchCtxt ArrowCaseAlt -> text "case command"- ArrowMatchCtxt KappaExpr -> text "kappa abstraction"- _ -> text "(unexpected)"- <+> pprMatchContextNoun c - message :: HsMatchContext GhcRn -> SDoc- message (LamCaseAlt LamCases) = lcases_msg <+> text "expression"- message (ArrowMatchCtxt (ArrowLamCaseAlt LamCases)) =- lcases_msg <+> text "command"- message ctxt =- hang (text "Empty list of alternatives in" <+> pp_ctxt ctxt)- 2 (text "Use EmptyCase to allow this")-- lcases_msg =- text "Empty list of alternatives is not allowed in \\cases"- {- ************************************************************************ * *@@ -1373,9 +1339,7 @@ rnBody rhs ; unless (pattern_guards_allowed || is_standard_guard guards') $- let diag = mkTcRnUnknownMessage $- mkPlainDiagnostic WarningWithoutFlag noHints (nonStdGuardErr guards')- in addDiagnostic diag+ addDiagnostic (nonStdGuardErr guards') ; return (GRHS noAnn guards' rhs', fvs) } where@@ -1427,44 +1391,18 @@ -} dupSigDeclErr :: NonEmpty (LocatedN RdrName, Sig GhcPs) -> RnM ()-dupSigDeclErr pairs@((L loc name, sig) :| _)- = addErrAt (locA loc) $ mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ text "Duplicate" <+> what_it_is- <> text "s for" <+> quotes (ppr name)- , text "at" <+> vcat (map ppr $ sortBy SrcLoc.leftmost_smallest- $ map (getLocA . fst)- $ toList pairs)- ]- where- what_it_is = hsSigDoc sig+dupSigDeclErr pairs@((L loc _, _) :| _)+ = addErrAt (locA loc) $ TcRnDuplicateSigDecl pairs misplacedSigErr :: LSig GhcRn -> RnM () misplacedSigErr (L loc sig)- = addErrAt (locA loc) $ mkTcRnUnknownMessage $ mkPlainError noHints $- sep [text "Misplaced" <+> hsSigDoc sig <> colon, ppr sig]--defaultSigErr :: Sig GhcPs -> TcRnMessage-defaultSigErr sig = mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ hang (text "Unexpected default signature:")- 2 (ppr sig)- , text "Use DefaultSignatures to enable default signatures" ]--bindInHsBootFileErr :: LHsBindLR GhcRn GhcPs -> RnM ()-bindInHsBootFileErr (L loc _)- = addErrAt (locA loc) $ mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ text "Bindings in hs-boot files are not allowed" ]+ = addErrAt (locA loc) $ TcRnMisplacedSigDecl sig nonStdGuardErr :: (Outputable body, Anno (Stmt GhcRn body) ~ SrcSpanAnnA)- => [LStmtLR GhcRn GhcRn body] -> SDoc-nonStdGuardErr guards- = hang (text "accepting non-standard pattern guards (use PatternGuards to suppress this message)")- 4 (interpp'SP guards)+ => [LStmtLR GhcRn GhcRn body] -> TcRnMessage+nonStdGuardErr guards = TcRnNonStdGuards (NonStandardGuards guards) -dupMinimalSigErr :: [LSig GhcPs] -> RnM ()-dupMinimalSigErr sigs@(L loc _ : _)- = addErrAt (locA loc) $ mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ text "Multiple minimal complete definitions"- , text "at" <+> vcat (map ppr $ sortBy SrcLoc.leftmost_smallest $ map getLocA sigs)- , text "Combine alternative minimal complete definitions with `|'" ]-dupMinimalSigErr [] = panic "dupMinimalSigErr"+dupMinimalSigErr :: LSig GhcPs -> LSig GhcPs -> [LSig GhcPs] -> RnM ()+dupMinimalSigErr sig1 sig2 otherSigs+ = addErrAt (getLocA sig1) $ TcRnDuplicateMinimalSig sig1 sig2 otherSigs
GHC/Rename/Doc.hs view
@@ -8,8 +8,6 @@ import GHC.Types.Name import GHC.Types.SrcLoc import GHC.Tc.Utils.Monad (getGblEnv)-import GHC.Types.Avail-import GHC.Rename.Env rnLHsDoc :: LHsDoc GhcPs -> RnM (LHsDoc GhcRn) rnLHsDoc = traverse rnHsDoc@@ -37,10 +35,10 @@ pure (WithHsDocIdentifiers s (rnHsDocIdentifiers gre ids)) rnHsDocIdentifiers :: GlobalRdrEnv- -> [Located RdrName]- -> [Located Name]-rnHsDocIdentifiers gre ns = concat- [ map (L l . greNamePrintableName . gre_name) (lookupGRE_RdrName c gre)+ -> [Located RdrName]+ -> [Located Name]+rnHsDocIdentifiers gre_env ns =+ [ L l $ greName gre | L l rdr_name <- ns- , c <- dataTcOccs rdr_name+ , gre <- lookupGRE gre_env (LookupOccName (rdrNameOcc rdr_name) AllRelevantGREs) ]
GHC/Rename/Env.hs view
@@ -1,2095 +1,2394 @@--{-# LANGUAGE NamedFieldPuns #-}-{-# LANGUAGE TypeApplications #-}--{--(c) The GRASP/AQUA Project, Glasgow University, 1992-2006--GHC.Rename.Env contains functions which convert RdrNames into Names.---}--module GHC.Rename.Env (- newTopSrcBinder,-- lookupLocatedTopBndrRn, lookupLocatedTopBndrRnN, lookupTopBndrRn,- lookupLocatedTopConstructorRn, lookupLocatedTopConstructorRnN,-- lookupLocatedOccRn, lookupLocatedOccRnConstr, lookupLocatedOccRnRecField,- lookupLocatedOccRnNone,- lookupOccRn, lookupOccRn_maybe,- lookupLocalOccRn_maybe, lookupInfoOccRn,- lookupLocalOccThLvl_maybe, lookupLocalOccRn,- lookupTypeOccRn,- lookupGlobalOccRn, lookupGlobalOccRn_maybe,-- AmbiguousResult(..),- lookupExprOccRn,- lookupRecFieldOcc,- lookupRecFieldOcc_update,-- ChildLookupResult(..),- lookupSubBndrOcc_helper,- combineChildLookupResult, -- Called by lookupChildrenExport-- HsSigCtxt(..), lookupLocalTcNames, lookupSigOccRn, lookupSigOccRnN,- lookupSigCtxtOccRn, lookupSigCtxtOccRnN,-- lookupInstDeclBndr, lookupFamInstName,- lookupConstructorFields,-- lookupGreAvailRn,-- -- Rebindable Syntax- lookupSyntax, lookupSyntaxExpr, lookupSyntaxNames,- lookupSyntaxName,- lookupIfThenElse,-- -- QualifiedDo- lookupQualifiedDoExpr, lookupQualifiedDo,- lookupQualifiedDoName, lookupNameWithQualifier,-- -- Constructing usage information- addUsedGRE, addUsedGREs, addUsedDataCons,---- dataTcOccs, --TODO: Move this somewhere, into utils?-- ) where--import GHC.Prelude--import GHC.Iface.Load ( loadInterfaceForName, loadSrcInterface_maybe )-import GHC.Iface.Env-import GHC.Hs-import GHC.Types.Name.Reader-import GHC.Tc.Errors.Types-import GHC.Tc.Utils.Env-import GHC.Tc.Utils.Monad-import GHC.Parser.PostProcess ( setRdrNameSpace )-import GHC.Builtin.Types-import GHC.Types.Name-import GHC.Types.Name.Set-import GHC.Types.Name.Env-import GHC.Types.Avail-import GHC.Types.Hint-import GHC.Types.Error-import GHC.Unit.Module-import GHC.Unit.Module.ModIface-import GHC.Unit.Module.Warnings ( WarningTxt )-import GHC.Core.ConLike-import GHC.Core.DataCon-import GHC.Core.TyCon-import GHC.Builtin.Names( rOOT_MAIN )-import GHC.Types.Basic ( TopLevelFlag(..), TupleSort(..) )-import GHC.Types.SrcLoc as SrcLoc-import GHC.Utils.Outputable as Outputable-import GHC.Types.Unique.Set ( uniqSetAny )-import GHC.Utils.Misc-import GHC.Utils.Panic-import GHC.Data.Maybe-import GHC.Driver.Session-import GHC.Data.FastString-import Control.Monad-import GHC.Data.List.SetOps ( minusList )-import qualified GHC.LanguageExtensions as LangExt-import GHC.Rename.Unbound-import GHC.Rename.Utils-import qualified Data.Semigroup as Semi-import Data.Either ( partitionEithers )-import Data.List ( find )-import qualified Data.List.NonEmpty as NE-import Control.Arrow ( first )-import GHC.Types.FieldLabel-import GHC.Data.Bag-import GHC.Types.PkgQual-import Language.Haskell.Syntax.Basic (FieldLabelString(..))--{--*********************************************************-* *- Source-code binders-* *-*********************************************************--Note [Signature lazy interface loading]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--GHC's lazy interface loading can be a bit confusing, so this Note is an-empirical description of what happens in one interesting case. When-compiling a signature module against an its implementation, we do NOT-load interface files associated with its names until after the type-checking phase. For example:-- module ASig where- data T- f :: T -> T--Suppose we compile this with -sig-of "A is ASig":-- module B where- data T = T- f T = T-- module A(module B) where- import B--During type checking, we'll load A.hi because we need to know what the-RdrEnv for the module is, but we DO NOT load the interface for B.hi!-It's wholly unnecessary: our local definition 'data T' in ASig is all-the information we need to finish type checking. This is contrast to-type checking of ordinary Haskell files, in which we would not have the-local definition "data T" and would need to consult B.hi immediately.-(Also, this situation never occurs for hs-boot files, since you're not-allowed to reexport from another module.)--After type checking, we then check that the types we provided are-consistent with the backing implementation (in checkHiBootOrHsigIface).-At this point, B.hi is loaded, because we need something to compare-against.--I discovered this behavior when trying to figure out why type class-instances for Data.Map weren't in the EPS when I was type checking a-test very much like ASig (sigof02dm): the associated interface hadn't-been loaded yet! (The larger issue is a moot point, since an instance-declared in a signature can never be a duplicate.)--This behavior might change in the future. Consider this-alternate module B:-- module B where- {-# DEPRECATED T, f "Don't use" #-}- data T = T- f T = T--One might conceivably want to report deprecation warnings when compiling-ASig with -sig-of B, in which case we need to look at B.hi to find the-deprecation warnings during renaming. At the moment, you don't get any-warning until you use the identifier further downstream. This would-require adjusting addUsedGRE so that during signature compilation,-we do not report deprecation warnings for LocalDef. See also-Note [Handling of deprecations]--}--newTopSrcBinder :: LocatedN RdrName -> RnM Name-newTopSrcBinder (L loc rdr_name)- | Just name <- isExact_maybe rdr_name- = -- This is here to catch- -- (a) Exact-name binders created by Template Haskell- -- (b) The PrelBase defn of (say) [] and similar, for which- -- the parser reads the special syntax and returns an Exact RdrName- -- We are at a binding site for the name, so check first that it- -- the current module is the correct one; otherwise GHC can get- -- very confused indeed. This test rejects code like- -- data T = (,) Int Int- -- unless we are in GHC.Tup- if isExternalName name then- do { this_mod <- getModule- ; unless (this_mod == nameModule name)- (addErrAt (locA loc) (badOrigBinding rdr_name))- ; return name }- else -- See Note [Binders in Template Haskell] in "GHC.ThToHs"- do { this_mod <- getModule- ; externaliseName this_mod name }-- | Just (rdr_mod, rdr_occ) <- isOrig_maybe rdr_name- = do { this_mod <- getModule- ; unless (rdr_mod == this_mod || rdr_mod == rOOT_MAIN)- (addErrAt (locA loc) (badOrigBinding rdr_name))- -- When reading External Core we get Orig names as binders,- -- but they should agree with the module gotten from the monad- --- -- We can get built-in syntax showing up here too, sadly. If you type- -- data T = (,,,)- -- the constructor is parsed as a type, and then GHC.Parser.PostProcess.tyConToDataCon- -- uses setRdrNameSpace to make it into a data constructors. At that point- -- the nice Exact name for the TyCon gets swizzled to an Orig name.- -- Hence the badOrigBinding error message.- ---- -- MP 2022: I suspect this code path is never called for `rOOT_MAIN` anymore- -- because External Core has been removed but we instead have some similar logic for- -- serialising whole programs into interface files in GHC.IfaceToCore.mk_top_id.-- -- Except for the ":Main.main = ..." definition inserted into- -- the Main module; ugh!-- -- Because of this latter case, we call newGlobalBinder with a module from- -- the RdrName, not from the environment. In principle, it'd be fine to- -- have an arbitrary mixture of external core definitions in a single module,- -- (apart from module-initialisation issues, perhaps).- ; newGlobalBinder rdr_mod rdr_occ (locA loc) }-- | otherwise- = do { when (isQual rdr_name)- (addErrAt (locA loc) (badQualBndrErr rdr_name))- -- Binders should not be qualified; if they are, and with a different- -- module name, we get a confusing "M.T is not in scope" error later-- ; stage <- getStage- ; if isBrackStage stage then- -- We are inside a TH bracket, so make an *Internal* name- -- See Note [Top-level Names in Template Haskell decl quotes] in GHC.Rename.Names- do { uniq <- newUnique- ; return (mkInternalName uniq (rdrNameOcc rdr_name) (locA loc)) }- else- do { this_mod <- getModule- ; traceRn "newTopSrcBinder" (ppr this_mod $$ ppr rdr_name $$ ppr (locA loc))- ; newGlobalBinder this_mod (rdrNameOcc rdr_name) (locA loc) }- }--{--*********************************************************-* *- Source code occurrences-* *-*********************************************************--Looking up a name in the GHC.Rename.Env.--Note [Type and class operator definitions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We want to reject all of these unless we have -XTypeOperators (#3265)- data a :*: b = ...- class a :*: b where ...- data (:*:) a b = ....- class (:*:) a b where ...-The latter two mean that we are not just looking for a-*syntactically-infix* declaration, but one that uses an operator-OccName. We use OccName.isSymOcc to detect that case, which isn't-terribly efficient, but there seems to be no better way.--}---- Can be made to not be exposed--- Only used unwrapped in rnAnnProvenance-lookupTopBndrRn :: WhatLooking -> RdrName -> RnM Name--- Look up a top-level source-code binder. We may be looking up an unqualified 'f',--- and there may be several imported 'f's too, which must not confuse us.--- For example, this is OK:--- import Foo( f )--- infix 9 f -- The 'f' here does not need to be qualified--- f x = x -- Nor here, of course--- So we have to filter out the non-local ones.------ A separate function (importsFromLocalDecls) reports duplicate top level--- decls, so here it's safe just to choose an arbitrary one.-lookupTopBndrRn which_suggest rdr_name =- lookupExactOrOrig rdr_name id $- do { -- Check for operators in type or class declarations- -- See Note [Type and class operator definitions]- let occ = rdrNameOcc rdr_name- ; when (isTcOcc occ && isSymOcc occ)- (do { op_ok <- xoptM LangExt.TypeOperators- ; unless op_ok (addErr (TcRnIllegalTypeOperatorDecl rdr_name)) })-- ; env <- getGlobalRdrEnv- ; case filter isLocalGRE (lookupGRE_RdrName rdr_name env) of- [gre] -> return (greMangledName gre)- _ -> do -- Ambiguous (can't happen) or unbound- traceRn "lookupTopBndrRN fail" (ppr rdr_name)- unboundName (LF which_suggest WL_LocalTop) rdr_name- }--lookupLocatedTopConstructorRn :: Located RdrName -> RnM (Located Name)-lookupLocatedTopConstructorRn = wrapLocM (lookupTopBndrRn WL_Constructor)--lookupLocatedTopConstructorRnN :: LocatedN RdrName -> RnM (LocatedN Name)-lookupLocatedTopConstructorRnN = wrapLocMA (lookupTopBndrRn WL_Constructor)--lookupLocatedTopBndrRn :: Located RdrName -> RnM (Located Name)-lookupLocatedTopBndrRn = wrapLocM (lookupTopBndrRn WL_Anything)--lookupLocatedTopBndrRnN :: LocatedN RdrName -> RnM (LocatedN Name)-lookupLocatedTopBndrRnN = wrapLocMA (lookupTopBndrRn WL_Anything)---- | Lookup an @Exact@ @RdrName@. See Note [Looking up Exact RdrNames].--- This never adds an error, but it may return one, see--- Note [Errors in lookup functions]-lookupExactOcc_either :: Name -> RnM (Either NotInScopeError Name)-lookupExactOcc_either name- | Just thing <- wiredInNameTyThing_maybe name- , Just tycon <- case thing of- ATyCon tc -> Just tc- AConLike (RealDataCon dc) -> Just (dataConTyCon dc)- _ -> Nothing- , Just tupleSort <- tyConTuple_maybe tycon- = do { let tupArity = case tupleSort of- -- Unboxed tuples have twice as many arguments because of the- -- 'RuntimeRep's (#17837)- UnboxedTuple -> tyConArity tycon `div` 2- _ -> tyConArity tycon- ; checkTupSize tupArity- ; return (Right name) }-- | isExternalName name- = return (Right name)-- | otherwise- = do { env <- getGlobalRdrEnv- ; let -- See Note [Splicing Exact names]- main_occ = nameOccName name- demoted_occs = case demoteOccName main_occ of- Just occ -> [occ]- Nothing -> []- gres = [ gre | occ <- main_occ : demoted_occs- , gre <- lookupGlobalRdrEnv env occ- , greMangledName gre == name ]- ; case gres of- [gre] -> return (Right (greMangledName gre))-- [] -> -- See Note [Splicing Exact names]- do { lcl_env <- getLocalRdrEnv- ; if name `inLocalRdrEnvScope` lcl_env- then return (Right name)- else- do { th_topnames_var <- fmap tcg_th_topnames getGblEnv- ; th_topnames <- readTcRef th_topnames_var- ; if name `elemNameSet` th_topnames- then return (Right name)- else return (Left (NoExactName name))- }- }-- gres -> return (Left (SameName gres)) -- Ugh! See Note [Template Haskell ambiguity]- }--------------------------------------------------lookupInstDeclBndr :: Name -> SDoc -> RdrName -> RnM Name--- This is called on the method name on the left-hand side of an--- instance declaration binding. eg. instance Functor T where--- fmap = ...--- ^^^^ called on this--- Regardless of how many unqualified fmaps are in scope, we want--- the one that comes from the Functor class.------ Furthermore, note that we take no account of whether the--- name is only in scope qualified. I.e. even if method op is--- in scope as M.op, we still allow plain 'op' on the LHS of--- an instance decl------ The "what" parameter says "method" or "associated type",--- depending on what we are looking up-lookupInstDeclBndr cls what rdr- = do { when (isQual rdr)- (addErr (badQualBndrErr rdr))- -- In an instance decl you aren't allowed- -- to use a qualified name for the method- -- (Although it'd make perfect sense.)- ; mb_name <- lookupSubBndrOcc- False -- False => we don't give deprecated- -- warnings when a deprecated class- -- method is defined. We only warn- -- when it's used- cls doc rdr- ; case mb_name of- Left err -> do { addErr (mkTcRnNotInScope rdr err)- ; return (mkUnboundNameRdr rdr) }- Right nm -> return nm }- where- doc = what <+> text "of class" <+> quotes (ppr cls)--------------------------------------------------lookupFamInstName :: Maybe Name -> LocatedN RdrName- -> RnM (LocatedN Name)--- Used for TyData and TySynonym family instances only,--- See Note [Family instance binders]-lookupFamInstName (Just cls) tc_rdr -- Associated type; c.f GHC.Rename.Bind.rnMethodBind- = wrapLocMA (lookupInstDeclBndr cls (text "associated type")) tc_rdr-lookupFamInstName Nothing tc_rdr -- Family instance; tc_rdr is an *occurrence*- = lookupLocatedOccRnConstr tc_rdr--------------------------------------------------lookupConstructorFields :: Name -> RnM [FieldLabel]--- Look up the fields of a given constructor--- * For constructors from this module, use the record field env,--- which is itself gathered from the (as yet un-typechecked)--- data type decls------ * For constructors from imported modules, use the *type* environment--- since imported modules are already compiled, the info is conveniently--- right there--lookupConstructorFields con_name- = do { this_mod <- getModule- ; if nameIsLocalOrFrom this_mod con_name then- do { field_env <- getRecFieldEnv- ; traceTc "lookupCF" (ppr con_name $$ ppr (lookupNameEnv field_env con_name) $$ ppr field_env)- ; return (lookupNameEnv field_env con_name `orElse` []) }- else- do { con <- tcLookupConLike con_name- ; traceTc "lookupCF 2" (ppr con)- ; return (conLikeFieldLabels con) } }----- In CPS style as `RnM r` is monadic--- Reports an error if the name is an Exact or Orig and it can't find the name--- Otherwise if it is not an Exact or Orig, returns k-lookupExactOrOrig :: RdrName -> (Name -> r) -> RnM r -> RnM r-lookupExactOrOrig rdr_name res k- = do { men <- lookupExactOrOrig_base rdr_name- ; case men of- FoundExactOrOrig n -> return (res n)- ExactOrOrigError e ->- do { addErr (mkTcRnNotInScope rdr_name e)- ; return (res (mkUnboundNameRdr rdr_name)) }- NotExactOrOrig -> k }---- Variant of 'lookupExactOrOrig' that does not report an error--- See Note [Errors in lookup functions]--- Calls k if the name is neither an Exact nor Orig-lookupExactOrOrig_maybe :: RdrName -> (Maybe Name -> r) -> RnM r -> RnM r-lookupExactOrOrig_maybe rdr_name res k- = do { men <- lookupExactOrOrig_base rdr_name- ; case men of- FoundExactOrOrig n -> return (res (Just n))- ExactOrOrigError _ -> return (res Nothing)- NotExactOrOrig -> k }--data ExactOrOrigResult = FoundExactOrOrig Name -- ^ Found an Exact Or Orig Name- | ExactOrOrigError NotInScopeError -- ^ The RdrName was an Exact- -- or Orig, but there was an- -- error looking up the Name- | NotExactOrOrig -- ^ The RdrName is neither an Exact nor- -- Orig---- Does the actual looking up an Exact or Orig name, see 'ExactOrOrigResult'-lookupExactOrOrig_base :: RdrName -> RnM ExactOrOrigResult-lookupExactOrOrig_base rdr_name- | Just n <- isExact_maybe rdr_name -- This happens in derived code- = cvtEither <$> lookupExactOcc_either n- | Just (rdr_mod, rdr_occ) <- isOrig_maybe rdr_name- = FoundExactOrOrig <$> lookupOrig rdr_mod rdr_occ- | otherwise = return NotExactOrOrig- where- cvtEither (Left e) = ExactOrOrigError e- cvtEither (Right n) = FoundExactOrOrig n---{- Note [Errors in lookup functions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Many of these lookup functions will attach an error if it can't find the Name it-is trying to lookup. However there are also _maybe and _either variants for many-of these functions.--These variants should *not* attach any errors, as there are-places where we want to attempt looking up a name, but it's not the end of the-world if we don't find it.--For example, see lookupThName_maybe: It calls lookupOccRn_maybe multiple-times for varying names in different namespaces. lookupOccRn_maybe should-therefore never attach an error, instead just return a Nothing.--For these _maybe/_either variant functions then, avoid calling further lookup-functions that can attach errors and instead call their _maybe/_either-counterparts.--}---------------------------------------------------- | 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.------ See Note [DisambiguateRecordFields] and Note [NoFieldSelectors].-lookupRecFieldOcc :: Maybe Name -- Nothing => just look it up as usual- -- Just con => use data con to disambiguate- -> RdrName- -> RnM Name-lookupRecFieldOcc mb_con rdr_name- | Just con <- mb_con- , isUnboundName con -- Avoid error cascade- = return (mkUnboundNameRdr rdr_name)- | Just con <- mb_con- = lookupExactOrOrig rdr_name id $ -- See Note [Record field names and Template Haskell]- do { flds <- lookupConstructorFields con- ; env <- getGlobalRdrEnv- ; let lbl = FieldLabelString $ occNameFS (rdrNameOcc rdr_name)- mb_field = do fl <- find ((== lbl) . flLabel) flds- -- We have the label, now check it is in scope. If- -- there is a qualifier, use pickGREs to check that- -- the qualifier is correct, and return the filtered- -- GRE so we get import usage right (see #17853).- gre <- lookupGRE_FieldLabel env fl- if isQual rdr_name- then do gre' <- listToMaybe (pickGREs rdr_name [gre])- return (fl, gre')- else return (fl, gre)- ; case mb_field of- Just (fl, gre) -> do { addUsedGRE True gre- ; return (flSelector fl) }- Nothing -> do { addErr (badFieldConErr con lbl)- ; return (mkUnboundNameRdr rdr_name) } }-- | otherwise -- Can't use the data constructor to disambiguate- = lookupGlobalOccRn' WantBoth rdr_name- -- This use of Global is right as we are looking up a selector,- -- which can only be defined at the top level.---- | Look up an occurrence of a field in a record update, returning the selector--- name.------ Unlike construction and pattern matching with @-XDisambiguateRecordFields@--- (see 'lookupRecFieldOcc'), there is no data constructor to help disambiguate,--- so this may be ambiguous if the field is in scope multiple times. However we--- ignore non-fields in scope with the same name if @-XDisambiguateRecordFields@--- is on (see Note [DisambiguateRecordFields for updates]).------ Here a field is in scope even if @NoFieldSelectors@ was enabled at its--- definition site (see Note [NoFieldSelectors]).-lookupRecFieldOcc_update- :: DuplicateRecordFields- -> RdrName- -> RnM AmbiguousResult-lookupRecFieldOcc_update dup_fields_ok rdr_name = do- disambig_ok <- xoptM LangExt.DisambiguateRecordFields- let want | disambig_ok = WantField- | otherwise = WantBoth- mr <- lookupGlobalOccRn_overloaded dup_fields_ok want rdr_name- case mr of- Just r -> return r- Nothing -- Try again if we previously looked only for fields, see- -- Note [DisambiguateRecordFields for updates]- | disambig_ok -> do mr' <- lookupGlobalOccRn_overloaded dup_fields_ok WantBoth rdr_name- case mr' of- Just r -> return r- Nothing -> unbound- | otherwise -> unbound- where- unbound = UnambiguousGre . NormalGreName- <$> unboundName (LF WL_RecField WL_Global) 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 [DisambiguateRecordFields for updates]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When we are looking up record fields in record update, we can take advantage of-the fact that we know we are looking for a field, even though we do not know the-data constructor name (as in Note [DisambiguateRecordFields]), provided the--XDisambiguateRecordFields flag is on.--For example, consider:-- module N where- f = ()-- {-# LANGUAGE DisambiguateRecordFields #-}- module M where- import N (f)- data T = MkT { f :: Int }- t = MkT { f = 1 } -- unambiguous because MkT determines which field we mean- u = t { f = 2 } -- unambiguous because we ignore the non-field 'f'--This works by lookupRecFieldOcc_update using 'WantField :: FieldsOrSelectors'-when looking up the field name, so that 'filterFieldGREs' will later ignore any-non-fields in scope. Of course, if a record update has two fields in scope with-the same name, it is still ambiguous.--If we do not find anything when looking only for fields, we try again allowing-fields or non-fields. This leads to a better error message if the user-mistakenly tries to use a non-field name in a record update:-- f = ()- e x = x { f = () }--Unlike with constructors or pattern-matching, we do not allow the module-qualifier to be omitted, because we do not have a data constructor from which to-determine it.--Note [Record field names and Template Haskell]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (#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-lookupSubBndrOcc_helper must_have_parent warn_if_deprec parent rdr_name- | isUnboundName parent- -- Avoid an error cascade- = return (FoundChild NoParent (NormalGreName (mkUnboundNameRdr rdr_name)))-- | otherwise = do- gre_env <- getGlobalRdrEnv-- let original_gres = lookupGlobalRdrEnv gre_env (rdrNameOcc rdr_name)- -- Disambiguate the lookup based on the parent information.- -- The remaining GREs are things that we *could* export here, note that- -- this includes things which have `NoParent`. Those are sorted in- -- `checkPatSynParent`.- traceRn "parent" (ppr parent)- traceRn "lookupExportChild original_gres:" (ppr original_gres)- traceRn "lookupExportChild picked_gres:" (ppr (picked_gres original_gres) $$ ppr must_have_parent)- case picked_gres original_gres of- NoOccurrence ->- noMatchingParentErr original_gres- UniqueOccurrence g ->- if must_have_parent then noMatchingParentErr original_gres- else checkFld g- DisambiguatedOccurrence g ->- checkFld g- AmbiguousOccurrence gres ->- mkNameClashErr gres- where- -- Convert into FieldLabel if necessary- checkFld :: GlobalRdrElt -> RnM ChildLookupResult- checkFld g@GRE{gre_name,gre_par} = do- addUsedGRE warn_if_deprec g- return $ FoundChild gre_par gre_name-- -- Called when we find no matching GREs after disambiguation but- -- there are three situations where this happens.- -- 1. There were none to begin with.- -- 2. None of the matching ones were the parent but- -- a. They were from an overloaded record field so we can report- -- a better error- -- b. The original lookup was actually ambiguous.- -- For example, the case where overloading is off and two- -- record fields are in scope from different record- -- constructors, neither of which is the parent.- noMatchingParentErr :: [GlobalRdrElt] -> RnM ChildLookupResult- noMatchingParentErr original_gres = do- traceRn "npe" (ppr original_gres)- dup_fields_ok <- xoptM LangExt.DuplicateRecordFields- case original_gres of- [] -> return NameNotFound- [g] -> return $ IncorrectParent parent- (gre_name g)- [p | Just p <- [getParent g]]- gss@(g:gss'@(_:_)) ->- if all isRecFldGRE gss && dup_fields_ok- then return $- IncorrectParent parent- (gre_name g)- [p | x <- gss, Just p <- [getParent x]]- else mkNameClashErr $ g NE.:| gss'-- mkNameClashErr :: NE.NonEmpty GlobalRdrElt -> RnM ChildLookupResult- mkNameClashErr gres = do- addNameClashErrRn rdr_name gres- return (FoundChild (gre_par (NE.head gres)) (gre_name (NE.head gres)))-- getParent :: GlobalRdrElt -> Maybe Name- getParent (GRE { gre_par = p } ) =- case p of- ParentIs cur_parent -> Just cur_parent- NoParent -> Nothing-- picked_gres :: [GlobalRdrElt] -> DisambigInfo- -- For Unqual, find GREs that are in scope qualified or unqualified- -- For Qual, find GREs that are in scope with that qualification- picked_gres gres- | isUnqual rdr_name- = mconcat (map right_parent gres)- | otherwise- = mconcat (map right_parent (pickGREs rdr_name gres))-- right_parent :: GlobalRdrElt -> DisambigInfo- right_parent p- = case getParent p of- Just cur_parent- | parent == cur_parent -> DisambiguatedOccurrence p- | otherwise -> NoOccurrence- Nothing -> UniqueOccurrence p----- This domain specific datatype is used to record why we decided it was--- possible that a GRE could be exported with a parent.-data DisambigInfo- = NoOccurrence- -- The GRE could never be exported. It has the wrong parent.- | UniqueOccurrence GlobalRdrElt- -- The GRE has no parent. It could be a pattern synonym.- | DisambiguatedOccurrence GlobalRdrElt- -- The parent of the GRE is the correct parent- | AmbiguousOccurrence (NE.NonEmpty GlobalRdrElt)- -- For example, two normal identifiers with the same name are in- -- scope. They will both be resolved to "UniqueOccurrence" and the- -- monoid will combine them to this failing case.--instance Outputable DisambigInfo where- ppr NoOccurrence = text "NoOccurrence"- ppr (UniqueOccurrence gre) = text "UniqueOccurrence:" <+> ppr gre- ppr (DisambiguatedOccurrence gre) = text "DiambiguatedOccurrence:" <+> ppr gre- ppr (AmbiguousOccurrence gres) = text "Ambiguous:" <+> ppr gres--instance Semi.Semigroup DisambigInfo where- -- This is the key line: We prefer disambiguated occurrences to other- -- names.- _ <> DisambiguatedOccurrence g' = DisambiguatedOccurrence g'- DisambiguatedOccurrence g' <> _ = DisambiguatedOccurrence g'-- NoOccurrence <> m = m- m <> NoOccurrence = m- UniqueOccurrence g <> UniqueOccurrence g'- = AmbiguousOccurrence $ g NE.:| [g']- UniqueOccurrence g <> AmbiguousOccurrence gs- = AmbiguousOccurrence (g `NE.cons` gs)- AmbiguousOccurrence gs <> UniqueOccurrence g'- = AmbiguousOccurrence (g' `NE.cons` gs)- AmbiguousOccurrence gs <> AmbiguousOccurrence gs'- = AmbiguousOccurrence (gs Semi.<> gs')--instance Monoid DisambigInfo where- mempty = NoOccurrence- mappend = (Semi.<>)---- Lookup SubBndrOcc can never be ambiguous------ Records the result of looking up a child.-data ChildLookupResult- = NameNotFound -- We couldn't find a suitable name- | IncorrectParent Name -- Parent- GreName -- Child we were looking for- [Name] -- List of possible parents- | FoundChild Parent GreName -- We resolved to a child---- | Specialised version of msum for RnM ChildLookupResult-combineChildLookupResult :: [RnM ChildLookupResult] -> RnM ChildLookupResult-combineChildLookupResult [] = return NameNotFound-combineChildLookupResult (x:xs) = do- res <- x- case res of- NameNotFound -> combineChildLookupResult xs- _ -> return res--instance Outputable ChildLookupResult where- ppr NameNotFound = text "NameNotFound"- ppr (FoundChild p n) = text "Found:" <+> ppr p <+> ppr n- ppr (IncorrectParent p n ns) = text "IncorrectParent"- <+> hsep [ppr p, ppr n, ppr ns]--lookupSubBndrOcc :: Bool- -> Name -- Parent- -> SDoc- -> RdrName- -> RnM (Either NotInScopeError Name)--- Find all the things the rdr-name maps to--- and pick the one with the right parent name-lookupSubBndrOcc warn_if_deprec the_parent doc rdr_name = do- res <-- lookupExactOrOrig rdr_name (FoundChild NoParent . NormalGreName) $- -- This happens for built-in classes, see mod052 for example- lookupSubBndrOcc_helper True warn_if_deprec the_parent rdr_name- case res of- NameNotFound -> return (Left (UnknownSubordinate doc))- FoundChild _p child -> return (Right (greNameMangledName child))- IncorrectParent {}- -- See [Mismatched class methods and associated type families]- -- in TcInstDecls.- -> return $ Left (UnknownSubordinate doc)--{--Note [Family instance binders]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider- data family F a- data instance F T = X1 | X2--The 'data instance' decl has an *occurrence* of F (and T), and *binds*-X1 and X2. (This is unlike a normal data type declaration which would-bind F too.) So we want an AvailTC F [X1,X2].--Now consider a similar pair:- class C a where- data G a- instance C S where- data G S = Y1 | Y2--The 'data G S' *binds* Y1 and Y2, and has an *occurrence* of G.--But there is a small complication: in an instance decl, we don't use-qualified names on the LHS; instead we use the class to disambiguate.-Thus:- module M where- import Blib( G )- class C a where- data G a- instance C S where- data G S = Y1 | Y2-Even though there are two G's in scope (M.G and Blib.G), the occurrence-of 'G' in the 'instance C S' decl is unambiguous, because C has only-one associated type called G. This is exactly what happens for methods,-and it is only consistent to do the same thing for types. That's the-role of the function lookupTcdName; the (Maybe Name) give the class of-the enclosing instance decl, if any.--Note [Looking up Exact RdrNames]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Exact RdrNames are generated by:--* Template Haskell (See Note [Binders in Template Haskell] in GHC.ThToHs)-* Derived instances (See Note [Auxiliary binders] in GHC.Tc.Deriv.Generate)--For data types and classes have Exact system Names in the binding-positions for constructors, TyCons etc. For example- [d| data T = MkT Int |]-when we splice in and convert to HsSyn RdrName, we'll get- data (Exact (system Name "T")) = (Exact (system Name "MkT")) ...-These System names are generated by GHC.ThToHs.thRdrName--But, constructors and the like need External Names, not System Names!-So we do the following-- * In GHC.Rename.Env.newTopSrcBinder we spot Exact RdrNames that wrap a- non-External Name, and make an External name for it. This is- the name that goes in the GlobalRdrEnv-- * When looking up an occurrence of an Exact name, done in- GHC.Rename.Env.lookupExactOcc, we find the Name with the right unique in the- GlobalRdrEnv, and use the one from the envt -- it will be an- External Name in the case of the data type/constructor above.-- * Exact names are also use for purely local binders generated- by TH, such as \x_33. x_33- Both binder and occurrence are Exact RdrNames. The occurrence- gets looked up in the LocalRdrEnv by GHC.Rename.Env.lookupOccRn, and- misses, because lookupLocalRdrEnv always returns Nothing for- an Exact Name. Now we fall through to lookupExactOcc, which- will find the Name is not in the GlobalRdrEnv, so we just use- the Exact supplied Name.--Note [Splicing Exact names]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider the splice $(do { x <- newName "x"; return (VarE x) })-This will generate a (HsExpr RdrName) term that mentions the-Exact RdrName "x_56" (or whatever), but does not bind it. So-when looking such Exact names we want to check that it's in scope,-otherwise the type checker will get confused. To do this we need to-keep track of all the Names in scope, and the LocalRdrEnv does just that;-we consult it with RdrName.inLocalRdrEnvScope.--There is another wrinkle. With TH and -XDataKinds, consider- $( [d| data Nat = Zero- data T = MkT (Proxy 'Zero) |] )-After splicing, but before renaming we get this:- data Nat_77{tc} = Zero_78{d}- data T_79{tc} = MkT_80{d} (Proxy 'Zero_78{tc}) |] )-The occurrence of 'Zero in the data type for T has the right unique,-but it has a TcClsName name-space in its OccName. (This is set by-the ctxt_ns argument of Convert.thRdrName.) When we check that is-in scope in the GlobalRdrEnv, we need to look up the DataName namespace-too. (An alternative would be to make the GlobalRdrEnv also have-a Name -> GRE mapping.)--Note [Template Haskell ambiguity]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The GlobalRdrEnv invariant says that if- occ -> [gre1, ..., gren]-then the gres have distinct Names (INVARIANT 1 of GlobalRdrEnv).-This is guaranteed by extendGlobalRdrEnvRn (the dups check in add_gre).--So how can we get multiple gres in lookupExactOcc_maybe? Because in-TH we might use the same TH NameU in two different name spaces.-eg (#7241):- $(newName "Foo" >>= \o -> return [DataD [] o [] [RecC o []] [''Show]])-Here we generate a type constructor and data constructor with the same-unique, but different name spaces.--It'd be nicer to rule this out in extendGlobalRdrEnvRn, but that would-mean looking up the OccName in every name-space, just in case, and that-seems a bit brutal. So it's just done here on lookup. But we might-need to revisit that choice.--Note [Usage for sub-bndrs]-~~~~~~~~~~~~~~~~~~~~~~~~~~-If you have this- import qualified M( C( f ) )- instance M.C T where- f x = x-then is the qualified import M.f used? Obviously yes.-But the RdrName used in the instance decl is unqualified. In effect,-we fill in the qualification by looking for f's whose class is M.C-But when adding to the UsedRdrNames we must make that qualification-explicit (saying "used M.f"), otherwise we get "Redundant import of M.f".--So we make up a suitable (fake) RdrName. But be careful- import qualified M- import M( C(f) )- instance C T where- f x = x-Here we want to record a use of 'f', not of 'M.f', otherwise-we'll miss the fact that the qualified import is redundant.------------------------------------------------------- Occurrences-----------------------------------------------------}---lookupLocatedOccRn :: GenLocated (SrcSpanAnn' ann) RdrName- -> TcRn (GenLocated (SrcSpanAnn' ann) Name)-lookupLocatedOccRn = wrapLocMA lookupOccRn--lookupLocatedOccRnConstr :: GenLocated (SrcSpanAnn' ann) RdrName- -> TcRn (GenLocated (SrcSpanAnn' ann) Name)-lookupLocatedOccRnConstr = wrapLocMA lookupOccRnConstr--lookupLocatedOccRnRecField :: GenLocated (SrcSpanAnn' ann) RdrName- -> TcRn (GenLocated (SrcSpanAnn' ann) Name)-lookupLocatedOccRnRecField = wrapLocMA lookupOccRnRecField--lookupLocatedOccRnNone :: GenLocated (SrcSpanAnn' ann) RdrName- -> TcRn (GenLocated (SrcSpanAnn' ann) Name)-lookupLocatedOccRnNone = wrapLocMA lookupOccRnNone--lookupLocalOccRn_maybe :: RdrName -> RnM (Maybe Name)--- Just look in the local environment-lookupLocalOccRn_maybe rdr_name- = do { local_env <- getLocalRdrEnv- ; return (lookupLocalRdrEnv local_env rdr_name) }--lookupLocalOccThLvl_maybe :: Name -> RnM (Maybe (TopLevelFlag, ThLevel))--- Just look in the local environment-lookupLocalOccThLvl_maybe name- = do { lcl_env <- getLclEnv- ; return (lookupNameEnv (tcl_th_bndrs lcl_env) name) }---- lookupOccRn' looks up an occurrence of a RdrName, and uses its argument to--- determine what kind of suggestions should be displayed if it is not in scope-lookupOccRn' :: WhatLooking -> RdrName -> RnM Name-lookupOccRn' which_suggest rdr_name- = do { mb_name <- lookupOccRn_maybe rdr_name- ; case mb_name of- Just name -> return name- Nothing -> reportUnboundName' which_suggest rdr_name }---- lookupOccRn looks up an occurrence of a RdrName and displays suggestions if--- it is not in scope-lookupOccRn :: RdrName -> RnM Name-lookupOccRn = lookupOccRn' WL_Anything---- lookupOccRnConstr looks up an occurrence of a RdrName and displays--- constructors and pattern synonyms as suggestions if it is not in scope-lookupOccRnConstr :: RdrName -> RnM Name-lookupOccRnConstr = lookupOccRn' WL_Constructor---- lookupOccRnRecField looks up an occurrence of a RdrName and displays--- record fields as suggestions if it is not in scope-lookupOccRnRecField :: RdrName -> RnM Name-lookupOccRnRecField = lookupOccRn' WL_RecField---- lookupOccRnRecField looks up an occurrence of a RdrName and displays--- no suggestions if it is not in scope-lookupOccRnNone :: RdrName -> RnM Name-lookupOccRnNone = lookupOccRn' WL_None---- Only used in one place, to rename pattern synonym binders.--- See Note [Renaming pattern synonym variables] in GHC.Rename.Bind-lookupLocalOccRn :: RdrName -> RnM Name-lookupLocalOccRn rdr_name- = do { mb_name <- lookupLocalOccRn_maybe rdr_name- ; case mb_name of- Just name -> return name- Nothing -> unboundName (LF WL_Anything WL_LocalOnly) rdr_name }---- lookupTypeOccRn looks up an optionally promoted RdrName.--- Used for looking up type variables.-lookupTypeOccRn :: RdrName -> RnM Name--- see Note [Demotion]-lookupTypeOccRn rdr_name- | isVarOcc (rdrNameOcc rdr_name) -- See Note [Promoted variables in types]- = badVarInType rdr_name- | otherwise- = do { mb_name <- lookupOccRn_maybe rdr_name- ; case mb_name of- Just name -> return name- Nothing ->- if occName rdr_name == occName eqTyCon_RDR -- See Note [eqTyCon (~) compatibility fallback]- then eqTyConName <$ addDiagnostic TcRnTypeEqualityOutOfScope- else lookup_demoted rdr_name }--{- Note [eqTyCon (~) compatibility fallback]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Before GHC Proposal #371, the (~) type operator used in type equality-constraints (a~b) was considered built-in syntax.--This had two implications:--1. Users could use it without importing it from Data.Type.Equality or Prelude.-2. TypeOperators were not required to use it (it was guarded behind TypeFamilies/GADTs instead)--To ease migration and minimize breakage, we continue to support those usages-but emit appropriate warnings.--}--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 is_star_type = if star_is_type then StarIsType else StarIsNotType- star_is_type_hints = noStarIsTypeHints is_star_type rdr_name- ; if data_kinds- then do { mb_demoted_name <- lookupOccRn_maybe demoted_rdr- ; case mb_demoted_name of- Nothing -> unboundNameX looking_for rdr_name star_is_type_hints- Just demoted_name -> return demoted_name }- else do { -- We need to check if a data constructor of this name is- -- in scope to give good error messages. However, we do- -- not want to give an additional error if the data- -- constructor happens to be out of scope! See #13947.- mb_demoted_name <- discardErrs $- lookupOccRn_maybe demoted_rdr- ; let suggestion | isJust mb_demoted_name- , let additional = text "to refer to the data constructor of that name?"- = [SuggestExtension $ SuggestSingleExtension additional LangExt.DataKinds]- | otherwise- = star_is_type_hints- ; unboundNameX looking_for rdr_name suggestion } }-- | otherwise- = reportUnboundName' (lf_which looking_for) rdr_name-- where- looking_for = LF WL_Constructor WL_Anywhere---- If the given RdrName can be promoted to the type level and its promoted variant is in scope,--- lookup_promoted returns the corresponding type-level Name.--- Otherwise, the function returns Nothing.--- See Note [Promotion] below.-lookup_promoted :: RdrName -> RnM (Maybe Name)-lookup_promoted rdr_name- | Just promoted_rdr <- promoteRdrName rdr_name- = lookupOccRn_maybe promoted_rdr- | otherwise- = return Nothing--badVarInType :: RdrName -> RnM Name-badVarInType rdr_name- = do { addErr (TcRnUnpromotableThing name TermVariablePE)- ; return name }- where- name = mkUnboundNameRdr rdr_name--{- Note [Promoted variables in types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this (#12686):- x = True- data Bad = Bad 'x--The parser treats the quote in 'x as saying "use the term-namespace", so we'll get (Bad x{v}), with 'x' in the-VarName namespace. If we don't test for this, the renamer-will happily rename it to the x bound at top level, and then-the typecheck falls over because it doesn't have 'x' in scope-when kind-checking.--Note [Demotion]-~~~~~~~~~~~~~~~-When the user writes:- data Nat = Zero | Succ Nat- foo :: f Zero -> Int--'Zero' in the type signature of 'foo' is parsed as:- HsTyVar ("Zero", TcClsName)--When the renamer hits this occurrence of 'Zero' it's going to realise-that it's not in scope. But because it is renaming a type, it knows-that 'Zero' might be a promoted data constructor, so it will demote-its namespace to DataName and do a second lookup.--The final result (after the renamer) will be:- HsTyVar ("Zero", DataName)--Note [Promotion]-~~~~~~~~~~~~~~~-When the user mentions a type constructor or a type variable in a-term-level context, then we report that a value identifier was expected-instead of a type-level one. That makes error messages more precise.-Previously, such errors contained only the info that a given value was out of scope (#18740).-We promote the namespace of RdrName and look up after that-(see the functions promotedRdrName and lookup_promoted).--In particular, we have the following error message- • Illegal term-level use of the type constructor ‘Int’- imported from ‘Prelude’ (and originally defined in ‘GHC.Types’)- • In the first argument of ‘id’, namely ‘Int’- In the expression: id Int- In an equation for ‘x’: x = id Int--when the user writes the following declaration-- x = id Int--}--lookupOccRnX_maybe :: (RdrName -> RnM (Maybe r)) -> (Name -> r) -> RdrName- -> RnM (Maybe r)-lookupOccRnX_maybe globalLookup wrapper rdr_name- = runMaybeT . msum . map MaybeT $- [ fmap wrapper <$> lookupLocalOccRn_maybe rdr_name- , globalLookup rdr_name ]---- Used outside this module only by TH name reification (lookupName, lookupThName_maybe)-lookupOccRn_maybe :: RdrName -> RnM (Maybe Name)-lookupOccRn_maybe = lookupOccRnX_maybe lookupGlobalOccRn_maybe id---- | Look up a 'RdrName' used as a variable in an expression.------ This may be a local variable, global variable, or one or more record selector--- functions. It will not return record fields created with the--- @NoFieldSelectors@ extension (see Note [NoFieldSelectors]).------ If the name is not in scope at the term level, but its promoted equivalent is--- in scope at the type level, the lookup will succeed (so that the type-checker--- can report a more informative error later). See Note [Promotion].----lookupExprOccRn :: RdrName -> RnM (Maybe GreName)-lookupExprOccRn rdr_name- = do { mb_name <- lookupOccRnX_maybe global_lookup NormalGreName rdr_name- ; case mb_name of- Nothing -> fmap @Maybe NormalGreName <$> lookup_promoted rdr_name- -- See Note [Promotion].- -- We try looking up the name as a- -- type constructor or type variable, if- -- we failed to look up the name at the term level.- p -> return p }-- where- global_lookup :: RdrName -> RnM (Maybe GreName)- global_lookup rdr_name =- do { mb_name <- lookupGlobalOccRn_overloaded NoDuplicateRecordFields WantNormal rdr_name- ; case mb_name of- Just (UnambiguousGre name) -> return (Just name)- Just _ -> panic "GHC.Rename.Env.global_lookup: The impossible happened!"- Nothing -> return Nothing- }--lookupGlobalOccRn_maybe :: RdrName -> RnM (Maybe Name)--- Looks up a RdrName occurrence in the top-level--- environment, including using lookupQualifiedNameGHCi--- for the GHCi case, but first tries to find an Exact or Orig name.--- No filter function; does not report an error on failure--- See Note [Errors in lookup functions]--- Uses addUsedRdrName to record use and deprecations------ Used directly only by getLocalNonValBinders (new_assoc).-lookupGlobalOccRn_maybe rdr_name =- lookupExactOrOrig_maybe rdr_name id (lookupGlobalOccRn_base WantNormal rdr_name)--lookupGlobalOccRn :: RdrName -> RnM Name--- lookupGlobalOccRn is like lookupOccRn, except that it looks in the global--- environment. Adds an error message if the RdrName is not in scope.--- You usually want to use "lookupOccRn" which also looks in the local--- environment.------ Used by exports_from_avail-lookupGlobalOccRn = lookupGlobalOccRn' WantNormal--lookupGlobalOccRn' :: FieldsOrSelectors -> RdrName -> RnM Name-lookupGlobalOccRn' fos rdr_name =- lookupExactOrOrig rdr_name id $ do- mn <- lookupGlobalOccRn_base fos rdr_name- case mn of- Just n -> return n- Nothing -> do { traceRn "lookupGlobalOccRn" (ppr rdr_name)- ; unboundName (LF which_suggest WL_Global) rdr_name }- where which_suggest = case fos of- WantNormal -> WL_Anything- WantBoth -> WL_RecField- WantField -> WL_RecField---- Looks up a RdrName occurrence in the GlobalRdrEnv and with--- lookupQualifiedNameGHCi. Does not try to find an Exact or Orig name first.--- lookupQualifiedNameGHCi here is used when we're in GHCi and a name like--- 'Data.Map.elems' is typed, even if you didn't import Data.Map-lookupGlobalOccRn_base :: FieldsOrSelectors -> RdrName -> RnM (Maybe Name)-lookupGlobalOccRn_base fos rdr_name =- runMaybeT . msum . map MaybeT $- [ fmap greMangledName <$> lookupGreRn_maybe fos rdr_name- , fmap greNameMangledName <$> lookupOneQualifiedNameGHCi fos rdr_name ]- -- This test is not expensive,- -- and only happens for failed lookups--lookupInfoOccRn :: RdrName -> RnM [Name]--- lookupInfoOccRn is intended for use in GHCi's ":info" command--- It finds all the GREs that RdrName could mean, not complaining--- about ambiguity, but rather returning them all--- C.f. #9881--- lookupInfoOccRn is also used in situations where we check for--- at least one definition of the RdrName, not complaining about--- multiple definitions. (See #17832)-lookupInfoOccRn rdr_name =- lookupExactOrOrig rdr_name (:[]) $- do { rdr_env <- getGlobalRdrEnv- ; let ns = map greMangledName (lookupGRE_RdrName' rdr_name rdr_env)- ; qual_ns <- map greNameMangledName <$> lookupQualifiedNameGHCi WantBoth rdr_name- ; return (ns ++ (qual_ns `minusList` ns)) }---- | Like 'lookupOccRn_maybe', but with a more informative result if--- the 'RdrName' happens to be a record selector:------ * Nothing -> name not in scope (no error reported)--- * Just (UnambiguousGre x) -> name uniquely refers to x,--- or there is a name clash (reported)--- * Just AmbiguousFields -> name refers to two or more record fields--- (no error reported)------ See Note [ Unbound vs Ambiguous Names ].-lookupGlobalOccRn_overloaded :: DuplicateRecordFields -> FieldsOrSelectors -> RdrName- -> RnM (Maybe AmbiguousResult)-lookupGlobalOccRn_overloaded dup_fields_ok fos rdr_name =- lookupExactOrOrig_maybe rdr_name (fmap (UnambiguousGre . NormalGreName)) $- do { res <- lookupGreRn_helper fos rdr_name- ; case res of- GreNotFound -> fmap UnambiguousGre <$> lookupOneQualifiedNameGHCi fos rdr_name- OneNameMatch gre -> return $ Just (UnambiguousGre (gre_name gre))- MultipleNames gres- | all isRecFldGRE gres- , dup_fields_ok == DuplicateRecordFields -> return $ Just AmbiguousFields- | otherwise -> do- addNameClashErrRn rdr_name gres- return (Just (UnambiguousGre (gre_name (NE.head gres)))) }----- | Result of looking up an occurrence that might be an ambiguous field.-data AmbiguousResult- = UnambiguousGre GreName- -- ^ Occurrence picked out a single name, which may or may not belong to a- -- field (or might be unbound, if an error has been reported already, per- -- Note [ Unbound vs Ambiguous Names ]).- | AmbiguousFields- -- ^ Occurrence picked out two or more fields, and no non-fields. For now- -- this is allowed by DuplicateRecordFields in certain circumstances, as the- -- type-checker may be able to disambiguate later.---{--Note [NoFieldSelectors]-~~~~~~~~~~~~~~~~~~~~~~~-The NoFieldSelectors extension allows record fields to be defined without-bringing the corresponding selector functions into scope. However, such fields-may still be used in contexts such as record construction, pattern matching or-update. This requires us to distinguish contexts in which selectors are required-from those in which any field may be used. For example:-- {-# LANGUAGE NoFieldSelectors #-}- module M (T(foo), foo) where -- T(foo) refers to the field,- -- unadorned foo to the value binding- data T = MkT { foo :: Int }- foo = ()-- bar = foo -- refers to the value binding, field ignored-- module N where- import M (T(..))- baz = MkT { foo = 3 } -- refers to the field- oops = foo -- an error: the field is in scope but the value binding is not--Each 'FieldLabel' indicates (in the 'flHasFieldSelector' field) whether the-FieldSelectors extension was enabled in the defining module. This allows them-to be filtered out by 'filterFieldGREs'.--Even when NoFieldSelectors is in use, we still generate selector functions-internally. For example, the expression- getField @"foo" t-or (with dot-notation)- t.foo-extracts the `foo` field of t::T, and hence needs the selector function-(see Note [HasField instances] in GHC.Tc.Instance.Class). In order to avoid-name clashes with normal bindings reusing the names, selector names for such-fields are mangled just as for DuplicateRecordFields (see Note [FieldLabel] in-GHC.Types.FieldLabel).---In many of the name lookup functions in this module we pass a FieldsOrSelectors-value, indicating what we are looking for:-- * WantNormal: fields are in scope only if they have an accompanying selector- function, e.g. we are looking up a variable in an expression- (lookupExprOccRn).-- * WantBoth: any name or field will do, regardless of whether the selector- function is available, e.g. record updates (lookupRecFieldOcc_update) with- NoDisambiguateRecordFields.-- * WantField: any field will do, regardless of whether the selector function is- available, but ignoring any non-field names, e.g. record updates- (lookupRecFieldOcc_update) with DisambiguateRecordFields.-------------------------------------------------------------------------------------- Context FieldsOrSelectors------------------------------------------------------------------------------------- Record construction/pattern match WantBoth if NoDisambiguateRecordFields- e.g. MkT { foo = 3 } (DisambiguateRecordFields is separate)-- Record update WantBoth if NoDisambiguateRecordFields- e.g. e { foo = 3 } WantField if DisambiguateRecordFields-- :info in GHCi WantBoth-- Variable occurrence in expression WantNormal- Type variable, data constructor- Pretty much everything else--------------------------------------------------------------------------------------}---- | When looking up GREs, we may or may not want to include fields that were--- defined in modules with @NoFieldSelectors@ enabled. See Note--- [NoFieldSelectors].-data FieldsOrSelectors- = WantNormal -- ^ Include normal names, and fields with selectors, but- -- ignore fields without selectors.- | WantBoth -- ^ Include normal names and all fields (regardless of whether- -- they have selectors).- | WantField -- ^ Include only fields, with or without selectors, ignoring- -- any non-fields in scope.- deriving Eq--filterFieldGREs :: FieldsOrSelectors -> [GlobalRdrElt] -> [GlobalRdrElt]-filterFieldGREs fos = filter (allowGreName fos . gre_name)--allowGreName :: FieldsOrSelectors -> GreName -> Bool-allowGreName WantBoth _ = True-allowGreName WantNormal (FieldGreName fl) = flHasFieldSelector fl == FieldSelectors-allowGreName WantNormal (NormalGreName _) = True-allowGreName WantField (FieldGreName _) = True-allowGreName WantField (NormalGreName _) = False-------------------------------------------------------- Lookup in the Global RdrEnv of the module-----------------------------------------------------data GreLookupResult = GreNotFound- | OneNameMatch GlobalRdrElt- | MultipleNames (NE.NonEmpty GlobalRdrElt)--lookupGreRn_maybe :: FieldsOrSelectors -> RdrName -> RnM (Maybe GlobalRdrElt)--- Look up the RdrName in the GlobalRdrEnv--- Exactly one binding: records it as "used", return (Just gre)--- No bindings: return Nothing--- Many bindings: report "ambiguous", return an arbitrary (Just gre)--- Uses addUsedRdrName to record use and deprecations-lookupGreRn_maybe fos rdr_name- = do- res <- lookupGreRn_helper fos rdr_name- case res of- OneNameMatch gre -> return $ Just gre- MultipleNames gres -> do- traceRn "lookupGreRn_maybe:NameClash" (ppr gres)- addNameClashErrRn rdr_name gres- return $ Just (NE.head gres)- GreNotFound -> return Nothing--{---Note [ Unbound vs Ambiguous Names ]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-lookupGreRn_maybe deals with failures in two different ways. If a name-is unbound then we return a `Nothing` but if the name is ambiguous-then we raise an error and return a dummy name.--The reason for this is that when we call `lookupGreRn_maybe` we are-speculatively looking for whatever we are looking up. If we don't find it,-then we might have been looking for the wrong thing and can keep trying.-On the other hand, if we find a clash then there is no way to recover as-we found the thing we were looking for but can no longer resolve which-the correct one is.--One example of this is in `lookupTypeOccRn` which first looks in the type-constructor namespace before looking in the data constructor namespace to-deal with `DataKinds`.--There is however, as always, one exception to this scheme. If we find-an ambiguous occurrence of a record selector and DuplicateRecordFields-is enabled then we defer the selection until the typechecker.---}------- Internal Function-lookupGreRn_helper :: FieldsOrSelectors -> RdrName -> RnM GreLookupResult-lookupGreRn_helper fos rdr_name- = do { env <- getGlobalRdrEnv- ; case filterFieldGREs fos (lookupGRE_RdrName' rdr_name env) of- [] -> return GreNotFound- [gre] -> do { addUsedGRE True gre- ; return (OneNameMatch gre) }- -- Don't record usage for ambiguous names- -- until we know which is meant- (gre:gres) -> return (MultipleNames (gre NE.:| gres)) }--lookupGreAvailRn :: RdrName -> RnM (Name, AvailInfo)--- Used in export lists--- If not found or ambiguous, add error message, and fake with UnboundName--- Uses addUsedRdrName to record use and deprecations-lookupGreAvailRn rdr_name- = do- mb_gre <- lookupGreRn_helper WantNormal rdr_name- case mb_gre of- GreNotFound ->- do- traceRn "lookupGreAvailRn" (ppr rdr_name)- name <- unboundName (LF WL_Anything WL_Global) rdr_name- return (name, avail name)- MultipleNames gres ->- do- addNameClashErrRn rdr_name gres- let unbound_name = mkUnboundNameRdr rdr_name- return (unbound_name, avail unbound_name)- -- Returning an unbound name here prevents an error- -- cascade- OneNameMatch gre ->- return (greMangledName gre, availFromGRE gre)---{--*********************************************************-* *- Deprecations-* *-*********************************************************--Note [Handling of deprecations]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-* We report deprecations at each *occurrence* of the deprecated thing- (see #5867)--* We do not report deprecations for locally-defined names. For a- start, we may be exporting a deprecated thing. Also we may use a- deprecated thing in the defn of another deprecated things. We may- even use a deprecated thing in the defn of a non-deprecated thing,- when changing a module's interface.--* addUsedGREs: we do not report deprecations for sub-binders:- - the ".." completion for records- - the ".." in an export item 'T(..)'- - the things exported by a module export 'module M'--}--addUsedDataCons :: GlobalRdrEnv -> TyCon -> RnM ()--- Remember use of in-scope data constructors (#7969)-addUsedDataCons rdr_env tycon- = addUsedGREs [ gre- | dc <- tyConDataCons tycon- , Just gre <- [lookupGRE_Name rdr_env (dataConName dc)] ]--addUsedGRE :: Bool -> GlobalRdrElt -> RnM ()--- Called for both local and imported things--- Add usage *and* warn if deprecated-addUsedGRE warn_if_deprec gre- = do { when warn_if_deprec (warnIfDeprecated gre)- ; unless (isLocalGRE gre) $- do { env <- getGblEnv- ; traceRn "addUsedGRE" (ppr gre)- ; updMutVar (tcg_used_gres env) (gre :) } }--addUsedGREs :: [GlobalRdrElt] -> RnM ()--- Record uses of any *imported* GREs--- Used for recording used sub-bndrs--- NB: no call to warnIfDeprecated; see Note [Handling of deprecations]-addUsedGREs gres- | null imp_gres = return ()- | otherwise = do { env <- getGblEnv- ; traceRn "addUsedGREs" (ppr imp_gres)- ; updMutVar (tcg_used_gres env) (imp_gres ++) }- where- imp_gres = filterOut isLocalGRE gres--warnIfDeprecated :: GlobalRdrElt -> RnM ()-warnIfDeprecated gre@(GRE { gre_imp = iss })- | Just imp_spec <- headMaybe iss- = do { dflags <- getDynFlags- ; this_mod <- getModule- ; when (wopt Opt_WarnWarningsDeprecations dflags &&- not (nameIsLocalOrFrom this_mod name)) $- -- See Note [Handling of deprecations]- do { iface <- loadInterfaceForName doc name- ; case lookupImpDeprec iface gre of- Just deprText -> addDiagnostic $- TcRnPragmaWarning {- pragma_warning_occ = occ,- pragma_warning_msg = deprText,- pragma_warning_import_mod = importSpecModule imp_spec,- pragma_warning_defined_mod = definedMod- }- Nothing -> return () } }- | otherwise- = return ()- where- occ = greOccName gre- name = greMangledName gre- definedMod = moduleName $ assertPpr (isExternalName name) (ppr name) (nameModule name)- doc = text "The name" <+> quotes (ppr occ) <+> text "is mentioned explicitly"--lookupImpDeprec :: ModIface -> GlobalRdrElt -> Maybe (WarningTxt GhcRn)-lookupImpDeprec iface gre- = mi_warn_fn (mi_final_exts iface) (greOccName gre) `mplus` -- Bleat if the thing,- case gre_par gre of -- or its parent, is warn'd- ParentIs p -> mi_warn_fn (mi_final_exts iface) (nameOccName p)- NoParent -> Nothing--{--Note [Used names with interface not loaded]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-It's (just) possible to find a used-Name whose interface hasn't been loaded:--a) It might be a WiredInName; in that case we may not load- its interface (although we could).--b) It might be GHC.Real.fromRational, or GHC.Num.fromInteger- These are seen as "used" by the renamer (if -XRebindableSyntax)- is on), but the typechecker may discard their uses- if in fact the in-scope fromRational is GHC.Read.fromRational,- (see tcPat.tcOverloadedLit), and the typechecker sees that the type- is fixed, say, to GHC.Base.Float (see Inst.lookupSimpleInst).- In that obscure case it won't force the interface in.--In both cases we simply don't permit deprecations;-this is, after all, wired-in stuff.---*********************************************************-* *- GHCi support-* *-*********************************************************--A qualified name on the command line can refer to any module at-all: we try to load the interface if we don't already have it, just-as if there was an "import qualified M" declaration for every-module.--For example, writing `Data.List.sort` will load the interface file for-`Data.List` as if the user had written `import qualified Data.List`.--If we fail we just return Nothing, rather than bleating-about "attempting to use module ‘D’ (./D.hs) which is not loaded"-which is what loadSrcInterface does.--It is enabled by default and disabled by the flag-`-fno-implicit-import-qualified`.--Note [Safe Haskell and GHCi]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We DON'T do this Safe Haskell as we need to check imports. We can-and should instead check the qualified import but at the moment-this requires some refactoring so leave as a TODO--Note [DuplicateRecordFields and -fimplicit-import-qualified]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When DuplicateRecordFields is used, a single module can export the same OccName-multiple times, for example:-- module M where- data S = MkS { foo :: Int }- data T = MkT { foo :: Int }--Now if we refer to M.foo via -fimplicit-import-qualified, we need to report an-ambiguity error.---}----- | Like 'lookupQualifiedNameGHCi' but returning at most one name, reporting an--- ambiguity error if there are more than one.-lookupOneQualifiedNameGHCi :: FieldsOrSelectors -> RdrName -> RnM (Maybe GreName)-lookupOneQualifiedNameGHCi fos rdr_name = do- gnames <- lookupQualifiedNameGHCi fos rdr_name- case gnames of- [] -> return Nothing- [gname] -> return (Just gname)- (gname:gnames') -> do addNameClashErrRn rdr_name (toGRE gname NE.:| map toGRE gnames')- return (Just (NormalGreName (mkUnboundNameRdr rdr_name)))- where- -- Fake a GRE so we can report a sensible name clash error if- -- -fimplicit-import-qualified is used with a module that exports the same- -- field name multiple times (see- -- Note [DuplicateRecordFields and -fimplicit-import-qualified]).- toGRE gname = GRE { gre_name = gname, gre_par = NoParent, gre_lcl = False, gre_imp = unitBag is }- is = ImpSpec { is_decl = ImpDeclSpec { is_mod = mod, is_as = mod, is_qual = True, is_dloc = noSrcSpan }- , is_item = ImpAll }- -- If -fimplicit-import-qualified succeeded, the name must be qualified.- (mod, _) = fromMaybe (pprPanic "lookupOneQualifiedNameGHCi" (ppr rdr_name)) (isQual_maybe rdr_name)----- | Look up *all* the names to which the 'RdrName' may refer in GHCi (using--- @-fimplicit-import-qualified@). This will normally be zero or one, but may--- be more in the presence of @DuplicateRecordFields@.-lookupQualifiedNameGHCi :: FieldsOrSelectors -> RdrName -> RnM [GreName]-lookupQualifiedNameGHCi fos rdr_name- = -- We want to behave as we would for a source file import here,- -- and respect hiddenness of modules/packages, hence loadSrcInterface.- do { dflags <- getDynFlags- ; is_ghci <- getIsGHCi- ; go_for_it dflags is_ghci }-- where- go_for_it dflags is_ghci- | Just (mod,occ) <- isQual_maybe rdr_name- , is_ghci- , gopt Opt_ImplicitImportQualified dflags -- Enables this GHCi behaviour- , not (safeDirectImpsReq dflags) -- See Note [Safe Haskell and GHCi]- = do { res <- loadSrcInterface_maybe doc mod NotBoot NoPkgQual- ; case res of- Succeeded iface- -> return [ gname- | avail <- mi_exports iface- , gname <- availGreNames avail- , occName gname == occ- -- Include a field if it has a selector or we are looking for all fields;- -- see Note [NoFieldSelectors].- , allowGreName fos gname- ]-- _ -> -- Either we couldn't load the interface, or- -- we could but we didn't find the name in it- do { traceRn "lookupQualifiedNameGHCi" (ppr rdr_name)- ; return [] } }-- | otherwise- = do { traceRn "lookupQualifiedNameGHCi: off" (ppr rdr_name)- ; return [] }-- doc = text "Need to find" <+> ppr rdr_name--{--Note [Looking up signature names]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-lookupSigOccRn is used for type signatures and pragmas-Is this valid?- module A- import M( f )- f :: Int -> Int- f x = x-It's clear that the 'f' in the signature must refer to A.f-The Haskell98 report does not stipulate this, but it will!-So we must treat the 'f' in the signature in the same way-as the binding occurrence of 'f', using lookupBndrRn--However, consider this case:- import M( f )- f :: Int -> Int- g x = x-We don't want to say 'f' is out of scope; instead, we want to-return the imported 'f', so that later on the renamer will-correctly report "misplaced type sig".--Note [Signatures for top level things]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-data HsSigCtxt = ... | TopSigCtxt NameSet | ....--* The NameSet says what is bound in this group of bindings.- We can't use isLocalGRE from the GlobalRdrEnv, because of this:- f x = x- $( ...some TH splice... )- f :: Int -> Int- When we encounter the signature for 'f', the binding for 'f'- will be in the GlobalRdrEnv, and will be a LocalDef. Yet the- signature is mis-placed--* For type signatures the NameSet should be the names bound by the- value bindings; for fixity declarations, the NameSet should also- include class sigs and record selectors-- infix 3 `f` -- Yes, ok- f :: C a => a -> a -- No, not ok- class C a where- f :: a -> a--}--data HsSigCtxt- = TopSigCtxt NameSet -- At top level, binding these names- -- See Note [Signatures for top level things]- | LocalBindCtxt NameSet -- In a local binding, binding these names- | ClsDeclCtxt Name -- Class decl for this class- | InstDeclCtxt NameSet -- Instance decl whose user-written method- -- bindings are for these methods- | HsBootCtxt NameSet -- Top level of a hs-boot file, binding these names- | RoleAnnotCtxt NameSet -- A role annotation, with the names of all types- -- in the group--instance Outputable HsSigCtxt where- ppr (TopSigCtxt ns) = text "TopSigCtxt" <+> ppr ns- ppr (LocalBindCtxt ns) = text "LocalBindCtxt" <+> ppr ns- ppr (ClsDeclCtxt n) = text "ClsDeclCtxt" <+> ppr n- ppr (InstDeclCtxt ns) = text "InstDeclCtxt" <+> ppr ns- ppr (HsBootCtxt ns) = text "HsBootCtxt" <+> ppr ns- ppr (RoleAnnotCtxt ns) = text "RoleAnnotCtxt" <+> ppr ns--lookupSigOccRn :: HsSigCtxt- -> Sig GhcPs- -> LocatedA RdrName -> RnM (LocatedA Name)-lookupSigOccRn ctxt sig = lookupSigCtxtOccRn ctxt (hsSigDoc sig)--lookupSigOccRnN :: HsSigCtxt- -> Sig GhcPs- -> LocatedN RdrName -> RnM (LocatedN Name)-lookupSigOccRnN ctxt sig = lookupSigCtxtOccRnN ctxt (hsSigDoc sig)----- | Lookup a name in relation to the names in a 'HsSigCtxt'-lookupSigCtxtOccRnN :: HsSigCtxt- -> SDoc -- ^ description of thing we're looking up,- -- like "type family"- -> LocatedN RdrName -> RnM (LocatedN Name)-lookupSigCtxtOccRnN ctxt what- = wrapLocMA $ \ rdr_name ->- do { mb_name <- lookupBindGroupOcc ctxt what rdr_name- ; case mb_name of- Left err -> do { addErr (mkTcRnNotInScope rdr_name err)- ; return (mkUnboundNameRdr rdr_name) }- Right name -> return name }---- | Lookup a name in relation to the names in a 'HsSigCtxt'-lookupSigCtxtOccRn :: HsSigCtxt- -> SDoc -- ^ description of thing we're looking up,- -- like "type family"- -> LocatedA RdrName -> RnM (LocatedA Name)-lookupSigCtxtOccRn ctxt what- = wrapLocMA $ \ rdr_name ->- do { mb_name <- lookupBindGroupOcc ctxt what rdr_name- ; case mb_name of- Left err -> do { addErr (mkTcRnNotInScope rdr_name err)- ; return (mkUnboundNameRdr rdr_name) }- Right name -> return name }--lookupBindGroupOcc :: HsSigCtxt- -> SDoc- -> RdrName -> RnM (Either NotInScopeError Name)--- Looks up the RdrName, expecting it to resolve to one of the--- bound names passed in. If not, return an appropriate error message------ See Note [Looking up signature names]-lookupBindGroupOcc ctxt what rdr_name- | Just n <- isExact_maybe rdr_name- = lookupExactOcc_either n -- allow for the possibility of missing Exacts;- -- see Note [dataTcOccs and Exact Names]- -- Maybe we should check the side conditions- -- but it's a pain, and Exact things only show- -- up when you know what you are doing-- | Just (rdr_mod, rdr_occ) <- isOrig_maybe rdr_name- = do { n' <- lookupOrig rdr_mod rdr_occ- ; return (Right n') }-- | otherwise- = case ctxt of- HsBootCtxt ns -> lookup_top (`elemNameSet` ns)- TopSigCtxt ns -> lookup_top (`elemNameSet` ns)- RoleAnnotCtxt ns -> lookup_top (`elemNameSet` ns)- LocalBindCtxt ns -> lookup_group ns- ClsDeclCtxt cls -> lookup_cls_op cls- InstDeclCtxt ns -> if uniqSetAny isUnboundName ns -- #16610- then return (Right $ mkUnboundNameRdr rdr_name)- else lookup_top (`elemNameSet` ns)- where- lookup_cls_op cls- = lookupSubBndrOcc True cls doc rdr_name- where- doc = text "method of class" <+> quotes (ppr cls)-- lookup_top keep_me- = do { env <- getGlobalRdrEnv- ; dflags <- getDynFlags- ; let all_gres = lookupGlobalRdrEnv env (rdrNameOcc rdr_name)- names_in_scope = -- If rdr_name lacks a binding, only- -- recommend alternatives from related- -- namespaces. See #17593.- filter (\n -> nameSpacesRelated dflags WL_Anything- (rdrNameSpace rdr_name)- (nameNameSpace n))- $ map greMangledName- $ filter isLocalGRE- $ globalRdrEnvElts env- candidates_msg = candidates names_in_scope- ; case filter (keep_me . greMangledName) all_gres of- [] | null all_gres -> bale_out_with candidates_msg- | otherwise -> bale_out_with local_msg- (gre:_) -> return (Right (greMangledName gre)) }-- lookup_group bound_names -- Look in the local envt (not top level)- = do { mname <- lookupLocalOccRn_maybe rdr_name- ; env <- getLocalRdrEnv- ; let candidates_msg = candidates $ localRdrEnvElts env- ; case mname of- Just n- | n `elemNameSet` bound_names -> return (Right n)- | otherwise -> bale_out_with local_msg- Nothing -> bale_out_with candidates_msg }-- bale_out_with hints = return (Left $ MissingBinding what hints)-- local_msg = [SuggestMoveToDeclarationSite what rdr_name]-- -- Identify all similar names and produce a message listing them- candidates :: [Name] -> [GhcHint]- candidates names_in_scope- | (nm : nms) <- map SimilarName similar_names- = [SuggestSimilarNames rdr_name (nm NE.:| nms)]- | otherwise- = []- where- similar_names- = fuzzyLookup (unpackFS $ occNameFS $ rdrNameOcc rdr_name)- $ map (\x -> ((unpackFS $ occNameFS $ nameOccName x), x))- names_in_scope-------------------lookupLocalTcNames :: HsSigCtxt -> SDoc -> RdrName -> RnM [(RdrName, Name)]--- GHC extension: look up both the tycon and data con or variable.--- Used for top-level fixity signatures and deprecations.--- Complain if neither is in scope.--- See Note [Fixity signature lookup]-lookupLocalTcNames ctxt what rdr_name- = do { mb_gres <- mapM lookup (dataTcOccs rdr_name)- ; let (errs, names) = partitionEithers mb_gres- ; when (null names) $- addErr (head errs) -- Bleat about one only- ; return names }- where- lookup rdr = do { this_mod <- getModule- ; nameEither <- lookupBindGroupOcc ctxt what rdr- ; return (guard_builtin_syntax this_mod rdr nameEither) }-- -- Guard against the built-in syntax (ex: `infixl 6 :`), see #15233- guard_builtin_syntax this_mod rdr (Right name)- | Just _ <- isBuiltInOcc_maybe (occName rdr)- , this_mod /= nameModule name- = Left $ TcRnIllegalBuiltinSyntax what rdr- | otherwise- = Right (rdr, name)- guard_builtin_syntax _ _ (Left err)- = Left $ mkTcRnNotInScope rdr_name err--dataTcOccs :: RdrName -> [RdrName]--- Return both the given name and the same name promoted to the TcClsName--- namespace. This is useful when we aren't sure which we are looking at.--- See also Note [dataTcOccs and Exact Names]-dataTcOccs rdr_name- | isDataOcc occ || isVarOcc occ- = [rdr_name, rdr_name_tc]- | otherwise- = [rdr_name]- where- occ = rdrNameOcc rdr_name- rdr_name_tc = setRdrNameSpace rdr_name tcName--{--Note [dataTcOccs and Exact Names]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Exact RdrNames can occur in code generated by Template Haskell, and generally-those references are, well, exact. However, the TH `Name` type isn't expressive-enough to always track the correct namespace information, so we sometimes get-the right Unique but wrong namespace. Thus, we still have to do the double-lookup-for Exact RdrNames.--There is also an awkward situation for built-in syntax. Example in GHCi- :info []-This parses as the Exact RdrName for nilDataCon, but we also want-the list type constructor.--Note that setRdrNameSpace on an Exact name requires the Name to be External,-which it always is for built in syntax.--}----{--************************************************************************-* *- Rebindable names- Dealing with rebindable syntax is driven by the- Opt_RebindableSyntax dynamic flag.-- In "deriving" code we don't want to use rebindable syntax- so we switch off the flag locally--* *-************************************************************************--Haskell 98 says that when you say "3" you get the "fromInteger" from the-Standard Prelude, regardless of what is in scope. However, to experiment-with having a language that is less coupled to the standard prelude, we're-trying a non-standard extension that instead gives you whatever "Prelude.fromInteger"-happens to be in scope. Then you can- import Prelude ()- import MyPrelude as Prelude-to get the desired effect.--At the moment this just happens for- * fromInteger, fromRational on literals (in expressions and patterns)- * negate (in expressions)- * minus (arising from n+k patterns)- * "do" notation--We store the relevant Name in the HsSyn tree, in- * HsIntegral/HsFractional/HsIsString- * NegApp- * NPlusKPat- * HsDo-respectively. Initially, we just store the "standard" name (GHC.Builtin.Names.fromIntegralName,-fromRationalName etc), but the renamer changes this to the appropriate user-name if Opt_NoImplicitPrelude is on. That is what lookupSyntax does.--We treat the original (standard) names as free-vars too, because the type checker-checks the type of the user thing against the type of the standard thing.--}--lookupIfThenElse :: RnM (Maybe Name)--- Looks up "ifThenElse" if rebindable syntax is on-lookupIfThenElse- = do { rebindable_on <- xoptM LangExt.RebindableSyntax- ; if not rebindable_on- then return Nothing- else do { ite <- lookupOccRnNone (mkVarUnqual (fsLit "ifThenElse"))- ; return (Just ite) } }--lookupSyntaxName :: Name -- ^ The standard name- -> RnM (Name, FreeVars) -- ^ Possibly a non-standard name--- Lookup a Name that may be subject to Rebindable Syntax (RS).------ - When RS is off, just return the supplied (standard) Name------ - When RS is on, look up the OccName of the supplied Name; return--- what we find, or the supplied Name if there is nothing in scope-lookupSyntaxName std_name- = do { rebind <- xoptM LangExt.RebindableSyntax- ; if not rebind- then return (std_name, emptyFVs)- else do { nm <- lookupOccRnNone (mkRdrUnqual (nameOccName std_name))- ; return (nm, unitFV nm) } }--lookupSyntaxExpr :: Name -- ^ The standard name- -> RnM (HsExpr GhcRn, FreeVars) -- ^ Possibly a non-standard name-lookupSyntaxExpr std_name- = do { (name, fvs) <- lookupSyntaxName std_name- ; return (nl_HsVar name, fvs) }--lookupSyntax :: Name -- The standard name- -> RnM (SyntaxExpr GhcRn, FreeVars) -- Possibly a non-standard- -- name-lookupSyntax std_name- = do { (expr, fvs) <- lookupSyntaxExpr std_name- ; return (mkSyntaxExpr expr, fvs) }--lookupSyntaxNames :: [Name] -- Standard names- -> RnM ([HsExpr GhcRn], FreeVars) -- See comments with HsExpr.ReboundNames- -- this works with CmdTop, which wants HsExprs, not SyntaxExprs-lookupSyntaxNames std_names- = do { rebindable_on <- xoptM LangExt.RebindableSyntax- ; if not rebindable_on then- return (map (HsVar noExtField . noLocA) std_names, emptyFVs)- else- do { usr_names <-- mapM (lookupOccRnNone . mkRdrUnqual . nameOccName) std_names- ; return (map (HsVar noExtField . noLocA) usr_names, mkFVs usr_names) } }---{--Note [QualifiedDo]-~~~~~~~~~~~~~~~~~~-QualifiedDo is implemented using the same placeholders for operation names in-the AST that were devised for RebindableSyntax. Whenever the renamer checks-which names to use for do syntax, it first checks if the do block is qualified-(e.g. M.do { stmts }), in which case it searches for qualified names. If the-qualified names are not in scope, an error is produced. If the do block is not-qualified, the renamer does the usual search of the names which considers-whether RebindableSyntax is enabled or not. Dealing with QualifiedDo is driven-by the Opt_QualifiedDo dynamic flag.--}---- Lookup operations for a qualified do. If the context is not a qualified--- do, then use lookupSyntaxExpr. See Note [QualifiedDo].-lookupQualifiedDoExpr :: HsStmtContext p -> Name -> RnM (HsExpr GhcRn, FreeVars)-lookupQualifiedDoExpr ctxt std_name- = first nl_HsVar <$> lookupQualifiedDoName ctxt std_name---- Like lookupQualifiedDoExpr but for producing SyntaxExpr.--- See Note [QualifiedDo].-lookupQualifiedDo- :: HsStmtContext p- -> Name- -> RnM (SyntaxExpr GhcRn, FreeVars)-lookupQualifiedDo ctxt std_name- = first mkSyntaxExpr <$> lookupQualifiedDoExpr ctxt std_name--lookupNameWithQualifier :: Name -> ModuleName -> RnM (Name, FreeVars)-lookupNameWithQualifier std_name modName- = do { qname <- lookupOccRnNone (mkRdrQual modName (nameOccName std_name))- ; return (qname, unitFV qname) }---- See Note [QualifiedDo].-lookupQualifiedDoName- :: HsStmtContext p- -> Name- -> RnM (Name, FreeVars)-lookupQualifiedDoName ctxt std_name- = case qualifiedDoModuleName_maybe ctxt of- Nothing -> lookupSyntaxName std_name- Just modName -> lookupNameWithQualifier std_name modName----- Error messages--badOrigBinding :: RdrName -> TcRnMessage-badOrigBinding name- | Just _ <- isBuiltInOcc_maybe occ = TcRnIllegalBindingOfBuiltIn occ- | otherwise = TcRnNameByTemplateHaskellQuote name- where- occ = rdrNameOcc $ filterCTuple name+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE GADTs #-}+{-# LANGUAGE MultiWayIf #-}+{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE TupleSections #-}++{-+(c) The GRASP/AQUA Project, Glasgow University, 1992-2006++GHC.Rename.Env contains functions which convert RdrNames into Names.++-}++module GHC.Rename.Env (+ newTopSrcBinder,++ lookupLocatedTopBndrRn, lookupLocatedTopBndrRnN, lookupTopBndrRn,+ lookupLocatedTopConstructorRn, lookupLocatedTopConstructorRnN,++ lookupLocatedOccRn, lookupLocatedOccRnConstr, lookupLocatedOccRnRecField,+ lookupLocatedOccRnNone,+ lookupOccRn, lookupOccRn_maybe, lookupSameOccRn_maybe,+ lookupLocalOccRn_maybe, lookupInfoOccRn,+ lookupLocalOccThLvl_maybe, lookupLocalOccRn,+ lookupTypeOccRn,+ lookupGlobalOccRn, lookupGlobalOccRn_maybe,++ lookupExprOccRn,+ lookupRecFieldOcc,+ lookupRecUpdFields,+ getFieldUpdLbl,+ getUpdFieldLbls,++ ChildLookupResult(..),+ lookupSubBndrOcc_helper,++ HsSigCtxt(..), lookupLocalTcNames, lookupSigOccRn, lookupSigOccRnN,+ lookupSigCtxtOccRn,++ lookupInstDeclBndr, lookupFamInstName,+ lookupConstructorInfo, lookupConstructorFields,+ lookupGREInfo,++ lookupGreAvailRn,++ -- Rebindable Syntax+ lookupSyntax, lookupSyntaxExpr, lookupSyntaxNames,+ lookupSyntaxName,+ lookupIfThenElse,++ -- QualifiedDo+ lookupQualifiedDoExpr, lookupQualifiedDo,+ lookupQualifiedDoName, lookupNameWithQualifier,++ -- Constructing usage information+ DeprecationWarnings(..),+ addUsedGRE, addUsedGREs, addUsedDataCons,++ dataTcOccs, --TODO: Move this somewhere, into utils?++ ) where++import GHC.Prelude++import Language.Haskell.Syntax.Basic (FieldLabelString(..))++import GHC.Iface.Load+import GHC.Iface.Env+import GHC.Hs+import GHC.Types.Name.Reader+import GHC.Tc.Errors.Types+import GHC.Tc.Errors.Ppr (pprScopeError)+import GHC.Tc.Utils.Env+import GHC.Tc.Types.LclEnv+import GHC.Tc.Utils.Monad+import GHC.Parser.PostProcess ( setRdrNameSpace )+import GHC.Builtin.Types+import GHC.Types.Name+import GHC.Types.Name.Set+import GHC.Types.Name.Env+import GHC.Types.Avail+import GHC.Types.Hint+import GHC.Types.Error+import GHC.Unit.Module+import GHC.Unit.Module.ModIface+import GHC.Unit.Module.Warnings ( WarningTxt(..) )+import GHC.Core.ConLike+import GHC.Core.DataCon+import GHC.Core.TyCon+import GHC.Builtin.Names( rOOT_MAIN )+import GHC.Types.Basic ( TopLevelFlag(..), TupleSort(..), tupleSortBoxity )+import GHC.Types.TyThing ( tyThingGREInfo )+import GHC.Types.SrcLoc as SrcLoc+import GHC.Utils.Outputable as Outputable+import GHC.Types.Unique.FM+import GHC.Types.Unique.Set+import GHC.Utils.Misc+import GHC.Utils.Panic+import GHC.Utils.Panic.Plain (assert)+import GHC.Data.Maybe+import GHC.Driver.Env+import GHC.Driver.Session+import GHC.Data.FastString+import GHC.Data.List.SetOps ( minusList )+import qualified GHC.LanguageExtensions as LangExt+import GHC.Rename.Unbound+import GHC.Rename.Utils+import GHC.Data.Bag+import GHC.Types.PkgQual+import GHC.Types.GREInfo++import Control.Arrow ( first )+import Control.Monad+import Data.Either ( partitionEithers )+import Data.Function ( on )+import Data.List ( find, partition, groupBy, sortBy )+import Data.Foldable ( for_ )+import qualified Data.List.NonEmpty as NE+import qualified Data.Semigroup as Semi+import System.IO.Unsafe ( unsafePerformIO )++{-+*********************************************************+* *+ Source-code binders+* *+*********************************************************++Note [Signature lazy interface loading]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++GHC's lazy interface loading can be a bit confusing, so this Note is an+empirical description of what happens in one interesting case. When+compiling a signature module against an its implementation, we do NOT+load interface files associated with its names until after the type+checking phase. For example:++ module ASig where+ data T+ f :: T -> T++Suppose we compile this with -sig-of "A is ASig":++ module B where+ data T = T+ f T = T++ module A(module B) where+ import B++During type checking, we'll load A.hi because we need to know what the+RdrEnv for the module is, but we DO NOT load the interface for B.hi!+It's wholly unnecessary: our local definition 'data T' in ASig is all+the information we need to finish type checking. This is contrast to+type checking of ordinary Haskell files, in which we would not have the+local definition "data T" and would need to consult B.hi immediately.+(Also, this situation never occurs for hs-boot files, since you're not+allowed to reexport from another module.)++After type checking, we then check that the types we provided are+consistent with the backing implementation (in checkHiBootOrHsigIface).+At this point, B.hi is loaded, because we need something to compare+against.++I discovered this behavior when trying to figure out why type class+instances for Data.Map weren't in the EPS when I was type checking a+test very much like ASig (sigof02dm): the associated interface hadn't+been loaded yet! (The larger issue is a moot point, since an instance+declared in a signature can never be a duplicate.)++This behavior might change in the future. Consider this+alternate module B:++ module B where+ {-# DEPRECATED T, f "Don't use" #-}+ data T = T+ f T = T++One might conceivably want to report deprecation warnings when compiling+ASig with -sig-of B, in which case we need to look at B.hi to find the+deprecation warnings during renaming. At the moment, you don't get any+warning until you use the identifier further downstream. This would+require adjusting addUsedGRE so that during signature compilation,+we do not report deprecation warnings for LocalDef. See also+Note [Handling of deprecations]+-}++newTopSrcBinder :: LocatedN RdrName -> RnM Name+newTopSrcBinder (L loc rdr_name)+ | Just name <- isExact_maybe rdr_name+ = -- This is here to catch+ -- (a) Exact-name binders created by Template Haskell+ -- (b) The PrelBase defn of (say) [] and similar, for which+ -- the parser reads the special syntax and returns an Exact RdrName+ -- We are at a binding site for the name, so check first that it+ -- the current module is the correct one; otherwise GHC can get+ -- very confused indeed. This test rejects code like+ -- data T = (,) Int Int+ -- unless we are in GHC.Tup+ if isExternalName name then+ do { this_mod <- getModule+ ; unless (this_mod == nameModule name)+ (addErrAt (locA loc) (TcRnBindingOfExistingName rdr_name))+ ; return name }+ else -- See Note [Binders in Template Haskell] in "GHC.ThToHs"+ do { this_mod <- getModule+ ; externaliseName this_mod name }++ | Just (rdr_mod, rdr_occ) <- isOrig_maybe rdr_name+ = do { this_mod <- getModule+ ; unless (rdr_mod == this_mod || rdr_mod == rOOT_MAIN)+ (addErrAt (locA loc) (TcRnBindingOfExistingName rdr_name))+ -- When reading External Core we get Orig names as binders,+ -- but they should agree with the module gotten from the monad+ --+ -- We can get built-in syntax showing up here too, sadly. If you type+ -- data T = (,,,)+ -- the constructor is parsed as a type, and then GHC.Parser.PostProcess.tyConToDataCon+ -- uses setRdrNameSpace to make it into a data constructors. At that point+ -- the nice Exact name for the TyCon gets swizzled to an Orig name.+ -- Hence the TcRnBindingOfExistingName error message.+ --++ -- MP 2022: I suspect this code path is never called for `rOOT_MAIN` anymore+ -- because External Core has been removed but we instead have some similar logic for+ -- serialising whole programs into interface files in GHC.IfaceToCore.mk_top_id.++ -- Except for the ":Main.main = ..." definition inserted into+ -- the Main module; ugh!++ -- Because of this latter case, we call newGlobalBinder with a module from+ -- the RdrName, not from the environment. In principle, it'd be fine to+ -- have an arbitrary mixture of external core definitions in a single module,+ -- (apart from module-initialisation issues, perhaps).+ ; newGlobalBinder rdr_mod rdr_occ (locA loc) }++ | otherwise+ = do { when (isQual rdr_name)+ (addErrAt (locA loc) (badQualBndrErr rdr_name))+ -- Binders should not be qualified; if they are, and with a different+ -- module name, we get a confusing "M.T is not in scope" error later++ ; stage <- getStage+ ; if isBrackStage stage then+ -- We are inside a TH bracket, so make an *Internal* name+ -- See Note [Top-level Names in Template Haskell decl quotes] in GHC.Rename.Names+ do { uniq <- newUnique+ ; return (mkInternalName uniq (rdrNameOcc rdr_name) (locA loc)) }+ else+ do { this_mod <- getModule+ ; traceRn "newTopSrcBinder" (ppr this_mod $$ ppr rdr_name $$ ppr (locA loc))+ ; newGlobalBinder this_mod (rdrNameOcc rdr_name) (locA loc) }+ }++{-+*********************************************************+* *+ Source code occurrences+* *+*********************************************************++Looking up a name in the GHC.Rename.Env.++Note [Type and class operator definitions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We want to reject all of these unless we have -XTypeOperators (#3265)+ data a :*: b = ...+ class a :*: b where ...+ data (:*:) a b = ....+ class (:*:) a b where ...+The latter two mean that we are not just looking for a+*syntactically-infix* declaration, but one that uses an operator+OccName. We use OccName.isSymOcc to detect that case, which isn't+terribly efficient, but there seems to be no better way.+-}++-- Can be made to not be exposed+-- Only used unwrapped in rnAnnProvenance+lookupTopBndrRn :: WhatLooking -> RdrName -> RnM Name+-- Look up a top-level source-code binder. We may be looking up an unqualified 'f',+-- and there may be several imported 'f's too, which must not confuse us.+-- For example, this is OK:+-- import Foo( f )+-- infix 9 f -- The 'f' here does not need to be qualified+-- f x = x -- Nor here, of course+-- So we have to filter out the non-local ones.+--+-- A separate function (importsFromLocalDecls) reports duplicate top level+-- decls, so here it's safe just to choose an arbitrary one.+lookupTopBndrRn which_suggest rdr_name =+ lookupExactOrOrig rdr_name greName $+ do { -- Check for operators in type or class declarations+ -- See Note [Type and class operator definitions]+ let occ = rdrNameOcc rdr_name+ ; when (isTcOcc occ && isSymOcc occ)+ (do { op_ok <- xoptM LangExt.TypeOperators+ ; unless op_ok (addErr (TcRnIllegalTypeOperatorDecl rdr_name)) })+ ; env <- getGlobalRdrEnv+ ; case filter isLocalGRE (lookupGRE env $ LookupRdrName rdr_name $ RelevantGREsFOS WantNormal) of+ [gre] -> return (greName gre)+ _ -> do -- Ambiguous (can't happen) or unbound+ traceRn "lookupTopBndrRN fail" (ppr rdr_name)+ unboundName (LF which_suggest WL_LocalTop) rdr_name+ }++lookupLocatedTopConstructorRn :: Located RdrName -> RnM (Located Name)+lookupLocatedTopConstructorRn = wrapLocM (lookupTopBndrRn WL_Constructor)++lookupLocatedTopConstructorRnN :: LocatedN RdrName -> RnM (LocatedN Name)+lookupLocatedTopConstructorRnN = wrapLocMA (lookupTopBndrRn WL_Constructor)++lookupLocatedTopBndrRn :: Located RdrName -> RnM (Located Name)+lookupLocatedTopBndrRn = wrapLocM (lookupTopBndrRn WL_Anything)++lookupLocatedTopBndrRnN :: LocatedN RdrName -> RnM (LocatedN Name)+lookupLocatedTopBndrRnN = wrapLocMA (lookupTopBndrRn WL_Anything)++-- | Lookup an @Exact@ @RdrName@. See Note [Looking up Exact RdrNames].+-- This never adds an error, but it may return one, see+-- Note [Errors in lookup functions]+lookupExactOcc_either :: Name -> RnM (Either NotInScopeError GlobalRdrElt)+lookupExactOcc_either name+ | Just thing <- wiredInNameTyThing_maybe name+ , Just tycon <- case thing of+ ATyCon tc -> Just tc+ AConLike (RealDataCon dc) -> Just (dataConTyCon dc)+ _ -> Nothing+ , Just tupleSort <- tyConTuple_maybe tycon+ = do { let tupArity = case tupleSort of+ -- Unboxed tuples have twice as many arguments because of the+ -- 'RuntimeRep's (#17837)+ UnboxedTuple -> tyConArity tycon `div` 2+ _ -> tyConArity tycon+ ; let info = case thing of+ ATyCon {} -> IAmTyCon $ TupleFlavour $ tupleSortBoxity tupleSort+ _ -> IAmConLike $ mkConInfo tupArity []+ ; checkTupSize tupArity+ ; return $ Right $ mkExactGRE name info }++ | isExternalName name+ = do { info <- lookupExternalExactName name+ ; return $ Right $ mkExactGRE name info }++ | otherwise+ = lookupLocalExactGRE name++lookupExternalExactName :: Name -> RnM GREInfo+lookupExternalExactName name+ = do { thing <-+ case wiredInNameTyThing_maybe name of+ Just thing -> return thing+ _ -> tcLookupGlobal name+ ; return $ tyThingGREInfo thing }++lookupLocalExactGRE :: Name -> RnM (Either NotInScopeError GlobalRdrElt)+lookupLocalExactGRE name+ = do { env <- getGlobalRdrEnv+ ; let lk = LookupExactName { lookupExactName = name+ , lookInAllNameSpaces = True }+ -- We want to check for clashes where the same Unique+ -- occurs in two different NameSpaces, as per+ -- Note [Template Haskell ambiguity]. So we+ -- check ALL namespaces, not just the NameSpace of the Name.+ -- See test cases T9066, T11809.+ ; case lookupGRE env lk of+ [gre] -> return (Right gre)++ [] -> -- See Note [Splicing Exact names]+ do { lcl_env <- getLocalRdrEnv+ ; let gre = mkLocalVanillaGRE NoParent name -- LocalRdrEnv only contains Vanilla things+ ; if name `inLocalRdrEnvScope` lcl_env+ then return (Right gre)+ else+ do { th_topnames_var <- fmap tcg_th_topnames getGblEnv+ ; th_topnames <- readTcRef th_topnames_var+ ; if name `elemNameSet` th_topnames+ then return (Right gre)+ else return (Left (NoExactName name))+ }+ }++ gres -> return (Left (SameName gres)) }+ -- Ugh! See Note [Template Haskell ambiguity] }++-----------------------------------------------+lookupInstDeclBndr :: Name -> SDoc -> RdrName -> RnM Name+-- This is called on the method name on the left-hand side of an+-- instance declaration binding. eg. instance Functor T where+-- fmap = ...+-- ^^^^ called on this+-- Regardless of how many unqualified fmaps are in scope, we want+-- the one that comes from the Functor class.+--+-- Furthermore, note that we take no account of whether the+-- name is only in scope qualified. I.e. even if method op is+-- in scope as M.op, we still allow plain 'op' on the LHS of+-- an instance decl+--+-- The "what" parameter says "method" or "associated type",+-- depending on what we are looking up+lookupInstDeclBndr cls what rdr+ = do { when (isQual rdr)+ (addErr (badQualBndrErr rdr))+ -- In an instance decl you aren't allowed+ -- to use a qualified name for the method+ -- (Although it'd make perfect sense.)+ ; mb_name <- lookupSubBndrOcc+ NoDeprecationWarnings+ -- we don't give deprecated+ -- warnings when a deprecated class+ -- method is defined. We only warn+ -- when it's used+ cls doc rdr+ ; case mb_name of+ Left err -> do { addErr (mkTcRnNotInScope rdr err)+ ; return (mkUnboundNameRdr rdr) }+ Right nm -> return nm }+ where+ doc = what <+> text "of class" <+> quotes (ppr cls)++-----------------------------------------------+lookupFamInstName :: Maybe Name -> LocatedN RdrName+ -> RnM (LocatedN Name)+-- Used for TyData and TySynonym family instances only,+-- See Note [Family instance binders]+lookupFamInstName (Just cls) tc_rdr -- Associated type; c.f GHC.Rename.Bind.rnMethodBind+ = wrapLocMA (lookupInstDeclBndr cls (text "associated type")) tc_rdr+lookupFamInstName Nothing tc_rdr -- Family instance; tc_rdr is an *occurrence*+ = lookupLocatedOccRnConstr tc_rdr++-----------------------------------------------+lookupConstructorFields :: HasDebugCallStack => Name -> RnM [FieldLabel]+lookupConstructorFields = fmap conInfoFields . lookupConstructorInfo++-- | Look up the arity and record fields of a constructor.+lookupConstructorInfo :: HasDebugCallStack => Name -> RnM ConInfo+lookupConstructorInfo con_name+ = do { info <- lookupGREInfo_GRE con_name+ ; case info of+ IAmConLike con_info -> return con_info+ UnboundGRE -> return ConHasPositionalArgs+ _ -> pprPanic "lookupConstructorInfo: not a ConLike" $+ vcat [ text "name:" <+> ppr con_name ]+ }++-- In CPS style as `RnM r` is monadic+-- Reports an error if the name is an Exact or Orig and it can't find the name+-- Otherwise if it is not an Exact or Orig, returns k+lookupExactOrOrig :: RdrName -> (GlobalRdrElt -> r) -> RnM r -> RnM r+lookupExactOrOrig rdr_name res k+ = do { men <- lookupExactOrOrig_base rdr_name+ ; case men of+ FoundExactOrOrig gre -> return $ res gre+ NotExactOrOrig -> k+ ExactOrOrigError e ->+ do { addErr (mkTcRnNotInScope rdr_name e)+ ; return $ res (mkUnboundGRERdr rdr_name) } }++-- Variant of 'lookupExactOrOrig' that does not report an error+-- See Note [Errors in lookup functions]+-- Calls k if the name is neither an Exact nor Orig+lookupExactOrOrig_maybe :: RdrName -> (Maybe GlobalRdrElt -> r) -> RnM r -> RnM r+lookupExactOrOrig_maybe rdr_name res k+ = do { men <- lookupExactOrOrig_base rdr_name+ ; case men of+ FoundExactOrOrig gre -> return (res (Just gre))+ ExactOrOrigError _ -> return (res Nothing)+ NotExactOrOrig -> k }++data ExactOrOrigResult+ = FoundExactOrOrig GlobalRdrElt+ -- ^ Found an Exact Or Orig Name+ | ExactOrOrigError NotInScopeError+ -- ^ The RdrName was an Exact+ -- or Orig, but there was an+ -- error looking up the Name+ | NotExactOrOrig+ -- ^ The RdrName is neither an Exact nor Orig++-- Does the actual looking up an Exact or Orig name, see 'ExactOrOrigResult'+lookupExactOrOrig_base :: RdrName -> RnM ExactOrOrigResult+lookupExactOrOrig_base rdr_name+ | Just n <- isExact_maybe rdr_name -- This happens in derived code+ = cvtEither <$> lookupExactOcc_either n+ | Just (rdr_mod, rdr_occ) <- isOrig_maybe rdr_name+ = do { nm <- lookupOrig rdr_mod rdr_occ++ ; this_mod <- getModule+ ; mb_gre <-+ if nameIsLocalOrFrom this_mod nm+ then lookupLocalExactGRE nm+ else do { info <- lookupExternalExactName nm+ ; return $ Right $ mkExactGRE nm info }+ ; return $ case mb_gre of+ Left err -> ExactOrOrigError err+ Right gre -> FoundExactOrOrig gre }+ | otherwise = return NotExactOrOrig+ where+ cvtEither (Left e) = ExactOrOrigError e+ cvtEither (Right gre) = FoundExactOrOrig gre++{- Note [Errors in lookup functions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Many of these lookup functions will attach an error if it can't find the Name it+is trying to lookup. However there are also _maybe and _either variants for many+of these functions.++These variants should *not* attach any errors, as there are+places where we want to attempt looking up a name, but it's not the end of the+world if we don't find it.++For example, see lookupThName_maybe: It calls lookupOccRn_maybe multiple+times for varying names in different namespaces. lookupOccRn_maybe should+therefore never attach an error, instead just return a Nothing.++For these _maybe/_either variant functions then, avoid calling further lookup+functions that can attach errors and instead call their _maybe/_either+counterparts.+-}++-----------------------------------------------+-- | Look up an occurrence of a field in record construction or pattern+-- matching (but not update).+--+-- If -XDisambiguateRecordFields is off, then we will pass 'Nothing' for the+-- 'DataCon' 'Name', i.e. we don't use the data constructor for disambiguation.+-- See Note [DisambiguateRecordFields] and Note [NoFieldSelectors].+lookupRecFieldOcc :: Maybe Name -- Nothing => just look it up as usual+ -- Just con => use data con to disambiguate+ -> RdrName+ -> RnM Name+lookupRecFieldOcc mb_con rdr_name+ | Just con <- mb_con+ , isUnboundName con -- Avoid error cascade+ = return $ mk_unbound_rec_fld con+ | Just con <- mb_con+ = do { let lbl = FieldLabelString $ occNameFS (rdrNameOcc rdr_name)+ ; mb_nm <- lookupExactOrOrig rdr_name ensure_recfld $ -- See Note [Record field names and Template Haskell]+ do { flds <- lookupConstructorFields con+ ; env <- getGlobalRdrEnv+ ; let mb_gre = do fl <- find ((== lbl) . flLabel) flds+ -- We have the label, now check it is in scope. If+ -- there is a qualifier, use pickGREs to check that+ -- the qualifier is correct, and return the filtered+ -- GRE so we get import usage right (see #17853).+ gre <- lookupGRE_FieldLabel env fl+ if isQual rdr_name+ then listToMaybe $ pickGREs rdr_name [gre]+ else return gre+ ; traceRn "lookupRecFieldOcc" $+ vcat [ text "mb_con:" <+> ppr mb_con+ , text "rdr_name:" <+> ppr rdr_name+ , text "flds:" <+> ppr flds+ , text "mb_gre:" <+> ppr mb_gre ]+ ; mapM_ (addUsedGRE AllDeprecationWarnings) mb_gre+ ; return $ flSelector . fieldGRELabel <$> mb_gre }+ ; case mb_nm of+ { Nothing -> do { addErr (badFieldConErr con lbl)+ ; return $ mk_unbound_rec_fld con }+ ; Just nm -> return nm } }++ | otherwise -- Can't use the data constructor to disambiguate+ = lookupGlobalOccRn' (RelevantGREsFOS WantField) rdr_name+ -- This use of Global is right as we are looking up a selector,+ -- which can only be defined at the top level.++ where+ -- When lookup fails, make an unbound name with the right record field+ -- namespace, as that's what we expect to be returned+ -- from 'lookupRecFieldOcc'. See T14307.+ mk_unbound_rec_fld con = mkUnboundName $+ mkRecFieldOccFS (getOccFS con) (occNameFS occ)+ occ = rdrNameOcc rdr_name++ ensure_recfld :: GlobalRdrElt -> Maybe Name+ ensure_recfld gre = do { guard (isRecFldGRE gre)+ ; return $ greName gre }++{- 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 [DisambiguateRecordFields for updates]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we are looking up record fields in record update, we can take advantage of+the fact that we know we are looking for a field, even though we do not know the+data constructor name (as in Note [DisambiguateRecordFields]), provided the+-XDisambiguateRecordFields flag is on.++For example, consider:++ module N where+ f = ()++ {-# LANGUAGE DisambiguateRecordFields #-}+ module M where+ import N (f)+ data T = MkT { f :: Int }+ t = MkT { f = 1 } -- unambiguous because MkT determines which field we mean+ u = t { f = 2 } -- unambiguous because we ignore the non-field 'f'++We filter out non-fields in lookupFieldGREs by using isRecFldGRE, which allows+us to accept the above program.+Of course, if a record update has two fields in scope with the same name,+it is still ambiguous.++We also look up the non-fields with the same textual name++ 1. to throw an error if the user hasn't enabled DisambiguateRecordFields,+ 2. in order to improve the error message when a user mistakenly tries to use+ a non-field in a record update:++ f = ()+ e x = x { f = () }++Unlike with constructors or pattern-matching, we do not allow the module+qualifier to be omitted from the field names, because we do not have a+data constructor to use to determine the appropriate qualifier.++This is all done in the function lookupFieldGREs, which is called by+GHC.Rename.Pat.rnHsRecUpdFields, which deals with record updates.++Note [Record field names and Template Haskell]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (#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 -> DeprecationWarnings+ -> Name+ -> RdrName -- ^ thing we are looking up+ -> LookupChild -- ^ how to look it up (e.g. which+ -- 'NameSpace's to look in)+ -> RnM ChildLookupResult+lookupSubBndrOcc_helper must_have_parent warn_if_deprec parent rdr_name how_lkup+ | isUnboundName parent+ -- Avoid an error cascade+ = return (FoundChild (mkUnboundGRERdr rdr_name))++ | otherwise = do+ gre_env <- getGlobalRdrEnv+ let original_gres = lookupGRE gre_env (LookupChildren (rdrNameOcc rdr_name) how_lkup)+ -- The remaining GREs are things that we *could* export here, note that+ -- this includes things which have `NoParent`. Those are sorted in+ -- `checkPatSynParent`.+ traceRn "parent" (ppr parent)+ traceRn "lookupExportChild original_gres:" (ppr original_gres)+ traceRn "lookupExportChild picked_gres:" (ppr (picked_gres original_gres) $$ ppr must_have_parent)+ case picked_gres original_gres of+ NoOccurrence ->+ noMatchingParentErr original_gres+ UniqueOccurrence g ->+ if must_have_parent+ then noMatchingParentErr original_gres+ else checkFld g+ DisambiguatedOccurrence g ->+ checkFld g+ AmbiguousOccurrence gres ->+ mkNameClashErr gres+ where+ checkFld :: GlobalRdrElt -> RnM ChildLookupResult+ checkFld g = do+ addUsedGRE warn_if_deprec g+ return $ FoundChild g++ -- Called when we find no matching GREs after disambiguation but+ -- there are three situations where this happens.+ -- 1. There were none to begin with.+ -- 2. None of the matching ones were the parent but+ -- a. They were from an overloaded record field so we can report+ -- a better error+ -- b. The original lookup was actually ambiguous.+ -- For example, the case where overloading is off and two+ -- record fields are in scope from different record+ -- constructors, neither of which is the parent.+ noMatchingParentErr :: [GlobalRdrElt] -> RnM ChildLookupResult+ noMatchingParentErr original_gres = do+ traceRn "npe" (ppr original_gres)+ dup_fields_ok <- xoptM LangExt.DuplicateRecordFields+ case original_gres of+ [] -> return NameNotFound+ [g] -> return $ IncorrectParent parent g+ [p | ParentIs p <- [greParent g]]+ gss@(g:gss'@(_:_)) ->+ if all isRecFldGRE gss && dup_fields_ok+ then return $+ IncorrectParent parent g+ [p | x <- gss, ParentIs p <- [greParent x]]+ else mkNameClashErr $ g NE.:| gss'++ mkNameClashErr :: NE.NonEmpty GlobalRdrElt -> RnM ChildLookupResult+ mkNameClashErr gres = do+ addNameClashErrRn rdr_name gres+ return (FoundChild (NE.head gres))++ picked_gres :: [GlobalRdrElt] -> DisambigInfo+ -- For Unqual, find GREs that are in scope qualified or unqualified+ -- For Qual, find GREs that are in scope with that qualification+ picked_gres gres+ | isUnqual rdr_name+ = mconcat (map right_parent gres)+ | otherwise+ = mconcat (map right_parent (pickGREs rdr_name gres))++ right_parent :: GlobalRdrElt -> DisambigInfo+ right_parent p+ = case greParent p of+ ParentIs cur_parent+ | parent == cur_parent -> DisambiguatedOccurrence p+ | otherwise -> NoOccurrence+ NoParent -> UniqueOccurrence p+{-# INLINEABLE lookupSubBndrOcc_helper #-}++-- This domain specific datatype is used to record why we decided it was+-- possible that a GRE could be exported with a parent.+data DisambigInfo+ = NoOccurrence+ -- The GRE could never be exported. It has the wrong parent.+ | UniqueOccurrence GlobalRdrElt+ -- The GRE has no parent. It could be a pattern synonym.+ | DisambiguatedOccurrence GlobalRdrElt+ -- The parent of the GRE is the correct parent+ | AmbiguousOccurrence (NE.NonEmpty GlobalRdrElt)+ -- For example, two normal identifiers with the same name are in+ -- scope. They will both be resolved to "UniqueOccurrence" and the+ -- monoid will combine them to this failing case.++instance Outputable DisambigInfo where+ ppr NoOccurrence = text "NoOccurrence"+ ppr (UniqueOccurrence gre) = text "UniqueOccurrence:" <+> ppr gre+ ppr (DisambiguatedOccurrence gre) = text "DiambiguatedOccurrence:" <+> ppr gre+ ppr (AmbiguousOccurrence gres) = text "Ambiguous:" <+> ppr gres++instance Semi.Semigroup DisambigInfo where+ -- This is the key line: We prefer disambiguated occurrences to other+ -- names.+ _ <> DisambiguatedOccurrence g' = DisambiguatedOccurrence g'+ DisambiguatedOccurrence g' <> _ = DisambiguatedOccurrence g'++ NoOccurrence <> m = m+ m <> NoOccurrence = m+ UniqueOccurrence g <> UniqueOccurrence g'+ = AmbiguousOccurrence $ g NE.:| [g']+ UniqueOccurrence g <> AmbiguousOccurrence gs+ = AmbiguousOccurrence (g `NE.cons` gs)+ AmbiguousOccurrence gs <> UniqueOccurrence g'+ = AmbiguousOccurrence (g' `NE.cons` gs)+ AmbiguousOccurrence gs <> AmbiguousOccurrence gs'+ = AmbiguousOccurrence (gs Semi.<> gs')++instance Monoid DisambigInfo where+ mempty = NoOccurrence+ mappend = (Semi.<>)++-- Lookup SubBndrOcc can never be ambiguous+--+-- Records the result of looking up a child.+data ChildLookupResult+ -- | We couldn't find a suitable name+ = NameNotFound+ -- | The child has an incorrect parent+ | IncorrectParent Name -- ^ parent+ GlobalRdrElt -- ^ child we were looking for+ [Name] -- ^ list of possible parents+ -- | We resolved to a child+ | FoundChild GlobalRdrElt++instance Outputable ChildLookupResult where+ ppr NameNotFound = text "NameNotFound"+ ppr (FoundChild n) = text "Found:" <+> ppr (greParent n) <+> ppr n+ ppr (IncorrectParent p g ns)+ = text "IncorrectParent"+ <+> hsep [ppr p, ppr $ greName g, ppr ns]++lookupSubBndrOcc :: DeprecationWarnings+ -> Name -- Parent+ -> SDoc+ -> RdrName+ -> RnM (Either NotInScopeError Name)+-- ^ Find all the things the 'RdrName' maps to,+-- and pick the one with the right 'Parent' 'Name'.+lookupSubBndrOcc warn_if_deprec the_parent doc rdr_name =+ lookupExactOrOrig rdr_name (Right . greName) $+ -- This happens for built-in classes, see mod052 for example+ do { child <- lookupSubBndrOcc_helper True warn_if_deprec the_parent rdr_name what_lkup+ ; return $ case child of+ FoundChild g -> Right (greName g)+ NameNotFound -> Left (UnknownSubordinate doc)+ IncorrectParent {} -> Left (UnknownSubordinate doc) }+ -- See [Mismatched class methods and associated type families]+ -- in TcInstDecls.+ where+ what_lkup = LookupChild { wantedParent = the_parent+ , lookupDataConFirst = False+ , prioritiseParent = True -- See T23664.+ }+{-+Note [Family instance binders]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+ data family F a+ data instance F T = X1 | X2++The 'data instance' decl has an *occurrence* of F (and T), and *binds*+X1 and X2. (This is unlike a normal data type declaration which would+bind F too.) So we want an AvailTC F [X1,X2].++Now consider a similar pair:+ class C a where+ data G a+ instance C S where+ data G S = Y1 | Y2++The 'data G S' *binds* Y1 and Y2, and has an *occurrence* of G.++But there is a small complication: in an instance decl, we don't use+qualified names on the LHS; instead we use the class to disambiguate.+Thus:+ module M where+ import Blib( G )+ class C a where+ data G a+ instance C S where+ data G S = Y1 | Y2+Even though there are two G's in scope (M.G and Blib.G), the occurrence+of 'G' in the 'instance C S' decl is unambiguous, because C has only+one associated type called G. This is exactly what happens for methods,+and it is only consistent to do the same thing for types. That's the+role of the function lookupTcdName; the (Maybe Name) give the class of+the enclosing instance decl, if any.++Note [Looking up Exact RdrNames]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Exact RdrNames are generated by:++* Template Haskell (See Note [Binders in Template Haskell] in GHC.ThToHs)+* Derived instances (See Note [Auxiliary binders] in GHC.Tc.Deriv.Generate)++For data types and classes have Exact system Names in the binding+positions for constructors, TyCons etc. For example+ [d| data T = MkT Int |]+when we splice in and convert to HsSyn RdrName, we'll get+ data (Exact (system Name "T")) = (Exact (system Name "MkT")) ...+These System names are generated by GHC.ThToHs.thRdrName++But, constructors and the like need External Names, not System Names!+So we do the following++ * In GHC.Rename.Env.newTopSrcBinder we spot Exact RdrNames that wrap a+ non-External Name, and make an External name for it. This is+ the name that goes in the GlobalRdrEnv++ * When looking up an occurrence of an Exact name, done in+ GHC.Rename.Env.lookupExactOcc, we find the Name with the right unique in the+ GlobalRdrEnv, and use the one from the envt -- it will be an+ External Name in the case of the data type/constructor above.++ * Exact names are also use for purely local binders generated+ by TH, such as \x_33. x_33+ Both binder and occurrence are Exact RdrNames. The occurrence+ gets looked up in the LocalRdrEnv by GHC.Rename.Env.lookupOccRn, and+ misses, because lookupLocalRdrEnv always returns Nothing for+ an Exact Name. Now we fall through to lookupExactOcc, which+ will find the Name is not in the GlobalRdrEnv, so we just use+ the Exact supplied Name.++Note [Splicing Exact names]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider the splice $(do { x <- newName "x"; return (VarE x) })+This will generate a (HsExpr RdrName) term that mentions the+Exact RdrName "x_56" (or whatever), but does not bind it. So+when looking such Exact names we want to check that it's in scope,+otherwise the type checker will get confused. To do this we need to+keep track of all the Names in scope, and the LocalRdrEnv does just that;+we consult it with RdrName.inLocalRdrEnvScope.++There is another wrinkle. With TH and -XDataKinds, consider+ $( [d| data Nat = Zero+ data T = MkT (Proxy 'Zero) |] )+After splicing, but before renaming we get this:+ data Nat_77{tc} = Zero_78{d}+ data T_79{tc} = MkT_80{d} (Proxy 'Zero_78{tc}) |] )+The occurrence of 'Zero in the data type for T has the right unique,+but it has a TcClsName name-space in its OccName. (This is set by+the ctxt_ns argument of Convert.thRdrName.) When we check that is+in scope in the GlobalRdrEnv, we need to look up the DataName namespace+too. (An alternative would be to make the GlobalRdrEnv also have+a Name -> GRE mapping.)++Note [Template Haskell ambiguity]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The GlobalRdrEnv invariant says that if+ occ -> [gre1, ..., gren]+then the gres have distinct Names (INVARIANT 1 of GlobalRdrEnv).+This is guaranteed by extendGlobalRdrEnvRn (the dups check in add_gre).++So how can we get multiple gres in lookupExactOcc_maybe? Because in+TH we might use the same TH NameU in two different name spaces.+eg (#7241):+ $(newName "Foo" >>= \o -> return [DataD [] o [] [RecC o []] [''Show]])+Here we generate a type constructor and data constructor with the same+unique, but different name spaces.++It'd be nicer to rule this out in extendGlobalRdrEnvRn, but that would+mean looking up the OccName in every name-space, just in case, and that+seems a bit brutal. So it's just done here on lookup. But we might+need to revisit that choice.++Note [Usage for sub-bndrs]+~~~~~~~~~~~~~~~~~~~~~~~~~~+If you have this+ import qualified M( C( f ) )+ instance M.C T where+ f x = x+then is the qualified import M.f used? Obviously yes.+But the RdrName used in the instance decl is unqualified. In effect,+we fill in the qualification by looking for f's whose class is M.C+But when adding to the UsedRdrNames we must make that qualification+explicit (saying "used M.f"), otherwise we get "Redundant import of M.f".++So we make up a suitable (fake) RdrName. But be careful+ import qualified M+ import M( C(f) )+ instance C T where+ f x = x+Here we want to record a use of 'f', not of 'M.f', otherwise+we'll miss the fact that the qualified import is redundant.++--------------------------------------------------+-- Occurrences+--------------------------------------------------+-}+++lookupLocatedOccRn :: GenLocated (SrcSpanAnn' ann) RdrName+ -> TcRn (GenLocated (SrcSpanAnn' ann) Name)+lookupLocatedOccRn = wrapLocMA lookupOccRn++lookupLocatedOccRnConstr :: GenLocated (SrcSpanAnn' ann) RdrName+ -> TcRn (GenLocated (SrcSpanAnn' ann) Name)+lookupLocatedOccRnConstr = wrapLocMA lookupOccRnConstr++lookupLocatedOccRnRecField :: GenLocated (SrcSpanAnn' ann) RdrName+ -> TcRn (GenLocated (SrcSpanAnn' ann) Name)+lookupLocatedOccRnRecField = wrapLocMA lookupOccRnRecField++lookupLocatedOccRnNone :: GenLocated (SrcSpanAnn' ann) RdrName+ -> TcRn (GenLocated (SrcSpanAnn' ann) Name)+lookupLocatedOccRnNone = wrapLocMA lookupOccRnNone++lookupLocalOccRn_maybe :: RdrName -> RnM (Maybe Name)+-- Just look in the local environment+lookupLocalOccRn_maybe rdr_name+ = do { local_env <- getLocalRdrEnv+ ; return (lookupLocalRdrEnv local_env rdr_name) }++lookupLocalOccThLvl_maybe :: Name -> RnM (Maybe (TopLevelFlag, ThLevel))+-- Just look in the local environment+lookupLocalOccThLvl_maybe name+ = do { lcl_env <- getLclEnv+ ; return (lookupNameEnv (getLclEnvThBndrs lcl_env) name) }++-- lookupOccRn' looks up an occurrence of a RdrName, and uses its argument to+-- determine what kind of suggestions should be displayed if it is not in scope+lookupOccRn' :: WhatLooking -> RdrName -> RnM Name+lookupOccRn' which_suggest rdr_name+ = do { mb_gre <- lookupOccRn_maybe rdr_name+ ; case mb_gre of+ Just gre -> return $ greName gre+ Nothing -> reportUnboundName' which_suggest rdr_name }++-- lookupOccRn looks up an occurrence of a RdrName and displays suggestions if+-- it is not in scope+lookupOccRn :: RdrName -> RnM Name+lookupOccRn = lookupOccRn' WL_Anything++-- lookupOccRnConstr looks up an occurrence of a RdrName and displays+-- constructors and pattern synonyms as suggestions if it is not in scope+lookupOccRnConstr :: RdrName -> RnM Name+lookupOccRnConstr = lookupOccRn' WL_Constructor++-- lookupOccRnRecField looks up an occurrence of a RdrName and displays+-- record fields as suggestions if it is not in scope+lookupOccRnRecField :: RdrName -> RnM Name+lookupOccRnRecField = lookupOccRn' WL_RecField++-- lookupOccRnRecField looks up an occurrence of a RdrName and displays+-- no suggestions if it is not in scope+lookupOccRnNone :: RdrName -> RnM Name+lookupOccRnNone = lookupOccRn' WL_None++-- Only used in one place, to rename pattern synonym binders.+-- See Note [Renaming pattern synonym variables] in GHC.Rename.Bind+lookupLocalOccRn :: RdrName -> RnM Name+lookupLocalOccRn rdr_name+ = do { mb_name <- lookupLocalOccRn_maybe rdr_name+ ; case mb_name of+ Just name -> return name+ Nothing -> unboundName (LF WL_Anything WL_LocalOnly) rdr_name }++-- lookupTypeOccRn looks up an optionally promoted RdrName.+-- Used for looking up type variables.+lookupTypeOccRn :: RdrName -> RnM Name+-- see Note [Demotion]+lookupTypeOccRn rdr_name+ | (isVarOcc <||> isFieldOcc) (rdrNameOcc rdr_name) -- See Note [Promoted variables in types]+ = badVarInType rdr_name+ | otherwise+ = do { mb_gre <- lookupOccRn_maybe rdr_name+ ; case mb_gre of+ Just gre -> return $ greName gre+ Nothing ->+ if occName rdr_name == occName eqTyCon_RDR -- See Note [eqTyCon (~) compatibility fallback]+ then eqTyConName <$ addDiagnostic TcRnTypeEqualityOutOfScope+ else lookup_demoted rdr_name }++{- Note [eqTyCon (~) compatibility fallback]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Before GHC Proposal #371, the (~) type operator used in type equality+constraints (a~b) was considered built-in syntax.++This had two implications:++1. Users could use it without importing it from Data.Type.Equality or Prelude.+2. TypeOperators were not required to use it (it was guarded behind TypeFamilies/GADTs instead)++To ease migration and minimize breakage, we continue to support those usages+but emit appropriate warnings.+-}++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 is_star_type = if star_is_type then StarIsType else StarIsNotType+ star_is_type_hints = noStarIsTypeHints is_star_type rdr_name+ ; if data_kinds+ then do { mb_demoted_gre <- lookupOccRn_maybe demoted_rdr+ ; case mb_demoted_gre of+ Nothing -> unboundNameX looking_for rdr_name star_is_type_hints+ Just demoted_gre -> return $ greName demoted_gre}+ else do { -- We need to check if a data constructor of this name is+ -- in scope to give good error messages. However, we do+ -- not want to give an additional error if the data+ -- constructor happens to be out of scope! See #13947.+ mb_demoted_name <- discardErrs $+ lookupOccRn_maybe demoted_rdr+ ; let suggestion | isJust mb_demoted_name+ , let additional = text "to refer to the data constructor of that name?"+ = [SuggestExtension $ SuggestSingleExtension additional LangExt.DataKinds]+ | otherwise+ = star_is_type_hints+ ; unboundNameX looking_for rdr_name suggestion } }+ | Just demoted_rdr_name <- demoteRdrNameTv rdr_name,+ isQual rdr_name+ = report_qualified_term_in_types rdr_name demoted_rdr_name++ | otherwise+ = reportUnboundName' (lf_which looking_for) rdr_name++ where+ looking_for = LF WL_Constructor WL_Anywhere++-- Report a qualified variable name in a type signature:+-- badSig :: Prelude.head+-- ^^^^^^^^^^^+report_qualified_term_in_types :: RdrName -> RdrName -> RnM Name+report_qualified_term_in_types rdr_name demoted_rdr_name =+ do { mName <- lookupGlobalOccRn_maybe (RelevantGREsFOS WantNormal) demoted_rdr_name+ ; case mName of+ (Just _) -> termNameInType looking_for rdr_name demoted_rdr_name []+ Nothing -> unboundTermNameInTypes looking_for rdr_name demoted_rdr_name }+ where+ looking_for = LF WL_Constructor WL_Global++-- If the given RdrName can be promoted to the type level and its promoted variant is in scope,+-- lookup_promoted returns the corresponding type-level Name.+-- Otherwise, the function returns Nothing.+-- See Note [Promotion] below.+lookup_promoted :: RdrName -> RnM (Maybe GlobalRdrElt)+lookup_promoted rdr_name+ | Just promoted_rdr <- promoteRdrName rdr_name+ = lookupOccRn_maybe promoted_rdr+ | otherwise+ = return Nothing++badVarInType :: RdrName -> RnM Name+badVarInType rdr_name+ = do { addErr (TcRnUnpromotableThing name TermVariablePE)+ ; return name }+ where+ name = mkUnboundNameRdr rdr_name++{- Note [Promoted variables in types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider this (#12686):+ x = True+ data Bad = Bad 'x++The parser treats the quote in 'x as saying "use the term+namespace", so we'll get (Bad x{v}), with 'x' in the+VarName namespace. If we don't test for this, the renamer+will happily rename it to the x bound at top level, and then+the typecheck falls over because it doesn't have 'x' in scope+when kind-checking.++Note [Demotion]+~~~~~~~~~~~~~~~+When the user writes:+ data Nat = Zero | Succ Nat+ foo :: f Zero -> Int++'Zero' in the type signature of 'foo' is parsed as:+ HsTyVar ("Zero", TcClsName)++When the renamer hits this occurrence of 'Zero' it's going to realise+that it's not in scope. But because it is renaming a type, it knows+that 'Zero' might be a promoted data constructor, so it will demote+its namespace to DataName and do a second lookup.++The final result (after the renamer) will be:+ HsTyVar ("Zero", DataName)++Another case of demotion happens when the user tries to+use a qualified term at the type level:++ f :: Prelude.id -> Int++This signature passes the parser to be caught by the renamer.+It allows the compiler to create more informative error messages.++'Prelude.id' in the type signature is parsed as+ HsTyVar ("id", TvName)++To separate the case of a typo from the case of an+intentional attempt to use an imported term's name the compiler demotes+the namespace to VarName (using 'demoteTvNameSpace') and does a lookup.++The same type of demotion happens when the compiler needs to check+if a name of a type variable has already been used for a term that is in scope.+We need to do it to check if a user should change the name+to make his code compatible with the RequiredTypeArguments extension.++Note [Promotion]+~~~~~~~~~~~~~~~+When the user mentions a type constructor or a type variable in a+term-level context, then we report that a value identifier was expected+instead of a type-level one. That makes error messages more precise.+Previously, such errors contained only the info that a given value was out of scope (#18740).+We promote the namespace of RdrName and look up after that+(see the functions promotedRdrName and lookup_promoted).++In particular, we have the following error message+ • Illegal term-level use of the type constructor ‘Int’+ imported from ‘Prelude’ (and originally defined in ‘GHC.Types’)+ • In the first argument of ‘id’, namely ‘Int’+ In the expression: id Int+ In an equation for ‘x’: x = id Int++when the user writes the following declaration++ x = id Int+-}++lookupOccRnX_maybe :: (RdrName -> RnM (Maybe r)) -> (GlobalRdrElt -> RnM r) -> RdrName+ -> RnM (Maybe r)+lookupOccRnX_maybe globalLookup wrapper rdr_name+ = runMaybeT . msum . map MaybeT $+ [ do { res <- lookupLocalOccRn_maybe rdr_name+ ; case res of+ { Nothing -> return Nothing+ ; Just nm ->+ -- Elements in the LocalRdrEnv are always Vanilla GREs+ do { let gre = mkLocalVanillaGRE NoParent nm+ ; Just <$> wrapper gre } } }+ , globalLookup rdr_name ]++lookupOccRn_maybe :: RdrName -> RnM (Maybe GlobalRdrElt)+lookupOccRn_maybe =+ lookupOccRnX_maybe+ (lookupGlobalOccRn_maybe $ RelevantGREsFOS WantNormal)+ return++-- Used outside this module only by TH name reification (lookupName, lookupThName_maybe)+lookupSameOccRn_maybe :: RdrName -> RnM (Maybe Name)+lookupSameOccRn_maybe =+ lookupOccRnX_maybe+ (get_name <$> lookupGlobalOccRn_maybe SameNameSpace)+ (return . greName)+ where+ get_name :: RnM (Maybe GlobalRdrElt) -> RnM (Maybe Name)+ get_name = fmap (fmap greName)++-- | Look up a 'RdrName' used as a variable in an expression.+--+-- This may be a local variable, global variable, or one or more record selector+-- functions. It will not return record fields created with the+-- @NoFieldSelectors@ extension (see Note [NoFieldSelectors]).+--+-- If the name is not in scope at the term level, but its promoted equivalent is+-- in scope at the type level, the lookup will succeed (so that the type-checker+-- can report a more informative error later). See Note [Promotion].+--+lookupExprOccRn :: RdrName -> RnM (Maybe GlobalRdrElt)+lookupExprOccRn rdr_name+ = do { mb_name <- lookupOccRnX_maybe+ lookupGlobalOccRn_overloaded+ return+ rdr_name+ ; case mb_name of+ Nothing -> lookup_promoted rdr_name+ -- See Note [Promotion].+ -- We try looking up the name as a+ -- type constructor or type variable, if+ -- we failed to look up the name at the term level.+ p -> return p }++lookupGlobalOccRn_maybe :: WhichGREs GREInfo -> RdrName -> RnM (Maybe GlobalRdrElt)+-- Looks up a RdrName occurrence in the top-level+-- environment, including using lookupQualifiedNameGHCi+-- for the GHCi case, but first tries to find an Exact or Orig name.+-- No filter function; does not report an error on failure+-- See Note [Errors in lookup functions]+-- Uses addUsedRdrName to record use and deprecations+--+-- Used directly only by getLocalNonValBinders (new_assoc).+lookupGlobalOccRn_maybe which_gres rdr_name =+ lookupExactOrOrig_maybe rdr_name id $+ lookupGlobalOccRn_base which_gres rdr_name++lookupGlobalOccRn :: RdrName -> RnM Name+-- lookupGlobalOccRn is like lookupOccRn, except that it looks in the global+-- environment. Adds an error message if the RdrName is not in scope.+-- You usually want to use "lookupOccRn" which also looks in the local+-- environment.+--+-- Used by exports_from_avail+lookupGlobalOccRn = lookupGlobalOccRn' (RelevantGREsFOS WantNormal)++lookupGlobalOccRn' :: WhichGREs GREInfo -> RdrName -> RnM Name+lookupGlobalOccRn' which_gres rdr_name =+ lookupExactOrOrig rdr_name greName $ do+ mb_gre <- lookupGlobalOccRn_base which_gres rdr_name+ case mb_gre of+ Just gre -> return (greName gre)+ Nothing -> do { traceRn "lookupGlobalOccRn" (ppr rdr_name)+ ; unboundName (LF which_suggest WL_Global) rdr_name }+ where which_suggest = case includeFieldSelectors which_gres of+ WantBoth -> WL_RecField+ WantField -> WL_RecField+ WantNormal -> WL_Anything++-- Looks up a RdrName occurrence in the GlobalRdrEnv and with+-- lookupQualifiedNameGHCi. Does not try to find an Exact or Orig name first.+-- lookupQualifiedNameGHCi here is used when we're in GHCi and a name like+-- 'Data.Map.elems' is typed, even if you didn't import Data.Map+lookupGlobalOccRn_base :: WhichGREs GREInfo -> RdrName -> RnM (Maybe GlobalRdrElt)+lookupGlobalOccRn_base which_gres rdr_name =+ runMaybeT . msum . map MaybeT $+ [ lookupGreRn_maybe which_gres rdr_name+ , lookupOneQualifiedNameGHCi fos rdr_name ]+ -- This test is not expensive,+ -- and only happens for failed lookups+ where+ fos = case which_gres of+ RelevantGREs { includeFieldSelectors = sel } -> sel+ _ -> if isFieldOcc (rdrNameOcc rdr_name)+ then WantField+ else WantNormal++-- | Lookup a 'Name' in the 'GlobalRdrEnv', falling back to looking up+-- in the type environment it if fails.+lookupGREInfo_GRE :: HasDebugCallStack => Name -> RnM GREInfo+lookupGREInfo_GRE name+ = do { rdr_env <- getGlobalRdrEnv+ ; case lookupGRE_Name rdr_env name of+ Just ( GRE { gre_info = info } )+ -> return info+ _ -> do { hsc_env <- getTopEnv+ ; return $ lookupGREInfo hsc_env name } }+ -- Just looking in the GlobalRdrEnv is insufficient, as we also+ -- need to handle qualified imports in GHCi; see e.g. T9815ghci.++lookupInfoOccRn :: RdrName -> RnM [Name]+-- ^ lookupInfoOccRn is intended for use in GHCi's ":info" command+-- It finds all the GREs that RdrName could mean, not complaining+-- about ambiguity, but rather returning them all (c.f. #9881).+--+-- lookupInfoOccRn is also used in situations where we check for+-- at least one definition of the RdrName, not complaining about+-- multiple definitions (see #17832).+lookupInfoOccRn rdr_name =+ lookupExactOrOrig rdr_name (\ gre -> [greName gre]) $+ do { rdr_env <- getGlobalRdrEnv+ ; let nms = map greName $ lookupGRE rdr_env (LookupRdrName rdr_name (RelevantGREsFOS WantBoth))+ ; qual_nms <- map greName <$> lookupQualifiedNameGHCi WantBoth rdr_name+ ; return $ nms ++ (qual_nms `minusList` nms) }++-- | Look up all record field names, available in the 'GlobalRdrEnv',+-- that a given 'RdrName' might refer to.+-- (Also includes implicit qualified imports in GHCi).+--+-- Throws an error if no fields are found.+--+-- See Note [DisambiguateRecordFields for updates].+lookupFieldGREs :: GlobalRdrEnv -> LocatedN RdrName -> RnM (NE.NonEmpty FieldGlobalRdrElt)+lookupFieldGREs env (L loc rdr)+ = setSrcSpanA loc+ $ do { res <- lookupExactOrOrig rdr (\ gre -> maybeToList $ fieldGRE_maybe gre) $+ do { let (env_fld_gres, env_var_gres) =+ partition isRecFldGRE $+ lookupGRE env (LookupRdrName rdr (RelevantGREsFOS WantBoth))++ -- Handle implicit qualified imports in GHCi. See T10439.+ ; ghci_gres <- lookupQualifiedNameGHCi WantBoth rdr+ ; let (ghci_fld_gres, ghci_var_gres) =+ partition isRecFldGRE $+ ghci_gres++ ; let fld_gres = ghci_fld_gres ++ env_fld_gres+ var_gres = ghci_var_gres ++ env_var_gres++ -- Add an error for ambiguity when -XDisambiguateRecordFields is off.+ --+ -- See Note [DisambiguateRecordFields for updates].+ ; disamb_ok <- xoptM LangExt.DisambiguateRecordFields+ ; if | not disamb_ok+ , gre1 : gre2 : others <- fld_gres ++ var_gres+ -> addErrTc $ TcRnAmbiguousFieldInUpdate (gre1, gre2, others)+ | otherwise+ -> return ()+ ; return fld_gres }++ -- Add an error if lookup failed.+ ; case res of+ gre : gres -> return $ gre NE.:| gres+ [] -> do { (imp_errs, hints) <-+ unknownNameSuggestions emptyLocalRdrEnv WL_RecField rdr+ ; failWithTc $+ TcRnNotInScope NotARecordField rdr imp_errs hints } }++-- | Look up a 'RdrName', which might refer to an overloaded record field.+--+-- Don't allow any ambiguity: emit a name-clash error if there are multiple+-- matching GREs.+lookupGlobalOccRn_overloaded :: RdrName -> RnM (Maybe GlobalRdrElt)+lookupGlobalOccRn_overloaded rdr_name =+ lookupExactOrOrig_maybe rdr_name id $+ do { res <- lookupGreRn_helper (RelevantGREsFOS WantNormal) rdr_name AllDeprecationWarnings+ ; case res of+ GreNotFound -> lookupOneQualifiedNameGHCi WantNormal rdr_name+ OneNameMatch gre -> return $ Just gre+ MultipleNames gres@(gre NE.:| _) -> do+ addNameClashErrRn rdr_name gres+ return (Just gre) }++getFieldUpdLbl :: LHsRecUpdField (GhcPass p) q -> LocatedN RdrName+getFieldUpdLbl = ambiguousFieldOccLRdrName . unLoc . hfbLHS . unLoc++-- | Returns all possible collections of field labels for the given+-- record update.+--+-- Example:+--+-- data D = MkD { fld1 :: Int, fld2 :: Bool }+-- data E = MkE1 { fld1 :: Int, fld2 :: Bool, fld3 :: Char }+-- | MkE2 { fld1 :: Int, fld2 :: Bool }+-- data F = MkF1 { fld1 :: Int } | MkF2 { fld2 :: Bool }+--+-- f r = r { fld1 = a, fld2 = b }+--+-- This function will return:+--+-- [ [ D.fld1, D.fld2 ] -- could be a record update at type D+-- , [ E.fld1, E.fld2 ] -- could be a record update at type E+-- ] -- cannot be a record update at type F: no constructor has both+-- -- of the fields fld1 and fld2+--+-- If there are no valid parents for the record update,+-- throws a 'TcRnBadRecordUpdate' error.+lookupRecUpdFields :: NE.NonEmpty (LHsRecUpdField GhcPs GhcPs)+ -> RnM (NE.NonEmpty (HsRecUpdParent GhcRn))+lookupRecUpdFields flds+-- See Note [Disambiguating record updates] in GHC.Rename.Pat.+ = do { -- Retrieve the possible GlobalRdrElts that each field could refer to.+ ; gre_env <- getGlobalRdrEnv+ ; fld1_gres NE.:| other_flds_gres <- mapM (lookupFieldGREs gre_env . getFieldUpdLbl) flds+ -- Take an intersection: we are only interested in constructors+ -- which have all of the fields.+ ; let possible_GREs = intersect_by_cons fld1_gres other_flds_gres++ ; traceRn "lookupRecUpdFields" $+ vcat [ text "flds:" <+> ppr (fmap getFieldUpdLbl flds)+ , text "possible_GREs:" <+>+ ppr (map (fmap greName . rnRecUpdLabels) possible_GREs) ]++ ; case possible_GREs of++ -- There is at least one parent: we can proceed.+ -- The typechecker might be able to finish disambiguating.+ -- See Note [Type-directed record disambiguation] in GHC.Rename.Pat.+ { p1:ps -> return (p1 NE.:| ps)++ -- There are no possible parents for the record update: compute+ -- a minimum set of fields which does not belong to any data constructor,+ -- to report an informative error to the user.+ ; _ ->+ let+ -- The constructors which have the first field.+ fld1_cons :: UniqSet ConLikeName+ fld1_cons = unionManyUniqSets+ $ NE.toList+ $ NE.map (recFieldCons . fieldGREInfo) fld1_gres+ -- The field labels of the constructors which have the first field.+ fld1_cons_fields :: UniqFM ConLikeName [FieldLabel]+ fld1_cons_fields+ = fmap (lkp_con_fields gre_env)+ $ getUniqSet fld1_cons+ in failWithTc $ badFieldsUpd (NE.toList flds) fld1_cons_fields } }++ where+ intersect_by_cons :: NE.NonEmpty FieldGlobalRdrElt+ -> [NE.NonEmpty FieldGlobalRdrElt]+ -> [HsRecUpdParent GhcRn]+ intersect_by_cons this [] =+ map+ (\ fld -> RnRecUpdParent (fld NE.:| []) (recFieldCons (fieldGREInfo fld)))+ (NE.toList this)+ intersect_by_cons this (new : rest) =+ [ RnRecUpdParent (this_fld NE.<| next_flds) both_cons+ | this_fld <- NE.toList this+ , let this_cons = recFieldCons $ fieldGREInfo this_fld+ , RnRecUpdParent next_flds next_cons <- intersect_by_cons new rest+ , let both_cons = next_cons `intersectUniqSets` this_cons+ , not $ isEmptyUniqSet both_cons+ ]++ lkp_con_fields :: GlobalRdrEnv -> ConLikeName -> [FieldLabel]+ lkp_con_fields gre_env con =+ [ fl+ | let nm = conLikeName_Name con+ , gre <- maybeToList $ lookupGRE_Name gre_env nm+ , con_info <- maybeToList $ recFieldConLike_maybe gre+ , fl <- conInfoFields con_info ]++{-**********************************************************************+* *+ Record field errors+* *+**********************************************************************-}++getUpdFieldLbls :: forall p q. UnXRec (GhcPass p)+ => [LHsRecUpdField (GhcPass p) q] -> [RdrName]+getUpdFieldLbls+ = map $ ambiguousFieldOccRdrName+ . unXRec @(GhcPass p)+ . hfbLHS+ . unXRec @(GhcPass p)++-- | Create an error message when there is no single 'ConLike' which+-- has all of the required fields for a record update.+--+-- This boils down the problem to a smaller set of fields, to avoid+-- the error message containing a lot of uninformative field names that+-- aren't really relevant to the problem.+--+-- NB: this error message should only be triggered when all the field names+-- are in scope (i.e. each individual field name does belong to some+-- constructor in scope).+badFieldsUpd+ :: (OutputableBndrId p)+ => [LHsRecUpdField (GhcPass p) q]+ -- ^ Field names that don't belong to a single datacon+ -> UniqFM ConLikeName [FieldLabel]+ -- ^ The list of field labels for each constructor.+ -- (These are the constructors in which the first field occurs.)+ -> TcRnMessage+badFieldsUpd rbinds fld1_cons_fields+ = TcRnBadRecordUpdate+ (getUpdFieldLbls rbinds)+ (NoConstructorHasAllFields conflictingFields)+ -- See Note [Finding the conflicting fields]+ where+ -- A (preferably small) set of fields such that no constructor contains+ -- all of them. See Note [Finding the conflicting fields]+ conflictingFields = case nonMembers of+ -- nonMember belongs to a different type.+ (nonMember, _) : _ -> [aMember, nonMember]+ [] -> let+ -- All of rbinds belong to one type. In this case, repeatedly add+ -- a field to the set until no constructor contains the set.++ -- Each field, together with a list indicating which constructors+ -- have all the fields so far.+ growingSets :: [(FieldLabelString, [Bool])]+ growingSets = scanl1 combine membership+ combine (_, setMem) (field, fldMem)+ = (field, zipWith (&&) setMem fldMem)+ in+ -- Fields that don't change the membership status of the set+ -- are redundant and can be dropped.+ map (fst . head) $ groupBy ((==) `on` snd) growingSets++ aMember = assert (not (null members) ) fst (head members)+ (members, nonMembers) = partition (or . snd) membership++ -- For each field, which constructors contain the field?+ membership :: [(FieldLabelString, [Bool])]+ membership+ = sortMembership $+ map+ ( (\fld -> (fld, map (fld `elementOfUniqSet`) fieldLabelSets))+ . FieldLabelString . occNameFS . rdrNameOcc . unLoc . getFieldUpdLbl )+ rbinds++ fieldLabelSets :: [UniqSet FieldLabelString]+ fieldLabelSets = map (mkUniqSet . map flLabel) $ nonDetEltsUFM fld1_cons_fields++ -- Sort in order of increasing number of True, so that a smaller+ -- conflicting set can be found.+ sortMembership =+ map snd .+ sortBy (compare `on` fst) .+ map (\ item@(_, membershipRow) -> (countTrue membershipRow, item))++ countTrue = count id++{-+Note [Finding the conflicting fields]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have+ data A = A {a0, a1 :: Int}+ | B {b0, b1 :: Int}+and we see a record update+ x { a0 = 3, a1 = 2, b0 = 4, b1 = 5 }+Then we'd like to find the smallest subset of fields that no+constructor has all of. Here, say, {a0,b0}, or {a0,b1}, etc.+We don't really want to report that no constructor has all of+{a0,a1,b0,b1}, because when there are hundreds of fields it's+hard to see what was really wrong.++We may need more than two fields, though; eg+ data T = A { x,y :: Int, v::Int }+ | B { y,z :: Int, v::Int }+ | C { z,x :: Int, v::Int }+with update+ r { x=e1, y=e2, z=e3 }, we++Finding the smallest subset is hard, so the code here makes+a decent stab, no more. See #7989.+-}++--------------------------------------------------+-- Lookup in the Global RdrEnv of the module+--------------------------------------------------++data GreLookupResult = GreNotFound+ | OneNameMatch GlobalRdrElt+ | MultipleNames (NE.NonEmpty GlobalRdrElt)++lookupGreRn_maybe :: WhichGREs GREInfo -> RdrName -> RnM (Maybe GlobalRdrElt)+-- Look up the RdrName in the GlobalRdrEnv+-- Exactly one binding: records it as "used", return (Just gre)+-- No bindings: return Nothing+-- Many bindings: report "ambiguous", return an arbitrary (Just gre)+-- Uses addUsedRdrName to record use and deprecations+lookupGreRn_maybe which_gres rdr_name+ = do+ res <- lookupGreRn_helper which_gres rdr_name AllDeprecationWarnings+ case res of+ OneNameMatch gre -> return $ Just gre+ MultipleNames gres -> do+ traceRn "lookupGreRn_maybe:NameClash" (ppr gres)+ addNameClashErrRn rdr_name gres+ return $ Just (NE.head gres)+ GreNotFound -> return Nothing++{-++Note [ Unbound vs Ambiguous Names ]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+lookupGreRn_maybe deals with failures in two different ways. If a name+is unbound then we return a `Nothing` but if the name is ambiguous+then we raise an error and return a dummy name.++The reason for this is that when we call `lookupGreRn_maybe` we are+speculatively looking for whatever we are looking up. If we don't find it,+then we might have been looking for the wrong thing and can keep trying.+On the other hand, if we find a clash then there is no way to recover as+we found the thing we were looking for but can no longer resolve which+the correct one is.++One example of this is in `lookupTypeOccRn` which first looks in the type+constructor namespace before looking in the data constructor namespace to+deal with `DataKinds`.++There is however, as always, one exception to this scheme. If we find+an ambiguous occurrence of a record selector and DuplicateRecordFields+is enabled then we defer the selection until the typechecker.++-}+++-- Internal Function+lookupGreRn_helper :: WhichGREs GREInfo -> RdrName -> DeprecationWarnings -> RnM GreLookupResult+lookupGreRn_helper which_gres rdr_name warn_if_deprec+ = do { env <- getGlobalRdrEnv+ ; case lookupGRE env (LookupRdrName rdr_name which_gres) of+ [] -> return GreNotFound+ [gre] -> do { addUsedGRE warn_if_deprec gre+ ; return (OneNameMatch gre) }+ -- Don't record usage for ambiguous names+ -- until we know which is meant+ (gre:others) -> return (MultipleNames (gre NE.:| others)) }++lookupGreAvailRn :: RdrName -> RnM (Maybe GlobalRdrElt)+-- Used in export lists+-- If not found or ambiguous, add error message, and fake with UnboundName+-- Uses addUsedRdrName to record use and deprecations+lookupGreAvailRn rdr_name+ = do+ mb_gre <- lookupGreRn_helper (RelevantGREsFOS WantNormal) rdr_name ExportDeprecationWarnings+ case mb_gre of+ GreNotFound ->+ do+ traceRn "lookupGreAvailRn" (ppr rdr_name)+ _ <- unboundName (LF WL_Anything WL_Global) rdr_name+ return Nothing+ MultipleNames gres ->+ do+ addNameClashErrRn rdr_name gres+ return Nothing+ -- Prevent error cascade+ OneNameMatch gre ->+ return $ Just gre++{-+*********************************************************+* *+ Deprecations+* *+*********************************************************++Note [Handling of deprecations]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+* We report deprecations at each *occurrence* of the deprecated thing+ (see #5867 and #4879)++* We do not report deprecations for locally-defined names. For a+ start, we may be exporting a deprecated thing. Also we may use a+ deprecated thing in the defn of another deprecated things. We may+ even use a deprecated thing in the defn of a non-deprecated thing,+ when changing a module's interface.++* We also report deprecations at export sites, but only for names+ deprecated with export deprecations (since those are not transitive as opposed+ to regular name deprecations and are only reported at the importing module)++* addUsedGREs: we do not report deprecations for sub-binders:+ - the ".." completion for records+ - the ".." in an export item 'T(..)'+ - the things exported by a module export 'module M'+-}++addUsedDataCons :: GlobalRdrEnv -> TyCon -> RnM ()+-- Remember use of in-scope data constructors (#7969)+addUsedDataCons rdr_env tycon+ = addUsedGREs NoDeprecationWarnings+ [ gre+ | dc <- tyConDataCons tycon+ , Just gre <- [lookupGRE_Name rdr_env (dataConName dc)] ]++-- | Whether to report deprecation warnings when registering a used GRE+--+-- There is no option to only emit declaration warnings since everywhere+-- we emit the declaration warnings we also emit export warnings+-- (See Note [Handling of deprecations] for details)+data DeprecationWarnings+ = NoDeprecationWarnings+ | ExportDeprecationWarnings+ | AllDeprecationWarnings++addUsedGRE :: DeprecationWarnings -> GlobalRdrElt -> RnM ()+-- Called for both local and imported things+-- Add usage *and* warn if deprecated+addUsedGRE warn_if_deprec gre+ = do { condWarnIfDeprecated warn_if_deprec [gre]+ ; when (isImportedGRE gre) $ -- See Note [Using isImportedGRE in addUsedGRE]+ do { env <- getGblEnv+ -- Do not report the GREInfo (#23424)+ ; traceRn "addUsedGRE" (ppr $ greName gre)+ ; updTcRef (tcg_used_gres env) (gre :) } }++addUsedGREs :: DeprecationWarnings -> [GlobalRdrElt] -> RnM ()+-- Record uses of any *imported* GREs+-- Used for recording used sub-bndrs+-- NB: no call to warnIfDeprecated; see Note [Handling of deprecations]+addUsedGREs warn_if_deprec gres+ = do { condWarnIfDeprecated warn_if_deprec gres+ ; unless (null imp_gres) $+ do { env <- getGblEnv+ -- Do not report the GREInfo (#23424)+ ; traceRn "addUsedGREs" (ppr $ map greName imp_gres)+ ; updTcRef (tcg_used_gres env) (imp_gres ++) } }+ where+ imp_gres = filter isImportedGRE gres+ -- See Note [Using isImportedGRE in addUsedGRE]++{- Note [Using isImportedGRE in addUsedGRE]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In addUsedGRE, we want to add any used imported GREs to the tcg_used_gres field,+so that we can emit appropriate warnings (see GHC.Rename.Names.warnUnusedImportDecls).++We want to do this for GREs that were brought into scope through imports. As per+Note [GlobalRdrElt provenance] in GHC.Types.Name.Reader, this means we should+check that gre_imp is non-empty. Checking that gre_lcl is False is INCORRECT,+because we might have obtained the GRE by an Exact or Orig direct reference,+in which case we have both gre_lcl = False and gre_imp = emptyBag.++Geting this wrong can lead to panics in e.g. bestImport, see #23240.+-}++condWarnIfDeprecated :: DeprecationWarnings -> [GlobalRdrElt] -> RnM ()+condWarnIfDeprecated NoDeprecationWarnings _ = return ()+condWarnIfDeprecated opt gres = do+ this_mod <- getModule+ let external_gres+ = filterOut (nameIsLocalOrFrom this_mod . greName) gres+ mapM_ (\gre -> warnIfExportDeprecated gre >> maybeWarnDeclDepr gre) external_gres+ where+ maybeWarnDeclDepr = case opt of+ ExportDeprecationWarnings -> const $ return ()+ AllDeprecationWarnings -> warnIfDeclDeprecated++warnIfDeclDeprecated :: GlobalRdrElt -> RnM ()+warnIfDeclDeprecated gre@(GRE { gre_imp = iss })+ | Just imp_spec <- headMaybe iss+ = do { dflags <- getDynFlags+ ; when (wopt_any_custom dflags) $+ -- See Note [Handling of deprecations]+ do { iface <- loadInterfaceForName doc name+ ; case lookupImpDeclDeprec iface gre of+ Just deprText -> addDiagnostic $+ TcRnPragmaWarning {+ pragma_warning_occ = occ,+ pragma_warning_msg = deprText,+ pragma_warning_import_mod = importSpecModule imp_spec,+ pragma_warning_defined_mod = Just definedMod+ }+ Nothing -> return () } }+ | otherwise+ = return ()+ where+ occ = greOccName gre+ name = greName gre+ definedMod = moduleName $ assertPpr (isExternalName name) (ppr name) (nameModule name)+ doc = text "The name" <+> quotes (ppr occ) <+> text "is mentioned explicitly"++lookupImpDeclDeprec :: ModIface -> GlobalRdrElt -> Maybe (WarningTxt GhcRn)+lookupImpDeclDeprec iface gre+ -- Bleat if the thing, or its parent, is warn'd+ = mi_decl_warn_fn (mi_final_exts iface) (greOccName gre) `mplus`+ case greParent gre of+ ParentIs p -> mi_decl_warn_fn (mi_final_exts iface) (nameOccName p)+ NoParent -> Nothing++warnIfExportDeprecated :: GlobalRdrElt -> RnM ()+warnIfExportDeprecated gre@(GRE { gre_imp = iss })+ = do { mod_warn_mbs <- mapBagM process_import_spec iss+ ; for_ (sequence mod_warn_mbs) $ mapM+ $ \(importing_mod, warn_txt) -> addDiagnostic $+ TcRnPragmaWarning {+ pragma_warning_occ = occ,+ pragma_warning_msg = warn_txt,+ pragma_warning_import_mod = importing_mod,+ pragma_warning_defined_mod = Nothing+ } }+ where+ occ = greOccName gre+ name = greName gre+ doc = text "The name" <+> quotes (ppr occ) <+> text "is mentioned explicitly"+ process_import_spec :: ImportSpec -> RnM (Maybe (ModuleName, WarningTxt GhcRn))+ process_import_spec is = do+ let mod = is_mod $ is_decl is+ iface <- loadInterfaceForModule doc mod+ let mb_warn_txt = mi_export_warn_fn (mi_final_exts iface) name+ return $ (moduleName mod, ) <$> mb_warn_txt++{-+Note [Used names with interface not loaded]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+It's (just) possible to find a used+Name whose interface hasn't been loaded:++a) It might be a WiredInName; in that case we may not load+ its interface (although we could).++b) It might be GHC.Real.fromRational, or GHC.Num.fromInteger+ These are seen as "used" by the renamer (if -XRebindableSyntax)+ is on), but the typechecker may discard their uses+ if in fact the in-scope fromRational is GHC.Read.fromRational,+ (see tcPat.tcOverloadedLit), and the typechecker sees that the type+ is fixed, say, to GHC.Base.Float (see Inst.lookupSimpleInst).+ In that obscure case it won't force the interface in.++In both cases we simply don't permit deprecations;+this is, after all, wired-in stuff.+++*********************************************************+* *+ GHCi support+* *+*********************************************************++A qualified name on the command line can refer to any module at+all: we try to load the interface if we don't already have it, just+as if there was an "import qualified M" declaration for every+module.++For example, writing `Data.List.sort` will load the interface file for+`Data.List` as if the user had written `import qualified Data.List`.++If we fail we just return Nothing, rather than bleating+about "attempting to use module ‘D’ (./D.hs) which is not loaded"+which is what loadSrcInterface does.++It is enabled by default and disabled by the flag+`-fno-implicit-import-qualified`.++Note [Safe Haskell and GHCi]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We DON'T do this Safe Haskell as we need to check imports. We can+and should instead check the qualified import but at the moment+this requires some refactoring so leave as a TODO++Note [DuplicateRecordFields and -fimplicit-import-qualified]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When DuplicateRecordFields is used, a single module can export the same OccName+multiple times, for example:++ module M where+ data S = MkS { foo :: Int }+ data T = MkT { foo :: Int }++Now if we refer to M.foo via -fimplicit-import-qualified, we need to report an+ambiguity error.++-}++-- | Like 'lookupQualifiedNameGHCi' but returning at most one name, reporting an+-- ambiguity error if there are more than one.+lookupOneQualifiedNameGHCi :: FieldsOrSelectors -> RdrName -> RnM (Maybe GlobalRdrElt)+lookupOneQualifiedNameGHCi fos rdr_name = do+ all_gres <- lookupQualifiedNameGHCi fos rdr_name+ case all_gres of+ [] -> return Nothing+ [gre] -> return $ Just $ gre+ (gre:gres) ->+ do addNameClashErrRn rdr_name (gre NE.:| gres)+ return (Just (mkUnboundGRE $ greOccName gre))+ -- (Use mkUnboundGRE to get the correct namespace)++-- | Look up *all* the names to which the 'RdrName' may refer in GHCi (using+-- @-fimplicit-import-qualified@). This will normally be zero or one, but may+-- be more in the presence of @DuplicateRecordFields@.+lookupQualifiedNameGHCi :: HasDebugCallStack => FieldsOrSelectors -> RdrName -> RnM [GlobalRdrElt]+lookupQualifiedNameGHCi fos rdr_name+ = -- We want to behave as we would for a source file import here,+ -- and respect hiddenness of modules/packages, hence loadSrcInterface.+ do { dflags <- getDynFlags+ ; is_ghci <- getIsGHCi+ ; go_for_it dflags is_ghci }++ where+ go_for_it dflags is_ghci+ | Just (mod_name,occ) <- isQual_maybe rdr_name+ , let ns = occNameSpace occ+ , is_ghci+ , gopt Opt_ImplicitImportQualified dflags -- Enables this GHCi behaviour+ , not (safeDirectImpsReq dflags) -- See Note [Safe Haskell and GHCi]+ = do { res <- loadSrcInterface_maybe doc mod_name NotBoot NoPkgQual+ ; case res of+ Succeeded iface+ -> do { hsc_env <- getTopEnv+ ; let gres =+ [ gre+ | avail <- mi_exports iface+ , gname <- availNames avail+ , let lk_occ = occName gname+ lk_ns = occNameSpace lk_occ+ , occNameFS occ == occNameFS lk_occ+ , ns == lk_ns || (ns == varName && isFieldNameSpace lk_ns)+ , let mod = mi_module iface+ gre = lookupGRE_PTE mod hsc_env gname+ , allowGRE fos gre+ -- Include a field if it has a selector or we are looking for all fields;+ -- see Note [NoFieldSelectors].+ ]+ ; return gres }++ _ -> -- Either we couldn't load the interface, or+ -- we could but we didn't find the name in it+ do { traceRn "lookupQualifiedNameGHCi" (ppr rdr_name)+ ; return [] } }++ | otherwise+ = do { traceRn "lookupQualifiedNameGHCi: off" (ppr rdr_name)+ ; return [] }++ doc = text "Need to find" <+> ppr rdr_name++ -- Lookup a Name for an implicit qualified import in GHCi+ -- in the given PackageTypeEnv.+ lookupGRE_PTE :: Module -> HscEnv -> Name -> GlobalRdrElt+ lookupGRE_PTE mod hsc_env nm =+ -- Fake a GRE so we can report a sensible name clash error if+ -- -fimplicit-import-qualified is used with a module that exports the same+ -- field name multiple times (see+ -- Note [DuplicateRecordFields and -fimplicit-import-qualified]).+ GRE { gre_name = nm+ , gre_par = NoParent+ , gre_lcl = False+ , gre_imp = unitBag is+ , gre_info = info }+ where+ info = lookupGREInfo hsc_env nm+ spec = ImpDeclSpec { is_mod = mod, is_as = moduleName mod, is_qual = True, is_dloc = noSrcSpan }+ is = ImpSpec { is_decl = spec, is_item = ImpAll }++-- | Look up the 'GREInfo' associated with the given 'Name'+-- by looking up in the type environment.+lookupGREInfo :: HasDebugCallStack => HscEnv -> Name -> GREInfo+lookupGREInfo hsc_env nm+ | Just ty_thing <- wiredInNameTyThing_maybe nm+ = tyThingGREInfo ty_thing+ | otherwise+ -- Create a thunk which, when forced, loads the interface+ -- and looks up the TyThing in the type environment.+ --+ -- See Note [Retrieving the GREInfo from interfaces] in GHC.Types.GREInfo.+ = case nameModule_maybe nm of+ Nothing -> UnboundGRE+ Just mod ->+ unsafePerformIO $ do+ _ <- initIfaceLoad hsc_env $+ loadInterface (text "lookupGREInfo" <+> parens (ppr nm))+ mod ImportBySystem+ mb_ty_thing <- lookupType hsc_env nm+ case mb_ty_thing of+ Nothing -> pprPanic "lookupGREInfo" $+ vcat [ text "lookup failed:" <+> ppr nm ]+ Just ty_thing -> return $ tyThingGREInfo ty_thing++{-+Note [Looking up signature names]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+lookupSigOccRn is used for type signatures and pragmas+Is this valid?+ module A+ import M( f )+ f :: Int -> Int+ f x = x+It's clear that the 'f' in the signature must refer to A.f+The Haskell98 report does not stipulate this, but it will!+So we must treat the 'f' in the signature in the same way+as the binding occurrence of 'f', using lookupBndrRn++However, consider this case:+ import M( f )+ f :: Int -> Int+ g x = x+We don't want to say 'f' is out of scope; instead, we want to+return the imported 'f', so that later on the renamer will+correctly report "misplaced type sig".++Note [Signatures for top level things]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+data HsSigCtxt = ... | TopSigCtxt NameSet | ....++* The NameSet says what is bound in this group of bindings.+ We can't use isLocalGRE from the GlobalRdrEnv, because of this:+ f x = x+ $( ...some TH splice... )+ f :: Int -> Int+ When we encounter the signature for 'f', the binding for 'f'+ will be in the GlobalRdrEnv, and will be a LocalDef. Yet the+ signature is mis-placed++* For type signatures the NameSet should be the names bound by the+ value bindings; for fixity declarations, the NameSet should also+ include class sigs and record selectors++ infix 3 `f` -- Yes, ok+ f :: C a => a -> a -- No, not ok+ class C a where+ f :: a -> a+-}++data HsSigCtxt+ = TopSigCtxt NameSet -- At top level, binding these names+ -- See Note [Signatures for top level things]+ | LocalBindCtxt NameSet -- In a local binding, binding these names+ | ClsDeclCtxt Name -- Class decl for this class+ | InstDeclCtxt NameSet -- Instance decl whose user-written method+ -- bindings are for these methods+ | HsBootCtxt NameSet -- Top level of a hs-boot file, binding these names+ | RoleAnnotCtxt NameSet -- A role annotation, with the names of all types+ -- in the group++instance Outputable HsSigCtxt where+ ppr (TopSigCtxt ns) = text "TopSigCtxt" <+> ppr ns+ ppr (LocalBindCtxt ns) = text "LocalBindCtxt" <+> ppr ns+ ppr (ClsDeclCtxt n) = text "ClsDeclCtxt" <+> ppr n+ ppr (InstDeclCtxt ns) = text "InstDeclCtxt" <+> ppr ns+ ppr (HsBootCtxt ns) = text "HsBootCtxt" <+> ppr ns+ ppr (RoleAnnotCtxt ns) = text "RoleAnnotCtxt" <+> ppr ns++lookupSigOccRn :: HsSigCtxt+ -> Sig GhcPs+ -> LocatedA RdrName -> RnM (LocatedA Name)+lookupSigOccRn ctxt sig = lookupSigCtxtOccRn ctxt (hsSigDoc sig)++lookupSigOccRnN :: HsSigCtxt+ -> Sig GhcPs+ -> LocatedN RdrName -> RnM (LocatedN Name)+lookupSigOccRnN ctxt sig = lookupSigCtxtOccRn ctxt (hsSigDoc sig)++-- | Lookup a name in relation to the names in a 'HsSigCtxt'+lookupSigCtxtOccRn :: HsSigCtxt+ -> SDoc -- ^ description of thing we're looking up,+ -- like "type family"+ -> GenLocated (SrcSpanAnn' ann) RdrName+ -> RnM (GenLocated (SrcSpanAnn' ann) Name)+lookupSigCtxtOccRn ctxt what+ = wrapLocMA $ \ rdr_name ->+ do { let also_try_tycons = False+ ; mb_names <- lookupBindGroupOcc ctxt what rdr_name also_try_tycons+ ; case mb_names of+ Right name NE.:| rest ->+ do { massertPpr (null rest) $+ vcat (text "lookupSigCtxtOccRn" <+> ppr name : map (either (pprScopeError rdr_name) ppr) rest)+ ; return name }+ Left err NE.:| _ ->+ do { addErr (mkTcRnNotInScope rdr_name err)+ ; return (mkUnboundNameRdr rdr_name) }+ }++lookupBindGroupOcc :: HsSigCtxt+ -> SDoc+ -> RdrName -- ^ what to look up+ -> Bool -- ^ if the 'RdrName' we are looking up is in+ -- a value 'NameSpace', should we also look up+ -- in the type constructor 'NameSpace'?+ -> RnM (NE.NonEmpty (Either NotInScopeError Name))+-- ^ Looks up the 'RdrName', expecting it to resolve to one of the+-- bound names currently in scope. If not, return an appropriate error message.+--+-- See Note [Looking up signature names].+lookupBindGroupOcc ctxt what rdr_name also_try_tycon_ns+ | Just n <- isExact_maybe rdr_name+ = do { mb_gre <- lookupExactOcc_either n+ ; return $ case mb_gre of+ Left err -> NE.singleton $ Left err+ Right gre -> finish (NoExactName $ greName gre) gre }+ -- Maybe we should check the side conditions+ -- but it's a pain, and Exact things only show+ -- up when you know what you are doing++ | Just (rdr_mod, rdr_occ) <- isOrig_maybe rdr_name+ = do { NE.singleton . Right <$> lookupOrig rdr_mod rdr_occ }++ | otherwise+ = case ctxt of+ HsBootCtxt ns -> lookup_top (`elemNameSet` ns)+ TopSigCtxt ns -> lookup_top (`elemNameSet` ns)+ RoleAnnotCtxt ns -> lookup_top (`elemNameSet` ns)+ LocalBindCtxt ns -> lookup_group ns+ ClsDeclCtxt cls -> lookup_cls_op cls+ InstDeclCtxt ns -> if uniqSetAny isUnboundName ns -- #16610+ then return $ NE.singleton $ Right $ mkUnboundNameRdr rdr_name+ else lookup_top (`elemNameSet` ns)+ where++ ns = occNameSpace occ+ occ = rdrNameOcc rdr_name+ relevant_gres =+ RelevantGREs+ { includeFieldSelectors = WantBoth+ , lookupVariablesForFields = True+ , lookupTyConsAsWell = also_try_tycon_ns }+ ok_gre = greIsRelevant relevant_gres ns++ finish err gre+ | ok_gre gre+ = NE.singleton (Right $ greName gre)+ | otherwise+ = NE.singleton (Left err)++ lookup_cls_op cls+ = NE.singleton <$> lookupSubBndrOcc AllDeprecationWarnings cls doc rdr_name+ where+ doc = text "method of class" <+> quotes (ppr cls)++ lookup_top keep_me+ = do { env <- getGlobalRdrEnv+ ; let occ = rdrNameOcc rdr_name+ all_gres = lookupGRE env (LookupOccName occ relevant_gres)+ names_in_scope = -- If rdr_name lacks a binding, only+ -- recommend alternatives from relevant+ -- namespaces. See #17593.+ map greName+ $ filter (ok_gre <&&> isLocalGRE)+ $ globalRdrEnvElts env+ candidates_msg = candidates names_in_scope+ ; case filter (keep_me . greName) all_gres of+ [] | null all_gres -> bale_out_with candidates_msg+ | otherwise -> bale_out_with local_msg+ (gre1:gres) -> return (fmap (Right . greName) (gre1 NE.:| gres)) }++ lookup_group bound_names -- Look in the local envt (not top level)+ = do { mname <- lookupLocalOccRn_maybe rdr_name+ ; env <- getLocalRdrEnv+ ; let candidates_msg = candidates $ localRdrEnvElts env+ ; case mname of+ Just n+ | n `elemNameSet` bound_names -> return $ NE.singleton $ Right n+ | otherwise -> bale_out_with local_msg+ Nothing -> bale_out_with candidates_msg }++ bale_out_with hints = return $ NE.singleton $ Left $ MissingBinding what hints++ local_msg = [SuggestMoveToDeclarationSite what rdr_name]++ -- Identify all similar names and produce a message listing them+ candidates :: [Name] -> [GhcHint]+ candidates names_in_scope+ | (nm : nms) <- map SimilarName similar_names+ = [SuggestSimilarNames rdr_name (nm NE.:| nms)]+ | otherwise+ = []+ where+ similar_names+ = fuzzyLookup (unpackFS $ occNameFS $ rdrNameOcc rdr_name)+ $ map (\x -> ((unpackFS $ occNameFS $ nameOccName x), x))+ names_in_scope+++---------------+lookupLocalTcNames :: HsSigCtxt -> SDoc -> RdrName -> RnM [(RdrName, Name)]+-- GHC extension: look up both the tycon and data con or variable.+-- Used for top-level fixity signatures and deprecations.+-- Complain if neither is in scope.+-- See Note [Fixity signature lookup]+lookupLocalTcNames ctxt what rdr+ = do { this_mod <- getModule+ ; let also_try_tycon_ns = True+ ; nms_eithers <- fmap (guard_builtin_syntax this_mod rdr) <$>+ lookupBindGroupOcc ctxt what rdr also_try_tycon_ns+ ; let (errs, names) = partitionEithers (NE.toList nms_eithers)+ ; when (null names) $+ addErr (head errs) -- Bleat about one only+ ; return names }+ where+ -- Guard against the built-in syntax (ex: `infixl 6 :`), see #15233+ guard_builtin_syntax this_mod rdr (Right name)+ | Just _ <- isBuiltInOcc_maybe (occName rdr)+ , this_mod /= nameModule name+ = Left $ TcRnIllegalBuiltinSyntax what rdr+ | otherwise+ = Right (rdr, name)+ guard_builtin_syntax _ _ (Left err)+ = Left $ mkTcRnNotInScope rdr err++dataTcOccs :: RdrName -> [RdrName]+-- Return both the given name and the same name promoted to the TcClsName+-- namespace. This is useful when we aren't sure which we are looking at.+-- See also Note [dataTcOccs and Exact Names]+dataTcOccs rdr_name+ | isDataOcc occ || isVarOcc occ+ = [rdr_name, rdr_name_tc]+ | otherwise+ = [rdr_name]+ where+ occ = rdrNameOcc rdr_name+ rdr_name_tc = setRdrNameSpace rdr_name tcName++{- Note [dataTcOccs and Exact Names]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Exact RdrNames can occur in code generated by Template Haskell, and generally+those references are, well, exact. However, the TH `Name` type isn't expressive+enough to always track the correct namespace information, so we sometimes get+the right Unique but wrong namespace. Thus, we still have to do the double-lookup+for Exact RdrNames.++There is also an awkward situation for built-in syntax. Example in GHCi+ :info []+This parses as the Exact RdrName for nilDataCon, but we also want+the list type constructor.++Note that setRdrNameSpace on an Exact name requires the Name to be External,+which it always is for built in syntax.+-}++{-+************************************************************************+* *+ Rebindable names+ Dealing with rebindable syntax is driven by the+ Opt_RebindableSyntax dynamic flag.++ In "deriving" code we don't want to use rebindable syntax+ so we switch off the flag locally++* *+************************************************************************++Haskell 98 says that when you say "3" you get the "fromInteger" from the+Standard Prelude, regardless of what is in scope. However, to experiment+with having a language that is less coupled to the standard prelude, we're+trying a non-standard extension that instead gives you whatever "Prelude.fromInteger"+happens to be in scope. Then you can+ import Prelude ()+ import MyPrelude as Prelude+to get the desired effect.++At the moment this just happens for+ * fromInteger, fromRational on literals (in expressions and patterns)+ * negate (in expressions)+ * minus (arising from n+k patterns)+ * "do" notation++We store the relevant Name in the HsSyn tree, in+ * HsIntegral/HsFractional/HsIsString+ * NegApp+ * NPlusKPat+ * HsDo+respectively. Initially, we just store the "standard" name (GHC.Builtin.Names.fromIntegralName,+fromRationalName etc), but the renamer changes this to the appropriate user+name if Opt_NoImplicitPrelude is on. That is what lookupSyntax does.++We treat the original (standard) names as free-vars too, because the type checker+checks the type of the user thing against the type of the standard thing.+-}++lookupIfThenElse :: RnM (Maybe Name)+-- Looks up "ifThenElse" if rebindable syntax is on+lookupIfThenElse+ = do { rebindable_on <- xoptM LangExt.RebindableSyntax+ ; if not rebindable_on+ then return Nothing+ else do { ite <- lookupOccRnNone (mkVarUnqual (fsLit "ifThenElse"))+ ; return (Just ite) } }++lookupSyntaxName :: Name -- ^ The standard name+ -> RnM (Name, FreeVars) -- ^ Possibly a non-standard name+-- Lookup a Name that may be subject to Rebindable Syntax (RS).+--+-- - When RS is off, just return the supplied (standard) Name+--+-- - When RS is on, look up the OccName of the supplied Name; return+-- what we find, or the supplied Name if there is nothing in scope+lookupSyntaxName std_name+ = do { rebind <- xoptM LangExt.RebindableSyntax+ ; if not rebind+ then return (std_name, emptyFVs)+ else do { nm <- lookupOccRnNone (mkRdrUnqual (nameOccName std_name))+ ; return (nm, unitFV nm) } }++lookupSyntaxExpr :: Name -- ^ The standard name+ -> RnM (HsExpr GhcRn, FreeVars) -- ^ Possibly a non-standard name+lookupSyntaxExpr std_name+ = do { (name, fvs) <- lookupSyntaxName std_name+ ; return (nl_HsVar name, fvs) }++lookupSyntax :: Name -- The standard name+ -> RnM (SyntaxExpr GhcRn, FreeVars) -- Possibly a non-standard+ -- name+lookupSyntax std_name+ = do { (expr, fvs) <- lookupSyntaxExpr std_name+ ; return (mkSyntaxExpr expr, fvs) }++lookupSyntaxNames :: [Name] -- Standard names+ -> RnM ([HsExpr GhcRn], FreeVars) -- See comments with HsExpr.ReboundNames+ -- this works with CmdTop, which wants HsExprs, not SyntaxExprs+lookupSyntaxNames std_names+ = do { rebindable_on <- xoptM LangExt.RebindableSyntax+ ; if not rebindable_on then+ return (map (HsVar noExtField . noLocA) std_names, emptyFVs)+ else+ do { usr_names <-+ mapM (lookupOccRnNone . mkRdrUnqual . nameOccName) std_names+ ; return (map (HsVar noExtField . noLocA) usr_names, mkFVs usr_names) } }+++{-+Note [QualifiedDo]+~~~~~~~~~~~~~~~~~~+QualifiedDo is implemented using the same placeholders for operation names in+the AST that were devised for RebindableSyntax. Whenever the renamer checks+which names to use for do syntax, it first checks if the do block is qualified+(e.g. M.do { stmts }), in which case it searches for qualified names. If the+qualified names are not in scope, an error is produced. If the do block is not+qualified, the renamer does the usual search of the names which considers+whether RebindableSyntax is enabled or not. Dealing with QualifiedDo is driven+by the Opt_QualifiedDo dynamic flag.+-}++-- Lookup operations for a qualified do. If the context is not a qualified+-- do, then use lookupSyntaxExpr. See Note [QualifiedDo].+lookupQualifiedDoExpr :: HsStmtContext p -> Name -> RnM (HsExpr GhcRn, FreeVars)+lookupQualifiedDoExpr ctxt std_name+ = first nl_HsVar <$> lookupQualifiedDoName ctxt std_name++-- Like lookupQualifiedDoExpr but for producing SyntaxExpr.+-- See Note [QualifiedDo].+lookupQualifiedDo+ :: HsStmtContext p+ -> Name+ -> RnM (SyntaxExpr GhcRn, FreeVars)+lookupQualifiedDo ctxt std_name+ = first mkSyntaxExpr <$> lookupQualifiedDoExpr ctxt std_name++lookupNameWithQualifier :: Name -> ModuleName -> RnM (Name, FreeVars)+lookupNameWithQualifier std_name modName+ = do { qname <- lookupOccRnNone (mkRdrQual modName (nameOccName std_name))+ ; return (qname, unitFV qname) }++-- See Note [QualifiedDo].+lookupQualifiedDoName+ :: HsStmtContext p+ -> Name+ -> RnM (Name, FreeVars)+lookupQualifiedDoName ctxt std_name+ = case qualifiedDoModuleName_maybe ctxt of+ Nothing -> lookupSyntaxName std_name+ Just modName -> lookupNameWithQualifier std_name modName
GHC/Rename/Expr.hs view
@@ -47,14 +47,16 @@ , checkUnusedRecordWildcard , wrapGenSpan, genHsIntegralLit, genHsTyLit , genHsVar, genLHsVar, genHsApp, genHsApps- , genAppType )+ , genAppType, isIrrefutableHsPatRn ) import GHC.Rename.Unbound ( reportUnboundName ) import GHC.Rename.Splice ( rnTypedBracket, rnUntypedBracket, rnTypedSplice, rnUntypedSpliceExpr, checkThLocalName ) import GHC.Rename.HsType import GHC.Rename.Pat-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Builtin.Names+import GHC.Builtin.Types ( nilDataConName ) +import GHC.Types.Basic (TypeOrKind (TypeLevel)) import GHC.Types.FieldLabel import GHC.Types.Fixity import GHC.Types.Id.Make@@ -63,22 +65,22 @@ import GHC.Types.Name.Reader import GHC.Types.Unique.Set import GHC.Types.SourceText+import GHC.Types.SrcLoc import GHC.Utils.Misc-import GHC.Data.List.SetOps ( removeDups )+import GHC.Data.List.SetOps ( removeDupsOn )+import GHC.Data.Maybe import GHC.Utils.Error import GHC.Utils.Panic import GHC.Utils.Panic.Plain import GHC.Utils.Outputable as Outputable-import GHC.Types.SrcLoc-import Control.Monad-import GHC.Builtin.Types ( nilDataConName )+ import qualified GHC.LanguageExtensions as LangExt import Language.Haskell.Syntax.Basic (FieldLabelString(..)) +import Control.Monad import Data.List (unzip4, minimumBy) import Data.List.NonEmpty ( NonEmpty(..), nonEmpty )-import Data.Maybe (isJust, isNothing) import Control.Arrow (first) import Data.Ord import Data.Array@@ -254,28 +256,33 @@ rnExpr (HsVar _ (L l v)) = do { dflags <- getDynFlags- ; mb_name <- lookupExprOccRn v-- ; case mb_name of {+ ; mb_gre <- lookupExprOccRn v+ ; case mb_gre of { Nothing -> rnUnboundVar v ;- Just (NormalGreName name)- | name == nilDataConName -- Treat [] as an ExplicitList, so that- -- OverloadedLists works correctly- -- Note [Empty lists] in GHC.Hs.Expr- , xopt LangExt.OverloadedLists dflags- -> rnExpr (ExplicitList noAnn [])+ Just gre ->+ do { let nm = greName gre+ info = greInfo gre+ ; if | IAmRecField fld_info <- info+ -- Since GHC 9.4, such occurrences of record fields must be+ -- unambiguous. For ambiguous occurrences, we arbitrarily pick one+ -- matching GRE and add a name clash error+ -- (see lookupGlobalOccRn_overloaded, called by lookupExprOccRn).+ -> do { let sel_name = flSelector $ recFieldLabel fld_info+ ; this_mod <- getModule+ ; when (nameIsLocalOrFrom this_mod sel_name) $+ checkThLocalName sel_name+ ; return (HsRecSel noExtField (FieldOcc sel_name (L l v) ), unitFV sel_name)+ }+ | nm == nilDataConName+ -- Treat [] as an ExplicitList, so that+ -- OverloadedLists works correctly+ -- Note [Empty lists] in GHC.Hs.Expr+ , xopt LangExt.OverloadedLists dflags+ -> rnExpr (ExplicitList noAnn []) - | otherwise- -> finishHsVar (L (na2la l) name) ;- Just (FieldGreName fl)- -> do { let sel_name = flSelector fl- ; this_mod <- getModule- ; when (nameIsLocalOrFrom this_mod sel_name) $- checkThLocalName sel_name- ; return ( HsRecSel noExtField (FieldOcc sel_name (L l v) ), unitFV sel_name)- }- }- }+ | otherwise+ -> finishHsVar (L (na2la l) nm)+ }}} rnExpr (HsIPVar x v) = return (HsIPVar x v, emptyFVs)@@ -320,7 +327,7 @@ rnExpr (HsAppType _ fun at arg) = do { type_app <- xoptM LangExt.TypeApplications- ; unless type_app $ addErr $ typeAppErr "type" $ hswc_body arg+ ; unless type_app $ addErr $ typeAppErr TypeLevel $ hswc_body arg ; (fun',fvFun) <- rnLExpr fun ; (arg',fvArg) <- rnHsWcType HsTypeCtx arg ; return (HsAppType NoExtField fun' at arg', fvFun `plusFV` fvArg) }@@ -421,7 +428,7 @@ rnExpr (HsCase _ expr matches) = do { (new_expr, e_fvs) <- rnLExpr expr ; (new_matches, ms_fvs) <- rnMatchGroup CaseAlt rnLExpr matches- ; return (HsCase noExtField new_expr new_matches, e_fvs `plusFV` ms_fvs) }+ ; return (HsCase CaseAlt new_expr new_matches, e_fvs `plusFV` ms_fvs) } rnExpr (HsLet _ tkLet binds tkIn expr) = rnLocalBindsAndThen binds $ \binds' _ -> do@@ -477,30 +484,43 @@ rn_field (L l fld) = do { (arg', fvs) <- rnLExpr (hfbRHS fld) ; return (L l (fld { hfbRHS = arg' }), fvs) } -rnExpr (RecordUpd { rupd_expr = expr, rupd_flds = rbinds })- = case rbinds of- Left flds -> -- 'OverloadedRecordUpdate' is not in effect. Regular record update.- do { ; (e, fv_e) <- rnLExpr expr- ; (rs, fv_rs) <- rnHsRecUpdFields flds- ; return ( RecordUpd noExtField e (Left rs), fv_e `plusFV` fv_rs )- }- Right flds -> -- 'OverloadedRecordUpdate' is in effect. Record dot update desugaring.- do { ; unlessXOptM LangExt.RebindableSyntax $- addErr TcRnNoRebindableSyntaxRecordDot- ; let punnedFields = [fld | (L _ fld) <- flds, hfbPun fld]- ; punsEnabled <-xoptM LangExt.NamedFieldPuns- ; unless (null punnedFields || punsEnabled) $- addErr TcRnNoFieldPunsRecordDot- ; (getField, fv_getField) <- lookupSyntaxName getFieldName- ; (setField, fv_setField) <- lookupSyntaxName setFieldName- ; (e, fv_e) <- rnLExpr expr- ; (us, fv_us) <- rnHsUpdProjs flds- ; return ( mkExpandedExpr- (RecordUpd noExtField e (Right us))- (mkRecordDotUpd getField setField e us)- , plusFVs [fv_getField, fv_setField, fv_e, fv_us] )- }+rnExpr (RecordUpd { rupd_expr = L l expr, rupd_flds = rbinds })+ = setSrcSpanA l $+ case rbinds of + -- 'OverloadedRecordUpdate' is not in effect. Regular record update.+ RegularRecUpdFields { recUpdFields = flds } ->+ do { (e, fv_e) <- rnExpr expr+ ; (parents, flds, fv_flds) <- rnHsRecUpdFields flds+ ; let upd_flds =+ RegularRecUpdFields+ { xRecUpdFields = parents+ , recUpdFields = flds }+ ; return ( RecordUpd noExtField (L l e) upd_flds+ , fv_e `plusFV` fv_flds ) }++ -- 'OverloadedRecordUpdate' is in effect. Record dot update desugaring.+ OverloadedRecUpdFields { olRecUpdFields = flds } ->+ do { unlessXOptM LangExt.RebindableSyntax $+ addErr TcRnNoRebindableSyntaxRecordDot+ ; let punnedFields = [fld | (L _ fld) <- flds, hfbPun fld]+ ; punsEnabled <- xoptM LangExt.NamedFieldPuns+ ; unless (null punnedFields || punsEnabled) $+ addErr TcRnNoFieldPunsRecordDot+ ; (getField, fv_getField) <- lookupSyntaxName getFieldName+ ; (setField, fv_setField) <- lookupSyntaxName setFieldName+ ; (e, fv_e) <- rnExpr expr+ ; (us, fv_us) <- rnHsUpdProjs flds+ ; let upd_flds = OverloadedRecUpdFields+ { xOLRecUpdFields = noExtField+ , olRecUpdFields = us }+ ; return ( mkExpandedExpr+ (RecordUpd noExtField (L l e) upd_flds)+ (mkRecordDotUpd getField setField (L l e) us)+ , plusFVs [fv_getField, fv_setField, fv_e, fv_us] ) }++rnExpr (HsRecSel x _) = dataConCantHappen x+ rnExpr (ExprWithTySig _ expr pty) = do { (pty', fvTy) <- rnHsSigWcType ExprWithTySigCtx pty ; (expr', fvExpr) <- bindSigTyVarsFV (hsWcScopedTvs pty') $@@ -569,8 +589,8 @@ (expr',fvExpr) <- rnLExpr expr stage <- getStage case stage of- Splice _ -> addErr $ TcRnIllegalStaticFormInSplice e- _ -> return ()+ Splice _ -> addErr $ TcRnTHError $ IllegalStaticFormInSplice e+ _ -> return () mod <- getModule let fvExpr' = filterNameSet (nameIsLocalOrFrom mod) fvExpr return (HsStatic fvExpr' expr', fvExpr)@@ -588,9 +608,6 @@ { (body',fvBody) <- rnCmdTop body ; return (HsProc x pat' body', fvBody) } -rnExpr other = pprPanic "rnExpr: unexpected expression" (ppr other)- -- HsWrap- {- ************************************************************************ * *@@ -1306,7 +1323,7 @@ -> [Name] -> [ParStmtBlock GhcPs GhcPs] -> RnM (([ParStmtBlock GhcRn GhcRn], thing), FreeVars) rn_segs _ bndrs_so_far []- = do { let (bndrs', dups) = removeDups cmpByOcc bndrs_so_far+ = do { let (bndrs', dups) = removeDupsOn nameOccName bndrs_so_far ; mapM_ dupErr dups ; (thing, fvs) <- bindLocalNames bndrs' (thing_inside bndrs') ; return (([], thing), fvs) }@@ -1322,7 +1339,6 @@ ; let seg' = ParStmtBlock x stmts' used_bndrs return_op ; return ((seg':segs', thing), fvs) } - cmpByOcc n1 n2 = nameOccName n1 `compare` nameOccName n2 dupErr vs = addErr $ TcRnListComprehensionDuplicateBinding (NE.head vs) lookupQualifiedDoStmtName :: HsStmtContext GhcRn -> Name -> RnM (SyntaxExpr GhcRn, FreeVars)@@ -2308,7 +2324,7 @@ hasRefutablePattern :: DynFlags -> ApplicativeArg GhcRn -> Bool hasRefutablePattern dflags (ApplicativeArgOne { app_arg_pattern = pat , is_body_stmt = False}) =- not (isIrrefutableHsPat dflags pat)+ not (isIrrefutableHsPatRn dflags pat) hasRefutablePattern _ _ = False isLetStmt :: LStmt (GhcPass a) b -> Bool@@ -2616,7 +2632,7 @@ dflags <- getDynFlags -- If the pattern is irrefutable (e.g.: wildcard, tuple, ~pat, etc.) -- we should not need to fail.- if | isIrrefutableHsPat dflags pat -> return (Nothing, emptyFVs)+ if | isIrrefutableHsPatRn dflags pat -> return (Nothing, emptyFVs) -- For non-monadic contexts (e.g. guard patterns, list -- comprehensions, etc.) we should not need to fail, or failure is handled in@@ -2777,4 +2793,4 @@ hfbAnn = noAnn , hfbLHS = fmap rnFieldLabelStrings fs , hfbRHS = arg- , hfbPun = pun}), fv ) }+ , hfbPun = pun }), fv ) }
GHC/Rename/Fixity.hs view
@@ -24,7 +24,6 @@ import GHC.Types.Fixity.Env import GHC.Types.Name import GHC.Types.Name.Env-import GHC.Types.Name.Reader import GHC.Types.Fixity import GHC.Types.SourceText import GHC.Types.SrcLoc@@ -107,10 +106,7 @@ -} lookupFixityRn :: Name -> RnM Fixity-lookupFixityRn name = lookupFixityRn' name (nameOccName name)--lookupFixityRn' :: Name -> OccName -> RnM Fixity-lookupFixityRn' name = fmap snd . lookupFixityRn_help' name+lookupFixityRn = fmap snd . lookupFixityRn_help -- | 'lookupFixityRn_help' returns @(True, fixity)@ if it finds a 'Fixity' -- in a local environment or from an interface file. Otherwise, it returns@@ -118,13 +114,7 @@ -- user-supplied fixity declarations). lookupFixityRn_help :: Name -> RnM (Bool, Fixity)-lookupFixityRn_help name =- lookupFixityRn_help' name (nameOccName name)--lookupFixityRn_help' :: Name- -> OccName- -> RnM (Bool, Fixity)-lookupFixityRn_help' name occ+lookupFixityRn_help name | isUnboundName name = return (False, Fixity NoSourceText minPrecedence InfixL) -- Minimise errors from unbound names; eg@@ -144,6 +134,7 @@ then return (False, defaultFixity) else lookup_imported } } } where+ occ = nameOccName name lookup_imported -- For imported names, we have to get their fixities by doing a -- loadInterfaceForName, and consulting the Ifaces that comes back@@ -180,10 +171,5 @@ lookupTyFixityRn :: LocatedN Name -> RnM Fixity lookupTyFixityRn = lookupFixityRn . unLoc --- | Look up the fixity of an occurrence of a record field selector.--- We use 'lookupFixityRn'' so that we can specify the 'OccName' as--- the field label, which might be different to the 'OccName' of the--- selector 'Name' if @DuplicateRecordFields@ is in use (#1173). lookupFieldFixityRn :: FieldOcc GhcRn -> RnM Fixity-lookupFieldFixityRn (FieldOcc n lrdr)- = lookupFixityRn' n (rdrNameOcc (unLoc lrdr))+lookupFieldFixityRn (FieldOcc n _) = lookupFixityRn n
GHC/Rename/HsType.hs view
@@ -13,7 +13,7 @@ module GHC.Rename.HsType ( -- Type related stuff rnHsType, rnLHsType, rnLHsTypes, rnContext, rnMaybeContext,- rnHsKind, rnLHsKind, rnLHsTypeArgs,+ rnLHsKind, rnLHsTypeArgs, rnHsSigType, rnHsWcType, rnHsPatSigTypeBindingVars, HsPatSigTypeScoping(..), rnHsSigWcType, rnHsPatSigType, newTyVarNameRn,@@ -45,19 +45,17 @@ import {-# SOURCE #-} GHC.Rename.Splice( rnSpliceType ) import GHC.Core.TyCo.FVs ( tyCoVarsOfTypeList )-import GHC.Driver.Session import GHC.Hs import GHC.Rename.Env import GHC.Rename.Doc import GHC.Rename.Utils ( mapFvRn, bindLocalNamesFV- , typeAppErr, newLocalBndrRn, checkDupRdrNamesN+ , typeAppErr, newLocalBndrRn, checkDupRdrNames , checkShadowedRdrNames, warnForallIdentifier ) import GHC.Rename.Fixity ( lookupFieldFixityRn, lookupFixityRn , lookupTyFixityRn ) import GHC.Rename.Unbound ( notInScopeErr, WhereLooking(WL_LocalOnly) ) import GHC.Tc.Errors.Types-import GHC.Tc.Errors.Ppr ( pprScopeError- , inHsDocContext, pprHsDocContext )+import GHC.Tc.Errors.Ppr ( pprHsDocContext ) import GHC.Tc.Utils.Monad import GHC.Types.Name.Reader import GHC.Builtin.Names@@ -215,14 +213,7 @@ -- Should the inner `a` refer to the outer one? shadow it? We are, as yet, undecided, -- so we currently reject. when (not (null varsInScope)) $- addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- vcat- [ text "Type variable" <> plural varsInScope- <+> hcat (punctuate (text ",") (map (quotes . ppr) varsInScope))- <+> isOrAre varsInScope- <+> text "already in scope."- , text "Type applications in patterns must bind fresh variables, without shadowing."- ]+ addErr $ TcRnBindVarAlreadyInScope varsInScope (wcVars, ibVars) <- partition_nwcs varsNotInScope rnImplicitTvBndrs ctxt Nothing ibVars $ \ ibVars' -> do (wcVars', hs_ty', fvs) <- rnWcBody ctxt wcVars hs_ty@@ -371,7 +362,7 @@ = setSrcSpanA loc $ do { traceRn "rnHsSigType" (ppr sig_ty) ; case outer_bndrs of- HsOuterExplicit{} -> checkPolyKinds env sig_ty+ HsOuterExplicit{} -> checkPolyKinds env (HsSigType sig_ty) HsOuterImplicit{} -> pure () ; imp_vars <- filterInScopeM $ extractHsTyRdrTyVars body ; bindHsOuterTyVarBndrs ctx Nothing imp_vars outer_bndrs $ \outer_bndrs' ->@@ -403,7 +394,7 @@ -- See Note [Source locations for implicitly bound type variables]. ; loc <- getSrcSpanM ; let loc' = noAnnSrcSpan loc- ; vars <- mapM (newTyVarNameRn mb_assoc . L loc' . unLoc) implicit_vs+ ; vars <- mapM (newTyVarNameRnImplicit mb_assoc . L loc' . unLoc) implicit_vs ; bindLocalNamesFV vars $ thing_inside vars }@@ -446,9 +437,7 @@ = do { implicit_vs <- forM (NE.groupAllWith unLoc $ implicit_vs_with_dups) $ \case (x :| []) -> return x (x :| _) -> do- let msg = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Variable" <+> text "`" <> ppr x <> text "'" <+> text "would be bound multiple times by" <+> pprHsDocContext ctx <> text "."- addErr msg+ addErr $ TcRnBindMultipleVariables ctx x return x ; traceRn "rnImplicitTvBndrs" $@@ -468,35 +457,6 @@ {- rnHsType is here because we call it from loadInstDecl, and I didn't want a gratuitous knot.--Note [HsQualTy in kinds]-~~~~~~~~~~~~~~~~~~~~~~-I was wondering whether HsQualTy could occur only at TypeLevel. But no,-we can have a qualified type in a kind too. Here is an example:-- type family F a where- F Bool = Nat- F Nat = Type-- type family G a where- G Type = Type -> Type- G () = Nat-- data X :: forall k1 k2. (F k1 ~ G k2) => k1 -> k2 -> Type where- MkX :: X 'True '()--See that k1 becomes Bool and k2 becomes (), so the equality is-satisfied. If I write MkX :: X 'True 'False, compilation fails with a-suitable message:-- MkX :: X 'True '()- • Couldn't match kind ‘G Bool’ with ‘Nat’- Expected kind: G Bool- Actual kind: F Bool--However: in a kind, the constraints in the HsQualTy must all be-equalities; or at least, any kinds with a class constraint are-uninhabited. See Note [Constraints in kinds] in GHC.Core.TyCo.Rep. -} data RnTyKiEnv@@ -552,9 +512,6 @@ rnLHsKind :: HsDocContext -> LHsKind GhcPs -> RnM (LHsKind GhcRn, FreeVars) rnLHsKind ctxt kind = rnLHsTyKi (mkTyKiEnv ctxt KindLevel RnTypeBody) kind -rnHsKind :: HsDocContext -> HsKind GhcPs -> RnM (HsKind GhcRn, FreeVars)-rnHsKind ctxt kind = rnHsTyKi (mkTyKiEnv ctxt KindLevel RnTypeBody) kind- -- renaming a type only, not a kind rnLHsTypeArg :: HsDocContext -> LHsTypeArg GhcPs -> RnM (LHsTypeArg GhcRn, FreeVars)@@ -603,18 +560,18 @@ rnHsTyKi :: RnTyKiEnv -> HsType GhcPs -> RnM (HsType GhcRn, FreeVars) rnHsTyKi env ty@(HsForAllTy { hst_tele = tele, hst_body = tau })- = do { checkPolyKinds env ty+ = do { checkPolyKinds env (HsType ty) ; bindHsForAllTelescope (rtke_ctxt env) tele $ \ tele' -> do { (tau', fvs) <- rnLHsTyKi env tau ; return ( HsForAllTy { hst_xforall = noExtField , hst_tele = tele' , hst_body = tau' } , fvs) } } -rnHsTyKi env ty@(HsQualTy { hst_ctxt = lctxt, hst_body = tau })- = do { data_kinds <- xoptM LangExt.DataKinds -- See Note [HsQualTy in kinds]- ; when (not data_kinds && isRnKindLevel env)- (addErr (dataKindsErr env ty))- ; (ctxt', fvs1) <- rnTyKiContext env lctxt+rnHsTyKi env (HsQualTy { hst_ctxt = lctxt, hst_body = tau })+ = do { -- no need to check type vs kind level here; this is+ -- checked in the type checker. See+ -- Note [No constraints in kinds] in GHC.Tc.Validity+ (ctxt', fvs1) <- rnTyKiContext env lctxt ; (tau', fvs2) <- rnLHsTyKi env tau ; return (HsQualTy { hst_xqual = noExtField, hst_ctxt = ctxt' , hst_body = tau' }@@ -624,9 +581,7 @@ = do { when (isRnKindLevel env && isRdrTyVar rdr_name) $ unlessXOptM LangExt.PolyKinds $ addErr $ TcRnWithHsDocContext (rtke_ctxt env) $- mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ text "Unexpected kind variable" <+> quotes (ppr rdr_name)- , text "Perhaps you intended to use PolyKinds" ]+ TcRnUnexpectedKindVar rdr_name -- Any type variable at the kind level is illegal without the use -- of PolyKinds (see #14710) ; name <- rnTyVar env rdr_name@@ -662,12 +617,18 @@ ; return (HsRecTy noExtField flds', fvs) } where get_fields (ConDeclCtx names)- = concatMapM (lookupConstructorFields . unLoc) names- get_fields _- = do { addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- (hang (text "Record syntax is illegal here:") 2 (ppr ty))- ; return [] }+ = do res <- concatMapM (lookupConstructorFields . unLoc) names+ if equalLength res names+ -- Lookup can fail when the record syntax is incorrect, e.g.+ -- data D = D Int { fld :: Bool }. See T7943.+ then return res+ else err+ get_fields _ = err + err =+ do { addErr $ TcRnIllegalRecordSyntax (Left ty)+ ; return [] }+ rnHsTyKi env (HsFunTy u mult ty1 ty2) = do { (ty1', fvs1) <- rnLHsTyKi env ty1 ; (ty2', fvs2) <- rnLHsTyKi env ty2@@ -685,8 +646,9 @@ rnHsTyKi env (HsKindSig x ty k) = do { kind_sigs_ok <- xoptM LangExt.KindSignatures ; unless kind_sigs_ok (badKindSigErr (rtke_ctxt env) ty)- ; (ty', lhs_fvs) <- rnLHsTyKi env ty ; (k', sig_fvs) <- rnLHsTyKi (env { rtke_level = KindLevel }) k+ ; (ty', lhs_fvs) <- bindSigTyVarsFV (hsScopedKvs k') $+ rnLHsTyKi env ty ; return (HsKindSig x ty' k', lhs_fvs `plusFV` sig_fvs) } -- Unboxed tuples are allowed to have poly-typed arguments. These@@ -709,28 +671,25 @@ rnHsTyKi env tyLit@(HsTyLit src t) = do { data_kinds <- xoptM LangExt.DataKinds ; unless data_kinds (addErr (dataKindsErr env tyLit))- ; when (negLit t) (addErr negLitErr)+ ; when (negLit t) (addErr $ TcRnNegativeNumTypeLiteral tyLit) ; return (HsTyLit src (rnHsTyLit t), emptyFVs) } where negLit :: HsTyLit (GhcPass p) -> Bool negLit (HsStrTy _ _) = False negLit (HsNumTy _ i) = i < 0 negLit (HsCharTy _ _) = False- negLitErr :: TcRnMessage- negLitErr = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Illegal literal in type (type literals must not be negative):" <+> ppr tyLit rnHsTyKi env (HsAppTy _ ty1 ty2) = do { (ty1', fvs1) <- rnLHsTyKi env ty1 ; (ty2', fvs2) <- rnLHsTyKi env ty2 ; return (HsAppTy noExtField ty1' ty2', fvs1 `plusFV` fvs2) } -rnHsTyKi env (HsAppKindTy l ty k)+rnHsTyKi env (HsAppKindTy _ ty at k) = do { kind_app <- xoptM LangExt.TypeApplications- ; unless kind_app (addErr (typeAppErr "kind" k))+ ; unless kind_app (addErr (typeAppErr KindLevel k)) ; (ty', fvs1) <- rnLHsTyKi env ty ; (k', fvs2) <- rnLHsTyKi (env {rtke_level = KindLevel }) k- ; return (HsAppKindTy l ty' k', fvs1 `plusFV` fvs2) }+ ; return (HsAppKindTy noExtField ty' at k', fvs1 `plusFV` fvs2) } rnHsTyKi env t@(HsIParamTy x n ty) = do { notInKinds env t@@ -759,12 +718,10 @@ check_in_scope :: RdrName -> RnM () check_in_scope rdr_name = do mb_name <- lookupLocalOccRn_maybe rdr_name- -- TODO: refactor this to avoid mkTcRnUnknownMessage when (isNothing mb_name) $ addErr $ TcRnWithHsDocContext (rtke_ctxt env) $- mkTcRnUnknownMessage $ mkPlainError noHints $- pprScopeError rdr_name (notInScopeErr WL_LocalOnly rdr_name)+ TcRnNotInScope (notInScopeErr WL_LocalOnly rdr_name) rdr_name [] [] rnHsTyKi env ty@(HsExplicitListTy _ ip tys) = do { data_kinds <- xoptM LangExt.DataKinds@@ -919,27 +876,22 @@ --------------- -- | Ensures either that we're in a type or that -XPolyKinds is set-checkPolyKinds :: Outputable ty- => RnTyKiEnv- -> ty -- ^ type- -> RnM ()+checkPolyKinds :: RnTyKiEnv+ -> HsTypeOrSigType GhcPs+ -> RnM () checkPolyKinds env ty | isRnKindLevel env = do { polykinds <- xoptM LangExt.PolyKinds ; unless polykinds $- addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- (text "Illegal kind:" <+> ppr ty $$- text "Did you mean to enable PolyKinds?") }+ addErr $ TcRnIllegalKind ty True } checkPolyKinds _ _ = return () -notInKinds :: Outputable ty- => RnTyKiEnv- -> ty+notInKinds :: RnTyKiEnv+ -> HsType GhcPs -> RnM () notInKinds env ty | isRnKindLevel env- = addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- text "Illegal kind:" <+> ppr ty+ = addErr $ TcRnIllegalKind (HsType ty) False notInKinds _ _ = return () {- *****************************************************@@ -967,8 +919,8 @@ -> Maybe a -- Just _ => an associated type decl -> FreeKiTyVars -- Kind variables from scope -> LHsQTyVars GhcPs- -> (LHsQTyVars GhcRn -> Bool -> RnM (b, FreeVars))- -- The Bool is True <=> all kind variables used in the+ -> (LHsQTyVars GhcRn -> FreeKiTyVars -> RnM (b, FreeVars))+ -- The FreeKiTyVars is null <=> all kind variables used in the -- kind signature are bound on the left. Reason: -- the last clause of Note [CUSKs: complete user-supplied kind signatures] -- in GHC.Hs.Decls@@ -991,7 +943,6 @@ bndr_kv_occs ++ body_kv_occs body_remaining = filterFreeVarsToBind bndr_kv_occs $ filterFreeVarsToBind bndrs body_kv_occs- all_bound_on_lhs = null body_remaining ; traceRn "checkMixedVars3" $ vcat [ text "bndrs" <+> ppr hs_tv_bndrs@@ -1006,7 +957,8 @@ -- This is the only call site for bindLHsTyVarBndrs where we pass -- NoWarnUnusedForalls, which suppresses -Wunused-foralls warnings. -- See Note [Suppress -Wunused-foralls when binding LHsQTyVars].- do { let -- The SrcSpan that rnImplicitTvOccs will attach to each Name will+ do { rn_bndrs <- traverse rnLHsTyVarBndrVisFlag rn_bndrs+ ; let -- The SrcSpan that rnImplicitTvOccs will attach to each Name will -- span the entire declaration to which the LHsQTyVars belongs, -- which will be reflected in warning and error messages. We can -- be a little more precise than that by pointing to the location@@ -1017,7 +969,7 @@ ; traceRn "bindHsQTyVars" (ppr hsq_bndrs $$ ppr implicit_kv_nms $$ ppr rn_bndrs) ; thing_inside (HsQTvs { hsq_ext = implicit_kv_nms , hsq_explicit = rn_bndrs })- all_bound_on_lhs } }+ body_remaining } } where hs_tv_bndrs = hsQTvExplicit hsq_bndrs @@ -1034,7 +986,7 @@ -- The in-tree API annotations extend the LHsTyVarBndr location to -- include surrounding parens. for error messages to be -- compatible, we recreate the location from the contents- get_bndr_loc :: LHsTyVarBndr () GhcPs -> SrcSpan+ get_bndr_loc :: LHsTyVarBndr flag GhcPs -> SrcSpan get_bndr_loc (L _ (UserTyVar _ _ ln)) = getLocA ln get_bndr_loc (L _ (KindedTyVar _ _ ln lk)) = combineSrcSpans (getLocA ln) (getLocA lk)@@ -1183,6 +1135,21 @@ thing_inside $ HsOuterExplicit { hso_xexplicit = noExtField , hso_bndrs = exp_bndrs' } +-- See Note [Term variable capture and implicit quantification]+warn_term_var_capture :: LocatedN RdrName -> RnM ()+warn_term_var_capture lVar = do+ gbl_env <- getGlobalRdrEnv+ local_env <- getLocalRdrEnv+ case demoteRdrNameTv $ unLoc lVar of+ Nothing -> return ()+ Just demoted_name -> do+ let global_vars = lookupGRE gbl_env (LookupRdrName demoted_name SameNameSpace)+ let mlocal_var = lookupLocalRdrEnv local_env demoted_name+ case mlocal_var of+ Just name -> warnCapturedTerm lVar (Right name)+ Nothing -> unless (null global_vars) $+ warnCapturedTerm lVar (Left global_vars)+ bindHsForAllTelescope :: HsDocContext -> HsForAllTelescope GhcPs -> (HsForAllTelescope GhcRn -> RnM (a, FreeVars))@@ -1218,7 +1185,7 @@ -> RnM (b, FreeVars) bindLHsTyVarBndrs doc wuf mb_assoc tv_bndrs thing_inside = do { when (isNothing mb_assoc) (checkShadowedRdrNames tv_names_w_loc)- ; checkDupRdrNamesN tv_names_w_loc+ ; checkDupRdrNames tv_names_w_loc ; go tv_bndrs thing_inside } where tv_names_w_loc = map hsLTyVarLocName tv_bndrs@@ -1256,15 +1223,87 @@ $ thing_inside (L loc (KindedTyVar x fl (L lv tv_nm) kind')) ; return (b, fvs1 `plusFV` fvs2) } -newTyVarNameRn :: Maybe a -- associated class- -> LocatedN RdrName -> RnM Name-newTyVarNameRn mb_assoc lrdr@(L _ rdr)+-- Check for TypeAbstractions and update the type parameter of HsBndrVis.+-- The binder itself is already renamed and is returned unmodified.+rnLHsTyVarBndrVisFlag+ :: LHsTyVarBndr (HsBndrVis GhcPs) GhcRn+ -> RnM (LHsTyVarBndr (HsBndrVis GhcRn) GhcRn)+rnLHsTyVarBndrVisFlag (L loc bndr) = do+ let lbndr = L loc (updateHsTyVarBndrFlag rnHsBndrVis bndr)+ unlessXOptM LangExt.TypeAbstractions $+ when (isHsBndrInvisible (hsTyVarBndrFlag bndr)) $+ addErr (TcRnIllegalInvisTyVarBndr lbndr)+ return lbndr++-- rnHsBndrVis is a no-op. We could use 'coerce' in an ideal world,+-- but GHC can't crack this nut because type families are involved:+-- HsBndrInvisible stores (LHsToken "@" pass), which is defined via XRec.+rnHsBndrVis :: HsBndrVis GhcPs -> HsBndrVis GhcRn+rnHsBndrVis HsBndrRequired = HsBndrRequired+rnHsBndrVis (HsBndrInvisible at) = HsBndrInvisible at++newTyVarNameRn, newTyVarNameRnImplicit+ :: Maybe a -- associated class+ -> LocatedN RdrName -> RnM Name+newTyVarNameRn mb_assoc = new_tv_name_rn mb_assoc newLocalBndrRn+newTyVarNameRnImplicit mb_assoc = new_tv_name_rn mb_assoc $ \lrdr ->+ do { warn_term_var_capture lrdr+ ; newLocalBndrRn lrdr }++new_tv_name_rn :: Maybe a -- associated class+ -> (LocatedN RdrName -> RnM Name) -- how to create a new name+ -> (LocatedN RdrName -> RnM Name)+new_tv_name_rn Nothing cont lrdr = cont lrdr+new_tv_name_rn (Just _) cont lrdr@(L _ rdr) = do { rdr_env <- getLocalRdrEnv- ; case (mb_assoc, lookupLocalRdrEnv rdr_env rdr) of- (Just _, Just n) -> return n- -- Use the same Name as the parent class decl+ ; case lookupLocalRdrEnv rdr_env rdr of+ Just n -> return n -- Use the same Name as the parent class decl+ _ -> cont lrdr } - _ -> newLocalBndrRn lrdr }+{- Note [Term variable capture and implicit quantification]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+-Wterm-variable-capture is a warning introduced in GHC Proposal #281 "Visible forall in types of terms",+Section 7.3: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0281-visible-forall.rst#73implicit-quantification++Its purpose is to notify users when implicit quantification occurs that would+stop working under RequiredTypeArguments (a future GHC extension). Example:++ a = 42+ id :: a -> a++As it stands, the `a` in the signature `id :: a -> a` is considered free and+leads to implicit quantification, as if the user wrote `id :: forall a. a -> a`.+Under RequiredTypeArguments it will capture the term-level variable `a` (bound by `a = 42`),+leading to a type error.++`warn_term_var_capture` detects this by demoting the namespace of the+implicitly quantified type variable (`TvName` becomes `VarName`) and looking it up+in the environment. But when do we call `warn_term_var_capture`? It's tempting+to do so at the start of `rnImplicitTvOccs`, as soon as we know our implicit+variables:++ rnImplicitTvOccs mb_assoc implicit_vs_with_dups thing_inside+ = do { let implicit_vs = nubN implicit_vs_with_dups+ ; mapM_ warn_term_var_capture implicit_vs+ ... }++This approach generates false positives (#23434) because it misses a corner+case: class variables in associated types. Consider the following example:++ k = 12+ class C k a where+ type AT a :: k -> Type++If we look at the signature for `AT` in isolation, the `k` looks like a free+variable, so it's passed to `rnImplicitTvOccs`. And if we passed it to+`warn_term_var_capture`, we would find the `k` bound by `k = 12` and report a warning.+But we don't want that: `k` is actually bound in the declaration header of the+parent class.++The solution is to check if it's a class variable (this is done in `new_tv_name_rn`)+before we check for term variable capture.+-}+ {- ********************************************************* * *@@ -1301,10 +1340,12 @@ lookupField :: FastStringEnv FieldLabel -> FieldOcc GhcPs -> FieldOcc GhcRn lookupField fl_env (FieldOcc _ (L lr rdr)) =- FieldOcc (flSelector fl) (L lr rdr)+ FieldOcc sel (L lr $ mkRdrUnqual $ occName sel) where lbl = occNameFS $ rdrNameOcc rdr- fl = expectJust "lookupField" $ lookupFsEnv fl_env lbl+ sel = flSelector+ $ expectJust "lookupField"+ $ lookupFsEnv fl_env lbl {- ************************************************************************@@ -1422,18 +1463,6 @@ ---------------------------- --- | Name of an operator in an operator application or section-data OpName = NormalOp Name -- ^ A normal identifier- | NegateOp -- ^ Prefix negation- | UnboundOp RdrName -- ^ An unbound identifier- | RecFldOp (FieldOcc GhcRn) -- ^ A record field occurrence--instance Outputable OpName where- ppr (NormalOp n) = ppr n- ppr NegateOp = ppr negateName- ppr (UnboundOp uv) = ppr uv- ppr (RecFldOp fld) = ppr fld- get_op :: LHsExpr GhcRn -> OpName -- An unbound name could be either HsVar or HsUnboundVar -- See GHC.Rename.Expr.rnUnboundVar@@ -1602,8 +1631,7 @@ (sectionPrecErr (get_op op, op_fix) (arg_op, arg_fix) section) --- | Look up the fixity for an operator name. Be careful to use--- 'lookupFieldFixityRn' for record fields (see #13132).+-- | Look up the fixity for an operator name. lookupFixityOp :: OpName -> RnM Fixity lookupFixityOp (NormalOp n) = lookupFixityRn n lookupFixityOp NegateOp = lookupFixityRn negateName@@ -1618,35 +1646,21 @@ | is_unbound n1 || is_unbound n2 = return () -- Avoid error cascade | otherwise- = addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Precedence parsing error")- 4 (hsep [text "cannot mix", ppr_opfix op1, text "and",- ppr_opfix op2,- text "in the same infix expression"])+ = addErr $ TcRnPrecedenceParsingError op1 op2 sectionPrecErr :: (OpName,Fixity) -> (OpName,Fixity) -> HsExpr GhcPs -> RnM () sectionPrecErr op@(n1,_) arg_op@(n2,_) section | is_unbound n1 || is_unbound n2 = return () -- Avoid error cascade | otherwise- = addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [text "The operator" <+> ppr_opfix op <+> text "of a section",- nest 4 (sep [text "must have lower precedence than that of the operand,",- nest 2 (text "namely" <+> ppr_opfix arg_op)]),- nest 4 (text "in the section:" <+> quotes (ppr section))]+ = addErr $ TcRnSectionPrecedenceError op arg_op section is_unbound :: OpName -> Bool is_unbound (NormalOp n) = isUnboundName n is_unbound UnboundOp{} = True is_unbound _ = False -ppr_opfix :: (OpName, Fixity) -> SDoc-ppr_opfix (op, fixity) = pp_op <+> brackets (ppr fixity)- where- pp_op | NegateOp <- op = text "prefix `-'"- | otherwise = quotes (ppr op) - {- ***************************************************** * * Errors@@ -1655,37 +1669,33 @@ unexpectedPatSigTypeErr :: HsPatSigType GhcPs -> TcRnMessage unexpectedPatSigTypeErr ty- = mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Illegal type signature:" <+> quotes (ppr ty))- 2 (text "Type signatures are only allowed in patterns with ScopedTypeVariables")+ = TcRnUnexpectedPatSigType ty badKindSigErr :: HsDocContext -> LHsType GhcPs -> TcM () badKindSigErr doc (L loc ty) = setSrcSpanA loc $ addErr $ TcRnWithHsDocContext doc $- mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Illegal kind signature:" <+> quotes (ppr ty))- 2 (text "Perhaps you intended to use KindSignatures")+ TcRnKindSignaturesDisabled (Left ty) dataKindsErr :: RnTyKiEnv -> HsType GhcPs -> TcRnMessage dataKindsErr env thing- = mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Illegal" <+> pp_what <> colon <+> quotes (ppr thing))- 2 (text "Perhaps you intended to use DataKinds")+ = TcRnDataKindsError type_or_Kind thing where- pp_what | isRnKindLevel env = text "kind"- | otherwise = text "type"+ type_or_Kind | isRnKindLevel env = KindLevel+ | otherwise = TypeLevel warnUnusedForAll :: OutputableBndrFlag flag 'Renamed => HsDocContext -> LHsTyVarBndr flag GhcRn -> FreeVars -> TcM () warnUnusedForAll doc (L loc tv) used_names = unless (hsTyVarName tv `elemNameSet` used_names) $ do- let msg = mkTcRnUnknownMessage $- mkPlainDiagnostic (WarningWithFlag Opt_WarnUnusedForalls) noHints $- vcat [ text "Unused quantified type variable" <+> quotes (ppr tv)- , inHsDocContext doc ]+ let msg = TcRnUnusedQuantifiedTypeVar doc (HsTyVarBndrExistentialFlag tv) addDiagnosticAt (locA loc) msg +warnCapturedTerm :: LocatedN RdrName -> Either [GlobalRdrElt] Name -> TcM ()+warnCapturedTerm (L loc tv) shadowed_term_names+ = let msg = TcRnCapturedTermName tv shadowed_term_names+ in addDiagnosticAt (locA loc) msg+ {- ************************************************************************ * *@@ -1789,15 +1799,17 @@ a free variable 'a', which we implicitly quantify over. That is why we can also use it to the left of the double colon: 'Left a -The logic resides in extractHsTyRdrTyVarsKindVars. We use it both for type-synonyms and type family instances.+The logic resides in extractHsTyRdrTyVarsKindVars. -This is something of a stopgap solution until we can explicitly bind invisible+This was a stopgap solution until we could explicitly bind invisible type/kind variables: type TySyn3 :: forall a. Maybe a type TySyn3 @a = 'Just ('Nothing :: Maybe a) +Now that the new syntax was proposed in #425 and implemented in 9.8, we issue a warning+-Wimplicit-rhs-quantification for TySyn2 and TySyn4 and will eventually disallow them.+ Note [Implicit quantification in type synonyms: non-taken alternatives] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1961,7 +1973,7 @@ flds HsAppTy _ ty1 ty2 -> extract_lty ty1 $ extract_lty ty2 acc- HsAppKindTy _ ty k -> extract_lty ty $+ HsAppKindTy _ ty _ k -> extract_lty ty $ extract_lty k acc HsListTy _ ty -> extract_lty ty acc HsTupleTy _ _ tys -> extract_ltys tys acc@@ -1980,8 +1992,7 @@ HsExplicitTupleTy _ tys -> extract_ltys tys acc HsTyLit _ _ -> acc HsStarTy _ _ -> acc- HsKindSig _ ty ki -> extract_lty ty $- extract_lty ki acc+ HsKindSig _ ty ki -> extract_kind_sig ty ki acc HsForAllTy { hst_tele = tele, hst_body = ty } -> extract_hs_for_all_telescope tele acc $ extract_lty ty []@@ -1992,6 +2003,19 @@ -- We deal with these separately in rnLHsTypeWithWildCards HsWildCardTy {} -> acc +extract_kind_sig :: LHsType GhcPs -- type+ -> LHsType GhcPs -- kind+ -> FreeKiTyVars -> FreeKiTyVars+extract_kind_sig ty ki acc+ | (L _ HsForAllTy { hst_tele = HsForAllInvis { hsf_invis_bndrs = bndrs }+ , hst_body = ki_body }) <- ki+ = extract_hs_tv_bndrs bndrs acc $+ extract_lty ty $+ extract_lty ki_body []+extract_kind_sig ty ki acc+ = extract_lty ty $+ extract_lty ki acc+ extract_lhs_sig_ty :: LHsSigType GhcPs -> FreeKiTyVars extract_lhs_sig_ty (L _ (HsSig{sig_bndrs = outer_bndrs, sig_body = body})) = extractHsOuterTvBndrs outer_bndrs $ extract_lty body []@@ -2051,7 +2075,7 @@ extract_tv :: LocatedN RdrName -> FreeKiTyVars -> FreeKiTyVars extract_tv tv acc =- if isRdrTyVar (unLoc tv) then tv:acc else acc+ if isRdrTyVar (unLoc tv) && (not . isQual) (unLoc tv) then tv:acc else acc -- Deletes duplicates in a list of Located things. This is used to: --
GHC/Rename/Module.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} @@ -21,7 +22,6 @@ import {-# SOURCE #-} GHC.Rename.Splice ( rnSpliceDecl, rnTopSpliceDecls ) import GHC.Hs-import GHC.Types.Error import GHC.Types.FieldLabel import GHC.Types.Name.Reader import GHC.Rename.HsType@@ -29,7 +29,7 @@ import GHC.Rename.Doc import GHC.Rename.Env import GHC.Rename.Utils ( mapFvRn, bindLocalNames- , checkDupRdrNamesN, bindLocalNamesFV+ , checkDupRdrNames, bindLocalNamesFV , checkShadowedRdrNames, warnUnusedTypePatterns , newLocalBndrsRn , noNestedForallsContextsErr@@ -37,9 +37,9 @@ import GHC.Rename.Unbound ( mkUnboundName, notInScopeErr, WhereLooking(WL_Global) ) import GHC.Rename.Names import GHC.Tc.Errors.Types-import GHC.Tc.Errors.Ppr (pprScopeError) import GHC.Tc.Gen.Annotation ( annCtxt ) import GHC.Tc.Utils.Monad+import GHC.Tc.Types.Origin ( TypedThing(..) ) import GHC.Types.ForeignCall ( CCallTarget(..) ) import GHC.Unit@@ -52,17 +52,16 @@ import GHC.Types.Name import GHC.Types.Name.Set import GHC.Types.Name.Env-import GHC.Types.Avail import GHC.Utils.Outputable import GHC.Data.Bag-import GHC.Types.Basic ( pprRuleName, TypeOrKind(..) )+import GHC.Types.Basic ( TypeOrKind(..) ) import GHC.Data.FastString import GHC.Types.SrcLoc as SrcLoc-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Utils.Misc ( lengthExceeds, partitionWith ) import GHC.Utils.Panic import GHC.Driver.Env ( HscEnv(..), hsc_home_unit)-import GHC.Data.List.SetOps ( findDupsEq, removeDups, equivClasses )+import GHC.Data.List.SetOps ( findDupsEq, removeDupsOn, equivClasses ) import GHC.Data.Graph.Directed ( SCC, flattenSCC, flattenSCCs, Node(..) , stronglyConnCompFromEdgedVerticesUniq ) import GHC.Types.Unique.Set@@ -74,11 +73,10 @@ import Control.Arrow ( first ) import Data.Foldable ( toList ) import Data.List ( mapAccumL )-import qualified Data.List.NonEmpty as NE import Data.List.NonEmpty ( NonEmpty(..), head ) import Data.Maybe ( isNothing, fromMaybe, mapMaybe ) import qualified Data.Set as Set ( difference, fromList, toList, null )-import Data.Function ( on )+import GHC.Types.GREInfo (ConInfo, mkConInfo, conInfoFields) {- | @rnSourceDecl@ "renames" declarations. It simultaneously performs dependency analysis and precedence parsing.@@ -155,7 +153,7 @@ -- Excludes pattern-synonym binders -- They are already in scope traceRn "rnSrcDecls" (ppr id_bndrs) ;- tc_envs <- extendGlobalRdrEnvRn (map avail id_bndrs) local_fix_env ;+ tc_envs <- extendGlobalRdrEnvRn (map (mkLocalVanillaGRE NoParent) id_bndrs) local_fix_env ; restoreEnvs tc_envs $ do { -- Now everything is in scope, as the remaining renaming assumes.@@ -189,13 +187,15 @@ -- Rename fixity declarations and error if we try to -- fix something from another module (duplicates were checked in (A)) let { all_bndrs = tc_bndrs `unionNameSet` val_bndr_set } ;+ traceRn "rnSrcDecls fixity" $+ vcat [ text "all_bndrs:" <+> ppr all_bndrs ] ; rn_fix_decls <- mapM (mapM (rnSrcFixityDecl (TopSigCtxt all_bndrs))) fix_decls ; -- Rename deprec decls; -- check for duplicates and ensure that deprecated things are defined locally -- at the moment, we don't keep these around past renaming- rn_warns <- rnSrcWarnDecls all_bndrs warn_decls ;+ rn_decl_warns <- rnSrcWarnDecls all_bndrs warn_decls ; -- (H) Rename Everything else @@ -237,7 +237,7 @@ final_tcg_env = let tcg_env' = (last_tcg_env `addTcgDUs` src_dus) in -- we return the deprecs in the env, not in the HsGroup above- tcg_env' { tcg_warns = tcg_warns tcg_env' `plusWarns` rn_warns };+ tcg_env' { tcg_warns = insertWarnDecls (tcg_warns tcg_env') rn_decl_warns }; } ; traceRn "finish rnSrc" (ppr rn_group) ; traceRn "finish Dus" (ppr src_dus ) ;@@ -267,9 +267,9 @@ -} -- checks that the deprecations are defined locally, and that there are no duplicates-rnSrcWarnDecls :: NameSet -> [LWarnDecls GhcPs] -> RnM (Warnings GhcRn)+rnSrcWarnDecls :: NameSet -> [LWarnDecls GhcPs] -> RnM (DeclWarnOccNames GhcRn) rnSrcWarnDecls _ []- = return NoWarnings+ = return [] rnSrcWarnDecls bndr_set decls' = do { -- check for duplicates@@ -277,7 +277,7 @@ in addErrAt (locA loc) (TcRnDuplicateWarningDecls lrdr' rdr)) warn_rdr_dups ; pairs_s <- mapM (addLocMA rn_deprec) decls- ; return (WarnSome ((concat pairs_s))) }+ ; return $ concat pairs_s } where decls = concatMap (wd_warnings . unLoc) decls' @@ -288,7 +288,10 @@ = do { names <- concatMapM (lookupLocalTcNames sig_ctxt what . unLoc) rdr_names ; txt' <- rnWarningTxt txt- ; return [(rdrNameOcc rdr, txt') | (rdr, _) <- names] }+ ; return [(nameOccName nm, txt') | (_, nm) <- names] }+ -- Use the OccName from the Name we looked up, rather than from the RdrName,+ -- as we might hit multiple different NameSpaces when looking up+ -- (e.g. deprecating both a variable and a record field). what = text "deprecation" @@ -296,9 +299,12 @@ $ concatMap (\(L _ (Warning _ ns _)) -> ns) decls rnWarningTxt :: WarningTxt GhcPs -> RnM (WarningTxt GhcRn)-rnWarningTxt (WarningTxt st wst) = do+rnWarningTxt (WarningTxt mb_cat st wst) = do+ forM_ mb_cat $ \(L _ (InWarningCategory _ _ (L loc cat))) ->+ unless (validWarningCategory cat) $+ addErrAt loc (TcRnInvalidWarningCategory cat) wst' <- traverse (traverse rnHsDoc) wst- pure (WarningTxt st wst')+ pure (WarningTxt mb_cat st wst') rnWarningTxt (DeprecatedTxt st wst) = do wst' <- traverse (traverse rnHsDoc) wst pure (DeprecatedTxt st wst')@@ -449,11 +455,9 @@ checkCanonicalInstances cls poly_ty mbinds = do whenWOptM Opt_WarnNonCanonicalMonadInstances $ checkCanonicalMonadInstances- "https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return" whenWOptM Opt_WarnNonCanonicalMonoidInstances $ checkCanonicalMonoidInstances- "https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/semigroup-monoid" where -- Warn about unsound/non-canonical 'Applicative'/'Monad' instance@@ -469,19 +473,17 @@ -- * Warn if 'pure' is defined backwards (i.e. @pure = return@). -- * Warn if '(*>)' is defined backwards (i.e. @(*>) = (>>)@). --- checkCanonicalMonadInstances refURL+ checkCanonicalMonadInstances | cls == applicativeClassName = forM_ (bagToList mbinds) $ \(L loc mbind) -> setSrcSpanA loc $ case mbind of FunBind { fun_id = L _ name , fun_matches = mg } | name == pureAName, isAliasMG mg == Just returnMName- -> addWarnNonCanonicalMethod1 refURL- Opt_WarnNonCanonicalMonadInstances "pure" "return"+ -> addWarnNonCanonicalMonad NonCanonical_Pure | name == thenAName, isAliasMG mg == Just thenMName- -> addWarnNonCanonicalMethod1 refURL- Opt_WarnNonCanonicalMonadInstances "(*>)" "(>>)"+ -> addWarnNonCanonicalMonad NonCanonical_ThenA _ -> return () @@ -491,12 +493,10 @@ FunBind { fun_id = L _ name , fun_matches = mg } | name == returnMName, isAliasMG mg /= Just pureAName- -> addWarnNonCanonicalMethod2 refURL- Opt_WarnNonCanonicalMonadInstances "return" "pure"+ -> addWarnNonCanonicalMonad NonCanonical_Return | name == thenMName, isAliasMG mg /= Just thenAName- -> addWarnNonCanonicalMethod2 refURL- Opt_WarnNonCanonicalMonadInstances "(>>)" "(*>)"+ -> addWarnNonCanonicalMonad NonCanonical_ThenM _ -> return () @@ -515,15 +515,14 @@ -- -- * Warn if '(<>)' is defined backwards (i.e. @(<>) = mappend@). --- checkCanonicalMonoidInstances refURL+ checkCanonicalMonoidInstances | cls == semigroupClassName = forM_ (bagToList mbinds) $ \(L loc mbind) -> setSrcSpanA loc $ case mbind of FunBind { fun_id = L _ name , fun_matches = mg } | name == sappendName, isAliasMG mg == Just mappendName- -> addWarnNonCanonicalMethod1 refURL- Opt_WarnNonCanonicalMonoidInstances "(<>)" "mappend"+ -> addWarnNonCanonicalMonoid NonCanonical_Sappend _ -> return () @@ -533,9 +532,7 @@ FunBind { fun_id = L _ name , fun_matches = mg } | name == mappendName, isAliasMG mg /= Just sappendName- -> addWarnNonCanonicalMethod2 refURL- Opt_WarnNonCanonicalMonoidInstances- "mappend" "(<>)"+ -> addWarnNonCanonicalMonoid NonCanonical_Mappend _ -> return () @@ -551,58 +548,21 @@ , HsVar _ lrhsName <- unLoc body = Just (unLoc lrhsName) isAliasMG _ = Nothing - -- got "lhs = rhs" but expected something different- addWarnNonCanonicalMethod1 refURL flag lhs rhs = do- let dia = mkTcRnUnknownMessage $- mkPlainDiagnostic (WarningWithFlag flag) noHints $- vcat [ text "Noncanonical" <+>- quotes (text (lhs ++ " = " ++ rhs)) <+>- text "definition detected"- , instDeclCtxt1 poly_ty- , text "Move definition from" <+>- quotes (text rhs) <+>- text "to" <+> quotes (text lhs)- , text "See also:" <+>- text refURL- ]- addDiagnostic dia-- -- expected "lhs = rhs" but got something else- addWarnNonCanonicalMethod2 refURL flag lhs rhs = do- let dia = mkTcRnUnknownMessage $- mkPlainDiagnostic (WarningWithFlag flag) noHints $- vcat [ text "Noncanonical" <+>- quotes (text lhs) <+>- text "definition detected"- , instDeclCtxt1 poly_ty- , quotes (text lhs) <+>- text "will eventually be removed in favour of" <+>- quotes (text rhs)- , text "Either remove definition for" <+>- quotes (text lhs) <+> text "(recommended)" <+>- text "or define as" <+>- quotes (text (lhs ++ " = " ++ rhs))- , text "See also:" <+>- text refURL- ]- addDiagnostic dia-- -- stolen from GHC.Tc.TyCl.Instance- instDeclCtxt1 :: LHsSigType GhcRn -> SDoc- instDeclCtxt1 hs_inst_ty- = inst_decl_ctxt (ppr (getLHsInstDeclHead hs_inst_ty))+ addWarnNonCanonicalMonoid reason =+ addWarnNonCanonicalDefinition (NonCanonicalMonoid reason) - inst_decl_ctxt :: SDoc -> SDoc- inst_decl_ctxt doc = hang (text "in the instance declaration for")- 2 (quotes doc <> text ".")+ addWarnNonCanonicalMonad reason =+ addWarnNonCanonicalDefinition (NonCanonicalMonad reason) + addWarnNonCanonicalDefinition reason =+ addDiagnostic (TcRnNonCanonicalDefinition reason poly_ty) rnClsInstDecl :: ClsInstDecl GhcPs -> RnM (ClsInstDecl GhcRn, FreeVars) rnClsInstDecl (ClsInstDecl { cid_poly_ty = inst_ty, cid_binds = mbinds , cid_sigs = uprags, cid_tyfam_insts = ats , cid_overlap_mode = oflag , cid_datafam_insts = adts })- = do { checkInferredVars ctxt inf_err inst_ty+ = do { checkInferredVars ctxt inst_ty ; (inst_ty', inst_fvs) <- rnHsSigType ctxt TypeLevel inst_ty ; let (ktv_names, _, head_ty') = splitLHsInstDeclTy inst_ty' -- Check if there are any nested `forall`s or contexts, which are@@ -610,22 +570,18 @@ -- Note [No nested foralls or contexts in instance types] in -- GHC.Hs.Type)... mb_nested_msg = noNestedForallsContextsErr- (text "Instance head") head_ty'+ NFC_InstanceHead head_ty' -- ...then check if the instance head is actually headed by a -- class type constructor... eith_cls = case hsTyGetAppHead_maybe head_ty' of Just (L _ cls) -> Right cls- Nothing -> Left- ( getLocA head_ty'- , mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Illegal head of an instance declaration:"- <+> quotes (ppr head_ty'))- 2 (vcat [ text "Instance heads must be of the form"- , nest 2 $ text "C ty_1 ... ty_n"- , text "where" <+> quotes (char 'C')- <+> text "is a class"- ])- )+ Nothing ->+ Left+ ( getLocA head_ty'+ , TcRnIllegalInstance $+ IllegalClassInstance (HsTypeRnThing $ unLoc head_ty') $+ IllegalInstanceHead $ InstHeadNonClass Nothing+ ) -- ...finally, attempt to retrieve the class type constructor, failing -- with an error message if there isn't one. To avoid excessive -- amounts of error messages, we will only report one of the errors@@ -673,7 +629,6 @@ -- to remove the context). where ctxt = GenericCtx $ text "an instance declaration"- inf_err = Just (text "Inferred type variables are not allowed") -- The instance is malformed. We'd still like to make *some* progress -- (rather than failing outright), so we report an error and continue for@@ -686,14 +641,10 @@ rnFamEqn :: HsDocContext -> AssocTyFamInfo- -> FreeKiTyVars- -- ^ Additional kind variables to implicitly bind if there is no- -- explicit forall. (See the comments on @all_imp_vars@ below for a- -- more detailed explanation.) -> FamEqn GhcPs rhs -> (HsDocContext -> rhs -> RnM (rhs', FreeVars)) -> RnM (FamEqn GhcRn rhs', FreeVars)-rnFamEqn doc atfi extra_kvars+rnFamEqn doc atfi (FamEqn { feqn_tycon = tycon , feqn_bndrs = outer_bndrs , feqn_pats = pats@@ -704,19 +655,8 @@ -- all_imp_vars represent the implicitly bound type variables. This is -- empty if we have an explicit `forall` (see -- Note [forall-or-nothing rule] in GHC.Hs.Type), which means- -- ignoring:- --- -- - pat_kity_vars, the free variables mentioned in the type patterns- -- on the LHS of the equation, and- -- - extra_kvars, which is one of the following:- -- * For type family instances, extra_kvars are the free kind- -- variables mentioned in an outermost kind signature on the RHS- -- of the equation.- -- (See Note [Implicit quantification in type synonyms] in- -- GHC.Rename.HsType.)- -- * For data family instances, extra_kvars are the free kind- -- variables mentioned in the explicit return kind, if one is- -- provided. (e.g., the `k` in `data instance T :: k -> Type`).+ -- ignoring pat_kity_vars, the free variables mentioned in the type patterns+ -- on the LHS of the equation -- -- Some examples: --@@ -730,8 +670,6 @@ -- type family G :: Maybe a -- type instance forall a. G = (Nothing :: Maybe a) -- -- all_imp_vars = []- -- type instance G = (Nothing :: Maybe a)- -- -- all_imp_vars = [a] -- -- data family H :: k -> Type -- data instance forall k. H :: k -> Type where ...@@ -742,7 +680,7 @@ -- -- For associated type family instances, exclude the type variables -- bound by the instance head with filterInScopeM (#19649).- ; all_imp_vars <- filterInScopeM $ pat_kity_vars ++ extra_kvars+ ; all_imp_vars <- filterInScopeM $ pat_kity_vars ; bindHsOuterTyVarBndrs doc mb_cls all_imp_vars outer_bndrs $ \rn_outer_bndrs -> do { (pats', pat_fvs) <- rnLHsTypeArgs (FamPatCtx tycon) pats@@ -779,24 +717,17 @@ -- associated family instance but not bound on the LHS, then reject -- that type variable as being out of scope. -- See Note [Renaming associated types].- -- Per that Note, the LHS type variables consist of:- --- -- - The variables mentioned in the instance's type patterns- -- (pat_fvs), and- --- -- - The variables mentioned in an outermost kind signature on the- -- RHS. This is a subset of `rhs_fvs`. To compute it, we look up- -- each RdrName in `extra_kvars` to find its corresponding Name in- -- the LocalRdrEnv.- ; extra_kvar_nms <- mapMaybeM (lookupLocalOccRn_maybe . unLoc) extra_kvars- ; let lhs_bound_vars = pat_fvs `extendNameSetList` extra_kvar_nms- improperly_scoped cls_tkv =+ -- Per that Note, the LHS type variables consist of the variables+ -- mentioned in the instance's type patterns (pat_fvs)+ ; let improperly_scoped cls_tkv = cls_tkv `elemNameSet` rhs_fvs -- Mentioned on the RHS...- && not (cls_tkv `elemNameSet` lhs_bound_vars)+ && not (cls_tkv `elemNameSet` pat_fvs) -- ...but not bound on the LHS. bad_tvs = filter improperly_scoped inst_head_tvs- ; unless (null bad_tvs) (badAssocRhs bad_tvs)+ ; unless (null bad_tvs) $ addErr $+ TcRnIllegalInstance $ IllegalFamilyInstance $+ FamInstRHSOutOfScopeTyVars Nothing bad_tvs ; let eqn_fvs = rhs_fvs `plusFV` pat_fvs -- See Note [Type family equations and occurrences]@@ -838,19 +769,11 @@ -- -- type instance F a b c = Either a b -- ^^^^^- lhs_loc = case map lhsTypeArgSrcSpan pats ++ map getLocA extra_kvars of+ lhs_loc = case map lhsTypeArgSrcSpan pats of [] -> panic "rnFamEqn.lhs_loc" [loc] -> loc (loc:locs) -> loc `combineSrcSpans` last locs - badAssocRhs :: [Name] -> RnM ()- badAssocRhs ns- = addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- (hang (text "The RHS of an associated type declaration mentions"- <+> text "out-of-scope variable" <> plural ns- <+> pprWithCommas (quotes . ppr) ns)- 2 (text "All such variables must be bound on the LHS"))- rnTyFamInstDecl :: AssocTyFamInfo -> TyFamInstDecl GhcPs -> RnM (TyFamInstDecl GhcRn, FreeVars)@@ -905,11 +828,10 @@ rnTyFamInstEqn :: AssocTyFamInfo -> TyFamInstEqn GhcPs -> RnM (TyFamInstEqn GhcRn, FreeVars)-rnTyFamInstEqn atfi eqn@(FamEqn { feqn_tycon = tycon, feqn_rhs = rhs })- = rnFamEqn (TySynCtx tycon) atfi extra_kvs eqn rnTySyn- where- extra_kvs = extractHsTyRdrTyVarsKindVars rhs+rnTyFamInstEqn atfi eqn@(FamEqn { feqn_tycon = tycon })+ = rnFamEqn (TySynCtx tycon) atfi eqn rnTySyn + rnTyFamDefltDecl :: Name -> TyFamDefltDecl GhcPs -> RnM (TyFamDefltDecl GhcRn, FreeVars)@@ -919,11 +841,9 @@ -> DataFamInstDecl GhcPs -> RnM (DataFamInstDecl GhcRn, FreeVars) rnDataFamInstDecl atfi (DataFamInstDecl { dfid_eqn =- eqn@(FamEqn { feqn_tycon = tycon- , feqn_rhs = rhs })})- = do { let extra_kvs = extractDataDefnKindVars rhs- ; (eqn', fvs) <-- rnFamEqn (TyDataCtx tycon) atfi extra_kvs eqn rnDataDefn+ eqn@(FamEqn { feqn_tycon = tycon })})+ = do { (eqn', fvs) <-+ rnFamEqn (TyDataCtx tycon) atfi eqn rnDataDefn ; return (DataFamInstDecl { dfid_eqn = eqn' }, fvs) } -- Renaming of the associated types in instances.@@ -1009,10 +929,7 @@ properly scoped. Specifically, the rule is this: Every variable mentioned on the RHS of a type instance declaration- (whether associated or not) must be either- * Mentioned on the LHS, or- * Mentioned in an outermost kind signature on the RHS- (see Note [Implicit quantification in type synonyms])+ (whether associated or not) must be mentioned on the LHS Here is a simple example of something we should reject: @@ -1022,8 +939,7 @@ type F Int x = z Here, `z` is mentioned on the RHS of the associated instance without being-mentioned on the LHS, nor is `z` mentioned in an outermost kind signature. The-renamer will reject `z` as being out of scope without much fuss.+mentioned on the LHS. The renamer will reject `z` as being out of scope without much fuss. Things get slightly trickier when the instance header itself binds type variables. Consider this example (adapted from #5515):@@ -1115,10 +1031,8 @@ Note that the `o` in the `Codomain 'KProxy` instance should be considered improperly scoped. It does not meet the criteria for being explicitly- quantified, as it is not mentioned by name on the LHS, nor does it meet the- criteria for being implicitly quantified, as it is used in a RHS kind- signature that is not outermost (see Note [Implicit quantification in type- synonyms]). However, `o` /is/ bound by the instance header, so if this+ quantified, as it is not mentioned by name on the LHS.+ However, `o` /is/ bound by the instance header, so if this program is not rejected by the renamer, the typechecker would treat it as though you had written this: @@ -1130,6 +1044,12 @@ If the user really wants the latter, it is simple enough to communicate their intent by mentioning `o` on the LHS by name. +* Historical note: Previously we had to add type variables from the outermost+ kind signature on the RHS to the scope of associated type family instance,+ i.e. GHC did implicit quantification over them. But now that we implement+ GHC Proposal #425 "Invisible binders in type declarations"+ we don't need to do this anymore.+ Note [Type family equations and occurrences] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In most data/type family equations, the type family name used in the equation@@ -1188,30 +1108,23 @@ rnSrcDerivDecl :: DerivDecl GhcPs -> RnM (DerivDecl GhcRn, FreeVars) rnSrcDerivDecl (DerivDecl _ ty mds overlap) = do { standalone_deriv_ok <- xoptM LangExt.StandaloneDeriving- ; unless standalone_deriv_ok (addErr standaloneDerivErr)- ; checkInferredVars ctxt inf_err nowc_ty+ ; unless standalone_deriv_ok (addErr TcRnUnexpectedStandaloneDerivingDecl)+ ; checkInferredVars ctxt nowc_ty ; (mds', ty', fvs) <- rnLDerivStrategy ctxt mds $ rnHsSigWcType ctxt ty -- Check if there are any nested `forall`s or contexts, which are -- illegal in the type of an instance declaration (see -- Note [No nested foralls or contexts in instance types] in -- GHC.Hs.Type). ; addNoNestedForallsContextsErr ctxt- (text "Standalone-derived instance head")+ NFC_StandaloneDerivedInstanceHead (getLHsInstDeclHead $ dropWildCards ty') ; warnNoDerivStrat mds' loc ; return (DerivDecl noAnn ty' mds' overlap, fvs) } where ctxt = DerivDeclCtx- inf_err = Just (text "Inferred type variables are not allowed") loc = getLocA nowc_ty nowc_ty = dropWildCards ty -standaloneDerivErr :: TcRnMessage-standaloneDerivErr- = mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Illegal standalone deriving declaration")- 2 (text "Use StandaloneDeriving to enable this extension")- {- ********************************************************* * *@@ -1237,7 +1150,7 @@ , rd_rhs = rhs }) = do { let rdr_names_w_loc = map (get_var . unLoc) tmvs ; mapM_ warnForallIdentifier rdr_names_w_loc- ; checkDupRdrNamesN rdr_names_w_loc+ ; checkDupRdrNames rdr_names_w_loc ; checkShadowedRdrNames rdr_names_w_loc ; names <- newLocalBndrsRn rdr_names_w_loc ; let doc = RuleCtx (unLoc rule_name)@@ -1314,7 +1227,7 @@ -- Check that LHS vars are all bound ; let bad_vars = [var | var <- ids, not (var `elemNameSet` fv_lhs')]- ; mapM_ (addErr . badRuleVar rule_name) bad_vars }+ ; mapM_ (addErr . TcRnUnusedVariableInRuleDecl rule_name) bad_vars } validRuleLhs :: [Name] -> LHsExpr GhcRn -> Maybe (HsExpr GhcRn) -- Nothing => OK@@ -1351,27 +1264,15 @@ checkl_es es = foldr (mplus . checkl_e) Nothing es -} -badRuleVar :: FastString -> Name -> TcRnMessage-badRuleVar name var- = mkTcRnUnknownMessage $ mkPlainError noHints $- sep [text "Rule" <+> doubleQuotes (ftext name) <> colon,- text "Forall'd variable" <+> quotes (ppr var) <+>- text "does not appear on left hand side"] badRuleLhsErr :: FastString -> LHsExpr GhcRn -> HsExpr GhcRn -> TcRnMessage badRuleLhsErr name lhs bad_e- = mkTcRnUnknownMessage $ mkPlainError noHints $- sep [text "Rule" <+> pprRuleName name <> colon,- nest 2 (vcat [err,- text "in left-hand side:" <+> ppr lhs])]- $$- text "LHS must be of form (f e1 .. en) where f is not forall'd"+ = TcRnIllegalRuleLhs errReason name lhs bad_e where- err =- case bad_e of- HsUnboundVar _ uv ->- pprScopeError uv $ notInScopeErr WL_Global uv- _ -> text "Illegal expression:" <+> ppr bad_e+ errReason = case bad_e of+ HsUnboundVar _ uv ->+ UnboundVariable uv $ notInScopeErr WL_Global uv+ _ -> IllegalExpression {- ************************************************************** * *@@ -1520,12 +1421,17 @@ = do { -- Rename the type/class, instance, and role declarations ; tycls_w_fvs <- mapM (wrapLocFstMA rnTyClDecl) (tyClGroupTyClDecls tycl_ds) ; let tc_names = mkNameSet (map (tcdName . unLoc . fst) tycls_w_fvs)+ ; traceRn "rnTyClDecls" $+ vcat [ text "tyClGroupTyClDecls:" <+> ppr tycls_w_fvs+ , text "tc_names:" <+> ppr tc_names ] ; kisigs_w_fvs <- rnStandaloneKindSignatures tc_names (tyClGroupKindSigs tycl_ds) ; instds_w_fvs <- mapM (wrapLocFstMA rnSrcInstDecl) (tyClGroupInstDecls tycl_ds) ; role_annots <- rnRoleAnnots tc_names (tyClGroupRoleDecls tycl_ds) -- Do SCC analysis on the type/class decls ; rdr_env <- getGlobalRdrEnv+ ; traceRn "rnTyClDecls SCC analysis" $+ vcat [ text "rdr_env:" <+> ppr rdr_env ] ; let tycl_sccs = depAnalTyClDecls rdr_env kisig_fv_env tycls_w_fvs role_annot_env = mkRoleAnnotEnv role_annots (kisig_env, kisig_fv_env) = mkKindSig_fv_env kisigs_w_fvs@@ -1604,7 +1510,7 @@ -> [LStandaloneKindSig GhcPs] -> RnM [(LStandaloneKindSig GhcRn, FreeVars)] rnStandaloneKindSignatures tc_names kisigs- = do { let (no_dups, dup_kisigs) = removeDups (compare `on` get_name) kisigs+ = do { let (no_dups, dup_kisigs) = removeDupsOn get_name kisigs get_name = standaloneKindSigName . unLoc ; mapM_ dupKindSig_Err dup_kisigs ; mapM (wrapLocFstMA (rnStandaloneKindSignature tc_names)) no_dups@@ -1616,17 +1522,12 @@ -> RnM (StandaloneKindSig GhcRn, FreeVars) rnStandaloneKindSignature tc_names (StandaloneKindSig _ v ki) = do { standalone_ki_sig_ok <- xoptM LangExt.StandaloneKindSignatures- ; unless standalone_ki_sig_ok $ addErr standaloneKiSigErr- ; new_v <- lookupSigCtxtOccRnN (TopSigCtxt tc_names) (text "standalone kind signature") v+ ; unless standalone_ki_sig_ok $ addErr TcRnUnexpectedStandaloneKindSig+ ; new_v <- lookupSigCtxtOccRn (TopSigCtxt tc_names) (text "standalone kind signature") v ; let doc = StandaloneKindSigCtx (ppr v) ; (new_ki, fvs) <- rnHsSigType doc KindLevel ki ; return (StandaloneKindSig noExtField new_v new_ki, fvs) }- where- standaloneKiSigErr :: TcRnMessage- standaloneKiSigErr = mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Illegal standalone kind signature")- 2 (text "Did you mean to enable StandaloneKindSignatures?") depAnalTyClDecls :: GlobalRdrEnv -> KindSig_FV_Env@@ -1660,7 +1561,7 @@ getParent :: GlobalRdrEnv -> Name -> Name getParent rdr_env n = case lookupGRE_Name rdr_env n of- Just gre -> case gre_par gre of+ Just gre -> case greParent gre of ParentIs { par_is = p } -> p _ -> n Nothing -> n@@ -1682,7 +1583,7 @@ rnRoleAnnots tc_names role_annots = do { -- Check for duplicates *before* renaming, to avoid -- lumping together all the unboundNames- let (no_dups, dup_annots) = removeDups (compare `on` get_name) role_annots+ let (no_dups, dup_annots) = removeDupsOn get_name role_annots get_name = roleAnnotDeclName . unLoc ; mapM_ dupRoleAnnotErr dup_annots ; mapM (wrapLocMA rn_role_annot1) no_dups }@@ -1690,40 +1591,18 @@ 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' <- lookupSigCtxtOccRnN (RoleAnnotCtxt tc_names)- (text "role annotation")- tycon+ tycon' <- lookupSigCtxtOccRn (RoleAnnotCtxt tc_names)+ (text "role annotation")+ tycon ; return $ RoleAnnotDecl noExtField tycon' roles } dupRoleAnnotErr :: NonEmpty (LRoleAnnotDecl GhcPs) -> RnM ()-dupRoleAnnotErr list- = addErrAt (locA loc) $ mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Duplicate role annotations for" <+>- quotes (ppr $ roleAnnotDeclName first_decl) <> colon)- 2 (vcat $ map pp_role_annot $ NE.toList sorted_list)- where- sorted_list = NE.sortBy cmp_loc list- ((L loc first_decl) :| _) = sorted_list-- pp_role_annot (L loc decl) = hang (ppr decl)- 4 (text "-- written at" <+> ppr (locA loc))-- cmp_loc = SrcLoc.leftmost_smallest `on` getLocA+dupRoleAnnotErr list@(L loc _ :| _)+ = addErrAt (locA loc) (TcRnDuplicateRoleAnnot list) dupKindSig_Err :: NonEmpty (LStandaloneKindSig GhcPs) -> RnM ()-dupKindSig_Err list- = addErrAt (locA loc) $ mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Duplicate standalone kind signatures for" <+>- quotes (ppr $ standaloneKindSigName first_decl) <> colon)- 2 (vcat $ map pp_kisig $ NE.toList sorted_list)- where- sorted_list = NE.sortBy cmp_loc list- ((L loc first_decl) :| _) = sorted_list-- pp_kisig (L loc decl) =- hang (ppr decl) 4 (text "-- written at" <+> ppr (locA loc))-- cmp_loc = SrcLoc.leftmost_smallest `on` getLocA+dupKindSig_Err list@(L loc _ :| _)+ = addErrAt (locA loc) (TcRnDuplicateKindSig list) {- Note [Role annotations in the renamer] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1810,11 +1689,16 @@ ; let kvs = extractHsTyRdrTyVarsKindVars rhs doc = TySynCtx tycon ; traceRn "rntycl-ty" (ppr tycon <+> ppr kvs)- ; bindHsQTyVars doc Nothing kvs tyvars $ \ tyvars' _ ->- do { (rhs', fvs) <- rnTySyn doc rhs+ ; bindHsQTyVars doc Nothing kvs tyvars $ \ tyvars' free_rhs_kvs ->+ do { mapM_ warn_implicit_kvs (nubL free_rhs_kvs)+ ; (rhs', fvs) <- rnTySyn doc rhs ; return (SynDecl { tcdLName = tycon', tcdTyVars = tyvars' , tcdFixity = fixity , tcdRhs = rhs', tcdSExt = fvs }, fvs) } }+ where+ warn_implicit_kvs :: LocatedN RdrName -> RnM ()+ warn_implicit_kvs kv =+ addDiagnosticAt (getLocA kv) (TcRnImplicitRhsQuantification kv) -- "data", "newtype" declarations rnTyClDecl (DataDecl@@ -1826,12 +1710,12 @@ doc = TyDataCtx tycon new_or_data = dataDefnConsNewOrData cons ; traceRn "rntycl-data" (ppr tycon <+> ppr kvs)- ; bindHsQTyVars doc Nothing kvs tyvars $ \ tyvars' no_rhs_kvs ->+ ; bindHsQTyVars doc Nothing kvs tyvars $ \ tyvars' free_rhs_kvs -> do { (defn', fvs) <- rnDataDefn doc defn- ; cusk <- data_decl_has_cusk tyvars' new_or_data no_rhs_kvs kind_sig+ ; cusk <- data_decl_has_cusk tyvars' new_or_data (null free_rhs_kvs) kind_sig ; let rn_info = DataDeclRn { tcdDataCusk = cusk , tcdFVs = fvs }- ; traceRn "rndata" (ppr tycon <+> ppr cusk <+> ppr no_rhs_kvs)+ ; traceRn "rndata" (ppr tycon <+> ppr cusk <+> ppr free_rhs_kvs) ; return (DataDecl { tcdLName = tycon' , tcdTyVars = tyvars' , tcdFixity = fixity@@ -1871,7 +1755,7 @@ ; let sig_rdr_names_w_locs = [op | L _ (ClassOpSig _ False ops _) <- sigs , op <- ops]- ; checkDupRdrNamesN sig_rdr_names_w_locs+ ; checkDupRdrNames sig_rdr_names_w_locs -- Typechecker is responsible for checking that we only -- give default-method bindings for things in this class. -- The renamer *could* check this for class decls, but can't@@ -1953,7 +1837,7 @@ = do { -- DatatypeContexts (i.e., stupid contexts) can't be combined with -- GADT syntax. See Note [The stupid context] in GHC.Core.DataCon. checkTc (h98_style || null (fromMaybeContext context))- (badGadtStupidTheta doc)+ (TcRnStupidThetaInGadt doc) -- Check restrictions on "type data" declarations. -- See Note [Type data declarations].@@ -1989,7 +1873,7 @@ rn_derivs ds = do { deriv_strats_ok <- xoptM LangExt.DerivingStrategies ; failIfTc (lengthExceeds ds 1 && not deriv_strats_ok)- multipleDerivClausesErr+ TcRnIllegalMultipleDerivClauses ; (ds', fvs) <- mapFvRn (rnLHsDerivingClause doc) ds ; return (ds', fvs) } @@ -2067,14 +1951,7 @@ (R3) There are no strictness flags, because they don't make sense at the type level. -(R4) The types of the constructors contain no constraints other than- equality constraints. (This is the same restriction imposed- on constructors to be promoted with the DataKinds extension in- dc_theta_illegal_constraint called from GHC.Tc.Gen.HsType.tcTyVar,- but in that case the restriction is imposed if and when a data- constructor is used in a type, whereas here it is imposed at- the point of definition. See also Note [Constraints in kinds]- in GHC.Core.TyCo.Rep.)+(R4) The types of the constructors contain no constraints. (R5) There are no deriving clauses. @@ -2092,8 +1969,6 @@ is never used (invariant (I1)), so it barely makes sense to talk about the worker. A `type data` constructor only shows up in types, where it appears as a TyCon, specifically a PromotedDataCon -- no Id in sight.- See #24620 for an example of what happens if you accidentally include- a wrapper. See `wrapped_reqd` in GHC.Types.Id.Make.mkDataConRep` for the place where this check is implemented.@@ -2142,20 +2017,17 @@ with the data constructor, else (I1) is violated. See GHC.Core.Utils Note [Refine DEFAULT case alternatives] Exception 2 - (W2c) In `GHC.Core.Opt.ConstantFold.caseRules`, we do not want to transform- case dataToTagLarge# x of t -> blah+ (W2c) In `GHC.Core.Opt.ConstantFold.caseRules`, disable the rule for+ `dataToTag#` in the case of `type data`. We do not want to transform+ case dataToTag# x of t -> blah into case x of { A -> ...; B -> .. }- because again that conjures up the type-level-only data constructors+ because again that conjures up the type-level-only data contructors `A` and `B` in a pattern, violating (I1) (#23023).- So we check for "type data" TyCons before applying this- transformation. (In practice, this doesn't matter because- we also refuse to solve DataToTag instances at types- corresponding to type data declarations. The main parts of the implementation are: -* (R0): The parser recognizes `type data` (but not `type newtype`).+* The parser recognizes `type data` (but not `type newtype`); this ensures (R0). * During the initial construction of the AST, GHC.Parser.PostProcess.checkNewOrData sets the `Bool` argument of the@@ -2214,54 +2086,6 @@ `type data` declarations. When these are converted back to Hs types in a splice, the constructors are placed in the TcCls namespace. -* A `type data` declaration _never_ generates wrappers for its data- constructors, as they only make sense for value-level data constructors.- See `wrapped_reqd` in GHC.Types.Id.Make.mkDataConRep` for the place where- this check is implemented.-- This includes `type data` declarations implemented as GADTs, such as- this example from #22948:-- type data T a where- A :: T Int- B :: T a-- If `T` were an ordinary `data` declaration, then `A` would have a wrapper- to account for the GADT-like equality in its return type. Because `T` is- declared as a `type data` declaration, however, the wrapper is omitted.--* Although `type data` data constructors do not exist at the value level,- it is still possible to match on a value whose type is headed by a `type data`- type constructor, such as this example from #22964:-- type data T a where- A :: T Int- B :: T a-- f :: T a -> ()- f x = case x of {}-- This has two consequences:-- * During checking the coverage of `f`'s pattern matches, we treat `T` as if it- were an empty data type so that GHC does not warn the user to match against- `A` or `B`. (Otherwise, you end up with the bug reported in #22964.)- See GHC.HsToCore.Pmc.Solver.vanillaCompleteMatchTC.-- * In `GHC.Core.Utils.refineDataAlt`, do /not/ fill in the DEFAULT case with- the data constructor. See- Note [Refine DEFAULT case alternatives] Exception 2, in GHC.Core.Utils.--* To prevent users from conjuring up `type data` values at the term level, we- disallow using the tagToEnum# function on a type headed by a `type data`- type. For instance, GHC will reject this code:-- type data Letter = A | B | C-- f :: Letter- f = tagToEnum# 0#-- See `GHC.Tc.Gen.App.checkTagToEnum`, specifically `check_enumeration`. -} warnNoDerivStrat :: Maybe (LDerivStrategy GhcRn)@@ -2271,21 +2095,10 @@ = do { dyn_flags <- getDynFlags ; case mds of Nothing ->- let dia = mkTcRnUnknownMessage $- mkPlainDiagnostic (WarningWithFlag Opt_WarnMissingDerivingStrategies) noHints $- (if xopt LangExt.DerivingStrategies dyn_flags- then no_strat_warning- else no_strat_warning $+$ deriv_strat_nenabled- )- in addDiagnosticAt loc dia+ addDiagnosticAt loc $ TcRnNoDerivStratSpecified+ (xopt LangExt.DerivingStrategies dyn_flags) _ -> pure () }- where- no_strat_warning :: SDoc- no_strat_warning = text "No deriving strategy specified. Did you want stock"- <> text ", newtype, or anyclass?"- deriv_strat_nenabled :: SDoc- deriv_strat_nenabled = text "Use DerivingStrategies to specify a strategy." rnLHsDerivingClause :: HsDocContext -> LHsDerivingClause GhcPs -> RnM (LHsDerivingClause GhcRn, FreeVars)@@ -2314,14 +2127,13 @@ rn_clause_pred :: LHsSigType GhcPs -> RnM (LHsSigType GhcRn, FreeVars) rn_clause_pred pred_ty = do- let inf_err = Just (text "Inferred type variables are not allowed")- checkInferredVars doc inf_err pred_ty+ checkInferredVars doc pred_ty ret@(pred_ty', _) <- rnHsSigType doc TypeLevel pred_ty -- Check if there are any nested `forall`s, which are illegal in a -- `deriving` clause. -- See Note [No nested foralls or contexts in instance types] -- (Wrinkle: Derived instances) in GHC.Hs.Type.- addNoNestedForallsContextsErr doc (text "Derived class type")+ addNoNestedForallsContextsErr doc NFC_DerivedClassType (getLHsInstDeclHead pred_ty') pure ret @@ -2349,14 +2161,14 @@ = LangExt.DerivingStrategies unlessXOptM extNeeded $- failWith $ illegalDerivStrategyErr ds+ failWith $ TcRnIllegalDerivStrategy ds case ds of StockStrategy _ -> boring_case (StockStrategy noExtField) AnyclassStrategy _ -> boring_case (AnyclassStrategy noExtField) NewtypeStrategy _ -> boring_case (NewtypeStrategy noExtField) ViaStrategy (XViaStrategyPs _ via_ty) ->- do checkInferredVars doc inf_err via_ty+ do checkInferredVars doc via_ty (via_ty', fvs1) <- rnHsSigType doc TypeLevel via_ty let HsSig { sig_bndrs = via_outer_bndrs , sig_body = via_body } = unLoc via_ty'@@ -2366,43 +2178,15 @@ -- See Note [No nested foralls or contexts in instance types] -- (Wrinkle: Derived instances) in GHC.Hs.Type. addNoNestedForallsContextsErr doc- (quotes (text "via") <+> text "type") via_body+ NFC_ViaType via_body (thing, fvs2) <- bindLocalNamesFV via_tvs thing_inside pure (ViaStrategy via_ty', thing, fvs1 `plusFV` fvs2) - inf_err = Just (text "Inferred type variables are not allowed")- boring_case :: ds -> RnM (ds, a, FreeVars) boring_case ds = do (thing, fvs) <- thing_inside pure (ds, thing, fvs) -badGadtStupidTheta :: HsDocContext -> TcRnMessage-badGadtStupidTheta _- = mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [text "No context is allowed on a GADT-style data declaration",- text "(You can put a context on each constructor, though.)"]--illegalDerivStrategyErr :: DerivStrategy GhcPs -> TcRnMessage-illegalDerivStrategyErr ds- = mkTcRnUnknownMessage $ mkPlainError noHints $- 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 :: TcRnMessage-multipleDerivClausesErr- = mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ text "Illegal use of multiple, consecutive deriving clauses"- , text "Use DerivingStrategies to allow this" ]- rnFamDecl :: Maybe Name -- Just cls => this FamilyDecl is nested -- inside an *class decl* for cls -- used for associated types@@ -2465,11 +2249,8 @@ rdr_env <- getLocalRdrEnv ; let resName = hsLTyVarName tvbndr ; when (resName `elemLocalRdrEnv` rdr_env) $- addErrAt (getLocA tvbndr) $ mkTcRnUnknownMessage $ mkPlainError noHints $- (hsep [ text "Type variable", quotes (ppr resName) <> comma- , text "naming a type family result,"- ] $$- text "shadows an already bound type variable")+ addErrAt (getLocA tvbndr) $+ TcRnShadowedTyVarNameInFamResult resName ; bindLHsTyVarBndr doc Nothing -- This might be a lie, but it's used for -- scoping checks that are irrelevant here@@ -2539,20 +2320,13 @@ -- not-in-scope variables) don't check the validity of injectivity -- annotation. This gives better error messages. ; when (noRnErrors && not lhsValid) $- addErrAt (getLocA injFrom) $ mkTcRnUnknownMessage $ mkPlainError noHints $- ( vcat [ text $ "Incorrect type variable on the LHS of "- ++ "injectivity condition"- , nest 5- ( vcat [ text "Expected :" <+> ppr resName- , text "Actual :" <+> ppr injFrom ])])+ addErrAt (getLocA injFrom) $+ TcRnIncorrectTyVarOnLhsOfInjCond resName injFrom ; when (noRnErrors && not (Set.null rhsValid)) $ do { let errorVars = Set.toList rhsValid- ; addErrAt (locA srcSpan) $ mkTcRnUnknownMessage $ mkPlainError noHints $- ( hsep- [ text "Unknown type variable" <> plural errorVars- , text "on the RHS of injectivity condition:"- , interpp'SP errorVars ] ) }+ ; addErrAt (locA srcSpan) $+ TcRnUnknownTyVarsOnRhsOfInjCond errorVars } ; return injDecl' } @@ -2660,7 +2434,7 @@ -- Note [GADT abstract syntax] (Wrinkle: No nested foralls or contexts) -- in GHC.Hs.Type. ; addNoNestedForallsContextsErr ctxt- (text "GADT constructor type signature") new_res_ty+ NFC_GadtConSig new_res_ty ; let all_fvs = fvs1 `plusFV` fvs2 `plusFV` fvs3 @@ -2728,35 +2502,40 @@ -> ([Name] -> TcRnIf TcGblEnv TcLclEnv a) -> TcM a extendPatSynEnv dup_fields_ok has_sel val_decls local_fix_env thing = do { names_with_fls <- new_ps val_decls- ; let pat_syn_bndrs = concat [ name: map flSelector fields- | (name, fields) <- names_with_fls ]- ; let avails = map avail (map fst names_with_fls)- ++ map availField (concatMap snd names_with_fls)- ; (gbl_env, lcl_env) <- extendGlobalRdrEnvRn avails local_fix_env-- ; let field_env' = extendNameEnvList (tcg_field_env gbl_env) names_with_fls- final_gbl_env = gbl_env { tcg_field_env = field_env' }- ; restoreEnvs (final_gbl_env, lcl_env) (thing pat_syn_bndrs) }+ ; let pat_syn_bndrs = concat [ conLikeName_Name name : map flSelector flds+ | (name, con_info) <- names_with_fls+ , let flds = conInfoFields con_info ]+ ; let gres = map (mkLocalConLikeGRE NoParent) names_with_fls+ ++ mkLocalFieldGREs NoParent names_with_fls+ -- Recall Note [Parents] in GHC.Types.Name.Reader:+ --+ -- pattern synonym constructors and their record fields have no parent+ -- in the module in which they are defined.+ ; (gbl_env, lcl_env) <- extendGlobalRdrEnvRn gres local_fix_env+ ; restoreEnvs (gbl_env, lcl_env) (thing pat_syn_bndrs) } where- new_ps :: HsValBinds GhcPs -> TcM [(Name, [FieldLabel])]++ new_ps :: HsValBinds GhcPs -> TcM [(ConLikeName, ConInfo)] new_ps (ValBinds _ binds _) = foldrM new_ps' [] binds new_ps _ = panic "new_ps" new_ps' :: LHsBindLR GhcPs GhcPs- -> [(Name, [FieldLabel])]- -> TcM [(Name, [FieldLabel])]+ -> [(ConLikeName, ConInfo)]+ -> TcM [(ConLikeName, ConInfo)] new_ps' bind names | (L bind_loc (PatSynBind _ (PSB { psb_id = L _ n , psb_args = RecCon as }))) <- bind = do bnd_name <- newTopSrcBinder (L (l2l bind_loc) n) let field_occs = map ((\ f -> L (noAnnSrcSpan $ getLocA (foLabel f)) f) . recordPatSynField) as- flds <- mapM (newRecordSelector dup_fields_ok has_sel [bnd_name]) field_occs- return ((bnd_name, flds): names)- | L bind_loc (PatSynBind _ (PSB { psb_id = L _ n})) <- bind+ flds <- mapM (newRecordFieldLabel dup_fields_ok has_sel [bnd_name]) field_occs+ let con_info = mkConInfo (conDetailsArity length (RecCon as)) flds+ return ((PatSynName bnd_name, con_info) : names)+ | L bind_loc (PatSynBind _ (PSB { psb_id = L _ n, psb_args = as })) <- bind = do bnd_name <- newTopSrcBinder (L (la2na bind_loc) n)- return ((bnd_name, []): names)+ let con_info = mkConInfo (conDetailsArity length as) []+ return ((PatSynName bnd_name, con_info) : names) | otherwise = return names @@ -2822,23 +2601,18 @@ 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)+ -- (i.e. a naked top level expression), throw an error if+ -- TemplateHaskell is not enabled. case flag of DollarSplice -> return ()- BareSplice -> do { th_on <- xoptM LangExt.TemplateHaskell- ; unless th_on $ setSrcSpan (locA loc) $- failWith badImplicitSplice }+ BareSplice -> do { unlessXOptM LangExt.TemplateHaskell+ $ setSrcSpan (locA loc)+ $ failWith badImplicitSplice } ; return (gp, Just (splice, ds)) } where badImplicitSplice :: TcRnMessage- badImplicitSplice = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Parse error: module header, import declaration"- $$ text "or top-level declaration expected."- -- The compiler should suggest the above, and not using- -- TemplateHaskell since the former suggestion is more- -- relevant to the larger base of users.- -- See #12146 for discussion.+ badImplicitSplice = TcRnTHError (THSyntaxError BadImplicitSplice) -- Class declarations: added to the TyClGroup add gp@(HsGroup {hs_tyclds = ts}) l (TyClD _ d) ds
GHC/Rename/Names.hs view
@@ -8,2201 +8,2237 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE LambdaCase #-}--module GHC.Rename.Names (- rnImports, getLocalNonValBinders, newRecordSelector,- extendGlobalRdrEnvRn,- gresFromAvails,- calculateAvails,- reportUnusedNames,- checkConName,- mkChildEnv,- findChildren,- findImportUsage,- getMinimalImports,- printMinimalImports,- renamePkgQual, renameRawPkgQual,- ImportDeclUsage- ) where--import GHC.Prelude hiding ( head, init, last, tail )--import GHC.Driver.Env-import GHC.Driver.Session-import GHC.Driver.Ppr--import GHC.Rename.Env-import GHC.Rename.Fixity-import GHC.Rename.Utils ( warnUnusedTopBinds, mkFieldEnv )--import GHC.Tc.Errors.Types-import GHC.Tc.Utils.Env-import GHC.Tc.Utils.Monad--import GHC.Hs-import GHC.Iface.Load ( loadSrcInterface )-import GHC.Builtin.Names-import GHC.Parser.PostProcess ( setRdrNameSpace )-import GHC.Core.Type-import GHC.Core.PatSyn-import GHC.Core.TyCon ( TyCon, tyConName )-import qualified GHC.LanguageExtensions as LangExt--import GHC.Utils.Outputable as Outputable-import GHC.Utils.Misc as Utils-import GHC.Utils.Panic--import GHC.Types.Fixity.Env-import GHC.Types.SafeHaskell-import GHC.Types.Name-import GHC.Types.Name.Env-import GHC.Types.Name.Set-import GHC.Types.Name.Reader-import GHC.Types.Avail-import GHC.Types.FieldLabel-import GHC.Types.SourceFile-import GHC.Types.SrcLoc as SrcLoc-import GHC.Types.Basic ( TopLevelFlag(..) )-import GHC.Types.SourceText-import GHC.Types.Id-import GHC.Types.HpcInfo-import GHC.Types.Error-import GHC.Types.PkgQual--import GHC.Unit-import GHC.Unit.Module.Warnings-import GHC.Unit.Module.ModIface-import GHC.Unit.Module.Imported-import GHC.Unit.Module.Deps-import GHC.Unit.Env--import GHC.Data.Maybe-import GHC.Data.FastString-import GHC.Data.FastString.Env--import Language.Haskell.Syntax.Basic (FieldLabelString(..))--import Control.Monad-import Data.Either ( partitionEithers )-import Data.Map ( Map )-import qualified Data.Map as Map-import Data.Ord ( comparing )-import Data.List ( partition, (\\), find, sortBy )-import Data.List.NonEmpty (NonEmpty(..))-import qualified Data.List.NonEmpty as NE-import Data.Function ( on )-import qualified Data.Set as S-import Data.Foldable ( toList )-import System.FilePath ((</>))--import System.IO-import GHC.Data.Bag--{--************************************************************************-* *-\subsection{rnImports}-* *-************************************************************************--Note [Tracking Trust Transitively]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When we import a package as well as checking that the direct imports are safe-according to the rules outlined in the Note [Safe Haskell Trust Check] in GHC.Driver.Main-we must also check that these rules hold transitively for all dependent modules-and packages. Doing this without caching any trust information would be very-slow as we would need to touch all packages and interface files a module depends-on. To avoid this we make use of the property that if a modules Safe Haskell-mode changes, this triggers a recompilation from that module in the dependency-graph. So we can just worry mostly about direct imports.--There is one trust property that can change for a package though without-recompilation being triggered: package trust. So we must check that all-packages a module transitively depends on to be trusted are still trusted when-we are compiling this module (as due to recompilation avoidance some modules-below may not be considered trusted any more without recompilation being-triggered).--We handle this by augmenting the existing transitive list of packages a module M-depends on with a bool for each package that says if it must be trusted when the-module M is being checked for trust. This list of trust required packages for a-single import is gathered in the rnImportDecl function and stored in an-ImportAvails data structure. The union of these trust required packages for all-imports is done by the rnImports function using the combine function which calls-the plusImportAvails function that is a union operation for the ImportAvails-type. This gives us in an ImportAvails structure all packages required to be-trusted for the module we are currently compiling. Checking that these packages-are still trusted (and that direct imports are trusted) is done in-GHC.Driver.Main.checkSafeImports.--See the note below, [Trust Own Package] for a corner case in this method and-how its handled.---Note [Trust Own Package]-~~~~~~~~~~~~~~~~~~~~~~~~-There is a corner case of package trust checking that the usual transitive check-doesn't cover. (For how the usual check operates see the Note [Tracking Trust-Transitively] below). The case is when you import a -XSafe module M and M-imports a -XTrustworthy module N. If N resides in a different package than M,-then the usual check works as M will record a package dependency on N's package-and mark it as required to be trusted. If N resides in the same package as M-though, then importing M should require its own package be trusted due to N-(since M is -XSafe so doesn't create this requirement by itself). The usual-check fails as a module doesn't record a package dependency of its own package.-So instead we now have a bool field in a modules interface file that simply-states if the module requires its own package to be trusted. This field avoids-us having to load all interface files that the module depends on to see if one-is trustworthy.---Note [Trust Transitive Property]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-So there is an interesting design question in regards to transitive trust-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 trust-requirements from B? Should A now also require that a package p is trusted since-B required it?--We currently say no but saying yes also makes sense. The difference is, if a-module M that doesn't use Safe Haskell imports a module N that does, should all-the trusted package requirements be dropped since M didn't declare that it cares-about Safe Haskell (so -XSafe is more strongly associated with the module doing-the importing) or should it be done still since the author of the module N that-uses Safe Haskell said they cared (so -XSafe is more strongly associated with-the module that was compiled that used it).--Going with yes is a simpler semantics we think and harder for the user to stuff-up but it does mean that Safe Haskell will affect users who don't care about-Safe Haskell as they might grab a package from Cabal which uses safe haskell (say-network) and that packages imports -XTrustworthy modules from another package-(say bytestring), so requires that package is trusted. The user may now get-compilation errors in code that doesn't do anything with Safe Haskell simply-because they are using the network package. They will have to call 'ghc-pkg-trust network' to get everything working. Due to this invasive nature of going-with yes we have gone with no for now.--}---- | Process Import Decls. See 'rnImportDecl' for a description of what--- the return types represent.--- Note: Do the non SOURCE ones first, so that we get a helpful warning--- for SOURCE ones that are unnecessary-rnImports :: [(LImportDecl GhcPs, SDoc)]- -> RnM ([LImportDecl GhcRn], GlobalRdrEnv, ImportAvails, AnyHpcUsage)-rnImports imports = do- tcg_env <- getGblEnv- -- NB: want an identity module here, because it's OK for a signature- -- module to import from its implementor- let this_mod = tcg_mod tcg_env- let (source, ordinary) = partition (is_source_import . fst) imports- is_source_import d = ideclSource (unLoc d) == IsBoot- stuff1 <- mapAndReportM (rnImportDecl this_mod) ordinary- stuff2 <- mapAndReportM (rnImportDecl this_mod) source- -- Safe Haskell: See Note [Tracking Trust Transitively]- let (decls, rdr_env, imp_avails, hpc_usage) = combine (stuff1 ++ stuff2)- -- Update imp_boot_mods if imp_direct_mods mentions any of them- let merged_import_avail = clobberSourceImports imp_avails- dflags <- getDynFlags- let final_import_avail =- merged_import_avail { imp_dep_direct_pkgs = S.fromList (implicitPackageDeps dflags)- `S.union` imp_dep_direct_pkgs merged_import_avail}- return (decls, rdr_env, final_import_avail, hpc_usage)-- where- clobberSourceImports imp_avails =- imp_avails { imp_boot_mods = imp_boot_mods' }- where- imp_boot_mods' = mergeInstalledModuleEnv combJ id (const emptyInstalledModuleEnv)- (imp_boot_mods imp_avails)- (imp_direct_dep_mods imp_avails)-- combJ (GWIB _ IsBoot) x = Just x- combJ r _ = Just r- -- See Note [Combining ImportAvails]- combine :: [(LImportDecl GhcRn, GlobalRdrEnv, ImportAvails, AnyHpcUsage)]- -> ([LImportDecl GhcRn], GlobalRdrEnv, ImportAvails, AnyHpcUsage)- 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, finsts_set)- = ( decl:decls,- gbl_env1 `plusGlobalRdrEnv` gbl_env2,- 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 #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:------ 1. An updated 'LImportDecl', where all unresolved 'RdrName' in--- the entity lists have been resolved into 'Name's,------ 2. A 'GlobalRdrEnv' representing the new identifiers that were--- brought into scope (taking into account module qualification--- and hiding),------ 3. 'ImportAvails' summarizing the identifiers that were imported--- by this declaration, and------ 4. A boolean 'AnyHpcUsage' which is true if the imported module--- used HPC.-rnImportDecl :: Module -> (LImportDecl GhcPs, SDoc)- -> RnM (LImportDecl GhcRn, GlobalRdrEnv, ImportAvails, AnyHpcUsage)-rnImportDecl this_mod- (L loc decl@(ImportDecl { ideclName = loc_imp_mod_name- , ideclPkgQual = raw_pkg_qual- , ideclSource = want_boot, ideclSafe = mod_safe- , ideclQualified = qual_style- , ideclExt = XImportDeclPass { ideclImplicit = implicit }- , ideclAs = as_mod, ideclImportList = imp_details }), import_reason)- = setSrcSpanA loc $ do-- case raw_pkg_qual of- NoRawPkgQual -> pure ()- RawPkgQual _ -> do- pkg_imports <- xoptM LangExt.PackageImports- when (not pkg_imports) $ addErr packageImportErr-- let qual_only = isImportDeclQualified qual_style-- -- If there's an error in loadInterface, (e.g. interface- -- file not found) we get lots of spurious errors from 'filterImports'- let imp_mod_name = unLoc loc_imp_mod_name- doc = ppr imp_mod_name <+> import_reason-- hsc_env <- getTopEnv- unit_env <- hsc_unit_env <$> getTopEnv- let pkg_qual = renameRawPkgQual unit_env imp_mod_name raw_pkg_qual-- -- Check for self-import, which confuses the typechecker (#9032)- -- ghc --make rejects self-import cycles already, but batch-mode may not- -- at least not until GHC.IfaceToCore.tcHiBootIface, which is too late to avoid- -- typechecker crashes. (Indirect self imports are not caught until- -- GHC.IfaceToCore, see #10337 tracking how to make this error better.)- --- -- Originally, we also allowed 'import {-# SOURCE #-} M', but this- -- caused bug #10182: in one-shot mode, we should never load an hs-boot- -- file for the module we are compiling into the EPS. In principle,- -- it should be possible to support this mode of use, but we would have to- -- extend Provenance to support a local definition in a qualified location.- -- For now, we don't support it, but see #10336- when (imp_mod_name == moduleName this_mod &&- (case pkg_qual of -- If we have import "<pkg>" M, then we should- -- check that "<pkg>" is "this" (which is magic)- -- or the name of this_mod's package. Yurgh!- -- c.f. GHC.findModule, and #9997- NoPkgQual -> True- ThisPkg uid -> uid == homeUnitId_ (hsc_dflags hsc_env)- OtherPkg _ -> False))- (addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- (text "A module cannot import itself:" <+> ppr imp_mod_name))-- -- Check for a missing import list (Opt_WarnMissingImportList also- -- checks for T(..) items but that is done in checkDodgyImport below)- case imp_details of- Just (Exactly, _) -> return () -- Explicit import list- _ | implicit -> return () -- Do not bleat for implicit imports- | qual_only -> return ()- | otherwise -> whenWOptM Opt_WarnMissingImportList $ do- let msg = mkTcRnUnknownMessage $- mkPlainDiagnostic (WarningWithFlag Opt_WarnMissingImportList)- noHints- (missingImportListWarn imp_mod_name)- addDiagnostic msg--- iface <- loadSrcInterface doc imp_mod_name want_boot pkg_qual-- -- Compiler sanity check: if the import didn't say- -- {-# SOURCE #-} we should not get a hi-boot file- warnPprTrace ((want_boot == NotBoot) && (mi_boot iface == IsBoot)) "rnImportDecl" (ppr imp_mod_name) $ do-- -- Issue a user warning for a redundant {- SOURCE -} import- -- NB that we arrange to read all the ordinary imports before- -- any of the {- SOURCE -} imports.- --- -- in --make and GHCi, the compilation manager checks for this,- -- and indeed we shouldn't do it here because the existence of- -- the non-boot module depends on the compilation order, which- -- is not deterministic. The hs-boot test can show this up.- dflags <- getDynFlags- warnIf ((want_boot == IsBoot) && (mi_boot iface == NotBoot) && isOneShot (ghcMode dflags))- (warnRedundantSourceImport imp_mod_name)- when (mod_safe && not (safeImportsOn dflags)) $- addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- (text "safe import can't be used as Safe Haskell isn't on!"- $+$ text ("please enable Safe Haskell through either Safe, Trustworthy or Unsafe"))-- let- qual_mod_name = fmap unLoc as_mod `orElse` imp_mod_name- imp_spec = ImpDeclSpec { is_mod = imp_mod_name, is_qual = qual_only,- is_dloc = locA loc, is_as = qual_mod_name }-- -- filter the imports according to the import declaration- (new_imp_details, gres) <- filterImports iface imp_spec imp_details-- -- for certain error messages, we’d like to know what could be imported- -- here, if everything were imported- potential_gres <- mkGlobalRdrEnv . snd <$> filterImports iface imp_spec Nothing-- let gbl_env = mkGlobalRdrEnv gres-- is_hiding | Just (EverythingBut,_) <- imp_details = True- | otherwise = False-- -- should the import be safe?- mod_safe' = mod_safe- || (not implicit && safeDirectImpsReq dflags)- || (implicit && safeImplicitImpsReq dflags)-- hsc_env <- getTopEnv- let home_unit = hsc_home_unit hsc_env- other_home_units = hsc_all_home_unit_ids hsc_env- imv = ImportedModsVal- { imv_name = qual_mod_name- , imv_span = locA loc- , imv_is_safe = mod_safe'- , imv_is_hiding = is_hiding- , imv_all_exports = potential_gres- , imv_qualified = qual_only- }- imports = calculateAvails home_unit other_home_units iface mod_safe' want_boot (ImportedByUser imv)-- -- Complain if we import a deprecated module- case mi_warns iface of- WarnAll txt -> do- let msg = mkTcRnUnknownMessage $- mkPlainDiagnostic (WarningWithFlag Opt_WarnWarningsDeprecations)- noHints- (moduleWarn imp_mod_name txt)- addDiagnostic msg- _ -> return ()-- -- Complain about -Wcompat-unqualified-imports violations.- warnUnqualifiedImport decl iface-- let new_imp_decl = ImportDecl- { ideclExt = ideclExt decl- , ideclName = ideclName decl- , ideclPkgQual = pkg_qual- , ideclSource = ideclSource decl- , ideclSafe = mod_safe'- , ideclQualified = ideclQualified decl- , ideclAs = ideclAs decl- , ideclImportList = new_imp_details- }-- return (L loc new_imp_decl, gbl_env, imports, mi_hpc iface)----- | Rename raw package imports-renameRawPkgQual :: UnitEnv -> ModuleName -> RawPkgQual -> PkgQual-renameRawPkgQual unit_env mn = \case- NoRawPkgQual -> NoPkgQual- RawPkgQual p -> renamePkgQual unit_env mn (Just (sl_fs p))---- | Rename raw package imports-renamePkgQual :: UnitEnv -> ModuleName -> Maybe FastString -> PkgQual-renamePkgQual unit_env mn mb_pkg = case mb_pkg of- Nothing -> NoPkgQual- Just pkg_fs- | Just uid <- homeUnitId <$> ue_homeUnit unit_env- , pkg_fs == fsLit "this"- -> ThisPkg uid-- | Just (uid, _) <- find (fromMaybe False . fmap (== pkg_fs) . snd) home_names- -> ThisPkg uid-- | Just uid <- resolvePackageImport (ue_units unit_env) mn (PackageName pkg_fs)- -> OtherPkg uid-- | otherwise- -> OtherPkg (UnitId pkg_fs)- -- not really correct as pkg_fs is unlikely to be a valid unit-id but- -- we will report the failure later...- where- home_names = map (\uid -> (uid, mkFastString <$> thisPackageName (homeUnitEnv_dflags (ue_findHomeUnitEnv uid unit_env)))) hpt_deps-- units = ue_units unit_env-- hpt_deps :: [UnitId]- hpt_deps = homeUnitDepends units----- | Calculate the 'ImportAvails' induced by an import of a particular--- interface, but without 'imp_mods'.-calculateAvails :: HomeUnit- -> S.Set UnitId- -> ModIface- -> IsSafeImport- -> IsBootInterface- -> ImportedBy- -> ImportAvails-calculateAvails home_unit other_home_units iface mod_safe' want_boot imported_by =- let imp_mod = mi_module iface- imp_sem_mod= mi_semantic_module iface- orph_iface = mi_orphan (mi_final_exts iface)- has_finsts = mi_finsts (mi_final_exts iface)- deps = mi_deps iface- trust = getSafeMode $ mi_trust iface- trust_pkg = mi_trust_pkg iface- is_sig = mi_hsc_src iface == HsigFile-- -- If the module exports anything defined in this module, just- -- ignore it. Reason: otherwise it looks as if there are two- -- local definition sites for the thing, and an error gets- -- reported. Easiest thing is just to filter them out up- -- front. This situation only arises if a module imports- -- itself, or another module that imported it. (Necessarily,- -- this involves a loop.)- --- -- We do this *after* filterImports, so that if you say- -- module A where- -- import B( AType )- -- type AType = ...- --- -- module B( AType ) where- -- import {-# SOURCE #-} A( AType )- --- -- then you won't get a 'B does not export AType' message.--- -- Compute new transitive dependencies- --- -- 'dep_orphs' and 'dep_finsts' do NOT include the imported module- -- itself, but we DO need to include this module in 'imp_orphs' and- -- 'imp_finsts' if it defines an orphan or instance family; thus the- -- orph_iface/has_iface tests.-- deporphs = dep_orphs deps- depfinsts = dep_finsts deps-- orphans | orph_iface = assertPpr (not (imp_sem_mod `elem` deporphs)) (ppr imp_sem_mod <+> ppr deporphs) $- imp_sem_mod : deporphs- | otherwise = deporphs-- finsts | has_finsts = assertPpr (not (imp_sem_mod `elem` depfinsts)) (ppr imp_sem_mod <+> ppr depfinsts) $- imp_sem_mod : depfinsts- | otherwise = depfinsts-- -- Trusted packages are a lot like orphans.- trusted_pkgs | mod_safe' = dep_trusted_pkgs deps- | otherwise = S.empty--- pkg = moduleUnit (mi_module iface)- ipkg = toUnitId pkg-- -- Does this import mean we now require our own pkg- -- to be trusted? See Note [Trust Own Package]- ptrust = trust == Sf_Trustworthy || trust_pkg- pkg_trust_req- | isHomeUnit home_unit pkg = ptrust- | otherwise = False-- dependent_pkgs = if toUnitId pkg `S.member` other_home_units- then S.empty- else S.singleton ipkg-- direct_mods = mkModDeps $ if toUnitId pkg `S.member` other_home_units- then S.singleton (moduleUnitId imp_mod, (GWIB (moduleName imp_mod) want_boot))- else S.empty-- dep_boot_mods_map = mkModDeps (dep_boot_mods deps)-- boot_mods- -- If we are looking for a boot module, it must be HPT- | IsBoot <- want_boot = extendInstalledModuleEnv dep_boot_mods_map (toUnitId <$> imp_mod) (GWIB (moduleName imp_mod) IsBoot)- -- Now we are importing A properly, so don't go looking for- -- A.hs-boot- | isHomeUnit home_unit pkg = dep_boot_mods_map- -- There's no boot files to find in external imports- | otherwise = emptyInstalledModuleEnv-- sig_mods =- if is_sig- then moduleName imp_mod : dep_sig_mods deps- else dep_sig_mods deps--- in ImportAvails {- imp_mods = unitModuleEnv (mi_module iface) [imported_by],- imp_orphs = orphans,- imp_finsts = finsts,- imp_sig_mods = sig_mods,- imp_direct_dep_mods = direct_mods,- imp_dep_direct_pkgs = dependent_pkgs,- imp_boot_mods = boot_mods,-- -- Add in the imported modules trusted package- -- requirements. ONLY do this though if we import the- -- module as a safe import.- -- See Note [Tracking Trust Transitively]- -- and Note [Trust Transitive Property]- imp_trust_pkgs = trusted_pkgs,- -- Do we require our own pkg to be trusted?- -- See Note [Trust Own Package]- imp_trust_own_pkg = pkg_trust_req- }----- | Issue a warning if the user imports Data.List without either an import--- list or `qualified`. This is part of the migration plan for the--- `Data.List.singleton` proposal. See #17244.-warnUnqualifiedImport :: ImportDecl GhcPs -> ModIface -> RnM ()-warnUnqualifiedImport decl iface =- when bad_import $ do- let msg = mkTcRnUnknownMessage $- mkPlainDiagnostic (WarningWithFlag Opt_WarnCompatUnqualifiedImports)- noHints- warning- addDiagnosticAt loc msg- where- mod = mi_module iface- loc = getLocA $ ideclName decl-- is_qual = isImportDeclQualified (ideclQualified decl)- has_import_list =- -- We treat a `hiding` clause as not having an import list although- -- it's not entirely clear this is the right choice.- case ideclImportList decl of- Just (Exactly, _) -> True- _ -> False- bad_import =- not is_qual- && not has_import_list- && mod `elemModuleSet` qualifiedMods-- warning = vcat- [ text "To ensure compatibility with future core libraries changes"- , text "imports to" <+> ppr (ideclName decl) <+> text "should be"- , text "either qualified or have an explicit import list."- ]-- -- Modules for which we warn if we see unqualified imports- qualifiedMods = mkModuleSet [ dATA_LIST ]---warnRedundantSourceImport :: ModuleName -> TcRnMessage-warnRedundantSourceImport mod_name- = mkTcRnUnknownMessage $ mkPlainDiagnostic WarningWithoutFlag noHints $- text "Unnecessary {-# SOURCE #-} in the import of module" <+> quotes (ppr mod_name)--{--************************************************************************-* *-\subsection{importsFromLocalDecls}-* *-************************************************************************--From the top-level declarations of this module produce- * the lexical environment- * the ImportAvails-created by its bindings.--Note [Top-level Names in Template Haskell decl quotes]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See also: Note [Interactively-bound Ids in GHCi] in GHC.Driver.Env- Note [Looking up Exact RdrNames] in GHC.Rename.Env--Consider a Template Haskell declaration quotation like this:- module M where- f x = h [d| f = 3 |]-When renaming the declarations inside [d| ...|], we treat the-top level binders specially in two ways--1. We give them an Internal Name, not (as usual) an External one.- This is done by GHC.Rename.Env.newTopSrcBinder.--2. We make them *shadow* the outer bindings.- See Note [GlobalRdrEnv shadowing]--3. We find out whether we are inside a [d| ... |] by testing the TH- stage. This is a slight hack, because the stage field was really- meant for the type checker, and here we are not interested in the- fields of Brack, hence the error thunks in thRnBrack.--}--extendGlobalRdrEnvRn :: [AvailInfo]- -> MiniFixityEnv- -> RnM (TcGblEnv, TcLclEnv)--- Updates both the GlobalRdrEnv and the FixityEnv--- We return a new TcLclEnv only because we might have to--- delete some bindings from it;--- see Note [Top-level Names in Template Haskell decl quotes]--extendGlobalRdrEnvRn avails new_fixities- = checkNoErrs $ -- See Note [Fail fast on duplicate definitions]- do { (gbl_env, lcl_env) <- getEnvs- ; stage <- getStage- ; isGHCi <- getIsGHCi- ; let rdr_env = tcg_rdr_env gbl_env- fix_env = tcg_fix_env gbl_env- th_bndrs = tcl_th_bndrs lcl_env- th_lvl = thLevel stage-- -- Delete new_occs from global and local envs- -- If we are in a TemplateHaskell decl bracket,- -- we are going to shadow them- -- See Note [GlobalRdrEnv shadowing]- inBracket = isBrackStage stage-- lcl_env_TH = lcl_env { tcl_rdr = minusLocalRdrEnv (tcl_rdr lcl_env) new_occs }- -- See Note [GlobalRdrEnv shadowing]-- lcl_env2 | inBracket = lcl_env_TH- | otherwise = lcl_env-- -- Deal with shadowing: see Note [GlobalRdrEnv shadowing]- want_shadowing = isGHCi || inBracket- rdr_env1 | want_shadowing = shadowNames rdr_env new_occs- | otherwise = rdr_env-- lcl_env3 = lcl_env2 { tcl_th_bndrs = extendNameEnvList th_bndrs- [ ( greNameMangledName n- , (TopLevel, th_lvl) )- | n <- new_names ] }-- ; rdr_env2 <- foldlM add_gre rdr_env1 new_gres-- ; let fix_env' = foldl' extend_fix_env fix_env new_gres- gbl_env' = gbl_env { tcg_rdr_env = rdr_env2, tcg_fix_env = fix_env' }-- ; traceRn "extendGlobalRdrEnvRn 2" (pprGlobalRdrEnv True rdr_env2)- ; return (gbl_env', lcl_env3) }- where- new_names = concatMap availGreNames avails- new_occs = occSetToEnv (mkOccSet (map occName new_names))-- -- If there is a fixity decl for the gre, add it to the fixity env- extend_fix_env fix_env gre- | Just (L _ fi) <- lookupFsEnv new_fixities (occNameFS occ)- = extendNameEnv fix_env name (FixItem occ fi)- | otherwise- = fix_env- where- name = greMangledName gre- occ = greOccName gre-- new_gres :: [GlobalRdrElt] -- New LocalDef GREs, derived from avails- new_gres = concatMap localGREsFromAvail avails-- add_gre :: GlobalRdrEnv -> GlobalRdrElt -> RnM GlobalRdrEnv- -- Extend the GlobalRdrEnv with a LocalDef GRE- -- If there is already a LocalDef GRE with the same OccName,- -- report an error and discard the new GRE- -- This establishes INVARIANT 1 of GlobalRdrEnvs- add_gre env gre- | not (null dups) -- Same OccName defined twice- = do { addDupDeclErr (gre :| dups); return env }-- | otherwise- = return (extendGlobalRdrEnv env gre)- where- -- See Note [Reporting duplicate local declarations]- dups = filter isDupGRE (lookupGlobalRdrEnv env (greOccName gre))- isDupGRE gre' = isLocalGRE gre' && not (isAllowedDup gre')- isAllowedDup gre' =- case (isRecFldGRE gre, isRecFldGRE gre') of- (True, True) -> gre_name gre /= gre_name gre'- && isDuplicateRecFldGRE gre'- (True, False) -> isNoFieldSelectorGRE gre- (False, True) -> isNoFieldSelectorGRE gre'- (False, False) -> False--{- Note [Fail fast on duplicate definitions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-If there are duplicate bindings for the same thing, we want to fail-fast. Having two bindings for the same thing can cause follow-on errors.-Example (test T9975a):- data Test = Test { x :: Int }- pattern Test wat = Test { x = wat }-This defines 'Test' twice. The second defn has no field-names; and then-we get an error from Test { x=wat }, saying "Test has no field 'x'".--Easiest thing is to bale out fast on duplicate definitions, which-we do via `checkNoErrs` on `extendGlobalRdrEnvRn`.--Note [Reporting duplicate local declarations]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In general, a single module may not define the same OccName multiple times. This-is checked in extendGlobalRdrEnvRn: when adding a new locally-defined GRE to the-GlobalRdrEnv we report an error if there are already duplicates in the-environment. This establishes INVARIANT 1 (see comments on GlobalRdrEnv in-GHC.Types.Name.Reader), which says that for a given OccName, all the-GlobalRdrElts to which it maps must have distinct 'gre_name's.--For example, the following will be rejected:-- f x = x- g x = x- f x = x -- Duplicate!--Two GREs with the same OccName are OK iff:--------------------------------------------------------------------- Existing GRE | Newly-defined GRE- | NormalGre FieldGre--------------------------------------------------------------------- Imported | Always Always- |- Local NormalGre | Never NoFieldSelectors- |- Local FieldGre | NoFieldSelectors DuplicateRecordFields- | and not in same record-------------------------------------------------------------------- --In this table "NoFieldSelectors" means "NoFieldSelectors was enabled at the-definition site of the fields; ditto "DuplicateRecordFields". These facts are-recorded in the 'FieldLabel' (but where both GREs are local, both will-necessarily have the same extensions enabled).--More precisely:--* The programmer is allowed to make a new local definition that clashes with an- imported one (although attempting to refer to either may lead to ambiguity- errors at use sites). For example, the following definition is allowed:-- import M (f)- f x = x-- Thus isDupGRE reports errors only if the existing GRE is a LocalDef.--* When DuplicateRecordFields is enabled, the same field label may be defined in- multiple records. For example, this is allowed:-- {-# LANGUAGE DuplicateRecordFields #-}- data S1 = MkS1 { f :: Int }- data S2 = MkS2 { f :: Int }-- Even though both fields have the same OccName, this does not violate INVARIANT- 1 of the GlobalRdrEnv, because the fields have distinct selector names, which- form part of the gre_name (see Note [GreNames] in GHC.Types.Name.Reader).--* However, we must be careful to reject the following (#9156):-- {-# LANGUAGE DuplicateRecordFields #-}- data T = MkT { f :: Int, f :: Int } -- Duplicate!-- In this case, both 'gre_name's are the same (because the fields belong to the- same type), and adding them both to the environment would be a violation of- INVARIANT 1. Thus isAllowedDup checks both GREs have distinct 'gre_name's- if they are both record fields.--* With DuplicateRecordFields, we reject attempts to define a field and a- non-field with the same OccName (#17965):-- {-# LANGUAGE DuplicateRecordFields #-}- f x = x- data T = MkT { f :: Int}-- In principle this could be supported, but the current "specification" of- DuplicateRecordFields does not allow it. Thus isAllowedDup checks for- DuplicateRecordFields only if *both* GREs being compared are record fields.--* However, with NoFieldSelectors, it is possible by design to define a field and- a non-field with the same OccName:-- {-# LANGUAGE NoFieldSelectors #-}- f x = x- data T = MkT { f :: Int}-- Thus isAllowedDup checks for NoFieldSelectors if either the existing or the- new GRE are record fields. See Note [NoFieldSelectors] in GHC.Rename.Env.--See also Note [Skipping ambiguity errors at use sites of local declarations] in-GHC.Rename.Utils.--}---{- *********************************************************************-* *- getLocalDeclBindersd@ returns the names for an HsDecl- It's used for source code.-- *** See Note [The Naming story] in GHC.Hs.Decls ****-* *-********************************************************************* -}--getLocalNonValBinders :: MiniFixityEnv -> HsGroup GhcPs- -> RnM ((TcGblEnv, TcLclEnv), NameSet)--- Get all the top-level binders bound the group *except*--- for value bindings, which are treated separately--- Specifically we return AvailInfo for--- * type decls (incl constructors and record selectors)--- * class decls (including class ops)--- * associated types--- * foreign imports--- * value signatures (in hs-boot files only)--getLocalNonValBinders fixity_env- (HsGroup { hs_valds = binds,- hs_tyclds = tycl_decls,- hs_fords = foreign_decls })- = do { -- Process all type/class decls *except* family instances- ; let inst_decls = tycl_decls >>= group_instds- ; dup_fields_ok <- xopt_DuplicateRecordFields <$> getDynFlags- ; has_sel <- xopt_FieldSelectors <$> getDynFlags- ; (tc_avails, tc_fldss)- <- fmap unzip $ mapM (new_tc dup_fields_ok has_sel)- (tyClGroupTyClDecls tycl_decls)- ; traceRn "getLocalNonValBinders 1" (ppr tc_avails)- ; envs <- extendGlobalRdrEnvRn tc_avails fixity_env- ; restoreEnvs envs $ do {- -- Bring these things into scope first- -- See Note [Looking up family names in family instances]-- -- Process all family instances- -- to bring new data constructors into scope- ; (nti_availss, nti_fldss) <- mapAndUnzipM (new_assoc dup_fields_ok has_sel)- inst_decls-- -- Finish off with value binders:- -- foreign decls and pattern synonyms for an ordinary module- -- type sigs in case of a hs-boot file only- ; is_boot <- tcIsHsBootOrSig- ; let val_bndrs- | is_boot = case binds of- ValBinds _ _val_binds val_sigs ->- -- In a hs-boot file, the value binders come from the- -- *signatures*, and there should be no foreign binders- [ L (l2l decl_loc) (unLoc n)- | L decl_loc (TypeSig _ ns _) <- val_sigs, n <- ns]- _ -> panic "Non-ValBinds in hs-boot group"- | otherwise = for_hs_bndrs- ; val_avails <- mapM new_simple val_bndrs-- ; let avails = concat nti_availss ++ val_avails- new_bndrs = availsToNameSetWithSelectors avails `unionNameSet`- availsToNameSetWithSelectors tc_avails- flds = concat nti_fldss ++ concat tc_fldss- ; traceRn "getLocalNonValBinders 2" (ppr avails)- ; (tcg_env, tcl_env) <- extendGlobalRdrEnvRn avails fixity_env-- -- Force the field access so that tcg_env is not retained. The- -- selector thunk optimisation doesn't kick-in, see #20139- ; let !old_field_env = tcg_field_env tcg_env- -- Extend tcg_field_env with new fields (this used to be the- -- work of extendRecordFieldEnv)- field_env = extendNameEnvList old_field_env flds- envs = (tcg_env { tcg_field_env = field_env }, tcl_env)-- ; traceRn "getLocalNonValBinders 3" (vcat [ppr flds, ppr field_env])- ; return (envs, new_bndrs) } }- where- for_hs_bndrs :: [LocatedN RdrName]- for_hs_bndrs = hsForeignDeclsBinders foreign_decls-- -- the SrcSpan attached to the input should be the span of the- -- declaration, not just the name- new_simple :: LocatedN RdrName -> RnM AvailInfo- new_simple rdr_name = do{ nm <- newTopSrcBinder rdr_name- ; return (avail nm) }-- new_tc :: DuplicateRecordFields -> FieldSelectors -> LTyClDecl GhcPs- -> RnM (AvailInfo, [(Name, [FieldLabel])])- new_tc dup_fields_ok has_sel tc_decl -- NOT for type/data instances- = do { let (bndrs, flds) = hsLTyClDeclBinders tc_decl- ; names@(main_name : sub_names) <- mapM (newTopSrcBinder . l2n) bndrs- ; flds' <- mapM (newRecordSelector dup_fields_ok has_sel sub_names) flds- ; let fld_env = case unLoc tc_decl of- DataDecl { tcdDataDefn = d } -> mk_fld_env d names flds'- _ -> []- ; return (availTC main_name names flds', fld_env) }--- -- Calculate the mapping from constructor names to fields, which- -- will go in tcg_field_env. It's convenient to do this here where- -- we are working with a single datatype definition.- mk_fld_env :: HsDataDefn GhcPs -> [Name] -> [FieldLabel]- -> [(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_args = RecCon cdflds }))- = [( find_con_name rdr- , concatMap find_con_decl_flds (unLoc cdflds) )]- find_con_flds (L _ (ConDeclGADT { con_names = rdrs- , con_g_args = RecConGADT flds _ }))- = [ ( find_con_name rdr- , concatMap find_con_decl_flds (unLoc flds))- | L _ rdr <- toList rdrs ]-- find_con_flds _ = []-- find_con_name rdr- = expectJust "getLocalNonValBinders/find_con_name" $- 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)))- = expectJust "getLocalNonValBinders/find_con_decl_fld" $- find (\ fl -> flLabel fl == lbl) flds- where lbl = FieldLabelString $ occNameFS (rdrNameOcc rdr)-- new_assoc :: DuplicateRecordFields -> FieldSelectors -> LInstDecl GhcPs- -> RnM ([AvailInfo], [(Name, [FieldLabel])])- new_assoc _ _ (L _ (TyFamInstD {})) = return ([], [])- -- type instances don't bind new names-- new_assoc dup_fields_ok has_sel (L _ (DataFamInstD _ d))- = do { (avail, flds) <- new_di dup_fields_ok has_sel Nothing d- ; return ([avail], flds) }- new_assoc dup_fields_ok has_sel (L _ (ClsInstD _ (ClsInstDecl { cid_poly_ty = inst_ty- , cid_datafam_insts = adts })))- = do -- First, attempt to grab the name of the class from the instance.- -- This step could fail if the instance is not headed by a class,- -- such as in the following examples:- --- -- (1) The class is headed by a bang pattern, such as in- -- `instance !Show Int` (#3811c)- -- (2) The class is headed by a type variable, such as in- -- `instance c` (#16385)- --- -- If looking up the class name fails, then mb_cls_nm will- -- be Nothing.- mb_cls_nm <- runMaybeT $ do- -- See (1) above- L loc cls_rdr <- MaybeT $ pure $ getLHsInstDeclClass_maybe inst_ty- -- See (2) above- MaybeT $ setSrcSpan (locA loc) $ lookupGlobalOccRn_maybe cls_rdr- -- Assuming the previous step succeeded, process any associated data- -- family instances. If the previous step failed, bail out.- case mb_cls_nm of- Nothing -> pure ([], [])- Just cls_nm -> do- (avails, fldss)- <- mapAndUnzipM (new_loc_di dup_fields_ok has_sel (Just cls_nm)) adts- pure (avails, concat fldss)-- new_di :: DuplicateRecordFields -> FieldSelectors -> Maybe Name -> DataFamInstDecl GhcPs- -> RnM (AvailInfo, [(Name, [FieldLabel])])- new_di dup_fields_ok has_sel mb_cls dfid@(DataFamInstDecl { dfid_eqn = ti_decl })- = do { main_name <- lookupFamInstName mb_cls (feqn_tycon ti_decl)- ; let (bndrs, flds) = hsDataFamInstBinders dfid- ; sub_names <- mapM (newTopSrcBinder .l2n) bndrs- ; flds' <- mapM (newRecordSelector dup_fields_ok has_sel sub_names) flds- ; let avail = availTC (unLoc main_name) sub_names flds'- -- main_name is not bound here!- fld_env = mk_fld_env (feqn_rhs ti_decl) sub_names flds'- ; return (avail, fld_env) }-- new_loc_di :: DuplicateRecordFields -> FieldSelectors -> Maybe Name -> LDataFamInstDecl GhcPs- -> RnM (AvailInfo, [(Name, [FieldLabel])])- new_loc_di dup_fields_ok has_sel mb_cls (L _ d) = new_di dup_fields_ok has_sel mb_cls d--newRecordSelector :: DuplicateRecordFields -> FieldSelectors -> [Name] -> LFieldOcc GhcPs -> RnM FieldLabel-newRecordSelector _ _ [] _ = error "newRecordSelector: datatype has no constructors!"-newRecordSelector dup_fields_ok has_sel (dc:_) (L loc (FieldOcc _ (L _ fld)))- = do { selName <- newTopSrcBinder $ L (l2l loc) $ field- ; return $ FieldLabel { flLabel = fieldLabelString- , flHasDuplicateRecordFields = dup_fields_ok- , flHasFieldSelector = has_sel- , flSelector = selName } }- where- fieldLabelString = FieldLabelString $ occNameFS $ rdrNameOcc fld- selOccName = fieldSelectorOccName fieldLabelString (nameOccName dc) dup_fields_ok has_sel- field | isExact fld = fld- -- use an Exact RdrName as is to preserve the bindings- -- of an already renamer-resolved field and its use- -- sites. This is needed to correctly support record- -- selectors in Template Haskell. See Note [Binders in- -- Template Haskell] in "GHC.ThToHs" and Note [Looking up- -- Exact RdrNames] in "GHC.Rename.Env".- | otherwise = mkRdrUnqual selOccName--{--Note [Looking up family names in family instances]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-- module M where- type family T a :: *- type instance M.T Int = Bool--We might think that we can simply use 'lookupOccRn' when processing the type-instance to look up 'M.T'. Alas, we can't! The type family declaration is in-the *same* HsGroup as the type instance declaration. Hence, as we are-currently collecting the binders declared in that HsGroup, these binders will-not have been added to the global environment yet.--Solution is simple: process the type family declarations first, extend-the environment, and then process the type instances.---************************************************************************-* *-\subsection{Filtering imports}-* *-************************************************************************--@filterImports@ takes the @ExportEnv@ telling what the imported module makes-available, and filters it through the import spec (if any).--Note [Dealing with imports]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-For import M( ies ), we take the mi_exports of M, and make- imp_occ_env :: OccEnv (NameEnv (GreName, AvailInfo, Maybe Name))-One entry for each OccName that M exports, mapping each corresponding Name to-its GreName, the AvailInfo exported from M that exports that Name, and-optionally a Name for an associated type's parent class. (Typically there will-be a single Name in the NameEnv, but see Note [Importing DuplicateRecordFields]-for why we may need more than one.)--The situation is made more complicated by associated types. E.g.- module M where- class C a where { data T a }- instance C Int where { data T Int = T1 | T2 }- instance C Bool where { data T Int = T3 }-Then M's export_avails are (recall the AvailTC invariant from Avails.hs)- C(C,T), T(T,T1,T2,T3)-Notice that T appears *twice*, once as a child and once as a parent. From-this list we construct a raw list including- T -> (T, T( T1, T2, T3 ), Nothing)- T -> (T, C( C, T ), Nothing)-and we combine these (in function 'combine' in 'imp_occ_env' in-'filterImports') to get- T -> (T, T(T,T1,T2,T3), Just C)--So the overall imp_occ_env is- C -> (C, C(C,T), Nothing)- T -> (T, T(T,T1,T2,T3), Just C)- T1 -> (T1, T(T,T1,T2,T3), Nothing) -- similarly T2,T3--If we say- import M( T(T1,T2) )-then we get *two* Avails: C(T), T(T1,T2)--Note that the imp_occ_env will have entries for data constructors too,-although we never look up data constructors.--Note [Importing PatternSynonyms]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-As described in Note [Dealing with imports], associated types can lead to the-same Name appearing twice, both as a child and once as a parent, when-constructing the imp_occ_env. The same thing can happen with pattern synonyms-if they are exported bundled with a type.--A simplified example, based on #11959:-- {-# LANGUAGE PatternSynonyms #-}- module M (T(P), pattern P) where -- Duplicate export warning, but allowed- data T = MkT- pattern P = MkT--Here we have T(P) and P in export_avails, and construct both- P -> (P, P, Nothing)- P -> (P, T(P), Nothing)-which are 'combine'd to leave- P -> (P, T(P), Nothing)-i.e. we simply discard the non-bundled Avail.--Note [Importing DuplicateRecordFields]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In filterImports, another complicating factor is DuplicateRecordFields.-Suppose we have:-- {-# LANGUAGE DuplicateRecordFields #-}- module M (S(foo), T(foo)) where- data S = MkS { foo :: Int }- data T = mkT { foo :: Int }-- module N where- import M (foo) -- this is allowed (A)- import M (S(foo)) -- this is allowed (B)--Here M exports the OccName 'foo' twice, so we get an imp_occ_env where 'foo'-maps to a NameEnv containing an entry for each of the two mangled field selector-names (see Note [FieldLabel] in GHC.Types.FieldLabel).-- foo -> [ $sel:foo:MkS -> (foo, S(foo), Nothing)- , $sel:foo:MKT -> (foo, T(foo), Nothing)- ]--Then when we look up 'foo' in lookup_names for case (A) we get both entries and-hence two Avails. Whereas in case (B) we reach the lookup_ie-case for IEThingWith, which looks up 'S' and then finds the unique 'foo' amongst-its children.--See T16745 for a test of this.---}--filterImports- :: ModIface- -> ImpDeclSpec -- The span for the entire import decl- -> Maybe (ImportListInterpretation, LocatedL [LIE GhcPs]) -- Import spec; True => hiding- -> RnM (Maybe (ImportListInterpretation, LocatedL [LIE GhcRn]), -- Import spec w/ Names- [GlobalRdrElt]) -- Same again, but in GRE form-filterImports iface decl_spec Nothing- = return (Nothing, gresFromAvails (Just imp_spec) (mi_exports iface))- where- imp_spec = ImpSpec { is_decl = decl_spec, is_item = ImpAll }---filterImports iface decl_spec (Just (want_hiding, L l import_items))- = do -- check for errors, convert RdrNames to Names- items1 <- mapM lookup_lie import_items-- let items2 :: [(LIE GhcRn, AvailInfo)]- items2 = concat items1- -- NB the AvailInfo may have duplicates, and several items- -- for the same parent; e.g N(x) and N(y)-- 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 }-- gres | want_hiding == EverythingBut = gresFromAvails (Just hiding_spec) pruned_avails- | otherwise = concatMap (gresFromIE decl_spec) items2-- return (Just (want_hiding, L l (map fst items2)), gres)- where- all_avails = mi_exports iface-- -- See Note [Dealing with imports]- imp_occ_env :: OccEnv (NameEnv (GreName, -- the name or field- AvailInfo, -- the export item providing it- Maybe Name)) -- the parent of associated types- imp_occ_env = mkOccEnv_C (plusNameEnv_C combine)- [ (occName c, mkNameEnv [(greNameMangledName c, (c, a, Nothing))])- | a <- all_avails- , c <- availGreNames a]- -- See Note [Dealing with imports]- -- 'combine' may be called for associated data types which appear- -- twice in the all_avails. In the example, we combine- -- T(T,T1,T2,T3) and C(C,T) to give (T, T(T,T1,T2,T3), Just C)- -- NB: the AvailTC can have fields as well as data constructors (#12127)- combine :: (GreName, AvailInfo, Maybe Name)- -> (GreName, AvailInfo, Maybe Name)- -> (GreName, AvailInfo, Maybe Name)- combine (NormalGreName name1, a1@(AvailTC p1 _), mb1)- (NormalGreName name2, a2@(AvailTC p2 _), mb2)- = assertPpr (name1 == name2 && isNothing mb1 && isNothing mb2)- (ppr name1 <+> ppr name2 <+> ppr mb1 <+> ppr mb2) $- if p1 == name1 then (NormalGreName name1, a1, Just p2)- else (NormalGreName name1, a2, Just p1)- -- 'combine' may also be called for pattern synonyms which appear both- -- unassociated and associated (see Note [Importing PatternSynonyms]).- combine (c1, a1, mb1) (c2, a2, mb2)- = assertPpr (c1 == c2 && isNothing mb1 && isNothing mb2- && (isAvailTC a1 || isAvailTC a2))- (ppr c1 <+> ppr c2 <+> ppr a1 <+> ppr a2 <+> ppr mb1 <+> ppr mb2) $- if isAvailTC a1 then (c1, a1, Nothing)- else (c1, a2, Nothing)-- isAvailTC AvailTC{} = True- isAvailTC _ = False-- -- Look up a RdrName used in an import, failing if it is ambiguous- -- (e.g. because it refers to multiple record fields)- lookup_name :: IE GhcPs -> RdrName -> IELookupM (Name, AvailInfo, Maybe Name)- lookup_name ie rdr = do- xs <- lookup_names ie rdr- case xs of- [cax] -> return cax- _ -> failLookupWith (AmbiguousImport rdr (map sndOf3 xs))-- -- Look up a RdrName used in an import, returning multiple values if there- -- are several fields with the same name exposed by the module- lookup_names :: IE GhcPs -> RdrName -> IELookupM [(Name, AvailInfo, Maybe Name)]- lookup_names ie rdr- | isQual rdr = failLookupWith (QualImportError rdr)- | Just succ <- mb_success = return $ map (\ (c,a,x) -> (greNameMangledName c, a, x)) (nonDetNameEnvElts succ)- | otherwise = failLookupWith (BadImport ie)- where- mb_success = lookupOccEnv imp_occ_env (rdrNameOcc rdr)-- lookup_lie :: LIE GhcPs -> TcRn [(LIE GhcRn, AvailInfo)]- lookup_lie (L loc ieRdr)- = do (stuff, warns) <- setSrcSpanA loc $- liftM (fromMaybe ([],[])) $- run_lookup (lookup_ie ieRdr)- mapM_ emit_warning warns- return [ (L loc ie, avail) | (ie,avail) <- stuff ]- where- -- Warn when importing T(..) if T was exported abstractly- emit_warning (DodgyImport n) = whenWOptM Opt_WarnDodgyImports $- addTcRnDiagnostic (TcRnDodgyImports n)- emit_warning MissingImportList = whenWOptM Opt_WarnMissingImportList $- addTcRnDiagnostic (TcRnMissingImportList ieRdr)- emit_warning (BadImportW ie) = whenWOptM Opt_WarnDodgyImports $ do- let msg = mkTcRnUnknownMessage $- mkPlainDiagnostic (WarningWithFlag Opt_WarnDodgyImports)- noHints- (lookup_err_msg (BadImport ie))- addDiagnostic msg-- run_lookup :: IELookupM a -> TcRn (Maybe a)- run_lookup m = case m of- Failed err -> do- addErr $ mkTcRnUnknownMessage $ mkPlainError noHints (lookup_err_msg err)- return Nothing- Succeeded a -> return (Just a)-- lookup_err_msg err = case err of- BadImport ie -> badImportItemErr iface decl_spec ie all_avails- IllegalImport -> illegalImportItemErr- QualImportError rdr -> qualImportItemErr rdr- AmbiguousImport rdr xs -> ambiguousImportItemErr rdr xs-- -- For each import item, we convert its RdrNames to Names,- -- and at the same time construct an AvailInfo corresponding- -- to what is actually imported by this item.- -- Returns Nothing on error.- -- We return a list here, because in the case of an import- -- item like C, if we are hiding, then C refers to *both* a- -- type/class and a data constructor. Moreover, when we import- -- data constructors of an associated family, we need separate- -- AvailInfos for the data constructors and the family (as they have- -- different parents). See Note [Dealing with imports]- lookup_ie :: IE GhcPs- -> IELookupM ([(IE GhcRn, AvailInfo)], [IELookupWarning])- lookup_ie ie = handle_bad_import $- case ie of- IEVar _ (L l n) -> do- -- See Note [Importing DuplicateRecordFields]- xs <- lookup_names ie (ieWrappedName n)- return ([(IEVar noExtField (L l (replaceWrappedName n name)),- trimAvail avail name)- | (name, avail, _) <- xs ], [])-- IEThingAll _ (L l tc) -> do- (name, avail, mb_parent) <- lookup_name ie $ ieWrappedName tc- let warns = case avail of- Avail {} -- e.g. f(..)- -> [DodgyImport $ ieWrappedName tc]-- AvailTC _ subs- | null (drop 1 subs) -- e.g. T(..) where T is a synonym- -> [DodgyImport $ ieWrappedName tc]-- | not (is_qual decl_spec) -- e.g. import M( T(..) )- -> [MissingImportList]-- | otherwise- -> []-- renamed_ie = IEThingAll noAnn (L l (replaceWrappedName tc name))- sub_avails = case avail of- Avail {} -> []- AvailTC name2 subs -> [(renamed_ie, AvailTC name2 (subs \\ [NormalGreName name]))]- case mb_parent of- Nothing -> return ([(renamed_ie, avail)], warns)- -- non-associated ty/cls- Just parent -> return ((renamed_ie, AvailTC parent [NormalGreName name]) : sub_avails, warns)- -- associated type-- IEThingAbs _ (L l tc')- | want_hiding == EverythingBut -- hiding ( C )- -- Here the 'C' can be a data constructor- -- *or* a type/class, or even both- -> let tc = ieWrappedName tc'- tc_name = lookup_name ie tc- dc_name = lookup_name ie (setRdrNameSpace tc srcDataName)- in- case catIELookupM [ tc_name, dc_name ] of- [] -> failLookupWith (BadImport ie)- names -> return ([mkIEThingAbs tc' l name | name <- names], [])- | otherwise- -> do nameAvail <- lookup_name ie (ieWrappedName tc')- return ([mkIEThingAbs tc' l nameAvail]- , [])-- IEThingWith xt ltc@(L l rdr_tc) wc rdr_ns -> do- (name, avail, mb_parent)- <- lookup_name (IEThingAbs noAnn ltc) (ieWrappedName rdr_tc)-- -- Look up the children in the sub-names of the parent- -- See Note [Importing DuplicateRecordFields]- let subnames = availSubordinateGreNames avail- case lookupChildren subnames rdr_ns of-- Failed rdrs -> failLookupWith (BadImport (IEThingWith xt ltc wc rdrs))- -- We are trying to import T( a,b,c,d ), and failed- -- to find 'b' and 'd'. So we make up an import item- -- to report as failing, namely T( b, d ).- -- c.f. #15412-- Succeeded (childnames, childflds) ->- case mb_parent of- -- non-associated ty/cls- Nothing- -> return ([(IEThingWith childflds (L l name') wc childnames',- availTC name (name:map unLoc childnames) (map unLoc childflds))],- [])- where name' = replaceWrappedName rdr_tc name- childnames' = map to_ie_post_rn childnames- -- childnames' = postrn_ies childnames- -- associated ty- Just parent- -> return ([(IEThingWith childflds (L l name') wc childnames',- availTC name (map unLoc childnames) (map unLoc childflds)),- (IEThingWith childflds (L l name') wc childnames',- availTC parent [name] [])],- [])- where name' = replaceWrappedName rdr_tc name- childnames' = map to_ie_post_rn childnames-- _other -> failLookupWith IllegalImport- -- could be IEModuleContents, IEGroup, IEDoc, IEDocNamed- -- all errors.-- where- mkIEThingAbs tc l (n, av, Nothing )- = (IEThingAbs noAnn (L l (replaceWrappedName tc n)), trimAvail av n)- mkIEThingAbs tc l (n, _, Just parent)- = (IEThingAbs noAnn (L l (replaceWrappedName tc n))- , availTC parent [n] [])-- handle_bad_import m = catchIELookup m $ \err -> case err of- BadImport ie | want_hiding == EverythingBut -> return ([], [BadImportW ie])- _ -> failLookupWith err--type IELookupM = MaybeErr IELookupError--data IELookupWarning- = BadImportW (IE GhcPs)- | MissingImportList- | DodgyImport RdrName- -- NB. use the RdrName for reporting a "dodgy" import--data IELookupError- = QualImportError RdrName- | BadImport (IE GhcPs)- | IllegalImport- | AmbiguousImport RdrName [AvailInfo] -- e.g. a duplicated field name as a top-level import--failLookupWith :: IELookupError -> IELookupM a-failLookupWith err = Failed err--catchIELookup :: IELookupM a -> (IELookupError -> IELookupM a) -> IELookupM a-catchIELookup m h = case m of- Succeeded r -> return r- Failed err -> h err--catIELookupM :: [IELookupM a] -> [a]-catIELookupM ms = [ a | Succeeded a <- ms ]--{--************************************************************************-* *-\subsection{Import/Export Utils}-* *-************************************************************************--}---- | Given an import\/export spec, construct the appropriate 'GlobalRdrElt's.-gresFromIE :: ImpDeclSpec -> (LIE GhcRn, AvailInfo) -> [GlobalRdrElt]-gresFromIE decl_spec (L loc ie, avail)- = gresFromAvail prov_fn avail- where- is_explicit = case ie of- IEThingAll _ name -> \n -> n == lieWrappedName name- _ -> \_ -> True- prov_fn name- = Just (ImpSpec { is_decl = decl_spec, is_item = item_spec })- where- item_spec = ImpSome { is_explicit = is_explicit name- , is_iloc = locA loc }---{--Note [Children for duplicate record fields]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider the module-- {-# LANGUAGE DuplicateRecordFields #-}- module M (F(foo, MkFInt, MkFBool)) where- data family F a- data instance F Int = MkFInt { foo :: Int }- data instance F Bool = MkFBool { foo :: Bool }--The `foo` in the export list refers to *both* selectors! For this-reason, lookupChildren builds an environment that maps the FastString-to a list of items, rather than a single item.--}--mkChildEnv :: [GlobalRdrElt] -> NameEnv [GlobalRdrElt]-mkChildEnv gres = foldr add emptyNameEnv gres- where- add gre env = case gre_par gre of- ParentIs p -> extendNameEnv_Acc (:) Utils.singleton env p gre- NoParent -> env--findChildren :: NameEnv [a] -> Name -> [a]-findChildren env n = lookupNameEnv env n `orElse` []--lookupChildren :: [GreName] -> [LIEWrappedName GhcPs]- -> MaybeErr [LIEWrappedName GhcPs] -- The ones for which the lookup failed- ([LocatedA Name], [Located FieldLabel])--- (lookupChildren all_kids rdr_items) maps each rdr_item to its--- corresponding Name all_kids, if the former exists--- The matching is done by FastString, not OccName, so that--- Cls( meth, AssocTy )--- will correctly find AssocTy among the all_kids of Cls, even though--- the RdrName for AssocTy may have a (bogus) DataName namespace--- (Really the rdr_items should be FastStrings in the first place.)-lookupChildren all_kids rdr_items- | null fails- = Succeeded (fmap concat (partitionEithers oks))- -- This 'fmap concat' trickily applies concat to the /second/ component- -- of the pair, whose type is ([LocatedA Name], [[Located FieldLabel]])- | otherwise- = Failed fails- where- mb_xs = map doOne rdr_items- fails = [ bad_rdr | Failed bad_rdr <- mb_xs ]- oks = [ ok | Succeeded ok <- mb_xs ]- oks :: [Either (LocatedA Name) [Located FieldLabel]]-- doOne item@(L l r)- = case (lookupFsEnv kid_env . occNameFS . rdrNameOcc . ieWrappedName) r of- Just [NormalGreName n] -> Succeeded (Left (L l n))- Just rs | Just fs <- traverse greNameFieldLabel rs -> Succeeded (Right (map (L (locA l)) fs))- _ -> Failed item-- -- See Note [Children for duplicate record fields]- kid_env = extendFsEnvList_C (++) emptyFsEnv- [(occNameFS (occName x), [x]) | x <- all_kids]-------------------------------------{--*********************************************************-* *-\subsection{Unused names}-* *-*********************************************************--}--reportUnusedNames :: TcGblEnv -> HscSource -> RnM ()-reportUnusedNames gbl_env hsc_src- = do { keep <- readTcRef (tcg_keep gbl_env)- ; traceRn "RUN" (ppr (tcg_dus gbl_env))- ; warnUnusedImportDecls gbl_env hsc_src- ; warnUnusedTopBinds $ unused_locals keep- ; warnMissingSignatures gbl_env- ; warnMissingKindSignatures gbl_env }- where- used_names :: NameSet -> NameSet- used_names keep = findUses (tcg_dus gbl_env) emptyNameSet `unionNameSet` keep- -- NB: currently, if f x = g, we only treat 'g' as used if 'f' is used- -- Hence findUses-- -- Collect the defined names from the in-scope environment- defined_names :: [GlobalRdrElt]- defined_names = globalRdrEnvElts (tcg_rdr_env gbl_env)-- kids_env = mkChildEnv defined_names- -- This is done in mkExports too; duplicated work-- gre_is_used :: NameSet -> GlobalRdrElt -> Bool- gre_is_used used_names gre0- = name `elemNameSet` used_names- || any (\ gre -> greMangledName gre `elemNameSet` used_names) (findChildren kids_env name)- -- A use of C implies a use of T,- -- if C was brought into scope by T(..) or T(C)- where- name = greMangledName gre0-- -- Filter out the ones that are- -- (a) defined in this module, and- -- (b) not defined by a 'deriving' clause- -- The latter have an Internal Name, so we can filter them out easily- unused_locals :: NameSet -> [GlobalRdrElt]- unused_locals keep =- let -- Note that defined_and_used, defined_but_not_used- -- are both [GRE]; that's why we need defined_and_used- -- rather than just used_names- _defined_and_used, defined_but_not_used :: [GlobalRdrElt]- (_defined_and_used, defined_but_not_used)- = partition (gre_is_used (used_names keep)) defined_names-- in filter is_unused_local defined_but_not_used- is_unused_local :: GlobalRdrElt -> Bool- is_unused_local gre = isLocalGRE gre && isExternalName (greMangledName gre)--{- *********************************************************************-* *- Missing signatures-* *-********************************************************************* -}--{--Note [Missing signatures]-~~~~~~~~~~~~~~~~~~~~~~~~~-There are four warning flags in play:-- * -Wmissing-exported-signatures- Warn about any exported top-level function/value without a type signature.- Does not include pattern synonyms.-- * -Wmissing-signatures- Warn about any top-level function/value without a type signature. Does not- include pattern synonyms. Takes priority over -Wmissing-exported-signatures.-- * -Wmissing-exported-pattern-synonym-signatures- Warn about any exported pattern synonym without a type signature.-- * -Wmissing-pattern-synonym-signatures- Warn about any pattern synonym without a type signature. Takes priority over- -Wmissing-exported-pattern-synonym-signatures.---}---- | Warn the user about top level binders that lack type signatures.--- Called /after/ type inference, so that we can report the--- inferred type of the function-warnMissingSignatures :: TcGblEnv -> RnM ()-warnMissingSignatures gbl_env- = do { warn_binds <- woptM Opt_WarnMissingSignatures- ; warn_pat_syns <- woptM Opt_WarnMissingPatternSynonymSignatures- ; let exports = availsToNameSet (tcg_exports gbl_env)- sig_ns = tcg_sigs gbl_env- -- We use sig_ns to exclude top-level bindings that are generated by GHC- binds = collectHsBindsBinders CollNoDictBinders $ tcg_binds gbl_env- pat_syns = tcg_patsyns gbl_env-- not_ghc_generated :: Name -> Bool- not_ghc_generated name = name `elemNameSet` sig_ns-- add_binding_warn :: Id -> RnM ()- add_binding_warn id =- when (not_ghc_generated name) $- do { env <- tcInitTidyEnv -- Why not use emptyTidyEnv?- ; let (_, ty) = tidyOpenType env (idType id)- missing = MissingTopLevelBindingSig name ty- diag = TcRnMissingSignature missing exported warn_binds- ; addDiagnosticAt (getSrcSpan name) diag }- where- name = idName id- exported = if name `elemNameSet` exports- then IsExported- else IsNotExported-- add_patsyn_warn :: PatSyn -> RnM ()- add_patsyn_warn ps =- when (not_ghc_generated name) $- addDiagnosticAt (getSrcSpan name)- (TcRnMissingSignature missing exported warn_pat_syns)- where- name = patSynName ps- missing = MissingPatSynSig ps- exported = if name `elemNameSet` exports- then IsExported- else IsNotExported-- -- Warn about missing signatures- -- Do this only when we have a type to offer- -- See Note [Missing signatures]- ; mapM_ add_binding_warn binds- ; mapM_ add_patsyn_warn pat_syns- }---- | Warn the user about tycons that lack kind signatures.--- Called /after/ type (and kind) inference, so that we can report the--- inferred kinds.-warnMissingKindSignatures :: TcGblEnv -> RnM ()-warnMissingKindSignatures gbl_env- = do { cusks_enabled <- xoptM LangExt.CUSKs- ; mapM_ (add_ty_warn cusks_enabled) tcs- }- where- tcs = tcg_tcs gbl_env- ksig_ns = tcg_ksigs gbl_env- exports = availsToNameSet (tcg_exports gbl_env)- not_ghc_generated :: Name -> Bool- not_ghc_generated name = name `elemNameSet` ksig_ns-- add_ty_warn :: Bool -> TyCon -> RnM ()- add_ty_warn cusks_enabled tyCon =- when (not_ghc_generated name) $- addDiagnosticAt (getSrcSpan name) diag- where- name = tyConName tyCon- diag = TcRnMissingSignature missing exported False- missing = MissingTyConKindSig tyCon cusks_enabled- exported = if name `elemNameSet` exports- then IsExported- else IsNotExported--{--*********************************************************-* *-\subsection{Unused imports}-* *-*********************************************************--This code finds which import declarations are unused. The-specification and implementation notes are here:- https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/unused-imports--See also Note [Choosing the best import declaration] in GHC.Types.Name.Reader--}--type ImportDeclUsage- = ( LImportDecl GhcRn -- The import declaration- , [GlobalRdrElt] -- What *is* used (normalised)- , [Name] ) -- What is imported but *not* used--warnUnusedImportDecls :: TcGblEnv -> HscSource -> RnM ()-warnUnusedImportDecls gbl_env hsc_src- = do { uses <- readMutVar (tcg_used_gres gbl_env)- ; let user_imports = filterOut- (ideclImplicit . ideclExt . unLoc)- (tcg_rn_imports gbl_env)- -- This whole function deals only with *user* imports- -- both for warning about unnecessary ones, and for- -- deciding the minimal ones- rdr_env = tcg_rdr_env gbl_env- fld_env = mkFieldEnv rdr_env-- ; let usage :: [ImportDeclUsage]- usage = findImportUsage user_imports uses-- ; traceRn "warnUnusedImportDecls" $- (vcat [ text "Uses:" <+> ppr uses- , text "Import usage" <+> ppr usage])-- ; whenWOptM Opt_WarnUnusedImports $- mapM_ (warnUnusedImport Opt_WarnUnusedImports fld_env) usage-- ; whenGOptM Opt_D_dump_minimal_imports $- printMinimalImports hsc_src usage }--findImportUsage :: [LImportDecl GhcRn]- -> [GlobalRdrElt]- -> [ImportDeclUsage]--findImportUsage imports used_gres- = map unused_decl imports- where- import_usage :: ImportMap- import_usage = mkImportMap used_gres-- unused_decl :: LImportDecl GhcRn -> (LImportDecl GhcRn, [GlobalRdrElt], [Name])- unused_decl decl@(L loc (ImportDecl { ideclImportList = imps }))- = (decl, used_gres, nameSetElemsStable unused_imps)- where- used_gres = lookupSrcLoc (srcSpanEnd $ locA loc) import_usage- -- srcSpanEnd: see Note [The ImportMap]- `orElse` []-- used_names = mkNameSet (map greMangledName used_gres)- used_parents = mkNameSet (mapMaybe greParent_maybe used_gres)-- unused_imps -- Not trivial; see eg #7454- = case imps of- Just (Exactly, L _ imp_ies) ->- foldr (add_unused . unLoc) emptyNameSet imp_ies- _other -> emptyNameSet -- No explicit import list => no unused-name list-- add_unused :: IE GhcRn -> NameSet -> NameSet- add_unused (IEVar _ n) acc = add_unused_name (lieWrappedName n) acc- add_unused (IEThingAbs _ n) acc = add_unused_name (lieWrappedName n) acc- add_unused (IEThingAll _ n) acc = add_unused_all (lieWrappedName n) acc- add_unused (IEThingWith fs p wc ns) acc =- add_wc_all (add_unused_with pn xs acc)- where pn = lieWrappedName p- xs = map lieWrappedName ns ++ map (flSelector . unLoc) fs- add_wc_all = case wc of- NoIEWildcard -> id- IEWildcard _ -> add_unused_all pn- add_unused _ acc = acc-- add_unused_name n acc- | n `elemNameSet` used_names = acc- | otherwise = acc `extendNameSet` n- add_unused_all n acc- | n `elemNameSet` used_names = acc- | n `elemNameSet` used_parents = acc- | otherwise = acc `extendNameSet` n- add_unused_with p ns acc- | all (`elemNameSet` acc1) ns = add_unused_name p acc1- | otherwise = acc1- where- acc1 = foldr add_unused_name acc ns- -- 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.---{- Note [The ImportMap]-~~~~~~~~~~~~~~~~~~~~~~~-The ImportMap is a short-lived intermediate data structure records, for-each import declaration, what stuff brought into scope by that-declaration is actually used in the module.--The SrcLoc is the location of the END of a particular 'import'-declaration. Why *END*? Because we don't want to get confused-by the implicit Prelude import. Consider (#7476) the module- import Foo( foo )- main = print foo-There is an implicit 'import Prelude(print)', and it gets a SrcSpan-of line 1:1 (just the point, not a span). If we use the *START* of-the SrcSpan to identify the import decl, we'll confuse the implicit-import Prelude with the explicit 'import Foo'. So we use the END.-It's just a cheap hack; we could equally well use the Span too.--The [GlobalRdrElt] are the things imported from that decl.--}--type ImportMap = Map RealSrcLoc [GlobalRdrElt] -- See [The ImportMap]- -- If loc :-> gres, then- -- 'loc' = the end loc of the bestImport of each GRE in 'gres'--mkImportMap :: [GlobalRdrElt] -> ImportMap--- For each of a list of used GREs, find all the import decls that brought--- it into scope; choose one of them (bestImport), and record--- the RdrName in that import decl's entry in the ImportMap-mkImportMap gres- = foldr add_one Map.empty gres- where- add_one gre@(GRE { gre_imp = imp_specs }) imp_map =- case srcSpanEnd (is_dloc (is_decl best_imp_spec)) of- -- For srcSpanEnd see Note [The ImportMap]- RealSrcLoc decl_loc _ -> Map.insertWith add decl_loc [gre] imp_map- UnhelpfulLoc _ -> imp_map- where- best_imp_spec = bestImport (bagToList imp_specs)- add _ gres = gre : gres--warnUnusedImport :: WarningFlag -> NameEnv (FieldLabelString, Parent)- -> ImportDeclUsage -> RnM ()-warnUnusedImport flag fld_env (L loc decl, used, unused)-- -- Do not warn for 'import M()'- | Just (Exactly, L _ []) <- ideclImportList decl- = return ()-- -- Note [Do not warn about Prelude hiding]- | Just (EverythingBut, L _ hides) <- ideclImportList decl- , not (null hides)- , pRELUDE_NAME == unLoc (ideclName decl)- = return ()-- -- Nothing used; drop entire declaration- | null used- = let dia = mkTcRnUnknownMessage $- mkPlainDiagnostic (WarningWithFlag flag) noHints msg1- in addDiagnosticAt (locA loc) dia-- -- Everything imported is used; nop- | null unused- = return ()-- -- Only one import is unused, with `SrcSpan` covering only the unused item instead of- -- the whole import statement- | Just (_, L _ imports) <- ideclImportList decl- , length unused == 1- , Just (L loc _) <- find (\(L _ ie) -> ((ieName ie) :: Name) `elem` unused) imports- = let dia = mkTcRnUnknownMessage $ mkPlainDiagnostic (WarningWithFlag flag) noHints msg2- in addDiagnosticAt (locA loc) dia-- -- Some imports are unused- | otherwise- = let dia = mkTcRnUnknownMessage $ mkPlainDiagnostic (WarningWithFlag flag) noHints msg2- in addDiagnosticAt (locA loc) dia-- where- msg1 = vcat [ pp_herald <+> quotes pp_mod <+> is_redundant- , nest 2 (text "except perhaps to import instances from"- <+> quotes pp_mod)- , text "To import instances alone, use:"- <+> text "import" <+> pp_mod <> parens Outputable.empty ]- msg2 = sep [ pp_herald <+> quotes sort_unused- , text "from module" <+> quotes pp_mod <+> is_redundant]- pp_herald = text "The" <+> pp_qual <+> text "import of"- pp_qual- | isImportDeclQualified (ideclQualified decl)= text "qualified"- | otherwise = Outputable.empty- pp_mod = ppr (unLoc (ideclName decl))- is_redundant = 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, ParentIs p) -> pprNameUnqualified p <> parens (ppr fld)- Just (fld, NoParent) -> ppr fld- Nothing -> pprNameUnqualified n-- -- Print unused names in a deterministic (lexicographic) order- sort_unused :: SDoc- sort_unused = pprWithCommas ppr_possible_field $- sortBy (comparing nameOccName) unused--{--Note [Do not warn about Prelude hiding]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We do not warn about- import Prelude hiding( x, y )-because even if nothing else from Prelude is used, it may be essential to hide-x,y to avoid name-shadowing warnings. Example (#9061)- import Prelude hiding( log )- f x = log where log = ()----Note [Printing minimal imports]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-To print the minimal imports we walk over the user-supplied import-decls, and simply trim their import lists. NB that-- * We do *not* change the 'qualified' or 'as' parts!-- * We do not discard a decl altogether; we might need instances- from it. Instead we just trim to an empty import list--}--getMinimalImports :: [ImportDeclUsage] -> RnM [LImportDecl GhcRn]-getMinimalImports = fmap combine . mapM mk_minimal- where- mk_minimal (L l decl, used_gres, unused)- | null unused- , Just (Exactly, _) <- ideclImportList decl- = return (L l decl)- | otherwise- = do { let ImportDecl { ideclName = L _ mod_name- , ideclSource = is_boot- , ideclPkgQual = pkg_qual } = decl- ; iface <- loadSrcInterface doc mod_name is_boot pkg_qual- ; let used_avails = gresToAvailInfo used_gres- lies = map (L l) (concatMap (to_ie iface) used_avails)- ; return (L l (decl { ideclImportList = Just (Exactly, L (l2l l) lies) })) }- where- doc = text "Compute minimal imports for" <+> ppr decl-- to_ie :: ModIface -> AvailInfo -> [IE GhcRn]- -- The main trick here is that if we're importing all the constructors- -- 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 c) -- Note [Overloaded field import]- = [IEVar noExtField (to_ie_post_rn $ noLocA (greNamePrintableName c))]- to_ie _ avail@(AvailTC n [_]) -- Exporting the main decl and nothing else- | availExportsDecl avail = [IEThingAbs noAnn (to_ie_post_rn $ noLocA n)]- to_ie iface (AvailTC n cs)- = case [xs | avail@(AvailTC x xs) <- mi_exports iface- , x == n- , availExportsDecl avail -- Note [Partial export]- ] of- [xs] | all_used xs ->- [IEThingAll noAnn (to_ie_post_rn $ noLocA n)]- | otherwise ->- [IEThingWith (map noLoc fs) (to_ie_post_rn $ noLocA n) NoIEWildcard- (map (to_ie_post_rn . noLocA) (filter (/= n) ns))]- -- Note [Overloaded field import]- _other | all_non_overloaded fs- -> map (IEVar noExtField . to_ie_post_rn_var . noLocA) $ ns- ++ map flSelector fs- | otherwise ->- [IEThingWith (map noLoc fs) (to_ie_post_rn $ noLocA n) NoIEWildcard- (map (to_ie_post_rn . noLocA) (filter (/= n) ns))]- where- (ns, fs) = partitionGreNames cs-- all_used avail_cs = all (`elem` cs) avail_cs-- all_non_overloaded = all (not . flIsOverloaded)-- combine :: [LImportDecl GhcRn] -> [LImportDecl GhcRn]- combine = map merge . NE.groupAllWith getKey-- getKey :: LImportDecl GhcRn -> (Bool, Maybe ModuleName, ModuleName)- getKey decl =- ( isImportDeclQualified . ideclQualified $ idecl -- is this qualified? (important that this be first)- , unLoc <$> ideclAs idecl -- what is the qualifier (inside Maybe monad)- , unLoc . ideclName $ idecl -- Module Name- )- where- idecl :: ImportDecl GhcRn- idecl = unLoc decl-- merge :: NonEmpty (LImportDecl GhcRn) -> LImportDecl GhcRn- merge decls@((L l decl) :| _) = L l (decl { ideclImportList = Just (Exactly, L (noAnnSrcSpan (locA l)) lies) })- where lies = concatMap (unLoc . snd) $ mapMaybe (ideclImportList . unLoc) $ NE.toList decls---printMinimalImports :: HscSource -> [ImportDeclUsage] -> RnM ()--- See Note [Printing minimal imports]-printMinimalImports hsc_src imports_w_usage- = do { imports' <- getMinimalImports imports_w_usage- ; this_mod <- getModule- ; dflags <- getDynFlags- ; liftIO $ withFile (mkFilename dflags this_mod) WriteMode $ \h ->- printForUser dflags h neverQualify AllTheWay (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- suffix = case hsc_src of- HsBootFile -> ".imports-boot"- HsSrcFile -> ".imports"- HsigFile -> ".imports"- basefn = moduleNameString (moduleName this_mod) ++ suffix---to_ie_post_rn_var :: LocatedA (IdP GhcRn) -> LIEWrappedName GhcRn-to_ie_post_rn_var (L l n)- | isDataOcc $ occName n = L l (IEPattern (la2e l) (L (la2na l) n))- | otherwise = L l (IEName noExtField (L (la2na l) n))---to_ie_post_rn :: LocatedA (IdP GhcRn) -> LIEWrappedName GhcRn-to_ie_post_rn (L l n)- | isTcOcc occ && isSymOcc occ = L l (IEType (la2e l) (L (la2na l) n))- | otherwise = L l (IEName noExtField (L (la2na l) n))- where occ = occName n--{--Note [Partial export]-~~~~~~~~~~~~~~~~~~~~~-Suppose we have-- module A( op ) where- class C a where- op :: a -> a-- module B where- import A- f = ..op...--Then the minimal import for module B is- import A( op )-not- import A( C( op ) )-which we would usually generate if C was exported from B. Hence-the availExportsDecl test when deciding what to generate.---Note [Overloaded field import]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-On the other hand, if we have-- {-# LANGUAGE DuplicateRecordFields #-}- module A where- data T = MkT { foo :: Int }-- module B where- import A- f = ...foo...--then the minimal import for module B must be- import A ( T(foo) )-because when DuplicateRecordFields is enabled, field selectors are-not in scope without their enclosing datatype.--On the third hand, if we have-- {-# LANGUAGE DuplicateRecordFields #-}- module A where- pattern MkT { foo } = Just foo-- module B where- import A- f = ...foo...--then the minimal import for module B must be- import A ( foo )-because foo doesn't have a parent. This might actually be ambiguous if A-exports another field called foo, but there is no good answer to return and this-is a very obscure corner, so it seems to be the best we can do. See-DRFPatSynExport for a test of this.---************************************************************************-* *-\subsection{Errors}-* *-************************************************************************--}--qualImportItemErr :: RdrName -> SDoc-qualImportItemErr rdr- = hang (text "Illegal qualified name in import item:")- 2 (ppr rdr)--ambiguousImportItemErr :: RdrName -> [AvailInfo] -> SDoc-ambiguousImportItemErr rdr avails- = hang (text "Ambiguous name" <+> quotes (ppr rdr) <+> text "in import item. It could refer to:")- 2 (vcat (map ppr_avail avails))- where- ppr_avail (AvailTC parent _) = ppr parent <> parens (ppr rdr)- ppr_avail (Avail name) = ppr name--pprImpDeclSpec :: ModIface -> ImpDeclSpec -> SDoc-pprImpDeclSpec iface decl_spec =- quotes (ppr (is_mod decl_spec)) <+> case mi_boot iface of- IsBoot -> text "(hi-boot interface)"- NotBoot -> Outputable.empty--badImportItemErrStd :: ModIface -> ImpDeclSpec -> IE GhcPs -> SDoc-badImportItemErrStd iface decl_spec ie- = sep [text "Module", pprImpDeclSpec iface decl_spec,- text "does not export", quotes (ppr ie)]--badImportItemErrDataCon :: OccName -> ModIface -> ImpDeclSpec -> IE GhcPs- -> SDoc-badImportItemErrDataCon dataType_occ iface decl_spec ie- = vcat [ text "In module"- <+> pprImpDeclSpec iface decl_spec- <> colon- , nest 2 $ quotes datacon- <+> text "is a data constructor of"- <+> quotes dataType- , text "To import it use"- , nest 2 $ text "import"- <+> ppr (is_mod decl_spec)- <> parens_sp (dataType <> parens_sp datacon)- , text "or"- , nest 2 $ text "import"- <+> ppr (is_mod decl_spec)- <> parens_sp (dataType <> text "(..)")- ]- where- datacon_occ = rdrNameOcc $ ieName ie- datacon = parenSymOcc datacon_occ (ppr datacon_occ)- dataType = parenSymOcc dataType_occ (ppr dataType_occ)- parens_sp d = parens (space <> d <> space) -- T( f,g )--badImportItemErr :: ModIface -> ImpDeclSpec -> IE GhcPs -> [AvailInfo] -> SDoc-badImportItemErr iface decl_spec ie avails- = case find checkIfDataCon avails of- Just con -> badImportItemErrDataCon (availOccName con) iface decl_spec ie- Nothing -> badImportItemErrStd iface decl_spec ie- where- checkIfDataCon (AvailTC _ ns) =- case find (\n -> importedFS == occNameFS (occName n)) ns of- Just n -> isDataConName (greNameMangledName n)- Nothing -> False- checkIfDataCon _ = False- availOccName = occName . availGreName- importedFS = occNameFS . rdrNameOcc $ ieName ie--illegalImportItemErr :: SDoc-illegalImportItemErr = text "Illegal import item"--addDupDeclErr :: NonEmpty GlobalRdrElt -> TcRn ()-addDupDeclErr gres@(gre :| _)- = addErrAt (getSrcSpan (NE.last sorted_names)) $ mkTcRnUnknownMessage $ mkPlainError noHints $- -- Report the error at the later location- vcat [text "Multiple declarations of" <+>- quotes (ppr (greOccName gre)),- -- NB. print the OccName, not the Name, because the- -- latter might not be in scope in the RdrEnv and so will- -- be printed qualified.- text "Declared at:" <+>- vcat (toList $ ppr . nameSrcLoc <$> sorted_names)]- where- sorted_names =- NE.sortBy (SrcLoc.leftmost_smallest `on` nameSrcSpan)- (fmap greMangledName gres)----missingImportListWarn :: ModuleName -> SDoc-missingImportListWarn mod- = text "The module" <+> quotes (ppr mod) <+> text "does not have an explicit import list"--moduleWarn :: ModuleName -> WarningTxt GhcRn -> SDoc-moduleWarn mod (WarningTxt _ txt)- = sep [ text "Module" <+> quotes (ppr mod) <> colon,- nest 2 (vcat (map (ppr . hsDocString . unLoc) txt)) ]-moduleWarn mod (DeprecatedTxt _ txt)- = sep [ text "Module" <+> quotes (ppr mod)- <+> text "is deprecated:",- nest 2 (vcat (map (ppr . hsDocString . unLoc) txt)) ]--packageImportErr :: TcRnMessage-packageImportErr- = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Package-qualified imports are not enabled; use PackageImports"---- This data decl will parse OK--- data T = a Int--- treating "a" as the constructor.--- It is really hard to make the parser spot this malformation.--- So the renamer has to check that the constructor is legal------ We can get an operator as the constructor, even in the prefix form:--- data T = :% Int Int--- from interface files, which always print in prefix form------ We also allow type constructor names, which are defined by "type data"--- declarations. See Note [Type data declarations] in GHC.Rename.Module.--checkConName :: RdrName -> TcRn ()-checkConName name- = checkErr (isRdrDataCon name || isRdrTc name) (badDataCon name)--badDataCon :: RdrName -> TcRnMessage-badDataCon name- = mkTcRnUnknownMessage $ mkPlainError noHints $- hsep [text "Illegal data constructor name", quotes (ppr name)]+{-# LANGUAGE TupleSections #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE LambdaCase #-}++module GHC.Rename.Names (+ rnImports, getLocalNonValBinders, newRecordFieldLabel,+ extendGlobalRdrEnvRn,+ gresFromAvails,+ calculateAvails,+ reportUnusedNames,+ checkConName,+ mkChildEnv,+ findChildren,+ findImportUsage,+ getMinimalImports,+ printMinimalImports,+ renamePkgQual, renameRawPkgQual,+ classifyGREs,+ ImportDeclUsage,+ ) where++import GHC.Prelude hiding ( head, init, last, tail )++import GHC.Driver.Env+import GHC.Driver.Session+import GHC.Driver.Ppr++import GHC.Rename.Env+import GHC.Rename.Fixity+import GHC.Rename.Utils ( warnUnusedTopBinds )+import GHC.Rename.Unbound+import qualified GHC.Rename.Unbound as Unbound++import GHC.Tc.Errors.Types+import GHC.Tc.Utils.Env+import GHC.Tc.Utils.Monad+import GHC.Tc.Types.LclEnv+import GHC.Tc.Zonk.TcType ( tcInitTidyEnv )++import GHC.Hs+import GHC.Iface.Load ( loadSrcInterface )+import GHC.Iface.Syntax ( fromIfaceWarnings )+import GHC.Builtin.Names+import GHC.Parser.PostProcess ( setRdrNameSpace )+import GHC.Core.Type+import GHC.Core.PatSyn+import GHC.Core.TyCon ( TyCon, tyConName )+import qualified GHC.LanguageExtensions as LangExt++import GHC.Utils.Outputable as Outputable+import GHC.Utils.Misc as Utils+import GHC.Utils.Panic++import GHC.Types.Fixity.Env+import GHC.Types.SafeHaskell+import GHC.Types.Name+import GHC.Types.Name.Env+import GHC.Types.Name.Set+import GHC.Types.Name.Reader+import GHC.Types.Avail+import GHC.Types.FieldLabel+import GHC.Types.Hint+import GHC.Types.SourceFile+import GHC.Types.SrcLoc as SrcLoc+import GHC.Types.Basic ( TopLevelFlag(..) )+import GHC.Types.SourceText+import GHC.Types.Id+import GHC.Types.HpcInfo+import GHC.Types.PkgQual+import GHC.Types.GREInfo (ConInfo(..))++import GHC.Unit+import GHC.Unit.Module.Warnings+import GHC.Unit.Module.ModIface+import GHC.Unit.Module.Imported+import GHC.Unit.Module.Deps+import GHC.Unit.Env++import GHC.Data.Bag+import GHC.Data.FastString+import GHC.Data.FastString.Env+import GHC.Data.Maybe+import GHC.Data.List.SetOps ( removeDups )++import Control.Monad+import Data.Foldable ( for_ )+import Data.IntMap ( IntMap )+import qualified Data.IntMap as IntMap+import Data.Map ( Map )+import qualified Data.Map as Map+import Data.Ord ( comparing )+import Data.List ( partition, find, sortBy )+import Data.List.NonEmpty (NonEmpty(..))+import qualified Data.List.NonEmpty as NE+import Data.Function ( on )+import qualified Data.Set as S+import System.FilePath ((</>))+import System.IO+++{-+************************************************************************+* *+\subsection{rnImports}+* *+************************************************************************++Note [Tracking Trust Transitively]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we import a package as well as checking that the direct imports are safe+according to the rules outlined in the Note [Safe Haskell Trust Check] in GHC.Driver.Main+we must also check that these rules hold transitively for all dependent modules+and packages. Doing this without caching any trust information would be very+slow as we would need to touch all packages and interface files a module depends+on. To avoid this we make use of the property that if a modules Safe Haskell+mode changes, this triggers a recompilation from that module in the dependency+graph. So we can just worry mostly about direct imports.++There is one trust property that can change for a package though without+recompilation being triggered: package trust. So we must check that all+packages a module transitively depends on to be trusted are still trusted when+we are compiling this module (as due to recompilation avoidance some modules+below may not be considered trusted any more without recompilation being+triggered).++We handle this by augmenting the existing transitive list of packages a module M+depends on with a bool for each package that says if it must be trusted when the+module M is being checked for trust. This list of trust required packages for a+single import is gathered in the rnImportDecl function and stored in an+ImportAvails data structure. The union of these trust required packages for all+imports is done by the rnImports function using the combine function which calls+the plusImportAvails function that is a union operation for the ImportAvails+type. This gives us in an ImportAvails structure all packages required to be+trusted for the module we are currently compiling. Checking that these packages+are still trusted (and that direct imports are trusted) is done in+GHC.Driver.Main.checkSafeImports.++See the note below, [Trust Own Package] for a corner case in this method and+how its handled.+++Note [Trust Own Package]+~~~~~~~~~~~~~~~~~~~~~~~~+There is a corner case of package trust checking that the usual transitive check+doesn't cover. (For how the usual check operates see the Note [Tracking Trust+Transitively] below). The case is when you import a -XSafe module M and M+imports a -XTrustworthy module N. If N resides in a different package than M,+then the usual check works as M will record a package dependency on N's package+and mark it as required to be trusted. If N resides in the same package as M+though, then importing M should require its own package be trusted due to N+(since M is -XSafe so doesn't create this requirement by itself). The usual+check fails as a module doesn't record a package dependency of its own package.+So instead we now have a bool field in a modules interface file that simply+states if the module requires its own package to be trusted. This field avoids+us having to load all interface files that the module depends on to see if one+is trustworthy.+++Note [Trust Transitive Property]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+So there is an interesting design question in regards to transitive trust+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 trust+requirements from B? Should A now also require that a package p is trusted since+B required it?++We currently say no but saying yes also makes sense. The difference is, if a+module M that doesn't use Safe Haskell imports a module N that does, should all+the trusted package requirements be dropped since M didn't declare that it cares+about Safe Haskell (so -XSafe is more strongly associated with the module doing+the importing) or should it be done still since the author of the module N that+uses Safe Haskell said they cared (so -XSafe is more strongly associated with+the module that was compiled that used it).++Going with yes is a simpler semantics we think and harder for the user to stuff+up but it does mean that Safe Haskell will affect users who don't care about+Safe Haskell as they might grab a package from Cabal which uses safe haskell (say+network) and that packages imports -XTrustworthy modules from another package+(say bytestring), so requires that package is trusted. The user may now get+compilation errors in code that doesn't do anything with Safe Haskell simply+because they are using the network package. They will have to call 'ghc-pkg+trust network' to get everything working. Due to this invasive nature of going+with yes we have gone with no for now.+-}++-- | Process Import Decls. See 'rnImportDecl' for a description of what+-- the return types represent.+-- Note: Do the non SOURCE ones first, so that we get a helpful warning+-- for SOURCE ones that are unnecessary+rnImports :: [(LImportDecl GhcPs, SDoc)]+ -> RnM ([LImportDecl GhcRn], GlobalRdrEnv, ImportAvails, AnyHpcUsage)+rnImports imports = do+ tcg_env <- getGblEnv+ -- NB: want an identity module here, because it's OK for a signature+ -- module to import from its implementor+ let this_mod = tcg_mod tcg_env+ let (source, ordinary) = partition (is_source_import . fst) imports+ is_source_import d = ideclSource (unLoc d) == IsBoot+ stuff1 <- mapAndReportM (rnImportDecl this_mod) ordinary+ stuff2 <- mapAndReportM (rnImportDecl this_mod) source+ -- Safe Haskell: See Note [Tracking Trust Transitively]+ let (decls, rdr_env, imp_avails, hpc_usage) = combine (stuff1 ++ stuff2)+ -- Update imp_boot_mods if imp_direct_mods mentions any of them+ let merged_import_avail = clobberSourceImports imp_avails+ dflags <- getDynFlags+ let final_import_avail =+ merged_import_avail { imp_dep_direct_pkgs = S.fromList (implicitPackageDeps dflags)+ `S.union` imp_dep_direct_pkgs merged_import_avail}+ return (decls, rdr_env, final_import_avail, hpc_usage)++ where+ clobberSourceImports imp_avails =+ imp_avails { imp_boot_mods = imp_boot_mods' }+ where+ imp_boot_mods' = mergeInstalledModuleEnv combJ id (const emptyInstalledModuleEnv)+ (imp_boot_mods imp_avails)+ (imp_direct_dep_mods imp_avails)++ combJ (GWIB _ IsBoot) x = Just x+ combJ r _ = Just r+ -- See Note [Combining ImportAvails]+ combine :: [(LImportDecl GhcRn, GlobalRdrEnv, ImportAvails, AnyHpcUsage)]+ -> ([LImportDecl GhcRn], GlobalRdrEnv, ImportAvails, AnyHpcUsage)+ 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, finsts_set)+ = ( decl:decls,+ gbl_env1 `plusGlobalRdrEnv` gbl_env2,+ 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 #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:+--+-- 1. An updated 'LImportDecl', where all unresolved 'RdrName' in+-- the entity lists have been resolved into 'Name's,+--+-- 2. A 'GlobalRdrEnv' representing the new identifiers that were+-- brought into scope (taking into account module qualification+-- and hiding),+--+-- 3. 'ImportAvails' summarizing the identifiers that were imported+-- by this declaration, and+--+-- 4. A boolean 'AnyHpcUsage' which is true if the imported module+-- used HPC.+rnImportDecl :: Module -> (LImportDecl GhcPs, SDoc)+ -> RnM (LImportDecl GhcRn, GlobalRdrEnv, ImportAvails, AnyHpcUsage)+rnImportDecl this_mod+ (L loc decl@(ImportDecl { ideclName = loc_imp_mod_name+ , ideclPkgQual = raw_pkg_qual+ , ideclSource = want_boot, ideclSafe = mod_safe+ , ideclQualified = qual_style+ , ideclExt = XImportDeclPass { ideclImplicit = implicit }+ , ideclAs = as_mod, ideclImportList = imp_details }), import_reason)+ = setSrcSpanA loc $ do++ case raw_pkg_qual of+ NoRawPkgQual -> pure ()+ RawPkgQual _ -> do+ pkg_imports <- xoptM LangExt.PackageImports+ when (not pkg_imports) $ addErr TcRnPackageImportsDisabled++ let qual_only = isImportDeclQualified qual_style++ -- If there's an error in loadInterface, (e.g. interface+ -- file not found) we get lots of spurious errors from 'filterImports'+ let imp_mod_name = unLoc loc_imp_mod_name+ doc = ppr imp_mod_name <+> import_reason++ hsc_env <- getTopEnv+ unit_env <- hsc_unit_env <$> getTopEnv+ let pkg_qual = renameRawPkgQual unit_env imp_mod_name raw_pkg_qual++ -- Check for self-import, which confuses the typechecker (#9032)+ -- ghc --make rejects self-import cycles already, but batch-mode may not+ -- at least not until GHC.IfaceToCore.tcHiBootIface, which is too late to avoid+ -- typechecker crashes. (Indirect self imports are not caught until+ -- GHC.IfaceToCore, see #10337 tracking how to make this error better.)+ --+ -- Originally, we also allowed 'import {-# SOURCE #-} M', but this+ -- caused bug #10182: in one-shot mode, we should never load an hs-boot+ -- file for the module we are compiling into the EPS. In principle,+ -- it should be possible to support this mode of use, but we would have to+ -- extend Provenance to support a local definition in a qualified location.+ -- For now, we don't support it, but see #10336+ when (imp_mod_name == moduleName this_mod &&+ (case pkg_qual of -- If we have import "<pkg>" M, then we should+ -- check that "<pkg>" is "this" (which is magic)+ -- or the name of this_mod's package. Yurgh!+ -- c.f. GHC.findModule, and #9997+ NoPkgQual -> True+ ThisPkg uid -> uid == homeUnitId_ (hsc_dflags hsc_env)+ OtherPkg _ -> False))+ (addErr (TcRnSelfImport imp_mod_name))++ -- Check for a missing import list (Opt_WarnMissingImportList also+ -- checks for T(..) items but that is done in checkDodgyImport below)+ case imp_details of+ Just (Exactly, _) -> return () -- Explicit import list+ _ | implicit -> return () -- Do not bleat for implicit imports+ | qual_only -> return ()+ | otherwise -> addDiagnostic (TcRnNoExplicitImportList imp_mod_name)+++ iface <- loadSrcInterface doc imp_mod_name want_boot pkg_qual++ -- Compiler sanity check: if the import didn't say+ -- {-# SOURCE #-} we should not get a hi-boot file+ warnPprTrace ((want_boot == NotBoot) && (mi_boot iface == IsBoot)) "rnImportDecl" (ppr imp_mod_name) $ do++ -- Issue a user warning for a redundant {- SOURCE -} import+ -- NB that we arrange to read all the ordinary imports before+ -- any of the {- SOURCE -} imports.+ --+ -- in --make and GHCi, the compilation manager checks for this,+ -- and indeed we shouldn't do it here because the existence of+ -- the non-boot module depends on the compilation order, which+ -- is not deterministic. The hs-boot test can show this up.+ dflags <- getDynFlags+ warnIf ((want_boot == IsBoot) && (mi_boot iface == NotBoot) && isOneShot (ghcMode dflags))+ (TcRnRedundantSourceImport imp_mod_name)+ when (mod_safe && not (safeImportsOn dflags)) $+ addErr (TcRnSafeImportsDisabled imp_mod_name)++ let imp_mod = mi_module iface+ qual_mod_name = fmap unLoc as_mod `orElse` imp_mod_name+ imp_spec = ImpDeclSpec { is_mod = imp_mod, is_qual = qual_only,+ is_dloc = locA loc, is_as = qual_mod_name }++ -- filter the imports according to the import declaration+ (new_imp_details, gres) <- filterImports hsc_env iface imp_spec imp_details++ -- for certain error messages, we’d like to know what could be imported+ -- here, if everything were imported+ potential_gres <- mkGlobalRdrEnv . snd <$> filterImports hsc_env iface imp_spec Nothing++ let gbl_env = mkGlobalRdrEnv gres++ is_hiding | Just (EverythingBut,_) <- imp_details = True+ | otherwise = False++ -- should the import be safe?+ mod_safe' = mod_safe+ || (not implicit && safeDirectImpsReq dflags)+ || (implicit && safeImplicitImpsReq dflags)++ hsc_env <- getTopEnv+ let home_unit = hsc_home_unit hsc_env+ other_home_units = hsc_all_home_unit_ids hsc_env+ imv = ImportedModsVal+ { imv_name = qual_mod_name+ , imv_span = locA loc+ , imv_is_safe = mod_safe'+ , imv_is_hiding = is_hiding+ , imv_all_exports = potential_gres+ , imv_qualified = qual_only+ }+ imports = calculateAvails home_unit other_home_units iface mod_safe' want_boot (ImportedByUser imv)++ -- Complain if we import a deprecated module+ case fromIfaceWarnings (mi_warns iface) of+ WarnAll txt -> addDiagnostic (TcRnDeprecatedModule imp_mod_name txt)+ _ -> return ()++ -- Complain about -Wcompat-unqualified-imports violations.+ warnUnqualifiedImport decl iface++ let new_imp_decl = ImportDecl+ { ideclExt = ideclExt decl+ , ideclName = ideclName decl+ , ideclPkgQual = pkg_qual+ , ideclSource = ideclSource decl+ , ideclSafe = mod_safe'+ , ideclQualified = ideclQualified decl+ , ideclAs = ideclAs decl+ , ideclImportList = new_imp_details+ }++ return (L loc new_imp_decl, gbl_env, imports, mi_hpc iface)+++-- | Rename raw package imports+renameRawPkgQual :: UnitEnv -> ModuleName -> RawPkgQual -> PkgQual+renameRawPkgQual unit_env mn = \case+ NoRawPkgQual -> NoPkgQual+ RawPkgQual p -> renamePkgQual unit_env mn (Just (sl_fs p))++-- | Rename raw package imports+renamePkgQual :: UnitEnv -> ModuleName -> Maybe FastString -> PkgQual+renamePkgQual unit_env mn mb_pkg = case mb_pkg of+ Nothing -> NoPkgQual+ Just pkg_fs+ | Just uid <- homeUnitId <$> ue_homeUnit unit_env+ , pkg_fs == fsLit "this"+ -> ThisPkg uid++ | Just (uid, _) <- find (fromMaybe False . fmap (== pkg_fs) . snd) home_names+ -> ThisPkg uid++ | Just uid <- resolvePackageImport (ue_units unit_env) mn (PackageName pkg_fs)+ -> OtherPkg uid++ | otherwise+ -> OtherPkg (UnitId pkg_fs)+ -- not really correct as pkg_fs is unlikely to be a valid unit-id but+ -- we will report the failure later...+ where+ home_names = map (\uid -> (uid, mkFastString <$> thisPackageName (homeUnitEnv_dflags (ue_findHomeUnitEnv uid unit_env)))) hpt_deps++ units = ue_units unit_env++ hpt_deps :: [UnitId]+ hpt_deps = homeUnitDepends units+++-- | Calculate the 'ImportAvails' induced by an import of a particular+-- interface, but without 'imp_mods'.+calculateAvails :: HomeUnit+ -> S.Set UnitId+ -> ModIface+ -> IsSafeImport+ -> IsBootInterface+ -> ImportedBy+ -> ImportAvails+calculateAvails home_unit other_home_units iface mod_safe' want_boot imported_by =+ let imp_mod = mi_module iface+ imp_sem_mod= mi_semantic_module iface+ orph_iface = mi_orphan (mi_final_exts iface)+ has_finsts = mi_finsts (mi_final_exts iface)+ deps = mi_deps iface+ trust = getSafeMode $ mi_trust iface+ trust_pkg = mi_trust_pkg iface+ is_sig = mi_hsc_src iface == HsigFile++ -- If the module exports anything defined in this module, just+ -- ignore it. Reason: otherwise it looks as if there are two+ -- local definition sites for the thing, and an error gets+ -- reported. Easiest thing is just to filter them out up+ -- front. This situation only arises if a module imports+ -- itself, or another module that imported it. (Necessarily,+ -- this involves a loop.)+ --+ -- We do this *after* filterImports, so that if you say+ -- module A where+ -- import B( AType )+ -- type AType = ...+ --+ -- module B( AType ) where+ -- import {-# SOURCE #-} A( AType )+ --+ -- then you won't get a 'B does not export AType' message.+++ -- Compute new transitive dependencies+ --+ -- 'dep_orphs' and 'dep_finsts' do NOT include the imported module+ -- itself, but we DO need to include this module in 'imp_orphs' and+ -- 'imp_finsts' if it defines an orphan or instance family; thus the+ -- orph_iface/has_iface tests.++ deporphs = dep_orphs deps+ depfinsts = dep_finsts deps++ orphans | orph_iface = assertPpr (not (imp_sem_mod `elem` deporphs)) (ppr imp_sem_mod <+> ppr deporphs) $+ imp_sem_mod : deporphs+ | otherwise = deporphs++ finsts | has_finsts = assertPpr (not (imp_sem_mod `elem` depfinsts)) (ppr imp_sem_mod <+> ppr depfinsts) $+ imp_sem_mod : depfinsts+ | otherwise = depfinsts++ -- Trusted packages are a lot like orphans.+ trusted_pkgs | mod_safe' = dep_trusted_pkgs deps+ | otherwise = S.empty+++ pkg = moduleUnit (mi_module iface)+ ipkg = toUnitId pkg++ -- Does this import mean we now require our own pkg+ -- to be trusted? See Note [Trust Own Package]+ ptrust = trust == Sf_Trustworthy || trust_pkg+ pkg_trust_req+ | isHomeUnit home_unit pkg = ptrust+ | otherwise = False++ dependent_pkgs = if toUnitId pkg `S.member` other_home_units+ then S.empty+ else S.singleton ipkg++ direct_mods = mkModDeps $ if toUnitId pkg `S.member` other_home_units+ then S.singleton (moduleUnitId imp_mod, (GWIB (moduleName imp_mod) want_boot))+ else S.empty++ dep_boot_mods_map = mkModDeps (dep_boot_mods deps)++ boot_mods+ -- If we are looking for a boot module, it must be HPT+ | IsBoot <- want_boot = extendInstalledModuleEnv dep_boot_mods_map (toUnitId <$> imp_mod) (GWIB (moduleName imp_mod) IsBoot)+ -- Now we are importing A properly, so don't go looking for+ -- A.hs-boot+ | isHomeUnit home_unit pkg = dep_boot_mods_map+ -- There's no boot files to find in external imports+ | otherwise = emptyInstalledModuleEnv++ sig_mods =+ if is_sig+ then moduleName imp_mod : dep_sig_mods deps+ else dep_sig_mods deps+++ in ImportAvails {+ imp_mods = unitModuleEnv (mi_module iface) [imported_by],+ imp_orphs = orphans,+ imp_finsts = finsts,+ imp_sig_mods = sig_mods,+ imp_direct_dep_mods = direct_mods,+ imp_dep_direct_pkgs = dependent_pkgs,+ imp_boot_mods = boot_mods,++ -- Add in the imported modules trusted package+ -- requirements. ONLY do this though if we import the+ -- module as a safe import.+ -- See Note [Tracking Trust Transitively]+ -- and Note [Trust Transitive Property]+ imp_trust_pkgs = trusted_pkgs,+ -- Do we require our own pkg to be trusted?+ -- See Note [Trust Own Package]+ imp_trust_own_pkg = pkg_trust_req+ }+++-- | Issue a warning if the user imports Data.List without either an import+-- list or `qualified`. This is part of the migration plan for the+-- `Data.List.singleton` proposal. See #17244.+warnUnqualifiedImport :: ImportDecl GhcPs -> ModIface -> RnM ()+warnUnqualifiedImport decl iface =+ when bad_import $ do+ addDiagnosticAt loc (TcRnCompatUnqualifiedImport decl)+ where+ mod = mi_module iface+ loc = getLocA $ ideclName decl++ is_qual = isImportDeclQualified (ideclQualified decl)+ has_import_list =+ -- We treat a `hiding` clause as not having an import list although+ -- it's not entirely clear this is the right choice.+ case ideclImportList decl of+ Just (Exactly, _) -> True+ _ -> False+ bad_import =+ not is_qual+ && not has_import_list+ && mod `elemModuleSet` qualifiedMods++ -- Modules for which we warn if we see unqualified imports+ qualifiedMods = mkModuleSet [ dATA_LIST ]++{-+************************************************************************+* *+\subsection{importsFromLocalDecls}+* *+************************************************************************++From the top-level declarations of this module produce+ * the lexical environment+ * the ImportAvails+created by its bindings.++Note [Top-level Names in Template Haskell decl quotes]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+See also: Note [Interactively-bound Ids in GHCi] in GHC.Driver.Env+ Note [Looking up Exact RdrNames] in GHC.Rename.Env++Consider a Template Haskell declaration quotation like this:+ module M where+ f x = h [d| f = 3 |]+When renaming the declarations inside [d| ...|], we treat the+top level binders specially in two ways++1. We give them an Internal Name, not (as usual) an External one.+ This is done by GHC.Rename.Env.newTopSrcBinder.++2. We make them *shadow* the outer bindings.+ See Note [GlobalRdrEnv shadowing]++3. We find out whether we are inside a [d| ... |] by testing the TH+ stage. This is a slight hack, because the stage field was really+ meant for the type checker, and here we are not interested in the+ fields of Brack, hence the error thunks in thRnBrack.+-}++extendGlobalRdrEnvRn :: [GlobalRdrElt]+ -> MiniFixityEnv+ -> RnM (TcGblEnv, TcLclEnv)+-- Updates both the GlobalRdrEnv and the FixityEnv+-- We return a new TcLclEnv only because we might have to+-- delete some bindings from it;+-- see Note [Top-level Names in Template Haskell decl quotes]++extendGlobalRdrEnvRn new_gres new_fixities+ = checkNoErrs $ -- See Note [Fail fast on duplicate definitions]+ do { (gbl_env, lcl_env) <- getEnvs+ ; stage <- getStage+ ; isGHCi <- getIsGHCi+ ; let rdr_env = tcg_rdr_env gbl_env+ fix_env = tcg_fix_env gbl_env+ th_bndrs = getLclEnvThBndrs lcl_env+ th_lvl = thLevel stage++ -- Delete new_occs from global and local envs+ -- If we are in a TemplateHaskell decl bracket,+ -- we are going to shadow them+ -- See Note [GlobalRdrEnv shadowing]+ inBracket = isBrackStage stage++ lcl_env_TH = modifyLclCtxt (\lcl_env -> lcl_env { tcl_rdr = minusLocalRdrEnv (tcl_rdr lcl_env) new_gres_env }) lcl_env+ -- See Note [GlobalRdrEnv shadowing]++ lcl_env2 | inBracket = lcl_env_TH+ | otherwise = lcl_env++ -- Deal with shadowing: see Note [GlobalRdrEnv shadowing]+ want_shadowing = isGHCi || inBracket+ rdr_env1 | want_shadowing = shadowNames False rdr_env new_gres_env+ | otherwise = rdr_env++ lcl_env3 = modifyLclCtxt (\lcl_env -> lcl_env { tcl_th_bndrs = extendNameEnvList th_bndrs+ [ ( n, (TopLevel, th_lvl) )+ | n <- new_names ] }) lcl_env2++ ; rdr_env2 <- foldlM add_gre rdr_env1 new_gres++ ; let fix_env' = foldl' extend_fix_env fix_env new_gres+ gbl_env' = gbl_env { tcg_rdr_env = rdr_env2, tcg_fix_env = fix_env' }++ ; traceRn "extendGlobalRdrEnvRn 2" (pprGlobalRdrEnv True rdr_env2)+ ; return (gbl_env', lcl_env3) }+ where+ new_names = map greName new_gres+ new_gres_env = mkGlobalRdrEnv new_gres++ -- If there is a fixity decl for the gre, add it to the fixity env+ extend_fix_env fix_env gre+ | Just (L _ fi) <- lookupFsEnv new_fixities (occNameFS occ)+ = extendNameEnv fix_env name (FixItem occ fi)+ | otherwise+ = fix_env+ where+ name = greName gre+ occ = greOccName gre++ add_gre :: GlobalRdrEnv -> GlobalRdrElt -> RnM GlobalRdrEnv+ -- Extend the GlobalRdrEnv with a LocalDef GRE+ -- If there is already a LocalDef GRE with the same OccName,+ -- report an error and discard the new GRE+ -- This establishes INVARIANT 1 of GlobalRdrEnvs+ add_gre env gre+ | not (null dups) -- Same OccName defined twice+ = do { addDupDeclErr (gre :| dups); return env }++ | otherwise+ = return (extendGlobalRdrEnv env gre)+ where+ -- See Note [Reporting duplicate local declarations]+ dups = filter isBadDupGRE+ $ lookupGRE env (LookupOccName (greOccName gre) (RelevantGREsFOS WantBoth))+ isBadDupGRE old_gre = isLocalGRE old_gre && greClashesWith gre old_gre++{- Note [Fail fast on duplicate definitions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If there are duplicate bindings for the same thing, we want to fail+fast. Having two bindings for the same thing can cause follow-on errors.+Example (test T9975a):+ data Test = Test { x :: Int }+ pattern Test wat = Test { x = wat }+This defines 'Test' twice. The second defn has no field-names; and then+we get an error from Test { x=wat }, saying "Test has no field 'x'".++Easiest thing is to bale out fast on duplicate definitions, which+we do via `checkNoErrs` on `extendGlobalRdrEnvRn`.++Note [Reporting duplicate local declarations]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In general, a single module may not define the same OccName multiple times. This+is checked in extendGlobalRdrEnvRn: when adding a new locally-defined GRE to the+GlobalRdrEnv we report an error if there are already duplicates in the+environment. This establishes INVARIANT 1 (see comments on GlobalRdrEnv in+GHC.Types.Name.Reader), which says that for a given OccName, all the+GlobalRdrElts to which it maps must have distinct 'greName's.++For example, the following will be rejected:++ f x = x+ g x = x+ f x = x -- Duplicate!++Users are allowed to introduce new GREs with the same OccName as an imported GRE,+as disambiguation is possible through the module system, e.g.:++ module M where+ import N (f)+ f x = x+ g x = M.f x + N.f x++If both GREs are local, the general rule is that two GREs clash if they have+the same OccName, i.e. they share a textual name and live in the same namespace.+However, there are additional clashes due to record fields:++ - a new variable clashes with previously defined record fields+ which define field selectors,++ - a new record field shadows:++ - previously defined variables, if it defines a field selector,+ - previously defined record fields, unless it is a duplicate record field.++This logic is implemented in the function 'GHC.Types.Name.Reader.greClashesWith'.++See also Note [Skipping ambiguity errors at use sites of local declarations] in+GHC.Rename.Utils.+-}+++{- *********************************************************************+* *+ getLocalDeclBindersd@ returns the names for an HsDecl+ It's used for source code.++ *** See Note [The Naming story] in GHC.Hs.Decls ****+* *+********************************************************************* -}++getLocalNonValBinders :: MiniFixityEnv -> HsGroup GhcPs+ -> RnM ((TcGblEnv, TcLclEnv), NameSet)+-- Get all the top-level binders bound the group *except*+-- for value bindings, which are treated separately+-- Specifically we return AvailInfo for+-- * type decls (incl constructors and record selectors)+-- * class decls (including class ops)+-- * associated types+-- * foreign imports+-- * value signatures (in hs-boot files only)++getLocalNonValBinders fixity_env+ (HsGroup { hs_valds = binds,+ hs_tyclds = tycl_decls,+ hs_fords = foreign_decls })+ = do { -- Process all type/class decls *except* family instances+ ; let inst_decls = tycl_decls >>= group_instds+ ; dup_fields_ok <- xopt_DuplicateRecordFields <$> getDynFlags+ ; has_sel <- xopt_FieldSelectors <$> getDynFlags+ ; tc_gres+ <- concatMapM+ (new_tc dup_fields_ok has_sel)+ (tyClGroupTyClDecls tycl_decls)+ ; traceRn "getLocalNonValBinders 1" (ppr tc_gres)+ ; envs <- extendGlobalRdrEnvRn tc_gres fixity_env+ ; restoreEnvs envs $ do {+ -- Bring these things into scope first+ -- See Note [Looking up family names in family instances]++ -- Process all family instances+ -- to bring new data constructors into scope+ ; nti_gress <- mapM (new_assoc dup_fields_ok has_sel) inst_decls++ -- Finish off with value binders:+ -- foreign decls and pattern synonyms for an ordinary module+ -- type sigs in case of a hs-boot file only+ ; is_boot <- tcIsHsBootOrSig+ ; let val_bndrs+ | is_boot = case binds of+ ValBinds _ _val_binds val_sigs ->+ -- In a hs-boot file, the value binders come from the+ -- *signatures*, and there should be no foreign binders+ [ L (l2l decl_loc) (unLoc n)+ | L decl_loc (TypeSig _ ns _) <- val_sigs, n <- ns]+ _ -> panic "Non-ValBinds in hs-boot group"+ | otherwise = for_hs_bndrs+ ; val_gres <- mapM new_simple val_bndrs++ ; let avails = concat nti_gress ++ val_gres+ new_bndrs = gresToNameSet avails `unionNameSet`+ gresToNameSet tc_gres+ ; traceRn "getLocalNonValBinders 2" (ppr avails)+ ; envs <- extendGlobalRdrEnvRn avails fixity_env+ ; return (envs, new_bndrs) } }+ where+ for_hs_bndrs :: [LocatedN RdrName]+ for_hs_bndrs = hsForeignDeclsBinders foreign_decls++ -- the SrcSpan attached to the input should be the span of the+ -- declaration, not just the name+ new_simple :: LocatedN RdrName -> RnM GlobalRdrElt+ new_simple rdr_name = do { nm <- newTopSrcBinder rdr_name+ ; return (mkLocalVanillaGRE NoParent nm) }++ new_tc :: DuplicateRecordFields -> FieldSelectors -> LTyClDecl GhcPs+ -> RnM [GlobalRdrElt]+ new_tc dup_fields_ok has_sel tc_decl -- NOT for type/data instances+ = do { let TyDeclBinders (main_bndr, tc_flav) at_bndrs sig_bndrs+ (LConsWithFields cons_with_flds flds) = hsLTyClDeclBinders tc_decl+ ; tycon_name <- newTopSrcBinder $ l2n main_bndr+ ; at_names <- mapM (newTopSrcBinder . l2n . fst) at_bndrs+ ; sig_names <- mapM (newTopSrcBinder . l2n) sig_bndrs+ ; con_names_with_flds <- mapM (\(con,flds) -> (,flds) <$> newTopSrcBinder (l2n con)) cons_with_flds+ ; flds' <- mapM (newRecordFieldLabel dup_fields_ok has_sel $ map fst con_names_with_flds) flds+ ; mapM_ (add_dup_fld_errs flds') con_names_with_flds+ ; let tc_gre = mkLocalTyConGRE (fmap (const tycon_name) tc_flav) tycon_name+ fld_env = mk_fld_env con_names_with_flds flds'+ at_gres = zipWith (\ (_, at_flav) at_nm -> mkLocalTyConGRE (fmap (const tycon_name) at_flav) at_nm)+ at_bndrs at_names+ sig_gres = map (mkLocalVanillaGRE (ParentIs tycon_name)) sig_names+ con_gres = map (mkLocalConLikeGRE (ParentIs tycon_name)) fld_env+ fld_gres = mkLocalFieldGREs (ParentIs tycon_name) fld_env+ sub_gres = at_gres ++ sig_gres ++ con_gres ++ fld_gres+ ; traceRn "getLocalNonValBinders new_tc" $+ vcat [ text "tycon:" <+> ppr tycon_name+ , text "tc_gre:" <+> ppr tc_gre+ , text "sub_gres:" <+> ppr sub_gres ]+ ; return $ tc_gre : sub_gres }++ -- Calculate the record field information, which feeds into the GlobalRdrElts+ -- for DataCons and their fields. It's convenient to do this here where+ -- we are working with a single datatype definition.+ --+ -- The information we needed was all set up for us:+ -- see Note [Collecting record fields in data declarations] in GHC.Hs.Utils.+ mk_fld_env :: [(Name, Maybe [Located Int])] -> IntMap FieldLabel+ -> [(ConLikeName, ConInfo)]+ mk_fld_env names flds =+ [ (DataConName con, con_info)+ | (con, mb_fl_indxs) <- names+ , let con_info = case fmap (map ((flds IntMap.!) . unLoc)) mb_fl_indxs of+ Nothing -> ConHasPositionalArgs+ Just [] -> ConIsNullary+ Just (fld:flds) -> ConHasRecordFields $ fld NE.:| flds ]++ new_assoc :: DuplicateRecordFields -> FieldSelectors -> LInstDecl GhcPs+ -> RnM [GlobalRdrElt]+ new_assoc _ _ (L _ (TyFamInstD {})) = return []+ -- type instances don't bind new names++ new_assoc dup_fields_ok has_sel (L _ (DataFamInstD _ d))+ = new_di dup_fields_ok has_sel Nothing d+ new_assoc dup_fields_ok has_sel+ (L _ (ClsInstD _ (ClsInstDecl { cid_poly_ty = inst_ty+ , cid_datafam_insts = adts })))+ = do -- First, attempt to grab the name of the class from the instance.+ -- This step could fail if the instance is not headed by a class,+ -- such as in the following examples:+ --+ -- (1) The class is headed by a bang pattern, such as in+ -- `instance !Show Int` (#3811c)+ -- (2) The class is headed by a type variable, such as in+ -- `instance c` (#16385)+ --+ -- If looking up the class name fails, then mb_cls_gre will+ -- be Nothing.+ mb_cls_gre <- runMaybeT $ do+ -- See (1) above+ L loc cls_rdr <- MaybeT $ pure $ getLHsInstDeclClass_maybe inst_ty+ -- See (2) above+ MaybeT $ setSrcSpan (locA loc) $ lookupGlobalOccRn_maybe SameNameSpace cls_rdr+ -- Assuming the previous step succeeded, process any associated data+ -- family instances. If the previous step failed, bail out.+ case mb_cls_gre of+ Nothing+ -> pure []+ Just cls_gre+ -> let cls_nm = greName cls_gre+ in concatMapM (new_di dup_fields_ok has_sel (Just cls_nm) . unLoc) adts++ new_di :: DuplicateRecordFields -> FieldSelectors+ -> Maybe Name -- class name+ -> DataFamInstDecl GhcPs+ -> RnM [GlobalRdrElt]+ new_di dup_fields_ok has_sel mb_cls dfid@(DataFamInstDecl { dfid_eqn = ti_decl })+ = do { main_name <- unLoc <$> lookupFamInstName mb_cls (feqn_tycon ti_decl)+ ; let LConsWithFields cons_with_flds flds = hsDataFamInstBinders dfid+ ; sub_names <- mapM (\(con,flds) -> (,flds) <$> newTopSrcBinder (l2n con)) cons_with_flds+ ; flds' <- mapM (newRecordFieldLabel dup_fields_ok has_sel $ map fst sub_names) flds+ ; mapM_ (add_dup_fld_errs flds') sub_names+ ; let fld_env = mk_fld_env sub_names flds'+ con_gres = map (mkLocalConLikeGRE (ParentIs main_name)) fld_env+ field_gres = mkLocalFieldGREs (ParentIs main_name) fld_env+ -- NB: the data family name is not bound here,+ -- so we don't return a GlobalRdrElt for it here!+ ; return $ con_gres ++ field_gres }++ -- Add errors if a constructor has a duplicate record field.+ add_dup_fld_errs :: IntMap FieldLabel+ -> (Name, Maybe [Located Int])+ -> IOEnv (Env TcGblEnv TcLclEnv) ()+ add_dup_fld_errs all_flds (con, mb_con_flds)+ | Just con_flds <- mb_con_flds+ , let (_, dups) = removeDups (comparing unLoc) con_flds+ = for_ dups $ \ dup_flds ->+ -- Report the error at the location of the second occurrence+ -- of the duplicate field.+ let loc =+ case dup_flds of+ _ :| ( L loc _ : _) -> loc+ L loc _ :| _ -> loc+ dup_rdrs = fmap (nameRdrName . flSelector . (all_flds IntMap.!) . unLoc) dup_flds+ in addErrAt loc $ TcRnDuplicateFieldName (RecordFieldDecl con) dup_rdrs+ | otherwise+ = return ()++newRecordFieldLabel :: DuplicateRecordFields -> FieldSelectors -> [Name] -> LFieldOcc GhcPs -> RnM FieldLabel+newRecordFieldLabel _ _ [] _ = error "newRecordFieldLabel: datatype has no constructors!"+newRecordFieldLabel dup_fields_ok has_sel (dc:_) (L loc (FieldOcc _ (L _ fld)))+ = do { selName <- newTopSrcBinder $ L (l2l loc) $ field+ ; return $ FieldLabel { flHasDuplicateRecordFields = dup_fields_ok+ , flHasFieldSelector = has_sel+ , flSelector = selName } }+ where+ fld_occ = rdrNameOcc fld+ dc_fs = occNameFS $ nameOccName dc+ field+ -- Use an Exact RdrName as-is, to preserve the bindings+ -- of an already renamer-resolved field and its use+ -- sites. This is needed to correctly support record+ -- selectors in Template Haskell. See Note [Binders in+ -- Template Haskell] in "GHC.ThToHs" and Note [Looking up+ -- Exact RdrNames] in "GHC.Rename.Env".+ | isExact fld+ = assertPpr (fieldOcc_maybe fld_occ == Just dc_fs)+ (vcat [ text "newRecordFieldLabel: incorrect namespace for exact Name" <+> quotes (ppr fld)+ , text "expected namespace:" <+> pprNameSpace (fieldName dc_fs)+ , text " actual namespace:" <+> pprNameSpace (occNameSpace fld_occ) ])+ fld++ -- Field names produced by the parser are namespaced with VarName.+ -- Here we namespace them according to the first constructor.+ -- See Note [Record field namespacing] in GHC.Types.Name.Occurrence.+ | otherwise+ = mkRdrUnqual $ varToRecFieldOcc dc_fs fld_occ++{-+Note [Looking up family names in family instances]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider++ module M where+ type family T a :: *+ type instance M.T Int = Bool++We might think that we can simply use 'lookupOccRn' when processing the type+instance to look up 'M.T'. Alas, we can't! The type family declaration is in+the *same* HsGroup as the type instance declaration. Hence, as we are+currently collecting the binders declared in that HsGroup, these binders will+not have been added to the global environment yet.++Solution is simple: process the type family declarations first, extend+the environment, and then process the type instances.+++************************************************************************+* *+\subsection{Filtering imports}+* *+************************************************************************++@filterImports@ takes the @ExportEnv@ telling what the imported module makes+available, and filters it through the import spec (if any).++Note [Dealing with imports]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+For import M( ies ), we take each AvailInfo from the mi_exports of M, and make++ imp_occ_env :: OccEnv (NameEnv ImpOccItem)++This map contains one entry for each OccName that M exports, mapping each OccName+to the following information:++ 1. the GlobalRdrElt corresponding to the OccName,+ 2. whether this GlobalRdrElt was the parent in the AvailInfo we found+ the OccName in.+ 3. the GlobalRdrElts that were bundled together in the AvailInfo we found+ this OccName in (not including the parent),++We need (2) and (3) during the construction of the OccEnv because of associated+types and bundled pattern synonyms, respectively.+(3) is explained in Note [Importing PatternSynonyms].++To explain (2), consider for example:++ module M where+ class C a where { data T a }+ instance C Int where { data T Int = T1 | T2 }+ instance C Bool where { data T Int = T3 }++Here, M's exports avails are (recalling the AvailTC invariant from GHC.Types.Avail)++ C(C,T), T(T,T1,T2,T3)++Notice that T appears *twice*, once as a child and once as a parent. From+these two exports, respectively, during construction of the imp_occ_env, we begin+by associating the following two elements with the key T:++ T -> ImpOccItem { imp_item = T, imp_bundled = [C,T] , imp_is_parent = False }+ T -> ImpOccItem { imp_item = T, imp_bundled = [T1,T2,T3], imp_is_parent = True }++We combine these (in function 'combine' in 'mkImportOccEnv') by simply discarding+the first item, to get:++ T -> IE_ITem { imp_item = T, imp_bundled = [T1,T2,T3], imp_is_parent = True }++So the overall imp_occ_env is:++ C -> ImpOccItem { imp_item = C, imp_bundled = [T ], imp_is_parent = True }+ T -> ImpOccItem { imp_item = T , imp_bundled = [T1,T2,T3], imp_is_parent = True }+ T1 -> ImpOccItem { imp_item = T1, imp_bundled = [T1,T2,T3], imp_is_parent = False }+ -- similarly for T2, T3++Note that the imp_occ_env will have entries for data constructors too,+although we never look up data constructors.++Note [Importing PatternSynonyms]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+As described in Note [Dealing with imports], associated types can lead to the+same Name appearing twice, both as a child and once as a parent, when+constructing the imp_occ_env. The same thing can happen with pattern synonyms+if they are exported bundled with a type.++A simplified example, based on #11959:++ {-# LANGUAGE PatternSynonyms #-}+ module M (T(P), pattern P) where -- Duplicate export warning, but allowed+ data T = MkT+ pattern P = MkT++Here we have T(P) and P in export_avails, and respectively construct both++ P -> ImpOccItem { imp_item = P, imp_bundled = [P], imp_is_parent = False }+ P -> ImpOccItem { imp_item = P, imp_bundled = [] , imp_is_parent = False }++We combine these by dropping the one with no siblings, leaving us with:++ P -> ImpOccItem { imp_item = P, imp_bundled = [P], imp_is_parent = False }++That is, we simply discard the non-bundled Avail.++Note [Importing DuplicateRecordFields]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In filterImports, another complicating factor is DuplicateRecordFields.+Suppose we have:++ {-# LANGUAGE DuplicateRecordFields #-}+ module M (S(foo), T(foo)) where+ data S = MkS { foo :: Int }+ data T = MkT { foo :: Int }++ module N where+ import M (foo) -- this is allowed (A)+ import M (S(foo)) -- this is allowed (B)++Here M exports 'foo' at two different OccNames, with different namespaces for+the two construtors MkS and MkT. Then, when we look up 'foo' in lookup_names+for case (A), we have a variable foo but must look in all the record field+namespaces to find the two fields (and hence two different Avails).+Whereas in case (B) we reach the lookup_ie case for IEThingWith,+which looks up 'S' and then finds the unique 'foo' amongst its children.++See T16745 for a test of this.+-}++-- | All the 'GlobalRdrElt's associated with an 'AvailInfo'.+gresFromAvail :: HasDebugCallStack+ => HscEnv -> Maybe ImportSpec -> AvailInfo -> [GlobalRdrElt]+gresFromAvail hsc_env prov avail =+ [ mk_gre nm info+ | nm <- availNames avail+ , let info = lookupGREInfo hsc_env nm ]+ where++ mk_gre n info+ = case prov of+ -- Nothing => bound locally+ -- Just is => imported from 'is'+ Nothing -> GRE { gre_name = n, gre_par = mkParent n avail+ , gre_lcl = True, gre_imp = emptyBag+ , gre_info = info }+ Just is -> GRE { gre_name = n, gre_par = mkParent n avail+ , gre_lcl = False, gre_imp = unitBag is+ , gre_info = info }++-- | All the 'GlobalRdrElt's associated with a collection of 'AvailInfo's.+gresFromAvails :: HscEnv -> Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt]+gresFromAvails hsc_env prov = concatMap (gresFromAvail hsc_env prov)++filterImports+ :: HasDebugCallStack+ => HscEnv+ -> ModIface+ -> ImpDeclSpec+ -- ^ Import spec+ -> Maybe (ImportListInterpretation, LocatedL [LIE GhcPs])+ -- ^ Whether this is a "hiding" import list+ -> RnM (Maybe (ImportListInterpretation, LocatedL [LIE GhcRn]), -- Import spec w/ Names+ [GlobalRdrElt]) -- Same again, but in GRE form+filterImports hsc_env iface decl_spec Nothing+ = return (Nothing, gresFromAvails hsc_env (Just imp_spec) all_avails)+ where+ all_avails = mi_exports iface+ imp_spec = ImpSpec { is_decl = decl_spec, is_item = ImpAll }++filterImports hsc_env iface decl_spec (Just (want_hiding, L l import_items))+ = do -- check for errors, convert RdrNames to Names+ items1 <- mapM lookup_lie import_items++ let items2 :: [(LIE GhcRn, [GlobalRdrElt])]+ items2 = concat items1+ -- NB we may have duplicates, and several items+ -- for the same parent; e.g N(x) and N(y)++ gres = case want_hiding of+ Exactly ->+ concatMap (gresFromIE decl_spec) items2+ EverythingBut ->+ let hidden_names = mkNameSet $ concatMap (map greName . snd) items2+ keep n = not (n `elemNameSet` hidden_names)+ all_gres = gresFromAvails hsc_env (Just hiding_spec) all_avails+ in filter (keep . greName) all_gres++ return (Just (want_hiding, L l (map fst items2)), gres)+ where+ import_mod = mi_module iface+ all_avails = mi_exports iface+ hiding_spec = ImpSpec { is_decl = decl_spec, is_item = ImpAll }+ imp_occ_env = mkImportOccEnv hsc_env decl_spec all_avails++ -- Look up a parent (type constructor, class or data constructor)+ -- in an import.+ lookup_parent :: IE GhcPs -> RdrName -> IELookupM ImpOccItem+ lookup_parent ie rdr =+ assertPpr (not $ isVarNameSpace ns)+ (vcat [ text "filterImports lookup_parent: unexpected variable"+ , text "rdr:" <+> ppr rdr+ , text "namespace:" <+> pprNameSpace ns ]) $+ do { xs <- lookup_names ie rdr+ ; case xs of+ cax :| [] -> return cax+ _ -> pprPanic "filter_imports lookup_parent ambiguous" $+ vcat [ text "rdr:" <+> ppr rdr+ , text "lookups:" <+> ppr (fmap imp_item xs) ] }+ -- Looking up non-variables is always unambiguous,+ -- as there can be at most one corresponding item+ -- in the imp_occ_env.+ -- See item (1) of Note [Exporting duplicate declarations]+ -- in GHC.Tc.Gen.Export.+ where+ occ = rdrNameOcc rdr+ ns = occNameSpace occ++ -- Look up a RdrName used in an import, returning multiple values if there+ -- are several fields with the same name exposed by the module+ lookup_names :: IE GhcPs -> RdrName -> IELookupM (NonEmpty ImpOccItem)+ lookup_names ie rdr+ | isQual rdr+ = failLookupWith (QualImportError rdr)+ | otherwise+ = case lookups of+ [] -> failLookupWith (BadImport ie IsNotSubordinate)+ item:items -> return $ item :| items+ where+ lookups = concatMap nonDetNameEnvElts+ $ lookupImpOccEnv (RelevantGREsFOS WantNormal) imp_occ_env (rdrNameOcc rdr)++ lookup_lie :: LIE GhcPs -> TcRn [(LIE GhcRn, [GlobalRdrElt])]+ lookup_lie (L loc ieRdr)+ = setSrcSpanA loc $+ do (stuff, warns) <- liftM (fromMaybe ([],[])) $+ run_lookup (lookup_ie ieRdr)+ mapM_ (addTcRnDiagnostic <=< warning_msg) warns+ return [ (L loc ie, gres) | (ie,gres) <- stuff ]+ where++ -- Warn when importing T(..) and no children are brought in scope+ warning_msg (DodgyImport n) =+ pure (TcRnDodgyImports (DodgyImportsEmptyParent n))+ warning_msg MissingImportList =+ pure (TcRnMissingImportList ieRdr)+ warning_msg (BadImportW ie) = do+ -- 'BadImportW' is only constructed below in 'handle_bad_import', in+ -- the 'EverythingBut' case, so that's what we pass to+ -- 'badImportItemErr'.+ reason <- badImportItemErr iface decl_spec ie IsNotSubordinate all_avails+ pure (TcRnDodgyImports (DodgyImportsHiding reason))+ warning_msg (DeprecatedExport n w) =+ pure (TcRnPragmaWarning {+ pragma_warning_occ = occName n+ , pragma_warning_msg = w+ , pragma_warning_import_mod = moduleName import_mod+ , pragma_warning_defined_mod = Nothing+ })++ run_lookup :: IELookupM a -> TcRn (Maybe a)+ run_lookup m = case m of+ Failed err -> do+ msg <- lookup_err_msg err+ addErr (TcRnImportLookup msg)+ return Nothing+ Succeeded a -> return (Just a)++ lookup_err_msg err = case err of+ BadImport ie sub -> badImportItemErr iface decl_spec ie sub all_avails+ IllegalImport -> pure ImportLookupIllegal+ QualImportError rdr -> pure (ImportLookupQualified rdr)++ -- For each import item, we convert its RdrNames to Names,+ -- and at the same time compute all the GlobalRdrElt corresponding+ -- to what is actually imported by this item.+ -- Returns Nothing on error.+ --+ -- Returns a list because, with DuplicateRecordFields, a naked+ -- import/export of a record field can correspond to multiple+ -- different GlobalRdrElts. See Note [Importing DuplicateRecordFields].+ lookup_ie :: IE GhcPs+ -> IELookupM ([(IE GhcRn, [GlobalRdrElt])], [IELookupWarning])+ lookup_ie ie = handle_bad_import $+ case ie of+ IEVar _ (L l n) -> do+ -- See Note [Importing DuplicateRecordFields]+ xs <- lookup_names ie (ieWrappedName n)+ let gres = map imp_item $ NE.toList xs+ export_depr_warns+ | want_hiding == Exactly+ = mapMaybe mk_depr_export_warning gres+ | otherwise = []+ return ( [ (IEVar Nothing (L l (replaceWrappedName n name)), [gre])+ | gre <- gres+ , let name = greName gre ]+ , export_depr_warns )++ IEThingAll _ (L l tc) -> do+ ImpOccItem gre child_gres _ <- lookup_parent ie $ ieWrappedName tc+ let name = greName gre+ imp_list_warn++ | null child_gres+ -- e.g. f(..) or T(..) where T is a type synonym+ = [DodgyImport gre]++ -- e.g. import M( T(..) )+ | not (is_qual decl_spec)+ = [MissingImportList]++ | otherwise+ = []++ renamed_ie = IEThingAll (Nothing, noAnn) (L l (replaceWrappedName tc name))+ export_depr_warn+ | want_hiding == Exactly+ = maybeToList $ mk_depr_export_warning gre+ -- We don't want to warn about the children as they+ -- are not explicitly mentioned; the warning will+ -- be emitted later on if they are used+ | otherwise = []++ return ( [(renamed_ie, gre:child_gres)]+ , imp_list_warn ++ export_depr_warn)+++ IEThingAbs _ (L l tc')+ | want_hiding == EverythingBut -- hiding ( C )+ -- Here the 'C' can be a data constructor+ -- *or* a type/class, or even both+ -> let tc = ieWrappedName tc'+ tc_name = lookup_parent ie tc+ dc_name = lookup_parent ie (setRdrNameSpace tc srcDataName)+ in+ case catIELookupM [ tc_name, dc_name ] of+ [] -> failLookupWith (BadImport ie IsNotSubordinate)+ names -> return ( [mkIEThingAbs tc' l (imp_item name) | name <- names], [])+ | otherwise+ -> do ImpOccItem { imp_item = gre } <- lookup_parent ie (ieWrappedName tc')+ return ( [mkIEThingAbs tc' l gre]+ , maybeToList $ mk_depr_export_warning gre)++ IEThingWith (deprecation, ann) ltc@(L l rdr_tc) wc rdr_ns -> do+ ImpOccItem { imp_item = gre, imp_bundled = subnames }+ <- lookup_parent (IEThingAbs (Nothing, noAnn) ltc) (ieWrappedName rdr_tc)+ let name = greName gre++ -- Look up the children in the sub-names of the parent+ -- See Note [Importing DuplicateRecordFields]+ case lookupChildren subnames rdr_ns of++ Failed rdrs -> failLookupWith $+ BadImport (IEThingWith (deprecation, ann) ltc wc rdrs) IsSubordinate+ -- We are trying to import T( a,b,c,d ), and failed+ -- to find 'b' and 'd'. So we make up an import item+ -- to report as failing, namely T( b, d ).+ -- c.f. #15412++ Succeeded childnames ->+ return ([ (IEThingWith (Nothing, ann) (L l name') wc childnames'+ ,gres)]+ , export_depr_warns)++ where name' = replaceWrappedName rdr_tc name+ childnames' = map (to_ie_post_rn . fmap greName) childnames+ gres = gre : map unLoc childnames+ export_depr_warns+ | want_hiding == Exactly = mapMaybe mk_depr_export_warning gres+ | otherwise = []++ _other -> failLookupWith IllegalImport+ -- could be IEModuleContents, IEGroup, IEDoc, IEDocNamed...+ -- all of those constitute errors.++ where+ mkIEThingAbs tc l gre+ = (IEThingAbs (Nothing, noAnn) (L l (replaceWrappedName tc n)), [gre])+ where n = greName gre++ handle_bad_import m = catchIELookup m $ \err -> case err of+ BadImport ie _+ | want_hiding == EverythingBut+ -> return ([], [BadImportW ie])+ _ -> failLookupWith err++ mk_depr_export_warning gre+ = DeprecatedExport name <$> mi_export_warn_fn (mi_final_exts iface) name+ where+ name = greName gre++type IELookupM = MaybeErr IELookupError++data IELookupWarning+ = BadImportW (IE GhcPs)+ | MissingImportList+ | DodgyImport GlobalRdrElt+ | DeprecatedExport Name (WarningTxt GhcRn)++-- | Is this import/export item a subordinate or not?+data IsSubordinate+ = IsSubordinate | IsNotSubordinate++data IELookupError+ = QualImportError RdrName+ | BadImport (IE GhcPs) IsSubordinate+ | IllegalImport++failLookupWith :: IELookupError -> IELookupM a+failLookupWith err = Failed err++catchIELookup :: IELookupM a -> (IELookupError -> IELookupM a) -> IELookupM a+catchIELookup m h = case m of+ Succeeded r -> return r+ Failed err -> h err++catIELookupM :: [IELookupM a] -> [a]+catIELookupM ms = [ a | Succeeded a <- ms ]++-- | Information associated to an 'AvailInfo' used in constructing+-- an 'OccEnv' corresponding to imports.+--+-- See Note [Dealing with imports].+data ImpOccItem+ = ImpOccItem+ { imp_item :: GlobalRdrElt+ -- ^ The import item+ , imp_bundled :: [GlobalRdrElt]+ -- ^ Items bundled in the Avail this import item came from,+ -- not including the import item itself if it is a parent.+ , imp_is_parent :: Bool+ -- ^ Is the import item a parent? See Note [Dealing with imports].+ }++-- | Make an 'OccEnv' of all the imports.+--+-- Complicated by the fact that associated data types and pattern synonyms+-- can appear twice. See Note [Dealing with imports].+mkImportOccEnv :: HscEnv -> ImpDeclSpec -> [IfaceExport] -> OccEnv (NameEnv ImpOccItem)+mkImportOccEnv hsc_env decl_spec all_avails =+ mkOccEnv_C (plusNameEnv_C combine)+ [ (occ, mkNameEnv [(nm, ImpOccItem g bundled is_parent)])+ | avail <- all_avails+ , let gs = gresFromAvail hsc_env (Just hiding_spec) avail+ , g <- gs+ , let nm = greName g+ occ = greOccName g+ (is_parent, bundled) = case avail of+ AvailTC c _+ -> if c == nm -- (Recall the AvailTC invariant)+ then ( True, case gs of { g0 : gs' | greName g0 == nm -> gs'; _ -> gs } )+ else ( False, gs )+ _ -> ( False, [] )+ ]+ where++ hiding_spec = ImpSpec { is_decl = decl_spec, is_item = ImpAll }++ -- See Note [Dealing with imports]+ -- 'combine' may be called for associated data types which appear+ -- twice in the all_avails. In the example, we combine+ -- T(T,T1,T2,T3) and C(C,T) to give (T, T(T,T1,T2,T3), Just C)+ -- NB: the AvailTC can have fields as well as data constructors (#12127)+ combine :: ImpOccItem -> ImpOccItem -> ImpOccItem+ combine item1@(ImpOccItem { imp_item = gre1, imp_is_parent = is_parent1 })+ item2@(ImpOccItem { imp_item = gre2, imp_is_parent = is_parent2 })+ | is_parent1 || is_parent2+ , not (isRecFldGRE gre1 || isRecFldGRE gre2) -- NB: does not force GREInfo.+ , let name1 = greName gre1+ name2 = greName gre2+ = assertPpr (name1 == name2)+ (ppr name1 <+> ppr name2) $+ if is_parent1+ then item1+ else item2+ -- Discard C(C,T) in favour of T(T, T1, T2, T3).++ -- 'combine' may also be called for pattern synonyms which appear both+ -- unassociated and associated (see Note [Importing PatternSynonyms]).+ combine item1@(ImpOccItem { imp_item = c1, imp_bundled = kids1 })+ item2@(ImpOccItem { imp_item = c2, imp_bundled = kids2 })+ = assertPpr (greName c1 == greName c2+ && (not (null kids1 && null kids2)))+ (ppr c1 <+> ppr c2 <+> ppr kids1 <+> ppr kids2) $+ if null kids1+ then item2+ else item1+ -- Discard standalone pattern P in favour of T(P).++-- | Essentially like @lookupGRE env (LookupOccName occ which_gres)@,+-- but working with 'ImpOccItem's instead of 'GlobalRdrElt's.+lookupImpOccEnv :: WhichGREs GREInfo+ -> OccEnv (NameEnv ImpOccItem) -> OccName -> [NameEnv ImpOccItem]+lookupImpOccEnv which_gres env occ =+ mapMaybe relevant_items $ lookupOccEnv_AllNameSpaces env occ+ where+ is_relevant :: ImpOccItem -> Bool+ is_relevant (ImpOccItem { imp_item = gre }) =+ greIsRelevant which_gres (occNameSpace occ) gre+ relevant_items :: NameEnv ImpOccItem -> Maybe (NameEnv ImpOccItem)+ relevant_items nms+ | let nms' = filterNameEnv is_relevant nms+ = if isEmptyNameEnv nms'+ then Nothing+ else Just nms'++{-+************************************************************************+* *+\subsection{Import/Export Utils}+* *+************************************************************************+-}++-- | Given an import\/export spec, appropriately set the @gre_imp@ field+-- for the 'GlobalRdrElt's.+gresFromIE :: ImpDeclSpec -> (LIE GhcRn, [GlobalRdrElt]) -> [GlobalRdrElt]+gresFromIE decl_spec (L loc ie, gres)+ = map set_gre_imp gres+ where+ is_explicit = case ie of+ IEThingAll _ name -> \n -> n == lieWrappedName name+ _ -> \_ -> True+ prov_fn name+ = ImpSpec { is_decl = decl_spec, is_item = item_spec }+ where+ item_spec = ImpSome { is_explicit = is_explicit name+ , is_iloc = locA loc }+ set_gre_imp gre@( GRE { gre_name = nm } )+ = gre { gre_imp = unitBag $ prov_fn nm }++{-+Note [Children for duplicate record fields]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider the module++ {-# LANGUAGE DuplicateRecordFields #-}+ module M (F(foo, MkFInt, MkFBool)) where+ data family F a+ data instance F Int = MkFInt { foo :: Int }+ data instance F Bool = MkFBool { foo :: Bool }++The `foo` in the export list refers to *both* selectors! For this+reason, lookupChildren builds an environment that maps the FastString+to a list of items, rather than a single item.+-}++mkChildEnv :: [GlobalRdrElt] -> NameEnv [GlobalRdrElt]+mkChildEnv gres = foldr add emptyNameEnv gres+ where+ add gre env = case greParent gre of+ ParentIs p -> extendNameEnv_Acc (:) Utils.singleton env p gre+ NoParent -> env++findChildren :: NameEnv [a] -> Name -> [a]+findChildren env n = lookupNameEnv env n `orElse` []++lookupChildren :: [GlobalRdrElt]+ -> [LIEWrappedName GhcPs]+ -> MaybeErr [LIEWrappedName GhcPs] -- The ones for which the lookup failed+ [LocatedA GlobalRdrElt]+-- (lookupChildren all_kids rdr_items) maps each rdr_item to its+-- corresponding Name all_kids, if the former exists+-- The matching is done by FastString, not OccName, so that+-- Cls( meth, AssocTy )+-- will correctly find AssocTy among the all_kids of Cls, even though+-- the RdrName for AssocTy may have a (bogus) DataName namespace+-- (Really the rdr_items should be FastStrings in the first place.)+lookupChildren all_kids rdr_items+ | null fails+ = Succeeded (concat oks)+ -- This 'fmap concat' trickily applies concat to the /second/ component+ -- of the pair, whose type is ([LocatedA Name], [[Located FieldLabel]])+ | otherwise+ = Failed fails+ where+ mb_xs = map doOne rdr_items+ fails = [ bad_rdr | Failed bad_rdr <- mb_xs ]+ oks = [ ok | Succeeded ok <- mb_xs ]+ oks :: [[LocatedA GlobalRdrElt]]++ doOne item@(L l r)+ = case (lookupFsEnv kid_env . occNameFS . rdrNameOcc . ieWrappedName) r of+ Just [g]+ | not $ isRecFldGRE g+ -> Succeeded [L l g]+ Just gs+ | all isRecFldGRE gs+ -> Succeeded $ map (L l) gs+ _ -> Failed item++ -- See Note [Children for duplicate record fields]+ kid_env = extendFsEnvList_C (++) emptyFsEnv+ [(occNameFS (occName x), [x]) | x <- all_kids]+++-------------------------------++{-+*********************************************************+* *+\subsection{Unused names}+* *+*********************************************************+-}++reportUnusedNames :: TcGblEnv -> HscSource -> RnM ()+reportUnusedNames gbl_env hsc_src+ = do { keep <- readTcRef (tcg_keep gbl_env)+ ; traceRn "RUN" (ppr (tcg_dus gbl_env))+ ; warnUnusedImportDecls gbl_env hsc_src+ ; warnUnusedTopBinds $ unused_locals keep+ ; warnMissingSignatures gbl_env+ ; warnMissingKindSignatures gbl_env }+ where+ used_names :: NameSet -> NameSet+ used_names keep = findUses (tcg_dus gbl_env) emptyNameSet `unionNameSet` keep+ -- NB: currently, if f x = g, we only treat 'g' as used if 'f' is used+ -- Hence findUses++ -- Collect the defined names from the in-scope environment+ defined_names :: [GlobalRdrElt]+ defined_names = globalRdrEnvElts (tcg_rdr_env gbl_env)++ kids_env = mkChildEnv defined_names+ -- This is done in mkExports too; duplicated work++ gre_is_used :: NameSet -> GlobalRdrElt -> Bool+ gre_is_used used_names gre0+ = name `elemNameSet` used_names+ || any (\ gre -> greName gre `elemNameSet` used_names) (findChildren kids_env name)+ -- A use of C implies a use of T,+ -- if C was brought into scope by T(..) or T(C)+ where+ name = greName gre0++ -- Filter out the ones that are+ -- (a) defined in this module, and+ -- (b) not defined by a 'deriving' clause+ -- The latter have an Internal Name, so we can filter them out easily+ unused_locals :: NameSet -> [GlobalRdrElt]+ unused_locals keep =+ let -- Note that defined_and_used, defined_but_not_used+ -- are both [GRE]; that's why we need defined_and_used+ -- rather than just used_names+ _defined_and_used, defined_but_not_used :: [GlobalRdrElt]+ (_defined_and_used, defined_but_not_used)+ = partition (gre_is_used (used_names keep)) defined_names++ in filter is_unused_local defined_but_not_used+ is_unused_local :: GlobalRdrElt -> Bool+ is_unused_local gre = isLocalGRE gre+ && isExternalName (greName gre)++{- *********************************************************************+* *+ Missing signatures+* *+********************************************************************* -}++{-+Note [Missing signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~+There are four warning flags in play:++ * -Wmissing-exported-signatures+ Warn about any exported top-level function/value without a type signature.+ Does not include pattern synonyms.++ * -Wmissing-signatures+ Warn about any top-level function/value without a type signature. Does not+ include pattern synonyms. Takes priority over -Wmissing-exported-signatures.++ * -Wmissing-exported-pattern-synonym-signatures+ Warn about any exported pattern synonym without a type signature.++ * -Wmissing-pattern-synonym-signatures+ Warn about any pattern synonym without a type signature. Takes priority over+ -Wmissing-exported-pattern-synonym-signatures.++-}++-- | Warn the user about top level binders that lack type signatures.+-- Called /after/ type inference, so that we can report the+-- inferred type of the function+warnMissingSignatures :: TcGblEnv -> RnM ()+warnMissingSignatures gbl_env+ = do { let exports = availsToNameSet (tcg_exports gbl_env)+ sig_ns = tcg_sigs gbl_env+ -- We use sig_ns to exclude top-level bindings that are generated by GHC+ binds = collectHsBindsBinders CollNoDictBinders $ tcg_binds gbl_env+ pat_syns = tcg_patsyns gbl_env++ not_ghc_generated :: Name -> Bool+ not_ghc_generated name = name `elemNameSet` sig_ns++ add_binding_warn :: Id -> RnM ()+ add_binding_warn id =+ when (not_ghc_generated name) $+ do { env <- liftZonkM $ tcInitTidyEnv -- Why not use emptyTidyEnv?+ ; let (_, ty) = tidyOpenType env (idType id)+ missing = MissingTopLevelBindingSig name ty+ diag = TcRnMissingSignature missing exported+ ; addDiagnosticAt (getSrcSpan name) diag }+ where+ name = idName id+ exported = if name `elemNameSet` exports+ then IsExported+ else IsNotExported++ add_patsyn_warn :: PatSyn -> RnM ()+ add_patsyn_warn ps =+ when (not_ghc_generated name) $+ addDiagnosticAt (getSrcSpan name)+ (TcRnMissingSignature missing exported)+ where+ name = patSynName ps+ missing = MissingPatSynSig ps+ exported = if name `elemNameSet` exports+ then IsExported+ else IsNotExported++ -- Warn about missing signatures+ -- Do this only when we have a type to offer+ -- See Note [Missing signatures]+ ; mapM_ add_binding_warn binds+ ; mapM_ add_patsyn_warn pat_syns+ }++-- | Warn the user about tycons that lack kind signatures.+-- Called /after/ type (and kind) inference, so that we can report the+-- inferred kinds.+warnMissingKindSignatures :: TcGblEnv -> RnM ()+warnMissingKindSignatures gbl_env+ = do { cusks_enabled <- xoptM LangExt.CUSKs+ ; mapM_ (add_ty_warn cusks_enabled) tcs+ }+ where+ tcs = tcg_tcs gbl_env+ ksig_ns = tcg_ksigs gbl_env+ exports = availsToNameSet (tcg_exports gbl_env)++ has_kind_signature :: Name -> Bool+ has_kind_signature name = name `elemNameSet` ksig_ns++ add_ty_warn :: Bool -> TyCon -> RnM ()+ add_ty_warn cusks_enabled tyCon =+ when (has_kind_signature name) $+ addDiagnosticAt (getSrcSpan name) diag+ where+ name = tyConName tyCon+ diag = TcRnMissingSignature missing exported+ missing = MissingTyConKindSig tyCon cusks_enabled+ exported = if name `elemNameSet` exports+ then IsExported+ else IsNotExported++{-+*********************************************************+* *+\subsection{Unused imports}+* *+*********************************************************++This code finds which import declarations are unused. The+specification and implementation notes are here:+ https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/unused-imports++See also Note [Choosing the best import declaration] in GHC.Types.Name.Reader+-}++type ImportDeclUsage+ = ( LImportDecl GhcRn -- The import declaration+ , [GlobalRdrElt] -- What *is* used (normalised)+ , [Name] ) -- What is imported but *not* used++warnUnusedImportDecls :: TcGblEnv -> HscSource -> RnM ()+warnUnusedImportDecls gbl_env hsc_src+ = do { uses <- readMutVar (tcg_used_gres gbl_env)+ ; let user_imports = filterOut+ (ideclImplicit . ideclExt . unLoc)+ (tcg_rn_imports gbl_env)+ -- This whole function deals only with *user* imports+ -- both for warning about unnecessary ones, and for+ -- deciding the minimal ones+ rdr_env = tcg_rdr_env gbl_env++ ; let usage :: [ImportDeclUsage]+ usage = findImportUsage user_imports uses++ ; traceRn "warnUnusedImportDecls" $+ (vcat [ text "Uses:" <+> ppr uses+ , text "Import usage" <+> ppr usage])++ ; mapM_ (warnUnusedImport rdr_env) usage++ ; whenGOptM Opt_D_dump_minimal_imports $+ printMinimalImports hsc_src usage }++findImportUsage :: [LImportDecl GhcRn]+ -> [GlobalRdrElt]+ -> [ImportDeclUsage]++findImportUsage imports used_gres+ = map unused_decl imports+ where+ import_usage :: ImportMap+ import_usage = mkImportMap used_gres++ unused_decl :: LImportDecl GhcRn -> (LImportDecl GhcRn, [GlobalRdrElt], [Name])+ unused_decl decl@(L loc (ImportDecl { ideclImportList = imps }))+ = (decl, used_gres, nameSetElemsStable unused_imps)+ where+ used_gres = lookupSrcLoc (srcSpanEnd $ locA loc) import_usage+ -- srcSpanEnd: see Note [The ImportMap]+ `orElse` []++ used_names = mkNameSet (map greName used_gres)+ used_parents = mkNameSet (mapMaybe greParent_maybe used_gres)++ unused_imps -- Not trivial; see eg #7454+ = case imps of+ Just (Exactly, L _ imp_ies) ->+ foldr (add_unused . unLoc) emptyNameSet imp_ies+ _other -> emptyNameSet -- No explicit import list => no unused-name list++ add_unused :: IE GhcRn -> NameSet -> NameSet+ add_unused (IEVar _ n) acc = add_unused_name (lieWrappedName n) acc+ add_unused (IEThingAbs _ n) acc = add_unused_name (lieWrappedName n) acc+ add_unused (IEThingAll _ n) acc = add_unused_all (lieWrappedName n) acc+ add_unused (IEThingWith _ p wc ns) acc =+ add_wc_all (add_unused_with pn xs acc)+ where pn = lieWrappedName p+ xs = map lieWrappedName ns+ add_wc_all = case wc of+ NoIEWildcard -> id+ IEWildcard _ -> add_unused_all pn+ add_unused _ acc = acc++ add_unused_name n acc+ | n `elemNameSet` used_names = acc+ | otherwise = acc `extendNameSet` n+ add_unused_all n acc+ | n `elemNameSet` used_names = acc+ | n `elemNameSet` used_parents = acc+ | otherwise = acc `extendNameSet` n+ add_unused_with p ns acc+ | all (`elemNameSet` acc1) ns = add_unused_name p acc1+ | otherwise = acc1+ where+ acc1 = foldr add_unused_name acc ns+ -- 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.+++{- Note [The ImportMap]+~~~~~~~~~~~~~~~~~~~~~~~+The ImportMap is a short-lived intermediate data structure records, for+each import declaration, what stuff brought into scope by that+declaration is actually used in the module.++The SrcLoc is the location of the END of a particular 'import'+declaration. Why *END*? Because we don't want to get confused+by the implicit Prelude import. Consider (#7476) the module+ import Foo( foo )+ main = print foo+There is an implicit 'import Prelude(print)', and it gets a SrcSpan+of line 1:1 (just the point, not a span). If we use the *START* of+the SrcSpan to identify the import decl, we'll confuse the implicit+import Prelude with the explicit 'import Foo'. So we use the END.+It's just a cheap hack; we could equally well use the Span too.++The [GlobalRdrElt] are the things imported from that decl.+-}++type ImportMap = Map RealSrcLoc [GlobalRdrElt] -- See [The ImportMap]+ -- If loc :-> gres, then+ -- 'loc' = the end loc of the bestImport of each GRE in 'gres'++mkImportMap :: [GlobalRdrElt] -> ImportMap+-- For each of a list of used GREs, find all the import decls that brought+-- it into scope; choose one of them (bestImport), and record+-- the RdrName in that import decl's entry in the ImportMap+mkImportMap gres+ = foldr add_one Map.empty gres+ where+ add_one gre@(GRE { gre_imp = imp_specs }) imp_map =+ case srcSpanEnd (is_dloc (is_decl best_imp_spec)) of+ -- For srcSpanEnd see Note [The ImportMap]+ RealSrcLoc decl_loc _ -> Map.insertWith add decl_loc [gre] imp_map+ UnhelpfulLoc _ -> imp_map+ where+ best_imp_spec =+ case bagToList imp_specs of+ [] -> pprPanic "mkImportMap: GRE with no ImportSpecs" (ppr gre)+ is:iss -> bestImport (is NE.:| iss)+ add _ gres = gre : gres++warnUnusedImport :: GlobalRdrEnv -> ImportDeclUsage -> RnM ()+warnUnusedImport rdr_env (L loc decl, used, unused)++ -- Do not warn for 'import M()'+ | Just (Exactly, L _ []) <- ideclImportList decl+ = return ()++ -- Note [Do not warn about Prelude hiding]+ | Just (EverythingBut, L _ hides) <- ideclImportList decl+ , not (null hides)+ , pRELUDE_NAME == unLoc (ideclName decl)+ = return ()++ -- Nothing used; drop entire declaration+ | null used+ = addDiagnosticAt (locA loc) (TcRnUnusedImport decl UnusedImportNone)++ -- Everything imported is used; nop+ | null unused+ = return ()++ -- Only one import is unused, with `SrcSpan` covering only the unused item instead of+ -- the whole import statement+ | Just (_, L _ imports) <- ideclImportList decl+ , length unused == 1+ , Just (L loc _) <- find (\(L _ ie) -> ((ieName ie) :: Name) `elem` unused) imports+ = addDiagnosticAt (locA loc) (TcRnUnusedImport decl (UnusedImportSome sort_unused))++ -- Some imports are unused+ | otherwise+ = addDiagnosticAt (locA loc) (TcRnUnusedImport decl (UnusedImportSome sort_unused))++ where+ -- In warning message, pretty-print identifiers unqualified unconditionally+ -- to improve the consistent for ambiguous/unambiguous identifiers.+ -- See trac#14881.+ possible_field n =+ case lookupGRE_Name rdr_env n of+ Just (GRE { gre_par = par, gre_info = IAmRecField info }) ->+ let fld_occ :: OccName+ fld_occ = nameOccName $ flSelector $ recFieldLabel info+ in UnusedImportNameRecField par fld_occ+ _ -> UnusedImportNameRegular n++ -- Print unused names in a deterministic (lexicographic) order+ sort_unused :: [UnusedImportName]+ sort_unused = fmap possible_field $+ sortBy (comparing nameOccName) unused++{-+Note [Do not warn about Prelude hiding]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We do not warn about+ import Prelude hiding( x, y )+because even if nothing else from Prelude is used, it may be essential to hide+x,y to avoid name-shadowing warnings. Example (#9061)+ import Prelude hiding( log )+ f x = log where log = ()++++Note [Printing minimal imports]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+To print the minimal imports we walk over the user-supplied import+decls, and simply trim their import lists. NB that++ * We do *not* change the 'qualified' or 'as' parts!++ * We do not discard a decl altogether; we might need instances+ from it. Instead we just trim to an empty import list+-}++getMinimalImports :: [ImportDeclUsage] -> RnM [LImportDecl GhcRn]+getMinimalImports ie_decls+ = do { rdr_env <- getGlobalRdrEnv+ ; fmap combine $ mapM (mk_minimal rdr_env) ie_decls }+ where+ mk_minimal rdr_env (L l decl, used_gres, unused)+ | null unused+ , Just (Exactly, _) <- ideclImportList decl+ = return (L l decl)+ | otherwise+ = do { let ImportDecl { ideclName = L _ mod_name+ , ideclSource = is_boot+ , ideclPkgQual = pkg_qual } = decl+ ; iface <- loadSrcInterface doc mod_name is_boot pkg_qual+ ; let used_avails = gresToAvailInfo used_gres+ ; lies <- map (L l) <$> concatMapM (to_ie rdr_env iface) used_avails+ ; return (L l (decl { ideclImportList = Just (Exactly, L (l2l l) lies) })) }+ where+ doc = text "Compute minimal imports for" <+> ppr decl++ to_ie :: GlobalRdrEnv -> ModIface -> AvailInfo -> RnM [IE GhcRn]+ -- The main trick here is that if we're importing all the constructors+ -- 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 rdr_env _ (Avail c) -- Note [Overloaded field import]+ = do { let+ gre = expectJust "getMinimalImports Avail" $ lookupGRE_Name rdr_env c+ ; return $ [IEVar Nothing (to_ie_post_rn $ noLocA $ greName gre)] }+ to_ie _ _ avail@(AvailTC n [_]) -- Exporting the main decl and nothing else+ | availExportsDecl avail+ = return [IEThingAbs (Nothing, noAnn) (to_ie_post_rn $ noLocA n)]+ to_ie rdr_env iface (AvailTC n cs) =+ case [ xs | avail@(AvailTC x xs) <- mi_exports iface+ , x == n+ , availExportsDecl avail -- Note [Partial export]+ ] of+ [xs]+ | all_used xs+ -> return [IEThingAll (Nothing, noAnn) (to_ie_post_rn $ noLocA n)]+ | otherwise+ -> do { let ns_gres = map (expectJust "getMinimalImports AvailTC" . lookupGRE_Name rdr_env) cs+ ns = map greName ns_gres+ ; return [IEThingWith (Nothing, noAnn) (to_ie_post_rn $ noLocA n) NoIEWildcard+ (map (to_ie_post_rn . noLocA) (filter (/= n) ns))] }+ -- Note [Overloaded field import]+ _other+ -> do { let infos = map (expectJust "getMinimalImports AvailTC" . lookupGRE_Name rdr_env) cs+ (ns_gres,fs_gres) = classifyGREs infos+ ns = map greName (ns_gres ++ fs_gres)+ fs = map fieldGREInfo fs_gres+ ; return $+ if all_non_overloaded fs+ then map (IEVar Nothing . to_ie_post_rn_var . noLocA) ns+ else [IEThingWith (Nothing, noAnn) (to_ie_post_rn $ noLocA n) NoIEWildcard+ (map (to_ie_post_rn . noLocA) (filter (/= n) ns))] }+ where++ all_used avail_cs = all (`elem` cs) avail_cs++ all_non_overloaded = all (not . flIsOverloaded . recFieldLabel)++ combine :: [LImportDecl GhcRn] -> [LImportDecl GhcRn]+ combine = map merge . NE.groupAllWith getKey++ getKey :: LImportDecl GhcRn -> (Bool, Maybe ModuleName, ModuleName)+ getKey decl =+ ( isImportDeclQualified . ideclQualified $ idecl -- is this qualified? (important that this be first)+ , unLoc <$> ideclAs idecl -- what is the qualifier (inside Maybe monad)+ , unLoc . ideclName $ idecl -- Module Name+ )+ where+ idecl :: ImportDecl GhcRn+ idecl = unLoc decl++ merge :: NonEmpty (LImportDecl GhcRn) -> LImportDecl GhcRn+ merge decls@((L l decl) :| _) = L l (decl { ideclImportList = Just (Exactly, L (noAnnSrcSpan (locA l)) lies) })+ where lies = concatMap (unLoc . snd) $ mapMaybe (ideclImportList . unLoc) $ NE.toList decls++classifyGREs :: [GlobalRdrElt] -> ([GlobalRdrElt], [FieldGlobalRdrElt])+classifyGREs = partition (not . isRecFldGRE)++printMinimalImports :: HscSource -> [ImportDeclUsage] -> RnM ()+-- See Note [Printing minimal imports]+printMinimalImports hsc_src imports_w_usage+ = do { imports' <- getMinimalImports imports_w_usage+ ; this_mod <- getModule+ ; dflags <- getDynFlags+ ; liftIO $ withFile (mkFilename dflags this_mod) WriteMode $ \h ->+ printForUser dflags h neverQualify AllTheWay (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+ suffix = case hsc_src of+ HsBootFile -> ".imports-boot"+ HsSrcFile -> ".imports"+ HsigFile -> ".imports"+ basefn = moduleNameString (moduleName this_mod) ++ suffix+++to_ie_post_rn_var :: LocatedA (IdP GhcRn) -> LIEWrappedName GhcRn+to_ie_post_rn_var (L l n)+ | isDataOcc $ occName n = L l (IEPattern (la2e l) (L (la2na l) n))+ | otherwise = L l (IEName noExtField (L (la2na l) n))+++to_ie_post_rn :: LocatedA (IdP GhcRn) -> LIEWrappedName GhcRn+to_ie_post_rn (L l n)+ | isTcOcc occ && isSymOcc occ = L l (IEType (la2e l) (L (la2na l) n))+ | otherwise = L l (IEName noExtField (L (la2na l) n))+ where occ = occName n++{-+Note [Partial export]+~~~~~~~~~~~~~~~~~~~~~+Suppose we have++ module A( op ) where+ class C a where+ op :: a -> a++ module B where+ import A+ f = ..op...++Then the minimal import for module B is+ import A( op )+not+ import A( C( op ) )+which we would usually generate if C was exported from B. Hence+the availExportsDecl test when deciding what to generate.+++Note [Overloaded field import]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+On the other hand, if we have++ {-# LANGUAGE DuplicateRecordFields #-}+ module A where+ data T = MkT { foo :: Int }++ module B where+ import A+ f = ...foo...++then the minimal import for module B must be+ import A ( T(foo) )+because when DuplicateRecordFields is enabled, field selectors are+not in scope without their enclosing datatype.++On the third hand, if we have++ {-# LANGUAGE DuplicateRecordFields #-}+ module A where+ pattern MkT { foo } = Just foo++ module B where+ import A+ f = ...foo...++then the minimal import for module B must be+ import A ( foo )+because foo doesn't have a parent. This might actually be ambiguous if A+exports another field called foo, but there is no good answer to return and this+is a very obscure corner, so it seems to be the best we can do. See+DRFPatSynExport for a test of this.+++************************************************************************+* *+\subsection{Errors}+* *+************************************************************************+-}++badImportItemErr+ :: ModIface -> ImpDeclSpec -> IE GhcPs -> IsSubordinate+ -> [AvailInfo]+ -> TcRn ImportLookupReason+badImportItemErr iface decl_spec ie sub avails = do+ patsyns_enabled <- xoptM LangExt.PatternSynonyms+ dflags <- getDynFlags+ hsc_env <- getTopEnv+ let rdr_env = mkGlobalRdrEnv+ $ gresFromAvails hsc_env (Just imp_spec) all_avails+ pure (ImportLookupBad (importErrorKind dflags rdr_env) iface decl_spec ie patsyns_enabled)+ where+ importErrorKind dflags rdr_env+ | any checkIfTyCon avails = case sub of+ IsNotSubordinate -> BadImportAvailTyCon+ IsSubordinate -> BadImportNotExportedSubordinates unavailableChildren+ | any checkIfVarName avails = BadImportAvailVar+ | Just con <- find checkIfDataCon avails = BadImportAvailDataCon (availOccName con)+ | otherwise = BadImportNotExported suggs+ where+ suggs = similar_suggs ++ fieldSelectorSuggestions rdr_env rdr+ similar_names =+ similarNameSuggestions (Unbound.LF WL_Anything WL_Global)+ dflags rdr_env emptyLocalRdrEnv rdr+ similar_suggs =+ case NE.nonEmpty $ mapMaybe imported_item $ similar_names of+ Just similar -> [ SuggestSimilarNames rdr similar ]+ Nothing -> [ ]++ -- Only keep imported items, and set the "HowInScope" to+ -- "Nothing" to avoid printing "imported from..." in the suggestion+ -- error message.+ imported_item (SimilarRdrName rdr_name (Just (ImportedBy {})))+ = Just (SimilarRdrName rdr_name Nothing)+ imported_item _ = Nothing++ checkIfDataCon = checkIfAvailMatches isDataConName+ checkIfTyCon = checkIfAvailMatches isTyConName+ checkIfVarName =+ \case+ AvailTC{} -> False+ Avail n -> importedFS == occNameFS (occName n)+ && (isVarOcc <||> isFieldOcc) (occName n)+ checkIfAvailMatches namePred =+ \case+ AvailTC _ ns ->+ case find (\n -> importedFS == occNameFS (occName n)) ns of+ Just n -> namePred n+ Nothing -> False+ Avail{} -> False+ availOccName = occName . availName+ rdr = ieName ie+ importedFS = occNameFS $ rdrNameOcc rdr+ imp_spec = ImpSpec { is_decl = decl_spec, is_item = ImpAll }+ all_avails = mi_exports iface+ unavailableChildren = case ie of+ IEThingWith _ _ _ ns -> map (rdrNameOcc . ieWrappedName . unLoc) ns+ _ -> panic "importedChildren failed pattern match: no children"++addDupDeclErr :: NonEmpty GlobalRdrElt -> TcRn ()+addDupDeclErr gres@(gre :| _)+ -- Report the error at the later location+ = addErrAt (getSrcSpan (NE.last sorted_names)) $ (TcRnDuplicateDecls (greOccName gre) sorted_names)+ where+ sorted_names =+ NE.sortBy (SrcLoc.leftmost_smallest `on` nameSrcSpan)+ (fmap greName gres)++-- This data decl will parse OK+-- data T = a Int+-- treating "a" as the constructor.+-- It is really hard to make the parser spot this malformation.+-- So the renamer has to check that the constructor is legal+--+-- We can get an operator as the constructor, even in the prefix form:+-- data T = :% Int Int+-- from interface files, which always print in prefix form+--+-- We also allow type constructor names, which are defined by "type data"+-- declarations. See Note [Type data declarations] in GHC.Rename.Module.++checkConName :: RdrName -> TcRn ()+checkConName name+ = checkErr (isRdrDataCon name || isRdrTc name) (TcRnIllegalDataCon name)
GHC/Rename/Pat.hs view
@@ -1,3 +1,4 @@+ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-}@@ -6,7 +7,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE DisambiguateRecordFields #-}-+{-# LANGUAGE MultiWayIf #-} {- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 @@ -46,7 +47,7 @@ import GHC.Hs import GHC.Tc.Errors.Types import GHC.Tc.Utils.Monad-import GHC.Tc.Utils.Zonk ( hsOverLitName )+import GHC.Tc.Utils.TcMType ( hsOverLitName ) import GHC.Rename.Env import GHC.Rename.Fixity import GHC.Rename.Utils ( newLocalBndrRn, bindLocalNames@@ -56,33 +57,35 @@ , wrapGenSpan, genHsApps, genLHsVar, genHsIntegralLit, warnForallIdentifier ) import GHC.Rename.HsType import GHC.Builtin.Names-import GHC.Types.Avail ( greNameMangledName )-import GHC.Types.Error+ import GHC.Types.Name import GHC.Types.Name.Set import GHC.Types.Name.Reader+import GHC.Types.Unique.Set+ import GHC.Types.Basic import GHC.Types.SourceText import GHC.Utils.Misc+import GHC.Data.FastString ( uniqCompareFS ) import GHC.Data.List.SetOps( removeDups ) import GHC.Utils.Outputable import GHC.Utils.Panic.Plain import GHC.Types.SrcLoc import GHC.Types.Literal ( inCharRange )+import GHC.Types.GREInfo ( ConInfo(..), conInfoFields ) import GHC.Builtin.Types ( nilDataCon ) import GHC.Core.DataCon-import GHC.Driver.Session ( getDynFlags, xopt_DuplicateRecordFields ) import qualified GHC.LanguageExtensions as LangExt -import Control.Monad ( when, ap, guard, unless )+import Control.Monad ( when, ap, guard ) import Data.Foldable+import Data.Function ( on ) import Data.Functor.Identity ( Identity (..) ) import qualified Data.List.NonEmpty as NE import Data.Maybe import Data.Ratio-import GHC.Types.FieldLabel (DuplicateRecordFields(..))-import Language.Haskell.Syntax.Basic (FieldLabelString(..)) + {- ********************************************************* * *@@ -639,17 +642,28 @@ } where check_lang_exts :: RnM ()- check_lang_exts = do- scoped_tyvars <- xoptM LangExt.ScopedTypeVariables- type_app <- xoptM LangExt.TypeApplications- unless (scoped_tyvars && type_app) $- case listToMaybe tyargs of- Nothing -> pure ()- Just tyarg -> addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Illegal visible type application in a pattern:"- <+> quotes (ppr tyarg))- 2 (text "Both ScopedTypeVariables and TypeApplications are"- <+> text "required to use this feature")+ check_lang_exts =+ for_ (listToMaybe tyargs) $ \ arg ->+ do { type_abs <- xoptM LangExt.TypeAbstractions+ ; type_app <- xoptM LangExt.TypeApplications+ ; scoped_tvs <- xoptM LangExt.ScopedTypeVariables+ ; if | type_abs+ -> return ()++ -- As per [GHC Proposal 604](https://github.com/ghc-proposals/ghc-proposals/pull/604/),+ -- we allow type applications in constructor patterns when -XTypeApplications and+ -- -XScopedTypeVariables are both enabled, but we emit a warning when doing so.+ --+ -- This warning is scheduled to become an error in GHC 9.12, in+ -- which case we will get the usual error (below),+ -- which suggests enabling -XTypeAbstractions.+ | type_app && scoped_tvs+ -> addDiagnostic TcRnDeprecatedInvisTyArgInConPat++ | otherwise+ -> addErrTc $ TcRnTypeApplicationsDisabled (TypeApplicationInPattern arg)+ }+ rnConPatTyArg (HsConPatTyArg at t) = do t' <- liftCpsWithCont $ rnHsPatSigTypeBindingVars HsTypeCtx t return (HsConPatTyArg at t')@@ -773,29 +787,30 @@ mb_con = case ctxt of HsRecFieldCon con -> Just con HsRecFieldPat con -> Just con- _ {- update -} -> Nothing+ HsRecFieldUpd -> Nothing rn_fld :: Bool -> Maybe Name -> LHsRecField GhcPs (LocatedA arg) -> RnM (LHsRecField GhcRn (LocatedA arg)) rn_fld pun_ok parent (L l (HsFieldBind- { hfbLHS =- (L loc (FieldOcc _ (L ll lbl)))+ { hfbLHS = L loc (FieldOcc _ (L ll lbl)) , hfbRHS = arg- , hfbPun = pun }))+ , hfbPun = pun })) = do { sel <- setSrcSpanA loc $ lookupRecFieldOcc parent lbl+ ; let arg_rdr = mkRdrUnqual $ recFieldToVarOcc $ occName sel+ -- Discard any module qualifier (#11662) ; arg' <- if pun- then do { checkErr pun_ok (TcRnIllegalFieldPunning (L (locA loc) lbl))- -- Discard any module qualifier (#11662)- ; let arg_rdr = mkRdrUnqual (rdrNameOcc lbl)- ; return (L (l2l loc) (mk_arg (locA loc) arg_rdr)) }+ then do { checkErr pun_ok $+ TcRnIllegalFieldPunning (L (locA loc) arg_rdr)+ ; return $ L (l2l loc) $+ mk_arg (locA loc) arg_rdr } else return arg- ; return (L l (HsFieldBind- { hfbAnn = noAnn- , hfbLHS = (L loc (FieldOcc sel (L ll lbl)))- , hfbRHS = arg'- , hfbPun = pun })) }-+ ; return $ L l $+ HsFieldBind+ { hfbAnn = noAnn+ , hfbLHS = L loc (FieldOcc sel (L ll arg_rdr))+ , hfbRHS = arg'+ , hfbPun = pun } } rn_dotdot :: Maybe (Located RecFieldsDotDot) -- See Note [DotDot fields] in GHC.Hs.Pat -> Maybe Name -- The constructor (Nothing for an@@ -811,8 +826,8 @@ do { dd_flag <- xoptM LangExt.RecordWildCards ; checkErr dd_flag (needFlagDotDot ctxt) ; (rdr_env, lcl_env) <- getRdrEnvs- ; con_fields <- lookupConstructorFields con- ; when (null con_fields) (addErr (TcRnIllegalWildcardsInConstructor con))+ ; conInfo <- lookupConstructorInfo con+ ; when (conInfo == ConHasPositionalArgs) (addErr (TcRnIllegalWildcardsInConstructor con)) ; let present_flds = mkOccSet $ map rdrNameOcc (getFieldLbls flds) -- For constructor uses (but not patterns)@@ -822,28 +837,30 @@ -- f x = R { .. } -- Should expand to R {x=x}, not R{x=x,y=y} arg_in_scope lbl = mkRdrUnqual lbl `elemLocalRdrEnv` lcl_env - (dot_dot_fields, dot_dot_gres)- = unzip [ (fl, gre)- | fl <- con_fields- , let lbl = mkVarOccFS (field_label $ flLabel fl)- , not (lbl `elemOccSet` present_flds)- , Just gre <- [lookupGRE_FieldLabel rdr_env fl]- -- Check selector is in scope- , case ctxt of- HsRecFieldCon {} -> arg_in_scope lbl- _other -> True ]+ (dot_dot_fields, dot_dot_gres) =+ unzip [ (fl, gre)+ | fl <- conInfoFields conInfo+ , let lbl = recFieldToVarOcc $ occName $ flSelector fl+ , not (lbl `elemOccSet` present_flds)+ , Just gre <- [lookupGRE_FieldLabel rdr_env fl]+ -- Check selector is in scope+ , case ctxt of+ HsRecFieldCon {} -> arg_in_scope lbl+ _other -> True ] - ; addUsedGREs dot_dot_gres+ ; addUsedGREs NoDeprecationWarnings dot_dot_gres ; let locn = noAnnSrcSpan loc ; return [ L (noAnnSrcSpan loc) (HsFieldBind { hfbAnn = noAnn , hfbLHS = L (noAnnSrcSpan loc) (FieldOcc sel (L (noAnnSrcSpan loc) arg_rdr)) , hfbRHS = L locn (mk_arg loc arg_rdr)- , hfbPun = False })+ , hfbPun = False }) | fl <- dot_dot_fields , let sel = flSelector fl- , let arg_rdr = mkVarUnqual (field_label $ flLabel fl) ] }+ arg_rdr = mkRdrUnqual+ $ recFieldToVarOcc+ $ nameOccName sel ] } rn_dotdot _dotdot _mb_con _flds = return []@@ -855,67 +872,102 @@ -- Each list represents a RdrName that occurred more than once -- (the list contains all occurrences) -- Each list in dup_fields is non-empty- (_, dup_flds) = removeDups compare (getFieldLbls flds)----- 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.+ (_, dup_flds) = removeDups (uniqCompareFS `on` (occNameFS . rdrNameOcc)) (getFieldLbls flds)+ -- See the same duplicate handling logic in rnHsRecUpdFields below for further context. +-- | Rename a regular (non-overloaded) record field update,+-- disambiguating the fields if necessary. rnHsRecUpdFields- :: [LHsRecUpdField GhcPs]- -> RnM ([LHsRecUpdField GhcRn], FreeVars)+ :: [LHsRecUpdField GhcPs GhcPs]+ -> RnM (XLHsRecUpdLabels GhcRn, [LHsRecUpdField GhcRn GhcRn], FreeVars) rnHsRecUpdFields flds- = do { pun_ok <- xoptM LangExt.NamedFieldPuns- ; dup_fields_ok <- xopt_DuplicateRecordFields <$> getDynFlags- ; (flds1, fvss) <- mapAndUnzipM (rn_fld pun_ok dup_fields_ok) flds- ; mapM_ (addErr . dupFieldErr HsRecFieldUpd) dup_flds+ = do { pun_ok <- xoptM LangExt.NamedFieldPuns - -- Check for an empty record update e {}+ -- Check for an empty record update: e {} -- NB: don't complain about e { .. }, because rn_dotdot has done that already- ; when (null flds) $ addErr TcRnEmptyRecordUpdate+ ; case flds of+ { [] -> failWithTc TcRnEmptyRecordUpdate+ ; fld:other_flds ->+ do { let dup_lbls :: [NE.NonEmpty RdrName]+ (_, dup_lbls) = removeDups (uniqCompareFS `on` (occNameFS . rdrNameOcc))+ (fmap (unLoc . getFieldUpdLbl) flds)+ -- NB: we compare using the underlying field label FastString,+ -- in order to catch duplicates involving qualified names,+ -- as in the record update `r { fld = x, Mod.fld = y }`.+ -- See #21959.+ -- Note that this test doesn't correctly handle exact Names, but those+ -- aren't handled properly by the rest of the compiler anyway. See #22122.+ ; mapM_ (addErr . dupFieldErr HsRecFieldUpd) dup_lbls - ; return (flds1, plusFVs fvss) }- where- rn_fld :: Bool -> DuplicateRecordFields -> LHsRecUpdField GhcPs- -> RnM (LHsRecUpdField GhcRn, FreeVars)- rn_fld pun_ok dup_fields_ok (L l (HsFieldBind { hfbLHS = L loc f- , hfbRHS = arg- , hfbPun = pun }))- = do { let lbl = rdrNameAmbiguousFieldOcc f- ; mb_sel <- setSrcSpanA loc $- -- Defer renaming of overloaded fields to the typechecker- -- See Note [Disambiguating record fields] in GHC.Tc.Gen.Head- lookupRecFieldOcc_update dup_fields_ok lbl- ; arg' <- if pun- then do { checkErr pun_ok (TcRnIllegalFieldPunning (L (locA loc) lbl))- -- Discard any module qualifier (#11662)- ; let arg_rdr = mkRdrUnqual (rdrNameOcc lbl)- ; return (L (l2l loc) (HsVar noExtField- (L (l2l loc) arg_rdr))) }- else return arg- ; (arg'', fvs) <- rnLExpr arg'+ -- See Note [Disambiguating record updates]+ ; possible_parents <- lookupRecUpdFields (fld NE.:| other_flds)+ ; let mb_unambig_lbls :: Maybe [FieldLabel]+ fvs :: FreeVars+ (mb_unambig_lbls, fvs) =+ case possible_parents of+ RnRecUpdParent { rnRecUpdLabels = gres } NE.:| []+ | let lbls = map fieldGRELabel $ NE.toList gres+ -> ( Just lbls, mkFVs $ map flSelector lbls)+ _ -> ( Nothing+ , plusFVs $ map (plusFVs . map pat_syn_free_vars . NE.toList . rnRecUpdLabels)+ $ NE.toList possible_parents+ -- See Note [Using PatSyn FreeVars]+ ) - ; let (lbl', fvs') = case mb_sel of- UnambiguousGre gname -> let sel_name = greNameMangledName gname- in (Unambiguous sel_name (L (l2l loc) lbl), fvs `addOneFV` sel_name)- AmbiguousFields -> (Ambiguous noExtField (L (l2l loc) lbl), fvs)+ -- Rename each field.+ ; (upd_flds, fvs') <- rn_flds pun_ok mb_unambig_lbls flds+ ; let all_fvs = fvs `plusFV` fvs'+ ; return (possible_parents, upd_flds, all_fvs) } } } - ; return (L l (HsFieldBind { hfbAnn = noAnn- , hfbLHS = L loc lbl'- , hfbRHS = arg''- , hfbPun = pun }), fvs') }+ where - dup_flds :: [NE.NonEmpty RdrName]- -- Each list represents a RdrName that occurred more than once- -- (the list contains all occurrences)- -- Each list in dup_fields is non-empty- (_, dup_flds) = removeDups compare (getFieldUpdLbls flds)+ -- For an ambiguous record update involving pattern synonym record fields,+ -- we must add all the possibly-relevant field selector names to ensure that+ -- we typecheck the record update **after** we typecheck the pattern synonym+ -- definition. See Note [Using PatSyn FreeVars].+ pat_syn_free_vars :: FieldGlobalRdrElt -> FreeVars+ pat_syn_free_vars (GRE { gre_info = info })+ | IAmRecField fld_info <- info+ , RecFieldInfo { recFieldLabel = fl, recFieldCons = cons } <- fld_info+ , uniqSetAny is_PS cons+ = unitFV (flSelector fl)+ pat_syn_free_vars _+ = emptyFVs + is_PS :: ConLikeName -> Bool+ is_PS (PatSynName {}) = True+ is_PS (DataConName {}) = False + rn_flds :: Bool -> Maybe [FieldLabel]+ -> [LHsRecUpdField GhcPs GhcPs]+ -> RnM ([LHsRecUpdField GhcRn GhcRn], FreeVars)+ rn_flds _ _ [] = return ([], emptyFVs)+ rn_flds pun_ok mb_unambig_lbls+ ((L l (HsFieldBind { hfbLHS = L loc f+ , hfbRHS = arg+ , hfbPun = pun })):flds)+ = do { let lbl = ambiguousFieldOccRdrName f+ ; (arg' :: LHsExpr GhcPs) <- if pun+ then do { setSrcSpanA loc $+ checkErr pun_ok (TcRnIllegalFieldPunning (L (locA loc) lbl))+ -- Discard any module qualifier (#11662)+ ; let arg_rdr = mkRdrUnqual (rdrNameOcc lbl)+ ; return (L (l2l loc) (HsVar noExtField (L (l2l loc) arg_rdr))) }+ else return arg+ ; (arg'', fvs) <- rnLExpr arg'+ ; let lbl' :: AmbiguousFieldOcc GhcRn+ lbl' = case mb_unambig_lbls of+ { Just (fl:_) ->+ let sel_name = flSelector fl+ in Unambiguous sel_name (L (l2l loc) lbl)+ ; _ -> Ambiguous noExtField (L (l2l loc) lbl) }+ fld' :: LHsRecUpdField GhcRn GhcRn+ fld' = L l (HsFieldBind { hfbAnn = noAnn+ , hfbLHS = L loc lbl'+ , hfbRHS = arg''+ , hfbPun = pun })+ ; (flds', fvs') <- rn_flds pun_ok (tail <$> mb_unambig_lbls) flds+ ; return (fld' : flds', fvs `plusFV` fvs') } getFieldIds :: [LHsRecField GhcRn arg] -> [Name] getFieldIds flds = map (hsRecFieldSel . unLoc) flds@@ -924,9 +976,6 @@ getFieldLbls flds = map (unXRec @p . foLabel . unXRec @p . hfbLHS . unXRec @p) flds -getFieldUpdLbls :: [LHsRecUpdField GhcPs] -> [RdrName]-getFieldUpdLbls flds = map (rdrNameAmbiguousFieldOcc . unLoc . hfbLHS . unLoc) flds- needFlagDotDot :: HsRecFieldContext -> TcRnMessage needFlagDotDot = TcRnIllegalWildcardsInRecord . toRecordFieldPart @@ -938,7 +987,59 @@ toRecordFieldPart (HsRecFieldPat n) = RecordFieldPattern n toRecordFieldPart (HsRecFieldUpd {}) = RecordFieldUpdate -{-+{- Note [Disambiguating record updates]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When the -XDuplicateRecordFields extension is used, to rename and typecheck+a non-overloaded record update, we might need to disambiguate the field labels.++Consider the following definitions:++ {-# LANGUAGE DuplicateRecordFields #-}++ data R = MkR1 { fld1 :: Int, fld2 :: Char }+ | MKR2 { fld1 :: Int, fld2 :: Char, fld3 :: Bool }+ data S = MkS1 { fld1 :: Int } | MkS2 { fld2 :: Char }++In a record update, the `lookupRecUpdFields` function tries to determine+the parent datatype by computing the parents (TyCon/PatSyn) which have+at least one constructor (DataCon/PatSyn) with all of the fields.++For example, in the (non-overloaded) record update++ r { fld1 = 3, fld2 = 'x' }++only the TyCon R contains at least one DataCon which has both of the fields+being updated: in this case, MkR1 and MkR2 have both of the updated fields.+The TyCon S also has both fields fld1 and fld2, but no single constructor+has both of those fields, so S is not a valid parent for this record update.++Note that this check is namespace-aware, so that a record update such as++ import qualified M ( R (fld1, fld2) )+ f r = r { M.fld1 = 3 }++is unambiguous, as only R contains the field fld1 in the M namespace.+(See however #22122 for issues relating to the usage of exact Names in+record fields.)++See also Note [Type-directed record disambiguation] in GHC.Tc.Gen.Expr.++Note [Using PatSyn FreeVars]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we are disambiguating a non-overloaded record update, as per+Note [Disambiguating record updates], and have determined that this+record update might involve pattern synonym record fields, it is important+to declare usage of all these pattern synonyms record fields in the returned+FreeVars of rnHsRecUpdFields. This ensures that the typechecker sees+that the typechecking of the record update depends on the typechecking+of the pattern synonym, and typechecks the pattern synonyms first.+Not doing so caused #21898.++Note that this can be removed once GHC proposal #366 is implemented,+as we will be able to fully disambiguate the record update in the renamer,+and can immediately declare the correct used FreeVars instead of having+to over-estimate in case of ambiguity.+ ************************************************************************ * * \subsubsection{Literals}
GHC/Rename/Splice.hs view
@@ -44,7 +44,7 @@ import GHC.Tc.Utils.Env ( checkWellStaged, tcMetaTy ) -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Data.FastString import GHC.Utils.Logger import GHC.Utils.Panic@@ -62,7 +62,7 @@ , tcTopSpliceExpr ) -import GHC.Tc.Utils.Zonk+import GHC.Tc.Zonk.Type import GHCi.RemoteTypes ( ForeignRef ) import qualified Language.Haskell.TH as TH (Q)@@ -78,15 +78,10 @@ -} -- Check that -XTemplateHaskellQuotes is enabled and available-checkForTemplateHaskellQuotes :: HsExpr GhcPs -> RnM ()+checkForTemplateHaskellQuotes :: HsExpr GhcPs -> RnM () checkForTemplateHaskellQuotes e =- do { thQuotesEnabled <- xoptM LangExt.TemplateHaskellQuotes- ; unless thQuotesEnabled $- failWith ( mkTcRnUnknownMessage $ mkPlainError noHints $ vcat- [ text "Syntax error on" <+> ppr e- , text ("Perhaps you intended to use TemplateHaskell"- ++ " or TemplateHaskellQuotes") ] )- }+ unlessXOptM LangExt.TemplateHaskellQuotes $+ failWith $ thSyntaxError $ IllegalTHQuotes e rnTypedBracket :: HsExpr GhcPs -> LHsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars) rnTypedBracket e br_body@@ -97,13 +92,15 @@ ; cur_stage <- getStage ; case cur_stage of { Splice Typed -> return ()- ; Splice Untyped -> failWithTc illegalTypedBracket+ ; Splice Untyped -> failWithTc $ thSyntaxError+ $ MismatchedSpliceType Untyped IsBracket ; RunSplice _ -> -- See Note [RunSplice ThLevel] in GHC.Tc.Types. pprPanic "rnTypedBracket: Renaming typed bracket when running a splice" (ppr e) ; Comp -> return ()- ; Brack {} -> failWithTc illegalBracket+ ; Brack {} -> failWithTc $ thSyntaxError+ $ NestedTHBrackets } -- Brackets are desugared to code that mentions the TH package@@ -124,14 +121,16 @@ -- Check for nested brackets ; cur_stage <- getStage ; case cur_stage of- { Splice Typed -> failWithTc illegalUntypedBracket+ { Splice Typed -> failWithTc $ thSyntaxError+ $ MismatchedSpliceType Typed IsBracket ; Splice Untyped -> return () ; RunSplice _ -> -- See Note [RunSplice ThLevel] in GHC.Tc.Types. pprPanic "rnUntypedBracket: Renaming untyped bracket when running a splice" (ppr e) ; Comp -> return ()- ; Brack {} -> failWithTc illegalBracket+ ; Brack {} -> failWithTc $ thSyntaxError+ $ NestedTHBrackets } -- Brackets are desugared to code that mentions the TH package@@ -169,8 +168,8 @@ -> do { traceRn "rn_utbracket VarBr" (ppr name <+> ppr bind_lvl <+> ppr outer_stage)- ; checkTc (thLevel outer_stage + 1 == bind_lvl)- (quotedNameStageErr br) }+ ; checkTc (thLevel outer_stage + 1 == bind_lvl) $+ TcRnTHError $ THNameError $ QuotedNameWrongStage br } } } ; return (VarBr x flg (noLocA name), unitFV name) }@@ -232,26 +231,6 @@ = hang (text "In the Template Haskell quotation") 2 (ppr br_body) -illegalBracket :: TcRnMessage-illegalBracket = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Template Haskell brackets cannot be nested" <+>- text "(without intervening splices)"--illegalTypedBracket :: TcRnMessage-illegalTypedBracket = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Typed brackets may only appear in typed splices."--illegalUntypedBracket :: TcRnMessage-illegalUntypedBracket = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Untyped brackets may only appear in untyped splices."--quotedNameStageErr :: HsQuote GhcPs -> TcRnMessage-quotedNameStageErr br- = mkTcRnUnknownMessage $ mkPlainError noHints $- sep [ text "Stage error: the non-top-level quoted name" <+> ppr br- , text "must be used at the same stage at which it is bound" ]-- {- ********************************************************* * *@@ -299,7 +278,8 @@ { stage <- getStage ; case stage of Brack _ RnPendingTyped- -> failWithTc illegalUntypedSplice+ -> failWithTc $ thSyntaxError+ $ MismatchedSpliceType Untyped IsSplice Brack pop_stage (RnPendingUntyped ps_var) -> do { (splice', fvs) <- setStage pop_stage $@@ -326,15 +306,14 @@ -- are not executed until the top-level splice is run. checkTopSpliceAllowed :: HsUntypedSplice GhcPs -> RnM () checkTopSpliceAllowed splice = do- let (herald, ext) = spliceExtension splice- extEnabled <- xoptM ext- unless extEnabled- (failWith $ mkTcRnUnknownMessage $ mkPlainError noHints $- text herald <+> text "are not permitted without" <+> ppr ext)+ let (ext, err) = spliceExtension splice+ unlessXOptM ext $ failWith err where- spliceExtension :: HsUntypedSplice GhcPs -> (String, LangExt.Extension)- spliceExtension (HsQuasiQuote {}) = ("Quasi-quotes", LangExt.QuasiQuotes)- spliceExtension (HsUntypedSpliceExpr {}) = ("Top-level splices", LangExt.TemplateHaskell)+ spliceExtension :: HsUntypedSplice GhcPs -> (LangExt.Extension, TcRnMessage)+ spliceExtension (HsQuasiQuote {}) =+ (LangExt.QuasiQuotes, TcRnIllegalQuasiQuotes)+ spliceExtension (HsUntypedSpliceExpr {}) =+ (LangExt.TemplateHaskell, thSyntaxError $ IllegalTHSplice) ------------------ @@ -456,13 +435,10 @@ -> setStage pop_stage rn_splice Brack _ (RnPendingUntyped _)- -> failWithTc illegalTypedSplice+ -> failWithTc $ thSyntaxError $ MismatchedSpliceType Typed IsSplice - _ -> do { extEnabled <- xoptM LangExt.TemplateHaskell- ; unless extEnabled- (failWith $ mkTcRnUnknownMessage $ mkPlainError noHints $- text "Top-level splices are not permitted without"- <+> ppr LangExt.TemplateHaskell)+ _ -> do { unlessXOptM LangExt.TemplateHaskell+ (failWith $ thSyntaxError IllegalTHSplice) ; (result, fvs1) <- checkNoErrs $ setStage (Splice Typed) rn_splice -- checkNoErrs: don't attempt to run the splice if@@ -474,8 +450,9 @@ ; traceRn "rnTypedSplice: typed expression splice" empty ; lcl_rdr <- getLocalRdrEnv ; gbl_rdr <- getGlobalRdrEnv- ; let gbl_names = mkNameSet [greMangledName gre | gre <- globalRdrEnvElts gbl_rdr- , isLocalGRE gre]+ ; let gbl_names = mkNameSet [ greName gre+ | gre <- globalRdrEnvElts gbl_rdr+ , isLocalGRE gre] lcl_names = mkNameSet (localRdrEnvElts lcl_rdr) fvs2 = lcl_names `plusFV` gbl_names @@ -512,6 +489,9 @@ ; return (gHsPar e, fvs) } +thSyntaxError :: THSyntaxError -> TcRnMessage+thSyntaxError err = TcRnTHError $ THSyntaxError err+ {- Note [Running splices in the Renamer] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -895,14 +875,6 @@ = vcat [ text "--" <+> ppr loc <> colon <+> text "Splicing" <+> text sd , gen ] -illegalTypedSplice :: TcRnMessage-illegalTypedSplice = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Typed splices may not appear in untyped brackets"--illegalUntypedSplice :: TcRnMessage-illegalUntypedSplice = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Untyped splices may not appear in typed brackets"- checkThLocalName :: Name -> RnM () checkThLocalName name | isUnboundName name -- Do not report two errors for@@ -915,7 +887,7 @@ Nothing -> return () ; -- Not a locally-bound thing Just (top_lvl, bind_lvl, use_stage) -> do { let use_lvl = thLevel use_stage- ; checkWellStaged (quotes (ppr name)) bind_lvl use_lvl+ ; checkWellStaged (StageCheckSplice name) bind_lvl use_lvl ; traceRn "checkThLocalName" (ppr name <+> ppr bind_lvl <+> ppr use_stage <+> ppr use_lvl)
GHC/Rename/Unbound.hs view
@@ -9,29 +9,37 @@ module GHC.Rename.Unbound ( mkUnboundName , mkUnboundNameRdr+ , mkUnboundGRE+ , mkUnboundGRERdr , isUnboundName , reportUnboundName , reportUnboundName' , unknownNameSuggestions+ , similarNameSuggestions+ , fieldSelectorSuggestions , WhatLooking(..) , WhereLooking(..) , LookingFor(..) , unboundName , unboundNameX+ , unboundTermNameInTypes+ , IsTermInTypes(..) , notInScopeErr , nameSpacesRelated+ , termNameInType ) where import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Ppr import GHC.Tc.Errors.Types import GHC.Tc.Utils.Monad import GHC.Builtin.Names ( mkUnboundName, isUnboundName, getUnique) import GHC.Utils.Misc+import GHC.Utils.Panic (panic) import GHC.Data.Maybe import GHC.Data.FastString@@ -93,9 +101,17 @@ , lf_where :: WhereLooking } +data IsTermInTypes = UnknownTermInTypes RdrName | TermInTypes RdrName | NoTermInTypes+ mkUnboundNameRdr :: RdrName -> Name mkUnboundNameRdr rdr = mkUnboundName (rdrNameOcc rdr) +mkUnboundGRE :: OccName -> GlobalRdrElt+mkUnboundGRE occ = mkLocalGRE UnboundGRE NoParent $ mkUnboundName occ++mkUnboundGRERdr :: RdrName -> GlobalRdrElt+mkUnboundGRERdr rdr = mkLocalGRE UnboundGRE NoParent $ mkUnboundNameRdr rdr+ reportUnboundName' :: WhatLooking -> RdrName -> RnM Name reportUnboundName' what_look rdr = unboundName (LF what_look WL_Anywhere) rdr @@ -107,11 +123,24 @@ unboundNameX :: LookingFor -> RdrName -> [GhcHint] -> RnM Name unboundNameX looking_for rdr_name hints+ = unboundNameOrTermInType NoTermInTypes looking_for rdr_name hints++unboundTermNameInTypes :: LookingFor -> RdrName -> RdrName -> RnM Name+unboundTermNameInTypes looking_for rdr_name demoted_rdr_name+ = unboundNameOrTermInType (UnknownTermInTypes demoted_rdr_name) looking_for rdr_name []++-- Catches imported qualified terms in type signatures+-- with proper error message and suggestions+termNameInType :: LookingFor -> RdrName -> RdrName -> [GhcHint] -> RnM Name+termNameInType looking_for rdr_name demoted_rdr_name external_hints+ = unboundNameOrTermInType (TermInTypes demoted_rdr_name) looking_for rdr_name external_hints++unboundNameOrTermInType :: IsTermInTypes -> LookingFor -> RdrName -> [GhcHint] -> RnM Name+unboundNameOrTermInType if_term_in_type looking_for rdr_name hints = do { dflags <- getDynFlags ; let show_helpful_errors = gopt Opt_HelpfulErrors dflags- err = notInScopeErr (lf_where looking_for) rdr_name ; if not show_helpful_errors- then addErr $ TcRnNotInScope err rdr_name [] hints+ then addErr $ make_error [] hints else do { local_env <- getLocalRdrEnv ; global_env <- getGlobalRdrEnv ; impInfo <- getImports@@ -122,10 +151,20 @@ dflags hpt currmod global_env local_env impInfo rdr_name ; addErr $- TcRnNotInScope err rdr_name imp_errs (hints ++ suggs) }+ make_error imp_errs (hints ++ suggs) } ; return (mkUnboundNameRdr rdr_name) }+ where+ name_to_search = case if_term_in_type of+ NoTermInTypes -> rdr_name+ UnknownTermInTypes demoted_name -> demoted_name+ TermInTypes demoted_name -> demoted_name + err = notInScopeErr (lf_where looking_for) name_to_search + make_error imp_errs hints = case if_term_in_type of+ TermInTypes demoted_name -> TcRnTermNameInType demoted_name hints+ _ -> TcRnNotInScope err name_to_search imp_errs hints+ notInScopeErr :: WhereLooking -> RdrName -> NotInScopeError notInScopeErr where_look rdr_name | Just name <- isExact_maybe rdr_name@@ -136,11 +175,17 @@ = NotInScope -- | Called from the typechecker ("GHC.Tc.Errors") when we find an unbound variable-unknownNameSuggestions :: WhatLooking -> DynFlags- -> HomePackageTable -> Module- -> GlobalRdrEnv -> LocalRdrEnv -> ImportAvails- -> RdrName -> ([ImportError], [GhcHint])-unknownNameSuggestions what_look = unknownNameSuggestions_ (LF what_look WL_Anywhere)+unknownNameSuggestions :: LocalRdrEnv -> WhatLooking -> RdrName -> RnM ([ImportError], [GhcHint])+unknownNameSuggestions lcl_env what_look tried_rdr_name =+ do { dflags <- getDynFlags+ ; hpt <- getHpt+ ; rdr_env <- getGlobalRdrEnv+ ; imp_info <- getImports+ ; curr_mod <- getModule+ ; return $+ unknownNameSuggestions_+ (LF what_look WL_Anywhere)+ dflags hpt curr_mod rdr_env lcl_env imp_info tried_rdr_name } unknownNameSuggestions_ :: LookingFor -> DynFlags -> HomePackageTable -> Module@@ -152,7 +197,7 @@ suggs = mconcat [ if_ne (SuggestSimilarNames tried_rdr_name) $ similarNameSuggestions looking_for dflags global_env local_env tried_rdr_name- , map ImportSuggestion imp_suggs+ , map (ImportSuggestion $ rdrNameOcc tried_rdr_name) imp_suggs , extensionSuggestions tried_rdr_name , fieldSelectorSuggestions global_env tried_rdr_name ] (imp_errs, imp_suggs) = importSuggestions looking_for global_env hpt curr_mod imports tried_rdr_name@@ -168,9 +213,9 @@ | null gres = [] | otherwise = [RemindFieldSelectorSuppressed tried_rdr_name parents] where- gres = filter isNoFieldSelectorGRE $- lookupGRE_RdrName' tried_rdr_name global_env- parents = [ parent | ParentIs parent <- map gre_par gres ]+ gres = filter isNoFieldSelectorGRE+ $ lookupGRE global_env (LookupRdrName tried_rdr_name AllRelevantGREs)+ parents = [ parent | ParentIs parent <- map greParent gres ] similarNameSuggestions :: LookingFor -> DynFlags -> GlobalRdrEnv -> LocalRdrEnv@@ -182,7 +227,7 @@ all_possibilities :: [(String, SimilarName)] all_possibilities = case what_look of WL_None -> []- _ -> [ (showPpr dflags r, SimilarRdrName r (LocallyBoundAt loc))+ _ -> [ (showPpr dflags r, SimilarRdrName r (Just $ LocallyBoundAt loc)) | (r,loc) <- local_possibilities local_env ] ++ [ (showPpr dflags r, rp) | (r, rp) <- global_possibilities global_env ] @@ -213,7 +258,7 @@ global_possibilities :: GlobalRdrEnv -> [(RdrName, SimilarName)] global_possibilities global_env- | tried_is_qual = [ (rdr_qual, SimilarRdrName rdr_qual how)+ | tried_is_qual = [ (rdr_qual, SimilarRdrName rdr_qual (Just how)) | gre <- globalRdrEnvElts global_env , isGreOk looking_for gre , let occ = greOccName gre@@ -228,7 +273,7 @@ rdr_unqual = mkRdrUnqual occ , correct_name_space occ , sim <- case (unquals_in_scope gre, quals_only gre) of- (how:_, _) -> [ SimilarRdrName rdr_unqual how ]+ (how:_, _) -> [ SimilarRdrName rdr_unqual (Just how) ] ([], pr:_) -> [ pr ] -- See Note [Only-quals] ([], []) -> [] ] @@ -256,7 +301,7 @@ quals_only :: GlobalRdrElt -> [SimilarName] -- Ones for which *only* the qualified version is in scope quals_only (gre@GRE { gre_imp = is })- = [ (SimilarRdrName (mkRdrQual (is_as ispec) (greOccName gre)) (ImportedBy ispec))+ = [ (SimilarRdrName (mkRdrQual (is_as ispec) (greOccName gre)) (Just $ ImportedBy ispec)) | i <- bagToList is, let ispec = is_decl i, is_qual ispec ] @@ -278,9 +323,9 @@ , (mod : mods) <- map fst interesting_imports = ([ModulesDoNotExport (mod :| mods) occ_name], []) | mod : mods <- helpful_imports_non_hiding- = ([], [CouldImportFrom (mod :| mods) occ_name])+ = ([], [CouldImportFrom (mod :| mods)]) | mod : mods <- helpful_imports_hiding- = ([], [CouldUnhideFrom (mod :| mods) occ_name])+ = ([], [CouldUnhideFrom (mod :| mods)]) | otherwise = ([], []) where@@ -288,7 +333,7 @@ (mod_name, occ_name) = case rdr_name of Unqual occ_name -> (Nothing, occ_name) Qual mod_name occ_name -> (Just mod_name, occ_name)- _ -> error "importSuggestions: dead code"+ _ -> panic "importSuggestions: dead code" -- What import statements provide "Mod" at all@@ -312,7 +357,8 @@ helpful_imports = filter helpful interesting_imports where helpful (_,imv) = any (isGreOk looking_for) $- lookupGlobalRdrEnv (imv_all_exports imv) occ_name+ lookupGRE (imv_all_exports imv)+ (LookupOccName occ_name $ RelevantGREsFOS WantNormal) -- Which of these do that because of an explicit hiding list resp. an -- explicit import list@@ -330,9 +376,9 @@ hpt_uniques = map fst (udfmToList hpt) is_last_loaded_mod modnam uniqs = lastMaybe uniqs == Just (getUnique modnam) glob_mods = nub [ mod- | gre <- globalRdrEnvElts global_env- , (mod, _) <- qualsInScope gre- ]+ | gre <- globalRdrEnvElts global_env+ , (mod, _) <- qualsInScope gre+ ] extensionSuggestions :: RdrName -> [GhcHint] extensionSuggestions rdrName@@ -374,12 +420,15 @@ -> NameSpace -- ^ Name space of a name that might have been meant -> Bool nameSpacesRelated dflags what_looking ns ns'- = ns' `elem` ns : [ other_ns- | (orig_ns, others) <- other_namespaces- , ns == orig_ns- , (other_ns, wls) <- others- , what_looking `elem` WL_Anything : wls- ]+ | ns == ns'+ = True+ | otherwise+ = or [ other_ns ns'+ | (orig_ns, others) <- other_namespaces+ , orig_ns ns+ , (other_ns, wls) <- others+ , what_looking `elem` WL_Anything : wls+ ] where -- explanation: -- [(orig_ns, [(other_ns, what_looking_possibilities)])]@@ -387,19 +436,21 @@ -- and what_looking is either WL_Anything or is one of -- what_looking_possibilities other_namespaces =- [ (varName , [(dataName, [WL_Constructor])])- , (dataName , [(varName , [WL_RecField])])- , (tvName , (tcClsName, [WL_Constructor]) : promoted_datacons)- , (tcClsName, (tvName , []) : promoted_datacons)+ [ (isVarNameSpace , [(isFieldNameSpace , [WL_RecField])+ ,(isDataConNameSpace, [WL_Constructor])])+ , (isDataConNameSpace , [(isVarNameSpace , [WL_RecField])])+ , (isTvNameSpace , (isTcClsNameSpace , [WL_Constructor])+ : promoted_datacons)+ , (isTcClsNameSpace , (isTvNameSpace , [])+ : promoted_datacons) ] -- If -XDataKinds is enabled, the data constructor name space is also -- related to the type-level name spaces data_kinds = xopt LangExt.DataKinds dflags- promoted_datacons = [(dataName, [WL_Constructor]) | data_kinds]+ promoted_datacons = [(isDataConNameSpace, [WL_Constructor]) | data_kinds] -{--Note [Related name spaces]-~~~~~~~~~~~~~~~~~~~~~~~~~+{- Note [Related name spaces]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Name spaces are related if there is a chance to mean the one when one writes the other, i.e. variables <-> data constructors and type variables <-> type constructors.
GHC/Rename/Utils.hs view
@@ -9,7 +9,7 @@ -} module GHC.Rename.Utils (- checkDupRdrNames, checkDupRdrNamesN, checkShadowedRdrNames,+ checkDupRdrNames, checkShadowedRdrNames, checkDupNames, checkDupAndShadowedNames, dupNamesErr, checkTupSize, checkCTupSize, addFvRn, mapFvRn, mapMaybeFvRn,@@ -17,21 +17,23 @@ warnUnusedTopBinds, warnUnusedLocalBinds, warnForallIdentifier, checkUnusedRecordWildcard,- mkFieldEnv, badQualBndrErr, typeAppErr, badFieldConErr,- wrapGenSpan, genHsVar, genLHsVar, genHsApp, genHsApps, genAppType,- genHsIntegralLit, genHsTyLit, genSimpleConPat,+ wrapGenSpan, genHsVar, genLHsVar, genHsApp, genHsApps, genLHsApp,+ genAppType,+ genLHsLit, genHsIntegralLit, genHsTyLit, genSimpleConPat, genVarPat, genWildPat, genSimpleFunBind, genFunBind, newLocalBndrRn, newLocalBndrsRn, - bindLocalNames, bindLocalNamesFV,+ bindLocalNames, bindLocalNamesFV, delLocalNames, - addNameClashErrRn,+ addNameClashErrRn, mkNameClashErr, checkInferredVars,- noNestedForallsContextsErr, addNoNestedForallsContextsErr+ noNestedForallsContextsErr, addNoNestedForallsContextsErr,++ isIrrefutableHsPatRn ) where@@ -43,9 +45,8 @@ import GHC.Hs import GHC.Types.Name.Reader import GHC.Tc.Errors.Types-import GHC.Tc.Utils.Env+-- import GHC.Tc.Utils.Env import GHC.Tc.Utils.Monad-import GHC.Types.Error import GHC.Types.Name import GHC.Types.Name.Set import GHC.Types.Name.Env@@ -54,21 +55,20 @@ import GHC.Types.SourceFile import GHC.Types.SourceText ( SourceText(..), IntegralLit ) import GHC.Utils.Outputable-import GHC.Utils.Panic import GHC.Utils.Misc-import GHC.Types.Basic ( TopLevelFlag(..), Origin(Generated) )-import GHC.Data.List.SetOps ( removeDups )+import GHC.Types.Basic+import GHC.Data.List.SetOps ( removeDupsOn ) import GHC.Data.Maybe ( whenIsJust )-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Data.FastString import Control.Monad-import Data.List (find, sortBy) import GHC.Settings.Constants ( mAX_TUPLE_SIZE, mAX_CTUPLE_SIZE )-import qualified Data.List.NonEmpty as NE import qualified GHC.LanguageExtensions as LangExt-import GHC.Data.Bag+ import qualified Data.List as List+import qualified Data.List.NonEmpty as NE + {- ********************************************************* * *@@ -95,7 +95,7 @@ bindLocalNames :: [Name] -> RnM a -> RnM a bindLocalNames names- = updLclEnv $ \ lcl_env ->+ = updLclCtxt $ \ lcl_env -> let th_level = thLevel (tcl_th_ctxt lcl_env) th_bndrs' = extendNameEnvList (tcl_th_bndrs lcl_env) [ (n, (NotTopLevel, th_level)) | n <- names ]@@ -108,20 +108,21 @@ = do { (result, fvs) <- bindLocalNames names enclosed_scope ; return (result, delFVs names fvs) } +delLocalNames :: [Name] -> RnM a -> RnM a+delLocalNames names+ = updLclCtxt $ \ lcl_env ->+ let th_bndrs' = delListFromNameEnv (tcl_th_bndrs lcl_env) names+ rdr_env' = minusLocalRdrEnvList (tcl_rdr lcl_env) (map occName names)+ in lcl_env { tcl_th_bndrs = th_bndrs'+ , tcl_rdr = rdr_env' }+ ------------------------------------- checkDupRdrNames :: [LocatedN RdrName] -> RnM () -- Check for duplicated names in a binding group checkDupRdrNames rdr_names_w_loc- = mapM_ (dupNamesErr getLocA) dups- where- (_, dups) = removeDups (\n1 n2 -> unLoc n1 `compare` unLoc n2) rdr_names_w_loc--checkDupRdrNamesN :: [LocatedN RdrName] -> RnM ()--- Check for duplicated names in a binding group-checkDupRdrNamesN rdr_names_w_loc- = mapM_ (dupNamesErr getLocA) dups+ = mapM_ (\ ns -> dupNamesErr (getLocA <$> ns) (unLoc <$> ns)) dups where- (_, dups) = removeDups (\n1 n2 -> unLoc n1 `compare` unLoc n2) rdr_names_w_loc+ (_, dups) = removeDupsOn unLoc rdr_names_w_loc checkDupNames :: [Name] -> RnM () -- Check for duplicated names in a binding group@@ -130,9 +131,9 @@ check_dup_names :: [Name] -> RnM () check_dup_names names- = mapM_ (dupNamesErr nameSrcSpan) dups+ = mapM_ (\ ns -> dupNamesErr (nameSrcSpan <$> ns) (getRdrName <$> ns)) dups where- (_, dups) = removeDups (\n1 n2 -> nameOccName n1 `compare` nameOccName n2) names+ (_, dups) = removeDupsOn nameOccName names --------------------- checkShadowedRdrNames :: [LocatedN RdrName] -> RnM ()@@ -171,7 +172,7 @@ where (loc,occ) = get_loc_occ n mb_local = lookupLocalRdrOcc local_env occ- gres = lookupGRE_RdrName (mkRdrUnqual occ) global_env+ gres = lookupGRE global_env (LookupRdrName (mkRdrUnqual occ) (RelevantGREsFOS WantBoth)) -- Make an Unqualified RdrName and look that up, so that -- we don't find any GREs that are in scope qualified-only @@ -193,19 +194,15 @@ -- @{a}@, but @forall a. [a] -> [a]@ would be accepted. -- See @Note [Unobservably inferred type variables]@. checkInferredVars :: HsDocContext- -> Maybe SDoc- -- ^ The error msg if the signature is not allowed to contain- -- manually written inferred variables. -> LHsSigType GhcPs -> RnM ()-checkInferredVars _ Nothing _ = return ()-checkInferredVars ctxt (Just msg) ty =+checkInferredVars ctxt ty = let bndrs = sig_ty_bndrs ty- in case find ((==) InferredSpec . hsTyVarBndrFlag) bndrs of- Nothing -> return ()- Just _ -> addErr $+ in case filter ((==) InferredSpec . hsTyVarBndrFlag) bndrs of+ [] -> return ()+ iv : ivs -> addErr $ TcRnWithHsDocContext ctxt $- mkTcRnUnknownMessage $ mkPlainError noHints msg+ TcRnIllegalInferredTyVars (iv NE.:| ivs) where sig_ty_bndrs :: LHsSigType GhcPs -> [HsTyVarBndr Specificity GhcPs] sig_ty_bndrs (L _ (HsSig{sig_bndrs = outer_bndrs}))@@ -288,7 +285,9 @@ -- "GHC.Rename.Module" and 'renameSig' in "GHC.Rename.Bind"). -- See @Note [No nested foralls or contexts in instance types]@ in -- "GHC.Hs.Type".-noNestedForallsContextsErr :: SDoc -> LHsType GhcRn -> Maybe (SrcSpan, TcRnMessage)+noNestedForallsContextsErr :: NestedForallsContextsIn+ -> LHsType GhcRn+ -> Maybe (SrcSpan, TcRnMessage) noNestedForallsContextsErr what lty = case ignoreParens lty of L l (HsForAllTy { hst_tele = tele })@@ -305,12 +304,13 @@ _ -> Nothing where nested_foralls_contexts_err =- mkTcRnUnknownMessage $ mkPlainError noHints $- what <+> text "cannot contain nested"- <+> quotes forAllLit <> text "s or contexts"+ TcRnNestedForallsContexts what -- | A common way to invoke 'noNestedForallsContextsErr'.-addNoNestedForallsContextsErr :: HsDocContext -> SDoc -> LHsType GhcRn -> RnM ()+addNoNestedForallsContextsErr :: HsDocContext+ -> NestedForallsContextsIn+ -> LHsType GhcRn+ -> RnM () addNoNestedForallsContextsErr ctxt what lty = whenIsJust (noNestedForallsContextsErr what lty) $ \(l, err_msg) -> addErrAt l $ TcRnWithHsDocContext ctxt err_msg@@ -356,8 +356,8 @@ warnUnusedTopBinds gres = whenWOptM Opt_WarnUnusedTopBinds $ do env <- getGblEnv- let isBoot = tcg_src env == HsBootFile- let noParent gre = case gre_par gre of+ let isBoot = isHsBootFile $ tcg_src env+ let noParent gre = case greParent gre of NoParent -> True _ -> False -- Don't warn about unused bindings with parents in@@ -396,13 +396,7 @@ -- -- The `..` here doesn't bind any variables as `x` is already bound. warnRedundantRecordWildcard :: RnM ()-warnRedundantRecordWildcard =- whenWOptM Opt_WarnRedundantRecordWildcards $- let msg = mkTcRnUnknownMessage $- mkPlainDiagnostic (WarningWithFlag Opt_WarnRedundantRecordWildcards)- noHints- redundantWildcardWarning- in addDiagnostic msg+warnRedundantRecordWildcard = addDiagnostic TcRnRedundantRecordWildcard -- | Produce a warning when no variables bound by a `..` pattern are used.@@ -419,21 +413,19 @@ warnUnusedRecordWildcard ns used_names = do let used = filter (`elemNameSet` used_names) ns traceRn "warnUnused" (ppr ns $$ ppr used_names $$ ppr used)- warnIf (null used)- unusedRecordWildcardWarning+ warnIf (null used) (TcRnUnusedRecordWildcard ns) warnUnusedLocalBinds, warnUnusedMatches, warnUnusedTypePatterns :: [Name] -> FreeVars -> RnM ()-warnUnusedLocalBinds = check_unused Opt_WarnUnusedLocalBinds-warnUnusedMatches = check_unused Opt_WarnUnusedMatches-warnUnusedTypePatterns = check_unused Opt_WarnUnusedTypePatterns+warnUnusedLocalBinds = check_unused UnusedNameLocalBind+warnUnusedMatches = check_unused UnusedNameMatch+warnUnusedTypePatterns = check_unused UnusedNameTypePattern -check_unused :: WarningFlag -> [Name] -> FreeVars -> RnM ()-check_unused flag bound_names used_names- = whenWOptM flag (warnUnused flag (filterOut (`elemNameSet` used_names)- bound_names))+check_unused :: UnusedNameProv -> [Name] -> FreeVars -> RnM ()+check_unused prov bound_names used_names+ = warnUnused prov (filterOut (`elemNameSet` used_names) bound_names) warnForallIdentifier :: LocatedN RdrName -> RnM () warnForallIdentifier (L l rdr_name@(Unqual occ))@@ -448,75 +440,42 @@ warnUnusedGREs gres = mapM_ warnUnusedGRE gres -- NB the Names must not be the names of record fields!-warnUnused :: WarningFlag -> [Name] -> RnM ()-warnUnused flag names =- mapM_ (warnUnused1 flag . NormalGreName) names+warnUnused :: UnusedNameProv -> [Name] -> RnM ()+warnUnused prov names =+ mapM_ (\ nm -> warnUnused1 prov nm (nameOccName nm)) names -warnUnused1 :: WarningFlag -> GreName -> RnM ()-warnUnused1 flag child- = when (reportable child) $- addUnusedWarning flag- (occName child) (greNameSrcSpan child)- (text $ "Defined but not used" ++ opt_str)- where- opt_str = case flag of- Opt_WarnUnusedTypePatterns -> " on the right hand side"- _ -> ""+warnUnused1 :: UnusedNameProv -> Name -> OccName -> RnM ()+warnUnused1 prov child child_occ+ = when (reportable child child_occ) $+ warn_unused_name prov (nameSrcSpan child) child_occ +warn_unused_name :: UnusedNameProv -> SrcSpan -> OccName -> RnM ()+warn_unused_name prov span child_occ =+ addDiagnosticAt span (TcRnUnusedName child_occ prov)+ warnUnusedGRE :: GlobalRdrElt -> RnM () warnUnusedGRE gre@(GRE { gre_lcl = lcl, gre_imp = is })- | lcl = warnUnused1 Opt_WarnUnusedTopBinds (gre_name gre)- | otherwise = when (reportable (gre_name gre)) (mapM_ warn is)+ | lcl = warnUnused1 UnusedNameTopDecl nm occ+ | otherwise = when (reportable nm occ) (mapM_ warn is) where occ = greOccName gre- warn spec = addUnusedWarning Opt_WarnUnusedTopBinds occ span msg- where- span = importSpecLoc spec- pp_mod = quotes (ppr (importSpecModule spec))- msg = text "Imported from" <+> pp_mod <+> text "but not used"---- | Make a map from selector names to field labels and parent tycon--- names, to be used when reporting unused record fields.-mkFieldEnv :: GlobalRdrEnv -> NameEnv (FieldLabelString, Parent)-mkFieldEnv rdr_env = mkNameEnv [ (greMangledName gre, (flLabel fl, gre_par gre))- | gres <- nonDetOccEnvElts rdr_env- , gre <- gres- , Just fl <- [greFieldLabel gre]- ]+ nm = greName gre+ warn spec =+ warn_unused_name (UnusedNameImported (importSpecModule spec)) span occ+ where+ span = importSpecLoc spec -- | Should we report the fact that this 'Name' is unused? The -- 'OccName' may differ from 'nameOccName' due to -- DuplicateRecordFields.-reportable :: GreName -> Bool-reportable child- | NormalGreName name <- child- , isWiredInName name = False -- Don't report unused wired-in names- -- Otherwise we get a zillion warnings- -- from Data.Tuple- | otherwise = not (startsWithUnderscore (occName child))--addUnusedWarning :: WarningFlag -> OccName -> SrcSpan -> SDoc -> RnM ()-addUnusedWarning flag occ span msg = do- let diag = mkTcRnUnknownMessage $ mkPlainDiagnostic (WarningWithFlag flag) noHints $- sep [msg <> colon,- nest 2 $ pprNonVarNameSpace (occNameSpace occ)- <+> quotes (ppr occ)]- addDiagnosticAt span diag--unusedRecordWildcardWarning :: TcRnMessage-unusedRecordWildcardWarning =- mkTcRnUnknownMessage $ mkPlainDiagnostic (WarningWithFlag Opt_WarnUnusedRecordWildcards) noHints $- wildcardDoc $ text "No variables bound in the record wildcard match are used"--redundantWildcardWarning :: SDoc-redundantWildcardWarning =- wildcardDoc $ text "Record wildcard does not bind any new variables"--wildcardDoc :: SDoc -> SDoc-wildcardDoc herald =- herald- $$ nest 2 (text "Possible fix" <> colon <+> text "omit the"- <+> quotes (text ".."))+reportable :: Name -> OccName -> Bool+reportable child child_occ+ | isWiredInName child+ = False -- Don't report unused wired-in names+ -- Otherwise we get a zillion warnings+ -- from Data.Tuple+ | otherwise+ = not (startsWithUnderscore child_occ) {- Note [Skipping ambiguity errors at use sites of local declarations]@@ -555,45 +514,9 @@ -- already, and we don't want an error cascade. = return () | otherwise- = addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- (vcat [ text "Ambiguous occurrence" <+> quotes (ppr rdr_name)- , text "It could refer to"- , nest 3 (vcat (msg1 : msgs)) ])+ = do { gre_env <- getGlobalRdrEnv+ ; addErr $ mkNameClashErr gre_env rdr_name gres } where- np1 NE.:| nps = gres- msg1 = text "either" <+> ppr_gre np1- msgs = [text " or" <+> ppr_gre np | np <- nps]- ppr_gre gre = sep [ pp_greMangledName gre <> comma- , pprNameProvenance gre]-- -- When printing the name, take care to qualify it in the same- -- way as the provenance reported by pprNameProvenance, namely- -- the head of 'gre_imp'. Otherwise we get confusing reports like- -- Ambiguous occurrence ‘null’- -- It could refer to either ‘T15487a.null’,- -- imported from ‘Prelude’ at T15487.hs:1:8-13- -- or ...- -- See #15487- pp_greMangledName gre@(GRE { gre_name = child, gre_par = par- , gre_lcl = lcl, gre_imp = iss }) =- case child of- FieldGreName fl -> text "the field" <+> quotes (ppr fl) <+> parent_info- NormalGreName name -> quotes (pp_qual name <> dot <> ppr (nameOccName name))- where- parent_info = case par of- NoParent -> empty- ParentIs { par_is = par_name } -> text "of record" <+> quotes (ppr par_name)- pp_qual name- | lcl- = ppr (nameModule name)- | Just imp <- headMaybe iss -- This 'imp' is the one that- -- pprNameProvenance chooses- , ImpDeclSpec { is_as = mod } <- is_decl imp- = ppr mod- | otherwise- = pprPanic "addNameClassErrRn" (ppr gre $$ ppr iss)- -- Invariant: either 'lcl' is True or 'iss' is non-empty- -- If all the GREs are defined locally, can we skip reporting an ambiguity -- error at use sites, because it will have been reported already? See -- Note [Skipping ambiguity errors at use sites of local declarations]@@ -605,34 +528,23 @@ num_flds = length flds num_non_flds = length non_flds +mkNameClashErr :: GlobalRdrEnv -> RdrName -> NE.NonEmpty GlobalRdrElt -> TcRnMessage+mkNameClashErr gre_env rdr_name gres = TcRnAmbiguousName gre_env rdr_name gres -dupNamesErr :: Outputable n => (n -> SrcSpan) -> NE.NonEmpty n -> RnM ()-dupNamesErr get_loc names- = addErrAt big_loc $ mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [text "Conflicting definitions for" <+> quotes (ppr (NE.head names)),- locations]+dupNamesErr :: NE.NonEmpty SrcSpan -> NE.NonEmpty RdrName -> RnM ()+dupNamesErr locs names+ = addErrAt big_loc (TcRnBindingNameConflict (NE.head names) locs) where- locs = map get_loc (NE.toList names)- big_loc = foldr1 combineSrcSpans locs- locations = text "Bound at:" <+> vcat (map ppr (sortBy SrcLoc.leftmost_smallest locs))+ big_loc = foldr1 combineSrcSpans locs badQualBndrErr :: RdrName -> TcRnMessage-badQualBndrErr rdr_name- = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Qualified name in binding position:" <+> ppr rdr_name+badQualBndrErr rdr_name = TcRnQualifiedBinder rdr_name -typeAppErr :: String -> LHsType GhcPs -> TcRnMessage-typeAppErr what (L _ k)- = mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Illegal visible" <+> text what <+> text "application"- <+> quotes (char '@' <> ppr k))- 2 (text "Perhaps you intended to use TypeApplications")+typeAppErr :: TypeOrKind -> LHsType GhcPs -> TcRnMessage+typeAppErr what (L _ k) = TcRnTypeApplicationsDisabled (TypeApplication k what) badFieldConErr :: Name -> FieldLabelString -> TcRnMessage-badFieldConErr con field- = mkTcRnUnknownMessage $ mkPlainError noHints $- hsep [text "Constructor" <+> quotes (ppr con),- text "does not have field", quotes (ppr field)]+badFieldConErr con field = TcRnInvalidRecordField con field -- | Ensure that a boxed or unboxed tuple has arity no larger than -- 'mAX_TUPLE_SIZE'.@@ -641,10 +553,7 @@ | tup_size <= mAX_TUPLE_SIZE = return () | otherwise- = addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- sep [text "A" <+> int tup_size <> text "-tuple is too large for GHC",- nest 2 (parens (text "max size is" <+> int mAX_TUPLE_SIZE)),- nest 2 (text "Workaround: use nested tuples or define a data type")]+ = addErr (TcRnTupleTooLarge tup_size) -- | Ensure that a constraint tuple has arity no larger than 'mAX_CTUPLE_SIZE'. checkCTupSize :: Int -> TcM ()@@ -652,10 +561,7 @@ | tup_size <= mAX_CTUPLE_SIZE = return () | otherwise- = addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Constraint tuple arity too large:" <+> int tup_size- <+> parens (text "max arity =" <+> int mAX_CTUPLE_SIZE))- 2 (text "Instead, use a nested tuple")+ = addErr (TcRnCTupleTooLarge tup_size) {- ********************************************************************* * *@@ -675,6 +581,9 @@ genHsApp :: HsExpr GhcRn -> LHsExpr GhcRn -> HsExpr GhcRn genHsApp fun arg = HsApp noAnn (wrapGenSpan fun) arg +genLHsApp :: HsExpr GhcRn -> LHsExpr GhcRn -> LHsExpr GhcRn+genLHsApp fun arg = wrapGenSpan (genHsApp fun arg)+ genLHsVar :: Name -> LHsExpr GhcRn genLHsVar nm = wrapGenSpan $ genHsVar nm @@ -684,8 +593,11 @@ genAppType :: HsExpr GhcRn -> HsType (NoGhcTc GhcRn) -> HsExpr GhcRn genAppType expr ty = HsAppType noExtField (wrapGenSpan expr) noHsTok (mkEmptyWildCardBndrs (wrapGenSpan ty)) +genLHsLit :: HsLit GhcRn -> LocatedAn an (HsExpr GhcRn)+genLHsLit = wrapGenSpan . HsLit noAnn+ genHsIntegralLit :: IntegralLit -> LocatedAn an (HsExpr GhcRn)-genHsIntegralLit lit = wrapGenSpan $ HsLit noAnn (HsInt noExtField lit)+genHsIntegralLit = genLHsLit . HsInt noExtField genHsTyLit :: FastString -> HsType GhcRn genHsTyLit = HsTyLit noExtField . HsStrTy NoSourceText@@ -716,6 +628,11 @@ -> HsBind GhcRn genFunBind fn ms = FunBind { fun_id = fn- , fun_matches = mkMatchGroup Generated (wrapGenSpan ms)+ , fun_matches = mkMatchGroup (Generated SkipPmc) (wrapGenSpan ms) , fun_ext = emptyNameSet }++isIrrefutableHsPatRn :: forall p. (OutputableBndrId p)+ => DynFlags -> LPat (GhcPass p) -> Bool+isIrrefutableHsPatRn dflags =+ isIrrefutableHsPat (xopt LangExt.Strict dflags)
GHC/Runtime/Context.hs view
@@ -8,6 +8,7 @@ , substInteractiveContext , replaceImportEnv , icReaderEnv+ , icExtendGblRdrEnv , icInteractiveModule , icInScopeTTs , icNamePprCtx@@ -18,7 +19,7 @@ import GHC.Hs -import GHC.Driver.Session+import GHC.Driver.DynFlags import {-# SOURCE #-} GHC.Driver.Plugins import GHC.Runtime.Eval.Types ( IcGlobalRdrEnv(..), Resume )@@ -30,7 +31,6 @@ import GHC.Core.InstEnv import GHC.Core.Type -import GHC.Types.Avail import GHC.Types.Fixity.Env import GHC.Types.Id.Info ( IdDetails(..) ) import GHC.Types.Name@@ -94,7 +94,7 @@ call to initTc in initTcInteractive, which in turn get the module from it 'icInteractiveModule' field of the interactive context. - The 'homeUnitId' field stays as 'main' (or whatever -this-unit-id says.+ The 'homeUnitId' field stays as 'main' (or whatever -this-unit-id says). * The main trickiness is that the type environment (tcg_type_env) and fixity envt (tcg_fix_env), now contain entities from all the@@ -185,10 +185,13 @@ Note [icReaderEnv recalculation] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The GlobalRdrEnv describing what’s in scope at the prompts consists-of all the imported things, followed by all the things defined on the prompt, with-shadowing. Defining new things on the prompt is easy: we shadow as needed and then extend the environment. But changing the set of imports, which can happen later as well,-is tricky: we need to re-apply the shadowing from all the things defined at the prompt!+of all the imported things, followed by all the things defined on the prompt,+with shadowing. Defining new things on the prompt is easy: we shadow as needed,+and then extend the environment. +But changing the set of imports, which can happen later as well, is tricky+we need to re-apply the shadowing from all the things defined at the prompt!+ For example: ghci> let empty = True@@ -196,22 +199,21 @@ ghci> empty -- Still gets the 'empty' defined at the prompt True --It would be correct ot re-construct the env from scratch based on+It would be correct to re-construct the env from scratch based on `ic_tythings`, but that'd be quite expensive if there are many entries in `ic_tythings` that shadow each other. -Therefore we keep around a that `GlobalRdrEnv` in `igre_prompt_env` that-contians _just_ the things defined at the prompt, and use that in-`replaceImportEnv` to rebuild the full env. Conveniently, `shadowNames` takes-such an `OccEnv` to denote the set of names to shadow.+Therefore we keep around a `GlobalRdrEnv` in `igre_prompt_env` that contains+_just_ the things defined at the prompt, and use that in `replaceImportEnv` to+rebuild the full env. Conveniently, `shadowNames` takes such an `OccEnv`+to denote the set of names to shadow. INVARIANT: Every `OccName` in `igre_prompt_env` is present unqualified as well-(else it would not be right to use pass `igre_prompt_env` to `shadowNames`.)+(else it would not be right to pass `igre_prompt_env` to `shadowNames`.) -The definition of the IcGlobalRdrEnv type should conceptually be in this module, and-made abstract, but it’s used in `Resume`, so it lives in GHC.Runtime.Eval.Type.--+The definition of the IcGlobalRdrEnv type should conceptually be in this module,+and made abstract, but it’s used in `Resume`, so it lives in GHC.Runtime.Eval.Type.+ -} -- | Interactive context, recording information about the state of the@@ -328,7 +330,7 @@ icInteractiveModule :: InteractiveContext -> Module icInteractiveModule (InteractiveContext { ic_mod_index = index })- = mkInteractiveModule index+ = mkInteractiveModule (show index) -- | This function returns the list of visible TyThings (useful for -- e.g. showBindings).@@ -343,12 +345,11 @@ where in_scope_unqualified thing = or [ unQualOK gre- | avail <- tyThingAvailInfo thing- , name <- availNames avail+ | gre <- tyThingLocalGREs thing+ , let name = greName gre , Just gre <- [lookupGRE_Name (icReaderEnv ictxt) name] ] - -- | Get the NamePprCtx function based on the flags and this InteractiveContext icNamePprCtx :: UnitEnv -> InteractiveContext -> NamePprCtx icNamePprCtx unit_env ictxt = mkNamePprCtx ptc unit_env (icReaderEnv ictxt)@@ -400,8 +401,11 @@ icExtendIcGblRdrEnv :: IcGlobalRdrEnv -> [TyThing] -> IcGlobalRdrEnv icExtendIcGblRdrEnv igre tythings = IcGlobalRdrEnv- { igre_env = igre_env igre `icExtendGblRdrEnv` tythings- , igre_prompt_env = igre_prompt_env igre `icExtendGblRdrEnv` tythings+ { igre_env = icExtendGblRdrEnv False (igre_env igre) tythings+ , igre_prompt_env = icExtendGblRdrEnv True (igre_prompt_env igre) tythings+ -- Pass 'True' <=> drop names that are only available qualified.+ -- This is done to maintain the invariant of Note [icReaderEnv recalculation]+ -- that igre_prompt_env should only contain Names that are available unqualified. } -- This is used by setContext in GHC.Runtime.Eval when the set of imports@@ -409,13 +413,14 @@ replaceImportEnv :: IcGlobalRdrEnv -> GlobalRdrEnv -> IcGlobalRdrEnv replaceImportEnv igre import_env = igre { igre_env = new_env } where- import_env_shadowed = import_env `shadowNames` igre_prompt_env igre+ import_env_shadowed = shadowNames False import_env (igre_prompt_env igre) new_env = import_env_shadowed `plusGlobalRdrEnv` igre_prompt_env igre --- | Add TyThings to the GlobalRdrEnv, earlier ones in the list shadowing--- later ones, and shadowing existing entries in the GlobalRdrEnv.-icExtendGblRdrEnv :: GlobalRdrEnv -> [TyThing] -> GlobalRdrEnv-icExtendGblRdrEnv env tythings+-- | Add 'TyThings' to the 'GlobalRdrEnv', earlier ones in the list shadowing+-- later ones, and shadowing existing entries in the 'GlobalRdrEnv'.+icExtendGblRdrEnv :: Bool -- ^ discard names that are only available qualified?+ -> GlobalRdrEnv -> [TyThing] -> GlobalRdrEnv+icExtendGblRdrEnv drop_only_qualified env tythings = foldr add env tythings -- Foldr makes things in the front of -- the list shadow things at the back where@@ -424,12 +429,10 @@ | is_sub_bndr thing = env | otherwise- = foldl' extendGlobalRdrEnv env1 (concatMap localGREsFromAvail avail)+ = foldl' extendGlobalRdrEnv env1 new_gres where- new_gres = concatMap availGreNames avail- new_occs = occSetToEnv (mkOccSet (map occName new_gres))- env1 = shadowNames env new_occs- avail = tyThingAvailInfo thing+ new_gres = tyThingLocalGREs thing+ env1 = shadowNames drop_only_qualified env $ mkGlobalRdrEnv new_gres -- Ugh! The new_tythings may include record selectors, since they -- are not implicit-ids, and must appear in the TypeEnv. But they
GHC/Runtime/Debugger.hs view
@@ -16,7 +16,7 @@ import GHC -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Ppr import GHC.Driver.Monad import GHC.Driver.Env
GHC/Runtime/Eval.hs view
@@ -50,7 +50,7 @@ import GHC.Driver.Main import GHC.Driver.Errors.Types ( hoistTcRnMessage ) import GHC.Driver.Env-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Ppr import GHC.Driver.Config @@ -66,12 +66,13 @@ import GHC.Hs -import GHC.Core.Predicate-import GHC.Core.InstEnv+import GHC.Core.Class (classTyCon) import GHC.Core.FamInstEnv ( FamInst, orphNamesOfFamInst )+import GHC.Core.InstEnv+import GHC.Core.Predicate+import GHC.Core.TyCo.Ppr import GHC.Core.TyCon import GHC.Core.Type hiding( typeKind )-import GHC.Core.TyCo.Ppr import qualified GHC.Core.Type as Type import GHC.Iface.Env ( newInteractiveBinder )@@ -85,12 +86,13 @@ import GHC.Data.FastString import GHC.Data.Bag -import GHC.Utils.Monad-import GHC.Utils.Panic import GHC.Utils.Error-import GHC.Utils.Outputable-import GHC.Utils.Misc+import GHC.Utils.Exception import GHC.Utils.Logger+import GHC.Utils.Misc+import GHC.Utils.Monad+import GHC.Utils.Outputable+import GHC.Utils.Panic import GHC.Types.RepType import GHC.Types.Fixity.Env@@ -114,29 +116,28 @@ import GHC.Unit.Module.ModSummary import GHC.Unit.Home.ModInfo -import System.Directory+import GHC.Tc.Module ( runTcInteractive, tcRnType, loadUnqualIfaces )+import GHC.Tc.Solver (simplifyWantedsTcM)+import GHC.Tc.Utils.Env (tcGetInstEnvs, lookupGlobal)+import GHC.Tc.Utils.Instantiate (instDFunType)+import GHC.Tc.Utils.Monad+import GHC.Tc.Zonk.Env ( ZonkFlexi (SkolemiseFlexi) )++import GHC.Unit.Env+import GHC.IfaceToCore++import Control.Monad+import Control.Monad.Catch as MC+import Data.Array import Data.Dynamic import Data.Either import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.List (find,intercalate) import Data.List.NonEmpty (NonEmpty)-import Control.Monad-import Control.Monad.Catch as MC-import Data.Array-import GHC.Utils.Exception+import System.Directory import Unsafe.Coerce ( unsafeCoerce ) -import GHC.Tc.Module ( runTcInteractive, tcRnType, loadUnqualIfaces )-import GHC.Tc.Utils.Zonk ( ZonkFlexi (SkolemiseFlexi) )-import GHC.Tc.Utils.Env (tcGetInstEnvs)-import GHC.Tc.Utils.Instantiate (instDFunType)-import GHC.Tc.Solver (simplifyWantedsTcM)-import GHC.Tc.Utils.Monad-import GHC.Core.Class (classTyCon)-import GHC.Unit.Env-import GHC.IfaceToCore- -- ----------------------------------------------------------------------------- -- running a statement interactively @@ -324,14 +325,15 @@ | otherwise = not_tracing where tracing- | EvalBreak is_exception apStack_ref ix mod_name resume_ctxt _ccs <- status+ | EvalBreak is_exception apStack_ref ix mod_uniq resume_ctxt _ccs <- status , not is_exception = do hsc_env <- getSession let interp = hscInterp hsc_env let dflags = hsc_dflags hsc_env let hmi = expectJust "handleRunStatus" $- lookupHpt (hsc_HPT hsc_env) (mkModuleName mod_name)+ lookupHptDirectly (hsc_HPT hsc_env)+ (mkUniqueGrimily mod_uniq) modl = mi_module (hm_iface hmi) breaks = getModBreaks hmi @@ -356,14 +358,15 @@ not_tracing -- Hit a breakpoint- | EvalBreak is_exception apStack_ref ix mod_name resume_ctxt ccs <- status+ | EvalBreak is_exception apStack_ref ix mod_uniq resume_ctxt ccs <- status = do hsc_env <- getSession let interp = hscInterp hsc_env resume_ctxt_fhv <- liftIO $ mkFinalizedHValue interp resume_ctxt apStack_fhv <- liftIO $ mkFinalizedHValue interp apStack_ref let hmi = expectJust "handleRunStatus" $- lookupHpt (hsc_HPT hsc_env) (mkModuleName mod_name)+ lookupHptDirectly (hsc_HPT hsc_env)+ (mkUniqueGrimily mod_uniq) modl = mi_module (hm_iface hmi) bp | is_exception = Nothing | otherwise = Just (BreakInfo modl ix)@@ -817,8 +820,14 @@ = do { idecls_env <- hscRnImportDecls hsc_env idecls -- This call also loads any orphan modules ; return $ case partitionEithers (map mkEnv imods) of- ([], imods_env) -> Right (foldr plusGlobalRdrEnv idecls_env imods_env)- (err : _, _) -> Left err }+ (err : _, _) -> Left err+ ([], imods_env0) ->+ -- Need to rehydrate the 'GlobalRdrEnv' to recover the 'GREInfo's.+ -- This is done in order to avoid space leaks.+ -- See Note [Forcing GREInfo] in GHC.Types.GREInfo.+ let imods_env = map (hydrateGlobalRdrEnv get_GRE_info) imods_env0+ in Right (foldr plusGlobalRdrEnv idecls_env imods_env)+ } where idecls :: [LImportDecl GhcPs] idecls = [noLocA d | IIDecl d <- imports]@@ -830,7 +839,9 @@ Left err -> Left (mod, err) Right env -> Right env -mkTopLevEnv :: HomePackageTable -> ModuleName -> Either String GlobalRdrEnv+ get_GRE_info nm = tyThingGREInfo <$> lookupGlobal hsc_env nm++mkTopLevEnv :: HomePackageTable -> ModuleName -> Either String IfGlobalRdrEnv mkTopLevEnv hpt modl = case lookupHpt hpt modl of Nothing -> Left "not a home module"@@ -838,6 +849,9 @@ case mi_globals (hm_iface details) of Nothing -> Left "not interpreted" Just env -> Right env+ -- It's OK to be lazy here; we force the GlobalRdrEnv before storing it+ -- in ModInfo; see GHCi.UI.Info.+ -- See Note [Forcing GREInfo] in GHC.Types.GREInfo. -- | Get the interactive evaluation context, consisting of a pair of the -- set of modules from which we take the full top-level scope, and the set@@ -893,7 +907,7 @@ -- | Returns all names in scope in the current interactive context getNamesInScope :: GhcMonad m => m [Name] getNamesInScope = withSession $ \hsc_env ->- return (map greMangledName (globalRdrEnvElts (icReaderEnv (hsc_IC hsc_env))))+ return $ map greName $ globalRdrEnvElts (icReaderEnv (hsc_IC hsc_env)) -- | Returns all 'RdrName's in scope in the current interactive -- context, excluding any that are internally-generated.
GHC/Runtime/Heap/Inspect.hs view
@@ -41,9 +41,10 @@ import GHC.Tc.Utils.Monad import GHC.Tc.Utils.TcType import GHC.Tc.Utils.TcMType-import GHC.Tc.Utils.Zonk ( zonkTcTypeToTypeX, mkEmptyZonkEnv, ZonkFlexi( RuntimeUnkFlexi ) )+import GHC.Tc.Zonk.Type import GHC.Tc.Utils.Unify import GHC.Tc.Utils.Env+import GHC.Tc.Zonk.TcType import GHC.Types.Var import GHC.Types.Name@@ -55,7 +56,7 @@ import GHC.Types.Basic ( Boxity(..) ) import GHC.Builtin.Types.Prim import GHC.Builtin.Types-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Ppr import GHC.Utils.Outputable as Ppr import GHC.Utils.Panic@@ -478,22 +479,6 @@ | t == int64PrimTyCon = text $ show (build x :: Int64) | t == word64PrimTyCon = text $ show (build x :: Word64) | t == addrPrimTyCon = text $ show (nullPtr `plusPtr` build x)- | t == stablePtrPrimTyCon = text "<stablePtr>"- | t == stableNamePrimTyCon = text "<stableName>"- | t == statePrimTyCon = text "<statethread>"- | t == proxyPrimTyCon = text "<proxy>"- | t == realWorldTyCon = text "<realworld>"- | t == threadIdPrimTyCon = text "<ThreadId>"- | t == weakPrimTyCon = text "<Weak>"- | t == arrayPrimTyCon = text "<array>"- | t == smallArrayPrimTyCon = text "<smallArray>"- | t == byteArrayPrimTyCon = text "<bytearray>"- | t == mutableArrayPrimTyCon = text "<mutableArray>"- | t == smallMutableArrayPrimTyCon = text "<smallMutableArray>"- | t == mutableByteArrayPrimTyCon = text "<mutableByteArray>"- | t == mutVarPrimTyCon = text "<mutVar>"- | t == mVarPrimTyCon = text "<mVar>"- | t == tVarPrimTyCon = text "<tVar>" | otherwise = char '<' <> ppr t <> char '>' where build ww = unsafePerformIO $ withArray ww (peek . castPtr) -- This ^^^ relies on the representation of Haskell heap values being@@ -672,7 +657,7 @@ -- Apply the *reverse* substitution in-place to any un-filled-in -- meta tyvars. This recovers the original debugger-world variable -- unless it has been refined by new information from the heap-applyRevSubst pairs = liftTcM (mapM_ do_pair pairs)+applyRevSubst pairs = liftTcM (liftZonkM $ mapM_ do_pair pairs) where do_pair (tc_tv, rtti_tv) = do { tc_ty <- zonkTcTyVar tc_tv@@ -735,7 +720,7 @@ when (check1 old_tvs) (traceTR (text "check1 passed") >> addConstraint my_ty old_ty') term <- go max_depth my_ty old_ty hval- new_ty <- zonkTcType (termType term)+ new_ty <- liftTcM $ liftZonkM $ zonkTcType (termType term) if isMonomorphic new_ty || check2 new_ty old_ty then do traceTR (text "check2 passed")@@ -905,12 +890,12 @@ return (ptr_i, arr_i, unboxedTupleTerm ty terms0 : terms1) | otherwise = case typePrimRepArgs ty of- [rep_ty] -> do+ rep_ty :| [] -> do (ptr_i, arr_i, term0) <- go_rep ptr_i arr_i ty rep_ty (ptr_i, arr_i, terms1) <- go ptr_i arr_i tys return (ptr_i, arr_i, term0 : terms1)- rep_tys -> do- (ptr_i, arr_i, terms0) <- go_unary_types ptr_i arr_i rep_tys+ rep_ty :| rep_tys -> do+ (ptr_i, arr_i, terms0) <- go_unary_types ptr_i arr_i (rep_ty:rep_tys) (ptr_i, arr_i, terms1) <- go ptr_i arr_i tys return (ptr_i, arr_i, unboxedTupleTerm ty terms0 : terms1) @@ -1012,11 +997,11 @@ my_ty <- newOpenVar when (check1 old_tvs) (traceTR (text "check1 passed") >> addConstraint my_ty old_ty')- search (isMonomorphic `fmap` zonkTcType my_ty)+ search (isMonomorphic `fmap` liftZonkM (zonkTcType my_ty)) (\(ty,a) -> go ty a) (Seq.singleton (my_ty, hval)) max_depth- new_ty <- zonkTcType my_ty+ new_ty <- liftZonkM $ zonkTcType my_ty if isMonomorphic new_ty || check2 new_ty old_ty then do traceTR (text "check2 passed" <+> ppr old_ty $$ ppr new_ty)@@ -1397,8 +1382,8 @@ zonkRttiType :: TcType -> TcM Type -- Zonk the type, replacing any unbound Meta tyvars -- by RuntimeUnk skolems, safely out of Meta-tyvar-land-zonkRttiType ty= do { ze <- mkEmptyZonkEnv RuntimeUnkFlexi- ; zonkTcTypeToTypeX ze ty }+zonkRttiType ty+ = initZonkEnv RuntimeUnkFlexi $ zonkTcTypeToTypeX ty -------------------------------------------------------------------------------- -- Restore Class predicates out of a representation type
GHC/Runtime/Heap/Layout.hs view
@@ -175,7 +175,7 @@ | RTSRep -- The RTS needs to declare info tables with specific Int -- type tags, so this form lets us override the default SMRep -- tag for an SMRep.- deriving (Eq, Ord)+ deriving Eq -- | True \<=> This is a static closure. Affects how we garbage-collect it. -- Static closure have an extra static link field at the end.@@ -193,7 +193,7 @@ | ThunkSelector SelectorOffset | BlackHole | IndStatic- deriving (Eq, Ord)+ deriving Eq type ConstrDescription = ByteString -- result of dataConIdentity type FunArity = Int@@ -223,7 +223,7 @@ | ArgUnknown -- For imported binds. -- Invariant: Never Unknown for binds of the module -- we are compiling.- deriving (Eq, Ord)+ deriving (Eq) instance Outputable ArgDescr where ppr (ArgSpec n) = text "ArgSpec" <+> ppr n
GHC/Runtime/Interpreter.hs view
@@ -3,6 +3,8 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE RankNTypes #-} -- | Interacting with the iserv interpreter, whether it is running on an -- external process or in the current process.@@ -11,7 +13,6 @@ ( module GHC.Runtime.Interpreter.Types -- * High-level interface to the interpreter- , BCOOpts (..) , evalStmt, EvalStatus_(..), EvalStatus, EvalResult(..), EvalExpr(..) , resumeStmt , abandonStmt@@ -24,7 +25,6 @@ , mkCostCentres , costCentreStackInfo , newBreakArray- , newModuleName , storeBreakpoint , breakpointStatus , getBreakpointVar@@ -47,22 +47,30 @@ , resolveObjs , findSystemLibrary - -- * Lower-level API using messages- , interpCmd, Message(..), withIServ, withIServ_+ , interpCmd+ , withExtInterp+ , withExtInterpStatus+ , withIServ+ , withJSInterp , stopInterp- , iservCall, readIServ, writeIServ , purgeLookupSymbolCache+ , freeReallyRemoteRef , freeHValueRefs , mkFinalizedHValue , wormhole, wormholeRef , fromEvalResult++ -- * Reexport for convenience+ , Message (..)+ , module GHC.Runtime.Interpreter.Process ) where import GHC.Prelude -import GHC.IO (catchException)- import GHC.Runtime.Interpreter.Types+import GHC.Runtime.Interpreter.JS+import GHC.Runtime.Interpreter.Process+import GHC.Runtime.Utils import GHCi.Message import GHCi.RemoteTypes import GHCi.ResolvedBCO@@ -75,6 +83,7 @@ import GHC.Data.Maybe import GHC.Data.FastString +import GHC.Types.Unique import GHC.Types.SrcLoc import GHC.Types.Unique.FM import GHC.Types.Basic@@ -98,7 +107,7 @@ import Control.Concurrent import Control.Monad import Control.Monad.IO.Class-import Control.Monad.Catch as MC (mask, onException)+import Control.Monad.Catch as MC (mask) import Data.Binary import Data.Binary.Put import Data.ByteString (ByteString)@@ -108,19 +117,6 @@ import Foreign hiding (void) import qualified GHC.Exts.Heap as Heap import GHC.Stack.CCS (CostCentre,CostCentreStack)-import System.Exit-import GHC.IO.Handle.Types (Handle)-#if defined(mingw32_HOST_OS)-import Foreign.C-import GHC.IO.Handle.FD (fdToHandle)-# if defined(__IO_MANAGER_WINIO__)-import GHC.IO.SubSystem ((<!>))-import GHC.IO.Handle.Windows (handleToHANDLE)-import GHC.Event.Windows (associateHandle')-# endif-#else-import System.Posix as Posix-#endif import System.Directory import System.Process import GHC.Conc (pseq, par)@@ -199,11 +195,21 @@ #if defined(HAVE_INTERNAL_INTERPRETER) InternalInterp -> run msg -- Just run it directly #endif- ExternalInterp c i -> withIServ_ c i $ \iserv ->+ ExternalInterp ext -> withExtInterp ext $ \inst -> uninterruptibleMask_ $ -- Note [uninterruptibleMask_ and interpCmd]- iservCall iserv msg+ sendMessage inst msg +withExtInterp :: ExceptionMonad m => ExtInterp -> (forall d. ExtInterpInstance d -> m a) -> m a+withExtInterp ext action = case ext of+ ExtJS i -> withJSInterp i action+ ExtIServ i -> withIServ i action++withExtInterpStatus :: ExtInterp -> (forall d. ExtInterpStatusVar d -> m a) -> m a+withExtInterpStatus ext action = case ext of+ ExtJS i -> action (interpStatus i)+ ExtIServ i -> action (interpStatus i)+ -- Note [uninterruptibleMask_ and interpCmd] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- If we receive an async exception, such as ^C, while communicating@@ -217,37 +223,51 @@ -- Overloaded because this is used from TcM as well as IO. withIServ :: (ExceptionMonad m)- => IServConfig -> IServ -> (IServInstance -> m (IServInstance, a)) -> m a-withIServ conf (IServ mIServState) action =- MC.mask $ \restore -> do- state <- liftIO $ takeMVar mIServState+ => IServ -> (ExtInterpInstance () -> m a) -> m a+withIServ (ExtInterpState cfg mstate) action = do+ inst <- spawnInterpMaybe cfg spawnIServ mstate+ action inst - iserv <- case state of- -- start the external iserv process if we haven't done so yet- IServPending ->- liftIO (spawnIServ conf)- `MC.onException` (liftIO $ putMVar mIServState state)+-- | Spawn JS interpreter if it isn't already running and execute the given action+--+-- Update the interpreter state.+withJSInterp :: ExceptionMonad m => JSInterp -> (ExtInterpInstance JSInterpExtra -> m a) -> m a+withJSInterp (ExtInterpState cfg mstate) action = do+ inst <- spawnInterpMaybe cfg spawnJSInterp mstate+ action inst - IServRunning inst -> return inst+-- | Spawn an interpreter if not already running according to the status in the+-- MVar. Update the status, free pending heap references, and return the+-- interpreter instance.+--+-- This function is generic to support both the native external interpreter and+-- the JS one.+spawnInterpMaybe :: ExceptionMonad m => cfg -> (cfg -> IO (ExtInterpInstance d)) -> ExtInterpStatusVar d -> m (ExtInterpInstance d)+spawnInterpMaybe cfg spawn mstatus = do+ inst <- liftIO $ modifyMVarMasked mstatus $ \case+ -- start the external iserv process if we haven't done so yet+ InterpPending -> do+ inst <- spawn cfg+ pure (InterpRunning inst, inst) + InterpRunning inst -> do+ pure (InterpRunning inst, inst) - let iserv' = iserv{ iservPendingFrees = [] }+ -- free any ForeignRef that have been garbage collected.+ pending_frees <- liftIO $ swapMVar (instPendingFrees inst) []+ liftIO $ when (not (null (pending_frees))) $+ sendMessage inst (FreeHValueRefs pending_frees) - (iserv'',a) <- (do- -- free any ForeignHValues that have been garbage collected.- liftIO $ when (not (null (iservPendingFrees iserv))) $- iservCall iserv (FreeHValueRefs (iservPendingFrees iserv))- -- run the inner action- restore $ action iserv')- `MC.onException` (liftIO $ putMVar mIServState (IServRunning iserv'))- liftIO $ putMVar mIServState (IServRunning iserv'')- return a+ -- run the inner action+ pure inst -withIServ_- :: (MonadIO m, ExceptionMonad m)- => IServConfig -> IServ -> (IServInstance -> m a) -> m a-withIServ_ conf iserv action = withIServ conf iserv $ \inst ->- (inst,) <$> action inst+withExtInterpMaybe+ :: (ExceptionMonad m)+ => ExtInterp -> (forall d. Maybe (ExtInterpInstance d) -> m a) -> m a+withExtInterpMaybe ext action = withExtInterpStatus ext $ \mstate -> do+ liftIO (readMVar mstate) >>= \case+ InterpPending {} -> action Nothing -- already shut down or never launched+ InterpRunning inst -> action (Just inst) -- ----------------------------------------------------------------------------- -- Wrappers around messages@@ -329,26 +349,11 @@ mkCostCentres interp mod ccs = interpCmd interp (MkCostCentres mod ccs) -newtype BCOOpts = BCOOpts- { bco_n_jobs :: Int -- ^ Number of parallel jobs doing BCO serialization- }- -- | Create a set of BCOs that may be mutually recursive.-createBCOs :: Interp -> BCOOpts -> [ResolvedBCO] -> IO [HValueRef]-createBCOs interp opts rbcos = do- let n_jobs = bco_n_jobs opts- -- Serializing ResolvedBCO is expensive, so if we support doing it in parallel- if (n_jobs == 1)- then- interpCmd interp (CreateBCOs [runPut (put rbcos)])- else do- old_caps <- getNumCapabilities- if old_caps == n_jobs- then void $ evaluate puts- else bracket_ (setNumCapabilities n_jobs)- (setNumCapabilities old_caps)- (void $ evaluate puts)- interpCmd interp (CreateBCOs puts)+createBCOs :: Interp -> [ResolvedBCO] -> IO [HValueRef]+createBCOs interp rbcos = do+ -- Serializing ResolvedBCO is expensive, so we do it in parallel+ interpCmd interp (CreateBCOs puts) where puts = parMap doChunk (chunkList 100 rbcos) @@ -375,10 +380,6 @@ breakArray <- interpCmd interp (NewBreakArray size) mkFinalizedHValue interp breakArray -newModuleName :: Interp -> ModuleName -> IO (RemotePtr ModuleName)-newModuleName interp mod_name =- castRemotePtr <$> interpCmd interp (NewBreakModule (moduleNameString mod_name))- storeBreakpoint :: Interp -> ForeignRef BreakArray -> Int -> Int -> IO () storeBreakpoint interp ref ix cnt = do -- #19157 withForeignRef ref $ \breakarray ->@@ -412,12 +413,13 @@ handleSeqHValueStatus :: Interp -> UnitEnv -> EvalStatus () -> IO (EvalResult ()) handleSeqHValueStatus interp unit_env eval_status = case eval_status of- (EvalBreak is_exception _ ix mod_name resume_ctxt _) -> do+ (EvalBreak is_exception _ ix mod_uniq resume_ctxt _) -> do -- A breakpoint was hit; inform the user and tell them -- which breakpoint was hit. resume_ctxt_fhv <- liftIO $ mkFinalizedHValue interp resume_ctxt let hmi = expectJust "handleRunStatus" $- lookupHpt (ue_hpt unit_env) (mkModuleName mod_name)+ lookupHptDirectly (ue_hpt unit_env)+ (mkUniqueGrimily mod_uniq) modl = mi_module (hm_iface hmi) bp | is_exception = Nothing | otherwise = Just (BreakInfo modl ix)@@ -454,25 +456,28 @@ InternalInterp -> fmap fromRemotePtr <$> run (LookupSymbol (unpackFS str)) #endif - ExternalInterp c i -> withIServ c i $ \iserv -> do- -- Profiling of GHCi showed a lot of time and allocation spent- -- making cross-process LookupSymbol calls, so I added a GHC-side- -- cache which sped things up quite a lot. We have to be careful- -- to purge this cache when unloading code though.- let cache = iservLookupSymbolCache iserv- case lookupUFM cache str of- Just p -> return (iserv, Just p)- Nothing -> do- m <- uninterruptibleMask_ $- iservCall iserv (LookupSymbol (unpackFS str))- case m of- Nothing -> return (iserv, Nothing)- Just r -> do- let p = fromRemotePtr r- cache' = addToUFM cache str p- iserv' = iserv {iservLookupSymbolCache = cache'}- return (iserv', Just p)+ ExternalInterp ext -> case ext of+ ExtIServ i -> withIServ i $ \inst -> do+ -- Profiling of GHCi showed a lot of time and allocation spent+ -- making cross-process LookupSymbol calls, so I added a GHC-side+ -- cache which sped things up quite a lot. We have to be careful+ -- to purge this cache when unloading code though.+ cache <- readMVar (instLookupSymbolCache inst)+ case lookupUFM cache str of+ Just p -> return (Just p)+ Nothing -> do+ m <- uninterruptibleMask_ $+ sendMessage inst (LookupSymbol (unpackFS str))+ case m of+ Nothing -> return Nothing+ Just r -> do+ let p = fromRemotePtr r+ cache' = addToUFM cache str p+ modifyMVar_ (instLookupSymbolCache inst) (const (pure cache'))+ return (Just p) + ExtJS {} -> pprPanic "lookupSymbol not supported by the JS interpreter" (ppr str)+ lookupClosure :: Interp -> String -> IO (Maybe HValueRef) lookupClosure interp str = interpCmd interp (LookupClosure str)@@ -482,12 +487,9 @@ #if defined(HAVE_INTERNAL_INTERPRETER) InternalInterp -> pure () #endif- ExternalInterp _ (IServ mstate) ->- modifyMVar_ mstate $ \state -> pure $ case state of- IServPending -> state- IServRunning iserv -> IServRunning- (iserv { iservLookupSymbolCache = emptyUFM })-+ ExternalInterp ext -> withExtInterpMaybe ext $ \case+ Nothing -> pure () -- interpreter stopped, nothing to do+ Just inst -> modifyMVar_ (instLookupSymbolCache inst) (const (pure emptyUFM)) -- | loadDLL loads a dynamic library using the OS's native linker -- (i.e. dlopen() on Unix, LoadLibrary() on Windows). It takes either@@ -537,133 +539,52 @@ findSystemLibrary :: Interp -> String -> IO (Maybe String) findSystemLibrary interp str = interpCmd interp (FindSystemLibrary str) - -- -------------------------------------------------------------------------------- Raw calls and messages---- | Send a 'Message' and receive the response from the iserv process-iservCall :: Binary a => IServInstance -> Message a -> IO a-iservCall iserv msg =- remoteCall (iservPipe iserv) msg- `catchException` \(e :: SomeException) -> handleIServFailure iserv e---- | Read a value from the iserv process-readIServ :: IServInstance -> Get a -> IO a-readIServ iserv get =- readPipe (iservPipe iserv) get- `catchException` \(e :: SomeException) -> handleIServFailure iserv e---- | Send a value to the iserv process-writeIServ :: IServInstance -> Put -> IO ()-writeIServ iserv put =- writePipe (iservPipe iserv) put- `catchException` \(e :: SomeException) -> handleIServFailure iserv e--handleIServFailure :: IServInstance -> SomeException -> IO a-handleIServFailure iserv e = do- let proc = iservProcess iserv- ex <- getProcessExitCode proc- case ex of- Just (ExitFailure n) ->- throwIO (InstallationError ("ghc-iserv terminated (" ++ show n ++ ")"))- _ -> do- terminateProcess proc- _ <- waitForProcess proc- throw e+-- IServ specific calls and messages -- | Spawn an external interpreter-spawnIServ :: IServConfig -> IO IServInstance+spawnIServ :: IServConfig -> IO (ExtInterpInstance ()) spawnIServ conf = do iservConfTrace conf let createProc = fromMaybe (\cp -> do { (_,_,_,ph) <- createProcess cp ; return ph }) (iservConfHook conf) (ph, rh, wh) <- runWithPipes createProc (iservConfProgram conf)+ [] (iservConfOpts conf) lo_ref <- newIORef Nothing- return $ IServInstance- { iservPipe = Pipe { pipeRead = rh, pipeWrite = wh, pipeLeftovers = lo_ref }- , iservProcess = ph- , iservLookupSymbolCache = emptyUFM- , iservPendingFrees = []- }+ let pipe = Pipe { pipeRead = rh, pipeWrite = wh, pipeLeftovers = lo_ref }+ let process = InterpProcess+ { interpHandle = ph+ , interpPipe = pipe+ } + pending_frees <- newMVar []+ lookup_cache <- newMVar emptyUFM+ let inst = ExtInterpInstance+ { instProcess = process+ , instPendingFrees = pending_frees+ , instLookupSymbolCache = lookup_cache+ , instExtra = ()+ }+ pure inst+ -- | Stop the interpreter stopInterp :: Interp -> IO () stopInterp interp = case interpInstance interp of #if defined(HAVE_INTERNAL_INTERPRETER) InternalInterp -> pure () #endif- ExternalInterp _ (IServ mstate) ->+ ExternalInterp ext -> withExtInterpStatus ext $ \mstate -> do MC.mask $ \_restore -> modifyMVar_ mstate $ \state -> do case state of- IServPending -> pure state -- already stopped- IServRunning i -> do- ex <- getProcessExitCode (iservProcess i)+ InterpPending -> pure state -- already stopped+ InterpRunning i -> do+ ex <- getProcessExitCode (interpHandle (instProcess i)) if isJust ex then pure ()- else iservCall i Shutdown- pure IServPending--runWithPipes :: (CreateProcess -> IO ProcessHandle)- -> FilePath -> [String] -> IO (ProcessHandle, Handle, Handle)-#if defined(mingw32_HOST_OS)-foreign import ccall "io.h _close"- c__close :: CInt -> IO CInt--foreign import ccall unsafe "io.h _get_osfhandle"- _get_osfhandle :: CInt -> IO CInt--runWithPipesPOSIX :: (CreateProcess -> IO ProcessHandle)- -> FilePath -> [String] -> IO (ProcessHandle, Handle, Handle)-runWithPipesPOSIX createProc prog opts = do- (rfd1, wfd1) <- createPipeFd -- we read on rfd1- (rfd2, wfd2) <- createPipeFd -- we write on wfd2- wh_client <- _get_osfhandle wfd1- rh_client <- _get_osfhandle rfd2- let args = show wh_client : show rh_client : opts- ph <- createProc (proc prog args)- rh <- mkHandle rfd1- wh <- mkHandle wfd2- return (ph, rh, wh)- where mkHandle :: CInt -> IO Handle- mkHandle fd = (fdToHandle fd) `Ex.onException` (c__close fd)--# if defined (__IO_MANAGER_WINIO__)-runWithPipesNative :: (CreateProcess -> IO ProcessHandle)- -> FilePath -> [String] -> IO (ProcessHandle, Handle, Handle)-runWithPipesNative createProc prog opts = do- (rh, wfd1) <- createPipe -- we read on rfd1- (rfd2, wh) <- createPipe -- we write on wfd2- wh_client <- handleToHANDLE wfd1- rh_client <- handleToHANDLE rfd2- -- Associate the handle with the current manager- -- but don't touch the ones we're passing to the child- -- since it needs to register the handle with its own manager.- associateHandle' =<< handleToHANDLE rh- associateHandle' =<< handleToHANDLE wh- let args = show wh_client : show rh_client : opts- ph <- createProc (proc prog args)- return (ph, rh, wh)--runWithPipes = runWithPipesPOSIX <!> runWithPipesNative-# else-runWithPipes = runWithPipesPOSIX-# endif-#else-runWithPipes createProc prog opts = do- (rfd1, wfd1) <- Posix.createPipe -- we read on rfd1- (rfd2, wfd2) <- Posix.createPipe -- we write on wfd2- setFdOption rfd1 CloseOnExec True- setFdOption wfd2 CloseOnExec True- let args = show wfd1 : show rfd2 : opts- ph <- createProc (proc prog args)- closeFd wfd1- closeFd rfd2- rh <- fdToHandle rfd1- wh <- fdToHandle wfd2- return (ph, rh, wh)-#endif+ else sendMessage i Shutdown+ pure InterpPending -- ----------------------------------------------------------------------------- {- Note [External GHCi pointers]@@ -680,10 +601,10 @@ RemoteRef --------- -RemoteRef is a StablePtr to a heap-resident value. When--fexternal-interpreter is used, this value resides in the external-process's heap. RemoteRefs are mostly used to send pointers in-messages between GHC and iserv.+RemoteRef is a StablePtr to a heap-resident value. When -fexternal-interpreter+or the JS interpreter is used, this value resides in the external process's+heap. RemoteRefs are mostly used to send pointers in messages between GHC and+iserv. A RemoteRef must be explicitly freed when no longer required, using freeHValueRefs, or by attaching a finalizer with mkForeignHValue.@@ -709,20 +630,18 @@ -- 'RemoteRef' when it is no longer referenced. mkFinalizedHValue :: Interp -> RemoteRef a -> IO (ForeignRef a) mkFinalizedHValue interp rref = do- let hvref = toHValueRef rref-- free <- case interpInstance interp of+ case interpInstance interp of #if defined(HAVE_INTERNAL_INTERPRETER)- InternalInterp -> return (freeRemoteRef hvref)+ InternalInterp -> mkForeignRef rref (freeRemoteRef rref) #endif- ExternalInterp _ (IServ i) -> return $ modifyMVar_ i $ \state ->- case state of- IServPending {} -> pure state -- already shut down- IServRunning inst -> do- let !inst' = inst {iservPendingFrees = hvref:iservPendingFrees inst}- pure (IServRunning inst')+ ExternalInterp ext -> withExtInterpMaybe ext $ \case+ Nothing -> mkForeignRef rref (pure ()) -- nothing to do, interpreter already stopped+ Just inst -> mkForeignRef rref (freeReallyRemoteRef inst rref) - mkForeignRef rref free+freeReallyRemoteRef :: ExtInterpInstance d -> RemoteRef a -> IO ()+freeReallyRemoteRef inst rref =+ -- add to the list of HValues to free+ modifyMVar_ (instPendingFrees inst) (\xs -> pure (castRemoteRef rref : xs)) freeHValueRefs :: Interp -> [HValueRef] -> IO ()@@ -772,7 +691,9 @@ #if defined(HAVE_INTERNAL_INTERPRETER) InternalInterp -> hostIsProfiled #endif- ExternalInterp c _ -> iservConfProfiled c+ ExternalInterp ext -> case ext of+ ExtIServ i -> iservConfProfiled (interpConfig i)+ ExtJS {} -> False -- we don't support profiling yet in the JS backend -- | Interpreter uses Dynamic way interpreterDynamic :: Interp -> Bool@@ -780,4 +701,6 @@ #if defined(HAVE_INTERNAL_INTERPRETER) InternalInterp -> hostIsDynamic #endif- ExternalInterp c _ -> iservConfDynamic c+ ExternalInterp ext -> case ext of+ ExtIServ i -> iservConfDynamic (interpConfig i)+ ExtJS {} -> False -- dynamic doesn't make sense for JS
+ GHC/Runtime/Interpreter/JS.hs view
@@ -0,0 +1,403 @@+{-# LANGUAGE GADTs #-}+{-# LANGUAGE TupleSections #-}+{-# LANGUAGE BlockArguments #-}+{-# LANGUAGE LambdaCase #-}++-- | JavaScript interpreter+--+-- See Note [The JS interpreter]+--+module GHC.Runtime.Interpreter.JS+ ( spawnJSInterp+ , jsLinkRts+ , jsLinkInterp+ , jsLinkObject+ , jsLinkObjects+ , jsLoadFile+ , jsRunServer+ -- * Reexported for convenience+ , mkExportedModFuns+ )+where++import GHC.Prelude+import GHC.Runtime.Interpreter.Types+import GHC.Runtime.Interpreter.Process+import GHC.Runtime.Utils+import GHCi.Message++import GHC.StgToJS.Linker.Types+import GHC.StgToJS.Linker.Linker+import GHC.StgToJS.Types+import GHC.StgToJS.Object++import GHC.Unit.Env+import GHC.Unit.Types+import GHC.Unit.State++import GHC.Utils.Logger+import GHC.Utils.TmpFs+import GHC.Utils.Panic+import GHC.Utils.Error (logInfo)+import GHC.Utils.Outputable (text)+import GHC.Data.FastString+import GHC.Types.Unique.FM++import Control.Concurrent+import Control.Monad++import System.Process+import System.IO+import System.FilePath++import Data.IORef+import qualified Data.Set as Set+import qualified Data.ByteString as B++import Foreign.C.String+++-- Note [The JS interpreter]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- The JS interpreter works as follows:+--+-- ghc-interp.js is a simple JS script used to bootstrap the external+-- interpreter server (iserv) that is written in Haskell. This script waits for+-- commands on stdin:+--+-- LOAD foo.js+--+-- load a JS file in the current JS environment+--+-- RUN_SERVER ghci_unit_id+--+-- execute h$main(h$ghci_unit_idZCGHCiziServerzidefaultServer),+-- the entry point of the interpreter server+--+-- On the GHC side, when we need the interpreter we do the following:+--+-- 1. spawn nodejs with $topdir/ghc-interp.js script+-- 2. link the JS rts and send a LOAD command to load it+-- 3. link iserv (i.e. use GHCi.Server.defaultServer as root) and LOAD it+-- 4. send a RUN_SERVER command to execute the JS iserv+--+-- From this moment on, everything happens as with the native iserv, using a+-- pipe for communication, with the following differences:+--+-- - the JS iserv only supports the LoadObj linking command which has been+-- repurposed to load a JS source file. The JS iserv doesn't deal with+-- libraries (.a) and with object files (.o). The linker state is maintained on+-- the GHC side and GHC only sends the appropriate chunks of JS code to link.+--+-- - the JS iserv doesn't support ByteCode (i.e. it doesn't support CreateBCOs+-- messages). JS iserv clients should use the usual JS compilation pipeline and+-- send JS code instead. See GHC.Driver.Main.hscCompileCoreExpr for an example.+--+-- GHC keeps track of JS blocks (JS unit of linking corresponding to top-level+-- binding groups) that have already been linked by the JS interpreter. It only+-- links new ones when necessary.+--+-- Note that the JS interpreter isn't subject to staging issues: we can use it+-- in a Stage1 GHC.+--++---------------------------------------------------------+-- Running node+---------------------------------------------------------++-- | Start NodeJS interactively with "ghc-interp.js" script loaded in+startTHRunnerProcess :: FilePath -> NodeJsSettings -> IO (Handle,InterpProcess)+startTHRunnerProcess interp_js settings = do+ interp_in <- newIORef undefined++ let createProc cp = do+ let cp' = cp+ { std_in = CreatePipe+ , std_out = Inherit+ , std_err = Inherit+ }+ (mb_in, _mb_out, _mb_err, hdl) <- createProcess cp'+ -- we can't directly return stdin for the process given the current+ -- implementation of runWithPipes. So we just use an IORef for this...+ case mb_in of+ Nothing -> panic "startTHRunnerProcess: expected stdin for interpreter"+ Just i -> writeIORef interp_in i+ return hdl++ (hdl, rh, wh) <- runWithPipes createProc (nodeProgram settings)+ [interp_js]+ (nodeExtraArgs settings)+ std_in <- readIORef interp_in++ lo_ref <- newIORef Nothing+ let pipe = Pipe { pipeRead = rh, pipeWrite = wh, pipeLeftovers = lo_ref }+ let proc = InterpProcess+ { interpHandle = hdl+ , interpPipe = pipe+ }+ pure (std_in, proc)++-- | Spawn a JS interpreter+--+-- Run NodeJS with "ghc-interp.js" loaded in. Then load GHCi.Server and its deps+-- (including the rts) and run GHCi.Server.defaultServer.+spawnJSInterp :: JSInterpConfig -> IO (ExtInterpInstance JSInterpExtra)+spawnJSInterp cfg = do+ let logger= jsInterpLogger cfg+ when (logVerbAtLeast logger 2) $+ logInfo logger (text "Spawning JS interpreter")++ let tmpfs = jsInterpTmpFs cfg+ tmp_dir = jsInterpTmpDir cfg+ logger = jsInterpLogger cfg+ codegen_cfg = jsInterpCodegenCfg cfg+ unit_env = jsInterpUnitEnv cfg+ finder_opts = jsInterpFinderOpts cfg+ finder_cache = jsInterpFinderCache cfg++ (std_in, proc) <- startTHRunnerProcess (jsInterpScript cfg) (jsInterpNodeConfig cfg)++ js_state <- newMVar (JSState+ { jsLinkState = emptyLinkPlan+ , jsServerStarted = False+ })++ -- get the unit-id of the ghci package. We need this to load the+ -- interpreter code.+ ghci_unit_id <- case lookupPackageName (ue_units unit_env) (PackageName (fsLit "ghci")) of+ Nothing -> cmdLineErrorIO "JS interpreter: couldn't find \"ghci\" package"+ Just i -> pure i++ let extra = JSInterpExtra+ { instStdIn = std_in+ , instJSState = js_state+ , instFinderCache = finder_cache+ , instFinderOpts = finder_opts+ , instGhciUnitId = ghci_unit_id+ }++ pending_frees <- newMVar []+ lookup_cache <- newMVar emptyUFM+ let inst = ExtInterpInstance+ { instProcess = proc+ , instPendingFrees = pending_frees+ , instLookupSymbolCache = lookup_cache+ , instExtra = extra+ }++ -- link rts and its deps+ jsLinkRts logger tmpfs tmp_dir codegen_cfg unit_env inst++ -- link interpreter and its deps+ jsLinkInterp logger tmpfs tmp_dir codegen_cfg unit_env inst++ -- run interpreter main loop+ jsRunServer inst++ pure inst++++---------------------------------------------------------+-- Interpreter commands+---------------------------------------------------------++-- | Link JS RTS+jsLinkRts :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> IO ()+jsLinkRts logger tmpfs tmp_dir cfg unit_env inst = do+ let link_cfg = JSLinkConfig+ { lcNoStats = True -- we don't need the stats+ , lcNoRts = False -- we need the RTS+ , lcCombineAll = False -- we don't need the combined all.js, we'll link each part independently below+ , lcForeignRefs = False -- we don't need foreign references+ , lcNoJSExecutables = True -- we don't need executables+ , lcNoHsMain = True -- nor HsMain+ }++ -- link the RTS and its dependencies (things it uses from `base`, etc.)+ let link_spec = LinkSpec+ { lks_unit_ids = [rtsUnitId, baseUnitId, primUnitId]+ , lks_obj_files = mempty+ , lks_obj_root_filter = const False+ , lks_extra_roots = mempty+ , lks_extra_js = mempty+ }++ let finder_opts = instFinderOpts (instExtra inst)+ finder_cache = instFinderCache (instExtra inst)++ link_plan <- computeLinkDependencies cfg unit_env link_spec finder_opts finder_cache+ jsLinkPlan logger tmpfs tmp_dir link_cfg cfg inst link_plan++-- | Link JS interpreter+jsLinkInterp :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> IO ()+jsLinkInterp logger tmpfs tmp_dir cfg unit_env inst = do++ let link_cfg = JSLinkConfig+ { lcNoStats = True -- we don't need the stats+ , lcNoRts = True -- we don't need the RTS+ , lcCombineAll = False -- we don't need the combined all.js, we'll link each part independently below+ , lcForeignRefs = False -- we don't need foreign references+ , lcNoJSExecutables = True -- we don't need executables+ , lcNoHsMain = True -- nor HsMain+ }++ let is_root _ = True -- FIXME: we shouldn't consider every function as a root++ let ghci_unit_id = instGhciUnitId (instExtra inst)++ -- compute unit dependencies of ghc_unit_id+ let unit_map = unitInfoMap (ue_units unit_env)+ dep_units <- mayThrowUnitErr $ closeUnitDeps unit_map [(ghci_unit_id,Nothing)]+ let units = dep_units ++ [ghci_unit_id]++ -- indicate that our root function is GHCi.Server.defaultServer+ let root_deps = Set.fromList $ mkExportedFuns ghci_unit_id (fsLit "GHCi.Server") [fsLit "defaultServer"]++ -- link the interpreter and its dependencies+ let link_spec = LinkSpec+ { lks_unit_ids = units+ , lks_obj_files = mempty+ , lks_obj_root_filter = is_root+ , lks_extra_roots = root_deps+ , lks_extra_js = mempty+ }++ let finder_cache = instFinderCache (instExtra inst)+ finder_opts = instFinderOpts (instExtra inst)++ link_plan <- computeLinkDependencies cfg unit_env link_spec finder_opts finder_cache++ jsLinkPlan logger tmpfs tmp_dir link_cfg cfg inst link_plan+++-- | Link object files+jsLinkObjects :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> [FilePath] -> (ExportedFun -> Bool) -> IO ()+jsLinkObjects logger tmpfs tmp_dir cfg unit_env inst objs is_root = do+ let link_cfg = JSLinkConfig+ { lcNoStats = True -- we don't need the stats+ , lcNoRts = True -- we don't need the RTS (already linked)+ , lcCombineAll = False -- we don't need the combined all.js, we'll link each part independently below+ , lcForeignRefs = False -- we don't need foreign references+ , lcNoJSExecutables = True -- we don't need executables+ , lcNoHsMain = True -- nor HsMain+ }++ let units = preloadUnits (ue_units unit_env)+ ++ [thUnitId] -- don't forget TH which is an implicit dep++ -- compute dependencies+ let link_spec = LinkSpec+ { lks_unit_ids = units+ , lks_obj_files = fmap ObjFile objs+ , lks_obj_root_filter = is_root+ , lks_extra_roots = mempty+ , lks_extra_js = mempty+ }++ let finder_opts = instFinderOpts (instExtra inst)+ finder_cache = instFinderCache (instExtra inst)++ link_plan <- computeLinkDependencies cfg unit_env link_spec finder_opts finder_cache++ -- link+ jsLinkPlan logger tmpfs tmp_dir link_cfg cfg inst link_plan++++-- | Link an object file using the given functions as roots+jsLinkObject :: Logger -> TmpFs -> TempDir -> StgToJSConfig -> UnitEnv -> ExtInterpInstance JSInterpExtra -> FilePath -> [ExportedFun] -> IO ()+jsLinkObject logger tmpfs tmp_dir cfg unit_env inst obj roots = do+ let is_root f = Set.member f (Set.fromList roots)+ let objs = [obj]+ jsLinkObjects logger tmpfs tmp_dir cfg unit_env inst objs is_root+++-- | Link the given link plan+--+-- Perform incremental linking by removing what is already linked from the plan+jsLinkPlan :: Logger -> TmpFs -> TempDir -> JSLinkConfig -> StgToJSConfig -> ExtInterpInstance JSInterpExtra -> LinkPlan -> IO ()+jsLinkPlan logger tmpfs tmp_dir link_cfg cfg inst link_plan = do+ ----------------------------------------------------------------+ -- Get already linked stuff and compute incremental plan+ ----------------------------------------------------------------++ old_plan <- jsLinkState <$> readMVar (instJSState (instExtra inst))++ -- compute new plan discarding what's already linked+ let (diff_plan, total_plan) = incrementLinkPlan old_plan link_plan++ ----------------------------------------------------------------+ -- Generate JS code for the incremental plan+ ----------------------------------------------------------------++ tmp_out <- newTempSubDir logger tmpfs tmp_dir+ void $ jsLink link_cfg cfg logger tmp_out diff_plan++ -- Code has been linked into the following files:+ -- - generated rts from tmp_out/rts.js (depends on link options)+ -- - raw js files from tmp_out/lib.js+ -- - Haskell generated JS from tmp_out/out.js++ -- We need to combine at least rts.js and lib.js for the RTS because they+ -- depend on each other. We might as well combine them all, so that's what we+ -- do.+ let filenames+ | lcNoRts link_cfg = ["lib.js", "out.js"]+ | otherwise = ["rts.js", "lib.js", "out.js"]+ let files = map (tmp_out </>) filenames+ let all_js = tmp_out </> "all.js"+ let all_files = all_js : files+ withBinaryFile all_js WriteMode $ \h -> do+ let cpy i = B.readFile i >>= B.hPut h+ mapM_ cpy files++ -- add files to clean+ addFilesToClean tmpfs TFL_CurrentModule all_files++ ----------------------------------------------------------------+ -- Link JS code+ ----------------------------------------------------------------++ -- linking JS code depends on the phase we're in:+ -- - during in the initialization phase, we send a LoadFile message to the+ -- JS server;+ -- - once the Haskell server is started, we send a LoadObj message to the+ -- Haskell server.+ server_started <- jsServerStarted <$> readMVar (instJSState (instExtra inst))+ if server_started+ then sendMessageNoResponse inst $ LoadObj all_js+ else jsLoadFile inst all_js++ ----------------------------------------------------------------+ -- update linker state+ ----------------------------------------------------------------+ modifyMVar_ (instJSState (instExtra inst)) $ \state -> pure state { jsLinkState = total_plan }+++-- | Send a command to the JS interpreter+jsSendCommand :: ExtInterpInstance JSInterpExtra -> String -> IO ()+jsSendCommand inst cmd = send_cmd cmd+ where+ extra = instExtra inst+ handle = instStdIn extra+ send_cmd s = do+ withCStringLen s \(p,n) -> hPutBuf handle p n+ hFlush handle++-- | Load a JS file in the interpreter+jsLoadFile :: ExtInterpInstance JSInterpExtra -> FilePath -> IO ()+jsLoadFile inst path = jsSendCommand inst ("LOAD " ++ path ++ "\n")++-- | Run JS server+jsRunServer :: ExtInterpInstance JSInterpExtra -> IO ()+jsRunServer inst = do+ let ghci_unit_id = instGhciUnitId (instExtra inst)+ let zghci_unit_id = zString (zEncodeFS (unitIdFS ghci_unit_id))++ -- Run `GHCi.Server.defaultServer`+ jsSendCommand inst ("RUN_SERVER " ++ zghci_unit_id ++ "\n")++ -- indicate that the Haskell server is now started+ modifyMVar_ (instJSState (instExtra inst)) $ \state -> pure state { jsServerStarted = True }
+ GHC/Runtime/Interpreter/Process.hs view
@@ -0,0 +1,102 @@+module GHC.Runtime.Interpreter.Process+ (+ -- * Low-level API+ callInterpProcess+ , readInterpProcess+ , writeInterpProcess++ -- * Message API+ , Message(..)+ , DelayedResponse (..)+ , sendMessage+ , sendMessageNoResponse+ , sendMessageDelayedResponse+ , sendAnyValue+ , receiveAnyValue+ , receiveDelayedResponse+ , receiveTHMessage++ )+where++import GHC.Prelude++import GHC.Runtime.Interpreter.Types+import GHCi.Message++import GHC.IO (catchException)+import GHC.Utils.Panic+import GHC.Utils.Exception as Ex++import Data.Binary+import System.Exit+import System.Process++data DelayedResponse a = DelayedResponse++-- | Send a message to the interpreter process that doesn't expect a response+sendMessageNoResponse :: ExtInterpInstance d -> Message () -> IO ()+sendMessageNoResponse i m = writeInterpProcess (instProcess i) (putMessage m)++-- | Send a message to the interpreter that excepts a response+sendMessage :: Binary a => ExtInterpInstance d -> Message a -> IO a+sendMessage i m = callInterpProcess (instProcess i) m++-- | Send a message to the interpreter process whose response is expected later+--+-- This is useful to avoid forgetting to receive the value and to ensure that+-- the type of the response isn't lost. Use receiveDelayedResponse to read it.+sendMessageDelayedResponse :: ExtInterpInstance d -> Message a -> IO (DelayedResponse a)+sendMessageDelayedResponse i m = do+ writeInterpProcess (instProcess i) (putMessage m)+ pure DelayedResponse++-- | Send any value+sendAnyValue :: Binary a => ExtInterpInstance d -> a -> IO ()+sendAnyValue i m = writeInterpProcess (instProcess i) (put m)++-- | Expect a value to be received+receiveAnyValue :: ExtInterpInstance d -> Get a -> IO a+receiveAnyValue i get = readInterpProcess (instProcess i) get++-- | Expect a delayed result to be received now+receiveDelayedResponse :: Binary a => ExtInterpInstance d -> DelayedResponse a -> IO a+receiveDelayedResponse i DelayedResponse = readInterpProcess (instProcess i) get++-- | Expect a value to be received+receiveTHMessage :: ExtInterpInstance d -> IO THMsg+receiveTHMessage i = receiveAnyValue i getTHMessage+++-- -----------------------------------------------------------------------------+-- Low-level API++-- | Send a 'Message' and receive the response from the interpreter process+callInterpProcess :: Binary a => InterpProcess -> Message a -> IO a+callInterpProcess i msg =+ remoteCall (interpPipe i) msg+ `catchException` \(e :: SomeException) -> handleInterpProcessFailure i e++-- | Read a value from the interpreter process+readInterpProcess :: InterpProcess -> Get a -> IO a+readInterpProcess i get =+ readPipe (interpPipe i) get+ `catchException` \(e :: SomeException) -> handleInterpProcessFailure i e++-- | Send a value to the interpreter process+writeInterpProcess :: InterpProcess -> Put -> IO ()+writeInterpProcess i put =+ writePipe (interpPipe i) put+ `catchException` \(e :: SomeException) -> handleInterpProcessFailure i e++handleInterpProcessFailure :: InterpProcess -> SomeException -> IO a+handleInterpProcessFailure i e = do+ let hdl = interpHandle i+ ex <- getProcessExitCode hdl+ case ex of+ Just (ExitFailure n) ->+ throwIO (InstallationError ("External interpreter terminated (" ++ show n ++ ")"))+ _ -> do+ terminateProcess hdl+ _ <- waitForProcess hdl+ throw e
GHC/Runtime/Interpreter/Types.hs view
@@ -4,10 +4,22 @@ module GHC.Runtime.Interpreter.Types ( Interp(..) , InterpInstance(..)- , IServ(..)- , IServInstance(..)+ , InterpProcess (..)+ , ExtInterp (..)+ , ExtInterpStatusVar+ , ExtInterpInstance (..)+ , ExtInterpState (..)+ , InterpStatus(..)+ -- * IServ+ , IServ , IServConfig(..)- , IServState(..)+ -- * JSInterp+ , JSInterp+ , JSInterpExtra (..)+ , JSInterpConfig (..)+ , JSState (..)+ , NodeJsSettings (..)+ , defaultNodeJsSettings ) where @@ -20,8 +32,17 @@ import GHC.Data.FastString ( FastString ) import Foreign +import GHC.Utils.TmpFs+import GHC.Utils.Logger+import GHC.Unit.Env+import GHC.Unit.Types+import GHC.StgToJS.Types+import GHC.StgToJS.Linker.Types+ import Control.Concurrent import System.Process ( ProcessHandle, CreateProcess )+import System.IO+import GHC.Unit.Finder.Types (FinderCache, FinderOpts) -- | Interpreter data Interp = Interp@@ -32,25 +53,41 @@ -- ^ Interpreter loader } - data InterpInstance- = ExternalInterp !IServConfig !IServ -- ^ External interpreter+ = ExternalInterp !ExtInterp -- ^ External interpreter #if defined(HAVE_INTERNAL_INTERPRETER)- | InternalInterp -- ^ Internal interpreter+ | InternalInterp -- ^ Internal interpreter #endif +data ExtInterp+ = ExtIServ !IServ+ | ExtJS !JSInterp+ -- | External interpreter -- -- The external interpreter is spawned lazily (on first use) to avoid slowing -- down sessions that don't require it. The contents of the MVar reflects the -- state of the interpreter (running or not).-newtype IServ = IServ (MVar IServState)+data ExtInterpState cfg details = ExtInterpState+ { interpConfig :: !cfg+ , interpStatus :: !(ExtInterpStatusVar details)+ } --- | State of an external interpreter-data IServState- = IServPending -- ^ Not spawned yet- | IServRunning !IServInstance -- ^ Running+type ExtInterpStatusVar d = MVar (InterpStatus (ExtInterpInstance d)) +type IServ = ExtInterpState IServConfig ()+type JSInterp = ExtInterpState JSInterpConfig JSInterpExtra++data InterpProcess = InterpProcess+ { interpPipe :: !Pipe -- ^ Pipe to communicate with the server+ , interpHandle :: !ProcessHandle -- ^ Process handle of the server+ }++-- | Status of an external interpreter+data InterpStatus inst+ = InterpPending -- ^ Not spawned yet+ | InterpRunning !inst -- ^ Running+ -- | Configuration needed to spawn an external interpreter data IServConfig = IServConfig { iservConfProgram :: !String -- ^ External program to run@@ -61,14 +98,66 @@ , iservConfTrace :: IO () -- ^ Trace action executed after spawn } --- | External interpreter instance-data IServInstance = IServInstance- { iservPipe :: !Pipe- , iservProcess :: !ProcessHandle- , iservLookupSymbolCache :: !(UniqFM FastString (Ptr ()))- , iservPendingFrees :: ![HValueRef]+-- | Common field between native external interpreter and the JS one+data ExtInterpInstance c = ExtInterpInstance+ { instProcess :: {-# UNPACK #-} !InterpProcess+ -- ^ External interpreter process and its pipe (communication channel)++ , instPendingFrees :: !(MVar [HValueRef]) -- ^ Values that need to be freed before the next command is sent.- -- Threads can append values to this list asynchronously (by modifying the- -- IServ state MVar).+ -- Finalizers for ForeignRefs can append values to this list+ -- asynchronously.++ , instLookupSymbolCache :: !(MVar (UniqFM FastString (Ptr ())))+ -- ^ LookupSymbol cache++ , instExtra :: !c+ -- ^ Instance specific extra fields+ }++------------------------+-- JS Stuff+------------------------++data JSInterpExtra = JSInterpExtra+ { instStdIn :: !Handle -- ^ Stdin for the process+ , instFinderCache :: !FinderCache+ , instFinderOpts :: !FinderOpts+ , instJSState :: !(MVar JSState) -- ^ Mutable state+ , instGhciUnitId :: !UnitId -- ^ GHCi unit-id+ }++data JSState = JSState+ { jsLinkState :: !LinkPlan -- ^ Linker state of the interpreter+ , jsServerStarted :: !Bool -- ^ Is the Haskell server started?+ }++-- | NodeJs configuration+data NodeJsSettings = NodeJsSettings+ { nodeProgram :: FilePath -- ^ location of node.js program+ , nodePath :: Maybe FilePath -- ^ value of NODE_PATH environment variable (search path for Node modules; GHCJS used to provide some)+ , nodeExtraArgs :: [String] -- ^ extra arguments to pass to node.js+ , nodeKeepAliveMaxMem :: Integer -- ^ keep node.js (TH, GHCJSi) processes alive if they don't use more than this+ }++defaultNodeJsSettings :: NodeJsSettings+defaultNodeJsSettings = NodeJsSettings+ { nodeProgram = "node"+ , nodePath = Nothing+ , nodeExtraArgs = []+ , nodeKeepAliveMaxMem = 536870912+ }+++data JSInterpConfig = JSInterpConfig+ { jsInterpNodeConfig :: !NodeJsSettings -- ^ NodeJS settings+ , jsInterpScript :: !FilePath -- ^ Path to "ghc-interp.js" script+ , jsInterpTmpFs :: !TmpFs+ , jsInterpTmpDir :: !TempDir+ , jsInterpLogger :: !Logger+ , jsInterpCodegenCfg :: !StgToJSConfig+ , jsInterpUnitEnv :: !UnitEnv+ , jsInterpFinderOpts :: !FinderOpts+ , jsInterpFinderCache :: !FinderCache }
GHC/Runtime/Loader.hs view
@@ -23,7 +23,7 @@ import GHC.Prelude import GHC.Data.FastString -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Ppr import GHC.Driver.Hooks import GHC.Driver.Plugins@@ -33,34 +33,37 @@ import GHC.Runtime.Interpreter ( wormhole ) import GHC.Runtime.Interpreter.Types +import GHC.Rename.Names ( gresFromAvails )+ import GHC.Tc.Utils.Monad ( initTcInteractive, initIfaceTcRn ) import GHC.Iface.Load ( loadPluginInterface, cannotFindModule )-import GHC.Rename.Names ( gresFromAvails ) import GHC.Builtin.Names ( pluginTyConName, frontendPluginTyConName ) import GHC.Driver.Env import GHCi.RemoteTypes ( HValue ) import GHC.Core.Type ( Type, mkTyConTy ) import GHC.Core.TyCo.Compare( eqType )-import GHC.Core.TyCon ( TyCon )+import GHC.Core.TyCon ( TyCon(tyConName) ) + import GHC.Types.SrcLoc ( noSrcSpan )-import GHC.Types.Name ( Name, nameModule_maybe )+import GHC.Types.Name ( Name, nameModule, nameModule_maybe ) import GHC.Types.Id ( idType ) import GHC.Types.TyThing import GHC.Types.Name.Occurrence ( OccName, mkVarOccFS )-import GHC.Types.Name.Reader ( RdrName, ImportSpec(..), ImpDeclSpec(..)- , ImpItemSpec(..), mkGlobalRdrEnv, lookupGRE_RdrName- , greMangledName, mkRdrQual )+import GHC.Types.Name.Reader+import GHC.Types.Unique.DFM import GHC.Unit.Finder ( findPluginModule, FindResult(..) ) import GHC.Driver.Config.Finder ( initFinderOpts )-import GHC.Unit.Module ( Module, ModuleName )+import GHC.Driver.Config.Diagnostic ( initIfaceMessageOpts )+import GHC.Unit.Module ( Module, ModuleName, thisGhcUnit, GenModule(moduleUnit) ) import GHC.Unit.Module.ModIface import GHC.Unit.Env import GHC.Utils.Panic import GHC.Utils.Logger+import GHC.Utils.Misc ( HasDebugCallStack ) import GHC.Utils.Error import GHC.Utils.Outputable import GHC.Utils.Exception@@ -69,10 +72,33 @@ import Data.Maybe ( mapMaybe ) import Unsafe.Coerce ( unsafeCoerce ) import GHC.Linker.Types-import GHC.Types.Unique.DFM import Data.List (unzip4)+import GHC.Iface.Errors.Ppr import GHC.Driver.Monad +{- Note [Timing of plugin initialization]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++Plugins needs to be initialised as soon as possible in the pipeline. This is because+driver plugins are executed immediately after being loaded, which can modify anything+in the HscEnv, including the logger and DynFlags (for example #21279). For example,+in ghc/Main.hs the logger is used almost immediately after the session has been initialised+and so if a user overwrites the logger expecting all output to go there then unless+the plugins are initialised before that point then unexpected things will happen.++We initialise plugins in ghc/Main.hs for the main ghc executable.++When people are using the GHC API, they also need to initialise plugins+at the highest level possible for things to work as expected. We keep+some defensive calls to plugin initialisation in functions like `load'` and `oneshot`+to catch cases where API users have not initialised their own plugins.++In addition to this, there needs to be an initialisation call for each module+just in case the user has enabled a plugin just for that module using OPTIONS_GHC+pragma.++-}+ -- | Initialise plugins specified by the current DynFlags and update the session. initializeSessionPlugins :: GhcMonad m => m () initializeSessionPlugins = getSession >>= liftIO . initializePlugins >>= setSession@@ -176,7 +202,14 @@ Just (name, mod_iface) -> do { plugin_tycon <- forceLoadTyCon hsc_env plugin_name- ; eith_plugin <- getValueSafely hsc_env name (mkTyConTy plugin_tycon)+ ; case thisGhcUnit == (moduleUnit . nameModule . tyConName) plugin_tycon of {+ False ->+ throwGhcExceptionIO (CmdLineError $ showSDoc dflags $ hsep+ [ text "The plugin module", ppr mod_name+ , text "was built with a compiler that is incompatible with the one loading it"+ ]) ;+ True ->+ do { eith_plugin <- getValueSafely hsc_env name (mkTyConTy plugin_tycon) ; case eith_plugin of Left actual_type -> throwGhcExceptionIO (CmdLineError $@@ -187,7 +220,7 @@ , text "did not have the type" , text "GHC.Plugins.Plugin" , text "as required"])- Right (plugin, links, pkgs) -> return (plugin, mod_iface, links, pkgs) } } }+ Right (plugin, links, pkgs) -> return (plugin, mod_iface, links, pkgs) } } } } } -- | Force the interfaces for the given modules to be loaded. The 'SDoc' parameter is used@@ -303,7 +336,8 @@ -- being compiled. This was introduced by 57d6798. -- -- Need the module as well to record information in the interface file-lookupRdrNameInModuleForPlugins :: HscEnv -> ModuleName -> RdrName+lookupRdrNameInModuleForPlugins :: HasDebugCallStack+ => HscEnv -> ModuleName -> RdrName -> IO (Maybe (Name, ModIface)) lookupRdrNameInModuleForPlugins hsc_env mod_name rdr_name = do let dflags = hsc_dflags hsc_env@@ -323,17 +357,22 @@ case mb_iface of Just iface -> do -- Try and find the required name in the exports- let decl_spec = ImpDeclSpec { is_mod = mod_name, is_as = mod_name+ let decl_spec = ImpDeclSpec { is_mod = mod, is_as = mod_name , is_qual = False, is_dloc = noSrcSpan } 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 (greMangledName gre, iface))+ env = mkGlobalRdrEnv+ $ gresFromAvails hsc_env (Just imp_spec) (mi_exports iface)+ case lookupGRE env (LookupRdrName rdr_name (RelevantGREsFOS WantNormal)) of+ [gre] -> return (Just (greName gre, iface)) [] -> return Nothing _ -> panic "lookupRdrNameInModule" Nothing -> throwCmdLineErrorS dflags $ hsep [text "Could not determine the exports of the module", ppr mod_name]- err -> throwCmdLineErrorS dflags $ cannotFindModule hsc_env mod_name err+ err ->+ let opts = initIfaceMessageOpts dflags+ err_txt = missingInterfaceErrorDiagnostic opts+ $ cannotFindModule hsc_env mod_name err+ in throwCmdLineErrorS dflags err_txt where doc = text "contains a name used in an invocation of lookupRdrNameInModule"
+ GHC/Runtime/Utils.hs view
@@ -0,0 +1,84 @@+{-# LANGUAGE CPP #-}++module GHC.Runtime.Utils+ ( runWithPipes+ )+where++import GHC.Prelude++#if defined(mingw32_HOST_OS)+import Foreign.C+import GHC.IO.Handle.FD (fdToHandle)+import GHC.Utils.Exception as Ex+# if defined(__IO_MANAGER_WINIO__)+import GHC.IO.SubSystem ((<!>))+import GHC.IO.Handle.Windows (handleToHANDLE)+import GHC.Event.Windows (associateHandle')+# endif+#else+import System.Posix as Posix+#endif+import System.Process+import System.IO++runWithPipes :: (CreateProcess -> IO ProcessHandle)+ -> FilePath -> [String] -> [String] -> IO (ProcessHandle, Handle, Handle)+#if defined(mingw32_HOST_OS)+foreign import ccall "io.h _close"+ c__close :: CInt -> IO CInt++foreign import ccall unsafe "io.h _get_osfhandle"+ _get_osfhandle :: CInt -> IO CInt++runWithPipesPOSIX :: (CreateProcess -> IO ProcessHandle)+ -> FilePath -> [String] -> [String] -> IO (ProcessHandle, Handle, Handle)+runWithPipesPOSIX createProc prog pre_opts opts = do+ (rfd1, wfd1) <- createPipeFd -- we read on rfd1+ (rfd2, wfd2) <- createPipeFd -- we write on wfd2+ wh_client <- _get_osfhandle wfd1+ rh_client <- _get_osfhandle rfd2+ let args = pre_opts ++ (show wh_client : show rh_client : opts)+ ph <- createProc (proc prog args)+ rh <- mkHandle rfd1+ wh <- mkHandle wfd2+ return (ph, rh, wh)+ where mkHandle :: CInt -> IO Handle+ mkHandle fd = (fdToHandle fd) `Ex.onException` (c__close fd)++# if defined (__IO_MANAGER_WINIO__)+runWithPipesNative :: (CreateProcess -> IO ProcessHandle)+ -> FilePath -> [String] -> [String] -> IO (ProcessHandle, Handle, Handle)+runWithPipesNative createProc prog pre_opts opts = do+ (rh, wfd1) <- createPipe -- we read on rfd1+ (rfd2, wh) <- createPipe -- we write on wfd2+ wh_client <- handleToHANDLE wfd1+ rh_client <- handleToHANDLE rfd2+ -- Associate the handle with the current manager+ -- but don't touch the ones we're passing to the child+ -- since it needs to register the handle with its own manager.+ associateHandle' =<< handleToHANDLE rh+ associateHandle' =<< handleToHANDLE wh+ let args = pre_opts ++ (show wh_client : show rh_client : opts)+ ph <- createProc (proc prog args)+ return (ph, rh, wh)++runWithPipes = runWithPipesPOSIX <!> runWithPipesNative+# else+runWithPipes = runWithPipesPOSIX+# endif+#else+runWithPipes createProc prog pre_opts opts = do+ (rfd1, wfd1) <- Posix.createPipe -- we read on rfd1+ (rfd2, wfd2) <- Posix.createPipe -- we write on wfd2+ setFdOption rfd1 CloseOnExec True+ setFdOption wfd2 CloseOnExec True+ let args = pre_opts ++ (show wfd1 : show rfd2 : opts)+ ph <- createProc (proc prog args)+ closeFd wfd1+ closeFd rfd2+ rh <- fdToHandle rfd1+ wh <- fdToHandle wfd2+ return (ph, rh, wh)+#endif+
GHC/Settings.hs view
@@ -19,6 +19,7 @@ , sGlobalPackageDatabasePath , sLdSupportsCompactUnwind , sLdSupportsFilelist+ , sLdSupportsResponseFiles , sLdIsGnuLd , sGccSupportsNoPie , sUseInplaceMinGW@@ -87,7 +88,7 @@ data ToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind :: Bool , toolSettings_ldSupportsFilelist :: Bool- , toolSettings_ldSupportsSingleModule :: Bool+ , toolSettings_ldSupportsResponseFiles :: Bool , toolSettings_ldIsGnuLd :: Bool , toolSettings_ccSupportsNoPie :: Bool , toolSettings_useInplaceMinGW :: Bool@@ -190,6 +191,8 @@ sLdSupportsCompactUnwind = toolSettings_ldSupportsCompactUnwind . sToolSettings sLdSupportsFilelist :: Settings -> Bool sLdSupportsFilelist = toolSettings_ldSupportsFilelist . sToolSettings+sLdSupportsResponseFiles :: Settings -> Bool+sLdSupportsResponseFiles = toolSettings_ldSupportsResponseFiles . sToolSettings sLdIsGnuLd :: Settings -> Bool sLdIsGnuLd = toolSettings_ldIsGnuLd . sToolSettings sGccSupportsNoPie :: Settings -> Bool
GHC/Settings/Constants.hs view
@@ -30,6 +30,27 @@ mAX_SOLVER_ITERATIONS :: Int mAX_SOLVER_ITERATIONS = 4 +-- | In case of loopy quantified costraints constraints,+-- how many times should we allow superclass expansions+-- Should be less than mAX_SOLVER_ITERATIONS+-- See Note [Expanding Recursive Superclasses and ExpansionFuel]+mAX_QC_FUEL :: Int+mAX_QC_FUEL = 3++-- | In case of loopy wanted constraints,+-- how many times should we allow superclass expansions+-- Should be less than mAX_GIVENS_FUEL+-- See Note [Expanding Recursive Superclasses and ExpansionFuel]+mAX_WANTEDS_FUEL :: Int+mAX_WANTEDS_FUEL = 1++-- | In case of loopy given constraints,+-- how many times should we allow superclass expansions+-- Should be less than max_SOLVER_ITERATIONS+-- See Note [Expanding Recursive Superclasses and ExpansionFuel]+mAX_GIVENS_FUEL :: Int+mAX_GIVENS_FUEL = 3+ wORD64_SIZE :: Int wORD64_SIZE = 8
GHC/Settings/IO.hs view
@@ -16,11 +16,9 @@ import GHC.Utils.Fingerprint import GHC.Platform import GHC.Utils.Panic-import GHC.ResponseFile import GHC.Settings import GHC.SysTools.BaseDir -import Data.Char import Control.Monad.Trans.Except import Control.Monad.IO.Class import qualified Data.Map as Map@@ -74,15 +72,10 @@ -- just partially applying those functions and throwing 'Left's; they're -- written in a very portable style to keep ghc-boot light. let getSetting key = either pgmError pure $- -- Escape the 'top_dir', to make sure we don't accidentally introduce an- -- unescaped space- getRawFilePathSetting (escapeArg top_dir) settingsFile mySettings key+ getRawFilePathSetting top_dir settingsFile mySettings key getToolSetting :: String -> ExceptT SettingsError m String- -- Escape the 'mtool_dir', to make sure we don't accidentally introduce- -- an unescaped space- getToolSetting key = expandToolDir useInplaceMinGW (fmap escapeArg mtool_dir) <$> getSetting key+ getToolSetting key = expandToolDir useInplaceMinGW mtool_dir <$> getSetting key targetPlatformString <- getSetting "target platform string"- myExtraGccViaCFlags <- getSetting "GCC extra via C opts" cc_prog <- getToolSetting "C compiler command" cxx_prog <- getToolSetting "C++ compiler command" cc_args_str <- getToolSetting "C compiler flags"@@ -96,12 +89,22 @@ let unreg_cc_args = if platformUnregisterised platform then ["-DNO_REGS", "-DUSE_MINIINTERPRETER"] else []- cpp_args = map Option (unescapeArgs cpp_args_str)- cc_args = unescapeArgs cc_args_str ++ unreg_cc_args- cxx_args = unescapeArgs cxx_args_str+ cpp_args = map Option (words cpp_args_str)+ cc_args = words cc_args_str ++ unreg_cc_args+ cxx_args = words cxx_args_str++ -- The extra flags we need to pass gcc when we invoke it to compile .hc code.+ --+ -- -fwrapv is needed for gcc to emit well-behaved code in the presence of+ -- integer wrap around (#952).+ extraGccViaCFlags = if platformUnregisterised platform+ -- configure guarantees cc support these flags+ then ["-fwrapv", "-fno-builtin"]+ else []+ ldSupportsCompactUnwind <- getBooleanSetting "ld supports compact unwind" ldSupportsFilelist <- getBooleanSetting "ld supports filelist"- ldSupportsSingleModule <- getBooleanSetting "ld supports single module"+ ldSupportsResponseFiles <- getBooleanSetting "ld supports response files" ldIsGnuLd <- getBooleanSetting "ld is GNU ld" arSupportsDashL <- getBooleanSetting "ar supports -L" @@ -134,12 +137,12 @@ let as_prog = cc_prog as_args = map Option cc_args ld_prog = cc_prog- ld_args = map Option (cc_args ++ unescapeArgs cc_link_args_str)+ ld_args = map Option (cc_args ++ words cc_link_args_str) ld_r_prog <- getToolSetting "Merge objects command" ld_r_args <- getToolSetting "Merge objects flags" let ld_r | null ld_r_prog = Nothing- | otherwise = Just (ld_r_prog, map Option $ unescapeArgs ld_r_args)+ | otherwise = Just (ld_r_prog, map Option $ words ld_r_args) llvmTarget <- getSetting "LLVM target" @@ -170,7 +173,7 @@ , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind , toolSettings_ldSupportsFilelist = ldSupportsFilelist- , toolSettings_ldSupportsSingleModule = ldSupportsSingleModule+ , toolSettings_ldSupportsResponseFiles = ldSupportsResponseFiles , toolSettings_ldIsGnuLd = ldIsGnuLd , toolSettings_ccSupportsNoPie = gccSupportsNoPie , toolSettings_useInplaceMinGW = useInplaceMinGW@@ -210,7 +213,7 @@ , toolSettings_opt_lc = [] , toolSettings_opt_i = [] - , toolSettings_extraGccViaCFlags = words myExtraGccViaCFlags+ , toolSettings_extraGccViaCFlags = extraGccViaCFlags } , sTargetPlatform = platform@@ -260,19 +263,3 @@ , platformHasLibm = targetHasLibm , platform_constants = Nothing -- will be filled later when loading (or building) the RTS unit }---- ------------------------------------------------------------------------------- Escape Args helpers--- -------------------------------------------------------------------------------- | Just like 'GHC.ResponseFile.escapeArg', but it is not exposed from base.-escapeArg :: String -> String-escapeArg = reverse . foldl' escape []--escape :: String -> Char -> String-escape cs c- | isSpace c- || '\\' == c- || '\'' == c- || '"' == c = c:'\\':cs -- n.b., our caller must reverse the result- | otherwise = c:cs
GHC/Stg/BcPrep.hs view
@@ -37,14 +37,14 @@ bcPrepRHS :: StgRhs -> BcPrepM StgRhs -- explicitly match all constructors so we get a warning if we miss any-bcPrepRHS (StgRhsClosure fvs cc upd args (StgTick bp@Breakpoint{} expr)) = do+bcPrepRHS (StgRhsClosure fvs cc upd args (StgTick bp@Breakpoint{} expr) typ) = do {- If we have a breakpoint directly under an StgRhsClosure we don't need to introduce a new binding for it. -} expr' <- bcPrepExpr expr- pure (StgRhsClosure fvs cc upd args (StgTick bp expr'))-bcPrepRHS (StgRhsClosure fvs cc upd args expr) =- StgRhsClosure fvs cc upd args <$> bcPrepExpr expr+ pure (StgRhsClosure fvs cc upd args (StgTick bp expr') typ)+bcPrepRHS (StgRhsClosure fvs cc upd args expr typ) =+ StgRhsClosure fvs cc upd args <$> bcPrepExpr expr <*> pure typ bcPrepRHS con@StgRhsCon{} = pure con bcPrepExpr :: StgExpr -> BcPrepM StgExpr@@ -59,6 +59,7 @@ ReEntrant [] expr'+ tick_ty ) letExp = StgLet noExtFieldSilent bnd (StgApp id []) pure letExp@@ -71,6 +72,7 @@ ReEntrant [voidArgId] expr'+ tick_ty ) pure $ StgLet noExtFieldSilent bnd (StgApp id [StgVarArg realWorldPrimId]) bcPrepExpr (StgTick tick rhs) =@@ -110,10 +112,10 @@ bcPrepSingleBind :: (Id, StgRhs) -> (Id, StgRhs) -- If necessary, modify this Id and body to protect not-necessarily-lifted join points. -- See Note [Not-necessarily-lifted join points], step 2.-bcPrepSingleBind (x, StgRhsClosure ext cc upd_flag args body)+bcPrepSingleBind (x, StgRhsClosure ext cc upd_flag args body typ) | isNNLJoinPoint x = ( protectNNLJoinPointId x- , StgRhsClosure ext cc upd_flag (args ++ [voidArgId]) body)+ , StgRhsClosure ext cc upd_flag (args ++ [voidArgId]) body typ) bcPrepSingleBind bnd = bnd bcPrepTopLvl :: StgTopBinding -> BcPrepM StgTopBinding@@ -128,7 +130,7 @@ isNNLJoinPoint :: Id -> Bool isNNLJoinPoint x = isJoinId x && mightBeUnliftedType (idType x) --- Update an Id's type to take a Void# argument.+-- Update an Id's type to take a (# #) argument. -- Precondition: the Id is a not-necessarily-lifted join point. -- See Note [Not-necessarily-lifted join points] protectNNLJoinPointId :: Id -> Id@@ -200,7 +202,7 @@ Our plan is to behave is if the code was f = \(r :: RuntimeRep) (a :: TYPE r) (x :: T).- let j :: (Void# -> a)+ let j :: ((# #) -> a) j = \ _ -> error @r @a "bloop" in case x of A -> j void#
GHC/Stg/CSE.hs view
@@ -319,11 +319,11 @@ where in_scope' = in_scope `extendInScopeSetList` [ bndr | (bndr, _) <- eqs ] stgCseTopLvlRhs :: InScopeSet -> InStgRhs -> OutStgRhs-stgCseTopLvlRhs in_scope (StgRhsClosure ext ccs upd args body)+stgCseTopLvlRhs in_scope (StgRhsClosure ext ccs upd args body typ) = let body' = stgCseExpr (initEnv in_scope) body- in StgRhsClosure ext ccs upd args body'-stgCseTopLvlRhs _ (StgRhsCon ccs dataCon mu ticks args)- = StgRhsCon ccs dataCon mu ticks args+ in StgRhsClosure ext ccs upd args body' typ+stgCseTopLvlRhs _ (StgRhsCon ccs dataCon mu ticks args typ)+ = StgRhsCon ccs dataCon mu ticks args typ ------------------------------ -- The actual AST traversal --@@ -427,7 +427,7 @@ -- The RHS of a binding. -- If it is a constructor application, either short-cut it or extend the environment stgCseRhs :: CseEnv -> OutId -> InStgRhs -> (Maybe (OutId, OutStgRhs), CseEnv)-stgCseRhs env bndr (StgRhsCon ccs dataCon mu ticks args)+stgCseRhs env bndr (StgRhsCon ccs dataCon mu ticks args typ) | Just other_bndr <- envLookup dataCon args' env , not (isWeakLoopBreaker (idOccInfo bndr)) -- See Note [Care with loop breakers] = let env' = addSubst bndr other_bndr env@@ -435,15 +435,15 @@ | otherwise = let env' = addDataCon bndr dataCon args' env -- see Note [Case 1: CSEing allocated closures]- pair = (bndr, StgRhsCon ccs dataCon mu ticks args')+ pair = (bndr, StgRhsCon ccs dataCon mu ticks args' typ) in (Just pair, env') where args' = substArgs env args -stgCseRhs env bndr (StgRhsClosure ext ccs upd args body)+stgCseRhs env bndr (StgRhsClosure ext ccs upd args body typ) = let (env1, args') = substBndrs env args env2 = forgetCse env1 -- See Note [Free variables of an StgClosure] body' = stgCseExpr env2 body- in (Just (substVar env bndr, StgRhsClosure ext ccs upd args' body'), env)+ in (Just (substVar env bndr, StgRhsClosure ext ccs upd args' body' typ), env) mkStgCase :: StgExpr -> OutId -> AltType -> [StgAlt] -> StgExpr
GHC/Stg/Debug.hs view
@@ -16,7 +16,7 @@ import GHC.Core.DataCon import GHC.Types.IPE import GHC.Unit.Module-import GHC.Types.Name ( getName, getOccName, occNameString, nameSrcSpan )+import GHC.Types.Name ( getName, getOccName, occNameFS, nameSrcSpan) import GHC.Data.FastString import Control.Monad (when)@@ -29,7 +29,7 @@ import qualified Data.List.NonEmpty as NE import Data.List.NonEmpty (NonEmpty(..)) -data SpanWithLabel = SpanWithLabel RealSrcSpan String+data SpanWithLabel = SpanWithLabel RealSrcSpan LexicalFastString data StgDebugOpts = StgDebugOpts { stgDebug_infoTableMap :: !Bool@@ -68,26 +68,22 @@ return (StgRec es) collectStgRhs :: Id -> StgRhs -> M StgRhs-collectStgRhs bndr rhs =- case rhs of- StgRhsClosure ext cc us bs e -> do- e' <- with_span $ collectExpr e- recordInfo bndr e'- return $ StgRhsClosure ext cc us bs e'- StgRhsCon cc dc _mn ticks args -> do- n' <- with_span $ numberDataCon dc ticks- return (StgRhsCon cc dc n' ticks args)- where- -- If the binder name has a span, use that initially as the source position- -- in case we don't get anything better- with_span :: M a -> M a- with_span =- let name = idName bndr in- case nameSrcSpan name of- RealSrcSpan pos _ ->- withSpan (pos, occNameString (getOccName name))- _ -> id+collectStgRhs bndr (StgRhsClosure ext cc us bs e t) = do+ let+ name = idName bndr+ -- If the name has a span, use that initially as the source position in-case+ -- we don't get anything better.+ with_span = case nameSrcSpan name of+ RealSrcSpan pos _ -> withSpan (pos, LexicalFastString $ occNameFS (getOccName name))+ _ -> id+ e' <- with_span $ collectExpr e+ recordInfo bndr e'+ return $ StgRhsClosure ext cc us bs e' t+collectStgRhs _bndr (StgRhsCon cc dc _mn ticks args typ) = do+ n' <- numberDataCon dc ticks+ return (StgRhsCon cc dc n' ticks args typ) + recordInfo :: Id -> StgExpr -> M () recordInfo bndr new_rhs = do modLoc <- asks rModLocation@@ -96,7 +92,7 @@ -- A span from the ticks surrounding the new_rhs best_span = quickSourcePos thisFile new_rhs -- A back-up span if the bndr had a source position, many do not (think internally generated ids)- bndr_span = (\s -> SpanWithLabel s (occNameString (getOccName bndr)))+ bndr_span = (\s -> SpanWithLabel s (LexicalFastString $ occNameFS (getOccName bndr))) <$> srcSpanToRealSrcSpan (nameSrcSpan (getName bndr)) recordStgIdPosition bndr best_span bndr_span @@ -214,7 +210,7 @@ 1. Data constructors to a list of where they are used. 2. `Name`s and where they originate from. 3. Stack represented info tables (return frames) to an approximated source location- of the call that pushed a continuation on the stacks.+ of the call that pushed a contiunation on the stacks. During the CoreToStg phase, this map is populated whenever something is turned into a StgRhsClosure or an StgConApp. The current source position is recorded@@ -257,7 +253,7 @@ In the old times, each usage of a data constructor used the same info table. This made it impossible to distinguish which actual usage of a data constructor was-contributing primarily to the allocation in a program. Using the `-fdistinct-constructor-tables` flag you+contributing primarily to the allocation in a program. Using the `-fdistinct-info-tables` flag you can cause code generation to generate a distinct info table for each usage of a constructor. Then, when inspecting the heap you can see precisely which usage of a constructor was responsible for each allocation.
GHC/Stg/FVs.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE LambdaCase #-} {- | Non-global free variable analysis on STG terms. This pass annotates@@ -84,26 +85,31 @@ -- with the free variables needed in the closure -- * Each StgCase is correctly annotated (in its extension field) with -- the variables that must be saved across the case-depSortWithAnnotStgPgm :: Module -> [StgTopBinding] -> [CgStgTopBinding]+depSortWithAnnotStgPgm :: Module -> [StgTopBinding] -> [(CgStgTopBinding,ImpFVs)] depSortWithAnnotStgPgm this_mod binds = {-# SCC "STG.depSortWithAnnotStgPgm" #-}- lit_binds ++ map from_scc sccs+ zip lit_binds (repeat emptyVarSet) ++ map from_scc sccs where lit_binds :: [CgStgTopBinding] pairs :: [(Id, StgRhs)] (lit_binds, pairs) = flattenTopStgBindings binds - nodes :: [Node Name (Id, CgStgRhs)]+ nodes :: [Node Name (Id, CgStgRhs, ImpFVs)] nodes = map (annotateTopPair env0) pairs env0 = Env { locals = emptyVarSet, mod = this_mod } -- Do strongly connected component analysis. Why? -- See Note [Why do we need dependency analysis?]- sccs :: [SCC (Id,CgStgRhs)]+ sccs :: [SCC (Id,CgStgRhs,ImpFVs)] sccs = stronglyConnCompFromEdgedVerticesUniq nodes - from_scc (CyclicSCC pairs) = StgTopLifted (StgRec pairs)- from_scc (AcyclicSCC (bndr,rhs)) = StgTopLifted (StgNonRec bndr rhs)+ from_scc = \case+ AcyclicSCC (bndr,rhs,imp_fvs) -> (StgTopLifted (StgNonRec bndr rhs), imp_fvs)+ CyclicSCC triples -> (StgTopLifted (StgRec pairs), imp_fvs)+ where+ (ids,rhss,imp_fvss) = unzip3 triples+ pairs = zip ids rhss+ imp_fvs = unionVarSets imp_fvss flattenTopStgBindings :: [StgTopBinding] -> ([CgStgTopBinding], [(Id,StgRhs)])@@ -119,13 +125,13 @@ flatten_one (StgNonRec b r) = [(b,r)] flatten_one (StgRec pairs) = pairs -annotateTopPair :: Env -> (Id, StgRhs) -> Node Name (Id, CgStgRhs)+annotateTopPair :: Env -> (Id, StgRhs) -> Node Name (Id, CgStgRhs, ImpFVs) annotateTopPair env0 (bndr, rhs) = DigraphNode { node_key = idName bndr- , node_payload = (bndr, rhs')+ , node_payload = (bndr, rhs', imp_fvs) , node_dependencies = map idName (nonDetEltsUniqSet top_fvs) } where- (rhs', top_fvs, _) = rhsFVs env0 rhs+ (rhs', imp_fvs, top_fvs, _) = rhsFVs env0 rhs -------------------------------------------------------------------------------- -- * Non-global free variable analysis@@ -158,6 +164,12 @@ -- analysis on the top-level bindings. type TopFVs = IdSet +-- | ImpFVs: set of variables that are imported+--+-- It is a /non-deterministic/ set because we use it only to perform module+-- dependency analysis.+type ImpFVs = IdSet+ -- | LocalFVs: set of variable that are: -- (a) bound locally (by a lambda, non-top-level let, or case); that is, -- it appears in the 'locals' field of 'Env'@@ -181,97 +193,100 @@ -- annBindingFreeVars :: Module -> StgBinding -> CgStgBinding-annBindingFreeVars this_mod = fstOf3 . bindingFVs (Env emptyVarSet this_mod) emptyDVarSet+annBindingFreeVars this_mod = fstOf4 . bindingFVs (Env emptyVarSet this_mod) emptyDVarSet -bindingFVs :: Env -> LocalFVs -> StgBinding -> (CgStgBinding, TopFVs, LocalFVs)+bindingFVs :: Env -> LocalFVs -> StgBinding -> (CgStgBinding, ImpFVs, TopFVs, LocalFVs) bindingFVs env body_fv b = case b of- StgNonRec bndr r -> (StgNonRec bndr r', fvs, lcl_fvs)+ StgNonRec bndr r -> (StgNonRec bndr r', imp_fvs, top_fvs, lcl_fvs) where- (r', fvs, rhs_lcl_fvs) = rhsFVs env r+ (r', imp_fvs, top_fvs, rhs_lcl_fvs) = rhsFVs env r lcl_fvs = delDVarSet body_fv bndr `unionDVarSet` rhs_lcl_fvs - StgRec pairs -> (StgRec pairs', fvs, lcl_fvss)+ StgRec pairs -> (StgRec pairs', imp_fvs, top_fvs, lcl_fvss) where bndrs = map fst pairs env' = addLocals bndrs env- (rhss, rhs_fvss, rhs_lcl_fvss) = mapAndUnzip3 (rhsFVs env' . snd) pairs- fvs = unionVarSets rhs_fvss+ (rhss, rhs_imp_fvss, rhs_top_fvss, rhs_lcl_fvss) = mapAndUnzip4 (rhsFVs env' . snd) pairs+ top_fvs = unionVarSets rhs_top_fvss+ imp_fvs = unionVarSets rhs_imp_fvss pairs' = zip bndrs rhss lcl_fvss = delDVarSetList (unionDVarSets (body_fv:rhs_lcl_fvss)) bndrs -varFVs :: Env -> Id -> (TopFVs, LocalFVs) -> (TopFVs, LocalFVs)-varFVs env v (top_fvs, lcl_fvs)+varFVs :: Env -> Id -> (ImpFVs, TopFVs, LocalFVs) -> (ImpFVs, TopFVs, LocalFVs)+varFVs env v (imp_fvs, top_fvs, lcl_fvs) | v `elemVarSet` locals env -- v is locally bound- = (top_fvs, lcl_fvs `extendDVarSet` v)+ = (imp_fvs, top_fvs, lcl_fvs `extendDVarSet` v) | nameIsLocalOrFrom (mod env) (idName v) -- v is bound at top level- = (top_fvs `extendVarSet` v, lcl_fvs)+ = (imp_fvs, top_fvs `extendVarSet` v, lcl_fvs) | otherwise -- v is imported- = (top_fvs, lcl_fvs)+ = (imp_fvs `extendVarSet` v, top_fvs, lcl_fvs) -exprFVs :: Env -> StgExpr -> (CgStgExpr, TopFVs, LocalFVs)+exprFVs :: Env -> StgExpr -> (CgStgExpr, ImpFVs, TopFVs, LocalFVs) exprFVs env = go where go (StgApp f as)- | (top_fvs, lcl_fvs) <- varFVs env f (argsFVs env as)- = (StgApp f as, top_fvs, lcl_fvs)+ | (imp_fvs, top_fvs, lcl_fvs) <- varFVs env f (argsFVs env as)+ = (StgApp f as, imp_fvs, top_fvs, lcl_fvs) - go (StgLit lit) = (StgLit lit, emptyVarSet, emptyDVarSet)+ go (StgLit lit) = (StgLit lit, emptyVarSet, emptyVarSet, emptyDVarSet) go (StgConApp dc n as tys)- | (top_fvs, lcl_fvs) <- argsFVs env as- = (StgConApp dc n as tys, top_fvs, lcl_fvs)+ | (imp_fvs, top_fvs, lcl_fvs) <- argsFVs env as+ = (StgConApp dc n as tys, imp_fvs, top_fvs, lcl_fvs) go (StgOpApp op as ty)- | (top_fvs, lcl_fvs) <- argsFVs env as- = (StgOpApp op as ty, top_fvs, lcl_fvs)+ | (imp_fvs, top_fvs, lcl_fvs) <- argsFVs env as+ = (StgOpApp op as ty, imp_fvs, top_fvs, lcl_fvs) go (StgCase scrut bndr ty alts)- | (scrut',scrut_top_fvs,scrut_lcl_fvs) <- exprFVs env scrut- , (alts',alts_top_fvss,alts_lcl_fvss)- <- mapAndUnzip3 (altFVs (addLocals [bndr] env)) alts+ | (scrut',scrut_imp_fvs,scrut_top_fvs,scrut_lcl_fvs) <- exprFVs env scrut+ , (alts',alts_imp_fvss,alts_top_fvss,alts_lcl_fvss)+ <- mapAndUnzip4 (altFVs (addLocals [bndr] env)) alts , let top_fvs = scrut_top_fvs `unionVarSet` unionVarSets alts_top_fvss+ imp_fvs = scrut_imp_fvs `unionVarSet` unionVarSets alts_imp_fvss alts_lcl_fvs = unionDVarSets alts_lcl_fvss lcl_fvs = delDVarSet (unionDVarSet scrut_lcl_fvs alts_lcl_fvs) bndr- = (StgCase scrut' bndr ty alts', top_fvs,lcl_fvs)+ = (StgCase scrut' bndr ty alts', imp_fvs, top_fvs, lcl_fvs) go (StgLet ext bind body) = go_bind (StgLet ext) bind body go (StgLetNoEscape ext bind body) = go_bind (StgLetNoEscape ext) bind body go (StgTick tick e)- | (e', top_fvs, lcl_fvs) <- exprFVs env e+ | (e', imp_fvs, top_fvs, lcl_fvs) <- exprFVs env e , let lcl_fvs' = unionDVarSet (tickish tick) lcl_fvs- = (StgTick tick e', top_fvs, lcl_fvs')+ = (StgTick tick e', imp_fvs, top_fvs, lcl_fvs') where tickish (Breakpoint _ _ ids) = mkDVarSet ids tickish _ = emptyDVarSet - go_bind dc bind body = (dc bind' body', top_fvs, lcl_fvs)+ go_bind dc bind body = (dc bind' body', imp_fvs, top_fvs, lcl_fvs) where env' = addLocals (bindersOf bind) env- (body', body_top_fvs, body_lcl_fvs) = exprFVs env' body- (bind', bind_top_fvs, lcl_fvs) = bindingFVs env' body_lcl_fvs bind+ (body', body_imp_fvs, body_top_fvs, body_lcl_fvs) = exprFVs env' body+ (bind', bind_imp_fvs, bind_top_fvs, lcl_fvs) = bindingFVs env' body_lcl_fvs bind top_fvs = bind_top_fvs `unionVarSet` body_top_fvs+ imp_fvs = bind_imp_fvs `unionVarSet` body_imp_fvs -rhsFVs :: Env -> StgRhs -> (CgStgRhs, TopFVs, LocalFVs)-rhsFVs env (StgRhsClosure _ ccs uf bs body)- | (body', top_fvs, lcl_fvs) <- exprFVs (addLocals bs env) body+rhsFVs :: Env -> StgRhs -> (CgStgRhs, ImpFVs, TopFVs, LocalFVs)+rhsFVs env (StgRhsClosure _ ccs uf bs body typ)+ | (body', imp_fvs, top_fvs, lcl_fvs) <- exprFVs (addLocals bs env) body , let lcl_fvs' = delDVarSetList lcl_fvs bs- = (StgRhsClosure lcl_fvs' ccs uf bs body', top_fvs, lcl_fvs')-rhsFVs env (StgRhsCon ccs dc mu ts bs)- | (top_fvs, lcl_fvs) <- argsFVs env bs- = (StgRhsCon ccs dc mu ts bs, top_fvs, lcl_fvs)+ = (StgRhsClosure lcl_fvs' ccs uf bs body' typ, imp_fvs, top_fvs, lcl_fvs')+rhsFVs env (StgRhsCon ccs dc mu ts bs typ)+ | (imp_fvs, top_fvs, lcl_fvs) <- argsFVs env bs+ = (StgRhsCon ccs dc mu ts bs typ, imp_fvs, top_fvs, lcl_fvs) -argsFVs :: Env -> [StgArg] -> (TopFVs, LocalFVs)-argsFVs env = foldl' f (emptyVarSet, emptyDVarSet)+argsFVs :: Env -> [StgArg] -> (ImpFVs, TopFVs, LocalFVs)+argsFVs env = foldl' f (emptyVarSet, emptyVarSet, emptyDVarSet) where- f (fvs,ids) StgLitArg{} = (fvs, ids)- f (fvs,ids) (StgVarArg v) = varFVs env v (fvs, ids)+ f (imp_fvs,fvs,ids) StgLitArg{} = (imp_fvs, fvs, ids)+ f (imp_fvs,fvs,ids) (StgVarArg v) = varFVs env v (imp_fvs, fvs, ids) -altFVs :: Env -> StgAlt -> (CgStgAlt, TopFVs, LocalFVs)+altFVs :: Env -> StgAlt -> (CgStgAlt, ImpFVs, TopFVs, LocalFVs) altFVs env GenStgAlt{alt_con=con, alt_bndrs=bndrs, alt_rhs=e}- | (e', top_fvs, lcl_fvs) <- exprFVs (addLocals bndrs env) e+ | (e', imp_fvs, top_fvs, lcl_fvs) <- exprFVs (addLocals bndrs env) e , let lcl_fvs' = delDVarSetList lcl_fvs bndrs , let newAlt = GenStgAlt{alt_con=con, alt_bndrs=bndrs, alt_rhs=e'}- = (newAlt, top_fvs, lcl_fvs')+ = (newAlt, imp_fvs, top_fvs, lcl_fvs')
GHC/Stg/InferTags.hs view
@@ -27,7 +27,7 @@ import GHC.Stg.InferTags.Rewrite (rewriteTopBinds) import Data.Maybe import GHC.Types.Name.Env (mkNameEnv, NameEnv)-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Utils.Logger import qualified GHC.Unit.Types @@ -212,7 +212,7 @@ a) Tags for let-bindings: When compiling a binding for a constructor like `let x = Just True`- Weither or not `x` results in x pointing depends on the backend.+ Whether `x` will be properly tagged depends on the backend. For the interpreter x points to a BCO which once evaluated returns a properly tagged pointer to the heap object. In the Cmm backend for the same binding we would allocate the constructor right@@ -481,7 +481,7 @@ initSig :: forall p. (Id, GenStgRhs p) -> TagSig -- Initial signature for the fixpoint loop initSig (_bndr, StgRhsCon {}) = TagSig TagTagged-initSig (bndr, StgRhsClosure _ _ _ _ _) =+initSig (bndr, StgRhsClosure _ _ _ _ _ _) = fromMaybe defaultSig (idTagSig_maybe bndr) where defaultSig = (TagSig TagTagged) @@ -516,13 +516,13 @@ -> TagEnv p -- ^ -> GenStgRhs p -- ^ -> (TagSig, GenStgRhs 'InferTaggedBinders)-inferTagRhs bnd_id in_env (StgRhsClosure ext cc upd bndrs body)+inferTagRhs bnd_id in_env (StgRhsClosure ext cc upd bndrs body typ) | isDeadEndId bnd_id && (notNull) bndrs -- See Note [Bottom functions are TagTagged]- = (TagSig TagTagged, StgRhsClosure ext cc upd out_bndrs body')+ = (TagSig TagTagged, StgRhsClosure ext cc upd out_bndrs body' typ) | otherwise = --pprTrace "inferTagRhsClosure" (ppr (_top, _grp_ids, env,info')) $- (TagSig info', StgRhsClosure ext cc upd out_bndrs body')+ (TagSig info', StgRhsClosure ext cc upd out_bndrs body' typ) where out_bndrs | Just marks <- idCbvMarks_maybe bnd_id@@ -553,11 +553,11 @@ | otherwise -> TagDunno in (id, TagSig tag) -inferTagRhs _ env _rhs@(StgRhsCon cc con cn ticks args)+inferTagRhs _ env _rhs@(StgRhsCon cc con cn ticks args typ) -- Constructors, which have untagged arguments to strict fields -- become thunks. We encode this by giving changing RhsCon nodes the info TagDunno = --pprTrace "inferTagRhsCon" (ppr grp_ids) $- (TagSig (inferConTag env con args), StgRhsCon cc con cn ticks args)+ (TagSig (inferConTag env con args), StgRhsCon cc con cn ticks args typ) -- Adjust let semantics to the targeted backend. -- See Note [Tag inference for interpreted code]
GHC/Stg/InferTags/Rewrite.hs view
@@ -1,4 +1,4 @@---+ -- Copyright (c) 2019 Andreas Klebinger -- @@ -22,8 +22,7 @@ import GHC.Builtin.PrimOps ( PrimOp(..) ) import GHC.Types.Basic ( CbvMark (..), isMarkedCbv- , TopLevelFlag(..), isTopLevel- , Levity(..) )+ , TopLevelFlag(..), isTopLevel ) import GHC.Types.Id import GHC.Types.Name import GHC.Types.Unique.Supply@@ -37,7 +36,7 @@ import GHC.Core.Type import GHC.StgToCmm.Types-import GHC.StgToCmm.Closure (mkLFImported)+import GHC.StgToCmm.Closure (importedIdLFInfo) import GHC.Stg.Utils import GHC.Stg.Syntax as StgSyn@@ -258,7 +257,7 @@ (TagSig TagDunno) case nameIsLocalOrFrom this_mod (idName v) of True- | Just Unlifted <- typeLevity_maybe (idType v)+ | definitelyUnliftedType (idType v) -- NB: v might be the Id of a representation-polymorphic join point, -- so we shouldn't use isUnliftedType here. See T22212. -> return True@@ -272,11 +271,11 @@ TagProper -> True TagTagged -> True TagTuple _ -> True -- Consider unboxed tuples tagged.- False -- Imported- -> return $!+ -- Imported+ False -> return $! -- Determine whether it is tagged from the LFInfo of the imported id. -- See Note [The LFInfo of Imported Ids]- case mkLFImported v of+ case importedIdLFInfo v of -- Function, applied not entered. LFReEntrant {} -> True@@ -339,7 +338,7 @@ -- Rewrite a RHS rewriteRhs :: (Id,TagSig) -> InferStgRhs -> RM (TgStgRhs)-rewriteRhs (_id, _tagSig) (StgRhsCon ccs con cn ticks args) = {-# SCC rewriteRhs_ #-} do+rewriteRhs (_id, _tagSig) (StgRhsCon ccs con cn ticks args typ) = {-# SCC rewriteRhs_ #-} do -- pprTraceM "rewriteRhs" (ppr _id) -- Look up the nodes representing the constructor arguments.@@ -355,7 +354,7 @@ let evalArgs = [v | StgVarArg v <- needsEval] :: [Id] if (null evalArgs)- then return $! (StgRhsCon ccs con cn ticks args)+ then return $! (StgRhsCon ccs con cn ticks args typ) else do --assert not (isTaggedSig tagSig) -- pprTraceM "CreatingSeqs for " $ ppr _id <+> ppr node_id@@ -369,13 +368,14 @@ fvs <- fvArgs args -- lcls <- getFVs -- pprTraceM "RhsClosureConversion" (ppr (StgRhsClosure fvs ccs ReEntrant [] $! conExpr) $$ text "lcls:" <> ppr lcls)+ -- We mark the closure updatable to retain sharing in the case that -- conExpr is an infinite recursive data type. See #23783.- return $! (StgRhsClosure fvs ccs Updatable [] $! conExpr)-rewriteRhs _binding (StgRhsClosure fvs ccs flag args body) = do+ return $! (StgRhsClosure fvs ccs Updatable [] $! conExpr) typ+rewriteRhs _binding (StgRhsClosure fvs ccs flag args body typ) = do withBinders NotTopLevel args $ withClosureLcls fvs $- StgRhsClosure fvs ccs flag (map fst args) <$> rewriteExpr body+ StgRhsClosure fvs ccs flag (map fst args) <$> rewriteExpr body <*> pure typ -- return (closure) fvArgs :: [StgArg] -> RM DVarSet
GHC/Stg/InferTags/TagSig.hs view
@@ -13,11 +13,21 @@ import GHC.Prelude import GHC.Types.Var+import GHC.Types.Name.Env( NameEnv ) import GHC.Utils.Outputable import GHC.Utils.Binary import GHC.Utils.Panic.Plain import Data.Coerce +-- | Information to be exposed in interface files which is produced+-- by the stg2stg passes.+type StgCgInfos = NameEnv TagSig++newtype TagSig -- The signature for each binding, this is a newtype as we might+ -- want to track more information in the future.+ = TagSig TagInfo+ deriving (Eq)+ data TagInfo = TagDunno -- We don't know anything about the tag. | TagTuple [TagInfo] -- Represents a function/thunk which when evaluated@@ -45,11 +55,6 @@ 3 -> return TagProper 4 -> return TagTagged _ -> panic ("get TagInfo " ++ show tag)--newtype TagSig -- The signature for each binding, this is a newtype as we might- -- want to track more information in the future.- = TagSig TagInfo- deriving (Eq) instance Outputable TagSig where ppr (TagSig ti) = char '<' <> ppr ti <> char '>'
GHC/Stg/InferTags/Types.hs view
@@ -30,11 +30,6 @@ * * ********************************************************************* -} -type instance BinderP 'InferTaggedBinders = (Id, TagSig)-type instance XLet 'InferTaggedBinders = XLet 'CodeGen-type instance XLetNoEscape 'InferTaggedBinders = XLetNoEscape 'CodeGen-type instance XRhsClosure 'InferTaggedBinders = XRhsClosure 'CodeGen- type InferStgTopBinding = GenStgTopBinding 'InferTaggedBinders type InferStgBinding = GenStgBinding 'InferTaggedBinders type InferStgExpr = GenStgExpr 'InferTaggedBinders
GHC/Stg/Lift.hs view
@@ -198,20 +198,20 @@ -- as lambda binders, discarding all free vars. -> LlStgRhs -> LiftM OutStgRhs-liftRhs mb_former_fvs rhs@(StgRhsCon ccs con mn ts args)+liftRhs mb_former_fvs rhs@(StgRhsCon ccs con mn ts args typ) = assertPpr (isNothing mb_former_fvs) (text "Should never lift a constructor" $$ pprStgRhs panicStgPprOpts rhs) $- StgRhsCon ccs con mn ts <$> traverse liftArgs args-liftRhs Nothing (StgRhsClosure _ ccs upd infos body) =+ StgRhsCon ccs con mn ts <$> traverse liftArgs args <*> pure typ+liftRhs Nothing (StgRhsClosure _ ccs upd infos body typ) = -- This RHS wasn't lifted. withSubstBndrs (map binderInfoBndr infos) $ \bndrs' ->- StgRhsClosure noExtFieldSilent ccs upd bndrs' <$> liftExpr body-liftRhs (Just former_fvs) (StgRhsClosure _ ccs upd infos body) =+ StgRhsClosure noExtFieldSilent ccs upd bndrs' <$> liftExpr body <*> pure typ+liftRhs (Just former_fvs) (StgRhsClosure _ ccs upd infos body typ) = -- This RHS was lifted. Insert extra binders for @former_fvs@. withSubstBndrs (map binderInfoBndr infos) $ \bndrs' -> do let bndrs'' = dVarSetElems former_fvs ++ bndrs'- StgRhsClosure noExtFieldSilent ccs upd bndrs'' <$> liftExpr body+ StgRhsClosure noExtFieldSilent ccs upd bndrs'' <$> liftExpr body <*> pure typ liftArgs :: InStgArg -> LiftM OutStgArg liftArgs a@(StgLitArg _) = pure a
GHC/Stg/Lift/Analysis.hs view
@@ -27,9 +27,13 @@ import GHC.Types.Basic import GHC.Types.Demand import GHC.Types.Id+ import GHC.Runtime.Heap.Layout ( WordOff )+ import GHC.Stg.Lift.Config+import GHC.Stg.Lift.Types import GHC.Stg.Syntax+ import qualified GHC.StgToCmm.ArgRep as StgToCmm.ArgRep import qualified GHC.StgToCmm.Closure as StgToCmm.Closure import qualified GHC.StgToCmm.Layout as StgToCmm.Layout@@ -110,80 +114,6 @@ llTrace _ _ c = c -- llTrace a b c = pprTrace a b c -type instance BinderP 'LiftLams = BinderInfo-type instance XRhsClosure 'LiftLams = DIdSet-type instance XLet 'LiftLams = Skeleton-type instance XLetNoEscape 'LiftLams = Skeleton----- | Captures details of the syntax tree relevant to the cost model, such as--- closures, multi-shot lambdas and case expressions.-data Skeleton- = ClosureSk !Id !DIdSet {- ^ free vars -} !Skeleton- | RhsSk !Card {- ^ how often the RHS was entered -} !Skeleton- | AltSk !Skeleton !Skeleton- | BothSk !Skeleton !Skeleton- | NilSk--bothSk :: Skeleton -> Skeleton -> Skeleton-bothSk NilSk b = b-bothSk a NilSk = a-bothSk a b = BothSk a b--altSk :: Skeleton -> Skeleton -> Skeleton-altSk NilSk b = b-altSk a NilSk = a-altSk a b = AltSk a b--rhsSk :: Card -> Skeleton -> Skeleton-rhsSk _ NilSk = NilSk-rhsSk body_dmd skel = RhsSk body_dmd skel---- | The type used in binder positions in 'GenStgExpr's.-data BinderInfo- = BindsClosure !Id !Bool -- ^ Let(-no-escape)-bound thing with a flag- -- indicating whether it occurs as an argument- -- or in a nullary application- -- (see "GHC.Stg.Lift.Analysis#arg_occs").- | BoringBinder !Id -- ^ Every other kind of binder---- | Gets the bound 'Id' out a 'BinderInfo'.-binderInfoBndr :: BinderInfo -> Id-binderInfoBndr (BoringBinder bndr) = bndr-binderInfoBndr (BindsClosure bndr _) = bndr---- | Returns 'Nothing' for 'BoringBinder's and 'Just' the flag indicating--- occurrences as argument or in a nullary applications otherwise.-binderInfoOccursAsArg :: BinderInfo -> Maybe Bool-binderInfoOccursAsArg BoringBinder{} = Nothing-binderInfoOccursAsArg (BindsClosure _ b) = Just b--instance Outputable Skeleton where- ppr NilSk = text ""- ppr (AltSk l r) = vcat- [ text "{ " <+> ppr l- , text "ALT"- , text " " <+> ppr r- , text "}"- ]- ppr (BothSk l r) = ppr l $$ ppr r- ppr (ClosureSk f fvs body) = ppr f <+> ppr fvs $$ nest 2 (ppr body)- ppr (RhsSk card body) = hcat- [ lambda- , ppr card- , dot- , ppr body- ]--instance Outputable BinderInfo where- ppr = ppr . binderInfoBndr--instance OutputableBndr BinderInfo where- pprBndr b = pprBndr b . binderInfoBndr- pprPrefixOcc = pprPrefixOcc . binderInfoBndr- pprInfixOcc = pprInfixOcc . binderInfoBndr- bndrIsJoin_maybe = bndrIsJoin_maybe . binderInfoBndr- mkArgOccs :: [StgArg] -> IdSet mkArgOccs = mkVarSet . mapMaybe stg_arg_var where@@ -311,10 +241,10 @@ bndr' = BindsClosure bndr (bndr `elemVarSet` scope_occs) tagSkeletonRhs :: Id -> CgStgRhs -> (Skeleton, IdSet, LlStgRhs)-tagSkeletonRhs _ (StgRhsCon ccs dc mn ts args)- = (NilSk, mkArgOccs args, StgRhsCon ccs dc mn ts args)-tagSkeletonRhs bndr (StgRhsClosure fvs ccs upd bndrs body)- = (rhs_skel, body_arg_occs, StgRhsClosure fvs ccs upd bndrs' body')+tagSkeletonRhs _ (StgRhsCon ccs dc mn ts args typ)+ = (NilSk, mkArgOccs args, StgRhsCon ccs dc mn ts args typ)+tagSkeletonRhs bndr (StgRhsClosure fvs ccs upd bndrs body typ)+ = (rhs_skel, body_arg_occs, StgRhsClosure fvs ccs upd bndrs' body' typ) where bndrs' = map BoringBinder bndrs (body_skel, body_arg_occs, body') = tagSkeletonExpr body@@ -400,7 +330,7 @@ -- We don't lift updatable thunks or constructors any_memoized = any is_memoized_rhs rhss is_memoized_rhs StgRhsCon{} = True- is_memoized_rhs (StgRhsClosure _ _ upd _ _) = isUpdatable upd+ is_memoized_rhs (StgRhsClosure _ _ upd _ _ _) = isUpdatable upd -- Don't lift binders occurring as arguments. This would result in complex -- argument expressions which would have to be given a name, reintroducing@@ -469,7 +399,7 @@ rhsLambdaBndrs :: LlStgRhs -> [Id] rhsLambdaBndrs StgRhsCon{} = []-rhsLambdaBndrs (StgRhsClosure _ _ _ bndrs _) = map binderInfoBndr bndrs+rhsLambdaBndrs (StgRhsClosure _ _ _ bndrs _ _) = map binderInfoBndr bndrs -- | The size in words of a function closure closing over the given 'Id's, -- including the header.
GHC/Stg/Lift/Monad.hs view
@@ -197,12 +197,12 @@ -- | Omitting this makes for strange closure allocation schemes that crash the -- GC. removeRhsCCCS :: GenStgRhs pass -> GenStgRhs pass-removeRhsCCCS (StgRhsClosure ext ccs upd bndrs body)+removeRhsCCCS (StgRhsClosure ext ccs upd bndrs body typ) | isCurrentCCS ccs- = StgRhsClosure ext dontCareCCS upd bndrs body-removeRhsCCCS (StgRhsCon ccs con mu ts args)+ = StgRhsClosure ext dontCareCCS upd bndrs body typ+removeRhsCCCS (StgRhsCon ccs con mu ts args typ) | isCurrentCCS ccs- = StgRhsCon dontCareCCS con mu ts args+ = StgRhsCon dontCareCCS con mu ts args typ removeRhsCCCS rhs = rhs -- | The analysis monad consists of the following 'RWST' components:@@ -275,15 +275,13 @@ -- binder and fresh name generation. withLiftedBndr :: DIdSet -> Id -> (Id -> LiftM a) -> LiftM a withLiftedBndr abs_ids bndr inner = do- uniq <- getUniqueM let str = fsLit "$l" `appendFS` occNameFS (getOccName bndr) let ty = mkLamTypes (dVarSetElems abs_ids) (idType bndr)- let bndr'+ bndr' <- -- See Note [transferPolyIdInfo] in GHC.Types.Id. We need to do this at least -- for arity information.- = transferPolyIdInfo bndr (dVarSetElems abs_ids)- . mkSysLocal str uniq ManyTy- $ ty+ transferPolyIdInfo bndr (dVarSetElems abs_ids)+ <$> mkSysLocalM str ManyTy ty LiftM $ RWS.local (\e -> e { e_subst = extendSubst bndr bndr' $ extendInScope bndr' $ e_subst e
+ GHC/Stg/Lift/Types.hs view
@@ -0,0 +1,92 @@+{-# LANGUAGE TypeFamilies, DataKinds, GADTs, FlexibleInstances #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE ConstraintKinds #-}++-- This module declares some basic types used by GHC.Stg.Lift+-- We can import this module into GHC.Stg.Syntax, where the+-- type instance declartions for BinderP etc live++module GHC.Stg.Lift.Types(+ Skeleton(..),+ bothSk, altSk, rhsSk,++ BinderInfo(..),+ binderInfoBndr, binderInfoOccursAsArg+ ) where++import GHC.Prelude++import GHC.Types.Id+import GHC.Types.Demand+import GHC.Types.Var.Set++import GHC.Utils.Outputable++-- | Captures details of the syntax tree relevant to the cost model, such as+-- closures, multi-shot lambdas and case expressions.+data Skeleton+ = ClosureSk !Id !DIdSet {- ^ free vars -} !Skeleton+ | RhsSk !Card {- ^ how often the RHS was entered -} !Skeleton+ | AltSk !Skeleton !Skeleton+ | BothSk !Skeleton !Skeleton+ | NilSk++bothSk :: Skeleton -> Skeleton -> Skeleton+bothSk NilSk b = b+bothSk a NilSk = a+bothSk a b = BothSk a b++altSk :: Skeleton -> Skeleton -> Skeleton+altSk NilSk b = b+altSk a NilSk = a+altSk a b = AltSk a b++rhsSk :: Card -> Skeleton -> Skeleton+rhsSk _ NilSk = NilSk+rhsSk body_dmd skel = RhsSk body_dmd skel++-- | The type used in binder positions in 'GenStgExpr's.+data BinderInfo+ = BindsClosure !Id !Bool -- ^ Let(-no-escape)-bound thing with a flag+ -- indicating whether it occurs as an argument+ -- or in a nullary application+ -- (see "GHC.Stg.Lift.Analysis#arg_occs").+ | BoringBinder !Id -- ^ Every other kind of binder++-- | Gets the bound 'Id' out a 'BinderInfo'.+binderInfoBndr :: BinderInfo -> Id+binderInfoBndr (BoringBinder bndr) = bndr+binderInfoBndr (BindsClosure bndr _) = bndr++-- | Returns 'Nothing' for 'BoringBinder's and 'Just' the flag indicating+-- occurrences as argument or in a nullary applications otherwise.+binderInfoOccursAsArg :: BinderInfo -> Maybe Bool+binderInfoOccursAsArg BoringBinder{} = Nothing+binderInfoOccursAsArg (BindsClosure _ b) = Just b++instance Outputable Skeleton where+ ppr NilSk = text ""+ ppr (AltSk l r) = vcat+ [ text "{ " <+> ppr l+ , text "ALT"+ , text " " <+> ppr r+ , text "}"+ ]+ ppr (BothSk l r) = ppr l $$ ppr r+ ppr (ClosureSk f fvs body) = ppr f <+> ppr fvs $$ nest 2 (ppr body)+ ppr (RhsSk card body) = hcat+ [ lambda+ , ppr card+ , dot+ , ppr body+ ]++instance Outputable BinderInfo where+ ppr = ppr . binderInfoBndr++instance OutputableBndr BinderInfo where+ pprBndr b = pprBndr b . binderInfoBndr+ pprPrefixOcc = pprPrefixOcc . binderInfoBndr+ pprInfixOcc = pprInfixOcc . binderInfoBndr+ bndrIsJoin_maybe = bndrIsJoin_maybe . binderInfoBndr+
GHC/Stg/Lint.hs view
@@ -149,7 +149,7 @@ Nothing -> return () Just msg -> do- logMsg logger Err.MCDump noSrcSpan+ logMsg logger Err.MCInfo noSrcSpan -- See Note [MCInfo for Lint] in "GHC.Core.Lint" $ withPprStyle defaultDumpStyle (vcat [ text "*** Stg Lint ErrMsgs: in" <+> text whodunit <+> text "***",@@ -247,25 +247,25 @@ opts <- getStgPprOpts let rhs' = pprStgRhs opts rhs case rhs of- StgRhsClosure _ ccs _ _ _+ StgRhsClosure _ ccs _ _ _ _ | isCurrentCCS ccs -> addErrL (text "Top-level StgRhsClosure with CurrentCCS" $$ rhs')- StgRhsCon ccs _ _ _ _+ StgRhsCon ccs _ _ _ _ _ | isCurrentCCS ccs -> addErrL (text "Top-level StgRhsCon with CurrentCCS" $$ rhs') _ -> return () lintStgRhs :: (OutputablePass a, BinderP a ~ Id) => GenStgRhs a -> LintM () -lintStgRhs (StgRhsClosure _ _ _ [] expr)+lintStgRhs (StgRhsClosure _ _ _ [] expr _) = lintStgExpr expr -lintStgRhs (StgRhsClosure _ _ _ binders expr)+lintStgRhs (StgRhsClosure _ _ _ binders expr _) = addLoc (LambdaBodyOf binders) $ addInScopeVars binders $ lintStgExpr expr -lintStgRhs rhs@(StgRhsCon _ con _ _ args) = do+lintStgRhs rhs@(StgRhsCon _ con _ _ args _) = do opts <- getStgPprOpts when (isUnboxedTupleDataCon con || isUnboxedSumDataCon con) $ do addErrL (text "StgRhsCon is an unboxed tuple or sum application" $$
GHC/Stg/Pipeline.hs view
@@ -33,6 +33,7 @@ import GHC.Utils.Error import GHC.Types.Var+import GHC.Types.Var.Set import GHC.Types.Unique.Supply import GHC.Utils.Outputable import GHC.Utils.Logger@@ -41,8 +42,7 @@ import Control.Monad.Trans.Reader import GHC.Settings (Platform) import GHC.Stg.InferTags (inferTags)-import GHC.Types.Name.Env (NameEnv)-import GHC.Stg.InferTags.TagSig (TagSig)+import GHC.Stg.InferTags.TagSig ( StgCgInfos ) data StgPipelineOpts = StgPipelineOpts { stgPipeline_phases :: ![StgToDo]@@ -57,15 +57,11 @@ newtype StgM a = StgM { _unStgM :: ReaderT Char IO a } deriving (Functor, Applicative, Monad, MonadIO) --- | Information to be exposed in interface files which is produced--- by the stg2stg passes.-type StgCgInfos = NameEnv TagSig- instance MonadUnique StgM where- getUniqueSupplyM = StgM $ do { tag <- ask- ; liftIO $! mkSplitUniqSupply tag}- getUniqueM = StgM $ do { tag <- ask- ; liftIO $! uniqFromTag tag}+ getUniqueSupplyM = StgM $ do { mask <- ask+ ; liftIO $! mkSplitUniqSupply mask}+ getUniqueM = StgM $ do { mask <- ask+ ; liftIO $! uniqFromMask mask} runStgM :: Char -> StgM a -> IO a runStgM mask (StgM m) = runReaderT m mask@@ -75,7 +71,7 @@ -> StgPipelineOpts -> Module -- ^ module being compiled -> [StgTopBinding] -- ^ input program- -> IO ([CgStgTopBinding], StgCgInfos) -- output program+ -> IO ([(CgStgTopBinding,IdSet)], StgCgInfos) -- output program stg2stg logger extra_vars opts this_mod binds = do { dump_when Opt_D_dump_stg_from_core "Initial STG:" binds ; showPass logger "Stg2Stg"@@ -93,9 +89,10 @@ -- sorting pass is necessary. -- This pass will also augment each closure with non-global free variables -- annotations (which is used by code generator to compute offsets into closures)- ; let binds_sorted_with_fvs = depSortWithAnnotStgPgm this_mod binds'+ ; let (binds_sorted_with_fvs, imp_fvs) = unzip (depSortWithAnnotStgPgm this_mod binds') -- See Note [Tag inference for interactive contexts]- ; inferTags (stgPipeline_pprOpts opts) (stgPipeline_forBytecode opts) logger this_mod binds_sorted_with_fvs+ ; (cg_binds, cg_infos) <- inferTags (stgPipeline_pprOpts opts) (stgPipeline_forBytecode opts) logger this_mod binds_sorted_with_fvs+ ; pure (zip cg_binds imp_fvs, cg_infos) } where
GHC/Stg/Stats.hs view
@@ -122,10 +122,10 @@ statRhs :: Bool -> (Id, StgRhs) -> StatEnv -statRhs top (_, StgRhsCon _ _ _ _ _)+statRhs top (_, StgRhsCon _ _ _ _ _ _) = countOne (ConstructorBinds top) -statRhs top (_, StgRhsClosure _ _ u _ body)+statRhs top (_, StgRhsClosure _ _ u _ body _) = statExpr body `combineSE` countOne ( case u of
GHC/Stg/Syntax.hs view
@@ -68,28 +68,37 @@ import GHC.Prelude -import GHC.Core ( AltCon )+import GHC.Stg.InferTags.TagSig( TagSig )+import GHC.Stg.Lift.Types+ -- To avoid having an orphan instances for BinderP, XLet etc+ import GHC.Types.CostCentre ( CostCentreStack )-import Data.ByteString ( ByteString )-import Data.Data ( Data )-import Data.List ( intersperse )++import GHC.Core ( AltCon ) import GHC.Core.DataCon+import GHC.Core.TyCon ( PrimRep(..), TyCon )+import GHC.Core.Type ( Type )+import GHC.Core.Ppr( {- instances -} )+ import GHC.Types.ForeignCall ( ForeignCall ) import GHC.Types.Id import GHC.Types.Name ( isDynLinkName ) import GHC.Types.Tickish ( StgTickish ) import GHC.Types.Var.Set import GHC.Types.Literal ( Literal, literalType )+import GHC.Types.RepType ( typePrimRep1, typePrimRep )+ import GHC.Unit.Module ( Module ) import GHC.Utils.Outputable+import GHC.Utils.Panic.Plain+ import GHC.Platform-import GHC.Core.Ppr( {- instances -} ) import GHC.Builtin.PrimOps ( PrimOp, PrimCall )-import GHC.Core.TyCon ( PrimRep(..), TyCon )-import GHC.Core.Type ( Type )-import GHC.Types.RepType ( typePrimRep1, typePrimRep )-import GHC.Utils.Panic.Plain +import Data.ByteString ( ByteString )+import Data.Data ( Data )+import Data.List ( intersperse )+ {- ************************************************************************ * *@@ -165,10 +174,9 @@ -- -- The coercion argument here gets VoidRep isAddrRep :: PrimRep -> Bool-isAddrRep AddrRep = True-isAddrRep LiftedRep = True-isAddrRep UnliftedRep = True-isAddrRep _ = False+isAddrRep AddrRep = True+isAddrRep (BoxedRep _) = True -- FIXME: not true for JavaScript+isAddrRep _ = False -- | Type of an @StgArg@ --@@ -228,6 +236,52 @@ There are specialised forms of application, for constructors, primitives, and literals.++Note [Constructor applications in STG]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+After the unarisation pass:+* In `StgConApp` and `StgRhsCon` and `StgAlt` we filter out the void arguments,+ leaving only non-void ones.+* In `StgApp` and `StgOpApp` we retain void arguments.++We can do this because we know that `StgConApp` and `StgRhsCon` are saturated applications,+so we lose no information by dropping those void args. In contrast, in `StgApp` we need the+ void argument to compare the number of args in the call with the arity of the function.++This is an open design choice. We could instead choose to treat all these applications+consistently (keeping the void args). But for some reason we don't, and this Note simply+documents that design choice.++As an example, consider:++ data T a = MkT !Int a Void#++The wrapper's representation and the worker's representation (i.e. the+datacon's Core representation) are respectively:++ $WMkT :: Int -> a -> Void# -> T a+ MkT :: Int# -> a -> Void# -> T a++T would end up being used in STG post-unarise as:++ let x = MkT 1# y+ in ...+ case x of+ MkT int a -> ...++The Void# argument is dropped. In essence we only generate binders for runtime+relevant values.++We also flatten out unboxed tuples in this process. See the unarise+pass for details on how this is done. But as an example consider+`data S = MkS Bool (# Bool | Char #)` which when matched on would+result in an alternative with three binders like this++ MkS bool tag tpl_field ->++See Note [Translating unboxed sums to unboxed tuples] and Note [Unarisation]+for the details of this transformation.+ -} | StgLit Literal@@ -236,7 +290,7 @@ -- which can't be let-bound | StgConApp DataCon ConstructorNumber- [StgArg] -- Saturated. (After Unarisation, [NonVoid StgArg])+ [StgArg] -- Saturated. See Note [Constructor applications in STG] [Type] -- See Note [Types in StgConApp] in GHC.Stg.Unarise | StgOpApp StgOp -- Primitive op or foreign call@@ -384,6 +438,7 @@ [BinderP pass] -- ^ arguments; if empty, then not a function; -- as above, order is important. (GenStgExpr pass) -- ^ body+ Type -- ^ result type {- An example may be in order. Consider:@@ -412,7 +467,8 @@ -- are not allocated. ConstructorNumber [StgTickish]- [StgArg] -- Args+ [StgArg] -- Saturated Args. See Note [Constructor applications in STG]+ Type -- Type, for rewriting to an StgRhsClosure -- | Like 'GHC.Hs.Extension.NoExtField', but with an 'Outputable' instance that -- returns 'empty'.@@ -430,14 +486,14 @@ -- implications on build time... stgRhsArity :: StgRhs -> Int-stgRhsArity (StgRhsClosure _ _ _ bndrs _)+stgRhsArity (StgRhsClosure _ _ _ bndrs _ _) = assert (all isId bndrs) $ length bndrs -- The arity never includes type parameters, but they should have gone by now stgRhsArity (StgRhsCon {}) = 0 freeVarsOfRhs :: (XRhsClosure pass ~ DIdSet) => GenStgRhs pass -> DIdSet-freeVarsOfRhs (StgRhsCon _ _ _ _ args) = mkDVarSet [ id | StgVarArg id <- args ]-freeVarsOfRhs (StgRhsClosure fvs _ _ _ _) = fvs+freeVarsOfRhs (StgRhsCon _ _ _ _ args _) = mkDVarSet [ id | StgVarArg id <- args ]+freeVarsOfRhs (StgRhsClosure fvs _ _ _ _ _) = fvs {- ************************************************************************@@ -600,25 +656,34 @@ | CodeGen type family BinderP (pass :: StgPass)-type instance BinderP 'Vanilla = Id-type instance BinderP 'CodeGen = Id-type instance BinderP 'InferTagged = Id+type instance BinderP 'Vanilla = Id+type instance BinderP 'CodeGen = Id+type instance BinderP 'InferTagged = Id+type instance BinderP 'InferTaggedBinders = (Id, TagSig)+type instance BinderP 'LiftLams = BinderInfo type family XRhsClosure (pass :: StgPass)-type instance XRhsClosure 'Vanilla = NoExtFieldSilent-type instance XRhsClosure 'InferTagged = NoExtFieldSilent+type instance XRhsClosure 'Vanilla = NoExtFieldSilent+type instance XRhsClosure 'LiftLams = DIdSet+type instance XRhsClosure 'InferTagged = NoExtFieldSilent+type instance XRhsClosure 'InferTaggedBinders = XRhsClosure 'CodeGen -- | Code gen needs to track non-global free vars type instance XRhsClosure 'CodeGen = DIdSet + type family XLet (pass :: StgPass)-type instance XLet 'Vanilla = NoExtFieldSilent-type instance XLet 'InferTagged = NoExtFieldSilent-type instance XLet 'CodeGen = NoExtFieldSilent+type instance XLet 'Vanilla = NoExtFieldSilent+type instance XLet 'LiftLams = Skeleton+type instance XLet 'InferTagged = NoExtFieldSilent+type instance XLet 'InferTaggedBinders = XLet 'CodeGen+type instance XLet 'CodeGen = NoExtFieldSilent type family XLetNoEscape (pass :: StgPass)-type instance XLetNoEscape 'Vanilla = NoExtFieldSilent-type instance XLetNoEscape 'InferTagged = NoExtFieldSilent-type instance XLetNoEscape 'CodeGen = NoExtFieldSilent+type instance XLetNoEscape 'Vanilla = NoExtFieldSilent+type instance XLetNoEscape 'LiftLams = Skeleton+type instance XLetNoEscape 'InferTagged = NoExtFieldSilent+type instance XLetNoEscape 'InferTaggedBinders = XLetNoEscape 'CodeGen+type instance XLetNoEscape 'CodeGen = NoExtFieldSilent {- @@ -874,14 +939,14 @@ pprStgRhs :: OutputablePass pass => StgPprOpts -> GenStgRhs pass -> SDoc pprStgRhs opts rhs = case rhs of- StgRhsClosure ext cc upd_flag args body+ StgRhsClosure ext cc upd_flag args body _ -> hang (hsep [ if stgSccEnabled opts then ppr cc else empty , ppUnlessOption sdocSuppressStgExts (ppr ext) , char '\\' <> ppr upd_flag, brackets (interppSP args) ]) 4 (pprStgExpr opts body) - StgRhsCon cc con mid _ticks args+ StgRhsCon cc con mid _ticks args _ -> hcat [ if stgSccEnabled opts then ppr cc <> space else empty , case mid of NoNumber -> empty
GHC/Stg/Unarise.hs view
@@ -480,14 +480,14 @@ = StgRec <$> mapM (\(x, rhs) -> (x,) <$> unariseRhs rho rhs) xrhss unariseRhs :: UnariseEnv -> StgRhs -> UniqSM StgRhs-unariseRhs rho (StgRhsClosure ext ccs update_flag args expr)+unariseRhs rho (StgRhsClosure ext ccs update_flag args expr typ) = do (rho', args1) <- unariseFunArgBinders rho args expr' <- unariseExpr rho' expr- return (StgRhsClosure ext ccs update_flag args1 expr')+ return (StgRhsClosure ext ccs update_flag args1 expr' typ) -unariseRhs rho (StgRhsCon ccs con mu ts args)+unariseRhs rho (StgRhsCon ccs con mu ts args typ) = assert (not (isUnboxedTupleDataCon con || isUnboxedSumDataCon con))- return (StgRhsCon ccs con mu ts (unariseConArgs rho args))+ return (StgRhsCon ccs con mu ts (unariseConArgs rho args) typ) --------------------------------------------------------------------------------
GHC/StgToByteCode.hs view
@@ -15,7 +15,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Env import GHC.ByteCode.Instr@@ -53,6 +53,7 @@ import GHC.Builtin.Types.Prim import GHC.Core.TyCo.Ppr ( pprType ) import GHC.Utils.Error+import GHC.Types.Unique import GHC.Builtin.Uniques import GHC.Data.FastString import GHC.Utils.Panic@@ -80,8 +81,10 @@ import Data.ByteString (ByteString) import Data.Map (Map) import Data.IntMap (IntMap)+import Data.List.NonEmpty (NonEmpty(..)) import qualified Data.Map as Map import qualified Data.IntMap as IntMap+import qualified Data.List.NonEmpty as NE import qualified GHC.Data.FiniteMap as Map import Data.Ord import GHC.Stack.CCS@@ -239,7 +242,7 @@ -> Either [CgStgAlt] (CgStgRhs) -- ^ original expression; for debugging only -> Int -- ^ arity- -> Word16 -- ^ bitmap size+ -> WordOff -- ^ bitmap size -> [StgWord] -- ^ bitmap -> Bool -- ^ True <=> is a return point, rather than a function -> [FFIInfo]@@ -249,7 +252,7 @@ protoBCOName = nm, protoBCOInstrs = maybe_with_stack_check, protoBCOBitmap = bitmap,- protoBCOBitmapSize = bitmap_size,+ protoBCOBitmapSize = fromIntegral bitmap_size, protoBCOArity = arity, protoBCOExpr = origin, protoBCOFFIs = ffis@@ -293,10 +296,10 @@ argBits _ [] = [] argBits platform (rep : args) | isFollowableArg rep = False : argBits platform args- | otherwise = take (argRepSizeW platform rep) (repeat True) ++ argBits platform args+ | otherwise = replicate (argRepSizeW platform rep) True ++ argBits platform args -non_void :: [ArgRep] -> [ArgRep]-non_void = filter nv+non_void :: NonEmpty ArgRep -> [ArgRep]+non_void = NE.filter nv where nv V = False nv _ = True @@ -349,8 +352,8 @@ -- underlying expression collect :: CgStgRhs -> ([Var], CgStgExpr)-collect (StgRhsClosure _ _ _ args body) = (args, body)-collect (StgRhsCon _cc dc cnum _ticks args) = ([], StgConApp dc cnum args [])+collect (StgRhsClosure _ _ _ args body _) = (args, body)+collect (StgRhsCon _cc dc cnum _ticks args _typ) = ([], StgConApp dc cnum args []) schemeR_wrk :: [Id]@@ -389,25 +392,24 @@ schemeER_wrk d p (StgTick (Breakpoint tick_ty tick_no fvs) rhs) = do code <- schemeE d 0 p rhs cc_arr <- getCCArray+ this_mod <- moduleName <$> getCurrentModule platform <- profilePlatform <$> getProfile let idOffSets = getVarOffSets platform d p fvs ty_vars = tyCoVarsOfTypesWellScoped (tick_ty:map idType fvs)- let breakInfo = dehydrateCgBreakInfo ty_vars idOffSets tick_ty+ let toWord :: Maybe (Id, WordOff) -> Maybe (Id, Word)+ toWord = fmap (\(i, wo) -> (i, fromIntegral wo))+ breakInfo = dehydrateCgBreakInfo ty_vars (map toWord idOffSets) tick_ty newBreakInfo tick_no breakInfo hsc_env <- getHscEnv let cc | Just interp <- hsc_interp hsc_env , interpreterProfiled interp = cc_arr ! tick_no | otherwise = toRemotePtr nullPtr- mb_mod_name <- getCurrentModuleName- case mb_mod_name of- Just mod_ptr -> do- let breakInstr = BRK_FUN (fromIntegral tick_no) mod_ptr cc- return $ breakInstr `consOL` code- Nothing -> return code+ let breakInstr = BRK_FUN (fromIntegral tick_no) (getUnique this_mod) cc+ return $ breakInstr `consOL` code schemeER_wrk d p rhs = schemeE d 0 p rhs -getVarOffSets :: Platform -> StackDepth -> BCEnv -> [Id] -> [Maybe (Id, Word16)]+getVarOffSets :: Platform -> StackDepth -> BCEnv -> [Id] -> [Maybe (Id, WordOff)] getVarOffSets platform depth env = map getOffSet where getOffSet id = case lookupBCEnv_maybe id env of@@ -420,23 +422,9 @@ -- this "adjustment" is needed due to stack manipulation for -- BRK_FUN in Interpreter.c In any case, this is used only when -- we trigger a breakpoint.- let !var_depth_ws =- trunc16W $ bytesToWords platform (depth - offset) + 2+ let !var_depth_ws = bytesToWords platform (depth - offset) + 2 in Just (id, var_depth_ws) -truncIntegral16 :: Integral a => a -> Word16-truncIntegral16 w- | w > fromIntegral (maxBound :: Word16)- = panic "stack depth overflow"- | otherwise- = fromIntegral w--trunc16B :: ByteOff -> Word16-trunc16B = truncIntegral16--trunc16W :: WordOff -> Word16-trunc16W = truncIntegral16- fvsToEnv :: BCEnv -> CgStgRhs -> [Id] -- Takes the free variables of a right-hand side, and -- delivers an ordered list of the local variables that will@@ -466,7 +454,7 @@ StgLitArg lit -> typePrimRepArgs (literalType lit) StgVarArg i -> bcIdPrimReps i (push, szb) <- pushAtom d p e- ret <- returnUnliftedReps d s szb reps+ ret <- returnUnliftedReps d s szb (NE.toList $! reps) return (push `appOL` ret) -- return an unlifted value from the top of the stack@@ -493,7 +481,7 @@ PUSH_BCO tuple_bco `consOL` unitOL RETURN_TUPLE return ( mkSlideB platform szb (d - s) -- clear to sequel- `appOL` ret) -- go+ `consOL` ret) -- go -- construct and return an unboxed tuple returnUnboxedTuple@@ -536,7 +524,7 @@ schemeE d s p (StgLetNoEscape xlet bnd body) = schemeE d s p (StgLet xlet bnd body) schemeE d s p (StgLet _xlet- (StgNonRec x (StgRhsCon _cc data_con _cnum _ticks args))+ (StgNonRec x (StgRhsCon _cc data_con _cnum _ticks args _typ)) body) = do -- Special case for a non-recursive let whose RHS is a -- saturated constructor application.@@ -557,7 +545,7 @@ fvss = map (fvsToEnv p') rhss -- Sizes of free vars- size_w = trunc16W . idSizeW platform+ size_w = idSizeW platform sizes = map (\rhs_fvs -> sum (map size_w rhs_fvs)) fvss -- the arity of each rhs@@ -576,13 +564,13 @@ build_thunk :: StackDepth -> [Id]- -> Word16+ -> WordOff -> ProtoBCO Name- -> Word16- -> Word16+ -> WordOff+ -> HalfWord -> BcM BCInstrList build_thunk _ [] size bco off arity- = return (PUSH_BCO bco `consOL` unitOL (mkap (off+size) size))+ = return (PUSH_BCO bco `consOL` unitOL (mkap (off+size) (fromIntegral size))) where mkap | arity == 0 = MKAP | otherwise = MKPAP@@ -594,9 +582,9 @@ alloc_code = toOL (zipWith mkAlloc sizes arities) where mkAlloc sz 0- | is_tick = ALLOC_AP_NOUPD sz- | otherwise = ALLOC_AP sz- mkAlloc sz arity = ALLOC_PAP arity sz+ | is_tick = ALLOC_AP_NOUPD (fromIntegral sz)+ | otherwise = ALLOC_AP (fromIntegral sz)+ mkAlloc sz arity = ALLOC_PAP arity (fromIntegral sz) is_tick = case binds of StgNonRec id _ -> occNameFS (getOccName id) == tickFS@@ -607,7 +595,7 @@ build_thunk d' fvs size bco off arity compile_binds =- [ compile_bind d' fvs x rhs size arity (trunc16W n)+ [ compile_bind d' fvs x rhs size arity n | (fvs, x, rhs, size, arity, n) <- zip6 fvss xs rhss sizes arities [n_binds, n_binds-1 .. 1] ]@@ -735,7 +723,7 @@ more_push_code <- do_pushery (d + arg_bytes) args return (push `appOL` more_push_code) do_pushery !d [] = do- let !n_arg_words = trunc16W $ bytesToWords platform (d - orig_d)+ let !n_arg_words = bytesToWords platform (d - orig_d) return (unitOL (PACK con n_arg_words)) -- Push on the stack in the reverse order.@@ -761,7 +749,7 @@ platform <- profilePlatform <$> getProfile assert (sz == wordSize platform) return () let slide = mkSlideB platform (d - init_d + wordSize platform) (init_d - s)- return (push_fn `appOL` (slide `appOL` unitOL ENTER))+ return (push_fn `appOL` (slide `consOL` unitOL ENTER)) do_pushes !d args reps = do let (push_apply, n, rest_of_reps) = findPushSeq reps (these_args, rest_of_args) = splitAt n args@@ -866,7 +854,7 @@ (bndr_size, call_info, args_offsets) | ubx_tuple_frame = let bndr_ty = primRepCmmType platform- bndr_reps = filter (not.isVoidRep) (bcIdPrimReps bndr)+ bndr_reps = NE.filter (not.isVoidRep) (bcIdPrimReps bndr) (call_info, args_offsets) = layoutNativeCall profile NativeTupleReturn 0 bndr_ty bndr_reps in ( wordsToBytes platform (nativeCallSize call_info)@@ -948,7 +936,7 @@ massert isAlgCase rhs_code <- schemeE stack_bot s p' rhs return (my_discr alt,- unitOL (UNPACK (trunc16W size)) `appOL` rhs_code)+ unitOL (UNPACK size) `appOL` rhs_code) where real_bndrs = filterOut isTyVar bndrs @@ -1009,8 +997,9 @@ | ubx_tuple_frame = ([1], 2) -- call_info, tuple_BCO | otherwise = ([], 0) - bitmap_size = trunc16W $ fromIntegral extra_slots +- bytesToWords platform (d - s)+ bitmap_size :: WordOff+ bitmap_size = fromIntegral extra_slots ++ bytesToWords platform (d - s) bitmap_size' :: Int bitmap_size' = fromIntegral bitmap_size@@ -1028,15 +1017,15 @@ isUnboxedSumType (idType id) = Nothing | isFollowableArg (bcIdArgRep platform id) = Just (fromIntegral rel_offset) | otherwise = Nothing- where rel_offset = trunc16W $ bytesToWords platform (d - offset)+ where rel_offset = bytesToWords platform (d - offset) - bitmap = intsToReverseBitmap platform bitmap_size'{-size-} pointers+ bitmap = intsToReverseBitmap platform bitmap_size' pointers alt_stuff <- mapM codeAlt alts alt_final0 <- mkMultiBranch maybe_ncons alt_stuff let alt_final- | ubx_tuple_frame = mkSlideW 0 2 `mappend` alt_final0+ | ubx_tuple_frame = SLIDE 0 2 `consOL` alt_final0 | otherwise = alt_final0 let@@ -1089,9 +1078,6 @@ reg_order :: GlobalReg -> (Int, GlobalReg) reg_order reg | Just n <- Map.lookup reg regs_order = (n, reg)- -- a VanillaReg goes to the same place regardless of whether it- -- contains a pointer- reg_order (VanillaReg n VNonGcPtr) = reg_order (VanillaReg n VGcPtr) -- if we don't have a position for a FloatReg then they must be passed -- in the equivalent DoubleReg reg_order (FloatReg n) = reg_order (DoubleReg n)@@ -1309,11 +1295,11 @@ -- ^ The stack layout of the arguments, where each offset is relative to the -- /bottom/ of the stack space they occupy. Their offsets must be word-aligned, -- and the list must be sorted in order of ascending offset (i.e. bottom to top).- -> (Word16, [StgWord])+ -> (WordOff, [StgWord]) mkStackBitmap platform nptrs_prefix args_info args = (bitmap_size, bitmap) where- bitmap_size = trunc16W $ nptrs_prefix + arg_bottom+ bitmap_size = nptrs_prefix + arg_bottom bitmap = intsToReverseBitmap platform (fromIntegral bitmap_size) ptr_offsets arg_bottom = nativeCallSize args_info@@ -1387,7 +1373,7 @@ (push_target `consOL` push_info `consOL` PUSH_BCO args_bco `consOL`- (mkSlideB platform szb (d - s) `appOL` unitOL PRIMCALL))+ (mkSlideB platform szb (d - s) `consOL` unitOL PRIMCALL)) -- ----------------------------------------------------------------------------- -- Deal with a CCall.@@ -1555,7 +1541,7 @@ push_r = if returns_void then nilOL- else unitOL (PUSH_UBX (mkDummyLiteral platform r_rep) (trunc16W r_sizeW))+ else unitOL (PUSH_UBX (mkDummyLiteral platform r_rep) (r_sizeW)) -- generate the marshalling code we're going to call @@ -1563,7 +1549,7 @@ -- instruction needs to describe the chunk of stack containing -- the ccall args to the GC, so it needs to know how large it -- is. See comment in Interpreter.c with the CCALL instruction.- stk_offset = trunc16W $ bytesToWords platform (d_after_r - s)+ stk_offset = bytesToWords platform (d_after_r - s) conv = case cconv of CCallConv -> FFICCall@@ -1592,7 +1578,7 @@ -- slide and return d_after_r_min_s = bytesToWords platform (d_after_r - s)- wrapup = mkSlideW (trunc16W r_sizeW) (d_after_r_min_s - r_sizeW)+ wrapup = mkSlideW r_sizeW (d_after_r_min_s - r_sizeW) `snocOL` RETURN (toArgRep platform r_rep) --trace (show (arg1_offW, args_offW , (map argRepSizeW a_reps) )) $ return (@@ -1617,8 +1603,7 @@ AddrRep -> FFIPointer FloatRep -> FFIFloat DoubleRep -> FFIDouble- LiftedRep -> FFIPointer- UnliftedRep -> FFIPointer+ BoxedRep _ -> FFIPointer _ -> pprPanic "primRepToFFIType" (ppr r) where (signed_word, unsigned_word) = case platformWordSize platform of@@ -1643,9 +1628,8 @@ AddrRep -> LitNullAddr DoubleRep -> LitDouble 0 FloatRep -> LitFloat 0- LiftedRep -> LitNullAddr- UnliftedRep -> LitNullAddr- _ -> pprPanic "mkDummyLiteral" (ppr pr)+ BoxedRep _ -> LitNullAddr+ _ -> pprPanic "mkDummyLiteral" (ppr pr) -- Convert (eg)@@ -1673,9 +1657,8 @@ (pprType fn_ty) in case r_reps of- [] -> panic "empty typePrimRepArgs"- [VoidRep] -> Nothing- [rep] -> Just rep+ VoidRep :| [] -> Nothing+ rep :| [] -> Just rep -- if it was, it would be impossible to create a -- valid return value placeholder on the stack@@ -1797,8 +1780,9 @@ = do platform <- targetPlatform <$> getDynFlags let !szb = idSizeCon platform var+ with_instr :: (ByteOff -> BCInstr) -> BcM (OrdList BCInstr, ByteOff) with_instr instr = do- let !off_b = trunc16B $ d - d_v+ let !off_b = d - d_v return (unitOL (instr off_b), wordSize platform) case szb of@@ -1807,7 +1791,7 @@ 4 -> with_instr PUSH32_W _ -> do let !szw = bytesToWords platform szb- !off_w = trunc16W $ bytesToWords platform (d - d_v) + szw - 1+ !off_w = bytesToWords platform (d - d_v) + szw - 1 return (toOL (genericReplicate szw (PUSH_L off_w)), wordsToBytes platform szw) -- d - d_v offset from TOS to the first slot of the object@@ -1868,7 +1852,7 @@ 1 -> PUSH_UBX8 lit 2 -> PUSH_UBX16 lit 4 -> PUSH_UBX32 lit- _ -> PUSH_UBX lit (trunc16W $ bytesToWords platform size_bytes)+ _ -> PUSH_UBX lit (bytesToWords platform size_bytes) case lit of LitLabel {} -> code AddrRep@@ -1907,7 +1891,7 @@ platform <- targetPlatform <$> getDynFlags let !szb = idSizeCon platform v done instr = do- let !off = trunc16B $ d - d_v+ let !off = d - d_v return (unitOL (instr off), szb) case szb of 1 -> done PUSH8@@ -1972,8 +1956,7 @@ mkTree vals range_lo range_hi = let n = length vals `div` 2- vals_lo = take n vals- vals_hi = drop n vals+ (vals_lo, vals_hi) = splitAt n vals v_mid = fst (head vals_hi) in do label_geq <- getLabelBc@@ -2119,7 +2102,7 @@ isUnboxedSumType (idType var) = wordsToBytes platform . WordOff . sum . map (argRepSizeW platform . toArgRep platform) .- bcIdPrimReps $ var+ NE.toList . bcIdPrimReps $ var | otherwise = ByteOff (primRepSizeB platform (bcIdPrimRep var)) bcIdArgRep :: Platform -> Id -> ArgRep@@ -2127,13 +2110,13 @@ bcIdPrimRep :: Id -> PrimRep bcIdPrimRep id- | [rep] <- typePrimRepArgs (idType id)+ | rep :| [] <- typePrimRepArgs (idType id) = rep | otherwise = pprPanic "bcIdPrimRep" (ppr id <+> dcolon <+> ppr (idType id)) -bcIdPrimReps :: Id -> [PrimRep]+bcIdPrimReps :: Id -> NonEmpty PrimRep bcIdPrimReps id = typePrimRepArgs (idType id) repSizeWords :: Platform -> PrimRep -> WordOff@@ -2158,26 +2141,21 @@ ("Error: bytecode compiler can't handle some foreign calling conventions\n"++ " Workaround: use -fobject-code, or compile this module to .o separately.")) -mkSlideB :: Platform -> ByteOff -> ByteOff -> OrdList BCInstr-mkSlideB platform !nb !db = mkSlideW n d+mkSlideB :: Platform -> ByteOff -> ByteOff -> BCInstr+mkSlideB platform nb db = SLIDE n d where- !n = trunc16W $ bytesToWords platform nb+ !n = bytesToWords platform nb !d = bytesToWords platform db -mkSlideW :: Word16 -> WordOff -> OrdList BCInstr+mkSlideW :: WordOff -> WordOff -> OrdList BCInstr mkSlideW !n !ws- | ws > fromIntegral limit- -- If the amount to slide doesn't fit in a Word16, generate multiple slide- -- instructions- = SLIDE n limit `consOL` mkSlideW n (ws - fromIntegral limit) | ws == 0 = nilOL | otherwise = unitOL (SLIDE n $ fromIntegral ws)- where- limit :: Word16- limit = maxBound ++ atomPrimRep :: StgArg -> PrimRep atomPrimRep (StgVarArg v) = bcIdPrimRep v atomPrimRep (StgLitArg l) = typePrimRep1 (literalType l)@@ -2191,8 +2169,8 @@ mkStackOffsets :: ByteOff -> [ByteOff] -> [ByteOff] mkStackOffsets original_depth szsb = tail (scanl' (+) original_depth szsb) -typeArgReps :: Platform -> Type -> [ArgRep]-typeArgReps platform = map (toArgRep platform) . typePrimRepArgs+typeArgReps :: Platform -> Type -> NonEmpty ArgRep+typeArgReps platform = NE.map (toArgRep platform) . typePrimRepArgs -- ----------------------------------------------------------------------------- -- The bytecode generator's monad@@ -2285,8 +2263,8 @@ newBreakInfo ix info = BcM $ \st -> return (st{breakInfo = IntMap.insert ix info (breakInfo st)}, ()) -getCurrentModuleName :: BcM (Maybe (RemotePtr ModuleName))-getCurrentModuleName = BcM $ \st -> return (st, modBreaks_module <$> modBreaks st)+getCurrentModule :: BcM Module+getCurrentModule = BcM $ \st -> return (st, thisModule st) tickFS :: FastString tickFS = fsLit "ticked"
GHC/StgToCmm.hs view
@@ -199,12 +199,12 @@ cgTopRhs :: StgToCmmConfig -> RecFlag -> Id -> CgStgRhs -> (CgIdInfo, FCode ()) -- The Id is passed along for setting up a binding... -cgTopRhs cfg _rec bndr (StgRhsCon _cc con mn _ts args)+cgTopRhs cfg _rec bndr (StgRhsCon _cc con mn _ts args _typ) = cgTopRhsCon cfg bndr con mn (assertNonVoidStgArgs args) -- con args are always non-void, -- see Note [Post-unarisation invariants] in GHC.Stg.Unarise -cgTopRhs cfg rec bndr (StgRhsClosure fvs cc upd_flag args body)+cgTopRhs cfg rec bndr (StgRhsClosure fvs cc upd_flag args body _typ) = assertPpr (isEmptyDVarSet fvs) (text "fvs:" <> ppr fvs) $ -- There should be no free variables cgTopRhsClosure (stgToCmmPlatform cfg) rec bndr cc upd_flag args body @@ -272,9 +272,10 @@ -- return it. -- NB 2: We don't set CC when entering data (WDP 94/06) do { tickyEnterDynCon- ; ldvEnter (CmmReg nodeReg)+ ; let node = CmmReg $ nodeReg platform+ ; ldvEnter node ; tickyReturnOldCon (length arg_reps)- ; void $ emitReturn [cmmOffsetB platform (CmmReg nodeReg) (tagForCon platform data_con)]+ ; void $ emitReturn [cmmOffsetB platform node (tagForCon platform data_con)] } -- The case continuation code expects a tagged pointer }
GHC/StgToCmm/ArgRep.hs view
@@ -69,8 +69,7 @@ toArgRep :: Platform -> PrimRep -> ArgRep toArgRep platform rep = case rep of VoidRep -> V- LiftedRep -> P- UnliftedRep -> P+ BoxedRep _ -> P IntRep -> N WordRep -> N Int8Rep -> N -- Gets widened to native word width for calls
GHC/StgToCmm/Bind.hs view
@@ -250,14 +250,14 @@ -- (see above) ) -cgRhs id (StgRhsCon cc con mn _ts args)+cgRhs id (StgRhsCon cc con mn _ts args _typ) = withNewTickyCounterCon id con mn $ buildDynCon id mn True cc con (assertNonVoidStgArgs args) -- con args are always non-void, -- see Note [Post-unarisation invariants] in GHC.Stg.Unarise {- See Note [GC recovery] in "GHC.StgToCmm.Closure" -}-cgRhs id (StgRhsClosure fvs cc upd_flag args body)+cgRhs id (StgRhsClosure fvs cc upd_flag args body _typ) = do profile <- getProfile check_tags <- stgToCmmDoTagCheck <$> getStgToCmmConfig@@ -424,7 +424,7 @@ -- BUILD THE OBJECT -- ; (use_cc, blame_cc) <- chooseDynCostCentres cc args body- ; let use_cc = cccsExpr; blame_cc = cccsExpr+ ; let use_cc = cccsExpr platform; blame_cc = cccsExpr platform ; emit (mkComment $ mkFastString "calling allocDynClosure") ; let toVarArg (NonVoid a, off) = (NonVoid (StgVarArg a), off) ; let info_tbl = mkCmmInfo closure_info bndr currentCCS@@ -465,7 +465,7 @@ descr -- ; (use_cc, blame_cc) <- chooseDynCostCentres cc [{- no args-}] body- ; let use_cc = cccsExpr; blame_cc = cccsExpr+ ; let use_cc = cccsExpr platform; blame_cc = cccsExpr platform -- BUILD THE OBJECT@@ -553,13 +553,7 @@ -- Extend reader monad with information that -- self-recursive tail calls can be optimized into local -- jumps. See Note [Self-recursive tail calls] in GHC.StgToCmm.Expr.- ; let !self_loop_info = MkSelfLoopInfo- { sli_id = bndr- , sli_arity = arity- , sli_header_block = loop_header_id- , sli_registers = arg_regs- }- ; withSelfLoop self_loop_info $ do+ ; withSelfLoop (bndr, loop_header_id, arg_regs) $ do { -- Main payload ; entryHeapCheck cl_info node' arity arg_regs $ do@@ -640,6 +634,7 @@ -> LocalReg -> CgStgExpr -> FCode () thunkCode cl_info fv_details _cc node body = do { profile <- getProfile+ ; platform <- getPlatform ; let node_points = nodeMustPointToIt profile (closureLFInfo cl_info) node' = if node_points then Just node else Nothing ; ldvEnterClosure cl_info (CmmLocal node) -- NB: Node always points when profiling@@ -658,7 +653,7 @@ -- that cc of enclosing scope will be recorded -- in update frame CAF/DICT functions will be -- subsumed by this enclosing cc- do { enterCostCentreThunk (CmmReg nodeReg)+ do { enterCostCentreThunk (CmmReg $ nodeReg platform) ; let lf_info = closureLFInfo cl_info ; fv_bindings <- mapM bind_fv fv_details ; load_fvs node lf_info fv_bindings@@ -707,19 +702,11 @@ when eager_blackholing $ do whenUpdRemSetEnabled $ emitUpdRemSetPushThunk node- emitAtomicStore platform MemOrderRelease- (cmmOffsetW platform node (fixedHdrSizeW profile))- currentTSOExpr+ emitStore (cmmOffsetW platform node (fixedHdrSizeW profile)) (currentTSOExpr platform) -- See Note [Heap memory barriers] in SMP.h.- emitAtomicStore platform MemOrderRelease- node- (CmmReg (CmmGlobal EagerBlackholeInfo))--emitAtomicStore :: Platform -> MemoryOrdering -> CmmExpr -> CmmExpr -> FCode ()-emitAtomicStore platform mord addr val =- emitPrimCall [] (MO_AtomicWrite w mord) [addr, val]- where- w = typeWidth $ cmmExprType platform val+ let w = wordWidth platform+ emitPrimCall [] (MO_AtomicWrite w MemOrderRelease)+ [node, CmmReg (CmmGlobal $ GlobalRegUse EagerBlackholeInfo $ bWord platform)] setupUpdate :: ClosureInfo -> LocalReg -> FCode () -> FCode () -- Nota Bene: this function does not change Node (even if it's a CAF),@@ -805,7 +792,7 @@ ; let platform = profilePlatform profile ; bh <- newTemp (bWord platform) ; emitRtsCallGen [(bh,AddrHint)] newCAF_lbl- [ (baseExpr, AddrHint),+ [ (baseExpr platform, AddrHint), (CmmReg (CmmLocal node), AddrHint) ] False
GHC/StgToCmm/CgUtils.hs view
@@ -33,17 +33,17 @@ baseRegOffset :: Platform -> GlobalReg -> Int baseRegOffset platform reg = case reg of- VanillaReg 1 _ -> pc_OFFSET_StgRegTable_rR1 constants- VanillaReg 2 _ -> pc_OFFSET_StgRegTable_rR2 constants- VanillaReg 3 _ -> pc_OFFSET_StgRegTable_rR3 constants- VanillaReg 4 _ -> pc_OFFSET_StgRegTable_rR4 constants- VanillaReg 5 _ -> pc_OFFSET_StgRegTable_rR5 constants- VanillaReg 6 _ -> pc_OFFSET_StgRegTable_rR6 constants- VanillaReg 7 _ -> pc_OFFSET_StgRegTable_rR7 constants- VanillaReg 8 _ -> pc_OFFSET_StgRegTable_rR8 constants- VanillaReg 9 _ -> pc_OFFSET_StgRegTable_rR9 constants- VanillaReg 10 _ -> pc_OFFSET_StgRegTable_rR10 constants- VanillaReg n _ -> panic ("Registers above R10 are not supported (tried to use R" ++ show n ++ ")")+ VanillaReg 1 -> pc_OFFSET_StgRegTable_rR1 constants+ VanillaReg 2 -> pc_OFFSET_StgRegTable_rR2 constants+ VanillaReg 3 -> pc_OFFSET_StgRegTable_rR3 constants+ VanillaReg 4 -> pc_OFFSET_StgRegTable_rR4 constants+ VanillaReg 5 -> pc_OFFSET_StgRegTable_rR5 constants+ VanillaReg 6 -> pc_OFFSET_StgRegTable_rR6 constants+ VanillaReg 7 -> pc_OFFSET_StgRegTable_rR7 constants+ VanillaReg 8 -> pc_OFFSET_StgRegTable_rR8 constants+ VanillaReg 9 -> pc_OFFSET_StgRegTable_rR9 constants+ VanillaReg 10 -> pc_OFFSET_StgRegTable_rR10 constants+ VanillaReg n -> panic ("Registers above R10 are not supported (tried to use R" ++ show n ++ ")") FloatReg 1 -> pc_OFFSET_StgRegTable_rF1 constants FloatReg 2 -> pc_OFFSET_StgRegTable_rF2 constants FloatReg 3 -> pc_OFFSET_StgRegTable_rF3 constants@@ -124,7 +124,7 @@ get_Regtable_addr_from_offset :: Platform -> Int -> CmmExpr get_Regtable_addr_from_offset platform offset = if haveRegBase platform- then cmmRegOff baseReg offset+ then cmmRegOff (baseReg platform) offset else regTableOffset platform offset -- | Fixup global registers so that they assign to locations within the@@ -144,47 +144,49 @@ where fixAssign stmt = case stmt of- CmmAssign (CmmGlobal reg) src+ CmmAssign (CmmGlobal reg_use) src -- MachSp isn't an STG register; it's merely here for tracking unwind -- information | reg == MachSp -> stmt | otherwise -> let baseAddr = get_GlobalReg_addr platform reg in case reg `elem` activeStgRegs platform of- True -> CmmAssign (CmmGlobal reg) src+ True -> CmmAssign (CmmGlobal reg_use) src False -> CmmStore baseAddr src NaturallyAligned+ where reg = globalRegUseGlobalReg reg_use other_stmt -> other_stmt fixExpr expr = case expr of -- MachSp isn't an STG; it's merely here for tracking unwind information- CmmReg (CmmGlobal MachSp) -> expr- CmmReg (CmmGlobal reg) ->+ CmmReg (CmmGlobal (GlobalRegUse MachSp _)) -> expr+ CmmReg (CmmGlobal reg_use) -> -- Replace register leaves with appropriate StixTrees for -- the given target. MagicIds which map to a reg on this -- arch are left unchanged. For the rest, BaseReg is taken -- to mean the address of the reg table in MainCapability, -- and for all others we generate an indirection to its -- location in the register table.+ let reg = globalRegUseGlobalReg reg_use in case reg `elem` activeStgRegs platform of True -> expr False -> let baseAddr = get_GlobalReg_addr platform reg in case reg of BaseReg -> baseAddr- _other -> CmmLoad baseAddr (globalRegType platform reg) NaturallyAligned+ _other -> CmmLoad baseAddr+ (globalRegSpillType platform reg)+ NaturallyAligned - CmmRegOff greg@(CmmGlobal reg) offset ->+ CmmRegOff (CmmGlobal reg_use) offset -> -- RegOf leaves are just a shorthand form. If the reg maps -- to a real reg, we keep the shorthand, otherwise, we just -- expand it and defer to the above code.- -- NB: to ensure type correctness we need to ensure the Add- -- as well as the Int need to be of the same size as the- -- register.+ let reg = globalRegUseGlobalReg reg_use in case reg `elem` activeStgRegs platform of True -> expr- False -> CmmMachOp (MO_Add (cmmRegWidth platform greg)) [- fixExpr (CmmReg greg),+ False -> CmmMachOp (MO_Add (wordWidth platform)) [+ fixExpr (CmmReg (CmmGlobal reg_use)), CmmLit (CmmInt (fromIntegral offset)- (cmmRegWidth platform greg))]+ (wordWidth platform))] other_expr -> other_expr
GHC/StgToCmm/Closure.hs view
@@ -28,7 +28,7 @@ LambdaFormInfo, -- Abstract StandardFormInfo, -- ...ditto... mkLFThunk, mkLFReEntrant, mkConLFInfo, mkSelectorLFInfo,- mkApLFInfo, mkLFImported, mkLFArgument, mkLFLetNoEscape,+ mkApLFInfo, importedIdLFInfo, mkLFArgument, mkLFLetNoEscape, mkLFStringLit, lfDynTag, isLFThunk, isLFReEntrant, lfUpdatable,@@ -95,6 +95,8 @@ import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Panic.Plain+import GHC.Utils.Misc+import GHC.Data.Maybe (isNothing) import Data.Coerce (coerce) import qualified Data.ByteString.Char8 as BS8@@ -254,130 +256,67 @@ (mightBeFunTy (idType id)) --------------mkLFImported :: Id -> LambdaFormInfo-mkLFImported id =+-- | The 'LambdaFormInfo' of an imported Id.+-- See Note [The LFInfo of Imported Ids]+importedIdLFInfo :: Id -> LambdaFormInfo+importedIdLFInfo id = -- See Note [Conveying CAF-info and LFInfo between modules] in -- GHC.StgToCmm.Types case idLFInfo_maybe id of Just lf_info ->- -- Use the LambdaFormInfo from the interface+ -- Use the existing LambdaFormInfo lf_info Nothing- -- Interface doesn't have a LambdaFormInfo, so make a conservative one from the type.- -- See Note [The LFInfo of Imported Ids]; The order of the guards musn't be changed!+ -- Doesn't have a LambdaFormInfo, but we know it must be 'LFReEntrant' from its arity | arity > 0 -> LFReEntrant TopLevel arity True ArgUnknown - | Just con <- isDataConId_maybe id- -- See Note [Imported unlifted nullary datacon wrappers must have correct LFInfo] in GHC.StgToCmm.Types- -- and Note [The LFInfo of Imported Ids] below- -> assert (hasNoNonZeroWidthArgs con) $- LFCon con -- An imported nullary constructor- -- We assume that the constructor is evaluated so that- -- the id really does point directly to the constructor-+ -- We can't be sure of the LambdaFormInfo of this imported Id,+ -- so make a conservative one from the type. | otherwise- -> mkLFArgument id -- Not sure of exact arity+ -> assert (isNothing (isDataConId_maybe id)) $ -- See Note [LFInfo of DataCon workers and wrappers] in GHC.Types.Id.Make+ mkLFArgument id -- Not sure of exact arity where arity = idFunRepArity id- hasNoNonZeroWidthArgs = all (isZeroBitTy . scaledThing) . dataConRepArgTys {- Note [The LFInfo of Imported Ids] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-As explained in Note [Conveying CAF-info and LFInfo between modules] and-Note [Imported unlifted nullary datacon wrappers must have correct LFInfo], the-LambdaFormInfo records the details of a closure representation and is often,-when optimisations are enabled, serialized to the interface of a module.+As explained in Note [Conveying CAF-info and LFInfo between modules]+the LambdaFormInfo records the details of a closure representation and is+often, when optimisations are enabled, serialized to the interface of a module. -In particular, the `lfInfo` field of the `IdInfo` field of an `Id`-* For Ids defined in this module: is `Nothing`-* For imported Ids:+In particular, the `lfInfo` field of the `IdInfo` field of an `Id`:+* For DataCon workers and wrappers is populated as described in+Note [LFInfo of DataCon workers and wrappers] in GHC.Types.Id.Make+* For other Ids defined in the module being compiled: is `Nothing`+* For other imported Ids: * is (Just lf_info) if the LFInfo was serialised into the interface file (typically, when the exporting module was compiled with -O) * is Nothing if it wasn't serialised -However, when an interface doesn't have a LambdaFormInfo for some imported Id-(so that its `lfInfo` field is `Nothing`), we can conservatively create one-using `mkLFImported`.- The LambdaFormInfo we give an Id is used in determining how to tag its pointer-(see `litIdInfo`). Therefore, it's crucial we re-construct a LambdaFormInfo as-faithfully as possible or otherwise risk having pointers incorrectly tagged,-which can lead to performance issues and even segmentation faults (see #23231-and #23146). In particular, saturated data constructor applications *must* be-unambiguously given `LFCon`, and the invariant-- If the LFInfo (serialised or built with mkLFImported) says LFCon, then it- really is a static data constructor, and similar for LFReEntrant--must be upheld.--In `mkLFImported`, we make a conservative approximation to the real-LambdaFormInfo as follows:--(1) Ids with an `idFunRepArity > 0` are `LFReEntrant` and pointers to them are-tagged (by `litIdInfo`) with the corresponding arity.- - This is also true of data con wrappers and workers with arity > 0,- regardless of the runtime relevance of the arguments- - For example, `Just :: a -> Maybe a` is given `LFReEntrant`- and `HNil :: (a ~# '[]) -> HList a` is given `LFReEntrant` too--(2) Data constructors with `idFunRepArity == 0` should be given `LFCon` because-they are fully saturated data constructor applications and pointers to them-should be tagged with the constructor index.--(2.1) A datacon *wrapper* with zero arity must be a fully saturated application-of the worker to zero-width arguments only (which are dropped after unarisation)--(2.2) A datacon *worker* with zero arity is trivially fully saturated, it takes-no arguments whatsoever (not even zero-width args)--To ensure we properly give `LFReEntrant` to data constructors with some arity,-and `LFCon` only to data constructors with zero arity, we must first check for-`arity > 0` and only afterwards `isDataConId` -- the order of the guards in-`mkLFImported` is quite important.--As an example, consider the following data constructors:-- data T1 a where- TCon1 :: {-# UNPACK #-} !(a :~: True) -> T1 a-- data T2 a where- TCon2 :: {-# UNPACK #-} !() -> T2 a-- data T3 a where- TCon3 :: T3 '[]--`TCon1`'s wrapper has a lifted equality argument, which is non-zero-width, while-the worker has an unlifted equality argument, which is zero-width.--`TCon2`'s wrapper has a lifted equality argument, which is non-zero-width,-while the worker has no arguments.--`TCon3`'s wrapper has no arguments, and the worker has 1 zero-width argument;-their Core representation:-- $WTCon3 :: T3 '[]- $WTCon3 = TCon3 @[] <Refl>-- TCon3 :: forall (a :: * -> *). (a ~# []) => T a- TCon3 = /\a. \(co :: a~#[]). TCon3 co--For `TCon1`, both the wrapper and worker will be given `LFReEntrant` since they-both have arity == 1.+(see `litIdInfo` and `lfDynTag`). Therefore, it's crucial we attribute a correct+LambdaFormInfo to imported Ids, or otherwise risk having pointers incorrectly+tagged which can lead to performance issues and even segmentation faults (see+#23231 and Note [Imported unlifted nullary datacon wrappers must have correct LFInfo]). -For `TCon2`, the wrapper will be given `LFReEntrant` since it has arity == 1-while the worker is `LFCon` since its arity == 0+In particular, saturated data constructor applications *must* be unambiguously+given `LFCon`, and if the LFInfo says LFCon, then it really is a static data+constructor, and similar for LFReEntrant. -For `TCon3`, the wrapper will be given `LFCon` since its arity == 0 and the-worker `LFReEntrant` since its arity == 1+In `importedIdLFInfo`, we construct a LambdaFormInfo for imported Ids as follows: -One might think we could give *workers* with only zero-width-args the `LFCon`-LambdaFormInfo, e.g. give `LFCon` to the worker of `TCon1` and `TCon3`.-However, these workers, albeit rarely used, are unambiguously functions--- which makes `LFReEntrant`, the LambdaFormInfo we give them, correct.-See also the discussion in #23158.+(1) If the `lfInfo` field contains an LFInfo, we use that LFInfo which is+correct by construction (the invariant being that if it exists, it is correct):+ (1.1) Either it was serialised to the interface we're importing the Id from,+ (1.2) Or it's a DataCon worker or wrapper and its LFInfo was constructed+ according to Note [LFInfo of DataCon workers and wrappers]+(2) When the `lfInfo` field is `Nothing`+ (2.1) If the `idFunRepArity` of the Id is known and is greater than 0, then+ the Id is unambiguously a function and is given `LFReEntrant`, and pointers+ to this Id will be tagged (by `litIdInfo`) with the corresponding arity.+ (2.2) Otherwise, we can make a conservative estimate from the type. -} @@ -600,12 +539,12 @@ getCallMethod :: StgToCmmConfig -> Name -- Function being applied- -> Id -- Function Id used to check if it can refer to+ -> Id -- Function Id used to chech if it can refer to -- CAF's and whether the function is tail-calling -- itself -> LambdaFormInfo -- Its info -> RepArity -- Number of available arguments- -- (including void args)+ -> RepArity -- Number of them being void arguments -> CgLoc -- Passed in from cgIdApp so that we can -- handle let-no-escape bindings and self-recursive -- tail calls using the same data constructor,@@ -614,22 +553,19 @@ -> Maybe SelfLoopInfo -- can we perform a self-recursive tail-call -> CallMethod -getCallMethod cfg _ id _ n_args _cg_loc (Just self_loop)+getCallMethod cfg _ id _ n_args v_args _cg_loc (Just (self_loop_id, block_id, args)) | stgToCmmLoopification cfg- , MkSelfLoopInfo- { sli_id = loop_id, sli_arity = arity- , sli_header_block = blk_id, sli_registers = arg_regs- } <- self_loop- , id == loop_id- , n_args == arity+ , id == self_loop_id+ , args `lengthIs` (n_args - v_args) -- If these patterns match then we know that: -- * loopification optimisation is turned on -- * function is performing a self-recursive call in a tail position- -- * number of parameters matches the function's arity.- -- See Note [Self-recursive tail calls] in GHC.StgToCmm.Expr for more details- = JumpToIt blk_id arg_regs+ -- * number of non-void parameters of the function matches functions arity.+ -- See Note [Self-recursive tail calls] and Note [Void arguments in+ -- self-recursive tail calls] in GHC.StgToCmm.Expr for more details+ = JumpToIt block_id args -getCallMethod cfg name id (LFReEntrant _ arity _ _) n_args _cg_loc _self_loop_info+getCallMethod cfg name id (LFReEntrant _ arity _ _) n_args _v_args _cg_loc _self_loop_info | n_args == 0 -- No args at all && not (profileIsProfiling (stgToCmmProfile cfg)) -- See Note [Evaluating functions with profiling] in rts/Apply.cmm@@ -637,16 +573,16 @@ | n_args < arity = SlowCall -- Not enough args | otherwise = DirectEntry (enterIdLabel (stgToCmmPlatform cfg) name (idCafInfo id)) arity -getCallMethod _ _name _ LFUnlifted n_args _cg_loc _self_loop_info+getCallMethod _ _name _ LFUnlifted n_args _v_args _cg_loc _self_loop_info = assert (n_args == 0) ReturnIt -getCallMethod _ _name _ (LFCon _) n_args _cg_loc _self_loop_info+getCallMethod _ _name _ (LFCon _) n_args _v_args _cg_loc _self_loop_info = assert (n_args == 0) ReturnIt -- n_args=0 because it'd be ill-typed to apply a saturated -- constructor application to anything getCallMethod cfg name id (LFThunk _ _ updatable std_form_info is_fun)- n_args _cg_loc _self_loop_info+ n_args _v_args _cg_loc _self_loop_info | Just sig <- idTagSig_maybe id , isTaggedSig sig -- Infered to be already evaluated by Tag Inference@@ -684,7 +620,7 @@ updatable) 0 -- Imported(Unknown) Ids-getCallMethod cfg name id (LFUnknown might_be_a_function) n_args _cg_locs _self_loop_info+getCallMethod cfg name id (LFUnknown might_be_a_function) n_args _v_args _cg_locs _self_loop_info | n_args == 0 , Just sig <- idTagSig_maybe id , isTaggedSig sig -- Infered to be already evaluated by Tag Inference@@ -701,14 +637,14 @@ EnterIt -- Not a function -- TODO: Redundant with above match?--- getCallMethod _ name _ (LFUnknown False) n_args _cg_loc _self_loop_info+-- getCallMethod _ name _ (LFUnknown False) n_args _v_args _cg_loc _self_loop_info -- = assertPpr (n_args == 0) (ppr name <+> ppr n_args) -- EnterIt -- Not a function -getCallMethod _ _name _ LFLetNoEscape _n_args (LneLoc blk_id lne_regs) _self_loop_info+getCallMethod _ _name _ LFLetNoEscape _n_args _v_args (LneLoc blk_id lne_regs) _self_loop_info = JumpToIt blk_id lne_regs -getCallMethod _ _ _ _ _ _ _ = panic "Unknown call method"+getCallMethod _ _ _ _ _ _ _ _ = panic "Unknown call method" ----------------------------------------------------------------------------- -- Data types for closure information
GHC/StgToCmm/Config.hs view
@@ -11,6 +11,7 @@ import GHC.Utils.Outputable import GHC.Utils.TmpFs +import GHC.Cmm.MachOp ( FMASign(..) ) import GHC.Prelude @@ -49,9 +50,8 @@ , stgToCmmFastPAPCalls :: !Bool -- ^ , stgToCmmSCCProfiling :: !Bool -- ^ Check if cost-centre profiling is enabled , stgToCmmEagerBlackHole :: !Bool -- ^- , stgToCmmInfoTableMap :: !Bool -- ^ true means generate C Stub for IPE map, See Note [Mapping Info Tables to Source Positions]- , stgToCmmInfoTableMapWithFallback :: !Bool -- ^ Include info tables with fallback source locations in the info table map- , stgToCmmInfoTableMapWithStack :: !Bool -- ^ Include info tables for STACK closures in the info table map+ , stgToCmmInfoTableMap :: !Bool -- ^ true means generate C Stub for IPE map, See note [Mapping+ -- Info Tables to Source Positions] , stgToCmmOmitYields :: !Bool -- ^ true means omit heap checks when no allocation is performed , stgToCmmOmitIfPragmas :: !Bool -- ^ true means don't generate interface programs (implied by -O0) , stgToCmmPIC :: !Bool -- ^ true if @-fPIC@@@ -67,6 +67,7 @@ , stgToCmmAllowQuotRem2 :: !Bool -- ^ Allowed to generate QuotRem , stgToCmmAllowExtendedAddSubInstrs :: !Bool -- ^ Allowed to generate AddWordC, SubWordC, Add2, etc. , stgToCmmAllowIntMul2Instr :: !Bool -- ^ Allowed to generate IntMul2 instruction+ , stgToCmmAllowFMAInstr :: FMASign -> Bool -- ^ Allowed to generate FMA instruction , stgToCmmTickyAP :: !Bool -- ^ Disable use of precomputed standard thunks. ------------------------------ SIMD flags ------------------------------------ -- Each of these flags checks vector compatibility with the backend requested
GHC/StgToCmm/DataCon.hs view
@@ -215,11 +215,12 @@ ; checkConArgsDyn (hang (text "TagCheck failed on constructor application.") 4 $ text "On binder:" <> ppr binder $$ text "Constructor:" <> ppr con) con (map fromNonVoid args) ; hp_plus_n <- allocDynClosure ticky_name info_tbl lf_info- use_cc blame_cc args_w_offsets+ (use_cc platform) (blame_cc platform)+ args_w_offsets ; return (mkRhsInit platform reg lf_info hp_plus_n) } where- use_cc -- cost-centre to stick in the object- | isCurrentCCS ccs = cccsExpr+ use_cc platform -- cost-centre to stick in the object+ | isCurrentCCS ccs = cccsExpr platform | otherwise = panic "buildDynCon: non-current CCS not implemented" blame_cc = use_cc -- cost-centre on which to blame the alloc (same)
GHC/StgToCmm/Env.hs view
@@ -149,7 +149,7 @@ | otherwise = pprPanic "GHC.StgToCmm.Env: label not found" (ppr id <+> dcolon <+> ppr (idType id)) in return $- litIdInfo platform id (mkLFImported id) (CmmLabel ext_lbl)+ litIdInfo platform id (importedIdLFInfo id) (CmmLabel ext_lbl) else cgLookupPanic id -- Bug, id is neither in local binds nor is external }}}
GHC/StgToCmm/Expr.hs view
@@ -200,9 +200,9 @@ -> Id -> CgStgRhs -> FCode (CgIdInfo, FCode ())-cgLetNoEscapeRhsBody local_cc bndr (StgRhsClosure _ cc _upd args body)+cgLetNoEscapeRhsBody local_cc bndr (StgRhsClosure _ cc _upd args body _typ) = cgLetNoEscapeClosure bndr local_cc cc (nonVoidIds args) body-cgLetNoEscapeRhsBody local_cc bndr (StgRhsCon cc con mn _ts args)+cgLetNoEscapeRhsBody local_cc bndr (StgRhsCon cc con mn _ts args _typ) = cgLetNoEscapeClosure bndr local_cc cc [] (StgConApp con mn args (pprPanic "cgLetNoEscapeRhsBody" $ text "StgRhsCon doesn't have type args"))@@ -222,12 +222,11 @@ cgLetNoEscapeClosure bndr cc_slot _unused_cc args body = do platform <- getPlatform+ let code = forkLneBody $ withNewTickyCounterLNE bndr args $ do+ { restoreCurrentCostCentre platform cc_slot+ ; arg_regs <- bindArgsToRegs args+ ; void $ noEscapeHeapCheck arg_regs (tickyEnterLNE >> cgExpr body) } return ( lneIdInfo platform bndr args, code )- where- code = forkLneBody $ withNewTickyCounterLNE bndr args $ do- { restoreCurrentCostCentre cc_slot- ; arg_regs <- bindArgsToRegs args- ; void $ noEscapeHeapCheck arg_regs (tickyEnterLNE >> cgExpr body) } ------------------------------------------------------------------------@@ -519,7 +518,7 @@ ; mb_cc <- maybeSaveCostCentre True ; _ <- withSequel (AssignTo [idToReg platform (NonVoid v)] False) (cgExpr scrut)- ; restoreCurrentCostCentre mb_cc+ ; restoreCurrentCostCentre platform mb_cc ; emitComment $ mkFastString "should be unreachable code" ; l <- newBlockId ; emitLabel l@@ -568,7 +567,7 @@ ; let sequel = AssignTo alt_regs do_gc{- Note [scrut sequel] -} ; ret_kind <- withSequel sequel (cgExpr scrut)- ; restoreCurrentCostCentre mb_cc+ ; restoreCurrentCostCentre platform mb_cc ; _ <- bindArgsToRegs ret_bndrs ; cgAlts (gc_plan,ret_kind) (NonVoid bndr) alt_type alts }@@ -1003,7 +1002,8 @@ fun = idInfoToAmode fun_info lf_info = cg_lf fun_info n_args = length args- case getCallMethod cfg fun_name fun_id lf_info n_args (cg_loc fun_info) self_loop of+ v_args = length $ filter (isZeroBitTy . stgArgType) args+ case getCallMethod cfg fun_name fun_id lf_info n_args v_args (cg_loc fun_info) self_loop of -- A value in WHNF, so we can just return it. ReturnIt | isZeroBitTy (idType fun_id) -> emitReturn []@@ -1098,14 +1098,12 @@ -- -- Implementation is spread across a couple of places in the code: ----- * FCode monad stores additional information in its reader--- environment (stgToCmmSelfLoop field). This `SelfLoopInfo`--- record tells us which function can tail call itself in an--- optimized way (it is the function currently being compiled),--- its RepArity, what is the label of its loop header (L1 in--- example above) and information about which local registers--- should receive arguments when making a call (this would be a--- and b in the example above).+-- * FCode monad stores additional information in its reader environment+-- (stgToCmmSelfLoop field). This information tells us which function can+-- tail call itself in an optimized way (it is the function currently+-- being compiled), what is the label of a loop header (L1 in example above)+-- and information about local registers in which we should arguments+-- before making a call (this would be a and b in example above). -- -- * Whenever we are compiling a function, we set that information to reflect -- the fact that function currently being compiled can be jumped to, instead@@ -1129,13 +1127,36 @@ -- of call will be generated. getCallMethod decides to generate a self -- recursive tail call when (a) environment stores information about -- possible self tail-call; (b) that tail call is to a function currently--- being compiled; (c) number of passed arguments is equal to--- function's unarised arity. (d) loopification is turned on via--- -floopification command-line option.+-- being compiled; (c) number of passed non-void arguments is equal to+-- function's arity. (d) loopification is turned on via -floopification+-- command-line option. -- -- * Command line option to turn loopification on and off is implemented in -- DynFlags, then passed to StgToCmmConfig for this phase.-+--+--+-- Note [Void arguments in self-recursive tail calls]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- State# tokens can get in the way of the loopification optimization as seen in+-- #11372. Consider this:+--+-- foo :: [a]+-- -> (a -> State# s -> (# State s, Bool #))+-- -> State# s+-- -> (# State# s, Maybe a #)+-- foo [] f s = (# s, Nothing #)+-- foo (x:xs) f s = case f x s of+-- (# s', b #) -> case b of+-- True -> (# s', Just x #)+-- False -> foo xs f s'+--+-- We would like to compile the call to foo as a local jump instead of a call+-- (see Note [Self-recursive tail calls]). However, the generated function has+-- an arity of 2 while we apply it to 3 arguments, one of them being of void+-- type. Thus, we mustn't count arguments of void type when checking whether+-- we can turn a call into a self-recursive jump.+-- emitEnter :: CmmExpr -> FCode ReturnKind emitEnter fun = do@@ -1157,7 +1178,7 @@ Return -> do { let entry = entryCode platform $ closureInfoPtr platform align_check- $ CmmReg nodeReg+ $ CmmReg (nodeReg platform) ; emit $ mkJump profile NativeNodeCall entry [cmmUntag platform fun] updfr_off ; return AssignedDirectly@@ -1200,12 +1221,13 @@ -- refer to fun via nodeReg after the copyout, to avoid having -- both live simultaneously; this sometimes enables fun to be -- inlined in the RHS of the R1 assignment.- ; let entry = entryCode platform (closureInfoPtr platform align_check (CmmReg nodeReg))+ ; let node = CmmReg $ nodeReg platform+ entry = entryCode platform (closureInfoPtr platform align_check node) the_call = toCall entry (Just lret) updfr_off off outArgs regs ; tscope <- getTickScope ; emit $ copyout <*>- mkCbranch (cmmIsTagged platform (CmmReg nodeReg))+ mkCbranch (cmmIsTagged platform node) lret lcall Nothing <*> outOfLine lcall (the_call,tscope) <*> mkLabel lret tscope <*>
GHC/StgToCmm/Foreign.hs view
@@ -315,7 +315,7 @@ close_nursery <- closeNursery profile tso pure $ catAGraphs [ -- tso = CurrentTSO;- mkAssign (CmmLocal tso) currentTSOExpr+ mkAssign (CmmLocal tso) (currentTSOExpr platform) , -- tso->stackobj->sp = Sp; mkStore (cmmOffset platform@@ -323,13 +323,14 @@ (CmmReg (CmmLocal tso)) (tso_stackobj profile))) (stack_SP profile))- spExpr+ (spExpr platform) , close_nursery , -- and save the current cost centre stack in the TSO when profiling: if profileIsProfiling profile- then mkStore (cmmOffset platform (CmmReg (CmmLocal tso)) (tso_CCCS profile)) cccsExpr+ then mkStore (cmmOffset platform (CmmReg (CmmLocal tso)) (tso_CCCS profile))+ (cccsExpr platform) else mkNop ] @@ -388,14 +389,14 @@ let mask = CmmLit (CmmInt (1 `shiftL` n) (wordWidth platform)) live = cmmAndWord platform regs_live mask cond = cmmNeWord platform live (zeroExpr platform)- reg_ty = cmmRegType platform (CmmGlobal reg)+ reg_ty = globalRegSpillType platform reg width = roundUpToWords platform (widthInBytes $ typeWidth reg_ty)- adj_sp = mkAssign spReg- (cmmOffset platform spExpr (negate width))- save_reg = mkStore spExpr (CmmReg $ CmmGlobal reg)+ adj_sp = mkAssign (spReg platform)+ (cmmOffset platform (spExpr platform) (negate width))+ save_reg = mkStore (spExpr platform) (CmmReg $ CmmGlobal $ GlobalRegUse reg reg_ty) in mkCmmIfThen cond $ catAGraphs [adj_sp, save_reg]- emit . catAGraphs =<< mapM save_arg (reverse regs)+ emit . catAGraphs =<< mapM save_arg (reverse $ regs) -- | Pop a subset of STG registers from the stack (see 'emitPushArgRegs') emitPopArgRegs :: CmmExpr -> FCode ()@@ -406,12 +407,13 @@ let mask = CmmLit (CmmInt (1 `shiftL` n) (wordWidth platform)) live = cmmAndWord platform regs_live mask cond = cmmNeWord platform live (zeroExpr platform)- reg_ty = cmmRegType platform (CmmGlobal reg)+ reg_ty = globalRegSpillType platform reg width = roundUpToWords platform (widthInBytes $ typeWidth reg_ty)- adj_sp = mkAssign spReg- (cmmOffset platform spExpr width)- restore_reg = mkAssign (CmmGlobal reg) (CmmLoad spExpr reg_ty NaturallyAligned)+ adj_sp = mkAssign (spReg platform)+ (cmmOffset platform (spExpr platform) width)+ restore_reg = mkAssign (CmmGlobal $ GlobalRegUse reg reg_ty)+ (CmmLoad (spExpr platform) reg_ty NaturallyAligned) in mkCmmIfThen cond $ catAGraphs [restore_reg, adj_sp] emit . catAGraphs =<< mapM save_arg regs @@ -422,7 +424,7 @@ let platform = profilePlatform profile tso <- newTemp (bWord platform) code <- closeNursery profile tso- emit $ mkAssign (CmmLocal tso) currentTSOExpr <*> code+ emit $ mkAssign (CmmLocal tso) (currentTSOExpr platform) <*> code {- | @closeNursery dflags tso@ produces code to close the nursery.@@ -451,14 +453,14 @@ platform = profilePlatform profile cnreg <- CmmLocal <$> newTemp (bWord platform) pure $ catAGraphs [- mkAssign cnreg currentNurseryExpr,+ mkAssign cnreg (currentNurseryExpr platform), -- CurrentNursery->free = Hp+1;- mkStore (nursery_bdescr_free platform cnreg) (cmmOffsetW platform hpExpr 1),+ mkStore (nursery_bdescr_free platform cnreg) (cmmOffsetW platform (hpExpr platform) 1), let alloc = CmmMachOp (mo_wordSub platform)- [ cmmOffsetW platform hpExpr 1+ [ cmmOffsetW platform (hpExpr platform) 1 , cmmLoadBWord platform (nursery_bdescr_start platform cnreg) ] @@ -486,23 +488,23 @@ open_nursery <- openNursery profile tso pure $ catAGraphs [ -- tso = CurrentTSO;- mkAssign (CmmLocal tso) currentTSOExpr,+ mkAssign (CmmLocal tso) (currentTSOExpr platform), -- stack = tso->stackobj; mkAssign (CmmLocal stack) (cmmLoadBWord platform (cmmOffset platform (CmmReg (CmmLocal tso)) (tso_stackobj profile))), -- Sp = stack->sp;- mkAssign spReg (cmmLoadBWord platform (cmmOffset platform (CmmReg (CmmLocal stack)) (stack_SP profile))),+ mkAssign (spReg platform) (cmmLoadBWord platform (cmmOffset platform (CmmReg (CmmLocal stack)) (stack_SP profile))), -- SpLim = stack->stack + RESERVED_STACK_WORDS;- mkAssign spLimReg (cmmOffsetW platform (cmmOffset platform (CmmReg (CmmLocal stack)) (stack_STACK profile))+ mkAssign (spLimReg platform) (cmmOffsetW platform (cmmOffset platform (CmmReg (CmmLocal stack)) (stack_STACK profile)) (pc_RESERVED_STACK_WORDS (platformConstants platform))), -- HpAlloc = 0; -- HpAlloc is assumed to be set to non-zero only by a failed -- a heap check, see HeapStackCheck.cmm:GC_GENERIC- mkAssign hpAllocReg (zeroExpr platform),+ mkAssign (hpAllocReg platform) (zeroExpr platform), open_nursery, -- and load the current cost centre stack from the TSO when profiling: if profileIsProfiling profile then let ccs_ptr = cmmOffset platform (CmmReg (CmmLocal tso)) (tso_CCCS profile)- in storeCurCCS (CmmLoad ccs_ptr (ccsType platform) NaturallyAligned)+ in storeCurCCS platform (CmmLoad ccs_ptr (ccsType platform) NaturallyAligned) else mkNop ] @@ -513,7 +515,7 @@ let platform = profilePlatform profile tso <- newTemp (bWord platform) code <- openNursery profile tso- emit $ mkAssign (CmmLocal tso) currentTSOExpr <*> code+ emit $ mkAssign (CmmLocal tso) (currentTSOExpr platform) <*> code {- | @openNursery profile tso@ produces code to open the nursery. A local register@@ -556,17 +558,17 @@ -- what code we generate, look at the assembly for -- stg_returnToStackTop in rts/StgStartup.cmm. pure $ catAGraphs [- mkAssign cnreg currentNurseryExpr,+ mkAssign cnreg (currentNurseryExpr platform), mkAssign bdfreereg (cmmLoadBWord platform (nursery_bdescr_free platform cnreg)), -- Hp = CurrentNursery->free - 1;- mkAssign hpReg (cmmOffsetW platform (CmmReg bdfreereg) (-1)),+ mkAssign (hpReg platform) (cmmOffsetW platform (CmmReg bdfreereg) (-1)), mkAssign bdstartreg (cmmLoadBWord platform (nursery_bdescr_start platform cnreg)), -- HpLim = CurrentNursery->start + -- CurrentNursery->blocks*BLOCK_SIZE_W - 1;- mkAssign hpLimReg+ mkAssign (hpLimReg platform) (cmmOffsetExpr platform (CmmReg bdstartreg) (cmmOffset platform
GHC/StgToCmm/Heap.hs view
@@ -353,11 +353,12 @@ -> FCode () entryHeapCheck' is_fastf node arity args code = do profile <- getProfile- let is_thunk = arity == 0+ let platform = profilePlatform profile+ is_thunk = arity == 0 args' = map (CmmReg . CmmLocal) args- stg_gc_fun = CmmReg (CmmGlobal GCFun)- stg_gc_enter1 = CmmReg (CmmGlobal GCEnter1)+ stg_gc_fun = CmmReg (CmmGlobal $ GlobalRegUse GCFun $ bWord platform)+ stg_gc_enter1 = CmmReg (CmmGlobal $ GlobalRegUse GCEnter1 $ bWord platform) {- Thunks: jump stg_gc_enter_1 @@ -615,14 +616,14 @@ -- See Note [Single stack check] sp_oflo sp_hwm = CmmMachOp (mo_wordULt platform)- [CmmMachOp (MO_Sub (typeWidth (cmmRegType platform spReg)))+ [CmmMachOp (MO_Sub (typeWidth (cmmRegType $ spReg platform))) [CmmStackSlot Old 0, sp_hwm],- CmmReg spLimReg]+ CmmReg $ spLimReg platform] -- 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 platform) [hpExpr, hpLimExpr]+ hp_oflo = CmmMachOp (mo_wordUGt platform) [hpExpr platform, hpLimExpr platform] case mb_stk_hwm of Nothing -> return ()@@ -634,22 +635,22 @@ -- See Note [Self-recursive loop header]. self_loop_info <- getSelfLoop case self_loop_info of- Just MkSelfLoopInfo { sli_header_block = loop_header_id }+ Just (_, loop_header_id, _) | checkYield && isJust mb_stk_hwm -> emitLabel loop_header_id _otherwise -> return () case mb_alloc_lit of Just alloc_lit -> do- let bump_hp = cmmOffsetExprB platform hpExpr alloc_lit- alloc_n = mkAssign hpAllocReg alloc_lit+ let bump_hp = cmmOffsetExprB platform (hpExpr platform) alloc_lit+ alloc_n = mkAssign (hpAllocReg platform) alloc_lit tickyHeapCheck- emitAssign hpReg bump_hp+ emitAssign (hpReg platform) bump_hp emit =<< mkCmmIfThen' hp_oflo (alloc_n <*> mkBranch gc_id) (Just False) Nothing -> when (checkYield && not omit_yields) $ do -- Yielding if HpLim == 0 let yielding = CmmMachOp (mo_wordEq platform)- [CmmReg hpLimReg,+ [CmmReg $ hpLimReg platform, CmmLit (zeroCLit platform)] emit =<< mkCmmIfGoto' yielding gc_id (Just False)
GHC/StgToCmm/InfoTableProv.hs view
@@ -1,82 +1,205 @@+{-# LANGUAGE CPP #-}+ module GHC.StgToCmm.InfoTableProv (emitIpeBufferListNode) where +import Foreign++#if defined(HAVE_LIBZSTD)+import Foreign.C.Types+import Foreign.Marshal.Utils (copyBytes)+import qualified Data.ByteString.Internal as BSI+import GHC.IO (unsafePerformIO)+#endif+ import GHC.Prelude import GHC.Platform+import GHC.Types.SrcLoc (pprUserRealSpan, srcSpanFile) import GHC.Unit.Module import GHC.Utils.Outputable-import GHC.Types.SrcLoc (pprUserRealSpan, srcSpanFile)-import GHC.Data.FastString (unpackFS)+import GHC.Data.FastString (fastStringToShortText, unpackFS, LexicalFastString(..)) +import GHC.Cmm import GHC.Cmm.CLabel-import GHC.Cmm.Expr import GHC.Cmm.Utils+ import GHC.StgToCmm.Config-import GHC.StgToCmm.Lit (newByteStringCLit) import GHC.StgToCmm.Monad-import GHC.StgToCmm.Utils import GHC.Data.ShortText (ShortText) import qualified GHC.Data.ShortText as ST -import qualified Data.Map.Strict as M import Control.Monad.Trans.State.Strict+ import qualified Data.ByteString as BS import qualified Data.ByteString.Builder as BSB import qualified Data.ByteString.Lazy as BSL+import qualified Data.Map.Strict as M -emitIpeBufferListNode :: Module- -> [InfoProvEnt]- -> FCode ()+{-+Note [Compression and Decompression of IPE data]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++Compiling with `-finfo-table-map` causes build results to include a map from+info tables to source positions called the info table provenance entry (IPE)+map. See Note [Mapping Info Tables to Source Positions]. The IPE information+can grow the size of build results significantly. At the time of writing, a+default build of GHC results in a total of 109M of libHSghc-*.so build results.+A default+ipe build of GHC (see ./hadrian/doc/flavours.md) results in 262M of+libHSghc-*.so build results without compression.++We reduce the impact of IPE data on the size of build results by compressing+the data before it is emitted using the zstd compression library. See+Note [The Info Table Provenance Entry (IPE) Map] for information on the layout+of IPE data on disk and in the RTS. We cannot simply compress all data held in+the IPE entry buffer, as the pointers to info tables must be converted to+memory addresses during linking. Therefore, we can only compress the strings+table and the IPE entries themselves (which essentially only consist of indices+into the strings table).++With compression, a default+ipe build of GHC results in a total of 205M of+libHSghc-*.so build results. This is over a 20% reduction from the uncompressed+case.++Decompression happens lazily, as it only occurs when the IPE map is+constructed (which is also done lazily on first lookup or traversal). During+construction, the 'compressed' field of each IPE buffer list node is examined.+If the field indicates that the data has been compressed, the entry data and+strings table are decompressed before continuing with the normal IPE map+construction.+-}++emitIpeBufferListNode ::+ Module+ -> [InfoProvEnt]+ -> FCode () emitIpeBufferListNode _ [] = return () emitIpeBufferListNode this_mod ents = do cfg <- getStgToCmmConfig- let ctx = stgToCmmContext cfg++ tables_lbl <- mkStringLitLabel <$> newUnique+ strings_lbl <- mkStringLitLabel <$> newUnique+ entries_lbl <- mkStringLitLabel <$> newUnique++ let ctx = stgToCmmContext cfg platform = stgToCmmPlatform cfg+ int n = mkIntCLit platform n - let (cg_ipes, strtab) = flip runState emptyStringTable $ do- module_name <- lookupStringTable $ ST.pack $ renderWithContext ctx (ppr this_mod)- mapM (toCgIPE platform ctx module_name) ents+ (cg_ipes, strtab) = flip runState emptyStringTable $ do+ module_name <- lookupStringTable $ ST.pack $ renderWithContext ctx (ppr this_mod)+ mapM (toCgIPE platform ctx module_name) ents - let -- Emit the fields of an IpeBufferEntry struct.- toIpeBufferEntry :: CgInfoProvEnt -> [CmmLit]- toIpeBufferEntry cg_ipe =- [ CmmLabel (ipeInfoTablePtr cg_ipe)- , strtab_offset (ipeTableName cg_ipe)- , strtab_offset (ipeClosureDesc cg_ipe)- , strtab_offset (ipeTypeDesc cg_ipe)- , strtab_offset (ipeLabel cg_ipe)- , strtab_offset (ipeModuleName cg_ipe)- , strtab_offset (ipeSrcFile cg_ipe)- , strtab_offset (ipeSrcSpan cg_ipe)- , int32 0- ]+ tables :: [CmmStatic]+ tables = map (CmmStaticLit . CmmLabel . ipeInfoTablePtr) cg_ipes - int n = mkIntCLit platform n- int32 n = CmmInt n W32- strtab_offset (StrTabOffset n) = int32 (fromIntegral n)+ uncompressed_strings :: BS.ByteString+ uncompressed_strings = getStringTableStrings strtab - strings <- newByteStringCLit (getStringTableStrings strtab)- let lits = [ zeroCLit platform -- 'next' field- , strings -- 'strings' field- , int $ length cg_ipes -- 'count' field- ] ++ concatMap toIpeBufferEntry cg_ipes- emitDataLits (mkIPELabel this_mod) lits+ strings_bytes :: BS.ByteString+ strings_bytes = compress defaultCompressionLevel uncompressed_strings + strings :: [CmmStatic]+ strings = [CmmString strings_bytes]++ uncompressed_entries :: BS.ByteString+ uncompressed_entries = toIpeBufferEntries (platformByteOrder platform) cg_ipes++ entries_bytes :: BS.ByteString+ entries_bytes = compress defaultCompressionLevel uncompressed_entries++ entries :: [CmmStatic]+ entries = [CmmString entries_bytes]++ ipe_buffer_lbl :: CLabel+ ipe_buffer_lbl = mkIPELabel this_mod++ ipe_buffer_node :: [CmmStatic]+ ipe_buffer_node = map CmmStaticLit+ [ -- 'next' field+ zeroCLit platform++ -- 'compressed' field+ , int do_compress++ -- 'count' field+ , int $ length cg_ipes++ -- 'tables' field+ , CmmLabel tables_lbl++ -- 'entries' field+ , CmmLabel entries_lbl++ -- 'entries_size' field (decompressed size)+ , int $ BS.length uncompressed_entries++ -- 'string_table' field+ , CmmLabel strings_lbl++ -- 'string_table_size' field (decompressed size)+ , int $ BS.length uncompressed_strings+ ]++ -- Emit the list of info table pointers+ emitDecl $ CmmData+ (Section Data tables_lbl)+ (CmmStaticsRaw tables_lbl tables)++ -- Emit the strings table+ emitDecl $ CmmData+ (Section Data strings_lbl)+ (CmmStaticsRaw strings_lbl strings)++ -- Emit the list of IPE buffer entries+ emitDecl $ CmmData+ (Section Data entries_lbl)+ (CmmStaticsRaw entries_lbl entries)++ -- Emit the IPE buffer list node+ emitDecl $ CmmData+ (Section Data ipe_buffer_lbl)+ (CmmStaticsRaw ipe_buffer_lbl ipe_buffer_node)++-- | Emit the fields of an IpeBufferEntry struct for each entry in a given list.+toIpeBufferEntries ::+ ByteOrder -- ^ Byte order to write the data in+ -> [CgInfoProvEnt] -- ^ List of IPE buffer entries+ -> BS.ByteString+toIpeBufferEntries byte_order cg_ipes =+ BSL.toStrict . BSB.toLazyByteString . mconcat+ $ map (mconcat . map word32Builder . to_ipe_buf_ent) cg_ipes+ where+ to_ipe_buf_ent :: CgInfoProvEnt -> [Word32]+ to_ipe_buf_ent cg_ipe =+ [ ipeTableName cg_ipe+ , ipeClosureDesc cg_ipe+ , ipeTypeDesc cg_ipe+ , ipeLabel cg_ipe+ , ipeModuleName cg_ipe+ , ipeSrcFile cg_ipe+ , ipeSrcSpan cg_ipe+ , 0 -- padding+ ]++ word32Builder :: Word32 -> BSB.Builder+ word32Builder = case byte_order of+ BigEndian -> BSB.word32BE+ LittleEndian -> BSB.word32LE+ toCgIPE :: Platform -> SDocContext -> StrTabOffset -> InfoProvEnt -> State StringTable CgInfoProvEnt toCgIPE platform ctx module_name ipe = do table_name <- lookupStringTable $ ST.pack $ renderWithContext ctx (pprCLabel platform (infoTablePtr ipe)) closure_desc <- lookupStringTable $ ST.pack $ show (infoProvEntClosureType ipe) type_desc <- lookupStringTable $ ST.pack $ infoTableType ipe- let label_str = maybe "" snd (infoTableProv ipe)+ let label_str = maybe "" ((\(LexicalFastString s) -> unpackFS s) . snd) (infoTableProv ipe) let (src_loc_file, src_loc_span) = case infoTableProv ipe of- Nothing -> ("", "")+ Nothing -> (mempty, "") Just (span, _) ->- let file = unpackFS $ srcSpanFile span+ let file = fastStringToShortText $ srcSpanFile span coords = renderWithContext ctx (pprUserRealSpan False span) in (file, coords)- label <- lookupStringTable $ ST.pack label_str- src_file <- lookupStringTable $ ST.pack src_loc_file+ label <- lookupStringTable $ ST.pack label_str+ src_file <- lookupStringTable src_loc_file src_span <- lookupStringTable $ ST.pack src_loc_span return $ CgInfoProvEnt { ipeInfoTablePtr = infoTablePtr ipe , ipeTableName = table_name@@ -104,7 +227,7 @@ , stLookup :: !(M.Map ShortText StrTabOffset) } -newtype StrTabOffset = StrTabOffset Int+type StrTabOffset = Word32 emptyStringTable :: StringTable emptyStringTable =@@ -129,8 +252,49 @@ , stLength = stLength st + ST.byteLength str + 1 , stLookup = M.insert str res (stLookup st) }- res = StrTabOffset (stLength st)+ res = fromIntegral (stLength st) in (res, st')++do_compress :: Int+compress :: Int -> BS.ByteString -> BS.ByteString+#if !defined(HAVE_LIBZSTD)+do_compress = 0+compress _ bs = bs+#else+do_compress = 1++compress clvl (BSI.PS srcForeignPtr off len) = unsafePerformIO $+ withForeignPtr srcForeignPtr $ \srcPtr -> do+ maxCompressedSize <- zstd_compress_bound $ fromIntegral len+ dstForeignPtr <- BSI.mallocByteString (fromIntegral maxCompressedSize)+ withForeignPtr dstForeignPtr $ \dstPtr -> do+ compressedSize <- fromIntegral <$>+ zstd_compress+ dstPtr+ maxCompressedSize+ (srcPtr `plusPtr` off)+ (fromIntegral len)+ (fromIntegral clvl)+ BSI.create compressedSize $ \p -> copyBytes p dstPtr compressedSize++foreign import ccall unsafe "ZSTD_compress"+ zstd_compress ::+ Ptr dst -- ^ Destination buffer+ -> CSize -- ^ Capacity of destination buffer+ -> Ptr src -- ^ Source buffer+ -> CSize -- ^ Size of source buffer+ -> CInt -- ^ Compression level+ -> IO CSize++-- | Compute the maximum compressed size for a given source buffer size+foreign import ccall unsafe "ZSTD_compressBound"+ zstd_compress_bound ::+ CSize -- ^ Size of source buffer+ -> IO CSize+#endif++defaultCompressionLevel :: Int+defaultCompressionLevel = 3 newtype DList a = DList ([a] -> [a])
GHC/StgToCmm/Layout.hs view
@@ -155,9 +155,10 @@ adjust_words = vHp -rHp ; new_hp <- getHpRelOffset vHp + ; platform <- getPlatform ; emit (if adjust_words == 0 then mkNop- else mkAssign hpReg new_hp) -- Generates nothing when vHp==rHp+ else mkAssign (hpReg platform) new_hp) -- Generates nothing when vHp==rHp ; tickyAllocHeap False adjust_words -- ...ditto @@ -305,10 +306,11 @@ | otherwise -- Note [over-saturated calls] = do do_scc_prof <- stgToCmmSCCProfiling <$> getStgToCmmConfig+ platform <- getPlatform emitCallWithExtraStack (call_conv, NativeReturn) target (nonVArgs fast_args)- (nonVArgs (slowArgs rest_args do_scc_prof))+ (nonVArgs (slowArgs platform rest_args do_scc_prof)) where target = CmmLit (CmmLabel lbl) (fast_args, rest_args) = splitAt real_arity args@@ -375,18 +377,18 @@ -- | 'slowArgs' takes a list of function arguments and prepares them for -- pushing on the stack for "extra" arguments to a function which requires -- fewer arguments than we currently have.-slowArgs :: [(ArgRep, Maybe CmmExpr)] -> DoSCCProfiling -> [(ArgRep, Maybe CmmExpr)]-slowArgs [] _ = mempty-slowArgs args sccProfilingEnabled -- careful: reps contains voids (V), but args does not- | sccProfilingEnabled = save_cccs ++ this_pat ++ slowArgs rest_args sccProfilingEnabled- | otherwise = this_pat ++ slowArgs rest_args sccProfilingEnabled+slowArgs :: Platform -> [(ArgRep, Maybe CmmExpr)] -> DoSCCProfiling -> [(ArgRep, Maybe CmmExpr)]+slowArgs _ [] _ = mempty+slowArgs platform args sccProfilingEnabled -- careful: reps contains voids (V), but args does not+ | sccProfilingEnabled = save_cccs ++ this_pat ++ slowArgs platform rest_args sccProfilingEnabled+ | otherwise = this_pat ++ slowArgs platform rest_args sccProfilingEnabled where (arg_pat, n) = slowCallPattern (map fst args) (call_args, rest_args) = splitAt n args stg_ap_pat = mkCmmRetInfoLabel rtsUnitId arg_pat this_pat = (N, Just (mkLblExpr stg_ap_pat)) : call_args- save_cccs = [(N, Just (mkLblExpr save_cccs_lbl)), (N, Just cccsExpr)]+ save_cccs = [(N, Just (mkLblExpr save_cccs_lbl)), (N, Just $ cccsExpr platform)] save_cccs_lbl = mkCmmRetInfoLabel rtsUnitId (fsLit "stg_restore_cccs") -------------------------------------------------------------------------@@ -404,7 +406,7 @@ getHpRelOffset virtual_offset = do platform <- getPlatform hp_usg <- getHpUsage- return (cmmRegOffW platform hpReg (hpRel (realHp hp_usg) virtual_offset))+ return (cmmRegOffW platform (hpReg platform) (hpRel (realHp hp_usg) virtual_offset)) data FieldOffOrPadding a = FieldOff (NonVoid a) -- Something that needs an offset.@@ -554,7 +556,7 @@ argBits :: Platform -> [ArgRep] -> [Bool] -- True for non-ptr, False for ptr argBits _ [] = [] argBits platform (P : args) = False : argBits platform args-argBits platform (arg : args) = take (argRepSizeW platform arg) (repeat True)+argBits platform (arg : args) = replicate (argRepSizeW platform arg) True ++ argBits platform args ----------------------
GHC/StgToCmm/Lit.hs view
@@ -53,8 +53,7 @@ cgLit (LitRubbish _ rep) = case expectOnly "cgLit" prim_reps of -- Note [Post-unarisation invariants] VoidRep -> panic "cgLit:VoidRep" -- ditto- LiftedRep -> idInfoToAmode <$> getCgIdInfo unitDataConId- UnliftedRep -> idInfoToAmode <$> getCgIdInfo unitDataConId+ BoxedRep _ -> idInfoToAmode <$> getCgIdInfo unitDataConId AddrRep -> cgLit LitNullAddr VecRep n elem -> do platform <- getPlatform
GHC/StgToCmm/Monad.hs view
@@ -42,8 +42,6 @@ Sequel(..), ReturnKind(..), withSequel, getSequel, - SelfLoopInfo(..),- setTickyCtrLabel, getTickyCtrLabel, tickScope, getTickScope, @@ -300,7 +298,7 @@ -- else the RTS will deadlock _and_ also experience a severe -- performance degradation , fcs_sequel :: !Sequel -- ^ What to do at end of basic block- , fcs_selfloop :: !(Maybe SelfLoopInfo) -- ^ Which tail calls can be compiled as local jumps?+ , fcs_selfloop :: Maybe SelfLoopInfo -- ^ Which tail calls can be compiled as local jumps? -- See Note [Self-recursive tail calls] in GHC.StgToCmm.Expr , fcs_ticky :: !CLabel -- ^ Destination for ticky counts , fcs_tickscope :: !CmmTickScope -- ^ Tick scope for new blocks & ticks
GHC/StgToCmm/Prim.hs view
@@ -255,7 +255,7 @@ emitCCall [(res,NoHint)] (CmmLit (CmmLabel (mkForeignLabel (fsLit "newSpark") Nothing ForeignLabelInExternalPackage IsFunction)))- [(baseExpr, AddrHint), (arg,AddrHint)]+ [(baseExpr platform, AddrHint), (arg,AddrHint)] SparkOp -> \[arg] -> opIntoRegs $ \[res] -> do -- returns the value of arg in res. We're going to therefore@@ -266,7 +266,7 @@ emitCCall [(tmp2,NoHint)] (CmmLit (CmmLabel (mkForeignLabel (fsLit "newSpark") Nothing ForeignLabelInExternalPackage IsFunction)))- [(baseExpr, AddrHint), ((CmmReg (CmmLocal tmp)), AddrHint)]+ [(baseExpr platform, AddrHint), ((CmmReg (CmmLocal tmp)), AddrHint)] emitAssign (CmmLocal res) (CmmReg (CmmLocal tmp)) GetCCSOfOp -> \[arg] -> opIntoRegs $ \[res] -> do@@ -277,10 +277,10 @@ emitAssign (CmmLocal res) val GetCurrentCCSOp -> \[_] -> opIntoRegs $ \[res] ->- emitAssign (CmmLocal res) cccsExpr+ emitAssign (CmmLocal res) (cccsExpr platform) MyThreadIdOp -> \[] -> opIntoRegs $ \[res] ->- emitAssign (CmmLocal res) currentTSOExpr+ emitAssign (CmmLocal res) (currentTSOExpr platform) ReadMutVarOp -> \[mutv] -> opIntoRegs $ \[res] -> emitPrimCall [res] (MO_AtomicRead (wordWidth platform) MemOrderAcquire)@@ -297,16 +297,12 @@ -- MutVar's value. emitPrimCall [] (MO_AtomicWrite (wordWidth platform) MemOrderRelease) [ cmmOffsetW platform mutv (fixedHdrSizeW profile), var ]+ emitDirtyMutVar mutv (CmmReg old_val) - platform <- getPlatform- mkdirtyMutVarCCall <- getCode $! emitCCall- [{-no results-}]- (CmmLit (CmmLabel mkDirty_MUT_VAR_Label))- [(baseExpr, AddrHint), (mutv, AddrHint), (CmmReg old_val, AddrHint)]- emit =<< mkCmmIfThen- (cmmEqWord platform (mkLblExpr mkMUT_VAR_CLEAN_infoLabel)- (closureInfoPtr platform (stgToCmmAlignCheck cfg) mutv))- mkdirtyMutVarCCall+ AtomicSwapMutVarOp -> \[mutv, val] -> opIntoRegs $ \[res] -> do+ let dst = cmmOffsetW platform mutv (fixedHdrSizeW profile)+ emitPrimCall [res] (MO_Xchg (wordWidth platform)) [dst, val]+ emitDirtyMutVar mutv (CmmReg (CmmLocal res)) -- #define sizzeofByteArrayzh(r,a) \ -- r = ((StgArrBytes *)(a))->bytes@@ -710,14 +706,22 @@ doCopyByteArrayOp src src_off dst dst_off n CopyMutableByteArrayOp -> \[src,src_off,dst,dst_off,n] -> opIntoRegs $ \[] -> doCopyMutableByteArrayOp src src_off dst dst_off n+ CopyMutableByteArrayNonOverlappingOp -> \[src,src_off,dst,dst_off,n] -> opIntoRegs $ \[] ->+ doCopyMutableByteArrayNonOverlappingOp src src_off dst dst_off n CopyByteArrayToAddrOp -> \[src,src_off,dst,n] -> opIntoRegs $ \[] -> doCopyByteArrayToAddrOp src src_off dst n CopyMutableByteArrayToAddrOp -> \[src,src_off,dst,n] -> opIntoRegs $ \[] -> doCopyMutableByteArrayToAddrOp src src_off dst n CopyAddrToByteArrayOp -> \[src,dst,dst_off,n] -> opIntoRegs $ \[] -> doCopyAddrToByteArrayOp src dst dst_off n+ CopyAddrToAddrOp -> \[src,dst,n] -> opIntoRegs $ \[] ->+ doCopyAddrToAddrOp src dst n+ CopyAddrToAddrNonOverlappingOp -> \[src,dst,n] -> opIntoRegs $ \[] ->+ doCopyAddrToAddrNonOverlappingOp src dst n SetByteArrayOp -> \[ba,off,len,c] -> opIntoRegs $ \[] -> doSetByteArrayOp ba off len c+ SetAddrRangeOp -> \[dst,len,c] -> opIntoRegs $ \[] ->+ doSetAddrRangeOp dst len c -- Comparing byte arrays CompareByteArraysOp -> \[ba1,ba1_off,ba2,ba2_off,n] -> opIntoRegs $ \[res] ->@@ -1391,6 +1395,11 @@ DoubleDivOp -> \args -> opTranslate args (MO_F_Quot W64) DoubleNegOp -> \args -> opTranslate args (MO_F_Neg W64) + DoubleFMAdd -> fmaOp FMAdd W64+ DoubleFMSub -> fmaOp FMSub W64+ DoubleFNMAdd -> fmaOp FNMAdd W64+ DoubleFNMSub -> fmaOp FNMSub W64+ -- Float ops FloatEqOp -> \args -> opTranslate args (MO_F_Eq W32)@@ -1406,6 +1415,11 @@ FloatDivOp -> \args -> opTranslate args (MO_F_Quot W32) FloatNegOp -> \args -> opTranslate args (MO_F_Neg W32) + FloatFMAdd -> fmaOp FMAdd W32+ FloatFMSub -> fmaOp FMSub W32+ FloatFNMAdd -> fmaOp FNMAdd W32+ FloatFNMSub -> fmaOp FNMSub W32+ -- Vector ops (VecAddOp FloatVec n w) -> \args -> opTranslate args (MO_VF_Add n w)@@ -1731,6 +1745,27 @@ allowExtAdd = stgToCmmAllowExtendedAddSubInstrs cfg allowInt2Mul = stgToCmmAllowIntMul2Instr cfg + allowFMA = stgToCmmAllowFMAInstr cfg++ fmaOp :: FMASign -> Width -> [CmmActual] -> PrimopCmmEmit+ fmaOp signs w args@[arg_x, arg_y, arg_z]+ | allowFMA signs+ = opTranslate args (MO_FMA signs w)+ | otherwise+ = case signs of++ -- For fused multiply-add x * y + z, we fall back to the C implementation.+ FMAdd -> opIntoRegs $ \ [res] -> fmaCCall w res arg_x arg_y arg_z++ -- Other fused multiply-add operations are implemented in terms of fmadd+ -- This is sound: it does not lose any precision.+ FMSub -> fmaOp FMAdd w [arg_x, arg_y, neg arg_z]+ FNMAdd -> fmaOp FMAdd w [neg arg_x, arg_y, arg_z]+ FNMSub -> fmaOp FMAdd w [neg arg_x, arg_y, neg arg_z]+ where+ neg x = CmmMachOp (MO_F_Neg w) [x]+ fmaOp _ _ _ = panic "fmaOp: wrong number of arguments (expected 3)"+ data PrimopCmmEmit -- | Out of line fake primop that's actually just a foreign call to other -- (presumably) C--.@@ -2019,6 +2054,19 @@ ] genericIntMul2Op _ _ = panic "genericIntMul2Op" +fmaCCall :: Width -> CmmFormal -> CmmActual -> CmmActual -> CmmActual -> FCode ()+fmaCCall width res arg_x arg_y arg_z =+ emitCCall+ [(res,NoHint)]+ (CmmLit (CmmLabel fma_lbl))+ [(arg_x,NoHint), (arg_y,NoHint), (arg_z,NoHint)]+ where+ fma_lbl = mkForeignLabel fma_op Nothing ForeignLabelInExternalPackage IsFunction+ fma_op = case width of+ W32 -> fsLit "fmaf"+ W64 -> fsLit "fma"+ _ -> panic ("fmaCall: " ++ show width)+ ------------------------------------------------------------------------------ -- Helpers for translating various minor variants of array indexing. @@ -2026,8 +2074,8 @@ -> CmmType -- ^ index type -> AlignmentSpec alignmentFromTypes ty idx_ty- | typeWidth ty <= typeWidth idx_ty = NaturallyAligned- | otherwise = Unaligned+ | typeWidth ty < typeWidth idx_ty = NaturallyAligned+ | otherwise = Unaligned doIndexOffAddrOp :: Maybe MachOp -> CmmType@@ -2465,7 +2513,7 @@ let hdr_size = fixedHdrSize profile - base <- allocHeapClosure rep info_ptr cccsExpr+ base <- allocHeapClosure rep info_ptr (cccsExpr platform) [ (mkIntExpr platform n, hdr_size + pc_OFFSET_StgArrBytes_bytes (platformConstants platform)) ]@@ -2567,6 +2615,19 @@ (getCode $ emitMemcpyCall dst_p src_p bytes align) emit =<< mkCmmIfThenElse (cmmEqWord platform src dst) moveCall cpyCall +-- | Takes a source 'MutableByteArray#', an offset in the source+-- array, a destination 'MutableByteArray#', an offset into the+-- destination array, and the number of bytes to copy. Copies the+-- given number of bytes from the source array to the destination+-- array. Assumes the two ranges are disjoint+doCopyMutableByteArrayNonOverlappingOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr+ -> FCode ()+doCopyMutableByteArrayNonOverlappingOp = emitCopyByteArray copy+ where+ copy _src _dst dst_p src_p bytes align = do+ emitCheckedMemcpyCall dst_p src_p bytes align++ emitCopyByteArray :: (CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> Alignment -> FCode ()) -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr@@ -2620,6 +2681,22 @@ dst_p <- assignTempE $ cmmOffsetExpr platform (cmmOffsetB platform dst (arrWordsHdrSize profile)) dst_off emitCheckedMemcpyCall dst_p src_p bytes (mkAlignment 1) +-- | Takes a source 'Addr#', a destination 'Addr#', and the number of+-- bytes to copy. Copies the given number of bytes from the source+-- memory region to the destination array.+doCopyAddrToAddrOp :: CmmExpr -> CmmExpr -> CmmExpr -> FCode ()+doCopyAddrToAddrOp src_p dst_p bytes = do+ -- Use memmove; the ranges may overlap+ emitMemmoveCall dst_p src_p bytes (mkAlignment 1)++-- | Takes a source 'Addr#', a destination 'Addr#', and the number of+-- bytes to copy. Copies the given number of bytes from the source+-- memory region to the destination region. The regions may not overlap.+doCopyAddrToAddrNonOverlappingOp :: CmmExpr -> CmmExpr -> CmmExpr -> FCode ()+doCopyAddrToAddrNonOverlappingOp src_p dst_p bytes = do+ -- Use memcpy; the ranges may not overlap+ emitCheckedMemcpyCall dst_p src_p bytes (mkAlignment 1)+ ifNonZero :: CmmExpr -> FCode () -> FCode () ifNonZero e it = do platform <- getPlatform@@ -2635,7 +2712,7 @@ -- | Takes a 'MutableByteArray#', an offset into the array, a length, -- and a byte, and sets each of the selected bytes in the array to the--- character.+-- given byte. doSetByteArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> FCode () doSetByteArrayOp ba off len c = do@@ -2652,6 +2729,14 @@ p <- assignTempE $ cmmOffsetExpr platform (cmmOffsetB platform ba (arrWordsHdrSize profile)) off emitMemsetCall p c len align +-- | Takes an 'Addr#', a length, and a byte, and sets each of the+-- selected bytes in memory to the given byte.+doSetAddrRangeOp :: CmmExpr -> CmmExpr -> CmmExpr+ -> FCode ()+doSetAddrRangeOp dst len c = do+ emitMemsetCall dst c len (mkAlignment 1)++ -- ---------------------------------------------------------------------------- -- Allocating arrays @@ -2673,7 +2758,7 @@ (mkIntExpr platform (nonHdrSize platform rep)) (zeroExpr platform) - base <- allocHeapClosure rep info_ptr cccsExpr payload+ base <- allocHeapClosure rep info_ptr (cccsExpr platform) payload arr <- CmmLocal `fmap` newTemp (bWord platform) emit $ mkAssign arr base@@ -2868,7 +2953,7 @@ let hdr_size = fixedHdrSize profile constants = platformConstants platform - base <- allocHeapClosure rep info_ptr cccsExpr+ base <- allocHeapClosure rep info_ptr (cccsExpr platform) [ (mkIntExpr platform n, hdr_size + pc_OFFSET_StgMutArrPtrs_ptrs constants) , (mkIntExpr platform (nonHdrSizeW rep),@@ -2908,7 +2993,7 @@ let hdr_size = fixedHdrSize profile - base <- allocHeapClosure rep info_ptr cccsExpr+ base <- allocHeapClosure rep info_ptr (cccsExpr platform) [ (mkIntExpr platform n, hdr_size + pc_OFFSET_StgSmallMutArrPtrs_ptrs (platformConstants platform)) ]@@ -3301,6 +3386,21 @@ if elem_w == idx_w then emitBoundsCheck idx effective_arr_sz -- aligned => simpler check else assert (idx_w == W8) (emitRangeBoundsCheck idx elem_sz arr_sz)++-- | Write barrier for @MUT_VAR@ modification.+emitDirtyMutVar :: CmmExpr -> CmmExpr -> FCode ()+emitDirtyMutVar mutvar old_val = do+ cfg <- getStgToCmmConfig+ platform <- getPlatform+ mkdirtyMutVarCCall <- getCode $! emitCCall+ [{-no results-}]+ (CmmLit (CmmLabel mkDirty_MUT_VAR_Label))+ [(baseExpr platform, AddrHint), (mutvar, AddrHint), (old_val, AddrHint)]++ emit =<< mkCmmIfThen+ (cmmEqWord platform (mkLblExpr mkMUT_VAR_CLEAN_infoLabel)+ (closureInfoPtr platform (stgToCmmAlignCheck cfg) mutvar))+ mkdirtyMutVarCCall --------------------------------------------------------------------------- -- Pushing to the update remembered set
GHC/StgToCmm/Prof.hs view
@@ -71,8 +71,8 @@ ccType :: Platform -> CmmType -- Type of a cost centre ccType = bWord -storeCurCCS :: CmmExpr -> CmmAGraph-storeCurCCS = mkAssign cccsReg+storeCurCCS :: Platform -> CmmExpr -> CmmAGraph+storeCurCCS platform = mkAssign (cccsReg platform) mkCCostCentre :: CostCentre -> CmmLit mkCCostCentre cc = CmmLabel (mkCCLabel cc)@@ -103,7 +103,7 @@ initUpdFrameProf frame = ifProfiling $ -- frame->header.prof.ccs = CCCS do platform <- getPlatform- emitStore (cmmOffset platform frame (pc_OFFSET_StgHeader_ccs (platformConstants platform))) cccsExpr+ emitStore (cmmOffset platform frame (pc_OFFSET_StgHeader_ccs (platformConstants platform))) (cccsExpr platform) -- frame->header.prof.hp.rs = NULL (or frame-header.prof.hp.ldvw = 0) -- is unnecessary because it is not used anyhow. @@ -144,14 +144,14 @@ if not sccProfilingEnabled then return Nothing else do local_cc <- newTemp (ccType platform)- emitAssign (CmmLocal local_cc) cccsExpr+ emitAssign (CmmLocal local_cc) (cccsExpr platform) return (Just local_cc) -restoreCurrentCostCentre :: Maybe LocalReg -> FCode ()-restoreCurrentCostCentre Nothing+restoreCurrentCostCentre :: Platform -> Maybe LocalReg -> FCode ()+restoreCurrentCostCentre _ Nothing = return ()-restoreCurrentCostCentre (Just local_cc)- = emit (storeCurCCS (CmmReg (CmmLocal local_cc)))+restoreCurrentCostCentre platform (Just local_cc)+ = emit (storeCurCCS platform (CmmReg (CmmLocal local_cc))) -------------------------------------------------------------------------------@@ -191,7 +191,7 @@ enterCostCentreThunk closure = ifProfiling $ do platform <- getPlatform- emit $ storeCurCCS (costCentreFrom platform closure)+ emit $ storeCurCCS platform (costCentreFrom platform closure) enterCostCentreFun :: CostCentreStack -> CmmExpr -> FCode () enterCostCentreFun ccs closure = ifProfiling $@@ -200,7 +200,7 @@ emitRtsCall rtsUnitId (fsLit "enterFunCCS")- [(baseExpr, AddrHint), (costCentreFrom platform closure, AddrHint)]+ [(baseExpr platform, AddrHint), (costCentreFrom platform closure, AddrHint)] False -- otherwise we have a top-level function, nothing to do @@ -274,27 +274,24 @@ where (ws,ms) = pc_SIZEOF_CostCentreStack (platformConstants platform) `divMod` platformWordSizeInBytes platform --- | Emit info-table provenance declarations and track IPE stats.------ Note that the stats passed to this function will (rather, should) only ever--- contain stats for skipped STACK info tables accumulated in--- 'generateCgIPEStub'.-initInfoTableProv :: IPEStats -> [CmmInfoTable] -> InfoTableProvMap -> FCode (Maybe (IPEStats, CStub))-initInfoTableProv stats infos itmap+-- | Emit info-table provenance declarations+initInfoTableProv :: [CmmInfoTable] -> InfoTableProvMap -> FCode CStub+initInfoTableProv infos itmap = do cfg <- getStgToCmmConfig- let (stats', ents) = convertInfoProvMap cfg this_mod itmap stats infos- info_table = stgToCmmInfoTableMap cfg- platform = stgToCmmPlatform cfg- this_mod = stgToCmmThisModule cfg+ let ents = convertInfoProvMap infos this_mod itmap+ info_table = stgToCmmInfoTableMap cfg+ platform = stgToCmmPlatform cfg+ this_mod = stgToCmmThisModule cfg+ case ents of- [] -> return Nothing+ [] -> return mempty _ -> do -- Emit IPE buffer emitIpeBufferListNode this_mod ents -- Create the C stub which initialises the IPE map- return (Just (stats', ipInitCode info_table platform this_mod))+ return (ipInitCode info_table platform this_mod) -- --------------------------------------------------------------------------- -- Set the current cost centre stack@@ -303,9 +300,9 @@ emitSetCCC cc tick push = ifProfiling $ do platform <- getPlatform tmp <- newTemp (ccsType platform)- pushCostCentre tmp cccsExpr cc+ pushCostCentre tmp (cccsExpr platform) cc when tick $ emit (bumpSccCount platform (CmmReg (CmmLocal tmp)))- when push $ emit (storeCurCCS (CmmReg (CmmLocal tmp)))+ when push $ emit (storeCurCCS platform (CmmReg (CmmLocal tmp))) pushCostCentre :: LocalReg -> CmmExpr -> CostCentre -> FCode () pushCostCentre result ccs cc
GHC/StgToCmm/Sequel.hs view
@@ -12,14 +12,13 @@ module GHC.StgToCmm.Sequel ( Sequel(..)- , SelfLoopInfo(..)+ , SelfLoopInfo ) where import GHC.Cmm.BlockId import GHC.Cmm import GHC.Types.Id-import GHC.Types.Basic (RepArity) import GHC.Utils.Outputable import GHC.Prelude@@ -42,14 +41,5 @@ ppr Return = text "Return" ppr (AssignTo regs b) = text "AssignTo" <+> ppr regs <+> ppr b -data SelfLoopInfo = MkSelfLoopInfo- { sli_id :: !Id- , sli_arity :: !RepArity- -- ^ always equal to 'idFunRepArity' of sli_id,- -- i.e. unarised arity, including void arguments- , sli_registers :: ![LocalReg]- -- ^ Excludes void arguments (LocalReg is never void)- , sli_header_block :: !BlockId- }-+type SelfLoopInfo = (Id, BlockId, [LocalReg]) --------------------------------------------------------------------------------
GHC/StgToCmm/Ticky.hs view
@@ -157,7 +157,6 @@ import GHC.StgToCmm.Env (getCgInfo_maybe) import Data.Coerce (coerce) import GHC.Utils.Json-import GHC.Utils.Unique (anyOfUnique) ----------------------------------------------------------------------------- --@@ -885,19 +884,20 @@ | otherwise = case tcSplitTyConApp_maybe ty of Nothing -> '.' Just (tycon, _) ->+ let anyOf us = getUnique tycon `elem` us in case () of- _ | anyOfUnique tycon [fUNTyConKey] -> '>'- | anyOfUnique tycon [charTyConKey] -> 'C'- | anyOfUnique tycon [charPrimTyConKey] -> 'c'- | anyOfUnique tycon [doubleTyConKey] -> 'D'- | anyOfUnique tycon [doublePrimTyConKey] -> 'd'- | anyOfUnique tycon [floatTyConKey] -> 'F'- | anyOfUnique tycon [floatPrimTyConKey] -> 'f'- | anyOfUnique tycon [intTyConKey, int8TyConKey, int16TyConKey, int32TyConKey, int64TyConKey] -> 'I'- | anyOfUnique tycon [intPrimTyConKey, int8PrimTyConKey, int16PrimTyConKey, int32PrimTyConKey, int64PrimTyConKey] -> 'i'- | anyOfUnique tycon [wordTyConKey, word8TyConKey, word16TyConKey, word32TyConKey, word64TyConKey] -> 'W'- | anyOfUnique tycon [wordPrimTyConKey, word8PrimTyConKey, word16PrimTyConKey, word32PrimTyConKey, word64PrimTyConKey] -> 'w'- | anyOfUnique tycon [listTyConKey] -> 'L'+ _ | anyOf [fUNTyConKey] -> '>'+ | anyOf [charTyConKey] -> 'C'+ | anyOf [charPrimTyConKey] -> 'c'+ | anyOf [doubleTyConKey] -> 'D'+ | anyOf [doublePrimTyConKey] -> 'd'+ | anyOf [floatTyConKey] -> 'F'+ | anyOf [floatPrimTyConKey] -> 'f'+ | anyOf [intTyConKey, int8TyConKey, int16TyConKey, int32TyConKey, int64TyConKey] -> 'I'+ | anyOf [intPrimTyConKey, int8PrimTyConKey, int16PrimTyConKey, int32PrimTyConKey, int64PrimTyConKey] -> 'i'+ | anyOf [wordTyConKey, word8TyConKey, word16TyConKey, word32TyConKey, word64TyConKey] -> 'W'+ | anyOf [wordPrimTyConKey, word8PrimTyConKey, word16PrimTyConKey, word32PrimTyConKey, word64PrimTyConKey] -> 'w'+ | anyOf [listTyConKey] -> 'L' | isUnboxedTupleTyCon tycon -> 't' | isTupleTyCon tycon -> 'T' | isPrimTyCon tycon -> 'P'
GHC/StgToCmm/Types.hs view
@@ -53,7 +53,7 @@ #16559, #15155, and wiki: commentary/rts/haskell-execution/pointer-tagging Conservative assumption here is made when we import an Id without a- LambdaFormInfo in the interface, in GHC.StgToCmm.Closure.mkLFImported.+ LambdaFormInfo in the interface, in GHC.StgToCmm.Closure.importedIdLFInfo. So we arrange to always serialise this information into the interface file. The moving parts are:@@ -75,10 +75,26 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As described in `Note [Conveying CAF-info and LFInfo between modules]`, imported unlifted nullary datacons must have their LambdaFormInfo set to-reflect the fact that they are evaluated . This is necessary as otherwise+reflect the fact that they are evaluated. This is necessary as otherwise references to them may be passed untagged to code that expects tagged-references.+references because of the unlifted nature of the argument. +For example, in++ type T :: UnliftedType+ data T = T1+ | T2++ f :: T -> Int+ f x = case x of T1 -> 1; T2 -> 2++`f` expects `x` to be evaluated and properly tagged due to its unliftedness.+We can guarantee all occurrences of `T1` and `T2` are considered evaluated and+are properly tagged by giving them the `LFCon` LambdaFormInfo which indicates+they are fully saturated constructor applications.+(The LambdaFormInfo is used to tag the pointer with the tag of the+constructor, in `litIdInfo`)+ What may be less obvious is that this must be done for not only datacon workers but also *wrappers*. The reason is found in this program from #23146:@@ -109,11 +125,9 @@ of the unlifted nature of its arguments by omitting handling of the zero tag when scrutinising them. -The fix is straightforward: extend the logic in `mkLFImported` to cover-(nullary) datacon wrappers as well as workers. This is safe because we-know that the wrapper of a nullary datacon will be in WHNF, even if it-includes equalities evidence (since such equalities are not runtime-relevant). This fixed #23146.+The fix is straightforward: ensure we always construct a /correct/ LFInfo for+datacon workers and wrappers, and populate the `lfInfo` with it. See+Note [LFInfo of DataCon workers and wrappers]. This fixed #23146. See also Note [The LFInfo of Imported Ids] -}
GHC/StgToCmm/Utils.hs view
@@ -7,8 +7,6 @@ -- (c) The University of Glasgow 2004-2006 -- ------------------------------------------------------------------------------{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TupleSections #-} module GHC.StgToCmm.Utils ( emitDataLits, emitRODataLits,@@ -45,8 +43,7 @@ emitUpdRemSetPush, emitUpdRemSetPushThunk, - convertInfoProvMap, cmmInfoTableToInfoProvEnt, IPEStats(..),- closureIpeStats, fallbackIpeStats, skippedIpeStats,+ convertInfoProvMap, cmmInfoTableToInfoProvEnt ) where import GHC.Prelude hiding ( head, init, last, tail )@@ -93,8 +90,6 @@ import GHC.Data.Maybe import Control.Monad import qualified Data.Map.Strict as Map-import qualified Data.IntMap.Strict as I-import qualified Data.Semigroup (Semigroup(..)) -------------------------------------------------------------------------- --@@ -245,15 +240,17 @@ callerSaveGlobalReg :: Platform -> GlobalReg -> CmmAGraph callerSaveGlobalReg platform reg- = mkStore (get_GlobalReg_addr platform reg) (CmmReg (CmmGlobal reg))+ = mkStore (get_GlobalReg_addr platform reg) (CmmReg (CmmGlobal (GlobalRegUse reg spill_ty)))+ where+ spill_ty = globalRegSpillType platform reg callerRestoreGlobalReg :: Platform -> GlobalReg -> CmmAGraph callerRestoreGlobalReg platform reg- = mkAssign (CmmGlobal reg)+ = mkAssign (CmmGlobal (GlobalRegUse reg spill_ty)) (CmmLoad (get_GlobalReg_addr platform reg)- (globalRegType platform reg)- NaturallyAligned)-+ spill_ty NaturallyAligned)+ where+ spill_ty = globalRegSpillType platform reg ------------------------------------------------------------------------- --@@ -583,21 +580,23 @@ -- remembered set. emitUpdRemSetPush :: CmmExpr -- ^ value of pointer which was overwritten -> FCode ()-emitUpdRemSetPush ptr =+emitUpdRemSetPush ptr = do+ platform <- getPlatform emitRtsCall rtsUnitId (fsLit "updateRemembSetPushClosure_")- [(CmmReg (CmmGlobal BaseReg), AddrHint),+ [(CmmReg $ baseReg platform, AddrHint), (ptr, AddrHint)] False emitUpdRemSetPushThunk :: CmmExpr -- ^ the thunk -> FCode ()-emitUpdRemSetPushThunk ptr =+emitUpdRemSetPushThunk ptr = do+ platform <- getPlatform emitRtsCall rtsUnitId (fsLit "updateRemembSetPushThunk_")- [(CmmReg (CmmGlobal BaseReg), AddrHint),+ [(CmmReg $ baseReg platform, AddrHint), (ptr, AddrHint)] False @@ -608,96 +607,39 @@ cn = rtsClosureType (cit_rep cmit) in InfoProvEnt cl cn "" this_mod Nothing -data IPEStats = IPEStats { ipe_total :: !Int- , ipe_closure_types :: !(I.IntMap Int)- , ipe_fallback :: !Int- , ipe_skipped :: !Int }--instance Semigroup IPEStats where- (IPEStats a1 a2 a3 a4) <> (IPEStats b1 b2 b3 b4) = IPEStats (a1 + b1) (I.unionWith (+) a2 b2) (a3 + b3) (a4 + b4)--instance Monoid IPEStats where- mempty = IPEStats 0 I.empty 0 0--fallbackIpeStats :: IPEStats-fallbackIpeStats = mempty { ipe_total = 1, ipe_fallback = 1 }--closureIpeStats :: Int -> IPEStats-closureIpeStats t = mempty { ipe_total = 1, ipe_closure_types = I.singleton t 1 }--skippedIpeStats :: IPEStats-skippedIpeStats = mempty { ipe_skipped = 1 }--instance Outputable IPEStats where- ppr = pprIPEStats--pprIPEStats :: IPEStats -> SDoc-pprIPEStats (IPEStats{..}) =- vcat $ [ text "Tables with info:" <+> ppr ipe_total- , text "Tables with fallback:" <+> ppr ipe_fallback- , text "Tables skipped:" <+> ppr ipe_skipped- ] ++ [ text "Info(" <> ppr k <> text "):" <+> ppr n | (k, n) <- I.assocs ipe_closure_types ]- -- | Convert source information collected about identifiers in 'GHC.STG.Debug' -- to entries suitable for placing into the info table provenance table.------ The initial stats given to this function will (or should) only contain stats--- for stack info tables skipped during 'generateCgIPEStub'. As the fold--- progresses, counts of tables per closure type will be accumulated.-convertInfoProvMap :: StgToCmmConfig -> Module -> InfoTableProvMap -> IPEStats -> [CmmInfoTable] -> (IPEStats, [InfoProvEnt])-convertInfoProvMap cfg this_mod (InfoTableProvMap (UniqMap dcenv) denv infoTableToSourceLocationMap) initStats cmits =- foldl' convertInfoProvMap' (initStats, []) cmits- where- convertInfoProvMap' :: (IPEStats, [InfoProvEnt]) -> CmmInfoTable -> (IPEStats, [InfoProvEnt])- convertInfoProvMap' (!stats, acc) cmit = do- let- cl = cit_lbl cmit+convertInfoProvMap :: [CmmInfoTable] -> Module -> InfoTableProvMap -> [InfoProvEnt]+convertInfoProvMap defns this_mod (InfoTableProvMap (UniqMap dcenv) denv infoTableToSourceLocationMap) =+ map (\cmit ->+ let cl = cit_lbl cmit cn = rtsClosureType (cit_rep cmit) tyString :: Outputable a => a -> String tyString = renderWithContext defaultSDocContext . ppr - lookupClosureMap :: Maybe (IPEStats, InfoProvEnt)+ lookupClosureMap :: Maybe InfoProvEnt lookupClosureMap = case hasHaskellName cl >>= lookupUniqMap denv of- Just (ty, mbspan) -> Just (closureIpeStats cn, (InfoProvEnt cl cn (tyString ty) this_mod mbspan))+ Just (ty, mbspan) -> Just (InfoProvEnt cl cn (tyString ty) this_mod mbspan) Nothing -> Nothing - lookupDataConMap :: Maybe (IPEStats, InfoProvEnt)- lookupDataConMap = (closureIpeStats cn,) <$> do+ lookupDataConMap = do UsageSite _ n <- hasIdLabelInfo cl >>= getConInfoTableLocation -- This is a bit grimy, relies on the DataCon and Name having the same Unique, which they do (dc, ns) <- hasHaskellName cl >>= lookupUFM_Directly dcenv . getUnique -- Lookup is linear but lists will be small (< 100)- return $ (InfoProvEnt cl cn (tyString (dataConTyCon dc)) this_mod (join $ lookup n (NE.toList ns)))+ return $ InfoProvEnt cl cn (tyString (dataConTyCon dc)) this_mod (join $ lookup n (NE.toList ns)) - lookupInfoTableToSourceLocation :: Maybe (IPEStats, InfoProvEnt) lookupInfoTableToSourceLocation = do sourceNote <- Map.lookup (cit_lbl cmit) infoTableToSourceLocationMap- return $ (closureIpeStats cn, (InfoProvEnt cl cn "" this_mod sourceNote))+ return $ InfoProvEnt cl cn "" this_mod sourceNote -- This catches things like prim closure types and anything else which doesn't have a -- source location- simpleFallback =- if stgToCmmInfoTableMapWithFallback cfg then- -- Create a default entry with fallback IPE data- Just (fallbackIpeStats, cmmInfoTableToInfoProvEnt this_mod cmit)- else- -- If we are omitting tables with fallback info- -- (-fno-info-table-map-with-fallback was given), do not create an- -- entry- Nothing-- trackSkipped :: Maybe (IPEStats, InfoProvEnt) -> (IPEStats, [InfoProvEnt])- trackSkipped Nothing =- (stats Data.Semigroup.<> skippedIpeStats, acc)- trackSkipped (Just (s, !c)) =- (stats Data.Semigroup.<> s, c:acc)+ simpleFallback = cmmInfoTableToInfoProvEnt this_mod cmit - trackSkipped $- if (isStackRep . cit_rep) cmit then- -- Note that we should have already skipped STACK info tables if- -- necessary in 'generateCgIPEStub', so we should not need to worry- -- about doing that here.- fromMaybe simpleFallback (Just <$> lookupInfoTableToSourceLocation)- else- fromMaybe simpleFallback (Just <$> firstJust lookupDataConMap lookupClosureMap)+ in+ if (isStackRep . cit_rep) cmit then+ fromMaybe simpleFallback lookupInfoTableToSourceLocation+ else+ fromMaybe simpleFallback (lookupDataConMap `firstJust` lookupClosureMap)) defns
GHC/StgToJS/Apply.hs view
@@ -27,7 +27,7 @@ import GHC.Prelude hiding ((.|.)) -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.JS.Make import GHC.StgToJS.Arg@@ -39,7 +39,6 @@ import GHC.StgToJS.Types import GHC.StgToJS.Profiling import GHC.StgToJS.Regs-import GHC.StgToJS.CoreUtils import GHC.StgToJS.Utils import GHC.StgToJS.Rts.Types import GHC.StgToJS.Stack@@ -49,6 +48,7 @@ import GHC.Types.Id import GHC.Types.Id.Info import GHC.Types.CostCentre+import GHC.Types.RepType (mightBeFunTy) import GHC.Stg.Syntax @@ -110,7 +110,7 @@ prof <- csProf <$> getSettings let profArg = if prof then [jCafCCS] else [] a <- genArg x- return ( top |= app "h$appendToHsStringA" ([toJExpr d, toJExpr a] ++ profArg)+ return ( top |= app "h$appendToHsStringA" (toJExpr d : a ++ profArg) , ExprInline Nothing ) @@ -205,7 +205,7 @@ -- no args and Id can't be a function: just enter it | [] <- args , idFunRepArity i == 0- , not (might_be_a_function (idType i))+ , not (mightBeFunTy (idType i)) = do enter_id <- genIdArg i >>= \case@@ -408,17 +408,11 @@ [ TxtI "h$apply" ||= toJExpr (JList []) , TxtI "h$paps" ||= toJExpr (JList []) , ApplStat (var "h$initStatic" .^ "push")- [ ValExpr $ JFunc [] $ jVar \i -> mconcat- [ i |= zero_- , WhileStat False (i .<. Int 65536) $ mconcat- [ var "h$apply" .! i |= var "h$ap_gen"- , preIncrS i- ]- , i |= zero_- , WhileStat False (i .<. Int 128) $ mconcat- [ var "h$paps" .! i |= var "h$pap_gen"- , preIncrS i- ]+ [ ValExpr $ JFunc [] $ mconcat+ [ jFor (|= zero_) (.<. Int 65536) preIncrS+ (\j -> var "h$apply" .! j |= var "h$ap_gen")+ , jFor (|= zero_) (.<. Int 128) preIncrS+ (\j -> var "h$paps" .! j |= var "h$pap_gen") , mconcat (map assignSpec applySpec) , mconcat (map assignPap specPap) ]@@ -596,7 +590,7 @@ -- genericFastApply :: StgToJSConfig -> JStat genericFastApply s =- TxtI "h$ap_gen_fast" ||= jLam \tag -> jVar \c ->+ jFun (TxtI "h$ap_gen_fast") \tag -> jVar \c -> [traceRts s (jString "h$ap_gen_fast: " + tag) , c |= closureEntry r1 , SwitchStat (entryClosureType c)@@ -808,12 +802,12 @@ -- h$ap_n_r_fast is entered if a function of unknown arity is called, n -- arguments are already in r registers fastApply :: StgToJSConfig -> FastString -> Int -> Int -> JStat-fastApply s fun_name nargs nvars = func ||= body0+fastApply s fun_name nargs nvars = body0 where -- special case for h$ap_0_0_fast body0 = if nargs == 0 && nvars == 0- then jLam (enter s r1)- else toJExpr (JFunc myFunArgs body)+ then jFun func (enter s r1)+ else FuncStat func myFunArgs body func = TxtI fun_name @@ -881,7 +875,7 @@ zeroApply :: StgToJSConfig -> JStat zeroApply s = mconcat- [ TxtI "h$e" ||= jLam (\c -> (r1 |= c) <> enter s c)+ [ jFun (TxtI "h$e") (\c -> (r1 |= c) <> enter s c) ] -- carefully enter a closure that might be a thunk or a function@@ -979,13 +973,13 @@ mkSel :: FastString -> (JExpr -> JExpr) -> JStat mkSel name sel = mconcat- [TxtI createName ||= jLam \r -> mconcat+ [jFun (TxtI createName) \r -> mconcat [ traceRts s (toJExpr ("selector create: " <> name <> " for ") + (r .^ "alloc")) , ifS (isThunk r .||. isBlackhole r) (returnS (app "h$mkSelThunk" [r, toJExpr (v entryName), toJExpr (v resName)])) (returnS (sel r)) ]- , TxtI resName ||= jLam \r -> mconcat+ , jFun (TxtI resName) \r -> mconcat [ traceRts s (toJExpr ("selector result: " <> name <> " for ") + (r .^ "alloc")) , returnS (sel r) ]@@ -1112,7 +1106,7 @@ -- general utilities -- move the first n registers, starting at R2, m places up (do not use with negative m) moveRegs2 :: JStat-moveRegs2 = TxtI "h$moveRegs2" ||= jLam moveSwitch+moveRegs2 = jFun (TxtI "h$moveRegs2") moveSwitch where moveSwitch n m = SwitchStat ((n .<<. 8) .|. m) switchCases (defaultCase n m) -- fast cases
GHC/StgToJS/Arg.hs view
@@ -30,14 +30,14 @@ import GHC.Prelude -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.JS.Make import GHC.StgToJS.DataCon import GHC.StgToJS.Types import GHC.StgToJS.Monad import GHC.StgToJS.Literal-import GHC.StgToJS.CoreUtils+import GHC.StgToJS.Utils import GHC.StgToJS.Profiling import GHC.StgToJS.Ids
GHC/StgToJS/Closure.hs view
@@ -10,6 +10,15 @@ , assignClosure , CopyCC (..) , copyClosure+ , mkClosure+ -- $names+ , allocData+ , allocClsA+ , dataName+ , clsName+ , dataFieldName+ , varName+ , jsClosureCount ) where @@ -18,12 +27,15 @@ import GHC.StgToJS.Heap import GHC.StgToJS.Types-import GHC.StgToJS.CoreUtils+import GHC.StgToJS.Utils import GHC.StgToJS.Regs (stack,sp) import GHC.JS.Make-import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax +import GHC.Types.Unique.Map++import Data.Array import Data.Monoid import qualified Data.Bits as Bits @@ -104,7 +116,7 @@ closure :: ClosureInfo -- ^ object being info'd see @ciVar@ in @ClosureInfo@ -> JStat -- ^ rhs -> JStat-closure ci body = (ciVar ci ||= jLam body) `mappend` closureInfoStat False ci+closure ci body = (jFun (ciVar ci) body) `mappend` closureInfoStat False ci conClosure :: Ident -> FastString -> CILayout -> Int -> JStat conClosure symbol name layout constr =@@ -154,3 +166,78 @@ ] <> case copy_cc of DontCopyCC -> mempty CopyCC -> closureCC t |= closureCC s++mkClosure :: JExpr -> [JExpr] -> JExpr -> Maybe JExpr -> Closure+mkClosure entry fields meta cc = Closure+ { clEntry = entry+ , clField1 = x1+ , clField2 = x2+ , clMeta = meta+ , clCC = cc+ }+ where+ x1 = case fields of+ [] -> null_+ x:_ -> x+ x2 = case fields of+ [] -> null_+ [_] -> null_+ [_,x] -> x+ _:x:xs -> ValExpr . JHash . listToUniqMap $ zip (map dataFieldName [1..]) (x:xs)+++-------------------------------------------------------------------------------+-- Name Caches+-------------------------------------------------------------------------------+-- $names++-- | Cache "dXXX" field names+dataFieldCache :: Array Int FastString+dataFieldCache = listArray (0,nFieldCache) (map (mkFastString . ('d':) . show) [(0::Int)..nFieldCache])++-- | Data names are used in the AST, and logging has determined that 255 is the maximum number we see.+nFieldCache :: Int+nFieldCache = 255++-- | We use this in the RTS to determine the number of generated closures. These closures use the names+-- cached here, so we bind them to the same number.+jsClosureCount :: Int+jsClosureCount = 24++dataFieldName :: Int -> FastString+dataFieldName i+ | i < 0 || i > nFieldCache = mkFastString ('d' : show i)+ | otherwise = dataFieldCache ! i++-- | Cache "h$dXXX" names+dataCache :: Array Int FastString+dataCache = listArray (0,jsClosureCount) (map (mkFastString . ("h$d"++) . show) [(0::Int)..jsClosureCount])++dataName :: Int -> FastString+dataName i+ | i < 0 || i > nFieldCache = mkFastString ("h$d" ++ show i)+ | otherwise = dataCache ! i++allocData :: Int -> JExpr+allocData i = toJExpr (TxtI (dataName i))++-- | Cache "h$cXXX" names+clsCache :: Array Int FastString+clsCache = listArray (0,jsClosureCount) (map (mkFastString . ("h$c"++) . show) [(0::Int)..jsClosureCount])++clsName :: Int -> FastString+clsName i+ | i < 0 || i > jsClosureCount = mkFastString ("h$c" ++ show i)+ | otherwise = clsCache ! i++allocClsA :: Int -> JExpr+allocClsA i = toJExpr (TxtI (clsName i))++-- | Cache "xXXX" names+varCache :: Array Int Ident+varCache = listArray (0,jsClosureCount) (map (TxtI . mkFastString . ('x':) . show) [(0::Int)..jsClosureCount])++varName :: Int -> Ident+varName i+ | i < 0 || i > jsClosureCount = TxtI $ mkFastString ('x' : show i)+ | otherwise = varCache ! i
GHC/StgToJS/CodeGen.hs view
@@ -13,16 +13,16 @@ import GHC.Driver.Flags (DumpFlag (Opt_D_dump_js)) import GHC.JS.Ppr-import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.JS.Make import GHC.JS.Transform+import GHC.JS.Optimizer import GHC.StgToJS.Arg import GHC.StgToJS.Sinker import GHC.StgToJS.Types import qualified GHC.StgToJS.Object as Object-import GHC.StgToJS.StgUtils-import GHC.StgToJS.CoreUtils+import GHC.StgToJS.Utils import GHC.StgToJS.Deps import GHC.StgToJS.Expr import GHC.StgToJS.ExprCtx@@ -90,11 +90,11 @@ -- Doc to dump when -ddump-js is enabled when (logHasDumpFlag logger Opt_D_dump_js) $ do putDumpFileMaybe logger Opt_D_dump_js "JavaScript code" FormatJS- $ vcat (fmap (docToSDoc . jsToDoc . oiStat . luObjUnit) lus)+ $ vcat (fmap (jsToDoc . oiStat . luObjBlock) lus) -- Write the object file bh <- openBinMem (4 * 1024 * 1000) -- a bit less than 4kB- Object.putObject bh (moduleName this_mod) deps (map luObjUnit lus)+ Object.putObject bh (moduleName this_mod) deps (map luObjBlock lus) createDirectoryIfMissing True (takeDirectory output_fn) writeBinMem bh output_fn@@ -133,11 +133,11 @@ glbl <- State.gets gsGlobal staticInit <- initStaticPtrs spt_entries- let stat = ( -- O.optimize .- jsSaturate (Just $ modulePrefix m 1)+ let stat = ( jsOptimize .+ satJStat (Just $ modulePrefix m 1) $ mconcat (reverse glbl) <> staticInit) let syms = [moduleGlobalSymbol m]- let oi = ObjUnit+ let oi = ObjBlock { oiSymbols = syms , oiClInfo = [] , oiStatic = []@@ -147,7 +147,7 @@ , oiFImports = [] } let lu = LinkableUnit- { luObjUnit = oi+ { luObjBlock = oi , luIdExports = [] , luOtherExports = syms , luIdDeps = []@@ -169,7 +169,7 @@ let syms = [moduleExportsSymbol m] let raw = utf8EncodeByteString $ renderWithContext defaultSDocContext f_c- let oi = ObjUnit+ let oi = ObjBlock { oiSymbols = syms , oiClInfo = [] , oiStatic = []@@ -179,7 +179,7 @@ , oiFImports = [] } let lu = LinkableUnit- { luObjUnit = oi+ { luObjBlock = oi , luIdExports = [] , luOtherExports = syms , luIdDeps = []@@ -207,10 +207,11 @@ _extraTl <- State.gets (ggsToplevelStats . gsGroup) si <- State.gets (ggsStatic . gsGroup) let body = mempty -- mconcat (reverse extraTl) <> b1 ||= e1 <> b2 ||= e2- let stat = jsSaturate (Just $ modulePrefix m n) body+ let stat = jsOptimize+ $ satJStat (Just $ modulePrefix m n) body let ids = [bnd] syms <- (\(TxtI i) -> [i]) <$> identForId bnd- let oi = ObjUnit+ let oi = ObjBlock { oiSymbols = syms , oiClInfo = [] , oiStatic = si@@ -220,7 +221,7 @@ , oiFImports = [] } let lu = LinkableUnit- { luObjUnit = oi+ { luObjBlock = oi , luIdExports = ids , luOtherExports = [] , luIdDeps = []@@ -244,11 +245,11 @@ let allDeps = collectIds unf decl topDeps = collectTopIds decl required = hasExport decl- stat = -- Opt.optimize .- jsSaturate (Just $ modulePrefix m n)- $ mconcat (reverse extraTl) <> tl+ stat = jsOptimize+ . satJStat (Just $ modulePrefix m n)+ $ mconcat (reverse extraTl) <> tl syms <- mapM (fmap (\(TxtI i) -> i) . identForId) topDeps- let oi = ObjUnit+ let oi = ObjBlock { oiSymbols = syms , oiClInfo = ci , oiStatic = si@@ -258,7 +259,7 @@ , oiFImports = fRefs } let lu = LinkableUnit- { luObjUnit = oi+ { luObjBlock = oi , luIdExports = topDeps , luOtherExports = [] , luIdDeps = allDeps@@ -288,10 +289,10 @@ genToplevelConEntry :: Id -> CgStgRhs -> G JStat genToplevelConEntry i rhs = case rhs of- StgRhsCon _cc con _mu _ts _args+ StgRhsCon _cc con _mu _ts _args _typ | isDataConWorkId i -> genSetConInfo i con (stgRhsLive rhs) -- NoSRT- StgRhsClosure _ _cc _upd_flag _args _body+ StgRhsClosure _ _cc _upd_flag _args _body _typ | Just dc <- isDataConWorkId_maybe i -> genSetConInfo i dc (stgRhsLive rhs) -- srt _ -> pure mempty@@ -306,24 +307,24 @@ (fixedLayout $ map uTypeVt fields) (CICon $ dataConTag d) sr- return (ei ||= mkDataEntry)+ return (mkDataEntry ei) where -- dataConRepArgTys sometimes returns unboxed tuples. is that a bug? fields = concatMap (map primRepToType . typePrimRep . unwrapType . scaledThing) (dataConRepArgTys d) -- concatMap (map slotTyToType . repTypeSlots . repType) (dataConRepArgTys d) -mkDataEntry :: JExpr-mkDataEntry = ValExpr $ JFunc [] returnStack+mkDataEntry :: Ident -> JStat+mkDataEntry i = FuncStat i [] returnStack genToplevelRhs :: Id -> CgStgRhs -> G JStat -- general cases: genToplevelRhs i rhs = case rhs of- StgRhsCon cc con _mu _tys args -> do+ StgRhsCon cc con _mu _tys args _typ -> do ii <- identForId i allocConStatic ii cc con args return mempty- StgRhsClosure _ext cc _upd_flag {- srt -} args body -> do+ StgRhsClosure _ext cc _upd_flag {- srt -} args body typ -> do {- algorithm: - collect all Id refs that are in the global id cache@@ -333,8 +334,8 @@ -} eid@(TxtI eidt) <- identForEntryId i (TxtI idt) <- identForId i- body <- genBody (initExprCtx i) i R2 args body- global_occs <- globalOccs (jsSaturate (Just "ghcjs_tmp_sat_") body)+ body <- genBody (initExprCtx i) R2 args body typ+ global_occs <- globalOccs (satJStat (Just "ghcjs_tmp_sat_") body) let lidents = map global_ident global_occs let lids = map global_id global_occs let lidents' = map identFS lidents@@ -364,4 +365,4 @@ sr) ccId <- costCentreStackLbl cc emitStatic idt static ccId- return $ (eid ||= toJExpr (JFunc [] (ll <> upd <> setcc <> body)))+ return $ (FuncStat eid [] (ll <> upd <> setcc <> body))
− GHC/StgToJS/CoreUtils.hs
@@ -1,282 +0,0 @@-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE OverloadedStrings #-}---- | Core utils-module GHC.StgToJS.CoreUtils where--import GHC.Prelude--import GHC.JS.Syntax--import GHC.StgToJS.Types--import GHC.Stg.Syntax--import GHC.Tc.Utils.TcType--import GHC.Builtin.Types-import GHC.Builtin.Types.Prim--import GHC.Core.DataCon-import GHC.Core.TyCo.Rep-import GHC.Core.TyCon-import GHC.Core.Type--import GHC.Types.RepType-import GHC.Types.Var-import GHC.Types.Id--import GHC.Utils.Misc-import GHC.Utils.Outputable-import GHC.Utils.Panic--import qualified Data.Bits as Bits---- | can we unbox C x to x, only if x is represented as a Number-isUnboxableCon :: DataCon -> Bool-isUnboxableCon dc- | [t] <- dataConRepArgTys dc- , [t1] <- typeVt (scaledThing t)- = isUnboxable t1 &&- dataConTag dc == 1 &&- length (tyConDataCons $ dataConTyCon dc) == 1- | otherwise = False---- | one-constructor types with one primitive field represented as a JS Number--- can be unboxed-isUnboxable :: VarType -> Bool-isUnboxable DoubleV = True-isUnboxable IntV = True -- includes Char#-isUnboxable _ = False---- | Number of slots occupied by a PrimRep-data SlotCount- = NoSlot- | OneSlot- | TwoSlots- deriving (Show,Eq,Ord)--instance Outputable SlotCount where- ppr = text . show---- | Return SlotCount as an Int-slotCount :: SlotCount -> Int-slotCount = \case- NoSlot -> 0- OneSlot -> 1- TwoSlots -> 2----- | Number of slots occupied by a value with the given VarType-varSize :: VarType -> Int-varSize = slotCount . varSlotCount--varSlotCount :: VarType -> SlotCount-varSlotCount VoidV = NoSlot-varSlotCount LongV = TwoSlots -- hi, low-varSlotCount AddrV = TwoSlots -- obj/array, offset-varSlotCount _ = OneSlot--typeSize :: Type -> Int-typeSize t = sum . map varSize . typeVt $ t--isVoid :: VarType -> Bool-isVoid VoidV = True-isVoid _ = False--isPtr :: VarType -> Bool-isPtr PtrV = True-isPtr _ = False--isSingleVar :: VarType -> Bool-isSingleVar v = varSlotCount v == OneSlot--isMultiVar :: VarType -> Bool-isMultiVar v = case varSlotCount v of- NoSlot -> False- OneSlot -> False- TwoSlots -> True---- | can we pattern match on these values in a case?-isMatchable :: [VarType] -> Bool-isMatchable [DoubleV] = True-isMatchable [IntV] = True-isMatchable _ = False--tyConVt :: HasDebugCallStack => TyCon -> [VarType]-tyConVt = typeVt . mkTyConTy--idVt :: HasDebugCallStack => Id -> [VarType]-idVt = typeVt . idType--typeVt :: HasDebugCallStack => Type -> [VarType]-typeVt t | isRuntimeRepKindedTy t = []-typeVt t = map primRepVt (typePrimRep t)-- map uTypeVt (repTypeArgs t)---- only use if you know it's not an unboxed tuple-uTypeVt :: HasDebugCallStack => UnaryType -> VarType-uTypeVt ut- | isRuntimeRepKindedTy ut = VoidV--- | isRuntimeRepTy ut = VoidV- -- GHC panics on this otherwise- | Just (tc, ty_args) <- splitTyConApp_maybe ut- , length ty_args /= tyConArity tc = PtrV- | isPrimitiveType ut = (primTypeVt ut)- | otherwise =- case typePrimRep' ut of- [] -> VoidV- [pt] -> primRepVt pt- _ -> pprPanic "uTypeVt: not unary" (ppr ut)--primRepVt :: HasDebugCallStack => PrimRep -> VarType-primRepVt VoidRep = VoidV-primRepVt LiftedRep = PtrV -- fixme does ByteArray# ever map to this?-primRepVt UnliftedRep = RtsObjV-primRepVt IntRep = IntV-primRepVt Int8Rep = IntV-primRepVt Int16Rep = IntV-primRepVt Int32Rep = IntV-primRepVt WordRep = IntV-primRepVt Word8Rep = IntV-primRepVt Word16Rep = IntV-primRepVt Word32Rep = IntV-primRepVt Int64Rep = LongV-primRepVt Word64Rep = LongV-primRepVt AddrRep = AddrV-primRepVt FloatRep = DoubleV-primRepVt DoubleRep = DoubleV-primRepVt (VecRep{}) = error "uTypeVt: vector types are unsupported"--typePrimRep' :: HasDebugCallStack => UnaryType -> [PrimRep]-typePrimRep' ty = kindPrimRep' empty (typeKind ty)---- | Find the primitive representation of a 'TyCon'. Defined here to--- avoid module loops. Call this only on unlifted tycons.-tyConPrimRep' :: HasDebugCallStack => TyCon -> [PrimRep]-tyConPrimRep' tc = kindPrimRep' empty res_kind- where- res_kind = tyConResKind tc---- | Take a kind (of shape @TYPE rr@) and produce the 'PrimRep's--- of values of types of this kind.-kindPrimRep' :: HasDebugCallStack => SDoc -> Kind -> [PrimRep]-kindPrimRep' doc ki- | Just ki' <- coreView ki- = kindPrimRep' doc ki'-kindPrimRep' doc (TyConApp _typ [runtime_rep])- = -- ASSERT( typ `hasKey` tYPETyConKey )- runtimeRepPrimRep doc runtime_rep-kindPrimRep' doc ki- = pprPanic "kindPrimRep'" (ppr ki $$ doc)--primTypeVt :: HasDebugCallStack => Type -> VarType-primTypeVt t = case tyConAppTyCon_maybe (unwrapType t) of- Nothing -> error "primTypeVt: not a TyCon"- Just tc- | tc == charPrimTyCon -> IntV- | tc == intPrimTyCon -> IntV- | tc == wordPrimTyCon -> IntV- | tc == floatPrimTyCon -> DoubleV- | tc == doublePrimTyCon -> DoubleV- | tc == int8PrimTyCon -> IntV- | tc == word8PrimTyCon -> IntV- | tc == int16PrimTyCon -> IntV- | tc == word16PrimTyCon -> IntV- | tc == int32PrimTyCon -> IntV- | tc == word32PrimTyCon -> IntV- | tc == int64PrimTyCon -> LongV- | tc == word64PrimTyCon -> LongV- | tc == addrPrimTyCon -> AddrV- | tc == stablePtrPrimTyCon -> AddrV- | tc == stableNamePrimTyCon -> RtsObjV- | tc == statePrimTyCon -> VoidV- | tc == proxyPrimTyCon -> VoidV- | tc == realWorldTyCon -> VoidV- | tc == threadIdPrimTyCon -> RtsObjV- | tc == weakPrimTyCon -> RtsObjV- | tc == arrayPrimTyCon -> ArrV- | tc == smallArrayPrimTyCon -> ArrV- | tc == byteArrayPrimTyCon -> ObjV -- can contain any JS reference, used for JSVal- | tc == mutableArrayPrimTyCon -> ArrV- | tc == smallMutableArrayPrimTyCon -> ArrV- | tc == mutableByteArrayPrimTyCon -> ObjV -- can contain any JS reference, used for JSVal- | tc == mutVarPrimTyCon -> RtsObjV- | tc == mVarPrimTyCon -> RtsObjV- | tc == tVarPrimTyCon -> RtsObjV- | tc == bcoPrimTyCon -> RtsObjV -- unsupported?- | tc == stackSnapshotPrimTyCon -> RtsObjV- | tc == ioPortPrimTyCon -> RtsObjV -- unsupported?- | tc == anyTyCon -> PtrV- | tc == compactPrimTyCon -> ObjV -- unsupported?- | tc == eqPrimTyCon -> VoidV -- coercion token?- | tc == eqReprPrimTyCon -> VoidV -- role- | tc == unboxedUnitTyCon -> VoidV -- Void#- | otherwise -> PtrV -- anything else must be some boxed thing--argVt :: StgArg -> VarType-argVt a = uTypeVt . stgArgType $ a--dataConType :: DataCon -> Type-dataConType dc = idType (dataConWrapId dc)--isBoolDataCon :: DataCon -> Bool-isBoolDataCon dc = isBoolTy (dataConType dc)---- standard fixed layout: payload types--- payload starts at .d1 for heap objects, entry closest to Sp for stack frames-fixedLayout :: [VarType] -> CILayout-fixedLayout vts = CILayoutFixed (sum (map varSize vts)) vts---- 2-var values might have been moved around separately, use DoubleV as substitute--- ObjV is 1 var, so this is no problem for implicit metadata-stackSlotType :: Id -> VarType-stackSlotType i- | OneSlot <- varSlotCount otype = otype- | otherwise = DoubleV- where otype = uTypeVt (idType i)--idPrimReps :: Id -> [PrimRep]-idPrimReps = typePrimReps . idType--typePrimReps :: Type -> [PrimRep]-typePrimReps = typePrimRep . unwrapType--primRepSize :: PrimRep -> SlotCount-primRepSize p = varSlotCount (primRepVt p)---- | Associate the given values to each RrimRep in the given order, taking into--- account the number of slots per PrimRep-assocPrimReps :: Outputable a => [PrimRep] -> [a] -> [(PrimRep, [a])]-assocPrimReps [] _ = []-assocPrimReps (r:rs) vs = case (primRepSize r,vs) of- (NoSlot, xs) -> (r,[]) : assocPrimReps rs xs- (OneSlot, x:xs) -> (r,[x]) : assocPrimReps rs xs- (TwoSlots, x:y:xs) -> (r,[x,y]) : assocPrimReps rs xs- err -> pprPanic "assocPrimReps" (ppr err)---- | Associate the given values to the Id's PrimReps, taking into account the--- number of slots per PrimRep-assocIdPrimReps :: Outputable a => Id -> [a] -> [(PrimRep, [a])]-assocIdPrimReps i = assocPrimReps (idPrimReps i)---- | Associate the given JExpr to the Id's PrimReps, taking into account the--- number of slots per PrimRep-assocIdExprs :: Id -> [JExpr] -> [TypedExpr]-assocIdExprs i es = fmap (uncurry TypedExpr) (assocIdPrimReps i es)---- | Return False only if we are *sure* it's a data type--- Look through newtypes etc as much as possible-might_be_a_function :: HasDebugCallStack => Type -> Bool-might_be_a_function ty- | [LiftedRep] <- typePrimRep ty- , Just tc <- tyConAppTyCon_maybe (unwrapType ty)- , isDataTyCon tc- = False- | otherwise- = True--mkArityTag :: Int -> Int -> Int-mkArityTag arity registers = arity Bits..|. (registers `Bits.shiftL` 8)--toTypeList :: [VarType] -> [Int]-toTypeList = concatMap (\x -> replicate (varSize x) (fromEnum x))
GHC/StgToJS/DataCon.hs view
@@ -27,14 +27,14 @@ import GHC.Prelude -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax+import GHC.JS.Transform import GHC.JS.Make import GHC.StgToJS.Closure import GHC.StgToJS.ExprCtx import GHC.StgToJS.Types import GHC.StgToJS.Monad-import GHC.StgToJS.CoreUtils import GHC.StgToJS.Profiling import GHC.StgToJS.Utils import GHC.StgToJS.Ids@@ -42,11 +42,9 @@ import GHC.Core.DataCon import GHC.Types.CostCentre-import GHC.Types.Unique.Map import GHC.Utils.Outputable import GHC.Utils.Panic-import GHC.Data.FastString import Data.Maybe @@ -60,7 +58,10 @@ = allocCon ctxi con currentCCS args | xs <- concatMap typex_expr (ctxTarget ctx)- = pprPanic "genCon: unhandled DataCon" (ppr (con, args, xs))+ = pprPanic "genCon: unhandled DataCon" (ppr (con+ , satJExpr Nothing <$> args+ , satJExpr Nothing <$> xs+ )) -- | Allocate a data constructor. Allocate in this context means bind the data -- constructor to 'to'@@ -88,7 +89,7 @@ | isBoolDataCon con && dataConTag con == 2 -> true_ [x] | isUnboxableCon con -> x- xs -> pprPanic "allocUnboxedCon: not an unboxed constructor" (ppr (con,xs))+ xs -> pprPanic "allocUnboxedCon: not an unboxed constructor" (ppr (con, satJExpr Nothing <$> xs)) -- | Allocate an entry function. See 'GHC.StgToJS.hs' for the object layout. allocDynamicE :: Bool -- ^ csInlineAlloc from StgToJSConfig@@ -97,23 +98,11 @@ -> Maybe JExpr -> JExpr allocDynamicE inline_alloc entry free cc- | inline_alloc || length free > 24 = newClosure $ Closure- { clEntry = entry- , clField1 = fillObj1- , clField2 = fillObj2- , clMeta = ValExpr (JInt 0)- , clCC = cc- }+ | inline_alloc || length free > jsClosureCount+ = newClosure $ mkClosure entry free (ValExpr (JInt 0)) cc | otherwise = ApplExpr allocFun (toJExpr entry : free ++ maybeToList cc) where allocFun = allocClsA (length free)- (fillObj1,fillObj2)- = case free of- [] -> (null_, null_)- [x] -> (x,null_)- [x,y] -> (x,y)- (x:xs) -> (x,toJExpr (JHash $ listToUniqMap (zip dataFields xs)))- dataFields = map (mkFastString . ('d':) . show) [(1::Int)..] -- | Allocate a dynamic object allocDynamic :: StgToJSConfig -> Bool -> Ident -> JExpr -> [JExpr] -> Maybe JExpr -> JStat
GHC/StgToJS/Deps.hs view
@@ -22,11 +22,11 @@ import GHC.Prelude -import GHC.StgToJS.Object as Object+import GHC.StgToJS.Object import GHC.StgToJS.Types import GHC.StgToJS.Ids -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.Types.Id import GHC.Types.Unique@@ -45,20 +45,19 @@ import qualified Data.Map as M import qualified Data.Set as S import qualified Data.IntSet as IS-import qualified GHC.Data.Word64Map as WM-import GHC.Data.Word64Map (Word64Map)+import qualified Data.IntMap as IM+import Data.IntMap (IntMap) import Data.Array import Data.Either-import Data.Word import Control.Monad import Control.Monad.Trans.Class import Control.Monad.Trans.State data DependencyDataCache = DDC- { ddcModule :: !(Word64Map Unit) -- ^ Unique Module -> Unit- , ddcId :: !(Word64Map Object.ExportedFun) -- ^ Unique Id -> Object.ExportedFun (only to other modules)- , ddcOther :: !(Map OtherSymb Object.ExportedFun)+ { ddcModule :: !(IntMap Unit) -- ^ Unique Module -> Unit+ , ddcId :: !(IntMap ExportedFun) -- ^ Unique Id -> ExportedFun (only to other modules)+ , ddcOther :: !(Map OtherSymb ExportedFun) } -- | Generate module dependency data@@ -69,24 +68,16 @@ :: HasDebugCallStack => Module -> [LinkableUnit]- -> G Object.Deps+ -> G BlockInfo genDependencyData mod units = do- -- [(blockindex, blockdeps, required, exported)] ds <- evalStateT (mapM (uncurry oneDep) blocks)- (DDC WM.empty WM.empty M.empty)- return $ Object.Deps- { depsModule = mod- , depsRequired = IS.fromList [ n | (n, _, True, _) <- ds ]- , depsHaskellExported = M.fromList $ (\(n,_,_,es) -> map (,n) es) =<< ds- , depsBlocks = listArray (0, length blocks-1) (map (\(_,deps,_,_) -> deps) ds)+ (DDC IM.empty IM.empty M.empty)+ return $ BlockInfo+ { bi_module = mod+ , bi_must_link = IS.fromList [ n | (n, _, True, _) <- ds ]+ , bi_exports = M.fromList $ (\(n,_,_,es) -> map (,n) es) =<< ds+ , bi_block_deps = listArray (0, length blocks-1) (map (\(_,deps,_,_) -> deps) ds) }- -- XXX- -- return $ BlockInfo- -- { bi_module = mod- -- , bi_must_link = IS.fromList [ n | (n, _, True, _) <- ds ]- -- , bi_exports = M.fromList $ (\(n,_,_,es) -> map (,n) es) =<< ds- -- , bi_block_deps = listArray (0, length blocks-1) (map (\(_,deps,_,_) -> deps) ds)- -- } where -- Id -> Block unitIdExports :: UniqFM Id Int@@ -107,7 +98,7 @@ -- generate the list of exports and set of dependencies for one unit oneDep :: LinkableUnit -> Int- -> StateT DependencyDataCache G (Int, Object.BlockDeps, Bool, [Object.ExportedFun])+ -> StateT DependencyDataCache G (Int, BlockDeps, Bool, [ExportedFun]) oneDep (LinkableUnit _ idExports otherExports idDeps pseudoIdDeps otherDeps req _frefs) n = do (edi, bdi) <- partitionEithers <$> mapM (lookupIdFun n) idDeps (edo, bdo) <- partitionEithers <$> mapM lookupOtherFun otherDeps@@ -115,9 +106,10 @@ expi <- mapM lookupExportedId (filter isExportedId idExports) expo <- mapM lookupExportedOther otherExports -- fixme thin deps, remove all transitive dependencies!- let bdeps = Object.BlockDeps- (IS.toList . IS.fromList . filter (/=n) $ bdi++bdo++bdp)- (S.toList . S.fromList $ edi++edo++edp)+ let bdeps = BlockDeps+ { blockBlockDeps = IS.toList . IS.fromList . filter (/=n) $ bdi++bdo++bdp+ , blockFunDeps = S.toList . S.fromList $ edi++edo++edp+ } return (n, bdeps, req, expi++expo) idModule :: Id -> Maybe Module@@ -125,7 +117,7 @@ guard (m /= mod) >> return m lookupPseudoIdFun :: Int -> Unique- -> StateT DependencyDataCache G (Either Object.ExportedFun Int)+ -> StateT DependencyDataCache G (Either ExportedFun Int) lookupPseudoIdFun _n u = case lookupUFM_Directly unitIdExports u of Just k -> return (Right k)@@ -138,62 +130,62 @@ -- assumes function is internal to the current block if it's -- from teh current module and not in the unitIdExports map. lookupIdFun :: Int -> Id- -> StateT DependencyDataCache G (Either Object.ExportedFun Int)+ -> StateT DependencyDataCache G (Either ExportedFun Int) lookupIdFun n i = case lookupUFM unitIdExports i of Just k -> return (Right k) Nothing -> case idModule i of Nothing -> return (Right n) Just m -> let k = getKey . getUnique $ i- addEntry :: StateT DependencyDataCache G Object.ExportedFun+ addEntry :: StateT DependencyDataCache G ExportedFun addEntry = do (TxtI idTxt) <- lift (identForId i) lookupExternalFun (Just k) (OtherSymb m idTxt) in if m == mod then pprPanic "local id not found" (ppr m) else Left <$> do- mr <- gets (WM.lookup k . ddcId)+ mr <- gets (IM.lookup k . ddcId) maybe addEntry return mr -- get the function for an OtherSymb from the cache, add it if necessary lookupOtherFun :: OtherSymb- -> StateT DependencyDataCache G (Either Object.ExportedFun Int)+ -> StateT DependencyDataCache G (Either ExportedFun Int) lookupOtherFun od@(OtherSymb m idTxt) = case M.lookup od unitOtherExports of Just n -> return (Right n)- Nothing | m == mod -> panic ("genDependencyData.lookupOtherFun: unknown local other id: " ++ unpackFS idTxt)+ Nothing | m == mod -> pprPanic "genDependencyData.lookupOtherFun: unknown local other id:" (ftext idTxt) Nothing -> Left <$> (maybe (lookupExternalFun Nothing od) return =<< gets (M.lookup od . ddcOther)) - lookupExportedId :: Id -> StateT DependencyDataCache G Object.ExportedFun+ lookupExportedId :: Id -> StateT DependencyDataCache G ExportedFun lookupExportedId i = do (TxtI idTxt) <- lift (identForId i) lookupExternalFun (Just . getKey . getUnique $ i) (OtherSymb mod idTxt) - lookupExportedOther :: FastString -> StateT DependencyDataCache G Object.ExportedFun+ lookupExportedOther :: FastString -> StateT DependencyDataCache G ExportedFun lookupExportedOther = lookupExternalFun Nothing . OtherSymb mod -- lookup a dependency to another module, add to the id cache if there's -- an id key, otherwise add to other cache- lookupExternalFun :: Maybe Word64- -> OtherSymb -> StateT DependencyDataCache G Object.ExportedFun+ lookupExternalFun :: Maybe Int+ -> OtherSymb -> StateT DependencyDataCache G ExportedFun lookupExternalFun mbIdKey od@(OtherSymb m idTxt) = do let mk = getKey . getUnique $ m mpk = moduleUnit m- exp_fun = Object.ExportedFun m (LexicalFastString idTxt)+ exp_fun = ExportedFun m (LexicalFastString idTxt) addCache = do ms <- gets ddcModule- let !cache' = WM.insert mk mpk ms+ let !cache' = IM.insert mk mpk ms modify (\s -> s { ddcModule = cache'}) pure exp_fun f <- do- mbm <- gets (WM.member mk . ddcModule)+ mbm <- gets (IM.member mk . ddcModule) case mbm of False -> addCache True -> pure exp_fun case mbIdKey of Nothing -> modify (\s -> s { ddcOther = M.insert od f (ddcOther s) })- Just k -> modify (\s -> s { ddcId = WM.insert k f (ddcId s) })+ Just k -> modify (\s -> s { ddcId = IM.insert k f (ddcId s) }) return f
GHC/StgToJS/Expr.hs view
@@ -30,11 +30,13 @@ import GHC.Prelude -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax+import GHC.JS.Transform import GHC.JS.Make import GHC.StgToJS.Apply import GHC.StgToJS.Arg+import GHC.StgToJS.Closure import GHC.StgToJS.ExprCtx import GHC.StgToJS.FFI import GHC.StgToJS.Heap@@ -45,13 +47,10 @@ import GHC.StgToJS.Prim import GHC.StgToJS.Profiling import GHC.StgToJS.Regs-import GHC.StgToJS.StgUtils-import GHC.StgToJS.CoreUtils import GHC.StgToJS.Utils import GHC.StgToJS.Stack import GHC.StgToJS.Ids -import GHC.Types.Basic import GHC.Types.CostCentre import GHC.Types.Tickish import GHC.Types.Var.Set@@ -73,7 +72,6 @@ import GHC.Utils.Misc import GHC.Utils.Monad import GHC.Utils.Panic-import GHC.Utils.Panic.Plain import GHC.Utils.Outputable (ppr, renderWithContext, defaultSDocContext) import qualified Control.Monad.Trans.State.Strict as State import GHC.Data.FastString@@ -147,7 +145,7 @@ ctx' = ctxClearLneFrame ctx assign :: Id -> CgStgRhs -> G (Maybe JStat)- assign b (StgRhsClosure _ _ccs {-[the_fv]-} _upd [] expr)+ assign b (StgRhsClosure _ _ccs {-[the_fv]-} _upd [] expr _typ) | let strip = snd . stripStgTicksTop (not . tickishIsCode) , StgCase (StgApp scrutinee []) _ (AlgAlt _) [GenStgAlt (DataAlt _) params sel_expr] <- strip expr , StgApp selectee [] <- strip sel_expr@@ -167,7 +165,7 @@ ([tgt], [the_fvj]) -> return $ Just (tgt ||= ApplExpr (var ("h$c_sel_" <> mkFastString sel_tag)) [the_fvj]) _ -> panic "genBind.assign: invalid size"- assign b (StgRhsClosure _ext _ccs _upd [] expr)+ assign b (StgRhsClosure _ext _ccs _upd [] expr _typ) | snd (isInlineExpr (ctxEvaluatedIds ctx) expr) = do d <- declVarsForId b tgt <- varsForId b@@ -179,9 +177,9 @@ addEvalRhs c [] = c addEvalRhs c ((b,r):xs)- | StgRhsCon{} <- r = addEvalRhs (ctxAssertEvaluated b c) xs- | (StgRhsClosure _ _ ReEntrant _ _) <- r = addEvalRhs (ctxAssertEvaluated b c) xs- | otherwise = addEvalRhs c xs+ | StgRhsCon{} <- r = addEvalRhs (ctxAssertEvaluated b c) xs+ | (StgRhsClosure _ _ ReEntrant _ _ _) <- r = addEvalRhs (ctxAssertEvaluated b c) xs+ | otherwise = addEvalRhs c xs genBindLne :: HasDebugCallStack => ExprCtx@@ -222,7 +220,7 @@ -- is initially set to null, changed to h$blackhole when the thunk is being evaluated. -- genEntryLne :: HasDebugCallStack => ExprCtx -> Id -> CgStgRhs -> G ()-genEntryLne ctx i rhs@(StgRhsClosure _ext _cc update args body) =+genEntryLne ctx i rhs@(StgRhsClosure _ext _cc update args body typ) = resetSlots $ do let payloadSize = ctxLneFrameSize ctx vars = ctxLneFrameVars ctx@@ -237,10 +235,10 @@ ]) | otherwise = mempty lvs <- popLneFrame True payloadSize ctx- body <- genBody ctx i R1 args body+ body <- genBody ctx R1 args body typ ei@(TxtI eii) <- identForEntryId i sr <- genStaticRefsRhs rhs- let f = JFunc [] (bh <> lvs <> body)+ let f = (bh <> lvs <> body) emitClosureInfo $ ClosureInfo ei (CIRegs 0 $ concatMap idVt args)@@ -249,8 +247,8 @@ map (stackSlotType . fst) (ctxLneFrameVars ctx)) CIStackFrame sr- emitToplevel (ei ||= toJExpr f)-genEntryLne ctx i (StgRhsCon cc con _mu _ticks args) = resetSlots $ do+ emitToplevel (jFunction ei [] f)+genEntryLne ctx i (StgRhsCon cc con _mu _ticks args _typ) = resetSlots $ do let payloadSize = ctxLneFrameSize ctx ei@(TxtI _eii) <- identForEntryId i -- di <- varForDataConWorker con@@ -258,18 +256,17 @@ p <- popLneFrame True payloadSize ctx args' <- concatMapM genArg args ac <- allocCon ii con cc args'- emitToplevel (ei ||= toJExpr (JFunc []- (mconcat [decl ii, p, ac, r1 |= toJExpr ii, returnStack])))+ emitToplevel (jFunction ei [] (mconcat [decl ii, p, ac, r1 |= toJExpr ii, returnStack])) -- | Generate the entry function for a local closure genEntry :: HasDebugCallStack => ExprCtx -> Id -> CgStgRhs -> G () genEntry _ _i StgRhsCon {} = return ()-genEntry ctx i rhs@(StgRhsClosure _ext cc {-_bi live-} upd_flag args body) = resetSlots $ do+genEntry ctx i rhs@(StgRhsClosure _ext cc {-_bi live-} upd_flag args body typ) = resetSlots $ do let live = stgLneLiveExpr rhs -- error "fixme" -- probably find live vars in body ll <- loadLiveFun live llv <- verifyRuntimeReps live upd <- genUpdFrame upd_flag i- body <- genBody entryCtx i R2 args body+ body <- genBody entryCtx R2 args body typ ei@(TxtI eii) <- identForEntryId i et <- genEntryType args setcc <- ifProfiling $@@ -283,7 +280,7 @@ (fixedLayout $ map (uTypeVt . idType) live) et sr- emitToplevel (ei ||= toJExpr (JFunc [] (mconcat [ll, llv, upd, setcc, body])))+ emitToplevel (jFunction ei [] (mconcat [ll, llv, upd, setcc, body])) where entryCtx = ctxSetTarget [] (ctxClearLneFrame ctx) @@ -301,12 +298,12 @@ -- | Generate the body of an object genBody :: HasDebugCallStack => ExprCtx- -> Id -> StgReg -> [Id] -> CgStgExpr+ -> Type -> G JStat-genBody ctx i startReg args e = do+genBody ctx startReg args e typ = do -- load arguments into local variables la <- do args' <- concatMapM genIdArgI args@@ -317,7 +314,7 @@ -- compute PrimReps and their number of slots required to return the result of -- i applied to args.- let res_vars = resultSize args i+ let res_vars = resultSize typ -- compute typed expressions for each slot and assign registers let go_var regs = \case@@ -358,22 +355,12 @@ -- In case of failure to determine the type, we default to LiftedRep as it's -- probably what it is. ---resultSize :: HasDebugCallStack => [Id] -> Id -> [(PrimRep, Int)]-resultSize args i = result+resultSize :: HasDebugCallStack => Type -> [(PrimRep, Int)]+resultSize ty = result where result = result_reps `zip` result_slots result_slots = fmap (slotCount . primRepSize) result_reps- result_reps = trim_args (unwrapType (idType i)) (length args)-- trim_args t 0 = typePrimRep t- trim_args t n- | Just (_af, _mult, arg, res) <- splitFunTy_maybe t- , nargs <- length (typePrimRepArgs arg)- , assert (n >= nargs) True- = trim_args (unwrapType res) (n - nargs)- | otherwise- = pprTrace "result_type: not a function type, assume LiftedRep" (ppr t)- [LiftedRep]+ result_reps = typePrimRep ty -- | Ensure that the set of identifiers has valid 'RuntimeRep's. This function -- returns a no-op when 'csRuntimeAssert' in 'StgToJSConfig' is False.@@ -395,7 +382,6 @@ go _ _ = pprPanic "verifyRuntimeReps: inconsistent sizes" (ppr xs) ver j PtrV = v "h$verify_rep_heapobj" [j] ver j IntV = v "h$verify_rep_int" [j]- ver j RtsObjV = v "h$verify_rep_rtsobj" [j] ver j DoubleV = v "h$verify_rep_double" [j] ver j ArrV = v "h$verify_rep_arr" [j] ver _ _ = mempty@@ -484,7 +470,7 @@ | otherwise = do unfloated <- State.gets gsUnfloated let xs = filter (\x -> not (elemUFM x unfloated ||- typeLevity_maybe (idType x) == Just Unlifted))+ definitelyUnliftedType (idType x))) (dVarSetElems sv) CIStaticRefs . catMaybes <$> mapM getStaticRef xs where@@ -539,19 +525,19 @@ toCl (i, StgRhsCon cc con []) = do ii <- identForId i Left <$> (return (decl ii) <> allocCon ii con cc []) -}- toCl (i, StgRhsCon cc con _mui _ticjs [a]) | isUnboxableCon con = do+ toCl (i, StgRhsCon cc con _mui _ticjs [a] _typ) | isUnboxableCon con = do ii <- identForId i ac <- allocCon ii con cc =<< genArg a pure (Left (decl ii <> ac)) -- dynamics- toCl (i, StgRhsCon cc con _mu _ticks ar) =+ toCl (i, StgRhsCon cc con _mu _ticks ar _typ) = -- fixme do we need to handle unboxed? Right <$> ((,,,) <$> identForId i <*> varForDataConWorker con <*> concatMapM genArg ar <*> pure cc)- toCl (i, cl@(StgRhsClosure _ext cc _upd_flag _args _body)) =+ toCl (i, cl@(StgRhsClosure _ext cc _upd_flag _args _body _typ)) = let live = stgLneLiveExpr cl in Right <$> ((,,,) <$> identForId i <*> varForEntryId i@@ -640,7 +626,7 @@ ++ if prof then [ObjV] else map stackSlotType lneVars) CIStackFrame sr- emitToplevel $ r ||= toJExpr (JFunc [] fun')+ emitToplevel $ jFunction r [] fun' return (pushLne <> saveCCS <> pushRet) fst3 ~(x,_,_) = x @@ -910,7 +896,7 @@ DataAlt da -> return $ Just (toJExpr $ dataConTag da) LitAlt l -> genLit l >>= \case [e] -> pure (Just e)- es -> pprPanic "caseCond: expected single-variable literal" (ppr es)+ es -> pprPanic "caseCond: expected single-variable literal" (ppr $ satJExpr Nothing <$> es) -- fixme use single tmp var for all branches -- | Load parameters from constructor@@ -1007,7 +993,7 @@ ] (ex:es) -> mconcat [ toJExpr i .^ closureField1_ |= toJExpr ex- , toJExpr i .^ closureField2_ |= toJExpr (jhFromList (zip dataFieldNames es))+ , toJExpr i .^ closureField2_ |= toJExpr (jhFromList (zip (map dataFieldName [1..]) es)) ] | otherwise = case es of [] -> mempty
GHC/StgToJS/FFI.hs view
@@ -11,9 +11,10 @@ import GHC.Prelude -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.JS.Make import GHC.JS.Transform+import qualified GHC.JS.Syntax as Sat import GHC.StgToJS.Arg import GHC.StgToJS.ExprCtx@@ -21,13 +22,12 @@ import GHC.StgToJS.Types import GHC.StgToJS.Literal import GHC.StgToJS.Regs-import GHC.StgToJS.CoreUtils+import GHC.StgToJS.Utils import GHC.StgToJS.Ids import GHC.Types.RepType import GHC.Types.ForeignCall import GHC.Types.Unique.Map-import GHC.Types.Unique.FM import GHC.Stg.Syntax @@ -37,17 +37,12 @@ import GHC.Core.Type hiding (typeSize) import GHC.Utils.Misc-import GHC.Utils.Panic-import GHC.Utils.Outputable (renderWithContext, defaultSDocContext, ppr, vcat, text)+import GHC.Utils.Outputable (renderWithContext, defaultSDocContext, ppr) import GHC.Data.FastString import Data.Char import Data.Monoid-import Data.Maybe import qualified Data.List as L-import Control.Monad-import Control.Applicative-import qualified Text.ParserCombinators.ReadP as P genPrimCall :: ExprCtx -> PrimCall -> [StgArg] -> Type -> G (JStat, ExprResult) genPrimCall ctx (PrimCall lbl _) args t = do@@ -136,32 +131,8 @@ -> G JStat parseFFIPattern' callback javascriptCc pat t ret args | not javascriptCc = mkApply pat- | otherwise =- if True- then mkApply pat- else do- u <- freshUnique- case parseFfiJME pat u of- Right (ValExpr (JVar (TxtI _ident))) -> mkApply pat- Right expr | not async && length tgt < 2 -> do- (statPre, ap) <- argPlaceholders javascriptCc args- let rp = resultPlaceholders async t ret- env = addListToUFM emptyUFM (rp ++ ap)- if length tgt == 1- then return $ statPre <> (mapStatIdent (replaceIdent env) (var "$r" |= expr))- else return $ statPre <> (mapStatIdent (replaceIdent env) (toStat expr))- Right _ -> p $ "invalid expression FFI pattern. Expression FFI patterns can only be used for synchronous FFI " ++- " imports with result size 0 or 1.\n" ++ pat- Left _ -> case parseFfiJM pat u of- Left err -> p (show err)- Right stat -> do- let rp = resultPlaceholders async t ret- let cp = callbackPlaceholders callback- (statPre, ap) <- argPlaceholders javascriptCc args- let env = addListToUFM emptyUFM (rp ++ ap ++ cp)- return $ statPre <> (mapStatIdent (replaceIdent env) stat) -- fixme trace?+ | otherwise = mkApply pat where- async = isJust callback tgt = take (typeSize t) ret -- automatic apply, build call and result copy mkApply f@@ -184,33 +155,11 @@ return $ traceCall cs as <> mconcat stats <> ApplStat f' (concat as) where f' = toJExpr (TxtI $ mkFastString f) copyResult rs = mconcat $ zipWith (\t r -> toJExpr r |= toJExpr t) (enumFrom Ret1) rs- p e = error ("Parse error in FFI pattern: " ++ pat ++ "\n" ++ e) - replaceIdent :: UniqFM Ident JExpr -> Ident -> JExpr- replaceIdent env i- | isFFIPlaceholder i = fromMaybe err (lookupUFM env i)- | otherwise = ValExpr (JVar i)- where- (TxtI i') = i- err = pprPanic "parseFFIPattern': invalid placeholder, check function type"- (vcat [text pat, ppr i', ppr args, ppr t]) traceCall cs as | csTraceForeign cs = ApplStat (var "h$traceForeign") [toJExpr pat, toJExpr as] | otherwise = mempty --- ident is $N, $N_R, $rN, $rN_R or $r or $c-isFFIPlaceholder :: Ident -> Bool-isFFIPlaceholder (TxtI x) = not (null (P.readP_to_S parser (unpackFS x)))- where- digit = P.satisfy (`elem` ("0123456789" :: String))- parser = void (P.string "$r" >> P.eof) <|>- void (P.string "$c" >> P.eof) <|> do- _ <- P.char '$'- P.optional (P.char 'r')- _ <- P.many1 digit- P.optional (P.char '_' >> P.many1 digit)- P.eof- -- generate arg to be passed to FFI call, with marshalling JStat to be run -- before the call genFFIArg :: Bool -> StgArg -> G (JStat, [JExpr])@@ -228,59 +177,8 @@ arg_ty = stgArgType a r = uTypeVt arg_ty --- $1, $2, $3 for single, $1_1, $1_2 etc for dual--- void args not counted-argPlaceholders :: Bool -> [StgArg] -> G (JStat, [(Ident,JExpr)])-argPlaceholders isJavaScriptCc args = do- (stats, idents0) <- unzip <$> mapM (genFFIArg isJavaScriptCc) args- let idents = filter (not . null) idents0- return $ (mconcat stats, concat- (zipWith (\is n -> mkPlaceholder True ("$"++show n) is) idents [(1::Int)..]))--mkPlaceholder :: Bool -> String -> [JExpr] -> [(Ident, JExpr)]-mkPlaceholder undersc prefix aids =- case aids of- [] -> []- [x] -> [(TxtI . mkFastString $ prefix, x)]- xs@(x:_) -> (TxtI . mkFastString $ prefix, x) :- zipWith (\x m -> (TxtI . mkFastString $ prefix ++ u ++ show m,x)) xs [(1::Int)..]- where u = if undersc then "_" else ""---- $r for single, $r1,$r2 for dual--- $r1, $r2, etc for ubx tup, void args not counted-resultPlaceholders :: Bool -> Type -> [JExpr] -> [(Ident,JExpr)] -- ident, replacement-resultPlaceholders True _ _ = [] -- async has no direct resuls, use callback-resultPlaceholders False t rs =- case typeVt (unwrapType t) of- [t'] -> mkUnary (varSize t')- uts ->- let sizes = filter (>0) (map varSize uts)- f _ 0 = []- f n 1 = [["$r" ++ show n]]- f n k = ["$r" ++ sn, "$r" ++ sn ++ "_1"] : map (\x -> ["$r" ++ sn ++ "_" ++ show x]) [2..k]- where sn = show n- phs = zipWith (\size n -> f n size) sizes [(1::Int)..]- in case sizes of- [n] -> mkUnary n- _ -> concat $ zipWith (\phs' r -> map (\i -> (TxtI (mkFastString i), r)) phs') (concat phs) rs- where- mkUnary 0 = []- mkUnary 1 = [(TxtI "$r",head rs)] -- single- mkUnary n = [(TxtI "$r",head rs),(TxtI "$r1", head rs)] ++- zipWith (\n r -> (TxtI . mkFastString $ "$r" ++ show n, toJExpr r)) [2..n] (tail rs)--callbackPlaceholders :: Maybe JExpr -> [(Ident,JExpr)]-callbackPlaceholders Nothing = []-callbackPlaceholders (Just e) = [((TxtI "$c"), e)]--parseFfiJME :: String -> Int -> Either String JExpr-parseFfiJME _xs _u = Left "parseFfiJME not yet implemented"--parseFfiJM :: String -> Int -> Either String JStat-parseFfiJM _xs _u = Left "parseFfiJM not yet implemented"--saturateFFI :: JMacro a => Int -> a -> a-saturateFFI u = jsSaturate (Just . mkFastString $ "ghcjs_ffi_sat_" ++ show u)+saturateFFI :: Int -> JStat -> Sat.JStat+saturateFFI u = satJStat (Just . mkFastString $ "ghcjs_ffi_sat_" ++ show u) genForeignCall :: HasDebugCallStack => ExprCtx
GHC/StgToJS/Heap.hs view
@@ -38,7 +38,7 @@ import GHC.Prelude -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.JS.Make import GHC.StgToJS.Types import GHC.Data.FastString
GHC/StgToJS/Ids.hs view
@@ -40,10 +40,10 @@ import GHC.StgToJS.Types import GHC.StgToJS.Monad-import GHC.StgToJS.CoreUtils+import GHC.StgToJS.Utils import GHC.StgToJS.Symbols -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.JS.Make import GHC.Core.DataCon@@ -111,7 +111,7 @@ = current_module !ident = mkFastStringByteString $ mconcat- [ mkJsSymbolBS exported mod (occNameFS (nameOccName name))+ [ mkJsSymbolBS exported mod (occNameMangledFS (nameOccName name)) ------------- -- suffixes@@ -131,7 +131,7 @@ , if exported then mempty else let (c,u) = unpkUnique (getUnique i)- in mconcat [BSC.pack ['_',c,'_'], word64BS u]+ in mconcat [BSC.pack ['_',c,'_'], intBS u] ] -- | Retrieve the cached Ident for the given Id if there is one. Otherwise make
GHC/StgToJS/Linker/Linker.hs view
@@ -21,7 +21,17 @@ module GHC.StgToJS.Linker.Linker ( jsLinkBinary+ , jsLink , embedJsFile+ , staticInitStat+ , staticDeclStat+ , mkExportedFuns+ , mkExportedModFuns+ , computeLinkDependencies+ , LinkSpec (..)+ , LinkPlan (..)+ , emptyLinkPlan+ , incrementLinkPlan ) where @@ -30,32 +40,37 @@ import GHC.Platform.Host (hostPlatformArchOS) import GHC.JS.Make-import GHC.JS.Syntax+import GHC.JS.Optimizer+import GHC.JS.Unsat.Syntax+import qualified GHC.JS.Syntax as Sat+import GHC.JS.Transform -import GHC.Driver.Session (DynFlags(..))+import GHC.Driver.DynFlags (DynFlags(..)) import Language.Haskell.Syntax.Module.Name import GHC.SysTools.Cpp import GHC.SysTools import GHC.Linker.Static.Utils (exeFileName)+import GHC.Linker.Types (Unlinked(..), linkableUnlinked) import GHC.StgToJS.Linker.Types import GHC.StgToJS.Linker.Utils+import GHC.StgToJS.Linker.Opt import GHC.StgToJS.Rts.Rts import GHC.StgToJS.Object import GHC.StgToJS.Types hiding (LinkableUnit) import GHC.StgToJS.Symbols-import GHC.StgToJS.Printer import GHC.StgToJS.Arg import GHC.StgToJS.Closure import GHC.Unit.State import GHC.Unit.Env-import GHC.Unit.Home+import GHC.Unit.Home.ModInfo import GHC.Unit.Types import GHC.Unit.Module (moduleStableString) import GHC.Utils.Outputable hiding ((<>))+import GHC.Utils.BufHandle import GHC.Utils.Panic import GHC.Utils.Error import GHC.Utils.Logger (Logger, logVerbAtLeast)@@ -71,22 +86,17 @@ import qualified GHC.Data.ShortText as ST import GHC.Data.FastString -import Control.Concurrent.MVar import Control.Monad import Data.Array import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BC-import qualified Data.ByteString.Lazy.Char8 as BLC import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString as BS import Data.Function (on)-import Data.IntSet (IntSet) import qualified Data.IntSet as IS import Data.IORef-import Data.List ( partition, nub, intercalate, group, sort- , groupBy, intersperse,- )+import Data.List ( nub, intercalate, groupBy, intersperse, sortBy) import Data.Map.Strict (Map) import qualified Data.Map.Strict as M import Data.Maybe@@ -104,6 +114,10 @@ , getPermissions ) +import GHC.Unit.Finder.Types+import GHC.Unit.Finder (findObjectLinkableMaybe, findHomeModule)+import GHC.Driver.Config.Finder (initFinderOpts)+ data LinkerStats = LinkerStats { bytesPerModule :: !(Map Module Word64) -- ^ number of bytes linked per module , packedMetaDataSize :: !Word64 -- ^ number of bytes for metadata@@ -114,8 +128,12 @@ emptyArchiveState :: IO ArchiveState emptyArchiveState = ArchiveState <$> newIORef M.empty +defaultJsContext :: SDocContext+defaultJsContext = defaultSDocContext{sdocStyle = PprCode}+ jsLinkBinary- :: JSLinkConfig+ :: FinderCache+ -> JSLinkConfig -> StgToJSConfig -> [FilePath] -> Logger@@ -124,7 +142,7 @@ -> [FilePath] -> [UnitId] -> IO ()-jsLinkBinary lc_cfg cfg js_srcs logger dflags u_env objs dep_pkgs+jsLinkBinary finder_cache lc_cfg cfg js_srcs logger dflags unit_env objs dep_units | lcNoJSExecutables lc_cfg = return () | otherwise = do -- additional objects to link are passed as FileOption ldInputs...@@ -134,47 +152,56 @@ let objs' = map ObjFile (objs ++ cmdline_js_objs) js_srcs' = js_srcs ++ cmdline_js_srcs- isRoot _ = True+ is_root _ = True -- FIXME: we shouldn't consider every function as a root,+ -- but only the program entry point (main), either the+ -- generated one or coming from an object exe = jsExeFileName dflags - void $ link lc_cfg cfg logger u_env exe mempty dep_pkgs objs' js_srcs' isRoot mempty+ -- compute dependencies+ let link_spec = LinkSpec+ { lks_unit_ids = dep_units+ , lks_obj_files = objs'+ , lks_obj_root_filter = is_root+ , lks_extra_roots = mempty+ , lks_extra_js = js_srcs'+ } + let finder_opts = initFinderOpts dflags++ link_plan <- computeLinkDependencies cfg unit_env link_spec finder_opts finder_cache++ void $ jsLink lc_cfg cfg logger exe link_plan+ -- | link and write result to disk (jsexe directory)-link :: JSLinkConfig+jsLink+ :: JSLinkConfig -> StgToJSConfig -> Logger- -> UnitEnv -> FilePath -- ^ output file/directory- -> [FilePath] -- ^ include path for home package- -> [UnitId] -- ^ packages to link- -> [LinkedObj] -- ^ the object files we're linking- -> [FilePath] -- ^ extra js files to include- -> (ExportedFun -> Bool) -- ^ functions from the objects to use as roots (include all their deps)- -> Set ExportedFun -- ^ extra symbols to link in+ -> LinkPlan -> IO ()-link lc_cfg cfg logger unit_env out _include units objFiles jsFiles isRootFun extraStaticDeps = do+jsLink lc_cfg cfg logger out link_plan = do -- create output directory createDirectoryIfMissing False out + when (logVerbAtLeast logger 2) $+ logInfo logger $ hang (text "jsLink:") 2 (ppr link_plan)+ ------------------------------------------------------------- -- link all Haskell code (program + dependencies) into out.js - -- compute dependencies- (dep_map, dep_units, all_deps, _rts_wired_functions, dep_archives)- <- computeLinkDependencies cfg logger out unit_env units objFiles extraStaticDeps isRootFun-- -- retrieve code for dependencies- mods <- collectDeps dep_map dep_units all_deps+ -- retrieve code for Haskell dependencies+ mods <- collectModuleCodes link_plan -- LTO + rendering of JS code link_stats <- withBinaryFile (out </> "out.js") WriteMode $ \h ->- renderLinker h mods jsFiles+ renderLinker h (csPrettyRender cfg) mods (lkp_extra_js link_plan) ------------------------------------------------------------- -- dump foreign references file (.frefs)- unless (lcOnlyOut lc_cfg) $ do+ when (lcForeignRefs lc_cfg) $ do let frefsFile = "out.frefs" -- frefs = concatMap mc_frefs mods jsonFrefs = mempty -- FIXME: toJson frefs@@ -190,12 +217,12 @@ -- link generated RTS parts into rts.js unless (lcNoRts lc_cfg) $ do- BL.writeFile (out </> "rts.js") ( BLC.pack rtsDeclsText- <> BLC.pack (rtsText cfg))+ withFile (out </> "rts.js") WriteMode $ \h -> do+ void $ hPutJS (csPrettyRender cfg) h (rts cfg) -- link dependencies' JS files into lib.js withBinaryFile (out </> "lib.js") WriteMode $ \h -> do- forM_ dep_archives $ \archive_file -> do+ forM_ (lkp_archives link_plan) $ \archive_file -> do Ar.Archive entries <- Ar.loadAr archive_file forM_ entries $ \entry -> do case getJsArchiveEntry entry of@@ -204,47 +231,106 @@ B.hPut h bs hPutChar h '\n' - -- link everything together into all.js- when (generateAllJs lc_cfg) $ do+ -- link everything together into a runnable all.js+ -- only if we link a complete application,+ -- no incremental linking and no skipped parts+ when (lcCombineAll lc_cfg && not (lcNoRts lc_cfg)) $ do _ <- combineFiles lc_cfg out writeHtml out writeRunMain out writeRunner lc_cfg out writeExterns out +data LinkSpec = LinkSpec+ { lks_unit_ids :: [UnitId] + , lks_obj_files :: [LinkedObj]++ , lks_obj_root_filter :: ExportedFun -> Bool+ -- ^ Predicate for exported functions in objects to declare as root++ , lks_extra_roots :: Set ExportedFun+ -- ^ Extra root functions from loaded units++ , lks_extra_js :: [FilePath]+ -- ^ Extra JS files to link+ }++instance Outputable LinkSpec where+ ppr s = hang (text "LinkSpec") 2 $ vcat+ [ hcat [text "Unit ids: ", ppr (lks_unit_ids s)]+ , hcat [text "Object files:", ppr (lks_obj_files s)]+ , text "Object root filter: <function>"+ , hcat [text "Extra roots: ", ppr (lks_extra_roots s)]+ , hang (text "Extra JS:") 2 (vcat (fmap text (lks_extra_js s)))+ ]++emptyLinkPlan :: LinkPlan+emptyLinkPlan = LinkPlan+ { lkp_block_info = mempty+ , lkp_dep_blocks = mempty+ , lkp_archives = mempty+ , lkp_extra_js = mempty+ }++-- | Given a `base` link plan (assumed to be already linked) and a `new` link+-- plan, compute `(diff, total)` link plans.+--+-- - `diff` is the incremental link plan to get from `base` to `total`+-- - `total` is the total link plan as if `base` and `new` were linked at once+incrementLinkPlan :: LinkPlan -> LinkPlan -> (LinkPlan, LinkPlan)+incrementLinkPlan base new = (diff,total)+ where+ total = LinkPlan+ { lkp_block_info = M.union (lkp_block_info base) (lkp_block_info new)+ , lkp_dep_blocks = S.union (lkp_dep_blocks base) (lkp_dep_blocks new)+ , lkp_archives = S.union (lkp_archives base) (lkp_archives new)+ , lkp_extra_js = S.union (lkp_extra_js base) (lkp_extra_js new)+ }+ diff = LinkPlan+ { lkp_block_info = lkp_block_info new -- block info from "new" contains all we need to load new blocks+ , lkp_dep_blocks = S.difference (lkp_dep_blocks new) (lkp_dep_blocks base)+ , lkp_archives = S.difference (lkp_archives new) (lkp_archives base)+ , lkp_extra_js = S.difference (lkp_extra_js new) (lkp_extra_js base)+ }++ computeLinkDependencies :: StgToJSConfig- -> Logger- -> String -> UnitEnv- -> [UnitId]- -> [LinkedObj]- -> Set ExportedFun- -> (ExportedFun -> Bool)- -> IO (Map Module (Deps, DepsLocation), [UnitId], Set LinkableUnit, Set ExportedFun, [FilePath])-computeLinkDependencies cfg logger target unit_env units objFiles extraStaticDeps isRootFun = do+ -> LinkSpec+ -> FinderOpts+ -> FinderCache+ -> IO LinkPlan+computeLinkDependencies cfg unit_env link_spec finder_opts finder_cache = do - (objDepsMap, objRequiredUnits) <- loadObjDeps objFiles+ let units = lks_unit_ids link_spec+ let obj_files = lks_obj_files link_spec+ let extra_roots = lks_extra_roots link_spec+ let obj_is_root = lks_obj_root_filter link_spec - let roots = S.fromList . filter isRootFun $ concatMap (M.keys . depsHaskellExported . fst) (M.elems objDepsMap)- rootMods = map (moduleNameString . moduleName . head) . group . sort . map funModule . S.toList $ roots- objPkgs = map moduleUnitId $ nub (M.keys objDepsMap)+ -- Process:+ -- 1) Find new required linkables (object files, libraries, etc.) for all+ -- transitive dependencies+ -- 2) Load ObjBlockInfo from them and cache them+ -- 3) Compute ObjBlock dependencies and return the link plan - when (logVerbAtLeast logger 2) $ void $ do- compilationProgressMsg logger $ hcat- [ text "Linking ", text target, text " (", text (intercalate "," rootMods), char ')' ]- compilationProgressMsg logger $ hcat- [ text "objDepsMap ", ppr objDepsMap ]- compilationProgressMsg logger $ hcat- [ text "objFiles ", ppr objFiles ]+ -- TODO (#23013): currently we directly compute the ObjBlock dependencies and+ -- find/load linkable on-demand when a module is missing. ++ (objs_block_info, objs_required_blocks) <- loadObjBlockInfo obj_files++ let obj_roots = S.fromList . filter obj_is_root $ concatMap (M.keys . bi_exports . lbi_info) (M.elems objs_block_info)+ obj_units = map moduleUnitId $ nub (M.keys objs_block_info)+ let (rts_wired_units, rts_wired_functions) = rtsDeps units -- all the units we want to link together, without their dependencies- let root_units = filter (/= mainUnitId)+ let root_units = filter (/= ue_currentUnit unit_env)+ $ filter (/= interactiveUnitId) $ nub- $ rts_wired_units ++ reverse objPkgs ++ reverse units+ $ rts_wired_units ++ reverse obj_units ++ reverse units -- all the units we want to link together, including their dependencies, -- preload units, and backpack instantiations@@ -253,32 +339,78 @@ let all_units = fmap unitId all_units_infos dep_archives <- getPackageArchives cfg unit_env all_units- env <- newGhcjsEnv- (archsDepsMap, archsRequiredUnits) <- loadArchiveDeps env dep_archives-- when (logVerbAtLeast logger 2) $- logInfo logger $ hang (text "Linking with archives:") 2 (vcat (fmap text dep_archives))+ (archives_block_info, archives_required_blocks) <- loadArchiveBlockInfo dep_archives -- compute dependencies- let dep_units = all_units ++ [homeUnitId (ue_unsafeHomeUnit $ unit_env)]- dep_map = objDepsMap `M.union` archsDepsMap- excluded_units = S.empty- dep_fun_roots = roots `S.union` rts_wired_functions `S.union` extraStaticDeps- dep_unit_roots = archsRequiredUnits ++ objRequiredUnits+ let block_info = objs_block_info `M.union` archives_block_info+ dep_fun_roots = obj_roots `S.union` rts_wired_functions `S.union` extra_roots - all_deps <- getDeps (fmap fst dep_map) excluded_units dep_fun_roots dep_unit_roots+ -- read transitive dependencies+ new_required_blocks_var <- newIORef []+ let load_info mod = do+ -- Adapted from the tangled code in GHC.Linker.Loader.getLinkDeps.+ linkable <- case lookupHugByModule mod (ue_home_unit_graph unit_env) of+ Nothing ->+ -- It's not in the HPT because we are in one shot mode,+ -- so use the Finder to get a ModLocation...+ case ue_homeUnit unit_env of+ Nothing -> pprPanic "getDeps: No home-unit: " (pprModule mod)+ Just home_unit -> do+ mb_stuff <- findHomeModule finder_cache finder_opts home_unit (moduleName mod)+ case mb_stuff of+ Found loc mod -> found loc mod+ _ -> pprPanic "getDeps: Couldn't find home-module: " (pprModule mod)+ where+ found loc mod = do {+ mb_lnk <- findObjectLinkableMaybe mod loc ;+ case mb_lnk of {+ Nothing -> pprPanic "getDeps: Couldn't find linkable for module: " (pprModule mod) ;+ Just lnk -> pure lnk+ }} - when (logVerbAtLeast logger 2) $- logInfo logger $ hang (text "Units to link:") 2 (vcat (fmap ppr dep_units))- -- logInfo logger $ hang (text "All deps:") 2 (vcat (fmap ppr (S.toList all_deps)))+ Just mod_info -> case homeModInfoObject mod_info of+ Nothing -> pprPanic "getDeps: Couldn't find object file for home-module: " (pprModule mod)+ Just lnk -> pure lnk - return (dep_map, dep_units, all_deps, rts_wired_functions, dep_archives)+ case linkableUnlinked linkable of+ [DotO p] -> do+ (bis, req_b) <- loadObjBlockInfo [ObjFile p]+ -- Store new required blocks in IORef+ modifyIORef new_required_blocks_var ((++) req_b)+ case M.lookup mod bis of+ Nothing -> pprPanic "getDeps: Didn't load any block info for home-module: " (pprModule mod)+ Just bi -> pure bi+ ul -> pprPanic "getDeps: Unrecognized linkable for home-module: "+ (vcat [ pprModule mod+ , ppr ul]) + -- required blocks have no dependencies, so don't have to use them as roots in+ -- the traversal+ (updated_block_info, transitive_deps) <- getDeps block_info load_info dep_fun_roots mempty + new_required_blocks <- readIORef new_required_blocks_var+ let required_blocks = S.fromList $ mconcat+ [ archives_required_blocks+ , objs_required_blocks+ , new_required_blocks+ ]++ let all_deps = S.union transitive_deps required_blocks++ let plan = LinkPlan+ { lkp_block_info = updated_block_info+ , lkp_dep_blocks = all_deps+ , lkp_archives = S.fromList dep_archives+ , lkp_extra_js = S.fromList (lks_extra_js link_spec)+ }++ return plan++ -- | Compiled module data ModuleCode = ModuleCode { mc_module :: !Module- , mc_js_code :: !JStat+ , mc_js_code :: !Sat.JStat , mc_exports :: !B.ByteString -- ^ rendered exports , mc_closures :: ![ClosureInfo] , mc_statics :: ![StaticInfo]@@ -291,29 +423,43 @@ -- up into global "metadata" for the whole link. data CompactedModuleCode = CompactedModuleCode { cmc_module :: !Module- , cmc_js_code :: !JStat+ , cmc_js_code :: !Sat.JStat , cmc_exports :: !B.ByteString -- ^ rendered exports } +-- | Output JS statements and return the output size in bytes.+hPutJS :: Bool -> Handle -> Sat.JStat -> IO Integer+hPutJS render_pretty h = \case+ Sat.BlockStat [] -> pure 0+ x -> do+ before <- hTell h+ if render_pretty+ then do+ printSDoc defaultJsContext (Ppr.PageMode True) h (pretty render_pretty x)+ else do+ bh <- newBufHandle h+ bPutHDoc bh defaultJsContext (line $ pretty render_pretty x)+ bFlush bh+ -- Append an empty line to correctly end the file in a newline+ hPutChar h '\n'+ after <- hTell h+ pure $! (after - before)+ -- | Link modules and pretty-print them into the given Handle renderLinker :: Handle+ -> Bool -- ^ should we render readable JS for debugging? -> [ModuleCode] -- ^ linked code per module- -> [FilePath] -- ^ additional JS files+ -> Set FilePath -- ^ additional JS files -> IO LinkerStats-renderLinker h mods jsFiles = do+renderLinker h render_pretty mods js_files = do -- link modules let (compacted_mods, meta) = linkModules mods let putBS = B.hPut h- putJS x = do- before <- hTell h- Ppr.printLeftRender h (pretty x)- hPutChar h '\n'- after <- hTell h- pure $! (after - before)+ putJS = hPutJS render_pretty h --------------------------------------------------------- -- Pretty-print JavaScript code for all the dependencies.@@ -329,13 +475,13 @@ pure (mod_mod, mod_size) -- commoned up metadata- !meta_length <- fromIntegral <$> putJS meta+ !meta_length <- fromIntegral <$> putJS (jsOptimize $ satJStat Nothing meta) -- module exports mapM_ (putBS . cmc_exports) compacted_mods -- explicit additional JS files- mapM_ (\i -> B.readFile i >>= putBS) jsFiles+ mapM_ (\i -> B.readFile i >>= putBS) (S.toList js_files) -- stats let link_stats = LinkerStats@@ -468,99 +614,147 @@ writeExterns out = writeFile (out </> "all.js.externs") $ unpackFS rtsExterns --- | get all dependencies for a given set of roots-getDeps :: Map Module Deps -- ^ loaded deps- -> Set LinkableUnit -- ^ don't link these blocks- -> Set ExportedFun -- ^ start here- -> [LinkableUnit] -- ^ and also link these- -> IO (Set LinkableUnit)-getDeps loaded_deps base fun startlu = go' S.empty (S.fromList startlu) (S.toList fun)+-- | Get all block dependencies for a given set of roots+--+-- Returns the update block info map and the blocks.+getDeps :: Map Module LocatedBlockInfo -- ^ Block info per module+ -> (Module -> IO LocatedBlockInfo) -- ^ Used to load block info if missing+ -> Set ExportedFun -- ^ start here+ -> Set BlockRef -- ^ and also link these+ -> IO (Map Module LocatedBlockInfo, Set BlockRef)+getDeps init_infos load_info root_funs root_blocks = traverse_funs init_infos S.empty root_blocks (S.toList root_funs) where- go :: Set LinkableUnit- -> Set LinkableUnit- -> IO (Set LinkableUnit)- go result open = case S.minView open of- Nothing -> return result- Just (lu@(lmod,n), open') ->- case M.lookup lmod loaded_deps of- Nothing -> pprPanic "getDeps.go: object file not loaded for: " (pprModule lmod)- Just (Deps _ _ _ b) ->- let block = b!n- result' = S.insert lu result- in go' result'- (addOpen result' open' $- map (lmod,) (blockBlockDeps block)) (blockFunDeps block)+ -- A block may depend on:+ -- 1. other blocks from the same module+ -- 2. exported functions from another module+ --+ -- Process:+ -- 1. We use the BlockInfos to find the block corresponding to every+ -- exported root functions.+ --+ -- 2. We had these blocks to the set of root_blocks if they aren't already+ -- added to the result.+ --+ -- 3. Then we traverse the root_blocks to find their dependencies and we+ -- add them to root_blocks (if they aren't already added to the result) and+ -- to root_funs.+ --+ -- 4. back to 1 - go' :: Set LinkableUnit- -> Set LinkableUnit- -> [ExportedFun]- -> IO (Set LinkableUnit)- go' result open [] = go result open- go' result open (f:fs) =- let key = funModule f- in case M.lookup key loaded_deps of- Nothing -> pprPanic "getDeps.go': object file not loaded for: " $ pprModule key- Just (Deps _m _r e _b) ->- let lun :: Int- lun = fromMaybe (pprPanic "exported function not found: " $ ppr f)- (M.lookup f e)- lu = (key, lun)- in go' result (addOpen result open [lu]) fs+ lookup_info infos mod = case M.lookup mod infos of+ Just info -> pure (infos, lbi_info info)+ Nothing -> do+ -- load info and update cache with it+ info <- load_info mod+ pure (M.insert mod info infos, lbi_info info) - addOpen :: Set LinkableUnit -> Set LinkableUnit -> [LinkableUnit]- -> Set LinkableUnit- addOpen result open newUnits =- let alreadyLinked s = S.member s result ||- S.member s open ||- S.member s base- in open `S.union` S.fromList (filter (not . alreadyLinked) newUnits)+ traverse_blocks+ :: Map Module LocatedBlockInfo+ -> Set BlockRef+ -> Set BlockRef+ -> IO (Map Module LocatedBlockInfo, Set BlockRef)+ traverse_blocks infos result open = case S.minView open of+ Nothing -> return (infos, result)+ Just (ref, open') -> do+ let mod = block_ref_mod ref+ !(infos',info) <- lookup_info infos mod+ let block = bi_block_deps info ! block_ref_idx ref+ result' = S.insert ref result+ to_block_ref i = BlockRef+ { block_ref_mod = mod+ , block_ref_idx = i+ }+ traverse_funs infos' result'+ (addOpen result' open' $+ map to_block_ref (blockBlockDeps block)) (blockFunDeps block) + traverse_funs+ :: Map Module LocatedBlockInfo+ -> Set BlockRef+ -> Set BlockRef+ -> [ExportedFun]+ -> IO (Map Module LocatedBlockInfo, Set BlockRef)+ traverse_funs infos result open = \case+ [] -> traverse_blocks infos result open+ (f:fs) -> do+ let mod = funModule f+ -- lookup module block info for the module that exports the function+ !(infos',info) <- lookup_info infos mod+ -- lookup block index associated to the function in the block info+ case M.lookup f (bi_exports info) of+ Nothing -> pprPanic "exported function not found: " $ ppr f+ Just idx -> do+ let fun_block_ref = BlockRef+ { block_ref_mod = mod+ , block_ref_idx = idx+ }+ -- always add the module "global block" when we link a module+ let global_block_ref = BlockRef+ { block_ref_mod = mod+ , block_ref_idx = 0+ }+ traverse_funs infos' result (addOpen result open [fun_block_ref,global_block_ref]) fs++ -- extend the open block set with new blocks that are not already in the+ -- result block set nor in the open block set.+ addOpen+ :: Set BlockRef+ -> Set BlockRef+ -> [BlockRef]+ -> Set BlockRef+ addOpen result open new_blocks =+ let alreadyLinked s = S.member s result || S.member s open+ in open `S.union` S.fromList (filter (not . alreadyLinked) new_blocks)+ -- | collect dependencies for a set of roots-collectDeps :: Map Module (Deps, DepsLocation) -- ^ Dependency map- -> [UnitId] -- ^ packages, code linked in this order- -> Set LinkableUnit -- ^ All dependencides- -> IO [ModuleCode]-collectDeps mod_deps packages all_deps = do+collectModuleCodes :: LinkPlan -> IO [ModuleCode]+collectModuleCodes link_plan = do - -- read ghc-prim first, since we depend on that for static initialization- let packages' = uncurry (++) $ partition (== primUnitId) (nub packages)+ let block_info = lkp_block_info link_plan+ let blocks = lkp_dep_blocks link_plan - units_by_module :: Map Module IntSet- units_by_module = M.fromListWith IS.union $- map (\(m,n) -> (m, IS.singleton n)) (S.toList all_deps)+ -- we're going to load all the blocks. Instead of doing this randomly, we+ -- group them by module first.+ let module_blocks :: Map Module BlockIds+ module_blocks = M.fromListWith IS.union $+ map (\ref -> (block_ref_mod ref, IS.singleton (block_ref_idx ref))) (S.toList blocks) - mod_deps_bypkg :: Map UnitId [(Deps, DepsLocation)]- mod_deps_bypkg = M.fromListWith (++)- (map (\(m,v) -> (moduleUnitId m,[v])) (M.toList mod_deps))+ -- GHCJS had this comment: "read ghc-prim first, since we depend on that for+ -- static initialization". Not sure if it's still true as we haven't ported+ -- the compactor yet. Still we sort to read ghc-prim blocks first just in+ -- case.+ let pred x = moduleUnitId (fst x) == primUnitId+ cmp x y = case (pred x, pred y) of+ (True,False) -> LT+ (False,True) -> GT+ (True,True) -> EQ+ (False,False) -> EQ + sorted_module_blocks :: [(Module,BlockIds)]+ sorted_module_blocks = sortBy cmp (M.toList module_blocks)++ -- load blocks ar_state <- emptyArchiveState- fmap (catMaybes . concat) . forM packages' $ \pkg ->- mapM (uncurry $ extractDeps ar_state units_by_module)- (fromMaybe [] $ M.lookup pkg mod_deps_bypkg)+ forM sorted_module_blocks $ \(mod,bids) -> do+ case M.lookup mod block_info of+ Nothing -> pprPanic "collectModuleCodes: couldn't find block info for module" (ppr mod)+ Just lbi -> extractBlocks ar_state lbi bids -extractDeps :: ArchiveState- -> Map Module IntSet- -> Deps- -> DepsLocation- -> IO (Maybe ModuleCode)-extractDeps ar_state units deps loc =- case M.lookup mod units of- Nothing -> return Nothing- Just mod_units -> Just <$> do- let selector n _ = fromIntegral n `IS.member` mod_units || isGlobalUnit (fromIntegral n)- case loc of- ObjectFile fp -> do- us <- readObjectUnits fp selector- pure (collectCode us)- ArchiveFile a -> do- obj <- readArObject ar_state mod a- us <- getObjectUnits obj selector- pure (collectCode us)- InMemory _n obj -> do- us <- getObjectUnits obj selector- pure (collectCode us)+extractBlocks :: ArchiveState -> LocatedBlockInfo -> BlockIds -> IO ModuleCode+extractBlocks ar_state lbi blocks = do+ case lbi_loc lbi of+ ObjectFile fp -> do+ us <- readObjectBlocks fp blocks+ pure (collectCode us)+ ArchiveFile a -> do+ obj <- readArObject ar_state mod a+ us <- getObjectBlocks obj blocks+ pure (collectCode us)+ InMemory _n obj -> do+ us <- getObjectBlocks obj blocks+ pure (collectCode us) where- mod = depsModule deps+ mod = bi_module (lbi_info lbi) newline = BC.pack "\n" mk_exports = mconcat . intersperse newline . filter (not . BS.null) . map oiRaw mk_js_code = mconcat . map oiStat@@ -692,40 +886,32 @@ -- | Given a @UnitId@, a module name, and a set of symbols in the module, -- package these into an @ExportedFun@. mkExportedFuns :: UnitId -> FastString -> [FastString] -> [ExportedFun]-mkExportedFuns uid mod_name symbols = map mk_fun symbols+mkExportedFuns uid mod_name symbols = mkExportedModFuns mod names where mod = mkModule (RealUnit (Definite uid)) (mkModuleNameFS mod_name)- mk_fun sym = ExportedFun mod (LexicalFastString (mkJsSymbol True mod sym))+ names = map (mkJsSymbol True mod) symbols +-- | Given a @Module@ and a set of symbols in the module, package these into an+-- @ExportedFun@.+mkExportedModFuns :: Module -> [FastString] -> [ExportedFun]+mkExportedModFuns mod symbols = map mk_fun symbols+ where+ mk_fun sym = ExportedFun mod (LexicalFastString sym)+ -- | read all dependency data from the to-be-linked files-loadObjDeps :: [LinkedObj] -- ^ object files to link- -> IO (Map Module (Deps, DepsLocation), [LinkableUnit])-loadObjDeps objs = (prepareLoadedDeps . catMaybes) <$> mapM readDepsFromObj objs+loadObjBlockInfo :: [LinkedObj] -- ^ object files to link+ -> IO (Map Module LocatedBlockInfo, [BlockRef])+loadObjBlockInfo objs = (prepareLoadedDeps . catMaybes) <$> mapM readBlockInfoFromObj objs -- | Load dependencies for the Linker from Ar-loadArchiveDeps :: GhcjsEnv- -> [FilePath]- -> IO ( Map Module (Deps, DepsLocation)- , [LinkableUnit]- )-loadArchiveDeps env archives = modifyMVar (linkerArchiveDeps env) $ \m ->- case M.lookup archives' m of- Just r -> return (m, r)- Nothing -> loadArchiveDeps' archives >>= \r -> return (M.insert archives' r m, r)- where- archives' = S.fromList archives--loadArchiveDeps' :: [FilePath]- -> IO ( Map Module (Deps, DepsLocation)- , [LinkableUnit]- )-loadArchiveDeps' archives = do+loadArchiveBlockInfo :: [FilePath] -> IO (Map Module LocatedBlockInfo, [BlockRef])+loadArchiveBlockInfo archives = do archDeps <- forM archives $ \file -> do (Ar.Archive entries) <- Ar.loadAr file catMaybes <$> mapM (readEntry file) entries return (prepareLoadedDeps $ concat archDeps) where- readEntry :: FilePath -> Ar.ArchiveEntry -> IO (Maybe (Deps, DepsLocation))+ readEntry :: FilePath -> Ar.ArchiveEntry -> IO (Maybe LocatedBlockInfo) readEntry ar_file ar_entry = do let bs = Ar.filedata ar_entry bh <- unsafeUnpackBinBuffer bs@@ -733,8 +919,8 @@ Left _ -> pure Nothing -- not a valid object entry Right mod_name -> do obj <- getObjectBody bh mod_name- let !deps = objDeps obj- pure $ Just (deps, ArchiveFile ar_file)+ let !info = objBlockInfo obj+ pure $ Just (LocatedBlockInfo (ArchiveFile ar_file) info) -- | Predicate to check that an entry in Ar is a JS source -- and to return it without its header@@ -764,29 +950,32 @@ -prepareLoadedDeps :: [(Deps, DepsLocation)]- -> ( Map Module (Deps, DepsLocation)- , [LinkableUnit]- )-prepareLoadedDeps deps =- let req = concatMap (requiredUnits . fst) deps- depsMap = M.fromList $ map (\d -> (depsModule (fst d), d)) deps- in (depsMap, req)+prepareLoadedDeps :: [LocatedBlockInfo]+ -> (Map Module LocatedBlockInfo, [BlockRef])+prepareLoadedDeps lbis = (module_blocks, must_link)+ where+ must_link = concatMap (requiredBlocks . lbi_info) lbis+ module_blocks = M.fromList $ map (\d -> (bi_module (lbi_info d), d)) lbis -requiredUnits :: Deps -> [LinkableUnit]-requiredUnits d = map (depsModule d,) (IS.toList $ depsRequired d)+requiredBlocks :: BlockInfo -> [BlockRef]+requiredBlocks d = map mk_block_ref (IS.toList $ bi_must_link d)+ where+ mk_block_ref i = BlockRef+ { block_ref_mod = bi_module d+ , block_ref_idx = i+ } --- | read dependencies from an object that might have already been into memory+-- | read block info from an object that might have already been into memory -- pulls in all Deps from an archive-readDepsFromObj :: LinkedObj -> IO (Maybe (Deps, DepsLocation))-readDepsFromObj = \case+readBlockInfoFromObj :: LinkedObj -> IO (Maybe LocatedBlockInfo)+readBlockInfoFromObj = \case ObjLoaded name obj -> do- let !deps = objDeps obj- pure $ Just (deps,InMemory name obj)+ let !info = objBlockInfo obj+ pure $ Just (LocatedBlockInfo (InMemory name obj) info) ObjFile file -> do- readObjectDeps file >>= \case+ readObjectBlockInfo file >>= \case Nothing -> pure Nothing- Just deps -> pure $ Just (deps,ObjectFile file)+ Just info -> pure $ Just (LocatedBlockInfo (ObjectFile file) info) -- | Embed a JS file into a .o file
+ GHC/StgToJS/Linker/Opt.hs view
@@ -0,0 +1,126 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE MagicHash #-}++-----------------------------------------------------------------------------+-- |+-- Module : GHC.StgToJS.Linker.Opt+-- Copyright : (c) The University of Glasgow 2001+-- License : BSD-style (see the file LICENSE)+--+-- Maintainer : Jeffrey Young <jeffrey.young@iohk.io>+-- Luite Stegeman <luite.stegeman@iohk.io>+-- Sylvain Henry <sylvain.henry@iohk.io>+-- Stability : experimental+--+-- Optimization pass at link time+--+--+--+-----------------------------------------------------------------------------+module GHC.StgToJS.Linker.Opt+ ( pretty+ , optRenderJs+ )+where++import GHC.Prelude+import GHC.Int+import GHC.Exts++import GHC.JS.Syntax+import GHC.JS.Ppr++import GHC.Utils.Outputable+import GHC.Data.FastString+import GHC.Types.Unique.Map++import Data.List (sortOn)+import Data.Char (isAlpha,isDigit,ord)+import qualified Data.ByteString.Short as SBS++pretty :: JsRender doc => Bool -> JStat -> doc+pretty render_pretty = \case+ BlockStat [] -> empty+ s | render_pretty -> jsToDocR defaultRenderJs [s]+ | otherwise -> jsToDocR optRenderJs [s]+ -- render as a list of statements to ensure that+ -- semicolons are added.++-- | Render JS with code size minimization enabled+optRenderJs :: RenderJs doc+optRenderJs = defaultRenderJs+ { renderJsV = ghcjsRenderJsV+ , renderJsS = ghcjsRenderJsS+ , renderJsI = ghcjsRenderJsI+ }++hdd :: SBS.ShortByteString+hdd = SBS.pack (map (fromIntegral . ord) "h$$")++ghcjsRenderJsI :: IsLine doc => RenderJs doc -> Ident -> doc+ghcjsRenderJsI _ (TxtI fs)+ -- Fresh symbols are prefixed with "h$$". They aren't explicitly referred by+ -- name in user code, only in compiled code. Hence we can rename them if we do+ -- it consistently in all the linked code.+ --+ -- These symbols are usually very large because their name includes the+ -- unit-id, the module name, and some unique number. So we rename these+ -- symbols with a much shorter globally unique number.+ --+ -- Here we reuse their FastString unique for this purpose! Note that it only+ -- works if we pretty-print all the JS code linked together at once, which we+ -- currently do. GHCJS used to maintain a CompactorState to support+ -- incremental linking: it contained the mapping between original symbols and+ -- their renaming.+ | hdd `SBS.isPrefixOf` fastStringToShortByteString fs+ , u <- uniqueOfFS fs+ = text "h$$" <> hexDoc (fromIntegral u)+ | otherwise+ = ftext fs++-- | Render as an hexadecimal number in reversed order (because it's faster and we+-- don't care about the actual value).+hexDoc :: IsLine doc => Word -> doc+hexDoc 0 = char '0'+hexDoc v = text $ go v+ where+ sym (I# i) = C# (indexCharOffAddr# chars i)+ chars = "0123456789abcdef"#+ go = \case+ 0 -> []+ n -> sym (fromIntegral (n .&. 0x0F))+ : sym (fromIntegral ((n .&. 0xF0) `shiftR` 4))+ : go (n `shiftR` 8)+++++-- attempt to resugar some of the common constructs+ghcjsRenderJsS :: JsRender doc => RenderJs doc -> JStat -> doc+ghcjsRenderJsS r s = renderJsS defaultRenderJs r s++-- don't quote keys in our object literals, so closure compiler works+ghcjsRenderJsV :: JsRender doc => RenderJs doc -> JVal -> doc+ghcjsRenderJsV r (JHash m)+ | isNullUniqMap m = text "{}"+ | otherwise = braceNest . fsep . punctuate comma .+ map (\(x,y) -> quoteIfRequired x <> colon <+> jsToDocR r y)+ -- nonDetEltsUniqMap doesn't introduce non-determinism here because+ -- we sort the elements lexically+ . sortOn (LexicalFastString . fst) $ nonDetUniqMapToList m+ where+ quoteIfRequired :: IsLine doc => FastString -> doc+ quoteIfRequired x+ | isUnquotedKey x = ftext x+ | otherwise = char '\'' <> ftext x <> char '\''++ isUnquotedKey :: FastString -> Bool+ isUnquotedKey fs = case unpackFS fs of+ [] -> False+ s@(c:cs) -> all isDigit s || (validFirstIdent c && all validOtherIdent cs)++ validFirstIdent c = c == '_' || c == '$' || isAlpha c+ validOtherIdent c = isAlpha c || isDigit c++ghcjsRenderJsV r v = renderJsV defaultRenderJs r v
GHC/StgToJS/Linker/Types.hs view
@@ -2,8 +2,6 @@ {-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE LambdaCase #-} -{-# OPTIONS_GHC -Wno-orphans #-} -- for Ident's Binary instance- ----------------------------------------------------------------------------- -- | -- Module : GHC.StgToJS.Linker.Types@@ -19,26 +17,21 @@ ----------------------------------------------------------------------------- module GHC.StgToJS.Linker.Types- ( GhcjsEnv (..)- , newGhcjsEnv- , JSLinkConfig (..)+ ( JSLinkConfig (..) , defaultJSLinkConfig- , generateAllJs , LinkedObj (..)- , LinkableUnit+ , LinkPlan (..) ) where import GHC.StgToJS.Object import GHC.Unit.Types-import GHC.Utils.Outputable (hsep,Outputable(..),text,ppr)+import GHC.Utils.Outputable (hsep,Outputable(..),text,ppr, hang, IsDoc (vcat), IsLine (hcat)) import Data.Map.Strict (Map)-import qualified Data.Map.Strict as M import Data.Set (Set)--import Control.Concurrent.MVar+import qualified Data.Set as S import System.IO @@ -49,35 +42,53 @@ -------------------------------------------------------------------------------- data JSLinkConfig = JSLinkConfig- { lcNoJSExecutables :: Bool- , lcNoHsMain :: Bool- , lcOnlyOut :: Bool- , lcNoRts :: Bool- , lcNoStats :: Bool+ { lcNoJSExecutables :: !Bool -- ^ Dont' build JS executables+ , lcNoHsMain :: !Bool -- ^ Don't generate Haskell main entry+ , lcNoRts :: !Bool -- ^ Don't dump the generated RTS+ , lcNoStats :: !Bool -- ^ Disable .stats file generation+ , lcForeignRefs :: !Bool -- ^ Dump .frefs (foreign references) files+ , lcCombineAll :: !Bool -- ^ Generate all.js (combined js) + wrappers } --- | we generate a runnable all.js only if we link a complete application,--- no incremental linking and no skipped parts-generateAllJs :: JSLinkConfig -> Bool-generateAllJs s = not (lcOnlyOut s) && not (lcNoRts s)-+-- | Default linker configuration defaultJSLinkConfig :: JSLinkConfig defaultJSLinkConfig = JSLinkConfig { lcNoJSExecutables = False , lcNoHsMain = False- , lcOnlyOut = False , lcNoRts = False , lcNoStats = False+ , lcCombineAll = True+ , lcForeignRefs = True } +data LinkPlan = LinkPlan+ { lkp_block_info :: Map Module LocatedBlockInfo+ -- ^ Block information++ , lkp_dep_blocks :: Set BlockRef+ -- ^ Blocks to link++ , lkp_archives :: Set FilePath+ -- ^ Archives to load JS sources from++ , lkp_extra_js :: Set FilePath+ -- ^ Extra JS files to link+ }++instance Outputable LinkPlan where+ ppr s = hang (text "LinkPlan") 2 $ vcat+ -- Hidden because it's too verbose and it's not really part of the+ -- plan, just meta info used to retrieve actual block contents+ -- [ hcat [ text "Block info: ", ppr (lkp_block_info s)]+ [ hcat [ text "Blocks: ", ppr (S.size (lkp_dep_blocks s))]+ , hang (text "JS files from archives:") 2 (vcat (fmap text (S.toList (lkp_archives s))))+ , hang (text "Extra JS:") 2 (vcat (fmap text (S.toList (lkp_extra_js s))))+ ]+ -------------------------------------------------------------------------------- -- Linker Environment -------------------------------------------------------------------------------- --- | A @LinkableUnit@ is a pair of a module and the index of the block in the--- object file-type LinkableUnit = (Module, Int)- -- | An object file that's either already in memory (with name) or on disk data LinkedObj = ObjFile FilePath -- ^ load from this file@@ -87,15 +98,3 @@ ppr = \case ObjFile fp -> hsep [text "ObjFile", text fp] ObjLoaded s o -> hsep [text "ObjLoaded", text s, ppr (objModuleName o)]--data GhcjsEnv = GhcjsEnv- { linkerArchiveDeps :: MVar (Map (Set FilePath)- (Map Module (Deps, DepsLocation)- , [LinkableUnit]- )- )- }---- | return a fresh @GhcjsEnv@-newGhcjsEnv :: IO GhcjsEnv-newGhcjsEnv = GhcjsEnv <$> newMVar M.empty
GHC/StgToJS/Linker/Utils.hs view
@@ -41,6 +41,7 @@ import Prelude import GHC.Platform+import GHC.Utils.Misc import Data.List (isPrefixOf) import System.IO import Data.Char (isSpace)@@ -303,7 +304,7 @@ parseJsOptions :: String -> [JSOption] parseJsOptions xs = go xs where- trim = reverse . dropWhile isSpace . reverse . dropWhile isSpace+ trim = dropWhileEndLE isSpace . dropWhile isSpace go [] = [] go xs = let (tok, rest) = break (== ',') xs tok' = trim tok
GHC/StgToJS/Literal.hs view
@@ -9,7 +9,7 @@ import GHC.Prelude -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.JS.Make import GHC.StgToJS.Types@@ -20,7 +20,6 @@ import GHC.Data.FastString import GHC.Types.Literal import GHC.Types.Basic-import GHC.Types.RepType import GHC.Utils.Misc import GHC.Utils.Panic import GHC.Utils.Outputable@@ -93,26 +92,7 @@ LitDouble r -> return [ DoubleLit . SaneDouble . r2d $ r ] LitLabel name _size fod -> return [ LabelLit (fod == IsFunction) (mkRawSymbol True name) , IntLit 0 ]- LitRubbish _ rep ->- let prim_reps = runtimeRepPrimRep (text "GHC.StgToJS.Literal.genStaticLit") rep- in case expectOnly "GHC.StgToJS.Literal.genStaticLit" prim_reps of -- Note [Post-unarisation invariants]- LiftedRep -> pure [ NullLit ]- UnliftedRep -> pure [ NullLit ]- VoidRep -> pure [ ]- AddrRep -> pure [ NullLit, IntLit 0 ]- IntRep -> pure [ IntLit 0 ]- Int8Rep -> pure [ IntLit 0 ]- Int16Rep -> pure [ IntLit 0 ]- Int32Rep -> pure [ IntLit 0 ]- Int64Rep -> pure [ IntLit 0, IntLit 0 ]- WordRep -> pure [ IntLit 0 ]- Word8Rep -> pure [ IntLit 0 ]- Word16Rep -> pure [ IntLit 0 ]- Word32Rep -> pure [ IntLit 0 ]- Word64Rep -> pure [ IntLit 0, IntLit 0 ]- FloatRep -> pure [ DoubleLit (SaneDouble 0) ]- DoubleRep -> pure [ DoubleLit (SaneDouble 0) ]- VecRep {} -> pprPanic "GHC.StgToJS.Literal.genStaticLit: LitRubbish(VecRep) isn't supported" (ppr rep)+ l -> pprPanic "genStaticLit" (ppr l) -- make an unsigned 32 bit number from this unsigned one, lower 32 bits toU32Expr :: Integer -> JExpr
GHC/StgToJS/Monad.hs view
@@ -24,7 +24,8 @@ import GHC.Prelude -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax+import qualified GHC.JS.Syntax as Sat import GHC.JS.Transform import GHC.StgToJS.Types@@ -160,7 +161,7 @@ -- | Return number of occurrences of every global id used in the given JStat. -- Sort by increasing occurrence count.-globalOccs :: JStat -> G [GlobalOcc]+globalOccs :: Sat.JStat -> G [GlobalOcc] globalOccs jst = do GlobalIdCache gidc <- getGlobalIdCache -- build a map form Ident Unique to (Ident, Id, Count)
GHC/StgToJS/Object.hs view
@@ -46,14 +46,20 @@ , getObjectBody , getObject , readObject- , getObjectUnits- , readObjectUnits- , readObjectDeps- , isGlobalUnit+ , getObjectBlocks+ , readObjectBlocks+ , readObjectBlockInfo+ , isGlobalBlock , isJsObjectFile , Object(..) , IndexEntry(..)- , Deps (..), BlockDeps (..), DepsLocation (..)+ , LocatedBlockInfo (..)+ , BlockInfo (..)+ , BlockDeps (..)+ , BlockLocation (..)+ , BlockId+ , BlockIds+ , BlockRef (..) , ExportedFun (..) ) where@@ -77,7 +83,8 @@ import GHC.Settings.Constants (hiVersion) -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax+import qualified GHC.JS.Syntax as Sat import GHC.StgToJS.Types import GHC.Unit.Module@@ -85,7 +92,6 @@ import GHC.Data.FastString import GHC.Types.Unique.Map-import GHC.Float (castDoubleToWord64, castWord64ToDouble) import GHC.Utils.Binary hiding (SymbolTable) import GHC.Utils.Outputable (ppr, Outputable, hcat, vcat, text, hsep)@@ -96,63 +102,75 @@ { objModuleName :: !ModuleName -- ^ name of the module , objHandle :: !BinHandle- -- ^ BinHandle that can be used to read the ObjUnits- , objPayloadOffset :: !(Bin ObjUnit)+ -- ^ BinHandle that can be used to read the ObjBlocks+ , objPayloadOffset :: !(Bin ObjBlock) -- ^ Offset of the payload (units)- , objDeps :: !Deps- -- ^ Dependencies+ , objBlockInfo :: !BlockInfo+ -- ^ Information about blocks , objIndex :: !Index- -- ^ The Index, serialed unit indices and their linkable units+ -- ^ Block index: symbols per block and block offset in the object file } type BlockId = Int type BlockIds = IntSet --- | dependencies for a single module-data Deps = Deps- { depsModule :: !Module- -- ^ module- , depsRequired :: !BlockIds+-- | Information about blocks (linkable units)+data BlockInfo = BlockInfo+ { bi_module :: !Module+ -- ^ Module they were generated from+ , bi_must_link :: !BlockIds -- ^ blocks that always need to be linked when this object is loaded (e.g. -- everything that contains initializer code or foreign exports)- , depsHaskellExported :: !(Map ExportedFun BlockId)+ , bi_exports :: !(Map ExportedFun BlockId) -- ^ exported Haskell functions -> block- , depsBlocks :: !(Array BlockId BlockDeps)- -- ^ info about each block+ , bi_block_deps :: !(Array BlockId BlockDeps)+ -- ^ dependencies of each block } -instance Outputable Deps where+data LocatedBlockInfo = LocatedBlockInfo+ { lbi_loc :: !BlockLocation -- ^ Where to find the blocks+ , lbi_info :: !BlockInfo -- ^ Block information+ }++instance Outputable BlockInfo where ppr d = vcat- [ hcat [ text "module: ", pprModule (depsModule d) ]- , hcat [ text "exports: ", ppr (M.keys (depsHaskellExported d)) ]+ [ hcat [ text "module: ", pprModule (bi_module d) ]+ , hcat [ text "exports: ", ppr (M.keys (bi_exports d)) ] ] --- | Where are the dependencies-data DepsLocation+-- | Where are the blocks+data BlockLocation = ObjectFile FilePath -- ^ In an object file at path | ArchiveFile FilePath -- ^ In a Ar file at path | InMemory String Object -- ^ In memory -instance Outputable DepsLocation where+instance Outputable BlockLocation where ppr = \case ObjectFile fp -> hsep [text "ObjectFile", text fp] ArchiveFile fp -> hsep [text "ArchiveFile", text fp] InMemory s o -> hsep [text "InMemory", text s, ppr (objModuleName o)] +-- | A @BlockRef@ is a pair of a module and the index of the block in the+-- object file+data BlockRef = BlockRef+ { block_ref_mod :: !Module -- ^ Module+ , block_ref_idx :: !BlockId -- ^ Block index in the object file+ }+ deriving (Eq,Ord)+ data BlockDeps = BlockDeps- { blockBlockDeps :: [Int] -- ^ dependencies on blocks in this object+ { blockBlockDeps :: [BlockId] -- ^ dependencies on blocks in this object , blockFunDeps :: [ExportedFun] -- ^ dependencies on exported symbols in other objects -- , blockForeignExported :: [ExpFun] -- , blockForeignImported :: [ForeignRef] } -{- | we use the convention that the first unit (0) is a module-global- unit that's always included when something from the module- is loaded. everything in a module implicitly depends on the- global block. the global unit itself can't have dependencies- -}-isGlobalUnit :: Int -> Bool-isGlobalUnit n = n == 0+-- | we use the convention that the first block (0) is a module-global block+-- that's always included when something from the module is loaded. everything+-- in a module implicitly depends on the global block. The global block itself+-- can't have dependencies+isGlobalBlock :: BlockId -> Bool+isGlobalBlock n = n == 0 -- | Exported Functions data ExportedFun = ExportedFun@@ -166,10 +184,10 @@ , hcat [ text "symbol: ", ppr f ] ] --- | Write an ObjUnit, except for the top level symbols which are stored in the+-- | Write an ObjBlock, except for the top level symbols which are stored in the -- index-putObjUnit :: BinHandle -> ObjUnit -> IO ()-putObjUnit bh (ObjUnit _syms b c d e f g) = do+putObjBlock :: BinHandle -> ObjBlock -> IO ()+putObjBlock bh (ObjBlock _syms b c d e f g) = do put_ bh b put_ bh c lazyPut bh d@@ -177,17 +195,17 @@ put_ bh f put_ bh g --- | Read an ObjUnit and associate it to the given symbols (that must have been+-- | Read an ObjBlock and associate it to the given symbols (that must have been -- read from the index)-getObjUnit :: [FastString] -> BinHandle -> IO ObjUnit-getObjUnit syms bh = do+getObjBlock :: [FastString] -> BinHandle -> IO ObjBlock+getObjBlock syms bh = do b <- get bh c <- get bh d <- lazyGet bh e <- get bh f <- get bh g <- get bh- pure $ ObjUnit+ pure $ ObjBlock { oiSymbols = syms , oiClInfo = b , oiStatic = c@@ -203,12 +221,12 @@ magic :: String magic = "GHCJSOBJ" --- | Serialized unit indexes and their exported symbols--- (the first unit is module-global)+-- | Serialized block indexes and their exported symbols+-- (the first block is module-global) type Index = [IndexEntry] data IndexEntry = IndexEntry- { idxSymbols :: ![FastString] -- ^ Symbols exported by a unit- , idxOffset :: !(Bin ObjUnit) -- ^ Offset of the unit in the object file+ { idxSymbols :: ![FastString] -- ^ Symbols exported by a block+ , idxOffset :: !(Bin ObjBlock) -- ^ Offset of the block in the object file } @@ -221,8 +239,8 @@ putObject :: BinHandle -> ModuleName -- ^ module- -> Deps -- ^ dependencies- -> [ObjUnit] -- ^ linkable units and their symbols+ -> BlockInfo -- ^ block infos+ -> [ObjBlock] -- ^ linkable units and their symbols -> IO () putObject bh mod_name deps os = do forM_ magic (putByte bh . fromIntegral . ord)@@ -243,7 +261,7 @@ idx <- forM os $ \o -> do p <- tellBin bh_fs -- write units without their symbols- putObjUnit bh_fs o+ putObjBlock bh_fs o -- return symbols and offset to store in the index pure (oiSymbols o,p) pure idx@@ -295,15 +313,15 @@ dict <- forwardGet bh0 (getDictionary bh0) let bh = setUserData bh0 $ noUserData { ud_get_fs = getDictFastString dict } - deps <- get bh- idx <- forwardGet bh (get bh)+ block_info <- get bh+ idx <- forwardGet bh (get bh) payload_pos <- tellBin bh pure $ Object { objModuleName = mod_name , objHandle = bh , objPayloadOffset = payload_pos- , objDeps = deps+ , objBlockInfo = block_info , objIndex = idx } @@ -322,31 +340,31 @@ bh <- readBinMem file getObject bh --- | Reads only the part necessary to get the dependencies-readObjectDeps :: FilePath -> IO (Maybe Deps)-readObjectDeps file = do+-- | Reads only the part necessary to get the block info+readObjectBlockInfo :: FilePath -> IO (Maybe BlockInfo)+readObjectBlockInfo file = do bh <- readBinMem file getObject bh >>= \case- Just obj -> pure $! Just $! objDeps obj+ Just obj -> pure $! Just $! objBlockInfo obj Nothing -> pure Nothing --- | Get units in the object file, using the given filtering function-getObjectUnits :: Object -> (Word -> IndexEntry -> Bool) -> IO [ObjUnit]-getObjectUnits obj pred = mapMaybeM read_entry (zip (objIndex obj) [0..])+-- | Get blocks in the object file, using the given filtering function+getObjectBlocks :: Object -> BlockIds -> IO [ObjBlock]+getObjectBlocks obj bids = mapMaybeM read_entry (zip (objIndex obj) [0..]) where bh = objHandle obj- read_entry (e@(IndexEntry syms offset),i)- | pred i e = do+ read_entry (IndexEntry syms offset,i)+ | IS.member i bids = do seekBin bh offset- Just <$> getObjUnit syms bh+ Just <$> getObjBlock syms bh | otherwise = pure Nothing --- | Read units in the object file, using the given filtering function-readObjectUnits :: FilePath -> (Word -> IndexEntry -> Bool) -> IO [ObjUnit]-readObjectUnits file pred = do+-- | Read blocks in the object file, using the given filtering function+readObjectBlocks :: FilePath -> BlockIds -> IO [ObjBlock]+readObjectBlocks file bids = do readObject file >>= \case Nothing -> pure []- Just obj -> getObjectUnits obj pred+ Just obj -> getObjectBlocks obj bids --------------------------------------------------------------------------------@@ -378,13 +396,13 @@ put_ bh (IndexEntry a b) = put_ bh a >> put_ bh b get bh = IndexEntry <$> get bh <*> get bh -instance Binary Deps where- put_ bh (Deps m r e b) = do+instance Binary BlockInfo where+ put_ bh (BlockInfo m r e b) = do put_ bh m put_ bh (map toI32 $ IS.toList r) put_ bh (map (\(x,y) -> (x, toI32 y)) $ M.toList e) put_ bh (elems b)- get bh = Deps <$> get bh+ get bh = BlockInfo <$> get bh <*> (IS.fromList . map fromI32 <$> get bh) <*> (M.fromList . map (\(x,y) -> (x, fromI32 y)) <$> get bh) <*> ((\xs -> listArray (0, length xs - 1) xs) <$> get bh)@@ -402,99 +420,86 @@ put_ bh (ExpFun isIO args res) = put_ bh isIO >> put_ bh args >> put_ bh res get bh = ExpFun <$> get bh <*> get bh <*> get bh -instance Binary JStat where- put_ bh (DeclStat i e) = putByte bh 1 >> put_ bh i >> put_ bh e- put_ bh (ReturnStat e) = putByte bh 2 >> put_ bh e- put_ bh (IfStat e s1 s2) = putByte bh 3 >> put_ bh e >> put_ bh s1 >> put_ bh s2- put_ bh (WhileStat b e s) = putByte bh 4 >> put_ bh b >> put_ bh e >> put_ bh s- put_ bh (ForInStat b i e s) = putByte bh 5 >> put_ bh b >> put_ bh i >> put_ bh e >> put_ bh s- put_ bh (SwitchStat e ss s) = putByte bh 6 >> put_ bh e >> put_ bh ss >> put_ bh s- put_ bh (TryStat s1 i s2 s3) = putByte bh 7 >> put_ bh s1 >> put_ bh i >> put_ bh s2 >> put_ bh s3- put_ bh (BlockStat xs) = putByte bh 8 >> put_ bh xs- put_ bh (ApplStat e es) = putByte bh 9 >> put_ bh e >> put_ bh es- put_ bh (UOpStat o e) = putByte bh 10 >> put_ bh o >> put_ bh e- put_ bh (AssignStat e1 e2) = putByte bh 11 >> put_ bh e1 >> put_ bh e2- put_ _ (UnsatBlock {}) = error "put_ bh JStat: UnsatBlock"- put_ bh (LabelStat l s) = putByte bh 12 >> put_ bh l >> put_ bh s- put_ bh (BreakStat ml) = putByte bh 13 >> put_ bh ml- put_ bh (ContinueStat ml) = putByte bh 14 >> put_ bh ml+instance Binary Sat.JStat where+ put_ bh (Sat.DeclStat i e) = putByte bh 1 >> put_ bh i >> put_ bh e+ put_ bh (Sat.ReturnStat e) = putByte bh 2 >> put_ bh e+ put_ bh (Sat.IfStat e s1 s2) = putByte bh 3 >> put_ bh e >> put_ bh s1 >> put_ bh s2+ put_ bh (Sat.WhileStat b e s) = putByte bh 4 >> put_ bh b >> put_ bh e >> put_ bh s+ put_ bh (Sat.ForStat is c s bd) = putByte bh 5 >> put_ bh is >> put_ bh c >> put_ bh s >> put_ bh bd+ put_ bh (Sat.ForInStat b i e s) = putByte bh 6 >> put_ bh b >> put_ bh i >> put_ bh e >> put_ bh s+ put_ bh (Sat.SwitchStat e ss s) = putByte bh 7 >> put_ bh e >> put_ bh ss >> put_ bh s+ put_ bh (Sat.TryStat s1 i s2 s3) = putByte bh 8 >> put_ bh s1 >> put_ bh i >> put_ bh s2 >> put_ bh s3+ put_ bh (Sat.BlockStat xs) = putByte bh 9 >> put_ bh xs+ put_ bh (Sat.ApplStat e es) = putByte bh 10 >> put_ bh e >> put_ bh es+ put_ bh (Sat.UOpStat o e) = putByte bh 11 >> put_ bh o >> put_ bh e+ put_ bh (Sat.AssignStat e1 op e2) = putByte bh 12 >> put_ bh e1 >> put_ bh op >> put_ bh e2+ put_ bh (Sat.LabelStat l s) = putByte bh 13 >> put_ bh l >> put_ bh s+ put_ bh (Sat.BreakStat ml) = putByte bh 14 >> put_ bh ml+ put_ bh (Sat.ContinueStat ml) = putByte bh 15 >> put_ bh ml+ put_ bh (Sat.FuncStat i is b) = putByte bh 16 >> put_ bh i >> put_ bh is >> put_ bh b get bh = getByte bh >>= \case- 1 -> DeclStat <$> get bh <*> get bh- 2 -> ReturnStat <$> get bh- 3 -> IfStat <$> get bh <*> get bh <*> get bh- 4 -> WhileStat <$> get bh <*> get bh <*> get bh- 5 -> ForInStat <$> get bh <*> get bh <*> get bh <*> get bh- 6 -> SwitchStat <$> get bh <*> get bh <*> get bh- 7 -> TryStat <$> get bh <*> get bh <*> get bh <*> get bh- 8 -> BlockStat <$> get bh- 9 -> ApplStat <$> get bh <*> get bh- 10 -> UOpStat <$> get bh <*> get bh- 11 -> AssignStat <$> get bh <*> get bh- 12 -> LabelStat <$> get bh <*> get bh- 13 -> BreakStat <$> get bh- 14 -> ContinueStat <$> get bh+ 1 -> Sat.DeclStat <$> get bh <*> get bh+ 2 -> Sat.ReturnStat <$> get bh+ 3 -> Sat.IfStat <$> get bh <*> get bh <*> get bh+ 4 -> Sat.WhileStat <$> get bh <*> get bh <*> get bh+ 5 -> Sat.ForStat <$> get bh <*> get bh <*> get bh <*> get bh+ 6 -> Sat.ForInStat <$> get bh <*> get bh <*> get bh <*> get bh+ 7 -> Sat.SwitchStat <$> get bh <*> get bh <*> get bh+ 8 -> Sat.TryStat <$> get bh <*> get bh <*> get bh <*> get bh+ 9 -> Sat.BlockStat <$> get bh+ 10 -> Sat.ApplStat <$> get bh <*> get bh+ 11 -> Sat.UOpStat <$> get bh <*> get bh+ 12 -> Sat.AssignStat <$> get bh <*> get bh <*> get bh+ 13 -> Sat.LabelStat <$> get bh <*> get bh+ 14 -> Sat.BreakStat <$> get bh+ 15 -> Sat.ContinueStat <$> get bh+ 16 -> Sat.FuncStat <$> get bh <*> get bh <*> get bh n -> error ("Binary get bh JStat: invalid tag: " ++ show n) -instance Binary JExpr where- put_ bh (ValExpr v) = putByte bh 1 >> put_ bh v- put_ bh (SelExpr e i) = putByte bh 2 >> put_ bh e >> put_ bh i- put_ bh (IdxExpr e1 e2) = putByte bh 3 >> put_ bh e1 >> put_ bh e2- put_ bh (InfixExpr o e1 e2) = putByte bh 4 >> put_ bh o >> put_ bh e1 >> put_ bh e2- put_ bh (UOpExpr o e) = putByte bh 5 >> put_ bh o >> put_ bh e- put_ bh (IfExpr e1 e2 e3) = putByte bh 6 >> put_ bh e1 >> put_ bh e2 >> put_ bh e3- put_ bh (ApplExpr e es) = putByte bh 7 >> put_ bh e >> put_ bh es- put_ _ (UnsatExpr {}) = error "put_ bh JExpr: UnsatExpr"++instance Binary Sat.JExpr where+ put_ bh (Sat.ValExpr v) = putByte bh 1 >> put_ bh v+ put_ bh (Sat.SelExpr e i) = putByte bh 2 >> put_ bh e >> put_ bh i+ put_ bh (Sat.IdxExpr e1 e2) = putByte bh 3 >> put_ bh e1 >> put_ bh e2+ put_ bh (Sat.InfixExpr o e1 e2) = putByte bh 4 >> put_ bh o >> put_ bh e1 >> put_ bh e2+ put_ bh (Sat.UOpExpr o e) = putByte bh 5 >> put_ bh o >> put_ bh e+ put_ bh (Sat.IfExpr e1 e2 e3) = putByte bh 6 >> put_ bh e1 >> put_ bh e2 >> put_ bh e3+ put_ bh (Sat.ApplExpr e es) = putByte bh 7 >> put_ bh e >> put_ bh es get bh = getByte bh >>= \case- 1 -> ValExpr <$> get bh- 2 -> SelExpr <$> get bh <*> get bh- 3 -> IdxExpr <$> get bh <*> get bh- 4 -> InfixExpr <$> get bh <*> get bh <*> get bh- 5 -> UOpExpr <$> get bh <*> get bh- 6 -> IfExpr <$> get bh <*> get bh <*> get bh- 7 -> ApplExpr <$> get bh <*> get bh- n -> error ("Binary get bh JExpr: invalid tag: " ++ show n)+ 1 -> Sat.ValExpr <$> get bh+ 2 -> Sat.SelExpr <$> get bh <*> get bh+ 3 -> Sat.IdxExpr <$> get bh <*> get bh+ 4 -> Sat.InfixExpr <$> get bh <*> get bh <*> get bh+ 5 -> Sat.UOpExpr <$> get bh <*> get bh+ 6 -> Sat.IfExpr <$> get bh <*> get bh <*> get bh+ 7 -> Sat.ApplExpr <$> get bh <*> get bh+ n -> error ("Binary get bh UnsatExpr: invalid tag: " ++ show n) -instance Binary JVal where- put_ bh (JVar i) = putByte bh 1 >> put_ bh i- put_ bh (JList es) = putByte bh 2 >> put_ bh es- put_ bh (JDouble d) = putByte bh 3 >> put_ bh d- put_ bh (JInt i) = putByte bh 4 >> put_ bh i- put_ bh (JStr xs) = putByte bh 5 >> put_ bh xs- put_ bh (JRegEx xs) = putByte bh 6 >> put_ bh xs- put_ bh (JHash m) = putByte bh 7 >> put_ bh (sortOn (LexicalFastString . fst) $ nonDetEltsUniqMap m)- put_ bh (JFunc is s) = putByte bh 8 >> put_ bh is >> put_ bh s- put_ _ (UnsatVal {}) = error "put_ bh JVal: UnsatVal"++instance Binary Sat.JVal where+ put_ bh (Sat.JVar i) = putByte bh 1 >> put_ bh i+ put_ bh (Sat.JList es) = putByte bh 2 >> put_ bh es+ put_ bh (Sat.JDouble d) = putByte bh 3 >> put_ bh d+ put_ bh (Sat.JInt i) = putByte bh 4 >> put_ bh i+ put_ bh (Sat.JStr xs) = putByte bh 5 >> put_ bh xs+ put_ bh (Sat.JRegEx xs) = putByte bh 6 >> put_ bh xs+ put_ bh (Sat.JHash m) = putByte bh 7 >> put_ bh (sortOn (LexicalFastString . fst) $ nonDetUniqMapToList m)+ put_ bh (Sat.JFunc is s) = putByte bh 8 >> put_ bh is >> put_ bh s get bh = getByte bh >>= \case- 1 -> JVar <$> get bh- 2 -> JList <$> get bh- 3 -> JDouble <$> get bh- 4 -> JInt <$> get bh- 5 -> JStr <$> get bh- 6 -> JRegEx <$> get bh- 7 -> JHash . listToUniqMap <$> get bh- 8 -> JFunc <$> get bh <*> get bh- n -> error ("Binary get bh JVal: invalid tag: " ++ show n)+ 1 -> Sat.JVar <$> get bh+ 2 -> Sat.JList <$> get bh+ 3 -> Sat.JDouble <$> get bh+ 4 -> Sat.JInt <$> get bh+ 5 -> Sat.JStr <$> get bh+ 6 -> Sat.JRegEx <$> get bh+ 7 -> Sat.JHash . listToUniqMap <$> get bh+ 8 -> Sat.JFunc <$> get bh <*> get bh+ n -> error ("Binary get bh Sat.JVal: invalid tag: " ++ show n) instance Binary Ident where put_ bh (TxtI xs) = put_ bh xs get bh = TxtI <$> get bh --- we need to preserve NaN and infinities, unfortunately the Binary instance for Double does not do this-instance Binary SaneDouble where- put_ bh (SaneDouble d)- | isNaN d = putByte bh 1- | isInfinite d && d > 0 = putByte bh 2- | isInfinite d && d < 0 = putByte bh 3- | isNegativeZero d = putByte bh 4- | otherwise = putByte bh 5 >> put_ bh (castDoubleToWord64 d)- get bh = getByte bh >>= \case- 1 -> pure $ SaneDouble (0 / 0)- 2 -> pure $ SaneDouble (1 / 0)- 3 -> pure $ SaneDouble ((-1) / 0)- 4 -> pure $ SaneDouble (-0)- 5 -> SaneDouble . castWord64ToDouble <$> get bh- n -> error ("Binary get bh SaneDouble: invalid tag: " ++ show n)- instance Binary ClosureInfo where put_ bh (ClosureInfo v regs name layo typ static) = do put_ bh v >> put_ bh regs >> put_ bh name >> put_ bh layo >> put_ bh typ >> put_ bh static@@ -516,11 +521,15 @@ 2 -> CIRegs <$> get bh <*> get bh n -> error ("Binary get bh CIRegs: invalid tag: " ++ show n) -instance Binary JOp where+instance Binary Sat.Op where put_ bh = putEnum bh get bh = getEnum bh -instance Binary JUOp where+instance Binary Sat.UOp where+ put_ bh = putEnum bh+ get bh = getEnum bh++instance Binary Sat.AOp where put_ bh = putEnum bh get bh = getEnum bh
GHC/StgToJS/Prim.hs view
@@ -13,7 +13,7 @@ import GHC.Prelude -import GHC.JS.Syntax hiding (JUOp (..))+import GHC.JS.Unsat.Syntax hiding (JUOp (..)) import GHC.JS.Make import GHC.StgToJS.Heap@@ -56,9 +56,12 @@ ------------------------------ Int ---------------------------------------------- +-- N.B. See Note [StgToJS design] in GHC.StgToJS for details on+-- number representation.+ IntAddOp -> \[r] [x,y] -> PrimInline $ r |= toI32 (Add x y) IntSubOp -> \[r] [x,y] -> PrimInline $ r |= toI32 (Sub x y)- IntMulOp -> \[r] [x,y] -> PrimInline $ r |= app "h$mulInt32" [x, y]+ IntMulOp -> \[r] [x,y] -> PrimInline $ r |= app "Math.imul" [x, y] IntMul2Op -> \[c,hr,lr] [x,y] -> PrimInline $ appT [c,hr,lr] "h$hs_timesInt2" [x, y] IntMulMayOfloOp -> \[r] [x,y] -> PrimInline $ jVar \tmp -> mconcat [ tmp |= Mul x y@@ -373,7 +376,7 @@ ] WordAdd2Op -> \[h,l] [x,y] -> PrimInline $ appT [h,l] "h$wordAdd2" [x,y] WordSubOp -> \ [r] [x,y] -> PrimInline $ r |= toU32 (Sub x y)- WordMulOp -> \ [r] [x,y] -> PrimInline $ r |= app "h$mulWord32" [x, y]+ WordMulOp -> \ [r] [x,y] -> PrimInline $ r |= toU32 (app "Math.imul" [x, y]) WordMul2Op -> \[h,l] [x,y] -> PrimInline $ appT [h,l] "h$mul2Word32" [x,y] WordQuotOp -> \ [q] [x,y] -> PrimInline $ q |= app "h$quotWord32" [x,y] WordRemOp -> \ [r] [x,y] -> PrimInline $ r |= app "h$remWord32" [x,y]@@ -488,6 +491,11 @@ DoubleDecode_2IntOp -> \[s,h,l,e] [x] -> PrimInline $ appT [s,h,l,e] "h$decodeDouble2Int" [x] DoubleDecode_Int64Op -> \[s1,s2,e] [d] -> PrimInline $ appT [e,s1,s2] "h$decodeDoubleInt64" [d] + DoubleFMAdd -> unhandledPrimop op+ DoubleFMSub -> unhandledPrimop op+ DoubleFNMAdd -> unhandledPrimop op+ DoubleFNMSub -> unhandledPrimop op+ ------------------------------ Float -------------------------------------------- FloatGtOp -> \[r] [x,y] -> PrimInline $ r |= if10 (x .>. y)@@ -524,6 +532,11 @@ FloatToDoubleOp -> \[r] [x] -> PrimInline $ r |= x FloatDecode_IntOp -> \[s,e] [x] -> PrimInline $ appT [s,e] "h$decodeFloatInt" [x] + FloatFMAdd -> unhandledPrimop op+ FloatFMSub -> unhandledPrimop op+ FloatFNMAdd -> unhandledPrimop op+ FloatFNMSub -> unhandledPrimop op+ ------------------------------ Arrays ------------------------------------------- NewArrayOp -> \[r] [l,e] -> PrimInline $ r |= app "h$newArray" [l,e]@@ -704,15 +717,19 @@ CopyByteArrayOp -> \[] [a1,o1,a2,o2,n] -> copyByteArray False bound a1 o1 a2 o2 n CopyAddrToByteArrayOp -> \[] [a1,o1,a2,o2,n] -> copyByteArray False bound a1 o1 a2 o2 n CopyMutableByteArrayToAddrOp -> \[] [a1,o1,a2,o2,n] -> copyByteArray False bound a1 o1 a2 o2 n+ CopyMutableByteArrayNonOverlappingOp -> \[] [a1,o1,a2,o2,n] -> copyByteArray False bound a1 o1 a2 o2 n+ CopyAddrToAddrNonOverlappingOp -> \[] [a1,o1,a2,o2,n] -> copyByteArray False bound a1 o1 a2 o2 n CopyByteArrayToAddrOp -> \[] [a1,o1,a2,o2,n] -> copyByteArray False bound a1 o1 a2 o2 n CopyMutableByteArrayOp -> \[] [a1,o1,a2,o2,n] -> copyByteArray True bound a1 o1 a2 o2 n+ CopyAddrToAddrOp -> \[] [a1,o1,a2,o2,n] -> copyByteArray True bound a1 o1 a2 o2 n SetByteArrayOp -> \[] [a,o,n,v] -> PrimInline . bnd_ba_range bound a o n $ loopBlockS zero_ (.<. n) \i -> [ write_u8 a (Add o i) v , postIncrS i ]+ SetAddrRangeOp -> \[] xs@[_a,_o,_n,_v] -> genPrim prof bound ty SetByteArrayOp [] xs AtomicReadByteArrayOp_Int -> \[r] [a,i] -> PrimInline $ bnd_ix32 bound a i $ r |= read_i32 a i AtomicWriteByteArrayOp_Int -> \[] [a,i,v] -> PrimInline $ bnd_ix32 bound a i $ write_i32 a i v@@ -797,6 +814,8 @@ AtomicModifyMutVar2Op -> \[r1,r2] [m,f] -> PrimInline $ appT [r1,r2] "h$atomicModifyMutVar2" [m,f] AtomicModifyMutVar_Op -> \[r1,r2] [m,f] -> PrimInline $ appT [r1,r2] "h$atomicModifyMutVar" [m,f] + AtomicSwapMutVarOp -> \[r] [mv,v] -> PrimInline $ mconcat+ [ r |= mv .^ "val", mv .^ "val" |= v ] CasMutVarOp -> \[status,r] [mv,o,n] -> PrimInline $ ifS (mv .^ "val" .===. o) (mconcat [status |= zero_, r |= n, mv .^ "val" |= n]) (mconcat [status |= one_ , r |= mv .^ "val"])
− GHC/StgToJS/Printer.hs
@@ -1,218 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE MagicHash #-}---------------------------------------------------------------------------------- |--- Module : GHC.StgToJS.Printer--- Copyright : (c) The University of Glasgow 2001--- License : BSD-style (see the file LICENSE)------ Maintainer : Jeffrey Young <jeffrey.young@iohk.io>--- Luite Stegeman <luite.stegeman@iohk.io>--- Sylvain Henry <sylvain.henry@iohk.io>--- Stability : experimental------ Custom prettyprinter for JS AST uses the JS PPr module for most of--- the work-------------------------------------------------------------------------------------module GHC.StgToJS.Printer- ( pretty- , ghcjsRenderJs- , prettyBlock- )-where--import GHC.Prelude-import GHC.Int-import GHC.Exts--import GHC.JS.Syntax-import GHC.JS.Ppr--import GHC.Utils.Ppr as PP-import GHC.Data.FastString-import GHC.Types.Unique.Map--import Data.List (sortOn)-import Data.Char (isAlpha,isDigit,ord)-import qualified Data.ByteString.Short as SBS--pretty :: JStat -> Doc-pretty = jsToDocR ghcjsRenderJs--ghcjsRenderJs :: RenderJs-ghcjsRenderJs = defaultRenderJs- { renderJsV = ghcjsRenderJsV- , renderJsS = ghcjsRenderJsS- , renderJsI = ghcjsRenderJsI- }--hdd :: SBS.ShortByteString-hdd = SBS.pack (map (fromIntegral . ord) "h$$")--ghcjsRenderJsI :: RenderJs -> Ident -> Doc-ghcjsRenderJsI _ (TxtI fs)- -- Fresh symbols are prefixed with "h$$". They aren't explicitly referred by- -- name in user code, only in compiled code. Hence we can rename them if we do- -- it consistently in all the linked code.- --- -- These symbols are usually very large because their name includes the- -- unit-id, the module name, and some unique number. So we rename these- -- symbols with a much shorter globally unique number.- --- -- Here we reuse their FastString unique for this purpose! Note that it only- -- works if we pretty-print all the JS code linked together at once, which we- -- currently do. GHCJS used to maintain a CompactorState to support- -- incremental linking: it contained the mapping between original symbols and- -- their renaming.- | hdd `SBS.isPrefixOf` fastStringToShortByteString fs- , u <- uniqueOfFS fs- = text "h$$" <> hexDoc (fromIntegral u)- | otherwise- = ftext fs---- | Render as an hexadecimal number in reversed order (because it's faster and we--- don't care about the actual value).-hexDoc :: Word -> Doc-hexDoc 0 = char '0'-hexDoc v = text $ go v- where- sym (I# i) = C# (indexCharOffAddr# chars i)- chars = "0123456789abcdef"#- go = \case- 0 -> []- n -> sym (fromIntegral (n .&. 0x0F))- : sym (fromIntegral ((n .&. 0xF0) `shiftR` 4))- : go (n `shiftR` 8)------- attempt to resugar some of the common constructs-ghcjsRenderJsS :: RenderJs -> JStat -> Doc-ghcjsRenderJsS r (BlockStat xs) = prettyBlock r (flattenBlocks xs)-ghcjsRenderJsS r s = renderJsS defaultRenderJs r s---- don't quote keys in our object literals, so closure compiler works-ghcjsRenderJsV :: RenderJs -> JVal -> Doc-ghcjsRenderJsV r (JHash m)- | isNullUniqMap m = text "{}"- | otherwise = braceNest . PP.fsep . punctuate comma .- map (\(x,y) -> quoteIfRequired x <> PP.colon <+> jsToDocR r y)- -- nonDetEltsUniqMap doesn't introduce non-determinism here because- -- we sort the elements lexically- . sortOn (LexicalFastString . fst) $ nonDetEltsUniqMap m- where- quoteIfRequired :: FastString -> Doc- quoteIfRequired x- | isUnquotedKey x' = text x'- | otherwise = PP.squotes (text x')- where x' = unpackFS x-- isUnquotedKey :: String -> Bool- isUnquotedKey x | null x = False- | all isDigit x = True- | otherwise = validFirstIdent (head x)- && all validOtherIdent (tail x)--- validFirstIdent c = c == '_' || c == '$' || isAlpha c- validOtherIdent c = isAlpha c || isDigit c-ghcjsRenderJsV r v = renderJsV defaultRenderJs r v--prettyBlock :: RenderJs -> [JStat] -> Doc-prettyBlock r xs = vcat $ map addSemi (prettyBlock' r xs)---- recognize common patterns in a block and convert them to more idiomatic/concise javascript-prettyBlock' :: RenderJs -> [JStat] -> [Doc]--- return/...-prettyBlock' r ( x@(ReturnStat _)- : xs- )- | not (null xs)- = prettyBlock' r [x]--- declare/assign-prettyBlock' r ( (DeclStat i Nothing)- : (AssignStat (ValExpr (JVar i')) v)- : xs- )- | i == i'- = prettyBlock' r (DeclStat i (Just v) : xs)---- resugar for loops with/without var declaration-prettyBlock' r ( (DeclStat i (Just v0))- : (WhileStat False p (BlockStat bs))- : xs- )- | not (null flat) && isForUpdStat (last flat)- = mkFor r True i v0 p (last flat) (init flat) : prettyBlock' r xs- where- flat = flattenBlocks bs-prettyBlock' r ( (AssignStat (ValExpr (JVar i)) v0)- : (WhileStat False p (BlockStat bs))- : xs- )- | not (null flat) && isForUpdStat (last flat)- = mkFor r False i v0 p (last flat) (init flat) : prettyBlock' r xs- where- flat = flattenBlocks bs---- global function (does not preserve semantics but works for GHCJS)-prettyBlock' r ( (DeclStat i (Just (ValExpr (JFunc is b))))- : xs- )- = (hangBrace (text "function" <+> jsToDocR r i <> parens (fsep . punctuate comma . map (jsToDocR r) $ is))- (jsToDocR r b)- ) : prettyBlock' r xs--- modify/assign operators-prettyBlock' r ( (AssignStat (ValExpr (JVar i)) (InfixExpr AddOp (ValExpr (JVar i')) (ValExpr (JInt 1))))- : xs- )- | i == i' = (text "++" <> jsToDocR r i) : prettyBlock' r xs-prettyBlock' r ( (AssignStat (ValExpr (JVar i)) (InfixExpr SubOp (ValExpr (JVar i')) (ValExpr (JInt 1))))- : xs- )- | i == i' = (text "--" <> jsToDocR r i) : prettyBlock' r xs-prettyBlock' r ( (AssignStat (ValExpr (JVar i)) (InfixExpr AddOp (ValExpr (JVar i')) e))- : xs- )- | i == i' = (jsToDocR r i <+> text "+=" <+> jsToDocR r e) : prettyBlock' r xs-prettyBlock' r ( (AssignStat (ValExpr (JVar i)) (InfixExpr SubOp (ValExpr (JVar i')) e))- : xs- )- | i == i' = (jsToDocR r i <+> text "-=" <+> jsToDocR r e) : prettyBlock' r xs---prettyBlock' r (x:xs) = jsToDocR r x : prettyBlock' r xs-prettyBlock' _ [] = []---- build the for block-mkFor :: RenderJs -> Bool -> Ident -> JExpr -> JExpr -> JStat -> [JStat] -> Doc-mkFor r decl i v0 p s1 sb = hangBrace (text "for" <> forCond)- (jsToDocR r $ BlockStat sb)- where- c0 | decl = text "var" <+> jsToDocR r i <+> char '=' <+> jsToDocR r v0- | otherwise = jsToDocR r i <+> char '=' <+> jsToDocR r v0- forCond = parens $ hcat $ interSemi- [ c0- , jsToDocR r p- , parens (jsToDocR r s1)- ]---- check if a statement is suitable to be converted to something in the for(;;x) position-isForUpdStat :: JStat -> Bool-isForUpdStat UOpStat {} = True-isForUpdStat AssignStat {} = True-isForUpdStat ApplStat {} = True-isForUpdStat _ = False--interSemi :: [Doc] -> [Doc]-interSemi [] = [PP.empty]-interSemi [s] = [s]-interSemi (x:xs) = x <> text ";" : interSemi xs--addSemi :: Doc -> Doc-addSemi x = x <> text ";"
GHC/StgToJS/Profiling.hs view
@@ -26,7 +26,7 @@ import GHC.Prelude -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.JS.Make import GHC.StgToJS.Regs
GHC/StgToJS/Regs.hs view
@@ -21,7 +21,7 @@ import GHC.Prelude -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.JS.Make import GHC.Data.FastString
GHC/StgToJS/Rts/Rts.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE OverloadedStrings #-}--{-# OPTIONS_GHC -O0 #-}+{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE BlockArguments #-} ----------------------------------------------------------------------------- -- |@@ -23,18 +23,23 @@ -- ----------------------------------------------------------------------------- -module GHC.StgToJS.Rts.Rts where+module GHC.StgToJS.Rts.Rts+ ( rts+ , assignRegs+ )+where import GHC.Prelude -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.JS.Make import GHC.JS.Transform+import GHC.JS.Optimizer+import qualified GHC.JS.Syntax as Sat import GHC.StgToJS.Apply import GHC.StgToJS.Closure import GHC.StgToJS.Heap-import GHC.StgToJS.Printer import GHC.StgToJS.Profiling import GHC.StgToJS.Regs import GHC.StgToJS.Types@@ -51,8 +56,8 @@ -- | The garbageCollector resets registers and result variables. garbageCollector :: JStat garbageCollector =- mconcat [ TxtI "h$resetRegisters" ||= jLam (mconcat $ map resetRegister [minBound..maxBound])- , TxtI "h$resetResultVars" ||= jLam (mconcat $ map resetResultVar [minBound..maxBound])+ mconcat [ jFun (TxtI "h$resetRegisters") (mconcat $ map resetRegister [minBound..maxBound])+ , jFun (TxtI "h$resetResultVars") (mconcat $ map resetResultVar [minBound..maxBound]) ] -- | Reset the register 'r' in JS Land. Note that this "resets" by setting the@@ -81,36 +86,8 @@ -- JIT can optimize better. closureConstructors :: StgToJSConfig -> JStat closureConstructors s = BlockStat- [ declClsConstr "h$c" ["f"] $ Closure- { clEntry = var "f"- , clField1 = null_- , clField2 = null_- , clMeta = 0- , clCC = ccVal- }- , declClsConstr "h$c0" ["f"] $ Closure- { clEntry = var "f"- , clField1 = null_- , clField2 = null_- , clMeta = 0- , clCC = ccVal- }- , declClsConstr "h$c1" ["f", "x1"] $ Closure- { clEntry = var "f"- , clField1 = var "x1"- , clField2 = null_- , clMeta = 0- , clCC = ccVal- }- , declClsConstr "h$c2" ["f", "x1", "x2"] $ Closure- { clEntry = var "f"- , clField1 = var "x1"- , clField2 = var "x2"- , clMeta = 0- , clCC = ccVal- }- , mconcat (map mkClosureCon [3..24])- , mconcat (map mkDataFill [1..24])+ [ mconcat (map mkClosureCon (Nothing : map Just [0..jsClosureCount]))+ , mconcat (map mkDataFill [1..jsClosureCount]) ] where prof = csProf s@@ -118,19 +95,8 @@ -- the cc argument happens to be named just like the cc field... | prof = ([TxtI closureCC_], Just (var closureCC_)) | otherwise = ([], Nothing)- addCCArg as = map TxtI as ++ ccArg addCCArg' as = as ++ ccArg - declClsConstr i as cl = TxtI i ||= ValExpr (JFunc (addCCArg as)- ( jVar $ \x ->- [ checkC- , x |= newClosure cl- , notifyAlloc x- , traceAlloc x- , returnS x- ]- ))- traceAlloc x | csTraceRts s = appS "h$traceAlloc" [x] | otherwise = mempty @@ -172,41 +138,35 @@ | otherwise = mempty - mkClosureCon :: Int -> JStat- mkClosureCon n = funName ||= toJExpr fun+ mkClosureCon :: Maybe Int -> JStat+ mkClosureCon n0 = jFunction funName args funBod where- funName = TxtI $ mkFastString ("h$c" ++ show n)+ n | Just n' <- n0 = n'+ | Nothing <- n0 = 0+ funName | Just n' <- n0 = TxtI $ clsName n'+ | Nothing <- n0 = TxtI $ mkFastString "h$c" -- args are: f x1 x2 .. xn [cc]- args = TxtI "f" : addCCArg' (map (TxtI . mkFastString . ('x':) . show) [(1::Int)..n])- fun = JFunc args funBod+ args = TxtI "f" : addCCArg' (map varName [1..n]) -- x1 goes into closureField1. All the other args are bundled into an -- object in closureField2: { d1 = x2, d2 = x3, ... } --- extra_args = ValExpr . JHash . listToUniqMap $ zip- (map (mkFastString . ('d':) . show) [(1::Int)..])- (map (toJExpr . TxtI . mkFastString . ('x':) . show) [2..n])+ vars = map (toJExpr . varName) [1..n] funBod = jVar $ \x -> [ checkC- , x |= newClosure Closure- { clEntry = var "f"- , clField1 = var "x1"- , clField2 = extra_args- , clMeta = 0- , clCC = ccVal- }+ , x |= newClosure (mkClosure (var "f") vars 0 ccVal) , notifyAlloc x , traceAlloc x , returnS x ] mkDataFill :: Int -> JStat- mkDataFill n = funName ||= toJExpr fun+ mkDataFill n = jFunction funName (map TxtI ds) body where- funName = TxtI $ mkFastString ("h$d" ++ show n)- ds = map (mkFastString . ('d':) . show) [(1::Int)..n]+ funName = TxtI $ dataName n+ ds = map dataFieldName [1..n] extra_args = ValExpr . JHash . listToUniqMap . zip ds $ map (toJExpr . TxtI) ds- fun = JFunc (map TxtI ds) (checkD <> returnS extra_args)+ body = (checkD <> returnS extra_args) -- | JS Payload to perform stack manipulation in the RTS stackManip :: JStat@@ -215,11 +175,11 @@ where mkPush :: Int -> JStat mkPush n = let funName = TxtI $ mkFastString ("h$p" ++ show n)- as = map (TxtI . mkFastString . ('x':) . show) [1..n]- fun = JFunc as ((sp |= sp + toJExpr n)- <> mconcat (zipWith (\i a -> stack .! (sp - toJExpr (n-i)) |= toJExpr a)- [1..] as))- in funName ||= toJExpr fun+ as = map varName [1..n]+ body = ((sp |= sp + toJExpr n)+ <> mconcat (zipWith (\i a -> stack .! (sp - toJExpr (n-i)) |= toJExpr a)+ [1..] as))+ in jFunction funName as body -- partial pushes, based on bitmap, increases Sp by highest bit mkPpush :: Integer -> JStat@@ -228,12 +188,11 @@ bits = bitsIdx sig n = length bits h = last bits- args = map (TxtI . mkFastString . ('x':) . show) [1..n]- fun = JFunc args $- mconcat [ sp |= sp + toJExpr (h+1)- , mconcat (zipWith (\b a -> stack .! (sp - toJExpr (h-b)) |= toJExpr a) bits args)- ]- in funName ||= toJExpr fun+ args = map varName [1..n]+ body = mconcat [ sp |= sp + toJExpr (h+1)+ , mconcat (zipWith (\b a -> stack .! (sp - toJExpr (h-b)) |= toJExpr a) bits args)+ ]+ in jFunction funName args body bitsIdx :: Integer -> [Int] bitsIdx n | n < 0 = error "bitsIdx: negative"@@ -274,8 +233,8 @@ -- | JS payload to define getters and setters on the registers. regGettersSetters :: JStat regGettersSetters =- mconcat [ TxtI "h$getReg" ||= jLam (\n -> SwitchStat n getRegCases mempty)- , TxtI "h$setReg" ||= jLam (\n v -> SwitchStat n (setRegCases v) mempty)+ mconcat [ jFun (TxtI "h$getReg") (\n -> SwitchStat n getRegCases mempty)+ , jFun (TxtI "h$setReg") (\n v -> SwitchStat n (setRegCases v) mempty) ] where getRegCases =@@ -288,12 +247,12 @@ loadRegs = mconcat $ map mkLoad [1..32] where mkLoad :: Int -> JStat- mkLoad n = let args = map (TxtI . mkFastString . ("x"++) . show) [1..n]- assign = zipWith (\a r -> toJExpr r |= toJExpr a)- args (reverse $ take n regsFromR1)- fname = TxtI $ mkFastString ("h$l" ++ show n)- fun = JFunc args (mconcat assign)- in fname ||= toJExpr fun+ mkLoad n = let args = map varName [1..n]+ body = mconcat $+ zipWith (\a r -> toJExpr r |= toJExpr a)+ args (reverse $ take n regsFromR1)+ fname = TxtI $ mkFastString ("h$l" ++ show n)+ in jFunction fname args body -- | Assign registers R1 ... Rn in descending order, that is assign Rn first. -- This function uses the 'assignRegs'' array to construct functions which set@@ -333,17 +292,16 @@ mkClosureType c = let s = TxtI . mkFastString $ "h$" ++ map toUpper (show c) ++ "_CLOSURE" in s ||= toJExpr c closureTypeName :: JStat- closureTypeName =- TxtI "h$closureTypeName" ||= jLam (\c ->- mconcat (map (ifCT c) [minBound..maxBound])- <> returnS (jString "InvalidClosureType"))+ closureTypeName = jFun (TxtI "h$closureTypeName") \c ->+ mconcat (map (ifCT c) [minBound..maxBound])+ <> returnS (jString "InvalidClosureType") ifCT :: JExpr -> ClosureType -> JStat ifCT arg ct = jwhenS (arg .===. toJExpr ct) (returnS (toJExpr (show ct))) -- | JS payload declaring the RTS functions. rtsDecls :: JStat-rtsDecls = jsSaturate (Just "h$RTSD") $+rtsDecls = mconcat [ TxtI "h$currentThread" ||= null_ -- thread state object for current thread , TxtI "h$stack" ||= null_ -- stack for the current thread , TxtI "h$sp" ||= 0 -- stack pointer for the current thread@@ -356,17 +314,12 @@ , declRegs , declRets] --- | print the embedded RTS to a String-rtsText :: StgToJSConfig -> String-rtsText = show . pretty . rts---- | print the RTS declarations to a String.-rtsDeclsText :: String-rtsDeclsText = show . pretty $ rtsDecls---- | Wrapper over the RTS to guarentee saturation, see 'GHC.JS.Transform'-rts :: StgToJSConfig -> JStat-rts = jsSaturate (Just "h$RTS") . rts'+-- | Generated RTS code+rts :: StgToJSConfig -> Sat.JStat+rts cfg = jsOptimize $ satJStat (Just "h$RTS") $ mconcat+ [ rtsDecls+ , rts' cfg+ ] -- | JS Payload which defines the embedded RTS. rts' :: StgToJSConfig -> JStat@@ -387,11 +340,10 @@ , TxtI "h$vt_double" ||= toJExpr IntV , TxtI "h$vt_long" ||= toJExpr LongV , TxtI "h$vt_addr" ||= toJExpr AddrV- , TxtI "h$vt_rtsobj" ||= toJExpr RtsObjV , TxtI "h$vt_obj" ||= toJExpr ObjV , TxtI "h$vt_arr" ||= toJExpr ArrV- , TxtI "h$bh" ||= jLam (bhStats s True)- , TxtI "h$bh_lne" ||= jLam (\x frameSize -> bhLneStats s x frameSize)+ , jFun (TxtI "h$bh") (bhStats s True)+ , jFun (TxtI "h$bh_lne") (\x frameSize -> bhLneStats s x frameSize) , closure (ClosureInfo (TxtI "h$blackhole") (CIRegs 0 []) "blackhole" (CILayoutUnknown 2) CIBlackhole mempty) (appS "throw" [jString "oops: entered black hole"]) , closure (ClosureInfo (TxtI "h$blackholeTrap") (CIRegs 0 []) "blackhole" (CILayoutUnknown 2) CIThunk mempty)
GHC/StgToJS/Rts/Types.hs view
@@ -22,7 +22,7 @@ import GHC.Prelude import GHC.JS.Make-import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.StgToJS.Regs import GHC.StgToJS.Types
GHC/StgToJS/Sinker.hs view
@@ -15,7 +15,7 @@ import GHC.Types.Literal import GHC.Data.Graph.Directed -import GHC.StgToJS.CoreUtils+import GHC.StgToJS.Utils import Data.Char import Data.Either@@ -64,11 +64,11 @@ alwaysSinkable :: CgStgBinding -> [(Id, CgStgExpr)] alwaysSinkable (StgRec {}) = [] alwaysSinkable (StgNonRec b rhs) = case rhs of- StgRhsClosure _ _ _ _ e@(StgLit l)+ StgRhsClosure _ _ _ _ e@(StgLit l) _ | isSmallSinkableLit l , isLocal b -> [(b,e)]- StgRhsCon _ccs dc cnum _ticks as@[StgLitArg l]+ StgRhsCon _ccs dc cnum _ticks as@[StgLitArg l] _typ | isSmallSinkableLit l , isLocal b , isUnboxableCon dc@@ -88,9 +88,9 @@ , isLocal b = [(b,e)] where getSinkable = \case- StgRhsCon _ccs dc cnum _ticks args -> Just (StgConApp dc cnum args [])- StgRhsClosure _ _ _ _ e@(StgLit{}) -> Just e- _ -> Nothing+ StgRhsCon _ccs dc cnum _ticks args _typ -> Just (StgConApp dc cnum args [])+ StgRhsClosure _ _ _ _ e@(StgLit{}) _typ -> Just e+ _ -> Nothing onceSinkable _ _ = [] -- | collect all idents used only once in an argument at the top level@@ -115,8 +115,8 @@ collectArgsTopRhs :: CgStgRhs -> [Id] collectArgsTopRhs = \case- StgRhsCon _ccs _dc _mu _ticks args -> concatMap collectArgsA args- StgRhsClosure {} -> []+ StgRhsCon _ccs _dc _mu _ticks args _typ -> concatMap collectArgsA args+ StgRhsClosure {} -> [] -- | fold over all Id in StgArg in the AST collectArgs :: CgStgBinding -> [Id]@@ -126,8 +126,8 @@ collectArgsR :: CgStgRhs -> [Id] collectArgsR = \case- StgRhsClosure _x0 _x1 _x2 _x3 e -> collectArgsE e- StgRhsCon _ccs _con _mu _ticks args -> concatMap collectArgsA args+ StgRhsClosure _x0 _x1 _x2 _x3 e _typ -> collectArgsE e+ StgRhsCon _ccs _con _mu _ticks args _typ -> concatMap collectArgsA args collectArgsAlt :: CgStgAlt -> [Id] collectArgsAlt alt = collectArgsE (alt_rhs alt)@@ -171,7 +171,7 @@ keys = mkUniqSet (map node_key vs) getV e@(StgNonRec b _) = DigraphNode e b [] getV _ = error "topSortDecls: getV, unexpected binding"- collectDeps (StgNonRec b (StgRhsCon _cc _dc _cnum _ticks args)) =+ collectDeps (StgNonRec b (StgRhsCon _cc _dc _cnum _ticks args _typ)) = [ (i, b) | StgVarArg i <- args, i `elementOfUniqSet` keys ] collectDeps _ = [] g = graphFromVerticesAndAdjacency vs (concatMap collectDeps nr)
GHC/StgToJS/Stack.hs view
@@ -66,7 +66,7 @@ import GHC.Prelude -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.JS.Make import GHC.StgToJS.Types
GHC/StgToJS/StaticPtr.hs view
@@ -10,7 +10,7 @@ import GHC.Fingerprint.Type import GHC.Types.Literal -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.JS.Make import GHC.StgToJS.Types
− GHC/StgToJS/StgUtils.hs
@@ -1,266 +0,0 @@-{-# LANGUAGE LambdaCase #-}--module GHC.StgToJS.StgUtils- ( bindingRefs- , hasExport- , collectTopIds- , collectIds- , removeTick- , isUpdatableRhs- , isInlineExpr- , exprRefs- -- * Live vars- , LiveVars- , liveVars- , liveStatic- , stgRhsLive- , stgExprLive- , stgTopBindLive- , stgLetNoEscapeLive- , stgLneLiveExpr- , stgLneLive- , stgLneLive'- )-where--import GHC.Prelude--import GHC.Stg.Syntax-import GHC.Core.DataCon-import GHC.Core.Type-import GHC.Core.TyCon--import GHC.Types.Unique.FM-import GHC.Types.Unique.Set-import GHC.Types.Unique-import GHC.Types.Id-import GHC.Types.Id.Info-import GHC.Types.ForeignCall-import GHC.Types.TyThing-import GHC.Types.Name-import GHC.Types.Var.Set--import GHC.Builtin.Names-import GHC.Builtin.PrimOps (PrimOp(SeqOp), primOpIsReallyInline)-import GHC.Utils.Misc (seqList)-import GHC.Utils.Panic--import qualified Data.Foldable as F-import qualified Data.Set as S-import qualified Data.List as L-import Data.Set (Set)-import Data.Monoid--s :: a -> Set a-s = S.singleton--l :: (a -> Set Id) -> [a] -> Set Id-l = F.foldMap---- | collect Ids that this binding refers to--- (does not include the bindees themselves)--- first argument is Id -> StgExpr map for unfloated arguments-bindingRefs :: UniqFM Id CgStgExpr -> CgStgBinding -> Set Id-bindingRefs u = \case- StgNonRec _ rhs -> rhsRefs u rhs- StgRec bs -> l (rhsRefs u . snd) bs--rhsRefs :: UniqFM Id CgStgExpr -> CgStgRhs -> Set Id-rhsRefs u = \case- StgRhsClosure _ _ _ _ body -> exprRefs u body- StgRhsCon _ccs d _mu _ticks args -> l s [ i | AnId i <- dataConImplicitTyThings d] <> l (argRefs u) args--exprRefs :: UniqFM Id CgStgExpr -> CgStgExpr -> Set Id-exprRefs u = \case- StgApp f args -> s f <> l (argRefs u) args- StgConApp d _n args _ -> l s [ i | AnId i <- dataConImplicitTyThings d] <> l (argRefs u) args- StgOpApp _ args _ -> l (argRefs u) args- StgLit {} -> mempty- StgCase expr _ _ alts -> exprRefs u expr <> mconcat (fmap (altRefs u) alts)- StgLet _ bnd expr -> bindingRefs u bnd <> exprRefs u expr- StgLetNoEscape _ bnd expr -> bindingRefs u bnd <> exprRefs u expr- StgTick _ expr -> exprRefs u expr--altRefs :: UniqFM Id CgStgExpr -> CgStgAlt -> Set Id-altRefs u alt = exprRefs u (alt_rhs alt)--argRefs :: UniqFM Id CgStgExpr -> StgArg -> Set Id-argRefs u = \case- StgVarArg id- | Just e <- lookupUFM u id -> exprRefs u e- | otherwise -> s id- _ -> mempty--hasExport :: CgStgBinding -> Bool-hasExport bnd =- case bnd of- StgNonRec b e -> isExportedBind b e- StgRec bs -> any (uncurry isExportedBind) bs- where- isExportedBind _i (StgRhsCon _cc con _ _ _) =- getUnique con == staticPtrDataConKey- isExportedBind _ _ = False--collectTopIds :: CgStgBinding -> [Id]-collectTopIds (StgNonRec b _) = [b]-collectTopIds (StgRec bs) = let xs = map (zapFragileIdInfo . fst) bs- in seqList xs `seq` xs--collectIds :: UniqFM Id CgStgExpr -> CgStgBinding -> [Id]-collectIds unfloated b =- let xs = map zapFragileIdInfo .- filter acceptId $ S.toList (bindingRefs unfloated b)- in seqList xs `seq` xs- where- acceptId i = all ($ i) [not . isForbidden] -- fixme test this: [isExported[isGlobalId, not.isForbidden]- -- the GHC.Prim module has no js source file- isForbidden i- | Just m <- nameModule_maybe (getName i) = m == gHC_PRIM- | otherwise = False--removeTick :: CgStgExpr -> CgStgExpr-removeTick (StgTick _ e) = e-removeTick e = e---------------------------------------------------------- Live vars------ TODO: should probably be moved into GHC.Stg.LiveVars--type LiveVars = DVarSet--liveStatic :: LiveVars -> LiveVars-liveStatic = filterDVarSet isGlobalId--liveVars :: LiveVars -> LiveVars-liveVars = filterDVarSet (not . isGlobalId)--stgTopBindLive :: CgStgTopBinding -> [(Id, LiveVars)]-stgTopBindLive = \case- StgTopLifted b -> stgBindLive b- StgTopStringLit {} -> []--stgBindLive :: CgStgBinding -> [(Id, LiveVars)]-stgBindLive = \case- StgNonRec b rhs -> [(b, stgRhsLive rhs)]- StgRec bs -> map (\(b,rhs) -> (b, stgRhsLive rhs)) bs--stgBindRhsLive :: CgStgBinding -> LiveVars-stgBindRhsLive b =- let (bs, ls) = unzip (stgBindLive b)- in delDVarSetList (unionDVarSets ls) bs--stgRhsLive :: CgStgRhs -> LiveVars-stgRhsLive = \case- StgRhsClosure _ _ _ args e -> delDVarSetList (stgExprLive True e) args- StgRhsCon _ _ _ _ args -> unionDVarSets (map stgArgLive args)--stgArgLive :: StgArg -> LiveVars-stgArgLive = \case- StgVarArg occ -> unitDVarSet occ- StgLitArg {} -> emptyDVarSet--stgExprLive :: Bool -> CgStgExpr -> LiveVars-stgExprLive includeLHS = \case- StgApp occ args -> unionDVarSets (unitDVarSet occ : map stgArgLive args)- StgLit {} -> emptyDVarSet- StgConApp _dc _n args _tys -> unionDVarSets (map stgArgLive args)- StgOpApp _op args _ty -> unionDVarSets (map stgArgLive args)- StgCase e b _at alts- | includeLHS -> el `unionDVarSet` delDVarSet al b- | otherwise -> delDVarSet al b- where- al = unionDVarSets (map stgAltLive alts)- el = stgExprLive True e- StgLet _ b e -> delDVarSetList (stgBindRhsLive b `unionDVarSet` stgExprLive True e) (bindees b)- StgLetNoEscape _ b e -> delDVarSetList (stgBindRhsLive b `unionDVarSet` stgExprLive True e) (bindees b)- StgTick _ti e -> stgExprLive True e--stgAltLive :: CgStgAlt -> LiveVars-stgAltLive alt =- delDVarSetList (stgExprLive True (alt_rhs alt)) (alt_bndrs alt)--stgLetNoEscapeLive :: Bool -> StgBinding -> StgExpr -> LiveVars-stgLetNoEscapeLive _someBool _b _e = panic "stgLetNoEscapeLive"--bindees :: CgStgBinding -> [Id]-bindees = \case- StgNonRec b _e -> [b]- StgRec bs -> map fst bs--isUpdatableRhs :: CgStgRhs -> Bool-isUpdatableRhs (StgRhsClosure _ _ u _ _) = isUpdatable u-isUpdatableRhs _ = False--stgLneLive' :: CgStgBinding -> [Id]-stgLneLive' b = filter (`notElem` bindees b) (stgLneLive b)--stgLneLive :: CgStgBinding -> [Id]-stgLneLive (StgNonRec _b e) = stgLneLiveExpr e-stgLneLive (StgRec bs) = L.nub $ concatMap (stgLneLiveExpr . snd) bs--stgLneLiveExpr :: CgStgRhs -> [Id]-stgLneLiveExpr rhs = dVarSetElems (liveVars $ stgRhsLive rhs)--- stgLneLiveExpr (StgRhsClosure _ _ _ _ e) = dVarSetElems (liveVars (stgExprLive e))--- stgLneLiveExpr StgRhsCon {} = []---- | returns True if the expression is definitely inline-isInlineExpr :: UniqSet Id -> CgStgExpr -> (UniqSet Id, Bool)-isInlineExpr v = \case- StgApp i args- -> (emptyUniqSet, isInlineApp v i args)- StgLit{}- -> (emptyUniqSet, True)- StgConApp{}- -> (emptyUniqSet, True)- StgOpApp (StgFCallOp f _) _ _- -> (emptyUniqSet, isInlineForeignCall f)- StgOpApp (StgPrimOp SeqOp) [StgVarArg e] t- -> (emptyUniqSet, e `elementOfUniqSet` v || isStrictType t)- StgOpApp (StgPrimOp op) _ _- -> (emptyUniqSet, primOpIsReallyInline op)- StgOpApp (StgPrimCallOp _c) _ _- -> (emptyUniqSet, True)- StgCase e b _ alts- ->let (_ve, ie) = isInlineExpr v e- v' = addOneToUniqSet v b- (vas, ias) = unzip $ map (isInlineExpr v') (fmap alt_rhs alts)- vr = L.foldl1' intersectUniqSets vas- in (vr, (ie || b `elementOfUniqSet` v) && and ias)- StgLet _ b e- -> isInlineExpr (inspectInlineBinding v b) e- StgLetNoEscape _ _b e- -> isInlineExpr v e- StgTick _ e- -> isInlineExpr v e--inspectInlineBinding :: UniqSet Id -> CgStgBinding -> UniqSet Id-inspectInlineBinding v = \case- StgNonRec i r -> inspectInlineRhs v i r- StgRec bs -> foldl' (\v' (i,r) -> inspectInlineRhs v' i r) v bs--inspectInlineRhs :: UniqSet Id -> Id -> CgStgRhs -> UniqSet Id-inspectInlineRhs v i = \case- StgRhsCon{} -> addOneToUniqSet v i- StgRhsClosure _ _ ReEntrant _ _ -> addOneToUniqSet v i- _ -> v--isInlineForeignCall :: ForeignCall -> Bool-isInlineForeignCall (CCall (CCallSpec _ cconv safety)) =- not (playInterruptible safety) &&- not (cconv /= JavaScriptCallConv && playSafe safety)--isInlineApp :: UniqSet Id -> Id -> [StgArg] -> Bool-isInlineApp v i = \case- _ | isJoinId i -> False- [] -> isUnboxedTupleType (idType i) ||- isStrictType (idType i) ||- i `elementOfUniqSet` v-- [StgVarArg a]- | DataConWrapId dc <- idDetails i- , isNewTyCon (dataConTyCon dc)- , isStrictType (idType a) || a `elementOfUniqSet` v || isStrictId a- -> True- _ -> False-
GHC/StgToJS/Symbols.hs view
@@ -8,32 +8,23 @@ , mkFreshJsSymbol , mkRawSymbol , intBS- , word64BS ) where import GHC.Prelude import GHC.Data.FastString import GHC.Unit.Module-import GHC.Utils.Word64 (intToWord64) import Data.ByteString (ByteString)-import Data.Word (Word64) import qualified Data.ByteString.Char8 as BSC import qualified Data.ByteString.Builder as BSB import qualified Data.ByteString.Lazy as BSL -- | Hexadecimal representation of an int ----- Used for the sub indices.-intBS :: Int -> ByteString-intBS = word64BS . intToWord64---- | Hexadecimal representation of a 64-bit word--- -- Used for uniques. We could use base-62 as GHC usually does but this is likely -- faster.-word64BS :: Word64 -> ByteString-word64BS = BSL.toStrict . BSB.toLazyByteString . BSB.word64Hex+intBS :: Int -> ByteString+intBS = BSL.toStrict . BSB.toLazyByteString . BSB.wordHex . fromIntegral -- | Return z-encoded unit:module unitModuleStringZ :: Module -> ByteString
GHC/StgToJS/Types.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-}@@ -23,7 +22,8 @@ import GHC.Prelude -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax+import qualified GHC.JS.Syntax as Sat import GHC.JS.Make import GHC.JS.Ppr () @@ -36,7 +36,7 @@ import GHC.Types.ForeignCall import Control.Monad.Trans.State.Strict-import GHC.Utils.Outputable (Outputable (..), text, SDocContext, (<+>), ($$))+import GHC.Utils.Outputable (Outputable (..), text, SDocContext) import GHC.Data.FastString import GHC.Data.FastMutInt@@ -47,10 +47,6 @@ import Data.Set (Set) import qualified Data.ByteString as BS import Data.Monoid-import Data.Typeable (Typeable)-import GHC.Generics (Generic)-import Control.DeepSeq-import Data.Word -- | A State monad over IO holding the generator state. type G = StateT GenState IO@@ -86,6 +82,7 @@ , csInlineLoadRegs :: !Bool , csInlineEnter :: !Bool , csInlineAlloc :: !Bool+ , csPrettyRender :: !Bool , csTraceRts :: !Bool , csAssertRts :: !Bool , csBoundsCheck :: !Bool@@ -106,7 +103,7 @@ , ciType :: CIType -- ^ type of the object, with extra info where required , ciStatic :: CIStatic -- ^ static references of this object }- deriving stock (Eq, Show, Generic)+ deriving stock (Eq, Show) -- | Closure information, 'ClosureInfo', registers data CIRegs@@ -114,9 +111,7 @@ | CIRegs { ciRegsSkip :: Int -- ^ unused registers before actual args start , ciRegsTypes :: [VarType] -- ^ args }- deriving stock (Eq, Ord, Show, Generic)--instance NFData CIRegs+ deriving stock (Eq, Ord, Show) -- | Closure Information, 'ClosureInfo', layout data CILayout@@ -128,9 +123,7 @@ { layoutSize :: !Int -- ^ closure size in array positions, including entry , layout :: [VarType] -- ^ The set of sized Types to layout }- deriving stock (Eq, Ord, Show, Generic)--instance NFData CILayout+ deriving stock (Eq, Ord, Show) -- | The type of 'ClosureInfo' data CIType@@ -142,13 +135,11 @@ | CIPap -- ^ The closure is a Partial Application | CIBlackhole -- ^ The closure is a black hole | CIStackFrame -- ^ The closure is a stack frame- deriving stock (Eq, Ord, Show, Generic)--instance NFData CIType+ deriving stock (Eq, Ord, Show) -- | Static references that must be kept alive newtype CIStatic = CIStaticRefs { staticRefs :: [FastString] }- deriving stock (Eq, Generic)+ deriving stock (Eq) deriving newtype (Semigroup, Monoid, Show) -- | static refs: array = references, null = nothing to report@@ -159,18 +150,16 @@ -- | Free variable types data VarType- = PtrV -- ^ pointer = reference to heap object (closure object)+ = PtrV -- ^ pointer = reference to heap object (closure object), lifted or not.+ -- Can also be some RTS object (e.g. TVar#, MVar#, MutVar#, Weak#) | VoidV -- ^ no fields | DoubleV -- ^ A Double: one field | IntV -- ^ An Int (32bit because JS): one field | LongV -- ^ A Long: two fields one for the upper 32bits, one for the lower (NB: JS is little endian) | AddrV -- ^ a pointer not to the heap: two fields, array + index- | RtsObjV -- ^ some RTS object from GHCJS (for example TVar#, MVar#, MutVar#, Weak#) | ObjV -- ^ some JS object, user supplied, be careful around these, can be anything | ArrV -- ^ boxed array- deriving stock (Eq, Ord, Enum, Bounded, Show, Generic)--instance NFData VarType+ deriving stock (Eq, Ord, Enum, Bounded, Show) instance ToJExpr VarType where toJExpr = toJExpr . fromEnum@@ -201,7 +190,7 @@ -- | Keys to differentiate Ident's in the ID Cache data IdKey- = IdKey !Word64 !Int !IdType+ = IdKey !Int !Int !IdType deriving (Eq, Ord) -- | Some other symbol@@ -230,7 +219,7 @@ { siVar :: !FastString -- ^ global object , siVal :: !StaticVal -- ^ static initialization , siCC :: !(Maybe Ident) -- ^ optional CCS name- } deriving stock (Eq, Show, Typeable, Generic)+ } deriving stock (Eq, Show) data StaticVal = StaticFun !FastString [StaticArg]@@ -244,7 +233,7 @@ -- ^ regular datacon app | StaticList [StaticArg] (Maybe FastString) -- ^ list initializer (with optional tail)- deriving stock (Eq, Show, Generic)+ deriving stock (Eq, Show) data StaticUnboxed = StaticUnboxedBool !Bool@@ -252,9 +241,7 @@ | StaticUnboxedDouble !SaneDouble | StaticUnboxedString !BS.ByteString | StaticUnboxedStringOffset !BS.ByteString- deriving stock (Eq, Ord, Show, Generic)--instance NFData StaticUnboxed+ deriving stock (Eq, Ord, Show) -- | Static Arguments. Static Arguments are things that are statically -- allocated, i.e., they exist at program startup. These are static heap objects@@ -263,7 +250,7 @@ = StaticObjArg !FastString -- ^ reference to a heap object | StaticLitArg !StaticLit -- ^ literal | StaticConArg !FastString [StaticArg] -- ^ unfloated constructor- deriving stock (Eq, Show, Generic)+ deriving stock (Eq, Show) instance Outputable StaticArg where ppr x = text (show x)@@ -277,12 +264,11 @@ | StringLit !FastString | BinLit !BS.ByteString | LabelLit !Bool !FastString -- ^ is function pointer, label (also used for string / binary init)- deriving (Eq, Show, Generic)+ deriving (Eq, Show) instance Outputable StaticLit where ppr x = text (show x) - instance ToJExpr StaticLit where toJExpr (BoolLit b) = toJExpr b toJExpr (IntLit i) = toJExpr i@@ -300,11 +286,11 @@ , foreignRefCConv :: !CCallConv , foreignRefArgs :: ![FastString] , foreignRefResult :: !FastString- } deriving stock (Generic)+ } --- | data used to generate one ObjUnit in our object file+-- | data used to generate one ObjBlock in our object file data LinkableUnit = LinkableUnit- { luObjUnit :: ObjUnit -- ^ serializable unit info+ { luObjBlock :: ObjBlock -- ^ serializable unit info , luIdExports :: [Id] -- ^ exported names from haskell identifiers , luOtherExports :: [FastString] -- ^ other exports , luIdDeps :: [Id] -- ^ identifiers this unit depends on@@ -315,11 +301,11 @@ } -- | one toplevel block in the object file-data ObjUnit = ObjUnit+data ObjBlock = ObjBlock { oiSymbols :: ![FastString] -- ^ toplevel symbols (stored in index) , oiClInfo :: ![ClosureInfo] -- ^ closure information of all closures in block , oiStatic :: ![StaticInfo] -- ^ static closure data- , oiStat :: JStat -- ^ the code+ , oiStat :: Sat.JStat -- ^ the code , oiRaw :: !BS.ByteString -- ^ raw JS code , oiFExports :: ![ExpFun] , oiFImports :: ![ForeignJSRef]@@ -354,16 +340,18 @@ , typex_expr :: [JExpr] } -instance Outputable TypedExpr where- ppr x = text "TypedExpr: " <+> ppr (typex_expr x)- $$ text "PrimReps: " <+> ppr (typex_typ x)+-- FIXME: temporarily removed until JStg replaces JStat+-- instance Outputable TypedExpr where+-- ppr x = text "TypedExpr: " <+> ppr (typex_expr x)+-- $$ text "PrimReps: " <+> ppr (typex_typ x) -- | A Primop result is either an inlining of some JS payload, or a primitive -- call to a JS function defined in Shim files in base. data PrimRes = PrimInline JStat -- ^ primop is inline, result is assigned directly | PRPrimCall JStat -- ^ primop is async call, primop returns the next- -- function to run. result returned to stack top in registers+ -- function to run. result returned to stack top in+ -- registers data ExprResult = ExprCont
GHC/StgToJS/Utils.hs view
@@ -1,27 +1,125 @@ {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE LambdaCase #-} module GHC.StgToJS.Utils ( assignToTypedExprs , assignCoerce1 , assignToExprCtx- )-where+ -- * Core Utils+ , isUnboxableCon+ , isUnboxable+ , SlotCount(..)+ , slotCount+ , varSize+ , varSlotCount+ , typeSize+ , isVoid+ , isPtr+ , isSingleVar+ , isMultiVar+ , isMatchable+ , tyConVt+ , idVt+ , typeVt+ , uTypeVt+ , primRepVt+ , typePrimRep'+ , tyConPrimRep'+ , kindPrimRep'+ , primTypeVt+ , argVt+ , dataConType+ , isBoolDataCon+ , fixedLayout+ , stackSlotType+ , idPrimReps+ , typePrimReps+ , primRepSize+ , assocPrimReps+ , assocIdPrimReps+ , assocIdExprs+ , mkArityTag+ , toTypeList+ -- * Stg Utils+ , bindingRefs+ , rhsRefs+ , exprRefs+ , altRefs+ , argRefs+ , hasExport+ , collectTopIds+ , collectIds+ , removeTick+ , LiveVars+ , liveStatic+ , liveVars+ , stgTopBindLive+ , stgBindLive+ , stgBindRhsLive+ , stgRhsLive+ , stgArgLive+ , stgExprLive+ , stgAltLive+ , stgLetNoEscapeLive+ , bindees+ , isUpdatableRhs+ , stgLneLive+ , stgLneLive'+ , stgLneLiveExpr+ , isInlineExpr+ , inspectInlineBinding+ , inspectInlineRhs+ , isInlineForeignCall+ , isInlineApp+ ) where import GHC.Prelude import GHC.StgToJS.Types import GHC.StgToJS.ExprCtx -import GHC.JS.Syntax+import GHC.JS.Unsat.Syntax import GHC.JS.Make+import GHC.JS.Transform +import GHC.Core.DataCon+import GHC.Core.TyCo.Rep hiding (typeSize) import GHC.Core.TyCon+import GHC.Core.Type hiding (typeSize) +import GHC.Stg.Syntax++import GHC.Tc.Utils.TcType++import GHC.Builtin.Types+import GHC.Builtin.Types.Prim+import GHC.Builtin.Names+import GHC.Builtin.PrimOps (PrimOp(SeqOp), primOpIsReallyInline)++import GHC.Types.RepType+import GHC.Types.Var+import GHC.Types.Var.Set+import GHC.Types.Id+import GHC.Types.Id.Info+import GHC.Types.Unique.FM+import GHC.Types.Unique.Set+import GHC.Types.ForeignCall+import GHC.Types.TyThing+import GHC.Types.Name+ import GHC.Utils.Misc+import GHC.Utils.Outputable hiding ((<>)) import GHC.Utils.Panic-import GHC.Utils.Outputable -assignToTypedExprs :: HasDebugCallStack => [TypedExpr] -> [JExpr] -> JStat+import qualified Data.Bits as Bits+import qualified Data.Foldable as F+import qualified Data.Set as S+import qualified Data.List as L+import Data.Set (Set)+import Data.Monoid+++assignToTypedExprs :: [TypedExpr] -> [JExpr] -> JStat assignToTypedExprs tes es = assignAllEqual (concatMap typex_expr tes) es @@ -30,28 +128,487 @@ -- TODO: check primRep (typex_typ) here? assignToTypedExprs tes (concatMap typex_expr es) -assignToExprCtx :: HasDebugCallStack => ExprCtx -> [JExpr] -> JStat+assignToExprCtx :: ExprCtx -> [JExpr] -> JStat assignToExprCtx ctx es = assignToTypedExprs (ctxTarget ctx) es -- | Assign first expr only (if it exists), performing coercions between some -- PrimReps (e.g. StablePtr# and Addr#).-assignCoerce1 :: HasDebugCallStack => [TypedExpr] -> [TypedExpr] -> JStat+assignCoerce1 :: [TypedExpr] -> [TypedExpr] -> JStat assignCoerce1 [x] [y] = assignCoerce x y assignCoerce1 [] [] = mempty-assignCoerce1 x y = pprPanic "assignCoerce1"+assignCoerce1 _x _y = pprPanic "assignCoerce1" (vcat [ text "lengths do not match"- , ppr x- , ppr y+ -- FIXME: Outputable instance removed until JStg replaces JStat+ -- , ppr x+ -- , ppr y ]) -- | Assign p2 to p1 with optional coercion assignCoerce :: TypedExpr -> TypedExpr -> JStat -- Coercion between StablePtr# and Addr#-assignCoerce (TypedExpr AddrRep [a_val, a_off]) (TypedExpr UnliftedRep [sptr]) = mconcat+assignCoerce (TypedExpr AddrRep [a_val, a_off]) (TypedExpr (BoxedRep (Just Unlifted)) [sptr]) = mconcat [ a_val |= var "h$stablePtrBuf" , a_off |= sptr ]-assignCoerce (TypedExpr UnliftedRep [sptr]) (TypedExpr AddrRep [_a_val, a_off]) =+assignCoerce (TypedExpr (BoxedRep (Just Unlifted)) [sptr]) (TypedExpr AddrRep [_a_val, a_off]) = sptr |= a_off assignCoerce p1 p2 = assignTypedExprs [p1] [p2] ++--------------------------------------------------------------------------------+-- Core Utils+--------------------------------------------------------------------------------++-- | can we unbox C x to x, only if x is represented as a Number+isUnboxableCon :: DataCon -> Bool+isUnboxableCon dc+ | [t] <- dataConRepArgTys dc+ , [t1] <- typeVt (scaledThing t)+ = isUnboxable t1 &&+ dataConTag dc == 1 &&+ length (tyConDataCons $ dataConTyCon dc) == 1+ | otherwise = False++-- | one-constructor types with one primitive field represented as a JS Number+-- can be unboxed+isUnboxable :: VarType -> Bool+isUnboxable DoubleV = True+isUnboxable IntV = True -- includes Char#+isUnboxable _ = False++-- | Number of slots occupied by a PrimRep+data SlotCount+ = NoSlot+ | OneSlot+ | TwoSlots+ deriving (Show,Eq,Ord)++instance Outputable SlotCount where+ ppr = text . show++-- | Return SlotCount as an Int+slotCount :: SlotCount -> Int+slotCount = \case+ NoSlot -> 0+ OneSlot -> 1+ TwoSlots -> 2+++-- | Number of slots occupied by a value with the given VarType+varSize :: VarType -> Int+varSize = slotCount . varSlotCount++varSlotCount :: VarType -> SlotCount+varSlotCount VoidV = NoSlot+varSlotCount LongV = TwoSlots -- hi, low+varSlotCount AddrV = TwoSlots -- obj/array, offset+varSlotCount _ = OneSlot++typeSize :: Type -> Int+typeSize t = sum . map varSize . typeVt $ t++isVoid :: VarType -> Bool+isVoid VoidV = True+isVoid _ = False++isPtr :: VarType -> Bool+isPtr PtrV = True+isPtr _ = False++isSingleVar :: VarType -> Bool+isSingleVar v = varSlotCount v == OneSlot++isMultiVar :: VarType -> Bool+isMultiVar v = case varSlotCount v of+ NoSlot -> False+ OneSlot -> False+ TwoSlots -> True++-- | can we pattern match on these values in a case?+isMatchable :: [VarType] -> Bool+isMatchable [DoubleV] = True+isMatchable [IntV] = True+isMatchable _ = False++tyConVt :: HasDebugCallStack => TyCon -> [VarType]+tyConVt = typeVt . mkTyConTy++idVt :: HasDebugCallStack => Id -> [VarType]+idVt = typeVt . idType++typeVt :: HasDebugCallStack => Type -> [VarType]+typeVt t | isRuntimeRepKindedTy t = []+typeVt t = map primRepVt (typePrimRep t)-- map uTypeVt (repTypeArgs t)++-- only use if you know it's not an unboxed tuple+uTypeVt :: HasDebugCallStack => UnaryType -> VarType+uTypeVt ut+ | isRuntimeRepKindedTy ut = VoidV+-- | isRuntimeRepTy ut = VoidV+ -- GHC panics on this otherwise+ | Just (tc, ty_args) <- splitTyConApp_maybe ut+ , length ty_args /= tyConArity tc = PtrV+ | isPrimitiveType ut = (primTypeVt ut)+ | otherwise =+ case typePrimRep' ut of+ [] -> VoidV+ [pt] -> primRepVt pt+ _ -> pprPanic "uTypeVt: not unary" (ppr ut)++primRepVt :: HasDebugCallStack => PrimRep -> VarType+primRepVt VoidRep = VoidV+primRepVt (BoxedRep _) = PtrV -- fixme does ByteArray# ever map to this?+primRepVt IntRep = IntV+primRepVt Int8Rep = IntV+primRepVt Int16Rep = IntV+primRepVt Int32Rep = IntV+primRepVt WordRep = IntV+primRepVt Word8Rep = IntV+primRepVt Word16Rep = IntV+primRepVt Word32Rep = IntV+primRepVt Int64Rep = LongV+primRepVt Word64Rep = LongV+primRepVt AddrRep = AddrV+primRepVt FloatRep = DoubleV+primRepVt DoubleRep = DoubleV+primRepVt (VecRep{}) = error "uTypeVt: vector types are unsupported"++typePrimRep' :: HasDebugCallStack => UnaryType -> [PrimRep]+typePrimRep' ty = kindPrimRep' empty (typeKind ty)++-- | Find the primitive representation of a 'TyCon'. Defined here to+-- avoid module loops. Call this only on unlifted tycons.+tyConPrimRep' :: HasDebugCallStack => TyCon -> [PrimRep]+tyConPrimRep' tc = kindPrimRep' empty res_kind+ where+ res_kind = tyConResKind tc++-- | Take a kind (of shape @TYPE rr@) and produce the 'PrimRep's+-- of values of types of this kind.+kindPrimRep' :: HasDebugCallStack => SDoc -> Kind -> [PrimRep]+kindPrimRep' doc ki+ | Just ki' <- coreView ki+ = kindPrimRep' doc ki'+kindPrimRep' doc (TyConApp _typ [runtime_rep])+ = -- ASSERT( typ `hasKey` tYPETyConKey )+ runtimeRepPrimRep doc runtime_rep+kindPrimRep' doc ki+ = pprPanic "kindPrimRep'" (ppr ki $$ doc)++primTypeVt :: HasDebugCallStack => Type -> VarType+primTypeVt t = case tyConAppTyCon_maybe (unwrapType t) of+ Nothing -> error "primTypeVt: not a TyCon"+ Just tc+ | tc == charPrimTyCon -> IntV+ | tc == intPrimTyCon -> IntV+ | tc == wordPrimTyCon -> IntV+ | tc == floatPrimTyCon -> DoubleV+ | tc == doublePrimTyCon -> DoubleV+ | tc == int8PrimTyCon -> IntV+ | tc == word8PrimTyCon -> IntV+ | tc == int16PrimTyCon -> IntV+ | tc == word16PrimTyCon -> IntV+ | tc == int32PrimTyCon -> IntV+ | tc == word32PrimTyCon -> IntV+ | tc == int64PrimTyCon -> LongV+ | tc == word64PrimTyCon -> LongV+ | tc == addrPrimTyCon -> AddrV+ | tc == stablePtrPrimTyCon -> AddrV+ | tc == stableNamePrimTyCon -> PtrV+ | tc == statePrimTyCon -> VoidV+ | tc == proxyPrimTyCon -> VoidV+ | tc == realWorldTyCon -> VoidV+ | tc == threadIdPrimTyCon -> PtrV+ | tc == weakPrimTyCon -> PtrV+ | tc == arrayPrimTyCon -> ArrV+ | tc == smallArrayPrimTyCon -> ArrV+ | tc == byteArrayPrimTyCon -> ObjV -- can contain any JS reference, used for JSVal+ | tc == mutableArrayPrimTyCon -> ArrV+ | tc == smallMutableArrayPrimTyCon -> ArrV+ | tc == mutableByteArrayPrimTyCon -> ObjV -- can contain any JS reference, used for JSVal+ | tc == mutVarPrimTyCon -> PtrV+ | tc == mVarPrimTyCon -> PtrV+ | tc == tVarPrimTyCon -> PtrV+ | tc == bcoPrimTyCon -> PtrV -- unsupported?+ | tc == stackSnapshotPrimTyCon -> PtrV+ | tc == ioPortPrimTyCon -> PtrV -- unsupported?+ | tc == anyTyCon -> PtrV+ | tc == compactPrimTyCon -> PtrV -- unsupported?+ | tc == eqPrimTyCon -> VoidV -- coercion token?+ | tc == eqReprPrimTyCon -> VoidV -- role+ | tc == unboxedUnitTyCon -> VoidV -- Void#+ | otherwise -> PtrV -- anything else must be some boxed thing++argVt :: StgArg -> VarType+argVt a = uTypeVt . stgArgType $ a++dataConType :: DataCon -> Type+dataConType dc = idType (dataConWrapId dc)++isBoolDataCon :: DataCon -> Bool+isBoolDataCon dc = isBoolTy (dataConType dc)++-- standard fixed layout: payload types+-- payload starts at .d1 for heap objects, entry closest to Sp for stack frames+fixedLayout :: [VarType] -> CILayout+fixedLayout vts = CILayoutFixed (sum (map varSize vts)) vts++-- 2-var values might have been moved around separately, use DoubleV as substitute+-- ObjV is 1 var, so this is no problem for implicit metadata+stackSlotType :: Id -> VarType+stackSlotType i+ | OneSlot <- varSlotCount otype = otype+ | otherwise = DoubleV+ where otype = uTypeVt (idType i)++idPrimReps :: Id -> [PrimRep]+idPrimReps = typePrimReps . idType++typePrimReps :: Type -> [PrimRep]+typePrimReps = typePrimRep . unwrapType++primRepSize :: PrimRep -> SlotCount+primRepSize p = varSlotCount (primRepVt p)++-- | Associate the given values to each RrimRep in the given order, taking into+-- account the number of slots per PrimRep+assocPrimReps :: [PrimRep] -> [JExpr] -> [(PrimRep, [JExpr])]+assocPrimReps [] _ = []+assocPrimReps (r:rs) vs = case (primRepSize r,vs) of+ (NoSlot, xs) -> (r,[]) : assocPrimReps rs xs+ (OneSlot, x:xs) -> (r,[x]) : assocPrimReps rs xs+ (TwoSlots, x:y:xs) -> (r,[x,y]) : assocPrimReps rs xs+ err -> pprPanic "assocPrimReps" (ppr $ map (satJExpr Nothing) <$> err)++-- | Associate the given values to the Id's PrimReps, taking into account the+-- number of slots per PrimRep+assocIdPrimReps :: Id -> [JExpr] -> [(PrimRep, [JExpr])]+assocIdPrimReps i = assocPrimReps (idPrimReps i)++-- | Associate the given JExpr to the Id's PrimReps, taking into account the+-- number of slots per PrimRep+assocIdExprs :: Id -> [JExpr] -> [TypedExpr]+assocIdExprs i es = fmap (uncurry TypedExpr) (assocIdPrimReps i es)++mkArityTag :: Int -> Int -> Int+mkArityTag arity registers = arity Bits..|. (registers `Bits.shiftL` 8)++toTypeList :: [VarType] -> [Int]+toTypeList = concatMap (\x -> replicate (varSize x) (fromEnum x))++--------------------------------------------------------------------------------+-- Stg Utils+--------------------------------------------------------------------------------++s :: a -> Set a+s = S.singleton++l :: (a -> Set Id) -> [a] -> Set Id+l = F.foldMap++-- | collect Ids that this binding refers to+-- (does not include the bindees themselves)+-- first argument is Id -> StgExpr map for unfloated arguments+bindingRefs :: UniqFM Id CgStgExpr -> CgStgBinding -> Set Id+bindingRefs u = \case+ StgNonRec _ rhs -> rhsRefs u rhs+ StgRec bs -> l (rhsRefs u . snd) bs++rhsRefs :: UniqFM Id CgStgExpr -> CgStgRhs -> Set Id+rhsRefs u = \case+ StgRhsClosure _ _ _ _ body _ -> exprRefs u body+ StgRhsCon _ccs d _mu _ticks args _ -> l s [ i | AnId i <- dataConImplicitTyThings d] <> l (argRefs u) args++exprRefs :: UniqFM Id CgStgExpr -> CgStgExpr -> Set Id+exprRefs u = \case+ StgApp f args -> s f <> l (argRefs u) args+ StgConApp d _n args _ -> l s [ i | AnId i <- dataConImplicitTyThings d] <> l (argRefs u) args+ StgOpApp _ args _ -> l (argRefs u) args+ StgLit {} -> mempty+ StgCase expr _ _ alts -> exprRefs u expr <> mconcat (fmap (altRefs u) alts)+ StgLet _ bnd expr -> bindingRefs u bnd <> exprRefs u expr+ StgLetNoEscape _ bnd expr -> bindingRefs u bnd <> exprRefs u expr+ StgTick _ expr -> exprRefs u expr++altRefs :: UniqFM Id CgStgExpr -> CgStgAlt -> Set Id+altRefs u alt = exprRefs u (alt_rhs alt)++argRefs :: UniqFM Id CgStgExpr -> StgArg -> Set Id+argRefs u = \case+ StgVarArg id+ | Just e <- lookupUFM u id -> exprRefs u e+ | otherwise -> s id+ _ -> mempty++hasExport :: CgStgBinding -> Bool+hasExport bnd =+ case bnd of+ StgNonRec b e -> isExportedBind b e+ StgRec bs -> any (uncurry isExportedBind) bs+ where+ isExportedBind _i (StgRhsCon _cc con _ _ _ _) =+ getUnique con == staticPtrDataConKey+ isExportedBind _ _ = False++collectTopIds :: CgStgBinding -> [Id]+collectTopIds (StgNonRec b _) = [b]+collectTopIds (StgRec bs) = let xs = map (zapFragileIdInfo . fst) bs+ in seqList xs `seq` xs++collectIds :: UniqFM Id CgStgExpr -> CgStgBinding -> [Id]+collectIds unfloated b =+ let xs = map zapFragileIdInfo .+ filter acceptId $ S.toList (bindingRefs unfloated b)+ in seqList xs `seq` xs+ where+ acceptId i = all ($ i) [not . isForbidden] -- fixme test this: [isExported[isGlobalId, not.isForbidden]+ -- the GHC.Prim module has no js source file+ isForbidden i+ | Just m <- nameModule_maybe (getName i) = m == gHC_PRIM+ | otherwise = False++removeTick :: CgStgExpr -> CgStgExpr+removeTick (StgTick _ e) = e+removeTick e = e++-----------------------------------------------------+-- Live vars+--+-- TODO: should probably be moved into GHC.Stg.LiveVars++type LiveVars = DVarSet++liveStatic :: LiveVars -> LiveVars+liveStatic = filterDVarSet isGlobalId++liveVars :: LiveVars -> LiveVars+liveVars = filterDVarSet (not . isGlobalId)++stgTopBindLive :: CgStgTopBinding -> [(Id, LiveVars)]+stgTopBindLive = \case+ StgTopLifted b -> stgBindLive b+ StgTopStringLit {} -> []++stgBindLive :: CgStgBinding -> [(Id, LiveVars)]+stgBindLive = \case+ StgNonRec b rhs -> [(b, stgRhsLive rhs)]+ StgRec bs -> map (\(b,rhs) -> (b, stgRhsLive rhs)) bs++stgBindRhsLive :: CgStgBinding -> LiveVars+stgBindRhsLive b =+ let (bs, ls) = unzip (stgBindLive b)+ in delDVarSetList (unionDVarSets ls) bs++stgRhsLive :: CgStgRhs -> LiveVars+stgRhsLive = \case+ StgRhsClosure _ _ _ args e _ -> delDVarSetList (stgExprLive True e) args+ StgRhsCon _ _ _ _ args _ -> unionDVarSets (map stgArgLive args)++stgArgLive :: StgArg -> LiveVars+stgArgLive = \case+ StgVarArg occ -> unitDVarSet occ+ StgLitArg {} -> emptyDVarSet++stgExprLive :: Bool -> CgStgExpr -> LiveVars+stgExprLive includeLHS = \case+ StgApp occ args -> unionDVarSets (unitDVarSet occ : map stgArgLive args)+ StgLit {} -> emptyDVarSet+ StgConApp _dc _n args _tys -> unionDVarSets (map stgArgLive args)+ StgOpApp _op args _ty -> unionDVarSets (map stgArgLive args)+ StgCase e b _at alts+ | includeLHS -> el `unionDVarSet` delDVarSet al b+ | otherwise -> delDVarSet al b+ where+ al = unionDVarSets (map stgAltLive alts)+ el = stgExprLive True e+ StgLet _ b e -> delDVarSetList (stgBindRhsLive b `unionDVarSet` stgExprLive True e) (bindees b)+ StgLetNoEscape _ b e -> delDVarSetList (stgBindRhsLive b `unionDVarSet` stgExprLive True e) (bindees b)+ StgTick _ti e -> stgExprLive True e++stgAltLive :: CgStgAlt -> LiveVars+stgAltLive alt =+ delDVarSetList (stgExprLive True (alt_rhs alt)) (alt_bndrs alt)++stgLetNoEscapeLive :: Bool -> StgBinding -> StgExpr -> LiveVars+stgLetNoEscapeLive _someBool _b _e = panic "stgLetNoEscapeLive"++bindees :: CgStgBinding -> [Id]+bindees = \case+ StgNonRec b _e -> [b]+ StgRec bs -> map fst bs++isUpdatableRhs :: CgStgRhs -> Bool+isUpdatableRhs (StgRhsClosure _ _ u _ _ _) = isUpdatable u+isUpdatableRhs _ = False++stgLneLive' :: CgStgBinding -> [Id]+stgLneLive' b = filter (`notElem` bindees b) (stgLneLive b)++stgLneLive :: CgStgBinding -> [Id]+stgLneLive (StgNonRec _b e) = stgLneLiveExpr e+stgLneLive (StgRec bs) = L.nub $ concatMap (stgLneLiveExpr . snd) bs++stgLneLiveExpr :: CgStgRhs -> [Id]+stgLneLiveExpr rhs = dVarSetElems (liveVars $ stgRhsLive rhs)+-- stgLneLiveExpr (StgRhsClosure _ _ _ _ e) = dVarSetElems (liveVars (stgExprLive e))+-- stgLneLiveExpr StgRhsCon {} = []++-- | returns True if the expression is definitely inline+isInlineExpr :: UniqSet Id -> CgStgExpr -> (UniqSet Id, Bool)+isInlineExpr v = \case+ StgApp i args+ -> (emptyUniqSet, isInlineApp v i args)+ StgLit{}+ -> (emptyUniqSet, True)+ StgConApp{}+ -> (emptyUniqSet, True)+ StgOpApp (StgFCallOp f _) _ _+ -> (emptyUniqSet, isInlineForeignCall f)+ StgOpApp (StgPrimOp SeqOp) [StgVarArg e] t+ -> (emptyUniqSet, e `elementOfUniqSet` v || isStrictType t)+ StgOpApp (StgPrimOp op) _ _+ -> (emptyUniqSet, primOpIsReallyInline op)+ StgOpApp (StgPrimCallOp _c) _ _+ -> (emptyUniqSet, True)+ StgCase e b _ alts+ ->let (_ve, ie) = isInlineExpr v e+ v' = addOneToUniqSet v b+ (vas, ias) = unzip $ map (isInlineExpr v') (fmap alt_rhs alts)+ vr = L.foldl1' intersectUniqSets vas+ in (vr, (ie || b `elementOfUniqSet` v) && and ias)+ StgLet _ b e+ -> isInlineExpr (inspectInlineBinding v b) e+ StgLetNoEscape _ _b e+ -> isInlineExpr v e+ StgTick _ e+ -> isInlineExpr v e++inspectInlineBinding :: UniqSet Id -> CgStgBinding -> UniqSet Id+inspectInlineBinding v = \case+ StgNonRec i r -> inspectInlineRhs v i r+ StgRec bs -> foldl' (\v' (i,r) -> inspectInlineRhs v' i r) v bs++inspectInlineRhs :: UniqSet Id -> Id -> CgStgRhs -> UniqSet Id+inspectInlineRhs v i = \case+ StgRhsCon{} -> addOneToUniqSet v i+ StgRhsClosure _ _ ReEntrant _ _ _ -> addOneToUniqSet v i+ _ -> v++isInlineForeignCall :: ForeignCall -> Bool+isInlineForeignCall (CCall (CCallSpec _ cconv safety)) =+ not (playInterruptible safety) &&+ not (cconv /= JavaScriptCallConv && playSafe safety)++isInlineApp :: UniqSet Id -> Id -> [StgArg] -> Bool+isInlineApp v i = \case+ _ | isJoinId i -> False+ [] -> isUnboxedTupleType (idType i) ||+ isStrictType (idType i) ||+ i `elementOfUniqSet` v++ [StgVarArg a]+ | DataConWrapId dc <- idDetails i+ , isNewTyCon (dataConTyCon dc)+ , isStrictType (idType a) || a `elementOfUniqSet` v || isStrictId a+ -> True+ _ -> False
GHC/SysTools/Cpp.hs view
@@ -98,6 +98,9 @@ [ "-D__SSE2__" | isSse2Enabled platform ] ++ [ "-D__SSE4_2__" | isSse4_2Enabled dflags ] + let fma_def =+ [ "-D__FMA__" | isFmaEnabled dflags ]+ let avx_defs = [ "-D__AVX__" | isAvxEnabled dflags ] ++ [ "-D__AVX2__" | isAvx2Enabled dflags ] ++@@ -140,6 +143,7 @@ ++ map GHC.SysTools.Option th_defs ++ map GHC.SysTools.Option hscpp_opts ++ map GHC.SysTools.Option sse_defs+ ++ map GHC.SysTools.Option fma_def ++ map GHC.SysTools.Option avx_defs ++ map GHC.SysTools.Option io_manager_defs ++ mb_macro_include@@ -199,17 +203,11 @@ -- | Find out path to @ghcversion.h@ file getGhcVersionPathName :: DynFlags -> UnitEnv -> IO FilePath getGhcVersionPathName dflags unit_env = do- let candidates = case ghcVersionFile dflags of- -- the user has provided an explicit `ghcversion.h` file to use.- Just path -> [path]- -- otherwise, try to find it in the rts' include-dirs.- -- Note: only in the RTS include-dirs! not all preload units less we may- -- use a wrong file. See #25106 where a globally installed- -- /usr/include/ghcversion.h file was used instead of the one provided- -- by the rts.- Nothing -> case lookupUnitId (ue_units unit_env) rtsUnitId of- Nothing -> []- Just info -> (</> "ghcversion.h") <$> collectIncludeDirs [info]+ candidates <- case ghcVersionFile dflags of+ Just path -> return [path]+ Nothing -> do+ ps <- mayThrowUnitErr (preloadUnitsInfo' unit_env [rtsUnitId])+ return ((</> "ghcversion.h") <$> collectIncludeDirs ps) found <- filterM doesFileExist candidates case found of
GHC/SysTools/Info.hs view
@@ -70,6 +70,7 @@ neededLinkArgs :: LinkerInfo -> [Option] neededLinkArgs (GnuLD o) = o+neededLinkArgs (Mold o) = o neededLinkArgs (GnuGold o) = o neededLinkArgs (LlvmLLD o) = o neededLinkArgs (DarwinLD o) = o@@ -104,6 +105,10 @@ -- Set DT_NEEDED for all shared libraries. #10110. return (GnuLD $ map Option [-- ELF specific flag -- see Note [ELF needed shared libs]+ "-Wl,--no-as-needed"])++ | any ("mold" `isPrefixOf`) stdo =+ return (Mold $ map Option [ --see Note [ELF needed shared libs] "-Wl,--no-as-needed"]) | any ("GNU gold" `isPrefixOf`) stdo =
GHC/SysTools/Process.hs view
@@ -10,7 +10,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Utils.Exception import GHC.Utils.Error
GHC/SysTools/Tasks.hs view
@@ -29,7 +29,6 @@ import GHC.Utils.Misc import GHC.Utils.Logger import GHC.Utils.TmpFs-import GHC.Utils.Constants (isWindowsHost) import GHC.Utils.Panic import Data.List (tails, isPrefixOf)@@ -247,17 +246,14 @@ (pin, pout, perr, p) <- runInteractiveProcess pgm args' Nothing Nothing {- > llc -version- <vendor> LLVM version 15.0.7- ...- OR LLVM (http://llvm.org/):- LLVM version 14.0.6+ LLVM version 3.5.2+ ... -} hSetBinaryMode pout False- line1 <- hGetLine pout- mb_ver <- case parseLlvmVersion line1 of- mb_ver@(Just _) -> return mb_ver- Nothing -> parseLlvmVersion <$> hGetLine pout -- Try the second line+ _ <- hGetLine pout+ vline <- hGetLine pout+ let mb_ver = parseLlvmVersion vline hClose pin hClose pout hClose perr@@ -353,9 +349,7 @@ , "does not support object merging." ] optl_args = map Option (getOpts dflags opt_lm) args2 = args0 ++ args ++ optl_args- -- N.B. Darwin's ld64 doesn't support response files. Consequently we only- -- use them on Windows where they are truly necessary.- if isWindowsHost+ if toolSettings_ldSupportsResponseFiles (toolSettings dflags) then do mb_env <- getGccEnv args2 runSomethingResponseFile logger tmpfs dflags id "Merge objects" p args2 mb_env
GHC/Tc/Deriv.hs view
@@ -65,6 +65,7 @@ import GHC.Data.Bag import GHC.Utils.FV as FV (fvVarList, unionFV, mkFVs) import qualified GHC.LanguageExtensions as LangExt+import GHC.Data.BooleanFormula ( isUnsatisfied ) import Control.Monad import Control.Monad.Trans.Class@@ -1442,19 +1443,24 @@ -- See Note [DerivEnv and DerivSpecMechanism] in GHC.Tc.Deriv.Utils whenIsJust (hasStockDeriving cls) $ \_ -> expectNonDataFamTyCon dit- mk_eqn_originative dit+ mk_eqn_originative cls dit | otherwise -> mk_eqn_anyclass where -- Use heuristics (checkOriginativeSideConditions) to determine whether -- stock or anyclass deriving should be used.- mk_eqn_originative :: DerivInstTys -> DerivM EarlyDerivSpec- mk_eqn_originative dit@(DerivInstTys { dit_tc = tc- , dit_rep_tc = rep_tc }) = do+ mk_eqn_originative :: Class -> DerivInstTys -> DerivM EarlyDerivSpec+ mk_eqn_originative cls dit@(DerivInstTys { dit_tc = tc+ , dit_rep_tc = rep_tc }) = do dflags <- getDynFlags- let isDeriveAnyClassEnabled =- deriveAnyClassEnabled (xopt LangExt.DeriveAnyClass dflags)+ let isDeriveAnyClassEnabled+ | canSafelyDeriveAnyClass cls+ = deriveAnyClassEnabled (xopt LangExt.DeriveAnyClass dflags)+ | otherwise+ -- Pretend that the extension is enabled so that we won't suggest+ -- enabling it.+ = YesDeriveAnyClassEnabled -- See Note [Deriving instances for classes themselves] let dac_error@@ -1471,6 +1477,12 @@ , dsm_stock_gen_fns = gen_fns } CanDeriveAnyClass -> mk_eqn_from_mechanism DerivSpecAnyClass + canSafelyDeriveAnyClass cls =+ -- If the set of minimal required definitions is nonempty,+ -- `DeriveAnyClass` will generate an instance with undefined methods or+ -- associated types, so don't suggest enabling it.+ isNothing $ isUnsatisfied (const False) (classMinimalDef cls)+ {- ************************************************************************ * *@@ -1960,9 +1972,13 @@ case mechanism of DerivSpecStock{dsm_stock_dit = dit} -> data_cons_in_scope_check dit- DerivSpecNewtype{dsm_newtype_dit = dit}- -> do atf_coerce_based_error_checks- data_cons_in_scope_check dit+ -- No need to 'data_cons_in_scope_check' for newtype deriving.+ -- Additionally, we also don't need to mark the constructos as+ -- used because newtypes are handled separately elsewhere.+ -- See Note [Tracking unused binding and imports] in GHC.Tc.Types+ -- or #17328 for more.+ DerivSpecNewtype{}+ -> atf_coerce_based_error_checks DerivSpecAnyClass{} -> pure () DerivSpecVia{}
GHC/Tc/Deriv/Generate.hs view
@@ -44,53 +44,56 @@ import GHC.Prelude -import GHC.Tc.Utils.Monad-import GHC.Tc.TyCl.Class ( substATBndrs ) import GHC.Hs-import GHC.Types.FieldLabel++import GHC.Tc.TyCl.Class ( substATBndrs )+import GHC.Tc.Utils.Monad+import GHC.Tc.Utils.Instantiate( newFamInst )+import GHC.Tc.Utils.Env+import GHC.Tc.Utils.TcType+import GHC.Tc.Zonk.Type+import GHC.Tc.Validity ( checkValidCoAxBranch )++import GHC.Core.DataCon+import GHC.Core.FamInstEnv+import GHC.Core.TyCon+import GHC.Core.Coercion.Axiom ( coAxiomSingleBranch )+import GHC.Core.Type+import GHC.Core.Class+ import GHC.Types.Name.Reader import GHC.Types.Basic import GHC.Types.Fixity-import GHC.Core.DataCon import GHC.Types.Name import GHC.Types.SourceText+import GHC.Types.Id.Make ( coerceId )+import GHC.Types.SrcLoc+import GHC.Types.Unique.FM ( lookupUFM, listToUFM )+import GHC.Types.Var.Env+import GHC.Types.Var -import GHC.Tc.Instance.Family-import GHC.Core.FamInstEnv import GHC.Builtin.Names import GHC.Builtin.Names.TH-import GHC.Types.Id.Make ( coerceId ) import GHC.Builtin.PrimOps import GHC.Builtin.PrimOps.Ids (primOpId)-import GHC.Types.SrcLoc-import GHC.Core.TyCon-import GHC.Tc.Utils.Env-import GHC.Tc.Utils.TcType-import GHC.Tc.Utils.Zonk-import GHC.Tc.Validity ( checkValidCoAxBranch )-import GHC.Core.Coercion.Axiom ( coAxiomSingleBranch ) import GHC.Builtin.Types.Prim import GHC.Builtin.Types-import GHC.Core.Type-import GHC.Core.Class -import GHC.Types.Unique.FM ( lookupUFM, listToUFM )-import GHC.Types.Var.Env import GHC.Utils.Misc-import GHC.Types.Var import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Panic.Plain import GHC.Utils.Lexeme+ import GHC.Data.FastString import GHC.Data.Pair import GHC.Data.Bag+import GHC.Data.Maybe ( expectJust )+import GHC.Unit.Module import Language.Haskell.Syntax.Basic (FieldLabelString(..)) import Data.List ( find, partition, intersperse )-import GHC.Data.Maybe ( expectJust )-import GHC.Unit.Module -- | A declarative description of an auxiliary binding that should be -- generated. See @Note [Auxiliary binders]@ for a more detailed description@@ -1279,8 +1282,7 @@ show_arg b arg_ty | isUnliftedType arg_ty -- See Note [Deriving and unboxed types] in GHC.Tc.Deriv.Infer- = with_conv $- nlHsApps compose_RDR+ = nlHsApps compose_RDR [mk_shows_app boxed_arg, mk_showString_app postfixMod] | otherwise = mk_showsPrec_app arg_prec arg@@ -1288,14 +1290,6 @@ arg = nlHsVar b boxed_arg = box "Show" arg arg_ty postfixMod = assoc_ty_id "Show" postfixModTbl arg_ty- with_conv expr- | (Just conv) <- assoc_ty_id_maybe primConvTbl arg_ty =- nested_compose_Expr- [ mk_showString_app ("(" ++ conv ++ " ")- , expr- , mk_showString_app ")"- ]- | otherwise = expr -- Fixity stuff is_infix = dataConIsInfix data_con@@ -1511,9 +1505,8 @@ eqAddr_RDR , ltAddr_RDR , geAddr_RDR , gtAddr_RDR , leAddr_RDR , eqFloat_RDR , ltFloat_RDR , geFloat_RDR , gtFloat_RDR , leFloat_RDR , eqDouble_RDR, ltDouble_RDR, geDouble_RDR, gtDouble_RDR, leDouble_RDR,- word8ToWord_RDR , int8ToInt_RDR ,- word16ToWord_RDR, int16ToInt_RDR,- word32ToWord_RDR, int32ToInt_RDR+ int8DataCon_RDR, int16DataCon_RDR, int32DataCon_RDR, int64DataCon_RDR,+ word8DataCon_RDR, word16DataCon_RDR, word32DataCon_RDR, word64DataCon_RDR :: RdrName gfoldl_RDR = varQual_RDR gENERICS (fsLit "gfoldl") gunfold_RDR = varQual_RDR gENERICS (fsLit "gunfold")@@ -1616,15 +1609,14 @@ gtDouble_RDR = varQual_RDR gHC_PRIM (fsLit ">##" ) geDouble_RDR = varQual_RDR gHC_PRIM (fsLit ">=##") -word8ToWord_RDR = varQual_RDR gHC_PRIM (fsLit "word8ToWord#")-int8ToInt_RDR = varQual_RDR gHC_PRIM (fsLit "int8ToInt#")--word16ToWord_RDR = varQual_RDR gHC_PRIM (fsLit "word16ToWord#")-int16ToInt_RDR = varQual_RDR gHC_PRIM (fsLit "int16ToInt#")--word32ToWord_RDR = varQual_RDR gHC_PRIM (fsLit "word32ToWord#")-int32ToInt_RDR = varQual_RDR gHC_PRIM (fsLit "int32ToInt#")-+int8DataCon_RDR = dataQual_RDR gHC_INT (fsLit "I8#")+int16DataCon_RDR = dataQual_RDR gHC_INT (fsLit "I16#")+int32DataCon_RDR = dataQual_RDR gHC_INT (fsLit "I32#")+int64DataCon_RDR = dataQual_RDR gHC_INT (fsLit "I64#")+word8DataCon_RDR = dataQual_RDR gHC_WORD (fsLit "W8#")+word16DataCon_RDR = dataQual_RDR gHC_WORD (fsLit "W16#")+word32DataCon_RDR = dataQual_RDR gHC_WORD (fsLit "W32#")+word64DataCon_RDR = dataQual_RDR gHC_WORD (fsLit "W64#") {- ************************************************************************ * *@@ -1807,7 +1799,7 @@ *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 GHC.Tc.Solver.Interact.+See Note [Instances in no-evidence implications] in GHC.Tc.Solver.Equality. 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@@ -2299,7 +2291,7 @@ mkRdrFunBind :: LocatedN RdrName -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsBind GhcPs mkRdrFunBind fun@(L loc _fun_rdr) matches- = L (na2la loc) (mkFunBind Generated fun matches)+ = L (na2la loc) (mkFunBind (Generated SkipPmc) fun matches) -- | Make a function binding. If no equations are given, produce a function -- with the given arity that uses an empty case expression for the last@@ -2327,7 +2319,7 @@ -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsBind GhcPs mkRdrFunBindEC arity catch_all fun@(L loc _fun_rdr) matches- = L (na2la loc) (mkFunBind Generated fun matches')+ = L (na2la loc) (mkFunBind (Generated SkipPmc) fun matches') where -- Catch-all eqn looks like -- fmap _ z = case z of {}@@ -2351,7 +2343,7 @@ mkRdrFunBindSE :: Arity -> LocatedN RdrName -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsBind GhcPs mkRdrFunBindSE arity fun@(L loc fun_rdr) matches- = L (na2la loc) (mkFunBind Generated fun matches')+ = L (na2la loc) (mkFunBind (Generated SkipPmc) fun matches') where -- Catch-all eqn looks like -- compare _ _ = error "Void compare"@@ -2413,7 +2405,6 @@ -- A mapping from a primitive type to a function that constructs its boxed -- version.--- NOTE: Int8#/Word8# will become Int/Word. boxConTbl :: [(Type, LHsExpr GhcPs -> LHsExpr GhcPs)] boxConTbl = [ (charPrimTy , nlHsApp (nlHsVar $ getRdrName charDataCon))@@ -2421,28 +2412,20 @@ , (wordPrimTy , nlHsApp (nlHsVar $ getRdrName wordDataCon )) , (floatPrimTy , nlHsApp (nlHsVar $ getRdrName floatDataCon )) , (doublePrimTy, nlHsApp (nlHsVar $ getRdrName doubleDataCon))- , (int8PrimTy,- nlHsApp (nlHsVar $ getRdrName intDataCon)- . nlHsApp (nlHsVar int8ToInt_RDR))- , (word8PrimTy,- nlHsApp (nlHsVar $ getRdrName wordDataCon)- . nlHsApp (nlHsVar word8ToWord_RDR))- , (int16PrimTy,- nlHsApp (nlHsVar $ getRdrName intDataCon)- . nlHsApp (nlHsVar int16ToInt_RDR))- , (word16PrimTy,- nlHsApp (nlHsVar $ getRdrName wordDataCon)- . nlHsApp (nlHsVar word16ToWord_RDR))- , (int32PrimTy,- nlHsApp (nlHsVar $ getRdrName intDataCon)- . nlHsApp (nlHsVar int32ToInt_RDR))- , (word32PrimTy,- nlHsApp (nlHsVar $ getRdrName wordDataCon)- . nlHsApp (nlHsVar word32ToWord_RDR))+ , (int8PrimTy, nlHsApp (nlHsVar int8DataCon_RDR))+ , (word8PrimTy, nlHsApp (nlHsVar word8DataCon_RDR))+ , (int16PrimTy, nlHsApp (nlHsVar int16DataCon_RDR))+ , (word16PrimTy, nlHsApp (nlHsVar word16DataCon_RDR))+ , (int32PrimTy, nlHsApp (nlHsVar int32DataCon_RDR))+ , (word32PrimTy, nlHsApp (nlHsVar word32DataCon_RDR))+ , (int64PrimTy, nlHsApp (nlHsVar int64DataCon_RDR))+ , (word64PrimTy, nlHsApp (nlHsVar word64DataCon_RDR)) ] -- | A table of postfix modifiers for unboxed values.+-- Following https://github.com/ghc-proposals/ghc-proposals/pull/596,+-- we use the ExtendedLiterals syntax for sized literals. postfixModTbl :: [(Type, String)] postfixModTbl = [(charPrimTy , "#" )@@ -2450,22 +2433,14 @@ ,(wordPrimTy , "##") ,(floatPrimTy , "#" ) ,(doublePrimTy, "##")- ,(int8PrimTy, "#")- ,(word8PrimTy, "##")- ,(int16PrimTy, "#")- ,(word16PrimTy, "##")- ,(int32PrimTy, "#")- ,(word32PrimTy, "##")- ]--primConvTbl :: [(Type, String)]-primConvTbl =- [ (int8PrimTy, "intToInt8#")- , (word8PrimTy, "wordToWord8#")- , (int16PrimTy, "intToInt16#")- , (word16PrimTy, "wordToWord16#")- , (int32PrimTy, "intToInt32#")- , (word32PrimTy, "wordToWord32#")+ ,(int8PrimTy , "#Int8")+ ,(word8PrimTy , "#Word8")+ ,(int16PrimTy , "#Int16")+ ,(word16PrimTy, "#Word16")+ ,(int32PrimTy , "#Int32")+ ,(word32PrimTy, "#Word32")+ ,(int64PrimTy , "#Int64")+ ,(word64PrimTy, "#Word64") ] litConTbl :: [(Type, LHsExpr GhcPs -> LHsExpr GhcPs)]@@ -2780,19 +2755,19 @@ rep_tc_args' = substTys subst rep_tc_args -- | Zonk the 'TcTyVar's in a 'DerivInstTys' value to 'TyVar's.--- See @Note [What is zonking?]@ in "GHC.Tc.Utils.TcMType".+-- See @Note [What is zonking?]@ in "GHC.Tc.Zonk.Type". -- -- This is only used in the final zonking step when inferring -- the context for a derived instance. -- See @Note [Overlap and deriving]@ in "GHC.Tc.Deriv.Infer".-zonkDerivInstTys :: ZonkEnv -> DerivInstTys -> TcM DerivInstTys-zonkDerivInstTys ze dit@(DerivInstTys { dit_cls_tys = cls_tys- , dit_tc_args = tc_args- , dit_rep_tc = rep_tc- , dit_rep_tc_args = rep_tc_args }) = do- cls_tys' <- zonkTcTypesToTypesX ze cls_tys- tc_args' <- zonkTcTypesToTypesX ze tc_args- rep_tc_args' <- zonkTcTypesToTypesX ze rep_tc_args+zonkDerivInstTys :: DerivInstTys -> ZonkT TcM DerivInstTys+zonkDerivInstTys dit@(DerivInstTys { dit_cls_tys = cls_tys+ , dit_tc_args = tc_args+ , dit_rep_tc = rep_tc+ , dit_rep_tc_args = rep_tc_args }) = do+ cls_tys' <- zonkTcTypesToTypesX cls_tys+ tc_args' <- zonkTcTypesToTypesX tc_args+ rep_tc_args' <- zonkTcTypesToTypesX rep_tc_args pure dit{ dit_cls_tys = cls_tys' , dit_tc_args = tc_args' , dit_rep_tc_args = rep_tc_args'
GHC/Tc/Deriv/Generics.hs view
@@ -28,7 +28,9 @@ import GHC.Tc.Deriv.Generate import GHC.Tc.Deriv.Functor import GHC.Tc.Errors.Types-import GHC.Tc.Instance.Family+import GHC.Tc.Utils.Instantiate( newFamInst )+import GHC.Tc.Utils.Env+import GHC.Tc.Utils.Monad import GHC.Core.Type import GHC.Core.DataCon@@ -45,22 +47,23 @@ import GHC.Types.SourceText import GHC.Types.Fixity import GHC.Types.Basic+import GHC.Types.SrcLoc+import GHC.Types.Var.Env+import GHC.Types.Var.Set (elemVarSet)+ import GHC.Builtin.Types.Prim import GHC.Builtin.Types import GHC.Builtin.Names-import GHC.Tc.Utils.Env-import GHC.Tc.Utils.Monad-import GHC.Driver.Session+ import GHC.Utils.Error( Validity'(..), andValid )-import GHC.Types.SrcLoc-import GHC.Data.Bag-import GHC.Types.Var.Env-import GHC.Types.Var.Set (elemVarSet) import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Panic.Plain-import GHC.Data.FastString import GHC.Utils.Misc++import GHC.Driver.DynFlags+import GHC.Data.Bag+import GHC.Data.FastString import Language.Haskell.Syntax.Basic (FieldLabelString(..))
GHC/Tc/Deriv/Infer.hs view
@@ -30,6 +30,8 @@ import GHC.Tc.Solver.Monad ( runTcS ) import GHC.Tc.Validity (validDerivPred) import GHC.Tc.Utils.Unify (buildImplicationFor)+import GHC.Tc.Zonk.TcType ( zonkWC )+import GHC.Tc.Zonk.Env ( ZonkFlexi(..), initZonkEnv ) import GHC.Core.Class import GHC.Core.DataCon@@ -672,7 +674,7 @@ ; final_specs <- iterate_deriv 1 initial_solutions -- After simplification finishes, zonk the TcTyVars as described -- in Note [Overlap and deriving].- ; traverse zonkDerivSpec final_specs }+ ; initZonkEnv DefaultFlexi $ traverse zonkDerivSpec final_specs } where ------------------------------------------------------------------ -- The initial solutions for the equations claim that each@@ -756,7 +758,7 @@ solveWanteds wanteds -- It's not yet zonked! Obviously zonk it before peering at it- ; solved_wanteds <- zonkWC solved_wanteds+ ; solved_wanteds <- liftZonkM $ zonkWC solved_wanteds -- See [STEP DAC HOIST] -- From the simplified constraints extract a subset 'good' that will@@ -768,8 +770,8 @@ -- Returns @Just p@ (where @p@ is the type of the Ct) if a Ct is -- suitable to be inferred in the context of a derived instance. -- Returns @Nothing@ if the Ct is too exotic.- -- See Note [Exotic derived instance contexts] for what- -- constitutes an exotic constraint.+ -- See (VD2) in Note [Valid 'deriving' predicate] in+ -- GHC.Tc.Validity for what constitutes an exotic constraint. get_good :: Ct -> Maybe PredType get_good ct | validDerivPred head_size p = Just p | otherwise = Nothing@@ -798,8 +800,9 @@ 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- -- in this line of code.+ -- See also Note [Valid 'deriving' predicate] in GHC.Tc.Validity, as this+ -- line of code catches "exotic" constraints like the ones described in+ -- (VD2) of that Note. ; simplifyTopImplic leftover_implic ; traceTc "GHC.Tc.Deriv" (ppr deriv_rhs $$ ppr min_theta)@@ -807,7 +810,7 @@ -- Claim: the result instance declaration is guaranteed valid -- Hence no need to call: -- checkValidInstance tyvars theta clas inst_tys- -- See Note [Exotic derived instance contexts]+ -- See Note [Valid 'deriving' predicate] in GHC.Tc.Validity ; return min_theta } @@ -1008,7 +1011,8 @@ cannot solve, which might include: 1. Insoluble constraints-2. "Exotic" constraints (See Note [Exotic derived instance contexts])+2. "Exotic" constraints (See Note [Valid 'deriving' predicate] in+ GHC.Tc.Validity) Then we report an error immediately in simplifyDeriv. @@ -1029,55 +1033,4 @@ all the constraints in <residual_wanted_constraints>, then everything is hunky-dory. But if <residual_wanted_constraints> contains, say, an insoluble constraint, then (Foo a) won't be able to solve it, causing GHC to error.--Note [Exotic derived instance contexts]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In a 'derived' instance declaration, we *infer* the context. It's a-bit unclear what rules we should apply for this; the Haskell report is-silent. Obviously, constraints like (Eq a) are fine, but what about- data T f a = MkT (f a) deriving( Eq )-where we'd get an Eq (f a) constraint. That's probably fine too.--One could go further: consider- data T a b c = MkT (Foo a b c) deriving( Eq )- instance (C Int a, Eq b, Eq c) => Eq (Foo a b c)--Notice that this instance (just) satisfies the Paterson termination-conditions. Then we *could* derive an instance decl like this:-- instance (C Int a, Eq b, Eq c) => Eq (T a b c)-even though there is no instance for (C Int a), because there just-*might* be an instance for, say, (C Int Bool) at a site where we-need the equality instance for T's.--However, this seems pretty exotic, and it's quite tricky to allow-this, and yet give sensible error messages in the (much more common)-case where we really want that instance decl for C.--So for now we simply require that the derived instance context-should have only type-variable constraints.--Here is another example:- data Fix f = In (f (Fix f)) deriving( Eq )-Here, if we are prepared to allow -XUndecidableInstances we-could derive the instance- instance Eq (f (Fix f)) => Eq (Fix f)-but this is so delicate that I don't think it should happen inside-'deriving'. If you want this, write it yourself!--NB: if you want to lift this condition, make sure you still meet the-termination conditions! If not, the deriving mechanism generates-larger and larger constraints. Example:- data Succ a = S a- data Seq a = Cons a (Seq (Succ a)) | Nil deriving Show--Note the lack of a Show instance for Succ. First we'll generate- instance (Show (Succ a), Show a) => Show (Seq a)-and then- instance (Show (Succ (Succ a)), Show (Succ a), Show a) => Show (Seq a)-and so on. Instead we want to complain of no instance for (Show (Succ a)).--The bottom line-~~~~~~~~~~~~~~~-Allow constraints which consist only of type variables, with no repeats. -}
GHC/Tc/Deriv/Utils.hs view
@@ -39,7 +39,7 @@ import GHC.Tc.Utils.Monad import GHC.Tc.Utils.TcType import GHC.Tc.Utils.Unify (tcSubTypeSigma)-import GHC.Tc.Utils.Zonk+import GHC.Tc.Zonk.Type import GHC.Core.Class import GHC.Core.DataCon@@ -66,7 +66,6 @@ import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Error-import GHC.Utils.Unique (sameUnique) import Control.Monad.Trans.Reader import Data.Foldable (traverse_)@@ -231,22 +230,22 @@ setDerivSpecTheta theta ds = ds{ds_theta = theta} -- | Zonk the 'TcTyVar's in a 'DerivSpec' to 'TyVar's.--- See @Note [What is zonking?]@ in "GHC.Tc.Utils.TcMType".+-- See @Note [What is zonking?]@ in "GHC.Tc.Zonk.Type". -- -- This is only used in the final zonking step when inferring -- the context for a derived instance. -- See @Note [Overlap and deriving]@ in "GHC.Tc.Deriv.Infer".-zonkDerivSpec :: DerivSpec ThetaType -> TcM (DerivSpec ThetaType)+zonkDerivSpec :: DerivSpec ThetaType -> ZonkTcM (DerivSpec ThetaType) zonkDerivSpec ds@(DS { ds_tvs = tvs, ds_theta = theta , ds_tys = tys, ds_mechanism = mechanism- }) = do- (ze, tvs') <- zonkTyBndrs tvs- theta' <- zonkTcTypesToTypesX ze theta- tys' <- zonkTcTypesToTypesX ze tys- mechanism' <- zonkDerivSpecMechanism ze mechanism- pure ds{ ds_tvs = tvs', ds_theta = theta'- , ds_tys = tys', ds_mechanism = mechanism'- }+ }) =+ runZonkBndrT (zonkTyBndrsX tvs) $ \ tvs' -> do+ theta' <- zonkTcTypesToTypesX theta+ tys' <- zonkTcTypesToTypesX tys+ mechanism' <- zonkDerivSpecMechanism mechanism+ pure ds{ ds_tvs = tvs', ds_theta = theta'+ , ds_tys = tys', ds_mechanism = mechanism'+ } -- | What action to take in order to derive a class instance. -- See @Note [DerivEnv and DerivSpecMechanism]@, as well as@@ -308,26 +307,26 @@ isDerivSpecVia _ = False -- | Zonk the 'TcTyVar's in a 'DerivSpecMechanism' to 'TyVar's.--- See @Note [What is zonking?]@ in "GHC.Tc.Utils.TcMType".+-- See @Note [What is zonking?]@ in "GHC.Tc.Zonk.Type". -- -- This is only used in the final zonking step when inferring -- the context for a derived instance. -- See @Note [Overlap and deriving]@ in "GHC.Tc.Deriv.Infer".-zonkDerivSpecMechanism :: ZonkEnv -> DerivSpecMechanism -> TcM DerivSpecMechanism-zonkDerivSpecMechanism ze mechanism =+zonkDerivSpecMechanism :: DerivSpecMechanism -> ZonkTcM DerivSpecMechanism+zonkDerivSpecMechanism mechanism = case mechanism of DerivSpecStock { dsm_stock_dit = dit , dsm_stock_gen_fns = gen_fns } -> do- dit' <- zonkDerivInstTys ze dit+ dit' <- zonkDerivInstTys dit pure $ DerivSpecStock { dsm_stock_dit = dit' , dsm_stock_gen_fns = gen_fns } DerivSpecNewtype { dsm_newtype_dit = dit , dsm_newtype_rep_ty = rep_ty } -> do- dit' <- zonkDerivInstTys ze dit- rep_ty' <- zonkTcTypeToTypeX ze rep_ty+ dit' <- zonkDerivInstTys dit+ rep_ty' <- zonkTcTypeToTypeX rep_ty pure $ DerivSpecNewtype { dsm_newtype_dit = dit' , dsm_newtype_rep_ty = rep_ty' }@@ -337,9 +336,9 @@ , dsm_via_inst_ty = inst_ty , dsm_via_ty = via_ty } -> do- cls_tys' <- zonkTcTypesToTypesX ze cls_tys- inst_ty' <- zonkTcTypeToTypeX ze inst_ty- via_ty' <- zonkTcTypeToTypeX ze via_ty+ cls_tys' <- zonkTcTypesToTypesX cls_tys+ inst_ty' <- zonkTcTypeToTypeX inst_ty+ via_ty' <- zonkTcTypeToTypeX via_ty pure $ DerivSpecVia { dsm_via_cls_tys = cls_tys' , dsm_via_inst_ty = inst_ty' , dsm_via_ty = via_ty'@@ -894,37 +893,37 @@ -- class for which stock deriving isn't possible. stockSideConditions :: DerivContext -> Class -> Maybe Condition stockSideConditions deriv_ctxt cls- | sameUnique cls_key eqClassKey = Just (cond_std `andCond` cond_args cls)- | sameUnique cls_key ordClassKey = Just (cond_std `andCond` cond_args cls)- | sameUnique cls_key showClassKey = Just (cond_std `andCond` cond_args cls)- | sameUnique cls_key readClassKey = Just (cond_std `andCond` cond_args cls)- | sameUnique cls_key enumClassKey = Just (cond_std `andCond` cond_isEnumeration)- | sameUnique cls_key ixClassKey = Just (cond_std `andCond` cond_enumOrProduct cls)- | sameUnique cls_key boundedClassKey = Just (cond_std `andCond` cond_enumOrProduct cls)- | sameUnique cls_key dataClassKey = Just (checkFlag LangExt.DeriveDataTypeable `andCond`- cond_vanilla `andCond`- cond_args cls)- | sameUnique cls_key functorClassKey = Just (checkFlag LangExt.DeriveFunctor `andCond`- cond_vanilla `andCond`- cond_functorOK True False)- | sameUnique cls_key foldableClassKey = Just (checkFlag LangExt.DeriveFoldable `andCond`- cond_vanilla `andCond`- cond_functorOK False True)- -- Functor/Fold/Trav works ok- -- for rank-n types- | sameUnique cls_key traversableClassKey = Just (checkFlag LangExt.DeriveTraversable `andCond`- cond_vanilla `andCond`- cond_functorOK False False)- | sameUnique cls_key genClassKey = Just (checkFlag LangExt.DeriveGeneric `andCond`- cond_vanilla `andCond`- cond_RepresentableOk)- | sameUnique cls_key gen1ClassKey = Just (checkFlag LangExt.DeriveGeneric `andCond`- cond_vanilla `andCond`- cond_Representable1Ok)- | sameUnique cls_key liftClassKey = Just (checkFlag LangExt.DeriveLift `andCond`- cond_vanilla `andCond`- cond_args cls)- | otherwise = Nothing+ | 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)+ | cls_key == readClassKey = Just (cond_std `andCond` cond_args cls)+ | cls_key == enumClassKey = Just (cond_std `andCond` cond_isEnumeration)+ | cls_key == ixClassKey = Just (cond_std `andCond` cond_enumOrProduct cls)+ | cls_key == boundedClassKey = Just (cond_std `andCond` cond_enumOrProduct cls)+ | cls_key == dataClassKey = Just (checkFlag LangExt.DeriveDataTypeable `andCond`+ cond_vanilla `andCond`+ cond_args cls)+ | cls_key == functorClassKey = Just (checkFlag LangExt.DeriveFunctor `andCond`+ cond_vanilla `andCond`+ cond_functorOK True False)+ | cls_key == foldableClassKey = Just (checkFlag LangExt.DeriveFoldable `andCond`+ cond_vanilla `andCond`+ cond_functorOK False True)+ -- Functor/Fold/Trav works ok+ -- for rank-n types+ | cls_key == traversableClassKey = Just (checkFlag LangExt.DeriveTraversable `andCond`+ cond_vanilla `andCond`+ cond_functorOK False False)+ | cls_key == genClassKey = Just (checkFlag LangExt.DeriveGeneric `andCond`+ cond_vanilla `andCond`+ cond_RepresentableOk)+ | cls_key == gen1ClassKey = Just (checkFlag LangExt.DeriveGeneric `andCond`+ cond_vanilla `andCond`+ cond_Representable1Ok)+ | cls_key == liftClassKey = Just (checkFlag LangExt.DeriveLift `andCond`+ cond_vanilla `andCond`+ cond_args cls)+ | otherwise = Nothing where cls_key = getUnique cls cond_std = cond_stdOK deriv_ctxt False
GHC/Tc/Errors.hs view
@@ -1,11 +1,11 @@ +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE ParallelListComp #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}-{-# OPTIONS_GHC -Wno-incomplete-record-updates #-} module GHC.Tc.Errors( reportUnsolved, reportAllUnsolved, warnAllUnsolved,@@ -18,7 +18,7 @@ import GHC.Prelude import GHC.Driver.Env (hsc_units)-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Ppr import GHC.Driver.Config.Diagnostic @@ -30,9 +30,9 @@ import GHC.Tc.Errors.Ppr import GHC.Tc.Types.Constraint import GHC.Tc.Utils.TcMType-import GHC.Tc.Utils.Env( tcInitTidyEnv )+import GHC.Tc.Zonk.Type import GHC.Tc.Utils.TcType-import GHC.Tc.Utils.Unify ( checkTyVarEq )+import GHC.Tc.Zonk.TcType import GHC.Tc.Types.Origin import GHC.Tc.Types.Evidence import GHC.Tc.Types.EvTerm@@ -41,8 +41,7 @@ import {-# SOURCE #-} GHC.Tc.Errors.Hole ( findValidHoleFits, getHoleFitDispConfig, pprHoleFit ) import GHC.Types.Name-import GHC.Types.Name.Reader ( lookupGRE_Name, GlobalRdrEnv, mkRdrUnqual- , emptyLocalRdrEnv, lookupGlobalRdrEnv , lookupLocalRdrOcc )+import GHC.Types.Name.Reader import GHC.Types.Id import GHC.Types.Var import GHC.Types.Var.Set@@ -69,7 +68,6 @@ import GHC.Utils.Misc import GHC.Utils.Outputable as O import GHC.Utils.Panic-import GHC.Utils.Panic.Plain import GHC.Utils.FV ( fvVarList, unionFV ) import GHC.Data.Bag@@ -81,9 +79,9 @@ import Data.Foldable ( toList ) import Data.Function ( on ) import Data.List ( partition, sort, sortBy )-import Data.List.NonEmpty ( NonEmpty(..) )+import Data.List.NonEmpty ( NonEmpty(..), nonEmpty ) import qualified Data.List.NonEmpty as NE-import Data.Ord ( comparing )+import Data.Ord ( comparing ) import qualified Data.Semigroup as S {-@@ -217,7 +215,7 @@ , text "scope holes:" <+> ppr out_of_scope_holes ] ; traceTc "reportUnsolved (before zonking and tidying)" (ppr wanted) - ; wanted <- zonkWC wanted -- Zonk to reveal all information+ ; wanted <- liftZonkM $ zonkWC wanted -- Zonk to reveal all information ; let tidy_env = tidyFreeTyCoVars emptyTidyEnv free_tvs free_tvs = filterOut isCoVar $@@ -335,7 +333,7 @@ , ic_given = given , ic_wanted = wanted, ic_binds = evb , ic_status = status, ic_info = info- , ic_env = tcl_env+ , ic_env = ct_loc_env , ic_tclvl = tc_lvl }) | BracketSkol <- info , not insoluble@@ -350,13 +348,13 @@ , text "skols: " <+> pprTyVars tvs , text "tidy skols:" <+> pprTyVars tvs' ] - ; when bad_telescope $ reportBadTelescope ctxt tcl_env info tvs+ ; when bad_telescope $ reportBadTelescope ctxt ct_loc_env info tvs -- Do /not/ use the tidied tvs because then are in the -- wrong order, so tidying will rename things wrongly ; reportWanteds ctxt' tc_lvl wanted -- Report redundant (unused) constraints- ; warnRedundantConstraints ctxt' tcl_env info' dead_givens }+ ; warnRedundantConstraints ctxt' ct_loc_env info' dead_givens } where insoluble = isInsolubleStatus status (env1, tvs') = tidyVarBndrs (cec_tidy ctxt) $@@ -390,7 +388,7 @@ IC_BadTelescope -> True _ -> False -warnRedundantConstraints :: SolverReportErrCtxt -> TcLclEnv -> SkolemInfoAnon -> [EvVar] -> TcM ()+warnRedundantConstraints :: SolverReportErrCtxt -> CtLocEnv -> SkolemInfoAnon -> [EvVar] -> TcM () -- See Note [Tracking redundant constraints] in GHC.Tc.Solver warnRedundantConstraints ctxt env info redundant_evs | not (cec_warn_redundant ctxt)@@ -409,24 +407,21 @@ | SigSkol user_ctxt _ _ <- info -- When dealing with a user-written type signature, -- we want to add "In the type signature for f".- = restoreLclEnv env $- setSrcSpan (redundantConstraintsSpan user_ctxt) $- report_redundant_msg True- -- ^^^^ add "In the type signature..."+ = report_redundant_msg True (setCtLocEnvLoc env (redundantConstraintsSpan user_ctxt))+ -- ^^^^ add "In the type signature..." | otherwise -- But for InstSkol there already *is* a surrounding -- "In the instance declaration for Eq [a]" context -- and we don't want to say it twice. Seems a bit ad-hoc- = restoreLclEnv env- $ report_redundant_msg False- -- ^^^^^ don't add "In the type signature..."+ = report_redundant_msg False env+ -- ^^^^^ don't add "In the type signature..." where report_redundant_msg :: Bool -- whether to add "In the type signature..." to the diagnostic+ -> CtLocEnv -> TcRn ()- report_redundant_msg show_info- = do { lcl_env <- getLclEnv- ; msg <-+ report_redundant_msg show_info lcl_env+ = do { msg <- mkErrorReport lcl_env (TcRnRedundantConstraints redundant_evs (info, show_info))@@ -434,7 +429,7 @@ [] ; reportDiagnostic msg } -reportBadTelescope :: SolverReportErrCtxt -> TcLclEnv -> SkolemInfoAnon -> [TcTyVar] -> TcM ()+reportBadTelescope :: SolverReportErrCtxt -> CtLocEnv -> SkolemInfoAnon -> [TcTyVar] -> TcM () reportBadTelescope ctxt env (ForAllSkol telescope) skols = do { msg <- mkErrorReport env@@ -476,11 +471,12 @@ ; (suppress, m_evdest) <- case ctEvidence ct of CtGiven {} -> return (False, Nothing) CtWanted { ctev_rewriters = rewriters, ctev_dest = dest }- -> do { supp <- anyUnfilledCoercionHoles rewriters- ; return (supp, Just dest) }+ -> do { rewriters' <- zonkRewriterSet rewriters+ ; return (not (isEmptyRewriterSet rewriters'), Just dest) } - ; let m_reason = case ct of CIrredCan { cc_reason = reason } -> Just reason- _ -> Nothing+ ; let m_reason = case ct of+ CIrredCan (IrredCt { ir_reason = reason }) -> Just reason+ _ -> Nothing ; return $ Just $ EI { ei_pred = ctPred ct , ei_evdest = m_evdest@@ -506,20 +502,24 @@ , text "tidy_items1 =" <+> ppr tidy_items1 , text "tidy_errs =" <+> ppr tidy_errs ]) - -- Catch an awkward case in which /all/ errors are suppressed:- -- see Wrinkle at end of Note [Wanteds rewrite Wanteds] in GHC.Tc.Types.Constraint- -- Unless we are sure that an error will be reported some other way (details- -- in the defn of tidy_items) un-suppress the lot. This makes sure we don't forget to- -- report an error at all, which is catastrophic: GHC proceeds to desguar and optimise- -- the program, even though it is full of type errors (#22702, #22793)+ -- Catch an awkward (and probably rare) case in which /all/ errors are+ -- suppressed: see Wrinkle (WRW2) in Note [Prioritise Wanteds with empty+ -- RewriterSet] in GHC.Tc.Types.Constraint.+ --+ -- Unless we are sure that an error will be reported some other way+ -- (details in the defn of tidy_items) un-suppress the lot. This makes+ -- sure we don't forget to report an error at all, which is+ -- catastrophic: GHC proceeds to desguar and optimise the program, even+ -- though it is full of type errors (#22702, #22793) ; errs_already <- ifErrsM (return True) (return False) ; let tidy_items | not errs_already -- Have not already reported an error (perhaps -- from an outer implication); see #21405 , not (any ignoreConstraint simples) -- No error is ignorable (is reported elsewhere) , all ei_suppress tidy_items1 -- All errors are suppressed- = map unsuppressErrorItem tidy_items1- | otherwise = tidy_items1+ = map unsuppressErrorItem tidy_items1+ | otherwise+ = tidy_items1 -- First, deal with any out-of-scope errors: ; let (out_of_scope, other_holes, not_conc_errs) = partition_errors tidy_errs@@ -602,6 +602,7 @@ -- 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)+ -- (Handles TypeError and Unsatisfiable) , given_eq_spec , ("insoluble2", utterly_wrong, True, mkGroupReporter mkEqErr)@@ -614,7 +615,7 @@ -- where alpha is untouchable; and representational equalities -- Prefer homogeneous equalities over hetero, because the -- former might be holding up the latter.- -- See Note [Equalities with incompatible kinds] in GHC.Tc.Solver.Canonical+ -- See Note [Equalities with incompatible kinds] in GHC.Tc.Solver.Equality , ("Homo eqs", is_homo_equality, True, mkGroupReporter mkEqErr) , ("Other eqs", is_equality, True, mkGroupReporter mkEqErr) ]@@ -657,7 +658,12 @@ non_tv_eq _ (EqPred NomEq ty1 _) = not (isTyVarTy ty1) non_tv_eq _ _ = False - is_user_type_error item _ = isUserTypeError (errorItemPred item)+ -- Catch TypeError and Unsatisfiable.+ -- Here, we want any nested TypeErrors to bubble up, so we use+ -- 'containsUserTypeError' and not 'isTopLevelUserTypeError'.+ --+ -- See also Note [Implementation of Unsatisfiable constraints], point (F).+ is_user_type_error item _ = containsUserTypeError (errorItemPred item) is_homo_equality _ (EqPred _ ty1 ty2) = typeKind ty1 `tcEqType` typeKind ty2@@ -800,16 +806,141 @@ If there is any trouble, checkValidFamInst bleats, aborting compilation. --}+Note [Implementation of Unsatisfiable constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The Unsatisfiable constraint was introduced in GHC proposal #433 (https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0433-unsatisfiable.rst).+See Note [The Unsatisfiable constraint] in GHC.TypeError. +Its implementation consists of the following: + A. The definitions. + The Unsatisfiable class is defined in GHC.TypeError, in base.+ It consists of the following definitions:++ type Unsatisfiable :: ErrorMessage -> Constraint+ class Unsatisfiable msg where+ unsatisfiableLifted :: a++ unsatisfiable :: forall {rep} (msg :: ErrorMessage) (a :: TYPE rep). Unsatisfiable msg => a+ unsatisfiable = unsatisfiableLifted @msg @((##) -> a) (##)++ The class TyCon as well as the unsatisfiable Id have known-key Names+ in GHC; they are not wired-in.++ B. Unsatisfiable instances.++ The Unsatisfiable typeclass has no instances (see GHC.Tc.Instance.Class.matchGlobalInst).++ Users are prevented from writing instances in GHC.Tc.Validity.check_special_inst_head.+ This is done using the same mechanism as for, say, Coercible or WithDict.++ C. Using [G] Unsatisfiable msg to solve any Wanted.++ In GHC.Tc.Solver.simplifyTopWanteds, after defaulting happens, when an+ implication contains Givens of the form [G] Unsatisfiable msg, and the+ implication supports term-level evidence (as per Note [Coercion evidence only]+ in GHC.Tc.Types.Evidence), we use any such Given to solve all the Wanteds+ in that implication. See GHC.Tc.Solver.useUnsatisfiableGivens.++ The way we construct the evidence terms is slightly complicated by+ Type vs Constraint considerations; see Note [Evidence terms from Unsatisfiable Givens]+ in GHC.Tc.Solver.++ The proposal explains why this happens after defaulting: if there are other+ ways to solve the Wanteds, we would prefer to use that, as that will make+ user programs "as defined as possible".++ Wrinkle [Ambiguity]++ We also use an Unsatisfiable Given to solve Wanteds when performing an+ ambiguity check. See the call to "useUnsatisfiableGivens" in+ GHC.Tc.Solver.simplifyAmbiguityCheck.++ This is, for example, required to typecheck the definition+ of "unsatisfiable" itself:++ unsatisfiable :: forall {rep} (msg :: ErrorMessage) (a :: TYPE rep). Unsatisfiable msg => a++ The ambiguity check on this type signature will produce++ [G] Unsatisfiable msg1, [W] Unsatisfiable msg2++ and we want to ensure the Given solves the Wanted, to accept the definition.++ NB:++ An alternative would be to add a functional dependency on Unsatisfiable:++ class Unsatisfiable msg | -> msg++ Then we would unify msg1 and msg2 in the above constraint solving problem,+ and would be able to solve the Wanted using the Given in the normal way.+ However, adding such a functional dependency solely for this purpose+ could have undesirable consequences. For example, one might have++ [W] Unsatisfiable (Text "msg1"), [W] Unsatisfiable (Text "msg2")++ and W-W fundep interaction would produce the insoluble constraint++ [W] "msg1" ~ "msg2"++ which we definitely wouldn't want to report to the user.++ D. Adding "meth = unsatisfiable @msg" method bindings.++ When a class instance has an "Unsatisfiable msg" constraint in its context,+ and the user has omitted methods, we add method bindings of the form+ "meth = unsatisfiable @msg".+ See GHC.Tc.TyCl.Instance.tcMethods, in particular "tc_default".++ Example:++ class C a where { op :: a -> a }+ instance Unsatisfiable Msg => C [a] where {}++ elaborates to++ instance Unsatisfiable Msg => C [a] where { op = unsatisfiable @Msg }++ due to the (Unsatisfiable Msg) constraint in the instance context.++ We also switch off the "missing methods" warning in this situation.+ See "checkMinimalDefinition" in GHC.Tc.TyCl.Instance.tcMethods.++ Note that we do this even when there is a default method available. This+ ensures we run into the unsatisfiable error message when deferring type+ errors; otherwise we could end up with a runtime loop as seen in #23816.++ E. Switching off functional dependency coverage checks when there is+ an "Unsatisfiable msg" context.++ This is because we want to allow users to rule out certain instances with+ an "unsatisfiable" error, even when that would violate a functional+ dependency. For example:++ class C a b | a -> b+ instance Unsatisfiable (Text "No") => C a b++ See GHC.Tc.Instance.FunDeps.checkInstCoverage.++ F. Error reporting of "Unsatisfiable msg" constraints.++ This is done in GHC.Tc.Errors.reportWanteds: we detect when a constraint+ is of the form "Unsatisfiable msg" and just emit the custom message+ as an error to the user.++ This is the only way that "Unsatisfiable msg" constraints are reported,+ which makes their behaviour much more predictable than TypeError.+-}++ -------------------------------------------- -- Reporters -------------------------------------------- type Reporter- = SolverReportErrCtxt -> [ErrorItem] -> TcM ()+ = SolverReportErrCtxt -> NonEmpty ErrorItem -> TcM () type ReporterSpec = ( String -- Name , ErrorItem -> Pred -> Bool -- Pick these ones@@ -820,10 +951,10 @@ -- Suppress duplicates with either the same LHS, or same location -- Pre-condition: all items are equalities mkSkolReporter ctxt items- = mapM_ (reportGroup mkEqErr ctxt) (group items)+ = mapM_ (reportGroup mkEqErr ctxt) (group (toList items)) where group [] = []- group (item:items) = (item : yeses) : group noes+ group (item:items) = (item :| yeses) : group noes where (yeses, noes) = partition (group_with item) items @@ -841,7 +972,8 @@ holes' = filter (keepThisHole severity) holes -- Zonk and tidy all the TcLclEnvs before calling `mkHoleError` -- because otherwise types will be zonked and tidied many times over.- (tidy_env', lcl_name_cache) <- zonkTidyTcLclEnvs (cec_tidy ctxt) (map (ctl_env . hole_loc) holes')+ (tidy_env', lcl_name_cache) <- liftZonkM $+ zonkTidyTcLclEnvs (cec_tidy ctxt) (map (ctl_env . hole_loc) holes') let ctxt' = ctxt { cec_tidy = tidy_env' } forM_ holes' $ \hole -> do { msg <- mkHoleError lcl_name_cache tidy_items ctxt' hole ; reportDiagnostic msg }@@ -858,19 +990,19 @@ SevIgnore -> False _ -> True --- | zonkTidyTcLclEnvs takes a bunch of 'TcLclEnv's, each from a Hole.+-- | zonkTidyTcLclEnvs takes a bunch of 'CtLocEnv's, each from a Hole. -- It returns a ('Name' :-> 'Type') mapping which gives the zonked, tidied--- type for each Id in any of the binder stacks in the 'TcLclEnv's.+-- type for each Id in any of the binder stacks in the 'CtLocEnv's. -- Since there is a huge overlap between these stacks, is is much, -- much faster to do them all at once, avoiding duplication.-zonkTidyTcLclEnvs :: TidyEnv -> [TcLclEnv] -> TcM (TidyEnv, NameEnv Type)-zonkTidyTcLclEnvs tidy_env lcls = foldM go (tidy_env, emptyNameEnv) (concatMap tcl_bndrs lcls)+zonkTidyTcLclEnvs :: TidyEnv -> [CtLocEnv] -> ZonkM (TidyEnv, NameEnv Type)+zonkTidyTcLclEnvs tidy_env lcls = foldM go (tidy_env, emptyNameEnv) (concatMap ctl_bndrs lcls) where go envs tc_bndr = case tc_bndr of TcTvBndr {} -> return envs TcIdBndr id _top_lvl -> go_one (idName id) (idType id) envs TcIdBndr_ExpType name et _top_lvl ->- do { mb_ty <- readExpType_maybe et+ do { mb_ty <- liftIO $ readExpType_maybe et -- et really should be filled in by now. But there's a chance -- it hasn't, if, say, we're reporting a kind error en route to -- checking a term. See test indexed-types/should_fail/T8129@@ -932,18 +1064,23 @@ mkUserTypeErrorReporter :: Reporter mkUserTypeErrorReporter ctxt = mapM_ $ \item -> do { let err = important ctxt $ mkUserTypeError item- ; maybeReportError ctxt [item] err+ ; maybeReportError ctxt (item :| []) err ; addDeferredBinding ctxt err item } mkUserTypeError :: ErrorItem -> TcSolverReportMsg-mkUserTypeError item =- case getUserTypeErrorMsg (errorItemPred item) of- Just msg -> UserTypeError msg- Nothing -> pprPanic "mkUserTypeError" (ppr item)+mkUserTypeError item+ | Just msg <- getUserTypeErrorMsg pty+ = UserTypeError msg+ | Just msg <- isUnsatisfiableCt_maybe pty+ = UnsatisfiableError msg+ | otherwise+ = pprPanic "mkUserTypeError" (ppr item)+ where+ pty = errorItemPred item mkGivenErrorReporter :: Reporter -- See Note [Given errors]-mkGivenErrorReporter ctxt items+mkGivenErrorReporter ctxt (item:|_) = do { (ctxt, relevant_binds, item) <- relevantBindings True ctxt item ; let (implic:_) = cec_encl ctxt -- Always non-empty when mkGivenErrorReporter is called@@ -960,7 +1097,6 @@ ; msg <- mkErrorReport (ctLocEnv loc') msg (Just ctxt) supplementary ; reportDiagnostic msg } where- (item : _ ) = items -- Never empty (ty1, ty2) = getEqPredTys (errorItemPred item) ignoreErrorReporter :: Reporter@@ -1005,13 +1141,13 @@ find one, we report the insoluble Given. -} -mkGroupReporter :: (SolverReportErrCtxt -> [ErrorItem] -> TcM SolverReport)+mkGroupReporter :: (SolverReportErrCtxt -> NonEmpty ErrorItem -> TcM SolverReport) -- Make error message for a group -> Reporter -- Deal with lots of constraints -- Group together errors from same location, -- and report only the first (to avoid a cascade) mkGroupReporter mk_err ctxt items- = mapM_ (reportGroup mk_err ctxt . toList) (equivClasses cmp_loc items)+ = mapM_ (reportGroup mk_err ctxt) (equivClasses cmp_loc (toList items)) eq_lhs_type :: ErrorItem -> ErrorItem -> Bool eq_lhs_type item1 item2@@ -1027,7 +1163,7 @@ -- Reduce duplication by reporting only one error from each -- /starting/ location even if the end location differs -reportGroup :: (SolverReportErrCtxt -> [ErrorItem] -> TcM SolverReport) -> Reporter+reportGroup :: (SolverReportErrCtxt -> NonEmpty ErrorItem -> TcM SolverReport) -> Reporter reportGroup mk_err ctxt items = do { err <- mk_err ctxt items ; traceTc "About to maybeReportErr" $@@ -1051,11 +1187,11 @@ nonDeferrableOrigin _ = False maybeReportError :: SolverReportErrCtxt- -> [ErrorItem] -- items covered by the Report+ -> NonEmpty ErrorItem -- items covered by the Report -> SolverReport -> TcM ()-maybeReportError ctxt items@(item1:_) (SolverReport { sr_important_msg = important- , sr_supplementary = supp- , sr_hints = hints })+maybeReportError ctxt items@(item1:|_) (SolverReport { sr_important_msg = important+ , sr_supplementary = supp+ , sr_hints = hints }) = unless (cec_suppress ctxt -- Some worse error has occurred, so suppress this diagnostic || all ei_suppress items) $ -- if they're all to be suppressed, report nothing@@ -1068,7 +1204,6 @@ diag = TcRnSolverReport important reason hints msg <- mkErrorReport (ctLocEnv (errorItemCtLoc item1)) diag (Just ctxt) supp reportDiagnostic msg-maybeReportError _ _ _ = panic "maybeReportError" addDeferredBinding :: SolverReportErrCtxt -> SolverReport -> ErrorItem -> TcM () -- See Note [Deferring coercion errors to runtime]@@ -1081,11 +1216,11 @@ ; case dest of EvVarDest evar- -> addTcEvBind ev_binds_var $ mkWantedEvBind evar err_tm+ -> addTcEvBind ev_binds_var $ mkWantedEvBind evar True err_tm HoleDest hole -> do { -- See Note [Deferred errors for coercion holes] let co_var = coHoleCoVar hole- ; addTcEvBind ev_binds_var $ mkWantedEvBind co_var err_tm+ ; addTcEvBind ev_binds_var $ mkWantedEvBind co_var True err_tm ; fillCoercionHole hole (mkCoVarCo co_var) } } addDeferredBinding _ _ _ = return () -- Do not set any evidence for Given @@ -1127,11 +1262,10 @@ -- But suppress their error messages tryReporter :: SolverReportErrCtxt -> ReporterSpec -> [ErrorItem] -> TcM (SolverReportErrCtxt, [ErrorItem])-tryReporter ctxt (str, keep_me, suppress_after, reporter) items- | null yeses- = return (ctxt, items)- | otherwise- = do { traceTc "tryReporter{ " (text str <+> ppr yeses)+tryReporter ctxt (str, keep_me, suppress_after, reporter) items = case nonEmpty yeses of+ Nothing -> pure (ctxt, items)+ Just yeses -> 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]@@ -1144,7 +1278,7 @@ -- | Wrap an input 'TcRnMessage' with additional contextual information, -- such as relevant bindings or valid hole fits.-mkErrorReport :: TcLclEnv+mkErrorReport :: CtLocEnv -> TcRnMessage -- ^ The main payload of the message. -> Maybe SolverReportErrCtxt@@ -1155,7 +1289,7 @@ -- ^ Supplementary information, to be added at the end of the message. -> TcM (MsgEnvelope TcRnMessage) mkErrorReport tcl_env msg mb_ctxt supplementary- = do { mb_context <- traverse (\ ctxt -> mkErrInfo (cec_tidy ctxt) (tcl_ctxt tcl_env)) mb_ctxt+ = do { mb_context <- traverse (\ ctxt -> mkErrInfo (cec_tidy ctxt) (ctl_ctxt tcl_env)) mb_ctxt ; unit_state <- hsc_units <$> getTopEnv ; hfdc <- getHoleFitDispConfig ; let@@ -1165,7 +1299,7 @@ (vcat $ map (pprSolverReportSupplementary hfdc) supplementary) ; let detailed_msg = mkDetailedMessage err_info msg ; mkTcRnMessage- (RealSrcSpan (tcl_loc tcl_env) Strict.Nothing)+ (RealSrcSpan (ctl_loc tcl_env) Strict.Nothing) (TcRnMessageWithInfo unit_state $ detailed_msg) } @@ -1271,23 +1405,14 @@ ************************************************************************ -} -mkIrredErr :: SolverReportErrCtxt -> [ErrorItem] -> TcM SolverReport+mkIrredErr :: SolverReportErrCtxt -> NonEmpty ErrorItem -> TcM SolverReport mkIrredErr ctxt items = do { (ctxt, binds, item1) <- relevantBindings True ctxt item1 ; let msg = important ctxt $ mkPlainMismatchMsg $ CouldNotDeduce (getUserGivens ctxt) (item1 :| others) Nothing ; return $ add_relevant_bindings binds msg } where- (item1:others) = final_items-- filtered_items = filter (not . ei_suppress) items- final_items | null filtered_items = items- -- they're all suppressed; must report *something*- -- NB: even though reportWanteds asserts that not- -- all items are suppressed, it's possible all the- -- irreducibles are suppressed, and so this function- -- might get all suppressed items- | otherwise = filtered_items+ item1:|others = tryFilter (not . ei_suppress) items {- Note [Constructing Hole Errors] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1328,15 +1453,9 @@ mkHoleError :: NameEnv Type -> [ErrorItem] -> SolverReportErrCtxt -> Hole -> TcM (MsgEnvelope TcRnMessage) mkHoleError _ _tidy_simples ctxt hole@(Hole { hole_occ = occ, hole_loc = ct_loc }) | isOutOfScopeHole hole- = do { dflags <- getDynFlags- ; rdr_env <- getGlobalRdrEnv- ; imp_info <- getImports- ; curr_mod <- getModule- ; hpt <- getHpt- ; let (imp_errs, hints)- = unknownNameSuggestions WL_Anything- dflags hpt curr_mod rdr_env- (tcl_rdr lcl_env) imp_info occ+ = do { (imp_errs, hints)+ <- unknownNameSuggestions (ctl_rdr lcl_env) WL_Anything occ+ ; let err = SolverReportWithCtxt ctxt (ReportHoleError hole $ OutOfScopeHole imp_errs) report = SolverReport err [] hints @@ -1368,7 +1487,7 @@ ; (ctxt, hole_fits) <- if show_valid_hole_fits then validHoleFits ctxt tidy_simples hole else return (ctxt, noValidHoleFits)- ; (grouped_skvs, other_tvs) <- zonkAndGroupSkolTvs hole_ty+ ; (grouped_skvs, other_tvs) <- liftZonkM $ zonkAndGroupSkolTvs hole_ty ; let reason | ExprHole _ <- sort = cec_expr_holes ctxt | otherwise = cec_type_holes ctxt err = SolverReportWithCtxt ctxt $ ReportHoleError hole $ HoleError sort other_tvs grouped_skvs@@ -1386,18 +1505,24 @@ -- | For all the skolem type variables in a type, zonk the skolem info and group together -- all the type variables with the same origin.-zonkAndGroupSkolTvs :: Type -> TcM ([(SkolemInfoAnon, [TcTyVar])], [TcTyVar])+zonkAndGroupSkolTvs :: Type -> ZonkM ([(SkolemInfoAnon, [TcTyVar])], [TcTyVar]) zonkAndGroupSkolTvs hole_ty = do- zonked_info <- mapM (\(sk, tv) -> (,) <$> (zonkSkolemInfoAnon . getSkolemInfo $ sk) <*> pure (fst <$> tv)) skolem_list+ zonked_info <- mapM zonk_skolem_info skolem_list return (zonked_info, other_tvs) where+ zonk_skolem_info (sk, tv) =+ do { sk <- zonkSkolemInfoAnon $ getSkolemInfo sk+ ; return (sk, fst <$> tv) } tvs = tyCoVarsOfTypeList hole_ty- (skol_tvs, other_tvs) = partition (\tv -> isTcTyVar tv && isSkolemTyVar tv) tvs+ (skol_tvs, other_tvs) = partition (isTcTyVar <&&> isSkolemTyVar) tvs group_skolems :: UM.UniqMap SkolemInfo ([(TcTyVar, Int)])- group_skolems = bagToList <$> UM.listToUniqMap_C unionBags [(skolemSkolInfo tv, unitBag (tv, n)) | tv <- skol_tvs | n <- [0..]]+ group_skolems = bagToList <$>+ UM.listToUniqMap_C unionBags+ [(skolemSkolInfo tv, unitBag (tv, n)) | tv <- skol_tvs | n <- [0..]] - skolem_list = sortBy (comparing (sort . map snd . snd)) (UM.nonDetEltsUniqMap group_skolems)+ skolem_list = sortBy (comparing (sort . map snd . snd))+ $ UM.nonDetUniqMapToList group_skolems {- Note [Adding deferred bindings] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1461,20 +1586,18 @@ givenConstraints ctxt = do { implic@Implic{ ic_given = given } <- cec_encl ctxt ; constraint <- given- ; return (varType constraint, tcl_loc (ic_env implic)) }+ ; return (varType constraint, getCtLocEnvLoc (ic_env implic)) } ---------------- -mkIPErr :: SolverReportErrCtxt -> [ErrorItem] -> TcM SolverReport+mkIPErr :: SolverReportErrCtxt -> NonEmpty ErrorItem -> TcM SolverReport -- What would happen if an item is suppressed because of -- Note [Wanteds rewrite Wanteds] in GHC.Tc.Types.Constraint? Very unclear -- what's best. Let's not worry about this.-mkIPErr ctxt items+mkIPErr ctxt (item1:|others) = do { (ctxt, binds, item1) <- relevantBindings True ctxt item1 ; let msg = important ctxt $ UnboundImplicitParams (item1 :| others) ; return $ add_relevant_bindings binds msg }- where- item1:others = items ---------------- @@ -1483,16 +1606,16 @@ -- but doesn't. -- -- See Note [Reporting representation-polymorphism errors] in GHC.Tc.Types.Origin.-mkFRRErr :: HasDebugCallStack => SolverReportErrCtxt -> [ErrorItem] -> TcM SolverReport+mkFRRErr :: HasDebugCallStack => SolverReportErrCtxt -> NonEmpty ErrorItem -> TcM SolverReport mkFRRErr ctxt items = do { -- Process the error items. ; (_tidy_env, frr_infos) <-- zonkTidyFRRInfos (cec_tidy ctxt) $+ liftZonkM $ zonkTidyFRRInfos (cec_tidy ctxt) $ -- Zonk/tidy to show useful variable names. nubOrdBy (nonDetCmpType `on` (frr_type . frr_info_origin)) $ -- Remove duplicates: only one representation-polymorphism error per type.- map (expectJust "mkFRRErr" . fixedRuntimeRepOrigin_maybe)- items+ map (expectJust "mkFRRErr" . fixedRuntimeRepOrigin_maybe) $+ toList items ; return $ important ctxt $ FixedRuntimeRepError frr_infos } -- | Whether to report something using the @FixedRuntimeRep@ mechanism.@@ -1567,17 +1690,10 @@ -- Don't have multiple equality errors from the same location -- E.g. (Int,Bool) ~ (Bool,Int) one error will do!-mkEqErr :: SolverReportErrCtxt -> [ErrorItem] -> TcM SolverReport+mkEqErr :: SolverReportErrCtxt -> NonEmpty ErrorItem -> TcM SolverReport mkEqErr ctxt items- | item:_ <- filter (not . ei_suppress) items- = mkEqErr1 ctxt item-- | item:_ <- items -- they're all suppressed. still need an error message- -- for -fdefer-type-errors though- = mkEqErr1 ctxt item-- | otherwise- = panic "mkEqErr" -- guaranteed to have at least one item+ | item1 :| _ <- tryFilter (not . ei_suppress) items+ = mkEqErr1 ctxt item1 mkEqErr1 :: SolverReportErrCtxt -> ErrorItem -> TcM SolverReport mkEqErr1 ctxt item -- Wanted only@@ -1640,12 +1756,14 @@ mkEqErr_help ctxt item ty1 ty2 | Just casted_tv1 <- getCastedTyVar_maybe ty1 = mkTyVarEqErr ctxt item casted_tv1 ty2++ -- ToDo: explain.. Cf T2627b Dual (Dual a) ~ a | Just casted_tv2 <- getCastedTyVar_maybe ty2 = mkTyVarEqErr ctxt item casted_tv2 ty1+ | otherwise- = do- err <- reportEqErr ctxt item ty1 ty2- return (err, noHints)+ = do { err <- reportEqErr ctxt item ty1 ty2+ ; return (err, noHints) } reportEqErr :: SolverReportErrCtxt -> ErrorItem@@ -1653,18 +1771,18 @@ -> TcM TcSolverReportMsg reportEqErr ctxt item ty1 ty2 = do- mb_coercible_info <-- if errorItemEqRel item == ReprEq- then coercible_msg ty1 ty2- else return Nothing- return $- Mismatch- { mismatchMsg = mismatch- , mismatchTyVarInfo = Nothing- , mismatchAmbiguityInfo = eqInfos- , mismatchCoercibleInfo = mb_coercible_info }+ mb_coercible_info <- if errorItemEqRel item == ReprEq+ then coercible_msg ty1 ty2+ else return Nothing+ tv_info <- case getTyVar_maybe ty2 of+ Nothing -> return Nothing+ Just tv2 -> Just <$> extraTyVarEqInfo (tv2, Nothing) ty1+ return $ Mismatch { mismatchMsg = mismatch+ , mismatchTyVarInfo = tv_info+ , mismatchAmbiguityInfo = eqInfos+ , mismatchCoercibleInfo = mb_coercible_info } where- mismatch = misMatchOrCND False ctxt item ty1 ty2+ mismatch = misMatchOrCND ctxt item ty1 ty2 eqInfos = eqInfoMsgs ty1 ty2 coercible_msg :: TcType -> TcType -> TcM (Maybe CoercibleMsg)@@ -1689,11 +1807,11 @@ -- alpha[conc] ~# rr[sk] ? If so, handle that first. | Just frr_info <- mb_concrete_reason = do- (_, infos) <- zonkTidyFRRInfos (cec_tidy ctxt) [frr_info]+ (_, infos) <- liftZonkM $ zonkTidyFRRInfos (cec_tidy ctxt) [frr_info] return (FixedRuntimeRepError infos, []) - -- Impredicativity is a simple error to understand; try it before- -- anything more complicated.+ -- Impredicativity is a simple error to understand;+ -- try it before anything more complicated. | check_eq_result `cterHasProblem` cteImpredicative = do tyvar_eq_info <- extraTyVarEqInfo (tv1, Nothing) ty2@@ -1713,27 +1831,34 @@ -- to be helpful since this is just an unimplemented feature. return (main_msg, []) + -- Incompatible kinds+ -- This is wrinkle (EIK2) in Note [Equalities with incompatible kinds]+ -- in GHC.Tc.Solver.Equality+ | hasCoercionHoleCo co1 || hasCoercionHoleTy ty2+ = return (mkBlockedEqErr item, [])+ | isSkolemTyVar tv1 -- ty2 won't be a meta-tyvar; we would have- -- swapped in Solver.Canonical.canEqTyVarHomo+ -- swapped in Solver.Equality.canEqTyVarHomo || isTyVarTyVar tv1 && not (isTyVarTy ty2) || errorItemEqRel item == ReprEq -- The cases below don't really apply to ReprEq (except occurs check) = do tv_extra <- extraTyVarEqInfo (tv1, Nothing) ty2- reason <-- if errorItemEqRel item == ReprEq- then RepresentationalEq tv_extra <$> coercible_msg ty1 ty2- else return $ DifferentTyVars tv_extra- let main_msg =- CannotUnifyVariable- { mismatchMsg = headline_msg- , cannotUnifyReason = reason }+ reason <- if errorItemEqRel item == ReprEq+ then RepresentationalEq tv_extra <$> coercible_msg ty1 ty2+ else return $ DifferentTyVars tv_extra+ let main_msg = CannotUnifyVariable+ { mismatchMsg = headline_msg+ , cannotUnifyReason = reason } return (main_msg, add_sig) - | cterHasOccursCheck check_eq_result+ | tv1 `elemVarSet` tyCoVarsOfType ty2 -- We report an "occurs check" even for a ~ F t a, where F is a type -- function; it's not insoluble (because in principle F could reduce) -- but we have certainly been unable to solve it+ --+ -- Use tyCoVarsOfType because it might have begun as the canonical+ -- constraint (Dual (Dual a)) ~ a, and been swizzled by mkEqnErr_help = let ambiguity_infos = eqInfoMsgs ty1 ty2 interesting_tyvars = filter (not . noFreeVarsOfType . tyVarKind) $@@ -1752,11 +1877,6 @@ in return (main_msg, []) - -- This is wrinkle (4) in Note [Equalities with incompatible kinds] in- -- GHC.Tc.Solver.Canonical- | hasCoercionHoleCo co1 || hasCoercionHoleTy ty2- = return (mkBlockedEqErr item, [])- -- If the immediately-enclosing implication has 'tv' a skolem, and -- we know by now its an InferSkol kind of skolem, then presumably -- it started life as a TyVarTv, else it'd have been unified, given@@ -1804,14 +1924,13 @@ return (msg, add_sig) | otherwise- = do- err <- reportEqErr ctxt item (mkTyVarTy tv1) ty2- return (err, [])+ = do { err <- reportEqErr ctxt item (mkTyVarTy tv1) ty2+ ; return (err, []) } -- This *can* happen (#6123) -- Consider an ambiguous top-level constraint (a ~ F a) -- Not an occurs check, because F is a type function. where- headline_msg = misMatchOrCND insoluble_occurs_check ctxt item ty1 ty2+ headline_msg = misMatchOrCND ctxt item ty1 ty2 mismatch_msg = mkMismatchMsg item ty1 ty2 add_sig = maybeToList $ suggestAddSig ctxt ty1 ty2 @@ -1820,7 +1939,7 @@ -- there is an error is not sufficient. See #21430. mb_concrete_reason | Just frr_orig <- isConcreteTyVar_maybe tv1- , not (isConcrete ty2)+ , not (isConcreteType ty2) = Just $ frr_reason frr_orig tv1 ty2 | Just (tv2, frr_orig) <- isConcreteTyVarTy_maybe ty2 , not (isConcreteTyVar tv1)@@ -1838,12 +1957,7 @@ check_eq_result = case ei_m_reason item of Just (NonCanonicalReason result) -> result- _ -> checkTyVarEq tv1 ty2- -- in T2627b, we report an error for F (F a0) ~ a0. Note that the type- -- variable is on the right, so we don't get useful info for the CIrredCan,- -- and have to compute the result of checkTyVarEq here.-- insoluble_occurs_check = check_eq_result `cterHasProblem` cteInsolubleOccurs+ _ -> cteOK eqInfoMsgs :: TcType -> TcType -> [AmbiguityInfo] -- Report (a) ambiguity if either side is a type function application@@ -1878,11 +1992,11 @@ | otherwise = Nothing -misMatchOrCND :: Bool -> SolverReportErrCtxt -> ErrorItem+misMatchOrCND :: SolverReportErrCtxt -> ErrorItem -> TcType -> TcType -> MismatchMsg -- If oriented then ty1 is actual, ty2 is expected-misMatchOrCND insoluble_occurs_check ctxt item ty1 ty2- | insoluble_occurs_check -- See Note [Insoluble occurs check]+misMatchOrCND ctxt item ty1 ty2+ | insoluble_item -- See Note [Insoluble mis-match] || (isRigidTy ty1 && isRigidTy ty2) || (ei_flavour item == Given) || null givens@@ -1894,13 +2008,17 @@ = CouldNotDeduce givens (item :| []) (Just $ CND_Extra level ty1 ty2) where+ insoluble_item = case ei_m_reason item of+ Nothing -> False+ Just r -> isInsolubleReason r+ level = ctLocTypeOrKind_maybe (errorItemCtLoc item) `orElse` TypeLevel givens = [ given | given <- getUserGivens ctxt, ic_given_eqs given /= NoGivenEqs ] -- Keep only UserGivens that have some equalities. -- See Note [Suppress redundant givens during error reporting] --- These are for the "blocked" equalities, as described in TcCanonical--- Note [Equalities with incompatible kinds], wrinkle (2). There should+-- These are for the "blocked" equalities, as described in GHC.Tc.Solver.Equality+-- Note [Equalities with incompatible kinds], wrinkle (EIK2). There should -- always be another unsolved wanted around, which will ordinarily suppress -- this message. But this can still be printed out with -fdefer-type-errors -- (sigh), so we must produce a message.@@ -1968,7 +2086,7 @@ extraTyVarInfo tv = assertPpr (isTyVar tv) (ppr tv) $ case tcTyVarDetails tv of SkolemTv skol_info lvl overlaps -> do- new_skol_info <- zonkSkolemInfo skol_info+ new_skol_info <- liftZonkM $ zonkSkolemInfo skol_info return $ mkTcTyVar (tyVarName tv) (tyVarKind tv) (SkolemTv new_skol_info lvl overlaps) _ -> return tv @@ -2012,13 +2130,22 @@ , teq_mismatch_expected = uo_expected , teq_mismatch_what = mb_thing , teq_mb_same_occ = sameOccExtras ty2 ty1 })- KindEqOrigin cty1 cty2 sub_o mb_sub_t_or_k ->- (mkBasicMismatchMsg NoEA item ty1 ty2)- { mismatch_whenMatching = Just $ WhenMatching cty1 cty2 sub_o mb_sub_t_or_k- , mismatch_mb_same_occ = mb_same_occ }- _ ->- (mkBasicMismatchMsg NoEA item ty1 ty2)- { mismatch_mb_same_occ = mb_same_occ }+ KindEqOrigin cty1 cty2 sub_o mb_sub_t_or_k -> BasicMismatch+ { mismatch_ea = NoEA+ , mismatch_item = item+ , mismatch_ty1 = ty1+ , mismatch_ty2 = ty2+ , mismatch_whenMatching = Just $ WhenMatching cty1 cty2 sub_o mb_sub_t_or_k+ , mismatch_mb_same_occ = mb_same_occ+ }+ _ -> BasicMismatch+ { mismatch_ea = NoEA+ , mismatch_item = item+ , mismatch_ty1 = ty1+ , mismatch_ty2 = ty2+ , mismatch_whenMatching = Nothing+ , mismatch_mb_same_occ = mb_same_occ+ } where orig = errorItemOrigin item mb_same_occ = sameOccExtras ty2 ty1@@ -2042,8 +2169,8 @@ shouldPprWithExplicitKinds ty1 ty2 _ct = tcEqTypeVis ty1 ty2 -{- Note [Insoluble occurs check]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+{- Note [Insoluble mis-match]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider [G] a ~ [a], [W] a ~ [a] (#13674). The Given is insoluble so we don't use it for rewriting. The Wanted is also insoluble, and we don't solve it from the Given. It's very confusing to say@@ -2052,7 +2179,9 @@ And indeed even thinking about the Givens is silly; [W] a ~ [a] is just as insoluble as Int ~ Bool. -Conclusion: if there's an insoluble occurs check (cteInsolubleOccurs)+Exactly the same is true if we have [G] Int ~ Bool, [W] Int ~ Bool.++Conclusion: if there's an insoluble constraint (isInsolubleReason), then report it directly, not in the "cannot deduce X from Y" form. This is done in misMatchOrCND (via the insoluble_occurs_check arg) @@ -2142,10 +2271,9 @@ ************************************************************************ -} -mkDictErr :: HasDebugCallStack => SolverReportErrCtxt -> [ErrorItem] -> TcM SolverReport+mkDictErr :: HasDebugCallStack => SolverReportErrCtxt -> NonEmpty ErrorItem -> TcM SolverReport mkDictErr ctxt orig_items- = assert (not (null items)) $- do { inst_envs <- tcGetInstEnvs+ = do { inst_envs <- tcGetInstEnvs ; let min_items = elim_superclasses items lookups = map (lookup_cls_inst inst_envs) min_items (no_inst_items, overlap_items) = partition is_no_inst lookups@@ -2158,10 +2286,7 @@ ; err <- mk_dict_err ctxt (head (no_inst_items ++ overlap_items)) ; return $ important ctxt err } where- filtered_items = filter (not . ei_suppress) orig_items- items | null filtered_items = orig_items -- all suppressed, but must report- -- something for -fdefer-type-errors- | otherwise = filtered_items -- common case+ items = tryFilter (not . ei_suppress) orig_items no_givens = null (getUserGivens ctxt) @@ -2179,7 +2304,7 @@ -- When simplifying [W] Ord (Set a), we need -- [W] Eq a, [W] Ord a -- but we really only want to report the latter- elim_superclasses items = mkMinimalBySCs errorItemPred items+ elim_superclasses = mkMinimalBySCs errorItemPred . toList -- Note [mk_dict_err] -- ~~~~~~~~~~~~~~~~~~~@@ -2198,7 +2323,7 @@ (Nothing, _) -> do -- No matches but perhaps several unifiers { (_, rel_binds, item) <- relevantBindings True ctxt item ; candidate_insts <- get_candidate_instances- ; (imp_errs, field_suggestions) <- record_field_suggestions+ ; (imp_errs, field_suggestions) <- record_field_suggestions item ; return (cannot_resolve_msg item candidate_insts rel_binds imp_errs field_suggestions) } -- Some matches => overlap errors@@ -2234,21 +2359,36 @@ | otherwise = False -- See Note [Out-of-scope fields with -XOverloadedRecordDot]- record_field_suggestions :: TcM ([ImportError], [GhcHint])- record_field_suggestions = flip (maybe $ return ([], noHints)) record_field $ \name ->+ record_field_suggestions :: ErrorItem -> TcM ([ImportError], [GhcHint])+ record_field_suggestions item = flip (maybe $ return ([], noHints)) record_field $ \name -> do { glb_env <- getGlobalRdrEnv ; lcl_env <- getLocalRdrEnv- ; if occ_name_in_scope glb_env lcl_env name- then return ([], noHints)- else do { dflags <- getDynFlags- ; imp_info <- getImports- ; curr_mod <- getModule- ; hpt <- getHpt- ; return (unknownNameSuggestions WL_RecField dflags hpt curr_mod- glb_env emptyLocalRdrEnv imp_info (mkRdrUnqual name)) } }+ ; let field_name_hints = report_no_fieldnames item+ ; (errs, hints) <- if occ_name_in_scope glb_env lcl_env name+ then return ([], noHints)+ else unknownNameSuggestions emptyLocalRdrEnv WL_RecField (mkRdrUnqual name)+ ; pure (errs, hints ++ field_name_hints)+ } + -- get type names from instance+ -- resolve the type - if it's in scope is it a record?+ -- if it's a record, report an error - the record name + the field that could not be found+ report_no_fieldnames :: ErrorItem -> [GhcHint]+ report_no_fieldnames item+ | Just (EvVarDest evvar) <- ei_evdest item+ -- we can assume that here we have a `HasField @Symbol x r a` instance+ -- because of HasFieldOrigin in record_field+ , Just (_, [_symbol, x, r, a]) <- tcSplitTyConApp_maybe (varType evvar)+ , Just (r_tycon, _) <- tcSplitTyConApp_maybe r+ , Just x_name <- isStrLitTy x+ -- we check that this is a record type by checking whether it has any+ -- fields (in scope)+ , not . null $ tyConFieldLabels r_tycon+ = [RemindRecordMissingField x_name r a]+ | otherwise = []+ occ_name_in_scope glb_env lcl_env occ_name = not $- null (lookupGlobalRdrEnv glb_env occ_name) &&+ null (lookupGRE glb_env (LookupOccName occ_name (RelevantGREsFOS WantNormal))) && isNothing (lookupLocalRdrOcc lcl_env occ_name) record_field = case orig of@@ -2356,7 +2496,7 @@ -- Also returns the zonked and tidied CtOrigin of the constraint relevantBindings want_filtering ctxt item = do { traceTc "relevantBindings" (ppr item)- ; (env1, tidy_orig) <- zonkTidyOrigin (cec_tidy ctxt) (ctLocOrigin loc)+ ; (env1, tidy_orig) <- liftZonkM $ zonkTidyOrigin (cec_tidy ctxt) (ctLocOrigin loc) -- For *kind* errors, report the relevant bindings of the -- enclosing *type* equality, because that's more useful for the programmer@@ -2369,7 +2509,7 @@ loc' = setCtLocOrigin loc tidy_orig item' = item { ei_loc = loc' } - ; (env2, lcl_name_cache) <- zonkTidyTcLclEnvs env1 [lcl_env]+ ; (env2, lcl_name_cache) <- liftZonkM $ zonkTidyTcLclEnvs env1 [lcl_env] ; relev_bds <- relevant_bindings want_filtering lcl_env lcl_name_cache ct_fvs ; let ctxt' = ctxt { cec_tidy = env2 }@@ -2380,7 +2520,7 @@ -- slightly more general version, to work also with holes relevant_bindings :: Bool- -> TcLclEnv+ -> CtLocEnv -> NameEnv Type -- Cache of already zonked and tidied types -> TyCoVarSet -> TcM RelevantBindings@@ -2389,13 +2529,13 @@ ; traceTc "relevant_bindings" $ vcat [ ppr ct_tvs , pprWithCommas id [ ppr id <+> dcolon <+> ppr (idType id)- | TcIdBndr id _ <- tcl_bndrs lcl_env ]+ | TcIdBndr id _ <- ctl_bndrs lcl_env ] , pprWithCommas id- [ ppr id | TcIdBndr_ExpType id _ _ <- tcl_bndrs lcl_env ] ]+ [ ppr id | TcIdBndr_ExpType id _ _ <- ctl_bndrs lcl_env ] ] ; go dflags (maxRelevantBinds dflags) emptyVarSet (RelevantBindings [] False)- (removeBindingShadowing $ tcl_bndrs lcl_env)+ (removeBindingShadowing $ ctl_bndrs lcl_env) -- tcl_bndrs has the innermost bindings first, -- which are probably the most relevant ones }@@ -2419,7 +2559,7 @@ TcTvBndr {} -> discard_it TcIdBndr id top_lvl -> go2 (idName id) top_lvl TcIdBndr_ExpType name et top_lvl ->- do { mb_ty <- readExpType_maybe et+ do { mb_ty <- liftIO $ readExpType_maybe et -- et really should be filled in by now. But there's a chance -- it hasn't, if, say, we're reporting a kind error en route to -- checking a term. See test indexed-types/should_fail/T8129@@ -2467,7 +2607,7 @@ = panic "warnDefaulting: empty Wanteds" warnDefaulting the_tv wanteds@(ct:_) default_ty = do { warn_default <- woptM Opt_WarnTypeDefaults- ; env0 <- tcInitTidyEnv+ ; env0 <- liftZonkM $ tcInitTidyEnv -- don't want to report all the superclass constraints, which -- add unhelpful clutter ; let filtered = filter (not . isWantedSuperclassOrigin . ctOrigin) wanteds@@ -2514,3 +2654,9 @@ CouldNotDeduce {} -> [] _ -> []++-- | Filter the list by the given predicate, but if that would be empty,+-- just give back the original list.+-- We use this as we must report something for fdefer-type-errors.+tryFilter :: (a -> Bool) -> NonEmpty a -> NonEmpty a+tryFilter f as = fromMaybe as $ nonEmpty (filter f (toList as))
GHC/Tc/Errors/Hole.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE MultiWayIf #-} {-# LANGUAGE ExistentialQuantification #-} module GHC.Tc.Errors.Hole@@ -23,7 +24,7 @@ , sortHoleFitsBySize - -- Re-exported from GHC.Tc.Errors.Hole.FitTypes+ -- Re-exported from GHC.Tc.Errors.Hole.Plugin , HoleFitPlugin (..), HoleFitPluginR (..) ) where@@ -39,12 +40,15 @@ import GHC.Tc.Utils.TcMType import GHC.Tc.Types.Evidence import GHC.Tc.Utils.TcType+import GHC.Tc.Zonk.TcType import GHC.Core.Type+import GHC.Core.TyCon( TyCon, isGenerativeTyCon )+import GHC.Core.TyCo.Rep( Type(..) ) import GHC.Core.DataCon+import GHC.Core.Predicate( Pred(..), classifyPredType, eqRelRole ) import GHC.Types.Name-import GHC.Types.Name.Reader ( pprNameProvenance , GlobalRdrElt (..)- , globalRdrEnvElts, greMangledName, grePrintableName )-import GHC.Builtin.Names ( gHC_ERR )+import GHC.Types.Name.Reader+import GHC.Builtin.Names ( gHC_ERR, uNSAFE_COERCE ) import GHC.Types.Id import GHC.Types.Var.Set import GHC.Types.Var.Env@@ -55,7 +59,7 @@ import GHC.Utils.Panic import GHC.Tc.Utils.Env (tcLookup) import GHC.Utils.Outputable-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Data.Maybe import GHC.Utils.FV ( fvVarList, fvVarSet, unionFV, mkFVs, FV ) @@ -78,6 +82,7 @@ import GHC.Builtin.Utils (knownKeyNames) import GHC.Tc.Errors.Hole.FitTypes+import GHC.Tc.Errors.Hole.Plugin import qualified Data.Set as Set import GHC.Types.SrcLoc import GHC.Data.FastString (NonDetFastString(..))@@ -527,7 +532,7 @@ holeDisp = if sMs then holeVs else sep $ replicate (length hfMatches) $ text "_" occDisp = case hfCand of- GreHFCand gre -> pprPrefixOcc (grePrintableName gre)+ GreHFCand gre -> pprPrefixOcc (greName gre) NameHFCand name -> pprPrefixOcc name IdHFCand id_ -> pprPrefixOcc id_ tyDisp = ppWhen sTy $ dcolon <+> ppr hfType@@ -551,8 +556,8 @@ getLocalBindings :: TidyEnv -> CtLoc -> TcM [Id] getLocalBindings tidy_orig ct_loc- = do { (env1, _) <- zonkTidyOrigin tidy_orig (ctLocOrigin ct_loc)- ; go env1 [] (removeBindingShadowing $ tcl_bndrs lcl_env) }+ = do { (env1, _) <- liftZonkM $ zonkTidyOrigin tidy_orig (ctLocOrigin ct_loc)+ ; go env1 [] (removeBindingShadowing $ ctl_bndrs lcl_env) } where lcl_env = ctLocEnv ct_loc @@ -615,7 +620,7 @@ ; traceTc "numPlugins are:" $ ppr (length candidatePlugins) ; (searchDiscards, subs) <- tcFilterHoleFits findVLimit hole (hole_ty, []) cands- ; (tidy_env, tidy_subs) <- zonkSubs tidy_env subs+ ; (tidy_env, tidy_subs) <- liftZonkM $ zonkSubs tidy_env subs ; tidy_sorted_subs <- sortFits sortingAlg tidy_subs ; plugin_handled_subs <- foldM (flip ($)) tidy_sorted_subs fitPlugins ; let (pVDisc, limited_subs) = possiblyDiscard maxVSubs plugin_handled_subs@@ -638,13 +643,13 @@ else maxRSubs ; refDs <- mapM (flip (tcFilterHoleFits findRLimit hole) cands) ref_tys- ; (tidy_env, tidy_rsubs) <- zonkSubs tidy_env $ concatMap snd refDs+ ; (tidy_env, tidy_rsubs) <- liftZonkM $ 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+ ; (tidy_env, tidy_hole_ty) <- liftZonkM $ zonkTidyTcType tidy_env hole_ty ; let hasExactApp = any (tcEqType tidy_hole_ty) . hfWrap (exact, not_exact) = partition hasExactApp tidy_sorted_rsubs ; plugin_handled_rsubs <- foldM (flip ($))@@ -725,17 +730,17 @@ -- 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 :: TidyEnv -> [HoleFit] -> ZonkM (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 :: TidyEnv -> HoleFit -> TcM (TidyEnv, HoleFit)+ zonkSub :: TidyEnv -> HoleFit -> ZonkM (TidyEnv, HoleFit) zonkSub env hf@RawHoleFit{} = return (env, hf) zonkSub env hf@HoleFit{hfType = ty, hfMatches = m, hfWrap = wrp} = do { (env, ty') <- zonkTidyTcType env ty- ; (env, m') <- zonkTidyTcTypes env m+ ; (env, m') <- zonkTidyTcTypes env m ; (env, wrp') <- zonkTidyTcTypes env wrp ; let zFit = hf {hfType = ty', hfMatches = m', hfWrap = wrp'} ; return (env, zFit ) }@@ -818,8 +823,8 @@ _ -> discard_it } _ -> discard_it } where- -- We want to filter out undefined and the likes from GHC.Err- not_trivial id = nameModule_maybe (idName id) /= Just gHC_ERR+ -- We want to filter out undefined and the likes from GHC.Err (#17940)+ not_trivial id = nameModule_maybe (idName id) `notElem` [Just gHC_ERR, Just uNSAFE_COERCE] lookup :: HoleFitCandidate -> TcM (Maybe (Id, Type)) lookup (IdHFCand id) = return (Just (id, idType id))@@ -832,9 +837,9 @@ _ -> Nothing } where name = case hfc of #if __GLASGOW_HASKELL__ < 901- IdHFCand id -> idName id+ IdHFCand id -> idName id #endif- GreHFCand gre -> greMangledName gre+ GreHFCand gre -> greName gre NameHFCand name -> name discard_it = go subs seen maxleft ty elts keep_it eid eid_ty wrp ms = go (fit:subs) (extendVarSet seen eid)@@ -903,7 +908,7 @@ -- holes must be for this to be a match. ; if fits then do { -- Zonking is expensive, so we only do it if required.- z_wrp_tys <- zonkTcTypes (unfoldWrapper wrp)+ z_wrp_tys <- liftZonkM $ zonkTcTypes (unfoldWrapper wrp) ; if null ref_vars then return (Just (z_wrp_tys, [])) else do { let -- To be concrete matches, matches have to@@ -914,7 +919,7 @@ Just tv -> tv `elemVarSet` fvSet _ -> True allConcrete = all notAbstract z_wrp_tys- ; z_vars <- zonkTcTyVars ref_vars+ ; z_vars <- liftZonkM $ zonkTcTyVars ref_vars ; let z_mtvs = mapMaybe getTyVar_maybe z_vars ; allFilled <- not <$> anyM isFlexiTyVar z_mtvs ; allowAbstract <- goptM Opt_AbstractRefHoleFits@@ -982,28 +987,33 @@ tcSubTypeSigma orig (ExprSigCtxt NoRRC) ty hole_ty ; traceTc "Checking hole fit {" empty ; traceTc "wanteds are: " $ ppr wanted- ; if isEmptyWC wanted && isEmptyBag th_relevant_cts- then do { traceTc "}" empty- ; return (True, wrap) }- 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 cloneWantedCtEv th_relevant_cts- -- We wrap the WC in the nested implications, for details, see- -- Note [Checking hole fits]- ; let wrapInImpls cts = foldl (flip (setWCAndBinds fresh_binds)) cts th_implics- final_wc = wrapInImpls $ addSimples wanted $- mapBag mkNonCanonical cloned_relevants- -- We add the cloned relevants to the wanteds generated- -- by the call to tcSubType_NC, for details, see- -- Note [Relevant constraints]. There's no need to clone- -- the wanteds, because they are freshly generated by the- -- call to`tcSubtype_NC`.- ; traceTc "final_wc is: " $ ppr final_wc- -- See Note [Speeding up valid hole-fits]- ; (rem, _) <- tryTc $ runTcSEarlyAbort $ simplifyTopWanteds final_wc- ; traceTc "}" empty- ; return (any isSolvedWC rem, wrap) } }+ ; if | isEmptyWC wanted, isEmptyBag th_relevant_cts+ -> do { traceTc "}" empty+ ; return (True, wrap) }++ | checkInsoluble wanted -- See Note [Fast path for tcCheckHoleFit]+ -> return (False, wrap)++ | otherwise+ -> 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 cloneWantedCtEv th_relevant_cts+ -- We wrap the WC in the nested implications, for details, see+ -- Note [Checking hole fits]+ ; let wrapInImpls cts = foldl (flip (setWCAndBinds fresh_binds)) cts th_implics+ final_wc = wrapInImpls $ addSimples wanted $+ mapBag mkNonCanonical cloned_relevants+ -- We add the cloned relevants to the wanteds generated+ -- by the call to tcSubType_NC, for details, see+ -- Note [Relevant constraints]. There's no need to clone+ -- the wanteds, because they are freshly generated by the+ -- call to`tcSubtype_NC`.+ ; traceTc "final_wc is: " $ ppr final_wc+ -- See Note [Speeding up valid hole-fits]+ ; (rem, _) <- tryTc $ runTcSEarlyAbort $ simplifyTopWanteds final_wc+ ; traceTc "}" empty+ ; return (any isSolvedWC rem, wrap) } } where orig = ExprHoleOrigin (hole_occ <$> th_hole) @@ -1013,3 +1023,52 @@ -> WantedConstraints -- The new constraints. setWCAndBinds binds imp wc = mkImplicWC $ unitBag $ imp { ic_wanted = wc , ic_binds = binds }++{- Note [Fast path for tcCheckHoleFit]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In `tcCheckHoleFit` we compare (with `tcSubTypeSigma`) the type of the hole+with the type of zillions of in-scope functions, to see which would "fit".+Most of these checks fail! They generate obviously-insoluble constraints.+For these very-common cases we don't want to crank up the full constraint+solver. It's much more efficient to do a quick-and-dirty check for insolubility.++Now, `tcSubTypeSigma` uses the on-the-fly unifier in GHC.Tc.Utils.Unify,+it has already done the dirt-simple unification. So our quick-and-dirty+check can simply look for constraints like (Int ~ Bool). We don't need+to worry about (Maybe Int ~ Maybe Bool).++The quick-and-dirty check is in `checkInsoluble`. It can make a big+difference: For test hard_hole_fits, compile-time allocation goes down by 37%!+-}+++checkInsoluble :: WantedConstraints -> Bool+-- See Note [Fast path for tcCheckHoleFit]+checkInsoluble (WC { wc_simple = simples })+ = any is_insol simples+ where+ is_insol ct = case classifyPredType (ctPred ct) of+ EqPred r t1 t2 -> definitelyNotEqual (eqRelRole r) t1 t2+ _ -> False++definitelyNotEqual :: Role -> TcType -> TcType -> Bool+-- See Note [Fast path for tcCheckHoleFit]+-- Specifically, does not need to recurse under type constructors+definitelyNotEqual r t1 t2+ = go t1 t2+ where+ go t1 t2+ | Just t1' <- coreView t1 = go t1' t2+ | Just t2' <- coreView t2 = go t1 t2'++ go (TyConApp tc _) t2 | isGenerativeTyCon tc r = go_tc tc t2+ go t1 (TyConApp tc _) | isGenerativeTyCon tc r = go_tc tc t1+ go (FunTy {ft_af = af1}) (FunTy {ft_af = af2}) = af1 /= af2+ go _ _ = False++ go_tc :: TyCon -> TcType -> Bool+ -- The TyCon is generative, and is not a saturated FunTy+ go_tc tc1 (TyConApp tc2 _) | isGenerativeTyCon tc2 r = tc1 /= tc2+ go_tc _ (FunTy {}) = True+ go_tc _ (ForAllTy {}) = True+ go_tc _ _ = False
GHC/Tc/Errors/Hole.hs-boot view
@@ -12,6 +12,7 @@ import GHC.Types.Var.Env ( TidyEnv ) import GHC.Tc.Errors.Hole.FitTypes ( HoleFit, TypedHole, HoleFitCandidate ) import GHC.Tc.Utils.TcType ( TcType, TcSigmaType, TcTyVar )+import GHC.Tc.Zonk.Monad ( ZonkM ) import GHC.Tc.Types.Evidence ( HsWrapper ) import GHC.Utils.FV ( FV ) import Data.Bool ( Bool )@@ -37,6 +38,6 @@ getHoleFitSortingAlg :: TcM HoleFitSortingAlg getHoleFitDispConfig :: TcM HoleFitDispConfig -zonkSubs :: TidyEnv -> [HoleFit] -> TcM (TidyEnv, [HoleFit])+zonkSubs :: TidyEnv -> [HoleFit] -> ZonkM (TidyEnv, [HoleFit]) sortHoleFitsBySize :: [HoleFit] -> TcM [HoleFit] sortHoleFitsByGraph :: [HoleFit] -> TcM [HoleFit]
GHC/Tc/Errors/Hole/FitTypes.hs view
@@ -1,13 +1,11 @@ {-# LANGUAGE ExistentialQuantification #-} module GHC.Tc.Errors.Hole.FitTypes ( TypedHole (..), HoleFit (..), HoleFitCandidate (..),- CandPlugin, FitPlugin, HoleFitPlugin (..), HoleFitPluginR (..), hfIsLcl, pprHoleFitCand ) where import GHC.Prelude -import GHC.Tc.Types import GHC.Tc.Types.Constraint import GHC.Tc.Utils.TcType @@ -48,7 +46,7 @@ instance Eq HoleFitCandidate where IdHFCand i1 == IdHFCand i2 = i1 == i2 NameHFCand n1 == NameHFCand n2 = n1 == n2- GreHFCand gre1 == GreHFCand gre2 = gre_name gre1 == gre_name gre2+ GreHFCand gre1 == GreHFCand gre2 = greName gre1 == greName gre2 _ == _ = False instance Outputable HoleFitCandidate where@@ -63,11 +61,11 @@ getName hfc = case hfc of IdHFCand cid -> idName cid NameHFCand cname -> cname- GreHFCand cgre -> greMangledName cgre+ GreHFCand cgre -> greName cgre getOccName hfc = case hfc of IdHFCand cid -> occName cid NameHFCand cname -> occName cname- GreHFCand cgre -> occName (greMangledName cgre)+ GreHFCand cgre -> occName $ greName cgre instance HasOccName HoleFitCandidate where occName = getOccName@@ -126,25 +124,3 @@ hfIsLcl _ = False --- | A plugin for modifying the candidate hole fits *before* they're checked.-type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate]---- | A plugin for modifying hole fits *after* they've been found.-type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit]---- | A HoleFitPlugin is a pair of candidate and fit plugins.-data HoleFitPlugin = HoleFitPlugin- { candPlugin :: CandPlugin- , fitPlugin :: FitPlugin }---- | HoleFitPluginR adds a TcRef to hole fit plugins so that plugins can--- track internal state. Note the existential quantification, ensuring that--- the state cannot be modified from outside the plugin.-data HoleFitPluginR = forall s. HoleFitPluginR- { hfPluginInit :: TcM (TcRef s)- -- ^ Initializes the TcRef to be passed to the plugin- , hfPluginRun :: TcRef s -> HoleFitPlugin- -- ^ The function defining the plugin itself- , hfPluginStop :: TcRef s -> TcM ()- -- ^ Cleanup of state, guaranteed to be called even on error- }
− GHC/Tc/Errors/Hole/FitTypes.hs-boot
@@ -1,30 +0,0 @@--- This boot file is in place to break the loop where:--- + GHC.Tc.Types needs 'HoleFitPlugin',--- + which needs 'GHC.Tc.Errors.Hole.FitTypes'--- + which needs 'GHC.Tc.Types'-module GHC.Tc.Errors.Hole.FitTypes where--import GHC.Base (Int, Maybe)-import GHC.Types.Var (Id)-import GHC.Types.Name (Name)-import GHC.Types.Name.Reader (GlobalRdrElt)-import GHC.Tc.Utils.TcType (TcType)-import GHC.Hs.Doc (HsDocString)-import GHC.Utils.Outputable (SDoc)--data HoleFitCandidate- = IdHFCand Id- | NameHFCand Name- | GreHFCand GlobalRdrElt--data HoleFitPlugin-data HoleFit =- HoleFit { hfId :: Id- , hfCand :: HoleFitCandidate- , hfType :: TcType- , hfRefLvl :: Int- , hfWrap :: [TcType]- , hfMatches :: [TcType]- , hfDoc :: Maybe [HsDocString]- }- | RawHoleFit SDoc
+ GHC/Tc/Errors/Hole/Plugin.hs view
@@ -0,0 +1,29 @@+{-# LANGUAGE ExistentialQuantification #-}+module GHC.Tc.Errors.Hole.Plugin(CandPlugin, FitPlugin, HoleFitPlugin (..), HoleFitPluginR (..)) where++import GHC.Tc.Errors.Hole.FitTypes+import GHC.Tc.Types ( TcRef, TcM )+++-- | A plugin for modifying the candidate hole fits *before* they're checked.+type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate]++-- | A plugin for modifying hole fits *after* they've been found.+type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit]++-- | A HoleFitPlugin is a pair of candidate and fit plugins.+data HoleFitPlugin = HoleFitPlugin+ { candPlugin :: CandPlugin+ , fitPlugin :: FitPlugin }++-- | HoleFitPluginR adds a TcRef to hole fit plugins so that plugins can+-- track internal state. Note the existential quantification, ensuring that+-- the state cannot be modified from outside the plugin.+data HoleFitPluginR = forall s. HoleFitPluginR+ { hfPluginInit :: TcM (TcRef s)+ -- ^ Initializes the TcRef to be passed to the plugin+ , hfPluginRun :: TcRef s -> HoleFitPlugin+ -- ^ The function defining the plugin itself+ , hfPluginStop :: TcRef s -> TcM ()+ -- ^ Cleanup of state, guaranteed to be called even on error+ }
+ GHC/Tc/Errors/Hole/Plugin.hs-boot view
@@ -0,0 +1,3 @@+module GHC.Tc.Errors.Hole.Plugin where++data HoleFitPlugin
GHC/Tc/Errors/Ppr.hs view
@@ -20,4104 +20,6492 @@ , pprHsDocContext , inHsDocContext , TcRnMessageOpts(..)- )- where--import GHC.Prelude--import GHC.Builtin.Names-import GHC.Builtin.Types ( boxedRepDataConTyCon, tYPETyCon )--import GHC.Core.Coercion-import GHC.Core.Unify ( tcMatchTys )-import GHC.Core.TyCon-import GHC.Core.Class-import GHC.Core.DataCon-import GHC.Core.Coercion.Axiom (coAxiomTyCon, coAxiomSingleBranch)-import GHC.Core.ConLike-import GHC.Core.FamInstEnv ( famInstAxiom )-import GHC.Core.InstEnv-import GHC.Core.TyCo.Rep (Type(..))-import GHC.Core.TyCo.Ppr (pprWithExplicitKindsWhen,- pprSourceTyCon, pprTyVars, pprWithTYPE)-import GHC.Core.PatSyn ( patSynName, pprPatSynType )-import GHC.Core.Predicate-import GHC.Core.Type--import GHC.Driver.Flags-import GHC.Driver.Backend-import GHC.Hs--import GHC.Tc.Errors.Types-import GHC.Tc.Types.Constraint-import {-# SOURCE #-} GHC.Tc.Types( getLclEnvLoc, lclEnvInGeneratedCode )-import GHC.Tc.Types.Origin-import GHC.Tc.Types.Rank (Rank(..))-import GHC.Tc.Utils.TcType--import GHC.Types.Error-import GHC.Types.FieldLabel (flIsOverloaded)-import GHC.Types.Hint (UntickedPromotedThing(..), pprUntickedConstructor, isBareSymbol)-import GHC.Types.Hint.Ppr () -- Outputable GhcHint-import GHC.Types.Basic-import GHC.Types.Error.Codes ( constructorCode )-import GHC.Types.Id-import GHC.Types.Name-import GHC.Types.Name.Reader ( GreName(..), pprNameProvenance- , RdrName, rdrNameOcc, greMangledName )-import GHC.Types.Name.Set-import GHC.Types.SrcLoc-import GHC.Types.TyThing-import GHC.Types.Unique.Set ( nonDetEltsUniqSet )-import GHC.Types.Var-import GHC.Types.Var.Set-import GHC.Types.Var.Env--import GHC.Unit.State (pprWithUnitState, UnitState)-import GHC.Unit.Module-import GHC.Unit.Module.Warnings ( pprWarningTxtForMsg )--import GHC.Data.Bag-import GHC.Data.FastString-import GHC.Data.List.SetOps ( nubOrdBy )-import GHC.Data.Maybe-import GHC.Utils.Misc-import GHC.Utils.Outputable-import GHC.Utils.Panic--import qualified GHC.LanguageExtensions as LangExt--import GHC.Data.BooleanFormula (pprBooleanFormulaNice)--import Data.List.NonEmpty (NonEmpty(..))-import qualified Data.List.NonEmpty as NE-import Data.Function (on)-import Data.List ( groupBy, sortBy, tails- , partition, unfoldr )-import Data.Ord ( comparing )-import Data.Bifunctor-import GHC.Types.Name.Env-import qualified Language.Haskell.TH as TH--data TcRnMessageOpts = TcRnMessageOpts { tcOptsShowContext :: !Bool -- ^ Whether we show the error context or not- }--defaultTcRnMessageOpts :: TcRnMessageOpts-defaultTcRnMessageOpts = TcRnMessageOpts { tcOptsShowContext = True }---instance Diagnostic TcRnMessage where- type DiagnosticOpts TcRnMessage = TcRnMessageOpts- defaultDiagnosticOpts = defaultTcRnMessageOpts- diagnosticMessage opts = \case- TcRnUnknownMessage (UnknownDiagnostic @e m)- -> diagnosticMessage (defaultDiagnosticOpts @e) m- TcRnMessageWithInfo unit_state msg_with_info- -> case msg_with_info of- TcRnMessageDetailed err_info msg- -> messageWithInfoDiagnosticMessage unit_state err_info- (tcOptsShowContext opts)- (diagnosticMessage opts msg)- TcRnWithHsDocContext ctxt msg- -> if tcOptsShowContext opts- then main_msg `unionDecoratedSDoc` ctxt_msg- else main_msg- where- main_msg = diagnosticMessage opts msg- ctxt_msg = mkSimpleDecorated (inHsDocContext ctxt)- TcRnSolverReport msg _ _- -> mkSimpleDecorated $ pprSolverReportWithCtxt msg- TcRnRedundantConstraints redundants (info, show_info)- -> mkSimpleDecorated $- text "Redundant constraint" <> plural redundants <> colon- <+> pprEvVarTheta redundants- $$ if show_info then text "In" <+> ppr info else empty- TcRnInaccessibleCode implic contra- -> mkSimpleDecorated $- hang (text "Inaccessible code in")- 2 (ppr (ic_info implic))- $$ pprSolverReportWithCtxt contra- TcRnTypeDoesNotHaveFixedRuntimeRep ty prov (ErrInfo extra supplementary)- -> mkDecorated [pprTypeDoesNotHaveFixedRuntimeRep ty prov, extra, supplementary]- TcRnImplicitLift id_or_name ErrInfo{..}- -> mkDecorated $- ( text "The variable" <+> quotes (ppr id_or_name) <+>- text "is implicitly lifted in the TH quotation"- ) : [errInfoContext, errInfoSupplementary]- TcRnUnusedPatternBinds bind- -> mkDecorated [hang (text "This pattern-binding binds no variables:") 2 (ppr bind)]- TcRnDodgyImports name- -> mkDecorated [dodgy_msg (text "import") name (dodgy_msg_insert name :: IE GhcPs)]- TcRnDodgyExports name- -> mkDecorated [dodgy_msg (text "export") name (dodgy_msg_insert name :: IE GhcRn)]- TcRnMissingImportList ie- -> mkDecorated [ text "The import item" <+> quotes (ppr ie) <+>- text "does not have an explicit import list"- ]- TcRnUnsafeDueToPlugin- -> mkDecorated [text "Use of plugins makes the module unsafe"]- TcRnModMissingRealSrcSpan mod- -> mkDecorated [text "Module does not have a RealSrcSpan:" <+> ppr mod]- TcRnIdNotExportedFromModuleSig name mod- -> mkDecorated [ text "The identifier" <+> ppr (occName name) <+>- text "does not exist in the signature for" <+> ppr mod- ]- TcRnIdNotExportedFromLocalSig name- -> mkDecorated [ text "The identifier" <+> ppr (occName name) <+>- text "does not exist in the local signature."- ]- TcRnShadowedName occ provenance- -> let shadowed_locs = case provenance of- ShadowedNameProvenanceLocal n -> [text "bound at" <+> ppr n]- ShadowedNameProvenanceGlobal gres -> map pprNameProvenance gres- in mkSimpleDecorated $- sep [text "This binding for" <+> quotes (ppr occ)- <+> text "shadows the existing binding" <> plural shadowed_locs,- nest 2 (vcat shadowed_locs)]- TcRnDuplicateWarningDecls d rdr_name- -> mkSimpleDecorated $- vcat [text "Multiple warning declarations for" <+> quotes (ppr rdr_name),- text "also at " <+> ppr (getLocA d)]- TcRnSimplifierTooManyIterations simples limit wc- -> mkSimpleDecorated $- hang (text "solveWanteds: too many iterations"- <+> parens (text "limit =" <+> ppr limit))- 2 (vcat [ text "Unsolved:" <+> ppr wc- , text "Simples:" <+> ppr simples- ])- TcRnIllegalPatSynDecl rdrname- -> mkSimpleDecorated $- hang (text "Illegal pattern synonym declaration for" <+> quotes (ppr rdrname))- 2 (text "Pattern synonym declarations are only valid at top level")- TcRnLinearPatSyn ty- -> mkSimpleDecorated $- hang (text "Pattern synonyms do not support linear fields (GHC #18806):") 2 (ppr ty)- TcRnEmptyRecordUpdate- -> mkSimpleDecorated $ text "Empty record update"- TcRnIllegalFieldPunning fld- -> mkSimpleDecorated $ text "Illegal use of punning for field" <+> quotes (ppr fld)- TcRnIllegalWildcardsInRecord fld_part- -> mkSimpleDecorated $ text "Illegal `..' in record" <+> pprRecordFieldPart fld_part- TcRnIllegalWildcardInType mb_name bad- -> mkSimpleDecorated $ case bad of- WildcardNotLastInConstraint ->- hang notAllowed 2 constraint_hint_msg- ExtraConstraintWildcardNotAllowed allow_sole ->- case allow_sole of- SoleExtraConstraintWildcardNotAllowed ->- notAllowed- SoleExtraConstraintWildcardAllowed ->- hang notAllowed 2 sole_msg- WildcardsNotAllowedAtAll ->- notAllowed- where- notAllowed, what, wildcard, how :: SDoc- notAllowed = what <+> quotes wildcard <+> how- wildcard = case mb_name of- Nothing -> pprAnonWildCard- Just name -> ppr name- what- | Just _ <- mb_name- = text "Named wildcard"- | ExtraConstraintWildcardNotAllowed {} <- bad- = text "Extra-constraint wildcard"- | otherwise- = text "Wildcard"- how = case bad of- WildcardNotLastInConstraint- -> text "not allowed in a constraint"- _ -> text "not allowed"- constraint_hint_msg :: SDoc- constraint_hint_msg- | Just _ <- mb_name- = vcat [ text "Extra-constraint wildcards must be anonymous"- , nest 2 (text "e.g f :: (Eq a, _) => blah") ]- | otherwise- = vcat [ text "except as the last top-level constraint of a type signature"- , nest 2 (text "e.g f :: (Eq a, _) => blah") ]- sole_msg :: SDoc- sole_msg =- vcat [ text "except as the sole constraint"- , nest 2 (text "e.g., deriving instance _ => Eq (Foo a)") ]- TcRnDuplicateFieldName fld_part dups- -> mkSimpleDecorated $- hsep [text "duplicate field name",- quotes (ppr (NE.head dups)),- text "in record", pprRecordFieldPart fld_part]- TcRnIllegalViewPattern pat- -> mkSimpleDecorated $ vcat [text "Illegal view pattern: " <+> ppr pat]- TcRnCharLiteralOutOfRange c- -> mkSimpleDecorated $ text "character literal out of range: '\\" <> char c <> char '\''- TcRnIllegalWildcardsInConstructor con- -> mkSimpleDecorated $- vcat [ text "Illegal `..' notation for constructor" <+> quotes (ppr con)- , nest 2 (text "The constructor has no labelled fields") ]- TcRnIgnoringAnnotations anns- -> mkSimpleDecorated $- text "Ignoring ANN annotation" <> plural anns <> comma- <+> text "because this is a stage-1 compiler without -fexternal-interpreter or doesn't support GHCi"- TcRnAnnotationInSafeHaskell- -> mkSimpleDecorated $- vcat [ text "Annotations are not compatible with Safe Haskell."- , text "See https://gitlab.haskell.org/ghc/ghc/issues/10826" ]- TcRnInvalidTypeApplication fun_ty hs_ty- -> mkSimpleDecorated $- text "Cannot apply expression of type" <+> quotes (ppr fun_ty) $$- text "to a visible type argument" <+> quotes (ppr hs_ty)- TcRnTagToEnumMissingValArg- -> mkSimpleDecorated $- text "tagToEnum# must appear applied to one value argument"- TcRnTagToEnumUnspecifiedResTy ty- -> mkSimpleDecorated $- hang (text "Bad call to tagToEnum# at type" <+> ppr ty)- 2 (vcat [ text "Specify the type by giving a type signature"- , text "e.g. (tagToEnum# x) :: Bool" ])- TcRnTagToEnumResTyNotAnEnum ty- -> mkSimpleDecorated $- hang (text "Bad call to tagToEnum# at type" <+> ppr ty)- 2 (text "Result type must be an enumeration type")- TcRnTagToEnumResTyTypeData ty- -> mkSimpleDecorated $- hang (text "Bad call to tagToEnum# at type" <+> ppr ty)- 2 (text "Result type cannot be headed by a `type data` type")- TcRnArrowIfThenElsePredDependsOnResultTy- -> mkSimpleDecorated $- text "Predicate type of `ifThenElse' depends on result type"- TcRnIllegalHsBootFileDecl- -> mkSimpleDecorated $- text "Illegal declarations in an hs-boot file"- TcRnRecursivePatternSynonym binds- -> mkSimpleDecorated $- hang (text "Recursive pattern synonym definition with following bindings:")- 2 (vcat $ map pprLBind . bagToList $ binds)- where- pprLoc loc = parens (text "defined at" <+> ppr loc)- pprLBind :: CollectPass GhcRn => GenLocated (SrcSpanAnn' a) (HsBindLR GhcRn idR) -> SDoc- pprLBind (L loc bind) = pprWithCommas ppr (collectHsBindBinders CollNoDictBinders bind)- <+> pprLoc (locA loc)- TcRnPartialTypeSigTyVarMismatch n1 n2 fn_name hs_ty- -> mkSimpleDecorated $- hang (text "Couldn't match" <+> quotes (ppr n1)- <+> text "with" <+> quotes (ppr n2))- 2 (hang (text "both bound by the partial type signature:")- 2 (ppr fn_name <+> dcolon <+> ppr hs_ty))- TcRnPartialTypeSigBadQuantifier n fn_name m_unif_ty hs_ty- -> mkSimpleDecorated $- hang (text "Can't quantify over" <+> quotes (ppr n))- 2 (vcat [ hang (text "bound by the partial type signature:")- 2 (ppr fn_name <+> dcolon <+> ppr hs_ty)- , extra ])- where- extra | Just rhs_ty <- m_unif_ty- = sep [ quotes (ppr n), text "should really be", quotes (ppr rhs_ty) ]- | otherwise- = empty- TcRnMissingSignature what _ _ ->- mkSimpleDecorated $- case what of- MissingPatSynSig p ->- hang (text "Pattern synonym with no type signature:")- 2 (text "pattern" <+> pprPrefixName (patSynName p) <+> dcolon <+> pprPatSynType p)- MissingTopLevelBindingSig name ty ->- hang (text "Top-level binding with no type signature:")- 2 (pprPrefixName name <+> dcolon <+> pprSigmaType ty)- MissingTyConKindSig tc cusks_enabled ->- hang msg- 2 (text "type" <+> pprPrefixName (tyConName tc) <+> dcolon <+> pprKind (tyConKind tc))- where- msg | cusks_enabled- = text "Top-level type constructor with no standalone kind signature or CUSK:"- | otherwise- = text "Top-level type constructor with no standalone kind signature:"-- TcRnPolymorphicBinderMissingSig n ty- -> mkSimpleDecorated $- sep [ text "Polymorphic local binding with no type signature:"- , nest 2 $ pprPrefixName n <+> dcolon <+> ppr ty ]- TcRnOverloadedSig sig- -> mkSimpleDecorated $- hang (text "Overloaded signature conflicts with monomorphism restriction")- 2 (ppr sig)- TcRnTupleConstraintInst _- -> mkSimpleDecorated $ text "You can't specify an instance for a tuple constraint"- TcRnAbstractClassInst clas- -> mkSimpleDecorated $- text "Cannot define instance for abstract class" <+>- quotes (ppr (className clas))- TcRnNoClassInstHead tau- -> mkSimpleDecorated $- hang (text "Instance head is not headed by a class:") 2 (pprType tau)- TcRnUserTypeError ty- -> mkSimpleDecorated (pprUserTypeErrorTy ty)- TcRnConstraintInKind ty- -> mkSimpleDecorated $- text "Illegal constraint in a kind:" <+> pprType ty- TcRnUnboxedTupleOrSumTypeFuncArg tuple_or_sum ty- -> mkSimpleDecorated $- sep [ text "Illegal unboxed" <+> what <+> text "type as function argument:"- , pprType ty ]- where- what = case tuple_or_sum of- UnboxedTupleType -> text "tuple"- UnboxedSumType -> text "sum"- TcRnLinearFuncInKind ty- -> mkSimpleDecorated $- text "Illegal linear function in a kind:" <+> pprType ty- TcRnForAllEscapeError ty kind- -> mkSimpleDecorated $ vcat- [ hang (text "Quantified type's kind mentions quantified type variable")- 2 (text "type:" <+> quotes (ppr ty))- , hang (text "where the body of the forall has this kind:")- 2 (quotes (pprKind kind)) ]- TcRnVDQInTermType mb_ty- -> mkSimpleDecorated $ vcat- [ case mb_ty of- Nothing -> main_msg- Just ty -> hang (main_msg <> char ':') 2 (pprType ty)- , text "(GHC does not yet support this)" ]- where- main_msg =- text "Illegal visible, dependent quantification" <+>- text "in the type of a term"- TcRnBadQuantPredHead ty- -> mkSimpleDecorated $- hang (text "Quantified predicate must have a class or type variable head:")- 2 (pprType ty)- TcRnIllegalTupleConstraint ty- -> mkSimpleDecorated $- text "Illegal tuple constraint:" <+> pprType ty- TcRnNonTypeVarArgInConstraint ty- -> mkSimpleDecorated $- hang (text "Non type-variable argument")- 2 (text "in the constraint:" <+> pprType ty)- TcRnIllegalImplicitParam ty- -> mkSimpleDecorated $- text "Illegal implicit parameter" <+> quotes (pprType ty)- TcRnIllegalConstraintSynonymOfKind kind- -> mkSimpleDecorated $- text "Illegal constraint synonym of kind:" <+> quotes (pprKind kind)- TcRnIllegalClassInst tcf- -> mkSimpleDecorated $- vcat [ text "Illegal instance for a" <+> ppr tcf- , text "A class instance must be for a class" ]- TcRnOversaturatedVisibleKindArg ty- -> mkSimpleDecorated $- text "Illegal oversaturated visible kind argument:" <+>- quotes (char '@' <> pprParendType ty)- TcRnBadAssociatedType clas tc- -> mkSimpleDecorated $- hsep [ text "Class", quotes (ppr clas)- , text "does not have an associated type", quotes (ppr tc) ]- TcRnForAllRankErr rank ty- -> let herald = case tcSplitForAllTyVars ty of- ([], _) -> text "Illegal qualified type:"- _ -> text "Illegal polymorphic type:"- extra = case rank of- MonoTypeConstraint -> text "A constraint must be a monotype"- _ -> empty- in mkSimpleDecorated $ vcat [hang herald 2 (pprType ty), extra]- TcRnMonomorphicBindings bindings- -> let pp_bndrs = pprBindings bindings- in mkSimpleDecorated $- sep [ text "The Monomorphism Restriction applies to the binding"- <> plural bindings- , text "for" <+> pp_bndrs ]- TcRnOrphanInstance inst- -> mkSimpleDecorated $- hsep [ text "Orphan instance:"- , pprInstanceHdr inst- ]- TcRnFunDepConflict unit_state sorted- -> let herald = text "Functional dependencies conflict between instance declarations:"- in mkSimpleDecorated $- pprWithUnitState unit_state $ (hang herald 2 (pprInstances $ NE.toList sorted))- TcRnDupInstanceDecls unit_state sorted- -> let herald = text "Duplicate instance declarations:"- in mkSimpleDecorated $- pprWithUnitState unit_state $ (hang herald 2 (pprInstances $ NE.toList sorted))- TcRnConflictingFamInstDecls sortedNE- -> let sorted = NE.toList sortedNE- in mkSimpleDecorated $- hang (text "Conflicting family instance declarations:")- 2 (vcat [ pprCoAxBranchUser (coAxiomTyCon ax) (coAxiomSingleBranch ax)- | fi <- sorted- , let ax = famInstAxiom fi ])- TcRnFamInstNotInjective rea fam_tc (eqn1 NE.:| rest_eqns)- -> let (herald, show_kinds) = case rea of- InjErrRhsBareTyVar tys ->- (injectivityErrorHerald $$- text "RHS of injective type family equation is a bare" <+>- text "type variable" $$- text "but these LHS type and kind patterns are not bare" <+>- text "variables:" <+> pprQuotedList tys, False)- InjErrRhsCannotBeATypeFam ->- (injectivityErrorHerald $$- text "RHS of injective type family equation cannot" <+>- text "be a type family:", False)- InjErrRhsOverlap ->- (text "Type family equation right-hand sides overlap; this violates" $$- text "the family's injectivity annotation:", False)- InjErrCannotInferFromRhs tvs has_kinds _ ->- let show_kinds = has_kinds == YesHasKinds- what = if show_kinds then text "Type/kind" else text "Type"- body = sep [ what <+> text "variable" <>- pluralVarSet tvs <+> pprVarSet tvs (pprQuotedList . scopedSort)- , text "cannot be inferred from the right-hand side." ]- in (injectivityErrorHerald $$ body $$ text "In the type family equation:", show_kinds)-- in mkSimpleDecorated $ pprWithExplicitKindsWhen show_kinds $- hang herald- 2 (vcat (map (pprCoAxBranchUser fam_tc) (eqn1 : rest_eqns)))- TcRnBangOnUnliftedType ty- -> mkSimpleDecorated $- text "Strictness flag has no effect on unlifted type" <+> quotes (ppr ty)- TcRnLazyBangOnUnliftedType ty- -> mkSimpleDecorated $- text "Lazy flag has no effect on unlifted type" <+> quotes (ppr ty)- TcRnMultipleDefaultDeclarations dup_things- -> mkSimpleDecorated $- hang (text "Multiple default declarations")- 2 (vcat (map pp dup_things))- where- pp :: LDefaultDecl GhcRn -> SDoc- pp (L locn (DefaultDecl _ _))- = text "here was another default declaration" <+> ppr (locA locn)- TcRnBadDefaultType ty deflt_clss- -> mkSimpleDecorated $- hang (text "The default type" <+> quotes (ppr ty) <+> text "is not an instance of")- 2 (foldr1 (\a b -> a <+> text "or" <+> b) (map (quotes. ppr) deflt_clss))- TcRnPatSynBundledWithNonDataCon- -> mkSimpleDecorated $- text "Pattern synonyms can be bundled only with datatypes."- TcRnPatSynBundledWithWrongType expected_res_ty res_ty- -> mkSimpleDecorated $- text "Pattern synonyms can only be bundled with matching type constructors"- $$ text "Couldn't match expected type of"- <+> quotes (ppr expected_res_ty)- <+> text "with actual type of"- <+> quotes (ppr res_ty)- TcRnDupeModuleExport mod- -> mkSimpleDecorated $- hsep [ text "Duplicate"- , quotes (text "Module" <+> ppr mod)- , text "in export list" ]- TcRnExportedModNotImported mod- -> mkSimpleDecorated- $ formatExportItemError- (text "module" <+> ppr mod)- "is not imported"- TcRnNullExportedModule mod- -> mkSimpleDecorated- $ formatExportItemError- (text "module" <+> ppr mod)- "exports nothing"- TcRnMissingExportList mod- -> mkSimpleDecorated- $ formatExportItemError- (text "module" <+> ppr mod)- "is missing an export list"- TcRnExportHiddenComponents export_item- -> mkSimpleDecorated- $ formatExportItemError- (ppr export_item)- "attempts to export constructors or class methods that are not visible here"- TcRnDuplicateExport child ie1 ie2- -> mkSimpleDecorated $- hsep [ quotes (ppr child)- , text "is exported by", quotes (ppr ie1)- , text "and", quotes (ppr ie2) ]- TcRnExportedParentChildMismatch parent_name ty_thing child parent_names- -> mkSimpleDecorated $- text "The type constructor" <+> quotes (ppr parent_name)- <+> text "is not the parent of the" <+> text what_is- <+> quotes thing <> char '.'- $$ text (capitalise what_is)- <> text "s can only be exported with their parent type constructor."- $$ (case parents of- [] -> empty- [_] -> text "Parent:"- _ -> text "Parents:") <+> fsep (punctuate comma parents)- where- pp_category :: TyThing -> String- pp_category (AnId i)- | isRecordSelector i = "record selector"- pp_category i = tyThingCategory i- what_is = pp_category ty_thing- thing = ppr child- parents = map ppr parent_names- TcRnConflictingExports occ child1 gre1 ie1 child2 gre2 ie2- -> mkSimpleDecorated $- vcat [ text "Conflicting exports for" <+> quotes (ppr occ) <> colon- , ppr_export child1 gre1 ie1- , ppr_export child2 gre2 ie2- ]- where- ppr_export child gre ie = nest 3 (hang (quotes (ppr ie) <+> text "exports" <+>- quotes (ppr_name child))- 2 (pprNameProvenance gre))-- -- DuplicateRecordFields means that nameOccName might be a- -- mangled $sel-prefixed thing, in which case show the correct OccName- -- alone (but otherwise show the Name so it will have a module- -- qualifier)- ppr_name (FieldGreName fl) | flIsOverloaded fl = ppr fl- | otherwise = ppr (flSelector fl)- ppr_name (NormalGreName name) = ppr name- TcRnAmbiguousField rupd parent_type- -> mkSimpleDecorated $- vcat [ text "The record update" <+> ppr rupd- <+> text "with type" <+> ppr parent_type- <+> text "is ambiguous."- , text "This will not be supported by -XDuplicateRecordFields in future releases of GHC."- ]- TcRnMissingFields con fields- -> mkSimpleDecorated $ vcat [header, nest 2 rest]- where- rest | null fields = empty- | otherwise = vcat (fmap pprField fields)- header = text "Fields of" <+> quotes (ppr con) <+>- text "not initialised" <>- if null fields then empty else colon- TcRnFieldUpdateInvalidType prs- -> mkSimpleDecorated $- hang (text "Record update for insufficiently polymorphic field"- <> plural prs <> colon)- 2 (vcat [ ppr f <+> dcolon <+> ppr ty | (f,ty) <- prs ])- TcRnNoConstructorHasAllFields conflictingFields- -> mkSimpleDecorated $- hang (text "No constructor has all these fields:")- 2 (pprQuotedList conflictingFields)- TcRnMixedSelectors data_name data_sels pat_name pat_syn_sels- -> mkSimpleDecorated $- text "Cannot use a mixture of pattern synonym and record selectors" $$- text "Record selectors defined by"- <+> quotes (ppr data_name)- <> colon- <+> pprWithCommas ppr data_sels $$- text "Pattern synonym selectors defined by"- <+> quotes (ppr pat_name)- <> colon- <+> pprWithCommas ppr pat_syn_sels- TcRnMissingStrictFields con fields- -> mkSimpleDecorated $ vcat [header, nest 2 rest]- where- rest | null fields = empty -- Happens for non-record constructors- -- with strict fields- | otherwise = vcat (fmap pprField fields)-- header = text "Constructor" <+> quotes (ppr con) <+>- text "does not have the required strict field(s)" <>- if null fields then empty else colon- TcRnNoPossibleParentForFields rbinds- -> mkSimpleDecorated $- hang (text "No type has all these fields:")- 2 (pprQuotedList fields)- where fields = map (hfbLHS . unLoc) rbinds- TcRnBadOverloadedRecordUpdate _rbinds- -> mkSimpleDecorated $- text "Record update is ambiguous, and requires a type signature"- TcRnStaticFormNotClosed name reason- -> mkSimpleDecorated $- quotes (ppr name)- <+> text "is used in a static form but it is not closed"- <+> text "because it"- $$ sep (causes reason)- where- causes :: NotClosedReason -> [SDoc]- causes NotLetBoundReason = [text "is not let-bound."]- causes (NotTypeClosed vs) =- [ text "has a non-closed type because it contains the"- , text "type variables:" <+>- pprVarSet vs (hsep . punctuate comma . map (quotes . ppr))- ]- causes (NotClosed n reason) =- let msg = text "uses" <+> quotes (ppr n) <+> text "which"- in case reason of- NotClosed _ _ -> msg : causes reason- _ -> let (xs0, xs1) = splitAt 1 $ causes reason- in fmap (msg <+>) xs0 ++ xs1- TcRnUselessTypeable- -> mkSimpleDecorated $- text "Deriving" <+> quotes (ppr typeableClassName) <+>- text "has no effect: all types now auto-derive Typeable"- TcRnDerivingDefaults cls- -> mkSimpleDecorated $ sep- [ text "Both DeriveAnyClass and"- <+> text "GeneralizedNewtypeDeriving are enabled"- , text "Defaulting to the DeriveAnyClass strategy"- <+> text "for instantiating" <+> ppr cls- ]- TcRnNonUnaryTypeclassConstraint ct- -> mkSimpleDecorated $- quotes (ppr ct)- <+> text "is not a unary constraint, as expected by a deriving clause"- TcRnPartialTypeSignatures _ theta- -> mkSimpleDecorated $- text "Found type wildcard" <+> quotes (char '_')- <+> text "standing for" <+> quotes (pprTheta theta)- TcRnCannotDeriveInstance cls cls_tys mb_strat newtype_deriving reason- -> mkSimpleDecorated $- derivErrDiagnosticMessage cls cls_tys mb_strat newtype_deriving True reason- TcRnLazyGADTPattern- -> mkSimpleDecorated $- hang (text "An existential or GADT data constructor cannot be used")- 2 (text "inside a lazy (~) pattern")- TcRnArrowProcGADTPattern- -> mkSimpleDecorated $- text "Proc patterns cannot use existential or GADT data constructors"-- TcRnSpecialClassInst cls because_safeHaskell- -> mkSimpleDecorated $- text "Class" <+> quotes (ppr $ className cls)- <+> text "does not support user-specified instances"- <> safeHaskell_msg- where- safeHaskell_msg- | because_safeHaskell- = text " when Safe Haskell is enabled."- | otherwise- = dot- TcRnForallIdentifier rdr_name- -> mkSimpleDecorated $- fsep [ text "The use of" <+> quotes (ppr rdr_name)- <+> text "as an identifier",- text "will become an error in a future GHC release." ]- TcRnTypeEqualityOutOfScope- -> mkDecorated- [ text "The" <+> quotes (text "~") <+> text "operator is out of scope." $$- text "Assuming it to stand for an equality constraint."- , text "NB:" <+> (quotes (text "~") <+> text "used to be built-in syntax but now is a regular type operator" $$- text "exported from Data.Type.Equality and Prelude.") $$- text "If you are using a custom Prelude, consider re-exporting it."- , text "This will become an error in a future GHC release." ]- TcRnTypeEqualityRequiresOperators- -> mkSimpleDecorated $- fsep [ text "The use of" <+> quotes (text "~")- <+> text "without TypeOperators",- text "will become an error in a future GHC release." ]- TcRnIllegalTypeOperator overall_ty op- -> mkSimpleDecorated $- text "Illegal operator" <+> quotes (ppr op) <+>- text "in type" <+> quotes (ppr overall_ty)- TcRnIllegalTypeOperatorDecl name- -> mkSimpleDecorated $- text "Illegal declaration of a type or class operator" <+> quotes (ppr name)- TcRnGADTMonoLocalBinds- -> mkSimpleDecorated $- fsep [ text "Pattern matching on GADTs without MonoLocalBinds"- , text "is fragile." ]- TcRnIncorrectNameSpace name _- -> mkSimpleDecorated $ msg- where- msg- -- We are in a type-level namespace,- -- and the name is incorrectly at the term-level.- | isValNameSpace ns- = text "The" <+> what <+> text "does not live in the type-level namespace"-- -- We are in a term-level namespace,- -- and the name is incorrectly at the type-level.- | otherwise- = text "Illegal term-level use of the" <+> what- ns = nameNameSpace name- what = pprNameSpace ns <+> quotes (ppr name)- TcRnNotInScope err name imp_errs _- -> mkSimpleDecorated $- pprScopeError name err $$ vcat (map ppr imp_errs)- TcRnUntickedPromotedThing thing- -> mkSimpleDecorated $- text "Unticked promoted" <+> what- where- what :: SDoc- what = case thing of- UntickedExplicitList -> text "list" <> dot- UntickedConstructor fixity nm ->- let con = pprUntickedConstructor fixity nm- bare_sym = isBareSymbol fixity nm- in text "constructor:" <+> con <> if bare_sym then empty else dot- TcRnIllegalBuiltinSyntax what rdr_name- -> mkSimpleDecorated $- hsep [text "Illegal", what, text "of built-in syntax:", ppr rdr_name]- TcRnWarnDefaulting tidy_wanteds tidy_tv default_ty- -> mkSimpleDecorated $- hang (hsep $ [ text "Defaulting" ]- ++- (case tidy_tv of- Nothing -> []- Just tv -> [text "the type variable"- , quotes (ppr tv)])- ++- [ text "to type"- , quotes (ppr default_ty)- , text "in the following constraint" <> plural tidy_wanteds ])- 2- (pprWithArising tidy_wanteds)--- TcRnForeignImportPrimExtNotSet _decl- -> mkSimpleDecorated $- text "`foreign import prim' requires GHCForeignImportPrim."-- TcRnForeignImportPrimSafeAnn _decl- -> mkSimpleDecorated $- text "The safe/unsafe annotation should not be used with `foreign import prim'."-- TcRnForeignFunctionImportAsValue _decl- -> mkSimpleDecorated $- text "`value' imports cannot have function types"-- TcRnFunPtrImportWithoutAmpersand _decl- -> mkSimpleDecorated $- text "possible missing & in foreign import of FunPtr"-- TcRnIllegalForeignDeclBackend _decl _backend expectedBknds- -> mkSimpleDecorated $- fsep (text "Illegal foreign declaration: requires one of these back ends:" :- commafyWith (text "or") (map (text . backendDescription) expectedBknds))-- TcRnUnsupportedCallConv _decl unsupportedCC- -> mkSimpleDecorated $- case unsupportedCC of- StdCallConvUnsupported ->- text "the 'stdcall' calling convention is unsupported on this platform,"- $$ text "treating as ccall"- PrimCallConvUnsupported ->- text "The `prim' calling convention can only be used with `foreign import'"- JavaScriptCallConvUnsupported ->- text "The `javascript' calling convention is unsupported on this platform"-- TcRnIllegalForeignType mArgOrResult reason- -> mkSimpleDecorated $ hang msg 2 extra- where- arg_or_res = case mArgOrResult of- Nothing -> empty- Just Arg -> text "argument"- Just Result -> text "result"- msg = hsep [ text "Unacceptable", arg_or_res- , text "type in foreign declaration:"]- extra =- case reason of- TypeCannotBeMarshaled ty why ->- let innerMsg = quotes (ppr ty) <+> text "cannot be marshalled in a foreign call"- in case why of- NotADataType ->- quotes (ppr ty) <+> text "is not a data type"- NewtypeDataConNotInScope Nothing ->- hang innerMsg 2 $ text "because its data constructor is not in scope"- NewtypeDataConNotInScope (Just tc) ->- hang innerMsg 2 $- text "because the data constructor for"- <+> quotes (ppr tc) <+> text "is not in scope"- UnliftedFFITypesNeeded ->- innerMsg $$ text "UnliftedFFITypes is required to marshal unlifted types"- NotABoxedMarshalableTyCon -> innerMsg- ForeignLabelNotAPtr ->- innerMsg $$ text "A foreign-imported address (via &foo) must have type (Ptr a) or (FunPtr a)"- NotSimpleUnliftedType ->- innerMsg $$ text "foreign import prim only accepts simple unlifted types"- NotBoxedKindAny ->- text "Expected kind" <+> quotes (text "Type") <+> text "or" <+> quotes (text "UnliftedType") <> comma $$- text "but" <+> quotes (ppr ty) <+> text "has kind" <+> quotes (ppr (typeKind ty))- ForeignDynNotPtr expected ty ->- vcat [ text "Expected: Ptr/FunPtr" <+> pprParendType expected <> comma, text " Actual:" <+> ppr ty ]- SafeHaskellMustBeInIO ->- text "Safe Haskell is on, all FFI imports must be in the IO monad"- IOResultExpected ->- text "IO result type expected"- UnexpectedNestedForall ->- text "Unexpected nested forall"- LinearTypesNotAllowed ->- text "Linear types are not supported in FFI declarations, see #18472"- OneArgExpected ->- text "One argument expected"- AtLeastOneArgExpected ->- text "At least one argument expected"- TcRnInvalidCIdentifier target- -> mkSimpleDecorated $- sep [quotes (ppr target) <+> text "is not a valid C identifier"]- TcRnExpectedValueId thing- -> mkSimpleDecorated $- ppr thing <+> text "used where a value identifier was expected"- TcRnNotARecordSelector field- -> mkSimpleDecorated $- hsep [quotes (ppr field), text "is not a record selector"]- TcRnRecSelectorEscapedTyVar lbl- -> mkSimpleDecorated $- text "Cannot use record selector" <+> quotes (ppr lbl) <+>- text "as a function due to escaped type variables"- TcRnPatSynNotBidirectional name- -> mkSimpleDecorated $- text "non-bidirectional pattern synonym"- <+> quotes (ppr name) <+> text "used in an expression"- TcRnSplicePolymorphicLocalVar ident- -> mkSimpleDecorated $- text "Can't splice the polymorphic local variable" <+> quotes (ppr ident)- TcRnIllegalDerivingItem hs_ty- -> mkSimpleDecorated $- text "Illegal deriving item" <+> quotes (ppr hs_ty)- TcRnUnexpectedAnnotation ty bang- -> mkSimpleDecorated $- let err = case bang of- HsSrcBang _ SrcUnpack _ -> "UNPACK"- HsSrcBang _ SrcNoUnpack _ -> "NOUNPACK"- HsSrcBang _ NoSrcUnpack SrcLazy -> "laziness"- HsSrcBang _ _ _ -> "strictness"- in text "Unexpected" <+> text err <+> text "annotation:" <+> ppr ty $$- text err <+> text "annotation cannot appear nested inside a type"- TcRnIllegalRecordSyntax ty- -> mkSimpleDecorated $- text "Record syntax is illegal here:" <+> ppr ty- TcRnUnexpectedTypeSplice ty- -> mkSimpleDecorated $- text "Unexpected type splice:" <+> ppr ty- TcRnInvalidVisibleKindArgument arg ty- -> mkSimpleDecorated $- text "Cannot apply function of kind" <+> quotes (ppr ty)- $$ text "to visible kind argument" <+> quotes (ppr arg)- TcRnTooManyBinders ki bndrs- -> mkSimpleDecorated $- hang (text "Not a function kind:")- 4 (ppr ki) $$- hang (text "but extra binders found:")- 4 (fsep (map ppr bndrs))- TcRnDifferentNamesForTyVar n1 n2- -> mkSimpleDecorated $- hang (text "Different names for the same type variable:") 2 info- where- info | nameOccName n1 /= nameOccName n2- = quotes (ppr n1) <+> text "and" <+> quotes (ppr n2)- | otherwise -- Same OccNames! See C2 in- -- Note [Swizzling the tyvars before generaliseTcTyCon]- = vcat [ quotes (ppr n1) <+> text "bound at" <+> ppr (getSrcLoc n1)- , quotes (ppr n2) <+> text "bound at" <+> ppr (getSrcLoc n2) ]-- TcRnDisconnectedTyVar n- -> mkSimpleDecorated $- hang (text "Scoped type variable only appears non-injectively in declaration header:")- 2 (quotes (ppr n) <+> text "bound at" <+> ppr (getSrcLoc n))-- TcRnInvalidReturnKind data_sort allowed_kind kind _suggested_ext- -> mkSimpleDecorated $- sep [ ppDataSort data_sort <+>- text "has non-" <>- allowed_kind_tycon- , (if is_data_family then text "and non-variable" else empty) <+>- text "return kind" <+> quotes (ppr kind)- ]- where- is_data_family =- case data_sort of- DataDeclSort{} -> False- DataInstanceSort{} -> False- DataFamilySort -> True- allowed_kind_tycon =- case allowed_kind of- AnyTYPEKind -> ppr tYPETyCon- AnyBoxedKind -> ppr boxedRepDataConTyCon- LiftedKind -> ppr liftedTypeKind- TcRnClassKindNotConstraint _kind- -> mkSimpleDecorated $- text "Kind signature on a class must end with" <+> ppr constraintKind $$- text "unobscured by type families"- TcRnUnpromotableThing name err- -> mkSimpleDecorated $- (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"- NoDataKindsDC -> text "perhaps you intended to use DataKinds"- PatSynPE -> text "pattern synonyms cannot be promoted"- RecDataConPE -> same_rec_group_msg- ClassPE -> same_rec_group_msg- TyConPE -> same_rec_group_msg- TermVariablePE -> text "term variables cannot be promoted"- same_rec_group_msg = text "it is defined and used in the same recursive group"- TcRnMatchesHaveDiffNumArgs argsContext (MatchArgMatches match1 bad_matches)- -> mkSimpleDecorated $- (vcat [ pprMatchContextNouns argsContext <+>- text "have different numbers of arguments"- , nest 2 (ppr (getLocA match1))- , nest 2 (ppr (getLocA (NE.head bad_matches)))])- TcRnCannotBindScopedTyVarInPatSig sig_tvs- -> mkSimpleDecorated $- hang (text "You cannot bind scoped type variable"- <> plural (NE.toList sig_tvs)- <+> pprQuotedList (map fst $ NE.toList sig_tvs))- 2 (text "in a pattern binding signature")- TcRnCannotBindTyVarsInPatBind _offenders- -> mkSimpleDecorated $- text "Binding type variables is not allowed in pattern bindings"- TcRnTooManyTyArgsInConPattern con_like expected_number actual_number- -> mkSimpleDecorated $- text "Too many type arguments in constructor pattern for" <+> quotes (ppr con_like) $$- text "Expected no more than" <+> ppr expected_number <> semi <+> text "got" <+> ppr actual_number- TcRnMultipleInlinePragmas poly_id fst_inl_prag inl_prags- -> mkSimpleDecorated $- hang (text "Multiple INLINE pragmas for" <+> ppr poly_id)- 2 (vcat (text "Ignoring all but the first"- : map pp_inl (fst_inl_prag : NE.toList inl_prags)))- where- pp_inl (L loc prag) = ppr prag <+> parens (ppr loc)- TcRnUnexpectedPragmas poly_id bad_sigs- -> mkSimpleDecorated $- hang (text "Discarding unexpected pragmas for" <+> ppr poly_id)- 2 (vcat (map (ppr . getLoc) $ NE.toList bad_sigs))- TcRnNonOverloadedSpecialisePragma fun_name- -> mkSimpleDecorated $- text "SPECIALISE pragma for non-overloaded function"- <+> quotes (ppr fun_name)- TcRnSpecialiseNotVisible name- -> mkSimpleDecorated $- text "You cannot SPECIALISE" <+> quotes (ppr name)- <+> text "because its definition is not visible in this module"- TcRnNameByTemplateHaskellQuote name -> mkSimpleDecorated $- text "Cannot redefine a Name retrieved by a Template Haskell quote:" <+> ppr name- TcRnIllegalBindingOfBuiltIn name -> mkSimpleDecorated $- text "Illegal binding of built-in syntax:" <+> ppr name- TcRnPragmaWarning {pragma_warning_occ, pragma_warning_msg, pragma_warning_import_mod, pragma_warning_defined_mod}- -> mkSimpleDecorated $- sep [ sep [ text "In the use of"- <+> pprNonVarNameSpace (occNameSpace pragma_warning_occ)- <+> quotes (ppr pragma_warning_occ)- , parens impMsg <> colon ]- , pprWarningTxtForMsg pragma_warning_msg ]- where- impMsg = text "imported from" <+> ppr pragma_warning_import_mod <> extra- extra | pragma_warning_import_mod == pragma_warning_defined_mod = empty- | otherwise = text ", but defined in" <+> ppr pragma_warning_defined_mod- TcRnIllegalHsigDefaultMethods name meths- -> mkSimpleDecorated $- text "Illegal default method" <> plural (NE.toList meths) <+> text "in class definition of" <+> ppr name <+> text "in hsig file"- TcRnBadGenericMethod clas op- -> mkSimpleDecorated $- hsep [text "Class", quotes (ppr clas),- text "has a generic-default signature without a binding", quotes (ppr op)]- TcRnWarningMinimalDefIncomplete mindef- -> mkSimpleDecorated $- vcat [ text "The MINIMAL pragma does not require:"- , nest 2 (pprBooleanFormulaNice mindef)- , text "but there is no default implementation." ]- TcRnDefaultMethodForPragmaLacksBinding sel_id prag- -> mkSimpleDecorated $- text "The" <+> hsSigDoc prag <+> text "for default method"- <+> quotes (ppr sel_id)- <+> text "lacks an accompanying binding"- TcRnIgnoreSpecialisePragmaOnDefMethod sel_name- -> mkSimpleDecorated $- text "Ignoring SPECIALISE pragmas on default method"- <+> quotes (ppr sel_name)- TcRnBadMethodErr{badMethodErrClassName, badMethodErrMethodName}- -> mkSimpleDecorated $- hsep [text "Class", quotes (ppr badMethodErrClassName),- text "does not have a method", quotes (ppr badMethodErrMethodName)]- TcRnNoExplicitAssocTypeOrDefaultDeclaration name- -> mkSimpleDecorated $- text "No explicit" <+> text "associated type"- <+> text "or default declaration for"- <+> quotes (ppr name)- TcRnIllegalTypeData- -> mkSimpleDecorated $- text "Illegal type-level data declaration"- TcRnTypeDataForbids feature- -> mkSimpleDecorated $- ppr feature <+> text "are not allowed in type data declarations."-- TcRnIllegalNewtype con show_linear_types reason- -> mkSimpleDecorated $- vcat [msg, additional]- where- (msg,additional) =- case reason of- DoesNotHaveSingleField n_flds ->- (sep [- text "A newtype constructor must have exactly one field",- nest 2 $- text "but" <+> quotes (ppr con) <+> text "has" <+> speakN n_flds- ],- ppr con <+> dcolon <+> ppr (dataConDisplayType show_linear_types con))- IsNonLinear ->- (text "A newtype constructor must be linear",- ppr con <+> dcolon <+> ppr (dataConDisplayType True con))- IsGADT ->- (text "A newtype must not be a GADT",- ppr con <+> dcolon <+> pprWithExplicitKindsWhen sneaky_eq_spec- (ppr $ dataConDisplayType show_linear_types con))- HasConstructorContext ->- (text "A newtype constructor must not have a context in its type",- ppr con <+> dcolon <+> ppr (dataConDisplayType show_linear_types con))- HasExistentialTyVar ->- (text "A newtype constructor must not have existential type variables",- ppr con <+> dcolon <+> ppr (dataConDisplayType show_linear_types con))- HasStrictnessAnnotation ->- (text "A newtype constructor must not have a strictness annotation", empty)-- -- Is the data con a "covert" GADT? See Note [isCovertGadtDataCon]- -- in GHC.Core.DataCon- sneaky_eq_spec = isCovertGadtDataCon con-- TcRnTypedTHWithPolyType ty- -> mkSimpleDecorated $- vcat [ text "Illegal polytype:" <+> ppr ty- , text "The type of a Typed Template Haskell expression must" <+>- text "not have any quantification." ]- TcRnSpliceThrewException phase _exn exn_msg expr show_code- -> mkSimpleDecorated $- vcat [ text "Exception when trying to" <+> text phaseStr <+> text "compile-time code:"- , nest 2 (text exn_msg)- , if show_code then text "Code:" <+> ppr expr else empty]- where phaseStr =- case phase of- SplicePhase_Run -> "run"- SplicePhase_CompileAndLink -> "compile and link"- TcRnInvalidTopDecl _decl- -> mkSimpleDecorated $- text "Only function, value, annotation, and foreign import declarations may be added with addTopDecls"- TcRnNonExactName name- -> mkSimpleDecorated $- hang (text "The binder" <+> quotes (ppr name) <+> text "is not a NameU.")- 2 (text "Probable cause: you used mkName instead of newName to generate a binding.")- TcRnAddInvalidCorePlugin plugin- -> mkSimpleDecorated $- hang- (text "addCorePlugin: invalid plugin module "- <+> text (show plugin)- )- 2- (text "Plugins in the current package can't be specified.")- TcRnAddDocToNonLocalDefn doc_loc- -> mkSimpleDecorated $- text "Can't add documentation to" <+> ppr_loc doc_loc <+>- text "as it isn't inside the current module"- where- ppr_loc (TH.DeclDoc n) = text $ TH.pprint n- ppr_loc (TH.ArgDoc n _) = text $ TH.pprint n- ppr_loc (TH.InstDoc t) = text $ TH.pprint t- ppr_loc TH.ModuleDoc = text "the module header"-- TcRnFailedToLookupThInstName th_type reason- -> mkSimpleDecorated $- case reason of- NoMatchesFound ->- text "Couldn't find any instances of"- <+> text (TH.pprint th_type)- <+> text "to add documentation to"- CouldNotDetermineInstance ->- text "Couldn't work out what instance"- <+> text (TH.pprint th_type)- <+> text "is supposed to be"- TcRnCannotReifyInstance ty- -> mkSimpleDecorated $- hang (text "reifyInstances:" <+> quotes (ppr ty))- 2 (text "is not a class constraint or type family application")- TcRnCannotReifyOutOfScopeThing th_name- -> mkSimpleDecorated $- quotes (text (TH.pprint th_name)) <+>- text "is not in scope at a reify"- -- Ugh! Rather an indirect way to display the name- TcRnCannotReifyThingNotInTypeEnv name- -> mkSimpleDecorated $- quotes (ppr name) <+> text "is not in the type environment at a reify"- TcRnNoRolesAssociatedWithThing thing- -> mkSimpleDecorated $- text "No roles associated with" <+> (ppr thing)- TcRnCannotRepresentType sort ty- -> mkSimpleDecorated $- hsep [text "Can't represent" <+> sort_doc <+>- text "in Template Haskell:",- nest 2 (ppr ty)]- where- sort_doc = text $- case sort of- LinearInvisibleArgument -> "linear invisible argument"- CoercionsInTypes -> "coercions in types"- TcRnRunSpliceFailure mCallingFnName (ConversionFail what reason)- -> mkSimpleDecorated- . addCallingFn- . addSpliceInfo- $ pprConversionFailReason reason- where- addCallingFn rest =- case mCallingFnName of- Nothing -> rest- Just callingFn ->- hang (text ("Error in a declaration passed to " ++ callingFn ++ ":"))- 2 rest- addSpliceInfo = case what of- ConvDec d -> addSliceInfo' "declaration" d- ConvExp e -> addSliceInfo' "expression" e- ConvPat p -> addSliceInfo' "pattern" p- ConvType t -> addSliceInfo' "type" t- addSliceInfo' what item reasonErr = reasonErr $$ descr- where- -- Show the item in pretty syntax normally,- -- but with all its constructors if you say -dppr-debug- descr = hang (text "When splicing a TH" <+> text what <> colon)- 2 (getPprDebug $ \case- True -> text (show item)- False -> text (TH.pprint item))- TcRnReportCustomQuasiError _ msg -> mkSimpleDecorated $ text msg- TcRnInterfaceLookupError _ sdoc -> mkSimpleDecorated sdoc- TcRnUnsatisfiedMinimalDef mindef- -> mkSimpleDecorated $- vcat [text "No explicit implementation for"- ,nest 2 $ pprBooleanFormulaNice mindef- ]- TcRnMisplacedInstSig name hs_ty- -> mkSimpleDecorated $- vcat [ hang (text "Illegal type signature in instance declaration:")- 2 (hang (pprPrefixName name)- 2 (dcolon <+> ppr hs_ty))- ]- TcRnBadBootFamInstDecl {}- -> mkSimpleDecorated $- text "Illegal family instance in hs-boot file"- TcRnIllegalFamilyInstance tycon- -> mkSimpleDecorated $- vcat [ text "Illegal family instance for" <+> quotes (ppr tycon)- , nest 2 $ parens (ppr tycon <+> text "is not an indexed type family")]- TcRnMissingClassAssoc name- -> mkSimpleDecorated $- text "Associated type" <+> quotes (ppr name) <+>- text "must be inside a class instance"- TcRnBadFamInstDecl tc_name- -> mkSimpleDecorated $- text "Illegal family instance for" <+> quotes (ppr tc_name)- TcRnNotOpenFamily tc- -> mkSimpleDecorated $- text "Illegal instance for closed family" <+> quotes (ppr tc)- TcRnNoRebindableSyntaxRecordDot -> mkSimpleDecorated $- text "RebindableSyntax is required if OverloadedRecordUpdate is enabled."- TcRnNoFieldPunsRecordDot -> mkSimpleDecorated $- text "For this to work enable NamedFieldPuns"- TcRnIllegalStaticExpression e -> mkSimpleDecorated $- text "Illegal static expression:" <+> ppr e- TcRnIllegalStaticFormInSplice e -> mkSimpleDecorated $- sep [ text "static forms cannot be used in splices:"- , nest 2 $ ppr e- ]- TcRnListComprehensionDuplicateBinding n -> mkSimpleDecorated $- (text "Duplicate binding in parallel list comprehension for:"- <+> quotes (ppr n))- TcRnEmptyStmtsGroup cause -> mkSimpleDecorated $ case cause of- EmptyStmtsGroupInParallelComp ->- text "Empty statement group in parallel comprehension"- EmptyStmtsGroupInTransformListComp ->- text "Empty statement group preceding 'group' or 'then'"- EmptyStmtsGroupInDoNotation ctxt ->- text "Empty" <+> pprHsDoFlavour ctxt- EmptyStmtsGroupInArrowNotation ->- text "Empty 'do' block in an arrow command"- TcRnLastStmtNotExpr ctxt (UnexpectedStatement stmt) ->- mkSimpleDecorated $ hang last_error 2 (ppr stmt)- where- last_error =- text "The last statement in" <+> pprAStmtContext ctxt- <+> text "must be an expression"- TcRnUnexpectedStatementInContext ctxt (UnexpectedStatement stmt) _ -> mkSimpleDecorated $- sep [ text "Unexpected" <+> pprStmtCat stmt <+> text "statement"- , text "in" <+> pprAStmtContext ctxt ]- TcRnIllegalTupleSection -> mkSimpleDecorated $- text "Illegal tuple section"- TcRnIllegalImplicitParameterBindings eBinds -> mkSimpleDecorated $- either msg msg eBinds- where- msg binds = hang- (text "Implicit-parameter bindings illegal in an mdo expression")- 2 (ppr binds)- TcRnSectionWithoutParentheses expr -> mkSimpleDecorated $- hang (text "A section must be enclosed in parentheses")- 2 (text "thus:" <+> (parens (ppr expr)))-- TcRnLoopySuperclassSolve wtd_loc wtd_pty ->- mkSimpleDecorated $ vcat [ header, warning, user_manual ]- where- header, warning, user_manual :: SDoc- header- = vcat [ text "I am solving the constraint" <+> quotes (ppr wtd_pty) <> comma- , nest 2 $ pprCtOrigin (ctLocOrigin wtd_loc) <> comma- , text "in a way that might turn out to loop at runtime." ]- warning- = vcat [ text "Starting from GHC 9.10, this warning will turn into an error." ]- user_manual =- vcat [ text "See the user manual, § Undecidable instances and loopy superclasses." ]- TcRnCannotDefaultConcrete frr- -> mkSimpleDecorated $- ppr (frr_context frr) $$- text "cannot be assigned a fixed runtime representation," <+>- text "not even by defaulting."-- diagnosticReason = \case- TcRnUnknownMessage m- -> diagnosticReason m- TcRnMessageWithInfo _ msg_with_info- -> case msg_with_info of- TcRnMessageDetailed _ m -> diagnosticReason m- TcRnWithHsDocContext _ msg- -> diagnosticReason msg- TcRnSolverReport _ reason _- -> reason -- Error, or a Warning if we are deferring type errors- TcRnRedundantConstraints {}- -> WarningWithFlag Opt_WarnRedundantConstraints- TcRnInaccessibleCode {}- -> WarningWithFlag Opt_WarnInaccessibleCode- TcRnTypeDoesNotHaveFixedRuntimeRep{}- -> ErrorWithoutFlag- TcRnImplicitLift{}- -> WarningWithFlag Opt_WarnImplicitLift- TcRnUnusedPatternBinds{}- -> WarningWithFlag Opt_WarnUnusedPatternBinds- TcRnDodgyImports{}- -> WarningWithFlag Opt_WarnDodgyImports- TcRnDodgyExports{}- -> WarningWithFlag Opt_WarnDodgyExports- TcRnMissingImportList{}- -> WarningWithFlag Opt_WarnMissingImportList- TcRnUnsafeDueToPlugin{}- -> WarningWithoutFlag- TcRnModMissingRealSrcSpan{}- -> ErrorWithoutFlag- TcRnIdNotExportedFromModuleSig{}- -> ErrorWithoutFlag- TcRnIdNotExportedFromLocalSig{}- -> ErrorWithoutFlag- TcRnShadowedName{}- -> WarningWithFlag Opt_WarnNameShadowing- TcRnDuplicateWarningDecls{}- -> ErrorWithoutFlag- TcRnSimplifierTooManyIterations{}- -> ErrorWithoutFlag- TcRnIllegalPatSynDecl{}- -> ErrorWithoutFlag- TcRnLinearPatSyn{}- -> ErrorWithoutFlag- TcRnEmptyRecordUpdate- -> ErrorWithoutFlag- TcRnIllegalFieldPunning{}- -> ErrorWithoutFlag- TcRnIllegalWildcardsInRecord{}- -> ErrorWithoutFlag- TcRnIllegalWildcardInType{}- -> ErrorWithoutFlag- TcRnDuplicateFieldName{}- -> ErrorWithoutFlag- TcRnIllegalViewPattern{}- -> ErrorWithoutFlag- TcRnCharLiteralOutOfRange{}- -> ErrorWithoutFlag- TcRnIllegalWildcardsInConstructor{}- -> ErrorWithoutFlag- TcRnIgnoringAnnotations{}- -> WarningWithoutFlag- TcRnAnnotationInSafeHaskell- -> ErrorWithoutFlag- TcRnInvalidTypeApplication{}- -> ErrorWithoutFlag- TcRnTagToEnumMissingValArg- -> ErrorWithoutFlag- TcRnTagToEnumUnspecifiedResTy{}- -> ErrorWithoutFlag- TcRnTagToEnumResTyNotAnEnum{}- -> ErrorWithoutFlag- TcRnTagToEnumResTyTypeData{}- -> ErrorWithoutFlag- TcRnArrowIfThenElsePredDependsOnResultTy- -> ErrorWithoutFlag- TcRnIllegalHsBootFileDecl- -> ErrorWithoutFlag- TcRnRecursivePatternSynonym{}- -> ErrorWithoutFlag- TcRnPartialTypeSigTyVarMismatch{}- -> ErrorWithoutFlag- TcRnPartialTypeSigBadQuantifier{}- -> ErrorWithoutFlag- TcRnMissingSignature what exported overridden- -> WarningWithFlag $ missingSignatureWarningFlag what exported overridden- TcRnPolymorphicBinderMissingSig{}- -> WarningWithFlag Opt_WarnMissingLocalSignatures- TcRnOverloadedSig{}- -> ErrorWithoutFlag- TcRnTupleConstraintInst{}- -> ErrorWithoutFlag- TcRnAbstractClassInst{}- -> ErrorWithoutFlag- TcRnNoClassInstHead{}- -> ErrorWithoutFlag- TcRnUserTypeError{}- -> ErrorWithoutFlag- TcRnConstraintInKind{}- -> ErrorWithoutFlag- TcRnUnboxedTupleOrSumTypeFuncArg{}- -> ErrorWithoutFlag- TcRnLinearFuncInKind{}- -> ErrorWithoutFlag- TcRnForAllEscapeError{}- -> ErrorWithoutFlag- TcRnVDQInTermType{}- -> ErrorWithoutFlag- TcRnBadQuantPredHead{}- -> ErrorWithoutFlag- TcRnIllegalTupleConstraint{}- -> ErrorWithoutFlag- TcRnNonTypeVarArgInConstraint{}- -> ErrorWithoutFlag- TcRnIllegalImplicitParam{}- -> ErrorWithoutFlag- TcRnIllegalConstraintSynonymOfKind{}- -> ErrorWithoutFlag- TcRnIllegalClassInst{}- -> ErrorWithoutFlag- TcRnOversaturatedVisibleKindArg{}- -> ErrorWithoutFlag- TcRnBadAssociatedType{}- -> ErrorWithoutFlag- TcRnForAllRankErr{}- -> ErrorWithoutFlag- TcRnMonomorphicBindings{}- -> WarningWithFlag Opt_WarnMonomorphism- TcRnOrphanInstance{}- -> WarningWithFlag Opt_WarnOrphans- TcRnFunDepConflict{}- -> ErrorWithoutFlag- TcRnDupInstanceDecls{}- -> ErrorWithoutFlag- TcRnConflictingFamInstDecls{}- -> ErrorWithoutFlag- TcRnFamInstNotInjective{}- -> ErrorWithoutFlag- TcRnBangOnUnliftedType{}- -> WarningWithFlag Opt_WarnRedundantStrictnessFlags- TcRnLazyBangOnUnliftedType{}- -> WarningWithFlag Opt_WarnRedundantStrictnessFlags- TcRnMultipleDefaultDeclarations{}- -> ErrorWithoutFlag- TcRnBadDefaultType{}- -> ErrorWithoutFlag- TcRnPatSynBundledWithNonDataCon{}- -> ErrorWithoutFlag- TcRnPatSynBundledWithWrongType{}- -> ErrorWithoutFlag- TcRnDupeModuleExport{}- -> WarningWithFlag Opt_WarnDuplicateExports- TcRnExportedModNotImported{}- -> ErrorWithoutFlag- TcRnNullExportedModule{}- -> WarningWithFlag Opt_WarnDodgyExports- TcRnMissingExportList{}- -> WarningWithFlag Opt_WarnMissingExportList- TcRnExportHiddenComponents{}- -> ErrorWithoutFlag- TcRnDuplicateExport{}- -> WarningWithFlag Opt_WarnDuplicateExports- TcRnExportedParentChildMismatch{}- -> ErrorWithoutFlag- TcRnConflictingExports{}- -> ErrorWithoutFlag- TcRnAmbiguousField{}- -> WarningWithFlag Opt_WarnAmbiguousFields- TcRnMissingFields{}- -> WarningWithFlag Opt_WarnMissingFields- TcRnFieldUpdateInvalidType{}- -> ErrorWithoutFlag- TcRnNoConstructorHasAllFields{}- -> ErrorWithoutFlag- TcRnMixedSelectors{}- -> ErrorWithoutFlag- TcRnMissingStrictFields{}- -> ErrorWithoutFlag- TcRnNoPossibleParentForFields{}- -> ErrorWithoutFlag- TcRnBadOverloadedRecordUpdate{}- -> ErrorWithoutFlag- TcRnStaticFormNotClosed{}- -> ErrorWithoutFlag- TcRnUselessTypeable- -> WarningWithFlag Opt_WarnDerivingTypeable- TcRnDerivingDefaults{}- -> WarningWithFlag Opt_WarnDerivingDefaults- TcRnNonUnaryTypeclassConstraint{}- -> ErrorWithoutFlag- TcRnPartialTypeSignatures{}- -> WarningWithFlag Opt_WarnPartialTypeSignatures- TcRnCannotDeriveInstance _ _ _ _ rea- -> case rea of- DerivErrNotWellKinded{} -> ErrorWithoutFlag- DerivErrSafeHaskellGenericInst -> ErrorWithoutFlag- DerivErrDerivingViaWrongKind{} -> ErrorWithoutFlag- DerivErrNoEtaReduce{} -> ErrorWithoutFlag- DerivErrBootFileFound -> ErrorWithoutFlag- DerivErrDataConsNotAllInScope{} -> ErrorWithoutFlag- DerivErrGNDUsedOnData -> ErrorWithoutFlag- DerivErrNullaryClasses -> ErrorWithoutFlag- DerivErrLastArgMustBeApp -> ErrorWithoutFlag- DerivErrNoFamilyInstance{} -> ErrorWithoutFlag- DerivErrNotStockDeriveable{} -> ErrorWithoutFlag- DerivErrHasAssociatedDatatypes{} -> ErrorWithoutFlag- DerivErrNewtypeNonDeriveableClass -> ErrorWithoutFlag- DerivErrCannotEtaReduceEnough{} -> ErrorWithoutFlag- DerivErrOnlyAnyClassDeriveable{} -> ErrorWithoutFlag- DerivErrNotDeriveable{} -> ErrorWithoutFlag- DerivErrNotAClass{} -> ErrorWithoutFlag- DerivErrNoConstructors{} -> ErrorWithoutFlag- DerivErrLangExtRequired{} -> ErrorWithoutFlag- DerivErrDunnoHowToDeriveForType{} -> ErrorWithoutFlag- DerivErrMustBeEnumType{} -> ErrorWithoutFlag- DerivErrMustHaveExactlyOneConstructor{} -> ErrorWithoutFlag- DerivErrMustHaveSomeParameters{} -> ErrorWithoutFlag- DerivErrMustNotHaveClassContext{} -> ErrorWithoutFlag- DerivErrBadConstructor{} -> ErrorWithoutFlag- DerivErrGenerics{} -> ErrorWithoutFlag- DerivErrEnumOrProduct{} -> ErrorWithoutFlag- TcRnLazyGADTPattern- -> ErrorWithoutFlag- TcRnArrowProcGADTPattern- -> ErrorWithoutFlag- TcRnSpecialClassInst {}- -> ErrorWithoutFlag- TcRnForallIdentifier {}- -> WarningWithFlag Opt_WarnForallIdentifier- TcRnTypeEqualityOutOfScope- -> WarningWithFlag Opt_WarnTypeEqualityOutOfScope- TcRnTypeEqualityRequiresOperators- -> WarningWithFlag Opt_WarnTypeEqualityRequiresOperators- TcRnIllegalTypeOperator {}- -> ErrorWithoutFlag- TcRnIllegalTypeOperatorDecl {}- -> ErrorWithoutFlag- TcRnGADTMonoLocalBinds {}- -> WarningWithFlag Opt_WarnGADTMonoLocalBinds- TcRnIncorrectNameSpace {}- -> ErrorWithoutFlag- TcRnNotInScope {}- -> ErrorWithoutFlag- TcRnUntickedPromotedThing {}- -> WarningWithFlag Opt_WarnUntickedPromotedConstructors- TcRnIllegalBuiltinSyntax {}- -> ErrorWithoutFlag- TcRnWarnDefaulting {}- -> WarningWithFlag Opt_WarnTypeDefaults- TcRnForeignImportPrimExtNotSet{}- -> ErrorWithoutFlag- TcRnForeignImportPrimSafeAnn{}- -> ErrorWithoutFlag- TcRnForeignFunctionImportAsValue{}- -> ErrorWithoutFlag- TcRnFunPtrImportWithoutAmpersand{}- -> WarningWithFlag Opt_WarnDodgyForeignImports- TcRnIllegalForeignDeclBackend{}- -> ErrorWithoutFlag- TcRnUnsupportedCallConv _ unsupportedCC- -> case unsupportedCC of- StdCallConvUnsupported -> WarningWithFlag Opt_WarnUnsupportedCallingConventions- _ -> ErrorWithoutFlag- TcRnIllegalForeignType{}- -> ErrorWithoutFlag- TcRnInvalidCIdentifier{}- -> ErrorWithoutFlag- TcRnExpectedValueId{}- -> ErrorWithoutFlag- TcRnNotARecordSelector{}- -> ErrorWithoutFlag- TcRnRecSelectorEscapedTyVar{}- -> ErrorWithoutFlag- TcRnPatSynNotBidirectional{}- -> ErrorWithoutFlag- TcRnSplicePolymorphicLocalVar{}- -> ErrorWithoutFlag- TcRnIllegalDerivingItem{}- -> ErrorWithoutFlag- TcRnUnexpectedAnnotation{}- -> ErrorWithoutFlag- TcRnIllegalRecordSyntax{}- -> ErrorWithoutFlag- TcRnUnexpectedTypeSplice{}- -> ErrorWithoutFlag- TcRnInvalidVisibleKindArgument{}- -> ErrorWithoutFlag- TcRnTooManyBinders{}- -> ErrorWithoutFlag- TcRnDifferentNamesForTyVar{}- -> ErrorWithoutFlag- TcRnDisconnectedTyVar{}- -> ErrorWithoutFlag- TcRnInvalidReturnKind{}- -> ErrorWithoutFlag- TcRnClassKindNotConstraint{}- -> ErrorWithoutFlag- TcRnUnpromotableThing{}- -> ErrorWithoutFlag- TcRnMatchesHaveDiffNumArgs{}- -> ErrorWithoutFlag- TcRnCannotBindScopedTyVarInPatSig{}- -> ErrorWithoutFlag- TcRnCannotBindTyVarsInPatBind{}- -> ErrorWithoutFlag- TcRnTooManyTyArgsInConPattern{}- -> ErrorWithoutFlag- TcRnMultipleInlinePragmas{}- -> WarningWithoutFlag- TcRnUnexpectedPragmas{}- -> WarningWithoutFlag- TcRnNonOverloadedSpecialisePragma{}- -> WarningWithoutFlag- TcRnSpecialiseNotVisible{}- -> WarningWithoutFlag- TcRnNameByTemplateHaskellQuote{}- -> ErrorWithoutFlag- TcRnIllegalBindingOfBuiltIn{}- -> ErrorWithoutFlag- TcRnPragmaWarning{}- -> WarningWithFlag Opt_WarnWarningsDeprecations- TcRnIllegalHsigDefaultMethods{}- -> ErrorWithoutFlag- TcRnBadGenericMethod{}- -> ErrorWithoutFlag- TcRnWarningMinimalDefIncomplete{}- -> WarningWithoutFlag- TcRnDefaultMethodForPragmaLacksBinding{}- -> ErrorWithoutFlag- TcRnIgnoreSpecialisePragmaOnDefMethod{}- -> WarningWithoutFlag- TcRnBadMethodErr{}- -> ErrorWithoutFlag- TcRnNoExplicitAssocTypeOrDefaultDeclaration{}- -> WarningWithFlag (Opt_WarnMissingMethods)- TcRnIllegalTypeData- -> ErrorWithoutFlag- TcRnTypeDataForbids{}- -> ErrorWithoutFlag- TcRnIllegalNewtype{}- -> ErrorWithoutFlag- TcRnTypedTHWithPolyType{}- -> ErrorWithoutFlag- TcRnSpliceThrewException{}- -> ErrorWithoutFlag- TcRnInvalidTopDecl{}- -> ErrorWithoutFlag- TcRnNonExactName{}- -> ErrorWithoutFlag- TcRnAddInvalidCorePlugin{}- -> ErrorWithoutFlag- TcRnAddDocToNonLocalDefn{}- -> ErrorWithoutFlag- TcRnFailedToLookupThInstName{}- -> ErrorWithoutFlag- TcRnCannotReifyInstance{}- -> ErrorWithoutFlag- TcRnCannotReifyOutOfScopeThing{}- -> ErrorWithoutFlag- TcRnCannotReifyThingNotInTypeEnv{}- -> ErrorWithoutFlag- TcRnNoRolesAssociatedWithThing{}- -> ErrorWithoutFlag- TcRnCannotRepresentType{}- -> ErrorWithoutFlag- TcRnRunSpliceFailure{}- -> ErrorWithoutFlag- TcRnReportCustomQuasiError isError _- -> if isError then ErrorWithoutFlag else WarningWithoutFlag- TcRnInterfaceLookupError{}- -> ErrorWithoutFlag- TcRnUnsatisfiedMinimalDef{}- -> WarningWithFlag (Opt_WarnMissingMethods)- TcRnMisplacedInstSig{}- -> ErrorWithoutFlag- TcRnBadBootFamInstDecl{}- -> ErrorWithoutFlag- TcRnIllegalFamilyInstance{}- -> ErrorWithoutFlag- TcRnMissingClassAssoc{}- -> ErrorWithoutFlag- TcRnBadFamInstDecl{}- -> ErrorWithoutFlag- TcRnNotOpenFamily{}- -> ErrorWithoutFlag- TcRnNoRebindableSyntaxRecordDot{}- -> ErrorWithoutFlag- TcRnNoFieldPunsRecordDot{}- -> ErrorWithoutFlag- TcRnIllegalStaticExpression{}- -> ErrorWithoutFlag- TcRnIllegalStaticFormInSplice{}- -> ErrorWithoutFlag- TcRnListComprehensionDuplicateBinding{}- -> ErrorWithoutFlag- TcRnEmptyStmtsGroup{}- -> ErrorWithoutFlag- TcRnLastStmtNotExpr{}- -> ErrorWithoutFlag- TcRnUnexpectedStatementInContext{}- -> ErrorWithoutFlag- TcRnSectionWithoutParentheses{}- -> ErrorWithoutFlag- TcRnIllegalImplicitParameterBindings{}- -> ErrorWithoutFlag- TcRnIllegalTupleSection{}- -> ErrorWithoutFlag- TcRnLoopySuperclassSolve{}- -> WarningWithFlag Opt_WarnLoopySuperclassSolve- TcRnCannotDefaultConcrete{}- -> ErrorWithoutFlag-- diagnosticHints = \case- TcRnUnknownMessage m- -> diagnosticHints m- TcRnMessageWithInfo _ msg_with_info- -> case msg_with_info of- TcRnMessageDetailed _ m -> diagnosticHints m- TcRnWithHsDocContext _ msg- -> diagnosticHints msg- TcRnSolverReport _ _ hints- -> hints- TcRnRedundantConstraints{}- -> noHints- TcRnInaccessibleCode{}- -> noHints- TcRnTypeDoesNotHaveFixedRuntimeRep{}- -> noHints- TcRnImplicitLift{}- -> noHints- TcRnUnusedPatternBinds{}- -> noHints- TcRnDodgyImports{}- -> noHints- TcRnDodgyExports{}- -> noHints- TcRnMissingImportList{}- -> noHints- TcRnUnsafeDueToPlugin{}- -> noHints- TcRnModMissingRealSrcSpan{}- -> noHints- TcRnIdNotExportedFromModuleSig name mod- -> [SuggestAddToHSigExportList name $ Just mod]- TcRnIdNotExportedFromLocalSig name- -> [SuggestAddToHSigExportList name Nothing]- TcRnShadowedName{}- -> noHints- TcRnDuplicateWarningDecls{}- -> noHints- TcRnSimplifierTooManyIterations{}- -> [SuggestIncreaseSimplifierIterations]- TcRnIllegalPatSynDecl{}- -> noHints- TcRnLinearPatSyn{}- -> noHints- TcRnEmptyRecordUpdate{}- -> noHints- TcRnIllegalFieldPunning{}- -> [suggestExtension LangExt.NamedFieldPuns]- TcRnIllegalWildcardsInRecord{}- -> [suggestExtension LangExt.RecordWildCards]- TcRnIllegalWildcardInType{}- -> noHints- TcRnDuplicateFieldName{}- -> noHints- TcRnIllegalViewPattern{}- -> [suggestExtension LangExt.ViewPatterns]- TcRnCharLiteralOutOfRange{}- -> noHints- TcRnIllegalWildcardsInConstructor{}- -> noHints- TcRnIgnoringAnnotations{}- -> noHints- TcRnAnnotationInSafeHaskell- -> noHints- TcRnInvalidTypeApplication{}- -> noHints- TcRnTagToEnumMissingValArg- -> noHints- TcRnTagToEnumUnspecifiedResTy{}- -> noHints- TcRnTagToEnumResTyNotAnEnum{}- -> noHints- TcRnTagToEnumResTyTypeData{}- -> noHints- TcRnArrowIfThenElsePredDependsOnResultTy- -> noHints- TcRnIllegalHsBootFileDecl- -> noHints- TcRnRecursivePatternSynonym{}- -> noHints- TcRnPartialTypeSigTyVarMismatch{}- -> noHints- TcRnPartialTypeSigBadQuantifier{}- -> noHints- TcRnMissingSignature {}- -> noHints- TcRnPolymorphicBinderMissingSig{}- -> noHints- TcRnOverloadedSig{}- -> noHints- TcRnTupleConstraintInst{}- -> noHints- TcRnAbstractClassInst{}- -> noHints- TcRnNoClassInstHead{}- -> noHints- TcRnUserTypeError{}- -> noHints- TcRnConstraintInKind{}- -> noHints- TcRnUnboxedTupleOrSumTypeFuncArg tuple_or_sum _- -> [suggestExtension $ unboxedTupleOrSumExtension tuple_or_sum]- TcRnLinearFuncInKind{}- -> noHints- TcRnForAllEscapeError{}- -> noHints- TcRnVDQInTermType{}- -> noHints- TcRnBadQuantPredHead{}- -> noHints- TcRnIllegalTupleConstraint{}- -> [suggestExtension LangExt.ConstraintKinds]- TcRnNonTypeVarArgInConstraint{}- -> [suggestExtension LangExt.FlexibleContexts]- TcRnIllegalImplicitParam{}- -> noHints- TcRnIllegalConstraintSynonymOfKind{}- -> [suggestExtension LangExt.ConstraintKinds]- TcRnIllegalClassInst{}- -> noHints- TcRnOversaturatedVisibleKindArg{}- -> noHints- TcRnBadAssociatedType{}- -> noHints- TcRnForAllRankErr rank _- -> case rank of- LimitedRank{} -> [suggestExtension LangExt.RankNTypes]- MonoTypeRankZero -> [suggestExtension LangExt.RankNTypes]- MonoTypeTyConArg -> [suggestExtension LangExt.ImpredicativeTypes]- MonoTypeSynArg -> [suggestExtension LangExt.LiberalTypeSynonyms]- MonoTypeConstraint -> [suggestExtension LangExt.QuantifiedConstraints]- _ -> noHints- TcRnMonomorphicBindings bindings- -> case bindings of- [] -> noHints- (x:xs) -> [SuggestAddTypeSignatures $ NamedBindings (x NE.:| xs)]- TcRnOrphanInstance{}- -> [SuggestFixOrphanInstance]- TcRnFunDepConflict{}- -> noHints- TcRnDupInstanceDecls{}- -> noHints- TcRnConflictingFamInstDecls{}- -> noHints- TcRnFamInstNotInjective rea _ _- -> case rea of- InjErrRhsBareTyVar{} -> noHints- InjErrRhsCannotBeATypeFam -> noHints- InjErrRhsOverlap -> noHints- InjErrCannotInferFromRhs _ _ suggestUndInst- | YesSuggestUndecidableInstaces <- suggestUndInst- -> [suggestExtension LangExt.UndecidableInstances]- | otherwise- -> noHints- TcRnBangOnUnliftedType{}- -> noHints- TcRnLazyBangOnUnliftedType{}- -> noHints- TcRnMultipleDefaultDeclarations{}- -> noHints- TcRnBadDefaultType{}- -> noHints- TcRnPatSynBundledWithNonDataCon{}- -> noHints- TcRnPatSynBundledWithWrongType{}- -> noHints- TcRnDupeModuleExport{}- -> noHints- TcRnExportedModNotImported{}- -> noHints- TcRnNullExportedModule{}- -> noHints- TcRnMissingExportList{}- -> noHints- TcRnExportHiddenComponents{}- -> noHints- TcRnDuplicateExport{}- -> noHints- TcRnExportedParentChildMismatch{}- -> noHints- TcRnConflictingExports{}- -> noHints- TcRnAmbiguousField{}- -> noHints- TcRnMissingFields{}- -> noHints- TcRnFieldUpdateInvalidType{}- -> noHints- TcRnNoConstructorHasAllFields{}- -> noHints- TcRnMixedSelectors{}- -> noHints- TcRnMissingStrictFields{}- -> noHints- TcRnNoPossibleParentForFields{}- -> noHints- TcRnBadOverloadedRecordUpdate{}- -> noHints- TcRnStaticFormNotClosed{}- -> noHints- TcRnUselessTypeable- -> noHints- TcRnDerivingDefaults{}- -> [useDerivingStrategies]- TcRnNonUnaryTypeclassConstraint{}- -> noHints- TcRnPartialTypeSignatures suggestParSig _- -> case suggestParSig of- YesSuggestPartialTypeSignatures- -> let info = text "to use the inferred type"- in [suggestExtensionWithInfo info LangExt.PartialTypeSignatures]- NoSuggestPartialTypeSignatures- -> noHints- TcRnCannotDeriveInstance cls _ _ newtype_deriving rea- -> deriveInstanceErrReasonHints cls newtype_deriving rea- TcRnLazyGADTPattern- -> noHints- TcRnArrowProcGADTPattern- -> noHints- TcRnSpecialClassInst {}- -> noHints- TcRnForallIdentifier {}- -> [SuggestRenameForall]- TcRnTypeEqualityOutOfScope- -> noHints- TcRnTypeEqualityRequiresOperators- -> [suggestExtension LangExt.TypeOperators]- TcRnIllegalTypeOperator {}- -> [suggestExtension LangExt.TypeOperators]- TcRnIllegalTypeOperatorDecl {}- -> [suggestExtension LangExt.TypeOperators]- TcRnGADTMonoLocalBinds {}- -> [suggestAnyExtension [LangExt.GADTs, LangExt.TypeFamilies]]- TcRnIncorrectNameSpace nm is_th_use- | is_th_use- -> [SuggestAppropriateTHTick $ nameNameSpace nm]- | otherwise- -> noHints- TcRnNotInScope err _ _ hints- -> scopeErrorHints err ++ hints- TcRnUntickedPromotedThing thing- -> [SuggestAddTick thing]- TcRnIllegalBuiltinSyntax {}- -> noHints- TcRnWarnDefaulting {}- -> noHints- TcRnForeignImportPrimExtNotSet{}- -> [suggestExtension LangExt.GHCForeignImportPrim]- TcRnForeignImportPrimSafeAnn{}- -> noHints- TcRnForeignFunctionImportAsValue{}- -> noHints- TcRnFunPtrImportWithoutAmpersand{}- -> noHints- TcRnIllegalForeignDeclBackend{}- -> noHints- TcRnUnsupportedCallConv{}- -> noHints- TcRnIllegalForeignType _ reason- -> case reason of- TypeCannotBeMarshaled _ why- | NewtypeDataConNotInScope{} <- why -> [SuggestImportingDataCon]- | UnliftedFFITypesNeeded <- why -> [suggestExtension LangExt.UnliftedFFITypes]- _ -> noHints- TcRnInvalidCIdentifier{}- -> noHints- TcRnExpectedValueId{}- -> noHints- TcRnNotARecordSelector{}- -> noHints- TcRnRecSelectorEscapedTyVar{}- -> [SuggestPatternMatchingSyntax]- TcRnPatSynNotBidirectional{}- -> noHints- TcRnSplicePolymorphicLocalVar{}- -> noHints- TcRnIllegalDerivingItem{}- -> noHints- TcRnUnexpectedAnnotation{}- -> noHints- TcRnIllegalRecordSyntax{}- -> noHints- TcRnUnexpectedTypeSplice{}- -> noHints- TcRnInvalidVisibleKindArgument{}- -> noHints- TcRnTooManyBinders{}- -> noHints- TcRnDifferentNamesForTyVar{}- -> noHints- TcRnDisconnectedTyVar n- -> [SuggestBindTyVarExplicitly n]- TcRnInvalidReturnKind _ _ _ mb_suggest_unlifted_ext- -> case mb_suggest_unlifted_ext of- Nothing -> noHints- Just SuggestUnliftedNewtypes -> [suggestExtension LangExt.UnliftedNewtypes]- Just SuggestUnliftedDatatypes -> [suggestExtension LangExt.UnliftedDatatypes]- TcRnClassKindNotConstraint{}- -> noHints- TcRnUnpromotableThing{}- -> noHints- TcRnMatchesHaveDiffNumArgs{}- -> noHints- TcRnCannotBindScopedTyVarInPatSig{}- -> noHints- TcRnCannotBindTyVarsInPatBind{}- -> noHints- TcRnTooManyTyArgsInConPattern{}- -> noHints- TcRnMultipleInlinePragmas{}- -> noHints- TcRnUnexpectedPragmas{}- -> noHints- TcRnNonOverloadedSpecialisePragma{}- -> noHints- TcRnSpecialiseNotVisible name- -> [SuggestSpecialiseVisibilityHints name]- TcRnNameByTemplateHaskellQuote{}- -> noHints- TcRnIllegalBindingOfBuiltIn{}- -> noHints- TcRnPragmaWarning{}- -> noHints- TcRnIllegalHsigDefaultMethods{}- -> noHints- TcRnBadGenericMethod{}- -> noHints- TcRnWarningMinimalDefIncomplete{}- -> noHints- TcRnDefaultMethodForPragmaLacksBinding{}- -> noHints- TcRnIgnoreSpecialisePragmaOnDefMethod{}- -> noHints- TcRnBadMethodErr{}- -> noHints- TcRnNoExplicitAssocTypeOrDefaultDeclaration{}- -> noHints- TcRnIllegalTypeData- -> [suggestExtension LangExt.TypeData]- TcRnTypeDataForbids{}- -> noHints- TcRnIllegalNewtype{}- -> noHints- TcRnTypedTHWithPolyType{}- -> noHints- TcRnSpliceThrewException{}- -> noHints- TcRnInvalidTopDecl{}- -> noHints- TcRnNonExactName{}- -> noHints- TcRnAddInvalidCorePlugin{}- -> noHints- TcRnAddDocToNonLocalDefn{}- -> noHints- TcRnFailedToLookupThInstName{}- -> noHints- TcRnCannotReifyInstance{}- -> noHints- TcRnCannotReifyOutOfScopeThing{}- -> noHints- TcRnCannotReifyThingNotInTypeEnv{}- -> noHints- TcRnNoRolesAssociatedWithThing{}- -> noHints- TcRnCannotRepresentType{}- -> noHints- TcRnRunSpliceFailure{}- -> noHints- TcRnReportCustomQuasiError{}- -> noHints- TcRnInterfaceLookupError{}- -> noHints- TcRnUnsatisfiedMinimalDef{}- -> noHints- TcRnMisplacedInstSig{}- -> [suggestExtension LangExt.InstanceSigs]- TcRnBadBootFamInstDecl{}- -> noHints- TcRnIllegalFamilyInstance{}- -> noHints- TcRnMissingClassAssoc{}- -> noHints- TcRnBadFamInstDecl{}- -> [suggestExtension LangExt.TypeFamilies]- TcRnNotOpenFamily{}- -> noHints- TcRnNoRebindableSyntaxRecordDot{}- -> noHints- TcRnNoFieldPunsRecordDot{}- -> noHints- TcRnIllegalStaticExpression{}- -> [suggestExtension LangExt.StaticPointers]- TcRnIllegalStaticFormInSplice{}- -> noHints- TcRnListComprehensionDuplicateBinding{}- -> noHints- TcRnEmptyStmtsGroup EmptyStmtsGroupInDoNotation{}- -> [suggestExtension LangExt.NondecreasingIndentation]- TcRnEmptyStmtsGroup{}- -> noHints- TcRnLastStmtNotExpr{}- -> noHints- TcRnUnexpectedStatementInContext _ _ mExt- | Nothing <- mExt -> noHints- | Just ext <- mExt -> [suggestExtension ext]- TcRnSectionWithoutParentheses{}- -> noHints- TcRnIllegalImplicitParameterBindings{}- -> noHints- TcRnIllegalTupleSection{}- -> [suggestExtension LangExt.TupleSections]- TcRnLoopySuperclassSolve wtd_loc wtd_pty- -> [LoopySuperclassSolveHint wtd_pty cls_or_qc]- where- cls_or_qc :: ClsInstOrQC- cls_or_qc = case ctLocOrigin wtd_loc of- ScOrigin c_or_q _ -> c_or_q- _ -> IsClsInst -- shouldn't happen- TcRnCannotDefaultConcrete{}- -> [SuggestAddTypeSignatures UnnamedBinding]-- diagnosticCode = constructorCode---- | Change [x] to "x", [x, y] to "x and y", [x, y, z] to "x, y, and z",--- and so on. The `and` stands for any `conjunction`, which is passed in.-commafyWith :: SDoc -> [SDoc] -> [SDoc]-commafyWith _ [] = []-commafyWith _ [x] = [x]-commafyWith conjunction [x, y] = [x <+> conjunction <+> y]-commafyWith conjunction xs = addConjunction $ punctuate comma xs- where addConjunction [x, y] = [x, conjunction, y]- addConjunction (x : xs) = x : addConjunction xs- addConjunction _ = panic "commafyWith expected 2 or more elements"--deriveInstanceErrReasonHints :: Class- -> UsingGeneralizedNewtypeDeriving- -> DeriveInstanceErrReason- -> [GhcHint]-deriveInstanceErrReasonHints cls newtype_deriving = \case- DerivErrNotWellKinded _ _ n_args_to_keep- | cls `hasKey` gen1ClassKey && n_args_to_keep >= 0- -> [suggestExtension LangExt.PolyKinds]- | otherwise- -> noHints- DerivErrSafeHaskellGenericInst -> noHints- DerivErrDerivingViaWrongKind{} -> noHints- DerivErrNoEtaReduce{} -> noHints- DerivErrBootFileFound -> noHints- DerivErrDataConsNotAllInScope{} -> noHints- DerivErrGNDUsedOnData -> noHints- DerivErrNullaryClasses -> noHints- DerivErrLastArgMustBeApp -> noHints- DerivErrNoFamilyInstance{} -> noHints- DerivErrNotStockDeriveable deriveAnyClassEnabled- | deriveAnyClassEnabled == NoDeriveAnyClassEnabled- -> [suggestExtension LangExt.DeriveAnyClass]- | otherwise- -> noHints- DerivErrHasAssociatedDatatypes{}- -> noHints- DerivErrNewtypeNonDeriveableClass- | newtype_deriving == NoGeneralizedNewtypeDeriving- -> [useGND]- | otherwise- -> noHints- DerivErrCannotEtaReduceEnough{}- | newtype_deriving == NoGeneralizedNewtypeDeriving- -> [useGND]- | otherwise- -> noHints- DerivErrOnlyAnyClassDeriveable _ deriveAnyClassEnabled- | deriveAnyClassEnabled == NoDeriveAnyClassEnabled- -> [suggestExtension LangExt.DeriveAnyClass]- | otherwise- -> noHints- DerivErrNotDeriveable deriveAnyClassEnabled- | deriveAnyClassEnabled == NoDeriveAnyClassEnabled- -> [suggestExtension LangExt.DeriveAnyClass]- | otherwise- -> noHints- DerivErrNotAClass{}- -> noHints- DerivErrNoConstructors{}- -> let info = text "to enable deriving for empty data types"- in [useExtensionInOrderTo info LangExt.EmptyDataDeriving]- DerivErrLangExtRequired{}- -- This is a slightly weird corner case of GHC: we are failing- -- to derive a typeclass instance because a particular 'Extension'- -- is not enabled (and so we report in the main error), but here- -- we don't want to /repeat/ to enable the extension in the hint.- -> noHints- DerivErrDunnoHowToDeriveForType{}- -> noHints- DerivErrMustBeEnumType rep_tc- -- We want to suggest GND only if this /is/ a newtype.- | newtype_deriving == NoGeneralizedNewtypeDeriving && isNewTyCon rep_tc- -> [useGND]- | otherwise- -> noHints- DerivErrMustHaveExactlyOneConstructor{}- -> noHints- DerivErrMustHaveSomeParameters{}- -> noHints- DerivErrMustNotHaveClassContext{}- -> noHints- DerivErrBadConstructor wcard _- -> case wcard of- Nothing -> noHints- Just YesHasWildcard -> [SuggestFillInWildcardConstraint]- Just NoHasWildcard -> [SuggestAddStandaloneDerivation]- DerivErrGenerics{}- -> noHints- DerivErrEnumOrProduct{}- -> noHints--messageWithInfoDiagnosticMessage :: UnitState- -> ErrInfo- -> Bool- -> DecoratedSDoc- -> DecoratedSDoc-messageWithInfoDiagnosticMessage unit_state ErrInfo{..} show_ctxt important =- let err_info' = map (pprWithUnitState unit_state) ([errInfoContext | show_ctxt] ++ [errInfoSupplementary])- in (mapDecoratedSDoc (pprWithUnitState unit_state) important) `unionDecoratedSDoc`- mkDecorated err_info'--dodgy_msg :: (Outputable a, Outputable b) => SDoc -> a -> b -> SDoc-dodgy_msg kind tc ie- = sep [ text "The" <+> kind <+> text "item"- <+> quotes (ppr ie)- <+> text "suggests that",- quotes (ppr tc) <+> text "has (in-scope) constructors or class methods,",- text "but it has none" ]--dodgy_msg_insert :: forall p . (Anno (IdP (GhcPass p)) ~ SrcSpanAnnN) => IdP (GhcPass p) -> IE (GhcPass p)-dodgy_msg_insert tc = IEThingAll noAnn ii- where- ii :: LIEWrappedName (GhcPass p)- ii = noLocA (IEName noExtField $ noLocA tc)--pprTypeDoesNotHaveFixedRuntimeRep :: Type -> FixedRuntimeRepProvenance -> SDoc-pprTypeDoesNotHaveFixedRuntimeRep ty prov =- let what = pprFixedRuntimeRepProvenance prov- in text "The" <+> what <+> text "does not have a fixed runtime representation:"- $$ format_frr_err ty--format_frr_err :: Type -- ^ the type which doesn't have a fixed runtime representation- -> SDoc-format_frr_err ty- = (bullet <+> ppr tidy_ty <+> dcolon <+> ppr tidy_ki)- where- (tidy_env, tidy_ty) = tidyOpenType emptyTidyEnv ty- tidy_ki = tidyType tidy_env (typeKind ty)--pprField :: (FieldLabelString, TcType) -> SDoc-pprField (f,ty) = ppr f <+> dcolon <+> ppr ty--pprRecordFieldPart :: RecordFieldPart -> SDoc-pprRecordFieldPart = \case- RecordFieldConstructor{} -> text "construction"- RecordFieldPattern{} -> text "pattern"- RecordFieldUpdate -> text "update"--pprBindings :: [Name] -> SDoc-pprBindings = pprWithCommas (quotes . ppr)--injectivityErrorHerald :: SDoc-injectivityErrorHerald =- text "Type family equation violates the family's injectivity annotation."--formatExportItemError :: SDoc -> String -> SDoc-formatExportItemError exportedThing reason =- hsep [ text "The export item"- , quotes exportedThing- , text reason ]---- | What warning flag is associated with the given missing signature?-missingSignatureWarningFlag :: MissingSignature -> Exported -> Bool -> WarningFlag-missingSignatureWarningFlag (MissingTopLevelBindingSig {}) exported overridden- | IsExported <- exported- , not overridden- = Opt_WarnMissingExportedSignatures- | otherwise- = Opt_WarnMissingSignatures-missingSignatureWarningFlag (MissingPatSynSig {}) exported overridden- | IsExported <- exported- , not overridden- = Opt_WarnMissingExportedPatternSynonymSignatures- | otherwise- = Opt_WarnMissingPatternSynonymSignatures-missingSignatureWarningFlag (MissingTyConKindSig {}) _ _- = Opt_WarnMissingKindSignatures--useDerivingStrategies :: GhcHint-useDerivingStrategies =- useExtensionInOrderTo (text "to pick a different strategy") LangExt.DerivingStrategies--useGND :: GhcHint-useGND = let info = text "for GHC's" <+> text "newtype-deriving extension"- in suggestExtensionWithInfo info LangExt.GeneralizedNewtypeDeriving--cannotMakeDerivedInstanceHerald :: Class- -> [Type]- -> Maybe (DerivStrategy GhcTc)- -> UsingGeneralizedNewtypeDeriving- -> Bool -- ^ If False, only prints the why.- -> SDoc- -> SDoc-cannotMakeDerivedInstanceHerald cls cls_args mb_strat newtype_deriving pprHerald why =- if pprHerald- then sep [(hang (text "Can't make a derived instance of")- 2 (quotes (ppr pred) <+> via_mechanism)- $$ nest 2 extra) <> colon,- nest 2 why]- else why- where- strat_used = isJust mb_strat- extra | not strat_used, (newtype_deriving == YesGeneralizedNewtypeDeriving)- = text "(even with cunning GeneralizedNewtypeDeriving)"- | otherwise = empty- pred = mkClassPred cls cls_args- via_mechanism | strat_used- , Just strat <- mb_strat- = text "with the" <+> (derivStrategyName strat) <+> text "strategy"- | otherwise- = empty--badCon :: DataCon -> SDoc -> SDoc-badCon con msg = text "Constructor" <+> quotes (ppr con) <+> msg--derivErrDiagnosticMessage :: Class- -> [Type]- -> Maybe (DerivStrategy GhcTc)- -> UsingGeneralizedNewtypeDeriving- -> Bool -- If True, includes the herald \"can't make a derived..\"- -> DeriveInstanceErrReason- -> SDoc-derivErrDiagnosticMessage cls cls_tys mb_strat newtype_deriving pprHerald = \case- DerivErrNotWellKinded tc cls_kind _- -> sep [ hang (text "Cannot derive well-kinded instance of form"- <+> quotes (pprClassPred cls cls_tys- <+> parens (ppr tc <+> text "...")))- 2 empty- , nest 2 (text "Class" <+> quotes (ppr cls)- <+> text "expects an argument of kind"- <+> quotes (pprKind cls_kind))- ]- DerivErrSafeHaskellGenericInst- -> text "Generic instances can only be derived in"- <+> text "Safe Haskell using the stock strategy."- DerivErrDerivingViaWrongKind 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))- DerivErrNoEtaReduce inst_ty- -> sep [text "Cannot eta-reduce to an instance of form",- nest 2 (text "instance (...) =>"- <+> pprClassPred cls (cls_tys ++ [inst_ty]))]- DerivErrBootFileFound- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (text "Cannot derive instances in hs-boot files"- $+$ text "Write an instance declaration instead")- DerivErrDataConsNotAllInScope tc- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (hang (text "The data constructors of" <+> quotes (ppr tc) <+> text "are not all in scope")- 2 (text "so you cannot derive an instance for it"))- DerivErrGNDUsedOnData- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (text "GeneralizedNewtypeDeriving cannot be used on non-newtypes")- DerivErrNullaryClasses- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (text "Cannot derive instances for nullary classes")- DerivErrLastArgMustBeApp- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- ( text "The last argument of the instance must be a"- <+> text "data or newtype application")- DerivErrNoFamilyInstance tc tc_args- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (text "No family instance for" <+> quotes (pprTypeApp tc tc_args))- DerivErrNotStockDeriveable _- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (quotes (ppr cls) <+> text "is not a stock derivable class (Eq, Show, etc.)")- DerivErrHasAssociatedDatatypes hasAdfs at_last_cls_tv_in_kinds at_without_last_cls_tv- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- $ vcat [ ppWhen (hasAdfs == YesHasAdfs) adfs_msg- , case at_without_last_cls_tv of- YesAssociatedTyNotParamOverLastTyVar tc -> at_without_last_cls_tv_msg tc- NoAssociatedTyNotParamOverLastTyVar -> empty- , case at_last_cls_tv_in_kinds of- YesAssocTyLastVarInKind tc -> at_last_cls_tv_in_kinds_msg tc- NoAssocTyLastVarInKind -> empty- ]- where-- 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")- DerivErrNewtypeNonDeriveableClass- -> derivErrDiagnosticMessage cls cls_tys mb_strat newtype_deriving pprHerald (DerivErrNotStockDeriveable NoDeriveAnyClassEnabled)- DerivErrCannotEtaReduceEnough eta_ok- -> let cant_derive_err = ppUnless eta_ok eta_msg- eta_msg = text "cannot eta-reduce the representation type enough"- in cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- cant_derive_err- DerivErrOnlyAnyClassDeriveable tc _- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (quotes (ppr tc) <+> text "is a type class,"- <+> text "and can only have a derived instance"- $+$ text "if DeriveAnyClass is enabled")- DerivErrNotDeriveable _- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald empty- DerivErrNotAClass predType- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (quotes (ppr predType) <+> text "is not a class")- DerivErrNoConstructors rep_tc- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (quotes (pprSourceTyCon rep_tc) <+> text "must have at least one data constructor")- DerivErrLangExtRequired ext- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (text "You need " <> ppr ext- <+> text "to derive an instance for this class")- DerivErrDunnoHowToDeriveForType ty- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (hang (text "Don't know how to derive" <+> quotes (ppr cls))- 2 (text "for type" <+> quotes (ppr ty)))- DerivErrMustBeEnumType rep_tc- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (sep [ quotes (pprSourceTyCon rep_tc) <+>- text "must be an enumeration type"- , text "(an enumeration consists of one or more nullary, non-GADT constructors)" ])-- DerivErrMustHaveExactlyOneConstructor rep_tc- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (quotes (pprSourceTyCon rep_tc) <+> text "must have precisely one constructor")- DerivErrMustHaveSomeParameters rep_tc- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (text "Data type" <+> quotes (ppr rep_tc) <+> text "must have some type parameters")- DerivErrMustNotHaveClassContext rep_tc bad_stupid_theta- -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (text "Data type" <+> quotes (ppr rep_tc)- <+> text "must not have a class context:" <+> pprTheta bad_stupid_theta)- DerivErrBadConstructor _ reasons- -> let why = vcat $ map renderReason reasons- in cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald why- where- renderReason = \case- DerivErrBadConExistential con- -> badCon con $ text "must be truly polymorphic in the last argument of the data type"- DerivErrBadConCovariant con- -> badCon con $ text "must not use the type variable in a function argument"- DerivErrBadConFunTypes con- -> badCon con $ text "must not contain function types"- DerivErrBadConWrongArg con- -> badCon con $ text "must use the type variable only as the last argument of a data type"- DerivErrBadConIsGADT con- -> badCon con $ text "is a GADT"- DerivErrBadConHasExistentials con- -> badCon con $ text "has existential type variables in its type"- DerivErrBadConHasConstraints con- -> badCon con $ text "has constraints in its type"- DerivErrBadConHasHigherRankType con- -> badCon con $ text "has a higher-rank type"- DerivErrGenerics reasons- -> let why = vcat $ map renderReason reasons- in cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald why- where- renderReason = \case- DerivErrGenericsMustNotHaveDatatypeContext tc_name- -> ppr tc_name <+> text "must not have a datatype context"- DerivErrGenericsMustNotHaveExoticArgs dc- -> ppr dc <+> text "must not have exotic unlifted or polymorphic arguments"- DerivErrGenericsMustBeVanillaDataCon dc- -> ppr dc <+> text "must be a vanilla data constructor"- DerivErrGenericsMustHaveSomeTypeParams rep_tc- -> text "Data type" <+> quotes (ppr rep_tc)- <+> text "must have some type parameters"- DerivErrGenericsMustNotHaveExistentials con- -> badCon con $ text "must not have existential arguments"- DerivErrGenericsWrongArgKind con- -> badCon con $- text "applies a type to an argument involving the last parameter"- $$ text "but the applied type is not of kind * -> *"- DerivErrEnumOrProduct this that- -> let ppr1 = derivErrDiagnosticMessage cls cls_tys mb_strat newtype_deriving False this- ppr2 = derivErrDiagnosticMessage cls cls_tys mb_strat newtype_deriving False that- in cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald- (ppr1 $$ text " or" $$ ppr2)--{- *********************************************************************-* *- Outputable SolverReportErrCtxt (for debugging)-* *-**********************************************************************-}--instance Outputable SolverReportErrCtxt where- ppr (CEC { cec_binds = bvar- , cec_defer_type_errors = dte- , cec_expr_holes = eh- , cec_type_holes = th- , cec_out_of_scope_holes = osh- , cec_warn_redundant = wr- , cec_expand_syns = es- , cec_suppress = sup })- = text "CEC" <+> braces (vcat- [ text "cec_binds" <+> equals <+> ppr bvar- , text "cec_defer_type_errors" <+> equals <+> ppr dte- , text "cec_expr_holes" <+> equals <+> ppr eh- , text "cec_type_holes" <+> equals <+> ppr th- , text "cec_out_of_scope_holes" <+> equals <+> ppr osh- , text "cec_warn_redundant" <+> equals <+> ppr wr- , text "cec_expand_syns" <+> equals <+> ppr es- , text "cec_suppress" <+> equals <+> ppr sup ])--{- *********************************************************************-* *- Outputting TcSolverReportMsg errors-* *-**********************************************************************-}---- | Pretty-print a 'SolverReportWithCtxt', containing a 'TcSolverReportMsg'--- with its enclosing 'SolverReportErrCtxt'.-pprSolverReportWithCtxt :: SolverReportWithCtxt -> SDoc-pprSolverReportWithCtxt (SolverReportWithCtxt { reportContext = ctxt, reportContent = msg })- = pprTcSolverReportMsg ctxt msg---- | Pretty-print a 'TcSolverReportMsg', with its enclosing 'SolverReportErrCtxt'.-pprTcSolverReportMsg :: SolverReportErrCtxt -> TcSolverReportMsg -> SDoc-pprTcSolverReportMsg _ (BadTelescope telescope skols) =- hang (text "These kind and type variables:" <+> ppr telescope $$- text "are out of dependency order. Perhaps try this ordering:")- 2 (pprTyVars sorted_tvs)- where- sorted_tvs = scopedSort skols-pprTcSolverReportMsg _ (UserTypeError ty) =- pprUserTypeErrorTy ty-pprTcSolverReportMsg ctxt (ReportHoleError hole err) =- pprHoleError ctxt hole err-pprTcSolverReportMsg ctxt- (CannotUnifyVariable- { mismatchMsg = msg- , cannotUnifyReason = reason })- = pprMismatchMsg ctxt msg- $$ pprCannotUnifyVariableReason ctxt reason-pprTcSolverReportMsg ctxt- (Mismatch- { mismatchMsg = mismatch_msg- , mismatchTyVarInfo = tv_info- , mismatchAmbiguityInfo = ambig_infos- , mismatchCoercibleInfo = coercible_info })- = hang (pprMismatchMsg ctxt mismatch_msg)- 2 (vcat ( maybe empty (pprTyVarInfo ctxt) tv_info- : maybe empty pprCoercibleMsg coercible_info- : map pprAmbiguityInfo ambig_infos ))-pprTcSolverReportMsg _ (FixedRuntimeRepError frr_origs) =- vcat (map make_msg frr_origs)- where- -- Assemble the error message: pair up each origin with the corresponding type, e.g.- -- • FixedRuntimeRep origin msg 1 ...- -- a :: TYPE r1- -- • FixedRuntimeRep origin msg 2 ...- -- b :: TYPE r2- make_msg :: FixedRuntimeRepErrorInfo -> SDoc- make_msg (FRR_Info { frr_info_origin =- FixedRuntimeRepOrigin- { frr_type = ty- , frr_context = frr_ctxt }- , frr_info_not_concrete =- mb_not_conc }) =- -- Add bullet points if there is more than one error.- (if length frr_origs > 1 then (bullet <+>) else id) $- vcat [ sep [ pprFixedRuntimeRepContext frr_ctxt- , text "does not have a fixed runtime representation." ]- , type_printout ty- , case mb_not_conc of- Nothing -> empty- Just (conc_tv, not_conc) ->- unsolved_concrete_eq_explanation conc_tv not_conc ]-- -- Don't print out the type (only the kind), if the type includes- -- a confusing cast, unless the user passed -fprint-explicit-coercions.- --- -- Example:- --- -- In T20363, we have a representation-polymorphism error with a type- -- of the form- --- -- ( (# #) |> co ) :: TYPE NilRep- --- -- where NilRep is a nullary type family application which reduces to TupleRep '[].- -- We prefer avoiding showing the cast to the user, but we also don't want to- -- print the confusing:- --- -- (# #) :: TYPE NilRep- --- -- So in this case we simply don't print the type, only the kind.- confusing_cast :: Type -> Bool- confusing_cast ty =- case ty of- CastTy inner_ty _- -- A confusing cast is one that is responsible- -- for a representation-polymorphism error.- -> isConcrete (typeKind inner_ty)- _ -> False-- type_printout :: Type -> SDoc- type_printout ty =- sdocOption sdocPrintExplicitCoercions $ \ show_coercions ->- if confusing_cast ty && not show_coercions- then vcat [ text "Its kind is:"- , nest 2 $ pprWithTYPE (typeKind ty)- , text "(Use -fprint-explicit-coercions to see the full type.)" ]- else vcat [ text "Its type is:"- , nest 2 $ ppr ty <+> dcolon <+> pprWithTYPE (typeKind ty) ]-- unsolved_concrete_eq_explanation :: TcTyVar -> Type -> SDoc- unsolved_concrete_eq_explanation tv not_conc =- text "Cannot unify" <+> quotes (ppr not_conc)- <+> text "with the type variable" <+> quotes (ppr tv)- $$ text "because it is not a concrete" <+> what <> dot- where- ki = tyVarKind tv- what :: SDoc- what- | isRuntimeRepTy ki- = quotes (text "RuntimeRep")- | isLevityTy ki- = quotes (text "Levity")- | otherwise- = text "type"-pprTcSolverReportMsg _ (UntouchableVariable tv implic)- | Implic { ic_given = given, ic_info = skol_info } <- implic- = sep [ quotes (ppr tv) <+> text "is untouchable"- , nest 2 $ text "inside the constraints:" <+> pprEvVarTheta given- , nest 2 $ text "bound by" <+> ppr skol_info- , nest 2 $ text "at" <+>- ppr (getLclEnvLoc (ic_env implic)) ]-pprTcSolverReportMsg _ (BlockedEquality item) =- vcat [ hang (text "Cannot use equality for substitution:")- 2 (ppr (errorItemPred item))- , text "Doing so would be ill-kinded." ]-pprTcSolverReportMsg _ (ExpectingMoreArguments n thing) =- text "Expecting" <+> speakN (abs n) <+>- more <+> quotes (ppr thing)- where- more- | n == 1 = text "more argument to"- | otherwise = text "more arguments to" -- n > 1-pprTcSolverReportMsg ctxt (UnboundImplicitParams (item :| items)) =- let givens = getUserGivens ctxt- in if null givens- then addArising (errorItemCtLoc item) $- sep [ text "Unbound implicit parameter" <> plural preds- , nest 2 (pprParendTheta preds) ]- else pprMismatchMsg ctxt (CouldNotDeduce givens (item :| items) Nothing)- where- preds = map errorItemPred (item : items)-pprTcSolverReportMsg _ (AmbiguityPreventsSolvingCt item ambigs) =- pprAmbiguityInfo (Ambiguity True ambigs) <+>- pprArising (errorItemCtLoc item) $$- text "prevents the constraint" <+> quotes (pprParendType $ errorItemPred item)- <+> text "from being solved."-pprTcSolverReportMsg ctxt@(CEC {cec_encl = implics})- (CannotResolveInstance item unifiers candidates imp_errs suggs binds)- =- vcat- [ no_inst_msg- , nest 2 extra_note- , mb_patsyn_prov `orElse` empty- , ppWhen (has_ambigs && not (null unifiers && null useful_givens))- (vcat [ ppUnless lead_with_ambig $- pprAmbiguityInfo (Ambiguity False (ambig_kvs, ambig_tvs))- , pprRelevantBindings binds- , potential_msg ])- , ppWhen (isNothing mb_patsyn_prov) $- -- Don't suggest fixes for the provided context of a pattern- -- synonym; the right fix is to bind more in the pattern- show_fixes (ctxtFixes has_ambigs pred implics- ++ drv_fixes ++ naked_sc_fixes)- , ppWhen (not (null candidates))- (hang (text "There are instances for similar types:")- 2 (vcat (map ppr candidates)))- -- See Note [Report candidate instances]- , vcat $ map ppr imp_errs- , vcat $ map ppr suggs ]- where- orig = errorItemOrigin item- pred = errorItemPred item- (clas, tys) = getClassPredTys pred- -- See Note [Highlighting ambiguous type variables] in GHC.Tc.Errors- (ambig_kvs, ambig_tvs) = ambigTkvsOfTy pred- ambigs = ambig_kvs ++ ambig_tvs- has_ambigs = not (null ambigs)- useful_givens = discardProvCtxtGivens orig (getUserGivensFromImplics implics)- -- useful_givens are the enclosing implications with non-empty givens,- -- modulo the horrid discardProvCtxtGivens- lead_with_ambig = not (null ambigs)- && not (any isRuntimeUnkSkol ambigs)- && not (null unifiers)- && null useful_givens-- no_inst_msg :: SDoc- no_inst_msg- | lead_with_ambig- = pprTcSolverReportMsg ctxt $ AmbiguityPreventsSolvingCt item (ambig_kvs, ambig_tvs)- | otherwise- = pprMismatchMsg ctxt $ CouldNotDeduce useful_givens (item :| []) Nothing-- -- Report "potential instances" only when the constraint arises- -- directly from the user's use of an overloaded function- want_potential (TypeEqOrigin {}) = False- want_potential _ = True-- potential_msg- = ppWhen (not (null unifiers) && want_potential orig) $- potential_hdr $$- potentialInstancesErrMsg (PotentialInstances { matches = [], unifiers })-- potential_hdr- = ppWhen lead_with_ambig $- text "Probable fix: use a type annotation to specify what"- <+> pprQuotedList ambig_tvs <+> text "should be."-- mb_patsyn_prov :: Maybe SDoc- mb_patsyn_prov- | not lead_with_ambig- , ProvCtxtOrigin PSB{ psb_def = L _ pat } <- orig- = Just (vcat [ text "In other words, a successful match on the pattern"- , nest 2 $ ppr pat- , text "does not provide the constraint" <+> pprParendType pred ])- | otherwise = Nothing-- extra_note | any isFunTy (filterOutInvisibleTypes (classTyCon clas) tys)- = text "(maybe you haven't applied a function to enough arguments?)"- | className clas == typeableClassName -- Avoid mysterious "No instance for (Typeable T)- , [_,ty] <- tys -- Look for (Typeable (k->*) (T k))- , Just (tc,_) <- tcSplitTyConApp_maybe ty- , not (isTypeFamilyTyCon tc)- = hang (text "GHC can't yet do polykinded")- 2 (text "Typeable" <+>- parens (ppr ty <+> dcolon <+> ppr (typeKind ty)))- | otherwise- = empty-- drv_fixes = case orig of- DerivClauseOrigin -> [drv_fix False]- StandAloneDerivOrigin -> [drv_fix True]- DerivOriginDC _ _ standalone -> [drv_fix standalone]- DerivOriginCoerce _ _ _ standalone -> [drv_fix standalone]- _ -> []-- 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")-- -- naked_sc_fix: try to produce a helpful error message for- -- superclass constraints caught by the subtleties described by- -- Note [Recursive superclasses] in GHC.TyCl.Instance- naked_sc_fixes- | ScOrigin _ NakedSc <- orig -- A superclass wanted with no instance decls used yet- , any non_tyvar_preds useful_givens -- Some non-tyvar givens- = [vcat [ text "If the constraint looks soluble from a superclass of the instance context,"- , text "read 'Undecidable instances and loopy superclasses' in the user manual" ]]- | otherwise = []-- non_tyvar_preds :: UserGiven -> Bool- non_tyvar_preds = any non_tyvar_pred . ic_given-- non_tyvar_pred :: EvVar -> Bool- -- Tells if the Given is of form (C ty1 .. tyn), where the tys are not all tyvars- non_tyvar_pred given = case getClassPredTys_maybe (idType given) of- Just (_, tys) -> not (all isTyVarTy tys)- Nothing -> False--pprTcSolverReportMsg (CEC {cec_encl = implics}) (OverlappingInstances item matches unifiers) =- vcat- [ addArising ct_loc $- (text "Overlapping instances for"- <+> pprType (mkClassPred clas tys))- , ppUnless (null matching_givens) $- sep [text "Matching givens (or their superclasses):"- , nest 2 (vcat matching_givens)]- , potentialInstancesErrMsg- (PotentialInstances { matches = NE.toList matches, unifiers })- , ppWhen (null matching_givens && null (NE.tail matches) && null unifiers) $- -- Intuitively, some given matched the wanted in their- -- flattened or rewritten (from given equalities) form- -- but the matcher can't figure that out because the- -- constraints are non-flat and non-rewritten so we- -- simply report back the whole given- -- context. Accelerate Smart.hs showed this problem.- sep [ text "There exists a (perhaps superclass) match:"- , nest 2 (vcat (pp_givens useful_givens))]-- , ppWhen (null $ NE.tail matches) $- parens (vcat [ ppUnless (null tyCoVars) $- text "The choice depends on the instantiation of" <+>- quotes (pprWithCommas ppr tyCoVars)- , ppUnless (null famTyCons) $- if (null tyCoVars)- then- text "The choice depends on the result of evaluating" <+>- quotes (pprWithCommas ppr famTyCons)- else- text "and the result of evaluating" <+>- quotes (pprWithCommas ppr famTyCons)- , ppWhen (null (matching_givens)) $- vcat [ text "To pick the first instance above, use IncoherentInstances"- , text "when compiling the other instance declarations"]- ])]- where- ct_loc = errorItemCtLoc item- orig = ctLocOrigin ct_loc- pred = errorItemPred item- (clas, tys) = getClassPredTys pred- tyCoVars = tyCoVarsOfTypesList tys- famTyCons = filter isFamilyTyCon $ concatMap (nonDetEltsUniqSet . tyConsOfType) tys- useful_givens = discardProvCtxtGivens orig (getUserGivensFromImplics implics)- matching_givens = mapMaybe matchable useful_givens- 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 (getLclEnvLoc (ic_env implic)) ])- where ev_vars_matching = [ pred- | ev_var <- evvars- , let pred = evVarPred ev_var- , any can_match (pred : transSuperClasses pred) ]- can_match pred- = case getClassPredTys_maybe pred of- Just (clas', tys') -> clas' == clas- && isJust (tcMatchTys tys tys')- Nothing -> False-pprTcSolverReportMsg _ (UnsafeOverlap item match unsafe_overlapped) =- vcat [ addArising ct_loc (text "Unsafe overlapping instances for"- <+> pprType (mkClassPred clas tys))- , sep [text "The matching instance is:",- nest 2 (pprInstance match)]- , vcat [ text "It is compiled in a Safe module and as such can only"- , text "overlap instances from the same module, however it"- , text "overlaps the following instances from different" <+>- text "modules:"- , nest 2 (vcat [pprInstances $ NE.toList unsafe_overlapped])- ]- ]- where- ct_loc = errorItemCtLoc item- pred = errorItemPred item- (clas, tys) = getClassPredTys pred--pprCannotUnifyVariableReason :: SolverReportErrCtxt -> CannotUnifyVariableReason -> SDoc-pprCannotUnifyVariableReason ctxt (CannotUnifyWithPolytype item tv1 ty2 mb_tv_info) =- vcat [ (if isSkolemTyVar tv1- then text "Cannot equate type variable"- else text "Cannot instantiate unification variable")- <+> quotes (ppr tv1)- , hang (text "with a" <+> what <+> text "involving polytypes:") 2 (ppr ty2)- , maybe empty (pprTyVarInfo ctxt) mb_tv_info ]- where- what = text $ levelString $- ctLocTypeOrKind_maybe (errorItemCtLoc item) `orElse` TypeLevel--pprCannotUnifyVariableReason _ (SkolemEscape item implic esc_skols) =- let- esc_doc = sep [ text "because" <+> what <+> text "variable" <> plural esc_skols- <+> pprQuotedList esc_skols- , text "would escape" <+>- if isSingleton esc_skols then text "its scope"- else text "their scope" ]- in- vcat [ nest 2 $ esc_doc- , sep [ (if isSingleton esc_skols- then text "This (rigid, skolem)" <+>- what <+> text "variable is"- else text "These (rigid, skolem)" <+>- what <+> text "variables are")- <+> text "bound by"- , nest 2 $ ppr (ic_info implic)- , nest 2 $ text "at" <+>- ppr (getLclEnvLoc (ic_env implic)) ] ]- where- what = text $ levelString $- ctLocTypeOrKind_maybe (errorItemCtLoc item) `orElse` TypeLevel--pprCannotUnifyVariableReason ctxt- (OccursCheck- { occursCheckInterestingTyVars = interesting_tvs- , occursCheckAmbiguityInfos = ambig_infos })- = ppr_interesting_tyVars interesting_tvs- $$ vcat (map pprAmbiguityInfo ambig_infos)- where- ppr_interesting_tyVars [] = empty- ppr_interesting_tyVars (tv:tvs) =- hang (text "Type variable kinds:") 2 $- vcat (map (tyvar_binding . tidyTyCoVarOcc (cec_tidy ctxt))- (tv:tvs))- tyvar_binding tyvar = ppr tyvar <+> dcolon <+> ppr (tyVarKind tyvar)-pprCannotUnifyVariableReason ctxt (DifferentTyVars tv_info)- = pprTyVarInfo ctxt tv_info-pprCannotUnifyVariableReason ctxt (RepresentationalEq tv_info mb_coercible_msg)- = pprTyVarInfo ctxt tv_info- $$ maybe empty pprCoercibleMsg mb_coercible_msg--pprMismatchMsg :: SolverReportErrCtxt -> MismatchMsg -> SDoc-pprMismatchMsg ctxt- (BasicMismatch { mismatch_ea = ea- , mismatch_item = item- , mismatch_ty1 = ty1 -- Expected- , mismatch_ty2 = ty2 -- Actual- , mismatch_whenMatching = mb_match_txt- , mismatch_mb_same_occ = same_occ_info })- = vcat [ addArising (errorItemCtLoc item) msg- , ea_extra- , maybe empty (pprWhenMatching ctxt) mb_match_txt- , maybe empty pprSameOccInfo same_occ_info ]- where- msg- | (isLiftedRuntimeRep ty1 && isUnliftedRuntimeRep ty2) ||- (isLiftedRuntimeRep ty2 && isUnliftedRuntimeRep ty1) ||- (isLiftedLevity ty1 && isUnliftedLevity ty2) ||- (isLiftedLevity ty2 && isUnliftedLevity ty1)- = text "Couldn't match a lifted type with an unlifted type"-- | isAtomicTy ty1 || isAtomicTy ty2- = -- Print with quotes- sep [ text herald1 <+> quotes (ppr ty1)- , nest padding $- text herald2 <+> quotes (ppr ty2) ]-- | otherwise- = -- Print with vertical layout- vcat [ text herald1 <> colon <+> ppr ty1- , nest padding $- text herald2 <> colon <+> ppr ty2 ]-- herald1 = conc [ "Couldn't match"- , if is_repr then "representation of" else ""- , if want_ea then "expected" else ""- , what ]- herald2 = conc [ "with"- , if is_repr then "that of" else ""- , if want_ea then ("actual " ++ what) else "" ]-- padding = length herald1 - length herald2-- (want_ea, ea_extra)- = case ea of- NoEA -> (False, empty)- EA mb_extra -> (True , maybe empty (pprExpectedActualInfo ctxt) mb_extra)- is_repr = case errorItemEqRel item of { ReprEq -> True; NomEq -> False }-- what = levelString (ctLocTypeOrKind_maybe (errorItemCtLoc item) `orElse` TypeLevel)-- conc :: [String] -> String- conc = foldr1 add_space-- add_space :: String -> String -> String- add_space s1 s2 | null s1 = s2- | null s2 = s1- | otherwise = s1 ++ (' ' : s2)-pprMismatchMsg _- (KindMismatch { kmismatch_what = thing- , kmismatch_expected = exp- , kmismatch_actual = act })- = hang (text "Expected" <+> kind_desc <> comma)- 2 (text "but" <+> quotes (ppr thing) <+> text "has kind" <+>- quotes (ppr act))- where- kind_desc | isConstraintLikeKind exp = text "a constraint"- | Just arg <- kindRep_maybe exp -- TYPE t0- , tcIsTyVarTy arg = sdocOption sdocPrintExplicitRuntimeReps $ \case- True -> text "kind" <+> quotes (ppr exp)- False -> text "a type"- | otherwise = text "kind" <+> quotes (ppr exp)--pprMismatchMsg ctxt- (TypeEqMismatch { teq_mismatch_ppr_explicit_kinds = ppr_explicit_kinds- , teq_mismatch_item = item- , teq_mismatch_ty1 = ty1 -- These types are the actual types- , teq_mismatch_ty2 = ty2 -- that don't match; may be swapped- , teq_mismatch_expected = exp -- These are the context of- , teq_mismatch_actual = act -- the mis-match- , teq_mismatch_what = mb_thing- , teq_mb_same_occ = mb_same_occ })- = addArising ct_loc $ pprWithExplicitKindsWhen ppr_explicit_kinds msg- $$ maybe empty pprSameOccInfo mb_same_occ- where- msg | Just (torc, rep) <- sORTKind_maybe exp- = msg_for_exp_sort torc rep-- | Just nargs_msg <- num_args_msg- , Right ea_msg <- mk_ea_msg ctxt (Just item) level orig- = nargs_msg $$ pprMismatchMsg ctxt ea_msg-- | ea_looks_same ty1 ty2 exp act- , Right ea_msg <- mk_ea_msg ctxt (Just item) level orig- = pprMismatchMsg ctxt ea_msg-- | otherwise- = bale_out_msg-- -- bale_out_msg: the mismatched types are /inside/ exp and act- bale_out_msg = vcat errs- where- errs = case mk_ea_msg ctxt Nothing level orig of- Left ea_info -> pprMismatchMsg ctxt mismatch_err- : map (pprExpectedActualInfo ctxt) ea_info- Right ea_err -> [ pprMismatchMsg ctxt mismatch_err- , pprMismatchMsg ctxt ea_err ]- mismatch_err = mkBasicMismatchMsg NoEA item ty1 ty2-- -- 'expected' is (TYPE rep) or (CONSTRAINT rep)- msg_for_exp_sort exp_torc exp_rep- | Just (act_torc, act_rep) <- sORTKind_maybe act- = -- (TYPE exp_rep) ~ (CONSTRAINT act_rep) etc- msg_torc_torc act_torc act_rep- | otherwise- = -- (TYPE _) ~ Bool, etc- maybe_num_args_msg $$- sep [ text "Expected a" <+> ppr_torc exp_torc <> comma- , text "but" <+> case mb_thing of- Nothing -> text "found something with kind"- Just thing -> quotes (ppr thing) <+> text "has kind"- , quotes (pprWithTYPE act) ]-- where- msg_torc_torc act_torc act_rep- | exp_torc == act_torc- = msg_same_torc act_torc act_rep- | otherwise- = sep [ text "Expected a" <+> ppr_torc exp_torc <> comma- , text "but" <+> case mb_thing of- Nothing -> text "found a"- Just thing -> quotes (ppr thing) <+> text "is a"- <+> ppr_torc act_torc ]-- msg_same_torc act_torc act_rep- | Just exp_doc <- describe_rep exp_rep- , Just act_doc <- describe_rep act_rep- = sep [ text "Expected" <+> exp_doc <+> ppr_torc exp_torc <> comma- , text "but" <+> case mb_thing of- Just thing -> quotes (ppr thing) <+> text "is"- Nothing -> text "got"- <+> act_doc <+> ppr_torc act_torc ]- msg_same_torc _ _ = bale_out_msg-- ct_loc = errorItemCtLoc item- orig = errorItemOrigin item- level = ctLocTypeOrKind_maybe ct_loc `orElse` TypeLevel-- num_args_msg = case level of- KindLevel- | not (isMetaTyVarTy exp) && not (isMetaTyVarTy act)- -- if one is a meta-tyvar, then it's possible that the user- -- has asked for something impredicative, and we couldn't unify.- -- Don't bother with counting arguments.- -> let n_act = count_args act- n_exp = count_args exp in- case n_act - n_exp of- n | n > 0 -- we don't know how many args there are, so don't- -- recommend removing args that aren't- , Just thing <- mb_thing- -> Just $ pprTcSolverReportMsg ctxt (ExpectingMoreArguments n thing)- _ -> Nothing-- _ -> Nothing-- maybe_num_args_msg = num_args_msg `orElse` empty-- count_args ty = count isVisiblePiTyBinder $ fst $ splitPiTys ty-- ppr_torc TypeLike = text "type";- ppr_torc ConstraintLike = text "constraint"-- describe_rep :: RuntimeRepType -> Maybe SDoc- -- describe_rep IntRep = Just "an IntRep"- -- describe_rep (BoxedRep Lifted) = Just "a lifted"- -- etc- describe_rep rep- | Just (rr_tc, rr_args) <- splitRuntimeRep_maybe rep- = case rr_args of- [lev_ty] | rr_tc `hasKey` boxedRepDataConKey- , Just lev <- levityType_maybe lev_ty- -> case lev of- Lifted -> Just (text "a lifted")- Unlifted -> Just (text "a boxed unlifted")- [] | rr_tc `hasKey` tupleRepDataConTyConKey -> Just (text "a zero-bit")- | starts_with_vowel rr_occ -> Just (text "an" <+> text rr_occ)- | otherwise -> Just (text "a" <+> text rr_occ)- where- rr_occ = occNameString (getOccName rr_tc)-- _ -> Nothing -- Must be TupleRep [r1..rn]- | otherwise = Nothing-- starts_with_vowel (c:_) = c `elem` "AEIOU"- starts_with_vowel [] = False--pprMismatchMsg ctxt (CouldNotDeduce useful_givens (item :| others) mb_extra)- = main_msg $$- case supplementary of- Left infos- -> vcat (map (pprExpectedActualInfo ctxt) infos)- Right other_msg- -> pprMismatchMsg ctxt other_msg- where- main_msg- | null useful_givens- = addArising ct_loc (no_instance_msg <+> missing)- | otherwise- = vcat (addArising ct_loc (no_deduce_msg <+> missing)- : pp_givens useful_givens)-- supplementary = case mb_extra of- Nothing- -> Left []- Just (CND_Extra level ty1 ty2)- -> mk_supplementary_ea_msg ctxt level ty1 ty2 orig- ct_loc = errorItemCtLoc item- orig = ctLocOrigin ct_loc- wanteds = map errorItemPred (item:others)-- no_instance_msg =- case wanteds of- [wanted] | Just (tc, _) <- splitTyConApp_maybe wanted- -- Don't say "no instance" for a constraint such as "c" for a type variable c.- , isClassTyCon tc -> text "No instance for"- _ -> text "Could not solve:"-- no_deduce_msg =- case wanteds of- [_wanted] -> text "Could not deduce"- _ -> text "Could not deduce:"-- missing =- case wanteds of- [wanted] -> quotes (ppr wanted)- _ -> pprTheta wanteds----{- *********************************************************************-* *- Displaying potential instances-* *-**********************************************************************-}---- | Directly display the given matching and unifying instances,--- with a header for each: `Matching instances`/`Potentially matching instances`.-pprPotentialInstances :: (ClsInst -> SDoc) -> PotentialInstances -> SDoc-pprPotentialInstances ppr_inst (PotentialInstances { matches, unifiers }) =- vcat- [ ppWhen (not $ null matches) $- text "Matching instance" <> plural matches <> colon $$- nest 2 (vcat (map ppr_inst matches))- , ppWhen (not $ null unifiers) $- (text "Potentially matching instance" <> plural unifiers <> colon) $$- nest 2 (vcat (map ppr_inst unifiers))- ]---- | Display a summary of available instances, omitting those involving--- out-of-scope types, in order to explain why we couldn't solve a particular--- constraint, e.g. due to instance overlap or out-of-scope types.------ To directly display a collection of matching/unifying instances,--- use 'pprPotentialInstances'.-potentialInstancesErrMsg :: PotentialInstances -> SDoc--- See Note [Displaying potential instances]-potentialInstancesErrMsg potentials =- sdocOption sdocPrintPotentialInstances $ \print_insts ->- getPprStyle $ \sty ->- potentials_msg_with_options potentials print_insts sty---- | Display a summary of available instances, omitting out-of-scope ones.------ Use 'potentialInstancesErrMsg' to automatically set the pretty-printing--- options.-potentials_msg_with_options :: PotentialInstances- -> Bool -- ^ Whether to print /all/ potential instances- -> PprStyle- -> SDoc-potentials_msg_with_options- (PotentialInstances { matches, unifiers })- show_all_potentials sty- | null matches && null unifiers- = empty-- | null show_these_matches && null show_these_unifiers- = vcat [ not_in_scope_msg empty- , flag_hint ]-- | otherwise- = vcat [ pprPotentialInstances- pprInstance -- print instance + location info- (PotentialInstances- { matches = show_these_matches- , unifiers = show_these_unifiers })- , overlapping_but_not_more_specific_msg sorted_matches- , nest 2 $ vcat- [ ppWhen (n_in_scope_hidden > 0) $- text "...plus"- <+> speakNOf n_in_scope_hidden (text "other")- , ppWhen (not_in_scopes > 0) $- not_in_scope_msg (text "...plus")- , flag_hint ] ]- where- n_show_matches, n_show_unifiers :: Int- n_show_matches = 3- n_show_unifiers = 2-- (in_scope_matches, not_in_scope_matches) = partition inst_in_scope matches- (in_scope_unifiers, not_in_scope_unifiers) = partition inst_in_scope unifiers- sorted_matches = sortBy fuzzyClsInstCmp in_scope_matches- sorted_unifiers = sortBy fuzzyClsInstCmp in_scope_unifiers- (show_these_matches, show_these_unifiers)- | show_all_potentials = (sorted_matches, sorted_unifiers)- | otherwise = (take n_show_matches sorted_matches- ,take n_show_unifiers sorted_unifiers)- n_in_scope_hidden- = length sorted_matches + length sorted_unifiers- - length show_these_matches - length show_these_unifiers-- -- "in scope" means that all the type constructors- -- are lexically in scope; these instances are likely- -- to be more useful- inst_in_scope :: ClsInst -> Bool- inst_in_scope cls_inst = nameSetAll name_in_scope $- orphNamesOfTypes (is_tys cls_inst)-- name_in_scope name- | pretendNameIsInScope name- = True -- E.g. (->); see Note [pretendNameIsInScope] in GHC.Builtin.Names- | Just mod <- nameModule_maybe name- = qual_in_scope (qualName sty mod (nameOccName name))- | otherwise- = True-- qual_in_scope :: QualifyName -> Bool- qual_in_scope NameUnqual = True- qual_in_scope (NameQual {}) = True- qual_in_scope _ = False-- not_in_scopes :: Int- not_in_scopes = length not_in_scope_matches + length not_in_scope_unifiers-- not_in_scope_msg herald =- hang (herald <+> speakNOf not_in_scopes (text "instance")- <+> text "involving out-of-scope types")- 2 (ppWhen show_all_potentials $- pprPotentialInstances- pprInstanceHdr -- only print the header, not the instance location info- (PotentialInstances- { matches = not_in_scope_matches- , unifiers = not_in_scope_unifiers- }))-- flag_hint = ppUnless (show_all_potentials- || (equalLength show_these_matches matches- && equalLength show_these_unifiers unifiers)) $- text "(use -fprint-potential-instances to see them all)"---- | Compute a message informing the user of any instances that are overlapped--- but were not discarded because the instance overlapping them wasn't--- strictly more specific.-overlapping_but_not_more_specific_msg :: [ClsInst] -> SDoc-overlapping_but_not_more_specific_msg insts- -- Only print one example of "overlapping but not strictly more specific",- -- to avoid information overload.- | overlap : _ <- overlapping_but_not_more_specific- = overlap_header $$ ppr_overlapping overlap- | otherwise- = empty- where- overlap_header :: SDoc- overlap_header- | [_] <- overlapping_but_not_more_specific- = text "An overlapping instance can only be chosen when it is strictly more specific."- | otherwise- = text "Overlapping instances can only be chosen when they are strictly more specific."- overlapping_but_not_more_specific :: [(ClsInst, ClsInst)]- overlapping_but_not_more_specific- = nubOrdBy (comparing (is_dfun . fst))- [ (overlapper, overlappee)- | these <- groupBy ((==) `on` is_cls_nm) insts- -- Take all pairs of distinct instances...- , one:others <- tails these -- if `these = [inst_1, inst_2, ...]`- , other <- others -- then we get pairs `(one, other) = (inst_i, inst_j)` with `i < j`- -- ... such that one instance in the pair overlaps the other...- , let mb_overlapping- | hasOverlappingFlag (overlapMode $ is_flag one)- || hasOverlappableFlag (overlapMode $ is_flag other)- = [(one, other)]- | hasOverlappingFlag (overlapMode $ is_flag other)- || hasOverlappableFlag (overlapMode $ is_flag one)- = [(other, one)]- | otherwise- = []- , (overlapper, overlappee) <- mb_overlapping- -- ... but the overlapper is not more specific than the overlappee.- , not (overlapper `more_specific_than` overlappee)- ]- more_specific_than :: ClsInst -> ClsInst -> Bool- is1 `more_specific_than` is2- = isJust (tcMatchTys (is_tys is1) (is_tys is2))- ppr_overlapping :: (ClsInst, ClsInst) -> SDoc- ppr_overlapping (overlapper, overlappee)- = text "The first instance that follows overlaps the second, but is not more specific than it:"- $$ nest 2 (vcat $ map pprInstanceHdr [overlapper, overlappee])--{- Note [Displaying potential instances]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When showing a list of instances for- - overlapping instances (show ones that match)- - no such instance (show ones that could match)-we want to give it a bit of structure. Here's the plan--* Say that an instance is "in scope" if all of the- type constructors it mentions are lexically in scope.- These are the ones most likely to be useful to the programmer.--* Show at most n_show in-scope instances,- and summarise the rest ("plus N others")--* Summarise the not-in-scope instances ("plus 4 not in scope")--* Add the flag -fshow-potential-instances which replaces the- summary with the full list--}--{- *********************************************************************-* *- Outputting additional solver report information-* *-**********************************************************************-}---- | Pretty-print an informational message, to accompany a 'TcSolverReportMsg'.-pprExpectedActualInfo :: SolverReportErrCtxt -> ExpectedActualInfo -> SDoc-pprExpectedActualInfo _ (ExpectedActual { ea_expected = exp, ea_actual = act }) =- vcat- [ text "Expected:" <+> ppr exp- , text " Actual:" <+> ppr act ]-pprExpectedActualInfo _- (ExpectedActualAfterTySynExpansion- { ea_expanded_expected = exp- , ea_expanded_actual = act } )- = vcat- [ text "Type synonyms expanded:"- , text "Expected type:" <+> ppr exp- , text " Actual type:" <+> ppr act ]--pprCoercibleMsg :: CoercibleMsg -> SDoc-pprCoercibleMsg (UnknownRoles ty) =- hang (text "NB: We cannot know what roles the parameters to" <+>- quotes (ppr ty) <+> text "have;")- 2 (text "we must assume that the role is nominal")-pprCoercibleMsg (TyConIsAbstract tc) =- hsep [ text "NB: The type constructor"- , quotes (pprSourceTyCon tc)- , text "is abstract" ]-pprCoercibleMsg (OutOfScopeNewtypeConstructor tc dc) =- hang (text "The data constructor" <+> quotes (ppr $ dataConName dc))- 2 (sep [ text "of newtype" <+> quotes (pprSourceTyCon tc)- , text "is not in scope" ])--pprWhenMatching :: SolverReportErrCtxt -> WhenMatching -> SDoc-pprWhenMatching ctxt (WhenMatching cty1 cty2 sub_o mb_sub_t_or_k) =- sdocOption sdocPrintExplicitCoercions $ \printExplicitCoercions ->- if printExplicitCoercions- || not (cty1 `pickyEqType` cty2)- then vcat [ hang (text "When matching" <+> sub_whats)- 2 (vcat [ ppr cty1 <+> dcolon <+>- ppr (typeKind cty1)- , ppr cty2 <+> dcolon <+>- ppr (typeKind cty2) ])- , supplementary ]- else text "When matching the kind of" <+> quotes (ppr cty1)- where- sub_t_or_k = mb_sub_t_or_k `orElse` TypeLevel- sub_whats = text (levelString sub_t_or_k) <> char 's'- supplementary =- case mk_supplementary_ea_msg ctxt sub_t_or_k cty1 cty2 sub_o of- Left infos -> vcat $ map (pprExpectedActualInfo ctxt) infos- Right msg -> pprMismatchMsg ctxt msg--pprTyVarInfo :: SolverReportErrCtxt -> TyVarInfo -> SDoc-pprTyVarInfo ctxt (TyVarInfo { thisTyVar = tv1, otherTy = mb_tv2 }) =- mk_msg tv1 $$ case mb_tv2 of { Nothing -> empty; Just tv2 -> mk_msg tv2 }- where- mk_msg tv = case tcTyVarDetails tv of- SkolemTv sk_info _ _ -> pprSkols ctxt [(getSkolemInfo sk_info, [tv])]- RuntimeUnk {} -> quotes (ppr tv) <+> text "is an interactive-debugger skolem"- MetaTv {} -> empty--pprAmbiguityInfo :: AmbiguityInfo -> SDoc-pprAmbiguityInfo (Ambiguity prepend_msg (ambig_kvs, ambig_tvs)) = msg- where-- msg | any isRuntimeUnkSkol ambig_kvs -- See Note [Runtime skolems]- || any isRuntimeUnkSkol ambig_tvs- = vcat [ text "Cannot resolve unknown runtime type"- <> plural ambig_tvs <+> pprQuotedList ambig_tvs- , text "Use :print or :force to determine these types"]-- | not (null ambig_tvs)- = pp_ambig (text "type") ambig_tvs-- | otherwise- = pp_ambig (text "kind") ambig_kvs-- pp_ambig what tkvs- | prepend_msg -- "Ambiguous type variable 't0'"- = text "Ambiguous" <+> what <+> text "variable"- <> plural tkvs <+> pprQuotedList tkvs-- | otherwise -- "The type variable 't0' is ambiguous"- = text "The" <+> what <+> text "variable" <> plural tkvs- <+> pprQuotedList tkvs <+> isOrAre tkvs <+> text "ambiguous"-pprAmbiguityInfo (NonInjectiveTyFam tc) =- text "NB:" <+> quotes (ppr tc)- <+> text "is a non-injective type family"--pprSameOccInfo :: SameOccInfo -> SDoc-pprSameOccInfo (SameOcc same_pkg n1 n2) =- text "NB:" <+> (ppr_from same_pkg n1 $$ ppr_from same_pkg n2)- where- ppr_from same_pkg nm- | isGoodSrcSpan loc- = hang (quotes (ppr nm) <+> text "is defined at")- 2 (ppr loc)- | otherwise -- Imported things have an UnhelpfulSrcSpan- = hang (quotes (ppr nm))- 2 (sep [ text "is defined in" <+> quotes (ppr (moduleName mod))- , ppUnless (same_pkg || pkg == mainUnit) $- nest 4 $ text "in package" <+> quotes (ppr pkg) ])- where- pkg = moduleUnit mod- mod = nameModule nm- loc = nameSrcSpan nm--{- *********************************************************************-* *- Outputting HoleError messages-* *-**********************************************************************-}--pprHoleError :: SolverReportErrCtxt -> Hole -> HoleError -> SDoc-pprHoleError _ (Hole { hole_ty, hole_occ = rdr }) (OutOfScopeHole imp_errs)- = out_of_scope_msg $$ vcat (map ppr imp_errs)- where- herald | isDataOcc (rdrNameOcc rdr) = text "Data constructor not in scope:"- | otherwise = text "Variable not in scope:"- out_of_scope_msg -- Print v :: ty only if the type has structure- | boring_type = hang herald 2 (ppr rdr)- | otherwise = hang herald 2 (pp_rdr_with_type rdr hole_ty)- boring_type = isTyVarTy hole_ty-pprHoleError ctxt (Hole { hole_ty, hole_occ}) (HoleError sort other_tvs hole_skol_info) =- vcat [ hole_msg- , tyvars_msg- , case sort of { ExprHole {} -> expr_hole_hint; _ -> type_hole_hint } ]-- where-- hole_msg = case sort of- ExprHole {} ->- hang (text "Found hole:")- 2 (pp_rdr_with_type hole_occ hole_ty)- TypeHole ->- hang (text "Found type wildcard" <+> quotes (ppr hole_occ))- 2 (text "standing for" <+> quotes pp_hole_type_with_kind)- ConstraintHole ->- hang (text "Found extra-constraints wildcard standing for")- 2 (quotes $ pprType hole_ty) -- always kind constraint-- hole_kind = typeKind hole_ty-- pp_hole_type_with_kind- | isLiftedTypeKind hole_kind- || isCoVarType hole_ty -- Don't print the kind of unlifted- -- equalities (#15039)- = pprType hole_ty- | otherwise- = pprType hole_ty <+> dcolon <+> pprKind hole_kind-- tyvars = tyCoVarsOfTypeList hole_ty- tyvars_msg = ppUnless (null tyvars) $- text "Where:" <+> (vcat (map loc_msg other_tvs)- $$ pprSkols ctxt hole_skol_info)- -- Coercion variables can be free in the- -- hole, via kind casts- expr_hole_hint -- Give hint for, say, f x = _x- | lengthFS (occNameFS (rdrNameOcc hole_occ)) > 1 -- Don't give this hint for plain "_"- = text "Or perhaps" <+> quotes (ppr hole_occ)- <+> text "is mis-spelled, or not in scope"- | otherwise- = empty-- type_hole_hint- | ErrorWithoutFlag <- cec_type_holes ctxt- = text "To use the inferred type, enable PartialTypeSignatures"- | otherwise- = empty-- loc_msg tv- | isTyVar tv- = case tcTyVarDetails tv of- MetaTv {} -> quotes (ppr tv) <+> text "is an ambiguous type variable"- _ -> empty -- Skolems dealt with already- | otherwise -- A coercion variable can be free in the hole type- = ppWhenOption sdocPrintExplicitCoercions $- quotes (ppr tv) <+> text "is a coercion variable"--pp_rdr_with_type :: RdrName -> Type -> SDoc-pp_rdr_with_type occ hole_ty = hang (pprPrefixOcc occ) 2 (dcolon <+> pprType hole_ty)--{- *********************************************************************-* *- Outputting ScopeError messages-* *-**********************************************************************-}--pprScopeError :: RdrName -> NotInScopeError -> SDoc-pprScopeError rdr_name scope_err =- case scope_err of- NotInScope {} ->- hang (text "Not in scope:")- 2 (what <+> quotes (ppr rdr_name))- NoExactName name ->- text "The Name" <+> quotes (ppr name) <+> text "is not in scope."- SameName gres ->- assertPpr (length gres >= 2) (text "pprScopeError SameName: fewer than 2 elements" $$ nest 2 (ppr gres))- $ hang (text "Same Name in multiple name-spaces:")- 2 (vcat (map pp_one sorted_names))- where- sorted_names = sortBy (leftmost_smallest `on` nameSrcSpan) (map greMangledName gres)- pp_one name- = hang (pprNameSpace (occNameSpace (getOccName name))- <+> quotes (ppr name) <> comma)- 2 (text "declared at:" <+> ppr (nameSrcLoc name))- MissingBinding thing _ ->- sep [ text "The" <+> thing- <+> text "for" <+> quotes (ppr rdr_name)- , nest 2 $ text "lacks an accompanying binding" ]- NoTopLevelBinding ->- hang (text "No top-level binding for")- 2 (what <+> quotes (ppr rdr_name) <+> text "in this module")- UnknownSubordinate doc ->- quotes (ppr rdr_name) <+> text "is not a (visible)" <+> doc- where- what = pprNonVarNameSpace (occNameSpace (rdrNameOcc rdr_name))--scopeErrorHints :: NotInScopeError -> [GhcHint]-scopeErrorHints scope_err =- case scope_err of- NotInScope -> noHints- NoExactName {} -> [SuggestDumpSlices]- SameName {} -> [SuggestDumpSlices]- MissingBinding _ hints -> hints- NoTopLevelBinding -> noHints- UnknownSubordinate {} -> noHints--{- *********************************************************************-* *- Outputting ImportError messages-* *-**********************************************************************-}--instance Outputable ImportError where- ppr (MissingModule mod_name) =- hsep- [ text "NB: no module named"- , quotes (ppr mod_name)- , text "is imported."- ]- ppr (ModulesDoNotExport mods occ_name)- | mod NE.:| [] <- mods- = hsep- [ text "NB: the module"- , quotes (ppr mod)- , text "does not export"- , quotes (ppr occ_name) <> dot ]- | otherwise- = hsep- [ text "NB: neither"- , quotedListWithNor (map ppr $ NE.toList mods)- , text "export"- , quotes (ppr occ_name) <> dot ]--{- *********************************************************************-* *- Suggested fixes for implication constraints-* *-**********************************************************************-}---- TODO: these functions should use GhcHint instead.--show_fixes :: [SDoc] -> SDoc-show_fixes [] = empty-show_fixes (f:fs) = sep [ text "Possible fix:"- , nest 2 (vcat (f : map (text "or" <+>) fs))]--ctxtFixes :: Bool -> PredType -> [Implication] -> [SDoc]-ctxtFixes has_ambig_tvs pred implics- | not has_ambig_tvs- , isTyVarClassPred pred -- Don't suggest adding (Eq T) to the context, say- , (skol:skols) <- usefulContext implics pred- , let what | null skols- , SigSkol (PatSynCtxt {}) _ _ <- skol- = text "\"required\""- | otherwise- = empty- = [sep [ text "add" <+> pprParendType pred- <+> text "to the" <+> what <+> text "context of"- , nest 2 $ ppr_skol skol $$- vcat [ text "or" <+> ppr_skol skol- | skol <- skols ] ] ]- | otherwise = []- where- ppr_skol (PatSkol (RealDataCon dc) _) = text "the data constructor" <+> quotes (ppr dc)- ppr_skol (PatSkol (PatSynCon ps) _) = text "the pattern synonym" <+> quotes (ppr ps)- ppr_skol skol_info = ppr skol_info--usefulContext :: [Implication] -> PredType -> [SkolemInfoAnon]--- usefulContext picks out the implications whose context--- the programmer might plausibly augment to solve 'pred'-usefulContext implics pred- = go implics- where- pred_tvs = tyCoVarsOfType pred- go [] = []- go (ic : ics)- | implausible ic = rest- | otherwise = ic_info ic : rest- where- -- Stop when the context binds a variable free in the predicate- rest | any (`elemVarSet` pred_tvs) (ic_skols ic) = []- | otherwise = go ics-- implausible ic- | null (ic_skols ic) = True- | implausible_info (ic_info ic) = True- | otherwise = False-- implausible_info (SigSkol (InfSigCtxt {}) _ _) = True- implausible_info _ = False- -- Do not suggest adding constraints to an *inferred* type signature--pp_givens :: [Implication] -> [SDoc]-pp_givens givens- = case givens of- [] -> []- (g:gs) -> ppr_given (text "from the context:") g- : map (ppr_given (text "or from:")) gs- where- 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 (getLclEnvLoc (ic_env implic)) ])--{- *********************************************************************-* *- CtOrigin information-* *-**********************************************************************-}--levelString :: TypeOrKind -> String-levelString TypeLevel = "type"-levelString KindLevel = "kind"--pprArising :: CtLoc -> SDoc--- Used for the main, top-level error message--- We've done special processing for TypeEq, KindEq, givens-pprArising ct_loc- | in_generated_code = empty -- See Note ["Arising from" messages in generated code]- | suppress_origin = empty- | otherwise = pprCtOrigin orig- where- orig = ctLocOrigin ct_loc- in_generated_code = lclEnvInGeneratedCode (ctLocEnv ct_loc)- suppress_origin- | isGivenOrigin orig = True- | otherwise = case orig of- TypeEqOrigin {} -> True -- We've done special processing- KindEqOrigin {} -> True -- for TypeEq, KindEq, givens- AmbiguityCheckOrigin {} -> True -- The "In the ambiguity check" context- -- is sufficient; more would be repetitive- _ -> False---- Add the "arising from..." part to a message-addArising :: CtLoc -> SDoc -> SDoc-addArising ct_loc msg = hang msg 2 (pprArising ct_loc)--pprWithArising :: [Ct] -> SDoc--- Print something like--- (Eq a) arising from a use of x at y--- (Show a) arising from a use of p at q--- Also return a location for the error message--- Works for Wanted/Derived only-pprWithArising []- = panic "pprWithArising"-pprWithArising (ct:cts)- | null cts- = addArising loc (pprTheta [ctPred ct])- | otherwise- = vcat (map ppr_one (ct:cts))- where- loc = ctLoc ct- ppr_one ct' = hang (parens (pprType (ctPred ct')))- 2 (pprCtLoc (ctLoc ct'))--{- Note ["Arising from" messages in generated code]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider code generated when we desugar code before typechecking;-see Note [Rebindable syntax and HsExpansion].--In this code, constraints may be generated, but we don't want to-say "arising from a call of foo" if 'foo' doesn't appear in the-users code. We leave the actual CtOrigin untouched (partly because-it is generated in many, many places), but suppress the "Arising from"-message for constraints that originate in generated code.--}---{- *********************************************************************-* *- SkolemInfo-* *-**********************************************************************-}---tidySkolemInfo :: TidyEnv -> SkolemInfo -> SkolemInfo-tidySkolemInfo env (SkolemInfo u sk_anon) = SkolemInfo u (tidySkolemInfoAnon env sk_anon)-------------------tidySkolemInfoAnon :: TidyEnv -> SkolemInfoAnon -> SkolemInfoAnon-tidySkolemInfoAnon env (DerivSkol ty) = DerivSkol (tidyType env ty)-tidySkolemInfoAnon env (SigSkol cx ty tv_prs) = tidySigSkol env cx ty tv_prs-tidySkolemInfoAnon env (InferSkol ids) = InferSkol (mapSnd (tidyType env) ids)-tidySkolemInfoAnon env (UnifyForAllSkol ty) = UnifyForAllSkol (tidyType env ty)-tidySkolemInfoAnon _ info = info--tidySigSkol :: TidyEnv -> UserTypeCtxt- -> TcType -> [(Name,TcTyVar)] -> SkolemInfoAnon--- We need to take special care when tidying SigSkol--- See Note [SigSkol SkolemInfo] in "GHC.Tc.Types.Origin"-tidySigSkol env cx ty tv_prs- = SigSkol cx (tidy_ty env ty) tv_prs'- where- tv_prs' = mapSnd (tidyTyCoVarOcc env) tv_prs- inst_env = mkNameEnv tv_prs'-- tidy_ty env (ForAllTy (Bndr tv vis) ty)- = ForAllTy (Bndr tv' vis) (tidy_ty env' ty)- where- (env', tv') = tidy_tv_bndr env tv-- tidy_ty env ty@(FunTy af w arg res) -- Look under c => t- | isInvisibleFunArg af- = ty { ft_mult = tidy_ty env w- , ft_arg = tidyType env arg- , ft_res = tidy_ty env res }-- tidy_ty env ty = tidyType env ty-- tidy_tv_bndr :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)- tidy_tv_bndr env@(occ_env, subst) tv- | Just tv' <- lookupNameEnv inst_env (tyVarName tv)- = ((occ_env, extendVarEnv subst tv tv'), tv')-- | otherwise- = tidyVarBndr env tv--pprSkols :: SolverReportErrCtxt -> [(SkolemInfoAnon, [TcTyVar])] -> SDoc-pprSkols ctxt zonked_ty_vars- =- let tidy_ty_vars = map (bimap (tidySkolemInfoAnon (cec_tidy ctxt)) id) zonked_ty_vars- in vcat (map pp_one tidy_ty_vars)- where-- no_msg = text "No skolem info - we could not find the origin of the following variables" <+> ppr zonked_ty_vars- $$ text "This should not happen, please report it as a bug following the instructions at:"- $$ text "https://gitlab.haskell.org/ghc/ghc/wikis/report-a-bug"--- pp_one (UnkSkol cs, tvs)- = vcat [ hang (pprQuotedList tvs)- 2 (is_or_are tvs "a" "(rigid, skolem)")- , nest 2 (text "of unknown origin")- , nest 2 (text "bound at" <+> ppr (skolsSpan tvs))- , no_msg- , prettyCallStackDoc cs- ]- pp_one (RuntimeUnkSkol, tvs)- = hang (pprQuotedList tvs)- 2 (is_or_are tvs "an" "unknown runtime")- pp_one (skol_info, tvs)- = vcat [ hang (pprQuotedList tvs)- 2 (is_or_are tvs "a" "rigid" <+> text "bound by")- , nest 2 (pprSkolInfo skol_info)- , nest 2 (text "at" <+> ppr (skolsSpan tvs)) ]-- is_or_are [_] article adjective = text "is" <+> text article <+> text adjective- <+> text "type variable"- is_or_are _ _ adjective = text "are" <+> text adjective- <+> text "type variables"--skolsSpan :: [TcTyVar] -> SrcSpan-skolsSpan skol_tvs = foldr1 combineSrcSpans (map getSrcSpan skol_tvs)--{- *********************************************************************-* *- Utilities for expected/actual messages-* *-**********************************************************************-}--mk_supplementary_ea_msg :: SolverReportErrCtxt -> TypeOrKind- -> Type -> Type -> CtOrigin -> Either [ExpectedActualInfo] MismatchMsg-mk_supplementary_ea_msg ctxt level ty1 ty2 orig- | TypeEqOrigin { uo_expected = exp, uo_actual = act } <- orig- , not (ea_looks_same ty1 ty2 exp act)- = mk_ea_msg ctxt Nothing level orig- | otherwise- = Left []--ea_looks_same :: Type -> Type -> Type -> Type -> Bool--- True if the faulting types (ty1, ty2) look the same as--- the expected/actual types (exp, act).--- If so, we don't want to redundantly report the latter-ea_looks_same ty1 ty2 exp act- = (act `looks_same` ty1 && exp `looks_same` ty2) ||- (exp `looks_same` ty1 && act `looks_same` ty2)- where- looks_same t1 t2 = t1 `pickyEqType` t2- || t1 `eqType` liftedTypeKind && t2 `eqType` liftedTypeKind- -- pickyEqType is sensitive to synonyms, so only replies True- -- when the types really look the same. However,- -- (TYPE 'LiftedRep) and Type both print the same way.--mk_ea_msg :: SolverReportErrCtxt -> Maybe ErrorItem -> TypeOrKind- -> CtOrigin -> Either [ExpectedActualInfo] MismatchMsg--- Constructs a "Couldn't match" message--- The (Maybe ErrorItem) says whether this is the main top-level message (Just)--- or a supplementary message (Nothing)-mk_ea_msg ctxt at_top level- (TypeEqOrigin { uo_actual = act, uo_expected = exp, uo_thing = mb_thing })- | Just thing <- mb_thing- , KindLevel <- level- = Right $ KindMismatch { kmismatch_what = thing- , kmismatch_expected = exp- , kmismatch_actual = act }- | Just item <- at_top- , let ea = EA $ if expanded_syns then Just ea_expanded else Nothing- mismatch = mkBasicMismatchMsg ea item exp act- = Right mismatch- | otherwise- = Left $- if expanded_syns- then [ea,ea_expanded]- else [ea]-- where- ea = ExpectedActual { ea_expected = exp, ea_actual = act }- ea_expanded =- ExpectedActualAfterTySynExpansion- { ea_expanded_expected = expTy1- , ea_expanded_actual = expTy2 }-- expanded_syns = cec_expand_syns ctxt- && not (expTy1 `pickyEqType` exp && expTy2 `pickyEqType` act)- (expTy1, expTy2) = expandSynonymsToMatch exp act-mk_ea_msg _ _ _ _ = Left []--{- Note [Expanding type synonyms to make types similar]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--In type error messages, if -fprint-expanded-types is used, we want to expand-type synonyms to make expected and found types as similar as possible, but we-shouldn't expand types too much to make type messages even more verbose and-harder to understand. The whole point here is to make the difference in expected-and found types clearer.--`expandSynonymsToMatch` does this, it takes two types, and expands type synonyms-only as much as necessary. Given two types t1 and t2:-- * If they're already same, it just returns the types.-- * If they're in form `C1 t1_1 .. t1_n` and `C2 t2_1 .. t2_m` (C1 and C2 are- type constructors), it expands C1 and C2 if they're different type synonyms.- Then it recursively does the same thing on expanded types. If C1 and C2 are- same, then it applies the same procedure to arguments of C1 and arguments of- C2 to make them as similar as possible.-- Most important thing here is to keep number of synonym expansions at- minimum. For example, if t1 is `T (T3, T5, Int)` and t2 is `T (T5, T3,- Bool)` where T5 = T4, T4 = T3, ..., T1 = X, it returns `T (T3, T3, Int)` and- `T (T3, T3, Bool)`.-- * Otherwise types don't have same shapes and so the difference is clearly- visible. It doesn't do any expansions and show these types.--Note that we only expand top-layer type synonyms. Only when top-layer-constructors are the same we start expanding inner type synonyms.--Suppose top-layer type synonyms of t1 and t2 can expand N and M times,-respectively. If their type-synonym-expanded forms will meet at some point (i.e.-will have same shapes according to `sameShapes` function), it's possible to find-where they meet in O(N+M) top-layer type synonym expansions and O(min(N,M))-comparisons. We first collect all the top-layer expansions of t1 and t2 in two-lists, then drop the prefix of the longer list so that they have same lengths.-Then we search through both lists in parallel, and return the first pair of-types that have same shapes. Inner types of these two types with same shapes-are then expanded using the same algorithm.--In case they don't meet, we return the last pair of types in the lists, which-has top-layer type synonyms completely expanded. (in this case the inner types-are not expanded at all, as the current form already shows the type error)--}---- | Expand type synonyms in given types only enough to make them as similar as--- possible. Returned types are the same in terms of used type synonyms.------ To expand all synonyms, see 'Type.expandTypeSynonyms'.------ See `ExpandSynsFail` tests in tests testsuite/tests/typecheck/should_fail for--- some examples of how this should work.-expandSynonymsToMatch :: Type -> Type -> (Type, Type)-expandSynonymsToMatch ty1 ty2 = (ty1_ret, ty2_ret)- where- (ty1_ret, ty2_ret) = go ty1 ty2-- -- Returns (type synonym expanded version of first type,- -- type synonym expanded version of second type)- go :: Type -> Type -> (Type, Type)- go t1 t2- | t1 `pickyEqType` t2 =- -- Types are same, nothing to do- (t1, t2)-- go (TyConApp tc1 tys1) (TyConApp tc2 tys2)- | tc1 == tc2- , tys1 `equalLength` tys2 =- -- Type constructors are same. They may be synonyms, but we don't- -- expand further. The lengths of tys1 and tys2 must be equal;- -- for example, with type S a = a, we don't want- -- to zip (S Monad Int) and (S Bool).- let (tys1', tys2') =- unzip (zipWithEqual "expandSynonymsToMatch" go tys1 tys2)- in (TyConApp tc1 tys1', TyConApp tc2 tys2')-- go (AppTy t1_1 t1_2) (AppTy t2_1 t2_2) =- let (t1_1', t2_1') = go t1_1 t2_1- (t1_2', t2_2') = go t1_2 t2_2- in (mkAppTy t1_1' t1_2', mkAppTy t2_1' t2_2')-- go ty1@(FunTy _ w1 t1_1 t1_2) ty2@(FunTy _ w2 t2_1 t2_2) | w1 `eqType` w2 =- let (t1_1', t2_1') = go t1_1 t2_1- (t1_2', t2_2') = go t1_2 t2_2- in ( ty1 { ft_arg = t1_1', ft_res = t1_2' }- , ty2 { ft_arg = t2_1', ft_res = t2_2' })-- go (ForAllTy b1 t1) (ForAllTy b2 t2) =- -- NOTE: We may have a bug here, but we just can't reproduce it easily.- -- See D1016 comments for details and our attempts at producing a test- -- case. Short version: We probably need RnEnv2 to really get this right.- let (t1', t2') = go t1 t2- in (ForAllTy b1 t1', ForAllTy b2 t2')-- go (CastTy ty1 _) ty2 = go ty1 ty2- go ty1 (CastTy ty2 _) = go ty1 ty2-- go t1 t2 =- -- See Note [Expanding type synonyms to make types similar] for how this- -- works- let- t1_exp_tys = t1 : tyExpansions t1- t2_exp_tys = t2 : tyExpansions t2- t1_exps = length t1_exp_tys- t2_exps = length t2_exp_tys- dif = abs (t1_exps - t2_exps)- in- followExpansions $- zipEqual "expandSynonymsToMatch.go"- (if t1_exps > t2_exps then drop dif t1_exp_tys else t1_exp_tys)- (if t2_exps > t1_exps then drop dif t2_exp_tys else t2_exp_tys)-- -- Expand the top layer type synonyms repeatedly, collect expansions in a- -- list. The list does not include the original type.- --- -- Example, if you have:- --- -- type T10 = T9- -- type T9 = T8- -- ...- -- type T0 = Int- --- -- `tyExpansions T10` returns [T9, T8, T7, ... Int]- --- -- This only expands the top layer, so if you have:- --- -- type M a = Maybe a- --- -- `tyExpansions (M T10)` returns [Maybe T10] (T10 is not expanded)- tyExpansions :: Type -> [Type]- tyExpansions = unfoldr (\t -> (\x -> (x, x)) `fmap` coreView t)-- -- Drop the type pairs until types in a pair look alike (i.e. the outer- -- constructors are the same).- followExpansions :: [(Type, Type)] -> (Type, Type)- followExpansions [] = pprPanic "followExpansions" empty- followExpansions [(t1, t2)]- | sameShapes t1 t2 = go t1 t2 -- expand subtrees- | otherwise = (t1, t2) -- the difference is already visible- followExpansions ((t1, t2) : tss)- -- Traverse subtrees when the outer shapes are the same- | sameShapes t1 t2 = go t1 t2- -- Otherwise follow the expansions until they look alike- | otherwise = followExpansions tss-- sameShapes :: Type -> Type -> Bool- sameShapes AppTy{} AppTy{} = True- sameShapes (TyConApp tc1 _) (TyConApp tc2 _) = tc1 == tc2- sameShapes (FunTy {}) (FunTy {}) = True- sameShapes (ForAllTy {}) (ForAllTy {}) = True- sameShapes (CastTy ty1 _) ty2 = sameShapes ty1 ty2- sameShapes ty1 (CastTy ty2 _) = sameShapes ty1 ty2- sameShapes _ _ = False--{--************************************************************************-* *-\subsection{Contexts for renaming errors}-* *-************************************************************************--}--inHsDocContext :: HsDocContext -> SDoc-inHsDocContext ctxt = text "In" <+> pprHsDocContext ctxt--pprHsDocContext :: HsDocContext -> SDoc-pprHsDocContext (GenericCtx doc) = doc-pprHsDocContext (TypeSigCtx doc) = text "the type signature for" <+> doc-pprHsDocContext (StandaloneKindSigCtx doc) = text "the standalone kind signature for" <+> doc-pprHsDocContext PatCtx = text "a pattern type-signature"-pprHsDocContext SpecInstSigCtx = text "a SPECIALISE instance pragma"-pprHsDocContext DefaultDeclCtx = text "a `default' declaration"-pprHsDocContext DerivDeclCtx = text "a deriving declaration"-pprHsDocContext (RuleCtx name) = text "the rewrite rule" <+> doubleQuotes (ftext name)-pprHsDocContext (TyDataCtx tycon) = text "the data type declaration for" <+> quotes (ppr tycon)-pprHsDocContext (FamPatCtx tycon) = text "a type pattern of family instance for" <+> quotes (ppr tycon)-pprHsDocContext (TySynCtx name) = text "the declaration for type synonym" <+> quotes (ppr name)-pprHsDocContext (TyFamilyCtx name) = text "the declaration for type family" <+> quotes (ppr name)-pprHsDocContext (ClassDeclCtx name) = text "the declaration for class" <+> quotes (ppr name)-pprHsDocContext ExprWithTySigCtx = text "an expression type signature"-pprHsDocContext TypBrCtx = text "a Template-Haskell quoted type"-pprHsDocContext HsTypeCtx = text "a type argument"-pprHsDocContext HsTypePatCtx = text "a type argument in a pattern"-pprHsDocContext GHCiCtx = text "GHCi input"-pprHsDocContext (SpliceTypeCtx hs_ty) = text "the spliced type" <+> quotes (ppr hs_ty)-pprHsDocContext ClassInstanceCtx = text "GHC.Tc.Gen.Splice.reifyInstances"--pprHsDocContext (ForeignDeclCtx name)- = text "the foreign declaration for" <+> quotes (ppr name)-pprHsDocContext (ConDeclCtx [name])- = text "the definition of data constructor" <+> quotes (ppr name)-pprHsDocContext (ConDeclCtx names)- = text "the definition of data constructors" <+> interpp'SP names--pprConversionFailReason :: ConversionFailReason -> SDoc-pprConversionFailReason = \case- IllegalOccName ctxt_ns occ ->- text "Illegal" <+> pprNameSpace ctxt_ns- <+> text "name:" <+> quotes (text occ)- SumAltArityExceeded alt arity ->- text "Sum alternative" <+> int alt- <+> text "exceeds its arity," <+> int arity- IllegalSumAlt alt ->- vcat [ text "Illegal sum alternative:" <+> int alt- , nest 2 $ text "Sum alternatives must start from 1" ]- IllegalSumArity arity ->- vcat [ text "Illegal sum arity:" <+> int arity- , nest 2 $ text "Sums must have an arity of at least 2" ]- MalformedType typeOrKind ty ->- text "Malformed " <> text ty_str <+> text (show ty)- where ty_str = case typeOrKind of- TypeLevel -> "type"- KindLevel -> "kind"- IllegalLastStatement do_or_lc stmt ->- vcat [ text "Illegal last statement of" <+> pprAHsDoFlavour do_or_lc <> colon- , nest 2 $ ppr stmt- , text "(It should be an expression.)" ]- KindSigsOnlyAllowedOnGADTs ->- text "Kind signatures are only allowed on GADTs"- IllegalDeclaration declDescr bad_decls ->- sep [ text "Illegal" <+> what <+> text "in" <+> descrDoc <> colon- , nest 2 bads ]- where- (what, bads) = case bad_decls of- IllegalDecls (NE.toList -> decls) ->- (text "declaration" <> plural decls, vcat $ map ppr decls)- IllegalFamDecls (NE.toList -> decls) ->- ( text "family declaration" <> plural decls, vcat $ map ppr decls)- descrDoc = text $ case declDescr of- InstanceDecl -> "an instance declaration"- WhereClause -> "a where clause"- LetBinding -> "a let expression"- LetExpression -> "a let expression"- ClssDecl -> "a class declaration"- CannotMixGADTConsWith98Cons ->- text "Cannot mix GADT constructors with Haskell 98"- <+> text "constructors"- EmptyStmtListInDoBlock ->- text "Empty stmt list in do-block"- NonVarInInfixExpr ->- text "Non-variable expression is not allowed in an infix expression"- MultiWayIfWithoutAlts ->- text "Multi-way if-expression with no alternatives"- CasesExprWithoutAlts ->- text "\\cases expression with no alternatives"- ImplicitParamsWithOtherBinds ->- text "Implicit parameters mixed with other bindings"- InvalidCCallImpent from ->- text (show from) <+> text "is not a valid ccall impent"- RecGadtNoCons ->- text "RecGadtC must have at least one constructor name"- GadtNoCons ->- text "GadtC must have at least one constructor name"- InvalidTypeInstanceHeader tys ->- text "Invalid type instance header:"- <+> text (show tys)- InvalidTyFamInstLHS lhs ->- text "Invalid type family instance LHS:"- <+> text (show lhs)- InvalidImplicitParamBinding ->- text "Implicit parameter binding only allowed in let or where"- DefaultDataInstDecl adts ->- (text "Default data instance declarations"- <+> text "are not allowed:")- $$ ppr adts- FunBindLacksEquations nm ->- text "Function binding for"- <+> quotes (text (TH.pprint nm))- <+> text "has no equations"+ , pprTyThingUsedWrong+ , pprUntouchableVariable++ -- | Useful when overriding message printing.+ , messageWithInfoDiagnosticMessage+ , messageWithHsDocContext+ )+ where++import GHC.Prelude++import qualified Language.Haskell.TH as TH++import GHC.Builtin.Names+import GHC.Builtin.Types ( boxedRepDataConTyCon, tYPETyCon, filterCTuple )++import GHC.Types.Name.Reader+import GHC.Unit.Module.ModIface+import GHC.Unit.Module.Warnings++import GHC.Core.Coercion+import GHC.Core.Unify ( tcMatchTys )+import GHC.Core.TyCon+import GHC.Core.Class+import GHC.Core.DataCon+import GHC.Core.Coercion.Axiom (CoAxBranch, coAxiomTyCon, coAxiomSingleBranch)+import GHC.Core.ConLike+import GHC.Core.FamInstEnv ( FamInst(..), famInstAxiom, pprFamInst )+import GHC.Core.InstEnv+import GHC.Core.TyCo.Rep (Type(..))+import GHC.Core.TyCo.Ppr (pprWithExplicitKindsWhen,+ pprSourceTyCon, pprTyVars, pprWithTYPE, pprTyVar, pprTidiedType)+import GHC.Core.PatSyn ( patSynName, pprPatSynType )+import GHC.Core.Predicate+import GHC.Core.Type+import GHC.Core.FVs( orphNamesOfTypes )+import GHC.CoreToIface++import GHC.Driver.Flags+import GHC.Driver.Backend+import GHC.Hs++import GHC.Tc.Errors.Types+import GHC.Tc.Types.BasicTypes+import GHC.Tc.Types.Constraint+import GHC.Tc.Types.Origin+import GHC.Tc.Types.Rank (Rank(..))+import GHC.Tc.Types.TH+import GHC.Tc.Utils.TcType++import GHC.Types.Error+import GHC.Types.Hint+import GHC.Types.Hint.Ppr () -- Outputable GhcHint+import GHC.Types.Basic+import GHC.Types.Error.Codes ( constructorCode )+import GHC.Types.Id+import GHC.Types.Id.Info ( RecSelParent(..) )+import GHC.Types.Name+import GHC.Types.Name.Env+import GHC.Types.Name.Set+import GHC.Types.SourceFile+import GHC.Types.SrcLoc+import GHC.Types.TyThing+import GHC.Types.TyThing.Ppr ( pprTyThingInContext )+import GHC.Types.Unique.Set ( nonDetEltsUniqSet )+import GHC.Types.Var+import GHC.Types.Var.Set+import GHC.Types.Var.Env+import GHC.Types.Fixity (defaultFixity)++import GHC.Iface.Errors.Types+import GHC.Iface.Errors.Ppr+import GHC.Iface.Syntax++import GHC.Unit.State+import GHC.Unit.Module++import GHC.Data.Bag+import GHC.Data.FastString+import GHC.Data.List.SetOps ( nubOrdBy )+import GHC.Data.Maybe+import GHC.Data.Pair+import GHC.Settings.Constants (mAX_TUPLE_SIZE, mAX_CTUPLE_SIZE)+import GHC.Utils.Misc+import GHC.Utils.Outputable+import GHC.Utils.Panic++import qualified GHC.LanguageExtensions as LangExt++import GHC.Data.BooleanFormula (pprBooleanFormulaNice)++import Data.List.NonEmpty (NonEmpty(..))+import qualified Data.List.NonEmpty as NE+import Data.Foldable ( fold )+import Data.Function (on)+import Data.List ( groupBy, sortBy, tails+ , partition, unfoldr )+import Data.Ord ( comparing )+import Data.Bifunctor+++defaultTcRnMessageOpts :: TcRnMessageOpts+defaultTcRnMessageOpts = TcRnMessageOpts { tcOptsShowContext = True+ , tcOptsIfaceOpts = defaultDiagnosticOpts @IfaceMessage }++instance HasDefaultDiagnosticOpts TcRnMessageOpts where+ defaultOpts = defaultTcRnMessageOpts++instance Diagnostic TcRnMessage where+ type DiagnosticOpts TcRnMessage = TcRnMessageOpts+ diagnosticMessage opts = \case+ TcRnUnknownMessage (UnknownDiagnostic f m)+ -> diagnosticMessage (f opts) m+ TcRnMessageWithInfo unit_state msg_with_info+ -> case msg_with_info of+ TcRnMessageDetailed err_info msg+ -> messageWithInfoDiagnosticMessage unit_state err_info+ (tcOptsShowContext opts)+ (diagnosticMessage opts msg)+ TcRnWithHsDocContext ctxt msg+ -> messageWithHsDocContext opts ctxt (diagnosticMessage opts msg)+ TcRnSolverReport msg _ _+ -> mkSimpleDecorated $ pprSolverReportWithCtxt msg+ TcRnSolverDepthError ty depth -> mkSimpleDecorated msg+ where+ msg =+ vcat [ text "Reduction stack overflow; size =" <+> ppr depth+ , hang (text "When simplifying the following type:")+ 2 (ppr ty) ]+ TcRnRedundantConstraints redundants (info, show_info)+ -> mkSimpleDecorated $+ text "Redundant constraint" <> plural redundants <> colon+ <+> pprEvVarTheta redundants+ $$ if show_info then text "In" <+> ppr info else empty+ TcRnInaccessibleCode implic contra+ -> mkSimpleDecorated $+ hang (text "Inaccessible code in")+ 2 (ppr (ic_info implic))+ $$ pprSolverReportWithCtxt contra+ TcRnInaccessibleCoAxBranch fam_tc cur_branch+ -> mkSimpleDecorated $+ text "Type family instance equation is overlapped:" $$+ nest 2 (pprCoAxBranchUser fam_tc cur_branch)+ TcRnTypeDoesNotHaveFixedRuntimeRep ty prov (ErrInfo extra supplementary)+ -> mkDecorated [pprTypeDoesNotHaveFixedRuntimeRep ty prov, extra, supplementary]+ TcRnImplicitLift id_or_name ErrInfo{..}+ -> mkDecorated $+ ( text "The variable" <+> quotes (ppr id_or_name) <+>+ text "is implicitly lifted in the TH quotation"+ ) : [errInfoContext, errInfoSupplementary]+ TcRnUnusedPatternBinds bind+ -> mkDecorated [hang (text "This pattern-binding binds no variables:") 2 (ppr bind)]+ TcRnDodgyImports (DodgyImportsEmptyParent gre)+ -> mkDecorated [dodgy_msg (text "import") gre (dodgy_msg_insert gre)]+ TcRnDodgyImports (DodgyImportsHiding reason)+ -> mkSimpleDecorated $+ pprImportLookup reason+ TcRnDodgyExports gre+ -> mkDecorated [dodgy_msg (text "export") gre (dodgy_msg_insert gre)]+ TcRnMissingImportList ie+ -> mkDecorated [ text "The import item" <+> quotes (ppr ie) <+>+ text "does not have an explicit import list"+ ]+ TcRnUnsafeDueToPlugin+ -> mkDecorated [text "Use of plugins makes the module unsafe"]+ TcRnModMissingRealSrcSpan mod+ -> mkDecorated [text "Module does not have a RealSrcSpan:" <+> ppr mod]+ TcRnIdNotExportedFromModuleSig name mod+ -> mkDecorated [ text "The identifier" <+> ppr (occName name) <+>+ text "does not exist in the signature for" <+> ppr mod+ ]+ TcRnIdNotExportedFromLocalSig name+ -> mkDecorated [ text "The identifier" <+> ppr (occName name) <+>+ text "does not exist in the local signature."+ ]+ TcRnShadowedName occ provenance+ -> let shadowed_locs = case provenance of+ ShadowedNameProvenanceLocal n -> [text "bound at" <+> ppr n]+ ShadowedNameProvenanceGlobal gres -> map pprNameProvenance gres+ in mkSimpleDecorated $+ sep [text "This binding for" <+> quotes (ppr occ)+ <+> text "shadows the existing binding" <> plural shadowed_locs,+ nest 2 (vcat shadowed_locs)]+ TcRnInvalidWarningCategory cat+ -> mkSimpleDecorated $+ vcat [text "Warning category" <+> quotes (ppr cat) <+> text "is not valid",+ text "(user-defined category names must begin with" <+> quotes (text "x-"),+ text "and contain only letters, numbers, apostrophes and dashes)" ]+ TcRnDuplicateWarningDecls d rdr_name+ -> mkSimpleDecorated $+ vcat [text "Multiple warning declarations for" <+> quotes (ppr rdr_name),+ text "also at " <+> ppr (getLocA d)]+ TcRnSimplifierTooManyIterations simples limit wc+ -> mkSimpleDecorated $+ hang (text "solveWanteds: too many iterations"+ <+> parens (text "limit =" <+> ppr limit))+ 2 (vcat [ text "Unsolved:" <+> ppr wc+ , text "Simples:" <+> ppr simples+ ])+ TcRnIllegalPatSynDecl rdrname+ -> mkSimpleDecorated $+ hang (text "Illegal pattern synonym declaration for" <+> quotes (ppr rdrname))+ 2 (text "Pattern synonym declarations are only valid at top level")+ TcRnLinearPatSyn ty+ -> mkSimpleDecorated $+ hang (text "Pattern synonyms do not support linear fields (GHC #18806):") 2 (ppr ty)+ TcRnEmptyRecordUpdate+ -> mkSimpleDecorated $ text "Empty record update"+ TcRnIllegalFieldPunning fld+ -> mkSimpleDecorated $ text "Illegal use of punning for field" <+> quotes (ppr fld)+ TcRnIllegalWildcardsInRecord fld_part+ -> mkSimpleDecorated $ text "Illegal `..' in record" <+> pprRecordFieldPart fld_part+ TcRnIllegalWildcardInType mb_name bad+ -> mkSimpleDecorated $ case bad of+ WildcardNotLastInConstraint ->+ hang notAllowed 2 constraint_hint_msg+ ExtraConstraintWildcardNotAllowed allow_sole ->+ case allow_sole of+ SoleExtraConstraintWildcardNotAllowed ->+ notAllowed+ SoleExtraConstraintWildcardAllowed ->+ hang notAllowed 2 sole_msg+ WildcardsNotAllowedAtAll ->+ notAllowed+ where+ notAllowed, what, wildcard, how :: SDoc+ notAllowed = what <+> quotes wildcard <+> how+ wildcard = case mb_name of+ Nothing -> pprAnonWildCard+ Just name -> ppr name+ what+ | Just _ <- mb_name+ = text "Named wildcard"+ | ExtraConstraintWildcardNotAllowed {} <- bad+ = text "Extra-constraint wildcard"+ | otherwise+ = text "Wildcard"+ how = case bad of+ WildcardNotLastInConstraint+ -> text "not allowed in a constraint"+ _ -> text "not allowed"+ constraint_hint_msg :: SDoc+ constraint_hint_msg+ | Just _ <- mb_name+ = vcat [ text "Extra-constraint wildcards must be anonymous"+ , nest 2 (text "e.g f :: (Eq a, _) => blah") ]+ | otherwise+ = vcat [ text "except as the last top-level constraint of a type signature"+ , nest 2 (text "e.g f :: (Eq a, _) => blah") ]+ sole_msg :: SDoc+ sole_msg =+ vcat [ text "except as the sole constraint"+ , nest 2 (text "e.g., deriving instance _ => Eq (Foo a)") ]+ TcRnDuplicateFieldName fld_part dups+ -> mkSimpleDecorated $+ hsep [ text "Duplicate field name"+ , quotes (ppr (rdrNameOcc $ NE.head dups))+ , text "in record", pprRecordFieldPart fld_part ]+ TcRnIllegalViewPattern pat+ -> mkSimpleDecorated $ vcat [text "Illegal view pattern: " <+> ppr pat]+ TcRnCharLiteralOutOfRange c+ -> mkSimpleDecorated $ text "character literal out of range: '\\" <> char c <> char '\''+ TcRnIllegalWildcardsInConstructor con+ -> mkSimpleDecorated $+ vcat [ text "Illegal `{..}' notation for constructor" <+> quotes (ppr con)+ , nest 2 (text "Record wildcards may not be used for constructors with unlabelled fields.")+ , nest 2 (text "Possible fix: Remove the `{..}' and add a match for each field of the constructor.")+ ]+ TcRnIgnoringAnnotations anns+ -> mkSimpleDecorated $+ text "Ignoring ANN annotation" <> plural anns <> comma+ <+> text "because this is a stage-1 compiler without -fexternal-interpreter or doesn't support GHCi"+ TcRnAnnotationInSafeHaskell+ -> mkSimpleDecorated $+ vcat [ text "Annotations are not compatible with Safe Haskell."+ , text "See https://gitlab.haskell.org/ghc/ghc/issues/10826" ]+ TcRnInvalidTypeApplication fun_ty hs_ty+ -> mkSimpleDecorated $+ text "Cannot apply expression of type" <+> quotes (ppr fun_ty) $$+ text "to a visible type argument" <+> quotes (ppr hs_ty)+ TcRnTagToEnumMissingValArg+ -> mkSimpleDecorated $+ text "tagToEnum# must appear applied to one value argument"+ TcRnTagToEnumUnspecifiedResTy ty+ -> mkSimpleDecorated $+ hang (text "Bad call to tagToEnum# at type" <+> ppr ty)+ 2 (vcat [ text "Specify the type by giving a type signature"+ , text "e.g. (tagToEnum# x) :: Bool" ])+ TcRnTagToEnumResTyNotAnEnum ty+ -> mkSimpleDecorated $+ hang (text "Bad call to tagToEnum# at type" <+> ppr ty)+ 2 (text "Result type must be an enumeration type")+ TcRnTagToEnumResTyTypeData ty+ -> mkSimpleDecorated $+ hang (text "Bad call to tagToEnum# at type" <+> ppr ty)+ 2 (text "Result type cannot be headed by a `type data` type")+ TcRnArrowIfThenElsePredDependsOnResultTy+ -> mkSimpleDecorated $+ text "Predicate type of `ifThenElse' depends on result type"+ TcRnIllegalHsBootOrSigDecl boot_or_sig decls+ -> mkSimpleDecorated $+ text "Illegal" <+> what <+> text "in" <+> whr <> dot+ where+ what = case decls of+ BootBindsPs {} -> text "binding"+ BootBindsRn {} -> text "binding"+ BootInstanceSigs {} -> text "instance body"+ BootFamInst {} -> text "family instance"+ BootSpliceDecls {} -> text "splice"+ BootForeignDecls {} -> text "foreign declaration"+ BootDefaultDecls {} -> text "default declaration"+ BootRuleDecls {} -> text "RULE pragma"+ whr = case boot_or_sig of+ HsBoot -> text "an hs-boot file"+ Hsig -> text "a backpack signature file"+ TcRnBootMismatch boot_or_sig err ->+ mkSimpleDecorated $ pprBootMismatch boot_or_sig err+ TcRnRecursivePatternSynonym binds+ -> mkSimpleDecorated $+ hang (text "Recursive pattern synonym definition with following bindings:")+ 2 (vcat $ map pprLBind . bagToList $ binds)+ where+ pprLoc loc = parens (text "defined at" <+> ppr loc)+ pprLBind :: CollectPass GhcRn => GenLocated (SrcSpanAnn' a) (HsBindLR GhcRn idR) -> SDoc+ pprLBind (L loc bind) = pprWithCommas ppr (collectHsBindBinders CollNoDictBinders bind)+ <+> pprLoc (locA loc)+ TcRnPartialTypeSigTyVarMismatch n1 n2 fn_name hs_ty+ -> mkSimpleDecorated $+ hang (text "Couldn't match" <+> quotes (ppr n1)+ <+> text "with" <+> quotes (ppr n2))+ 2 (hang (text "both bound by the partial type signature:")+ 2 (ppr fn_name <+> dcolon <+> ppr hs_ty))+ TcRnPartialTypeSigBadQuantifier n fn_name m_unif_ty hs_ty+ -> mkSimpleDecorated $+ hang (text "Can't quantify over" <+> quotes (ppr n))+ 2 (vcat [ hang (text "bound by the partial type signature:")+ 2 (ppr fn_name <+> dcolon <+> ppr hs_ty)+ , extra ])+ where+ extra | Just rhs_ty <- m_unif_ty+ = sep [ quotes (ppr n), text "should really be", quotes (ppr rhs_ty) ]+ | otherwise+ = empty+ TcRnMissingSignature what _ ->+ mkSimpleDecorated $+ case what of+ MissingPatSynSig p ->+ hang (text "Pattern synonym with no type signature:")+ 2 (text "pattern" <+> pprPrefixName (patSynName p) <+> dcolon <+> pprPatSynType p)+ MissingTopLevelBindingSig name ty ->+ hang (text "Top-level binding with no type signature:")+ 2 (pprPrefixName name <+> dcolon <+> pprSigmaType ty)+ MissingTyConKindSig tc cusks_enabled ->+ hang msg+ 2 (text "type" <+> pprPrefixName (tyConName tc) <+> dcolon <+> pprKind (tyConKind tc))+ where+ msg | cusks_enabled+ = text "Top-level type constructor with no standalone kind signature or CUSK:"+ | otherwise+ = text "Top-level type constructor with no standalone kind signature:"++ TcRnPolymorphicBinderMissingSig n ty+ -> mkSimpleDecorated $+ sep [ text "Polymorphic local binding with no type signature:"+ , nest 2 $ pprPrefixName n <+> dcolon <+> ppr ty ]+ TcRnOverloadedSig sig+ -> mkSimpleDecorated $+ hang (text "Overloaded signature conflicts with monomorphism restriction")+ 2 (ppr sig)+ TcRnTupleConstraintInst _+ -> mkSimpleDecorated $ text "You can't specify an instance for a tuple constraint"+ TcRnUserTypeError ty+ -> mkSimpleDecorated (pprUserTypeErrorTy ty)+ TcRnConstraintInKind ty+ -> mkSimpleDecorated $+ text "Illegal constraint in a kind:" <+> pprType ty+ TcRnUnboxedTupleOrSumTypeFuncArg tuple_or_sum ty+ -> mkSimpleDecorated $+ sep [ text "Illegal unboxed" <+> what <+> text "type as function argument:"+ , pprType ty ]+ where+ what = case tuple_or_sum of+ UnboxedTupleType -> text "tuple"+ UnboxedSumType -> text "sum"+ TcRnLinearFuncInKind ty+ -> mkSimpleDecorated $+ text "Illegal linear function in a kind:" <+> pprType ty+ TcRnForAllEscapeError ty kind+ -> mkSimpleDecorated $ vcat+ [ hang (text "Quantified type's kind mentions quantified type variable")+ 2 (text "type:" <+> quotes (ppr ty))+ , hang (text "where the body of the forall has this kind:")+ 2 (quotes (pprKind kind)) ]+ TcRnSimplifiableConstraint pred what+ -> mkSimpleDecorated $ vcat+ [ hang (text "The constraint" <+> quotes (pprType pred) <+> text "matches")+ 2 (ppr what)+ , hang (text "This makes type inference for inner bindings fragile;")+ 2 (text "either use MonoLocalBinds, or simplify it using the instance") ]+ TcRnArityMismatch thing thing_arity nb_args+ -> mkSimpleDecorated $+ hsep [ text "The" <+> what, quotes (ppr $ getName thing), text "should have"+ , n_arguments <> comma, text "but has been given"+ , if nb_args == 0 then text "none" else int nb_args+ ]+ where+ what = case thing of+ ATyCon tc -> ppr (tyConFlavour tc)+ _ -> text (tyThingCategory thing)+ n_arguments | thing_arity == 0 = text "no arguments"+ | thing_arity == 1 = text "1 argument"+ | True = hsep [int thing_arity, text "arguments"]+ TcRnIllegalInstance reason ->+ mkSimpleDecorated $ pprIllegalInstance reason+ TcRnVDQInTermType mb_ty+ -> mkSimpleDecorated $ vcat+ [ case mb_ty of+ Nothing -> main_msg+ Just ty -> hang (main_msg <> char ':') 2 (pprType ty)+ , text "(GHC does not yet support this)" ]+ where+ main_msg =+ text "Illegal visible, dependent quantification" <+>+ text "in the type of a term"+ TcRnBadQuantPredHead ty+ -> mkSimpleDecorated $+ hang (text "Quantified predicate must have a class or type variable head:")+ 2 (pprType ty)+ TcRnIllegalTupleConstraint ty+ -> mkSimpleDecorated $+ text "Illegal tuple constraint:" <+> pprType ty+ TcRnNonTypeVarArgInConstraint ty+ -> mkSimpleDecorated $+ hang (text "Non type-variable argument")+ 2 (text "in the constraint:" <+> pprType ty)+ TcRnIllegalImplicitParam ty+ -> mkSimpleDecorated $+ text "Illegal implicit parameter" <+> quotes (pprType ty)+ TcRnIllegalConstraintSynonymOfKind kind+ -> mkSimpleDecorated $+ text "Illegal constraint synonym of kind:" <+> quotes (pprKind kind)+ TcRnOversaturatedVisibleKindArg ty+ -> mkSimpleDecorated $+ text "Illegal oversaturated visible kind argument:" <+>+ quotes (char '@' <> pprParendType ty)+ TcRnForAllRankErr rank ty+ -> let herald = case tcSplitForAllTyVars ty of+ ([], _) -> text "Illegal qualified type:"+ _ -> text "Illegal polymorphic type:"+ extra = case rank of+ MonoTypeConstraint -> text "A constraint must be a monotype"+ _ -> empty+ in mkSimpleDecorated $ vcat [hang herald 2 (pprType ty), extra]+ TcRnMonomorphicBindings bindings+ -> let pp_bndrs = pprBindings bindings+ in mkSimpleDecorated $+ sep [ text "The Monomorphism Restriction applies to the binding"+ <> plural bindings+ , text "for" <+> pp_bndrs ]+ TcRnOrphanInstance (Left cls_inst)+ -> mkSimpleDecorated $+ hang (text "Orphan class instance:")+ 2 (pprInstanceHdr cls_inst)+ TcRnOrphanInstance (Right fam_inst)+ -> mkSimpleDecorated $+ hang (text "Orphan family instance:")+ 2 (pprFamInst fam_inst)+ TcRnFunDepConflict unit_state sorted+ -> let herald = text "Functional dependencies conflict between instance declarations:"+ in mkSimpleDecorated $+ pprWithUnitState unit_state $ (hang herald 2 (pprInstances $ NE.toList sorted))+ TcRnDupInstanceDecls unit_state sorted+ -> let herald = text "Duplicate instance declarations:"+ in mkSimpleDecorated $+ pprWithUnitState unit_state $ (hang herald 2 (pprInstances $ NE.toList sorted))+ TcRnConflictingFamInstDecls sortedNE+ -> let sorted = NE.toList sortedNE+ in mkSimpleDecorated $+ hang (text "Conflicting family instance declarations:")+ 2 (vcat [ pprCoAxBranchUser (coAxiomTyCon ax) (coAxiomSingleBranch ax)+ | fi <- sorted+ , let ax = famInstAxiom fi ])+ TcRnFamInstNotInjective rea fam_tc (eqn1 NE.:| rest_eqns)+ -> let (herald, show_kinds) = case rea of+ InjErrRhsBareTyVar tys ->+ (injectivityErrorHerald $$+ text "RHS of injective type family equation is a bare" <+>+ text "type variable" $$+ text "but these LHS type and kind patterns are not bare" <+>+ text "variables:" <+> pprQuotedList tys, False)+ InjErrRhsCannotBeATypeFam ->+ (injectivityErrorHerald $$+ text "RHS of injective type family equation cannot" <+>+ text "be a type family:", False)+ InjErrRhsOverlap ->+ (text "Type family equation right-hand sides overlap; this violates" $$+ text "the family's injectivity annotation:", False)+ InjErrCannotInferFromRhs tvs has_kinds _ ->+ let show_kinds = has_kinds == YesHasKinds+ what = if show_kinds then text "Type/kind" else text "Type"+ body = sep [ what <+> text "variable" <>+ pluralVarSet tvs <+> pprVarSet tvs (pprQuotedList . scopedSort)+ , text "cannot be inferred from the right-hand side." ]+ in (injectivityErrorHerald $$ body $$ text "In the type family equation:", show_kinds)++ in mkSimpleDecorated $ pprWithExplicitKindsWhen show_kinds $+ hang herald+ 2 (vcat (map (pprCoAxBranchUser fam_tc) (eqn1 : rest_eqns)))+ TcRnBangOnUnliftedType ty+ -> mkSimpleDecorated $+ text "Strictness flag has no effect on unlifted type" <+> quotes (ppr ty)+ TcRnLazyBangOnUnliftedType ty+ -> mkSimpleDecorated $+ text "Lazy flag has no effect on unlifted type" <+> quotes (ppr ty)+ TcRnMultipleDefaultDeclarations dup_things+ -> mkSimpleDecorated $+ hang (text "Multiple default declarations")+ 2 (vcat (map pp dup_things))+ where+ pp :: LDefaultDecl GhcRn -> SDoc+ pp (L locn (DefaultDecl _ _))+ = text "here was another default declaration" <+> ppr (locA locn)+ TcRnBadDefaultType ty deflt_clss+ -> mkSimpleDecorated $+ hang (text "The default type" <+> quotes (ppr ty) <+> text "is not an instance of")+ 2 (foldr1 (\a b -> a <+> text "or" <+> b) (map (quotes. ppr) deflt_clss))+ TcRnPatSynBundledWithNonDataCon+ -> mkSimpleDecorated $+ text "Pattern synonyms can be bundled only with datatypes."+ TcRnPatSynBundledWithWrongType expected_res_ty res_ty+ -> mkSimpleDecorated $+ text "Pattern synonyms can only be bundled with matching type constructors"+ $$ text "Couldn't match expected type of"+ <+> quotes (ppr expected_res_ty)+ <+> text "with actual type of"+ <+> quotes (ppr res_ty)+ TcRnDupeModuleExport mod+ -> mkSimpleDecorated $+ hsep [ text "Duplicate"+ , quotes (text "Module" <+> ppr mod)+ , text "in export list" ]+ TcRnExportedModNotImported mod+ -> mkSimpleDecorated+ $ formatExportItemError+ (text "module" <+> ppr mod)+ "is not imported"+ TcRnNullExportedModule mod+ -> mkSimpleDecorated+ $ formatExportItemError+ (text "module" <+> ppr mod)+ "exports nothing"+ TcRnMissingExportList mod+ -> mkSimpleDecorated+ $ formatExportItemError+ (text "module" <+> ppr mod)+ "is missing an export list"+ TcRnExportHiddenComponents export_item+ -> mkSimpleDecorated+ $ formatExportItemError+ (ppr export_item)+ "attempts to export constructors or class methods that are not visible here"+ TcRnDuplicateExport gre ie1 ie2+ -> mkSimpleDecorated $+ hsep [ quotes (ppr $ greName gre)+ , text "is exported by", quotes (ppr ie1)+ , text "and", quotes (ppr ie2) ]+ TcRnExportedParentChildMismatch parent_name ty_thing child parent_names+ -> mkSimpleDecorated $+ text "The type constructor" <+> quotes (ppr parent_name)+ <+> text "is not the parent of the" <+> text what_is+ <+> quotes thing <> char '.'+ $$ text (capitalise what_is)+ <> text "s can only be exported with their parent type constructor."+ $$ (case parents of+ [] -> empty+ [_] -> text "Parent:"+ _ -> text "Parents:") <+> fsep (punctuate comma parents)+ where+ pp_category :: TyThing -> String+ pp_category (AnId i)+ | isRecordSelector i = "record selector"+ pp_category i = tyThingCategory i+ what_is = pp_category ty_thing+ thing = ppr $ nameOccName child+ parents = map ppr parent_names+ TcRnConflictingExports occ child_gre1 ie1 child_gre2 ie2+ -> mkSimpleDecorated $+ vcat [ text "Conflicting exports for" <+> quotes (ppr occ) <> colon+ , ppr_export child_gre1 ie1+ , ppr_export child_gre2 ie2+ ]+ where+ ppr_export gre ie =+ nest 3 $+ hang (quotes (ppr ie) <+> text "exports" <+> quotes (ppr $ greName gre))+ 2 (pprNameProvenance gre)+ TcRnDuplicateFieldExport (gre, ie1) gres_ies ->+ mkSimpleDecorated $+ vcat ( hsep [ text "Duplicate record field"+ , quotes (ppr $ greOccName gre)+ , text "in export list" <> colon ]+ : map ppr_export ((gre,ie1) : NE.toList gres_ies)+ )+ where+ ppr_export (gre,ie) =+ nest 3 $+ hang (sep [ quotes (ppr ie) <+> text "exports the field" <+> quotes (ppr $ greName gre)+ , text "belonging to the constructor" <> plural fld_cons <+> pprQuotedList fld_cons ])+ 2 (pprNameProvenance gre)+ where+ fld_cons :: [ConLikeName]+ fld_cons = nonDetEltsUniqSet $ recFieldCons $ fieldGREInfo gre+ TcRnAmbiguousFieldInUpdate (gre1, gre2, gres)+ -> mkSimpleDecorated $+ vcat [ text "Ambiguous record field" <+> fld <> dot+ , hang (text "It could refer to any of the following:")+ 2 $ vcat (map pprSugg (gre1 : gre2 : gres))+ ]+ where+ fld = quotes $ ppr (occNameFS $ greOccName gre1)+ pprSugg gre = vcat [ bullet <+> pprGRE gre <> comma+ , nest 2 (pprNameProvenance gre) ]+ pprGRE gre = case greInfo gre of+ IAmRecField {}+ -> let parent = par_is $ greParent gre+ in text "record field" <+> fld <+> text "of" <+> quotes (ppr parent)+ _ -> text "variable" <+> fld+ TcRnAmbiguousRecordUpdate _rupd tc+ -> mkSimpleDecorated $+ vcat [ text "Ambiguous record update with parent" <+> what <> dot+ , hsep [ text "This type-directed disambiguation mechanism"+ , text "will not be supported by -XDuplicateRecordFields in future releases of GHC." ]+ , text "Consider disambiguating using module qualification instead."+ ]+ where+ what :: SDoc+ what = text "type constructor" <+> quotes (ppr $ RecSelData tc)+ TcRnMissingFields con fields+ -> mkSimpleDecorated $ vcat [header, nest 2 rest]+ where+ rest | null fields = empty+ | otherwise = vcat (fmap pprField fields)+ header = text "Fields of" <+> quotes (ppr con) <+>+ text "not initialised" <>+ if null fields then empty else colon+ TcRnFieldUpdateInvalidType prs+ -> mkSimpleDecorated $+ hang (text "Record update for insufficiently polymorphic field"+ <> plural prs <> colon)+ 2 (vcat [ ppr f <+> dcolon <+> ppr ty | (f,ty) <- prs ])+ TcRnMissingStrictFields con fields+ -> mkSimpleDecorated $ vcat [header, nest 2 rest]+ where+ rest | null fields = empty -- Happens for non-record constructors+ -- with strict fields+ | otherwise = vcat (fmap pprField fields)++ header = text "Constructor" <+> quotes (ppr con) <+>+ text "does not have the required strict field(s)" <>+ if null fields then empty else colon+ TcRnBadRecordUpdate upd_flds reason+ -> case reason of+ NoConstructorHasAllFields { conflictingFields = conflicts }+ | [fld] <- conflicts+ -> mkSimpleDecorated $+ vcat [ header+ , text "No constructor in scope has the field" <+> quotes (ppr fld) ]+ | otherwise+ ->+ mkSimpleDecorated $+ vcat [ header+ , hang (text "No constructor in scope has all of the following fields:")+ 2 (pprQuotedList conflicts) ]+ where+ header :: SDoc+ header = text "Invalid record update."+ MultiplePossibleParents (par1, par2, pars) ->+ mkSimpleDecorated $+ vcat [ hang (text "Ambiguous record update with field" <> plural upd_flds)+ 2 ppr_flds+ , hang (thisOrThese upd_flds <+> text "field" <> plural upd_flds <+> what_parent)+ 2 (quotedListWithAnd (map ppr (par1:par2:pars))) ]+ where+ ppr_flds, what_parent, which :: SDoc+ ppr_flds = quotedListWithAnd $ map ppr upd_flds+ what_parent = case par1 of+ RecSelData {} -> text "appear" <> singular upd_flds+ <+> text "in" <+> which <+> text "datatypes"+ RecSelPatSyn {} -> isOrAre upd_flds <+> text "associated with"+ <+> which <+> text "pattern synonyms"+ which = case pars of+ [] -> text "both"+ _ -> text "all of the"+ InvalidTyConParent tc pars ->+ mkSimpleDecorated $+ vcat [ hang (text "No data constructor of" <+> what $$ text "has all of the fields:")+ 2 (pprQuotedList upd_flds)+ , pat_syn_msg ]+ where+ what = text "type constructor" <+> quotes (ppr (RecSelData tc))+ pat_syn_msg+ | any (\case { RecSelPatSyn {} -> True; _ -> False}) pars+ = text "NB: type-directed disambiguation is not supported for pattern synonym record fields."+ | otherwise+ = empty+ TcRnStaticFormNotClosed name reason+ -> mkSimpleDecorated $+ quotes (ppr name)+ <+> text "is used in a static form but it is not closed"+ <+> text "because it"+ $$ sep (causes reason)+ where+ causes :: NotClosedReason -> [SDoc]+ causes NotLetBoundReason = [text "is not let-bound."]+ causes (NotTypeClosed vs) =+ [ text "has a non-closed type because it contains the"+ , text "type variables:" <+>+ pprVarSet vs (hsep . punctuate comma . map (quotes . ppr))+ ]+ causes (NotClosed n reason) =+ let msg = text "uses" <+> quotes (ppr n) <+> text "which"+ in case reason of+ NotClosed _ _ -> msg : causes reason+ _ -> let (xs0, xs1) = splitAt 1 $ causes reason+ in fmap (msg <+>) xs0 ++ xs1+ TcRnUselessTypeable+ -> mkSimpleDecorated $+ text "Deriving" <+> quotes (ppr typeableClassName) <+>+ text "has no effect: all types now auto-derive Typeable"+ TcRnDerivingDefaults cls+ -> mkSimpleDecorated $ sep+ [ text "Both DeriveAnyClass and"+ <+> text "GeneralizedNewtypeDeriving are enabled"+ , text "Defaulting to the DeriveAnyClass strategy"+ <+> text "for instantiating" <+> ppr cls+ ]+ TcRnNonUnaryTypeclassConstraint ct+ -> mkSimpleDecorated $+ quotes (ppr ct)+ <+> text "is not a unary constraint, as expected by a deriving clause"+ TcRnPartialTypeSignatures _ theta+ -> mkSimpleDecorated $+ text "Found type wildcard" <+> quotes (char '_')+ <+> text "standing for" <+> quotes (pprTheta theta)+ TcRnCannotDeriveInstance cls cls_tys mb_strat newtype_deriving reason+ -> mkSimpleDecorated $+ derivErrDiagnosticMessage cls cls_tys mb_strat newtype_deriving True reason+ TcRnLookupInstance cls tys reason+ -> mkSimpleDecorated $+ text "Couldn't match instance:" <+>+ lookupInstanceErrDiagnosticMessage cls tys reason+ TcRnLazyGADTPattern+ -> mkSimpleDecorated $+ hang (text "An existential or GADT data constructor cannot be used")+ 2 (text "inside a lazy (~) pattern")+ TcRnArrowProcGADTPattern+ -> mkSimpleDecorated $+ text "Proc patterns cannot use existential or GADT data constructors"+ TcRnForallIdentifier rdr_name+ -> mkSimpleDecorated $+ fsep [ text "The use of" <+> quotes (ppr rdr_name)+ <+> text "as an identifier",+ text "will become an error in a future GHC release." ]+ TcRnTypeEqualityOutOfScope+ -> mkDecorated+ [ text "The" <+> quotes (text "~") <+> text "operator is out of scope." $$+ text "Assuming it to stand for an equality constraint."+ , text "NB:" <+> (quotes (text "~") <+> text "used to be built-in syntax but now is a regular type operator" $$+ text "exported from Data.Type.Equality and Prelude.") $$+ text "If you are using a custom Prelude, consider re-exporting it."+ , text "This will become an error in a future GHC release." ]+ TcRnTypeEqualityRequiresOperators+ -> mkSimpleDecorated $+ fsep [ text "The use of" <+> quotes (text "~")+ <+> text "without TypeOperators",+ text "will become an error in a future GHC release." ]+ TcRnIllegalTypeOperator overall_ty op+ -> mkSimpleDecorated $+ text "Illegal operator" <+> quotes (ppr op) <+>+ text "in type" <+> quotes (ppr overall_ty)+ TcRnIllegalTypeOperatorDecl name+ -> mkSimpleDecorated $+ text "Illegal declaration of a type or class operator" <+> quotes (ppr name)+ TcRnGADTMonoLocalBinds+ -> mkSimpleDecorated $+ fsep [ text "Pattern matching on GADTs without MonoLocalBinds"+ , text "is fragile." ]+ TcRnIncorrectNameSpace name _+ -> mkSimpleDecorated $ msg+ where+ msg+ -- We are in a type-level namespace,+ -- and the name is incorrectly at the term-level.+ | isValNameSpace ns+ = text "The" <+> what <+> text "does not live in the type-level namespace"++ -- We are in a term-level namespace,+ -- and the name is incorrectly at the type-level.+ | otherwise+ = text "Illegal term-level use of the" <+> what+ ns = nameNameSpace name+ what = pprNameSpace ns <+> quotes (ppr name)+ TcRnNotInScope err name imp_errs _+ -> mkSimpleDecorated $+ pprScopeError name err $$ vcat (map ppr imp_errs)+ TcRnTermNameInType name _+ -> mkSimpleDecorated $+ quotes (ppr name) <+>+ (text "is a term-level binding") $+$+ (text " and can not be used at the type level.")+ TcRnUntickedPromotedThing thing+ -> mkSimpleDecorated $+ text "Unticked promoted" <+> what+ where+ what :: SDoc+ what = case thing of+ UntickedExplicitList -> text "list" <> dot+ UntickedConstructor fixity nm ->+ let con = pprUntickedConstructor fixity nm+ bare_sym = isBareSymbol fixity nm+ in text "constructor:" <+> con <> if bare_sym then empty else dot+ TcRnIllegalBuiltinSyntax what rdr_name+ -> mkSimpleDecorated $+ hsep [text "Illegal", what, text "of built-in syntax:", ppr rdr_name]+ TcRnWarnDefaulting tidy_wanteds tidy_tv default_ty+ -> mkSimpleDecorated $+ hang (hsep $ [ text "Defaulting" ]+ +++ (case tidy_tv of+ Nothing -> []+ Just tv -> [text "the type variable"+ , quotes (ppr tv)])+ +++ [ text "to type"+ , quotes (ppr default_ty)+ , text "in the following constraint" <> plural tidy_wanteds ])+ 2+ (pprWithArising tidy_wanteds)+++ TcRnForeignImportPrimExtNotSet _decl+ -> mkSimpleDecorated $+ text "`foreign import prim' requires GHCForeignImportPrim."++ TcRnForeignImportPrimSafeAnn _decl+ -> mkSimpleDecorated $+ text "The safe/unsafe annotation should not be used with `foreign import prim'."++ TcRnForeignFunctionImportAsValue _decl+ -> mkSimpleDecorated $+ text "`value' imports cannot have function types"++ TcRnFunPtrImportWithoutAmpersand _decl+ -> mkSimpleDecorated $+ text "possible missing & in foreign import of FunPtr"++ TcRnIllegalForeignDeclBackend _decl _backend expectedBknds+ -> mkSimpleDecorated $+ fsep (text "Illegal foreign declaration: requires one of these back ends:" :+ commafyWith (text "or") (map (text . backendDescription) expectedBknds))++ TcRnUnsupportedCallConv _decl unsupportedCC+ -> mkSimpleDecorated $+ case unsupportedCC of+ StdCallConvUnsupported ->+ text "the 'stdcall' calling convention is unsupported on this platform,"+ $$ text "treating as ccall"+ PrimCallConvUnsupported ->+ text "The `prim' calling convention can only be used with `foreign import'"+ JavaScriptCallConvUnsupported ->+ text "The `javascript' calling convention is unsupported on this platform"++ TcRnIllegalForeignType mArgOrResult reason+ -> mkSimpleDecorated $ hang msg 2 extra+ where+ arg_or_res = case mArgOrResult of+ Nothing -> empty+ Just Arg -> text "argument"+ Just Result -> text "result"+ msg = hsep [ text "Unacceptable", arg_or_res+ , text "type in foreign declaration:"]+ extra =+ case reason of+ TypeCannotBeMarshaled ty why ->+ let innerMsg = quotes (ppr ty) <+> text "cannot be marshalled in a foreign call"+ in case why of+ NotADataType ->+ quotes (ppr ty) <+> text "is not a data type"+ NewtypeDataConNotInScope _ [] ->+ hang innerMsg 2 $ text "because its data constructor is not in scope"+ NewtypeDataConNotInScope tc _ ->+ hang innerMsg 2 $+ text "because the data constructor for"+ <+> quotes (ppr tc) <+> text "is not in scope"+ UnliftedFFITypesNeeded ->+ innerMsg $$ text "UnliftedFFITypes is required to marshal unlifted types"+ NotABoxedMarshalableTyCon -> innerMsg+ ForeignLabelNotAPtr ->+ innerMsg $$ text "A foreign-imported address (via &foo) must have type (Ptr a) or (FunPtr a)"+ NotSimpleUnliftedType ->+ innerMsg $$ text "foreign import prim only accepts simple unlifted types"+ NotBoxedKindAny ->+ text "Expected kind" <+> quotes (text "Type") <+> text "or" <+> quotes (text "UnliftedType") <> comma $$+ text "but" <+> quotes (ppr ty) <+> text "has kind" <+> quotes (ppr (typeKind ty))+ ForeignDynNotPtr expected ty ->+ vcat [ text "Expected: Ptr/FunPtr" <+> pprParendType expected <> comma, text " Actual:" <+> ppr ty ]+ SafeHaskellMustBeInIO ->+ text "Safe Haskell is on, all FFI imports must be in the IO monad"+ IOResultExpected ->+ text "IO result type expected"+ UnexpectedNestedForall ->+ text "Unexpected nested forall"+ LinearTypesNotAllowed ->+ text "Linear types are not supported in FFI declarations, see #18472"+ OneArgExpected ->+ text "One argument expected"+ AtLeastOneArgExpected ->+ text "At least one argument expected"+ TcRnInvalidCIdentifier target+ -> mkSimpleDecorated $+ sep [quotes (ppr target) <+> text "is not a valid C identifier"]+ TcRnExpectedValueId thing+ -> mkSimpleDecorated $+ ppr thing <+> text "used where a value identifier was expected"+ TcRnRecSelectorEscapedTyVar lbl+ -> mkSimpleDecorated $+ text "Cannot use record selector" <+> quotes (ppr lbl) <+>+ text "as a function due to escaped type variables"+ TcRnPatSynNotBidirectional name+ -> mkSimpleDecorated $+ text "non-bidirectional pattern synonym"+ <+> quotes (ppr name) <+> text "used in an expression"+ TcRnIllegalDerivingItem hs_ty+ -> mkSimpleDecorated $+ text "Illegal deriving item" <+> quotes (ppr hs_ty)+ TcRnUnexpectedAnnotation ty bang+ -> mkSimpleDecorated $+ let err = case bang of+ HsSrcBang _ SrcUnpack _ -> "UNPACK"+ HsSrcBang _ SrcNoUnpack _ -> "NOUNPACK"+ HsSrcBang _ NoSrcUnpack SrcLazy -> "laziness"+ HsSrcBang _ _ _ -> "strictness"+ in text "Unexpected" <+> text err <+> text "annotation:" <+> ppr ty $$+ text err <+> text "annotation cannot appear nested inside a type"+ TcRnIllegalRecordSyntax either_ty_ty+ -> mkSimpleDecorated $+ text "Record syntax is illegal here:" <+> either ppr ppr either_ty_ty+ TcRnInvalidVisibleKindArgument arg ty+ -> mkSimpleDecorated $+ text "Cannot apply function of kind" <+> quotes (ppr ty)+ $$ text "to visible kind argument" <+> quotes (ppr arg)+ TcRnTooManyBinders ki bndrs+ -> mkSimpleDecorated $+ hang (text "Not a function kind:")+ 4 (ppr ki) $$+ hang (text "but extra binders found:")+ 4 (fsep (map ppr bndrs))+ TcRnDifferentNamesForTyVar n1 n2+ -> mkSimpleDecorated $+ hang (text "Different names for the same type variable:") 2 info+ where+ info | nameOccName n1 /= nameOccName n2+ = quotes (ppr n1) <+> text "and" <+> quotes (ppr n2)+ | otherwise -- Same OccNames! See C2 in+ -- Note [Swizzling the tyvars before generaliseTcTyCon]+ = vcat [ quotes (ppr n1) <+> text "bound at" <+> ppr (getSrcLoc n1)+ , quotes (ppr n2) <+> text "bound at" <+> ppr (getSrcLoc n2) ]+ TcRnInvalidReturnKind data_sort allowed_kind kind _suggested_ext+ -> mkSimpleDecorated $+ sep [ ppDataSort data_sort <+>+ text "has non-" <>+ allowed_kind_tycon+ , (if is_data_family then text "and non-variable" else empty) <+>+ text "return kind" <+> quotes (ppr kind)+ ]+ where+ is_data_family =+ case data_sort of+ DataDeclSort{} -> False+ DataInstanceSort{} -> False+ DataFamilySort -> True+ allowed_kind_tycon =+ case allowed_kind of+ AnyTYPEKind -> ppr tYPETyCon+ AnyBoxedKind -> ppr boxedRepDataConTyCon+ LiftedKind -> ppr liftedTypeKind+ TcRnClassKindNotConstraint _kind+ -> mkSimpleDecorated $+ text "Kind signature on a class must end with" <+> ppr constraintKind $$+ text "unobscured by type families"+ TcRnUnpromotableThing name err+ -> mkSimpleDecorated $+ (hang (pprPECategory err <+> quotes (ppr name) <+> text "cannot be used here")+ 2 (parens reason))+ where+ reason = case err of+ ConstrainedDataConPE theta+ -> text "it has an unpromotable context"+ <+> quotes (pprTheta theta)++ FamDataConPE -> text "it comes from a data family instance"+ NoDataKindsDC -> text "perhaps you intended to use DataKinds"+ PatSynPE -> text "pattern synonyms cannot be promoted"+ RecDataConPE -> same_rec_group_msg+ ClassPE -> same_rec_group_msg+ TyConPE -> same_rec_group_msg+ TermVariablePE -> text "term variables cannot be promoted"+ TypeVariablePE -> text "type variables bound in a kind signature cannot be used in the type"+ same_rec_group_msg = text "it is defined and used in the same recursive group"+ TcRnMatchesHaveDiffNumArgs argsContext (MatchArgMatches match1 bad_matches)+ -> mkSimpleDecorated $+ (vcat [ pprMatchContextNouns argsContext <+>+ text "have different numbers of arguments"+ , nest 2 (ppr (getLocA match1))+ , nest 2 (ppr (getLocA (NE.head bad_matches)))])+ TcRnCannotBindScopedTyVarInPatSig sig_tvs+ -> mkSimpleDecorated $+ hang (text "You cannot bind scoped type variable"+ <> plural (NE.toList sig_tvs)+ <+> pprQuotedList (map fst $ NE.toList sig_tvs))+ 2 (text "in a pattern binding signature")+ TcRnCannotBindTyVarsInPatBind _offenders+ -> mkSimpleDecorated $+ text "Binding type variables is not allowed in pattern bindings"+ TcRnTooManyTyArgsInConPattern con_like expected_number actual_number+ -> mkSimpleDecorated $+ text "Too many type arguments in constructor pattern for" <+> quotes (ppr con_like) $$+ text "Expected no more than" <+> ppr expected_number <> semi <+> text "got" <+> ppr actual_number+ TcRnMultipleInlinePragmas poly_id fst_inl_prag inl_prags+ -> mkSimpleDecorated $+ hang (text "Multiple INLINE pragmas for" <+> ppr poly_id)+ 2 (vcat (text "Ignoring all but the first"+ : map pp_inl (fst_inl_prag : NE.toList inl_prags)))+ where+ pp_inl (L loc prag) = ppr prag <+> parens (ppr loc)+ TcRnUnexpectedPragmas poly_id bad_sigs+ -> mkSimpleDecorated $+ hang (text "Discarding unexpected pragmas for" <+> ppr poly_id)+ 2 (vcat (map (ppr . getLoc) $ NE.toList bad_sigs))+ TcRnNonOverloadedSpecialisePragma fun_name+ -> mkSimpleDecorated $+ text "SPECIALISE pragma for non-overloaded function"+ <+> quotes (ppr fun_name)+ TcRnSpecialiseNotVisible name+ -> mkSimpleDecorated $+ text "You cannot SPECIALISE" <+> quotes (ppr name)+ <+> text "because its definition is not visible in this module"+ TcRnPragmaWarning {pragma_warning_occ, pragma_warning_msg, pragma_warning_import_mod, pragma_warning_defined_mod}+ -> mkSimpleDecorated $+ sep [ sep [ text "In the use of"+ <+> pprNonVarNameSpace (occNameSpace pragma_warning_occ)+ <+> quotes (ppr pragma_warning_occ)+ , parens impMsg <> colon ]+ , pprWarningTxtForMsg pragma_warning_msg ]+ where+ impMsg = text "imported from" <+> ppr pragma_warning_import_mod <> extra+ extra = case pragma_warning_defined_mod of+ Just def_mod+ | def_mod /= pragma_warning_import_mod+ -> text ", but defined in" <+> ppr def_mod+ _ -> empty+ TcRnDifferentExportWarnings name locs+ -> mkSimpleDecorated $ vcat [quotes (ppr name) <+> text "exported with different error messages",+ text "at" <+> vcat (map ppr $ sortBy leftmost_smallest $ NE.toList locs)]+ TcRnIncompleteExportWarnings name locs+ -> mkSimpleDecorated $ vcat [quotes (ppr name) <+> text "will not have its export warned about",+ text "missing export warning at" <+> vcat (map ppr $ sortBy leftmost_smallest $ NE.toList locs)]+ TcRnIllegalHsigDefaultMethods name meths+ -> mkSimpleDecorated $+ text "Illegal default method" <> plural (NE.toList meths) <+> text "in class definition of" <+> ppr name <+> text "in hsig file"+ TcRnHsigFixityMismatch real_thing real_fixity sig_fixity+ ->+ let ppr_fix f = ppr f <+> if f == defaultFixity then parens (text "default") else empty+ in mkSimpleDecorated $+ vcat [ppr real_thing <+> text "has conflicting fixities in the module",+ text "and its hsig file",+ text "Main module:" <+> ppr_fix real_fixity,+ text "Hsig file:" <+> ppr_fix sig_fixity]+ TcRnHsigShapeMismatch (HsigShapeSortMismatch info1 info2)+ -> mkSimpleDecorated $+ text "While merging export lists, could not combine"+ <+> ppr info1 <+> text "with" <+> ppr info2+ <+> parens (text "one is a type, the other is a plain identifier")+ TcRnHsigShapeMismatch (HsigShapeNotUnifiable name1 name2 notHere)+ ->+ let extra = if notHere+ then text "Neither name variable originates from the current signature."+ else empty+ in mkSimpleDecorated $+ text "While merging export lists, could not unify"+ <+> ppr name1 <+> text "with" <+> ppr name2 $$ extra+ TcRnHsigMissingModuleExport occ unit_state impl_mod+ -> mkSimpleDecorated $+ quotes (ppr occ)+ <+> text "is exported by the hsig file, but not exported by the implementing module"+ <+> quotes (pprWithUnitState unit_state $ ppr impl_mod)+ TcRnBadGenericMethod clas op+ -> mkSimpleDecorated $+ hsep [text "Class", quotes (ppr clas),+ text "has a generic-default signature without a binding", quotes (ppr op)]+ TcRnWarningMinimalDefIncomplete mindef+ -> mkSimpleDecorated $+ vcat [ text "The MINIMAL pragma does not require:"+ , nest 2 (pprBooleanFormulaNice mindef)+ , text "but there is no default implementation." ]+ TcRnDefaultMethodForPragmaLacksBinding sel_id prag+ -> mkSimpleDecorated $+ text "The" <+> hsSigDoc prag <+> text "for default method"+ <+> quotes (ppr sel_id)+ <+> text "lacks an accompanying binding"+ TcRnIgnoreSpecialisePragmaOnDefMethod sel_name+ -> mkSimpleDecorated $+ text "Ignoring SPECIALISE pragmas on default method"+ <+> quotes (ppr sel_name)+ TcRnBadMethodErr{badMethodErrClassName, badMethodErrMethodName}+ -> mkSimpleDecorated $+ hsep [text "Class", quotes (ppr badMethodErrClassName),+ text "does not have a method", quotes (ppr badMethodErrMethodName)]+ TcRnIllegalTypeData+ -> mkSimpleDecorated $+ text "Illegal type-level data declaration"+ TcRnTypeDataForbids feature+ -> mkSimpleDecorated $+ ppr feature <+> text "are not allowed in type data declarations."++ TcRnIllegalNewtype con show_linear_types reason+ -> mkSimpleDecorated $+ vcat [msg, additional]+ where+ (msg,additional) =+ case reason of+ DoesNotHaveSingleField n_flds ->+ (sep [+ text "A newtype constructor must have exactly one field",+ nest 2 $+ text "but" <+> quotes (ppr con) <+> text "has" <+> speakN n_flds+ ],+ ppr con <+> dcolon <+> ppr (dataConDisplayType show_linear_types con))+ IsNonLinear ->+ (text "A newtype constructor must be linear",+ ppr con <+> dcolon <+> ppr (dataConDisplayType True con))+ IsGADT ->+ (text "A newtype must not be a GADT",+ ppr con <+> dcolon <+> pprWithExplicitKindsWhen sneaky_eq_spec+ (ppr $ dataConDisplayType show_linear_types con))+ HasConstructorContext ->+ (text "A newtype constructor must not have a context in its type",+ ppr con <+> dcolon <+> ppr (dataConDisplayType show_linear_types con))+ HasExistentialTyVar ->+ (text "A newtype constructor must not have existential type variables",+ ppr con <+> dcolon <+> ppr (dataConDisplayType show_linear_types con))+ HasStrictnessAnnotation ->+ (text "A newtype constructor must not have a strictness annotation", empty)++ -- Is the data con a "covert" GADT? See Note [isCovertGadtDataCon]+ -- in GHC.Core.DataCon+ sneaky_eq_spec = isCovertGadtDataCon con+ TcRnUnsatisfiedMinimalDef mindef+ -> mkSimpleDecorated $+ vcat [text "No explicit implementation for"+ ,nest 2 $ pprBooleanFormulaNice mindef+ ]+ TcRnMisplacedInstSig name hs_ty+ -> mkSimpleDecorated $+ vcat [ hang (text "Illegal type signature in instance declaration:")+ 2 (hang (pprPrefixName name)+ 2 (dcolon <+> ppr hs_ty))+ ]+ TcRnNoRebindableSyntaxRecordDot -> mkSimpleDecorated $+ text "RebindableSyntax is required if OverloadedRecordUpdate is enabled."+ TcRnNoFieldPunsRecordDot -> mkSimpleDecorated $+ text "For this to work enable NamedFieldPuns"+ TcRnIllegalStaticExpression e -> mkSimpleDecorated $+ text "Illegal static expression:" <+> ppr e+ TcRnListComprehensionDuplicateBinding n -> mkSimpleDecorated $+ (text "Duplicate binding in parallel list comprehension for:"+ <+> quotes (ppr n))+ TcRnEmptyStmtsGroup cause -> mkSimpleDecorated $ case cause of+ EmptyStmtsGroupInParallelComp ->+ text "Empty statement group in parallel comprehension"+ EmptyStmtsGroupInTransformListComp ->+ text "Empty statement group preceding 'group' or 'then'"+ EmptyStmtsGroupInDoNotation ctxt ->+ text "Empty" <+> pprHsDoFlavour ctxt+ EmptyStmtsGroupInArrowNotation ->+ text "Empty 'do' block in an arrow command"+ TcRnLastStmtNotExpr ctxt (UnexpectedStatement stmt) ->+ mkSimpleDecorated $ hang last_error 2 (ppr stmt)+ where+ last_error =+ text "The last statement in" <+> pprAStmtContext ctxt+ <+> text "must be an expression"+ TcRnUnexpectedStatementInContext ctxt (UnexpectedStatement stmt) _ -> mkSimpleDecorated $+ sep [ text "Unexpected" <+> pprStmtCat stmt <+> text "statement"+ , text "in" <+> pprAStmtContext ctxt ]+ TcRnIllegalTupleSection -> mkSimpleDecorated $+ text "Illegal tuple section"+ TcRnIllegalImplicitParameterBindings eBinds -> mkSimpleDecorated $+ either msg msg eBinds+ where+ msg binds = hang+ (text "Implicit-parameter bindings illegal in an mdo expression")+ 2 (ppr binds)+ TcRnSectionWithoutParentheses expr -> mkSimpleDecorated $+ hang (text "A section must be enclosed in parentheses")+ 2 (text "thus:" <+> (parens (ppr expr)))+ TcRnMissingRoleAnnotation name roles -> mkSimpleDecorated $+ hang (text "Missing role annotation" <> colon)+ 2 (text "type role" <+> ppr name <+> hsep (map ppr roles))++ TcRnCapturedTermName tv_name shadowed_term_names+ -> mkSimpleDecorated $+ text "The type variable" <+> quotes (ppr tv_name) <+>+ text "is implicitly quantified," $+$+ text "even though another variable of the same name is in scope:" $+$+ nest 2 var_names $+$+ text "This is not forward-compatible with a planned GHC extension, RequiredTypeArguments."+ where+ var_names = case shadowed_term_names of+ Left gbl_names -> vcat (map (\name -> quotes (ppr $ greName name) <+> pprNameProvenance name) gbl_names)+ Right lcl_name -> quotes (ppr lcl_name) <+> text "defined at"+ <+> ppr (nameSrcLoc lcl_name)+ TcRnBindingOfExistingName name -> mkSimpleDecorated $+ text "Illegal binding of an existing name:" <+> ppr (filterCTuple name)+ TcRnMultipleFixityDecls loc rdr_name -> mkSimpleDecorated $+ vcat [text "Multiple fixity declarations for" <+> quotes (ppr rdr_name),+ text "also at " <+> ppr loc]+ TcRnIllegalPatternSynonymDecl -> mkSimpleDecorated $+ text "Illegal pattern synonym declaration"+ TcRnIllegalClassBinding dsort bind -> mkSimpleDecorated $+ vcat [ what <+> text "not allowed in" <+> decl_sort+ , nest 2 (ppr bind) ]+ where+ decl_sort = case dsort of+ ClassDeclSort -> text "class declaration:"+ InstanceDeclSort -> text "instance declaration:"+ what = case bind of+ PatBind {} -> text "Pattern bindings (except simple variables)"+ PatSynBind {} -> text "Pattern synonyms"+ -- Associated pattern synonyms are not implemented yet+ _ -> pprPanic "rnMethodBind" (ppr bind)+ TcRnOrphanCompletePragma -> mkSimpleDecorated $+ text "Orphan COMPLETE pragmas not supported" $$+ text "A COMPLETE pragma must mention at least one data constructor" $$+ text "or pattern synonym defined in the same module."+ TcRnEmptyCase ctxt -> mkSimpleDecorated message+ where+ pp_ctxt = case ctxt of+ CaseAlt -> text "case expression"+ LamCaseAlt LamCase -> text "\\case expression"+ ArrowMatchCtxt (ArrowLamCaseAlt LamCase) -> text "\\case command"+ ArrowMatchCtxt ArrowCaseAlt -> text "case command"+ ArrowMatchCtxt KappaExpr -> text "kappa abstraction"+ _ -> text "(unexpected)"+ <+> pprMatchContextNoun ctxt++ message = case ctxt of+ LamCaseAlt LamCases -> lcases_msg <+> text "expression"+ ArrowMatchCtxt (ArrowLamCaseAlt LamCases) -> lcases_msg <+> text "command"+ _ -> text "Empty list of alternatives in" <+> pp_ctxt++ lcases_msg =+ text "Empty list of alternatives is not allowed in \\cases"+ TcRnNonStdGuards (NonStandardGuards guards) -> mkSimpleDecorated $+ text "accepting non-standard pattern guards" $$+ nest 4 (interpp'SP guards)+ TcRnDuplicateSigDecl pairs@((L _ name, sig) :| _) -> mkSimpleDecorated $+ vcat [ text "Duplicate" <+> what_it_is+ <> text "s for" <+> quotes (ppr name)+ , text "at" <+> vcat (map ppr $ sortBy leftmost_smallest+ $ map (getLocA . fst)+ $ NE.toList pairs)+ ]+ where+ what_it_is = hsSigDoc sig+ TcRnMisplacedSigDecl sig -> mkSimpleDecorated $+ sep [text "Misplaced" <+> hsSigDoc sig <> colon, ppr sig]+ TcRnUnexpectedDefaultSig sig -> mkSimpleDecorated $+ hang (text "Unexpected default signature:")+ 2 (ppr sig)+ TcRnDuplicateMinimalSig sig1 sig2 otherSigs -> mkSimpleDecorated $+ vcat [ text "Multiple minimal complete definitions"+ , text "at" <+> vcat (map ppr $ sortBy leftmost_smallest $ map getLocA sigs)+ , text "Combine alternative minimal complete definitions with `|'" ]+ where+ sigs = sig1 : sig2 : otherSigs+ TcRnLoopySuperclassSolve wtd_loc wtd_pty ->+ mkSimpleDecorated $ vcat [ header, warning, user_manual ]+ where+ header, warning, user_manual :: SDoc+ header+ = vcat [ text "I am solving the constraint" <+> quotes (ppr wtd_pty) <> comma+ , nest 2 $ pprCtOrigin (ctLocOrigin wtd_loc) <> comma+ , text "in a way that might turn out to loop at runtime." ]+ warning+ = vcat [ text "Starting from GHC 9.10, this warning will turn into an error." ]+ user_manual =+ vcat [ text "See the user manual, § Undecidable instances and loopy superclasses." ]+ TcRnUnexpectedStandaloneDerivingDecl -> mkSimpleDecorated $+ text "Illegal standalone deriving declaration"+ TcRnUnusedVariableInRuleDecl name var -> mkSimpleDecorated $+ sep [text "Rule" <+> doubleQuotes (ftext name) <> colon,+ text "Forall'd variable" <+> quotes (ppr var) <+>+ text "does not appear on left hand side"]+ TcRnUnexpectedStandaloneKindSig -> mkSimpleDecorated $+ text "Illegal standalone kind signature"+ TcRnIllegalRuleLhs errReason name lhs bad_e -> mkSimpleDecorated $+ sep [text "Rule" <+> pprRuleName name <> colon,+ nest 2 (vcat [err,+ text "in left-hand side:" <+> ppr lhs])]+ $$+ text "LHS must be of form (f e1 .. en) where f is not forall'd"+ where+ err = case errReason of+ UnboundVariable uv nis -> pprScopeError uv nis+ IllegalExpression -> text "Illegal expression:" <+> ppr bad_e+ TcRnDuplicateRoleAnnot list -> mkSimpleDecorated $+ hang (text "Duplicate role annotations for" <+>+ quotes (ppr $ roleAnnotDeclName first_decl) <> colon)+ 2 (vcat $ map pp_role_annot $ NE.toList sorted_list)+ where+ sorted_list = NE.sortBy cmp_loc list+ ((L _ first_decl) :| _) = sorted_list++ pp_role_annot (L loc decl) = hang (ppr decl)+ 4 (text "-- written at" <+> ppr (locA loc))++ cmp_loc = leftmost_smallest `on` getLocA+ TcRnDuplicateKindSig list -> mkSimpleDecorated $+ hang (text "Duplicate standalone kind signatures for" <+>+ quotes (ppr $ standaloneKindSigName first_decl) <> colon)+ 2 (vcat $ map pp_kisig $ NE.toList sorted_list)+ where+ sorted_list = NE.sortBy cmp_loc list+ ((L _ first_decl) :| _) = sorted_list++ pp_kisig (L loc decl) =+ hang (ppr decl) 4 (text "-- written at" <+> ppr (locA loc))++ cmp_loc = leftmost_smallest `on` getLocA+ TcRnIllegalDerivStrategy ds -> mkSimpleDecorated $+ text "Illegal deriving strategy" <> colon <+> derivStrategyName ds+ TcRnIllegalMultipleDerivClauses -> mkSimpleDecorated $+ text "Illegal use of multiple, consecutive deriving clauses"+ TcRnNoDerivStratSpecified{} -> mkSimpleDecorated $ text+ "No deriving strategy specified. Did you want stock, newtype, or anyclass?"+ TcRnStupidThetaInGadt{} -> mkSimpleDecorated $+ vcat [text "No context is allowed on a GADT-style data declaration",+ text "(You can put a context on each constructor, though.)"]+ TcRnShadowedTyVarNameInFamResult resName -> mkSimpleDecorated $+ hsep [ text "Type variable", quotes (ppr resName) <> comma+ , text "naming a type family result,"+ ] $$+ text "shadows an already bound type variable"+ TcRnIncorrectTyVarOnLhsOfInjCond resName injFrom -> mkSimpleDecorated $+ vcat [ text $ "Incorrect type variable on the LHS of "+ ++ "injectivity condition"+ , nest 5+ ( vcat [ text "Expected :" <+> ppr resName+ , text "Actual :" <+> ppr injFrom ])]+ TcRnUnknownTyVarsOnRhsOfInjCond errorVars -> mkSimpleDecorated $+ hsep [ text "Unknown type variable" <> plural errorVars+ , text "on the RHS of injectivity condition:"+ , interpp'SP errorVars ]+ TcRnBadlyStaged reason bind_lvl use_lvl+ -> mkSimpleDecorated $+ text "Stage error:" <+> pprStageCheckReason reason <+>+ hsep [text "is bound at stage" <+> ppr bind_lvl,+ text "but used at stage" <+> ppr use_lvl]+ TcRnStageRestriction reason+ -> mkSimpleDecorated $+ sep [ text "GHC stage restriction:"+ , nest 2 (vcat [ pprStageCheckReason reason <+>+ text "is used in a top-level splice, quasi-quote, or annotation,"+ , text "and must be imported, not defined locally"])]+ TcRnTyThingUsedWrong sort thing name+ -> mkSimpleDecorated $+ pprTyThingUsedWrong sort thing name+ TcRnCannotDefaultKindVar var knd ->+ mkSimpleDecorated $+ (vcat [ text "Cannot default kind variable" <+> quotes (ppr var)+ , text "of kind:" <+> ppr knd+ , text "Perhaps enable PolyKinds or add a kind signature" ])+ TcRnUninferrableTyVar tidied_tvs context ->+ mkSimpleDecorated $+ pprWithExplicitKindsWhen True $+ vcat [ text "Uninferrable type variable"+ <> plural tidied_tvs+ <+> pprWithCommas pprTyVar tidied_tvs+ <+> text "in"+ , pprUninferrableTyVarCtx context ]+ TcRnSkolemEscape escapees tv orig_ty ->+ mkSimpleDecorated $+ pprWithExplicitKindsWhen True $+ vcat [ sep [ text "Cannot generalise type; skolem" <> plural escapees+ , quotes $ pprTyVars escapees+ , text "would escape" <+> itsOrTheir escapees <+> text "scope"+ ]+ , sep [ text "if I tried to quantify"+ , pprTyVar tv+ , text "in this type:"+ ]+ , nest 2 (pprTidiedType orig_ty)+ , text "(Indeed, I sometimes struggle even printing this correctly,"+ , text " due to its ill-scoped nature.)"+ ]+ TcRnPatSynEscapedCoercion arg bad_co_ne -> mkSimpleDecorated $+ 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 = NE.toList bad_co_ne+ TcRnPatSynExistentialInResult name pat_ty bad_tvs -> mkSimpleDecorated $+ hang (sep [ text "The result type of the signature for" <+> quotes (ppr name) <> comma+ , text "namely" <+> quotes (ppr pat_ty) ])+ 2 (text "mentions existential type variable" <> plural bad_tvs+ <+> pprQuotedList bad_tvs)+ TcRnPatSynArityMismatch name decl_arity missing -> mkSimpleDecorated $+ hang (text "Pattern synonym" <+> quotes (ppr name) <+> text "has"+ <+> speakNOf decl_arity (text "argument"))+ 2 (text "but its type signature has" <+> int missing <+> text "fewer arrows")+ TcRnPatSynInvalidRhs ps_name lpat _ reason -> mkSimpleDecorated $+ vcat [ hang (text "Invalid right-hand side of bidirectional pattern synonym"+ <+> quotes (ppr ps_name) <> colon)+ 2 (pprPatSynInvalidRhsReason reason)+ , text "RHS pattern:" <+> ppr lpat ]+ TcRnTyFamDepsDisabled -> mkSimpleDecorated $+ text "Illegal injectivity annotation"+ TcRnAbstractClosedTyFamDecl -> mkSimpleDecorated $+ text "You may define an abstract closed type family" $$+ text "only in a .hs-boot file"+ TcRnPartialFieldSelector fld -> mkSimpleDecorated $+ sep [text "Use of partial record field selector" <> colon,+ nest 2 $ quotes (ppr (occName fld))]+ TcRnBadFieldAnnotation n con reason -> mkSimpleDecorated $+ hang (pprBadFieldAnnotationReason reason)+ 2 (text "on the" <+> speakNth n+ <+> text "argument of" <+> quotes (ppr con))+ TcRnSuperclassCycle (MkSuperclassCycle cls definite details) ->+ let herald | definite = text "Superclass cycle for"+ | otherwise = text "Potential superclass cycle for"+ in mkSimpleDecorated $+ vcat [ herald <+> quotes (ppr cls), nest 2 (vcat (pprSuperclassCycleDetail <$> details))]+ TcRnDefaultSigMismatch sel_id dm_ty -> mkSimpleDecorated $+ 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")+ TcRnTyFamsDisabled reason -> mkSimpleDecorated $+ text "Illegal family" <+> text sort <+> text "for" <+> quotes name+ where+ (sort, name) = case reason of+ TyFamsDisabledFamily n -> ("declaration", ppr n)+ TyFamsDisabledInstance n -> ("instance", ppr n)+ TcRnBadTyConTelescope tc -> mkSimpleDecorated $+ vcat [ hang (text "The kind of" <+> quotes (ppr tc) <+> text "is ill-scoped")+ 2 pp_tc_kind+ , extra+ , hang (text "Perhaps try this order instead:")+ 2 (pprTyVars sorted_tvs) ]+ where+ pp_tc_kind = text "Inferred kind:" <+> ppr tc <+> dcolon <+> ppr_untidy (tyConKind tc)+ ppr_untidy ty = pprIfaceType (toIfaceType ty)+ -- We need ppr_untidy here because pprType will tidy the type, which+ -- will turn the bogus kind we are trying to report+ -- T :: forall (a::k) k (b::k) -> blah+ -- into a misleadingly sanitised version+ -- T :: forall (a::k) k1 (b::k1) -> blah++ tcbs = tyConBinders tc+ tvs = binderVars tcbs+ sorted_tvs = scopedSort tvs++ inferred_tvs = [ binderVar tcb+ | tcb <- tcbs, Inferred == tyConBinderForAllTyFlag tcb ]+ specified_tvs = [ binderVar tcb+ | tcb <- tcbs, Specified == tyConBinderForAllTyFlag tcb ]++ extra+ | null inferred_tvs && null specified_tvs+ = empty+ | null inferred_tvs+ = hang (text "NB: Specified variables")+ 2 (sep [pp_spec, text "always come first"])+ | null specified_tvs+ = hang (text "NB: Inferred variables")+ 2 (sep [pp_inf, text "always come first"])+ | otherwise+ = hang (text "NB: Inferred variables")+ 2 (vcat [ sep [ pp_inf, text "always come first"]+ , sep [text "then Specified variables", pp_spec]])++ pp_inf = parens (text "namely:" <+> pprTyVars inferred_tvs)+ pp_spec = parens (text "namely:" <+> pprTyVars specified_tvs)+ TcRnTyFamResultDisabled tc_name tvb -> mkSimpleDecorated $+ text "Illegal result type variable" <+> ppr tvb <+> text "for" <+> quotes (ppr tc_name)+ TcRnRoleValidationFailed role reason -> mkSimpleDecorated $+ vcat [text "Internal error in role inference:",+ pprRoleValidationFailedReason role reason,+ text "Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug"]+ TcRnCommonFieldResultTypeMismatch con1 con2 field_name -> mkSimpleDecorated $+ 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"]+ TcRnCommonFieldTypeMismatch con1 con2 field_name -> mkSimpleDecorated $+ sep [text "Constructors" <+> ppr con1 <+> text "and" <+> ppr con2,+ text "give different types for field", quotes (ppr field_name)]+ TcRnClassExtensionDisabled cls reason -> mkSimpleDecorated $+ pprDisabledClassExtension cls reason+ TcRnDataConParentTypeMismatch data_con res_ty_tmpl -> mkSimpleDecorated $+ hang (text "Data constructor" <+> quotes (ppr data_con) <+>+ text "returns type" <+> quotes (ppr actual_res_ty))+ 2 (text "instead of an instance of its parent type" <+> quotes (ppr res_ty_tmpl))+ where+ actual_res_ty = dataConOrigResTy data_con+ TcRnGADTsDisabled tc_name -> mkSimpleDecorated $+ text "Illegal generalised algebraic data declaration for" <+> quotes (ppr tc_name)+ TcRnExistentialQuantificationDisabled con -> mkSimpleDecorated $+ sdocOption sdocLinearTypes (\show_linear_types ->+ hang (text "Data constructor" <+> quotes (ppr con) <+>+ text "has existential type variables, a context, or a specialised result type")+ 2 (ppr con <+> dcolon <+> ppr (dataConDisplayType show_linear_types con)))+ TcRnGADTDataContext tc_name -> mkSimpleDecorated $+ text "A data type declared in GADT style cannot have a context:" <+> quotes (ppr tc_name)+ TcRnMultipleConForNewtype tycon n -> mkSimpleDecorated $+ sep [text "A newtype must have exactly one constructor,",+ nest 2 $ text "but" <+> quotes (ppr tycon) <+> text "has" <+> speakN n]+ TcRnKindSignaturesDisabled thing -> mkSimpleDecorated $+ text "Illegal kind signature" <+> quotes (either ppr with_sig thing)+ where+ with_sig (tc_name, ksig) = ppr tc_name <+> dcolon <+> ppr ksig+ TcRnEmptyDataDeclsDisabled tycon -> mkSimpleDecorated $+ quotes (ppr tycon) <+> text "has no constructors"+ TcRnRoleMismatch var annot inferred -> mkSimpleDecorated $+ hang (text "Role mismatch on variable" <+> ppr var <> colon)+ 2 (sep [ text "Annotation says", ppr annot+ , text "but role", ppr inferred+ , text "is required" ])+ TcRnRoleCountMismatch tyvars d@(L _ (RoleAnnotDecl _ _ annots)) -> mkSimpleDecorated $+ hang (text "Wrong number of roles listed in role annotation;" $$+ text "Expected" <+> (ppr tyvars) <> comma <+>+ text "got" <+> (ppr $ length annots) <> colon)+ 2 (ppr d)+ TcRnIllegalRoleAnnotation (RoleAnnotDecl _ tycon _) -> mkSimpleDecorated $+ (text "Illegal role annotation for" <+> ppr tycon <> char ';' $$+ text "they are allowed only for datatypes and classes.")+ TcRnRoleAnnotationsDisabled tc -> mkSimpleDecorated $+ text "Illegal role annotation for" <+> ppr tc+ TcRnIncoherentRoles _ -> mkSimpleDecorated $+ (text "Roles other than" <+> quotes (text "nominal") <+>+ text "for class parameters can lead to incoherence.")+ TcRnBindVarAlreadyInScope tv_names_in_scope+ -> mkSimpleDecorated $+ vcat+ [ text "Type variable" <> plural tv_names_in_scope+ <+> hcat (punctuate (text ",") (map (quotes . ppr) tv_names_in_scope))+ <+> isOrAre tv_names_in_scope+ <+> text "already in scope."+ , text "Type applications in patterns must bind fresh variables, without shadowing."+ ]++ TcRnBindMultipleVariables ctx tv_name_w_loc+ -> mkSimpleDecorated $+ text "Variable" <+> text "`" <> ppr tv_name_w_loc <> text "'" <+> text "would be bound multiple times by" <+> pprHsDocContext ctx <> text "."++ TcRnUnexpectedKindVar tv_name+ -> mkSimpleDecorated $ text "Unexpected kind variable" <+> quotes (ppr tv_name)++ TcRnNegativeNumTypeLiteral tyLit+ -> mkSimpleDecorated $ text "Illegal literal in type (type literals must not be negative):" <+> ppr tyLit++ TcRnIllegalKind ty_thing _+ -> mkSimpleDecorated $ text "Illegal kind:" <+> (ppr ty_thing)++ TcRnPrecedenceParsingError op1 op2+ -> mkSimpleDecorated $+ hang (text "Precedence parsing error")+ 4 (hsep [text "cannot mix", ppr_opfix op1, text "and",+ ppr_opfix op2,+ text "in the same infix expression"])++ TcRnSectionPrecedenceError op arg_op section+ -> mkSimpleDecorated $+ vcat [text "The operator" <+> ppr_opfix op <+> text "of a section",+ nest 4 (sep [text "must have lower precedence than that of the operand,",+ nest 2 (text "namely" <+> ppr_opfix arg_op)]),+ nest 4 (text "in the section:" <+> quotes (ppr section))]++ TcRnUnexpectedPatSigType ty+ -> mkSimpleDecorated $+ hang (text "Illegal type signature:" <+> quotes (ppr ty))+ 2 (text "Type signatures are only allowed in patterns with ScopedTypeVariables")++ TcRnIllegalKindSignature ty+ -> mkSimpleDecorated $ text "Illegal kind signature:" <+> quotes (ppr ty)++ TcRnUnusedQuantifiedTypeVar doc tyVar+ -> mkSimpleDecorated $+ vcat [ text "Unused quantified type variable" <+> quotes (ppr tyVar)+ , inHsDocContext doc ]++ TcRnDataKindsError typeOrKind thing+ -> mkSimpleDecorated $+ text "Illegal" <+> (text $ levelString typeOrKind) <> colon <+> quotes (ppr thing)++ TcRnTypeSynonymCycle decl_or_tcs+ -> mkSimpleDecorated $+ sep [ text "Cycle in type synonym declarations:"+ , nest 2 (vcat (map ppr_decl decl_or_tcs)) ]+ where+ ppr_decl = \case+ Right (L loc decl) -> ppr (locA loc) <> colon <+> ppr decl+ Left tc ->+ let n = tyConName tc+ in ppr (getSrcSpan n) <> colon <+> ppr (tyConName tc)+ <+> text "from external module"+ TcRnZonkerMessage err+ -> mkSimpleDecorated $ pprZonkerMessage err+ TcRnInterfaceError reason+ -> diagnosticMessage (tcOptsIfaceOpts opts) reason+ TcRnSelfImport imp_mod_name+ -> mkSimpleDecorated $+ text "A module cannot import itself:" <+> ppr imp_mod_name+ TcRnNoExplicitImportList mod+ -> mkSimpleDecorated $+ text "The module" <+> quotes (ppr mod) <+> text "does not have an explicit import list"+ TcRnSafeImportsDisabled _+ -> mkSimpleDecorated $+ text "safe import can't be used as Safe Haskell isn't on!"+ TcRnDeprecatedModule mod txt+ -> mkSimpleDecorated $+ sep [ text "Module" <+> quotes (ppr mod) <> text extra <> colon,+ nest 2 (vcat (map (ppr . hsDocString . unLoc) msg)) ]+ where+ (extra, msg) = case txt of+ WarningTxt _ _ msg -> ("", msg)+ DeprecatedTxt _ msg -> (" is deprecated", msg)+ TcRnCompatUnqualifiedImport decl+ -> mkSimpleDecorated $+ vcat+ [ text "To ensure compatibility with future core libraries changes"+ , text "imports to" <+> ppr (ideclName decl) <+> text "should be"+ , text "either qualified or have an explicit import list."+ ]+ TcRnRedundantSourceImport mod_name+ -> mkSimpleDecorated $+ text "Unnecessary {-# SOURCE #-} in the import of module" <+> quotes (ppr mod_name)+ TcRnImportLookup reason+ -> mkSimpleDecorated $+ pprImportLookup reason+ TcRnUnusedImport decl reason+ -> mkSimpleDecorated $+ pprUnusedImport decl reason+ TcRnDuplicateDecls name sorted_names+ -> mkSimpleDecorated $+ vcat [text "Multiple declarations of" <+>+ quotes (ppr name),+ -- NB. print the OccName, not the Name, because the+ -- latter might not be in scope in the RdrEnv and so will+ -- be printed qualified.+ text "Declared at:" <+>+ vcat (NE.toList $ ppr . nameSrcLoc <$> sorted_names)]+ TcRnPackageImportsDisabled+ -> mkSimpleDecorated $+ text "Package-qualified imports are not enabled"+ TcRnIllegalDataCon name+ -> mkSimpleDecorated $+ hsep [text "Illegal data constructor name", quotes (ppr name)]+ TcRnNestedForallsContexts entity+ -> mkSimpleDecorated $+ what <+> text "cannot contain nested"+ <+> quotes forAllLit <> text "s or contexts"+ where+ what = case entity of+ NFC_Specialize -> text "SPECIALISE instance type"+ NFC_ViaType -> quotes (text "via") <+> text "type"+ NFC_GadtConSig -> text "GADT constructor type signature"+ NFC_InstanceHead -> text "Instance head"+ NFC_StandaloneDerivedInstanceHead -> text "Standalone-derived instance head"+ NFC_DerivedClassType -> text "Derived class type"+ TcRnRedundantRecordWildcard+ -> mkSimpleDecorated $+ text "Record wildcard does not bind any new variables"+ TcRnUnusedRecordWildcard _+ -> mkSimpleDecorated $+ text "No variables bound in the record wildcard match are used"+ TcRnUnusedName name reason+ -> mkSimpleDecorated $+ pprUnusedName name reason+ TcRnQualifiedBinder rdr_name+ -> mkSimpleDecorated $+ text "Qualified name in binding position:" <+> ppr rdr_name+ TcRnTypeApplicationsDisabled ty_app+ -> mkSimpleDecorated $+ text "Illegal visible" <+> what <+> text "application" <+> ctx <> colon+ <+> ppr arg+ where+ arg = case ty_app of+ TypeApplication ty _ -> char '@' <> ppr ty+ TypeApplicationInPattern ty_app -> ppr ty_app+ what = case ty_app of+ TypeApplication _ ty_or_ki ->+ case ty_or_ki of+ TypeLevel -> text "type"+ KindLevel -> text "kind"+ TypeApplicationInPattern _ -> text "type"+ ctx = case ty_app of+ TypeApplicationInPattern _ -> text "in a pattern"+ _ -> empty+ TcRnInvalidRecordField con field+ -> mkSimpleDecorated $+ hsep [text "Constructor" <+> quotes (ppr con),+ text "does not have field", quotes (ppr field)]+ TcRnTupleTooLarge tup_size+ -> mkSimpleDecorated $+ sep [text "A" <+> int tup_size <> text "-tuple is too large for GHC",+ nest 2 (parens (text "max size is" <+> int mAX_TUPLE_SIZE)),+ nest 2 (text "Workaround: use nested tuples or define a data type")]+ TcRnCTupleTooLarge tup_size+ -> mkSimpleDecorated $+ hang (text "Constraint tuple arity too large:" <+> int tup_size+ <+> parens (text "max arity =" <+> int mAX_CTUPLE_SIZE))+ 2 (text "Instead, use a nested tuple")+ TcRnIllegalInferredTyVars _+ -> mkSimpleDecorated $+ text "Inferred type variables are not allowed"+ TcRnAmbiguousName gre_env name gres+ -> mkSimpleDecorated $+ vcat [ text "Ambiguous occurrence" <+> quotes (ppr name) <> dot+ , text "It could refer to"+ , nest 3 (vcat msgs) ]+ where+ np1 NE.:| nps = gres+ msgs = punctuateFinal comma dot $+ text "either" <+> ppr_gre np1+ : [text " or" <+> ppr_gre np | np <- nps]++ ppr_gre gre = pprAmbiguousGreName gre_env gre++ TcRnBindingNameConflict name locs+ -> mkSimpleDecorated $+ vcat [text "Conflicting definitions for" <+> quotes (ppr name),+ locations]+ where+ locations =+ text "Bound at:"+ <+> vcat (map ppr (sortBy leftmost_smallest (NE.toList locs)))+ TcRnNonCanonicalDefinition reason inst_ty+ -> mkSimpleDecorated $+ pprNonCanonicalDefinition inst_ty reason+ TcRnImplicitImportOfPrelude+ -> mkSimpleDecorated $+ text "Module" <+> quotes (text "Prelude") <+> text "implicitly imported."+ TcRnMissingMain explicit_export_list main_mod main_occ+ -> mkSimpleDecorated $+ text "The" <+> ppMainFn main_occ+ <+> text "is not" <+> defOrExp <+> text "module"+ <+> quotes (ppr main_mod)+ where+ defOrExp :: SDoc+ defOrExp | explicit_export_list = text "exported by"+ | otherwise = text "defined in"+ TcRnGhciUnliftedBind id+ -> mkSimpleDecorated $+ sep [ text "GHCi can't bind a variable of unlifted type:"+ , nest 2 (pprPrefixOcc id <+> dcolon <+> ppr (idType id)) ]+ TcRnGhciMonadLookupFail ty lookups+ -> mkSimpleDecorated $+ hang (text "Can't find type" <+> pp_ty <> dot $$ ambig_msg)+ 2 (text "When checking that" <+> pp_ty <>+ text "is a monad that can execute GHCi statements.")+ where+ pp_ty = quotes (text ty)+ ambig_msg = case lookups of+ Just (_:_:_) -> text "The type is ambiguous."+ _ -> empty+ TcRnIllegalQuasiQuotes -> mkSimpleDecorated $+ text "Quasi-quotes are not permitted without QuasiQuotes"+ TcRnTHError err -> pprTHError err+ TcRnPatersonCondFailure reason ctxt lhs rhs ->+ mkSimpleDecorated $ pprPatersonCondFailure reason ctxt lhs rhs+ TcRnIllegalInvisTyVarBndr bndr ->+ mkSimpleDecorated $+ hang (text "Illegal invisible type variable binder:")+ 2 (ppr bndr)++ TcRnInvalidInvisTyVarBndr name hs_bndr ->+ mkSimpleDecorated $+ vcat [ hang (text "Invalid invisible type variable binder:")+ 2 (ppr hs_bndr)+ , text "There is no matching forall-bound variable"+ , text "in the standalone kind signature for" <+> quotes (ppr name) <> dot+ , text "NB." <+> vcat [+ text "Only" <+> quotes (text "forall a.") <+> text "-quantification matches invisible binders,",+ text "whereas" <+> quotes (text "forall {a}.") <+> text "and" <+> quotes (text "forall a ->") <+> text "do not."+ ]]++ TcRnDeprecatedInvisTyArgInConPat ->+ mkSimpleDecorated $+ cat [ text "Type applications in constructor patterns will require"+ , text "the TypeAbstractions extension starting from GHC 9.12." ]++ TcRnInvisBndrWithoutSig _ hs_bndr ->+ mkSimpleDecorated $+ vcat [ hang (text "Invalid invisible type variable binder:")+ 2 (ppr hs_bndr)+ , text "Either a standalone kind signature (SAKS)"+ , text "or a complete user-supplied kind (CUSK, legacy feature)"+ , text "is required to use invisible binders." ]++ TcRnImplicitRhsQuantification kv -> mkSimpleDecorated $+ vcat [ text "The variable" <+> quotes (ppr kv) <+> text "occurs free on the RHS of the type declaration"+ , text "In the future GHC will no longer implicitly quantify over such variables"+ ]++ diagnosticReason = \case+ TcRnUnknownMessage m+ -> diagnosticReason m+ TcRnMessageWithInfo _ msg_with_info+ -> case msg_with_info of+ TcRnMessageDetailed _ m -> diagnosticReason m+ TcRnWithHsDocContext _ msg+ -> diagnosticReason msg+ TcRnSolverReport _ reason _+ -> reason -- Error, or a Warning if we are deferring type errors+ TcRnSolverDepthError {}+ -> ErrorWithoutFlag+ TcRnRedundantConstraints {}+ -> WarningWithFlag Opt_WarnRedundantConstraints+ TcRnInaccessibleCode {}+ -> WarningWithFlag Opt_WarnInaccessibleCode+ TcRnInaccessibleCoAxBranch {}+ -> WarningWithFlag Opt_WarnInaccessibleCode+ TcRnTypeDoesNotHaveFixedRuntimeRep{}+ -> ErrorWithoutFlag+ TcRnImplicitLift{}+ -> WarningWithFlag Opt_WarnImplicitLift+ TcRnUnusedPatternBinds{}+ -> WarningWithFlag Opt_WarnUnusedPatternBinds+ TcRnDodgyImports{}+ -> WarningWithFlag Opt_WarnDodgyImports+ TcRnDodgyExports{}+ -> WarningWithFlag Opt_WarnDodgyExports+ TcRnMissingImportList{}+ -> WarningWithFlag Opt_WarnMissingImportList+ TcRnUnsafeDueToPlugin{}+ -> WarningWithoutFlag+ TcRnModMissingRealSrcSpan{}+ -> ErrorWithoutFlag+ TcRnIdNotExportedFromModuleSig{}+ -> ErrorWithoutFlag+ TcRnIdNotExportedFromLocalSig{}+ -> ErrorWithoutFlag+ TcRnShadowedName{}+ -> WarningWithFlag Opt_WarnNameShadowing+ TcRnInvalidWarningCategory{}+ -> ErrorWithoutFlag+ TcRnDuplicateWarningDecls{}+ -> ErrorWithoutFlag+ TcRnSimplifierTooManyIterations{}+ -> ErrorWithoutFlag+ TcRnIllegalPatSynDecl{}+ -> ErrorWithoutFlag+ TcRnLinearPatSyn{}+ -> ErrorWithoutFlag+ TcRnEmptyRecordUpdate+ -> ErrorWithoutFlag+ TcRnIllegalFieldPunning{}+ -> ErrorWithoutFlag+ TcRnIllegalWildcardsInRecord{}+ -> ErrorWithoutFlag+ TcRnIllegalWildcardInType{}+ -> ErrorWithoutFlag+ TcRnDuplicateFieldName{}+ -> ErrorWithoutFlag+ TcRnIllegalViewPattern{}+ -> ErrorWithoutFlag+ TcRnCharLiteralOutOfRange{}+ -> ErrorWithoutFlag+ TcRnIllegalWildcardsInConstructor{}+ -> ErrorWithoutFlag+ TcRnIgnoringAnnotations{}+ -> WarningWithoutFlag+ TcRnAnnotationInSafeHaskell+ -> ErrorWithoutFlag+ TcRnInvalidTypeApplication{}+ -> ErrorWithoutFlag+ TcRnTagToEnumMissingValArg+ -> ErrorWithoutFlag+ TcRnTagToEnumUnspecifiedResTy{}+ -> ErrorWithoutFlag+ TcRnTagToEnumResTyNotAnEnum{}+ -> ErrorWithoutFlag+ TcRnTagToEnumResTyTypeData{}+ -> ErrorWithoutFlag+ TcRnArrowIfThenElsePredDependsOnResultTy+ -> ErrorWithoutFlag+ TcRnIllegalHsBootOrSigDecl {}+ -> ErrorWithoutFlag+ TcRnBootMismatch {}+ -> ErrorWithoutFlag+ TcRnRecursivePatternSynonym{}+ -> ErrorWithoutFlag+ TcRnPartialTypeSigTyVarMismatch{}+ -> ErrorWithoutFlag+ TcRnPartialTypeSigBadQuantifier{}+ -> ErrorWithoutFlag+ TcRnMissingSignature what exported+ -> WarningWithFlags $ missingSignatureWarningFlags what exported+ TcRnPolymorphicBinderMissingSig{}+ -> WarningWithFlag Opt_WarnMissingLocalSignatures+ TcRnOverloadedSig{}+ -> ErrorWithoutFlag+ TcRnTupleConstraintInst{}+ -> ErrorWithoutFlag+ TcRnUserTypeError{}+ -> ErrorWithoutFlag+ TcRnConstraintInKind{}+ -> ErrorWithoutFlag+ TcRnUnboxedTupleOrSumTypeFuncArg{}+ -> ErrorWithoutFlag+ TcRnLinearFuncInKind{}+ -> ErrorWithoutFlag+ TcRnForAllEscapeError{}+ -> ErrorWithoutFlag+ TcRnSimplifiableConstraint{}+ -> WarningWithFlag Opt_WarnSimplifiableClassConstraints+ TcRnArityMismatch{}+ -> ErrorWithoutFlag+ TcRnIllegalInstance rea+ -> illegalInstanceReason rea+ TcRnVDQInTermType{}+ -> ErrorWithoutFlag+ TcRnBadQuantPredHead{}+ -> ErrorWithoutFlag+ TcRnIllegalTupleConstraint{}+ -> ErrorWithoutFlag+ TcRnNonTypeVarArgInConstraint{}+ -> ErrorWithoutFlag+ TcRnIllegalImplicitParam{}+ -> ErrorWithoutFlag+ TcRnIllegalConstraintSynonymOfKind{}+ -> ErrorWithoutFlag+ TcRnOversaturatedVisibleKindArg{}+ -> ErrorWithoutFlag+ TcRnForAllRankErr{}+ -> ErrorWithoutFlag+ TcRnMonomorphicBindings{}+ -> WarningWithFlag Opt_WarnMonomorphism+ TcRnOrphanInstance{}+ -> WarningWithFlag Opt_WarnOrphans+ TcRnFunDepConflict{}+ -> ErrorWithoutFlag+ TcRnDupInstanceDecls{}+ -> ErrorWithoutFlag+ TcRnConflictingFamInstDecls{}+ -> ErrorWithoutFlag+ TcRnFamInstNotInjective{}+ -> ErrorWithoutFlag+ TcRnBangOnUnliftedType{}+ -> WarningWithFlag Opt_WarnRedundantStrictnessFlags+ TcRnLazyBangOnUnliftedType{}+ -> WarningWithFlag Opt_WarnRedundantStrictnessFlags+ TcRnMultipleDefaultDeclarations{}+ -> ErrorWithoutFlag+ TcRnBadDefaultType{}+ -> ErrorWithoutFlag+ TcRnPatSynBundledWithNonDataCon{}+ -> ErrorWithoutFlag+ TcRnPatSynBundledWithWrongType{}+ -> ErrorWithoutFlag+ TcRnDupeModuleExport{}+ -> WarningWithFlag Opt_WarnDuplicateExports+ TcRnExportedModNotImported{}+ -> ErrorWithoutFlag+ TcRnNullExportedModule{}+ -> WarningWithFlag Opt_WarnDodgyExports+ TcRnMissingExportList{}+ -> WarningWithFlag Opt_WarnMissingExportList+ TcRnExportHiddenComponents{}+ -> ErrorWithoutFlag+ TcRnDuplicateExport{}+ -> WarningWithFlag Opt_WarnDuplicateExports+ TcRnExportedParentChildMismatch{}+ -> ErrorWithoutFlag+ TcRnConflictingExports{}+ -> ErrorWithoutFlag+ TcRnDuplicateFieldExport {}+ -> ErrorWithoutFlag+ TcRnAmbiguousFieldInUpdate {}+ -> ErrorWithoutFlag+ TcRnAmbiguousRecordUpdate{}+ -> WarningWithFlag Opt_WarnAmbiguousFields+ TcRnMissingFields{}+ -> WarningWithFlag Opt_WarnMissingFields+ TcRnFieldUpdateInvalidType{}+ -> ErrorWithoutFlag+ TcRnMissingStrictFields{}+ -> ErrorWithoutFlag+ TcRnBadRecordUpdate{}+ -> ErrorWithoutFlag+ TcRnIllegalStaticExpression {}+ -> ErrorWithoutFlag+ TcRnStaticFormNotClosed{}+ -> ErrorWithoutFlag+ TcRnUselessTypeable+ -> WarningWithFlag Opt_WarnDerivingTypeable+ TcRnDerivingDefaults{}+ -> WarningWithFlag Opt_WarnDerivingDefaults+ TcRnNonUnaryTypeclassConstraint{}+ -> ErrorWithoutFlag+ TcRnPartialTypeSignatures{}+ -> WarningWithFlag Opt_WarnPartialTypeSignatures+ TcRnCannotDeriveInstance _ _ _ _ rea+ -> case rea of+ DerivErrNotWellKinded{} -> ErrorWithoutFlag+ DerivErrSafeHaskellGenericInst -> ErrorWithoutFlag+ DerivErrDerivingViaWrongKind{} -> ErrorWithoutFlag+ DerivErrNoEtaReduce{} -> ErrorWithoutFlag+ DerivErrBootFileFound -> ErrorWithoutFlag+ DerivErrDataConsNotAllInScope{} -> ErrorWithoutFlag+ DerivErrGNDUsedOnData -> ErrorWithoutFlag+ DerivErrNullaryClasses -> ErrorWithoutFlag+ DerivErrLastArgMustBeApp -> ErrorWithoutFlag+ DerivErrNoFamilyInstance{} -> ErrorWithoutFlag+ DerivErrNotStockDeriveable{} -> ErrorWithoutFlag+ DerivErrHasAssociatedDatatypes{} -> ErrorWithoutFlag+ DerivErrNewtypeNonDeriveableClass -> ErrorWithoutFlag+ DerivErrCannotEtaReduceEnough{} -> ErrorWithoutFlag+ DerivErrOnlyAnyClassDeriveable{} -> ErrorWithoutFlag+ DerivErrNotDeriveable{} -> ErrorWithoutFlag+ DerivErrNotAClass{} -> ErrorWithoutFlag+ DerivErrNoConstructors{} -> ErrorWithoutFlag+ DerivErrLangExtRequired{} -> ErrorWithoutFlag+ DerivErrDunnoHowToDeriveForType{} -> ErrorWithoutFlag+ DerivErrMustBeEnumType{} -> ErrorWithoutFlag+ DerivErrMustHaveExactlyOneConstructor{} -> ErrorWithoutFlag+ DerivErrMustHaveSomeParameters{} -> ErrorWithoutFlag+ DerivErrMustNotHaveClassContext{} -> ErrorWithoutFlag+ DerivErrBadConstructor{} -> ErrorWithoutFlag+ DerivErrGenerics{} -> ErrorWithoutFlag+ DerivErrEnumOrProduct{} -> ErrorWithoutFlag+ TcRnLookupInstance _ _ _+ -> ErrorWithoutFlag+ TcRnLazyGADTPattern+ -> ErrorWithoutFlag+ TcRnArrowProcGADTPattern+ -> ErrorWithoutFlag+ TcRnForallIdentifier {}+ -> WarningWithFlag Opt_WarnForallIdentifier+ TcRnTypeEqualityOutOfScope+ -> WarningWithFlag Opt_WarnTypeEqualityOutOfScope+ TcRnTypeEqualityRequiresOperators+ -> WarningWithFlag Opt_WarnTypeEqualityRequiresOperators+ TcRnIllegalTypeOperator {}+ -> ErrorWithoutFlag+ TcRnIllegalTypeOperatorDecl {}+ -> ErrorWithoutFlag+ TcRnGADTMonoLocalBinds {}+ -> WarningWithFlag Opt_WarnGADTMonoLocalBinds+ TcRnIncorrectNameSpace {}+ -> ErrorWithoutFlag+ TcRnNotInScope {}+ -> ErrorWithoutFlag+ TcRnTermNameInType {}+ -> ErrorWithoutFlag+ TcRnUntickedPromotedThing {}+ -> WarningWithFlag Opt_WarnUntickedPromotedConstructors+ TcRnIllegalBuiltinSyntax {}+ -> ErrorWithoutFlag+ TcRnWarnDefaulting {}+ -> WarningWithFlag Opt_WarnTypeDefaults+ TcRnForeignImportPrimExtNotSet{}+ -> ErrorWithoutFlag+ TcRnForeignImportPrimSafeAnn{}+ -> ErrorWithoutFlag+ TcRnForeignFunctionImportAsValue{}+ -> ErrorWithoutFlag+ TcRnFunPtrImportWithoutAmpersand{}+ -> WarningWithFlag Opt_WarnDodgyForeignImports+ TcRnIllegalForeignDeclBackend{}+ -> ErrorWithoutFlag+ TcRnUnsupportedCallConv _ unsupportedCC+ -> case unsupportedCC of+ StdCallConvUnsupported -> WarningWithFlag Opt_WarnUnsupportedCallingConventions+ _ -> ErrorWithoutFlag+ TcRnIllegalForeignType{}+ -> ErrorWithoutFlag+ TcRnInvalidCIdentifier{}+ -> ErrorWithoutFlag+ TcRnExpectedValueId{}+ -> ErrorWithoutFlag+ TcRnRecSelectorEscapedTyVar{}+ -> ErrorWithoutFlag+ TcRnPatSynNotBidirectional{}+ -> ErrorWithoutFlag+ TcRnIllegalDerivingItem{}+ -> ErrorWithoutFlag+ TcRnUnexpectedAnnotation{}+ -> ErrorWithoutFlag+ TcRnIllegalRecordSyntax{}+ -> ErrorWithoutFlag+ TcRnInvalidVisibleKindArgument{}+ -> ErrorWithoutFlag+ TcRnTooManyBinders{}+ -> ErrorWithoutFlag+ TcRnDifferentNamesForTyVar{}+ -> ErrorWithoutFlag+ TcRnInvalidReturnKind{}+ -> ErrorWithoutFlag+ TcRnClassKindNotConstraint{}+ -> ErrorWithoutFlag+ TcRnUnpromotableThing{}+ -> ErrorWithoutFlag+ TcRnMatchesHaveDiffNumArgs{}+ -> ErrorWithoutFlag+ TcRnCannotBindScopedTyVarInPatSig{}+ -> ErrorWithoutFlag+ TcRnCannotBindTyVarsInPatBind{}+ -> ErrorWithoutFlag+ TcRnTooManyTyArgsInConPattern{}+ -> ErrorWithoutFlag+ TcRnMultipleInlinePragmas{}+ -> WarningWithoutFlag+ TcRnUnexpectedPragmas{}+ -> WarningWithoutFlag+ TcRnNonOverloadedSpecialisePragma{}+ -> WarningWithoutFlag+ TcRnSpecialiseNotVisible{}+ -> WarningWithoutFlag+ TcRnPragmaWarning{pragma_warning_msg}+ -> WarningWithCategory (warningTxtCategory pragma_warning_msg)+ TcRnDifferentExportWarnings _ _+ -> ErrorWithoutFlag+ TcRnIncompleteExportWarnings _ _+ -> WarningWithFlag Opt_WarnIncompleteExportWarnings+ TcRnIllegalHsigDefaultMethods{}+ -> ErrorWithoutFlag+ TcRnHsigFixityMismatch{}+ -> ErrorWithoutFlag+ TcRnHsigShapeMismatch{}+ -> ErrorWithoutFlag+ TcRnHsigMissingModuleExport{}+ -> ErrorWithoutFlag+ TcRnBadGenericMethod{}+ -> ErrorWithoutFlag+ TcRnWarningMinimalDefIncomplete{}+ -> WarningWithoutFlag+ TcRnDefaultMethodForPragmaLacksBinding{}+ -> ErrorWithoutFlag+ TcRnIgnoreSpecialisePragmaOnDefMethod{}+ -> WarningWithoutFlag+ TcRnBadMethodErr{}+ -> ErrorWithoutFlag+ TcRnIllegalTypeData+ -> ErrorWithoutFlag+ TcRnIllegalQuasiQuotes{}+ -> ErrorWithoutFlag+ TcRnTHError err+ -> thErrorReason err+ TcRnTypeDataForbids{}+ -> ErrorWithoutFlag+ TcRnIllegalNewtype{}+ -> ErrorWithoutFlag+ TcRnUnsatisfiedMinimalDef{}+ -> WarningWithFlag (Opt_WarnMissingMethods)+ TcRnMisplacedInstSig{}+ -> ErrorWithoutFlag+ TcRnNoRebindableSyntaxRecordDot{}+ -> ErrorWithoutFlag+ TcRnNoFieldPunsRecordDot{}+ -> ErrorWithoutFlag+ TcRnListComprehensionDuplicateBinding{}+ -> ErrorWithoutFlag+ TcRnEmptyStmtsGroup{}+ -> ErrorWithoutFlag+ TcRnLastStmtNotExpr{}+ -> ErrorWithoutFlag+ TcRnUnexpectedStatementInContext{}+ -> ErrorWithoutFlag+ TcRnSectionWithoutParentheses{}+ -> ErrorWithoutFlag+ TcRnIllegalImplicitParameterBindings{}+ -> ErrorWithoutFlag+ TcRnIllegalTupleSection{}+ -> ErrorWithoutFlag+ TcRnCapturedTermName{}+ -> WarningWithFlag Opt_WarnTermVariableCapture+ TcRnBindingOfExistingName{}+ -> ErrorWithoutFlag+ TcRnMultipleFixityDecls{}+ -> ErrorWithoutFlag+ TcRnIllegalPatternSynonymDecl{}+ -> ErrorWithoutFlag+ TcRnIllegalClassBinding{}+ -> ErrorWithoutFlag+ TcRnOrphanCompletePragma{}+ -> ErrorWithoutFlag+ TcRnEmptyCase{}+ -> ErrorWithoutFlag+ TcRnNonStdGuards{}+ -> WarningWithoutFlag+ TcRnDuplicateSigDecl{}+ -> ErrorWithoutFlag+ TcRnMisplacedSigDecl{}+ -> ErrorWithoutFlag+ TcRnUnexpectedDefaultSig{}+ -> ErrorWithoutFlag+ TcRnDuplicateMinimalSig{}+ -> ErrorWithoutFlag+ TcRnLoopySuperclassSolve{}+ -> WarningWithFlag Opt_WarnLoopySuperclassSolve+ TcRnUnexpectedStandaloneDerivingDecl{}+ -> ErrorWithoutFlag+ TcRnUnusedVariableInRuleDecl{}+ -> ErrorWithoutFlag+ TcRnUnexpectedStandaloneKindSig{}+ -> ErrorWithoutFlag+ TcRnIllegalRuleLhs{}+ -> ErrorWithoutFlag+ TcRnDuplicateRoleAnnot{}+ -> ErrorWithoutFlag+ TcRnDuplicateKindSig{}+ -> ErrorWithoutFlag+ TcRnIllegalDerivStrategy{}+ -> ErrorWithoutFlag+ TcRnIllegalMultipleDerivClauses{}+ -> ErrorWithoutFlag+ TcRnNoDerivStratSpecified{}+ -> WarningWithFlag Opt_WarnMissingDerivingStrategies+ TcRnStupidThetaInGadt{}+ -> ErrorWithoutFlag+ TcRnShadowedTyVarNameInFamResult{}+ -> ErrorWithoutFlag+ TcRnIncorrectTyVarOnLhsOfInjCond{}+ -> ErrorWithoutFlag+ TcRnUnknownTyVarsOnRhsOfInjCond{}+ -> ErrorWithoutFlag+ TcRnBadlyStaged{}+ -> ErrorWithoutFlag+ TcRnStageRestriction{}+ -> ErrorWithoutFlag+ TcRnTyThingUsedWrong{}+ -> ErrorWithoutFlag+ TcRnCannotDefaultKindVar{}+ -> ErrorWithoutFlag+ TcRnUninferrableTyVar{}+ -> ErrorWithoutFlag+ TcRnSkolemEscape{}+ -> ErrorWithoutFlag+ TcRnPatSynEscapedCoercion{}+ -> ErrorWithoutFlag+ TcRnPatSynExistentialInResult{}+ -> ErrorWithoutFlag+ TcRnPatSynArityMismatch{}+ -> ErrorWithoutFlag+ TcRnPatSynInvalidRhs{}+ -> ErrorWithoutFlag+ TcRnTyFamDepsDisabled{}+ -> ErrorWithoutFlag+ TcRnAbstractClosedTyFamDecl{}+ -> ErrorWithoutFlag+ TcRnPartialFieldSelector{}+ -> WarningWithFlag Opt_WarnPartialFields+ TcRnBadFieldAnnotation _ _ LazyFieldsDisabled+ -> ErrorWithoutFlag+ TcRnBadFieldAnnotation{}+ -> WarningWithoutFlag+ TcRnSuperclassCycle{}+ -> ErrorWithoutFlag+ TcRnDefaultSigMismatch{}+ -> ErrorWithoutFlag+ TcRnTyFamsDisabled{}+ -> ErrorWithoutFlag+ TcRnBadTyConTelescope {}+ -> ErrorWithoutFlag+ TcRnTyFamResultDisabled{}+ -> ErrorWithoutFlag+ TcRnRoleValidationFailed{}+ -> ErrorWithoutFlag+ TcRnCommonFieldResultTypeMismatch{}+ -> ErrorWithoutFlag+ TcRnCommonFieldTypeMismatch{}+ -> ErrorWithoutFlag+ TcRnClassExtensionDisabled{}+ -> ErrorWithoutFlag+ TcRnDataConParentTypeMismatch{}+ -> ErrorWithoutFlag+ TcRnGADTsDisabled{}+ -> ErrorWithoutFlag+ TcRnExistentialQuantificationDisabled{}+ -> ErrorWithoutFlag+ TcRnGADTDataContext{}+ -> ErrorWithoutFlag+ TcRnMultipleConForNewtype{}+ -> ErrorWithoutFlag+ TcRnKindSignaturesDisabled{}+ -> ErrorWithoutFlag+ TcRnEmptyDataDeclsDisabled{}+ -> ErrorWithoutFlag+ TcRnRoleMismatch{}+ -> ErrorWithoutFlag+ TcRnRoleCountMismatch{}+ -> ErrorWithoutFlag+ TcRnIllegalRoleAnnotation{}+ -> ErrorWithoutFlag+ TcRnRoleAnnotationsDisabled{}+ -> ErrorWithoutFlag+ TcRnIncoherentRoles{}+ -> ErrorWithoutFlag+ TcRnBindVarAlreadyInScope{}+ -> ErrorWithoutFlag+ TcRnBindMultipleVariables{}+ -> ErrorWithoutFlag+ TcRnUnexpectedKindVar{}+ -> ErrorWithoutFlag+ TcRnNegativeNumTypeLiteral{}+ -> ErrorWithoutFlag+ TcRnIllegalKind{}+ -> ErrorWithoutFlag+ TcRnPrecedenceParsingError{}+ -> ErrorWithoutFlag+ TcRnSectionPrecedenceError{}+ -> ErrorWithoutFlag+ TcRnUnexpectedPatSigType{}+ -> ErrorWithoutFlag+ TcRnIllegalKindSignature{}+ -> ErrorWithoutFlag+ TcRnUnusedQuantifiedTypeVar{}+ -> WarningWithFlag Opt_WarnUnusedForalls+ TcRnDataKindsError{}+ -> ErrorWithoutFlag+ TcRnTypeSynonymCycle{}+ -> ErrorWithoutFlag+ TcRnZonkerMessage msg+ -> zonkerMessageReason msg+ TcRnInterfaceError err+ -> interfaceErrorReason err+ TcRnSelfImport{}+ -> ErrorWithoutFlag+ TcRnNoExplicitImportList{}+ -> WarningWithFlag Opt_WarnMissingImportList+ TcRnSafeImportsDisabled{}+ -> ErrorWithoutFlag+ TcRnDeprecatedModule _ txt+ -> WarningWithCategory (warningTxtCategory txt)+ TcRnCompatUnqualifiedImport{}+ -> WarningWithFlag Opt_WarnCompatUnqualifiedImports+ TcRnRedundantSourceImport{}+ -> WarningWithoutFlag+ TcRnImportLookup{}+ -> ErrorWithoutFlag+ TcRnUnusedImport{}+ -> WarningWithFlag Opt_WarnUnusedImports+ TcRnDuplicateDecls{}+ -> ErrorWithoutFlag+ TcRnPackageImportsDisabled+ -> ErrorWithoutFlag+ TcRnIllegalDataCon{}+ -> ErrorWithoutFlag+ TcRnNestedForallsContexts{}+ -> ErrorWithoutFlag+ TcRnRedundantRecordWildcard+ -> WarningWithFlag Opt_WarnRedundantRecordWildcards+ TcRnUnusedRecordWildcard{}+ -> WarningWithFlag Opt_WarnUnusedRecordWildcards+ TcRnUnusedName _ prov+ -> WarningWithFlag $ case prov of+ UnusedNameTopDecl -> Opt_WarnUnusedTopBinds+ UnusedNameImported _ -> Opt_WarnUnusedTopBinds+ UnusedNameTypePattern -> Opt_WarnUnusedTypePatterns+ UnusedNameMatch -> Opt_WarnUnusedMatches+ UnusedNameLocalBind -> Opt_WarnUnusedLocalBinds+ TcRnQualifiedBinder{}+ -> ErrorWithoutFlag+ TcRnTypeApplicationsDisabled{}+ -> ErrorWithoutFlag+ TcRnInvalidRecordField{}+ -> ErrorWithoutFlag+ TcRnTupleTooLarge{}+ -> ErrorWithoutFlag+ TcRnCTupleTooLarge{}+ -> ErrorWithoutFlag+ TcRnIllegalInferredTyVars{}+ -> ErrorWithoutFlag+ TcRnAmbiguousName{}+ -> ErrorWithoutFlag+ TcRnBindingNameConflict{}+ -> ErrorWithoutFlag+ TcRnNonCanonicalDefinition (NonCanonicalMonoid _) _+ -> WarningWithFlag Opt_WarnNonCanonicalMonoidInstances+ TcRnNonCanonicalDefinition (NonCanonicalMonad _) _+ -> WarningWithFlag Opt_WarnNonCanonicalMonadInstances+ TcRnImplicitImportOfPrelude {}+ -> WarningWithFlag Opt_WarnImplicitPrelude+ TcRnMissingMain {}+ -> ErrorWithoutFlag+ TcRnGhciUnliftedBind {}+ -> ErrorWithoutFlag+ TcRnGhciMonadLookupFail {}+ -> ErrorWithoutFlag+ TcRnMissingRoleAnnotation{}+ -> WarningWithFlag Opt_WarnMissingRoleAnnotations+ TcRnIllegalInvisTyVarBndr{}+ -> ErrorWithoutFlag+ TcRnDeprecatedInvisTyArgInConPat {}+ -> WarningWithoutFlag+ TcRnInvalidInvisTyVarBndr{}+ -> ErrorWithoutFlag+ TcRnInvisBndrWithoutSig{}+ -> ErrorWithoutFlag+ TcRnImplicitRhsQuantification{}+ -> WarningWithFlag Opt_WarnImplicitRhsQuantification+ TcRnPatersonCondFailure{}+ -> ErrorWithoutFlag++ diagnosticHints = \case+ TcRnUnknownMessage m+ -> diagnosticHints m+ TcRnMessageWithInfo _ msg_with_info+ -> case msg_with_info of+ TcRnMessageDetailed _ m -> diagnosticHints m+ TcRnWithHsDocContext _ msg+ -> diagnosticHints msg+ TcRnSolverReport _ _ hints+ -> hints+ TcRnSolverDepthError {}+ -> [SuggestIncreaseReductionDepth]+ TcRnRedundantConstraints{}+ -> noHints+ TcRnInaccessibleCode{}+ -> noHints+ TcRnInaccessibleCoAxBranch{}+ -> noHints+ TcRnTypeDoesNotHaveFixedRuntimeRep{}+ -> noHints+ TcRnImplicitLift{}+ -> noHints+ TcRnUnusedPatternBinds{}+ -> noHints+ TcRnDodgyImports{}+ -> noHints+ TcRnDodgyExports{}+ -> noHints+ TcRnMissingImportList{}+ -> noHints+ TcRnUnsafeDueToPlugin{}+ -> noHints+ TcRnModMissingRealSrcSpan{}+ -> noHints+ TcRnIdNotExportedFromModuleSig name mod+ -> [SuggestAddToHSigExportList name $ Just mod]+ TcRnIdNotExportedFromLocalSig name+ -> [SuggestAddToHSigExportList name Nothing]+ TcRnShadowedName{}+ -> noHints+ TcRnInvalidWarningCategory{}+ -> noHints+ TcRnDuplicateWarningDecls{}+ -> noHints+ TcRnSimplifierTooManyIterations{}+ -> [SuggestIncreaseSimplifierIterations]+ TcRnIllegalPatSynDecl{}+ -> noHints+ TcRnLinearPatSyn{}+ -> noHints+ TcRnEmptyRecordUpdate{}+ -> noHints+ TcRnIllegalFieldPunning{}+ -> [suggestExtension LangExt.NamedFieldPuns]+ TcRnIllegalWildcardsInRecord{}+ -> [suggestExtension LangExt.RecordWildCards]+ TcRnIllegalWildcardInType{}+ -> noHints+ TcRnDuplicateFieldName{}+ -> noHints+ TcRnIllegalViewPattern{}+ -> [suggestExtension LangExt.ViewPatterns]+ TcRnCharLiteralOutOfRange{}+ -> noHints+ TcRnIllegalWildcardsInConstructor{}+ -> noHints+ TcRnIgnoringAnnotations{}+ -> noHints+ TcRnAnnotationInSafeHaskell+ -> noHints+ TcRnInvalidTypeApplication{}+ -> noHints+ TcRnTagToEnumMissingValArg+ -> noHints+ TcRnTagToEnumUnspecifiedResTy{}+ -> noHints+ TcRnTagToEnumResTyNotAnEnum{}+ -> noHints+ TcRnTagToEnumResTyTypeData{}+ -> noHints+ TcRnArrowIfThenElsePredDependsOnResultTy+ -> noHints+ TcRnIllegalHsBootOrSigDecl {}+ -> noHints+ TcRnBootMismatch boot_or_sig err+ | Hsig <- boot_or_sig+ , BootMismatch _ _ (BootMismatchedTyCons _boot_tc real_tc tc_errs) <- err+ , any is_synAbsData_etaReduce (NE.toList tc_errs)+ -> [SuggestEtaReduceAbsDataTySyn real_tc]+ | otherwise+ -> noHints+ where+ is_synAbsData_etaReduce (SynAbstractData SynAbsDataTySynNotNullary) = True+ is_synAbsData_etaReduce _ = False+ TcRnRecursivePatternSynonym{}+ -> noHints+ TcRnPartialTypeSigTyVarMismatch{}+ -> noHints+ TcRnPartialTypeSigBadQuantifier{}+ -> noHints+ TcRnMissingSignature {}+ -> noHints+ TcRnPolymorphicBinderMissingSig{}+ -> noHints+ TcRnOverloadedSig{}+ -> noHints+ TcRnTupleConstraintInst{}+ -> noHints+ TcRnUserTypeError{}+ -> noHints+ TcRnConstraintInKind{}+ -> noHints+ TcRnUnboxedTupleOrSumTypeFuncArg tuple_or_sum _+ -> [suggestExtension $ unboxedTupleOrSumExtension tuple_or_sum]+ TcRnLinearFuncInKind{}+ -> noHints+ TcRnForAllEscapeError{}+ -> noHints+ TcRnVDQInTermType{}+ -> noHints+ TcRnBadQuantPredHead{}+ -> noHints+ TcRnIllegalTupleConstraint{}+ -> [suggestExtension LangExt.ConstraintKinds]+ TcRnNonTypeVarArgInConstraint{}+ -> [suggestExtension LangExt.FlexibleContexts]+ TcRnIllegalImplicitParam{}+ -> noHints+ TcRnIllegalConstraintSynonymOfKind{}+ -> [suggestExtension LangExt.ConstraintKinds]+ TcRnOversaturatedVisibleKindArg{}+ -> noHints+ TcRnForAllRankErr rank _+ -> case rank of+ LimitedRank{} -> [suggestExtension LangExt.RankNTypes]+ MonoTypeRankZero -> [suggestExtension LangExt.RankNTypes]+ MonoTypeTyConArg -> [suggestExtension LangExt.ImpredicativeTypes]+ MonoTypeSynArg -> [suggestExtension LangExt.LiberalTypeSynonyms]+ MonoTypeConstraint -> [suggestExtension LangExt.QuantifiedConstraints]+ _ -> noHints+ TcRnSimplifiableConstraint{}+ -> noHints+ TcRnArityMismatch{}+ -> noHints+ TcRnIllegalInstance rea+ -> illegalInstanceHints rea+ TcRnMonomorphicBindings bindings+ -> case bindings of+ [] -> noHints+ (x:xs) -> [SuggestAddTypeSignatures $ NamedBindings (x NE.:| xs)]+ TcRnOrphanInstance clsOrFamInst+ -> [SuggestFixOrphanInst { isFamilyInstance = isFam }]+ where+ isFam = case clsOrFamInst :: Either ClsInst FamInst of+ Left _clsInst -> Nothing+ Right famInst -> Just $ fi_flavor famInst+ TcRnFunDepConflict{}+ -> noHints+ TcRnDupInstanceDecls{}+ -> noHints+ TcRnConflictingFamInstDecls{}+ -> noHints+ TcRnFamInstNotInjective rea _ _+ -> case rea of+ InjErrRhsBareTyVar{} -> noHints+ InjErrRhsCannotBeATypeFam -> noHints+ InjErrRhsOverlap -> noHints+ InjErrCannotInferFromRhs _ _ suggestUndInst+ | YesSuggestUndecidableInstaces <- suggestUndInst+ -> [suggestExtension LangExt.UndecidableInstances]+ | otherwise+ -> noHints+ TcRnBangOnUnliftedType{}+ -> noHints+ TcRnLazyBangOnUnliftedType{}+ -> noHints+ TcRnMultipleDefaultDeclarations{}+ -> noHints+ TcRnBadDefaultType{}+ -> noHints+ TcRnPatSynBundledWithNonDataCon{}+ -> noHints+ TcRnPatSynBundledWithWrongType{}+ -> noHints+ TcRnDupeModuleExport{}+ -> noHints+ TcRnExportedModNotImported{}+ -> noHints+ TcRnNullExportedModule{}+ -> noHints+ TcRnMissingExportList{}+ -> noHints+ TcRnExportHiddenComponents{}+ -> noHints+ TcRnDuplicateExport{}+ -> noHints+ TcRnExportedParentChildMismatch{}+ -> noHints+ TcRnConflictingExports{}+ -> noHints+ TcRnDuplicateFieldExport {}+ -> [suggestExtension LangExt.DuplicateRecordFields]+ TcRnAmbiguousFieldInUpdate {}+ -> [suggestExtension LangExt.DisambiguateRecordFields]+ TcRnAmbiguousRecordUpdate{}+ -> noHints+ TcRnMissingFields{}+ -> noHints+ TcRnFieldUpdateInvalidType{}+ -> noHints+ TcRnMissingStrictFields{}+ -> noHints+ TcRnBadRecordUpdate{}+ -> noHints+ TcRnIllegalStaticExpression {}+ -> [suggestExtension LangExt.StaticPointers]+ TcRnStaticFormNotClosed{}+ -> noHints+ TcRnUselessTypeable+ -> noHints+ TcRnDerivingDefaults{}+ -> [useDerivingStrategies]+ TcRnNonUnaryTypeclassConstraint{}+ -> noHints+ TcRnPartialTypeSignatures suggestParSig _+ -> case suggestParSig of+ YesSuggestPartialTypeSignatures+ -> let info = text "to use the inferred type"+ in [suggestExtensionWithInfo info LangExt.PartialTypeSignatures]+ NoSuggestPartialTypeSignatures+ -> noHints+ TcRnCannotDeriveInstance cls _ _ newtype_deriving rea+ -> deriveInstanceErrReasonHints cls newtype_deriving rea+ TcRnLookupInstance _ _ _+ -> noHints+ TcRnLazyGADTPattern+ -> noHints+ TcRnArrowProcGADTPattern+ -> noHints+ TcRnForallIdentifier {}+ -> [SuggestRenameForall]+ TcRnTypeEqualityOutOfScope+ -> noHints+ TcRnTypeEqualityRequiresOperators+ -> [suggestExtension LangExt.TypeOperators]+ TcRnIllegalTypeOperator {}+ -> [suggestExtension LangExt.TypeOperators]+ TcRnIllegalTypeOperatorDecl {}+ -> [suggestExtension LangExt.TypeOperators]+ TcRnGADTMonoLocalBinds {}+ -> [suggestAnyExtension [LangExt.GADTs, LangExt.TypeFamilies]]+ TcRnIncorrectNameSpace nm is_th_use+ | is_th_use+ -> [SuggestAppropriateTHTick $ nameNameSpace nm]+ | otherwise+ -> noHints+ TcRnNotInScope err _ _ hints+ -> scopeErrorHints err ++ hints+ TcRnTermNameInType _ hints+ -> hints+ TcRnUntickedPromotedThing thing+ -> [SuggestAddTick thing]+ TcRnIllegalBuiltinSyntax {}+ -> noHints+ TcRnWarnDefaulting {}+ -> noHints+ TcRnForeignImportPrimExtNotSet{}+ -> [suggestExtension LangExt.GHCForeignImportPrim]+ TcRnForeignImportPrimSafeAnn{}+ -> noHints+ TcRnForeignFunctionImportAsValue{}+ -> noHints+ TcRnFunPtrImportWithoutAmpersand{}+ -> noHints+ TcRnIllegalForeignDeclBackend{}+ -> noHints+ TcRnUnsupportedCallConv{}+ -> noHints+ TcRnIllegalForeignType _ reason+ -> case reason of+ TypeCannotBeMarshaled _ why+ | NewtypeDataConNotInScope tc _ <- why+ -> let tc_nm = tyConName tc+ dc = dataConName $ head $ tyConDataCons tc+ in [ ImportSuggestion (occName dc)+ $ ImportDataCon Nothing (nameOccName tc_nm) ]+ | UnliftedFFITypesNeeded <- why+ -> [suggestExtension LangExt.UnliftedFFITypes]+ _ -> noHints+ TcRnInvalidCIdentifier{}+ -> noHints+ TcRnExpectedValueId{}+ -> noHints+ TcRnRecSelectorEscapedTyVar{}+ -> [SuggestPatternMatchingSyntax]+ TcRnPatSynNotBidirectional{}+ -> noHints+ TcRnIllegalDerivingItem{}+ -> noHints+ TcRnUnexpectedAnnotation{}+ -> noHints+ TcRnIllegalRecordSyntax{}+ -> noHints+ TcRnInvalidVisibleKindArgument{}+ -> noHints+ TcRnTooManyBinders{}+ -> noHints+ TcRnDifferentNamesForTyVar{}+ -> noHints+ TcRnInvalidReturnKind _ _ _ mb_suggest_unlifted_ext+ -> case mb_suggest_unlifted_ext of+ Nothing -> noHints+ Just SuggestUnliftedNewtypes -> [suggestExtension LangExt.UnliftedNewtypes]+ Just SuggestUnliftedDatatypes -> [suggestExtension LangExt.UnliftedDatatypes]+ TcRnClassKindNotConstraint{}+ -> noHints+ TcRnUnpromotableThing{}+ -> noHints+ TcRnMatchesHaveDiffNumArgs{}+ -> noHints+ TcRnCannotBindScopedTyVarInPatSig{}+ -> noHints+ TcRnCannotBindTyVarsInPatBind{}+ -> noHints+ TcRnTooManyTyArgsInConPattern{}+ -> noHints+ TcRnMultipleInlinePragmas{}+ -> noHints+ TcRnUnexpectedPragmas{}+ -> noHints+ TcRnNonOverloadedSpecialisePragma{}+ -> noHints+ TcRnSpecialiseNotVisible name+ -> [SuggestSpecialiseVisibilityHints name]+ TcRnPragmaWarning{}+ -> noHints+ TcRnDifferentExportWarnings _ _+ -> noHints+ TcRnIncompleteExportWarnings _ _+ -> noHints+ TcRnIllegalHsigDefaultMethods{}+ -> noHints+ TcRnIllegalQuasiQuotes{}+ -> [suggestExtension LangExt.QuasiQuotes]+ TcRnTHError err+ -> thErrorHints err+ TcRnHsigFixityMismatch{}+ -> noHints+ TcRnHsigShapeMismatch{}+ -> noHints+ TcRnHsigMissingModuleExport{}+ -> noHints+ TcRnBadGenericMethod{}+ -> noHints+ TcRnWarningMinimalDefIncomplete{}+ -> noHints+ TcRnDefaultMethodForPragmaLacksBinding{}+ -> noHints+ TcRnIgnoreSpecialisePragmaOnDefMethod{}+ -> noHints+ TcRnBadMethodErr{}+ -> noHints+ TcRnIllegalTypeData+ -> [suggestExtension LangExt.TypeData]+ TcRnTypeDataForbids{}+ -> noHints+ TcRnIllegalNewtype{}+ -> noHints+ TcRnUnsatisfiedMinimalDef{}+ -> noHints+ TcRnMisplacedInstSig{}+ -> [suggestExtension LangExt.InstanceSigs]+ TcRnNoRebindableSyntaxRecordDot{}+ -> noHints+ TcRnNoFieldPunsRecordDot{}+ -> noHints+ TcRnListComprehensionDuplicateBinding{}+ -> noHints+ TcRnEmptyStmtsGroup EmptyStmtsGroupInDoNotation{}+ -> [suggestExtension LangExt.NondecreasingIndentation]+ TcRnEmptyStmtsGroup{}+ -> noHints+ TcRnLastStmtNotExpr{}+ -> noHints+ TcRnUnexpectedStatementInContext _ _ mExt+ | Nothing <- mExt -> noHints+ | Just ext <- mExt -> [suggestExtension ext]+ TcRnSectionWithoutParentheses{}+ -> noHints+ TcRnIllegalImplicitParameterBindings{}+ -> noHints+ TcRnIllegalTupleSection{}+ -> [suggestExtension LangExt.TupleSections]+ TcRnCapturedTermName{}+ -> [SuggestRenameTypeVariable]+ TcRnBindingOfExistingName{}+ -> noHints+ TcRnMultipleFixityDecls{}+ -> noHints+ TcRnIllegalPatternSynonymDecl{}+ -> [suggestExtension LangExt.PatternSynonyms]+ TcRnIllegalClassBinding{}+ -> noHints+ TcRnOrphanCompletePragma{}+ -> noHints+ TcRnEmptyCase ctxt -> case ctxt of+ LamCaseAlt LamCases -> noHints -- cases syntax doesn't support empty case.+ ArrowMatchCtxt (ArrowLamCaseAlt LamCases) -> noHints+ _ -> [suggestExtension LangExt.EmptyCase]+ TcRnNonStdGuards{}+ -> [suggestExtension LangExt.PatternGuards]+ TcRnDuplicateSigDecl{}+ -> noHints+ TcRnMisplacedSigDecl{}+ -> noHints+ TcRnUnexpectedDefaultSig{}+ -> [suggestExtension LangExt.DefaultSignatures]+ TcRnDuplicateMinimalSig{}+ -> noHints+ TcRnLoopySuperclassSolve wtd_loc wtd_pty+ -> [LoopySuperclassSolveHint wtd_pty cls_or_qc]+ where+ cls_or_qc :: ClsInstOrQC+ cls_or_qc = case ctLocOrigin wtd_loc of+ ScOrigin c_or_q _ -> c_or_q+ _ -> IsClsInst -- shouldn't happen+ TcRnUnexpectedStandaloneDerivingDecl{}+ -> [suggestExtension LangExt.StandaloneDeriving]+ TcRnUnusedVariableInRuleDecl{}+ -> noHints+ TcRnUnexpectedStandaloneKindSig{}+ -> [suggestExtension LangExt.StandaloneKindSignatures]+ TcRnIllegalRuleLhs{}+ -> noHints+ TcRnDuplicateRoleAnnot{}+ -> noHints+ TcRnDuplicateKindSig{}+ -> noHints+ TcRnIllegalDerivStrategy ds -> case ds of+ ViaStrategy{} -> [suggestExtension LangExt.DerivingVia]+ _ -> [suggestExtension LangExt.DerivingStrategies]+ TcRnIllegalMultipleDerivClauses{}+ -> [suggestExtension LangExt.DerivingStrategies]+ TcRnNoDerivStratSpecified isDSEnabled -> if isDSEnabled+ then noHints+ else [suggestExtension LangExt.DerivingStrategies]+ TcRnStupidThetaInGadt{}+ -> noHints+ TcRnShadowedTyVarNameInFamResult{}+ -> noHints+ TcRnIncorrectTyVarOnLhsOfInjCond{}+ -> noHints+ TcRnUnknownTyVarsOnRhsOfInjCond{}+ -> noHints+ TcRnBadlyStaged{}+ -> noHints+ TcRnStageRestriction{}+ -> noHints+ TcRnTyThingUsedWrong{}+ -> noHints+ TcRnCannotDefaultKindVar{}+ -> noHints+ TcRnUninferrableTyVar{}+ -> noHints+ TcRnSkolemEscape{}+ -> noHints+ TcRnPatSynEscapedCoercion{}+ -> noHints+ TcRnPatSynExistentialInResult{}+ -> noHints+ TcRnPatSynArityMismatch{}+ -> noHints+ TcRnPatSynInvalidRhs name pat args (PatSynNotInvertible _)+ -> [SuggestExplicitBidiPatSyn name pat args]+ TcRnPatSynInvalidRhs{}+ -> noHints+ TcRnTyFamDepsDisabled{}+ -> [suggestExtension LangExt.TypeFamilyDependencies]+ TcRnAbstractClosedTyFamDecl{}+ -> noHints+ TcRnPartialFieldSelector{}+ -> noHints+ TcRnBadFieldAnnotation _ _ LazyFieldsDisabled+ -> [suggestExtension LangExt.StrictData]+ TcRnBadFieldAnnotation{}+ -> noHints+ TcRnSuperclassCycle{}+ -> [suggestExtension LangExt.UndecidableSuperClasses]+ TcRnDefaultSigMismatch{}+ -> noHints+ TcRnTyFamsDisabled{}+ -> [suggestExtension LangExt.TypeFamilies]+ TcRnBadTyConTelescope{}+ -> noHints+ TcRnTyFamResultDisabled{}+ -> [suggestExtension LangExt.TypeFamilyDependencies]+ TcRnRoleValidationFailed{}+ -> noHints+ TcRnCommonFieldResultTypeMismatch{}+ -> noHints+ TcRnCommonFieldTypeMismatch{}+ -> noHints+ TcRnClassExtensionDisabled _ MultiParamDisabled{}+ -> [suggestExtension LangExt.MultiParamTypeClasses]+ TcRnClassExtensionDisabled _ FunDepsDisabled{}+ -> [suggestExtension LangExt.FunctionalDependencies]+ TcRnClassExtensionDisabled _ ConstrainedClassMethodsDisabled{}+ -> [suggestExtension LangExt.ConstrainedClassMethods]+ TcRnDataConParentTypeMismatch{}+ -> noHints+ TcRnGADTsDisabled{}+ -> [suggestExtension LangExt.GADTs]+ TcRnExistentialQuantificationDisabled{}+ -> [suggestExtension LangExt.ExistentialQuantification,+ suggestExtension LangExt.GADTs]+ TcRnGADTDataContext{}+ -> noHints+ TcRnMultipleConForNewtype{}+ -> noHints+ TcRnKindSignaturesDisabled{}+ -> [suggestExtension LangExt.KindSignatures]+ TcRnEmptyDataDeclsDisabled{}+ -> [suggestExtension LangExt.EmptyDataDecls]+ TcRnRoleMismatch{}+ -> noHints+ TcRnRoleCountMismatch{}+ -> noHints+ TcRnIllegalRoleAnnotation{}+ -> noHints+ TcRnRoleAnnotationsDisabled{}+ -> [suggestExtension LangExt.RoleAnnotations]+ TcRnIncoherentRoles{}+ -> [suggestExtension LangExt.IncoherentInstances]+ TcRnBindVarAlreadyInScope{}+ -> noHints+ TcRnBindMultipleVariables{}+ -> noHints+ TcRnUnexpectedKindVar{}+ -> [suggestExtension LangExt.PolyKinds]+ TcRnNegativeNumTypeLiteral{}+ -> noHints+ TcRnIllegalKind _ suggest_polyKinds+ -> if suggest_polyKinds+ then [suggestExtension LangExt.PolyKinds]+ else noHints+ TcRnPrecedenceParsingError{}+ -> noHints+ TcRnSectionPrecedenceError{}+ -> noHints+ TcRnUnexpectedPatSigType{}+ -> [suggestExtension LangExt.ScopedTypeVariables]+ TcRnIllegalKindSignature{}+ -> [suggestExtension LangExt.KindSignatures]+ TcRnUnusedQuantifiedTypeVar{}+ -> noHints+ TcRnDataKindsError{}+ -> [suggestExtension LangExt.DataKinds]+ TcRnTypeSynonymCycle{}+ -> noHints+ TcRnZonkerMessage msg+ -> zonkerMessageHints msg+ TcRnInterfaceError reason+ -> interfaceErrorHints reason+ TcRnSelfImport{}+ -> noHints+ TcRnNoExplicitImportList{}+ -> noHints+ TcRnSafeImportsDisabled{}+ -> [SuggestSafeHaskell]+ TcRnDeprecatedModule{}+ -> noHints+ TcRnCompatUnqualifiedImport{}+ -> noHints+ TcRnRedundantSourceImport{}+ -> noHints+ TcRnImportLookup (ImportLookupBad k _ is ie patsyns_enabled) ->+ let mod_name = moduleName $ is_mod is+ occ = rdrNameOcc $ ieName ie+ in case k of+ BadImportAvailVar -> [ImportSuggestion occ $ CouldRemoveTypeKeyword mod_name]+ BadImportNotExported suggs -> suggs+ BadImportAvailTyCon -> [ImportSuggestion occ $ CouldAddTypeKeyword mod_name]+ BadImportAvailDataCon par -> [ImportSuggestion occ $ ImportDataCon (Just (mod_name, patsyns_enabled)) par]+ BadImportNotExportedSubordinates{} -> noHints+ TcRnImportLookup{}+ -> noHints+ TcRnUnusedImport{}+ -> noHints+ TcRnDuplicateDecls{}+ -> noHints+ TcRnPackageImportsDisabled+ -> [suggestExtension LangExt.PackageImports]+ TcRnIllegalDataCon{}+ -> noHints+ TcRnNestedForallsContexts{}+ -> noHints+ TcRnRedundantRecordWildcard+ -> [SuggestRemoveRecordWildcard]+ TcRnUnusedRecordWildcard{}+ -> [SuggestRemoveRecordWildcard]+ TcRnUnusedName{}+ -> noHints+ TcRnQualifiedBinder{}+ -> noHints+ TcRnTypeApplicationsDisabled ty_app+ -> case ty_app of+ TypeApplication {}+ -> [suggestExtension LangExt.TypeApplications]+ TypeApplicationInPattern {}+ -> [suggestExtension LangExt.TypeAbstractions]+ TcRnInvalidRecordField{}+ -> noHints+ TcRnTupleTooLarge{}+ -> noHints+ TcRnCTupleTooLarge{}+ -> noHints+ TcRnIllegalInferredTyVars{}+ -> noHints+ TcRnAmbiguousName{}+ -> noHints+ TcRnBindingNameConflict{}+ -> noHints+ TcRnNonCanonicalDefinition reason _+ -> suggestNonCanonicalDefinition reason+ TcRnImplicitImportOfPrelude {}+ -> noHints+ TcRnMissingMain {}+ -> noHints+ TcRnGhciUnliftedBind {}+ -> noHints+ TcRnGhciMonadLookupFail {}+ -> noHints+ TcRnMissingRoleAnnotation{}+ -> noHints+ TcRnIllegalInvisTyVarBndr{}+ -> [suggestExtension LangExt.TypeAbstractions]+ TcRnDeprecatedInvisTyArgInConPat{}+ -> [suggestExtension LangExt.TypeAbstractions]+ TcRnInvalidInvisTyVarBndr{}+ -> noHints+ TcRnInvisBndrWithoutSig name _+ -> [SuggestAddStandaloneKindSignature name]+ TcRnImplicitRhsQuantification kv+ -> [SuggestBindTyVarOnLhs (unLoc kv)]+ TcRnPatersonCondFailure{}+ -> [suggestExtension LangExt.UndecidableInstances]++ diagnosticCode :: TcRnMessage -> Maybe DiagnosticCode+ diagnosticCode = constructorCode++-- | Change [x] to "x", [x, y] to "x and y", [x, y, z] to "x, y, and z",+-- and so on. The `and` stands for any `conjunction`, which is passed in.+commafyWith :: SDoc -> [SDoc] -> [SDoc]+commafyWith _ [] = []+commafyWith _ [x] = [x]+commafyWith conjunction [x, y] = [x <+> conjunction <+> y]+commafyWith conjunction xs = addConjunction $ punctuate comma xs+ where addConjunction [x, y] = [x, conjunction, y]+ addConjunction (x : xs) = x : addConjunction xs+ addConjunction _ = panic "commafyWith expected 2 or more elements"++deriveInstanceErrReasonHints :: Class+ -> UsingGeneralizedNewtypeDeriving+ -> DeriveInstanceErrReason+ -> [GhcHint]+deriveInstanceErrReasonHints cls newtype_deriving = \case+ DerivErrNotWellKinded _ _ n_args_to_keep+ | cls `hasKey` gen1ClassKey && n_args_to_keep >= 0+ -> [suggestExtension LangExt.PolyKinds]+ | otherwise+ -> noHints+ DerivErrSafeHaskellGenericInst -> noHints+ DerivErrDerivingViaWrongKind{} -> noHints+ DerivErrNoEtaReduce{} -> noHints+ DerivErrBootFileFound -> noHints+ DerivErrDataConsNotAllInScope{} -> noHints+ DerivErrGNDUsedOnData -> noHints+ DerivErrNullaryClasses -> noHints+ DerivErrLastArgMustBeApp -> noHints+ DerivErrNoFamilyInstance{} -> noHints+ DerivErrNotStockDeriveable deriveAnyClassEnabled+ | deriveAnyClassEnabled == NoDeriveAnyClassEnabled+ -> [suggestExtension LangExt.DeriveAnyClass]+ | otherwise+ -> noHints+ DerivErrHasAssociatedDatatypes{}+ -> noHints+ DerivErrNewtypeNonDeriveableClass+ | newtype_deriving == NoGeneralizedNewtypeDeriving+ -> [useGND]+ | otherwise+ -> noHints+ DerivErrCannotEtaReduceEnough{}+ | newtype_deriving == NoGeneralizedNewtypeDeriving+ -> [useGND]+ | otherwise+ -> noHints+ DerivErrOnlyAnyClassDeriveable _ deriveAnyClassEnabled+ | deriveAnyClassEnabled == NoDeriveAnyClassEnabled+ -> [suggestExtension LangExt.DeriveAnyClass]+ | otherwise+ -> noHints+ DerivErrNotDeriveable deriveAnyClassEnabled+ | deriveAnyClassEnabled == NoDeriveAnyClassEnabled+ -> [suggestExtension LangExt.DeriveAnyClass]+ | otherwise+ -> noHints+ DerivErrNotAClass{}+ -> noHints+ DerivErrNoConstructors{}+ -> let info = text "to enable deriving for empty data types"+ in [useExtensionInOrderTo info LangExt.EmptyDataDeriving]+ DerivErrLangExtRequired{}+ -- This is a slightly weird corner case of GHC: we are failing+ -- to derive a typeclass instance because a particular 'Extension'+ -- is not enabled (and so we report in the main error), but here+ -- we don't want to /repeat/ to enable the extension in the hint.+ -> noHints+ DerivErrDunnoHowToDeriveForType{}+ -> noHints+ DerivErrMustBeEnumType rep_tc+ -- We want to suggest GND only if this /is/ a newtype.+ | newtype_deriving == NoGeneralizedNewtypeDeriving && isNewTyCon rep_tc+ -> [useGND]+ | otherwise+ -> noHints+ DerivErrMustHaveExactlyOneConstructor{}+ -> noHints+ DerivErrMustHaveSomeParameters{}+ -> noHints+ DerivErrMustNotHaveClassContext{}+ -> noHints+ DerivErrBadConstructor wcard _+ -> case wcard of+ Nothing -> noHints+ Just YesHasWildcard -> [SuggestFillInWildcardConstraint]+ Just NoHasWildcard -> [SuggestAddStandaloneDerivation]+ DerivErrGenerics{}+ -> noHints+ DerivErrEnumOrProduct{}+ -> noHints++messageWithInfoDiagnosticMessage :: UnitState+ -> ErrInfo+ -> Bool+ -> DecoratedSDoc+ -> DecoratedSDoc+messageWithInfoDiagnosticMessage unit_state ErrInfo{..} show_ctxt important =+ let err_info' = map (pprWithUnitState unit_state) ([errInfoContext | show_ctxt] ++ [errInfoSupplementary])+ in (mapDecoratedSDoc (pprWithUnitState unit_state) important) `unionDecoratedSDoc`+ mkDecorated err_info'++messageWithHsDocContext :: TcRnMessageOpts -> HsDocContext -> DecoratedSDoc -> DecoratedSDoc+messageWithHsDocContext opts ctxt main_msg = do+ if tcOptsShowContext opts+ then main_msg `unionDecoratedSDoc` ctxt_msg+ else main_msg+ where+ ctxt_msg = mkSimpleDecorated (inHsDocContext ctxt)++dodgy_msg :: Outputable ie => SDoc -> GlobalRdrElt -> ie -> SDoc+dodgy_msg kind tc ie+ = vcat [ text "The" <+> kind <+> text "item" <+> quotes (ppr ie) <+> text "suggests that"+ , quotes (ppr $ greName tc) <+> text "has" <+> sep rest ]+ where+ rest :: [SDoc]+ rest =+ case greInfo tc of+ IAmTyCon ClassFlavour+ -> [ text "(in-scope) class methods or associated types" <> comma+ , text "but it has none" ]+ IAmTyCon _+ -> [ text "(in-scope) constructors or record fields" <> comma+ , text "but it has none" ]+ _ -> [ text "children" <> comma+ , text "but it is not a type constructor or a class" ]++dodgy_msg_insert :: GlobalRdrElt -> IE GhcRn+dodgy_msg_insert tc_gre = IEThingAll (Nothing, noAnn) ii+ where+ ii = noLocA (IEName noExtField $ noLocA $ greName tc_gre)++pprTypeDoesNotHaveFixedRuntimeRep :: Type -> FixedRuntimeRepProvenance -> SDoc+pprTypeDoesNotHaveFixedRuntimeRep ty prov =+ let what = pprFixedRuntimeRepProvenance prov+ in text "The" <+> what <+> text "does not have a fixed runtime representation:"+ $$ format_frr_err ty++format_frr_err :: Type -- ^ the type which doesn't have a fixed runtime representation+ -> SDoc+format_frr_err ty+ = (bullet <+> ppr tidy_ty <+> dcolon <+> ppr tidy_ki)+ where+ (tidy_env, tidy_ty) = tidyOpenType emptyTidyEnv ty+ tidy_ki = tidyType tidy_env (typeKind ty)++pprField :: (FieldLabelString, TcType) -> SDoc+pprField (f,ty) = ppr f <+> dcolon <+> ppr ty++pprRecordFieldPart :: RecordFieldPart -> SDoc+pprRecordFieldPart = \case+ RecordFieldDecl {} -> text "declaration"+ RecordFieldConstructor{} -> text "construction"+ RecordFieldPattern{} -> text "pattern"+ RecordFieldUpdate -> text "update"++ppr_opfix :: (OpName, Fixity) -> SDoc+ppr_opfix (op, fixity) = pp_op <+> brackets (ppr fixity)+ where+ pp_op | NegateOp <- op = text "prefix `-'"+ | otherwise = quotes (ppr op)++pprBindings :: [Name] -> SDoc+pprBindings = pprWithCommas (quotes . ppr)+++injectivityErrorHerald :: SDoc+injectivityErrorHerald =+ text "Type family equation violates the family's injectivity annotation."++formatExportItemError :: SDoc -> String -> SDoc+formatExportItemError exportedThing reason =+ hsep [ text "The export item"+ , quotes exportedThing+ , text reason ]++-- | What warning flags are associated with the given missing signature?+missingSignatureWarningFlags :: MissingSignature -> Exported -> NonEmpty WarningFlag+missingSignatureWarningFlags (MissingTopLevelBindingSig {}) exported+ -- We prefer "bigger" warnings first: #14794+ --+ -- See Note [Warnings controlled by multiple flags]+ = Opt_WarnMissingSignatures :|+ [ Opt_WarnMissingExportedSignatures | IsExported == exported ]+missingSignatureWarningFlags (MissingPatSynSig {}) exported+ = Opt_WarnMissingPatternSynonymSignatures :|+ [ Opt_WarnMissingExportedPatternSynonymSignatures | IsExported == exported ]+missingSignatureWarningFlags (MissingTyConKindSig ty_con _) _+ = Opt_WarnMissingKindSignatures :| [Opt_WarnMissingPolyKindSignatures | isForAllTy_invis_ty (tyConKind ty_con) ]++useDerivingStrategies :: GhcHint+useDerivingStrategies =+ useExtensionInOrderTo (text "to pick a different strategy") LangExt.DerivingStrategies++useGND :: GhcHint+useGND = let info = text "for GHC's" <+> text "newtype-deriving extension"+ in suggestExtensionWithInfo info LangExt.GeneralizedNewtypeDeriving++cannotMakeDerivedInstanceHerald :: Class+ -> [Type]+ -> Maybe (DerivStrategy GhcTc)+ -> UsingGeneralizedNewtypeDeriving+ -> Bool -- ^ If False, only prints the why.+ -> SDoc+ -> SDoc+cannotMakeDerivedInstanceHerald cls cls_args mb_strat newtype_deriving pprHerald why =+ if pprHerald+ then sep [(hang (text "Can't make a derived instance of")+ 2 (quotes (ppr pred) <+> via_mechanism)+ $$ nest 2 extra) <> colon,+ nest 2 why]+ else why+ where+ strat_used = isJust mb_strat+ extra | not strat_used, (newtype_deriving == YesGeneralizedNewtypeDeriving)+ = text "(even with cunning GeneralizedNewtypeDeriving)"+ | otherwise = empty+ pred = mkClassPred cls cls_args+ via_mechanism | strat_used+ , Just strat <- mb_strat+ = text "with the" <+> (derivStrategyName strat) <+> text "strategy"+ | otherwise+ = empty++badCon :: DataCon -> SDoc -> SDoc+badCon con msg = text "Constructor" <+> quotes (ppr con) <+> msg++derivErrDiagnosticMessage :: Class+ -> [Type]+ -> Maybe (DerivStrategy GhcTc)+ -> UsingGeneralizedNewtypeDeriving+ -> Bool -- If True, includes the herald \"can't make a derived..\"+ -> DeriveInstanceErrReason+ -> SDoc+derivErrDiagnosticMessage cls cls_tys mb_strat newtype_deriving pprHerald = \case+ DerivErrNotWellKinded tc cls_kind _+ -> sep [ hang (text "Cannot derive well-kinded instance of form"+ <+> quotes (pprClassPred cls cls_tys+ <+> parens (ppr tc <+> text "...")))+ 2 empty+ , nest 2 (text "Class" <+> quotes (ppr cls)+ <+> text "expects an argument of kind"+ <+> quotes (pprKind cls_kind))+ ]+ DerivErrSafeHaskellGenericInst+ -> text "Generic instances can only be derived in"+ <+> text "Safe Haskell using the stock strategy."+ DerivErrDerivingViaWrongKind 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))+ DerivErrNoEtaReduce inst_ty+ -> sep [text "Cannot eta-reduce to an instance of form",+ nest 2 (text "instance (...) =>"+ <+> pprClassPred cls (cls_tys ++ [inst_ty]))]+ DerivErrBootFileFound+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (text "Cannot derive instances in hs-boot files"+ $+$ text "Write an instance declaration instead")+ DerivErrDataConsNotAllInScope tc+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (hang (text "The data constructors of" <+> quotes (ppr tc) <+> text "are not all in scope")+ 2 (text "so you cannot derive an instance for it"))+ DerivErrGNDUsedOnData+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (text "GeneralizedNewtypeDeriving cannot be used on non-newtypes")+ DerivErrNullaryClasses+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (text "Cannot derive instances for nullary classes")+ DerivErrLastArgMustBeApp+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ ( text "The last argument of the instance must be a"+ <+> text "data or newtype application")+ DerivErrNoFamilyInstance tc tc_args+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (text "No family instance for" <+> quotes (pprTypeApp tc tc_args))+ DerivErrNotStockDeriveable _+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (quotes (ppr cls) <+> text "is not a stock derivable class (Eq, Show, etc.)")+ DerivErrHasAssociatedDatatypes hasAdfs at_last_cls_tv_in_kinds at_without_last_cls_tv+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ $ vcat [ ppWhen (hasAdfs == YesHasAdfs) adfs_msg+ , case at_without_last_cls_tv of+ YesAssociatedTyNotParamOverLastTyVar tc -> at_without_last_cls_tv_msg tc+ NoAssociatedTyNotParamOverLastTyVar -> empty+ , case at_last_cls_tv_in_kinds of+ YesAssocTyLastVarInKind tc -> at_last_cls_tv_in_kinds_msg tc+ NoAssocTyLastVarInKind -> empty+ ]+ where++ 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")+ DerivErrNewtypeNonDeriveableClass+ -> derivErrDiagnosticMessage cls cls_tys mb_strat newtype_deriving pprHerald (DerivErrNotStockDeriveable NoDeriveAnyClassEnabled)+ DerivErrCannotEtaReduceEnough eta_ok+ -> let cant_derive_err = ppUnless eta_ok eta_msg+ eta_msg = text "cannot eta-reduce the representation type enough"+ in cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ cant_derive_err+ DerivErrOnlyAnyClassDeriveable tc _+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (quotes (ppr tc) <+> text "is a type class,"+ <+> text "and can only have a derived instance"+ $+$ text "if DeriveAnyClass is enabled")+ DerivErrNotDeriveable _+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald empty+ DerivErrNotAClass predType+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (quotes (ppr predType) <+> text "is not a class")+ DerivErrNoConstructors rep_tc+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (quotes (pprSourceTyCon rep_tc) <+> text "must have at least one data constructor")+ DerivErrLangExtRequired ext+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (text "You need " <> ppr ext+ <+> text "to derive an instance for this class")+ DerivErrDunnoHowToDeriveForType ty+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (hang (text "Don't know how to derive" <+> quotes (ppr cls))+ 2 (text "for type" <+> quotes (ppr ty)))+ DerivErrMustBeEnumType rep_tc+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (sep [ quotes (pprSourceTyCon rep_tc) <+>+ text "must be an enumeration type"+ , text "(an enumeration consists of one or more nullary, non-GADT constructors)" ])++ DerivErrMustHaveExactlyOneConstructor rep_tc+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (quotes (pprSourceTyCon rep_tc) <+> text "must have precisely one constructor")+ DerivErrMustHaveSomeParameters rep_tc+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (text "Data type" <+> quotes (ppr rep_tc) <+> text "must have some type parameters")+ DerivErrMustNotHaveClassContext rep_tc bad_stupid_theta+ -> cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (text "Data type" <+> quotes (ppr rep_tc)+ <+> text "must not have a class context:" <+> pprTheta bad_stupid_theta)+ DerivErrBadConstructor _ reasons+ -> let why = vcat $ map renderReason reasons+ in cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald why+ where+ renderReason = \case+ DerivErrBadConExistential con+ -> badCon con $ text "must be truly polymorphic in the last argument of the data type"+ DerivErrBadConCovariant con+ -> badCon con $ text "must not use the type variable in a function argument"+ DerivErrBadConFunTypes con+ -> badCon con $ text "must not contain function types"+ DerivErrBadConWrongArg con+ -> badCon con $ text "must use the type variable only as the last argument of a data type"+ DerivErrBadConIsGADT con+ -> badCon con $ text "is a GADT"+ DerivErrBadConHasExistentials con+ -> badCon con $ text "has existential type variables in its type"+ DerivErrBadConHasConstraints con+ -> badCon con $ text "has constraints in its type"+ DerivErrBadConHasHigherRankType con+ -> badCon con $ text "has a higher-rank type"+ DerivErrGenerics reasons+ -> let why = vcat $ map renderReason reasons+ in cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald why+ where+ renderReason = \case+ DerivErrGenericsMustNotHaveDatatypeContext tc_name+ -> ppr tc_name <+> text "must not have a datatype context"+ DerivErrGenericsMustNotHaveExoticArgs dc+ -> ppr dc <+> text "must not have exotic unlifted or polymorphic arguments"+ DerivErrGenericsMustBeVanillaDataCon dc+ -> ppr dc <+> text "must be a vanilla data constructor"+ DerivErrGenericsMustHaveSomeTypeParams rep_tc+ -> text "Data type" <+> quotes (ppr rep_tc)+ <+> text "must have some type parameters"+ DerivErrGenericsMustNotHaveExistentials con+ -> badCon con $ text "must not have existential arguments"+ DerivErrGenericsWrongArgKind con+ -> badCon con $+ text "applies a type to an argument involving the last parameter"+ $$ text "but the applied type is not of kind * -> *"+ DerivErrEnumOrProduct this that+ -> let ppr1 = derivErrDiagnosticMessage cls cls_tys mb_strat newtype_deriving False this+ ppr2 = derivErrDiagnosticMessage cls cls_tys mb_strat newtype_deriving False that+ in cannotMakeDerivedInstanceHerald cls cls_tys mb_strat newtype_deriving pprHerald+ (ppr1 $$ text " or" $$ ppr2)++lookupInstanceErrDiagnosticMessage :: Class+ -> [Type]+ -> LookupInstanceErrReason+ -> SDoc+lookupInstanceErrDiagnosticMessage cls tys = \case+ LookupInstErrNotExact+ -> text "Not an exact match (i.e., some variables get instantiated)"+ LookupInstErrFlexiVar+ -> text "flexible type variable:" <+> (ppr $ mkTyConApp (classTyCon cls) tys)+ LookupInstErrNotFound+ -> text "instance not found" <+> (ppr $ mkTyConApp (classTyCon cls) tys)++{- *********************************************************************+* *+ Outputable SolverReportErrCtxt (for debugging)+* *+**********************************************************************-}++instance Outputable SolverReportErrCtxt where+ ppr (CEC { cec_binds = bvar+ , cec_defer_type_errors = dte+ , cec_expr_holes = eh+ , cec_type_holes = th+ , cec_out_of_scope_holes = osh+ , cec_warn_redundant = wr+ , cec_expand_syns = es+ , cec_suppress = sup })+ = text "CEC" <+> braces (vcat+ [ text "cec_binds" <+> equals <+> ppr bvar+ , text "cec_defer_type_errors" <+> equals <+> ppr dte+ , text "cec_expr_holes" <+> equals <+> ppr eh+ , text "cec_type_holes" <+> equals <+> ppr th+ , text "cec_out_of_scope_holes" <+> equals <+> ppr osh+ , text "cec_warn_redundant" <+> equals <+> ppr wr+ , text "cec_expand_syns" <+> equals <+> ppr es+ , text "cec_suppress" <+> equals <+> ppr sup ])++{- *********************************************************************+* *+ Outputting TcSolverReportMsg errors+* *+**********************************************************************-}++-- | Pretty-print a 'SolverReportWithCtxt', containing a 'TcSolverReportMsg'+-- with its enclosing 'SolverReportErrCtxt'.+pprSolverReportWithCtxt :: SolverReportWithCtxt -> SDoc+pprSolverReportWithCtxt (SolverReportWithCtxt { reportContext = ctxt, reportContent = msg })+ = pprTcSolverReportMsg ctxt msg++-- | Pretty-print a 'TcSolverReportMsg', with its enclosing 'SolverReportErrCtxt'.+pprTcSolverReportMsg :: SolverReportErrCtxt -> TcSolverReportMsg -> SDoc+pprTcSolverReportMsg _ (BadTelescope telescope skols) =+ hang (text "These kind and type variables:" <+> ppr telescope $$+ text "are out of dependency order. Perhaps try this ordering:")+ 2 (pprTyVars sorted_tvs)+ where+ sorted_tvs = scopedSort skols+pprTcSolverReportMsg _ (UserTypeError ty) =+ pprUserTypeErrorTy ty+pprTcSolverReportMsg _ (UnsatisfiableError ty) =+ pprUserTypeErrorTy ty+pprTcSolverReportMsg ctxt (ReportHoleError hole err) =+ pprHoleError ctxt hole err+pprTcSolverReportMsg ctxt+ (CannotUnifyVariable+ { mismatchMsg = msg+ , cannotUnifyReason = reason })+ = pprMismatchMsg ctxt msg+ $$ pprCannotUnifyVariableReason ctxt reason+pprTcSolverReportMsg ctxt+ (Mismatch+ { mismatchMsg = mismatch_msg+ , mismatchTyVarInfo = tv_info+ , mismatchAmbiguityInfo = ambig_infos+ , mismatchCoercibleInfo = coercible_info })+ = vcat ([ pprMismatchMsg ctxt mismatch_msg+ , maybe empty (pprTyVarInfo ctxt) tv_info+ , maybe empty pprCoercibleMsg coercible_info ]+ ++ (map pprAmbiguityInfo ambig_infos))+pprTcSolverReportMsg _ (FixedRuntimeRepError frr_origs) =+ vcat (map make_msg frr_origs)+ where+ -- Assemble the error message: pair up each origin with the corresponding type, e.g.+ -- • FixedRuntimeRep origin msg 1 ...+ -- a :: TYPE r1+ -- • FixedRuntimeRep origin msg 2 ...+ -- b :: TYPE r2+ make_msg :: FixedRuntimeRepErrorInfo -> SDoc+ make_msg (FRR_Info { frr_info_origin =+ FixedRuntimeRepOrigin+ { frr_type = ty+ , frr_context = frr_ctxt }+ , frr_info_not_concrete =+ mb_not_conc }) =+ -- Add bullet points if there is more than one error.+ (if length frr_origs > 1 then (bullet <+>) else id) $+ vcat [ sep [ pprFixedRuntimeRepContext frr_ctxt+ , text "does not have a fixed runtime representation." ]+ , type_printout ty+ , case mb_not_conc of+ Nothing -> empty+ Just (conc_tv, not_conc) ->+ unsolved_concrete_eq_explanation conc_tv not_conc ]++ -- Don't print out the type (only the kind), if the type includes+ -- a confusing cast, unless the user passed -fprint-explicit-coercions.+ --+ -- Example:+ --+ -- In T20363, we have a representation-polymorphism error with a type+ -- of the form+ --+ -- ( (# #) |> co ) :: TYPE NilRep+ --+ -- where NilRep is a nullary type family application which reduces to TupleRep '[].+ -- We prefer avoiding showing the cast to the user, but we also don't want to+ -- print the confusing:+ --+ -- (# #) :: TYPE NilRep+ --+ -- So in this case we simply don't print the type, only the kind.+ confusing_cast :: Type -> Bool+ confusing_cast ty =+ case ty of+ CastTy inner_ty _+ -- A confusing cast is one that is responsible+ -- for a representation-polymorphism error.+ -> isConcreteType (typeKind inner_ty)+ _ -> False++ type_printout :: Type -> SDoc+ type_printout ty =+ sdocOption sdocPrintExplicitCoercions $ \ show_coercions ->+ if confusing_cast ty && not show_coercions+ then vcat [ text "Its kind is:"+ , nest 2 $ pprWithTYPE (typeKind ty)+ , text "(Use -fprint-explicit-coercions to see the full type.)" ]+ else vcat [ text "Its type is:"+ , nest 2 $ ppr ty <+> dcolon <+> pprWithTYPE (typeKind ty) ]++ unsolved_concrete_eq_explanation :: TcTyVar -> Type -> SDoc+ unsolved_concrete_eq_explanation tv not_conc =+ text "Cannot unify" <+> quotes (ppr not_conc)+ <+> text "with the type variable" <+> quotes (ppr tv)+ $$ text "because it is not a concrete" <+> what <> dot+ where+ ki = tyVarKind tv+ what :: SDoc+ what+ | isRuntimeRepTy ki+ = quotes (text "RuntimeRep")+ | isLevityTy ki+ = quotes (text "Levity")+ | otherwise+ = text "type"+pprTcSolverReportMsg _ (BlockedEquality item) =+ vcat [ hang (text "Cannot use equality for substitution:")+ 2 (ppr (errorItemPred item))+ , text "Doing so would be ill-kinded." ]+pprTcSolverReportMsg _ (ExpectingMoreArguments n thing) =+ text "Expecting" <+> speakN (abs n) <+>+ more <+> quotes (ppr thing)+ where+ more+ | n == 1 = text "more argument to"+ | otherwise = text "more arguments to" -- n > 1+pprTcSolverReportMsg ctxt (UnboundImplicitParams (item :| items)) =+ let givens = getUserGivens ctxt+ in if null givens+ then addArising (errorItemCtLoc item) $+ sep [ text "Unbound implicit parameter" <> plural preds+ , nest 2 (pprParendTheta preds) ]+ else pprMismatchMsg ctxt (CouldNotDeduce givens (item :| items) Nothing)+ where+ preds = map errorItemPred (item : items)+pprTcSolverReportMsg _ (AmbiguityPreventsSolvingCt item ambigs) =+ pprAmbiguityInfo (Ambiguity True ambigs) <+>+ pprArising (errorItemCtLoc item) $$+ text "prevents the constraint" <+> quotes (pprParendType $ errorItemPred item)+ <+> text "from being solved."+pprTcSolverReportMsg ctxt@(CEC {cec_encl = implics})+ (CannotResolveInstance item unifiers candidates imp_errs suggs binds)+ =+ vcat+ [ no_inst_msg+ , nest 2 extra_note+ , mb_patsyn_prov `orElse` empty+ , ppWhen (has_ambigs && not (null unifiers && null useful_givens))+ (vcat [ ppUnless lead_with_ambig $+ pprAmbiguityInfo (Ambiguity False (ambig_kvs, ambig_tvs))+ , pprRelevantBindings binds+ , potential_msg ])+ , ppWhen (isNothing mb_patsyn_prov) $+ -- Don't suggest fixes for the provided context of a pattern+ -- synonym; the right fix is to bind more in the pattern+ show_fixes (ctxtFixes has_ambigs pred implics+ ++ drv_fixes ++ naked_sc_fixes)+ , ppWhen (not (null candidates))+ (hang (text "There are instances for similar types:")+ 2 (vcat (map ppr candidates)))+ -- See Note [Report candidate instances]+ , vcat $ map ppr imp_errs+ , vcat $ map ppr suggs ]+ where+ orig = errorItemOrigin item+ pred = errorItemPred item+ (clas, tys) = getClassPredTys pred+ -- See Note [Highlighting ambiguous type variables] in GHC.Tc.Errors+ (ambig_kvs, ambig_tvs) = ambigTkvsOfTy pred+ ambigs = ambig_kvs ++ ambig_tvs+ has_ambigs = not (null ambigs)+ useful_givens = discardProvCtxtGivens orig (getUserGivensFromImplics implics)+ -- useful_givens are the enclosing implications with non-empty givens,+ -- modulo the horrid discardProvCtxtGivens+ lead_with_ambig = not (null ambigs)+ && not (any isRuntimeUnkSkol ambigs)+ && not (null unifiers)+ && null useful_givens++ no_inst_msg :: SDoc+ no_inst_msg+ | lead_with_ambig+ = pprTcSolverReportMsg ctxt $ AmbiguityPreventsSolvingCt item (ambig_kvs, ambig_tvs)+ | otherwise+ = pprMismatchMsg ctxt $ CouldNotDeduce useful_givens (item :| []) Nothing++ -- Report "potential instances" only when the constraint arises+ -- directly from the user's use of an overloaded function+ want_potential (TypeEqOrigin {}) = False+ want_potential _ = True++ potential_msg+ = ppWhen (not (null unifiers) && want_potential orig) $+ potential_hdr $$+ potentialInstancesErrMsg (PotentialInstances { matches = [], unifiers })++ potential_hdr+ = ppWhen lead_with_ambig $+ text "Probable fix: use a type annotation to specify what"+ <+> pprQuotedList ambig_tvs <+> text "should be."++ mb_patsyn_prov :: Maybe SDoc+ mb_patsyn_prov+ | not lead_with_ambig+ , ProvCtxtOrigin PSB{ psb_def = L _ pat } <- orig+ = Just (vcat [ text "In other words, a successful match on the pattern"+ , nest 2 $ ppr pat+ , text "does not provide the constraint" <+> pprParendType pred ])+ | otherwise = Nothing++ extra_note | any isFunTy (filterOutInvisibleTypes (classTyCon clas) tys)+ = text "(maybe you haven't applied a function to enough arguments?)"+ | className clas == typeableClassName -- Avoid mysterious "No instance for (Typeable T)+ , [_,ty] <- tys -- Look for (Typeable (k->*) (T k))+ , Just (tc,_) <- tcSplitTyConApp_maybe ty+ , not (isTypeFamilyTyCon tc)+ = hang (text "GHC can't yet do polykinded")+ 2 (text "Typeable" <+>+ parens (ppr ty <+> dcolon <+> ppr (typeKind ty)))+ | otherwise+ = empty++ drv_fixes = case orig of+ DerivClauseOrigin -> [drv_fix False]+ StandAloneDerivOrigin -> [drv_fix True]+ DerivOriginDC _ _ standalone -> [drv_fix standalone]+ DerivOriginCoerce _ _ _ standalone -> [drv_fix standalone]+ _ -> []++ 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")++ -- naked_sc_fix: try to produce a helpful error message for+ -- superclass constraints caught by the subtleties described by+ -- Note [Recursive superclasses] in GHC.TyCl.Instance+ naked_sc_fixes+ | ScOrigin _ NakedSc <- orig -- A superclass wanted with no instance decls used yet+ , any non_tyvar_preds useful_givens -- Some non-tyvar givens+ = [vcat [ text "If the constraint looks soluble from a superclass of the instance context,"+ , text "read 'Undecidable instances and loopy superclasses' in the user manual" ]]+ | otherwise = []++ non_tyvar_preds :: UserGiven -> Bool+ non_tyvar_preds = any non_tyvar_pred . ic_given++ non_tyvar_pred :: EvVar -> Bool+ -- Tells if the Given is of form (C ty1 .. tyn), where the tys are not all tyvars+ non_tyvar_pred given = case getClassPredTys_maybe (idType given) of+ Just (_, tys) -> not (all isTyVarTy tys)+ Nothing -> False++pprTcSolverReportMsg (CEC {cec_encl = implics}) (OverlappingInstances item matches unifiers) =+ vcat+ [ addArising ct_loc $+ (text "Overlapping instances for"+ <+> pprType (mkClassPred clas tys))+ , ppUnless (null matching_givens) $+ sep [text "Matching givens (or their superclasses):"+ , nest 2 (vcat matching_givens)]+ , potentialInstancesErrMsg+ (PotentialInstances { matches = NE.toList matches, unifiers })+ , ppWhen (null matching_givens && null (NE.tail matches) && null unifiers) $+ -- Intuitively, some given matched the wanted in their+ -- flattened or rewritten (from given equalities) form+ -- but the matcher can't figure that out because the+ -- constraints are non-flat and non-rewritten so we+ -- simply report back the whole given+ -- context. Accelerate Smart.hs showed this problem.+ sep [ text "There exists a (perhaps superclass) match:"+ , nest 2 (vcat (pp_givens useful_givens))]++ , ppWhen (null $ NE.tail matches) $+ parens (vcat [ ppUnless (null tyCoVars) $+ text "The choice depends on the instantiation of" <+>+ quotes (pprWithCommas ppr tyCoVars)+ , ppUnless (null famTyCons) $+ if (null tyCoVars)+ then+ text "The choice depends on the result of evaluating" <+>+ quotes (pprWithCommas ppr famTyCons)+ else+ text "and the result of evaluating" <+>+ quotes (pprWithCommas ppr famTyCons)+ , ppWhen (null (matching_givens)) $+ vcat [ text "To pick the first instance above, use IncoherentInstances"+ , text "when compiling the other instance declarations"]+ ])]+ where+ ct_loc = errorItemCtLoc item+ orig = ctLocOrigin ct_loc+ pred = errorItemPred item+ (clas, tys) = getClassPredTys pred+ tyCoVars = tyCoVarsOfTypesList tys+ famTyCons = filter isFamilyTyCon $ concatMap (nonDetEltsUniqSet . tyConsOfType) tys+ useful_givens = discardProvCtxtGivens orig (getUserGivensFromImplics implics)+ matching_givens = mapMaybe matchable useful_givens+ 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 (getCtLocEnvLoc (ic_env implic)) ])+ where ev_vars_matching = [ pred+ | ev_var <- evvars+ , let pred = evVarPred ev_var+ , any can_match (pred : transSuperClasses pred) ]+ can_match pred+ = case getClassPredTys_maybe pred of+ Just (clas', tys') -> clas' == clas+ && isJust (tcMatchTys tys tys')+ Nothing -> False+pprTcSolverReportMsg _ (UnsafeOverlap item match unsafe_overlapped) =+ vcat [ addArising ct_loc (text "Unsafe overlapping instances for"+ <+> pprType (mkClassPred clas tys))+ , sep [text "The matching instance is:",+ nest 2 (pprInstance match)]+ , vcat [ text "It is compiled in a Safe module and as such can only"+ , text "overlap instances from the same module, however it"+ , text "overlaps the following instances from different" <+>+ text "modules:"+ , nest 2 (vcat [pprInstances $ NE.toList unsafe_overlapped])+ ]+ ]+ where+ ct_loc = errorItemCtLoc item+ pred = errorItemPred item+ (clas, tys) = getClassPredTys pred++pprCannotUnifyVariableReason :: SolverReportErrCtxt -> CannotUnifyVariableReason -> SDoc+pprCannotUnifyVariableReason ctxt (CannotUnifyWithPolytype item tv1 ty2 mb_tv_info) =+ vcat [ (if isSkolemTyVar tv1+ then text "Cannot equate type variable"+ else text "Cannot instantiate unification variable")+ <+> quotes (ppr tv1)+ , hang (text "with a" <+> what <+> text "involving polytypes:") 2 (ppr ty2)+ , maybe empty (pprTyVarInfo ctxt) mb_tv_info ]+ where+ what = text $ levelString $+ ctLocTypeOrKind_maybe (errorItemCtLoc item) `orElse` TypeLevel++pprCannotUnifyVariableReason _ (SkolemEscape item implic esc_skols) =+ let+ esc_doc = sep [ text "because" <+> what <+> text "variable" <> plural esc_skols+ <+> pprQuotedList esc_skols+ , text "would escape" <+>+ if isSingleton esc_skols then text "its scope"+ else text "their scope" ]+ in+ vcat [ nest 2 $ esc_doc+ , sep [ (if isSingleton esc_skols+ then text "This (rigid, skolem)" <+>+ what <+> text "variable is"+ else text "These (rigid, skolem)" <+>+ what <+> text "variables are")+ <+> text "bound by"+ , nest 2 $ ppr (ic_info implic)+ , nest 2 $ text "at" <+>+ ppr (getCtLocEnvLoc (ic_env implic)) ] ]+ where+ what = text $ levelString $+ ctLocTypeOrKind_maybe (errorItemCtLoc item) `orElse` TypeLevel++pprCannotUnifyVariableReason ctxt+ (OccursCheck+ { occursCheckInterestingTyVars = interesting_tvs+ , occursCheckAmbiguityInfos = ambig_infos })+ = ppr_interesting_tyVars interesting_tvs+ $$ vcat (map pprAmbiguityInfo ambig_infos)+ where+ ppr_interesting_tyVars [] = empty+ ppr_interesting_tyVars (tv:tvs) =+ hang (text "Type variable kinds:") 2 $+ vcat (map (tyvar_binding . tidyTyCoVarOcc (cec_tidy ctxt))+ (tv:tvs))+ tyvar_binding tyvar = ppr tyvar <+> dcolon <+> ppr (tyVarKind tyvar)+pprCannotUnifyVariableReason ctxt (DifferentTyVars tv_info)+ = pprTyVarInfo ctxt tv_info+pprCannotUnifyVariableReason ctxt (RepresentationalEq tv_info mb_coercible_msg)+ = pprTyVarInfo ctxt tv_info+ $$ maybe empty pprCoercibleMsg mb_coercible_msg++pprUntouchableVariable :: TcTyVar -> Implication -> SDoc+pprUntouchableVariable tv (Implic { ic_given = given, ic_info = skol_info, ic_env = env })+ = sep [ quotes (ppr tv) <+> text "is untouchable"+ , nest 2 $ text "inside the constraints:" <+> pprEvVarTheta given+ , nest 2 $ text "bound by" <+> ppr skol_info+ , nest 2 $ text "at" <+> ppr (getCtLocEnvLoc env) ]++pprMismatchMsg :: SolverReportErrCtxt -> MismatchMsg -> SDoc+pprMismatchMsg ctxt+ (BasicMismatch { mismatch_ea = ea+ , mismatch_item = item+ , mismatch_ty1 = ty1 -- Expected+ , mismatch_ty2 = ty2 -- Actual+ , mismatch_whenMatching = mb_match_txt+ , mismatch_mb_same_occ = same_occ_info })+ = vcat [ addArising (errorItemCtLoc item) msg+ , ea_extra+ , maybe empty (pprWhenMatching ctxt) mb_match_txt+ , maybe empty pprSameOccInfo same_occ_info ]+ where+ msg+ | (isLiftedRuntimeRep ty1 && isUnliftedRuntimeRep ty2) ||+ (isLiftedRuntimeRep ty2 && isUnliftedRuntimeRep ty1) ||+ (isLiftedLevity ty1 && isUnliftedLevity ty2) ||+ (isLiftedLevity ty2 && isUnliftedLevity ty1)+ = text "Couldn't match a lifted type with an unlifted type"++ | isAtomicTy ty1 || isAtomicTy ty2+ = -- Print with quotes+ sep [ text herald1 <+> quotes (ppr ty1)+ , nest padding $+ text herald2 <+> quotes (ppr ty2) ]++ | otherwise+ = -- Print with vertical layout+ vcat [ text herald1 <> colon <+> ppr ty1+ , nest padding $+ text herald2 <> colon <+> ppr ty2 ]++ herald1 = conc [ "Couldn't match"+ , if is_repr then "representation of" else ""+ , if want_ea then "expected" else ""+ , what ]+ herald2 = conc [ "with"+ , if is_repr then "that of" else ""+ , if want_ea then ("actual " ++ what) else "" ]++ padding = length herald1 - length herald2++ (want_ea, ea_extra)+ = case ea of+ NoEA -> (False, empty)+ EA mb_extra -> (True , maybe empty (pprExpectedActualInfo ctxt) mb_extra)+ is_repr = case errorItemEqRel item of { ReprEq -> True; NomEq -> False }++ what = levelString (ctLocTypeOrKind_maybe (errorItemCtLoc item) `orElse` TypeLevel)++ conc :: [String] -> String+ conc = foldr1 add_space++ add_space :: String -> String -> String+ add_space s1 s2 | null s1 = s2+ | null s2 = s1+ | otherwise = s1 ++ (' ' : s2)+pprMismatchMsg _+ (KindMismatch { kmismatch_what = thing+ , kmismatch_expected = exp+ , kmismatch_actual = act })+ = hang (text "Expected" <+> kind_desc <> comma)+ 2 (text "but" <+> quotes (ppr thing) <+> text "has kind" <+>+ quotes (ppr act))+ where+ kind_desc | isConstraintLikeKind exp = text "a constraint"+ | Just arg <- kindRep_maybe exp -- TYPE t0+ , tcIsTyVarTy arg = sdocOption sdocPrintExplicitRuntimeReps $ \case+ True -> text "kind" <+> quotes (ppr exp)+ False -> text "a type"+ | otherwise = text "kind" <+> quotes (ppr exp)++pprMismatchMsg ctxt+ (TypeEqMismatch { teq_mismatch_ppr_explicit_kinds = ppr_explicit_kinds+ , teq_mismatch_item = item+ , teq_mismatch_ty1 = ty1 -- These types are the actual types+ , teq_mismatch_ty2 = ty2 -- that don't match; may be swapped+ , teq_mismatch_expected = exp -- These are the context of+ , teq_mismatch_actual = act -- the mis-match+ , teq_mismatch_what = mb_thing+ , teq_mb_same_occ = mb_same_occ })+ = addArising ct_loc $ pprWithExplicitKindsWhen ppr_explicit_kinds msg+ $$ maybe empty pprSameOccInfo mb_same_occ+ where+ msg | Just (torc, rep) <- sORTKind_maybe exp+ = msg_for_exp_sort torc rep++ | Just nargs_msg <- num_args_msg+ , Right ea_msg <- mk_ea_msg ctxt (Just item) level orig+ = nargs_msg $$ pprMismatchMsg ctxt ea_msg++ | ea_looks_same ty1 ty2 exp act+ , Right ea_msg <- mk_ea_msg ctxt (Just item) level orig+ = pprMismatchMsg ctxt ea_msg++ | otherwise+ = bale_out_msg++ -- bale_out_msg: the mismatched types are /inside/ exp and act+ bale_out_msg = vcat errs+ where+ errs = case mk_ea_msg ctxt Nothing level orig of+ Left ea_info -> pprMismatchMsg ctxt mismatch_err+ : map (pprExpectedActualInfo ctxt) ea_info+ Right ea_err -> [ pprMismatchMsg ctxt mismatch_err+ , pprMismatchMsg ctxt ea_err ]+ mismatch_err = mkBasicMismatchMsg NoEA item ty1 ty2++ -- 'expected' is (TYPE rep) or (CONSTRAINT rep)+ msg_for_exp_sort exp_torc exp_rep+ | Just (act_torc, act_rep) <- sORTKind_maybe act+ = -- (TYPE exp_rep) ~ (CONSTRAINT act_rep) etc+ msg_torc_torc act_torc act_rep+ | otherwise+ = -- (TYPE _) ~ Bool, etc+ maybe_num_args_msg $$+ sep [ text "Expected a" <+> ppr_torc exp_torc <> comma+ , text "but" <+> case mb_thing of+ Nothing -> text "found something with kind"+ Just thing -> quotes (ppr thing) <+> text "has kind"+ , quotes (pprWithTYPE act) ]++ where+ msg_torc_torc act_torc act_rep+ | exp_torc == act_torc+ = msg_same_torc act_torc act_rep+ | otherwise+ = sep [ text "Expected a" <+> ppr_torc exp_torc <> comma+ , text "but" <+> case mb_thing of+ Nothing -> text "found a"+ Just thing -> quotes (ppr thing) <+> text "is a"+ <+> ppr_torc act_torc ]++ msg_same_torc act_torc act_rep+ | Just exp_doc <- describe_rep exp_rep+ , Just act_doc <- describe_rep act_rep+ = sep [ text "Expected" <+> exp_doc <+> ppr_torc exp_torc <> comma+ , text "but" <+> case mb_thing of+ Just thing -> quotes (ppr thing) <+> text "is"+ Nothing -> text "got"+ <+> act_doc <+> ppr_torc act_torc ]+ msg_same_torc _ _ = bale_out_msg++ ct_loc = errorItemCtLoc item+ orig = errorItemOrigin item+ level = ctLocTypeOrKind_maybe ct_loc `orElse` TypeLevel++ num_args_msg = case level of+ KindLevel+ | not (isMetaTyVarTy exp) && not (isMetaTyVarTy act)+ -- if one is a meta-tyvar, then it's possible that the user+ -- has asked for something impredicative, and we couldn't unify.+ -- Don't bother with counting arguments.+ -> let n_act = count_args act+ n_exp = count_args exp in+ case n_act - n_exp of+ n | n > 0 -- we don't know how many args there are, so don't+ -- recommend removing args that aren't+ , Just thing <- mb_thing+ -> Just $ pprTcSolverReportMsg ctxt (ExpectingMoreArguments n thing)+ _ -> Nothing++ _ -> Nothing++ maybe_num_args_msg = num_args_msg `orElse` empty++ count_args ty = count isVisiblePiTyBinder $ fst $ splitPiTys ty++ ppr_torc TypeLike = text "type";+ ppr_torc ConstraintLike = text "constraint"++ describe_rep :: RuntimeRepType -> Maybe SDoc+ -- describe_rep IntRep = Just "an IntRep"+ -- describe_rep (BoxedRep Lifted) = Just "a lifted"+ -- etc+ describe_rep rep+ | Just (rr_tc, rr_args) <- splitRuntimeRep_maybe rep+ = case rr_args of+ [lev_ty] | rr_tc `hasKey` boxedRepDataConKey+ , Just lev <- levityType_maybe lev_ty+ -> case lev of+ Lifted -> Just (text "a lifted")+ Unlifted -> Just (text "a boxed unlifted")+ [] | rr_tc `hasKey` tupleRepDataConTyConKey -> Just (text "a zero-bit")+ | starts_with_vowel rr_occ -> Just (text "an" <+> text rr_occ)+ | otherwise -> Just (text "a" <+> text rr_occ)+ where+ rr_occ = occNameString (getOccName rr_tc)++ _ -> Nothing -- Must be TupleRep [r1..rn]+ | otherwise = Nothing++ starts_with_vowel (c:_) = c `elem` "AEIOU"+ starts_with_vowel [] = False++pprMismatchMsg ctxt (CouldNotDeduce useful_givens (item :| others) mb_extra)+ = main_msg $$+ case supplementary of+ Left infos+ -> vcat (map (pprExpectedActualInfo ctxt) infos)+ Right other_msg+ -> pprMismatchMsg ctxt other_msg+ where+ main_msg+ | null useful_givens+ = addArising ct_loc (no_instance_msg <+> missing)+ | otherwise+ = vcat (addArising ct_loc (no_deduce_msg <+> missing)+ : pp_givens useful_givens)++ supplementary = case mb_extra of+ Nothing+ -> Left []+ Just (CND_Extra level ty1 ty2)+ -> mk_supplementary_ea_msg ctxt level ty1 ty2 orig+ ct_loc = errorItemCtLoc item+ orig = ctLocOrigin ct_loc+ wanteds = map errorItemPred (item:others)++ no_instance_msg =+ case wanteds of+ [wanted] | Just (tc, _) <- splitTyConApp_maybe wanted+ -- Don't say "no instance" for a constraint such as "c" for a type variable c.+ , isClassTyCon tc -> text "No instance for"+ _ -> text "Could not solve:"++ no_deduce_msg =+ case wanteds of+ [_wanted] -> text "Could not deduce"+ _ -> text "Could not deduce:"++ missing =+ case wanteds of+ [wanted] -> quotes (ppr wanted)+ _ -> pprTheta wanteds++++{- *********************************************************************+* *+ Displaying potential instances+* *+**********************************************************************-}++-- | Directly display the given matching and unifying instances,+-- with a header for each: `Matching instances`/`Potentially matching instances`.+pprPotentialInstances :: (ClsInst -> SDoc) -> PotentialInstances -> SDoc+pprPotentialInstances ppr_inst (PotentialInstances { matches, unifiers }) =+ vcat+ [ ppWhen (not $ null matches) $+ text "Matching instance" <> plural matches <> colon $$+ nest 2 (vcat (map ppr_inst matches))+ , ppWhen (not $ null unifiers) $+ (text "Potentially matching instance" <> plural unifiers <> colon) $$+ nest 2 (vcat (map ppr_inst unifiers))+ ]++-- | Display a summary of available instances, omitting those involving+-- out-of-scope types, in order to explain why we couldn't solve a particular+-- constraint, e.g. due to instance overlap or out-of-scope types.+--+-- To directly display a collection of matching/unifying instances,+-- use 'pprPotentialInstances'.+potentialInstancesErrMsg :: PotentialInstances -> SDoc+-- See Note [Displaying potential instances]+potentialInstancesErrMsg potentials =+ sdocOption sdocPrintPotentialInstances $ \print_insts ->+ getPprStyle $ \sty ->+ potentials_msg_with_options potentials print_insts sty++-- | Display a summary of available instances, omitting out-of-scope ones.+--+-- Use 'potentialInstancesErrMsg' to automatically set the pretty-printing+-- options.+potentials_msg_with_options :: PotentialInstances+ -> Bool -- ^ Whether to print /all/ potential instances+ -> PprStyle+ -> SDoc+potentials_msg_with_options+ (PotentialInstances { matches, unifiers })+ show_all_potentials sty+ | null matches && null unifiers+ = empty++ | null show_these_matches && null show_these_unifiers+ = vcat [ not_in_scope_msg empty+ , flag_hint ]++ | otherwise+ = vcat [ pprPotentialInstances+ pprInstance -- print instance + location info+ (PotentialInstances+ { matches = show_these_matches+ , unifiers = show_these_unifiers })+ , overlapping_but_not_more_specific_msg sorted_matches+ , nest 2 $ vcat+ [ ppWhen (n_in_scope_hidden > 0) $+ text "...plus"+ <+> speakNOf n_in_scope_hidden (text "other")+ , ppWhen (not_in_scopes > 0) $+ not_in_scope_msg (text "...plus")+ , flag_hint ] ]+ where+ n_show_matches, n_show_unifiers :: Int+ n_show_matches = 3+ n_show_unifiers = 2++ (in_scope_matches, not_in_scope_matches) = partition inst_in_scope matches+ (in_scope_unifiers, not_in_scope_unifiers) = partition inst_in_scope unifiers+ sorted_matches = sortBy fuzzyClsInstCmp in_scope_matches+ sorted_unifiers = sortBy fuzzyClsInstCmp in_scope_unifiers+ (show_these_matches, show_these_unifiers)+ | show_all_potentials = (sorted_matches, sorted_unifiers)+ | otherwise = (take n_show_matches sorted_matches+ ,take n_show_unifiers sorted_unifiers)+ n_in_scope_hidden+ = length sorted_matches + length sorted_unifiers+ - length show_these_matches - length show_these_unifiers++ -- "in scope" means that all the type constructors+ -- are lexically in scope; these instances are likely+ -- to be more useful+ inst_in_scope :: ClsInst -> Bool+ inst_in_scope cls_inst = nameSetAll name_in_scope $+ orphNamesOfTypes (is_tys cls_inst)++ name_in_scope name+ | pretendNameIsInScope name+ = True -- E.g. (->); see Note [pretendNameIsInScope] in GHC.Builtin.Names+ | Just mod <- nameModule_maybe name+ = qual_in_scope (qualName sty mod (nameOccName name))+ | otherwise+ = True++ qual_in_scope :: QualifyName -> Bool+ qual_in_scope NameUnqual = True+ qual_in_scope (NameQual {}) = True+ qual_in_scope _ = False++ not_in_scopes :: Int+ not_in_scopes = length not_in_scope_matches + length not_in_scope_unifiers++ not_in_scope_msg herald =+ hang (herald <+> speakNOf not_in_scopes (text "instance")+ <+> text "involving out-of-scope types")+ 2 (ppWhen show_all_potentials $+ pprPotentialInstances+ pprInstanceHdr -- only print the header, not the instance location info+ (PotentialInstances+ { matches = not_in_scope_matches+ , unifiers = not_in_scope_unifiers+ }))++ flag_hint = ppUnless (show_all_potentials+ || (equalLength show_these_matches matches+ && equalLength show_these_unifiers unifiers)) $+ text "(use -fprint-potential-instances to see them all)"++-- | Compute a message informing the user of any instances that are overlapped+-- but were not discarded because the instance overlapping them wasn't+-- strictly more specific.+overlapping_but_not_more_specific_msg :: [ClsInst] -> SDoc+overlapping_but_not_more_specific_msg insts+ -- Only print one example of "overlapping but not strictly more specific",+ -- to avoid information overload.+ | overlap : _ <- overlapping_but_not_more_specific+ = overlap_header $$ ppr_overlapping overlap+ | otherwise+ = empty+ where+ overlap_header :: SDoc+ overlap_header+ | [_] <- overlapping_but_not_more_specific+ = text "An overlapping instance can only be chosen when it is strictly more specific."+ | otherwise+ = text "Overlapping instances can only be chosen when they are strictly more specific."+ overlapping_but_not_more_specific :: [(ClsInst, ClsInst)]+ overlapping_but_not_more_specific+ = nubOrdBy (comparing (is_dfun . fst))+ [ (overlapper, overlappee)+ | these <- groupBy ((==) `on` is_cls_nm) insts+ -- Take all pairs of distinct instances...+ , one:others <- tails these -- if `these = [inst_1, inst_2, ...]`+ , other <- others -- then we get pairs `(one, other) = (inst_i, inst_j)` with `i < j`+ -- ... such that one instance in the pair overlaps the other...+ , let mb_overlapping+ | hasOverlappingFlag (overlapMode $ is_flag one)+ || hasOverlappableFlag (overlapMode $ is_flag other)+ = [(one, other)]+ | hasOverlappingFlag (overlapMode $ is_flag other)+ || hasOverlappableFlag (overlapMode $ is_flag one)+ = [(other, one)]+ | otherwise+ = []+ , (overlapper, overlappee) <- mb_overlapping+ -- ... but the overlapper is not more specific than the overlappee.+ , not (overlapper `more_specific_than` overlappee)+ ]+ more_specific_than :: ClsInst -> ClsInst -> Bool+ is1 `more_specific_than` is2+ = isJust (tcMatchTys (is_tys is1) (is_tys is2))+ ppr_overlapping :: (ClsInst, ClsInst) -> SDoc+ ppr_overlapping (overlapper, overlappee)+ = text "The first instance that follows overlaps the second, but is not more specific than it:"+ $$ nest 2 (vcat $ map pprInstanceHdr [overlapper, overlappee])++{- Note [Displaying potential instances]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When showing a list of instances for+ - overlapping instances (show ones that match)+ - no such instance (show ones that could match)+we want to give it a bit of structure. Here's the plan++* Say that an instance is "in scope" if all of the+ type constructors it mentions are lexically in scope.+ These are the ones most likely to be useful to the programmer.++* Show at most n_show in-scope instances,+ and summarise the rest ("plus N others")++* Summarise the not-in-scope instances ("plus 4 not in scope")++* Add the flag -fshow-potential-instances which replaces the+ summary with the full list+-}++{- *********************************************************************+* *+ Outputting additional solver report information+* *+**********************************************************************-}++-- | Pretty-print an informational message, to accompany a 'TcSolverReportMsg'.+pprExpectedActualInfo :: SolverReportErrCtxt -> ExpectedActualInfo -> SDoc+pprExpectedActualInfo _ (ExpectedActual { ea_expected = exp, ea_actual = act }) =+ vcat+ [ text "Expected:" <+> ppr exp+ , text " Actual:" <+> ppr act ]+pprExpectedActualInfo _+ (ExpectedActualAfterTySynExpansion+ { ea_expanded_expected = exp+ , ea_expanded_actual = act } )+ = vcat+ [ text "Type synonyms expanded:"+ , text "Expected type:" <+> ppr exp+ , text " Actual type:" <+> ppr act ]++pprCoercibleMsg :: CoercibleMsg -> SDoc+pprCoercibleMsg (UnknownRoles ty) =+ hang (text "NB: We cannot know what roles the parameters to" <+>+ quotes (ppr ty) <+> text "have;")+ 2 (text "we must assume that the role is nominal")+pprCoercibleMsg (TyConIsAbstract tc) =+ hsep [ text "NB: The type constructor"+ , quotes (pprSourceTyCon tc)+ , text "is abstract" ]+pprCoercibleMsg (OutOfScopeNewtypeConstructor tc dc) =+ hang (text "The data constructor" <+> quotes (ppr $ dataConName dc))+ 2 (sep [ text "of newtype" <+> quotes (pprSourceTyCon tc)+ , text "is not in scope" ])++pprWhenMatching :: SolverReportErrCtxt -> WhenMatching -> SDoc+pprWhenMatching ctxt (WhenMatching cty1 cty2 sub_o mb_sub_t_or_k) =+ sdocOption sdocPrintExplicitCoercions $ \printExplicitCoercions ->+ if printExplicitCoercions+ || not (cty1 `pickyEqType` cty2)+ then vcat [ hang (text "When matching" <+> sub_whats)+ 2 (vcat [ ppr cty1 <+> dcolon <+>+ ppr (typeKind cty1)+ , ppr cty2 <+> dcolon <+>+ ppr (typeKind cty2) ])+ , supplementary ]+ else text "When matching the kind of" <+> quotes (ppr cty1)+ where+ sub_t_or_k = mb_sub_t_or_k `orElse` TypeLevel+ sub_whats = text (levelString sub_t_or_k) <> char 's'+ supplementary =+ case mk_supplementary_ea_msg ctxt sub_t_or_k cty1 cty2 sub_o of+ Left infos -> vcat $ map (pprExpectedActualInfo ctxt) infos+ Right msg -> pprMismatchMsg ctxt msg++pprTyVarInfo :: SolverReportErrCtxt -> TyVarInfo -> SDoc+pprTyVarInfo ctxt (TyVarInfo { thisTyVar = tv1, otherTy = mb_tv2, thisTyVarIsUntouchable = mb_implic })+ = vcat [ mk_msg tv1+ , maybe empty (pprUntouchableVariable tv1) mb_implic+ , case mb_tv2 of { Nothing -> empty; Just tv2 -> mk_msg tv2 } ]+ where+ mk_msg tv = case tcTyVarDetails tv of+ SkolemTv sk_info _ _ -> pprSkols ctxt [(getSkolemInfo sk_info, [tv])]+ RuntimeUnk {} -> quotes (ppr tv) <+> text "is an interactive-debugger skolem"+ MetaTv {} -> empty++pprAmbiguityInfo :: AmbiguityInfo -> SDoc+pprAmbiguityInfo (Ambiguity prepend_msg (ambig_kvs, ambig_tvs)) = msg+ where++ msg | any isRuntimeUnkSkol ambig_kvs -- See Note [Runtime skolems]+ || any isRuntimeUnkSkol ambig_tvs+ = vcat [ text "Cannot resolve unknown runtime type"+ <> plural ambig_tvs <+> pprQuotedList ambig_tvs+ , text "Use :print or :force to determine these types"]++ | not (null ambig_tvs)+ = pp_ambig (text "type") ambig_tvs++ | otherwise+ = pp_ambig (text "kind") ambig_kvs++ pp_ambig what tkvs+ | prepend_msg -- "Ambiguous type variable 't0'"+ = text "Ambiguous" <+> what <+> text "variable"+ <> plural tkvs <+> pprQuotedList tkvs++ | otherwise -- "The type variable 't0' is ambiguous"+ = text "The" <+> what <+> text "variable" <> plural tkvs+ <+> pprQuotedList tkvs <+> isOrAre tkvs <+> text "ambiguous"+pprAmbiguityInfo (NonInjectiveTyFam tc) =+ text "NB:" <+> quotes (ppr tc)+ <+> text "is a non-injective type family"++pprSameOccInfo :: SameOccInfo -> SDoc+pprSameOccInfo (SameOcc same_pkg n1 n2) =+ text "NB:" <+> (ppr_from same_pkg n1 $$ ppr_from same_pkg n2)+ where+ ppr_from same_pkg nm+ | isGoodSrcSpan loc+ = hang (quotes (ppr nm) <+> text "is defined at")+ 2 (ppr loc)+ | otherwise -- Imported things have an UnhelpfulSrcSpan+ = hang (quotes (ppr nm))+ 2 (sep [ text "is defined in" <+> quotes (ppr (moduleName mod))+ , ppUnless (same_pkg || pkg == mainUnit) $+ nest 4 $ text "in package" <+> quotes (ppr pkg) ])+ where+ pkg = moduleUnit mod+ mod = nameModule nm+ loc = nameSrcSpan nm++{- *********************************************************************+* *+ Outputting HoleError messages+* *+**********************************************************************-}++pprHoleError :: SolverReportErrCtxt -> Hole -> HoleError -> SDoc+pprHoleError _ (Hole { hole_ty, hole_occ = rdr }) (OutOfScopeHole imp_errs)+ = out_of_scope_msg $$ vcat (map ppr imp_errs)+ where+ herald | isDataOcc (rdrNameOcc rdr) = text "Data constructor not in scope:"+ | otherwise = text "Variable not in scope:"+ out_of_scope_msg -- Print v :: ty only if the type has structure+ | boring_type = hang herald 2 (ppr rdr)+ | otherwise = hang herald 2 (pp_rdr_with_type rdr hole_ty)+ boring_type = isTyVarTy hole_ty+pprHoleError ctxt (Hole { hole_ty, hole_occ}) (HoleError sort other_tvs hole_skol_info) =+ vcat [ hole_msg+ , tyvars_msg+ , case sort of { ExprHole {} -> expr_hole_hint; _ -> type_hole_hint } ]++ where++ hole_msg = case sort of+ ExprHole {} ->+ hang (text "Found hole:")+ 2 (pp_rdr_with_type hole_occ hole_ty)+ TypeHole ->+ hang (text "Found type wildcard" <+> quotes (ppr hole_occ))+ 2 (text "standing for" <+> quotes pp_hole_type_with_kind)+ ConstraintHole ->+ hang (text "Found extra-constraints wildcard standing for")+ 2 (quotes $ pprType hole_ty) -- always kind Constraint++ hole_kind = typeKind hole_ty++ pp_hole_type_with_kind+ | isLiftedTypeKind hole_kind+ || isCoVarType hole_ty -- Don't print the kind of unlifted+ -- equalities (#15039)+ = pprType hole_ty+ | otherwise+ = pprType hole_ty <+> dcolon <+> pprKind hole_kind++ tyvars = tyCoVarsOfTypeList hole_ty+ tyvars_msg = ppUnless (null tyvars) $+ text "Where:" <+> (vcat (map loc_msg other_tvs)+ $$ pprSkols ctxt hole_skol_info)+ -- Coercion variables can be free in the+ -- hole, via kind casts+ expr_hole_hint -- Give hint for, say, f x = _x+ | lengthFS (occNameFS (rdrNameOcc hole_occ)) > 1 -- Don't give this hint for plain "_"+ = text "Or perhaps" <+> quotes (ppr hole_occ)+ <+> text "is mis-spelled, or not in scope"+ | otherwise+ = empty++ type_hole_hint+ | ErrorWithoutFlag <- cec_type_holes ctxt+ = text "To use the inferred type, enable PartialTypeSignatures"+ | otherwise+ = empty++ loc_msg tv+ | isTyVar tv+ = case tcTyVarDetails tv of+ MetaTv {} -> quotes (ppr tv) <+> text "is an ambiguous type variable"+ _ -> empty -- Skolems dealt with already+ | otherwise -- A coercion variable can be free in the hole type+ = ppWhenOption sdocPrintExplicitCoercions $+ quotes (ppr tv) <+> text "is a coercion variable"++pp_rdr_with_type :: RdrName -> Type -> SDoc+pp_rdr_with_type occ hole_ty = hang (pprPrefixOcc occ) 2 (dcolon <+> pprType hole_ty)++{- *********************************************************************+* *+ Outputting ScopeError messages+* *+**********************************************************************-}++pprScopeError :: RdrName -> NotInScopeError -> SDoc+pprScopeError rdr_name scope_err =+ case scope_err of+ NotInScope ->+ hang (text "Not in scope:")+ 2 (what <+> quotes (ppr rdr_name))+ NotARecordField ->+ hang (text "Not in scope:")+ 2 (text "record field" <+> quotes (ppr rdr_name))+ NoExactName name ->+ text "The Name" <+> quotes (ppr name) <+> text "is not in scope."+ SameName gres ->+ assertPpr (length gres >= 2) (text "pprScopeError SameName: fewer than 2 elements" $$ nest 2 (ppr gres))+ $ hang (text "Same Name in multiple name-spaces:")+ 2 (vcat (map pp_one sorted_names))+ where+ sorted_names = sortBy (leftmost_smallest `on` nameSrcSpan)+ $ map greName gres+ pp_one name+ = hang (pprNameSpace (occNameSpace (getOccName name))+ <+> quotes (ppr name) <> comma)+ 2 (text "declared at:" <+> ppr (nameSrcLoc name))+ MissingBinding thing _ ->+ sep [ text "The" <+> thing+ <+> text "for" <+> quotes (ppr rdr_name)+ , nest 2 $ text "lacks an accompanying binding" ]+ NoTopLevelBinding ->+ hang (text "No top-level binding for")+ 2 (what <+> quotes (ppr rdr_name) <+> text "in this module")+ UnknownSubordinate doc ->+ quotes (ppr rdr_name) <+> text "is not a (visible)" <+> doc+ NotInScopeTc env ->+ vcat[text "GHC internal error:" <+> quotes (ppr rdr_name) <+>+ text "is not in scope during type checking, but it passed the renamer",+ text "tcl_env of environment:" <+> ppr env]+ where+ what = pprNonVarNameSpace (occNameSpace (rdrNameOcc rdr_name))++scopeErrorHints :: NotInScopeError -> [GhcHint]+scopeErrorHints scope_err =+ case scope_err of+ NotInScope -> noHints+ NotARecordField -> noHints+ NoExactName {} -> [SuggestDumpSlices]+ SameName {} -> [SuggestDumpSlices]+ MissingBinding _ hints -> hints+ NoTopLevelBinding -> noHints+ UnknownSubordinate {} -> noHints+ NotInScopeTc _ -> noHints++{- *********************************************************************+* *+ Outputting ImportError messages+* *+**********************************************************************-}++instance Outputable ImportError where+ ppr (MissingModule mod_name) =+ hsep+ [ text "NB: no module named"+ , quotes (ppr mod_name)+ , text "is imported."+ ]+ ppr (ModulesDoNotExport mods occ_name)+ | mod NE.:| [] <- mods+ = hsep+ [ text "NB: the module"+ , quotes (ppr mod)+ , text "does not export"+ , quotes (ppr occ_name) <> dot ]+ | otherwise+ = hsep+ [ text "NB: neither"+ , quotedListWithNor (map ppr $ NE.toList mods)+ , text "export"+ , quotes (ppr occ_name) <> dot ]++{- *********************************************************************+* *+ Suggested fixes for implication constraints+* *+**********************************************************************-}++-- TODO: these functions should use GhcHint instead.++show_fixes :: [SDoc] -> SDoc+show_fixes [] = empty+show_fixes (f:fs) = sep [ text "Possible fix:"+ , nest 2 (vcat (f : map (text "or" <+>) fs))]++ctxtFixes :: Bool -> PredType -> [Implication] -> [SDoc]+ctxtFixes has_ambig_tvs pred implics+ | not has_ambig_tvs+ , isTyVarClassPred pred -- Don't suggest adding (Eq T) to the context, say+ , (skol:skols) <- usefulContext implics pred+ , let what | null skols+ , SigSkol (PatSynCtxt {}) _ _ <- skol+ = text "\"required\""+ | otherwise+ = empty+ = [sep [ text "add" <+> pprParendType pred+ <+> text "to the" <+> what <+> text "context of"+ , nest 2 $ ppr_skol skol $$+ vcat [ text "or" <+> ppr_skol skol+ | skol <- skols ] ] ]+ | otherwise = []+ where+ ppr_skol (PatSkol (RealDataCon dc) _) = text "the data constructor" <+> quotes (ppr dc)+ ppr_skol (PatSkol (PatSynCon ps) _) = text "the pattern synonym" <+> quotes (ppr ps)+ ppr_skol skol_info = ppr skol_info++usefulContext :: [Implication] -> PredType -> [SkolemInfoAnon]+-- usefulContext picks out the implications whose context+-- the programmer might plausibly augment to solve 'pred'+usefulContext implics pred+ = go implics+ where+ pred_tvs = tyCoVarsOfType pred+ go [] = []+ go (ic : ics)+ | implausible ic = rest+ | otherwise = ic_info ic : rest+ where+ -- Stop when the context binds a variable free in the predicate+ rest | any (`elemVarSet` pred_tvs) (ic_skols ic) = []+ | otherwise = go ics++ implausible ic+ | null (ic_skols ic) = True+ | implausible_info (ic_info ic) = True+ | otherwise = False++ implausible_info (SigSkol (InfSigCtxt {}) _ _) = True+ implausible_info _ = False+ -- Do not suggest adding constraints to an *inferred* type signature++pp_givens :: [Implication] -> [SDoc]+pp_givens givens+ = case givens of+ [] -> []+ (g:gs) -> ppr_given (text "from the context:") g+ : map (ppr_given (text "or from:")) gs+ where+ 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 (getCtLocEnvLoc (ic_env implic)) ])++{- *********************************************************************+* *+ CtOrigin information+* *+**********************************************************************-}++levelString :: TypeOrKind -> String+levelString TypeLevel = "type"+levelString KindLevel = "kind"++pprArising :: CtLoc -> SDoc+-- Used for the main, top-level error message+-- We've done special processing for TypeEq, KindEq, givens+pprArising ct_loc+ | in_generated_code = empty -- See Note ["Arising from" messages in generated code]+ | suppress_origin = empty+ | otherwise = pprCtOrigin orig+ where+ orig = ctLocOrigin ct_loc+ in_generated_code = ctLocEnvInGeneratedCode (ctLocEnv ct_loc)+ suppress_origin+ | isGivenOrigin orig = True+ | otherwise = case orig of+ TypeEqOrigin {} -> True -- We've done special processing+ KindEqOrigin {} -> True -- for TypeEq, KindEq, givens+ AmbiguityCheckOrigin {} -> True -- The "In the ambiguity check" context+ -- is sufficient; more would be repetitive+ _ -> False++-- Add the "arising from..." part to a message+addArising :: CtLoc -> SDoc -> SDoc+addArising ct_loc msg = hang msg 2 (pprArising ct_loc)++pprWithArising :: [Ct] -> SDoc+-- Print something like+-- (Eq a) arising from a use of x at y+-- (Show a) arising from a use of p at q+-- Also return a location for the error message+-- Works for Wanted/Derived only+pprWithArising []+ = panic "pprWithArising"+pprWithArising (ct:cts)+ | null cts+ = addArising loc (pprTheta [ctPred ct])+ | otherwise+ = vcat (map ppr_one (ct:cts))+ where+ loc = ctLoc ct+ ppr_one ct' = hang (parens (pprType (ctPred ct')))+ 2 (pprCtLoc (ctLoc ct'))++{- Note ["Arising from" messages in generated code]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider code generated when we desugar code before typechecking;+see Note [Rebindable syntax and HsExpansion].++In this code, constraints may be generated, but we don't want to+say "arising from a call of foo" if 'foo' doesn't appear in the+users code. We leave the actual CtOrigin untouched (partly because+it is generated in many, many places), but suppress the "Arising from"+message for constraints that originate in generated code.+-}+++{- *********************************************************************+* *+ SkolemInfo+* *+**********************************************************************-}+++tidySkolemInfo :: TidyEnv -> SkolemInfo -> SkolemInfo+tidySkolemInfo env (SkolemInfo u sk_anon) = SkolemInfo u (tidySkolemInfoAnon env sk_anon)++----------------+tidySkolemInfoAnon :: TidyEnv -> SkolemInfoAnon -> SkolemInfoAnon+tidySkolemInfoAnon env (DerivSkol ty) = DerivSkol (tidyType env ty)+tidySkolemInfoAnon env (SigSkol cx ty tv_prs) = tidySigSkol env cx ty tv_prs+tidySkolemInfoAnon env (InferSkol ids) = InferSkol (mapSnd (tidyType env) ids)+tidySkolemInfoAnon env (UnifyForAllSkol ty) = UnifyForAllSkol (tidyType env ty)+tidySkolemInfoAnon _ info = info++tidySigSkol :: TidyEnv -> UserTypeCtxt+ -> TcType -> [(Name,TcTyVar)] -> SkolemInfoAnon+-- We need to take special care when tidying SigSkol+-- See Note [SigSkol SkolemInfo] in "GHC.Tc.Types.Origin"+tidySigSkol env cx ty tv_prs+ = SigSkol cx (tidy_ty env ty) tv_prs'+ where+ tv_prs' = mapSnd (tidyTyCoVarOcc env) tv_prs+ inst_env = mkNameEnv tv_prs'++ tidy_ty env (ForAllTy (Bndr tv vis) ty)+ = ForAllTy (Bndr tv' vis) (tidy_ty env' ty)+ where+ (env', tv') = tidy_tv_bndr env tv++ tidy_ty env ty@(FunTy af w arg res) -- Look under c => t+ | isInvisibleFunArg af+ = ty { ft_mult = tidy_ty env w+ , ft_arg = tidyType env arg+ , ft_res = tidy_ty env res }++ tidy_ty env ty = tidyType env ty++ tidy_tv_bndr :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)+ tidy_tv_bndr env@(occ_env, subst) tv+ | Just tv' <- lookupNameEnv inst_env (tyVarName tv)+ = ((occ_env, extendVarEnv subst tv tv'), tv')++ | otherwise+ = tidyVarBndr env tv++pprSkols :: SolverReportErrCtxt -> [(SkolemInfoAnon, [TcTyVar])] -> SDoc+pprSkols ctxt zonked_ty_vars+ =+ let tidy_ty_vars = map (bimap (tidySkolemInfoAnon (cec_tidy ctxt)) id) zonked_ty_vars+ in vcat (map pp_one tidy_ty_vars)+ where++ no_msg = text "No skolem info - we could not find the origin of the following variables" <+> ppr zonked_ty_vars+ $$ text "This should not happen, please report it as a bug following the instructions at:"+ $$ text "https://gitlab.haskell.org/ghc/ghc/wikis/report-a-bug"+++ pp_one (UnkSkol cs, tvs)+ = vcat [ hang (pprQuotedList tvs)+ 2 (is_or_are tvs "a" "(rigid, skolem)")+ , nest 2 (text "of unknown origin")+ , nest 2 (text "bound at" <+> ppr (skolsSpan tvs))+ , no_msg+ , prettyCallStackDoc cs+ ]+ pp_one (RuntimeUnkSkol, tvs)+ = hang (pprQuotedList tvs)+ 2 (is_or_are tvs "an" "unknown runtime")+ pp_one (skol_info, tvs)+ = vcat [ hang (pprQuotedList tvs)+ 2 (is_or_are tvs "a" "rigid" <+> text "bound by")+ , nest 2 (pprSkolInfo skol_info)+ , nest 2 (text "at" <+> ppr (skolsSpan tvs)) ]++ is_or_are [_] article adjective = text "is" <+> text article <+> text adjective+ <+> text "type variable"+ is_or_are _ _ adjective = text "are" <+> text adjective+ <+> text "type variables"++skolsSpan :: [TcTyVar] -> SrcSpan+skolsSpan skol_tvs = foldr1 combineSrcSpans (map getSrcSpan skol_tvs)++{- *********************************************************************+* *+ Utilities for expected/actual messages+* *+**********************************************************************-}++mk_supplementary_ea_msg :: SolverReportErrCtxt -> TypeOrKind+ -> Type -> Type -> CtOrigin -> Either [ExpectedActualInfo] MismatchMsg+mk_supplementary_ea_msg ctxt level ty1 ty2 orig+ | TypeEqOrigin { uo_expected = exp, uo_actual = act } <- orig+ , not (ea_looks_same ty1 ty2 exp act)+ = mk_ea_msg ctxt Nothing level orig+ | otherwise+ = Left []++ea_looks_same :: Type -> Type -> Type -> Type -> Bool+-- True if the faulting types (ty1, ty2) look the same as+-- the expected/actual types (exp, act).+-- If so, we don't want to redundantly report the latter+ea_looks_same ty1 ty2 exp act+ = (act `looks_same` ty1 && exp `looks_same` ty2) ||+ (exp `looks_same` ty1 && act `looks_same` ty2)+ where+ looks_same t1 t2 = t1 `pickyEqType` t2+ || t1 `eqType` liftedTypeKind && t2 `eqType` liftedTypeKind+ -- pickyEqType is sensitive to synonyms, so only replies True+ -- when the types really look the same. However,+ -- (TYPE 'LiftedRep) and Type both print the same way.++mk_ea_msg :: SolverReportErrCtxt -> Maybe ErrorItem -> TypeOrKind+ -> CtOrigin -> Either [ExpectedActualInfo] MismatchMsg+-- Constructs a "Couldn't match" message+-- The (Maybe ErrorItem) says whether this is the main top-level message (Just)+-- or a supplementary message (Nothing)+mk_ea_msg ctxt at_top level+ (TypeEqOrigin { uo_actual = act, uo_expected = exp, uo_thing = mb_thing })+ | Just thing <- mb_thing+ , KindLevel <- level+ = Right $ KindMismatch { kmismatch_what = thing+ , kmismatch_expected = exp+ , kmismatch_actual = act }+ | Just item <- at_top+ , let ea = EA $ if expanded_syns then Just ea_expanded else Nothing+ mismatch = mkBasicMismatchMsg ea item exp act+ = Right mismatch+ | otherwise+ = Left $+ if expanded_syns+ then [ea,ea_expanded]+ else [ea]++ where+ ea = ExpectedActual { ea_expected = exp, ea_actual = act }+ ea_expanded =+ ExpectedActualAfterTySynExpansion+ { ea_expanded_expected = expTy1+ , ea_expanded_actual = expTy2 }++ expanded_syns = cec_expand_syns ctxt+ && not (expTy1 `pickyEqType` exp && expTy2 `pickyEqType` act)+ (expTy1, expTy2) = expandSynonymsToMatch exp act+mk_ea_msg _ _ _ _ = Left []++{- Note [Expanding type synonyms to make types similar]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++In type error messages, if -fprint-expanded-types is used, we want to expand+type synonyms to make expected and found types as similar as possible, but we+shouldn't expand types too much to make type messages even more verbose and+harder to understand. The whole point here is to make the difference in expected+and found types clearer.++`expandSynonymsToMatch` does this, it takes two types, and expands type synonyms+only as much as necessary. Given two types t1 and t2:++ * If they're already same, it just returns the types.++ * If they're in form `C1 t1_1 .. t1_n` and `C2 t2_1 .. t2_m` (C1 and C2 are+ type constructors), it expands C1 and C2 if they're different type synonyms.+ Then it recursively does the same thing on expanded types. If C1 and C2 are+ same, then it applies the same procedure to arguments of C1 and arguments of+ C2 to make them as similar as possible.++ Most important thing here is to keep number of synonym expansions at+ minimum. For example, if t1 is `T (T3, T5, Int)` and t2 is `T (T5, T3,+ Bool)` where T5 = T4, T4 = T3, ..., T1 = X, it returns `T (T3, T3, Int)` and+ `T (T3, T3, Bool)`.++ * Otherwise types don't have same shapes and so the difference is clearly+ visible. It doesn't do any expansions and show these types.++Note that we only expand top-layer type synonyms. Only when top-layer+constructors are the same we start expanding inner type synonyms.++Suppose top-layer type synonyms of t1 and t2 can expand N and M times,+respectively. If their type-synonym-expanded forms will meet at some point (i.e.+will have same shapes according to `sameShapes` function), it's possible to find+where they meet in O(N+M) top-layer type synonym expansions and O(min(N,M))+comparisons. We first collect all the top-layer expansions of t1 and t2 in two+lists, then drop the prefix of the longer list so that they have same lengths.+Then we search through both lists in parallel, and return the first pair of+types that have same shapes. Inner types of these two types with same shapes+are then expanded using the same algorithm.++In case they don't meet, we return the last pair of types in the lists, which+has top-layer type synonyms completely expanded. (in this case the inner types+are not expanded at all, as the current form already shows the type error)+-}++-- | Expand type synonyms in given types only enough to make them as similar as+-- possible. Returned types are the same in terms of used type synonyms.+--+-- To expand all synonyms, see 'Type.expandTypeSynonyms'.+--+-- See `ExpandSynsFail` tests in tests testsuite/tests/typecheck/should_fail for+-- some examples of how this should work.+expandSynonymsToMatch :: Type -> Type -> (Type, Type)+expandSynonymsToMatch ty1 ty2 = (ty1_ret, ty2_ret)+ where+ (ty1_ret, ty2_ret) = go ty1 ty2++ -- Returns (type synonym expanded version of first type,+ -- type synonym expanded version of second type)+ go :: Type -> Type -> (Type, Type)+ go t1 t2+ | t1 `pickyEqType` t2 =+ -- Types are same, nothing to do+ (t1, t2)++ go (TyConApp tc1 tys1) (TyConApp tc2 tys2)+ | tc1 == tc2+ , tys1 `equalLength` tys2 =+ -- Type constructors are same. They may be synonyms, but we don't+ -- expand further. The lengths of tys1 and tys2 must be equal;+ -- for example, with type S a = a, we don't want+ -- to zip (S Monad Int) and (S Bool).+ let (tys1', tys2') =+ unzip (zipWithEqual "expandSynonymsToMatch" go tys1 tys2)+ in (TyConApp tc1 tys1', TyConApp tc2 tys2')++ go (AppTy t1_1 t1_2) (AppTy t2_1 t2_2) =+ let (t1_1', t2_1') = go t1_1 t2_1+ (t1_2', t2_2') = go t1_2 t2_2+ in (mkAppTy t1_1' t1_2', mkAppTy t2_1' t2_2')++ go ty1@(FunTy _ w1 t1_1 t1_2) ty2@(FunTy _ w2 t2_1 t2_2) | w1 `eqType` w2 =+ let (t1_1', t2_1') = go t1_1 t2_1+ (t1_2', t2_2') = go t1_2 t2_2+ in ( ty1 { ft_arg = t1_1', ft_res = t1_2' }+ , ty2 { ft_arg = t2_1', ft_res = t2_2' })++ go (ForAllTy b1 t1) (ForAllTy b2 t2) =+ -- NOTE: We may have a bug here, but we just can't reproduce it easily.+ -- See D1016 comments for details and our attempts at producing a test+ -- case. Short version: We probably need RnEnv2 to really get this right.+ let (t1', t2') = go t1 t2+ in (ForAllTy b1 t1', ForAllTy b2 t2')++ go (CastTy ty1 _) ty2 = go ty1 ty2+ go ty1 (CastTy ty2 _) = go ty1 ty2++ go t1 t2 =+ -- See Note [Expanding type synonyms to make types similar] for how this+ -- works+ let+ t1_exp_tys = t1 : tyExpansions t1+ t2_exp_tys = t2 : tyExpansions t2+ t1_exps = length t1_exp_tys+ t2_exps = length t2_exp_tys+ dif = abs (t1_exps - t2_exps)+ in+ followExpansions $+ zipEqual "expandSynonymsToMatch.go"+ (if t1_exps > t2_exps then drop dif t1_exp_tys else t1_exp_tys)+ (if t2_exps > t1_exps then drop dif t2_exp_tys else t2_exp_tys)++ -- Expand the top layer type synonyms repeatedly, collect expansions in a+ -- list. The list does not include the original type.+ --+ -- Example, if you have:+ --+ -- type T10 = T9+ -- type T9 = T8+ -- ...+ -- type T0 = Int+ --+ -- `tyExpansions T10` returns [T9, T8, T7, ..., Int]+ --+ -- This only expands the top layer, so if you have:+ --+ -- type M a = Maybe a+ --+ -- `tyExpansions (M T10)` returns [Maybe T10] (T10 is not expanded)+ tyExpansions :: Type -> [Type]+ tyExpansions = unfoldr (\t -> (\x -> (x, x)) `fmap` coreView t)++ -- Drop the type pairs until types in a pair look alike (i.e. the outer+ -- constructors are the same).+ followExpansions :: [(Type, Type)] -> (Type, Type)+ followExpansions [] = pprPanic "followExpansions" empty+ followExpansions [(t1, t2)]+ | sameShapes t1 t2 = go t1 t2 -- expand subtrees+ | otherwise = (t1, t2) -- the difference is already visible+ followExpansions ((t1, t2) : tss)+ -- Traverse subtrees when the outer shapes are the same+ | sameShapes t1 t2 = go t1 t2+ -- Otherwise follow the expansions until they look alike+ | otherwise = followExpansions tss++ sameShapes :: Type -> Type -> Bool+ sameShapes AppTy{} AppTy{} = True+ sameShapes (TyConApp tc1 _) (TyConApp tc2 _) = tc1 == tc2+ sameShapes (FunTy {}) (FunTy {}) = True+ sameShapes (ForAllTy {}) (ForAllTy {}) = True+ sameShapes (CastTy ty1 _) ty2 = sameShapes ty1 ty2+ sameShapes ty1 (CastTy ty2 _) = sameShapes ty1 ty2+ sameShapes _ _ = False++{-+************************************************************************+* *+\subsection{Contexts for renaming errors}+* *+************************************************************************+-}++inHsDocContext :: HsDocContext -> SDoc+inHsDocContext ctxt = text "In" <+> pprHsDocContext ctxt++pprHsDocContext :: HsDocContext -> SDoc+pprHsDocContext (GenericCtx doc) = doc+pprHsDocContext (TypeSigCtx doc) = text "the type signature for" <+> doc+pprHsDocContext (StandaloneKindSigCtx doc) = text "the standalone kind signature for" <+> doc+pprHsDocContext PatCtx = text "a pattern type-signature"+pprHsDocContext SpecInstSigCtx = text "a SPECIALISE instance pragma"+pprHsDocContext DefaultDeclCtx = text "a `default' declaration"+pprHsDocContext DerivDeclCtx = text "a deriving declaration"+pprHsDocContext (RuleCtx name) = text "the rewrite rule" <+> doubleQuotes (ftext name)+pprHsDocContext (TyDataCtx tycon) = text "the data type declaration for" <+> quotes (ppr tycon)+pprHsDocContext (FamPatCtx tycon) = text "a type pattern of family instance for" <+> quotes (ppr tycon)+pprHsDocContext (TySynCtx name) = text "the declaration for type synonym" <+> quotes (ppr name)+pprHsDocContext (TyFamilyCtx name) = text "the declaration for type family" <+> quotes (ppr name)+pprHsDocContext (ClassDeclCtx name) = text "the declaration for class" <+> quotes (ppr name)+pprHsDocContext ExprWithTySigCtx = text "an expression type signature"+pprHsDocContext TypBrCtx = text "a Template-Haskell quoted type"+pprHsDocContext HsTypeCtx = text "a type argument"+pprHsDocContext HsTypePatCtx = text "a type argument in a pattern"+pprHsDocContext GHCiCtx = text "GHCi input"+pprHsDocContext (SpliceTypeCtx hs_ty) = text "the spliced type" <+> quotes (ppr hs_ty)+pprHsDocContext ClassInstanceCtx = text "GHC.Tc.Gen.Splice.reifyInstances"++pprHsDocContext (ForeignDeclCtx name)+ = text "the foreign declaration for" <+> quotes (ppr name)+pprHsDocContext (ConDeclCtx [name])+ = text "the definition of data constructor" <+> quotes (ppr name)+pprHsDocContext (ConDeclCtx names)+ = text "the definition of data constructors" <+> interpp'SP names++pprConversionFailReason :: ConversionFailReason -> SDoc+pprConversionFailReason = \case+ IllegalOccName ctxt_ns occ ->+ text "Illegal" <+> pprNameSpace ctxt_ns+ <+> text "name:" <+> quotes (text occ)+ SumAltArityExceeded alt arity ->+ text "Sum alternative" <+> int alt+ <+> text "exceeds its arity," <+> int arity+ IllegalSumAlt alt ->+ vcat [ text "Illegal sum alternative:" <+> int alt+ , nest 2 $ text "Sum alternatives must start from 1" ]+ IllegalSumArity arity ->+ vcat [ text "Illegal sum arity:" <+> int arity+ , nest 2 $ text "Sums must have an arity of at least 2" ]+ MalformedType typeOrKind ty ->+ text "Malformed " <> text ty_str <+> text (show ty)+ where ty_str = case typeOrKind of+ TypeLevel -> "type"+ KindLevel -> "kind"+ IllegalLastStatement do_or_lc stmt ->+ vcat [ text "Illegal last statement of" <+> pprAHsDoFlavour do_or_lc <> colon+ , nest 2 $ ppr stmt+ , text "(It should be an expression.)" ]+ KindSigsOnlyAllowedOnGADTs ->+ text "Kind signatures are only allowed on GADTs"+ IllegalDeclaration declDescr bad_decls ->+ sep [ text "Illegal" <+> what <+> text "in" <+> descrDoc <> colon+ , nest 2 bads ]+ where+ (what, bads) = case bad_decls of+ IllegalDecls (NE.toList -> decls) ->+ (text "declaration" <> plural decls, vcat $ map ppr decls)+ IllegalFamDecls (NE.toList -> decls) ->+ ( text "family declaration" <> plural decls, vcat $ map ppr decls)+ descrDoc = text $ case declDescr of+ InstanceDecl -> "an instance declaration"+ WhereClause -> "a where clause"+ LetBinding -> "a let expression"+ LetExpression -> "a let expression"+ ClssDecl -> "a class declaration"+ CannotMixGADTConsWith98Cons ->+ text "Cannot mix GADT constructors with Haskell 98"+ <+> text "constructors"+ EmptyStmtListInDoBlock ->+ text "Empty stmt list in do-block"+ NonVarInInfixExpr ->+ text "Non-variable expression is not allowed in an infix expression"+ MultiWayIfWithoutAlts ->+ text "Multi-way if-expression with no alternatives"+ CasesExprWithoutAlts ->+ text "\\cases expression with no alternatives"+ ImplicitParamsWithOtherBinds ->+ text "Implicit parameters mixed with other bindings"+ InvalidCCallImpent from ->+ text (show from) <+> text "is not a valid ccall impent"+ RecGadtNoCons ->+ quotes (text "RecGadtC") <+> text "must have at least one constructor name"+ GadtNoCons ->+ quotes (text "GadtC") <+> text "must have at least one constructor name"+ InvalidTypeInstanceHeader tys ->+ text "Invalid type instance header:"+ <+> text (show tys)+ InvalidTyFamInstLHS lhs ->+ text "Invalid type family instance LHS:"+ <+> text (show lhs)+ InvalidImplicitParamBinding ->+ text "Implicit parameter binding only allowed in let or where"+ DefaultDataInstDecl adts ->+ (text "Default data instance declarations"+ <+> text "are not allowed:")+ $$ ppr adts+ FunBindLacksEquations nm ->+ text "Function binding for"+ <+> quotes (text (TH.pprint nm))+ <+> text "has no equations"++pprTyThingUsedWrong :: WrongThingSort -> TcTyThing -> Name -> SDoc+pprTyThingUsedWrong sort thing name =+ pprTcTyThingCategory thing <+> quotes (ppr name) <+>+ text "used as a" <+> pprWrongThingSort sort++pprWrongThingSort :: WrongThingSort -> SDoc+pprWrongThingSort =+ text . \case+ WrongThingType -> "type"+ WrongThingDataCon -> "data constructor"+ WrongThingPatSyn -> "pattern synonym"+ WrongThingConLike -> "constructor-like thing"+ WrongThingClass -> "class"+ WrongThingTyCon -> "type constructor"+ WrongThingAxiom -> "axiom"++pprStageCheckReason :: StageCheckReason -> SDoc+pprStageCheckReason = \case+ StageCheckInstance _ t ->+ text "instance for" <+> quotes (ppr t)+ StageCheckSplice t ->+ quotes (ppr t)++pprUninferrableTyVarCtx :: UninferrableTyVarCtx -> SDoc+pprUninferrableTyVarCtx = \case+ UninfTyCtx_ClassContext theta ->+ sep [ text "the class context:", pprTheta theta ]+ UninfTyCtx_DataContext theta ->+ sep [ text "the datatype context:", pprTheta theta ]+ UninfTyCtx_ProvidedContext theta ->+ sep [ text "the provided context:" , pprTheta theta ]+ UninfTyCtx_TyFamRhs rhs_ty ->+ sep [ text "the type family equation right-hand side:" , ppr rhs_ty ]+ UninfTyCtx_TySynRhs rhs_ty ->+ sep [ text "the type synonym right-hand side:" , ppr rhs_ty ]+ UninfTyCtx_Sig exp_kind full_hs_ty ->+ hang (text "the kind" <+> ppr exp_kind) 2+ (text "of the type signature:" <+> ppr full_hs_ty)++pprPatSynInvalidRhsReason :: PatSynInvalidRhsReason -> SDoc+pprPatSynInvalidRhsReason = \case+ PatSynNotInvertible p ->+ text "Pattern" <+> quotes (ppr p) <+> text "is not invertible"+ PatSynUnboundVar var ->+ quotes (ppr var) <+> text "is not bound by the LHS of the pattern synonym"++pprBadFieldAnnotationReason :: BadFieldAnnotationReason -> SDoc+pprBadFieldAnnotationReason = \case+ LazyFieldsDisabled ->+ text "Lazy field annotations (~) are disabled"+ UnpackWithoutStrictness ->+ text "UNPACK pragma lacks '!'"+ BackpackUnpackAbstractType ->+ text "Ignoring unusable UNPACK pragma"++pprSuperclassCycleDetail :: SuperclassCycleDetail -> SDoc+pprSuperclassCycleDetail = \case+ SCD_HeadTyVar pred ->+ hang (text "one of whose superclass constraints is headed by a type variable:")+ 2 (quotes (ppr pred))+ SCD_HeadTyFam pred ->+ hang (text "one of whose superclass constraints is headed by a type family:")+ 2 (quotes (ppr pred))+ SCD_Superclass cls ->+ text "one of whose superclasses is" <+> quotes (ppr cls)++pprRoleValidationFailedReason :: Role -> RoleValidationFailedReason -> SDoc+pprRoleValidationFailedReason role = \case+ TyVarRoleMismatch tv role' ->+ text "type variable" <+> quotes (ppr tv) <+>+ text "cannot have role" <+> ppr role <+>+ text "because it was assigned role" <+> ppr role'+ TyVarMissingInEnv tv ->+ text "type variable" <+> quotes (ppr tv) <+> text "missing in environment"+ BadCoercionRole co ->+ text "coercion" <+> ppr co <+> text "has bad role" <+> ppr role++pprDisabledClassExtension :: Class -> DisabledClassExtension -> SDoc+pprDisabledClassExtension cls = \case+ MultiParamDisabled n ->+ text howMany <+> text "parameters for class" <+> quotes (ppr cls)+ where+ howMany | n == 0 = "No"+ | otherwise = "Too many"+ FunDepsDisabled ->+ text "Fundeps in class" <+> quotes (ppr cls)+ ConstrainedClassMethodsDisabled 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")]++pprImportLookup :: ImportLookupReason -> SDoc+pprImportLookup = \case+ ImportLookupBad k iface decl_spec ie _ps ->+ let+ pprImpDeclSpec :: ModIface -> ImpDeclSpec -> SDoc+ pprImpDeclSpec iface decl_spec =+ quotes (ppr (moduleName $ is_mod decl_spec)) <+> case mi_boot iface of+ IsBoot -> text "(hi-boot interface)"+ NotBoot -> empty+ withContext msgs =+ hang (text "In the import of" <+> pprImpDeclSpec iface decl_spec <> colon)+ 2 (vcat msgs)+ in case k of+ BadImportNotExported _ ->+ vcat+ [ text "Module" <+> pprImpDeclSpec iface decl_spec <+>+ text "does not export" <+> quotes (ppr ie) <> dot+ ]+ BadImportAvailVar ->+ withContext+ [ text "an item called"+ <+> quotes val <+> text "is exported, but it is not a type."+ ]+ where+ val_occ = rdrNameOcc $ ieName ie+ val = parenSymOcc val_occ (ppr val_occ)+ BadImportAvailTyCon {} ->+ withContext+ [ text "an item called"+ <+> quotes tycon <+> text "is exported, but it is a type."+ ]+ where+ tycon_occ = rdrNameOcc $ ieName ie+ tycon = parenSymOcc tycon_occ (ppr tycon_occ)+ BadImportNotExportedSubordinates ns ->+ withContext+ [ text "an item called" <+> quotes sub <+> text "is exported, but it does not export any children"+ , text "(constructors, class methods or field names) called"+ <+> pprWithCommas (quotes . ppr) ns <> dot+ ]+ where+ sub_occ = rdrNameOcc $ ieName ie+ sub = parenSymOcc sub_occ (ppr sub_occ)+ BadImportAvailDataCon dataType_occ ->+ withContext+ [ text "an item called" <+> quotes datacon+ , text "is exported, but it is a data constructor of"+ , quotes dataType <> dot+ ]+ where+ datacon_occ = rdrNameOcc $ ieName ie+ datacon = parenSymOcc datacon_occ (ppr datacon_occ)+ dataType = parenSymOcc dataType_occ (ppr dataType_occ)+ ImportLookupQualified rdr ->+ hang (text "Illegal qualified name in import item:")+ 2 (ppr rdr)+ ImportLookupIllegal ->+ text "Illegal import item"+ ImportLookupAmbiguous rdr gres ->+ hang (text "Ambiguous name" <+> quotes (ppr rdr) <+> text "in import item. It could refer to:")+ 2 (vcat (map (ppr . greOccName) gres))++pprUnusedImport :: ImportDecl GhcRn -> UnusedImportReason -> SDoc+pprUnusedImport decl = \case+ UnusedImportNone ->+ vcat [ pp_herald <+> quotes pp_mod <+> text "is redundant"+ , nest 2 (text "except perhaps to import instances from"+ <+> quotes pp_mod)+ , text "To import instances alone, use:"+ <+> text "import" <+> pp_mod <> parens empty ]+ UnusedImportSome sort_unused ->+ sep [ pp_herald <+> quotes (pprWithCommas pp_unused sort_unused)+ , text "from module" <+> quotes pp_mod <+> text "is redundant"]+ where+ pp_mod = ppr (unLoc (ideclName decl))+ pp_herald = text "The" <+> pp_qual <+> text "import of"+ pp_qual+ | isImportDeclQualified (ideclQualified decl) = text "qualified"+ | otherwise = empty+ pp_unused = \case+ UnusedImportNameRegular n ->+ pprNameUnqualified n+ UnusedImportNameRecField par fld_occ ->+ case par of+ ParentIs p -> pprNameUnqualified p <> parens (ppr fld_occ)+ NoParent -> ppr fld_occ++pprUnusedName :: OccName -> UnusedNameProv -> SDoc+pprUnusedName name reason =+ sep [ msg <> colon+ , nest 2 $ pprNonVarNameSpace (occNameSpace name)+ <+> quotes (ppr name)]+ where+ msg = case reason of+ UnusedNameTopDecl ->+ defined+ UnusedNameImported mod ->+ text "Imported from" <+> quotes (ppr mod) <+> text "but not used"+ UnusedNameTypePattern ->+ defined <+> text "on the right hand side"+ UnusedNameMatch ->+ defined+ UnusedNameLocalBind ->+ defined+ defined = text "Defined but not used"++-- When printing the name, take care to qualify it in the same+-- way as the provenance reported by pprNameProvenance, namely+-- the head of 'gre_imp'. Otherwise we get confusing reports like+-- Ambiguous occurrence ‘null’+-- It could refer to either ‘T15487a.null’,+-- imported from ‘Prelude’ at T15487.hs:1:8-13+-- or ...+-- See #15487+pprAmbiguousGreName :: GlobalRdrEnv -> GlobalRdrElt -> SDoc+pprAmbiguousGreName gre_env gre+ | IAmRecField fld_info <- greInfo gre+ = sep [ text "the field" <+> quotes (ppr occ) <+> parent_info fld_info <> comma+ , pprNameProvenance gre ]+ | otherwise+ = sep [ quotes (pp_qual <> dot <> ppr occ) <> comma+ , pprNameProvenance gre ]++ where+ occ = greOccName gre+ parent_info fld_info =+ case first_con of+ PatSynName ps -> text "of pattern synonym" <+> quotes (ppr ps)+ DataConName {} ->+ case greParent gre of+ ParentIs par+ -- For a data family, only reporting the family TyCon can be+ -- unhelpful (see T23301). So we give a bit of additional+ -- info in that case.+ | Just par_gre <- lookupGRE_Name gre_env par+ , IAmTyCon tc_flav <- greInfo par_gre+ , OpenFamilyFlavour IAmData _ <- tc_flav+ -> vcat [ ppr_cons+ , text "in a data family instance of" <+> quotes (ppr par) ]+ | otherwise+ -> text "of record" <+> quotes (ppr par)+ NoParent -> ppr_cons+ where+ cons :: [ConLikeName]+ cons = nonDetEltsUniqSet $ recFieldCons fld_info+ first_con :: ConLikeName+ first_con = head cons+ ppr_cons :: SDoc+ ppr_cons = hsep [ text "belonging to data constructor"+ , quotes (ppr $ nameOccName $ conLikeName_Name first_con)+ , if length cons > 1 then parens (text "among others") else empty+ ]+ pp_qual+ | gre_lcl gre+ = ppr (nameModule $ greName gre)+ | Just imp <- headMaybe $ gre_imp gre+ -- This 'imp' is the one that+ -- pprNameProvenance chooses+ , ImpDeclSpec { is_as = mod } <- is_decl imp+ = ppr mod+ | otherwise+ = pprPanic "addNameClassErrRn" (ppr gre)+ -- Invariant: either 'lcl' is True or 'iss' is non-empty++pprNonCanonicalDefinition :: LHsSigType GhcRn+ -> NonCanonicalDefinition+ -> SDoc+pprNonCanonicalDefinition inst_ty = \case+ NonCanonicalMonoid sub -> case sub of+ NonCanonical_Sappend ->+ msg1 "(<>)" "mappend"+ NonCanonical_Mappend ->+ msg2 "mappend" "(<>)"+ NonCanonicalMonad sub -> case sub of+ NonCanonical_Pure ->+ msg1 "pure" "return"+ NonCanonical_ThenA ->+ msg1 "(*>)" "(>>)"+ NonCanonical_Return ->+ msg2 "return" "pure"+ NonCanonical_ThenM ->+ msg2 "(>>)" "(*>)"+ where+ msg1 :: String -> String -> SDoc+ msg1 lhs rhs =+ vcat [ text "Noncanonical" <+>+ quotes (text (lhs ++ " = " ++ rhs)) <+>+ text "definition detected"+ , inst+ ]++ msg2 :: String -> String -> SDoc+ msg2 lhs rhs =+ vcat [ text "Noncanonical" <+>+ quotes (text lhs) <+>+ text "definition detected"+ , inst+ , quotes (text lhs) <+>+ text "will eventually be removed in favour of" <+>+ quotes (text rhs)+ ]++ inst = instDeclCtxt1 inst_ty++ -- stolen from GHC.Tc.TyCl.Instance+ instDeclCtxt1 :: LHsSigType GhcRn -> SDoc+ instDeclCtxt1 hs_inst_ty+ = inst_decl_ctxt (ppr (getLHsInstDeclHead hs_inst_ty))++ inst_decl_ctxt :: SDoc -> SDoc+ inst_decl_ctxt doc = hang (text "in the instance declaration for")+ 2 (quotes doc <> text ".")++suggestNonCanonicalDefinition :: NonCanonicalDefinition -> [GhcHint]+suggestNonCanonicalDefinition reason =+ [action doc]+ where+ action = case reason of+ NonCanonicalMonoid sub -> case sub of+ NonCanonical_Sappend -> move sappendName mappendName+ NonCanonical_Mappend -> remove mappendName sappendName+ NonCanonicalMonad sub -> case sub of+ NonCanonical_Pure -> move pureAName returnMName+ NonCanonical_ThenA -> move thenAName thenMName+ NonCanonical_Return -> remove returnMName pureAName+ NonCanonical_ThenM -> remove thenMName thenAName++ move = SuggestMoveNonCanonicalDefinition+ remove = SuggestRemoveNonCanonicalDefinition++ doc = case reason of+ NonCanonicalMonoid _ -> doc_monoid+ NonCanonicalMonad _ -> doc_monad++ doc_monoid =+ "https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/semigroup-monoid"+ doc_monad =+ "https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return"++--------------------------------------------------------------------------------+-- hs-boot mismatch errors++pprBootMismatch :: HsBootOrSig -> BootMismatch -> SDoc+pprBootMismatch boot_or_sig = \case+ MissingBootThing nm err ->+ let def_or_exp = case err of+ MissingBootDefinition -> text "defined in"+ MissingBootExport -> text "exported by"+ in quotes (ppr nm) <+> text "is exported by the"+ <+> ppr_boot_or_sig <> comma+ <+> text "but not"+ <+> def_or_exp <+> text "the implementing module."+ MissingBootInstance boot_dfun ->+ hang (text "instance" <+> ppr (idType boot_dfun))+ 2 (text "is defined in the" <+> ppr ppr_boot_or_sig <> comma <+>+ text "but not in the implementing module.")+ BadReexportedBootThing name name' ->+ withUserStyle alwaysQualify AllTheWay $ vcat+ [ text "The" <+> ppr_boot_or_sig+ <+> text "(re)exports" <+> quotes (ppr name)+ , text "but the implementing module exports a different identifier" <+> quotes (ppr name')+ ]+ BootMismatch boot_thing real_thing err ->+ vcat+ [ ppr real_thing <+>+ text "has conflicting definitions in the module"+ , text "and its" <+> ppr_boot_or_sig <> dot,+ text "Main module:" <+> real_doc+ , (case boot_or_sig of+ HsBoot -> text " Boot file:"+ Hsig -> text " Hsig file:") <+> boot_doc+ , pprBootMismatchWhat boot_or_sig err+ ]+ where+ to_doc+ = pprTyThingInContext $+ showToHeader+ { ss_forall =+ case boot_or_sig of+ HsBoot -> ShowForAllMust+ Hsig -> ShowForAllWhen }++ real_doc = to_doc real_thing+ boot_doc = to_doc boot_thing++ where+ ppr_boot_or_sig = case boot_or_sig of+ HsBoot -> text "hs-boot file"+ Hsig -> text "hsig file"+++pprBootMismatchWhat :: HsBootOrSig -> BootMismatchWhat -> SDoc+pprBootMismatchWhat boot_or_sig = \case+ BootMismatchedIdTypes {} ->+ text "The two types are different."+ BootMismatchedTyCons tc1 tc2 errs ->+ vcat $ map (pprBootTyConMismatch boot_or_sig tc1 tc2) (NE.toList errs)++pprBootTyConMismatch :: HsBootOrSig -> TyCon -> TyCon+ -> BootTyConMismatch -> SDoc+pprBootTyConMismatch boot_or_sig tc1 tc2 = \case+ TyConKindMismatch ->+ text "The types have different kinds."+ TyConRoleMismatch sub_type ->+ if sub_type+ then+ text "The roles are not compatible:" $$+ text "Main module:" <+> ppr (tyConRoles tc1) $$+ text " Hsig file:" <+> ppr (tyConRoles tc2)+ else+ text "The roles do not match." $$+ if boot_or_sig == HsBoot+ then text "NB: roles on abstract types default to" <+>+ quotes (text "representational") <+> text "in hs-boot files."+ else empty+ TyConSynonymMismatch {} -> empty -- nothing interesting to say+ TyConFlavourMismatch fam_flav1 fam_flav2 ->+ whenPprDebug $+ text "Family flavours" <+> ppr fam_flav1 <+> text "and" <+> ppr fam_flav2 <+>+ text "do not match"+ TyConAxiomMismatch ax_errs ->+ pprBootListMismatches (text "Type family equations do not match:")+ pprTyConAxiomMismatch ax_errs+ TyConInjectivityMismatch {} ->+ text "Injectivity annotations do not match"+ TyConMismatchedClasses _ _ err ->+ pprBootClassMismatch boot_or_sig err+ TyConMismatchedData _rhs1 _rhs2 err ->+ pprBootDataMismatch err+ SynAbstractData err ->+ pprSynAbstractDataError err+ TyConsVeryDifferent ->+ empty -- should be obvious to the user what the problem is++pprSynAbstractDataError :: SynAbstractDataError -> SDoc+pprSynAbstractDataError = \case+ SynAbsDataTySynNotNullary ->+ text "Illegal parameterized type synonym in implementation of abstract data."+ SynAbstractDataInvalidRHS bad_sub_tys ->+ let msgs = mapMaybe pprInvalidAbstractSubTy (NE.toList bad_sub_tys)+ in case msgs of+ [] -> herald <> dot+ msg:[] -> hang (herald <> colon)+ 2 msg+ _ -> hang (herald <> colon)+ 2 (vcat $ map (<+> bullet) msgs)++ where+ herald = text "Illegal implementation of abstract data"+ pprInvalidAbstractSubTy = \case+ TyConApp tc _+ -> assertPpr (isTypeFamilyTyCon tc) (ppr tc) $+ Just $ text "Invalid type family" <+> quotes (ppr tc) <> dot+ ty@(ForAllTy {})+ -> Just $ text "Invalid polymorphic type" <> colon <+> ppr ty <> dot+ ty@(FunTy af _ _ _)+ | not (af == FTF_T_T)+ -> Just $ text "Invalid qualified type" <> colon <+> ppr ty <> dot+ _ -> Nothing++pprTyConAxiomMismatch :: BootListMismatch CoAxBranch BootAxiomBranchMismatch -> SDoc+pprTyConAxiomMismatch = \case+ MismatchedLength ->+ text "The number of equations differs."+ MismatchedThing i br1 br2 err ->+ hang (text "The" <+> speakNth (i+1) <+> text "equations do not match.")+ 2 (pprCoAxBranchMismatch br1 br2 err)++pprCoAxBranchMismatch :: CoAxBranch -> CoAxBranch -> BootAxiomBranchMismatch -> SDoc+pprCoAxBranchMismatch _br1 _br2 err =+ text "The" <+> what <+> text "don't match."+ where+ what = case err of+ MismatchedAxiomBinders -> text "variables bound in the equation"+ MismatchedAxiomLHS -> text "equation left-hand sides"+ MismatchedAxiomRHS -> text "equation right-hand sides"++pprBootListMismatches :: SDoc -- ^ herald+ -> (BootListMismatch item err -> SDoc)+ -> BootListMismatches item err -> SDoc+pprBootListMismatches herald ppr_one errs =+ hang herald 2 msgs+ where+ msgs = case errs of+ err :| [] -> ppr_one err+ _ -> vcat $ map ((bullet <+>) . ppr_one) $ NE.toList errs++pprBootClassMismatch :: HsBootOrSig -> BootClassMismatch -> SDoc+pprBootClassMismatch boot_or_sig = \case+ MismatchedMethods errs ->+ pprBootListMismatches (text "The class methods do not match:")+ pprBootClassMethodListMismatch errs+ MismatchedATs at_errs ->+ pprBootListMismatches (text "The associated types do not match:")+ (pprATMismatch boot_or_sig) at_errs+ MismatchedFunDeps ->+ text "The functional dependencies do not match."+ MismatchedSuperclasses ->+ text "The superclass constraints do not match."+ MismatchedMinimalPragmas ->+ text "The MINIMAL pragmas are not compatible."++pprATMismatch :: HsBootOrSig -> BootListMismatch ClassATItem BootATMismatch -> SDoc+pprATMismatch boot_or_sig = \case+ MismatchedLength ->+ text "The number of associated type defaults differs."+ MismatchedThing i at1 at2 err ->+ pprATMismatchErr boot_or_sig i at1 at2 err++pprATMismatchErr :: HsBootOrSig -> Int -> ClassATItem -> ClassATItem -> BootATMismatch -> SDoc+pprATMismatchErr boot_or_sig i (ATI tc1 _) (ATI tc2 _) = \case+ MismatchedTyConAT err ->+ hang (text "The associated types differ:")+ 2 $ pprBootTyConMismatch boot_or_sig tc1 tc2 err+ MismatchedATDefaultType ->+ text "The types of the" <+> speakNth (i+1) <+>+ text "associated type default differ."++pprBootClassMethodListMismatch :: BootListMismatch ClassOpItem BootMethodMismatch -> SDoc+pprBootClassMethodListMismatch = \case+ MismatchedLength ->+ text "The number of class methods differs."+ MismatchedThing _ op1 op2 err ->+ pprBootClassMethodMismatch op1 op2 err++pprBootClassMethodMismatch :: ClassOpItem -> ClassOpItem -> BootMethodMismatch -> SDoc+pprBootClassMethodMismatch (op1, _) (op2, _) = \case+ MismatchedMethodNames ->+ text "The method names" <+> quotes pname1 <+> text "and"+ <+> quotes pname2 <+> text "differ."+ MismatchedMethodTypes {} ->+ text "The types of" <+> pname1 <+> text "are different."+ MismatchedDefaultMethods subtype_check ->+ if subtype_check+ then+ text "The default methods associated with" <+> pname1 <+>+ text "are not compatible."+ else+ text "The default methods associated with" <+> pname1 <+>+ text "are different."+ where+ nm1 = idName op1+ nm2 = idName op2+ pname1 = quotes (ppr nm1)+ pname2 = quotes (ppr nm2)++pprBootDataMismatch :: BootDataMismatch -> SDoc+pprBootDataMismatch = \case+ MismatchedNewtypeVsData ->+ text "Cannot match a" <+> quotes (text "data") <+>+ text "definition with a" <+> quotes (text "newtype") <+>+ text "definition."+ MismatchedConstructors dc_errs ->+ pprBootListMismatches (text "The constructors do not match:")+ pprBootDataConMismatch dc_errs+ MismatchedDatatypeContexts {} ->+ text "The datatype contexts do not match."++pprBootDataConMismatch :: BootListMismatch DataCon BootDataConMismatch+ -> SDoc+pprBootDataConMismatch = \case+ MismatchedLength ->+ text "The number of constructors differs."+ MismatchedThing _ dc1 dc2 err ->+ pprBootDataConMismatchErr dc1 dc2 err++pprBootDataConMismatchErr :: DataCon -> DataCon -> BootDataConMismatch -> SDoc+pprBootDataConMismatchErr dc1 dc2 = \case+ MismatchedDataConNames ->+ text "The names" <+> pname1 <+> text "and" <+> pname2 <+> text "differ."+ MismatchedDataConFixities ->+ text "The fixities of" <+> pname1 <+> text "differ."+ MismatchedDataConBangs ->+ text "The strictness annotations for" <+> pname1 <+> text "differ."+ MismatchedDataConFieldLabels ->+ text "The record label lists for" <+> pname1 <+> text "differ."+ MismatchedDataConTypes ->+ text "The types for" <+> pname1 <+> text "differ."+ where+ name1 = dataConName dc1+ name2 = dataConName dc2+ pname1 = quotes (ppr name1)+ pname2 = quotes (ppr name2)++--------------------------------------------------------------------------------+-- Illegal instance errors++pprIllegalInstance :: IllegalInstanceReason -> SDoc+pprIllegalInstance = \case+ IllegalClassInstance head_ty reason ->+ pprIllegalClassInstanceReason head_ty reason+ IllegalFamilyInstance reason ->+ pprIllegalFamilyInstance reason+ IllegalFamilyApplicationInInstance inst_ty invis_arg tf_tc tf_args ->+ pprWithExplicitKindsWhen invis_arg $+ hang (text "Illegal type synonym family application"+ <+> quotes (ppr tf_ty) <+> text "in instance" <> colon)+ 2 (ppr inst_ty)+ where+ tf_ty = mkTyConApp tf_tc tf_args++pprIllegalClassInstanceReason :: TypedThing -> IllegalClassInstanceReason -> SDoc+pprIllegalClassInstanceReason head_ty = \case+ IllegalInstanceHead reason ->+ pprIllegalInstanceHeadReason head_ty reason+ IllegalHasFieldInstance has_field_err ->+ with_illegal_instance_header head_ty $+ pprIllegalHasFieldInstance has_field_err+ IllegalSpecialClassInstance cls because_safeHaskell ->+ text "Class" <+> quotes (ppr $ className cls)+ <+> text "does not support user-specified instances"+ <> safeHaskell_msg+ where+ safeHaskell_msg+ | because_safeHaskell+ = text " when Safe Haskell is enabled."+ | otherwise+ = dot+ IllegalInstanceFailsCoverageCondition cls coverage_failure ->+ with_illegal_instance_header head_ty $+ pprNotCovered cls coverage_failure++pprIllegalInstanceHeadReason :: TypedThing+ -> IllegalInstanceHeadReason -> SDoc+pprIllegalInstanceHeadReason head_ty = \case+ InstHeadTySynArgs -> with_illegal_instance_header head_ty $+ text "All instance types must be of the form (T t1 ... tn)" $$+ text "where T is not a synonym."+ InstHeadNonTyVarArgs -> with_illegal_instance_header head_ty $ vcat [+ text "All instance types must be of the form (T a1 ... an)",+ text "where a1 ... an are *distinct type variables*,",+ text "and each type variable appears at most once in the instance head."]+ InstHeadMultiParam -> with_illegal_instance_header head_ty $ parens $+ text "Only one type can be given in an instance head."+ InstHeadAbstractClass clas ->+ text "Cannot define instance for abstract class" <+>+ quotes (ppr (className clas))+ InstHeadNonClass bad_head ->+ vcat [ text "Illegal" <+> what_illegal <> dot+ , text "Instance heads must be of the form"+ , nest 2 $ text "C ty_1 ... ty_n"+ , text "where" <+> quotes (char 'C') <+> text "is a class."+ ]+ where+ what_illegal = case bad_head of+ Just tc ->+ text "instance for" <+> ppr (tyConFlavour tc) <+> quotes (ppr $ tyConName tc)+ Nothing ->+ text "head of an instance declaration:" <+> quotes (ppr head_ty)++with_illegal_instance_header :: TypedThing -> SDoc -> SDoc+with_illegal_instance_header head_ty msg =+ hang (hang (text "Illegal instance declaration for")+ 2 (quotes (ppr head_ty)) <> colon)+ 2 msg++pprIllegalHasFieldInstance :: IllegalHasFieldInstance -> SDoc+pprIllegalHasFieldInstance = \case+ IllegalHasFieldInstanceNotATyCon+ -> text "Record data type must be specified."+ IllegalHasFieldInstanceFamilyTyCon+ -> text "Record data type may not be a data family."+ IllegalHasFieldInstanceTyConHasField tc lbl+ -> quotes (ppr tc) <+> text "already has a field" <+> quotes (ppr lbl) <> dot+ IllegalHasFieldInstanceTyConHasFields tc lbl+ -> sep [ ppr_tc <+> text "has fields, and the type" <+> quotes (ppr lbl)+ , text "could unify with one of the field labels of" <+> ppr_tc <> dot ]+ where ppr_tc = quotes (ppr tc)++pprNotCovered :: Class -> CoverageProblem -> SDoc+pprNotCovered clas+ CoverageProblem+ { not_covered_fundep = fd+ , not_covered_fundep_inst = (ls, rs)+ , not_covered_invis_vis_tvs = undetermined_tvs+ , not_covered_liberal = which_cc_failed+ } =+ pprWithExplicitKindsWhen (isEmptyVarSet $ pSnd undetermined_tvs) $+ vcat [ sep [ text "The"+ <+> ppWhen liberal (text "liberal")+ <+> text "coverage condition fails in class"+ <+> quotes (ppr clas)+ , nest 2 $ text "for functional dependency:"+ <+> quotes (pprFunDep fd) ]+ , sep [ text "Reason: lhs type" <> plural ls <+> pprQuotedList ls+ , nest 2 $+ (if isSingleton ls+ then text "does not"+ else text "do not jointly")+ <+> text "determine rhs type" <> plural rs+ <+> pprQuotedList rs ]+ , text "Un-determined variable" <> pluralVarSet undet_set <> colon+ <+> pprVarSet undet_set (pprWithCommas ppr)+ ]+ where+ liberal = case which_cc_failed of+ FailedLICC -> True+ FailedICC {} -> False+ undet_set = fold undetermined_tvs++illegalInstanceHints :: IllegalInstanceReason -> [GhcHint]+illegalInstanceHints = \case+ IllegalClassInstance _ reason ->+ illegalClassInstanceHints reason+ IllegalFamilyInstance reason ->+ illegalFamilyInstanceHints reason+ IllegalFamilyApplicationInInstance {} ->+ noHints++illegalInstanceReason :: IllegalInstanceReason -> DiagnosticReason+illegalInstanceReason = \case+ IllegalClassInstance _ reason ->+ illegalClassInstanceReason reason+ IllegalFamilyInstance reason ->+ illegalFamilyInstanceReason reason+ IllegalFamilyApplicationInInstance {} ->+ ErrorWithoutFlag++illegalClassInstanceHints :: IllegalClassInstanceReason -> [GhcHint]+illegalClassInstanceHints = \case+ IllegalInstanceHead reason ->+ illegalInstanceHeadHints reason+ IllegalHasFieldInstance has_field_err ->+ illegalHasFieldInstanceHints has_field_err+ IllegalSpecialClassInstance {} -> noHints+ IllegalInstanceFailsCoverageCondition _ coverage_failure ->+ failedCoverageConditionHints coverage_failure+++illegalClassInstanceReason :: IllegalClassInstanceReason -> DiagnosticReason+illegalClassInstanceReason = \case+ IllegalInstanceHead reason ->+ illegalInstanceHeadReason reason+ IllegalHasFieldInstance has_field_err ->+ illegalHasFieldInstanceReason has_field_err+ IllegalSpecialClassInstance {} -> ErrorWithoutFlag+ IllegalInstanceFailsCoverageCondition _ coverage_failure ->+ failedCoverageConditionReason coverage_failure++illegalInstanceHeadHints :: IllegalInstanceHeadReason -> [GhcHint]+illegalInstanceHeadHints = \case+ InstHeadTySynArgs ->+ [suggestExtension LangExt.TypeSynonymInstances]+ InstHeadNonTyVarArgs ->+ [suggestExtension LangExt.FlexibleInstances]+ InstHeadMultiParam ->+ [suggestExtension LangExt.MultiParamTypeClasses]+ InstHeadAbstractClass {} ->+ noHints+ InstHeadNonClass {} ->+ noHints++illegalInstanceHeadReason :: IllegalInstanceHeadReason -> DiagnosticReason+illegalInstanceHeadReason = \case+ -- These are serious+ InstHeadAbstractClass {} ->+ ErrorWithoutFlag+ InstHeadNonClass {} ->+ ErrorWithoutFlag++ -- These are less serious (enable an extension)+ InstHeadTySynArgs ->+ ErrorWithoutFlag+ InstHeadNonTyVarArgs ->+ ErrorWithoutFlag+ InstHeadMultiParam ->+ ErrorWithoutFlag++illegalHasFieldInstanceHints :: IllegalHasFieldInstance -> [GhcHint]+illegalHasFieldInstanceHints = \case+ IllegalHasFieldInstanceNotATyCon+ -> noHints+ IllegalHasFieldInstanceFamilyTyCon+ -> noHints+ IllegalHasFieldInstanceTyConHasField {}+ -> noHints+ IllegalHasFieldInstanceTyConHasFields {}+ -> noHints++illegalHasFieldInstanceReason :: IllegalHasFieldInstance -> DiagnosticReason+illegalHasFieldInstanceReason = \case+ IllegalHasFieldInstanceNotATyCon+ -> ErrorWithoutFlag+ IllegalHasFieldInstanceFamilyTyCon+ -> ErrorWithoutFlag+ IllegalHasFieldInstanceTyConHasField {}+ -> ErrorWithoutFlag+ IllegalHasFieldInstanceTyConHasFields {}+ -> ErrorWithoutFlag++failedCoverageConditionHints :: CoverageProblem -> [GhcHint]+failedCoverageConditionHints (CoverageProblem { not_covered_liberal = failed_cc })+ = case failed_cc of+ FailedLICC -> noHints+ FailedICC { alsoFailedLICC = failed_licc } ->+ -- Turning on UndecidableInstances makes the check liberal,+ -- so if the liberal check passes, suggest enabling UndecidableInstances.+ if failed_licc+ then noHints+ else [suggestExtension LangExt.UndecidableInstances]++failedCoverageConditionReason :: CoverageProblem -> DiagnosticReason+failedCoverageConditionReason _ = ErrorWithoutFlag++pprIllegalFamilyInstance :: IllegalFamilyInstanceReason -> SDoc+pprIllegalFamilyInstance = \case+ InvalidAssoc reason -> pprInvalidAssoc reason+ NotAFamilyTyCon ty_or_data tc ->+ vcat [ text "Illegal family instance for" <+> quotes (ppr tc)+ , nest 2 $ parens (quotes (ppr tc) <+> text "is not a" <+> what) ]+ where+ what = ppr ty_or_data <+> text "family"+ NotAnOpenFamilyTyCon tc ->+ text "Illegal instance for closed family" <+> quotes (ppr tc)+ FamilyCategoryMismatch tc ->+ text "Wrong category of family instance; declaration was for a" <+> what <> dot+ where+ what = case tyConFlavour tc of+ OpenFamilyFlavour IAmData _ -> text "data family"+ _ -> text "type family"+ FamilyArityMismatch _ max_args ->+ text "Number of parameters must match family declaration; expected"+ <+> ppr max_args <> dot+ TyFamNameMismatch 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 ])+ FamInstRHSOutOfScopeTyVars mb_dodgy tvs ->+ hang (text "Out of scope type variable" <> plural tvs+ <+> pprWithCommas (quotes . ppr) tvs+ <+> text "in the RHS of a family instance.")+ 2 (text "All such variables must be bound on the LHS.")+ $$ mk_extra+ where+ -- mk_extra: #7536: give a decent error message for+ -- type T a = Int+ -- type instance F (T a) = a+ mk_extra = case mb_dodgy of+ Nothing -> empty+ Just (fam_tc, pats, dodgy_tvs) ->+ ppWhen (any (`elemVarSetByKey` dodgy_tvs) (map nameUnique tvs)) $+ hang (text "The real LHS (expanding synonyms) is:")+ 2 (pprTypeApp fam_tc (map expandTypeSynonyms pats))+ FamInstLHSUnusedBoundTyVars tvs ->+ hang (text "Type variable" <> plural tvs <+> pprQuotedList tvs+ <+> isOrAre tvs <+> text "bound by a forall,")+ 2 (text "but not used in the family instance.")++illegalFamilyInstanceHints :: IllegalFamilyInstanceReason -> [GhcHint]+illegalFamilyInstanceHints = \case+ InvalidAssoc rea -> invalidAssocHints rea+ NotAFamilyTyCon {} -> noHints+ NotAnOpenFamilyTyCon {} -> noHints+ FamilyCategoryMismatch {} -> noHints+ FamilyArityMismatch {} -> noHints+ TyFamNameMismatch {} -> noHints+ FamInstRHSOutOfScopeTyVars {} -> noHints+ FamInstLHSUnusedBoundTyVars {} -> noHints++illegalFamilyInstanceReason :: IllegalFamilyInstanceReason -> DiagnosticReason+illegalFamilyInstanceReason = \case+ InvalidAssoc rea -> invalidAssocReason rea+ NotAFamilyTyCon {} -> ErrorWithoutFlag+ NotAnOpenFamilyTyCon {} -> ErrorWithoutFlag+ FamilyCategoryMismatch {} -> ErrorWithoutFlag+ FamilyArityMismatch {} -> ErrorWithoutFlag+ TyFamNameMismatch {} -> ErrorWithoutFlag+ FamInstRHSOutOfScopeTyVars {} -> ErrorWithoutFlag+ FamInstLHSUnusedBoundTyVars {} -> ErrorWithoutFlag++pprInvalidAssoc :: InvalidAssoc -> SDoc+pprInvalidAssoc = \case+ InvalidAssocInstance rea -> pprInvalidAssocInstance rea+ InvalidAssocDefault rea -> pprInvalidAssocDefault rea++pprInvalidAssocInstance :: InvalidAssocInstance -> SDoc+pprInvalidAssocInstance = \case+ AssocInstanceMissing name ->+ text "No explicit" <+> text "associated type"+ <+> text "or default declaration for"+ <+> quotes (ppr name)+ AssocInstanceNotInAClass fam_tc ->+ text "Associated type" <+> quotes (ppr fam_tc) <+>+ text "must be inside a class instance"+ AssocNotInThisClass cls fam_tc ->+ hsep [ text "Class", quotes (ppr cls)+ , text "does not have an associated type", quotes (ppr fam_tc) ]+ AssocNoClassTyVar cls fam_tc ->+ sep [ text "The associated type" <+> quotes (ppr fam_tc <+> hsep (map ppr (tyConTyVars fam_tc)))+ , text "mentions none of the type or kind variables of the class" <+>+ quotes (ppr cls <+> hsep (map ppr (classTyVars cls)))]+ AssocTyVarsDontMatch vis fam_tc exp_tys act_tys ->+ pprWithExplicitKindsWhen (isInvisibleForAllTyFlag vis) $+ vcat [ text "Type indexes must match class instance head"+ , text "Expected:" <+> pp exp_tys+ , text " Actual:" <+> pp act_tys ]+ where+ pp tys = pprIfaceTypeApp topPrec (toIfaceTyCon fam_tc) $+ toIfaceTcArgs fam_tc tys++pprInvalidAssocDefault :: InvalidAssocDefault -> SDoc+pprInvalidAssocDefault = \case+ AssocDefaultNotAssoc cls tc ->+ hsep [ text "Class", quotes (ppr cls)+ , text "does not have an associated type", quotes (ppr tc) ]+ AssocMultipleDefaults name ->+ text "More than one default declaration for" <+> quotes (ppr name)+ AssocDefaultBadArgs fam_tc pat_tys bad_arg ->+ let (pat_vis, main_msg) = case bad_arg of+ AssocDefaultNonTyVarArg (pat_ty, pat_vis) ->+ (pat_vis,+ text "Illegal argument" <+> quotes (ppr pat_ty) <+> text "in:")+ AssocDefaultDuplicateTyVars dups ->+ let (pat_tv, pat_vis) = NE.head dups+ in (pat_vis,+ text "Illegal duplicate variable" <+> quotes (ppr pat_tv) <+> text "in:")+ in pprWithExplicitKindsWhen (isInvisibleForAllTyFlag pat_vis) $+ hang main_msg+ 2 (vcat [ppr_eqn, suggestion])+ where+ ppr_eqn :: SDoc+ ppr_eqn =+ quotes (text "type" <+> ppr (mkTyConApp fam_tc pat_tys)+ <+> equals <+> text "...")++ suggestion :: SDoc+ suggestion = text "The arguments to" <+> quotes (ppr fam_tc)+ <+> text "must all be distinct type variables."++invalidAssocHints :: InvalidAssoc -> [GhcHint]+invalidAssocHints = \case+ InvalidAssocInstance rea -> invalidAssocInstanceHints rea+ InvalidAssocDefault rea -> invalidAssocDefaultHints rea++invalidAssocInstanceHints :: InvalidAssocInstance -> [GhcHint]+invalidAssocInstanceHints = \case+ AssocInstanceMissing {} -> noHints+ AssocInstanceNotInAClass {} -> noHints+ AssocNotInThisClass {} -> noHints+ AssocNoClassTyVar {} -> noHints+ AssocTyVarsDontMatch {} -> noHints++invalidAssocDefaultHints :: InvalidAssocDefault -> [GhcHint]+invalidAssocDefaultHints = \case+ AssocDefaultNotAssoc {} -> noHints+ AssocMultipleDefaults {} -> noHints+ AssocDefaultBadArgs _ _ bad ->+ assocDefaultBadArgHints bad++assocDefaultBadArgHints :: AssocDefaultBadArgs -> [GhcHint]+assocDefaultBadArgHints = \case+ AssocDefaultNonTyVarArg {} -> noHints+ AssocDefaultDuplicateTyVars {} -> noHints++invalidAssocReason :: InvalidAssoc -> DiagnosticReason+invalidAssocReason = \case+ InvalidAssocInstance rea -> invalidAssocInstanceReason rea+ InvalidAssocDefault rea -> invalidAssocDefaultReason rea++invalidAssocInstanceReason :: InvalidAssocInstance -> DiagnosticReason+invalidAssocInstanceReason = \case+ AssocInstanceMissing {} -> WarningWithFlag (Opt_WarnMissingMethods)+ AssocInstanceNotInAClass {} -> ErrorWithoutFlag+ AssocNotInThisClass {} -> ErrorWithoutFlag+ AssocNoClassTyVar {} -> ErrorWithoutFlag+ AssocTyVarsDontMatch {} -> ErrorWithoutFlag++invalidAssocDefaultReason :: InvalidAssocDefault -> DiagnosticReason+invalidAssocDefaultReason = \case+ AssocDefaultNotAssoc {} -> ErrorWithoutFlag+ AssocMultipleDefaults {} -> ErrorWithoutFlag+ AssocDefaultBadArgs _ _ rea ->+ assocDefaultBadArgReason rea++assocDefaultBadArgReason :: AssocDefaultBadArgs -> DiagnosticReason+assocDefaultBadArgReason = \case+ AssocDefaultNonTyVarArg {} -> ErrorWithoutFlag+ AssocDefaultDuplicateTyVars {} -> ErrorWithoutFlag++--------------------------------------------------------------------------------+-- Template Haskell quotes and splices++pprTHError :: THError -> DecoratedSDoc+pprTHError = \case+ THSyntaxError err -> pprTHSyntaxError err+ THNameError err -> pprTHNameError err+ THReifyError err -> pprTHReifyError err+ TypedTHError err -> pprTypedTHError err+ THSpliceFailed rea -> pprSpliceFailReason rea+ AddTopDeclsError err -> pprAddTopDeclsError err++ IllegalStaticFormInSplice e ->+ mkSimpleDecorated $+ sep [ text "static forms cannot be used in splices:"+ , nest 2 $ ppr e+ ]++ FailedToLookupThInstName th_type reason ->+ mkSimpleDecorated $+ case reason of+ NoMatchesFound ->+ text "Couldn't find any instances of"+ <+> text (TH.pprint th_type)+ <+> text "to add documentation to"+ CouldNotDetermineInstance ->+ text "Couldn't work out what instance"+ <+> text (TH.pprint th_type)+ <+> text "is supposed to be"++ AddInvalidCorePlugin plugin ->+ mkSimpleDecorated $+ hang (text "addCorePlugin: invalid plugin module" <+> quotes (text plugin) )+ 2 (text "Plugins in the current package can't be specified.")++ AddDocToNonLocalDefn doc_loc ->+ mkSimpleDecorated $+ text "Can't add documentation to" <+> ppr_loc doc_loc <> comma <+>+ text "as it isn't inside the current module."+ where+ ppr_loc (TH.DeclDoc n) = text $ TH.pprint n+ ppr_loc (TH.ArgDoc n _) = text $ TH.pprint n+ ppr_loc (TH.InstDoc t) = text $ TH.pprint t+ ppr_loc TH.ModuleDoc = text "the module header"++ ReportCustomQuasiError _ msg -> mkSimpleDecorated $ text msg++pprTHSyntaxError :: THSyntaxError -> DecoratedSDoc+pprTHSyntaxError = mkSimpleDecorated . \case+ IllegalTHQuotes expr ->+ text "Syntax error on" <+> ppr expr+ -- The error message context will say+ -- "In the Template Haskell quotation", so no need to repeat that here.+ BadImplicitSplice ->+ sep [ text "Parse error: module header, import declaration"+ , text "or top-level declaration expected." ]+ -- The compiler should not mention TemplateHaskell, as the common case+ -- is that this is a simple beginner error, for example:+ --+ -- module M where+ -- f :: Int -> Int; f x = x+ -- xyzzy+ -- g y = f y + 1+ --+ -- It's unlikely that 'xyzzy' above was intended to be a Template Haskell+ -- splice; instead it's probably something mistakenly left in the code.+ -- See #12146 for discussion.++ IllegalTHSplice ->+ text "Unexpected top-level splice."+ MismatchedSpliceType splice_type inner_splice_or_bracket ->+ inner <+> text "may not appear in" <+> outer <> dot+ where+ (inner, outer) = case inner_splice_or_bracket of+ IsSplice -> case splice_type of+ Typed -> (text "Typed splices" , text "untyped brackets")+ Untyped -> (text "Untyped splices", text "typed brackets")+ IsBracket ->+ case splice_type of+ Typed -> (text "Untyped brackets", text "typed splices")+ Untyped -> (text "Typed brackets" , text "untyped splices")+ NestedTHBrackets ->+ text "Template Haskell brackets cannot be nested" <+>+ text "(without intervening splices)"++pprTHNameError :: THNameError -> DecoratedSDoc+pprTHNameError = \case+ NonExactName name ->+ mkSimpleDecorated $+ hang (text "The binder" <+> quotes (ppr name) <+> text "is not a NameU.")+ 2 (text "Probable cause: you used mkName instead of newName to generate a binding.")+ QuotedNameWrongStage quote ->+ mkSimpleDecorated $+ sep [ text "Stage error: the non-top-level quoted name" <+> ppr quote+ , text "must be used at the same stage at which it is bound." ]++pprTHReifyError :: THReifyError -> DecoratedSDoc+pprTHReifyError = \case+ CannotReifyInstance ty+ -> mkSimpleDecorated $+ hang (text "reifyInstances:" <+> quotes (ppr ty))+ 2 (text "is not a class constraint or type family application")+ CannotReifyOutOfScopeThing th_name+ -> mkSimpleDecorated $+ quotes (text (TH.pprint th_name)) <+>+ text "is not in scope at a reify"+ -- Ugh! Rather an indirect way to display the name+ CannotReifyThingNotInTypeEnv name+ -> mkSimpleDecorated $+ quotes (ppr name) <+> text "is not in the type environment at a reify"+ NoRolesAssociatedWithThing thing+ -> mkSimpleDecorated $+ text "No roles associated with" <+> (ppr thing)+ CannotRepresentType sort ty+ -> mkSimpleDecorated $+ hsep [text "Can't represent" <+> sort_doc <+>+ text "in Template Haskell:",+ nest 2 (ppr ty)]+ where+ sort_doc = text $+ case sort of+ LinearInvisibleArgument -> "linear invisible argument"+ CoercionsInTypes -> "coercions in types"++pprTypedTHError :: TypedTHError -> DecoratedSDoc+pprTypedTHError = \case+ SplicePolymorphicLocalVar ident+ -> mkSimpleDecorated $+ text "Can't splice the polymorphic local variable" <+> quotes (ppr ident)+ TypedTHWithPolyType ty+ -> mkSimpleDecorated $+ vcat [ text "Illegal polytype:" <+> ppr ty+ , text "The type of a Typed Template Haskell expression must" <+>+ text "not have any quantification." ]++pprSpliceFailReason :: SpliceFailReason -> DecoratedSDoc+pprSpliceFailReason = \case+ SpliceThrewException phase _exn exn_msg expr show_code ->+ mkSimpleDecorated $+ vcat [ text "Exception when trying to" <+> text phaseStr <+> text "compile-time code:"+ , nest 2 (text exn_msg)+ , if show_code then text "Code:" <+> ppr expr else empty]+ where phaseStr =+ case phase of+ SplicePhase_Run -> "run"+ SplicePhase_CompileAndLink -> "compile and link"+ RunSpliceFailure err -> pprRunSpliceFailure Nothing err++pprAddTopDeclsError :: AddTopDeclsError -> DecoratedSDoc+pprAddTopDeclsError = \case+ InvalidTopDecl _decl ->+ mkSimpleDecorated $+ sep [ text "Only function, value, annotation, and foreign import declarations"+ , text "may be added with" <+> quotes (text "addTopDecls") <> dot ]+ AddTopDeclsUnexpectedDeclarationSplice {} ->+ mkSimpleDecorated $+ text "Declaration splices are not permitted" <+>+ text "inside top-level declarations added with" <+>+ quotes (text "addTopDecls") <> dot+ AddTopDeclsRunSpliceFailure err ->+ pprRunSpliceFailure (Just "addTopDecls") err++pprRunSpliceFailure :: Maybe String -> RunSpliceFailReason -> DecoratedSDoc+pprRunSpliceFailure mb_calling_fn (ConversionFail what reason) =+ mkSimpleDecorated . add_calling_fn . addSpliceInfo $+ pprConversionFailReason reason+ where+ add_calling_fn rest =+ case mb_calling_fn of+ Just calling_fn ->+ hang (text "Error in a declaration passed to" <+> quotes (text calling_fn) <> colon)+ 2 rest+ Nothing -> rest+ addSpliceInfo = case what of+ ConvDec d -> addSliceInfo' "declaration" d+ ConvExp e -> addSliceInfo' "expression" e+ ConvPat p -> addSliceInfo' "pattern" p+ ConvType t -> addSliceInfo' "type" t+ addSliceInfo' what item reasonErr = reasonErr $$ descr+ where+ -- Show the item in pretty syntax normally,+ -- but with all its constructors if you say -dppr-debug+ descr = hang (text "When splicing a TH" <+> text what <> colon)+ 2 (getPprDebug $ \case+ True -> text (show item)+ False -> text (TH.pprint item))++thErrorReason :: THError -> DiagnosticReason+thErrorReason = \case+ THSyntaxError err -> thSyntaxErrorReason err+ THNameError err -> thNameErrorReason err+ THReifyError err -> thReifyErrorReason err+ TypedTHError err -> typedTHErrorReason err+ THSpliceFailed rea -> spliceFailedReason rea+ AddTopDeclsError err -> addTopDeclsErrorReason err++ IllegalStaticFormInSplice {} -> ErrorWithoutFlag+ FailedToLookupThInstName {} -> ErrorWithoutFlag+ AddInvalidCorePlugin {} -> ErrorWithoutFlag+ AddDocToNonLocalDefn {} -> ErrorWithoutFlag+ ReportCustomQuasiError is_error _ ->+ if is_error+ then ErrorWithoutFlag+ else WarningWithoutFlag++thSyntaxErrorReason :: THSyntaxError -> DiagnosticReason+thSyntaxErrorReason = \case+ IllegalTHQuotes{} -> ErrorWithoutFlag+ BadImplicitSplice -> ErrorWithoutFlag+ IllegalTHSplice{} -> ErrorWithoutFlag+ NestedTHBrackets{} -> ErrorWithoutFlag+ MismatchedSpliceType{} -> ErrorWithoutFlag++thNameErrorReason :: THNameError -> DiagnosticReason+thNameErrorReason = \case+ NonExactName {} -> ErrorWithoutFlag+ QuotedNameWrongStage {} -> ErrorWithoutFlag++thReifyErrorReason :: THReifyError -> DiagnosticReason+thReifyErrorReason = \case+ CannotReifyInstance {} -> ErrorWithoutFlag+ CannotReifyOutOfScopeThing {} -> ErrorWithoutFlag+ CannotReifyThingNotInTypeEnv {} -> ErrorWithoutFlag+ NoRolesAssociatedWithThing {} -> ErrorWithoutFlag+ CannotRepresentType {} -> ErrorWithoutFlag++typedTHErrorReason :: TypedTHError -> DiagnosticReason+typedTHErrorReason = \case+ SplicePolymorphicLocalVar {} -> ErrorWithoutFlag+ TypedTHWithPolyType {} -> ErrorWithoutFlag++spliceFailedReason :: SpliceFailReason -> DiagnosticReason+spliceFailedReason = \case+ SpliceThrewException {} -> ErrorWithoutFlag+ RunSpliceFailure {} -> ErrorWithoutFlag++addTopDeclsErrorReason :: AddTopDeclsError -> DiagnosticReason+addTopDeclsErrorReason = \case+ InvalidTopDecl {}+ -> ErrorWithoutFlag+ AddTopDeclsUnexpectedDeclarationSplice {}+ -> ErrorWithoutFlag+ AddTopDeclsRunSpliceFailure {}+ -> ErrorWithoutFlag++thErrorHints :: THError -> [GhcHint]+thErrorHints = \case+ THSyntaxError err -> thSyntaxErrorHints err+ THNameError err -> thNameErrorHints err+ THReifyError err -> thReifyErrorHints err+ TypedTHError err -> typedTHErrorHints err+ THSpliceFailed rea -> spliceFailedHints rea+ AddTopDeclsError err -> addTopDeclsErrorHints err++ IllegalStaticFormInSplice {} -> noHints+ FailedToLookupThInstName {} -> noHints+ AddInvalidCorePlugin {} -> noHints+ AddDocToNonLocalDefn {} -> noHints+ ReportCustomQuasiError {} -> noHints++thSyntaxErrorHints :: THSyntaxError -> [GhcHint]+thSyntaxErrorHints = \case+ IllegalTHQuotes{}+ -> [suggestAnyExtension [LangExt.TemplateHaskell, LangExt.TemplateHaskellQuotes]]+ BadImplicitSplice {}+ -> noHints -- NB: don't suggest TemplateHaskell+ -- see comments on BadImplicitSplice in pprTHSyntaxError+ IllegalTHSplice{}+ -> [suggestExtension LangExt.TemplateHaskell]+ NestedTHBrackets{}+ -> noHints+ MismatchedSpliceType{}+ -> noHints++thNameErrorHints :: THNameError -> [GhcHint]+thNameErrorHints = \case+ NonExactName {} -> noHints+ QuotedNameWrongStage {} -> noHints++thReifyErrorHints :: THReifyError -> [GhcHint]+thReifyErrorHints = \case+ CannotReifyInstance {} -> noHints+ CannotReifyOutOfScopeThing {} -> noHints+ CannotReifyThingNotInTypeEnv {} -> noHints+ NoRolesAssociatedWithThing {} -> noHints+ CannotRepresentType {} -> noHints++typedTHErrorHints :: TypedTHError -> [GhcHint]+typedTHErrorHints = \case+ SplicePolymorphicLocalVar {} -> noHints+ TypedTHWithPolyType {} -> noHints++spliceFailedHints :: SpliceFailReason -> [GhcHint]+spliceFailedHints = \case+ SpliceThrewException {} -> noHints+ RunSpliceFailure {} -> noHints++addTopDeclsErrorHints :: AddTopDeclsError -> [GhcHint]+addTopDeclsErrorHints = \case+ InvalidTopDecl {}+ -> noHints+ AddTopDeclsUnexpectedDeclarationSplice {}+ -> noHints+ AddTopDeclsRunSpliceFailure {}+ -> noHints++--------------------------------------------------------------------------------++pprPatersonCondFailure ::+ PatersonCondFailure -> PatersonCondFailureContext -> Type -> Type -> SDoc+pprPatersonCondFailure (PCF_TyVar tvs) InInstanceDecl lhs rhs =+ hang (occMsg tvs)+ 2 (sep [ text "in the constraint" <+> quotes (ppr lhs)+ , text "than in the instance head" <+> quotes (ppr rhs) ])+ where+ occMsg tvs = text "Variable" <> plural tvs <+> quotes (pprWithCommas ppr tvs)+ <+> pp_occurs <+> text "more often"+ pp_occurs | isSingleton tvs = text "occurs"+ | otherwise = text "occur"+pprPatersonCondFailure (PCF_TyVar tvs) InTyFamEquation lhs rhs =+ hang (occMsg tvs)+ 2 (sep [ text "in the type-family application" <+> quotes (ppr rhs)+ , text "than in the LHS of the family instance" <+> quotes (ppr lhs) ])+ where+ occMsg tvs = text "Variable" <> plural tvs <+> quotes (pprWithCommas ppr tvs)+ <+> pp_occurs <+> text "more often"+ pp_occurs | isSingleton tvs = text "occurs"+ | otherwise = text "occur"+pprPatersonCondFailure PCF_Size InInstanceDecl lhs rhs =+ hang (text "The constraint" <+> quotes (ppr lhs))+ 2 (sep [ text "is no smaller than", pp_rhs ])+ where pp_rhs = text "the instance head" <+> quotes (ppr rhs)+pprPatersonCondFailure PCF_Size InTyFamEquation lhs rhs =+ hang (text "The type-family application" <+> quotes (ppr rhs))+ 2 (sep [ text "is no smaller than", pp_lhs ])+ where pp_lhs = text "the LHS of the family instance" <+> quotes (ppr lhs)+pprPatersonCondFailure (PCF_TyFam tc) InInstanceDecl lhs _rhs =+ hang (text "Illegal use of type family" <+> quotes (ppr tc))+ 2 (text "in the constraint" <+> quotes (ppr lhs))+pprPatersonCondFailure (PCF_TyFam tc) InTyFamEquation _lhs rhs =+ hang (text "Illegal nested use of type family" <+> quotes (ppr tc))+ 2 (text "in the arguments of the type-family application" <+> quotes (ppr rhs))++++--------------------------------------------------------------------------------++pprZonkerMessage :: ZonkerMessage -> SDoc+pprZonkerMessage = \case+ ZonkerCannotDefaultConcrete frr ->+ ppr (frr_context frr) $$+ text "cannot be assigned a fixed runtime representation," <+>+ text "not even by defaulting."++zonkerMessageHints :: ZonkerMessage -> [GhcHint]+zonkerMessageHints = \case+ ZonkerCannotDefaultConcrete {} -> [SuggestAddTypeSignatures UnnamedBinding]++zonkerMessageReason :: ZonkerMessage -> DiagnosticReason+zonkerMessageReason = \case+ ZonkerCannotDefaultConcrete {} -> ErrorWithoutFlag++--------------------------------------------------------------------------------
GHC/Tc/Errors/Types.hs view
@@ -1,4045 +1,6435 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE GADTs #-}-{-# LANGUAGE KindSignatures #-}--module GHC.Tc.Errors.Types (- -- * Main types- TcRnMessage(..)- , mkTcRnUnknownMessage- , TcRnMessageDetailed(..)- , TypeDataForbids(..)- , ErrInfo(..)- , FixedRuntimeRepProvenance(..)- , pprFixedRuntimeRepProvenance- , ShadowedNameProvenance(..)- , RecordFieldPart(..)- , IllegalNewtypeReason(..)- , InjectivityErrReason(..)- , HasKinds(..)- , hasKinds- , SuggestUndecidableInstances(..)- , suggestUndecidableInstances- , SuggestUnliftedTypes(..)- , DataSort(..), ppDataSort- , AllowedDataResKind(..)- , NotClosedReason(..)- , SuggestPartialTypeSignatures(..)- , suggestPartialTypeSignatures- , DeriveInstanceErrReason(..)- , UsingGeneralizedNewtypeDeriving(..)- , usingGeneralizedNewtypeDeriving- , DeriveAnyClassEnabled(..)- , deriveAnyClassEnabled- , DeriveInstanceBadConstructor(..)- , HasWildcard(..)- , hasWildcard- , BadAnonWildcardContext(..)- , SoleExtraConstraintWildcardAllowed(..)- , DeriveGenericsErrReason(..)- , HasAssociatedDataFamInsts(..)- , hasAssociatedDataFamInsts- , AssociatedTyLastVarInKind(..)- , associatedTyLastVarInKind- , AssociatedTyNotParamOverLastTyVar(..)- , associatedTyNotParamOverLastTyVar- , MissingSignature(..)- , Exported(..)- , HsDocContext(..)- , FixedRuntimeRepErrorInfo(..)-- , ErrorItem(..), errorItemOrigin, errorItemEqRel, errorItemPred, errorItemCtLoc-- , SolverReport(..), SolverReportSupplementary(..)- , SolverReportWithCtxt(..)- , SolverReportErrCtxt(..)- , getUserGivens, discardProvCtxtGivens- , TcSolverReportMsg(..)- , CannotUnifyVariableReason(..)- , MismatchMsg(..)- , MismatchEA(..)- , mkPlainMismatchMsg, mkBasicMismatchMsg- , WhenMatching(..)- , ExpectedActualInfo(..)- , TyVarInfo(..), SameOccInfo(..)- , AmbiguityInfo(..)- , CND_Extra(..)- , FitsMbSuppressed(..)- , ValidHoleFits(..), noValidHoleFits- , HoleFitDispConfig(..)- , RelevantBindings(..), pprRelevantBindings- , PromotionErr(..), pprPECategory, peCategory- , NotInScopeError(..), mkTcRnNotInScope- , ImportError(..)- , HoleError(..)- , CoercibleMsg(..)- , PotentialInstances(..)- , UnsupportedCallConvention(..)- , ExpectedBackends- , ArgOrResult(..)- , MatchArgsContext(..), MatchArgBadMatches(..)- , ConversionFailReason(..)- , UnrepresentableTypeDescr(..)- , LookupTHInstNameErrReason(..)- , SplicePhase(..)- , THDeclDescriptor(..)- , RunSpliceFailReason(..)- , ThingBeingConverted(..)- , IllegalDecls(..)- , EmptyStatementGroupErrReason(..)- , UnexpectedStatement(..)- ) where--import GHC.Prelude--import GHC.Hs-import {-# SOURCE #-} GHC.Tc.Types (TcIdSigInfo, TcTyThing)-import {-# SOURCE #-} GHC.Tc.Errors.Hole.FitTypes (HoleFit)-import GHC.Tc.Types.Constraint-import GHC.Tc.Types.Evidence (EvBindsVar)-import GHC.Tc.Types.Origin ( CtOrigin (ProvCtxtOrigin), SkolemInfoAnon (SigSkol)- , UserTypeCtxt (PatSynCtxt), TyVarBndrs, TypedThing- , FixedRuntimeRepOrigin(..) )-import GHC.Tc.Types.Rank (Rank)-import GHC.Tc.Utils.TcType (IllegalForeignTypeReason, TcType)-import GHC.Types.Error-import GHC.Types.Hint (UntickedPromotedThing(..))-import GHC.Types.ForeignCall (CLabelString)-import GHC.Types.Name (Name, OccName, getSrcLoc, getSrcSpan)-import qualified GHC.Types.Name.Occurrence as OccName-import GHC.Types.Name.Reader-import GHC.Types.SrcLoc-import GHC.Types.TyThing (TyThing)-import GHC.Types.Var (Id, TyCoVar, TyVar, TcTyVar)-import GHC.Types.Var.Env (TidyEnv)-import GHC.Types.Var.Set (TyVarSet, VarSet)-import GHC.Unit.Types (Module)-import GHC.Utils.Outputable-import GHC.Core.Class (Class, ClassMinimalDef)-import GHC.Core.Coercion.Axiom (CoAxBranch)-import GHC.Core.ConLike (ConLike)-import GHC.Core.DataCon (DataCon)-import GHC.Core.FamInstEnv (FamInst)-import GHC.Core.InstEnv (ClsInst)-import GHC.Core.PatSyn (PatSyn)-import GHC.Core.Predicate (EqRel, predTypeEqRel)-import GHC.Core.TyCon (TyCon, TyConFlavour)-import GHC.Core.Type (Kind, Type, ThetaType, PredType)-import GHC.Driver.Backend (Backend)-import GHC.Unit.State (UnitState)-import GHC.Types.Basic-import GHC.Utils.Misc (capitalise, filterOut)-import qualified GHC.LanguageExtensions as LangExt-import GHC.Data.FastString (FastString)-import GHC.Exception.Type (SomeException)--import Language.Haskell.Syntax.Basic (FieldLabelString(..))--import qualified Data.List.NonEmpty as NE-import Data.Typeable (Typeable)-import GHC.Unit.Module.Warnings (WarningTxt)-import qualified Language.Haskell.TH.Syntax as TH--import GHC.Generics ( Generic )--{--Note [Migrating TcM Messages]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--As part of #18516, we are slowly migrating the diagnostic messages emitted-and reported in the TcM from SDoc to TcRnMessage. Historically, GHC emitted-some diagnostics in 3 pieces, i.e. there were lots of error-reporting functions-that accepted 3 SDocs an input: one for the important part of the message,-one for the context and one for any supplementary information. Consider the following:-- • Couldn't match expected type ‘Int’ with actual type ‘Char’- • In the expression: x4- In a stmt of a 'do' block: return (x2, x4)- In the expression:--Under the hood, the reporting functions in Tc.Utils.Monad were emitting "Couldn't match"-as the important part, "In the expression" as the context and "In a stmt..In the expression"-as the supplementary, with the context and supplementary usually smashed together so that-the final message would be composed only by two SDoc (which would then be bulleted like in-the example).--In order for us to smooth out the migration to the new diagnostic infrastructure, we-introduce the 'ErrInfo' and 'TcRnMessageDetailed' types, which serve exactly the purpose-of bridging the two worlds together without breaking the external API or the existing-format of messages reported by GHC.--Using 'ErrInfo' and 'TcRnMessageDetailed' also allows us to move away from the SDoc-ridden-diagnostic API inside Tc.Utils.Monad, enabling further refactorings.--In the future, once the conversion will be complete and we will successfully eradicate-any use of SDoc in the diagnostic reporting of GHC, we can surely revisit the usage and-existence of these two types, which for now remain a "necessary evil".---}---- The majority of TcRn messages come with extra context about the error,--- and this newtype captures it. See Note [Migrating TcM Messages].-data ErrInfo = ErrInfo {- errInfoContext :: !SDoc- -- ^ Extra context associated to the error.- , errInfoSupplementary :: !SDoc- -- ^ Extra supplementary info associated to the error.- }----- | 'TcRnMessageDetailed' is an \"internal\" type (used only inside--- 'GHC.Tc.Utils.Monad' that wraps a 'TcRnMessage' while also providing--- any extra info needed to correctly pretty-print this diagnostic later on.-data TcRnMessageDetailed- = TcRnMessageDetailed !ErrInfo- -- ^ Extra info associated with the message- !TcRnMessage- deriving Generic--mkTcRnUnknownMessage :: (Diagnostic a, Typeable a, DiagnosticOpts a ~ NoDiagnosticOpts)- => a -> TcRnMessage-mkTcRnUnknownMessage diag = TcRnUnknownMessage (UnknownDiagnostic diag)---- | An error which might arise during typechecking/renaming.-data TcRnMessage where- {-| Simply wraps an unknown 'Diagnostic' message @a@. It can be used by plugins- to provide custom diagnostic messages originated during typechecking/renaming.- -}- TcRnUnknownMessage :: UnknownDiagnostic -> TcRnMessage-- {-| TcRnMessageWithInfo is a constructor which is used when extra information is needed- to be provided in order to qualify a diagnostic and where it was originated (and why).- It carries an extra 'UnitState' which can be used to pretty-print some names- and it wraps a 'TcRnMessageDetailed', which includes any extra context associated- with this diagnostic.- -}- TcRnMessageWithInfo :: !UnitState- -- ^ The 'UnitState' will allow us to pretty-print- -- some diagnostics with more detail.- -> !TcRnMessageDetailed- -> TcRnMessage-- {-| TcRnWithHsDocContext annotates an error message with the context in which- it originated.- -}- TcRnWithHsDocContext :: !HsDocContext- -> !TcRnMessage- -> TcRnMessage-- {-| TcRnSolverReport is the constructor used to report unsolved constraints- after constraint solving, as well as other errors such as hole fit errors.-- See the documentation of the 'TcSolverReportMsg' datatype for an overview- of the different errors.- -}- TcRnSolverReport :: SolverReportWithCtxt- -> DiagnosticReason- -> [GhcHint]- -> TcRnMessage- -- TODO: split up TcRnSolverReport into several components,- -- so that we can compute the reason and hints, as opposed- -- to having to pass them here.-- {-| TcRnRedundantConstraints is a warning that is emitted when a binding- has a user-written type signature which contains superfluous constraints.-- Example:-- f :: (Eq a, Ord a) => a -> a -> a- f x y = (x < y) || x == y- -- `Eq a` is superfluous: the `Ord a` constraint suffices.-- Test cases: T9939, T10632, T18036a, T20602, PluralS, T19296.- -}- TcRnRedundantConstraints :: [Id]- -> (SkolemInfoAnon, Bool)- -- ^ The contextual skolem info.- -- The boolean controls whether we- -- want to show it in the user message.- -- (Nice to keep track of the info in either case,- -- for other users of the GHC API.)- -> TcRnMessage-- {-| TcRnInaccessibleCode is a warning that is emitted when the RHS of a pattern- match is inaccessible, because the constraint solver has detected a contradiction.-- Example:-- data B a where { MkTrue :: B True; MkFalse :: B False }-- foo :: B False -> Bool- foo MkFalse = False- foo MkTrue = True -- Inaccessible: requires True ~ False-- Test cases: T7293, T7294, T15558, T17646, T18572, T18610, tcfail167.- -}- TcRnInaccessibleCode :: Implication -- ^ The implication containing a contradiction.- -> SolverReportWithCtxt -- ^ The contradiction.- -> TcRnMessage-- {-| A type which was expected to have a fixed runtime representation- does not have a fixed runtime representation.-- Example:-- data D (a :: TYPE r) = MkD a-- Test cases: T11724, T18534,- RepPolyPatSynArg, RepPolyPatSynUnliftedNewtype,- RepPolyPatSynRes, T20423- -}- TcRnTypeDoesNotHaveFixedRuntimeRep :: !Type- -> !FixedRuntimeRepProvenance- -> !ErrInfo -- Extra info accumulated in the TcM monad- -> TcRnMessage-- {-| TcRnImplicitLift is a warning (controlled with -Wimplicit-lift) that occurs when- a Template Haskell quote implicitly uses 'lift'.-- Example:- warning1 :: Lift t => t -> Q Exp- warning1 x = [| x |]-- Test cases: th/T17804- -}- TcRnImplicitLift :: Name -> !ErrInfo -> TcRnMessage- {-| TcRnUnusedPatternBinds is a warning (controlled with -Wunused-pattern-binds)- that occurs if a pattern binding binds no variables at all, unless it is a- lone wild-card pattern, or a banged pattern.-- Example:- Just _ = rhs3 -- Warning: unused pattern binding- (_, _) = rhs4 -- Warning: unused pattern binding- _ = rhs3 -- No warning: lone wild-card pattern- !() = rhs4 -- No warning: banged pattern; behaves like seq-- Test cases: rename/{T13646,T17c,T17e,T7085}- -}- TcRnUnusedPatternBinds :: HsBind GhcRn -> TcRnMessage- {-| TcRnDodgyImports is a warning (controlled with -Wdodgy-imports) that occurs when- a datatype 'T' is imported with all constructors, i.e. 'T(..)', but has been exported- abstractly, i.e. 'T'.-- Test cases: rename/should_compile/T7167- -}- TcRnDodgyImports :: RdrName -> TcRnMessage- {-| TcRnDodgyExports is a warning (controlled by -Wdodgy-exports) that occurs when a datatype- 'T' is exported with all constructors, i.e. 'T(..)', but is it just a type synonym or a- type/data family.-- Example:- module Foo (- T(..) -- Warning: T is a type synonym- , A(..) -- Warning: A is a type family- , C(..) -- Warning: C is a data family- ) where-- type T = Int- type family A :: * -> *- data family C :: * -> *-- Test cases: warnings/should_compile/DodgyExports01- -}- TcRnDodgyExports :: Name -> TcRnMessage- {-| TcRnMissingImportList is a warning (controlled by -Wmissing-import-lists) that occurs when- an import declaration does not explicitly list all the names brought into scope.-- Test cases: rename/should_compile/T4489- -}- TcRnMissingImportList :: IE GhcPs -> TcRnMessage- {-| When a module marked trustworthy or unsafe (using -XTrustworthy or -XUnsafe) is compiled- with a plugin, the TcRnUnsafeDueToPlugin warning (controlled by -Wunsafe) is used as the- reason the module was inferred to be unsafe. This warning is not raised if the- -fplugin-trustworthy flag is passed.-- Test cases: plugins/T19926- -}- TcRnUnsafeDueToPlugin :: TcRnMessage- {-| TcRnModMissingRealSrcSpan is an error that occurs when compiling a module that lacks- an associated 'RealSrcSpan'.-- Test cases: None- -}- TcRnModMissingRealSrcSpan :: Module -> TcRnMessage- {-| TcRnIdNotExportedFromModuleSig is an error pertaining to backpack that occurs- when an identifier required by a signature is not exported by the module- or signature that is being used as a substitution for that signature.-- Example(s): None-- Test cases: backpack/should_fail/bkpfail36- -}- TcRnIdNotExportedFromModuleSig :: Name -> Module -> TcRnMessage- {-| TcRnIdNotExportedFromLocalSig is an error pertaining to backpack that- occurs when an identifier which is necessary for implementing a module- signature is not exported from that signature.-- Example(s): None-- Test cases: backpack/should_fail/bkpfail30- backpack/should_fail/bkpfail31- backpack/should_fail/bkpfail34- -}- TcRnIdNotExportedFromLocalSig :: Name -> TcRnMessage-- {-| TcRnShadowedName is a warning (controlled by -Wname-shadowing) that occurs whenever- an inner-scope value has the same name as an outer-scope value, i.e. the inner- value shadows the outer one. This can catch typographical errors that turn into- hard-to-find bugs. The warning is suppressed for names beginning with an underscore.-- Examples(s):- f = ... let f = id in ... f ... -- NOT OK, 'f' is shadowed- f x = do { _ignore <- this; _ignore <- that; return (the other) } -- suppressed via underscore-- Test cases: typecheck/should_compile/T10971a- rename/should_compile/rn039- rename/should_compile/rn064- rename/should_compile/T1972- rename/should_fail/T2723- rename/should_compile/T3262- driver/werror- -}- TcRnShadowedName :: OccName -> ShadowedNameProvenance -> TcRnMessage-- {-| TcRnDuplicateWarningDecls is an error that occurs whenever- a warning is declared twice.-- Examples(s):- None.-- Test cases:- None.- -}- TcRnDuplicateWarningDecls :: !(LocatedN RdrName) -> !RdrName -> TcRnMessage-- {-| TcRnDuplicateWarningDecls is an error that occurs whenever- the constraint solver in the simplifier hits the iterations' limit.-- Examples(s):- None.-- Test cases:- None.- -}- TcRnSimplifierTooManyIterations :: Cts- -> !IntWithInf- -- ^ The limit.- -> WantedConstraints- -> TcRnMessage-- {-| TcRnIllegalPatSynDecl is an error that occurs whenever- there is an illegal pattern synonym declaration.-- Examples(s):-- varWithLocalPatSyn x = case x of- P -> ()- where- pattern P = () -- not valid, it can't be local, it must be defined at top-level.-- Test cases: patsyn/should_fail/local- -}- TcRnIllegalPatSynDecl :: !(LIdP GhcPs) -> TcRnMessage-- {-| TcRnLinearPatSyn is an error that occurs whenever a pattern- synonym signature uses a field that is not unrestricted.-- Example(s): None-- Test cases: linear/should_fail/LinearPatSyn2- -}- TcRnLinearPatSyn :: !Type -> TcRnMessage-- {-| TcRnEmptyRecordUpdate is an error that occurs whenever- a record is updated without specifying any field.-- Examples(s):-- $(deriveJSON defaultOptions{} ''Bad) -- not ok, no fields selected for update of defaultOptions-- Test cases: th/T12788- -}- TcRnEmptyRecordUpdate :: TcRnMessage-- {-| TcRnIllegalFieldPunning is an error that occurs whenever- field punning is used without the 'NamedFieldPuns' extension enabled.-- Examples(s):-- data Foo = Foo { a :: Int }-- foo :: Foo -> Int- foo Foo{a} = a -- Not ok, punning used without extension.-- Test cases: parser/should_fail/RecordDotSyntaxFail12- -}- TcRnIllegalFieldPunning :: !(Located RdrName) -> TcRnMessage-- {-| TcRnIllegalWildcardsInRecord is an error that occurs whenever- wildcards (..) are used in a record without the relevant- extension being enabled.-- Examples(s):-- data Foo = Foo { a :: Int }-- foo :: Foo -> Int- foo Foo{..} = a -- Not ok, wildcards used without extension.-- Test cases: parser/should_fail/RecordWildCardsFail- -}- TcRnIllegalWildcardsInRecord :: !RecordFieldPart -> TcRnMessage-- {-| TcRnIllegalWildcardInType is an error that occurs- when a wildcard appears in a type in a location in which- wildcards aren't allowed.-- Examples:-- Type synonyms:-- type T = _-- Class declarations and instances:-- class C _- instance C _-- Standalone kind signatures:-- type D :: _- data D-- Test cases:- ExtraConstraintsWildcardInTypeSplice2- ExtraConstraintsWildcardInTypeSpliceUsed- ExtraConstraintsWildcardNotLast- ExtraConstraintsWildcardTwice- NestedExtraConstraintsWildcard- NestedNamedExtraConstraintsWildcard- PartialClassMethodSignature- PartialClassMethodSignature2- T12039- T13324_fail1- UnnamedConstraintWildcard1- UnnamedConstraintWildcard2- WildcardInADT1- WildcardInADT2- WildcardInADT3- WildcardInADTContext1- WildcardInDefault- WildcardInDefaultSignature- WildcardInDeriving- WildcardInForeignExport- WildcardInForeignImport- WildcardInGADT1- WildcardInGADT2- WildcardInInstanceHead- WildcardInInstanceSig- WildcardInNewtype- WildcardInPatSynSig- WildcardInStandaloneDeriving- WildcardInTypeFamilyInstanceRHS- WildcardInTypeSynonymRHS- saks_fail003- T15433a- -}-- TcRnIllegalWildcardInType- :: Maybe Name- -- ^ the wildcard name, or 'Nothing' for an anonymous wildcard- -> !BadAnonWildcardContext- -> TcRnMessage--- {-| TcRnDuplicateFieldName is an error that occurs whenever- there are duplicate field names in a record.-- Examples(s): None.-- Test cases: None.- -}- TcRnDuplicateFieldName :: !RecordFieldPart -> NE.NonEmpty RdrName -> TcRnMessage-- {-| TcRnIllegalViewPattern is an error that occurs whenever- the ViewPatterns syntax is used but the ViewPatterns language extension- is not enabled.-- Examples(s):- data Foo = Foo { a :: Int }-- foo :: Foo -> Int- foo (a -> l) = l -- not OK, the 'ViewPattern' extension is not enabled.-- Test cases: parser/should_fail/ViewPatternsFail- -}- TcRnIllegalViewPattern :: !(Pat GhcPs) -> TcRnMessage-- {-| TcRnCharLiteralOutOfRange is an error that occurs whenever- a character is out of range.-- Examples(s): None-- Test cases: None- -}- TcRnCharLiteralOutOfRange :: !Char -> TcRnMessage-- {-| TcRnIllegalWildcardsInConstructor is an error that occurs whenever- the record wildcards '..' are used inside a constructor without labeled fields.-- Examples(s): None-- Test cases: None- -}- TcRnIllegalWildcardsInConstructor :: !Name -> TcRnMessage-- {-| TcRnIgnoringAnnotations is a warning that occurs when the source code- contains annotation pragmas but the platform in use does not support an- external interpreter such as GHCi and therefore the annotations are ignored.-- Example(s): None-- Test cases: None- -}- TcRnIgnoringAnnotations :: [LAnnDecl GhcRn] -> TcRnMessage-- {-| TcRnAnnotationInSafeHaskell is an error that occurs if annotation pragmas- are used in conjunction with Safe Haskell.-- Example(s): None-- Test cases: annotations/should_fail/T10826- -}- TcRnAnnotationInSafeHaskell :: TcRnMessage-- {-| TcRnInvalidTypeApplication is an error that occurs when a visible type application- is used with an expression that does not accept "specified" type arguments.-- Example(s):- foo :: forall {a}. a -> a- foo x = x- bar :: ()- bar = let x = foo @Int 42- in ()-- Test cases: overloadedrecflds/should_fail/overloadedlabelsfail03- typecheck/should_fail/ExplicitSpecificity1- typecheck/should_fail/ExplicitSpecificity10- typecheck/should_fail/ExplicitSpecificity2- typecheck/should_fail/T17173- typecheck/should_fail/VtaFail- -}- TcRnInvalidTypeApplication :: Type -> LHsWcType GhcRn -> TcRnMessage-- {-| TcRnTagToEnumMissingValArg is an error that occurs when the 'tagToEnum#'- function is not applied to a single value argument.-- Example(s):- tagToEnum# 1 2-- Test cases: None- -}- TcRnTagToEnumMissingValArg :: TcRnMessage-- {-| TcRnTagToEnumUnspecifiedResTy is an error that occurs when the 'tagToEnum#'- function is not given a concrete result type.-- Example(s):- foo :: forall a. a- foo = tagToEnum# 0#-- Test cases: typecheck/should_fail/tcfail164- -}- TcRnTagToEnumUnspecifiedResTy :: Type -> TcRnMessage-- {-| TcRnTagToEnumResTyNotAnEnum is an error that occurs when the 'tagToEnum#'- function is given a result type that is not an enumeration type.-- Example(s):- foo :: Int -- not an enumeration TyCon- foo = tagToEnum# 0#-- Test cases: typecheck/should_fail/tcfail164- -}- TcRnTagToEnumResTyNotAnEnum :: Type -> TcRnMessage-- {-| TcRnTagToEnumResTyTypeData is an error that occurs when the 'tagToEnum#'- function is given a result type that is headed by a @type data@ type, as- the data constructors of a @type data@ do not exist at the term level.-- Example(s):- type data Letter = A | B | C-- foo :: Letter- foo = tagToEnum# 0#-- Test cases: type-data/should_fail/TDTagToEnum.hs- -}- TcRnTagToEnumResTyTypeData :: Type -> TcRnMessage-- {-| TcRnArrowIfThenElsePredDependsOnResultTy is an error that occurs when the- predicate type of an ifThenElse expression in arrow notation depends on- the type of the result.-- Example(s): None-- Test cases: None- -}- TcRnArrowIfThenElsePredDependsOnResultTy :: TcRnMessage-- {-| TcRnIllegalHsBootFileDecl is an error that occurs when an hs-boot file- contains declarations that are not allowed, such as bindings.-- Example(s): None-- Test cases: None- -}- TcRnIllegalHsBootFileDecl :: TcRnMessage-- {-| TcRnRecursivePatternSynonym is an error that occurs when a pattern synonym- is defined in terms of itself, either directly or indirectly.-- Example(s):- pattern A = B- pattern B = A-- Test cases: patsyn/should_fail/T16900- -}- TcRnRecursivePatternSynonym :: LHsBinds GhcRn -> TcRnMessage-- {-| TcRnPartialTypeSigTyVarMismatch is an error that occurs when a partial type signature- attempts to unify two different types.-- Example(s):- f :: a -> b -> _- f x y = [x, y]-- Test cases: partial-sigs/should_fail/T14449- -}- TcRnPartialTypeSigTyVarMismatch- :: Name -- ^ first type variable- -> Name -- ^ second type variable- -> Name -- ^ function name- -> LHsSigWcType GhcRn -> TcRnMessage-- {-| TcRnPartialTypeSigBadQuantifier is an error that occurs when a type variable- being quantified over in the partial type signature of a function gets unified- with a type that is free in that function's context.-- Example(s):- foo :: Num a => a -> a- foo xxx = g xxx- where- g :: forall b. Num b => _ -> b- g y = xxx + y-- Test cases: partial-sig/should_fail/T14479- -}- TcRnPartialTypeSigBadQuantifier- :: Name -- ^ user-written name of type variable being quantified- -> Name -- ^ function name- -> Maybe Type -- ^ type the variable unified with, if known- -> LHsSigWcType GhcRn -- ^ partial type signature- -> TcRnMessage-- {-| TcRnMissingSignature is a warning that occurs when a top-level binding- or a pattern synonym does not have a type signature.-- Controlled by the flags:- -Wmissing-signatures- -Wmissing-exported-signatures- -Wmissing-pattern-synonym-signatures- -Wmissing-exported-pattern-synonym-signatures- -Wmissing-kind-signatures-- Test cases:- T11077 (top-level bindings)- T12484 (pattern synonyms)- T19564 (kind signatures)- -}- TcRnMissingSignature :: MissingSignature- -> Exported- -> Bool -- ^ True: -Wmissing-signatures overrides -Wmissing-exported-signatures,- -- or -Wmissing-pattern-synonym-signatures overrides -Wmissing-exported-pattern-synonym-signatures- -> TcRnMessage-- {-| TcRnPolymorphicBinderMissingSig is a warning controlled by -Wmissing-local-signatures- that occurs when a local polymorphic binding lacks a type signature.-- Example(s):- id a = a-- Test cases: warnings/should_compile/T12574- -}- TcRnPolymorphicBinderMissingSig :: Name -> Type -> TcRnMessage-- {-| TcRnOverloadedSig is an error that occurs when a binding group conflicts- with the monomorphism restriction.-- Example(s):- data T a = T a- mono = ... where- x :: Applicative f => f a- T x = ...-- Test cases: typecheck/should_compile/T11339- -}- TcRnOverloadedSig :: TcIdSigInfo -> TcRnMessage-- {-| TcRnTupleConstraintInst is an error that occurs whenever an instance- for a tuple constraint is specified.-- Examples(s):- class C m a- class D m a- f :: (forall a. Eq a => (C m a, D m a)) => m a- f = undefined-- Test cases: quantified-constraints/T15334- -}- TcRnTupleConstraintInst :: !Class -> TcRnMessage-- {-| TcRnAbstractClassInst is an error that occurs whenever an instance- of an abstract class is specified.-- Examples(s):- -- A.hs-boot- module A where- class C a-- -- B.hs- module B where- import {-# SOURCE #-} A- instance C Int where-- -- A.hs- module A where- import B- class C a where- f :: a-- -- Main.hs- import A- main = print (f :: Int)-- Test cases: typecheck/should_fail/T13068- -}- TcRnAbstractClassInst :: !Class -> TcRnMessage-- {-| TcRnNoClassInstHead is an error that occurs whenever an instance- head is not headed by a class.-- Examples(s):- instance c-- Test cases: typecheck/rename/T5513- typecheck/rename/T16385- -}- TcRnNoClassInstHead :: !Type -> TcRnMessage-- {-| TcRnUserTypeError is an error that occurs due to a user's custom type error,- which can be triggered by adding a `TypeError` constraint in a type signature- or typeclass instance.-- Examples(s):- f :: TypeError (Text "This is a type error")- f = undefined-- Test cases: typecheck/should_fail/CustomTypeErrors02- typecheck/should_fail/CustomTypeErrors03- -}- TcRnUserTypeError :: !Type -> TcRnMessage-- {-| TcRnConstraintInKind is an error that occurs whenever a constraint is specified- in a kind.-- Examples(s):- data Q :: Eq a => Type where {}-- Test cases: dependent/should_fail/T13895- polykinds/T16263- saks/should_fail/saks_fail004- typecheck/should_fail/T16059a- typecheck/should_fail/T18714- -}- TcRnConstraintInKind :: !Type -> TcRnMessage-- {-| TcRnUnboxedTupleTypeFuncArg is an error that occurs whenever an unboxed tuple- or unboxed sum type is specified as a function argument, when the appropriate- extension (`-XUnboxedTuples` or `-XUnboxedSums`) isn't enabled.-- Examples(s):- -- T15073.hs- import T15073a- newtype Foo a = MkFoo a- deriving P-- -- T15073a.hs- class P a where- p :: a -> (# a #)-- Test cases: deriving/should_fail/T15073.hs- deriving/should_fail/T15073a.hs- typecheck/should_fail/T16059d- -}- TcRnUnboxedTupleOrSumTypeFuncArg- :: UnboxedTupleOrSum -- ^ whether this is an unboxed tuple or an unboxed sum- -> !Type- -> TcRnMessage-- {-| TcRnLinearFuncInKind is an error that occurs whenever a linear function is- specified in a kind.-- Examples(s):- data A :: * %1 -> *-- Test cases: linear/should_fail/LinearKind- linear/should_fail/LinearKind2- linear/should_fail/LinearKind3- -}- TcRnLinearFuncInKind :: !Type -> TcRnMessage-- {-| TcRnForAllEscapeError is an error that occurs whenever a quantified type's kind- mentions quantified type variable.-- Examples(s):- type T :: TYPE (BoxedRep l)- data T = MkT-- Test cases: unlifted-datatypes/should_fail/UnlDataNullaryPoly- -}- TcRnForAllEscapeError :: !Type -> !Kind -> TcRnMessage-- {-| TcRnVDQInTermType is an error that occurs whenever a visible dependent quantification- is specified in the type of a term.-- Examples(s):- a = (undefined :: forall k -> k -> Type) @Int-- Test cases: dependent/should_fail/T15859- dependent/should_fail/T16326_Fail1- dependent/should_fail/T16326_Fail2- dependent/should_fail/T16326_Fail3- dependent/should_fail/T16326_Fail4- dependent/should_fail/T16326_Fail5- dependent/should_fail/T16326_Fail6- dependent/should_fail/T16326_Fail7- dependent/should_fail/T16326_Fail8- dependent/should_fail/T16326_Fail9- dependent/should_fail/T16326_Fail10- dependent/should_fail/T16326_Fail11- dependent/should_fail/T16326_Fail12- dependent/should_fail/T17687- dependent/should_fail/T18271- -}- TcRnVDQInTermType :: !(Maybe Type) -> TcRnMessage-- {-| TcRnBadQuantPredHead is an error that occurs whenever a quantified predicate- lacks a class or type variable head.-- Examples(s):- class (forall a. A t a => A t [a]) => B t where- type A t a :: Constraint-- Test cases: quantified-constraints/T16474- -}- TcRnBadQuantPredHead :: !Type -> TcRnMessage-- {-| TcRnIllegalTupleConstraint is an error that occurs whenever an illegal tuple- constraint is specified.-- Examples(s):- g :: ((Show a, Num a), Eq a) => a -> a- g = undefined-- Test cases: typecheck/should_fail/tcfail209a- -}- TcRnIllegalTupleConstraint :: !Type -> TcRnMessage-- {-| TcRnNonTypeVarArgInConstraint is an error that occurs whenever a non type-variable- argument is specified in a constraint.-- Examples(s):- data T- instance Eq Int => Eq T-- Test cases: ghci/scripts/T13202- ghci/scripts/T13202a- polykinds/T12055a- typecheck/should_fail/T10351- typecheck/should_fail/T19187- typecheck/should_fail/T6022- typecheck/should_fail/T8883- -}- TcRnNonTypeVarArgInConstraint :: !Type -> TcRnMessage-- {-| TcRnIllegalImplicitParam is an error that occurs whenever an illegal implicit- parameter is specified.-- Examples(s):- type Bla = ?x::Int- data T = T- instance Bla => Eq T-- Test cases: polykinds/T11466- typecheck/should_fail/T8912- typecheck/should_fail/tcfail041- typecheck/should_fail/tcfail211- typecheck/should_fail/tcrun045- -}- TcRnIllegalImplicitParam :: !Type -> TcRnMessage-- {-| TcRnIllegalConstraintSynonymOfKind is an error that occurs whenever an illegal constraint- synonym of kind is specified.-- Examples(s):- type Showish = Show- f :: (Showish a) => a -> a- f = undefined-- Test cases: typecheck/should_fail/tcfail209- -}- TcRnIllegalConstraintSynonymOfKind :: !Type -> TcRnMessage-- {-| TcRnIllegalClassInst is an error that occurs whenever a class instance is specified- for a non-class.-- Examples(s):- type C1 a = (Show (a -> Bool))- instance C1 Int where-- Test cases: polykinds/T13267- -}- TcRnIllegalClassInst :: !TyConFlavour -> TcRnMessage-- {-| TcRnOversaturatedVisibleKindArg is an error that occurs whenever an illegal oversaturated- visible kind argument is specified.-- Examples(s):- type family- F2 :: forall (a :: Type). Type where- F2 @a = Maybe a-- Test cases: typecheck/should_fail/T15793- typecheck/should_fail/T16255- -}- TcRnOversaturatedVisibleKindArg :: !Type -> TcRnMessage-- {-| TcRnBadAssociatedType is an error that occurs whenever a class doesn't have an- associated type.-- Examples(s):- $(do d <- instanceD (cxt []) (conT ''Eq `appT` conT ''Foo)- [tySynInstD $ tySynEqn Nothing (conT ''Rep `appT` conT ''Foo) (conT ''Maybe)]- return [d])- ======>- instance Eq Foo where- type Rep Foo = Maybe-- Test cases: th/T12387a- -}- TcRnBadAssociatedType :: {-Class-} !Name -> {-TyCon-} !Name -> TcRnMessage-- {-| TcRnForAllRankErr is an error that occurs whenever an illegal ranked type- is specified.-- Examples(s):- foo :: (a,b) -> (a~b => t) -> (a,b)- foo p x = p-- Test cases:- - ghci/should_run/T15806- - indexed-types/should_fail/SimpleFail15- - typecheck/should_fail/T11355- - typecheck/should_fail/T12083a- - typecheck/should_fail/T12083b- - typecheck/should_fail/T16059c- - typecheck/should_fail/T16059e- - typecheck/should_fail/T17213- - typecheck/should_fail/T18939_Fail- - typecheck/should_fail/T2538- - typecheck/should_fail/T5957- - typecheck/should_fail/T7019- - typecheck/should_fail/T7019a- - typecheck/should_fail/T7809- - typecheck/should_fail/T9196- - typecheck/should_fail/tcfail127- - typecheck/should_fail/tcfail184- - typecheck/should_fail/tcfail196- - typecheck/should_fail/tcfail197- -}- TcRnForAllRankErr :: !Rank -> !Type -> TcRnMessage-- {-| TcRnMonomorphicBindings is a warning (controlled by -Wmonomorphism-restriction)- that arise when the monomorphism restriction applies to the given bindings.-- Examples(s):- {-# OPTIONS_GHC -Wmonomorphism-restriction #-}-- bar = 10-- foo :: Int- foo = bar-- main :: IO ()- main = print foo-- The example above emits the warning (for 'bar'), because without monomorphism- restriction the inferred type for 'bar' is 'bar :: Num p => p'. This warning tells us- that /if/ we were to enable '-XMonomorphismRestriction' we would make 'bar'- less polymorphic, as its type would become 'bar :: Int', so GHC warns us about that.-- Test cases: typecheck/should_compile/T13785- -}- TcRnMonomorphicBindings :: [Name] -> TcRnMessage-- {-| TcRnOrphanInstance is a warning (controlled by -Wwarn-orphans)- that arises when a typeclass instance is an \"orphan\", i.e. if it appears- in a module in which neither the class nor the type being instanced are- declared in the same module.-- Examples(s): None-- Test cases: warnings/should_compile/T9178- typecheck/should_compile/T4912- -}- TcRnOrphanInstance :: ClsInst -> TcRnMessage-- {-| TcRnFunDepConflict is an error that occurs when there are functional dependencies- conflicts between instance declarations.-- Examples(s): None-- Test cases: typecheck/should_fail/T2307- typecheck/should_fail/tcfail096- typecheck/should_fail/tcfail202- -}- TcRnFunDepConflict :: !UnitState -> NE.NonEmpty ClsInst -> TcRnMessage-- {-| TcRnDupInstanceDecls is an error that occurs when there are duplicate instance- declarations.-- Examples(s):- class Foo a where- foo :: a -> Int-- instance Foo Int where- foo = id-- instance Foo Int where- foo = const 42-- Test cases: cabal/T12733/T12733- typecheck/should_fail/tcfail035- typecheck/should_fail/tcfail023- backpack/should_fail/bkpfail18- typecheck/should_fail/TcNullaryTCFail- typecheck/should_fail/tcfail036- typecheck/should_fail/tcfail073- module/mod51- module/mod52- module/mod44- -}- TcRnDupInstanceDecls :: !UnitState -> NE.NonEmpty ClsInst -> TcRnMessage-- {-| TcRnConflictingFamInstDecls is an error that occurs when there are conflicting- family instance declarations.-- Examples(s): None.-- Test cases: indexed-types/should_fail/ExplicitForAllFams4b- indexed-types/should_fail/NoGood- indexed-types/should_fail/Over- indexed-types/should_fail/OverDirectThisMod- indexed-types/should_fail/OverIndirectThisMod- indexed-types/should_fail/SimpleFail11a- indexed-types/should_fail/SimpleFail11b- indexed-types/should_fail/SimpleFail11c- indexed-types/should_fail/SimpleFail11d- indexed-types/should_fail/SimpleFail2a- indexed-types/should_fail/SimpleFail2b- indexed-types/should_fail/T13092/T13092- indexed-types/should_fail/T13092c/T13092c- indexed-types/should_fail/T14179- indexed-types/should_fail/T2334A- indexed-types/should_fail/T2677- indexed-types/should_fail/T3330b- indexed-types/should_fail/T4246- indexed-types/should_fail/T7102a- indexed-types/should_fail/T9371- polykinds/T7524- typecheck/should_fail/UnliftedNewtypesOverlap- -}- TcRnConflictingFamInstDecls :: NE.NonEmpty FamInst -> TcRnMessage-- TcRnFamInstNotInjective :: InjectivityErrReason -> TyCon -> NE.NonEmpty CoAxBranch -> TcRnMessage-- {-| TcRnBangOnUnliftedType is a warning (controlled by -Wredundant-strictness-flags) that- occurs when a strictness annotation is applied to an unlifted type.-- Example(s):- data T = MkT !Int# -- Strictness flag has no effect on unlifted types-- Test cases: typecheck/should_compile/T20187a- typecheck/should_compile/T20187b- -}- TcRnBangOnUnliftedType :: !Type -> TcRnMessage-- {-| TcRnLazyBangOnUnliftedType is a warning (controlled by -Wredundant-strictness-flags) that- occurs when a lazy annotation is applied to an unlifted type.-- Example(s):- data T = MkT ~Int# -- Lazy flag has no effect on unlifted types-- Test cases: typecheck/should_compile/T21951a- typecheck/should_compile/T21951b- -}- TcRnLazyBangOnUnliftedType :: !Type -> TcRnMessage-- {-| TcRnMultipleDefaultDeclarations is an error that occurs when a module has- more than one default declaration.-- Example:- default (Integer, Int)- default (Double, Float) -- 2nd default declaration not allowed-- Text cases: module/mod58- -}- TcRnMultipleDefaultDeclarations :: [LDefaultDecl GhcRn] -> TcRnMessage-- {-| TcRnBadDefaultType is an error that occurs when a type used in a default- declaration does not have an instance for any of the applicable classes.-- Example(s):- data Foo- default (Foo)-- Test cases: typecheck/should_fail/T11974b- -}- TcRnBadDefaultType :: Type -> [Class] -> TcRnMessage-- {-| TcRnPatSynBundledWithNonDataCon is an error that occurs when a module's- export list bundles a pattern synonym with a type that is not a proper- `data` or `newtype` construction.-- Example(s):- module Foo (MyClass(.., P)) where- pattern P = Nothing- class MyClass a where- foo :: a -> Int-- Test cases: patsyn/should_fail/export-class- -}- TcRnPatSynBundledWithNonDataCon :: TcRnMessage-- {-| TcRnPatSynBundledWithWrongType is an error that occurs when the export list- of a module has a pattern synonym bundled with a type that does not match- the type of the pattern synonym.-- Example(s):- module Foo (R(P,x)) where- data Q = Q Int- data R = R- pattern P{x} = Q x-- Text cases: patsyn/should_fail/export-ps-rec-sel- patsyn/should_fail/export-type-synonym- patsyn/should_fail/export-type- -}- TcRnPatSynBundledWithWrongType :: Type -> Type -> TcRnMessage-- {-| TcRnDupeModuleExport is a warning controlled by @-Wduplicate-exports@ that- occurs when a module appears more than once in an export list.-- Example(s):- module Foo (module Bar, module Bar)- import Bar-- Text cases: None- -}- TcRnDupeModuleExport :: ModuleName -> TcRnMessage-- {-| TcRnExportedModNotImported is an error that occurs when an export list- contains a module that is not imported.-- Example(s): None-- Text cases: module/mod135- module/mod8- rename/should_fail/rnfail028- backpack/should_fail/bkpfail48- -}- TcRnExportedModNotImported :: ModuleName -> TcRnMessage-- {-| TcRnNullExportedModule is a warning controlled by -Wdodgy-exports that occurs- when an export list contains a module that has no exports.-- Example(s):- module Foo (module Bar) where- import Bar ()-- Test cases: None- -}- TcRnNullExportedModule :: ModuleName -> TcRnMessage-- {-| TcRnMissingExportList is a warning controlled by -Wmissing-export-lists that- occurs when a module does not have an explicit export list.-- Example(s): None-- Test cases: typecheck/should_fail/MissingExportList03- -}- TcRnMissingExportList :: ModuleName -> TcRnMessage-- {-| TcRnExportHiddenComponents is an error that occurs when an export contains- constructor or class methods that are not visible.-- Example(s): None-- Test cases: None- -}- TcRnExportHiddenComponents :: IE GhcPs -> TcRnMessage-- {-| TcRnDuplicateExport is a warning (controlled by -Wduplicate-exports) that occurs- when an identifier appears in an export list more than once.-- Example(s): None-- Test cases: module/MultiExport- module/mod128- module/mod14- module/mod5- overloadedrecflds/should_fail/DuplicateExports- patsyn/should_compile/T11959- -}- TcRnDuplicateExport :: GreName -> IE GhcPs -> IE GhcPs -> TcRnMessage-- {-| TcRnExportedParentChildMismatch is an error that occurs when an export is- bundled with a parent that it does not belong to-- Example(s):- module Foo (T(a)) where- data T- a = True-- Test cases: module/T11970- module/T11970B- module/mod17- module/mod3- overloadedrecflds/should_fail/NoParent- -}- TcRnExportedParentChildMismatch :: Name -> TyThing -> GreName -> [Name] -> TcRnMessage-- {-| TcRnConflictingExports is an error that occurs when different identifiers that- have the same name are being exported by a module.-- Example(s):- module Foo (Bar.f, module Baz) where- import qualified Bar (f)- import Baz (f)-- Test cases: module/mod131- module/mod142- module/mod143- module/mod144- module/mod145- module/mod146- module/mod150- module/mod155- overloadedrecflds/should_fail/T14953- overloadedrecflds/should_fail/overloadedrecfldsfail10- rename/should_fail/rnfail029- rename/should_fail/rnfail040- typecheck/should_fail/T16453E2- typecheck/should_fail/tcfail025- typecheck/should_fail/tcfail026- -}- TcRnConflictingExports- :: OccName -- ^ Occurrence name shared by both exports- -> GreName -- ^ Name of first export- -> GlobalRdrElt -- ^ Provenance for definition site of first export- -> IE GhcPs -- ^ Export decl of first export- -> GreName -- ^ Name of second export- -> GlobalRdrElt -- ^ Provenance for definition site of second export- -> IE GhcPs -- ^ Export decl of second export- -> TcRnMessage-- {-| TcRnAmbiguousField is a warning controlled by -Wambiguous-fields occurring- when a record update's type cannot be precisely determined. This will not- be supported by -XDuplicateRecordFields in future releases.-- Example(s):- data Person = MkPerson { personId :: Int, name :: String }- data Address = MkAddress { personId :: Int, address :: String }- bad1 x = x { personId = 4 } :: Person -- ambiguous- bad2 (x :: Person) = x { personId = 4 } -- ambiguous- good x = (x :: Person) { personId = 4 } -- not ambiguous-- Test cases: overloadedrecflds/should_fail/overloadedrecfldsfail06- -}- TcRnAmbiguousField- :: HsExpr GhcRn -- ^ Field update- -> TyCon -- ^ Record type- -> TcRnMessage-- {-| TcRnMissingFields is a warning controlled by -Wmissing-fields occurring- when the intialisation of a record is missing one or more (lazy) fields.-- Example(s):- data Rec = Rec { a :: Int, b :: String, c :: Bool }- x = Rec { a = 1, b = "two" } -- missing field 'c'-- Test cases: deSugar/should_compile/T13870- deSugar/should_compile/ds041- patsyn/should_compile/T11283- rename/should_compile/T5334- rename/should_compile/T12229- rename/should_compile/T5892a- warnings/should_fail/WerrorFail2- -}- TcRnMissingFields :: ConLike -> [(FieldLabelString, TcType)] -> TcRnMessage-- {-| TcRnFieldUpdateInvalidType is an error occurring when an updated field's- type mentions something that is outside the universally quantified variables- of the data constructor, such as an existentially quantified type.-- Example(s):- data X = forall a. MkX { f :: a }- x = (MkX ()) { f = False }-- Test cases: patsyn/should_fail/records-exquant- typecheck/should_fail/T3323- -}- TcRnFieldUpdateInvalidType :: [(FieldLabelString,TcType)] -> TcRnMessage-- {-| TcRnNoConstructorHasAllFields is an error that occurs when a record update- has fields that no single constructor encompasses.-- Example(s):- data Foo = A { x :: Bool }- | B { y :: Int }- foo = (A False) { x = True, y = 5 }-- Test cases: overloadedrecflds/should_fail/overloadedrecfldsfail08- patsyn/should_fail/mixed-pat-syn-record-sels- typecheck/should_fail/T7989- -}- TcRnNoConstructorHasAllFields :: [FieldLabelString] -> TcRnMessage-- {- TcRnMixedSelectors is an error for when a mixture of pattern synonym and- record selectors are used in the same record update block.-- Example(s):- data Rec = Rec { foo :: Int, bar :: String }- pattern Pat { f1, f2 } = Rec { foo = f1, bar = f2 }- illegal :: Rec -> Rec- illegal r = r { f1 = 1, bar = "two" }-- Test cases: patsyn/should_fail/records-mixing-fields- -}- TcRnMixedSelectors- :: Name -- ^ Record- -> [Id] -- ^ Record selectors- -> Name -- ^ Pattern synonym- -> [Id] -- ^ Pattern selectors- -> TcRnMessage-- {- TcRnMissingStrictFields is an error occurring when a record field marked- as strict is omitted when constructing said record.-- Example(s):- data R = R { strictField :: !Bool, nonStrict :: Int }- x = R { nonStrict = 1 }-- Test cases: typecheck/should_fail/T18869- typecheck/should_fail/tcfail085- typecheck/should_fail/tcfail112- -}- TcRnMissingStrictFields :: ConLike -> [(FieldLabelString, TcType)] -> TcRnMessage-- {- TcRnNoPossibleParentForFields is an error thrown when the fields used in a- record update block do not all belong to any one type.-- Example(s):- data R1 = R1 { x :: Int, y :: Int }- data R2 = R2 { y :: Int, z :: Int }- update r = r { x = 1, y = 2, z = 3 }-- Test cases: overloadedrecflds/should_fail/overloadedrecfldsfail01- overloadedrecflds/should_fail/overloadedrecfldsfail14- -}- TcRnNoPossibleParentForFields :: [LHsRecUpdField GhcRn] -> TcRnMessage-- {- TcRnBadOverloadedRecordUpdate is an error for a record update that cannot- be pinned down to any one constructor and thus must be given a type signature.-- Example(s):- data R1 = R1 { x :: Int }- data R2 = R2 { x :: Int }- update r = r { x = 1 } -- needs a type signature-- Test cases: overloadedrecflds/should_fail/overloadedrecfldsfail01- -}- TcRnBadOverloadedRecordUpdate :: [LHsRecUpdField GhcRn] -> TcRnMessage-- {- TcRnStaticFormNotClosed is an error pertaining to terms that are marked static- using the -XStaticPointers extension but which are not closed terms.-- Example(s):- f x = static x-- Test cases: rename/should_fail/RnStaticPointersFail01- rename/should_fail/RnStaticPointersFail03- -}- TcRnStaticFormNotClosed :: Name -> NotClosedReason -> TcRnMessage- {-| TcRnSpecialClassInst is an error that occurs when a user- attempts to define an instance for a built-in typeclass such as- 'Coercible', 'Typeable', or 'KnownNat', outside of a signature file.-- Test cases: deriving/should_fail/T9687- deriving/should_fail/T14916- polykinds/T8132- typecheck/should_fail/TcCoercibleFail2- typecheck/should_fail/T12837- typecheck/should_fail/T14390-- -}- TcRnSpecialClassInst :: !Class- -> !Bool -- ^ Whether the error is due to Safe Haskell being enabled- -> TcRnMessage-- {-| TcRnUselessTypeable is a warning (controlled by -Wderiving-typeable) that- occurs when trying to derive an instance of the 'Typeable' class. Deriving- 'Typeable' is no longer necessary (hence the \"useless\") as all types- automatically derive 'Typeable' in modern GHC versions.-- Example(s): None.-- Test cases: warnings/should_compile/DerivingTypeable- -}- TcRnUselessTypeable :: TcRnMessage-- {-| TcRnDerivingDefaults is a warning (controlled by -Wderiving-defaults) that- occurs when both 'DeriveAnyClass' and 'GeneralizedNewtypeDeriving' are- enabled, and therefore GHC defaults to 'DeriveAnyClass', which might not- be what the user wants.-- Example(s): None.-- Test cases: typecheck/should_compile/T15839a- deriving/should_compile/T16179- -}- TcRnDerivingDefaults :: !Class -> TcRnMessage-- {-| TcRnNonUnaryTypeclassConstraint is an error that occurs when GHC- encounters a non-unary constraint when trying to derive a typeclass.-- Example(s):- class A- deriving instance A- data B deriving A -- We cannot derive A, is not unary (i.e. 'class A a').-- Test cases: deriving/should_fail/T7959- deriving/should_fail/drvfail005- deriving/should_fail/drvfail009- deriving/should_fail/drvfail006- -}- TcRnNonUnaryTypeclassConstraint :: !(LHsSigType GhcRn) -> TcRnMessage-- {-| TcRnPartialTypeSignatures is a warning (controlled by -Wpartial-type-signatures)- that occurs when a wildcard '_' is found in place of a type in a signature or a- type class derivation-- Example(s):- foo :: _ -> Int- foo = ...-- deriving instance _ => Eq (Foo a)-- Test cases: dependent/should_compile/T11241- dependent/should_compile/T15076- dependent/should_compile/T14880-2- typecheck/should_compile/T17024- typecheck/should_compile/T10072- partial-sigs/should_fail/TidyClash2- partial-sigs/should_fail/Defaulting1MROff- partial-sigs/should_fail/WildcardsInPatternAndExprSig- partial-sigs/should_fail/T10615- partial-sigs/should_fail/T14584a- partial-sigs/should_fail/TidyClash- partial-sigs/should_fail/T11122- partial-sigs/should_fail/T14584- partial-sigs/should_fail/T10045- partial-sigs/should_fail/PartialTypeSignaturesDisabled- partial-sigs/should_fail/T10999- partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature- partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice- partial-sigs/should_fail/WildcardInstantiations- partial-sigs/should_run/T15415- partial-sigs/should_compile/T10463- partial-sigs/should_compile/T15039a- partial-sigs/should_compile/T16728b- partial-sigs/should_compile/T15039c- partial-sigs/should_compile/T10438- partial-sigs/should_compile/SplicesUsed- partial-sigs/should_compile/T18008- partial-sigs/should_compile/ExprSigLocal- partial-sigs/should_compile/T11339a- partial-sigs/should_compile/T11670- partial-sigs/should_compile/WarningWildcardInstantiations- partial-sigs/should_compile/T16728- partial-sigs/should_compile/T12033- partial-sigs/should_compile/T15039b- partial-sigs/should_compile/T10403- partial-sigs/should_compile/T11192- partial-sigs/should_compile/T16728a- partial-sigs/should_compile/TypedSplice- partial-sigs/should_compile/T15039d- partial-sigs/should_compile/T11016- partial-sigs/should_compile/T13324_compile2- linear/should_fail/LinearPartialSig- polykinds/T14265- polykinds/T14172- -}- TcRnPartialTypeSignatures :: !SuggestPartialTypeSignatures -> !ThetaType -> TcRnMessage-- {-| TcRnCannotDeriveInstance is an error that occurs every time a typeclass instance- can't be derived. The 'DeriveInstanceErrReason' will contain the specific reason- this error arose.-- Example(s): None.-- Test cases: generics/T10604/T10604_no_PolyKinds- deriving/should_fail/drvfail009- deriving/should_fail/drvfail-functor2- deriving/should_fail/T10598_fail3- deriving/should_fail/deriving-via-fail2- deriving/should_fail/deriving-via-fail- deriving/should_fail/T16181- -}- TcRnCannotDeriveInstance :: !Class- -- ^ The typeclass we are trying to derive- -- an instance for- -> [Type]- -- ^ The typeclass arguments, if any.- -> !(Maybe (DerivStrategy GhcTc))- -- ^ The derivation strategy, if any.- -> !UsingGeneralizedNewtypeDeriving- -- ^ Is '-XGeneralizedNewtypeDeriving' enabled?- -> !DeriveInstanceErrReason- -- ^ The specific reason why we couldn't derive- -- an instance for the class.- -> TcRnMessage-- {-| TcRnLazyGADTPattern is an error that occurs when a user writes a nested- GADT pattern match inside a lazy (~) pattern.-- Test case: gadt/lazypat- -}- TcRnLazyGADTPattern :: TcRnMessage-- {-| TcRnArrowProcGADTPattern is an error that occurs when a user writes a- GADT pattern inside arrow proc notation.-- Test case: arrows/should_fail/arrowfail004.- -}- TcRnArrowProcGADTPattern :: TcRnMessage-- {-| TcRnForallIdentifier is a warning (controlled with -Wforall-identifier) that occurs- when a definition uses 'forall' as an identifier.-- Example:- forall x = ()- g forall = ()-- Test cases: T20609 T20609a T20609b T20609c T20609d- -}- TcRnForallIdentifier :: RdrName -> TcRnMessage-- {-| TcRnTypeEqualityOutOfScope is a warning (controlled by -Wtype-equality-out-of-scope)- that occurs when the type equality (a ~ b) is not in scope.-- Test case: T18862b- -}- TcRnTypeEqualityOutOfScope :: TcRnMessage-- {-| TcRnTypeEqualityRequiresOperators is a warning (controlled by -Wtype-equality-requires-operators)- that occurs when the type equality (a ~ b) is used without the TypeOperators extension.-- Example:- {-# LANGUAGE NoTypeOperators #-}- f :: (a ~ b) => a -> b-- Test case: T18862a- -}- TcRnTypeEqualityRequiresOperators :: TcRnMessage-- {-| TcRnIllegalTypeOperator is an error that occurs when a type operator- is used without the TypeOperators extension.-- Example:- {-# LANGUAGE NoTypeOperators #-}- f :: Vec a n -> Vec a m -> Vec a (n + m)-- Test case: T12811- -}- TcRnIllegalTypeOperator :: !SDoc -> !RdrName -> TcRnMessage-- {-| TcRnIllegalTypeOperatorDecl is an error that occurs when a type or class- operator is declared without the TypeOperators extension.-- See Note [Type and class operator definitions]-- Example:- {-# LANGUAGE Haskell2010 #-}- {-# LANGUAGE MultiParamTypeClasses #-}-- module T3265 where-- data a :+: b = Left a | Right b-- class a :*: b where {}--- Test cases: T3265, tcfail173- -}- TcRnIllegalTypeOperatorDecl :: !RdrName -> TcRnMessage--- {-| TcRnGADTMonoLocalBinds is a warning controlled by -Wgadt-mono-local-binds- that occurs when pattern matching on a GADT when -XMonoLocalBinds is off.-- Example(s): None-- Test cases: T20485, T20485a- -}- TcRnGADTMonoLocalBinds :: TcRnMessage- {-| The TcRnNotInScope constructor is used for various not-in-scope errors.- See 'NotInScopeError' for more details. -}- TcRnNotInScope :: NotInScopeError -- ^ what the problem is- -> RdrName -- ^ the name that is not in scope- -> [ImportError] -- ^ import errors that are relevant- -> [GhcHint] -- ^ hints, e.g. enable DataKinds to refer to a promoted data constructor- -> TcRnMessage-- {-| TcRnUntickedPromotedThing is a warning (controlled with -Wunticked-promoted-constructors)- that is triggered by an unticked occurrence of a promoted data constructor.-- Examples:-- data A = MkA- type family F (a :: A) where { F MkA = Bool }-- type B = [ Int, Bool ]-- Test cases: T9778, T19984.- -}- TcRnUntickedPromotedThing :: UntickedPromotedThing- -> TcRnMessage-- {-| TcRnIllegalBuiltinSyntax is an error that occurs when built-in syntax appears- in an unexpected location, e.g. as a data constructor or in a fixity declaration.-- Examples:-- infixl 5 :-- data P = (,)-- Test cases: rnfail042, T14907b, T15124, T15233.- -}- TcRnIllegalBuiltinSyntax :: SDoc -- ^ what kind of thing this is (a binding, fixity declaration, ...)- -> RdrName- -> TcRnMessage- -- TODO: remove the SDoc argument.-- {-| TcRnWarnDefaulting is a warning (controlled by -Wtype-defaults)- that is triggered whenever a Wanted typeclass constraint- is solving through the defaulting of a type variable.-- Example:-- one = show 1- -- We get Wanteds Show a0, Num a0, and default a0 to Integer.-- Test cases:- none (which are really specific to defaulting),- but see e.g. tcfail204.- -}- TcRnWarnDefaulting :: [Ct] -- ^ Wanted constraints in which defaulting occurred- -> Maybe TyVar -- ^ The type variable being defaulted- -> Type -- ^ The default type- -> TcRnMessage-- {-| TcRnIncorrectNameSpace is an error that occurs when a 'Name'- is used in the incorrect 'NameSpace', e.g. a type constructor- or class used in a term, or a term variable used in a type.-- Example:-- f x = Int-- Test cases: T18740a, T20884.- -}- TcRnIncorrectNameSpace :: Name- -> Bool -- ^ whether the error is happening- -- in a Template Haskell tick- -- (so we should give a Template Haskell hint)- -> TcRnMessage-- {- TcRnForeignImportPrimExtNotSet is an error occurring when a foreign import- is declared using the @prim@ calling convention without having turned on- the -XGHCForeignImportPrim extension.-- Example(s):- foreign import prim "foo" foo :: ByteArray# -> (# Int#, Int# #)-- Test cases: ffi/should_fail/T20116- -}- TcRnForeignImportPrimExtNotSet :: ForeignImport GhcRn -> TcRnMessage-- {- TcRnForeignImportPrimSafeAnn is an error declaring that the safe/unsafe- annotation should not be used with @prim@ foreign imports.-- Example(s):- foreign import prim unsafe "my_primop_cmm" :: ...-- Test cases: None- -}- TcRnForeignImportPrimSafeAnn :: ForeignImport GhcRn -> TcRnMessage-- {- TcRnForeignFunctionImportAsValue is an error explaining that foreign @value@- imports cannot have function types.-- Example(s):- foreign import capi "math.h value sqrt" f :: CInt -> CInt-- Test cases: ffi/should_fail/capi_value_function- -}- TcRnForeignFunctionImportAsValue :: ForeignImport GhcRn -> TcRnMessage-- {- TcRnFunPtrImportWithoutAmpersand is a warning controlled by @-Wdodgy-foreign-imports@- that informs the user of a possible missing @&@ in the declaration of a- foreign import with a 'FunPtr' return type.-- Example(s):- foreign import ccall "f" f :: FunPtr (Int -> IO ())-- Test cases: ffi/should_compile/T1357- -}- TcRnFunPtrImportWithoutAmpersand :: ForeignImport GhcRn -> TcRnMessage-- {- TcRnIllegalForeignDeclBackend is an error occurring when a foreign import declaration- is not compatible with the code generation backend being used.-- Example(s): None-- Test cases: None- -}- TcRnIllegalForeignDeclBackend- :: Either (ForeignExport GhcRn) (ForeignImport GhcRn)- -> Backend- -> ExpectedBackends- -> TcRnMessage-- {- TcRnUnsupportedCallConv informs the user that the calling convention specified- for a foreign export declaration is not compatible with the target platform.- It is a warning controlled by @-Wunsupported-calling-conventions@ in the case of- @stdcall@ but is otherwise considered an error.-- Example(s): None-- Test cases: None- -}- TcRnUnsupportedCallConv :: Either (ForeignExport GhcRn) (ForeignImport GhcRn)- -> UnsupportedCallConvention- -> TcRnMessage-- {- TcRnIllegalForeignType is an error for when a type appears in a foreign- function signature that is not compatible with the FFI.-- Example(s): None-- Test cases: ffi/should_fail/T3066- ffi/should_fail/ccfail004- ffi/should_fail/T10461- ffi/should_fail/T7506- ffi/should_fail/T5664- safeHaskell/ghci/p6- safeHaskell/safeLanguage/SafeLang08- ffi/should_fail/T16702- linear/should_fail/LinearFFI- ffi/should_fail/T7243- -}- TcRnIllegalForeignType :: !(Maybe ArgOrResult) -> !IllegalForeignTypeReason -> TcRnMessage-- {- TcRnInvalidCIdentifier indicates a C identifier that is not valid.-- Example(s):- foreign import prim safe "not valid" cmm_test2 :: Int# -> Int#-- Test cases: th/T10638- -}- TcRnInvalidCIdentifier :: !CLabelString -> TcRnMessage-- {- TcRnExpectedValueId is an error occurring when something that is not a- value identifier is used where one is expected.-- Example(s): none-- Test cases: none- -}- TcRnExpectedValueId :: !TcTyThing -> TcRnMessage-- {- TcRnNotARecordSelector is an error for when something that is not a record- selector is used in a record pattern.-- Example(s):- data Rec = MkRec { field :: Int }- r = Mkrec 1- r' = r { notAField = 2 }-- Test cases: rename/should_fail/rnfail054- typecheck/should_fail/tcfail114- -}- TcRnNotARecordSelector :: !Name -> TcRnMessage-- {- TcRnRecSelectorEscapedTyVar is an error indicating that a record field selector- containing an existential type variable is used as a function rather than in- a pattern match.-- Example(s):- data Rec = forall a. Rec { field :: a }- field (Rec True)-- Test cases: patsyn/should_fail/records-exquant- typecheck/should_fail/T3176- -}- TcRnRecSelectorEscapedTyVar :: !OccName -> TcRnMessage-- {- TcRnPatSynNotBidirectional is an error for when a non-bidirectional pattern- synonym is used as a constructor.-- Example(s):- pattern Five :: Int- pattern Five <- 5- five = Five-- Test cases: patsyn/should_fail/records-no-uni-update- patsyn/should_fail/records-no-uni-update2- -}- TcRnPatSynNotBidirectional :: !Name -> TcRnMessage-- {- TcRnSplicePolymorphicLocalVar is the error that occurs when the expression- inside typed template haskell brackets is a polymorphic local variable.-- Example(s):- x = \(y :: forall a. a -> a) -> [|| y ||]-- Test cases: quotes/T10384- -}- TcRnSplicePolymorphicLocalVar :: !Id -> TcRnMessage-- {- TcRnIllegalDerivingItem is an error for when something other than a type class- appears in a deriving statement.-- Example(s):- data X = X deriving Int-- Test cases: deriving/should_fail/T5922- -}- TcRnIllegalDerivingItem :: !(LHsSigType GhcRn) -> TcRnMessage-- {- TcRnUnexpectedAnnotation indicates the erroroneous use of an annotation such- as strictness, laziness, or unpacking.-- Example(s):- data T = T { t :: Maybe {-# UNPACK #-} Int }- data C = C { f :: !IntMap Int }-- Test cases: parser/should_fail/unpack_inside_type- typecheck/should_fail/T7210- -}- TcRnUnexpectedAnnotation :: !(HsType GhcRn) -> !HsSrcBang -> TcRnMessage-- {- TcRnIllegalRecordSyntax is an error indicating an illegal use of record syntax.-- Example(s):- data T = T Int { field :: Int }-- Test cases: rename/should_fail/T7943- rename/should_fail/T9077- -}- TcRnIllegalRecordSyntax :: !(HsType GhcRn) -> TcRnMessage-- {- TcRnUnexpectedTypeSplice is an error for a typed template haskell splice- appearing unexpectedly.-- Example(s): none-- Test cases: none- -}- TcRnUnexpectedTypeSplice :: !(HsType GhcRn) -> TcRnMessage-- {- TcRnInvalidVisibleKindArgument is an error for a kind application on a- target type that cannot accept it.-- Example(s):- bad :: Int @Type- bad = 1- type Foo :: forall a {b}. a -> b -> b- type Foo x y = y- type Bar = Foo @Bool @Int True 42-- Test cases: indexed-types/should_fail/T16356_Fail3- typecheck/should_fail/ExplicitSpecificity7- typecheck/should_fail/T12045b- typecheck/should_fail/T12045c- typecheck/should_fail/T15592a- typecheck/should_fail/T15816- -}- TcRnInvalidVisibleKindArgument- :: !(LHsType GhcRn) -- ^ The visible kind argument- -> !Type -- ^ Target of the kind application- -> TcRnMessage-- {- TcRnTooManyBinders is an error for a type constructor that is declared with- more arguments then its kind specifies.-- Example(s):- type T :: Type -> (Type -> Type) -> Type- data T a (b :: Type -> Type) x1 (x2 :: Type -> Type)-- Test cases: saks/should_fail/saks_fail008- -}- TcRnTooManyBinders :: !Kind -> ![LHsTyVarBndr () GhcRn] -> TcRnMessage-- {- TcRnDifferentNamesForTyVar is an error that indicates different names being- used for the same type variable.-- Example(s):- data SameKind :: k -> k -> *- data Q (a :: k1) (b :: k2) c = MkQ (SameKind a b)-- Test cases: polykinds/T11203- polykinds/T11821a- saks/should_fail/T20916- typecheck/should_fail/T17566b- typecheck/should_fail/T17566c- -}- TcRnDifferentNamesForTyVar :: !Name -> !Name -> TcRnMessage-- {-| TcRnDisconnectedTyVar is an error for a data declaration that has a kind signature,- where the implicitly-bound type type variables can't be matched up unambiguously- with the ones from the signature. See Note [Disconnected type variables] in- GHC.Tc.Gen.HsType.- -}- TcRnDisconnectedTyVar :: !Name -> TcRnMessage-- {-| TcRnInvalidReturnKind is an error for a data declaration that has a kind signature- with an invalid result kind.-- Example(s):- data family Foo :: Constraint-- Test cases: typecheck/should_fail/T14048b- typecheck/should_fail/UnliftedNewtypesConstraintFamily- typecheck/should_fail/T12729- typecheck/should_fail/T15883- typecheck/should_fail/T16829a- typecheck/should_fail/T16829b- typecheck/should_fail/UnliftedNewtypesNotEnabled- typecheck/should_fail/tcfail079- -}- TcRnInvalidReturnKind- :: !DataSort -- ^ classification of thing being returned- -> !AllowedDataResKind -- ^ allowed kind- -> !Kind -- ^ the return kind- -> !(Maybe SuggestUnliftedTypes) -- ^ suggested extension- -> TcRnMessage-- {- TcRnClassKindNotConstraint is an error for a type class that has a kind that- is not equivalent to Constraint.-- Example(s):- type C :: Type -> Type- class C a-- Test cases: saks/should_fail/T16826- -}- TcRnClassKindNotConstraint :: !Kind -> TcRnMessage-- {- TcRnUnpromotableThing is an error that occurs when the user attempts to- use the promoted version of something which is not promotable.-- Example(s):- data T :: T -> *- data X a where- MkX :: Show a => a -> X a- foo :: Proxy ('MkX 'True)- foo = Proxy-- Test cases: dependent/should_fail/PromotedClass- dependent/should_fail/T14845_fail1- dependent/should_fail/T14845_fail2- dependent/should_fail/T15215- dependent/should_fail/T13780c- dependent/should_fail/T15245- polykinds/T5716- polykinds/T5716a- polykinds/T6129- polykinds/T7433- patsyn/should_fail/T11265- patsyn/should_fail/T9161-1- patsyn/should_fail/T9161-2- dependent/should_fail/SelfDep- polykinds/PolyKinds06- polykinds/PolyKinds07- polykinds/T13625- polykinds/T15116- polykinds/T15116a- saks/should_fail/T16727a- saks/should_fail/T16727b- rename/should_fail/T12686- -}- TcRnUnpromotableThing :: !Name -> !PromotionErr -> TcRnMessage-- {- TcRnMatchesHaveDiffNumArgs is an error occurring when something has matches- that have different numbers of arguments-- Example(s):- foo x = True- foo x y = False-- Test cases: rename/should_fail/rnfail045- typecheck/should_fail/T20768_fail- -}- TcRnMatchesHaveDiffNumArgs- :: !(HsMatchContext GhcTc) -- ^ Pattern match specifics- -> !MatchArgBadMatches- -> TcRnMessage-- {- TcRnCannotBindScopedTyVarInPatSig is an error stating that scoped type- variables cannot be used in pattern bindings.-- Example(s):- let (x :: a) = 5-- Test cases: typecheck/should_compile/tc141- -}- TcRnCannotBindScopedTyVarInPatSig :: !(NE.NonEmpty (Name, TcTyVar)) -> TcRnMessage-- {- TcRnCannotBindTyVarsInPatBind is an error for when type- variables are introduced in a pattern binding-- Example(s):- Just @a x = Just True-- Test cases: typecheck/should_fail/TyAppPat_PatternBinding- typecheck/should_fail/TyAppPat_PatternBindingExistential- -}- TcRnCannotBindTyVarsInPatBind :: !(NE.NonEmpty (Name, TcTyVar)) -> TcRnMessage-- {- TcRnTooManyTyArgsInConPattern is an error occurring when a constructor pattern- has more than the expected number of type arguments-- Example(s):- f (Just @Int @Bool x) = x-- Test cases: typecheck/should_fail/TyAppPat_TooMany- typecheck/should_fail/T20443b- -}- TcRnTooManyTyArgsInConPattern- :: !ConLike- -> !Int -- ^ Expected number of args- -> !Int -- ^ Actual number of args- -> TcRnMessage-- {- TcRnMultipleInlinePragmas is a warning signifying that multiple inline pragmas- reference the same definition.-- Example(s):- {-# INLINE foo #-}- {-# INLINE foo #-}- foo :: Bool -> Bool- foo = id-- Test cases: none- -}- TcRnMultipleInlinePragmas- :: !Id -- ^ Target of the pragmas- -> !(LocatedA InlinePragma) -- ^ The first pragma- -> !(NE.NonEmpty (LocatedA InlinePragma)) -- ^ Other pragmas- -> TcRnMessage-- {- TcRnUnexpectedPragmas is a warning that occurs when unexpected pragmas appear- in the source.-- Example(s):-- Test cases: none- -}- TcRnUnexpectedPragmas :: !Id -> !(NE.NonEmpty (LSig GhcRn)) -> TcRnMessage-- {- TcRnNonOverloadedSpecialisePragma is a warning for a specialise pragma being- placed on a definition that is not overloaded.-- Example(s):- {-# SPECIALISE foo :: Bool -> Bool #-}- foo :: Bool -> Bool- foo = id-- Test cases: simplCore/should_compile/T8537- typecheck/should_compile/T10504- -}- TcRnNonOverloadedSpecialisePragma :: !(LIdP GhcRn) -> TcRnMessage-- {- TcRnSpecialiseNotVisible is a warning that occurs when the subject of a- SPECIALISE pragma has a definition that is not visible from the current module.-- Example(s): none-- Test cases: none- -}- TcRnSpecialiseNotVisible :: !Name -> TcRnMessage-- {- TcRnNameByTemplateHaskellQuote is an error that occurs when one tries- to use a Template Haskell splice to define a top-level identifier with- an already existing name.-- (See issue #13968 (closed) on GHC's issue tracker for more details)-- Example(s):-- $(pure [ValD (VarP 'succ) (NormalB (ConE 'True)) []])-- Test cases:- T13968- -}- TcRnNameByTemplateHaskellQuote :: !RdrName -> TcRnMessage-- {- TcRnIllegalBindingOfBuiltIn is an error that occurs when one uses built-in- syntax for data constructors or class names.-- Use an OccName here because we don't want to print Prelude.(,)-- Test cases:- rename/should_fail/T14907b- rename/should_fail/rnfail042- -}- TcRnIllegalBindingOfBuiltIn :: !OccName -> TcRnMessage-- {- TcRnPragmaWarning is a warning that can happen when usage of something- is warned or deprecated by pragma.-- Test cases:- DeprU- T5281- T5867- rn050- rn066 (here is a warning, not deprecation)- T3303- -}- TcRnPragmaWarning :: {- pragma_warning_occ :: OccName,- pragma_warning_msg :: WarningTxt GhcRn,- pragma_warning_import_mod :: ModuleName,- pragma_warning_defined_mod :: ModuleName- } -> TcRnMessage--- {-| TcRnIllegalHsigDefaultMethods is an error that occurs when a binding for- a class default method is provided in a Backpack signature file.-- Test case:- bkpfail40- -}-- TcRnIllegalHsigDefaultMethods :: !Name -- ^ 'Name' of the class- -> NE.NonEmpty (LHsBind GhcRn) -- ^ default methods- -> TcRnMessage- {-| TcRnBadGenericMethod- This test ensures that if you provide a "more specific" type signatures- for the default method, you must also provide a binding.-- Example:- {-# LANGUAGE DefaultSignatures #-}-- class C a where- meth :: a- default meth :: Num a => a- meth = 0-- Test case:- testsuite/tests/typecheck/should_fail/MissingDefaultMethodBinding.hs- -}- TcRnBadGenericMethod :: !Name -- ^ 'Name' of the class- -> !Name -- ^ Problematic method- -> TcRnMessage-- {-| TcRnWarningMinimalDefIncomplete is a warning that one must- specify which methods must be implemented by all instances.-- Example:- class Cheater a where -- WARNING LINE- cheater :: a- {-# MINIMAL #-} -- warning!-- Test case:- testsuite/tests/warnings/minimal/WarnMinimal.hs:- -}- TcRnWarningMinimalDefIncomplete :: ClassMinimalDef -> TcRnMessage-- {-| TcRnDefaultMethodForPragmaLacksBinding is an error that occurs when- a default method pragma is missing an accompanying binding.-- Test cases:- testsuite/tests/typecheck/should_fail/T5084.hs- testsuite/tests/typecheck/should_fail/T2354.hs- -}- TcRnDefaultMethodForPragmaLacksBinding- :: Id -- ^ method- -> Sig GhcRn -- ^ the pragma- -> TcRnMessage- {-| TcRnIgnoreSpecialisePragmaOnDefMethod is a warning that occurs when- a specialise pragma is put on a default method.-- Test cases: none- -}- TcRnIgnoreSpecialisePragmaOnDefMethod- :: !Name- -> TcRnMessage- {-| TcRnBadMethodErr is an error that happens when one attempts to provide a method- in a class instance, when the class doesn't have a method by that name.-- Test case:- testsuite/tests/th/T12387- -}- TcRnBadMethodErr- :: { badMethodErrClassName :: !Name- , badMethodErrMethodName :: !Name- } -> TcRnMessage- {-| TcRnNoExplicitAssocTypeOrDefaultDeclaration is an error that occurs- when a class instance does not provide an expected associated type- or default declaration.-- Test cases:- testsuite/tests/deriving/should_compile/T14094- testsuite/tests/indexed-types/should_compile/Simple2- testsuite/tests/typecheck/should_compile/tc254- -}- TcRnNoExplicitAssocTypeOrDefaultDeclaration- :: Name- -> TcRnMessage- {-| TcRnIllegalNewtype is an error that occurs when a newtype:-- * Does not have exactly one field, or- * is non-linear, or- * is a GADT, or- * has a context in its constructor's type, or- * has existential type variables in its constructor's type, or- * has strictness annotations.-- Test cases:- testsuite/tests/gadt/T14719- testsuite/tests/indexed-types/should_fail/T14033- testsuite/tests/indexed-types/should_fail/T2334A- testsuite/tests/linear/should_fail/LinearGADTNewtype- testsuite/tests/parser/should_fail/readFail008- testsuite/tests/polykinds/T11459- testsuite/tests/typecheck/should_fail/T15523- testsuite/tests/typecheck/should_fail/T15796- testsuite/tests/typecheck/should_fail/T17955- testsuite/tests/typecheck/should_fail/T18891a- testsuite/tests/typecheck/should_fail/T21447- testsuite/tests/typecheck/should_fail/tcfail156- -}- TcRnIllegalNewtype- :: DataCon- -> Bool -- ^ True if linear types enabled- -> IllegalNewtypeReason- -> TcRnMessage-- {-| TcRnIllegalTypeData is an error that occurs when a @type data@- declaration occurs without the TypeOperators extension.-- See Note [Type data declarations]-- Test case:- testsuite/tests/type-data/should_fail/TDNoPragma- -}- TcRnIllegalTypeData :: TcRnMessage-- {-| TcRnTypeDataForbids is an error that occurs when a @type data@- declaration contains @data@ declaration features that are- forbidden in a @type data@ declaration.-- See Note [Type data declarations]-- Test cases:- testsuite/tests/type-data/should_fail/TDDeriving- testsuite/tests/type-data/should_fail/TDRecordsGADT- testsuite/tests/type-data/should_fail/TDRecordsH98- testsuite/tests/type-data/should_fail/TDStrictnessGADT- testsuite/tests/type-data/should_fail/TDStrictnessH98- -}- TcRnTypeDataForbids :: !TypeDataForbids -> TcRnMessage-- {-| TcRnTypedTHWithPolyType is an error that signifies the illegal use- of a polytype in a typed template haskell expression.-- Example(s):- bad :: (forall a. a -> a) -> ()- bad = $$( [|| \_ -> () ||] )-- Test cases: th/T11452- -}- TcRnTypedTHWithPolyType :: !TcType -> TcRnMessage-- {-| TcRnSpliceThrewException is an error that occurrs when running a template- haskell splice throws an exception.-- Example(s):-- Test cases: annotations/should_fail/annfail12- perf/compiler/MultiLayerModulesTH_Make- perf/compiler/MultiLayerModulesTH_OneShot- th/T10796b- th/T19470- th/T19709d- th/T5358- th/T5976- th/T7276a- th/T8987- th/TH_exn1- th/TH_exn2- th/TH_runIO- -}- TcRnSpliceThrewException- :: !SplicePhase- -> !SomeException- -> !String -- ^ Result of showing the exception (cannot be done safely outside IO)- -> !(LHsExpr GhcTc)- -> !Bool -- True <=> Print the expression- -> TcRnMessage-- {-| TcRnInvalidTopDecl is a template haskell error occurring when one of the 'Dec's passed to- 'addTopDecls' is not a function, value, annotation, or foreign import declaration.-- Example(s):-- Test cases:- -}- TcRnInvalidTopDecl :: !(HsDecl GhcPs) -> TcRnMessage-- {-| TcRnNonExactName is a template haskell error for when a declaration being- added is bound to a name that is not fully known.-- Example(s):-- Test cases:- -}- TcRnNonExactName :: !RdrName -> TcRnMessage-- {-| TcRnAddInvalidCorePlugin is a template haskell error indicating that a- core plugin being added has an invalid module due to being in the current package.-- Example(s):-- Test cases:- -}- TcRnAddInvalidCorePlugin- :: !String -- ^ Module name- -> TcRnMessage-- {-| TcRnAddDocToNonLocalDefn is a template haskell error for documentation being added to a- definition which is not in the current module.-- Example(s):-- Test cases: showIface/should_fail/THPutDocExternal- -}- TcRnAddDocToNonLocalDefn :: !TH.DocLoc -> TcRnMessage-- {-| TcRnFailedToLookupThInstName is a template haskell error that occurrs when looking up an- instance fails.-- Example(s):-- Test cases: showIface/should_fail/THPutDocNonExistent- -}- TcRnFailedToLookupThInstName :: !TH.Type -> !LookupTHInstNameErrReason -> TcRnMessage-- {-| TcRnCannotReifyInstance is a template haskell error for when an instance being reified- via `reifyInstances` is not a class constraint or type family application.-- Example(s):-- Test cases:- -}- TcRnCannotReifyInstance :: !Type -> TcRnMessage-- {-| TcRnCannotReifyOutOfScopeThing is a template haskell error indicating- that the given name is not in scope and therefore cannot be reified.-- Example(s):-- Test cases: th/T16976f- -}- TcRnCannotReifyOutOfScopeThing :: !TH.Name -> TcRnMessage-- {-| TcRnCannotReifyThingNotInTypeEnv is a template haskell error occurring- when the given name is not in the type environment and therefore cannot be reified.-- Example(s):-- Test cases:- -}- TcRnCannotReifyThingNotInTypeEnv :: !Name -> TcRnMessage-- {-| TcRnNoRolesAssociatedWithName is a template haskell error for when the user- tries to reify the roles of a given name but it is not something that has- roles associated with it.-- Example(s):-- Test cases:- -}- TcRnNoRolesAssociatedWithThing :: !TcTyThing -> TcRnMessage-- {-| TcRnCannotRepresentThing is a template haskell error indicating that a- type cannot be reified because it does not have a representation in template haskell.-- Example(s):-- Test cases:- -}- TcRnCannotRepresentType :: !UnrepresentableTypeDescr -> !Type -> TcRnMessage-- {-| TcRnRunSpliceFailure is an error indicating that a template haskell splice- failed to be converted into a valid expression.-- Example(s):-- Test cases: th/T10828a- th/T10828b- th/T12478_4- th/T15270A- th/T15270B- th/T16895a- th/T16895b- th/T16895c- th/T16895d- th/T16895e- th/T17379a- th/T17379b- th/T18740d- th/T2597b- th/T2674- th/T3395- th/T7484- th/T7667a- th/TH_implicitParamsErr1- th/TH_implicitParamsErr2- th/TH_implicitParamsErr3- th/TH_invalid_add_top_decl- -}- TcRnRunSpliceFailure- :: !(Maybe String) -- ^ Name of the function used to run the splice- -> !RunSpliceFailReason- -> TcRnMessage-- {-| TcRnUserErrReported is an error or warning thrown using 'qReport' from- the 'Quasi' instance of 'TcM'.-- Example(s):-- Test cases:- -}- TcRnReportCustomQuasiError- :: !Bool -- True => Error, False => Warning- -> !String -- Error body- -> TcRnMessage-- {-| TcRnInterfaceLookupError is an error resulting from looking up a name in an interface file.-- Example(s):-- Test cases:- -}- TcRnInterfaceLookupError :: !Name -> !SDoc -> TcRnMessage-- {- | TcRnUnsatisfiedMinimalDef is a warning that occurs when a class instance- is missing methods that are required by the minimal definition.-- Example:- class C a where- foo :: a -> a- instance C () -- | foo needs to be defined here-- Test cases:- testsuite/tests/typecheck/prog001/typecheck.prog001- testsuite/tests/typecheck/should_compile/tc126- testsuite/tests/typecheck/should_compile/T7903- testsuite/tests/typecheck/should_compile/tc116- testsuite/tests/typecheck/should_compile/tc175- testsuite/tests/typecheck/should_compile/HasKey- testsuite/tests/typecheck/should_compile/tc125- testsuite/tests/typecheck/should_compile/tc078- testsuite/tests/typecheck/should_compile/tc161- testsuite/tests/typecheck/should_fail/T5051- testsuite/tests/typecheck/should_compile/T21583- testsuite/tests/backpack/should_compile/bkp47- testsuite/tests/backpack/should_fail/bkpfail25- testsuite/tests/parser/should_compile/T2245- testsuite/tests/parser/should_compile/read014- testsuite/tests/indexed-types/should_compile/Class3- testsuite/tests/indexed-types/should_compile/Simple2- testsuite/tests/indexed-types/should_fail/T7862- testsuite/tests/deriving/should_compile/deriving-1935- testsuite/tests/deriving/should_compile/T9968a- testsuite/tests/deriving/should_compile/drv003- testsuite/tests/deriving/should_compile/T4966- testsuite/tests/deriving/should_compile/T14094- testsuite/tests/perf/compiler/T15304- testsuite/tests/warnings/minimal/WarnMinimal- testsuite/tests/simplCore/should_compile/simpl020- testsuite/tests/deSugar/should_compile/T14546d- testsuite/tests/ghci/scripts/T5820- testsuite/tests/ghci/scripts/ghci019- -}- TcRnUnsatisfiedMinimalDef :: ClassMinimalDef -> TcRnMessage-- {- | 'TcRnMisplacedInstSig' is an error that happens when a method in- a class instance is given a type signature, but the user has not- enabled the @InstanceSigs@ extension.-- Test case:- testsuite/tests/module/mod45- -}- TcRnMisplacedInstSig :: Name -> (LHsSigType GhcRn) -> TcRnMessage- {- | 'TcRnBadBootFamInstDecl' is an error that is triggered by a- type family instance being declared in an hs-boot file.-- Test case:- testsuite/tests/indexed-types/should_fail/HsBootFam- -}- TcRnBadBootFamInstDecl :: {} -> TcRnMessage- {- | 'TcRnIllegalFamilyInstance' is an error that occurs when an associated- type or data family is given a top-level instance.-- Test case:- testsuite/tests/indexed-types/should_fail/T3092- -}- TcRnIllegalFamilyInstance :: TyCon -> TcRnMessage- {- | 'TcRnMissingClassAssoc' is an error that occurs when a class instance- for a class with an associated type or data family is missing a corresponding- family instance declaration.-- Test case:- testsuite/tests/indexed-types/should_fail/SimpleFail7- -}- TcRnMissingClassAssoc :: TyCon -> TcRnMessage- {- | 'TcRnBadFamInstDecl' is an error that is triggered by a type or data family- instance without the @TypeFamilies@ extension.-- Test case:- testsuite/tests/indexed-types/should_fail/BadFamInstDecl- -}- TcRnBadFamInstDecl :: TyCon -> TcRnMessage- {- | 'TcRnNotOpenFamily' is an error that is triggered by attempting to give- a top-level (open) type family instance for a closed type family.-- Test cases:- testsuite/tests/indexed-types/should_fail/Overlap7- testsuite/tests/indexed-types/should_fail/Overlap3- -}- TcRnNotOpenFamily :: TyCon -> TcRnMessage- {-| TcRnNoRebindableSyntaxRecordDot is an error triggered by an overloaded record update- without RebindableSyntax enabled.-- Example(s):-- Test cases: parser/should_fail/RecordDotSyntaxFail5- -}- TcRnNoRebindableSyntaxRecordDot :: TcRnMessage-- {-| TcRnNoFieldPunsRecordDot is an error triggered by the use of record field puns- in an overloaded record update without enabling NamedFieldPuns.-- Example(s):- print $ a{ foo.bar.baz.quux }-- Test cases: parser/should_fail/RecordDotSyntaxFail12- -}- TcRnNoFieldPunsRecordDot :: TcRnMessage-- {-| TcRnIllegalStaticExpression is an error thrown when user creates a static- pointer via TemplateHaskell without enabling the StaticPointers extension.-- Example(s):-- Test cases: th/T14204- -}- TcRnIllegalStaticExpression :: HsExpr GhcPs -> TcRnMessage-- {-| TcRnIllegalStaticFormInSplice is an error when a user attempts to define- a static pointer in a Template Haskell splice.-- Example(s):-- Test cases: th/TH_StaticPointers02- -}- TcRnIllegalStaticFormInSplice :: HsExpr GhcPs -> TcRnMessage-- {-| TcRnListComprehensionDuplicateBinding is an error triggered by duplicate- let-bindings in a list comprehension.-- Example(s):- [ () | let a = 13 | let a = 17 ]-- Test cases: typecheck/should_fail/tcfail092- -}- TcRnListComprehensionDuplicateBinding :: Name -> TcRnMessage-- {-| TcRnEmptyStmtsGroup is an error triggered by an empty list of statements- in a statement block. For more information, see 'EmptyStatementGroupErrReason'-- Example(s):-- [() | then ()]-- do-- proc () -> do-- Test cases: rename/should_fail/RnEmptyStatementGroup1- -}- TcRnEmptyStmtsGroup:: EmptyStatementGroupErrReason -> TcRnMessage-- {-| TcRnLastStmtNotExpr is an error caused by the last statement- in a statement block not being an expression.-- Example(s):-- do x <- pure ()-- do let x = 5-- Test cases: rename/should_fail/T6060- parser/should_fail/T3811g- parser/should_fail/readFail028- -}- TcRnLastStmtNotExpr- :: HsStmtContext GhcRn- -> UnexpectedStatement- -> TcRnMessage-- {-| TcRnUnexpectedStatementInContext is an error when a statement appears- in an unexpected context (e.g. an arrow statement appears in a list comprehension).-- Example(s):-- Test cases: parser/should_fail/readFail042- parser/should_fail/readFail038- parser/should_fail/readFail043- -}- TcRnUnexpectedStatementInContext- :: HsStmtContext GhcRn- -> UnexpectedStatement- -> Maybe LangExt.Extension- -> TcRnMessage-- {-| TcRnIllegalTupleSection is an error triggered by usage of a tuple section- without enabling the TupleSections extension.-- Example(s):- (5,)-- Test cases: rename/should_fail/rnfail056- -}- TcRnIllegalTupleSection :: TcRnMessage-- {-| TcRnIllegalImplicitParameterBindings is an error triggered by binding- an implicit parameter in an mdo block.-- Example(s):- mdo { let { ?x = 5 }; () }-- Test cases: rename/should_fail/RnImplicitBindInMdoNotation- -}- TcRnIllegalImplicitParameterBindings- :: Either (HsLocalBindsLR GhcPs GhcPs) (HsLocalBindsLR GhcRn GhcPs)- -> TcRnMessage-- {-| TcRnSectionWithoutParentheses is an error triggered by attempting to- use an operator section without parentheses.-- Example(s):- (`head` x, ())-- Test cases: rename/should_fail/T2490- rename/should_fail/T5657- -}- TcRnSectionWithoutParentheses :: HsExpr GhcPs -> TcRnMessage-- {-| TcRnLoopySuperclassSolve is a warning, controlled by @-Wloopy-superclass-solve@,- that is triggered when GHC solves a constraint in a possibly-loopy way,- violating the class instance termination rules described in the section- "Undecidable instances and loopy superclasses" of the user's guide.-- Example:-- class Foo f- class Foo f => Bar f g- instance Bar f f => Bar f (h k)-- Test cases: T20666, T20666{a,b}, T22891, T22912.- -}- TcRnLoopySuperclassSolve :: CtLoc -- ^ Wanted 'CtLoc'- -> PredType -- ^ Wanted 'PredType'- -> TcRnMessage-- {- TcRnCannotDefaultConcrete is an error occurring when a concrete- type variable cannot be defaulted.-- Test cases:- T23153- -}- TcRnCannotDefaultConcrete- :: !FixedRuntimeRepOrigin- -> TcRnMessage--- deriving Generic---- | Things forbidden in @type data@ declarations.--- See Note [Type data declarations]-data TypeDataForbids- = TypeDataForbidsDatatypeContexts- | TypeDataForbidsLabelledFields- | TypeDataForbidsStrictnessAnnotations- | TypeDataForbidsDerivingClauses- deriving Generic--instance Outputable TypeDataForbids where- ppr TypeDataForbidsDatatypeContexts = text "Data type contexts"- ppr TypeDataForbidsLabelledFields = text "Labelled fields"- ppr TypeDataForbidsStrictnessAnnotations = text "Strictness flags"- ppr TypeDataForbidsDerivingClauses = text "Deriving clauses"--data RunSpliceFailReason- = ConversionFail !ThingBeingConverted !ConversionFailReason- deriving Generic---- | Identifies the TH splice attempting to be converted-data ThingBeingConverted- = ConvDec !TH.Dec- | ConvExp !TH.Exp- | ConvPat !TH.Pat- | ConvType !TH.Type---- | The reason a TH splice could not be converted to a Haskell expression-data ConversionFailReason- = IllegalOccName !OccName.NameSpace !String- | SumAltArityExceeded !TH.SumAlt !TH.SumArity- | IllegalSumAlt !TH.SumAlt- | IllegalSumArity !TH.SumArity- | MalformedType !TypeOrKind !TH.Type- | IllegalLastStatement !HsDoFlavour !(LStmt GhcPs (LHsExpr GhcPs))- | KindSigsOnlyAllowedOnGADTs- | IllegalDeclaration !THDeclDescriptor !IllegalDecls- | CannotMixGADTConsWith98Cons- | EmptyStmtListInDoBlock- | NonVarInInfixExpr- | MultiWayIfWithoutAlts- | CasesExprWithoutAlts- | ImplicitParamsWithOtherBinds- | InvalidCCallImpent !String -- ^ Source- | RecGadtNoCons- | GadtNoCons- | InvalidTypeInstanceHeader !TH.Type- | InvalidTyFamInstLHS !TH.Type- | InvalidImplicitParamBinding- | DefaultDataInstDecl ![LDataFamInstDecl GhcPs]- | FunBindLacksEquations !TH.Name- deriving Generic--data IllegalDecls- = IllegalDecls !(NE.NonEmpty (LHsDecl GhcPs))- | IllegalFamDecls !(NE.NonEmpty (LFamilyDecl GhcPs))---- | Label for a TH declaration-data THDeclDescriptor- = InstanceDecl- | WhereClause- | LetBinding- | LetExpression- | ClssDecl---- | Specifies which back ends can handle a requested foreign import or export-type ExpectedBackends = [Backend]---- | Specifies which calling convention is unsupported on the current platform-data UnsupportedCallConvention- = StdCallConvUnsupported- | PrimCallConvUnsupported- | JavaScriptCallConvUnsupported- deriving Eq---- | Whether the error pertains to a function argument or a result.-data ArgOrResult- = Arg | Result---- | Which parts of a record field are affected by a particular error or warning.-data RecordFieldPart- = RecordFieldConstructor !Name- | RecordFieldPattern !Name- | RecordFieldUpdate---- | Where a shadowed name comes from-data ShadowedNameProvenance- = ShadowedNameProvenanceLocal !SrcLoc- -- ^ The shadowed name is local to the module- | ShadowedNameProvenanceGlobal [GlobalRdrElt]- -- ^ The shadowed name is global, typically imported from elsewhere.---- | In what context did we require a type to have a fixed runtime representation?------ Used by 'GHC.Tc.Utils.TcMType.checkTypeHasFixedRuntimeRep' for throwing--- representation polymorphism errors when validity checking.------ See Note [Representation polymorphism checking] in GHC.Tc.Utils.Concrete-data FixedRuntimeRepProvenance- -- | Data constructor fields must have a fixed runtime representation.- --- -- Tests: T11734, T18534.- = FixedRuntimeRepDataConField-- -- | Pattern synonym signature arguments must have a fixed runtime representation.- --- -- Test: RepPolyPatSynArg.- | FixedRuntimeRepPatSynSigArg-- -- | Pattern synonym signature scrutinee must have a fixed runtime representation.- --- -- Test: RepPolyPatSynRes.- | FixedRuntimeRepPatSynSigRes--pprFixedRuntimeRepProvenance :: FixedRuntimeRepProvenance -> SDoc-pprFixedRuntimeRepProvenance FixedRuntimeRepDataConField = text "data constructor field"-pprFixedRuntimeRepProvenance FixedRuntimeRepPatSynSigArg = text "pattern synonym argument"-pprFixedRuntimeRepProvenance FixedRuntimeRepPatSynSigRes = text "pattern synonym scrutinee"---- | Why the particular illegal newtype error arose together with more--- information, if any.-data IllegalNewtypeReason- = DoesNotHaveSingleField !Int- | IsNonLinear- | IsGADT- | HasConstructorContext- | HasExistentialTyVar- | HasStrictnessAnnotation- deriving Generic---- | Why the particular injectivity error arose together with more information,--- if any.-data InjectivityErrReason- = InjErrRhsBareTyVar [Type]- | InjErrRhsCannotBeATypeFam- | InjErrRhsOverlap- | InjErrCannotInferFromRhs !TyVarSet !HasKinds !SuggestUndecidableInstances--data HasKinds- = YesHasKinds- | NoHasKinds- deriving (Show, Eq)--hasKinds :: Bool -> HasKinds-hasKinds True = YesHasKinds-hasKinds False = NoHasKinds--data SuggestUndecidableInstances- = YesSuggestUndecidableInstaces- | NoSuggestUndecidableInstaces- deriving (Show, Eq)--suggestUndecidableInstances :: Bool -> SuggestUndecidableInstances-suggestUndecidableInstances True = YesSuggestUndecidableInstaces-suggestUndecidableInstances False = NoSuggestUndecidableInstaces--data SuggestUnliftedTypes- = SuggestUnliftedNewtypes- | SuggestUnliftedDatatypes---- | A description of whether something is a------ * @data@ or @newtype@ ('DataDeclSort')------ * @data instance@ or @newtype instance@ ('DataInstanceSort')------ * @data family@ ('DataFamilySort')------ At present, this data type is only consumed by 'checkDataKindSig'.-data DataSort- = DataDeclSort NewOrData- | DataInstanceSort NewOrData- | DataFamilySort--ppDataSort :: DataSort -> SDoc-ppDataSort data_sort = text $- case data_sort of- DataDeclSort DataType -> "Data type"- DataDeclSort NewType -> "Newtype"- DataInstanceSort DataType -> "Data instance"- DataInstanceSort NewType -> "Newtype instance"- DataFamilySort -> "Data family"---- | Helper type used in 'checkDataKindSig'.------ Superficially similar to 'ContextKind', but it lacks 'AnyKind'--- and 'AnyBoxedKind', and instead of @'TheKind' liftedTypeKind@--- provides 'LiftedKind', which is much simpler to match on and--- handle in 'isAllowedDataResKind'.-data AllowedDataResKind- = AnyTYPEKind- | AnyBoxedKind- | LiftedKind---- | A data type to describe why a variable is not closed.--- See Note [Not-closed error messages] in GHC.Tc.Gen.Expr-data NotClosedReason = NotLetBoundReason- | NotTypeClosed VarSet- | NotClosed Name NotClosedReason--data SuggestPartialTypeSignatures- = YesSuggestPartialTypeSignatures- | NoSuggestPartialTypeSignatures- deriving (Show, Eq)--suggestPartialTypeSignatures :: Bool -> SuggestPartialTypeSignatures-suggestPartialTypeSignatures True = YesSuggestPartialTypeSignatures-suggestPartialTypeSignatures False = NoSuggestPartialTypeSignatures--data UsingGeneralizedNewtypeDeriving- = YesGeneralizedNewtypeDeriving- | NoGeneralizedNewtypeDeriving- deriving Eq--usingGeneralizedNewtypeDeriving :: Bool -> UsingGeneralizedNewtypeDeriving-usingGeneralizedNewtypeDeriving True = YesGeneralizedNewtypeDeriving-usingGeneralizedNewtypeDeriving False = NoGeneralizedNewtypeDeriving--data DeriveAnyClassEnabled- = YesDeriveAnyClassEnabled- | NoDeriveAnyClassEnabled- deriving Eq--deriveAnyClassEnabled :: Bool -> DeriveAnyClassEnabled-deriveAnyClassEnabled True = YesDeriveAnyClassEnabled-deriveAnyClassEnabled False = NoDeriveAnyClassEnabled---- | Why a particular typeclass instance couldn't be derived.-data DeriveInstanceErrReason- =- -- | The typeclass instance is not well-kinded.- DerivErrNotWellKinded !TyCon- -- ^ The type constructor that occurs in- -- the typeclass instance declaration.- !Kind- -- ^ The typeclass kind.- !Int- -- ^ The number of typeclass arguments that GHC- -- kept. See Note [tc_args and tycon arity] in- -- GHC.Tc.Deriv.- -- | Generic instances can only be derived using the stock strategy- -- in Safe Haskell.- | DerivErrSafeHaskellGenericInst- | DerivErrDerivingViaWrongKind !Kind !Type !Kind- | DerivErrNoEtaReduce !Type- -- ^ The instance type- -- | We cannot derive instances in boot files- | DerivErrBootFileFound- | DerivErrDataConsNotAllInScope !TyCon- -- | We cannot use GND on non-newtype types- | DerivErrGNDUsedOnData- -- | We cannot derive instances of nullary classes- | DerivErrNullaryClasses- -- | Last arg must be newtype or data application- | DerivErrLastArgMustBeApp- | DerivErrNoFamilyInstance !TyCon [Type]- | DerivErrNotStockDeriveable !DeriveAnyClassEnabled- | DerivErrHasAssociatedDatatypes !HasAssociatedDataFamInsts- !AssociatedTyLastVarInKind- !AssociatedTyNotParamOverLastTyVar- | DerivErrNewtypeNonDeriveableClass- | DerivErrCannotEtaReduceEnough !Bool -- Is eta-reduction OK?- | DerivErrOnlyAnyClassDeriveable !TyCon- -- ^ Type constructor for which the instance- -- is requested- !DeriveAnyClassEnabled- -- ^ Whether or not -XDeriveAnyClass is enabled- -- already.- -- | Stock deriving won't work, but perhaps DeriveAnyClass will.- | DerivErrNotDeriveable !DeriveAnyClassEnabled- -- | The given 'PredType' is not a class.- | DerivErrNotAClass !PredType- -- | The given (representation of the) 'TyCon' has no- -- data constructors.- | DerivErrNoConstructors !TyCon- | DerivErrLangExtRequired !LangExt.Extension- -- | GHC simply doesn't how to how derive the input 'Class' for the given- -- 'Type'.- | DerivErrDunnoHowToDeriveForType !Type- -- | The given 'TyCon' must be an enumeration.- -- See Note [Enumeration types] in GHC.Core.TyCon- | DerivErrMustBeEnumType !TyCon- -- | The given 'TyCon' must have /precisely/ one constructor.- | DerivErrMustHaveExactlyOneConstructor !TyCon- -- | The given data type must have some parameters.- | DerivErrMustHaveSomeParameters !TyCon- -- | The given data type must not have a class context.- | DerivErrMustNotHaveClassContext !TyCon !ThetaType- -- | We couldn't derive an instance for a particular data constructor- -- for a variety of reasons.- | DerivErrBadConstructor !(Maybe HasWildcard) [DeriveInstanceBadConstructor]- -- | We couldn't derive a 'Generic' instance for the given type for a- -- variety of reasons- | DerivErrGenerics [DeriveGenericsErrReason]- -- | We couldn't derive an instance either because the type was not an- -- enum type or because it did have more than one constructor.- | DerivErrEnumOrProduct !DeriveInstanceErrReason !DeriveInstanceErrReason- deriving Generic--data DeriveInstanceBadConstructor- =- -- | The given 'DataCon' must be truly polymorphic in the- -- last argument of the data type.- DerivErrBadConExistential !DataCon- -- | The given 'DataCon' must not use the type variable in a function argument"- | DerivErrBadConCovariant !DataCon- -- | The given 'DataCon' must not contain function types- | DerivErrBadConFunTypes !DataCon- -- | The given 'DataCon' must use the type variable only- -- as the last argument of a data type- | DerivErrBadConWrongArg !DataCon- -- | The given 'DataCon' is a GADT so we cannot directly- -- derive an istance for it.- | DerivErrBadConIsGADT !DataCon- -- | The given 'DataCon' has existentials type vars in its type.- | DerivErrBadConHasExistentials !DataCon- -- | The given 'DataCon' has constraints in its type.- | DerivErrBadConHasConstraints !DataCon- -- | The given 'DataCon' has a higher-rank type.- | DerivErrBadConHasHigherRankType !DataCon--data DeriveGenericsErrReason- = -- | The type must not have some datatype context.- DerivErrGenericsMustNotHaveDatatypeContext !TyCon- -- | The data constructor must not have exotic unlifted- -- or polymorphic arguments.- | DerivErrGenericsMustNotHaveExoticArgs !DataCon- -- | The data constructor must be a vanilla constructor.- | DerivErrGenericsMustBeVanillaDataCon !DataCon- -- | The type must have some type parameters.- -- check (d) from Note [Requirements for deriving Generic and Rep]- -- in GHC.Tc.Deriv.Generics.- | DerivErrGenericsMustHaveSomeTypeParams !TyCon- -- | The data constructor must not have existential arguments.- | DerivErrGenericsMustNotHaveExistentials !DataCon- -- | The derivation applies a type to an argument involving- -- the last parameter but the applied type is not of kind * -> *.- | DerivErrGenericsWrongArgKind !DataCon--data HasWildcard- = YesHasWildcard- | NoHasWildcard- deriving Eq--hasWildcard :: Bool -> HasWildcard-hasWildcard True = YesHasWildcard-hasWildcard False = NoHasWildcard---- | A context in which we don't allow anonymous wildcards.-data BadAnonWildcardContext- = WildcardNotLastInConstraint- | ExtraConstraintWildcardNotAllowed- SoleExtraConstraintWildcardAllowed- | WildcardsNotAllowedAtAll---- | Whether a sole extra-constraint wildcard is allowed,--- e.g. @_ => ..@ as opposed to @( .., _ ) => ..@.-data SoleExtraConstraintWildcardAllowed- = SoleExtraConstraintWildcardNotAllowed- | SoleExtraConstraintWildcardAllowed---- | A type representing whether or not the input type has associated data family instances.-data HasAssociatedDataFamInsts- = YesHasAdfs- | NoHasAdfs- deriving Eq--hasAssociatedDataFamInsts :: Bool -> HasAssociatedDataFamInsts-hasAssociatedDataFamInsts True = YesHasAdfs-hasAssociatedDataFamInsts False = NoHasAdfs---- | If 'YesAssocTyLastVarInKind', the associated type of a typeclass--- contains the last type variable of the class in a kind, which is not (yet) allowed--- by GHC.-data AssociatedTyLastVarInKind- = YesAssocTyLastVarInKind !TyCon -- ^ The associated type family of the class- | NoAssocTyLastVarInKind- deriving Eq--associatedTyLastVarInKind :: Maybe TyCon -> AssociatedTyLastVarInKind-associatedTyLastVarInKind (Just tc) = YesAssocTyLastVarInKind tc-associatedTyLastVarInKind Nothing = NoAssocTyLastVarInKind---- | If 'NoAssociatedTyNotParamOverLastTyVar', the associated type of a--- typeclass is not parameterized over the last type variable of the class-data AssociatedTyNotParamOverLastTyVar- = YesAssociatedTyNotParamOverLastTyVar !TyCon -- ^ The associated type family of the class- | NoAssociatedTyNotParamOverLastTyVar- deriving Eq--associatedTyNotParamOverLastTyVar :: Maybe TyCon -> AssociatedTyNotParamOverLastTyVar-associatedTyNotParamOverLastTyVar (Just tc) = YesAssociatedTyNotParamOverLastTyVar tc-associatedTyNotParamOverLastTyVar Nothing = NoAssociatedTyNotParamOverLastTyVar---- | What kind of thing is missing a type signature?------ Used for reporting @"missing signature"@ warnings, see--- 'tcRnMissingSignature'.-data MissingSignature- = MissingTopLevelBindingSig Name Type- | MissingPatSynSig PatSyn- | MissingTyConKindSig- TyCon- Bool -- ^ whether -XCUSKs is enabled---- | Is the object we are dealing with exported or not?------ Used for reporting @"missing signature"@ warnings, see--- 'TcRnMissingSignature'.-data Exported- = IsNotExported- | IsExported--instance Outputable Exported where- ppr IsNotExported = text "IsNotExported"- ppr IsExported = text "IsExported"---------------------------------------------------------------------------------------- Errors used in GHC.Tc.Errors--------------------------------------------------------------------------------------{- Note [Error report]-~~~~~~~~~~~~~~~~~~~~~~-The idea is that error msgs are divided into three parts: the main msg, the-context block ("In the second argument of ..."), and the relevant bindings-block, which are displayed in that order, with a mark to divide them. The-the main msg ('report_important') varies depending on the error-in question, but context and relevant bindings are always the same, which-should simplify visual parsing.--See 'GHC.Tc.Errors.Types.SolverReport' and 'GHC.Tc.Errors.mkErrorReport'.--}---- | A collection of main error messages and supplementary information.------ In practice, we will:--- - display the important messages first,--- - then the error context (e.g. by way of a call to 'GHC.Tc.Errors.mkErrorReport'),--- - then the supplementary information (e.g. relevant bindings, valid hole fits),--- - then the hints ("Possible fix: ...").------ So this is mostly just a way of making sure that the error context appears--- early on rather than at the end of the message.------ See Note [Error report] for details.-data SolverReport- = SolverReport- { sr_important_msg :: SolverReportWithCtxt- , sr_supplementary :: [SolverReportSupplementary]- , sr_hints :: [GhcHint]- }---- | Additional information to print in a 'SolverReport', after the--- important messages and after the error context.------ See Note [Error report].-data SolverReportSupplementary- = SupplementaryBindings RelevantBindings- | SupplementaryHoleFits ValidHoleFits- | SupplementaryCts [(PredType, RealSrcSpan)]---- | A 'TcSolverReportMsg', together with context (e.g. enclosing implication constraints)--- that are needed in order to report it.-data SolverReportWithCtxt =- SolverReportWithCtxt- { reportContext :: SolverReportErrCtxt- -- ^ Context for what we wish to report.- -- This can change as we enter implications, so is- -- stored alongside the content.- , reportContent :: TcSolverReportMsg- -- ^ The content of the message to report.- }- deriving Generic---- | Context needed when reporting a 'TcSolverReportMsg', such as--- the enclosing implication constraints or whether we are deferring type errors.-data SolverReportErrCtxt- = CEC { cec_encl :: [Implication] -- ^ Enclosing implications- -- (innermost first)- -- ic_skols and givens are tidied, rest are not- , cec_tidy :: TidyEnv-- , cec_binds :: EvBindsVar -- ^ We make some errors (depending on cec_defer)- -- into warnings, and emit evidence bindings- -- into 'cec_binds' for unsolved constraints-- , cec_defer_type_errors :: DiagnosticReason -- ^ Whether to defer type errors until runtime-- -- We might throw a warning on an error when encountering a hole,- -- depending on the type of hole (expression hole, type hole, out of scope hole).- -- We store the reasons for reporting a diagnostic for each type of hole.- , cec_expr_holes :: DiagnosticReason -- ^ Reason for reporting holes in expressions.- , cec_type_holes :: DiagnosticReason -- ^ Reason for reporting holes in types.- , cec_out_of_scope_holes :: DiagnosticReason -- ^ Reason for reporting out of scope holes.-- , cec_warn_redundant :: Bool -- ^ True <=> -Wredundant-constraints- , cec_expand_syns :: Bool -- ^ True <=> -fprint-expanded-synonyms-- , cec_suppress :: Bool -- ^ True <=> More important errors have occurred,- -- so create bindings if need be, but- -- don't issue any more errors/warnings- -- See Note [Suppressing error messages]- }--getUserGivens :: SolverReportErrCtxt -> [UserGiven]--- One item for each enclosing implication-getUserGivens (CEC {cec_encl = implics}) = getUserGivensFromImplics implics------------------------------------------------------------------------------------ ErrorItem------------------------------------------------------------------------------------ | A predicate with its arising location; used to encapsulate a constraint--- that will give rise to a diagnostic.-data ErrorItem--- We could perhaps use Ct here (and indeed used to do exactly that), but--- having a separate type gives to denote errors-in-formation gives us--- a nice place to do pre-processing, such as calculating ei_suppress.--- Perhaps some day, an ErrorItem could eventually evolve to contain--- the error text (or some representation of it), so we can then have all--- the errors together when deciding which to report.- = EI { ei_pred :: PredType -- report about this- -- The ei_pred field will never be an unboxed equality with- -- a (casted) tyvar on the right; this is guaranteed by the solver- , ei_evdest :: Maybe TcEvDest- -- ^ for Wanteds, where to put the evidence- -- for Givens, Nothing- , ei_flavour :: CtFlavour- , ei_loc :: CtLoc- , ei_m_reason :: Maybe CtIrredReason -- if this ErrorItem was made from a- -- CtIrred, this stores the reason- , ei_suppress :: Bool -- Suppress because of Note [Wanteds rewrite Wanteds]- -- in GHC.Tc.Constraint- }--instance Outputable ErrorItem where- ppr (EI { ei_pred = pred- , ei_evdest = m_evdest- , ei_flavour = flav- , ei_suppress = supp })- = pp_supp <+> ppr flav <+> pp_dest m_evdest <+> ppr pred- where- pp_dest Nothing = empty- pp_dest (Just ev) = ppr ev <+> dcolon-- pp_supp = if supp then text "suppress:" else empty--errorItemOrigin :: ErrorItem -> CtOrigin-errorItemOrigin = ctLocOrigin . ei_loc--errorItemEqRel :: ErrorItem -> EqRel-errorItemEqRel = predTypeEqRel . ei_pred--errorItemCtLoc :: ErrorItem -> CtLoc-errorItemCtLoc = ei_loc--errorItemPred :: ErrorItem -> PredType-errorItemPred = ei_pred--{- Note [discardProvCtxtGivens]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In most situations we call all enclosing implications "useful". There is one-exception, and that is when the constraint that causes the error is from the-"provided" context of a pattern synonym declaration:-- pattern Pat :: (Num a, Eq a) => Show a => a -> Maybe a- -- required => provided => type- pattern Pat x <- (Just x, 4)--When checking the pattern RHS we must check that it does actually bind all-the claimed "provided" constraints; in this case, does the pattern (Just x, 4)-bind the (Show a) constraint. Answer: no!--But the implication we generate for this will look like- forall a. (Num a, Eq a) => [W] Show a-because when checking the pattern we must make the required-constraints available, since they are needed to match the pattern (in-this case the literal '4' needs (Num a, Eq a)).--BUT we don't want to suggest adding (Show a) to the "required" constraints-of the pattern synonym, thus:- pattern Pat :: (Num a, Eq a, Show a) => Show a => a -> Maybe a-It would then typecheck but it's silly. We want the /pattern/ to bind-the alleged "provided" constraints, Show a.--So we suppress that Implication in discardProvCtxtGivens. It's-painfully ad-hoc but the truth is that adding it to the "required"-constraints would work. Suppressing it solves two problems. First,-we never tell the user that we could not deduce a "provided"-constraint from the "required" context. Second, we never give a-possible fix that suggests to add a "provided" constraint to the-"required" context.--For example, without this distinction the above code gives a bad error-message (showing both problems):-- error: Could not deduce (Show a) ... from the context: (Eq a)- ... Possible fix: add (Show a) to the context of- the signature for pattern synonym `Pat' ...--}---discardProvCtxtGivens :: CtOrigin -> [UserGiven] -> [UserGiven]-discardProvCtxtGivens orig givens -- See Note [discardProvCtxtGivens]- | ProvCtxtOrigin (PSB {psb_id = L _ name}) <- orig- = filterOut (discard name) givens- | otherwise- = givens- where- discard n (Implic { ic_info = SigSkol (PatSynCtxt n') _ _ }) = n == n'- discard _ _ = False----- | An error reported after constraint solving.--- This is usually, some sort of unsolved constraint error,--- but we try to be specific about the precise problem we encountered.-data TcSolverReportMsg- -- | Quantified variables appear out of dependency order.- --- -- Example:- --- -- forall (a :: k) k. ...- --- -- Test cases: BadTelescope2, T16418, T16247, T16726, T18451.- = BadTelescope TyVarBndrs [TyCoVar]-- -- | We came across a custom type error and we have decided to report it.- --- -- Example:- --- -- type family F a where- -- F a = TypeError (Text "error")- --- -- err :: F ()- -- err = ()- --- -- Test cases: CustomTypeErrors0{1,2,3,4,5}, T12104.- | UserTypeError Type-- -- | We want to report an out of scope variable or a typed hole.- -- See 'HoleError'.- | ReportHoleError Hole HoleError-- -- | Trying to unify an untouchable variable, e.g. a variable from an outer scope.- --- -- Test case: Simple14- | UntouchableVariable- { untouchableTyVar :: TyVar- , untouchableTyVarImplication :: Implication- }-- -- | Cannot unify a variable, because of a type mismatch.- | CannotUnifyVariable- { mismatchMsg :: MismatchMsg- , cannotUnifyReason :: CannotUnifyVariableReason }-- -- | A mismatch between two types.- | Mismatch- { mismatchMsg :: MismatchMsg- , mismatchTyVarInfo :: Maybe TyVarInfo- , mismatchAmbiguityInfo :: [AmbiguityInfo]- , mismatchCoercibleInfo :: Maybe CoercibleMsg }-- -- | A violation of the representation-polymorphism invariants.- --- -- See 'FixedRuntimeRepErrorInfo' and 'FixedRuntimeRepContext' for more information.- | FixedRuntimeRepError [FixedRuntimeRepErrorInfo]-- -- | An equality between two types is blocked on a kind equality- -- between their kinds.- --- -- Test cases: none.- | BlockedEquality ErrorItem- -- These are for the "blocked" equalities, as described in- -- Note [Equalities with incompatible kinds] in GHC.Tc.Solver.Canonical,- -- wrinkle (2). There should always be another unsolved wanted around,- -- which will ordinarily suppress this message. But this can still be printed out- -- with -fdefer-type-errors (sigh), so we must produce a message.-- -- | Something was not applied to sufficiently many arguments.- --- -- Example:- --- -- instance Eq Maybe where {..}- --- -- Test case: T11563.- | ExpectingMoreArguments Int TypedThing-- -- | Trying to use an unbound implicit parameter.- --- -- Example:- --- -- foo :: Int- -- foo = ?param- --- -- Test case: tcfail130.- | UnboundImplicitParams- (NE.NonEmpty ErrorItem)-- -- | A constraint couldn't be solved because it contains- -- ambiguous type variables.- --- -- Example:- --- -- class C a b where- -- f :: (a,b)- --- -- x = fst f- --- --- -- Test case: T4921.- | AmbiguityPreventsSolvingCt- ErrorItem -- ^ always a class constraint- ([TyVar], [TyVar]) -- ^ ambiguous kind and type variables, respectively-- -- | Could not solve a constraint; there were several unifying candidate instances- -- but no matching instances. This is used to report as much useful information- -- as possible about why we couldn't choose any instance, e.g. because of- -- ambiguous type variables.- | CannotResolveInstance- { cannotResolve_item :: ErrorItem- , cannotResolve_unifiers :: [ClsInst]- , cannotResolve_candidates :: [ClsInst]- , cannotResolve_importErrors :: [ImportError]- , cannotResolve_suggestions :: [GhcHint]- , cannotResolve_relevant_bindings :: RelevantBindings }- -- TODO: remove the fields of type [GhcHint] and RelevantBindings,- -- in order to handle them uniformly with other diagnostic messages.-- -- | Could not solve a constraint using available instances- -- because the instances overlap.- --- -- Test cases: tcfail118, tcfail121, tcfail218.- | OverlappingInstances- { overlappingInstances_item :: ErrorItem- , overlappingInstances_matches :: NE.NonEmpty ClsInst- , overlappingInstances_unifiers :: [ClsInst] }-- -- | Could not solve a constraint from instances because- -- instances declared in a Safe module cannot overlap instances- -- from other modules (with -XSafeHaskell).- --- -- Test cases: SH_Overlap{1,2,5,6,7,11}.- | UnsafeOverlap- { unsafeOverlap_item :: ErrorItem- , unsafeOverlap_match :: ClsInst- , unsafeOverlapped :: NE.NonEmpty ClsInst }-- deriving Generic--data MismatchMsg- = -- | Couldn't unify two types or kinds.- --- -- Example:- --- -- 3 + 3# -- can't match a lifted type with an unlifted type- --- -- Test cases: T1396, T8263, ...- BasicMismatch- { mismatch_ea :: MismatchEA -- ^ Should this be phrased in terms of expected vs actual?- , mismatch_item :: ErrorItem -- ^ The constraint in which the mismatch originated.- , mismatch_ty1 :: Type -- ^ First type (the expected type if if mismatch_ea is True)- , mismatch_ty2 :: Type -- ^ Second type (the actual type if mismatch_ea is True)- , mismatch_whenMatching :: Maybe WhenMatching- , mismatch_mb_same_occ :: Maybe SameOccInfo- }-- -- | A type has an unexpected kind.- --- -- Test cases: T2994, T7609, ...- | KindMismatch- { kmismatch_what :: TypedThing -- ^ What thing is 'kmismatch_actual' the kind of?- , kmismatch_expected :: Type- , kmismatch_actual :: Type- }- -- TODO: combine with 'BasicMismatch'.-- -- | A mismatch between two types, which arose from a type equality.- --- -- Test cases: T1470, tcfail212.- | TypeEqMismatch- { teq_mismatch_ppr_explicit_kinds :: Bool- , teq_mismatch_item :: ErrorItem- , teq_mismatch_ty1 :: Type- , teq_mismatch_ty2 :: Type- , teq_mismatch_expected :: Type -- ^ The overall expected type- , teq_mismatch_actual :: Type -- ^ The overall actual type- , teq_mismatch_what :: Maybe TypedThing -- ^ What thing is 'teq_mismatch_actual' the kind of?- , teq_mb_same_occ :: Maybe SameOccInfo- }- -- TODO: combine with 'BasicMismatch'.-- -- | Couldn't solve some Wanted constraints using the Givens.- -- Used for messages such as @"No instance for ..."@ and- -- @"Could not deduce ... from"@.- | CouldNotDeduce- { cnd_user_givens :: [Implication]- -- | The Wanted constraints we couldn't solve.- --- -- N.B.: the 'ErrorItem' at the head of the list has been tidied,- -- perhaps not the others.- , cnd_wanted :: NE.NonEmpty ErrorItem-- -- | Some additional info consumed by 'mk_supplementary_ea_msg'.- , cnd_extra :: Maybe CND_Extra- }- deriving Generic---- | Construct a basic mismatch message between two types.------ See 'pprMismatchMsg' for how such a message is displayed to users.-mkBasicMismatchMsg :: MismatchEA -> ErrorItem -> Type -> Type -> MismatchMsg-mkBasicMismatchMsg ea item ty1 ty2- = BasicMismatch- { mismatch_ea = ea- , mismatch_item = item- , mismatch_ty1 = ty1- , mismatch_ty2 = ty2- , mismatch_whenMatching = Nothing- , mismatch_mb_same_occ = Nothing- }---- | Whether to use expected/actual in a type mismatch message.-data MismatchEA- -- | Don't use expected/actual.- = NoEA- -- | Use expected/actual.- | EA- { mismatch_mbEA :: Maybe ExpectedActualInfo- -- ^ Whether to also mention type synonym expansion.- }--data CannotUnifyVariableReason- = -- | A type equality between a type variable and a polytype.- --- -- Test cases: T12427a, T2846b, T10194, ...- CannotUnifyWithPolytype ErrorItem TyVar Type (Maybe TyVarInfo)-- -- | An occurs check.- | OccursCheck- { occursCheckInterestingTyVars :: [TyVar]- , occursCheckAmbiguityInfos :: [AmbiguityInfo] }-- -- | A skolem type variable escapes its scope.- --- -- Example:- --- -- data Ex where { MkEx :: a -> MkEx }- -- foo (MkEx x) = x- --- -- Test cases: TypeSkolEscape, T11142.- | SkolemEscape ErrorItem Implication [TyVar]-- -- | Can't unify the type variable with the other type- -- due to the kind of type variable it is.- --- -- For example, trying to unify a 'SkolemTv' with the- -- type Int, or with a 'TyVarTv'.- | DifferentTyVars TyVarInfo- | RepresentationalEq TyVarInfo (Maybe CoercibleMsg)- deriving Generic---- | Report a mismatch error without any extra--- information.-mkPlainMismatchMsg :: MismatchMsg -> TcSolverReportMsg-mkPlainMismatchMsg msg- = Mismatch- { mismatchMsg = msg- , mismatchTyVarInfo = Nothing- , mismatchAmbiguityInfo = []- , mismatchCoercibleInfo = Nothing }---- | Additional information to be given in a 'CouldNotDeduce' message,--- which is then passed on to 'mk_supplementary_ea_msg'.-data CND_Extra = CND_Extra TypeOrKind Type Type---- | A cue to print out information about type variables,--- e.g. where they were bound, when there is a mismatch @tv1 ~ ty2@.-data TyVarInfo =- TyVarInfo { thisTyVar :: TyVar- , thisTyVarIsUntouchable :: Maybe Implication- , otherTy :: Maybe TyVar }---- | Add some information to disambiguate errors in which--- two 'Names' would otherwise appear to be identical.------ See Note [Disambiguating (X ~ X) errors].-data SameOccInfo- = SameOcc- { sameOcc_same_pkg :: Bool -- ^ Whether the two 'Name's also came from the same package.- , sameOcc_lhs :: Name- , sameOcc_rhs :: Name }---- | Add some information about ambiguity-data AmbiguityInfo-- -- | Some type variables remained ambiguous: print them to the user.- = Ambiguity- { lead_with_ambig_msg :: Bool -- ^ True <=> start the message with "Ambiguous type variable ..."- -- False <=> create a message of the form "The type variable is ambiguous."- , ambig_tyvars :: ([TyVar], [TyVar]) -- ^ Ambiguous kind and type variables, respectively.- -- Guaranteed to not both be empty.- }-- -- | Remind the user that a particular type family is not injective.- | NonInjectiveTyFam TyCon---- | Expected/actual information.-data ExpectedActualInfo- -- | Display the expected and actual types.- = ExpectedActual- { ea_expected, ea_actual :: Type }-- -- | Display the expected and actual types, after expanding type synonyms.- | ExpectedActualAfterTySynExpansion- { ea_expanded_expected, ea_expanded_actual :: Type }---- | Explain how a kind equality originated.-data WhenMatching-- = WhenMatching TcType TcType CtOrigin (Maybe TypeOrKind)- deriving Generic---- | Some form of @"not in scope"@ error. See also the 'OutOfScopeHole'--- constructor of 'HoleError'.-data NotInScopeError-- -- | A run-of-the-mill @"not in scope"@ error.- = NotInScope-- -- | An exact 'Name' was not in scope.- --- -- This usually indicates a problem with a Template Haskell splice.- --- -- Test cases: T5971, T18263.- | NoExactName Name-- -- The same exact 'Name' occurs in multiple name-spaces.- --- -- This usually indicates a problem with a Template Haskell splice.- --- -- Test case: T7241.- | SameName [GlobalRdrElt] -- ^ always at least 2 elements-- -- A type signature, fixity declaration, pragma, standalone kind signature...- -- is missing an associated binding.- | MissingBinding SDoc [GhcHint]- -- TODO: remove the SDoc argument.-- -- | Couldn't find a top-level binding.- --- -- Happens when specifying an annotation for something that- -- is not in scope.- --- -- Test cases: annfail01, annfail02, annfail11.- | NoTopLevelBinding-- -- | A class doesn't have a method with this name,- -- or, a class doesn't have an associated type with this name,- -- or, a record doesn't have a record field with this name.- | UnknownSubordinate SDoc- deriving Generic---- | Create a @"not in scope"@ error message for the given 'RdrName'.-mkTcRnNotInScope :: RdrName -> NotInScopeError -> TcRnMessage-mkTcRnNotInScope rdr err = TcRnNotInScope err rdr [] noHints---- | Configuration for pretty-printing valid hole fits.-data HoleFitDispConfig =- HFDC { showWrap, showWrapVars, showType, showProv, showMatches- :: Bool }---- | Report an error involving a 'Hole'.------ This could be an out of scope data constructor or variable,--- a typed hole, or a wildcard in a type.-data HoleError- -- | Report an out-of-scope data constructor or variable- -- masquerading as an expression hole.- --- -- See Note [Insoluble holes] in GHC.Tc.Types.Constraint.- -- See 'NotInScopeError' for other not-in-scope errors.- --- -- Test cases: T9177a.- = OutOfScopeHole [ImportError]- -- | Report a typed hole, or wildcard, with additional information.- | HoleError HoleSort- [TcTyVar] -- Other type variables which get computed on the way.- [(SkolemInfoAnon, [TcTyVar])] -- Zonked and grouped skolems for the type of the hole.---- | A message that aims to explain why two types couldn't be seen--- to be representationally equal.-data CoercibleMsg- -- | Not knowing the role of a type constructor prevents us from- -- concluding that two types are representationally equal.- --- -- Example:- --- -- foo :: Applicative m => m (Sum Int)- -- foo = coerce (pure $ 1 :: Int)- --- -- We don't know what role `m` has, so we can't coerce `m Int` to `m (Sum Int)`.- --- -- Test cases: T8984, TcCoercibleFail.- = UnknownRoles Type-- -- | The fact that a 'TyCon' is abstract prevents us from decomposing- -- a 'TyConApp' and deducing that two types are representationally equal.- --- -- Test cases: none.- | TyConIsAbstract TyCon-- -- | We can't unwrap a newtype whose constructor is not in scope.- --- -- Example:- --- -- import Data.Ord (Down) -- NB: not importing the constructor- -- foo :: Int -> Down Int- -- foo = coerce- --- -- Test cases: TcCoercibleFail.- | OutOfScopeNewtypeConstructor TyCon DataCon---- | Explain a problem with an import.-data ImportError- -- | Couldn't find a module with the requested name.- = MissingModule ModuleName- -- | The imported modules don't export what we're looking for.- | ModulesDoNotExport (NE.NonEmpty Module) OccName---- | This datatype collates instances that match or unifier,--- in order to report an error message for an unsolved typeclass constraint.-data PotentialInstances- = PotentialInstances- { matches :: [ClsInst]- , unifiers :: [ClsInst]- }---- | A collection of valid hole fits or refinement fits,--- in which some fits might have been suppressed.-data FitsMbSuppressed- = Fits- { fits :: [HoleFit]- , fitsSuppressed :: Bool -- ^ Whether we have suppressed any fits because there were too many.- }---- | A collection of hole fits and refinement fits.-data ValidHoleFits- = ValidHoleFits- { holeFits :: FitsMbSuppressed- , refinementFits :: FitsMbSuppressed- }--noValidHoleFits :: ValidHoleFits-noValidHoleFits = ValidHoleFits (Fits [] False) (Fits [] False)--data RelevantBindings- = RelevantBindings- { relevantBindingNamesAndTys :: [(Name, Type)]- , ranOutOfFuel :: Bool -- ^ Whether we ran out of fuel generating the bindings.- }---- | Display some relevant bindings.-pprRelevantBindings :: RelevantBindings -> SDoc--- This function should be in "GHC.Tc.Errors.Ppr",--- but it's here for the moment as it's needed in "GHC.Tc.Errors".-pprRelevantBindings (RelevantBindings bds ran_out_of_fuel) =- ppUnless (null rel_bds) $- hang (text "Relevant bindings include")- 2 (vcat (map ppr_binding rel_bds) $$ ppWhen ran_out_of_fuel discardMsg)- where- ppr_binding (nm, tidy_ty) =- sep [ pprPrefixOcc nm <+> dcolon <+> ppr tidy_ty- , nest 2 (parens (text "bound at"- <+> ppr (getSrcLoc nm)))]- rel_bds = filter (not . isGeneratedSrcSpan . getSrcSpan . fst) bds--discardMsg :: SDoc-discardMsg = text "(Some bindings suppressed;" <+>- text "use -fmax-relevant-binds=N or -fno-max-relevant-binds)"--data PromotionErr- = TyConPE -- TyCon used in a kind before we are ready- -- data T :: T -> * where ...- | ClassPE -- Ditto Class-- | FamDataConPE -- Data constructor for a data family- -- See Note [AFamDataCon: not promoting data family constructors]- -- in GHC.Tc.Utils.Env.- | ConstrainedDataConPE PredType- -- Data constructor with a non-equality context- -- See Note [Constraints in kinds] in GHC.Core.TyCo.Rep- | PatSynPE -- Pattern synonyms- -- See Note [Don't promote pattern synonyms] in GHC.Tc.Utils.Env-- | RecDataConPE -- Data constructor in a recursive loop- -- See Note [Recursion and promoting data constructors] in GHC.Tc.TyCl- | TermVariablePE -- See Note [Promoted variables in types]- | NoDataKindsDC -- -XDataKinds not enabled (for a datacon)--instance Outputable PromotionErr where- ppr ClassPE = text "ClassPE"- ppr TyConPE = text "TyConPE"- ppr PatSynPE = text "PatSynPE"- ppr FamDataConPE = text "FamDataConPE"- ppr (ConstrainedDataConPE pred) = text "ConstrainedDataConPE"- <+> parens (ppr pred)- ppr RecDataConPE = text "RecDataConPE"- ppr NoDataKindsDC = text "NoDataKindsDC"- ppr TermVariablePE = text "TermVariablePE"--pprPECategory :: PromotionErr -> SDoc-pprPECategory = text . capitalise . peCategory--peCategory :: PromotionErr -> String-peCategory ClassPE = "class"-peCategory TyConPE = "type constructor"-peCategory PatSynPE = "pattern synonym"-peCategory FamDataConPE = "data constructor"-peCategory ConstrainedDataConPE{} = "data constructor"-peCategory RecDataConPE = "data constructor"-peCategory NoDataKindsDC = "data constructor"-peCategory TermVariablePE = "term variable"---- | Stores the information to be reported in a representation-polymorphism--- error message.-data FixedRuntimeRepErrorInfo- = FRR_Info- { frr_info_origin :: FixedRuntimeRepOrigin- -- ^ What is the original type we checked for- -- representation-polymorphism, and what specific- -- check did we perform?- , frr_info_not_concrete :: Maybe (TcTyVar, TcType)- -- ^ Which non-concrete type did we try to- -- unify this concrete type variable with?- }--{--************************************************************************-* *-\subsection{Contexts for renaming errors}-* *-************************************************************************--}---- AZ:TODO: Change these all to be Name instead of RdrName.--- Merge TcType.UserTypeContext in to it.-data HsDocContext- = TypeSigCtx SDoc- | StandaloneKindSigCtx SDoc- | PatCtx- | SpecInstSigCtx- | DefaultDeclCtx- | ForeignDeclCtx (LocatedN RdrName)- | DerivDeclCtx- | RuleCtx FastString- | TyDataCtx (LocatedN RdrName)- | TySynCtx (LocatedN RdrName)- | TyFamilyCtx (LocatedN RdrName)- | FamPatCtx (LocatedN RdrName) -- The patterns of a type/data family instance- | ConDeclCtx [LocatedN Name]- | ClassDeclCtx (LocatedN RdrName)- | ExprWithTySigCtx- | TypBrCtx- | HsTypeCtx- | HsTypePatCtx- | GHCiCtx- | SpliceTypeCtx (LHsType GhcPs)- | ClassInstanceCtx- | GenericCtx SDoc---- | Context for a mismatch in the number of arguments-data MatchArgsContext- = EquationArgs- !Name -- ^ Name of the function- | PatternArgs- !(HsMatchContext GhcTc) -- ^ Pattern match specifics---- | The information necessary to report mismatched--- numbers of arguments in a match group.-data MatchArgBadMatches where- MatchArgMatches- :: { matchArgFirstMatch :: LocatedA (Match GhcRn body)- , matchArgBadMatches :: NE.NonEmpty (LocatedA (Match GhcRn body)) }- -> MatchArgBadMatches---- | The phase in which an exception was encountered when dealing with a TH splice-data SplicePhase- = SplicePhase_Run- | SplicePhase_CompileAndLink--data LookupTHInstNameErrReason- = NoMatchesFound- | CouldNotDetermineInstance--data UnrepresentableTypeDescr- = LinearInvisibleArgument- | CoercionsInTypes---- | The context for an "empty statement group" error.-data EmptyStatementGroupErrReason- = EmptyStmtsGroupInParallelComp- -- ^ Empty statement group in a parallel list comprehension- | EmptyStmtsGroupInTransformListComp- -- ^ Empty statement group in a transform list comprehension- --- -- Example:- -- [() | then ()]- | EmptyStmtsGroupInDoNotation HsDoFlavour- -- ^ Empty statement group in do notation- --- -- Example:- -- do- | EmptyStmtsGroupInArrowNotation- -- ^ Empty statement group in arrow notation- --- -- Example:- -- proc () -> do-- deriving (Generic)---- | An existential wrapper around @'StmtLR' GhcPs GhcPs body@.-data UnexpectedStatement where- UnexpectedStatement- :: Outputable (StmtLR GhcPs GhcPs body)- => StmtLR GhcPs GhcPs body- -> UnexpectedStatement+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GADTs #-}+{-# LANGUAGE KindSignatures #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE TypeApplications #-}++module GHC.Tc.Errors.Types (+ -- * Main types+ TcRnMessage(..)+ , TcRnMessageOpts(..)+ , mkTcRnUnknownMessage+ , TcRnMessageDetailed(..)+ , TypeDataForbids(..)+ , ErrInfo(..)+ , FixedRuntimeRepProvenance(..)+ , pprFixedRuntimeRepProvenance+ , ShadowedNameProvenance(..)+ , RecordFieldPart(..)+ , IllegalNewtypeReason(..)+ , BadRecordUpdateReason(..)+ , InjectivityErrReason(..)+ , HasKinds(..)+ , hasKinds+ , SuggestUndecidableInstances(..)+ , suggestUndecidableInstances+ , SuggestUnliftedTypes(..)+ , DataSort(..), ppDataSort+ , AllowedDataResKind(..)+ , NotClosedReason(..)+ , SuggestPartialTypeSignatures(..)+ , suggestPartialTypeSignatures+ , DeriveInstanceErrReason(..)+ , UsingGeneralizedNewtypeDeriving(..)+ , usingGeneralizedNewtypeDeriving+ , DeriveAnyClassEnabled(..)+ , deriveAnyClassEnabled+ , DeriveInstanceBadConstructor(..)+ , HasWildcard(..)+ , hasWildcard+ , BadAnonWildcardContext(..)+ , SoleExtraConstraintWildcardAllowed(..)+ , DeriveGenericsErrReason(..)+ , HasAssociatedDataFamInsts(..)+ , hasAssociatedDataFamInsts+ , AssociatedTyLastVarInKind(..)+ , associatedTyLastVarInKind+ , AssociatedTyNotParamOverLastTyVar(..)+ , associatedTyNotParamOverLastTyVar+ , MissingSignature(..)+ , Exported(..)+ , HsDocContext(..)+ , FixedRuntimeRepErrorInfo(..)++ , ErrorItem(..), errorItemOrigin, errorItemEqRel, errorItemPred, errorItemCtLoc++ , SolverReport(..), SolverReportSupplementary(..)+ , SolverReportWithCtxt(..)+ , SolverReportErrCtxt(..)+ , getUserGivens, discardProvCtxtGivens+ , TcSolverReportMsg(..)+ , CannotUnifyVariableReason(..)+ , MismatchMsg(..)+ , MismatchEA(..)+ , mkPlainMismatchMsg, mkBasicMismatchMsg+ , WhenMatching(..)+ , ExpectedActualInfo(..)+ , TyVarInfo(..), SameOccInfo(..)+ , AmbiguityInfo(..)+ , CND_Extra(..)+ , FitsMbSuppressed(..)+ , ValidHoleFits(..), noValidHoleFits+ , HoleFitDispConfig(..)+ , RelevantBindings(..), pprRelevantBindings+ , PromotionErr(..), pprPECategory, peCategory+ , NotInScopeError(..), mkTcRnNotInScope+ , ImportError(..)+ , HoleError(..)+ , CoercibleMsg(..)+ , PotentialInstances(..)+ , UnsupportedCallConvention(..)+ , ExpectedBackends+ , ArgOrResult(..)+ , MatchArgsContext(..), MatchArgBadMatches(..)+ , EmptyStatementGroupErrReason(..)+ , UnexpectedStatement(..)+ , DeclSort(..)+ , NonStandardGuards(..)+ , RuleLhsErrReason(..)+ , HsigShapeMismatchReason(..)+ , WrongThingSort(..)+ , StageCheckReason(..)+ , UninferrableTyVarCtx(..)+ , PatSynInvalidRhsReason(..)+ , BadFieldAnnotationReason(..)+ , SuperclassCycle(..)+ , SuperclassCycleDetail(..)+ , RoleValidationFailedReason(..)+ , DisabledClassExtension(..)+ , TyFamsDisabledReason(..)+ , TypeApplication(..)+ , HsTypeOrSigType(..)+ , HsTyVarBndrExistentialFlag(..)+ , TySynCycleTyCons+ , BadImportKind(..)+ , DodgyImportsReason (..)+ , ImportLookupReason (..)+ , UnusedImportReason (..)+ , UnusedImportName (..)+ , NestedForallsContextsIn(..)+ , UnusedNameProv(..)+ , NonCanonicalDefinition(..)+ , NonCanonical_Monoid(..)+ , NonCanonical_Monad(..)++ -- * Errors for hs-boot and signature files+ , BadBootDecls(..)+ , MissingBootThing(..), missingBootThing+ , BootMismatch(..)+ , BootMismatchWhat(..)+ , BootTyConMismatch(..)+ , BootAxiomBranchMismatch(..)+ , BootClassMismatch(..)+ , BootMethodMismatch(..)+ , BootATMismatch(..)+ , BootDataMismatch(..)+ , BootDataConMismatch(..)+ , SynAbstractDataError(..)+ , BootListMismatch(..), BootListMismatches++ -- * Class and family instance errors+ , IllegalInstanceReason(..)+ , IllegalClassInstanceReason(..)+ , IllegalInstanceHeadReason(..)+ , IllegalHasFieldInstance(..)+ , CoverageProblem(..), FailedCoverageCondition(..)+ , IllegalFamilyInstanceReason(..)+ , InvalidAssoc(..), InvalidAssocInstance(..)+ , InvalidAssocDefault(..), AssocDefaultBadArgs(..)++ -- * Template Haskell errors+ , THError(..), THSyntaxError(..), THNameError(..)+ , THReifyError(..), TypedTHError(..)+ , SpliceFailReason(..), RunSpliceFailReason(..)+ , AddTopDeclsError(..)+ , ConversionFailReason(..)+ , UnrepresentableTypeDescr(..)+ , LookupTHInstNameErrReason(..)+ , SplicePhase(..)+ , THDeclDescriptor(..)+ , ThingBeingConverted(..)+ , IllegalDecls(..)++ -- * Zonker errors+ , ZonkerMessage(..)++ -- FFI Errors+ , IllegalForeignTypeReason(..)+ , TypeCannotBeMarshaledReason(..)+ ) where++import GHC.Prelude++import GHC.Hs+import GHC.Tc.Errors.Types.PromotionErr+import GHC.Tc.Errors.Hole.FitTypes (HoleFit)+import GHC.Tc.Types.Constraint+import GHC.Tc.Types.Evidence (EvBindsVar)+import GHC.Tc.Types.Origin ( CtOrigin (ProvCtxtOrigin), SkolemInfoAnon (SigSkol)+ , UserTypeCtxt (PatSynCtxt), TyVarBndrs, TypedThing+ , FixedRuntimeRepOrigin(..), InstanceWhat )+import GHC.Tc.Types.Rank (Rank)+import GHC.Tc.Utils.TcType (TcType, TcSigmaType, TcPredType,+ PatersonCondFailure, PatersonCondFailureContext)+import GHC.Types.Basic+import GHC.Types.Error+import GHC.Types.Avail+import GHC.Types.Hint (UntickedPromotedThing(..))+import GHC.Types.ForeignCall (CLabelString)+import GHC.Types.Id.Info ( RecSelParent(..) )+import GHC.Types.Name (Name, OccName, getSrcLoc, getSrcSpan)+import qualified GHC.Types.Name.Occurrence as OccName+import GHC.Types.Name.Reader+import GHC.Types.SourceFile (HsBootOrSig(..))+import GHC.Types.SrcLoc+import GHC.Types.TyThing (TyThing)+import GHC.Types.Var (Id, TyCoVar, TyVar, TcTyVar, CoVar, Specificity)+import GHC.Types.Var.Env (TidyEnv)+import GHC.Types.Var.Set (TyVarSet, VarSet)+import GHC.Unit.Types (Module)+import GHC.Utils.Outputable+import GHC.Core.Class (Class, ClassMinimalDef, ClassOpItem, ClassATItem)+import GHC.Core.Coercion (Coercion)+import GHC.Core.Coercion.Axiom (CoAxBranch)+import GHC.Core.ConLike (ConLike)+import GHC.Core.DataCon (DataCon, FieldLabel)+import GHC.Core.FamInstEnv (FamInst)+import GHC.Core.InstEnv (LookupInstanceErrReason, ClsInst, DFunId)+import GHC.Core.PatSyn (PatSyn)+import GHC.Core.Predicate (EqRel, predTypeEqRel)+import GHC.Core.TyCon (TyCon, Role, FamTyConFlav, AlgTyConRhs)+import GHC.Core.Type (Kind, Type, ThetaType, PredType, ErrorMsgType, ForAllTyFlag)+import GHC.Driver.Backend (Backend)+import GHC.Unit.State (UnitState)+import GHC.Utils.Misc (filterOut)+import qualified GHC.LanguageExtensions as LangExt+import GHC.Data.FastString (FastString)+import GHC.Data.Pair+import GHC.Exception.Type (SomeException)++import Language.Haskell.Syntax.Basic (FieldLabelString(..))++import qualified Data.List.NonEmpty as NE+import Data.Typeable (Typeable)+import GHC.Unit.Module.Warnings (WarningCategory, WarningTxt)+import qualified Language.Haskell.TH.Syntax as TH++import GHC.Generics ( Generic )+import GHC.Types.Name.Env (NameEnv)+import GHC.Iface.Errors.Types+import GHC.Unit.Module.ModIface (ModIface)+import GHC.Tc.Types.TH+import GHC.Tc.Types.BasicTypes++++data TcRnMessageOpts = TcRnMessageOpts { tcOptsShowContext :: !Bool -- ^ Whether we show the error context or not+ , tcOptsIfaceOpts :: !IfaceMessageOpts+ }++{- Note [Migrating TcM Messages]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+As part of #18516, we are slowly migrating the diagnostic messages emitted+and reported in the TcM from SDoc to TcRnMessage. Historically, GHC emitted+some diagnostics in 3 pieces, i.e. there were lots of error-reporting functions+that accepted 3 SDocs an input: one for the important part of the message,+one for the context and one for any supplementary information. Consider the following:++ • Couldn't match expected type ‘Int’ with actual type ‘Char’+ • In the expression: x4+ In a stmt of a 'do' block: return (x2, x4)+ In the expression:++Under the hood, the reporting functions in Tc.Utils.Monad were emitting "Couldn't match"+as the important part, "In the expression" as the context and "In a stmt..In the expression"+as the supplementary, with the context and supplementary usually smashed together so that+the final message would be composed only by two SDoc (which would then be bulleted like in+the example).++In order for us to smooth out the migration to the new diagnostic infrastructure, we+introduce the 'ErrInfo' and 'TcRnMessageDetailed' types, which serve exactly the purpose+of bridging the two worlds together without breaking the external API or the existing+format of messages reported by GHC.++Using 'ErrInfo' and 'TcRnMessageDetailed' also allows us to move away from the SDoc-ridden+diagnostic API inside Tc.Utils.Monad, enabling further refactorings.++In the future, once the conversion will be complete and we will successfully eradicate+any use of SDoc in the diagnostic reporting of GHC, we can surely revisit the usage and+existence of these two types, which for now remain a "necessary evil".+-}++-- The majority of TcRn messages come with extra context about the error,+-- and this newtype captures it. See Note [Migrating TcM Messages].+data ErrInfo = ErrInfo {+ errInfoContext :: !SDoc+ -- ^ Extra context associated to the error.+ , errInfoSupplementary :: !SDoc+ -- ^ Extra supplementary info associated to the error.+ }++-- | 'TcRnMessageDetailed' is an \"internal\" type (used only inside+-- 'GHC.Tc.Utils.Monad' that wraps a 'TcRnMessage' while also providing+-- any extra info needed to correctly pretty-print this diagnostic later on.+data TcRnMessageDetailed+ = TcRnMessageDetailed !ErrInfo+ -- ^ Extra info associated with the message+ !TcRnMessage+ deriving Generic++mkTcRnUnknownMessage :: (Diagnostic a, Typeable a, DiagnosticOpts a ~ NoDiagnosticOpts)+ => a -> TcRnMessage+mkTcRnUnknownMessage diag = TcRnUnknownMessage (mkSimpleUnknownDiagnostic diag)+ -- Please don't use this function inside the GHC codebase;+ -- it mainly exists for users of the GHC API, such as plugins.+ --+ -- If you need to emit a new error message in the typechecker,+ -- you should add a new constructor to 'TcRnMessage' instead.++-- | An error which might arise during typechecking/renaming.+data TcRnMessage where+ {-| Simply wraps an unknown 'Diagnostic' message @a@. It can be used by plugins+ to provide custom diagnostic messages originated during typechecking/renaming.+ -}+ TcRnUnknownMessage :: (UnknownDiagnostic (DiagnosticOpts TcRnMessage)) -> TcRnMessage++ {-| Wrap an 'IfaceMessage' to a 'TcRnMessage' for when we attempt to load interface+ files during typechecking but encounter an error. -}++ TcRnInterfaceError :: !IfaceMessage -> TcRnMessage++ {-| TcRnMessageWithInfo is a constructor which is used when extra information is needed+ to be provided in order to qualify a diagnostic and where it was originated (and why).+ It carries an extra 'UnitState' which can be used to pretty-print some names+ and it wraps a 'TcRnMessageDetailed', which includes any extra context associated+ with this diagnostic.+ -}+ TcRnMessageWithInfo :: !UnitState+ -- ^ The 'UnitState' will allow us to pretty-print+ -- some diagnostics with more detail.+ -> !TcRnMessageDetailed+ -> TcRnMessage++ {-| TcRnWithHsDocContext annotates an error message with the context in which+ it originated.+ -}+ TcRnWithHsDocContext :: !HsDocContext+ -> !TcRnMessage+ -> TcRnMessage++ {-| TcRnSolverReport is the constructor used to report unsolved constraints+ after constraint solving, as well as other errors such as hole fit errors.++ See the documentation of t'TcSolverReportMsg' datatype for an overview+ of the different errors.+ -}+ TcRnSolverReport :: SolverReportWithCtxt+ -> DiagnosticReason+ -> [GhcHint]+ -> TcRnMessage+ -- TODO: split up TcRnSolverReport into several components,+ -- so that we can compute the reason and hints, as opposed+ -- to having to pass them here.++ {-| TcRnSolverDepthError is an error that occurs when the constraint solver+ exceeds the maximum recursion depth.++ Example:++ class C a where { meth :: a }+ instance Cls [a] => Cls a where { meth = head . meth }++ t :: ()+ t = meth++ Test cases:+ T7788+ T8550+ T9554+ T15316A+ T17267{∅,a,b,c,e}+ T17458+ ContextStack1+ T22924b+ TcCoercibleFail+ -}+ TcRnSolverDepthError :: !Type -> !SubGoalDepth -> TcRnMessage++ {-| TcRnRedundantConstraints is a warning that is emitted when a binding+ has a user-written type signature which contains superfluous constraints.++ Example:++ f :: (Eq a, Ord a) => a -> a -> a+ f x y = (x < y) || x == y+ -- `Eq a` is superfluous: the `Ord a` constraint suffices.++ Test cases: T9939, T10632, T18036a, T20602, PluralS, T19296.+ -}+ TcRnRedundantConstraints :: [Id]+ -> (SkolemInfoAnon, Bool)+ -- ^ The contextual skolem info.+ -- The boolean controls whether we+ -- want to show it in the user message.+ -- (Nice to keep track of the info in either case,+ -- for other users of the GHC API.)+ -> TcRnMessage++ {-| TcRnInaccessibleCode is a warning that is emitted when the RHS of a pattern+ match is inaccessible, because the constraint solver has detected a contradiction.++ Example:++ data B a where { MkTrue :: B True; MkFalse :: B False }++ foo :: B False -> Bool+ foo MkFalse = False+ foo MkTrue = True -- Inaccessible: requires True ~ False++ Test cases: T7293, T7294, T15558, T17646, T18572, T18610, tcfail167.+ -}+ TcRnInaccessibleCode :: Implication -- ^ The implication containing a contradiction.+ -> SolverReportWithCtxt -- ^ The contradiction.+ -> TcRnMessage+ {-| TcRnInaccessibleCoAxBranch is a warning that is emitted when a closed type family has a+ branch which is inaccessible due to a more general, prior branch.++ Example:+ type family F a where+ F a = Int+ F Bool = Bool+ Test cases: T9085, T14066a, T9085, T6018, tc265,++ -}+ TcRnInaccessibleCoAxBranch :: TyCon -- ^ The type family's constructor+ -> CoAxBranch -- ^ The inaccessible branch+ -> TcRnMessage+ {-| A type which was expected to have a fixed runtime representation+ does not have a fixed runtime representation.++ Example:++ data D (a :: TYPE r) = MkD a++ Test cases: T11724, T18534,+ RepPolyPatSynArg, RepPolyPatSynUnliftedNewtype,+ RepPolyPatSynRes, T20423+ -}+ TcRnTypeDoesNotHaveFixedRuntimeRep :: !Type+ -> !FixedRuntimeRepProvenance+ -> !ErrInfo -- Extra info accumulated in the TcM monad+ -> TcRnMessage++ {-| TcRnImplicitLift is a warning (controlled with -Wimplicit-lift) that occurs when+ a Template Haskell quote implicitly uses 'lift'.++ Example:+ warning1 :: Lift t => t -> Q Exp+ warning1 x = [| x |]++ Test cases: th/T17804+ -}+ TcRnImplicitLift :: Name -> !ErrInfo -> TcRnMessage++ {-| TcRnUnusedPatternBinds is a warning (controlled with -Wunused-pattern-binds)+ that occurs if a pattern binding binds no variables at all, unless it is a+ lone wild-card pattern, or a banged pattern.++ Example:+ Just _ = rhs3 -- Warning: unused pattern binding+ (_, _) = rhs4 -- Warning: unused pattern binding+ _ = rhs3 -- No warning: lone wild-card pattern+ !() = rhs4 -- No warning: banged pattern; behaves like seq++ Test cases: rename/{T13646,T17c,T17e,T7085}+ -}+ TcRnUnusedPatternBinds :: HsBind GhcRn -> TcRnMessage++ {-| TcRnUnusedQuantifiedTypeVar is a warning that occurs if there are unused+ quantified type variables.++ Examples:+ f :: forall a. Int -> Char++ Test cases: rename/should_compile/ExplicitForAllRules1+ rename/should_compile/T5331+ -}+ TcRnUnusedQuantifiedTypeVar+ :: HsDocContext+ -> HsTyVarBndrExistentialFlag -- ^ tyVar binder.+ -> TcRnMessage++ {-| TcRnDodgyImports is a group of warnings (controlled with -Wdodgy-imports).++ See 'DodgyImportsReason' for the different warnings.+ -}+ TcRnDodgyImports :: !DodgyImportsReason -> TcRnMessage+ {-| TcRnDodgyExports is a warning (controlled by -Wdodgy-exports) that occurs when+ an export of the form 'T(..)' for a type constructor 'T' does not actually export anything+ beside 'T' itself.++ Example:+ module Foo (+ T(..) -- Warning: T is a type synonym+ , A(..) -- Warning: A is a type family+ , C(..) -- Warning: C is a data family+ ) where++ type T = Int+ type family A :: * -> *+ data family C :: * -> *++ Test cases: warnings/should_compile/DodgyExports01+ -}+ TcRnDodgyExports :: GlobalRdrElt -> TcRnMessage+ {-| TcRnMissingImportList is a warning (controlled by -Wmissing-import-lists) that occurs when+ an import declaration does not explicitly list all the names brought into scope.++ Test cases: rename/should_compile/T4489+ -}+ TcRnMissingImportList :: IE GhcPs -> TcRnMessage+ {-| When a module marked trustworthy or unsafe (using -XTrustworthy or -XUnsafe) is compiled+ with a plugin, the TcRnUnsafeDueToPlugin warning (controlled by -Wunsafe) is used as the+ reason the module was inferred to be unsafe. This warning is not raised if the+ -fplugin-trustworthy flag is passed.++ Test cases: plugins/T19926+ -}+ TcRnUnsafeDueToPlugin :: TcRnMessage+ {-| TcRnModMissingRealSrcSpan is an error that occurs when compiling a module that lacks+ an associated 'RealSrcSpan'.++ Test cases: None+ -}+ TcRnModMissingRealSrcSpan :: Module -> TcRnMessage+ {-| TcRnIdNotExportedFromModuleSig is an error pertaining to backpack that occurs+ when an identifier required by a signature is not exported by the module+ or signature that is being used as a substitution for that signature.++ Example(s): None++ Test cases: backpack/should_fail/bkpfail36+ -}+ TcRnIdNotExportedFromModuleSig :: Name -> Module -> TcRnMessage+ {-| TcRnIdNotExportedFromLocalSig is an error pertaining to backpack that+ occurs when an identifier which is necessary for implementing a module+ signature is not exported from that signature.++ Example(s): None++ Test cases: backpack/should_fail/bkpfail30+ backpack/should_fail/bkpfail31+ backpack/should_fail/bkpfail34+ -}+ TcRnIdNotExportedFromLocalSig :: Name -> TcRnMessage++ {-| TcRnShadowedName is a warning (controlled by -Wname-shadowing) that occurs whenever+ an inner-scope value has the same name as an outer-scope value, i.e. the inner+ value shadows the outer one. This can catch typographical errors that turn into+ hard-to-find bugs. The warning is suppressed for names beginning with an underscore.++ Examples(s):+ f = ... let f = id in ... f ... -- NOT OK, 'f' is shadowed+ f x = do { _ignore <- this; _ignore <- that; return (the other) } -- suppressed via underscore++ Test cases: typecheck/should_compile/T10971a+ rename/should_compile/rn039+ rename/should_compile/rn064+ rename/should_compile/T1972+ rename/should_fail/T2723+ rename/should_compile/T3262+ driver/werror+ -}+ TcRnShadowedName :: OccName -> ShadowedNameProvenance -> TcRnMessage++ {-| TcRnInvalidWarningCategory is an error that occurs when a warning is declared+ with a category name that is not the special category "deprecations", and+ either does not begin with the prefix "x-" indicating a user-defined+ category, or contains characters not valid in category names. See Note+ [Warning categories] in GHC.Unit.Module.Warnings++ Examples(s):+ module M {-# WARNING in "invalid" "Oops" #-} where++ {-# WARNING in "x- spaces not allowed" foo "Oops" #-}++ Test cases: warnings/should_fail/WarningCategoryInvalid+ -}+ TcRnInvalidWarningCategory :: !WarningCategory -> TcRnMessage++ {-| TcRnDuplicateWarningDecls is an error that occurs whenever+ a warning is declared twice.++ Examples(s):+ {-# DEPRECATED foo "Don't use me" #-}+ {-# DEPRECATED foo "Don't use me" #-}+ foo :: Int+ foo = 2++ Test cases:+ rename/should_fail/rnfail058+ -}+ TcRnDuplicateWarningDecls :: !(LocatedN RdrName) -> !RdrName -> TcRnMessage++ {-| TcRnSimplifierTooManyIterations is an error that occurs whenever+ the constraint solver in the simplifier hits the iterations' limit.++ Examples(s):+ None.++ Test cases:+ None.+ -}+ TcRnSimplifierTooManyIterations :: Cts+ -> !IntWithInf+ -- ^ The limit.+ -> WantedConstraints+ -> TcRnMessage++ {-| TcRnIllegalPatSynDecl is an error that occurs whenever+ there is an illegal pattern synonym declaration.++ Examples(s):++ varWithLocalPatSyn x = case x of+ P -> ()+ where+ pattern P = () -- not valid, it can't be local, it must be defined at top-level.++ Test cases: patsyn/should_fail/local+ -}+ TcRnIllegalPatSynDecl :: !(LIdP GhcPs) -> TcRnMessage++ {-| TcRnLinearPatSyn is an error that occurs whenever a pattern+ synonym signature uses a field that is not unrestricted.++ Example(s): None++ Test cases: linear/should_fail/LinearPatSyn2+ -}+ TcRnLinearPatSyn :: !Type -> TcRnMessage++ {-| TcRnEmptyRecordUpdate is an error that occurs whenever+ a record is updated without specifying any field.++ Examples(s):++ $(deriveJSON defaultOptions{} ''Bad) -- not ok, no fields selected for update of defaultOptions++ Test cases: th/T12788+ -}+ TcRnEmptyRecordUpdate :: TcRnMessage++ {-| TcRnIllegalFieldPunning is an error that occurs whenever+ field punning is used without the 'NamedFieldPuns' extension enabled.++ Examples(s):++ data Foo = Foo { a :: Int }++ foo :: Foo -> Int+ foo Foo{a} = a -- Not ok, punning used without extension.++ Test cases: parser/should_fail/RecordDotSyntaxFail12+ -}+ TcRnIllegalFieldPunning :: !(Located RdrName) -> TcRnMessage++ {-| TcRnIllegalWildcardsInRecord is an error that occurs whenever+ wildcards (..) are used in a record without the relevant+ extension being enabled.++ Examples(s):++ data Foo = Foo { a :: Int }++ foo :: Foo -> Int+ foo Foo{..} = a -- Not ok, wildcards used without extension.++ Test cases: parser/should_fail/RecordWildCardsFail+ -}+ TcRnIllegalWildcardsInRecord :: !RecordFieldPart -> TcRnMessage++ {-| TcRnIllegalWildcardInType is an error that occurs+ when a wildcard appears in a type in a location in which+ wildcards aren't allowed.++ Examples:++ Type synonyms:++ type T = _++ Class declarations and instances:++ class C _+ instance C _++ Standalone kind signatures:++ type D :: _+ data D++ Test cases:+ ExtraConstraintsWildcardInTypeSplice2+ ExtraConstraintsWildcardInTypeSpliceUsed+ ExtraConstraintsWildcardNotLast+ ExtraConstraintsWildcardTwice+ NestedExtraConstraintsWildcard+ NestedNamedExtraConstraintsWildcard+ PartialClassMethodSignature+ PartialClassMethodSignature2+ T12039+ T13324_fail1+ UnnamedConstraintWildcard1+ UnnamedConstraintWildcard2+ WildcardInADT1+ WildcardInADT2+ WildcardInADT3+ WildcardInADTContext1+ WildcardInDefault+ WildcardInDefaultSignature+ WildcardInDeriving+ WildcardInForeignExport+ WildcardInForeignImport+ WildcardInGADT1+ WildcardInGADT2+ WildcardInInstanceHead+ WildcardInInstanceSig+ WildcardInNewtype+ WildcardInPatSynSig+ WildcardInStandaloneDeriving+ WildcardInTypeFamilyInstanceRHS+ WildcardInTypeSynonymRHS+ saks_fail003+ T15433a+ -}+ TcRnIllegalWildcardInType+ :: Maybe Name+ -- ^ the wildcard name, or 'Nothing' for an anonymous wildcard+ -> !BadAnonWildcardContext+ -> TcRnMessage++ {-| TcRnDuplicateFieldName is an error that occurs whenever+ there are duplicate field names in a single record.++ Examples(s):++ data R = MkR { x :: Int, x :: Bool }+ f r = r { x = 3, x = 4 }++ Test cases: T21959.+ -}+ TcRnDuplicateFieldName :: !RecordFieldPart -> NE.NonEmpty RdrName -> TcRnMessage++ {-| TcRnIllegalViewPattern is an error that occurs whenever+ the ViewPatterns syntax is used but the ViewPatterns language extension+ is not enabled.++ Examples(s):+ data Foo = Foo { a :: Int }++ foo :: Foo -> Int+ foo (a -> l) = l -- not OK, the 'ViewPattern' extension is not enabled.++ Test cases: parser/should_fail/ViewPatternsFail+ -}+ TcRnIllegalViewPattern :: !(Pat GhcPs) -> TcRnMessage++ {-| TcRnCharLiteralOutOfRange is an error that occurs whenever+ a character is out of range.++ Examples(s): None++ Test cases: None+ -}+ TcRnCharLiteralOutOfRange :: !Char -> TcRnMessage++ {-| TcRnNegativeNumTypeLiteral is an error that occurs whenever+ a type-level number literal is negative.++ type Neg = -1++ Test cases: th/T8412+ typecheck/should_fail/T8306+ -}+ TcRnNegativeNumTypeLiteral :: HsType GhcPs -> TcRnMessage++ {-| TcRnIllegalWildcardsInConstructor is an error that occurs whenever+ the record wildcards '..' are used inside a constructor without labeled fields.++ Examples(s): None++ Test cases:+ rename/should_fail/T9815.hs+ rename/should_fail/T9815b.hs+ rename/should_fail/T9815ghci.hs+ rename/should_fail/T9815bghci.hs+ -}+ TcRnIllegalWildcardsInConstructor :: !Name -> TcRnMessage++ {-| TcRnIgnoringAnnotations is a warning that occurs when the source code+ contains annotation pragmas but the platform in use does not support an+ external interpreter such as GHCi and therefore the annotations are ignored.++ Example(s): None++ Test cases: None+ -}+ TcRnIgnoringAnnotations :: [LAnnDecl GhcRn] -> TcRnMessage++ {-| TcRnAnnotationInSafeHaskell is an error that occurs if annotation pragmas+ are used in conjunction with Safe Haskell.++ Example(s): None++ Test cases: annotations/should_fail/T10826+ -}+ TcRnAnnotationInSafeHaskell :: TcRnMessage++ {-| TcRnInvalidTypeApplication is an error that occurs when a visible type application+ is used with an expression that does not accept "specified" type arguments.++ Example(s):+ foo :: forall {a}. a -> a+ foo x = x+ bar :: ()+ bar = let x = foo @Int 42+ in ()++ Test cases: overloadedrecflds/should_fail/overloadedlabelsfail03+ typecheck/should_fail/ExplicitSpecificity1+ typecheck/should_fail/ExplicitSpecificity10+ typecheck/should_fail/ExplicitSpecificity2+ typecheck/should_fail/T17173+ typecheck/should_fail/VtaFail+ -}+ TcRnInvalidTypeApplication :: Type -> LHsWcType GhcRn -> TcRnMessage++ {-| TcRnTagToEnumMissingValArg is an error that occurs when the 'tagToEnum#'+ function is not applied to a single value argument.++ Example(s):+ tagToEnum# 1 2++ Test cases: None+ -}+ TcRnTagToEnumMissingValArg :: TcRnMessage++ {-| TcRnTagToEnumUnspecifiedResTy is an error that occurs when the 'tagToEnum#'+ function is not given a concrete result type.++ Example(s):+ foo :: forall a. a+ foo = tagToEnum# 0#++ Test cases: typecheck/should_fail/tcfail164+ -}+ TcRnTagToEnumUnspecifiedResTy :: Type -> TcRnMessage++ {-| TcRnTagToEnumResTyNotAnEnum is an error that occurs when the 'tagToEnum#'+ function is given a result type that is not an enumeration type.++ Example(s):+ foo :: Int -- not an enumeration TyCon+ foo = tagToEnum# 0#++ Test cases: typecheck/should_fail/tcfail164+ -}+ TcRnTagToEnumResTyNotAnEnum :: Type -> TcRnMessage++ {-| TcRnTagToEnumResTyTypeData is an error that occurs when the 'tagToEnum#'+ function is given a result type that is headed by a @type data@ type, as+ the data constructors of a @type data@ do not exist at the term level.++ Example(s):+ type data Letter = A | B | C++ foo :: Letter+ foo = tagToEnum# 0#++ Test cases: type-data/should_fail/TDTagToEnum.hs+ -}+ TcRnTagToEnumResTyTypeData :: Type -> TcRnMessage++ {-| TcRnArrowIfThenElsePredDependsOnResultTy is an error that occurs when the+ predicate type of an ifThenElse expression in arrow notation depends on+ the type of the result.++ Example(s): None++ Test cases: None+ -}+ TcRnArrowIfThenElsePredDependsOnResultTy :: TcRnMessage++ {-| TcRnIllegalHsBootOrSigDecl is an error that occurs when an hs-boot file+ contains declarations that are not allowed, such as bindings.++ Examples:++ -- A.hs-boot+ f :: Int -> Int+ f x = 2 * x -- binding not allowed++ -- B.hs-boot+ type family F a where { F Int = Bool }+ -- type family equations not allowed++ -- C.hsig+ bar :: Int -> Int+ {-# RULES forall x. bar x = x #-} -- RULES not allowed+++ Test cases:++ - bindings: T19781+ - class instance body: none+ - type family instance: HsBootFam+ - splice: none+ - foreign declaration: none+ - default declaration: none+ - RULEs: none+ -}+ TcRnIllegalHsBootOrSigDecl :: !HsBootOrSig -> !BadBootDecls -> TcRnMessage++ {-| TcRnBootMismatch is a family of errors that occur when there is a+ mismatch between the hs-boot and hs files.++ Examples:++ -- A.hs-boot+ foo :: Int -> Bool+ data D = MkD++ -- A.hs+ foo :: Int -> Char+ foo = chr++ data D = MkD Int++ Test cases:++ - missing export: bkpcabal06, bkpfail{01,05,09,16,35}, rnfail{047,055}+ - missing definition: none+ - missing instance: T14075+ - mismatch in exports: bkpfail{03,19}+ - conflicting definitions: bkpcabal02,+ bkpfail{04,06,07,10,12,133,14,15,17,22,23,25,26,27,41,42,45,47,50,52,53,54},+ T19244{a,b}, T23344, ClosedFam3, rnfail055+ -}+ TcRnBootMismatch :: !HsBootOrSig -> !BootMismatch -> TcRnMessage++ {-| TcRnRecursivePatternSynonym is an error that occurs when a pattern synonym+ is defined in terms of itself, either directly or indirectly.++ Example(s):+ pattern A = B+ pattern B = A++ Test cases: patsyn/should_fail/T16900+ -}+ TcRnRecursivePatternSynonym :: LHsBinds GhcRn -> TcRnMessage++ {-| TcRnPartialTypeSigTyVarMismatch is an error that occurs when a partial type signature+ attempts to unify two different types.++ Example(s):+ f :: a -> b -> _+ f x y = [x, y]++ Test cases: partial-sigs/should_fail/T14449+ -}+ TcRnPartialTypeSigTyVarMismatch+ :: Name -- ^ first type variable+ -> Name -- ^ second type variable+ -> Name -- ^ function name+ -> LHsSigWcType GhcRn -> TcRnMessage++ {-| TcRnPartialTypeSigBadQuantifier is an error that occurs when a type variable+ being quantified over in the partial type signature of a function gets unified+ with a type that is free in that function's context.++ Example(s):+ foo :: Num a => a -> a+ foo xxx = g xxx+ where+ g :: forall b. Num b => _ -> b+ g y = xxx + y++ Test cases: partial-sig/should_fail/T14479+ -}+ TcRnPartialTypeSigBadQuantifier+ :: Name -- ^ user-written name of type variable being quantified+ -> Name -- ^ function name+ -> Maybe Type -- ^ type the variable unified with, if known+ -> LHsSigWcType GhcRn -- ^ partial type signature+ -> TcRnMessage++ {-| TcRnMissingSignature is a warning that occurs when a top-level binding+ or a pattern synonym does not have a type signature.++ Controlled by the flags:+ -Wmissing-signatures+ -Wmissing-exported-signatures+ -Wmissing-pattern-synonym-signatures+ -Wmissing-exported-pattern-synonym-signatures+ -Wmissing-kind-signatures+ -Wmissing-poly-kind-signatures++ Test cases:+ T11077 (top-level bindings)+ T12484 (pattern synonyms)+ T19564 (kind signatures)+ -}+ TcRnMissingSignature :: MissingSignature+ -> Exported+ -> TcRnMessage++ {-| TcRnPolymorphicBinderMissingSig is a warning controlled by -Wmissing-local-signatures+ that occurs when a local polymorphic binding lacks a type signature.++ Example(s):+ id a = a++ Test cases: warnings/should_compile/T12574+ -}+ TcRnPolymorphicBinderMissingSig :: Name -> Type -> TcRnMessage++ {-| TcRnOverloadedSig is an error that occurs when a binding group conflicts+ with the monomorphism restriction.++ Example(s):+ data T a = T a+ mono = ... where+ x :: Applicative f => f a+ T x = ...++ Test cases: typecheck/should_compile/T11339+ -}+ TcRnOverloadedSig :: TcIdSigInfo -> TcRnMessage++ {-| TcRnTupleConstraintInst is an error that occurs whenever an instance+ for a tuple constraint is specified.++ Examples(s):+ class C m a+ class D m a+ f :: (forall a. Eq a => (C m a, D m a)) => m a+ f = undefined++ Test cases: quantified-constraints/T15334+ -}+ TcRnTupleConstraintInst :: !Class -> TcRnMessage++ {-| TcRnUserTypeError is an error that occurs due to a user's custom type error,+ which can be triggered by adding a `TypeError` constraint in a type signature+ or typeclass instance.++ Examples(s):+ f :: TypeError (Text "This is a type error")+ f = undefined++ Test cases: typecheck/should_fail/CustomTypeErrors02+ typecheck/should_fail/CustomTypeErrors03+ -}+ TcRnUserTypeError :: !Type -> TcRnMessage++ {-| TcRnConstraintInKind is an error that occurs whenever a constraint is specified+ in a kind.++ Examples(s):+ data Q :: Eq a => Type where {}++ Test cases: dependent/should_fail/T13895+ polykinds/T16263+ saks/should_fail/saks_fail004+ typecheck/should_fail/T16059a+ typecheck/should_fail/T18714+ -}+ TcRnConstraintInKind :: !Type -> TcRnMessage++ {-| TcRnUnboxedTupleTypeFuncArg is an error that occurs whenever an unboxed tuple+ or unboxed sum type is specified as a function argument, when the appropriate+ extension (`-XUnboxedTuples` or `-XUnboxedSums`) isn't enabled.++ Examples(s):+ -- T15073.hs+ import T15073a+ newtype Foo a = MkFoo a+ deriving P++ -- T15073a.hs+ class P a where+ p :: a -> (# a #)++ Test cases: deriving/should_fail/T15073.hs+ deriving/should_fail/T15073a.hs+ typecheck/should_fail/T16059d+ -}+ TcRnUnboxedTupleOrSumTypeFuncArg+ :: UnboxedTupleOrSum -- ^ whether this is an unboxed tuple or an unboxed sum+ -> !Type+ -> TcRnMessage++ {-| TcRnLinearFuncInKind is an error that occurs whenever a linear function is+ specified in a kind.++ Examples(s):+ data A :: * %1 -> *++ Test cases: linear/should_fail/LinearKind+ linear/should_fail/LinearKind2+ linear/should_fail/LinearKind3+ -}+ TcRnLinearFuncInKind :: !Type -> TcRnMessage++ {-| TcRnForAllEscapeError is an error that occurs whenever a quantified type's kind+ mentions quantified type variable.++ Examples(s):+ type T :: TYPE (BoxedRep l)+ data T = MkT++ Test cases: unlifted-datatypes/should_fail/UnlDataNullaryPoly+ -}+ TcRnForAllEscapeError :: !Type -> !Kind -> TcRnMessage++ {-| TcRnVDQInTermType is an error that occurs whenever a visible dependent quantification+ is specified in the type of a term.++ Examples(s):+ a = (undefined :: forall k -> k -> Type) @Int++ Test cases: dependent/should_fail/T15859+ dependent/should_fail/T16326_Fail1+ dependent/should_fail/T16326_Fail2+ dependent/should_fail/T16326_Fail3+ dependent/should_fail/T16326_Fail4+ dependent/should_fail/T16326_Fail5+ dependent/should_fail/T16326_Fail6+ dependent/should_fail/T16326_Fail7+ dependent/should_fail/T16326_Fail8+ dependent/should_fail/T16326_Fail9+ dependent/should_fail/T16326_Fail10+ dependent/should_fail/T16326_Fail11+ dependent/should_fail/T16326_Fail12+ dependent/should_fail/T17687+ dependent/should_fail/T18271+ -}+ TcRnVDQInTermType :: !(Maybe Type) -> TcRnMessage++ {-| TcRnBadQuantPredHead is an error that occurs whenever a quantified predicate+ lacks a class or type variable head.++ Examples(s):+ class (forall a. A t a => A t [a]) => B t where+ type A t a :: Constraint++ Test cases: quantified-constraints/T16474+ -}+ TcRnBadQuantPredHead :: !Type -> TcRnMessage++ {-| TcRnIllegalTupleConstraint is an error that occurs whenever an illegal tuple+ constraint is specified.++ Examples(s):+ g :: ((Show a, Num a), Eq a) => a -> a+ g = undefined++ Test cases: typecheck/should_fail/tcfail209a+ -}+ TcRnIllegalTupleConstraint :: !Type -> TcRnMessage++ {-| TcRnNonTypeVarArgInConstraint is an error that occurs whenever a non type-variable+ argument is specified in a constraint.++ Examples(s):+ data T+ instance Eq Int => Eq T++ Test cases: ghci/scripts/T13202+ ghci/scripts/T13202a+ polykinds/T12055a+ typecheck/should_fail/T10351+ typecheck/should_fail/T19187+ typecheck/should_fail/T6022+ typecheck/should_fail/T8883+ -}+ TcRnNonTypeVarArgInConstraint :: !Type -> TcRnMessage++ {-| TcRnIllegalImplicitParam is an error that occurs whenever an illegal implicit+ parameter is specified.++ Examples(s):+ type Bla = ?x::Int+ data T = T+ instance Bla => Eq T++ Test cases: polykinds/T11466+ typecheck/should_fail/T8912+ typecheck/should_fail/tcfail041+ typecheck/should_fail/tcfail211+ typecheck/should_fail/tcrun045+ -}+ TcRnIllegalImplicitParam :: !Type -> TcRnMessage++ {-| TcRnIllegalConstraintSynonymOfKind is an error that occurs whenever an illegal constraint+ synonym of kind is specified.++ Examples(s):+ type Showish = Show+ f :: (Showish a) => a -> a+ f = undefined++ Test cases: typecheck/should_fail/tcfail209+ -}+ TcRnIllegalConstraintSynonymOfKind :: !Type -> TcRnMessage++ {-| TcRnOversaturatedVisibleKindArg is an error that occurs whenever an illegal oversaturated+ visible kind argument is specified.++ Examples(s):+ type family+ F2 :: forall (a :: Type). Type where+ F2 @a = Maybe a++ Test cases: typecheck/should_fail/T15793+ typecheck/should_fail/T16255+ -}+ TcRnOversaturatedVisibleKindArg :: !Type -> TcRnMessage++ {-| TcRnForAllRankErr is an error that occurs whenever an illegal ranked type+ is specified.++ Examples(s):+ foo :: (a,b) -> (a~b => t) -> (a,b)+ foo p x = p++ Test cases:+ - ghci/should_run/T15806+ - indexed-types/should_fail/SimpleFail15+ - typecheck/should_fail/T11355+ - typecheck/should_fail/T12083a+ - typecheck/should_fail/T12083b+ - typecheck/should_fail/T16059c+ - typecheck/should_fail/T16059e+ - typecheck/should_fail/T17213+ - typecheck/should_fail/T18939_Fail+ - typecheck/should_fail/T2538+ - typecheck/should_fail/T5957+ - typecheck/should_fail/T7019+ - typecheck/should_fail/T7019a+ - typecheck/should_fail/T7809+ - typecheck/should_fail/T9196+ - typecheck/should_fail/tcfail127+ - typecheck/should_fail/tcfail184+ - typecheck/should_fail/tcfail196+ - typecheck/should_fail/tcfail197+ -}+ TcRnForAllRankErr :: !Rank -> !Type -> TcRnMessage++ {-| TcRnSimplifiableConstraint is a warning triggered by the occurrence of+ a simplifiable constraint in a context, when MonoLocalBinds is not enabled.++ Examples(s):+ simplifiableEq :: Eq (a, a) => a -> a -> Bool+ simplifiableEq = undefined++ Test cases:+ - indexed-types/should_compile/T15322+ - partial-sigs/should_compile/SomethingShowable+ - typecheck/should_compile/T13526+ -}+ TcRnSimplifiableConstraint :: !PredType -> !InstanceWhat -> TcRnMessage++ {-| TcRnArityMismatch is an error that occurs when a type constructor is supplied with+ fewer arguments than required.++ Examples(s):+ f Left = undefined++ Test cases:+ - backpack/should_fail/bkpfail25.bkp+ - ghci/should_fail/T16013+ - ghci/should_fail/T16287+ - indexed-types/should_fail/BadSock+ - indexed-types/should_fail/T9433+ - module/mod60+ - ndexed-types/should_fail/T2157+ - parser/should_fail/ParserNoBinaryLiterals2+ - parser/should_fail/ParserNoBinaryLiterals3+ - patsyn/should_fail/T12819+ - polykinds/T10516+ - typecheck/should_fail/T12124+ - typecheck/should_fail/T15954+ - typecheck/should_fail/T16874+ - typecheck/should_fail/tcfail100+ - typecheck/should_fail/tcfail101+ - typecheck/should_fail/tcfail107+ - typecheck/should_fail/tcfail129+ - typecheck/should_fail/tcfail187+ -}+ TcRnArityMismatch :: !TyThing+ -> !Arity -- ^ expected arity+ -> !Arity -- ^ actual arity+ -> TcRnMessage++ {-| TcRnIllegalClassInstance is a collection of diagnostics that arise+ from an invalid class or family instance declaration.++ See t'IllegalInstanceReason'.+ -}+ TcRnIllegalInstance :: IllegalInstanceReason -> TcRnMessage++ {-| TcRnMonomorphicBindings is a warning (controlled by -Wmonomorphism-restriction)+ that arises when the monomorphism restriction applies to the given bindings.++ Examples(s):+ {-# OPTIONS_GHC -Wmonomorphism-restriction #-}++ bar = 10++ foo :: Int+ foo = bar++ main :: IO ()+ main = print foo++ The example above emits the warning (for 'bar'), because without monomorphism+ restriction the inferred type for 'bar' is 'bar :: Num p => p'. This warning tells us+ that /if/ we were to enable '-XMonomorphismRestriction' we would make 'bar'+ less polymorphic, as its type would become 'bar :: Int', so GHC warns us about that.++ Test cases: typecheck/should_compile/T13785+ -}+ TcRnMonomorphicBindings :: [Name] -> TcRnMessage++ {-| TcRnOrphanInstance is a warning (controlled by -Worphans) that arises when+ a typeclass instance or family instance is an \"orphan\", i.e. if it+ appears in a module in which neither the class/family nor the type being+ instanced are declared in the same module.++ Examples(s): None++ Test cases: warnings/should_compile/T9178+ typecheck/should_compile/T4912+ -}+ TcRnOrphanInstance :: Either ClsInst FamInst -> TcRnMessage++ {-| TcRnFunDepConflict is an error that occurs when there are functional dependencies+ conflicts between instance declarations.++ Examples(s): None++ Test cases: typecheck/should_fail/T2307+ typecheck/should_fail/tcfail096+ typecheck/should_fail/tcfail202+ -}+ TcRnFunDepConflict :: !UnitState -> NE.NonEmpty ClsInst -> TcRnMessage++ {-| TcRnDupInstanceDecls is an error that occurs when there are duplicate instance+ declarations.++ Examples(s):+ class Foo a where+ foo :: a -> Int++ instance Foo Int where+ foo = id++ instance Foo Int where+ foo = const 42++ Test cases: cabal/T12733/T12733+ typecheck/should_fail/tcfail035+ typecheck/should_fail/tcfail023+ backpack/should_fail/bkpfail18+ typecheck/should_fail/TcNullaryTCFail+ typecheck/should_fail/tcfail036+ typecheck/should_fail/tcfail073+ module/mod51+ module/mod52+ module/mod44+ -}+ TcRnDupInstanceDecls :: !UnitState -> NE.NonEmpty ClsInst -> TcRnMessage++ {-| TcRnConflictingFamInstDecls is an error that occurs when there are conflicting+ family instance declarations.++ Examples(s): None.++ Test cases: indexed-types/should_fail/ExplicitForAllFams4b+ indexed-types/should_fail/NoGood+ indexed-types/should_fail/Over+ indexed-types/should_fail/OverDirectThisMod+ indexed-types/should_fail/OverIndirectThisMod+ indexed-types/should_fail/SimpleFail11a+ indexed-types/should_fail/SimpleFail11b+ indexed-types/should_fail/SimpleFail11c+ indexed-types/should_fail/SimpleFail11d+ indexed-types/should_fail/SimpleFail2a+ indexed-types/should_fail/SimpleFail2b+ indexed-types/should_fail/T13092/T13092+ indexed-types/should_fail/T13092c/T13092c+ indexed-types/should_fail/T14179+ indexed-types/should_fail/T2334A+ indexed-types/should_fail/T2677+ indexed-types/should_fail/T3330b+ indexed-types/should_fail/T4246+ indexed-types/should_fail/T7102a+ indexed-types/should_fail/T9371+ polykinds/T7524+ typecheck/should_fail/UnliftedNewtypesOverlap+ -}+ TcRnConflictingFamInstDecls :: NE.NonEmpty FamInst -> TcRnMessage++ {-| TcRnFamInstNotInjective is a collection of errors that arise from+ a type family equation violating the injectivity annotation.++ See 'InjectivityErrReason'.+ -}+ TcRnFamInstNotInjective :: InjectivityErrReason -- ^ the violation+ -> TyCon -- ^ the family 'TyCon'+ -> NE.NonEmpty CoAxBranch -- ^ the family equations+ -> TcRnMessage++ {-| TcRnBangOnUnliftedType is a warning (controlled by -Wredundant-strictness-flags) that+ occurs when a strictness annotation is applied to an unlifted type.++ Example(s):+ data T = MkT !Int# -- Strictness flag has no effect on unlifted types++ Test cases: typecheck/should_compile/T20187a+ typecheck/should_compile/T20187b+ -}+ TcRnBangOnUnliftedType :: !Type -> TcRnMessage++ {-| TcRnLazyBangOnUnliftedType is a warning (controlled by -Wredundant-strictness-flags) that+ occurs when a lazy annotation is applied to an unlifted type.++ Example(s):+ data T = MkT ~Int# -- Lazy flag has no effect on unlifted types++ Test cases: typecheck/should_compile/T21951a+ typecheck/should_compile/T21951b+ -}+ TcRnLazyBangOnUnliftedType :: !Type -> TcRnMessage++ {-| TcRnMultipleDefaultDeclarations is an error that occurs when a module has+ more than one default declaration.++ Example:+ default (Integer, Int)+ default (Double, Float) -- 2nd default declaration not allowed++ Text cases: module/mod58+ -}+ TcRnMultipleDefaultDeclarations :: [LDefaultDecl GhcRn] -> TcRnMessage++ {-| TcRnBadDefaultType is an error that occurs when a type used in a default+ declaration does not have an instance for any of the applicable classes.++ Example(s):+ data Foo+ default (Foo)++ Test cases: typecheck/should_fail/T11974b+ -}+ TcRnBadDefaultType :: Type -> [Class] -> TcRnMessage++ {-| TcRnPatSynBundledWithNonDataCon is an error that occurs when a module's+ export list bundles a pattern synonym with a type that is not a proper+ `data` or `newtype` construction.++ Example(s):+ module Foo (MyClass(.., P)) where+ pattern P = Nothing+ class MyClass a where+ foo :: a -> Int++ Test cases: patsyn/should_fail/export-class+ -}+ TcRnPatSynBundledWithNonDataCon :: TcRnMessage++ {-| TcRnPatSynBundledWithWrongType is an error that occurs when the export list+ of a module has a pattern synonym bundled with a type that does not match+ the type of the pattern synonym.++ Example(s):+ module Foo (R(P,x)) where+ data Q = Q Int+ data R = R+ pattern P{x} = Q x++ Text cases: patsyn/should_fail/export-ps-rec-sel+ patsyn/should_fail/export-type-synonym+ patsyn/should_fail/export-type+ -}+ TcRnPatSynBundledWithWrongType :: Type -> Type -> TcRnMessage++ {-| TcRnDupeModuleExport is a warning controlled by @-Wduplicate-exports@ that+ occurs when a module appears more than once in an export list.++ Example(s):+ module Foo (module Bar, module Bar)+ import Bar++ Text cases: None+ -}+ TcRnDupeModuleExport :: ModuleName -> TcRnMessage++ {-| TcRnExportedModNotImported is an error that occurs when an export list+ contains a module that is not imported.++ Example(s): None++ Text cases: module/mod135+ module/mod8+ rename/should_fail/rnfail028+ backpack/should_fail/bkpfail48+ -}+ TcRnExportedModNotImported :: ModuleName -> TcRnMessage++ {-| TcRnNullExportedModule is a warning controlled by -Wdodgy-exports that occurs+ when an export list contains a module that has no exports.++ Example(s):+ module Foo (module Bar) where+ import Bar ()++ Test cases: None+ -}+ TcRnNullExportedModule :: ModuleName -> TcRnMessage++ {-| TcRnMissingExportList is a warning controlled by -Wmissing-export-lists that+ occurs when a module does not have an explicit export list.++ Example(s): None++ Test cases: typecheck/should_fail/MissingExportList03+ -}+ TcRnMissingExportList :: ModuleName -> TcRnMessage++ {-| TcRnExportHiddenComponents is an error that occurs when an export contains+ constructor or class methods that are not visible.++ Example(s): None++ Test cases: None+ -}+ TcRnExportHiddenComponents :: IE GhcPs -> TcRnMessage++ {-| TcRnDuplicateExport is a warning (controlled by -Wduplicate-exports) that occurs+ when an identifier appears in an export list more than once.++ Example(s): None++ Test cases: module/MultiExport+ module/mod128+ module/mod14+ module/mod5+ overloadedrecflds/should_fail/DuplicateExports+ patsyn/should_compile/T11959+ -}+ TcRnDuplicateExport :: GlobalRdrElt -> IE GhcPs -> IE GhcPs -> TcRnMessage++ {-| TcRnExportedParentChildMismatch is an error that occurs when an export is+ bundled with a parent that it does not belong to++ Example(s):+ module Foo (T(a)) where+ data T+ a = True++ Test cases: module/T11970+ module/T11970B+ module/mod17+ module/mod3+ overloadedrecflds/should_fail/NoParent+ -}+ TcRnExportedParentChildMismatch :: Name -- ^ parent+ -> TyThing+ -> Name -- ^ child+ -> [Name] -> TcRnMessage++ {-| TcRnConflictingExports is an error that occurs when different identifiers that+ have the same name are being exported by a module.++ Example(s):+ module Foo (Bar.f, module Baz) where+ import qualified Bar (f)+ import Baz (f)++ Test cases: module/mod131+ module/mod142+ module/mod143+ module/mod144+ module/mod145+ module/mod146+ module/mod150+ module/mod155+ overloadedrecflds/should_fail/T14953+ overloadedrecflds/should_fail/overloadedrecfldsfail10+ rename/should_fail/rnfail029+ rename/should_fail/rnfail040+ typecheck/should_fail/T16453E2+ typecheck/should_fail/tcfail025+ typecheck/should_fail/tcfail026+ -}+ TcRnConflictingExports+ :: OccName -- ^ Occurrence name shared by both exports+ -> GlobalRdrElt -- ^ First export+ -> IE GhcPs -- ^ Export decl of first export+ -> GlobalRdrElt -- ^ Second export+ -> IE GhcPs -- ^ Export decl of second export+ -> TcRnMessage++ {-| TcRnDuplicateFieldExport is an error that occurs when a module exports+ multiple record fields with the same name, without enabling+ DuplicateRecordFields.++ Example:++ module M1 where+ data D1 = MkD1 { foo :: Int }+ module M2 where+ data D2 = MkD2 { foo :: Int }+ module M ( D1(..), D2(..) ) where+ import module M1+ import module M2++ Test case: overloadedrecflds/should_fail/overloadedrecfldsfail10+ -}+ TcRnDuplicateFieldExport+ :: (GlobalRdrElt, IE GhcPs)+ -> NE.NonEmpty (GlobalRdrElt, IE GhcPs)+ -> TcRnMessage++ {-| TcRnAmbiguousRecordUpdate is a warning, controlled by -Wambiguous-fields,+ which occurs when a user relies on the type-directed disambiguation+ mechanism to disambiguate a record update. This will not be supported by+ -XDuplicateRecordFields in future releases.++ Example(s):++ data Person = MkPerson { personId :: Int, name :: String }+ data Address = MkAddress { personId :: Int, address :: String }+ bad1 x = x { personId = 4 } :: Person -- ambiguous+ bad2 (x :: Person) = x { personId = 4 } -- ambiguous+ good x = (x :: Person) { personId = 4 } -- not ambiguous++ Test cases: overloadedrecflds/should_fail/overloadedrecfldsfail06+ -}+ TcRnAmbiguousRecordUpdate+ :: HsExpr GhcRn -- ^ Field update+ -> TyCon -- ^ Record type+ -> TcRnMessage++ {-| TcRnMissingFields is a warning controlled by -Wmissing-fields occurring+ when the intialisation of a record is missing one or more (lazy) fields.++ Example(s):+ data Rec = Rec { a :: Int, b :: String, c :: Bool }+ x = Rec { a = 1, b = "two" } -- missing field 'c'++ Test cases: deSugar/should_compile/T13870+ deSugar/should_compile/ds041+ patsyn/should_compile/T11283+ rename/should_compile/T5334+ rename/should_compile/T12229+ rename/should_compile/T5892a+ warnings/should_fail/WerrorFail2+ -}+ TcRnMissingFields :: ConLike -> [(FieldLabelString, TcType)] -> TcRnMessage++ {-| TcRnFieldUpdateInvalidType is an error occurring when an updated field's+ type mentions something that is outside the universally quantified variables+ of the data constructor, such as an existentially quantified type.++ Example(s):+ data X = forall a. MkX { f :: a }+ x = (MkX ()) { f = False }++ Test cases: patsyn/should_fail/records-exquant+ typecheck/should_fail/T3323+ -}+ TcRnFieldUpdateInvalidType :: [(FieldLabelString,TcType)] -> TcRnMessage++ {-| TcRnMissingStrictFields is an error occurring when a record field marked+ as strict is omitted when constructing said record.++ Example(s):+ data R = R { strictField :: !Bool, nonStrict :: Int }+ x = R { nonStrict = 1 }++ Test cases: typecheck/should_fail/T18869+ typecheck/should_fail/tcfail085+ typecheck/should_fail/tcfail112+ -}+ TcRnMissingStrictFields :: ConLike -> [(FieldLabelString, TcType)] -> TcRnMessage++ {-| TcRnAmbiguousFieldInUpdate is an error that occurs when a field in a+ record update clashes with another field or top-level function of the+ same name, and the user hasn't enabled -XDisambiguateRecordFields.++ Example:++ {-# LANGUAGE NoFieldSelectors #-}+ {-# LANGUAGE NoDisambiguateRecordFields #-}+ module M where++ data A = MkA { fld :: Int }++ fld :: Bool+ fld = False++ f r = r { fld = 3 }++ -}+ TcRnAmbiguousFieldInUpdate :: (GlobalRdrElt, GlobalRdrElt, [GlobalRdrElt])+ -> TcRnMessage++ {-| TcRnBadRecordUpdate is an error when a regular (non-overloaded)+ record update cannot be pinned down to any one parent.++ The problem with the record update is stored in the 'BadRecordUpdateReason'+ field.++ Example(s):++ data R1 = R1 { x :: Int }+ data R2 = R2 { x :: Int }+ update r = r { x = 1 }+ -- ambiguous++ data R1 = R1 { x :: Int, y :: Int }+ data R2 = R2 { y :: Int, z :: Int }+ update r = r { x = 1, y = 2, z = 3 }+ -- no parent has all the fields++ Test cases: overloadedrecflds/should_fail/overloadedrecfldsfail01+ overloadedrecflds/should_fail/overloadedrecfldsfail01+ overloadedrecflds/should_fail/overloadedrecfldsfail14+ -}+ TcRnBadRecordUpdate :: [RdrName]+ -- ^ the fields of the record update+ -> BadRecordUpdateReason+ -- ^ the reason this record update was rejected+ -> TcRnMessage++ {-| TcRnStaticFormNotClosed is an error pertaining to terms that are marked static+ using the -XStaticPointers extension but which are not closed terms.++ Example(s):+ f x = static x++ Test cases: rename/should_fail/RnStaticPointersFail01+ rename/should_fail/RnStaticPointersFail03+ -}+ TcRnStaticFormNotClosed :: Name -> NotClosedReason -> TcRnMessage++ {-| TcRnUselessTypeable is a warning (controlled by -Wderiving-typeable) that+ occurs when trying to derive an instance of the 'Typeable' class. Deriving+ 'Typeable' is no longer necessary (hence the \"useless\") as all types+ automatically derive 'Typeable' in modern GHC versions.++ Example(s): None.++ Test cases: warnings/should_compile/DerivingTypeable+ -}+ TcRnUselessTypeable :: TcRnMessage++ {-| TcRnDerivingDefaults is a warning (controlled by -Wderiving-defaults) that+ occurs when both 'DeriveAnyClass' and 'GeneralizedNewtypeDeriving' are+ enabled, and therefore GHC defaults to 'DeriveAnyClass', which might not+ be what the user wants.++ Example(s): None.++ Test cases: typecheck/should_compile/T15839a+ deriving/should_compile/T16179+ -}+ TcRnDerivingDefaults :: !Class -> TcRnMessage++ {-| TcRnNonUnaryTypeclassConstraint is an error that occurs when GHC+ encounters a non-unary constraint when trying to derive a typeclass.++ Example(s):+ class A+ deriving instance A+ data B deriving A -- We cannot derive A, is not unary (i.e. 'class A a').++ Test cases: deriving/should_fail/T7959+ deriving/should_fail/drvfail005+ deriving/should_fail/drvfail009+ deriving/should_fail/drvfail006+ -}+ TcRnNonUnaryTypeclassConstraint :: !(LHsSigType GhcRn) -> TcRnMessage++ {-| TcRnPartialTypeSignatures is a warning (controlled by -Wpartial-type-signatures)+ that occurs when a wildcard '_' is found in place of a type in a signature or a+ type class derivation++ Example(s):+ foo :: _ -> Int+ foo = ...++ deriving instance _ => Eq (Foo a)++ Test cases: dependent/should_compile/T11241+ dependent/should_compile/T15076+ dependent/should_compile/T14880-2+ typecheck/should_compile/T17024+ typecheck/should_compile/T10072+ partial-sigs/should_fail/TidyClash2+ partial-sigs/should_fail/Defaulting1MROff+ partial-sigs/should_fail/WildcardsInPatternAndExprSig+ partial-sigs/should_fail/T10615+ partial-sigs/should_fail/T14584a+ partial-sigs/should_fail/TidyClash+ partial-sigs/should_fail/T11122+ partial-sigs/should_fail/T14584+ partial-sigs/should_fail/T10045+ partial-sigs/should_fail/PartialTypeSignaturesDisabled+ partial-sigs/should_fail/T10999+ partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature+ partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice+ partial-sigs/should_fail/WildcardInstantiations+ partial-sigs/should_run/T15415+ partial-sigs/should_compile/T10463+ partial-sigs/should_compile/T15039a+ partial-sigs/should_compile/T16728b+ partial-sigs/should_compile/T15039c+ partial-sigs/should_compile/T10438+ partial-sigs/should_compile/SplicesUsed+ partial-sigs/should_compile/T18008+ partial-sigs/should_compile/ExprSigLocal+ partial-sigs/should_compile/T11339a+ partial-sigs/should_compile/T11670+ partial-sigs/should_compile/WarningWildcardInstantiations+ partial-sigs/should_compile/T16728+ partial-sigs/should_compile/T12033+ partial-sigs/should_compile/T15039b+ partial-sigs/should_compile/T10403+ partial-sigs/should_compile/T11192+ partial-sigs/should_compile/T16728a+ partial-sigs/should_compile/TypedSplice+ partial-sigs/should_compile/T15039d+ partial-sigs/should_compile/T11016+ partial-sigs/should_compile/T13324_compile2+ linear/should_fail/LinearPartialSig+ polykinds/T14265+ polykinds/T14172+ -}+ TcRnPartialTypeSignatures :: !SuggestPartialTypeSignatures -> !ThetaType -> TcRnMessage++ {-| TcRnCannotDeriveInstance is an error that occurs every time a typeclass instance+ can't be derived. The 'DeriveInstanceErrReason' will contain the specific reason+ this error arose.++ Example(s): None.++ Test cases: generics/T10604/T10604_no_PolyKinds+ deriving/should_fail/drvfail009+ deriving/should_fail/drvfail-functor2+ deriving/should_fail/T10598_fail3+ deriving/should_fail/deriving-via-fail2+ deriving/should_fail/deriving-via-fail+ deriving/should_fail/T16181+ -}+ TcRnCannotDeriveInstance :: !Class+ -- ^ The typeclass we are trying to derive+ -- an instance for+ -> [Type]+ -- ^ The typeclass arguments, if any.+ -> !(Maybe (DerivStrategy GhcTc))+ -- ^ The derivation strategy, if any.+ -> !UsingGeneralizedNewtypeDeriving+ -- ^ Is '-XGeneralizedNewtypeDeriving' enabled?+ -> !DeriveInstanceErrReason+ -- ^ The specific reason why we couldn't derive+ -- an instance for the class.+ -> TcRnMessage++ {-| TcRnLazyGADTPattern is an error that occurs when a user writes a nested+ GADT pattern match inside a lazy (~) pattern.++ Test case: gadt/lazypat+ -}+ TcRnLazyGADTPattern :: TcRnMessage++ {-| TcRnArrowProcGADTPattern is an error that occurs when a user writes a+ GADT pattern inside arrow proc notation.++ Test case: arrows/should_fail/arrowfail004.+ -}+ TcRnArrowProcGADTPattern :: TcRnMessage++ {-| TcRnForallIdentifier is a warning (controlled with -Wforall-identifier) that occurs+ when a definition uses 'forall' as an identifier.++ Example:+ forall x = ()+ g forall = ()++ Test cases: T20609 T20609a T20609b T20609c T20609d+ -}+ TcRnForallIdentifier :: RdrName -> TcRnMessage++ {-| TcRnCapturedTermName is a warning (controlled by -Wterm-variable-capture) that occurs+ when an implicitly quantified type variable's name is already used for a term.+ Example:+ a = 10+ f :: a -> a++ Test cases: T22513a T22513b T22513c T22513d T22513e T22513f T22513g T22513h T22513i+ -}+ TcRnCapturedTermName :: RdrName -> Either [GlobalRdrElt] Name -> TcRnMessage++ {-| TcRnTypeMultipleOccurenceOfBindVar is an error that occurs if a bound+ type variable's name is already in use.+ Example:+ f :: forall a. ...+ f (MkT @a ...) = ...++ Test cases: TyAppPat_ScopedTyVarConflict TyAppPat_NonlinearMultiPat TyAppPat_NonlinearMultiAppPat+ -}+ TcRnBindVarAlreadyInScope :: [LocatedN RdrName] -> TcRnMessage++ {-| TcRnBindMultipleVariables is an error that occurs in the case of+ multiple occurrences of a bound variable.+ Example:+ foo (MkFoo @(a,a) ...) = ...++ Test case: typecheck/should_fail/TyAppPat_NonlinearSinglePat+ -}+ TcRnBindMultipleVariables :: HsDocContext -> LocatedN RdrName -> TcRnMessage++ {-| TcRnTypeEqualityOutOfScope is a warning (controlled by -Wtype-equality-out-of-scope)+ that occurs when the type equality (a ~ b) is not in scope.++ Test case: warnings/should_compile/T18862b+ -}+ TcRnTypeEqualityOutOfScope :: TcRnMessage++ {-| TcRnTypeEqualityRequiresOperators is a warning (controlled by -Wtype-equality-requires-operators)+ that occurs when the type equality (a ~ b) is used without the TypeOperators extension.++ Example:+ {-# LANGUAGE NoTypeOperators #-}+ f :: (a ~ b) => a -> b++ Test case: T18862a+ -}+ TcRnTypeEqualityRequiresOperators :: TcRnMessage++ {-| TcRnIllegalTypeOperator is an error that occurs when a type operator+ is used without the TypeOperators extension.++ Example:+ {-# LANGUAGE NoTypeOperators #-}+ f :: Vec a n -> Vec a m -> Vec a (n + m)++ Test case: T12811+ -}+ TcRnIllegalTypeOperator :: !SDoc -> !RdrName -> TcRnMessage++ {-| TcRnIllegalTypeOperatorDecl is an error that occurs when a type or class+ operator is declared without the TypeOperators extension.++ See Note [Type and class operator definitions]++ Example:+ {-# LANGUAGE Haskell2010 #-}+ {-# LANGUAGE MultiParamTypeClasses #-}++ module T3265 where++ data a :+: b = Left a | Right b++ class a :*: b where {}+++ Test cases: T3265, tcfail173+ -}+ TcRnIllegalTypeOperatorDecl :: !RdrName -> TcRnMessage++ {-| TcRnGADTMonoLocalBinds is a warning controlled by -Wgadt-mono-local-binds+ that occurs when pattern matching on a GADT when -XMonoLocalBinds is off.++ Example(s): None++ Test cases: T20485, T20485a+ -}+ TcRnGADTMonoLocalBinds :: TcRnMessage++ {-| The TcRnNotInScope constructor is used for various not-in-scope errors.+ See 'NotInScopeError' for more details. -}+ TcRnNotInScope :: NotInScopeError -- ^ what the problem is+ -> RdrName -- ^ the name that is not in scope+ -> [ImportError] -- ^ import errors that are relevant+ -> [GhcHint] -- ^ hints, e.g. enable DataKinds to refer to a promoted data constructor+ -> TcRnMessage++ {-| TcRnTermNameInType is an error that occurs when a term-level identifier+ is used in a type.++ Example:++ import qualified Prelude++ bad :: Prelude.fst (Bool, Float)+ bad = False++ Test cases: T21605{c,d}+ -}+ TcRnTermNameInType :: RdrName -> [GhcHint] -> TcRnMessage++ {-| TcRnUntickedPromotedThing is a warning (controlled with -Wunticked-promoted-constructors)+ that is triggered by an unticked occurrence of a promoted data constructor.++ Examples:++ data A = MkA+ type family F (a :: A) where { F MkA = Bool }++ type B = [ Int, Bool ]++ Test cases: T9778, T19984.+ -}+ TcRnUntickedPromotedThing :: UntickedPromotedThing+ -> TcRnMessage++ {-| TcRnIllegalBuiltinSyntax is an error that occurs when built-in syntax appears+ in an unexpected location, e.g. as a data constructor or in a fixity declaration.++ Examples:++ infixl 5 :++ data P = (,)++ Test cases: rnfail042, T14907b, T15124, T15233.+ -}+ TcRnIllegalBuiltinSyntax :: SDoc -- ^ what kind of thing this is (a binding, fixity declaration, ...)+ -> RdrName+ -> TcRnMessage+ -- TODO: remove the SDoc argument.++ {-| TcRnWarnDefaulting is a warning (controlled by -Wtype-defaults)+ that is triggered whenever a Wanted typeclass constraint+ is solving through the defaulting of a type variable.++ Example:++ one = show 1+ -- We get Wanteds Show a0, Num a0, and default a0 to Integer.++ Test cases:+ none (which are really specific to defaulting),+ but see e.g. tcfail204.+ -}+ TcRnWarnDefaulting :: [Ct] -- ^ Wanted constraints in which defaulting occurred+ -> Maybe TyVar -- ^ The type variable being defaulted+ -> Type -- ^ The default type+ -> TcRnMessage++ {-| TcRnIncorrectNameSpace is an error that occurs when a 'Name'+ is used in the incorrect 'NameSpace', e.g. a type constructor+ or class used in a term, or a term variable used in a type.++ Example:++ f x = Int++ Test cases: T18740a, T20884.+ -}+ TcRnIncorrectNameSpace :: Name+ -> Bool -- ^ whether the error is happening+ -- in a Template Haskell tick+ -- (so we should give a Template Haskell hint)+ -> TcRnMessage++ {-| TcRnForeignImportPrimExtNotSet is an error occurring when a foreign import+ is declared using the @prim@ calling convention without having turned on+ the -XGHCForeignImportPrim extension.++ Example(s):+ foreign import prim "foo" foo :: ByteArray# -> (# Int#, Int# #)++ Test cases: ffi/should_fail/T20116+ -}+ TcRnForeignImportPrimExtNotSet :: ForeignImport GhcRn -> TcRnMessage++ {-| TcRnForeignImportPrimSafeAnn is an error declaring that the safe/unsafe+ annotation should not be used with @prim@ foreign imports.++ Example(s):+ foreign import prim unsafe "my_primop_cmm" :: ...++ Test cases: None+ -}+ TcRnForeignImportPrimSafeAnn :: ForeignImport GhcRn -> TcRnMessage++ {-| TcRnForeignFunctionImportAsValue is an error explaining that foreign @value@+ imports cannot have function types.++ Example(s):+ foreign import capi "math.h value sqrt" f :: CInt -> CInt++ Test cases: ffi/should_fail/capi_value_function+ -}+ TcRnForeignFunctionImportAsValue :: ForeignImport GhcRn -> TcRnMessage++ {-| TcRnFunPtrImportWithoutAmpersand is a warning controlled by @-Wdodgy-foreign-imports@+ that informs the user of a possible missing @&@ in the declaration of a+ foreign import with a 'FunPtr' return type.++ Example(s):+ foreign import ccall "f" f :: FunPtr (Int -> IO ())++ Test cases: ffi/should_compile/T1357+ -}+ TcRnFunPtrImportWithoutAmpersand :: ForeignImport GhcRn -> TcRnMessage++ {-| TcRnIllegalForeignDeclBackend is an error occurring when a foreign import declaration+ is not compatible with the code generation backend being used.++ Example(s): None++ Test cases: None+ -}+ TcRnIllegalForeignDeclBackend+ :: Either (ForeignExport GhcRn) (ForeignImport GhcRn)+ -> Backend+ -> ExpectedBackends+ -> TcRnMessage++ {-| TcRnUnsupportedCallConv informs the user that the calling convention specified+ for a foreign export declaration is not compatible with the target platform.+ It is a warning controlled by @-Wunsupported-calling-conventions@ in the case of+ @stdcall@ but is otherwise considered an error.++ Example(s): None++ Test cases: None+ -}+ TcRnUnsupportedCallConv :: Either (ForeignExport GhcRn) (ForeignImport GhcRn)+ -> UnsupportedCallConvention+ -> TcRnMessage++ {-| TcRnIllegalForeignType is an error for when a type appears in a foreign+ function signature that is not compatible with the FFI.++ Example(s): None++ Test cases: ffi/should_fail/T3066+ ffi/should_fail/ccfail004+ ffi/should_fail/T10461+ ffi/should_fail/T7506+ ffi/should_fail/T5664+ safeHaskell/ghci/p6+ safeHaskell/safeLanguage/SafeLang08+ ffi/should_fail/T16702+ linear/should_fail/LinearFFI+ ffi/should_fail/T7243+ -}+ TcRnIllegalForeignType :: !(Maybe ArgOrResult) -> !IllegalForeignTypeReason -> TcRnMessage++ {-| TcRnInvalidCIdentifier indicates a C identifier that is not valid.++ Example(s):+ foreign import prim safe "not valid" cmm_test2 :: Int# -> Int#++ Test cases: th/T10638+ -}+ TcRnInvalidCIdentifier :: !CLabelString -> TcRnMessage++ {-| TcRnExpectedValueId is an error occurring when something that is not a+ value identifier is used where one is expected.++ Example(s): none++ Test cases: none+ -}+ TcRnExpectedValueId :: !TcTyThing -> TcRnMessage++ {-| TcRnRecSelectorEscapedTyVar is an error indicating that a record field selector+ containing an existential type variable is used as a function rather than in+ a pattern match.++ Example(s):+ data Rec = forall a. Rec { field :: a }+ field (Rec True)++ Test cases: patsyn/should_fail/records-exquant+ typecheck/should_fail/T3176+ -}+ TcRnRecSelectorEscapedTyVar :: !OccName -> TcRnMessage++ {-| TcRnPatSynNotBidirectional is an error for when a non-bidirectional pattern+ synonym is used as a constructor.++ Example(s):+ pattern Five :: Int+ pattern Five <- 5+ five = Five++ Test cases: patsyn/should_fail/records-no-uni-update+ patsyn/should_fail/records-no-uni-update2+ -}+ TcRnPatSynNotBidirectional :: !Name -> TcRnMessage++ {-| TcRnIllegalDerivingItem is an error for when something other than a type class+ appears in a deriving statement.++ Example(s):+ data X = X deriving Int++ Test cases: deriving/should_fail/T5922+ -}+ TcRnIllegalDerivingItem :: !(LHsSigType GhcRn) -> TcRnMessage++ {-| TcRnUnexpectedAnnotation indicates the erroroneous use of an annotation such+ as strictness, laziness, or unpacking.++ Example(s):+ data T = T { t :: Maybe {-# UNPACK #-} Int }+ data C = C { f :: !IntMap Int }++ Test cases: parser/should_fail/unpack_inside_type+ typecheck/should_fail/T7210+ -}+ TcRnUnexpectedAnnotation :: !(HsType GhcRn) -> !HsSrcBang -> TcRnMessage++ {-| TcRnIllegalRecordSyntax is an error indicating an illegal use of record syntax.++ Example(s):+ data T = T Int { field :: Int }++ Test cases: rename/should_fail/T7943+ rename/should_fail/T9077+ -}+ TcRnIllegalRecordSyntax :: Either (HsType GhcPs) (HsType GhcRn) -> TcRnMessage++ {-| TcRnInvalidVisibleKindArgument is an error for a kind application on a+ target type that cannot accept it.++ Example(s):+ bad :: Int @Type+ bad = 1+ type Foo :: forall a {b}. a -> b -> b+ type Foo x y = y+ type Bar = Foo @Bool @Int True 42++ Test cases: indexed-types/should_fail/T16356_Fail3+ typecheck/should_fail/ExplicitSpecificity7+ typecheck/should_fail/T12045b+ typecheck/should_fail/T12045c+ typecheck/should_fail/T15592a+ typecheck/should_fail/T15816+ -}+ TcRnInvalidVisibleKindArgument+ :: !(LHsType GhcRn) -- ^ The visible kind argument+ -> !Type -- ^ Target of the kind application+ -> TcRnMessage++ {-| TcRnTooManyBinders is an error for a type constructor that is declared with+ more arguments then its kind specifies.++ Example(s):+ type T :: Type -> (Type -> Type) -> Type+ data T a (b :: Type -> Type) x1 (x2 :: Type -> Type)++ Test cases: saks/should_fail/saks_fail008+ -}+ TcRnTooManyBinders :: !Kind -> ![LHsTyVarBndr (HsBndrVis GhcRn) GhcRn] -> TcRnMessage++ {-| TcRnDifferentNamesForTyVar is an error that indicates different names being+ used for the same type variable.++ Example(s):+ data SameKind :: k -> k -> *+ data Q (a :: k1) (b :: k2) c = MkQ (SameKind a b)++ Test cases: polykinds/T11203+ polykinds/T11821a+ saks/should_fail/T20916+ typecheck/should_fail/T17566b+ typecheck/should_fail/T17566c+ -}+ TcRnDifferentNamesForTyVar :: !Name -> !Name -> TcRnMessage++ {-| TcRnInvalidReturnKind is an error for a data declaration that has a kind signature+ with an invalid result kind.++ Example(s):+ data family Foo :: Constraint++ Test cases: typecheck/should_fail/T14048b+ typecheck/should_fail/UnliftedNewtypesConstraintFamily+ typecheck/should_fail/T12729+ typecheck/should_fail/T15883+ typecheck/should_fail/T16829a+ typecheck/should_fail/T16829b+ typecheck/should_fail/UnliftedNewtypesNotEnabled+ typecheck/should_fail/tcfail079+ -}+ TcRnInvalidReturnKind+ :: !DataSort -- ^ classification of thing being returned+ -> !AllowedDataResKind -- ^ allowed kind+ -> !Kind -- ^ the return kind+ -> !(Maybe SuggestUnliftedTypes) -- ^ suggested extension+ -> TcRnMessage++ {-| TcRnUnexpectedKindVar is an error that occurs when the user+ tries to use kind variables without -XPolyKinds.++ Example:+ f :: forall k a. Proxy (a :: k)++ Test cases: polykinds/BadKindVar+ polykinds/T14710+ saks/should_fail/T16722+ -}+ TcRnUnexpectedKindVar :: RdrName -> TcRnMessage++ {-| TcRnIllegalKind is used for a various illegal kinds errors including++ Example:+ type T :: forall k. Type -- without emabled -XPolyKinds++ Test cases: polykinds/T16762b+ -}+ TcRnIllegalKind+ :: HsTypeOrSigType GhcPs+ -- ^ The illegal kind+ -> Bool -- ^ Whether enabling -XPolyKinds should be suggested+ -> TcRnMessage++ {-| TcRnClassKindNotConstraint is an error for a type class that has a kind that+ is not equivalent to Constraint.++ Example(s):+ type C :: Type -> Type+ class C a++ Test cases: saks/should_fail/T16826+ -}+ TcRnClassKindNotConstraint :: !Kind -> TcRnMessage++ {-| TcRnUnpromotableThing is an error that occurs when the user attempts to+ use the promoted version of something which is not promotable.++ Example(s):+ data T :: T -> *+ data X a where+ MkX :: Show a => a -> X a+ foo :: Proxy ('MkX 'True)+ foo = Proxy++ Test cases: dependent/should_fail/PromotedClass+ dependent/should_fail/T14845_fail1+ dependent/should_fail/T14845_fail2+ dependent/should_fail/T15215+ dependent/should_fail/T13780c+ dependent/should_fail/T15245+ polykinds/T5716+ polykinds/T5716a+ polykinds/T6129+ polykinds/T7433+ patsyn/should_fail/T11265+ patsyn/should_fail/T9161-1+ patsyn/should_fail/T9161-2+ dependent/should_fail/SelfDep+ polykinds/PolyKinds06+ polykinds/PolyKinds07+ polykinds/T13625+ polykinds/T15116+ polykinds/T15116a+ saks/should_fail/T16727a+ saks/should_fail/T16727b+ rename/should_fail/T12686+ rename/should_fail/T16635a+ rename/should_fail/T16635b+ rename/should_fail/T16635c+ -}+ TcRnUnpromotableThing :: !Name -> !PromotionErr -> TcRnMessage++ {-| TcRnMatchesHaveDiffNumArgs is an error occurring when something has matches+ that have different numbers of arguments++ Example(s):+ foo x = True+ foo x y = False++ Test cases: rename/should_fail/rnfail045+ typecheck/should_fail/T20768_fail+ -}+ TcRnMatchesHaveDiffNumArgs+ :: !(HsMatchContext GhcTc) -- ^ Pattern match specifics+ -> !MatchArgBadMatches+ -> TcRnMessage++ {-| TcRnUnexpectedPatSigType is an error occurring when there is+ a type signature in a pattern without -XScopedTypeVariables extension++ Examples:+ f (a :: Bool) = ...++ Test case: rename/should_fail/T11663+ -}+ TcRnUnexpectedPatSigType :: HsPatSigType GhcPs -> TcRnMessage++ {-| TcRnIllegalKindSignature is an error occuring when there is+ a kind signature without -XKindSignatures extension++ Examples:+ data Foo (a :: Nat) = ....++ Test case: parser/should_fail/readFail036+ -}+ TcRnIllegalKindSignature :: HsType GhcPs -> TcRnMessage++ {-| TcRnDataKindsError is an error occurring when there is+ an illegal type or kind, probably required -XDataKinds+ and is used without the enabled extension.++ Examples:++ type Foo = [Nat, Char]++ type Bar = [Int, String]++ Test cases: linear/should_fail/T18888+ polykinds/T7151+ th/TH_Promoted1Tuple+ typecheck/should_fail/tcfail094+ -}+ TcRnDataKindsError :: TypeOrKind -> HsType GhcPs -> TcRnMessage++ {-| TcRnCannotBindScopedTyVarInPatSig is an error stating that scoped type+ variables cannot be used in pattern bindings.++ Example(s):+ let (x :: a) = 5++ Test cases: typecheck/should_compile/tc141+ -}+ TcRnCannotBindScopedTyVarInPatSig :: !(NE.NonEmpty (Name, TcTyVar)) -> TcRnMessage++ {-| TcRnCannotBindTyVarsInPatBind is an error for when type+ variables are introduced in a pattern binding++ Example(s):+ Just @a x = Just True++ Test cases: typecheck/should_fail/TyAppPat_PatternBinding+ typecheck/should_fail/TyAppPat_PatternBindingExistential+ -}+ TcRnCannotBindTyVarsInPatBind :: !(NE.NonEmpty (Name, TcTyVar)) -> TcRnMessage++ {-| TcRnTooManyTyArgsInConPattern is an error occurring when a constructor pattern+ has more than the expected number of type arguments++ Example(s):+ f (Just @Int @Bool x) = x++ Test cases: typecheck/should_fail/TyAppPat_TooMany+ typecheck/should_fail/T20443b+ -}+ TcRnTooManyTyArgsInConPattern+ :: !ConLike+ -> !Int -- ^ Expected number of args+ -> !Int -- ^ Actual number of args+ -> TcRnMessage++ {-| TcRnMultipleInlinePragmas is a warning signifying that multiple inline pragmas+ reference the same definition.++ Example(s):+ {-# INLINE foo #-}+ {-# INLINE foo #-}+ foo :: Bool -> Bool+ foo = id++ Test cases: none+ -}+ TcRnMultipleInlinePragmas+ :: !Id -- ^ Target of the pragmas+ -> !(LocatedA InlinePragma) -- ^ The first pragma+ -> !(NE.NonEmpty (LocatedA InlinePragma)) -- ^ Other pragmas+ -> TcRnMessage++ {-| TcRnUnexpectedPragmas is a warning that occurs when unexpected pragmas appear+ in the source.++ Example(s):++ Test cases: none+ -}+ TcRnUnexpectedPragmas :: !Id -> !(NE.NonEmpty (LSig GhcRn)) -> TcRnMessage++ {-| TcRnNonOverloadedSpecialisePragma is a warning for a specialise pragma being+ placed on a definition that is not overloaded.++ Example(s):+ {-# SPECIALISE foo :: Bool -> Bool #-}+ foo :: Bool -> Bool+ foo = id++ Test cases: simplCore/should_compile/T8537+ typecheck/should_compile/T10504+ -}+ TcRnNonOverloadedSpecialisePragma :: !(LIdP GhcRn) -> TcRnMessage++ {-| TcRnSpecialiseNotVisible is a warning that occurs when the subject of a+ SPECIALISE pragma has a definition that is not visible from the current module.++ Example(s): none++ Test cases: none+ -}+ TcRnSpecialiseNotVisible :: !Name -> TcRnMessage++ {-| TcRnPragmaWarning is a warning that can happen when usage of something+ is warned or deprecated by pragma.++ Test cases:+ DeprU+ T5281+ T5867+ rn050+ rn066 (here is a warning, not deprecation)+ T3303+ -}+ TcRnPragmaWarning :: {+ pragma_warning_occ :: OccName,+ pragma_warning_msg :: WarningTxt GhcRn,+ pragma_warning_import_mod :: ModuleName,+ pragma_warning_defined_mod :: Maybe ModuleName+ } -> TcRnMessage++ {-| TcRnDifferentExportWarnings is an error that occurs when the+ warning messages for exports of a name differ between several export items.++ Test case:+ DifferentExportWarnings+ -}+ TcRnDifferentExportWarnings :: !Name -- ^ The name with different export warnings+ -> NE.NonEmpty SrcSpan -- ^ The locations of export list items that differ+ -- from the one at which the error is reported+ -> TcRnMessage++ {-| TcRnIncompleteExportWarnings is a warning (controlled by -Wincomplete-export-warnings) that+ occurs when some of the exports of a name do not have an export warning and some do++ Test case:+ ExportWarnings6+ -}+ TcRnIncompleteExportWarnings :: !Name -- ^ The name that is exported+ -> NE.NonEmpty SrcSpan -- ^ The locations of export list items that are+ -- missing the export warning+ -> TcRnMessage++ {-| TcRnIllegalHsigDefaultMethods is an error that occurs when a binding for+ a class default method is provided in a Backpack signature file.++ Test case:+ bkpfail40+ -}+ TcRnIllegalHsigDefaultMethods :: !Name -- ^ 'Name' of the class+ -> NE.NonEmpty (LHsBind GhcRn) -- ^ default methods+ -> TcRnMessage++ {-| TcRnHsigFixityMismatch is an error indicating that the fixity decl in a+ Backpack signature file differs from the one in the source file for the same+ operator.++ Test cases:+ bkpfail37, bkpfail38+ -}+ TcRnHsigFixityMismatch :: !TyThing -- ^ The operator whose fixity is defined+ -> !Fixity -- ^ the fixity used in the source file+ -> !Fixity -- ^ the fixity used in the signature+ -> TcRnMessage++ {-| TcRnHsigShapeMismatch is a group of errors related to mismatches between+ backpack signatures.+ -}+ TcRnHsigShapeMismatch :: !HsigShapeMismatchReason+ -> TcRnMessage++ {-| TcRnHsigMissingModuleExport is an error indicating that a module doesn't+ export a name exported by its signature.++ Test cases:+ bkpfail01, bkpfail05, bkpfail09, bkpfail16, bkpfail35, bkpcabal06+ -}+ TcRnHsigMissingModuleExport :: !OccName -- ^ The missing name+ -> !UnitState -- ^ The module's unit state+ -> !Module -- ^ The implementation module+ -> TcRnMessage++ {-| TcRnBadGenericMethod+ This test ensures that if you provide a "more specific" type signatures+ for the default method, you must also provide a binding.++ Example:+ {-# LANGUAGE DefaultSignatures #-}++ class C a where+ meth :: a+ default meth :: Num a => a+ meth = 0++ Test case:+ typecheck/should_fail/MissingDefaultMethodBinding.hs+ -}+ TcRnBadGenericMethod :: !Name -- ^ 'Name' of the class+ -> !Name -- ^ Problematic method+ -> TcRnMessage++ {-| TcRnWarningMinimalDefIncomplete is a warning that one must+ specify which methods must be implemented by all instances.++ Example:+ class Cheater a where -- WARNING LINE+ cheater :: a+ {-# MINIMAL #-} -- warning!++ Test case:+ warnings/minimal/WarnMinimal.hs:+ -}+ TcRnWarningMinimalDefIncomplete :: ClassMinimalDef -> TcRnMessage++ {-| TcRnIllegalQuasiQuotes is an error that occurs when a quasi-quote+ is used without the QuasiQuotes extension.++ Example:++ foo = [myQuoter|x y z|]++ Test cases: none; the parser fails to parse this if QuasiQuotes is off.+ -}+ TcRnIllegalQuasiQuotes :: TcRnMessage++ {-| TcRnTHError is a family of errors involving Template Haskell.+ See 'THError'.+ -}+ TcRnTHError :: THError -> TcRnMessage++ {-| TcRnDefaultMethodForPragmaLacksBinding is an error that occurs when+ a default method pragma is missing an accompanying binding.++ Test cases:+ typecheck/should_fail/T5084.hs+ typecheck/should_fail/T2354.hs+ -}+ TcRnDefaultMethodForPragmaLacksBinding+ :: Id -- ^ method+ -> Sig GhcRn -- ^ the pragma+ -> TcRnMessage+ {-| TcRnIgnoreSpecialisePragmaOnDefMethod is a warning that occurs when+ a specialise pragma is put on a default method.++ Test cases: none+ -}+ TcRnIgnoreSpecialisePragmaOnDefMethod+ :: !Name+ -> TcRnMessage+ {-| TcRnBadMethodErr is an error that happens when one attempts to provide a method+ in a class instance, when the class doesn't have a method by that name.++ Test case:+ th/T12387+ -}+ TcRnBadMethodErr+ :: { badMethodErrClassName :: !Name+ , badMethodErrMethodName :: !Name+ } -> TcRnMessage++ {-| TcRnIllegalNewtype is an error that occurs when a newtype:++ * Does not have exactly one field, or+ * is non-linear, or+ * is a GADT, or+ * has a context in its constructor's type, or+ * has existential type variables in its constructor's type, or+ * has strictness annotations.++ Test cases:+ gadt/T14719+ indexed-types/should_fail/T14033+ indexed-types/should_fail/T2334A+ linear/should_fail/LinearGADTNewtype+ parser/should_fail/readFail008+ polykinds/T11459+ typecheck/should_fail/T15523+ typecheck/should_fail/T15796+ typecheck/should_fail/T17955+ typecheck/should_fail/T18891a+ typecheck/should_fail/T21447+ typecheck/should_fail/tcfail156+ -}+ TcRnIllegalNewtype+ :: DataCon+ -> Bool -- ^ True if linear types enabled+ -> IllegalNewtypeReason+ -> TcRnMessage++ {-| TcRnIllegalTypeData is an error that occurs when a @type data@+ declaration occurs without the TypeOperators extension.++ See Note [Type data declarations]++ Test case:+ type-data/should_fail/TDNoPragma+ -}+ TcRnIllegalTypeData :: TcRnMessage++ {-| TcRnTypeDataForbids is an error that occurs when a @type data@+ declaration contains @data@ declaration features that are+ forbidden in a @type data@ declaration.++ See Note [Type data declarations]++ Test cases:+ type-data/should_fail/TDDeriving+ type-data/should_fail/TDRecordsGADT+ type-data/should_fail/TDRecordsH98+ type-data/should_fail/TDStrictnessGADT+ type-data/should_fail/TDStrictnessH98+ -}+ TcRnTypeDataForbids :: !TypeDataForbids -> TcRnMessage++ {-| TcRnUnsatisfiedMinimalDef is a warning that occurs when a class instance+ is missing methods that are required by the minimal definition.++ Example:+ class C a where+ foo :: a -> a+ instance C () -- | foo needs to be defined here++ Test cases:+ typecheck/prog001/typecheck.prog001+ typecheck/should_compile/tc126+ typecheck/should_compile/T7903+ typecheck/should_compile/tc116+ typecheck/should_compile/tc175+ typecheck/should_compile/HasKey+ typecheck/should_compile/tc125+ typecheck/should_compile/tc078+ typecheck/should_compile/tc161+ typecheck/should_fail/T5051+ typecheck/should_compile/T21583+ backpack/should_compile/bkp47+ backpack/should_fail/bkpfail25+ parser/should_compile/T2245+ parser/should_compile/read014+ indexed-types/should_compile/Class3+ indexed-types/should_compile/Simple2+ indexed-types/should_fail/T7862+ deriving/should_compile/deriving-1935+ deriving/should_compile/T9968a+ deriving/should_compile/drv003+ deriving/should_compile/T4966+ deriving/should_compile/T14094+ perf/compiler/T15304+ warnings/minimal/WarnMinimal+ simplCore/should_compile/simpl020+ deSugar/should_compile/T14546d+ ghci/scripts/T5820+ ghci/scripts/ghci019+ -}+ TcRnUnsatisfiedMinimalDef :: ClassMinimalDef -> TcRnMessage++ {-| 'TcRnMisplacedInstSig' is an error that happens when a method in+ a class instance is given a type signature, but the user has not+ enabled the @InstanceSigs@ extension.++ Test case: module/mod45+ -}+ TcRnMisplacedInstSig :: Name -> (LHsSigType GhcRn) -> TcRnMessage+ {-| TcRnNoRebindableSyntaxRecordDot is an error triggered by an overloaded record update+ without RebindableSyntax enabled.++ Example(s):++ Test cases: parser/should_fail/RecordDotSyntaxFail5+ -}+ TcRnNoRebindableSyntaxRecordDot :: TcRnMessage++ {-| TcRnNoFieldPunsRecordDot is an error triggered by the use of record field puns+ in an overloaded record update without enabling NamedFieldPuns.++ Example(s):+ print $ a{ foo.bar.baz.quux }++ Test cases: parser/should_fail/RecordDotSyntaxFail12+ -}+ TcRnNoFieldPunsRecordDot :: TcRnMessage++ {-| TcRnIllegalStaticExpression is an error thrown when user creates a static+ pointer via TemplateHaskell without enabling the StaticPointers extension.++ Example(s):++ Test cases: th/T14204+ -}+ TcRnIllegalStaticExpression :: HsExpr GhcPs -> TcRnMessage++ {-| TcRnListComprehensionDuplicateBinding is an error triggered by duplicate+ let-bindings in a list comprehension.++ Example(s):+ [ () | let a = 13 | let a = 17 ]++ Test cases: typecheck/should_fail/tcfail092+ -}+ TcRnListComprehensionDuplicateBinding :: Name -> TcRnMessage++ {-| TcRnEmptyStmtsGroup is an error triggered by an empty list of statements+ in a statement block. For more information, see 'EmptyStatementGroupErrReason'++ Example(s):++ [() | then ()]++ do++ proc () -> do++ Test cases: rename/should_fail/RnEmptyStatementGroup1+ -}+ TcRnEmptyStmtsGroup:: EmptyStatementGroupErrReason -> TcRnMessage++ {-| TcRnLastStmtNotExpr is an error caused by the last statement+ in a statement block not being an expression.++ Example(s):++ do x <- pure ()++ do let x = 5++ Test cases: rename/should_fail/T6060+ parser/should_fail/T3811g+ parser/should_fail/readFail028+ -}+ TcRnLastStmtNotExpr+ :: HsStmtContext GhcRn+ -> UnexpectedStatement+ -> TcRnMessage++ {-| TcRnUnexpectedStatementInContext is an error when a statement appears+ in an unexpected context (e.g. an arrow statement appears in a list comprehension).++ Example(s):++ Test cases: parser/should_fail/readFail042+ parser/should_fail/readFail038+ parser/should_fail/readFail043+ -}+ TcRnUnexpectedStatementInContext+ :: HsStmtContext GhcRn+ -> UnexpectedStatement+ -> Maybe LangExt.Extension+ -> TcRnMessage++ {-| TcRnIllegalTupleSection is an error triggered by usage of a tuple section+ without enabling the TupleSections extension.++ Example(s):+ (5,)++ Test cases: rename/should_fail/rnfail056+ -}+ TcRnIllegalTupleSection :: TcRnMessage++ {-| TcRnIllegalImplicitParameterBindings is an error triggered by binding+ an implicit parameter in an mdo block.++ Example(s):+ mdo { let { ?x = 5 }; () }++ Test cases: rename/should_fail/RnImplicitBindInMdoNotation+ -}+ TcRnIllegalImplicitParameterBindings+ :: Either (HsLocalBindsLR GhcPs GhcPs) (HsLocalBindsLR GhcRn GhcPs)+ -> TcRnMessage++ {-| TcRnSectionWithoutParentheses is an error triggered by attempting to+ use an operator section without parentheses.++ Example(s):+ (`head` x, ())++ Test cases: rename/should_fail/T2490+ rename/should_fail/T5657+ -}+ TcRnSectionWithoutParentheses :: HsExpr GhcPs -> TcRnMessage++ {-| TcRnBindingOfExistingName is an error triggered by an attempt to rebind+ built-in syntax, punned list or tuple syntax, or a name quoted via Template Haskell.++ Examples:++ data []+ data (->)+ $(pure [ValD (VarP 'succ) (NormalB (ConE 'True)) []])++ Test cases: rename/should_fail/T14907b+ rename/should_fail/T22839+ rename/should_fail/rnfail042+ th/T13968+ -}+ TcRnBindingOfExistingName :: RdrName -> TcRnMessage+ {-| TcRnMultipleFixityDecls is an error triggered by multiple+ fixity declarations for the same operator.++ Example(s):++ infixr 6 $$+ infixl 4 $$++ Test cases: rename/should_fail/RnMultipleFixityFail+ -}+ TcRnMultipleFixityDecls :: SrcSpan -> RdrName -> TcRnMessage++ {-| TcRnIllegalPatternSynonymDecl is an error thrown when a user+ defines a pattern synonyms without enabling the PatternSynonyms extension.++ Example:++ pattern O :: Int+ pattern O = 0++ Test cases: rename/should_fail/RnPatternSynonymFail+ -}+ TcRnIllegalPatternSynonymDecl :: TcRnMessage++ {-| TcRnIllegalClassBinding is an error triggered by a binding+ in a class or instance declaration of an illegal form.++ Examples:++ class ZeroOne a where+ zero :: a+ one :: a+ instance ZeroOne Int where+ (zero,one) = (0,1)++ class C a where+ pattern P = ()++ Test cases: module/mod48+ patsyn/should_fail/T9705-1+ patsyn/should_fail/T9705-2+ typecheck/should_fail/tcfail021++ -}+ TcRnIllegalClassBinding :: DeclSort -> HsBindLR GhcPs GhcPs -> TcRnMessage++ {-| TcRnOrphanCompletePragma is an error triggered by a {-# COMPLETE #-}+ pragma which does not mention any data constructors or pattern synonyms+ defined in the current module.++ Test cases: patsyn/should_fail/T13349+ -}+ TcRnOrphanCompletePragma :: TcRnMessage++ {-| TcRnEmptyCase is an error thrown when a user uses+ a case expression with an empty list of alternatives without+ enabling the EmptyCase extension.++ Example(s):++ case () of++ Test cases: rename/should_fail/RnEmptyCaseFail+ -}+ TcRnEmptyCase :: HsMatchContext GhcRn -> TcRnMessage++ {-| TcRnNonStdGuards is a warning thrown when a user uses+ non-standard guards (e.g. patterns in guards) without+ enabling the PatternGuards extension.+ More realistically: the user has explicitly disabled PatternGuards,+ as it is enabled by default with `-XHaskell2010`.++ Example(s):++ f | 5 <- 2 + 3 = ...++ Test cases: rename/should_compile/rn049+ -}+ TcRnNonStdGuards :: NonStandardGuards -> TcRnMessage++ {-| TcRnDuplicateSigDecl is an error triggered by two or more+ signatures for one entity.++ Examples:++ f :: Int -> Bool+ f :: Int -> Bool+ f _ = True++ g x = x+ {-# INLINE g #-}+ {-# NOINLINE g #-}++ pattern P = ()+ {-# COMPLETE P #-}+ {-# COMPLETE P #-}++ Test cases: module/mod68+ parser/should_fail/OpaqueParseFail4+ patsyn/should_fail/T12165+ rename/should_fail/rnfail048+ rename/should_fail/T5589+ rename/should_fail/T7338+ rename/should_fail/T7338a+ -}+ TcRnDuplicateSigDecl :: NE.NonEmpty (LocatedN RdrName, Sig GhcPs) -> TcRnMessage++ {-| TcRnMisplacedSigDecl is an error triggered by the pragma application+ in the wrong context, like `MINIMAL` applied to a function or+ `SPECIALIZE` to an instance.++ Example:++ f x = x+ {-# MINIMAL f #-}++ Test cases: rename/should_fail/T18138+ warnings/minimal/WarnMinimalFail1+ -}+ TcRnMisplacedSigDecl :: Sig GhcRn -> TcRnMessage++ {-| TcRnUnexpectedDefaultSig is an error thrown when a user uses+ default signatures without enabling the DefaultSignatures extension.++ Example:++ class C a where+ m :: a+ default m :: Num a => a+ m = 0++ Test cases: rename/should_fail/RnDefaultSigFail+ -}+ TcRnUnexpectedDefaultSig :: Sig GhcPs -> TcRnMessage++ {-| TcRnDuplicateMinimalSig is an error triggered by two or more minimal+ signatures for one type class.++ Example:++ class C where+ f :: ()+ {-# MINIMAL f #-}+ {-# MINIMAL f #-}++ Test cases: rename/should_fail/RnMultipleMinimalPragmaFail+ -}+ TcRnDuplicateMinimalSig :: LSig GhcPs -> LSig GhcPs -> [LSig GhcPs] -> TcRnMessage++ {-| 'TcRnIllegalInvisTyVarBndr' is an error that occurs+ when invisible type variable binders in type declarations+ are used without enabling the @TypeAbstractions@ extension.++ Example:+ {-# LANGUAGE NoTypeAbstractions #-} -- extension disabled+ data T @k (a :: k) @(j :: Type) (b :: j)+ ^^ ^^^^^^^^^^^^++ Test case: T22560_fail_ext+ -}+ TcRnIllegalInvisTyVarBndr+ :: !(LHsTyVarBndr (HsBndrVis GhcRn) GhcRn)+ -> TcRnMessage++ {-| 'TcRnInvalidInvisTyVarBndr' is an error that occurs+ when an invisible type variable binder has no corresponding+ @forall k.@ quantifier in the standalone kind signature.++ Example:+ type P :: forall a -> Type+ data P @a = MkP++ Test cases: T22560_fail_a T22560_fail_b+ -}+ TcRnInvalidInvisTyVarBndr+ :: !Name+ -> !(LHsTyVarBndr (HsBndrVis GhcRn) GhcRn)+ -> TcRnMessage++ {-| 'TcRnInvisBndrWithoutSig' is an error triggered by attempting to use+ an invisible type variable binder in a type declaration without a+ standalone kind signature or a complete user-supplied kind.++ Example:+ data T @k (a :: k) -- No CUSK, no SAKS++ Test case: T22560_fail_d+ -}+ TcRnInvisBndrWithoutSig+ :: !Name+ -> !(LHsTyVarBndr (HsBndrVis GhcRn) GhcRn)+ -> TcRnMessage++ {-| TcRnDeprecatedInvisTyArgInConPat is a warning that triggers on type applications+ in constructor patterns when the user has not enabled '-XTypeAbstractions'+ but instead has enabled both '-XScopedTypeVariables' and '-XTypeApplications'.++ This warning is a deprecation mechanism that is scheduled until GHC 9.12.+ -}+ TcRnDeprecatedInvisTyArgInConPat+ :: TcRnMessage++ {-| TcRnLoopySuperclassSolve is a warning, controlled by @-Wloopy-superclass-solve@,+ that is triggered when GHC solves a constraint in a possibly-loopy way,+ violating the class instance termination rules described in the section+ "Undecidable instances and loopy superclasses" of the user's guide.++ Example:++ class Foo f+ class Foo f => Bar f g+ instance Bar f f => Bar f (h k)++ Test cases: T20666, T20666{a,b}, T22891, T22912.+ -}+ TcRnLoopySuperclassSolve :: CtLoc -- ^ Wanted 'CtLoc'+ -> PredType -- ^ Wanted 'PredType'+ -> TcRnMessage++ {-| TcRnUnexpectedStandaloneDerivingDecl is an error thrown when a user uses+ standalone deriving without enabling the StandaloneDeriving extension.++ Example:++ deriving instance Eq Foo++ Test cases: rename/should_fail/RnUnexpectedStandaloneDeriving+ -}+ TcRnUnexpectedStandaloneDerivingDecl :: TcRnMessage++ {-| TcRnUnusedVariableInRuleDecl is an error triggered by forall'd variable in+ rewrite rule that does not appear on left-hand side++ Example:++ {-# RULES "rule" forall a. id = id #-}++ Test cases: rename/should_fail/ExplicitForAllRules2+ -}+ TcRnUnusedVariableInRuleDecl :: FastString -> Name -> TcRnMessage++ {-| TcRnUnexpectedStandaloneKindSig is an error thrown when a user uses standalone+ kind signature without enabling the StandaloneKindSignatures extension.++ Example:++ type D :: Type+ data D = D++ Test cases: saks/should_fail/saks_fail001+ -}+ TcRnUnexpectedStandaloneKindSig :: TcRnMessage++ {-| TcRnIllegalRuleLhs is an error triggered by malformed left-hand side+ of rewrite rule++ Examples:++ {-# RULES "test" forall x. f x = x #-}++ {-# RULES "test" forall x. case x of = x #-}++ Test cases: rename/should_fail/T15659+ -}+ TcRnIllegalRuleLhs+ :: RuleLhsErrReason+ -> FastString -- Rule name+ -> LHsExpr GhcRn -- Full expression+ -> HsExpr GhcRn -- Bad expression+ -> TcRnMessage++ {-| TcRnDuplicateRoleAnnot is an error triggered by two or more role+ annotations for one type++ Example:++ data D a+ type role D phantom+ type role D phantom++ Test cases: roles/should_fail/Roles8+ -}+ TcRnDuplicateRoleAnnot :: NE.NonEmpty (LRoleAnnotDecl GhcPs) -> TcRnMessage++ {-| TcRnDuplicateKindSig is an error triggered by two or more standalone+ kind signatures for one type++ Example:++ type D :: Type+ type D :: Type+ data D++ Test cases: saks/should_fail/saks_fail002+ -}+ TcRnDuplicateKindSig :: NE.NonEmpty (LStandaloneKindSig GhcPs) -> TcRnMessage++ {-| TcRnIllegalDerivStrategy is an error thrown when a user uses deriving+ strategy without enabling the DerivingStrategies extension or uses deriving+ via without enabling the DerivingVia extension.++ Examples:++ data T = T deriving stock Eq++ data T = T deriving via Eq T++ Test cases: deriving/should_fail/deriving-via-fail3+ deriving/should_fail/T10598_fail4+ -}+ TcRnIllegalDerivStrategy :: DerivStrategy GhcPs -> TcRnMessage++ {-| TcRnIllegalMultipleDerivClauses is an error thrown when a user uses two or more+ deriving clauses without enabling the DerivingStrategies extension.++ Example:++ data T = T+ deriving Eq+ deriving Ord++ Test cases: deriving/should_fail/T10598_fail5+ -}+ TcRnIllegalMultipleDerivClauses :: TcRnMessage++ {-| TcRnNoDerivStratSpecified is a warning implied by -Wmissing-deriving-strategies+ and triggered by deriving clause without specified deriving strategy.++ Example:++ data T = T+ deriving Eq++ Test cases: rename/should_compile/T15798a+ rename/should_compile/T15798b+ rename/should_compile/T15798c+ -}+ TcRnNoDerivStratSpecified+ :: Bool -- True if DerivingStrategies is enabled+ -> TcRnMessage++ {-| TcRnStupidThetaInGadt is an error triggered by data contexts in GADT-style+ data declaration++ Example:++ data (Eq a) => D a where+ MkD :: D Int++ Test cases: rename/should_fail/RnStupidThetaInGadt+ -}+ TcRnStupidThetaInGadt :: HsDocContext -> TcRnMessage++ {-| TcRnShadowedTyVarNameInFamResult is an error triggered by type variable in+ type family result that shadows type variable from left hand side++ Example:++ type family F a b c = b++ Test cases: ghci/scripts/T6018ghcirnfail+ rename/should_fail/T6018rnfail+ -}+ TcRnShadowedTyVarNameInFamResult :: IdP GhcPs -> TcRnMessage++ {-| TcRnIncorrectTyVarOnRhsOfInjCond is an error caused by a situation where the+ left-hand side of an injectivity condition of a type family is not a variable+ referring to the type family result.+ See Note [Renaming injectivity annotation] for more details.++ Example:++ type family F a = r | a -> a++ Test cases: ghci/scripts/T6018ghcirnfail+ rename/should_fail/T6018rnfail+ -}+ TcRnIncorrectTyVarOnLhsOfInjCond+ :: IdP GhcRn -- Expected+ -> LIdP GhcPs -- Actual+ -> TcRnMessage++ {-| TcRnUnknownTyVarsOnRhsOfInjCond is an error triggered by out-of-scope type+ variables on the right-hand side of a of an injectivity condition of a type family++ Example:++ type family F a = res | res -> b++ Test cases: ghci/scripts/T6018ghcirnfail+ rename/should_fail/T6018rnfail+ -}+ TcRnUnknownTyVarsOnRhsOfInjCond :: [Name] -> TcRnMessage++ {-| TcRnLookupInstance groups several errors emitted when looking up class instances.++ Test cases:+ none+ -}+ TcRnLookupInstance+ :: !Class+ -> ![Type]+ -> !LookupInstanceErrReason+ -> TcRnMessage++ {-| TcRnBadlyStaged is an error that occurs when a TH binding is used in an+ invalid stage.++ Test cases:+ T17820d+ -}+ TcRnBadlyStaged+ :: !StageCheckReason -- ^ The binding being spliced.+ -> !Int -- ^ The binding stage.+ -> !Int -- ^ The stage at which the binding is used.+ -> TcRnMessage++ {-| TcRnStageRestriction is an error that occurs when a top level splice refers to+ a local name.++ Test cases:+ T17820, T21547, T5795, qq00[1-4], annfail0{3,4,6,9}+ -}+ TcRnStageRestriction+ :: !StageCheckReason -- ^ The binding being spliced.+ -> TcRnMessage++ {-| TcRnTyThingUsedWrong is an error that occurs when a thing is used where another+ thing was expected.++ Test cases:+ none+ -}+ TcRnTyThingUsedWrong+ :: !WrongThingSort -- ^ Expected thing.+ -> !TcTyThing -- ^ Thing used wrongly.+ -> !Name -- ^ Name of the thing used wrongly.+ -> TcRnMessage++ {-| TcRnCannotDefaultKindVar is an error that occurs when attempting to use+ unconstrained kind variables whose type isn't @Type@, without -XPolyKinds.++ Test cases:+ T11334b+ -}+ TcRnCannotDefaultKindVar+ :: !TyVar -- ^ The unconstrained variable.+ -> !Kind -- ^ Kind of the variable.+ -> TcRnMessage++ {-| TcRnUninferrableTyVar is an error that occurs when metavariables+ in a type could not be defaulted.++ Test cases:+ T17301, T17562, T17567, T17567StupidTheta, T15474, T21479+ -}+ TcRnUninferrableTyVar+ :: ![TyCoVar] -- ^ The variables that could not be defaulted.+ -> !UninferrableTyVarCtx -- ^ Description of the surrounding context.+ -> TcRnMessage++ {-| TcRnSkolemEscape is an error that occurs when type variables from an+ outer scope is used in a context where they should be locally scoped.++ Test cases:+ T15076, T15076b, T14880-2, T15825, T14880, T15807, T16946, T14350,+ T14040A, T15795, T15795a, T14552+ -}+ TcRnSkolemEscape+ :: ![TcTyVar] -- ^ The variables that would escape.+ -> !TcTyVar -- ^ The variable that is being quantified.+ -> !Type -- ^ The type in which they occur.+ -> TcRnMessage++ {-| TcRnPatSynEscapedCoercion is an error indicating that a coercion escaped from+ a pattern synonym into a type.+ See Note [Coercions that escape] in GHC.Tc.TyCl.PatSyn++ Test cases:+ T14507+ -}+ TcRnPatSynEscapedCoercion :: !Id -- ^ The pattern-bound variable+ -> !(NE.NonEmpty CoVar) -- ^ The escaped coercions+ -> TcRnMessage++ {-| TcRnPatSynExistentialInResult is an error indicating that the result type+ of a pattern synonym mentions an existential type variable.++ Test cases:+ PatSynExistential+ -}+ TcRnPatSynExistentialInResult :: !Name -- ^ The name of the pattern synonym+ -> !TcSigmaType -- ^ The result type+ -> ![TyVar] -- ^ The escaped existential variables+ -> TcRnMessage++ {-| TcRnPatSynArityMismatch is an error indicating that the number of arguments in a+ pattern synonym's equation differs from the number of parameters in its+ signature.++ Test cases:+ PatSynArity+ -}+ TcRnPatSynArityMismatch :: !Name -- ^ The name of the pattern synonym+ -> !Arity -- ^ The number of equation arguments+ -> !Arity -- ^ The difference+ -> TcRnMessage++ {-| TcRnPatSynInvalidRhs is an error group indicating that the pattern on the+ right hand side of a pattern synonym is invalid.++ Test cases:+ unidir, T14112+ -}+ TcRnPatSynInvalidRhs :: !Name -- ^ The name of the pattern synonym+ -> !(LPat GhcRn) -- ^ The pattern+ -> ![LIdP GhcRn] -- ^ The LHS args+ -> !PatSynInvalidRhsReason -- ^ The number of equation arguments+ -> TcRnMessage++ {-| TcRnZonkerMessage is collection of errors that occur when zonking,+ i.e. filling in metavariables with their final values.++ See 'ZonkerMessage'+ -}+ TcRnZonkerMessage :: ZonkerMessage -> TcRnMessage++ {-| TcRnTyFamDepsDisabled is an error indicating that a type family injectivity+ annotation was used without enabling the extension TypeFamilyDependencies.++ Test cases:+ T11381+ -}+ TcRnTyFamDepsDisabled :: TcRnMessage++ {-| TcRnAbstractClosedTyFamDecl is an error indicating that an abstract closed+ type family was declared in a regular source file, while it is only allowed+ in hs-boot files.++ Test cases:+ ClosedFam4+ -}+ TcRnAbstractClosedTyFamDecl :: TcRnMessage++ {-| TcRnPartialFieldSelector is a warning indicating that a record selector+ was not defined for all constructors of a data type.++ Test cases:+ DRFPartialFields, T7169+ -}+ TcRnPartialFieldSelector :: !FieldLabel -- ^ The selector+ -> TcRnMessage++ {-| TcRnBadFieldAnnotation is an error/warning group indicating that a+ strictness/unpack related data type field annotation is invalid.+ -}+ TcRnBadFieldAnnotation :: !Int -- ^ The index of the field+ -> !DataCon -- ^ The constructor in which the field is defined+ -> !BadFieldAnnotationReason -- ^ The error specifics+ -> TcRnMessage++ {-| TcRnSuperclassCycle is an error indicating that a class has a superclass+ cycle.++ Test cases:+ mod40, tcfail027, tcfail213, tcfail216, tcfail217, T9415, T9739+ -}+ TcRnSuperclassCycle :: !SuperclassCycle -- ^ The details of the cycle+ -> TcRnMessage++ {-| TcRnDefaultSigMismatch is an error indicating that a default method+ signature doesn't match the regular method signature.++ Test cases:+ T7437, T12918a, T12918b, T12151+ -}+ TcRnDefaultSigMismatch :: !Id -- ^ The name of the method+ -> !Type -- ^ The type of the default signature+ -> TcRnMessage++ {-| TcRnTyFamsDisabled is an error indicating that a type family or instance+ was declared while the extension TypeFamilies was disabled.++ Test cases:+ TyFamsDisabled+ -}+ TcRnTyFamsDisabled :: !TyFamsDisabledReason -- ^ The name of the family or instance+ -> TcRnMessage++ {-| TcRnBadTyConTelescope is an error caused by an ill-scoped 'TyCon' kind,+ due to type variables being out of dependency order.++ Example:++ class C a (b :: Proxy a) (c :: Proxy b) where+ type T c a++ Test cases:+ BadTelescope{∅,3,4}+ T14066{f,g}+ T14887+ T15591{b,c}+ T15743{c,d}+ T15764+ T23252++ -}+ TcRnBadTyConTelescope :: !TyCon -> TcRnMessage++ {-| TcRnTyFamResultDisabled is an error indicating that a result variable+ was used on a type family while the extension TypeFamilyDependencies was+ disabled.++ Test cases:+ T13571, T13571a+ -}+ TcRnTyFamResultDisabled :: !Name -- ^ The name of the type family+ -> !(LHsTyVarBndr () GhcRn) -- ^ Name of the result variable+ -> TcRnMessage++ {-| TcRnRoleValidationFailed is an error indicating that a variable was+ assigned an invalid role by the inference algorithm.+ This is only performed with -dcore-lint.+ -}+ TcRnRoleValidationFailed :: !Role -- ^ The validated role+ -> !RoleValidationFailedReason -- ^ The failure reason+ -> TcRnMessage++ {-| TcRnCommonFieldResultTypeMismatch is an error indicating that a sum type+ declares the same field name in multiple constructors, but the constructors'+ result types differ.++ Test cases:+ CommonFieldResultTypeMismatch+ -}+ TcRnCommonFieldResultTypeMismatch :: !DataCon -- ^ First constructor+ -> !DataCon -- ^ Second constructor+ -> !FieldLabelString -- ^ Field name+ -> TcRnMessage++ {-| TcRnCommonFieldTypeMismatch is an error indicating that a sum type+ declares the same field name in multiple constructors, but their types+ differ.++ Test cases:+ CommonFieldTypeMismatch+ -}+ TcRnCommonFieldTypeMismatch :: !DataCon -- ^ First constructor+ -> !DataCon -- ^ Second constructor+ -> !FieldLabelString -- ^ Field name+ -> TcRnMessage++ {-| TcRnClassExtensionDisabled is an error indicating that a class+ was declared with an extension feature while the extension was disabled.+ -}+ TcRnClassExtensionDisabled :: !Class -- ^ The class+ -> !DisabledClassExtension -- ^ The extension+ -> TcRnMessage++ {-| TcRnDataConParentTypeMismatch is an error indicating that a data+ constructor was declared with a type that doesn't match its type+ constructor (i.e. a GADT result type and its data name).++ Test cases:+ T7175, T13300, T14719, T18357, T18357b, gadt11, tcfail155, tcfail176+ -}+ TcRnDataConParentTypeMismatch :: !DataCon -- ^ The data constructor+ -> !Type -- ^ The parent type+ -> TcRnMessage++ {-| TcRnGADTsDisabled is an error indicating that a GADT was declared+ while the extension GADTs was disabled.++ Test cases:+ ghci057, T9293+ -}+ TcRnGADTsDisabled :: !Name -- ^ The name of the GADT+ -> TcRnMessage++ {-| TcRnExistentialQuantificationDisabled is an error indicating that+ a data constructor was declared with existential features while the+ extension ExistentialQuantification was disabled.++ Test cases:+ ghci057, T9293, gadtSyntaxFail001, gadtSyntaxFail002, gadtSyntaxFail003,+ prog006, rnfail053, T12083a+ -}+ TcRnExistentialQuantificationDisabled :: !DataCon -- ^ The constructor+ -> TcRnMessage++ {-| TcRnGADTDataContext is an error indicating that a GADT was declared with a+ data type context.+ This error is emitted in the tc, but it is also caught in the renamer.+ -}+ TcRnGADTDataContext :: !Name -- ^ The data type name+ -> TcRnMessage++ {-| TcRnMultipleConForNewtype is an error indicating that a newtype was+ declared with multiple constructors.+ This error is caught by the parser.+ -}+ TcRnMultipleConForNewtype :: !Name -- ^ The newtype name+ -> !Int -- ^ The number of constructors+ -> TcRnMessage++ {-| TcRnKindSignaturesDisabled is an error indicating that a kind signature+ was used in a data type declaration while the extension KindSignatures was+ disabled.++ Test cases:+ T20873c, readFail036+ -}+ TcRnKindSignaturesDisabled :: !(Either (HsType GhcPs) (Name, HsType GhcRn))+ -- ^ The data type name+ -> TcRnMessage++ {-| TcRnEmptyDataDeclsDisabled is an error indicating that a data type+ was declared with no constructors while the extension EmptyDataDecls was+ disabled.++ Test cases:+ readFail035+ -}+ TcRnEmptyDataDeclsDisabled :: !Name -- ^ The data type name+ -> TcRnMessage++ {-| TcRnRoleMismatch is an error indicating that the role specified+ in an annotation differs from its inferred role.++ Test cases:+ T7253, Roles11+ -}+ TcRnRoleMismatch :: !Name -- ^ The type variable+ -> !Role -- ^ The annotated role+ -> !Role -- ^ The inferred role+ -> TcRnMessage++ {-| TcRnRoleCountMismatch is an error indicating that the number of+ roles in an annotation doesn't match the number of type parameters.++ Test cases:+ Roles6+ -}+ TcRnRoleCountMismatch :: !Int -- ^ The number of type variables+ -> !(LRoleAnnotDecl GhcRn) -- ^ The role annotation+ -> TcRnMessage++ {-| TcRnIllegalRoleAnnotation is an error indicating that a role+ annotation was attached to a decl that doesn't allow it.++ Test cases:+ Roles5+ -}+ TcRnIllegalRoleAnnotation :: !(RoleAnnotDecl GhcRn) -- ^ The role annotation+ -> TcRnMessage++ {-| TcRnRoleAnnotationsDisabled is an error indicating that a role+ annotation was declared while the extension RoleAnnotations was disabled.++ Test cases:+ Roles5, TH_Roles1+ -}+ TcRnRoleAnnotationsDisabled :: !TyCon -- ^ The annotated type+ -> TcRnMessage++ {-| TcRnIncoherentRoles is an error indicating that a role+ annotation for a class parameter was declared as not nominal.++ Test cases:+ T8773+ -}+ TcRnIncoherentRoles :: !TyCon -- ^ The class tycon+ -> TcRnMessage+ {-| TcRnPrecedenceParsingError is an error caused by attempting to+ use operators with the same precedence in one infix expression.++ Example:+ eq :: (a ~ b ~ c) :~: ()++ Test cases: module/mod61+ parser/should_fail/readFail016+ rename/should_fail/rnfail017+ rename/should_fail/T9077+ typecheck/should_fail/T18252a+ -}+ TcRnPrecedenceParsingError+ :: (OpName, Fixity) -- ^ first operator's name and fixity+ -> (OpName, Fixity) -- ^ second operator's name and fixity+ -> TcRnMessage++ {-| TcRnPrecedenceParsingError is an error caused by attempting to+ use an operator with higher precedence than the operand.++ Example:+ k = (-3 **)+ where+ (**) = const+ infixl 7 **++ Test cases: overloadedrecflds/should_fail/T13132_duplicaterecflds+ parser/should_fail/readFail023+ rename/should_fail/rnfail019+ th/TH_unresolvedInfix2+ -}+ TcRnSectionPrecedenceError+ :: (OpName, Fixity) -- ^ first operator's name and fixity+ -> (OpName, Fixity) -- ^ argument operator+ -> HsExpr GhcPs -- ^ Section+ -> TcRnMessage++ {-| TcRnTypeSynonymCycle is an error indicating that a cycle between type+ synonyms has occurred.++ Test cases:+ mod27, ghc-e-fail2, bkpfail29+ -}+ TcRnTypeSynonymCycle :: !TySynCycleTyCons -- ^ The tycons involved in the cycle+ -> TcRnMessage++ {-| TcRnSelfImport is an error indicating that a module contains an+ import of itself.++ Test cases:+ T9032+ -}+ TcRnSelfImport :: !ModuleName -- ^ The module+ -> TcRnMessage++ {-| TcRnNoExplicitImportList is a warning indicating that an import+ statement did not include an explicit import list.++ Test cases:+ T1789, T4489+ -}+ TcRnNoExplicitImportList :: !ModuleName -- ^ The imported module+ -> TcRnMessage++ {-| TcRnSafeImportsDisabled is an error indicating that an import was+ declared using the @safe@ keyword while SafeHaskell wasn't active.++ Test cases:+ Mixed01+ -}+ TcRnSafeImportsDisabled :: !ModuleName -- ^ The imported module+ -> TcRnMessage++ {-| TcRnDeprecatedModule is a warning indicating that an imported module+ is annotated with a warning or deprecation pragma.++ Test cases:+ DeprU+ -}+ TcRnDeprecatedModule :: !ModuleName -- ^ The imported module+ -> !(WarningTxt GhcRn) -- ^ The pragma data+ -> TcRnMessage++ {-| TcRnCompatUnqualifiedImport is a warning indicating that a special+ module (right now only Data.List) was imported unqualified without+ import list, for compatibility reasons.++ Test cases:+ T17244A+ -}+ TcRnCompatUnqualifiedImport :: !(ImportDecl GhcPs) -- ^ The import+ -> TcRnMessage++ {-| TcRnRedundantSourceImport is a warning indicating that a {-# SOURCE #-}+ import was used when there is no import cycle.++ Test cases:+ none+ -}+ TcRnRedundantSourceImport :: !ModuleName -- ^ The imported module+ -> TcRnMessage++ {-| TcRnImportLookup is a group of errors about bad imported names.+ -}+ TcRnImportLookup :: !ImportLookupReason -- ^ Details about the error+ -> TcRnMessage++ {-| TcRnUnusedImport is a group of errors about unused imports.+ -}+ TcRnUnusedImport :: !(ImportDecl GhcRn) -- ^ The import+ -> !UnusedImportReason -- ^ Details about the error+ -> TcRnMessage++ {-| TcRnDuplicateDecls is an error indicating that the same name was used for+ multiple declarations.++ Test cases:+ FieldSelectors, overloadedrecfldsfail03, T17965, NFSDuplicate, T9975a,+ TDMultiple01, mod19, mod38, mod21, mod66, mod20, TDPunning, mod18, mod22,+ TDMultiple02, T4127a, ghci048, T8932, rnfail015, rnfail010, rnfail011,+ rnfail013, rnfail002, rnfail003, rn_dup, rnfail009, T7164, rnfail043,+ TH_dupdecl, rnfail012+ -}+ TcRnDuplicateDecls :: !OccName -- ^ The name of the declarations+ -> !(NE.NonEmpty Name) -- ^ The individual declarations+ -> TcRnMessage++ {-| TcRnPackageImportsDisabled is an error indicating that an import uses+ a package qualifier while the extension PackageImports was disabled.++ Test cases:+ PackageImportsDisabled+ -}+ TcRnPackageImportsDisabled :: TcRnMessage++ {-| TcRnIllegalDataCon is an error indicating that a data constructor was+ defined using a lowercase name, or a symbolic name in prefix position.+ Mostly caught by PsErrNotADataCon.++ Test cases:+ None+ -}+ TcRnIllegalDataCon :: !RdrName -- ^ The constructor name+ -> TcRnMessage++ {-| TcRnNestedForallsContexts is an error indicating that multiple foralls or+ contexts are nested/curried where this is not supported,+ like @∀ x. ∀ y.@ instead of @∀ x y.@.++ Test cases:+ T12087, T14320, T16114, T16394, T16427, T18191, T18240a, T18240b, T18455, T5951+ -}+ TcRnNestedForallsContexts :: !NestedForallsContextsIn -> TcRnMessage++ {-| TcRnRedundantRecordWildcard is a warning indicating that a pattern uses+ a record wildcard even though all of the record's fields are bound explicitly.++ Test cases:+ T15957_Fail+ -}+ TcRnRedundantRecordWildcard :: TcRnMessage++ {-| TcRnUnusedRecordWildcard is a warning indicating that a pattern uses+ a record wildcard while none of the fields bound by it are used.++ Test cases:+ T15957_Fail+ -}+ TcRnUnusedRecordWildcard :: ![Name] -- ^ The names bound by the wildcard+ -> TcRnMessage++ {-| TcRnUnusedName is a warning indicating that a defined or imported name+ is not used in the module.++ Test cases:+ ds053, mc10, overloadedrecfldsfail05, overloadedrecfldsfail06, prog018,+ read014, rn040, rn041, rn047, rn063, T13839, T13839a, T13919, T17171b,+ T17a, T17b, T17d, T17e, T18470, T1972, t22391, t22391j, T2497, T3371,+ T3449, T7145b, T7336, TH_recover_warns, unused_haddock, WarningGroups,+ werror+ -}+ TcRnUnusedName :: !OccName -- ^ The unused name+ -> !UnusedNameProv -- ^ The provenance of the name+ -> TcRnMessage++ {-| TcRnQualifiedBinder is an error indicating that a qualified name+ was used in binding position.++ Test cases:+ mod62, rnfail021, rnfail034, rnfail039, rnfail046+ -}+ TcRnQualifiedBinder :: !RdrName -- ^ The name used as a binder+ -> TcRnMessage++ {-| TcRnTypeApplicationsDisabled is an error indicating that a type+ application was used while the extension TypeApplications was disabled.++ Test cases:+ T12411, T12446, T15527, T16133, T18251c+ -}+ TcRnTypeApplicationsDisabled :: !TypeApplication -- ^ what kind of type application is it?+ -> TcRnMessage++ {-| TcRnInvalidRecordField is an error indicating that a record field was+ used that doesn't exist in a constructor.++ Test cases:+ T13644, T13847, T17469, T8448, T8570, tcfail083, tcfail084+ -}+ TcRnInvalidRecordField :: !Name -- ^ The constructor name+ -> !FieldLabelString -- ^ The name of the field+ -> TcRnMessage++ {-| TcRnTupleTooLarge is an error indicating that the arity of a tuple+ exceeds mAX_TUPLE_SIZE.++ Test cases:+ T18723a, T18723b, T18723c, T6148a, T6148b, T6148c, T6148d+ -}+ TcRnTupleTooLarge :: !Int -- ^ The arity of the tuple+ -> TcRnMessage++ {-| TcRnCTupleTooLarge is an error indicating that the arity of a constraint+ tuple exceeds mAX_CTUPLE_SIZE.++ Test cases:+ T10451+ -}+ TcRnCTupleTooLarge :: !Int -- ^ The arity of the constraint tuple+ -> TcRnMessage++ {-| TcRnIllegalInferredTyVars is an error indicating that some type variables+ were quantified as inferred (like @∀ {a}.@) in a place where this is not+ allowed, like in an instance declaration.++ Test cases:+ ExplicitSpecificity5, ExplicitSpecificity6, ExplicitSpecificity8,+ ExplicitSpecificity9+ -}+ TcRnIllegalInferredTyVars :: !(NE.NonEmpty (HsTyVarBndr Specificity GhcPs))+ -- ^ The offending type variables+ -> TcRnMessage++ {-| TcRnAmbiguousName is an error indicating that an unbound name+ might refer to multiple names in scope.++ Test cases:+ BootFldReexport, DRFUnused, duplicaterecfldsghci01, GHCiDRF, mod110,+ mod151, mod152, mod153, mod164, mod165, NoFieldSelectorsFail,+ overloadedrecfldsfail02, overloadedrecfldsfail04, overloadedrecfldsfail11,+ overloadedrecfldsfail12, overloadedrecfldsfail13,+ overloadedrecfldswasrunnowfail06, rnfail044, T11167_ambig,+ T11167_ambiguous_fixity, T13132_duplicaterecflds, T15487, T16745, T17420,+ T18999_NoDisambiguateRecordFields, T19397E1, T19397E2, T23010_fail,+ tcfail037+ -}+ TcRnAmbiguousName :: !GlobalRdrEnv+ -> !RdrName -- ^ The name+ -> !(NE.NonEmpty GlobalRdrElt) -- ^ The possible matches+ -> TcRnMessage++ {-| TcRnBindingNameConflict is an error indicating that multiple local or+ top-level bindings have the same name.++ Test cases:+ dsrun006, mdofail002, mdofail003, mod23, mod24, qq006, rnfail001,+ rnfail004, SimpleFail6, T14114, T16110_Fail1, tcfail038, TH_spliceD1+ -}+ TcRnBindingNameConflict :: !RdrName -- ^ The conflicting name+ -> !(NE.NonEmpty SrcSpan)+ -- ^ The locations of the duplicates+ -> TcRnMessage++ {-| TcRnNonCanonicalDefinition is a warning indicating that an instance+ defines an implementation for a method that should not be defined in a way+ that deviates from its default implementation, for example because it has+ been scheduled to be absorbed into another method, like @pure@ making+ @return@ obsolete.++ Test cases:+ WCompatWarningsOn, WCompatWarningsOff, WCompatWarningsOnOff+ -}+ TcRnNonCanonicalDefinition :: !NonCanonicalDefinition -- ^ Specifics+ -> !(LHsSigType GhcRn) -- ^ The instance type+ -> TcRnMessage+ {-| TcRnImplicitImportOfPrelude is a warning, controlled by @Wimplicit-prelude@,+ that is triggered upon an implicit import of the @Prelude@ module.++ Example:++ {-# OPTIONS_GHC -fwarn-implicit-prelude #-}+ module M where {}++ Test case: rn055++ -}+ TcRnImplicitImportOfPrelude :: TcRnMessage++ {-| TcRnMissingMain is an error that occurs when a Main module does+ not define a main function (named @main@ by default, but overridable+ with the @main-is@ command line flag).++ Example:++ module Main where {}++ Test cases:+ T414, T7765, readFail021, rnfail007, T13839b, T17171a, T16453E1, tcfail030,+ T19397E3, T19397E4++ -}+ TcRnMissingMain+ :: !Bool -- ^ whether the module has an explicit export list+ -> !Module+ -> !OccName -- ^ the expected name of the main function+ -> TcRnMessage++ {-| TcRnGhciUnliftedBind is an error that occurs when a user attempts to+ bind an unlifted value in GHCi.++ Example (in GHCi):++ let a = (# 1#, 3# #)++ Test cases: T9140, T19035b+ -}+ TcRnGhciUnliftedBind :: !Id -> TcRnMessage++ {-| TcRnGhciMonadLookupFail is an error that occurs when the user sets+ the GHCi monad, using the GHC API 'setGHCiMonad' function, but GHC+ can't find which monad the user is referring to.++ Example:++ import GHC ( setGHCiMonad )++ ... setGHCiMonad "NoSuchThing"++ Test cases: none+ -}+ TcRnGhciMonadLookupFail+ :: String -- ^ the textual name of the monad requested by the user+ -> Maybe [GlobalRdrElt] -- ^ lookup result+ -> TcRnMessage++ {-| TcRnMissingRoleAnnotation is a warning that occurs when type declaration+ doesn't have a role annotatiosn++ Controlled by flags:+ - Wmissing-role-annotations++ Test cases:+ T22702++ -}+ TcRnMissingRoleAnnotation :: Name -> [Role] -> TcRnMessage+ {-| TcRnPatersonCondFailure is an error that occurs when an instance+ declaration fails to conform to the Paterson conditions. Which particular condition+ fails depends on the constructor of PatersonCondFailure+ See Note [Paterson conditions].++ Test cases:+ T15231, tcfail157, T15316, T19187a, fd-loop, tcfail108, tcfail154,+ T15172, tcfail214+ -}+ TcRnPatersonCondFailure+ :: PatersonCondFailure -- ^ the failed Paterson Condition+ -> PatersonCondFailureContext+ -> Type -- ^ the LHS+ -> Type -- ^ the RHS+ -> TcRnMessage++ {-| TcRnImplicitRhsQuantification is a warning that occurs when GHC implicitly+ quantifies over a type variable that occurs free on the RHS of the type declaration+ that is not mentioned on the LHS++ Example:++ type T = 'Nothing :: Maybe a++ Controlled by flags:+ - Wimplicit-rhs-quantification++ Test cases:+ T23510a+ T23510b+ -}+ TcRnImplicitRhsQuantification :: LocatedN RdrName -> TcRnMessage++ deriving Generic+++----++data ZonkerMessage where+ {-| ZonkerCannotDefaultConcrete is an error occurring when a concrete+ type variable cannot be defaulted.++ Test cases:+ T23153+ -}+ ZonkerCannotDefaultConcrete+ :: !FixedRuntimeRepOrigin+ -> ZonkerMessage++ deriving Generic++----++-- | Things forbidden in @type data@ declarations.+-- See Note [Type data declarations]+data TypeDataForbids+ = TypeDataForbidsDatatypeContexts+ | TypeDataForbidsLabelledFields+ | TypeDataForbidsStrictnessAnnotations+ | TypeDataForbidsDerivingClauses+ deriving Generic++instance Outputable TypeDataForbids where+ ppr TypeDataForbidsDatatypeContexts = text "Data type contexts"+ ppr TypeDataForbidsLabelledFields = text "Labelled fields"+ ppr TypeDataForbidsStrictnessAnnotations = text "Strictness flags"+ ppr TypeDataForbidsDerivingClauses = text "Deriving clauses"++-- | Specifies which back ends can handle a requested foreign import or export+type ExpectedBackends = [Backend]++-- | Specifies which calling convention is unsupported on the current platform+data UnsupportedCallConvention+ = StdCallConvUnsupported+ | PrimCallConvUnsupported+ | JavaScriptCallConvUnsupported+ deriving Eq++-- | Whether the error pertains to a function argument or a result.+data ArgOrResult+ = Arg | Result++-- | Which parts of a record field are affected by a particular error or warning.+data RecordFieldPart+ = RecordFieldDecl !Name+ | RecordFieldConstructor !Name+ | RecordFieldPattern !Name+ | RecordFieldUpdate++-- | Why did we reject a record update?+data BadRecordUpdateReason+ -- | No constructor has all of the required fields.+ = NoConstructorHasAllFields+ { conflictingFields :: [FieldLabelString] }++ -- | There are several possible parents which have all of the required fields,+ -- and we weren't able to disambiguate in any way.+ | MultiplePossibleParents+ (RecSelParent, RecSelParent, [RecSelParent])+ -- ^ The possible parents (at least 2)++ -- | We used type-directed disambiguation, but this resulted in+ -- an invalid parent (the type-directed parent is not among the+ -- parents we computed from the field labels alone).+ | InvalidTyConParent TyCon (NE.NonEmpty RecSelParent)++ deriving Generic++-- | Where a shadowed name comes from+data ShadowedNameProvenance+ = ShadowedNameProvenanceLocal !SrcLoc+ -- ^ The shadowed name is local to the module+ | ShadowedNameProvenanceGlobal [GlobalRdrElt]+ -- ^ The shadowed name is global, typically imported from elsewhere.++-- | In what context did we require a type to have a fixed runtime representation?+--+-- Used by 'GHC.Tc.Utils.TcMType.checkTypeHasFixedRuntimeRep' for throwing+-- representation polymorphism errors when validity checking.+--+-- See Note [Representation polymorphism checking] in GHC.Tc.Utils.Concrete+data FixedRuntimeRepProvenance+ -- | Data constructor fields must have a fixed runtime representation.+ --+ -- Tests: T11734, T18534.+ = FixedRuntimeRepDataConField++ -- | Pattern synonym signature arguments must have a fixed runtime representation.+ --+ -- Test: RepPolyPatSynArg.+ | FixedRuntimeRepPatSynSigArg++ -- | Pattern synonym signature scrutinee must have a fixed runtime representation.+ --+ -- Test: RepPolyPatSynRes.+ | FixedRuntimeRepPatSynSigRes++pprFixedRuntimeRepProvenance :: FixedRuntimeRepProvenance -> SDoc+pprFixedRuntimeRepProvenance FixedRuntimeRepDataConField = text "data constructor field"+pprFixedRuntimeRepProvenance FixedRuntimeRepPatSynSigArg = text "pattern synonym argument"+pprFixedRuntimeRepProvenance FixedRuntimeRepPatSynSigRes = text "pattern synonym scrutinee"++-- | Why the particular illegal newtype error arose together with more+-- information, if any.+data IllegalNewtypeReason+ = DoesNotHaveSingleField !Int+ | IsNonLinear+ | IsGADT+ | HasConstructorContext+ | HasExistentialTyVar+ | HasStrictnessAnnotation+ deriving Generic++-- | Why the particular injectivity error arose together with more information,+-- if any.+data InjectivityErrReason+ = InjErrRhsBareTyVar [Type]+ | InjErrRhsCannotBeATypeFam+ | InjErrRhsOverlap+ | InjErrCannotInferFromRhs !TyVarSet !HasKinds !SuggestUndecidableInstances++data HasKinds+ = YesHasKinds+ | NoHasKinds+ deriving (Show, Eq)++hasKinds :: Bool -> HasKinds+hasKinds True = YesHasKinds+hasKinds False = NoHasKinds++data SuggestUndecidableInstances+ = YesSuggestUndecidableInstaces+ | NoSuggestUndecidableInstaces+ deriving (Show, Eq)++suggestUndecidableInstances :: Bool -> SuggestUndecidableInstances+suggestUndecidableInstances True = YesSuggestUndecidableInstaces+suggestUndecidableInstances False = NoSuggestUndecidableInstaces++data SuggestUnliftedTypes+ = SuggestUnliftedNewtypes+ | SuggestUnliftedDatatypes++-- | A description of whether something is a+--+-- * @data@ or @newtype@ ('DataDeclSort')+--+-- * @data instance@ or @newtype instance@ ('DataInstanceSort')+--+-- * @data family@ ('DataFamilySort')+--+-- At present, this data type is only consumed by 'checkDataKindSig'.+data DataSort+ = DataDeclSort NewOrData+ | DataInstanceSort NewOrData+ | DataFamilySort++ppDataSort :: DataSort -> SDoc+ppDataSort data_sort = text $+ case data_sort of+ DataDeclSort DataType -> "Data type"+ DataDeclSort NewType -> "Newtype"+ DataInstanceSort DataType -> "Data instance"+ DataInstanceSort NewType -> "Newtype instance"+ DataFamilySort -> "Data family"++-- | Helper type used in 'checkDataKindSig'.+--+-- Superficially similar to 'ContextKind', but it lacks 'AnyKind'+-- and 'AnyBoxedKind', and instead of @'TheKind' liftedTypeKind@+-- provides 'LiftedKind', which is much simpler to match on and+-- handle in 'isAllowedDataResKind'.+data AllowedDataResKind+ = AnyTYPEKind+ | AnyBoxedKind+ | LiftedKind++-- | A data type to describe why a variable is not closed.+-- See Note [Not-closed error messages] in GHC.Tc.Gen.Expr+data NotClosedReason = NotLetBoundReason+ | NotTypeClosed VarSet+ | NotClosed Name NotClosedReason++data SuggestPartialTypeSignatures+ = YesSuggestPartialTypeSignatures+ | NoSuggestPartialTypeSignatures+ deriving (Show, Eq)++suggestPartialTypeSignatures :: Bool -> SuggestPartialTypeSignatures+suggestPartialTypeSignatures True = YesSuggestPartialTypeSignatures+suggestPartialTypeSignatures False = NoSuggestPartialTypeSignatures++data UsingGeneralizedNewtypeDeriving+ = YesGeneralizedNewtypeDeriving+ | NoGeneralizedNewtypeDeriving+ deriving Eq++usingGeneralizedNewtypeDeriving :: Bool -> UsingGeneralizedNewtypeDeriving+usingGeneralizedNewtypeDeriving True = YesGeneralizedNewtypeDeriving+usingGeneralizedNewtypeDeriving False = NoGeneralizedNewtypeDeriving++data DeriveAnyClassEnabled+ = YesDeriveAnyClassEnabled+ | NoDeriveAnyClassEnabled+ deriving Eq++deriveAnyClassEnabled :: Bool -> DeriveAnyClassEnabled+deriveAnyClassEnabled True = YesDeriveAnyClassEnabled+deriveAnyClassEnabled False = NoDeriveAnyClassEnabled++-- | Why a particular typeclass instance couldn't be derived.+data DeriveInstanceErrReason+ =+ -- | The typeclass instance is not well-kinded.+ DerivErrNotWellKinded !TyCon+ -- ^ The type constructor that occurs in+ -- the typeclass instance declaration.+ !Kind+ -- ^ The typeclass kind.+ !Int+ -- ^ The number of typeclass arguments that GHC+ -- kept. See Note [tc_args and tycon arity] in+ -- GHC.Tc.Deriv.+ -- | Generic instances can only be derived using the stock strategy+ -- in Safe Haskell.+ | DerivErrSafeHaskellGenericInst+ | DerivErrDerivingViaWrongKind !Kind !Type !Kind+ | DerivErrNoEtaReduce !Type+ -- ^ The instance type+ -- | We cannot derive instances in boot files+ | DerivErrBootFileFound+ | DerivErrDataConsNotAllInScope !TyCon+ -- | We cannot use GND on non-newtype types+ | DerivErrGNDUsedOnData+ -- | We cannot derive instances of nullary classes+ | DerivErrNullaryClasses+ -- | Last arg must be newtype or data application+ | DerivErrLastArgMustBeApp+ | DerivErrNoFamilyInstance !TyCon [Type]+ | DerivErrNotStockDeriveable !DeriveAnyClassEnabled+ | DerivErrHasAssociatedDatatypes !HasAssociatedDataFamInsts+ !AssociatedTyLastVarInKind+ !AssociatedTyNotParamOverLastTyVar+ | DerivErrNewtypeNonDeriveableClass+ | DerivErrCannotEtaReduceEnough !Bool -- Is eta-reduction OK?+ | DerivErrOnlyAnyClassDeriveable !TyCon+ -- ^ Type constructor for which the instance+ -- is requested+ !DeriveAnyClassEnabled+ -- ^ Whether or not -XDeriveAnyClass is enabled+ -- already.+ -- | Stock deriving won't work, but perhaps DeriveAnyClass will.+ | DerivErrNotDeriveable !DeriveAnyClassEnabled+ -- | The given 'PredType' is not a class.+ | DerivErrNotAClass !PredType+ -- | The given (representation of the) 'TyCon' has no+ -- data constructors.+ | DerivErrNoConstructors !TyCon+ | DerivErrLangExtRequired !LangExt.Extension+ -- | GHC simply doesn't how to how derive the input 'Class' for the given+ -- 'Type'.+ | DerivErrDunnoHowToDeriveForType !Type+ -- | The given 'TyCon' must be an enumeration.+ -- See Note [Enumeration types] in GHC.Core.TyCon+ | DerivErrMustBeEnumType !TyCon+ -- | The given 'TyCon' must have /precisely/ one constructor.+ | DerivErrMustHaveExactlyOneConstructor !TyCon+ -- | The given data type must have some parameters.+ | DerivErrMustHaveSomeParameters !TyCon+ -- | The given data type must not have a class context.+ | DerivErrMustNotHaveClassContext !TyCon !ThetaType+ -- | We couldn't derive an instance for a particular data constructor+ -- for a variety of reasons.+ | DerivErrBadConstructor !(Maybe HasWildcard) [DeriveInstanceBadConstructor]+ -- | We couldn't derive a 'Generic' instance for the given type for a+ -- variety of reasons+ | DerivErrGenerics [DeriveGenericsErrReason]+ -- | We couldn't derive an instance either because the type was not an+ -- enum type or because it did have more than one constructor.+ | DerivErrEnumOrProduct !DeriveInstanceErrReason !DeriveInstanceErrReason+ deriving Generic++data DeriveInstanceBadConstructor+ =+ -- | The given 'DataCon' must be truly polymorphic in the+ -- last argument of the data type.+ DerivErrBadConExistential !DataCon+ -- | The given 'DataCon' must not use the type variable in a function argument"+ | DerivErrBadConCovariant !DataCon+ -- | The given 'DataCon' must not contain function types+ | DerivErrBadConFunTypes !DataCon+ -- | The given 'DataCon' must use the type variable only+ -- as the last argument of a data type+ | DerivErrBadConWrongArg !DataCon+ -- | The given 'DataCon' is a GADT so we cannot directly+ -- derive an istance for it.+ | DerivErrBadConIsGADT !DataCon+ -- | The given 'DataCon' has existentials type vars in its type.+ | DerivErrBadConHasExistentials !DataCon+ -- | The given 'DataCon' has constraints in its type.+ | DerivErrBadConHasConstraints !DataCon+ -- | The given 'DataCon' has a higher-rank type.+ | DerivErrBadConHasHigherRankType !DataCon++data DeriveGenericsErrReason+ = -- | The type must not have some datatype context.+ DerivErrGenericsMustNotHaveDatatypeContext !TyCon+ -- | The data constructor must not have exotic unlifted+ -- or polymorphic arguments.+ | DerivErrGenericsMustNotHaveExoticArgs !DataCon+ -- | The data constructor must be a vanilla constructor.+ | DerivErrGenericsMustBeVanillaDataCon !DataCon+ -- | The type must have some type parameters.+ -- check (d) from Note [Requirements for deriving Generic and Rep]+ -- in GHC.Tc.Deriv.Generics.+ | DerivErrGenericsMustHaveSomeTypeParams !TyCon+ -- | The data constructor must not have existential arguments.+ | DerivErrGenericsMustNotHaveExistentials !DataCon+ -- | The derivation applies a type to an argument involving+ -- the last parameter but the applied type is not of kind * -> *.+ | DerivErrGenericsWrongArgKind !DataCon++data HasWildcard+ = YesHasWildcard+ | NoHasWildcard+ deriving Eq++hasWildcard :: Bool -> HasWildcard+hasWildcard True = YesHasWildcard+hasWildcard False = NoHasWildcard++-- | A context in which we don't allow anonymous wildcards.+data BadAnonWildcardContext+ = WildcardNotLastInConstraint+ | ExtraConstraintWildcardNotAllowed+ SoleExtraConstraintWildcardAllowed+ | WildcardsNotAllowedAtAll++-- | Whether a sole extra-constraint wildcard is allowed,+-- e.g. @_ => ..@ as opposed to @( .., _ ) => ..@.+data SoleExtraConstraintWildcardAllowed+ = SoleExtraConstraintWildcardNotAllowed+ | SoleExtraConstraintWildcardAllowed++-- | Why is a class instance head invalid?+data IllegalInstanceHeadReason+ -- | An instance for an abstract class from an hs-boot or Backpack+ -- hsig file.+ --+ -- Example:+ --+ -- -- A.hs-boot+ -- module A where+ -- class C a+ --+ -- -- B.hs+ -- module B where+ -- import {-# SOURCE #-} A+ -- instance C Int where+ --+ -- -- A.hs+ -- module A where+ -- import B+ -- class C a where+ -- f :: a+ --+ -- Test cases: typecheck/should_fail/T13068+ = InstHeadAbstractClass !Class+ -- | An instance whose head is not a class.+ --+ -- Examples(s):+ --+ -- instance c+ --+ -- instance 42+ --+ -- instance !Show D+ --+ -- type C1 a = (Show (a -> Bool))+ -- instance C1 Int where+ --+ -- Test cases: typecheck/rename/T5513+ -- typecheck/rename/T16385+ -- parser/should_fail/T3811c+ -- rename/should_fail/T18240a+ -- polykinds/T13267+ -- deriving/should_fail/T23522+ | InstHeadNonClass+ !(Maybe TyCon) -- ^ the 'TyCon' at the head of the instance head,+ -- or 'Nothing' if the instance head is not even headed+ -- by a 'TyCon'++ -- | Instance head was headed by a type synonym.+ --+ -- Example:+ -- type MyInt = Int+ -- class C a where {..}+ -- instance C MyInt where {..}+ --+ -- Test cases: drvfail015, mod42, TidyClassKinds, tcfail139+ | InstHeadTySynArgs+ -- | Instance head was not of the form @T a1 ... an@,+ -- where @a1, ..., an@ are all type variables or literals.+ --+ -- Example:+ --+ -- instance Num [Int] where {..}+ --+ -- Test cases: mod41, mod42, tcfail044, tcfail047.+ | InstHeadNonTyVarArgs+ -- | Multi-param instance without -XMultiParamTypeClasses.+ --+ -- Example:+ --+ -- instance C a b where {..}+ --+ -- Test case: IllegalMultiParamInstance+ | InstHeadMultiParam+ deriving Generic+++-- | Why is a (type or data) family instance invalid?+data IllegalFamilyInstanceReason+ {-| A top-level family instance for a 'TyCon' that isn't a family 'TyCon'.++ Example:++ data D a = MkD+ type instance D Int = Bool++ Test case: indexed-types/should_fail/T3092+ -}+ = NotAFamilyTyCon+ !TypeOrData -- ^ was this a 'type' or a 'data' instance?+ !TyCon+ {-| A top-level (open) type family instance for a closed type family.++ Test cases:+ indexed-types/should_fail/Overlap7+ indexed-types/should_fail/Overlap3+ -}+ | NotAnOpenFamilyTyCon !TyCon++ {-| A family instance was declared for a family of a different kind,+ e.g. a data instance for a type family 'TyCon'.++ Test cases:+ T9896, SimpleFail3a+ -}+ | FamilyCategoryMismatch !TyCon -- ^ The family tycon+++ {-| A family instance was declared with a different number of arguments+ than expected.+ See Note [Oversaturated type family equations] in "GHC.Tc.Validity".++ Test cases:+ TyFamArity1, TyFamArity2, T11136, Overlap4, AssocTyDef05, AssocTyDef06,+ T14110+ -}+ | FamilyArityMismatch !TyCon -- ^ The family tycon+ !Arity -- ^ The right number of parameters++ {-| A closed type family equation used a different name than the parent family.++ Example:++ type family F a where+ G Int = Bool++ Test cases:+ Overlap5, T15362, T16002, T20260, T11623+ -}+ | TyFamNameMismatch !Name -- ^ The family name+ !Name -- ^ The name used in the equation+++ -- | There are out-of-scope type variables in the right-hand side+ -- of an associated type or data family instance.+ --+ -- Example:+ --+ -- instance forall a. C Int where+ -- data instance D Int = MkD1 a+ --+ -- Test cases: indexed-types/should_fail/T5515, polykinds/T9574, rename/should_fail/T18021+ | FamInstRHSOutOfScopeTyVars+ !(Maybe (TyCon, [Type], TyVarSet))+ -- ^ family 'TyCon', arguments, and set of "dodgy" type variables+ -- See Note [Dodgy binding sites in type family instances]+ -- in GHC.Tc.Validity+ ![Name] -- ^ the out-of-scope type variables++ | FamInstLHSUnusedBoundTyVars+ ![Name] -- ^ the unused bound type variables++ | InvalidAssoc !InvalidAssoc+ deriving Generic++data InvalidAssoc+ -- | An invalid associated family instance.+ --+ -- See t'InvalidAssocInstance'.Builder+ = InvalidAssocInstance !InvalidAssocInstance+ -- | An invalid associated family default declaration.+ --+ -- See t'InvalidAssocDefault'.+ | InvalidAssocDefault !InvalidAssocDefault+ deriving Generic++-- | The reason that an associated family instance was invalid.+data InvalidAssocInstance+ -- | A class instance is missing its expected associated type/data instance.+ --+ -- Test cases: deriving/should_compile/T14094+ -- indexed-types/should_compile/Simple2+ -- typecheck/should_compile/tc254+ = AssocInstanceMissing !Name++ -- | A top-level instance for an associated family 'TyCon'.+ --+ -- Example:+ --+ -- class C a where { type T a }+ -- instance T Int = Bool+ --+ -- Test case: indexed-types/should_fail/SimpleFail7+ | AssocInstanceNotInAClass !TyCon++ -- | An associated type instance is provided for a class that doesn't have+ -- that associated type.+ --+ -- Examples(s):+ -- $(do d <- instanceD (cxt []) (conT ''Eq `appT` conT ''Foo)+ -- [tySynInstD $ tySynEqn Nothing (conT ''Rep `appT` conT ''Foo) (conT ''Maybe)]+ -- return [d])+ -- ======>+ -- instance Eq Foo where+ -- type Rep Foo = Maybe+ --+ -- Test cases: th/T12387a+ | AssocNotInThisClass !Class !TyCon+ -- | An associated family instance does not mention any of the parent 'Class'+ -- 'TyVar's.+ --+ -- Test cases: T2888, T9167, T12867+ | AssocNoClassTyVar !Class !TyCon++ | AssocTyVarsDontMatch+ !ForAllTyFlag+ !TyCon -- ^ family 'TyCon'+ ![Type] -- ^ expected type arguments+ ![Type] -- ^ actual type arguments+ deriving Generic+++-- | The reason that an associated family default declaration was invalid.+data InvalidAssocDefault+ -- | An associated family default declaration for something that isn't+ -- an associated family.+ = AssocDefaultNotAssoc !Name -- ^ 'Class' 'Name'+ !Name -- ^ 'TyCon' 'Name'+ -- | Multiple default declarations were given for an associated+ -- family instance.+ --+ -- Test cases: none.+ | AssocMultipleDefaults !Name+ -- | Invalid arguments in an associated family instance.+ --+ -- See t'AssocDefaultBadArgs'.+ | AssocDefaultBadArgs !TyCon ![Type] AssocDefaultBadArgs+ deriving Generic++-- | Invalid arguments in an associated family instance declaration.+data AssocDefaultBadArgs+ -- | An argument which isn't a type variable in an associated+ -- family instance default declaration.+ = AssocDefaultNonTyVarArg !(Type, ForAllTyFlag)+ -- | Duplicate occurrence of a type variable in an associated+ -- family instance default declaration.+ | AssocDefaultDuplicateTyVars !(NE.NonEmpty (TyCoVar, ForAllTyFlag))+ deriving Generic++-- | A type representing whether or not the input type has associated data family instances.+data HasAssociatedDataFamInsts+ = YesHasAdfs+ | NoHasAdfs+ deriving Eq++hasAssociatedDataFamInsts :: Bool -> HasAssociatedDataFamInsts+hasAssociatedDataFamInsts True = YesHasAdfs+hasAssociatedDataFamInsts False = NoHasAdfs++-- | If 'YesAssocTyLastVarInKind', the associated type of a typeclass+-- contains the last type variable of the class in a kind, which is not (yet) allowed+-- by GHC.+data AssociatedTyLastVarInKind+ = YesAssocTyLastVarInKind !TyCon -- ^ The associated type family of the class+ | NoAssocTyLastVarInKind+ deriving Eq++associatedTyLastVarInKind :: Maybe TyCon -> AssociatedTyLastVarInKind+associatedTyLastVarInKind (Just tc) = YesAssocTyLastVarInKind tc+associatedTyLastVarInKind Nothing = NoAssocTyLastVarInKind++-- | If 'NoAssociatedTyNotParamOverLastTyVar', the associated type of a+-- typeclass is not parameterized over the last type variable of the class+data AssociatedTyNotParamOverLastTyVar+ = YesAssociatedTyNotParamOverLastTyVar !TyCon -- ^ The associated type family of the class+ | NoAssociatedTyNotParamOverLastTyVar+ deriving Eq++associatedTyNotParamOverLastTyVar :: Maybe TyCon -> AssociatedTyNotParamOverLastTyVar+associatedTyNotParamOverLastTyVar (Just tc) = YesAssociatedTyNotParamOverLastTyVar tc+associatedTyNotParamOverLastTyVar Nothing = NoAssociatedTyNotParamOverLastTyVar++-- | What kind of thing is missing a type signature?+--+-- Used for reporting @"missing signature"@ warnings, see+-- 'tcRnMissingSignature'.+data MissingSignature+ = MissingTopLevelBindingSig Name Type+ | MissingPatSynSig PatSyn+ | MissingTyConKindSig+ TyCon+ Bool -- ^ whether -XCUSKs is enabled++-- | Is the object we are dealing with exported or not?+--+-- Used for reporting @"missing signature"@ warnings, see+-- 'TcRnMissingSignature'.+data Exported+ = IsNotExported+ | IsExported+ deriving Eq++instance Outputable Exported where+ ppr IsNotExported = text "IsNotExported"+ ppr IsExported = text "IsExported"++-- | What declarations were not allowed in an hs-boot or hsig file?+data BadBootDecls+ = BootBindsPs !(NE.NonEmpty (LHsBindLR GhcRn GhcPs))+ | BootBindsRn !(NE.NonEmpty (LHsBindLR GhcRn GhcRn))+ | BootInstanceSigs !(NE.NonEmpty (LSig GhcRn))+ | BootFamInst !TyCon+ | BootSpliceDecls !(NE.NonEmpty (LocatedA (HsUntypedSplice GhcPs)))+ | BootForeignDecls !(NE.NonEmpty (LForeignDecl GhcRn))+ | BootDefaultDecls !(NE.NonEmpty (LDefaultDecl GhcRn))+ | BootRuleDecls !(NE.NonEmpty (LRuleDecls GhcRn))++-- | A mismatch between an hs-boot or signature file and its implementing module.+data BootMismatch+ -- | Something defined or exported by an hs-boot or signature file+ -- is missing from the implementing module.+ = MissingBootThing !Name !MissingBootThing++ -- | A typeclass instance is declared in the hs-boot file but+ -- it is not present in the implementing module.+ | MissingBootInstance !DFunId -- ^ the boot instance 'DFunId'+ -- NB: we never trigger this for hsig files, as in that case we do+ -- a full round of constraint solving, and a missing instance gets reported+ -- as an unsolved Wanted constraint with a 'InstProvidedOrigin' 'CtOrigin'.+ -- See GHC.Tc.Utils.Backpack.check_inst.++ -- | A mismatch between an hsig file and its implementing module+ -- in the 'Name' that a particular re-export refers to.+ | BadReexportedBootThing !Name !Name++ -- | A mismatch between the declaration of something in the hs-boot or+ -- signature file and its implementation, e.g. a type mismatch or+ -- a type family implemented as a class.+ | BootMismatch+ !TyThing -- ^ boot thing+ !TyThing -- ^ real thing+ !BootMismatchWhat+ deriving Generic++-- | Something from the hs-boot or signature file is missing from the+-- implementing module.+data MissingBootThing+ -- | Something defined in the hs-boot or signature file is not defined in the+ -- implementing module.+ = MissingBootDefinition+ -- | Something exported by the hs-boot or signature file is not exported by the+ -- implementing module.+ | MissingBootExport+ deriving Generic++missingBootThing :: HsBootOrSig -> Name -> MissingBootThing -> TcRnMessage+missingBootThing src nm thing =+ TcRnBootMismatch src (MissingBootThing nm thing)++-- | A mismatch of two 'TyThing's between an hs-boot or signature file+-- and its implementing module.+data BootMismatchWhat+ -- | The 'Id's have different types.+ = BootMismatchedIdTypes !Id -- ^ boot 'Id'+ !Id -- ^ real 'Id'+ -- | Two 'TyCon's aren't compatible.+ | BootMismatchedTyCons !TyCon -- ^ boot 'TyCon'+ !TyCon -- ^ real 'TyCon'+ !(NE.NonEmpty BootTyConMismatch)+ deriving Generic++-- | An error in the implementation of an abstract datatype using+-- a type synonym.+data SynAbstractDataError+ -- | The type synony was not nullary.+ = SynAbsDataTySynNotNullary+ -- | The type synonym RHS contained invalid types, e.g.+ -- a type family or a forall.+ | SynAbstractDataInvalidRHS !(NE.NonEmpty Type)++-- | Mismatched implementation of a 'TyCon' in an hs-boot or signature file.+data BootTyConMismatch+ -- | The 'TyCon' kinds differ.+ = TyConKindMismatch+ -- | The 'TyCon' 'Role's aren't compatible.+ | TyConRoleMismatch !Bool -- ^ True <=> role subtype check+ -- | Two type synonyms have different RHSs.+ | TyConSynonymMismatch !Kind !Kind+ -- | The two 'TyCon's are of a different flavour, e.g. one is+ -- a data family and the other is a type family.+ | TyConFlavourMismatch !FamTyConFlav !FamTyConFlav+ -- | The equations of a type family don't match.+ | TyConAxiomMismatch !(BootListMismatches CoAxBranch BootAxiomBranchMismatch)+ -- | The type family injectivity annotations don't match.+ | TyConInjectivityMismatch+ -- | The 'TyCon's are both datatype 'TyCon's, but they have diferent 'DataCon's.+ | TyConMismatchedData !AlgTyConRhs !AlgTyConRhs !BootDataMismatch+ -- | The 'TyCon's are both 'Class' 'TyCon's, but the classes don't match.+ | TyConMismatchedClasses !Class !Class !BootClassMismatch+ -- | The 'TyCon's are something completely different.+ | TyConsVeryDifferent+ -- | An abstract 'TyCon' is implemented using a type synonym in an invalid+ -- manner. See 'SynAbstractDataError'.+ | SynAbstractData !SynAbstractDataError+++-- | Utility datatype to record errors when checking compatibity+-- between two lists of things, e.g. class methods, associated types,+-- type family equations, etc.+data BootListMismatch item err+ -- | Different number of items.+ = MismatchedLength+ -- | The item at the given position in the list differs.+ | MismatchedThing !Int !item !item !err++type BootListMismatches item err =+ NE.NonEmpty (BootListMismatch item err)++data BootAxiomBranchMismatch+ -- | The quantified variables in an equation don't match.+ --+ -- Example: the quantification of @a@ in+ --+ -- @type family F a where { forall a. F a = Maybe a }@+ = MismatchedAxiomBinders+ -- | The LHSs of an equation don't match.+ | MismatchedAxiomLHS+ -- | The RHSs of an equation don't match.+ | MismatchedAxiomRHS++-- | A mismatch in a class, between its declaration in an hs-boot or signature+-- file, and its implementation in a source Haskell file.+data BootClassMismatch+ -- | The class methods don't match.+ = MismatchedMethods !(BootListMismatches ClassOpItem BootMethodMismatch)+ -- | The associated types don't match.+ | MismatchedATs !(BootListMismatches ClassATItem BootATMismatch)+ -- | The functional dependencies don't match.+ | MismatchedFunDeps+ -- | The superclasses don't match.+ | MismatchedSuperclasses+ -- | The @MINIMAL@ pragmas are not compatible.+ | MismatchedMinimalPragmas++-- | A mismatch in a class method, between its declaration in an hs-boot or signature+-- file, and its implementation in a source Haskell file.+data BootMethodMismatch+ -- | The class method names are different.+ = MismatchedMethodNames+ -- | The types of a class method are different.+ | MismatchedMethodTypes !Type !Type+ -- | The default method types are not compatible.+ | MismatchedDefaultMethods !Bool -- ^ True <=> subtype check++-- | A mismatch in an associated type of a class, between its declaration+-- in an hs-boot or signature file, and its implementation in a source Haskell file.+data BootATMismatch+ -- | Two associated types don't match.+ = MismatchedTyConAT !BootTyConMismatch+ -- | Two associated type defaults don't match.+ | MismatchedATDefaultType++-- | A mismatch in a datatype declaration, between an hs-boot file or signature+-- file and its implementing module.+data BootDataMismatch+ -- | A datatype is implemented as a newtype or vice-versa.+ = MismatchedNewtypeVsData+ -- | The constructors don't match.+ | MismatchedConstructors !(BootListMismatches DataCon BootDataConMismatch)+ -- | The datatype contexts differ.+ | MismatchedDatatypeContexts++-- | A mismatch in a data constrcutor, between its declaration in an hs-boot+-- file or signature file, and its implementation in a source Haskell module.+data BootDataConMismatch+ -- | The 'Name's of the 'DataCon's differ.+ = MismatchedDataConNames+ -- | The fixities of the 'DataCon's differ.+ | MismatchedDataConFixities+ -- | The strictness annotations of the 'DataCon's differ.+ | MismatchedDataConBangs+ -- | The 'DataCon's have different field labels.+ | MismatchedDataConFieldLabels+ -- | The 'DataCon's have incompatible types.+ | MismatchedDataConTypes++--------------------------------------------------------------------------------+--+-- Errors used in GHC.Tc.Errors+--+--------------------------------------------------------------------------------++{- Note [Error report]+~~~~~~~~~~~~~~~~~~~~~~+The idea is that error msgs are divided into three parts: the main msg, the+context block ("In the second argument of ..."), and the relevant bindings+block, which are displayed in that order, with a mark to divide them. The+the main msg ('report_important') varies depending on the error+in question, but context and relevant bindings are always the same, which+should simplify visual parsing.++See 'GHC.Tc.Errors.Types.SolverReport' and 'GHC.Tc.Errors.mkErrorReport'.+-}++-- | A collection of main error messages and supplementary information.+--+-- In practice, we will:+-- - display the important messages first,+-- - then the error context (e.g. by way of a call to 'GHC.Tc.Errors.mkErrorReport'),+-- - then the supplementary information (e.g. relevant bindings, valid hole fits),+-- - then the hints ("Possible fix: ...").+--+-- So this is mostly just a way of making sure that the error context appears+-- early on rather than at the end of the message.+--+-- See Note [Error report] for details.+data SolverReport+ = SolverReport+ { sr_important_msg :: SolverReportWithCtxt+ , sr_supplementary :: [SolverReportSupplementary]+ , sr_hints :: [GhcHint]+ }++-- | Additional information to print in a 'SolverReport', after the+-- important messages and after the error context.+--+-- See Note [Error report].+data SolverReportSupplementary+ = SupplementaryBindings RelevantBindings+ | SupplementaryHoleFits ValidHoleFits+ | SupplementaryCts [(PredType, RealSrcSpan)]++-- | A 'TcSolverReportMsg', together with context (e.g. enclosing implication constraints)+-- that are needed in order to report it.+data SolverReportWithCtxt =+ SolverReportWithCtxt+ { reportContext :: SolverReportErrCtxt+ -- ^ Context for what we wish to report.+ -- This can change as we enter implications, so is+ -- stored alongside the content.+ , reportContent :: TcSolverReportMsg+ -- ^ The content of the message to report.+ }+ deriving Generic++-- | Context needed when reporting a 'TcSolverReportMsg', such as+-- the enclosing implication constraints or whether we are deferring type errors.+data SolverReportErrCtxt+ = CEC { cec_encl :: [Implication] -- ^ Enclosing implications+ -- (innermost first)+ -- ic_skols and givens are tidied, rest are not+ , cec_tidy :: TidyEnv++ , cec_binds :: EvBindsVar -- ^ We make some errors (depending on cec_defer)+ -- into warnings, and emit evidence bindings+ -- into 'cec_binds' for unsolved constraints++ , cec_defer_type_errors :: DiagnosticReason -- ^ Whether to defer type errors until runtime++ -- We might throw a warning on an error when encountering a hole,+ -- depending on the type of hole (expression hole, type hole, out of scope hole).+ -- We store the reasons for reporting a diagnostic for each type of hole.+ , cec_expr_holes :: DiagnosticReason -- ^ Reason for reporting holes in expressions.+ , cec_type_holes :: DiagnosticReason -- ^ Reason for reporting holes in types.+ , cec_out_of_scope_holes :: DiagnosticReason -- ^ Reason for reporting out of scope holes.++ , cec_warn_redundant :: Bool -- ^ True <=> -Wredundant-constraints+ , cec_expand_syns :: Bool -- ^ True <=> -fprint-expanded-synonyms++ , cec_suppress :: Bool -- ^ True <=> More important errors have occurred,+ -- so create bindings if need be, but+ -- don't issue any more errors/warnings+ -- See Note [Suppressing error messages]+ }++getUserGivens :: SolverReportErrCtxt -> [UserGiven]+-- One item for each enclosing implication+getUserGivens (CEC {cec_encl = implics}) = getUserGivensFromImplics implics++----------------------------------------------------------------------------+--+-- ErrorItem+--+----------------------------------------------------------------------------++-- | A predicate with its arising location; used to encapsulate a constraint+-- that will give rise to a diagnostic.+data ErrorItem+-- We could perhaps use Ct here (and indeed used to do exactly that), but+-- having a separate type gives to denote errors-in-formation gives us+-- a nice place to do pre-processing, such as calculating ei_suppress.+-- Perhaps some day, an ErrorItem could eventually evolve to contain+-- the error text (or some representation of it), so we can then have all+-- the errors together when deciding which to report.+ = EI { ei_pred :: PredType -- report about this+ -- The ei_pred field will never be an unboxed equality with+ -- a (casted) tyvar on the right; this is guaranteed by the solver+ , ei_evdest :: Maybe TcEvDest+ -- ^ for Wanteds, where to put the evidence+ -- for Givens, Nothing+ , ei_flavour :: CtFlavour+ , ei_loc :: CtLoc+ , ei_m_reason :: Maybe CtIrredReason -- if this ErrorItem was made from a+ -- CtIrred, this stores the reason+ , ei_suppress :: Bool -- Suppress because of Note [Wanteds rewrite Wanteds]+ -- in GHC.Tc.Constraint+ }++instance Outputable ErrorItem where+ ppr (EI { ei_pred = pred+ , ei_evdest = m_evdest+ , ei_flavour = flav+ , ei_suppress = supp })+ = pp_supp <+> ppr flav <+> pp_dest m_evdest <+> ppr pred+ where+ pp_dest Nothing = empty+ pp_dest (Just ev) = ppr ev <+> dcolon++ pp_supp = if supp then text "suppress:" else empty++errorItemOrigin :: ErrorItem -> CtOrigin+errorItemOrigin = ctLocOrigin . ei_loc++errorItemEqRel :: ErrorItem -> EqRel+errorItemEqRel = predTypeEqRel . ei_pred++errorItemCtLoc :: ErrorItem -> CtLoc+errorItemCtLoc = ei_loc++errorItemPred :: ErrorItem -> PredType+errorItemPred = ei_pred++{- Note [discardProvCtxtGivens]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In most situations we call all enclosing implications "useful". There is one+exception, and that is when the constraint that causes the error is from the+"provided" context of a pattern synonym declaration:++ pattern Pat :: (Num a, Eq a) => Show a => a -> Maybe a+ -- required => provided => type+ pattern Pat x <- (Just x, 4)++When checking the pattern RHS we must check that it does actually bind all+the claimed "provided" constraints; in this case, does the pattern (Just x, 4)+bind the (Show a) constraint. Answer: no!++But the implication we generate for this will look like+ forall a. (Num a, Eq a) => [W] Show a+because when checking the pattern we must make the required+constraints available, since they are needed to match the pattern (in+this case the literal '4' needs (Num a, Eq a)).++BUT we don't want to suggest adding (Show a) to the "required" constraints+of the pattern synonym, thus:+ pattern Pat :: (Num a, Eq a, Show a) => Show a => a -> Maybe a+It would then typecheck but it's silly. We want the /pattern/ to bind+the alleged "provided" constraints, Show a.++So we suppress that Implication in discardProvCtxtGivens. It's+painfully ad-hoc but the truth is that adding it to the "required"+constraints would work. Suppressing it solves two problems. First,+we never tell the user that we could not deduce a "provided"+constraint from the "required" context. Second, we never give a+possible fix that suggests to add a "provided" constraint to the+"required" context.++For example, without this distinction the above code gives a bad error+message (showing both problems):++ error: Could not deduce (Show a) ... from the context: (Eq a)+ ... Possible fix: add (Show a) to the context of+ the signature for pattern synonym `Pat' ...+-}+++discardProvCtxtGivens :: CtOrigin -> [UserGiven] -> [UserGiven]+discardProvCtxtGivens orig givens -- See Note [discardProvCtxtGivens]+ | ProvCtxtOrigin (PSB {psb_id = L _ name}) <- orig+ = filterOut (discard name) givens+ | otherwise+ = givens+ where+ discard n (Implic { ic_info = SigSkol (PatSynCtxt n') _ _ }) = n == n'+ discard _ _ = False+++-- | An error reported after constraint solving.+-- This is usually, some sort of unsolved constraint error,+-- but we try to be specific about the precise problem we encountered.+data TcSolverReportMsg+ -- | Quantified variables appear out of dependency order.+ --+ -- Example:+ --+ -- forall (a :: k) k. ...+ --+ -- Test cases: BadTelescope2, T16418, T16247, T16726, T18451.+ = BadTelescope TyVarBndrs [TyCoVar]++ -- | We came across a custom type error and we have decided to report it.+ --+ -- Example:+ --+ -- type family F a where+ -- F a = TypeError (Text "error")+ --+ -- err :: F ()+ -- err = ()+ --+ -- Test cases: CustomTypeErrors0{1,2,3,4,5}, T12104.+ | UserTypeError ErrorMsgType -- ^ the message to report++ -- | Report a Wanted constraint of the form "Unsatisfiable msg".+ | UnsatisfiableError ErrorMsgType -- ^ the message to report++ -- | We want to report an out of scope variable or a typed hole.+ -- See 'HoleError'.+ | ReportHoleError Hole HoleError++ -- | Cannot unify a variable, because of a type mismatch.+ | CannotUnifyVariable+ { mismatchMsg :: MismatchMsg+ , cannotUnifyReason :: CannotUnifyVariableReason }++ -- | A mismatch between two types.+ | Mismatch+ { mismatchMsg :: MismatchMsg+ , mismatchTyVarInfo :: Maybe TyVarInfo+ , mismatchAmbiguityInfo :: [AmbiguityInfo]+ , mismatchCoercibleInfo :: Maybe CoercibleMsg }++ -- | A violation of the representation-polymorphism invariants.+ --+ -- See 'FixedRuntimeRepErrorInfo' and 'FixedRuntimeRepContext' for more information.+ | FixedRuntimeRepError [FixedRuntimeRepErrorInfo]++ -- | An equality between two types is blocked on a kind equality+ -- between their kinds.+ --+ -- Test cases: none.+ | BlockedEquality ErrorItem+ -- These are for the "blocked" equalities, as described in+ -- Note [Equalities with incompatible kinds] in GHC.Tc.Solver.Equality,+ -- wrinkle (EIK2). There should always be another unsolved wanted around,+ -- which will ordinarily suppress this message. But this can still be printed out+ -- with -fdefer-type-errors (sigh), so we must produce a message.++ -- | Something was not applied to sufficiently many arguments.+ --+ -- Example:+ --+ -- instance Eq Maybe where {..}+ --+ -- Test case: T11563.+ | ExpectingMoreArguments Int TypedThing++ -- | Trying to use an unbound implicit parameter.+ --+ -- Example:+ --+ -- foo :: Int+ -- foo = ?param+ --+ -- Test case: tcfail130.+ | UnboundImplicitParams+ (NE.NonEmpty ErrorItem)++ -- | A constraint couldn't be solved because it contains+ -- ambiguous type variables.+ --+ -- Example:+ --+ -- class C a b where+ -- f :: (a,b)+ --+ -- x = fst f+ --+ --+ -- Test case: T4921.+ | AmbiguityPreventsSolvingCt+ ErrorItem -- ^ always a class constraint+ ([TyVar], [TyVar]) -- ^ ambiguous kind and type variables, respectively++ -- | Could not solve a constraint; there were several unifying candidate instances+ -- but no matching instances. This is used to report as much useful information+ -- as possible about why we couldn't choose any instance, e.g. because of+ -- ambiguous type variables.+ | CannotResolveInstance+ { cannotResolve_item :: ErrorItem+ , cannotResolve_unifiers :: [ClsInst]+ , cannotResolve_candidates :: [ClsInst]+ , cannotResolve_importErrors :: [ImportError]+ , cannotResolve_suggestions :: [GhcHint]+ , cannotResolve_relevant_bindings :: RelevantBindings }+ -- TODO: remove the fields of type [GhcHint] and RelevantBindings,+ -- in order to handle them uniformly with other diagnostic messages.++ -- | Could not solve a constraint using available instances+ -- because the instances overlap.+ --+ -- Test cases: tcfail118, tcfail121, tcfail218.+ | OverlappingInstances+ { overlappingInstances_item :: ErrorItem+ , overlappingInstances_matches :: NE.NonEmpty ClsInst+ , overlappingInstances_unifiers :: [ClsInst] }++ -- | Could not solve a constraint from instances because+ -- instances declared in a Safe module cannot overlap instances+ -- from other modules (with -XSafeHaskell).+ --+ -- Test cases: SH_Overlap{1,2,5,6,7,11}.+ | UnsafeOverlap+ { unsafeOverlap_item :: ErrorItem+ , unsafeOverlap_match :: ClsInst+ , unsafeOverlapped :: NE.NonEmpty ClsInst }++ deriving Generic++data MismatchMsg+ = -- | Couldn't unify two types or kinds.+ --+ -- Example:+ --+ -- 3 + 3# -- can't match a lifted type with an unlifted type+ --+ -- Test cases: T1396, T8263, ...+ BasicMismatch+ { mismatch_ea :: MismatchEA -- ^ Should this be phrased in terms of expected vs actual?+ , mismatch_item :: ErrorItem -- ^ The constraint in which the mismatch originated.+ , mismatch_ty1 :: Type -- ^ First type (the expected type if if mismatch_ea is True)+ , mismatch_ty2 :: Type -- ^ Second type (the actual type if mismatch_ea is True)+ , mismatch_whenMatching :: Maybe WhenMatching+ , mismatch_mb_same_occ :: Maybe SameOccInfo+ }++ -- | A type has an unexpected kind.+ --+ -- Test cases: T2994, T7609, ...+ | KindMismatch+ { kmismatch_what :: TypedThing -- ^ What thing is 'kmismatch_actual' the kind of?+ , kmismatch_expected :: Type+ , kmismatch_actual :: Type+ }+ -- TODO: combine with 'BasicMismatch'.++ -- | A mismatch between two types, which arose from a type equality.+ --+ -- Test cases: T1470, tcfail212.+ | TypeEqMismatch+ { teq_mismatch_ppr_explicit_kinds :: Bool+ , teq_mismatch_item :: ErrorItem+ , teq_mismatch_ty1 :: Type+ , teq_mismatch_ty2 :: Type+ , teq_mismatch_expected :: Type -- ^ The overall expected type+ , teq_mismatch_actual :: Type -- ^ The overall actual type+ , teq_mismatch_what :: Maybe TypedThing -- ^ What thing is 'teq_mismatch_actual' the kind of?+ , teq_mb_same_occ :: Maybe SameOccInfo+ }+ -- TODO: combine with 'BasicMismatch'.++ -- | Couldn't solve some Wanted constraints using the Givens.+ -- Used for messages such as @"No instance for ..."@ and+ -- @"Could not deduce ... from"@.+ | CouldNotDeduce+ { cnd_user_givens :: [Implication]+ -- | The Wanted constraints we couldn't solve.+ --+ -- N.B.: the 'ErrorItem' at the head of the list has been tidied,+ -- perhaps not the others.+ , cnd_wanted :: NE.NonEmpty ErrorItem++ -- | Some additional info consumed by 'mk_supplementary_ea_msg'.+ , cnd_extra :: Maybe CND_Extra+ }+ deriving Generic++-- | Construct a basic mismatch message between two types.+--+-- See 'pprMismatchMsg' for how such a message is displayed to users.+mkBasicMismatchMsg :: MismatchEA -> ErrorItem -> Type -> Type -> MismatchMsg+mkBasicMismatchMsg ea item ty1 ty2+ = BasicMismatch+ { mismatch_ea = ea+ , mismatch_item = item+ , mismatch_ty1 = ty1+ , mismatch_ty2 = ty2+ , mismatch_whenMatching = Nothing+ , mismatch_mb_same_occ = Nothing+ }++-- | Whether to use expected/actual in a type mismatch message.+data MismatchEA+ -- | Don't use expected/actual.+ = NoEA+ -- | Use expected/actual.+ | EA+ { mismatch_mbEA :: Maybe ExpectedActualInfo+ -- ^ Whether to also mention type synonym expansion.+ }++data CannotUnifyVariableReason+ = -- | A type equality between a type variable and a polytype.+ --+ -- Test cases: T12427a, T2846b, T10194, ...+ CannotUnifyWithPolytype ErrorItem TyVar Type (Maybe TyVarInfo)++ -- | An occurs check.+ | OccursCheck+ { occursCheckInterestingTyVars :: [TyVar]+ , occursCheckAmbiguityInfos :: [AmbiguityInfo] }++ -- | A skolem type variable escapes its scope.+ --+ -- Example:+ --+ -- data Ex where { MkEx :: a -> MkEx }+ -- foo (MkEx x) = x+ --+ -- Test cases: TypeSkolEscape, T11142.+ | SkolemEscape ErrorItem Implication [TyVar]++ -- | Can't unify the type variable with the other type+ -- due to the kind of type variable it is.+ --+ -- For example, trying to unify a 'SkolemTv' with the+ -- type Int, or with a 'TyVarTv'.+ | DifferentTyVars TyVarInfo+ | RepresentationalEq TyVarInfo (Maybe CoercibleMsg)+ deriving Generic++-- | Report a mismatch error without any extra+-- information.+mkPlainMismatchMsg :: MismatchMsg -> TcSolverReportMsg+mkPlainMismatchMsg msg+ = Mismatch+ { mismatchMsg = msg+ , mismatchTyVarInfo = Nothing+ , mismatchAmbiguityInfo = []+ , mismatchCoercibleInfo = Nothing }++-- | Additional information to be given in a 'CouldNotDeduce' message,+-- which is then passed on to 'mk_supplementary_ea_msg'.+data CND_Extra = CND_Extra TypeOrKind Type Type++-- | A cue to print out information about type variables,+-- e.g. where they were bound, when there is a mismatch @tv1 ~ ty2@.+data TyVarInfo =+ TyVarInfo { thisTyVar :: TyVar+ , thisTyVarIsUntouchable :: Maybe Implication+ , otherTy :: Maybe TyVar }++-- | Add some information to disambiguate errors in which+-- two 'Names' would otherwise appear to be identical.+--+-- See Note [Disambiguating (X ~ X) errors].+data SameOccInfo+ = SameOcc+ { sameOcc_same_pkg :: Bool -- ^ Whether the two 'Name's also came from the same package.+ , sameOcc_lhs :: Name+ , sameOcc_rhs :: Name }++-- | Add some information about ambiguity+data AmbiguityInfo++ -- | Some type variables remained ambiguous: print them to the user.+ = Ambiguity+ { lead_with_ambig_msg :: Bool -- ^ True <=> start the message with "Ambiguous type variable ..."+ -- False <=> create a message of the form "The type variable is ambiguous."+ , ambig_tyvars :: ([TyVar], [TyVar]) -- ^ Ambiguous kind and type variables, respectively.+ -- Guaranteed to not both be empty.+ }++ -- | Remind the user that a particular type family is not injective.+ | NonInjectiveTyFam TyCon++-- | Expected/actual information.+data ExpectedActualInfo+ -- | Display the expected and actual types.+ = ExpectedActual+ { ea_expected, ea_actual :: Type }++ -- | Display the expected and actual types, after expanding type synonyms.+ | ExpectedActualAfterTySynExpansion+ { ea_expanded_expected, ea_expanded_actual :: Type }++-- | Explain how a kind equality originated.+data WhenMatching++ = WhenMatching TcType TcType CtOrigin (Maybe TypeOrKind)+ deriving Generic++data BadImportKind+ -- | Module does not export...+ = BadImportNotExported [GhcHint] -- ^ suggestions for what might have been meant+ -- | Missing @type@ keyword when importing a type.+ | BadImportAvailTyCon+ -- | Trying to import a data constructor directly, e.g.+ -- @import Data.Maybe (Just)@ instead of @import Data.Maybe (Maybe(Just))@+ | BadImportAvailDataCon OccName+ -- | The parent does not export the given children.+ | BadImportNotExportedSubordinates [OccName]+ -- | Incorrect @type@ keyword when importing something which isn't a type.+ | BadImportAvailVar+ deriving Generic++-- | Some form of @"not in scope"@ error. See also the 'OutOfScopeHole'+-- constructor of 'HoleError'.+data NotInScopeError++ -- | A run-of-the-mill @"not in scope"@ error.+ = NotInScope++ -- | Like 'NotInScope', but when we know we are looking for a+ -- record field.+ | NotARecordField++ -- | An exact 'Name' was not in scope.+ --+ -- This usually indicates a problem with a Template Haskell splice.+ --+ -- Test cases: T5971, T18263.+ | NoExactName Name++ -- The same exact 'Name' occurs in multiple name-spaces.+ --+ -- This usually indicates a problem with a Template Haskell splice.+ --+ -- Test case: T7241.+ | SameName [GlobalRdrElt] -- ^ always at least 2 elements++ -- A type signature, fixity declaration, pragma, standalone kind signature...+ -- is missing an associated binding.+ | MissingBinding SDoc [GhcHint]+ -- TODO: remove the SDoc argument.++ -- | Couldn't find a top-level binding.+ --+ -- Happens when specifying an annotation for something that+ -- is not in scope.+ --+ -- Test cases: annfail01, annfail02, annfail11.+ | NoTopLevelBinding++ -- | A class doesn't have a method with this name,+ -- or, a class doesn't have an associated type with this name,+ -- or, a record doesn't have a record field with this name.+ | UnknownSubordinate SDoc++ -- | A name is not in scope during type checking but passed the renamer.+ --+ -- Test cases:+ -- none+ | NotInScopeTc (NameEnv TcTyThing)+ deriving Generic++-- | Create a @"not in scope"@ error message for the given 'RdrName'.+mkTcRnNotInScope :: RdrName -> NotInScopeError -> TcRnMessage+mkTcRnNotInScope rdr err = TcRnNotInScope err rdr [] noHints++-- | Configuration for pretty-printing valid hole fits.+data HoleFitDispConfig =+ HFDC { showWrap, showWrapVars, showType, showProv, showMatches+ :: Bool }++-- | Report an error involving a 'Hole'.+--+-- This could be an out of scope data constructor or variable,+-- a typed hole, or a wildcard in a type.+data HoleError+ -- | Report an out-of-scope data constructor or variable+ -- masquerading as an expression hole.+ --+ -- See Note [Insoluble holes] in GHC.Tc.Types.Constraint.+ -- See 'NotInScopeError' for other not-in-scope errors.+ --+ -- Test cases: T9177a.+ = OutOfScopeHole [ImportError]+ -- | Report a typed hole, or wildcard, with additional information.+ | HoleError HoleSort+ [TcTyVar] -- Other type variables which get computed on the way.+ [(SkolemInfoAnon, [TcTyVar])] -- Zonked and grouped skolems for the type of the hole.++-- | A message that aims to explain why two types couldn't be seen+-- to be representationally equal.+data CoercibleMsg+ -- | Not knowing the role of a type constructor prevents us from+ -- concluding that two types are representationally equal.+ --+ -- Example:+ --+ -- foo :: Applicative m => m (Sum Int)+ -- foo = coerce (pure $ 1 :: Int)+ --+ -- We don't know what role `m` has, so we can't coerce `m Int` to `m (Sum Int)`.+ --+ -- Test cases: T8984, TcCoercibleFail.+ = UnknownRoles Type++ -- | The fact that a 'TyCon' is abstract prevents us from decomposing+ -- a 'TyConApp' and deducing that two types are representationally equal.+ --+ -- Test cases: none.+ | TyConIsAbstract TyCon++ -- | We can't unwrap a newtype whose constructor is not in scope.+ --+ -- Example:+ --+ -- import Data.Ord (Down) -- NB: not importing the constructor+ -- foo :: Int -> Down Int+ -- foo = coerce+ --+ -- Test cases: TcCoercibleFail.+ | OutOfScopeNewtypeConstructor TyCon DataCon++-- | Explain a problem with an import.+data ImportError+ -- | Couldn't find a module with the requested name.+ = MissingModule ModuleName+ -- | The imported modules don't export what we're looking for.+ | ModulesDoNotExport (NE.NonEmpty Module) OccName++-- | This datatype collates instances that match or unifier,+-- in order to report an error message for an unsolved typeclass constraint.+data PotentialInstances+ = PotentialInstances+ { matches :: [ClsInst]+ , unifiers :: [ClsInst]+ }++-- | A collection of valid hole fits or refinement fits,+-- in which some fits might have been suppressed.+data FitsMbSuppressed+ = Fits+ { fits :: [HoleFit]+ , fitsSuppressed :: Bool -- ^ Whether we have suppressed any fits because there were too many.+ }++-- | A collection of hole fits and refinement fits.+data ValidHoleFits+ = ValidHoleFits+ { holeFits :: FitsMbSuppressed+ , refinementFits :: FitsMbSuppressed+ }++noValidHoleFits :: ValidHoleFits+noValidHoleFits = ValidHoleFits (Fits [] False) (Fits [] False)++data RelevantBindings+ = RelevantBindings+ { relevantBindingNamesAndTys :: [(Name, Type)]+ , ranOutOfFuel :: Bool -- ^ Whether we ran out of fuel generating the bindings.+ }++-- | Display some relevant bindings.+pprRelevantBindings :: RelevantBindings -> SDoc+-- This function should be in "GHC.Tc.Errors.Ppr",+-- but it's here for the moment as it's needed in "GHC.Tc.Errors".+pprRelevantBindings (RelevantBindings bds ran_out_of_fuel) =+ ppUnless (null rel_bds) $+ hang (text "Relevant bindings include")+ 2 (vcat (map ppr_binding rel_bds) $$ ppWhen ran_out_of_fuel discardMsg)+ where+ ppr_binding (nm, tidy_ty) =+ sep [ pprPrefixOcc nm <+> dcolon <+> ppr tidy_ty+ , nest 2 (parens (text "bound at"+ <+> ppr (getSrcLoc nm)))]+ rel_bds = filter (not . isGeneratedSrcSpan . getSrcSpan . fst) bds++discardMsg :: SDoc+discardMsg = text "(Some bindings suppressed;" <+>+ text "use -fmax-relevant-binds=N or -fno-max-relevant-binds)"+++-- | Stores the information to be reported in a representation-polymorphism+-- error message.+data FixedRuntimeRepErrorInfo+ = FRR_Info+ { frr_info_origin :: FixedRuntimeRepOrigin+ -- ^ What is the original type we checked for+ -- representation-polymorphism, and what specific+ -- check did we perform?+ , frr_info_not_concrete :: Maybe (TcTyVar, TcType)+ -- ^ Which non-concrete type did we try to+ -- unify this concrete type variable with?+ }++{-+************************************************************************+* *+\subsection{Contexts for renaming errors}+* *+************************************************************************+-}++-- AZ:TODO: Change these all to be Name instead of RdrName.+-- Merge TcType.UserTypeContext in to it.+data HsDocContext+ = TypeSigCtx SDoc+ | StandaloneKindSigCtx SDoc+ | PatCtx+ | SpecInstSigCtx+ | DefaultDeclCtx+ | ForeignDeclCtx (LocatedN RdrName)+ | DerivDeclCtx+ | RuleCtx FastString+ | TyDataCtx (LocatedN RdrName)+ | TySynCtx (LocatedN RdrName)+ | TyFamilyCtx (LocatedN RdrName)+ | FamPatCtx (LocatedN RdrName) -- The patterns of a type/data family instance+ | ConDeclCtx [LocatedN Name]+ | ClassDeclCtx (LocatedN RdrName)+ | ExprWithTySigCtx+ | TypBrCtx+ | HsTypeCtx+ | HsTypePatCtx+ | GHCiCtx+ | SpliceTypeCtx (LHsType GhcPs)+ | ClassInstanceCtx+ | GenericCtx SDoc++-- | Context for a mismatch in the number of arguments+data MatchArgsContext+ = EquationArgs+ !Name -- ^ Name of the function+ | PatternArgs+ !(HsMatchContext GhcTc) -- ^ Pattern match specifics++-- | The information necessary to report mismatched+-- numbers of arguments in a match group.+data MatchArgBadMatches where+ MatchArgMatches+ :: { matchArgFirstMatch :: LocatedA (Match GhcRn body)+ , matchArgBadMatches :: NE.NonEmpty (LocatedA (Match GhcRn body)) }+ -> MatchArgBadMatches++-- | The context for an "empty statement group" error.+data EmptyStatementGroupErrReason+ = EmptyStmtsGroupInParallelComp+ -- ^ Empty statement group in a parallel list comprehension+ | EmptyStmtsGroupInTransformListComp+ -- ^ Empty statement group in a transform list comprehension+ --+ -- Example:+ -- [() | then ()]+ | EmptyStmtsGroupInDoNotation HsDoFlavour+ -- ^ Empty statement group in do notation+ --+ -- Example:+ -- do+ | EmptyStmtsGroupInArrowNotation+ -- ^ Empty statement group in arrow notation+ --+ -- Example:+ -- proc () -> do++ deriving (Generic)++-- | An existential wrapper around @'StmtLR' GhcPs GhcPs body@.+data UnexpectedStatement where+ UnexpectedStatement+ :: Outputable (StmtLR GhcPs GhcPs body)+ => StmtLR GhcPs GhcPs body+ -> UnexpectedStatement++data DeclSort = ClassDeclSort | InstanceDeclSort++data NonStandardGuards where+ NonStandardGuards+ :: (Outputable body,+ Anno (Stmt GhcRn body) ~ SrcSpanAnnA)+ => [LStmtLR GhcRn GhcRn body]+ -> NonStandardGuards++data RuleLhsErrReason+ = UnboundVariable RdrName NotInScopeError+ | IllegalExpression++data HsigShapeMismatchReason =+ {-| HsigShapeSortMismatch is an error indicating that an item in the+ export list of a signature doesn't match the item of the same name in+ another signature when merging the two – one is a type while the other is a+ plain identifier.++ Test cases:+ none+ -}+ HsigShapeSortMismatch !AvailInfo !AvailInfo+ |+ {-| HsigShapeNotUnifiable is an error indicating that a name in the+ export list of a signature cannot be unified with a name of the same name in+ another signature when merging the two.++ Test cases:+ bkpfail20, bkpfail21+ -}+ HsigShapeNotUnifiable !Name !Name !Bool+ deriving (Generic)++data WrongThingSort+ = WrongThingType+ | WrongThingDataCon+ | WrongThingPatSyn+ | WrongThingConLike+ | WrongThingClass+ | WrongThingTyCon+ | WrongThingAxiom++data StageCheckReason+ = StageCheckInstance !InstanceWhat !PredType+ | StageCheckSplice !Name++data UninferrableTyVarCtx+ = UninfTyCtx_ClassContext [TcType]+ | UninfTyCtx_DataContext [TcType]+ | UninfTyCtx_ProvidedContext [TcType]+ | UninfTyCtx_TyFamRhs TcType+ | UninfTyCtx_TySynRhs TcType+ | UninfTyCtx_Sig TcType (LHsSigType GhcRn)++data PatSynInvalidRhsReason+ = PatSynNotInvertible !(Pat GhcRn)+ | PatSynUnboundVar !Name+ deriving (Generic)++data BadFieldAnnotationReason where+ {-| A lazy data type field annotation (~) was used without enabling the+ extension StrictData.++ Test cases:+ LazyFieldsDisabled+ -}+ LazyFieldsDisabled :: BadFieldAnnotationReason+ {-| An UNPACK pragma was applied to a field without strictness annotation (!).++ Test cases:+ T14761a, T7562+ -}+ UnpackWithoutStrictness :: BadFieldAnnotationReason+ {-| An UNPACK pragma was applied to an abstract type in an indefinite package+ in Backpack.++ Test cases:+ unpack_sums_5, T3966, T7050+ -}+ BackpackUnpackAbstractType :: BadFieldAnnotationReason+ deriving (Generic)++data SuperclassCycle =+ MkSuperclassCycle { cls :: Class, definite :: Bool, reasons :: [SuperclassCycleDetail] }++data SuperclassCycleDetail+ = SCD_HeadTyVar !PredType+ | SCD_HeadTyFam !PredType+ | SCD_Superclass !Class++data RoleValidationFailedReason+ = TyVarRoleMismatch !TyVar !Role+ | TyVarMissingInEnv !TyVar+ | BadCoercionRole !Coercion+ deriving (Generic)++data DisabledClassExtension where+ {-| MultiParamTypeClasses is required.++ Test cases:+ readFail037, TcNoNullaryTC+ -}+ MultiParamDisabled :: !Int -- ^ The arity+ -> DisabledClassExtension+ {-| FunctionalDependencies is required.++ Test cases:+ readFail041+ -}+ FunDepsDisabled :: DisabledClassExtension+ {-| ConstrainedClassMethods is required.++ Test cases:+ mod39, tcfail150+ -}+ ConstrainedClassMethodsDisabled :: !Id+ -> !TcPredType+ -> DisabledClassExtension+ deriving (Generic)++data TyFamsDisabledReason+ = TyFamsDisabledFamily !Name+ | TyFamsDisabledInstance !TyCon+ deriving (Generic)++data TypeApplication+ = TypeApplication !(HsType GhcPs) !TypeOrKind+ | TypeApplicationInPattern !(HsConPatTyArg GhcPs)+ deriving Generic++-- | Either `HsType p` or `HsSigType p`.+--+-- Used for reporting errors in `TcRnIllegalKind`.+data HsTypeOrSigType p+ = HsType (HsType p)+ | HsSigType (HsSigType p)++instance OutputableBndrId p => Outputable (HsTypeOrSigType (GhcPass p)) where+ ppr (HsType ty) = ppr ty+ ppr (HsSigType sig_ty) = ppr sig_ty++-- | A wrapper around HsTyVarBndr.+-- Used for reporting errors in `TcRnUnusedQuantifiedTypeVar`.+data HsTyVarBndrExistentialFlag = forall flag. OutputableBndrFlag flag 'Renamed =>+ HsTyVarBndrExistentialFlag (HsTyVarBndr flag GhcRn)++instance Outputable HsTyVarBndrExistentialFlag where+ ppr (HsTyVarBndrExistentialFlag hsTyVarBndr) = ppr hsTyVarBndr++type TySynCycleTyCons =+ [Either TyCon (LTyClDecl GhcRn)]++-- | Different types of warnings for dodgy imports.+data DodgyImportsReason =+ {-| An import of the form 'T(..)' or 'f(..)' does not actually import anything beside+ 'T'/'f' itself.++ Test cases:+ DodgyImports+ -}+ DodgyImportsEmptyParent !GlobalRdrElt+ |+ {-| A 'hiding' clause contains something that would be reported as an error in a+ regular import, but is relaxed to a warning.++ Test cases:+ DodgyImports_hiding+ -}+ DodgyImportsHiding !ImportLookupReason+ deriving (Generic)++-- | Different types of errors for import lookup.+data ImportLookupReason where+ {-| An item in an import statement is not exported by the corresponding+ module.++ Test cases:+ T21826, recomp001, retc001, mod79, mod80, mod81, mod91, T6007, T7167,+ T9006, T11071, T9905fail2, T5385, T10668+ -}+ ImportLookupBad :: BadImportKind+ -> ModIface+ -> ImpDeclSpec+ -> IE GhcPs+ -> Bool -- ^ whether @-XPatternSynonyms@ was enabled+ -> ImportLookupReason+ {-| A name is specified with a qualifying module.++ Test cases:+ T3792+ -}+ ImportLookupQualified :: !RdrName -- ^ The name extracted from the import item+ -> ImportLookupReason++ {-| Something completely unexpected is in an import list, like @module Foo@.++ Test cases:+ ImportLookupIllegal+ -}+ ImportLookupIllegal :: ImportLookupReason+ {-| An item in an import list matches multiple names exported from that module.++ Test cases:+ None+ -}+ ImportLookupAmbiguous :: !RdrName -- ^ The name extracted from the import item+ -> ![GlobalRdrElt] -- ^ The potential matches+ -> ImportLookupReason+ deriving (Generic)++-- | Distinguish record fields from other names for pretty-printing.+data UnusedImportName where+ UnusedImportNameRecField :: !Parent -> !OccName -> UnusedImportName+ UnusedImportNameRegular :: !Name -> UnusedImportName++-- | Different types of errors for unused imports.+data UnusedImportReason where+ {-| No names in the import list are used in the module.++ Test cases:+ overloadedrecfldsfail06, T10890_2, t22391, t22391j, T1074, prog018,+ mod177, rn046, rn037, T5211+ -}+ UnusedImportNone :: UnusedImportReason+ {-| A set of names in the import list are not used in the module.++ Test cases:+ overloadedrecfldsfail06, T17324, mod176, T11970A, rn046, T14881,+ T7454, T8149, T13064+ -}+ UnusedImportSome :: ![UnusedImportName] -- ^ The unsed names+ -> UnusedImportReason+ deriving (Generic)++-- | Different places in which a nested foralls/contexts error might occur.+data NestedForallsContextsIn+ -- | Nested forall in @SPECIALISE instance@+ = NFC_Specialize+ -- | Nested forall in @deriving via@ (via-type)+ | NFC_ViaType+ -- | Nested forall in the type of a GADT constructor+ | NFC_GadtConSig+ -- | Nested forall in an instance head+ | NFC_InstanceHead+ -- | Nested forall in a standalone deriving instance head+ | NFC_StandaloneDerivedInstanceHead+ -- | Nested forall in deriving class type+ | NFC_DerivedClassType++-- | Provenance of an unused name.+data UnusedNameProv+ = UnusedNameTopDecl+ | UnusedNameImported !ModuleName+ | UnusedNameTypePattern+ | UnusedNameMatch+ | UnusedNameLocalBind++-- | Different reasons for TcRnNonCanonicalDefinition.+data NonCanonicalDefinition =+ -- | Related to @(<>)@ and @mappend@.+ NonCanonicalMonoid NonCanonical_Monoid+ |+ -- | Related to @(*>)@/@(>>)@ and @pure@/@return@.+ NonCanonicalMonad NonCanonical_Monad+ deriving (Generic)++-- | Possible cases for the -Wnoncanonical-monoid-instances.+data NonCanonical_Monoid =+ -- | @(<>) = mappend@ was defined.+ NonCanonical_Sappend+ |+ -- | @mappend@ was defined as something other than @(<>)@.+ NonCanonical_Mappend++-- | Possible cases for the -Wnoncanonical-monad-instances.+data NonCanonical_Monad =+ -- | @pure = return@ was defined.+ NonCanonical_Pure+ |+ -- | @(*>) = (>>)@ was defined.+ NonCanonical_ThenA+ |+ -- | @return@ was defined as something other than @pure@.+ NonCanonical_Return+ |+ -- | @(>>)@ was defined as something other than @(*>)@.+ NonCanonical_ThenM++-- | Why was an instance declaration rejected?+data IllegalInstanceReason+ = IllegalClassInstance+ !TypedThing -- ^ the instance head type+ !IllegalClassInstanceReason -- ^ the problem with the instance head+ | IllegalFamilyInstance !IllegalFamilyInstanceReason+ | IllegalFamilyApplicationInInstance+ !Type -- ^ the instance head type+ !Bool -- ^ is this an invisible argument?+ !TyCon -- ^ type family+ ![Type] -- ^ type family argument+ deriving Generic++-- | Why was a class instance declaration rejected?+data IllegalClassInstanceReason+ -- | An illegal type at the head of the instance.+ --+ -- See t'IllegalInstanceHeadReason'.+ = IllegalInstanceHead !IllegalInstanceHeadReason+ -- | An illegal HasField instance. See t'IllegalHasFieldInstance'.+ | IllegalHasFieldInstance !IllegalHasFieldInstance+ -- | An illegal instance for a built-in typeclass such as+ -- 'Coercible', 'Typeable', or 'KnownNat', outside of a signature file.+ --+ -- Test cases: deriving/should_fail/T9687+ -- deriving/should_fail/T14916+ -- polykinds/T8132+ -- typecheck/should_fail/TcCoercibleFail2+ -- typecheck/should_fail/T12837+ -- typecheck/should_fail/T14390+ | IllegalSpecialClassInstance !Class !Bool -- ^ Whether the error is due to Safe Haskell being enabled+ -- | The instance failed the coverage condition, i.e. the functional+ -- dependencies were not respected.+ --+ -- Example:+ --+ -- class C a b | a -> b where {..}+ -- instance C a b where {..}+ --+ -- Test cases: T9106, T10570, T2247, T12803, tcfail170.+ | IllegalInstanceFailsCoverageCondition+ !Class !CoverageProblem+ deriving Generic++-- | Why was a HasField instance declaration rejected?+data IllegalHasFieldInstance+ -- | HasField instance for a type not headed by a TyCon.+ --+ -- Example:+ --+ -- instance HasField a where {..}+ --+ -- Test case: hasfieldfail03+ = IllegalHasFieldInstanceNotATyCon+ -- | HasField instance for a data family.+ --+ -- Example:+ --+ -- data family D a+ -- data instance D Int = MkDInt Char+ --+ -- instance HasField "fld" (D Int) where {..}+ --+ -- Test case: hasfieldfail03+ | IllegalHasFieldInstanceFamilyTyCon+ -- | HasField instance for a type that already has that field.+ --+ -- Example+ --+ -- data T = MkT { quux :: Int }+ -- instance HasField "quux" T Int where {..}+ --+ -- Test case: hasfieldfail03+ | IllegalHasFieldInstanceTyConHasField !TyCon !FieldLabelString+ -- | HasField instance for a type that already has fields, when the+ -- field label could potentially unify with those fields.+ --+ -- Example:+ --+ -- data T = MkInt { quux :: Int }+ -- instance forall (fld :: Symbol). HasField fld T Int where {..}+ --+ -- Test case: hasfieldfail03+ | IllegalHasFieldInstanceTyConHasFields !TyCon !Type -- ^ the label type in the instance head+ deriving Generic++-- | Description of an instance coverage condition failure.+data CoverageProblem =+ CoverageProblem+ { not_covered_fundep :: ([TyVar], [TyVar])+ , not_covered_fundep_inst :: ([Type], [Type])+ , not_covered_invis_vis_tvs :: Pair VarSet+ , not_covered_liberal :: FailedCoverageCondition+ }++-- | Which instance coverage condition failed? Was it the liberal+-- coverage condition?+data FailedCoverageCondition+ -- | Failed the instance coverage condition (ICC)+ = FailedICC+ { alsoFailedLICC :: !Bool+ -- ^ Whether the instance also failed the LICC+ }+ -- | Failed the liberal instance coverage condition (LICC)+ | FailedLICC++--------------------------------------------------------------------------------+-- Template Haskell errors++data THError+ -- | A syntax error with Template Haskel quotes & splices.+ -- See t'THSyntaxError'.+ = THSyntaxError !THSyntaxError+ -- | An error in Template Haskell involving 'Name's.+ -- See t'THNameError'.+ | THNameError !THNameError+ -- | An error in Template Haskell reification. See t'THReifyError'.+ | THReifyError !THReifyError+ -- | An error due to typing restrictions in Typed Template Haskell.+ -- See t'TypedTHError'.+ | TypedTHError !TypedTHError+ -- | An error occurred when trying to run a splice in Template Haskell.+ -- See 'SpliceFailReason'.+ | THSpliceFailed !SpliceFailReason+ -- | An error involving the 'addTopDecls' functionality. See t'AddTopDeclsError'.+ | AddTopDeclsError !AddTopDeclsError++ {-| IllegalStaticFormInSplice is an error when a user attempts to define+ a static pointer in a Template Haskell splice.++ Example(s):++ Test cases: th/TH_StaticPointers02+ -}+ | IllegalStaticFormInSplice !(HsExpr GhcPs)++ {-| FailedToLookupThInstName is a Template Haskell error that occurrs when looking up an+ instance fails.++ Example(s):++ Test cases: showIface/should_fail/THPutDocNonExistent+ -}+ | FailedToLookupThInstName !TH.Type !LookupTHInstNameErrReason++ {-| AddInvalidCorePlugin is a Template Haskell error indicating that a+ Core plugin being added has an invalid module due to being+ in the current package.++ Example(s):++ Test cases:+ -}+ | AddInvalidCorePlugin !String -- ^ Module name++ {-| AddDocToNonLocalDefn is a Template Haskell error for documentation being added to a+ definition which is not in the current module.++ Example(s):++ Test cases: showIface/should_fail/THPutDocExternal+ -}+ | AddDocToNonLocalDefn !TH.DocLoc++ {-| ReportCustomQuasiError is an error or warning thrown using 'qReport' from+ the 'Quasi' instance of 'TcM'.++ Example(s):++ Test cases:+ -}+ | ReportCustomQuasiError+ !Bool -- ^ True => Error, False => Warning+ !String -- ^ Error body+ deriving Generic++-- | An error involving Template Haskell quotes or splices, e.g. nested+-- quotation brackets or the use of an untyped bracket inside a typed splice.+data THSyntaxError+ = {-| IllegalTHQuotes is an error that occurs when a Template Haskell+ quote is used without the TemplateHaskell extension enabled.++ Test case: T18251e+ -}+ IllegalTHQuotes !(HsExpr GhcPs)++ {-| IllegalTHSplice is an error that occurs when a Template Haskell+ splice occurs without having enabled the TemplateHaskell extension.++ Test cases:+ bkpfail01, bkpfail05, bkpfail09, bkpfail16, bkpfail35, bkpcabal06+ -}+ | IllegalTHSplice++ {-| NestedTHBrackets is an error that occurs when Template Haskell+ brackets are nested without any intervening splices.++ Example:++ foo = [| [| 'x' |] |]++ Test cases: TH_NestedSplicesFail{5,6,7,8}+ -}+ | NestedTHBrackets++ {-| MismatchedSpliceType is an error that happens when a typed bracket+ or splice is used inside a typed splice/bracket, or the other way around.++ Examples:++ f1 = [| $$x |]+ f2 = [|| $y ||]+ f3 = $$( [| 'x' |] )+ f4 = $( [|| 'y' ||] )++ Test cases: TH_NestedSplicesFail{1,2,3,4}+ -}+ | MismatchedSpliceType+ SpliceType -- ^ type of the splice+ SpliceOrBracket -- ^ what's nested inside+ {-| BadImplicitSplice is an error thrown when a user uses top-level implicit+ TH-splice without enabling the TemplateHaskell extension.++ Example:++ pure [] -- on top-level++ Test cases: ghci/prog019/prog019+ ghci/scripts/T1914+ ghci/scripts/T6106+ rename/should_fail/T4042+ rename/should_fail/T12146+ -}+ | BadImplicitSplice+ deriving Generic++data THNameError+ {-| NonExactName is a Template Haskell error that occurs when the user+ attempts to define a binder with a 'RdrName' that is not an exact 'Name'.++ Example(s):++ Test cases:+ -}+ = NonExactName !RdrName++ {-| QuotedNameWrongStage is an error that can happen when a+ (non-top-level) Name is used at a different Template Haskell stage+ than the stage at which it is bound.++ Test cases: T16976z+ -}+ | QuotedNameWrongStage !(HsQuote GhcPs)+ deriving Generic++data THReifyError+ = {-| CannotReifyInstance is a Template Haskell error for when an instance being reified+ via `reifyInstances` is not a class constraint or type family application.++ Example(s):++ Test cases:+ -}+ CannotReifyInstance !Type++ {-| CannotReifyOutOfScopeThing is a Template Haskell error indicating+ that the given name is not in scope and therefore cannot be reified.++ Example(s):++ Test cases: th/T16976f+ -}+ | CannotReifyOutOfScopeThing !TH.Name++ {-| CannotReifyThingNotInTypeEnv is a Template Haskell error occurring+ when the given name is not in the type environment and therefore cannot be reified.++ Example(s):++ Test cases:+ -}+ | CannotReifyThingNotInTypeEnv !Name++ {-| NoRolesAssociatedWithName is a Template Haskell error for when the user+ tries to reify the roles of a given name but it is not something that has+ roles associated with it.++ Example(s):++ Test cases:+ -}+ | NoRolesAssociatedWithThing !TcTyThing++ {-| CannotRepresentThing is a Template Haskell error indicating that a+ type cannot be reified because it does not have a representation in Template Haskell.++ Example(s):++ Test cases:+ -}+ | CannotRepresentType !UnrepresentableTypeDescr !Type+ deriving Generic++data AddTopDeclsError+ = {-| InvalidTopDecl is a Template Haskell error occurring when one of the 'Dec's passed to+ 'addTopDecls' is not a function, value, annotation, or foreign import declaration.++ Example(s):++ Test cases:+ -}+ InvalidTopDecl !(HsDecl GhcPs)+ {-| UnexpectedDeclarationSplice is an error that occurs when a Template Haskell+ splice appears inside top-level declarations added with 'addTopDecls'.++ Example(s): none++ Test cases: none+ -}+ | AddTopDeclsUnexpectedDeclarationSplice++ | AddTopDeclsRunSpliceFailure !RunSpliceFailReason+ deriving Generic++data TypedTHError+ = {-| SplicePolymorphicLocalVar is the error that occurs when the expression+ inside typed Template Haskell brackets is a polymorphic local variable.++ Example(s):+ x = \(y :: forall a. a -> a) -> [|| y ||]++ Test cases: quotes/T10384+ -}+ SplicePolymorphicLocalVar !Id++ {-| TypedTHWithPolyType is an error that signifies the illegal use+ of a polytype in a typed Template Haskell expression.++ Example(s):+ bad :: (forall a. a -> a) -> ()+ bad = $$( [|| \_ -> () ||] )++ Test cases: th/T11452+ -}+ | TypedTHWithPolyType !TcType+ deriving Generic++data SpliceFailReason+ = {-| SpliceThrewException is an error that occurs when running a Template+ Haskell splice throws an exception.++ Example(s):++ Test cases: annotations/should_fail/annfail12+ perf/compiler/MultiLayerModulesTH_Make+ perf/compiler/MultiLayerModulesTH_OneShot+ th/T10796b+ th/T19470+ th/T19709d+ th/T5358+ th/T5976+ th/T7276a+ th/T8987+ th/TH_exn1+ th/TH_exn2+ th/TH_runIO+ -}+ SpliceThrewException+ !SplicePhase+ !SomeException+ !String -- ^ Result of showing the exception (cannot be done safely outside IO)+ !(LHsExpr GhcTc)+ !Bool -- True <=> Print the expression++ {-| RunSpliceFailure is an error indicating that a Template Haskell splice+ failed to be converted into a valid expression.++ Example(s):++ Test cases: th/T10828a+ th/T10828b+ th/T12478_4+ th/T15270A+ th/T15270B+ th/T16895a+ th/T16895b+ th/T16895c+ th/T16895d+ th/T16895e+ th/T18740d+ th/T2597b+ th/T2674+ th/T3395+ th/T7484+ th/T7667a+ th/TH_implicitParamsErr1+ th/TH_implicitParamsErr2+ th/TH_implicitParamsErr3+ th/TH_invalid_add_top_decl+ -}+ | RunSpliceFailure !RunSpliceFailReason+ deriving Generic++data RunSpliceFailReason+ = ConversionFail !ThingBeingConverted !ConversionFailReason+ deriving Generic++-- | Identifies the TH splice attempting to be converted+data ThingBeingConverted+ = ConvDec !TH.Dec+ | ConvExp !TH.Exp+ | ConvPat !TH.Pat+ | ConvType !TH.Type++-- | The reason a TH splice could not be converted to a Haskell expression+data ConversionFailReason+ = IllegalOccName !OccName.NameSpace !String+ | SumAltArityExceeded !TH.SumAlt !TH.SumArity+ | IllegalSumAlt !TH.SumAlt+ | IllegalSumArity !TH.SumArity+ | MalformedType !TypeOrKind !TH.Type+ | IllegalLastStatement !HsDoFlavour !(LStmt GhcPs (LHsExpr GhcPs))+ | KindSigsOnlyAllowedOnGADTs+ | IllegalDeclaration !THDeclDescriptor !IllegalDecls+ | CannotMixGADTConsWith98Cons+ | EmptyStmtListInDoBlock+ | NonVarInInfixExpr+ | MultiWayIfWithoutAlts+ | CasesExprWithoutAlts+ | ImplicitParamsWithOtherBinds+ | InvalidCCallImpent !String -- ^ Source+ | RecGadtNoCons+ | GadtNoCons+ | InvalidTypeInstanceHeader !TH.Type+ | InvalidTyFamInstLHS !TH.Type+ | InvalidImplicitParamBinding+ | DefaultDataInstDecl ![LDataFamInstDecl GhcPs]+ | FunBindLacksEquations !TH.Name+ deriving Generic++data IllegalDecls+ = IllegalDecls !(NE.NonEmpty (LHsDecl GhcPs))+ | IllegalFamDecls !(NE.NonEmpty (LFamilyDecl GhcPs))++-- | Label for a TH declaration+data THDeclDescriptor+ = InstanceDecl+ | WhereClause+ | LetBinding+ | LetExpression+ | ClssDecl++-- | The phase in which an exception was encountered when dealing with a TH splice+data SplicePhase+ = SplicePhase_Run+ | SplicePhase_CompileAndLink++data LookupTHInstNameErrReason+ = NoMatchesFound+ | CouldNotDetermineInstance++data UnrepresentableTypeDescr+ = LinearInvisibleArgument+ | CoercionsInTypes++-- FFI error types+data IllegalForeignTypeReason+ = TypeCannotBeMarshaled !Type TypeCannotBeMarshaledReason+ | ForeignDynNotPtr+ !Type -- ^ Expected type+ !Type -- ^ Actual type+ | SafeHaskellMustBeInIO+ | IOResultExpected+ | UnexpectedNestedForall+ | LinearTypesNotAllowed+ | OneArgExpected+ | AtLeastOneArgExpected+ deriving Generic++-- | Reason why a type cannot be marshalled through the FFI.+data TypeCannotBeMarshaledReason+ = NotADataType+ | NewtypeDataConNotInScope !TyCon ![Type]+ | UnliftedFFITypesNeeded+ | NotABoxedMarshalableTyCon+ | ForeignLabelNotAPtr+ | NotSimpleUnliftedType+ | NotBoxedKindAny+ deriving Generic
+ GHC/Tc/Errors/Types/PromotionErr.hs view
@@ -0,0 +1,97 @@+{-# LANGUAGE DeriveGeneric #-}+module GHC.Tc.Errors.Types.PromotionErr ( PromotionErr(..)+ , pprPECategory+ , peCategory+ ) where++import GHC.Prelude+import GHC.Core.Type (ThetaType)+import GHC.Utils.Outputable+import GHC.Utils.Misc+import GHC.Generics (Generic)++data PromotionErr+ = TyConPE -- TyCon used in a kind before we are ready+ -- data T :: T -> * where ...+ | ClassPE -- Ditto Class++ | FamDataConPE -- Data constructor for a data family+ -- See Note [AFamDataCon: not promoting data family constructors]+ -- in GHC.Tc.Utils.Env.+ | ConstrainedDataConPE ThetaType -- Data constructor with a context+ -- See Note [No constraints in kinds] in GHC.Tc.Validity+ | PatSynPE -- Pattern synonyms+ -- See Note [Don't promote pattern synonyms] in GHC.Tc.Utils.Env++ | RecDataConPE -- Data constructor in a recursive loop+ -- See Note [Recursion and promoting data constructors] in GHC.Tc.TyCl+ | TermVariablePE -- See Note [Promoted variables in types]+ | NoDataKindsDC -- -XDataKinds not enabled (for a datacon)+ | TypeVariablePE -- See Note [Type variable scoping errors during typechecking]+ deriving (Generic)++instance Outputable PromotionErr where+ ppr ClassPE = text "ClassPE"+ ppr TyConPE = text "TyConPE"+ ppr PatSynPE = text "PatSynPE"+ ppr FamDataConPE = text "FamDataConPE"+ ppr (ConstrainedDataConPE theta) = text "ConstrainedDataConPE" <+> parens (ppr theta)+ ppr RecDataConPE = text "RecDataConPE"+ ppr NoDataKindsDC = text "NoDataKindsDC"+ ppr TermVariablePE = text "TermVariablePE"+ ppr TypeVariablePE = text "TypeVariablePE"++pprPECategory :: PromotionErr -> SDoc+pprPECategory = text . capitalise . peCategory++peCategory :: PromotionErr -> String+peCategory ClassPE = "class"+peCategory TyConPE = "type constructor"+peCategory PatSynPE = "pattern synonym"+peCategory FamDataConPE = "data constructor"+peCategory ConstrainedDataConPE{} = "data constructor"+peCategory RecDataConPE = "data constructor"+peCategory NoDataKindsDC = "data constructor"+peCategory TermVariablePE = "term variable"+peCategory TypeVariablePE = "type variable"+++{- Note [Type variable scoping errors during typechecking]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider the scoping of the type variable `a` in the following+term-level example:++ -- f :: [forall b . Either b ()]+ f = [Right @a @() () :: forall a. Either a ()]++Here `@a` in the type application and `a` in the type signature refer to+the same type variable. Indeed, this term elaborates to the following Core:++ f = [(\@a -> Right @a @() ()) :: forall a . Either a ()]++But how does this work with types? Suppose we have:++ type F = '[Right @a @() () :: forall a. Either a ()]++To be consistent with the term-level language, we would have to elaborate+this using a big lambda:++ type F = '[(/\ a . Right @a @() ()) :: forall a. Either a ()]++Core has no such construct, so this is not a valid type.++Conclusion: Even with -XExtendedForAllScope, the forall'd variables of a+kind signature on a type cannot scope over the type.++In implementation terms, to get a helpful error message we do this:++* The renamer treats the type variable as bound by the forall+ (so it doesn't just say "out of scope"); see the `HsKindSig` case of GHC.Rename.HsType.rnHsTyKi.++* The typechecker adds the forall-bound type variables to the type environent,+ but bound to `APromotionErr TypeVariablePE`; see the call to `tcAddKindSigPlaceholders`+ in the `HsKindSig` case of `GHC.Tc.Gen.HsType.tc_infer_hs_type`.++* The occurrence site of a type variable then complains when it finds `APromotionErr`;+ see `GHC.Tc.Gen.HsType.tcTyVar`.+-}
GHC/Tc/Gen/App.hs view
@@ -32,6 +32,7 @@ import GHC.Tc.Utils.TcMType import GHC.Tc.Types.Origin import GHC.Tc.Utils.TcType as TcType+import GHC.Tc.Zonk.TcType import GHC.Core.TyCon import GHC.Core.TyCo.Rep import GHC.Core.TyCo.Ppr@@ -43,7 +44,7 @@ import GHC.Types.Var.Set import GHC.Builtin.PrimOps( tagToEnumKey ) import GHC.Builtin.Names-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Types.SrcLoc import GHC.Types.Var.Env ( emptyTidyEnv, mkInScopeSet ) import GHC.Data.Maybe@@ -370,7 +371,7 @@ -- is on we must call tcSubType. -- Zonk app_res_rho first, because QL may have instantiated some -- delta variables to polytypes, and tcSubType doesn't expect that- do { app_res_rho <- zonkQuickLook do_ql app_res_rho+ do { app_res_rho <- liftZonkM $ zonkQuickLook do_ql app_res_rho ; tcSubTypeDS rn_expr app_res_rho exp_res_ty } -- Typecheck the value arguments@@ -383,7 +384,7 @@ else do rebuildHsApps tc_fun fun_ctxt tc_args app_res_rho ; whenDOptM Opt_D_dump_tc_trace $- do { inst_args <- mapM zonkArg inst_args -- Only when tracing+ do { inst_args <- liftZonkM $ mapM zonkArg inst_args -- Only when tracing ; traceTc "tcApp }" (vcat [ text "rn_fun:" <+> ppr rn_fun , text "rn_args:" <+> ppr rn_args , text "inst_args" <+> brackets (pprWithCommas pprHsExprArgTc inst_args)@@ -410,7 +411,7 @@ -- See Note [Quick Look for particular Ids] quickLookKeys = [dollarIdKey, leftSectionKey, rightSectionKey] -zonkQuickLook :: Bool -> TcType -> TcM TcType+zonkQuickLook :: Bool -> TcType -> ZonkM TcType -- After all Quick Look unifications are done, zonk to ensure that all -- instantiation variables are substituted away --@@ -427,7 +428,7 @@ -- zonkArg is used *only* during debug-tracing, to make it easier to -- see what is going on. For that reason, it is not a full zonk: add -- more if you need it.-zonkArg :: HsExprArg 'TcpInst -> TcM (HsExprArg 'TcpInst)+zonkArg :: HsExprArg 'TcpInst -> ZonkM (HsExprArg 'TcpInst) zonkArg eva@(EValArg { eva_arg_ty = Scaled m ty }) = do { ty' <- zonkTcType ty ; return (eva { eva_arg_ty = Scaled m ty' }) }@@ -459,7 +460,7 @@ -- Then Theta = [p :-> forall a. a->a], and we want -- to check 'e' with expected type (forall a. a->a) -- See Note [Instantiation variables are short lived]- arg_ty <- zonkQuickLook do_ql arg_ty+ arg_ty <- liftZonkM $ zonkQuickLook do_ql arg_ty -- Now check the argument ; arg' <- tcScalingUsage mult $@@ -543,25 +544,16 @@ HsUnboundVar {} -> True _ -> False - inst_all, inst_inferred, inst_none :: ForAllTyFlag -> Bool- inst_all (Invisible {}) = True- inst_all Required = False-- inst_inferred (Invisible InferredSpec) = True- inst_inferred (Invisible SpecifiedSpec) = False- inst_inferred Required = False-- inst_none _ = False- inst_fun :: [HsExprArg 'TcpRn] -> ForAllTyFlag -> Bool- inst_fun [] | inst_final = inst_all- | otherwise = inst_none- -- Using `inst_none` for `:type` avoids+ -- True <=> instantiate a tyvar with this ForAllTyFlag+ inst_fun [] | inst_final = isInvisibleForAllTyFlag+ | otherwise = const False+ -- Using `const False` for `:type` avoids -- `forall {r1} (a :: TYPE r1) {r2} (b :: TYPE r2). a -> b` -- turning into `forall a {r2} (b :: TYPE r2). a -> b`. -- See #21088.- inst_fun (EValArg {} : _) = inst_all- inst_fun _ = inst_inferred+ inst_fun (EValArg {} : _) = isInvisibleForAllTyFlag+ inst_fun _ = isInferredForAllTyFlag ----------- go, go1 :: Delta@@ -588,7 +580,12 @@ -- c.f. GHC.Tc.Utils.Instantiate.topInstantiate go1 delta acc so_far fun_ty args | (tvs, body1) <- tcSplitSomeForAllTyVars (inst_fun args) fun_ty- , (theta, body2) <- tcSplitPhiTy body1+ , (theta, body2) <- if inst_fun args Inferred+ then tcSplitPhiTy body1+ else ([], body1)+ -- inst_fun args Inferred: dictionary parameters are like Inferred foralls+ -- E.g. #22908: f :: Foo => blah+ -- No foralls! But if inst_final=False, don't instantiate , not (null tvs && null theta) = do { (inst_tvs, wrap, fun_rho) <- addHeadCtxt fun_ctxt $ instantiateSigma fun_orig tvs theta body2@@ -656,7 +653,7 @@ -- Suppose kappa :: kk -- Then fun_ty :: kk, fun_ty' :: Type, kind_co :: Type ~ kk -- co_wrap :: (fun_ty' |> kind_co) ~ fun_ty'- ; writeMetaTyVar kappa (mkCastTy fun_ty' kind_co)+ ; liftZonkM $ writeMetaTyVar kappa (mkCastTy fun_ty' kind_co) -- kappa is uninstantiated ('go' already checked that) ; go delta' acc' so_far fun_ty' args } @@ -723,7 +720,7 @@ kind = tyVarKind tv ; ty_arg <- tcHsTypeApp hs_ty kind - ; inner_ty <- zonkTcType inner_ty+ ; inner_ty <- liftZonkM $ zonkTcType inner_ty -- See Note [Visible type application zonk] ; let in_scope = mkInScopeSet (tyCoVarsOfTypes [fun_ty, ty_arg])@@ -739,7 +736,7 @@ ; return (ty_arg, insted_ty) } | otherwise- = do { (_, fun_ty) <- zonkTidyTcType emptyTidyEnv fun_ty+ = do { (_, fun_ty) <- liftZonkM $ zonkTidyTcType emptyTidyEnv fun_ty ; failWith $ TcRnInvalidTypeApplication fun_ty hs_ty } {- Note [Required quantifiers in the type of a term]@@ -953,7 +950,7 @@ ; return app_res_rho } quickLookResultType _ app_res_rho (Infer {})- = zonkTcType app_res_rho+ = liftZonkM $ zonkTcType app_res_rho -- Zonk the result type, to ensure that we substitute out any -- filled-in instantiation variable before calling -- unifyExpectedType. In the Check case, this isn't necessary,@@ -1037,7 +1034,7 @@ do { info <- readMetaTyVar kappa ; case info of Indirect ty1 -> go bvs ty1 ty2- Flexi -> do { ty2 <- zonkTcType ty2+ Flexi -> do { ty2 <- liftZonkM $ zonkTcType ty2 ; go_flexi bvs kappa ty2 } } ----------------@@ -1057,7 +1054,7 @@ vcat [ hang (ppr kappa <+> dcolon <+> ppr kappa_kind) 2 (text ":=" <+> ppr ty2 <+> dcolon <+> ppr ty2_kind) , text "co:" <+> ppr co ]- ; writeMetaTyVar kappa (mkCastTy ty2 co) }+ ; liftZonkM $ writeMetaTyVar kappa (mkCastTy ty2 co) } | otherwise = return () -- Occurs-check or forall-bound variable@@ -1086,7 +1083,7 @@ calling unifyKind, producing a coercion perhaps emitting some deferred equality constraints. That is /different/ from the approach we use in the main constraint solver for heterogeneous equalities; see Note- [Equalities with incompatible kinds] in Solver.Canonical+ [Equalities with incompatible kinds] in GHC.Tc.Solver.Equality Why different? Because: - We can't use qlUnify to solve the kind constraint because qlUnify@@ -1196,7 +1193,7 @@ -- See Note [tagToEnum#] Urgh! tcTagToEnum tc_fun fun_ctxt tc_args res_ty | [val_arg] <- dropWhile (not . isHsValArg) tc_args- = do { res_ty <- zonkTcType res_ty+ = do { res_ty <- liftZonkM $ zonkTcType res_ty -- Check that the type is algebraic ; case tcSplitTyConApp_maybe res_ty of {@@ -1226,7 +1223,8 @@ vanilla_result = rebuildHsApps tc_fun fun_ctxt tc_args res_ty check_enumeration ty' tc- | -- isTypeDataTyCon: see Note [Type data declarations] in GHC.Rename.Module+ | -- isTypeDataTyCon: see wrinkle (W1) in+ -- Note [Type data declarations] in GHC.Rename.Module isTypeDataTyCon tc = addErrTc (TcRnTagToEnumResTyTypeData ty') | isEnumerationTyCon tc = return () | otherwise = addErrTc (TcRnTagToEnumResTyNotAnEnum ty')
GHC/Tc/Gen/Bind.hs view
@@ -29,10 +29,12 @@ import GHC.Types.Tickish (CoreTickish, GenTickish (..)) import GHC.Types.CostCentre (mkUserCC, mkDeclCCFlavour)-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Data.FastString import GHC.Hs +import GHC.Rename.Bind ( rejectBootDecls )+ import GHC.Tc.Errors.Types import GHC.Tc.Gen.Sig import GHC.Tc.Utils.Concrete ( hasFixedRuntimeRep_syntactic )@@ -50,8 +52,9 @@ import GHC.Tc.Instance.Family( tcGetFamInstEnvs ) import GHC.Tc.Utils.TcType import GHC.Tc.Validity (checkValidType, checkEscapingKind)+import GHC.Tc.Zonk.TcType -import GHC.Core.Predicate+import GHC.Core.Predicate ( getEqPredTys_maybe ) import GHC.Core.Reduction ( Reduction(..) ) import GHC.Core.Multiplicity import GHC.Core.FamInstEnv( normaliseType )@@ -72,6 +75,7 @@ import GHC.Types.Name import GHC.Types.Name.Set import GHC.Types.Name.Env+import GHC.Types.SourceFile import GHC.Types.SrcLoc import GHC.Utils.Error@@ -231,9 +235,10 @@ 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+-- signatures in it. The renamer checked all this. tcHsBootSigs binds sigs- = do { checkTc (null binds) TcRnIllegalHsBootFileDecl+ = do { unless (null binds) $+ rejectBootDecls HsBoot BootBindsRn (concatMap (bagToList . snd) binds) ; concatMapM (addLocMA tc_boot_sig) (filter isTypeLSig sigs) } where tc_boot_sig (TypeSig _ lnames hs_ty) = mapM f lnames@@ -751,57 +756,103 @@ checkMonomorphismRestriction :: [MonoBindInfo] -> [LHsBind GhcRn] -> TcM Bool -- True <=> apply the MR+-- See Note [When the MR applies] checkMonomorphismRestriction mbis lbinds- | null partial_sigs -- The normal case = do { mr_on <- xoptM LangExt.MonomorphismRestriction ; let mr_applies = mr_on && any (restricted . unLoc) lbinds- ; when mr_applies $ mapM_ checkOverloadedSig sigs+ ; when mr_applies $ mapM_ checkOverloadedSig mbis ; return mr_applies }-- | otherwise -- See Note [Partial type signatures and the monomorphism restriction]- = return (all is_mono_psig partial_sigs)- where- sigs, partial_sigs :: [TcIdSigInst]- sigs = [sig | MBI { mbi_sig = Just sig } <- mbis]- partial_sigs = [sig | sig@(TISI { sig_inst_sig = PartialSig {} }) <- sigs]-- complete_sig_bndrs :: NameSet- complete_sig_bndrs- = mkNameSet [ idName bndr- | TISI { sig_inst_sig = CompleteSig { sig_bndr = bndr }} <- sigs ]+ no_mr_bndrs :: NameSet+ no_mr_bndrs = mkNameSet (mapMaybe no_mr_name mbis) - is_mono_psig (TISI { sig_inst_theta = theta, sig_inst_wcx = mb_extra_constraints })- = null theta && isNothing mb_extra_constraints+ no_mr_name :: MonoBindInfo -> Maybe Name+ -- Just n for binders that have a signature that says "no MR needed for me"+ no_mr_name (MBI { mbi_sig = Just sig })+ | TISI { sig_inst_sig = info, sig_inst_theta = theta, sig_inst_wcx = wcx } <- sig+ = case info of+ CompleteSig { sig_bndr = bndr } -> Just (idName bndr)+ PartialSig { psig_name = nm }+ | null theta, isNothing wcx -> Nothing -- f :: _ -> _+ | otherwise -> Just nm -- f :: Num a => a -> _+ -- For the latter case, we don't want the MR:+ -- the user has explicitly specified a type-class context+ no_mr_name _ = Nothing -- The Haskell 98 monomorphism restriction+ restricted :: HsBindLR GhcRn GhcRn -> Bool restricted (PatBind {}) = True- restricted (VarBind { var_id = v }) = no_sig v restricted (FunBind { fun_id = v, fun_matches = m }) = restricted_match m- && no_sig (unLoc v)- restricted b = pprPanic "isRestrictedGroup/unrestricted" (ppr b)+ && mr_needed_for (unLoc v)+ restricted (VarBind { var_ext = x }) = dataConCantHappen x+ restricted b@(PatSynBind {}) = pprPanic "isRestrictedGroup/unrestricted" (ppr b) restricted_match mg = matchGroupArity mg == 0 -- No args => like a pattern binding -- Some args => a function binding - no_sig nm = not (nm `elemNameSet` complete_sig_bndrs)+ mr_needed_for nm = not (nm `elemNameSet` no_mr_bndrs) -checkOverloadedSig :: TcIdSigInst -> TcM ()+checkOverloadedSig :: MonoBindInfo -> TcM () -- Example: -- f :: Eq a => a -> a -- K f = e -- The MR applies, but the signature is overloaded, and it's -- best to complain about this directly -- c.f #11339-checkOverloadedSig sig- | not (null (sig_inst_theta sig))- , let orig_sig = sig_inst_sig sig+checkOverloadedSig (MBI { mbi_sig = mb_sig })+ | Just (TISI { sig_inst_sig = orig_sig, sig_inst_theta = theta, sig_inst_wcx = wcx }) <- mb_sig+ , not (null theta && isNothing wcx) = setSrcSpan (sig_loc orig_sig) $ failWith $ TcRnOverloadedSig orig_sig | otherwise = return () +{- Note [When the MR applies]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The Monomorphism Restriction (MR) applies as specifies in the Haskell Report:++* If -XMonomorphismRestriction is on, and+* Any binding is restricted++A binding is restricted if:+* It is a pattern binding e.g. (x,y) = e+* Or it is a FunBind with no arguments e.g. f = rhs+ and the binder `f` lacks a No-MR signature++A binder f has a No-MR signature if++* It has a complete type signature+ e.g. f :: Num a => a -> a++* Or it has a /partial/ type signature with a /context/+ e.g. f :: (_) => a -> _+ g :: Num a => a -> _+ h :: (Num a, _) => a -> _+ All of f,g,h have a No-MR signature. They say that the function is overloaded+ so it's silly to try to apply the MR. This means that #19106 works out+ fine. Ditto #11016, which looked like+ f4 :: (?loc :: Int) => _+ f4 = ?loc++ This partial-signature stuff is a bit ad-hoc but seems to match our+ use-cases. See also Note [Constraints in partial type signatures]+ in GHC.Tc.Solver.++Example: the MR does apply to+ k :: _ -> _+ k = rhs+because k's binding has no arguments, and `k` does not have+a No-MR signature.++All of this checking takes place after synonym expansion. For example:+ type Wombat a = forall b. Eq [b] => ...b...a...+ f5 :: Wombat _+This (and does) behave just like+ f5 :: forall b. Eq [b] => ...b..._...++-}+ -------------- mkExport :: TcPragEnv -> WantedConstraints -- residual constraints, already emitted (for errors only)@@ -827,7 +878,7 @@ (MBI { mbi_poly_name = poly_name , mbi_sig = mb_sig , mbi_mono_id = mono_id })- = do { mono_ty <- zonkTcType (idType mono_id)+ = do { mono_ty <- liftZonkM $ zonkTcType (idType mono_id) ; poly_id <- mkInferredPolyId residual insoluble qtvs theta poly_name mb_sig mono_ty -- NB: poly_id has a zonked type@@ -850,15 +901,9 @@ then return idHsWrapper -- Fast path; also avoids complaint when we infer -- an ambiguous type and have AllowAmbiguousType -- e..g infer x :: forall a. F a -> Int- else tcSubTypeSigma GhcBug20076+ else tcSubTypeSigma (ImpedanceMatching poly_id) sig_ctxt sel_poly_ty poly_ty- -- as Note [Impedance matching] explains, this should never fail,- -- and thus we'll never see an error message. It *may* do- -- instantiation, but no message will ever be printed to the- -- user, and so we use Shouldn'tHappenOrigin.- -- Actually, there is a bug here: #20076. So we tell the user- -- that they hit the bug. Once #20076 is fixed, change this- -- back to Shouldn'tHappenOrigin.+ -- See Note [Impedance matching] ; localSigWarn poly_id mb_sig @@ -903,15 +948,19 @@ ; let inferred_poly_ty = mkInvisForAllTys binders (mkPhiTy theta' mono_ty') ; traceTc "mkInferredPolyId" (vcat [ppr poly_name, ppr qtvs, ppr theta'- , ppr inferred_poly_ty])+ , ppr inferred_poly_ty+ , text "insoluble" <+> ppr insoluble ])+ ; unless insoluble $ addErrCtxtM (mk_inf_msg poly_name inferred_poly_ty) $ do { checkEscapingKind inferred_poly_ty+ -- See Note [Inferred type with escaping kind] ; checkValidType (InfSigCtxt poly_name) inferred_poly_ty }- -- See Note [Validity of inferred types]- -- If we found an insoluble error in the function definition, don't- -- do this check; otherwise (#14000) we may report an ambiguity- -- error for a rather bogus type.+ -- See Note [Validity of inferred types]+ -- unless insoluble: if we found an insoluble error in the+ -- function definition, don't do this check; otherwise+ -- (#14000) we may report an ambiguity error for a rather+ -- bogus type. ; return (mkLocalId poly_name ManyTy inferred_poly_ty) } @@ -940,7 +989,7 @@ , sig_inst_skols = annotated_tvs })) = -- Choose quantifiers for a partial type signature do { let (psig_qtv_nms, psig_qtv_bndrs) = unzip annotated_tvs- ; psig_qtv_bndrs <- mapM zonkInvisTVBinder psig_qtv_bndrs+ ; psig_qtv_bndrs <- liftZonkM $ mapM zonkInvisTVBinder psig_qtv_bndrs ; let psig_qtvs = map binderVar psig_qtv_bndrs psig_qtv_set = mkVarSet psig_qtvs psig_qtv_prs = psig_qtv_nms `zip` psig_qtvs@@ -959,7 +1008,7 @@ ; mapM_ report_mono_sig_tv_err [ pr | pr@(_,tv) <- psig_qtv_prs , not (tv `elem` qtvs) ] - ; annotated_theta <- zonkTcTypes annotated_theta+ ; annotated_theta <- liftZonkM $ zonkTcTypes annotated_theta ; (free_tvs, my_theta) <- choose_psig_context psig_qtv_set annotated_theta wcx -- NB: free_tvs includes tau_tvs @@ -1019,7 +1068,8 @@ -- We know that wc_co must have type kind(wc_var) ~ Constraint, as it -- comes from the checkExpectedKind in GHC.Tc.Gen.HsType.tcAnonWildCardOcc. -- So, to make the kinds work out, we reverse the cast here.- Just (wc_var, wc_co) -> writeMetaTyVar wc_var (mkConstraintTupleTy diff_theta+ Just (wc_var, wc_co) -> liftZonkM $+ writeMetaTyVar wc_var (mkConstraintTupleTy diff_theta `mkCastTy` mkSymCo wc_co) Nothing -> pprPanic "chooseInferredQuantifiers 1" (ppr wc_var_ty) @@ -1052,7 +1102,7 @@ chooseInferredQuantifiers _ _ _ _ (Just (TISI { sig_inst_sig = sig@(CompleteSig {}) })) = pprPanic "chooseInferredQuantifiers" (ppr sig) -mk_inf_msg :: Name -> TcType -> TidyEnv -> TcM (TidyEnv, SDoc)+mk_inf_msg :: Name -> TcType -> TidyEnv -> ZonkM (TidyEnv, SDoc) mk_inf_msg poly_name poly_ty tidy_env = do { (tidy_env1, poly_ty) <- zonkTidyTcType tidy_env poly_ty ; let msg = vcat [ text "When checking the inferred type"@@ -1068,7 +1118,7 @@ warnMissingSignatures :: Id -> TcM () warnMissingSignatures id- = do { env0 <- tcInitTidyEnv+ = do { env0 <- liftZonkM $ tcInitTidyEnv ; let (env1, tidy_ty) = tidyOpenType env0 (idType id) ; let dia = TcRnPolymorphicBinderMissingSig (idName id) tidy_ty ; addDiagnosticTcM (env1, dia) }@@ -1098,33 +1148,6 @@ doesn't seem much point. Indeed, adding a partial type signature is a way to get per-binding inferred generalisation. -Note [Partial type signatures and the monomorphism restriction]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We apply the MR if /none/ of the partial signatures has a context. e.g.- f :: _ -> Int- f x = rhs-The partial type signature says, in effect, "there is no context", which-amounts to appplying the MR. Indeed, saying- f :: _- f = rhs-is a way for forcing the MR to apply.--But we /don't/ want to apply the MR if the partial signatures do have-a context e.g. (#11016):- f2 :: (?loc :: Int) => _- f2 = ?loc-It's stupid to apply the MR here. This test includes an extra-constraints-wildcard; that is, we don't apply the MR if you write- f3 :: _ => blah--But watch out. We don't want to apply the MR to- type Wombat a = forall b. Eq b => ...b...a...- f4 :: Wombat _-Here f4 doesn't /look/ as if it has top-level overloading, but in fact it-does, hidden under Wombat. We can't "see" that because we only have access-to the HsType at the moment. That's why we do the check in-checkMonomorphismRestriction.- Note [Quantified variables in partial type signatures] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider@@ -1224,11 +1247,9 @@ forall qtvs. theta => f_mono_ty is more polymorphic than f's polytype and the proof is the impedance matcher. -Notice that the impedance matcher may do defaulting. See #7173.--If we've gotten the constraints right during inference (and we assume we have),-this sub-type check should never fail. It's not really a check -- it's more of-a procedure to produce the right wrapper.+The impedance matcher can do defaulting: in the above example, we default+to Integer because of Num. See #7173. If we're dealing with a nondefaultable+class, impedance matching can fail. See #23427. Note [SPECIALISE pragmas] ~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1492,8 +1513,10 @@ Just (TcIdSig sig) -> Right (name, sig) _ -> Left name -tcLhs _ _ other_bind = pprPanic "tcLhs" (ppr other_bind)- -- AbsBind, VarBind impossible+tcLhs _ _ b@(PatSynBind {}) = pprPanic "tcLhs: PatSynBind" (ppr b)+ -- pattern synonyms are handled separately; see tc_single++tcLhs _ _ (VarBind { var_ext = x }) = dataConCantHappen x lookupMBI :: Name -> TcM MonoBindInfo -- After typechecking the pattern, look up the binder
GHC/Tc/Gen/Default.hs view
@@ -19,7 +19,7 @@ import GHC.Tc.Utils.Monad import GHC.Tc.Utils.Env import GHC.Tc.Gen.HsType-import GHC.Tc.Utils.Zonk+import GHC.Tc.Zonk.Type import GHC.Tc.Solver import GHC.Tc.Validity import GHC.Tc.Utils.TcType
GHC/Tc/Gen/Export.hs view
@@ -2,24 +2,28 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TupleSections #-} -module GHC.Tc.Gen.Export (rnExports, exports_from_avail) where+module GHC.Tc.Gen.Export (rnExports, exports_from_avail, classifyGREs) where import GHC.Prelude import GHC.Hs-import GHC.Types.FieldLabel import GHC.Builtin.Names import GHC.Tc.Errors.Types import GHC.Tc.Utils.Monad import GHC.Tc.Utils.Env+ ( TyThing(AConLike, AnId), tcLookupGlobal, tcLookupTyCon ) import GHC.Tc.Utils.TcType+import GHC.Rename.Doc+import GHC.Rename.Module import GHC.Rename.Names import GHC.Rename.Env import GHC.Rename.Unbound ( reportUnboundName ) import GHC.Utils.Error import GHC.Unit.Module import GHC.Unit.Module.Imported+import GHC.Unit.Module.Warnings import GHC.Core.TyCon import GHC.Utils.Outputable import GHC.Utils.Panic@@ -28,8 +32,11 @@ import GHC.Data.Maybe import GHC.Data.FastString (fsLit) import GHC.Driver.Env+import GHC.Driver.DynFlags+import GHC.Parser.PostProcess ( setRdrNameSpace )+import qualified GHC.LanguageExtensions as LangExt -import GHC.Types.Unique.Set+import GHC.Types.Unique.Map import GHC.Types.SrcLoc as SrcLoc import GHC.Types.Name import GHC.Types.Name.Env@@ -40,11 +47,11 @@ import GHC.Types.Id.Info import GHC.Types.Name.Reader -import Control.Monad-import GHC.Driver.Session-import GHC.Parser.PostProcess ( setRdrNameSpace )-import Data.Either ( partitionEithers )-import GHC.Rename.Doc+import Control.Arrow ( first )+import Control.Monad ( when )+import qualified Data.List.NonEmpty as NE+import Data.Traversable ( for )+import Data.List ( sortBy ) {- ************************************************************************@@ -130,24 +137,36 @@ data ExportAccum -- The type of the accumulating parameter of -- the main worker function in rnExports- = ExportAccum- ExportOccMap -- Tracks exported occurrence names- (UniqSet ModuleName) -- Tracks (re-)exported module names+ = ExportAccum {+ expacc_exp_occs :: ExportOccMap,+ -- ^ Tracks exported occurrence names+ expacc_mods :: UniqMap ModuleName [Name],+ -- ^ Tracks (re-)exported module names+ -- and the names they re-export+ expacc_warn_spans :: ExportWarnSpanNames,+ -- ^ Information about warnings for names+ expacc_dont_warn :: DontWarnExportNames+ -- ^ What names not to export warnings for+ -- (because they are exported without a warning)+ } + emptyExportAccum :: ExportAccum-emptyExportAccum = ExportAccum emptyOccEnv emptyUniqSet+emptyExportAccum = ExportAccum emptyOccEnv emptyUniqMap [] emptyNameEnv -accumExports :: (ExportAccum -> x -> TcRn (Maybe (ExportAccum, y)))+accumExports :: (ExportAccum -> x -> TcRn (ExportAccum, Maybe y)) -> [x]- -> TcRn [y]-accumExports f = fmap (catMaybes . snd) . mapAccumLM f' emptyExportAccum- where f' acc x = do- m <- attemptM (f acc x)- pure $ case m of- Just (Just (acc', y)) -> (acc', Just y)- _ -> (acc, Nothing)+ -> TcRn ([y], ExportWarnSpanNames, DontWarnExportNames)+accumExports f xs = do+ (ExportAccum _ _ export_warn_spans dont_warn_export, ys)+ <- mapAccumLM f' emptyExportAccum xs+ return ( catMaybes ys+ , export_warn_spans+ , dont_warn_export )+ where f' acc x+ = fromMaybe (acc, Nothing) <$> attemptM (f acc x) -type ExportOccMap = OccEnv (GreName, IE GhcPs)+type ExportOccMap = OccEnv (Name, IE GhcPs) -- Tracks what a particular exported OccName -- in an export list refers to, and which item -- it came from. It's illegal to export two distinct things@@ -164,16 +183,13 @@ rnExports explicit_mod exports = checkNoErrs $ -- Fail if anything in rnExports finds -- an error fails, to avoid error cascade- unsetWOptM Opt_WarnWarningsDeprecations $- -- Do not report deprecations arising from the export- -- list, to avoid bleating about re-exporting a deprecated- -- thing (especially via 'module Foo' export item) do { hsc_env <- getTopEnv ; tcg_env <- getGblEnv ; let dflags = hsc_dflags hsc_env TcGblEnv { tcg_mod = this_mod , tcg_rdr_env = rdr_env , tcg_imports = imports+ , tcg_warns = warns , tcg_src = hsc_src } = tcg_env default_main | mainModIs (hsc_HUE hsc_env) == this_mod , Just main_fun <- mainFunIs dflags@@ -189,7 +205,7 @@ ; let real_exports | explicit_mod = exports | has_main- = Just (noLocA [noLocA (IEVar noExtField+ = Just (noLocA [noLocA (IEVar Nothing (noLocA (IEName noExtField $ noLocA default_main)))]) -- ToDo: the 'noLoc' here is unhelpful if 'main' -- turns out to be out of scope@@ -197,7 +213,7 @@ -- Rename the export list ; let do_it = exports_from_avail real_exports rdr_env imports this_mod- ; (rn_exports, final_avails)+ ; (rn_exports, final_avails, new_export_warns) <- if hsc_src == HsigFile then do (mb_r, msgs) <- tryTc do_it case mb_r of@@ -206,7 +222,7 @@ else checkNoErrs do_it -- Final processing- ; let final_ns = availsToNameSetWithSelectors final_avails+ ; let final_ns = availsToNameSet final_avails ; traceRn "rnExports: Exports:" (ppr final_avails) @@ -215,8 +231,18 @@ Nothing -> Nothing Just _ -> rn_exports , tcg_dus = tcg_dus tcg_env `plusDU`- usesOnly final_ns }) }+ usesOnly final_ns+ , tcg_warns = insertWarnExports+ warns new_export_warns}) } +-- | List of names and the information about their warnings+-- (warning, export list item span)+type ExportWarnSpanNames = [(Name, WarningTxt GhcRn, SrcSpan)]++-- | Map from names that should not have export warnings to+-- the spans of export list items that are missing those warnings+type DontWarnExportNames = NameEnv (NE.NonEmpty SrcSpan)+ exports_from_avail :: Maybe (LocatedL [LIE GhcPs]) -- ^ 'Nothing' means no explicit export list -> GlobalRdrEnv@@ -225,8 +251,8 @@ -- @module Foo@ export is valid (it's not valid -- if we didn't import @Foo@!) -> Module- -> RnM (Maybe [(LIE GhcRn, Avails)], Avails)- -- (Nothing, _) <=> no explicit export list+ -> RnM (Maybe [(LIE GhcRn, Avails)], Avails, ExportWarnNames GhcRn)+ -- (Nothing, _, _) <=> no explicit export list -- if explicit export list is present it contains -- each renamed export item together with its exported -- names.@@ -241,7 +267,7 @@ ; let avails = map fix_faminst . gresToAvailInfo . filter isLocalGRE . globalRdrEnvElts $ rdr_env- ; return (Nothing, avails) }+ ; return (Nothing, avails, []) } where -- #11164: when we define a data instance -- but not data family, re-export the family@@ -249,18 +275,22 @@ -- only data families can locally define subordinate things (`ns` here) -- without locally defining (and instead importing) the parent (`n`) fix_faminst avail@(AvailTC n ns)- | availExportsDecl avail = avail- | otherwise = AvailTC n (NormalGreName n:ns)+ | availExportsDecl avail+ = avail+ | otherwise+ = AvailTC n (n:ns) fix_faminst avail = avail exports_from_avail (Just (L _ rdr_items)) rdr_env imports this_mod- = do ie_avails <- accumExports do_litem rdr_items+ = do (ie_avails, export_warn_spans, dont_warn_export)+ <- accumExports do_litem rdr_items let final_exports = nubAvails (concatMap snd ie_avails) -- Combine families- return (Just ie_avails, final_exports)+ export_warn_names <- aggregate_warnings export_warn_spans dont_warn_export+ return (Just ie_avails, final_exports, export_warn_names) where do_litem :: ExportAccum -> LIE GhcPs- -> RnM (Maybe (ExportAccum, (LIE GhcRn, Avails)))+ -> RnM (ExportAccum, Maybe (LIE GhcRn, Avails)) do_litem acc lie = setSrcSpan (getLocA lie) (exports_from_item acc lie) -- Maps a parent to its in-scope children@@ -270,151 +300,324 @@ -- See Note [Avails of associated data families] expand_tyty_gre :: GlobalRdrElt -> [GlobalRdrElt] expand_tyty_gre (gre@GRE { gre_par = ParentIs p })- | isTyConName p, isTyConName (greMangledName gre) = [gre, gre{ gre_par = NoParent }]- expand_tyty_gre gre = [gre]+ | isTyConName p+ , isTyConName (greName gre)+ = [gre, gre{ gre_par = NoParent }]+ expand_tyty_gre gre+ = [gre] imported_modules = [ imv_name imv | xs <- moduleEnvElts $ imp_mods imports , imv <- importedByUser xs ] exports_from_item :: ExportAccum -> LIE GhcPs- -> RnM (Maybe (ExportAccum, (LIE GhcRn, Avails)))- exports_from_item (ExportAccum occs earlier_mods)- (L loc ie@(IEModuleContents _ lmod@(L _ mod)))- | mod `elementOfUniqSet` earlier_mods -- Duplicate export of M- = do { addDiagnostic (TcRnDupeModuleExport mod) ;- return Nothing }+ -> RnM (ExportAccum, Maybe (LIE GhcRn, Avails))+ exports_from_item expacc@ExportAccum{+ expacc_exp_occs = occs,+ expacc_mods = earlier_mods,+ expacc_warn_spans = export_warn_spans,+ expacc_dont_warn = dont_warn_export+ } (L loc ie@(IEModuleContents (warn_txt_ps, _) lmod@(L _ mod)))+ | Just exported_names <- lookupUniqMap earlier_mods mod -- Duplicate export of M+ = do { addDiagnostic (TcRnDupeModuleExport mod)+ ; (export_warn_spans', dont_warn_export', _) <-+ process_warning export_warn_spans+ dont_warn_export+ exported_names+ warn_txt_ps+ (locA loc)+ -- Checks if all the names are exported with the same warning message+ -- or if they should not be warned about+ ; return ( expacc{ expacc_warn_spans = export_warn_spans'+ , expacc_dont_warn = dont_warn_export' }+ , Nothing ) } - | otherwise- = do { let { exportValid = (mod `elem` imported_modules)- || (moduleName this_mod == mod)- ; gre_prs = pickGREsModExp mod (globalRdrEnvElts rdr_env)- ; new_exports = [ availFromGRE gre'- | (gre, _) <- gre_prs- , gre' <- expand_tyty_gre gre ]- ; all_gres = foldr (\(gre1,gre2) gres -> gre1 : gre2 : gres) [] gre_prs- ; mods = addOneToUniqSet earlier_mods mod- }+ | otherwise+ = do { let { exportValid = (mod `elem` imported_modules)+ || (moduleName this_mod == mod)+ ; gre_prs = pickGREsModExp mod (globalRdrEnvElts rdr_env)+ ; new_gres = [ gre'+ | (gre, _) <- gre_prs+ , gre' <- expand_tyty_gre gre ]+ ; new_exports = map availFromGRE new_gres+ ; all_gres = foldr (\(gre1,gre2) gres -> gre1 : gre2 : gres) [] gre_prs+ ; exported_names = map greName new_gres+ ; mods = addToUniqMap earlier_mods mod exported_names+ } - ; checkErr exportValid (TcRnExportedModNotImported mod)- ; warnIf (exportValid && null gre_prs) (TcRnNullExportedModule mod)+ ; checkErr exportValid (TcRnExportedModNotImported mod)+ ; warnIf (exportValid && null gre_prs) (TcRnNullExportedModule mod) - ; traceRn "efa" (ppr mod $$ ppr all_gres)- ; addUsedGREs all_gres+ ; traceRn "efa" (ppr mod $$ ppr all_gres)+ ; addUsedGREs ExportDeprecationWarnings all_gres - ; 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- -- 'M.x' is in scope in several ways, we'll have- -- several members of mod_avails with the same- -- OccName.- ; traceRn "export_mod"- (vcat [ ppr mod- , ppr new_exports ])+ ; occs' <- check_occs occs ie new_gres+ -- This check_occs not only finds conflicts+ -- between this item and others, but also+ -- internally within this item. That is, if+ -- 'M.x' is in scope in several ways, we'll have+ -- several members of mod_avails with the same+ -- OccName.+ ; (export_warn_spans', dont_warn_export', warn_txt_rn) <-+ process_warning export_warn_spans+ dont_warn_export+ exported_names+ warn_txt_ps+ (locA loc) - ; return (Just ( ExportAccum occs' mods- , ( L loc (IEModuleContents noExtField lmod)- , new_exports))) }+ ; traceRn "export_mod"+ (vcat [ ppr mod+ , ppr new_exports ])+ ; return ( ExportAccum { expacc_exp_occs = occs'+ , expacc_mods = mods+ , expacc_warn_spans = export_warn_spans'+ , expacc_dont_warn = dont_warn_export' }+ , Just (L loc (IEModuleContents warn_txt_rn lmod), new_exports) ) } - exports_from_item acc@(ExportAccum occs mods) (L loc ie) = do- m_new_ie <- lookup_doc_ie ie- case m_new_ie of- Just new_ie -> return (Just (acc, (L loc new_ie, [])))+ exports_from_item acc lie = do+ m_doc_ie <- lookup_doc_ie lie+ case m_doc_ie of+ Just new_ie -> return (acc, Just (new_ie, [])) Nothing -> do- (new_ie, avail) <- lookup_ie ie- if isUnboundName (ieName new_ie)- then return Nothing -- Avoid error cascade- else do+ m_ie <- lookup_ie acc lie+ case m_ie of+ Nothing -> return (acc, Nothing)+ Just (acc', new_ie, avail)+ -> return (acc', Just (new_ie, [avail])) - occs' <- check_occs ie occs [avail]+ -------------+ lookup_ie :: ExportAccum -> LIE GhcPs -> RnM (Maybe (ExportAccum, LIE GhcRn, AvailInfo))+ lookup_ie expacc@ExportAccum{+ expacc_exp_occs = occs,+ expacc_warn_spans = export_warn_spans,+ expacc_dont_warn = dont_warn_export+ } (L loc ie@(IEVar warn_txt_ps l))+ = do mb_gre <- lookupGreAvailRn $ lieWrappedName l+ for mb_gre $ \ gre -> do+ let avail = availFromGRE gre+ name = greName gre - return (Just ( ExportAccum occs' mods- , (L loc new_ie, [avail])))+ occs' <- check_occs occs ie [gre]+ (export_warn_spans', dont_warn_export', warn_txt_rn)+ <- process_warning export_warn_spans+ dont_warn_export+ [name]+ warn_txt_ps+ (locA loc) - -------------- lookup_ie :: IE GhcPs -> RnM (IE GhcRn, AvailInfo)- lookup_ie (IEVar _ (L l rdr))- = do (name, avail) <- lookupGreAvailRn $ ieWrappedName rdr- return (IEVar noExtField (L l (replaceWrappedName rdr name)), avail)+ return ( expacc{ expacc_exp_occs = occs'+ , expacc_warn_spans = export_warn_spans'+ , expacc_dont_warn = dont_warn_export' }+ , L loc (IEVar warn_txt_rn (replaceLWrappedName l name))+ , avail ) - lookup_ie (IEThingAbs _ (L l rdr))- = do (name, avail) <- lookupGreAvailRn $ ieWrappedName rdr- return (IEThingAbs noAnn (L l (replaceWrappedName rdr name))- , avail)+ lookup_ie expacc@ExportAccum{+ expacc_exp_occs = occs,+ expacc_warn_spans = export_warn_spans,+ expacc_dont_warn = dont_warn_export+ } (L loc ie@(IEThingAbs (warn_txt_ps, ann) l))+ = do mb_gre <- lookupGreAvailRn $ lieWrappedName l+ for mb_gre $ \ gre -> do+ let avail = availFromGRE gre+ name = greName gre - lookup_ie ie@(IEThingAll _ n')- = do- (n, avail, flds) <- lookup_ie_all ie n'- let name = unLoc n- return (IEThingAll noAnn (replaceLWrappedName n' (unLoc n))- , availTC name (name:avail) flds)+ occs' <- check_occs occs ie [gre]+ (export_warn_spans', dont_warn_export', warn_txt_rn)+ <- process_warning export_warn_spans+ dont_warn_export+ [name]+ warn_txt_ps+ (locA loc) + return ( expacc{ expacc_exp_occs = occs'+ , expacc_warn_spans = export_warn_spans'+ , expacc_dont_warn = dont_warn_export' }+ , L loc (IEThingAbs (warn_txt_rn, ann) (replaceLWrappedName l name))+ , avail ) - lookup_ie ie@(IEThingWith _ l wc sub_rdrs)- = do- (lname, subs, avails, flds)- <- addExportErrCtxt ie $ lookup_ie_with l sub_rdrs- (_, all_avail, all_flds) <-- case wc of- NoIEWildcard -> return (lname, [], [])- IEWildcard _ -> lookup_ie_all ie l- let name = unLoc lname- let flds' = flds ++ (map noLoc all_flds)- return (IEThingWith flds' (replaceLWrappedName l name) wc subs,- availTC name (name : avails ++ all_avail)- (map unLoc flds ++ all_flds))+ lookup_ie expacc@ExportAccum{+ expacc_exp_occs = occs,+ expacc_warn_spans = export_warn_spans,+ expacc_dont_warn = dont_warn_export+ } (L loc ie@(IEThingAll (warn_txt_ps, ann) l))+ = do mb_gre <- lookupGreAvailRn $ lieWrappedName l+ for mb_gre $ \ par -> do+ all_kids <- lookup_ie_kids_all ie l par+ let name = greName par+ all_gres = par : all_kids+ all_names = map greName all_gres + occs' <- check_occs occs ie all_gres+ (export_warn_spans', dont_warn_export', warn_txt_rn)+ <- process_warning export_warn_spans+ dont_warn_export+ all_names+ warn_txt_ps+ (locA loc) - lookup_ie _ = panic "lookup_ie" -- Other cases covered earlier+ return ( expacc{ expacc_exp_occs = occs'+ , expacc_warn_spans = export_warn_spans'+ , expacc_dont_warn = dont_warn_export' }+ , L loc (IEThingAll (warn_txt_rn, ann) (replaceLWrappedName l name))+ , AvailTC name all_names ) + lookup_ie expacc@ExportAccum{+ expacc_exp_occs = occs,+ expacc_warn_spans = export_warn_spans,+ expacc_dont_warn = dont_warn_export+ } (L loc ie@(IEThingWith (warn_txt_ps, ann) l wc sub_rdrs))+ = do mb_gre <- addExportErrCtxt ie+ $ lookupGreAvailRn $ lieWrappedName l+ for mb_gre $ \ par -> do+ (subs, with_kids)+ <- addExportErrCtxt ie+ $ lookup_ie_kids_with par sub_rdrs - lookup_ie_with :: LIEWrappedName GhcPs -> [LIEWrappedName GhcPs]- -> RnM (Located Name, [LIEWrappedName GhcRn], [Name],- [Located FieldLabel])- lookup_ie_with (L l rdr) sub_rdrs- = do name <- lookupGlobalOccRn $ ieWrappedName rdr- (non_flds, flds) <- lookupChildrenExport name sub_rdrs- if isUnboundName name- then return (L (locA l) name, [], [name], [])- else return (L (locA l) name, non_flds- , map (ieWrappedName . unLoc) non_flds- , flds)+ wc_kids <-+ case wc of+ NoIEWildcard -> return []+ IEWildcard _ -> lookup_ie_kids_all ie l par - lookup_ie_all :: IE GhcPs -> LIEWrappedName GhcPs- -> RnM (Located Name, [Name], [FieldLabel])- lookup_ie_all ie (L l rdr) =- do name <- lookupGlobalOccRn $ ieWrappedName rdr- let gres = findChildren kids_env name- (non_flds, flds) = classifyGREs gres- addUsedKids (ieWrappedName rdr) gres- when (null gres) $- if isTyConName name- then addTcRnDiagnostic (TcRnDodgyExports name)- else -- This occurs when you export T(..), but- -- only import T abstractly, or T is a synonym.- addErr (TcRnExportHiddenComponents ie)- return (L (locA l) name, non_flds, flds)+ let name = greName par+ all_kids = with_kids ++ wc_kids+ all_gres = par : all_kids+ all_names = map greName all_gres + occs' <- check_occs occs ie all_gres+ (export_warn_spans', dont_warn_export', warn_txt_rn)+ <- process_warning export_warn_spans+ dont_warn_export+ all_names+ warn_txt_ps+ (locA loc)++ return ( expacc{ expacc_exp_occs = occs'+ , expacc_warn_spans = export_warn_spans'+ , expacc_dont_warn = dont_warn_export' }+ , L loc (IEThingWith (warn_txt_rn, ann) (replaceLWrappedName l name) wc subs)+ , AvailTC name all_names )++ lookup_ie _ _ = panic "lookup_ie" -- Other cases covered earlier+++ lookup_ie_kids_with :: GlobalRdrElt -> [LIEWrappedName GhcPs]+ -> RnM ([LIEWrappedName GhcRn], [GlobalRdrElt])+ lookup_ie_kids_with gre sub_rdrs =+ do { let name = greName gre+ ; kids <- lookupChildrenExport name sub_rdrs+ ; return (map fst kids, map snd kids) }++ lookup_ie_kids_all :: IE GhcPs -> LIEWrappedName GhcPs -> GlobalRdrElt+ -> RnM [GlobalRdrElt]+ lookup_ie_kids_all ie (L _ rdr) gre =+ do { let name = greName gre+ gres = findChildren kids_env name+ ; addUsedKids (ieWrappedName rdr) gres+ ; when (null gres) $+ if isTyConName name+ then addTcRnDiagnostic (TcRnDodgyExports gre)+ else -- This occurs when you export T(..), but+ -- only import T abstractly, or T is a synonym.+ addErr (TcRnExportHiddenComponents ie)+ ; return gres }+ -------------- lookup_doc_ie :: IE GhcPs -> RnM (Maybe (IE GhcRn))- lookup_doc_ie (IEGroup _ lev doc) = do++ rn_warning_txt_loc :: LocatedP (WarningTxt GhcPs) -> RnM (LocatedP (WarningTxt GhcRn))+ rn_warning_txt_loc (L loc warn_txt) = L loc <$> rnWarningTxt warn_txt++ -- Runs for every Name+ -- - If there is no new warning, flags that the old warning should not be+ -- included (since a warning should only be emitted if all+ -- of the export statements have a warning)+ -- - If the Name already has a warning, adds it+ process_warning :: ExportWarnSpanNames -- Old aggregate data about warnins+ -> DontWarnExportNames -- Old names not to warn about+ -> [Name] -- Names to warn about+ -> Maybe (LocatedP (WarningTxt GhcPs)) -- Warning+ -> SrcSpan -- Span of the export list item+ -> RnM (ExportWarnSpanNames, -- Aggregate data about the warnings+ DontWarnExportNames, -- Names not to warn about in the end+ -- (when there was a non-warned export)+ Maybe (LocatedP (WarningTxt GhcRn))) -- Renamed warning+ process_warning export_warn_spans+ dont_warn_export+ names Nothing loc+ = return ( export_warn_spans+ , foldr update_dont_warn_export+ dont_warn_export names+ , Nothing )+ where+ update_dont_warn_export :: Name -> DontWarnExportNames -> DontWarnExportNames+ update_dont_warn_export name dont_warn_export'+ = extendNameEnv_Acc (NE.<|)+ NE.singleton+ dont_warn_export'+ name+ loc++ process_warning export_warn_spans+ dont_warn_export+ names (Just warn_txt_ps) loc+ = do+ warn_txt_rn <- rn_warning_txt_loc warn_txt_ps+ let new_export_warn_spans = map (, unLoc warn_txt_rn, loc) names+ return ( new_export_warn_spans ++ export_warn_spans+ , dont_warn_export+ , Just warn_txt_rn )++ -- For each name exported with any warnings throws an error+ -- if there are any exports of that name with a different warning+ aggregate_warnings :: ExportWarnSpanNames+ -> DontWarnExportNames+ -> RnM (ExportWarnNames GhcRn)+ aggregate_warnings export_warn_spans dont_warn_export+ = fmap catMaybes+ $ mapM (aggregate_single . extract_name)+ $ NE.groupBy (\(n1, _, _) (n2, _, _) -> n1 == n2)+ $ sortBy (\(n1, _, _) (n2, _, _) -> n1 `compare` n2) export_warn_spans+ where+ extract_name :: NE.NonEmpty (Name, WarningTxt GhcRn, SrcSpan)+ -> (Name, NE.NonEmpty (WarningTxt GhcRn, SrcSpan))+ extract_name l@((name, _, _) NE.:| _)+ = (name, NE.map (\(_, warn_txt, span) -> (warn_txt, span)) l)++ aggregate_single :: (Name, NE.NonEmpty (WarningTxt GhcRn, SrcSpan))+ -> RnM (Maybe (Name, WarningTxt GhcRn))+ aggregate_single (name, (warn_txt_rn, loc) NE.:| warn_spans)+ = do+ -- Emit an error if the warnings differ+ case NE.nonEmpty spans_different of+ Nothing -> return ()+ Just spans_different+ -> addErrAt loc (TcRnDifferentExportWarnings name spans_different)+ -- Emit a warning if some export list items do not have a warning+ case lookupNameEnv dont_warn_export name of+ Nothing -> return $ Just (name, warn_txt_rn)+ Just not_warned_spans -> do+ addDiagnosticAt loc (TcRnIncompleteExportWarnings name not_warned_spans)+ return Nothing+ where+ spans_different = map snd $ filter (not . warningTxtSame warn_txt_rn . fst) warn_spans++ -------------+ lookup_doc_ie :: LIE GhcPs -> RnM (Maybe (LIE GhcRn))+ lookup_doc_ie (L loc (IEGroup _ lev doc)) = do doc' <- rnLHsDoc doc- pure $ Just (IEGroup noExtField lev doc')- lookup_doc_ie (IEDoc _ doc) = do+ pure $ Just (L loc (IEGroup noExtField lev doc'))+ lookup_doc_ie (L loc (IEDoc _ doc)) = do doc' <- rnLHsDoc doc- pure $ Just (IEDoc noExtField doc')- lookup_doc_ie (IEDocNamed _ str) = pure $ Just (IEDocNamed noExtField str)+ pure $ Just (L loc (IEDoc noExtField doc'))+ lookup_doc_ie (L loc (IEDocNamed _ str))+ = pure $ Just (L loc (IEDocNamed noExtField str)) lookup_doc_ie _ = pure Nothing -- In an export item M.T(A,B,C), we want to treat the uses of -- A,B,C as if they were M.A, M.B, M.C -- Happily pickGREs does just the right thing addUsedKids :: RdrName -> [GlobalRdrElt] -> RnM ()- addUsedKids parent_rdr kid_gres = addUsedGREs (pickGREs parent_rdr kid_gres)--classifyGREs :: [GlobalRdrElt] -> ([Name], [FieldLabel])-classifyGREs = partitionGreNames . map gre_name+ addUsedKids parent_rdr kid_gres+ = addUsedGREs ExportDeprecationWarnings (pickGREs parent_rdr kid_gres) -- Renaming and typechecking of exports happens after everything else has -- been typechecked.@@ -477,49 +680,45 @@ lookupChildrenExport :: Name -> [LIEWrappedName GhcPs]- -> RnM ([LIEWrappedName GhcRn], [Located FieldLabel])-lookupChildrenExport spec_parent rdr_items =- do- xs <- mapAndReportM doOne rdr_items- return $ partitionEithers xs+ -> RnM ([(LIEWrappedName GhcRn, GlobalRdrElt)])+lookupChildrenExport spec_parent rdr_items = mapAndReportM doOne rdr_items where- -- Pick out the possible namespaces in order of priority- -- This is a consequence of how the parser parses all- -- data constructors as type constructors.- choosePossibleNamespaces :: NameSpace -> [NameSpace]- choosePossibleNamespaces ns- | ns == varName = [varName, tcName]- | ns == tcName = [dataName, tcName]- | otherwise = [ns] -- Process an individual child doOne :: LIEWrappedName GhcPs- -> RnM (Either (LIEWrappedName GhcRn) (Located FieldLabel))+ -> RnM (LIEWrappedName GhcRn, GlobalRdrElt) doOne n = do let bareName = (ieWrappedName . unLoc) n- lkup v = lookupSubBndrOcc_helper False True- spec_parent (setRdrNameSpace bareName v)+ what_lkup :: LookupChild+ what_lkup =+ LookupChild+ { wantedParent = spec_parent+ , lookupDataConFirst = True+ , prioritiseParent = False -- See T11970.+ } - name <- combineChildLookupResult $ map lkup $- choosePossibleNamespaces (rdrNameSpace bareName)+ -- Do not report export list declaration deprecations+ name <- lookupSubBndrOcc_helper False ExportDeprecationWarnings+ spec_parent bareName what_lkup traceRn "lookupChildrenExport" (ppr name) -- Default to data constructors for slightly better error -- messages let unboundName :: RdrName unboundName = if rdrNameSpace bareName == varName- then bareName- else setRdrNameSpace bareName dataName+ then bareName+ else setRdrNameSpace bareName dataName case name of- NameNotFound -> do { ub <- reportUnboundName unboundName- ; let l = getLoc n- ; return (Left (L l (IEName noExtField (L (la2na l) ub))))}- FoundChild par child -> do { checkPatSynParent spec_parent par child- ; return $ case child of- FieldGreName fl -> Right (L (getLocA n) fl)- NormalGreName name -> Left (replaceLWrappedName n name)- }- IncorrectParent p c gs -> failWithDcErr p c gs+ NameNotFound ->+ do { ub <- reportUnboundName unboundName+ ; let l = getLoc n+ gre = mkLocalGRE UnboundGRE NoParent ub+ ; return (L l (IEName noExtField (L (la2na l) ub)), gre)}+ FoundChild child@(GRE { gre_name = child_nm, gre_par = par }) ->+ do { checkPatSynParent spec_parent par child_nm+ ; return (replaceLWrappedName n child_nm, child)+ }+ IncorrectParent p c gs -> failWithDcErr p (greName c) gs -- Note [Typing Pattern Synonym Exports]@@ -582,30 +781,31 @@ checkPatSynParent :: Name -- ^ Alleged parent type constructor -- User wrote T( P, Q ) -> Parent -- The parent of P we discovered- -> GreName -- ^ Either a- -- a) Pattern Synonym Constructor- -- b) A pattern synonym selector+ -> Name+ -- ^ Either a+ -- a) Pattern Synonym Constructor+ -- b) A pattern synonym selector -> TcM () -- Fails if wrong parent checkPatSynParent _ (ParentIs {}) _ = return () -checkPatSynParent parent NoParent gname+checkPatSynParent parent NoParent nm | isUnboundName parent -- Avoid an error cascade = return () | otherwise- = do { parent_ty_con <- tcLookupTyCon parent- ; mpat_syn_thing <- tcLookupGlobal (greNameMangledName gname)+ = do { parent_ty_con <- tcLookupTyCon parent+ ; mpat_syn_thing <- tcLookupGlobal nm -- 1. Check that the Id was actually from a thing associated with patsyns ; case mpat_syn_thing of AnId i | isId i , RecSelId { sel_tycon = RecSelPatSyn p } <- idDetails i- -> handle_pat_syn (selErr gname) parent_ty_con p+ -> handle_pat_syn (selErr nm) parent_ty_con p AConLike (PatSynCon p) -> handle_pat_syn (psErr p) parent_ty_con p - _ -> failWithDcErr parent gname [] }+ _ -> failWithDcErr parent nm [] } where psErr = exportErrCtxt "pattern synonym" selErr = exportErrCtxt "pattern synonym record selector"@@ -641,73 +841,66 @@ {-===========================================================================-}-check_occs :: IE GhcPs -> ExportOccMap -> [AvailInfo]- -> RnM ExportOccMap-check_occs ie occs avails- -- 'avails' are the entities specified by 'ie'- = foldlM check occs children++-- | Insert the given 'GlobalRdrElt's into the 'ExportOccMap', checking that+-- each of the given 'GlobalRdrElt's does not appear multiple times in+-- the 'ExportOccMap', as per Note [Exporting duplicate declarations].+check_occs :: ExportOccMap -> IE GhcPs -> [GlobalRdrElt] -> RnM ExportOccMap+check_occs occs ie gres+ -- 'gres' are the entities specified by 'ie'+ = do { drf <- xoptM LangExt.DuplicateRecordFields+ ; foldlM (check drf) occs gres } where- children = concatMap availGreNames avails -- Check for distinct children exported with the same OccName (an error) or -- for duplicate exports of the same child (a warning).- check :: ExportOccMap -> GreName -> RnM ExportOccMap- check occs child- = case try_insert occs child of- Right occs' -> return occs'+ --+ -- See Note [Exporting duplicate declarations].+ check :: Bool -> ExportOccMap -> GlobalRdrElt -> RnM ExportOccMap+ check drf_enabled occs gre+ = case try_insert occs gre of+ Right occs'+ -- If DuplicateRecordFields is not enabled, also make sure+ -- that we are not exporting two fields with the same occNameFS+ -- under different namespaces.+ --+ -- See Note [Exporting duplicate record fields].+ | drf_enabled || not (isFieldOcc child_occ)+ -> return occs'+ | otherwise+ -> do { let flds = filter (\(_,ie') -> not $ dupFieldExport_ok ie ie')+ $ lookupFieldsOccEnv occs (occNameFS child_occ)+ ; case flds of { [] -> return occs'; clash1:clashes ->+ do { addDuplicateFieldExportErr (gre,ie) (clash1 NE.:| clashes)+ ; return occs } } } Left (child', ie')- | greNameMangledName child == greNameMangledName child' -- Duplicate export- -- But we don't want to warn if the same thing is exported- -- by two different module exports. See ticket #4478.- -> do { warnIf (not (dupExport_ok child ie ie')) (TcRnDuplicateExport child ie ie')+ | child == child' -- Duplicate export of a single Name: a warning.+ -> do { warnIf (not (dupExport_ok child ie ie')) (TcRnDuplicateExport gre ie ie') ; return occs } - | otherwise -- Same occ name but different names: an error- -> do { global_env <- getGlobalRdrEnv ;- addErr (exportClashErr global_env child' child ie' ie) ;- return occs }+ | otherwise -- Same OccName but different Name: an error.+ -> do { global_env <- getGlobalRdrEnv+ ; addErr (exportClashErr global_env child' child ie' ie)+ ; return occs }+ where+ child = greName gre+ child_occ = occName child -- Try to insert a child into the map, returning Left if there is something- -- already exported with the same OccName- try_insert :: ExportOccMap -> GreName -> Either (GreName, IE GhcPs) ExportOccMap+ -- already exported with the same OccName.+ try_insert :: ExportOccMap -> GlobalRdrElt -> Either (Name, IE GhcPs) ExportOccMap try_insert occs child- = case lookupOccEnv occs name_occ of- Nothing -> Right (extendOccEnv occs name_occ (child, ie))+ = case lookupOccEnv occs occ of+ Nothing -> Right (extendOccEnv occs occ (greName child, ie)) Just x -> Left x where- -- For fields, we check for export clashes using the (OccName of the)- -- selector Name- name_occ = nameOccName (greNameMangledName child)-+ occ = greOccName child -dupExport_ok :: GreName -> IE GhcPs -> IE GhcPs -> Bool--- The GreName is exported by both IEs. Is that ok?--- "No" iff the name is mentioned explicitly in both IEs--- or one of the IEs mentions the name *alone*--- "Yes" otherwise------ Examples of "no": module M( f, f )--- module M( fmap, Functor(..) )--- module M( module Data.List, head )------ Example of "yes"--- module M( module A, module B ) where--- import A( f )--- import B( f )------ Example of "yes" (#2436)--- module M( C(..), T(..) ) where--- class C a where { data T a }--- instance C Int where { data T Int = TInt }+-- | Is it OK for the given name to be exported by both export items? ----- Example of "yes" (#2436)--- module Foo ( T ) where--- data family T a--- module Bar ( T(..), module Foo ) where--- import Foo--- data instance T Int = TInt-+-- See Note [Exporting duplicate declarations].+dupExport_ok :: Name -> IE GhcPs -> IE GhcPs -> Bool dupExport_ok child ie1 ie2 = not ( single ie1 || single ie2 || (explicit_in ie1 && explicit_in ie2) )@@ -719,8 +912,7 @@ single IEVar {} = True single IEThingAbs {} = True- single _ = False-+ single _ = False exportErrCtxt :: Outputable o => String -> o -> SDoc exportErrCtxt herald exp =@@ -734,18 +926,18 @@ exportCtxt = text "In the export:" <+> ppr ie -failWithDcErr :: Name -> GreName -> [Name] -> TcM a+failWithDcErr :: Name -> Name -> [Name] -> TcM a failWithDcErr parent child parents = do- ty_thing <- tcLookupGlobal (greNameMangledName child)+ ty_thing <- tcLookupGlobal child failWithTc $ TcRnExportedParentChildMismatch parent ty_thing child parents exportClashErr :: GlobalRdrEnv- -> GreName -> GreName+ -> Name -> Name -> IE GhcPs -> IE GhcPs -> TcRnMessage exportClashErr global_env child1 child2 ie1 ie2- = TcRnConflictingExports occ child1' gre1' ie1' child2' gre2' ie2'+ = TcRnConflictingExports occ gre1' ie1' gre2' ie2' where occ = occName child1 -- get_gre finds a GRE for the Name, so that we can show its provenance@@ -753,9 +945,127 @@ gre2 = get_gre child2 get_gre child = fromMaybe (pprPanic "exportClashErr" (ppr child))- (lookupGRE_GreName global_env child)- (child1', gre1', ie1', child2', gre2', ie2') =+ (lookupGRE_Name global_env child)+ (gre1', ie1', gre2', ie2') = case SrcLoc.leftmost_smallest (greSrcSpan gre1) (greSrcSpan gre2) of- LT -> (child1, gre1, ie1, child2, gre2, ie2)- GT -> (child2, gre2, ie2, child1, gre1, ie1)+ LT -> (gre1, ie1, gre2, ie2)+ GT -> (gre2, ie2, gre1, ie1) EQ -> panic "exportClashErr: clashing exports have identical location"++addDuplicateFieldExportErr :: (GlobalRdrElt, IE GhcPs)+ -> NE.NonEmpty (Name, IE GhcPs)+ -> RnM ()+addDuplicateFieldExportErr gre others+ = do { rdr_env <- getGlobalRdrEnv+ ; let lkup = expectJust "addDuplicateFieldExportErr" . lookupGRE_Name rdr_env+ other_gres = fmap (first lkup) others+ ; addErr (TcRnDuplicateFieldExport gre other_gres) }++-- | Is it OK to export two clashing duplicate record fields coming from the+-- given export items, with @-XDisambiguateRecordFields@ disabled?+--+-- See Note [Exporting duplicate record fields].+dupFieldExport_ok :: IE GhcPs -> IE GhcPs -> Bool+dupFieldExport_ok ie1 ie2+ | IEModuleContents {} <- ie1+ , ie2 == ie1+ = True+ | otherwise+ = False++{- Note [Exporting duplicate declarations]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We want to check that two different export items don't have both attempt to export+the same thing. What do we mean precisely? There are three main situations to consider:++ 1. We export two distinct Names with identical OccNames. This is an error.+ 2. We export the same Name in two different export items. This is usually+ a warning, but see below.+ 3. We export a duplicate record field, and DuplicateRecordFields is not enabled.+ See Note [Exporting duplicate record fields].++Concerning (2), we sometimes want to allow a duplicate export of a given Name,+as #4478 points out. The logic, as implemented in dupExport_ok, is that we+do not allow a given Name to be exported by two IEs iff either:++ - the Name is mentioned explicitly in both IEs, or+ - one of the IEs mentions the name *alone*.++Examples:++ NOT OK: module M( f, f )++ f is mentioned explicitly in both++ NOT OK: module M( fmap, Functor(..) )+ NOT OK: module M( module Data.Functor, fmap )++ One of the import items mentions fmap alone, which is also+ exported by the other export item.++ OK:+ module M( module A, module B ) where+ import A( f )+ import B( f )++ OK: (#2436)+ module M( C(..), T(..) ) where+ class C a where { data T a }+ instance C Int where { data T Int = TInt }++ OK: (#2436)+ module Foo ( T ) where+ data family T a+ module Bar ( T(..), module Foo ) where+ import Foo+ data instance T Int = TInt++Note [Exporting duplicate record fields]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Record fields belonging to different datatypes belong to different namespaces,+as explained in Note [Record field namespacing] in GHC.Types.Name.Occurrence.+However, when the DuplicateRecordFields extension is NOT enabled, we want to+prevent users from exporting record fields that share the same underlying occNameFS.++To enforce this, in check_occs, when inserting a new record field into the ExportOccMap+and DuplicateRecordFields is not enabled, we also look up any clashing record fields,+and report an error.++Note however that the clash check has an extra wrinkle, similar to dupExport_ok,+as we want to allow the following:++ {-# LANGUAGE DuplicateRecordFields #-}+ module M1 where+ data D1 = MkD1 { foo :: Int }+ data D2 = MkD2 { foo :: Bool }++ ---------------------------------------------++ module M2 ( module M1 ) where+ import M1++That is, we should be allowed to re-export the whole module M1, without reporting+any nameclashes, even though M1 exports duplicate record fields and we have not+enabled -XDuplicateRecordFields in M2. This logic is implemented in+dupFieldExport_ok. See test case NoDRFModuleExport.++Note that this logic only applies to whole-module imports, as we don't want+to allow the following:++ module N0 where+ data family D a+ module N1 where+ import N0+ data instance D Int = MkDInt { foo :: Int }+ module N2 where+ import N0+ data instance D Bool = MkDBool { foo :: Int }++ module N (D(..)) where+ import N1+ import N2++Here, the single export item D(..) of N exports both record fields,+`$fld:MkDInt:foo` and `$fld:MkDBool:foo`, so we have to reject the program.+See test overloadedrecfldsfail10.+-}
GHC/Tc/Gen/Expr.hs view
@@ -27,18 +27,22 @@ import GHC.Prelude -import {-# SOURCE #-} GHC.Tc.Gen.Splice( tcTypedSplice, tcTypedBracket, tcUntypedBracket )+import Language.Haskell.Syntax.Basic (FieldLabelString(..)) +import {-# SOURCE #-} GHC.Tc.Gen.Splice+ ( tcTypedSplice, tcTypedBracket, tcUntypedBracket )+ import GHC.Hs import GHC.Hs.Syn.Type import GHC.Rename.Utils-import GHC.Tc.Utils.Zonk import GHC.Tc.Utils.Monad import GHC.Tc.Utils.Unify import GHC.Types.Basic import GHC.Types.Error import GHC.Types.FieldLabel-import GHC.Types.Unique.Map ( UniqMap, listToUniqMap, lookupUniqMap )+import GHC.Types.Unique.FM+import GHC.Types.Unique.Map+import GHC.Types.Unique.Set import GHC.Core.Multiplicity import GHC.Core.UsageEnv import GHC.Tc.Errors.Types@@ -50,23 +54,24 @@ import GHC.Tc.Instance.Family ( tcGetFamInstEnvs ) import GHC.Core.FamInstEnv ( FamInstEnvs ) import GHC.Rename.Expr ( mkExpandedExpr )-import GHC.Rename.Env ( addUsedGRE )+import GHC.Rename.Env ( addUsedGRE, getUpdFieldLbls, DeprecationWarnings(..) ) import GHC.Tc.Utils.Env import GHC.Tc.Gen.Arrow import GHC.Tc.Gen.Match import GHC.Tc.Gen.HsType import GHC.Tc.Utils.TcMType+import GHC.Tc.Zonk.TcType import GHC.Tc.Types.Origin import GHC.Tc.Utils.TcType as TcType import GHC.Types.Id import GHC.Types.Id.Info import GHC.Core.ConLike import GHC.Core.DataCon-import GHC.Core.PatSyn import GHC.Types.Name import GHC.Types.Name.Env import GHC.Types.Name.Set import GHC.Types.Name.Reader+import GHC.Core.Class(classTyCon) import GHC.Core.TyCon import GHC.Core.Type import GHC.Core.Coercion( mkSymCo )@@ -74,26 +79,19 @@ import GHC.Builtin.Types import GHC.Builtin.Names import GHC.Builtin.Uniques ( mkBuiltinUnique )-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Types.SrcLoc import GHC.Utils.Misc+import GHC.Data.Bag ( unitBag ) import GHC.Data.List.SetOps import GHC.Data.Maybe import GHC.Utils.Outputable as Outputable import GHC.Utils.Panic import GHC.Utils.Panic.Plain-import Control.Monad-import GHC.Core.Class(classTyCon)-import GHC.Types.Unique.Set ( UniqSet, mkUniqSet, elementOfUniqSet, nonDetEltsUniqSet ) -import Language.Haskell.Syntax.Basic (FieldLabelString(..))--import Data.Function-import Data.List (partition, sortBy, intersect)+import Control.Monad import qualified Data.List.NonEmpty as NE -import GHC.Data.Bag ( unitBag )- {- ************************************************************************ * *@@ -213,7 +211,7 @@ tcExpr e@(HsOverLit _ lit) res_ty = do { mb_res <- tcShortCutLit lit res_ty- -- See Note [Short cut for overloaded literals] in GHC.Tc.Utils.Zonk+ -- See Note [Short cut for overloaded literals] in GHC.Tc.Zonk.Type ; case mb_res of Just lit' -> return (HsOverLit noAnn lit') Nothing -> tcApp e res_ty }@@ -395,7 +393,7 @@ ; matches' <- tcMatchesCase match_ctxt (Scaled mult scrut_ty) matches res_ty ; return (HsCase x scrut' matches') } where- match_ctxt = MC { mc_what = CaseAlt,+ match_ctxt = MC { mc_what = x, mc_body = tcBody } tcExpr (HsIf x pred b1 b2) res_ty@@ -540,10 +538,17 @@ -- in the renamer. See Note [Overview of record dot syntax] in -- GHC.Hs.Expr. This is why we match on 'rupd_flds = Left rbnds' here -- and panic otherwise.-tcExpr expr@(RecordUpd { rupd_expr = record_expr, rupd_flds = Left rbnds }) res_ty+tcExpr expr@(RecordUpd { rupd_expr = record_expr+ , rupd_flds =+ RegularRecUpdFields+ { xRecUpdFields = possible_parents+ , recUpdFields = rbnds }+ })+ res_ty = assert (notNull rbnds) $ do { -- Desugar the record update. See Note [Record Updates].- ; (ds_expr, ds_res_ty, err_ctxt) <- desugarRecordUpd record_expr rbnds res_ty+ ; (ds_expr, ds_res_ty, err_ctxt)+ <- desugarRecordUpd record_expr possible_parents rbnds res_ty -- Typecheck the desugared expression. ; expr' <- addErrCtxt err_ctxt $@@ -559,7 +564,8 @@ -- Test case: T10808. } -tcExpr (RecordUpd {}) _ = panic "tcExpr: unexpected overloaded-dot RecordUpd"+tcExpr e@(RecordUpd { rupd_flds = OverloadedRecUpdFields {}}) _+ = pprPanic "tcExpr: unexpected overloaded-dot RecordUpd" $ ppr e {- ************************************************************************@@ -913,141 +919,8 @@ * * ********************************************************************* -} -{--Note [Type of a record update]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The main complication with RecordUpd is that we need to explicitly-handle the *non-updated* fields. Consider:-- data T a b c = MkT1 { fa :: a, fb :: (b,c) }- | MkT2 { fa :: a, fb :: (b,c), fc :: c -> c }- | MkT3 { fd :: a }-- upd :: T a b c -> (b',c) -> T a b' c- upd t x = t { fb = x}--The result type should be (T a b' c)-not (T a b c), because 'b' *is not* mentioned in a non-updated field-not (T a b' c'), because 'c' *is* mentioned in a non-updated field-NB that it's not good enough to look at just one constructor; we must-look at them all; cf #3219--After all, upd should be equivalent to:- upd t x = case t of- MkT1 p q -> MkT1 p x- MkT2 a b -> MkT2 p b- MkT3 d -> error ...--So we need to give a completely fresh type to the result record,-and then constrain it by the fields that are *not* updated ("p" above).-We call these the "fixed" type variables, and compute them in getFixedTyVars.--Note that because MkT3 doesn't contain all the fields being updated,-its RHS is simply an error, so it doesn't impose any type constraints.-Hence the use of 'relevant_cont'.--Note [Implicit type sharing]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-We also take into account any "implicit" non-update fields. For example- data T a b where { MkT { f::a } :: T a a; ... }-So the "real" type of MkT is: forall ab. (a~b) => a -> T a b--Then consider- upd t x = t { f=x }-We infer the type- upd :: T a b -> a -> T a b- upd (t::T a b) (x::a)- = case t of { MkT (co:a~b) (_:a) -> MkT co x }-We can't give it the more general type- upd :: T a b -> c -> T c b--Note [Criteria for update]-~~~~~~~~~~~~~~~~~~~~~~~~~~-We want to allow update for existentials etc, provided the updated-field isn't part of the existential. For example, this should be ok.- data T a where { MkT { f1::a, f2::b->b } :: T a }- f :: T a -> b -> T b- f t b = t { f1=b }--The criterion we use is this:-- The types of the updated fields- mention only the universally-quantified type variables- of the data constructor--NB: this is not (quite) the same as being a "naughty" record selector-(See Note [Naughty record selectors]) in GHC.Tc.TyCl), at least-in the case of GADTs. Consider- data T a where { MkT :: { f :: a } :: T [a] }-Then f is not "naughty" because it has a well-typed record selector.-But we don't allow updates for 'f'. (One could consider trying to-allow this, but it makes my head hurt. Badly. And no one has asked-for it.)--In principle one could go further, and allow- g :: T a -> T a- g t = t { f2 = \x -> x }-because the expression is polymorphic...but that seems a bridge too far.--Note [Data family example]-~~~~~~~~~~~~~~~~~~~~~~~~~~- data instance T (a,b) = MkT { x::a, y::b }- --->- data :TP a b = MkT { a::a, y::b }- coTP a b :: T (a,b) ~ :TP a b--Suppose r :: T (t1,t2), e :: t3-Then r { x=e } :: T (t3,t1)- --->- case r |> co1 of- MkT x y -> MkT e y |> co2- where co1 :: T (t1,t2) ~ :TP t1 t2- co2 :: :TP t3 t2 ~ T (t3,t2)-The wrapping with co2 is done by the constructor wrapper for MkT--Outgoing invariants-~~~~~~~~~~~~~~~~~~~-In the outgoing (HsRecordUpd scrut binds cons in_inst_tys out_inst_tys):-- * cons are the data constructors to be updated-- * in_inst_tys, out_inst_tys have same length, and instantiate the- *representation* tycon of the data cons. In Note [Data- family example], in_inst_tys = [t1,t2], out_inst_tys = [t3,t2]--Note [Mixed Record Field Updates]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider the following pattern synonym.-- data MyRec = MyRec { foo :: Int, qux :: String }-- pattern HisRec{f1, f2} = MyRec{foo = f1, qux=f2}--This allows updates such as the following-- updater :: MyRec -> MyRec- updater a = a {f1 = 1 }--It would also make sense to allow the following update (which we reject).-- updater a = a {f1 = 1, qux = "two" } ==? MyRec 1 "two"--This leads to confusing behaviour when the selectors in fact refer the same-field.-- updater a = a {f1 = 1, foo = 2} ==? ???--For this reason, we reject a mixture of pattern synonym and normal record-selectors in the same update block. Although of course we still allow the-following.-- updater a = (a {f1 = 1}) {foo = 2}-- > updater (MyRec 0 "str")- MyRec 2 "str"--Note [Record Updates]-~~~~~~~~~~~~~~~~~~~~~+{- Note [Record Updates]+~~~~~~~~~~~~~~~~~~~~~~~~ To typecheck a record update, we desugar it first. Suppose we have data T p q = T1 { x :: Int, y :: Bool, z :: Char } | T2 { v :: Char }@@ -1066,75 +939,115 @@ The critical part of desugaring is to identify T and then T1/T4. Wrinkle [Disambiguating fields]-As outlined above, to typecheck a record update via desugaring, we first need-to identify the parent record `TyCon` (`T` above). This can be tricky when several-record types share the same field (with `-XDuplicateRecordFields`). -Currently, we use the inferred type of the record to help disambiguate the record-fields. For example, in+ As explained in Note [Disambiguating record updates] in GHC.Rename.Pat,+ to typecheck a record update we first need to disambiguate the field labels,+ in order to find a parent which has at least one constructor with all of the fields+ being updated. - ( mempty :: T a b ) { x = 3 }+ As mentioned in Note [Type-directed record disambiguation], we sometimes use+ type-directed disambiguation, although this mechanism is deprecated and+ scheduled for removal via the implementation of GHC proposal #366+ https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0366-no-ambiguous-field-access.rst. -the type signature on `mempty` allows us to disambiguate the record `TyCon` to `T`,-when there might be other datatypes with field `x :: Int`.-This complexity is scheduled for removal via the implementation of GHC proposal #366-https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0366-no-ambiguous-field-access.rst -However, for the time being, we still need to disambiguate record fields using the-inferred types. This means that, when typechecking a record update via desugaring,-we need to do the following:+All in all, this means that when typechecking a record update via desugaring,+we take the following steps: - D1. Perform a first typechecking pass on the record expression (`e` in the example above),+ (0) Perform a first typechecking pass on the record expression (`e` in the example above), to infer the type of the record being updated.- D2. Desugar the record update as described above, using an HsExpansion.- D3. Typecheck the desugared code.+ (1) Disambiguate the record fields (potentially using the type obtained in (0)).+ (2) Desugar the record update as described above, using an HsExpansion.+ (a) Create a let-binding to share the record update right-hand sides.+ (b) Desugar the record update to a case expression updating all the+ relevant constructors (those that have all of the fields being updated).+ (3) Typecheck the desugared code. -In (D1), we call inferRho to infer the type of the record being updated. This returns the+In (0), we call inferRho to infer the type of the record being updated. This returns the inferred type of the record, together with a typechecked expression (of type HsExpr GhcTc) and a collection of residual constraints. We have no need for the latter two, because we will typecheck again in (D3). So, for the time being (and until GHC proposal #366 is implemented), we simply drop them. Wrinkle [Using IdSig]-As noted above, we want to let-bind the updated fields to avoid code duplication: - let { x' = e1; y' = e2 } in- case e of- T1 _ _ z -> T1 x' y' z- T4 p _ _ -> T4 p y' x'+ As noted above, we want to let-bind the updated fields to avoid code duplication: -However, doing so in a naive way would cause difficulties for type inference.-For example:+ let { x' = e1; y' = e2 } in+ case e of+ T1 _ _ z -> T1 x' y' z+ T4 p _ _ -> T4 p y' x' - data R b = MkR { f :: (forall a. a -> a) -> (Int,b), c :: Int }- foo r = r { f = \ k -> (k 3, k 'x') }+ However, doing so in a naive way would cause difficulties for type inference.+ For example: -If we desugar to:+ data R b = MkR { f :: (forall a. a -> a) -> (Int,b), c :: Int }+ foo r = r { f = \ k -> (k 3, k 'x') } - ds_foo r =- let f' = \ k -> (k 3, k 'x')- in case r of- MkR _ b -> MkR f' b+ If we desugar to: -then we are unable to infer an appropriately polymorphic type for f', because we-never infer higher-rank types. To circumvent this problem, we proceed as follows:+ ds_foo r =+ let f' = \ k -> (k 3, k 'x')+ in case r of+ MkR _ b -> MkR f' b - 1. Obtain general field types by instantiating any of the constructors- that contain all the necessary fields. (Note that the field type must be- identical across different constructors of a given data constructor).- 2. Let-bind an 'IdSig' with this type. This amounts to giving the let-bound- 'Id's a partial type signature.+ then we are unable to infer an appropriately polymorphic type for f', because we+ never infer higher-rank types. To circumvent this problem, we proceed as follows: -In the above example, it's as if we wrote:+ 1. Obtain general field types by instantiating any of the constructors+ that contain all the necessary fields. (Note that the field type must be+ identical across different constructors of a given data constructor).+ 2. Let-bind an 'IdSig' with this type. This amounts to giving the let-bound+ 'Id's a partial type signature. - ds_foo r =- let f' :: (forall a. a -> a) -> (Int, _b)- f' = \ k -> (k 3, k 'x')- in case r of- MkR _ b -> MkR f' b+ In the above example, it's as if we wrote: -This allows us to compute the right type for f', and thus accept this record update.+ ds_foo r =+ let f' :: (forall a. a -> a) -> (Int, _b)+ f' = \ k -> (k 3, k 'x')+ in case r of+ MkR _ b -> MkR f' b + This allows us to compute the right type for f', and thus accept this record update.++Note [Type-directed record disambiguation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+GHC currently supports an additional type-directed disambiguation+mechanism, which is deprecated and scheduled for removal as part of+GHC proposal #366 https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0366-no-ambiguous-field-access.rst.++To perform this disambiguation, when there are multiple possible parents for+a record update, the renamer defers to the typechecker.+See GHC.Tc.Gen.Expr.disambiguateRecordBinds, and in particular the auxiliary+function identifyParentLabels, which picks a parent for the record update+using the following additional mechanisms:++ (a) Use the type being pushed in, if it is already a TyConApp. The+ following are valid updates at type `R`:++ g :: R -> R+ g x = x { fld1 = 3 }++ g' x = x { fld1 = 3 } :: R++ (b) Use the type signature of the record expression, if it exists and+ is a TyConApp. Thus this is valid update at type `R`:++ h x = (x :: R) { fld1 = 3 }++Note that this type-directed disambiguation mechanism isn't very robust,+as it doesn't properly integrate with the rest of the typechecker.+For example, the following updates will all be rejected as ambiguous:++ let r :: R+ r = blah+ in r { foo = 3 }++ \r. (r { foo = 3 }, r :: R)++Record updates which require constraint-solving should instead use the+-XOverloadedRecordUpdate extension, as described in Note [Overview of record dot syntax].+ Note [Unifying result types in tcRecordUpd] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ After desugaring and typechecking a record update in the way described in@@ -1190,7 +1103,10 @@ -- result type of this desugared record update. desugarRecordUpd :: LHsExpr GhcRn -- ^ @record_expr@: expression to which the record update is applied- -> [LHsRecUpdField GhcRn]+ -> NE.NonEmpty (HsRecUpdParent GhcRn)+ -- ^ Possible parent 'TyCon'/'PatSyn's for the record update,+ -- with the associated constructors and field labels+ -> [LHsRecUpdField GhcRn GhcRn] -- ^ the record update fields -> ExpRhoType -- ^ the expected result type of the record update@@ -1202,8 +1118,9 @@ -- error context to push when typechecking -- the desugared code )-desugarRecordUpd record_expr rbnds res_ty- = do { -- STEP -2: typecheck the record_expr, the record to be updated+desugarRecordUpd record_expr possible_parents rbnds res_ty+ = do { -- STEP 0: typecheck the record_expr, the record to be updated.+ -- -- Until GHC proposal #366 is implemented, we still use the type of -- the record to disambiguate its fields, so we must infer the record -- type here before we can desugar. See Wrinkle [Disambiguating fields]@@ -1234,73 +1151,36 @@ -- -- This should definitely *not* typecheck. - -- STEP -1 See Note [Disambiguating record fields] in GHC.Tc.Gen.Head- -- After this we know that rbinds is unambiguous- ; rbinds <- disambiguateRecordBinds record_expr record_rho rbnds res_ty+ -- STEP 1: disambiguate the record update by computing a single parent+ -- which has a constructor with all of the fields being updated.+ --+ -- See Note [Disambiguating record updates] in GHC.Rename.Pat.+ ; (cons, rbinds)+ <- disambiguateRecordBinds record_expr record_rho possible_parents rbnds res_ty ; let upd_flds = map (unLoc . hfbLHS . unLoc) rbinds- upd_fld_occs = map (FieldLabelString . occNameFS . rdrNameOcc . rdrNameAmbiguousFieldOcc) upd_flds sel_ids = map selectorAmbiguousFieldOcc upd_flds upd_fld_names = map idName sel_ids-- -- STEP 0- -- Check that the field names are really field names- -- and they are all field names for proper records or- -- all field names for pattern synonyms.- ; let bad_guys = [ setSrcSpan loc $ addErrTc (notSelector fld_name)- | fld <- rbinds,- -- Excludes class ops- let L loc sel_id = hsRecUpdFieldId (unLoc fld),- not (isRecordSelector sel_id),- let fld_name = idName sel_id ]- ; unless (null bad_guys) (sequence bad_guys >> failM)- -- See Note [Mixed Record Field Updates]- ; let (data_sels, pat_syn_sels) =- partition isDataConRecordSelector sel_ids- ; massert (all isPatSynRecordSelector pat_syn_sels)- ; checkTc ( null data_sels || null pat_syn_sels )- ( mixedSelectors data_sels pat_syn_sels )-- -- STEP 1- -- Figure out the tycon and data cons from the first field name- ; let -- It's OK to use the non-tc splitters here (for a selector)- sel_id : _ = sel_ids- con_likes :: [ConLike]- con_likes = case idDetails sel_id of- RecSelId (RecSelData tc) _- -> map RealDataCon (tyConDataCons tc)- RecSelId (RecSelPatSyn ps) _- -> [PatSynCon ps]- _ -> panic "tcRecordUpd"- -- NB: for a data type family, the tycon is the instance tycon- relevant_cons = conLikesWithFields con_likes upd_fld_occs- -- A constructor is only relevant to this process if- -- it contains *all* the fields that are being updated- -- Other ones will cause a runtime error if they occur-- -- STEP 2- -- Check that at least one constructor has all the named fields- -- i.e. has an empty set of bad fields returned by badFields- ; case relevant_cons of- { [] -> failWithTc (badFieldsUpd rbinds con_likes)- ; relevant_con : _ ->+ relevant_cons = nonDetEltsUniqSet cons+ relevant_con = head relevant_cons - -- STEP 3- -- Create new variables for the fields we are updating,- -- so that we can share them across constructors.+ -- STEP 2: desugar the record update. --- -- Example:+ -- (a) Create new variables for the fields we are updating,+ -- so that we can share them across constructors. --- -- e { x=e1, y=e2 }+ -- Example: --- -- We want to let-bind variables to `e1` and `e2`:+ -- e { x=e1, y=e2 } --- -- let x' :: Int- -- x' = e1- -- y' :: Bool- -- y' = e2- -- in ...+ -- We want to let-bind variables to `e1` and `e2`:+ --+ -- let x' :: Int+ -- x' = e1+ -- y' :: Bool+ -- y' = e2+ -- in ... - do { -- Instantiate the type variables of any relevant constuctor+ -- Instantiate the type variables of any relevant constuctor -- with metavariables to obtain a type for each 'Id'. -- This will allow us to have 'Id's with polymorphic types -- by using 'IdSig'. See Wrinkle [Using IdSig] in Note [Record Updates].@@ -1320,7 +1200,7 @@ -- e.g. (x', e1), (y', e2), ... ; let mk_upd_id :: Name -> LHsFieldBind GhcTc fld (LHsExpr GhcRn) -> TcM (Name, (TcId, LHsExpr GhcRn)) mk_upd_id fld_nm (L _ rbind)- = do { let Scaled m arg_ty = lookupNameEnv_NF arg_ty_env fld_nm+ = do { let Scaled _ arg_ty = lookupNameEnv_NF arg_ty_env fld_nm nm_occ = rdrNameOcc . nameRdrName $ fld_nm actual_arg_ty = substTy subst arg_ty rhs = hfbRHS rbind@@ -1331,11 +1211,17 @@ -- (As we will typecheck the let-bindings later, we can drop this coercion here.) -- See RepPolyRecordUpdate test. ; nm <- newNameAt nm_occ generatedSrcSpan- ; let id = mkLocalId nm m actual_arg_ty+ ; let id = mkLocalId nm ManyTy actual_arg_ty -- NB: create fresh names to avoid any accidental shadowing -- occurring in the RHS expressions when creating the let bindings: -- -- let x1 = e1; x2 = e2; ...+ --+ -- Above, we use multiplicity Many rather than the one associated to arg_ty.+ -- Normally, there shouldn't be a difference, since it's a let binding.+ -- But -XStrict can convert the let to a case, and this causes issues+ -- in test LinearRecUpd. Since we don't support linear record updates,+ -- using Many is simple and safe. ; return (fld_nm, (id, rhs)) } arg_ty_env = mkNameEnv@@ -1343,6 +1229,10 @@ (conLikeFieldLabels relevant_con) arg_tys + ; traceTc "tcRecordUpd" $+ vcat [ text "upd_fld_names:" <+> ppr upd_fld_names+ , text "relevant_cons:" <+> ppr relevant_cons ]+ ; upd_ids <- zipWithM mk_upd_id upd_fld_names rbinds ; let updEnv :: UniqMap Name (Id, LHsExpr GhcRn) updEnv = listToUniqMap $ upd_ids@@ -1385,17 +1275,17 @@ Just (upd_id, _) -> (genWildPat, genLHsVar (idName upd_id)) -- Field is not being updated: LHS = variable pattern, RHS = that same variable. _ -> let fld_nm = mkInternalName (mkBuiltinUnique i)- (mkVarOccFS (field_label $ flLabel fld_lbl))+ (nameOccName $ flSelector $ fld_lbl) generatedSrcSpan in (genVarPat fld_nm, genLHsVar fld_nm) - -- STEP 4- -- Desugar to HsCase, as per note [Record Updates]+ -- STEP 2 (b): desugar to HsCase, as per note [Record Updates] ; let ds_expr :: HsExpr GhcRn ds_expr = HsLet noExtField noHsTok let_binds noHsTok (L gen case_expr) case_expr :: HsExpr GhcRn- case_expr = HsCase noExtField record_expr (mkMatchGroup Generated (wrapGenSpan matches))+ case_expr = HsCase RecUpd record_expr+ $ mkMatchGroup (Generated DoPmc) (wrapGenSpan matches) matches :: [LMatch GhcRn (LHsExpr GhcRn)] matches = map make_pat relevant_cons @@ -1432,7 +1322,7 @@ else [ text "existential variable" <> plural ex_tvs <+> pprQuotedList ex_tvs ] err_ctxt = make_lines_msg err_lines - ; return (ds_expr, ds_res_ty, err_ctxt) } } }+ ; return (ds_expr, ds_res_ty, err_ctxt) } -- | Pretty-print a collection of lines, adding commas at the end of each line, -- and adding "and" to the start of the last line.@@ -1446,118 +1336,142 @@ * * Record bindings * *-********************************************************************* -}+**********************************************************************-} --- Disambiguate the fields in a record update.--- See Note [Disambiguating record fields] in GHC.Tc.Gen.Head+-- | Disambiguate the fields in a record update.+--+-- Most of the disambiguation has been done by the renamer; this function+-- performs a final type-directed disambiguation pass, as explained in+-- Note [Type-directed record disambiguation]. disambiguateRecordBinds :: LHsExpr GhcRn -> TcRhoType- -> [LHsRecUpdField GhcRn] -> ExpRhoType- -> TcM [LHsFieldBind GhcTc (LAmbiguousFieldOcc GhcTc) (LHsExpr GhcRn)]-disambiguateRecordBinds record_expr record_rho rbnds res_ty- -- Are all the fields unambiguous?- = case mapM isUnambiguous rbnds of- -- If so, just skip to looking up the Ids- -- Always the case if DuplicateRecordFields is off- Just rbnds' -> mapM lookupSelector rbnds'- Nothing -> -- If not, try to identify a single parent- do { fam_inst_envs <- tcGetFamInstEnvs- -- Look up the possible parents for each field- ; rbnds_with_parents <- getUpdFieldsParents- ; let possible_parents = map (map fst . snd) rbnds_with_parents- -- Identify a single parent- ; p <- identifyParent fam_inst_envs possible_parents- -- Pick the right selector with that parent for each field- ; checkNoErrs $ mapM (pickParent p) rbnds_with_parents }+ -> NE.NonEmpty (HsRecUpdParent GhcRn)+ -> [LHsRecUpdField GhcRn GhcRn] -> ExpRhoType+ -> TcM (UniqSet ConLike, [LHsRecUpdField GhcTc GhcRn])+disambiguateRecordBinds record_expr record_rho possible_parents rbnds res_ty+ = do { fam_inst_envs <- tcGetFamInstEnvs+ -- Identify a single parent, using type-directed disambiguation+ -- if necessary. (Note that type-directed disambiguation of+ -- record field updates is is scheduled for removal, as per+ -- Note [Type-directed record disambiguation].)+ ; TcRecUpdParent+ { tcRecUpdLabels = lbls+ , tcRecUpdCons = cons }+ <- identifyParentLabels fam_inst_envs possible_parents+ -- Pick the right selector with that parent for each field+ ; rbnds' <- zipWithM lookupField (NE.toList lbls) rbnds+ ; return (cons, rbnds') } where- -- Extract the selector name of a field update if it is unambiguous- isUnambiguous :: LHsRecUpdField GhcRn -> Maybe (LHsRecUpdField GhcRn,Name)- isUnambiguous x = case unLoc (hfbLHS (unLoc x)) of- Unambiguous sel_name _ -> Just (x, sel_name)- Ambiguous{} -> Nothing - -- Look up the possible parents and selector GREs for each field- getUpdFieldsParents :: TcM [(LHsRecUpdField GhcRn- , [(RecSelParent, GlobalRdrElt)])]- getUpdFieldsParents- = fmap (zip rbnds) $ mapM- (lookupParents False . unLoc . hsRecUpdFieldRdr . unLoc)- rbnds-- -- Given a the lists of possible parents for each field,- -- identify a single parent- identifyParent :: FamInstEnvs -> [[RecSelParent]] -> TcM RecSelParent- identifyParent fam_inst_envs possible_parents- = case foldr1 intersect possible_parents of- -- No parents for all fields: record update is ill-typed- [] -> failWithTc (TcRnNoPossibleParentForFields rbnds)+ -- Try to identify a single parent, using type-directed disambiguation.+ --+ -- Any non-type-directed disambiguation will have been done already.+ -- See GHC.Rename.Env.lookupRecUpdFields.+ identifyParentLabels :: FamInstEnvs+ -> NE.NonEmpty (HsRecUpdParent GhcRn)+ -> TcM (HsRecUpdParent GhcTc)+ identifyParentLabels fam_inst_envs possible_parents+ = case possible_parents of - -- Exactly one datatype with all the fields: use that- [p] -> return p+ -- Exactly one possible parent for the record update!+ p NE.:| [] -> lookup_parent_flds p - -- Multiple possible parents: try harder to disambiguate+ -- Multiple possible parents: try harder to disambiguate. -- Can we get a parent TyCon from the pushed-in type?- _:_ | Just p <- tyConOfET fam_inst_envs res_ty ->- do { reportAmbiguousField p- ; return (RecSelData p) }+ --+ -- See (a) in Note [Type-directed record disambiguation] in GHC.Rename.Pat.+ _ NE.:| _ : _+ | Just tc <- tyConOfET fam_inst_envs res_ty+ -> do { reportAmbiguousUpdate possible_parents tc+ ; try_disambiguated_tycon tc possible_parents } -- Does the expression being updated have a type signature?- -- If so, try to extract a parent TyCon from it- | Just {} <- obviousSig (unLoc record_expr)- , Just tc <- tyConOf fam_inst_envs record_rho- -> do { reportAmbiguousField tc- ; return (RecSelData tc) }+ -- If so, try to extract a parent TyCon from it.+ --+ -- See (b) inNote [Type-directed record disambiguation] in GHC.Rename.Pat.+ | Just {} <- obviousSig (unLoc record_expr)+ , Just tc <- tyConOf fam_inst_envs record_rho+ -> do { reportAmbiguousUpdate possible_parents tc+ ; try_disambiguated_tycon tc possible_parents } -- Nothing else we can try...- _ -> failWithTc (TcRnBadOverloadedRecordUpdate rbnds)+ p1 NE.:| p2 : ps+ -> do { p1 <- tcLookupRecSelParent p1+ ; p2 <- tcLookupRecSelParent p2+ ; ps <- mapM tcLookupRecSelParent ps+ ; failWithTc $ TcRnBadRecordUpdate (getUpdFieldLbls rbnds)+ $ MultiplePossibleParents (p1, p2, ps) } - -- Make a field unambiguous by choosing the given parent.- -- Emits an error if the field cannot have that parent,- -- e.g. if the user writes- -- r { x = e } :: T- -- where T does not have field x.- pickParent :: RecSelParent- -> (LHsRecUpdField GhcRn, [(RecSelParent, GlobalRdrElt)])- -> TcM (LHsFieldBind GhcTc (LAmbiguousFieldOcc GhcTc) (LHsExpr GhcRn))- pickParent p (upd, xs)- = case lookup p xs of- -- Phew! The parent is valid for this field.- -- Previously ambiguous fields must be marked as- -- used now that we know which one is meant, but- -- unambiguous ones shouldn't be recorded again- -- (giving duplicate deprecation warnings).- Just gre -> do { unless (null (tail xs)) $ do- let L loc _ = hfbLHS (unLoc upd)- setSrcSpanA loc $ addUsedGRE True gre- ; lookupSelector (upd, greMangledName gre) }- -- The field doesn't belong to this parent, so report- -- an error but keep going through all the fields- Nothing -> do { addErrTc (fieldNotInType p- (unLoc (hsRecUpdFieldRdr (unLoc upd))))- ; lookupSelector (upd, greMangledName (snd (head xs))) }+ -- Try to use the 'TyCon' we learned from type-directed disambiguation.+ -- This might not work, if it doesn't match up with any of the parents we had+ -- computed on the basis of the field labels.+ -- (See test cases overloadedrecfields01 and T21946.)+ try_disambiguated_tycon :: TyCon+ -> NE.NonEmpty (HsRecUpdParent GhcRn)+ -> TcM (HsRecUpdParent GhcTc)+ try_disambiguated_tycon tc pars+ = do { pars <- mapMaybeM (fmap (guard_parent tc) . lookup_parent_flds) (NE.toList pars)+ ; case pars of+ [par] -> return par+ [] -> do { pars <- mapM tcLookupRecSelParent possible_parents+ ; failWithTc $ TcRnBadRecordUpdate (getUpdFieldLbls rbnds)+ $ InvalidTyConParent tc pars }+ _ -> pprPanic "try_disambiguated_tycon: more than 1 valid parent"+ (ppr $ map tcRecUpdParent pars) } - -- Given a (field update, selector name) pair, look up the- -- selector to give a field update with an unambiguous Id- lookupSelector :: (LHsRecUpdField GhcRn, Name)- -> TcM (LHsFieldBind GhcRn (LAmbiguousFieldOcc GhcTc) (LHsExpr GhcRn))- lookupSelector (L l upd, n)- = do { i <- tcLookupId n- ; let L loc af = hfbLHS upd- lbl = rdrNameAmbiguousFieldOcc af+ guard_parent :: TyCon -> HsRecUpdParent GhcTc -> Maybe (HsRecUpdParent GhcTc)+ guard_parent disamb_tc cand_parent@(TcRecUpdParent { tcRecUpdParent = cand_tc })+ = do { guard (RecSelData disamb_tc == cand_tc)+ ; return cand_parent }++ lookup_parent_flds :: HsRecUpdParent GhcRn+ -> TcM (HsRecUpdParent GhcTc)+ lookup_parent_flds par@(RnRecUpdParent { rnRecUpdLabels = lbls, rnRecUpdCons = cons })+ = do { let cons' :: NonDetUniqFM ConLike ConLikeName+ cons' = NonDetUniqFM $ unsafeCastUFMKey $ getUniqSet cons+ ; cons <- traverse (tcLookupConLike . conLikeName_Name) cons'+ ; tc <- tcLookupRecSelParent par+ ; return $+ TcRecUpdParent+ { tcRecUpdParent = tc+ , tcRecUpdLabels = lbls+ , tcRecUpdCons = unsafeUFMToUniqSet $ getNonDet cons } }++ lookupField :: FieldGlobalRdrElt+ -> LHsRecUpdField GhcRn GhcRn+ -> TcM (LHsRecUpdField GhcTc GhcRn)+ lookupField fld_gre (L l upd)+ = do { let L loc af = hfbLHS upd+ lbl = ambiguousFieldOccRdrName af+ mb_gre = pickGREs lbl [fld_gre]+ -- NB: this GRE can be 'Nothing' when in GHCi.+ -- See test T10439.++ -- Mark the record fields as used, now that we have disambiguated.+ -- There is no risk of duplicate deprecation warnings, as we have+ -- not marked the GREs as used previously.+ ; setSrcSpanA loc $ mapM_ (addUsedGRE AllDeprecationWarnings) mb_gre+ ; sel <- tcLookupId (greName fld_gre) ; return $ L l HsFieldBind { hfbAnn = hfbAnn upd- , hfbLHS- = L (l2l loc) (Unambiguous i (L (l2l loc) lbl))+ , hfbLHS = L (l2l loc) $ Unambiguous sel (L (l2l loc) lbl) , hfbRHS = hfbRHS upd , hfbPun = hfbPun upd- }- }+ } } - -- See Note [Deprecating ambiguous fields] in GHC.Tc.Gen.Head- reportAmbiguousField :: TyCon -> TcM ()- reportAmbiguousField parent_type =- setSrcSpan loc $ addDiagnostic $ TcRnAmbiguousField rupd parent_type+ -- The type-directed disambiguation mechanism is scheduled for removal,+ -- as per Note [Type-directed record disambiguation].+ -- So we emit a warning whenever the user relies on it.+ reportAmbiguousUpdate :: NE.NonEmpty (HsRecUpdParent GhcRn)+ -> TyCon -> TcM ()+ reportAmbiguousUpdate parents parent_type =+ setSrcSpan loc $ addDiagnostic $ TcRnAmbiguousRecordUpdate rupd parent_type where- rupd = RecordUpd { rupd_expr = record_expr, rupd_flds = Left rbnds, rupd_ext = noExtField }+ rupd = RecordUpd { rupd_expr = record_expr+ , rupd_flds =+ RegularRecUpdFields+ { xRecUpdFields = parents+ , recUpdFields = rbnds }+ , rupd_ext = noExtField } loc = getLocA (head rbnds) {-@@ -1599,14 +1513,15 @@ = do { mb <- tcRecordField con_like flds_w_tys f rhs ; case mb of Nothing -> return Nothing- -- Just (f', rhs') -> return (Just (L l (fld { hfbLHS = f'- -- , hfbRHS = rhs' }))) } Just (f', rhs') -> return (Just (L l (HsFieldBind { hfbAnn = hfbAnn fld , hfbLHS = f' , hfbRHS = rhs' , hfbPun = hfbPun fld}))) } +fieldCtxt :: FieldLabelString -> SDoc+fieldCtxt field_name+ = text "In the" <+> quotes (ppr field_name) <+> text "field of a record" tcRecordField :: ConLike -> Assoc Name Type -> LFieldOcc GhcRn -> LHsExpr GhcRn@@ -1646,14 +1561,14 @@ | otherwise = do -- A record unless (null missing_s_fields) $ do- fs <- zonk_fields missing_s_fields+ fs <- liftZonkM $ zonk_fields missing_s_fields -- It is an error to omit a strict field, because -- we can't substitute it with (error "Missing field f") addErrTc (TcRnMissingStrictFields con_like fs) warn <- woptM Opt_WarnMissingFields when (warn && notNull missing_ns_fields) $ do- fs <- zonk_fields missing_ns_fields+ fs <- liftZonkM $ zonk_fields missing_ns_fields -- It is not an error (though we may want) to omit a -- lazy field, because we can always use -- (error "Missing field f") instead.@@ -1684,103 +1599,6 @@ field_strs = conLikeImplBangs con_like fl `elemField` flds = any (\ fl' -> flSelector fl == fl') flds--{--************************************************************************-* *-\subsection{Errors and contexts}-* *-************************************************************************--Boring and alphabetical:--}--fieldCtxt :: FieldLabelString -> SDoc-fieldCtxt field_name- = text "In the" <+> quotes (ppr field_name) <+> text "field of a record"--badFieldsUpd- :: [LHsFieldBind GhcTc (LAmbiguousFieldOcc GhcTc) (LHsExpr GhcRn)]- -- Field names that don't belong to a single datacon- -> [ConLike] -- Data cons of the type which the first field name belongs to- -> TcRnMessage-badFieldsUpd rbinds data_cons- = TcRnNoConstructorHasAllFields conflictingFields- -- See Note [Finding the conflicting fields]- where- -- A (preferably small) set of fields such that no constructor contains- -- all of them. See Note [Finding the conflicting fields]- conflictingFields = case nonMembers of- -- nonMember belongs to a different type.- (nonMember, _) : _ -> [aMember, nonMember]- [] -> let- -- All of rbinds belong to one type. In this case, repeatedly add- -- a field to the set until no constructor contains the set.-- -- Each field, together with a list indicating which constructors- -- have all the fields so far.- growingSets :: [(FieldLabelString, [Bool])]- growingSets = scanl1 combine membership- combine (_, setMem) (field, fldMem)- = (field, zipWith (&&) setMem fldMem)- in- -- Fields that don't change the membership status of the set- -- are redundant and can be dropped.- map (fst . NE.head) $ NE.groupWith snd growingSets-- aMember = assert (not (null members) ) fst (head members)- (members, nonMembers) = partition (or . snd) membership-- -- For each field, which constructors contain the field?- membership :: [(FieldLabelString, [Bool])]- membership = sortMembership $- map (\fld -> (fld, map (fld `elementOfUniqSet`) fieldLabelSets)) $- map (FieldLabelString . occNameFS . rdrNameOcc . rdrNameAmbiguousFieldOcc . unLoc . hfbLHS . unLoc) rbinds-- fieldLabelSets :: [UniqSet FieldLabelString]- fieldLabelSets = map (mkUniqSet . map flLabel . conLikeFieldLabels) data_cons-- -- Sort in order of increasing number of True, so that a smaller- -- conflicting set can be found.- sortMembership =- map snd .- sortBy (compare `on` fst) .- map (\ item@(_, membershipRow) -> (countTrue membershipRow, item))-- countTrue = count id--{--Note [Finding the conflicting fields]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have- data A = A {a0, a1 :: Int}- | B {b0, b1 :: Int}-and we see a record update- x { a0 = 3, a1 = 2, b0 = 4, b1 = 5 }-Then we'd like to find the smallest subset of fields that no-constructor has all of. Here, say, {a0,b0}, or {a0,b1}, etc.-We don't really want to report that no constructor has all of-{a0,a1,b0,b1}, because when there are hundreds of fields it's-hard to see what was really wrong.--We may need more than two fields, though; eg- data T = A { x,y :: Int, v::Int }- | B { y,z :: Int, v::Int }- | C { z,x :: Int, v::Int }-with update- r { x=e1, y=e2, z=e3 }, we--Finding the smallest subset is hard, so the code here makes-a decent stab, no more. See #7989.--}--mixedSelectors :: [Id] -> [Id] -> TcRnMessage-mixedSelectors data_sels@(dc_rep_id:_) pat_syn_sels@(ps_rep_id:_)- = TcRnMixedSelectors (tyConName rep_dc) data_sels (patSynName rep_ps) pat_syn_sels- where- RecSelPatSyn rep_ps = recordSelectorTyCon ps_rep_id- RecSelData rep_dc = recordSelectorTyCon dc_rep_id-mixedSelectors _ _ = panic "GHC.Tc.Gen.Expr: mixedSelectors emptylists" {- ************************************************************************
GHC/Tc/Gen/Foreign.hs view
@@ -82,6 +82,9 @@ ( WriterT, runWriterT, tell ) import Control.Monad.Trans.Class ( lift )+import Data.Maybe (isJust)+import GHC.Types.RepType (tyConPrimRep)+import GHC.Builtin.Types (unitTyCon) -- Defines a binding isForeignImport :: forall name. UnXRec name => LForeignDecl name -> Bool@@ -267,7 +270,7 @@ id = mkLocalId nm ManyTy sig_ty -- Use a LocalId to obey the invariant that locally-defined -- things are LocalIds. However, it does not need zonking,- -- (so GHC.Tc.Utils.Zonk.zonkForeignExports ignores it).+ -- (so GHC.Tc.Zonk.Type.zonkForeignExports ignores it). ; imp_decl' <- tcCheckFIType arg_tys res_ty imp_decl -- Can't use sig_ty here because sig_ty :: Type and@@ -567,3 +570,225 @@ foreignDeclCtxt fo = hang (text "When checking declaration:") 2 (ppr fo)+++{- Predicates on Types used in this module -}++-- | Reason why a type in an FFI signature is invalid++isFFIArgumentTy :: DynFlags -> Safety -> Type -> Validity' IllegalForeignTypeReason+-- Checks for valid argument type for a 'foreign import'+isFFIArgumentTy dflags safety ty+ = checkRepTyCon (legalOutgoingTyCon dflags safety) ty++isFFIExternalTy :: Type -> Validity' IllegalForeignTypeReason+-- Types that are allowed as arguments of a 'foreign export'+isFFIExternalTy ty = checkRepTyCon legalFEArgTyCon ty++isFFIImportResultTy :: DynFlags -> Type -> Validity' IllegalForeignTypeReason+isFFIImportResultTy dflags ty+ = checkRepTyCon (legalFIResultTyCon dflags) ty++isFFIExportResultTy :: Type -> Validity' IllegalForeignTypeReason+isFFIExportResultTy ty = checkRepTyCon legalFEResultTyCon ty++isFFIDynTy :: Type -> Type -> Validity' IllegalForeignTypeReason+-- The type in a foreign import dynamic must be Ptr, FunPtr, or a newtype of+-- either, and the wrapped function type must be equal to the given type.+-- We assume that all types have been run through normaliseFfiType, so we don't+-- need to worry about expanding newtypes here.+isFFIDynTy expected ty+ -- Note [Foreign import dynamic]+ -- In the example below, expected would be 'CInt -> IO ()', while ty would+ -- be 'FunPtr (CDouble -> IO ())'.+ | Just (tc, [ty']) <- splitTyConApp_maybe ty+ , tyConUnique tc `elem` [ptrTyConKey, funPtrTyConKey]+ , eqType ty' expected+ = IsValid+ | otherwise+ = NotValid (ForeignDynNotPtr expected ty)++isFFILabelTy :: Type -> Validity' IllegalForeignTypeReason+-- The type of a foreign label must be Ptr, FunPtr, or a newtype of either.+isFFILabelTy ty = checkRepTyCon ok ty+ where+ ok tc | tc `hasKey` funPtrTyConKey || tc `hasKey` ptrTyConKey+ = IsValid+ | otherwise+ = NotValid ForeignLabelNotAPtr++-- | Check validity for a type of the form @Any :: k@.+--+-- This function returns:+--+-- - @Just IsValid@ for @Any :: Type@ and @Any :: UnliftedType@,+-- - @Just (NotValid ..)@ for @Any :: k@ if @k@ is not a kind of boxed types,+-- - @Nothing@ if the type is not @Any@.+checkAnyTy :: Type -> Maybe (Validity' IllegalForeignTypeReason)+checkAnyTy ty+ | Just ki <- anyTy_maybe ty+ = Just $+ if isJust $ kindBoxedRepLevity_maybe ki+ then IsValid+ -- NB: don't allow things like @Any :: TYPE IntRep@, as per #21305.+ else NotValid (TypeCannotBeMarshaled ty NotBoxedKindAny)+ | otherwise+ = Nothing++isFFIPrimArgumentTy :: DynFlags -> Type -> Validity' IllegalForeignTypeReason+-- Checks for valid argument type for a 'foreign import prim'+-- Currently they must all be simple unlifted types, or Any (at kind Type or UnliftedType),+-- which can be used to pass the address to a Haskell object on the heap to+-- the foreign function.+isFFIPrimArgumentTy dflags ty+ | Just validity <- checkAnyTy ty+ = validity+ | otherwise+ = checkRepTyCon (legalFIPrimArgTyCon dflags) ty++isFFIPrimResultTy :: DynFlags -> Type -> Validity' IllegalForeignTypeReason+-- Checks for valid result type for a 'foreign import prim' Currently+-- it must be an unlifted type, including unboxed tuples, unboxed+-- sums, or the well-known type Any (at kind Type or UnliftedType).+isFFIPrimResultTy dflags ty+ | Just validity <- checkAnyTy ty+ = validity+ | otherwise+ = checkRepTyCon (legalFIPrimResultTyCon dflags) ty++isFunPtrTy :: Type -> Bool+isFunPtrTy ty+ | Just (tc, [_]) <- splitTyConApp_maybe ty+ = tc `hasKey` funPtrTyConKey+ | otherwise+ = False++-- normaliseFfiType gets run before checkRepTyCon, so we don't+-- need to worry about looking through newtypes or type functions+-- here; that's already been taken care of.+checkRepTyCon+ :: (TyCon -> Validity' TypeCannotBeMarshaledReason)+ -> Type+ -> Validity' IllegalForeignTypeReason+checkRepTyCon check_tc ty+ = fmap (TypeCannotBeMarshaled ty) $ case splitTyConApp_maybe ty of+ Just (tc, tys)+ | isNewTyCon tc -> NotValid (mk_nt_reason tc tys)+ | otherwise -> check_tc tc+ Nothing -> NotValid NotADataType+ where+ mk_nt_reason tc tys = NewtypeDataConNotInScope tc tys++{-+Note [Foreign import dynamic]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A dynamic stub must be of the form 'FunPtr ft -> ft' where ft is any foreign+type. Similarly, a wrapper stub must be of the form 'ft -> IO (FunPtr ft)'.++We use isFFIDynTy to check whether a signature is well-formed. For example,+given a (illegal) declaration like:++foreign import ccall "dynamic"+ foo :: FunPtr (CDouble -> IO ()) -> CInt -> IO ()++isFFIDynTy will compare the 'FunPtr' type 'CDouble -> IO ()' with the curried+result type 'CInt -> IO ()', and return False, as they are not equal.+++----------------------------------------------+These chaps do the work; they are not exported+----------------------------------------------+-}++legalFEArgTyCon :: TyCon -> Validity' TypeCannotBeMarshaledReason+legalFEArgTyCon tc+ -- It's illegal to make foreign exports that take unboxed+ -- arguments. The RTS API currently can't invoke such things. --SDM 7/2000+ = boxedMarshalableTyCon tc++legalFIResultTyCon :: DynFlags -> TyCon -> Validity' TypeCannotBeMarshaledReason+legalFIResultTyCon dflags tc+ | tc == unitTyCon = IsValid+ | otherwise = marshalableTyCon dflags tc++legalFEResultTyCon :: TyCon -> Validity' TypeCannotBeMarshaledReason+legalFEResultTyCon tc+ | tc == unitTyCon = IsValid+ | otherwise = boxedMarshalableTyCon tc++legalOutgoingTyCon :: DynFlags -> Safety -> TyCon -> Validity' TypeCannotBeMarshaledReason+-- Checks validity of types going from Haskell -> external world+legalOutgoingTyCon dflags _ tc+ = marshalableTyCon dflags tc++-- Check for marshalability of a primitive type.+-- We exclude lifted types such as RealWorld and TYPE.+-- They can technically appear in types, e.g.+-- f :: RealWorld -> TYPE LiftedRep -> RealWorld+-- f x _ = x+-- but there are no values of type RealWorld or TYPE LiftedRep,+-- so it doesn't make sense to use them in FFI.+marshalablePrimTyCon :: TyCon -> Bool+marshalablePrimTyCon tc = isPrimTyCon tc && not (isLiftedTypeKind (tyConResKind tc))++marshalableTyCon :: DynFlags -> TyCon -> Validity' TypeCannotBeMarshaledReason+marshalableTyCon dflags tc+ | marshalablePrimTyCon tc+ , not (null (tyConPrimRep tc)) -- Note [Marshalling void]+ = validIfUnliftedFFITypes dflags+ | otherwise+ = boxedMarshalableTyCon tc++boxedMarshalableTyCon :: TyCon -> Validity' TypeCannotBeMarshaledReason+boxedMarshalableTyCon tc+ | getUnique tc `elem` [ intTyConKey, int8TyConKey, int16TyConKey+ , int32TyConKey, int64TyConKey+ , wordTyConKey, word8TyConKey, word16TyConKey+ , word32TyConKey, word64TyConKey+ , floatTyConKey, doubleTyConKey+ , ptrTyConKey, funPtrTyConKey+ , charTyConKey+ , stablePtrTyConKey+ , boolTyConKey+ ]+ = IsValid++ | otherwise = NotValid NotABoxedMarshalableTyCon++legalFIPrimArgTyCon :: DynFlags -> TyCon -> Validity' TypeCannotBeMarshaledReason+-- Check args of 'foreign import prim', only allow simple unlifted types.+legalFIPrimArgTyCon dflags tc+ | marshalablePrimTyCon tc+ = validIfUnliftedFFITypes dflags+ | otherwise+ = NotValid NotSimpleUnliftedType++legalFIPrimResultTyCon :: DynFlags -> TyCon -> Validity' TypeCannotBeMarshaledReason+-- Check result type of 'foreign import prim'. Allow simple unlifted+-- types and also unboxed tuple and sum result types.+legalFIPrimResultTyCon dflags tc+ | marshalablePrimTyCon tc+ , not (null (tyConPrimRep tc)) -- Note [Marshalling void]+ = validIfUnliftedFFITypes dflags++ | isUnboxedTupleTyCon tc || isUnboxedSumTyCon tc+ = validIfUnliftedFFITypes dflags++ | otherwise+ = NotValid $ NotSimpleUnliftedType++validIfUnliftedFFITypes :: DynFlags -> Validity' TypeCannotBeMarshaledReason+validIfUnliftedFFITypes dflags+ | xopt LangExt.UnliftedFFITypes dflags = IsValid+ | otherwise = NotValid UnliftedFFITypesNeeded++{-+Note [Marshalling void]+~~~~~~~~~~~~~~~~~~~~~~~+We don't treat State# (whose PrimRep is VoidRep) as marshalable.+In turn that means you can't write+ foreign import foo :: Int -> State# RealWorld++Reason: the back end falls over with panic "primRepHint:VoidRep";+ and there is no compelling reason to permit it+-}
GHC/Tc/Gen/Head.hs view
@@ -26,8 +26,8 @@ , tcInferAppHead, tcInferAppHead_maybe , tcInferId, tcCheckId , obviousSig- , tyConOf, tyConOfET, lookupParents, fieldNotInType- , notSelector, nonBidirectionalErr+ , tyConOf, tyConOfET, fieldNotInType+ , nonBidirectionalErr , addHeadCtxt, addExprCtxt, addFunResCtxt ) where @@ -35,6 +35,7 @@ import GHC.Prelude import GHC.Hs+import GHC.Hs.Syn.Type import GHC.Tc.Gen.HsType import GHC.Rename.Unbound ( unknownNameSuggestions, WhatLooking(..) )@@ -47,7 +48,8 @@ import GHC.Tc.Utils.Concrete ( hasFixedRuntimeRep_syntactic ) import GHC.Tc.Utils.Instantiate import GHC.Tc.Instance.Family ( tcLookupDataFamInst )-import GHC.Unit.Module ( getModule )+import GHC.Core.FamInstEnv ( FamInstEnvs )+import GHC.Core.UsageEnv ( singleUsageUE ) import GHC.Tc.Errors.Types import GHC.Tc.Solver ( InferMode(..), simplifyInfer ) import GHC.Tc.Utils.Env@@ -55,10 +57,9 @@ import GHC.Tc.Types.Origin import GHC.Tc.Utils.TcType as TcType import GHC.Tc.Types.Evidence-import GHC.Hs.Syn.Type+import GHC.Tc.Zonk.TcType -import GHC.Core.FamInstEnv ( FamInstEnvs )-import GHC.Core.UsageEnv ( unitUE )+ import GHC.Core.PatSyn( PatSyn ) import GHC.Core.ConLike( ConLike(..) ) import GHC.Core.DataCon@@ -80,7 +81,7 @@ import GHC.Builtin.Names.TH( liftStringName, liftName ) import GHC.Driver.Env-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Utils.Misc import GHC.Utils.Outputable as Outputable import GHC.Utils.Panic@@ -860,36 +861,12 @@ tyConOfET :: FamInstEnvs -> ExpRhoType -> Maybe TyCon tyConOfET fam_inst_envs ty0 = tyConOf fam_inst_envs =<< checkingExpType_maybe ty0 ---- For an ambiguous record field, find all the candidate record--- selectors (as GlobalRdrElts) and their parents.-lookupParents :: Bool -> RdrName -> RnM [(RecSelParent, GlobalRdrElt)]-lookupParents is_selector rdr- = do { env <- getGlobalRdrEnv- -- Filter by isRecFldGRE because otherwise a non-selector variable with- -- an overlapping name can get through when NoFieldSelectors is enabled.- -- See Note [NoFieldSelectors] in GHC.Rename.Env.- ; let all_gres = lookupGRE_RdrName' rdr env- ; let gres | is_selector = filter isFieldSelectorGRE all_gres- | otherwise = filter isRecFldGRE all_gres- ; mapM lookupParent gres }- where- lookupParent :: GlobalRdrElt -> RnM (RecSelParent, GlobalRdrElt)- lookupParent gre = do { id <- tcLookupId (greMangledName gre)- ; case recordSelectorTyCon_maybe id of- Just rstc -> return (rstc, gre)- Nothing -> failWithTc (notSelector (greMangledName gre)) }-- fieldNotInType :: RecSelParent -> RdrName -> TcRnMessage fieldNotInType p rdr = mkTcRnNotInScope rdr $ UnknownSubordinate (text "field of type" <+> quotes (ppr p)) -notSelector :: Name -> TcRnMessage-notSelector = TcRnNotARecordSelector - {- ********************************************************************* * * Expressions with a type signature@@ -936,7 +913,7 @@ <- captureConstraints $ simplifyInfer tclvl infer_mode [sig_inst] [(name, tau)] wanted ; emitConstraints residual - ; tau <- zonkTcType tau+ ; tau <- liftZonkM $ zonkTcType tau ; let inferred_theta = map evVarPred givens tau_tvs = tyCoVarsOfType tau ; (binders, my_theta) <- chooseInferredQuantifiers residual inferred_theta@@ -1108,21 +1085,15 @@ get_suggestions ns = do let occ = mkOccNameFS ns (occNameFS (occName id_name))- dflags <- getDynFlags- rdr_env <- getGlobalRdrEnv lcl_env <- getLocalRdrEnv- imp_info <- getImports- curr_mod <- getModule- hpt <- getHpt- return $ unknownNameSuggestions WL_Anything dflags hpt curr_mod rdr_env- lcl_env imp_info (mkRdrUnqual occ)+ unknownNameSuggestions lcl_env WL_Anything (mkRdrUnqual occ) return_id id = return (HsVar noExtField (noLocA id), idType id) check_local_id :: Id -> TcM () check_local_id id = do { checkThLocalId id- ; tcEmitBindingUsage $ unitUE (idName id) OneTy }+ ; tcEmitBindingUsage $ singleUsageUE id } check_naughty :: OccName -> TcId -> TcM () check_naughty lbl id@@ -1214,7 +1185,7 @@ The 'p' is the multiplicity unification variable, which will by now have been unified to something, or defaulted in- `GHC.Tc.Utils.Zonk.commitFlexi`. So it won't just be an+ `GHC.Tc.Zonk.Type.commitFlexi`. So it won't just be an (unbound) variable. So a saturated application (K e), where e::Int will desugar to@@ -1318,7 +1289,8 @@ -- bindings of the same splice proxy, but that doesn't -- matter, although it's a mite untidy. do { let id_ty = idType id- ; checkTc (isTauTy id_ty) (TcRnSplicePolymorphicLocalVar id)+ ; checkTc (isTauTy id_ty) $+ TcRnTHError $ TypedTHError $ SplicePolymorphicLocalVar id -- If x is polymorphic, its occurrence sites might -- have different instantiations, so we can't use plain -- 'x' as the splice proxy name. I don't know how to@@ -1387,21 +1359,20 @@ -- But not in generated code, where we don't want -- to mention internal (rebindable syntax) function names addFunResCtxt fun args fun_res_ty env_ty thing_inside- = addLandmarkErrCtxtM (\env -> (env, ) <$> mk_msg) thing_inside+ = do { env_tv <- newFlexiTyVarTy liftedTypeKind+ ; dumping <- doptM Opt_D_dump_tc_trace+ ; addLandmarkErrCtxtM (\env -> (env, ) <$> mk_msg dumping env_tv) thing_inside } -- NB: use a landmark error context, so that an empty context -- doesn't suppress some more useful context where- mk_msg+ mk_msg dumping env_tv = do { mb_env_ty <- readExpType_maybe env_ty -- by the time the message is rendered, the ExpType -- will be filled in (except if we're debugging) ; fun_res' <- zonkTcType fun_res_ty ; env' <- case mb_env_ty of Just env_ty -> zonkTcType env_ty- Nothing ->- do { dumping <- doptM Opt_D_dump_tc_trace- ; massert dumping- ; newFlexiTyVarTy liftedTypeKind }+ Nothing -> do { massert dumping; return env_tv } ; let -- See Note [Splitting nested sigma types in mismatched -- function types] (_, _, fun_tau) = tcSplitNestedSigmaTys fun_res'
GHC/Tc/Gen/HsType.hs view
@@ -83,6 +83,7 @@ import GHC.Tc.Errors.Types import GHC.Tc.Utils.Monad import GHC.Tc.Types.Origin+import GHC.Tc.Types.LclEnv import GHC.Tc.Types.Constraint import GHC.Tc.Utils.Env import GHC.Tc.Utils.TcMType@@ -90,11 +91,12 @@ import GHC.Tc.Utils.Unify import GHC.IfaceToCore import GHC.Tc.Solver-import GHC.Tc.Utils.Zonk+import GHC.Tc.Zonk.Type import GHC.Tc.Utils.TcType import GHC.Tc.Utils.Instantiate ( tcInstInvisibleTyBinders, tcInstInvisibleTyBindersN, tcInstInvisibleTyBinder, tcSkolemiseInvisibleBndrs, tcInstTypeBndrs )+import GHC.Tc.Zonk.TcType import GHC.Core.Type import GHC.Core.Predicate@@ -124,7 +126,7 @@ import GHC.Utils.Panic import GHC.Utils.Panic.Plain import GHC.Builtin.Names hiding ( wildCardName )-import GHC.Driver.Session+import GHC.Driver.DynFlags import qualified GHC.LanguageExtensions as LangExt import GHC.Data.FastString@@ -137,7 +139,7 @@ import Data.Function ( on ) import Data.List.NonEmpty ( NonEmpty(..), nonEmpty ) import qualified Data.List.NonEmpty as NE-import Data.List ( find, mapAccumL )+import Data.List ( mapAccumL ) import Control.Monad import Data.Tuple( swap ) @@ -388,11 +390,11 @@ -- meth :: forall a (x :: f a). Proxy x -> () -- When instantiating Proxy with kappa, we must unify kappa := f a. But we're -- still working out the kind of f, and thus f a will have a coercion in it.--- Coercions block unification (Note [Equalities with incompatible kinds] in--- TcCanonical) and so we fail to unify. If we try to kind-generalize, we'll--- end up promoting kappa to the top level (because kind-generalization is--- normally done right before adding a binding to the context), and then we--- can't set kappa := f a, because a is local.+-- Coercions may block unification (Note [Equalities with incompatible kinds] in+-- GHC.Tc.Solver.Equality, wrinkle (EIK2)) and so we fail to unify. If we try to+-- kind-generalize, we'll end up promoting kappa to the top level (because+-- kind-generalization is normally done right before adding a binding to the context),+-- and then we can't set kappa := f a, because a is local. kcClassSigType names sig_ty@(L _ (HsSig { sig_bndrs = hs_outer_bndrs, sig_body = hs_ty })) = addSigCtxt (funsSigCtxt names) sig_ty $@@ -443,7 +445,7 @@ ; traceTc "tcHsSigType 2" (ppr implic) ; simplifyAndEmitFlatConstraints (mkImplicWC (unitBag implic)) - ; ty <- zonkTcType ty+ ; ty <- liftZonkM $ zonkTcType ty ; checkValidType ctxt ty ; traceTc "end tcHsSigType }" (ppr ty) ; return ty }@@ -473,7 +475,7 @@ -- Default any unconstrained variables free in the kind -- See Note [Escaping kind in type signatures] ; exp_kind_dvs <- candidateQTyVarsOfType exp_kind- ; doNotQuantifyTyVars exp_kind_dvs (mk_doc exp_kind)+ ; doNotQuantifyTyVars exp_kind_dvs (err_ctx exp_kind) ; traceTc "tc_lhs_sig_type" (ppr hs_outer_bndrs $$ ppr outer_bndrs) ; outer_bndrs <- scopedSortOuter outer_bndrs@@ -488,10 +490,9 @@ ; return (implic, mkInfForAllTys kvs ty1) } where- mk_doc exp_kind tidy_env+ err_ctx exp_kind tidy_env = do { (tidy_env2, exp_kind) <- zonkTidyTcType tidy_env exp_kind- ; return (tidy_env2, hang (text "The kind" <+> ppr exp_kind)- 2 (text "of type signature:" <+> ppr full_hs_ty)) }+ ; return (tidy_env2, UninfTyCtx_Sig exp_kind full_hs_ty) } @@ -619,8 +620,8 @@ ; kvs <- kindGeneralizeAll skol_info ty1 -- "All" because it's a top-level type ; reportUnsolvedEqualities skol_info kvs tclvl wanted - ; ze <- mkEmptyZonkEnv NoFlexi- ; final_ty <- zonkTcTypeToTypeX ze (mkInfForAllTys kvs ty1)+ ; final_ty <- initZonkEnv DefaultFlexi+ $ zonkTcTypeToTypeX (mkInfForAllTys kvs ty1) ; traceTc "tc_top_lhs_type }" (vcat [ppr sig_ty, ppr final_ty]) ; return final_ty } where@@ -703,7 +704,7 @@ -- We still must call kindGeneralizeNone, though, according -- to Note [Recipe for checking a signature] ; kindGeneralizeNone ty- ; ty <- zonkTcType ty+ ; ty <- liftZonkM $ zonkTcType ty ; checkValidType TypeAppCtxt ty ; return ty } @@ -757,7 +758,7 @@ ; (fam_app, res_kind) <- tcInferTyApps mode lhs_fun fun_ty hs_pats -- Hack alert: see Note [tcFamTyPats: zonking the result kind]- ; res_kind <- zonkTcType res_kind+ ; res_kind <- liftZonkM $ zonkTcType res_kind ; traceTc "End tcFamTyPats }" $ vcat [ ppr fam_tc, text "res_kind:" <+> ppr res_kind ]@@ -1041,7 +1042,8 @@ -- things like instantiate its foralls, so it needs -- to be fully determined (#14904) ; traceTc "tc_infer_hs_type:sig" (ppr ty $$ ppr sig')- ; ty' <- tc_lhs_type mode ty sig'+ ; ty' <- tcAddKindSigPlaceholders sig $+ tc_lhs_type mode ty sig' ; return (ty', sig') } -- HsSpliced is an annotation produced by 'GHC.Rename.Splice.rnSpliceType' to communicate@@ -1063,7 +1065,7 @@ -- Raw uniques since we go from NameEnv to TvSubstEnv. let subst_prs :: [(Unique, TcTyVar)] subst_prs = [ (getUnique nm, tv)- | ATyVar nm tv <- nonDetNameEnvElts (tcl_env env) ]+ | ATyVar nm tv <- nonDetNameEnvElts (getLclEnvTypeEnv env) ] subst = mkTvSubst (mkInScopeSetList $ map snd subst_prs) (listToUFM_Directly $ map (fmap mkTyVarTy) subst_prs)@@ -1145,7 +1147,7 @@ tc_hs_type _ ty@(HsRecTy {}) _ -- Record types (which only show up temporarily in constructor -- signatures) should have been removed by now- = failWithTc $ TcRnIllegalRecordSyntax ty+ = failWithTc $ TcRnIllegalRecordSyntax (Right ty) -- HsSpliced is an annotation produced by 'GHC.Rename.Splice.rnSpliceType'. -- Here we get rid of it and add the finalizers to the global environment@@ -1215,7 +1217,7 @@ | 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+ ; kinds <- liftZonkM $ mapM zonkTcType kinds -- Infer each arg type separately, because errors can be -- confusing if we give them a shared kind. Eg #7410 -- (Either Int, Int), we do not want to get an error saying@@ -1251,6 +1253,12 @@ --------- Promoted lists and tuples tc_hs_type mode rn_ty@(HsExplicitListTy _ _ tys) exp_kind+ -- The '[] case is handled in tc_infer_hs_type.+ -- See Note [Future-proofing the type checker].+ | null tys+ = tc_infer_hs_type_ek mode rn_ty exp_kind++ | otherwise = do { tks <- mapM (tc_infer_lhs_type mode) tys ; (taus', kind) <- unifyKinds tys tks ; let ty = (foldr (mk_cons kind) (mk_nil kind) taus')@@ -1519,11 +1527,11 @@ is_app _ = False go :: LHsType GhcRn- -> [HsArg (LHsType GhcRn) (LHsKind GhcRn)]+ -> [HsArg GhcRn (LHsType GhcRn) (LHsKind GhcRn)] -> (LHsType GhcRn,- [HsArg (LHsType GhcRn) (LHsKind GhcRn)]) -- AZ temp+ [HsArg GhcRn (LHsType GhcRn) (LHsKind GhcRn)]) -- AZ temp go (L _ (HsAppTy _ f a)) as = go f (HsValArg a : as)- go (L _ (HsAppKindTy l ty k)) as = go ty (HsTypeArg l k : as)+ go (L _ (HsAppKindTy _ ty at k)) as = go ty (HsTypeArg at k : as) go (L sp (HsParTy _ f)) as = go f (HsArgPar (locA sp) : as) go (L _ (HsOpTy _ prom l op@(L sp _) r)) as = ( L (na2la sp) (HsTyVar noAnn prom op)@@ -1615,8 +1623,7 @@ case ki_binder of -- FunTy with PredTy on LHS, or ForAllTy with Inferred- Named (Bndr _ Inferred) -> instantiate ki_binder inner_ki- Anon _ af | isInvisibleFunArg af -> instantiate ki_binder inner_ki+ Named (Bndr kv Inferred) -> instantiate kv inner_ki Named (Bndr _ Specified) -> -- Visible kind application do { traceTc "tcInferTyApps (vis kind app)"@@ -1646,9 +1653,9 @@ ---------------- HsValArg: a normal argument (fun ty) (HsValArg arg : args, Just (ki_binder, inner_ki)) -- next binder is invisible; need to instantiate it- | isInvisiblePiTyBinder ki_binder -- FunTy with constraint on LHS;- -- or ForAllTy with Inferred or Specified- -> instantiate ki_binder inner_ki+ | Named (Bndr kv flag) <- ki_binder+ , isInvisibleForAllTyFlag flag -- ForAllTy with Inferred or Specified+ -> instantiate kv inner_ki -- "normal" case | otherwise@@ -1670,7 +1677,7 @@ do { let arrows_needed = n_initial_val_args all_args ; co <- matchExpectedFunKind (HsTypeRnThing $ unLoc hs_ty) arrows_needed substed_fun_ki - ; fun' <- zonkTcType (fun `mkCastTy` co)+ ; fun' <- liftZonkM $ zonkTcType (fun `mkCastTy` co) -- This zonk is essential, to expose the fruits -- of matchExpectedFunKind to the 'go' loop @@ -1701,7 +1708,7 @@ substed_fun_ki = substTy subst fun_ki hs_ty = appTypeToArg orig_hs_ty (take (n-1) orig_hs_args) - n_initial_val_args :: [HsArg tm ty] -> Arity+ n_initial_val_args :: [HsArg p tm ty] -> Arity -- Count how many leading HsValArgs we have n_initial_val_args (HsValArg {} : args) = 1 + n_initial_val_args args n_initial_val_args (HsArgPar {} : args) = n_initial_val_args args@@ -1735,8 +1742,7 @@ , isTypeSynonymTyCon tc , args `lengthIs` (tyConArity tc - 1) , any isTrickyTvBinder (tyConTyVars tc) -- We could cache this in the synonym- = do { arg' <- zonkTcType arg- ; args' <- zonkTcTypes args+ = do { (arg':args') <- liftZonkM $ zonkTcTypes (arg:args) ; let subst' = case ki_binder of Anon {} -> subst Named (Bndr tv _) -> extendTvSubstAndInScope subst tv arg'@@ -1749,7 +1755,7 @@ mkAppTyM subst fun (Named (Bndr tv _)) arg = do { arg' <- if isTrickyTvBinder tv then -- See Note [mkAppTyM]: Nasty case 1- zonkTcType arg+ liftZonkM $ zonkTcType arg else return arg ; return ( extendTvSubstAndInScope subst tv arg' , mk_app_ty fun arg' ) }@@ -1820,7 +1826,7 @@ Because the PKTI does not guarantee that the RuntimeReps are available in a FunTy, we must be aware of this when splitting: splitTyConApp and splitAppTy will *not* split a FunTy if the RuntimeReps are not available. See also Note [Decomposing FunTy]-in GHC.Tc.Solver.Canonical.+in GHC.Tc.Solver.Equality. Note [mkAppTyM] ~~~~~~~~~~~~~~~@@ -1893,10 +1899,10 @@ appTypeToArg :: LHsType GhcRn -> [LHsTypeArg GhcRn] -> LHsType GhcRn appTypeToArg f [] = f-appTypeToArg f (HsValArg arg : args) = appTypeToArg (mkHsAppTy f arg) args-appTypeToArg f (HsArgPar _ : args) = appTypeToArg f args-appTypeToArg f (HsTypeArg l arg : args)- = appTypeToArg (mkHsAppKindTy l f arg) args+appTypeToArg f (HsValArg arg : args) = appTypeToArg (mkHsAppTy f arg) args+appTypeToArg f (HsArgPar _ : args) = appTypeToArg f args+appTypeToArg f (HsTypeArg at arg : args)+ = appTypeToArg (mkHsAppKindTy f at arg) args {- *********************************************************************@@ -1934,7 +1940,7 @@ ; if act_kind' `tcEqType` exp_kind then return res_ty -- This is very common- else do { co_k <- uType KindLevel origin act_kind' exp_kind+ else do { co_k <- unifyTypeAndEmit KindLevel origin act_kind' exp_kind ; traceTc "checkExpectedKind" (vcat [ ppr act_kind , ppr exp_kind , ppr co_k ])@@ -1986,23 +1992,16 @@ -- see #15245 promotionErr name FamDataConPE ; let (_, _, _, theta, _, _) = dataConFullSig dc- ; traceTc "tcTyVar" (ppr dc <+> ppr theta $$ ppr (dc_theta_illegal_constraint theta))- ; case dc_theta_illegal_constraint theta of- Just pred -> promotionErr name $- ConstrainedDataConPE pred- Nothing -> pure ()+ ; traceTc "tcTyVar" (ppr dc <+> ppr theta)+ -- promotionErr: Note [No constraints in kinds] in GHC.Tc.Validity+ ; unless (null theta) $+ promotionErr name (ConstrainedDataConPE theta) ; let tc = promoteDataCon dc ; return (mkTyConApp tc [], tyConKind tc) } APromotionErr err -> promotionErr name err - _ -> wrongThingErr "type" thing name }- where- -- We cannot promote a data constructor with a context that contains- -- constraints other than equalities, so error if we find one.- -- See Note [Constraints in kinds] in GHC.Core.TyCo.Rep- dc_theta_illegal_constraint :: ThetaType -> Maybe PredType- dc_theta_illegal_constraint = find (not . isEqPred)+ _ -> wrongThingErr WrongThingType thing name } {- Note [Recursion through the kinds]@@ -2045,7 +2044,7 @@ 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+It's tempting to check that the body kind is (TYPE _). But this is wrong. For example: class C a b@@ -2054,7 +2053,7 @@ 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.+convenient. Bottom line: don't check for (TYPE _) here. Note [Body kind of a HsQualTy] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -2112,7 +2111,7 @@ * 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 GHC.Tc.Utils.Zonk.+ as in GHC.Tc.Zonk.Type. - 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@@ -2312,10 +2311,10 @@ | InitialKindInfer -- Does the declaration have a standalone kind signature (SAKS) or a complete--- user-specified kind (CUSK)?+-- user-supplied kind (CUSK)? data SAKS_or_CUSK = SAKS Kind -- Standalone kind signature, fully zonked! (zonkTcTypeToType)- | CUSK -- Complete user-specified kind (CUSK)+ | CUSK -- Complete user-supplied kind (CUSK) instance Outputable SAKS_or_CUSK where ppr (SAKS k) = text "SAKS" <+> ppr k@@ -2324,11 +2323,11 @@ -- See Note [kcCheckDeclHeader vs kcInferDeclHeader] kcDeclHeader :: InitialKindStrategy- -> Name -- ^ of the thing being checked- -> TyConFlavour -- ^ What sort of 'TyCon' is being checked- -> LHsQTyVars GhcRn -- ^ Binders in the header- -> TcM ContextKind -- ^ The result kind- -> TcM TcTyCon -- ^ A suitably-kinded TcTyCon+ -> Name -- ^ of the thing being checked+ -> TyConFlavour TyCon -- ^ What sort of 'TyCon' is being checked+ -> LHsQTyVars GhcRn -- ^ Binders in the header+ -> TcM ContextKind -- ^ The result kind+ -> TcM TcTyCon -- ^ A suitably-kinded TcTyCon kcDeclHeader (InitialKindCheck msig) = kcCheckDeclHeader msig kcDeclHeader InitialKindInfer = kcInferDeclHeader @@ -2351,20 +2350,20 @@ ------------------------------ kcCheckDeclHeader :: SAKS_or_CUSK- -> Name -- ^ of the thing being checked- -> TyConFlavour -- ^ What sort of 'TyCon' is being checked- -> LHsQTyVars GhcRn -- ^ Binders in the header- -> TcM ContextKind -- ^ The result kind. AnyKind == no result signature- -> TcM PolyTcTyCon -- ^ A suitably-kinded generalized TcTyCon+ -> Name -- ^ of the thing being checked+ -> TyConFlavour TyCon -- ^ What sort of 'TyCon' is being checked+ -> LHsQTyVars GhcRn -- ^ Binders in the header+ -> TcM ContextKind -- ^ The result kind. AnyKind == no result signature+ -> TcM PolyTcTyCon -- ^ A suitably-kinded generalized TcTyCon kcCheckDeclHeader (SAKS sig) = kcCheckDeclHeader_sig sig kcCheckDeclHeader CUSK = kcCheckDeclHeader_cusk kcCheckDeclHeader_cusk- :: Name -- ^ of the thing being checked- -> TyConFlavour -- ^ What sort of 'TyCon' is being checked- -> LHsQTyVars GhcRn -- ^ Binders in the header- -> TcM ContextKind -- ^ The result kind- -> TcM PolyTcTyCon -- ^ A suitably-kinded generalized TcTyCon+ :: Name -- ^ of the thing being checked+ -> TyConFlavour TyCon -- ^ What sort of 'TyCon' is being checked+ -> LHsQTyVars GhcRn -- ^ Binders in the header+ -> TcM ContextKind -- ^ The result kind+ -> TcM PolyTcTyCon -- ^ A suitably-kinded generalized TcTyCon kcCheckDeclHeader_cusk name flav (HsQTvs { hsq_ext = kv_ns , hsq_explicit = hs_tvs }) kc_res_ki@@ -2372,7 +2371,7 @@ -- See Note [Required, Specified, and Inferred for types] in GHC.Tc.TyCl = addTyConFlavCtxt name flav $ do { skol_info <- mkSkolemInfo skol_info_anon- ; (tclvl, wanted, (scoped_kvs, (tc_tvs, res_kind)))+ ; (tclvl, wanted, (scoped_kvs, (tc_bndrs, res_kind))) <- pushLevelAndSolveEqualitiesX "kcCheckDeclHeader_cusk" $ bindImplicitTKBndrs_Q_Skol skol_info kv_ns $ bindExplicitTKBndrs_Q_Skol skol_info ctxt_kind hs_tvs $@@ -2380,7 +2379,7 @@ -- Now, because we're in a CUSK, -- we quantify over the mentioned kind vars- ; let spec_req_tkvs = scoped_kvs ++ tc_tvs+ ; let spec_req_tkvs = scoped_kvs ++ binderVars tc_bndrs all_kinds = res_kind : map tyVarKind spec_req_tkvs ; candidates <- candidateQTyVarsOfKinds all_kinds@@ -2392,9 +2391,11 @@ candidates `delCandidates` spec_req_tkvs -- NB: 'inferred' comes back sorted in dependency order - ; scoped_kvs <- mapM zonkTyCoVarKind scoped_kvs -- scoped_kvs and tc_tvs are skolems,- ; tc_tvs <- mapM zonkTyCoVarKind tc_tvs -- so zonkTyCoVarKind suffices- ; res_kind <- zonkTcType res_kind+ ; (scoped_kvs, tc_bndrs, res_kind) <- liftZonkM $+ do { scoped_kvs <- mapM zonkTyCoVarKind scoped_kvs -- scoped_kvs and tc_bndrs are skolems,+ ; tc_bndrs <- mapM zonkTyCoVarBndrKind tc_bndrs -- so zonkTyCoVarBndrKind suffices+ ; res_kind <- zonkTcType res_kind+ ; return (scoped_kvs, tc_bndrs, res_kind) } ; let mentioned_kv_set = candidateKindVars candidates specified = scopedSort scoped_kvs@@ -2402,15 +2403,15 @@ all_tcbs = mkNamedTyConBinders Inferred inferred ++ mkNamedTyConBinders Specified specified- ++ map (mkRequiredTyConBinder mentioned_kv_set) tc_tvs+ ++ map (mkExplicitTyConBinder mentioned_kv_set) tc_bndrs -- Eta expand if necessary; we are building a PolyTyCon ; (eta_tcbs, res_kind) <- etaExpandAlgTyCon flav skol_info all_tcbs res_kind - ; let all_tv_prs = mkTyVarNamePairs (scoped_kvs ++ tc_tvs)+ ; let all_tv_prs = mkTyVarNamePairs (scoped_kvs ++ binderVars tc_bndrs) final_tcbs = all_tcbs `chkAppend` eta_tcbs tycon = mkTcTyCon name final_tcbs res_kind all_tv_prs- True -- it is generalised+ True -- Make a PolyTcTyCon, fully generalised flav ; reportUnsolvedEqualities skol_info (binderVars final_tcbs)@@ -2430,7 +2431,7 @@ , text "scoped_kvs" <+> ppr scoped_kvs , text "spec_req_tvs" <+> pprTyVars spec_req_tkvs , text "all_kinds" <+> ppr all_kinds- , text "tc_tvs" <+> pprTyVars tc_tvs+ , text "tc_tvs" <+> pprTyVars (binderVars tc_bndrs) , text "res_kind" <+> ppr res_kind , text "inferred" <+> ppr inferred , text "specified" <+> ppr specified@@ -2445,27 +2446,37 @@ ctxt_kind | tcFlavourIsOpen flav = TheKind liftedTypeKind | otherwise = AnyKind +-- | Create a TyConBinder for a user-written type variable binder.+mkExplicitTyConBinder :: TyCoVarSet -- variables that are used dependently+ -> VarBndr TyVar (HsBndrVis GhcRn)+ -> TyConBinder+mkExplicitTyConBinder dep_set (Bndr tv flag) =+ case flag of+ HsBndrRequired -> mkRequiredTyConBinder dep_set tv+ HsBndrInvisible{} -> mkNamedTyConBinder Specified tv+ -- | Kind-check a 'LHsQTyVars'. Used in 'inferInitialKind' (for tycon kinds and -- other kinds). -- -- This function does not do telescope checking. kcInferDeclHeader- :: Name -- ^ of the thing being checked- -> TyConFlavour -- ^ What sort of 'TyCon' is being checked+ :: Name -- ^ of the thing being checked+ -> TyConFlavour TyCon -- ^ What sort of 'TyCon' is being checked -> LHsQTyVars GhcRn- -> TcM ContextKind -- ^ The result kind- -> TcM MonoTcTyCon -- ^ A suitably-kinded non-generalized TcTyCon+ -> TcM ContextKind -- ^ The result kind+ -> TcM MonoTcTyCon -- ^ A suitably-kinded non-generalized TcTyCon kcInferDeclHeader name flav (HsQTvs { hsq_ext = kv_ns- , hsq_explicit = hs_tvs }) kc_res_ki+ , hsq_explicit = hs_bndrs }) kc_res_ki -- No standalone kind signature and no CUSK. -- See Note [Required, Specified, and Inferred for types] in GHC.Tc.TyCl = addTyConFlavCtxt name flav $- do { (scoped_kvs, (tc_tvs, res_kind))+ do { rejectInvisibleBinders name hs_bndrs+ ; (scoped_kvs, (tc_bndrs, res_kind)) -- Why bindImplicitTKBndrs_Q_Tv which uses newTyVarTyVar? -- See Note [Inferring kinds for type declarations] in GHC.Tc.TyCl- <- bindImplicitTKBndrs_Q_Tv kv_ns $- bindExplicitTKBndrs_Q_Tv ctxt_kind hs_tvs $+ <- bindImplicitTKBndrs_Q_Tv kv_ns $+ bindExplicitTKBndrs_Q_Tv ctxt_kind hs_bndrs $ newExpectedKind =<< kc_res_ki -- Why "_Tv" not "_Skol"? See third wrinkle in -- Note [Inferring kinds for type declarations] in GHC.Tc.TyCl,@@ -2475,12 +2486,17 @@ -- recursive group. -- See Note [Inferring kinds for type declarations] in GHC.Tc.TyCl + tc_tvs = binderVars tc_bndrs+ -- Discard visibility flags. We made sure all of them are HsBndrRequired+ -- by the call to rejectInvisibleBinders above.+ tc_binders = mkAnonTyConBinders tc_tvs- -- Also, note that tc_binders has the tyvars from only the- -- user-written tyvarbinders. See S1 in Note [How TcTyCons work]- -- in GHC.Tc.TyCl+ -- This has to be mkAnonTyConBinder!+ -- See Note [No polymorphic recursion in type decls] in GHC.Tc.TyCl --- -- mkAnonTyConBinder: see Note [No polymorphic recursion]+ -- Also, note that tc_binders has the tyvars from only the+ -- user-written type variable binders.+ -- See S1 Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon] in GHC.Tc.TyCl all_tv_prs = mkTyVarNamePairs (scoped_kvs ++ tc_tvs) -- NB: bindExplicitTKBndrs_Q_Tv does not clone;@@ -2488,11 +2504,11 @@ -- See Note [Cloning for type variable binders] tycon = mkTcTyCon name tc_binders res_kind all_tv_prs- False -- not yet generalised+ False -- Make a MonoTcTyCon flav ; traceTc "kcInferDeclHeader: not-cusk" $- vcat [ ppr name, ppr kv_ns, ppr hs_tvs+ vcat [ ppr name, ppr kv_ns, ppr hs_bndrs , ppr scoped_kvs , ppr tc_tvs, ppr (mkTyConKind tc_binders res_kind) ] ; return tycon }@@ -2500,15 +2516,26 @@ ctxt_kind | tcFlavourIsOpen flav = TheKind liftedTypeKind | otherwise = AnyKind +-- rejectInvisibleBinders is called on on the inference code path; there is+-- no standalone kind signature, nor CUSK.+-- See Note [No inference for invisible binders in type decls] in GHC.Tc.TyCl+rejectInvisibleBinders :: Name -> [LHsTyVarBndr (HsBndrVis GhcRn) GhcRn] -> TcM ()+rejectInvisibleBinders name = mapM_ check_bndr_vis+ where+ check_bndr_vis :: LHsTyVarBndr (HsBndrVis GhcRn) GhcRn -> TcM ()+ check_bndr_vis bndr =+ when (isHsBndrInvisible (hsTyVarBndrFlag (unLoc bndr))) $+ addErr (TcRnInvisBndrWithoutSig name bndr)+ -- | Kind-check a declaration header against a standalone kind signature. -- See Note [kcCheckDeclHeader_sig] kcCheckDeclHeader_sig- :: Kind -- ^ Standalone kind signature, fully zonked! (zonkTcTypeToType)- -> Name -- ^ of the thing being checked- -> TyConFlavour -- ^ What sort of 'TyCon' is being checked- -> LHsQTyVars GhcRn -- ^ Binders in the header- -> TcM ContextKind -- ^ The result kind. AnyKind == no result signature- -> TcM PolyTcTyCon -- ^ A suitably-kinded, fully generalised TcTyCon+ :: Kind -- ^ Standalone kind signature, fully zonked! (zonkTcTypeToType)+ -> Name -- ^ of the thing being checked+ -> TyConFlavour TyCon -- ^ What sort of 'TyCon' is being checked+ -> LHsQTyVars GhcRn -- ^ Binders in the header+ -> TcM ContextKind -- ^ The result kind. AnyKind == no result signature+ -> TcM PolyTcTyCon -- ^ A suitably-kinded, fully generalised TcTyCon -- Postcondition to (kcCheckDeclHeader_sig sig_kind n f hs_tvs kc_res_ki): -- kind(returned PolyTcTyCon) = sig_kind --@@ -2529,20 +2556,19 @@ ; (tclvl, wanted, (implicit_tvs, (skol_tcbs, (extra_tcbs, tycon_res_kind)))) <- pushLevelAndSolveEqualitiesX "kcCheckDeclHeader_sig" $ -- #16687 bindImplicitTKBndrs_Q_Tv implicit_nms $ -- Q means don't clone- matchUpSigWithDecl sig_tcbs sig_res_kind hs_tv_bndrs $ \ excess_sig_tcbs sig_res_kind ->+ matchUpSigWithDecl name sig_tcbs sig_res_kind hs_tv_bndrs $ \ excess_sig_tcbs sig_res_kind -> do { -- Kind-check the result kind annotation, if present: -- data T a b :: res_ki where ... -- ^^^^^^^^^ -- We do it here because at this point the environment has been -- extended with both 'implicit_tcv_prs' and 'explicit_tv_prs'.- ; res_kind :: ContextKind <- kc_res_ki-+ ; ctx_k <- kc_res_ki -- Work out extra_arity, the number of extra invisible binders from -- the kind signature that should be part of the TyCon's arity. -- See Note [Arity inference in kcCheckDeclHeader_sig] ; let n_invis_tcbs = countWhile isInvisibleTyConBinder excess_sig_tcbs- invis_arity = case res_kind of+ invis_arity = case ctx_k of AnyKind -> n_invis_tcbs -- No kind signature, so make all the invisible binders -- the signature into part of the arity of the TyCon OpenKind -> n_invis_tcbs -- Result kind is (TYPE rr), so again make all the@@ -2556,9 +2582,12 @@ , ppr invis_arity, ppr invis_tcbs , ppr n_invis_tcbs ] - -- Unify res_ki (from the type declaration) with- -- sig_res_kind', the residual kind from the kind signature.- ; checkExpectedResKind sig_res_kind' res_kind+ -- Unify res_ki (from the type declaration) with the residual kind from+ -- the kind signature. Don't forget to apply the skolemising 'subst' first.+ ; case ctx_k of+ AnyKind -> return () -- No signature+ _ -> do { res_ki <- newExpectedKind ctx_k+ ; discardResult (unifyKind Nothing sig_res_kind' res_ki) } -- Add more binders for data/newtype, so the result kind has no arrows -- See Note [Datatype return kinds]@@ -2578,10 +2607,9 @@ -- Here p and q both map to the same kind variable k. We don't allow this -- so we must check that they are distinct. A similar thing happens -- in GHC.Tc.TyCl.swizzleTcTyConBinders during inference.- ; implicit_tvs <- zonkTcTyVarsToTcTyVars implicit_tvs+ ; implicit_tvs <- liftZonkM $ zonkTcTyVarsToTcTyVars implicit_tvs ; let implicit_prs = implicit_nms `zip` implicit_tvs ; checkForDuplicateScopedTyVars implicit_prs- ; checkForDisconnectedScopedTyVars flav all_tcbs implicit_prs -- Swizzle the Names so that the TyCon uses the user-declared implicit names -- E.g type T :: k -> Type@@ -2595,11 +2623,11 @@ all_tv_prs = mkTyVarNamePairs (binderVars swizzled_tcbs) ; traceTc "kcCheckDeclHeader swizzle" $ vcat- [ text "sig_tcbs =" <+> ppr sig_tcbs- , text "implicit_prs =" <+> ppr implicit_prs- , text "hs_tv_bndrs =" <+> ppr hs_tv_bndrs- , text "all_tcbs =" <+> pprTyVars (binderVars all_tcbs)- , text "swizzled_tcbs =" <+> pprTyVars (binderVars swizzled_tcbs)+ [ text "implicit_prs = " <+> ppr implicit_prs+ , text "implicit_nms = " <+> ppr implicit_nms+ , text "hs_tv_bndrs = " <+> ppr hs_tv_bndrs+ , text "all_tcbs = " <+> pprTyVars (binderVars all_tcbs)+ , text "swizzled_tcbs = " <+> pprTyVars (binderVars swizzled_tcbs) , text "tycon_res_kind =" <+> ppr tycon_res_kind , text "swizzled_kind =" <+> ppr swizzled_kind ] @@ -2607,7 +2635,9 @@ -- NB: all_tcbs must bind the tyvars in the range of all_tv_prs -- because the tv_prs is used when (say) typechecking the RHS of -- a type synonym.- ; let tc = mkTcTyCon name swizzled_tcbs swizzled_kind all_tv_prs True flav+ ; let tc = mkTcTyCon name swizzled_tcbs swizzled_kind all_tv_prs+ True -- Make a PolyTcTyCon, fully generalised+ flav ; traceTc "kcCheckDeclHeader_sig }" $ vcat [ text "tyConName = " <+> ppr (tyConName tc)@@ -2618,31 +2648,11 @@ ] ; return tc } --- | Check the result kind annotation on a type constructor against--- the corresponding section of the standalone kind signature.--- Drops invisible binders that interfere with unification.-checkExpectedResKind :: TcKind -- ^ the result kind from the separate kind signature- -> ContextKind -- ^ the result kind from the declaration header- -> TcM ()-checkExpectedResKind _ AnyKind- = return () -- No signature in the declaration header-checkExpectedResKind sig_kind res_ki- = do { actual_res_ki <- newExpectedKind res_ki-- ; let -- Drop invisible binders from sig_kind until they match up- -- with res_ki. By analogy with checkExpectedKind.- n_res_invis_bndrs = invisibleTyBndrCount actual_res_ki- n_sig_invis_bndrs = invisibleTyBndrCount sig_kind- n_to_inst = n_sig_invis_bndrs - n_res_invis_bndrs-- (_, sig_kind') = splitInvisPiTysN n_to_inst sig_kind-- ; discardResult $ unifyKind Nothing sig_kind' actual_res_ki }- matchUpSigWithDecl- :: [TcTyConBinder] -- TcTyConBinders (with skolem TcTyVars) from the separate kind signature+ :: Name -- Name of the type constructor for error messages+ -> [TcTyConBinder] -- TcTyConBinders (with skolem TcTyVars) from the separate kind signature -> TcKind -- The tail end of the kind signature- -> [LHsTyVarBndr () GhcRn] -- User-written binders in decl+ -> [LHsTyVarBndr (HsBndrVis GhcRn) GhcRn] -- User-written binders in decl -> ([TcTyConBinder] -> TcKind -> TcM a) -- All user-written binders are in scope -- Argument is excess TyConBinders and tail kind -> TcM ( [TcTyConBinder] -- Skolemised binders, with TcTyVars@@ -2650,7 +2660,7 @@ -- See Note [Matching a kind signature with a declaration] -- Invariant: Length of returned TyConBinders + length of excess TyConBinders -- = length of incoming TyConBinders-matchUpSigWithDecl sig_tcbs sig_res_kind hs_bndrs thing_inside+matchUpSigWithDecl name sig_tcbs sig_res_kind hs_bndrs thing_inside = go emptySubst sig_tcbs hs_bndrs where go subst tcbs []@@ -2661,23 +2671,22 @@ go _ [] hs_bndrs = failWithTc (TcRnTooManyBinders sig_res_kind hs_bndrs) - go subst (tcb : tcbs') hs_bndrs- | Bndr tv vis <- tcb- , isVisibleTcbVis vis- , (L _ hs_bndr : hs_bndrs') <- hs_bndrs -- hs_bndrs is non-empty+ go subst (tcb : tcbs') hs_bndrs@(hs_bndr : hs_bndrs')+ | zippable (binderFlag tcb) (hsTyVarBndrFlag (unLoc hs_bndr)) = -- Visible TyConBinder, so match up with the hs_bndrs- do { let tv' = updateTyVarKind (substTy subst) $+ do { let Bndr tv vis = tcb+ tv' = updateTyVarKind (substTy subst) $ setTyVarName tv (getName hs_bndr) -- Give the skolem the Name of the HsTyVarBndr, so that if it -- appears in an error message it has a name and binding site -- that come from the type declaration, not the kind signature subst' = extendTCvSubstWithClone subst tv tv'- ; tc_hs_bndr hs_bndr (tyVarKind tv')+ ; tc_hs_bndr (unLoc hs_bndr) (tyVarKind tv') ; (tcbs', res) <- tcExtendTyVarEnv [tv'] $ go subst' tcbs' hs_bndrs' ; return (Bndr tv' vis : tcbs', res) } - | otherwise+ | skippable (binderFlag tcb) = -- Invisible TyConBinder, so do not consume one of the hs_bndrs do { let (subst', tcb') = substTyConBinderX subst tcb ; (tcbs', res) <- go subst' tcbs' hs_bndrs@@ -2685,7 +2694,14 @@ -- HsTyVarBndr for an invisible TyConBinder ; return (tcb' : tcbs', res) } - tc_hs_bndr :: HsTyVarBndr () GhcRn -> TcKind -> TcM ()+ | otherwise =+ -- At this point we conclude that:+ -- * the quantifier (tcb) is visible: (ty -> ...), (forall a -> ...)+ -- * the binder (hs_bndr) is invisible: @t, @(t :: k)+ -- Any other combination should have been handled by the zippable/skippable clauses.+ failWithTc (TcRnInvalidInvisTyVarBndr name hs_bndr)++ tc_hs_bndr :: HsTyVarBndr (HsBndrVis GhcRn) GhcRn -> TcKind -> TcM () tc_hs_bndr (UserTyVar _ _ _) _ = return () tc_hs_bndr (KindedTyVar _ _ (L _ hs_nm) lhs_kind) expected_kind@@ -2693,6 +2709,17 @@ ; discardResult $ -- See Note [discardResult in kcCheckDeclHeader_sig] unifyKind (Just (NameThing hs_nm)) sig_kind expected_kind } + -- See GHC Proposal #425, section "Kind checking",+ -- where zippable and skippable are defined.+ zippable :: TyConBndrVis -> HsBndrVis GhcRn -> Bool+ zippable vis HsBndrRequired = isVisibleTcbVis vis+ zippable vis (HsBndrInvisible _) = isInvisSpecTcbVis vis++ -- See GHC Proposal #425, section "Kind checking",+ -- where zippable and skippable are defined.+ skippable :: TyConBndrVis -> Bool+ skippable vis = not (isVisibleTcbVis vis)+ substTyConBinderX :: Subst -> TyConBinder -> (Subst, TyConBinder) substTyConBinderX subst (Bndr tv vis) = (subst', Bndr tv' vis)@@ -2732,7 +2759,7 @@ NB: these TyConBinders contain TyVars, not TcTyVars. * matchUpSigWithDecl: match the [TyConBinder] from the signature with- the [LHsTyVarBndr () GhcRn] from the declaration. The latter are the+ the [LHsTyVarBndr (HsBndrVis GhcRn) GhcRn] from the declaration. The latter are the explicit, user-written binders. e.g. data T (a :: k) b = .... There may be more of the former than the latter, because the former@@ -2881,55 +2908,7 @@ This (Id Bool) will not show up anywhere after we're done validating it, so we have no use for the produced coercion.--} -{- Note [No polymorphic recursion]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Should this kind-check?- data T ka (a::ka) b = MkT (T Type Int Bool)- (T (Type -> Type) Maybe Bool)--Notice that T is used at two different kinds in its RHS. No!-This should not kind-check. Polymorphic recursion is known to-be a tough nut.--Previously, we laboriously (with help from the renamer)-tried to give T the polymorphic kind- T :: forall ka -> ka -> kappa -> Type-where kappa is a unification variable, even in the inferInitialKinds-phase (which is what kcInferDeclHeader is all about). But-that is dangerously fragile (see the ticket).--Solution: make kcInferDeclHeader give T a straightforward-monomorphic kind, with no quantification whatsoever. That's why-we use mkAnonTyConBinder for all arguments when figuring out-tc_binders.--But notice that (#16322 comment:3)--* The algorithm successfully kind-checks this declaration:- data T2 ka (a::ka) = MkT2 (T2 Type a)-- Starting with (inferInitialKinds)- T2 :: (kappa1 :: kappa2 :: *) -> (kappa3 :: kappa4 :: *) -> *- we get- kappa4 := kappa1 -- from the (a:ka) kind signature- kappa1 := Type -- From application T2 Type-- These constraints are soluble so generaliseTcTyCon gives- T2 :: forall (k::Type) -> k -> *-- But now the /typechecking/ (aka desugaring, tcTyClDecl) phase- fails, because the call (T2 Type a) in the RHS is ill-kinded.-- We'd really prefer all errors to show up in the kind checking- phase.--* This algorithm still accepts (in all phases)- data T3 ka (a::ka) = forall b. MkT3 (T3 Type b)- although T3 is really polymorphic-recursive too.- Perhaps we should somehow reject that.- Note [Kind variable ordering for associated types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ What should be the kind of `T` in the following example? (#15591)@@ -3006,25 +2985,6 @@ * * ********************************************************************* -} -checkForDisconnectedScopedTyVars :: TyConFlavour -> [TcTyConBinder]- -> [(Name,TcTyVar)] -> TcM ()--- See Note [Disconnected type variables]--- `scoped_prs` is the mapping gotten by unifying--- - the standalone kind signature for T, with--- - the header of the type/class declaration for T-checkForDisconnectedScopedTyVars flav sig_tcbs scoped_prs- = when (needsEtaExpansion flav) $- -- needsEtaExpansion: see wrinkle (DTV1) in Note [Disconnected type variables]- mapM_ report_disconnected (filterOut ok scoped_prs)- where- sig_tvs = mkVarSet (binderVars sig_tcbs)- ok (_, tc_tv) = tc_tv `elemVarSet` sig_tvs-- report_disconnected :: (Name,TcTyVar) -> TcM ()- report_disconnected (nm, _)- = setSrcSpan (getSrcSpan nm) $- addErrTc $ TcRnDisconnectedTyVar nm- checkForDuplicateScopedTyVars :: [(Name,TcTyVar)] -> TcM () -- Check for duplicates -- E.g. data SameKind (a::k) (b::k)@@ -3055,64 +3015,6 @@ addErrTc $ TcRnDifferentNamesForTyVar n1 n2 -{- Note [Disconnected type variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-This note applies when kind-checking the header of a type/class decl that has-a separate, standalone kind signature. See #24083.--Consider:- type S a = Type-- type C :: forall k. S k -> Constraint- class C (a :: S kk) where- op :: ...kk...--Note that the class has a separate kind signature, so the elaborated decl should-look like- class C @kk (a :: S kk) where ...--But how can we "connect up" the scoped variable `kk` with the skolem kind from the-standalone kind signature for `C`? In general we do this by unifying the two.-For example- type T k = (k,Type)- type W :: forall k. T k -> Type- data W (a :: (x,Type)) = ..blah blah..--When we encounter (a :: (x,Type)) we unify the kind (x,Type) with the kind (T k)-from the standalone kind signature. Of course, unification looks through synonyms-so we end up with the mapping [x :-> k] that connects the scoped type variable `x`-with the kind from the signature.--But in our earlier example this unification is ineffective -- because `S` is a-phantom synonym that just discards its argument. So our plan is this:-- if matchUpSigWithDecl fails to connect `kk with `k`, by unification,- we give up and complain about a "disconnected" type variable.--See #24083 for dicussion of alternatives, none satisfactory. Also the fix is-easy: just add an explicit `@kk` parameter to the declaration, to bind `kk`-explicitly, rather than binding it implicitly via unification.--(DTV1) We only want to make this check when there /are/ scoped type variables; and- that is determined by needsEtaExpansion. Examples:-- type C :: x -> y -> Constraint- class C a :: b -> Constraint where { ... }- -- The a,b scope over the "..."-- type D :: forall k. k -> Type- data family D :: kk -> Type- -- Nothing for `kk` to scope over!-- In the latter data-family case, the match-up stuff in kcCheckDeclHeader_sig will- return [] for `extra_tcbs`, and in fact `all_tcbs` will be empty. So if we do- the check-for-disconnected-tyvars check we'll complain that `kk` is not bound- to one of `all_tcbs` (see #24083, comments about the `singletons` package).-- The scoped-tyvar stuff is needed precisely for data/class/newtype declarations,- where needsEtaExpansion is True.--}- {- ********************************************************************* * * Bringing type variables into scope@@ -3152,7 +3054,7 @@ -- HsOuterTyVarBndrs -------------------------------------- -bindOuterTKBndrsX :: OutputableBndrFlag flag 'Renamed+bindOuterTKBndrsX :: OutputableBndrFlag flag 'Renamed -- Only to support traceTc => SkolemMode -> HsOuterTyVarBndrs flag GhcRn -> TcM a@@ -3229,7 +3131,7 @@ -- sm_clone=False: see Note [Cloning for type variable binders] ----------------tcOuterTKBndrs :: OutputableBndrFlag flag 'Renamed+tcOuterTKBndrs :: OutputableBndrFlag flag 'Renamed -- Only to support traceTc => SkolemInfo -> HsOuterTyVarBndrs flag GhcRn -> TcM a -> TcM (HsOuterTyVarBndrs flag GhcTc, a)@@ -3240,7 +3142,7 @@ -- Do not clone the outer binders -- See Note [Cloning for type variable binders] under "must not" -tcOuterTKBndrsX :: OutputableBndrFlag flag 'Renamed+tcOuterTKBndrsX :: OutputableBndrFlag flag 'Renamed -- Only to support traceTc => SkolemMode -> SkolemInfo -> HsOuterTyVarBndrs flag GhcRn -> TcM a -> TcM (HsOuterTyVarBndrs flag GhcTc, a)@@ -3261,7 +3163,7 @@ -- Explicit tyvar binders -------------------------------------- -tcExplicitTKBndrs :: OutputableBndrFlag flag 'Renamed+tcExplicitTKBndrs :: OutputableBndrFlag flag 'Renamed -- Only to suppor traceTc => SkolemInfo -> [LHsTyVarBndr flag GhcRn] -> TcM a@@ -3269,7 +3171,7 @@ tcExplicitTKBndrs skol_info = tcExplicitTKBndrsX (smVanilla { sm_clone = True, sm_tvtv = SMDSkolemTv skol_info }) -tcExplicitTKBndrsX :: OutputableBndrFlag flag 'Renamed+tcExplicitTKBndrsX :: OutputableBndrFlag flag 'Renamed -- Only to suppor traceTc => SkolemMode -> [LHsTyVarBndr flag GhcRn] -> TcM a@@ -3304,14 +3206,14 @@ -- | Skolemise the 'HsTyVarBndr's in an 'HsForAllTelescope' with the supplied -- 'TcTyMode'. bindExplicitTKBndrs_Skol- :: (OutputableBndrFlag flag 'Renamed)+ :: (OutputableBndrFlag flag 'Renamed) -- Only to suppor traceTc => SkolemInfo -> [LHsTyVarBndr flag GhcRn] -> TcM a -> TcM ([VarBndr TyVar flag], a) bindExplicitTKBndrs_Tv- :: (OutputableBndrFlag flag 'Renamed)+ :: (OutputableBndrFlag flag 'Renamed) -- Only to suppor traceTc => [LHsTyVarBndr flag GhcRn] -> TcM a -> TcM ([VarBndr TyVar flag], a)@@ -3321,33 +3223,34 @@ -- sm_clone: see Note [Cloning for type variable binders] bindExplicitTKBndrs_Q_Skol- :: SkolemInfo+ :: (OutputableBndrFlag flag 'Renamed) -- Only to support traceTc+ => SkolemInfo -> ContextKind- -> [LHsTyVarBndr () GhcRn]+ -> [LHsTyVarBndr flag GhcRn] -> TcM a- -> TcM ([TcTyVar], a)+ -> TcM ([VarBndr TyVar flag], a) bindExplicitTKBndrs_Q_Tv- :: ContextKind- -> [LHsTyVarBndr () GhcRn]+ :: (OutputableBndrFlag flag 'Renamed) -- Only to support traceTc+ => ContextKind+ -> [LHsTyVarBndr flag GhcRn] -> TcM a- -> TcM ([TcTyVar], a)+ -> TcM ([VarBndr TyVar flag], a) -- These do not clone: see Note [Cloning for type variable binders] bindExplicitTKBndrs_Q_Skol skol_info ctxt_kind hs_bndrs thing_inside- = mapFst binderVars $- bindExplicitTKBndrsX (smVanilla { sm_clone = False, sm_parent = True+ = bindExplicitTKBndrsX (smVanilla { sm_clone = False, sm_parent = True , sm_kind = ctxt_kind, sm_tvtv = SMDSkolemTv skol_info }) hs_bndrs thing_inside -- sm_clone=False: see Note [Cloning for type variable binders] bindExplicitTKBndrs_Q_Tv ctxt_kind hs_bndrs thing_inside- = mapFst binderVars $- bindExplicitTKBndrsX (smVanilla { sm_clone = False, sm_parent = True+ = bindExplicitTKBndrsX (smVanilla { sm_clone = False, sm_parent = True , sm_tvtv = SMDTyVarTv, sm_kind = ctxt_kind }) hs_bndrs thing_inside -- sm_clone=False: see Note [Cloning for type variable binders] -bindExplicitTKBndrsX :: (OutputableBndrFlag flag 'Renamed)+bindExplicitTKBndrsX+ :: (OutputableBndrFlag flag 'Renamed) -- Only to support traceTc => SkolemMode -> [LHsTyVarBndr flag GhcRn] -> TcM a@@ -3600,9 +3503,10 @@ -- here we do it right away because there are no more unifications to come bindTyClTyVarsAndZonk tycon_name thing_inside = bindTyClTyVars tycon_name $ \ tc_bndrs tc_kind ->- do { ze <- mkEmptyZonkEnv NoFlexi- ; (ze, bndrs) <- zonkTyVarBindersX ze tc_bndrs- ; kind <- zonkTcTypeToTypeX ze tc_kind+ do { (bndrs, kind) <- initZonkEnv NoFlexi $+ runZonkBndrT (zonkTyVarBindersX tc_bndrs) $ \ bndrs ->+ do { kind <- zonkTcTypeToTypeX tc_kind+ ; return (bndrs, kind) } ; thing_inside bndrs kind } @@ -3614,7 +3518,7 @@ zonkAndScopedSort :: [TcTyVar] -> TcM [TcTyVar] zonkAndScopedSort spec_tkvs- = do { spec_tkvs <- zonkTcTyVarsToTcTyVars spec_tkvs+ = do { spec_tkvs <- liftZonkM $ zonkTcTyVarsToTcTyVars spec_tkvs -- Zonk the kinds, to we can do the dependency analysis -- Do a stable topological sort, following@@ -3652,8 +3556,12 @@ -- here will already have all type variables quantified; -- thus, every free variable is really a kv, never a tv. ; dvs <- candidateQTyVarsOfKind kind_or_type- ; dvs <- filterConstrainedCandidates wanted dvs- ; quantifyTyVars skol_info DefaultNonStandardTyVars dvs }+ ; filtered_dvs <- filterConstrainedCandidates wanted dvs+ ; traceTc "kindGeneralizeSome" $+ vcat [ text "type:" <+> ppr kind_or_type+ , text "dvs:" <+> ppr dvs+ , text "filtered_dvs:" <+> ppr filtered_dvs ]+ ; quantifyTyVars skol_info DefaultNonStandardTyVars filtered_dvs } filterConstrainedCandidates :: WantedConstraints -- Don't quantify over variables free in these@@ -3669,7 +3577,7 @@ | isEmptyWC wanted -- Fast path for a common case = return dvs | otherwise- = do { wc_tvs <- zonkTyCoVarsAndFV (tyCoVarsOfWC wanted)+ = do { wc_tvs <- liftZonkM $ zonkTyCoVarsAndFV (tyCoVarsOfWC wanted) ; let (to_promote, dvs') = partitionCandidates dvs (`elemVarSet` wc_tvs) ; _ <- promoteTyVarSet to_promote ; return dvs' }@@ -3762,7 +3670,7 @@ -} ------------------------------------etaExpandAlgTyCon :: TyConFlavour -> SkolemInfo+etaExpandAlgTyCon :: TyConFlavour tc -> SkolemInfo -> [TcTyConBinder] -> Kind -> TcM ([TcTyConBinder], Kind) etaExpandAlgTyCon flav skol_info tcbs res_kind@@ -3775,7 +3683,7 @@ in_scope = mkInScopeSetList tyvars avoid_occs = map getOccName tyvars -needsEtaExpansion :: TyConFlavour -> Bool+needsEtaExpansion :: TyConFlavour tc -> Bool needsEtaExpansion NewtypeFlavour = True needsEtaExpansion DataTypeFlavour = True needsEtaExpansion ClassFlavour = True@@ -3797,14 +3705,13 @@ -- See also Note [Datatype return kinds] in GHC.Tc.TyCl splitTyConKind skol_info in_scope avoid_occs kind = do { loc <- getSrcSpanM- ; uniqs <- newUniqueSupply+ ; new_uniqs <- getUniquesM ; rdr_env <- getLocalRdrEnv ; lvl <- getTcLevel ; let new_occs = Inf.filter (\ occ -> isNothing (lookupLocalRdrOcc rdr_env occ) && -- Note [Avoid name clashes for associated data types] not (occ `elem` avoid_occs)) $ mkOccName tvName <$> allNameStrings- new_uniqs = uniqsFromSupply uniqs subst = mkEmptySubst in_scope details = SkolemTv skol_info (pushTcLevel lvl) False -- As always, allocate skolems one level in@@ -3814,9 +3721,10 @@ Nothing -> (reverse acc, substTy subst kind) Just (Anon arg af, kind')- -> go occs' uniqs' subst' (tcb : acc) kind'+ -> assert (af == FTF_T_T) $+ go occs' uniqs' subst' (tcb : acc) kind' where- tcb = Bndr tv (AnonTCB af)+ tcb = Bndr tv AnonTCB arg' = substTy subst (scaledThing arg) name = mkInternalName uniq occ loc tv = mkTcTyVar name arg' details@@ -3957,7 +3865,8 @@ go fun_kind subst all_args@(arg : args) | Just (tcb, inner_kind) <- splitPiTy_maybe fun_kind = case tcb of- Anon _ af -> AnonTCB af : go inner_kind subst args+ Anon _ af -> assert (af == FTF_T_T) $+ AnonTCB : go inner_kind subst args Named (Bndr tv vis) -> NamedTCB vis : go inner_kind subst' args where subst' = extendTCvSubst subst tv arg@@ -4104,9 +4013,11 @@ -- Zonk, so that any nested foralls can "see" their occurrences -- See Note [Checking partial type signatures], and in particular -- Note [Levels for wildcards]- ; tv_prs <- mapSndM zonkInvisTVBinder (tv_prs ++ tv_prs')- ; theta <- mapM zonkTcType (theta ++ theta')- ; tau <- zonkTcType tau+ ; (tv_prs, theta, tau) <- liftZonkM $+ do { tv_prs <- mapSndM zonkInvisTVBinder (tv_prs ++ tv_prs')+ ; theta <- mapM zonkTcType (theta ++ theta')+ ; tau <- zonkTcType tau+ ; return (tv_prs, theta, tau) } -- NB: checkValidType on the final inferred type will be -- done later by checkInferredPolyId. We can't do it@@ -4299,7 +4210,7 @@ -- to a's kind, which will be a metavariable. -- kindGeneralizeNone does this: ; kindGeneralizeNone sig_ty- ; sig_ty <- zonkTcType sig_ty+ ; sig_ty <- liftZonkM $ zonkTcType sig_ty ; checkValidType ctxt sig_ty ; traceTc "tcHsPatSigType" (ppr sig_tkv_prs)@@ -4404,7 +4315,7 @@ ; traceTc "tcLHsKindSig" (ppr hs_kind $$ ppr kind) -- No generalization: ; kindGeneralizeNone kind- ; kind <- zonkTcType kind+ ; kind <- liftZonkM $ zonkTcType kind -- This zonk is very important in the case of higher rank kinds -- E.g. #13879 f :: forall (p :: forall z (y::z). <blah>). -- <more blah>@@ -4438,7 +4349,7 @@ 2 (quotes (ppr arg)) -- | Add a "In the data declaration for T" or some such.-addTyConFlavCtxt :: Name -> TyConFlavour -> TcM a -> TcM a+addTyConFlavCtxt :: Name -> TyConFlavour tc -> TcM a -> TcM a addTyConFlavCtxt name flav = addErrCtxt $ hsep [ text "In the", ppr flav , text "declaration for", quotes (ppr name) ]
GHC/Tc/Gen/Match.hs view
@@ -42,6 +42,7 @@ , tcCheckMonoExpr, tcCheckMonoExprNC , tcCheckPolyExpr ) +import GHC.Rename.Utils ( bindLocalNames, isIrrefutableHsPatRn ) import GHC.Tc.Errors.Types import GHC.Tc.Utils.Monad import GHC.Tc.Utils.Env@@ -69,7 +70,7 @@ import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Misc-import GHC.Driver.Session ( getDynFlags )+import GHC.Driver.DynFlags ( getDynFlags ) import GHC.Types.Fixity (LexicalFixity(..)) import GHC.Types.Name@@ -473,21 +474,28 @@ ; thing <- thing_inside elt_ty ; return (BodyStmt boolTy rhs' noSyntaxExpr noSyntaxExpr, thing) } --- ParStmt: See notes with tcMcStmt+-- ParStmt: See notes with tcMcStmt and Note [Scoping in parallel list comprehensions] tcLcStmt m_tc ctxt (ParStmt _ bndr_stmts_s _ _) elt_ty thing_inside- = do { (pairs', thing) <- loop bndr_stmts_s+ = do { env <- getLocalRdrEnv+ ; (pairs', thing) <- loop env [] bndr_stmts_s ; return (ParStmt unitTy pairs' noExpr noSyntaxExpr, thing) } where- -- loop :: [([LStmt GhcRn], [GhcRn])]+ -- loop :: LocalRdrEnv -- The original LocalRdrEnv+ -- -> [Name] -- Variables bound by earlier branches+ -- -> [([LStmt GhcRn], [GhcRn])] -- -> TcM ([([LStmt GhcTc], [GhcTc])], thing)- loop [] = do { thing <- thing_inside elt_ty- ; return ([], thing) } -- matching in the branches+ --+ -- Invariant: on entry to `loop`, the LocalRdrEnv is set to+ -- origEnv, the LocalRdrEnv for the entire comprehension+ loop _ allBinds [] = do { thing <- bindLocalNames allBinds $ thing_inside elt_ty+ ; return ([], thing) } -- matching in the branches - loop (ParStmtBlock x stmts names _ : pairs)+ loop origEnv priorBinds (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+ ; (pairs', thing) <- setLocalRdrEnv origEnv $+ loop origEnv (names ++ priorBinds) pairs ; return (ids, pairs', thing) } ; return ( ParStmtBlock x stmts' ids noSyntaxExpr : pairs', thing ) } @@ -980,7 +988,7 @@ -- yet determined. tcMonadFailOp orig pat fail_op res_ty = do dflags <- getDynFlags- if isIrrefutableHsPat dflags pat+ if isIrrefutableHsPatRn dflags pat then return Nothing else Just . snd <$> (tcSyntaxOp orig fail_op [synKnownType stringTy] (mkCheckExpType res_ty) $ \_ _ -> return ())@@ -1012,6 +1020,21 @@ <$> :: (pat_ty_1 -> ... -> pat_ty_n -> body_ty) -> exp_ty_1 -> t_1 <*>_i :: t_(i-1) -> exp_ty_i -> t_i join :: tn -> res_ty++Note [Scoping in parallel list comprehensions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In a parallel list comprehension like [ ebody | a <- blah1; e1 | b <- blah2; e2 ]+we want to ensure that in the lexical environment, tcl_rdr :: LocalRdrEnv, we have+ * 'a' in scope in e1, but not 'b'+ * 'b' in scope in e2, but not 'a'+ * Both in scope in ebody+We don't want too /many/ variables in the LocalRdrEnv, else we make stupid+suggestions for an out-of-scope variable (#22940).++To achieve this we:+ * At the start of each branch, reset the LocalRdrEnv to the outer scope.+ * Before typechecking ebody, add to LocalRdrEnv all the variables bound in+ all branches. This step is done with bindLocalNames. -} tcApplicativeStmts
GHC/Tc/Gen/Pat.hs view
@@ -31,7 +31,6 @@ import GHC.Hs.Syn.Type import GHC.Rename.Utils import GHC.Tc.Errors.Types-import GHC.Tc.Utils.Zonk import GHC.Tc.Gen.Sig( TcPragEnv, lookupPragEnv, addInlinePrags ) import GHC.Tc.Utils.Monad import GHC.Tc.Utils.Instantiate@@ -44,7 +43,7 @@ import GHC.Tc.Utils.Concrete ( hasFixedRuntimeRep_syntactic ) import GHC.Tc.Utils.Env import GHC.Tc.Utils.TcMType-import GHC.Tc.Validity( arityErr )+import GHC.Tc.Zonk.TcType import GHC.Core.TyCo.Ppr ( pprTyVars ) import GHC.Tc.Utils.TcType import GHC.Tc.Utils.Unify@@ -60,7 +59,7 @@ import GHC.Core.ConLike import GHC.Builtin.Names import GHC.Types.Basic hiding (SuccessFlag(..))-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Types.SrcLoc import GHC.Types.Var.Set import GHC.Utils.Misc@@ -1113,7 +1112,7 @@ This is achieve easily, but a bit trickily. When we instantiate Annotated's "required" constraints, in tcPatSynPat, give them a CtOrigin of (OccurrenceOf "Annotated"). That way the special magic-in GHC.Tc.Solver.Canonical.canClassNC which deals with CallStack+in GHC.Tc.Solver.Dict.solveCallStack which deals with CallStack constraints will kick in: that logic only fires on constraints whose Origin is (OccurrenceOf f). @@ -1329,7 +1328,7 @@ -- NB: type_args already dealt with -- See Note [Type applications in patterns] { checkTc (con_arity == no_of_args) -- Check correct arity- (arityErr (text "constructor") con_like con_arity no_of_args)+ (TcRnArityMismatch (AConLike con_like) con_arity no_of_args) ; let pats_w_tys = zipEqual "tcConArgs" arg_pats arg_tys ; (arg_pats', res) <- tcMultiple tcConArg penv pats_w_tys thing_inside@@ -1341,7 +1340,7 @@ InfixCon p1 p2 -> do { checkTc (con_arity == 2) -- Check correct arity- (arityErr (text "constructor") con_like con_arity 2)+ (TcRnArityMismatch (AConLike con_like) con_arity 2) ; let [arg_ty1,arg_ty2] = arg_tys -- This can't fail after the arity check ; ([p1',p2'], res) <- tcMultiple tcConArg penv [(p1,arg_ty1),(p2,arg_ty2)] thing_inside
GHC/Tc/Gen/Rule.hs view
@@ -24,6 +24,7 @@ import GHC.Tc.Gen.Expr import GHC.Tc.Utils.Env import GHC.Tc.Utils.Unify( buildImplicationFor )+import GHC.Tc.Zonk.TcType import GHC.Core.Type import GHC.Core.Coercion( mkCoVarCo )@@ -133,7 +134,7 @@ , ppr lhs_wanted , ppr rhs_wanted ]) - ; (lhs_evs, residual_lhs_wanted)+ ; (lhs_evs, residual_lhs_wanted, dont_default) <- simplifyRule name tc_lvl lhs_wanted rhs_wanted -- SimplifyRule Plan, step 4@@ -147,21 +148,20 @@ -- -- We also need to get the completely-unconstrained tyvars of -- the LHS, lest they otherwise get defaulted to Any; but we do that- -- during zonking (see GHC.Tc.Utils.Zonk.zonkRule)+ -- during zonking (see GHC.Tc.Zonk.Type.zonkRule) ; let tpl_ids = lhs_evs ++ id_bndrs -- See Note [Re-quantify type variables in rules] ; forall_tkvs <- candidateQTyVarsOfTypes (rule_ty : map idType tpl_ids)- ; let don't_default = nonDefaultableTyVarsOfWC residual_lhs_wanted- ; let weed_out = (`dVarSetMinusVarSet` don't_default)+ ; let weed_out = (`dVarSetMinusVarSet` dont_default) quant_cands = forall_tkvs { dv_kvs = weed_out (dv_kvs forall_tkvs) , dv_tvs = weed_out (dv_tvs forall_tkvs) } ; qtkvs <- quantifyTyVars skol_info DefaultNonStandardTyVars quant_cands ; traceTc "tcRule" (vcat [ pprFullRuleName (snd ext) rname , text "forall_tkvs:" <+> ppr forall_tkvs , text "quant_cands:" <+> ppr quant_cands- , text "don't_default:" <+> ppr don't_default+ , text "dont_default:" <+> ppr dont_default , text "residual_lhs_wanted:" <+> ppr residual_lhs_wanted , text "qtkvs:" <+> ppr qtkvs , text "rule_ty:" <+> ppr rule_ty@@ -401,7 +401,8 @@ -> WantedConstraints -- Constraints from LHS -> WantedConstraints -- Constraints from RHS -> TcM ( [EvVar] -- Quantify over these LHS vars- , WantedConstraints) -- Residual un-quantified LHS constraints+ , WantedConstraints -- Residual un-quantified LHS constraints+ , TcTyVarSet ) -- Don't default these -- See Note [The SimplifyRule Plan] -- NB: This consumes all simple constraints on the LHS, but not -- any LHS implication constraints.@@ -413,17 +414,26 @@ -- Why clone? See Note [Simplify cloned constraints] ; lhs_clone <- cloneWC lhs_wanted ; rhs_clone <- cloneWC rhs_wanted- ; setTcLevel tc_lvl $- discardResult $- runTcS $- do { _ <- solveWanteds lhs_clone- ; _ <- solveWanteds rhs_clone- -- Why do them separately?- -- See Note [Solve order for RULES]- ; return () }+ ; (dont_default, _)+ <- setTcLevel tc_lvl $+ runTcS $+ do { lhs_wc <- solveWanteds lhs_clone+ ; _rhs_wc <- solveWanteds rhs_clone+ -- Why do them separately?+ -- See Note [Solve order for RULES] + ; let dont_default = nonDefaultableTyVarsOfWC lhs_wc+ -- If lhs_wanteds has+ -- (a[sk] :: TYPE rr[sk]) ~ (b0[tau] :: TYPE r0[conc])+ -- we want r0 to be non-defaultable;+ -- see nonDefaultableTyVarsOfWC. Simplest way to get+ -- this is to look at the post-simplified lhs_wc, which+ -- will contain (rr[sk] ~ r0[conc)]. An example is in+ -- test rep-poly/RepPolyRule1+ ; return dont_default }+ -- Note [The SimplifyRule Plan] step 2- ; lhs_wanted <- zonkWC lhs_wanted+ ; lhs_wanted <- liftZonkM $ zonkWC lhs_wanted ; let (quant_cts, residual_lhs_wanted) = getRuleQuantCts lhs_wanted -- Note [The SimplifyRule Plan] step 3@@ -435,9 +445,10 @@ , text "rhs_wanted" <+> ppr rhs_wanted , text "quant_cts" <+> ppr quant_cts , text "residual_lhs_wanted" <+> ppr residual_lhs_wanted+ , text "dont_default" <+> ppr dont_default ] - ; return (quant_evs, residual_lhs_wanted) }+ ; return (quant_evs, residual_lhs_wanted, dont_default) } where mk_quant_ev :: Ct -> TcM EvVar@@ -464,7 +475,7 @@ -- and attempt to solve them from the quantified constraints. That -- nearly works, but fails for a constraint like (d :: Eq Int). -- We /do/ want to quantify over it, but the short-cut solver--- (see GHC.Tc.Solver.Interact Note [Shortcut solving]) ignores the quantified+-- (see GHC.Tc.Solver.Dict Note [Shortcut solving]) ignores the quantified -- and instead solves from the top level. -- -- So we must partition the WantedConstraints ourselves
GHC/Tc/Gen/Sig.hs view
@@ -28,7 +28,7 @@ import GHC.Prelude import GHC.Data.FastString -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Backend import GHC.Hs@@ -40,7 +40,7 @@ import GHC.Tc.Solver( pushLevelAndSolveEqualitiesX, reportUnsolvedEqualities ) import GHC.Tc.Utils.Monad import GHC.Tc.Utils.TcMType ( checkTypeHasFixedRuntimeRep )-import GHC.Tc.Utils.Zonk+import GHC.Tc.Zonk.Type import GHC.Tc.Types.Origin import GHC.Tc.Utils.TcType import GHC.Tc.Validity ( checkValidType )@@ -299,7 +299,7 @@ go (L _ ty) = case ty of HsWildCardTy _ -> False HsAppTy _ ty1 ty2 -> go ty1 && go ty2- HsAppKindTy _ ty ki -> go ty && go ki+ HsAppKindTy _ ty _ ki -> go ty && go ki HsFunTy _ w ty1 ty2 -> go ty1 && go ty2 && go (arrowToHsType w) HsListTy _ ty -> go ty HsTupleTy _ _ tys -> gos tys@@ -442,14 +442,17 @@ -- These are /signatures/ so we zonk to squeeze out any kind -- unification variables. Do this after kindGeneralizeAll which may -- default kind variables to *.- ; ze <- mkEmptyZonkEnv NoFlexi- ; (ze, kv_bndrs) <- zonkTyVarBindersX ze (mkTyVarBinders InferredSpec kvs)- ; (ze, implicit_bndrs) <- zonkTyVarBindersX ze implicit_bndrs- ; (ze, univ_bndrs) <- zonkTyVarBindersX ze univ_bndrs- ; (ze, ex_bndrs) <- zonkTyVarBindersX ze ex_bndrs- ; req <- zonkTcTypesToTypesX ze req- ; prov <- zonkTcTypesToTypesX ze prov- ; body_ty <- zonkTcTypeToTypeX ze body_ty+ ; (kv_bndrs, implicit_bndrs, univ_bndrs, ex_bndrs, req, prov, body_ty) <-+ initZonkEnv NoFlexi $+ runZonkBndrT (zonkTyVarBindersX (mkTyVarBinders InferredSpec kvs)) $ \ kv_bndrs ->+ runZonkBndrT (zonkTyVarBindersX implicit_bndrs) $ \ implicit_bndrs ->+ runZonkBndrT (zonkTyVarBindersX univ_bndrs) $ \ univ_bndrs ->+ do { req <- zonkTcTypesToTypesX req+ ; runZonkBndrT (zonkTyVarBindersX ex_bndrs) $ \ ex_bndrs ->+ do { prov <- zonkTcTypesToTypesX prov+ ; body_ty <- zonkTcTypeToTypeX body_ty+ ; return (kv_bndrs, implicit_bndrs, univ_bndrs, ex_bndrs,+ req, prov, body_ty) } } -- Now do validity checking ; checkValidType ctxt $@@ -513,12 +516,12 @@ tcInstSig :: TcIdSigInfo -> TcM TcIdSigInst -- Instantiate a type signature; only used with plan InferGen-tcInstSig sig@(CompleteSig { sig_bndr = poly_id, sig_loc = loc })+tcInstSig hs_sig@(CompleteSig { sig_bndr = poly_id, sig_loc = loc }) = setSrcSpan loc $ -- Set the binding site of the tyvars do { (tv_prs, theta, tau) <- tcInstTypeBndrs (idType poly_id) -- See Note [Pattern bindings and complete signatures] - ; return (TISI { sig_inst_sig = sig+ ; return (TISI { sig_inst_sig = hs_sig , sig_inst_skols = tv_prs , sig_inst_wcs = [] , sig_inst_wcx = Nothing
GHC/Tc/Gen/Splice.hs view
@@ -34,7 +34,7 @@ import GHC.Driver.Errors import GHC.Driver.Plugins import GHC.Driver.Main-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Env import GHC.Driver.Hooks import GHC.Driver.Config.Diagnostic@@ -49,8 +49,10 @@ import GHC.Tc.Utils.Unify import GHC.Tc.Utils.Env import GHC.Tc.Types.Origin+import GHC.Tc.Types.LclEnv import GHC.Tc.Types.Evidence-import GHC.Tc.Utils.Zonk+import GHC.Tc.Zonk.Type+import GHC.Tc.Zonk.TcType import GHC.Tc.Solver import GHC.Tc.Utils.TcMType import GHC.Tc.Gen.HsType@@ -92,7 +94,6 @@ import GHC.Core.ConLike import GHC.Core.DataCon as DataCon -import GHC.Types.FieldLabel import GHC.Types.SrcLoc import GHC.Types.Name.Env import GHC.Types.Name.Set@@ -131,7 +132,6 @@ import GHC.Data.Maybe( MaybeErr(..) ) import qualified GHC.Data.EnumSet as EnumSet -import Language.Haskell.Syntax.Basic (FieldLabelString(..)) import qualified Language.Haskell.TH as TH -- THSyntax gives access to internal functions and data types import qualified Language.Haskell.TH.Syntax as TH@@ -145,7 +145,6 @@ import Control.Monad import Data.Binary import Data.Binary.Get-import Data.List ( find ) import Data.Maybe import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as LB@@ -155,6 +154,7 @@ import Data.Typeable ( typeOf, Typeable, TypeRep, typeRep ) import Data.Data (Data) import Data.Proxy ( Proxy (..) )+import Data.IORef import GHC.Parser.HaddockLex (lexHsDoc) import GHC.Parser (parseIdentifier) import GHC.Rename.Doc (rnHsDoc)@@ -793,7 +793,8 @@ -- Takes a m and tau and returns the type m (TExp tau) tcTExpTy :: TcType -> TcType -> TcM TcType tcTExpTy m_ty exp_ty- = do { unless (isTauTy exp_ty) $ addErr (TcRnTypedTHWithPolyType exp_ty)+ = do { unless (isTauTy exp_ty) $ addErr $+ TcRnTHError $ TypedTHError $ TypedTHWithPolyType exp_ty ; codeCon <- tcLookupTyCon codeTyConName ; let rep = getRuntimeRep exp_ty ; return (mkTyConApp codeCon [rep, m_ty, exp_ty]) }@@ -917,7 +918,7 @@ runTopSplice :: DelayedSplice -> TcM (HsExpr GhcTc) runTopSplice (DelayedSplice lcl_env orig_expr res_ty q_expr) = restoreLclEnv lcl_env $- do { zonked_ty <- zonkTcType res_ty+ do { zonked_ty <- liftZonkM $ zonkTcType res_ty ; zonked_q_expr <- zonkTopLExpr q_expr -- See Note [Collecting modFinalizers in typed splices]. ; modfinalizers_ref <- newTcRef []@@ -962,7 +963,7 @@ spliceResultDoc :: LHsExpr GhcTc -> SDoc spliceResultDoc expr = sep [ text "In the result of the splice:"- , nest 2 (char '$' <> ppr expr)+ , nest 2 (text "$$" <> ppr expr) , text "To see what the splice expanded to, use -ddump-splices"] stubNestedSplice :: HsExpr GhcTc@@ -1058,6 +1059,7 @@ withForeignRefs (x : xs) f = withForeignRef x $ \r -> withForeignRefs xs $ \rs -> f (r : rs) interp <- tcGetInterp+ case interpInstance interp of #if defined(HAVE_INTERNAL_INTERPRETER) InternalInterp -> do@@ -1065,17 +1067,18 @@ runQuasi $ sequence_ qs #endif - ExternalInterp conf iserv -> withIServ_ conf iserv $ \i -> do+ ExternalInterp ext -> withExtInterp ext $ \inst -> do tcg <- getGblEnv th_state <- readTcRef (tcg_th_remote_state tcg) case th_state of Nothing -> return () -- TH was not started, nothing to do Just fhv -> do- liftIO $ withForeignRef fhv $ \st ->+ r <- liftIO $ withForeignRef fhv $ \st -> withForeignRefs finRefs $ \qrefs ->- writeIServ i (putMessage (RunModFinalizers st qrefs))- () <- runRemoteTH i []- readQResult i+ sendMessageDelayedResponse inst (RunModFinalizers st qrefs)+ () <- runRemoteTH inst []+ qr <- liftIO $ receiveDelayedResponse inst r+ checkQResult qr runQResult :: (a -> String)@@ -1250,7 +1253,8 @@ -- see where this splice is do { mb_result <- run_and_convert expr_span hval ; case mb_result of- Left err -> failWithTc (TcRnRunSpliceFailure Nothing err)+ Left err -> failWithTc $+ TcRnTHError $ THSpliceFailed $ RunSpliceFailure err Right result -> do { traceTc "Got HsSyn result:" (ppr_hs result) ; return $! result } } @@ -1265,8 +1269,8 @@ fail_with_exn :: Exception e => SplicePhase -> e -> TcM a fail_with_exn phase exn = do exn_msg <- liftIO $ Panic.safeShowException exn- failWithTc- $ TcRnSpliceThrewException phase (SomeException exn) exn_msg expr show_code+ failWithTc $ TcRnTHError $ THSpliceFailed $+ SpliceThrewException phase (SomeException exn) exn_msg expr show_code {- Note [Running typed splices in the zonker]@@ -1382,8 +1386,8 @@ -- 'msg' is forced to ensure exceptions don't escape, -- see Note [Exceptions in TH]- qReport True msg = seqList msg $ addErr $ TcRnReportCustomQuasiError True msg- qReport False msg = seqList msg $ addDiagnostic $ TcRnReportCustomQuasiError False msg+ qReport True msg = seqList msg $ addErr $ TcRnTHError $ ReportCustomQuasiError True msg+ qReport False msg = seqList msg $ addDiagnostic $ TcRnTHError $ ReportCustomQuasiError False msg qLocation :: TcM TH.Loc qLocation = do { m <- getModule@@ -1436,8 +1440,8 @@ th_origin <- getThSpliceOrigin let either_hval = convertToHsDecls th_origin l thds ds <- case either_hval of- Left exn -> failWithTc- $ TcRnRunSpliceFailure (Just "addTopDecls") exn+ Left exn -> failWithTc $ TcRnTHError $ AddTopDeclsError $+ AddTopDeclsRunSpliceFailure exn Right ds -> return ds mapM_ (checkTopDecl . unLoc) ds th_topdecls_var <- fmap tcg_th_topdecls getGblEnv@@ -1453,7 +1457,7 @@ checkTopDecl (ForD _ (ForeignImport { fd_name = L _ name })) = bindName name checkTopDecl d- = addErr $ TcRnInvalidTopDecl d+ = addErr $ TcRnTHError $ AddTopDeclsError $ InvalidTopDecl d bindName :: RdrName -> TcM () bindName (Exact n)@@ -1461,7 +1465,7 @@ ; updTcRef th_topnames_var (\ns -> extendNameSet ns n) } - bindName name = addErr $ TcRnNonExactName name+ bindName name = addErr $ TcRnTHError $ THNameError $ NonExactName name qAddForeignFilePath lang fp = do var <- fmap tcg_th_foreign_files getGblEnv@@ -1479,7 +1483,7 @@ let dflags = hsc_dflags hsc_env let fopts = initFinderOpts dflags r <- liftIO $ findHomeModule fc fopts home_unit (mkModuleName plugin)- let err = TcRnAddInvalidCorePlugin plugin+ let err = TcRnTHError $ AddInvalidCorePlugin plugin case r of Found {} -> addErr err FoundMultiple {} -> addErr err@@ -1507,7 +1511,7 @@ th_doc_var <- tcg_th_docs <$> getGblEnv resolved_doc_loc <- resolve_loc doc_loc is_local <- checkLocalName resolved_doc_loc- unless is_local $ failWithTc $ TcRnAddDocToNonLocalDefn doc_loc+ unless is_local $ failWithTc $ TcRnTHError $ AddDocToNonLocalDefn doc_loc let ds = mkGeneratedHsDocString s hd = lexHsDoc parseIdentifier ds hd' <- rnHsDoc hd@@ -1591,7 +1595,7 @@ Right (_, []) -> noMatches where noMatches = failWithTc $- TcRnFailedToLookupThInstName th_type NoMatchesFound+ TcRnTHError $ FailedToLookupThInstName th_type NoMatchesFound -- Get the name of the class for the instance we are documenting -- > inst_cls_name (Monad Maybe) == Monad@@ -1628,7 +1632,7 @@ inst_cls_name (TH.ImplicitParamT _ _) = inst_cls_name_err inst_cls_name_err = failWithTc $- TcRnFailedToLookupThInstName th_type CouldNotDetermineInstance+ TcRnTHError $ FailedToLookupThInstName th_type CouldNotDetermineInstance -- Basically does the opposite of 'mkThAppTs' -- > inst_arg_types (Monad Maybe) == [Maybe]@@ -1691,37 +1695,40 @@ return r #endif - ExternalInterp conf iserv ->+ ExternalInterp ext -> withExtInterp ext $ \inst -> do -- Run it on the server. For an overview of how TH works with -- Remote GHCi, see Note [Remote Template Haskell] in -- libraries/ghci/GHCi/TH.hs.- withIServ_ conf iserv $ \i -> do- rstate <- getTHState i- loc <- TH.qLocation- liftIO $- withForeignRef rstate $ \state_hv ->- withForeignRef fhv $ \q_hv ->- writeIServ i (putMessage (RunTH state_hv q_hv ty (Just loc)))- runRemoteTH i []- bs <- readQResult i- return $! runGet get (LB.fromStrict bs)+ rstate <- getTHState inst+ loc <- TH.qLocation+ -- run a remote TH request+ r <- liftIO $+ withForeignRef rstate $ \state_hv ->+ withForeignRef fhv $ \q_hv ->+ sendMessageDelayedResponse inst (RunTH state_hv q_hv ty (Just loc))+ -- respond to requests from the interpreter+ runRemoteTH inst []+ -- get the final result+ qr <- liftIO $ receiveDelayedResponse inst r+ bs <- checkQResult qr+ return $! runGet get (LB.fromStrict bs) -- | communicate with a remotely-running TH computation until it finishes. -- See Note [Remote Template Haskell] in libraries/ghci/GHCi/TH.hs. runRemoteTH- :: IServInstance+ :: ExtInterpInstance d -> [Messages TcRnMessage] -- saved from nested calls to qRecover -> TcM ()-runRemoteTH iserv recovers = do- THMsg msg <- liftIO $ readIServ iserv getTHMessage+runRemoteTH inst recovers = do+ THMsg msg <- liftIO $ receiveTHMessage inst case msg of RunTHDone -> return () StartRecover -> do -- Note [TH recover with -fexternal-interpreter] v <- getErrsVar msgs <- readTcRef v writeTcRef v emptyMessages- runRemoteTH iserv (msgs : recovers)+ runRemoteTH inst (msgs : recovers) EndRecover caught_error -> do let (prev_msgs, rest) = case recovers of [] -> panic "EndRecover"@@ -1732,16 +1739,15 @@ writeTcRef v $ if caught_error then prev_msgs else mkMessages warn_msgs `unionMessages` prev_msgs- runRemoteTH iserv rest+ runRemoteTH inst rest _other -> do r <- handleTHMessage msg- liftIO $ writeIServ iserv (put r)- runRemoteTH iserv recovers+ liftIO $ sendAnyValue inst r+ runRemoteTH inst recovers --- | Read a value of type QResult from the iserv-readQResult :: Binary a => IServInstance -> TcM a-readQResult i = do- qr <- liftIO $ readIServ i get+-- | Check a QResult+checkQResult :: QResult a -> TcM a+checkQResult qr = case qr of QDone a -> return a QException str -> liftIO $ throwIO (ErrorCall str)@@ -1788,17 +1794,18 @@ -- -- The TH state is stored in tcg_th_remote_state in the TcGblEnv. ---getTHState :: IServInstance -> TcM (ForeignRef (IORef QState))-getTHState i = do- tcg <- getGblEnv- th_state <- readTcRef (tcg_th_remote_state tcg)- case th_state of- Just rhv -> return rhv- Nothing -> do- interp <- tcGetInterp- fhv <- liftIO $ mkFinalizedHValue interp =<< iservCall i StartTH- writeTcRef (tcg_th_remote_state tcg) (Just fhv)- return fhv+getTHState :: ExtInterpInstance d -> TcM (ForeignRef (IORef QState))+getTHState inst = do+ th_state_var <- tcg_th_remote_state <$> getGblEnv+ liftIO $ do+ th_state <- readIORef th_state_var+ case th_state of+ Just rhv -> return rhv+ Nothing -> do+ rref <- sendMessage inst StartTH+ fhv <- mkForeignRef rref (freeReallyRemoteRef inst rref)+ writeIORef th_state_var (Just fhv)+ return fhv wrapTHResult :: TcM a -> TcM (THResult a) wrapTHResult tcm = do@@ -1916,14 +1923,14 @@ ; let matches = lookupFamInstEnv inst_envs tc tys ; traceTc "reifyInstances'2" (ppr matches) ; return $ Right (tc, map fim_instance matches) }- _ -> bale_out $ TcRnCannotReifyInstance ty }+ _ -> bale_out $ TcRnTHError $ THReifyError $ CannotReifyInstance ty } where doc = ClassInstanceCtx bale_out msg = failWithTc msg cvt :: Origin -> SrcSpan -> TH.Type -> TcM (LHsType GhcPs) cvt origin loc th_ty = case convertToHsType origin loc th_ty of- Left msg -> failWithTc (TcRnRunSpliceFailure Nothing msg)+ Left msg -> failWithTc (TcRnTHError $ THSpliceFailed $ RunSpliceFailure msg) Right ty -> return ty {-@@ -1938,7 +1945,7 @@ -- False <=> value namespace -> String -> TcM (Maybe TH.Name) lookupName is_type_name s- = do { mb_nm <- lookupOccRn_maybe rdr_name+ = do { mb_nm <- lookupSameOccRn_maybe rdr_name ; return (fmap reifyName mb_nm) } where th_name = TH.mkName s -- Parses M.x into a base of 'x' and a module of 'M'@@ -1964,7 +1971,7 @@ getThSpliceOrigin :: TcM Origin getThSpliceOrigin = do warn <- goptM Opt_EnableThSpliceWarnings- if warn then return FromSource else return Generated+ if warn then return FromSource else return (Generated SkipPmc) getThing :: TH.Name -> TcM TcTyThing@@ -1975,9 +1982,10 @@ -- ToDo: this tcLookup could fail, which would give a -- rather unhelpful error message where- ppr_ns (TH.Name _ (TH.NameG TH.DataName _pkg _mod)) = text "data"- ppr_ns (TH.Name _ (TH.NameG TH.TcClsName _pkg _mod)) = text "tc"- ppr_ns (TH.Name _ (TH.NameG TH.VarName _pkg _mod)) = text "var"+ ppr_ns (TH.Name _ (TH.NameG TH.DataName _pkg _mod)) = text "data"+ ppr_ns (TH.Name _ (TH.NameG TH.TcClsName _pkg _mod)) = text "tc"+ ppr_ns (TH.Name _ (TH.NameG TH.VarName _pkg _mod)) = text "var"+ ppr_ns (TH.Name _ (TH.NameG (TH.FldName {}) _pkg _mod)) = text "fld" ppr_ns _ = panic "reify/ppr_ns" reify :: TH.Name -> TcM TH.Info@@ -1996,10 +2004,14 @@ lookupThName_maybe :: TH.Name -> TcM (Maybe Name) lookupThName_maybe th_name- = do { names <- mapMaybeM lookupOccRn_maybe (thRdrNameGuesses th_name)+ = do { let guesses = thRdrNameGuesses th_name+ ; case guesses of+ { [for_sure] -> lookupSameOccRn_maybe for_sure+ ; _ ->+ do { gres <- mapMaybeM lookupOccRn_maybe guesses -- 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) }+ ; return (fmap greName $ listToMaybe gres) } } } tcLookupTh :: Name -> TcM TcTyThing -- This is a specialised version of GHC.Tc.Utils.Env.tcLookup; specialised mainly in that@@ -2007,7 +2019,7 @@ -- tcLookup, failure is a bug. tcLookupTh name = do { (gbl_env, lcl_env) <- getEnvs- ; case lookupNameEnv (tcl_env lcl_env) name of {+ ; case lookupNameEnv (getLclEnvTypeEnv lcl_env) name of { Just thing -> return thing; Nothing -> @@ -2024,15 +2036,15 @@ do { mb_thing <- tcLookupImported_maybe name ; case mb_thing of Succeeded thing -> return (AGlobal thing)- Failed msg -> failWithTc (TcRnInterfaceLookupError name msg)+ Failed msg -> failWithTc (TcRnInterfaceError msg) }}}} notInScope :: TH.Name -> TcRnMessage notInScope th_name =- TcRnCannotReifyOutOfScopeThing th_name+ TcRnTHError $ THReifyError $ CannotReifyOutOfScopeThing th_name notInEnv :: Name -> TcRnMessage-notInEnv name = TcRnCannotReifyThingNotInTypeEnv name+notInEnv name = TcRnTHError $ THReifyError $ CannotReifyThingNotInTypeEnv name ------------------------------ reifyRoles :: TH.Name -> TcM [TH.Role]@@ -2040,7 +2052,8 @@ = do { thing <- getThing th_name ; case thing of AGlobal (ATyCon tc) -> return (map reify_role (tyConRoles tc))- _ -> failWithTc (TcRnNoRolesAssociatedWithThing thing)+ _ -> failWithTc $ TcRnTHError $ THReifyError $+ NoRolesAssociatedWithThing thing } where reify_role Nominal = TH.NominalR@@ -2057,10 +2070,8 @@ = do { ty <- reifyType (idType id) ; let v = reifyName id ; case idDetails id of- ClassOpId cls -> return (TH.ClassOpI v ty (reifyName cls))- RecSelId{sel_tycon=RecSelData tc}- -> return (TH.VarI (reifySelector id tc) ty Nothing)- _ -> return (TH.VarI v ty Nothing)+ ClassOpId cls _ -> return (TH.ClassOpI v ty (reifyName cls))+ _ -> return (TH.VarI v ty Nothing) } reifyThing (AGlobal (ATyCon tc)) = reifyTyCon tc@@ -2073,13 +2084,13 @@ ; return (TH.PatSynI name ty) } reifyThing (ATcId {tct_id = id})- = do { ty1 <- zonkTcType (idType id) -- Make use of all the info we have, even+ = do { ty1 <- liftZonkM $ zonkTcType (idType id) -- Make use of all the info we have, even -- though it may be incomplete ; ty2 <- reifyType ty1 ; return (TH.VarI (reifyName id) ty2 Nothing) } reifyThing (ATyVar tv tv1)- = do { ty1 <- zonkTcTyVar tv1+ = do { ty1 <- liftZonkM $ zonkTcTyVar tv1 ; ty2 <- reifyType ty1 ; return (TH.TyVarI (reifyName tv) ty2) } @@ -2135,7 +2146,7 @@ injRHS = map (reifyName . tyVarName) (filterByList ms tvs) in (sig, inj)- ; tvs' <- reifyTyVars (tyConVisibleTyVars tc)+ ; tvs' <- reifyTyConBinders tc ; let tfHead = TH.TypeFamilyHead (reifyName tc) tvs' resultSig injectivity ; if isOpenTypeFamilyTyCon tc@@ -2156,7 +2167,7 @@ ; kind' <- fmap Just (reifyKind res_kind) - ; tvs' <- reifyTyVars (tyConVisibleTyVars tc)+ ; tvs' <- reifyTyConBinders tc ; fam_envs <- tcGetFamInstEnvs ; instances <- reifyFamilyInstances tc (familyInstances fam_envs tc) ; return (TH.FamilyI@@ -2164,7 +2175,7 @@ | Just (_, rhs) <- synTyConDefn_maybe tc -- Vanilla type synonym = do { rhs' <- reifyType rhs- ; tvs' <- reifyTyVars (tyConVisibleTyVars tc)+ ; tvs' <- reifyTyConBinders tc ; return (TH.TyConI (TH.TySynD (reifyName tc) tvs' rhs')) }@@ -2182,7 +2193,7 @@ dataCons = tyConDataCons tc isGadt = isGadtSyntaxTyCon tc ; cons <- mapM (reifyDataCon isGadt (mkTyVarTys tvs)) dataCons- ; r_tvs <- reifyTyVars (tyConVisibleTyVars tc)+ ; r_tvs <- reifyTyConBinders tc ; let name = reifyName tc deriv = [] -- Don't know about deriving decl | isTypeDataTyCon tc =@@ -2232,7 +2243,7 @@ | not (null fields) -> do { res_ty <- reifyType g_res_ty ; return $ TH.RecGadtC [name]- (zip3 (map (reifyName . flSelector) fields)+ (zip3 (map reifyFieldLabel fields) dcdBangs r_arg_tys) res_ty } -- We need to check not isGadtDataCon here because GADT -- constructors can be declared infix.@@ -2244,7 +2255,8 @@ ; return $ TH.InfixC (s1,r_a1) name (s2,r_a2) } | isGadtDataCon -> do { res_ty <- reifyType g_res_ty- ; return $ TH.GadtC [name] (dcdBangs `zip` r_arg_tys) res_ty }+ ; return $ TH.GadtC [name]+ (dcdBangs `zip` r_arg_tys) res_ty } | otherwise -> return $ TH.NormalC name (dcdBangs `zip` r_arg_tys) @@ -2310,7 +2322,7 @@ ; insts <- reifyClassInstances cls (InstEnv.classInstances inst_envs cls) ; assocTys <- concatMapM reifyAT ats ; ops <- concatMapM reify_op op_stuff- ; tvs' <- reifyTyVars (tyConVisibleTyVars (classTyCon cls))+ ; tvs' <- reifyTyConBinders (classTyCon cls) ; let dec = TH.ClassD cxt (reifyName cls) tvs' fds' (assocTys ++ ops) ; return (TH.ClassI dec insts) } where@@ -2502,6 +2514,7 @@ Overlapping _ -> Just TH.Overlapping Overlaps _ -> Just TH.Overlaps Incoherent _ -> Just TH.Incoherent+ NonCanonical _ -> Just TH.Incoherent ------------------------------ reifyFamilyInstances :: TyCon -> [FamInst] -> TcM [TH.Dec]@@ -2654,6 +2667,43 @@ reifyFlag SpecifiedSpec = TH.SpecifiedSpec reifyFlag InferredSpec = TH.InferredSpec +instance ReifyFlag TyConBndrVis (Maybe TH.BndrVis) where+ reifyFlag AnonTCB = Just TH.BndrReq+ reifyFlag (NamedTCB Required) = Just TH.BndrReq+ reifyFlag (NamedTCB (Invisible _)) =+ Nothing -- See Note [Reifying invisible type variable binders] and #22828.++-- Currently does not return invisible type variable binders (@k-binders).+-- See Note [Reifying invisible type variable binders] and #22828.+reifyTyConBinders :: TyCon -> TcM [TH.TyVarBndr TH.BndrVis]+reifyTyConBinders tc = fmap (mapMaybe get_bndr) (reifyTyVarBndrs (tyConBinders tc))+ where+ get_bndr :: TH.TyVarBndr (Maybe flag) -> Maybe (TH.TyVarBndr flag)+ get_bndr = sequenceA++{- Note [Reifying invisible type variable binders]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In reifyFlag for TyConBndrVis, we have the following clause:++ reifyFlag (NamedTCB (Invisible _)) = Nothing++This means that reifyTyConBinders doesn't reify invisible type variables as+@k-binders. However, it is possible (and not hard) to change this.+Just replace the above clause with:++ reifyFlag (NamedTCB Specified) = Just TH.BndrInvis+ reifyFlag (NamedTCB Inferred) = Nothing -- Inferred variables can not be bound++There are two reasons we opt not to do that for now.+ 1. It would be a (sometimes silent) breaking change affecting th-abstraction,+ aeson, and other libraries that assume that reified binders are visible.+ 2. It would create an asymmetry with visible kind applications, which are+ not reified either.++This decision is not set in stone. If a use case for reifying invisible type+variable binders presents itself, we can reconsider. See #22828.+-}+ reifyTyVars :: [TyVar] -> TcM [TH.TyVarBndr ()] reifyTyVars = reifyTyVarBndrs . map mk_bndr where@@ -2734,26 +2784,12 @@ mk_varg | OccName.isDataOcc occ = TH.mkNameG_d | OccName.isVarOcc occ = TH.mkNameG_v | OccName.isTcOcc occ = TH.mkNameG_tc+ | Just con_fs <- OccName.fieldOcc_maybe occ+ = \ pkg mod occ -> TH.mkNameG_fld pkg mod (unpackFS con_fs) occ | otherwise = pprPanic "reifyName" (ppr name) --- See Note [Reifying field labels] reifyFieldLabel :: FieldLabel -> TH.Name-reifyFieldLabel fl- | flIsOverloaded fl- = TH.Name (TH.mkOccName occ_str) (TH.NameQ (TH.mkModName mod_str))- | otherwise = TH.mkNameG_v pkg_str mod_str occ_str- where- name = flSelector fl- mod = assert (isExternalName name) $ nameModule name- pkg_str = unitString (moduleUnit mod)- mod_str = moduleNameString (moduleName mod)- occ_str = unpackFS (field_label $ flLabel fl)--reifySelector :: Id -> TyCon -> TH.Name-reifySelector id tc- = case find ((idName id ==) . flSelector) (tyConFieldLabels tc) of- Just fl -> reifyFieldLabel fl- Nothing -> pprPanic "reifySelector: missing field" (ppr id $$ ppr tc)+reifyFieldLabel fl = reifyName $ flSelector fl ------------------------------ reifyFixity :: Name -> TcM (Maybe TH.Fixity)@@ -2795,8 +2831,8 @@ reifyType (idType (dataConWrapId dc)) AGlobal (AConLike (PatSynCon ps)) -> reifyPatSynType (patSynSigBndr ps)- ATcId{tct_id = id} -> zonkTcType (idType id) >>= reifyType- ATyVar _ tctv -> zonkTcTyVar tctv >>= reifyType+ ATcId{tct_id = id} -> liftZonkM (zonkTcType (idType id)) >>= reifyType+ ATyVar _ tctv -> liftZonkM (zonkTcTyVar tctv) >>= reifyType -- Impossible cases, supposedly: AGlobal (ACoAxiom _) -> panic "reifyTypeOfThing: ACoAxiom" ATcTyCon _ -> panic "reifyTypeOfThing: ATcTyCon"@@ -2852,38 +2888,10 @@ mkThAppTs fun_ty arg_tys = foldl' TH.AppT fun_ty arg_tys noTH :: UnrepresentableTypeDescr -> Type -> TcM a-noTH s d = failWithTc $ TcRnCannotRepresentType s d+noTH s d = failWithTc $ TcRnTHError $ THReifyError $ CannotRepresentType s d ppr_th :: TH.Ppr a => a -> SDoc ppr_th x = text (TH.pprint x)--{--Note [Reifying field labels]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When reifying a datatype declared with DuplicateRecordFields enabled, we want-the reified names of the fields to be labels rather than selector functions.-That is, we want (reify ''T) and (reify 'foo) to produce-- data T = MkT { foo :: Int }- foo :: T -> Int--rather than-- data T = MkT { $sel:foo:MkT :: Int }- $sel:foo:MkT :: T -> Int--because otherwise TH code that uses the field names as strings will silently do-the wrong thing. Thus we use the field label (e.g. foo) as the OccName, rather-than the selector (e.g. $sel:foo:MkT). Since the Orig name M.foo isn't in the-environment, NameG can't be used to represent such fields. Instead,-reifyFieldLabel uses NameQ.--However, this means that extracting the field name from the output of reify, and-trying to reify it again, may fail with an ambiguity error if there are multiple-such fields defined in the module (see the test case-overloadedrecflds/should_fail/T11103.hs). The "proper" fix requires changes to-the TH AST to make it able to represent duplicate record fields.--} tcGetInterp :: TcM Interp tcGetInterp = do
GHC/Tc/Instance/Class.hs view
@@ -2,15 +2,15 @@ {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module GHC.Tc.Instance.Class (- matchGlobalInst,+ matchGlobalInst, matchEqualityInst, ClsInstResult(..), InstanceWhat(..), safeOverlap, instanceReturnsDictCon,- AssocInstInfo(..), isNotAssociated,+ AssocInstInfo(..), isNotAssociated ) where import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Core.TyCo.Rep @@ -21,20 +21,20 @@ import GHC.Tc.Instance.Typeable import GHC.Tc.Utils.TcMType import GHC.Tc.Types.Evidence+import GHC.Tc.Types.Origin (InstanceWhat (..), SafeOverlapping) import GHC.Tc.Instance.Family( tcGetFamInstEnvs, tcInstNewTyCon_maybe, tcLookupDataFamInst )-import GHC.Rename.Env( addUsedGRE )+import GHC.Rename.Env( addUsedGRE, DeprecationWarnings (..) ) import GHC.Builtin.Types import GHC.Builtin.Types.Prim import GHC.Builtin.Names import GHC.Types.FieldLabel-import GHC.Types.Name.Reader( lookupGRE_FieldLabel, greMangledName )+import GHC.Types.Name.Reader import GHC.Types.SafeHaskell-import GHC.Types.Name ( Name, pprDefinedAt )+import GHC.Types.Name ( Name ) import GHC.Types.Var.Env ( VarEnv ) import GHC.Types.Id-import GHC.Types.Id.Make ( nospecId ) import GHC.Types.Var import GHC.Core.Predicate@@ -46,7 +46,7 @@ import GHC.Core.TyCon import GHC.Core.Class -import GHC.Core ( Expr(Var, App, Cast, Type) )+import GHC.Core ( Expr(Var, App, Cast) ) import GHC.Utils.Outputable import GHC.Utils.Panic@@ -87,39 +87,19 @@ * * **********************************************************************-} --- | Indicates if Instance met the Safe Haskell overlapping instances safety--- check.------ See Note [Safe Haskell Overlapping Instances] in GHC.Tc.Solver--- See Note [Safe Haskell Overlapping Instances Implementation] in GHC.Tc.Solver-type SafeOverlapping = Bool- data ClsInstResult = NoInstance -- Definitely no instance - | OneInst { cir_new_theta :: [TcPredType]- , cir_mk_ev :: [EvExpr] -> EvTerm- , cir_what :: InstanceWhat }+ | OneInst { cir_new_theta :: [TcPredType]+ , cir_mk_ev :: [EvExpr] -> EvTerm+ , cir_canonical :: Canonical -- cir_canonical=True => you can specialise on this instance+ -- cir_canonical= False => you cannot specialise on this instance+ -- (its OverlapFlag is NonCanonical)+ -- See Note [Coherence and specialisation: overview]+ , cir_what :: InstanceWhat } | NotSure -- Multiple matches and/or one or more unifiers -data InstanceWhat -- How did we solve this constraint?- = BuiltinEqInstance -- Built-in solver for (t1 ~ t2), (t1 ~~ t2), Coercible t1 t2- -- See GHC.Tc.Solver.InertSet Note [Solved dictionaries]-- | BuiltinTypeableInstance TyCon -- Built-in solver for Typeable (T t1 .. tn)- -- See Note [Well-staged instance evidence]-- | BuiltinInstance -- Built-in solver for (C t1 .. tn) where C is- -- KnownNat, .. etc (classes with no top-level evidence)-- | LocalInstance -- Solved by a quantified constraint- -- See GHC.Tc.Solver.InertSet Note [Solved dictionaries]-- | TopLevInstance -- Solved by a top-level instance decl- { iw_dfun_id :: DFunId- , iw_safe_over :: SafeOverlapping }- instance Outputable ClsInstResult where ppr NoInstance = text "NoInstance" ppr NotSure = text "NotSure"@@ -127,15 +107,6 @@ , cir_what = what }) = text "OneInst" <+> vcat [ppr ev, ppr what] -instance Outputable InstanceWhat where- ppr BuiltinInstance = text "a built-in instance"- ppr BuiltinTypeableInstance {} = text "a built-in typeable instance"- ppr BuiltinEqInstance = text "a built-in equality instance"- ppr LocalInstance = text "a locally-quantified instance"- ppr (TopLevInstance { iw_dfun_id = dfun })- = hang (text "instance" <+> pprSigmaType (idType dfun))- 2 (text "--" <+> pprDefinedAt (idName dfun))- safeOverlap :: InstanceWhat -> Bool safeOverlap (TopLevInstance { iw_safe_over = so }) = so safeOverlap _ = True@@ -152,18 +123,19 @@ -> Bool -- True <=> caller is the short-cut solver -- See Note [Shortcut solving: overlap] -> Class -> [Type] -> TcM ClsInstResult+-- Precondition: Class does not satisfy GHC.Core.Predicate.isEqualityClass+-- (That is handled by a separate code path: see GHC.Tc.Solver.Dict.solveDict,+-- which calls solveEqualityDict for equality classes.) matchGlobalInst dflags short_cut clas tys- | cls_name == knownNatClassName = matchKnownNat dflags short_cut clas tys- | cls_name == knownSymbolClassName = matchKnownSymbol dflags short_cut clas tys- | cls_name == knownCharClassName = matchKnownChar dflags short_cut clas tys- | isCTupleClass clas = matchCTuple clas tys- | cls_name == typeableClassName = matchTypeable clas tys- | cls_name == withDictClassName = matchWithDict tys- | clas `hasKey` heqTyConKey = matchHeteroEquality tys- | clas `hasKey` eqTyConKey = matchHomoEquality tys- | clas `hasKey` coercibleTyConKey = matchCoercible tys- | cls_name == hasFieldClassName = matchHasField dflags short_cut clas tys- | otherwise = matchInstEnv dflags short_cut clas tys+ | cls_name == knownNatClassName = matchKnownNat dflags short_cut clas tys+ | cls_name == knownSymbolClassName = matchKnownSymbol dflags short_cut clas tys+ | cls_name == knownCharClassName = matchKnownChar dflags short_cut clas tys+ | isCTupleClass clas = matchCTuple clas tys+ | cls_name == typeableClassName = matchTypeable clas tys+ | cls_name == withDictClassName = matchWithDict tys+ | cls_name == hasFieldClassName = matchHasField dflags short_cut clas tys+ | cls_name == unsatisfiableClassName = return NoInstance -- See (B) in Note [Implementation of Unsatisfiable constraints] in GHC.Tc.Errors+ | otherwise = matchInstEnv dflags short_cut clas tys where cls_name = className clas @@ -188,12 +160,12 @@ ; case (matches, unify, safeHaskFail) of -- Nothing matches- ([], NoUnifiers, _)+ ([], NoUnifiers{}, _) -> do { traceTc "matchClass not matching" (ppr pred $$ ppr (ie_local instEnvs)) ; return NoInstance } -- A single match (& no safe haskell failure)- ([(ispec, inst_tys)], NoUnifiers, False)+ ([(ispec, inst_tys)], NoUnifiers canonical, False) | short_cut_solver -- Called from the short-cut solver , isOverlappable ispec -- If the instance has OVERLAPPABLE or OVERLAPS or INCOHERENT@@ -206,11 +178,11 @@ | otherwise -> do { let dfun_id = instanceDFunId ispec ; traceTc "matchClass success" $- vcat [text "dict" <+> ppr pred,+ vcat [text "dict" <+> ppr pred <+> parens (if canonical then text "canonical" else text "non-canonical"), text "witness" <+> ppr dfun_id <+> ppr (idType dfun_id) ] -- Record that this dfun is needed- ; match_one (null unsafeOverlaps) dfun_id inst_tys }+ ; match_one (null unsafeOverlaps) canonical 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@@ -221,16 +193,17 @@ where pred = mkClassPred clas tys -match_one :: SafeOverlapping -> DFunId -> [DFunInstType] -> TcM ClsInstResult- -- See Note [DFunInstType: instantiating types] in GHC.Core.InstEnv-match_one so dfun_id mb_inst_tys+match_one :: SafeOverlapping -> Canonical -> DFunId -> [DFunInstType]+ -> TcM ClsInstResult+match_one so canonical dfun_id mb_inst_tys = do { traceTc "match_one" (ppr dfun_id $$ ppr mb_inst_tys) ; (tys, theta) <- instDFunType dfun_id mb_inst_tys ; traceTc "match_one 2" (ppr dfun_id $$ ppr tys $$ ppr theta)- ; return $ OneInst { cir_new_theta = theta- , cir_mk_ev = evDFunApp dfun_id tys- , cir_what = TopLevInstance { iw_dfun_id = dfun_id- , iw_safe_over = so } } }+ ; return $ OneInst { cir_new_theta = theta+ , cir_mk_ev = evDFunApp dfun_id tys+ , cir_canonical = canonical+ , cir_what = TopLevInstance { iw_dfun_id = dfun_id+ , iw_safe_over = so } } } {- Note [Shortcut solving: overlap]@@ -262,9 +235,10 @@ matchCTuple :: Class -> [Type] -> TcM ClsInstResult matchCTuple clas tys -- (isCTupleClass clas) holds- = return (OneInst { cir_new_theta = tys- , cir_mk_ev = tuple_ev- , cir_what = BuiltinInstance })+ = return (OneInst { cir_new_theta = tys+ , cir_mk_ev = tuple_ev+ , cir_canonical = True+ , cir_what = BuiltinInstance }) -- The dfun *is* the data constructor! where data_con = tyConSingleDataCon (classTyCon clas)@@ -295,9 +269,10 @@ instance KnownNat 2 where natSing = SNat 2 ... -In practice, we solve `KnownNat` predicates in the type-checker-(see GHC.Tc.Solver.Interact) because we can't have infinitely many instances.-The evidence (aka "dictionary") for `KnownNat` is of the form `EvLit (EvNum n)`.+In practice, we solve `KnownNat` predicates in the type-checker (see+`matchKnownNat` in this module) 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@@ -424,9 +399,10 @@ , Just (_, co_rep) <- tcInstNewTyCon_maybe tcRep [ty] -- SNat n ~ Integer , let ev_tm = mkEvCast et (mkSymCo (mkTransCo co_dict co_rep))- = return $ OneInst { cir_new_theta = []- , cir_mk_ev = \_ -> ev_tm- , cir_what = BuiltinInstance }+ = return $ OneInst { cir_new_theta = []+ , cir_mk_ev = \_ -> ev_tm+ , cir_canonical = True+ , cir_what = BuiltinInstance } | otherwise = pprPanic "makeLitDict" $@@ -457,19 +433,9 @@ -- the WithDict dictionary: -- -- \@(r :: RuntimeRep) @(a :: TYPE r) (sv :: mty) (k :: cls => a) ->- -- nospec @(cls => a) k (sv |> (sub co ; sym co2))- --- -- where nospec :: forall a. a -> a ensures that the typeclass specialiser- -- doesn't attempt to common up this evidence term with other evidence terms- -- of the same type.- --- -- See (WD6) in Note [withDict], and Note [nospecId magic] in GHC.Types.Id.Make.+ -- k (sv |> (sub co ; sym co2)) ; let evWithDict co2 = mkCoreLams [ runtimeRep1TyVar, openAlphaTyVar, sv, k ] $- Var nospecId- `App`- (Type $ mkInvisFunTy cls openAlphaTy)- `App` Var k `App` (Var sv `Cast` mkTransCo (mkSubCo co2) (mkSymCo co))@@ -482,9 +448,10 @@ [cls, mty] [evWithDict (evTermCoercion (EvExpr c))] mk_ev e = pprPanic "matchWithDict" (ppr e) - ; return $ OneInst { cir_new_theta = [mkPrimEqPred mty inst_meth_ty]- , cir_mk_ev = mk_ev- , cir_what = BuiltinInstance }+ ; return $ OneInst { cir_new_theta = [mkPrimEqPred mty inst_meth_ty]+ , cir_mk_ev = mk_ev+ , cir_canonical = False -- See (WD6) in Note [withDict]+ , cir_what = BuiltinInstance } } matchWithDict _@@ -587,12 +554,14 @@ (WD6) In fact, we desugar `withDict @cls @mty @{rr} @r` to \@(r :: RuntimeRep) @(a :: TYPE r) (sv :: mty) (k :: cls => a) ->- nospec @(cls => a) k (sv |> (sub co2 ; sym co)))+ k (sv |> (sub co2 ; sym co))) - That is, we cast the method using a coercion, and apply k to it.- However, we use the 'nospec' magicId (see Note [nospecId magic] in GHC.Types.Id.Make)- to ensure that the typeclass specialiser doesn't incorrectly common-up distinct- evidence terms. This is super important! Suppose we have calls+ That is, we cast the method using a coercion, and apply k to+ it. Moreover, we mark the evidence as non-canonical, resulting in+ the use of the 'nospec' magicId (see Note [nospecId magic] in+ GHC.Types.Id.Make) to ensure that the typeclass specialiser+ doesn't incorrectly common-up distinct evidence terms. This is+ super important! Suppose we have calls withDict A k withDict B k@@ -672,14 +641,15 @@ -- | Representation for a type @ty@ of the form @arg -> ret@. doFunTy :: Class -> Type -> Mult -> Type -> Type -> TcM ClsInstResult doFunTy clas ty mult arg_ty ret_ty- = return $ OneInst { cir_new_theta = preds- , cir_mk_ev = mk_ev- , cir_what = BuiltinInstance }+ = return $ OneInst { cir_new_theta = preds+ , cir_mk_ev = mk_ev+ , cir_canonical = True+ , cir_what = BuiltinInstance } where preds = map (mk_typeable_pred clas) [mult, arg_ty, ret_ty] mk_ev [mult_ev, arg_ev, ret_ev] = evTypeable ty $ EvTypeableTrFun (EvExpr mult_ev) (EvExpr arg_ev) (EvExpr ret_ev)- mk_ev _ = panic "GHC.Tc.Solver.Interact.doFunTy"+ mk_ev _ = panic "GHC.Tc.Instance.Class.doFunTy" -- | Representation for type constructor applied to some kinds.@@ -688,9 +658,10 @@ doTyConApp :: Class -> Type -> TyCon -> [Kind] -> TcM ClsInstResult doTyConApp clas ty tc kind_args | tyConIsTypeable tc- = return $ OneInst { cir_new_theta = map (mk_typeable_pred clas) kind_args- , cir_mk_ev = mk_ev- , cir_what = BuiltinTypeableInstance tc }+ = return $ OneInst { cir_new_theta = map (mk_typeable_pred clas) kind_args+ , cir_mk_ev = mk_ev+ , cir_canonical = True+ , cir_what = BuiltinTypeableInstance tc } | otherwise = return NoInstance where@@ -719,9 +690,10 @@ | isForAllTy (typeKind f) = return NoInstance -- We can't solve until we know the ctr. | otherwise- = return $ OneInst { cir_new_theta = map (mk_typeable_pred clas) [f, tk]- , cir_mk_ev = mk_ev- , cir_what = BuiltinInstance }+ = return $ OneInst { cir_new_theta = map (mk_typeable_pred clas) [f, tk]+ , cir_mk_ev = mk_ev+ , cir_canonical = True+ , cir_what = BuiltinInstance } where mk_ev [t1,t2] = evTypeable ty $ EvTypeableTyApp (EvExpr t1) (EvExpr t2) mk_ev _ = panic "doTyApp"@@ -739,9 +711,10 @@ ; let kc_pred = mkClassPred kc_clas [ t ] mk_ev [ev] = evTypeable t $ EvTypeableTyLit (EvExpr ev) mk_ev _ = panic "doTyLit"- ; return (OneInst { cir_new_theta = [kc_pred]- , cir_mk_ev = mk_ev- , cir_what = BuiltinInstance }) }+ ; return (OneInst { cir_new_theta = [kc_pred]+ , cir_mk_ev = mk_ev+ , cir_canonical = True+ , cir_what = BuiltinInstance }) } {- Note [Typeable (T a b c)] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -827,31 +800,26 @@ ***********************************************************************-} -- See also Note [The equality types story] in GHC.Builtin.Types.Prim-matchHeteroEquality :: [Type] -> TcM ClsInstResult--- Solves (t1 ~~ t2)-matchHeteroEquality args- = return (OneInst { cir_new_theta = [ mkTyConApp eqPrimTyCon args ]- , cir_mk_ev = evDataConApp heqDataCon args- , cir_what = BuiltinEqInstance })+matchEqualityInst :: Class -> [Type] -> (DataCon, Role, Type, Type)+-- Precondition: `cls` satisfies GHC.Core.Predicate.isEqualityClass+-- See Note [Solving equality classes] in GHC.Tc.Solver.Dict+matchEqualityInst cls args+ | cls `hasKey` eqTyConKey -- Solves (t1 ~ t2)+ , [_,t1,t2] <- args+ = (eqDataCon, Nominal, t1, t2) -matchHomoEquality :: [Type] -> TcM ClsInstResult--- Solves (t1 ~ t2)-matchHomoEquality args@[k,t1,t2]- = return (OneInst { cir_new_theta = [ mkTyConApp eqPrimTyCon [k,k,t1,t2] ]- , cir_mk_ev = evDataConApp eqDataCon args- , cir_what = BuiltinEqInstance })-matchHomoEquality args = pprPanic "matchHomoEquality" (ppr args)+ | cls `hasKey` heqTyConKey -- Solves (t1 ~~ t2)+ , [_,_,t1,t2] <- args+ = (heqDataCon, Nominal, t1, t2) --- See also Note [The equality types story] in GHC.Builtin.Types.Prim-matchCoercible :: [Type] -> TcM ClsInstResult-matchCoercible args@[k, t1, t2]- = return (OneInst { cir_new_theta = [ mkTyConApp eqReprPrimTyCon args' ]- , cir_mk_ev = evDataConApp coercibleDataCon args- , cir_what = BuiltinEqInstance })- where- args' = [k, k, t1, t2]-matchCoercible args = pprPanic "matchLiftedCoercible" (ppr args)+ | cls `hasKey` coercibleTyConKey -- Solves (Coercible t1 t2)+ , [_, t1, t2] <- args+ = (coercibleDataCon, Representational, t1, t2) + | otherwise -- Does not satisfy the precondition+ = pprPanic "matchEqualityInst" (ppr (mkClassPred cls args))++ {- ******************************************************************** * * Class lookup for overloaded record fields@@ -976,11 +944,12 @@ -- it must not be higher-rank. ; if not (isNaughtyRecordSelector sel_id) && isTauTy sel_ty then do { -- See Note [Unused name reporting and HasField]- addUsedGRE True gre- ; keepAlive (greMangledName gre)- ; return OneInst { cir_new_theta = theta- , cir_mk_ev = mk_ev- , cir_what = BuiltinInstance } }+ addUsedGRE AllDeprecationWarnings gre+ ; keepAlive (greName gre)+ ; return OneInst { cir_new_theta = theta+ , cir_mk_ev = mk_ev+ , cir_canonical = True+ , cir_what = BuiltinInstance } } else matchInstEnv dflags short_cut clas tys } _ -> matchInstEnv dflags short_cut clas tys }
GHC/Tc/Instance/Family.hs view
@@ -6,7 +6,6 @@ checkFamInstConsistency, tcExtendLocalFamInstEnv, tcLookupDataFamInst, tcLookupDataFamInst_maybe, tcInstNewTyCon_maybe, tcTopNormaliseNewTypeTF_maybe,- newFamInst, -- * Injectivity reportInjectivityErrors, reportConflictingInjectivityErrs@@ -14,11 +13,10 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Env import GHC.Core.FamInstEnv-import GHC.Core.InstEnv( roughMatchTcs ) import GHC.Core.Coercion import GHC.Core.TyCon import GHC.Core.Coercion.Axiom@@ -31,7 +29,6 @@ import GHC.Tc.Errors.Types import GHC.Tc.Types.Evidence import GHC.Tc.Utils.Monad-import GHC.Tc.Utils.Instantiate( freshenTyVarBndrs, freshenCoVarBndrsX ) import GHC.Tc.Utils.TcType import GHC.Unit.External@@ -161,44 +158,6 @@ {- ************************************************************************ * *- Making a FamInst-* *-************************************************************************--}---- All type variables in a FamInst must be fresh. This function--- creates the fresh variables and applies the necessary substitution--- It is defined here to avoid a dependency from FamInstEnv on the monad--- code.--newFamInst :: FamFlavor -> CoAxiom Unbranched -> TcM FamInst--- Freshen the type variables of the FamInst branches-newFamInst flavor axiom@(CoAxiom { co_ax_tc = fam_tc })- = do {- -- Freshen the type variables- (subst, tvs') <- freshenTyVarBndrs tvs- ; (subst, cvs') <- freshenCoVarBndrsX subst cvs- ; let lhs' = substTys subst lhs- rhs' = substTy subst rhs-- ; return (FamInst { fi_fam = tyConName fam_tc- , fi_flavor = flavor- , fi_tcs = roughMatchTcs lhs- , fi_tvs = tvs'- , fi_cvs = cvs'- , fi_tys = lhs'- , fi_rhs = rhs'- , fi_axiom = axiom }) }- where- CoAxBranch { cab_tvs = tvs- , cab_cvs = cvs- , cab_lhs = lhs- , cab_rhs = rhs } = coAxiomSingleBranch axiom---{--************************************************************************-* * Optimised overlap checking for family instances * * ************************************************************************@@ -230,9 +189,6 @@ indirectly), we check that they are consistent now. (So that we can be certain that the modules in our `GHC.Driver.Env.dep_finsts' are consistent.) -There is some fancy footwork regarding hs-boot module loops, see-Note [Don't check hs-boot type family instances too early]- Note [Checking family instance optimization] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As explained in Note [Checking family instance consistency]@@ -286,9 +242,6 @@ This is basically the idea from #13092, comment:14. -} --- This function doesn't check ALL instances for consistency,--- only ones that aren't involved in recursive knot-tying--- loops; see Note [Don't check hs-boot type family instances too early]. -- We don't need to check the current module, this is done in -- tcExtendLocalFamInstEnv. -- See Note [The type family instance consistency story].@@ -391,68 +344,7 @@ sizeE2 = famInstEnvSize env2' (env1, env2) = if sizeE1 < sizeE2 then (env1', env2') else (env2', env1')- -- Note [Don't check hs-boot type family instances too early]- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- -- Family instance consistency checking involves checking that- -- the family instances of our imported modules are consistent with- -- one another; this might lead you to think that this process- -- has nothing to do with the module we are about to typecheck.- -- Not so! Consider the following case:- --- -- -- A.hs-boot- -- type family F a- --- -- -- B.hs- -- import {-# SOURCE #-} A- -- type instance F Int = Bool- --- -- -- A.hs- -- import B- -- type family F a- --- -- When typechecking A, we are NOT allowed to poke the TyThing- -- 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.- --- -- Additionally, we should also defer consistency checking when- -- type from the hs-boot file of the current module occurs on- -- the left hand side, as we will poke its TyThing when checking- -- for overlap.- --- -- -- F.hs- -- type family F a- --- -- -- A.hs-boot- -- import F- -- data T- --- -- -- B.hs- -- import {-# SOURCE #-} A- -- import F- -- type instance F T = Int- --- -- -- A.hs- -- import B- -- data T = MkT- --- -- In fact, it is even necessary to defer for occurrences in- -- the RHS, because we may test for *compatibility* in event- -- of an overlap.- --- -- Why don't we defer ALL of the checks to later? Well, many- -- instances aren't involved in the recursive loop at all. So- -- we might as well check them immediately; and there isn't- -- a good time to check them later in any case: every time- -- we finish kind-checking a type declaration and add it to- -- a context, we *then* consistency check all of the instances- -- which mentioned that type. We DO want to check instances- -- as quickly as possible, so that we aren't typechecking- -- values with inconsistent axioms in scope.- --- -- 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 ; mapM_ (checkForInjectivityConflicts (emptyFamInstEnv,env2)) check_now
GHC/Tc/Instance/FunDeps.hs view
@@ -35,8 +35,9 @@ import GHC.Core.InstEnv import GHC.Core.TyCo.FVs import GHC.Core.TyCo.Compare( eqTypes, eqType )-import GHC.Core.TyCo.Ppr( pprWithExplicitKindsWhen ) +import GHC.Tc.Errors.Types ( CoverageProblem(..), FailedCoverageCondition(..) )+import GHC.Tc.Types.Constraint ( isUnsatisfiableCt_maybe ) import GHC.Tc.Utils.TcType( transSuperClasses ) import GHC.Types.Var.Set@@ -45,14 +46,13 @@ import GHC.Utils.Outputable import GHC.Utils.FV-import GHC.Utils.Error( Validity'(..), Validity, allValid )+import GHC.Utils.Error( Validity'(..), allValid ) import GHC.Utils.Misc import GHC.Utils.Panic -import GHC.Data.Pair ( Pair(..) )-import Data.List ( nubBy )-import Data.Maybe-import Data.Foldable ( fold )+import GHC.Data.Pair ( Pair(..) )+import Data.List ( nubBy )+import Data.Maybe ( isJust, isNothing ) {- ************************************************************************@@ -392,7 +392,7 @@ checkInstCoverage :: Bool -- Be liberal -> Class -> [PredType] -> [Type]- -> Validity+ -> Validity' CoverageProblem -- "be_liberal" flag says whether to use "liberal" coverage of -- See Note [Coverage condition] below --@@ -401,12 +401,23 @@ -- Just msg => coverage problem described by msg checkInstCoverage be_liberal clas theta inst_taus+ | any (isJust . isUnsatisfiableCt_maybe) theta+ -- As per [GHC proposal #433](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0433-unsatisfiable.rst),+ -- we skip checking the coverage condition if there is an "Unsatisfiable"+ -- constraint in the instance context.+ --+ -- See Note [Implementation of Unsatisfiable constraints] in GHC.Tc.Errors,+ -- point (E).+ = IsValid+ | otherwise = allValid (map fundep_ok fds) where (tyvars, fds) = classTvsFds clas fundep_ok fd- | and (isEmptyVarSet <$> undetermined_tvs) = IsValid- | otherwise = NotValid msg+ | all isEmptyVarSet undetermined_tvs+ = IsValid+ | otherwise+ = NotValid not_covered_msg where (ls,rs) = instFD fd tyvars inst_taus ls_tvs = tyCoVarsOfTypes ls@@ -419,33 +430,18 @@ liberal_undet_tvs = (`minusVarSet` closed_ls_tvs) <$> rs_tvs conserv_undet_tvs = (`minusVarSet` ls_tvs) <$> rs_tvs - undet_set = fold undetermined_tvs+ not_covered_msg =+ CoverageProblem+ { not_covered_fundep = fd+ , not_covered_fundep_inst = (ls, rs)+ , not_covered_invis_vis_tvs = undetermined_tvs+ , not_covered_liberal =+ if be_liberal+ then FailedLICC+ else FailedICC+ { alsoFailedLICC = not $ all isEmptyVarSet liberal_undet_tvs }+ } - msg = pprWithExplicitKindsWhen- (isEmptyVarSet $ pSnd undetermined_tvs) $- vcat [ -- text "ls_tvs" <+> ppr ls_tvs- -- , text "closed ls_tvs" <+> ppr (closeOverKinds ls_tvs)- -- , text "theta" <+> ppr theta- -- , text "closeWrtFunDeps" <+> ppr (closeWrtFunDeps theta (closeOverKinds ls_tvs))- -- , text "rs_tvs" <+> ppr rs_tvs- sep [ text "The"- <+> ppWhen be_liberal (text "liberal")- <+> text "coverage condition fails in class"- <+> quotes (ppr clas)- , nest 2 $ text "for functional dependency:"- <+> quotes (pprFunDep fd) ]- , sep [ text "Reason: lhs type"<>plural ls <+> pprQuotedList ls- , nest 2 $- (if isSingleton ls- then text "does not"- else text "do not jointly")- <+> text "determine rhs type"<>plural rs- <+> pprQuotedList rs ]- , text "Un-determined variable" <> pluralVarSet undet_set <> colon- <+> pprVarSet undet_set (pprWithCommas ppr)- , ppWhen (not be_liberal &&- and (isEmptyVarSet <$> liberal_undet_tvs)) $- text "Using UndecidableInstances might help" ] {- Note [Closing over kinds in coverage] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GHC/Tc/Instance/Typeable.hs view
@@ -35,7 +35,7 @@ import GHC.Core.DataCon import GHC.Unit.Module import GHC.Hs-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Data.Bag import GHC.Types.Var ( VarBndr(..) ) import GHC.Core.Map.Type@@ -94,7 +94,7 @@ interface file to find its type, value, etc 4. Solve Typeable constraints. This is done by a custom Typeable solver,- currently in GHC.Tc.Solver.Interact, that use M.$tcT so solve (Typeable T).+ currently in GHC.Tc.Instance.Class, that use M.$tcT so solve (Typeable T). There are many wrinkles:
GHC/Tc/Module.hs view
@@ -44,3004 +44,2920 @@ tcRnInstantiateSignature, loadUnqualIfaces, -- More private...- badReexportedBootThing,- checkBootDeclM,- missingBootThing,- getRenamedStuff, RenamedStuff- ) where--import GHC.Prelude--import GHC.Driver.Env-import GHC.Driver.Plugins-import GHC.Driver.Session-import GHC.Driver.Config.Diagnostic--import GHC.Tc.Errors.Hole.FitTypes ( HoleFitPluginR (..) )-import GHC.Tc.Errors.Types-import {-# SOURCE #-} GHC.Tc.Gen.Splice ( finishTH, runRemoteModFinalizers )-import GHC.Tc.Gen.HsType-import GHC.Tc.Validity( checkValidType )-import GHC.Tc.Gen.Match-import GHC.Tc.Utils.Unify( checkConstraints, tcSubTypeSigma )-import GHC.Tc.Utils.Zonk-import GHC.Tc.Gen.Expr-import GHC.Tc.Gen.App( tcInferSigma )-import GHC.Tc.Utils.Monad-import GHC.Tc.Gen.Export-import GHC.Tc.Types.Evidence-import GHC.Tc.Types.Constraint-import GHC.Tc.Types.Origin-import GHC.Tc.Instance.Family-import GHC.Tc.Gen.Annotation-import GHC.Tc.Gen.Bind-import GHC.Tc.Gen.Default-import GHC.Tc.Utils.Env-import GHC.Tc.Gen.Rule-import GHC.Tc.Gen.Foreign-import GHC.Tc.TyCl.Instance-import GHC.Tc.Utils.TcMType-import GHC.Tc.Utils.TcType-import GHC.Tc.Utils.Instantiate (tcGetInsts)-import GHC.Tc.Solver-import GHC.Tc.TyCl-import GHC.Tc.Instance.Typeable ( mkTypeableBinds )-import GHC.Tc.Utils.Backpack--import GHC.Rename.Splice ( rnTopSpliceDecls, traceSplice, SpliceInfo(..) )-import GHC.Rename.HsType-import GHC.Rename.Expr-import GHC.Rename.Fixity ( lookupFixityRn )-import GHC.Rename.Names-import GHC.Rename.Env-import GHC.Rename.Module-import GHC.Rename.Doc--import GHC.Iface.Syntax ( ShowSub(..), showToHeader )-import GHC.Iface.Type ( ShowForAllFlag(..) )-import GHC.Iface.Env ( externaliseName )-import GHC.Iface.Make ( coAxiomToIfaceDecl )-import GHC.Iface.Load--import GHC.Builtin.Types ( unitTy, mkListTy )-import GHC.Builtin.Names-import GHC.Builtin.Utils--import GHC.Hs-import GHC.Hs.Dump--import GHC.Core.PatSyn ( pprPatSynType )-import GHC.Core.Predicate ( classMethodTy )-import GHC.Core.InstEnv-import GHC.Core.TyCon-import GHC.Core.ConLike-import GHC.Core.DataCon-import GHC.Core.Type-import GHC.Core.Class-import GHC.Core.Coercion.Axiom-import GHC.Core.Reduction ( Reduction(..) )-import GHC.Core.RoughMap( RoughMatchTc(..) )-import GHC.Core.TyCo.Ppr( debugPprType )-import GHC.Core.FamInstEnv- ( FamInst, pprFamInst, famInstsRepTyCons, orphNamesOfFamInst- , famInstEnvElts, extendFamInstEnvList, normaliseType )--import GHC.Parser.Header ( mkPrelImports )--import GHC.IfaceToCore--import GHC.Runtime.Context--import GHC.Utils.Error-import GHC.Utils.Outputable as Outputable-import GHC.Utils.Panic-import GHC.Utils.Panic.Plain-import GHC.Utils.Misc-import GHC.Utils.Logger--import GHC.Types.Error-import GHC.Types.Name.Reader-import GHC.Types.Fixity.Env-import GHC.Types.Id as Id-import GHC.Types.Id.Info( IdDetails(..) )-import GHC.Types.Var.Env-import GHC.Types.TypeEnv-import GHC.Types.Unique.FM-import GHC.Types.Name-import GHC.Types.Name.Env-import GHC.Types.Name.Set-import GHC.Types.Avail-import GHC.Types.Basic hiding( SuccessFlag(..) )-import GHC.Types.Annotations-import GHC.Types.SrcLoc-import GHC.Types.SourceFile-import GHC.Types.TyThing.Ppr ( pprTyThingInContext )-import GHC.Types.PkgQual-import qualified GHC.LanguageExtensions as LangExt--import GHC.Unit.External-import GHC.Unit.Types-import GHC.Unit.State-import GHC.Unit.Home-import GHC.Unit.Module-import GHC.Unit.Module.Warnings-import GHC.Unit.Module.ModSummary-import GHC.Unit.Module.ModIface-import GHC.Unit.Module.ModDetails-import GHC.Unit.Module.Deps--import GHC.Data.FastString-import GHC.Data.Maybe-import GHC.Data.List.SetOps-import GHC.Data.Bag-import qualified GHC.Data.BooleanFormula as BF--import Data.Functor.Classes ( liftEq )-import Data.List ( sortBy, sort )-import Data.List.NonEmpty ( NonEmpty (..) )-import qualified Data.List.NonEmpty as NE-import Data.Ord-import Data.Data ( Data )-import qualified Data.Set as S-import Control.DeepSeq-import Control.Monad--{--************************************************************************-* *- Typecheck and rename a module-* *-************************************************************************--}---- | Top level entry point for typechecker and renamer-tcRnModule :: HscEnv- -> ModSummary- -> Bool -- True <=> save renamed syntax- -> HsParsedModule- -> IO (Messages TcRnMessage, Maybe TcGblEnv)--tcRnModule hsc_env mod_sum save_rn_syntax- parsedModule@HsParsedModule {hpm_module= L loc this_module}- | RealSrcSpan real_loc _ <- loc- = withTiming logger- (text "Renamer/typechecker"<+>brackets (ppr this_mod))- (const ()) $- initTc hsc_env hsc_src save_rn_syntax this_mod real_loc $- withTcPlugins hsc_env $- withDefaultingPlugins hsc_env $- withHoleFitPlugins hsc_env $-- tcRnModuleTcRnM hsc_env mod_sum parsedModule pair-- | otherwise- = return (err_msg `addMessage` emptyMessages, Nothing)-- where- hsc_src = ms_hsc_src mod_sum- logger = hsc_logger hsc_env- home_unit = hsc_home_unit hsc_env- err_msg = mkPlainErrorMsgEnvelope loc $- TcRnModMissingRealSrcSpan this_mod-- pair :: (Module, SrcSpan)- pair@(this_mod,_)- | Just (L mod_loc mod) <- hsmodName this_module- = (mkHomeModule home_unit mod, locA mod_loc)-- | otherwise -- 'module M where' is omitted- = (mkHomeModule home_unit mAIN_NAME, srcLocSpan (srcSpanStart loc))-----tcRnModuleTcRnM :: HscEnv- -> 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 mod_sum- (HsParsedModule {- hpm_module =- (L loc (HsModule (XModulePs _ _ mod_deprec maybe_doc_hdr)- maybe_mod export_ies import_decls local_decls)),- hpm_src_files = src_files- })- (this_mod, prel_imp_loc)- = setSrcSpan loc $- 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- -- automatically considered to be loop breakers- tcg_env <- getGblEnv- ; boot_info <- tcHiBootIface hsc_src this_mod- ; setGblEnv (tcg_env { tcg_self_boot = boot_info })- $ do- { -- Deal with imports; first add implicit prelude- implicit_prelude <- xoptM LangExt.ImplicitPrelude- ; let { prel_imports = mkPrelImports (moduleName this_mod) prel_imp_loc- implicit_prelude import_decls }-- ; when (notNull prel_imports) $ do- let msg = mkTcRnUnknownMessage $- mkPlainDiagnostic (WarningWithFlag Opt_WarnImplicitPrelude) noHints (implicitPreludeWarn)- addDiagnostic msg-- ; -- TODO This is a little skeevy; maybe handle a bit more directly- let { simplifyImport (L _ idecl) =- ( renameRawPkgQual (hsc_unit_env hsc_env) (unLoc $ ideclName idecl) (ideclPkgQual idecl)- , reLoc $ ideclName idecl)- }- ; raw_sig_imports <- liftIO- $ findExtraSigImports hsc_env hsc_src- (moduleName this_mod)- ; raw_req_imports <- liftIO- $ implicitRequirements hsc_env- (map simplifyImport (prel_imports- ++ import_decls))- ; let { mkImport mod_name = noLocA- $ (simpleImportDecl mod_name)- { ideclImportList = Just (Exactly, noLocA [])}}- ; let { withReason t imps = map (,text t) imps }- ; let { all_imports = withReason "is implicitly imported" prel_imports- ++ withReason "is directly imported" import_decls- ++ withReason "is an extra sig import" (map mkImport raw_sig_imports)- ++ withReason "is an implicit req import" (map mkImport raw_req_imports) }- ; -- OK now finally rename the imports- tcg_env <- {-# SCC "tcRnImports" #-}- tcRnImports hsc_env all_imports-- -- Put a version of the header without identifier info into the tcg_env- -- Make sure to do this before 'tcRnSrcDecls', because we need the- -- module header when we're splicing TH, since it can be accessed via- -- 'getDoc'.- -- We will rename it properly after renaming everything else so that- -- haddock can link the identifiers- ; tcg_env <- return (tcg_env- { tcg_doc_hdr = fmap (\(WithHsDocIdentifiers str _) -> WithHsDocIdentifiers str [])- <$> maybe_doc_hdr })- ; -- 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 subsequent deprecations added to tcg_warns- ; tcg_env1 <- case mod_deprec of- Just (L _ txt) -> do { txt' <- rnWarningTxt txt- ; pure $ tcg_env {tcg_warns = WarnAll txt'}- }- Nothing -> pure tcg_env- ; setGblEnv tcg_env1- $ do { -- Rename and type check the declarations- traceRn "rn1a" empty- ; tcg_env <- if isHsBootOrSig hsc_src- then do {- ; tcg_env <- tcRnHsBootDecls hsc_src local_decls- ; traceRn "rn4a: before exports" empty- ; tcg_env <- setGblEnv tcg_env $- rnExports explicit_mod_hdr export_ies- ; traceRn "rn4b: after exports" empty- ; return tcg_env- }- else {-# SCC "tcRnSrcDecls" #-}- tcRnSrcDecls explicit_mod_hdr export_ies local_decls-- ; whenM (goptM Opt_DoCoreLinting) $- lintGblEnv (hsc_logger hsc_env) (hsc_dflags hsc_env) tcg_env-- ; setGblEnv tcg_env- $ do { -- Compare hi-boot iface (if any) with the real thing- -- Must be done after processing the exports- tcg_env <- checkHiBootIface tcg_env boot_info- ; -- The new type env is already available to stuff- -- slurped from interface files, via- -- GHC.Tc.Utils.Env.setGlobalTypeEnv. It's important that this- -- includes the stuff in checkHiBootIface,- -- because the latter might add new bindings for- -- boot_dfuns, which may be mentioned in imported- -- unfoldings.- ; -- Report unused names- -- Do this /after/ typeinference, so that when reporting- -- a function with no type signature we can give the- -- inferred type- ; reportUnusedNames tcg_env hsc_src-- -- Rename the module header properly after we have renamed everything else- ; maybe_doc_hdr <- traverse rnLHsDoc maybe_doc_hdr;- ; tcg_env <- return (tcg_env- { tcg_doc_hdr = maybe_doc_hdr })-- ; -- add extra source files to tcg_dependent_files- addDependentFiles src_files- -- Ensure plugins run with the same tcg_env that we pass in- ; setGblEnv tcg_env- $ do { tcg_env <- runTypecheckerPlugin mod_sum tcg_env- ; -- Dump output and return- tcDump tcg_env- ; return tcg_env- }- }- }- }- }--implicitPreludeWarn :: SDoc-implicitPreludeWarn- = text "Module `Prelude' implicitly imported"--{--************************************************************************-* *- Import declarations-* *-************************************************************************--}--tcRnImports :: HscEnv -> [(LImportDecl GhcPs, SDoc)] -> TcM TcGblEnv-tcRnImports hsc_env import_decls- = do { (rn_imports, rdr_env, imports, hpc_info) <- rnImports import_decls ;-- ; this_mod <- getModule- ; gbl_env <- getGblEnv- ; let { -- We want instance declarations from all home-package- -- modules below this one, including boot modules, except- -- ourselves. The 'except ourselves' is so that we don't- -- get the instances from this module's hs-boot file. This- -- filtering also ensures that we don't see instances from- -- modules batch (@--make@) compiled before this one, but- -- which are not below this one.- ; (home_insts, home_fam_insts) =-- hptInstancesBelow hsc_env (homeUnitId $ hsc_home_unit hsc_env) (GWIB (moduleName this_mod)(hscSourceToIsBoot (tcg_src gbl_env)))-- } ;-- -- Record boot-file info in the EPS, so that it's- -- visible to loadHiBootInterface in tcRnSrcDecls,- -- and any other incrementally-performed imports- ; when (isOneShot (ghcMode (hsc_dflags hsc_env))) $ do {- updateEps_ $ \eps -> eps { eps_is_boot = imp_boot_mods imports }- }-- -- Update the gbl env- ; updGblEnv ( \ gbl ->- gbl {- tcg_rdr_env = tcg_rdr_env gbl `plusGlobalRdrEnv` rdr_env,- tcg_imports = tcg_imports gbl `plusImportAvails` imports,- tcg_rn_imports = rn_imports,- tcg_inst_env = tcg_inst_env gbl `unionInstEnv` home_insts,- tcg_fam_inst_env = extendFamInstEnvList (tcg_fam_inst_env gbl)- home_fam_insts,- tcg_hpc = hpc_info- }) $ do {-- ; traceRn "rn1" (ppr (imp_direct_dep_mods imports))- -- Fail if there are any errors so far- -- The error printing (if needed) takes advantage- -- of the tcg_env we have now set--- ; traceIf (text "rdr_env: " <+> ppr rdr_env)- ; failIfErrsM-- -- Load any orphan-module (including orphan family- -- instance-module) interfaces, so that their rules and- -- instance decls will be found. But filter out a- -- self hs-boot: these instances will be checked when- -- we define them locally.- -- (We don't need to load non-orphan family instance- -- modules until we either try to use the instances they- -- define, or define our own family instances, at which- -- point we need to check them for consistency.)- ; loadModuleInterfaces (text "Loading orphan modules")- (filter (/= this_mod) (imp_orphs imports))-- -- Check type-family consistency between imports.- -- See Note [The type family instance consistency story]- ; traceRn "rn1: checking family instance consistency {" empty- ; let { dir_imp_mods = moduleEnvKeys- . imp_mods- $ imports }- ; checkFamInstConsistency dir_imp_mods- ; traceRn "rn1: } checking family instance consistency" empty-- ; getGblEnv } }--{--************************************************************************-* *- Type-checking the top level of a module-* *-************************************************************************--}--tcRnSrcDecls :: Bool -- False => no 'module M(..) where' header at all- -> Maybe (LocatedL [LIE GhcPs])- -> [LHsDecl GhcPs] -- Declarations- -> TcM TcGblEnv-tcRnSrcDecls explicit_mod_hdr export_ies decls- = do { -- Do all the declarations- ; (tcg_env, tcl_env, lie) <- tc_rn_src_decls decls-- ------ Simplify constraints ---------- --- -- We do this after checkMainType, so that we use the type- -- info that checkMainType adds- --- -- We do it with both global and local env in scope:- -- * the global env exposes the instances to simplifyTop,- -- and affects how names are rendered in error messages- -- * the local env exposes the local Ids to simplifyTop,- -- so that we get better error messages (monomorphism restriction)- ; new_ev_binds <- {-# SCC "simplifyTop" #-}- restoreEnvs (tcg_env, tcl_env) $- do { lie_main <- checkMainType tcg_env- ; simplifyTop (lie `andWC` lie_main) }-- -- Emit Typeable bindings- ; tcg_env <- setGblEnv tcg_env $- mkTypeableBinds-- ; traceTc "Tc9" empty- ; failIfErrsM -- Stop now if if there have been errors- -- Continuing is a waste of time; and we may get debug- -- warnings when zonking about strangely-typed TyCons!-- -- Zonk the final code. This must be done last.- -- Even simplifyTop may do some unification.- -- This pass also warns about missing type signatures- ; (id_env, ev_binds', binds', fords', imp_specs', rules')- <- zonkTcGblEnv new_ev_binds tcg_env-- --------- Run finalizers --------------- -- Finalizers must run after constraints are simplified, lest types- -- might not be complete when using reify (see #12777).- -- and also after we zonk the first time because we run typed splices- -- in the zonker which gives rise to the finalisers.- ; let -- init_tcg_env:- -- * Remove accumulated bindings, rules and so on from- -- TcGblEnv. They are now in ev_binds', binds', etc.- -- * Add the zonked Ids from the value bindings to tcg_type_env- -- Up to now these Ids are only in tcl_env's type-envt- init_tcg_env = tcg_env { tcg_binds = emptyBag- , tcg_ev_binds = emptyBag- , tcg_imp_specs = []- , tcg_rules = []- , tcg_fords = []- , tcg_type_env = tcg_type_env tcg_env- `plusTypeEnv` id_env }- ; (tcg_env, tcl_env) <- setGblEnv init_tcg_env- run_th_modfinalizers- ; finishTH- ; traceTc "Tc11" empty-- --------- Deal with the exports ----------- -- Can't be done earlier, because the export list must "see"- -- the declarations created by the finalizers- ; tcg_env <- restoreEnvs (tcg_env, tcl_env) $- rnExports explicit_mod_hdr export_ies-- --------- Emit the ':Main.main = runMainIO main' declaration ----------- -- Do this /after/ rnExports, so that it can consult- -- the tcg_exports created by rnExports- ; (tcg_env, main_ev_binds)- <- restoreEnvs (tcg_env, tcl_env) $- do { (tcg_env, lie) <- captureTopConstraints $- checkMain explicit_mod_hdr export_ies- ; ev_binds <- simplifyTop lie- ; return (tcg_env, ev_binds) }-- ; failIfErrsM -- Stop now if if there have been errors- -- Continuing is a waste of time; and we may get debug- -- warnings when zonking about strangely-typed TyCons!-- ---------- Final zonking ---------------- -- Zonk the new bindings arising from running the finalisers,- -- and main. This won't give rise to any more finalisers as you- -- can't nest finalisers inside finalisers.- ; (id_env_mf, ev_binds_mf, binds_mf, fords_mf, imp_specs_mf, rules_mf)- <- zonkTcGblEnv main_ev_binds tcg_env-- ; let { !final_type_env = tcg_type_env tcg_env- `plusTypeEnv` id_env_mf- -- Add the zonked Ids from the value bindings (they were in tcl_env)- -- Force !final_type_env, lest we retain an old reference- -- to the previous tcg_env-- ; tcg_env' = tcg_env- { tcg_binds = binds' `unionBags` binds_mf- , tcg_ev_binds = ev_binds' `unionBags` ev_binds_mf- , tcg_imp_specs = imp_specs' ++ imp_specs_mf- , tcg_rules = rules' ++ rules_mf- , tcg_fords = fords' ++ fords_mf } } ;-- ; setGlobalTypeEnv tcg_env' final_type_env- }--zonkTcGblEnv :: Bag EvBind -> TcGblEnv- -> TcM (TypeEnv, Bag EvBind, LHsBinds GhcTc,- [LForeignDecl GhcTc], [LTcSpecPrag], [LRuleDecl GhcTc])-zonkTcGblEnv ev_binds tcg_env@(TcGblEnv { tcg_binds = binds- , tcg_ev_binds = cur_ev_binds- , tcg_imp_specs = imp_specs- , tcg_rules = rules- , tcg_fords = fords })- = {-# SCC "zonkTopDecls" #-}- setGblEnv tcg_env $ -- This sets the GlobalRdrEnv which is used when rendering- -- error messages during zonking (notably levity errors)- do { let all_ev_binds = cur_ev_binds `unionBags` ev_binds- ; zonkTopDecls all_ev_binds binds rules imp_specs fords }---- | Runs TH finalizers and renames and typechecks the top-level declarations--- that they could introduce.-run_th_modfinalizers :: TcM (TcGblEnv, TcLclEnv)-run_th_modfinalizers = do- th_modfinalizers_var <- fmap tcg_th_modfinalizers getGblEnv- th_modfinalizers <- readTcRef th_modfinalizers_var- if null th_modfinalizers- then getEnvs- else do- writeTcRef th_modfinalizers_var []- let run_finalizer (lcl_env, f) =- restoreLclEnv lcl_env (runRemoteModFinalizers f)-- (_, lie_th) <- captureTopConstraints $- mapM_ run_finalizer th_modfinalizers-- -- Finalizers can add top-level declarations with addTopDecls, so- -- we have to run tc_rn_src_decls to get them- (tcg_env, tcl_env, lie_top_decls) <- tc_rn_src_decls []-- restoreEnvs (tcg_env, tcl_env) $ do- -- Subsequent rounds of finalizers run after any new constraints are- -- simplified, or some types might not be complete when using reify- -- (see #12777).- new_ev_binds <- {-# SCC "simplifyTop2" #-}- simplifyTop (lie_th `andWC` lie_top_decls)- addTopEvBinds new_ev_binds run_th_modfinalizers- -- addTopDecls can add declarations which add new finalizers.--tc_rn_src_decls :: [LHsDecl GhcPs]- -> TcM (TcGblEnv, TcLclEnv, WantedConstraints)--- Loops around dealing with each top level inter-splice group--- in turn, until it's dealt with the entire module--- Never emits constraints; calls captureTopConstraints internally-tc_rn_src_decls ds- = {-# SCC "tc_rn_src_decls" #-}- do { (first_group, group_tail) <- findSplice ds- -- If ds is [] we get ([], Nothing)-- -- Deal with decls up to, but not including, the first splice- ; (tcg_env, rn_decls) <- rnTopSrcDecls first_group- -- rnTopSrcDecls fails if there are any errors-- -- Get TH-generated top-level declarations and make sure they don't- -- contain any splices since we don't handle that at the moment- --- -- The plumbing here is a bit odd: see #10853- ; th_topdecls_var <- fmap tcg_th_topdecls getGblEnv- ; th_ds <- readTcRef th_topdecls_var- ; writeTcRef th_topdecls_var []-- ; (tcg_env, rn_decls) <-- if null th_ds- then return (tcg_env, rn_decls)- else do { (th_group, th_group_tail) <- findSplice th_ds- ; case th_group_tail of- { Nothing -> return ()- ; Just (SpliceDecl _ (L loc _) _, _) ->- setSrcSpanA loc- $ addErr (mkTcRnUnknownMessage $ mkPlainError noHints $ text- ("Declaration splices are not "- ++ "permitted inside top-level "- ++ "declarations added with addTopDecls"))- }- -- Rename TH-generated top-level declarations- ; (tcg_env, th_rn_decls) <- setGblEnv tcg_env- $ rnTopSrcDecls th_group-- -- Dump generated top-level declarations- ; let msg = "top-level declarations added with addTopDecls"- ; traceSplice- $ SpliceInfo { spliceDescription = msg- , spliceIsDecl = True- , spliceSource = Nothing- , spliceGenerated = ppr th_rn_decls }- ; return (tcg_env, appendGroups rn_decls th_rn_decls)- }-- -- Type check all declarations- -- NB: set the env **before** captureTopConstraints so that error messages- -- get reported w.r.t. the right GlobalRdrEnv. It is for this reason that- -- the captureTopConstraints must go here, not in tcRnSrcDecls.- ; ((tcg_env, tcl_env), lie1) <- setGblEnv tcg_env $- captureTopConstraints $- tcTopSrcDecls rn_decls-- -- If there is no splice, we're nearly done- ; restoreEnvs (tcg_env, tcl_env) $- case group_tail of- { Nothing -> return (tcg_env, tcl_env, lie1)-- -- If there's a splice, we must carry on- ; Just (SpliceDecl _ (L _ splice) _, rest_ds) ->- do {- -- We need to simplify any constraints from the previous declaration- -- group, or else we might reify metavariables, as in #16980.- ; ev_binds1 <- simplifyTop lie1-- -- Rename the splice expression, and get its supporting decls- ; (spliced_decls, splice_fvs) <- rnTopSpliceDecls splice-- -- Glue them on the front of the remaining decls and loop- ; setGblEnv (tcg_env `addTcgDUs` usesOnly splice_fvs) $- addTopEvBinds ev_binds1 $- tc_rn_src_decls (spliced_decls ++ rest_ds)- }- }- }--{--************************************************************************-* *- Compiling hs-boot source files, and- comparing the hi-boot interface with the real thing-* *-************************************************************************--}--tcRnHsBootDecls :: HscSource -> [LHsDecl GhcPs] -> TcM TcGblEnv-tcRnHsBootDecls hsc_src decls- = do { (first_group, group_tail) <- findSplice decls-- -- Rename the declarations- ; (tcg_env, HsGroup { hs_tyclds = tycl_decls- , hs_derivds = deriv_decls- , hs_fords = for_decls- , hs_defds = def_decls- , hs_ruleds = rule_decls- , hs_annds = _- , 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 GHC.Rename.Module-- ; (gbl_env, lie) <- setGblEnv tcg_env $ captureTopConstraints $ do {- -- NB: setGblEnv **before** captureTopConstraints so that- -- if the latter reports errors, it knows what's in scope-- -- Check for illegal declarations- ; case group_tail of- Just (SpliceDecl _ d _, _) -> badBootDecl hsc_src "splice" d- Nothing -> return ()- ; mapM_ (badBootDecl hsc_src "foreign") for_decls- ; mapM_ (badBootDecl hsc_src "default") def_decls- ; mapM_ (badBootDecl hsc_src "rule") rule_decls-- -- Typecheck type/class/instance decls- ; traceTc "Tc2 (boot)" empty- ; (tcg_env, inst_infos, _deriv_binds, _th_bndrs)- <- tcTyClsInstDecls tycl_decls deriv_decls val_binds- ; setGblEnv tcg_env $ do {-- -- Emit Typeable bindings- ; tcg_env <- mkTypeableBinds- ; setGblEnv tcg_env $ do {-- -- Typecheck value declarations- ; traceTc "Tc5" empty- ; val_ids <- tcHsBootSigs val_binds val_sigs-- -- Wrap up- -- No simplification or zonking to do- ; traceTc "Tc7a" empty- ; gbl_env <- getGblEnv-- -- Make the final type-env- -- Include the dfun_ids so that their type sigs- -- are written into the interface file.- ; let { type_env0 = tcg_type_env gbl_env- ; type_env1 = extendTypeEnvWithIds type_env0 val_ids- ; type_env2 = extendTypeEnvWithIds type_env1 dfun_ids- ; dfun_ids = map iDFunId inst_infos- }-- ; setGlobalTypeEnv gbl_env type_env2- }}}- ; traceTc "boot" (ppr lie); return gbl_env }--badBootDecl :: HscSource -> String -> LocatedA decl -> TcM ()-badBootDecl hsc_src what (L loc _)- = addErrAt (locA loc) $ mkTcRnUnknownMessage $ mkPlainError noHints $- (char 'A' <+> text what- <+> text "declaration is not (currently) allowed in a"- <+> (case hsc_src of- HsBootFile -> text "hs-boot"- HsigFile -> text "hsig"- _ -> panic "badBootDecl: should be an hsig or hs-boot file")- <+> text "file")--{--Once we've typechecked the body of the module, we want to compare what-we've found (gathered in a TypeEnv) with the hi-boot details (if any).--}--checkHiBootIface :: TcGblEnv -> SelfBootInfo -> TcM TcGblEnv--- Compare the hi-boot file for this module (if there is one)--- with the type environment we've just come up with--- In the common case where there is no hi-boot file, the list--- of boot_names is empty.--checkHiBootIface tcg_env boot_info- | NoSelfBoot <- boot_info -- Common case- = return tcg_env-- | HsBootFile <- tcg_src tcg_env -- Current module is already a hs-boot file!- = return tcg_env-- | SelfBoot { sb_mds = boot_details } <- boot_info- , TcGblEnv { tcg_binds = binds- , tcg_insts = local_insts- , tcg_type_env = local_type_env- , tcg_exports = local_exports } <- tcg_env- = do { -- This code is tricky, see Note [DFun knot-tying]- ; dfun_prs <- checkHiBootIface' local_insts local_type_env- local_exports boot_details-- -- Now add the boot-dfun bindings $fxblah = $fblah- -- to (a) the type envt, and (b) the top-level bindings- ; let boot_dfuns = map fst dfun_prs- type_env' = extendTypeEnvWithIds local_type_env boot_dfuns- dfun_binds = listToBag [ mkVarBind boot_dfun (nlHsVar dfun)- | (boot_dfun, dfun) <- dfun_prs ]- tcg_env_w_binds- = tcg_env { tcg_binds = binds `unionBags` dfun_binds }-- ; type_env' `seq`- -- Why the seq? Without, we will put a TypeEnv thunk in- -- tcg_type_env_var. That thunk will eventually get- -- forced if we are typechecking interfaces, but that- -- is no good if we are trying to typecheck the very- -- DFun we were going to put in.- -- TODO: Maybe setGlobalTypeEnv should be strict.- setGlobalTypeEnv tcg_env_w_binds type_env' }--#if __GLASGOW_HASKELL__ <= 810- | otherwise = panic "checkHiBootIface: unreachable code"-#endif--{- Note [DFun impedance matching]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We return a list of "impedance-matching" bindings for the dfuns-defined in the hs-boot file, such as- $fxEqT = $fEqT-We need these because the module and hi-boot file might differ in-the name it chose for the dfun: the name of a dfun is not-uniquely determined by its type; there might be multiple dfuns-which, individually, would map to the same name (in which case-we have to disambiguate them.) There's no way for the hi file-to know exactly what disambiguation to use... without looking-at the hi-boot file itself.--In fact, the names will always differ because we always pick names-prefixed with "$fx" for boot dfuns, and "$f" for real dfuns-(so that this impedance matching is always possible).--Note [DFun knot-tying]-~~~~~~~~~~~~~~~~~~~~~~-The 'SelfBootInfo' that is fed into 'checkHiBootIface' comes from-typechecking the hi-boot file that we are presently implementing.-Suppose we are typechecking the module A: when we typecheck the-hi-boot file, whenever we see an identifier A.T, we knot-tie this-identifier to the *local* type environment (via if_rec_types.) The-contract then is that we don't *look* at 'SelfBootInfo' until we've-finished typechecking the module and updated the type environment with-the new tycons and ids.--This most works well, but there is one problem: DFuns! We do not want-to look at the mb_insts of the ModDetails in SelfBootInfo, because a-dfun in one of those ClsInsts is gotten (in GHC.IfaceToCore.tcIfaceInst) by a-(lazily evaluated) lookup in the if_rec_types. We could extend the-type env, do a setGloblaTypeEnv etc; but that all seems very indirect.-It is much more directly simply to extract the DFunIds from the-md_types of the SelfBootInfo.--See #4003, #16038 for why we need to take care here.--}--checkHiBootIface' :: [ClsInst] -> TypeEnv -> [AvailInfo]- -> ModDetails -> TcM [(Id, Id)]--- Variant which doesn't require a full TcGblEnv; you could get the--- local components from another ModDetails.-checkHiBootIface'- local_insts local_type_env local_exports- (ModDetails { md_types = boot_type_env- , md_fam_insts = boot_fam_insts- , md_exports = boot_exports })- = do { traceTc "checkHiBootIface" $ vcat- [ ppr boot_type_env, ppr boot_exports]-- -- Check the exports of the boot module, one by one- ; mapM_ check_export boot_exports-- -- Check for no family instances- ; unless (null boot_fam_insts) $- panic ("GHC.Tc.Module.checkHiBootIface: Cannot handle family " ++- "instances in boot files yet...")- -- FIXME: Why? The actual comparison is not hard, but what would- -- be the equivalent to the dfun bindings returned for class- -- instances? We can't easily equate tycons...-- -- Check instance declarations- -- and generate an impedance-matching binding- ; mb_dfun_prs <- mapM check_cls_inst boot_dfuns-- ; failIfErrsM-- ; return (catMaybes mb_dfun_prs) }-- where- boot_dfun_names = map idName boot_dfuns- boot_dfuns = filter isDFunId $ typeEnvIds boot_type_env- -- NB: boot_dfuns is /not/ defined thus: map instanceDFunId md_insts- -- We don't want to look at md_insts!- -- Why not? See Note [DFun knot-tying]-- check_export boot_avail -- boot_avail is exported by the boot iface- | name `elem` boot_dfun_names = return ()-- -- Check that the actual module exports the same thing- | missing_name:_ <- missing_names- = addErrAt (nameSrcSpan missing_name)- (missingBootThing True missing_name "exported by")-- -- If the boot module does not *define* the thing, we are done- -- (it simply re-exports it, and names match, so nothing further to do)- | isNothing mb_boot_thing = return ()-- -- Check that the actual module also defines the thing, and- -- then compare the definitions- | Just real_thing <- lookupTypeEnv local_type_env name,- Just boot_thing <- mb_boot_thing- = checkBootDeclM True boot_thing real_thing-- | otherwise- = addErrTc (missingBootThing True name "defined in")- where- name = availName boot_avail- mb_boot_thing = lookupTypeEnv boot_type_env name- missing_names = case lookupNameEnv local_export_env name of- Nothing -> [name]- Just avail -> availNames boot_avail `minusList` availNames avail-- local_export_env :: NameEnv AvailInfo- local_export_env = availsToNameEnv local_exports-- check_cls_inst :: DFunId -> TcM (Maybe (Id, Id))- -- Returns a pair of the boot dfun in terms of the equivalent- -- real dfun. Delicate (like checkBootDecl) because it depends- -- on the types lining up precisely even to the ordering of- -- the type variables in the foralls.- check_cls_inst boot_dfun- | (real_dfun : _) <- find_real_dfun boot_dfun- , let local_boot_dfun = Id.mkExportedVanillaId- (idName boot_dfun) (idType real_dfun)- = return (Just (local_boot_dfun, real_dfun))- -- Two tricky points here:- --- -- * The local_boot_fun should have a Name from the /boot-file/,- -- but type from the dfun defined in /this module/.- -- That ensures that the TyCon etc inside the type are- -- the ones defined in this module, not the ones gotten- -- from the hi-boot file, which may have a lot less info- -- (#8743, comment:10).- --- -- * The DFunIds from boot_details are /GlobalIds/, because- -- they come from typechecking M.hi-boot.- -- But all bindings in this module should be for /LocalIds/,- -- otherwise dependency analysis fails (#16038). This- -- is another reason for using mkExportedVanillaId, rather- -- that modifying boot_dfun, to make local_boot_fun.-- | otherwise- = setSrcSpan (nameSrcSpan (getName boot_dfun)) $- do { traceTc "check_cls_inst" $ vcat- [ text "local_insts" <+>- vcat (map (ppr . idType . instanceDFunId) local_insts)- , text "boot_dfun_ty" <+> ppr (idType boot_dfun) ]-- ; addErrTc (instMisMatch boot_dfun)- ; return Nothing }-- find_real_dfun :: DFunId -> [DFunId]- find_real_dfun boot_dfun- = [dfun | inst <- local_insts- , let dfun = instanceDFunId inst- , idType dfun `eqType` boot_dfun_ty ]- where- boot_dfun_ty = idType boot_dfun----- In general, to perform these checks we have to--- compare the TyThing from the .hi-boot file to the TyThing--- in the current source file. We must be careful to allow alpha-renaming--- where appropriate, and also the boot declaration is allowed to omit--- constructors and class methods.------ See rnfail055 for a good test of this stuff.---- | Compares two things for equivalence between boot-file and normal code,--- reporting an error if they don't match up.-checkBootDeclM :: Bool -- ^ True <=> an hs-boot file (could also be a sig)- -> TyThing -> TyThing -> TcM ()-checkBootDeclM is_boot boot_thing real_thing- = whenIsJust (checkBootDecl is_boot boot_thing real_thing) $ \ err ->- addErrAt span- (bootMisMatch is_boot err real_thing boot_thing)- where- -- Here we use the span of the boot thing or, if it doesn't have a sensible- -- span, that of the real thing,- span- | let span = nameSrcSpan (getName boot_thing)- , isGoodSrcSpan span- = span- | otherwise- = nameSrcSpan (getName real_thing)---- | Compares the two things for equivalence between boot-file and normal--- code. Returns @Nothing@ on success or @Just "some helpful info for user"@--- failure. If the difference will be apparent to the user, @Just empty@ is--- perfectly suitable.-checkBootDecl :: Bool -> TyThing -> TyThing -> Maybe SDoc--checkBootDecl _ (AnId id1) (AnId id2)- = assert (id1 == id2) $- check (idType id1 `eqType` idType id2)- (text "The two types are different")--checkBootDecl is_boot (ATyCon tc1) (ATyCon tc2)- = checkBootTyCon is_boot tc1 tc2--checkBootDecl _ (AConLike (RealDataCon dc1)) (AConLike (RealDataCon _))- = pprPanic "checkBootDecl" (ppr dc1)--checkBootDecl _ _ _ = Just empty -- probably shouldn't happen---- | Combines two potential error messages-andThenCheck :: Maybe SDoc -> Maybe SDoc -> Maybe SDoc-Nothing `andThenCheck` msg = msg-msg `andThenCheck` Nothing = msg-Just d1 `andThenCheck` Just d2 = Just (d1 $$ d2)-infixr 0 `andThenCheck`---- | If the test in the first parameter is True, succeed with @Nothing@;--- otherwise, return the provided check-checkUnless :: Bool -> Maybe SDoc -> Maybe SDoc-checkUnless True _ = Nothing-checkUnless False k = k---- | Run the check provided for every pair of elements in the lists.--- The provided SDoc should name the element type, in the plural.-checkListBy :: (a -> a -> Maybe SDoc) -> [a] -> [a] -> SDoc- -> Maybe SDoc-checkListBy check_fun as bs whats = go [] as bs- where- herald = text "The" <+> whats <+> text "do not match"-- go [] [] [] = Nothing- go docs [] [] = Just (hang (herald <> colon) 2 (vcat $ reverse docs))- go docs (x:xs) (y:ys) = case check_fun x y of- Just doc -> go (doc:docs) xs ys- Nothing -> go docs xs ys- go _ _ _ = Just (hang (herald <> colon)- 2 (text "There are different numbers of" <+> whats))---- | If the test in the first parameter is True, succeed with @Nothing@;--- otherwise, fail with the given SDoc.-check :: Bool -> SDoc -> Maybe SDoc-check True _ = Nothing-check False doc = Just doc---- | A more perspicuous name for @Nothing@, for @checkBootDecl@ and friends.-checkSuccess :: Maybe SDoc-checkSuccess = Nothing-------------------checkBootTyCon :: Bool -> TyCon -> TyCon -> Maybe SDoc-checkBootTyCon is_boot tc1 tc2- | not (eqType (tyConKind tc1) (tyConKind tc2))- = Just $ text "The types have different kinds" -- First off, check the kind-- | Just c1 <- tyConClass_maybe tc1- , Just c2 <- tyConClass_maybe tc2- , let (clas_tvs1, clas_fds1, sc_theta1, _, ats1, op_stuff1)- = classExtraBigSig c1- (clas_tvs2, clas_fds2, sc_theta2, _, ats2, op_stuff2)- = classExtraBigSig c2- , Just env <- eqVarBndrs emptyRnEnv2 clas_tvs1 clas_tvs2- = let- eqSig (id1, def_meth1) (id2, def_meth2)- = check (name1 == name2)- (text "The names" <+> pname1 <+> text "and" <+> pname2 <+>- text "are different") `andThenCheck`- check (eqTypeX env op_ty1 op_ty2)- (text "The types of" <+> pname1 <+>- text "are different") `andThenCheck`- if is_boot- then check (liftEq eqDM def_meth1 def_meth2)- (text "The default methods associated with" <+> pname1 <+>- text "are different")- else check (subDM op_ty1 def_meth1 def_meth2)- (text "The default methods associated with" <+> pname1 <+>- text "are not compatible")- where- name1 = idName id1- name2 = idName id2- pname1 = quotes (ppr name1)- pname2 = quotes (ppr name2)- op_ty1 = classMethodTy id1- op_ty2 = classMethodTy id2-- eqAT (ATI tc1 def_ats1) (ATI tc2 def_ats2)- = checkBootTyCon is_boot tc1 tc2 `andThenCheck`- check (eqATDef def_ats1 def_ats2)- (text "The associated type defaults differ")-- eqDM (_, VanillaDM) (_, VanillaDM) = True- eqDM (_, GenericDM t1) (_, GenericDM t2) = eqTypeX env t1 t2- eqDM _ _ = False-- -- NB: first argument is from hsig, second is from real impl.- -- Order of pattern matching matters.- subDM _ Nothing _ = True- subDM _ _ Nothing = False-- -- If the hsig wrote:- --- -- f :: a -> a- -- default f :: a -> a- --- -- this should be validly implementable using an old-fashioned- -- vanilla default method.- subDM t1 (Just (_, GenericDM gdm_t1)) (Just (_, VanillaDM))- = eqType t1 gdm_t1 -- Take care (#22476). Both t1 and gdm_t1 come- -- from tc1, so use eqType, and /not/ eqTypeX-- -- This case can occur when merging signatures- subDM t1 (Just (_, VanillaDM)) (Just (_, GenericDM t2))- = eqTypeX env t1 t2-- subDM _ (Just (_, VanillaDM)) (Just (_, VanillaDM)) = True- subDM _ (Just (_, GenericDM t1)) (Just (_, GenericDM t2))- = eqTypeX env t1 t2-- -- Ignore the location of the defaults- eqATDef Nothing Nothing = True- eqATDef (Just (ty1, _loc1)) (Just (ty2, _loc2)) = eqTypeX env ty1 ty2- eqATDef _ _ = False-- eqFD (as1,bs1) (as2,bs2) =- liftEq (eqTypeX env) (mkTyVarTys as1) (mkTyVarTys as2) &&- liftEq (eqTypeX env) (mkTyVarTys bs1) (mkTyVarTys bs2)- in- checkRoles roles1 roles2 `andThenCheck`- -- Checks kind of class- check (liftEq eqFD clas_fds1 clas_fds2)- (text "The functional dependencies do not match") `andThenCheck`- checkUnless (isAbstractTyCon tc1) $- check (liftEq (eqTypeX env) sc_theta1 sc_theta2)- (text "The class constraints do not match") `andThenCheck`- checkListBy eqSig op_stuff1 op_stuff2 (text "methods") `andThenCheck`- checkListBy eqAT ats1 ats2 (text "associated types") `andThenCheck`- check (classMinimalDef c1 `BF.implies` classMinimalDef c2)- (text "The MINIMAL pragmas are not compatible")-- | Just syn_rhs1 <- synTyConRhs_maybe tc1- , Just syn_rhs2 <- synTyConRhs_maybe tc2- , Just env <- eqVarBndrs emptyRnEnv2 (tyConTyVars tc1) (tyConTyVars tc2)- = assert (tc1 == tc2) $- checkRoles roles1 roles2 `andThenCheck`- check (eqTypeX env syn_rhs1 syn_rhs2) empty -- nothing interesting to say- -- This allows abstract 'data T a' to be implemented using 'type T = ...'- -- and abstract 'class K a' to be implement using 'type K = ...'- -- See Note [Synonyms implement abstract data]- | not is_boot -- don't support for hs-boot yet- , isAbstractTyCon tc1- , Just (tvs, ty) <- synTyConDefn_maybe tc2- , Just (tc2', args) <- tcSplitTyConApp_maybe ty- = checkSynAbsData tvs ty tc2' args- -- TODO: When it's a synonym implementing a class, we really- -- should check if the fundeps are satisfied, but- -- there is not an obvious way to do this for a constraint synonym.- -- So for now, let it all through (it won't cause segfaults, anyway).- -- Tracked at #12704.-- -- This allows abstract 'data T :: Nat' to be implemented using- -- 'type T = 42' Since the kinds already match (we have checked this- -- upfront) all we need to check is that the implementation 'type T- -- = ...' defined an actual literal. See #15138 for the case this- -- handles.- | not is_boot- , isAbstractTyCon tc1- , Just (_,ty2) <- synTyConDefn_maybe tc2- , isJust (isLitTy ty2)- = Nothing-- | Just fam_flav1 <- famTyConFlav_maybe tc1- , Just fam_flav2 <- famTyConFlav_maybe tc2- = assert (tc1 == tc2) $- let eqFamFlav OpenSynFamilyTyCon OpenSynFamilyTyCon = True- eqFamFlav (DataFamilyTyCon {}) (DataFamilyTyCon {}) = True- -- This case only happens for hsig merging:- eqFamFlav AbstractClosedSynFamilyTyCon AbstractClosedSynFamilyTyCon = True- eqFamFlav AbstractClosedSynFamilyTyCon (ClosedSynFamilyTyCon {}) = True- eqFamFlav (ClosedSynFamilyTyCon {}) AbstractClosedSynFamilyTyCon = True- eqFamFlav (ClosedSynFamilyTyCon ax1) (ClosedSynFamilyTyCon ax2)- = eqClosedFamilyAx ax1 ax2- eqFamFlav (BuiltInSynFamTyCon {}) (BuiltInSynFamTyCon {}) = tc1 == tc2- eqFamFlav _ _ = False- injInfo1 = tyConInjectivityInfo tc1- injInfo2 = tyConInjectivityInfo tc2- in- -- check equality of roles, family flavours and injectivity annotations- -- (NB: Type family roles are always nominal. But the check is- -- harmless enough.)- checkRoles roles1 roles2 `andThenCheck`- check (eqFamFlav fam_flav1 fam_flav2)- (whenPprDebug $- text "Family flavours" <+> ppr fam_flav1 <+> text "and" <+> ppr fam_flav2 <+>- text "do not match") `andThenCheck`- check (injInfo1 == injInfo2) (text "Injectivities do not match")-- | isAlgTyCon tc1 && isAlgTyCon tc2- , Just env <- eqVarBndrs emptyRnEnv2 (tyConTyVars tc1) (tyConTyVars tc2)- = assert (tc1 == tc2) $- checkRoles roles1 roles2 `andThenCheck`- check (liftEq (eqTypeX env)- (tyConStupidTheta tc1) (tyConStupidTheta tc2))- (text "The datatype contexts do not match") `andThenCheck`- eqAlgRhs tc1 (algTyConRhs tc1) (algTyConRhs tc2)-- | otherwise = Just empty -- two very different types -- should be obvious- where- roles1 = tyConRoles tc1 -- the abstract one- roles2 = tyConRoles tc2- roles_msg = text "The roles do not match." $$- (text "Roles on abstract types default to" <+>- quotes (text "representational") <+> text "in boot files.")-- roles_subtype_msg = text "The roles are not compatible:" $$- text "Main module:" <+> ppr roles2 $$- text "Hsig file:" <+> ppr roles1-- checkRoles r1 r2- | is_boot || isInjectiveTyCon tc1 Representational -- See Note [Role subtyping]- = check (r1 == r2) roles_msg- | otherwise = check (r2 `rolesSubtypeOf` r1) roles_subtype_msg-- -- Note [Role subtyping]- -- ~~~~~~~~~~~~~~~~~~~~~- -- In the current formulation of roles, role subtyping is only OK if the- -- "abstract" TyCon was not representationally injective. Among the most- -- notable examples of non representationally injective TyCons are abstract- -- data, which can be implemented via newtypes (which are not- -- representationally injective). The key example is- -- in this example from #13140:- --- -- -- In an hsig file- -- data T a -- abstract!- -- type role T nominal- --- -- -- Elsewhere- -- foo :: Coercible (T a) (T b) => a -> b- -- foo x = x- --- -- We must NOT allow foo to typecheck, because if we instantiate- -- T with a concrete data type with a phantom role would cause- -- Coercible (T a) (T b) to be provable. Fortunately, if T is not- -- representationally injective, we cannot make the inference that a ~N b if- -- T a ~R T b.- --- -- Unconditional role subtyping would be possible if we setup- -- an extra set of roles saying when we can project out coercions- -- (we call these proj-roles); then it would NOT be valid to instantiate T- -- with a data type at phantom since the proj-role subtyping check- -- would fail. See #13140 for more details.- --- -- One consequence of this is we get no role subtyping for non-abstract- -- data types in signatures. Suppose you have:- --- -- signature A where- -- type role T nominal- -- data T a = MkT- --- -- If you write this, we'll treat T as injective, and make inferences- -- like T a ~R T b ==> a ~N b (mkSelCo). But if we can- -- subsequently replace T with one at phantom role, we would then be able to- -- infer things like T Int ~R T Bool which is bad news.- --- -- We could allow role subtyping here if we didn't treat *any* data types- -- defined in signatures as injective. But this would be a bit surprising,- -- replacing a data type in a module with one in a signature could cause- -- your code to stop typechecking (whereas if you made the type abstract,- -- it is more understandable that the type checker knows less).- --- -- It would have been best if this was purely a question of defaults- -- (i.e., a user could explicitly ask for one behavior or another) but- -- the current role system isn't expressive enough to do this.- -- Having explicit proj-roles would solve this problem.-- rolesSubtypeOf [] [] = True- -- NB: this relation is the OPPOSITE of the subroling relation- rolesSubtypeOf (x:xs) (y:ys) = x >= y && rolesSubtypeOf xs ys- rolesSubtypeOf _ _ = False-- -- Note [Synonyms implement abstract data]- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- -- An abstract data type or class can be implemented using a type synonym,- -- but ONLY if the type synonym is nullary and has no type family- -- applications. This arises from two properties of skolem abstract data:- --- -- For any T (with some number of parameters),- --- -- 1. T is a valid type (it is "curryable"), and- --- -- 2. T is valid in an instance head (no type families).- --- -- See also 'HowAbstract' and Note [Skolem abstract data].-- -- Given @type T tvs = ty@, where @ty@ decomposes into @tc2' args@,- -- check that this synonym is an acceptable implementation of @tc1@.- -- See Note [Synonyms implement abstract data]- checkSynAbsData :: [TyVar] -> Type -> TyCon -> [Type] -> Maybe SDoc- checkSynAbsData tvs ty tc2' args =- check (null (tcTyFamInsts ty))- (text "Illegal type family application in implementation of abstract data.")- `andThenCheck`- check (null tvs)- (text "Illegal parameterized type synonym in implementation of abstract data." $$- text "(Try eta reducing your type synonym so that it is nullary.)")- `andThenCheck`- -- Don't report roles errors unless the type synonym is nullary- checkUnless (not (null tvs)) $- assert (null roles2) $- -- If we have something like:- --- -- signature H where- -- data T a- -- module H where- -- data K a b = ...- -- type T = K Int- --- -- we need to drop the first role of K when comparing!- checkRoles roles1 (drop (length args) (tyConRoles tc2'))-{-- -- Hypothetically, if we were allow to non-nullary type synonyms, here- -- is how you would check the roles- if length tvs == length roles1- then checkRoles roles1 roles2- else case tcSplitTyConApp_maybe ty of- Just (tc2', args) ->- checkRoles roles1 (drop (length args) (tyConRoles tc2') ++ roles2)- Nothing -> Just roles_msg--}-- eqAlgRhs _ (AbstractTyCon {}) _rhs2- = checkSuccess -- rhs2 is guaranteed to be injective, since it's an AlgTyCon- eqAlgRhs _ tc1@DataTyCon{} tc2@DataTyCon{} =- checkListBy eqCon (data_cons tc1) (data_cons tc2) (text "constructors")- eqAlgRhs _ tc1@NewTyCon{} tc2@NewTyCon{} =- eqCon (data_con tc1) (data_con tc2)- eqAlgRhs _ _ _ = Just (text "Cannot match a" <+> quotes (text "data") <+>- text "definition with a" <+> quotes (text "newtype") <+>- text "definition")-- eqCon c1 c2- = check (name1 == name2)- (text "The names" <+> pname1 <+> text "and" <+> pname2 <+>- text "differ") `andThenCheck`- check (dataConIsInfix c1 == dataConIsInfix c2)- (text "The fixities of" <+> pname1 <+>- text "differ") `andThenCheck`- check (liftEq eqHsBang (dataConImplBangs c1) (dataConImplBangs c2))- (text "The strictness annotations for" <+> pname1 <+>- text "differ") `andThenCheck`- check (map flSelector (dataConFieldLabels c1) == map flSelector (dataConFieldLabels c2))- (text "The record label lists for" <+> pname1 <+>- text "differ") `andThenCheck`- check (eqType (dataConWrapperType c1) (dataConWrapperType c2))- (text "The types for" <+> pname1 <+> text "differ")- where- name1 = dataConName c1- name2 = dataConName c2- pname1 = quotes (ppr name1)- pname2 = quotes (ppr name2)-- eqClosedFamilyAx Nothing Nothing = True- eqClosedFamilyAx Nothing (Just _) = False- eqClosedFamilyAx (Just _) Nothing = False- eqClosedFamilyAx (Just (CoAxiom { co_ax_branches = branches1 }))- (Just (CoAxiom { co_ax_branches = branches2 }))- = numBranches branches1 == numBranches branches2- && (and $ zipWith eqClosedFamilyBranch branch_list1 branch_list2)- where- branch_list1 = fromBranches branches1- branch_list2 = fromBranches branches2-- eqClosedFamilyBranch (CoAxBranch { cab_tvs = tvs1, cab_cvs = cvs1- , cab_lhs = lhs1, cab_rhs = rhs1 })- (CoAxBranch { cab_tvs = tvs2, cab_cvs = cvs2- , cab_lhs = lhs2, cab_rhs = rhs2 })- | Just env1 <- eqVarBndrs emptyRnEnv2 tvs1 tvs2- , Just env <- eqVarBndrs env1 cvs1 cvs2- = liftEq (eqTypeX env) lhs1 lhs2 &&- eqTypeX env rhs1 rhs2-- | otherwise = False--emptyRnEnv2 :: RnEnv2-emptyRnEnv2 = mkRnEnv2 emptyInScopeSet-------------------missingBootThing :: Bool -> Name -> String -> TcRnMessage-missingBootThing is_boot name what- = mkTcRnUnknownMessage $ mkPlainError noHints $- quotes (ppr name) <+> text "is exported by the"- <+> (if is_boot then text "hs-boot" else text "hsig")- <+> text "file, but not"- <+> text what <+> text "the module"--badReexportedBootThing :: Bool -> Name -> Name -> TcRnMessage-badReexportedBootThing is_boot name name'- = mkTcRnUnknownMessage $ mkPlainError noHints $- withUserStyle alwaysQualify AllTheWay $ vcat- [ text "The" <+> (if is_boot then text "hs-boot" else text "hsig")- <+> text "file (re)exports" <+> quotes (ppr name)- , text "but the implementing module exports a different identifier" <+> quotes (ppr name')- ]--bootMisMatch :: Bool -> SDoc -> TyThing -> TyThing -> TcRnMessage-bootMisMatch is_boot extra_info real_thing boot_thing- = mkTcRnUnknownMessage $ mkPlainError noHints $- pprBootMisMatch is_boot extra_info real_thing real_doc boot_doc- where- to_doc- = pprTyThingInContext $ showToHeader { ss_forall =- if is_boot- then ShowForAllMust- else ShowForAllWhen }-- real_doc = to_doc real_thing- boot_doc = to_doc boot_thing-- pprBootMisMatch :: Bool -> SDoc -> TyThing -> SDoc -> SDoc -> SDoc- pprBootMisMatch is_boot extra_info real_thing real_doc boot_doc- = vcat- [ ppr real_thing <+>- text "has conflicting definitions in the module",- text "and its" <+>- (if is_boot- then text "hs-boot file"- else text "hsig file"),- text "Main module:" <+> real_doc,- (if is_boot- then text "Boot file: "- else text "Hsig file: ")- <+> boot_doc,- extra_info- ]--instMisMatch :: DFunId -> TcRnMessage-instMisMatch dfun- = mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "instance" <+> ppr (idType dfun))- 2 (text "is defined in the hs-boot file, but not in the module itself")--{--************************************************************************-* *- Type-checking the top level of a module (continued)-* *-************************************************************************--}--rnTopSrcDecls :: HsGroup GhcPs -> TcM (TcGblEnv, HsGroup GhcRn)--- Fails if there are any errors-rnTopSrcDecls group- = do { -- Rename the source decls- 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'- | Just grp <- tcg_rn_decls tcg_env- = tcg_env{ tcg_rn_decls = Just (appendGroups grp rn_decls) }- | otherwise- = tcg_env };-- -- Dump trace of renaming part- rnDump rn_decls ;- return (tcg_env', rn_decls)- }--tcTopSrcDecls :: HsGroup GhcRn -> TcM (TcGblEnv, TcLclEnv)-tcTopSrcDecls (HsGroup { hs_tyclds = tycl_decls,- hs_derivds = deriv_decls,- hs_fords = foreign_decls,- hs_defds = default_decls,- hs_annds = annotation_decls,- hs_ruleds = rule_decls,- 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 ;-- -- Source-language instances, including derivings,- -- and import the supporting declarations- traceTc "Tc3" empty ;- (tcg_env, inst_infos, th_bndrs,- XValBindsLR (NValBinds deriv_binds deriv_sigs))- <- tcTyClsInstDecls tycl_decls deriv_decls val_binds ;-- updLclEnv (\tcl_env -> tcl_env { tcl_th_bndrs = th_bndrs `plusNameEnv` tcl_th_bndrs tcl_env }) $- setGblEnv tcg_env $ do {-- -- Generate Applicative/Monad proposal (AMP) warnings- traceTc "Tc3b" empty ;-- -- Generate Semigroup/Monoid warnings- traceTc "Tc3c" empty ;- tcSemigroupWarnings ;-- -- Foreign import declarations next.- traceTc "Tc4" empty ;- (fi_ids, fi_decls, fi_gres) <- tcForeignImports foreign_decls ;- tcExtendGlobalValEnv fi_ids $ do {-- -- Default declarations- traceTc "Tc4a" empty ;- default_tys <- tcDefaults default_decls ;- updGblEnv (\gbl -> gbl { tcg_default = default_tys }) $ do {-- -- Value declarations next.- -- It is important that we check the top-level value bindings- -- before the GHC-generated derived bindings, since the latter- -- may be defined in terms of the former. (For instance,- -- the bindings produced in a Data instance.)- traceTc "Tc5" empty ;- tc_envs <- tcTopBinds val_binds val_sigs;- restoreEnvs tc_envs $ do {-- -- Now GHC-generated derived bindings, generics, and selectors- -- Do not generate warnings from compiler-generated code;- -- hence the use of discardWarnings- tc_envs@(tcg_env, tcl_env)- <- discardWarnings (tcTopBinds deriv_binds deriv_sigs) ;- restoreEnvs tc_envs $ do { -- Environment doesn't change now-- -- Second pass over class and instance declarations,- -- now using the kind-checked decls- traceTc "Tc6" empty ;- inst_binds <- tcInstDecls2 (tyClGroupTyClDecls tycl_decls) inst_infos ;-- -- Foreign exports- traceTc "Tc7" empty ;- (foe_binds, foe_decls, foe_gres) <- tcForeignExports foreign_decls ;-- -- Annotations- annotations <- tcAnnotations annotation_decls ;-- -- Rules- rules <- tcRules rule_decls ;-- -- Wrap up- traceTc "Tc7a" empty ;- let { all_binds = inst_binds `unionBags`- foe_binds-- ; fo_gres = fi_gres `unionBags` foe_gres- ; fo_fvs = foldr (\gre fvs -> fvs `addOneFV` greMangledName gre)- emptyFVs fo_gres-- ; sig_names = mkNameSet (collectHsValBinders CollNoDictBinders hs_val_binds)- `minusNameSet` getTypeSigNames val_sigs-- -- Extend the GblEnv with the (as yet un-zonked)- -- bindings, rules, foreign decls- ; tcg_env' = tcg_env { tcg_binds = tcg_binds tcg_env `unionBags` all_binds- , tcg_sigs = tcg_sigs tcg_env `unionNameSet` sig_names- , tcg_rules = tcg_rules tcg_env- ++ flattenRuleDecls rules- , 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- , tcg_dus = tcg_dus tcg_env `plusDU` usesOnly fo_fvs } } ;- -- tcg_dus: see Note [Newtype constructor usage in foreign declarations]-- -- See Note [Newtype constructor usage in foreign declarations]- addUsedGREs (bagToList fo_gres) ;-- return (tcg_env', tcl_env)- }}}}}}--tcTopSrcDecls _ = panic "tcTopSrcDecls: ValBindsIn"---tcSemigroupWarnings :: TcM ()-tcSemigroupWarnings = do- mod <- getModule- -- ghc-prim doesn't depend on base- unless (moduleUnit mod == primUnit) $ do- traceTc "tcSemigroupWarnings" empty- let warnFlag = Opt_WarnSemigroup- tcPreludeClashWarn warnFlag sappendName- tcMissingParentClassWarn warnFlag monoidClassName semigroupClassName----- | Warn on local definitions of names that would clash with future Prelude--- elements.------ A name clashes if the following criteria are met:--- 1. It would is imported (unqualified) from Prelude--- 2. It is locally defined in the current module--- 3. It has the same literal name as the reference function--- 4. It is not identical to the reference function-tcPreludeClashWarn :: WarningFlag- -> Name- -> TcM ()-tcPreludeClashWarn warnFlag name = do- { warn <- woptM warnFlag- ; when warn $ do- { traceTc "tcPreludeClashWarn/wouldBeImported" empty- -- Is the name imported (unqualified) from Prelude? (Point 4 above)- ; rnImports <- fmap (map unLoc . tcg_rn_imports) getGblEnv- -- (Note that this automatically handles -XNoImplicitPrelude, as Prelude- -- will not appear in rnImports automatically if it is set.)-- -- Continue only the name is imported from Prelude- ; when (importedViaPrelude name rnImports) $ do- -- Handle 2.-4.- { rdrElts <- fmap (concat . nonDetOccEnvElts . tcg_rdr_env) getGblEnv-- ; let clashes :: GlobalRdrElt -> Bool- clashes x = isLocalDef && nameClashes && isNotInProperModule- where- isLocalDef = gre_lcl x == True- -- Names are identical ...- nameClashes = nameOccName (greMangledName x) == nameOccName name- -- ... but not the actual definitions, because we don't want to- -- warn about a bad definition of e.g. <> in Data.Semigroup, which- -- is the (only) proper place where this should be defined- isNotInProperModule = greMangledName x /= name-- -- List of all offending definitions- clashingElts :: [GlobalRdrElt]- clashingElts = filter clashes rdrElts-- ; traceTc "tcPreludeClashWarn/prelude_functions"- (hang (ppr name) 4 (sep [ppr clashingElts]))-- ; let warn_msg x = addDiagnosticAt (nameSrcSpan (greMangledName x)) $- mkTcRnUnknownMessage $- mkPlainDiagnostic (WarningWithFlag warnFlag) noHints $ (hsep- [ text "Local definition of"- , (quotes . ppr . nameOccName . greMangledName) x- , text "clashes with a future Prelude name." ]- $$- text "This will become an error in a future release." )- ; mapM_ warn_msg clashingElts- }}}-- where-- -- Is the given name imported via Prelude?- --- -- Possible scenarios:- -- a) Prelude is imported implicitly, issue warnings.- -- b) Prelude is imported explicitly, but without mentioning the name in- -- question. Issue no warnings.- -- c) Prelude is imported hiding the name in question. Issue no warnings.- -- d) Qualified import of Prelude, no warnings.- importedViaPrelude :: Name- -> [ImportDecl GhcRn]- -> Bool- importedViaPrelude name = any importViaPrelude- where- isPrelude :: ImportDecl GhcRn -> Bool- isPrelude imp = unLoc (ideclName imp) == pRELUDE_NAME-- -- Implicit (Prelude) import?- isImplicit :: ImportDecl GhcRn -> Bool- isImplicit = ideclImplicit . ideclExt-- -- Unqualified import?- isUnqualified :: ImportDecl GhcRn -> Bool- isUnqualified = not . isImportDeclQualified . ideclQualified-- -- List of explicitly imported (or hidden) Names from a single import.- -- Nothing -> No explicit imports- -- Just (False, <names>) -> Explicit import list of <names>- -- Just (True , <names>) -> Explicit hiding of <names>- importListOf :: ImportDecl GhcRn -> Maybe (ImportListInterpretation, [Name])- importListOf = fmap toImportList . ideclImportList- where- toImportList (h, loc) = (h, map (ieName . unLoc) (unLoc loc))-- isExplicit :: ImportDecl GhcRn -> Bool- isExplicit x = case importListOf x of- Nothing -> False- Just (Exactly, explicit)- -> nameOccName name `elem` map nameOccName explicit- Just (EverythingBut, hidden)- -> nameOccName name `notElem` map nameOccName hidden-- -- Check whether the given name would be imported (unqualified) from- -- an import declaration.- importViaPrelude :: ImportDecl GhcRn -> Bool- importViaPrelude x = isPrelude x- && isUnqualified x- && (isImplicit x || isExplicit x)----- Notation: is* is for classes the type is an instance of, should* for those--- that it should also be an instance of based on the corresponding--- is*.-tcMissingParentClassWarn :: WarningFlag- -> Name -- ^ Instances of this ...- -> Name -- ^ should also be instances of this- -> TcM ()-tcMissingParentClassWarn warnFlag isName shouldName- = do { warn <- woptM warnFlag- ; when warn $ do- { traceTc "tcMissingParentClassWarn" empty- ; isClass' <- tcLookupClass_maybe isName- ; shouldClass' <- tcLookupClass_maybe shouldName- ; case (isClass', shouldClass') of- (Just isClass, Just shouldClass) -> do- { localInstances <- tcGetInsts- ; let isInstance m = is_cls m == isClass- isInsts = filter isInstance localInstances- ; traceTc "tcMissingParentClassWarn/isInsts" (ppr isInsts)- ; forM_ isInsts (checkShouldInst isClass shouldClass)- }- (is',should') ->- traceTc "tcMissingParentClassWarn/notIsShould"- (hang (ppr isName <> text "/" <> ppr shouldName) 2 (- (hsep [ quotes (text "Is"), text "lookup for"- , ppr isName- , text "resulted in", ppr is' ])- $$- (hsep [ quotes (text "Should"), text "lookup for"- , ppr shouldName- , text "resulted in", ppr should' ])))- }}- where- -- Check whether the desired superclass exists in a given environment.- checkShouldInst :: Class -- Class of existing instance- -> Class -- Class there should be an instance of- -> ClsInst -- Existing instance- -> TcM ()- checkShouldInst isClass shouldClass isInst- = do { instEnv <- tcGetInstEnvs- ; let (instanceMatches, shouldInsts, _)- = lookupInstEnv False instEnv shouldClass (is_tys isInst)-- ; traceTc "tcMissingParentClassWarn/checkShouldInst"- (hang (ppr isInst) 4- (sep [ppr instanceMatches, ppr shouldInsts]))-- -- "<location>: Warning: <type> is an instance of <is> but not- -- <should>" e.g. "Foo is an instance of Monad but not Applicative"- ; let instLoc = srcLocSpan . nameSrcLoc $ getName isInst- warnMsg (RM_KnownTc name:_) =- addDiagnosticAt instLoc $- mkTcRnUnknownMessage $ mkPlainDiagnostic (WarningWithFlag warnFlag) noHints $- hsep [ (quotes . ppr . nameOccName) name- , text "is an instance of"- , (ppr . nameOccName . className) isClass- , text "but not"- , (ppr . nameOccName . className) shouldClass ]- <> text "."- $$- hsep [ text "This will become an error in"- , text "a future release." ]- warnMsg _ = pure ()- ; when (nullUnifiers shouldInsts && null instanceMatches) $- warnMsg (is_tcs isInst)- }-- tcLookupClass_maybe :: Name -> TcM (Maybe Class)- tcLookupClass_maybe name = tcLookupImported_maybe name >>= \case- Succeeded (ATyCon tc) | cls@(Just _) <- tyConClass_maybe tc -> pure cls- _else -> pure Nothing-------------------------------tcTyClsInstDecls :: [TyClGroup GhcRn]- -> [LDerivDecl GhcRn]- -> [(RecFlag, LHsBinds GhcRn)]- -> TcM (TcGblEnv, -- The full inst env- [InstInfo GhcRn], -- Source-code instance decls to- -- process; contains all dfuns for- -- this module- ThBindEnv, -- TH binding levels- HsValBinds GhcRn) -- Supporting bindings for derived- -- instances--tcTyClsInstDecls tycl_decls deriv_decls binds- = tcAddDataFamConPlaceholders (tycl_decls >>= group_instds) $- tcAddPatSynPlaceholders (getPatSynBinds binds) $- do { (tcg_env, inst_info, deriv_info, th_bndrs)- <- tcTyAndClassDecls tycl_decls ;- ; setGblEnv tcg_env $ do {- -- With the @TyClDecl@s and @InstDecl@s checked we're ready to- -- process the deriving clauses, including data family deriving- -- clauses discovered in @tcTyAndClassDecls@.- --- -- Careful to quit now in case there were instance errors, so that- -- the deriving errors don't pile up as well.- ; failIfErrsM- ; (tcg_env', inst_info', val_binds)- <- tcInstDeclsDeriv deriv_info deriv_decls- ; setGblEnv tcg_env' $ do {- failIfErrsM- ; pure ( tcg_env', inst_info' ++ inst_info, th_bndrs, val_binds )- }}}--{- *********************************************************************-* *- Checking for 'main'-* *-************************************************************************--}--checkMainType :: TcGblEnv -> TcRn WantedConstraints--- If this is the Main module, and it defines a function main,--- check that its type is of form IO tau.--- If not, do nothing--- See Note [Dealing with main]-checkMainType tcg_env- = do { hsc_env <- getTopEnv- ; if tcg_mod tcg_env /= mainModIs (hsc_HUE hsc_env)- then return emptyWC else-- do { rdr_env <- getGlobalRdrEnv- ; let dflags = hsc_dflags hsc_env- main_occ = getMainOcc dflags- main_gres = lookupGlobalRdrEnv rdr_env main_occ- ; case filter isLocalGRE main_gres of {- [] -> return emptyWC ;- (_:_:_) -> return emptyWC ;- [main_gre] ->-- do { let main_name = greMangledName main_gre- ctxt = FunSigCtxt main_name NoRRC- ; main_id <- tcLookupId main_name- ; (io_ty,_) <- getIOType- ; let main_ty = idType main_id- eq_orig = TypeEqOrigin { uo_actual = main_ty- , uo_expected = io_ty- , uo_thing = Nothing- , uo_visible = True }- ; (_, lie) <- captureTopConstraints $- setMainCtxt main_name io_ty $- tcSubTypeSigma eq_orig ctxt main_ty io_ty- ; return lie } } } }--checkMain :: Bool -- False => no 'module M(..) where' header at all- -> Maybe (LocatedL [LIE GhcPs]) -- Export specs of Main module- -> TcM TcGblEnv--- If we are in module Main, check that 'main' is exported,--- and generate the runMainIO binding that calls it--- See Note [Dealing with main]-checkMain explicit_mod_hdr export_ies- = do { hsc_env <- getTopEnv- ; tcg_env <- getGblEnv-- ; let dflags = hsc_dflags hsc_env- main_mod = mainModIs (hsc_HUE hsc_env)- main_occ = getMainOcc dflags-- exported_mains :: [Name]- -- Exported things that are called 'main'- exported_mains = [ name | avail <- tcg_exports tcg_env- , name <- availNames avail- , nameOccName name == main_occ ]-- ; if | tcg_mod tcg_env /= main_mod- -> -- Not the main module- return tcg_env-- | [main_name] <- exported_mains- -> -- The module indeed exports a function called 'main'- generateMainBinding tcg_env main_name-- | otherwise- -> assert (null exported_mains) $- -- A fully-checked export list can't contain more- -- than one function with the same OccName- do { complain_no_main dflags main_mod main_occ- ; return tcg_env } }- where- complain_no_main dflags main_mod main_occ- = unless (interactive && not explicit_mod_hdr) $- addErrTc (noMainMsg main_mod main_occ) -- #12906- where- interactive = ghcLink dflags == LinkInMemory- -- Without an explicit module header...- -- in interactive mode, don't worry about the absence of 'main'.- -- in other modes, add error message and go on with typechecking.-- noMainMsg main_mod main_occ- = mkTcRnUnknownMessage $ mkPlainError noHints $- text "The" <+> ppMainFn main_occ- <+> text "is not" <+> text defOrExp <+> text "module"- <+> quotes (ppr main_mod)-- defOrExp | explicit_export_list = "exported by"- | otherwise = "defined in"- explicit_export_list = explicit_mod_hdr && isJust export_ies---- | Get the unqualified name of the function to use as the \"main\" for the main module.--- Either returns the default name or the one configured on the command line with -main-is-getMainOcc :: DynFlags -> OccName-getMainOcc dflags = case mainFunIs dflags of- Just fn -> mkVarOccFS (mkFastString fn)- Nothing -> mainOcc--ppMainFn :: OccName -> SDoc-ppMainFn main_occ- | main_occ == mainOcc- = text "IO action" <+> quotes (ppr main_occ)- | otherwise- = text "main IO action" <+> quotes (ppr main_occ)--mainOcc :: OccName-mainOcc = mkVarOccFS (fsLit "main")--generateMainBinding :: TcGblEnv -> Name -> TcM TcGblEnv--- There is a single exported 'main' function, called 'foo' (say),--- which may be locally defined or imported--- Define and typecheck the binding--- :Main.main :: IO res_ty = runMainIO res_ty foo--- This wraps the user's main function in the top-level stuff--- defined in runMainIO (eg catching otherwise un-caught exceptions)--- See Note [Dealing with main]-generateMainBinding tcg_env main_name = do- { traceTc "checkMain found" (ppr main_name)- ; (io_ty, res_ty) <- getIOType- ; let loc = getSrcSpan main_name- main_expr_rn = L (noAnnSrcSpan loc) (HsVar noExtField (L (noAnnSrcSpan loc) main_name))- ; (ev_binds, main_expr) <- setMainCtxt main_name io_ty $- tcCheckMonoExpr main_expr_rn io_ty-- -- See Note [Root-main Id]- -- Construct the binding- -- :Main.main :: IO res_ty = runMainIO res_ty main- ; run_main_id <- tcLookupId runMainIOName- ; let { root_main_name = mkExternalName rootMainKey rOOT_MAIN- (mkVarOccFS (fsLit "main"))- (getSrcSpan main_name)- ; root_main_id = Id.mkExportedVanillaId root_main_name io_ty- ; co = mkWpTyApps [res_ty]- -- The ev_binds of the `main` function may contain deferred- -- type errors 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 #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- , tcg_binds = tcg_binds tcg_env- `snocBag` main_bind- , tcg_dus = tcg_dus tcg_env- `plusDU` usesOnly (unitFV main_name) })- -- Record the use of 'main', so that we don't- -- complain about it being defined but not used- }--getIOType :: TcM (TcType, TcType)--- Return (IO alpha, alpha) for fresh alpha-getIOType = do { ioTyCon <- tcLookupTyCon ioTyConName- ; res_ty <- newFlexiTyVarTy liftedTypeKind- ; return (mkTyConApp ioTyCon [res_ty], res_ty) }--setMainCtxt :: Name -> TcType -> TcM a -> TcM (TcEvBinds, a)-setMainCtxt main_name io_ty thing_inside- = setSrcSpan (getSrcSpan main_name) $- addErrCtxt main_ctxt $- checkConstraints skol_info [] [] $ -- Builds an implication if necessary- thing_inside -- e.g. with -fdefer-type-errors- where- skol_info = SigSkol (FunSigCtxt main_name NoRRC) io_ty []- main_ctxt = text "When checking the type of the"- <+> ppMainFn (nameOccName main_name)--{- Note [Dealing with main]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-Dealing with the 'main' declaration is surprisingly tricky. Here are-the moving parts:--* The flag -main-is=M.foo allows you to set the main module to 'M',- and the main function to 'foo'. We access them through- mainModIs :: HscEnv -> Module -- returns M- getMainOcc :: DynFlags -> OccName -- returns foo- Of course usually M = Main, and foo = main.--* checkMainType: when typechecking module M, we add an extra check that- foo :: IO tau, for some type tau.- This avoids getting ambiguous-type errors from the monomorphism restriction- applying to things like- main = return ()- Note that checkMainType does not consult the export list because- we have not yet done rnExports (and can't do it until later).--* rnExports: checks the export list. Very annoyingly, we can only do- this after running any finalisers, which may add new declarations.- That's why checkMainType and checkMain have to be separate.--* checkMain: does two things:- - check that the export list does indeed export something called 'foo'- - generateMainBinding: generate the root-main binding- :Main.main = runMainIO M.foo- See Note [Root-main Id]--An annoying consequence of having both checkMainType and checkMain is-that, when (but only when) -fdefer-type-errors is on, we may report an-ill-typed 'main' twice (as warnings): once in checkMainType and once-in checkMain. See test typecheck/should_fail/T13292.--We have the following tests to check this processing:-----------------+----------------------------------------------------------------------------------+- | Module Header: |- +-------------+-------------+-------------+-------------+-------------+------------+- | module | module Main | <No Header> | module Main |module |module Main |- | Main(main) | | | (module X)| Main () | (Sub.main)|-----------------+==================================================================================+-`main` function | ERROR: | Main.main | ERROR: | Main.main | ERROR: | Sub.main |-in Main module | Ambiguous | | Ambiguous | | `main` not | |-and in imported | | | | | exported | |-module Sub. | T19397E1 | T16453M0 | T19397E2 | T16453M3 | | T16453M1 |- | | | | X = Main | Remark 2) | |-----------------+-------------+-------------+-------------+-------------+-------------+------------+-`main`function | Sub.main | ERROR: | Sub.main | Sub.main | ERROR: | Sub.main |-only in imported| | No `main` in| | | `main` not | |-submodule Sub. | | `Main` | | | exported | |- | T19397M0 | T16453E1 | T19397M1 | T16453M4 | | T16453M5 |- | | | | X = Sub | Remark 2) | |-----------------+-------------+-------------+-------------+-------------+-------------+------------+-`foo` function | Sub.foo | ERROR: | Sub.foo | Sub.foo | ERROR: | Sub.foo |-in submodule | | No `foo` in | | | `foo` not | |-Sub. | | `Main` | | | exported | |-GHC option: | | | | | | |- -main-is foo | T19397M2 | T19397E3 | T19397M3 | T19397M4 | T19397E4 | T16453M6 |- | Remark 1) | | | X = Sub | | Remark 3) |-----------------+-------------+-------------+-------------+-------------+-------------+------------+--Remarks:-* The first line shows the exported `main` function or the error.-* The second line shows the coresponding test case.-* The module `Sub` contains the following functions:- main :: IO ()- foo :: IO ()-* Remark 1) Here the header is `Main (foo)`.-* Remark 2) Here we have no extra test case. It would exercise the same code path as `T19397E4`.-* Remark 3) Here the header is `Main (Sub.foo)`.---Note [Root-main Id]-~~~~~~~~~~~~~~~~~~~-The function that the RTS invokes is always :Main.main, which we call-root_main_id. (Because GHC allows the user to have a module not-called Main as the main module, we can't rely on the main function-being called "Main.main". That's why root_main_id has a fixed module-":Main".)--This is unusual: it's a LocalId whose Name has a Module from another-module. Tiresomely, we must filter it out again in GHC.Iface.Make, less we-get two defns for 'main' in the interface file!--When using `-fwrite-if-simplified-core` the root_main_id can end up in an interface file.-When the interface is read back in we have to add a special case when creating the-Id because otherwise we would go looking for the :Main module which obviously doesn't-exist. For this logic see GHC.IfaceToCore.mk_top_id.--There is also some similar (probably dead) logic in GHC.Rename.Env which says it-was added for External Core which faced a similar issue.---*********************************************************-* *- GHCi stuff-* *-*********************************************************--}--runTcInteractive :: HscEnv -> TcRn a -> IO (Messages TcRnMessage, Maybe a)--- Initialise the tcg_inst_env with instances from all home modules.--- This mimics the more selective call to hptInstances in tcRnImports-runTcInteractive hsc_env thing_inside- = initTcInteractive hsc_env $ withTcPlugins hsc_env $- withDefaultingPlugins hsc_env $ withHoleFitPlugins hsc_env $- do { traceTc "setInteractiveContext" $- vcat [ text "ic_tythings:" <+> vcat (map ppr (ic_tythings icxt))- , text "ic_insts:" <+> vcat (map (pprBndr LetBind . instanceDFunId) (instEnvElts ic_insts))- , text "icReaderEnv (LocalDef)" <+>- vcat (map ppr [ local_gres | gres <- nonDetOccEnvElts (icReaderEnv icxt)- , let local_gres = filter isLocalGRE gres- , not (null local_gres) ]) ]-- ; let getOrphans m mb_pkg = fmap (\iface -> mi_module iface- : dep_orphs (mi_deps iface))- (loadSrcInterface (text "runTcInteractive") m- NotBoot mb_pkg)-- ; !orphs <- fmap (force . concat) . forM (ic_imports icxt) $ \i ->- case i of -- force above: see #15111- IIModule n -> getOrphans n NoPkgQual- IIDecl i -> getOrphans (unLoc (ideclName i))- (renameRawPkgQual (hsc_unit_env hsc_env) (unLoc $ ideclName i) (ideclPkgQual i))-- ; let imports = emptyImportAvails { imp_orphs = orphs }-- upd_envs (gbl_env, lcl_env) = (gbl_env', lcl_env')- where- gbl_env' = gbl_env { tcg_rdr_env = icReaderEnv icxt- , tcg_type_env = type_env-- , tcg_inst_env = tcg_inst_env gbl_env `unionInstEnv` ic_insts `unionInstEnv` home_insts- , tcg_fam_inst_env = extendFamInstEnvList- (extendFamInstEnvList (tcg_fam_inst_env gbl_env)- ic_finsts)- home_fam_insts- , tcg_field_env = mkNameEnv con_fields- -- setting tcg_field_env is necessary- -- to make RecordWildCards work (test: ghci049)- , tcg_fix_env = ic_fix_env icxt- , tcg_default = ic_default icxt- -- must calculate imp_orphs of the ImportAvails- -- so that instance visibility is done correctly- , tcg_imports = imports }-- lcl_env' = tcExtendLocalTypeEnv lcl_env lcl_ids-- ; updEnvs upd_envs thing_inside }- where- (home_insts, home_fam_insts) = hptAllInstances hsc_env-- icxt = hsc_IC hsc_env- (ic_insts, ic_finsts) = ic_instances icxt- (lcl_ids, top_ty_things) = partitionWith is_closed (ic_tythings icxt)-- is_closed :: TyThing -> Either (Name, TcTyThing) TyThing- -- Put Ids with free type variables (always RuntimeUnks)- -- in the *local* type environment- -- See Note [Initialising the type environment for GHCi]- is_closed thing- | AnId id <- thing- , not (isTypeClosedLetBndr id)- = Left (idName id, ATcId { tct_id = id- , tct_info = NotLetBound })- | otherwise- = Right thing-- type_env1 = mkTypeEnvWithImplicits top_ty_things- type_env = extendTypeEnvWithIds type_env1 (map instanceDFunId (instEnvElts ic_insts))- -- Putting the dfuns in the type_env- -- is just to keep Core Lint happy-- con_fields = [ (dataConName c, dataConFieldLabels c)- | ATyCon t <- top_ty_things- , c <- tyConDataCons t ]---{- Note [Initialising the type environment for GHCi]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-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--However the GHCi debugger creates top-level bindings for Ids whose-types have free RuntimeUnk skolem variables, standing for unknown-types. If we don't register these free TyVars as global TyVars then-the typechecker will try to quantify over them and fall over in-skolemiseQuantifiedTyVar. so we must add any free TyVars to the-typechecker's global TyVar set. That is done by using-tcExtendLocalTypeEnv.--We do this by splitting out the Ids with open types, using 'is_closed'-to do the partition. The top-level things go in the global TypeEnv;-the open, NotTopLevel, Ids, with free RuntimeUnk tyvars, go in the-local TypeEnv.--Note that we don't extend the local RdrEnv (tcl_rdr); all the in-scope-things are already in the interactive context's GlobalRdrEnv.-Extending the local RdrEnv isn't terrible, but it means there is an-entry for the same Name in both global and local RdrEnvs, and that-lead to duplicate "perhaps you meant..." suggestions (e.g. T5564).--We don't bother with the tcl_th_bndrs environment either.--}---- | The returned [Id] is the list of new Ids bound by this statement. It can--- be used to extend the InteractiveContext via extendInteractiveContext.------ The returned TypecheckedHsExpr is of type IO [ () ], a list of the bound--- values, coerced to ().-tcRnStmt :: HscEnv -> GhciLStmt GhcPs- -> IO (Messages TcRnMessage, Maybe ([Id], LHsExpr GhcTc, FixityEnv))-tcRnStmt hsc_env rdr_stmt- = runTcInteractive hsc_env $ do {-- -- The real work is done here- ((bound_ids, tc_expr), fix_env) <- tcUserStmt rdr_stmt ;- zonked_expr <- zonkTopLExpr tc_expr ;- zonked_ids <- zonkTopBndrs bound_ids ;-- failIfErrsM ; -- we can't do the next step if there are- -- representation polymorphism errors- -- test case: ghci/scripts/T13202{,a}-- -- None of the Ids should be of unboxed type, because we- -- cast them all to HValues in the end!- mapM_ bad_unboxed (filter (mightBeUnliftedType . idType) zonked_ids) ;-- traceTc "tcs 1" empty ;- this_mod <- getModule ;- global_ids <- mapM (externaliseAndTidyId this_mod) zonked_ids ;- -- Note [Interactively-bound Ids in GHCi] in GHC.Driver.Env-- traceOptTcRn Opt_D_dump_tc- (vcat [text "Bound Ids" <+> pprWithCommas ppr global_ids,- text "Typechecked expr" <+> ppr zonked_expr]) ;-- return (global_ids, zonked_expr, fix_env)- }- where- bad_unboxed id = addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- (sep [text "GHCi can't bind a variable of unlifted type:",- nest 2 (pprPrefixOcc id <+> dcolon <+> ppr (idType id))])--{----------------------------------------------------------------------------- Typechecking Stmts in GHCi--Here is the grand plan, implemented in tcUserStmt-- What you type The IO [HValue] that hscStmt returns- ------------- ------------------------------------- let pat = expr ==> let pat = expr in return [coerce HVal x, coerce HVal y, ...]- bindings: [x,y,...]-- pat <- expr ==> expr >>= \ pat -> return [coerce HVal x, coerce HVal y, ...]- bindings: [x,y,...]-- expr (of IO type) ==> expr >>= \ it -> return [coerce HVal it]- [NB: result not printed] bindings: [it]-- expr (of non-IO type, ==> let it = expr in print it >> return [coerce HVal it]- result showable) bindings: [it]-- expr (of non-IO type,- result not showable) ==> error--}---- | A plan is an attempt to lift some code into the IO monad.-type PlanResult = ([Id], LHsExpr GhcTc)-type Plan = TcM PlanResult---- | Try the plans in order. If one fails (by raising an exn), try the next.--- If one succeeds, take it.-runPlans :: NonEmpty Plan -> Plan-runPlans = foldr1 (flip tryTcDiscardingErrs)---- | Typecheck (and 'lift') a stmt entered by the user in GHCi into the--- GHCi 'environment'.------ By 'lift' and 'environment we mean that the code is changed to--- execute properly in an IO monad. See Note [Interactively-bound Ids--- in GHCi] in GHC.Driver.Env for more details. We do this lifting by trying--- different ways ('plans') of lifting the code into the IO monad and--- type checking each plan until one succeeds.-tcUserStmt :: GhciLStmt GhcPs -> TcM (PlanResult, FixityEnv)---- An expression typed at the prompt is treated very specially-tcUserStmt (L loc (BodyStmt _ expr _ _))- = do { (rn_expr, fvs) <- checkNoErrs (rnLExpr expr)-- ; dumpOptTcRn Opt_D_dump_rn_ast "Renamer" FormatHaskell- (showAstData NoBlankSrcSpan NoBlankEpAnnotations rn_expr)- -- Don't try to typecheck if the renamer fails!- ; ghciStep <- getGhciStepIO- ; uniq <- newUnique- ; let loc' = noAnnSrcSpan $ locA loc- ; interPrintName <- getInteractivePrintName- ; let fresh_it = itName uniq (locA loc)- matches = [mkMatch (mkPrefixFunRhs (L loc' fresh_it)) [] rn_expr- emptyLocalBinds]- -- [it = expr]- 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 noAnn $ HsValBinds noAnn- $ XValBindsLR- (NValBinds [(NonRecursive,unitBag the_bind)] [])-- -- [it <- e]- bind_stmt = L loc $ BindStmt- (XBindStmtRn- { xbsrn_bindOp = mkRnSyntaxExpr bindIOName- , xbsrn_failOp = Nothing- })- (L loc (VarPat noExtField (L loc' fresh_it)))- (nlHsApp ghciStep rn_expr)-- -- [; print it]- print_it = L loc $ BodyStmt noExtField- (nlHsApp (nlHsVar interPrintName)- (nlHsVar fresh_it))- (mkRnSyntaxExpr thenIOName)- noSyntaxExpr-- -- NewA- no_it_a = L loc $ BodyStmt noExtField (nlHsApps bindIOName- [rn_expr , nlHsVar interPrintName])- (mkRnSyntaxExpr thenIOName)- noSyntaxExpr-- no_it_b = L loc $ BodyStmt noExtField (rn_expr)- (mkRnSyntaxExpr thenIOName)- noSyntaxExpr-- no_it_c = L loc $ BodyStmt noExtField- (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)- ; when (isUnitTy it_ty) failM- ; return stuff } :|-- -- Plan B; a naked bind statement- [ tcGhciStmts [bind_stmt]-- -- Plan C; check that the let-binding is typeable all by itself.- -- If not, fail; if so, try to print it.- -- The two-step process avoids getting two errors: one from- -- the expression itself, and one from the 'print it' part- -- This two-step story is very clunky, alas- , do { _ <- checkNoErrs (tcGhciStmts [let_stmt])- --- 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-- ; dumpOptTcRn Opt_D_dump_tc_ast "Typechecker AST" FormatHaskell- (showAstData NoBlankSrcSpan NoBlankEpAnnotations plan)-- ; 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.--#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 discussion in #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 (HsDoStmt GhciStmtCtxt) rnExpr [rdr_stmt] $ \_ -> do- fix_env <- getFixityEnv- return (fix_env, emptyFVs)- -- Don't try to typecheck if the renamer fails!- ; traceRn "tcRnStmt" (vcat [ppr rdr_stmt, ppr rn_stmt, ppr fvs])- ; rnDump rn_stmt ;-- ; ghciStep <- getGhciStepIO- ; let gi_stmt- | (L loc (BindStmt x pat expr)) <- rn_stmt- = L loc $ BindStmt x pat (nlHsApp ghciStep expr)- | otherwise = rn_stmt-- ; opt_pr_flag <- goptM Opt_PrintBindResult- ; let print_result_plan- | opt_pr_flag -- The flag says "print result"- , [v] <- collectLStmtBinders CollNoDictBinders gi_stmt -- One binder- = Just $ mk_print_result_plan gi_stmt v- | otherwise = Nothing-- -- The plans are:- -- [stmt; print v] if one binder and not v::()- -- [stmt] otherwise- ; plan <- runPlans $ maybe id (NE.<|) print_result_plan $ NE.singleton $ tcGhciStmts [gi_stmt]- ; return (plan, fix_env) }- where- mk_print_result_plan stmt v- = do { stuff@([v_id], _) <- tcGhciStmts [stmt, print_v]- ; v_ty <- zonkTcType (idType v_id)- ; when (isUnitTy v_ty || not (isTauTy v_ty)) failM- ; return stuff }- where- print_v = L loc $ BodyStmt noExtField (nlHsApp (nlHsVar printName)- (nlHsVar v))- (mkRnSyntaxExpr thenIOName) noSyntaxExpr--{--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-tcGhciStmts stmts- = do { ioTyCon <- tcLookupTyCon ioTyConName- ; ret_id <- tcLookupId returnIOName -- return @ IO- ; let ret_ty = mkListTy unitTy- io_ret_ty = mkTyConApp ioTyCon [ret_ty]- tc_io_stmts = tcStmtsAndThen (HsDoStmt GhciStmtCtxt) tcDoStmt stmts- (mkCheckExpType io_ret_ty)- names = collectLStmtsBinders CollNoDictBinders stmts-- -- OK, we're ready to typecheck the stmts- ; traceTc "GHC.Tc.Module.tcGhciStmts: tc stmts" empty- ; ((tc_stmts, ids), lie) <- captureTopConstraints $- tc_io_stmts $ \ _ ->- mapM tcLookupId names- -- Look up the names right in the middle,- -- where they will all be in scope-- -- Simplify the context- ; traceTc "GHC.Tc.Module.tcGhciStmts: simplify ctxt" empty- ; const_binds <- checkNoErrs (simplifyInteractive lie)- -- checkNoErrs ensures that the plan fails if context redn fails--- ; traceTc "GHC.Tc.Module.tcGhciStmts: done" empty-- -- ret_expr is the expression- -- returnIO @[()] [unsafeCoerce# () x, .., unsafeCoerce# () z]- --- -- Despite the inconvenience of building the type applications etc,- -- this *has* to be done in type-annotated post-typecheck form- -- because we are going to return a list of *polymorphic* values- -- coerced to type (). If we built a *source* stmt- -- return [coerce x, ..., coerce z]- -- then the type checker would instantiate x..z, and we wouldn't- -- get their *polymorphic* values. (And we'd get ambiguity errs- -- if they were overloaded, since they aren't applied to anything.)-- ; AnId unsafe_coerce_id <- tcLookupGlobal unsafeCoercePrimName- -- We use unsafeCoerce# here because of (U11) in- -- Note [Implementing unsafeCoerce] in base:Unsafe.Coerce-- ; let ret_expr = nlHsApp (nlHsTyApp ret_id [ret_ty]) $- noLocA $ ExplicitList unitTy $- map mk_item ids-- mk_item id = unsafe_coerce_id `nlHsTyApp` [ getRuntimeRep (idType id)- , getRuntimeRep unitTy- , idType id, unitTy]- `nlHsApp` nlHsVar id- stmts = tc_stmts ++ [noLocA (mkLastStmt ret_expr)]-- ; return (ids, mkHsDictLet (EvBinds const_binds) $- noLocA (HsDo io_ret_ty GhciStmtCtxt (noLocA stmts)))- }---- | Generate a typed ghciStepIO expression (ghciStep :: Ty a -> IO a)-getGhciStepIO :: TcM (LHsExpr GhcRn)-getGhciStepIO = do- ghciTy <- getGHCiMonad- a_tv <- newName (mkTyVarOccFS (fsLit "a"))- let ghciM = nlHsAppTy (nlHsTyVar NotPromoted ghciTy) (nlHsTyVar NotPromoted a_tv)- ioM = nlHsAppTy (nlHsTyVar NotPromoted ioTyConName) (nlHsTyVar NotPromoted a_tv)-- step_ty :: LHsSigType GhcRn- step_ty = noLocA $ HsSig- { sig_bndrs = HsOuterImplicit{hso_ximplicit = [a_tv]}- , sig_ext = noExtField- , sig_body = nlHsFunTy ghciM ioM }-- stepTy :: LHsSigWcType GhcRn- stepTy = mkEmptyWildCardBndrs step_ty-- return (noLocA $ ExprWithTySig noExtField (nlHsVar ghciStepIoMName) stepTy)--isGHCiMonad :: HscEnv -> String -> IO (Messages TcRnMessage, Maybe Name)-isGHCiMonad hsc_env ty- = runTcInteractive hsc_env $ do- rdrEnv <- getGlobalRdrEnv- let occIO = lookupOccEnv rdrEnv (mkOccName tcName ty)- case occIO of- Just [n] -> do- let name = greMangledName n- ghciClass <- tcLookupClass ghciIoClassName- userTyCon <- tcLookupTyCon name- let userTy = mkTyConApp userTyCon []- _ <- tcLookupInstance ghciClass [userTy]- return name-- Just _ -> failWithTc $ mkTcRnUnknownMessage $ mkPlainError noHints $ text "Ambiguous type!"- Nothing -> failWithTc $ mkTcRnUnknownMessage $ mkPlainError noHints $ text ("Can't find type:" ++ ty)---- | How should we infer a type? See Note [TcRnExprMode]-data TcRnExprMode = TM_Inst -- ^ Instantiate inferred quantifiers only (:type)- | TM_Default -- ^ Instantiate all quantifiers,- -- and do eager defaulting (:type +d)---- | tcRnExpr just finds the type of an expression--- for :type-tcRnExpr :: HscEnv- -> TcRnExprMode- -> LHsExpr GhcPs- -> IO (Messages TcRnMessage, Maybe Type)-tcRnExpr hsc_env mode rdr_expr- = runTcInteractive hsc_env $- do {-- (rn_expr, _fvs) <- rnLExpr rdr_expr ;- failIfErrsM ;-- -- Typecheck the expression- ((tclvl, res_ty), lie)- <- captureTopConstraints $- pushTcLevelM $- tcInferSigma inst rn_expr ;-- -- Generalise- uniq <- newUnique ;- let { fresh_it = itName uniq (getLocA rdr_expr) } ;- ((qtvs, dicts, _, _), residual)- <- captureConstraints $- simplifyInfer tclvl infer_mode- [] {- No sig vars -}- [(fresh_it, res_ty)]- lie ;-- -- Ignore the dictionary bindings- _ <- perhaps_disable_default_warnings $- simplifyInteractive residual ;-- let { all_expr_ty = mkInfForAllTys qtvs $- mkPhiTy (map idType dicts) res_ty } ;- ty <- zonkTcType all_expr_ty ;-- -- See Note [Normalising the type in :type]- fam_envs <- tcGetFamInstEnvs ;- let { normalised_type = reductionReducedType $ normaliseType fam_envs Nominal ty- -- normaliseType returns a coercion which we discard, so the Role is irrelevant.- ; final_type = if isSigmaTy res_ty then ty else normalised_type } ;- return final_type }- where- -- Optionally instantiate the type of the expression- -- See Note [TcRnExprMode]- (inst, infer_mode, perhaps_disable_default_warnings) = case mode of- TM_Inst -> (False, NoRestrictions, id)- TM_Default -> (True, EagerDefaulting, unsetWOptM Opt_WarnTypeDefaults)--{- Note [Implementing :type]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider :type const--We want forall a b. a -> b -> a-and not forall {a}{b}. a -> b -> a--The latter is what we'd get if we eagerly instantiated and then-re-generalised with Inferred binders. It makes a difference, because-it tells us we where we can use Visible Type Application (VTA).--And also for :type const @Int-we want forall b. Int -> b -> Int-and not forall {b}. Int -> b -> Int--Solution: use tcInferSigma, which in turn uses tcInferApp, which-has a special case for application chains.--Note [Normalising the type in :type]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In :t <expr> we usually normalise the type (to simplify type functions)-before displaying the result. Reason (see #10321): otherwise we may show-types like- <expr> :: Vec (1+2) Int-rather than the simpler- <expr> :: Vec 3 Int-In GHC.Tc.Gen.Bind.mkInferredPolyId we normalise for a very similar reason.--However this normalisation is less helpful when <expr> is just-an identifier, whose user-written type happens to contain type-function-applications. E.g. (#20974)- test :: F [Monad, A, B] m => m ()-where F is a type family. If we say `:t test`, we'd prefer to see-the type family un-expanded.--We adopt the following ad-hoc solution: if the type inferred for <expr>-(before generalisation, namely res_ty) is a SigmaType (i.e. is not-fully instantiated) then do not normalise; otherwise normalise.-This is not ideal; for example, suppose x :: F Int. Then- :t x-would be normalised because `F Int` is not a SigmaType. But-anything here is ad-hoc, and it's a user-sought improvement.--}-----------------------------tcRnImportDecls :: HscEnv- -> [LImportDecl GhcPs]- -> IO (Messages TcRnMessage, Maybe GlobalRdrEnv)--- Find the new chunk of GlobalRdrEnv created by this list of import--- decls. In contract tcRnImports *extends* the TcGblEnv.-tcRnImportDecls hsc_env import_decls- = runTcInteractive hsc_env $- do { gbl_env <- updGblEnv zap_rdr_env $- tcRnImports hsc_env $ map (,text "is directly imported") import_decls- ; return (tcg_rdr_env gbl_env) }- where- zap_rdr_env gbl_env = gbl_env { tcg_rdr_env = emptyGlobalRdrEnv }---- tcRnType just finds the kind of a type-tcRnType :: HscEnv- -> ZonkFlexi- -> Bool -- Normalise the returned type- -> LHsType GhcPs- -> IO (Messages TcRnMessage, Maybe (Type, Kind))-tcRnType hsc_env flexi normalise rdr_type- = runTcInteractive hsc_env $- setXOptM LangExt.PolyKinds $ -- See Note [Kind-generalise in tcRnType]- do { (HsWC { hswc_ext = wcs, hswc_body = rn_sig_type@(L _ (HsSig{sig_bndrs = outer_bndrs, sig_body = body })) }, _fvs)- -- we are using 'rnHsSigWcType' to bind the unbound type variables- -- and in combination with 'tcOuterTKBndrs' we are able to- -- implicitly quantify them as if the user wrote 'forall' by- -- hand (see #19217). This allows kind check to work in presence- -- of free type variables :- -- ghci> :k [a]- -- [a] :: *- <- rnHsSigWcType GHCiCtx (mkHsWildCardBndrs $ noLocA (mkHsImplicitSigType rdr_type))- -- The type can have wild cards, but no implicit- -- generalisation; e.g. :kind (T _)- ; failIfErrsM-- -- We follow Note [Recipe for checking a signature] in GHC.Tc.Gen.HsType here-- -- Now kind-check the type- -- It can have any rank or kind- -- First bring into scope any wildcards- ; traceTc "tcRnType" (vcat [ppr wcs, ppr rn_sig_type])- ; si <- mkSkolemInfo $ SigTypeSkol (GhciCtxt True)- ; ((_, (ty, kind)), wanted)- <- captureTopConstraints $- pushTcLevelM_ $- bindNamedWildCardBinders wcs $ \ wcs' ->- do { mapM_ emitNamedTypeHole wcs'- ; tcOuterTKBndrs si outer_bndrs $ tcInferLHsTypeUnsaturated body }- -- Since all the wanteds are equalities, the returned bindings will be empty- ; empty_binds <- simplifyTop wanted- ; massertPpr (isEmptyBag empty_binds) (ppr empty_binds)-- -- Do kind generalisation; see Note [Kind-generalise in tcRnType]- ; kvs <- kindGeneralizeAll unkSkol kind-- ; e <- mkEmptyZonkEnv flexi- ; ty <- zonkTcTypeToTypeX e ty-- -- Do validity checking on type- ; checkValidType (GhciCtxt True) ty-- -- Optionally (:k vs :k!) normalise the type. Does two things:- -- normaliseType: expand type-family applications- -- expandTypeSynonyms: expand type synonyms (#18828)- ; fam_envs <- tcGetFamInstEnvs- ; let ty' | normalise = expandTypeSynonyms $ reductionReducedType $- normaliseType fam_envs Nominal ty- | otherwise = ty-- ; traceTc "tcRnExpr" (debugPprType ty $$ debugPprType ty')- ; return (ty', mkInfForAllTys kvs (typeKind ty')) }---{- Note [TcRnExprMode]-~~~~~~~~~~~~~~~~~~~~~~-How should we infer a type when a user asks for the type of an expression e-at the GHCi prompt? We offer 2 different possibilities, described below. Each-considers this example, with -fprint-explicit-foralls enabled. See also-https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0179-printing-foralls.rst--:type / TM_Inst-- In this mode, we report the type obtained by instantiating only the- /inferred/ quantifiers of e's type, solving constraints, and- re-generalising, as discussed in #11376.-- > :type reverse- reverse :: forall a. [a] -> [a]-- -- foo :: forall a f b. (Show a, Num b, Foldable f) => a -> f b -> String- > :type foo @Int- forall f b. (Show Int, Num b, Foldable f) => Int -> f b -> String-- Note that Show Int is still reported, because the solver never got a chance- to see it.--:type +d / TM_Default-- This mode is for the benefit of users who wish to see instantiations- of generalized types, and in particular to instantiate Foldable and- Traversable. In this mode, all type variables (inferred or- specified) are instantiated. Because GHCi uses- -XExtendedDefaultRules, this means that Foldable and Traversable are- defaulted.-- > :type +d reverse- reverse :: forall {a}. [a] -> [a]-- -- foo :: forall a f b. (Show a, Num b, Foldable f) => a -> f b -> String- > :type +d foo @Int- Int -> [Integer] -> String-- Note that this mode can sometimes lead to a type error, if a type variable is- used with a defaultable class but cannot actually be defaulted:-- bar :: (Num a, Monoid a) => a -> a- > :type +d bar- ** error **-- The error arises because GHC tries to default a but cannot find a concrete- type in the defaulting list that is both Num and Monoid. (If this list is- modified to include an element that is both Num and Monoid, the defaulting- would succeed, of course.)-- Note that the variables and constraints are reordered here, because this- is possible during regeneralization. Also note that the variables are- reported as Inferred instead of Specified.--Note [Kind-generalise in tcRnType]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We switch on PolyKinds when kind-checking a user type, so that we will-kind-generalise the type, even when PolyKinds is not otherwise on.-This gives the right default behaviour at the GHCi prompt, where if-you say ":k T", and T has a polymorphic kind, you'd like to see that-polymorphism. Of course. If T isn't kind-polymorphic you won't get-anything unexpected, but the apparent *loss* of polymorphism, for-types that you know are polymorphic, is quite surprising. See Trac-#7688 for a discussion.--Note that the goal is to generalise the *kind of the type*, not-the type itself! Example:- ghci> data SameKind :: k -> k -> Type- ghci> :k SameKind _--We want to get `k -> Type`, not `Any -> Type`, which is what we would-get without kind-generalisation. Note that `:k SameKind` is OK, as-GHC will not instantiate SameKind here, and so we see its full kind-of `forall k. k -> k -> Type`.--************************************************************************-* *- tcRnDeclsi-* *-************************************************************************--tcRnDeclsi exists to allow class, data, and other declarations in GHCi.--}--tcRnDeclsi :: HscEnv- -> [LHsDecl GhcPs]- -> IO (Messages TcRnMessage, Maybe TcGblEnv)-tcRnDeclsi hsc_env local_decls- = runTcInteractive hsc_env $- tcRnSrcDecls False Nothing local_decls--externaliseAndTidyId :: Module -> Id -> TcM Id-externaliseAndTidyId this_mod id- = do { name' <- externaliseName this_mod (idName id)- ; return $ globaliseId id- `setIdName` name'- `setIdType` tidyTopType (idType id) }---{--************************************************************************-* *- More GHCi stuff, to do with browsing and getting info-* *-************************************************************************--}---- | ASSUMES that the module is either in the 'HomePackageTable' or is--- a package module with an interface on disk. If neither of these is--- true, then the result will be an error indicating the interface--- could not be found.-getModuleInterface :: HscEnv -> Module -> IO (Messages TcRnMessage, Maybe ModIface)-getModuleInterface hsc_env mod- = runTcInteractive hsc_env $- loadModuleInterface (text "getModuleInterface") mod--tcRnLookupRdrName :: HscEnv -> LocatedN RdrName- -> IO (Messages TcRnMessage, Maybe [Name])--- ^ Find all the Names that this RdrName could mean, in GHCi-tcRnLookupRdrName hsc_env (L loc rdr_name)- = runTcInteractive hsc_env $- setSrcSpanA loc $- do { -- If the identifier is a constructor (begins with an- -- upper-case letter), then we need to consider both- -- constructor and type class identifiers.- let rdr_names = dataTcOccs rdr_name- ; names_s <- mapM lookupInfoOccRn rdr_names- ; let names = concat names_s- ; when (null names) (addErrTc $ mkTcRnUnknownMessage $ mkPlainError noHints $- (text "Not in scope:" <+> quotes (ppr rdr_name)))- ; return names }--tcRnLookupName :: HscEnv -> Name -> IO (Messages TcRnMessage, Maybe TyThing)-tcRnLookupName hsc_env name- = runTcInteractive hsc_env $- tcRnLookupName' name---- To look up a name we have to look in the local environment (tcl_lcl)--- as well as the global environment, which is what tcLookup does.--- But we also want a TyThing, so we have to convert:--tcRnLookupName' :: Name -> TcRn TyThing-tcRnLookupName' name = do- tcthing <- tcLookup name- case tcthing of- AGlobal thing -> return thing- ATcId{tct_id=id} -> return (AnId id)- _ -> panic "tcRnLookupName'"--tcRnGetInfo :: HscEnv- -> Name- -> IO ( Messages TcRnMessage- , Maybe (TyThing, Fixity, [ClsInst], [FamInst], SDoc))---- Used to implement :info in GHCi------ Look up a RdrName and return all the TyThings it might be--- A capitalised RdrName is given to us in the DataName namespace,--- but we want to treat it as *both* a data constructor--- *and* as a type or class constructor;--- hence the call to dataTcOccs, and we return up to two results-tcRnGetInfo hsc_env name- = runTcInteractive hsc_env $- do { loadUnqualIfaces hsc_env (hsc_IC hsc_env)- -- Load the interface for all unqualified types and classes- -- That way we will find all the instance declarations- -- (Packages have not orphan modules, and we assume that- -- in the home package all relevant modules are loaded.)-- ; thing <- tcRnLookupName' name- ; fixity <- lookupFixityRn name- ; (cls_insts, fam_insts) <- lookupInsts thing- ; let info = lookupKnownNameInfo name- ; return (thing, fixity, cls_insts, fam_insts, info) }----- Lookup all class and family instances for a type constructor.------ This function filters all instances in the type environment, so there--- is a lot of duplicated work if it is called many times in the same--- type environment. If this becomes a problem, the NameEnv computed--- in GHC.getNameToInstancesIndex could be cached in TcM and both functions--- could be changed to consult that index.-lookupInsts :: TyThing -> TcM ([ClsInst],[FamInst])-lookupInsts (ATyCon tc)- = do { InstEnvs { ie_global = pkg_ie, ie_local = home_ie, ie_visible = vis_mods } <- tcGetInstEnvs- ; (pkg_fie, home_fie) <- tcGetFamInstEnvs- -- Load all instances for all classes that are- -- in the type environment (which are all the ones- -- we've seen in any interface file so far)-- -- Return only the instances relevant to the given thing, i.e.- -- the instances whose head contains the thing's name.- ; let cls_insts =- [ ispec -- Search all- | ispec <- instEnvElts home_ie ++ instEnvElts pkg_ie- , instIsVisible vis_mods ispec- , tc_name `elemNameSet` orphNamesOfClsInst ispec ]- ; let fam_insts =- [ fispec- | fispec <- famInstEnvElts home_fie ++ famInstEnvElts pkg_fie- , tc_name `elemNameSet` orphNamesOfFamInst fispec ]- ; return (cls_insts, fam_insts) }- where- tc_name = tyConName tc--lookupInsts _ = return ([],[])--loadUnqualIfaces :: HscEnv -> InteractiveContext -> TcM ()--- Load the interface for everything that is in scope unqualified--- This is so that we can accurately report the instances for--- something-loadUnqualIfaces hsc_env ictxt- = initIfaceTcRn $- mapM_ (loadSysInterface doc) (moduleSetElts (mkModuleSet unqual_mods))- where- home_unit = hsc_home_unit hsc_env-- unqual_mods = [ nameModule name- | gre <- globalRdrEnvElts (icReaderEnv ictxt)- , let name = greMangledName gre- , nameIsFromExternalPackage home_unit name- , isTcOcc (nameOccName name) -- Types and classes only- , unQualOK gre ] -- In scope unqualified- doc = text "Need interface for module whose export(s) are in scope unqualified"----{--************************************************************************-* *- Debugging output- This is what happens when you do -ddump-types-* *-************************************************************************--}---- | Dump, with a banner, if -ddump-rn-rnDump :: (Outputable a, Data a) => a -> TcRn ()-rnDump rn = dumpOptTcRn Opt_D_dump_rn "Renamer" FormatHaskell (ppr rn)--tcDump :: TcGblEnv -> TcRn ()-tcDump env- = do { unit_state <- hsc_units <$> getTopEnv ;- logger <- getLogger ;-- -- Dump short output if -ddump-types or -ddump-tc- when (logHasDumpFlag logger Opt_D_dump_types || logHasDumpFlag logger Opt_D_dump_tc)- (dumpTcRn True Opt_D_dump_types- "" FormatText (pprWithUnitState unit_state short_dump)) ;-- -- Dump bindings if -ddump-tc- dumpOptTcRn Opt_D_dump_tc "Typechecker" FormatHaskell full_dump;-- -- Dump bindings as an hsSyn AST if -ddump-tc-ast- dumpOptTcRn Opt_D_dump_tc_ast "Typechecker AST" FormatHaskell ast_dump- }- where- short_dump = pprTcGblEnv env- full_dump = pprLHsBinds (tcg_binds env)- -- NB: foreign x-d's have undefined's in their types;- -- hence can't show the tc_fords- ast_dump = showAstData NoBlankSrcSpan NoBlankEpAnnotations (tcg_binds env)---- It's unpleasant having both pprModGuts and pprModDetails here-pprTcGblEnv :: TcGblEnv -> SDoc-pprTcGblEnv (TcGblEnv { tcg_type_env = type_env,- tcg_insts = insts,- tcg_fam_insts = fam_insts,- tcg_rules = rules,- tcg_imports = imports })- = getPprDebug $ \debug ->- vcat [ ppr_types debug type_env- , ppr_tycons debug fam_insts type_env- , ppr_datacons debug type_env- , ppr_patsyns type_env- , ppr_insts insts- , ppr_fam_insts fam_insts- , ppr_rules rules- , text "Dependent modules:" <+>- (ppr . sort . installedModuleEnvElts $ imp_direct_dep_mods imports)- , text "Dependent packages:" <+>- ppr (S.toList $ imp_dep_direct_pkgs imports)]- -- The use of sort is just to reduce unnecessary- -- wobbling in testsuite output--ppr_rules :: [LRuleDecl GhcTc] -> SDoc-ppr_rules rules- = ppUnless (null rules) $- hang (text "RULES")- 2 (vcat (map ppr rules))--ppr_types :: Bool -> TypeEnv -> SDoc-ppr_types debug type_env- = ppr_things "TYPE SIGNATURES" ppr_sig- (sortBy (comparing getOccName) ids)- where- ids = [id | id <- typeEnvIds type_env, want_sig id]- want_sig id- | debug = True- | otherwise = hasTopUserName id- && case idDetails id of- VanillaId -> True- WorkerLikeId{} -> True- RecSelId {} -> True- ClassOpId {} -> True- FCallId {} -> True- _ -> False+ checkBootDeclM,+ getRenamedStuff, RenamedStuff+ ) where++import GHC.Prelude++import GHC.Driver.Env+import GHC.Driver.Plugins+import GHC.Driver.DynFlags+import GHC.Driver.Config.Diagnostic++import GHC.Tc.Errors.Hole.Plugin ( HoleFitPluginR (..) )+import GHC.Tc.Errors.Types+import {-# SOURCE #-} GHC.Tc.Gen.Splice ( finishTH, runRemoteModFinalizers )+import GHC.Tc.Gen.HsType+import GHC.Tc.Validity( checkValidType )+import GHC.Tc.Gen.Match+import GHC.Tc.Utils.Unify( checkConstraints, tcSubTypeSigma )+import GHC.Tc.Zonk.Type+import GHC.Tc.Gen.Expr+import GHC.Tc.Gen.App( tcInferSigma )+import GHC.Tc.Utils.Monad+import GHC.Tc.Gen.Export+import GHC.Tc.Types.Evidence+import GHC.Tc.Types.Constraint+import GHC.Tc.Types.Origin+import GHC.Tc.Instance.Family+import GHC.Tc.Gen.Annotation+import GHC.Tc.Gen.Bind+import GHC.Tc.Gen.Default+import GHC.Tc.Utils.Env+import GHC.Tc.Gen.Rule+import GHC.Tc.Gen.Foreign+import GHC.Tc.TyCl.Instance+import GHC.Tc.Utils.TcMType+import GHC.Tc.Utils.TcType+import GHC.Tc.Solver+import GHC.Tc.TyCl+import GHC.Tc.Instance.Typeable ( mkTypeableBinds )+import GHC.Tc.Utils.Backpack+import GHC.Tc.Zonk.TcType++import GHC.Rename.Bind ( rejectBootDecls )+import GHC.Rename.Splice ( rnTopSpliceDecls, traceSplice, SpliceInfo(..) )+import GHC.Rename.HsType+import GHC.Rename.Expr+import GHC.Rename.Fixity ( lookupFixityRn )+import GHC.Rename.Names+import GHC.Rename.Env+import GHC.Rename.Module+import GHC.Rename.Doc+import GHC.Rename.Utils ( mkNameClashErr )++import GHC.Iface.Decl ( coAxiomToIfaceDecl )+import GHC.Iface.Env ( externaliseName )+import GHC.Iface.Load++import GHC.Builtin.Types ( mkListTy, anyTypeOfKind )+import GHC.Builtin.Names+import GHC.Builtin.Utils++import GHC.Hs hiding ( FunDep(..) )+import GHC.Hs.Dump++import GHC.Core.PatSyn+import GHC.Core.Predicate ( classMethodTy )+import GHC.Core.InstEnv+import GHC.Core.TyCon+import GHC.Core.DataCon+import GHC.Core.TyCo.Rep+import GHC.Core.Type+import GHC.Core.Class+import GHC.Core.Coercion.Axiom+import GHC.Core.Reduction ( Reduction(..) )+import GHC.Core.TyCo.Ppr( debugPprType )+import GHC.Core.FamInstEnv+ ( FamInst, pprFamInst, famInstsRepTyCons, orphNamesOfFamInst+ , famInstEnvElts, extendFamInstEnvList, normaliseType )++import GHC.Parser.Header ( mkPrelImports )++import GHC.IfaceToCore++import GHC.Runtime.Context++import GHC.Utils.Error+import GHC.Utils.Outputable as Outputable+import GHC.Utils.Panic+import GHC.Utils.Panic.Plain+import GHC.Utils.Misc+import GHC.Utils.Logger++import GHC.Types.Error+import GHC.Types.Name.Reader+import GHC.Types.Fixity.Env+import GHC.Types.Id as Id+import GHC.Types.Id.Info( IdDetails(..) )+import GHC.Types.Var.Env+import GHC.Types.TypeEnv+import GHC.Types.Unique.FM+import GHC.Types.Name+import GHC.Types.Name.Env+import GHC.Types.Name.Set+import GHC.Types.Avail+import GHC.Types.Basic hiding( SuccessFlag(..) )+import GHC.Types.Annotations+import GHC.Types.SrcLoc+import GHC.Types.SourceFile+import GHC.Types.PkgQual+import qualified GHC.LanguageExtensions as LangExt++import GHC.Unit.External+import GHC.Unit.Types+import GHC.Unit.State+import GHC.Unit.Home+import GHC.Unit.Module+import GHC.Unit.Module.Warnings+import GHC.Unit.Module.ModSummary+import GHC.Unit.Module.ModIface+import GHC.Unit.Module.ModDetails+import GHC.Unit.Module.Deps++import GHC.Data.FastString+import GHC.Data.Maybe+import GHC.Data.List.SetOps+import GHC.Data.Bag+import qualified GHC.Data.BooleanFormula as BF++import Control.Arrow ( second )+import Control.DeepSeq+import Control.Monad+import Control.Monad.Trans.Writer.CPS+import Data.Data ( Data )+import Data.Functor.Classes ( liftEq )+import Data.List ( sortBy, sort )+import Data.List.NonEmpty ( NonEmpty (..) )+import qualified Data.List.NonEmpty as NE+import Data.Ord+import qualified Data.Set as S+import Data.Foldable ( for_ )+import Data.Traversable ( for )++++{-+************************************************************************+* *+ Typecheck and rename a module+* *+************************************************************************+-}++-- | Top level entry point for typechecker and renamer+tcRnModule :: HscEnv+ -> ModSummary+ -> Bool -- True <=> save renamed syntax+ -> HsParsedModule+ -> IO (Messages TcRnMessage, Maybe TcGblEnv)++tcRnModule hsc_env mod_sum save_rn_syntax+ parsedModule@HsParsedModule {hpm_module= L loc this_module}+ | RealSrcSpan real_loc _ <- loc+ = withTiming logger+ (text "Renamer/typechecker"<+>brackets (ppr this_mod))+ (const ()) $+ initTc hsc_env hsc_src save_rn_syntax this_mod real_loc $+ withTcPlugins hsc_env $+ withDefaultingPlugins hsc_env $+ withHoleFitPlugins hsc_env $++ tcRnModuleTcRnM hsc_env mod_sum parsedModule pair++ | otherwise+ = return (err_msg `addMessage` emptyMessages, Nothing)++ where+ hsc_src = ms_hsc_src mod_sum+ logger = hsc_logger hsc_env+ home_unit = hsc_home_unit hsc_env+ err_msg = mkPlainErrorMsgEnvelope loc $+ TcRnModMissingRealSrcSpan this_mod++ pair :: (Module, SrcSpan)+ pair@(this_mod,_)+ | Just (L mod_loc mod) <- hsmodName this_module+ = (mkHomeModule home_unit mod, locA mod_loc)++ | otherwise -- 'module M where' is omitted+ = (mkHomeModule home_unit mAIN_NAME, srcLocSpan (srcSpanStart loc))+++++tcRnModuleTcRnM :: HscEnv+ -> 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 mod_sum+ (HsParsedModule {+ hpm_module =+ (L loc (HsModule (XModulePs _ _ mod_deprec maybe_doc_hdr)+ maybe_mod export_ies import_decls local_decls)),+ hpm_src_files = src_files+ })+ (this_mod, prel_imp_loc)+ = setSrcSpan loc $+ 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+ -- automatically considered to be loop breakers+ tcg_env <- getGblEnv+ ; boot_info <- tcHiBootIface hsc_src this_mod+ ; setGblEnv (tcg_env { tcg_self_boot = boot_info })+ $ do+ { -- Deal with imports; first add implicit prelude+ implicit_prelude <- xoptM LangExt.ImplicitPrelude+ ; let { prel_imports = mkPrelImports (moduleName this_mod) prel_imp_loc+ implicit_prelude import_decls }++ ; when (notNull prel_imports) $ do+ addDiagnostic TcRnImplicitImportOfPrelude++ ; -- TODO This is a little skeevy; maybe handle a bit more directly+ let { simplifyImport (L _ idecl) =+ ( renameRawPkgQual (hsc_unit_env hsc_env) (unLoc $ ideclName idecl) (ideclPkgQual idecl)+ , reLoc $ ideclName idecl)+ }+ ; raw_sig_imports <- liftIO+ $ findExtraSigImports hsc_env hsc_src+ (moduleName this_mod)+ ; raw_req_imports <- liftIO+ $ implicitRequirements hsc_env+ (map simplifyImport (prel_imports+ ++ import_decls))+ ; let { mkImport mod_name = noLocA+ $ (simpleImportDecl mod_name)+ { ideclImportList = Just (Exactly, noLocA [])}}+ ; let { withReason t imps = map (,text t) imps }+ ; let { all_imports = withReason "is implicitly imported" prel_imports+ ++ withReason "is directly imported" import_decls+ ++ withReason "is an extra sig import" (map mkImport raw_sig_imports)+ ++ withReason "is an implicit req import" (map mkImport raw_req_imports) }+ ; -- OK now finally rename the imports+ tcg_env <- {-# SCC "tcRnImports" #-}+ tcRnImports hsc_env all_imports++ -- Put a version of the header without identifier info into the tcg_env+ -- Make sure to do this before 'tcRnSrcDecls', because we need the+ -- module header when we're splicing TH, since it can be accessed via+ -- 'getDoc'.+ -- We will rename it properly after renaming everything else so that+ -- haddock can link the identifiers+ ; tcg_env <- return (tcg_env+ { tcg_doc_hdr = fmap (\(WithHsDocIdentifiers str _) -> WithHsDocIdentifiers str [])+ <$> maybe_doc_hdr })+ ; -- 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 subsequent deprecations added to tcg_warns+ ; tcg_env1 <- case mod_deprec of+ Just (L _ txt) -> do { txt' <- rnWarningTxt txt+ ; pure $ tcg_env {tcg_warns = WarnAll txt'}+ }+ Nothing -> pure tcg_env+ ; setGblEnv tcg_env1+ $ do { -- Rename and type check the declarations+ traceRn "rn1a" empty+ ; tcg_env <-+ case hsc_src of+ HsBootOrSig boot_or_sig ->+ do { tcg_env <- tcRnHsBootDecls boot_or_sig local_decls+ ; traceRn "rn4a: before exports" empty+ ; tcg_env <- setGblEnv tcg_env $+ rnExports explicit_mod_hdr export_ies+ ; traceRn "rn4b: after exports" empty+ ; return tcg_env+ }+ HsSrcFile ->+ {-# SCC "tcRnSrcDecls" #-}+ tcRnSrcDecls explicit_mod_hdr export_ies local_decls++ ; whenM (goptM Opt_DoCoreLinting) $+ lintGblEnv (hsc_logger hsc_env) (hsc_dflags hsc_env) tcg_env++ ; setGblEnv tcg_env+ $ do { -- Compare hi-boot iface (if any) with the real thing+ -- Must be done after processing the exports+ tcg_env <- checkHiBootIface tcg_env boot_info+ ; -- The new type env is already available to stuff+ -- slurped from interface files, via+ -- GHC.Tc.Utils.Env.setGlobalTypeEnv. It's important that this+ -- includes the stuff in checkHiBootIface,+ -- because the latter might add new bindings for+ -- boot_dfuns, which may be mentioned in imported+ -- unfoldings.+ ; -- Report unused names+ -- Do this /after/ type inference, so that when reporting+ -- a function with no type signature we can give the+ -- inferred type+ ; reportUnusedNames tcg_env hsc_src++ -- Rename the module header properly after we have renamed everything else+ ; maybe_doc_hdr <- traverse rnLHsDoc maybe_doc_hdr;+ ; tcg_env <- return (tcg_env+ { tcg_doc_hdr = maybe_doc_hdr })++ ; -- add extra source files to tcg_dependent_files+ addDependentFiles src_files+ -- Ensure plugins run with the same tcg_env that we pass in+ ; setGblEnv tcg_env+ $ do { tcg_env <- runTypecheckerPlugin mod_sum tcg_env+ ; -- Dump output and return+ tcDump tcg_env+ ; return tcg_env+ }+ }+ }+ }+ }++{-+************************************************************************+* *+ Import declarations+* *+************************************************************************+-}++tcRnImports :: HscEnv -> [(LImportDecl GhcPs, SDoc)] -> TcM TcGblEnv+tcRnImports hsc_env import_decls+ = do { (rn_imports, rdr_env, imports, hpc_info) <- rnImports import_decls ;++ ; this_mod <- getModule+ ; gbl_env <- getGblEnv+ ; let { -- We want instance declarations from all home-package+ -- modules below this one, including boot modules, except+ -- ourselves. The 'except ourselves' is so that we don't+ -- get the instances from this module's hs-boot file. This+ -- filtering also ensures that we don't see instances from+ -- modules batch (@--make@) compiled before this one, but+ -- which are not below this one.+ ; (home_insts, home_fam_insts) =++ hptInstancesBelow hsc_env (homeUnitId $ hsc_home_unit hsc_env) (GWIB (moduleName this_mod)(hscSourceToIsBoot (tcg_src gbl_env)))++ } ;++ -- Record boot-file info in the EPS, so that it's+ -- visible to loadHiBootInterface in tcRnSrcDecls,+ -- and any other incrementally-performed imports+ ; when (isOneShot (ghcMode (hsc_dflags hsc_env))) $ do {+ updateEps_ $ \eps -> eps { eps_is_boot = imp_boot_mods imports }+ }++ -- Update the gbl env+ ; updGblEnv ( \ gbl ->+ gbl {+ tcg_rdr_env = tcg_rdr_env gbl `plusGlobalRdrEnv` rdr_env,+ tcg_imports = tcg_imports gbl `plusImportAvails` imports,+ tcg_rn_imports = rn_imports,+ tcg_inst_env = tcg_inst_env gbl `unionInstEnv` home_insts,+ tcg_fam_inst_env = extendFamInstEnvList (tcg_fam_inst_env gbl)+ home_fam_insts,+ tcg_hpc = hpc_info+ }) $ do {++ ; traceRn "rn1" (ppr (imp_direct_dep_mods imports))+ -- Fail if there are any errors so far+ -- The error printing (if needed) takes advantage+ -- of the tcg_env we have now set+-- ; traceIf (text "rdr_env: " <+> ppr rdr_env)+ ; failIfErrsM++ -- Load any orphan-module (including orphan family+ -- instance-module) interfaces, so that their rules and+ -- instance decls will be found. But filter out a+ -- self hs-boot: these instances will be checked when+ -- we define them locally.+ -- (We don't need to load non-orphan family instance+ -- modules until we either try to use the instances they+ -- define, or define our own family instances, at which+ -- point we need to check them for consistency.)+ ; loadModuleInterfaces (text "Loading orphan modules")+ (filter (/= this_mod) (imp_orphs imports))++ -- Check type-family consistency between imports.+ -- See Note [The type family instance consistency story]+ ; traceRn "rn1: checking family instance consistency {" empty+ ; let { dir_imp_mods = moduleEnvKeys+ . imp_mods+ $ imports }+ ; checkFamInstConsistency dir_imp_mods+ ; traceRn "rn1: } checking family instance consistency" empty++ ; getGblEnv } }++{-+************************************************************************+* *+ Type-checking the top level of a module+* *+************************************************************************+-}++tcRnSrcDecls :: Bool -- False => no 'module M(..) where' header at all+ -> Maybe (LocatedL [LIE GhcPs])+ -> [LHsDecl GhcPs] -- Declarations+ -> TcM TcGblEnv+tcRnSrcDecls explicit_mod_hdr export_ies decls+ = do { -- Do all the declarations+ ; (tcg_env, tcl_env, lie) <- tc_rn_src_decls decls++ ------ Simplify constraints ---------+ --+ -- We do this after checkMainType, so that we use the type+ -- info that checkMainType adds+ --+ -- We do it with both global and local env in scope:+ -- * the global env exposes the instances to simplifyTop,+ -- and affects how names are rendered in error messages+ -- * the local env exposes the local Ids to simplifyTop,+ -- so that we get better error messages (monomorphism restriction)+ ; new_ev_binds <- {-# SCC "simplifyTop" #-}+ restoreEnvs (tcg_env, tcl_env) $+ do { lie_main <- checkMainType tcg_env+ ; simplifyTop (lie `andWC` lie_main) }++ -- Emit Typeable bindings+ ; tcg_env <- setGblEnv tcg_env $+ mkTypeableBinds++ ; traceTc "Tc9" empty+ ; failIfErrsM -- Stop now if if there have been errors+ -- Continuing is a waste of time; and we may get debug+ -- warnings when zonking about strangely-typed TyCons!++ -- Zonk the final code. This must be done last.+ -- Even simplifyTop may do some unification.+ -- This pass also warns about missing type signatures+ ; (id_env, ev_binds', binds', fords', imp_specs', rules')+ <- zonkTcGblEnv new_ev_binds tcg_env++ --------- Run finalizers --------------+ -- Finalizers must run after constraints are simplified, lest types+ -- might not be complete when using reify (see #12777).+ -- and also after we zonk the first time because we run typed splices+ -- in the zonker which gives rise to the finalisers.+ ; let -- init_tcg_env:+ -- * Remove accumulated bindings, rules and so on from+ -- TcGblEnv. They are now in ev_binds', binds', etc.+ -- * Add the zonked Ids from the value bindings to tcg_type_env+ -- Up to now these Ids are only in tcl_env's type-envt+ init_tcg_env = tcg_env { tcg_binds = emptyBag+ , tcg_ev_binds = emptyBag+ , tcg_imp_specs = []+ , tcg_rules = []+ , tcg_fords = []+ , tcg_type_env = tcg_type_env tcg_env+ `plusTypeEnv` id_env }+ ; (tcg_env, tcl_env) <- setGblEnv init_tcg_env+ run_th_modfinalizers+ ; finishTH+ ; traceTc "Tc11" empty++ --------- Deal with the exports ----------+ -- Can't be done earlier, because the export list must "see"+ -- the declarations created by the finalizers+ ; tcg_env <- restoreEnvs (tcg_env, tcl_env) $+ rnExports explicit_mod_hdr export_ies++ --------- Emit the ':Main.main = runMainIO main' declaration ----------+ -- Do this /after/ rnExports, so that it can consult+ -- the tcg_exports created by rnExports+ ; (tcg_env, main_ev_binds)+ <- restoreEnvs (tcg_env, tcl_env) $+ do { (tcg_env, lie) <- captureTopConstraints $+ checkMain explicit_mod_hdr export_ies+ ; ev_binds <- simplifyTop lie+ ; return (tcg_env, ev_binds) }++ ; failIfErrsM -- Stop now if if there have been errors+ -- Continuing is a waste of time; and we may get debug+ -- warnings when zonking about strangely-typed TyCons!++ ---------- Final zonking ---------------+ -- Zonk the new bindings arising from running the finalisers,+ -- and main. This won't give rise to any more finalisers as you+ -- can't nest finalisers inside finalisers.+ ; (id_env_mf, ev_binds_mf, binds_mf, fords_mf, imp_specs_mf, rules_mf)+ <- zonkTcGblEnv main_ev_binds tcg_env++ ; let { !final_type_env = tcg_type_env tcg_env+ `plusTypeEnv` id_env_mf+ -- Add the zonked Ids from the value bindings (they were in tcl_env)+ -- Force !final_type_env, lest we retain an old reference+ -- to the previous tcg_env++ ; tcg_env' = tcg_env+ { tcg_binds = binds' `unionBags` binds_mf+ , tcg_ev_binds = ev_binds' `unionBags` ev_binds_mf+ , tcg_imp_specs = imp_specs' ++ imp_specs_mf+ , tcg_rules = rules' ++ rules_mf+ , tcg_fords = fords' ++ fords_mf } } ;++ ; setGlobalTypeEnv tcg_env' final_type_env+ }++zonkTcGblEnv :: Bag EvBind -> TcGblEnv+ -> TcM (TypeEnv, Bag EvBind, LHsBinds GhcTc,+ [LForeignDecl GhcTc], [LTcSpecPrag], [LRuleDecl GhcTc])+zonkTcGblEnv ev_binds tcg_env@(TcGblEnv { tcg_binds = binds+ , tcg_ev_binds = cur_ev_binds+ , tcg_imp_specs = imp_specs+ , tcg_rules = rules+ , tcg_fords = fords })+ = {-# SCC "zonkTopDecls" #-}+ setGblEnv tcg_env $ -- This sets the GlobalRdrEnv which is used when rendering+ -- error messages during zonking (notably levity errors)+ do { let all_ev_binds = cur_ev_binds `unionBags` ev_binds+ ; zonkTopDecls all_ev_binds binds rules imp_specs fords }++-- | Runs TH finalizers and renames and typechecks the top-level declarations+-- that they could introduce.+run_th_modfinalizers :: TcM (TcGblEnv, TcLclEnv)+run_th_modfinalizers = do+ th_modfinalizers_var <- fmap tcg_th_modfinalizers getGblEnv+ th_modfinalizers <- readTcRef th_modfinalizers_var+ if null th_modfinalizers+ then getEnvs+ else do+ writeTcRef th_modfinalizers_var []+ let run_finalizer (lcl_env, f) =+ restoreLclEnv lcl_env (runRemoteModFinalizers f)++ (_, lie_th) <- captureTopConstraints $+ mapM_ run_finalizer th_modfinalizers++ -- Finalizers can add top-level declarations with addTopDecls, so+ -- we have to run tc_rn_src_decls to get them+ (tcg_env, tcl_env, lie_top_decls) <- tc_rn_src_decls []++ restoreEnvs (tcg_env, tcl_env) $ do+ -- Subsequent rounds of finalizers run after any new constraints are+ -- simplified, or some types might not be complete when using reify+ -- (see #12777).+ new_ev_binds <- {-# SCC "simplifyTop2" #-}+ simplifyTop (lie_th `andWC` lie_top_decls)+ addTopEvBinds new_ev_binds run_th_modfinalizers+ -- addTopDecls can add declarations which add new finalizers.++tc_rn_src_decls :: [LHsDecl GhcPs]+ -> TcM (TcGblEnv, TcLclEnv, WantedConstraints)+-- Loops around dealing with each top level inter-splice group+-- in turn, until it's dealt with the entire module+-- Never emits constraints; calls captureTopConstraints internally+tc_rn_src_decls ds+ = {-# SCC "tc_rn_src_decls" #-}+ do { (first_group, group_tail) <- findSplice ds+ -- If ds is [] we get ([], Nothing)++ -- Deal with decls up to, but not including, the first splice+ ; (tcg_env, rn_decls) <- rnTopSrcDecls first_group+ -- rnTopSrcDecls fails if there are any errors++ -- Get TH-generated top-level declarations and make sure they don't+ -- contain any splices since we don't handle that at the moment+ --+ -- The plumbing here is a bit odd: see #10853+ ; th_topdecls_var <- fmap tcg_th_topdecls getGblEnv+ ; th_ds <- readTcRef th_topdecls_var+ ; writeTcRef th_topdecls_var []++ ; (tcg_env, rn_decls) <-+ if null th_ds+ then return (tcg_env, rn_decls)+ else do { (th_group, th_group_tail) <- findSplice th_ds+ ; case th_group_tail of+ { Nothing -> return ()+ ; Just (SpliceDecl _ (L loc _) _, _) ->+ setSrcSpanA loc $ addErr $+ TcRnTHError $ AddTopDeclsError+ AddTopDeclsUnexpectedDeclarationSplice+ }+ -- Rename TH-generated top-level declarations+ ; (tcg_env, th_rn_decls) <- setGblEnv tcg_env+ $ rnTopSrcDecls th_group++ -- Dump generated top-level declarations+ ; let msg = "top-level declarations added with 'addTopDecls'"+ ; traceSplice+ $ SpliceInfo { spliceDescription = msg+ , spliceIsDecl = True+ , spliceSource = Nothing+ , spliceGenerated = ppr th_rn_decls }+ ; return (tcg_env, appendGroups rn_decls th_rn_decls)+ }++ -- Type check all declarations+ -- NB: set the env **before** captureTopConstraints so that error messages+ -- get reported w.r.t. the right GlobalRdrEnv. It is for this reason that+ -- the captureTopConstraints must go here, not in tcRnSrcDecls.+ ; ((tcg_env, tcl_env), lie1) <- setGblEnv tcg_env $+ captureTopConstraints $+ tcTopSrcDecls rn_decls++ -- If there is no splice, we're nearly done+ ; restoreEnvs (tcg_env, tcl_env) $+ case group_tail of+ { Nothing -> return (tcg_env, tcl_env, lie1)++ -- If there's a splice, we must carry on+ ; Just (SpliceDecl _ (L _ splice) _, rest_ds) ->+ do {+ -- We need to simplify any constraints from the previous declaration+ -- group, or else we might reify metavariables, as in #16980.+ ; ev_binds1 <- simplifyTop lie1++ -- Rename the splice expression, and get its supporting decls+ ; (spliced_decls, splice_fvs) <- rnTopSpliceDecls splice++ -- Glue them on the front of the remaining decls and loop+ ; setGblEnv (tcg_env `addTcgDUs` usesOnly splice_fvs) $+ addTopEvBinds ev_binds1 $+ tc_rn_src_decls (spliced_decls ++ rest_ds)+ }+ }+ }++{-+************************************************************************+* *+ Compiling hs-boot source files, and+ comparing the hi-boot interface with the real thing+* *+************************************************************************+-}++tcRnHsBootDecls :: HsBootOrSig -> [LHsDecl GhcPs] -> TcM TcGblEnv+tcRnHsBootDecls boot_or_sig decls+ = do { (first_group, group_tail) <- findSplice decls++ -- Rename the declarations+ ; (tcg_env, HsGroup { hs_tyclds = tycl_decls+ , hs_derivds = deriv_decls+ , hs_fords = for_decls+ , hs_defds = def_decls+ , hs_ruleds = rule_decls+ , hs_annds = _+ , hs_valds = XValBindsLR (NValBinds val_binds val_sigs) })+ <- rnTopSrcDecls first_group++ ; (gbl_env, lie) <- setGblEnv tcg_env $ captureTopConstraints $ do {+ -- NB: setGblEnv **before** captureTopConstraints so that+ -- if the latter reports errors, it knows what's in scope++ -- Check for illegal declarations+ ; case group_tail of+ Just (SpliceDecl _ d _, _) -> rejectBootDecls boot_or_sig BootSpliceDecls [d]+ Nothing -> return ()+ ; rejectBootDecls boot_or_sig BootForeignDecls for_decls+ ; rejectBootDecls boot_or_sig BootDefaultDecls def_decls+ ; rejectBootDecls boot_or_sig BootRuleDecls rule_decls++ -- Typecheck type/class/instance decls+ ; traceTc "Tc2 (boot)" empty+ ; (tcg_env, inst_infos, _deriv_binds, _th_bndrs)+ <- tcTyClsInstDecls tycl_decls deriv_decls val_binds+ ; setGblEnv tcg_env $ do {++ -- Emit Typeable bindings+ ; tcg_env <- mkTypeableBinds+ ; setGblEnv tcg_env $ do {++ -- Typecheck value declarations+ ; traceTc "Tc5" empty+ ; val_ids <- tcHsBootSigs val_binds val_sigs++ -- Wrap up+ -- No simplification or zonking to do+ ; traceTc "Tc7a" empty+ ; gbl_env <- getGblEnv++ -- Make the final type-env+ -- Include the dfun_ids so that their type sigs+ -- are written into the interface file.+ ; let { type_env0 = tcg_type_env gbl_env+ ; type_env1 = extendTypeEnvWithIds type_env0 val_ids+ ; type_env2 = extendTypeEnvWithIds type_env1 dfun_ids+ ; dfun_ids = map iDFunId inst_infos+ }++ ; setGlobalTypeEnv gbl_env type_env2+ }}}+ ; traceTc "boot" (ppr lie); return gbl_env }++{-+Once we've typechecked the body of the module, we want to compare what+we've found (gathered in a TypeEnv) with the hi-boot details (if any).+-}++checkHiBootIface :: TcGblEnv -> SelfBootInfo -> TcM TcGblEnv+-- Compare the hi-boot file for this module (if there is one)+-- with the type environment we've just come up with+-- In the common case where there is no hi-boot file, the list+-- of boot_names is empty.++checkHiBootIface tcg_env boot_info+ | NoSelfBoot <- boot_info -- Common case+ = return tcg_env++ | HsBootFile <- tcg_src tcg_env -- Current module is already a hs-boot file!+ = return tcg_env++ | SelfBoot { sb_mds = boot_details } <- boot_info+ , TcGblEnv { tcg_binds = binds+ , tcg_insts = local_insts+ , tcg_type_env = local_type_env+ , tcg_exports = local_exports } <- tcg_env+ = do { -- This code is tricky, see Note [DFun knot-tying]+ ; imp_prs <- checkHiBootIface' local_insts local_type_env+ local_exports boot_details++ -- Now add the impedance-matching boot bindings:+ --+ -- - dfun bindings $fxblah = $fblah+ -- - record bindings fld{var} = fld{rec field of ..}+ --+ -- to (a) the type envt, and (b) the top-level bindings+ ; let boot_impedance_bds = map fst imp_prs+ type_env' = extendTypeEnvWithIds local_type_env boot_impedance_bds+ impedance_binds = listToBag [ mkVarBind boot_id (nlHsVar id)+ | (boot_id, id) <- imp_prs ]+ tcg_env_w_binds+ = tcg_env { tcg_binds = binds `unionBags` impedance_binds }++ ; type_env' `seq`+ -- Why the seq? Without, we will put a TypeEnv thunk in+ -- tcg_type_env_var. That thunk will eventually get+ -- forced if we are typechecking interfaces, but that+ -- is no good if we are trying to typecheck the very+ -- DFun we were going to put in.+ -- TODO: Maybe setGlobalTypeEnv should be strict.+ setGlobalTypeEnv tcg_env_w_binds type_env' }++#if __GLASGOW_HASKELL__ <= 810+ | otherwise = panic "checkHiBootIface: unreachable code"+#endif++{- Note [DFun impedance matching]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We return a list of "impedance-matching" bindings for the dfuns+defined in the hs-boot file, such as+ $fxEqT = $fEqT+We need these because the module and hi-boot file might differ in+the name it chose for the dfun: the name of a dfun is not+uniquely determined by its type; there might be multiple dfuns+which, individually, would map to the same name (in which case+we have to disambiguate them.) There's no way for the hi file+to know exactly what disambiguation to use... without looking+at the hi-boot file itself.++In fact, the names will always differ because we always pick names+prefixed with "$fx" for boot dfuns, and "$f" for real dfuns+(so that this impedance matching is always possible).++Note [Record field impedance matching]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When a hs-boot file defines a function whose implementation in the hs file+is a record selector, we have to do something similar to Note [DFun impedance matching].++Example:++ -- M.hs-boot+ module M where+ data A+ fld :: A -> ()++ -- M.hs+ module M where+ data A = MkA { fld :: () }++Recall from Note [Record field namespacing] in GHC.Types.Name.Occurrence that+record fields have their own namespaces. This means that M.hs exports the Id+fld{record selector of MkA} :: A -> (), while M.hs-boot exports the Id+fld{variable} :: A -> ().++To remedy this, we add an impedance-matching binding in M.hs:++ fld{variable} :: A -> ()+ fld{variable} = fld{record selector of MkA}++Note that we imperatively need to add a binding for fld{variable} in M.hs, as we+might have an exact Name reference to it (e.g. in a module that imports M.hs-boot).+Not doing so would cause Core Lint errors, at the very least.++These bindings are returned by the check_export in checkHiBootIface', and+added to the DFun impedance-matching bindings.++[Wrinkle: exports]++ We MUST NOT add fld{variable} to the export list of M.hs, as this+ would mean that M.hs exports both a record field and variable with the same+ occNameFS, which would cause ambiguity errors at use-sites.+ It's OK to only export the field name even though the boot-file exported+ the variable: name resolution will take care of that.++Another situation is that we are re-exporting, e.g. (with M as above):++ -- N.hs-boot+ module N ( module M ) where+ import {-# SOURCE #-} M++ -- N.hs+ module N ( module M where )+ import M++In this case, N.hs-boot re-exports the variable fld, and N re-exports the+record field fld, but not the variable fld. We don't need to do anything in+this situation; in particular, don't re-export the variable name from N.hs,+as per [Wrinkle: exports] above.++Note [DFun knot-tying]+~~~~~~~~~~~~~~~~~~~~~~+The 'SelfBootInfo' that is fed into 'checkHiBootIface' comes from+typechecking the hi-boot file that we are presently implementing.+Suppose we are typechecking the module A: when we typecheck the+hi-boot file, whenever we see an identifier A.T, we knot-tie this+identifier to the *local* type environment (via if_rec_types.) The+contract then is that we don't *look* at 'SelfBootInfo' until we've+finished typechecking the module and updated the type environment with+the new tycons and ids.++This most works well, but there is one problem: DFuns! We do not want+to look at the mb_insts of the ModDetails in SelfBootInfo, because a+dfun in one of those ClsInsts is gotten (in GHC.IfaceToCore.tcIfaceInst) by a+(lazily evaluated) lookup in the if_rec_types. We could extend the+type env, do a setGloblaTypeEnv etc; but that all seems very indirect.+It is much more directly simply to extract the DFunIds from the+md_types of the SelfBootInfo.++See #4003, #16038 for why we need to take care here.+-}++checkHiBootIface' :: [ClsInst] -> TypeEnv -> [AvailInfo]+ -> ModDetails -> TcM [(Id, Id)]+-- Variant which doesn't require a full TcGblEnv; you could get the+-- local components from another ModDetails.+checkHiBootIface'+ local_insts local_type_env local_exports+ (ModDetails { md_types = boot_type_env+ , md_fam_insts = boot_fam_insts+ , md_exports = boot_exports })+ = do { traceTc "checkHiBootIface" $ vcat+ [ ppr boot_type_env, ppr boot_exports ]++ ; gre_env <- getGlobalRdrEnv++ -- Check the exports of the boot module, one by one+ ; fld_prs <- mapMaybeM (check_export gre_env) boot_exports++ -- Check for no family instances+ ; unless (null boot_fam_insts) $+ panic ("GHC.Tc.Module.checkHiBootIface: Cannot handle family " +++ "instances in boot files yet...")+ -- FIXME: Why? The actual comparison is not hard, but what would+ -- be the equivalent to the dfun bindings returned for class+ -- instances? We can't easily equate tycons...++ -- Check instance declarations+ -- and generate an impedance-matching binding+ ; dfun_prs <- mapMaybeM check_cls_inst boot_dfuns++ ; failIfErrsM++ ; return (fld_prs ++ dfun_prs) }++ where+ boot_dfun_names = map idName boot_dfuns+ boot_dfuns = filter isDFunId $ typeEnvIds boot_type_env+ -- NB: boot_dfuns is /not/ defined thus: map instanceDFunId md_insts+ -- We don't want to look at md_insts!+ -- Why not? See Note [DFun knot-tying]++ check_export gre_env boot_avail -- boot_avail is exported by the boot iface+ | name `elem` boot_dfun_names+ = return Nothing++ -- Check that the actual module exports the same thing+ | missing_name:_ <- missing_names+ = -- Lookup might have failed because the hs-boot file defines a variable+ -- that is implemented in the hs file as a record selector, which+ -- lives in a different namespace.+ --+ -- See Note [Record field impedance matching].+ let missing_occ = nameOccName missing_name+ mb_ok :: GlobalRdrElt -> Maybe (GlobalRdrElt, Maybe Id)+ mb_ok gre+ -- Ensure that this GRE refers to an Id that is exported.+ | isNothing $ lookupNameEnv local_export_env (greName gre)+ = Nothing+ -- We locally define the field: create an impedance-matching+ -- binding for the variable.+ | Just (AnId id) <- lookupTypeEnv local_type_env (greName gre)+ = Just (gre, Just id)+ -- We are re-exporting the field but not the variable: not a problem,+ -- as per [Wrinkle: exports] in Note [Record field impedance matching].+ | otherwise+ = Just (gre, Nothing)+ matching_flds+ | isVarOcc missing_occ -- (This only applies to variables.)+ = lookupGRE gre_env $+ LookupOccName missing_occ (RelevantGREsFOS WantField)+ | otherwise+ = [] -- BootFldReexport T18999_NoDisambiguateRecordFields T16745A++ in case mapMaybe mb_ok $ matching_flds of++ -- At least 2 matches: report an ambiguity error.+ (gre1,_):(gre2,_):gres_ids -> do+ addErrAt (nameSrcSpan missing_name) $+ mkNameClashErr gre_env (nameRdrName missing_name)+ (gre1 NE.:| gre2 : map fst gres_ids)+ return Nothing++ -- Single match: resolve the issue.+ [(_,mb_fld_id)] ->+ -- See Note [Record field impedance matching].+ for mb_fld_id $ \ fld_id -> do+ let local_boot_var =+ Id.mkExportedVanillaId missing_name (idType fld_id)+ return (local_boot_var, fld_id)++ -- Otherwise: report that the hs file does not export something+ -- that the hs-boot file exports.+ [] -> do+ addErrAt (nameSrcSpan missing_name)+ (missingBootThing HsBoot missing_name MissingBootExport)+ return Nothing++ -- If the boot module does not *define* the thing, we are done+ -- (it simply re-exports it, and names match, so nothing further to do)+ | isNothing mb_boot_thing+ = return Nothing++ -- Check that the actual module also defines the thing, and+ -- then compare the definitions+ | Just real_thing <- lookupTypeEnv local_type_env name,+ Just boot_thing <- mb_boot_thing+ = do checkBootDeclM HsBoot boot_thing real_thing+ return Nothing++ | otherwise+ = do addErrTc (missingBootThing HsBoot name MissingBootDefinition)+ return Nothing+ where+ name = availName boot_avail+ mb_boot_thing = lookupTypeEnv boot_type_env name+ missing_names = case lookupNameEnv local_export_env name of+ Nothing -> [name]+ Just avail -> availNames boot_avail+ `minusList` availNames avail++ local_export_env :: NameEnv AvailInfo+ local_export_env = availsToNameEnv local_exports++ check_cls_inst :: DFunId -> TcM (Maybe (Id,Id))+ -- Returns a pair of the boot dfun in terms of the equivalent+ -- real dfun. Delicate (like checkBootDecl) because it depends+ -- on the types lining up precisely even to the ordering of+ -- the type variables in the foralls.+ check_cls_inst boot_dfun+ | (real_dfun : _) <- find_real_dfun boot_dfun+ , let dfun_name = idName boot_dfun+ local_boot_dfun = Id.mkExportedVanillaId dfun_name (idType real_dfun)+ = return $ Just (local_boot_dfun, real_dfun)+ -- Two tricky points here:+ --+ -- * The local_boot_fun should have a Name from the /boot-file/,+ -- but type from the dfun defined in /this module/.+ -- That ensures that the TyCon etc inside the type are+ -- the ones defined in this module, not the ones gotten+ -- from the hi-boot file, which may have a lot less info+ -- (#8743, comment:10).+ --+ -- * The DFunIds from boot_details are /GlobalIds/, because+ -- they come from typechecking M.hi-boot.+ -- But all bindings in this module should be for /LocalIds/,+ -- otherwise dependency analysis fails (#16038). This+ -- is another reason for using mkExportedVanillaId, rather+ -- that modifying boot_dfun, to make local_boot_fun.+ --+ -- See Note [DFun impedance matching].++ | otherwise+ = setSrcSpan (nameSrcSpan (getName boot_dfun)) $+ do { traceTc "check_cls_inst" $ vcat+ [ text "local_insts" <+>+ vcat (map (ppr . idType . instanceDFunId) local_insts)+ , text "boot_dfun_ty" <+> ppr (idType boot_dfun) ]++ ; addErrTc $ TcRnBootMismatch HsBoot+ $ MissingBootInstance boot_dfun+ ; return Nothing }++ find_real_dfun :: DFunId -> [DFunId]+ find_real_dfun boot_dfun+ = [dfun | inst <- local_insts+ , let dfun = instanceDFunId inst+ , idType dfun `eqType` boot_dfun_ty ]+ where+ boot_dfun_ty = idType boot_dfun+++-- In general, to perform these checks we have to+-- compare the TyThing from the .hi-boot file to the TyThing+-- in the current source file. We must be careful to allow alpha-renaming+-- where appropriate, and also the boot declaration is allowed to omit+-- constructors and class methods.+--+-- See rnfail055 for a good test of this stuff.++-- | Compares two things for equivalence between boot-file and normal code,+-- reporting an error if they don't match up.+checkBootDeclM :: HsBootOrSig+ -> TyThing -- ^ boot thing+ -> TyThing -- ^ real thing+ -> TcM ()+checkBootDeclM boot_or_sig boot_thing real_thing+ = for_ boot_errs $ \ boot_err ->+ addErrAt span $+ TcRnBootMismatch boot_or_sig $+ BootMismatch boot_thing real_thing boot_err+ where+ boot_errs = execWriter $ checkBootDecl boot_or_sig boot_thing real_thing++ -- Here we use the span of the boot thing or, if it doesn't have a sensible+ -- span, that of the real thing,+ span+ | let span = nameSrcSpan (getName boot_thing)+ , isGoodSrcSpan span+ = span+ | otherwise+ = nameSrcSpan (getName real_thing)++-- | Writer monad for accumulating errors when comparing an hs-boot or+-- signature file with its implementing module.+type BootErrsM err = Writer [err] ()++-- | If the test in the first parameter is True, succeed.+-- Otherwise, record the given error.+check :: Bool -> err -> BootErrsM err+check True _ = checkSuccess+check False err = bootErr err++-- | Record an error.+bootErr :: err -> BootErrsM err+bootErr err = tell [err]++-- | A convenience synonym for a lack of errors, for @checkBootDecl@ and friends.+checkSuccess :: BootErrsM err+checkSuccess = return ()++-- | Map over the error types in an error-accumulating computation.+embedErrs :: (err1 -> err2) -> BootErrsM err1 -> BootErrsM err2+embedErrs f = mapWriter (second (fmap f))++-- | Wrap up a list of errors into a single message.+wrapErrs :: (NE.NonEmpty err1 -> err2) -> BootErrsM err1 -> BootErrsM err2+wrapErrs f w =+ case execWriter w of+ [] -> checkSuccess+ err : errs -> bootErr (f $ err :| errs)++-- | Compares the two things for equivalence between boot-file and normal+-- code. Returns @Nothing@ on success or @Just "some helpful info for user"@+-- failure. If the difference will be apparent to the user, @Just empty@ is+-- perfectly suitable.+checkBootDecl :: HsBootOrSig -> TyThing -> TyThing -> BootErrsM BootMismatchWhat++checkBootDecl _ (AnId id1) (AnId id2)+ = assert (id1 == id2) $+ check (idType id1 `eqType` idType id2)+ (BootMismatchedIdTypes id1 id2)++checkBootDecl boot_or_sig (ATyCon tc1) (ATyCon tc2)+ = wrapErrs (BootMismatchedTyCons tc1 tc2) $+ checkBootTyCon boot_or_sig tc1 tc2++checkBootDecl _ t1 t2+ = pprPanic "checkBootDecl" (ppr t1 $$ ppr t2)++-- | Run the check provided for every pair of elements in the lists.+--+-- Records an error:+--+-- - when any two items at the same position in the two lists don't match+-- according to the given function,+-- - when the lists are of different lengths.+checkListBy :: (a -> a -> BootErrsM err) -> [a] -> [a]+ -> (BootListMismatches a err -> err2)+ -> BootErrsM err2+checkListBy check_fun as bs mk_err = wrapErrs mk_err $ go 1 as bs+ where+ go _ [] [] = checkSuccess+ go !i (x:xs) (y:ys) =+ do { embedErrs (MismatchedThing i x y) $ check_fun x y+ ; go (i+1) xs ys }+ go _ _ _ = bootErr MismatchedLength++----------------+checkBootTyCon :: HsBootOrSig -> TyCon -> TyCon -> BootErrsM BootTyConMismatch+checkBootTyCon boot_or_sig tc1 tc2+ | not (eqType (tyConKind tc1) (tyConKind tc2))+ -- First off, check the kind+ = bootErr TyConKindMismatch++ | Just c1 <- tyConClass_maybe tc1+ , Just c2 <- tyConClass_maybe tc2+ , let (clas_tvs1, clas_fds1, sc_theta1, _, ats1, op_stuff1)+ = classExtraBigSig c1+ (clas_tvs2, clas_fds2, sc_theta2, _, ats2, op_stuff2)+ = classExtraBigSig c2+ , Just env <- eqVarBndrs emptyRnEnv2 clas_tvs1 clas_tvs2+ = do { check_roles+ ; embedErrs (TyConMismatchedClasses c1 c2) $+ do { -- Checks kind of class+ ; check (liftEq (eqFD env) clas_fds1 clas_fds2)+ MismatchedFunDeps+ ; unless (isAbstractTyCon tc1) $+ do { check (liftEq (eqTypeX env) sc_theta1 sc_theta2)+ MismatchedSuperclasses+ ; checkListBy (compatClassOp env boot_or_sig) op_stuff1 op_stuff2+ MismatchedMethods+ ; checkListBy (compatAT env boot_or_sig) ats1 ats2+ MismatchedATs+ ; check (classMinimalDef c1 `BF.implies` classMinimalDef c2)+ MismatchedMinimalPragmas+ } } }++ | Just syn_rhs1 <- synTyConRhs_maybe tc1+ , Just syn_rhs2 <- synTyConRhs_maybe tc2+ , Just env <- eqVarBndrs emptyRnEnv2 (tyConTyVars tc1) (tyConTyVars tc2)+ = assert (tc1 == tc2) $+ do { check_roles+ ; check (eqTypeX env syn_rhs1 syn_rhs2) $+ TyConSynonymMismatch syn_rhs1 syn_rhs2 }++ -- This allows abstract 'data T a' to be implemented using 'type T = ...'+ -- and abstract 'class K a' to be implement using 'type K = ...'+ -- See Note [Synonyms implement abstract data]+ | Hsig <- boot_or_sig -- don't support for hs-boot yet+ , isAbstractTyCon tc1+ , Just (tvs, ty) <- synTyConDefn_maybe tc2+ = checkSynAbsData tc1 tc2 tvs ty++ | Just fam_flav1 <- famTyConFlav_maybe tc1+ , Just fam_flav2 <- famTyConFlav_maybe tc2+ = assert (tc1 == tc2) $+ do { let injInfo1 = tyConInjectivityInfo tc1+ injInfo2 = tyConInjectivityInfo tc2+ ; -- check equality of roles, family flavours and injectivity annotations+ -- (NB: Type family roles are always nominal. But the check is+ -- harmless enough.)+ ; check_roles+ ; compatFamFlav fam_flav1 fam_flav2+ ; check (injInfo1 == injInfo2) TyConInjectivityMismatch }++ | isAlgTyCon tc1 && isAlgTyCon tc2+ , Just env <- eqVarBndrs emptyRnEnv2 (tyConTyVars tc1) (tyConTyVars tc2)+ = assert (tc1 == tc2) $+ do { check_roles+ ; let rhs1 = algTyConRhs tc1+ rhs2 = algTyConRhs tc2+ ; embedErrs (TyConMismatchedData rhs1 rhs2) $+ do { check (liftEq (eqTypeX env)+ (tyConStupidTheta tc1) (tyConStupidTheta tc2))+ MismatchedDatatypeContexts+ ; compatAlgRhs rhs1 rhs2 } }++ | otherwise = bootErr TyConsVeryDifferent+ -- two very different types;+ -- should be obvious to the user what the problem is+ where+ check_roles = checkRoles boot_or_sig tc1 (tyConRoles tc2)+++emptyRnEnv2 :: RnEnv2+emptyRnEnv2 = mkRnEnv2 emptyInScopeSet++-- | Check that two class methods have compatible type signatures.+compatClassOp :: RnEnv2 -> HsBootOrSig -> ClassOpItem -> ClassOpItem -> BootErrsM BootMethodMismatch+compatClassOp env boot_or_sig (id1, def_meth1) (id2, def_meth2)+ = do { check (name1 == name2) $+ MismatchedMethodNames+ ; check (eqTypeX env op_ty1 op_ty2) $+ MismatchedMethodTypes op_ty1 op_ty2+ ; case boot_or_sig of+ HsBoot ->+ check (liftEq eqDM def_meth1 def_meth2) $+ MismatchedDefaultMethods False+ Hsig ->+ check (subDM op_ty1 def_meth1 def_meth2) $+ MismatchedDefaultMethods True }+ where+ name1 = idName id1+ name2 = idName id2+ op_ty1 = classMethodTy id1+ op_ty2 = classMethodTy id2++ eqDM (_, VanillaDM) (_, VanillaDM) = True+ eqDM (_, GenericDM t1) (_, GenericDM t2) = eqTypeX env t1 t2+ eqDM _ _ = False++ -- NB: first argument is from hsig, second is from real impl.+ -- Order of pattern matching matters.+ subDM _ Nothing _ = True+ subDM _ _ Nothing = False++ -- If the hsig wrote:+ --+ -- f :: a -> a+ -- default f :: a -> a+ --+ -- this should be validly implementable using an old-fashioned+ -- vanilla default method.+ subDM t1 (Just (_, GenericDM gdm_t1)) (Just (_, VanillaDM))+ = eqType t1 gdm_t1 -- Take care (#22476). Both t1 and gdm_t1 come+ -- from tc1, so use eqType, and /not/ eqTypeX++ -- This case can occur when merging signatures+ subDM t1 (Just (_, VanillaDM)) (Just (_, GenericDM t2))+ = eqTypeX env t1 t2++ subDM _ (Just (_, VanillaDM)) (Just (_, VanillaDM)) = True+ subDM _ (Just (_, GenericDM t1)) (Just (_, GenericDM t2))+ = eqTypeX env t1 t2++-- | Check that two associated types are compatible.+compatAT :: RnEnv2 -> HsBootOrSig -> ClassATItem -> ClassATItem+ -> BootErrsM BootATMismatch+compatAT env boot_or_sig (ATI tc1 def_ats1) (ATI tc2 def_ats2)+ = do { embedErrs MismatchedTyConAT $+ checkBootTyCon boot_or_sig tc1 tc2+ ; check (compatATDef def_ats1 def_ats2)+ MismatchedATDefaultType }++ where+ -- Ignore the location of the defaults+ compatATDef Nothing Nothing = True+ compatATDef (Just (ty1, _loc1)) (Just (ty2, _loc2)) = eqTypeX env ty1 ty2+ compatATDef _ _ = False++-- | Check that two functional dependencies are the same.+eqFD :: RnEnv2 -> FunDep TyVar -> FunDep TyVar -> Bool+eqFD env (as1,bs1) (as2,bs2) =+ liftEq (eqTypeX env) (mkTyVarTys as1) (mkTyVarTys as2) &&+ liftEq (eqTypeX env) (mkTyVarTys bs1) (mkTyVarTys bs2)++-- | Check compatibility of two type family flavours.+compatFamFlav :: FamTyConFlav -> FamTyConFlav -> BootErrsM BootTyConMismatch+compatFamFlav OpenSynFamilyTyCon OpenSynFamilyTyCon+ = checkSuccess+compatFamFlav (DataFamilyTyCon {}) (DataFamilyTyCon {})+ = checkSuccess+compatFamFlav AbstractClosedSynFamilyTyCon AbstractClosedSynFamilyTyCon+ = checkSuccess -- This case only happens for hsig merging.+compatFamFlav AbstractClosedSynFamilyTyCon (ClosedSynFamilyTyCon {})+ = checkSuccess+compatFamFlav (ClosedSynFamilyTyCon {}) AbstractClosedSynFamilyTyCon+ = checkSuccess+compatFamFlav (ClosedSynFamilyTyCon ax1) (ClosedSynFamilyTyCon ax2)+ = eqClosedFamilyAx ax1 ax2+compatFamFlav (BuiltInSynFamTyCon {}) (BuiltInSynFamTyCon {})+ = checkSuccess+compatFamFlav flav1 flav2+ = bootErr $ TyConFlavourMismatch flav1 flav2++-- | Check that two 'AlgTyConRhs's are compatible.+compatAlgRhs :: AlgTyConRhs -> AlgTyConRhs -> BootErrsM BootDataMismatch+compatAlgRhs (AbstractTyCon {}) _rhs2 =+ checkSuccess -- rhs2 is guaranteed to be injective, since it's an AlgTyCon+compatAlgRhs tc1@DataTyCon{} tc2@DataTyCon{} =+ checkListBy compatCon (data_cons tc1) (data_cons tc2) MismatchedConstructors+compatAlgRhs tc1@NewTyCon{ data_con = dc1 } tc2@NewTyCon{ data_con = dc2 } =+ embedErrs (MismatchedConstructors . NE.singleton . MismatchedThing 1 dc1 dc2) $+ compatCon (data_con tc1) (data_con tc2)+compatAlgRhs _ _ = bootErr MismatchedNewtypeVsData++-- | Check that two 'DataCon's are compatible.+compatCon :: DataCon -> DataCon -> BootErrsM BootDataConMismatch+compatCon c1 c2+ = do { check (dataConName c1 == dataConName c2)+ MismatchedDataConNames+ ; check (dataConIsInfix c1 == dataConIsInfix c2)+ MismatchedDataConFixities+ ; check (liftEq eqHsBang (dataConImplBangs c1) (dataConImplBangs c2))+ MismatchedDataConBangs+ ; check (map flSelector (dataConFieldLabels c1) == map flSelector (dataConFieldLabels c2))+ MismatchedDataConFieldLabels+ ; check (eqType (dataConWrapperType c1) (dataConWrapperType c2))+ MismatchedDataConTypes }++eqClosedFamilyAx :: Maybe (CoAxiom br) -> Maybe (CoAxiom br1)+ -> BootErrsM BootTyConMismatch+eqClosedFamilyAx Nothing Nothing = checkSuccess+eqClosedFamilyAx Nothing (Just _) = bootErr $ TyConAxiomMismatch $ NE.singleton MismatchedLength+eqClosedFamilyAx (Just _) Nothing = bootErr $ TyConAxiomMismatch $ NE.singleton MismatchedLength+eqClosedFamilyAx (Just (CoAxiom { co_ax_branches = branches1 }))+ (Just (CoAxiom { co_ax_branches = branches2 }))+ = checkListBy eqClosedFamilyBranch branch_list1 branch_list2+ TyConAxiomMismatch+ where+ branch_list1 = fromBranches branches1+ branch_list2 = fromBranches branches2++eqClosedFamilyBranch :: CoAxBranch -> CoAxBranch -> BootErrsM BootAxiomBranchMismatch+eqClosedFamilyBranch (CoAxBranch { cab_tvs = tvs1, cab_cvs = cvs1+ , cab_lhs = lhs1, cab_rhs = rhs1 })+ (CoAxBranch { cab_tvs = tvs2, cab_cvs = cvs2+ , cab_lhs = lhs2, cab_rhs = rhs2 })+ | Just env1 <- eqVarBndrs emptyRnEnv2 tvs1 tvs2+ , Just env <- eqVarBndrs env1 cvs1 cvs2+ = do { check (liftEq (eqTypeX env) lhs1 lhs2) MismatchedAxiomLHS+ ; check (eqTypeX env rhs1 rhs2) MismatchedAxiomRHS }+ | otherwise+ = bootErr MismatchedAxiomBinders++{- Note [Role subtyping]+~~~~~~~~~~~~~~~~~~~~~~~~+In the current formulation of roles, role subtyping is only OK if the+"abstract" TyCon was not representationally injective. Among the most+notable examples of non representationally injective TyCons are abstract+data, which can be implemented via newtypes (which are not+representationally injective). The key example is+in this example from #13140:++ -- In an hsig file+ data T a -- abstract!+ type role T nominal++ -- Elsewhere+ foo :: Coercible (T a) (T b) => a -> b+ foo x = x++We must NOT allow foo to typecheck, because if we instantiate+T with a concrete data type with a phantom role would cause+Coercible (T a) (T b) to be provable. Fortunately, if T is not+representationally injective, we cannot make the inference that a ~N b if+T a ~R T b.++Unconditional role subtyping would be possible if we setup+an extra set of roles saying when we can project out coercions+(we call these proj-roles); then it would NOT be valid to instantiate T+with a data type at phantom since the proj-role subtyping check+would fail. See #13140 for more details.++One consequence of this is we get no role subtyping for non-abstract+data types in signatures. Suppose you have:++ signature A where+ type role T nominal+ data T a = MkT++If you write this, we'll treat T as injective, and make inferences+like T a ~R T b ==> a ~N b (mkSelCo). But if we can+subsequently replace T with one at phantom role, we would then be able to+infer things like T Int ~R T Bool which is bad news.++We could allow role subtyping here if we didn't treat *any* data types+defined in signatures as injective. But this would be a bit surprising,+replacing a data type in a module with one in a signature could cause+your code to stop typechecking (whereas if you made the type abstract,+it is more understandable that the type checker knows less).++It would have been best if this was purely a question of defaults+(i.e., a user could explicitly ask for one behavior or another) but+the current role system isn't expressive enough to do this.+Having explicit proj-roles would solve this problem.+-}++checkRoles :: HsBootOrSig -> TyCon -> [Role] -> BootErrsM BootTyConMismatch+checkRoles boot_or_sig tc1 r2+ | boot_or_sig == HsBoot+ || isInjectiveTyCon tc1 Representational -- See Note [Role subtyping]+ = check (r1 == r2) (TyConRoleMismatch False)+ | otherwise+ = check (r2 `rolesSubtypeOf` r1) (TyConRoleMismatch True)+ where++ r1 = tyConRoles tc1++ rolesSubtypeOf [] [] = True+ -- NB: this relation is the OPPOSITE of the subroling relation+ rolesSubtypeOf (x:xs) (y:ys) = x >= y && rolesSubtypeOf xs ys+ rolesSubtypeOf _ _ = False++{- Note [Synonyms implement abstract data]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+An abstract data type or class can be implemented using a type synonym,+but ONLY if:++ 1. T, as a standalone occurrence, is a valid type+ (T is "curryable"), and++ 2. T is valid in an instance head.++This gives rise to the following conditions under which we can implement+an abstract data declaration @data T@ using a type synonym @type T tvs = rhs@:++ 1. The type synonym T is nullary (tvs is null).++ 2. The rhs must not contain any foralls, quantified types, or type family+ applications.+ See 'invalidAbsDataSubTypes' which computes a collection of+ invalid subtypes.++See also 'HowAbstract' and Note [Skolem abstract data].+-}++-- | We are implementing an abstract data declaration of the form @data T@+-- in a signature file, with a type synonym @type T tvs = rhs@ in the+-- implementing module.+--+-- This function checks that the implementation is valid:+--+-- 1. the type synonym T is nullary, i.e. tvs is null,+-- 2. rhs doesn't contain any type families, foralls, or qualified types.+--+-- See Note [Synonyms implement abstract data]+checkSynAbsData :: TyCon -- ^ @tc1@, the abstract data 'TyCon' we are implementing+ -> TyCon -- ^ @tc2@, a type synonym @type T tvs = ty@+ -- we are using to implement @tc1@+ -> [TyVar] -- ^ @tvs@+ -> Type -- ^ @ty@+ -> BootErrsM BootTyConMismatch+checkSynAbsData tc1 tc2 syn_tvs syn_rhs+ -- We are implementing @data T@ with @type T tvs = rhs@.+ -- Check the conditions of Note [Synonyms implement abstract data].+ = do { -- (1): T is nullary.+ ; check (null syn_tvs) $+ SynAbstractData SynAbsDataTySynNotNullary+ -- (2): the RHS of the type synonym is valid.+ ; case invalidAbsDataSubTypes syn_rhs of+ [] -> checkSuccess+ err:errs -> bootErr $ SynAbstractData $+ SynAbstractDataInvalidRHS (err :| errs)+ -- NB: this allows implementing e.g. @data T :: Nat@ with @type T = 3@.+ -- See #15138.++ -- TODO: When it's a synonym implementing a class, we really+ -- should check that the fundeps are satisfied, but+ -- there is not an obvious way to do this for a constraint synonym.+ -- So for now, let it all through (it won't cause segfaults, anyway).+ -- Tracked at #12704.++ -- ... we also need to check roles.+ ; if | Just (tc2', args) <- tcSplitTyConApp_maybe syn_rhs+ , null syn_tvs -- Don't report role errors unless the type synonym is nullary+ -> assert (null (tyConRoles tc2)) $+ -- If we have something like:+ --+ -- signature H where+ -- data T a+ -- module H where+ -- data K a b = ...+ -- type T = K Int+ --+ -- we need to drop the first role of K when comparing!+ checkRoles Hsig tc1 (drop (length args) (tyConRoles tc2'))+ | otherwise+ -> checkSuccess+ }++{-+ -- Hypothetically, if we were allow to non-nullary type synonyms, here+ -- is how you would check the roles+ if length tvs == length roles1+ then checkRoles roles1 roles2+ else case tcSplitTyConApp_maybe ty of+ Just (tc2', args) ->+ checkRoles Hsig tc1 (drop (length args) (tyConRoles tc2') ++ roles2)+ Nothing -> Just roles_msg+-}++-- | Is this type a valid implementation of abstract data?+--+-- Returns a list of invalid sub-types encountered.+invalidAbsDataSubTypes :: Type -> [Type]+invalidAbsDataSubTypes = execWriter . go+ where+ go :: Type -> Writer [Type] ()+ go ty+ | Just ty' <- coreView ty+ = go ty'+ go TyVarTy{}+ = ok -- We report an error at the binding site of type variables,+ -- e.g. in the TySyn LHS or in the forall.+ -- It's not useful to report a second error for their occurrences+ go (AppTy t1 t2)+ = do { go t1; go t2 }+ go ty@(TyConApp tc tys)+ | isTypeFamilyTyCon tc+ = invalid ty+ | otherwise+ = mapM_ go tys+ go ty@(ForAllTy{})+ = invalid ty+ go ty@(FunTy af w t1 t2)+ | af == FTF_T_T+ = do { go w+ ; go (typeKind t1) ; go t1+ ; go (typeKind t2) ; go t2+ }+ | otherwise+ = invalid ty+ go LitTy{}+ = ok+ go ty@(CastTy{})+ = invalid ty+ go ty@(CoercionTy{})+ = invalid ty++ ok = pure ()+ invalid ty = tell [ty]++{-+************************************************************************+* *+ Type-checking the top level of a module (continued)+* *+************************************************************************+-}++rnTopSrcDecls :: HsGroup GhcPs -> TcM (TcGblEnv, HsGroup GhcRn)+-- Fails if there are any errors+rnTopSrcDecls group+ = do { -- Rename the source decls+ 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'+ | Just grp <- tcg_rn_decls tcg_env+ = tcg_env{ tcg_rn_decls = Just (appendGroups grp rn_decls) }+ | otherwise+ = tcg_env };++ -- Dump trace of renaming part+ rnDump rn_decls ;+ return (tcg_env', rn_decls)+ }++tcTopSrcDecls :: HsGroup GhcRn -> TcM (TcGblEnv, TcLclEnv)+tcTopSrcDecls (HsGroup { hs_tyclds = tycl_decls,+ hs_derivds = deriv_decls,+ hs_fords = foreign_decls,+ hs_defds = default_decls,+ hs_annds = annotation_decls,+ hs_ruleds = rule_decls,+ 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 ;++ -- Source-language instances, including derivings,+ -- and import the supporting declarations+ traceTc "Tc3" empty ;+ (tcg_env, inst_infos, th_bndrs,+ XValBindsLR (NValBinds deriv_binds deriv_sigs))+ <- tcTyClsInstDecls tycl_decls deriv_decls val_binds ;++ updLclCtxt (\tcl_env -> tcl_env { tcl_th_bndrs = th_bndrs `plusNameEnv` tcl_th_bndrs tcl_env }) $+ setGblEnv tcg_env $ do {++ -- Foreign import declarations next.+ traceTc "Tc4" empty ;+ (fi_ids, fi_decls, fi_gres) <- tcForeignImports foreign_decls ;+ tcExtendGlobalValEnv fi_ids $ do {++ -- Default declarations+ traceTc "Tc4a" empty ;+ default_tys <- tcDefaults default_decls ;+ updGblEnv (\gbl -> gbl { tcg_default = default_tys }) $ do {++ -- Value declarations next.+ -- It is important that we check the top-level value bindings+ -- before the GHC-generated derived bindings, since the latter+ -- may be defined in terms of the former. (For instance,+ -- the bindings produced in a Data instance.)+ traceTc "Tc5" empty ;+ tc_envs <- tcTopBinds val_binds val_sigs;+ restoreEnvs tc_envs $ do {++ -- Now GHC-generated derived bindings, generics, and selectors+ -- Do not generate warnings from compiler-generated code;+ -- hence the use of discardWarnings+ tc_envs@(tcg_env, tcl_env)+ <- discardWarnings (tcTopBinds deriv_binds deriv_sigs) ;+ restoreEnvs tc_envs $ do { -- Environment doesn't change now++ -- Second pass over class and instance declarations,+ -- now using the kind-checked decls+ traceTc "Tc6" empty ;+ inst_binds <- tcInstDecls2 (tyClGroupTyClDecls tycl_decls) inst_infos ;++ -- Foreign exports+ traceTc "Tc7" empty ;+ (foe_binds, foe_decls, foe_gres) <- tcForeignExports foreign_decls ;++ -- Annotations+ annotations <- tcAnnotations annotation_decls ;++ -- Rules+ rules <- tcRules rule_decls ;++ -- Wrap up+ traceTc "Tc7a" empty ;+ let { all_binds = inst_binds `unionBags`+ foe_binds++ ; fo_gres = fi_gres `unionBags` foe_gres+ ; fo_fvs = foldr (\gre fvs -> fvs `addOneFV` (greName gre))+ emptyFVs fo_gres++ ; sig_names = mkNameSet (collectHsValBinders CollNoDictBinders hs_val_binds)+ `minusNameSet` getTypeSigNames val_sigs++ -- Extend the GblEnv with the (as yet un-zonked)+ -- bindings, rules, foreign decls+ ; tcg_env' = tcg_env { tcg_binds = tcg_binds tcg_env `unionBags` all_binds+ , tcg_sigs = tcg_sigs tcg_env `unionNameSet` sig_names+ , tcg_rules = tcg_rules tcg_env+ ++ flattenRuleDecls rules+ , 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+ , tcg_dus = tcg_dus tcg_env `plusDU` usesOnly fo_fvs } } ;+ -- tcg_dus: see Note [Newtype constructor usage in foreign declarations]++ -- See Note [Newtype constructor usage in foreign declarations]+ addUsedGREs NoDeprecationWarnings (bagToList fo_gres) ;++ return (tcg_env', tcl_env)+ }}}}}}++tcTopSrcDecls _ = panic "tcTopSrcDecls: ValBindsIn"++---------------------------+tcTyClsInstDecls :: [TyClGroup GhcRn]+ -> [LDerivDecl GhcRn]+ -> [(RecFlag, LHsBinds GhcRn)]+ -> TcM (TcGblEnv, -- The full inst env+ [InstInfo GhcRn], -- Source-code instance decls to+ -- process; contains all dfuns for+ -- this module+ ThBindEnv, -- TH binding levels+ HsValBinds GhcRn) -- Supporting bindings for derived+ -- instances++tcTyClsInstDecls tycl_decls deriv_decls binds+ = tcAddDataFamConPlaceholders (tycl_decls >>= group_instds) $+ tcAddPatSynPlaceholders (getPatSynBinds binds) $+ do { (tcg_env, inst_info, deriv_info, th_bndrs)+ <- tcTyAndClassDecls tycl_decls ;+ ; setGblEnv tcg_env $ do {+ -- With the @TyClDecl@s and @InstDecl@s checked we're ready to+ -- process the deriving clauses, including data family deriving+ -- clauses discovered in @tcTyAndClassDecls@.+ --+ -- Careful to quit now in case there were instance errors, so that+ -- the deriving errors don't pile up as well.+ ; failIfErrsM+ ; (tcg_env', inst_info', val_binds)+ <- tcInstDeclsDeriv deriv_info deriv_decls+ ; setGblEnv tcg_env' $ do {+ failIfErrsM+ ; pure ( tcg_env', inst_info' ++ inst_info, th_bndrs, val_binds )+ }}}++{- *********************************************************************+* *+ Checking for 'main'+* *+************************************************************************+-}++checkMainType :: TcGblEnv -> TcRn WantedConstraints+-- If this is the Main module, and it defines a function main,+-- check that its type is of form IO tau.+-- If not, do nothing+-- See Note [Dealing with main]+checkMainType tcg_env+ = do { hsc_env <- getTopEnv+ ; if tcg_mod tcg_env /= mainModIs (hsc_HUE hsc_env)+ then return emptyWC else++ do { rdr_env <- getGlobalRdrEnv+ ; let dflags = hsc_dflags hsc_env+ main_occ = getMainOcc dflags+ main_gres = lookupGRE rdr_env (LookupOccName main_occ SameNameSpace)+ ; case filter isLocalGRE main_gres of {+ [] -> return emptyWC ;+ (_:_:_) -> return emptyWC ;+ [main_gre] ->++ do { let main_name = greName main_gre+ ctxt = FunSigCtxt main_name NoRRC+ ; main_id <- tcLookupId main_name+ ; (io_ty,_) <- getIOType+ ; let main_ty = idType main_id+ eq_orig = TypeEqOrigin { uo_actual = main_ty+ , uo_expected = io_ty+ , uo_thing = Nothing+ , uo_visible = True }+ ; (_, lie) <- captureTopConstraints $+ setMainCtxt main_name io_ty $+ tcSubTypeSigma eq_orig ctxt main_ty io_ty+ ; return lie } } } }++checkMain :: Bool -- False => no 'module M(..) where' header at all+ -> Maybe (LocatedL [LIE GhcPs]) -- Export specs of Main module+ -> TcM TcGblEnv+-- If we are in module Main, check that 'main' is exported,+-- and generate the runMainIO binding that calls it+-- See Note [Dealing with main]+checkMain explicit_mod_hdr export_ies+ = do { hsc_env <- getTopEnv+ ; tcg_env <- getGblEnv++ ; let dflags = hsc_dflags hsc_env+ main_mod = mainModIs (hsc_HUE hsc_env)+ main_occ = getMainOcc dflags++ exported_mains :: [Name]+ -- Exported things that are called 'main'+ exported_mains = [ name | avail <- tcg_exports tcg_env+ , name <- availNames avail+ , nameOccName name == main_occ ]++ ; if | tcg_mod tcg_env /= main_mod+ -> -- Not the main module+ return tcg_env++ | [main_name] <- exported_mains+ -> -- The module indeed exports a function called 'main'+ generateMainBinding tcg_env main_name++ | otherwise+ -> assert (null exported_mains) $+ -- A fully-checked export list can't contain more+ -- than one function with the same OccName+ do { complain_no_main dflags main_mod main_occ+ ; return tcg_env } }+ where+ complain_no_main dflags main_mod main_occ+ = unless (interactive && not explicit_mod_hdr) $+ addErrTc (noMainMsg main_mod main_occ) -- #12906+ where+ interactive = ghcLink dflags == LinkInMemory+ -- Without an explicit module header...+ -- in interactive mode, don't worry about the absence of 'main'.+ -- in other modes, add error message and go on with typechecking.++ noMainMsg main_mod main_occ+ = TcRnMissingMain explicit_export_list main_mod main_occ+ explicit_export_list = explicit_mod_hdr && isJust export_ies++-- | Get the unqualified name of the function to use as the \"main\" for the main module.+-- Either returns the default name or the one configured on the command line with -main-is+getMainOcc :: DynFlags -> OccName+getMainOcc dflags = case mainFunIs dflags of+ Just fn -> mkVarOccFS (mkFastString fn)+ Nothing -> mkVarOccFS (fsLit "main")++generateMainBinding :: TcGblEnv -> Name -> TcM TcGblEnv+-- There is a single exported 'main' function, called 'foo' (say),+-- which may be locally defined or imported+-- Define and typecheck the binding+-- :Main.main :: IO res_ty = runMainIO res_ty foo+-- This wraps the user's main function in the top-level stuff+-- defined in runMainIO (eg catching otherwise un-caught exceptions)+-- See Note [Dealing with main]+generateMainBinding tcg_env main_name = do+ { traceTc "checkMain found" (ppr main_name)+ ; (io_ty, res_ty) <- getIOType+ ; let loc = getSrcSpan main_name+ main_expr_rn = L (noAnnSrcSpan loc) (HsVar noExtField (L (noAnnSrcSpan loc) main_name))+ ; (ev_binds, main_expr) <- setMainCtxt main_name io_ty $+ tcCheckMonoExpr main_expr_rn io_ty++ -- See Note [Root-main Id]+ -- Construct the binding+ -- :Main.main :: IO res_ty = runMainIO res_ty main+ ; run_main_id <- tcLookupId runMainIOName+ ; let { root_main_name = mkExternalName rootMainKey rOOT_MAIN+ (mkVarOccFS (fsLit "main"))+ (getSrcSpan main_name)+ ; root_main_id = Id.mkExportedVanillaId root_main_name io_ty+ ; co = mkWpTyApps [res_ty]+ -- The ev_binds of the `main` function may contain deferred+ -- type errors 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 #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+ , tcg_binds = tcg_binds tcg_env+ `snocBag` main_bind+ , tcg_dus = tcg_dus tcg_env+ `plusDU` usesOnly (unitFV main_name) })+ -- Record the use of 'main', so that we don't+ -- complain about it being defined but not used+ }++getIOType :: TcM (TcType, TcType)+-- Return (IO alpha, alpha) for fresh alpha+getIOType = do { ioTyCon <- tcLookupTyCon ioTyConName+ ; res_ty <- newFlexiTyVarTy liftedTypeKind+ ; return (mkTyConApp ioTyCon [res_ty], res_ty) }++setMainCtxt :: Name -> TcType -> TcM a -> TcM (TcEvBinds, a)+setMainCtxt main_name io_ty thing_inside+ = setSrcSpan (getSrcSpan main_name) $+ addErrCtxt main_ctxt $+ checkConstraints skol_info [] [] $ -- Builds an implication if necessary+ thing_inside -- e.g. with -fdefer-type-errors+ where+ skol_info = SigSkol (FunSigCtxt main_name NoRRC) io_ty []+ main_ctxt = text "When checking the type of the"+ <+> ppMainFn (nameOccName main_name)++{- Note [Dealing with main]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Dealing with the 'main' declaration is surprisingly tricky. Here are+the moving parts:++* The flag -main-is=M.foo allows you to set the main module to 'M',+ and the main function to 'foo'. We access them through+ mainModIs :: HscEnv -> Module -- returns M+ getMainOcc :: DynFlags -> OccName -- returns foo+ Of course usually M = Main, and foo = main.++* checkMainType: when typechecking module M, we add an extra check that+ foo :: IO tau, for some type tau.+ This avoids getting ambiguous-type errors from the monomorphism restriction+ applying to things like+ main = return ()+ Note that checkMainType does not consult the export list because+ we have not yet done rnExports (and can't do it until later).++* rnExports: checks the export list. Very annoyingly, we can only do+ this after running any finalisers, which may add new declarations.+ That's why checkMainType and checkMain have to be separate.++* checkMain: does two things:+ - check that the export list does indeed export something called 'foo'+ - generateMainBinding: generate the root-main binding+ :Main.main = runMainIO M.foo+ See Note [Root-main Id]++An annoying consequence of having both checkMainType and checkMain is+that, when (but only when) -fdefer-type-errors is on, we may report an+ill-typed 'main' twice (as warnings): once in checkMainType and once+in checkMain. See test typecheck/should_fail/T13292.++We have the following tests to check this processing:+----------------+----------------------------------------------------------------------------------++ | Module Header: |+ +-------------+-------------+-------------+-------------+-------------+------------++ | module | module Main | <No Header> | module Main |module |module Main |+ | Main(main) | | | (module X)| Main () | (Sub.main)|+----------------+==================================================================================++`main` function | ERROR: | Main.main | ERROR: | Main.main | ERROR: | Sub.main |+in Main module | Ambiguous | | Ambiguous | | `main` not | |+and in imported | | | | | exported | |+module Sub. | T19397E1 | T16453M0 | T19397E2 | T16453M3 | | T16453M1 |+ | | | | X = Main | Remark 2) | |+----------------+-------------+-------------+-------------+-------------+-------------+------------++`main`function | Sub.main | ERROR: | Sub.main | Sub.main | ERROR: | Sub.main |+only in imported| | No `main` in| | | `main` not | |+submodule Sub. | | `Main` | | | exported | |+ | T19397M0 | T16453E1 | T19397M1 | T16453M4 | | T16453M5 |+ | | | | X = Sub | Remark 2) | |+----------------+-------------+-------------+-------------+-------------+-------------+------------++`foo` function | Sub.foo | ERROR: | Sub.foo | Sub.foo | ERROR: | Sub.foo |+in submodule | | No `foo` in | | | `foo` not | |+Sub. | | `Main` | | | exported | |+GHC option: | | | | | | |+ -main-is foo | T19397M2 | T19397E3 | T19397M3 | T19397M4 | T19397E4 | T16453M6 |+ | Remark 1) | | | X = Sub | | Remark 3) |+----------------+-------------+-------------+-------------+-------------+-------------+------------+++Remarks:+* The first line shows the exported `main` function or the error.+* The second line shows the coresponding test case.+* The module `Sub` contains the following functions:+ main :: IO ()+ foo :: IO ()+* Remark 1) Here the header is `Main (foo)`.+* Remark 2) Here we have no extra test case. It would exercise the same code path as `T19397E4`.+* Remark 3) Here the header is `Main (Sub.foo)`.+++Note [Root-main Id]+~~~~~~~~~~~~~~~~~~~+The function that the RTS invokes is always :Main.main, which we call+root_main_id. (Because GHC allows the user to have a module not+called Main as the main module, we can't rely on the main function+being called "Main.main". That's why root_main_id has a fixed module+":Main".)++This is unusual: it's a LocalId whose Name has a Module from another+module. Tiresomely, we must filter it out again in GHC.Iface.Make, less we+get two defns for 'main' in the interface file!++When using `-fwrite-if-simplified-core` the root_main_id can end up in an interface file.+When the interface is read back in we have to add a special case when creating the+Id because otherwise we would go looking for the :Main module which obviously doesn't+exist. For this logic see GHC.IfaceToCore.mk_top_id.++There is also some similar (probably dead) logic in GHC.Rename.Env which says it+was added for External Core which faced a similar issue.+++*********************************************************+* *+ GHCi stuff+* *+*********************************************************+-}++runTcInteractive :: HscEnv -> TcRn a -> IO (Messages TcRnMessage, Maybe a)+-- Initialise the tcg_inst_env with instances from all home modules.+-- This mimics the more selective call to hptInstances in tcRnImports+runTcInteractive hsc_env thing_inside+ = initTcInteractive hsc_env $ withTcPlugins hsc_env $+ withDefaultingPlugins hsc_env $ withHoleFitPlugins hsc_env $+ do { traceTc "setInteractiveContext" $+ vcat [ text "ic_tythings:" <+> vcat (map ppr (ic_tythings icxt))+ , text "ic_insts:" <+> vcat (map (pprBndr LetBind . instanceDFunId) (instEnvElts ic_insts))+ , text "icReaderEnv (LocalDef)" <+>+ vcat (map ppr [ local_gres | gres <- nonDetOccEnvElts (icReaderEnv icxt)+ , let local_gres = filter isLocalGRE gres+ , not (null local_gres) ]) ]++ ; let getOrphans m mb_pkg = fmap (\iface -> mi_module iface+ : dep_orphs (mi_deps iface))+ (loadSrcInterface (text "runTcInteractive") m+ NotBoot mb_pkg)++ ; !orphs <- fmap (force . concat) . forM (ic_imports icxt) $ \i ->+ case i of -- force above: see #15111+ IIModule n -> getOrphans n NoPkgQual+ IIDecl i -> getOrphans (unLoc (ideclName i))+ (renameRawPkgQual (hsc_unit_env hsc_env) (unLoc $ ideclName i) (ideclPkgQual i))++ ; let imports = emptyImportAvails { imp_orphs = orphs }++ upd_envs (gbl_env, lcl_env) = (gbl_env', lcl_env')++ where+ gbl_env' = gbl_env+ { tcg_rdr_env = icReaderEnv icxt+ , tcg_type_env = type_env+ , tcg_inst_env = tcg_inst_env gbl_env `unionInstEnv` ic_insts `unionInstEnv` home_insts+ , tcg_fam_inst_env = extendFamInstEnvList+ (extendFamInstEnvList (tcg_fam_inst_env gbl_env)+ ic_finsts)+ home_fam_insts+ , tcg_fix_env = ic_fix_env icxt+ , tcg_default = ic_default icxt+ -- must calculate imp_orphs of the ImportAvails+ -- so that instance visibility is done correctly+ , tcg_imports = imports }++ lcl_env' = modifyLclCtxt (tcExtendLocalTypeEnv lcl_ids) lcl_env++ ; updEnvs upd_envs thing_inside }+ where+ (home_insts, home_fam_insts) = hptAllInstances hsc_env++ icxt = hsc_IC hsc_env+ (ic_insts, ic_finsts) = ic_instances icxt+ (lcl_ids, top_ty_things) = partitionWith is_closed (ic_tythings icxt)++ is_closed :: TyThing -> Either (Name, TcTyThing) TyThing+ -- Put Ids with free type variables (always RuntimeUnks)+ -- in the *local* type environment+ -- See Note [Initialising the type environment for GHCi]+ is_closed thing+ | AnId id <- thing+ , not (isTypeClosedLetBndr id)+ = Left (idName id, ATcId { tct_id = id+ , tct_info = NotLetBound })+ | otherwise+ = Right thing++ type_env1 = mkTypeEnvWithImplicits top_ty_things+ type_env = extendTypeEnvWithIds type_env1+ $ map instanceDFunId (instEnvElts ic_insts)+ -- Putting the dfuns in the type_env+ -- is just to keep Core Lint happy++{- Note [Initialising the type environment for GHCi]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+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++However the GHCi debugger creates top-level bindings for Ids whose+types have free RuntimeUnk skolem variables, standing for unknown+types. If we don't register these free TyVars as global TyVars then+the typechecker will try to quantify over them and fall over in+skolemiseQuantifiedTyVar. so we must add any free TyVars to the+typechecker's global TyVar set. That is done by using+tcExtendLocalTypeEnv.++We do this by splitting out the Ids with open types, using 'is_closed'+to do the partition. The top-level things go in the global TypeEnv;+the open, NotTopLevel, Ids, with free RuntimeUnk tyvars, go in the+local TypeEnv.++Note that we don't extend the local RdrEnv (tcl_rdr); all the in-scope+things are already in the interactive context's GlobalRdrEnv.+Extending the local RdrEnv isn't terrible, but it means there is an+entry for the same Name in both global and local RdrEnvs, and that+lead to duplicate "perhaps you meant..." suggestions (e.g. T5564).++We don't bother with the tcl_th_bndrs environment either.+-}++-- | The returned [Id] is the list of new Ids bound by this statement. It can+-- be used to extend the InteractiveContext via extendInteractiveContext.+--+-- The returned TypecheckedHsExpr is of type IO [ Any ], a list of the bound+-- values, coerced to Any.+tcRnStmt :: HscEnv -> GhciLStmt GhcPs+ -> IO (Messages TcRnMessage, Maybe ([Id], LHsExpr GhcTc, FixityEnv))+tcRnStmt hsc_env rdr_stmt+ = runTcInteractive hsc_env $ do {++ -- The real work is done here+ ((bound_ids, tc_expr), fix_env) <- tcUserStmt rdr_stmt ;+ zonked_expr <- zonkTopLExpr tc_expr ;+ zonked_ids <- zonkTopBndrs bound_ids ;++ failIfErrsM ; -- we can't do the next step if there are+ -- representation polymorphism errors+ -- test case: ghci/scripts/T13202{,a}++ -- None of the Ids should be of unboxed type, because we+ -- cast them all to HValues in the end!+ mapM_ (addErr . TcRnGhciUnliftedBind) $+ filter (mightBeUnliftedType . idType) zonked_ids ;++ traceTc "tcs 1" empty ;+ this_mod <- getModule ;+ global_ids <- mapM (externaliseAndTidyId this_mod) zonked_ids ;+ -- Note [Interactively-bound Ids in GHCi] in GHC.Driver.Env++ traceOptTcRn Opt_D_dump_tc+ (vcat [text "Bound Ids" <+> pprWithCommas ppr global_ids,+ text "Typechecked expr" <+> ppr zonked_expr]) ;++ return (global_ids, zonked_expr, fix_env)+ }++{-+--------------------------------------------------------------------------+ Typechecking Stmts in GHCi++Here is the grand plan, implemented in tcUserStmt++ What you type The IO [HValue] that hscStmt returns+ ------------- ------------------------------------+ let pat = expr ==> let pat = expr in return [coerce HVal x, coerce HVal y, ...]+ bindings: [x,y,...]++ pat <- expr ==> expr >>= \ pat -> return [coerce HVal x, coerce HVal y, ...]+ bindings: [x,y,...]++ expr (of IO type) ==> expr >>= \ it -> return [coerce HVal it]+ [NB: result not printed] bindings: [it]++ expr (of non-IO type, ==> let it = expr in print it >> return [coerce HVal it]+ result showable) bindings: [it]++ expr (of non-IO type,+ result not showable) ==> error+-}++-- | A plan is an attempt to lift some code into the IO monad.+type PlanResult = ([Id], LHsExpr GhcTc)+type Plan = TcM PlanResult++-- | Try the plans in order. If one fails (by raising an exn), try the next.+-- If one succeeds, take it.+runPlans :: NonEmpty Plan -> Plan+runPlans = foldr1 (flip tryTcDiscardingErrs)++-- | Typecheck (and 'lift') a stmt entered by the user in GHCi into the+-- GHCi 'environment'.+--+-- By 'lift' and 'environment we mean that the code is changed to+-- execute properly in an IO monad. See Note [Interactively-bound Ids+-- in GHCi] in GHC.Driver.Env for more details. We do this lifting by trying+-- different ways ('plans') of lifting the code into the IO monad and+-- type checking each plan until one succeeds.+tcUserStmt :: GhciLStmt GhcPs -> TcM (PlanResult, FixityEnv)++-- An expression typed at the prompt is treated very specially+tcUserStmt (L loc (BodyStmt _ expr _ _))+ = do { (rn_expr, fvs) <- checkNoErrs (rnLExpr expr)++ ; dumpOptTcRn Opt_D_dump_rn_ast "Renamer" FormatHaskell+ (showAstData NoBlankSrcSpan NoBlankEpAnnotations rn_expr)+ -- Don't try to typecheck if the renamer fails!+ ; ghciStep <- getGhciStepIO+ ; uniq <- newUnique+ ; let loc' = noAnnSrcSpan $ locA loc+ ; interPrintName <- getInteractivePrintName+ ; let fresh_it = itName uniq (locA loc)+ matches = [mkMatch (mkPrefixFunRhs (L loc' fresh_it)) [] rn_expr+ emptyLocalBinds]+ -- [it = expr]+ 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 noAnn $ HsValBinds noAnn+ $ XValBindsLR+ (NValBinds [(NonRecursive,unitBag the_bind)] [])++ -- [it <- e]+ bind_stmt = L loc $ BindStmt+ (XBindStmtRn+ { xbsrn_bindOp = mkRnSyntaxExpr bindIOName+ , xbsrn_failOp = Nothing+ })+ (L loc (VarPat noExtField (L loc' fresh_it)))+ (nlHsApp ghciStep rn_expr)++ -- [; print it]+ print_it = L loc $ BodyStmt noExtField+ (nlHsApp (nlHsVar interPrintName)+ (nlHsVar fresh_it))+ (mkRnSyntaxExpr thenIOName)+ noSyntaxExpr++ -- NewA+ no_it_a = L loc $ BodyStmt noExtField (nlHsApps bindIOName+ [rn_expr , nlHsVar interPrintName])+ (mkRnSyntaxExpr thenIOName)+ noSyntaxExpr++ no_it_b = L loc $ BodyStmt noExtField (rn_expr)+ (mkRnSyntaxExpr thenIOName)+ noSyntaxExpr++ no_it_c = L loc $ BodyStmt noExtField+ (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 <- liftZonkM $ zonkTcType (idType it_id)+ ; when (isUnitTy it_ty) failM+ ; return stuff } :|++ -- Plan B; a naked bind statement+ [ tcGhciStmts [bind_stmt]++ -- Plan C; check that the let-binding is typeable all by itself.+ -- If not, fail; if so, try to print it.+ -- The two-step process avoids getting two errors: one from+ -- the expression itself, and one from the 'print it' part+ -- This two-step story is very clunky, alas+ , do { _ <- checkNoErrs (tcGhciStmts [let_stmt])+ --- 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++ ; dumpOptTcRn Opt_D_dump_tc_ast "Typechecker AST" FormatHaskell+ (showAstData NoBlankSrcSpan NoBlankEpAnnotations plan)++ ; 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.++#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 discussion in #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 (HsDoStmt GhciStmtCtxt) rnExpr [rdr_stmt] $ \_ -> do+ fix_env <- getFixityEnv+ return (fix_env, emptyFVs)+ -- Don't try to typecheck if the renamer fails!+ ; traceRn "tcRnStmt" (vcat [ppr rdr_stmt, ppr rn_stmt, ppr fvs])+ ; rnDump rn_stmt ;++ ; ghciStep <- getGhciStepIO+ ; let gi_stmt+ | (L loc (BindStmt x pat expr)) <- rn_stmt+ = L loc $ BindStmt x pat (nlHsApp ghciStep expr)+ | otherwise = rn_stmt++ ; opt_pr_flag <- goptM Opt_PrintBindResult+ ; let print_result_plan+ | opt_pr_flag -- The flag says "print result"+ , [v] <- collectLStmtBinders CollNoDictBinders gi_stmt -- One binder+ = Just $ mk_print_result_plan gi_stmt v+ | otherwise = Nothing++ -- The plans are:+ -- [stmt; print v] if one binder and not v::()+ -- [stmt] otherwise+ ; plan <- runPlans $ maybe id (NE.<|) print_result_plan $ NE.singleton $ tcGhciStmts [gi_stmt]+ ; return (plan, fix_env) }+ where+ mk_print_result_plan stmt v+ = do { stuff@([v_id], _) <- tcGhciStmts [stmt, print_v]+ ; v_ty <- liftZonkM $ zonkTcType (idType v_id)+ ; when (isUnitTy v_ty || not (isTauTy v_ty)) failM+ ; return stuff }+ where+ print_v = L loc $ BodyStmt noExtField (nlHsApp (nlHsVar printName)+ (nlHsVar v))+ (mkRnSyntaxExpr thenIOName) noSyntaxExpr++{-+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.+-}++any_lifted :: Type+any_lifted = anyTypeOfKind liftedTypeKind++-- | Typecheck the statements given and then return the results of the+-- statement in the form 'IO [Any]'.+tcGhciStmts :: [GhciLStmt GhcRn] -> TcM PlanResult+tcGhciStmts stmts+ = do { ioTyCon <- tcLookupTyCon ioTyConName+ ; ret_id <- tcLookupId returnIOName -- return @ IO+ ; let ret_ty = mkListTy any_lifted+ io_ret_ty = mkTyConApp ioTyCon [ret_ty]+ tc_io_stmts = tcStmtsAndThen (HsDoStmt GhciStmtCtxt) tcDoStmt stmts+ (mkCheckExpType io_ret_ty)+ names = collectLStmtsBinders CollNoDictBinders stmts++ -- OK, we're ready to typecheck the stmts+ ; traceTc "GHC.Tc.Module.tcGhciStmts: tc stmts" empty+ ; ((tc_stmts, ids), lie) <- captureTopConstraints $+ tc_io_stmts $ \ _ ->+ mapM tcLookupId names+ -- Look up the names right in the middle,+ -- where they will all be in scope++ -- Simplify the context+ ; traceTc "GHC.Tc.Module.tcGhciStmts: simplify ctxt" empty+ ; const_binds <- checkNoErrs (simplifyInteractive lie)+ -- checkNoErrs ensures that the plan fails if context redn fails+++ ; traceTc "GHC.Tc.Module.tcGhciStmts: done" empty++ -- ret_expr is the expression+ -- returnIO @[Any] [unsafeCoerce# @Any x, .., unsafeCoerce# @Any z]+ --+ -- Despite the inconvenience of building the type applications etc,+ -- this *has* to be done in type-annotated post-typecheck form+ -- because we are going to return a list of *polymorphic* values+ -- coerced to type Any. If we built a *source* stmt+ -- return [coerce x, ..., coerce z]+ -- then the type checker would instantiate x..z, and we wouldn't+ -- get their *polymorphic* values. (And we'd get ambiguity errs+ -- if they were overloaded, since they aren't applied to anything.)+ --+ -- We use Any rather than a dummy type such as () because of+ -- the rules of unsafeCoerce#; see Unsafe/Coerce.hs for the details.++ ; AnId unsafe_coerce_id <- tcLookupGlobal unsafeCoercePrimName+ -- We use unsafeCoerce# here because of (U11) in+ -- Note [Implementing unsafeCoerce] in base:Unsafe.Coerce++ ; let ret_expr = nlHsApp (nlHsTyApp ret_id [ret_ty]) $+ noLocA $ ExplicitList any_lifted $+ map mk_item ids++ mk_item id = unsafe_coerce_id `nlHsTyApp` [ getRuntimeRep (idType id)+ , getRuntimeRep any_lifted+ , idType id, any_lifted]+ `nlHsApp` nlHsVar id+ stmts = tc_stmts ++ [noLocA (mkLastStmt ret_expr)]++ ; return (ids, mkHsDictLet (EvBinds const_binds) $+ noLocA (HsDo io_ret_ty GhciStmtCtxt (noLocA stmts)))+ }++-- | Generate a typed ghciStepIO expression (ghciStep :: Ty a -> IO a)+getGhciStepIO :: TcM (LHsExpr GhcRn)+getGhciStepIO = do+ ghciTy <- getGHCiMonad+ a_tv <- newName (mkTyVarOccFS (fsLit "a"))+ let ghciM = nlHsAppTy (nlHsTyVar NotPromoted ghciTy) (nlHsTyVar NotPromoted a_tv)+ ioM = nlHsAppTy (nlHsTyVar NotPromoted ioTyConName) (nlHsTyVar NotPromoted a_tv)++ step_ty :: LHsSigType GhcRn+ step_ty = noLocA $ HsSig+ { sig_bndrs = HsOuterImplicit{hso_ximplicit = [a_tv]}+ , sig_ext = noExtField+ , sig_body = nlHsFunTy ghciM ioM }++ stepTy :: LHsSigWcType GhcRn+ stepTy = mkEmptyWildCardBndrs step_ty++ return (noLocA $ ExprWithTySig noExtField (nlHsVar ghciStepIoMName) stepTy)++isGHCiMonad :: HscEnv -> String -> IO (Messages TcRnMessage, Maybe Name)+isGHCiMonad hsc_env ty+ = runTcInteractive hsc_env $ do+ rdrEnv <- getGlobalRdrEnv+ let occIO = lookupOccEnv rdrEnv (mkOccName tcName ty)+ case occIO of+ Just [n] -> do+ let name = greName n+ ghciClass <- tcLookupClass ghciIoClassName+ userTyCon <- tcLookupTyCon name+ let userTy = mkTyConApp userTyCon []+ _ <- tcLookupInstance ghciClass [userTy]+ return name+ _ -> failWithTc $ TcRnGhciMonadLookupFail ty occIO++-- | How should we infer a type? See Note [TcRnExprMode]+data TcRnExprMode = TM_Inst -- ^ Instantiate inferred quantifiers only (:type)+ | TM_Default -- ^ Instantiate all quantifiers,+ -- and do eager defaulting (:type +d)++-- | tcRnExpr just finds the type of an expression+-- for :type+tcRnExpr :: HscEnv+ -> TcRnExprMode+ -> LHsExpr GhcPs+ -> IO (Messages TcRnMessage, Maybe Type)+tcRnExpr hsc_env mode rdr_expr+ = runTcInteractive hsc_env $+ do {++ (rn_expr, _fvs) <- rnLExpr rdr_expr ;+ failIfErrsM ;++ -- Typecheck the expression+ ((tclvl, res_ty), lie)+ <- captureTopConstraints $+ pushTcLevelM $+ tcInferSigma inst rn_expr ;++ -- Generalise+ uniq <- newUnique ;+ let { fresh_it = itName uniq (getLocA rdr_expr) } ;+ ((qtvs, dicts, _, _), residual)+ <- captureConstraints $+ simplifyInfer tclvl infer_mode+ [] {- No sig vars -}+ [(fresh_it, res_ty)]+ lie ;++ -- Ignore the dictionary bindings+ _ <- perhaps_disable_default_warnings $+ simplifyInteractive residual ;++ let { all_expr_ty = mkInfForAllTys qtvs $+ mkPhiTy (map idType dicts) res_ty } ;+ ty <- liftZonkM $ zonkTcType all_expr_ty ;++ -- See Note [Normalising the type in :type]+ fam_envs <- tcGetFamInstEnvs ;+ let { normalised_type = reductionReducedType $ normaliseType fam_envs Nominal ty+ -- normaliseType returns a coercion which we discard, so the Role is irrelevant.+ ; final_type = if isSigmaTy res_ty then ty else normalised_type } ;+ return final_type }+ where+ -- Optionally instantiate the type of the expression+ -- See Note [TcRnExprMode]+ (inst, infer_mode, perhaps_disable_default_warnings) = case mode of+ TM_Inst -> (False, NoRestrictions, id)+ TM_Default -> (True, EagerDefaulting, unsetWOptM Opt_WarnTypeDefaults)++{- Note [Implementing :type]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider :type const++We want forall a b. a -> b -> a+and not forall {a}{b}. a -> b -> a++The latter is what we'd get if we eagerly instantiated and then+re-generalised with Inferred binders. It makes a difference, because+it tells us we where we can use Visible Type Application (VTA).++And also for :type const @Int+we want forall b. Int -> b -> Int+and not forall {b}. Int -> b -> Int++Solution: use tcInferSigma, which in turn uses tcInferApp, which+has a special case for application chains.++Note [Normalising the type in :type]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In :t <expr> we usually normalise the type (to simplify type functions)+before displaying the result. Reason (see #10321): otherwise we may show+types like+ <expr> :: Vec (1+2) Int+rather than the simpler+ <expr> :: Vec 3 Int+In GHC.Tc.Gen.Bind.mkInferredPolyId we normalise for a very similar reason.++However this normalisation is less helpful when <expr> is just+an identifier, whose user-written type happens to contain type-function+applications. E.g. (#20974)+ test :: F [Monad, A, B] m => m ()+where F is a type family. If we say `:t test`, we'd prefer to see+the type family un-expanded.++We adopt the following ad-hoc solution: if the type inferred for <expr>+(before generalisation, namely res_ty) is a SigmaType (i.e. is not+fully instantiated) then do not normalise; otherwise normalise.+This is not ideal; for example, suppose x :: F Int. Then+ :t x+would be normalised because `F Int` is not a SigmaType. But+anything here is ad-hoc, and it's a user-sought improvement.+-}++--------------------------+tcRnImportDecls :: HscEnv+ -> [LImportDecl GhcPs]+ -> IO (Messages TcRnMessage, Maybe GlobalRdrEnv)+-- Find the new chunk of GlobalRdrEnv created by this list of import+-- decls. In contract tcRnImports *extends* the TcGblEnv.+tcRnImportDecls hsc_env import_decls+ = runTcInteractive hsc_env $+ do { gbl_env <- updGblEnv zap_rdr_env $+ tcRnImports hsc_env $ map (,text "is directly imported") import_decls+ ; return (tcg_rdr_env gbl_env) }+ where+ zap_rdr_env gbl_env = gbl_env { tcg_rdr_env = emptyGlobalRdrEnv }++-- tcRnType just finds the kind of a type+tcRnType :: HscEnv+ -> ZonkFlexi+ -> Bool -- Normalise the returned type+ -> LHsType GhcPs+ -> IO (Messages TcRnMessage, Maybe (Type, Kind))+tcRnType hsc_env flexi normalise rdr_type+ = runTcInteractive hsc_env $+ setXOptM LangExt.PolyKinds $ -- See Note [Kind-generalise in tcRnType]+ do { (HsWC { hswc_ext = wcs, hswc_body = rn_sig_type@(L _ (HsSig{sig_bndrs = outer_bndrs, sig_body = body })) }, _fvs)+ -- we are using 'rnHsSigWcType' to bind the unbound type variables+ -- and in combination with 'tcOuterTKBndrs' we are able to+ -- implicitly quantify them as if the user wrote 'forall' by+ -- hand (see #19217). This allows kind check to work in presence+ -- of free type variables :+ -- ghci> :k [a]+ -- [a] :: *+ <- rnHsSigWcType GHCiCtx (mkHsWildCardBndrs $ noLocA (mkHsImplicitSigType rdr_type))+ -- The type can have wild cards, but no implicit+ -- generalisation; e.g. :kind (T _)+ ; failIfErrsM++ -- We follow Note [Recipe for checking a signature] in GHC.Tc.Gen.HsType here++ -- Now kind-check the type+ -- It can have any rank or kind+ -- First bring into scope any wildcards+ ; traceTc "tcRnType" (vcat [ppr wcs, ppr rn_sig_type])+ ; si <- mkSkolemInfo $ SigTypeSkol (GhciCtxt True)+ ; ((_, (ty, kind)), wanted)+ <- captureTopConstraints $+ pushTcLevelM_ $+ bindNamedWildCardBinders wcs $ \ wcs' ->+ do { mapM_ emitNamedTypeHole wcs'+ ; tcOuterTKBndrs si outer_bndrs $ tcInferLHsTypeUnsaturated body }+ -- Since all the wanteds are equalities, the returned bindings will be empty+ ; empty_binds <- simplifyTop wanted+ ; massertPpr (isEmptyBag empty_binds) (ppr empty_binds)++ -- Do kind generalisation; see Note [Kind-generalise in tcRnType]+ ; kvs <- kindGeneralizeAll unkSkol kind++ ; ty <- initZonkEnv flexi $ zonkTcTypeToTypeX ty++ -- Do validity checking on type+ ; checkValidType (GhciCtxt True) ty++ -- Optionally (:k vs :k!) normalise the type. Does two things:+ -- normaliseType: expand type-family applications+ -- expandTypeSynonyms: expand type synonyms (#18828)+ ; fam_envs <- tcGetFamInstEnvs+ ; let ty' | normalise = expandTypeSynonyms $ reductionReducedType $+ normaliseType fam_envs Nominal ty+ | otherwise = ty++ ; traceTc "tcRnExpr" (debugPprType ty $$ debugPprType ty')+ ; return (ty', mkInfForAllTys kvs (typeKind ty')) }+++{- Note [TcRnExprMode]+~~~~~~~~~~~~~~~~~~~~~~+How should we infer a type when a user asks for the type of an expression e+at the GHCi prompt? We offer 2 different possibilities, described below. Each+considers this example, with -fprint-explicit-foralls enabled. See also+https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0179-printing-foralls.rst++:type / TM_Inst++ In this mode, we report the type obtained by instantiating only the+ /inferred/ quantifiers of e's type, solving constraints, and+ re-generalising, as discussed in #11376.++ > :type reverse+ reverse :: forall a. [a] -> [a]++ -- foo :: forall a f b. (Show a, Num b, Foldable f) => a -> f b -> String+ > :type foo @Int+ forall f b. (Show Int, Num b, Foldable f) => Int -> f b -> String++ Note that Show Int is still reported, because the solver never got a chance+ to see it.++:type +d / TM_Default++ This mode is for the benefit of users who wish to see instantiations+ of generalized types, and in particular to instantiate Foldable and+ Traversable. In this mode, all type variables (inferred or+ specified) are instantiated. Because GHCi uses+ -XExtendedDefaultRules, this means that Foldable and Traversable are+ defaulted.++ > :type +d reverse+ reverse :: forall {a}. [a] -> [a]++ -- foo :: forall a f b. (Show a, Num b, Foldable f) => a -> f b -> String+ > :type +d foo @Int+ Int -> [Integer] -> String++ Note that this mode can sometimes lead to a type error, if a type variable is+ used with a defaultable class but cannot actually be defaulted:++ bar :: (Num a, Monoid a) => a -> a+ > :type +d bar+ ** error **++ The error arises because GHC tries to default a but cannot find a concrete+ type in the defaulting list that is both Num and Monoid. (If this list is+ modified to include an element that is both Num and Monoid, the defaulting+ would succeed, of course.)++ Note that the variables and constraints are reordered here, because this+ is possible during regeneralization. Also note that the variables are+ reported as Inferred instead of Specified.++Note [Kind-generalise in tcRnType]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We switch on PolyKinds when kind-checking a user type, so that we will+kind-generalise the type, even when PolyKinds is not otherwise on.+This gives the right default behaviour at the GHCi prompt, where if+you say ":k T", and T has a polymorphic kind, you'd like to see that+polymorphism. Of course. If T isn't kind-polymorphic you won't get+anything unexpected, but the apparent *loss* of polymorphism, for+types that you know are polymorphic, is quite surprising. See Trac+#7688 for a discussion.++Note that the goal is to generalise the *kind of the type*, not+the type itself! Example:+ ghci> data SameKind :: k -> k -> Type+ ghci> :k SameKind _++We want to get `k -> Type`, not `Any -> Type`, which is what we would+get without kind-generalisation. Note that `:k SameKind` is OK, as+GHC will not instantiate SameKind here, and so we see its full kind+of `forall k. k -> k -> Type`.++************************************************************************+* *+ tcRnDeclsi+* *+************************************************************************++tcRnDeclsi exists to allow class, data, and other declarations in GHCi.+-}++tcRnDeclsi :: HscEnv+ -> [LHsDecl GhcPs]+ -> IO (Messages TcRnMessage, Maybe TcGblEnv)+tcRnDeclsi hsc_env local_decls+ = runTcInteractive hsc_env $+ tcRnSrcDecls False Nothing local_decls++externaliseAndTidyId :: Module -> Id -> TcM Id+externaliseAndTidyId this_mod id+ = do { name' <- externaliseName this_mod (idName id)+ ; return $ globaliseId id+ `setIdName` name'+ `setIdType` tidyTopType (idType id) }+++{-+************************************************************************+* *+ More GHCi stuff, to do with browsing and getting info+* *+************************************************************************+-}++-- | ASSUMES that the module is either in the 'HomePackageTable' or is+-- a package module with an interface on disk. If neither of these is+-- true, then the result will be an error indicating the interface+-- could not be found.+getModuleInterface :: HscEnv -> Module -> IO (Messages TcRnMessage, Maybe ModIface)+getModuleInterface hsc_env mod+ = runTcInteractive hsc_env $+ loadModuleInterface (text "getModuleInterface") mod++tcRnLookupRdrName :: HscEnv -> LocatedN RdrName+ -> IO (Messages TcRnMessage, Maybe [Name])+-- ^ Find all the Names that this RdrName could mean, in GHCi+tcRnLookupRdrName hsc_env (L loc rdr_name)+ = runTcInteractive hsc_env $+ setSrcSpanA loc $+ do { -- If the identifier is a constructor (begins with an+ -- upper-case letter), then we need to consider both+ -- constructor and type class identifiers.+ let rdr_names = dataTcOccs rdr_name+ ; names_s <- mapM lookupInfoOccRn rdr_names+ ; let names = concat names_s+ ; when (null names) (addErrTc $ mkTcRnNotInScope rdr_name NotInScope)+ ; return names }++tcRnLookupName :: HscEnv -> Name -> IO (Messages TcRnMessage, Maybe TyThing)+tcRnLookupName hsc_env name+ = runTcInteractive hsc_env $+ tcRnLookupName' name++-- To look up a name we have to look in the local environment (tcl_lcl)+-- as well as the global environment, which is what tcLookup does.+-- But we also want a TyThing, so we have to convert:++tcRnLookupName' :: Name -> TcRn TyThing+tcRnLookupName' name = do+ tcthing <- tcLookup name+ case tcthing of+ AGlobal thing -> return thing+ ATcId{tct_id=id} -> return (AnId id)+ _ -> panic "tcRnLookupName'"++tcRnGetInfo :: HscEnv+ -> Name+ -> IO ( Messages TcRnMessage+ , Maybe (TyThing, Fixity, [ClsInst], [FamInst], SDoc))++-- Used to implement :info in GHCi+--+-- Look up a RdrName and return all the TyThings it might be+-- A capitalised RdrName is given to us in the DataName namespace,+-- but we want to treat it as *both* a data constructor+-- *and* as a type or class constructor;+-- hence the call to dataTcOccs, and we return up to two results+tcRnGetInfo hsc_env name+ = runTcInteractive hsc_env $+ do { loadUnqualIfaces hsc_env (hsc_IC hsc_env)+ -- Load the interface for all unqualified types and classes+ -- That way we will find all the instance declarations+ -- (Packages have not orphan modules, and we assume that+ -- in the home package all relevant modules are loaded.)++ ; thing <- tcRnLookupName' name+ ; fixity <- lookupFixityRn name+ ; (cls_insts, fam_insts) <- lookupInsts thing+ ; let info = lookupKnownNameInfo name+ ; return (thing, fixity, cls_insts, fam_insts, info) }+++-- Lookup all class and family instances for a type constructor.+--+-- This function filters all instances in the type environment, so there+-- is a lot of duplicated work if it is called many times in the same+-- type environment. If this becomes a problem, the NameEnv computed+-- in GHC.getNameToInstancesIndex could be cached in TcM and both functions+-- could be changed to consult that index.+lookupInsts :: TyThing -> TcM ([ClsInst],[FamInst])+lookupInsts (ATyCon tc)+ = do { InstEnvs { ie_global = pkg_ie, ie_local = home_ie, ie_visible = vis_mods } <- tcGetInstEnvs+ ; (pkg_fie, home_fie) <- tcGetFamInstEnvs+ -- Load all instances for all classes that are+ -- in the type environment (which are all the ones+ -- we've seen in any interface file so far)++ -- Return only the instances relevant to the given thing, i.e.+ -- the instances whose head contains the thing's name.+ ; let cls_insts =+ [ ispec -- Search all+ | ispec <- instEnvElts home_ie ++ instEnvElts pkg_ie+ , instIsVisible vis_mods ispec+ , tc_name `elemNameSet` orphNamesOfClsInst ispec ]+ ; let fam_insts =+ [ fispec+ | fispec <- famInstEnvElts home_fie ++ famInstEnvElts pkg_fie+ , tc_name `elemNameSet` orphNamesOfFamInst fispec ]+ ; return (cls_insts, fam_insts) }+ where+ tc_name = tyConName tc++lookupInsts _ = return ([],[])++loadUnqualIfaces :: HscEnv -> InteractiveContext -> TcM ()+-- Load the interface for everything that is in scope unqualified+-- This is so that we can accurately report the instances for+-- something+loadUnqualIfaces hsc_env ictxt+ = initIfaceTcRn $+ mapM_ (loadSysInterface doc) (moduleSetElts (mkModuleSet unqual_mods))+ where+ home_unit = hsc_home_unit hsc_env++ unqual_mods = [ nameModule name+ | gre <- globalRdrEnvElts (icReaderEnv ictxt)+ , let name = greName gre+ , nameIsFromExternalPackage home_unit name+ , isTcOcc (nameOccName name) -- Types and classes only+ , unQualOK gre ] -- In scope unqualified+ doc = text "Need interface for module whose export(s) are in scope unqualified"++++{-+************************************************************************+* *+ Debugging output+ This is what happens when you do -ddump-types+* *+************************************************************************+-}++-- | Dump, with a banner, if -ddump-rn+rnDump :: (Outputable a, Data a) => a -> TcRn ()+rnDump rn = dumpOptTcRn Opt_D_dump_rn "Renamer" FormatHaskell (ppr rn)++tcDump :: TcGblEnv -> TcRn ()+tcDump env+ = do { unit_state <- hsc_units <$> getTopEnv ;+ logger <- getLogger ;++ -- Dump short output if -ddump-types or -ddump-tc+ when (logHasDumpFlag logger Opt_D_dump_types || logHasDumpFlag logger Opt_D_dump_tc)+ (dumpTcRn True Opt_D_dump_types+ "" FormatText (pprWithUnitState unit_state short_dump)) ;++ -- Dump bindings if -ddump-tc+ dumpOptTcRn Opt_D_dump_tc "Typechecker" FormatHaskell full_dump;++ -- Dump bindings as an hsSyn AST if -ddump-tc-ast+ dumpOptTcRn Opt_D_dump_tc_ast "Typechecker AST" FormatHaskell ast_dump+ }+ where+ short_dump = pprTcGblEnv env+ full_dump = pprLHsBinds (tcg_binds env)+ -- NB: foreign x-d's have undefined's in their types;+ -- hence can't show the tc_fords+ ast_dump = showAstData NoBlankSrcSpan NoBlankEpAnnotations (tcg_binds env)++-- It's unpleasant having both pprModGuts and pprModDetails here+pprTcGblEnv :: TcGblEnv -> SDoc+pprTcGblEnv (TcGblEnv { tcg_type_env = type_env,+ tcg_insts = insts,+ tcg_fam_insts = fam_insts,+ tcg_rules = rules,+ tcg_imports = imports })+ = getPprDebug $ \debug ->+ vcat [ ppr_types debug type_env+ , ppr_tycons debug fam_insts type_env+ , ppr_datacons debug type_env+ , ppr_patsyns type_env+ , ppr_insts insts+ , ppr_fam_insts fam_insts+ , ppr_rules rules+ , text "Dependent modules:" <+>+ (ppr . sort . installedModuleEnvElts $ imp_direct_dep_mods imports)+ , text "Dependent packages:" <+>+ ppr (S.toList $ imp_dep_direct_pkgs imports)]+ -- The use of sort is just to reduce unnecessary+ -- wobbling in testsuite output++ppr_rules :: [LRuleDecl GhcTc] -> SDoc+ppr_rules rules+ = ppUnless (null rules) $+ hang (text "RULES")+ 2 (vcat (map ppr rules))++ppr_types :: Bool -> TypeEnv -> SDoc+ppr_types debug type_env+ = ppr_things "TYPE SIGNATURES" ppr_sig+ (sortBy (comparing getOccName) ids)+ where+ ids = [id | id <- typeEnvIds type_env, want_sig id]+ want_sig id+ | debug = True+ | otherwise = hasTopUserName id+ && case idDetails id of+ VanillaId -> True+ WorkerLikeId {} -> True+ RecSelId {} -> True+ ClassOpId {} -> True+ FCallId {} -> True+ _ -> False -- Data cons (workers and wrappers), pattern synonyms, -- etc are suppressed (unless -dppr-debug), -- because they appear elsewhere
GHC/Tc/Module.hs-boot view
@@ -1,12 +1,7 @@ module GHC.Tc.Module where -import GHC.Prelude+import GHC.Types.SourceFile(HsBootOrSig) import GHC.Types.TyThing(TyThing)-import GHC.Tc.Errors.Types (TcRnMessage) import GHC.Tc.Types (TcM)-import GHC.Types.Name (Name) -checkBootDeclM :: Bool -- ^ True <=> an hs-boot file (could also be a sig)- -> TyThing -> TyThing -> TcM ()-missingBootThing :: Bool -> Name -> String -> TcRnMessage-badReexportedBootThing :: Bool -> Name -> Name -> TcRnMessage+checkBootDeclM :: HsBootOrSig -> TyThing -> TyThing -> TcM ()
GHC/Tc/Plugin.hs view
@@ -57,6 +57,7 @@ import qualified GHC.Tc.Solver.Monad as TcS import qualified GHC.Tc.Utils.Env as TcM import qualified GHC.Tc.Utils.TcMType as TcM+import qualified GHC.Tc.Zonk.TcType as TcM import qualified GHC.Tc.Instance.Family as TcM import qualified GHC.Iface.Env as IfaceEnv import qualified GHC.Unit.Finder as Finder@@ -154,12 +155,12 @@ isTouchableTcPluginM :: TcTyVar -> TcPluginM Bool isTouchableTcPluginM = unsafeTcPluginTcM . TcM.isTouchableTcM --- Confused by zonking? See Note [What is zonking?] in GHC.Tc.Utils.TcMType.+-- | Confused by zonking? See Note [What is zonking?] in "GHC.Tc.Zonk.Type". zonkTcType :: TcType -> TcPluginM TcType-zonkTcType = unsafeTcPluginTcM . TcM.zonkTcType+zonkTcType = unsafeTcPluginTcM . TcM.liftZonkM . TcM.zonkTcType zonkCt :: Ct -> TcPluginM Ct-zonkCt = unsafeTcPluginTcM . TcM.zonkCt+zonkCt = unsafeTcPluginTcM . TcM.liftZonkM . TcM.zonkCt -- | Create a new Wanted constraint with the given 'CtLoc'. newWanted :: CtLoc -> PredType -> TcPluginM CtEvidence@@ -184,7 +185,7 @@ -- | Create a fresh coercion hole. -- This should only be invoked within 'tcPluginSolve'. newCoercionHole :: PredType -> TcPluginM CoercionHole-newCoercionHole = unsafeTcPluginTcM . TcM.newCoercionHole+newCoercionHole = unsafeTcPluginTcM . TcM.newVanillaCoercionHole -- | Bind an evidence variable. --
GHC/Tc/Solver.hs view
@@ -1,3332 +1,3767 @@-{-# LANGUAGE RecursiveDo #-}--module GHC.Tc.Solver(- InferMode(..), simplifyInfer, findInferredDiff,- growThetaTyVars,- simplifyAmbiguityCheck,- simplifyDefault,- simplifyTop, simplifyTopImplic,- simplifyInteractive,- solveEqualities,- pushLevelAndSolveEqualities, pushLevelAndSolveEqualitiesX,- reportUnsolvedEqualities,- simplifyWantedsTcM,- tcCheckGivens,- tcCheckWanteds,- tcNormalise,-- captureTopConstraints,-- simplifyTopWanteds,-- promoteTyVarSet, simplifyAndEmitFlatConstraints,-- -- For Rules we need these- solveWanteds,- approximateWC-- ) where--import GHC.Prelude--import GHC.Data.Bag-import GHC.Core.Class-import GHC.Driver.Session-import GHC.Tc.Utils.Instantiate-import GHC.Data.List.SetOps-import GHC.Types.Name-import GHC.Types.Id( idType )-import GHC.Utils.Outputable-import GHC.Builtin.Utils-import GHC.Builtin.Names-import GHC.Tc.Errors-import GHC.Tc.Errors.Types-import GHC.Tc.Types.Evidence-import GHC.Tc.Solver.Interact-import GHC.Tc.Solver.Canonical ( makeSuperClasses, solveCallStack )-import GHC.Tc.Solver.Rewrite ( rewriteType )-import GHC.Tc.Utils.Unify ( buildTvImplication )-import GHC.Tc.Utils.TcMType as TcM-import GHC.Tc.Utils.Monad as TcM-import GHC.Tc.Solver.InertSet-import GHC.Tc.Solver.Monad as TcS-import GHC.Tc.Types.Constraint-import GHC.Tc.Instance.FunDeps-import GHC.Core.Predicate-import GHC.Tc.Types.Origin-import GHC.Tc.Utils.TcType-import GHC.Core.Type-import GHC.Core.Ppr-import GHC.Core.TyCon ( TyConBinder, isTypeFamilyTyCon )-import GHC.Builtin.Types ( liftedRepTy, liftedDataConTy )-import GHC.Core.Unify ( tcMatchTyKi )-import GHC.Utils.Misc-import GHC.Utils.Panic-import GHC.Types.Var-import GHC.Types.Var.Set-import GHC.Types.Basic ( IntWithInf, intGtLimit- , DefaultingStrategy(..), NonStandardDefaultingStrategy(..) )-import GHC.Types.Error-import qualified GHC.LanguageExtensions as LangExt--import Control.Monad-import Data.Foldable ( toList )-import Data.List ( partition )-import Data.List.NonEmpty ( NonEmpty(..) )-import GHC.Data.Maybe ( mapMaybe, isJust )--{--*********************************************************************************-* *-* External interface *-* *-*********************************************************************************--}--captureTopConstraints :: TcM a -> TcM (a, WantedConstraints)--- (captureTopConstraints m) runs m, and returns the type constraints it--- generates plus the constraints produced by static forms inside.--- If it fails with an exception, it reports any insolubles--- (out of scope variables) before doing so------ captureTopConstraints is used exclusively by GHC.Tc.Module at the top--- level of a module.------ Importantly, if captureTopConstraints propagates an exception, it--- reports any insoluble constraints first, lest they be lost--- altogether. This is important, because solveEqualities (maybe--- other things too) throws an exception without adding any error--- messages; it just puts the unsolved constraints back into the--- monad. See GHC.Tc.Utils.Monad Note [Constraints and errors]--- #16376 is an example of what goes wrong if you don't do this.------ NB: the caller should bring any environments into scope before--- calling this, so that the reportUnsolved has access to the most--- complete GlobalRdrEnv-captureTopConstraints thing_inside- = do { static_wc_var <- TcM.newTcRef emptyWC ;- ; (mb_res, lie) <- TcM.updGblEnv (\env -> env { tcg_static_wc = static_wc_var } ) $- TcM.tryCaptureConstraints thing_inside- ; stWC <- TcM.readTcRef static_wc_var-- -- See GHC.Tc.Utils.Monad Note [Constraints and errors]- -- If the thing_inside threw an exception, but generated some insoluble- -- constraints, report the latter before propagating the exception- -- Otherwise they will be lost altogether- ; case mb_res of- Just res -> return (res, lie `andWC` stWC)- Nothing -> do { _ <- simplifyTop lie; failM } }- -- This call to simplifyTop is the reason- -- this function is here instead of GHC.Tc.Utils.Monad- -- We call simplifyTop so that it does defaulting- -- (esp of runtime-reps) before reporting errors--simplifyTopImplic :: Bag Implication -> TcM ()-simplifyTopImplic implics- = do { empty_binds <- simplifyTop (mkImplicWC implics)-- -- Since all the inputs are implications the returned bindings will be empty- ; massertPpr (isEmptyBag empty_binds) (ppr empty_binds)-- ; return () }--simplifyTop :: WantedConstraints -> TcM (Bag EvBind)--- Simplify top-level constraints--- Usually these will be implications,--- but when there is nothing to quantify we don't wrap--- in a degenerate implication, so we do that here instead-simplifyTop wanteds- = do { traceTc "simplifyTop {" $ text "wanted = " <+> ppr wanteds- ; ((final_wc, unsafe_ol), binds1) <- runTcS $- do { final_wc <- simplifyTopWanteds wanteds- ; unsafe_ol <- getSafeOverlapFailures- ; return (final_wc, unsafe_ol) }- ; traceTc "End simplifyTop }" empty-- ; binds2 <- reportUnsolved final_wc-- ; traceTc "reportUnsolved (unsafe overlapping) {" empty- ; unless (isEmptyCts unsafe_ol) $ do {- -- grab current error messages and clear, warnAllUnsolved will- -- update error messages which we'll grab and then restore saved- -- messages.- ; errs_var <- getErrsVar- ; saved_msg <- TcM.readTcRef errs_var- ; TcM.writeTcRef errs_var emptyMessages-- ; warnAllUnsolved $ emptyWC { wc_simple = unsafe_ol }-- ; whyUnsafe <- getWarningMessages <$> TcM.readTcRef errs_var- ; TcM.writeTcRef errs_var saved_msg- ; recordUnsafeInfer (mkMessages whyUnsafe)- }- ; traceTc "reportUnsolved (unsafe overlapping) }" empty-- ; return (evBindMapBinds binds1 `unionBags` binds2) }--pushLevelAndSolveEqualities :: SkolemInfoAnon -> [TyConBinder] -> TcM a -> TcM a--- Push level, and solve all resulting equalities--- If there are any unsolved equalities, report them--- and fail (in the monad)------ Panics if we solve any non-equality constraints. (In runTCSEqualities--- we use an error thunk for the evidence bindings.)-pushLevelAndSolveEqualities skol_info_anon tcbs thing_inside- = do { (tclvl, wanted, res) <- pushLevelAndSolveEqualitiesX- "pushLevelAndSolveEqualities" thing_inside- ; report_unsolved_equalities skol_info_anon (binderVars tcbs) tclvl wanted- ; return res }--pushLevelAndSolveEqualitiesX :: String -> TcM a- -> TcM (TcLevel, WantedConstraints, a)--- Push the level, gather equality constraints, and then solve them.--- Returns any remaining unsolved equalities.--- Does not report errors.------ Panics if we solve any non-equality constraints. (In runTCSEqualities--- we use an error thunk for the evidence bindings.)-pushLevelAndSolveEqualitiesX callsite thing_inside- = do { traceTc "pushLevelAndSolveEqualitiesX {" (text "Called from" <+> text callsite)- ; (tclvl, (wanted, res))- <- pushTcLevelM $- do { (res, wanted) <- captureConstraints thing_inside- ; wanted <- runTcSEqualities (simplifyTopWanteds wanted)- ; return (wanted,res) }- ; traceTc "pushLevelAndSolveEqualities }" (vcat [ text "Residual:" <+> ppr wanted- , text "Level:" <+> ppr tclvl ])- ; return (tclvl, wanted, res) }---- | Type-check a thing that emits only equality constraints, solving any--- constraints we can and re-emitting constraints that we can't.--- Use this variant only when we'll get another crack at it later--- See Note [Failure in local type signatures]------ Panics if we solve any non-equality constraints. (In runTCSEqualities--- we use an error thunk for the evidence bindings.)-solveEqualities :: String -> TcM a -> TcM a-solveEqualities callsite thing_inside- = do { traceTc "solveEqualities {" (text "Called from" <+> text callsite)- ; (res, wanted) <- captureConstraints thing_inside- ; simplifyAndEmitFlatConstraints wanted- -- simplifyAndEmitFlatConstraints fails outright unless- -- the only unsolved constraints are soluble-looking- -- equalities that can float out- ; traceTc "solveEqualities }" empty- ; return res }--simplifyAndEmitFlatConstraints :: WantedConstraints -> TcM ()--- See Note [Failure in local type signatures]-simplifyAndEmitFlatConstraints wanted- = do { -- Solve and zonk to establish the- -- preconditions for floatKindEqualities- wanted <- runTcSEqualities (solveWanteds wanted)- ; wanted <- TcM.zonkWC wanted-- ; traceTc "emitFlatConstraints {" (ppr wanted)- ; case floatKindEqualities wanted of- Nothing -> do { traceTc "emitFlatConstraints } failing" (ppr wanted)- -- Emit the bad constraints, wrapped in an implication- -- See Note [Wrapping failing kind equalities]- ; tclvl <- TcM.getTcLevel- ; implic <- buildTvImplication unkSkolAnon [] (pushTcLevel tclvl) wanted- -- ^^^^^^ | ^^^^^^^^^^^^^^^^^- -- it's OK to use unkSkol | we must increase the TcLevel,- -- because we don't bind | as explained in- -- any skolem variables here | Note [Wrapping failing kind equalities]- ; emitImplication implic- ; failM }- Just (simples, errs)- -> do { _ <- promoteTyVarSet (tyCoVarsOfCts simples)- ; traceTc "emitFlatConstraints }" $- vcat [ text "simples:" <+> ppr simples- , text "errs: " <+> ppr errs ]- -- Holes and other delayed errors don't need promotion- ; emitDelayedErrors errs- ; emitSimples simples } }--floatKindEqualities :: WantedConstraints -> Maybe (Bag Ct, Bag DelayedError)--- Float out all the constraints from the WantedConstraints,--- Return Nothing if any constraints can't be floated (captured--- by skolems), or if there is an insoluble constraint, or--- IC_Telescope telescope error--- Precondition 1: we have tried to solve the 'wanteds', both so that--- the ic_status field is set, and because solving can make constraints--- more floatable.--- Precondition 2: the 'wanteds' are zonked, since floatKindEqualities--- is not monadic--- See Note [floatKindEqualities vs approximateWC]-floatKindEqualities wc = float_wc emptyVarSet wc- where- float_wc :: TcTyCoVarSet -> WantedConstraints -> Maybe (Bag Ct, Bag DelayedError)- float_wc trapping_tvs (WC { wc_simple = simples- , wc_impl = implics- , wc_errors = errs })- | all is_floatable simples- = do { (inner_simples, inner_errs)- <- flatMapBagPairM (float_implic trapping_tvs) implics- ; return ( simples `unionBags` inner_simples- , errs `unionBags` inner_errs) }- | otherwise- = Nothing- where- is_floatable ct- | insolubleEqCt ct = False- | otherwise = tyCoVarsOfCt ct `disjointVarSet` trapping_tvs-- float_implic :: TcTyCoVarSet -> Implication -> Maybe (Bag Ct, Bag DelayedError)- float_implic trapping_tvs (Implic { ic_wanted = wanted, ic_given_eqs = given_eqs- , ic_skols = skols, ic_status = status })- | isInsolubleStatus status- = Nothing -- A short cut /plus/ we must keep track of IC_BadTelescope- | otherwise- = do { (simples, holes) <- float_wc new_trapping_tvs wanted- ; when (not (isEmptyBag simples) && given_eqs == MaybeGivenEqs) $- Nothing- -- If there are some constraints to float out, but we can't- -- because we don't float out past local equalities- -- (c.f GHC.Tc.Solver.approximateWC), then fail- ; return (simples, holes) }- where- new_trapping_tvs = trapping_tvs `extendVarSetList` skols---{- Note [Failure in local type signatures]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When kind checking a type signature, we like to fail fast if we can't-solve all the kind equality constraints, for two reasons:-- * A kind-bogus type signature may cause a cascade of knock-on- errors if we let it pass-- * More seriously, we don't have a convenient term-level place to add- deferred bindings for unsolved kind-equality constraints. In- earlier GHCs this led to un-filled-in coercion holes, which caused- GHC to crash with "fvProv falls into a hole" See #11563, #11520,- #11516, #11399--But what about /local/ type signatures, mentioning in-scope type-variables for which there might be 'given' equalities? For these we-might not be able to solve all the equalities locally. Here's an-example (T15076b):-- class (a ~ b) => C a b- data SameKind :: k -> k -> Type where { SK :: SameKind a b }-- bar :: forall (a :: Type) (b :: Type).- C a b => Proxy a -> Proxy b -> ()- bar _ _ = const () (undefined :: forall (x :: a) (y :: b). SameKind x y)--Consider the type signature on 'undefined'. It's ill-kinded unless-a~b. But the superclass of (C a b) means that indeed (a~b). So all-should be well. BUT it's hard to see that when kind-checking the signature-for undefined. We want to emit a residual (a~b) constraint, to solve-later.--Another possibility is that we might have something like- F alpha ~ [Int]-where alpha is bound further out, which might become soluble-"later" when we learn more about alpha. So we want to emit-those residual constraints.--BUT it's no good simply wrapping all unsolved constraints from-a type signature in an implication constraint to solve later. The-problem is that we are going to /use/ that signature, including-instantiate it. Say we have- f :: forall a. (forall b. blah) -> blah2- f x = <body>-To typecheck the definition of f, we have to instantiate those-foralls. Moreover, any unsolved kind equalities will be coercion-holes in the type. If we naively wrap them in an implication like- forall a. (co1:k1~k2, forall b. co2:k3~k4)-hoping to solve it later, we might end up filling in the holes-co1 and co2 with coercions involving 'a' and 'b' -- but by now-we've instantiated the type. Chaos!--Moreover, the unsolved constraints might be skolem-escape things, and-if we proceed with f bound to a nonsensical type, we get a cascade of-follow-up errors. For example polykinds/T12593, T15577, and many others.--So here's the plan (see tcHsSigType):--* pushLevelAndSolveEqualitiesX: try to solve the constraints--* kindGeneraliseSome: do kind generalisation--* buildTvImplication: build an implication for the residual, unsolved- constraint--* simplifyAndEmitFlatConstraints: try to float out every unsolved equality- inside that implication, in the hope that it constrains only global- type variables, not the locally-quantified ones.-- * If we fail, or find an insoluble constraint, emit the implication,- so that the errors will be reported, and fail.-- * If we succeed in floating all the equalities, promote them and- re-emit them as flat constraint, not wrapped at all (since they- don't mention any of the quantified variables.--* Note that this float-and-promote step means that anonymous- wildcards get floated to top level, as we want; see- Note [Checking partial type signatures] in GHC.Tc.Gen.HsType.--All this is done:--* In GHC.Tc.Gen.HsType.tcHsSigType, as above--* solveEqualities. Use this when there no kind-generalisation- step to complicate matters; then we don't need to push levels,- and can solve the equalities immediately without needing to- wrap it in an implication constraint. (You'll generally see- a kindGeneraliseNone nearby.)--* In GHC.Tc.TyCl and GHC.Tc.TyCl.Instance; see calls to- pushLevelAndSolveEqualitiesX, followed by quantification, and- then reportUnsolvedEqualities.-- NB: we call reportUnsolvedEqualities before zonkTcTypeToType- because the latter does not expect to see any un-filled-in- coercions, which will happen if we have unsolved equalities.- By calling reportUnsolvedEqualities first, which fails after- reporting errors, we avoid that happening.--See also #18062, #11506--Note [Wrapping failing kind equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In simplifyAndEmitFlatConstraints, if we fail to get down to simple-flat constraints we will-* re-emit the constraints so that they are reported-* fail in the monad-But there is a Terrible Danger that, if -fdefer-type-errors is on, and-we just re-emit an insoluble constraint like (* ~ (*->*)), that we'll-report only a warning and proceed with compilation. But if we ever fail-in the monad it should be fatal; we should report an error and stop after-the type checker. If not, chaos results: #19142.--Our solution is this:-* Even with -fdefer-type-errors, inside an implication with no place for- value bindings (ic_binds = CoEvBindsVar), report failing equalities as- errors. We have to do this anyway; see GHC.Tc.Errors- Note [Failing equalities with no evidence bindings].--* Right here in simplifyAndEmitFlatConstraints, use buildTvImplication- to wrap the failing constraint in a degenerate implication (no- skolems, no theta), with ic_binds = CoEvBindsVar. This setting of- `ic_binds` means that any failing equalities will lead to an- error not a warning, irrespective of -fdefer-type-errors: see- Note [Failing equalities with no evidence bindings] in GHC.Tc.Errors,- and `maybeSwitchOffDefer` in that module.-- We still take care to bump the TcLevel of the implication. Partly,- that ensures that nested implications have increasing level numbers- which seems nice. But more specifically, suppose the outer level- has a Given `(C ty)`, which has pending (not-yet-expanded)- superclasses. Consider what happens when we process this implication- constraint (which we have re-emitted) in that context:- - in the inner implication we'll call `getPendingGivenScs`,- - we /do not/ want to get the `(C ty)` from the outer level,- lest we try to add an evidence term for the superclass,- which we can't do because we have specifically set- `ic_binds` = `CoEvBindsVar`.- - as `getPendingGivenSCcs is careful to only get Givens from- the /current/ level, and we bumped the `TcLevel` of the implication,- we're OK.-- TL;DR: bump the `TcLevel` when creating the nested implication.- If we don't we get a panic in `GHC.Tc.Utils.Monad.addTcEvBind` (#20043).---We re-emit the implication rather than reporting the errors right now,-so that the error messages are improved by other solving and defaulting.-e.g. we prefer- Cannot match 'Type->Type' with 'Type'-to Cannot match 'Type->Type' with 'TYPE r0'---Note [floatKindEqualities vs approximateWC]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-floatKindEqualities and approximateWC are strikingly similar to each-other, but--* floatKindEqualites tries to float /all/ equalities, and fails if- it can't, or if any implication is insoluble.-* approximateWC just floats out any constraints- (not just equalities) that can float; it never fails.--}---reportUnsolvedEqualities :: SkolemInfo -> [TcTyVar] -> TcLevel- -> WantedConstraints -> TcM ()--- Reports all unsolved wanteds provided; fails in the monad if there are any.------ The provided SkolemInfo and [TcTyVar] arguments are used in an implication to--- provide skolem info for any errors.-reportUnsolvedEqualities skol_info skol_tvs tclvl wanted- = report_unsolved_equalities (getSkolemInfo skol_info) skol_tvs tclvl wanted--report_unsolved_equalities :: SkolemInfoAnon -> [TcTyVar] -> TcLevel- -> WantedConstraints -> TcM ()-report_unsolved_equalities skol_info_anon skol_tvs tclvl wanted- | isEmptyWC wanted- = return ()-- | otherwise -- NB: we build an implication /even if skol_tvs is empty/,- -- just to ensure that our level invariants hold, specifically- -- (WantedInv). See Note [TcLevel invariants].- = checkNoErrs $ -- Fail- do { implic <- buildTvImplication skol_info_anon skol_tvs tclvl wanted- ; reportAllUnsolved (mkImplicWC (unitBag implic)) }----- | Simplify top-level constraints, but without reporting any unsolved--- constraints nor unsafe overlapping.-simplifyTopWanteds :: WantedConstraints -> TcS WantedConstraints- -- See Note [Top-level Defaulting Plan]-simplifyTopWanteds wanteds- = do { wc_first_go <- nestTcS (solveWanteds wanteds)- -- This is where the main work happens- ; dflags <- getDynFlags- ; try_tyvar_defaulting dflags wc_first_go }- where- try_tyvar_defaulting :: DynFlags -> WantedConstraints -> TcS WantedConstraints- try_tyvar_defaulting dflags wc- | isEmptyWC wc- = return wc- | insolubleWC wc- , gopt Opt_PrintExplicitRuntimeReps dflags -- See Note [Defaulting insolubles]- = try_class_defaulting wc- | otherwise- = do { -- Need to zonk first, as the WantedConstraints are not yet zonked.- ; free_tvs <- TcS.zonkTyCoVarsAndFVList (tyCoVarsOfWCList wc)- ; let defaultable_tvs = filter can_default free_tvs- can_default tv- = isTyVar tv- -- Weed out coercion variables.-- && isMetaTyVar tv- -- Weed out runtime-skolems in GHCi, which we definitely- -- shouldn't try to default.-- && not (tv `elemVarSet` nonDefaultableTyVarsOfWC wc)- -- Weed out variables for which defaulting would be unhelpful,- -- e.g. alpha appearing in [W] alpha[conc] ~# rr[sk].-- ; defaulted <- mapM defaultTyVarTcS defaultable_tvs -- Has unification side effects- ; if or defaulted- then do { wc_residual <- nestTcS (solveWanteds wc)- -- See Note [Must simplify after defaulting]- ; try_class_defaulting wc_residual }- else try_class_defaulting wc } -- No defaulting took place-- try_class_defaulting :: WantedConstraints -> TcS WantedConstraints- try_class_defaulting wc- | isEmptyWC wc || insolubleWC wc -- See Note [Defaulting insolubles]- = try_callstack_defaulting wc- | otherwise -- See Note [When to do type-class defaulting]- = do { something_happened <- applyDefaultingRules wc- -- See Note [Top-level Defaulting Plan]- ; if something_happened- then do { wc_residual <- nestTcS (solveWanteds wc)- ; try_class_defaulting wc_residual }- -- See Note [Overview of implicit CallStacks] in GHC.Tc.Types.Evidence- else try_callstack_defaulting wc }-- try_callstack_defaulting :: WantedConstraints -> TcS WantedConstraints- try_callstack_defaulting wc- | isEmptyWC wc- = return wc- | otherwise- = defaultCallStacks wc---- | Default any remaining @CallStack@ constraints to empty @CallStack@s.-defaultCallStacks :: WantedConstraints -> TcS WantedConstraints--- See Note [Overview of implicit CallStacks] in GHC.Tc.Types.Evidence-defaultCallStacks wanteds- = do simples <- handle_simples (wc_simple wanteds)- mb_implics <- mapBagM handle_implic (wc_impl wanteds)- return (wanteds { wc_simple = simples- , wc_impl = catBagMaybes mb_implics })-- where-- handle_simples simples- = catBagMaybes <$> mapBagM defaultCallStack simples-- handle_implic :: Implication -> TcS (Maybe Implication)- -- The Maybe is because solving the CallStack constraint- -- may well allow us to discard the implication entirely- handle_implic implic- | isSolvedStatus (ic_status implic)- = return (Just implic)- | otherwise- = do { wanteds <- setEvBindsTcS (ic_binds implic) $- -- defaultCallStack sets a binding, so- -- we must set the correct binding group- defaultCallStacks (ic_wanted implic)- ; setImplicationStatus (implic { ic_wanted = wanteds }) }-- defaultCallStack ct- | ClassPred cls tys <- classifyPredType (ctPred ct)- , Just {} <- isCallStackPred cls tys- = do { solveCallStack (ctEvidence ct) EvCsEmpty- ; return Nothing }-- defaultCallStack ct- = return (Just ct)---{- Note [When to do type-class defaulting]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In GHC 7.6 and 7.8.2, we did type-class defaulting only if insolubleWC-was false, on the grounds that defaulting can't help solve insoluble-constraints. But if we *don't* do defaulting we may report a whole-lot of errors that would be solved by defaulting; these errors are-quite spurious because fixing the single insoluble error means that-defaulting happens again, which makes all the other errors go away.-This is jolly confusing: #9033.--So it seems better to always do type-class defaulting.--However, always doing defaulting does mean that we'll do it in-situations like this (#5934):- run :: (forall s. GenST s) -> Int- run = fromInteger 0-We don't unify the return type of fromInteger with the given function-type, because the latter involves foralls. So we're left with- (Num alpha, alpha ~ (forall s. GenST s) -> Int)-Now we do defaulting, get alpha := Integer, and report that we can't-match Integer with (forall s. GenST s) -> Int. That's not totally-stupid, but perhaps a little strange.--Another potential alternative would be to suppress *all* non-insoluble-errors if there are *any* insoluble errors, anywhere, but that seems-too drastic.--Note [Don't default in syntactic equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When there are unsolved syntactic equalities such as-- rr[sk] ~S# alpha[conc]--we should not default alpha, lest we obtain a poor error message such as-- Couldn't match kind `rr' with `LiftedRep'--We would rather preserve the original syntactic equality to be-reported to the user, especially as the concrete metavariable alpha-might store an informative origin for the user.--Note [Must simplify after defaulting]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We may have a deeply buried constraint- (t:*) ~ (a:Open)-which we couldn't solve because of the kind incompatibility, and 'a' is free.-Then when we default 'a' we can solve the constraint. And we want to do-that before starting in on type classes. We MUST do it before reporting-errors, because it isn't an error! #7967 was due to this.--Note [Top-level Defaulting Plan]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We have considered two design choices for where/when to apply defaulting.- (i) Do it in SimplCheck mode only /whenever/ you try to solve some- simple constraints, maybe deep inside the context of implications.- This used to be the case in GHC 7.4.1.- (ii) Do it in a tight loop at simplifyTop, once all other constraints have- finished. This is the current story.--Option (i) had many disadvantages:- a) Firstly, it was deep inside the actual solver.- b) Secondly, it was dependent on the context (Infer a type signature,- or Check a type signature, or Interactive) since we did not want- to always start defaulting when inferring (though there is an exception to- this, see Note [Default while Inferring]).- c) It plainly did not work. Consider typecheck/should_compile/DfltProb2.hs:- f :: Int -> Bool- f x = const True (\y -> let w :: a -> a- w a = const a (y+1)- in w y)- We will get an implication constraint (for beta the type of y):- [untch=beta] forall a. 0 => Num beta- which we really cannot default /while solving/ the implication, since beta is- untouchable.--Instead our new defaulting story is to pull defaulting out of the solver loop and-go with option (ii), implemented at SimplifyTop. Namely:- - First, have a go at solving the residual constraint of the whole- program- - Try to approximate it with a simple constraint- - Figure out derived defaulting equations for that simple constraint- - Go round the loop again if you did manage to get some equations--Now, that has to do with class defaulting. However there exists type variable /kind/-defaulting. Again this is done at the top-level and the plan is:- - At the top-level, once you had a go at solving the constraint, do- figure out /all/ the touchable unification variables of the wanted constraints.- - Apply defaulting to their kinds--More details in Note [DefaultTyVar].--Note [Safe Haskell Overlapping Instances]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In Safe Haskell, we apply an extra restriction to overlapping instances. The-motive is to prevent untrusted code provided by a third-party, changing the-behavior of trusted code through type-classes. This is due to the global and-implicit nature of type-classes that can hide the source of the dictionary.--Another way to state this is: if a module M compiles without importing another-module N, changing M to import N shouldn't change the behavior of M.--Overlapping instances with type-classes can violate this principle. However,-overlapping instances aren't always unsafe. They are just unsafe when the most-selected dictionary comes from untrusted code (code compiled with -XSafe) and-overlaps instances provided by other modules.--In particular, in Safe Haskell at a call site with overlapping instances, we-apply the following rule to determine if it is a 'unsafe' overlap:-- 1) Most specific instance, I1, defined in an `-XSafe` compiled module.- 2) I1 is an orphan instance or a MPTC.- 3) At least one overlapped instance, Ix, is both:- A) from a different module than I1- B) Ix is not marked `OVERLAPPABLE`--This is a slightly involved heuristic, but captures the situation of an-imported module N changing the behavior of existing code. For example, if-condition (2) isn't violated, then the module author M must depend either on a-type-class or type defined in N.--Secondly, when should these heuristics be enforced? We enforced them when the-type-class method call site is in a module marked `-XSafe` or `-XTrustworthy`.-This allows `-XUnsafe` modules to operate without restriction, and for Safe-Haskell inference to infer modules with unsafe overlaps as unsafe.--One alternative design would be to also consider if an instance was imported as-a `safe` import or not and only apply the restriction to instances imported-safely. However, since instances are global and can be imported through more-than one path, this alternative doesn't work.--Note [Safe Haskell Overlapping Instances Implementation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-How is this implemented? It's complicated! So we'll step through it all:-- 1) `InstEnv.lookupInstEnv` -- Performs instance resolution, so this is where- we check if a particular type-class method call is safe or unsafe. We do this- through the return type, `ClsInstLookupResult`, where the last parameter is a- list of instances that are unsafe to overlap. When the method call is safe,- the list is null.-- 2) `GHC.Tc.Solver.Interact.matchClassInst` -- This module drives the instance resolution- / dictionary generation. The return type is `ClsInstResult`, which either- says no instance matched, or one found, and if it was a safe or unsafe- overlap.-- 3) `GHC.Tc.Solver.Interact.doTopReactDict` -- Takes a dictionary / class constraint and- tries to resolve it by calling (in part) `matchClassInst`. The resolving- mechanism has a work list (of constraints) that it process one at a time. If- the constraint can't be resolved, it's added to an inert set. When compiling- an `-XSafe` or `-XTrustworthy` module, we follow this approach as we know- compilation should fail. These are handled as normal constraint resolution- failures from here-on (see step 6).-- Otherwise, we may be inferring safety (or using `-Wunsafe`), and- compilation should succeed, but print warnings and/or mark the compiled module- as `-XUnsafe`. In this case, we call `insertSafeOverlapFailureTcS` which adds- the unsafe (but resolved!) constraint to the `inert_safehask` field of- `InertCans`.-- 4) `GHC.Tc.Solver.simplifyTop`:- * Call simplifyTopWanteds, the top-level function for driving the simplifier for- constraint resolution.-- * Once finished, call `getSafeOverlapFailures` to retrieve the- list of overlapping instances that were successfully resolved,- but unsafe. Remember, this is only applicable for generating warnings- (`-Wunsafe`) or inferring a module unsafe. `-XSafe` and `-XTrustworthy`- cause compilation failure by not resolving the unsafe constraint at all.-- * For unresolved constraints (all types), call `GHC.Tc.Errors.reportUnsolved`,- while for resolved but unsafe overlapping dictionary constraints, call- `GHC.Tc.Errors.warnAllUnsolved`. Both functions convert constraints into a- warning message for the user.-- * In the case of `warnAllUnsolved` for resolved, but unsafe- dictionary constraints, we collect the generated warning- message (pop it) and call `GHC.Tc.Utils.Monad.recordUnsafeInfer` to- mark the module we are compiling as unsafe, passing the- warning message along as the reason.-- 5) `GHC.Tc.Errors.*Unsolved` -- Generates error messages for constraints by- actually calling `InstEnv.lookupInstEnv` again! Yes, confusing, but all we- know is the constraint that is unresolved or unsafe. For dictionary, all we- know is that we need a dictionary of type C, but not what instances are- available and how they overlap. So we once again call `lookupInstEnv` to- figure that out so we can generate a helpful error message.-- 6) `GHC.Tc.Utils.Monad.recordUnsafeInfer` -- Save the unsafe result and reason in- IORefs called `tcg_safe_infer` and `tcg_safe_infer_reason`.-- 7) `GHC.Driver.Main.tcRnModule'` -- Reads `tcg_safe_infer` after type-checking, calling- `GHC.Driver.Main.markUnsafeInfer` (passing the reason along) when safe-inference- failed.--Note [No defaulting in the ambiguity check]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When simplifying constraints for the ambiguity check, we use-solveWanteds, not simplifyTopWanteds, so that we do no defaulting.-#11947 was an example:- f :: Num a => Int -> Int-This is ambiguous of course, but we don't want to default the-(Num alpha) constraint to (Num Int)! Doing so gives a defaulting-warning, but no error.--Note [Defaulting insolubles]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-If a set of wanteds is insoluble, we have no hope of accepting the-program. Yet we do not stop constraint solving, etc., because we may-simplify the wanteds to produce better error messages. So, once-we have an insoluble constraint, everything we do is just about producing-helpful error messages.--Should we default in this case or not? Let's look at an example (tcfail004):-- (f,g) = (1,2,3)--With defaulting, we get a conflict between (a0,b0) and (Integer,Integer,Integer).-Without defaulting, we get a conflict between (a0,b0) and (a1,b1,c1). I (Richard)-find the latter more helpful. Several other test cases (e.g. tcfail005) suggest-similarly. So: we should not do class defaulting with insolubles.--On the other hand, RuntimeRep-defaulting is different. Witness tcfail078:-- f :: Integer i => i- f = 0--Without RuntimeRep-defaulting, we GHC suggests that Integer should have kind-TYPE r0 -> Constraint and then complains that r0 is actually untouchable-(presumably, because it can't be sure if `Integer i` entails an equality).-If we default, we are told of a clash between (* -> Constraint) and Constraint.-The latter seems far better, suggesting we *should* do RuntimeRep-defaulting-even on insolubles.--But, evidently, not always. Witness UnliftedNewtypesInfinite:-- newtype Foo = FooC (# Int#, Foo #)--This should fail with an occurs-check error on the kind of Foo (with -XUnliftedNewtypes).-If we default RuntimeRep-vars, we get-- Expecting a lifted type, but ‘(# Int#, Foo #)’ is unlifted--which is just plain wrong.--Another situation in which we don't want to default involves concrete metavariables.--In equalities such as alpha[conc] ~# rr[sk] , alpha[conc] ~# RR beta[tau]-for a type family RR (all at kind RuntimeRep), we would prefer to report a-representation-polymorphism error rather than default alpha and get error:-- Could not unify `rr` with `Lifted` / Could not unify `RR b0` with `Lifted`--which is very confusing. For this reason, we weed out the concrete-metavariables participating in such equalities in nonDefaultableTyVarsOfWC.-Just looking at insolublity is not enough, as `alpha[conc] ~# RR beta[tau]` could-become soluble after defaulting beta (see also #21430).--Conclusion: we should do RuntimeRep-defaulting on insolubles only when the-user does not want to hear about RuntimeRep stuff -- that is, when--fprint-explicit-runtime-reps is not set.-However, we must still take care not to default concrete type variables-participating in an equality with a non-concrete type, as seen in the-last example above.--}---------------------simplifyAmbiguityCheck :: Type -> WantedConstraints -> TcM ()-simplifyAmbiguityCheck ty wanteds- = do { traceTc "simplifyAmbiguityCheck {" (text "type = " <+> ppr ty $$ text "wanted = " <+> ppr wanteds)- ; (final_wc, _) <- runTcS $ solveWanteds wanteds- -- NB: no defaulting! See Note [No defaulting in the ambiguity check]-- ; traceTc "End simplifyAmbiguityCheck }" empty-- -- Normally report all errors; but with -XAllowAmbiguousTypes- -- report only insoluble ones, since they represent genuinely- -- inaccessible code- ; allow_ambiguous <- xoptM LangExt.AllowAmbiguousTypes- ; traceTc "reportUnsolved(ambig) {" empty- ; unless (allow_ambiguous && not (insolubleWC final_wc))- (discardResult (reportUnsolved final_wc))- ; traceTc "reportUnsolved(ambig) }" empty-- ; return () }---------------------simplifyInteractive :: WantedConstraints -> TcM (Bag EvBind)-simplifyInteractive wanteds- = traceTc "simplifyInteractive" empty >>- simplifyTop wanteds---------------------simplifyDefault :: ThetaType -- Wanted; has no type variables in it- -> TcM Bool -- Return if the constraint is soluble-simplifyDefault theta- = do { traceTc "simplifyDefault" empty- ; wanteds <- newWanteds DefaultOrigin theta- ; (unsolved, _) <- runTcS (solveWanteds (mkSimpleWC wanteds))- ; return (isEmptyWC unsolved) }---------------------{- Note [Pattern match warnings with insoluble Givens]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-A pattern match on a GADT can introduce new type-level information, which needs-to be analysed in order to get the expected pattern match warnings.--For example:--> type IsBool :: Type -> Constraint-> type family IsBool a where-> IsBool Bool = ()-> IsBool b = b ~ Bool->-> data T a where-> MkTInt :: Int -> T Int-> MkTBool :: IsBool b => b -> T b->-> f :: T Int -> Int-> f (MkTInt i) = i--The pattern matching performed by `f` is complete: we can't ever call-`f (MkTBool b)`, as type-checking that application would require producing-evidence for `Int ~ Bool`, which can't be done.--The pattern match checker uses `tcCheckGivens` to accumulate all the Given-constraints, and relies on `tcCheckGivens` to return Nothing if the-Givens become insoluble. `tcCheckGivens` in turn relies on `insolubleCt`-to identify these insoluble constraints. So the precise definition of-`insolubleCt` has a big effect on pattern match overlap warnings.--To detect this situation, we check whether there are any insoluble Given-constraints. In the example above, the insoluble constraint was an-equality constraint, but it is also important to detect custom type errors:--> type NotInt :: Type -> Constraint-> type family NotInt a where-> NotInt Int = TypeError (Text "That's Int, silly.")-> NotInt _ = ()->-> data R a where-> MkT1 :: a -> R a-> MkT2 :: NotInt a => R a->-> foo :: R Int -> Int-> foo (MkT1 x) = x--To see that we can't call `foo (MkT2)`, we must detect that `NotInt Int` is insoluble-because it is a custom type error.-Failing to do so proved quite inconvenient for users, as evidence by the-tickets #11503 #14141 #16377 #20180.-Test cases: T11503, T14141.--Examples of constraints that tcCheckGivens considers insoluble:- - Int ~ Bool,- - Coercible Float Word,- - TypeError msg.--Non-examples:- - constraints which we know aren't satisfied,- e.g. Show (Int -> Int) when no such instance is in scope,- - Eq (TypeError msg),- - C (Int ~ Bool), with @class C (c :: Constraint)@.--}--tcCheckGivens :: InertSet -> Bag EvVar -> TcM (Maybe InertSet)--- ^ Return (Just new_inerts) if the Givens are satisfiable, Nothing if definitely--- contradictory.------ See Note [Pattern match warnings with insoluble Givens] above.-tcCheckGivens inerts given_ids = do- (sat, new_inerts) <- runTcSInerts inerts $ do- traceTcS "checkGivens {" (ppr inerts <+> ppr given_ids)- lcl_env <- TcS.getLclEnv- let given_loc = mkGivenLoc topTcLevel (getSkolemInfo unkSkol) lcl_env- let given_cts = mkGivens given_loc (bagToList given_ids)- -- See Note [Superclasses and satisfiability]- solveSimpleGivens given_cts- insols <- getInertInsols- insols <- try_harder insols- traceTcS "checkGivens }" (ppr insols)- return (isEmptyBag insols)- return $ if sat then Just new_inerts else Nothing- where- try_harder :: Cts -> TcS Cts- -- Maybe we have to search up the superclass chain to find- -- an unsatisfiable constraint. Example: pmcheck/T3927b.- -- At the moment we try just once- try_harder insols- | not (isEmptyBag insols) -- We've found that it's definitely unsatisfiable- = return insols -- Hurrah -- stop now.- | otherwise- = do { pending_given <- getPendingGivenScs- ; new_given <- makeSuperClasses pending_given- ; solveSimpleGivens new_given- ; getInertInsols }--tcCheckWanteds :: InertSet -> ThetaType -> TcM Bool--- ^ Return True if the Wanteds are soluble, False if not-tcCheckWanteds inerts wanteds = do- cts <- newWanteds PatCheckOrigin wanteds- (sat, _new_inerts) <- runTcSInerts inerts $ do- traceTcS "checkWanteds {" (ppr inerts <+> ppr wanteds)- -- See Note [Superclasses and satisfiability]- wcs <- solveWanteds (mkSimpleWC cts)- traceTcS "checkWanteds }" (ppr wcs)- return (isSolvedWC wcs)- return sat---- | Normalise a type as much as possible using the given constraints.--- See @Note [tcNormalise]@.-tcNormalise :: InertSet -> Type -> TcM Type-tcNormalise inerts ty- = do { norm_loc <- getCtLocM PatCheckOrigin Nothing- ; (res, _new_inerts) <- runTcSInerts inerts $- do { traceTcS "tcNormalise {" (ppr inerts)- ; ty' <- rewriteType norm_loc ty- ; traceTcS "tcNormalise }" (ppr ty')- ; pure ty' }- ; return res }--{- Note [Superclasses and satisfiability]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Expand superclasses before starting, because (Int ~ Bool), has-(Int ~~ Bool) as a superclass, which in turn has (Int ~N# Bool)-as a superclass, and it's the latter that is insoluble. See-Note [The equality types story] in GHC.Builtin.Types.Prim.--If we fail to prove unsatisfiability we (arbitrarily) try just once to-find superclasses, using try_harder. Reason: we might have a type-signature- f :: F op (Implements push) => ..-where F is a type function. This happened in #3972.--We could do more than once but we'd have to have /some/ limit: in the-the recursive case, we would go on forever in the common case where-the constraints /are/ satisfiable (#10592 comment:12!).--For straightforward situations without type functions the try_harder-step does nothing.--Note [tcNormalise]-~~~~~~~~~~~~~~~~~~-tcNormalise is a rather atypical entrypoint to the constraint solver. Whereas-most invocations of the constraint solver are intended to simplify a set of-constraints or to decide if a particular set of constraints is satisfiable,-the purpose of tcNormalise is to take a type, plus some locally solved-constraints in the form of an InertSet, and normalise the type as much as-possible with respect to those constraints.--It does *not* reduce type or data family applications or look through newtypes.--Why is this useful? As one example, when coverage-checking an EmptyCase-expression, it's possible that the type of the scrutinee will only reduce-if some local equalities are solved for. See "Wrinkle: Local equalities"-in Note [Type normalisation] in "GHC.HsToCore.Pmc".--To accomplish its stated goal, tcNormalise first initialises the solver monad-with the given InertCans, then uses rewriteType to simplify the desired type-with respect to the Givens in the InertCans.--***********************************************************************************-* *-* Inference-* *-***********************************************************************************--Note [Inferring the type of a let-bound variable]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider- f x = rhs--To infer f's type we do the following:- * Gather the constraints for the RHS with ambient level *one more than*- the current one. This is done by the call- pushLevelAndCaptureConstraints (tcMonoBinds...)- in GHC.Tc.Gen.Bind.tcPolyInfer-- * Call simplifyInfer to simplify the constraints and decide what to- quantify over. We pass in the level used for the RHS constraints,- here called rhs_tclvl.--This ensures that the implication constraint we generate, if any,-has a strictly-increased level compared to the ambient level outside-the let binding.--Note [Inferring principal types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We don't always infer principal types. For instance, the inferred type for--> f x = show [x]--is--> f :: Show a => a -> String--This is not the most general type if we allow flexible contexts.-Indeed, if we try to write the following--> g :: Show [a] => a -> String-> g x = f x--we get the error:-- * Could not deduce (Show a) arising from a use of `f'- from the context: Show [a]--Though replacing f x in the right-hand side of g with the definition-of f x works, the call to f x does not. This is the hallmark of-unprincip{led,al} types.--Another example:--> class C a-> class D a where-> d :: a-> instance C a => D a where-> d = undefined-> h _ = d -- argument is to avoid the monomorphism restriction--The inferred type for h is--> h :: C a => t -> a--even though--> h :: D a => t -> a--is more general.--The fix is easy: don't simplify constraints before inferring a type.-That is, have the inferred type quantify over all constraints that arise-in a definition's right-hand side, even if they are simplifiable.-Unfortunately, this would yield all manner of unwieldy types,-and so we won't do so.--}---- | How should we choose which constraints to quantify over?-data InferMode = ApplyMR -- ^ Apply the monomorphism restriction,- -- never quantifying over any constraints- | EagerDefaulting -- ^ See Note [TcRnExprMode] in "GHC.Tc.Module",- -- the :type +d case; this mode refuses- -- to quantify over any defaultable constraint- | NoRestrictions -- ^ Quantify over any constraint that- -- satisfies pickQuantifiablePreds--instance Outputable InferMode where- ppr ApplyMR = text "ApplyMR"- ppr EagerDefaulting = text "EagerDefaulting"- ppr NoRestrictions = text "NoRestrictions"--simplifyInfer :: TcLevel -- Used when generating the constraints- -> InferMode- -> [TcIdSigInst] -- Any signatures (possibly partial)- -> [(Name, TcTauType)] -- Variables to be generalised,- -- and their tau-types- -> WantedConstraints- -> TcM ([TcTyVar], -- Quantify over these type variables- [EvVar], -- ... and these constraints (fully zonked)- TcEvBinds, -- ... binding these evidence variables- Bool) -- True <=> the residual constraints are insoluble--simplifyInfer rhs_tclvl infer_mode sigs name_taus wanteds- | isEmptyWC wanteds- = do { -- When quantifying, we want to preserve any order of variables as they- -- appear in partial signatures. cf. decideQuantifiedTyVars- let psig_tv_tys = [ mkTyVarTy tv | sig <- partial_sigs- , (_,Bndr tv _) <- sig_inst_skols sig ]- psig_theta = [ pred | sig <- partial_sigs- , pred <- sig_inst_theta sig ]-- ; dep_vars <- candidateQTyVarsOfTypes (psig_tv_tys ++ psig_theta ++ map snd name_taus)-- ; skol_info <- mkSkolemInfo (InferSkol name_taus)- ; qtkvs <- quantifyTyVars skol_info DefaultNonStandardTyVars dep_vars- ; traceTc "simplifyInfer: empty WC" (ppr name_taus $$ ppr qtkvs)- ; return (qtkvs, [], emptyTcEvBinds, False) }-- | otherwise- = do { traceTc "simplifyInfer {" $ vcat- [ text "sigs =" <+> ppr sigs- , text "binds =" <+> ppr name_taus- , text "rhs_tclvl =" <+> ppr rhs_tclvl- , text "infer_mode =" <+> ppr infer_mode- , text "(unzonked) wanted =" <+> ppr wanteds- ]-- ; let psig_theta = concatMap sig_inst_theta partial_sigs-- -- First do full-blown solving- -- NB: we must gather up all the bindings from doing- -- this solving; hence (runTcSWithEvBinds ev_binds_var).- -- And note that since there are nested implications,- -- calling solveWanteds will side-effect their evidence- -- bindings, so we can't just revert to the input- -- constraint.-- ; ev_binds_var <- TcM.newTcEvBinds- ; psig_evs <- newWanteds AnnOrigin psig_theta- ; wanted_transformed- <- setTcLevel rhs_tclvl $- runTcSWithEvBinds ev_binds_var $- solveWanteds (mkSimpleWC psig_evs `andWC` wanteds)- -- psig_evs : see Note [Add signature contexts as wanteds]- -- See Note [Inferring principal types]-- -- Find quant_pred_candidates, the predicates that- -- we'll consider quantifying over- -- NB1: wanted_transformed does not include anything provable from- -- the psig_theta; it's just the extra bit- -- NB2: We do not do any defaulting when inferring a type, this can lead- -- to less polymorphic types, see Note [Default while Inferring]- ; wanted_transformed <- TcM.zonkWC wanted_transformed- ; let definite_error = insolubleWC wanted_transformed- -- See Note [Quantification with errors]- quant_pred_candidates- | definite_error = []- | otherwise = ctsPreds (approximateWC False wanted_transformed)-- -- Decide what type variables and constraints to quantify- -- NB: quant_pred_candidates is already fully zonked- -- NB: bound_theta are constraints we want to quantify over,- -- including the psig_theta, which we always quantify over- -- NB: bound_theta are fully zonked- -- rec {..}: see Note [Keeping SkolemInfo inside a SkolemTv]- -- in GHC.Tc.Utils.TcType- ; rec { (qtvs, bound_theta, co_vars) <- decideQuantification skol_info infer_mode rhs_tclvl- name_taus partial_sigs- quant_pred_candidates- ; bound_theta_vars <- mapM TcM.newEvVar bound_theta-- ; let full_theta = map idType bound_theta_vars- ; skol_info <- mkSkolemInfo (InferSkol [ (name, mkSigmaTy [] full_theta ty)- | (name, ty) <- name_taus ])- }--- -- Now emit the residual constraint- ; emitResidualConstraints rhs_tclvl ev_binds_var- name_taus co_vars qtvs bound_theta_vars- wanted_transformed-- -- All done!- ; traceTc "} simplifyInfer/produced residual implication for quantification" $- vcat [ text "quant_pred_candidates =" <+> ppr quant_pred_candidates- , text "psig_theta =" <+> ppr psig_theta- , text "bound_theta =" <+> pprCoreBinders bound_theta_vars- , text "qtvs =" <+> ppr qtvs- , text "definite_error =" <+> ppr definite_error ]-- ; return ( qtvs, bound_theta_vars, TcEvBinds ev_binds_var, definite_error ) }- -- NB: bound_theta_vars must be fully zonked- where- partial_sigs = filter isPartialSig sigs-----------------------emitResidualConstraints :: TcLevel -> EvBindsVar- -> [(Name, TcTauType)]- -> CoVarSet -> [TcTyVar] -> [EvVar]- -> WantedConstraints -> TcM ()--- Emit the remaining constraints from the RHS.-emitResidualConstraints rhs_tclvl ev_binds_var- name_taus co_vars qtvs full_theta_vars wanteds- | isEmptyWC wanteds- = return ()-- | otherwise- = do { wanted_simple <- TcM.zonkSimples (wc_simple wanteds)- ; let (outer_simple, inner_simple) = partitionBag is_mono wanted_simple- is_mono ct- | Just ct_ev_id <- wantedEvId_maybe ct- = ct_ev_id `elemVarSet` co_vars- | otherwise- = False- -- Reason for the partition:- -- see Note [Emitting the residual implication in simplifyInfer]---- Already done by defaultTyVarsAndSimplify--- ; _ <- TcM.promoteTyVarSet (tyCoVarsOfCts outer_simple)-- ; let inner_wanted = wanteds { wc_simple = inner_simple }- ; implics <- if isEmptyWC inner_wanted- then return emptyBag- else do implic1 <- newImplication- return $ unitBag $- implic1 { ic_tclvl = rhs_tclvl- , ic_skols = qtvs- , ic_given = full_theta_vars- , ic_wanted = inner_wanted- , ic_binds = ev_binds_var- , ic_given_eqs = MaybeGivenEqs- , ic_info = skol_info }-- ; emitConstraints (emptyWC { wc_simple = outer_simple- , wc_impl = implics }) }- where- full_theta = map idType full_theta_vars- skol_info = InferSkol [ (name, mkSigmaTy [] full_theta ty)- | (name, ty) <- name_taus ]- -- We don't add the quantified variables here, because they are- -- also bound in ic_skols and we want them to be tidied- -- uniformly.-----------------------ctsPreds :: Cts -> [PredType]-ctsPreds cts = [ ctEvPred ev | ct <- bagToList cts- , let ev = ctEvidence ct ]--findInferredDiff :: TcThetaType -> TcThetaType -> TcM TcThetaType--- Given a partial type signature f :: (C a, D a, _) => blah--- and the inferred constraints (X a, D a, Y a, C a)--- compute the difference, which is what will fill in the "_" underscore,--- In this case the diff is (X a, Y a).-findInferredDiff annotated_theta inferred_theta- | null annotated_theta -- Short cut the common case when the user didn't- = return inferred_theta -- write any constraints in the partial signature- | otherwise- = pushTcLevelM_ $- do { lcl_env <- TcM.getLclEnv- ; given_ids <- mapM TcM.newEvVar annotated_theta- ; wanteds <- newWanteds AnnOrigin inferred_theta- ; let given_loc = mkGivenLoc topTcLevel (getSkolemInfo unkSkol) lcl_env- given_cts = mkGivens given_loc given_ids-- ; (residual, _) <- runTcS $- do { _ <- solveSimpleGivens given_cts- ; solveSimpleWanteds (listToBag (map mkNonCanonical wanteds)) }- -- NB: There are no meta tyvars fromn this level annotated_theta- -- because we have either promoted them or unified them- -- See `Note [Quantification and partial signatures]` Wrinkle 2-- ; return (map (box_pred . ctPred) $- bagToList $- wc_simple residual) }- where- box_pred :: PredType -> PredType- box_pred pred = case classifyPredType pred of- EqPred rel ty1 ty2- | Just (cls,tys) <- boxEqPred rel ty1 ty2- -> mkClassPred cls tys- | otherwise- -> pprPanic "findInferredDiff" (ppr pred)- _other -> pred--{- Note [Emitting the residual implication in simplifyInfer]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider- f = e-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-the coercion variable, and hence we can't generalise over things free in-its kind, in the case 'k'. But we can still generalise over 'a'. So-we'll generalise to- f :: forall a. (a, Proxy k (Int |> co))-Now we do NOT want to form the residual implication constraint- forall a. [W] co :: Type ~ k-because then co's eventual binding (which will be a value binding if we-use -fdefer-type-errors) won't scope over the entire binding for 'f' (whose-type mentions 'co'). Instead, just as we don't generalise over 'co', we-should not bury its constraint inside the implication. Instead, we must-put it outside.--That is the reason for the partitionBag in emitResidualConstraints,-which takes the CoVars free in the inferred type, and pulls their-constraints out. (NB: this set of CoVars should be closed-over-kinds.)--All rather subtle; see #14584.--Note [Add signature contexts as wanteds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this (#11016):- f2 :: (?x :: Int) => _- f2 = ?x--or this- class C a b | a -> b- g :: C p q => p -> q- f3 :: C Int b => _- f3 = g (3::Int)--We'll use plan InferGen because there are holes in the type. But:- * For f2 we want to have the (?x :: Int) constraint floating around- so that the functional dependencies kick in. Otherwise the- occurrence of ?x on the RHS produces constraint (?x :: alpha), and- we won't unify alpha:=Int.-- * For f3 want the (C Int b) constraint from the partial signature- to meet the (C Int beta) constraint we get from the call to g; again,- fundeps--Solution: in simplifyInfer, we add the constraints from the signature-as extra Wanteds.--Why Wanteds? Wouldn't it be neater to treat them as Givens? Alas-that would mess up (GivenInv) in Note [TcLevel invariants]. Consider- f :: (Eq a, _) => blah1- f = ....g...- g :: (Eq b, _) => blah2- g = ...f...--Then we have two psig_theta constraints (Eq a[tv], Eq b[tv]), both with-TyVarTvs inside. Ultimately a[tv] := b[tv], but only when we've solved-all those constraints. And both have level 1, so we can't put them as-Givens when solving at level 1.--Best to treat them as Wanteds.--But see also #20076, which would be solved if they were Givens.---************************************************************************-* *- Quantification-* *-************************************************************************--Note [Deciding quantification]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-If the monomorphism restriction does not apply, then we quantify as follows:--* Step 1: decideMonoTyVars.- Take the global tyvars, and "grow" them using functional dependencies- E.g. if x:alpha is in the environment, and alpha ~ [beta] (which can- happen because alpha is untouchable here) then do not quantify over- beta, because alpha fixes beta, and beta is effectively free in- the environment too; this logic extends to general fundeps, not- just equalities-- We also account for the monomorphism restriction; if it applies,- add the free vars of all the constraints.-- Result is mono_tvs; we will not quantify over these.--* Step 2: defaultTyVarsAndSimplify.- Default any non-mono tyvars (i.e ones that are definitely- not going to become further constrained), and re-simplify the- candidate constraints.-- Motivation for re-simplification (#7857): imagine we have a- constraint (C (a->b)), where 'a :: TYPE l1' and 'b :: TYPE l2' are- not free in the envt, and instance forall (a::*) (b::*). (C a) => C- (a -> b) The instance doesn't match while l1,l2 are polymorphic, but- it will match when we default them to LiftedRep.-- This is all very tiresome.-- This step also promotes the mono_tvs from Step 1. See- Note [Promote monomorphic tyvars]. In fact, the *only*- use of the mono_tvs from Step 1 is to promote them here.- This promotion effectively stops us from quantifying over them- later, in Step 3. Because the actual variables to quantify- over are determined in Step 3 (not in Step 1), it is OK for- the mono_tvs to be missing some variables free in the- environment. This is why removing the psig_qtvs is OK in- decideMonoTyVars. Test case for this scenario: T14479.--* Step 3: decideQuantifiedTyVars.- Decide which variables to quantify over, as follows:-- - Take the free vars of the partial-type-signature types and constraints,- and the tau-type (zonked_tau_tvs), and then "grow"- them using all the constraints. These are grown_tcvs.- See Note [growThetaTyVars vs closeWrtFunDeps].-- - Use quantifyTyVars to quantify over the free variables of all the types- involved, but only those in the grown_tcvs.-- Result is qtvs.--* Step 4: Filter the constraints using pickQuantifiablePreds and the- qtvs. We have to zonk the constraints first, so they "see" the- freshly created skolems.--Note [Lift equality constraints when quantifying]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We can't quantify over a constraint (t1 ~# t2) because that isn't a-predicate type; see Note [Types for coercions, predicates, and evidence]-in GHC.Core.TyCo.Rep.--So we have to 'lift' it to (t1 ~ t2). Similarly (~R#) must be lifted-to Coercible.--This tiresome lifting is the reason that pick_me (in-pickQuantifiablePreds) returns a Maybe rather than a Bool.--Note [Inheriting implicit parameters]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this:-- f x = (x::Int) + ?y--where f is *not* a top-level binding.-From the RHS of f we'll get the constraint (?y::Int).-There are two types we might infer for f:-- f :: Int -> Int--(so we get ?y from the context of f's definition), or-- f :: (?y::Int) => Int -> Int--At first you might think the first was better, because then-?y behaves like a free variable of the definition, rather than-having to be passed at each call site. But of course, the WHOLE-IDEA is that ?y should be passed at each call site (that's what-dynamic binding means) so we'd better infer the second.--BOTTOM LINE: when *inferring types* you must quantify over implicit-parameters, *even if* they don't mention the bound type variables.-Reason: because implicit parameters, uniquely, have local instance-declarations. See pickQuantifiablePreds.--Note [Quantifying over equality constraints]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Should we quantify over an equality constraint (s ~ t)? In general, we don't.-Doing so may simply postpone a type error from the function definition site to-its call site. (At worst, imagine (Int ~ Bool)).--However, consider this- forall a. (F [a] ~ Int) => blah-Should we quantify over the (F [a] ~ Int). Perhaps yes, because at the call-site we will know 'a', and perhaps we have instance F [Bool] = Int.-So we *do* quantify over a type-family equality where the arguments mention-the quantified variables.--Note [Unconditionally resimplify constraints when quantifying]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-During quantification (in defaultTyVarsAndSimplify, specifically), we re-invoke-the solver to simplify the constraints before quantifying them. We do this for-two reasons, enumerated below. We could, in theory, detect when either of these-cases apply and simplify only then, but collecting this information is bothersome,-and simplifying redundantly causes no real harm. Note that this code path-happens only for definitions- * without a type signature- * when -XMonoLocalBinds does not apply- * with unsolved constraints-and so the performance cost will be small.--1. Defaulting--Defaulting the variables handled by defaultTyVar may unlock instance simplifications.-Example (typecheck/should_compile/T20584b):-- with (t :: Double) (u :: String) = printf "..." t u--We know the types of t and u, but we do not know the return type of `with`. So, we-assume `with :: alpha`, where `alpha :: TYPE rho`. The type of printf is- printf :: PrintfType r => String -> r-The occurrence of printf is instantiated with a fresh var beta. We then get- beta := Double -> String -> alpha-and- [W] PrintfType (Double -> String -> alpha)--Module Text.Printf exports- instance (PrintfArg a, PrintfType r) => PrintfType (a -> r)-and it looks like that instance should apply.--But I have elided some key details: (->) is polymorphic over multiplicity and-runtime representation. Here it is in full glory:- [W] PrintfType ((Double :: Type) %m1 -> (String :: Type) %m2 -> (alpha :: TYPE rho))- instance (PrintfArg a, PrintfType r) => PrintfType ((a :: Type) %Many -> (r :: Type))--Because we do not know that m1 is Many, we cannot use the instance. (Perhaps a better instance-would have an explicit equality constraint to the left of =>, but that's not what we have.)-Then, in defaultTyVarsAndSimplify, we get m1 := Many, m2 := Many, and rho := LiftedRep.-Yet it's too late to simplify the quantified constraint, and thus GHC infers- wait :: PrintfType (Double -> String -> t) => Double -> String -> t-which is silly. Simplifying again after defaulting solves this problem.--2. Interacting functional dependencies--Suppose we have-- class C a b | a -> b--and we are running simplifyInfer over-- forall[2] x. () => [W] C a beta1[1]- forall[2] y. () => [W] C a beta2[1]--These are two implication constraints, both of which contain a-wanted for the class C. Neither constraint mentions the bound-skolem. We might imagine that these constraint could thus float-out of their implications and then interact, causing beta1 to unify-with beta2, but constraints do not currently float out of implications.--Unifying the beta1 and beta2 is important. Without doing so, then we might-infer a type like (C a b1, C a b2) => a -> a, which will fail to pass the-ambiguity check, which will say (rightly) that it cannot unify b1 with b2, as-required by the fundep interactions. This happens in the parsec library, and-in test case typecheck/should_compile/FloatFDs.--If we re-simplify, however, the two fundep constraints will interact, causing-a unification between beta1 and beta2, and all will be well. The key step-is that this simplification happens *after* the call to approximateWC in-simplifyInfer.--Note [Do not quantify over constraints that determine a variable]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (typecheck/should_compile/tc231), where we're trying to infer-the type of a top-level declaration. We have- class Zork s a b | a -> b-and the candidate constraint at the end of simplifyInfer is- [W] Zork alpha (Z [Char]) beta-We definitely do want to quantify over alpha (which is mentioned in-the tau-type). But we do *not* want to quantify over beta: it is-determined by the functional dependency on Zork: note that the second-argument to Zork in the Wanted is a variable-free Z [Char].--The question here: do we want to quantify over the constraint? Definitely not.-Since we're not quantifying over beta, GHC has no choice but to zap beta-to Any, and then we infer a type involving (Zork a (Z [Char]) Any => ...). No no no.--The no_fixed_dependencies check in pickQuantifiablePreds eliminates this-candidate from the pool. Because there are no Zork instances in scope, this-program is rejected.---}--decideQuantification- :: SkolemInfo- -> InferMode- -> TcLevel- -> [(Name, TcTauType)] -- Variables to be generalised- -> [TcIdSigInst] -- Partial type signatures (if any)- -> [PredType] -- Candidate theta; already zonked- -> TcM ( [TcTyVar] -- Quantify over these (skolems)- , [PredType] -- and this context (fully zonked)- , CoVarSet)--- See Note [Deciding quantification]-decideQuantification skol_info infer_mode rhs_tclvl name_taus psigs candidates- = do { -- Step 1: find the mono_tvs- ; (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 <- decideQuantifiedTyVars skol_info name_taus psigs candidates-- -- Step 4: choose which of the remaining candidate- -- predicates to actually quantify over- -- NB: decideQuantifiedTyVars turned some meta tyvars- -- into quantified skolems, so we have to zonk again- ; candidates <- TcM.zonkTcTypes candidates- ; psig_theta <- TcM.zonkTcTypes (concatMap sig_inst_theta psigs)- ; let min_theta = mkMinimalBySCs id $ -- See Note [Minimize by Superclasses]- pickQuantifiablePreds (mkVarSet qtvs) candidates-- min_psig_theta = mkMinimalBySCs id psig_theta-- -- Add psig_theta back in here, even though it's already- -- part of candidates, because we always want to quantify over- -- psig_theta, and pickQuantifiableCandidates might have- -- dropped some e.g. CallStack constraints. c.f #14658- -- equalities (a ~ Bool)- -- It's helpful to use the same "find difference" algorithm here as- -- we use in GHC.Tc.Gen.Bind.chooseInferredQuantifiers (#20921)- -- See Note [Constraints in partial type signatures]- ; theta <- if null psig_theta- then return min_theta -- Fast path for the non-partial-sig case- else do { diff <- findInferredDiff min_psig_theta min_theta- ; return (min_psig_theta ++ diff) }-- ; traceTc "decideQuantification"- (vcat [ text "infer_mode:" <+> ppr infer_mode- , text "candidates:" <+> ppr candidates- , text "psig_theta:" <+> ppr psig_theta- , text "mono_tvs:" <+> ppr mono_tvs- , text "co_vars:" <+> ppr co_vars- , text "qtvs:" <+> ppr qtvs- , text "theta:" <+> ppr theta ])- ; return (qtvs, theta, co_vars) }--{- Note [Constraints in partial type signatures]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have a partial type signature- f :: (Eq a, C a, _) => blah--We will ultimately quantify f over (Eq a, C a, <diff>), where-- * <diff> is the result of- findInferredDiff (Eq a, C a) <quant-theta>- in GHC.Tc.Gen.Bind.chooseInferredQuantifiers-- * <quant-theta> is the theta returned right here,- by decideQuantification--At least for single functions we would like to quantify f over-precisely the same theta as <quant-theta>, so that we get to take-the short-cut path in GHC.Tc.Gen.Bind.mkExport, and avoid calling-tcSubTypeSigma for impedance matching. Why avoid? Because it falls-over for ambiguous types (#20921).--We can get precisely the same theta by using the same algorithm,-findInferredDiff.--All of this goes wrong if we have (a) mutual recursion, (b) multiple-partial type signatures, (c) with different constraints, and (d)-ambiguous types. Something like- f :: forall a. Eq a => F a -> _- f x = (undefined :: a) == g x undefined- g :: forall b. Show b => F b -> _ -> b- g x y = let _ = (f y, show x) in x-But that's a battle for another day.--}--decideMonoTyVars :: InferMode- -> [(Name,TcType)]- -> [TcIdSigInst]- -> [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 or fundep to (a) or (b)--- Also return CoVars that appear free in the final quantified 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-- -- If possible, we quantify over partial-sig qtvs, so they are- -- not mono. Need to zonk them because they are meta-tyvar TyVarTvs- ; psig_qtvs <- zonkTcTyVarsToTcTyVars $ binderVars $- concatMap (map snd . sig_inst_skols) psigs-- ; psig_theta <- mapM TcM.zonkTcType $- concatMap sig_inst_theta psigs-- ; taus <- mapM (TcM.zonkTcType . snd) name_taus-- ; tc_lvl <- TcM.getTcLevel- ; let psig_tys = mkTyVarTys psig_qtvs ++ psig_theta-- co_vars = coVarsOfTypes (psig_tys ++ taus ++ candidates)- 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_tvs0 = filterVarSet (not . isQuantifiableTv tc_lvl) $- tyCoVarsOfTypes candidates- -- We need to grab all the non-quantifiable tyvars in the- -- types so that we can grow this set to find other- -- non-quantifiable tyvars. This can happen with something- -- like- -- f x y = ...- -- where z = x 3- -- The body of z tries to unify the type of x (call it alpha[1])- -- with (beta[2] -> gamma[2]). This unification fails because- -- alpha is untouchable. But we need to know not to quantify over- -- beta or gamma, because they are in the equality constraint with- -- alpha. Actual test case: typecheck/should_compile/tc213-- mono_tvs1 = mono_tvs0 `unionVarSet` co_var_tvs- -- mono_tvs1 is now the set of variables from an outer scope- -- (that's mono_tvs0) and the set of covars, closed over kinds.- -- Given this set of variables we know we will not quantify,- -- we want to find any other variables that are determined by this- -- set, by functional dependencies or equalities. We thus use- -- closeWrtFunDeps to find all further variables determined by this root- -- set. See Note [growThetaTyVars vs closeWrtFunDeps]-- non_ip_candidates = filterOut isIPLikePred candidates- -- implicit params don't really determine a type variable- -- (that is, we might have IP "c" Bool and IP "c" Int in different- -- places within the same program), and- -- skipping this causes implicit params to monomorphise too many- -- variables; see Note [Inheriting implicit parameters] in- -- GHC.Tc.Solver. Skipping causes typecheck/should_compile/tc219- -- to fail.-- mono_tvs2 = closeWrtFunDeps non_ip_candidates mono_tvs1- -- mono_tvs2 now contains any variable determined by the "root- -- set" of monomorphic tyvars in mono_tvs1.-- constrained_tvs = filterVarSet (isQuantifiableTv tc_lvl) $- closeWrtFunDeps non_ip_candidates (tyCoVarsOfTypes no_quant)- `minusVarSet` mono_tvs2- -- constrained_tvs: the tyvars that we are not going to- -- quantify solely because of the monomorphism restriction- --- -- (`minusVarSet` mono_tvs2): a type variable is only- -- "constrained" (so that the MR bites) if it is not- -- free in the environment (#13785) or is determined- -- by some variable that is free in the env't-- mono_tvs = (mono_tvs2 `unionVarSet` constrained_tvs)- `delVarSetList` psig_qtvs- -- (`delVarSetList` psig_qtvs): if the user has explicitly- -- asked for quantification, then that request "wins"- -- over the MR.- --- -- What if a psig variable is also free in the environment- -- (i.e. says "no" to isQuantifiableTv)? That's OK: explanation- -- in Step 2 of Note [Deciding quantification].-- -- Warn about the monomorphism restriction- ; when (case infer_mode of { ApplyMR -> True; _ -> False}) $ do- let dia = TcRnMonomorphicBindings (map fst name_taus)- diagnosticTc (constrained_tvs `intersectsVarSet` tyCoVarsOfTypes taus) dia-- ; traceTc "decideMonoTyVars" $ vcat- [ text "infer_mode =" <+> ppr infer_mode- , text "mono_tvs0 =" <+> ppr mono_tvs0- , text "no_quant =" <+> ppr no_quant- , text "maybe_quant =" <+> ppr maybe_quant- , text "mono_tvs =" <+> ppr mono_tvs- , text "co_vars =" <+> ppr co_vars ]-- ; return (mono_tvs, maybe_quant, co_vars) }- where- pick :: InferMode -> [PredType] -> TcM ([PredType], [PredType])- -- Split the candidates into ones we definitely- -- won't quantify, and ones that we might- pick NoRestrictions cand = return ([], cand)- pick ApplyMR cand = return (cand, [])- pick EagerDefaulting cand = do { os <- xoptM LangExt.OverloadedStrings- ; return (partition (is_int_ct os) cand) }-- -- For EagerDefaulting, do not quantify over- -- over any interactive class constraint- is_int_ct ovl_strings pred- | Just (cls, _) <- getClassPredTys_maybe pred- = isInteractiveClass ovl_strings cls- | otherwise- = False----------------------defaultTyVarsAndSimplify :: TcLevel- -> TyCoVarSet -- Promote these mono-tyvars- -> [PredType] -- Assumed zonked- -> TcM [PredType] -- Guaranteed zonked--- Promote the known-monomorphic tyvars;--- Default any tyvar free in the constraints;--- and re-simplify in case the defaulting allows further simplification-defaultTyVarsAndSimplify rhs_tclvl mono_tvs candidates- = do { -- Promote any tyvars that we cannot generalise- -- See Note [Promote monomorphic tyvars]- ; traceTc "decideMonoTyVars: promotion:" (ppr mono_tvs)- ; _ <- promoteTyVarSet mono_tvs-- -- Default any kind/levity vars- ; DV {dv_kvs = cand_kvs, dv_tvs = cand_tvs}- <- candidateQTyVarsOfTypes candidates- -- any covars should already be handled by- -- the logic in decideMonoTyVars, which looks at- -- the constraints generated-- ; poly_kinds <- xoptM LangExt.PolyKinds- ; mapM_ (default_one poly_kinds True) (dVarSetElems cand_kvs)- ; mapM_ (default_one poly_kinds False) (dVarSetElems (cand_tvs `minusDVarSet` cand_kvs))-- ; simplify_cand candidates- }- where- default_one poly_kinds is_kind_var tv- | not (isMetaTyVar tv)- = return ()- | tv `elemVarSet` mono_tvs- = return ()- | otherwise- = void $ defaultTyVar- (if not poly_kinds && is_kind_var- then DefaultKindVars- else NonStandardDefaulting DefaultNonStandardTyVars)- -- NB: only pass 'DefaultKindVars' when we know we're dealing with a kind variable.- tv-- -- this common case (no inferred constraints) should be fast- simplify_cand [] = return []- -- see Note [Unconditionally resimplify constraints when quantifying]- simplify_cand candidates- = do { clone_wanteds <- newWanteds DefaultOrigin candidates- ; WC { wc_simple = simples } <- setTcLevel rhs_tclvl $- simplifyWantedsTcM clone_wanteds- -- Discard evidence; simples is fully zonked-- ; let new_candidates = ctsPreds simples- ; traceTc "Simplified after defaulting" $- vcat [ text "Before:" <+> ppr candidates- , text "After:" <+> ppr new_candidates ]- ; return new_candidates }---------------------decideQuantifiedTyVars- :: SkolemInfo- -> [(Name,TcType)] -- Annotated theta and (name,tau) pairs- -> [TcIdSigInst] -- Partial signatures- -> [PredType] -- Candidates, zonked- -> TcM [TyVar]--- Fix what tyvars we are going to quantify over, and quantify them-decideQuantifiedTyVars skol_info name_taus psigs candidates- = do { -- Why psig_tys? We try to quantify over everything free in here- -- See Note [Quantification and partial signatures]- -- Wrinkles 2 and 3- ; psig_tv_tys <- mapM TcM.zonkTcTyVar [ tv | sig <- psigs- , (_,Bndr tv _) <- sig_inst_skols sig ]- ; psig_theta <- mapM TcM.zonkTcType [ pred | sig <- psigs- , pred <- sig_inst_theta sig ]- ; tau_tys <- mapM (TcM.zonkTcType . snd) name_taus-- ; let -- Try to quantify over variables free in these types- psig_tys = psig_tv_tys ++ psig_theta- seed_tys = psig_tys ++ tau_tys-- -- Now "grow" those seeds to find ones reachable via 'candidates'- -- See Note [growThetaTyVars vs closeWrtFunDeps]- grown_tcvs = growThetaTyVars candidates (tyCoVarsOfTypes seed_tys)-- -- Now we have to classify them into kind variables and type variables- -- (sigh) just for the benefit of -XNoPolyKinds; see quantifyTyVars- --- -- Keep the psig_tys first, so that candidateQTyVarsOfTypes produces- -- them in that order, so that the final qtvs quantifies in the same- -- order as the partial signatures do (#13524)- ; dv@DV {dv_kvs = cand_kvs, dv_tvs = cand_tvs} <- candidateQTyVarsOfTypes $- psig_tys ++ candidates ++ tau_tys- ; let pick = (`dVarSetIntersectVarSet` grown_tcvs)- dvs_plus = dv { dv_kvs = pick cand_kvs, dv_tvs = pick cand_tvs }-- ; traceTc "decideQuantifiedTyVars" (vcat- [ text "tau_tys =" <+> ppr tau_tys- , text "candidates =" <+> ppr candidates- , text "cand_kvs =" <+> ppr cand_kvs- , text "cand_tvs =" <+> ppr cand_tvs- , text "tau_tys =" <+> ppr tau_tys- , text "seed_tys =" <+> ppr seed_tys- , text "seed_tcvs =" <+> ppr (tyCoVarsOfTypes seed_tys)- , text "grown_tcvs =" <+> ppr grown_tcvs- , text "dvs =" <+> ppr dvs_plus])-- ; quantifyTyVars skol_info DefaultNonStandardTyVars dvs_plus }----------------------- | When inferring types, should we quantify over a given predicate?--- Generally true of classes; generally false of equality constraints.--- Equality constraints that mention quantified type variables and--- implicit variables complicate the story. See Notes--- [Inheriting implicit parameters] and [Quantifying over equality constraints]-pickQuantifiablePreds- :: TyVarSet -- Quantifying over these- -> TcThetaType -- Proposed constraints to quantify- -> TcThetaType -- A subset that we can actually quantify--- This function decides whether a particular constraint should be--- quantified over, given the type variables that are being quantified-pickQuantifiablePreds qtvs theta- = let flex_ctxt = True in -- Quantify over non-tyvar constraints, even without- -- -XFlexibleContexts: see #10608, #10351- -- flex_ctxt <- xoptM Opt_FlexibleContexts- mapMaybe (pick_me flex_ctxt) theta- where- pick_me flex_ctxt pred- = case classifyPredType pred of-- ClassPred cls tys- | Just {} <- isCallStackPred cls tys- -- NEVER infer a CallStack constraint. Otherwise we let- -- the constraints bubble up to be solved from the outer- -- context, or be defaulted when we reach the top-level.- -- See Note [Overview of implicit CallStacks] in GHC.Tc.Types.Evidence- -> Nothing-- | isIPClass cls- -> Just pred -- See Note [Inheriting implicit parameters]-- | pick_cls_pred flex_ctxt cls tys- -> Just pred-- EqPred eq_rel ty1 ty2- | quantify_equality eq_rel ty1 ty2- , Just (cls, tys) <- boxEqPred eq_rel ty1 ty2- -- boxEqPred: See Note [Lift equality constraints when quantifying]- , pick_cls_pred flex_ctxt cls tys- -> Just (mkClassPred cls tys)-- IrredPred ty- | tyCoVarsOfType ty `intersectsVarSet` qtvs- -> Just pred-- _ -> Nothing--- pick_cls_pred flex_ctxt cls tys- = tyCoVarsOfTypes tys `intersectsVarSet` qtvs- && (checkValidClsArgs flex_ctxt cls tys)- -- Only quantify over predicates that checkValidType- -- will pass! See #10351.- && (no_fixed_dependencies cls tys)-- -- See Note [Do not quantify over constraints that determine a variable]- no_fixed_dependencies cls tys- = and [ qtvs `intersectsVarSet` tyCoVarsOfTypes fd_lhs_tys- | fd <- cls_fds- , let (fd_lhs_tys, _) = instFD fd cls_tvs tys ]- where- (cls_tvs, cls_fds) = classTvsFds cls-- -- See Note [Quantifying over equality constraints]- quantify_equality NomEq ty1 ty2 = quant_fun ty1 || quant_fun ty2- quantify_equality ReprEq _ _ = True-- quant_fun ty- = case tcSplitTyConApp_maybe ty of- Just (tc, tys) | isTypeFamilyTyCon tc- -> tyCoVarsOfTypes tys `intersectsVarSet` qtvs- _ -> False----------------------growThetaTyVars :: ThetaType -> TyCoVarSet -> TyCoVarSet--- See Note [growThetaTyVars vs closeWrtFunDeps]-growThetaTyVars theta tcvs- | null theta = tcvs- | otherwise = transCloVarSet mk_next seed_tcvs- where- seed_tcvs = tcvs `unionVarSet` tyCoVarsOfTypes ips- (ips, non_ips) = partition isIPLikePred theta- -- See Note [Inheriting implicit parameters]-- mk_next :: VarSet -> VarSet -- Maps current set to newly-grown ones- mk_next so_far = foldr (grow_one so_far) emptyVarSet non_ips- grow_one so_far pred tcvs- | pred_tcvs `intersectsVarSet` so_far = tcvs `unionVarSet` pred_tcvs- | otherwise = tcvs- where- pred_tcvs = tyCoVarsOfType pred---{- Note [Promote monomorphic tyvars]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Promote any type variables that are free in the environment. Eg- f :: forall qtvs. bound_theta => zonked_tau-The free vars of f's type become free in the envt, and hence will show-up whenever 'f' is called. They may currently at rhs_tclvl, but they-had better be unifiable at the outer_tclvl! Example: envt mentions-alpha[1]- tau_ty = beta[2] -> beta[2]- constraints = alpha ~ [beta]-we don't quantify over beta (since it is fixed by envt)-so we must promote it! The inferred type is just- f :: beta -> beta--NB: promoteTyVarSet ignores coercion variables--Note [Quantification and partial signatures]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When choosing type variables to quantify, the basic plan is to-quantify over all type variables that are- * free in the tau_tvs, and- * not forced to be monomorphic (mono_tvs),- for example by being free in the environment.--However, in the case of a partial type signature, we are doing inference-*in the presence of a type signature*. For example:- f :: _ -> a- f x = ...-or- g :: (Eq _a) => _b -> _b-In both cases we use plan InferGen, and hence call simplifyInfer. But-those 'a' variables are skolems (actually TyVarTvs), and we should be-sure to quantify over them. This leads to several wrinkles:--* Wrinkle 1. In the case of a type error- f :: _ -> Maybe a- f x = True && x- The inferred type of 'f' is f :: Bool -> Bool, but there's a- left-over error of form (Maybe a ~ Bool). The error-reporting- machine expects to find a binding site for the skolem 'a', so we- add it to the quantified tyvars.--* Wrinkle 2. Consider the partial type signature- f :: (Eq _) => Int -> Int- f x = x- In normal cases that makes sense; e.g.- g :: Eq _a => _a -> _a- g x = x- where the signature makes the type less general than it could- be. But for 'f' we must therefore quantify over the user-annotated- constraints, to get- f :: forall a. Eq a => Int -> Int- (thereby correctly triggering an ambiguity error later). If we don't- we'll end up with a strange open type- f :: Eq alpha => Int -> Int- which isn't ambiguous but is still very wrong.-- Bottom line: Try to quantify over any variable free in psig_theta,- just like the tau-part of the type.--* Wrinkle 3 (#13482). Also consider- f :: forall a. _ => Int -> Int- f x = if (undefined :: a) == undefined then x else 0- Here we get an (Eq a) constraint, but it's not mentioned in the- psig_theta nor the type of 'f'. But we still want to quantify- over 'a' even if the monomorphism restriction is on.--* Wrinkle 4 (#14479)- foo :: Num a => a -> a- foo xxx = g xxx- where- g :: forall b. Num b => _ -> b- g y = xxx + y-- In the signature for 'g', we cannot quantify over 'b' because it turns out to- get unified with 'a', which is free in g's environment. So we carefully- refrain from bogusly quantifying, in GHC.Tc.Solver.decideMonoTyVars. We- report the error later, in GHC.Tc.Gen.Bind.chooseInferredQuantifiers.--Note [growThetaTyVars vs closeWrtFunDeps]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-GHC has two functions, growThetaTyVars and closeWrtFunDeps, both with-the same type and similar behavior. This Note outlines the differences-and why we use one or the other.--Both functions take a list of constraints. We will call these the-*candidates*.--closeWrtFunDeps takes a set of "determined" type variables and finds the-closure of that set with respect to the functional dependencies-within the class constraints in the set of candidates. So, if we-have-- class C a b | a -> b- class D a b -- no fundep- candidates = {C (Maybe a) (Either b c), D (Maybe a) (Either d e)}--then closeWrtFunDeps {a} will return the set {a,b,c}.-This is because, if `a` is determined, then `b` and `c` are, too,-by functional dependency. closeWrtFunDeps called with any seed set not including-`a` will just return its argument, as only `a` determines any other-type variable (in this example).--growThetaTyVars operates similarly, but it behaves as if every-constraint has a functional dependency among all its arguments.-So, continuing our example, growThetaTyVars {a} will return-{a,b,c,d,e}. Put another way, growThetaTyVars grows the set of-variables to include all variables that are mentioned in the same-constraint (transitively).--We use closeWrtFunDeps in places where we need to know which variables are-*always* determined by some seed set. This includes- * when determining the mono-tyvars in decideMonoTyVars. If `a`- is going to be monomorphic, we need b and c to be also: they- are determined by the choice for `a`.- * when checking instance coverage, in- GHC.Tc.Instance.FunDeps.checkInstCoverage--On the other hand, we use growThetaTyVars where we need to know-which variables *might* be determined by some seed set. This includes- * deciding quantification (GHC.Tc.Gen.Bind.chooseInferredQuantifiers- and decideQuantifiedTyVars-How can `a` determine (say) `d` in the example above without a fundep?-Suppose we have- instance (b ~ a, c ~ a) => D (Maybe [a]) (Either b c)-Now, if `a` turns out to be a list, it really does determine b and c.-The danger in overdoing quantification is the creation of an ambiguous-type signature, but this is conveniently caught in the validity checker.--Note [Quantification with errors]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-If we find that the RHS of the definition has some absolutely-insoluble-constraints (including especially "variable not in scope"), we--* Abandon all attempts to find a context to quantify over,- and instead make the function fully-polymorphic in whatever- type we have found--* Return a flag from simplifyInfer, indicating that we found an- insoluble constraint. This flag is used to suppress the ambiguity- check for the inferred type, which may well be bogus, and which- tends to obscure the real error. This fix feels a bit clunky,- but I failed to come up with anything better.--Reasons:- - Avoid downstream errors- - Do not perform an ambiguity test on a bogus type, which might well- fail spuriously, thereby obfuscating the original insoluble error.- #14000 is an example--I tried an alternative approach: simply failM, after emitting the-residual implication constraint; the exception will be caught in-GHC.Tc.Gen.Bind.tcPolyBinds, which gives all the binders in the group the type-(forall a. a). But that didn't work with -fdefer-type-errors, because-the recovery from failM emits no code at all, so there is no function-to run! But -fdefer-type-errors aspires to produce a runnable program.--Note [Default while Inferring]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Our current plan is that defaulting only happens at simplifyTop and-not simplifyInfer. This may lead to some insoluble deferred constraints.-Example:--instance D g => C g Int b--constraint inferred = (forall b. 0 => C gamma alpha b) /\ Num alpha-type inferred = gamma -> gamma--Now, if we try to default (alpha := Int) we will be able to refine the implication to- (forall b. 0 => C gamma Int b)-which can then be simplified further to- (forall b. 0 => D gamma)-Finally, we /can/ approximate this implication with (D gamma) and infer the quantified-type: forall g. D g => g -> g--Instead what will currently happen is that we will get a quantified type-(forall g. g -> g) and an implication:- forall g. 0 => (forall b. 0 => C g alpha b) /\ Num alpha--Which, even if the simplifyTop defaults (alpha := Int) we will still be left with an-unsolvable implication:- forall g. 0 => (forall b. 0 => D g)--The concrete example would be:- h :: C g a s => g -> a -> ST s a- f (x::gamma) = (\_ -> x) (runST (h x (undefined::alpha)) + 1)--But it is quite tedious to do defaulting and resolve the implication constraints, and-we have not observed code breaking because of the lack of defaulting in inference, so-we don't do it for now.----Note [Minimize by Superclasses]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When we quantify over a constraint, in simplifyInfer we need to-quantify over a constraint that is minimal in some sense: For-instance, if the final wanted constraint is (Eq alpha, Ord alpha),-we'd like to quantify over Ord alpha, because we can just get Eq alpha-from superclass selection from Ord alpha. This minimization is what-mkMinimalBySCs does. Then, simplifyInfer uses the minimal constraint-to check the original wanted.---Note [Avoid unnecessary constraint simplification]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- -------- NB NB NB (Jun 12) -------------- This note not longer applies; see the notes with #4361.- But I'm leaving it in here so we remember the issue.)- -----------------------------------------When inferring the type of a let-binding, with simplifyInfer,-try to avoid unnecessarily simplifying class constraints.-Doing so aids sharing, but it also helps with delicate-situations like-- instance C t => C [t] where ..-- f :: C [t] => ....- f x = let g y = ...(constraint C [t])...- in ...-When inferring a type for 'g', we don't want to apply the-instance decl, because then we can't satisfy (C t). So we-just notice that g isn't quantified over 't' and partition-the constraints before simplifying.--This only half-works, but then let-generalisation only half-works.--*********************************************************************************-* *-* Main Simplifier *-* *-***********************************************************************************---}--simplifyWantedsTcM :: [CtEvidence] -> TcM WantedConstraints--- Solve the specified Wanted constraints--- Discard the evidence binds--- Postcondition: fully zonked-simplifyWantedsTcM wanted- = do { traceTc "simplifyWantedsTcM {" (ppr wanted)- ; (result, _) <- runTcS (solveWanteds (mkSimpleWC wanted))- ; result <- TcM.zonkWC result- ; traceTc "simplifyWantedsTcM }" (ppr result)- ; return result }--solveWanteds :: WantedConstraints -> TcS WantedConstraints-solveWanteds wc@(WC { wc_errors = errs })- = do { cur_lvl <- TcS.getTcLevel- ; traceTcS "solveWanteds {" $- vcat [ text "Level =" <+> ppr cur_lvl- , ppr wc ]-- ; dflags <- getDynFlags- ; solved_wc <- simplify_loop 0 (solverIterations dflags) True wc-- ; errs' <- simplifyDelayedErrors errs- ; let final_wc = solved_wc { wc_errors = errs' }-- ; ev_binds_var <- getTcEvBindsVar- ; bb <- TcS.getTcEvBindsMap ev_binds_var- ; traceTcS "solveWanteds }" $- vcat [ text "final wc =" <+> ppr final_wc- , text "current evbinds =" <+> ppr (evBindMapBinds bb) ]-- ; return final_wc }--simplify_loop :: Int -> IntWithInf -> Bool- -> WantedConstraints -> TcS WantedConstraints--- Do a round of solving, and call maybe_simplify_again to iterate--- The 'definitely_redo_implications' flags is False if the only reason we--- are iterating is that we have added some new Wanted superclasses--- hoping for fundeps to help us; see Note [Superclass iteration]------ Does not affect wc_holes at all; reason: wc_holes never affects anything--- else, so we do them once, at the end in solveWanteds-simplify_loop n limit definitely_redo_implications- wc@(WC { wc_simple = simples, wc_impl = implics })- = do { csTraceTcS $- text "simplify_loop iteration=" <> int n- <+> (parens $ hsep [ text "definitely_redo =" <+> ppr definitely_redo_implications <> comma- , int (lengthBag simples) <+> text "simples to solve" ])- ; traceTcS "simplify_loop: wc =" (ppr wc)-- ; (unifs1, wc1) <- reportUnifications $ -- See Note [Superclass iteration]- solveSimpleWanteds simples- -- Any insoluble constraints are in 'simples' and so get rewritten- -- See Note [Rewrite insolubles] in GHC.Tc.Solver.InertSet-- ; wc2 <- if not definitely_redo_implications -- See Note [Superclass iteration]- && unifs1 == 0 -- for this conditional- && isEmptyBag (wc_impl wc1)- then return (wc { wc_simple = wc_simple wc1 }) -- Short cut- else do { implics2 <- solveNestedImplications $- implics `unionBags` (wc_impl wc1)- ; return (wc { wc_simple = wc_simple wc1- , wc_impl = implics2 }) }-- ; unif_happened <- resetUnificationFlag- ; csTraceTcS $ text "unif_happened" <+> ppr unif_happened- -- Note [The Unification Level Flag] in GHC.Tc.Solver.Monad- ; maybe_simplify_again (n+1) limit unif_happened wc2 }--maybe_simplify_again :: Int -> IntWithInf -> Bool- -> WantedConstraints -> TcS WantedConstraints-maybe_simplify_again n limit unif_happened 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- -- (an unsolved constraint), and we don't want that error to suppress- -- the iteration limit warning!- addErrTcS $ TcRnSimplifierTooManyIterations simples limit wc- ; return wc }-- | unif_happened- = simplify_loop n limit True wc-- | 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_loop n limit (not (null pending_given)) $- wc { wc_simple = simples1 `unionBags` listToBag new_wanted } } }- -- (not (null pending_given)): see Note [Superclass iteration]-- | otherwise- = return wc--{- Note [Superclass iteration]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this implication constraint- forall a.- [W] d: C Int beta- forall b. blah-where- class D a b | a -> b- class D a b => C a b-We will expand d's superclasses, giving [W] D Int beta, in the hope of geting-fundeps to unify beta. Doing so is usually fruitless (no useful fundeps),-and if so it seems a pity to waste time iterating the implications (forall b. blah)-(If we add new Given superclasses it's a different matter: it's really worth looking-at the implications.)--Hence the definitely_redo_implications flag to simplify_loop. It's usually-True, but False in the case where the only reason to iterate is new Wanted-superclasses. In that case we check whether the new Wanteds actually led to-any new unifications, and iterate the implications only if so.--}--solveNestedImplications :: Bag Implication- -> TcS (Bag Implication)--- Precondition: the TcS inerts may contain unsolved simples which have--- to be converted to givens before we go inside a nested implication.-solveNestedImplications implics- | isEmptyBag implics- = return (emptyBag)- | otherwise- = do { traceTcS "solveNestedImplications starting {" empty- ; unsolved_implics <- mapBagM solveImplication implics-- -- ... and we are back in the original TcS inerts- -- Notice that the original includes the _insoluble_simples so it was safe to ignore- -- them in the beginning of this function.- ; traceTcS "solveNestedImplications end }" $- vcat [ text "unsolved_implics =" <+> ppr unsolved_implics ]-- ; return (catBagMaybes unsolved_implics) }--solveImplication :: Implication -- Wanted- -> TcS (Maybe Implication) -- Simplified implication (empty or singleton)--- Precondition: The TcS monad contains an empty worklist and given-only inerts--- which after trying to solve this implication we must restore to their original value-solveImplication imp@(Implic { ic_tclvl = tclvl- , ic_binds = ev_binds_var- , ic_given = given_ids- , ic_wanted = wanteds- , ic_info = info- , ic_status = status })- | isSolvedStatus status- = return (Just imp) -- Do nothing-- | otherwise -- Even for IC_Insoluble it is worth doing more work- -- The insoluble stuff might be in one sub-implication- -- and other unsolved goals in another; and we want to- -- solve the latter as much as possible- = do { inerts <- getTcSInerts- ; traceTcS "solveImplication {" (ppr imp $$ text "Inerts" <+> ppr inerts)-- -- commented out; see `where` clause below- -- ; when debugIsOn check_tc_level-- -- Solve the nested constraints- ; (has_given_eqs, given_insols, residual_wanted)- <- nestImplicTcS ev_binds_var tclvl $- do { let loc = mkGivenLoc tclvl info (ic_env imp)- givens = mkGivens loc given_ids- ; solveSimpleGivens givens-- ; residual_wanted <- solveWanteds wanteds-- ; (has_eqs, given_insols) <- getHasGivenEqs tclvl- -- Call getHasGivenEqs /after/ solveWanteds, because- -- solveWanteds can augment the givens, via expandSuperClasses,- -- to reveal given superclass equalities-- ; return (has_eqs, given_insols, residual_wanted) }-- ; traceTcS "solveImplication 2"- (ppr given_insols $$ ppr residual_wanted)- ; let final_wanted = residual_wanted `addInsols` given_insols- -- Don't lose track of the insoluble givens,- -- which signal unreachable code; put them in ic_wanted-- ; res_implic <- setImplicationStatus (imp { ic_given_eqs = has_given_eqs- , ic_wanted = final_wanted })-- ; evbinds <- TcS.getTcEvBindsMap ev_binds_var- ; tcvs <- TcS.getTcEvTyCoVars ev_binds_var- ; traceTcS "solveImplication end }" $ vcat- [ text "has_given_eqs =" <+> ppr has_given_eqs- , text "res_implic =" <+> ppr res_implic- , text "implication evbinds =" <+> ppr (evBindMapBinds evbinds)- , text "implication tvcs =" <+> ppr tcvs ]-- ; return res_implic }-- -- TcLevels must be strictly increasing (see (ImplicInv) in- -- Note [TcLevel invariants] in GHC.Tc.Utils.TcType),- -- and in fact I think they should always increase one level at a time.-- -- Though sensible, this check causes lots of testsuite failures. It is- -- remaining commented out for now.- {-- check_tc_level = do { cur_lvl <- TcS.getTcLevel- ; massertPpr (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,--- setting the ic_status field--- 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 })- | assertPpr (not (isSolvedStatus status)) (ppr info) $- -- Precondition: we only set the status if it is not already solved- not (isSolvedWC pruned_wc)- = do { traceTcS "setImplicationStatus(not-all-solved) {" (ppr implic)-- ; implic <- neededEvVars implic-- ; let new_status | insolubleWC pruned_wc = IC_Insoluble- | otherwise = IC_Unsolved- new_implic = implic { ic_status = new_status- , ic_wanted = pruned_wc }-- ; traceTcS "setImplicationStatus(not-all-solved) }" (ppr new_implic)-- ; return $ Just new_implic }-- | otherwise -- Everything is solved- -- Set status to IC_Solved,- -- and compute the dead givens and outer needs- -- See Note [Tracking redundant constraints]- = do { traceTcS "setImplicationStatus(all-solved) {" (ppr implic)-- ; implic@(Implic { ic_need_inner = need_inner- , ic_need_outer = need_outer }) <- neededEvVars implic-- ; bad_telescope <- checkBadTelescope implic-- ; let warn_givens = findUnnecessaryGivens info need_inner givens-- discard_entire_implication -- Can we discard the entire implication?- = null warn_givens -- No warning from this implication- && not bad_telescope- && isEmptyWC pruned_wc -- No live children- && isEmptyVarSet need_outer -- No needed vars to pass up to parent-- final_status- | bad_telescope = IC_BadTelescope- | otherwise = IC_Solved { ics_dead = warn_givens }- final_implic = implic { ic_status = final_status- , ic_wanted = pruned_wc }-- ; traceTcS "setImplicationStatus(all-solved) }" $- vcat [ text "discard:" <+> ppr discard_entire_implication- , text "new_implic:" <+> ppr final_implic ]-- ; return $ if discard_entire_implication- then Nothing- else Just final_implic }- where- WC { wc_simple = simples, wc_impl = implics, wc_errors = errs } = wc-- pruned_implics = filterBag keep_me implics- pruned_wc = WC { wc_simple = simples- , wc_impl = pruned_implics- , wc_errors = errs } -- do not prune holes; these should be reported-- keep_me :: Implication -> Bool- keep_me ic- | IC_Solved { ics_dead = dead_givens } <- ic_status ic- -- Fully solved- , null dead_givens -- No redundant givens to report- , isEmptyBag (wc_impl (ic_wanted ic))- -- And no children that might have things to report- = False -- Tnen we don't need to keep it- | otherwise- = True -- Otherwise, keep it--findUnnecessaryGivens :: SkolemInfoAnon -> VarSet -> [EvVar] -> [EvVar]-findUnnecessaryGivens info need_inner givens- | not (warnRedundantGivens info) -- Don't report redundant constraints at all- = []-- | not (null unused_givens) -- Some givens are literally unused- = unused_givens-- | otherwise -- All givens are used, but some might- = redundant_givens -- still be redundant e.g. (Eq a, Ord a)-- where- in_instance_decl = case info of { InstSkol {} -> True; _ -> False }- -- See Note [Redundant constraints in instance decls]-- unused_givens = filterOut is_used givens-- is_used given = is_type_error given- || (given `elemVarSet` need_inner)- || (in_instance_decl && is_improving (idType given))-- minimal_givens = mkMinimalBySCs evVarPred givens- is_minimal = (`elemVarSet` mkVarSet minimal_givens)- redundant_givens- | in_instance_decl = []- | otherwise = filterOut is_minimal givens-- -- See #15232- is_type_error = isJust . userTypeError_maybe . idType-- is_improving pred -- (transSuperClasses p) does not include p- = any isImprovementPred (pred : transSuperClasses pred)--{- Note [Redundant constraints in instance decls]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Instance declarations are special in two ways:--* We don't report unused givens if they can give rise to improvement.- Example (#10100):- class Add a b ab | a b -> ab, a ab -> b- instance Add Zero b b- instance Add a b ab => Add (Succ a) b (Succ ab)- The context (Add a b ab) for the instance is clearly unused in terms- of evidence, since the dictionary has no fields. But it is still- needed! With the context, a wanted constraint- Add (Succ Zero) beta (Succ Zero)- we will reduce to (Add Zero beta Zero), and thence we get beta := Zero.- But without the context we won't find beta := Zero.-- This only matters in instance declarations.--* We don't report givens that are a superclass of another given. E.g.- class Ord r => UserOfRegs r a where ...- instance (Ord r, UserOfRegs r CmmReg) => UserOfRegs r CmmExpr where- The (Ord r) is not redundant, even though it is a superclass of- (UserOfRegs r CmmReg). See Note [Recursive superclasses] in GHC.Tc.TyCl.Instance.-- Again this is specific to instance declarations.--}---checkBadTelescope :: Implication -> TcS Bool--- True <=> the skolems form a bad telescope--- See Note [Checking telescopes] in GHC.Tc.Types.Constraint-checkBadTelescope (Implic { ic_info = info- , ic_skols = skols })- | checkTelescopeSkol info- = do{ skols <- mapM TcS.zonkTyCoVarKind 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 :: SkolemInfoAnon -> Bool-warnRedundantGivens (SigSkol ctxt _ _)- = case ctxt of- FunSigCtxt _ rrc -> reportRedundantConstraints rrc- ExprSigCtxt rrc -> reportRedundantConstraints rrc- _ -> False-- -- To think about: do we want to report redundant givens for- -- pattern synonyms, PatSynSigSkol? c.f #9953, comment:21.-warnRedundantGivens (InstSkol {}) = True-warnRedundantGivens _ = False--neededEvVars :: Implication -> TcS Implication--- Find all the evidence variables that are "needed",--- and delete dead evidence bindings--- See Note [Tracking redundant constraints]--- See Note [Delete dead Given evidence bindings]------ - Start from initial_seeds (from nested implications)------ - Add free vars of RHS of all Wanted evidence bindings--- and coercion variables accumulated in tcvs (all Wanted)------ - Generate 'needed', the needed set of EvVars, by doing transitive--- closure through Given bindings--- e.g. Needed {a,b}--- Given a = sc_sel a2--- Then a2 is needed too------ - Prune out all Given bindings that are not needed------ - From the 'needed' set, delete ev_bndrs, the binders of the--- evidence bindings, to give the final needed variables----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-- ; let seeds1 = foldr add_implic_seeds old_needs implics- seeds2 = nonDetStrictFoldEvBindMap add_wanted seeds1 ev_binds- -- It's OK to use a non-deterministic fold here- -- because add_wanted is commutative- seeds3 = seeds2 `unionVarSet` tcvs- need_inner = findNeededEvVars ev_binds seeds3- live_ev_binds = filterEvBindMap (needed_ev_bind need_inner) ev_binds- need_outer = varSetMinusEvBindMap need_inner live_ev_binds- `delVarSetList` givens-- ; TcS.setTcEvBindsMap ev_binds_var live_ev_binds- -- See Note [Delete dead Given evidence bindings]-- ; traceTcS "neededEvVars" $- vcat [ text "old_needs:" <+> ppr old_needs- , text "seeds3:" <+> ppr seeds3- , text "tcvs:" <+> ppr tcvs- , text "ev_binds:" <+> ppr ev_binds- , text "live_ev_binds:" <+> ppr live_ev_binds ]-- ; return (implic { ic_need_inner = need_inner- , ic_need_outer = need_outer }) }- where- add_implic_seeds (Implic { ic_need_outer = needs }) acc- = needs `unionVarSet` acc-- needed_ev_bind needed (EvBind { eb_lhs = ev_var- , eb_is_given = is_given })- | is_given = ev_var `elemVarSet` needed- | otherwise = True -- Keep all wanted bindings-- add_wanted :: EvBind -> VarSet -> VarSet- add_wanted (EvBind { eb_is_given = is_given, eb_rhs = rhs }) needs- | is_given = needs -- Add the rhs vars of the Wanted bindings only- | otherwise = evVarsOfTerm rhs `unionVarSet` needs----------------------------------------------------simplifyDelayedErrors :: Bag DelayedError -> TcS (Bag DelayedError)-simplifyDelayedErrors = mapBagM simpl_err- where- simpl_err :: DelayedError -> TcS DelayedError- simpl_err (DE_Hole hole) = DE_Hole <$> simpl_hole hole- simpl_err err@(DE_NotConcrete {}) = return err-- simpl_hole :: Hole -> TcS Hole-- -- See Note [Do not simplify ConstraintHoles]- simpl_hole h@(Hole { hole_sort = ConstraintHole }) = return h-- -- other wildcards should be simplified for printing- -- we must do so here, and not in the error-message generation- -- code, because we have all the givens already set up- simpl_hole h@(Hole { hole_ty = ty, hole_loc = loc })- = do { ty' <- rewriteType loc ty- ; return (h { hole_ty = ty' }) }--{- Note [Delete dead Given evidence bindings]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-As a result of superclass expansion, we speculatively-generate evidence bindings for Givens. E.g.- f :: (a ~ b) => a -> b -> Bool- f x y = ...-We'll have- [G] d1 :: (a~b)-and we'll speculatively generate the evidence binding- [G] d2 :: (a ~# b) = sc_sel d--Now d2 is available for solving. But it may not be needed! Usually-such dead superclass selections will eventually be dropped as dead-code, but:-- * It won't always be dropped (#13032). In the case of an- unlifted-equality superclass like d2 above, we generate- case heq_sc d1 of d2 -> ...- and we can't (in general) drop that case expression in case- d1 is bottom. So it's technically unsound to have added it- in the first place.-- * Simply generating all those extra superclasses can generate lots of- code that has to be zonked, only to be discarded later. Better not- to generate it in the first place.-- Moreover, if we simplify this implication more than once- (e.g. because we can't solve it completely on the first iteration- of simpl_loop), we'll generate all the same bindings AGAIN!--Easy solution: take advantage of the work we are doing to track dead-(unused) Givens, and use it to prune the Given bindings too. This is-all done by neededEvVars.--This led to a remarkable 25% overall compiler allocation decrease in-test T12227.--But we don't get to discard all redundant equality superclasses, alas;-see #15205.--Note [Do not simplify ConstraintHoles]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Before printing the inferred value for a type hole (a _ wildcard in-a partial type signature), we simplify it w.r.t. any Givens. This-makes for an easier-to-understand diagnostic for the user.--However, we do not wish to do this for extra-constraint holes. Here is-the example for why (partial-sigs/should_compile/T12844):-- bar :: _ => FooData rngs- bar = foo-- data FooData rngs-- class Foo xs where foo :: (Head xs ~ '(r,r')) => FooData xs-- type family Head (xs :: [k]) where Head (x ': xs) = x--GHC correctly infers that the extra-constraints wildcard on `bar`-should be (Head rngs ~ '(r, r'), Foo rngs). It then adds this-constraint as a Given on the implication constraint for `bar`. (This-implication is emitted by emitResidualConstraints.) The Hole for the _-is stored within the implication's WantedConstraints. When-simplifyHoles is called, that constraint is already assumed as a-Given. Simplifying with respect to it turns it into ('(r, r') ~ '(r,-r'), Foo rngs), which is disastrous.--Furthermore, there is no need to simplify here: extra-constraints wildcards-are filled in with the output of the solver, in chooseInferredQuantifiers-(choose_psig_context), so they are already simplified. (Contrast to normal-type holes, which are just bound to a meta-variable.) Avoiding the poor output-is simple: just don't simplify extra-constraints wildcards.--This is the only reason we need to track ConstraintHole separately-from TypeHole in HoleSort.--See also Note [Extra-constraint holes in partial type signatures]-in GHC.Tc.Gen.HsType.--Note [Tracking redundant constraints]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-With Opt_WarnRedundantConstraints, GHC can report which-constraints of a type signature (or instance declaration) are-redundant, and can be omitted. Here is an overview of how it-works.--This is all tested in typecheck/should_compile/T20602 (among-others).------- What is a redundant constraint?--* The things that can be redundant are precisely the Given- constraints of an implication.--* A constraint can be redundant in two different ways:- a) It is not needed by the Wanted constraints covered by the- implication E.g.- f :: Eq a => a -> Bool- f x = True -- Equality not used- b) It is implied by other givens. E.g.- f :: (Eq a, Ord a) => blah -- Eq a unnecessary- g :: (Eq a, a~b, Eq b) => blah -- Either Eq a or Eq b unnecessary--* To find (a) we need to know which evidence bindings are 'wanted';- hence the eb_is_given field on an EvBind.--* To find (b), we use mkMinimalBySCs on the Givens to see if any- are unnecessary.------- How tracking works--(RC1) When two Givens are the same, we drop the evidence for the one- that requires more superclass selectors. This is done- according to 2(c) of Note [Replacement vs keeping] in GHC.Tc.Solver.InertSet.--(RC2) The ic_need fields of an Implic records in-scope (given) evidence- variables bound by the context, that were needed to solve this- implication (so far). See the declaration of Implication.--(RC3) setImplicationStatus:- When the constraint solver finishes solving all the wanteds in- an implication, it sets its status to IC_Solved-- - The ics_dead field, of IC_Solved, records the subset of this- implication's ic_given that are redundant (not needed).-- - We compute which evidence variables are needed by an implication- in setImplicationStatus. A variable is needed if- a) it is free in the RHS of a Wanted EvBind,- b) it is free in the RHS of an EvBind whose LHS is needed, or- c) it is in the ics_need of a nested implication.-- - After computing which variables are needed, we then look at the- remaining variables for internal redundancies. This is case (b)- from above. This is also done in setImplicationStatus.- Note that we only look for case (b) if case (a) shows up empty,- as exemplified below.-- - We need to be careful not to discard an implication- prematurely, even one that is fully solved, because we might- thereby forget which variables it needs, and hence wrongly- report a constraint as redundant. But we can discard it once- its free vars have been incorporated into its parent; or if it- simply has no free vars. This careful discarding is also- handled in setImplicationStatus.--(RC4) We do not want to report redundant constraints for implications- that come from quantified constraints. Example #23323:- data T a- instance Show (T a) where ... -- No context!- foo :: forall f c. (forall a. c a => Show (f a)) => Proxy c -> f Int -> Int- bar = foo @T @Eq-- The call to `foo` gives us- [W] d : (forall a. Eq a => Show (T a))- To solve this, GHC.Tc.Solver.Solve.solveForAll makes an implication constraint:- forall a. Eq a => [W] ds : Show (T a)- and because of the degnerate instance for `Show (T a)`, we don't need the `Eq a`- constraint. But we don't want to report it as redundant!--* Examples:-- f, g, h :: (Eq a, Ord a) => a -> Bool- f x = x == x- g x = x > x- h x = x == x && x > x-- All three will discover that they have two [G] Eq a constraints:- one as given and one extracted from the Ord a constraint. They will- both discard the latter, as noted above and in- Note [Replacement vs keeping] in GHC.Tc.Solver.Interact.-- The body of f uses the [G] Eq a, but not the [G] Ord a. It will- report a redundant Ord a using the logic for case (a).-- The body of g uses the [G] Ord a, but not the [G] Eq a. It will- report a redundant Eq a using the logic for case (a).-- The body of h uses both [G] Ord a and [G] Eq a. Case (a) will- thus come up with nothing redundant. But then, the case (b)- check will discover that Eq a is redundant and report this.-- If we did case (b) even when case (a) reports something, then- we would report both constraints as redundant for f, which is- terrible.------- Reporting redundant constraints--* GHC.Tc.Errors does the actual warning, in warnRedundantConstraints.--* We don't report redundant givens for *every* implication; only- for those which reply True to GHC.Tc.Solver.warnRedundantGivens:-- - For example, in a class declaration, the default method *can*- use the class constraint, but it certainly doesn't *have* to,- and we don't want to report an error there.-- - More subtly, in a function definition- f :: (Ord a, Ord a, Ix a) => a -> a- f x = rhs- we do an ambiguity check on the type (which would find that one- of the Ord a constraints was redundant), and then we check that- the definition has that type (which might find that both are- redundant). We don't want to report the same error twice, so we- disable it for the ambiguity check. Hence using two different- FunSigCtxts, one with the warn-redundant field set True, and the- other set False in- - GHC.Tc.Gen.Bind.tcSpecPrag- - GHC.Tc.Gen.Bind.tcTySig-- This decision is taken in setImplicationStatus, rather than GHC.Tc.Errors- so that we can discard implication constraints that we don't need.- So ics_dead consists only of the *reportable* redundant givens.------- Shortcomings--Consider-- j :: (Eq a, a ~ b) => a -> Bool- j x = x == x-- k :: (Eq a, b ~ a) => a -> Bool- k x = x == x--Currently (Nov 2021), j issues no warning, while k says that b ~ a-is redundant. This is because j uses the a ~ b constraint to rewrite-everything to be in terms of b, while k does none of that. This is-ridiculous, but I (Richard E) don't see a good fix.---}---- | Like 'defaultTyVar', but in the TcS monad.-defaultTyVarTcS :: TcTyVar -> TcS Bool-defaultTyVarTcS the_tv- | isTyVarTyVar the_tv- -- TyVarTvs should only be unified with a tyvar- -- never with a type; c.f. GHC.Tc.Utils.TcMType.defaultTyVar- -- and Note [Inferring kinds for type declarations] in GHC.Tc.TyCl- = return False- | isRuntimeRepVar the_tv- = do { traceTcS "defaultTyVarTcS RuntimeRep" (ppr the_tv)- ; unifyTyVar the_tv liftedRepTy- ; return True }- | isLevityVar the_tv- = do { traceTcS "defaultTyVarTcS Levity" (ppr the_tv)- ; unifyTyVar the_tv liftedDataConTy- ; return True }- | isMultiplicityVar the_tv- = do { traceTcS "defaultTyVarTcS Multiplicity" (ppr the_tv)- ; unifyTyVar the_tv ManyTy- ; return True }- | otherwise- = return False -- the common case--approximateWC :: Bool -> WantedConstraints -> Cts--- Second return value is the depleted wc--- Third return value is YesFDsCombined <=> multiple constraints for the same fundep floated--- Postcondition: Wanted Cts--- See Note [ApproximateWC]--- See Note [floatKindEqualities vs approximateWC]-approximateWC float_past_equalities wc- = float_wc emptyVarSet wc- where- float_wc :: TcTyCoVarSet -> WantedConstraints -> Cts- float_wc trapping_tvs (WC { wc_simple = simples, wc_impl = implics })- = filterBag (is_floatable trapping_tvs) simples `unionBags`- concatMapBag (float_implic trapping_tvs) implics- float_implic :: TcTyCoVarSet -> Implication -> Cts- float_implic trapping_tvs imp- | float_past_equalities || ic_given_eqs imp /= MaybeGivenEqs- = float_wc new_trapping_tvs (ic_wanted imp)- | otherwise -- Take care with equalities- = emptyCts -- See (1) under Note [ApproximateWC]- where- new_trapping_tvs = trapping_tvs `extendVarSetList` ic_skols imp-- is_floatable skol_tvs ct- | isGivenCt ct = False- | insolubleEqCt ct = False- | otherwise = tyCoVarsOfCt ct `disjointVarSet` skol_tvs--{- Note [ApproximateWC]-~~~~~~~~~~~~~~~~~~~~~~~-approximateWC takes a constraint, typically arising from the RHS of a-let-binding whose type we are *inferring*, and extracts from it some-*simple* constraints that we might plausibly abstract over. Of course-the top-level simple constraints are plausible, but we also float constraints-out from inside, if they are not captured by skolems.--The same function is used when doing type-class defaulting (see the call-to applyDefaultingRules) to extract constraints that might be defaulted.--There is one caveat:--1. When inferring most-general types (in simplifyInfer), we do *not*- float anything out if the implication binds equality constraints,- because that defeats the OutsideIn story. Consider- data T a where- TInt :: T Int- MkT :: T a-- f TInt = 3::Int-- We get the implication (a ~ Int => res ~ Int), where so far we've decided- f :: T a -> res- We don't want to float (res~Int) out because then we'll infer- f :: T a -> Int- which is only on of the possible types. (GHC 7.6 accidentally *did*- float out of such implications, which meant it would happily infer- non-principal types.)-- HOWEVER (#12797) in findDefaultableGroups we are not worried about- the most-general type; and we /do/ want to float out of equalities.- Hence the boolean flag to approximateWC.-------- Historical note ------------There used to be a second caveat, driven by #8155-- 2. We do not float out an inner constraint that shares a type variable- (transitively) with one that is trapped by a skolem. Eg- forall a. F a ~ beta, Integral beta- We don't want to float out (Integral beta). Doing so would be bad- when defaulting, because then we'll default beta:=Integer, and that- makes the error message much worse; we'd get- Can't solve F a ~ Integer- rather than- Can't solve Integral (F a)-- Moreover, floating out these "contaminated" constraints doesn't help- when generalising either. If we generalise over (Integral b), we still- can't solve the retained implication (forall a. F a ~ b). Indeed,- arguably that too would be a harder error to understand.--But this transitive closure stuff gives rise to a complex rule for-when defaulting actually happens, and one that was never documented.-Moreover (#12923), the more complex rule is sometimes NOT what-you want. So I simply removed the extra code to implement the-contamination stuff. There was zero effect on the testsuite (not even #8155).------- End of historical note -------------Note [DefaultTyVar]-~~~~~~~~~~~~~~~~~~~-defaultTyVar is used on any un-instantiated meta type variables to-default any RuntimeRep variables to LiftedRep. This is important-to ensure that instance declarations match. For example consider-- instance Show (a->b)- foo x = show (\_ -> True)--Then we'll get a constraint (Show (p ->q)) where p has kind (TYPE r),-and that won't match the typeKind (*) in the instance decl. See tests-tc217 and tc175.--We look only at touchable type variables. No further constraints-are going to affect these type variables, so it's time to do it by-hand. However we aren't ready to default them fully to () or-whatever, because the type-class defaulting rules have yet to run.--An alternate implementation would be to emit a Wanted constraint setting-the RuntimeRep variable to LiftedRep, but this seems unnecessarily indirect.--Note [Promote _and_ default when inferring]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When we are inferring a type, we simplify the constraint, and then use-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 (WantedInv) described in- Note [TcLevel invariants] in GHC.Tc.Utils.TcType.-- b) Default the kind of any meta-tyvars that are not mentioned in- in the environment.--To see (b), suppose the constraint is (C ((a :: OpenKind) -> Int)), and we-have an instance (C ((x:*) -> Int)). The instance doesn't match -- but it-should! If we don't solve the constraint, we'll stupidly quantify over-(C (a->Int)) and, worse, in doing so skolemiseQuantifiedTyVar will quantify over-(b:*) instead of (a:OpenKind), which can lead to disaster; see #7332.-#7641 is a simpler example.--Note [Promoting unification variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When we float an equality out of an implication we must "promote" free-unification variables of the equality, in order to maintain Invariant-(WantedInv) from Note [TcLevel invariants] in GHC.Tc.Types.TcType.--This is absolutely necessary. Consider the following example. We start-with two implications and a class with a functional dependency.-- class C x y | x -> y- instance C [a] [a]-- (I1) [untch=beta]forall b. 0 => F Int ~ [beta]- (I2) [untch=beta]forall c. 0 => F Int ~ [[alpha]] /\ C beta [c]--We float (F Int ~ [beta]) out of I1, and we float (F Int ~ [[alpha]]) out of I2.-They may react to yield that (beta := [alpha]) which can then be pushed inwards-the leftover of I2 to get (C [alpha] [a]) which, using the FunDep, will mean that-(alpha := a). In the end we will have the skolem 'b' escaping in the untouchable-beta! Concrete example is in indexed_types/should_fail/ExtraTcsUntch.hs:-- class C x y | x -> y where- op :: x -> y -> ()-- instance C [a] [a]-- type family F a :: *-- h :: F Int -> ()- h = undefined-- data TEx where- TEx :: a -> TEx-- f (x::beta) =- let g1 :: forall b. b -> ()- g1 _ = h [x]- g2 z = case z of TEx y -> (h [[undefined]], op x [y])- in (g1 '3', g2 undefined)---*********************************************************************************-* *-* Defaulting and disambiguation *-* *-*********************************************************************************--Note [Defaulting plugins]-~~~~~~~~~~~~~~~~~~~~~~~~~-Defaulting plugins enable extending or overriding the defaulting-behaviour. In `applyDefaulting`, before the built-in defaulting-mechanism runs, the loaded defaulting plugins are passed the-`WantedConstraints` and get a chance to propose defaulting assignments-based on them.--Proposals are represented as `[DefaultingProposal]` with each proposal-consisting of a type variable to fill-in, the list of defaulting types to-try in order, and a set of constraints to check at each try. This is-the same representation (albeit in a nicely packaged-up data type) as-the candidates generated by the built-in defaulting mechanism, so the-actual trying of proposals is done by the same `disambigGroup` function.--Wrinkle (DP1): The role of `WantedConstraints`-- Plugins are passed `WantedConstraints` that can perhaps be- progressed on by defaulting. But a defaulting plugin is not a solver- plugin, its job is to provide defaulting proposals, i.e. mappings of- type variable to types. How do plugins know which type variables- they are supposed to default?-- The `WantedConstraints` passed to the defaulting plugin are zonked- beforehand to ensure all remaining metavariables are unfilled. Thus,- the `WantedConstraints` serve a dual purpose: they are both the- constraints of the given context that can act as hints to the- defaulting, as well as the containers of the type variables under- consideration for defaulting.--Wrinkle (DP2): Interactions between defaulting mechanisms-- In the general case, we have multiple defaulting plugins loaded and- there is also the built-in defaulting mechanism. In this case, we- have to be careful to keep the `WantedConstraints` passed to the- plugins up-to-date by zonking between successful defaulting- rounds. Otherwise, two plugins might come up with a defaulting- proposal for the same metavariable; if the first one is accepted by- `disambigGroup` (thus the meta gets filled), the second proposal- becomes invalid (see #23821 for an example).---}--applyDefaultingRules :: WantedConstraints -> TcS Bool--- True <=> I did some defaulting, by unifying a meta-tyvar--- Input WantedConstraints are not necessarily zonked--applyDefaultingRules wanteds- | isEmptyWC wanteds- = return False- | otherwise- = do { info@(default_tys, _) <- getDefaultInfo- ; wanteds <- TcS.zonkWC wanteds-- ; tcg_env <- TcS.getGblEnv- ; let plugins = tcg_defaulting_plugins tcg_env-- -- Run any defaulting plugins- -- See Note [Defaulting plugins] for an overview- ; (wanteds, plugin_defaulted) <- if null plugins then return (wanteds, []) else- do {- ; traceTcS "defaultingPlugins {" (ppr wanteds)- ; (wanteds, defaultedGroups) <- mapAccumLM run_defaulting_plugin wanteds plugins- ; traceTcS "defaultingPlugins }" (ppr defaultedGroups)- ; return (wanteds, defaultedGroups)- }-- ; let groups = findDefaultableGroups info wanteds-- ; traceTcS "applyDefaultingRules {" $- vcat [ text "wanteds =" <+> ppr wanteds- , text "groups =" <+> ppr groups- , text "info =" <+> ppr info ]-- ; something_happeneds <- mapM (disambigGroup default_tys) groups-- ; traceTcS "applyDefaultingRules }" (ppr something_happeneds)-- ; return $ or something_happeneds || or plugin_defaulted }- where run_defaulting_plugin wanteds p =- do { groups <- runTcPluginTcS (p wanteds)- ; defaultedGroups <-- filterM (\g -> disambigGroup- (deProposalCandidates g)- (deProposalTyVar g, deProposalCts g))- groups- ; traceTcS "defaultingPlugin " $ ppr defaultedGroups- ; case defaultedGroups of- [] -> return (wanteds, False)- _ -> do- -- If a defaulting plugin solves any tyvars, some of the wanteds- -- will have filled-in metavars by now (see wrinkle DP2 of- -- Note [Defaulting plugins]). So we re-zonk to make sure later- -- defaulting doesn't try to solve the same metavars.- wanteds' <- TcS.zonkWC wanteds- return (wanteds', True)- }---findDefaultableGroups- :: ( [Type]- , (Bool,Bool) ) -- (Overloaded strings, extended default rules)- -> WantedConstraints -- Unsolved- -> [(TyVar, [Ct])]-findDefaultableGroups (default_tys, (ovl_strings, extended_defaults)) wanteds- | null default_tys- = []- | otherwise- = [ (tv, map fstOf3 group)- | group'@((_,_,tv) :| _) <- unary_groups- , let group = toList group'- , defaultable_tyvar tv- , defaultable_classes (map sndOf3 group) ]- where- simples = approximateWC True wanteds- (unaries, non_unaries) = partitionWith find_unary (bagToList simples)- unary_groups = equivClasses cmp_tv unaries-- unary_groups :: [NonEmpty (Ct, Class, TcTyVar)] -- (C tv) constraints- unaries :: [(Ct, Class, TcTyVar)] -- (C tv) constraints- non_unaries :: [Ct] -- and *other* constraints-- -- Finds unary type-class constraints- -- But take account of polykinded classes like Typeable,- -- which may look like (Typeable * (a:*)) (#8931)- find_unary :: Ct -> Either (Ct, Class, TyVar) Ct- find_unary cc- | Just (cls,tys) <- getClassPredTys_maybe (ctPred cc)- , [ty] <- filterOutInvisibleTypes (classTyCon cls) tys- -- Ignore invisible arguments for this purpose- , Just tv <- getTyVar_maybe ty- , isMetaTyVar tv -- We might have runtime-skolems in GHCi, and- -- we definitely don't want to try to assign to those!- = Left (cc, cls, tv)- find_unary cc = Right cc -- Non unary or non dictionary-- bad_tvs :: TcTyCoVarSet -- TyVars mentioned by non-unaries- bad_tvs = mapUnionVarSet tyCoVarsOfCt non_unaries-- cmp_tv (_,_,tv1) (_,_,tv2) = tv1 `compare` tv2-- defaultable_tyvar :: TcTyVar -> Bool- defaultable_tyvar tv- = let b1 = isTyConableTyVar tv -- Note [Avoiding spurious errors]- b2 = not (tv `elemVarSet` bad_tvs)- in b1 && (b2 || extended_defaults) -- Note [Multi-parameter defaults]-- defaultable_classes :: [Class] -> Bool- defaultable_classes clss- | extended_defaults = any (isInteractiveClass ovl_strings) clss- | otherwise = all is_std_class clss && (any (isNumClass ovl_strings) clss)-- -- is_std_class adds IsString to the standard numeric classes,- -- when -XOverloadedStrings is enabled- is_std_class cls = isStandardClass cls ||- (ovl_strings && (cls `hasKey` isStringClassKey))---------------------------------disambigGroup :: [Type] -- The default types- -> (TcTyVar, [Ct]) -- All constraints sharing same type variable- -> TcS Bool -- True <=> something happened, reflected in ty_binds--disambigGroup [] _- = return False-disambigGroup (default_ty:default_tys) group@(the_tv, wanteds)- = do { traceTcS "disambigGroup {" (vcat [ ppr default_ty, ppr the_tv, ppr wanteds ])- ; fake_ev_binds_var <- TcS.newTcEvBinds- ; tclvl <- TcS.getTcLevel- ; success <- nestImplicTcS fake_ev_binds_var (pushTcLevel tclvl) try_group-- ; if success then- -- Success: record the type variable binding, and return- do { unifyTyVar the_tv default_ty- ; wrapWarnTcS $ warnDefaulting the_tv wanteds default_ty- ; traceTcS "disambigGroup succeeded }" (ppr default_ty)- ; return True }- else- -- Failure: try with the next type- do { traceTcS "disambigGroup failed, will try other default types }"- (ppr default_ty)- ; disambigGroup default_tys group } }- where- try_group- | Just subst <- mb_subst- = do { lcl_env <- TcS.getLclEnv- ; tc_lvl <- TcS.getTcLevel- ; let loc = mkGivenLoc tc_lvl (getSkolemInfo unkSkol) lcl_env+{-# LANGUAGE MultiWayIf, RecursiveDo, TupleSections #-}++module GHC.Tc.Solver(+ InferMode(..), simplifyInfer, findInferredDiff,+ growThetaTyVars,+ simplifyAmbiguityCheck,+ simplifyDefault,+ simplifyTop, simplifyTopImplic,+ simplifyInteractive,+ solveEqualities,+ pushLevelAndSolveEqualities, pushLevelAndSolveEqualitiesX,+ reportUnsolvedEqualities,+ simplifyWantedsTcM,+ tcCheckGivens,+ tcCheckWanteds,+ tcNormalise,++ captureTopConstraints,++ simplifyTopWanteds,++ promoteTyVarSet, simplifyAndEmitFlatConstraints,++ -- For Rules we need these+ solveWanteds,+ approximateWC++ ) where++import GHC.Prelude++import GHC.Data.Bag+import GHC.Core.Class+import GHC.Core+import GHC.Core.DataCon+import GHC.Core.Make+import GHC.Driver.DynFlags+import GHC.Data.FastString+import GHC.Data.List.SetOps+import GHC.Types.Name+import GHC.Types.Id+import GHC.Utils.Outputable+import GHC.Builtin.Utils+import GHC.Builtin.Names+import GHC.Tc.Errors+import GHC.Tc.Errors.Types+import GHC.Tc.Types.Evidence+import GHC.Tc.Solver.Solve ( solveSimpleGivens, solveSimpleWanteds )+import GHC.Tc.Solver.Dict ( makeSuperClasses, solveCallStack )+import GHC.Tc.Solver.Rewrite ( rewriteType )+import GHC.Tc.Utils.Unify ( buildTvImplication )+import GHC.Tc.Utils.TcMType as TcM+import GHC.Tc.Utils.Monad as TcM+import GHC.Tc.Zonk.TcType as TcM+import GHC.Tc.Solver.InertSet+import GHC.Tc.Solver.Monad as TcS+import GHC.Tc.Types.Constraint+import GHC.Tc.Instance.FunDeps+import GHC.Core.Predicate+import GHC.Tc.Types.Origin+import GHC.Tc.Utils.TcType+import GHC.Core.Type+import GHC.Core.Ppr+import GHC.Core.TyCon ( TyConBinder, isTypeFamilyTyCon )+import GHC.Builtin.Types+import GHC.Core.Unify ( tcMatchTyKi )+import GHC.Unit.Module ( getModule )+import GHC.Utils.Misc+import GHC.Utils.Panic+import GHC.Types.Var+import GHC.Types.Var.Set+import GHC.Types.Basic+import GHC.Types.Id.Make ( unboxedUnitExpr )+import GHC.Types.Error+import qualified GHC.LanguageExtensions as LangExt++import Control.Monad+import Control.Monad.Trans.Class ( lift )+import Control.Monad.Trans.State.Strict ( StateT(runStateT), put )+import Data.Foldable ( toList )+import Data.List ( partition )+import Data.List.NonEmpty ( NonEmpty(..) )+import GHC.Data.Maybe ( mapMaybe )++{-+*********************************************************************************+* *+* External interface *+* *+*********************************************************************************+-}++captureTopConstraints :: TcM a -> TcM (a, WantedConstraints)+-- (captureTopConstraints m) runs m, and returns the type constraints it+-- generates plus the constraints produced by static forms inside.+-- If it fails with an exception, it reports any insolubles+-- (out of scope variables) before doing so+--+-- captureTopConstraints is used exclusively by GHC.Tc.Module at the top+-- level of a module.+--+-- Importantly, if captureTopConstraints propagates an exception, it+-- reports any insoluble constraints first, lest they be lost+-- altogether. This is important, because solveEqualities (maybe+-- other things too) throws an exception without adding any error+-- messages; it just puts the unsolved constraints back into the+-- monad. See GHC.Tc.Utils.Monad Note [Constraints and errors]+-- #16376 is an example of what goes wrong if you don't do this.+--+-- NB: the caller should bring any environments into scope before+-- calling this, so that the reportUnsolved has access to the most+-- complete GlobalRdrEnv+captureTopConstraints thing_inside+ = do { static_wc_var <- TcM.newTcRef emptyWC ;+ ; (mb_res, lie) <- TcM.updGblEnv (\env -> env { tcg_static_wc = static_wc_var } ) $+ TcM.tryCaptureConstraints thing_inside+ ; stWC <- TcM.readTcRef static_wc_var++ -- See GHC.Tc.Utils.Monad Note [Constraints and errors]+ -- If the thing_inside threw an exception, but generated some insoluble+ -- constraints, report the latter before propagating the exception+ -- Otherwise they will be lost altogether+ ; case mb_res of+ Just res -> return (res, lie `andWC` stWC)+ Nothing -> do { _ <- simplifyTop lie; failM } }+ -- This call to simplifyTop is the reason+ -- this function is here instead of GHC.Tc.Utils.Monad+ -- We call simplifyTop so that it does defaulting+ -- (esp of runtime-reps) before reporting errors++simplifyTopImplic :: Bag Implication -> TcM ()+simplifyTopImplic implics+ = do { empty_binds <- simplifyTop (mkImplicWC implics)++ -- Since all the inputs are implications the returned bindings will be empty+ ; massertPpr (isEmptyBag empty_binds) (ppr empty_binds)++ ; return () }++simplifyTop :: WantedConstraints -> TcM (Bag EvBind)+-- Simplify top-level constraints+-- Usually these will be implications,+-- but when there is nothing to quantify we don't wrap+-- in a degenerate implication, so we do that here instead+simplifyTop wanteds+ = do { traceTc "simplifyTop {" $ text "wanted = " <+> ppr wanteds+ ; ((final_wc, unsafe_ol), binds1) <- runTcS $+ do { final_wc <- simplifyTopWanteds wanteds+ ; unsafe_ol <- getSafeOverlapFailures+ ; return (final_wc, unsafe_ol) }+ ; traceTc "End simplifyTop }" empty++ ; binds2 <- reportUnsolved final_wc++ ; traceTc "reportUnsolved (unsafe overlapping) {" empty+ ; unless (isEmptyBag unsafe_ol) $ do {+ -- grab current error messages and clear, warnAllUnsolved will+ -- update error messages which we'll grab and then restore saved+ -- messages.+ ; errs_var <- getErrsVar+ ; saved_msg <- TcM.readTcRef errs_var+ ; TcM.writeTcRef errs_var emptyMessages++ ; warnAllUnsolved $ emptyWC { wc_simple = fmap CDictCan unsafe_ol }++ ; whyUnsafe <- getWarningMessages <$> TcM.readTcRef errs_var+ ; TcM.writeTcRef errs_var saved_msg+ ; recordUnsafeInfer (mkMessages whyUnsafe)+ }+ ; traceTc "reportUnsolved (unsafe overlapping) }" empty++ ; return (evBindMapBinds binds1 `unionBags` binds2) }++pushLevelAndSolveEqualities :: SkolemInfoAnon -> [TyConBinder] -> TcM a -> TcM a+-- Push level, and solve all resulting equalities+-- If there are any unsolved equalities, report them+-- and fail (in the monad)+--+-- Panics if we solve any non-equality constraints. (In runTCSEqualities+-- we use an error thunk for the evidence bindings.)+pushLevelAndSolveEqualities skol_info_anon tcbs thing_inside+ = do { (tclvl, wanted, res) <- pushLevelAndSolveEqualitiesX+ "pushLevelAndSolveEqualities" thing_inside+ ; report_unsolved_equalities skol_info_anon (binderVars tcbs) tclvl wanted+ ; return res }++pushLevelAndSolveEqualitiesX :: String -> TcM a+ -> TcM (TcLevel, WantedConstraints, a)+-- Push the level, gather equality constraints, and then solve them.+-- Returns any remaining unsolved equalities.+-- Does not report errors.+--+-- Panics if we solve any non-equality constraints. (In runTCSEqualities+-- we use an error thunk for the evidence bindings.)+pushLevelAndSolveEqualitiesX callsite thing_inside+ = do { traceTc "pushLevelAndSolveEqualitiesX {" (text "Called from" <+> text callsite)+ ; (tclvl, (wanted, res))+ <- pushTcLevelM $+ do { (res, wanted) <- captureConstraints thing_inside+ ; wanted <- runTcSEqualities (simplifyTopWanteds wanted)+ ; return (wanted,res) }+ ; traceTc "pushLevelAndSolveEqualities }" (vcat [ text "Residual:" <+> ppr wanted+ , text "Level:" <+> ppr tclvl ])+ ; return (tclvl, wanted, res) }++-- | Type-check a thing that emits only equality constraints, solving any+-- constraints we can and re-emitting constraints that we can't.+-- Use this variant only when we'll get another crack at it later+-- See Note [Failure in local type signatures]+--+-- Panics if we solve any non-equality constraints. (In runTCSEqualities+-- we use an error thunk for the evidence bindings.)+solveEqualities :: String -> TcM a -> TcM a+solveEqualities callsite thing_inside+ = do { traceTc "solveEqualities {" (text "Called from" <+> text callsite)+ ; (res, wanted) <- captureConstraints thing_inside+ ; simplifyAndEmitFlatConstraints wanted+ -- simplifyAndEmitFlatConstraints fails outright unless+ -- the only unsolved constraints are soluble-looking+ -- equalities that can float out+ ; traceTc "solveEqualities }" empty+ ; return res }++simplifyAndEmitFlatConstraints :: WantedConstraints -> TcM ()+-- See Note [Failure in local type signatures]+simplifyAndEmitFlatConstraints wanted+ = do { -- Solve and zonk to establish the+ -- preconditions for floatKindEqualities+ wanted <- runTcSEqualities (solveWanteds wanted)+ ; wanted <- TcM.liftZonkM $ TcM.zonkWC wanted++ ; traceTc "emitFlatConstraints {" (ppr wanted)+ ; case floatKindEqualities wanted of+ Nothing -> do { traceTc "emitFlatConstraints } failing" (ppr wanted)+ -- Emit the bad constraints, wrapped in an implication+ -- See Note [Wrapping failing kind equalities]+ ; tclvl <- TcM.getTcLevel+ ; implic <- buildTvImplication unkSkolAnon [] (pushTcLevel tclvl) wanted+ -- ^^^^^^ | ^^^^^^^^^^^^^^^^^+ -- it's OK to use unkSkol | we must increase the TcLevel,+ -- because we don't bind | as explained in+ -- any skolem variables here | Note [Wrapping failing kind equalities]+ ; emitImplication implic+ ; failM }+ Just (simples, errs)+ -> do { _ <- promoteTyVarSet (tyCoVarsOfCts simples)+ ; traceTc "emitFlatConstraints }" $+ vcat [ text "simples:" <+> ppr simples+ , text "errs: " <+> ppr errs ]+ -- Holes and other delayed errors don't need promotion+ ; emitDelayedErrors errs+ ; emitSimples simples } }++floatKindEqualities :: WantedConstraints -> Maybe (Bag Ct, Bag DelayedError)+-- Float out all the constraints from the WantedConstraints,+-- Return Nothing if any constraints can't be floated (captured+-- by skolems), or if there is an insoluble constraint, or+-- IC_Telescope telescope error+-- Precondition 1: we have tried to solve the 'wanteds', both so that+-- the ic_status field is set, and because solving can make constraints+-- more floatable.+-- Precondition 2: the 'wanteds' are zonked, since floatKindEqualities+-- is not monadic+-- See Note [floatKindEqualities vs approximateWC]+floatKindEqualities wc = float_wc emptyVarSet wc+ where+ float_wc :: TcTyCoVarSet -> WantedConstraints -> Maybe (Bag Ct, Bag DelayedError)+ float_wc trapping_tvs (WC { wc_simple = simples+ , wc_impl = implics+ , wc_errors = errs })+ | all is_floatable simples+ = do { (inner_simples, inner_errs)+ <- flatMapBagPairM (float_implic trapping_tvs) implics+ ; return ( simples `unionBags` inner_simples+ , errs `unionBags` inner_errs) }+ | otherwise+ = Nothing+ where+ is_floatable ct+ | insolubleCt ct = False+ | otherwise = tyCoVarsOfCt ct `disjointVarSet` trapping_tvs++ float_implic :: TcTyCoVarSet -> Implication -> Maybe (Bag Ct, Bag DelayedError)+ float_implic trapping_tvs (Implic { ic_wanted = wanted, ic_given_eqs = given_eqs+ , ic_skols = skols, ic_status = status })+ | isInsolubleStatus status+ = Nothing -- A short cut /plus/ we must keep track of IC_BadTelescope+ | otherwise+ = do { (simples, holes) <- float_wc new_trapping_tvs wanted+ ; when (not (isEmptyBag simples) && given_eqs == MaybeGivenEqs) $+ Nothing+ -- If there are some constraints to float out, but we can't+ -- because we don't float out past local equalities+ -- (c.f GHC.Tc.Solver.approximateWC), then fail+ ; return (simples, holes) }+ where+ new_trapping_tvs = trapping_tvs `extendVarSetList` skols+++{- Note [Failure in local type signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When kind checking a type signature, we like to fail fast if we can't+solve all the kind equality constraints, for two reasons:++ * A kind-bogus type signature may cause a cascade of knock-on+ errors if we let it pass++ * More seriously, we don't have a convenient term-level place to add+ deferred bindings for unsolved kind-equality constraints. In+ earlier GHCs this led to un-filled-in coercion holes, which caused+ GHC to crash with "fvProv falls into a hole" See #11563, #11520,+ #11516, #11399++But what about /local/ type signatures, mentioning in-scope type+variables for which there might be 'given' equalities? For these we+might not be able to solve all the equalities locally. Here's an+example (T15076b):++ class (a ~ b) => C a b+ data SameKind :: k -> k -> Type where { SK :: SameKind a b }++ bar :: forall (a :: Type) (b :: Type).+ C a b => Proxy a -> Proxy b -> ()+ bar _ _ = const () (undefined :: forall (x :: a) (y :: b). SameKind x y)++Consider the type signature on 'undefined'. It's ill-kinded unless+a~b. But the superclass of (C a b) means that indeed (a~b). So all+should be well. BUT it's hard to see that when kind-checking the signature+for undefined. We want to emit a residual (a~b) constraint, to solve+later.++Another possibility is that we might have something like+ F alpha ~ [Int]+where alpha is bound further out, which might become soluble+"later" when we learn more about alpha. So we want to emit+those residual constraints.++BUT it's no good simply wrapping all unsolved constraints from+a type signature in an implication constraint to solve later. The+problem is that we are going to /use/ that signature, including+instantiate it. Say we have+ f :: forall a. (forall b. blah) -> blah2+ f x = <body>+To typecheck the definition of f, we have to instantiate those+foralls. Moreover, any unsolved kind equalities will be coercion+holes in the type. If we naively wrap them in an implication like+ forall a. (co1:k1~k2, forall b. co2:k3~k4)+hoping to solve it later, we might end up filling in the holes+co1 and co2 with coercions involving 'a' and 'b' -- but by now+we've instantiated the type. Chaos!++Moreover, the unsolved constraints might be skolem-escape things, and+if we proceed with f bound to a nonsensical type, we get a cascade of+follow-up errors. For example polykinds/T12593, T15577, and many others.++So here's the plan (see tcHsSigType):++* pushLevelAndSolveEqualitiesX: try to solve the constraints++* kindGeneraliseSome: do kind generalisation++* buildTvImplication: build an implication for the residual, unsolved+ constraint++* simplifyAndEmitFlatConstraints: try to float out every unsolved equality+ inside that implication, in the hope that it constrains only global+ type variables, not the locally-quantified ones.++ * If we fail, or find an insoluble constraint, emit the implication,+ so that the errors will be reported, and fail.++ * If we succeed in floating all the equalities, promote them and+ re-emit them as flat constraint, not wrapped at all (since they+ don't mention any of the quantified variables.++* Note that this float-and-promote step means that anonymous+ wildcards get floated to top level, as we want; see+ Note [Checking partial type signatures] in GHC.Tc.Gen.HsType.++All this is done:++* In GHC.Tc.Gen.HsType.tcHsSigType, as above++* solveEqualities. Use this when there no kind-generalisation+ step to complicate matters; then we don't need to push levels,+ and can solve the equalities immediately without needing to+ wrap it in an implication constraint. (You'll generally see+ a kindGeneraliseNone nearby.)++* In GHC.Tc.TyCl and GHC.Tc.TyCl.Instance; see calls to+ pushLevelAndSolveEqualitiesX, followed by quantification, and+ then reportUnsolvedEqualities.++ NB: we call reportUnsolvedEqualities before zonkTcTypeToType+ because the latter does not expect to see any un-filled-in+ coercions, which will happen if we have unsolved equalities.+ By calling reportUnsolvedEqualities first, which fails after+ reporting errors, we avoid that happening.++See also #18062, #11506++Note [Wrapping failing kind equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In simplifyAndEmitFlatConstraints, if we fail to get down to simple+flat constraints we will+* re-emit the constraints so that they are reported+* fail in the monad+But there is a Terrible Danger that, if -fdefer-type-errors is on, and+we just re-emit an insoluble constraint like (* ~ (*->*)), that we'll+report only a warning and proceed with compilation. But if we ever fail+in the monad it should be fatal; we should report an error and stop after+the type checker. If not, chaos results: #19142.++Our solution is this:+* Even with -fdefer-type-errors, inside an implication with no place for+ value bindings (ic_binds = CoEvBindsVar), report failing equalities as+ errors. We have to do this anyway; see GHC.Tc.Errors+ Note [Failing equalities with no evidence bindings].++* Right here in simplifyAndEmitFlatConstraints, use buildTvImplication+ to wrap the failing constraint in a degenerate implication (no+ skolems, no theta), with ic_binds = CoEvBindsVar. This setting of+ `ic_binds` means that any failing equalities will lead to an+ error not a warning, irrespective of -fdefer-type-errors: see+ Note [Failing equalities with no evidence bindings] in GHC.Tc.Errors,+ and `maybeSwitchOffDefer` in that module.++ We still take care to bump the TcLevel of the implication. Partly,+ that ensures that nested implications have increasing level numbers+ which seems nice. But more specifically, suppose the outer level+ has a Given `(C ty)`, which has pending (not-yet-expanded)+ superclasses. Consider what happens when we process this implication+ constraint (which we have re-emitted) in that context:+ - in the inner implication we'll call `getPendingGivenScs`,+ - we /do not/ want to get the `(C ty)` from the outer level,+ lest we try to add an evidence term for the superclass,+ which we can't do because we have specifically set+ `ic_binds` = `CoEvBindsVar`.+ - as `getPendingGivenSCcs is careful to only get Givens from+ the /current/ level, and we bumped the `TcLevel` of the implication,+ we're OK.++ TL;DR: bump the `TcLevel` when creating the nested implication.+ If we don't we get a panic in `GHC.Tc.Utils.Monad.addTcEvBind` (#20043).+++We re-emit the implication rather than reporting the errors right now,+so that the error messages are improved by other solving and defaulting.+e.g. we prefer+ Cannot match 'Type->Type' with 'Type'+to Cannot match 'Type->Type' with 'TYPE r0'+++Note [floatKindEqualities vs approximateWC]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+floatKindEqualities and approximateWC are strikingly similar to each+other, but++* floatKindEqualites tries to float /all/ equalities, and fails if+ it can't, or if any implication is insoluble.+* approximateWC just floats out any constraints+ (not just equalities) that can float; it never fails.+-}+++reportUnsolvedEqualities :: SkolemInfo -> [TcTyVar] -> TcLevel+ -> WantedConstraints -> TcM ()+-- Reports all unsolved wanteds provided; fails in the monad if there are any.+--+-- The provided SkolemInfo and [TcTyVar] arguments are used in an implication to+-- provide skolem info for any errors.+reportUnsolvedEqualities skol_info skol_tvs tclvl wanted+ = report_unsolved_equalities (getSkolemInfo skol_info) skol_tvs tclvl wanted++report_unsolved_equalities :: SkolemInfoAnon -> [TcTyVar] -> TcLevel+ -> WantedConstraints -> TcM ()+report_unsolved_equalities skol_info_anon skol_tvs tclvl wanted+ | isEmptyWC wanted+ = return ()++ | otherwise -- NB: we build an implication /even if skol_tvs is empty/,+ -- just to ensure that our level invariants hold, specifically+ -- (WantedInv). See Note [TcLevel invariants].+ = checkNoErrs $ -- Fail+ do { implic <- buildTvImplication skol_info_anon skol_tvs tclvl wanted+ ; reportAllUnsolved (mkImplicWC (unitBag implic)) }+++-- | Simplify top-level constraints, but without reporting any unsolved+-- constraints nor unsafe overlapping.+simplifyTopWanteds :: WantedConstraints -> TcS WantedConstraints+ -- See Note [Top-level Defaulting Plan]+simplifyTopWanteds wanteds+ = do { wc_first_go <- nestTcS (solveWanteds wanteds)+ -- This is where the main work happens+ ; dflags <- getDynFlags+ ; wc_defaulted <- try_tyvar_defaulting dflags wc_first_go++ -- See Note [Implementation of Unsatisfiable constraints] in GHC.Tc.Errors,+ -- point (C).+ ; useUnsatisfiableGivens wc_defaulted }+ where+ try_tyvar_defaulting :: DynFlags -> WantedConstraints -> TcS WantedConstraints+ try_tyvar_defaulting dflags wc+ | isEmptyWC wc+ = return wc+ | insolubleWC wc+ , gopt Opt_PrintExplicitRuntimeReps dflags -- See Note [Defaulting insolubles]+ = try_class_defaulting wc+ | otherwise+ = do { -- Need to zonk first, as the WantedConstraints are not yet zonked.+ ; free_tvs <- TcS.zonkTyCoVarsAndFVList (tyCoVarsOfWCList wc)+ ; let defaultable_tvs = filter can_default free_tvs+ can_default tv+ = isTyVar tv+ -- Weed out coercion variables.++ && isMetaTyVar tv+ -- Weed out runtime-skolems in GHCi, which we definitely+ -- shouldn't try to default.++ && not (tv `elemVarSet` nonDefaultableTyVarsOfWC wc)+ -- Weed out variables for which defaulting would be unhelpful,+ -- e.g. alpha appearing in [W] alpha[conc] ~# rr[sk].++ ; defaulted <- mapM defaultTyVarTcS defaultable_tvs -- Has unification side effects+ ; if or defaulted+ then do { wc_residual <- nestTcS (solveWanteds wc)+ -- See Note [Must simplify after defaulting]+ ; try_class_defaulting wc_residual }+ else try_class_defaulting wc } -- No defaulting took place++ try_class_defaulting :: WantedConstraints -> TcS WantedConstraints+ try_class_defaulting wc+ | isEmptyWC wc || insolubleWC wc -- See Note [Defaulting insolubles]+ = try_callstack_defaulting wc+ | otherwise -- See Note [When to do type-class defaulting]+ = do { something_happened <- applyDefaultingRules wc+ -- See Note [Top-level Defaulting Plan]+ ; if something_happened+ then do { wc_residual <- nestTcS (solveWanteds wc)+ ; try_class_defaulting wc_residual }+ -- See Note [Overview of implicit CallStacks] in GHC.Tc.Types.Evidence+ else try_callstack_defaulting wc }++ try_callstack_defaulting :: WantedConstraints -> TcS WantedConstraints+ try_callstack_defaulting wc+ | isEmptyWC wc+ = return wc+ | otherwise+ = defaultCallStacks wc++-- | If an implication contains a Given of the form @Unsatisfiable msg@, use+-- it to solve all Wanteds within the implication.+--+-- This does a complete walk over the implication tree.+--+-- See point (C) in Note [Implementation of Unsatisfiable constraints] in GHC.Tc.Errors.+useUnsatisfiableGivens :: WantedConstraints -> TcS WantedConstraints+useUnsatisfiableGivens wc =+ do { (final_wc, did_work) <- (`runStateT` False) $ go_wc wc+ ; if did_work+ then nestTcS (solveWanteds final_wc)+ else return final_wc }+ where+ go_wc (WC { wc_simple = wtds, wc_impl = impls, wc_errors = errs })+ = do impls' <- mapMaybeBagM go_impl impls+ return $ WC { wc_simple = wtds, wc_impl = impls', wc_errors = errs }+ go_impl impl+ | isSolvedStatus (ic_status impl)+ = return $ Just impl+ -- Is there a Given with type "Unsatisfiable msg"?+ -- If so, use it to solve all other Wanteds.+ | unsat_given:_ <- mapMaybe unsatisfiableEv_maybe (ic_given impl)+ = do { put True+ ; lift $ solveImplicationUsingUnsatGiven unsat_given impl }+ -- Otherwise, recurse.+ | otherwise+ = do { wcs' <- go_wc (ic_wanted impl)+ ; lift $ setImplicationStatus $ impl { ic_wanted = wcs' } }++-- | Is this evidence variable the evidence for an 'Unsatisfiable' constraint?+--+-- If so, return the variable itself together with the error message type.+unsatisfiableEv_maybe :: EvVar -> Maybe (EvVar, Type)+unsatisfiableEv_maybe v = (v,) <$> isUnsatisfiableCt_maybe (idType v)++-- | We have an implication with an 'Unsatisfiable' Given; use that Given to+-- solve all the other Wanted constraints, including those nested within+-- deeper implications.+solveImplicationUsingUnsatGiven :: (EvVar, Type) -> Implication -> TcS (Maybe Implication)+solveImplicationUsingUnsatGiven+ unsat_given@(given_ev,_)+ impl@(Implic { ic_wanted = wtd, ic_tclvl = tclvl, ic_binds = ev_binds_var, ic_need_inner = inner })+ | isCoEvBindsVar ev_binds_var+ -- We can't use Unsatisfiable evidence in kinds.+ -- See Note [Coercion evidence only] in GHC.Tc.Types.Evidence.+ = return $ Just impl+ | otherwise+ = do { wcs <- nestImplicTcS ev_binds_var tclvl $ go_wc wtd+ ; setImplicationStatus $+ impl { ic_wanted = wcs+ , ic_need_inner = inner `extendVarSet` given_ev } }+ where+ go_wc :: WantedConstraints -> TcS WantedConstraints+ go_wc wc@(WC { wc_simple = wtds, wc_impl = impls })+ = do { mapBagM_ go_simple wtds+ ; impls <- mapMaybeBagM (solveImplicationUsingUnsatGiven unsat_given) impls+ ; return $ wc { wc_simple = emptyBag, wc_impl = impls } }+ go_simple :: Ct -> TcS ()+ go_simple ct = case ctEvidence ct of+ CtWanted { ctev_pred = pty, ctev_dest = dst }+ -> do { ev_expr <- unsatisfiableEvExpr unsat_given pty+ ; setWantedEvTerm dst True $ EvExpr ev_expr }+ _ -> return ()++-- | Create an evidence expression for an arbitrary constraint using+-- evidence for an "Unsatisfiable" Given.+--+-- See Note [Evidence terms from Unsatisfiable Givens]+unsatisfiableEvExpr :: (EvVar, ErrorMsgType) -> PredType -> TcS EvExpr+unsatisfiableEvExpr (unsat_ev, given_msg) wtd_ty+ = do { mod <- getModule+ -- If we're typechecking GHC.TypeError, return a bogus expression;+ -- it's only used for the ambiguity check, which throws the evidence away anyway.+ -- This avoids problems with circularity; where we are trying to look+ -- up the "unsatisfiable" Id while we are in the middle of typechecking it.+ ; if mod == gHC_TYPEERROR then return (Var unsat_ev) else+ do { unsatisfiable_id <- tcLookupId unsatisfiableIdName++ -- See Note [Evidence terms from Unsatisfiable Givens]+ -- for a description of what evidence term we are constructing here.++ ; let -- (##) -=> wtd_ty+ fun_ty = mkFunTy visArgConstraintLike ManyTy unboxedUnitTy wtd_ty+ mkDictBox = case boxingDataCon fun_ty of+ BI_Box { bi_data_con = mkDictBox } -> mkDictBox+ _ -> pprPanic "unsatisfiableEvExpr: no DictBox!" (ppr wtd_ty)+ dictBox = dataConTyCon mkDictBox+ ; ev_bndr <- mkSysLocalM (fsLit "ct") ManyTy fun_ty+ -- Dict ((##) -=> wtd_ty)+ ; let scrut_ty = mkTyConApp dictBox [fun_ty]+ -- unsatisfiable @{LiftedRep} @given_msg @(Dict ((##) -=> wtd_ty)) unsat_ev+ scrut =+ mkCoreApps (Var unsatisfiable_id)+ [ Type liftedRepTy+ , Type given_msg+ , Type scrut_ty+ , Var unsat_ev ]+ -- case scrut of { MkDictBox @((##) -=> wtd_ty)) ct -> ct (# #) }+ ev_expr =+ mkWildCase scrut (unrestricted $ scrut_ty) wtd_ty+ [ Alt (DataAlt mkDictBox) [ev_bndr] $+ mkCoreApps (Var ev_bndr) [unboxedUnitExpr]+ ]+ ; return ev_expr } }++{- Note [Evidence terms from Unsatisfiable Givens]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+An Unsatisfiable Given constraint, of the form [G] Unsatisfiable msg, should be+able to solve ANY Wanted constraint whatsoever.++Recall that we have++ unsatisfiable :: forall {rep} (msg :: ErrorMessage) (a :: TYPE rep)+ . Unsatisfiable msg => a++We want to use this function, together with the evidence+[G] unsat_ev :: Unsatisfiable msg, to solve any other constraint [W] wtd_ty.++We could naively think that a valid evidence term for the Wanted might be:++ wanted_ev = unsatisfiable @{rep} @msg @wtd_ty unsat_ev++Unfortunately, this is a kind error: "wtd_ty :: CONSTRAINT rep", but+"unsatisfiable" expects the third type argument to be of kind "TYPE rep".++Instead, we use a boxing data constructor to box the constraint into a type.+In the end, we construct the following evidence for the implication:++ [G] unsat_ev :: Unsatisfiable msg+ ==>+ [W] wtd_ev :: wtd_ty++ wtd_ev =+ case unsatisfiable @{LiftedRep} @msg @(Dict ((##) -=> wtd_ty)) unsat_ev of+ MkDictBox ct -> ct (# #)++Note that we play the same trick with the function arrow -=> that we did+in order to define "unsatisfiable" in terms of "unsatisfiableLifted", as described+in Note [The Unsatisfiable representation-polymorphism trick] in base:GHC.TypeError.+This allows us to indirectly box constraints with different representations+(such as primitive equality constraints).+-}++-- | Default any remaining @CallStack@ constraints to empty @CallStack@s.+defaultCallStacks :: WantedConstraints -> TcS WantedConstraints+-- See Note [Overview of implicit CallStacks] in GHC.Tc.Types.Evidence+defaultCallStacks wanteds+ = do simples <- handle_simples (wc_simple wanteds)+ mb_implics <- mapBagM handle_implic (wc_impl wanteds)+ return (wanteds { wc_simple = simples+ , wc_impl = catBagMaybes mb_implics })++ where++ handle_simples simples+ = catBagMaybes <$> mapBagM defaultCallStack simples++ handle_implic :: Implication -> TcS (Maybe Implication)+ -- The Maybe is because solving the CallStack constraint+ -- may well allow us to discard the implication entirely+ handle_implic implic+ | isSolvedStatus (ic_status implic)+ = return (Just implic)+ | otherwise+ = do { wanteds <- setEvBindsTcS (ic_binds implic) $+ -- defaultCallStack sets a binding, so+ -- we must set the correct binding group+ defaultCallStacks (ic_wanted implic)+ ; setImplicationStatus (implic { ic_wanted = wanteds }) }++ defaultCallStack ct+ | ClassPred cls tys <- classifyPredType (ctPred ct)+ , Just {} <- isCallStackPred cls tys+ = do { solveCallStack (ctEvidence ct) EvCsEmpty+ ; return Nothing }++ defaultCallStack ct+ = return (Just ct)+++{- Note [When to do type-class defaulting]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In GHC 7.6 and 7.8.2, we did type-class defaulting only if insolubleWC+was false, on the grounds that defaulting can't help solve insoluble+constraints. But if we *don't* do defaulting we may report a whole+lot of errors that would be solved by defaulting; these errors are+quite spurious because fixing the single insoluble error means that+defaulting happens again, which makes all the other errors go away.+This is jolly confusing: #9033.++So it seems better to always do type-class defaulting.++However, always doing defaulting does mean that we'll do it in+situations like this (#5934):+ run :: (forall s. GenST s) -> Int+ run = fromInteger 0+We don't unify the return type of fromInteger with the given function+type, because the latter involves foralls. So we're left with+ (Num alpha, alpha ~ (forall s. GenST s) -> Int)+Now we do defaulting, get alpha := Integer, and report that we can't+match Integer with (forall s. GenST s) -> Int. That's not totally+stupid, but perhaps a little strange.++Another potential alternative would be to suppress *all* non-insoluble+errors if there are *any* insoluble errors, anywhere, but that seems+too drastic.++Note [Don't default in syntactic equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When there are unsolved syntactic equalities such as++ rr[sk] ~S# alpha[conc]++we should not default alpha, lest we obtain a poor error message such as++ Couldn't match kind `rr' with `LiftedRep'++We would rather preserve the original syntactic equality to be+reported to the user, especially as the concrete metavariable alpha+might store an informative origin for the user.++Note [Must simplify after defaulting]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We may have a deeply buried constraint+ (t:*) ~ (a:Open)+which we couldn't solve because of the kind incompatibility, and 'a' is free.+Then when we default 'a' we can solve the constraint. And we want to do+that before starting in on type classes. We MUST do it before reporting+errors, because it isn't an error! #7967 was due to this.++Note [Top-level Defaulting Plan]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We have considered two design choices for where/when to apply defaulting.+ (i) Do it in SimplCheck mode only /whenever/ you try to solve some+ simple constraints, maybe deep inside the context of implications.+ This used to be the case in GHC 7.4.1.+ (ii) Do it in a tight loop at simplifyTop, once all other constraints have+ finished. This is the current story.++Option (i) had many disadvantages:+ a) Firstly, it was deep inside the actual solver.+ b) Secondly, it was dependent on the context (Infer a type signature,+ or Check a type signature, or Interactive) since we did not want+ to always start defaulting when inferring (though there is an exception to+ this, see Note [Default while Inferring]).+ c) It plainly did not work. Consider typecheck/should_compile/DfltProb2.hs:+ f :: Int -> Bool+ f x = const True (\y -> let w :: a -> a+ w a = const a (y+1)+ in w y)+ We will get an implication constraint (for beta the type of y):+ [untch=beta] forall a. 0 => Num beta+ which we really cannot default /while solving/ the implication, since beta is+ untouchable.++Instead our new defaulting story is to pull defaulting out of the solver loop and+go with option (ii), implemented at SimplifyTop. Namely:+ - First, have a go at solving the residual constraint of the whole+ program+ - Try to approximate it with a simple constraint+ - Figure out derived defaulting equations for that simple constraint+ - Go round the loop again if you did manage to get some equations++Now, that has to do with class defaulting. However there exists type variable /kind/+defaulting. Again this is done at the top-level and the plan is:+ - At the top-level, once you had a go at solving the constraint, do+ figure out /all/ the touchable unification variables of the wanted constraints.+ - Apply defaulting to their kinds++More details in Note [DefaultTyVar].++Note [Safe Haskell Overlapping Instances]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In Safe Haskell, we apply an extra restriction to overlapping instances. The+motive is to prevent untrusted code provided by a third-party, changing the+behavior of trusted code through type-classes. This is due to the global and+implicit nature of type-classes that can hide the source of the dictionary.++Another way to state this is: if a module M compiles without importing another+module N, changing M to import N shouldn't change the behavior of M.++Overlapping instances with type-classes can violate this principle. However,+overlapping instances aren't always unsafe. They are just unsafe when the most+selected dictionary comes from untrusted code (code compiled with -XSafe) and+overlaps instances provided by other modules.++In particular, in Safe Haskell at a call site with overlapping instances, we+apply the following rule to determine if it is a 'unsafe' overlap:++ 1) Most specific instance, I1, defined in an `-XSafe` compiled module.+ 2) I1 is an orphan instance or a MPTC.+ 3) At least one overlapped instance, Ix, is both:+ A) from a different module than I1+ B) Ix is not marked `OVERLAPPABLE`++This is a slightly involved heuristic, but captures the situation of an+imported module N changing the behavior of existing code. For example, if+condition (2) isn't violated, then the module author M must depend either on a+type-class or type defined in N.++Secondly, when should these heuristics be enforced? We enforced them when the+type-class method call site is in a module marked `-XSafe` or `-XTrustworthy`.+This allows `-XUnsafe` modules to operate without restriction, and for Safe+Haskell inference to infer modules with unsafe overlaps as unsafe.++One alternative design would be to also consider if an instance was imported as+a `safe` import or not and only apply the restriction to instances imported+safely. However, since instances are global and can be imported through more+than one path, this alternative doesn't work.++Note [Safe Haskell Overlapping Instances Implementation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+How is this implemented? It's complicated! So we'll step through it all:++ 1) `InstEnv.lookupInstEnv` -- Performs instance resolution, so this is where+ we check if a particular type-class method call is safe or unsafe. We do this+ through the return type, `ClsInstLookupResult`, where the last parameter is a+ list of instances that are unsafe to overlap. When the method call is safe,+ the list is null.++ 2) `GHC.Tc.Solver.Dict.matchClassInst` -- This module drives the instance resolution+ / dictionary generation. The return type is `ClsInstResult`, which either+ says no instance matched, or one found, and if it was a safe or unsafe+ overlap.++ 3) `GHC.Tc.Solver.Dict.tryInstances` -- Takes a dictionary / class constraint and+ tries to resolve it by calling (in part) `matchClassInst`. The resolving+ mechanism has a work list (of constraints) that it process one at a time. If+ the constraint can't be resolved, it's added to an inert set. When compiling+ an `-XSafe` or `-XTrustworthy` module, we follow this approach as we know+ compilation should fail. These are handled as normal constraint resolution+ failures from here-on (see step 6).++ Otherwise, we may be inferring safety (or using `-Wunsafe`), and+ compilation should succeed, but print warnings and/or mark the compiled module+ as `-XUnsafe`. In this case, we call `insertSafeOverlapFailureTcS` which adds+ the unsafe (but resolved!) constraint to the `inert_safehask` field of+ `InertCans`.++ 4) `GHC.Tc.Solver.simplifyTop`:+ * Call simplifyTopWanteds, the top-level function for driving the simplifier for+ constraint resolution.++ * Once finished, call `getSafeOverlapFailures` to retrieve the+ list of overlapping instances that were successfully resolved,+ but unsafe. Remember, this is only applicable for generating warnings+ (`-Wunsafe`) or inferring a module unsafe. `-XSafe` and `-XTrustworthy`+ cause compilation failure by not resolving the unsafe constraint at all.++ * For unresolved constraints (all types), call `GHC.Tc.Errors.reportUnsolved`,+ while for resolved but unsafe overlapping dictionary constraints, call+ `GHC.Tc.Errors.warnAllUnsolved`. Both functions convert constraints into a+ warning message for the user.++ * In the case of `warnAllUnsolved` for resolved, but unsafe+ dictionary constraints, we collect the generated warning+ message (pop it) and call `GHC.Tc.Utils.Monad.recordUnsafeInfer` to+ mark the module we are compiling as unsafe, passing the+ warning message along as the reason.++ 5) `GHC.Tc.Errors.*Unsolved` -- Generates error messages for constraints by+ actually calling `InstEnv.lookupInstEnv` again! Yes, confusing, but all we+ know is the constraint that is unresolved or unsafe. For dictionary, all we+ know is that we need a dictionary of type C, but not what instances are+ available and how they overlap. So we once again call `lookupInstEnv` to+ figure that out so we can generate a helpful error message.++ 6) `GHC.Tc.Utils.Monad.recordUnsafeInfer` -- Save the unsafe result and reason in+ IORefs called `tcg_safe_infer` and `tcg_safe_infer_reason`.++ 7) `GHC.Driver.Main.tcRnModule'` -- Reads `tcg_safe_infer` after type-checking, calling+ `GHC.Driver.Main.markUnsafeInfer` (passing the reason along) when safe-inference+ failed.++Note [No defaulting in the ambiguity check]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When simplifying constraints for the ambiguity check, we use+solveWanteds, not simplifyTopWanteds, so that we do no defaulting.+#11947 was an example:+ f :: Num a => Int -> Int+This is ambiguous of course, but we don't want to default the+(Num alpha) constraint to (Num Int)! Doing so gives a defaulting+warning, but no error.++Note [Defaulting insolubles]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If a set of wanteds is insoluble, we have no hope of accepting the+program. Yet we do not stop constraint solving, etc., because we may+simplify the wanteds to produce better error messages. So, once+we have an insoluble constraint, everything we do is just about producing+helpful error messages.++Should we default in this case or not? Let's look at an example (tcfail004):++ (f,g) = (1,2,3)++With defaulting, we get a conflict between (a0,b0) and (Integer,Integer,Integer).+Without defaulting, we get a conflict between (a0,b0) and (a1,b1,c1). I (Richard)+find the latter more helpful. Several other test cases (e.g. tcfail005) suggest+similarly. So: we should not do class defaulting with insolubles.++On the other hand, RuntimeRep-defaulting is different. Witness tcfail078:++ f :: Integer i => i+ f = 0++Without RuntimeRep-defaulting, we GHC suggests that Integer should have kind+TYPE r0 -> Constraint and then complains that r0 is actually untouchable+(presumably, because it can't be sure if `Integer i` entails an equality).+If we default, we are told of a clash between (* -> Constraint) and Constraint.+The latter seems far better, suggesting we *should* do RuntimeRep-defaulting+even on insolubles.++But, evidently, not always. Witness UnliftedNewtypesInfinite:++ newtype Foo = FooC (# Int#, Foo #)++This should fail with an occurs-check error on the kind of Foo (with -XUnliftedNewtypes).+If we default RuntimeRep-vars, we get++ Expecting a lifted type, but ‘(# Int#, Foo #)’ is unlifted++which is just plain wrong.++Another situation in which we don't want to default involves concrete metavariables.++In equalities such as alpha[conc] ~# rr[sk] , alpha[conc] ~# RR beta[tau]+for a type family RR (all at kind RuntimeRep), we would prefer to report a+representation-polymorphism error rather than default alpha and get error:++ Could not unify `rr` with `Lifted` / Could not unify `RR b0` with `Lifted`++which is very confusing. For this reason, we weed out the concrete+metavariables participating in such equalities in nonDefaultableTyVarsOfWC.+Just looking at insolublity is not enough, as `alpha[conc] ~# RR beta[tau]` could+become soluble after defaulting beta (see also #21430).++Conclusion: we should do RuntimeRep-defaulting on insolubles only when the+user does not want to hear about RuntimeRep stuff -- that is, when+-fprint-explicit-runtime-reps is not set.+However, we must still take care not to default concrete type variables+participating in an equality with a non-concrete type, as seen in the+last example above.+-}++------------------+simplifyAmbiguityCheck :: Type -> WantedConstraints -> TcM ()+simplifyAmbiguityCheck ty wanteds+ = do { traceTc "simplifyAmbiguityCheck {" $+ text "type = " <+> ppr ty $$ text "wanted = " <+> ppr wanteds++ ; (final_wc, _) <- runTcS $ useUnsatisfiableGivens =<< solveWanteds wanteds+ -- NB: no defaulting! See Note [No defaulting in the ambiguity check]+ -- Note: we do still use Unsatisfiable Givens to solve Wanteds,+ -- see Wrinkle [Ambiguity] under point (C) of+ -- Note [Implementation of Unsatisfiable constraints] in GHC.Tc.Errors.++ ; discardResult (reportUnsolved final_wc)++ ; traceTc "End simplifyAmbiguityCheck }" empty }++------------------+simplifyInteractive :: WantedConstraints -> TcM (Bag EvBind)+simplifyInteractive wanteds+ = traceTc "simplifyInteractive" empty >>+ simplifyTop wanteds++------------------+simplifyDefault :: ThetaType -- Wanted; has no type variables in it+ -> TcM Bool -- Return if the constraint is soluble+simplifyDefault theta+ = do { traceTc "simplifyDefault" empty+ ; wanteds <- newWanteds DefaultOrigin theta+ ; (unsolved, _) <- runTcS (solveWanteds (mkSimpleWC wanteds))+ ; return (isEmptyWC unsolved) }++------------------+{- Note [Pattern match warnings with insoluble Givens]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A pattern match on a GADT can introduce new type-level information, which needs+to be analysed in order to get the expected pattern match warnings.++For example:++> type IsBool :: Type -> Constraint+> type family IsBool a where+> IsBool Bool = ()+> IsBool b = b ~ Bool+>+> data T a where+> MkTInt :: Int -> T Int+> MkTBool :: IsBool b => b -> T b+>+> f :: T Int -> Int+> f (MkTInt i) = i++The pattern matching performed by `f` is complete: we can't ever call+`f (MkTBool b)`, as type-checking that application would require producing+evidence for `Int ~ Bool`, which can't be done.++The pattern match checker uses `tcCheckGivens` to accumulate all the Given+constraints, and relies on `tcCheckGivens` to return Nothing if the+Givens become insoluble. `tcCheckGivens` in turn relies on `insolubleCt`+to identify these insoluble constraints. So the precise definition of+`insolubleCt` has a big effect on pattern match overlap warnings.++To detect this situation, we check whether there are any insoluble Given+constraints. In the example above, the insoluble constraint was an+equality constraint, but it is also important to detect custom type errors:++> type NotInt :: Type -> Constraint+> type family NotInt a where+> NotInt Int = TypeError (Text "That's Int, silly.")+> NotInt _ = ()+>+> data R a where+> MkT1 :: a -> R a+> MkT2 :: NotInt a => R a+>+> foo :: R Int -> Int+> foo (MkT1 x) = x++To see that we can't call `foo (MkT2)`, we must detect that `NotInt Int` is insoluble+because it is a custom type error.+Failing to do so proved quite inconvenient for users, as evidence by the+tickets #11503 #14141 #16377 #20180.+Test cases: T11503, T14141.++Examples of constraints that tcCheckGivens considers insoluble:+ - Int ~ Bool,+ - Coercible Float Word,+ - TypeError msg.++Non-examples:+ - constraints which we know aren't satisfied,+ e.g. Show (Int -> Int) when no such instance is in scope,+ - Eq (TypeError msg),+ - C (Int ~ Bool), with @class C (c :: Constraint)@.+-}++tcCheckGivens :: InertSet -> Bag EvVar -> TcM (Maybe InertSet)+-- ^ Return (Just new_inerts) if the Givens are satisfiable, Nothing if definitely+-- contradictory.+--+-- See Note [Pattern match warnings with insoluble Givens] above.+tcCheckGivens inerts given_ids = do+ (sat, new_inerts) <- runTcSInerts inerts $ do+ traceTcS "checkGivens {" (ppr inerts <+> ppr given_ids)+ lcl_env <- TcS.getLclEnv+ let given_loc = mkGivenLoc topTcLevel (getSkolemInfo unkSkol) (mkCtLocEnv lcl_env)+ let given_cts = mkGivens given_loc (bagToList given_ids)+ -- See Note [Superclasses and satisfiability]+ solveSimpleGivens given_cts+ insols <- getInertInsols+ insols <- try_harder insols+ traceTcS "checkGivens }" (ppr insols)+ return (isEmptyBag insols)+ return $ if sat then Just new_inerts else Nothing+ where+ try_harder :: Cts -> TcS Cts+ -- Maybe we have to search up the superclass chain to find+ -- an unsatisfiable constraint. Example: pmcheck/T3927b.+ -- At the moment we try just once+ try_harder insols+ | not (isEmptyBag insols) -- We've found that it's definitely unsatisfiable+ = return insols -- Hurrah -- stop now.+ | otherwise+ = do { pending_given <- getPendingGivenScs+ ; new_given <- makeSuperClasses pending_given+ ; solveSimpleGivens new_given+ ; getInertInsols }++tcCheckWanteds :: InertSet -> ThetaType -> TcM Bool+-- ^ Return True if the Wanteds are soluble, False if not+tcCheckWanteds inerts wanteds = do+ cts <- newWanteds PatCheckOrigin wanteds+ (sat, _new_inerts) <- runTcSInerts inerts $ do+ traceTcS "checkWanteds {" (ppr inerts <+> ppr wanteds)+ -- See Note [Superclasses and satisfiability]+ wcs <- solveWanteds (mkSimpleWC cts)+ traceTcS "checkWanteds }" (ppr wcs)+ return (isSolvedWC wcs)+ return sat++-- | Normalise a type as much as possible using the given constraints.+-- See @Note [tcNormalise]@.+tcNormalise :: InertSet -> Type -> TcM Type+tcNormalise inerts ty+ = do { norm_loc <- getCtLocM PatCheckOrigin Nothing+ ; (res, _new_inerts) <- runTcSInerts inerts $+ do { traceTcS "tcNormalise {" (ppr inerts)+ ; ty' <- rewriteType norm_loc ty+ ; traceTcS "tcNormalise }" (ppr ty')+ ; pure ty' }+ ; return res }++{- Note [Superclasses and satisfiability]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Expand superclasses before starting, because (Int ~ Bool), has+(Int ~~ Bool) as a superclass, which in turn has (Int ~N# Bool)+as a superclass, and it's the latter that is insoluble. See+Note [The equality types story] in GHC.Builtin.Types.Prim.++If we fail to prove unsatisfiability we (arbitrarily) try just once to+find superclasses, using try_harder. Reason: we might have a type+signature+ f :: F op (Implements push) => ..+where F is a type function. This happened in #3972.++We could do more than once but we'd have to have /some/ limit: in the+the recursive case, we would go on forever in the common case where+the constraints /are/ satisfiable (#10592 comment:12!).++For straightforward situations without type functions the try_harder+step does nothing.++Note [tcNormalise]+~~~~~~~~~~~~~~~~~~+tcNormalise is a rather atypical entrypoint to the constraint solver. Whereas+most invocations of the constraint solver are intended to simplify a set of+constraints or to decide if a particular set of constraints is satisfiable,+the purpose of tcNormalise is to take a type, plus some locally solved+constraints in the form of an InertSet, and normalise the type as much as+possible with respect to those constraints.++It does *not* reduce type or data family applications or look through newtypes.++Why is this useful? As one example, when coverage-checking an EmptyCase+expression, it's possible that the type of the scrutinee will only reduce+if some local equalities are solved for. See "Wrinkle: Local equalities"+in Note [Type normalisation] in "GHC.HsToCore.Pmc".++To accomplish its stated goal, tcNormalise first initialises the solver monad+with the given InertCans, then uses rewriteType to simplify the desired type+with respect to the Givens in the InertCans.++***********************************************************************************+* *+* Inference+* *+***********************************************************************************++Note [Inferring the type of a let-bound variable]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+ f x = rhs++To infer f's type we do the following:+ * Gather the constraints for the RHS with ambient level *one more than*+ the current one. This is done by the call+ pushLevelAndCaptureConstraints (tcMonoBinds...)+ in GHC.Tc.Gen.Bind.tcPolyInfer++ * Call simplifyInfer to simplify the constraints and decide what to+ quantify over. We pass in the level used for the RHS constraints,+ here called rhs_tclvl.++This ensures that the implication constraint we generate, if any,+has a strictly-increased level compared to the ambient level outside+the let binding.++Note [Inferring principal types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We don't always infer principal types. For instance, the inferred type for++> f x = show [x]++is++> f :: Show a => a -> String++This is not the most general type if we allow flexible contexts.+Indeed, if we try to write the following++> g :: Show [a] => a -> String+> g x = f x++we get the error:++ * Could not deduce (Show a) arising from a use of `f'+ from the context: Show [a]++Though replacing f x in the right-hand side of g with the definition+of f x works, the call to f x does not. This is the hallmark of+unprincip{led,al} types.++Another example:++> class C a+> class D a where+> d :: a+> instance C a => D a where+> d = undefined+> h _ = d -- argument is to avoid the monomorphism restriction++The inferred type for h is++> h :: C a => t -> a++even though++> h :: D a => t -> a++is more general.++The fix is easy: don't simplify constraints before inferring a type.+That is, have the inferred type quantify over all constraints that arise+in a definition's right-hand side, even if they are simplifiable.+Unfortunately, this would yield all manner of unwieldy types,+and so we won't do so.+-}++-- | How should we choose which constraints to quantify over?+data InferMode = ApplyMR -- ^ Apply the monomorphism restriction,+ -- never quantifying over any constraints+ | EagerDefaulting -- ^ See Note [TcRnExprMode] in "GHC.Tc.Module",+ -- the :type +d case; this mode refuses+ -- to quantify over any defaultable constraint+ | NoRestrictions -- ^ Quantify over any constraint that+ -- satisfies pickQuantifiablePreds++instance Outputable InferMode where+ ppr ApplyMR = text "ApplyMR"+ ppr EagerDefaulting = text "EagerDefaulting"+ ppr NoRestrictions = text "NoRestrictions"++simplifyInfer :: TcLevel -- Used when generating the constraints+ -> InferMode+ -> [TcIdSigInst] -- Any signatures (possibly partial)+ -> [(Name, TcTauType)] -- Variables to be generalised,+ -- and their tau-types+ -> WantedConstraints+ -> TcM ([TcTyVar], -- Quantify over these type variables+ [EvVar], -- ... and these constraints (fully zonked)+ TcEvBinds, -- ... binding these evidence variables+ Bool) -- True <=> the residual constraints are insoluble++simplifyInfer rhs_tclvl infer_mode sigs name_taus wanteds+ | isEmptyWC wanteds+ = do { -- When quantifying, we want to preserve any order of variables as they+ -- appear in partial signatures. cf. decideQuantifiedTyVars+ let psig_tv_tys = [ mkTyVarTy tv | sig <- partial_sigs+ , (_,Bndr tv _) <- sig_inst_skols sig ]+ psig_theta = [ pred | sig <- partial_sigs+ , pred <- sig_inst_theta sig ]++ ; dep_vars <- candidateQTyVarsOfTypes (psig_tv_tys ++ psig_theta ++ map snd name_taus)++ ; skol_info <- mkSkolemInfo (InferSkol name_taus)+ ; qtkvs <- quantifyTyVars skol_info DefaultNonStandardTyVars dep_vars+ ; traceTc "simplifyInfer: empty WC" (ppr name_taus $$ ppr qtkvs)+ ; return (qtkvs, [], emptyTcEvBinds, False) }++ | otherwise+ = do { traceTc "simplifyInfer {" $ vcat+ [ text "sigs =" <+> ppr sigs+ , text "binds =" <+> ppr name_taus+ , text "rhs_tclvl =" <+> ppr rhs_tclvl+ , text "infer_mode =" <+> ppr infer_mode+ , text "(unzonked) wanted =" <+> ppr wanteds+ ]++ ; let psig_theta = concatMap sig_inst_theta partial_sigs++ -- First do full-blown solving+ -- NB: we must gather up all the bindings from doing+ -- this solving; hence (runTcSWithEvBinds ev_binds_var).+ -- And note that since there are nested implications,+ -- calling solveWanteds will side-effect their evidence+ -- bindings, so we can't just revert to the input+ -- constraint.++ ; ev_binds_var <- TcM.newTcEvBinds+ ; psig_evs <- newWanteds AnnOrigin psig_theta+ ; wanted_transformed+ <- setTcLevel rhs_tclvl $+ runTcSWithEvBinds ev_binds_var $+ solveWanteds (mkSimpleWC psig_evs `andWC` wanteds)+ -- psig_evs : see Note [Add signature contexts as wanteds]+ -- See Note [Inferring principal types]++ -- Find quant_pred_candidates, the predicates that+ -- we'll consider quantifying over+ -- NB1: wanted_transformed does not include anything provable from+ -- the psig_theta; it's just the extra bit+ -- NB2: We do not do any defaulting when inferring a type, this can lead+ -- to less polymorphic types, see Note [Default while Inferring]+ ; wanted_transformed <- TcM.liftZonkM $ TcM.zonkWC wanted_transformed+ ; let definite_error = insolubleWC wanted_transformed+ -- See Note [Quantification with errors]+ quant_pred_candidates+ | definite_error = []+ | otherwise = ctsPreds (approximateWC False wanted_transformed)++ -- Decide what type variables and constraints to quantify+ -- NB: quant_pred_candidates is already fully zonked+ -- NB: bound_theta are constraints we want to quantify over,+ -- including the psig_theta, which we always quantify over+ -- NB: bound_theta are fully zonked+ -- rec {..}: see Note [Keeping SkolemInfo inside a SkolemTv]+ -- in GHC.Tc.Utils.TcType+ ; rec { (qtvs, bound_theta, co_vars) <- decideQuantification skol_info infer_mode rhs_tclvl+ name_taus partial_sigs+ quant_pred_candidates+ ; bound_theta_vars <- mapM TcM.newEvVar bound_theta++ ; let full_theta = map idType bound_theta_vars+ ; skol_info <- mkSkolemInfo (InferSkol [ (name, mkSigmaTy [] full_theta ty)+ | (name, ty) <- name_taus ])+ }+++ -- Now emit the residual constraint+ ; emitResidualConstraints rhs_tclvl ev_binds_var+ name_taus co_vars qtvs bound_theta_vars+ wanted_transformed++ -- All done!+ ; traceTc "} simplifyInfer/produced residual implication for quantification" $+ vcat [ text "quant_pred_candidates =" <+> ppr quant_pred_candidates+ , text "psig_theta =" <+> ppr psig_theta+ , text "bound_theta =" <+> pprCoreBinders bound_theta_vars+ , text "qtvs =" <+> ppr qtvs+ , text "definite_error =" <+> ppr definite_error ]++ ; return ( qtvs, bound_theta_vars, TcEvBinds ev_binds_var, definite_error ) }+ -- NB: bound_theta_vars must be fully zonked+ where+ partial_sigs = filter isPartialSig sigs++--------------------+emitResidualConstraints :: TcLevel -> EvBindsVar+ -> [(Name, TcTauType)]+ -> CoVarSet -> [TcTyVar] -> [EvVar]+ -> WantedConstraints -> TcM ()+-- Emit the remaining constraints from the RHS.+emitResidualConstraints rhs_tclvl ev_binds_var+ name_taus co_vars qtvs full_theta_vars wanteds+ | isEmptyWC wanteds+ = return ()++ | otherwise+ = do { wanted_simple <- TcM.liftZonkM $ TcM.zonkSimples (wc_simple wanteds)+ ; let (outer_simple, inner_simple) = partitionBag is_mono wanted_simple+ is_mono ct+ | Just ct_ev_id <- wantedEvId_maybe ct+ = ct_ev_id `elemVarSet` co_vars+ | otherwise+ = False+ -- Reason for the partition:+ -- see Note [Emitting the residual implication in simplifyInfer]++-- Already done by defaultTyVarsAndSimplify+-- ; _ <- TcM.promoteTyVarSet (tyCoVarsOfCts outer_simple)++ ; let inner_wanted = wanteds { wc_simple = inner_simple }+ ; implics <- if isEmptyWC inner_wanted+ then return emptyBag+ else do implic1 <- newImplication+ return $ unitBag $+ implic1 { ic_tclvl = rhs_tclvl+ , ic_skols = qtvs+ , ic_given = full_theta_vars+ , ic_wanted = inner_wanted+ , ic_binds = ev_binds_var+ , ic_given_eqs = MaybeGivenEqs+ , ic_info = skol_info }++ ; emitConstraints (emptyWC { wc_simple = outer_simple+ , wc_impl = implics }) }+ where+ full_theta = map idType full_theta_vars+ skol_info = InferSkol [ (name, mkSigmaTy [] full_theta ty)+ | (name, ty) <- name_taus ]+ -- We don't add the quantified variables here, because they are+ -- also bound in ic_skols and we want them to be tidied+ -- uniformly.++--------------------+findInferredDiff :: TcThetaType -> TcThetaType -> TcM TcThetaType+-- Given a partial type signature f :: (C a, D a, _) => blah+-- and the inferred constraints (X a, D a, Y a, C a)+-- compute the difference, which is what will fill in the "_" underscore,+-- In this case the diff is (X a, Y a).+findInferredDiff annotated_theta inferred_theta+ | null annotated_theta -- Short cut the common case when the user didn't+ = return inferred_theta -- write any constraints in the partial signature+ | otherwise+ = pushTcLevelM_ $+ do { lcl_env <- TcM.getLclEnv+ ; given_ids <- mapM TcM.newEvVar annotated_theta+ ; wanteds <- newWanteds AnnOrigin inferred_theta+ ; let given_loc = mkGivenLoc topTcLevel (getSkolemInfo unkSkol) (mkCtLocEnv lcl_env)+ given_cts = mkGivens given_loc given_ids++ ; (residual, _) <- runTcS $+ do { _ <- solveSimpleGivens given_cts+ ; solveSimpleWanteds (listToBag (map mkNonCanonical wanteds)) }+ -- NB: There are no meta tyvars fromn this level annotated_theta+ -- because we have either promoted them or unified them+ -- See `Note [Quantification and partial signatures]` Wrinkle 2++ ; return (map (box_pred . ctPred) $+ bagToList $+ wc_simple residual) }+ where+ box_pred :: PredType -> PredType+ box_pred pred = case classifyPredType pred of+ EqPred rel ty1 ty2+ | Just (cls,tys) <- boxEqPred rel ty1 ty2+ -> mkClassPred cls tys+ | otherwise+ -> pprPanic "findInferredDiff" (ppr pred)+ _other -> pred++{- Note [Emitting the residual implication in simplifyInfer]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+ f = e+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+the coercion variable, and hence we can't generalise over things free in+its kind, in the case 'k'. But we can still generalise over 'a'. So+we'll generalise to+ f :: forall a. (a, Proxy k (Int |> co))+Now we do NOT want to form the residual implication constraint+ forall a. [W] co :: Type ~ k+because then co's eventual binding (which will be a value binding if we+use -fdefer-type-errors) won't scope over the entire binding for 'f' (whose+type mentions 'co'). Instead, just as we don't generalise over 'co', we+should not bury its constraint inside the implication. Instead, we must+put it outside.++That is the reason for the partitionBag in emitResidualConstraints,+which takes the CoVars free in the inferred type, and pulls their+constraints out. (NB: this set of CoVars should be closed-over-kinds.)++All rather subtle; see #14584.++Note [Add signature contexts as wanteds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider this (#11016):+ f2 :: (?x :: Int) => _+ f2 = ?x++or this+ class C a b | a -> b+ g :: C p q => p -> q+ f3 :: C Int b => _+ f3 = g (3::Int)++We'll use plan InferGen because there are holes in the type. But:+ * For f2 we want to have the (?x :: Int) constraint floating around+ so that the functional dependencies kick in. Otherwise the+ occurrence of ?x on the RHS produces constraint (?x :: alpha), and+ we won't unify alpha:=Int.++ * For f3 want the (C Int b) constraint from the partial signature+ to meet the (C Int beta) constraint we get from the call to g; again,+ fundeps++Solution: in simplifyInfer, we add the constraints from the signature+as extra Wanteds.++Why Wanteds? Wouldn't it be neater to treat them as Givens? Alas+that would mess up (GivenInv) in Note [TcLevel invariants]. Consider+ f :: (Eq a, _) => blah1+ f = ....g...+ g :: (Eq b, _) => blah2+ g = ...f...++Then we have two psig_theta constraints (Eq a[tv], Eq b[tv]), both with+TyVarTvs inside. Ultimately a[tv] := b[tv], but only when we've solved+all those constraints. And both have level 1, so we can't put them as+Givens when solving at level 1.++Best to treat them as Wanteds.++But see also #20076, which would be solved if they were Givens.+++************************************************************************+* *+ Quantification+* *+************************************************************************++Note [Deciding quantification]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If the monomorphism restriction does not apply, then we quantify as follows:++* Step 1: decidePromotedTyVars.+ Take the global tyvars, and "grow" them using functional dependencies+ E.g. if x:alpha is in the environment, and alpha ~ [beta] (which can+ happen because alpha is untouchable here) then do not quantify over+ beta, because alpha fixes beta, and beta is effectively free in+ the environment too; this logic extends to general fundeps, not+ just equalities++ We also account for the monomorphism restriction; if it applies,+ add the free vars of all the constraints.++ Result is mono_tvs; we will promote all of these to the outer levek,+ and certainly not quantify over them.++* Step 2: defaultTyVarsAndSimplify.+ Default any non-promoted tyvars (i.e ones that are definitely+ not going to become further constrained), and re-simplify the+ candidate constraints.++ Motivation for re-simplification (#7857): imagine we have a+ constraint (C (a->b)), where 'a :: TYPE l1' and 'b :: TYPE l2' are+ not free in the envt, and instance forall (a::*) (b::*). (C a) => C+ (a -> b) The instance doesn't match while l1,l2 are polymorphic, but+ it will match when we default them to LiftedRep.++ This is all very tiresome.++ This step also promotes the mono_tvs from Step 1. See+ Note [Promote monomorphic tyvars]. In fact, the *only*+ use of the mono_tvs from Step 1 is to promote them here.+ This promotion effectively stops us from quantifying over them+ later, in Step 3. Because the actual variables to quantify+ over are determined in Step 3 (not in Step 1), it is OK for+ the mono_tvs to be missing some variables free in the+ environment. This is why removing the psig_qtvs is OK in+ decidePromotedTyVars. Test case for this scenario: T14479.++* Step 3: decideQuantifiedTyVars.+ Decide which variables to quantify over, as follows:++ - Take the free vars of the partial-type-signature types and constraints,+ and the tau-type (zonked_tau_tvs), and then "grow"+ them using all the constraints. These are grown_tcvs.+ See Note [growThetaTyVars vs closeWrtFunDeps].++ - Use quantifyTyVars to quantify over the free variables of all the types+ involved, but only those in the grown_tcvs.++ Result is qtvs.++* Step 4: Filter the constraints using pickQuantifiablePreds and the+ qtvs. We have to zonk the constraints first, so they "see" the+ freshly created skolems.++Note [Unconditionally resimplify constraints when quantifying]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+During quantification (in defaultTyVarsAndSimplify, specifically), we re-invoke+the solver to simplify the constraints before quantifying them. We do this for+two reasons, enumerated below. We could, in theory, detect when either of these+cases apply and simplify only then, but collecting this information is bothersome,+and simplifying redundantly causes no real harm. Note that this code path+happens only for definitions+ * without a type signature+ * when -XMonoLocalBinds does not apply+ * with unsolved constraints+and so the performance cost will be small.++1. Defaulting++Defaulting the variables handled by defaultTyVar may unlock instance simplifications.+Example (typecheck/should_compile/T20584b):++ with (t :: Double) (u :: String) = printf "..." t u++We know the types of t and u, but we do not know the return type of `with`. So, we+assume `with :: alpha`, where `alpha :: TYPE rho`. The type of printf is+ printf :: PrintfType r => String -> r+The occurrence of printf is instantiated with a fresh var beta. We then get+ beta := Double -> String -> alpha+and+ [W] PrintfType (Double -> String -> alpha)++Module Text.Printf exports+ instance (PrintfArg a, PrintfType r) => PrintfType (a -> r)+and it looks like that instance should apply.++But I have elided some key details: (->) is polymorphic over multiplicity and+runtime representation. Here it is in full glory:+ [W] PrintfType ((Double :: Type) %m1 -> (String :: Type) %m2 -> (alpha :: TYPE rho))+ instance (PrintfArg a, PrintfType r) => PrintfType ((a :: Type) %Many -> (r :: Type))++Because we do not know that m1 is Many, we cannot use the instance. (Perhaps a better instance+would have an explicit equality constraint to the left of =>, but that's not what we have.)+Then, in defaultTyVarsAndSimplify, we get m1 := Many, m2 := Many, and rho := LiftedRep.+Yet it's too late to simplify the quantified constraint, and thus GHC infers+ wait :: PrintfType (Double -> String -> t) => Double -> String -> t+which is silly. Simplifying again after defaulting solves this problem.++2. Interacting functional dependencies++Suppose we have++ class C a b | a -> b++and we are running simplifyInfer over++ forall[2] x. () => [W] C a beta1[1]+ forall[2] y. () => [W] C a beta2[1]++These are two implication constraints, both of which contain a+wanted for the class C. Neither constraint mentions the bound+skolem. We might imagine that these constraints could thus float+out of their implications and then interact, causing beta1 to unify+with beta2, but constraints do not currently float out of implications.++Unifying the beta1 and beta2 is important. Without doing so, then we might+infer a type like (C a b1, C a b2) => a -> a, which will fail to pass the+ambiguity check, which will say (rightly) that it cannot unify b1 with b2, as+required by the fundep interactions. This happens in the parsec library, and+in test case typecheck/should_compile/FloatFDs.++If we re-simplify, however, the two fundep constraints will interact, causing+a unification between beta1 and beta2, and all will be well. The key step+is that this simplification happens *after* the call to approximateWC in+simplifyInfer.++-}++decideQuantification+ :: SkolemInfo+ -> InferMode+ -> TcLevel+ -> [(Name, TcTauType)] -- Variables to be generalised+ -> [TcIdSigInst] -- Partial type signatures (if any)+ -> [PredType] -- Candidate theta; already zonked+ -> TcM ( [TcTyVar] -- Quantify over these (skolems)+ , [PredType] -- and this context (fully zonked)+ , CoVarSet)+-- See Note [Deciding quantification]+decideQuantification skol_info infer_mode rhs_tclvl name_taus psigs candidates+ = do { -- Step 1: find the mono_tvs+ ; (candidates, co_vars, mono_tvs0)+ <- decidePromotedTyVars 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 candidates++ -- Step 3: decide which kind/type variables to quantify over+ ; qtvs <- decideQuantifiedTyVars skol_info name_taus psigs candidates++ -- Step 4: choose which of the remaining candidate+ -- predicates to actually quantify over+ -- NB: decideQuantifiedTyVars turned some meta tyvars+ -- into quantified skolems, so we have to zonk again+ ; (candidates, psig_theta) <- TcM.liftZonkM $+ do { candidates <- TcM.zonkTcTypes candidates+ ; psig_theta <- TcM.zonkTcTypes (concatMap sig_inst_theta psigs)+ ; return (candidates, psig_theta) }+ ; min_theta <- pickQuantifiablePreds (mkVarSet qtvs) mono_tvs0 candidates++ -- Take account of partial type signatures+ -- See Note [Constraints in partial type signatures]+ ; let min_psig_theta = mkMinimalBySCs id psig_theta+ ; theta <- if+ | null psigs -> return min_theta -- Case (P3)+ | not (all has_extra_constraints_wildcard psigs) -- Case (P2)+ -> return min_psig_theta+ | otherwise -- Case (P1)+ -> do { diff <- findInferredDiff min_psig_theta min_theta+ ; return (min_psig_theta ++ diff) }++ ; traceTc "decideQuantification"+ (vcat [ text "infer_mode:" <+> ppr infer_mode+ , text "candidates:" <+> ppr candidates+ , text "psig_theta:" <+> ppr psig_theta+ , text "co_vars:" <+> ppr co_vars+ , text "qtvs:" <+> ppr qtvs+ , text "theta:" <+> ppr theta ])+ ; return (qtvs, theta, co_vars) }++ where+ has_extra_constraints_wildcard (TISI { sig_inst_wcx = Just {} }) = True+ has_extra_constraints_wildcard _ = False++{- Note [Constraints in partial type signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have decided to quantify over min_theta, say (Eq a, C a, Ix a).+Then we distinguish three cases:++(P1) No partial type signatures: just quantify over min_theta++(P2) Partial type signatures with no extra_constraints wildcard:+ e.g. f :: (Eq a, C a) => a -> _+ Quantify over psig_theta: the user has explicitly specified the+ entire context.++ That may mean we have an unsolved residual constraint (Ix a) arising+ from the RHS of the function. But so be it: the user said (Eq a, C a).++(P3) Partial type signature with an extra_constraints wildcard.+ e.g. f :: (Eq a, C a, _) => a -> a+ Quantify over (psig_theta ++ diff)+ where diff = min_theta - psig_theta, using findInferredDiff.+ In our example, diff = Ix a++Some rationale and observations++* See Note [When the MR applies] in GHC.Tc.Gen.Bind.++* We always want to quantify over psig_theta (if present). The user specified+ it! And pickQuantifiableCandidates might have dropped some+ e.g. CallStack constraints. c.f #14658+ equalities (a ~ Bool)++* In case (P3) we ask that /all/ the signatures have an extra-constraints+ wildcard. It's a bit arbitrary; not clear what the "right" thing is.++* In (P2) we encounter #20076:+ f :: Eq [a] => a -> _+ f x = [x] == [x]+ From the RHS we get [W] Eq [a]. We simplify those Wanteds in simplifyInfer,+ to get (Eq a). But then we quantify over the user-specified (Eq [a]), leaving+ a residual implication constraint (forall a. Eq [a] => [W] Eq a), which is+ insoluble. Idea: in simplifyInfer we could put the /un-simplified/ constraints+ in the residual -- at least in the case like #20076 where the partial signature+ fully specifies the final constraint. Maybe: a battle for another day.++* It's helpful to use the same "find difference" algorithm, `findInferredDiff`,+ here as we use in GHC.Tc.Gen.Bind.chooseInferredQuantifiers (#20921)++ At least for single functions we would like to quantify f over precisely the+ same theta as <quant-theta>, so that we get to take the short-cut path in+ `GHC.Tc.Gen.Bind.mkExport`, and avoid calling `tcSubTypeSigma` for impedance+ matching. Why avoid? Because it falls over for ambiguous types (#20921).++ We can get precisely the same theta by using the same algorithm,+ `findInferredDiff`.++* All of this goes wrong if we have (a) mutual recursion, (b) multiple+ partial type signatures, (c) with different constraints, and (d)+ ambiguous types. Something like+ f :: forall a. Eq a => F a -> _+ f x = (undefined :: a) == g x undefined+ g :: forall b. Show b => F b -> _ -> b+ g x y = let _ = (f y, show x) in x+ But that's a battle for another day.+-}++decidePromotedTyVars :: InferMode+ -> [(Name,TcType)]+ -> [TcIdSigInst]+ -> [PredType]+ -> TcM ([PredType], CoVarSet, TcTyVarSet)+-- We are about to generalise over type variables at level N+-- Each must be either+-- (P) promoted+-- (D) defaulted+-- (Q) quantified+-- This function finds (P), the type variables that we are going to promote:+-- (a) Mentioned in a constraint we can't generalise (the MR)+-- (b) Mentioned in the kind of a CoVar; we can't quantify over a CoVar,+-- so we must not quantify over a type variable free in its kind+-- (c) Connected by an equality or fundep to+-- * a type variable at level < N, or+-- * A tyvar subject to (a), (b) or (c)+-- Having found all such level-N tyvars that we can't generalise,+-- promote them, to eliminate them from further consideration.+--+-- Also return CoVars that appear free in the final quantified types+-- we can't quantify over these, and we must make sure they are in scope+decidePromotedTyVars infer_mode name_taus psigs candidates+ = do { tc_lvl <- TcM.getTcLevel+ ; (no_quant, maybe_quant) <- pick infer_mode candidates++ -- If possible, we quantify over partial-sig qtvs, so they are+ -- not mono. Need to zonk them because they are meta-tyvar TyVarTvs+ ; (psig_qtvs, psig_theta, taus) <- TcM.liftZonkM $+ do { psig_qtvs <- zonkTcTyVarsToTcTyVars $ binderVars $+ concatMap (map snd . sig_inst_skols) psigs+ ; psig_theta <- mapM TcM.zonkTcType $+ concatMap sig_inst_theta psigs+ ; taus <- mapM (TcM.zonkTcType . snd) name_taus+ ; return (psig_qtvs, psig_theta, taus) }++ ; let psig_tys = mkTyVarTys psig_qtvs ++ psig_theta++ -- (b) 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+ -- Recall that coVarsOfTypes also returns coercion holes+ co_vars = coVarsOfTypes (psig_tys ++ taus ++ candidates)+ co_var_tvs = closeOverKinds co_vars++ mono_tvs0 = filterVarSet (not . isQuantifiableTv tc_lvl) $+ tyCoVarsOfTypes candidates+ -- We need to grab all the non-quantifiable tyvars in the+ -- types so that we can grow this set to find other+ -- non-quantifiable tyvars. This can happen with something like+ -- f x y = ...+ -- where z = x 3+ -- The body of z tries to unify the type of x (call it alpha[1])+ -- with (beta[2] -> gamma[2]). This unification fails because+ -- alpha is untouchable, leaving [W] alpha[1] ~ (beta[2] -> gamma[2]).+ -- We need to know not to quantify over beta or gamma, because they+ -- are in the equality constraint with alpha. Actual test case:+ -- typecheck/should_compile/tc213++ mono_tvs1 = mono_tvs0 `unionVarSet` co_var_tvs++ -- mono_tvs1 is now the set of variables from an outer scope+ -- (that's mono_tvs0) and the set of covars, closed over kinds.+ -- Given this set of variables we know we will not quantify,+ -- we want to find any other variables that are determined by this+ -- set, by functional dependencies or equalities. We thus use+ -- closeWrtFunDeps to find all further variables determined by this root+ -- set. See Note [growThetaTyVars vs closeWrtFunDeps]++ non_ip_candidates = filterOut isIPLikePred candidates+ -- implicit params don't really determine a type variable+ -- (that is, we might have IP "c" Bool and IP "c" Int in different+ -- places within the same program), and+ -- skipping this causes implicit params to monomorphise too many+ -- variables; see Note [Inheriting implicit parameters] in GHC.Tc.Solver.+ -- Skipping causes typecheck/should_compile/tc219 to fail.++ mono_tvs2 = closeWrtFunDeps non_ip_candidates mono_tvs1+ -- mono_tvs2 now contains any variable determined by the "root+ -- set" of monomorphic tyvars in mono_tvs1.++ constrained_tvs = filterVarSet (isQuantifiableTv tc_lvl) $+ closeWrtFunDeps non_ip_candidates (tyCoVarsOfTypes no_quant)+ `minusVarSet` mono_tvs2+ -- constrained_tvs: the tyvars that we are not going to+ -- quantify /solely/ because of the monomorphism restriction+ --+ -- (`minusVarSet` mono_tvs2): a type variable is only+ -- "constrained" (so that the MR bites) if it is not+ -- free in the environment (#13785) or is determined+ -- by some variable that is free in the env't++ mono_tvs = (mono_tvs2 `unionVarSet` constrained_tvs)+ `delVarSetList` psig_qtvs+ -- (`delVarSetList` psig_qtvs): if the user has explicitly+ -- asked for quantification, then that request "wins"+ -- over the MR.+ --+ -- What if a psig variable is also free in the environment+ -- (i.e. says "no" to isQuantifiableTv)? That's OK: explanation+ -- in Step 2 of Note [Deciding quantification].++ -- Warn about the monomorphism restriction+ ; when (case infer_mode of { ApplyMR -> True; _ -> False}) $ do+ let dia = TcRnMonomorphicBindings (map fst name_taus)+ diagnosticTc (constrained_tvs `intersectsVarSet` tyCoVarsOfTypes taus) dia++ -- Promote the mono_tvs: see Note [Promote monomorphic tyvars]+ ; _ <- promoteTyVarSet mono_tvs++ ; traceTc "decidePromotedTyVars" $ vcat+ [ text "infer_mode =" <+> ppr infer_mode+ , text "psigs =" <+> ppr psigs+ , text "psig_qtvs =" <+> ppr psig_qtvs+ , text "mono_tvs0 =" <+> ppr mono_tvs0+ , text "no_quant =" <+> ppr no_quant+ , text "maybe_quant =" <+> ppr maybe_quant+ , text "mono_tvs =" <+> ppr mono_tvs+ , text "co_vars =" <+> ppr co_vars ]++ ; return (maybe_quant, co_vars, mono_tvs0) }+ where+ pick :: InferMode -> [PredType] -> TcM ([PredType], [PredType])+ -- Split the candidates into ones we definitely+ -- won't quantify, and ones that we might+ pick ApplyMR cand = return (cand, [])+ pick NoRestrictions cand = return ([], cand)+ pick EagerDefaulting cand = do { os <- xoptM LangExt.OverloadedStrings+ ; return (partition (is_int_ct os) cand) }++ -- is_int_ct returns True for a constraint we should /not/ quantify+ -- For EagerDefaulting, do not quantify over+ -- over any interactive class constraint+ is_int_ct ovl_strings pred+ = case classifyPredType pred of+ ClassPred cls _ -> isInteractiveClass ovl_strings cls+ _ -> False++-------------------+defaultTyVarsAndSimplify :: TcLevel+ -> [PredType] -- Assumed zonked+ -> TcM [PredType] -- Guaranteed zonked+-- Default any tyvar free in the constraints;+-- and re-simplify in case the defaulting allows further simplification+defaultTyVarsAndSimplify rhs_tclvl candidates+ = do { -- Default any kind/levity vars+ ; DV {dv_kvs = cand_kvs, dv_tvs = cand_tvs}+ <- candidateQTyVarsOfTypes candidates+ -- NB1: decidePromotedTyVars has promoted any type variable fixed by the+ -- type envt, so they won't be chosen by candidateQTyVarsOfTypes+ -- NB2: Defaulting for variables free in tau_tys is done later, by quantifyTyVars+ -- Hence looking only at 'candidates'+ -- NB3: Any covars should already be handled by+ -- the logic in decidePromotedTyVars, which looks at+ -- the constraints generated++ ; poly_kinds <- xoptM LangExt.PolyKinds+ ; let default_kv | poly_kinds = default_tv+ | otherwise = defaultTyVar DefaultKindVars+ default_tv = defaultTyVar (NonStandardDefaulting DefaultNonStandardTyVars)+ ; mapM_ default_kv (dVarSetElems cand_kvs)+ ; mapM_ default_tv (dVarSetElems (cand_tvs `minusDVarSet` cand_kvs))++ ; simplify_cand candidates+ }+ where+ -- See Note [Unconditionally resimplify constraints when quantifying]+ simplify_cand [] = return [] -- Fast path+ simplify_cand candidates+ = do { clone_wanteds <- newWanteds DefaultOrigin candidates+ ; WC { wc_simple = simples } <- setTcLevel rhs_tclvl $+ simplifyWantedsTcM clone_wanteds+ -- Discard evidence; simples is fully zonked++ ; let new_candidates = ctsPreds simples+ ; traceTc "Simplified after defaulting" $+ vcat [ text "Before:" <+> ppr candidates+ , text "After:" <+> ppr new_candidates ]+ ; return new_candidates }++------------------+decideQuantifiedTyVars+ :: SkolemInfo+ -> [(Name,TcType)] -- Annotated theta and (name,tau) pairs+ -> [TcIdSigInst] -- Partial signatures+ -> [PredType] -- Candidates, zonked+ -> TcM [TyVar]+-- Fix what tyvars we are going to quantify over, and quantify them+decideQuantifiedTyVars skol_info name_taus psigs candidates+ = do { -- Why psig_tys? We try to quantify over everything free in here+ -- See Note [Quantification and partial signatures]+ -- Wrinkles 2 and 3+ ; (psig_tv_tys, psig_theta, tau_tys) <- TcM.liftZonkM $+ do { psig_tv_tys <- mapM TcM.zonkTcTyVar [ tv | sig <- psigs+ , (_,Bndr tv _) <- sig_inst_skols sig ]+ ; psig_theta <- mapM TcM.zonkTcType [ pred | sig <- psigs+ , pred <- sig_inst_theta sig ]+ ; tau_tys <- mapM (TcM.zonkTcType . snd) name_taus+ ; return (psig_tv_tys, psig_theta, tau_tys) }++ ; let -- Try to quantify over variables free in these types+ psig_tys = psig_tv_tys ++ psig_theta+ seed_tys = psig_tys ++ tau_tys++ -- Now "grow" those seeds to find ones reachable via 'candidates'+ -- See Note [growThetaTyVars vs closeWrtFunDeps]+ grown_tcvs = growThetaTyVars candidates (tyCoVarsOfTypes seed_tys)++ -- Now we have to classify them into kind variables and type variables+ -- (sigh) just for the benefit of -XNoPolyKinds; see quantifyTyVars+ --+ -- Keep the psig_tys first, so that candidateQTyVarsOfTypes produces+ -- them in that order, so that the final qtvs quantifies in the same+ -- order as the partial signatures do (#13524)+ ; dv@DV {dv_kvs = cand_kvs, dv_tvs = cand_tvs} <- candidateQTyVarsOfTypes $+ psig_tys ++ candidates ++ tau_tys+ ; let pick = (`dVarSetIntersectVarSet` grown_tcvs)+ dvs_plus = dv { dv_kvs = pick cand_kvs, dv_tvs = pick cand_tvs }++ ; traceTc "decideQuantifiedTyVars" (vcat+ [ text "tau_tys =" <+> ppr tau_tys+ , text "candidates =" <+> ppr candidates+ , text "cand_kvs =" <+> ppr cand_kvs+ , text "cand_tvs =" <+> ppr cand_tvs+ , text "tau_tys =" <+> ppr tau_tys+ , text "seed_tys =" <+> ppr seed_tys+ , text "seed_tcvs =" <+> ppr (tyCoVarsOfTypes seed_tys)+ , text "grown_tcvs =" <+> ppr grown_tcvs+ , text "dvs =" <+> ppr dvs_plus])++ ; quantifyTyVars skol_info DefaultNonStandardTyVars dvs_plus }++------------------+-- | When inferring types, should we quantify over a given predicate?+-- See Note [pickQuantifiablePreds]+pickQuantifiablePreds+ :: TyVarSet -- Quantifying over these+ -> TcTyVarSet -- mono_tvs0: variables mentioned a candidate+ -- constraint that come from some outer level+ -> TcThetaType -- Proposed constraints to quantify+ -> TcM TcThetaType -- A subset that we can actually quantify+-- This function decides whether a particular constraint should be+-- quantified over, given the type variables that are being quantified+pickQuantifiablePreds qtvs mono_tvs0 theta+ = do { tc_lvl <- TcM.getTcLevel+ ; let is_nested = not (isTopTcLevel tc_lvl)+ ; return (mkMinimalBySCs id $ -- See Note [Minimize by Superclasses]+ mapMaybe (pick_me is_nested) theta) }+ where+ pick_me is_nested pred+ = let pred_tvs = tyCoVarsOfType pred+ mentions_qtvs = pred_tvs `intersectsVarSet` qtvs+ in case classifyPredType pred of++ ClassPred cls tys+ | Just {} <- isCallStackPred cls tys+ -- NEVER infer a CallStack constraint. Otherwise we let+ -- the constraints bubble up to be solved from the outer+ -- context, or be defaulted when we reach the top-level.+ -- See Note [Overview of implicit CallStacks] in GHC.Tc.Types.Evidence+ -> Nothing++ | isIPClass cls+ -> Just pred -- See Note [Inheriting implicit parameters]++ | not mentions_qtvs+ -> Nothing -- Don't quantify over predicates that don't+ -- mention any of the quantified type variables++ | is_nested+ -> Just pred++ -- From here on, we are thinking about top-level defns only++ | pred_tvs `subVarSet` (qtvs `unionVarSet` mono_tvs0)+ -- See Note [Do not quantify over constraints that determine a variable]+ -> Just pred++ | otherwise+ -> Nothing++ EqPred eq_rel ty1 ty2+ | mentions_qtvs+ , quantify_equality eq_rel ty1 ty2+ , Just (cls, tys) <- boxEqPred eq_rel ty1 ty2+ -- boxEqPred: See Note [Lift equality constraints when quantifying]+ -> Just (mkClassPred cls tys)+ | otherwise+ -> Nothing++ IrredPred {} | mentions_qtvs -> Just pred+ | otherwise -> Nothing++ ForAllPred {} -> Nothing++ -- See Note [Quantifying over equality constraints]+ quantify_equality NomEq ty1 ty2 = quant_fun ty1 || quant_fun ty2+ quantify_equality ReprEq _ _ = True++ quant_fun ty+ = case tcSplitTyConApp_maybe ty of+ Just (tc, tys) | isTypeFamilyTyCon tc+ -> tyCoVarsOfTypes tys `intersectsVarSet` qtvs+ _ -> False++------------------+growThetaTyVars :: ThetaType -> TyCoVarSet -> TyCoVarSet+-- See Note [growThetaTyVars vs closeWrtFunDeps]+growThetaTyVars theta tcvs+ | null theta = tcvs+ | otherwise = transCloVarSet mk_next seed_tcvs+ where+ seed_tcvs = tcvs `unionVarSet` tyCoVarsOfTypes ips+ (ips, non_ips) = partition isIPLikePred theta+ -- See Note [Inheriting implicit parameters]++ mk_next :: VarSet -> VarSet -- Maps current set to newly-grown ones+ mk_next so_far = foldr (grow_one so_far) emptyVarSet non_ips+ grow_one so_far pred tcvs+ | pred_tcvs `intersectsVarSet` so_far = tcvs `unionVarSet` pred_tcvs+ | otherwise = tcvs+ where+ pred_tcvs = tyCoVarsOfType pred+++{- Note [Promote monomorphic tyvars]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Promote any type variables that are free in the environment. Eg+ f :: forall qtvs. bound_theta => zonked_tau+The free vars of f's type become free in the envt, and hence will show+up whenever 'f' is called. They may currently at rhs_tclvl, but they+had better be unifiable at the outer_tclvl! Example: envt mentions+alpha[1]+ tau_ty = beta[2] -> beta[2]+ constraints = alpha ~ [beta]+we don't quantify over beta (since it is fixed by envt)+so we must promote it! The inferred type is just+ f :: beta -> beta++NB: promoteTyVarSet ignores coercion variables++Note [pickQuantifiablePreds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When pickQuantifiablePreds is called we have decided what type+variables to quantify over, `qtvs`. The only quesion is: which of the+unsolved candidate predicates should we quantify over? Call them+`picked_theta`.++Note that will leave behind a residual implication+ forall qtvs. picked_theta => unsolved_constraints+For the members of unsolved_constraints that we select for picked_theta+it is easy to solve, by identity. For the others we just hope that+we can solve them.++So which of the candidates should we pick to quantify over? In some+situations we distinguish top-level from nested bindings. The point+about nested binding is that+ (a) the types may mention type variables free in the environment+ (b) all of the call sites are statically visible, reducing the+ worries about "spooky action at a distance".++First, never pick a constraint that doesn't mention any of the quantified+variables `qtvs`. Picking such a constraint essentially moves the solving of+the constraint from this function definition to call sites. But because the+constraint mentions no quantified variables, call sites have no advantage+over the definition site. Well, not quite: there could be new constraints+brought into scope by a pattern-match against a constrained (e.g. GADT)+constructor. Example++ data T a where { T1 :: T1 Bool; ... }++ f :: forall a. a -> T a -> blah+ f x t = let g y = x&&y -- This needs a~Bool+ in case t of+ T1 -> g True+ ....++At g's call site we have `a~Bool`, so we /could/ infer+ g :: forall . (a~Bool) => Bool -> Bool -- qtvs = {}++This is all very contrived, and probably just postponse type errors to+the call site. If that's what you want, write a type signature.++Actually, implicit parameters is an exception to the "no quantified vars"+rule (see Note [Inheriting implicit parameters]) so we can't actually+simply test this case first.++Now we consider the different sorts of constraints:++* For ClassPred constraints:++ * Never pick a CallStack constraint.+ See Note [Overview of implicit CallStacks]++ * Always pick an implicit-parameter constraint.+ Note [Inheriting implicit parameters]++ * For /top-level/ class constraints see+ Note [Do not quantify over constraints that determine a variable]++* For EqPred constraints see Note [Quantifying over equality constraints]++* For IrredPred constraints, we allow anything that mentions the quantified+ type variables.++* A ForAllPred should not appear: the candidates come from approximateWC.++Notice that we do /not/ consult -XFlexibleContexts here. For example,+we allow `pickQuantifiablePreds` to quantify over a constraint like+`Num [a]`; then if we don't have `-XFlexibleContexts` we'll get an+error from `checkValidType` but (critically) it includes the helpful+suggestion of adding `-XFlexibleContexts`. See #10608, #10351.++Note [Lift equality constraints when quantifying]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We can't quantify over a constraint (t1 ~# t2) because that isn't a+predicate type; see Note [Types for coercions, predicates, and evidence]+in GHC.Core.TyCo.Rep.++So we have to 'lift' it to (t1 ~ t2). Similarly (~R#) must be lifted+to Coercible.++This tiresome lifting is the reason that pick_me (in+pickQuantifiablePreds) returns a Maybe rather than a Bool.++Note [Inheriting implicit parameters]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider this:++ f x = (x::Int) + ?y++where f is *not* a top-level binding.+From the RHS of f we'll get the constraint (?y::Int).+There are two types we might infer for f:++ f :: Int -> Int++(so we get ?y from the context of f's definition), or++ f :: (?y::Int) => Int -> Int++At first you might think the first was better, because then+?y behaves like a free variable of the definition, rather than+having to be passed at each call site. But of course, the WHOLE+IDEA is that ?y should be passed at each call site (that's what+dynamic binding means) so we'd better infer the second.++BOTTOM LINE: when *inferring types* you must quantify over implicit+parameters, *even if* they don't mention the bound type variables.+Reason: because implicit parameters, uniquely, have local instance+declarations. See pickQuantifiablePreds.++Note [Quantifying over equality constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Should we quantify over an equality constraint (s ~ t)+in pickQuantifiablePreds?++* It is always /sound/ to quantify over a constraint -- those+ quantified constraints will need to be proved at each call site.++* We definitely don't want to quantify over (Maybe a ~ Bool), to get+ f :: forall a. (Maybe a ~ Bool) => blah+ That simply postpones a type error from the function definition site to+ its call site. Fortunately we have already filtered out insoluble+ constraints: see `definite_error` in `simplifyInfer`.++* What about (a ~ T alpha b), where we are about to quantify alpha, `a` and+ `b` are in-scope skolems, and `T` is a data type. It's pretty unlikely+ that this will be soluble at a call site, so we don't quantify over it.++* What about `(F beta ~ Int)` where we are going to quantify `beta`?+ Should we quantify over the (F beta ~ Int), to get+ f :: forall b. (F b ~ Int) => blah+ Aha! Perhaps yes, because at the call site we will instantiate `b`, and+ perhaps we have `instance F Bool = Int`. So we *do* quantify over a+ type-family equality where the arguments mention the quantified variables.++This is all a bit ad-hoc.++Note [Do not quantify over constraints that determine a variable]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (typecheck/should_compile/tc231), where we're trying to infer+the type of a top-level declaration. We have+ class Zork s a b | a -> b+and the candidate constraint at the end of simplifyInfer is+ [W] Zork alpha[1] (Z [Char]) beta[1]+We definitely want to quantify over `alpha` (which is mentioned in the+tau-type).++But we do *not* want to quantify over `beta`: it is determined by the+functional dependency on Zork: note that the second argument to Zork+in the Wanted is a variable-free `Z [Char]`. Quantifying over it+would be "Henry Ford polymorphism". (Presumably we don't have an+instance in scope that tells us what `beta` actually is.) Instead+we promote `beta[1]` to `beta[0]`, in `decidePromotedTyVars`.++The question here: do we want to quantify over the constraint, to+give the type+ forall a. Zork a (Z [Char]) beta[0] => blah+Definitely not. Since we're not quantifying over beta, it has been+promoted; and then will be zapped to Any in the final zonk. So we end+up with a (perhaps exported) type involving+ forall a. Zork a (Z [Char]) Any => blah+No no no:++ Key principle: we never want to show the programmer+ a type with `Any` in it.++What we really want (to catch the Zork example) is this:++ Quantify over the constraint only if all its free variables are+ (a) quantified, or+ (b) appears in the type of something in the environment (mono_tvs0).++To understand (b) consider++ class C a b where { op :: a -> b -> () }++ mr = 3 -- mr :: alpha+ f1 x = op x mr -- f1 :: forall b. b -> (), plus [W] C b alpha+ intify = mr + (4 :: Int)++In `f1` should we quantify over that `(C b alpha)`? Answer: since `alpha`+is free in the type envt, yes we should. After all, if we'd typechecked+`intify` first, we'd have set `alpha := Int`, and /then/ we'd certainly+quantify. The delicate Zork situation applies when beta is completely+unconstrained (not free in the environment) -- except by the fundep.++Another way to put it: let's say `alpha` is in `mono_tvs0`. It must be that+some variable `x` has `alpha` free in its type. If we are at top-level (and we+are, because nested decls don't go through this path all), then `x` must also+be at top-level. And, by induction, `x` will not have Any in its type when all+is said and done. The induction is well-founded because, if `x` is mutually+recursive with the definition at hand, then their constraints get processed+together (or `x` has a type signature, in which case the type doesn't have+`Any`). So the key thing is that we must not introduce a new top-level+unconstrained variable here.++However this regrettably-subtle reasoning is needed only for /top-level/+declarations. For /nested/ decls we can see all the calls, so we'll+instantiate that quantifed `Zork a (Z [Char]) beta` constraint at call sites,+and either solve it or not (probably not). We won't be left with a+still-callable function with Any in its type. So for nested definitions we+don't make this tricky test.++Historical note: we had a different, and more complicated test+before, but it was utterly wrong: #23199.++Note [Quantification and partial signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When choosing type variables to quantify, the basic plan is to+quantify over all type variables that are+ * free in the tau_tvs, and+ * not forced to be monomorphic (mono_tvs),+ for example by being free in the environment.++However, in the case of a partial type signature, we are doing inference+*in the presence of a type signature*. For example:+ f :: _ -> a+ f x = ...+or+ g :: (Eq _a) => _b -> _b+In both cases we use plan InferGen, and hence call simplifyInfer. But+those 'a' variables are skolems (actually TyVarTvs), and we should be+sure to quantify over them. This leads to several wrinkles:++* Wrinkle 1. In the case of a type error+ f :: _ -> Maybe a+ f x = True && x+ The inferred type of 'f' is f :: Bool -> Bool, but there's a+ left-over error of form (Maybe a ~ Bool). The error-reporting+ machine expects to find a binding site for the skolem 'a', so we+ add it to the quantified tyvars.++* Wrinkle 2. Consider the partial type signature+ f :: (Eq _) => Int -> Int+ f x = x+ In normal cases that makes sense; e.g.+ g :: Eq _a => _a -> _a+ g x = x+ where the signature makes the type less general than it could+ be. But for 'f' we must therefore quantify over the user-annotated+ constraints, to get+ f :: forall a. Eq a => Int -> Int+ (thereby correctly triggering an ambiguity error later). If we don't+ we'll end up with a strange open type+ f :: Eq alpha => Int -> Int+ which isn't ambiguous but is still very wrong.++ Bottom line: Try to quantify over any variable free in psig_theta,+ just like the tau-part of the type.++* Wrinkle 3 (#13482). Also consider+ f :: forall a. _ => Int -> Int+ f x = if (undefined :: a) == undefined then x else 0+ Here we get an (Eq a) constraint, but it's not mentioned in the+ psig_theta nor the type of 'f'. But we still want to quantify+ over 'a' even if the monomorphism restriction is on.++* Wrinkle 4 (#14479)+ foo :: Num a => a -> a+ foo xxx = g xxx+ where+ g :: forall b. Num b => _ -> b+ g y = xxx + y++ In the signature for 'g', we cannot quantify over 'b' because it turns out to+ get unified with 'a', which is free in g's environment. So we carefully+ refrain from bogusly quantifying, in GHC.Tc.Solver.decidePromotedTyVars. We+ report the error later, in GHC.Tc.Gen.Bind.chooseInferredQuantifiers.++Note [growThetaTyVars vs closeWrtFunDeps]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+GHC has two functions, growThetaTyVars and closeWrtFunDeps, both with+the same type and similar behavior. This Note outlines the differences+and why we use one or the other.++Both functions take a list of constraints. We will call these the+*candidates*.++closeWrtFunDeps takes a set of "determined" type variables and finds the+closure of that set with respect to the functional dependencies+within the class constraints in the set of candidates. So, if we+have++ class C a b | a -> b+ class D a b -- no fundep+ candidates = {C (Maybe a) (Either b c), D (Maybe a) (Either d e)}++then closeWrtFunDeps {a} will return the set {a,b,c}.+This is because, if `a` is determined, then `b` and `c` are, too,+by functional dependency. closeWrtFunDeps called with any seed set not including+`a` will just return its argument, as only `a` determines any other+type variable (in this example).++growThetaTyVars operates similarly, but it behaves as if every+constraint has a functional dependency among all its arguments.+So, continuing our example, growThetaTyVars {a} will return+{a,b,c,d,e}. Put another way, growThetaTyVars grows the set of+variables to include all variables that are mentioned in the same+constraint (transitively).++We use closeWrtFunDeps in places where we need to know which variables are+*always* determined by some seed set. This includes+ * when determining the mono-tyvars in decidePromotedTyVars. If `a`+ is going to be monomorphic, we need b and c to be also: they+ are determined by the choice for `a`.+ * when checking instance coverage, in+ GHC.Tc.Instance.FunDeps.checkInstCoverage++On the other hand, we use growThetaTyVars where we need to know+which variables *might* be determined by some seed set. This includes+ * deciding quantification (GHC.Tc.Gen.Bind.chooseInferredQuantifiers+ and decideQuantifiedTyVars+How can `a` determine (say) `d` in the example above without a fundep?+Suppose we have+ instance (b ~ a, c ~ a) => D (Maybe [a]) (Either b c)+Now, if `a` turns out to be a list, it really does determine b and c.+The danger in overdoing quantification is the creation of an ambiguous+type signature, but this is conveniently caught in the validity checker.++Note [Quantification with errors]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If we find that the RHS of the definition has some absolutely-insoluble+constraints (including especially "variable not in scope"), we++* Abandon all attempts to find a context to quantify over,+ and instead make the function fully-polymorphic in whatever+ type we have found++* Return a flag from simplifyInfer, indicating that we found an+ insoluble constraint. This flag is used to suppress the ambiguity+ check for the inferred type, which may well be bogus, and which+ tends to obscure the real error. This fix feels a bit clunky,+ but I failed to come up with anything better.++Reasons:+ - Avoid downstream errors+ - Do not perform an ambiguity test on a bogus type, which might well+ fail spuriously, thereby obfuscating the original insoluble error.+ #14000 is an example++I tried an alternative approach: simply failM, after emitting the+residual implication constraint; the exception will be caught in+GHC.Tc.Gen.Bind.tcPolyBinds, which gives all the binders in the group the type+(forall a. a). But that didn't work with -fdefer-type-errors, because+the recovery from failM emits no code at all, so there is no function+to run! But -fdefer-type-errors aspires to produce a runnable program.++Note [Default while Inferring]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Our current plan is that defaulting only happens at simplifyTop and+not simplifyInfer. This may lead to some insoluble deferred constraints.+Example:++instance D g => C g Int b++constraint inferred = (forall b. 0 => C gamma alpha b) /\ Num alpha+type inferred = gamma -> gamma++Now, if we try to default (alpha := Int) we will be able to refine the implication to+ (forall b. 0 => C gamma Int b)+which can then be simplified further to+ (forall b. 0 => D gamma)+Finally, we /can/ approximate this implication with (D gamma) and infer the quantified+type: forall g. D g => g -> g++Instead what will currently happen is that we will get a quantified type+(forall g. g -> g) and an implication:+ forall g. 0 => (forall b. 0 => C g alpha b) /\ Num alpha++Which, even if the simplifyTop defaults (alpha := Int) we will still be left with an+unsolvable implication:+ forall g. 0 => (forall b. 0 => D g)++The concrete example would be:+ h :: C g a s => g -> a -> ST s a+ f (x::gamma) = (\_ -> x) (runST (h x (undefined::alpha)) + 1)++But it is quite tedious to do defaulting and resolve the implication constraints, and+we have not observed code breaking because of the lack of defaulting in inference, so+we don't do it for now.++++Note [Minimize by Superclasses]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we quantify over a constraint, in simplifyInfer we need to+quantify over a constraint that is minimal in some sense: For+instance, if the final wanted constraint is (Eq alpha, Ord alpha),+we'd like to quantify over Ord alpha, because we can just get Eq alpha+from superclass selection from Ord alpha. This minimization is what+mkMinimalBySCs does. Then, simplifyInfer uses the minimal constraint+to check the original wanted.+++Note [Avoid unnecessary constraint simplification]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ -------- NB NB NB (Jun 12) -------------+ This note not longer applies; see the notes with #4361.+ But I'm leaving it in here so we remember the issue.)+ ----------------------------------------+When inferring the type of a let-binding, with simplifyInfer,+try to avoid unnecessarily simplifying class constraints.+Doing so aids sharing, but it also helps with delicate+situations like++ instance C t => C [t] where ..++ f :: C [t] => ....+ f x = let g y = ...(constraint C [t])...+ in ...+When inferring a type for 'g', we don't want to apply the+instance decl, because then we can't satisfy (C t). So we+just notice that g isn't quantified over 't' and partition+the constraints before simplifying.++This only half-works, but then let-generalisation only half-works.++*********************************************************************************+* *+* Main Simplifier *+* *+***********************************************************************************++-}++simplifyWantedsTcM :: [CtEvidence] -> TcM WantedConstraints+-- Solve the specified Wanted constraints+-- Discard the evidence binds+-- Postcondition: fully zonked+simplifyWantedsTcM wanted+ = do { traceTc "simplifyWantedsTcM {" (ppr wanted)+ ; (result, _) <- runTcS (solveWanteds (mkSimpleWC wanted))+ ; result <- TcM.liftZonkM $ TcM.zonkWC result+ ; traceTc "simplifyWantedsTcM }" (ppr result)+ ; return result }++solveWanteds :: WantedConstraints -> TcS WantedConstraints+solveWanteds wc@(WC { wc_errors = errs })+ | isEmptyWC wc -- Fast path+ = return wc+ | otherwise+ = do { cur_lvl <- TcS.getTcLevel+ ; traceTcS "solveWanteds {" $+ vcat [ text "Level =" <+> ppr cur_lvl+ , ppr wc ]++ ; dflags <- getDynFlags+ ; solved_wc <- simplify_loop 0 (solverIterations dflags) True wc++ ; errs' <- simplifyDelayedErrors errs+ ; let final_wc = solved_wc { wc_errors = errs' }++ ; ev_binds_var <- getTcEvBindsVar+ ; bb <- TcS.getTcEvBindsMap ev_binds_var+ ; traceTcS "solveWanteds }" $+ vcat [ text "final wc =" <+> ppr final_wc+ , text "current evbinds =" <+> ppr (evBindMapBinds bb) ]++ ; return final_wc }++simplify_loop :: Int -> IntWithInf -> Bool+ -> WantedConstraints -> TcS WantedConstraints+-- Do a round of solving, and call maybe_simplify_again to iterate+-- The 'definitely_redo_implications' flags is False if the only reason we+-- are iterating is that we have added some new Wanted superclasses+-- hoping for fundeps to help us; see Note [Superclass iteration]+--+-- Does not affect wc_holes at all; reason: wc_holes never affects anything+-- else, so we do them once, at the end in solveWanteds+simplify_loop n limit definitely_redo_implications+ wc@(WC { wc_simple = simples, wc_impl = implics })+ = do { csTraceTcS $+ text "simplify_loop iteration=" <> int n+ <+> (parens $ hsep [ text "definitely_redo =" <+> ppr definitely_redo_implications <> comma+ , int (lengthBag simples) <+> text "simples to solve" ])+ ; traceTcS "simplify_loop: wc =" (ppr wc)++ ; (unifs1, wc1) <- reportUnifications $ -- See Note [Superclass iteration]+ solveSimpleWanteds simples+ -- Any insoluble constraints are in 'simples' and so get rewritten+ -- See Note [Rewrite insolubles] in GHC.Tc.Solver.InertSet++ ; wc2 <- if not definitely_redo_implications -- See Note [Superclass iteration]+ && unifs1 == 0 -- for this conditional+ && isEmptyBag (wc_impl wc1)+ then return (wc { wc_simple = wc_simple wc1 }) -- Short cut+ else do { implics2 <- solveNestedImplications $+ implics `unionBags` (wc_impl wc1)+ ; return (wc { wc_simple = wc_simple wc1+ , wc_impl = implics2 }) }++ ; unif_happened <- resetUnificationFlag+ ; csTraceTcS $ text "unif_happened" <+> ppr unif_happened+ -- Note [The Unification Level Flag] in GHC.Tc.Solver.Monad+ ; maybe_simplify_again (n+1) limit unif_happened wc2 }++maybe_simplify_again :: Int -> IntWithInf -> Bool+ -> WantedConstraints -> TcS WantedConstraints+maybe_simplify_again n limit unif_happened 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+ -- (an unsolved constraint), and we don't want that error to suppress+ -- the iteration limit warning!+ addErrTcS $ TcRnSimplifierTooManyIterations simples limit wc+ ; return wc }++ | unif_happened+ = simplify_loop n limit True wc++ | 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+ ; traceTcS "maybe_simplify_again" (vcat [ text "pending_given" <+> ppr pending_given+ , text "new_given" <+> ppr new_given+ , text "pending_wanted" <+> ppr pending_wanted+ , text "new_wanted" <+> ppr new_wanted ])+ ; simplify_loop n limit (not (null pending_given)) $+ wc { wc_simple = simples1 `unionBags` listToBag new_wanted } } }+ -- (not (null pending_given)): see Note [Superclass iteration]++ | otherwise+ = return wc++{- Note [Superclass iteration]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider this implication constraint+ forall a.+ [W] d: C Int beta+ forall b. blah+where+ class D a b | a -> b+ class D a b => C a b+We will expand d's superclasses, giving [W] D Int beta, in the hope of geting+fundeps to unify beta. Doing so is usually fruitless (no useful fundeps),+and if so it seems a pity to waste time iterating the implications (forall b. blah)+(If we add new Given superclasses it's a different matter: it's really worth looking+at the implications.)++Hence the definitely_redo_implications flag to simplify_loop. It's usually+True, but False in the case where the only reason to iterate is new Wanted+superclasses. In that case we check whether the new Wanteds actually led to+any new unifications, and iterate the implications only if so.+-}++{- Note [Expanding Recursive Superclasses and ExpansionFuel]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider the class declaration (T21909)++ class C [a] => C a where+ foo :: a -> Int++and suppose during type inference we obtain an implication constraint:++ forall a. C a => C [[a]]++To solve this implication constraint, we first expand one layer of the superclass+of Given constraints, but not for Wanted constraints.+(See Note [Eagerly expand given superclasses] and Note [Why adding superclasses can help]+in GHC.Tc.Solver.Dict.) We thus get:++ [G] g1 :: C a+ [G] g2 :: C [a] -- new superclass layer from g1+ [W] w1 :: C [[a]]++Now, we cannot solve `w1` directly from `g1` or `g2` as we may not have+any instances for C. So we expand a layer of superclasses of each Wanteds and Givens+that we haven't expanded yet.+This is done in `maybe_simplify_again`. And we get:++ [G] g1 :: C a+ [G] g2 :: C [a]+ [G] g3 :: C [[a]] -- new superclass layer from g2, can solve w1+ [W] w1 :: C [[a]]+ [W] w2 :: C [[[a]]] -- new superclass layer from w1, not solvable++Now, although we can solve `w1` using `g3` (obtained from expanding `g2`),+we have a new wanted constraint `w2` (obtained from expanding `w1`) that cannot be solved.+We thus make another go at solving in `maybe_simplify_again` by expanding more+layers of superclasses. This looping is futile as Givens will never be able to catch up with Wanteds.++Side Note: In principle we don't actually need to /solve/ `w2`, as it is a superclass of `w1`+but we only expand it to expose any functional dependencies (see Note [The superclass story])+But `w2` is a wanted constraint, so we will try to solve it like any other,+even though ultimately we will discard its evidence.++Solution: Simply bound the maximum number of layers of expansion for+Givens and Wanteds, with ExpansionFuel. Give the Givens more fuel+(say 3 layers) than the Wanteds (say 1 layer). Now the Givens will+win. The Wanteds don't need much fuel: we are only expanding at all+to expose functional dependencies, and wantedFuel=1 means we will+expand a full recursive layer. If the superclass hierarchy is+non-recursive (the normal case) one layer is therefore full expansion.++The default value for wantedFuel = Constants.max_WANTEDS_FUEL = 1.+The default value for givenFuel = Constants.max_GIVENS_FUEL = 3.+Both are configurable via the `-fgivens-fuel` and `-fwanteds-fuel`+compiler flags.++There are two preconditions for the default fuel values:+ (1) default givenFuel >= default wantedsFuel+ (2) default givenFuel < solverIterations++Precondition (1) ensures that we expand givens at least as many times as we expand wanted constraints+preferably givenFuel > wantedsFuel to avoid issues like T21909 while+the precondition (2) ensures that we do not reach the solver iteration limit and fail with a+more meaningful error message (see T19627)++This also applies for quantified constraints; see `-fqcs-fuel` compiler flag and `QCI.qci_pend_sc` field.+-}+++solveNestedImplications :: Bag Implication+ -> TcS (Bag Implication)+-- Precondition: the TcS inerts may contain unsolved simples which have+-- to be converted to givens before we go inside a nested implication.+solveNestedImplications implics+ | isEmptyBag implics+ = return (emptyBag)+ | otherwise+ = do { traceTcS "solveNestedImplications starting {" empty+ ; unsolved_implics <- mapBagM solveImplication implics++ -- ... and we are back in the original TcS inerts+ -- Notice that the original includes the _insoluble_simples so it was safe to ignore+ -- them in the beginning of this function.+ ; traceTcS "solveNestedImplications end }" $+ vcat [ text "unsolved_implics =" <+> ppr unsolved_implics ]++ ; return (catBagMaybes unsolved_implics) }++solveImplication :: Implication -- Wanted+ -> TcS (Maybe Implication) -- Simplified implication (empty or singleton)+-- Precondition: The TcS monad contains an empty worklist and given-only inerts+-- which after trying to solve this implication we must restore to their original value+solveImplication imp@(Implic { ic_tclvl = tclvl+ , ic_binds = ev_binds_var+ , ic_given = given_ids+ , ic_wanted = wanteds+ , ic_info = info+ , ic_status = status })+ | isSolvedStatus status+ = return (Just imp) -- Do nothing++ | otherwise -- Even for IC_Insoluble it is worth doing more work+ -- The insoluble stuff might be in one sub-implication+ -- and other unsolved goals in another; and we want to+ -- solve the latter as much as possible+ = do { inerts <- getInertSet+ ; traceTcS "solveImplication {" (ppr imp $$ text "Inerts" <+> ppr inerts)++ -- commented out; see `where` clause below+ -- ; when debugIsOn check_tc_level++ -- Solve the nested constraints+ ; (has_given_eqs, given_insols, residual_wanted)+ <- nestImplicTcS ev_binds_var tclvl $+ do { let loc = mkGivenLoc tclvl info (ic_env imp)+ givens = mkGivens loc given_ids+ ; solveSimpleGivens givens++ ; residual_wanted <- solveWanteds wanteds++ ; (has_eqs, given_insols) <- getHasGivenEqs tclvl+ -- Call getHasGivenEqs /after/ solveWanteds, because+ -- solveWanteds can augment the givens, via expandSuperClasses,+ -- to reveal given superclass equalities++ ; return (has_eqs, given_insols, residual_wanted) }++ ; traceTcS "solveImplication 2"+ (ppr given_insols $$ ppr residual_wanted)+ ; let final_wanted = residual_wanted `addInsols` given_insols+ -- Don't lose track of the insoluble givens,+ -- which signal unreachable code; put them in ic_wanted++ ; res_implic <- setImplicationStatus (imp { ic_given_eqs = has_given_eqs+ , ic_wanted = final_wanted })++ ; evbinds <- TcS.getTcEvBindsMap ev_binds_var+ ; tcvs <- TcS.getTcEvTyCoVars ev_binds_var+ ; traceTcS "solveImplication end }" $ vcat+ [ text "has_given_eqs =" <+> ppr has_given_eqs+ , text "res_implic =" <+> ppr res_implic+ , text "implication evbinds =" <+> ppr (evBindMapBinds evbinds)+ , text "implication tvcs =" <+> ppr tcvs ]++ ; return res_implic }++ -- TcLevels must be strictly increasing (see (ImplicInv) in+ -- Note [TcLevel invariants] in GHC.Tc.Utils.TcType),+ -- and in fact I think they should always increase one level at a time.++ -- Though sensible, this check causes lots of testsuite failures. It is+ -- remaining commented out for now.+ {-+ check_tc_level = do { cur_lvl <- TcS.getTcLevel+ ; massertPpr (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,+-- setting the ic_status field+-- 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 })+ | assertPpr (not (isSolvedStatus status)) (ppr info) $+ -- Precondition: we only set the status if it is not already solved+ not (isSolvedWC pruned_wc)+ = do { traceTcS "setImplicationStatus(not-all-solved) {" (ppr implic)++ ; implic <- neededEvVars implic++ ; let new_status | insolubleWC pruned_wc = IC_Insoluble+ | otherwise = IC_Unsolved+ new_implic = implic { ic_status = new_status+ , ic_wanted = pruned_wc }++ ; traceTcS "setImplicationStatus(not-all-solved) }" (ppr new_implic)++ ; return $ Just new_implic }++ | otherwise -- Everything is solved+ -- Set status to IC_Solved,+ -- and compute the dead givens and outer needs+ -- See Note [Tracking redundant constraints]+ = do { traceTcS "setImplicationStatus(all-solved) {" (ppr implic)++ ; implic@(Implic { ic_need_inner = need_inner+ , ic_need_outer = need_outer }) <- neededEvVars implic++ ; bad_telescope <- checkBadTelescope implic++ ; let warn_givens = findUnnecessaryGivens info need_inner givens++ discard_entire_implication -- Can we discard the entire implication?+ = null warn_givens -- No warning from this implication+ && not bad_telescope+ && isEmptyWC pruned_wc -- No live children+ && isEmptyVarSet need_outer -- No needed vars to pass up to parent++ final_status+ | bad_telescope = IC_BadTelescope+ | otherwise = IC_Solved { ics_dead = warn_givens }+ final_implic = implic { ic_status = final_status+ , ic_wanted = pruned_wc }++ ; traceTcS "setImplicationStatus(all-solved) }" $+ vcat [ text "discard:" <+> ppr discard_entire_implication+ , text "new_implic:" <+> ppr final_implic ]++ ; return $ if discard_entire_implication+ then Nothing+ else Just final_implic }+ where+ WC { wc_simple = simples, wc_impl = implics, wc_errors = errs } = wc++ pruned_implics = filterBag keep_me implics+ pruned_wc = WC { wc_simple = simples+ , wc_impl = pruned_implics+ , wc_errors = errs } -- do not prune holes; these should be reported++ keep_me :: Implication -> Bool+ keep_me ic+ | IC_Solved { ics_dead = dead_givens } <- ic_status ic+ -- Fully solved+ , null dead_givens -- No redundant givens to report+ , isEmptyBag (wc_impl (ic_wanted ic))+ -- And no children that might have things to report+ = False -- Tnen we don't need to keep it+ | otherwise+ = True -- Otherwise, keep it++findUnnecessaryGivens :: SkolemInfoAnon -> VarSet -> [EvVar] -> [EvVar]+findUnnecessaryGivens info need_inner givens+ | not (warnRedundantGivens info) -- Don't report redundant constraints at all+ = []++ | not (null unused_givens) -- Some givens are literally unused+ = unused_givens++ | otherwise -- All givens are used, but some might+ = redundant_givens -- still be redundant e.g. (Eq a, Ord a)++ where+ in_instance_decl = case info of { InstSkol {} -> True; _ -> False }+ -- See Note [Redundant constraints in instance decls]++ unused_givens = filterOut is_used givens++ is_used given = is_type_error given+ || given `elemVarSet` need_inner+ || (in_instance_decl && is_improving (idType given))++ minimal_givens = mkMinimalBySCs evVarPred givens+ is_minimal = (`elemVarSet` mkVarSet minimal_givens)+ redundant_givens+ | in_instance_decl = []+ | otherwise = filterOut is_minimal givens++ -- See #15232+ is_type_error id = isTopLevelUserTypeError (idType id)++ is_improving pred -- (transSuperClasses p) does not include p+ = any isImprovementPred (pred : transSuperClasses pred)++{- Note [Redundant constraints in instance decls]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Instance declarations are special in two ways:++* We don't report unused givens if they can give rise to improvement.+ Example (#10100):+ class Add a b ab | a b -> ab, a ab -> b+ instance Add Zero b b+ instance Add a b ab => Add (Succ a) b (Succ ab)+ The context (Add a b ab) for the instance is clearly unused in terms+ of evidence, since the dictionary has no fields. But it is still+ needed! With the context, a wanted constraint+ Add (Succ Zero) beta (Succ Zero)+ we will reduce to (Add Zero beta Zero), and thence we get beta := Zero.+ But without the context we won't find beta := Zero.++ This only matters in instance declarations.++* We don't report givens that are a superclass of another given. E.g.+ class Ord r => UserOfRegs r a where ...+ instance (Ord r, UserOfRegs r CmmReg) => UserOfRegs r CmmExpr where+ The (Ord r) is not redundant, even though it is a superclass of+ (UserOfRegs r CmmReg). See Note [Recursive superclasses] in GHC.Tc.TyCl.Instance.++ Again this is specific to instance declarations.+-}+++checkBadTelescope :: Implication -> TcS Bool+-- True <=> the skolems form a bad telescope+-- See Note [Checking telescopes] in GHC.Tc.Types.Constraint+checkBadTelescope (Implic { ic_info = info+ , ic_skols = skols })+ | checkTelescopeSkol info+ = do{ skols <- mapM TcS.zonkTyCoVarKind 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 :: SkolemInfoAnon -> Bool+warnRedundantGivens (SigSkol ctxt _ _)+ = case ctxt of+ FunSigCtxt _ rrc -> reportRedundantConstraints rrc+ ExprSigCtxt rrc -> reportRedundantConstraints rrc+ _ -> False++ -- To think about: do we want to report redundant givens for+ -- pattern synonyms, PatSynSigSkol? c.f #9953, comment:21.+warnRedundantGivens (InstSkol {}) = True+warnRedundantGivens _ = False++neededEvVars :: Implication -> TcS Implication+-- Find all the evidence variables that are "needed",+-- and delete dead evidence bindings+-- See Note [Tracking redundant constraints]+-- See Note [Delete dead Given evidence bindings]+--+-- - Start from initial_seeds (from nested implications)+--+-- - Add free vars of RHS of all Wanted evidence bindings+-- and coercion variables accumulated in tcvs (all Wanted)+--+-- - Generate 'needed', the needed set of EvVars, by doing transitive+-- closure through Given bindings+-- e.g. Needed {a,b}+-- Given a = sc_sel a2+-- Then a2 is needed too+--+-- - Prune out all Given bindings that are not needed+--+-- - From the 'needed' set, delete ev_bndrs, the binders of the+-- evidence bindings, to give the final needed variables+--+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++ ; let seeds1 = foldr add_implic_seeds old_needs implics+ seeds2 = nonDetStrictFoldEvBindMap add_wanted seeds1 ev_binds+ -- It's OK to use a non-deterministic fold here+ -- because add_wanted is commutative+ seeds3 = seeds2 `unionVarSet` tcvs+ need_inner = findNeededEvVars ev_binds seeds3+ live_ev_binds = filterEvBindMap (needed_ev_bind need_inner) ev_binds+ need_outer = varSetMinusEvBindMap need_inner live_ev_binds+ `delVarSetList` givens++ ; TcS.setTcEvBindsMap ev_binds_var live_ev_binds+ -- See Note [Delete dead Given evidence bindings]++ ; traceTcS "neededEvVars" $+ vcat [ text "old_needs:" <+> ppr old_needs+ , text "seeds3:" <+> ppr seeds3+ , text "tcvs:" <+> ppr tcvs+ , text "ev_binds:" <+> ppr ev_binds+ , text "live_ev_binds:" <+> ppr live_ev_binds ]++ ; return (implic { ic_need_inner = need_inner+ , ic_need_outer = need_outer }) }+ where+ add_implic_seeds (Implic { ic_need_outer = needs }) acc+ = needs `unionVarSet` acc++ needed_ev_bind needed (EvBind { eb_lhs = ev_var+ , eb_info = info })+ | EvBindGiven{} <- info = ev_var `elemVarSet` needed+ | otherwise = True -- Keep all wanted bindings++ add_wanted :: EvBind -> VarSet -> VarSet+ add_wanted (EvBind { eb_info = info, eb_rhs = rhs }) needs+ | EvBindGiven{} <- info = needs -- Add the rhs vars of the Wanted bindings only+ | otherwise = evVarsOfTerm rhs `unionVarSet` needs++-------------------------------------------------+simplifyDelayedErrors :: Bag DelayedError -> TcS (Bag DelayedError)+-- Simplify any delayed errors: e.g. type and term holes+-- NB: At this point we have finished with all the simple+-- constraints; they are in wc_simple, not in the inert set.+-- So those Wanteds will not rewrite these delayed errors.+-- That's probably no bad thing.+--+-- However if we have [W] alpha ~ Maybe a, [W] alpha ~ Int+-- and _ : alpha, then we'll /unify/ alpha with the first of+-- the Wanteds we get, and thereby report (_ : Maybe a) or+-- (_ : Int) unpredictably, depending on which we happen to see+-- first. Doesn't matter much; there is a type error anyhow.+-- T17139 is a case in point.+simplifyDelayedErrors = mapBagM simpl_err+ where+ simpl_err :: DelayedError -> TcS DelayedError+ simpl_err (DE_Hole hole) = DE_Hole <$> simpl_hole hole+ simpl_err err@(DE_NotConcrete {}) = return err++ simpl_hole :: Hole -> TcS Hole++ -- See Note [Do not simplify ConstraintHoles]+ simpl_hole h@(Hole { hole_sort = ConstraintHole }) = return h++ -- other wildcards should be simplified for printing+ -- we must do so here, and not in the error-message generation+ -- code, because we have all the givens already set up+ simpl_hole h@(Hole { hole_ty = ty, hole_loc = loc })+ = do { ty' <- rewriteType loc ty+ ; traceTcS "simpl_hole" (ppr ty $$ ppr ty')+ ; return (h { hole_ty = ty' }) }++{- Note [Delete dead Given evidence bindings]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+As a result of superclass expansion, we speculatively+generate evidence bindings for Givens. E.g.+ f :: (a ~ b) => a -> b -> Bool+ f x y = ...+We'll have+ [G] d1 :: (a~b)+and we'll speculatively generate the evidence binding+ [G] d2 :: (a ~# b) = sc_sel d++Now d2 is available for solving. But it may not be needed! Usually+such dead superclass selections will eventually be dropped as dead+code, but:++ * It won't always be dropped (#13032). In the case of an+ unlifted-equality superclass like d2 above, we generate+ case heq_sc d1 of d2 -> ...+ and we can't (in general) drop that case expression in case+ d1 is bottom. So it's technically unsound to have added it+ in the first place.++ * Simply generating all those extra superclasses can generate lots of+ code that has to be zonked, only to be discarded later. Better not+ to generate it in the first place.++ Moreover, if we simplify this implication more than once+ (e.g. because we can't solve it completely on the first iteration+ of simpl_loop), we'll generate all the same bindings AGAIN!++Easy solution: take advantage of the work we are doing to track dead+(unused) Givens, and use it to prune the Given bindings too. This is+all done by neededEvVars.++This led to a remarkable 25% overall compiler allocation decrease in+test T12227.++But we don't get to discard all redundant equality superclasses, alas;+see #15205.++Note [Do not simplify ConstraintHoles]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Before printing the inferred value for a type hole (a _ wildcard in+a partial type signature), we simplify it w.r.t. any Givens. This+makes for an easier-to-understand diagnostic for the user.++However, we do not wish to do this for extra-constraint holes. Here is+the example for why (partial-sigs/should_compile/T12844):++ bar :: _ => FooData rngs+ bar = foo++ data FooData rngs++ class Foo xs where foo :: (Head xs ~ '(r,r')) => FooData xs++ type family Head (xs :: [k]) where Head (x ': xs) = x++GHC correctly infers that the extra-constraints wildcard on `bar`+should be (Head rngs ~ '(r, r'), Foo rngs). It then adds this+constraint as a Given on the implication constraint for `bar`. (This+implication is emitted by emitResidualConstraints.) The Hole for the _+is stored within the implication's WantedConstraints. When+simplifyHoles is called, that constraint is already assumed as a+Given. Simplifying with respect to it turns it into ('(r, r') ~ '(r,+r'), Foo rngs), which is disastrous.++Furthermore, there is no need to simplify here: extra-constraints wildcards+are filled in with the output of the solver, in chooseInferredQuantifiers+(choose_psig_context), so they are already simplified. (Contrast to normal+type holes, which are just bound to a meta-variable.) Avoiding the poor output+is simple: just don't simplify extra-constraints wildcards.++This is the only reason we need to track ConstraintHole separately+from TypeHole in HoleSort.++See also Note [Extra-constraint holes in partial type signatures]+in GHC.Tc.Gen.HsType.++Note [Tracking redundant constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+With Opt_WarnRedundantConstraints, GHC can report which+constraints of a type signature (or instance declaration) are+redundant, and can be omitted. Here is an overview of how it+works.++This is all tested in typecheck/should_compile/T20602 (among+others).++----- What is a redundant constraint?++* The things that can be redundant are precisely the Given+ constraints of an implication.++* A constraint can be redundant in two different ways:+ a) It is not needed by the Wanted constraints covered by the+ implication E.g.+ f :: Eq a => a -> Bool+ f x = True -- Equality not used+ b) It is implied by other givens. E.g.+ f :: (Eq a, Ord a) => blah -- Eq a unnecessary+ g :: (Eq a, a~b, Eq b) => blah -- Either Eq a or Eq b unnecessary++* To find (a) we need to know which evidence bindings are 'wanted';+ hence the eb_is_given field on an EvBind.++* To find (b), we use mkMinimalBySCs on the Givens to see if any+ are unnecessary.++----- How tracking works++(RC1) When two Givens are the same, we drop the evidence for the one+ that requires more superclass selectors. This is done+ according to 2(c) of Note [Replacement vs keeping] in GHC.Tc.Solver.InertSet.++(RC2) The ic_need fields of an Implic records in-scope (given) evidence+ variables bound by the context, that were needed to solve this+ implication (so far). See the declaration of Implication.++(RC3) setImplicationStatus:+ When the constraint solver finishes solving all the wanteds in+ an implication, it sets its status to IC_Solved++ - The ics_dead field, of IC_Solved, records the subset of this+ implication's ic_given that are redundant (not needed).++ - We compute which evidence variables are needed by an implication+ in setImplicationStatus. A variable is needed if+ a) it is free in the RHS of a Wanted EvBind,+ b) it is free in the RHS of an EvBind whose LHS is needed, or+ c) it is in the ics_need of a nested implication.++ - After computing which variables are needed, we then look at the+ remaining variables for internal redundancies. This is case (b)+ from above. This is also done in setImplicationStatus.+ Note that we only look for case (b) if case (a) shows up empty,+ as exemplified below.++ - We need to be careful not to discard an implication+ prematurely, even one that is fully solved, because we might+ thereby forget which variables it needs, and hence wrongly+ report a constraint as redundant. But we can discard it once+ its free vars have been incorporated into its parent; or if it+ simply has no free vars. This careful discarding is also+ handled in setImplicationStatus.++(RC4) We do not want to report redundant constraints for implications+ that come from quantified constraints. Example #23323:+ data T a+ instance Show (T a) where ... -- No context!+ foo :: forall f c. (forall a. c a => Show (f a)) => Proxy c -> f Int -> Int+ bar = foo @T @Eq++ The call to `foo` gives us+ [W] d : (forall a. Eq a => Show (T a))+ To solve this, GHC.Tc.Solver.Solve.solveForAll makes an implication constraint:+ forall a. Eq a => [W] ds : Show (T a)+ and because of the degnerate instance for `Show (T a)`, we don't need the `Eq a`+ constraint. But we don't want to report it as redundant!++* Examples:++ f, g, h :: (Eq a, Ord a) => a -> Bool+ f x = x == x+ g x = x > x+ h x = x == x && x > x++ All three will discover that they have two [G] Eq a constraints:+ one as given and one extracted from the Ord a constraint. They will+ both discard the latter, as noted above and in+ Note [Replacement vs keeping] in GHC.Tc.Solver.InertSet.++ The body of f uses the [G] Eq a, but not the [G] Ord a. It will+ report a redundant Ord a using the logic for case (a).++ The body of g uses the [G] Ord a, but not the [G] Eq a. It will+ report a redundant Eq a using the logic for case (a).++ The body of h uses both [G] Ord a and [G] Eq a. Case (a) will+ thus come up with nothing redundant. But then, the case (b)+ check will discover that Eq a is redundant and report this.++ If we did case (b) even when case (a) reports something, then+ we would report both constraints as redundant for f, which is+ terrible.++----- Reporting redundant constraints++* GHC.Tc.Errors does the actual warning, in warnRedundantConstraints.++* We don't report redundant givens for *every* implication; only+ for those which reply True to GHC.Tc.Solver.warnRedundantGivens:++ - For example, in a class declaration, the default method *can*+ use the class constraint, but it certainly doesn't *have* to,+ and we don't want to report an error there. Ditto instance decls.++ - More subtly, in a function definition+ f :: (Ord a, Ord a, Ix a) => a -> a+ f x = rhs+ we do an ambiguity check on the type (which would find that one+ of the Ord a constraints was redundant), and then we check that+ the definition has that type (which might find that both are+ redundant). We don't want to report the same error twice, so we+ disable it for the ambiguity check. Hence using two different+ FunSigCtxts, one with the warn-redundant field set True, and the+ other set False in+ - GHC.Tc.Gen.Bind.tcSpecPrag+ - GHC.Tc.Gen.Bind.tcTySig++ This decision is taken in setImplicationStatus, rather than GHC.Tc.Errors+ so that we can discard implication constraints that we don't need.+ So ics_dead consists only of the *reportable* redundant givens.++----- Shortcomings++Shortcoming 1. Consider++ j :: (Eq a, a ~ b) => a -> Bool+ j x = x == x++ k :: (Eq a, b ~ a) => a -> Bool+ k x = x == x++Currently (Nov 2021), j issues no warning, while k says that b ~ a+is redundant. This is because j uses the a ~ b constraint to rewrite+everything to be in terms of b, while k does none of that. This is+ridiculous, but I (Richard E) don't see a good fix.++Shortcoming 2. Removing a redundant constraint can cause clients to fail to+compile, by making the function more polymoprhic. Consider (#16154)++ f :: (a ~ Bool) => a -> Int+ f x = 3++ g :: String -> Int+ g s = f (read s)++The constraint in f's signature is redundant; not used to typecheck+`f`. And yet if you remove it, `g` won't compile, because there'll+be an ambiguous variable in `g`.+-}++-- | Like 'defaultTyVar', but in the TcS monad.+defaultTyVarTcS :: TcTyVar -> TcS Bool+defaultTyVarTcS the_tv+ | isTyVarTyVar the_tv+ -- TyVarTvs should only be unified with a tyvar+ -- never with a type; c.f. GHC.Tc.Utils.TcMType.defaultTyVar+ -- and Note [Inferring kinds for type declarations] in GHC.Tc.TyCl+ = return False+ | isRuntimeRepVar the_tv+ = do { traceTcS "defaultTyVarTcS RuntimeRep" (ppr the_tv)+ ; unifyTyVar the_tv liftedRepTy+ ; return True }+ | isLevityVar the_tv+ = do { traceTcS "defaultTyVarTcS Levity" (ppr the_tv)+ ; unifyTyVar the_tv liftedDataConTy+ ; return True }+ | isMultiplicityVar the_tv+ = do { traceTcS "defaultTyVarTcS Multiplicity" (ppr the_tv)+ ; unifyTyVar the_tv ManyTy+ ; return True }+ | otherwise+ = return False -- the common case++approximateWC :: Bool -- See Wrinkle (W3) in Note [ApproximateWC]+ -> WantedConstraints+ -> Cts+-- Second return value is the depleted wc+-- Postcondition: Wanted Cts+-- See Note [ApproximateWC]+-- See Note [floatKindEqualities vs approximateWC]+approximateWC float_past_equalities wc+ = float_wc False emptyVarSet wc+ where+ float_wc :: Bool -- True <=> there are enclosing equalities+ -> TcTyCoVarSet -- Enclosing skolem binders+ -> WantedConstraints -> Cts+ float_wc encl_eqs trapping_tvs (WC { wc_simple = simples, wc_impl = implics })+ = filterBag (is_floatable encl_eqs trapping_tvs) simples `unionBags`+ concatMapBag (float_implic encl_eqs trapping_tvs) implics++ float_implic :: Bool -> TcTyCoVarSet -> Implication -> Cts+ float_implic encl_eqs trapping_tvs imp+ = float_wc new_encl_eqs new_trapping_tvs (ic_wanted imp)+ where+ new_trapping_tvs = trapping_tvs `extendVarSetList` ic_skols imp+ new_encl_eqs = encl_eqs || ic_given_eqs imp == MaybeGivenEqs++ is_floatable encl_eqs skol_tvs ct+ | isGivenCt ct = False+ | insolubleCt ct = False+ | tyCoVarsOfCt ct `intersectsVarSet` skol_tvs = False+ | otherwise+ = case classifyPredType (ctPred ct) of+ EqPred {} -> float_past_equalities || not encl_eqs+ -- See Wrinkle (W1)+ ClassPred {} -> True -- See Wrinkle (W2)+ IrredPred {} -> True -- ..both in Note [ApproximateWC]+ ForAllPred {} -> False++{- Note [ApproximateWC]+~~~~~~~~~~~~~~~~~~~~~~~+approximateWC takes a constraint, typically arising from the RHS of a+let-binding whose type we are *inferring*, and extracts from it some+*simple* constraints that we might plausibly abstract over. Of course+the top-level simple constraints are plausible, but we also float constraints+out from inside, if they are not captured by skolems.++The same function is used when doing type-class defaulting (see the call+to applyDefaultingRules) to extract constraints that might be defaulted.++Wrinkle (W1)+ When inferring most-general types (in simplifyInfer), we+ do *not* float an equality constraint if the implication binds+ equality constraints, because that defeats the OutsideIn story.+ Consider data T a where TInt :: T Int MkT :: T a++ f TInt = 3::Int++ We get the implication (a ~ Int => res ~ Int), where so far we've decided+ f :: T a -> res+ We don't want to float (res~Int) out because then we'll infer+ f :: T a -> Int+ which is only on of the possible types. (GHC 7.6 accidentally *did*+ float out of such implications, which meant it would happily infer+ non-principal types.)++Wrinkle (W2)+ We do allow /class/ constraints to float, even if+ the implication binds equalities. This is a subtle point: see #23224.+ In principle, a class constraint might ultimately be satisfiable from+ a constraint bound by an implication (see #19106 for an example of this+ kind), but it's extremely obscure and I was unable to construct a+ concrete example. In any case, in super-subtle cases where this might+ make a difference, you would be much better advised to simply write a+ type signature.++ I included IrredPred here too, for good measure. In general,+ abstracting over more constraints does no harm.++Wrinkle (W3)+ In findDefaultableGroups we are not worried about the+ most-general type; and we /do/ want to float out of equalities+ (#12797). Hence the boolean flag to approximateWC.++------ Historical note -----------+There used to be a second caveat, driven by #8155++ 2. We do not float out an inner constraint that shares a type variable+ (transitively) with one that is trapped by a skolem. Eg+ forall a. F a ~ beta, Integral beta+ We don't want to float out (Integral beta). Doing so would be bad+ when defaulting, because then we'll default beta:=Integer, and that+ makes the error message much worse; we'd get+ Can't solve F a ~ Integer+ rather than+ Can't solve Integral (F a)++ Moreover, floating out these "contaminated" constraints doesn't help+ when generalising either. If we generalise over (Integral b), we still+ can't solve the retained implication (forall a. F a ~ b). Indeed,+ arguably that too would be a harder error to understand.++But this transitive closure stuff gives rise to a complex rule for+when defaulting actually happens, and one that was never documented.+Moreover (#12923), the more complex rule is sometimes NOT what+you want. So I simply removed the extra code to implement the+contamination stuff. There was zero effect on the testsuite (not even #8155).+------ End of historical note -----------++Note [DefaultTyVar]+~~~~~~~~~~~~~~~~~~~+defaultTyVar is used on any un-instantiated meta type variables to+default any RuntimeRep variables to LiftedRep. This is important+to ensure that instance declarations match. For example consider++ instance Show (a->b)+ foo x = show (\_ -> True)++Then we'll get a constraint (Show (p ->q)) where p has kind (TYPE r),+and that won't match the typeKind (*) in the instance decl. See tests+tc217 and tc175.++We look only at touchable type variables. No further constraints+are going to affect these type variables, so it's time to do it by+hand. However we aren't ready to default them fully to () or+whatever, because the type-class defaulting rules have yet to run.++An alternate implementation would be to emit a Wanted constraint setting+the RuntimeRep variable to LiftedRep, but this seems unnecessarily indirect.++Note [Promote _and_ default when inferring]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we are inferring a type, we simplify the constraint, and then use+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 (WantedInv) described in+ Note [TcLevel invariants] in GHC.Tc.Utils.TcType.++ b) Default the kind of any meta-tyvars that are not mentioned in+ in the environment.++To see (b), suppose the constraint is (C ((a :: OpenKind) -> Int)), and we+have an instance (C ((x:*) -> Int)). The instance doesn't match -- but it+should! If we don't solve the constraint, we'll stupidly quantify over+(C (a->Int)) and, worse, in doing so skolemiseQuantifiedTyVar will quantify over+(b:*) instead of (a:OpenKind), which can lead to disaster; see #7332.+#7641 is a simpler example.++Note [Promoting unification variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we float an equality out of an implication we must "promote" free+unification variables of the equality, in order to maintain Invariant+(WantedInv) from Note [TcLevel invariants] in GHC.Tc.Types.TcType.++This is absolutely necessary. Consider the following example. We start+with two implications and a class with a functional dependency.++ class C x y | x -> y+ instance C [a] [a]++ (I1) [untch=beta]forall b. 0 => F Int ~ [beta]+ (I2) [untch=beta]forall c. 0 => F Int ~ [[alpha]] /\ C beta [c]++We float (F Int ~ [beta]) out of I1, and we float (F Int ~ [[alpha]]) out of I2.+They may react to yield that (beta := [alpha]) which can then be pushed inwards+the leftover of I2 to get (C [alpha] [a]) which, using the FunDep, will mean that+(alpha := a). In the end we will have the skolem 'b' escaping in the untouchable+beta! Concrete example is in indexed_types/should_fail/ExtraTcsUntch.hs:++ class C x y | x -> y where+ op :: x -> y -> ()++ instance C [a] [a]++ type family F a :: *++ h :: F Int -> ()+ h = undefined++ data TEx where+ TEx :: a -> TEx++ f (x::beta) =+ let g1 :: forall b. b -> ()+ g1 _ = h [x]+ g2 z = case z of TEx y -> (h [[undefined]], op x [y])+ in (g1 '3', g2 undefined)+++*********************************************************************************+* *+* Defaulting and disambiguation *+* *+*********************************************************************************++Note [Defaulting plugins]+~~~~~~~~~~~~~~~~~~~~~~~~~+Defaulting plugins enable extending or overriding the defaulting+behaviour. In `applyDefaulting`, before the built-in defaulting+mechanism runs, the loaded defaulting plugins are passed the+`WantedConstraints` and get a chance to propose defaulting assignments+based on them.++Proposals are represented as `[DefaultingProposal]` with each proposal+consisting of a type variable to fill-in, the list of defaulting types to+try in order, and a set of constraints to check at each try. This is+the same representation (albeit in a nicely packaged-up data type) as+the candidates generated by the built-in defaulting mechanism, so the+actual trying of proposals is done by the same `disambigGroup` function.++Wrinkle (DP1): The role of `WantedConstraints`++ Plugins are passed `WantedConstraints` that can perhaps be+ progressed on by defaulting. But a defaulting plugin is not a solver+ plugin, its job is to provide defaulting proposals, i.e. mappings of+ type variable to types. How do plugins know which type variables+ they are supposed to default?++ The `WantedConstraints` passed to the defaulting plugin are zonked+ beforehand to ensure all remaining metavariables are unfilled. Thus,+ the `WantedConstraints` serve a dual purpose: they are both the+ constraints of the given context that can act as hints to the+ defaulting, as well as the containers of the type variables under+ consideration for defaulting.++Wrinkle (DP2): Interactions between defaulting mechanisms++ In the general case, we have multiple defaulting plugins loaded and+ there is also the built-in defaulting mechanism. In this case, we+ have to be careful to keep the `WantedConstraints` passed to the+ plugins up-to-date by zonking between successful defaulting+ rounds. Otherwise, two plugins might come up with a defaulting+ proposal for the same metavariable; if the first one is accepted by+ `disambigGroup` (thus the meta gets filled), the second proposal+ becomes invalid (see #23821 for an example).++-}++applyDefaultingRules :: WantedConstraints -> TcS Bool+-- True <=> I did some defaulting, by unifying a meta-tyvar+-- Input WantedConstraints are not necessarily zonked++applyDefaultingRules wanteds+ | isEmptyWC wanteds+ = return False+ | otherwise+ = do { info@(default_tys, _) <- getDefaultInfo+ ; wanteds <- TcS.zonkWC wanteds++ ; tcg_env <- TcS.getGblEnv+ ; let plugins = tcg_defaulting_plugins tcg_env++ -- Run any defaulting plugins+ -- See Note [Defaulting plugins] for an overview+ ; (wanteds, plugin_defaulted) <- if null plugins then return (wanteds, []) else+ do {+ ; traceTcS "defaultingPlugins {" (ppr wanteds)+ ; (wanteds, defaultedGroups) <- mapAccumLM run_defaulting_plugin wanteds plugins+ ; traceTcS "defaultingPlugins }" (ppr defaultedGroups)+ ; return (wanteds, defaultedGroups)+ }++ ; let groups = findDefaultableGroups info wanteds++ ; traceTcS "applyDefaultingRules {" $+ vcat [ text "wanteds =" <+> ppr wanteds+ , text "groups =" <+> ppr groups+ , text "info =" <+> ppr info ]++ ; something_happeneds <- mapM (disambigGroup default_tys) groups++ ; traceTcS "applyDefaultingRules }" (ppr something_happeneds)++ ; return $ or something_happeneds || or plugin_defaulted }+ where run_defaulting_plugin wanteds p =+ do { groups <- runTcPluginTcS (p wanteds)+ ; defaultedGroups <-+ filterM (\g -> disambigGroup+ (deProposalCandidates g)+ (deProposalTyVar g, deProposalCts g))+ groups+ ; traceTcS "defaultingPlugin " $ ppr defaultedGroups+ ; case defaultedGroups of+ [] -> return (wanteds, False)+ _ -> do+ -- If a defaulting plugin solves any tyvars, some of the wanteds+ -- will have filled-in metavars by now (see wrinkle DP2 of+ -- Note [Defaulting plugins]). So we re-zonk to make sure later+ -- defaulting doesn't try to solve the same metavars.+ wanteds' <- TcS.zonkWC wanteds+ return (wanteds', True)+ }+++findDefaultableGroups+ :: ( [Type]+ , (Bool,Bool) ) -- (Overloaded strings, extended default rules)+ -> WantedConstraints -- Unsolved+ -> [(TyVar, [Ct])]+findDefaultableGroups (default_tys, (ovl_strings, extended_defaults)) wanteds+ | null default_tys+ = []+ | otherwise+ = [ (tv, map fstOf3 group)+ | group'@((_,_,tv) :| _) <- unary_groups+ , let group = toList group'+ , defaultable_tyvar tv+ , defaultable_classes (map sndOf3 group) ]+ where+ simples = approximateWC True wanteds+ (unaries, non_unaries) = partitionWith find_unary (bagToList simples)+ unary_groups = equivClasses cmp_tv unaries++ unary_groups :: [NonEmpty (Ct, Class, TcTyVar)] -- (C tv) constraints+ unaries :: [(Ct, Class, TcTyVar)] -- (C tv) constraints+ non_unaries :: [Ct] -- and *other* constraints++ -- Finds unary type-class constraints+ -- But take account of polykinded classes like Typeable,+ -- which may look like (Typeable * (a:*)) (#8931)+ find_unary :: Ct -> Either (Ct, Class, TyVar) Ct+ find_unary cc+ | Just (cls,tys) <- getClassPredTys_maybe (ctPred cc)+ , [ty] <- filterOutInvisibleTypes (classTyCon cls) tys+ -- Ignore invisible arguments for this purpose+ , Just tv <- getTyVar_maybe ty+ , isMetaTyVar tv -- We might have runtime-skolems in GHCi, and+ -- we definitely don't want to try to assign to those!+ = Left (cc, cls, tv)+ find_unary cc = Right cc -- Non unary or non dictionary++ bad_tvs :: TcTyCoVarSet -- TyVars mentioned by non-unaries+ bad_tvs = mapUnionVarSet tyCoVarsOfCt non_unaries++ cmp_tv (_,_,tv1) (_,_,tv2) = tv1 `compare` tv2++ defaultable_tyvar :: TcTyVar -> Bool+ defaultable_tyvar tv+ = let b1 = isTyConableTyVar tv -- Note [Avoiding spurious errors]+ b2 = not (tv `elemVarSet` bad_tvs)+ in b1 && (b2 || extended_defaults) -- Note [Multi-parameter defaults]++ defaultable_classes :: [Class] -> Bool+ defaultable_classes clss+ | extended_defaults = any (isInteractiveClass ovl_strings) clss+ | otherwise = all is_std_class clss && (any (isNumClass ovl_strings) clss)++ -- is_std_class adds IsString to the standard numeric classes,+ -- when -XOverloadedStrings is enabled+ is_std_class cls = isStandardClass cls ||+ (ovl_strings && (cls `hasKey` isStringClassKey))++------------------------------+disambigGroup :: [Type] -- The default types+ -> (TcTyVar, [Ct]) -- All constraints sharing same type variable+ -> TcS Bool -- True <=> something happened, reflected in ty_binds++disambigGroup [] _+ = return False+disambigGroup (default_ty:default_tys) group@(the_tv, wanteds)+ = do { traceTcS "disambigGroup {" (vcat [ ppr default_ty, ppr the_tv, ppr wanteds ])+ ; fake_ev_binds_var <- TcS.newTcEvBinds+ ; tclvl <- TcS.getTcLevel+ ; success <- nestImplicTcS fake_ev_binds_var (pushTcLevel tclvl) try_group++ ; if success then+ -- Success: record the type variable binding, and return+ do { unifyTyVar the_tv default_ty+ ; wrapWarnTcS $ warnDefaulting the_tv wanteds default_ty+ ; traceTcS "disambigGroup succeeded }" (ppr default_ty)+ ; return True }+ else+ -- Failure: try with the next type+ do { traceTcS "disambigGroup failed, will try other default types }"+ (ppr default_ty)+ ; disambigGroup default_tys group } }+ where+ try_group+ | Just subst <- mb_subst+ = do { lcl_env <- TcS.getLclEnv+ ; tc_lvl <- TcS.getTcLevel+ ; let loc = mkGivenLoc tc_lvl (getSkolemInfo unkSkol) (mkCtLocEnv lcl_env) -- Equality constraints are possible due to type defaulting plugins ; wanted_evs <- sequence [ newWantedNC loc rewriters pred' | wanted <- wanteds
− GHC/Tc/Solver/Canonical.hs
@@ -1,3421 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE DeriveFunctor #-}-{-# LANGUAGE MultiWayIf #-}-{-# LANGUAGE RecursiveDo #-}--module GHC.Tc.Solver.Canonical(- canonicalize,- unifyWanted,- makeSuperClasses,- StopOrContinue(..), stopWith, continueWith, andWhenContinue,- rewriteEqEvidence,- solveCallStack -- For GHC.Tc.Solver- ) where--import GHC.Prelude--import GHC.Tc.Types.Constraint-import GHC.Core.Predicate-import GHC.Tc.Types.Origin-import GHC.Tc.Utils.Unify-import GHC.Tc.Utils.TcType-import GHC.Core.Type-import GHC.Tc.Solver.Rewrite-import GHC.Tc.Solver.Monad-import GHC.Tc.Solver.InertSet-import GHC.Tc.Types.Evidence-import GHC.Tc.Types.EvTerm-import GHC.Core.Class-import GHC.Core.DataCon ( dataConName )-import GHC.Core.TyCon-import GHC.Core.Multiplicity-import GHC.Core.TyCo.Rep -- cleverly decomposes types, good for completeness checking-import GHC.Core.Coercion-import GHC.Core.Coercion.Axiom-import GHC.Core.Reduction-import GHC.Core-import GHC.Types.Id( mkTemplateLocals )-import GHC.Core.FamInstEnv ( FamInstEnvs )-import GHC.Tc.Instance.Family ( tcTopNormaliseNewTypeTF_maybe )-import GHC.Types.Var-import GHC.Types.Var.Env( mkInScopeSet )-import GHC.Types.Var.Set( delVarSetList, anyVarSet )-import GHC.Utils.Outputable-import GHC.Utils.Panic-import GHC.Utils.Panic.Plain-import GHC.Builtin.Types ( anyTypeOfKind )-import GHC.Types.Name.Set-import GHC.Types.Name.Reader-import GHC.Hs.Type( HsIPName(..) )-import GHC.Types.Unique ( hasKey )-import GHC.Builtin.Names ( coercibleTyConKey )--import GHC.Data.Pair-import GHC.Utils.Misc-import GHC.Data.Bag-import GHC.Utils.Monad-import GHC.Utils.Constants( debugIsOn )-import Control.Monad-import Data.Maybe ( isJust, isNothing )-import Data.List ( zip4 )-import GHC.Types.Basic--import qualified Data.Semigroup as S-import Data.Bifunctor ( bimap )--{--************************************************************************-* *-* The Canonicaliser *-* *-************************************************************************--Note [Canonicalization]-~~~~~~~~~~~~~~~~~~~~~~~--Canonicalization converts a simple constraint to a canonical form. It is-unary (i.e. treats individual constraints one at a time).--Constraints originating from user-written code come into being as-CNonCanonicals. We know nothing about these constraints. So, first:-- Classify CNonCanoncal constraints, depending on whether they- are equalities, class predicates, or other.--Then proceed depending on the shape of the constraint. Generally speaking,-each constraint gets rewritten and then decomposed into one of several forms-(see type Ct in GHC.Tc.Types).--When an already-canonicalized constraint gets kicked out of the inert set,-it must be recanonicalized. But we know a bit about its shape from the-last time through, so we can skip the classification step.---}---- Top-level canonicalization--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--canonicalize :: Ct -> TcS (StopOrContinue Ct)-canonicalize (CNonCanonical { cc_ev = ev })- = {-# SCC "canNC" #-}- canNC ev--canonicalize (CQuantCan (QCI { qci_ev = ev, qci_pend_sc = pend_sc }))- = canForAll ev pend_sc--canonicalize (CIrredCan { cc_ev = ev })- = canNC ev- -- Instead of rewriting the evidence before classifying, it's possible we- -- can make progress without the rewrite. Try this first.- -- For insolubles (all of which are equalities), do /not/ rewrite the arguments- -- In #14350 doing so led entire-unnecessary and ridiculously large- -- type function expansion. Instead, canEqNC just applies- -- the substitution to the predicate, and may do decomposition;- -- e.g. a ~ [a], where [G] a ~ [Int], can decompose--canonicalize (CDictCan { cc_ev = ev, cc_class = cls- , cc_tyargs = xis, cc_pend_sc = pend_sc })- = {-# SCC "canClass" #-}- canClass ev cls xis pend_sc--canonicalize (CEqCan { cc_ev = ev- , cc_lhs = lhs- , cc_rhs = rhs- , cc_eq_rel = eq_rel })- = {-# SCC "canEqLeafTyVarEq" #-}- canEqNC ev eq_rel (canEqLHSType lhs) rhs--canNC :: CtEvidence -> TcS (StopOrContinue Ct)-canNC ev =- 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 pred)- canIrred ev- ForAllPred tvs th p -> do traceTcS "canEvNC:forall" (ppr pred)- canForAllNC ev tvs th p-- where- pred = ctEvPred ev--{--************************************************************************-* *-* Class Canonicalization-* *-************************************************************************--}--canClassNC :: CtEvidence -> Class -> [Type] -> TcS (StopOrContinue Ct)--- "NC" means "non-canonical"; that is, we have got here--- from a NonCanonical constraint, not from a CDictCan--- Precondition: EvVar is class evidence-canClassNC ev cls tys- | isGiven ev -- See Note [Eagerly expand given superclasses]- = do { sc_cts <- mkStrictSuperClasses ev [] [] cls tys- ; emitWork sc_cts- ; canClass ev cls tys False }-- | CtWanted { ctev_rewriters = rewriters } <- ev- , Just ip_name <- isCallStackPred cls tys- , isPushCallStackOrigin orig- -- If we're given a CallStack constraint that arose from a function- -- call, we need to push the current call-site onto the stack instead- -- of solving it directly from a given.- -- See Note [Overview of implicit CallStacks] in GHC.Tc.Types.Evidence- -- and Note [Solving CallStack constraints] in GHC.Tc.Solver.Types- = do { -- First we emit a new constraint that will capture the- -- given CallStack.- ; let new_loc = setCtLocOrigin loc (IPOccOrigin (HsIPName ip_name))- -- We change the origin to IPOccOrigin so- -- this rule does not fire again.- -- See Note [Overview of implicit CallStacks]- -- in GHC.Tc.Types.Evidence-- ; new_ev <- newWantedEvVarNC new_loc rewriters pred-- -- Then we solve the wanted by pushing the call-site- -- onto the newly emitted CallStack- ; let ev_cs = EvCsPushCall (callStackOriginFS orig)- (ctLocSpan loc) (ctEvExpr new_ev)- ; solveCallStack ev ev_cs-- ; canClass new_ev cls tys False -- No superclasses- }-- | otherwise- = canClass ev cls tys (has_scs cls)-- where- has_scs cls = not (null (classSCTheta cls))- loc = ctEvLoc ev- orig = ctLocOrigin loc- pred = ctEvPred ev--solveCallStack :: CtEvidence -> EvCallStack -> TcS ()--- Also called from GHC.Tc.Solver when defaulting call stacks-solveCallStack ev ev_cs = do- -- 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]- cs_tm <- evCallStack ev_cs- let ev_tm = mkEvCast cs_tm (wrapIP (ctEvPred ev))- setEvBindIfWanted ev ev_tm--canClass :: CtEvidence- -> Class -> [Type]- -> Bool -- True <=> un-explored superclasses- -> TcS (StopOrContinue Ct)--- Precondition: EvVar is class evidence--canClass ev cls tys pend_sc- = -- all classes do *nominal* matching- assertPpr (ctEvRole ev == Nominal) (ppr ev $$ ppr cls $$ ppr tys) $- do { (redns@(Reductions _ xis), rewriters) <- rewriteArgsNom ev cls_tc tys- ; let redn@(Reduction _ xi) = mkClassPredRedn cls redns- mk_ct new_ev = CDictCan { cc_ev = new_ev- , cc_tyargs = xis- , cc_class = cls- , cc_pend_sc = pend_sc }- ; mb <- rewriteEvidence rewriters ev redn- ; 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 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- of the Given (Ord a).--* For wanteds [W], they may give useful- functional dependencies. E.g.- class C a b | a -> b where ...- class C a b => D a b where ...- Now a [W] constraint (D Int beta) has (C Int beta) as a superclass- and that might tell us about beta, via C's fundeps. We can get this- by generating a [W] (C Int beta) constraint. We won't use the evidence,- but it may lead to unification.--See Note [Why adding superclasses can help].--For these reasons we want to generate superclass constraints for both-Givens and Wanteds. But:--* (Minor) they are often not needed, so generating them aggressively- is a waste of time.--* (Major) if we want recursive superclasses, there would be an infinite- number of them. Here is a real-life example (#10318);-- class (Frac (Frac a) ~ Frac a,- Fractional (Frac a),- IntegralDomain (Frac a))- => IntegralDomain a where- type Frac a :: *-- Notice that IntegralDomain has an associated type Frac, and one- of IntegralDomain's superclasses is another IntegralDomain constraint.--So here's the plan:--1. Eagerly generate superclasses for given (but not wanted)- constraints; see Note [Eagerly expand given superclasses].- 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,- mkStrictSuperClasses expands eagerly, but has a conservative- termination condition: see Note [Expanding superclasses] in GHC.Tc.Utils.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 superclasses for new /given/- /non-canonical/ constraints (canClassNC does this). As #12175- showed, a type-family application can expand to a class constraint,- and we want to see its superclasses for just the same reason as- Note [Eagerly expand given superclasses].--3. If we have any remaining unsolved wanteds- (see Note [When superclasses help] in GHC.Tc.Types.Constraint)- try harder: take both the Givens and Wanteds, and expand- superclasses again. See the calls to expandSuperClasses in- GHC.Tc.Solver.simpl_loop and solveWanteds.-- This may succeed in generating (a finite number of) extra Givens,- and extra Wanteds. 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 #15290.--4. Go round to (2) again. This loop (2,3,4) is implemented- in GHC.Tc.Solver.simpl_loop.--The cc_pend_sc flag in a CDictCan records whether the superclasses of-this constraint have been expanded. Specifically, in Step 3 we only-expand superclasses for constraints with cc_pend_sc set to true (i.e.-isPendingScDict holds).--Why do we do this? Two reasons:--* To avoid repeated work, by repeatedly expanding the superclasses of- same constraint,--* To terminate the above loop, at least in the -XNoUndecidableSuperClasses- case. If there are recursive superclasses we could, in principle,- expand forever, always encountering new constraints.--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-GHC.Tc.Solver.Interact. 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? (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)-- f :: (Ord (T a)) => blah- f x = ....needs Eq (T a), Ord (T a)....--Here if we can't satisfy (Eq (T a)) from the givens we'll use the-instance declaration; but then we are stuck with (Bad a). Sigh.-This is really a case of non-confluent proofs, but to stop our users-complaining we expand one layer in advance.--Note [Instance and Given overlap] in GHC.Tc.Solver.Interact.--We also want to do this if we have-- f :: F (T a) => blah--where- type instance F (T a) = Ord (T a)--So we may need to do a little work on the givens to expose the-class that has the superclasses. That's why the superclass-expansion for Givens happens in canClassNC.--This same scenario happens with quantified constraints, whose superclasses-are also eagerly expanded. Test case: typecheck/should_compile/T16502b-These are handled in canForAllNC, analogously to canClassNC.--Note [Why adding superclasses can help]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Examples of how adding superclasses can help:-- --- Example 1- class C a b | a -> b- Suppose we want to solve- [G] C a b- [W] C a beta- Then adding [W] beta~b will let us solve it.-- -- Example 2 (similar but using a type-equality superclass)- class (F a ~ b) => C a b- And try to sllve:- [G] C a b- [W] C a beta- Follow the superclass rules to add- [G] F a ~ b- [W] F a ~ beta- Now we get [W] beta ~ b, and can solve that.-- -- Example (tcfail138)- class L a b | a -> b- class (G a, L a b) => C a b-- instance C a b' => G (Maybe a)- instance C a b => C (Maybe a) a- instance L (Maybe a) a-- When solving the superclasses of the (C (Maybe a) a) instance, we get- [G] C a b, and hence by superclasses, [G] G a, [G] L a b- [W] G (Maybe a)- Use the instance decl to get- [W] C a beta- Generate its superclass- [W] L a beta. Now using fundeps, combine with [G] L a b to get- [W] beta ~ b- which is what we want.--Note [Danger of adding superclasses during solving]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Here's a serious, but now out-dated example, from #4497:-- class Num (RealOf t) => Normed t- type family RealOf x--Assume the generated wanted constraint is:- [W] RealOf e ~ e- [W] Normed e--If we were to be adding the superclasses during simplification we'd get:- [W] RealOf e ~ e- [W] Normed e- [W] RealOf e ~ fuv- [W] Num fuv-==>- e := fuv, Num fuv, Normed fuv, RealOf fuv ~ fuv--While looks exactly like our original constraint. If we add the-superclass of (Normed fuv) again we'd loop. By adding superclasses-definitely only once, during canonicalisation, this situation can't-happen.--Note [Nested quantified constraint superclasses]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (typecheck/should_compile/T17202)-- class C1 a- class (forall c. C1 c) => C2 a- class (forall b. (b ~ F a) => C2 a) => C3 a--Elsewhere in the code, we get a [G] g1 :: C3 a. We expand its superclass-to get [G] g2 :: (forall b. (b ~ F a) => C2 a). This constraint has a-superclass, as well. But we now must be careful: we cannot just add-(forall c. C1 c) as a Given, because we need to remember g2's context.-That new constraint is Given only when forall b. (b ~ F a) is true.--It's tempting to make the new Given be (forall b. (b ~ F a) => forall c. C1 c),-but that's problematic, because it's nested, and ForAllPred is not capable-of representing a nested quantified constraint. (We could change ForAllPred-to allow this, but the solution in this Note is much more local and simpler.)--So, we swizzle it around to get (forall b c. (b ~ F a) => C1 c).--More generally, if we are expanding the superclasses of- g0 :: forall tvs. theta => cls tys-and find a superclass constraint- forall sc_tvs. sc_theta => sc_inner_pred-we must have a selector- sel_id :: forall cls_tvs. cls cls_tvs -> forall sc_tvs. sc_theta => sc_inner_pred-and thus build- g_sc :: forall tvs sc_tvs. theta => sc_theta => sc_inner_pred- g_sc = /\ tvs. /\ sc_tvs. \ theta_ids. \ sc_theta_ids.- sel_id tys (g0 tvs theta_ids) sc_tvs sc_theta_ids--Actually, we cheat a bit by eta-reducing: note that sc_theta_ids are both the-last bound variables and the last arguments. This avoids the need to produce-the sc_theta_ids at all. So our final construction is-- g_sc = /\ tvs. /\ sc_tvs. \ theta_ids.- sel_id tys (g0 tvs theta_ids) sc_tvs-- -}--makeSuperClasses :: [Ct] -> TcS [Ct]--- Returns strict superclasses, transitively, see Note [The superclass story]--- See Note [The superclass story]--- The loop-breaking here follows Note [Expanding superclasses] in GHC.Tc.Utils.TcType--- Specifically, for an incoming (C t) constraint, we return all of (C t)'s--- superclasses, up to /and including/ the first repetition of C------ Example: class D a => C a--- class C [a] => D a--- makeSuperClasses (C x) will return (D x, C [x])------ NB: the incoming constraints have had their cc_pend_sc flag already--- flipped to False, by isPendingScDict, so we are /obliged/ to at--- least produce the immediate superclasses-makeSuperClasses cts = concatMapM go cts- where- go (CDictCan { cc_ev = ev, cc_class = cls, cc_tyargs = tys })- = mkStrictSuperClasses ev [] [] cls tys- go (CQuantCan (QCI { qci_pred = pred, qci_ev = ev }))- = assertPpr (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- -> [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- -> [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 (CtGiven { ctev_evar = evar, ctev_loc = loc })- tvs theta cls tys- = concatMapM do_one_given $- classSCSelIds cls- where- dict_ids = mkTemplateLocals theta- this_size = pSizeClassPred cls tys-- do_one_given sel_id- | isUnliftedType sc_pred- -- NB: class superclasses are never representation-polymorphic,- -- so isUnliftedType is OK here.- , not (null tvs && null theta)- = -- See Note [Equality superclasses in quantified constraints]- return []- | otherwise- = do { given_ev <- newGivenEvVar sc_loc $- mk_given_desc sel_id sc_pred- ; mk_superclasses rec_clss given_ev tvs theta sc_pred }- where- sc_pred = classMethodInstTy sel_id tys-- -- See Note [Nested quantified constraint superclasses]- mk_given_desc :: Id -> PredType -> (PredType, EvTerm)- mk_given_desc sel_id sc_pred- = (swizzled_pred, swizzled_evterm)- where- (sc_tvs, sc_rho) = splitForAllTyCoVars sc_pred- (sc_theta, sc_inner_pred) = splitFunTys sc_rho-- all_tvs = tvs `chkAppend` sc_tvs- all_theta = theta `chkAppend` (map scaledThing sc_theta)- swizzled_pred = mkInfSigmaTy all_tvs all_theta sc_inner_pred-- -- evar :: forall tvs. theta => cls tys- -- sel_id :: forall cls_tvs. cls cls_tvs- -- -> forall sc_tvs. sc_theta => sc_inner_pred- -- swizzled_evterm :: forall tvs sc_tvs. theta => sc_theta => sc_inner_pred- swizzled_evterm = EvExpr $- mkLams all_tvs $- mkLams dict_ids $- Var sel_id- `mkTyApps` tys- `App` (evId evar `mkVarApps` (tvs ++ dict_ids))- `mkVarApps` sc_tvs-- sc_loc | isCTupleClass cls- = loc -- For tuple predicates, just take them apart, without- -- adding their (large) size into the chain. When we- -- get down to a base predicate, we'll include its size.- -- #10335-- | isEqPredClass cls || cls `hasKey` coercibleTyConKey- = loc -- The only superclasses of ~, ~~, and Coercible are primitive- -- equalities, and they don't use the GivenSCOrigin mechanism- -- detailed in Note [Solving superclass constraints] in- -- GHC.Tc.TyCl.Instance. Skip for a tiny performance win.-- | otherwise- = loc { ctl_origin = mk_sc_origin (ctLocOrigin loc) }-- -- See Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance- -- for explanation of GivenSCOrigin and Note [Replacement vs keeping] in- -- GHC.Tc.Solver.Interact for why we need depths- mk_sc_origin :: CtOrigin -> CtOrigin- mk_sc_origin (GivenSCOrigin skol_info sc_depth already_blocked)- = GivenSCOrigin skol_info (sc_depth + 1)- (already_blocked || newly_blocked skol_info)-- mk_sc_origin (GivenOrigin skol_info)- = -- These cases do not already have a superclass constraint: depth starts at 1- GivenSCOrigin skol_info 1 (newly_blocked skol_info)-- mk_sc_origin other_orig = pprPanic "Given constraint without given origin" $- ppr evar $$ ppr other_orig-- newly_blocked (InstSkol _ head_size) = isJust (this_size `ltPatersonSize` head_size)- newly_blocked _ = False--mk_strict_superclasses rec_clss ev tvs theta cls tys- | all noFreeVarsOfType tys- = return [] -- Wanteds with no variables yield no superclass constraints.- -- See Note [Improvement from Ground Wanteds]-- | otherwise -- Wanted case, just add Wanted superclasses- -- that can lead to improvement.- = assertPpr (null tvs && null theta) (ppr tvs $$ ppr theta) $- concatMapM do_one (immSuperClasses cls tys)- where- loc = ctEvLoc ev `updateCtLocOrigin` WantedSuperclassOrigin (ctEvPred ev)-- do_one sc_pred- = do { traceTcS "mk_strict_superclasses Wanted" (ppr (mkClassPred cls tys) $$ ppr sc_pred)- ; sc_ev <- newWantedNC loc (ctEvRewriters ev) sc_pred- ; mk_superclasses rec_clss sc_ev [] [] sc_pred }--{- Note [Improvement from Ground Wanteds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose class C b a => D a b-and consider- [W] D Int Bool-Is there any point in emitting [W] C Bool Int? No! The only point of-emitting superclass constraints for W constraints is to get-improvement, extra unifications that result from functional-dependencies. See Note [Why adding superclasses can help] above.--But no variables means no improvement; case closed.--}--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 })---{- Note [Equality superclasses in quantified constraints]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (#15359, #15593, #15625)- f :: (forall a. theta => a ~ b) => stuff--It's a bit odd to have a local, quantified constraint for `(a~b)`,-but some people want such a thing (see the tickets). And for-Coercible it is definitely useful- f :: forall m. (forall p q. Coercible p q => Coercible (m p) (m q)))- => stuff--Moreover it's not hard to arrange; we just need to look up /equality/-constraints in the quantified-constraint environment, which we do in-GHC.Tc.Solver.Interact.doTopReactOther.--There is a wrinkle though, in the case where 'theta' is empty, so-we have- f :: (forall a. a~b) => stuff--Now, potentially, the superclass machinery kicks in, in-makeSuperClasses, giving us a a second quantified constraint- (forall a. a ~# b)-BUT this is an unboxed value! And nothing has prepared us for-dictionary "functions" that are unboxed. Actually it does just-about work, but the simplifier ends up with stuff like- case (/\a. eq_sel d) of df -> ...(df @Int)...-and fails to simplify that any further. And it doesn't satisfy-isPredTy any more.--So for now we simply decline to take superclasses in the quantified-case. Instead we have a special case in GHC.Tc.Solver.Interact.doTopReactOther,-which looks for primitive equalities specially in the quantified-constraints.--See also Note [Evidence for quantified constraints] in GHC.Core.Predicate.---************************************************************************-* *-* Irreducibles canonicalization-* *-************************************************************************--}--canIrred :: CtEvidence -> TcS (StopOrContinue Ct)--- Precondition: ty not a tuple and no other evidence form-canIrred ev- = do { let pred = ctEvPred ev- ; traceTcS "can_pred" (text "IrredPred = " <+> ppr pred)- ; (redn, rewriters) <- rewrite ev pred- ; rewriteEvidence rewriters ev redn `andWhenContinue` \ new_ev ->-- do { -- Re-classify, in case rewriting has improved its shape- -- Code is like the canNC, except- -- that the IrredPred branch stops work- ; case classifyPredType (ctEvPred new_ev) of- ClassPred cls tys -> canClassNC new_ev cls tys- EqPred eq_rel ty1 ty2 -> -- IrredPreds have kind Constraint, so- -- cannot become EqPreds- pprPanic "canIrred: EqPred"- (ppr ev $$ ppr eq_rel $$ ppr ty1 $$ ppr ty2)- ForAllPred tvs th p -> -- this is highly suspect; Quick Look- -- should never leave a meta-var filled- -- in with a polytype. This is #18987.- do traceTcS "canEvNC:forall" (ppr pred)- canForAllNC ev tvs th p- IrredPred {} -> continueWith $- mkIrredCt IrredShapeReason new_ev } }--{- *********************************************************************-* *-* 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://gitlab.haskell.org/ghc/ghc/wikis/quantified-constraints-which in turn contains a link to the GHC Proposal where the change-is specified, and a Haskell Symposium paper about it.--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 support 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 quantified 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.-- * Predicate.Pred gets a new constructor ForAllPred, and- and classifyPredType analyses a PredType to decompose- the new forall-constraints-- * GHC.Tc.Solver.Monad.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- GHC.Tc.Solver.Interact.matchInstEnv, use the InstEnv from inert_insts- so that we include the local Given forall-constraints- in the lookup. (See GHC.Tc.Solver.Monad.getInstEnvs.)-- * GHC.Tc.Solver.Canonical.canForAll deals with solving a- forall-constraint. See- 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 GHC.Tc.Solver.Monad.kick_out_rewritable--Note that a quantified constraint is never /inferred/-(by GHC.Tc.Solver.simplifyInfer). A function can only have a-quantified constraint in its type if it is given an explicit-type signature.---}--canForAllNC :: CtEvidence -> [TyVar] -> TcThetaType -> TcPredType- -> TcS (StopOrContinue Ct)-canForAllNC ev tvs theta pred- | isGiven ev -- See Note [Eagerly expand given superclasses]- , Just (cls, tys) <- cls_pred_tys_maybe- = do { sc_cts <- mkStrictSuperClasses ev tvs theta cls tys- ; emitWork sc_cts- ; canForAll ev False }-- | otherwise- = canForAll ev (isJust cls_pred_tys_maybe)-- where- cls_pred_tys_maybe = getClassPredTys_maybe pred--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- let pred = ctEvPred ev- ; (redn, rewriters) <- rewrite ev pred- ; rewriteEvidence rewriters ev redn `andWhenContinue` \ new_ev ->-- do { -- Now decompose into its pieces and solve it- -- (It takes a lot less code to rewrite before decomposing.)- ; case classifyPredType (ctEvPred new_ev) of- ForAllPred tvs theta pred- -> solveForAll new_ev tvs theta pred pend_sc- _ -> pprPanic "canForAll" (ppr new_ev)- } }--solveForAll :: CtEvidence -> [TyVar] -> TcThetaType -> PredType -> Bool- -> TcS (StopOrContinue Ct)-solveForAll ev@(CtWanted { ctev_dest = dest, ctev_rewriters = rewriters, ctev_loc = loc })- tvs theta pred _pend_sc- = -- See Note [Solving a Wanted forall-constraint]- setLclEnv (ctLocEnv loc) $- -- This setLclEnv is important: the emitImplicationTcS uses that- -- TcLclEnv for the implication, and that in turn sets the location- -- for the Givens when solving the constraint (#21006)- do { let empty_subst = mkEmptySubst $ mkInScopeSet $- tyCoVarsOfTypes (pred:theta) `delVarSetList` tvs- is_qc = IsQC (ctLocOrigin loc)-- -- rec {..}: see Note [Keeping SkolemInfo inside a SkolemTv]- -- in GHC.Tc.Utils.TcType- -- Very like the code in tcSkolDFunType- ; rec { skol_info <- mkSkolemInfo skol_info_anon- ; (subst, skol_tvs) <- tcInstSkolTyVarsX skol_info empty_subst tvs- ; let inst_pred = substTy subst pred- inst_theta = substTheta subst theta- skol_info_anon = InstSkol is_qc (get_size inst_pred) }-- ; given_ev_vars <- mapM newEvVar inst_theta- ; (lvl, (w_id, wanteds))- <- pushLevelNoWorkList (ppr skol_info) $- do { let loc' = setCtLocOrigin loc (ScOrigin is_qc NakedSc)- -- Set the thing to prove to have a ScOrigin, so we are- -- careful about its termination checks.- -- See (QC-INV) in Note [Solving a Wanted forall-constraint]- ; wanted_ev <- newWantedEvVarNC loc' rewriters inst_pred- ; return ( ctEvEvId wanted_ev- , unitBag (mkNonCanonical wanted_ev)) }-- ; ev_binds <- emitImplicationTcS lvl (getSkolemInfo skol_info) skol_tvs- given_ev_vars wanteds-- ; 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" }- where- -- Getting the size of the head is a bit horrible- -- because of the special treament for class predicates- get_size pred = case classifyPredType pred of- ClassPred cls tys -> pSizeClassPred cls tys- _ -> pSizeType pred-- -- See Note [Solving a Given forall-constraint]-solveForAll ev@(CtGiven {}) tvs _theta pred pend_sc- = do { addInertForAll qci- ; stopWith ev "Given forall-constraint" }- where- 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.--The tricky point is about termination: see #19690. We want to maintain-the invariant (QC-INV):-- (QC-INV) Every quantified constraint returns a non-bottom dictionary--just as every top-level instance declaration guarantees to return a non-bottom-dictionary. But as #19690 shows, it is possible to get a bottom dicionary-by superclass selection if we aren't careful. The situation is very similar-to that described in Note [Recursive superclasses] in GHC.Tc.TyCl.Instance;-and we use the same solution:--* Give the Givens a CtOrigin of (GivenOrigin (InstSkol IsQC head_size))-* Give the Wanted a CtOrigin of (ScOrigin IsQC NakedSc)--Both of these things are done in solveForAll. Now the mechanism described-in Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance takes over.--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-* *-************************************************************************--Note [Canonicalising equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In order to canonicalise an equality, we look at the structure of the-two types at hand, looking for similarities. A difficulty is that the-types may look dissimilar before rewriting but similar after rewriting.-However, we don't just want to jump in and rewrite right away, because-this might be wasted effort. So, after looking for similarities and failing,-we rewrite and then try again. Of course, we don't want to loop, so we-track whether or not we've already rewritten.--It is conceivable to do a better job at tracking whether or not a type-is rewritten, but this is left as future work. (Mar '15)--Note [Decomposing FunTy]-~~~~~~~~~~~~~~~~~~~~~~~~-can_eq_nc' may attempt to decompose a FunTy that is un-zonked. This-means that we may very well have a FunTy containing a type of some-unknown kind. For instance, we may have,-- FunTy (a :: k) Int--Where k is a unification variable. So the calls to splitRuntimeRep_maybe may-fail (returning Nothing). In that case we'll fall through, zonk, and try again.-Zonking should fill the variable k, meaning that decomposition will succeed the-second time around.--Also note that we require the FunTyFlag to match. This will stop-us decomposing- (Int -> Bool) ~ (Show a => blah)-It's as if we treat (->) and (=>) as different type constructors, which-indeed they are!--}--canEqNC :: CtEvidence -> EqRel -> Type -> Type -> TcS (StopOrContinue Ct)-canEqNC ev eq_rel ty1 ty2- = do { result <- zonk_eq_types ty1 ty2- ; case result of- Right ty -> canEqReflexive ev eq_rel ty- Left (Pair ty1' ty2') -> can_eq_nc False ev' eq_rel ty1' ty1' ty2' ty2'- where- ev' | debugIsOn = setCtEvPredType ev $- mkPrimEqPredRole (eqRelRole eq_rel) ty1' ty2'- | otherwise = ev- -- ev': satisfy the precondition of can_eq_nc- }--can_eq_nc- :: Bool -- True => both types are rewritten- -> CtEvidence- -> EqRel- -> Type -> Type -- LHS, after and before type-synonym expansion, resp- -> Type -> Type -- RHS, after and before type-synonym expansion, resp- -> TcS (StopOrContinue Ct)--- Precondition: in DEBUG mode, the `ctev_pred` of `ev` is (ps_ty1 ~# ps_ty2),--- without zonking--- This precondition is needed (only in DEBUG) to satisfy the assertions--- in mkSelCo, called in canDecomposableTyConAppOK and canDecomposableFunTy--can_eq_nc rewritten ev eq_rel ty1 ps_ty1 ty2 ps_ty2- = do { traceTcS "can_eq_nc" $- vcat [ ppr rewritten, ppr ev, ppr eq_rel, ppr ty1, ppr ps_ty1, ppr ty2, ppr ps_ty2 ]- ; rdr_env <- getGlobalRdrEnvTcS- ; fam_insts <- getFamInstEnvs- ; can_eq_nc' rewritten rdr_env fam_insts ev eq_rel ty1 ps_ty1 ty2 ps_ty2 }--can_eq_nc'- :: Bool -- True => both input types are rewritten- -> GlobalRdrEnv -- needed to see which newtypes are in scope- -> FamInstEnvs -- needed to unwrap data instances- -> CtEvidence- -> EqRel- -> Type -> Type -- LHS, after and before type-synonym expansion, resp- -> Type -> Type -- RHS, after and before type-synonym expansion, resp- -> TcS (StopOrContinue Ct)---- See Note [Comparing nullary type synonyms] in GHC.Core.Type.-can_eq_nc' _flat _rdr_env _envs ev eq_rel ty1@(TyConApp tc1 []) _ps_ty1 (TyConApp tc2 []) _ps_ty2- | tc1 == tc2- = canEqReflexive ev eq_rel ty1---- Expand synonyms first; see Note [Type synonyms and canonicalization]-can_eq_nc' rewritten rdr_env envs ev eq_rel ty1 ps_ty1 ty2 ps_ty2- | Just ty1' <- coreView ty1 = can_eq_nc' rewritten rdr_env envs ev eq_rel ty1' ps_ty1 ty2 ps_ty2- | Just ty2' <- coreView ty2 = can_eq_nc' rewritten rdr_env envs ev eq_rel ty1 ps_ty1 ty2' ps_ty2---- need to check for reflexivity in the ReprEq case.--- See Note [Eager reflexivity check]--- Check only when rewritten because the zonk_eq_types check in canEqNC takes--- care of the non-rewritten case.-can_eq_nc' True _rdr_env _envs ev ReprEq ty1 _ ty2 _- | ty1 `tcEqType` ty2- = canEqReflexive ev ReprEq ty1---- When working with ReprEq, unwrap newtypes.--- See Note [Unwrap newtypes first]--- This must be above the TyVarTy case, in order to guarantee (TyEq:N)-can_eq_nc' _rewritten 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-- | 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' rewritten _rdr_env _envs ev eq_rel (CastTy ty1 co1) _ ty2 ps_ty2- | isNothing (canEqLHS_maybe ty2) -- See (3) in Note [Equalities with incompatible kinds]- = canEqCast rewritten ev eq_rel NotSwapped ty1 co1 ty2 ps_ty2-can_eq_nc' rewritten _rdr_env _envs ev eq_rel ty1 ps_ty1 (CastTy ty2 co2) _- | isNothing (canEqLHS_maybe ty1) -- See (3) in Note [Equalities with incompatible kinds]- = canEqCast rewritten ev eq_rel IsSwapped ty2 co2 ty1 ps_ty1--------------------------- Otherwise try to decompose--------------------------- Literals-can_eq_nc' _rewritten _rdr_env _envs ev eq_rel ty1@(LitTy l1) _ (LitTy l2) _- | l1 == l2- = do { setEvBindIfWanted ev (evCoercion $ mkReflCo (eqRelRole eq_rel) ty1)- ; stopWith ev "Equal LitTy" }---- Decompose FunTy: (s -> t) and (c => t)--- NB: don't decompose (Int -> blah) ~ (Show a => blah)-can_eq_nc' _rewritten _rdr_env _envs ev eq_rel- (FunTy { ft_mult = am1, ft_af = af1, ft_arg = ty1a, ft_res = ty1b }) _ps_ty1- (FunTy { ft_mult = am2, ft_af = af2, ft_arg = ty2a, ft_res = ty2b }) _ps_ty2- | af1 == af2 -- See Note [Decomposing FunTy]- = canDecomposableFunTy ev eq_rel af1 (am1,ty1a,ty1b) (am2,ty2a,ty2b)---- Decompose type constructor applications--- NB: we have expanded type synonyms already-can_eq_nc' _rewritten _rdr_env _envs ev eq_rel ty1 _ ty2 _- | Just (tc1, tys1) <- tcSplitTyConApp_maybe ty1- , Just (tc2, tys2) <- tcSplitTyConApp_maybe ty2- -- we want to catch e.g. Maybe Int ~ (Int -> Int) here for better- -- error messages rather than decomposing into AppTys;- -- hence no direct match on TyConApp- , not (isTypeFamilyTyCon tc1)- , not (isTypeFamilyTyCon tc2)- = canTyConApp ev eq_rel tc1 tys1 tc2 tys2--can_eq_nc' _rewritten _rdr_env _envs ev eq_rel- s1@(ForAllTy (Bndr _ vis1) _) _- s2@(ForAllTy (Bndr _ vis2) _) _- | vis1 `eqForAllVis` vis2 -- Note [ForAllTy and type equality]- = can_eq_nc_forall ev eq_rel s1 s2---- See Note [Canonicalising type applications] about why we require rewritten types--- Use tcSplitAppTy, not matching on AppTy, to catch oversaturated type families--- NB: Only decompose AppTy for nominal equality.--- See Note [Decomposing AppTy equalities]-can_eq_nc' True _rdr_env _envs ev NomEq ty1 _ ty2 _- | Just (t1, s1) <- tcSplitAppTy_maybe ty1- , Just (t2, s2) <- tcSplitAppTy_maybe ty2- = can_eq_app ev t1 s1 t2 s2------------------------ Can't decompose.------------------------ No similarity in type structure detected. Rewrite and try again.-can_eq_nc' False rdr_env envs ev eq_rel _ ps_ty1 _ ps_ty2- = -- Rewrite the two types and try again- do { (redn1@(Reduction _ xi1), rewriters1) <- rewrite ev ps_ty1- ; (redn2@(Reduction _ xi2), rewriters2) <- rewrite ev ps_ty2- ; new_ev <- rewriteEqEvidence (rewriters1 S.<> rewriters2) ev NotSwapped redn1 redn2- ; can_eq_nc' True rdr_env envs new_ev eq_rel xi1 xi1 xi2 xi2 }--------------------------------- Look for a canonical LHS. See Note [Canonical LHS].--- Only rewritten types end up below here.--------------------------------- NB: pattern match on True: we want only rewritten types sent to canEqLHS--- This means we've rewritten any variables and reduced any type family redexes--- 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 can_eq_lhs1 <- canEqLHS_maybe ty1- = canEqCanLHS ev eq_rel NotSwapped can_eq_lhs1 ps_ty1 ty2 ps_ty2-- | Just can_eq_lhs2 <- canEqLHS_maybe ty2- = canEqCanLHS ev eq_rel IsSwapped can_eq_lhs2 ps_ty2 ty1 ps_ty1-- -- If the type is TyConApp tc1 args1, then args1 really can't be less- -- than tyConArity tc1. It could be *more* than tyConArity, but then we- -- should have handled the case as an AppTy. That case only fires if- -- _both_ sides of the equality are AppTy-like... but if one side is- -- AppTy-like and the other isn't (and it also isn't a variable or- -- saturated type family application, both of which are handled by- -- can_eq_nc'), we're in a failure mode and can just fall through.--------------------------------- Fall-through. Give up.--------------------------------- We've rewritten and the types don't match. Give up.-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)- ; case eq_rel of -- See Note [Unsolved equalities]- ReprEq -> continueWith (mkIrredCt ReprEqReason ev)- NomEq -> continueWith (mkIrredCt ShapeMismatchReason ev) }- -- No need to call canEqFailure/canEqHardFailure because they- -- rewrite, and the types involved here are already rewritten---{- 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 #15431--}------------------------------------can_eq_nc_forall :: CtEvidence -> EqRel- -> Type -> Type -- LHS and RHS- -> TcS (StopOrContinue Ct)--- (forall as. phi1) ~ (forall bs. phi2)--- Check for length match of as, bs--- Then build an implication constraint: forall as. phi1 ~ phi2[as/bs]--- But remember also to unify the kinds of as and bs--- (this is the 'go' loop), and actually substitute phi2[as |> cos / bs]--- Remember also that we might have forall z (a:z). blah--- so we must proceed one binder at a time (#13879)--can_eq_nc_forall ev eq_rel s1 s2- | CtWanted { ctev_loc = loc, ctev_dest = orig_dest, ctev_rewriters = rewriters } <- ev- = do { let free_tvs = tyCoVarsOfTypes [s1,s2]- (bndrs1, phi1) = tcSplitForAllTyVarBinders s1- (bndrs2, phi2) = tcSplitForAllTyVarBinders s2- ; if not (equalLength bndrs1 bndrs2)- then do { traceTcS "Forall failure" $- vcat [ ppr s1, ppr s2, ppr bndrs1, ppr bndrs2- , ppr (binderFlags bndrs1)- , ppr (binderFlags bndrs2) ]- ; canEqHardFailure ev s1 s2 }- else- do { traceTcS "Creating implication for polytype equality" $ ppr ev- ; let empty_subst1 = mkEmptySubst $ mkInScopeSet free_tvs- ; skol_info <- mkSkolemInfo (UnifyForAllSkol phi1)- ; (subst1, skol_tvs) <- tcInstSkolTyVarsX skol_info empty_subst1 $- binderVars bndrs1-- ; let phi1' = substTy subst1 phi1-- -- Unify the kinds, extend the substitution- go :: [TcTyVar] -> Subst -> [TyVarBinder]- -> TcS (TcCoercion, Cts)- go (skol_tv:skol_tvs) subst (bndr2:bndrs2)- = do { let tv2 = binderVar bndr2- ; (kind_co, wanteds1) <- unify loc rewriters Nominal (tyVarKind skol_tv)- (substTy subst (tyVarKind tv2))- ; let subst' = extendTvSubstAndInScope subst tv2- (mkCastTy (mkTyVarTy skol_tv) kind_co)- -- skol_tv is already in the in-scope set, but the- -- free vars of kind_co are not; hence "...AndInScope"- ; (co, wanteds2) <- go skol_tvs subst' bndrs2- ; return ( mkForAllCo skol_tv kind_co co- , wanteds1 `unionBags` wanteds2 ) }-- -- Done: unify phi1 ~ phi2- go [] subst bndrs2- = assert (null bndrs2) $- unify loc rewriters (eqRelRole eq_rel) phi1' (substTyUnchecked subst phi2)-- go _ _ _ = panic "cna_eq_nc_forall" -- case (s:ss) []-- empty_subst2 = mkEmptySubst (getSubstInScope subst1)-- ; (lvl, (all_co, wanteds)) <- pushLevelNoWorkList (ppr skol_info) $- go skol_tvs empty_subst2 bndrs2- ; emitTvImplicationTcS lvl (getSkolemInfo skol_info) skol_tvs wanteds-- ; setWantedEq orig_dest all_co- ; stopWith ev "Deferred polytype equality" } }-- | otherwise- = do { traceTcS "Omitting decomposition of given polytype equality" $- pprEq s1 s2 -- See Note [Do not decompose Given polytype equalities]- ; stopWith ev "Discard given polytype equality" }-- where- unify :: CtLoc -> RewriterSet -> Role -> TcType -> TcType -> TcS (TcCoercion, Cts)- -- This version returns the wanted constraint rather- -- than putting it in the work list- unify loc rewriters role ty1 ty2- | ty1 `tcEqType` ty2- = return (mkReflCo role ty1, emptyBag)- | otherwise- = do { (wanted, co) <- newWantedEq loc rewriters 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.--- This is quite handy when some unification has made two--- types in an inert Wanted to be equal. We can discover the equality without--- rewriting, which is sometimes very expensive (in the case of type functions).--- In particular, this function makes a ~20% improvement in test case--- perf/compiler/T5030.------ Returns either the (partially zonked) types in the case of--- inequality, or the one type in the case of equality. canEqReflexive is--- a good next step in the 'Right' case. Returning 'Left' is always safe.------ NB: This does *not* look through type synonyms. In fact, it treats type--- synonyms as rigid constructors. In the future, it might be convenient--- to look at only those arguments of type synonyms that actually appear--- in the synonym RHS. But we're not there yet.-zonk_eq_types :: TcType -> TcType -> TcS (Either (Pair TcType) TcType)-zonk_eq_types = go- where- go (TyVarTy tv1) (TyVarTy tv2) = tyvar_tyvar tv1 tv2- go (TyVarTy tv1) ty2 = tyvar NotSwapped tv1 ty2- go ty1 (TyVarTy tv2) = tyvar IsSwapped tv2 ty1-- -- We handle FunTys explicitly here despite the fact that they could also be- -- treated as an application. Why? Well, for one it's cheaper to just look- -- at two types (the argument and result types) than four (the argument,- -- result, and their RuntimeReps). Also, we haven't completely zonked yet,- -- so we may run into an unzonked type variable while trying to compute the- -- RuntimeReps of the argument and result types. This can be observed in- -- testcase tc269.- go (FunTy af1 w1 arg1 res1) (FunTy af2 w2 arg2 res2)- | af1 == af2- , eqType w1 w2- = do { res_a <- go arg1 arg2- ; res_b <- go res1 res2- ; return $ combine_rev (FunTy af1 w1) res_b res_a }-- go ty1@(FunTy {}) ty2 = bale_out ty1 ty2- go ty1 ty2@(FunTy {}) = bale_out ty1 ty2-- go ty1 ty2- | Just (tc1, tys1) <- splitTyConAppNoView_maybe ty1- , Just (tc2, tys2) <- splitTyConAppNoView_maybe ty2- = if tc1 == tc2 && tys1 `equalLength` tys2- -- Crucial to check for equal-length args, because- -- we cannot assume that the two args to 'go' have- -- the same kind. E.g go (Proxy * (Maybe Int))- -- (Proxy (*->*) Maybe)- -- We'll call (go (Maybe Int) Maybe)- -- See #13083- then tycon tc1 tys1 tys2- else bale_out ty1 ty2-- go ty1 ty2- | Just (ty1a, ty1b) <- tcSplitAppTyNoView_maybe ty1- , Just (ty2a, ty2b) <- tcSplitAppTyNoView_maybe ty2- = do { res_a <- go ty1a ty2a- ; res_b <- go ty1b ty2b- ; return $ combine_rev mkAppTy res_b res_a }-- go ty1@(LitTy lit1) (LitTy lit2)- | lit1 == lit2- = return (Right ty1)-- go ty1 ty2 = bale_out ty1 ty2- -- We don't handle more complex forms here-- bale_out ty1 ty2 = return $ Left (Pair ty1 ty2)-- tyvar :: SwapFlag -> TcTyVar -> TcType- -> TcS (Either (Pair TcType) TcType)- -- Try to do as little as possible, as anything we do here is redundant- -- with rewriting. In particular, no need to zonk kinds. That's why- -- we don't use the already-defined zonking functions- tyvar swapped tv ty- = case tcTyVarDetails tv of- MetaTv { mtv_ref = ref }- -> do { cts <- readTcRef ref- ; case cts of- Flexi -> give_up- Indirect ty' -> do { trace_indirect tv ty'- ; unSwap swapped go ty' ty } }- _ -> give_up- where- give_up = return $ Left $ unSwap swapped Pair (mkTyVarTy tv) ty-- tyvar_tyvar tv1 tv2- | tv1 == tv2 = return (Right (mkTyVarTy tv1))- | otherwise = do { (ty1', progress1) <- quick_zonk tv1- ; (ty2', progress2) <- quick_zonk tv2- ; if progress1 || progress2- then go ty1' ty2'- else return $ Left (Pair (TyVarTy tv1) (TyVarTy tv2)) }-- trace_indirect tv ty- = traceTcS "Following filled tyvar (zonk_eq_types)"- (ppr tv <+> equals <+> ppr ty)-- quick_zonk tv = case tcTyVarDetails tv of- MetaTv { mtv_ref = ref }- -> do { cts <- readTcRef ref- ; case cts of- Flexi -> return (TyVarTy tv, False)- Indirect ty' -> do { trace_indirect tv ty'- ; return (ty', True) } }- _ -> return (TyVarTy tv, False)-- -- This happens for type families, too. But recall that failure- -- here just means to try harder, so it's OK if the type function- -- isn't injective.- tycon :: TyCon -> [TcType] -> [TcType]- -> TcS (Either (Pair TcType) TcType)- tycon tc tys1 tys2- = do { results <- zipWithM go tys1 tys2- ; return $ case combine_results results of- Left tys -> Left (mkTyConApp tc <$> tys)- Right tys -> Right (mkTyConApp tc tys) }-- combine_results :: [Either (Pair TcType) TcType]- -> Either (Pair [TcType]) [TcType]- combine_results = bimap (fmap reverse) reverse .- foldl' (combine_rev (:)) (Right [])-- -- combine (in reverse) a new result onto an already-combined result- combine_rev :: (a -> b -> c)- -> Either (Pair b) b- -> Either (Pair a) a- -> Either (Pair c) c- combine_rev f (Left list) (Left elt) = Left (f <$> elt <*> list)- combine_rev f (Left list) (Right ty) = Left (f <$> pure ty <*> list)- combine_rev f (Right tys) (Left elt) = Left (f <$> elt <*> pure tys)- combine_rev f (Right tys) (Right ty) = Right (f ty tys)--{- Note [Unwrap newtypes first]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See also Note [Decomposing newtype equalities]--Consider- newtype N m a = MkN (m a)-N will get a conservative, Nominal role for its second parameter '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.--Conclusion: we must unwrap newtypes before decomposing them. This happens-in `can_eq_newtype_nc`--We did flirt with making the /rewriter/ expand newtypes, rather than-doing it in `can_eq_newtype_nc`. But with recursive newtypes we want-to be super-careful about expanding!-- newtype A = MkA [A] -- Recursive!-- f :: A -> [A]- f = coerce--We have [W] A ~R# [A]. If we rewrite [A], it'll expand to- [[[[[...]]]]]-and blow the reduction stack. See Note [Newtypes can blow the stack]-in GHC.Tc.Solver.Rewrite. But if we expand only the /top level/ of-both sides, we get- [W] [A] ~R# [A]-which we can, just, solve by reflexivity.--So we simply unwrap, on-demand, at top level, in `can_eq_newtype_nc`.--This is all very delicate. There is a real risk of a loop in the type checker-with recursive newtypes -- but I think we're doomed to do *something*-delicate, as we're really trying to solve for equirecursive type-equality. Bottom line for users: recursive newtypes do not play well with type-inference for representational equality. See also Section 5.3.1 and 5.3.4 of-"Safe Zero-cost Coercions for Haskell" (JFP 2016).--See also Note [Decomposing newtype equalities].----- Historical side note -----We flirted with doing /both/ unwrap-at-top-level /and/ rewrite-deeply;-see #22519. But that didn't work: see discussion in #22924. Specifically-we got a loop with a minor variation:- f2 :: a -> [A]- f2 = coerce--Note [Eager reflexivity check]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have-- newtype X = MkX (Int -> X)--and-- [W] X ~R X--Naively, we would start unwrapping X and end up in a loop. Instead,-we do this eager reflexivity check. This is necessary only for representational-equality because the rewriter technology deals with the similar case-(recursive type families) for nominal equality.--Note that this check does not catch all cases, but it will catch the cases-we're most worried about, types like X above that are actually inhabited.--Here's another place where this reflexivity check is key:-Consider trying to prove (f a) ~R (f a). The AppTys in there can't-be decomposed, because representational equality isn't congruent with respect-to AppTy. So, when canonicalising the equality above, we get stuck and-would normally produce a CIrredCan. However, we really do want to-be able to solve (f a) ~R (f a). So, in the representational case only,-we do a reflexivity check.--(This would be sound in the nominal case, but unnecessary, and I [Richard-E.] am worried that it would slow down the common case.)-- Note [Newtypes can blow the stack]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have-- newtype X = MkX (Int -> X)- newtype Y = MkY (Int -> Y)--and now wish to prove-- [W] X ~R Y--This Wanted will loop, expanding out the newtypes ever deeper looking-for a solid match or a solid discrepancy. Indeed, there is something-appropriate to this looping, because X and Y *do* have the same representation,-in the limit -- they're both (Fix ((->) Int)). However, no finitely-sized-coercion will ever witness it. This loop won't actually cause GHC to hang,-though, because we check our depth in `can_eq_newtype_nc`.--}----------------------------- | We're able to unwrap a newtype. Update the bits accordingly.-can_eq_newtype_nc :: CtEvidence -- ^ :: ty1 ~ ty2- -> SwapFlag- -> TcType -- ^ ty1- -> ((Bag GlobalRdrElt, TcCoercion), TcType) -- ^ :: ty1 ~ ty1'- -> TcType -- ^ ty2- -> TcType -- ^ ty2, with type synonyms- -> TcS (StopOrContinue Ct)-can_eq_newtype_nc ev swapped ty1 ((gres, co1), ty1') ty2 ps_ty2- = do { traceTcS "can_eq_newtype_nc" $- vcat [ ppr ev, ppr swapped, ppr co1, ppr gres, ppr ty1', ppr ty2 ]-- -- Check for blowing our stack, and increase the depth- -- See Note [Newtypes can blow the stack]- ; let loc = ctEvLoc ev- ev' = ev `setCtEvLoc` bumpCtLocDepth loc- ; checkReductionDepth loc ty1-- -- Next, we record uses of newtype constructors, since coercing- -- through newtypes is tantamount to using their constructors.- ; recordUsedGREs gres-- ; let redn1 = mkReduction co1 ty1'-- ; new_ev <- rewriteEqEvidence emptyRewriterSet ev' swapped- redn1- (mkReflRedn Representational ps_ty2)- ; can_eq_nc False new_ev ReprEq ty1' ty1' ty2 ps_ty2 }-------------- ^ Decompose a type application.--- All input types must be rewritten. See Note [Canonicalising type applications]--- Nominal equality only!-can_eq_app :: CtEvidence -- :: s1 t1 ~N s2 t2- -> Xi -> Xi -- s1 t1- -> Xi -> Xi -- s2 t2- -> TcS (StopOrContinue Ct)---- AppTys only decompose for nominal equality, so this case just leads--- to an irreducible constraint; see typecheck/should_compile/T10494--- See Note [Decomposing AppTy equalities]-can_eq_app ev s1 t1 s2 t2- | CtWanted { ctev_dest = dest, ctev_rewriters = rewriters } <- ev- = do { co_s <- unifyWanted rewriters loc Nominal s1 s2- ; let arg_loc- | isNextArgVisible s1 = loc- | otherwise = updateCtLocOrigin loc toInvisibleOrigin- ; co_t <- unifyWanted rewriters arg_loc Nominal t1 t2- ; 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 } <- ev- = do { let co = mkCoVarCo evar- co_s = mkLRCo CLeft co- co_t = mkLRCo CRight co- ; evar_s <- newGivenEvVar loc ( mkTcEqPredLikeEv ev s1 s2- , evCoercion co_s )- ; evar_t <- newGivenEvVar loc ( mkTcEqPredLikeEv ev t1 t2- , evCoercion co_t )- ; emitWorkNC [evar_t]- ; canEqNC evar_s NomEq s1 s2 }-- where- loc = ctEvLoc ev-- 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)-canEqCast :: Bool -- are both types rewritten?- -> CtEvidence- -> EqRel- -> SwapFlag- -> TcType -> Coercion -- LHS (res. RHS), ty1 |> co1- -> TcType -> TcType -- RHS (res. LHS), ty2 both normal and pretty- -> TcS (StopOrContinue Ct)-canEqCast rewritten ev eq_rel swapped ty1 co1 ty2 ps_ty2- = do { traceTcS "Decomposing cast" (vcat [ ppr ev- , ppr ty1 <+> text "|>" <+> ppr co1- , ppr ps_ty2 ])- ; new_ev <- rewriteEqEvidence emptyRewriterSet ev swapped- (mkGReflLeftRedn role ty1 co1)- (mkReflRedn role ps_ty2)- ; can_eq_nc rewritten new_ev eq_rel ty1 ty1 ty2 ps_ty2 }- where- role = eqRelRole eq_rel---------------------------canTyConApp :: CtEvidence -> EqRel- -> TyCon -> [TcType]- -> TyCon -> [TcType]- -> TcS (StopOrContinue Ct)--- See Note [Decomposing TyConApp equalities]--- See Note [Decomposing Dependent TyCons and Processing Wanted Equalities]--- Neither tc1 nor tc2 is a saturated funTyCon, nor a type family--- But they can be data families.-canTyConApp ev eq_rel tc1 tys1 tc2 tys2- | tc1 == tc2- , tys1 `equalLength` tys2- = do { inerts <- getTcSInerts- ; if can_decompose inerts- then canDecomposableTyConAppOK ev eq_rel tc1 tys1 tys2- else canEqFailure ev eq_rel ty1 ty2 }-- -- See Note [Skolem abstract data] in GHC.Core.Tycon- | tyConSkolem tc1 || tyConSkolem tc2- = do { traceTcS "canTyConApp: skolem abstract" (ppr tc1 $$ ppr tc2)- ; continueWith (mkIrredCt AbstractTyConReason ev) }-- -- Fail straight away for better error messages- -- See Note [Use canEqFailure in canDecomposableTyConApp]- | eq_rel == ReprEq && not (isGenerativeTyCon tc1 Representational &&- isGenerativeTyCon tc2 Representational)- = canEqFailure ev eq_rel ty1 ty2-- | otherwise- = canEqHardFailure ev ty1 ty2- where- -- Reconstruct the types for error messages. This would do- -- the wrong thing (from a pretty printing point of view)- -- for functions, because we've lost the FunTyFlag; but- -- in fact we never call canTyConApp on a saturated FunTyCon- ty1 = mkTyConApp tc1 tys1- ty2 = mkTyConApp tc2 tys2-- -- See Note [Decomposing TyConApp equalities]- -- and Note [Decomposing newtype equalities]- can_decompose inerts- = isInjectiveTyCon tc1 (eqRelRole eq_rel)- || (assert (eq_rel == ReprEq) $- -- assert: isInjectiveTyCon is always True for Nominal except- -- for type synonyms/families, neither of which happen here- -- Moreover isInjectiveTyCon is True for Representational- -- for algebraic data types. So we are down to newtypes- -- and data families.- ctEvFlavour ev == Wanted && noGivenNewtypeReprEqs tc1 inerts)- -- See Note [Decomposing newtype equalities] (EX2)--{--Note [Use canEqFailure in canDecomposableTyConApp]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We must use canEqFailure, not canEqHardFailure here, because there is-the possibility of success if working with a representational equality.-Here is one case:-- type family TF a where TF Char = Bool- data family DF a- newtype instance DF Bool = MkDF Int--Suppose we are canonicalising (Int ~R DF (TF a)), where we don't yet-know `a`. This is *not* a hard failure, because we might soon learn-that `a` is, in fact, Char, and then the equality succeeds.--Here is another case:-- [G] Age ~R Int--where Age's constructor is not in scope. We don't want to report-an "inaccessible code" error in the context of this Given!--For example, see typecheck/should_compile/T10493, repeated here:-- import Data.Ord (Down) -- no constructor-- foo :: Coercible (Down Int) Int => Down Int -> Int- foo = coerce--That should compile, but only because we use canEqFailure and not-canEqHardFailure.--Note [Fast path when decomposing TyConApps]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-If we see (T s1 t1 ~ T s2 t2), then we can just decompose to- (s1 ~ s2, t1 ~ t2)-and push those back into the work list. But if- s1 = K k1 s2 = K k2-then we will just decompose s1~s2, and it might be better to-do so on the spot. An important special case is where s1=s2,-and we get just Refl.--So canDecomposableTyConAppOK uses unifyWanted etc to short-cut that work.-See also Note [Decomposing Dependent TyCons and Processing Wanted Equalities]--Note [Decomposing TyConApp equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have- [G/W] T ty1 ~r T ty2-Can we decompose it, and replace it by- [G/W] ty1 ~r' ty2-and if so what role is r'? (In this Note, all the "~" are primitive-equalities "~#", but I have dropped the noisy "#" symbols.) Lots of-background in the paper "Safe zero-cost coercions for Haskell".--This Note covers the topic for- * Datatypes- * Newtypes- * Data families-For the rest:- * Type synonyms: are always expanded- * Type families: see Note [Decomposing type family applications]- * AppTy: see Note [Decomposing AppTy equalities].------ Roles of the decomposed constraints -----For a start, the role r' will always be defined like this:- * If r=N then r' = N- * If r=R then r' = role of T's first argument--For example:- data TR a = MkTR a -- Role of T's first arg is Representational- data TN a = MkTN (F a) -- Role of T's first arg is Nominal--The function tyConRolesX :: Role -> TyCon -> [Role] gets the argument-role r' for a TyCon T at role r. E.g.- tyConRolesX Nominal TR = [Nominal]- tyConRolesX Representational TR = [Representational]------ Soundness and completeness -----For Givens, for /soundness/ of decomposition we need, forall ty1,ty2:- T ty1 ~r T ty2 ===> ty1 ~r' ty2-Here "===>" means "implies". That is, given evidence for (co1 : T ty1 ~r T co2)-we can produce evidence for (co2 : ty1 ~r' ty2). But in the solver we-/replace/ co1 with co2 in the inert set, and we don't want to lose any proofs-thereby. So for /completeness/ of decomposition we also need the reverse:- ty1 ~r' ty2 ===> T ty1 ~r T ty2--For Wanteds, for /soundness/ of decomposition we need:- ty1 ~r' ty2 ===> T ty1 ~r T ty2-because if we do decompose we'll get evidence (co2 : ty1 ~r' ty2) and-from that we want to derive evidence (T co2 : T ty1 ~r T ty2).-For /completeness/ of decomposition we need the reverse implication too,-else we may decompose to a new proof obligation that is stronger than-the one we started with. See Note [Decomposing newtype equalities].------ Injectivity -----When do these bi-implications hold? In one direction it is easy.-We /always/ have- ty1 ~r' ty2 ===> T ty1 ~r T ty2-This is the CO_TYCONAPP rule of the paper (Fig 5); see also the-TyConAppCo case of GHC.Core.Lint.lintCoercion.--In the other direction, we have- T ty1 ~r T ty2 ==> ty1 ~r' ty2 if T is /injective at role r/-This is the very /definition/ of injectivity: injectivity means result-is the same => arguments are the same, modulo the role shift.-See comments on GHC.Core.TyCon.isInjectiveTyCon. This is also-the CO_NTH rule in Fig 5 of the paper, except in the paper only-newtypes are non-injective at representation role, so the rule says "H-is not a newtype".--Injectivity is a bit subtle:- Nominal Representational- Datatype YES YES- Newtype YES NO{1}- Data family YES NO{2}--{1} Consider newtype N a = MkN (F a) -- Arg has Nominal role- Is it true that (N t1) ~R (N t2) ==> t1 ~N t2 ?- No, absolutely not. E.g.- type instance F Int = Int; type instance F Bool = Char- Then (N Int) ~R (N Bool), by unwrapping, but we don't want Int~Char!-- See Note [Decomposing newtype equalities]--{2} We must treat data families precisely like newtypes, because of the- possibility of newtype instances. See also- Note [Decomposing newtype equalities]. See #10534 and- test case typecheck/should_fail/T10534.------ Takeaway summary ------For sound and complete decomposition, we simply need injectivity;-that is for isInjectiveTyCon to be true:--* At Nominal role, isInjectiveTyCon is True for all the TyCons we are- considering in this Note: datatypes, newtypes, and data families.--* For Givens, injectivity is necessary for soundness; completeness has no- side conditions.--* For Wanteds, soundness has no side conditions; but injectivity is needed- for completeness. See Note [Decomposing newtype equalities]--This is implemented in `can_decompose` in `canTyConApp`; it looks at-injectivity, just as specified above.---Note [Decomposing type family applications]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Supose we have- [G/W] (F ty1) ~r (F ty2)-This is handled by the TyFamLHS/TyFamLHS case of canEqCanLHS2.--We never decompose to- [G/W] ty1 ~r' ty2--Instead--* For Givens we do nothing. Injective type families have no corresponding- evidence of their injectivity, so we cannot decompose an- injective-type-family Given.--* For Wanteds, for the Nominal role only, we emit new Wanteds rather like- functional dependencies, for each injective argument position.-- E.g type family F a b -- injective in first arg, but not second- [W] (F s1 t1) ~N (F s2 t2)- Emit new Wanteds- [W] s1 ~N s2- But retain the existing, unsolved constraint.--Note [Decomposing newtype equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-This Note also applies to data families, which we treat like-newtype in case of 'newtype instance'.--As Note [Decomposing TyConApp equalities] describes, if N is injective-at role r, we can do this decomposition?- [G/W] (N ty1) ~r (N ty2) to [G/W] ty1 ~r' ty2--For a Given with r=R, the answer is a solid NO: newtypes are not injective at-representational role, and we must not decompose, or we lose soundness.-Example is wrinkle {1} in Note [Decomposing TyConApp equalities].--For a Wanted with r=R, since newtypes are not injective at representational-role, decomposition is sound, but we may lose completeness. Nevertheless,-if the newtype is abstract (so can't be unwrapped) we can only solve-the equality by (a) using a Given or (b) decomposition. If (a) is impossible-(e.g. no Givens) then (b) is safe albeit potentially incomplete.--There are two ways in which decomposing (N ty1) ~r (N ty2) could be incomplete:--* Incompleteness example (EX1): unwrap first- newtype Nt a = MkNt (Id a)- type family Id a where Id a = a-- [W] Nt Int ~R Nt Age-- Because of its use of a type family, Nt's parameter will get inferred to- have a nominal role. Thus, decomposing the wanted will yield [W] Int ~N Age,- which is unsatisfiable. Unwrapping, though, leads to a solution.-- Conclusion: always unwrap newtypes before attempting to decompose- them. This is done in can_eq_nc'. Of course, we can't unwrap if the data- constructor isn't in scope. See Note [Unwrap newtypes first].--* Incompleteness example (EX2): available Givens- newtype Nt a = Mk Bool -- NB: a is not used in the RHS,- type role Nt representational -- but the user gives it an R role anyway-- [G] Nt t1 ~R Nt t2- [W] Nt alpha ~R Nt beta-- We *don't* want to decompose to [W] alpha ~R beta, because it's possible- that alpha and beta aren't representationally equal. And if we figure- out (elsewhere) that alpha:=t1 and beta:=t2, we can solve the Wanted- from the Given. This is somewhat similar to the question of overlapping- Givens for class constraints: see Note [Instance and Given overlap] in- GHC.Tc.Solver.Interact.-- Conclusion: don't decompose [W] N s ~R N t, if there are any Given- equalities that could later solve it.-- But what precisely does it mean to say "any Given equalities that could- later solve it"?-- In #22924 we had- [G] f a ~R# a [W] Const (f a) a ~R# Const a a- where Const is an abstract newtype. If we decomposed the newtype, we- could solve. Not-decomposing on the grounds that (f a ~R# a) might turn- into (Const (f a) a ~R# Const a a) seems a bit silly.-- In #22331 we had- [G] N a ~R# N b [W] N b ~R# N a- (where N is abstract so we can't unwrap). Here we really /don't/ want to- decompose, because the /only/ way to solve the Wanted is from that Given- (with a Sym).-- In #22519 we had- [G] a <= b [W] IO Age ~R# IO Int-- (where IO is abstract so we can't unwrap, and newtype Age = Int; and (<=)- is a type-level comparison on Nats). Here we /must/ decompose, despite the- existence of an Irred Given, or we will simply be stuck. (Side note: We- flirted with deep-rewriting of newtypes (see discussion on #22519 and- !9623) but that turned out not to solve #22924, and also makes type- inference loop more often on recursive newtypes.)-- The currently-implemented compromise is this:-- we decompose [W] N s ~R# N t unless there is a [G] N s' ~ N t'-- that is, a Given Irred equality with both sides headed with N.- See the call to noGivenNewtypeReprEqs in canTyConApp.-- This is not perfect. In principle a Given like [G] (a b) ~ (c d), or- even just [G] c, could later turn into N s ~ N t. But since the free- vars of a Given are skolems, or at least untouchable unification- variables, this is extremely unlikely to happen.-- Another worry: there could, just, be a CDictCan with some- un-expanded equality superclasses; but only in some very obscure- recursive-superclass situations.-- Yet another approach (!) is desribed in- Note [Decomposing newtypes a bit more aggressively].--Remember: decomposing Wanteds is always /sound/. This Note is-only about /completeness/.--Note [Decomposing newtypes a bit more aggressively]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-IMPORTANT: the ideas in this Note are *not* implemented. Instead, the-current approach is detailed in Note [Decomposing newtype equalities]-and Note [Unwrap newtypes first].-For more details about the ideas in this Note see- * GHC propoosal: https://github.com/ghc-proposals/ghc-proposals/pull/549- * issue #22441- * discussion on !9282.--Consider [G] c, [W] (IO Int) ~R (IO Age)-where IO is abstract, and- newtype Age = MkAge Int -- Not abstract-With the above rules, if there any Given Irreds,-the Wanted is insoluble because we can't decompose it. But in fact,-if we look at the defn of IO, roughly,- newtype IO a = State# -> (State#, a)-we can see that decomposing [W] (IO Int) ~R (IO Age) to- [W] Int ~R Age-definitely does not lose completeness. Why not? Because the role of-IO's argment is representational. Hence:-- DecomposeNewtypeIdea:- decompose [W] (N s1 .. sn) ~R (N t1 .. tn)- if the roles of all N's arguments are representational--If N's arguments really /are/ representational this will not lose-completeness. Here "really are representational" means "if you expand-all newtypes in N's RHS, we'd infer a representational role for each-of N's type variables in that expansion". See Note [Role inference]-in GHC.Tc.TyCl.Utils.--But the user might /override/ a phantom role with an explicit role-annotation, and then we could (obscurely) get incompleteness.-Consider-- module A( silly, T ) where- newtype T a = MkT Int- type role T representational -- Override phantom role-- silly :: Coercion (T Int) (T Bool)- silly = Coercion -- Typechecks by unwrapping the newtype-- data Coercion a b where -- Actually defined in Data.Type.Coercion- Coercion :: Coercible a b => Coercion a b-- module B where- import A- f :: T Int -> T Bool- f = case silly of Coercion -> coerce--Here the `coerce` gives [W] (T Int) ~R (T Bool) which, if we decompose,-we'll get stuck with (Int ~R Bool). Instead we want to use the-[G] (T Int) ~R (T Bool), which will be in the Irreds.--Summary: we could adopt (DecomposeNewtypeIdea), at the cost of a very-obscure incompleteness (above). But no one is reporting a problem from-the lack of decompostion, so we'll just leave it for now. This long-Note is just to record the thinking for our future selves.--Note [Decomposing AppTy equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-For AppTy all the same questions arise as in-Note [Decomposing TyConApp equalities]. We have-- s1 ~r s2, t1 ~N t2 ==> s1 t1 ~r s2 t2 (rule CO_APP)- s1 t1 ~N s2 t2 ==> s1 ~N s2, t1 ~N t2 (CO_LEFT, CO_RIGHT)--In the first of these, why do we need Nominal equality in (t1 ~N t2)?-See {2} below.--For sound and complete solving, we need both directions to decompose. So:-* At nominal role, all is well: we have both directions.-* At representational role, decomposition of Givens is unsound (see {1} below),- and decomposition of Wanteds is incomplete.--Here is an example of the incompleteness for Wanteds:-- [G] g1 :: a ~R b- [W] w1 :: Maybe b ~R alpha a- [W] w2 :: alpha ~N Maybe--Suppose we see w1 before w2. If we decompose, using AppCo to prove w1, we get-- w1 := AppCo w3 w4- [W] w3 :: Maybe ~R alpha- [W] w4 :: b ~N a--Note that w4 is *nominal*. A nominal role here is necessary because AppCo-requires a nominal role on its second argument. (See {2} for an example of-why.) Now we are stuck, because w4 is insoluble. On the other hand, if we-see w2 first, setting alpha := Maybe, all is well, as we can decompose-Maybe b ~R Maybe a into b ~R a.--Another example:- newtype Phant x = MkPhant Int- [W] w1 :: Phant Int ~R alpha Bool- [W] w2 :: alpha ~ Phant--If we see w1 first, decomposing would be disastrous, as we would then try-to solve Int ~ Bool. Instead, spotting w2 allows us to simplify w1 to become- [W] w1' :: Phant Int ~R Phant Bool--which can then (assuming MkPhant is in scope) be simplified to Int ~R Int,-and all will be well. See also Note [Unwrap newtypes first].--Bottom line:-* Always decompose AppTy at nominal role: can_eq_app-* Never decompose AppTy at representational role (neither Given nor Wanted):- the lack of an equation in can_eq_nc'--Extra points-{1} Decomposing a Given AppTy over a representational role is simply- unsound. For example, if we have co1 :: Phant Int ~R a Bool (for- the newtype Phant, above), then we surely don't want any relationship- between Int and Bool, lest we also have co2 :: Phant ~ a around.--{2} The role on the AppCo coercion is a conservative choice, because we don't- know the role signature of the function. For example, let's assume we could- have a representational role on the second argument of AppCo. Then, consider-- data G a where -- G will have a nominal role, as G is a GADT- MkG :: G Int- newtype Age = MkAge Int-- co1 :: G ~R a -- by assumption- co2 :: Age ~R Int -- by newtype axiom- co3 = AppCo co1 co2 :: G Age ~R a Int -- by our broken AppCo-- and now co3 can be used to cast MkG to have type G Age, in violation of- the way GADTs are supposed to work (which is to use nominal equality).--}--canDecomposableTyConAppOK :: CtEvidence -> EqRel- -> TyCon -> [TcType] -> [TcType]- -> TcS (StopOrContinue Ct)--- Precondition: tys1 and tys2 are the same finite length, hence "OK"-canDecomposableTyConAppOK ev eq_rel tc tys1 tys2- = assert (tys1 `equalLength` tys2) $- do { traceTcS "canDecomposableTyConAppOK"- (ppr ev $$ ppr eq_rel $$ ppr tc $$ ppr tys1 $$ ppr tys2)- ; case ev of- CtWanted { ctev_dest = dest, ctev_rewriters = rewriters }- -- new_locs and tc_roles are both infinite, so- -- we are guaranteed that cos has the same lengthm- -- as tys1 and tys2- -- See Note [Fast path when decomposing TyConApps]- -- Caution: unifyWanteds is order sensitive- -- See Note [Decomposing Dependent TyCons and Processing Wanted Equalities]- -> do { cos <- unifyWanteds rewriters new_locs tc_roles tys1 tys2- ; setWantedEq dest (mkTyConAppCo role tc cos) }-- CtGiven { ctev_evar = evar }- -> do { let ev_co = mkCoVarCo evar- ; given_evs <- newGivenEvVars loc $- [ ( mkPrimEqPredRole r ty1 ty2- , evCoercion $ mkSelCo (SelTyCon i r) ev_co )- | (r, ty1, ty2, i) <- zip4 tc_roles tys1 tys2 [0..]- , r /= Phantom- , not (isCoercionTy ty1) && not (isCoercionTy ty2) ]- ; emitWorkNC given_evs }-- ; stopWith ev "Decomposed TyConApp" }-- where- loc = ctEvLoc ev- role = eqRelRole eq_rel-- -- Infinite, to allow for over-saturated TyConApps- tc_roles = tyConRoleListX role tc-- -- Add nuances to the location during decomposition:- -- * if the argument is a kind argument, remember this, so that error- -- messages say "kind", not "type". This is determined based on whether- -- the corresponding tyConBinder is named (that is, dependent)- -- * if the argument is invisible, note this as well, again by- -- looking at the corresponding binder- -- For oversaturated tycons, we need the (repeat loc) tail, which doesn't- -- do either of these changes. (Forgetting to do so led to #16188)- --- -- NB: infinite in length- new_locs = [ new_loc- | bndr <- tyConBinders tc- , let new_loc0 | isNamedTyConBinder bndr = toKindLoc loc- | otherwise = loc- new_loc | isInvisibleTyConBinder bndr- = updateCtLocOrigin new_loc0 toInvisibleOrigin- | otherwise- = new_loc0 ]- ++ repeat loc--canDecomposableFunTy :: CtEvidence -> EqRel -> FunTyFlag- -> (Type,Type,Type) -- (multiplicity,arg,res)- -> (Type,Type,Type) -- (multiplicity,arg,res)- -> TcS (StopOrContinue Ct)-canDecomposableFunTy ev eq_rel af f1@(m1,a1,r1) f2@(m2,a2,r2)- = do { traceTcS "canDecomposableFunTy"- (ppr ev $$ ppr eq_rel $$ ppr f1 $$ ppr f2)- ; case ev of- CtWanted { ctev_dest = dest, ctev_rewriters = rewriters }- -> do { mult <- unifyWanted rewriters mult_loc (funRole role SelMult) m1 m2- ; arg <- unifyWanted rewriters loc (funRole role SelArg) a1 a2- ; res <- unifyWanted rewriters loc (funRole role SelRes) r1 r2- ; setWantedEq dest (mkNakedFunCo1 role af mult arg res) }-- CtGiven { ctev_evar = evar }- -> do { let ev_co = mkCoVarCo evar- ; given_evs <- newGivenEvVars loc $- [ ( mkPrimEqPredRole role' ty1 ty2- , evCoercion $ mkSelCo (SelFun fs) ev_co )- | (fs, ty1, ty2) <- [(SelMult, m1, m2)- ,(SelArg, a1, a2)- ,(SelRes, r1, r2)]- , let role' = funRole role fs ]- ; emitWorkNC given_evs }-- ; stopWith ev "Decomposed TyConApp" }-- where- loc = ctEvLoc ev- role = eqRelRole eq_rel- mult_loc = updateCtLocOrigin loc toInvisibleOrigin---- | Call when canonicalizing an equality fails, but if the equality is--- representational, there is some hope for the future.--- Examples in Note [Use canEqFailure in canDecomposableTyConApp]-canEqFailure :: CtEvidence -> EqRel- -> TcType -> TcType -> TcS (StopOrContinue Ct)-canEqFailure ev NomEq ty1 ty2- = canEqHardFailure ev ty1 ty2-canEqFailure ev ReprEq ty1 ty2- = do { (redn1, rewriters1) <- rewrite ev ty1- ; (redn2, rewriters2) <- rewrite ev ty2- -- We must rewrite the types before putting them in the- -- inert set, so that we are sure to kick them out when- -- new equalities become available- ; traceTcS "canEqFailure with ReprEq" $- vcat [ ppr ev, ppr redn1, ppr redn2 ]- ; new_ev <- rewriteEqEvidence (rewriters1 S.<> rewriters2) ev NotSwapped redn1 redn2- ; continueWith (mkIrredCt ReprEqReason new_ev) }---- | Call when canonicalizing an equality fails with utterly no hope.-canEqHardFailure :: CtEvidence- -> TcType -> TcType -> TcS (StopOrContinue Ct)--- See Note [Make sure that insolubles are fully rewritten]-canEqHardFailure ev ty1 ty2- = do { traceTcS "canEqHardFailure" (ppr ty1 $$ ppr ty2)- ; (redn1, rewriters1) <- rewriteForErrors ev ty1- ; (redn2, rewriters2) <- rewriteForErrors ev ty2- ; new_ev <- rewriteEqEvidence (rewriters1 S.<> rewriters2) ev NotSwapped redn1 redn2- ; continueWith (mkIrredCt ShapeMismatchReason new_ev) }--{--Note [Canonicalising type applications]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Given (s1 t1) ~ ty2, how should we proceed?-The simple thing is to see if ty2 is of form (s2 t2), and-decompose.--However, over-eager decomposition gives bad error messages-for things like- a b ~ Maybe c- e f ~ p -> q-Suppose (in the first example) we already know a~Array. Then if we-decompose the application eagerly, yielding- a ~ Maybe- b ~ c-we get an error "Can't match Array ~ Maybe",-but we'd prefer to get "Can't match Array b ~ Maybe c".--So instead can_eq_wanted_app rewrites the LHS and RHS, in the hope of-replacing (a b) by (Array b), before using try_decompose_app to-decompose it.--Note [Make sure that insolubles are fully rewritten]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When an equality fails, we still want to rewrite the equality-all the way down, so that it accurately reflects- (a) the mutable reference substitution in force at start of solving- (b) any ty-binds in force at this point in solving-See Note [Rewrite insolubles] in GHC.Tc.Solver.InertSet.-And if we don't do this there is a bad danger that-GHC.Tc.Solver.applyTyVarDefaulting will find a variable-that has in fact been substituted.--Note [Do not decompose Given polytype equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider [G] (forall a. t1 ~ forall a. t2). Can we decompose this?-No -- what would the evidence look like? So instead we simply discard-this given evidence.--Note [No top-level newtypes on RHS of representational equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we're in this situation:-- work item: [W] c1 : a ~R b- inert: [G] c2 : b ~R Id a--where- newtype Id a = Id a--We want to make sure canEqCanLHS sees [W] a ~R a, after b is rewritten-and the Id newtype is unwrapped. This is assured by requiring only rewritten-types in canEqCanLHS *and* having the newtype-unwrapping check above-the tyvar check in can_eq_nc.--Note that this only applies to saturated applications of newtype TyCons, as-we can't rewrite an unsaturated application. See for example T22310, where-we ended up with:-- newtype Compose f g a = ...-- [W] t[tau] ~# Compose Foo Bar--Note [Put touchable variables on the left]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Ticket #10009, a very nasty example:-- f :: (UnF (F b) ~ b) => F b -> ()-- g :: forall a. (UnF (F a) ~ a) => a -> ()- g _ = f (undefined :: F a)--For g we get [G] g1 : UnF (F a) ~ a- [W] w1 : UnF (F beta) ~ beta- [W] w2 : F a ~ F beta--g1 is canonical (CEqCan). It is oriented as above because a is not touchable.-See canEqTyVarFunEq.--w1 is similarly canonical, though the occurs-check in canEqTyVarFunEq is key-here.--w2 is canonical. But which way should it be oriented? As written, we'll be-stuck. When w2 is added to the inert set, nothing gets kicked out: g1 is-a Given (and Wanteds don't rewrite Givens), and w2 doesn't mention the LHS-of w2. We'll thus lose.--But if w2 is swapped around, to-- [W] w3 : F beta ~ F a--then we'll kick w1 out of the inert-set (it mentions the LHS of w3). We then rewrite w1 to-- [W] w4 : UnF (F a) ~ beta--and then, using g1, to-- [W] w5 : a ~ beta--at which point we can unify and go on to glory. (This rewriting actually-happens all at once, in the call to rewrite during canonicalisation.)--But what about the new LHS makes it better? It mentions a variable (beta)-that can appear in a Wanted -- a touchable metavariable never appears-in a Given. On the other hand, the original LHS mentioned only variables-that appear in Givens. We thus choose to put variables that can appear-in Wanteds on the left.--Ticket #12526 is another good example of this in action.---}------------------------canEqCanLHS :: CtEvidence -- ev :: lhs ~ rhs- -> EqRel -> SwapFlag- -> CanEqLHS -- lhs (or, if swapped, rhs)- -> TcType -- lhs: pretty lhs, already rewritten- -> TcType -> TcType -- rhs: already rewritten- -> TcS (StopOrContinue Ct)-canEqCanLHS ev eq_rel swapped lhs1 ps_xi1 xi2 ps_xi2- | k1 `tcEqType` k2- = canEqCanLHSHomo ev eq_rel swapped lhs1 ps_xi1 xi2 ps_xi2-- | otherwise- = canEqCanLHSHetero ev eq_rel swapped lhs1 k1 xi2 k2-- where- k1 = canEqLHSKind lhs1- k2 = typeKind xi2---{--Note [Kind Equality Orientation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-While in theory [W] x ~ y and [W] y ~ x ought to give us the same behaviour, in practice it does not.-See Note [Fundeps with instances, and equality orientation] where this is discussed at length.-As a rule of thumb: we keep the newest unification variables on the left of the equality.-See also Note [Improvement orientation] in GHC.Tc.Solver.Interact.--In particular, `canEqCanLHSHetero` produces the following constraint equalities--[X] (xi1 :: ki1) ~ (xi2 :: ki2)- --> [X] kco :: ki1 ~ ki2- [X] co : xi1 :: ki1 ~ (xi2 |> sym kco) :: ki1--Note that the types in the LHS of the new constraints are the ones that were on the LHS of-the original constraint.----- Historical note ----We prevously used to flip the kco to avoid using a sym in the cast--[X] (xi1 :: ki1) ~ (xi2 :: ki2)- --> [X] kco :: ki2 ~ ki1- [X] co : xi1 :: ki1 ~ (xi2 |> kco) :: ki1--But this sent solver in an infinite loop (see #19415).--- End of historical note ----}--canEqCanLHSHetero :: CtEvidence -- :: (xi1 :: ki1) ~ (xi2 :: ki2)- -> EqRel -> SwapFlag- -> CanEqLHS -- xi1- -> TcKind -- ki1- -> TcType -- xi2- -> TcKind -- ki2- -> TcS (StopOrContinue Ct)-canEqCanLHSHetero ev eq_rel swapped lhs1 ki1 xi2 ki2- -- See Note [Equalities with incompatible kinds]- -- See Note [Kind Equality Orientation]- -- NB: preserve left-to-right orientation!!- -- See Note [Fundeps with instances, and equality orientation]- -- wrinkle (W2) in GHC.Tc.Solver.Interact- = do { (kind_ev, kind_co) <- mk_kind_eq -- :: ki1 ~N ki2-- ; let -- kind_co :: (ki1 :: *) ~N (ki2 :: *) (whether swapped or not)- lhs_redn = mkReflRedn role xi1- rhs_redn = mkGReflRightRedn role xi2 (mkSymCo kind_co)-- -- See Note [Equalities with incompatible kinds], Wrinkle (1)- -- This will be ignored in rewriteEqEvidence if the work item is a Given- rewriters = rewriterSetFromCo kind_co-- ; traceTcS "Hetero equality gives rise to kind equality"- (ppr kind_co <+> dcolon <+> sep [ ppr ki1, text "~#", ppr ki2 ])- ; type_ev <- rewriteEqEvidence rewriters ev swapped lhs_redn rhs_redn-- ; emitWorkNC [type_ev] -- delay the type equality until after we've finished- -- the kind equality, which may unlock things- -- See Note [Equalities with incompatible kinds]-- ; canEqNC kind_ev NomEq ki1 ki2 }- where- mk_kind_eq :: TcS (CtEvidence, CoercionN)- mk_kind_eq = case ev of- CtGiven { ctev_evar = evar }- -> do { let kind_co = maybe_sym $ mkKindCo (mkCoVarCo evar) -- :: k1 ~ k2- ; kind_ev <- newGivenEvVar kind_loc (kind_pty, evCoercion kind_co)- ; return (kind_ev, ctEvCoercion kind_ev) }-- CtWanted { ctev_rewriters = rewriters }- -> newWantedEq kind_loc rewriters Nominal ki1 ki2-- xi1 = canEqLHSType lhs1- loc = ctev_loc ev- role = eqRelRole eq_rel- kind_loc = mkKindLoc xi1 xi2 loc- kind_pty = mkHeteroPrimEqPred liftedTypeKind liftedTypeKind ki1 ki2-- maybe_sym = case swapped of- IsSwapped -> mkSymCo -- if the input is swapped, then we- -- will have k2 ~ k1, so flip it to k1 ~ k2- NotSwapped -> id---- guaranteed that typeKind lhs == typeKind rhs-canEqCanLHSHomo :: CtEvidence- -> EqRel -> SwapFlag- -> CanEqLHS -- lhs (or, if swapped, rhs)- -> TcType -- pretty lhs- -> TcType -> TcType -- rhs, pretty rhs- -> TcS (StopOrContinue Ct)-canEqCanLHSHomo ev eq_rel swapped lhs1 ps_xi1 xi2 ps_xi2- | (xi2', mco) <- split_cast_ty xi2- , Just lhs2 <- canEqLHS_maybe xi2'- = canEqCanLHS2 ev eq_rel swapped lhs1 ps_xi1 lhs2 (ps_xi2 `mkCastTyMCo` mkSymMCo mco) mco-- | otherwise- = canEqCanLHSFinish ev eq_rel swapped lhs1 ps_xi2-- where- split_cast_ty (CastTy ty co) = (ty, MCo co)- split_cast_ty other = (other, MRefl)---- This function deals with the case that both LHS and RHS are potential--- CanEqLHSs.-canEqCanLHS2 :: CtEvidence -- lhs ~ (rhs |> mco)- -- or, if swapped: (rhs |> mco) ~ lhs- -> EqRel -> SwapFlag- -> CanEqLHS -- lhs (or, if swapped, rhs)- -> TcType -- pretty lhs- -> CanEqLHS -- rhs- -> TcType -- pretty rhs- -> MCoercion -- :: kind(rhs) ~N kind(lhs)- -> TcS (StopOrContinue Ct)-canEqCanLHS2 ev eq_rel swapped lhs1 ps_xi1 lhs2 ps_xi2 mco- | lhs1 `eqCanEqLHS` lhs2- -- It must be the case that mco is reflexive- = canEqReflexive ev eq_rel (canEqLHSType lhs1)-- | TyVarLHS tv1 <- lhs1- , TyVarLHS tv2 <- lhs2- , swapOverTyVars (isGiven ev) tv1 tv2- = do { traceTcS "canEqLHS2 swapOver" (ppr tv1 $$ ppr tv2 $$ ppr swapped)- ; new_ev <- do_swap- ; canEqCanLHSFinish new_ev eq_rel IsSwapped (TyVarLHS tv2)- (ps_xi1 `mkCastTyMCo` sym_mco) }-- | TyVarLHS tv1 <- lhs1- , TyFamLHS fun_tc2 fun_args2 <- lhs2- = canEqTyVarFunEq ev eq_rel swapped tv1 ps_xi1 fun_tc2 fun_args2 ps_xi2 mco-- | TyFamLHS fun_tc1 fun_args1 <- lhs1- , TyVarLHS tv2 <- lhs2- = do { new_ev <- do_swap- ; canEqTyVarFunEq new_ev eq_rel IsSwapped tv2 ps_xi2- fun_tc1 fun_args1 ps_xi1 sym_mco }-- | TyFamLHS fun_tc1 fun_args1 <- lhs1- , TyFamLHS fun_tc2 fun_args2 <- lhs2- -- See Note [Decomposing type family applications]- = do { traceTcS "canEqCanLHS2 two type families" (ppr lhs1 $$ ppr lhs2)-- -- emit wanted equalities for injective type families- ; let inj_eqns :: [TypeEqn] -- TypeEqn = Pair Type- inj_eqns- | ReprEq <- eq_rel = [] -- injectivity applies only for nom. eqs.- | fun_tc1 /= fun_tc2 = [] -- if the families don't match, stop.-- | Injective inj <- tyConInjectivityInfo fun_tc1- = [ Pair arg1 arg2- | (arg1, arg2, True) <- zip3 fun_args1 fun_args2 inj ]-- -- built-in synonym families don't have an entry point- -- for this use case. So, we just use sfInteractInert- -- and pass two equal RHSs. We *could* add another entry- -- point, but then there would be a burden to make- -- sure the new entry point and existing ones were- -- internally consistent. This is slightly distasteful,- -- but it works well in practice and localises the- -- problem.- | Just ops <- isBuiltInSynFamTyCon_maybe fun_tc1- = let ki1 = canEqLHSKind lhs1- ki2 | MRefl <- mco- = ki1 -- just a small optimisation- | otherwise- = canEqLHSKind lhs2-- fake_rhs1 = anyTypeOfKind ki1- fake_rhs2 = anyTypeOfKind ki2- in- sfInteractInert ops fun_args1 fake_rhs1 fun_args2 fake_rhs2-- | otherwise -- ordinary, non-injective type family- = []-- ; case ev of- CtWanted { ctev_rewriters = rewriters } ->- mapM_ (\ (Pair t1 t2) -> unifyWanted rewriters (ctEvLoc ev) Nominal t1 t2) inj_eqns- CtGiven {} -> return ()- -- See Note [No Given/Given fundeps] in GHC.Tc.Solver.Interact-- ; tclvl <- getTcLevel- ; let tvs1 = tyCoVarsOfTypes fun_args1- tvs2 = tyCoVarsOfTypes fun_args2-- swap_for_rewriting = anyVarSet (isTouchableMetaTyVar tclvl) tvs2 &&- -- swap 'em: Note [Put touchable variables on the left]- not (anyVarSet (isTouchableMetaTyVar tclvl) tvs1)- -- this check is just to avoid unfruitful swapping-- -- If we have F a ~ F (F a), we want to swap.- swap_for_occurs- | cterHasNoProblem $ checkTyFamEq fun_tc2 fun_args2- (mkTyConApp fun_tc1 fun_args1)- , cterHasOccursCheck $ checkTyFamEq fun_tc1 fun_args1- (mkTyConApp fun_tc2 fun_args2)- = True-- | otherwise- = False-- ; if swap_for_rewriting || swap_for_occurs- then do { new_ev <- do_swap- ; canEqCanLHSFinish new_ev eq_rel IsSwapped lhs2 (ps_xi1 `mkCastTyMCo` sym_mco) }- else finish_without_swapping }-- -- that's all the special cases. Now we just figure out which non-special case- -- to continue to.- | otherwise- = finish_without_swapping-- where- sym_mco = mkSymMCo mco-- do_swap = rewriteCastedEquality ev eq_rel swapped (canEqLHSType lhs1) (canEqLHSType lhs2) mco- finish_without_swapping = canEqCanLHSFinish ev eq_rel swapped lhs1 (ps_xi2 `mkCastTyMCo` mco)----- This function handles the case where one side is a tyvar and the other is--- a type family application. Which to put on the left?--- If the tyvar is a touchable meta-tyvar, put it on the left, as this may--- be our only shot to unify.--- Otherwise, put the function on the left, because it's generally better to--- rewrite away function calls. This makes types smaller. And it seems necessary:--- [W] F alpha ~ alpha--- [W] F alpha ~ beta--- [W] G alpha beta ~ Int ( where we have type instance G a a = a )--- If we end up with a stuck alpha ~ F alpha, we won't be able to solve this.--- Test case: indexed-types/should_compile/CEqCanOccursCheck-canEqTyVarFunEq :: CtEvidence -- :: lhs ~ (rhs |> mco)- -- or (rhs |> mco) ~ lhs if swapped- -> EqRel -> SwapFlag- -> TyVar -> TcType -- lhs (or if swapped rhs), pretty lhs- -> TyCon -> [Xi] -> TcType -- rhs (or if swapped lhs) fun and args, pretty rhs- -> MCoercion -- :: kind(rhs) ~N kind(lhs)- -> TcS (StopOrContinue Ct)-canEqTyVarFunEq ev eq_rel swapped tv1 ps_xi1 fun_tc2 fun_args2 ps_xi2 mco- = do { (is_touchable, rhs) <- touchabilityTest (ctEvFlavour ev) tv1 rhs- ; if | case is_touchable of { Untouchable -> False; _ -> True }- , cterHasNoProblem $- checkTyVarEq tv1 rhs `cterRemoveProblem` cteTypeFamily- -> canEqCanLHSFinish ev eq_rel swapped (TyVarLHS tv1) rhs-- | otherwise- -> do { new_ev <- rewriteCastedEquality ev eq_rel swapped- (mkTyVarTy tv1) (mkTyConApp fun_tc2 fun_args2)- mco- ; canEqCanLHSFinish new_ev eq_rel IsSwapped- (TyFamLHS fun_tc2 fun_args2)- (ps_xi1 `mkCastTyMCo` sym_mco) } }- where- sym_mco = mkSymMCo mco- rhs = ps_xi2 `mkCastTyMCo` mco---- The RHS here is either not CanEqLHS, or it's one that we--- want to rewrite the LHS to (as per e.g. swapOverTyVars)-canEqCanLHSFinish :: CtEvidence- -> EqRel -> SwapFlag- -> CanEqLHS -- lhs (or, if swapped, rhs)- -> TcType -- rhs (or, if swapped, lhs)- -> TcS (StopOrContinue Ct)-canEqCanLHSFinish ev eq_rel swapped lhs rhs--- RHS is fully rewritten, but with type synonyms--- preserved as much as possible--- guaranteed that tyVarKind lhs == typeKind rhs, for (TyEq:K)--- (TyEq:N) is checked in can_eq_nc', and (TyEq:TV) is handled in canEqCanLHS2-- = do {- -- this performs the swap if necessary- new_ev <- rewriteEqEvidence emptyRewriterSet ev swapped- (mkReflRedn role lhs_ty)- (mkReflRedn role rhs)-- -- by now, (TyEq:K) is already satisfied- ; massert (canEqLHSKind lhs `eqType` typeKind rhs)-- -- by now, (TyEq:N) is already satisfied (if applicable)- ; assertPprM ty_eq_N_OK $- vcat [ text "CanEqCanLHSFinish: (TyEq:N) not satisfied"- , text "rhs:" <+> ppr rhs- ]-- -- guarantees (TyEq:OC), (TyEq:F)- -- Must do the occurs check even on tyvar/tyvar- -- equalities, in case have x ~ (y :: ..x...); this is #12593.- ; let result0 = checkTypeEq lhs rhs `cterRemoveProblem` cteTypeFamily- -- type families are OK here- -- NB: no occCheckExpand here; see Note [Rewriting synonyms] in GHC.Tc.Solver.Rewrite-- -- a ~R# b a is soluble if b later turns out to be Identity- result = case eq_rel of- NomEq -> result0- ReprEq -> cterSetOccursCheckSoluble result0-- reason = NonCanonicalReason result-- ; if cterHasNoProblem result- then do { traceTcS "CEqCan" (ppr lhs $$ ppr rhs)- ; continueWith (CEqCan { cc_ev = new_ev, cc_lhs = lhs- , cc_rhs = rhs, cc_eq_rel = eq_rel }) }-- else do { m_stuff <- breakTyEqCycle_maybe ev result lhs rhs- -- See Note [Type equality cycles];- -- returning Nothing is the vastly common case- ; case m_stuff of- { Nothing ->- do { traceTcS "canEqCanLHSFinish can't make a canonical"- (ppr lhs $$ ppr rhs)- ; continueWith (mkIrredCt reason new_ev) }- ; Just rhs_redn@(Reduction _ new_rhs) ->- do { traceTcS "canEqCanLHSFinish breaking a cycle" $- ppr lhs $$ ppr rhs- ; traceTcS "new RHS:" (ppr new_rhs)-- -- This check is Detail (1) in the Note- ; if cterHasOccursCheck (checkTypeEq lhs new_rhs)-- then do { traceTcS "Note [Type equality cycles] Detail (1)"- (ppr new_rhs)- ; continueWith (mkIrredCt reason new_ev) }-- else do { -- See Detail (6) of Note [Type equality cycles]- new_new_ev <- rewriteEqEvidence emptyRewriterSet- new_ev NotSwapped- (mkReflRedn Nominal lhs_ty)- rhs_redn-- ; continueWith (CEqCan { cc_ev = new_new_ev- , cc_lhs = lhs- , cc_rhs = new_rhs- , cc_eq_rel = eq_rel }) }}}}}- where- role = eqRelRole eq_rel-- lhs_ty = canEqLHSType lhs-- -- This is about (TyEq:N): check that we don't have a saturated application- -- of a newtype TyCon at the top level of the RHS, if the constructor- -- of the newtype is in scope.- ty_eq_N_OK :: TcS Bool- ty_eq_N_OK- | ReprEq <- eq_rel- , Just (tc, tc_args) <- splitTyConApp_maybe rhs- , Just con <- newTyConDataCon_maybe tc- -- #22310: only a problem if the newtype TyCon is saturated.- , tc_args `lengthAtLeast` tyConArity tc- -- #21010: only a problem if the newtype constructor is in scope.- = do { rdr_env <- getGlobalRdrEnvTcS- ; let con_in_scope = isJust $ lookupGRE_Name rdr_env (dataConName con)- ; return $ not con_in_scope }- | otherwise- = return True---- | Solve a reflexive equality constraint-canEqReflexive :: CtEvidence -- ty ~ ty- -> EqRel- -> TcType -- ty- -> TcS (StopOrContinue Ct) -- always Stop-canEqReflexive ev eq_rel ty- = do { setEvBindIfWanted ev (evCoercion $- mkReflCo (eqRelRole eq_rel) ty)- ; stopWith ev "Solved by reflexivity" }--rewriteCastedEquality :: CtEvidence -- :: lhs ~ (rhs |> mco), or (rhs |> mco) ~ lhs- -> EqRel -> SwapFlag- -> TcType -- lhs- -> TcType -- rhs- -> MCoercion -- mco- -> TcS CtEvidence -- :: (lhs |> sym mco) ~ rhs- -- result is independent of SwapFlag-rewriteCastedEquality ev eq_rel swapped lhs rhs mco- = rewriteEqEvidence emptyRewriterSet ev swapped lhs_redn rhs_redn- where- lhs_redn = mkGReflRightMRedn role lhs sym_mco- rhs_redn = mkGReflLeftMRedn role rhs mco-- sym_mco = mkSymMCo mco- role = eqRelRole eq_rel--{- Note [Equalities with incompatible kinds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-What do we do when we have an equality-- (tv :: k1) ~ (rhs :: k2)--where k1 and k2 differ? Easy: we create a coercion that relates k1 and-k2 and use this to cast. To wit, from-- [X] (tv :: k1) ~ (rhs :: k2)--(where [X] is [G] or [W]), we go to-- [X] co :: k1 ~ k2- [X] (tv :: k1) ~ ((rhs |> sym co) :: k1)--We carry on with the *kind equality*, not the type equality, because-solving the former may unlock the latter. This choice is made in-canEqCanLHSHetero. It is important: otherwise, T13135 loops.--Wrinkles:-- (1) When X is W, the new type-level wanted is effectively rewritten by the- kind-level one. We thus include the kind-level wanted in the RewriterSet- for the type-level one. See Note [Wanteds rewrite Wanteds] in GHC.Tc.Types.Constraint.- This is done in canEqCanLHSHetero.-- (2) If we have [W] w :: alpha ~ (rhs |> sym co_hole), should we unify alpha? No.- The problem is that the wanted w is effectively rewritten by another wanted,- and unifying alpha effectively promotes this wanted to a given. Doing so- means we lose track of the rewriter set associated with the wanted.-- On the other hand, w is perfectly suitable for rewriting, because of the- way we carefully track rewriter sets.-- We thus allow w to be a CEqCan, but we prevent unification. See- Note [Unification preconditions] in GHC.Tc.Utils.Unify.-- The only tricky part is that we must later indeed unify if/when the kind-level- wanted gets solved. This is done in kickOutAfterFillingCoercionHole,- which kicks out all equalities whose RHS mentions the filled-in coercion hole.- Note that it looks for type family equalities, too, because of the use of- unifyTest in canEqTyVarFunEq.-- (3) Suppose we have [W] (a :: k1) ~ (rhs :: k2). We duly follow the- algorithm detailed here, producing [W] co :: k1 ~ k2, and adding- [W] (a :: k1) ~ ((rhs |> sym co) :: k1) to the irreducibles. Some time- later, we solve co, and fill in co's coercion hole. This kicks out- the irreducible as described in (2).- But now, during canonicalization, we see the cast- and remove it, in canEqCast. By the time we get into canEqCanLHS, the equality- is heterogeneous again, and the process repeats.-- To avoid this, we don't strip casts off a type if the other type- in the equality is a CanEqLHS (the scenario above can happen with a- type family, too. testcase: typecheck/should_compile/T13822).- And this is an improvement regardless:- because tyvars can, generally, unify with casted types, there's no- reason to go through the work of stripping off the cast when the- cast appears opposite a tyvar. This is implemented in the cast case- of can_eq_nc'.--Historical note:--We used to do this via emitting a Derived kind equality and then parking-the heterogeneous equality as irreducible. But this new approach is much-more direct. And it doesn't produce duplicate Deriveds (as the old one did).--Note [Type synonyms and canonicalization]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We treat type synonym applications as xi types, that is, they do not-count as type function applications. However, we do need to be a bit-careful with type synonyms: like type functions they may not be-generative or injective. However, unlike type functions, they are-parametric, so there is no problem in expanding them whenever we see-them, since we do not need to know anything about their arguments in-order to expand them; this is what justifies not having to treat them-as specially as type function applications. The thing that causes-some subtleties is that we prefer to leave type synonym applications-*unexpanded* whenever possible, in order to generate better error-messages.--If we encounter an equality constraint with type synonym applications-on both sides, or a type synonym application on one side and some sort-of type application on the other, we simply must expand out the type-synonyms in order to continue decomposing the equality constraint into-primitive equality constraints. For example, suppose we have-- type F a = [Int]--and we encounter the equality-- F a ~ [b]--In order to continue we must expand F a into [Int], giving us the-equality-- [Int] ~ [b]--which we can then decompose into the more primitive equality-constraint-- Int ~ b.--However, if we encounter an equality constraint with a type synonym-application on one side and a variable on the other side, we should-NOT (necessarily) expand the type synonym, since for the purpose of-good error messages we want to leave type synonyms unexpanded as much-as possible. Hence the ps_xi1, ps_xi2 argument passed to canEqCanLHS.--Note [Type equality cycles]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this situation (from indexed-types/should_compile/GivenLoop):-- instance C (Maybe b)- *[G] a ~ Maybe (F a)- [W] C a--or (typecheck/should_compile/T19682b):-- instance C (a -> b)- *[W] alpha ~ (Arg alpha -> Res alpha)- [W] C alpha--or (typecheck/should_compile/T21515):-- type family Code a- *[G] Code a ~ '[ '[ Head (Head (Code a)) ] ]- [W] Code a ~ '[ '[ alpha ] ]--In order to solve the final Wanted, we must use the starred constraint-for rewriting. But note that all starred constraints have occurs-check failures,-and so we can't straightforwardly add these to the inert set and-use them for rewriting. (NB: A rigid type constructor is at the-top of all RHSs, preventing reorienting in canEqTyVarFunEq in the tyvar-cases.)--The key idea is to replace the outermost type family applications in the RHS of the-starred constraints with a fresh variable, which we'll call a cycle-breaker-variable, or cbv. Then, relate the cbv back with the original type family application-via new equality constraints. Our situations thus become:-- instance C (Maybe b)- [G] a ~ Maybe cbv- [G] F a ~ cbv- [W] C a--or-- instance C (a -> b)- [W] alpha ~ (cbv1 -> cbv2)- [W] Arg alpha ~ cbv1- [W] Res alpha ~ cbv2- [W] C alpha--or-- [G] Code a ~ '[ '[ cbv ] ]- [G] Head (Head (Code a)) ~ cbv- [W] Code a ~ '[ '[ alpha ] ]--This transformation (creating the new types and emitting new equality-constraints) is done in breakTyEqCycle_maybe.--The details depend on whether we're working with a Given or a Wanted.--Given--------We emit a new Given, [G] F a ~ cbv, equating the type family application to-our new cbv. Note its orientation: The type family ends up on the left; see-commentary on canEqTyVarFunEq, which decides how to orient such cases. No-special treatment for CycleBreakerTvs is necessary. This scenario is now-easily soluble, by using the first Given to rewrite the Wanted, which can now-be solved.--(The first Given actually also rewrites the second one, giving-[G] F (Maybe cbv) ~ cbv, but this causes no trouble.)--Of course, we don't want our fresh variables leaking into e.g. error messages.-So we fill in the metavariables with their original type family applications-after we're done running the solver (in nestImplicTcS and runTcSWithEvBinds).-This is done by restoreTyVarCycles, which uses the inert_cycle_breakers field in-InertSet, which contains the pairings invented in breakTyEqCycle_maybe.--That is:--We transform- [G] g : lhs ~ ...(F lhs)...-to- [G] (Refl lhs) : F lhs ~ cbv -- CEqCan- [G] g : lhs ~ ...cbv... -- CEqCan--Note that-* `cbv` is a fresh cycle breaker variable.-* `cbv` is a is a meta-tyvar, but it is completely untouchable.-* We track the cycle-breaker variables in inert_cycle_breakers in InertSet-* We eventually fill in the cycle-breakers, with `cbv := F lhs`.- No one else fills in cycle-breakers!-* The evidence for the new `F lhs ~ cbv` constraint is Refl, because we know- this fill-in is ultimately going to happen.-* In inert_cycle_breakers, we remember the (cbv, F lhs) pair; that is, we- remember the /original/ type. The [G] F lhs ~ cbv constraint may be rewritten- by other givens (eg if we have another [G] lhs ~ (b,c)), but at the end we- still fill in with cbv := F lhs-* This fill-in is done when solving is complete, by restoreTyVarCycles- in nestImplicTcS and runTcSWithEvBinds.--Wanted--------The fresh cycle-breaker variables here must actually be normal, touchable-metavariables. That is, they are TauTvs. Nothing at all unusual. Repeating-the example from above, we have-- *[W] alpha ~ (Arg alpha -> Res alpha)--and we turn this into-- *[W] alpha ~ (cbv1 -> cbv2)- [W] Arg alpha ~ cbv1- [W] Res alpha ~ cbv2--where cbv1 and cbv2 are fresh TauTvs. Why TauTvs? See [Why TauTvs] below.--Critically, we emit the two new constraints (the last two above)-directly instead of calling unifyWanted. (Otherwise, we'd end up unifying cbv1-and cbv2 immediately, achieving nothing.)-Next, we unify alpha := cbv1 -> cbv2, having eliminated the occurs check. This-unification -- which must be the next step after breaking the cycles ---happens in the course of normal behavior of top-level-interactions, later in the solver pipeline. We know this unification will-indeed happen because breakTyEqCycle_maybe, which decides whether to apply-this logic, checks to ensure unification will succeed in its final_check.-(In particular, the LHS must be a touchable tyvar, never a type family. We don't-yet have an example of where this logic is needed with a type family, and it's-unclear how to handle this case, so we're skipping for now.) Now, we're-here (including further context from our original example, from the top of the-Note):-- instance C (a -> b)- [W] Arg (cbv1 -> cbv2) ~ cbv1- [W] Res (cbv1 -> cbv2) ~ cbv2- [W] C (cbv1 -> cbv2)--The first two W constraints reduce to reflexivity and are discarded,-and the last is easily soluble.--[Why TauTvs]:-Let's look at another example (typecheck/should_compile/T19682) where we need-to unify the cbvs:-- class (AllEqF xs ys, SameShapeAs xs ys) => AllEq xs ys- instance (AllEqF xs ys, SameShapeAs xs ys) => AllEq xs ys-- type family SameShapeAs xs ys :: Constraint where- SameShapeAs '[] ys = (ys ~ '[])- SameShapeAs (x : xs) ys = (ys ~ (Head ys : Tail ys))-- type family AllEqF xs ys :: Constraint where- AllEqF '[] '[] = ()- AllEqF (x : xs) (y : ys) = (x ~ y, AllEq xs ys)-- [W] alpha ~ (Head alpha : Tail alpha)- [W] AllEqF '[Bool] alpha--Without the logic detailed in this Note, we're stuck here, as AllEqF cannot-reduce and alpha cannot unify. Let's instead apply our cycle-breaker approach,-just as described above. We thus invent cbv1 and cbv2 and unify-alpha := cbv1 -> cbv2, yielding (after zonking)-- [W] Head (cbv1 : cbv2) ~ cbv1- [W] Tail (cbv1 : cbv2) ~ cbv2- [W] AllEqF '[Bool] (cbv1 : cbv2)--The first two W constraints simplify to reflexivity and are discarded.-But the last reduces:-- [W] Bool ~ cbv1- [W] AllEq '[] cbv2--The first of these is solved by unification: cbv1 := Bool. The second-is solved by the instance for AllEq to become-- [W] AllEqF '[] cbv2- [W] SameShapeAs '[] cbv2--While the first of these is stuck, the second makes progress, to lead to-- [W] AllEqF '[] cbv2- [W] cbv2 ~ '[]--This second constraint is solved by unification: cbv2 := '[]. We now-have-- [W] AllEqF '[] '[]--which reduces to-- [W] ()--which is trivially satisfiable. Hooray!--Note that we need to unify the cbvs here; if we did not, there would be-no way to solve those constraints. That's why the cycle-breakers are-ordinary TauTvs.--In all cases---------------We detect this scenario by the following characteristics:- - a constraint with a soluble occurs-check failure- (as indicated by the cteSolubleOccurs bit set in a CheckTyEqResult- from checkTypeEq)- - and a nominal equality- - and either- - a Given flavour (but see also Detail (7) below)- - a Wanted flavour, with a touchable metavariable on the left--We don't use this trick for representational equalities, as there is no-concrete use case where it is helpful (unlike for nominal equalities).-Furthermore, because function applications can be CanEqLHSs, but newtype-applications cannot, the disparities between the cases are enough that it-would be effortful to expand the idea to representational equalities. A quick-attempt, with-- data family N a b-- f :: (Coercible a (N a b), Coercible (N a b) b) => a -> b- f = coerce--failed with "Could not match 'b' with 'b'." Further work is held off-until when we have a concrete incentive to explore this dark corner.--Details:-- (1) We don't look under foralls, at all, when substituting away type family- applications, because doing so can never be fruitful. Recall that we- are in a case like [G] lhs ~ forall b. ... lhs .... Until we have a type- family that can pull the body out from a forall (e.g. type instance F (forall b. ty) = ty),- this will always be- insoluble. Note also that the forall cannot be in an argument to a- type family, or that outer type family application would already have- been substituted away.-- However, we still must check to make sure that breakTyEqCycle_maybe actually- succeeds in getting rid of all occurrences of the offending lhs. If- one is hidden under a forall, this won't be true. A similar problem can- happen if the variable appears only in a kind- (e.g. k ~ ... (a :: k) ...). So we perform an additional check after- performing the substitution. It is tiresome to re-run all of checkTypeEq- here, but reimplementing just the occurs-check is even more tiresome.-- Skipping this check causes typecheck/should_fail/GivenForallLoop and- polykinds/T18451 to loop.-- (2) Our goal here is to avoid loops in rewriting. We can thus skip looking- in coercions, as we don't rewrite in coercions in the algorithm in- GHC.Solver.Rewrite. (This is another reason- we need to re-check that we've gotten rid of all occurrences of the- offending variable.)-- (3) As we're substituting as described in this Note, we can build ill-kinded- types. For example, if we have Proxy (F a) b, where (b :: F a), then- replacing this with Proxy cbv b is ill-kinded. However, we will later- set cbv := F a, and so the zonked type will be well-kinded again.- The temporary ill-kinded type hurts no one, and avoiding this would- be quite painfully difficult.-- Specifically, this detail does not contravene the Purely Kinded Type Invariant- (Note [The Purely Kinded Type Invariant (PKTI)] in GHC.Tc.Gen.HsType).- The PKTI says that we can call typeKind on any type, without failure.- It would be violated if we, say, replaced a kind (a -> b) with a kind c,- because an arrow kind might be consulted in piResultTys. Here, we are- replacing one opaque type like (F a b c) with another, cbv (opaque in- that we never assume anything about its structure, like that it has a- result type or a RuntimeRep argument).-- (4) The evidence for the produced Givens is all just reflexive, because- we will eventually set the cycle-breaker variable to be the type family,- and then, after the zonk, all will be well. See also the notes at the- end of the Given section of this Note.-- (5) The approach here is inefficient because it replaces every (outermost)- type family application with a type variable, regardless of whether that- particular appplication is implicated in the occurs check. An alternative- would be to replce only type-family applications that mention the offending LHS.- For instance, we could choose to- affect only type family applications that mention the offending LHS:- e.g. in a ~ (F b, G a), we need to replace only G a, not F b. Furthermore,- we could try to detect cases like a ~ (F a, F a) and use the same- tyvar to replace F a. (Cf.- Note [Flattening type-family applications when matching instances]- in GHC.Core.Unify, which- goes to this extra effort.) There may be other opportunities for- improvement. However, this is really a very small corner case.- The investment to craft a clever,- performant solution seems unworthwhile.-- (6) We often get the predicate associated with a constraint from its- evidence with ctPred. We thus must not only make sure the generated- CEqCan's fields have the updated RHS type (that is, the one produced- by replacing type family applications with fresh variables),- but we must also update the evidence itself. This is done by the call to rewriteEqEvidence- in canEqCanLHSFinish.-- (7) We don't wish to apply this magic on the equalities created- by this very same process.- Consider this, from typecheck/should_compile/ContextStack2:-- type instance TF (a, b) = (TF a, TF b)- t :: (a ~ TF (a, Int)) => ...-- [G] a ~ TF (a, Int)-- The RHS reduces, so we get-- [G] a ~ (TF a, TF Int)-- We then break cycles, to get-- [G] g1 :: a ~ (cbv1, cbv2)- [G] g2 :: TF a ~ cbv1- [G] g3 :: TF Int ~ cbv2-- g1 gets added to the inert set, as written. But then g2 becomes- the work item. g1 rewrites g2 to become-- [G] TF (cbv1, cbv2) ~ cbv1-- which then uses the type instance to become-- [G] (TF cbv1, TF cbv2) ~ cbv1-- which looks remarkably like the Given we started with. If left- unchecked, this will end up breaking cycles again, looping ad- infinitum (and resulting in a context-stack reduction error,- not an outright loop). The solution is easy: don't break cycles- on an equality generated by breaking cycles. Instead, we mark this- final Given as a CIrredCan with a NonCanonicalReason with the soluble- occurs-check bit set (only).-- We track these equalities by giving them a special CtOrigin,- CycleBreakerOrigin. This works for both Givens and Wanteds, as- we need the logic in the W case for e.g. typecheck/should_fail/T17139.- Because this logic needs to work for Wanteds, too, we cannot- simply look for a CycleBreakerTv on the left: Wanteds don't use them.-- (8) We really want to do this all only when there is a soluble occurs-check- failure, not when other problems arise (such as an impredicative- equality like alpha ~ forall a. a -> a). That is why breakTyEqCycle_maybe- uses cterHasOnlyProblem when looking at the result of checkTypeEq, which- checks for many of the invariants on a CEqCan.--}--{--************************************************************************-* *- Evidence transformation-* *-************************************************************************--}--data StopOrContinue a- = ContinueWith a -- The constraint was not solved, although it may have- -- been rewritten-- | Stop CtEvidence -- The (rewritten) constraint was solved- SDoc -- Tells how it was solved- -- Any new sub-goals have been put on the work list- deriving (Functor)--instance Outputable a => Outputable (StopOrContinue a) where- ppr (Stop ev s) = text "Stop" <> parens s <+> ppr ev- ppr (ContinueWith w) = text "ContinueWith" <+> ppr w--continueWith :: a -> TcS (StopOrContinue a)-continueWith = return . ContinueWith--stopWith :: CtEvidence -> String -> TcS (StopOrContinue a)-stopWith ev s = return (Stop ev (text s))--andWhenContinue :: TcS (StopOrContinue a)- -> (a -> TcS (StopOrContinue b))- -> TcS (StopOrContinue b)-andWhenContinue tcs1 tcs2- = do { r <- tcs1- ; case r of- Stop ev s -> return (Stop ev s)- ContinueWith ct -> tcs2 ct }-infixr 0 `andWhenContinue` -- allow chaining with ($)--rewriteEvidence :: RewriterSet -- ^ See Note [Wanteds rewrite Wanteds]- -- in GHC.Tc.Types.Constraint- -> CtEvidence -- ^ old evidence- -> Reduction -- ^ new predicate + coercion, of type <type of old evidence> ~ new predicate- -> TcS (StopOrContinue CtEvidence)--- Returns Just new_ev iff either (i) 'co' is reflexivity--- or (ii) 'co' is not reflexivity, and 'new_pred' not cached--- In either case, there is nothing new to do with new_ev-{-- rewriteEvidence old_ev new_pred co-Main purpose: create new evidence for new_pred;- unless new_pred is cached already-* Returns a new_ev : new_pred, with same wanted/given flag as old_ev-* If old_ev was wanted, create a binding for old_ev, in terms of new_ev-* If old_ev was given, AND not cached, create a binding for new_ev, in terms of old_ev-* Returns Nothing if new_ev is already cached-- Old evidence New predicate is Return new evidence- flavour of same flavor- -------------------------------------------------------------------- Wanted Already solved or in inert Nothing- Not Just new_evidence-- Given Already in inert Nothing- Not Just new_evidence--Note [Rewriting with Refl]-~~~~~~~~~~~~~~~~~~~~~~~~~~-If the coercion is just reflexivity then you may re-use the same-variable. But be careful! Although the coercion is Refl, new_pred-may reflect the result of unification alpha := ty, so new_pred might-not _look_ the same as old_pred, and it's vital to proceed from now on-using new_pred.--The rewriter preserves type synonyms, so they should appear in new_pred-as well as in old_pred; that is important for good error messages.--If we are rewriting with Refl, then there are no new rewriters to add to-the rewriter set. We check this with an assertion.- -}---rewriteEvidence rewriters old_ev (Reduction co new_pred)- | isReflCo co -- See Note [Rewriting with Refl]- = assert (isEmptyRewriterSet rewriters) $- continueWith (setCtEvPredType old_ev new_pred)--rewriteEvidence rewriters ev@(CtGiven { ctev_evar = old_evar, ctev_loc = loc })- (Reduction co new_pred)- = assert (isEmptyRewriterSet rewriters) $ -- this is a Given, not a wanted- do { new_ev <- newGivenEvVar loc (new_pred, new_tm)- ; continueWith new_ev }- where- -- mkEvCast optimises ReflCo- new_tm = mkEvCast (evId old_evar)- (downgradeRole Representational (ctEvRole ev) co)--rewriteEvidence new_rewriters- ev@(CtWanted { ctev_dest = dest- , ctev_loc = loc- , ctev_rewriters = rewriters })- (Reduction co new_pred)- = do { mb_new_ev <- newWanted loc rewriters' new_pred- ; massert (coercionRole co == ctEvRole ev)- ; setWantedEvTerm dest- (mkEvCast (getEvExpr mb_new_ev)- (downgradeRole Representational (ctEvRole ev) (mkSymCo co)))- ; case mb_new_ev of- Fresh new_ev -> continueWith new_ev- Cached _ -> stopWith ev "Cached wanted" }- where- rewriters' = rewriters S.<> new_rewriters---rewriteEqEvidence :: RewriterSet -- New rewriters- -- See GHC.Tc.Types.Constraint- -- Note [Wanteds rewrite Wanteds]- -> CtEvidence -- Old evidence :: olhs ~ orhs (not swapped)- -- or orhs ~ olhs (swapped)- -> SwapFlag- -> Reduction -- lhs_co :: olhs ~ nlhs- -> Reduction -- rhs_co :: orhs ~ nrhs- -> TcS CtEvidence -- Of type nlhs ~ nrhs--- With reductions (Reduction lhs_co nlhs) (Reduction rhs_co nrhs),--- rewriteEqEvidence yields, for a given equality (Given g olhs orhs):--- If not swapped--- g1 : nlhs ~ nrhs = sym lhs_co ; g ; rhs_co--- If swapped--- g1 : nlhs ~ nrhs = sym lhs_co ; Sym g ; rhs_co------ For a wanted equality (Wanted w), we do the dual thing:--- New w1 : nlhs ~ nrhs--- If not swapped--- w : olhs ~ orhs = lhs_co ; w1 ; sym rhs_co--- If swapped--- w : orhs ~ olhs = rhs_co ; sym w1 ; sym lhs_co------ It's all a form of rewriteEvidence, specialised for equalities-rewriteEqEvidence new_rewriters old_ev swapped (Reduction lhs_co nlhs) (Reduction rhs_co nrhs)- | NotSwapped <- swapped- , isReflCo lhs_co -- See Note [Rewriting with Refl]- , isReflCo rhs_co- = return (setCtEvPredType old_ev new_pred)-- | CtGiven { ctev_evar = old_evar } <- old_ev- = do { let new_tm = evCoercion ( mkSymCo lhs_co- `mkTransCo` maybeSymCo swapped (mkCoVarCo old_evar)- `mkTransCo` rhs_co)- ; newGivenEvVar loc (new_pred, new_tm) }-- | CtWanted { ctev_dest = dest- , ctev_rewriters = rewriters } <- old_ev- , let rewriters' = rewriters S.<> new_rewriters- = do { (new_ev, hole_co) <- newWantedEq loc rewriters'- (ctEvRole old_ev) nlhs nrhs- ; let co = maybeSymCo swapped $- lhs_co- `mkTransCo` hole_co- `mkTransCo` mkSymCo rhs_co- ; setWantedEq dest co- ; traceTcS "rewriteEqEvidence" (vcat [ ppr old_ev- , ppr nlhs- , ppr nrhs- , ppr co- , ppr new_rewriters ])- ; return new_ev }--#if __GLASGOW_HASKELL__ <= 810- | otherwise- = panic "rewriteEvidence"-#endif- where- new_pred = mkTcEqPredLikeEv old_ev nlhs nrhs- loc = ctEvLoc old_ev--{--************************************************************************-* *- Unification-* *-************************************************************************--Note [unifyWanted]-~~~~~~~~~~~~~~~~~~-When decomposing equalities we often create new wanted constraints for-(s ~ t). But what if s=t? Then it'd be faster to return Refl right away.--Rather than making an equality test (which traverses the structure of the-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.--}--unifyWanted :: RewriterSet -> CtLoc- -> Role -> TcType -> TcType -> TcS Coercion--- Return coercion witnessing the equality of the two types,--- emitting new work equalities where necessary to achieve that--- Very good short-cut when the two types are equal, or nearly so--- See Note [unifyWanted]--- The returned coercion's role matches the input parameter-unifyWanted rewriters loc Phantom ty1 ty2- = do { kind_co <- unifyWanted rewriters loc Nominal (typeKind ty1) (typeKind ty2)- ; return (mkPhantomCo kind_co ty1 ty2) }--unifyWanted rewriters loc role orig_ty1 orig_ty2- = go orig_ty1 orig_ty2- where- go ty1 ty2 | Just ty1' <- coreView ty1 = go ty1' ty2- go ty1 ty2 | Just ty2' <- coreView ty2 = go ty1 ty2'-- go (FunTy af1 w1 s1 t1) (FunTy af2 w2 s2 t2)- | af1 == af2 -- Important! See #21530- = do { co_s <- unifyWanted rewriters loc role s1 s2- ; co_t <- unifyWanted rewriters loc role t1 t2- ; co_w <- unifyWanted rewriters loc Nominal w1 w2- ; return (mkNakedFunCo1 role af1 co_w co_s co_t) }-- go (TyConApp tc1 tys1) (TyConApp tc2 tys2)- | tc1 == tc2, tys1 `equalLength` tys2- , isInjectiveTyCon tc1 role -- don't look under newtypes at Rep equality- = do { cos <- zipWith3M (unifyWanted rewriters loc)- (tyConRoleListX role tc1) tys1 tys2- ; return (mkTyConAppCo role tc1 cos) }-- go ty1@(TyVarTy tv) ty2- = do { mb_ty <- isFilledMetaTyVar_maybe tv- ; case mb_ty of- Just ty1' -> go ty1' ty2- Nothing -> bale_out ty1 ty2}- go ty1 ty2@(TyVarTy tv)- = do { mb_ty <- isFilledMetaTyVar_maybe tv- ; case mb_ty of- Just ty2' -> go ty1 ty2'- Nothing -> bale_out ty1 ty2 }-- go ty1@(CoercionTy {}) (CoercionTy {})- = return (mkReflCo role ty1) -- we just don't care about coercions!-- go ty1 ty2 = bale_out ty1 ty2-- bale_out ty1 ty2- | ty1 `tcEqType` ty2 = return (mkReflCo role ty1)- -- Check for equality; e.g. a ~ a, or (m a) ~ (m a)- | otherwise = emitNewWantedEq loc rewriters role orig_ty1 orig_ty2---{--Note [Decomposing Dependent TyCons and Processing Wanted Equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When we decompose a dependent tycon we obtain a list of-mixed wanted type and kind equalities. Ideally we want-all the kind equalities to get solved first so that we avoid-generating duplicate kind equalities--For example, consider decomposing a TyCon equality-- (0) [W] T k_fresh (t1::k_fresh) ~ T k1 (t2::k_fresh)--This gives rise to 2 equalities in the solver worklist-- (1) [W] k_fresh ~ k1- (2) [W] t1::k_fresh ~ t2::k1--The solver worklist is processed in LIFO order:-see GHC.Tc.Solver.InertSet.selectWorkItem.-i.e. (2) is processed _before_ (1). Now, while solving (2)-we would call `canEqCanLHSHetero` and that would emit a-wanted kind equality-- (3) [W] k_fresh ~ k1--But (3) is exactly the same as (1)!--To avoid such duplicate wanted constraints from being added to the worklist,-we ensure that (2) is processed before (1). Since we are processing-the worklist in a LIFO ordering, we do it by emitting (1) before (2).-This is exactly what we do in `unifyWanteds`.--NB: This ordering is not needed when we decompose FunTyCons as they are not dependently typed--}---- NB: Length of [CtLoc] and [Roles] may be infinite--- but list of RHS [TcType] and LHS [TcType] is finite and both are of equal length-unifyWanteds :: RewriterSet -> [CtLoc] -> [Role]- -> [TcType] -- List of RHS types- -> [TcType] -- List of LHS types- -> TcS [Coercion]-unifyWanteds rewriters ctlocs roles rhss lhss = unify_wanteds rewriters $ zip4 ctlocs roles rhss lhss- where- -- Order is important here- -- See Note [Decomposing Dependent TyCons and Processing Wanted Equalities]- unify_wanteds _ [] = return []- unify_wanteds rewriters ((new_loc, tc_role, ty1, ty2) : rest)- = do { cos <- unify_wanteds rewriters rest- ; co <- unifyWanted rewriters new_loc tc_role ty1 ty2- ; return (co:cos) }
+ GHC/Tc/Solver/Dict.hs view
@@ -0,0 +1,2177 @@+{-# LANGUAGE MultiWayIf #-}++-- | Solving Class constraints CDictCan+module GHC.Tc.Solver.Dict (+ solveDict, solveDictNC,+ checkInstanceOK,+ matchLocalInst, chooseInstance,+ makeSuperClasses, mkStrictSuperClasses,+ solveCallStack -- For GHC.Tc.Solver+ ) where++import GHC.Prelude++import GHC.Tc.Errors.Types+import GHC.Tc.Instance.FunDeps+import GHC.Tc.Instance.Class( safeOverlap, matchEqualityInst )+import GHC.Tc.Types.Evidence+import GHC.Tc.Types.Constraint+import GHC.Tc.Types.Origin+import GHC.Tc.Types.EvTerm( evCallStack )+import GHC.Tc.Solver.InertSet+import GHC.Tc.Solver.Monad+import GHC.Tc.Solver.Types+import GHC.Tc.Utils.TcType+import GHC.Tc.Utils.Unify( uType )++import GHC.Hs.Type( HsIPName(..) )++import GHC.Core+import GHC.Core.Type+import GHC.Core.InstEnv ( DFunInstType )+import GHC.Core.Class+import GHC.Core.Predicate+import GHC.Core.Multiplicity ( scaledThing )+import GHC.Core.Unify ( ruleMatchTyKiX )++import GHC.Types.Name.Set+import GHC.Types.Var+import GHC.Types.Id( mkTemplateLocals )+import GHC.Types.Var.Set+import GHC.Types.SrcLoc+import GHC.Types.Var.Env++import GHC.Utils.Monad ( concatMapM, foldlM )+import GHC.Utils.Outputable+import GHC.Utils.Panic+import GHC.Utils.Misc++import GHC.Data.Bag++import GHC.Driver.DynFlags++import qualified GHC.LanguageExtensions as LangExt++import Data.Maybe ( listToMaybe, mapMaybe, isJust )+import Data.Void( Void )++import Control.Monad.Trans.Maybe( MaybeT, runMaybeT )+import Control.Monad.Trans.Class( lift )+import Control.Monad( mzero )+++{- *********************************************************************+* *+* Class Canonicalization+* *+********************************************************************* -}++solveDictNC :: CtEvidence -> Class -> [Type] -> SolverStage Void+-- NC: this comes from CNonCanonical or CIrredCan+-- Precondition: already rewritten by inert set+solveDictNC ev cls tys+ = do { simpleStage $ traceTcS "solveDictNC" (ppr (mkClassPred cls tys) $$ ppr ev)+ ; dict_ct <- canDictCt ev cls tys+ ; solveDict dict_ct }++solveDict :: DictCt -> SolverStage Void+-- Preconditions: `tys` are already rewritten by the inert set+solveDict dict_ct@(DictCt { di_ev = ev, di_cls = cls, di_tys = tys })+ | isEqualityClass cls+ = solveEqualityDict ev cls tys++ | otherwise+ = assertPpr (ctEvRole ev == Nominal) (ppr ev $$ ppr cls $$ ppr tys) $+ do { simpleStage $ traceTcS "solveDict" (ppr dict_ct)++ ; tryInertDicts dict_ct+ ; tryInstances dict_ct++ -- Try fundeps /after/ tryInstances:+ -- see (DFL2) in Note [Do fundeps last]+ ; doLocalFunDepImprovement dict_ct+ -- doLocalFunDepImprovement does StartAgain if there+ -- are any fundeps: see (DFL1) in Note [Do fundeps last]++ ; doTopFunDepImprovement dict_ct++ ; tryLastResortProhibitedSuperClass dict_ct+ ; simpleStage (updInertDicts dict_ct)+ ; stopWithStage (dictCtEvidence dict_ct) "Kept inert DictCt" }++updInertDicts :: DictCt -> TcS ()+updInertDicts dict_ct@(DictCt { di_cls = cls, di_ev = ev, di_tys = tys })+ = do { traceTcS "Adding inert dict" (ppr dict_ct $$ ppr cls <+> ppr tys)++ ; if | isGiven ev, Just (str_ty, _) <- isIPPred_maybe cls tys+ -> -- See (SIP1) and (SIP2) in Note [Shadowing of implicit parameters]+ -- Update /both/ inert_cans /and/ inert_solved_dicts.+ updInertSet $ \ inerts@(IS { inert_cans = ics, inert_solved_dicts = solved }) ->+ inerts { inert_cans = updDicts (filterDicts (not_ip_for str_ty)) ics+ , inert_solved_dicts = filterDicts (not_ip_for str_ty) solved }+ | otherwise+ -> return ()++ -- Add the new constraint to the inert set+ ; updInertCans (updDicts (addDict dict_ct)) }+ where+ not_ip_for :: Type -> DictCt -> Bool+ not_ip_for str_ty (DictCt { di_cls = cls, di_tys = tys })+ = not (mentionsIP str_ty cls tys)++canDictCt :: CtEvidence -> Class -> [Type] -> SolverStage DictCt+-- Once-only processing of Dict constraints:+-- * expand superclasses+-- * deal with CallStack+canDictCt ev cls tys+ | isGiven ev -- See Note [Eagerly expand given superclasses]+ = Stage $+ do { dflags <- getDynFlags+ ; sc_cts <- mkStrictSuperClasses (givensFuel dflags) ev [] [] cls tys+ -- givensFuel dflags: See Note [Expanding Recursive Superclasses and ExpansionFuel]+ ; emitWork (listToBag sc_cts)++ ; continueWith (DictCt { di_ev = ev, di_cls = cls+ , di_tys = tys, di_pend_sc = doNotExpand }) }+ -- doNotExpand: We have already expanded superclasses for /this/ dict+ -- so set the fuel to doNotExpand to avoid repeating expansion++ | CtWanted { ctev_rewriters = rewriters } <- ev+ , Just ip_name <- isCallStackPred cls tys+ , isPushCallStackOrigin orig+ -- If we're given a CallStack constraint that arose from a function+ -- call, we need to push the current call-site onto the stack instead+ -- of solving it directly from a given.+ -- See Note [Overview of implicit CallStacks] in GHC.Tc.Types.Evidence+ -- and Note [Solving CallStack constraints] in GHC.Tc.Solver.Types+ = Stage $+ do { -- First we emit a new constraint that will capture the+ -- given CallStack.+ let new_loc = setCtLocOrigin loc (IPOccOrigin (HsIPName ip_name))+ -- We change the origin to IPOccOrigin so+ -- this rule does not fire again.+ -- See Note [Overview of implicit CallStacks]+ -- in GHC.Tc.Types.Evidence++ ; new_ev <- newWantedEvVarNC new_loc rewriters pred++ -- Then we solve the wanted by pushing the call-site+ -- onto the newly emitted CallStack+ ; let ev_cs = EvCsPushCall (callStackOriginFS orig)+ (ctLocSpan loc) (ctEvExpr new_ev)+ ; solveCallStack ev ev_cs++ ; continueWith (DictCt { di_ev = new_ev, di_cls = cls+ , di_tys = tys, di_pend_sc = doNotExpand }) }+ -- doNotExpand: No superclasses for class CallStack+ -- See invariants in CDictCan.cc_pend_sc++ | otherwise+ = Stage $+ do { dflags <- getDynFlags+ ; let fuel | classHasSCs cls = wantedsFuel dflags+ | otherwise = doNotExpand+ -- See Invariants in `CCDictCan.cc_pend_sc`+ ; continueWith (DictCt { di_ev = ev, di_cls = cls+ , di_tys = tys, di_pend_sc = fuel }) }+ where+ loc = ctEvLoc ev+ orig = ctLocOrigin loc+ pred = ctEvPred ev++solveCallStack :: CtEvidence -> EvCallStack -> TcS ()+-- Also called from GHC.Tc.Solver when defaulting call stacks+solveCallStack ev ev_cs+ -- 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]+ = do { cs_tm <- evCallStack ev_cs+ ; let ev_tm = mkEvCast cs_tm (wrapIP (ctEvPred ev))+ ; setEvBindIfWanted ev True ev_tm }+++{- Note [Shadowing of implicit parameters]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we add a new /given/ implicit parameter to the inert set, it /replaces/+any existing givens for the same implicit parameter. This makes a difference+in two places:++* In `GHC.Tc.Solver.InertSet.solveOneFromTheOther`, be careful when we have+ (?x :: ty) in the inert set and an identical (?x :: ty) as the work item.++* In `updInertDicts` in this module, when adding [G] (?x :: ty), remove any+ existing [G] (?x :: ty'), regardless of ty'.++* Wrinkle (SIP1): we must be careful of superclasses. Consider+ f,g :: (?x::Int, C a) => a -> a+ f v = let ?x = 4 in g v++ The call to 'g' gives rise to a Wanted constraint (?x::Int, C a).+ We must /not/ solve this from the Given (?x::Int, C a), because of+ the intervening binding for (?x::Int). #14218.++ We deal with this by arranging that when we add [G] (?x::ty) we delete+ * from the inert_cans, and+ * from the inert_solved_dicts+ any existing [G] (?x::ty) /and/ any [G] D tys, where (D tys) has a superclass+ with (?x::ty). See Note [Local implicit parameters] in GHC.Core.Predicate.++ An important special case is constraint tuples like [G] (% ?x::ty, Eq a %).+ But it could happen for `class xx => D xx where ...` and the constraint D+ (?x :: int). This corner (constraint-kinded variables instantiated with+ implicit parameter constraints) is not well explorered.++ Example in #14218, and #23761++ The code that accounts for (SIP1) is in updInertDicts; in particular the call to+ GHC.Core.Predicate.mentionsIP.++* Wrinkle (SIP2): we must apply this update semantics for `inert_solved_dicts`+ as well as `inert_cans`.+ You might think that wouldn't be necessary, because an element of+ `inert_solved_dicts` is never an implicit parameter (see+ Note [Solved dictionaries] in GHC.Tc.Solver.InertSet).+ While that is true, dictionaries in `inert_solved_dicts` may still have+ implicit parameters as a /superclass/! For example:++ class c => C c where ...+ f :: C (?x::Int) => blah++ Now (C (?x::Int)) has a superclass (?x::Int). This may look exotic, but it+ happens particularly for constraint tuples, like `(% ?x::Int, Eq a %)`.++Example 1:++Suppose we have (typecheck/should_compile/ImplicitParamFDs)+ flub :: (?x :: Int) => (Int, Integer)+ flub = (?x, let ?x = 5 in ?x)+When we are checking the last ?x occurrence, we guess its type to be a fresh+unification variable alpha and emit an (IP "x" alpha) constraint. But the given+(?x :: Int) has been translated to an IP "x" Int constraint, which has a+functional dependency from the name to the type. So if that (?x::Int) is still+in the inert set, we'd get a fundep interaction that tells us that alpha ~ Int,+and we get a type error. This is bad. The "replacement" semantics stops this+happening.++Example 2:++f :: (?x :: Char) => Char+f = let ?x = 'a' in ?x++The "let ?x = ..." generates an implication constraint of the form:++?x :: Char => ?x :: Char++Furthermore, the signature for `f` also generates an implication+constraint, so we end up with the following nested implication:++?x :: Char => (?x :: Char => ?x :: Char)++Note that the wanted (?x :: Char) constraint may be solved in two incompatible+ways: either by using the parameter from the signature, or by using the local+definition. Our intention is that the local definition should "shadow" the+parameter of the signature. The "replacement" semantics for implicit parameters+does this.++Example 3:++Similarly, consider+ f :: (?x::a) => Bool -> a++ g v = let ?x::Int = 3+ in (f v, let ?x::Bool = True in f v)++This should probably be well typed, with+ g :: Bool -> (Int, Bool)++So the inner binding for ?x::Bool *overrides* the outer one.++See ticket #17104 for a rather tricky example of this overriding+behaviour.++All this works for the normal cases but it has an odd side effect in+some pathological programs like this:++ -- This is accepted, the second parameter shadows+ f1 :: (?x :: Int, ?x :: Char) => Char+ f1 = ?x++ -- This is rejected, the second parameter shadows+ f2 :: (?x :: Int, ?x :: Char) => Int+ f2 = ?x++Both of these are actually wrong: when we try to use either one,+we'll get two incompatible wanted constraints (?x :: Int, ?x :: Char),+which would lead to an error.++I can think of two ways to fix this:++ 1. Simply disallow multiple constraints for the same implicit+ parameter---this is never useful, and it can be detected completely+ syntactically.++ 2. Move the shadowing machinery to the location where we nest+ implications, and add some code here that will produce an+ error if we get multiple givens for the same implicit parameter.+-}+++{- ******************************************************************************+* *+ solveEqualityDict+* *+****************************************************************************** -}++{- Note [Solving equality classes]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (~), which behaves as if it was defined like this:+ class a ~# b => a ~ b+ instance a ~# b => a ~ b+There are two more similar "equality classes" like this. The full list is+ * (~) eqTyCon+ * (~~) heqTyCon+ * Coercible coercibleTyCon+(See Note [The equality types story] in GHC.Builtin.Types.Prim.)++(EQC1) For Givens, when expanding the superclasses of a equality class,+ we can /replace/ the constraint with its superclasses (which, remember, are+ equally powerful) rather than /adding/ them. This can make a huge difference.+ Consider T17836, which has a constraint like+ forall b,c. a ~ (b,c) =>+ forall d,e. c ~ (d,e) =>+ ...etc...+ If we just /add/ the superclasses of [G] g1:a ~ (b,c), we'll put+ [G] g1:(a~(b,c)) in the inert set and emit [G] g2:a ~# (b,c). That will+ kick out g1, and it'll be re-inserted as [G] g1':(b,c)~(b,c) which does+ no good to anyone. When the implication is deeply nested, this has+ quadratic cost, and no benefit. Just replace!++ (This can have a /big/ effect: test T17836 involves deeply-nested GADT+ pattern matching. Its compile-time allocation decreased by 40% when+ I added the "replace" rather than "add" semantics.)++(EQC2) Faced with [W] t1 ~ t2, it's always OK to reduce it to [W] t1 ~# t2,+ without worrying about Note [Instance and Given overlap]. Why? Because+ if we had [G] s1 ~ s2, then we'd get the superclass [G] s1 ~# s2, and+ so the reduction of the [W] constraint does not risk losing any solutions.++ On the other hand, it can be fatal to /fail/ to reduce such equalities+ on the grounds of Note [Instance and Given overlap], because many good+ things flow from [W] t1 ~# t2.++Conclusion: we have a special solver pipeline for equality-class constraints,+`solveEqualityDict`. It aggressively decomposes the boxed equality constraint+into an unboxed coercion, both for Givens and Wanteds, and /replaces/ the+boxed equality constraint with the unboxed one, so that the inert set never+contains the boxed one.++Note [Solving tuple constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+I tried treating tuple constraints, such as (% Eq a, Show a %), rather like+equality-class constraints (see Note [Solving equality classes]). That is, by+eagerly decomposing tuple-constraints into their component (Eq a) and (Show a).++But discarding the tuple Given (which "replacing" does) means that we may+have to reconstruct it for a recursive call. For example+ f :: (% Eq a, Show a %) => blah+ f x = ....(f x')....+If we decomposed eagerly we'd get+ f = \(d : (% Eq a, Show a %)).+ let de = fst d+ ds = snd d+ in ....(f (% de, ds %))...+and the optimiser may not be clever enough to transform (f (% de, ds %)) into+(f d). See #10359 and its test case, and #23398. (This issue is less pressing for+equality classes because they have to be unpacked strictly, so CSE-ing away+the reconstruction works fine.++So at the moment we don't decompose tuple constraints eagerly; instead we mostly+just treat them like other constraints.+* Given tuples are decomposed via their superclasses, in `canDictCt`. So+ [G] (% Eq a, Show a %)+ has superclasses+ [G] Eq a, [G] Show a++* Wanted tuples are decomposed via a built-in "instance". See+ `GHC.Tc.Instance.Class.matchCTuple`++There is a bit of special treatment: search for isCTupleClass.+-}++solveEqualityDict :: CtEvidence -> Class -> [Type] -> SolverStage Void+-- Precondition: (isEqualityClass cls) True, so cls is (~), (~~), or Coercible+solveEqualityDict ev cls tys+ | CtWanted { ctev_dest = dest } <- ev+ = Stage $+ do { let (data_con, role, t1, t2) = matchEqualityInst cls tys+ -- Unify t1~t2, putting anything that can't be solved+ -- immediately into the work list+ ; (co, _, _) <- wrapUnifierTcS ev role $ \uenv ->+ uType uenv t1 t2+ -- Set d :: (t1~t2) = Eq# co+ ; setWantedEvTerm dest True $+ evDataConApp data_con tys [Coercion co]+ ; stopWith ev "Solved wanted lifted equality" }++ | CtGiven { ctev_evar = ev_id, ctev_loc = loc } <- ev+ , [sel_id] <- classSCSelIds cls -- Equality classes have just one superclass+ = Stage $+ do { let sc_pred = classMethodInstTy sel_id tys+ ev_expr = EvExpr $ Var sel_id `mkTyApps` tys `App` evId ev_id+ ; given_ev <- newGivenEvVar loc (sc_pred, ev_expr)+ ; startAgainWith (mkNonCanonical given_ev) }+ | otherwise+ = pprPanic "solveEqualityDict" (ppr cls)++{- ******************************************************************************+* *+ interactDict+* *+*********************************************************************************++Note [Shortcut solving]+~~~~~~~~~~~~~~~~~~~~~~~+When we interact a [W] constraint with a [G] constraint that solves it, there is+a possibility that we could produce better code if instead we solved from a+top-level instance declaration (See #12791, #5835). For example:++ class M a b where m :: a -> b++ type C a b = (Num a, M a b)++ f :: C Int b => b -> Int -> Int+ f _ x = x + 1++The body of `f` requires a [W] `Num Int` instance. We could solve this+constraint from the givens because we have `C Int b` and that provides us a+solution for `Num Int`. This would let us produce core like the following+(with -O2):++ f :: forall b. C Int b => b -> Int -> Int+ f = \ (@ b) ($d(%,%) :: C Int b) _ (eta1 :: Int) ->+ + @ Int+ (GHC.Classes.$p1(%,%) @ (Num Int) @ (M Int b) $d(%,%))+ eta1+ A.f1++This is bad! We could do /much/ better if we solved [W] `Num Int` directly+from the instance that we have in scope:++ f :: forall b. C Int b => b -> Int -> Int+ f = \ (@ b) _ _ (x :: Int) ->+ case x of { GHC.Types.I# x1 -> GHC.Types.I# (GHC.Prim.+# x1 1#) }++** NB: It is important to emphasize that all this is purely an optimization:+** exactly the same programs should typecheck with or without this+** procedure.++Solving fully+~~~~~~~~~~~~~+There is a reason why the solver does not simply try to solve such+constraints with top-level instances. If the solver finds a relevant+instance declaration in scope, that instance may require a context+that can't be solved for. A good example of this is:++ f :: Ord [a] => ...+ f x = ..Need Eq [a]...++If we have instance `Eq a => Eq [a]` in scope and we tried to use it, we would+be left with the obligation to solve the constraint Eq a, which we cannot. So we+must be conservative in our attempt to use an instance declaration to solve the+[W] constraint we're interested in.++Our rule is that we try to solve all of the instance's subgoals+recursively all at once. Precisely: We only attempt to solve+constraints of the form `C1, ... Cm => C t1 ... t n`, where all the Ci+are themselves class constraints of the form `C1', ... Cm' => C' t1'+... tn'` and we only succeed if the entire tree of constraints is+solvable from instances.++An example that succeeds:++ class Eq a => C a b | b -> a where+ m :: b -> a++ f :: C [Int] b => b -> Bool+ f x = m x == []++We solve for `Eq [Int]`, which requires `Eq Int`, which we also have. This+produces the following core:++ f :: forall b. C [Int] b => b -> Bool+ f = \ (@ b) ($dC :: C [Int] b) (x :: b) ->+ GHC.Classes.$fEq[]_$s$c==+ (m @ [Int] @ b $dC x) (GHC.Types.[] @ Int)++An example that fails:++ class Eq a => C a b | b -> a where+ m :: b -> a++ f :: C [a] b => b -> Bool+ f x = m x == []++Which, because solving `Eq [a]` demands `Eq a` which we cannot solve, produces:++ f :: forall a b. C [a] b => b -> Bool+ f = \ (@ a) (@ b) ($dC :: C [a] b) (eta :: b) ->+ ==+ @ [a]+ (A.$p1C @ [a] @ b $dC)+ (m @ [a] @ b $dC eta)+ (GHC.Types.[] @ a)++Note [Shortcut solving: type families]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have (#13943)+ class Take (n :: Nat) where ...+ instance {-# OVERLAPPING #-} Take 0 where ..+ instance {-# OVERLAPPABLE #-} (Take (n - 1)) => Take n where ..++And we have [W] Take 3. That only matches one instance so we get+[W] Take (3-1). Really we should now rewrite to reduce the (3-1) to 2, and+so on -- but that is reproducing yet more of the solver. Sigh. For now,+we just give up (remember all this is just an optimisation).++But we must not just naively try to lookup (Take (3-1)) in the+InstEnv, or it'll (wrongly) appear not to match (Take 0) and get a+unique match on the (Take n) instance. That leads immediately to an+infinite loop. Hence the check that 'preds' have no type families+(isTyFamFree).++Note [Shortcut solving: incoherence]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+This optimization relies on coherence of dictionaries to be correct. When we+cannot assume coherence because of IncoherentInstances then this optimization+can change the behavior of the user's code.++The following four modules produce a program whose output would change depending+on whether we apply this optimization when IncoherentInstances is in effect:++=========+ {-# LANGUAGE MultiParamTypeClasses #-}+ module A where++ class A a where+ int :: a -> Int++ class A a => C a b where+ m :: b -> a -> a++=========+ {-# LANGUAGE FlexibleInstances #-}+ {-# LANGUAGE MultiParamTypeClasses #-}+ module B where++ import A++ instance A a where+ int _ = 1++ instance C a [b] where+ m _ = id++=========+ {-# LANGUAGE FlexibleContexts #-}+ {-# LANGUAGE FlexibleInstances #-}+ {-# LANGUAGE IncoherentInstances #-}+ {-# LANGUAGE MultiParamTypeClasses #-}+ module C where++ import A++ instance A Int where+ int _ = 2++ instance C Int [Int] where+ m _ = id++ intC :: C Int a => a -> Int -> Int+ intC _ x = int x++=========+ module Main where++ import A+ import B+ import C++ main :: IO ()+ main = print (intC [] (0::Int))++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 :: (EvBindMap, DictMap CtEvidence)+ -> CtEvidence -- Solve this+ -> MaybeT TcS (EvBindMap, DictMap CtEvidence)+Note that:++* The CtEvidence is the goal to be solved++* The MaybeT manages 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 augment 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 #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.++Note [No Given/Given fundeps]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We do not create constraints from:+* Given/Given interactions via functional dependencies or type family+ injectivity annotations.+* Given/instance fundep interactions via functional dependencies or+ type family injectivity annotations.++In this Note, all these interactions are called just "fundeps".++We ingore such fundeps for several reasons:++1. These fundeps will never serve a purpose in accepting more+ programs: Given constraints do not contain metavariables that could+ be unified via exploring fundeps. They *could* be useful in+ discovering inaccessible code. However, the constraints will be+ Wanteds, and as such will cause errors (not just warnings) if they+ go unsolved. Maybe there is a clever way to get the right+ inaccessible code warnings, but the path forward is far from+ clear. #12466 has further commentary.++2. Furthermore, here is a case where a Given/instance interaction is actively+ harmful (from dependent/should_compile/RaeJobTalk):++ type family a == b :: Bool+ type family Not a = r | r -> a where+ Not False = True+ Not True = False++ [G] Not (a == b) ~ True++ Reacting this Given with the equations for Not produces++ [W] a == b ~ False++ This is indeed a true consequence, and would make sense as a fresh Given.+ But we don't have a way to produce evidence for fundeps, as a Wanted it+ is /harmful/: we can't prove it, and so we'll report an error and reject+ the program. (Previously fundeps gave rise to Deriveds, which+ carried no evidence, so it didn't matter that they could not be proved.)++3. #20922 showed a subtle different problem with Given/instance fundeps.+ type family ZipCons (as :: [k]) (bssx :: [[k]]) = (r :: [[k]]) | r -> as bssx where+ ZipCons (a ': as) (bs ': bss) = (a ': bs) ': ZipCons as bss+ ...++ tclevel = 4+ [G] ZipCons is1 iss ~ (i : is2) : jss++ (The tclevel=4 means that this Given is at level 4.) The fundep tells us that+ 'iss' must be of form (is2 : beta[4]) where beta[4] is a fresh unification+ variable; we don't know what type it stands for. So we would emit+ [W] iss ~ is2 : beta++ Again we can't prove that equality; and worse we'll rewrite iss to+ (is2:beta) in deeply nested constraints inside this implication,+ where beta is untouchable (under other equality constraints), leading+ to other insoluble constraints.++The bottom line: since we have no evidence for them, we should ignore Given/Given+and Given/instance fundeps entirely.+-}++tryInertDicts :: DictCt -> SolverStage ()+tryInertDicts dict_ct+ = Stage $ do { inerts <- getInertCans+ ; try_inert_dicts inerts dict_ct }++try_inert_dicts :: InertCans -> DictCt -> TcS (StopOrContinue ())+try_inert_dicts inerts dict_w@(DictCt { di_ev = ev_w, di_cls = cls, di_tys = tys })+ | Just dict_i <- lookupInertDict inerts (ctEvLoc ev_w) cls tys+ , let ev_i = dictCtEvidence dict_i+ loc_i = ctEvLoc ev_i+ loc_w = ctEvLoc ev_w+ = -- There is a matching dictionary in the inert set+ do { -- First to try to solve it /completely/ from top level instances+ -- See Note [Shortcut solving]+ dflags <- getDynFlags+ ; short_cut_worked <- shortCutSolver dflags ev_w ev_i+ ; if short_cut_worked+ then stopWith ev_w "interactDict/solved from instance"++ -- Next see if we are in "loopy-superclass" land. If so,+ -- we don't want to replace the (Given) inert with the+ -- (Wanted) work-item, or vice versa; we want to hang on+ -- to both, and try to solve the work-item via an instance.+ -- See Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance+ else if prohibitedSuperClassSolve loc_i loc_w+ then continueWith ()+ else+ do { -- The short-cut solver didn't fire, and loopy superclasses+ -- are dealt with, so we can either solve+ -- the inert from the work-item or vice-versa.+ ; case solveOneFromTheOther (CDictCan dict_i) (CDictCan dict_w) of+ KeepInert -> do { traceTcS "lookupInertDict:KeepInert" (ppr dict_w)+ ; setEvBindIfWanted ev_w True (ctEvTerm ev_i)+ ; return $ Stop ev_w (text "Dict equal" <+> ppr dict_w) }+ KeepWork -> do { traceTcS "lookupInertDict:KeepWork" (ppr dict_w)+ ; setEvBindIfWanted ev_i True (ctEvTerm ev_w)+ ; updInertCans (updDicts $ delDict dict_w)+ ; continueWith () } } }++ | otherwise+ = do { traceTcS "tryInertDicts:no" (ppr dict_w $$ ppr cls <+> ppr tys)+ ; continueWith () }++-- See Note [Shortcut solving]+shortCutSolver :: DynFlags+ -> CtEvidence -- Work item+ -> CtEvidence -- Inert we want to try to replace+ -> TcS Bool -- True <=> success+shortCutSolver dflags ev_w ev_i+ | isWanted ev_w+ , isGiven ev_i+ -- We are about to solve a [W] constraint from a [G] constraint. We take+ -- a moment to see if we can get a better solution using an instance.+ -- Note that we only do this for the sake of performance. Exactly the same+ -- programs should typecheck regardless of whether we take this step or+ -- not. See Note [Shortcut solving]++ , not (isIPLikePred (ctEvPred ev_w)) -- Not for implicit parameters (#18627)++ , not (xopt LangExt.IncoherentInstances dflags)+ -- If IncoherentInstances is on then we cannot rely on coherence of proofs+ -- in order to justify this optimization: The proof provided by the+ -- [G] constraint's superclass may be different from the top-level proof.+ -- See Note [Shortcut solving: incoherence]++ , gopt Opt_SolveConstantDicts dflags+ -- Enabled by the -fsolve-constant-dicts flag++ = do { ev_binds_var <- getTcEvBindsVar+ ; ev_binds <- assertPpr (not (isCoEvBindsVar ev_binds_var )) (ppr ev_w) $+ getTcEvBindsMap ev_binds_var+ ; solved_dicts <- getSolvedDicts++ ; mb_stuff <- runMaybeT $+ try_solve_from_instance (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++ try_solve_from_instance -- See Note [Shortcut try_solve_from_instance]+ :: (EvBindMap, DictMap DictCt) -> CtEvidence+ -> MaybeT TcS (EvBindMap, DictMap DictCt)+ try_solve_from_instance (ev_binds, solved_dicts) ev+ | let pred = ctEvPred ev+ , ClassPred cls tys <- classifyPredType pred+ = do { inst_res <- lift $ matchGlobalInst dflags True cls tys+ ; case inst_res of+ OneInst { cir_new_theta = preds+ , cir_mk_ev = mk_ev+ , cir_canonical = canonical+ , cir_what = what }+ | safeOverlap what+ , all isTyFamFree preds -- Note [Shortcut solving: type families]+ -> do { let dict_ct = DictCt { di_ev = ev, di_cls = cls+ , di_tys = tys, di_pend_sc = doNotExpand }+ solved_dicts' = addSolvedDict dict_ct solved_dicts+ -- 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)+ ; loc' <- lift $ checkInstanceOK (ctEvLoc ev) what pred+ ; lift $ checkReductionDepth loc' pred+++ ; evc_vs <- mapM (new_wanted_cached ev loc' solved_dicts') preds+ -- Emit work for subgoals but use our local cache+ -- so we can solve recursive dictionaries.++ ; let ev_tm = mk_ev (map getEvExpr evc_vs)+ ev_binds' = extendEvBinds ev_binds $+ mkWantedEvBind (ctEvEvId ev) canonical ev_tm++ ; foldlM try_solve_from_instance (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 :: CtEvidence -> CtLoc+ -> DictMap DictCt -> TcPredType -> MaybeT TcS MaybeNew+ new_wanted_cached ev_w loc cache pty+ | ClassPred cls tys <- classifyPredType pty+ = lift $ case findDict cache loc_w cls tys of+ Just dict_ct -> return $ Cached (ctEvExpr (dictCtEvidence dict_ct))+ Nothing -> Fresh <$> newWantedNC loc (ctEvRewriters ev_w) pty+ | otherwise = mzero++{- *******************************************************************+* *+ Top-level reaction for class constraints (CDictCan)+* *+**********************************************************************-}++tryInstances :: DictCt -> SolverStage ()+tryInstances dict_ct+ = Stage $ do { inerts <- getInertSet+ ; try_instances inerts dict_ct }++try_instances :: InertSet -> DictCt -> TcS (StopOrContinue ())+-- Try to use type-class instance declarations to simplify the constraint+try_instances inerts work_item@(DictCt { di_ev = ev, di_cls = cls+ , di_tys = xis })+ | isGiven ev -- Never use instances for Given constraints+ = continueWith ()+ -- See Note [No Given/Given fundeps]++ | Just solved_ev <- lookupSolvedDict inerts dict_loc cls xis -- Cached+ = do { setEvBindIfWanted ev True (ctEvTerm solved_ev)+ ; stopWith ev "Dict/Top (cached)" }++ | otherwise -- Wanted, but not cached+ = do { dflags <- getDynFlags+ ; lkup_res <- matchClassInst dflags inerts cls xis dict_loc+ ; case lkup_res of+ OneInst { cir_what = what }+ -> do { insertSafeOverlapFailureTcS what work_item+ ; updSolvedDicts what work_item+ ; chooseInstance ev lkup_res }+ _ -> -- NoInstance or NotSure+ -- We didn't solve it; so try functional dependencies+ continueWith () }+ where+ dict_loc = ctEvLoc ev++chooseInstance :: CtEvidence -> ClsInstResult -> TcS (StopOrContinue a)+chooseInstance work_item+ (OneInst { cir_new_theta = theta+ , cir_what = what+ , cir_mk_ev = mk_ev+ , cir_canonical = canonical })+ = do { traceTcS "doTopReact/found instance for" $ ppr work_item+ ; deeper_loc <- checkInstanceOK loc what pred+ ; checkReductionDepth deeper_loc pred+ ; assertPprM (getTcEvBindsVar >>= return . not . isCoEvBindsVar)+ (ppr work_item)+ ; evc_vars <- mapM (newWanted deeper_loc (ctEvRewriters work_item)) theta+ ; setEvBindIfWanted work_item canonical (mk_ev (map getEvExpr evc_vars))+ ; emitWorkNC (freshGoals evc_vars)+ ; stopWith work_item "Dict/Top (solved wanted)" }+ where+ pred = ctEvPred work_item+ loc = ctEvLoc work_item++chooseInstance work_item lookup_res+ = pprPanic "chooseInstance" (ppr work_item $$ ppr lookup_res)++checkInstanceOK :: CtLoc -> InstanceWhat -> TcPredType -> TcS CtLoc+-- Check that it's OK to use this instance:+-- (a) the use is well staged in the Template Haskell sense+-- Returns the CtLoc to used for sub-goals+-- Probably also want to call checkReductionDepth+checkInstanceOK loc what pred+ = do { checkWellStagedDFun loc what pred+ ; return deeper_loc }+ where+ deeper_loc = zap_origin (bumpCtLocDepth loc)+ origin = ctLocOrigin loc++ zap_origin loc -- After applying an instance we can set ScOrigin to+ -- NotNakedSc, so that prohibitedSuperClassSolve never fires+ -- See Note [Solving superclass constraints] in+ -- GHC.Tc.TyCl.Instance, (sc1).+ | ScOrigin what _ <- origin+ = setCtLocOrigin loc (ScOrigin what NotNakedSc)+ | otherwise+ = loc++matchClassInst :: DynFlags -> InertSet+ -> Class -> [Type]+ -> CtLoc -> TcS ClsInstResult+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 any instance+-- whether top level, or local quantified constraints.+-- See Note [Instance and Given overlap]+ | not (xopt LangExt.IncoherentInstances dflags)+ , not (isCTupleClass clas)+ -- It is always safe to unpack constraint tuples+ -- And if we don't do so, we may never solve it at all+ -- See Note [Solving tuple constraints]+ , not (noMatchableGivenDicts inerts loc clas tys)+ = do { traceTcS "Delaying instance application" $+ vcat [ text "Work item:" <+> pprClassPred clas tys ]+ ; return NotSure }++ | 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 }++ 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+ ; traceTcS "} matchClassInst global result" $ ppr global_res+ ; return global_res } }+ where+ pred = mkClassPred clas tys++{- Note [Instance and Given overlap]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Example, from the OutsideIn(X) paper:+ instance P x => Q [x]+ instance (x ~ y) => R y [x]++ wob :: forall a b. (Q [b], R b a) => a -> Int++ g :: forall a. Q [a] => [a] -> Int+ g x = wob x++From 'g' we get the implication constraint:+ forall a. Q [a] => (Q [beta], R beta [a])+If we react (Q [beta]) with its top-level axiom, we end up with a+(P beta), which we have no way of discharging. On the other hand,+if we react R beta [a] with the top-level we get (beta ~ a), which+is solvable and can help us rewrite (Q [beta]) to (Q [a]) which is+now solvable by the given Q [a].++The partial solution is that:+ In matchClassInst (and thus in topReact), we return a matching+ instance only when there is no Given in the inerts which is+ unifiable to this particular dictionary.++ We treat any meta-tyvar as "unifiable" for this purpose,+ *including* untouchable ones. But not skolems like 'a' in+ the implication constraint above.++The end effect is that, much as we do for overlapping instances, we+delay choosing a class instance if there is a possibility of another+instance OR a given to match our constraint later on. This fixes+tickets #4981 and #5002.++Other notes:++* The check is done *first*, so that it also covers classes+ with built-in instance solving, such as+ - constraint tuples+ - natural numbers+ - Typeable++* See also Note [What might equal later?] in GHC.Tc.Solver.InertSet.++* The given-overlap problem is arguably not easy to appear in practice+ due to our aggressive prioritization of equality solving over other+ constraints, but it is possible. I've added a test case in+ typecheck/should-compile/GivenOverlapping.hs++* Another "live" example is #10195; another is #10177.++* We ignore the overlap problem if -XIncoherentInstances is in force:+ see #6002 for a worked-out example where this makes a+ difference.++* Moreover notice that our goals here are different than the goals of+ the top-level overlapping checks. There we are interested in+ validating the following principle:++ If we inline a function f at a site where the same global+ instance environment is available as the instance environment at+ the definition site of f then we should get the same behaviour.++ But for the Given Overlap check our goal is just related to completeness of+ constraint solving.++* The solution is only a partial one. Consider the above example with+ g :: forall a. Q [a] => [a] -> Int+ g x = let v = wob x+ in v+ and suppose we have -XNoMonoLocalBinds, so that we attempt to find the most+ general type for 'v'. When generalising v's type we'll simplify its+ Q [alpha] constraint, but we don't have Q [a] in the 'givens', so we+ will use the instance declaration after all. #11948 was a case+ in point.++All of this is disgustingly delicate, so to discourage people from writing+simplifiable class givens, we warn about signatures that contain them;+see GHC.Tc.Validity Note [Simplifiable given constraints].+++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 GHC.Core.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.++Consider 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 ClsInstResult+-- Look up the predicate in Given quantified constraints,+-- which are effectively just local instance declarations.+matchLocalInst pred loc+ = do { inerts@(IS { inert_cans = ics }) <- getInertSet+ ; case match_local_inst inerts (inert_insts ics) of+ { ([], []) -> do { traceTcS "No local instance for" (ppr pred)+ ; return NoInstance }+ ; (matches, unifs) ->+ do { matches <- mapM mk_instDFun matches+ ; unifs <- mapM mk_instDFun unifs+ -- See Note [Use only the best matching quantified constraint]+ ; case dominatingMatch matches of+ { Just (dfun_id, tys, theta)+ | all ((theta `impliedBySCs`) . thdOf3) unifs+ ->+ do { let result = OneInst { cir_new_theta = theta+ , cir_mk_ev = evDFunApp dfun_id tys+ , cir_canonical = True+ , cir_what = LocalInstance }+ ; traceTcS "Best local instance found:" $+ vcat [ text "pred:" <+> ppr pred+ , text "result:" <+> ppr result+ , text "matches:" <+> ppr matches+ , text "unifs:" <+> ppr unifs ]+ ; return result }++ ; mb_best ->+ do { traceTcS "Multiple local instances; not committing to any"+ $ vcat [ text "pred:" <+> ppr pred+ , text "matches:" <+> ppr matches+ , text "unifs:" <+> ppr unifs+ , text "best_match:" <+> ppr mb_best ]+ ; return NotSure }}}}}+ where+ pred_tv_set = tyCoVarsOfType pred++ mk_instDFun :: (CtEvidence, [DFunInstType]) -> TcS InstDFun+ mk_instDFun (ev, tys) =+ let dfun_id = ctEvEvId ev+ in do { (tys, theta) <- instDFunType (ctEvEvId ev) tys+ ; return (dfun_id, tys, theta) }++ -- Compute matching and unifying local instances+ match_local_inst :: InertSet+ -> [QCInst]+ -> ( [(CtEvidence, [DFunInstType])]+ , [(CtEvidence, [DFunInstType])] )+ match_local_inst _inerts []+ = ([], [])+ match_local_inst inerts (qci@(QCI { qci_tvs = qtvs+ , qci_pred = qpred+ , qci_ev = qev })+ :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 = (qev, map (lookupVarEnv tv_subst) qtvs)+ = (match:matches, unifs)++ | otherwise+ = assertPpr (disjointVarSet qtv_set (tyCoVarsOfType pred))+ (ppr qci $$ ppr pred)+ -- ASSERT: unification relies on the+ -- quantified variables being fresh+ (matches, this_unif `combine` unifs)+ where+ qloc = ctEvLoc qev+ qtv_set = mkVarSet qtvs+ (matches, unifs) = match_local_inst inerts qcis+ this_unif+ | Just subst <- mightEqualLater inerts qpred qloc pred loc+ = Just (qev, map (lookupTyVar subst) qtvs)+ | otherwise+ = Nothing++ combine Nothing us = us+ combine (Just u) us = u : us++-- | Instance dictionary function and type.+type InstDFun = (DFunId, [TcType], TcThetaType)++-- | Try to find a local quantified instance that dominates all others,+-- i.e. which has a weaker instance context than all the others.+--+-- See Note [Use only the best matching quantified constraint].+dominatingMatch :: [InstDFun] -> Maybe InstDFun+dominatingMatch matches =+ listToMaybe $ mapMaybe (uncurry go) (holes matches)+ -- listToMaybe: arbitrarily pick any one context that is weaker than+ -- all others, e.g. so that we can handle [Eq a, Num a] vs [Num a, Eq a]+ -- (see test case T22223).++ where+ go :: InstDFun -> [InstDFun] -> Maybe InstDFun+ go this [] = Just this+ go this@(_,_,this_theta) ((_,_,other_theta):others)+ | this_theta `impliedBySCs` other_theta+ = go this others+ | otherwise+ = Nothing++-- | Whether a collection of constraints is implied by another collection,+-- according to a simple superclass check.+--+-- See Note [When does a quantified instance dominate another?].+impliedBySCs :: TcThetaType -> TcThetaType -> Bool+impliedBySCs c1 c2 = all in_c2 c1+ where+ in_c2 :: TcPredType -> Bool+ in_c2 pred = any (pred `tcEqType`) c2_expanded++ c2_expanded :: [TcPredType] -- Includes all superclasses+ c2_expanded = [ q | p <- c2, q <- p : transSuperClasses p ]+++{- Note [When does a quantified instance dominate another?]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When matching local quantified instances, it's useful to be able to pick+the one with the weakest precondition, e.g. if one has both++ [G] d1: forall a b. ( Eq a, Num b, C a b ) => D a b+ [G] d2: forall a . C a Int => D a Int+ [W] {w}: D a Int++Then it makes sense to use d2 to solve w, as doing so we end up with a strictly+weaker proof obligation of `C a Int`, compared to `(Eq a, Num Int, C a Int)`+were we to use d1.++In theory, to compute whether one context implies another, we would need to+recursively invoke the constraint solver. This is expensive, so we instead do+a simple check using superclasses, implemented in impliedBySCs.++Examples:++ - [Eq a] is implied by [Ord a]+ - [Ord a] is not implied by [Eq a],+ - any context is implied by itself,+ - the empty context is implied by any context.++Note [Use only the best matching quantified constraint]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (#20582) the ambiguity check for+ (forall a. Ord (m a), forall a. Semigroup a => Eq (m a)) => m Int++Because of eager expansion of given superclasses, we get+ [G] d1: forall a. Ord (m a)+ [G] d2: forall a. Eq (m a)+ [G] d3: forall a. Semigroup a => Eq (m a)++ [W] {w1}: forall a. Ord (m a)+ [W] {w2}: forall a. Semigroup a => Eq (m a)++The first wanted is solved straightforwardly. But the second wanted+matches *two* local instances: d2 and d3. Our general rule around multiple local+instances is that we refuse to commit to any of them. However, that+means that our type fails the ambiguity check. That's bad: the type+is perfectly fine. (This actually came up in the wild, in the streamly+library.)++The solution is to prefer local instances which are easier to prove, meaning+that they have a weaker precondition. In this case, the empty context+of d2 is a weaker constraint than the "Semigroup a" context of d3, so we prefer+using it when proving w2. This allows us to pass the ambiguity check here.++Our criterion for solving a Wanted by matching local quantified instances is+thus as follows:++ - There is a matching local quantified instance that dominates all others+ matches, in the sense of [When does a quantified instance dominate another?].+ Any such match do, we pick it arbitrarily (the T22223 example below says why).+ - This local quantified instance also dominates all the unifiers, as we+ wouldn't want to commit to a single match when we might have multiple,+ genuinely different matches after further unification takes place.++Some other examples:+++ #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 ...++ Here, in f's RHS, there are two identical quantified constraints+ available, one via the superclasses of C and one via the superclasses+ of D. Given that each implies the other, we pick one arbitrarily.+++ #22216:++ class Eq a+ class Eq a => Ord a+ class (forall b. Eq b => Eq (f b)) => Eq1 f+ class (Eq1 f, forall b. Ord b => Ord (f b)) => Ord1 f++ Suppose we have++ [G] d1: Ord1 f+ [G] d2: Eq a+ [W] {w}: Eq (f a)++ Superclass expansion of d1 gives us:++ [G] d3 : Eq1 f+ [G] d4 : forall b. Ord b => Ord (f b)++ expanding d4 and d5 gives us, respectively:++ [G] d5 : forall b. Eq b => Eq (f b)+ [G] d6 : forall b. Ord b => Eq (f b)++ Now we have two matching local instances that we could use when solving the+ Wanted. However, it's obviously silly to use d6, given that d5 provides us with+ as much information, with a strictly weaker precondition. So we pick d5 to solve+ w. If we chose d6, we would get [W] Ord a, which in this case we can't solve.+++ #22223:++ [G] forall a b. (Eq a, Ord b) => C a b+ [G] forall a b. (Ord b, Eq a) => C a b+ [W] C x y++ Here we should be free to pick either quantified constraint, as they are+ equivalent up to re-ordering of the constraints in the context.+ See also Note [Do not add duplicate quantified instances]+ in GHC.Tc.Solver.Monad.++Test cases:+ typecheck/should_compile/T20582+ quantified-constraints/T15244+ quantified-constraints/T22216{a,b,c,d,e}+ quantified-constraints/T22223++Historical note: a previous solution was to instead pick the local instance+with the least superclass depth (see Note [Replacement vs keeping]),+but that doesn't work for the example from #22216.+-}++{- *******************************************************************+* *+ Last resort prohibited superclass+* *+**********************************************************************-}++tryLastResortProhibitedSuperClass :: DictCt -> SolverStage ()+-- ^ As a last resort, we TEMPORARILY allow a prohibited superclass solve,+-- emitting a loud warning when doing so: we might be creating non-terminating+-- evidence (as we are in T22912 for example).+--+-- See Note [Migrating away from loopy superclass solving] in GHC.Tc.TyCl.Instance.+tryLastResortProhibitedSuperClass dict_ct+ = Stage $ do { inerts <- getInertCans+ ; last_resort inerts dict_ct }++last_resort :: InertCans -> DictCt -> TcS (StopOrContinue ())+last_resort inerts (DictCt { di_ev = ev_w, di_cls = cls, di_tys = xis })+ | let loc_w = ctEvLoc ev_w+ orig_w = ctLocOrigin loc_w+ , ScOrigin _ NakedSc <- orig_w -- work_item is definitely Wanted+ , Just ct_i <- lookupInertDict inerts loc_w cls xis+ , let ev_i = dictCtEvidence ct_i+ , isGiven ev_i+ = do { setEvBindIfWanted ev_w True (ctEvTerm ev_i)+ ; ctLocWarnTcS loc_w $+ TcRnLoopySuperclassSolve loc_w (ctEvPred ev_w)+ ; return $ Stop ev_w (text "Loopy superclass") }+ | otherwise+ = continueWith ()+++{- *********************************************************************+* *+* Functional dependencies, instantiation of equations+* *+************************************************************************++When we spot an equality arising from a functional dependency,+we now use that equality (a "wanted") to rewrite the work-item+constraint right away. This avoids two dangers++ Danger 1: If we send the original constraint on down the pipeline+ it may react with an instance declaration, and in delicate+ situations (when a Given overlaps with an instance) that+ may produce new insoluble goals: see #4952++ Danger 2: If we don't rewrite the constraint, it may re-react+ with the same thing later, and produce the same equality+ again --> termination worries.++To achieve this required some refactoring of GHC.Tc.Instance.FunDeps (nicer+now!).++Note [FunDep and implicit parameter reactions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Currently, our story of interacting two dictionaries (or a dictionary+and top-level instances) for functional dependencies, and implicit+parameters, is that we simply produce new Wanted equalities. So for example++ class D a b | a -> b where ...+ Inert:+ d1 :g D Int Bool+ WorkItem:+ d2 :w D Int alpha++ We generate the extra work item+ cv :w alpha ~ Bool+ where 'cv' is currently unused. However, this new item can perhaps be+ spontaneously solved to become given and react with d2,+ discharging it in favour of a new constraint d2' thus:+ d2' :w D Int Bool+ d2 := d2' |> D Int cv+ Now d2' can be discharged from d1++We could be more aggressive and try to *immediately* solve the dictionary+using those extra equalities.++If that were the case with the same inert set and work item we might discard+d2 directly:++ cv :w alpha ~ Bool+ d2 := d1 |> D Int cv++But in general it's a bit painful to figure out the necessary coercion,+so we just take the first approach. Here is a better example. Consider:+ class C a b c | a -> b+And:+ [Given] d1 : C T Int Char+ [Wanted] d2 : C T beta Int+In this case, it's *not even possible* to solve the wanted immediately.+So we should simply output the functional dependency and add this guy+[but NOT its superclasses] back in the worklist. Even worse:+ [Given] d1 : C T Int beta+ [Wanted] d2: C T beta Int+Then it is solvable, but its very hard to detect this on the spot.++It's exactly the same with implicit parameters, except that the+"aggressive" approach would be much easier to implement.++Note [Fundeps with instances, and equality orientation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+This Note describes a delicate interaction that constrains the orientation of+equalities. This one is about fundeps, but the /exact/ same thing arises for+type-family injectivity constraints: see Note [Improvement orientation].++doTopFunDepImprovement compares the constraint with all the instance+declarations, to see if we can produce any equalities. E.g+ class C2 a b | a -> b+ instance C Int Bool+Then the constraint (C Int ty) generates the equality [W] ty ~ Bool.++There is a nasty corner in #19415 which led to the typechecker looping:+ class C s t b | s -> t+ instance ... => C (T kx x) (T ky y) Int+ T :: forall k. k -> Type++ work_item: dwrk :: C (T @ka (a::ka)) (T @kb0 (b0::kb0)) Char+ where kb0, b0 are unification vars++ ==> {doTopFunDepImprovement: compare work_item with instance,+ generate /fresh/ unification variables kfresh0, yfresh0,+ emit a new Wanted, and add dwrk to inert set}++ Suppose we emit this new Wanted from the fundep:+ [W] T kb0 (b0::kb0) ~ T kfresh0 (yfresh0::kfresh0)++ ==> {solve that equality kb0 := kfresh0, b0 := yfresh0}+ Now kick out dwrk, since it mentions kb0+ But now we are back to the start! Loop!++NB1: This example relies on an instance that does not satisfy the+ coverage condition (although it may satisfy the weak coverage+ condition), and hence whose fundeps generate fresh unification+ variables. Not satisfying the coverage condition is known to+ lead to termination trouble, but in this case it's plain silly.++NB2: In this example, the third parameter to C ensures that the+ instance doesn't actually match the Wanted, so we can't use it to+ solve the Wanted++We solve the problem by (#21703):++ carefully orienting the new Wanted so that all the+ freshly-generated unification variables are on the LHS.++ Thus we call unifyWanteds on+ T kfresh0 (yfresh0::kfresh0) ~ T kb0 (b0::kb0)+ and /NOT/+ T kb0 (b0::kb0) ~ T kfresh0 (yfresh0::kfresh0)++Now we'll unify kfresh0:=kb0, yfresh0:=b0, and all is well. The general idea+is that we want to preferentially eliminate those freshly-generated+unification variables, rather than unifying older variables, which causes+kick-out etc.++Keeping younger variables on the left also gives very minor improvement in+the compiler performance by having less kick-outs and allocations (-0.1% on+average). Indeed Historical Note [Eliminate younger unification variables]+in GHC.Tc.Utils.Unify describes an earlier attempt to do so systematically,+apparently now in abeyance.++But this is is a delicate solution. We must take care to /preserve/+orientation during solving. Wrinkles:++(W1) We start with+ [W] T kfresh0 (yfresh0::kfresh0) ~ T kb0 (b0::kb0)+ Decompose to+ [W] kfresh0 ~ kb0+ [W] (yfresh0::kfresh0) ~ (b0::kb0)+ Preserve orientiation when decomposing!!++(W2) Suppose we happen to tackle the second Wanted from (W1)+ first. Then in canEqCanLHSHetero we emit a /kind/ equality, as+ well as a now-homogeneous type equality+ [W] kco : kfresh0 ~ kb0+ [W] (yfresh0::kfresh0) ~ (b0::kb0) |> (sym kco)+ Preserve orientation in canEqCanLHSHetero!! (Failing to+ preserve orientation here was the immediate cause of #21703.)++(W3) There is a potential interaction with the swapping done by+ GHC.Tc.Utils.Unify.swapOverTyVars. We think it's fine, but it's+ a slight worry. See especially Note [TyVar/TyVar orientation] in+ that module.++The trouble is that "preserving orientation" is a rather global invariant,+and sometimes we definitely do want to swap (e.g. Int ~ alpha), so we don't+even have a precise statement of what the invariant is. The advantage+of the preserve-orientation plan is that it is extremely cheap to implement,+and apparently works beautifully.++--- Alternative plan (1) ---+Rather than have an ill-defined invariant, another possiblity is to+elminate those fresh unification variables at birth, when generating+the new fundep-inspired equalities.++The key idea is to call `instFlexiX` in `emitFunDepWanteds` on only those+type variables that are guaranteed to give us some progress. This means we+have to locally (without calling emitWanteds) identify the type variables+that do not give us any progress. In the above example, we _know_ that+emitting the two wanteds `kco` and `co` is fruitless.++ Q: How do we identify such no-ops?++ 1. Generate a matching substitution from LHS to RHS+ ɸ = [kb0 :-> k0, b0 :-> y0]+ 2. Call `instFlexiX` on only those type variables that do not appear in the domain of ɸ+ ɸ' = instFlexiX ɸ (tvs - domain ɸ)+ 3. Apply ɸ' on LHS and then call emitWanteds+ unifyWanteds ... (subst ɸ' LHS) RHS++Why will this work? The matching substitution ɸ will be a best effort+substitution that gives us all the easy solutions. It can be generated with+modified version of `Core/Unify.unify_tys` where we run it in a matching mode+and never generate `SurelyApart` and always return a `MaybeApart Subst`+instead.++The same alternative plan would work for type-family injectivity constraints:+see Note [Improvement orientation] in GHC.Tc.Solver.Equality.+--- End of Alternative plan (1) ---++--- Alternative plan (2) ---+We could have a new flavour of TcTyVar (like `TauTv`, `TyVarTv` etc; see GHC.Tc.Utils.TcType.MetaInfo)+for the fresh unification variables introduced by functional dependencies. Say `FunDepTv`. Then in+GHC.Tc.Utils.Unify.swapOverTyVars we could arrange to keep a `FunDepTv` on the left if possible.+Looks possible, but it's one more complication.+--- End of Alternative plan (2) ---+++--- Historical note: Failed Alternative Plan (3) ---+Previously we used a flag `cc_fundeps` in `CDictCan`. It would flip to False+once we used a fun dep to hint the solver to break and to stop emitting more+wanteds. This solution was not complete, and caused a failures while trying+to solve for transitive functional dependencies (test case: T21703)+-- End of Historical note: Failed Alternative Plan (3) --++Note [Do fundeps last]+~~~~~~~~~~~~~~~~~~~~~~+Consider T4254b:+ class FD a b | a -> b where { op :: a -> b }++ instance FD Int Bool++ foo :: forall a b. (a~Int,FD a b) => a -> Bool+ foo = op++(DFL1) Try local fundeps first.+ From the ambiguity check on the type signature we get+ [G] FD Int b+ [W] FD Int beta+ Interacting these gives beta:=b; then we start again and solve without+ trying fundeps between the new [W] FD Int b and the top-level instance.+ If we did, we'd generate [W] b ~ Bool, which fails.++(DFL2) Try solving from top-level instances before fundeps+ From the definition `foo = op` we get+ [G] FD Int b+ [W] FD Int Bool+ We solve this from the top level instance before even trying fundeps.+ If we did try fundeps, we'd generate [W] b ~ Bool, which fails.+++Note [Weird fundeps]+~~~~~~~~~~~~~~~~~~~~+Consider class Het a b | a -> b where+ het :: m (f c) -> a -> m b++ class GHet (a :: * -> *) (b :: * -> *) | a -> b+ instance GHet (K a) (K [a])+ instance Het a b => GHet (K a) (K b)++The two instances don't actually conflict on their fundeps,+although it's pretty strange. So they are both accepted. Now+try [W] GHet (K Int) (K Bool)+This triggers fundeps from both instance decls;+ [W] K Bool ~ K [a]+ [W] K Bool ~ K beta+And there's a risk of complaining about Bool ~ [a]. But in fact+the Wanted matches the second instance, so we never get as far+as the fundeps.++#7875 is a case in point.+-}++doLocalFunDepImprovement :: DictCt -> SolverStage ()+-- Add wanted constraints from type-class functional dependencies.+doLocalFunDepImprovement dict_ct@(DictCt { di_ev = work_ev, di_cls = cls })+ = Stage $+ do { inerts <- getInertCans+ ; imp <- foldlM add_fds False (findDictsByClass (inert_dicts inerts) cls)+ ; if imp then startAgainWith (CDictCan dict_ct)+ else continueWith () }+ where+ work_pred = ctEvPred work_ev+ work_loc = ctEvLoc work_ev++ add_fds :: Bool -> DictCt -> TcS Bool+ add_fds so_far (DictCt { di_ev = inert_ev })+ | isGiven work_ev && isGiven inert_ev+ -- Do not create FDs from Given/Given interactions: See Note [No Given/Given fundeps]+ = return so_far+ | otherwise+ = do { traceTcS "doLocalFunDepImprovement" (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) ])++ ; unifs <- emitFunDepWanteds work_ev $+ improveFromAnother (derived_loc, inert_rewriters)+ inert_pred work_pred+ ; return (so_far || unifs)+ }+ where+ inert_pred = ctEvPred inert_ev+ inert_loc = ctEvLoc inert_ev+ inert_rewriters = ctEvRewriters inert_ev+ derived_loc = work_loc { ctl_depth = ctl_depth work_loc `maxSubGoalDepth`+ ctl_depth inert_loc+ , ctl_origin = FunDepOrigin1 work_pred+ (ctLocOrigin work_loc)+ (ctLocSpan work_loc)+ inert_pred+ (ctLocOrigin inert_loc)+ (ctLocSpan inert_loc) }++doTopFunDepImprovement :: DictCt -> SolverStage ()+-- Try to functional-dependency improvement between the constraint+-- and the top-level instance declarations+-- See Note [Fundeps with instances, and equality orientation]+-- See also Note [Weird fundeps]+doTopFunDepImprovement dict_ct@(DictCt { di_ev = ev, di_cls = cls, di_tys = xis })+ | isGiven ev -- No improvement for Givens+ = Stage $ continueWith ()+ | otherwise+ = Stage $+ do { traceTcS "try_fundeps" (ppr dict_ct)+ ; instEnvs <- getInstEnvs+ ; let fundep_eqns = improveFromInstEnv instEnvs mk_ct_loc cls xis+ ; imp <- emitFunDepWanteds ev fundep_eqns+ ; if imp then startAgainWith (CDictCan dict_ct)+ else continueWith () }+ where+ dict_pred = mkClassPred cls xis+ dict_loc = ctEvLoc ev+ dict_origin = ctLocOrigin dict_loc++ mk_ct_loc :: PredType -- From instance decl+ -> SrcSpan -- also from instance deol+ -> (CtLoc, RewriterSet)+ mk_ct_loc inst_pred inst_loc+ = ( dict_loc { ctl_origin = FunDepOrigin2 dict_pred dict_origin+ inst_pred inst_loc }+ , emptyRewriterSet )+++{- *********************************************************************+* *+* Superclasses+* *+********************************************************************* -}++{- Note [The superclass story]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We need to add superclass constraints for two reasons:++* 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+ of the Given (Ord a).++* For wanteds [W], they may give useful+ functional dependencies. E.g.+ class C a b | a -> b where ...+ class C a b => D a b where ...+ Now a [W] constraint (D Int beta) has (C Int beta) as a superclass+ and that might tell us about beta, via C's fundeps. We can get this+ by generating a [W] (C Int beta) constraint. We won't use the evidence,+ but it may lead to unification.++See Note [Why adding superclasses can help].++For these reasons we want to generate superclass constraints for both+Givens and Wanteds. But:++* (Minor) they are often not needed, so generating them aggressively+ is a waste of time.++* (Major) if we want recursive superclasses, there would be an infinite+ number of them. Here is a real-life example (#10318);++ class (Frac (Frac a) ~ Frac a,+ Fractional (Frac a),+ IntegralDomain (Frac a))+ => IntegralDomain a where+ type Frac a :: *++ Notice that IntegralDomain has an associated type Frac, and one+ of IntegralDomain's superclasses is another IntegralDomain constraint.++So here's the plan:++1. Eagerly generate superclasses for given (but not wanted)+ constraints; see Note [Eagerly expand given superclasses].+ 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,+ mkStrictSuperClasses expands eagerly, but has a conservative+ termination condition: see Note [Expanding superclasses] in GHC.Tc.Utils.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 superclasses for new /given/+ /non-canonical/ constraints (canClassNC does this). As #12175+ showed, a type-family application can expand to a class constraint,+ and we want to see its superclasses for just the same reason as+ Note [Eagerly expand given superclasses].++3. If we have any remaining unsolved wanteds+ (see Note [When superclasses help] in GHC.Tc.Types.Constraint)+ try harder: take both the Givens and Wanteds, and expand+ superclasses again. See the calls to expandSuperClasses in+ GHC.Tc.Solver.simpl_loop and solveWanteds.++ This may succeed in generating (a finite number of) extra Givens,+ and extra Wanteds. 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 #15290.++4. Go round to (2) again. This loop (2,3,4) is implemented+ in GHC.Tc.Solver.simpl_loop.++The cc_pend_sc field in a CDictCan records whether the superclasses of+this constraint have been expanded. Specifically, in Step 3 we only+expand superclasses for constraints with cc_pend_sc > 0+(i.e. isPendingScDict holds).+See Note [Expanding Recursive Superclasses and ExpansionFuel]++Why do we do this? Two reasons:++* To avoid repeated work, by repeatedly expanding the superclasses of+ same constraint,++* To terminate the above loop, at least in the -XNoUndecidableSuperClasses+ case. If there are recursive superclasses we could, in principle,+ expand forever, always encountering new constraints.++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 cc_pend_sc has pending+expansion fuel.)+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+GHC.Tc.Solver.InertSet. 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? (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)++ f :: (Ord (T a)) => blah+ f x = ....needs Eq (T a), Ord (T a)....++Here if we can't satisfy (Eq (T a)) from the givens we'll use the+instance declaration; but then we are stuck with (Bad a). Sigh.+This is really a case of non-confluent proofs, but to stop our users+complaining we expand one layer in advance.++See Note [Instance and Given overlap].++We also want to do this if we have++ f :: F (T a) => blah++where+ type instance F (T a) = Ord (T a)++So we may need to do a little work on the givens to expose the+class that has the superclasses. That's why the superclass+expansion for Givens happens in canClassNC.++This same scenario happens with quantified constraints, whose superclasses+are also eagerly expanded. Test case: typecheck/should_compile/T16502b+These are handled in canForAllNC, analogously to canClassNC.++Note [Why adding superclasses can help]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Examples of how adding superclasses can help:++ --- Example 1+ class C a b | a -> b+ Suppose we want to solve+ [G] C a b+ [W] C a beta+ Then adding [W] beta~b will let us solve it.++ -- Example 2 (similar but using a type-equality superclass)+ class (F a ~ b) => C a b+ And try to sllve:+ [G] C a b+ [W] C a beta+ Follow the superclass rules to add+ [G] F a ~ b+ [W] F a ~ beta+ Now we get [W] beta ~ b, and can solve that.++ -- Example (tcfail138)+ class L a b | a -> b+ class (G a, L a b) => C a b++ instance C a b' => G (Maybe a)+ instance C a b => C (Maybe a) a+ instance L (Maybe a) a++ When solving the superclasses of the (C (Maybe a) a) instance, we get+ [G] C a b, and hence by superclasses, [G] G a, [G] L a b+ [W] G (Maybe a)+ Use the instance decl to get+ [W] C a beta+ Generate its superclass+ [W] L a beta. Now using fundeps, combine with [G] L a b to get+ [W] beta ~ b+ which is what we want.++Note [Danger of adding superclasses during solving]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Here's a serious, but now out-dated example, from #4497:++ class Num (RealOf t) => Normed t+ type family RealOf x++Assume the generated wanted constraint is:+ [W] RealOf e ~ e+ [W] Normed e++If we were to be adding the superclasses during simplification we'd get:+ [W] RealOf e ~ e+ [W] Normed e+ [W] RealOf e ~ fuv+ [W] Num fuv+==>+ e := fuv, Num fuv, Normed fuv, RealOf fuv ~ fuv++While looks exactly like our original constraint. If we add the+superclass of (Normed fuv) again we'd loop. By adding superclasses+definitely only once, during canonicalisation, this situation can't+happen.++Note [Nested quantified constraint superclasses]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (typecheck/should_compile/T17202)++ class C1 a+ class (forall c. C1 c) => C2 a+ class (forall b. (b ~ F a) => C2 a) => C3 a++Elsewhere in the code, we get a [G] g1 :: C3 a. We expand its superclass+to get [G] g2 :: (forall b. (b ~ F a) => C2 a). This constraint has a+superclass, as well. But we now must be careful: we cannot just add+(forall c. C1 c) as a Given, because we need to remember g2's context.+That new constraint is Given only when forall b. (b ~ F a) is true.++It's tempting to make the new Given be (forall b. (b ~ F a) => forall c. C1 c),+but that's problematic, because it's nested, and ForAllPred is not capable+of representing a nested quantified constraint. (We could change ForAllPred+to allow this, but the solution in this Note is much more local and simpler.)++So, we swizzle it around to get (forall b c. (b ~ F a) => C1 c).++More generally, if we are expanding the superclasses of+ g0 :: forall tvs. theta => cls tys+and find a superclass constraint+ forall sc_tvs. sc_theta => sc_inner_pred+we must have a selector+ sel_id :: forall cls_tvs. cls cls_tvs -> forall sc_tvs. sc_theta => sc_inner_pred+and thus build+ g_sc :: forall tvs sc_tvs. theta => sc_theta => sc_inner_pred+ g_sc = /\ tvs. /\ sc_tvs. \ theta_ids. \ sc_theta_ids.+ sel_id tys (g0 tvs theta_ids) sc_tvs sc_theta_ids++Actually, we cheat a bit by eta-reducing: note that sc_theta_ids are both the+last bound variables and the last arguments. This avoids the need to produce+the sc_theta_ids at all. So our final construction is++ g_sc = /\ tvs. /\ sc_tvs. \ theta_ids.+ sel_id tys (g0 tvs theta_ids) sc_tvs++ -}++makeSuperClasses :: [Ct] -> TcS [Ct]+-- Returns strict superclasses, transitively, see Note [The superclass story]+-- The loop-breaking here follows Note [Expanding superclasses] in GHC.Tc.Utils.TcType+-- Specifically, for an incoming (C t) constraint, we return all of (C t)'s+-- superclasses, up to /and including/ the first repetition of C+--+-- Example: class D a => C a+-- class C [a] => D a+-- makeSuperClasses (C x) will return (D x, C [x])+--+-- NB: the incoming constraint's superclass will consume a unit of fuel+-- Preconditions on `cts`: 1. They are either `CDictCan` or `CQuantCan`+-- 2. Their fuel (stored in cc_pend_sc or qci_pend_sc) is > 0+makeSuperClasses cts = concatMapM go cts+ where+ go (CDictCan (DictCt { di_ev = ev, di_cls = cls, di_tys = tys, di_pend_sc = fuel }))+ = assertFuelPreconditionStrict fuel $ -- fuel needs to be more than 0 always+ mkStrictSuperClasses fuel ev [] [] cls tys+ go (CQuantCan (QCI { qci_pred = pred, qci_ev = ev, qci_pend_sc = fuel }))+ = assertPpr (isClassPred pred) (ppr pred) $ -- The cts should all have+ -- class pred heads+ assertFuelPreconditionStrict fuel $ -- fuel needs to be more than 0 always+ mkStrictSuperClasses fuel ev tvs theta cls tys+ where+ (tvs, theta, cls, tys) = tcSplitDFunTy (ctEvPred ev)+ go ct = pprPanic "makeSuperClasses" (ppr ct)++mkStrictSuperClasses+ :: ExpansionFuel -> 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+-- Precondition: fuel > 0+-- Postcondition: fuel for recursive superclass ct is one unit less than cls fuel+mkStrictSuperClasses fuel ev tvs theta cls tys+ = mk_strict_superclasses (consumeFuel fuel) (unitNameSet (className cls))+ ev tvs theta cls tys++mk_strict_superclasses :: ExpansionFuel -> 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+-- The caller of this function is supposed to perform fuel book keeping+-- Precondition: fuel >= 0+mk_strict_superclasses _ _ _ _ _ cls _+ | isEqualityClass cls+ = return []++mk_strict_superclasses fuel rec_clss+ ev@(CtGiven { ctev_evar = evar, ctev_loc = loc })+ tvs theta cls tys+ = -- Given case+ do { traceTcS "mk_strict" (ppr ev $$ ppr (ctLocOrigin loc))+ ; concatMapM do_one_given (classSCSelIds cls) }+ where+ dict_ids = mkTemplateLocals theta+ this_size = pSizeClassPred cls tys++ do_one_given sel_id+ | isUnliftedType sc_pred+ -- NB: class superclasses are never representation-polymorphic,+ -- so isUnliftedType is OK here.+ , not (null tvs && null theta)+ = -- See Note [Equality superclasses in quantified constraints]+ return []+ | otherwise+ = do { given_ev <- newGivenEvVar sc_loc $+ mk_given_desc sel_id sc_pred+ ; assertFuelPrecondition fuel $+ mk_superclasses fuel rec_clss given_ev tvs theta sc_pred }+ where+ sc_pred = classMethodInstTy sel_id tys++ -- See Note [Nested quantified constraint superclasses]+ mk_given_desc :: Id -> PredType -> (PredType, EvTerm)+ mk_given_desc sel_id sc_pred+ = (swizzled_pred, swizzled_evterm)+ where+ (sc_tvs, sc_rho) = splitForAllTyCoVars sc_pred+ (sc_theta, sc_inner_pred) = splitFunTys sc_rho++ all_tvs = tvs `chkAppend` sc_tvs+ all_theta = theta `chkAppend` (map scaledThing sc_theta)+ swizzled_pred = mkInfSigmaTy all_tvs all_theta sc_inner_pred++ -- evar :: forall tvs. theta => cls tys+ -- sel_id :: forall cls_tvs. cls cls_tvs+ -- -> forall sc_tvs. sc_theta => sc_inner_pred+ -- swizzled_evterm :: forall tvs sc_tvs. theta => sc_theta => sc_inner_pred+ swizzled_evterm = EvExpr $+ mkLams all_tvs $+ mkLams dict_ids $+ Var sel_id+ `mkTyApps` tys+ `App` (evId evar `mkVarApps` (tvs ++ dict_ids))+ `mkVarApps` sc_tvs++ sc_loc | isCTupleClass cls = loc+ | otherwise = loc { ctl_origin = mk_sc_origin (ctLocOrigin loc) }+ -- isCTupleClass: we don't want tuples to mess up the size calculations+ -- of Note [Solving superclass constraints]. For tuple predicates, this+ -- matters, because their size can be large, and we don't want to add a+ -- big class to the size of the dictionaries in the chain. When we get+ -- down to a base predicate, we'll include its size. See #10335.+ -- See Note [Solving tuple constraints]++ -- See Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance+ -- for explanation of GivenSCOrigin and Note [Replacement vs keeping] in+ -- GHC.Tc.Solver.InertSet for why we need depths+ mk_sc_origin :: CtOrigin -> CtOrigin+ mk_sc_origin (GivenSCOrigin skol_info sc_depth already_blocked)+ = GivenSCOrigin skol_info (sc_depth + 1)+ (already_blocked || newly_blocked skol_info)++ mk_sc_origin (GivenOrigin skol_info)+ = -- These cases do not already have a superclass constraint: depth starts at 1+ GivenSCOrigin skol_info 1 (newly_blocked skol_info)++ mk_sc_origin other_orig = pprPanic "Given constraint without given origin" $+ ppr evar $$ ppr other_orig++ newly_blocked (InstSkol _ head_size) = isJust (this_size `ltPatersonSize` head_size)+ newly_blocked _ = False++-- Wanted case+mk_strict_superclasses fuel rec_clss ev tvs theta cls tys+ | all noFreeVarsOfType tys+ = return [] -- Wanteds with no variables yield no superclass constraints.+ -- See Note [Improvement from Ground Wanteds]++ | otherwise -- Wanted case, just add Wanted superclasses+ -- that can lead to improvement.+ = assertPpr (null tvs && null theta) (ppr tvs $$ ppr theta) $+ concatMapM do_one (immSuperClasses cls tys)+ where+ loc = ctEvLoc ev `updateCtLocOrigin` WantedSuperclassOrigin (ctEvPred ev)++ do_one sc_pred+ = do { traceTcS "mk_strict_superclasses Wanted" (ppr (mkClassPred cls tys) $$ ppr sc_pred)+ ; sc_ev <- newWantedNC loc (ctEvRewriters ev) sc_pred+ ; mk_superclasses fuel rec_clss sc_ev [] [] sc_pred }++{- Note [Improvement from Ground Wanteds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose class C b a => D a b+and consider+ [W] D Int Bool+Is there any point in emitting [W] C Bool Int? No! The only point of+emitting superclass constraints for W constraints is to get+improvement, extra unifications that result from functional+dependencies. See Note [Why adding superclasses can help] above.++But no variables means no improvement; case closed.+-}++mk_superclasses :: ExpansionFuel -> NameSet -> CtEvidence+ -> [TyVar] -> ThetaType -> PredType -> TcS [Ct]+-- Return this constraint, plus its superclasses, if any+-- Precondition: fuel >= 0+mk_superclasses fuel rec_clss ev tvs theta pred+ | ClassPred cls tys <- classifyPredType pred+ = assertFuelPrecondition fuel $+ mk_superclasses_of fuel rec_clss ev tvs theta cls tys++ | otherwise -- Superclass is not a class predicate+ = return [mkNonCanonical ev]++mk_superclasses_of :: ExpansionFuel -> NameSet -> CtEvidence+ -> [TyVar] -> ThetaType -> Class -> [Type]+ -> TcS [Ct]+-- Always return this class constraint,+-- and expand its superclasses+-- Precondition: fuel >= 0+mk_superclasses_of fuel rec_clss ev tvs theta cls tys+ | loop_found = do { traceTcS "mk_superclasses_of: loop" (ppr cls <+> ppr tys)+ ; assertFuelPrecondition fuel $ return [mk_this_ct fuel] }+ -- cc_pend_sc of returning ct = fuel+ | otherwise = do { traceTcS "mk_superclasses_of" (vcat [ ppr cls <+> ppr tys+ , ppr (isCTupleClass cls)+ , ppr rec_clss+ ])+ ; sc_cts <- assertFuelPrecondition fuel $+ mk_strict_superclasses fuel rec_clss' ev tvs theta cls tys+ ; return (mk_this_ct doNotExpand : sc_cts) }+ -- doNotExpand: we have expanded this cls's superclasses, so+ -- exhaust the associated constraint's fuel,+ -- to avoid duplicate work+ 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++ mk_this_ct :: ExpansionFuel -> Ct+ -- We can't use CNonCanonical here because we need to tradk the fuel+ mk_this_ct fuel | null tvs, null theta+ = CDictCan (DictCt { di_ev = ev, di_cls = cls+ , di_tys = tys, di_pend_sc = fuel })+ -- NB: If there is a loop, we cut off, so we have not+ -- added the superclasses, hence cc_pend_sc = fuel+ | otherwise+ = CQuantCan (QCI { qci_tvs = tvs, qci_pred = mkClassPred cls tys+ , qci_ev = ev, qci_pend_sc = fuel })+++{- Note [Equality superclasses in quantified constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (#15359, #15593, #15625)+ f :: (forall a. theta => a ~ b) => stuff++It's a bit odd to have a local, quantified constraint for `(a~b)`,+but some people want such a thing (see the tickets). And for+Coercible it is definitely useful+ f :: forall m. (forall p q. Coercible p q => Coercible (m p) (m q)))+ => stuff++Moreover it's not hard to arrange; we just need to look up /equality/+constraints in the quantified-constraint environment, which we do in+GHC.Tc.Solver.Equality.tryQCsEqCt.++There is a wrinkle though, in the case where 'theta' is empty, so+we have+ f :: (forall a. a~b) => stuff++Now, potentially, the superclass machinery kicks in, in+makeSuperClasses, giving us a a second quantified constraint+ (forall a. a ~# b)+BUT this is an unboxed value! And nothing has prepared us for+dictionary "functions" that are unboxed. Actually it does just+about work, but the simplifier ends up with stuff like+ case (/\a. eq_sel d) of df -> ...(df @Int)...+and fails to simplify that any further. And it doesn't satisfy+isPredTy any more.++So for now we simply decline to take superclasses in the quantified+case. Instead we have a special case in GHC.Tc.Solver.Equality.tryQCsEqCt+which looks for primitive equalities specially in the quantified+constraints.++See also Note [Evidence for quantified constraints] in GHC.Core.Predicate.+-}
+ GHC/Tc/Solver/Equality.hs view
@@ -0,0 +1,3190 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE MultiWayIf #-}++module GHC.Tc.Solver.Equality(+ solveEquality+ ) where+++import GHC.Prelude++import GHC.Tc.Solver.Irred( solveIrred )+import GHC.Tc.Solver.Dict( matchLocalInst, chooseInstance )+import GHC.Tc.Solver.Rewrite+import GHC.Tc.Solver.Monad+import GHC.Tc.Solver.InertSet+import GHC.Tc.Solver.Types( findFunEqsByTyCon )+import GHC.Tc.Types.Evidence+import GHC.Tc.Types.Constraint+import GHC.Tc.Types.Origin+import GHC.Tc.Utils.Unify+import GHC.Tc.Utils.TcType+import GHC.Tc.Instance.Family ( tcTopNormaliseNewTypeTF_maybe )+import GHC.Tc.Instance.FunDeps( FunDepEqn(..) )++import GHC.Core.Type+import GHC.Core.Predicate+import GHC.Core.Class+import GHC.Core.DataCon ( dataConName )+import GHC.Core.TyCon+import GHC.Core.TyCo.Rep -- cleverly decomposes types, good for completeness checking+import GHC.Core.Coercion+import GHC.Core.Coercion.Axiom+import GHC.Core.Reduction+import GHC.Core.Unify( tcUnifyTyWithTFs )+import GHC.Core.FamInstEnv ( FamInstEnvs, FamInst(..), apartnessCheck+ , lookupFamInstEnvByTyCon )+import GHC.Core++import GHC.Types.Var+import GHC.Types.Var.Env+import GHC.Types.Var.Set( anyVarSet )+import GHC.Types.Name.Reader+import GHC.Types.Basic++import GHC.Builtin.Types ( anyTypeOfKind )++import GHC.Utils.Outputable+import GHC.Utils.Panic+import GHC.Utils.Panic.Plain+import GHC.Utils.Misc+import GHC.Utils.Monad+import GHC.Utils.Constants( debugIsOn )++import GHC.Data.Pair+import GHC.Data.Bag+import Control.Monad+import Data.Maybe ( isJust, isNothing )+import Data.List ( zip4 )++import qualified Data.Semigroup as S+import Data.Bifunctor ( bimap )+import Data.Void( Void )++{- *********************************************************************+* *+* Equalities+* *+************************************************************************++Note [Canonicalising equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In order to canonicalise an equality, we look at the structure of the+two types at hand, looking for similarities. A difficulty is that the+types may look dissimilar before rewriting but similar after rewriting.+However, we don't just want to jump in and rewrite right away, because+this might be wasted effort. So, after looking for similarities and failing,+we rewrite and then try again. Of course, we don't want to loop, so we+track whether or not we've already rewritten.++It is conceivable to do a better job at tracking whether or not a type+is rewritten, but this is left as future work. (Mar '15)++Note [Decomposing FunTy]+~~~~~~~~~~~~~~~~~~~~~~~~+can_eq_nc' may attempt to decompose a FunTy that is un-zonked. This+means that we may very well have a FunTy containing a type of some+unknown kind. For instance, we may have,++ FunTy (a :: k) Int++Where k is a unification variable. So the calls to splitRuntimeRep_maybe may+fail (returning Nothing). In that case we'll fall through, zonk, and try again.+Zonking should fill the variable k, meaning that decomposition will succeed the+second time around.++Also note that we require the FunTyFlag to match. This will stop+us decomposing+ (Int -> Bool) ~ (Show a => blah)+It's as if we treat (->) and (=>) as different type constructors, which+indeed they are!+-}++solveEquality :: CtEvidence -> EqRel -> Type -> Type+ -> SolverStage Void+solveEquality ev eq_rel ty1 ty2+ = do { Pair ty1' ty2' <- zonkEqTypes ev eq_rel ty1 ty2+ ; let ev' | debugIsOn = setCtEvPredType ev $+ mkPrimEqPredRole (eqRelRole eq_rel) ty1' ty2'+ | otherwise = ev+ -- ev': satisfy the precondition of can_eq_nc++ ; mb_canon <- canonicaliseEquality ev' eq_rel ty1' ty2'++ ; case mb_canon of {++ -- An IrredCt equality may be insoluble; but maybe not!+ -- E.g. m a ~R# m b is not canonical, but may be+ -- solved by a quantified constraint (T15290)+ -- See Note [Looking up primitive equalities in quantified constraints]+ Left irred_ct -> do { tryQCsIrredEqCt irred_ct+ ; solveIrred irred_ct } ;++ Right eq_ct -> do { tryInertEqs eq_ct+ ; tryFunDeps eq_ct+ ; tryQCsEqCt eq_ct+ ; simpleStage (updInertEqs eq_ct)+ ; stopWithStage (eqCtEvidence eq_ct) "Kept inert EqCt" } } }++updInertEqs :: EqCt -> TcS ()+updInertEqs eq_ct+ = do { kickOutRewritable (KOAfterAdding (eqCtLHS eq_ct)) (eqCtFlavourRole eq_ct)+ ; tc_lvl <- getTcLevel+ ; updInertCans (addEqToCans tc_lvl eq_ct) }+++{- *********************************************************************+* *+* zonkEqTypes+* *+********************************************************************* -}++---------------------------------+-- | Compare types for equality, while zonking as necessary. Gives up+-- as soon as it finds that two types are not equal.+-- This is quite handy when some unification has made two+-- types in an inert Wanted to be equal. We can discover the equality without+-- rewriting, which is sometimes very expensive (in the case of type functions).+-- In particular, this function makes a ~20% improvement in test case+-- perf/compiler/T5030.+--+-- Returns either the (partially zonked) types in the case of+-- inequality, or the one type in the case of equality. canEqReflexive is+-- a good next step in the 'Right' case. Returning 'Left' is always safe.+--+-- NB: This does *not* look through type synonyms. In fact, it treats type+-- synonyms as rigid constructors. In the future, it might be convenient+-- to look at only those arguments of type synonyms that actually appear+-- in the synonym RHS. But we're not there yet.+zonkEqTypes :: CtEvidence -> EqRel -> TcType -> TcType -> SolverStage (Pair TcType)+zonkEqTypes ev eq_rel ty1 ty2+ = Stage $ do { res <- go ty1 ty2+ ; case res of+ Left pair -> continueWith pair+ Right ty -> canEqReflexive ev eq_rel ty }+ where+ go :: TcType -> TcType -> TcS (Either (Pair TcType) TcType)+ go (TyVarTy tv1) (TyVarTy tv2) = tyvar_tyvar tv1 tv2+ go (TyVarTy tv1) ty2 = tyvar NotSwapped tv1 ty2+ go ty1 (TyVarTy tv2) = tyvar IsSwapped tv2 ty1++ -- We handle FunTys explicitly here despite the fact that they could also be+ -- treated as an application. Why? Well, for one it's cheaper to just look+ -- at two types (the argument and result types) than four (the argument,+ -- result, and their RuntimeReps). Also, we haven't completely zonked yet,+ -- so we may run into an unzonked type variable while trying to compute the+ -- RuntimeReps of the argument and result types. This can be observed in+ -- testcase tc269.+ go (FunTy af1 w1 arg1 res1) (FunTy af2 w2 arg2 res2)+ | af1 == af2+ , eqType w1 w2+ = do { res_a <- go arg1 arg2+ ; res_b <- go res1 res2+ ; return $ combine_rev (FunTy af1 w1) res_b res_a }++ go ty1@(FunTy {}) ty2 = bale_out ty1 ty2+ go ty1 ty2@(FunTy {}) = bale_out ty1 ty2++ go ty1 ty2+ | Just (tc1, tys1) <- splitTyConAppNoView_maybe ty1+ , Just (tc2, tys2) <- splitTyConAppNoView_maybe ty2+ = if tc1 == tc2 && tys1 `equalLength` tys2+ -- Crucial to check for equal-length args, because+ -- we cannot assume that the two args to 'go' have+ -- the same kind. E.g go (Proxy * (Maybe Int))+ -- (Proxy (*->*) Maybe)+ -- We'll call (go (Maybe Int) Maybe)+ -- See #13083+ then tycon tc1 tys1 tys2+ else bale_out ty1 ty2++ go ty1 ty2+ | Just (ty1a, ty1b) <- tcSplitAppTyNoView_maybe ty1+ , Just (ty2a, ty2b) <- tcSplitAppTyNoView_maybe ty2+ = do { res_a <- go ty1a ty2a+ ; res_b <- go ty1b ty2b+ ; return $ combine_rev mkAppTy res_b res_a }++ go ty1@(LitTy lit1) (LitTy lit2)+ | lit1 == lit2+ = return (Right ty1)++ go ty1 ty2 = bale_out ty1 ty2+ -- We don't handle more complex forms here++ bale_out ty1 ty2 = return $ Left (Pair ty1 ty2)++ tyvar :: SwapFlag -> TcTyVar -> TcType+ -> TcS (Either (Pair TcType) TcType)+ -- Try to do as little as possible, as anything we do here is redundant+ -- with rewriting. In particular, no need to zonk kinds. That's why+ -- we don't use the already-defined zonking functions+ tyvar swapped tv ty+ = case tcTyVarDetails tv of+ MetaTv { mtv_ref = ref }+ -> do { cts <- readTcRef ref+ ; case cts of+ Flexi -> give_up+ Indirect ty' -> do { trace_indirect tv ty'+ ; unSwap swapped go ty' ty } }+ _ -> give_up+ where+ give_up = return $ Left $ unSwap swapped Pair (mkTyVarTy tv) ty++ tyvar_tyvar tv1 tv2+ | tv1 == tv2 = return (Right (mkTyVarTy tv1))+ | otherwise = do { (ty1', progress1) <- quick_zonk tv1+ ; (ty2', progress2) <- quick_zonk tv2+ ; if progress1 || progress2+ then go ty1' ty2'+ else return $ Left (Pair (TyVarTy tv1) (TyVarTy tv2)) }++ trace_indirect tv ty+ = traceTcS "Following filled tyvar (zonk_eq_types)"+ (ppr tv <+> equals <+> ppr ty)++ quick_zonk tv = case tcTyVarDetails tv of+ MetaTv { mtv_ref = ref }+ -> do { cts <- readTcRef ref+ ; case cts of+ Flexi -> return (TyVarTy tv, False)+ Indirect ty' -> do { trace_indirect tv ty'+ ; return (ty', True) } }+ _ -> return (TyVarTy tv, False)++ -- This happens for type families, too. But recall that failure+ -- here just means to try harder, so it's OK if the type function+ -- isn't injective.+ tycon :: TyCon -> [TcType] -> [TcType]+ -> TcS (Either (Pair TcType) TcType)+ tycon tc tys1 tys2+ = do { results <- zipWithM go tys1 tys2+ ; return $ case combine_results results of+ Left tys -> Left (mkTyConApp tc <$> tys)+ Right tys -> Right (mkTyConApp tc tys) }++ combine_results :: [Either (Pair TcType) TcType]+ -> Either (Pair [TcType]) [TcType]+ combine_results = bimap (fmap reverse) reverse .+ foldl' (combine_rev (:)) (Right [])++ -- combine (in reverse) a new result onto an already-combined result+ combine_rev :: (a -> b -> c)+ -> Either (Pair b) b+ -> Either (Pair a) a+ -> Either (Pair c) c+ combine_rev f (Left list) (Left elt) = Left (f <$> elt <*> list)+ combine_rev f (Left list) (Right ty) = Left (f <$> pure ty <*> list)+ combine_rev f (Right tys) (Left elt) = Left (f <$> elt <*> pure tys)+ combine_rev f (Right tys) (Right ty) = Right (f ty tys)+++{- *********************************************************************+* *+* canonicaliseEquality+* *+********************************************************************* -}++canonicaliseEquality+ :: CtEvidence -> EqRel+ -> Type -> Type -- LHS and RHS+ -> SolverStage (Either IrredCt EqCt)+-- Precondition: in DEBUG mode, the `ctev_pred` of `ev` is (ps_ty1 ~# ps_ty2),+-- without zonking+-- This precondition is needed (only in DEBUG) to satisfy the assertions+-- in mkSelCo, called in canDecomposableTyConAppOK and canDecomposableFunTy++canonicaliseEquality ev eq_rel ty1 ty2+ = Stage $ do { traceTcS "canonicaliseEquality" $+ vcat [ ppr ev, ppr eq_rel, ppr ty1, ppr ty2 ]+ ; rdr_env <- getGlobalRdrEnvTcS+ ; fam_insts <- getFamInstEnvs+ ; can_eq_nc False rdr_env fam_insts ev eq_rel ty1 ty1 ty2 ty2 }++can_eq_nc+ :: Bool -- True => both input types are rewritten+ -> GlobalRdrEnv -- needed to see which newtypes are in scope+ -> FamInstEnvs -- needed to unwrap data instances+ -> CtEvidence+ -> EqRel+ -> Type -> Type -- LHS, after and before type-synonym expansion, resp+ -> Type -> Type -- RHS, after and before type-synonym expansion, resp+ -> TcS (StopOrContinue (Either IrredCt EqCt))++-- See Note [Comparing nullary type synonyms] in GHC.Core.Type.+can_eq_nc _flat _rdr_env _envs ev eq_rel ty1@(TyConApp tc1 []) _ps_ty1 (TyConApp tc2 []) _ps_ty2+ | tc1 == tc2+ = canEqReflexive ev eq_rel ty1++-- Expand synonyms first; see Note [Type synonyms and canonicalization]+can_eq_nc rewritten rdr_env envs ev eq_rel ty1 ps_ty1 ty2 ps_ty2+ | Just ty1' <- coreView ty1 = can_eq_nc rewritten rdr_env envs ev eq_rel ty1' ps_ty1 ty2 ps_ty2+ | Just ty2' <- coreView ty2 = can_eq_nc rewritten rdr_env envs ev eq_rel ty1 ps_ty1 ty2' ps_ty2++-- need to check for reflexivity in the ReprEq case.+-- See Note [Eager reflexivity check]+-- Check only when rewritten because the zonk_eq_types check in canEqNC takes+-- care of the non-rewritten case.+can_eq_nc True _rdr_env _envs ev ReprEq ty1 _ ty2 _+ | ty1 `tcEqType` ty2+ = canEqReflexive ev ReprEq ty1++-- When working with ReprEq, unwrap newtypes.+-- See Note [Unwrap newtypes first]+-- This must be above the TyVarTy case, in order to guarantee (TyEq:N)+can_eq_nc _rewritten 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 rdr_env envs ev NotSwapped ty1 stuff1 ty2 ps_ty2++ | ReprEq <- eq_rel+ , Just stuff2 <- tcTopNormaliseNewTypeTF_maybe envs rdr_env ty2+ = can_eq_newtype_nc rdr_env envs ev IsSwapped ty2 stuff2 ty1 ps_ty1++-- Then, get rid of casts+can_eq_nc rewritten rdr_env envs ev eq_rel (CastTy ty1 co1) _ ty2 ps_ty2+ | isNothing (canEqLHS_maybe ty2) -- See (EIK3) in Note [Equalities with incompatible kinds]+ = canEqCast rewritten rdr_env envs ev eq_rel NotSwapped ty1 co1 ty2 ps_ty2+can_eq_nc rewritten rdr_env envs ev eq_rel ty1 ps_ty1 (CastTy ty2 co2) _+ | isNothing (canEqLHS_maybe ty1) -- See (EIK3) in Note [Equalities with incompatible kinds]+ = canEqCast rewritten rdr_env envs ev eq_rel IsSwapped ty2 co2 ty1 ps_ty1++----------------------+-- Otherwise try to decompose+----------------------++-- Literals+can_eq_nc _rewritten _rdr_env _envs ev eq_rel ty1@(LitTy l1) _ (LitTy l2) _+ | l1 == l2+ = do { setEvBindIfWanted ev True (evCoercion $ mkReflCo (eqRelRole eq_rel) ty1)+ ; stopWith ev "Equal LitTy" }++-- Decompose FunTy: (s -> t) and (c => t)+-- NB: don't decompose (Int -> blah) ~ (Show a => blah)+can_eq_nc _rewritten _rdr_env _envs ev eq_rel+ (FunTy { ft_mult = am1, ft_af = af1, ft_arg = ty1a, ft_res = ty1b }) _ps_ty1+ (FunTy { ft_mult = am2, ft_af = af2, ft_arg = ty2a, ft_res = ty2b }) _ps_ty2+ | af1 == af2 -- See Note [Decomposing FunTy]+ = canDecomposableFunTy ev eq_rel af1 (am1,ty1a,ty1b) (am2,ty2a,ty2b)++-- Decompose type constructor applications+-- NB: we have expanded type synonyms already+can_eq_nc rewritten _rdr_env _envs ev eq_rel ty1 _ ty2 _+ | Just (tc1, tys1) <- tcSplitTyConApp_maybe ty1+ , Just (tc2, tys2) <- tcSplitTyConApp_maybe ty2+ -- tcSplitTyConApp_maybe: we want to catch e.g. Maybe Int ~ (Int -> Int)+ -- here for better error messages rather than decomposing into AppTys;+ -- hence not using a direct match on TyConApp++ , not (isTypeFamilyTyCon tc1 || isTypeFamilyTyCon tc2)+ -- A type family at the top of LHS or RHS: we want to fall through+ -- to the canonical-LHS cases (look for canEqLHS_maybe)++ -- See (TC1) in Note [Canonicalising TyCon/TyCon equalities]+ , let role = eqRelRole eq_rel+ both_generative = isGenerativeTyCon tc1 role && isGenerativeTyCon tc2 role+ , rewritten || both_generative+ = canTyConApp ev eq_rel both_generative tc1 tys1 tc2 tys2++can_eq_nc _rewritten _rdr_env _envs ev eq_rel+ s1@ForAllTy{} _+ s2@ForAllTy{} _+ = can_eq_nc_forall ev eq_rel s1 s2++-- See Note [Canonicalising type applications] about why we require rewritten types+-- Use tcSplitAppTy, not matching on AppTy, to catch oversaturated type families+-- NB: Only decompose AppTy for nominal equality.+-- See Note [Decomposing AppTy equalities]+can_eq_nc True _rdr_env _envs ev NomEq ty1 _ ty2 _+ | Just (t1, s1) <- tcSplitAppTy_maybe ty1+ , Just (t2, s2) <- tcSplitAppTy_maybe ty2+ = can_eq_app ev t1 s1 t2 s2++-------------------+-- Can't decompose.+-------------------++-- No similarity in type structure detected. Rewrite and try again.+can_eq_nc False rdr_env envs ev eq_rel _ ps_ty1 _ ps_ty2+ = -- Rewrite the two types and try again+ do { (redn1@(Reduction _ xi1), rewriters1) <- rewrite ev ps_ty1+ ; (redn2@(Reduction _ xi2), rewriters2) <- rewrite ev ps_ty2+ ; new_ev <- rewriteEqEvidence (rewriters1 S.<> rewriters2) ev NotSwapped redn1 redn2+ ; traceTcS "can_eq_nc: go round again" (ppr new_ev $$ ppr xi1 $$ ppr xi2)+ ; can_eq_nc True rdr_env envs new_ev eq_rel xi1 xi1 xi2 xi2 }++----------------------------+-- Look for a canonical LHS.+-- Only rewritten types end up below here.+----------------------------++-- NB: pattern match on rewritten=True: we want only rewritten types sent to canEqLHS+-- This means we've rewritten any variables and reduced any type family redexes+-- 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 can_eq_lhs1 <- canEqLHS_maybe ty1+ = do { traceTcS "can_eq1" (ppr ty1 $$ ppr ty2)+ ; canEqCanLHS ev eq_rel NotSwapped can_eq_lhs1 ps_ty1 ty2 ps_ty2 }++ | Just can_eq_lhs2 <- canEqLHS_maybe ty2+ = do { traceTcS "can_eq2" (ppr ty1 $$ ppr ty2)+ ; canEqCanLHS ev eq_rel IsSwapped can_eq_lhs2 ps_ty2 ty1 ps_ty1 }++ -- If the type is TyConApp tc1 args1, then args1 really can't be less+ -- than tyConArity tc1. It could be *more* than tyConArity, but then we+ -- should have handled the case as an AppTy. That case only fires if+ -- _both_ sides of the equality are AppTy-like... but if one side is+ -- AppTy-like and the other isn't (and it also isn't a variable or+ -- saturated type family application, both of which are handled by+ -- can_eq_nc), we're in a failure mode and can just fall through.++----------------------------+-- Fall-through. Give up.+----------------------------++-- We've rewritten and the types don't match. Give up.+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)+ ; case eq_rel of -- See Note [Unsolved equalities]+ ReprEq -> finishCanWithIrred ReprEqReason ev+ NomEq -> finishCanWithIrred ShapeMismatchReason ev }+ -- No need to call canEqSoftFailure/canEqHardFailure because they+ -- rewrite, and the types involved here are already rewritten+++{- 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 #15431+-}++---------------------------------+can_eq_nc_forall :: CtEvidence -> EqRel+ -> Type -> Type -- LHS and RHS+ -> TcS (StopOrContinue (Either IrredCt EqCt))+-- (forall as. phi1) ~ (forall bs. phi2)+-- Check for length match of as, bs+-- Then build an implication constraint: forall as. phi1 ~ phi2[as/bs]+-- But remember also to unify the kinds of as and bs+-- (this is the 'go' loop), and actually substitute phi2[as |> cos / bs]+-- Remember also that we might have forall z (a:z). blah+-- so we must proceed one binder at a time (#13879)++can_eq_nc_forall ev eq_rel s1 s2+ | CtWanted { ctev_loc = loc, ctev_dest = orig_dest, ctev_rewriters = rewriters } <- ev+ = do { let free_tvs = tyCoVarsOfTypes [s1,s2]+ (bndrs1, phi1) = tcSplitForAllTyVarBinders s1+ (bndrs2, phi2) = tcSplitForAllTyVarBinders s2+ flags1 = binderFlags bndrs1+ flags2 = binderFlags bndrs2+ ; if not (all2 eqForAllVis flags1 flags2) -- Note [ForAllTy and type equality]+ then do { traceTcS "Forall failure" $+ vcat [ ppr s1, ppr s2, ppr bndrs1, ppr bndrs2+ , ppr flags1, ppr flags2 ]+ ; canEqHardFailure ev s1 s2 }+ else+ do { traceTcS "Creating implication for polytype equality" $ ppr ev+ ; let empty_subst1 = mkEmptySubst $ mkInScopeSet free_tvs+ ; skol_info <- mkSkolemInfo (UnifyForAllSkol phi1)+ ; (subst1, skol_tvs) <- tcInstSkolTyVarsX skol_info empty_subst1 $+ binderVars bndrs1++ ; let phi1' = substTy subst1 phi1++ -- Unify the kinds, extend the substitution+ go :: [TcTyVar] -> Subst -> [TyVarBinder]+ -> TcS (TcCoercion, Cts)+ go (skol_tv:skol_tvs) subst (bndr2:bndrs2)+ = do { let tv2 = binderVar bndr2+ ; (kind_co, wanteds1) <- unify loc rewriters Nominal (tyVarKind skol_tv)+ (substTy subst (tyVarKind tv2))+ ; let subst' = extendTvSubstAndInScope subst tv2+ (mkCastTy (mkTyVarTy skol_tv) kind_co)+ -- skol_tv is already in the in-scope set, but the+ -- free vars of kind_co are not; hence "...AndInScope"+ ; (co, wanteds2) <- go skol_tvs subst' bndrs2+ ; return ( mkForAllCo skol_tv kind_co co+ , wanteds1 `unionBags` wanteds2 ) }++ -- Done: unify phi1 ~ phi2+ go [] subst bndrs2+ = assert (null bndrs2) $+ unify loc rewriters (eqRelRole eq_rel) phi1' (substTyUnchecked subst phi2)++ go _ _ _ = panic "cna_eq_nc_forall" -- case (s:ss) []++ empty_subst2 = mkEmptySubst (getSubstInScope subst1)++ ; (lvl, (all_co, wanteds)) <- pushLevelNoWorkList (ppr skol_info) $+ go skol_tvs empty_subst2 bndrs2+ ; emitTvImplicationTcS lvl (getSkolemInfo skol_info) skol_tvs wanteds++ ; setWantedEq orig_dest all_co+ ; stopWith ev "Deferred polytype equality" } }++ | otherwise+ = do { traceTcS "Omitting decomposition of given polytype equality" $+ pprEq s1 s2 -- See Note [Do not decompose Given polytype equalities]+ ; stopWith ev "Discard given polytype equality" }++ where+ unify :: CtLoc -> RewriterSet -> Role -> TcType -> TcType -> TcS (TcCoercion, Cts)+ -- This version returns the wanted constraint rather+ -- than putting it in the work list+ unify loc rewriters role ty1 ty2+ | ty1 `tcEqType` ty2+ = return (mkReflCo role ty1, emptyBag)+ | otherwise+ = do { (wanted, co) <- newWantedEq loc rewriters role ty1 ty2+ ; return (co, unitBag (mkNonCanonical wanted)) }+++{- Note [Unwrap newtypes first]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+See also Note [Decomposing newtype equalities]++Consider+ newtype N m a = MkN (m a)+N will get a conservative, Nominal role for its second parameter '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.++Conclusion: we must unwrap newtypes before decomposing them. This happens+in `can_eq_newtype_nc`++We did flirt with making the /rewriter/ expand newtypes, rather than+doing it in `can_eq_newtype_nc`. But with recursive newtypes we want+to be super-careful about expanding!++ newtype A = MkA [A] -- Recursive!++ f :: A -> [A]+ f = coerce++We have [W] A ~R# [A]. If we rewrite [A], it'll expand to+ [[[[[...]]]]]+and blow the reduction stack. See Note [Newtypes can blow the stack]+in GHC.Tc.Solver.Rewrite. But if we expand only the /top level/ of+both sides, we get+ [W] [A] ~R# [A]+which we can, just, solve by reflexivity.++So we simply unwrap, on-demand, at top level, in `can_eq_newtype_nc`.++This is all very delicate. There is a real risk of a loop in the type checker+with recursive newtypes -- but I think we're doomed to do *something*+delicate, as we're really trying to solve for equirecursive type+equality. Bottom line for users: recursive newtypes do not play well with type+inference for representational equality. See also Section 5.3.1 and 5.3.4 of+"Safe Zero-cost Coercions for Haskell" (JFP 2016).++See also Note [Decomposing newtype equalities].++--- Historical side note ---++We flirted with doing /both/ unwrap-at-top-level /and/ rewrite-deeply;+see #22519. But that didn't work: see discussion in #22924. Specifically+we got a loop with a minor variation:+ f2 :: a -> [A]+ f2 = coerce++Note [Eager reflexivity check]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have++ newtype X = MkX (Int -> X)++and++ [W] X ~R X++Naively, we would start unwrapping X and end up in a loop. Instead,+we do this eager reflexivity check. This is necessary only for representational+equality because the rewriter technology deals with the similar case+(recursive type families) for nominal equality.++Note that this check does not catch all cases, but it will catch the cases+we're most worried about, types like X above that are actually inhabited.++Here's another place where this reflexivity check is key:+Consider trying to prove (f a) ~R (f a). The AppTys in there can't+be decomposed, because representational equality isn't congruent with respect+to AppTy. So, when canonicalising the equality above, we get stuck and+would normally produce a CIrredCan. However, we really do want to+be able to solve (f a) ~R (f a). So, in the representational case only,+we do a reflexivity check.++(This would be sound in the nominal case, but unnecessary, and I [Richard+E.] am worried that it would slow down the common case.)++ Note [Newtypes can blow the stack]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have++ newtype X = MkX (Int -> X)+ newtype Y = MkY (Int -> Y)++and now wish to prove++ [W] X ~R Y++This Wanted will loop, expanding out the newtypes ever deeper looking+for a solid match or a solid discrepancy. Indeed, there is something+appropriate to this looping, because X and Y *do* have the same representation,+in the limit -- they're both (Fix ((->) Int)). However, no finitely-sized+coercion will ever witness it. This loop won't actually cause GHC to hang,+though, because we check our depth in `can_eq_newtype_nc`.+-}++------------------------+-- | We're able to unwrap a newtype. Update the bits accordingly.+can_eq_newtype_nc :: GlobalRdrEnv -> FamInstEnvs+ -> CtEvidence -- ^ :: ty1 ~ ty2+ -> SwapFlag+ -> TcType -- ^ ty1+ -> ((Bag GlobalRdrElt, TcCoercion), TcType) -- ^ :: ty1 ~ ty1'+ -> TcType -- ^ ty2+ -> TcType -- ^ ty2, with type synonyms+ -> TcS (StopOrContinue (Either IrredCt EqCt))+can_eq_newtype_nc rdr_env envs ev swapped ty1 ((gres, co1), ty1') ty2 ps_ty2+ = do { traceTcS "can_eq_newtype_nc" $+ vcat [ ppr ev, ppr swapped, ppr co1, ppr gres, ppr ty1', ppr ty2 ]++ -- Check for blowing our stack, and increase the depth+ -- See Note [Newtypes can blow the stack]+ ; let loc = ctEvLoc ev+ ev' = ev `setCtEvLoc` bumpCtLocDepth loc+ ; checkReductionDepth loc ty1++ -- Next, we record uses of newtype constructors, since coercing+ -- through newtypes is tantamount to using their constructors.+ ; recordUsedGREs gres++ ; let redn1 = mkReduction co1 ty1'++ ; new_ev <- rewriteEqEvidence emptyRewriterSet ev' swapped+ redn1 (mkReflRedn Representational ps_ty2)++ ; can_eq_nc False rdr_env envs new_ev ReprEq ty1' ty1' ty2 ps_ty2 }++---------+-- ^ Decompose a type application.+-- All input types must be rewritten. See Note [Canonicalising type applications]+-- Nominal equality only!+can_eq_app :: CtEvidence -- :: s1 t1 ~N s2 t2+ -> Xi -> Xi -- s1 t1+ -> Xi -> Xi -- s2 t2+ -> TcS (StopOrContinue (Either IrredCt EqCt))++-- AppTys only decompose for nominal equality, so this case just leads+-- to an irreducible constraint; see typecheck/should_compile/T10494+-- See Note [Decomposing AppTy equalities]+can_eq_app ev s1 t1 s2 t2+ | CtWanted { ctev_dest = dest } <- ev+ = do { traceTcS "can_eq_app" (vcat [ text "s1:" <+> ppr s1, text "t1:" <+> ppr t1+ , text "s2:" <+> ppr s2, text "t2:" <+> ppr t2+ , text "vis:" <+> ppr (isNextArgVisible s1) ])+ ; (co,_,_) <- wrapUnifierTcS ev Nominal $ \uenv ->+ -- Unify arguments t1/t2 before function s1/s2, because+ -- the former have smaller kinds, and hence simpler error messages+ -- c.f. GHC.Tc.Utils.Unify.uType (go_app)+ do { let arg_env = updUEnvLoc uenv (adjustCtLoc (isNextArgVisible s1) False)+ ; co_t <- uType arg_env t1 t2+ ; co_s <- uType uenv s1 s2+ ; return (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 } <- ev+ = do { let co = mkCoVarCo evar+ co_s = mkLRCo CLeft co+ co_t = mkLRCo CRight co+ ; evar_s <- newGivenEvVar loc ( mkTcEqPredLikeEv ev s1 s2+ , evCoercion co_s )+ ; evar_t <- newGivenEvVar loc ( mkTcEqPredLikeEv ev t1 t2+ , evCoercion co_t )+ ; emitWorkNC [evar_t]+ ; startAgainWith (mkNonCanonical evar_s) }++ where+ loc = ctEvLoc ev++ 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)+canEqCast :: Bool -- are both types rewritten?+ -> GlobalRdrEnv -> FamInstEnvs+ -> CtEvidence+ -> EqRel+ -> SwapFlag+ -> TcType -> Coercion -- LHS (res. RHS), ty1 |> co1+ -> TcType -> TcType -- RHS (res. LHS), ty2 both normal and pretty+ -> TcS (StopOrContinue (Either IrredCt EqCt))+canEqCast rewritten rdr_env envs ev eq_rel swapped ty1 co1 ty2 ps_ty2+ = do { traceTcS "Decomposing cast" (vcat [ ppr ev+ , ppr ty1 <+> text "|>" <+> ppr co1+ , ppr ps_ty2 ])+ ; new_ev <- rewriteEqEvidence emptyRewriterSet ev swapped+ (mkGReflLeftRedn role ty1 co1)+ (mkReflRedn role ps_ty2)+ ; can_eq_nc rewritten rdr_env envs new_ev eq_rel ty1 ty1 ty2 ps_ty2 }+ where+ role = eqRelRole eq_rel++------------------------+canTyConApp :: CtEvidence -> EqRel+ -> Bool -- Both TyCons are generative+ -> TyCon -> [TcType]+ -> TyCon -> [TcType]+ -> TcS (StopOrContinue (Either IrredCt EqCt))+-- See Note [Decomposing TyConApp equalities]+-- Neither tc1 nor tc2 is a saturated funTyCon, nor a type family+-- But they can be data families.+canTyConApp ev eq_rel both_generative tc1 tys1 tc2 tys2+ | tc1 == tc2+ , tys1 `equalLength` tys2+ = do { inerts <- getInertSet+ ; if can_decompose inerts+ then canDecomposableTyConAppOK ev eq_rel tc1 tys1 tys2+ else canEqSoftFailure ev eq_rel ty1 ty2 }++ -- See Note [Skolem abstract data] in GHC.Core.Tycon+ | tyConSkolem tc1 || tyConSkolem tc2+ = do { traceTcS "canTyConApp: skolem abstract" (ppr tc1 $$ ppr tc2)+ ; finishCanWithIrred AbstractTyConReason ev }++ | otherwise -- Different TyCons+ = if both_generative -- See (TC2) and (TC3) in+ -- Note [Canonicalising TyCon/TyCon equalities]+ then canEqHardFailure ev ty1 ty2+ else canEqSoftFailure ev eq_rel ty1 ty2+ where+ -- Reconstruct the types for error messages. This would do+ -- the wrong thing (from a pretty printing point of view)+ -- for functions, because we've lost the FunTyFlag; but+ -- in fact we never call canTyConApp on a saturated FunTyCon+ ty1 = mkTyConApp tc1 tys1+ ty2 = mkTyConApp tc2 tys2++ -- See Note [Decomposing TyConApp equalities]+ -- and Note [Decomposing newtype equalities]+ can_decompose inerts+ = isInjectiveTyCon tc1 (eqRelRole eq_rel)+ || (assert (eq_rel == ReprEq) $+ -- assert: isInjectiveTyCon is always True for Nominal except+ -- for type synonyms/families, neither of which happen here+ -- Moreover isInjectiveTyCon is True for Representational+ -- for algebraic data types. So we are down to newtypes+ -- and data families.+ ctEvFlavour ev == Wanted && noGivenNewtypeReprEqs tc1 inerts)+ -- See Note [Decomposing newtype equalities] (EX2)++{- Note [Canonicalising TyCon/TyCon equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider++ type family TF a where TF Char = Bool+ data family DF a+ newtype instance DF Bool = MkDF Int++Suppose we are canonicalising [W] Int ~R# DF (TF a). Then++(TC1) We might have an inert Given (a ~# Char), so if we rewrote the wanted+ (i.e. went around again in `can_eq_nc` with `rewritten`=True, we'd get+ [W] Int ~R# DF Bool+ and then the `tcTopNormaliseNewTypeTF_maybe` call would fire and+ we'd unwrap the newtype. So we must do that "go round again" bit.+ Hence the complicated guard (rewritten || both_generative) in `can_eq_nc`.++(TC2) If we can't rewrite `a` yet, we'll finish with an unsolved+ [W] Int ~R# DF (TF a)+ in the inert set. But we must use canEqSoftFailure, not canEqHardFailure,+ because it might be solved "later" when we learn more about `a`.+ Hence the use of `both_generative` in `canTyConApp`.++(TC3) Here's another example:+ [G] Age ~R# Int+ where Age's constructor is not in scope. We don't want to report+ an "inaccessible code" error in the context of this Given! So again+ we want `canEqSoftFailure`.++ For example, see typecheck/should_compile/T10493, repeated here:+ import Data.Ord (Down) -- no constructor+ foo :: Coercible (Down Int) Int => Down Int -> Int+ foo = coerce++ That should compile, but only because we use canEqSoftFailure and+ not canEqHardFailure.++Note [Fast path when decomposing TyConApps]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If we see (T s1 t1 ~ T s2 t2), then we can just decompose to+ (s1 ~ s2, t1 ~ t2)+and push those back into the work list. But if+ s1 = K k1 s2 = K k2+then we will just decompose s1~s2, and it might be better to+do so on the spot. An important special case is where s1=s2,+and we get just Refl.++So canDecomposableTyConAppOK uses wrapUnifierTcS etc to short-cut+that work. See also Note [Work-list ordering].++Note [Decomposing TyConApp equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have+ [G/W] T ty1 ~r T ty2+Can we decompose it, and replace it by+ [G/W] ty1 ~r' ty2+and if so what role is r'? (In this Note, all the "~" are primitive+equalities "~#", but I have dropped the noisy "#" symbols.) Lots of+background in the paper "Safe zero-cost coercions for Haskell".++This Note covers the topic for+ * Datatypes+ * Newtypes+ * Data families+For the rest:+ * Type synonyms: are always expanded+ * Type families: see Note [Decomposing type family applications]+ * AppTy: see Note [Decomposing AppTy equalities].++---- Roles of the decomposed constraints ----+For a start, the role r' will always be defined like this:+ * If r=N then r' = N+ * If r=R then r' = role of T's first argument++For example:+ data TR a = MkTR a -- Role of T's first arg is Representational+ data TN a = MkTN (F a) -- Role of T's first arg is Nominal++The function tyConRolesX :: Role -> TyCon -> [Role] gets the argument+role r' for a TyCon T at role r. E.g.+ tyConRolesX Nominal TR = [Nominal]+ tyConRolesX Representational TR = [Representational]++---- Soundness and completeness ----+For Givens, for /soundness/ of decomposition we need, forall ty1,ty2:+ T ty1 ~r T ty2 ===> ty1 ~r' ty2+Here "===>" means "implies". That is, given evidence for (co1 : T ty1 ~r T co2)+we can produce evidence for (co2 : ty1 ~r' ty2). But in the solver we+/replace/ co1 with co2 in the inert set, and we don't want to lose any proofs+thereby. So for /completeness/ of decomposition we also need the reverse:+ ty1 ~r' ty2 ===> T ty1 ~r T ty2++For Wanteds, for /soundness/ of decomposition we need:+ ty1 ~r' ty2 ===> T ty1 ~r T ty2+because if we do decompose we'll get evidence (co2 : ty1 ~r' ty2) and+from that we want to derive evidence (T co2 : T ty1 ~r T ty2).+For /completeness/ of decomposition we need the reverse implication too,+else we may decompose to a new proof obligation that is stronger than+the one we started with. See Note [Decomposing newtype equalities].++---- Injectivity ----+When do these bi-implications hold? In one direction it is easy.+We /always/ have+ ty1 ~r' ty2 ===> T ty1 ~r T ty2+This is the CO_TYCONAPP rule of the paper (Fig 5); see also the+TyConAppCo case of GHC.Core.Lint.lintCoercion.++In the other direction, we have+ T ty1 ~r T ty2 ==> ty1 ~r' ty2 if T is /injective at role r/+This is the very /definition/ of injectivity: injectivity means result+is the same => arguments are the same, modulo the role shift.+See comments on GHC.Core.TyCon.isInjectiveTyCon. This is also+the CO_NTH rule in Fig 5 of the paper, except in the paper only+newtypes are non-injective at representation role, so the rule says "H+is not a newtype".++Injectivity is a bit subtle:+ Nominal Representational+ Datatype YES YES+ Newtype YES NO{1}+ Data family YES NO{2}++{1} Consider newtype N a = MkN (F a) -- Arg has Nominal role+ Is it true that (N t1) ~R (N t2) ==> t1 ~N t2 ?+ No, absolutely not. E.g.+ type instance F Int = Int; type instance F Bool = Char+ Then (N Int) ~R (N Bool), by unwrapping, but we don't want Int~Char!++ See Note [Decomposing newtype equalities]++{2} We must treat data families precisely like newtypes, because of the+ possibility of newtype instances. See also+ Note [Decomposing newtype equalities]. See #10534 and+ test case typecheck/should_fail/T10534.++---- Takeaway summary -----+For sound and complete decomposition, we simply need injectivity;+that is for isInjectiveTyCon to be true:++* At Nominal role, isInjectiveTyCon is True for all the TyCons we are+ considering in this Note: datatypes, newtypes, and data families.++* For Givens, injectivity is necessary for soundness; completeness has no+ side conditions.++* For Wanteds, soundness has no side conditions; but injectivity is needed+ for completeness. See Note [Decomposing newtype equalities]++This is implemented in `can_decompose` in `canTyConApp`; it looks at+injectivity, just as specified above.++Note [Work-list ordering]+~~~~~~~~~~~~~~~~~~~~~~~~~+Consider decomposing a TyCon equality++ (0) [W] T k_fresh (t1::k_fresh) ~ T k1 (t2::k1)++This gives rise to 2 equalities in the solver worklist++ (1) [W] k_fresh ~ k1+ (2) [W] t1::k_fresh ~ t2::k1++We would like to solve (1) before looking at (2), so that we don't end+up in the complexities of canEqLHSHetero. To do this:++* `canDecomposableTyConAppOK` calls `uType` on the arguments+ /left-to-right/. See the call to zipWith4M in that function.++* `uType` keeps the bag of emitted constraints in the same+ left-to-right order. See the use of `snocBag` in `uType_defer`.++* `wrapUnifierTcS` adds the bag of deferred constraints from+ `do_unifications` to the work-list using `extendWorkListEqs`.++* `extendWorkListEqs` and `selectWorkItem` together arrange that the+ list of constraints given to `extendWorkListEqs` is processed in+ left-to-right order.++This is not a very big deal. It reduces the number of solver steps+in the test RaeJobTalk from 1830 to 1815, a 1% reduction. But still,+it doesn't cost anything either.++Note [Decomposing type family applications]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Supose we have+ [G/W] (F ty1) ~r (F ty2)+This is handled by the TyFamLHS/TyFamLHS case of canEqCanLHS2.++We never decompose to+ [G/W] ty1 ~r' ty2++Instead++* For Givens we do nothing. Injective type families have no corresponding+ evidence of their injectivity, so we cannot decompose an+ injective-type-family Given.++* For Wanteds, for the Nominal role only, we emit new Wanteds rather like+ functional dependencies, for each injective argument position.++ E.g type family F a b -- injective in first arg, but not second+ [W] (F s1 t1) ~N (F s2 t2)+ Emit new Wanteds+ [W] s1 ~N s2+ But retain the existing, unsolved constraint.++Note [Decomposing newtype equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+This Note also applies to data families, which we treat like+newtype in case of 'newtype instance'.++As Note [Decomposing TyConApp equalities] describes, if N is injective+at role r, we can do this decomposition?+ [G/W] (N ty1) ~r (N ty2) to [G/W] ty1 ~r' ty2++For a Given with r=R, the answer is a solid NO: newtypes are not injective at+representational role, and we must not decompose, or we lose soundness.+Example is wrinkle {1} in Note [Decomposing TyConApp equalities].++For a Wanted with r=R, since newtypes are not injective at representational+role, decomposition is sound, but we may lose completeness. Nevertheless,+if the newtype is abstract (so can't be unwrapped) we can only solve+the equality by (a) using a Given or (b) decomposition. If (a) is impossible+(e.g. no Givens) then (b) is safe albeit potentially incomplete.++There are two ways in which decomposing (N ty1) ~r (N ty2) could be incomplete:++* Incompleteness example (EX1): unwrap first+ newtype Nt a = MkNt (Id a)+ type family Id a where Id a = a++ [W] Nt Int ~R Nt Age++ Because of its use of a type family, Nt's parameter will get inferred to+ have a nominal role. Thus, decomposing the wanted will yield [W] Int ~N Age,+ which is unsatisfiable. Unwrapping, though, leads to a solution.++ Conclusion: always unwrap newtypes before attempting to decompose+ them. This is done in can_eq_nc. Of course, we can't unwrap if the data+ constructor isn't in scope. See Note [Unwrap newtypes first].++* Incompleteness example (EX2): available Givens+ newtype Nt a = Mk Bool -- NB: a is not used in the RHS,+ type role Nt representational -- but the user gives it an R role anyway++ [G] Nt t1 ~R Nt t2+ [W] Nt alpha ~R Nt beta++ We *don't* want to decompose to [W] alpha ~R beta, because it's possible+ that alpha and beta aren't representationally equal. And if we figure+ out (elsewhere) that alpha:=t1 and beta:=t2, we can solve the Wanted+ from the Given. This is somewhat similar to the question of overlapping+ Givens for class constraints: see Note [Instance and Given overlap] in+ GHC.Tc.Solver.Dict.++ Conclusion: don't decompose [W] N s ~R N t, if there are any Given+ equalities that could later solve it.++ But what precisely does it mean to say "any Given equalities that could+ later solve it"?++ In #22924 we had+ [G] f a ~R# a [W] Const (f a) a ~R# Const a a+ where Const is an abstract newtype. If we decomposed the newtype, we+ could solve. Not-decomposing on the grounds that (f a ~R# a) might turn+ into (Const (f a) a ~R# Const a a) seems a bit silly.++ In #22331 we had+ [G] N a ~R# N b [W] N b ~R# N a+ (where N is abstract so we can't unwrap). Here we really /don't/ want to+ decompose, because the /only/ way to solve the Wanted is from that Given+ (with a Sym).++ In #22519 we had+ [G] a <= b [W] IO Age ~R# IO Int++ (where IO is abstract so we can't unwrap, and newtype Age = Int; and (<=)+ is a type-level comparison on Nats). Here we /must/ decompose, despite the+ existence of an Irred Given, or we will simply be stuck. (Side note: We+ flirted with deep-rewriting of newtypes (see discussion on #22519 and+ !9623) but that turned out not to solve #22924, and also makes type+ inference loop more often on recursive newtypes.)++ The currently-implemented compromise is this:++ we decompose [W] N s ~R# N t unless there is a [G] N s' ~ N t'++ that is, a Given Irred equality with both sides headed with N.+ See the call to noGivenNewtypeReprEqs in canTyConApp.++ This is not perfect. In principle a Given like [G] (a b) ~ (c d), or+ even just [G] c, could later turn into N s ~ N t. But since the free+ vars of a Given are skolems, or at least untouchable unification+ variables, this is extremely unlikely to happen.++ Another worry: there could, just, be a CDictCan with some+ un-expanded equality superclasses; but only in some very obscure+ recursive-superclass situations.++ Yet another approach (!) is desribed in+ Note [Decomposing newtypes a bit more aggressively].++Remember: decomposing Wanteds is always /sound/. This Note is+only about /completeness/.++Note [Decomposing newtypes a bit more aggressively]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+IMPORTANT: the ideas in this Note are *not* implemented. Instead, the+current approach is detailed in Note [Decomposing newtype equalities]+and Note [Unwrap newtypes first].+For more details about the ideas in this Note see+ * GHC propoosal: https://github.com/ghc-proposals/ghc-proposals/pull/549+ * issue #22441+ * discussion on !9282.++Consider [G] c, [W] (IO Int) ~R (IO Age)+where IO is abstract, and+ newtype Age = MkAge Int -- Not abstract+With the above rules, if there any Given Irreds,+the Wanted is insoluble because we can't decompose it. But in fact,+if we look at the defn of IO, roughly,+ newtype IO a = State# -> (State#, a)+we can see that decomposing [W] (IO Int) ~R (IO Age) to+ [W] Int ~R Age+definitely does not lose completeness. Why not? Because the role of+IO's argment is representational. Hence:++ DecomposeNewtypeIdea:+ decompose [W] (N s1 .. sn) ~R (N t1 .. tn)+ if the roles of all N's arguments are representational++If N's arguments really /are/ representational this will not lose+completeness. Here "really are representational" means "if you expand+all newtypes in N's RHS, we'd infer a representational role for each+of N's type variables in that expansion". See Note [Role inference]+in GHC.Tc.TyCl.Utils.++But the user might /override/ a phantom role with an explicit role+annotation, and then we could (obscurely) get incompleteness.+Consider++ module A( silly, T ) where+ newtype T a = MkT Int+ type role T representational -- Override phantom role++ silly :: Coercion (T Int) (T Bool)+ silly = Coercion -- Typechecks by unwrapping the newtype++ data Coercion a b where -- Actually defined in Data.Type.Coercion+ Coercion :: Coercible a b => Coercion a b++ module B where+ import A+ f :: T Int -> T Bool+ f = case silly of Coercion -> coerce++Here the `coerce` gives [W] (T Int) ~R (T Bool) which, if we decompose,+we'll get stuck with (Int ~R Bool). Instead we want to use the+[G] (T Int) ~R (T Bool), which will be in the Irreds.++Summary: we could adopt (DecomposeNewtypeIdea), at the cost of a very+obscure incompleteness (above). But no one is reporting a problem from+the lack of decompostion, so we'll just leave it for now. This long+Note is just to record the thinking for our future selves.++Note [Decomposing AppTy equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+For AppTy all the same questions arise as in+Note [Decomposing TyConApp equalities]. We have++ s1 ~r s2, t1 ~N t2 ==> s1 t1 ~r s2 t2 (rule CO_APP)+ s1 t1 ~N s2 t2 ==> s1 ~N s2, t1 ~N t2 (CO_LEFT, CO_RIGHT)++In the first of these, why do we need Nominal equality in (t1 ~N t2)?+See {2} below.++For sound and complete solving, we need both directions to decompose. So:+* At nominal role, all is well: we have both directions.+* At representational role, decomposition of Givens is unsound (see {1} below),+ and decomposition of Wanteds is incomplete.++Here is an example of the incompleteness for Wanteds:++ [G] g1 :: a ~R b+ [W] w1 :: Maybe b ~R alpha a+ [W] w2 :: alpha ~N Maybe++Suppose we see w1 before w2. If we decompose, using AppCo to prove w1, we get++ w1 := AppCo w3 w4+ [W] w3 :: Maybe ~R alpha+ [W] w4 :: b ~N a++Note that w4 is *nominal*. A nominal role here is necessary because AppCo+requires a nominal role on its second argument. (See {2} for an example of+why.) Now we are stuck, because w4 is insoluble. On the other hand, if we+see w2 first, setting alpha := Maybe, all is well, as we can decompose+Maybe b ~R Maybe a into b ~R a.++Another example:+ newtype Phant x = MkPhant Int+ [W] w1 :: Phant Int ~R alpha Bool+ [W] w2 :: alpha ~ Phant++If we see w1 first, decomposing would be disastrous, as we would then try+to solve Int ~ Bool. Instead, spotting w2 allows us to simplify w1 to become+ [W] w1' :: Phant Int ~R Phant Bool++which can then (assuming MkPhant is in scope) be simplified to Int ~R Int,+and all will be well. See also Note [Unwrap newtypes first].++Bottom line:+* Always decompose AppTy at nominal role: can_eq_app+* Never decompose AppTy at representational role (neither Given nor Wanted):+ the lack of an equation in can_eq_nc++Extra points+{1} Decomposing a Given AppTy over a representational role is simply+ unsound. For example, if we have co1 :: Phant Int ~R a Bool (for+ the newtype Phant, above), then we surely don't want any relationship+ between Int and Bool, lest we also have co2 :: Phant ~ a around.++{2} The role on the AppCo coercion is a conservative choice, because we don't+ know the role signature of the function. For example, let's assume we could+ have a representational role on the second argument of AppCo. Then, consider++ data G a where -- G will have a nominal role, as G is a GADT+ MkG :: G Int+ newtype Age = MkAge Int++ co1 :: G ~R a -- by assumption+ co2 :: Age ~R Int -- by newtype axiom+ co3 = AppCo co1 co2 :: G Age ~R a Int -- by our broken AppCo++ and now co3 can be used to cast MkG to have type G Age, in violation of+ the way GADTs are supposed to work (which is to use nominal equality).+-}++canDecomposableTyConAppOK :: CtEvidence -> EqRel+ -> TyCon -> [TcType] -> [TcType]+ -> TcS (StopOrContinue a)+-- Precondition: tys1 and tys2 are the same finite length, hence "OK"+canDecomposableTyConAppOK ev eq_rel tc tys1 tys2+ = assert (tys1 `equalLength` tys2) $+ do { traceTcS "canDecomposableTyConAppOK"+ (ppr ev $$ ppr eq_rel $$ ppr tc $$ ppr tys1 $$ ppr tys2)+ ; case ev of+ CtWanted { ctev_dest = dest }+ -- new_locs and tc_roles are both infinite, so we are+ -- guaranteed that cos has the same length as tys1 and tys2+ -- See Note [Fast path when decomposing TyConApps]+ -> do { (co, _, _) <- wrapUnifierTcS ev role $ \uenv ->+ do { cos <- zipWith4M (u_arg uenv) new_locs tc_roles tys1 tys2+ -- zipWith4M: see Note [Work-list ordering]+ -- in GHC.Tc.Solved.Equality+ ; return (mkTyConAppCo role tc cos) }+ ; setWantedEq dest co }++ CtGiven { ctev_evar = evar }+ | let ev_co = mkCoVarCo evar+ -> emitNewGivens loc+ [ (r, ty1, ty2, mkSelCo (SelTyCon i r) ev_co)+ | (r, ty1, ty2, i) <- zip4 tc_roles tys1 tys2 [0..]+ , r /= Phantom+ , not (isCoercionTy ty1) && not (isCoercionTy ty2) ]++ ; stopWith ev "Decomposed TyConApp" }++ where+ loc = ctEvLoc ev+ role = eqRelRole eq_rel++ u_arg uenv arg_loc arg_role = uType arg_env+ where+ arg_env = uenv `setUEnvRole` arg_role+ `updUEnvLoc` const arg_loc++ -- Infinite, to allow for over-saturated TyConApps+ tc_roles = tyConRoleListX role tc++ -- Add nuances to the location during decomposition:+ -- * if the argument is a kind argument, remember this, so that error+ -- messages say "kind", not "type". This is determined based on whether+ -- the corresponding tyConBinder is named (that is, dependent)+ -- * if the argument is invisible, note this as well, again by+ -- looking at the corresponding binder+ -- For oversaturated tycons, we need the (repeat loc) tail, which doesn't+ -- do either of these changes. (Forgetting to do so led to #16188)+ --+ -- NB: infinite in length+ new_locs = [ adjustCtLocTyConBinder bndr loc+ | bndr <- tyConBinders tc ]+ ++ repeat loc++canDecomposableFunTy :: CtEvidence -> EqRel -> FunTyFlag+ -> (Type,Type,Type) -- (multiplicity,arg,res)+ -> (Type,Type,Type) -- (multiplicity,arg,res)+ -> TcS (StopOrContinue a)+canDecomposableFunTy ev eq_rel af f1@(m1,a1,r1) f2@(m2,a2,r2)+ = do { traceTcS "canDecomposableFunTy"+ (ppr ev $$ ppr eq_rel $$ ppr f1 $$ ppr f2)+ ; case ev of+ CtWanted { ctev_dest = dest }+ -> do { (co, _, _) <- wrapUnifierTcS ev Nominal $ \ uenv ->+ do { let mult_env = uenv `updUEnvLoc` toInvisibleLoc+ `setUEnvRole` funRole role SelMult+ ; mult <- uType mult_env m1 m2+ ; arg <- uType (uenv `setUEnvRole` funRole role SelArg) a1 a2+ ; res <- uType (uenv `setUEnvRole` funRole role SelRes) r1 r2+ ; return (mkNakedFunCo role af mult arg res) }+ ; setWantedEq dest co }++ CtGiven { ctev_evar = evar }+ | let ev_co = mkCoVarCo evar+ -> emitNewGivens loc+ [ (funRole role fs, ty1, ty2, mkSelCo (SelFun fs) ev_co)+ | (fs, ty1, ty2) <- [ (SelMult, m1, m2)+ , (SelArg, a1, a2)+ , (SelRes, r1, r2)] ]++ ; stopWith ev "Decomposed TyConApp" }++ where+ loc = ctEvLoc ev+ role = eqRelRole eq_rel++-- | Call canEqSoftFailure when canonicalizing an equality fails, but if the+-- equality is representational, there is some hope for the future.+canEqSoftFailure :: CtEvidence -> EqRel -> TcType -> TcType+ -> TcS (StopOrContinue (Either IrredCt a))+canEqSoftFailure ev NomEq ty1 ty2+ = canEqHardFailure ev ty1 ty2+canEqSoftFailure ev ReprEq ty1 ty2+ = do { (redn1, rewriters1) <- rewrite ev ty1+ ; (redn2, rewriters2) <- rewrite ev ty2+ -- We must rewrite the types before putting them in the+ -- inert set, so that we are sure to kick them out when+ -- new equalities become available+ ; traceTcS "canEqSoftFailure with ReprEq" $+ vcat [ ppr ev, ppr redn1, ppr redn2 ]+ ; new_ev <- rewriteEqEvidence (rewriters1 S.<> rewriters2) ev NotSwapped redn1 redn2+ ; finishCanWithIrred ReprEqReason new_ev }++-- | Call when canonicalizing an equality fails with utterly no hope.+canEqHardFailure :: CtEvidence -> TcType -> TcType+ -> TcS (StopOrContinue (Either IrredCt a))+-- See Note [Make sure that insolubles are fully rewritten]+canEqHardFailure ev ty1 ty2+ = do { traceTcS "canEqHardFailure" (ppr ty1 $$ ppr ty2)+ ; (redn1, rewriters1) <- rewriteForErrors ev ty1+ ; (redn2, rewriters2) <- rewriteForErrors ev ty2+ ; new_ev <- rewriteEqEvidence (rewriters1 S.<> rewriters2) ev NotSwapped redn1 redn2+ ; finishCanWithIrred ShapeMismatchReason new_ev }++{-+Note [Canonicalising type applications]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Given (s1 t1) ~ ty2, how should we proceed?+The simple thing is to see if ty2 is of form (s2 t2), and+decompose.++However, over-eager decomposition gives bad error messages+for things like+ a b ~ Maybe c+ e f ~ p -> q+Suppose (in the first example) we already know a~Array. Then if we+decompose the application eagerly, yielding+ a ~ Maybe+ b ~ c+we get an error "Can't match Array ~ Maybe",+but we'd prefer to get "Can't match Array b ~ Maybe c".++So instead can_eq_wanted_app rewrites the LHS and RHS, in the hope of+replacing (a b) by (Array b), before using try_decompose_app to+decompose it.++Note [Make sure that insolubles are fully rewritten]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When an equality fails, we still want to rewrite the equality+all the way down, so that it accurately reflects+ (a) the mutable reference substitution in force at start of solving+ (b) any ty-binds in force at this point in solving+See Note [Rewrite insolubles] in GHC.Tc.Solver.InertSet.+And if we don't do this there is a bad danger that+GHC.Tc.Solver.applyTyVarDefaulting will find a variable+that has in fact been substituted.++Note [Do not decompose Given polytype equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider [G] (forall a. t1 ~ forall a. t2). Can we decompose this?+No -- what would the evidence look like? So instead we simply discard+this given evidence.++Note [No top-level newtypes on RHS of representational equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we're in this situation:++ work item: [W] c1 : a ~R b+ inert: [G] c2 : b ~R Id a++where+ newtype Id a = Id a++We want to make sure canEqCanLHS sees [W] a ~R a, after b is rewritten+and the Id newtype is unwrapped. This is assured by requiring only rewritten+types in canEqCanLHS *and* having the newtype-unwrapping check above+the tyvar check in can_eq_nc.++Note that this only applies to saturated applications of newtype TyCons, as+we can't rewrite an unsaturated application. See for example T22310, where+we ended up with:++ newtype Compose f g a = ...++ [W] t[tau] ~# Compose Foo Bar++Note [Put touchable variables on the left]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Ticket #10009, a very nasty example:++ f :: (UnF (F b) ~ b) => F b -> ()++ g :: forall a. (UnF (F a) ~ a) => a -> ()+ g _ = f (undefined :: F a)++For g we get [G] g1 : UnF (F a) ~ a+ [W] w1 : UnF (F beta) ~ beta+ [W] w2 : F a ~ F beta++g1 is canonical (CEqCan). It is oriented as above because a is not touchable.+See canEqTyVarFunEq.++w1 is similarly canonical, though the occurs-check in canEqTyVarFunEq is key+here.++w2 is canonical. But which way should it be oriented? As written, we'll be+stuck. When w2 is added to the inert set, nothing gets kicked out: g1 is+a Given (and Wanteds don't rewrite Givens), and w2 doesn't mention the LHS+of w2. We'll thus lose.++But if w2 is swapped around, to++ [W] w3 : F beta ~ F a++then we'll kick w1 out of the inert set (it mentions the LHS of w3). We then+rewrite w1 to++ [W] w4 : UnF (F a) ~ beta++and then, using g1, to++ [W] w5 : a ~ beta++at which point we can unify and go on to glory. (This rewriting actually+happens all at once, in the call to rewrite during canonicalisation.)++But what about the new LHS makes it better? It mentions a variable (beta)+that can appear in a Wanted -- a touchable metavariable never appears+in a Given. On the other hand, the original LHS mentioned only variables+that appear in Givens. We thus choose to put variables that can appear+in Wanteds on the left.++Ticket #12526 is another good example of this in action.++-}++---------------------+canEqCanLHS :: CtEvidence -- ev :: lhs ~ rhs+ -> EqRel -> SwapFlag+ -> CanEqLHS -- lhs (or, if swapped, rhs)+ -> TcType -- lhs: pretty lhs, already rewritten+ -> TcType -> TcType -- rhs: already rewritten+ -> TcS (StopOrContinue (Either IrredCt EqCt))+canEqCanLHS ev eq_rel swapped lhs1 ps_xi1 xi2 ps_xi2+ | k1 `tcEqType` k2+ = canEqCanLHSHomo ev eq_rel swapped lhs1 ps_xi1 xi2 ps_xi2++ | otherwise+ = canEqCanLHSHetero ev eq_rel swapped lhs1 ps_xi1 k1 xi2 ps_xi2 k2++ where+ k1 = canEqLHSKind lhs1+ k2 = typeKind xi2+++{-+Note [Kind Equality Orientation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+While in theory [W] x ~ y and [W] y ~ x ought to give us the same behaviour, in+practice it does not. See Note [Fundeps with instances, and equality+orientation] where this is discussed at length. As a rule of thumb: we keep+the newest unification variables on the left of the equality. See also+Note [Improvement orientation].++In particular, `canEqCanLHSHetero` produces the following constraint equalities++[X] (xi1 :: ki1) ~ (xi2 :: ki2)+ --> [X] kco :: ki1 ~ ki2+ [X] co : xi1 :: ki1 ~ (xi2 |> sym kco) :: ki1++Note that the types in the LHS of the new constraints are the ones that were on the LHS of+the original constraint.++--- Historical note ---+We prevously used to flip the kco to avoid using a sym in the cast++[X] (xi1 :: ki1) ~ (xi2 :: ki2)+ --> [X] kco :: ki2 ~ ki1+ [X] co : xi1 :: ki1 ~ (xi2 |> kco) :: ki1++But this sent solver in an infinite loop (see #19415).+-- End of historical note --+-}++canEqCanLHSHetero :: CtEvidence -- :: (xi1 :: ki1) ~ (xi2 :: ki2)+ -- (or reversed if SwapFlag=IsSwapped)+ -> EqRel -> SwapFlag+ -> CanEqLHS -> TcType -- xi1+ -> TcKind -- ki1+ -> TcType -> TcType -- xi2+ -> TcKind -- ki2+ -> TcS (StopOrContinue (Either IrredCt EqCt))+canEqCanLHSHetero ev eq_rel swapped lhs1 ps_xi1 ki1 xi2 ps_xi2 ki2+-- See Note [Equalities with incompatible kinds]+-- See Note [Kind Equality Orientation]++-- NB: preserve left-to-right orientation!! See wrinkle (W2) in+-- Note [Fundeps with instances, and equality orientation] in GHC.Tc.Solver.Dict+-- NotSwapped:+-- ev :: (lhs1:ki1) ~r# (xi2:ki2)+-- kind_co :: k11 ~# ki2 -- Same orientiation as ev+-- type_ev :: lhs1 ~r# (xi2 |> sym kind_co)+-- Swapped+-- ev :: (xi2:ki2) ~r# (lhs1:ki1)+-- kind_co :: ki2 ~# ki1 -- Same orientiation as ev+-- type_ev :: (xi2 |> kind_co) ~r# lhs1++ = do { (kind_co, rewriters, unifs_happened) <- mk_kind_eq -- :: ki1 ~N ki2+ ; if unifs_happened+ -- Unifications happened, so start again to do the zonking+ -- Otherwise we might put something in the inert set that isn't inert+ then startAgainWith (mkNonCanonical ev)+ else+ do { let lhs_redn = mkReflRedn role ps_xi1+ rhs_redn = mkGReflRightRedn role xi2 mb_sym_kind_co+ mb_sym_kind_co = case swapped of+ NotSwapped -> mkSymCo kind_co+ IsSwapped -> kind_co++ ; traceTcS "Hetero equality gives rise to kind equality"+ (ppr swapped $$+ ppr kind_co <+> dcolon <+> sep [ ppr ki1, text "~#", ppr ki2 ])+ ; type_ev <- rewriteEqEvidence rewriters ev swapped lhs_redn rhs_redn++ ; let new_xi2 = mkCastTy ps_xi2 mb_sym_kind_co+ ; canEqCanLHSHomo type_ev eq_rel NotSwapped lhs1 ps_xi1 new_xi2 new_xi2 }}++ where+ mk_kind_eq :: TcS (CoercionN, RewriterSet, Bool)+ -- Returned kind_co has kind (k1 ~ k2) if NotSwapped, (k2 ~ k1) if Swapped+ -- Returned Bool = True if unifications happened, so we should retry+ mk_kind_eq = case ev of+ CtGiven { ctev_evar = evar }+ -> do { let kind_co = mkKindCo (mkCoVarCo evar)+ pred_ty = unSwap swapped (mkNomPrimEqPred liftedTypeKind) ki1 ki2+ kind_loc = mkKindEqLoc xi1 xi2 (ctev_loc ev)+ ; kind_ev <- newGivenEvVar kind_loc (pred_ty, evCoercion kind_co)+ ; emitWorkNC [kind_ev]+ ; return (ctEvCoercion kind_ev, emptyRewriterSet, False) }++ CtWanted {}+ -> do { (kind_co, cts, unifs) <- wrapUnifierTcS ev Nominal $ \uenv ->+ let uenv' = updUEnvLoc uenv (mkKindEqLoc xi1 xi2)+ in unSwap swapped (uType uenv') ki1 ki2+ ; return (kind_co, rewriterSetFromCts cts, not (null unifs)) }++ xi1 = canEqLHSType lhs1+ role = eqRelRole eq_rel++canEqCanLHSHomo :: CtEvidence -- lhs ~ rhs+ -- or, if swapped: rhs ~ lhs+ -> EqRel -> SwapFlag+ -> CanEqLHS -> TcType -- lhs, pretty lhs+ -> TcType -> TcType -- rhs, pretty rhs+ -> TcS (StopOrContinue (Either IrredCt EqCt))+-- Guaranteed that typeKind lhs == typeKind rhs+canEqCanLHSHomo ev eq_rel swapped lhs1 ps_xi1 xi2 ps_xi2+ | (xi2', mco) <- split_cast_ty xi2+ , Just lhs2 <- canEqLHS_maybe xi2'+ = canEqCanLHS2 ev eq_rel swapped lhs1 ps_xi1 lhs2 (ps_xi2 `mkCastTyMCo` mkSymMCo mco) mco++ | otherwise+ = canEqCanLHSFinish ev eq_rel swapped lhs1 ps_xi2++ where+ split_cast_ty (CastTy ty co) = (ty, MCo co)+ split_cast_ty other = (other, MRefl)++-- This function deals with the case that both LHS and RHS are potential+-- CanEqLHSs.+canEqCanLHS2 :: CtEvidence -- lhs ~ (rhs |> mco)+ -- or, if swapped: (rhs |> mco) ~ lhs+ -> EqRel -> SwapFlag+ -> CanEqLHS -- lhs (or, if swapped, rhs)+ -> TcType -- pretty lhs+ -> CanEqLHS -- rhs+ -> TcType -- pretty rhs+ -> MCoercion -- :: kind(rhs) ~N kind(lhs)+ -> TcS (StopOrContinue (Either IrredCt EqCt))+canEqCanLHS2 ev eq_rel swapped lhs1 ps_xi1 lhs2 ps_xi2 mco+ | lhs1 `eqCanEqLHS` lhs2+ -- It must be the case that mco is reflexive+ = canEqReflexive ev eq_rel lhs1_ty++ | TyVarLHS tv1 <- lhs1+ , TyVarLHS tv2 <- lhs2+ = -- See Note [TyVar/TyVar orientation] in GHC.Tc.Utils.Unify+ do { traceTcS "canEqLHS2 swapOver" (ppr tv1 $$ ppr tv2 $$ ppr swapped)+ ; if swapOverTyVars (isGiven ev) tv1 tv2+ then finish_with_swapping+ else finish_without_swapping }++ | TyVarLHS {} <- lhs1+ , TyFamLHS {} <- lhs2+ = if put_tyvar_on_lhs+ then finish_without_swapping+ else finish_with_swapping++ | TyFamLHS {} <- lhs1+ , TyVarLHS {} <- lhs2+ = if put_tyvar_on_lhs+ then finish_with_swapping+ else finish_without_swapping++ | TyFamLHS fun_tc1 fun_args1 <- lhs1+ , TyFamLHS fun_tc2 fun_args2 <- lhs2+ -- See Note [Decomposing type family applications]+ = do { traceTcS "canEqCanLHS2 two type families" (ppr lhs1 $$ ppr lhs2)++ ; unifications_done <- tryFamFamInjectivity ev eq_rel+ fun_tc1 fun_args1 fun_tc2 fun_args2 mco+ ; if unifications_done+ then -- Go round again, since the unifications affect lhs/rhs+ startAgainWith (mkNonCanonical ev)+ else+ do { tclvl <- getTcLevel+ ; let tvs1 = tyCoVarsOfTypes fun_args1+ tvs2 = tyCoVarsOfTypes fun_args2++ -- See Note [Orienting TyFamLHS/TyFamLHS]+ swap_for_size = typesSize fun_args2 > typesSize fun_args1++ -- See Note [Orienting TyFamLHS/TyFamLHS]+ swap_for_rewriting = anyVarSet (isTouchableMetaTyVar tclvl) tvs2 &&+ -- See Note [Put touchable variables on the left]+ not (anyVarSet (isTouchableMetaTyVar tclvl) tvs1)+ -- This second check is just to avoid unfruitful swapping++ ; if swap_for_rewriting || swap_for_size+ then finish_with_swapping+ else finish_without_swapping } }+ where+ sym_mco = mkSymMCo mco+ role = eqRelRole eq_rel+ lhs1_ty = canEqLHSType lhs1+ lhs2_ty = canEqLHSType lhs2++ finish_without_swapping+ = canEqCanLHSFinish ev eq_rel swapped lhs1 (ps_xi2 `mkCastTyMCo` mco)++ -- Swapping. We have ev : lhs1 ~ lhs2 |> co+ -- We swap to new_ev : lhs2 ~ lhs1 |> sym co+ -- ev = grefl1 ; sym new_ev ; grefl2+ -- where grefl1 : lhs1 ~ lhs1 |> sym co+ -- grefl2 : lhs2 ~ lhs2 |> co+ finish_with_swapping+ = do { let lhs1_redn = mkGReflRightMRedn role lhs1_ty sym_mco+ lhs2_redn = mkGReflLeftMRedn role lhs2_ty mco+ ; new_ev <-rewriteEqEvidence emptyRewriterSet ev swapped lhs1_redn lhs2_redn+ ; canEqCanLHSFinish new_ev eq_rel IsSwapped lhs2 (ps_xi1 `mkCastTyMCo` sym_mco) }++ put_tyvar_on_lhs = isWanted ev && eq_rel == NomEq+ -- See Note [Orienting TyVarLHS/TyFamLHS]+ -- Same conditions as for canEqCanLHSFinish_try_unification+ -- which we are setting ourselves up for here++{- Note [Orienting TyVarLHS/TyFamLHS]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+What if one side is a TyVarLHS and the other is a TyFamLHS, (a ~ F tys)?+Which to put on the left? Answer:++* If there is no chance of unifying, put the type family on the left,+ (F tys ~ a), because it's generally better to rewrite away function+ calls. See `put_tyvar_on_lhs` in canEqCanLHS2; and+ Note [Orienting TyVarLHS/TyFamLHS]++* But if there /is/ a chance of unifying, put the tyvar on the left,+ (a ~ F tys), as this may be our only shot to unify. Again see+ `put_tyvar_on_lhs`.++* But if we /fail/ to unify then flip back to (F tys ~ a) because it's+ generally better to rewrite away function calls. See the call to+ `swapAndFinish` in `canEqCanLHSFinish_try_unification`++ It's important to flip back. Consider+ [W] F alpha ~ alpha+ [W] F alpha ~ beta+ [W] G alpha beta ~ Int ( where we have type instance G a a = a )+ If we end up with a stuck alpha ~ F alpha, we won't be able to solve this.+ Test case: indexed-types/should_compile/CEqCanOccursCheck++Note [Orienting TyFamLHS/TyFamLHS]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If we have a TyFamLHS on both sides, we choose how to orient it.++* swap_for_size. If we have+ S a ~ F (G (H (Maybe a)))+ then we swap so that we tend to rewrite the bigger type (F (G (H (Maybe a))))+ into the smaller one (S a). This same test tends to avoid occurs-check+ errors. E.g.+ S g ~ F (G (S g))+ Here (S g) occurs on the RHS, so this is not canonical. But if we swap it+ around, it /is/ canonical+ F (G (S g)) ~ S g++* swap_for_rewriting: put touchable meta-tyvars on the left:+ see Note [Put touchable variables on the left]+-}++-- The RHS here is either not CanEqLHS, or it's one that we+-- want to rewrite the LHS to (as per e.g. swapOverTyVars)+canEqCanLHSFinish, canEqCanLHSFinish_try_unification,+ canEqCanLHSFinish_no_unification+ :: CtEvidence -- (lhs ~ rhs) or if swapped (rhs ~ lhs)+ -> EqRel -> SwapFlag+ -> CanEqLHS -- lhs+ -> TcType -- rhs+ -> TcS (StopOrContinue (Either IrredCt EqCt))+ -- RHS is fully rewritten, but with type synonyms+ -- preserved as much as possible+ -- Guaranteed preconditions that+ -- (TyEq:K) handled in canEqCanLHSHomo+ -- (TyEq:N) checked in can_eq_nc+ -- (TyEq:TV) handled in canEqCanLHS2++---------------------------+canEqCanLHSFinish ev eq_rel swapped lhs rhs+ = do { traceTcS "canEqCanLHSFinish" $+ vcat [ text "ev:" <+> ppr ev+ , text "swapped:" <+> ppr swapped+ , text "lhs:" <+> ppr lhs+ , text "rhs:" <+> ppr rhs ]++ -- Assertion: (TyEq:K) is already satisfied+ ; massert (canEqLHSKind lhs `eqType` typeKind rhs)++ -- Assertion: (TyEq:N) is already satisfied (if applicable)+ ; assertPprM ty_eq_N_OK $+ vcat [ text "CanEqCanLHSFinish: (TyEq:N) not satisfied"+ , text "rhs:" <+> ppr rhs ]++ ; canEqCanLHSFinish_try_unification ev eq_rel swapped lhs rhs }++ where+ -- This is about (TyEq:N): check that we don't have a saturated application+ -- of a newtype TyCon at the top level of the RHS, if the constructor+ -- of the newtype is in scope.+ ty_eq_N_OK :: TcS Bool+ ty_eq_N_OK+ | ReprEq <- eq_rel+ , Just (tc, tc_args) <- splitTyConApp_maybe rhs+ , Just con <- newTyConDataCon_maybe tc+ -- #22310: only a problem if the newtype TyCon is saturated.+ , tc_args `lengthAtLeast` tyConArity tc+ -- #21010: only a problem if the newtype constructor is in scope.+ = do { rdr_env <- getGlobalRdrEnvTcS+ ; let con_in_scope = isJust $ lookupGRE_Name rdr_env (dataConName con)+ ; return $ not con_in_scope }+ | otherwise+ = return True++-----------------------+canEqCanLHSFinish_try_unification ev eq_rel swapped lhs rhs+ -- Try unification; for Wanted, Nominal equalities with a meta-tyvar on the LHS+ | isWanted ev -- See Note [Do not unify Givens]+ , NomEq <- eq_rel -- See Note [Do not unify representational equalities]+ , TyVarLHS tv <- lhs+ = do { given_eq_lvl <- getInnermostGivenEqLevel+ ; if not (touchabilityAndShapeTest given_eq_lvl tv rhs)+ then if | Just can_rhs <- canTyFamEqLHS_maybe rhs+ -> swapAndFinish ev eq_rel swapped (mkTyVarTy tv) can_rhs+ -- See Note [Orienting TyVarLHS/TyFamLHS]++ | otherwise+ -> canEqCanLHSFinish_no_unification ev eq_rel swapped lhs rhs+ else++ -- We have a touchable unification variable on the left+ do { check_result <- checkTouchableTyVarEq ev tv rhs+ ; case check_result of {+ PuFail reason+ | Just can_rhs <- canTyFamEqLHS_maybe rhs+ -> swapAndFinish ev eq_rel swapped (mkTyVarTy tv) can_rhs+ -- Swap back: see Note [Orienting TyVarLHS/TyFamLHS]++ | reason `cterHasOnlyProblems` do_not_prevent_rewriting+ -> canEqCanLHSFinish_no_unification ev eq_rel swapped lhs rhs++ | otherwise+ -> tryIrredInstead reason ev eq_rel swapped lhs rhs ;++ PuOK _ rhs_redn ->++ -- Success: we can solve by unification+ do { -- In the common case where rhs_redn is Refl, we don't need to rewrite+ -- the evidence, even if swapped=IsSwapped. Suppose the original was+ -- [W] co : Int ~ alpha+ -- We unify alpha := Int, and set co := <Int>. No need to+ -- swap to co = sym co'+ -- co' = <Int>+ new_ev <- if isReflCo (reductionCoercion rhs_redn)+ then return ev+ else rewriteEqEvidence emptyRewriterSet ev swapped+ (mkReflRedn Nominal (mkTyVarTy tv)) rhs_redn++ ; let tv_ty = mkTyVarTy tv+ final_rhs = reductionReducedType rhs_redn++ ; traceTcS "Sneaky unification:" $+ vcat [text "Unifies:" <+> ppr tv <+> text ":=" <+> ppr final_rhs,+ text "Coercion:" <+> pprEq tv_ty final_rhs,+ text "Left Kind is:" <+> ppr (typeKind tv_ty),+ text "Right Kind is:" <+> ppr (typeKind final_rhs) ]++ -- Update the unification variable itself+ ; unifyTyVar tv final_rhs++ -- Provide Refl evidence for the constraint+ -- Ignore 'swapped' because it's Refl!+ ; setEvBindIfWanted new_ev True $+ evCoercion (mkNomReflCo final_rhs)++ -- Kick out any constraints that can now be rewritten+ ; kickOutAfterUnification [tv]++ ; return (Stop new_ev (text "Solved by unification")) }}}}++ -- Otherwise unification is off the table+ | otherwise+ = canEqCanLHSFinish_no_unification ev eq_rel swapped lhs rhs++ where+ -- Some problems prevent /unification/ but not /rewriting/+ -- Skolem-escape: if we have [W] alpha[2] ~ Maybe b[3]+ -- we can't unify (skolem-escape); but it /is/ canonical,+ -- and hence we /can/ use it for rewriting+ -- Concrete-ness: alpha[conc] ~ b[sk]+ -- We can use it to rewrite; we still have to solve the original+ do_not_prevent_rewriting :: CheckTyEqResult+ do_not_prevent_rewriting = cteProblem cteSkolemEscape S.<>+ cteProblem cteConcrete++---------------------------+-- Unification is off the table+canEqCanLHSFinish_no_unification ev eq_rel swapped lhs rhs+ = do { -- Do checkTypeEq to guarantee (TyEq:OC), (TyEq:F)+ -- Must do the occurs check even on tyvar/tyvar equalities,+ -- in case have x ~ (y :: ..x...); this is #12593.+ ; check_result <- checkTypeEq ev eq_rel lhs rhs++ ; let lhs_ty = canEqLHSType lhs+ ; case check_result of+ PuFail reason++ -- If we had F a ~ G (F a), which gives an occurs check,+ -- then swap it to G (F a) ~ F a, which does not+ -- However `swap_for_size` above will orient it with (G (F a)) on+ -- the left anwyway, so the next four lines of code are redundant+ -- I'm leaving them here in case they become relevant again+-- | TyFamLHS {} <- lhs+-- , Just can_rhs <- canTyFamEqLHS_maybe rhs+-- , reason `cterHasOnlyProblem` cteSolubleOccurs+-- -> swapAndFinish ev eq_rel swapped lhs_ty can_rhs+-- | otherwise++ -> tryIrredInstead reason ev eq_rel swapped lhs rhs++ PuOK _ rhs_redn+ -> do { new_ev <- rewriteEqEvidence emptyRewriterSet ev swapped+ (mkReflRedn (eqRelRole eq_rel) lhs_ty)+ rhs_redn++ -- Important: even if the coercion is Refl,+ -- * new_ev has reductionReducedType on the RHS+ -- * eq_rhs is set to reductionReducedType+ -- See Note [Forgetful synonyms in checkTyConApp] in GHC.Tc.Utils.Unify+ ; continueWith $ Right $+ EqCt { eq_ev = new_ev, eq_eq_rel = eq_rel+ , eq_lhs = lhs+ , eq_rhs = reductionReducedType rhs_redn } } }++----------------------+swapAndFinish :: CtEvidence -> EqRel -> SwapFlag+ -> TcType -> CanEqLHS -- ty ~ F tys+ -> TcS (StopOrContinue (Either unused EqCt))+-- We have an equality alpha ~ F tys, that we can't unify e.g because 'tys'+-- mentions alpha, it would not be a canonical constraint as-is.+-- We want to flip it to (F tys ~ a), whereupon it is canonical+swapAndFinish ev eq_rel swapped lhs_ty can_rhs+ = do { let role = eqRelRole eq_rel+ ; new_ev <- rewriteEqEvidence emptyRewriterSet ev (flipSwap swapped)+ (mkReflRedn role (canEqLHSType can_rhs))+ (mkReflRedn role lhs_ty)+ ; continueWith $ Right $+ EqCt { eq_ev = new_ev, eq_eq_rel = eq_rel+ , eq_lhs = can_rhs, eq_rhs = lhs_ty } }++----------------------+tryIrredInstead :: CheckTyEqResult -> CtEvidence+ -> EqRel -> SwapFlag -> CanEqLHS -> TcType+ -> TcS (StopOrContinue (Either IrredCt unused))+-- We have a non-canonical equality+-- We still swap it if 'swapped' says so, so that it is oriented+-- in the direction that the error-reporting machinery+-- expects it; e.g. (m ~ t m) rather than (t m ~ m)+-- This is not very important, and only affects error reporting.+tryIrredInstead reason ev eq_rel swapped lhs rhs+ = do { traceTcS "cantMakeCanonical" (ppr reason $$ ppr lhs $$ ppr rhs)+ ; let role = eqRelRole eq_rel+ ; new_ev <- rewriteEqEvidence emptyRewriterSet ev swapped+ (mkReflRedn role (canEqLHSType lhs))+ (mkReflRedn role rhs)+ ; finishCanWithIrred (NonCanonicalReason reason) new_ev }++finishCanWithIrred :: CtIrredReason -> CtEvidence+ -> TcS (StopOrContinue (Either IrredCt a))+finishCanWithIrred reason ev+ = do { -- Abort fast if we have any insoluble Wanted constraints,+ -- and the TcS abort-if-insoluble flag is on.+ when (isInsolubleReason reason) tryEarlyAbortTcS++ ; continueWith $ Left $ IrredCt { ir_ev = ev, ir_reason = reason } }++-----------------------+-- | Solve a reflexive equality constraint+canEqReflexive :: CtEvidence -- ty ~ ty+ -> EqRel+ -> TcType -- ty+ -> TcS (StopOrContinue a) -- always Stop+canEqReflexive ev eq_rel ty+ = do { setEvBindIfWanted ev True $+ evCoercion (mkReflCo (eqRelRole eq_rel) ty)+ ; stopWith ev "Solved by reflexivity" }++{- Note [Equalities with incompatible kinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+What do we do when we have an equality++ (tv :: k1) ~ (rhs :: k2)++where k1 and k2 differ? Easy: we create a coercion that relates k1 and+k2 and use this to cast. To wit, from++ [X] (tv :: k1) ~ (rhs :: k2)++(where [X] is [G] or [W]), we go to++ [X] co :: k1 ~ k2+ [X] (tv :: k1) ~ ((rhs |> sym co) :: k1)++Wrinkles:++(EIK1) When X is W, the new type-level wanted is effectively rewritten by the+ kind-level one. We thus include the kind-level wanted in the RewriterSet+ for the type-level one. See Note [Wanteds rewrite Wanteds] in GHC.Tc.Types.Constraint.+ This is done in canEqCanLHSHetero.++(EIK2) Suppose we have [W] (a::Type) ~ (b::Type->Type). The above rewrite will produce+ [W] w : a ~ (b |> kw)+ [W] kw : Type ~ (Type->Type)++ But we do /not/ want to regard `w` as canonical, and use it for rewriting+ other constraints: `kw` is insoluble, and replacing something of kind+ `Type` with something of kind `Type->Type` (even wrapped in an insouluble+ cast) does not help, and doing so turns out to lead to much worse error+ messages. (In particular, if 'a' is a unification variable, we might+ unify, losing the tracking info that it depends on solving `kw`.)++ Conclusion: if a RHS contains a corecion hole arising from fixing a hetero-kinded+ equality, treat the equality (`w` in this case) as non-canonical, so that+ * It will not be used for unification+ * It will not be used for rewriting+ Instead, it lands in the inert_irreds in the inert set, awaiting solution of+ that `kw`.++ (EIK2a) We must later indeed unify if/when the kind-level wanted, `kw` gets+ solved. This is done in kickOutAfterFillingCoercionHole, which kicks out+ all equalities whose RHS mentions the filled-in coercion hole. Note that+ it looks for type family equalities, too, because of the use of unifyTest+ in canEqTyVarFunEq.++ (EIK2b) What if the RHS mentions /other/ coercion holes? How can that happen? The+ main way is like this. Assume F :: forall k. k -> Type+ [W] kw : k ~ Type+ [W] w : a ~ F k t+ We can rewrite `w` with `kw` like this:+ [W] w' : a ~ F Type (t |> kw)+ The cast on the second argument of `F` is necessary to keep the appliation well-kinded.+ There is nothing special here; no reason not treat w' as canonical, and use it for+ rewriting. Indeed tests JuanLopez only typechecks if we do. So we'd like to treat+ this kind of equality as canonical.++ Hence the ch_hetero_kind field in CoercionHole: it is True of constraints+ created by `canEqCanLHSHetero` to fix up hetero-kinded equalities; and False otherwise:++ * An equality constraint is non-canonical if it mentions a hetero-kind+ CoercionHole on the RHS. See the `hasCoercionHoleCo` test in GHC.Tc.Utils.checkCo.++ * Hetero-kind CoercionHoles are created when the parent's CtOrigin is+ KindEqOrigin: see GHC.Tc.Utils.TcMType.newCoercionHole and friends. We+ set this origin, via `mkKindLoc`, in `mk_kind_eq` in `canEqCanLHSHetero`.++(EIK3) Suppose we have [W] (a :: k1) ~ (rhs :: k2). We duly follow the+ algorithm detailed here, producing [W] co :: k1 ~ k2, and adding+ [W] (a :: k1) ~ ((rhs |> sym co) :: k1) to the irreducibles. Some time+ later, we solve co, and fill in co's coercion hole. This kicks out+ the irreducible as described in (2).++ But now, during canonicalization, we see the cast and remove it, in+ canEqCast. By the time we get into canEqCanLHS, the equality is+ heterogeneous again, and the process repeats.++ To avoid this, we don't strip casts off a type if the other type in the+ equality is a CanEqLHS (the scenario above can happen with a type+ family, too. testcase: typecheck/should_compile/T13822).++ And this is an improvement regardless: because tyvars can, generally,+ unify with casted types, there's no reason to go through the work of+ stripping off the cast when the cast appears opposite a tyvar. This is+ implemented in the cast case of can_eq_nc.++Historical note:++We used to do this via emitting a Derived kind equality and then parking+the heterogeneous equality as irreducible. But this new approach is much+more direct. And it doesn't produce duplicate Deriveds (as the old one did).++Note [Type synonyms and canonicalization]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We treat type synonym applications as xi types, that is, they do not+count as type function applications. However, we do need to be a bit+careful with type synonyms: like type functions they may not be+generative or injective. However, unlike type functions, they are+parametric, so there is no problem in expanding them whenever we see+them, since we do not need to know anything about their arguments in+order to expand them; this is what justifies not having to treat them+as specially as type function applications. The thing that causes+some subtleties is that we prefer to leave type synonym applications+*unexpanded* whenever possible, in order to generate better error+messages.++If we encounter an equality constraint with type synonym applications+on both sides, or a type synonym application on one side and some sort+of type application on the other, we simply must expand out the type+synonyms in order to continue decomposing the equality constraint into+primitive equality constraints. For example, suppose we have++ type F a = [Int]++and we encounter the equality++ F a ~ [b]++In order to continue we must expand F a into [Int], giving us the+equality++ [Int] ~ [b]++which we can then decompose into the more primitive equality+constraint++ Int ~ b.++However, if we encounter an equality constraint with a type synonym+application on one side and a variable on the other side, we should+NOT (necessarily) expand the type synonym, since for the purpose of+good error messages we want to leave type synonyms unexpanded as much+as possible. Hence the ps_xi1, ps_xi2 argument passed to canEqCanLHS.++Note [Type equality cycles]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider this situation (from indexed-types/should_compile/GivenLoop):++ instance C (Maybe b)+ *[G] a ~ Maybe (F a)+ [W] C a++or (typecheck/should_compile/T19682b):++ instance C (a -> b)+ *[W] alpha ~ (Arg alpha -> Res alpha)+ [W] C alpha++or (typecheck/should_compile/T21515):++ type family Code a+ *[G] Code a ~ '[ '[ Head (Head (Code a)) ] ]+ [W] Code a ~ '[ '[ alpha ] ]++In order to solve the final Wanted, we must use the starred constraint+for rewriting. But note that all starred constraints have occurs-check failures,+and so we can't straightforwardly add these to the inert set and+use them for rewriting. (NB: A rigid type constructor is at the+top of all RHSs, preventing reorienting in canEqTyVarFunEq in the tyvar+cases.)++The key idea is to replace the outermost type family applications in the RHS of+the starred constraints with a fresh variable, which we'll call a cycle-breaker+variable, or cbv. Then, relate the cbv back with the original type family+application via new equality constraints. Our situations thus become:++ instance C (Maybe b)+ [G] a ~ Maybe cbv+ [G] F a ~ cbv+ [W] C a++or++ instance C (a -> b)+ [W] alpha ~ (cbv1 -> cbv2)+ [W] Arg alpha ~ cbv1+ [W] Res alpha ~ cbv2+ [W] C alpha++or++ [G] Code a ~ '[ '[ cbv ] ]+ [G] Head (Head (Code a)) ~ cbv+ [W] Code a ~ '[ '[ alpha ] ]++This transformation (creating the new types and emitting new equality+constraints) is done by the `FamAppBreaker` field of `TEFA_Break`, which+in turn lives in the `tef_fam_app` field of `TyEqFlags`. And that in+turn controls the behaviour of the workhorse: GHC.Tc.Utils.Unify.checkTyEqRhs.++The details depend on whether we're working with a Given or a Wanted.++Given+-----+We emit a new Given, [G] F a ~ cbv, equating the type family application+to our new cbv. This is actually done by `break_given` in+`GHC.Tc.Solver.Monad.checkTypeEq`.++Note its orientation: The type family ends up on the left; see+Note [Orienting TyFamLHS/TyFamLHS]d. No special treatment for+CycleBreakerTvs is necessary. This scenario is now easily soluble, by using+the first Given to rewrite the Wanted, which can now be solved.++(The first Given actually also rewrites the second one, giving+[G] F (Maybe cbv) ~ cbv, but this causes no trouble.)++Of course, we don't want our fresh variables leaking into e.g. error+messages. So we fill in the metavariables with their original type family+applications after we're done running the solver (in nestImplicTcS and+runTcSWithEvBinds). This is done by `restoreTyVarCycles`, which uses the+`inert_cycle_breakers` field in InertSet, which contains the pairings+invented in `break_given`.++That is, we transform+ [G] g : lhs ~ ...(F lhs)...+to+ [G] (Refl lhs) : F lhs ~ cbv -- CEqCan+ [G] g : lhs ~ ...cbv... -- CEqCan++Note that+* `cbv` is a fresh cycle breaker variable.+* `cbv` is a is a meta-tyvar, but it is completely untouchable.+* We track the cycle-breaker variables in inert_cycle_breakers in InertSet+* We eventually fill in the cycle-breakers, with `cbv := F lhs`.+ No one else fills in CycleBreakerTvs!+* The evidence for the new `F lhs ~ cbv` constraint is Refl, because we know+ this fill-in is ultimately going to happen.+* In `inert_cycle_breakers`, we remember the (cbv, F lhs) pair; that is, we+ remember the /original/ type. The [G] F lhs ~ cbv constraint may be rewritten+ by other givens (eg if we have another [G] lhs ~ (b,c)), but at the end we+ still fill in with cbv := F lhs+* This fill-in is done when solving is complete, by restoreTyVarCycles+ in nestImplicTcS and runTcSWithEvBinds.++Wanted+------+First, we do not cycle-break unless the LHS is a unifiable type variable+See Note [Don't cycle-break Wanteds when not unifying] in GHC.Tc.Solver.Monad.++OK, so suppose the LHS is a unifiable type variable. The fresh cycle-breaker+variables here must actually be normal, touchable metavariables. That is, they+are TauTvs. Nothing at all unusual. Repeating the example from above, we have++ *[W] alpha ~ (Arg alpha -> Res alpha)++and we turn this into++ *[W] alpha ~ (cbv1 -> cbv2)+ [W] Arg alpha ~ cbv1+ [W] Res alpha ~ cbv2++where cbv1 and cbv2 are fresh TauTvs. This is actually done by `break_wanted`+in `GHC.Tc.Solver.Monad.checkTouchableTyVarEq`.++Why TauTvs? See [Why TauTvs] below.++Critically, we emit the two new constraints (the last two above)+directly instead of calling wrapUnifierTcS. (Otherwise, we'd end up+unifying cbv1 and cbv2 immediately, achieving nothing.) Next, we+unify alpha := cbv1 -> cbv2, having eliminated the occurs check. This+unification happens immediately following a successful call to+checkTouchableTyVarEq, in canEqCanLHSFinish_try_unification.++Now, we're here (including further context from our original example,+from the top of the Note):++ instance C (a -> b)+ [W] Arg (cbv1 -> cbv2) ~ cbv1+ [W] Res (cbv1 -> cbv2) ~ cbv2+ [W] C (cbv1 -> cbv2)++The first two W constraints reduce to reflexivity and are discarded,+and the last is easily soluble.++[Why TauTvs]:+Let's look at another example (typecheck/should_compile/T19682) where we need+to unify the cbvs:++ class (AllEqF xs ys, SameShapeAs xs ys) => AllEq xs ys+ instance (AllEqF xs ys, SameShapeAs xs ys) => AllEq xs ys++ type family SameShapeAs xs ys :: Constraint where+ SameShapeAs '[] ys = (ys ~ '[])+ SameShapeAs (x : xs) ys = (ys ~ (Head ys : Tail ys))++ type family AllEqF xs ys :: Constraint where+ AllEqF '[] '[] = ()+ AllEqF (x : xs) (y : ys) = (x ~ y, AllEq xs ys)++ [W] alpha ~ (Head alpha : Tail alpha)+ [W] AllEqF '[Bool] alpha++Without the logic detailed in this Note, we're stuck here, as AllEqF cannot+reduce and alpha cannot unify. Let's instead apply our cycle-breaker approach,+just as described above. We thus invent cbv1 and cbv2 and unify+alpha := cbv1 -> cbv2, yielding (after zonking)++ [W] Head (cbv1 : cbv2) ~ cbv1+ [W] Tail (cbv1 : cbv2) ~ cbv2+ [W] AllEqF '[Bool] (cbv1 : cbv2)++The first two W constraints simplify to reflexivity and are discarded.+But the last reduces:++ [W] Bool ~ cbv1+ [W] AllEq '[] cbv2++The first of these is solved by unification: cbv1 := Bool. The second+is solved by the instance for AllEq to become++ [W] AllEqF '[] cbv2+ [W] SameShapeAs '[] cbv2++While the first of these is stuck, the second makes progress, to lead to++ [W] AllEqF '[] cbv2+ [W] cbv2 ~ '[]++This second constraint is solved by unification: cbv2 := '[]. We now+have++ [W] AllEqF '[] '[]++which reduces to++ [W] ()++which is trivially satisfiable. Hooray!++Note that we need to unify the cbvs here; if we did not, there would be+no way to solve those constraints. That's why the cycle-breakers are+ordinary TauTvs.++How all this is implemented+---------------------------+We implement all this via the `TEFA_Break` constructor of `TyEqFamApp`,+itself stored in the `tef_fam_app` field of `TyEqFlags`, which controls+the behaviour of `GHC.Tc.Utils.Unify.checkTyEqRhs`. The `TEFA_Break`+stuff happens when `checkTyEqRhs` encounters a family application.++We try the cycle-breaking trick:+* For Wanteds, when there is a touchable unification variable on the left+* For Givens, regardless of the LHS++EXCEPT that, in both cases, as `GHC.Tc.Solver.Monad.mkTEFA_Break` shows, we+don't use this trick:++* When the constraint we are looking at was itself created by cycle-breaking;+ see Detail (7) below.++* For representational equalities, as there is no concrete use case where it is+ helpful (unlike for nominal equalities).++ Furthermore, because function applications can be CanEqLHSs, but newtype+ applications cannot, the disparities between the cases are enough that it+ would be effortful to expand the idea to representational equalities. A quick+ attempt, with+ data family N a b+ f :: (Coercible a (N a b), Coercible (N a b) b) => a -> b+ f = coerce+ failed with "Could not match 'b' with 'b'." Further work is held off+ until when we have a concrete incentive to explore this dark corner.++More details:++ (1) We don't look under foralls, at all, in `checkTyEqRhs`. There might be+ a cyclic occurrence underneath, in a case like+ [G] lhs ~ forall b. ... lhs ....+ but it doesn't matter because we will classify the constraint as Irred,+ so it will not be used for rewriting.++ Earlier versions required an extra, post-breaking, check. Skipping this+ check causes typecheck/should_fail/GivenForallLoop and polykinds/T18451 to+ loop. But now it is all simpler, with no need for a second check.++ (2) Historical Note: our goal here is to avoid loops in rewriting. We can thus+ skip looking in coercions, as we don't rewrite in coercions in the+ algorithm in GHC.Solver.Rewrite. This doesn't seem relevant any more.+ We cycle break to make the constraint canonical.++ (3) As we cycle-break as described in this Note, we can build ill-kinded+ types. For example, if we have Proxy (F a) b, where (b :: F a), then+ replacing this with Proxy cbv b is ill-kinded. However, we will later+ set cbv := F a, and so the zonked type will be well-kinded again.+ The temporary ill-kinded type hurts no one, and avoiding this would+ be quite painfully difficult.++ Specifically, this detail does not contravene the Purely Kinded Type Invariant+ (Note [The Purely Kinded Type Invariant (PKTI)] in GHC.Tc.Gen.HsType).+ The PKTI says that we can call typeKind on any type, without failure.+ It would be violated if we, say, replaced a kind (a -> b) with a kind c,+ because an arrow kind might be consulted in piResultTys. Here, we are+ replacing one opaque type like (F a b c) with another, cbv (opaque in+ that we never assume anything about its structure, like that it has a+ result type or a RuntimeRep argument).++ (4) The evidence for the produced Givens is all just reflexive, because we+ will eventually set the cycle-breaker variable to be the type family, and+ then, after the zonk, all will be well. See also the notes at the end of+ the Given section of this Note.++ (5) The implementation in `checkTyEqRhs` is efficient because it only replaces+ a type family application with a type variable, if that particular+ appplication is implicated in the occurs check. For example:+ [W] alpha ~ Maybe (F alpha, G beta)+ We'll end up calling GHC.Tc.Utils.Unify.checkFamApp+ * On `F alpha`, which fail and calls the cycle-breaker in TEFA_Break+ * On `G beta`, which succeeds no problem.++ However, we make no attempt to detect cases like a ~ (F a, F a) and use the+ same tyvar to replace F a. The constraint solver will common them up later!+ (Cf. Note [Flattening type-family applications when matching instances] in+ GHC.Core.Unify, which goes to this extra effort.) However, this is really+ a very small corner case. The investment to craft a clever, performant+ solution seems unworthwhile.++ (6) We often get the predicate associated with a constraint from its evidence+ with ctPred. We thus must not only make sure the generated CEqCan's fields+ have the updated RHS type (that is, the one produced by replacing type+ family applications with fresh variables), but we must also update the+ evidence itself. This is done by the call to rewriteEqEvidence in+ canEqCanLHSFinish.++ (7) We don't wish to apply this magic on the equalities created+ by this very same process. Consider this, from+ typecheck/should_compile/ContextStack2:++ type instance TF (a, b) = (TF a, TF b)+ t :: (a ~ TF (a, Int)) => ...++ [G] a ~ TF (a, Int)++ The RHS reduces, so we get++ [G] a ~ (TF a, TF Int)++ We then break cycles, to get++ [G] g1 :: a ~ (cbv1, cbv2)+ [G] g2 :: TF a ~ cbv1+ [G] g3 :: TF Int ~ cbv2++ g1 gets added to the inert set, as written. But then g2 becomes+ the work item. g1 rewrites g2 to become++ [G] TF (cbv1, cbv2) ~ cbv1++ which then uses the type instance to become++ [G] (TF cbv1, TF cbv2) ~ cbv1++ which looks remarkably like the Given we started with. If left unchecked,+ this will end up breaking cycles again, looping ad infinitum (and+ resulting in a context-stack reduction error, not an outright loop). The+ solution is easy: don't break cycles on an equality generated by breaking+ cycles. Instead, we mark this final Given as a CIrredCan with a+ NonCanonicalReason with the soluble occurs-check bit set (only).++ We track these equalities by giving them a special CtOrigin,+ CycleBreakerOrigin. This works for both Givens and Wanteds, as we need the+ logic in the W case for e.g. typecheck/should_fail/T17139. Because this+ logic needs to work for Wanteds, too, we cannot simply look for a+ CycleBreakerTv on the left: Wanteds don't use them.+++**********************************************************************+* *+ Rewriting evidence+* *+**********************************************************************+-}++rewriteEqEvidence :: RewriterSet -- New rewriters+ -- See GHC.Tc.Types.Constraint+ -- Note [Wanteds rewrite Wanteds]+ -> CtEvidence -- Old evidence :: olhs ~ orhs (not swapped)+ -- or orhs ~ olhs (swapped)+ -> SwapFlag+ -> Reduction -- lhs_co :: olhs ~ nlhs+ -> Reduction -- rhs_co :: orhs ~ nrhs+ -> TcS CtEvidence -- Of type nlhs ~ nrhs+-- With reductions (Reduction lhs_co nlhs) (Reduction rhs_co nrhs),+-- rewriteEqEvidence yields, for a given equality (Given g olhs orhs):+-- If not swapped+-- g1 : nlhs ~ nrhs = sym lhs_co ; g ; rhs_co+-- If swapped+-- g1 : nlhs ~ nrhs = sym lhs_co ; Sym g ; rhs_co+--+-- For a wanted equality (Wanted w), we do the dual thing:+-- New w1 : nlhs ~ nrhs+-- If not swapped+-- w : olhs ~ orhs = lhs_co ; w1 ; sym rhs_co+-- If swapped+-- w : orhs ~ olhs = rhs_co ; sym w1 ; sym lhs_co+--+-- It's all a form of rewriteEvidence, specialised for equalities+rewriteEqEvidence new_rewriters old_ev swapped (Reduction lhs_co nlhs) (Reduction rhs_co nrhs)+ | NotSwapped <- swapped+ , isReflCo lhs_co -- See Note [Rewriting with Refl]+ , isReflCo rhs_co+ = return (setCtEvPredType old_ev new_pred)++ | CtGiven { ctev_evar = old_evar } <- old_ev+ = do { let new_tm = evCoercion ( mkSymCo lhs_co+ `mkTransCo` maybeSymCo swapped (mkCoVarCo old_evar)+ `mkTransCo` rhs_co)+ ; newGivenEvVar loc (new_pred, new_tm) }++ | CtWanted { ctev_dest = dest+ , ctev_rewriters = rewriters } <- old_ev+ , let rewriters' = rewriters S.<> new_rewriters+ = do { (new_ev, hole_co) <- newWantedEq loc rewriters' (ctEvRole old_ev) nlhs nrhs+ ; let co = maybeSymCo swapped $+ lhs_co `mkTransCo` hole_co `mkTransCo` mkSymCo rhs_co+ ; setWantedEq dest co+ ; traceTcS "rewriteEqEvidence" (vcat [ ppr old_ev+ , ppr nlhs+ , ppr nrhs+ , ppr co+ , ppr new_rewriters ])+ ; return new_ev }++#if __GLASGOW_HASKELL__ <= 810+ | otherwise+ = panic "rewriteEvidence"+#endif+ where+ new_pred = mkTcEqPredLikeEv old_ev nlhs nrhs+ loc = ctEvLoc old_ev++{-+**********************************************************************+* *+ tryInertEqs+* *+**********************************************************************++Note [Combining equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have+ Inert: g1 :: a ~ t+ Work item: g2 :: a ~ t++Then we can simply solve g2 from g1, thus g2 := g1. Easy!+But it's not so simple:++* If t is a type variable, the equalties might be oriented differently:+ e.g. (g1 :: a~b) and (g2 :: b~a)+ So we look both ways round. Hence the SwapFlag result to+ inertsCanDischarge.++* We can only do g2 := g1 if g1 can discharge g2; that depends on+ (a) the role and (b) the flavour. E.g. a representational equality+ cannot discharge a nominal one; a Wanted cannot discharge a Given.+ The predicate is eqCanRewriteFR.++* Visibility. Suppose S :: forall k. k -> Type, and consider unifying+ S @Type (a::Type) ~ S @(Type->Type) (b::Type->Type)+ From the first argument we get (Type ~ Type->Type); from the second+ argument we get (a ~ b) which in turn gives (Type ~ Type->Type).+ See typecheck/should_fail/T16204c.++ That first argument is invisible in the source program (aside from+ visible type application), so we'd much prefer to get the error from+ the second. We track visibility in the uo_visible field of a TypeEqOrigin.+ We use this to prioritise visible errors (see GHC.Tc.Errors.tryReporters,+ the partition on isVisibleOrigin).++ So when combining two otherwise-identical equalites, we want to+ keep the visible one, and discharge the invisible one. Hence the+ call to strictly_more_visible.+-}++tryInertEqs :: EqCt -> SolverStage ()+tryInertEqs work_item@(EqCt { eq_ev = ev, eq_eq_rel = eq_rel })+ = Stage $+ do { inerts <- getInertCans+ ; if | Just (ev_i, swapped) <- inertsCanDischarge inerts work_item+ -> do { setEvBindIfWanted ev True $+ evCoercion (maybeSymCo swapped $+ downgradeRole (eqRelRole eq_rel)+ (ctEvRole ev_i)+ (ctEvCoercion ev_i))+ ; stopWith ev "Solved from inert" }++ | otherwise+ -> continueWith () }++inertsCanDischarge :: InertCans -> EqCt+ -> Maybe ( CtEvidence -- The evidence for the inert+ , SwapFlag ) -- Whether we need mkSymCo+inertsCanDischarge inerts (EqCt { eq_lhs = lhs_w, eq_rhs = rhs_w+ , eq_ev = ev_w, eq_eq_rel = eq_rel })+ | (ev_i : _) <- [ ev_i | EqCt { eq_ev = ev_i, eq_rhs = rhs_i+ , eq_eq_rel = eq_rel }+ <- findEq inerts lhs_w+ , rhs_i `tcEqType` rhs_w+ , inert_beats_wanted ev_i eq_rel ]+ = -- Inert: a ~ ty+ -- Work item: a ~ ty+ Just (ev_i, NotSwapped)++ | Just rhs_lhs <- canEqLHS_maybe rhs_w+ , (ev_i : _) <- [ ev_i | EqCt { eq_ev = ev_i, eq_rhs = rhs_i+ , eq_eq_rel = eq_rel }+ <- findEq inerts rhs_lhs+ , rhs_i `tcEqType` canEqLHSType lhs_w+ , inert_beats_wanted ev_i eq_rel ]+ = -- Inert: a ~ b+ -- Work item: b ~ a+ Just (ev_i, IsSwapped)++ where+ loc_w = ctEvLoc ev_w+ flav_w = ctEvFlavour ev_w+ fr_w = (flav_w, eq_rel)++ inert_beats_wanted ev_i eq_rel+ = -- eqCanRewriteFR: see second bullet of Note [Combining equalities]+ -- strictly_more_visible: see last bullet of Note [Combining equalities]+ fr_i `eqCanRewriteFR` fr_w+ && not ((loc_w `strictly_more_visible` ctEvLoc ev_i)+ && (fr_w `eqCanRewriteFR` fr_i))+ where+ fr_i = (ctEvFlavour ev_i, eq_rel)++ -- See Note [Combining equalities], final bullet+ strictly_more_visible loc1 loc2+ = not (isVisibleOrigin (ctLocOrigin loc2)) &&+ isVisibleOrigin (ctLocOrigin loc1)++inertsCanDischarge _ _ = Nothing++++{- Note [Do not unify Givens]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider this GADT match+ data T a where+ T1 :: T Int+ ...++ f x = case x of+ T1 -> True+ ...++So we get f :: T alpha[1] -> beta[1]+ x :: T alpha[1]+and from the T1 branch we get the implication+ forall[2] (alpha[1] ~ Int) => beta[1] ~ Bool++Now, clearly we don't want to unify alpha:=Int! Yet at the moment we+process [G] alpha[1] ~ Int, we don't have any given-equalities in the+inert set, and hence there are no given equalities to make alpha untouchable.++NB: if it were alpha[2] ~ Int, this argument wouldn't hold. But that+never happens: invariant (GivenInv) in Note [TcLevel invariants]+in GHC.Tc.Utils.TcType.++Simple solution: never unify in Givens!++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 #15144, which was caused by unifying a representational+equality.++Note [Solve by unification]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+If we solve+ alpha[n] ~ ty+by unification, there are two cases to consider++* TouchableSameLevel: if the ambient level is 'n', then+ we can simply update alpha := ty, and do nothing else++* TouchableOuterLevel free_metas n: if the ambient level is greater than+ 'n' (the level of alpha), in addition to setting alpha := ty we must+ do two other things:++ 1. Promote all the free meta-vars of 'ty' to level n. After all,+ alpha[n] is at level n, and so if we set, say,+ alpha[n] := Maybe beta[m],+ we must ensure that when unifying beta we do skolem-escape checks+ etc relevant to level n. Simple way to do that: promote beta to+ level n.++ 2. Set the Unification Level Flag to record that a level-n unification has+ taken place. See Note [The Unification Level Flag] in GHC.Tc.Solver.Monad++NB: TouchableSameLevel is just an optimisation for TouchableOuterLevel. Promotion+would be a no-op, and setting the unification flag unnecessarily would just+make the solver iterate more often. (We don't need to iterate when unifying+at the ambient level because of the kick-out mechanism.)+-}+++{-********************************************************************+* *+ Final wrap-up for equalities+* *+********************************************************************-}++{- Note [Looking up primitive equalities in quantified constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+For equalities (a ~# b) look up (a ~ b), and then do a superclass+selection. This avoids having to support quantified constraints whose+kind is not Constraint, such as (forall a. F a ~# b)++See+ * Note [Evidence for quantified constraints] in GHC.Core.Predicate+ * Note [Equality superclasses in quantified constraints]+ in GHC.Tc.Solver.Dict+-}++--------------------+tryQCsIrredEqCt :: IrredCt -> SolverStage ()+tryQCsIrredEqCt irred@(IrredCt { ir_ev = ev })+ | EqPred eq_rel t1 t2 <- classifyPredType (ctEvPred ev)+ = lookup_eq_in_qcis (CIrredCan irred) eq_rel t1 t2++ | otherwise -- All the calls come from in this module, where we deal only with+ -- equalities, so ctEvPred ev) must be an equality. Indeed, we could+ -- pass eq_rel, t1, t2 as arguments, to avoid this can't-happen case,+ -- but it's not a hot path, and this is simple and robust+ = pprPanic "solveIrredEquality" (ppr ev)++--------------------+tryQCsEqCt :: EqCt -> SolverStage ()+tryQCsEqCt work_item@(EqCt { eq_lhs = lhs, eq_rhs = rhs, eq_eq_rel = eq_rel })+ = lookup_eq_in_qcis (CEqCan work_item) eq_rel (canEqLHSType lhs) rhs++--------------------+lookup_eq_in_qcis :: Ct -> EqRel -> TcType -> TcType -> SolverStage ()+-- The "final QCI check" checks to see if we have+-- [W] t1 ~# t2+-- and a Given quantified contraint like (forall a b. blah => a ~ b)+-- Why? See Note [Looking up primitive equalities in quantified constraints]+-- See also GHC.Tc.Solver.Dict+-- Note [Equality superclasses in quantified constraints]+lookup_eq_in_qcis work_ct eq_rel lhs rhs+ = Stage $+ do { ev_binds_var <- getTcEvBindsVar+ ; ics <- getInertCans+ ; if isWanted ev -- Never look up Givens in quantified constraints+ && not (null (inert_insts ics)) -- Shortcut common case+ && not (isCoEvBindsVar ev_binds_var) -- See Note [Instances in no-evidence implications]+ then try_for_qci+ else continueWith () }+ where+ ev = ctEvidence work_ct+ loc = ctEvLoc ev+ role = eqRelRole eq_rel++ try_for_qci -- First try looking for (lhs ~ rhs)+ | Just (cls, tys) <- boxEqPred eq_rel lhs rhs+ = do { res <- matchLocalInst (mkClassPred cls tys) loc+ ; traceTcS "lookup_irred_in_qcis:1" (ppr (mkClassPred cls tys))+ ; case res of+ OneInst { cir_mk_ev = mk_ev }+ -> chooseInstance ev (res { cir_mk_ev = mk_eq_ev cls tys mk_ev })+ _ -> try_swapping }+ | otherwise+ = continueWith ()++ try_swapping -- Now try looking for (rhs ~ lhs) (see #23333)+ | Just (cls, tys) <- boxEqPred eq_rel rhs lhs+ = do { res <- matchLocalInst (mkClassPred cls tys) loc+ ; traceTcS "lookup_irred_in_qcis:2" (ppr (mkClassPred cls tys))+ ; case res of+ OneInst { cir_mk_ev = mk_ev }+ -> do { ev' <- rewriteEqEvidence emptyRewriterSet ev IsSwapped+ (mkReflRedn role rhs) (mkReflRedn role lhs)+ ; chooseInstance ev' (res { cir_mk_ev = mk_eq_ev cls tys mk_ev }) }+ _ -> do { traceTcS "lookup_irred_in_qcis:3" (ppr work_ct)+ ; continueWith () }}+ | otherwise+ = continueWith ()++ mk_eq_ev cls tys mk_ev evs+ | sc_id : rest <- classSCSelIds cls -- Just one superclass for this+ = assert (null rest) $ case (mk_ev evs) of+ EvExpr e -> EvExpr (Var sc_id `mkTyApps` tys `App` e)+ ev -> pprPanic "mk_eq_ev" (ppr ev)+ | otherwise = pprPanic "finishEqCt" (ppr work_ct)++{- Note [Instances in no-evidence implications]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In #15290 we had+ [G] forall p q. Coercible p q => Coercible (m p) (m q)) -- Quantified+ [W] forall <no-ev> a. m (Int, IntStateT m a)+ ~R#+ m (Int, StateT Int m a)++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.+-}+++{-+**********************************************************************+* *+ Functional dependencies for type families+* *+**********************************************************************++Note [Reverse order of fundep equations]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider this scenario (from dependent/should_fail/T13135_simple):++ type Sig :: Type -> Type+ data Sig a = SigFun a (Sig a)++ type SmartFun :: forall (t :: Type). Sig t -> Type+ type family SmartFun sig = r | r -> sig where+ SmartFun @Type (SigFun @Type a sig) = a -> SmartFun @Type sig++ [W] SmartFun @kappa sigma ~ (Int -> Bool)++The injectivity of SmartFun allows us to produce two new equalities:++ [W] w1 :: Type ~ kappa+ [W] w2 :: SigFun @Type Int beta ~ sigma++for some fresh (beta :: SigType). The second Wanted here is actually+heterogeneous: the LHS has type Sig Type while the RHS has type Sig kappa.+Of course, if we solve the first wanted first, the second becomes homogeneous.++When looking for injectivity-inspired equalities, we work left-to-right,+producing the two equalities in the order written above. However, these+equalities are then passed into wrapUnifierTcS, which will fail, adding these+to the work list. However, crucially, the work list operates like a *stack*.+So, because we add w1 and then w2, we process w2 first. This is silly: solving+w1 would unlock w2. So we make sure to add equalities to the work+list in left-to-right order, which requires a few key calls to 'reverse'.++This treatment is also used for class-based functional dependencies, although+we do not have a program yet known to exhibit a loop there. It just seems+like the right thing to do.++When this was originally conceived, it was necessary to avoid a loop in T13135.+That loop is now avoided by continuing with the kind equality (not the type+equality) in canEqCanLHSHetero (see Note [Equalities with incompatible kinds]).+However, the idea of working left-to-right still seems worthwhile, and so the calls+to 'reverse' remain.++Note [Improvement orientation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+See also Note [Fundeps with instances, and equality orientation], which describes+the Exact Same Problem, with the same solution, but for functional dependencies.++A very delicate point is the orientation of equalities+arising from injectivity improvement (#12522). Suppose we have+ type family F x = t | t -> x+ type instance F (a, Int) = (Int, G a)+where G is injective; and wanted constraints++ [W] TF (alpha, beta) ~ fuv+ [W] fuv ~ (Int, <some type>)++The injectivity will give rise to constraints++ [W] gamma1 ~ alpha+ [W] Int ~ beta++The fresh unification variable gamma1 comes from the fact that we+can only do "partial improvement" here; see Section 5.2 of+"Injective type families for Haskell" (HS'15).++Now, it's very important to orient the equations this way round,+so that the fresh unification variable will be eliminated in+favour of alpha. If we instead had+ [W] alpha ~ gamma1+then we would unify alpha := gamma1; and kick out the wanted+constraint. But when we grough it back in, it'd look like+ [W] TF (gamma1, beta) ~ fuv+and exactly the same thing would happen again! Infinite loop.++This all seems fragile, and it might seem more robust to avoid+introducing gamma1 in the first place, in the case where the+actual argument (alpha, beta) partly matches the improvement+template. But that's a bit tricky, esp when we remember that the+kinds much match too; so it's easier to let the normal machinery+handle it. Instead we are careful to orient the new+equality with the template on the left. Delicate, but it works.++-}++tryFamFamInjectivity :: CtEvidence -> EqRel+ -> TyCon -> [TcType] -> TyCon -> [TcType] -> MCoercion+ -> TcS Bool -- True <=> some unification happened+tryFamFamInjectivity ev eq_rel fun_tc1 fun_args1 fun_tc2 fun_args2 mco+ | ReprEq <- eq_rel+ = return False -- Injectivity applies only for Nominal equalities+ | fun_tc1 /= fun_tc2+ = return False -- If the families don't match, stop.+ | isGiven ev+ = return False -- See Note [No Given/Given fundeps] in GHC.Tc.Solver.Dict++ -- So this is a [W] (F tys1 ~N# F tys2)++ -- Is F an injective type family+ | Injective inj <- tyConInjectivityInfo fun_tc1+ = unifyFunDeps ev Nominal $ \uenv ->+ uPairsTcM uenv [ Pair ty1 ty2+ | (ty1,ty2,True) <- zip3 fun_args1 fun_args2 inj ]++ -- Built-in synonym families don't have an entry point for this+ -- use case. So, we just use sfInteractInert and pass two equal+ -- RHSs. We *could* add another entry point, but then there would+ -- be a burden to make sure the new entry point and existing ones+ -- were internally consistent. This is slightly distasteful, but+ -- it works well in practice and localises the problem. Ugh.+ | Just ops <- isBuiltInSynFamTyCon_maybe fun_tc1+ = let tc_kind = tyConKind fun_tc1+ ki1 = piResultTys tc_kind fun_args1+ ki2 | MRefl <- mco+ = ki1 -- just a small optimisation+ | otherwise+ = piResultTys tc_kind fun_args2++ fake_rhs1 = anyTypeOfKind ki1+ fake_rhs2 = anyTypeOfKind ki2++ eqs :: [TypeEqn]+ eqs = sfInteractInert ops fun_args1 fake_rhs1 fun_args2 fake_rhs2+ in+ unifyFunDeps ev Nominal $ \uenv ->+ uPairsTcM uenv eqs++ | otherwise -- ordinary, non-injective type family+ = return False++--------------------+tryFunDeps :: EqCt -> SolverStage ()+tryFunDeps work_item@(EqCt { eq_lhs = lhs, eq_ev = ev })+ = Stage $+ case lhs of+ TyFamLHS tc args -> do { inerts <- getInertCans+ ; imp1 <- improveLocalFunEqs inerts tc args work_item+ ; imp2 <- improveTopFunEqs tc args work_item+ ; if (imp1 || imp2)+ then startAgainWith (mkNonCanonical ev)+ else continueWith () }+ TyVarLHS {} -> continueWith ()++--------------------+improveTopFunEqs :: TyCon -> [TcType] -> EqCt -> TcS Bool+-- See Note [FunDep and implicit parameter reactions]+improveTopFunEqs fam_tc args (EqCt { eq_ev = ev, eq_rhs = rhs })+ | isGiven ev+ = return False -- See Note [No Given/Given fundeps]++ | otherwise+ = do { fam_envs <- getFamInstEnvs+ ; eqns <- improve_top_fun_eqs fam_envs fam_tc args rhs+ ; traceTcS "improveTopFunEqs" (vcat [ ppr fam_tc <+> ppr args <+> ppr rhs+ , ppr eqns ])+ ; unifyFunDeps ev Nominal $ \uenv ->+ uPairsTcM (bump_depth uenv) (reverse eqns) }+ -- Missing that `reverse` causes T13135 and T13135_simple to loop.+ -- See Note [Reverse order of fundep equations]++ where+ bump_depth env = env { u_loc = bumpCtLocDepth (u_loc env) }+ -- ToDo: this location is wrong; it should be FunDepOrigin2+ -- See #14778++improve_top_fun_eqs :: FamInstEnvs+ -> TyCon -> [TcType] -> TcType+ -> TcS [TypeEqn]+improve_top_fun_eqs fam_envs fam_tc args rhs_ty+ | Just ops <- isBuiltInSynFamTyCon_maybe fam_tc+ = return (sfInteractTop ops args rhs_ty)++ -- see Note [Type inference for type families with injectivity]+ | isOpenTypeFamilyTyCon fam_tc+ , Injective injective_args <- tyConInjectivityInfo fam_tc+ , let fam_insts = lookupFamInstEnvByTyCon fam_envs fam_tc+ = -- it is possible to have several compatible equations in an open type+ -- family but we only want to derive equalities from one such equation.+ do { let improvs = buildImprovementData fam_insts+ fi_tvs fi_tys fi_rhs (const Nothing)++ ; traceTcS "improve_top_fun_eqs2" (ppr improvs)+ ; concatMapM (injImproveEqns injective_args) $+ take 1 improvs }++ | Just ax <- isClosedSynFamilyTyConWithAxiom_maybe fam_tc+ , Injective injective_args <- tyConInjectivityInfo fam_tc+ = concatMapM (injImproveEqns injective_args) $+ buildImprovementData (fromBranches (co_ax_branches ax))+ cab_tvs cab_lhs cab_rhs Just++ | otherwise+ = return []++ where+ in_scope = mkInScopeSet (tyCoVarsOfType rhs_ty)++ buildImprovementData+ :: [a] -- axioms for a TF (FamInst or CoAxBranch)+ -> (a -> [TyVar]) -- get bound tyvars of an axiom+ -> (a -> [Type]) -- get LHS of an axiom+ -> (a -> Type) -- get RHS of an axiom+ -> (a -> Maybe CoAxBranch) -- Just => apartness check required+ -> [( [Type], Subst, [TyVar], Maybe CoAxBranch )]+ -- Result:+ -- ( [arguments of a matching axiom]+ -- , RHS-unifying substitution+ -- , axiom variables without substitution+ -- , Maybe matching axiom [Nothing - open TF, Just - closed TF ] )+ buildImprovementData axioms axiomTVs axiomLHS axiomRHS wrap =+ [ (ax_args, subst, unsubstTvs, wrap axiom)+ | axiom <- axioms+ , let ax_args = axiomLHS axiom+ ax_rhs = axiomRHS axiom+ ax_tvs = axiomTVs axiom+ in_scope1 = in_scope `extendInScopeSetList` ax_tvs+ , Just subst <- [tcUnifyTyWithTFs False in_scope1 ax_rhs rhs_ty]+ , let notInSubst tv = not (tv `elemVarEnv` getTvSubstEnv subst)+ unsubstTvs = filter (notInSubst <&&> isTyVar) ax_tvs ]+ -- The order of unsubstTvs is important; it must be+ -- in telescope order e.g. (k:*) (a:k)++ injImproveEqns :: [Bool]+ -> ([Type], Subst, [TyCoVar], Maybe CoAxBranch)+ -> TcS [TypeEqn]+ injImproveEqns inj_args (ax_args, subst, unsubstTvs, cabr)+ = do { subst <- instFlexiX subst unsubstTvs+ -- If the current substitution bind [k -> *], and+ -- one of the un-substituted tyvars is (a::k), we'd better+ -- be sure to apply the current substitution to a's kind.+ -- Hence instFlexiX. #13135 was an example.++ ; return [ Pair (substTy subst ax_arg) arg+ -- NB: the ax_arg part is on the left+ -- see Note [Improvement orientation]+ | case cabr of+ Just cabr' -> apartnessCheck (substTys subst ax_args) cabr'+ _ -> True+ , (ax_arg, arg, True) <- zip3 ax_args args inj_args ] }+++improveLocalFunEqs :: InertCans -> TyCon -> [TcType] -> EqCt -> TcS Bool+-- Generate improvement equalities, by comparing+-- the current work item with inert CFunEqs+-- E.g. x + y ~ z, x + y' ~ z => [W] y ~ y'+--+-- See Note [FunDep and implicit parameter reactions]+improveLocalFunEqs inerts fam_tc args (EqCt { eq_ev = work_ev, eq_rhs = rhs })+ | null improvement_eqns+ = return False+ | otherwise+ = do { traceTcS "interactFunEq improvements: " $+ vcat [ text "Eqns:" <+> ppr improvement_eqns+ , text "Candidates:" <+> ppr funeqs_for_tc+ , text "Inert eqs:" <+> ppr (inert_eqs inerts) ]+ ; emitFunDepWanteds work_ev improvement_eqns }+ where+ funeqs = inert_funeqs inerts+ funeqs_for_tc :: [EqCt]+ funeqs_for_tc = [ funeq_ct | equal_ct_list <- findFunEqsByTyCon funeqs fam_tc+ , funeq_ct <- equal_ct_list+ , NomEq == eq_eq_rel funeq_ct ]+ -- representational equalities don't interact+ -- with type family dependencies+ work_loc = ctEvLoc work_ev+ work_pred = ctEvPred work_ev+ fam_inj_info = tyConInjectivityInfo fam_tc++ --------------------+ improvement_eqns :: [FunDepEqn (CtLoc, RewriterSet)]+ improvement_eqns+ | Just ops <- isBuiltInSynFamTyCon_maybe fam_tc+ = -- Try built-in families, notably for arithmethic+ concatMap (do_one_built_in ops rhs) funeqs_for_tc++ | Injective injective_args <- fam_inj_info+ = -- Try improvement from type families with injectivity annotations+ concatMap (do_one_injective injective_args rhs) funeqs_for_tc++ | otherwise+ = []++ --------------------+ do_one_built_in ops rhs (EqCt { eq_lhs = TyFamLHS _ iargs, eq_rhs = irhs, eq_ev = inert_ev })+ | not (isGiven inert_ev && isGiven work_ev) -- See Note [No Given/Given fundeps]+ = mk_fd_eqns inert_ev (sfInteractInert ops args rhs iargs irhs)++ | otherwise+ = []++ do_one_built_in _ _ _ = pprPanic "interactFunEq 1" (ppr fam_tc) -- TyVarLHS++ --------------------+ -- See Note [Type inference for type families with injectivity]+ do_one_injective inj_args rhs (EqCt { eq_lhs = TyFamLHS _ inert_args+ , eq_rhs = irhs, eq_ev = inert_ev })+ | not (isGiven inert_ev && isGiven work_ev) -- See Note [No Given/Given fundeps]+ , rhs `tcEqType` irhs+ = mk_fd_eqns inert_ev $ [ Pair arg iarg+ | (arg, iarg, True) <- zip3 args inert_args inj_args ]+ | otherwise+ = []++ do_one_injective _ _ _ = pprPanic "interactFunEq 2" (ppr fam_tc) -- TyVarLHS++ --------------------+ mk_fd_eqns :: CtEvidence -> [TypeEqn] -> [FunDepEqn (CtLoc, RewriterSet)]+ mk_fd_eqns inert_ev eqns+ | null eqns = []+ | otherwise = [ FDEqn { fd_qtvs = [], fd_eqs = eqns+ , fd_pred1 = work_pred+ , fd_pred2 = inert_pred+ , fd_loc = (loc, inert_rewriters) } ]+ where+ initial_loc -- start with the location of the Wanted involved+ | isGiven work_ev = inert_loc+ | otherwise = work_loc+ eqn_orig = InjTFOrigin1 work_pred (ctLocOrigin work_loc) (ctLocSpan work_loc)+ inert_pred (ctLocOrigin inert_loc) (ctLocSpan inert_loc)+ eqn_loc = setCtLocOrigin initial_loc eqn_orig+ inert_pred = ctEvPred inert_ev+ inert_loc = ctEvLoc inert_ev+ inert_rewriters = ctEvRewriters inert_ev+ loc = eqn_loc { ctl_depth = ctl_depth inert_loc `maxSubGoalDepth`+ ctl_depth work_loc }++{- Note [Type inference for type families with injectivity]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have a type family with an injectivity annotation:+ type family F a b = r | r -> b++Then if we have an equality like F s1 t1 ~ F s2 t2,+we can use the injectivity to get a new Wanted constraint on+the injective argument+ [W] t1 ~ t2++That in turn can help GHC solve constraints that would otherwise require+guessing. For example, consider the ambiguity check for+ f :: F Int b -> Int+We get the constraint+ [W] F Int b ~ F Int beta+where beta is a unification variable. Injectivity lets us pick beta ~ b.++Injectivity information is also used at the call sites. For example:+ g = f True+gives rise to+ [W] F Int b ~ Bool+from which we can derive b. This requires looking at the defining equations of+a type family, ie. finding equation with a matching RHS (Bool in this example)+and inferring values of type variables (b in this example) from the LHS patterns+of the matching equation. For closed type families we have to perform+additional apartness check for the selected equation to check that the selected+is guaranteed to fire for given LHS arguments.++These new constraints are Wanted constraints, but we will not use the evidence.+We could go further and offer evidence from decomposing injective type-function+applications, but that would require new evidence forms, and an extension to+FC, so we don't do that right now (Dec 14).++We generate these Wanteds in three places, depending on how we notice the+injectivity.++1. When we have a [W] F tys1 ~ F tys2. This is handled in canEqCanLHS2, and+described in Note [Decomposing type family applications] in GHC.Tc.Solver.Equality++2. When we have [W] F tys1 ~ T and [W] F tys2 ~ T. Note that neither of these+constraints rewrites the other, as they have different LHSs. This is done+in improveLocalFunEqs, called during the interactWithInertsStage.++3. When we have [W] F tys ~ T and an equation for F that looks like F tys' = T.+This is done in improve_top_fun_eqs, called from the top-level reactions stage.++See also Note [Injective type families] in GHC.Core.TyCon++Note [Cache-caused loops]+~~~~~~~~~~~~~~~~~~~~~~~~~+It is very dangerous to cache a rewritten wanted family equation as 'solved' in our+solved cache (which is the default behaviour or xCtEvidence), because the interaction+may not be contributing towards a solution. Here is an example:++Initial inert set:+ [W] g1 : F a ~ beta1+Work item:+ [W] g2 : F a ~ beta2+The work item will react with the inert yielding the _same_ inert set plus:+ (i) Will set g2 := g1 `cast` g3+ (ii) Will add to our solved cache that [S] g2 : F a ~ beta2+ (iii) Will emit [W] g3 : beta1 ~ beta2+Now, the g3 work item will be spontaneously solved to [G] g3 : beta1 ~ beta2+and then it will react the item in the inert ([W] g1 : F a ~ beta1). So it+will set+ g1 := g ; sym g3+and what is g? Well it would ideally be a new goal of type (F a ~ beta2) but+remember that we have this in our solved cache, and it is ... g2! In short we+created the evidence loop:++ g2 := g1 ; g3+ g3 := refl+ g1 := g2 ; sym g3++To avoid this situation we do not cache as solved any workitems (or inert)+which did not really made a 'step' towards proving some goal. Solved's are+just an optimization so we don't lose anything in terms of completeness of+solving.+-}
GHC/Tc/Solver/InertSet.hs view
@@ -8,7 +8,8 @@ -- * The work list WorkList(..), isEmptyWorkList, emptyWorkList, extendWorkListNonEq, extendWorkListCt,- extendWorkListCts, extendWorkListEq,+ extendWorkListCts, extendWorkListCtList,+ extendWorkListEq, extendWorkListEqs, appendWorkList, extendWorkListImplic, workListSize, selectWorkItem,@@ -16,28 +17,39 @@ -- * The inert set InertSet(..), InertCans(..),- InertEqs, emptyInert,- addInertItem, noMatchableGivenDicts,- noGivenNewtypeReprEqs,+ noGivenNewtypeReprEqs, updGivenEqs, mightEqualLater, prohibitedSuperClassSolve, -- * Inert equalities+ InertEqs, foldTyEqs, delEq, findEq, partitionInertEqs, partitionFunEqs,+ foldFunEqs, addEqToCans, + -- * Inert Dicts+ updDicts, delDict, addDict, filterDicts, partitionDicts,+ addSolvedDict,++ -- * Inert Irreds+ InertIrreds, delIrred, addIrreds, addIrred, foldIrreds,+ findMatchingIrreds, updIrreds, addIrredToCans,+ -- * Kick-out- kickOutRewritableLHS,+ KickOutSpec(..), kickOutRewritableLHS, -- * Cycle breaker vars CycleBreakerVarStack, pushCycleBreakerVarStack,- insertCycleBreakerBinding,- forAllCycleBreakerBindings_+ addCycleBreakerBindings,+ forAllCycleBreakerBindings_, + -- * Solving one from another+ InteractResult(..), solveOneFromTheOther+ ) where import GHC.Prelude@@ -49,6 +61,8 @@ import GHC.Types.Var import GHC.Types.Var.Env+import GHC.Types.Var.Set+import GHC.Types.Basic( SwapFlag(..) ) import GHC.Core.Reduction import GHC.Core.Predicate@@ -56,18 +70,20 @@ import qualified GHC.Core.TyCo.Rep as Rep import GHC.Core.Class( Class ) import GHC.Core.TyCon+import GHC.Core.Class( classTyCon ) import GHC.Core.Unify -import GHC.Data.Bag import GHC.Utils.Misc ( partitionWith ) import GHC.Utils.Outputable import GHC.Utils.Panic+import GHC.Utils.Panic.Plain+import GHC.Data.Maybe+import GHC.Data.Bag -import Data.List ( partition ) import Data.List.NonEmpty ( NonEmpty(..), (<|) ) import qualified Data.List.NonEmpty as NE-import GHC.Utils.Panic.Plain-import GHC.Data.Maybe+import Data.Function ( on )+ import Control.Monad ( forM_ ) {-@@ -93,7 +109,7 @@ Note [Prioritise equalities] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~-It's very important to process equalities /first/:+It's very important to process equalities over class constraints: * (Efficiency) The general reason to do so is that if we process a class constraint first, we may end up putting it into the inert set@@ -111,14 +127,17 @@ Solution: prioritise equalities over class constraints * (Class equalities) We need to prioritise equalities even if they- are hidden inside a class constraint;- see Note [Prioritise class equalities]+ are hidden inside a class constraint; see Note [Prioritise class equalities] * (Kick-out) We want to apply this priority scheme to kicked-out- constraints too (see the call to extendWorkListCt in kick_out_rewritable+ constraints too (see the call to extendWorkListCt in kick_out_rewritable) E.g. a CIrredCan can be a hetero-kinded (t1 ~ t2), which may become homo-kinded when kicked out, and hence we want to prioritise it. +Among the equalities we prioritise ones with an empty rewriter set;+see Note [Wanteds rewrite Wanteds] in GHC.Tc.Types.Constraint, wrinkle (W1).++ Note [Prioritise class equalities] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We prioritise equalities in the solver (see selectWorkItem). But class@@ -157,6 +176,13 @@ -- See Note [Prioritise equalities] -- See Note [Prioritise class equalities] + , wl_rw_eqs :: [Ct] -- Like wl_eqs, but ones that have a non-empty+ -- rewriter set; or, more precisely, did when+ -- added to the WorkList+ -- We prioritise wl_eqs over wl_rw_eqs;+ -- see Note [Prioritise Wanteds with empty RewriterSet]+ -- in GHC.Tc.Types.Constraint for more details.+ , wl_rest :: [Ct] , wl_implics :: Bag Implication -- See Note [Residual implications]@@ -164,21 +190,42 @@ appendWorkList :: WorkList -> WorkList -> WorkList appendWorkList- (WL { wl_eqs = eqs1, wl_rest = rest1- , wl_implics = implics1 })- (WL { wl_eqs = eqs2, wl_rest = rest2- , wl_implics = implics2 })+ (WL { wl_eqs = eqs1, wl_rw_eqs = rw_eqs1+ , wl_rest = rest1, wl_implics = implics1 })+ (WL { wl_eqs = eqs2, wl_rw_eqs = rw_eqs2+ , wl_rest = rest2, wl_implics = implics2 }) = WL { wl_eqs = eqs1 ++ eqs2+ , wl_rw_eqs = rw_eqs1 ++ rw_eqs2 , wl_rest = rest1 ++ rest2 , wl_implics = implics1 `unionBags` implics2 } workListSize :: WorkList -> Int-workListSize (WL { wl_eqs = eqs, wl_rest = rest })- = length eqs + length rest+workListSize (WL { wl_eqs = eqs, wl_rw_eqs = rw_eqs, wl_rest = rest })+ = length eqs + length rw_eqs + length rest -extendWorkListEq :: Ct -> WorkList -> WorkList-extendWorkListEq ct wl = wl { wl_eqs = ct : wl_eqs wl }+extendWorkListEq :: RewriterSet -> Ct -> WorkList -> WorkList+extendWorkListEq rewriters ct wl+ | isEmptyRewriterSet rewriters -- A wanted that has not been rewritten+ -- isEmptyRewriterSet: see Note [Prioritise Wanteds with empty RewriterSet]+ -- in GHC.Tc.Types.Constraint+ = wl { wl_eqs = ct : wl_eqs wl }+ | otherwise+ = wl { wl_rw_eqs = ct : wl_rw_eqs wl } +extendWorkListEqs :: RewriterSet -> Bag Ct -> WorkList -> WorkList+-- Add [eq1,...,eqn] to the work-list+-- They all have the same rewriter set+-- The constraints will be solved in left-to-right order:+-- see Note [Work-list ordering] in GHC.Tc.Solved.Equality+extendWorkListEqs rewriters eqs wl+ | isEmptyRewriterSet rewriters+ -- isEmptyRewriterSet: see Note [Prioritise Wanteds with empty RewriterSet]+ -- in GHC.Tc.Types.Constraint+ = wl { wl_eqs = foldr (:) (wl_eqs wl) eqs }+ -- The foldr just appends wl_eqs to the bag of eqs+ | otherwise+ = wl { wl_rw_eqs = foldr (:) (wl_rw_eqs wl) eqs }+ extendWorkListNonEq :: Ct -> WorkList -> WorkList -- Extension by non equality extendWorkListNonEq ct wl = wl { wl_rest = ct : wl_rest wl }@@ -187,20 +234,25 @@ extendWorkListImplic implic wl = wl { wl_implics = implic `consBag` wl_implics wl } extendWorkListCt :: Ct -> WorkList -> WorkList--- Agnostic+-- Agnostic about what kind of constraint extendWorkListCt ct wl- = case classifyPredType (ctPred ct) of+ = case classifyPredType (ctEvPred ev) of EqPred {}- -> extendWorkListEq ct wl+ -> extendWorkListEq rewriters ct wl ClassPred cls _ -- See Note [Prioritise class equalities]- | isEqPredClass cls- -> extendWorkListEq ct wl+ | isEqualityClass cls+ -> extendWorkListEq rewriters ct wl _ -> extendWorkListNonEq ct wl+ where+ ev = ctEvidence ct+ rewriters = ctEvRewriters ev -extendWorkListCts :: [Ct] -> WorkList -> WorkList--- Agnostic+extendWorkListCtList :: [Ct] -> WorkList -> WorkList+extendWorkListCtList cts wl = foldr extendWorkListCt wl cts++extendWorkListCts :: Cts -> WorkList -> WorkList extendWorkListCts cts wl = foldr extendWorkListCt wl cts isEmptyWorkList :: WorkList -> Bool@@ -208,21 +260,24 @@ = null eqs && null rest && isEmptyBag implics emptyWorkList :: WorkList-emptyWorkList = WL { wl_eqs = [], wl_rest = [], wl_implics = emptyBag }+emptyWorkList = WL { wl_eqs = [], wl_rw_eqs = [], wl_rest = [], wl_implics = emptyBag } selectWorkItem :: WorkList -> Maybe (Ct, WorkList) -- See Note [Prioritise equalities]-selectWorkItem wl@(WL { wl_eqs = eqs, wl_rest = rest })- | ct:cts <- eqs = Just (ct, wl { wl_eqs = cts })- | ct:cts <- rest = Just (ct, wl { wl_rest = cts })- | otherwise = Nothing+selectWorkItem wl@(WL { wl_eqs = eqs, wl_rw_eqs = rw_eqs, wl_rest = rest })+ | ct:cts <- eqs = Just (ct, wl { wl_eqs = cts })+ | ct:cts <- rw_eqs = Just (ct, wl { wl_rw_eqs = cts })+ | ct:cts <- rest = Just (ct, wl { wl_rest = cts })+ | otherwise = Nothing -- Pretty printing instance Outputable WorkList where- ppr (WL { wl_eqs = eqs, wl_rest = rest, wl_implics = implics })+ ppr (WL { wl_eqs = eqs, wl_rw_eqs = rw_eqs, wl_rest = rest, wl_implics = implics }) = text "WL" <+> (braces $ vcat [ ppUnless (null eqs) $ text "Eqs =" <+> vcat (map ppr eqs)+ , ppUnless (null rw_eqs) $+ text "RwEqs =" <+> vcat (map ppr rw_eqs) , ppUnless (null rest) $ text "Non-eqs =" <+> vcat (map ppr rest) , ppUnless (isEmptyBag implics) $@@ -237,13 +292,15 @@ * * ********************************************************************* -} -type CycleBreakerVarStack = NonEmpty [(TcTyVar, TcType)]+type CycleBreakerVarStack = NonEmpty (Bag (TcTyVar, TcType)) -- ^ a stack of (CycleBreakerTv, original family applications) lists -- first element in the stack corresponds to current implication; -- later elements correspond to outer implications -- used to undo the cycle-breaking needed to handle- -- Note [Type equality cycles] in GHC.Tc.Solver.Canonical+ -- Note [Type equality cycles] in GHC.Tc.Solver.Equality -- Why store the outer implications? For the use in mightEqualLater (only)+ --+ -- Why NonEmpty? So there is always a top element to add to data InertSet = IS { inert_cans :: InertCans@@ -262,8 +319,9 @@ -- (We have no way of "kicking out" from the cache, so putting -- wanteds here means we can end up solving a Wanted with itself. Bad) - , inert_solved_dicts :: DictMap CtEvidence- -- All Wanteds, of form ev :: C t1 .. tn+ , inert_solved_dicts :: DictMap DictCt+ -- All Wanteds, of form (C t1 .. tn)+ -- Always a dictionary solved by an instance decl; never an implict parameter -- See Note [Solved dictionaries] -- and Note [Do not add superclasses of solved dictionaries] }@@ -279,19 +337,19 @@ emptyInertCans :: InertCans emptyInertCans- = IC { inert_eqs = emptyDVarEnv+ = IC { inert_eqs = emptyTyEqs+ , inert_funeqs = emptyFunEqs , inert_given_eq_lvl = topTcLevel , inert_given_eqs = False , inert_dicts = emptyDictMap , inert_safehask = emptyDictMap- , inert_funeqs = emptyFunEqs , inert_insts = []- , inert_irreds = emptyCts }+ , inert_irreds = emptyBag } emptyInert :: InertSet emptyInert = IS { inert_cans = emptyInertCans- , inert_cycle_breakers = [] :| []+ , inert_cycle_breakers = emptyBag :| [] , inert_famapp_cache = emptyFunEqs , inert_solved_dicts = emptyDictMap } @@ -362,7 +420,7 @@ conditional on the kind of instance - It is only called when applying an instance decl,- in GHC.Tc.Solver.Interact.doTopReactDict+ in GHC.Tc.Solver.Dict.tryInstances - ClsInst.InstanceWhat says what kind of instance was used to solve the constraint. In particular@@ -543,7 +601,7 @@ -- (see Note [Unification preconditions] in GHC.Tc.Utils.Unify). We update inert_given_eq_lvl whenever we add a Given to the-inert set, in updateGivenEqs.+inert set, in updGivenEqs. Then a unification variable alpha[n] is untouchable iff n < inert_given_eq_lvl@@ -569,7 +627,7 @@ same example again, but this time we have /not/ yet unified beta: forall[2] beta[1] => ...blah... - Because beta might turn into an equality, updateGivenEqs conservatively+ Because beta might turn into an equality, updGivenEqs conservatively treats it as a potential equality, and updates inert_give_eq_lvl * What about something like forall[2] a b. a ~ F b => [W] alpha[1] ~ X y z?@@ -579,7 +637,7 @@ implication. Such equalities need not make alpha untouchable. (Test case typecheck/should_compile/LocalGivenEqs has a real-life motivating example, with some detailed commentary.)- Hence the 'mentionsOuterVar' test in updateGivenEqs.+ Hence the 'mentionsOuterVar' test in updGivenEqs. However, solely to support better error messages (see Note [HasGivenEqs] in GHC.Tc.Types.Constraint) we also track@@ -722,7 +780,7 @@ ----------------------------------------------------------------------------- Our main invariant:- the CEqCans in inert_eqs should be a terminating generalised substitution+ the EqCts in inert_eqs should be a terminating generalised substitution ----------------------------------------------------------------------------- Note that termination is not the same as idempotence. To apply S to a@@ -769,7 +827,7 @@ There is one exception to the claim that non-rewritable parts of the tree do not affect the solver: we sometimes do an occurs-check to decide e.g. how to orient an equality. (See the comments on-GHC.Tc.Solver.Canonical.canEqTyVarFunEq.) Accordingly, the presence of a+GHC.Tc.Solver.Equality.canEqTyVarFunEq.) Accordingly, the presence of a variable in a kind or coercion just might influence the solver. Here is an example: @@ -814,7 +872,7 @@ (T3) lhs not in t -- No occurs check in the work item -- If lhs is a type family application, we require only that -- lhs is not *rewritable* in t. See Note [Rewritable] and- -- Note [CEqCan occurs check] in GHC.Tc.Types.Constraint.+ -- Note [EqCt occurs check] in GHC.Tc.Types.Constraint. AND, for every (lhs1 -fs-> s) in S: (K0) not (fw >= fs)@@ -849,7 +907,7 @@ * T3 is guaranteed by an occurs-check on the work item. This is done during canonicalisation, in checkTypeEq; invariant- (TyEq:OC) of CEqCan. See also Note [CEqCan occurs check] in GHC.Tc.Types.Constraint.+ (TyEq:OC) of CEqCan. See also Note [EqCt occurs check] in GHC.Tc.Types.Constraint. * (K1-3) are the "kick-out" criteria. (As stated, they are really the "keep" criteria.) If the current inert S contains a triple that does@@ -1073,23 +1131,23 @@ data InertCans -- See Note [Detailed InertCans Invariants] for more = IC { inert_eqs :: InertEqs -- See Note [inert_eqs: the inert equalities]- -- All CEqCans with a TyVarLHS; index is the LHS tyvar+ -- All EqCt with a TyVarLHS; index is the LHS tyvar -- Domain = skolems and untouchables; a touchable would be unified - , inert_funeqs :: FunEqMap EqualCtList- -- All CEqCans with a TyFamLHS; index is the whole family head type.+ , inert_funeqs :: InertFunEqs+ -- All EqCt with a TyFamLHS; index is the whole family head type. -- LHS is fully rewritten (modulo eqCanRewrite constraints) -- wrt inert_eqs -- Can include both [G] and [W] - , inert_dicts :: DictMap Ct+ , inert_dicts :: DictMap DictCt -- Dictionaries only -- All fully rewritten (modulo flavour constraints) -- wrt inert_eqs , inert_insts :: [QCInst] - , inert_safehask :: DictMap Ct+ , inert_safehask :: DictMap DictCt -- Failed dictionary resolution due to Safe Haskell overlapping -- instances restriction. We keep this separate from inert_dicts -- as it doesn't cause compilation failure, just safe inference@@ -1098,7 +1156,7 @@ -- ^ See Note [Safe Haskell Overlapping Instances Implementation] -- in GHC.Tc.Solver - , inert_irreds :: Cts+ , inert_irreds :: InertIrreds -- Irreducible predicates that cannot be made canonical, -- and which don't interact with others (e.g. (c a)) -- and insoluble predicates (e.g. Int ~ Bool, or a ~ [a])@@ -1118,6 +1176,8 @@ } type InertEqs = DTyVarEnv EqualCtList+type InertFunEqs = FunEqMap EqualCtList+type InertIrreds = Bag IrredCt instance Outputable InertCans where ppr (IC { inert_eqs = eqs@@ -1131,67 +1191,69 @@ = braces $ vcat [ ppUnless (isEmptyDVarEnv eqs) $- text "Equalities:"- <+> pprCts (foldDVarEnv folder emptyCts eqs)+ text "Equalities ="+ <+> pprBag (foldTyEqs consBag eqs emptyBag) , ppUnless (isEmptyTcAppMap funeqs) $- text "Type-function equalities =" <+> pprCts (foldFunEqs folder funeqs emptyCts)+ text "Type-function equalities ="+ <+> pprBag (foldFunEqs consBag funeqs emptyBag) , ppUnless (isEmptyTcAppMap dicts) $- text "Dictionaries =" <+> pprCts (dictsToBag dicts)+ text "Dictionaries =" <+> pprBag (dictsToBag dicts) , ppUnless (isEmptyTcAppMap safehask) $- text "Safe Haskell unsafe overlap =" <+> pprCts (dictsToBag safehask)- , ppUnless (isEmptyCts irreds) $- text "Irreds =" <+> pprCts irreds+ text "Safe Haskell unsafe overlap =" <+> pprBag (dictsToBag safehask)+ , ppUnless (isEmptyBag irreds) $+ text "Irreds =" <+> pprBag irreds , ppUnless (null insts) $ text "Given instances =" <+> vcat (map ppr insts) , text "Innermost given equalities =" <+> ppr ge_lvl , text "Given eqs at this level =" <+> ppr given_eqs ]- where- folder eqs rest = listToBag eqs `andCts` rest + {- ********************************************************************* * * Inert equalities * * ********************************************************************* -} -addTyEq :: InertEqs -> TcTyVar -> Ct -> InertEqs+emptyTyEqs :: InertEqs+emptyTyEqs = emptyDVarEnv++addEqToCans :: TcLevel -> EqCt -> InertCans -> InertCans+addEqToCans tc_lvl eq_ct@(EqCt { eq_lhs = lhs })+ ics@(IC { inert_funeqs = funeqs, inert_eqs = eqs })+ = updGivenEqs tc_lvl (CEqCan eq_ct) $+ case lhs of+ TyFamLHS tc tys -> ics { inert_funeqs = addCanFunEq funeqs tc tys eq_ct }+ TyVarLHS tv -> ics { inert_eqs = addTyEq eqs tv eq_ct }++addTyEq :: InertEqs -> TcTyVar -> EqCt -> InertEqs addTyEq old_eqs tv ct = extendDVarEnv_C add_eq old_eqs tv [ct] where add_eq old_eqs _ = addToEqualCtList ct old_eqs -addCanFunEq :: FunEqMap EqualCtList -> TyCon -> [TcType] -> Ct- -> FunEqMap EqualCtList-addCanFunEq old_eqs fun_tc fun_args ct- = alterTcApp old_eqs fun_tc fun_args upd- where- upd (Just old_equal_ct_list) = Just $ addToEqualCtList ct old_equal_ct_list- upd Nothing = Just [ct]--foldTyEqs :: (Ct -> b -> b) -> InertEqs -> b -> b+foldTyEqs :: (EqCt -> b -> b) -> InertEqs -> b -> b foldTyEqs k eqs z = foldDVarEnv (\cts z -> foldr k z cts) z eqs -findTyEqs :: InertCans -> TyVar -> [Ct]+findTyEqs :: InertCans -> TyVar -> [EqCt] findTyEqs icans tv = concat @Maybe (lookupDVarEnv (inert_eqs icans) tv) -delEq :: InertCans -> CanEqLHS -> TcType -> InertCans-delEq ic lhs rhs = case lhs of+delEq :: EqCt -> InertCans -> InertCans+delEq (EqCt { eq_lhs = lhs, eq_rhs = rhs }) ic = case lhs of TyVarLHS tv -> ic { inert_eqs = alterDVarEnv upd (inert_eqs ic) tv } TyFamLHS tf args -> ic { inert_funeqs = alterTcApp (inert_funeqs ic) tf args upd } where- isThisOne :: Ct -> Bool- isThisOne (CEqCan { cc_rhs = t1 }) = tcEqTypeNoKindCheck rhs t1- isThisOne other = pprPanic "delEq" (ppr lhs $$ ppr ic $$ ppr other)+ isThisOne :: EqCt -> Bool+ isThisOne (EqCt { eq_rhs = t1 }) = tcEqTypeNoKindCheck rhs t1 upd :: Maybe EqualCtList -> Maybe EqualCtList upd (Just eq_ct_list) = filterEqualCtList (not . isThisOne) eq_ct_list upd Nothing = Nothing -findEq :: InertCans -> CanEqLHS -> [Ct]+findEq :: InertCans -> CanEqLHS -> [EqCt] findEq icans (TyVarLHS tv) = findTyEqs icans tv findEq icans (TyFamLHS fun_tc fun_args) = concat @Maybe (findFunEq (inert_funeqs icans) fun_tc fun_args)@@ -1200,81 +1262,176 @@ partition_eqs_container :: forall container . container -- empty container- -> (forall b. (EqualCtList -> b -> b) -> b -> container -> b) -- folder- -> (container -> CanEqLHS -> EqualCtList -> container) -- extender- -> (Ct -> Bool)+ -> (forall b. (EqCt -> b -> b) -> container -> b -> b) -- folder+ -> (EqCt -> container -> container) -- extender+ -> (EqCt -> Bool) -> container- -> ([Ct], container)+ -> ([EqCt], container) partition_eqs_container empty_container fold_container extend_container pred orig_inerts- = fold_container folder ([], empty_container) orig_inerts+ = fold_container folder orig_inerts ([], empty_container) where- folder :: EqualCtList -> ([Ct], container) -> ([Ct], container)- folder eqs (acc_true, acc_false)- = (eqs_true ++ acc_true, acc_false')- where- (eqs_true, eqs_false) = partition pred eqs-- acc_false'- | CEqCan { cc_lhs = lhs } : _ <- eqs_false- = extend_container acc_false lhs eqs_false- | otherwise- = acc_false+ folder :: EqCt -> ([EqCt], container) -> ([EqCt], container)+ folder eq_ct (acc_true, acc_false)+ | pred eq_ct = (eq_ct : acc_true, acc_false)+ | otherwise = (acc_true, extend_container eq_ct acc_false) -partitionInertEqs :: (Ct -> Bool) -- Ct will always be a CEqCan with a TyVarLHS+partitionInertEqs :: (EqCt -> Bool) -- EqCt will always have a TyVarLHS -> InertEqs- -> ([Ct], InertEqs)-partitionInertEqs = partition_eqs_container emptyDVarEnv foldDVarEnv extendInertEqs+ -> ([EqCt], InertEqs)+partitionInertEqs = partition_eqs_container emptyTyEqs foldTyEqs addInertEqs --- precondition: CanEqLHS is a TyVarLHS-extendInertEqs :: InertEqs -> CanEqLHS -> EqualCtList -> InertEqs-extendInertEqs eqs (TyVarLHS tv) new_eqs = extendDVarEnv eqs tv new_eqs-extendInertEqs _ other _ = pprPanic "extendInertEqs" (ppr other)+addInertEqs :: EqCt -> InertEqs -> InertEqs+-- Precondition: CanEqLHS is a TyVarLHS+addInertEqs eq_ct@(EqCt { eq_lhs = TyVarLHS tv }) eqs = addTyEq eqs tv eq_ct+addInertEqs other _ = pprPanic "extendInertEqs" (ppr other) -partitionFunEqs :: (Ct -> Bool) -- Ct will always be a CEqCan with a TyFamLHS- -> FunEqMap EqualCtList- -> ([Ct], FunEqMap EqualCtList)-partitionFunEqs- = partition_eqs_container emptyFunEqs (\ f z eqs -> foldFunEqs f eqs z) extendFunEqs+------------------------ --- precondition: CanEqLHS is a TyFamLHS-extendFunEqs :: FunEqMap EqualCtList -> CanEqLHS -> EqualCtList -> FunEqMap EqualCtList-extendFunEqs eqs (TyFamLHS tf args) new_eqs = insertTcApp eqs tf args new_eqs-extendFunEqs _ other _ = pprPanic "extendFunEqs" (ppr other)+addCanFunEq :: InertFunEqs -> TyCon -> [TcType] -> EqCt -> InertFunEqs+addCanFunEq old_eqs fun_tc fun_args ct+ = alterTcApp old_eqs fun_tc fun_args upd+ where+ upd (Just old_equal_ct_list) = Just $ addToEqualCtList ct old_equal_ct_list+ upd Nothing = Just [ct] +foldFunEqs :: (EqCt -> b -> b) -> FunEqMap EqualCtList -> b -> b+foldFunEqs k fun_eqs z = foldTcAppMap (\eqs z -> foldr k z eqs) fun_eqs z++partitionFunEqs :: (EqCt -> Bool) -- EqCt will have a TyFamLHS+ -> InertFunEqs+ -> ([EqCt], InertFunEqs)+partitionFunEqs = partition_eqs_container emptyFunEqs foldFunEqs addFunEqs++addFunEqs :: EqCt -> InertFunEqs -> InertFunEqs+-- Precondition: EqCt is a TyFamLHS+addFunEqs eq_ct@(EqCt { eq_lhs = TyFamLHS tc args }) fun_eqs+ = addCanFunEq fun_eqs tc args eq_ct+addFunEqs other _ = pprPanic "extendFunEqs" (ppr other)+++ {- ********************************************************************* * *- Adding to and removing from the inert set+ Inert Dicts * *+********************************************************************* -}++updDicts :: (DictMap DictCt -> DictMap DictCt) -> InertCans -> InertCans+updDicts upd ics = ics { inert_dicts = upd (inert_dicts ics) }++delDict :: DictCt -> DictMap a -> DictMap a+delDict (DictCt { di_cls = cls, di_tys = tys }) m+ = delTcApp m (classTyCon cls) tys++addDict :: DictCt -> DictMap DictCt -> DictMap DictCt+addDict item@(DictCt { di_cls = cls, di_tys = tys }) dm+ = insertTcApp dm (classTyCon cls) tys item++addSolvedDict :: DictCt -> DictMap DictCt -> DictMap DictCt+addSolvedDict item@(DictCt { di_cls = cls, di_tys = tys }) dm+ = insertTcApp dm (classTyCon cls) tys item++filterDicts :: (DictCt -> Bool) -> DictMap DictCt -> DictMap DictCt+filterDicts f m = filterTcAppMap f m++partitionDicts :: (DictCt -> Bool) -> DictMap DictCt -> (Bag DictCt, DictMap DictCt)+partitionDicts f m = foldTcAppMap k m (emptyBag, emptyDictMap)+ where+ k ct (yeses, noes) | f ct = (ct `consBag` yeses, noes)+ | otherwise = (yeses, addDict ct noes)+++{- ********************************************************************* * *+ Inert Irreds+* * ********************************************************************* -} -addInertItem :: TcLevel -> InertCans -> Ct -> InertCans-addInertItem tc_lvl- ics@(IC { inert_funeqs = funeqs, inert_eqs = eqs })- item@(CEqCan { cc_lhs = lhs })- = updateGivenEqs tc_lvl item $- case lhs of- TyFamLHS tc tys -> ics { inert_funeqs = addCanFunEq funeqs tc tys item }- TyVarLHS tv -> ics { inert_eqs = addTyEq eqs tv item }+addIrredToCans :: TcLevel -> IrredCt -> InertCans -> InertCans+addIrredToCans tc_lvl irred ics+ = updGivenEqs tc_lvl (CIrredCan irred) $+ updIrreds (addIrred irred) ics -addInertItem tc_lvl ics@(IC { inert_irreds = irreds }) item@(CIrredCan {})- = updateGivenEqs tc_lvl item $ -- An Irred might turn out to be an- -- equality, so we play safe- ics { inert_irreds = irreds `snocBag` item }+addIrreds :: [IrredCt] -> InertIrreds -> InertIrreds+addIrreds extras irreds+ | null extras = irreds+ | otherwise = irreds `unionBags` listToBag extras -addInertItem _ ics item@(CDictCan { cc_class = cls, cc_tyargs = tys })- = ics { inert_dicts = addDict (inert_dicts ics) cls tys item }+addIrred :: IrredCt -> InertIrreds -> InertIrreds+addIrred extra irreds = irreds `snocBag` extra -addInertItem _ _ item- = pprPanic "upd_inert set: can't happen! Inserting " $- ppr item -- Can't be CNonCanonical because they only land in inert_irreds+updIrreds :: (InertIrreds -> InertIrreds) -> InertCans -> InertCans+updIrreds upd ics = ics { inert_irreds = upd (inert_irreds ics) } -updateGivenEqs :: TcLevel -> Ct -> InertCans -> InertCans+delIrred :: IrredCt -> InertCans -> InertCans+-- Remove a particular (Given) Irred, on the instructions of a plugin+-- For some reason this is done vis the evidence Id, not the type+-- Compare delEq. I have not idea why+delIrred (IrredCt { ir_ev = ev }) ics+ = updIrreds (filterBag keep) ics+ where+ ev_id = ctEvEvId ev+ keep (IrredCt { ir_ev = ev' }) = ev_id /= ctEvEvId ev'++foldIrreds :: (IrredCt -> b -> b) -> InertIrreds -> b -> b+foldIrreds k irreds z = foldr k z irreds++findMatchingIrreds :: InertIrreds -> CtEvidence+ -> (Bag (IrredCt, SwapFlag), InertIrreds)+findMatchingIrreds irreds ev+ | EqPred eq_rel1 lty1 rty1 <- classifyPredType pred+ -- See Note [Solving irreducible equalities]+ = partitionBagWith (match_eq eq_rel1 lty1 rty1) irreds+ | otherwise+ = partitionBagWith match_non_eq irreds+ where+ pred = ctEvPred ev+ match_non_eq irred+ | irredCtPred irred `tcEqTypeNoKindCheck` pred = Left (irred, NotSwapped)+ | otherwise = Right irred++ match_eq eq_rel1 lty1 rty1 irred+ | EqPred eq_rel2 lty2 rty2 <- classifyPredType (irredCtPred irred)+ , eq_rel1 == eq_rel2+ , Just swap <- match_eq_help lty1 rty1 lty2 rty2+ = Left (irred, swap)+ | otherwise+ = Right irred++ match_eq_help lty1 rty1 lty2 rty2+ | lty1 `tcEqTypeNoKindCheck` lty2, rty1 `tcEqTypeNoKindCheck` rty2+ = Just NotSwapped+ | lty1 `tcEqTypeNoKindCheck` rty2, rty1 `tcEqTypeNoKindCheck` lty2+ = Just IsSwapped+ | otherwise+ = Nothing++{- Note [Solving irreducible equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (#14333)+ [G] a b ~R# c d+ [W] c d ~R# a b+Clearly we should be able to solve this! Even though the constraints are+not decomposable. We solve this when looking up the work-item in the+irreducible constraints to look for an identical one. When doing this+lookup, findMatchingIrreds spots the equality case, and matches either+way around. It has to return a swap-flag so we can generate evidence+that is the right way round too.+-}++{- *********************************************************************+* *+ Adding to and removing from the inert set+* *+* *+********************************************************************* -}++updGivenEqs :: TcLevel -> Ct -> InertCans -> InertCans -- Set the inert_given_eq_level to the current level (tclvl) -- if the constraint is a given equality that should prevent -- filling in an outer unification variable. -- See Note [Tracking Given equalities]-updateGivenEqs tclvl ct inerts@(IC { inert_given_eq_lvl = ge_lvl })+updGivenEqs tclvl ct inerts@(IC { inert_given_eq_lvl = ge_lvl }) | not (isGivenCt ct) = inerts | not_equality ct = inerts -- See Note [Let-bound skolems] | otherwise = inerts { inert_given_eq_lvl = ge_lvl'@@ -1292,17 +1449,31 @@ -- See Note [Let-bound skolems] -- NB: no need to spot the boxed CDictCan (a ~ b) because its -- superclass (a ~# b) will be a CEqCan- not_equality (CEqCan { cc_lhs = TyVarLHS tv }) = not (isOuterTyVar tclvl tv)- not_equality (CDictCan {}) = True- not_equality _ = False+ not_equality (CEqCan (EqCt { eq_lhs = TyVarLHS tv })) = not (isOuterTyVar tclvl tv)+ not_equality (CDictCan {}) = True+ not_equality _ = False -kickOutRewritableLHS :: CtFlavourRole -- Flavour/role of the equality that- -- is being added to the inert set- -> CanEqLHS -- The new equality is lhs ~ ty- -> InertCans- -> (WorkList, InertCans)+data KickOutSpec -- See Note [KickOutSpec]+ = KOAfterUnify TcTyVarSet -- We have unified these tyvars+ | KOAfterAdding CanEqLHS -- We are adding to the inert set a canonical equality+ -- constraint with this LHS++{- Note [KickOutSpec]+~~~~~~~~~~~~~~~~~~~~~~+KickOutSpec explains why we are kicking out.++Important property:+ KOAfterAdding (TyVarLHS tv) should behave exactly like+ KOAfterUnifying (unitVarSet tv)++The main reasons for treating the two separately are+* More efficient in the single-tyvar case+* The code is far more perspicuous+-}++kickOutRewritableLHS :: KickOutSpec -> CtFlavourRole -> InertCans -> (Cts, InertCans) -- See Note [kickOutRewritable]-kickOutRewritableLHS new_fr new_lhs+kickOutRewritableLHS ko_spec new_fr@(_, new_role) ics@(IC { inert_eqs = tv_eqs , inert_dicts = dictmap , inert_funeqs = funeqmap@@ -1317,28 +1488,22 @@ , inert_irreds = irs_in , inert_insts = insts_in } - kicked_out :: WorkList- -- NB: use extendWorkList to ensure that kicked-out equalities get priority- -- See Note [Prioritise equalities] (Kick-out).- -- The irreds may include non-canonical (hetero-kinded) equality- -- constraints, which perhaps may have become soluble after new_lhs- -- is substituted; ditto the dictionaries, which may include (a~b)- -- or (a~~b) constraints.- kicked_out = foldr extendWorkListCt- (emptyWorkList { wl_eqs = tv_eqs_out ++ feqs_out })- ((dicts_out `andCts` irs_out)- `extendCtsList` insts_out)+ kicked_out :: Cts+ kicked_out = (fmap CDictCan dicts_out `andCts` fmap CIrredCan irs_out)+ `extendCtsList` insts_out+ `extendCtsList` map CEqCan tv_eqs_out+ `extendCtsList` map CEqCan feqs_out (tv_eqs_out, tv_eqs_in) = partitionInertEqs kick_out_eq tv_eqs (feqs_out, feqs_in) = partitionFunEqs kick_out_eq funeqmap- (dicts_out, dicts_in) = partitionDicts kick_out_ct dictmap- (irs_out, irs_in) = partitionBag kick_out_ct irreds+ (dicts_out, dicts_in) = partitionDicts (kick_out_ct . CDictCan) dictmap+ (irs_out, irs_in) = partitionBag (kick_out_ct . CIrredCan) irreds -- Kick out even insolubles: See Note [Rewrite insolubles] -- 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 GHC.Tc.Solver.Canonical+ -- See Note [Quantified constraints] in GHC.Tc.Solver.Solve insts_out :: [Ct] insts_in :: [QCInst] (insts_out, insts_in)@@ -1353,14 +1518,12 @@ | otherwise = Right qci - (_, new_role) = new_fr-- fr_tv_can_rewrite_ty :: TyVar -> EqRel -> Type -> Bool- fr_tv_can_rewrite_ty new_tv role ty+ fr_tv_can_rewrite_ty :: (TyVar -> Bool) -> EqRel -> Type -> Bool+ fr_tv_can_rewrite_ty ok_tv role ty = anyRewritableTyVar role can_rewrite ty where can_rewrite :: EqRel -> TyVar -> Bool- can_rewrite old_role tv = new_role `eqCanRewrite` old_role && tv == new_tv+ can_rewrite old_role tv = new_role `eqCanRewrite` old_role && ok_tv tv fr_tf_can_rewrite_ty :: TyCon -> [TcType] -> EqRel -> Type -> Bool fr_tf_can_rewrite_ty new_tf new_tf_args role ty@@ -1373,33 +1536,28 @@ -- it's possible for old_tf_args to have too many. This is fine; -- we'll only check what we need to. - {-# INLINE fr_can_rewrite_ty #-} -- perform the check here only once+ {-# INLINE fr_can_rewrite_ty #-} -- Perform case analysis on ko_spec only once fr_can_rewrite_ty :: EqRel -> Type -> Bool- fr_can_rewrite_ty = case new_lhs of- TyVarLHS new_tv -> fr_tv_can_rewrite_ty new_tv- TyFamLHS new_tf new_tf_args -> fr_tf_can_rewrite_ty new_tf new_tf_args+ fr_can_rewrite_ty = case ko_spec of -- See Note [KickOutSpec]+ KOAfterUnify tvs -> fr_tv_can_rewrite_ty (`elemVarSet` tvs)+ KOAfterAdding (TyVarLHS tv) -> fr_tv_can_rewrite_ty (== tv)+ KOAfterAdding (TyFamLHS tf tf_args) -> fr_tf_can_rewrite_ty tf tf_args fr_may_rewrite :: CtFlavourRole -> Bool fr_may_rewrite fs = new_fr `eqCanRewriteFR` fs -- Can the new item rewrite the inert item? - {-# INLINE kick_out_ct #-} -- perform case on new_lhs here only once kick_out_ct :: Ct -> Bool -- Kick it out if the new CEqCan can rewrite the inert one -- See Note [kickOutRewritable]- kick_out_ct = case new_lhs of- TyVarLHS new_tv -> \ct -> let fs@(_,role) = ctFlavourRole ct in- fr_may_rewrite fs- && fr_tv_can_rewrite_ty new_tv role (ctPred ct)- TyFamLHS new_tf new_tf_args- -> \ct -> let fs@(_, role) = ctFlavourRole ct in- fr_may_rewrite fs- && fr_tf_can_rewrite_ty new_tf new_tf_args role (ctPred ct)+ kick_out_ct ct = fr_may_rewrite fs && fr_can_rewrite_ty role (ctPred ct)+ where+ fs@(_,role) = ctFlavourRole ct -- Implements criteria K1-K3 in Note [Extending the inert equalities]- kick_out_eq :: Ct -> Bool- kick_out_eq (CEqCan { cc_lhs = lhs, cc_rhs = rhs_ty- , cc_ev = ev, cc_eq_rel = eq_rel })+ kick_out_eq :: EqCt -> Bool+ kick_out_eq (EqCt { eq_lhs = lhs, eq_rhs = rhs_ty+ , eq_ev = ev, eq_eq_rel = eq_rel }) | not (fr_may_rewrite fs) = False -- (K0) Keep it in the inert set if the new thing can't rewrite it @@ -1427,14 +1585,31 @@ kick_out_for_completeness -- (K3) and Note [K3: completeness of solving] = case eq_rel of- NomEq -> rhs_ty `eqType` canEqLHSType new_lhs -- (K3a)- ReprEq -> is_can_eq_lhs_head new_lhs rhs_ty -- (K3b)+ NomEq -> is_new_lhs rhs_ty -- (K3a)+ ReprEq -> head_is_new_lhs rhs_ty -- (K3b) - kick_out_eq ct = pprPanic "kick_out_eq" (ppr ct)+ is_new_lhs :: Type -> Bool+ is_new_lhs = case ko_spec of -- See Note [KickOutSpec]+ KOAfterUnify tvs -> is_tyvar_ty_for tvs+ KOAfterAdding lhs -> (`eqType` canEqLHSType lhs) - is_can_eq_lhs_head (TyVarLHS tv) = go+ is_tyvar_ty_for :: TcTyVarSet -> Type -> Bool+ -- True if the type is equal to one of the tyvars+ is_tyvar_ty_for tvs ty+ = case getTyVar_maybe ty of+ Nothing -> False+ Just tv -> tv `elemVarSet` tvs++ head_is_new_lhs :: Type -> Bool+ head_is_new_lhs = case ko_spec of -- See Note [KickOutSpec]+ KOAfterUnify tvs -> tv_at_head (`elemVarSet` tvs)+ KOAfterAdding (TyVarLHS tv) -> tv_at_head (== tv)+ KOAfterAdding (TyFamLHS tf tf_args) -> fam_at_head tf tf_args++ tv_at_head :: (TyVar -> Bool) -> Type -> Bool+ tv_at_head is_tv = go where- go (Rep.TyVarTy tv') = tv == tv'+ go (Rep.TyVarTy tv) = is_tv tv go (Rep.AppTy fun _) = go fun go (Rep.CastTy ty _) = go ty go (Rep.TyConApp {}) = False@@ -1442,7 +1617,9 @@ go (Rep.ForAllTy {}) = False go (Rep.FunTy {}) = False go (Rep.CoercionTy {}) = False- is_can_eq_lhs_head (TyFamLHS fun_tc fun_args) = go++ fam_at_head :: TyCon -> [Type] -> Type -> Bool+ fam_at_head fun_tc fun_args = go where go (Rep.TyVarTy {}) = False go (Rep.AppTy {}) = False -- no TyConApp to the left of an AppTy@@ -1507,9 +1684,9 @@ * We kick insolubles out of the inert set, if they can be rewritten (see GHC.Tc.Solver.Monad.kick_out_rewritable) - * We rewrite those insolubles in GHC.Tc.Solver.Canonical.+ * We rewrite those insolubles in GHC.Tc.Solver.Equality See Note [Make sure that insolubles are fully rewritten]- in GHC.Tc.Solver.Canonical.+ in GHC.Tc.Solver.Equality -} {- *********************************************************************@@ -1539,13 +1716,13 @@ noGivenNewtypeReprEqs :: TyCon -> InertSet -> Bool -- True <=> there is no Irred looking like (N tys1 ~ N tys2)--- See Note [Decomposing newtype equalities] (EX2) in GHC.Tc.Solver.Canonical+-- See Note [Decomposing newtype equalities] (EX2) in GHC.Tc.Solver.Equality -- This is the only call site. noGivenNewtypeReprEqs tc inerts = not (anyBag might_help (inert_irreds (inert_cans inerts))) where- might_help ct- = case classifyPredType (ctPred ct) of+ might_help irred+ = case classifyPredType (ctEvPred (irredCtEvidence irred)) of EqPred ReprEq t1 t2 | Just (tc1,_) <- tcSplitTyConApp_maybe t1 , tc == tc1@@ -1557,7 +1734,7 @@ -- | Returns True iff there are no Given constraints that might, -- potentially, match the given class consraint. This is used when checking to see if a -- Given might overlap with an instance. See Note [Instance and Given overlap]--- in "GHC.Tc.Solver.Interact"+-- in GHC.Tc.Solver.Dict noMatchableGivenDicts :: InertSet -> CtLoc -> Class -> [TcType] -> Bool noMatchableGivenDicts inerts@(IS { inert_cans = inert_cans }) loc_w clas tys = not $ anyBag matchable_given $@@ -1565,9 +1742,9 @@ where pred_w = mkClassPred clas tys - matchable_given :: Ct -> Bool- matchable_given ct- | CtGiven { ctev_loc = loc_g, ctev_pred = pred_g } <- ctEvidence ct+ matchable_given :: DictCt -> Bool+ matchable_given (DictCt { di_ev = ev })+ | CtGiven { ctev_loc = loc_g, ctev_pred = pred_g } <- ev = isJust $ mightEqualLater inerts pred_g loc_g pred_w loc_w | otherwise@@ -1575,7 +1752,7 @@ mightEqualLater :: InertSet -> TcPredType -> CtLoc -> TcPredType -> CtLoc -> Maybe Subst -- See Note [What might equal later?]--- Used to implement logic in Note [Instance and Given overlap] in GHC.Tc.Solver.Interact+-- Used to implement logic in Note [Instance and Given overlap] in GHC.Tc.Solver.Dict mightEqualLater inert_set given_pred given_loc wanted_pred wanted_loc | prohibitedSuperClassSolve given_loc wanted_loc = Nothing@@ -1633,13 +1810,13 @@ | otherwise = False - -- like startSolvingByUnification, but allows cbv variables to unify+ -- Like checkTopShape, but allows cbv variables to unify can_unify :: TcTyVar -> MetaInfo -> Type -> Bool can_unify _lhs_tv TyVarTv rhs_ty -- see Example 3 from the Note | Just rhs_tv <- getTyVar_maybe rhs_ty = case tcTyVarDetails rhs_tv of MetaTv { mtv_info = TyVarTv } -> True- MetaTv {} -> False -- could unify with anything+ MetaTv {} -> False -- Could unify with anything SkolemTv {} -> True RuntimeUnk -> True | otherwise -- not a var on the RHS@@ -1720,7 +1897,7 @@ where cbv = F a The cbv is a cycle-breaker var which stands for F a. See- Note [Type equality cycles] in GHC.Tc.Solver.Canonical.+ Note [Type equality cycles] in GHC.Tc.Solver.Equality This is just like case 6, and we say "no". Saying "no" here is essential in getting the parser to type-check, with its use of DisambECP. @@ -1811,7 +1988,7 @@ -- to avoid #20231. This function (and its one usage site) is the only reason -- that we store a stack instead of just the top environment. | Just tyfam_app <- assert (isCycleBreakerTyVar cbv) $- firstJusts (NE.map (lookup cbv) cbvs_stack)+ firstJusts (NE.map (lookupBag cbv) cbvs_stack) = tyfam_app | otherwise = pprPanic "lookupCycleBreakerVar found an unbound cycle breaker" (ppr cbv $$ ppr cbvs_stack)@@ -1819,15 +1996,16 @@ -- | Push a fresh environment onto the cycle-breaker var stack. Useful -- when entering a nested implication. pushCycleBreakerVarStack :: CycleBreakerVarStack -> CycleBreakerVarStack-pushCycleBreakerVarStack = ([] <|)+pushCycleBreakerVarStack = (emptyBag <|) -- | Add a new cycle-breaker binding to the top environment on the stack.-insertCycleBreakerBinding :: TcTyVar -- ^ cbv, must be a CycleBreakerTv- -> TcType -- ^ cbv's expansion- -> CycleBreakerVarStack -> CycleBreakerVarStack-insertCycleBreakerBinding cbv expansion (top_env :| rest_envs)- = assert (isCycleBreakerTyVar cbv) $- ((cbv, expansion) : top_env) :| rest_envs+addCycleBreakerBindings :: Bag (TcTyVar, Type) -- ^ (cbv,expansion) pairs+ -> InertSet -> InertSet+addCycleBreakerBindings prs ics+ = assertPpr (all (isCycleBreakerTyVar . fst) prs) (ppr prs) $+ ics { inert_cycle_breakers = add_to (inert_cycle_breakers ics) }+ where+ add_to (top_env :| rest_envs) = (prs `unionBags` top_env) :| rest_envs -- | Perform a monadic operation on all pairs in the top environment -- in the stack.@@ -1837,3 +2015,199 @@ forAllCycleBreakerBindings_ (top_env :| _rest_envs) action = forM_ top_env (uncurry action) {-# INLINABLE forAllCycleBreakerBindings_ #-} -- to allow SPECIALISE later+++{- *********************************************************************+* *+ Solving one from another+* *+********************************************************************* -}++data InteractResult+ = KeepInert -- Keep the inert item, and solve the work item from it+ -- (if the latter is Wanted; just discard it if not)+ | KeepWork -- Keep the work item, and solve the inert item from it++instance Outputable InteractResult where+ ppr KeepInert = text "keep inert"+ ppr KeepWork = text "keep work-item"++solveOneFromTheOther :: Ct -- Inert (Dict or Irred)+ -> Ct -- WorkItem (same predicate as inert)+ -> InteractResult+-- Precondition:+-- * inert and work item represent evidence for the /same/ predicate+-- * Both are CDictCan or CIrredCan+--+-- We can always solve one from the other: even if both are wanted,+-- although we don't rewrite wanteds with wanteds, we can combine+-- two wanteds into one by solving one from the other++solveOneFromTheOther ct_i ct_w+ | CtWanted { ctev_loc = loc_w } <- ev_w+ , prohibitedSuperClassSolve loc_i loc_w+ -- See Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance+ = -- Inert must be Given+ KeepWork++ | CtWanted {} <- ev_w+ = -- Inert is Given or Wanted+ case ev_i of+ CtGiven {} -> KeepInert+ -- work is Wanted; inert is Given: easy choice.++ CtWanted {} -- Both are Wanted+ -- If only one has no pending superclasses, use it+ -- Otherwise we can get infinite superclass expansion (#22516)+ -- in silly cases like class C T b => C a b where ...+ | not is_psc_i, is_psc_w -> KeepInert+ | is_psc_i, not is_psc_w -> KeepWork++ -- If only one is a WantedSuperclassOrigin (arising from expanding+ -- a Wanted class constraint), keep the other: wanted superclasses+ -- may be unexpected by users+ | not is_wsc_orig_i, is_wsc_orig_w -> KeepInert+ | is_wsc_orig_i, not is_wsc_orig_w -> KeepWork++ -- otherwise, just choose the lower span+ -- reason: if we have something like (abs 1) (where the+ -- Num constraint cannot be satisfied), it's better to+ -- get an error about abs than about 1.+ -- This test might become more elaborate if we see an+ -- opportunity to improve the error messages+ | ((<) `on` ctLocSpan) loc_i loc_w -> KeepInert+ | otherwise -> KeepWork++ -- From here on the work-item is Given++ | CtWanted { ctev_loc = loc_i } <- ev_i+ , prohibitedSuperClassSolve loc_w loc_i+ = KeepInert -- Just discard the un-usable Given+ -- This never actually happens because+ -- Givens get processed first++ | CtWanted {} <- ev_i+ = KeepWork++ -- From here on both are Given+ -- See Note [Replacement vs keeping]++ | lvl_i == lvl_w+ = same_level_strategy++ | otherwise -- Both are Given, levels differ+ = different_level_strategy+ where+ ev_i = ctEvidence ct_i+ ev_w = ctEvidence ct_w++ pred = ctEvPred ev_i++ loc_i = ctEvLoc ev_i+ loc_w = ctEvLoc ev_w+ orig_i = ctLocOrigin loc_i+ orig_w = ctLocOrigin loc_w+ lvl_i = ctLocLevel loc_i+ lvl_w = ctLocLevel loc_w++ is_psc_w = isPendingScDict ct_w+ is_psc_i = isPendingScDict ct_i++ is_wsc_orig_i = isWantedSuperclassOrigin orig_i+ is_wsc_orig_w = isWantedSuperclassOrigin orig_w++ different_level_strategy -- Both Given+ | isIPLikePred pred = if lvl_w > lvl_i then KeepWork else KeepInert+ | otherwise = if lvl_w > lvl_i then KeepInert else KeepWork+ -- See Note [Replacement vs keeping] part (1)+ -- For the isIPLikePred case see Note [Shadowing of implicit parameters]+ -- in GHC.Tc.Solver.Dict++ same_level_strategy -- Both Given+ = case (orig_i, orig_w) of++ (GivenSCOrigin _ depth_i blocked_i, GivenSCOrigin _ depth_w blocked_w)+ | blocked_i, not blocked_w -> KeepWork -- Case 2(a) from+ | not blocked_i, blocked_w -> KeepInert -- Note [Replacement vs keeping]++ -- Both blocked or both not blocked++ | depth_w < depth_i -> KeepWork -- Case 2(c) from+ | otherwise -> KeepInert -- Note [Replacement vs keeping]++ (GivenSCOrigin {}, _) -> KeepWork -- Case 2(b) from Note [Replacement vs keeping]++ _ -> KeepInert -- Case 2(d) from Note [Replacement vs keeping]++{-+Note [Replacement vs keeping]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we have two Given constraints both of type (C tys), say, which should+we keep? More subtle than you might think! This is all implemented in+solveOneFromTheOther.++ 1) Constraints come from different levels (different_level_strategy)++ - For implicit parameters we want to keep the innermost (deepest)+ one, so that it overrides the outer one.+ See Note [Shadowing of implicit parameters] in GHC.Tc.Solver.Dict++ - For everything else, we want to keep the outermost one. Reason: that+ makes it more likely that the inner one will turn out to be unused,+ and can be reported as redundant. See Note [Tracking redundant constraints]+ in GHC.Tc.Solver.++ It transpires that using the outermost one is responsible for an+ 8% performance improvement in nofib cryptarithm2, compared to+ just rolling the dice. I didn't investigate why.++ 2) Constraints coming from the same level (i.e. same implication)++ (a) If both are GivenSCOrigin, choose the one that is unblocked if possible+ according to Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance.++ (b) Prefer constraints that are not superclass selections. Example:++ f :: (Eq a, Ord a) => a -> Bool+ f x = x == x++ Eager superclass expansion gives us two [G] Eq a constraints. We+ want to keep the one from the user-written Eq a, not the superclass+ selection. This means we report the Ord a as redundant with+ -Wredundant-constraints, not the Eq a.++ Getting this wrong was #20602. See also+ Note [Tracking redundant constraints] in GHC.Tc.Solver.++ (c) If both are GivenSCOrigin, chooose the one with the shallower+ superclass-selection depth, in the hope of identifying more correct+ redundant constraints. This is really a generalization of point (b),+ because the superclass depth of a non-superclass constraint is 0.++ (If the levels differ, we definitely won't have both with GivenSCOrigin.)++ (d) 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 GHC.Tc.Solver.Dict++Doing the level-check for implicit parameters, rather than making the work item+always override, is important. Consider++ data T a where { T1 :: (?x::Int) => T Int; T2 :: T a }++ f :: (?x::a) => T a -> Int+ f T1 = ?x+ f T2 = 3++We have a [G] (?x::a) in the inert set, and at the pattern match on T1 we add+two new givens in the work-list: [G] (?x::Int)+ [G] (a ~ Int)+Now consider these steps+ - process a~Int, kicking out (?x::a)+ - process (?x::Int), the inner given, adding to inert set+ - process (?x::a), the outer given, overriding the inner given+Wrong! The level-check ensures that the inner implicit parameter wins.+(Actually I think that the order in which the work-list is processed means+that this chain of events won't happen, but that's very fragile.)+-}
− GHC/Tc/Solver/Interact.hs
@@ -1,2836 +0,0 @@-{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}--module GHC.Tc.Solver.Interact (- solveSimpleGivens, -- Solves [Ct]- solveSimpleWanteds -- Solves Cts- ) where--import GHC.Prelude-import GHC.Types.Basic ( SwapFlag(..), IntWithInf, intGtLimit )-import GHC.Tc.Solver.Canonical-import GHC.Types.Var.Set--import GHC.Types.Var-import GHC.Tc.Errors.Types-import GHC.Tc.Utils.TcType-import GHC.Builtin.Names ( coercibleTyConKey, heqTyConKey, eqTyConKey, ipClassKey )-import GHC.Tc.Instance.FunDeps-import GHC.Tc.Instance.Family-import GHC.Tc.Instance.Class ( InstanceWhat(..), safeOverlap )--import GHC.Tc.Types.Evidence-import GHC.Utils.Outputable-import GHC.Utils.Panic--import GHC.Tc.Types-import GHC.Tc.Types.Constraint-import GHC.Tc.Types.Origin-import GHC.Tc.Utils.TcMType( promoteMetaTyVarTo )-import GHC.Tc.Solver.Types-import GHC.Tc.Solver.InertSet-import GHC.Tc.Solver.Monad--import GHC.Core-import GHC.Core.Type as Type-import GHC.Core.InstEnv ( DFunInstType )-import GHC.Core.Class-import GHC.Core.TyCon-import GHC.Core.Reduction-import GHC.Core.Predicate-import GHC.Core.Coercion-import GHC.Core.FamInstEnv-import GHC.Core.Unify ( tcUnifyTyWithTFs, ruleMatchTyKiX )-import GHC.Core.Coercion.Axiom ( CoAxBranch (..), CoAxiom (..), TypeEqn, fromBranches- , sfInteractInert, sfInteractTop )--import GHC.Types.SrcLoc-import GHC.Types.Var.Env-import GHC.Types.Unique( hasKey )--import GHC.Data.Bag-import GHC.Data.Pair (Pair(..))--import GHC.Utils.Monad ( concatMapM, foldlM )-import GHC.Utils.Misc--import GHC.Driver.Session--import qualified GHC.LanguageExtensions as LangExt--import Data.List( deleteFirstsBy )-import Data.Maybe ( listToMaybe, mapMaybe )-import Data.Function ( on )-import qualified Data.Semigroup as S--import Control.Monad.Trans.Class-import Control.Monad.Trans.Maybe-import Control.Monad--{--**********************************************************************-* *-* Main Interaction Solver *-* *-**********************************************************************--Note [Basic Simplifier Plan]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-1. Pick an element from the WorkList if there exists one with depth- less than our context-stack depth.--2. Run it down the 'stage' pipeline. Stages are:- - canonicalization- - inert reactions- - spontaneous reactions- - top-level interactions- Each stage returns a StopOrContinue and may have sideeffected- the inerts or worklist.-- The threading of the stages is as follows:- - If (Stop) is returned by a stage then we start again from Step 1.- - If (ContinueWith ct) is returned by a stage, we feed 'ct' on to- the next stage in the pipeline.-4. If the element has survived (i.e. ContinueWith x) the last stage- then we add it in the inerts and jump back to Step 1.--If in Step 1 no such element exists, we have exceeded our context-stack-depth and will simply fail.--}--solveSimpleGivens :: [Ct] -> TcS ()-solveSimpleGivens givens- | null givens -- Shortcut for common case- = return ()- | otherwise- = do { traceTcS "solveSimpleGivens {" (ppr givens)- ; go givens- ; traceTcS "End solveSimpleGivens }" empty }- where- go givens = do { solveSimples (listToBag givens)- ; new_givens <- runTcPluginsGiven- ; when (notNull new_givens) $- go new_givens }--solveSimpleWanteds :: Cts -> TcS WantedConstraints--- The result is not necessarily zonked-solveSimpleWanteds simples- = do { traceTcS "solveSimpleWanteds {" (ppr simples)- ; dflags <- getDynFlags- ; (n,wc) <- go 1 (solverIterations dflags) (emptyWC { wc_simple = simples })- ; traceTcS "solveSimpleWanteds end }" $- vcat [ text "iterations =" <+> ppr n- , text "residual =" <+> ppr wc ]- ; return wc }- where- go :: Int -> IntWithInf -> WantedConstraints -> TcS (Int, WantedConstraints)- go n limit wc- | n `intGtLimit` limit- = failTcS $ TcRnSimplifierTooManyIterations simples limit wc- | isEmptyBag (wc_simple wc)- = return (n,wc)-- | otherwise- = do { -- Solve- wc1 <- solve_simple_wanteds wc-- -- Run plugins- ; (rerun_plugin, wc2) <- runTcPluginsWanted wc1-- ; if rerun_plugin- then do { traceTcS "solveSimple going round again:" (ppr rerun_plugin)- ; go (n+1) limit wc2 } -- Loop- else return (n, wc2) } -- Done---solve_simple_wanteds :: WantedConstraints -> TcS WantedConstraints--- Try solving these constraints--- Affects the unification state (of course) but not the inert set--- The result is not necessarily zonked-solve_simple_wanteds (WC { wc_simple = simples1, wc_impl = implics1, wc_errors = errs })- = nestTcS $- do { solveSimples simples1- ; (implics2, unsolved) <- getUnsolvedInerts- ; return (WC { wc_simple = unsolved- , wc_impl = implics1 `unionBags` implics2- , wc_errors = errs }) }--{- Note [The solveSimpleWanteds loop]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Solving a bunch of simple constraints is done in a loop,-(the 'go' loop of 'solveSimpleWanteds'):- 1. Try to solve them- 2. Try the plugin- 3. If the plugin wants to run again, go back to step 1--}---- The main solver loop implements Note [Basic Simplifier Plan]-----------------------------------------------------------------solveSimples :: Cts -> TcS ()--- Returns the final InertSet in TcS--- Has no effect on work-list or residual-implications--- The constraints are initially examined in left-to-right order--solveSimples cts- = {-# SCC "solveSimples" #-}- do { updWorkListTcS (\wl -> foldr extendWorkListCt wl cts)- ; solve_loop }- where- solve_loop- = {-# SCC "solve_loop" #-}- do { sel <- selectNextWorkItem- ; case sel of- Nothing -> return ()- Just ct -> do { runSolverPipeline thePipeline ct- ; solve_loop } }---- | Extract the (inert) givens and invoke the plugins on them.--- Remove solved givens from the inert set and emit insolubles, but--- return new work produced so that 'solveSimpleGivens' can feed it back--- into the main solver.-runTcPluginsGiven :: TcS [Ct]-runTcPluginsGiven- = do { solvers <- getTcPluginSolvers- ; if null solvers then return [] else- do { givens <- getInertGivens- ; if null givens then return [] else- do { p <- runTcPluginSolvers solvers (givens,[])- ; let (solved_givens, _) = pluginSolvedCts p- insols = pluginBadCts p- ; updInertCans (removeInertCts solved_givens)- ; updInertIrreds (\irreds -> extendCtsList irreds insols)- ; return (pluginNewCts p) } } }---- | Given a bag of (rewritten, zonked) wanteds, invoke the plugins on--- them and produce an updated bag of wanteds (possibly with some new--- work) and a bag of insolubles. The boolean indicates whether--- 'solveSimpleWanteds' should feed the updated wanteds back into the--- main solver.-runTcPluginsWanted :: WantedConstraints -> TcS (Bool, WantedConstraints)-runTcPluginsWanted wc@(WC { wc_simple = simples1 })- | isEmptyBag simples1- = return (False, wc)- | otherwise- = do { solvers <- getTcPluginSolvers- ; if null solvers then return (False, wc) else-- do { given <- getInertGivens- ; wanted <- zonkSimples simples1 -- Plugin requires zonked inputs- ; p <- runTcPluginSolvers solvers (given, bagToList wanted)- ; let (_, solved_wanted) = pluginSolvedCts p- (_, unsolved_wanted) = pluginInputCts p- new_wanted = pluginNewCts p- insols = pluginBadCts p---- SLPJ: I'm deeply suspicious of this--- ; updInertCans (removeInertCts $ solved_givens)-- ; mapM_ setEv solved_wanted- ; return ( notNull (pluginNewCts p)- , wc { wc_simple = listToBag new_wanted `andCts`- listToBag unsolved_wanted `andCts`- listToBag insols } ) } }- where- setEv :: (EvTerm,Ct) -> TcS ()- setEv (ev,ct) = case ctEvidence ct of- CtWanted { ctev_dest = dest } -> setWantedEvTerm dest ev- _ -> panic "runTcPluginsWanted.setEv: attempt to solve non-wanted!"---- | A pair of (given, wanted) constraints to pass to plugins-type SplitCts = ([Ct], [Ct])---- | A solved pair of constraints, with evidence for wanteds-type SolvedCts = ([Ct], [(EvTerm,Ct)])---- | Represents collections of constraints generated by typechecker--- plugins-data TcPluginProgress = TcPluginProgress- { pluginInputCts :: SplitCts- -- ^ Original inputs to the plugins with solved/bad constraints- -- removed, but otherwise unmodified- , pluginSolvedCts :: SolvedCts- -- ^ Constraints solved by plugins- , pluginBadCts :: [Ct]- -- ^ Constraints reported as insoluble by plugins- , pluginNewCts :: [Ct]- -- ^ New constraints emitted by plugins- }--getTcPluginSolvers :: TcS [TcPluginSolver]-getTcPluginSolvers- = do { tcg_env <- getGblEnv; return (tcg_tc_plugin_solvers tcg_env) }---- | Starting from a pair of (given, wanted) constraints,--- invoke each of the typechecker constraint-solving plugins in turn and return------ * the remaining unmodified constraints,--- * constraints that have been solved,--- * constraints that are insoluble, and--- * new work.------ Note that new work generated by one plugin will not be seen by--- other plugins on this pass (but the main constraint solver will be--- re-invoked and they will see it later). There is no check that new--- work differs from the original constraints supplied to the plugin:--- the plugin itself should perform this check if necessary.-runTcPluginSolvers :: [TcPluginSolver] -> SplitCts -> TcS TcPluginProgress-runTcPluginSolvers solvers all_cts- = do { ev_binds_var <- getTcEvBindsVar- ; foldM (do_plugin ev_binds_var) initialProgress solvers }- where- do_plugin :: EvBindsVar -> TcPluginProgress -> TcPluginSolver -> TcS TcPluginProgress- do_plugin ev_binds_var p solver = do- result <- runTcPluginTcS (uncurry (solver ev_binds_var) (pluginInputCts p))- return $ progress p result-- progress :: TcPluginProgress -> TcPluginSolveResult -> TcPluginProgress- progress p- (TcPluginSolveResult- { tcPluginInsolubleCts = bad_cts- , tcPluginSolvedCts = solved_cts- , tcPluginNewCts = new_cts- }- ) =- p { pluginInputCts = discard (bad_cts ++ map snd solved_cts) (pluginInputCts p)- , pluginSolvedCts = add solved_cts (pluginSolvedCts p)- , pluginNewCts = new_cts ++ pluginNewCts p- , pluginBadCts = bad_cts ++ pluginBadCts p- }-- initialProgress = TcPluginProgress all_cts ([], []) [] []-- discard :: [Ct] -> SplitCts -> SplitCts- discard cts (xs, ys) =- (xs `without` cts, ys `without` cts)-- without :: [Ct] -> [Ct] -> [Ct]- without = deleteFirstsBy eqCt-- eqCt :: Ct -> Ct -> Bool- eqCt c c' = ctFlavour c == ctFlavour c'- && ctPred c `tcEqType` ctPred c'-- add :: [(EvTerm,Ct)] -> SolvedCts -> SolvedCts- add xs scs = foldl' addOne scs xs-- addOne :: SolvedCts -> (EvTerm,Ct) -> SolvedCts- addOne (givens, wanteds) (ev,ct) = case ctEvidence ct of- CtGiven {} -> (ct:givens, wanteds)- CtWanted {} -> (givens, (ev,ct):wanteds)---type WorkItem = Ct-type SimplifierStage = WorkItem -> TcS (StopOrContinue Ct)--runSolverPipeline :: [(String,SimplifierStage)] -- The pipeline- -> WorkItem -- The work item- -> TcS ()--- Run this item down the pipeline, leaving behind new work and inerts-runSolverPipeline pipeline workItem- = do { wl <- getWorkList- ; inerts <- getTcSInerts- ; tclevel <- getTcLevel- ; traceTcS "----------------------------- " empty- ; traceTcS "Start solver pipeline {" $- vcat [ text "tclevel =" <+> ppr tclevel- , text "work item =" <+> ppr workItem- , text "inerts =" <+> ppr inerts- , text "rest of worklist =" <+> ppr wl ]-- ; bumpStepCountTcS -- One step for each constraint processed- ; final_res <- run_pipeline pipeline (ContinueWith workItem)-- ; case final_res of- Stop ev s -> do { traceFireTcS ev s- ; traceTcS "End solver pipeline (discharged) }" empty- ; return () }- ContinueWith ct -> do { addInertCan ct- ; traceFireTcS (ctEvidence ct) (text "Kept as inert")- ; traceTcS "End solver pipeline (kept as inert) }" $- (text "final_item =" <+> ppr ct) }- }- where run_pipeline :: [(String,SimplifierStage)] -> StopOrContinue Ct- -> TcS (StopOrContinue Ct)- run_pipeline [] res = return res- run_pipeline _ (Stop ev s) = return (Stop ev s)- run_pipeline ((stg_name,stg):stgs) (ContinueWith ct)- = do { traceTcS ("runStage " ++ stg_name ++ " {")- (text "workitem = " <+> ppr ct)- ; res <- stg ct- ; traceTcS ("end stage " ++ stg_name ++ " }") empty- ; run_pipeline stgs res }--{--Example 1:- Inert: {c ~ d, F a ~ t, b ~ Int, a ~ ty} (all given)- Reagent: a ~ [b] (given)--React with (c~d) ==> IR (ContinueWith (a~[b])) True []-React with (F a ~ t) ==> IR (ContinueWith (a~[b])) False [F [b] ~ t]-React with (b ~ Int) ==> IR (ContinueWith (a~[Int]) True []--Example 2:- Inert: {c ~w d, F a ~g t, b ~w Int, a ~w ty}- Reagent: a ~w [b]--React with (c ~w d) ==> IR (ContinueWith (a~[b])) True []-React with (F a ~g t) ==> IR (ContinueWith (a~[b])) True [] (can't rewrite given with wanted!)-etc.--Example 3:- Inert: {a ~ Int, F Int ~ b} (given)- Reagent: F a ~ b (wanted)--React with (a ~ Int) ==> IR (ContinueWith (F Int ~ b)) True []-React with (F Int ~ b) ==> IR Stop True [] -- after substituting we re-canonicalize and get nothing--}--thePipeline :: [(String,SimplifierStage)]-thePipeline = [ ("canonicalization", GHC.Tc.Solver.Canonical.canonicalize)- , ("interact with inerts", interactWithInertsStage)- , ("top-level reactions", topReactionsStage) ]--{--*********************************************************************************-* *- The interact-with-inert Stage-* *-*********************************************************************************--Note [The Solver Invariant]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-We always add Givens first. So you might think that the solver has-the invariant-- If the work-item is Given,- then the inert item must Given--But this isn't quite true. Suppose we have,- 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 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].--It *is* true that [Solver Invariant]- If the work-item is Given,- AND there is a reaction- then the inert item must Given-or, equivalently,- If the work-item is Given,- and the inert item is Wanted- then there is no reaction--}---- Interaction result of WorkItem <~> Ct--interactWithInertsStage :: WorkItem -> TcS (StopOrContinue Ct)--- Precondition: if the workitem is a CEqCan then it will not be able to--- react with anything at this stage (except, maybe, via a type family--- dependency)--interactWithInertsStage wi- = do { inerts <- getTcSInerts- ; let ics = inert_cans inerts- ; case wi of- CEqCan {} -> interactEq ics wi- CIrredCan {} -> interactIrred ics wi- CDictCan {} -> interactDict ics wi- _ -> pprPanic "interactWithInerts" (ppr wi) }- -- CNonCanonical have been canonicalised--data InteractResult- = KeepInert -- Keep the inert item, and solve the work item from it- -- (if the latter is Wanted; just discard it if not)- | KeepWork -- Keep the work item, and solve the inert item from it--instance Outputable InteractResult where- ppr KeepInert = text "keep inert"- ppr KeepWork = text "keep work-item"--solveOneFromTheOther :: Ct -- Inert (Dict or Irred)- -> Ct -- WorkItem (same predicate as inert)- -> InteractResult--- Precondition:--- * inert and work item represent evidence for the /same/ predicate--- * Both are CDictCan or CIrredCan------ We can always solve one from the other: even if both are wanted,--- although we don't rewrite wanteds with wanteds, we can combine--- two wanteds into one by solving one from the other--solveOneFromTheOther ct_i ct_w- | CtWanted { ctev_loc = loc_w } <- ev_w- , prohibitedSuperClassSolve loc_i loc_w- -- See Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance- = -- Inert must be Given- KeepWork-- | CtWanted {} <- ev_w- = -- Inert is Given or Wanted- case ev_i of- CtGiven {} -> KeepInert- -- work is Wanted; inert is Given: easy choice.-- CtWanted {} -- Both are Wanted- -- If only one has no pending superclasses, use it- -- Otherwise we can get infinite superclass expansion (#22516)- -- in silly cases like class C T b => C a b where ...- | not is_psc_i, is_psc_w -> KeepInert- | is_psc_i, not is_psc_w -> KeepWork-- -- If only one is a WantedSuperclassOrigin (arising from expanding- -- a Wanted class constraint), keep the other: wanted superclasses- -- may be unexpected by users- | not is_wsc_orig_i, is_wsc_orig_w -> KeepInert- | is_wsc_orig_i, not is_wsc_orig_w -> KeepWork-- -- otherwise, just choose the lower span- -- reason: if we have something like (abs 1) (where the- -- Num constraint cannot be satisfied), it's better to- -- get an error about abs than about 1.- -- This test might become more elaborate if we see an- -- opportunity to improve the error messages- | ((<) `on` ctLocSpan) loc_i loc_w -> KeepInert- | otherwise -> KeepWork-- -- From here on the work-item is Given-- | CtWanted { ctev_loc = loc_i } <- ev_i- , prohibitedSuperClassSolve loc_w loc_i- = KeepInert -- Just discard the un-usable Given- -- This never actually happens because- -- Givens get processed first-- | CtWanted {} <- ev_i- = KeepWork-- -- From here on both are Given- -- See Note [Replacement vs keeping]-- | lvl_i == lvl_w- = same_level_strategy-- | otherwise -- Both are Given, levels differ- = different_level_strategy- where- ev_i = ctEvidence ct_i- ev_w = ctEvidence ct_w-- pred = ctEvPred ev_i-- loc_i = ctEvLoc ev_i- loc_w = ctEvLoc ev_w- orig_i = ctLocOrigin loc_i- orig_w = ctLocOrigin loc_w- lvl_i = ctLocLevel loc_i- lvl_w = ctLocLevel loc_w-- is_psc_w = isPendingScDict ct_w- is_psc_i = isPendingScDict ct_i-- is_wsc_orig_i = isWantedSuperclassOrigin orig_i- is_wsc_orig_w = isWantedSuperclassOrigin orig_w-- different_level_strategy -- Both Given- | isIPLikePred pred = if lvl_w > lvl_i then KeepWork else KeepInert- | otherwise = if lvl_w > lvl_i then KeepInert else KeepWork- -- See Note [Replacement vs keeping] part (1)- -- For the isIPLikePred case see Note [Shadowing of Implicit Parameters]-- same_level_strategy -- Both Given- = case (orig_i, orig_w) of-- (GivenSCOrigin _ depth_i blocked_i, GivenSCOrigin _ depth_w blocked_w)- | blocked_i, not blocked_w -> KeepWork -- Case 2(a) from- | not blocked_i, blocked_w -> KeepInert -- Note [Replacement vs keeping]-- -- Both blocked or both not blocked-- | depth_w < depth_i -> KeepWork -- Case 2(c) from- | otherwise -> KeepInert -- Note [Replacement vs keeping]-- (GivenSCOrigin {}, _) -> KeepWork -- Case 2(b) from Note [Replacement vs keeping]-- _ -> KeepInert -- Case 2(d) from Note [Replacement vs keeping]--{--Note [Replacement vs keeping]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When we have two Given constraints both of type (C tys), say, which should-we keep? More subtle than you might think! This is all implemented in-solveOneFromTheOther.-- 1) Constraints come from different levels (different_level_strategy)-- - For implicit parameters we want to keep the innermost (deepest)- one, so that it overrides the outer one.- See Note [Shadowing of Implicit Parameters]-- - For everything else, we want to keep the outermost one. Reason: that- makes it more likely that the inner one will turn out to be unused,- and can be reported as redundant. See Note [Tracking redundant constraints]- in GHC.Tc.Solver.-- It transpires that using the outermost one is responsible for an- 8% performance improvement in nofib cryptarithm2, compared to- just rolling the dice. I didn't investigate why.-- 2) Constraints coming from the same level (i.e. same implication)-- (a) If both are GivenSCOrigin, choose the one that is unblocked if possible- according to Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance.-- (b) Prefer constraints that are not superclass selections. Example:-- f :: (Eq a, Ord a) => a -> Bool- f x = x == x-- Eager superclass expansion gives us two [G] Eq a constraints. We- want to keep the one from the user-written Eq a, not the superclass- selection. This means we report the Ord a as redundant with- -Wredundant-constraints, not the Eq a.-- Getting this wrong was #20602. See also- Note [Tracking redundant constraints] in GHC.Tc.Solver.-- (c) If both are GivenSCOrigin, chooose the one with the shallower- superclass-selection depth, in the hope of identifying more correct- redundant constraints. This is really a generalization of point (b),- because the superclass depth of a non-superclass constraint is 0.-- (If the levels differ, we definitely won't have both with GivenSCOrigin.)-- (d) 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 GHC.Tc.Solver.Canonical--Doing the level-check for implicit parameters, rather than making the work item-always override, is important. Consider-- data T a where { T1 :: (?x::Int) => T Int; T2 :: T a }-- f :: (?x::a) => T a -> Int- f T1 = ?x- f T2 = 3--We have a [G] (?x::a) in the inert set, and at the pattern match on T1 we add-two new givens in the work-list: [G] (?x::Int)- [G] (a ~ Int)-Now consider these steps- - process a~Int, kicking out (?x::a)- - process (?x::Int), the inner given, adding to inert set- - process (?x::a), the outer given, overriding the inner given-Wrong! The level-check ensures that the inner implicit parameter wins.-(Actually I think that the order in which the work-list is processed means-that this chain of events won't happen, but that's very fragile.)--*********************************************************************************-* *- 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*--- we can rewrite them. We can never improve using this:--- if we want ty1 :: Constraint and have ty2 :: Constraint it clearly does not--- mean that (ty1 ~ ty2)-interactIrred :: InertCans -> Ct -> TcS (StopOrContinue Ct)--interactIrred inerts ct_w@(CIrredCan { cc_ev = ev_w, cc_reason = reason })- | isInsolubleReason reason- -- For insolubles, don't allow the constraint to be dropped- -- which can happen with solveOneFromTheOther, so that- -- we get distinct error messages with -fdefer-type-errors- = continueWith ct_w-- | let (matching_irreds, others) = findMatchingIrreds (inert_irreds inerts) ev_w- , ((ct_i, swap) : _rest) <- bagToList matching_irreds- -- See Note [Multiple matching irreds]- , let ev_i = ctEvidence ct_i- = do { traceTcS "iteractIrred" $- vcat [ text "wanted:" <+> (ppr ct_w $$ ppr (ctOrigin ct_w))- , text "inert: " <+> (ppr ct_i $$ ppr (ctOrigin ct_i)) ]- ; case solveOneFromTheOther ct_i ct_w of- KeepInert -> do { setEvBindIfWanted ev_w (swap_me swap ev_i)- ; return (Stop ev_w (text "Irred equal:KeepInert" <+> ppr ct_w)) }- KeepWork -> do { setEvBindIfWanted ev_i (swap_me swap ev_w)- ; updInertIrreds (\_ -> others)- ; continueWith ct_w } }-- | otherwise- = continueWith ct_w-- where- swap_me :: SwapFlag -> CtEvidence -> EvTerm- swap_me swap ev- = case swap of- NotSwapped -> ctEvTerm ev- IsSwapped -> evCoercion (mkSymCo (evTermCoercion (ctEvTerm ev)))--interactIrred _ wi = pprPanic "interactIrred" (ppr wi)--findMatchingIrreds :: Cts -> CtEvidence -> (Bag (Ct, SwapFlag), Bag Ct)-findMatchingIrreds irreds ev- | EqPred eq_rel1 lty1 rty1 <- classifyPredType pred- -- See Note [Solving irreducible equalities]- = partitionBagWith (match_eq eq_rel1 lty1 rty1) irreds- | otherwise- = partitionBagWith match_non_eq irreds- where- pred = ctEvPred ev- match_non_eq ct- | ctPred ct `tcEqTypeNoKindCheck` pred = Left (ct, NotSwapped)- | otherwise = Right ct-- match_eq eq_rel1 lty1 rty1 ct- | EqPred eq_rel2 lty2 rty2 <- classifyPredType (ctPred ct)- , eq_rel1 == eq_rel2- , Just swap <- match_eq_help lty1 rty1 lty2 rty2- = Left (ct, swap)- | otherwise- = Right ct-- match_eq_help lty1 rty1 lty2 rty2- | lty1 `tcEqTypeNoKindCheck` lty2, rty1 `tcEqTypeNoKindCheck` rty2- = Just NotSwapped- | lty1 `tcEqTypeNoKindCheck` rty2, rty1 `tcEqTypeNoKindCheck` lty2- = Just IsSwapped- | otherwise- = Nothing--{- Note [Solving irreducible equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (#14333)- [G] a b ~R# c d- [W] c d ~R# a b-Clearly we should be able to solve this! Even though the constraints are-not decomposable. We solve this when looking up the work-item in the-irreducible constraints to look for an identical one. When doing this-lookup, findMatchingIrreds spots the equality case, and matches either-way around. It has to return a swap-flag so we can generate evidence-that is the right way round too.--}--{--*********************************************************************************-* *- interactDict-* *-*********************************************************************************--Note [Shortcut solving]-~~~~~~~~~~~~~~~~~~~~~~~-When we interact a [W] constraint with a [G] constraint that solves it, there is-a possibility that we could produce better code if instead we solved from a-top-level instance declaration (See #12791, #5835). For example:-- class M a b where m :: a -> b-- type C a b = (Num a, M a b)-- f :: C Int b => b -> Int -> Int- f _ x = x + 1--The body of `f` requires a [W] `Num Int` instance. We could solve this-constraint from the givens because we have `C Int b` and that provides us a-solution for `Num Int`. This would let us produce core like the following-(with -O2):-- f :: forall b. C Int b => b -> Int -> Int- f = \ (@ b) ($d(%,%) :: C Int b) _ (eta1 :: Int) ->- + @ Int- (GHC.Classes.$p1(%,%) @ (Num Int) @ (M Int b) $d(%,%))- eta1- A.f1--This is bad! We could do /much/ better if we solved [W] `Num Int` directly-from the instance that we have in scope:-- f :: forall b. C Int b => b -> Int -> Int- f = \ (@ b) _ _ (x :: Int) ->- case x of { GHC.Types.I# x1 -> GHC.Types.I# (GHC.Prim.+# x1 1#) }--** NB: It is important to emphasize that all this is purely an optimization:-** exactly the same programs should typecheck with or without this-** procedure.--Solving fully-~~~~~~~~~~~~~-There is a reason why the solver does not simply try to solve such-constraints with top-level instances. If the solver finds a relevant-instance declaration in scope, that instance may require a context-that can't be solved for. A good example of this is:-- f :: Ord [a] => ...- f x = ..Need Eq [a]...--If we have instance `Eq a => Eq [a]` in scope and we tried to use it, we would-be left with the obligation to solve the constraint Eq a, which we cannot. So we-must be conservative in our attempt to use an instance declaration to solve the-[W] constraint we're interested in.--Our rule is that we try to solve all of the instance's subgoals-recursively all at once. Precisely: We only attempt to solve-constraints of the form `C1, ... Cm => C t1 ... t n`, where all the Ci-are themselves class constraints of the form `C1', ... Cm' => C' t1'-... tn'` and we only succeed if the entire tree of constraints is-solvable from instances.--An example that succeeds:-- class Eq a => C a b | b -> a where- m :: b -> a-- f :: C [Int] b => b -> Bool- f x = m x == []--We solve for `Eq [Int]`, which requires `Eq Int`, which we also have. This-produces the following core:-- f :: forall b. C [Int] b => b -> Bool- f = \ (@ b) ($dC :: C [Int] b) (x :: b) ->- GHC.Classes.$fEq[]_$s$c==- (m @ [Int] @ b $dC x) (GHC.Types.[] @ Int)--An example that fails:-- class Eq a => C a b | b -> a where- m :: b -> a-- f :: C [a] b => b -> Bool- f x = m x == []--Which, because solving `Eq [a]` demands `Eq a` which we cannot solve, produces:-- f :: forall a b. C [a] b => b -> Bool- f = \ (@ a) (@ b) ($dC :: C [a] b) (eta :: b) ->- ==- @ [a]- (A.$p1C @ [a] @ b $dC)- (m @ [a] @ b $dC eta)- (GHC.Types.[] @ a)--Note [Shortcut solving: type families]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have (#13943)- class Take (n :: Nat) where ...- instance {-# OVERLAPPING #-} Take 0 where ..- instance {-# OVERLAPPABLE #-} (Take (n - 1)) => Take n where ..--And we have [W] Take 3. That only matches one instance so we get-[W] Take (3-1). Really we should now rewrite to reduce the (3-1) to 2, and-so on -- but that is reproducing yet more of the solver. Sigh. For now,-we just give up (remember all this is just an optimisation).--But we must not just naively try to lookup (Take (3-1)) in the-InstEnv, or it'll (wrongly) appear not to match (Take 0) and get a-unique match on the (Take n) instance. That leads immediately to an-infinite loop. Hence the check that 'preds' have no type families-(isTyFamFree).--Note [Shortcut solving: incoherence]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-This optimization relies on coherence of dictionaries to be correct. When we-cannot assume coherence because of IncoherentInstances then this optimization-can change the behavior of the user's code.--The following four modules produce a program whose output would change depending-on whether we apply this optimization when IncoherentInstances is in effect:--=========- {-# LANGUAGE MultiParamTypeClasses #-}- module A where-- class A a where- int :: a -> Int-- class A a => C a b where- m :: b -> a -> a--=========- {-# LANGUAGE FlexibleInstances #-}- {-# LANGUAGE MultiParamTypeClasses #-}- module B where-- import A-- instance A a where- int _ = 1-- instance C a [b] where- m _ = id--=========- {-# LANGUAGE FlexibleContexts #-}- {-# LANGUAGE FlexibleInstances #-}- {-# LANGUAGE IncoherentInstances #-}- {-# LANGUAGE MultiParamTypeClasses #-}- module C where-- import A-- instance A Int where- int _ = 2-- instance C Int [Int] where- m _ = id-- intC :: C Int a => a -> Int -> Int- intC _ x = int x--=========- module Main where-- import A- import B- import C-- main :: IO ()- main = print (intC [] (0::Int))--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 :: (EvBindMap, DictMap CtEvidence)- -> CtEvidence -- Solve this- -> MaybeT TcS (EvBindMap, DictMap CtEvidence)-Note that:--* The CtEvidence is the goal to be solved--* The MaybeT manages 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 augment 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 #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.--Note [No Given/Given fundeps]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We do not create constraints from:-* Given/Given interactions via functional dependencies or type family- injectivity annotations.-* Given/instance fundep interactions via functional dependencies or- type family injectivity annotations.--In this Note, all these interactions are called just "fundeps".--We ingore such fundeps for several reasons:--1. These fundeps will never serve a purpose in accepting more- programs: Given constraints do not contain metavariables that could- be unified via exploring fundeps. They *could* be useful in- discovering inaccessible code. However, the constraints will be- Wanteds, and as such will cause errors (not just warnings) if they- go unsolved. Maybe there is a clever way to get the right- inaccessible code warnings, but the path forward is far from- clear. #12466 has further commentary.--2. Furthermore, here is a case where a Given/instance interaction is actively- harmful (from dependent/should_compile/RaeJobTalk):-- type family a == b :: Bool- type family Not a = r | r -> a where- Not False = True- Not True = False-- [G] Not (a == b) ~ True-- Reacting this Given with the equations for Not produces-- [W] a == b ~ False-- This is indeed a true consequence, and would make sense as a fresh Given.- But we don't have a way to produce evidence for fundeps, as a Wanted it- is /harmful/: we can't prove it, and so we'll report an error and reject- the program. (Previously fundeps gave rise to Deriveds, which- carried no evidence, so it didn't matter that they could not be proved.)--3. #20922 showed a subtle different problem with Given/instance fundeps.- type family ZipCons (as :: [k]) (bssx :: [[k]]) = (r :: [[k]]) | r -> as bssx where- ZipCons (a ': as) (bs ': bss) = (a ': bs) ': ZipCons as bss- ...-- tclevel = 4- [G] ZipCons is1 iss ~ (i : is2) : jss-- (The tclevel=4 means that this Given is at level 4.) The fundep tells us that- 'iss' must be of form (is2 : beta[4]) where beta[4] is a fresh unification- variable; we don't know what type it stands for. So we would emit- [W] iss ~ is2 : beta-- Again we can't prove that equality; and worse we'll rewrite iss to- (is2:beta) in deeply nested constraints inside this implication,- where beta is untouchable (under other equality constraints), leading- to other insoluble constraints.--The bottom line: since we have no evidence for them, we should ignore Given/Given-and Given/instance fundeps entirely.--}--interactDict :: InertCans -> Ct -> TcS (StopOrContinue Ct)-interactDict inerts ct_w@(CDictCan { cc_ev = ev_w, cc_class = cls, cc_tyargs = tys })- | Just ct_i <- lookupInertDict inerts (ctEvLoc ev_w) cls tys- , let ev_i = ctEvidence ct_i- loc_i = ctEvLoc ev_i- loc_w = ctEvLoc ev_w- = -- There is a matching dictionary in the inert set- do { -- First to try to solve it /completely/ from top level instances- -- See Note [Shortcut solving]- dflags <- getDynFlags- ; short_cut_worked <- shortCutSolver dflags ev_w ev_i- ; if short_cut_worked- then stopWith ev_w "interactDict/solved from instance"-- -- Next see if we are in "loopy-superclass" land. If so,- -- we don't want to replace the (Given) inert with the- -- (Wanted) work-item, or vice versa; we want to hang on- -- to both, and try to solve the work-item via an instance.- -- See Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance- else if prohibitedSuperClassSolve loc_i loc_w- then continueWith ct_w- else- do { -- The short-cut solver didn't fire, and loopy superclasses- -- are dealt with, so we can either solve- -- the inert from the work-item or vice-versa.- ; case solveOneFromTheOther ct_i ct_w of- KeepInert -> do { traceTcS "lookupInertDict:KeepInert" (ppr ct_w)- ; setEvBindIfWanted ev_w (ctEvTerm ev_i)- ; return $ Stop ev_w (text "Dict equal" <+> ppr ct_w) }- KeepWork -> do { traceTcS "lookupInertDict:KeepWork" (ppr ct_w)- ; setEvBindIfWanted ev_i (ctEvTerm ev_w)- ; updInertDicts $ \ ds -> delDict ds cls tys- ; continueWith ct_w } } }-- | cls `hasKey` ipClassKey- , isGiven ev_w- = interactGivenIP inerts ct_w-- | otherwise- = do { addFunDepWork inerts ev_w cls- ; continueWith ct_w }--interactDict _ wi = pprPanic "interactDict" (ppr wi)---- See Note [Shortcut solving]-shortCutSolver :: DynFlags- -> CtEvidence -- Work item- -> CtEvidence -- Inert we want to try to replace- -> TcS Bool -- True <=> success-shortCutSolver dflags ev_w ev_i- | isWanted ev_w- && isGiven ev_i- -- We are about to solve a [W] constraint from a [G] constraint. We take- -- a moment to see if we can get a better solution using an instance.- -- Note that we only do this for the sake of performance. Exactly the same- -- programs should typecheck regardless of whether we take this step or- -- not. See Note [Shortcut solving]-- && not (isIPLikePred (ctEvPred ev_w)) -- Not for implicit parameters (#18627)-- && not (xopt LangExt.IncoherentInstances dflags)- -- If IncoherentInstances is on then we cannot rely on coherence of proofs- -- in order to justify this optimization: The proof provided by the- -- [G] constraint's superclass may be different from the top-level proof.- -- See Note [Shortcut solving: incoherence]-- && gopt Opt_SolveConstantDicts dflags- -- Enabled by the -fsolve-constant-dicts flag-- = do { ev_binds_var <- getTcEvBindsVar- ; ev_binds <- assertPpr (not (isCoEvBindsVar ev_binds_var )) (ppr ev_w) $- getTcEvBindsMap ev_binds_var- ; solved_dicts <- getSolvedDicts-- ; mb_stuff <- runMaybeT $ try_solve_from_instance- (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-- try_solve_from_instance -- See Note [Shortcut try_solve_from_instance]- :: (EvBindMap, DictMap CtEvidence) -> CtEvidence- -> MaybeT TcS (EvBindMap, DictMap CtEvidence)- try_solve_from_instance (ev_binds, solved_dicts) ev- | let pred = ctEvPred ev- loc = ctEvLoc ev- , ClassPred cls tys <- classifyPredType pred- = do { inst_res <- lift $ matchGlobalInst dflags True cls tys- ; case inst_res of- OneInst { cir_new_theta = preds- , cir_mk_ev = mk_ev- , cir_what = what }- | safeOverlap what- , all isTyFamFree preds -- Note [Shortcut solving: type families]- -> do { let solved_dicts' = addDict solved_dicts cls tys ev- -- 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)- ; loc' <- lift $ checkInstanceOK loc what pred- ; lift $ checkReductionDepth loc' pred--- ; evc_vs <- mapM (new_wanted_cached ev loc' solved_dicts') preds- -- Emit work for subgoals but use our local cache- -- so we can solve recursive dictionaries.-- ; let ev_tm = mk_ev (map getEvExpr evc_vs)- ev_binds' = extendEvBinds ev_binds $- mkWantedEvBind (ctEvEvId ev) ev_tm-- ; foldlM try_solve_from_instance- (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 :: CtEvidence -> CtLoc- -> DictMap CtEvidence -> TcPredType -> MaybeT TcS MaybeNew- new_wanted_cached ev_w loc 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 (ctEvRewriters ev_w) pty- | otherwise = mzero--addFunDepWork :: InertCans -> CtEvidence -> Class -> TcS ()--- Add wanted constraints from type-class functional dependencies.-addFunDepWork inerts work_ev cls- = mapBagM_ add_fds (findDictsByClass (inert_dicts inerts) cls)- -- No need to check flavour; fundeps work between- -- any pair of constraints, regardless of flavour- -- Importantly we don't throw workitem back in the- -- worklist because this can cause loops (see #5236)- where- work_pred = ctEvPred work_ev- work_loc = ctEvLoc work_ev-- add_fds inert_ct- = 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) ])-- ; unless (isGiven work_ev && isGiven inert_ev) $- emitFunDepWanteds (ctEvRewriters work_ev) $- improveFromAnother (derived_loc, inert_rewriters) inert_pred work_pred- -- We don't really rewrite tys2, see below _rewritten_tys2, so that's ok- -- Do not create FDs from Given/Given interactions: See Note [No Given/Given fundeps]- }- where- inert_ev = ctEvidence inert_ct- inert_pred = ctEvPred inert_ev- inert_loc = ctEvLoc inert_ev- inert_rewriters = ctRewriters inert_ct- derived_loc = work_loc { ctl_depth = ctl_depth work_loc `maxSubGoalDepth`- ctl_depth inert_loc- , ctl_origin = FunDepOrigin1 work_pred- (ctLocOrigin work_loc)- (ctLocSpan work_loc)- inert_pred- (ctLocOrigin inert_loc)- (ctLocSpan inert_loc) }--{--**********************************************************************-* *- Implicit parameters-* *-**********************************************************************--}--interactGivenIP :: InertCans -> Ct -> TcS (StopOrContinue Ct)--- Work item is Given (?x:ty)--- See Note [Shadowing of Implicit Parameters]-interactGivenIP inerts workItem@(CDictCan { cc_ev = ev, cc_class = cls- , cc_tyargs = tys@(ip_str:_) })- = do { updInertCans $ \cans -> cans { inert_dicts = addDict filtered_dicts cls tys workItem }- ; stopWith ev "Given IP" }- where- dicts = inert_dicts inerts- ip_dicts = findDictsByClass dicts cls- other_ip_dicts = filterBag (not . is_this_ip) ip_dicts- filtered_dicts = addDictsByClass dicts cls other_ip_dicts-- -- Pick out any Given constraints for the same implicit parameter- is_this_ip (CDictCan { cc_ev = ev, cc_tyargs = ip_str':_ })- = isGiven ev && ip_str `tcEqType` ip_str'- is_this_ip _ = False--interactGivenIP _ wi = pprPanic "interactGivenIP" (ppr wi)--{- Note [Shadowing of Implicit Parameters]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider the following example:--f :: (?x :: Char) => Char-f = let ?x = 'a' in ?x--The "let ?x = ..." generates an implication constraint of the form:--?x :: Char => ?x :: Char--Furthermore, the signature for `f` also generates an implication-constraint, so we end up with the following nested implication:--?x :: Char => (?x :: Char => ?x :: Char)--Note that the wanted (?x :: Char) constraint may be solved in-two incompatible ways: either by using the parameter from the-signature, or by using the local definition. Our intention is-that the local definition should "shadow" the parameter of the-signature, and we implement this as follows: when we add a new-*given* implicit parameter to the inert set, it replaces any existing-givens for the same implicit parameter.--Similarly, consider- f :: (?x::a) => Bool -> a-- g v = let ?x::Int = 3- in (f v, let ?x::Bool = True in f v)--This should probably be well typed, with- g :: Bool -> (Int, Bool)--So the inner binding for ?x::Bool *overrides* the outer one.--See ticket #17104 for a rather tricky example of this overriding-behaviour.--All this works for the normal cases but it has an odd side effect in-some pathological programs like this:--- This is accepted, the second parameter shadows-f1 :: (?x :: Int, ?x :: Char) => Char-f1 = ?x---- This is rejected, the second parameter shadows-f2 :: (?x :: Int, ?x :: Char) => Int-f2 = ?x--Both of these are actually wrong: when we try to use either one,-we'll get two incompatible wanted constraints (?x :: Int, ?x :: Char),-which would lead to an error.--I can think of two ways to fix this:-- 1. Simply disallow multiple constraints for the same implicit- parameter---this is never useful, and it can be detected completely- syntactically.-- 2. Move the shadowing machinery to the location where we nest- implications, and add some code here that will produce an- error if we get multiple givens for the same implicit parameter.---**********************************************************************-* *- interactFunEq-* *-**********************************************************************--}--improveLocalFunEqs :: CtEvidence -> InertCans -> TyCon -> [TcType] -> TcType- -> TcS ()--- Generate improvement equalities, by comparing--- the current work item with inert CFunEqs--- E.g. x + y ~ z, x + y' ~ z => [W] y ~ y'------ See Note [FunDep and implicit parameter reactions]-improveLocalFunEqs work_ev inerts fam_tc args rhs- = unless (null improvement_eqns) $- do { traceTcS "interactFunEq improvements: " $- vcat [ text "Eqns:" <+> ppr improvement_eqns- , text "Candidates:" <+> ppr funeqs_for_tc- , text "Inert eqs:" <+> ppr (inert_eqs inerts) ]- ; emitFunDepWanteds (ctEvRewriters work_ev) improvement_eqns }- where- funeqs = inert_funeqs inerts- funeqs_for_tc = [ funeq_ct | equal_ct_list <- findFunEqsByTyCon funeqs fam_tc- , funeq_ct <- equal_ct_list- , NomEq == ctEqRel funeq_ct ]- -- representational equalities don't interact- -- with type family dependencies- work_loc = ctEvLoc work_ev- work_pred = ctEvPred work_ev- fam_inj_info = tyConInjectivityInfo fam_tc-- --------------------- improvement_eqns :: [FunDepEqn (CtLoc, RewriterSet)]- improvement_eqns- | Just ops <- isBuiltInSynFamTyCon_maybe fam_tc- = -- Try built-in families, notably for arithmethic- concatMap (do_one_built_in ops rhs) funeqs_for_tc-- | Injective injective_args <- fam_inj_info- = -- Try improvement from type families with injectivity annotations- concatMap (do_one_injective injective_args rhs) funeqs_for_tc-- | otherwise- = []-- --------------------- do_one_built_in ops rhs (CEqCan { cc_lhs = TyFamLHS _ iargs, cc_rhs = irhs, cc_ev = inert_ev })- | not (isGiven inert_ev && isGiven work_ev) -- See Note [No Given/Given fundeps]- = mk_fd_eqns inert_ev (sfInteractInert ops args rhs iargs irhs)-- | otherwise- = []-- do_one_built_in _ _ _ = pprPanic "interactFunEq 1" (ppr fam_tc)-- --------------------- -- See Note [Type inference for type families with injectivity]- do_one_injective inj_args rhs (CEqCan { cc_lhs = TyFamLHS _ inert_args- , cc_rhs = irhs, cc_ev = inert_ev })- | not (isGiven inert_ev && isGiven work_ev) -- See Note [No Given/Given fundeps]- , rhs `tcEqType` irhs- = mk_fd_eqns inert_ev $ [ Pair arg iarg- | (arg, iarg, True) <- zip3 args inert_args inj_args ]- | otherwise- = []-- do_one_injective _ _ _ = pprPanic "interactFunEq 2" (ppr fam_tc)-- --------------------- mk_fd_eqns :: CtEvidence -> [TypeEqn] -> [FunDepEqn (CtLoc, RewriterSet)]- mk_fd_eqns inert_ev eqns- | null eqns = []- | otherwise = [ FDEqn { fd_qtvs = [], fd_eqs = eqns- , fd_pred1 = work_pred- , fd_pred2 = inert_pred- , fd_loc = (loc, inert_rewriters) } ]- where- initial_loc -- start with the location of the Wanted involved- | isGiven work_ev = inert_loc- | otherwise = work_loc- eqn_orig = InjTFOrigin1 work_pred (ctLocOrigin work_loc) (ctLocSpan work_loc)- inert_pred (ctLocOrigin inert_loc) (ctLocSpan inert_loc)- eqn_loc = setCtLocOrigin initial_loc eqn_orig- inert_pred = ctEvPred inert_ev- inert_loc = ctEvLoc inert_ev- inert_rewriters = ctEvRewriters inert_ev- loc = eqn_loc { ctl_depth = ctl_depth inert_loc `maxSubGoalDepth`- ctl_depth work_loc }--{- Note [Type inference for type families with injectivity]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have a type family with an injectivity annotation:- type family F a b = r | r -> b--Then if we have an equality like F s1 t1 ~ F s2 t2,-we can use the injectivity to get a new Wanted constraint on-the injective argument- [W] t1 ~ t2--That in turn can help GHC solve constraints that would otherwise require-guessing. For example, consider the ambiguity check for- f :: F Int b -> Int-We get the constraint- [W] F Int b ~ F Int beta-where beta is a unification variable. Injectivity lets us pick beta ~ b.--Injectivity information is also used at the call sites. For example:- g = f True-gives rise to- [W] F Int b ~ Bool-from which we can derive b. This requires looking at the defining equations of-a type family, ie. finding equation with a matching RHS (Bool in this example)-and inferring values of type variables (b in this example) from the LHS patterns-of the matching equation. For closed type families we have to perform-additional apartness check for the selected equation to check that the selected-is guaranteed to fire for given LHS arguments.--These new constraints are Wanted constraints, but we will not use the evidence.-We could go further and offer evidence from decomposing injective type-function-applications, but that would require new evidence forms, and an extension to-FC, so we don't do that right now (Dec 14).--We generate these Wanteds in three places, depending on how we notice the-injectivity.--1. When we have a [W] F tys1 ~ F tys2. This is handled in canEqCanLHS2, and-described in Note [Decomposing type family applications] in GHC.Tc.Solver.Canonical.--2. When we have [W] F tys1 ~ T and [W] F tys2 ~ T. Note that neither of these-constraints rewrites the other, as they have different LHSs. This is done-in improveLocalFunEqs, called during the interactWithInertsStage.--3. When we have [W] F tys ~ T and an equation for F that looks like F tys' = T.-This is done in improve_top_fun_eqs, called from the top-level reactions stage.--See also Note [Injective type families] in GHC.Core.TyCon--Note [Cache-caused loops]-~~~~~~~~~~~~~~~~~~~~~~~~~-It is very dangerous to cache a rewritten wanted family equation as 'solved' in our-solved cache (which is the default behaviour or xCtEvidence), because the interaction-may not be contributing towards a solution. Here is an example:--Initial inert set:- [W] g1 : F a ~ beta1-Work item:- [W] g2 : F a ~ beta2-The work item will react with the inert yielding the _same_ inert set plus:- (i) Will set g2 := g1 `cast` g3- (ii) Will add to our solved cache that [S] g2 : F a ~ beta2- (iii) Will emit [W] g3 : beta1 ~ beta2-Now, the g3 work item will be spontaneously solved to [G] g3 : beta1 ~ beta2-and then it will react the item in the inert ([W] g1 : F a ~ beta1). So it-will set- g1 := g ; sym g3-and what is g? Well it would ideally be a new goal of type (F a ~ beta2) but-remember that we have this in our solved cache, and it is ... g2! In short we-created the evidence loop:-- g2 := g1 ; g3- g3 := refl- g1 := g2 ; sym g3--To avoid this situation we do not cache as solved any workitems (or inert)-which did not really made a 'step' towards proving some goal. Solved's are-just an optimization so we don't lose anything in terms of completeness of-solving.--**********************************************************************-* *- interactEq-* *-**********************************************************************--}--{- Note [Combining equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have- Inert: g1 :: a ~ t- Work item: g2 :: a ~ t--Then we can simply solve g2 from g1, thus g2 := g1. Easy!-But it's not so simple:--* If t is a type variable, the equalties might be oriented differently:- e.g. (g1 :: a~b) and (g2 :: b~a)- So we look both ways round. Hence the SwapFlag result to- inertsCanDischarge.--* We can only do g2 := g1 if g1 can discharge g2; that depends on- (a) the role and (b) the flavour. E.g. a representational equality- cannot discharge a nominal one; a Wanted cannot discharge a Given.- The predicate is eqCanRewriteFR.--* Visibility. Suppose S :: forall k. k -> Type, and consider unifying- S @Type (a::Type) ~ S @(Type->Type) (b::Type->Type)- From the first argument we get (Type ~ Type->Type); from the second- argument we get (a ~ b) which in turn gives (Type ~ Type->Type).- See typecheck/should_fail/T16204c.-- That first argument is invisible in the source program (aside from- visible type application), so we'd much prefer to get the error from- the second. We track visibility in the uo_visible field of a TypeEqOrigin.- We use this to prioritise visible errors (see GHC.Tc.Errors.tryReporters,- the partition on isVisibleOrigin).-- So when combining two otherwise-identical equalites, we want to- keep the visible one, and discharge the invisible one. Hence the- call to strictly_more_visible.--}--inertsCanDischarge :: InertCans -> Ct- -> Maybe ( CtEvidence -- The evidence for the inert- , SwapFlag ) -- Whether we need mkSymCo-inertsCanDischarge inerts (CEqCan { cc_lhs = lhs_w, cc_rhs = rhs_w- , cc_ev = ev_w, cc_eq_rel = eq_rel })- | (ev_i : _) <- [ ev_i | CEqCan { cc_ev = ev_i, cc_rhs = rhs_i- , cc_eq_rel = eq_rel }- <- findEq inerts lhs_w- , rhs_i `tcEqType` rhs_w- , inert_beats_wanted ev_i eq_rel ]- = -- Inert: a ~ ty- -- Work item: a ~ ty- Just (ev_i, NotSwapped)-- | Just rhs_lhs <- canEqLHS_maybe rhs_w- , (ev_i : _) <- [ ev_i | CEqCan { cc_ev = ev_i, cc_rhs = rhs_i- , cc_eq_rel = eq_rel }- <- findEq inerts rhs_lhs- , rhs_i `tcEqType` canEqLHSType lhs_w- , inert_beats_wanted ev_i eq_rel ]- = -- Inert: a ~ b- -- Work item: b ~ a- Just (ev_i, IsSwapped)-- where- loc_w = ctEvLoc ev_w- flav_w = ctEvFlavour ev_w- fr_w = (flav_w, eq_rel)-- inert_beats_wanted ev_i eq_rel- = -- eqCanRewriteFR: see second bullet of Note [Combining equalities]- -- strictly_more_visible: see last bullet of Note [Combining equalities]- fr_i `eqCanRewriteFR` fr_w- && not ((loc_w `strictly_more_visible` ctEvLoc ev_i)- && (fr_w `eqCanRewriteFR` fr_i))- where- fr_i = (ctEvFlavour ev_i, eq_rel)-- -- See Note [Combining equalities], final bullet- strictly_more_visible loc1 loc2- = not (isVisibleOrigin (ctLocOrigin loc2)) &&- isVisibleOrigin (ctLocOrigin loc1)--inertsCanDischarge _ _ = Nothing---interactEq :: InertCans -> Ct -> TcS (StopOrContinue Ct)-interactEq inerts workItem@(CEqCan { cc_lhs = lhs- , cc_rhs = rhs- , cc_ev = ev- , cc_eq_rel = eq_rel })- | Just (ev_i, swapped) <- inertsCanDischarge inerts workItem- = do { setEvBindIfWanted ev $- evCoercion (maybeSymCo swapped $- downgradeRole (eqRelRole eq_rel)- (ctEvRole ev_i)- (ctEvCoercion ev_i))-- ; stopWith ev "Solved from inert" }-- | ReprEq <- eq_rel -- See Note [Do not unify representational equalities]- = do { traceTcS "Not unifying representational equality" (ppr workItem)- ; continueWith workItem }-- | otherwise- = case lhs of- TyVarLHS tv -> tryToSolveByUnification workItem ev tv rhs-- TyFamLHS tc args -> do { improveLocalFunEqs ev inerts tc args rhs- ; continueWith workItem }--interactEq _ wi = pprPanic "interactEq" (ppr wi)--------------------------- We have a meta-tyvar on the left, and metaTyVarUpdateOK has said "yes"--- So try to solve by unifying.--- Three reasons why not:--- Skolem escape--- Given equalities (GADTs)--- Unifying a TyVarTv with a non-tyvar type-tryToSolveByUnification :: Ct -> CtEvidence- -> TcTyVar -- LHS tyvar- -> TcType -- RHS- -> TcS (StopOrContinue Ct)-tryToSolveByUnification work_item ev tv rhs- = do { (is_touchable, rhs) <- touchabilityTest (ctEvFlavour ev) tv rhs- ; traceTcS "tryToSolveByUnification" (vcat [ ppr tv <+> char '~' <+> ppr rhs- , ppr is_touchable ])-- ; case is_touchable of- Untouchable -> continueWith work_item- -- For the latter two cases see Note [Solve by unification]- TouchableSameLevel -> solveByUnification ev tv rhs- TouchableOuterLevel free_metas tv_lvl- -> do { wrapTcS $ mapM_ (promoteMetaTyVarTo tv_lvl) free_metas- ; setUnificationFlag tv_lvl- ; solveByUnification ev tv rhs } }--solveByUnification :: CtEvidence -> TcTyVar -> Xi -> TcS (StopOrContinue Ct)--- Solve with the identity coercion--- Precondition: kind(xi) equals kind(tv)--- Precondition: CtEvidence is Wanted--- Precondition: CtEvidence is nominal--- Returns: workItem where--- workItem = the new Given constraint------ NB: No need for an occurs check here, because solveByUnification always--- arises from a CEqCan, a *canonical* constraint. Its invariant (TyEq:OC)--- says that in (a ~ xi), the type variable a does not appear in xi.--- See GHC.Tc.Types.Constraint.Ct invariants.------ Post: tv is unified (by side effect) with xi;--- we often write tv := xi-solveByUnification wd tv xi- = do { let tv_ty = mkTyVarTy tv- ; traceTcS "Sneaky unification:" $- vcat [text "Unifies:" <+> ppr tv <+> text ":=" <+> ppr xi,- text "Coercion:" <+> pprEq tv_ty xi,- text "Left Kind is:" <+> ppr (typeKind tv_ty),- text "Right Kind is:" <+> ppr (typeKind xi) ]- ; unifyTyVar tv xi- ; setEvBindIfWanted wd (evCoercion (mkNomReflCo xi))- ; n_kicked <- kickOutAfterUnification tv- ; return (Stop wd (text "Solved by unification" <+> pprKicked n_kicked)) }--{- Note [Avoid double unifications]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The spontaneous solver has to return a given which mentions the unified unification-variable *on the left* of the equality. Here is what happens if not:- Original wanted: (a ~ alpha), (alpha ~ Int)-We spontaneously solve the first wanted, without changing the order!- given : a ~ alpha [having unified alpha := a]-Now the second wanted comes along, but it cannot rewrite the given, so we simply continue.-At the end we spontaneously solve that guy, *reunifying* [alpha := Int]--We avoid this problem by orienting the resulting given so that the unification-variable is on the left (note that alternatively we could attempt to-enforce this at canonicalization).--See also Note [No touchables as FunEq RHS] in GHC.Tc.Solver.Monad; avoiding-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 #15144, which was caused by unifying a representational-equality.--Note [Solve by unification]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-If we solve- alpha[n] ~ ty-by unification, there are two cases to consider--* TouchableSameLevel: if the ambient level is 'n', then- we can simply update alpha := ty, and do nothing else--* TouchableOuterLevel free_metas n: if the ambient level is greater than- 'n' (the level of alpha), in addition to setting alpha := ty we must- do two other things:-- 1. Promote all the free meta-vars of 'ty' to level n. After all,- alpha[n] is at level n, and so if we set, say,- alpha[n] := Maybe beta[m],- we must ensure that when unifying beta we do skolem-escape checks- etc relevant to level n. Simple way to do that: promote beta to- level n.-- 2. Set the Unification Level Flag to record that a level-n unification has- taken place. See Note [The Unification Level Flag] in GHC.Tc.Solver.Monad--NB: TouchableSameLevel is just an optimisation for TouchableOuterLevel. Promotion-would be a no-op, and setting the unification flag unnecessarily would just-make the solver iterate more often. (We don't need to iterate when unifying-at the ambient level because of the kick-out mechanism.)---************************************************************************-* *-* Functional dependencies, instantiation of equations-* *-************************************************************************--When we spot an equality arising from a functional dependency,-we now use that equality (a "wanted") to rewrite the work-item-constraint right away. This avoids two dangers-- Danger 1: If we send the original constraint on down the pipeline- it may react with an instance declaration, and in delicate- situations (when a Given overlaps with an instance) that- may produce new insoluble goals: see #4952-- Danger 2: If we don't rewrite the constraint, it may re-react- with the same thing later, and produce the same equality- again --> termination worries.--To achieve this required some refactoring of GHC.Tc.Instance.FunDeps (nicer-now!).--Note [FunDep and implicit parameter reactions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Currently, our story of interacting two dictionaries (or a dictionary-and top-level instances) for functional dependencies, and implicit-parameters, is that we simply produce new Wanted equalities. So for example-- class D a b | a -> b where ...- Inert:- d1 :g D Int Bool- WorkItem:- d2 :w D Int alpha-- We generate the extra work item- cv :w alpha ~ Bool- where 'cv' is currently unused. However, this new item can perhaps be- spontaneously solved to become given and react with d2,- discharging it in favour of a new constraint d2' thus:- d2' :w D Int Bool- d2 := d2' |> D Int cv- Now d2' can be discharged from d1--We could be more aggressive and try to *immediately* solve the dictionary-using those extra equalities.--If that were the case with the same inert set and work item we might discard-d2 directly:-- cv :w alpha ~ Bool- d2 := d1 |> D Int cv--But in general it's a bit painful to figure out the necessary coercion,-so we just take the first approach. Here is a better example. Consider:- class C a b c | a -> b-And:- [Given] d1 : C T Int Char- [Wanted] d2 : C T beta Int-In this case, it's *not even possible* to solve the wanted immediately.-So we should simply output the functional dependency and add this guy-[but NOT its superclasses] back in the worklist. Even worse:- [Given] d1 : C T Int beta- [Wanted] d2: C T beta Int-Then it is solvable, but its very hard to detect this on the spot.--It's exactly the same with implicit parameters, except that the-"aggressive" approach would be much easier to implement.--Note [Fundeps with instances, and equality orientation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-This Note describes a delicate interaction that constrains the orientation of-equalities. This one is about fundeps, but the /exact/ same thing arises for-type-family injectivity constraints: see Note [Improvement orientation].--doTopFundepImprovement compares the constraint with all the instance-declarations, to see if we can produce any equalities. E.g- class C2 a b | a -> b- instance C Int Bool-Then the constraint (C Int ty) generates the equality [W] ty ~ Bool.--There is a nasty corner in #19415 which led to the typechecker looping:- class C s t b | s -> t- instance ... => C (T kx x) (T ky y) Int- T :: forall k. k -> Type-- work_item: dwrk :: C (T @ka (a::ka)) (T @kb0 (b0::kb0)) Char- where kb0, b0 are unification vars-- ==> {doTopFundepImprovement: compare work_item with instance,- generate /fresh/ unification variables kfresh0, yfresh0,- emit a new Wanted, and add dwrk to inert set}-- Suppose we emit this new Wanted from the fundep:- [W] T kb0 (b0::kb0) ~ T kfresh0 (yfresh0::kfresh0)-- ==> {solve that equality kb0 := kfresh0, b0 := yfresh0}- Now kick out dwrk, since it mentions kb0- But now we are back to the start! Loop!--NB1: This example relies on an instance that does not satisfy the- coverage condition (although it may satisfy the weak coverage- condition), and hence whose fundeps generate fresh unification- variables. Not satisfying the coverage condition is known to- lead to termination trouble, but in this case it's plain silly.--NB2: In this example, the third parameter to C ensures that the- instance doesn't actually match the Wanted, so we can't use it to- solve the Wanted--We solve the problem by (#21703):-- carefully orienting the new Wanted so that all the- freshly-generated unification variables are on the LHS.-- Thus we emit- [W] T kfresh0 (yfresh0::kfresh0) ~ T kb0 (b0::kb0)- and /NOT/- [W] T kb0 (b0::kb0) ~ T kfresh0 (yfresh0::kfresh0)--Now we'll unify kfresh0:=kb0, yfresh0:=b0, and all is well. The general idea-is that we want to preferentially eliminate those freshly-generated-unification variables, rather than unifying older variables, which causes-kick-out etc.--Keeping younger variables on the left also gives very minor improvement in-the compiler performance by having less kick-outs and allocations (-0.1% on-average). Indeed Historical Note [Eliminate younger unification variables]-in GHC.Tc.Utils.Unify describes an earlier attempt to do so systematically,-apparently now in abeyance.--But this is is a delicate solution. We must take care to /preserve/-orientation during solving. Wrinkles:--(W1) We start with- [W] T kfresh0 (yfresh0::kfresh0) ~ T kb0 (b0::kb0)- Decompose to- [W] kfresh0 ~ kb0- [W] (yfresh0::kfresh0) ~ (b0::kb0)- Preserve orientiation when decomposing!!--(W2) Suppose we happen to tackle the second Wanted from (W1)- first. Then in canEqCanLHSHetero we emit a /kind/ equality, as- well as a now-homogeneous type equality- [W] kco : kfresh0 ~ kb0- [W] (yfresh0::kfresh0) ~ (b0::kb0) |> (sym kco)- Preserve orientation in canEqCanLHSHetero!! (Failing to- preserve orientation here was the immediate cause of #21703.)--(W3) There is a potential interaction with the swapping done by- GHC.Tc.Utils.Unify.swapOverTyVars. We think it's fine, but it's- a slight worry. See especially Note [TyVar/TyVar orientation] in- that module.--The trouble is that "preserving orientation" is a rather global invariant,-and sometimes we definitely do want to swap (e.g. Int ~ alpha), so we don't-even have a precise statement of what the invariant is. The advantage-of the preserve-orientation plan is that it is extremely cheap to implement,-and apparently works beautifully.----- Alternative plan (1) ----Rather than have an ill-defined invariant, another possiblity is to-elminate those fresh unification variables at birth, when generating-the new fundep-inspired equalities.--The key idea is to call `instFlexiX` in `emitFunDepWanteds` on only those-type variables that are guaranteed to give us some progress. This means we-have to locally (without calling emitWanteds) identify the type variables-that do not give us any progress. In the above example, we _know_ that-emitting the two wanteds `kco` and `co` is fruitless.-- Q: How do we identify such no-ops?-- 1. Generate a matching substitution from LHS to RHS- ɸ = [kb0 :-> k0, b0 :-> y0]- 2. Call `instFlexiX` on only those type variables that do not appear in the domain of ɸ- ɸ' = instFlexiX ɸ (tvs - domain ɸ)- 3. Apply ɸ' on LHS and then call emitWanteds- unifyWanteds ... (subst ɸ' LHS) RHS--Why will this work? The matching substitution ɸ will be a best effort-substitution that gives us all the easy solutions. It can be generated with-modified version of `Core/Unify.unify_tys` where we run it in a matching mode-and never generate `SurelyApart` and always return a `MaybeApart Subst`-instead.--The same alternative plan would work for type-family injectivity constraints:-see Note [Improvement orientation].---- End of Alternative plan (1) -------- Alternative plan (2) ----We could have a new flavour of TcTyVar (like `TauTv`, `TyVarTv` etc; see GHC.Tc.Utils.TcType.MetaInfo)-for the fresh unification variables introduced by functional dependencies. Say `FunDepTv`. Then in-GHC.Tc.Utils.Unify.swapOverTyVars we could arrange to keep a `FunDepTv` on the left if possible.-Looks possible, but it's one more complication.---- End of Alternative plan (2) --------- Historical note: Failed Alternative Plan (3) ----Previously we used a flag `cc_fundeps` in `CDictCan`. It would flip to False-once we used a fun dep to hint the solver to break and to stop emitting more-wanteds. This solution was not complete, and caused a failures while trying-to solve for transitive functional dependencies (test case: T21703)--- End of Historical note: Failed Alternative Plan (3) ----Note [Weird fundeps]-~~~~~~~~~~~~~~~~~~~~-Consider class Het a b | a -> b where- het :: m (f c) -> a -> m b-- class GHet (a :: * -> *) (b :: * -> *) | a -> b- instance GHet (K a) (K [a])- instance Het a b => GHet (K a) (K b)--The two instances don't actually conflict on their fundeps,-although it's pretty strange. So they are both accepted. Now-try [W] GHet (K Int) (K Bool)-This triggers fundeps from both instance decls;- [W] K Bool ~ K [a]- [W] K Bool ~ K beta-And there's a risk of complaining about Bool ~ [a]. But in fact-the Wanted matches the second instance, so we never get as far-as the fundeps.--#7875 is a case in point.--}--doTopFundepImprovement :: Ct -> TcS ()--- Try to functional-dependency improvement between the constraint--- and the top-level instance declarations--- See Note [Fundeps with instances, and equality orientation]--- See also Note [Weird fundeps]-doTopFundepImprovement work_item@(CDictCan { cc_ev = ev, cc_class = cls- , cc_tyargs = xis })- = do { traceTcS "try_fundeps" (ppr work_item)- ; instEnvs <- getInstEnvs- ; let fundep_eqns = improveFromInstEnv instEnvs mk_ct_loc cls xis- ; emitFunDepWanteds (ctEvRewriters ev) fundep_eqns }- where- dict_pred = mkClassPred cls xis- dict_loc = ctEvLoc ev- dict_origin = ctLocOrigin dict_loc-- mk_ct_loc :: PredType -- From instance decl- -> SrcSpan -- also from instance deol- -> (CtLoc, RewriterSet)- mk_ct_loc inst_pred inst_loc- = ( dict_loc { ctl_origin = FunDepOrigin2 dict_pred dict_origin- inst_pred inst_loc }- , emptyRewriterSet )--doTopFundepImprovement work_item = pprPanic "doTopFundepImprovement" (ppr work_item)--emitFunDepWanteds :: RewriterSet -- from the work item- -> [FunDepEqn (CtLoc, RewriterSet)] -> TcS ()--emitFunDepWanteds _ [] = return () -- common case noop--- See Note [FunDep and implicit parameter reactions]--emitFunDepWanteds work_rewriters fd_eqns- = mapM_ do_one_FDEqn fd_eqns- where- do_one_FDEqn (FDEqn { fd_qtvs = tvs, fd_eqs = eqs, fd_loc = (loc, rewriters) })- | null tvs -- Common shortcut- = do { traceTcS "emitFunDepWanteds 1" (ppr (ctl_depth loc) $$ ppr eqs $$ ppr (isGivenLoc loc))- ; mapM_ (\(Pair ty1 ty2) -> unifyWanted all_rewriters loc Nominal ty1 ty2)- (reverse eqs) }- -- See Note [Reverse order of fundep equations]-- | otherwise- = do { traceTcS "emitFunDepWanteds 2" (ppr (ctl_depth loc) $$ ppr tvs $$ ppr eqs)- ; subst <- instFlexiX emptySubst tvs -- Takes account of kind substitution- ; mapM_ (do_one_eq loc all_rewriters subst) (reverse eqs) }- -- See Note [Reverse order of fundep equations]- where- all_rewriters = work_rewriters S.<> rewriters-- do_one_eq loc rewriters subst (Pair ty1 ty2)- = unifyWanted rewriters loc Nominal (substTyUnchecked subst' ty1) ty2- -- ty2 does not mention fd_qtvs, so no need to subst it.- -- See GHC.Tc.Instance.Fundeps Note [Improving against instances]- -- Wrinkle (1)- where- subst' = extendSubstInScopeSet subst (tyCoVarsOfType ty1)- -- The free vars of ty1 aren't just fd_qtvs: ty1 is the result- -- of matching with the [W] constraint. So we add its free- -- vars to InScopeSet, to satisfy substTy's invariants, even- -- though ty1 will never (currently) be a poytype, so this- -- InScopeSet will never be looked at.--{--**********************************************************************-* *- The top-reaction Stage-* *-**********************************************************************--}--topReactionsStage :: WorkItem -> TcS (StopOrContinue Ct)--- The work item does not react with the inert set,--- so try interaction with top-level instances.-topReactionsStage work_item- = do { traceTcS "doTopReact" (ppr work_item)- ; case work_item of-- CDictCan {} ->- do { inerts <- getTcSInerts- ; doTopReactDict inerts work_item }-- CEqCan {} ->- doTopReactEq work_item-- CIrredCan {} ->- doTopReactOther work_item-- -- Any other work item does not react with any top-level equations- _ -> continueWith work_item }-----------------------doTopReactOther :: Ct -> TcS (StopOrContinue Ct)--- Try local quantified constraints for--- CEqCan e.g. (lhs ~# ty)--- and CIrredCan e.g. (c a)------ Why equalities? See GHC.Tc.Solver.Canonical--- Note [Equality superclasses in quantified constraints]-doTopReactOther work_item- | isGiven ev- = continueWith work_item-- | EqPred eq_rel t1 t2 <- classifyPredType pred- = doTopReactEqPred work_item eq_rel t1 t2-- | otherwise- = do { res <- matchLocalInst pred loc- ; case res of- OneInst {} -> chooseInstance ev res- _ -> continueWith work_item }-- where- ev = ctEvidence work_item- loc = ctEvLoc ev- pred = ctEvPred ev--{-********************************************************************-* *- Top-level reaction for equality constraints (CEqCan)-* *-********************************************************************-}--doTopReactEqPred :: Ct -> EqRel -> TcType -> TcType -> TcS (StopOrContinue Ct)-doTopReactEqPred work_item eq_rel lhs rhs- -- See Note [Looking up primitive equalities in quantified constraints]- = do { ev_binds_var <- getTcEvBindsVar- ; ics <- getInertCans- ; if isWanted ev -- Never look up Givens in quantified constraints- && not (null (inert_insts ics)) -- Shortcut common case- && not (isCoEvBindsVar ev_binds_var) -- See Note [Instances in no-evidence implications]- then try_for_qci- else continueWith work_item }- where- ev = ctEvidence work_item- loc = ctEvLoc ev-- role = eqRelRole eq_rel- try_for_qci -- First try looking for (lhs ~ rhs)- | Just (cls, tys) <- boxEqPred eq_rel lhs rhs- = do { res <- matchLocalInst (mkClassPred cls tys) loc- ; traceTcS "final_qci_check:1" (ppr (mkClassPred cls tys))- ; case res of- OneInst { cir_mk_ev = mk_ev }- -> chooseInstance ev (res { cir_mk_ev = mk_eq_ev cls tys mk_ev })- _ -> try_swapping }- | otherwise- = continueWith work_item-- try_swapping -- Now try looking for (rhs ~ lhs) (see #23333)- | Just (cls, tys) <- boxEqPred eq_rel rhs lhs- = do { res <- matchLocalInst (mkClassPred cls tys) loc- ; traceTcS "final_qci_check:2" (ppr (mkClassPred cls tys))- ; case res of- OneInst { cir_mk_ev = mk_ev }- -> do { ev' <- rewriteEqEvidence emptyRewriterSet ev IsSwapped- (mkReflRedn role rhs) (mkReflRedn role lhs)- ; chooseInstance ev' (res { cir_mk_ev = mk_eq_ev cls tys mk_ev }) }- _ -> do { traceTcS "final_qci_check:3" (ppr work_item)- ; continueWith work_item }}- | otherwise- = continueWith work_item-- mk_eq_ev cls tys mk_ev evs- = case (mk_ev evs) of- EvExpr e -> EvExpr (Var sc_id `mkTyApps` tys `App` e)- ev -> pprPanic "mk_eq_ev" (ppr ev)- where- [sc_id] = classSCSelIds cls--{- Note [Looking up primitive equalities in quantified constraints]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-For equalities (a ~# b) look up (a ~ b), and then do a superclass-selection. This avoids having to support quantified constraints whose-kind is not Constraint, such as (forall a. F a ~# b)--See- * Note [Evidence for quantified constraints] in GHC.Core.Predicate- * Note [Equality superclasses in quantified constraints]- in GHC.Tc.Solver.Canonical--Note [Reverse order of fundep equations]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this scenario (from dependent/should_fail/T13135_simple):-- type Sig :: Type -> Type- data Sig a = SigFun a (Sig a)-- type SmartFun :: forall (t :: Type). Sig t -> Type- type family SmartFun sig = r | r -> sig where- SmartFun @Type (SigFun @Type a sig) = a -> SmartFun @Type sig-- [W] SmartFun @kappa sigma ~ (Int -> Bool)--The injectivity of SmartFun allows us to produce two new equalities:-- [W] w1 :: Type ~ kappa- [W] w2 :: SigFun @Type Int beta ~ sigma--for some fresh (beta :: SigType). The second Wanted here is actually-heterogeneous: the LHS has type Sig Type while the RHS has type Sig kappa.-Of course, if we solve the first wanted first, the second becomes homogeneous.--When looking for injectivity-inspired equalities, we work left-to-right,-producing the two equalities in the order written above. However, these-equalities are then passed into unifyWanted, which will fail, adding these-to the work list. However, crucially, the work list operates like a *stack*.-So, because we add w1 and then w2, we process w2 first. This is silly: solving-w1 would unlock w2. So we make sure to add equalities to the work-list in left-to-right order, which requires a few key calls to 'reverse'.--This treatment is also used for class-based functional dependencies, although-we do not have a program yet known to exhibit a loop there. It just seems-like the right thing to do.--When this was originally conceived, it was necessary to avoid a loop in T13135.-That loop is now avoided by continuing with the kind equality (not the type-equality) in canEqCanLHSHetero (see Note [Equalities with incompatible kinds]-in GHC.Tc.Solver.Canonical). However, the idea of working left-to-right still-seems worthwhile, and so the calls to 'reverse' remain.---}-----------------------doTopReactEq :: Ct -> TcS (StopOrContinue Ct)-doTopReactEq work_item@(CEqCan { cc_ev = old_ev, cc_lhs = TyFamLHS fam_tc args- , cc_rhs = rhs })- = do { improveTopFunEqs old_ev fam_tc args rhs- ; doTopReactOther work_item }-doTopReactEq work_item = doTopReactOther work_item--improveTopFunEqs :: CtEvidence -> TyCon -> [TcType] -> TcType -> TcS ()--- See Note [FunDep and implicit parameter reactions]-improveTopFunEqs ev fam_tc args rhs- | isGiven ev -- See Note [No Given/Given fundeps]- = return ()-- | otherwise- = do { fam_envs <- getFamInstEnvs- ; eqns <- improve_top_fun_eqs fam_envs fam_tc args rhs- ; traceTcS "improveTopFunEqs" (vcat [ ppr fam_tc <+> ppr args <+> ppr rhs- , ppr eqns ])- ; mapM_ (\(Pair ty1 ty2) -> unifyWanted rewriters loc Nominal ty1 ty2)- (reverse eqns) }- -- Missing that `reverse` causes T13135 and T13135_simple to loop.- -- See Note [Reverse order of fundep equations]- where- loc = bumpCtLocDepth (ctEvLoc ev)- -- ToDo: this location is wrong; it should be FunDepOrigin2- -- See #14778- rewriters = ctEvRewriters ev--improve_top_fun_eqs :: FamInstEnvs- -> TyCon -> [TcType] -> TcType- -> TcS [TypeEqn]-improve_top_fun_eqs fam_envs fam_tc args rhs_ty- | Just ops <- isBuiltInSynFamTyCon_maybe fam_tc- = return (sfInteractTop ops args rhs_ty)-- -- see Note [Type inference for type families with injectivity]- | isOpenTypeFamilyTyCon fam_tc- , Injective injective_args <- tyConInjectivityInfo fam_tc- , let fam_insts = lookupFamInstEnvByTyCon fam_envs fam_tc- = -- it is possible to have several compatible equations in an open type- -- family but we only want to derive equalities from one such equation.- do { let improvs = buildImprovementData fam_insts- fi_tvs fi_tys fi_rhs (const Nothing)-- ; traceTcS "improve_top_fun_eqs2" (ppr improvs)- ; concatMapM (injImproveEqns injective_args) $- take 1 improvs }-- | Just ax <- isClosedSynFamilyTyConWithAxiom_maybe fam_tc- , Injective injective_args <- tyConInjectivityInfo fam_tc- = concatMapM (injImproveEqns injective_args) $- buildImprovementData (fromBranches (co_ax_branches ax))- cab_tvs cab_lhs cab_rhs Just-- | otherwise- = return []-- where- in_scope = mkInScopeSet (tyCoVarsOfType rhs_ty)-- buildImprovementData- :: [a] -- axioms for a TF (FamInst or CoAxBranch)- -> (a -> [TyVar]) -- get bound tyvars of an axiom- -> (a -> [Type]) -- get LHS of an axiom- -> (a -> Type) -- get RHS of an axiom- -> (a -> Maybe CoAxBranch) -- Just => apartness check required- -> [( [Type], Subst, [TyVar], Maybe CoAxBranch )]- -- Result:- -- ( [arguments of a matching axiom]- -- , RHS-unifying substitution- -- , axiom variables without substitution- -- , Maybe matching axiom [Nothing - open TF, Just - closed TF ] )- buildImprovementData axioms axiomTVs axiomLHS axiomRHS wrap =- [ (ax_args, subst, unsubstTvs, wrap axiom)- | axiom <- axioms- , let ax_args = axiomLHS axiom- ax_rhs = axiomRHS axiom- ax_tvs = axiomTVs axiom- in_scope1 = in_scope `extendInScopeSetList` ax_tvs- , Just subst <- [tcUnifyTyWithTFs False in_scope1 ax_rhs rhs_ty]- , let notInSubst tv = not (tv `elemVarEnv` getTvSubstEnv subst)- unsubstTvs = filter (notInSubst <&&> isTyVar) ax_tvs ]- -- The order of unsubstTvs is important; it must be- -- in telescope order e.g. (k:*) (a:k)-- injImproveEqns :: [Bool]- -> ([Type], Subst, [TyCoVar], Maybe CoAxBranch)- -> TcS [TypeEqn]- injImproveEqns inj_args (ax_args, subst, unsubstTvs, cabr)- = do { subst <- instFlexiX subst unsubstTvs- -- If the current substitution bind [k -> *], and- -- one of the un-substituted tyvars is (a::k), we'd better- -- be sure to apply the current substitution to a's kind.- -- Hence instFlexiX. #13135 was an example.-- ; return [ Pair (substTy subst ax_arg) arg- -- NB: the ax_arg part is on the left- -- see Note [Improvement orientation]- | case cabr of- Just cabr' -> apartnessCheck (substTys subst ax_args) cabr'- _ -> True- , (ax_arg, arg, True) <- zip3 ax_args args inj_args ] }--{--Note [MATCHING-SYNONYMS]-~~~~~~~~~~~~~~~~~~~~~~~~-When trying to match a dictionary (D tau) to a top-level instance, or a-type family equation (F taus_1 ~ tau_2) to a top-level family instance,-we do *not* need to expand type synonyms because the matcher will do that for us.--Note [Improvement orientation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See also Note [Fundeps with instances, and equality orientation], which describes-the Exact Same Prolem, with the same solution, but for functional dependencies.--A very delicate point is the orientation of equalities-arising from injectivity improvement (#12522). Suppose we have- type family F x = t | t -> x- type instance F (a, Int) = (Int, G a)-where G is injective; and wanted constraints-- [W] TF (alpha, beta) ~ fuv- [W] fuv ~ (Int, <some type>)--The injectivity will give rise to constraints-- [W] gamma1 ~ alpha- [W] Int ~ beta--The fresh unification variable gamma1 comes from the fact that we-can only do "partial improvement" here; see Section 5.2 of-"Injective type families for Haskell" (HS'15).--Now, it's very important to orient the equations this way round,-so that the fresh unification variable will be eliminated in-favour of alpha. If we instead had- [W] alpha ~ gamma1-then we would unify alpha := gamma1; and kick out the wanted-constraint. But when we grough it back in, it'd look like- [W] TF (gamma1, beta) ~ fuv-and exactly the same thing would happen again! Infinite loop.--This all seems fragile, and it might seem more robust to avoid-introducing gamma1 in the first place, in the case where the-actual argument (alpha, beta) partly matches the improvement-template. But that's a bit tricky, esp when we remember that the-kinds much match too; so it's easier to let the normal machinery-handle it. Instead we are careful to orient the new-equality with the template on the left. Delicate, but it works.---}--{- *******************************************************************-* *- Top-level reaction for class constraints (CDictCan)-* *-**********************************************************************-}--doTopReactDict :: InertSet -> Ct -> TcS (StopOrContinue Ct)--- Try to use type-class instance declarations to simplify the constraint-doTopReactDict inerts work_item@(CDictCan { cc_ev = ev, cc_class = cls- , cc_tyargs = xis })- | isGiven ev -- Never use instances for Given constraints- = continueWith work_item- -- See Note [No Given/Given fundeps]-- | Just solved_ev <- lookupSolvedDict inerts dict_loc cls xis -- Cached- = do { setEvBindIfWanted ev (ctEvTerm solved_ev)- ; stopWith ev "Dict/Top (cached)" }-- | otherwise -- Wanted, but not cached- = do { dflags <- getDynFlags- ; lkup_res <- matchClassInst dflags inerts cls xis dict_loc- ; case lkup_res of- OneInst { cir_what = what }- -> do { insertSafeOverlapFailureTcS what work_item- ; addSolvedDict what ev cls xis- ; chooseInstance ev lkup_res }- _ -> -- NoInstance or NotSure- -- We didn't solve it; so try functional dependencies with- -- the instance environment- do { doTopFundepImprovement work_item- ; tryLastResortProhibitedSuperclass inerts work_item } }- where- dict_loc = ctEvLoc ev---doTopReactDict _ w = pprPanic "doTopReactDict" (ppr w)---- | As a last resort, we TEMPORARILY allow a prohibited superclass solve,--- emitting a loud warning when doing so: we might be creating non-terminating--- evidence (as we are in T22912 for example).------ See Note [Migrating away from loopy superclass solving] in GHC.Tc.TyCl.Instance.-tryLastResortProhibitedSuperclass :: InertSet -> Ct -> TcS (StopOrContinue Ct)-tryLastResortProhibitedSuperclass inerts- work_item@(CDictCan { cc_ev = ev_w, cc_class = cls, cc_tyargs = xis })- | let loc_w = ctEvLoc ev_w- orig_w = ctLocOrigin loc_w- , ScOrigin _ NakedSc <- orig_w -- work_item is definitely Wanted- , Just ct_i <- lookupInertDict (inert_cans inerts) loc_w cls xis- , let ev_i = ctEvidence ct_i- , isGiven ev_i- = do { setEvBindIfWanted ev_w (ctEvTerm ev_i)- ; ctLocWarnTcS loc_w $- TcRnLoopySuperclassSolve loc_w (ctPred work_item)- ; return $ Stop ev_w (text "Loopy superclass") }-tryLastResortProhibitedSuperclass _ work_item- = continueWith work_item--chooseInstance :: CtEvidence -> ClsInstResult -> TcS (StopOrContinue Ct)-chooseInstance work_item- (OneInst { cir_new_theta = theta- , cir_what = what- , cir_mk_ev = mk_ev })- = do { traceTcS "doTopReact/found instance for" $ ppr work_item- ; deeper_loc <- checkInstanceOK loc what pred- ; checkReductionDepth deeper_loc pred- ; assertPprM (getTcEvBindsVar >>= return . not . isCoEvBindsVar)- (ppr work_item)- ; evc_vars <- mapM (newWanted deeper_loc (ctEvRewriters work_item)) theta- ; setEvBindIfWanted work_item (mk_ev (map getEvExpr evc_vars))- ; emitWorkNC (freshGoals evc_vars)- ; stopWith work_item "Dict/Top (solved wanted)" }- where- pred = ctEvPred work_item- loc = ctEvLoc work_item--chooseInstance work_item lookup_res- = pprPanic "chooseInstance" (ppr work_item $$ ppr lookup_res)--checkInstanceOK :: CtLoc -> InstanceWhat -> TcPredType -> TcS CtLoc--- Check that it's OK to use this instance:--- (a) the use is well staged in the Template Haskell sense--- Returns the CtLoc to used for sub-goals--- Probably also want to call checkReductionDepth-checkInstanceOK loc what pred- = do { checkWellStagedDFun loc what pred- ; return deeper_loc }- where- deeper_loc = zap_origin (bumpCtLocDepth loc)- origin = ctLocOrigin loc-- zap_origin loc -- After applying an instance we can set ScOrigin to- -- NotNakedSc, so that prohibitedSuperClassSolve never fires- -- See Note [Solving superclass constraints] in- -- GHC.Tc.TyCl.Instance, (sc1).- | ScOrigin what _ <- origin- = setCtLocOrigin loc (ScOrigin what NotNakedSc)- | otherwise- = loc--{- Note [Instances in no-evidence implications]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In #15290 we had- [G] forall p q. Coercible p q => Coercible (m p) (m q))- [W] forall <no-ev> a. m (Int, IntStateT m a)- ~R#- m (Int, StateT Int m a)--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.--}---matchClassInst :: DynFlags -> InertSet- -> Class -> [Type]- -> CtLoc -> TcS ClsInstResult-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 any instance--- whether top level, or local quantified constraints.--- See Note [Instance and Given overlap]- | not (xopt LangExt.IncoherentInstances dflags)- , not (naturallyCoherentClass clas)- , not (noMatchableGivenDicts inerts loc clas tys)- = do { traceTcS "Delaying instance application" $- vcat [ text "Work item=" <+> pprClassPred clas tys ]- ; return NotSure }-- | 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 }-- 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- ; traceTcS "} matchClassInst global result" $ ppr global_res- ; return global_res } }- where- pred = mkClassPred clas tys---- | If a class is "naturally coherent", then we needn't worry at all, in any--- way, about overlapping/incoherent instances. Just solve the thing!--- See Note [Naturally coherent classes]--- See also Note [The equality types story] in GHC.Builtin.Types.Prim.-naturallyCoherentClass :: Class -> Bool-naturallyCoherentClass cls- = isCTupleClass cls- || cls `hasKey` heqTyConKey- || cls `hasKey` eqTyConKey- || cls `hasKey` coercibleTyConKey---{- Note [Instance and Given overlap]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Example, from the OutsideIn(X) paper:- instance P x => Q [x]- instance (x ~ y) => R y [x]-- wob :: forall a b. (Q [b], R b a) => a -> Int-- g :: forall a. Q [a] => [a] -> Int- g x = wob x--From 'g' we get the implication constraint:- forall a. Q [a] => (Q [beta], R beta [a])-If we react (Q [beta]) with its top-level axiom, we end up with a-(P beta), which we have no way of discharging. On the other hand,-if we react R beta [a] with the top-level we get (beta ~ a), which-is solvable and can help us rewrite (Q [beta]) to (Q [a]) which is-now solvable by the given Q [a].--The partial solution is that:- In matchClassInst (and thus in topReact), we return a matching- instance only when there is no Given in the inerts which is- unifiable to this particular dictionary.-- We treat any meta-tyvar as "unifiable" for this purpose,- *including* untouchable ones. But not skolems like 'a' in- the implication constraint above.--The end effect is that, much as we do for overlapping instances, we-delay choosing a class instance if there is a possibility of another-instance OR a given to match our constraint later on. This fixes-tickets #4981 and #5002.--Other notes:--* The check is done *first*, so that it also covers classes- with built-in instance solving, such as- - constraint tuples- - natural numbers- - Typeable--* See also Note [What might equal later?] in GHC.Tc.Solver.InertSet.--* The given-overlap problem is arguably not easy to appear in practice- due to our aggressive prioritization of equality solving over other- constraints, but it is possible. I've added a test case in- typecheck/should-compile/GivenOverlapping.hs--* Another "live" example is #10195; another is #10177.--* We ignore the overlap problem if -XIncoherentInstances is in force:- see #6002 for a worked-out example where this makes a- difference.--* Moreover notice that our goals here are different than the goals of- the top-level overlapping checks. There we are interested in- validating the following principle:-- If we inline a function f at a site where the same global- instance environment is available as the instance environment at- the definition site of f then we should get the same behaviour.-- But for the Given Overlap check our goal is just related to completeness of- constraint solving.--* The solution is only a partial one. Consider the above example with- g :: forall a. Q [a] => [a] -> Int- g x = let v = wob x- in v- and suppose we have -XNoMonoLocalBinds, so that we attempt to find the most- general type for 'v'. When generalising v's type we'll simplify its- Q [alpha] constraint, but we don't have Q [a] in the 'givens', so we- will use the instance declaration after all. #11948 was a case- in point.--All of this is disgustingly delicate, so to discourage people from writing-simplifiable class givens, we warn about signatures that contain them;-see GHC.Tc.Validity Note [Simplifiable given constraints].--Note [Naturally coherent classes]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-A few built-in classes are "naturally coherent". This term means that-the "instance" for the class is bidirectional with its superclass(es).-For example, consider (~~), which behaves as if it was defined like-this:- class a ~# b => a ~~ b- instance a ~# b => a ~~ b-(See Note [The equality types story] in GHC.Builtin.Types.Prim.)--Faced with [W] t1 ~~ t2, it's always OK to reduce it to [W] t1 ~# t2,-without worrying about Note [Instance and Given overlap]. Why? Because-if we had [G] s1 ~~ s2, then we'd get the superclass [G] s1 ~# s2, and-so the reduction of the [W] constraint does not risk losing any solutions.--On the other hand, it can be fatal to /fail/ to reduce such-equalities, on the grounds of Note [Instance and Given overlap],-because many good things flow from [W] t1 ~# t2.--The same reasoning applies to--* (~~) heqTyCon-* (~) eqTyCon-* Coercible coercibleTyCon--And less obviously to:--* Tuple classes. For reasons described in GHC.Tc.Solver.Types- Note [Tuples hiding implicit parameters], we may have a constraint- [W] (?x::Int, C a)- with an exactly-matching Given constraint. We must decompose this- tuple and solve the components separately, otherwise we won't solve- it at all! It is perfectly safe to decompose it, because again the- superclasses invert the instance; e.g.- class (c1, c2) => (% c1, c2 %)- instance (c1, c2) => (% c1, c2 %)- Example in #14218--Examples: T5853, T10432, T5315, T9222, T2627b, T3028b--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 GHC.Core.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.--Consider 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 ClsInstResult--- Look up the predicate in Given quantified constraints,--- which are effectively just local instance declarations.-matchLocalInst pred loc- = do { inerts@(IS { inert_cans = ics }) <- getTcSInerts- ; case match_local_inst inerts (inert_insts ics) of- { ([], []) -> do { traceTcS "No local instance for" (ppr pred)- ; return NoInstance }- ; (matches, unifs) ->- do { matches <- mapM mk_instDFun matches- ; unifs <- mapM mk_instDFun unifs- -- See Note [Use only the best matching quantified constraint]- ; case dominatingMatch matches of- { Just (dfun_id, tys, theta)- | all ((theta `impliedBySCs`) . thdOf3) unifs- ->- do { let result = OneInst { cir_new_theta = theta- , cir_mk_ev = evDFunApp dfun_id tys- , cir_what = LocalInstance }- ; traceTcS "Best local instance found:" $- vcat [ text "pred:" <+> ppr pred- , text "result:" <+> ppr result- , text "matches:" <+> ppr matches- , text "unifs:" <+> ppr unifs ]- ; return result }-- ; mb_best ->- do { traceTcS "Multiple local instances; not committing to any"- $ vcat [ text "pred:" <+> ppr pred- , text "matches:" <+> ppr matches- , text "unifs:" <+> ppr unifs- , text "best_match:" <+> ppr mb_best ]- ; return NotSure }}}}}- where- pred_tv_set = tyCoVarsOfType pred-- mk_instDFun :: (CtEvidence, [DFunInstType]) -> TcS InstDFun- mk_instDFun (ev, tys) =- let dfun_id = ctEvEvId ev- in do { (tys, theta) <- instDFunType (ctEvEvId ev) tys- ; return (dfun_id, tys, theta) }-- -- Compute matching and unifying local instances- match_local_inst :: InertSet- -> [QCInst]- -> ( [(CtEvidence, [DFunInstType])]- , [(CtEvidence, [DFunInstType])] )- match_local_inst _inerts []- = ([], [])- match_local_inst inerts (qci@(QCI { qci_tvs = qtvs- , qci_pred = qpred- , qci_ev = qev })- :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 = (qev, map (lookupVarEnv tv_subst) qtvs)- = (match:matches, unifs)-- | otherwise- = assertPpr (disjointVarSet qtv_set (tyCoVarsOfType pred))- (ppr qci $$ ppr pred)- -- ASSERT: unification relies on the- -- quantified variables being fresh- (matches, this_unif `combine` unifs)- where- qloc = ctEvLoc qev- qtv_set = mkVarSet qtvs- (matches, unifs) = match_local_inst inerts qcis- this_unif- | Just subst <- mightEqualLater inerts qpred qloc pred loc- = Just (qev, map (lookupTyVar subst) qtvs)- | otherwise- = Nothing-- combine Nothing us = us- combine (Just u) us = u : us---- | Instance dictionary function and type.-type InstDFun = (DFunId, [TcType], TcThetaType)---- | Try to find a local quantified instance that dominates all others,--- i.e. which has a weaker instance context than all the others.------ See Note [Use only the best matching quantified constraint].-dominatingMatch :: [InstDFun] -> Maybe InstDFun-dominatingMatch matches =- listToMaybe $ mapMaybe (uncurry go) (holes matches)- -- listToMaybe: arbitrarily pick any one context that is weaker than- -- all others, e.g. so that we can handle [Eq a, Num a] vs [Num a, Eq a]- -- (see test case T22223).-- where- go :: InstDFun -> [InstDFun] -> Maybe InstDFun- go this [] = Just this- go this@(_,_,this_theta) ((_,_,other_theta):others)- | this_theta `impliedBySCs` other_theta- = go this others- | otherwise- = Nothing---- | Whether a collection of constraints is implied by another collection,--- according to a simple superclass check.------ See Note [When does a quantified instance dominate another?].-impliedBySCs :: TcThetaType -> TcThetaType -> Bool-impliedBySCs c1 c2 = all in_c2 c1- where- in_c2 :: TcPredType -> Bool- in_c2 pred = any (pred `tcEqType`) c2_expanded-- c2_expanded :: [TcPredType] -- Includes all superclasses- c2_expanded = [ q | p <- c2, q <- p : transSuperClasses p ]---{- Note [When does a quantified instance dominate another?]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When matching local quantified instances, it's useful to be able to pick-the one with the weakest precondition, e.g. if one has both-- [G] d1: forall a b. ( Eq a, Num b, C a b ) => D a b- [G] d2: forall a . C a Int => D a Int- [W] {w}: D a Int--Then it makes sense to use d2 to solve w, as doing so we end up with a strictly-weaker proof obligation of `C a Int`, compared to `(Eq a, Num Int, C a Int)`-were we to use d1.--In theory, to compute whether one context implies another, we would need to-recursively invoke the constraint solver. This is expensive, so we instead do-a simple check using superclasses, implemented in impliedBySCs.--Examples:-- - [Eq a] is implied by [Ord a]- - [Ord a] is not implied by [Eq a],- - any context is implied by itself,- - the empty context is implied by any context.--Note [Use only the best matching quantified constraint]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (#20582) the ambiguity check for- (forall a. Ord (m a), forall a. Semigroup a => Eq (m a)) => m Int--Because of eager expansion of given superclasses, we get- [G] d1: forall a. Ord (m a)- [G] d2: forall a. Eq (m a)- [G] d3: forall a. Semigroup a => Eq (m a)-- [W] {w1}: forall a. Ord (m a)- [W] {w2}: forall a. Semigroup a => Eq (m a)--The first wanted is solved straightforwardly. But the second wanted-matches *two* local instances: d2 and d3. Our general rule around multiple local-instances is that we refuse to commit to any of them. However, that-means that our type fails the ambiguity check. That's bad: the type-is perfectly fine. (This actually came up in the wild, in the streamly-library.)--The solution is to prefer local instances which are easier to prove, meaning-that they have a weaker precondition. In this case, the empty context-of d2 is a weaker constraint than the "Semigroup a" context of d3, so we prefer-using it when proving w2. This allows us to pass the ambiguity check here.--Our criterion for solving a Wanted by matching local quantified instances is-thus as follows:-- - There is a matching local quantified instance that dominates all others- matches, in the sense of [When does a quantified instance dominate another?].- Any such match do, we pick it arbitrarily (the T22223 example below says why).- - This local quantified instance also dominates all the unifiers, as we- wouldn't want to commit to a single match when we might have multiple,- genuinely different matches after further unification takes place.--Some other examples:--- #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 ...-- Here, in f's RHS, there are two identical quantified constraints- available, one via the superclasses of C and one via the superclasses- of D. Given that each implies the other, we pick one arbitrarily.--- #22216:-- class Eq a- class Eq a => Ord a- class (forall b. Eq b => Eq (f b)) => Eq1 f- class (Eq1 f, forall b. Ord b => Ord (f b)) => Ord1 f-- Suppose we have-- [G] d1: Ord1 f- [G] d2: Eq a- [W] {w}: Eq (f a)-- Superclass expansion of d1 gives us:-- [G] d3 : Eq1 f- [G] d4 : forall b. Ord b => Ord (f b)-- expanding d4 and d5 gives us, respectively:-- [G] d5 : forall b. Eq b => Eq (f b)- [G] d6 : forall b. Ord b => Eq (f b)-- Now we have two matching local instances that we could use when solving the- Wanted. However, it's obviously silly to use d6, given that d5 provides us with- as much information, with a strictly weaker precondition. So we pick d5 to solve- w. If we chose d6, we would get [W] Ord a, which in this case we can't solve.--- #22223:-- [G] forall a b. (Eq a, Ord b) => C a b- [G] forall a b. (Ord b, Eq a) => C a b- [W] C x y-- Here we should be free to pick either quantified constraint, as they are- equivalent up to re-ordering of the constraints in the context.- See also Note [Do not add duplicate quantified instances]- in GHC.Tc.Solver.Monad.--Test cases:- typecheck/should_compile/T20582- quantified-constraints/T15244- quantified-constraints/T22216{a,b,c,d,e}- quantified-constraints/T22223--Historical note: a previous solution was to instead pick the local instance-with the least superclass depth (see Note [Replacement vs keeping]),-but that doesn't work for the example from #22216.--}
+ GHC/Tc/Solver/Irred.hs view
@@ -0,0 +1,144 @@+{-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE MultiWayIf #-}+{-# LANGUAGE RecursiveDo #-}++module GHC.Tc.Solver.Irred(+ solveIrred+ ) where++import GHC.Prelude++import GHC.Tc.Types.Constraint+import GHC.Tc.Solver.InertSet+import GHC.Tc.Solver.Dict( matchLocalInst, chooseInstance )+import GHC.Tc.Solver.Monad+import GHC.Tc.Types.Evidence++import GHC.Core.Coercion++import GHC.Types.Basic( SwapFlag(..) )++import GHC.Utils.Outputable++import GHC.Data.Bag++import Data.Void( Void )+++{- *********************************************************************+* *+* Irreducibles+* *+********************************************************************* -}++solveIrred :: IrredCt -> SolverStage Void+solveIrred irred+ = do { simpleStage $ traceTcS "solveIrred:" (ppr irred)+ ; tryInertIrreds irred+ ; tryQCsIrredCt irred+ ; simpleStage (updInertIrreds irred)+ ; stopWithStage (irredCtEvidence irred) "Kept inert IrredCt" }++updInertIrreds :: IrredCt -> TcS ()+updInertIrreds irred+ = do { tc_lvl <- getTcLevel+ ; updInertCans $ addIrredToCans tc_lvl irred }++{- *********************************************************************+* *+* Inert Irreducibles+* *+********************************************************************* -}++-- Two pieces of irreducible evidence: if their types are *exactly identical*+-- we can rewrite them. We can never improve using this:+-- if we want ty1 :: Constraint and have ty2 :: Constraint it clearly does not+-- mean that (ty1 ~ ty2)+tryInertIrreds :: IrredCt -> SolverStage ()+tryInertIrreds irred+ = Stage $ do { ics <- getInertCans+ ; try_inert_irreds ics irred }++try_inert_irreds :: InertCans -> IrredCt -> TcS (StopOrContinue ())++try_inert_irreds inerts irred_w@(IrredCt { ir_ev = ev_w, ir_reason = reason })+ | let (matching_irreds, others) = findMatchingIrreds (inert_irreds inerts) ev_w+ , ((irred_i, swap) : _rest) <- bagToList matching_irreds+ -- See Note [Multiple matching irreds]+ , let ev_i = irredCtEvidence irred_i+ ct_i = CIrredCan irred_i+ , not (isInsolubleReason reason) || isGiven ev_i || isGiven ev_w+ -- See Note [Insoluble irreds]+ = do { traceTcS "iteractIrred" $+ vcat [ text "wanted:" <+> (ppr ct_w $$ ppr (ctOrigin ct_w))+ , text "inert: " <+> (ppr ct_i $$ ppr (ctOrigin ct_i)) ]+ ; case solveOneFromTheOther ct_i ct_w of+ KeepInert -> do { setEvBindIfWanted ev_w True (swap_me swap ev_i)+ ; return (Stop ev_w (text "Irred equal:KeepInert" <+> ppr ct_w)) }+ KeepWork -> do { setEvBindIfWanted ev_i True (swap_me swap ev_w)+ ; updInertCans (updIrreds (\_ -> others))+ ; continueWith () } }++ | otherwise+ = continueWith ()++ where+ ct_w = CIrredCan irred_w++ swap_me :: SwapFlag -> CtEvidence -> EvTerm+ swap_me swap ev+ = case swap of+ NotSwapped -> ctEvTerm ev+ IsSwapped -> evCoercion (mkSymCo (evTermCoercion (ctEvTerm ev)))+++{- 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.++Note [Insoluble irreds]+~~~~~~~~~~~~~~~~~~~~~~~+We don't allow an /insoluble/ Wanted to be solved from another identical+Wanted. We want to keep all the insoluble Wanteds distinct, so that we get+distinct error messages with -fdefer-type-errors++However we /do/ allow an insoluble constraint (Given or Wanted) to be solved+from an identical insoluble Given. This might seem a little odd, but there is+lots of discussion in #23413 and #17543. We currently implement the PermissivePlan+of #23413. An alternative would be the LibertarianPlan, but that is harder to+implemnent.++By "identical" we include swapping. See Note [Solving irreducible equalities]+in GHC.Tc.Solver.InertSet.++Test cases that are involved bkpfail24.run, T15450, GivenForallLoop, T20189, T8392a.+-}++{- *********************************************************************+* *+* Quantified constraints+* *+********************************************************************* -}++tryQCsIrredCt :: IrredCt -> SolverStage ()+-- Try local quantified constraints for+-- and CIrredCan e.g. (c a)+tryQCsIrredCt (IrredCt { ir_ev = ev })+ | isGiven ev+ = Stage $ continueWith ()++ | otherwise+ = Stage $ do { res <- matchLocalInst pred loc+ ; case res of+ OneInst {} -> chooseInstance ev res+ _ -> continueWith () }+ where+ loc = ctEvLoc ev+ pred = ctEvPred ev
GHC/Tc/Solver/Monad.hs view
@@ -19,2022 +19,2273 @@ runTcSEqualities, nestTcS, nestImplicTcS, setEvBindsTcS, emitImplicationTcS, emitTvImplicationTcS,-- selectNextWorkItem,- getWorkList,- updWorkListTcS,- pushLevelNoWorkList,-- runTcPluginTcS, recordUsedGREs,- matchGlobalInst, TcM.ClsInstResult(..),-- QCInst(..),-- -- Tracing etc- panicTcS, traceTcS,- traceFireTcS, bumpStepCountTcS, csTraceTcS,- wrapErrTcS, wrapWarnTcS,- resetUnificationFlag, setUnificationFlag,-- -- Evidence creation and transformation- MaybeNew(..), freshGoals, isFresh, getEvExpr,-- newTcEvBinds, newNoTcEvBinds,- newWantedEq, emitNewWantedEq,- newWanted,- newWantedNC, newWantedEvVarNC,- newBoundEvVarId,- unifyTyVar, reportUnifications, touchabilityTest, TouchabilityTestResult(..),- setEvBind, setWantedEq,- setWantedEvTerm, setEvBindIfWanted,- newEvVar, newGivenEvVar, newGivenEvVars,- checkReductionDepth,- getSolvedDicts, setSolvedDicts,-- getInstEnvs, getFamInstEnvs, -- Getting the environments- getTopEnv, getGblEnv, getLclEnv, setLclEnv,- getTcEvBindsVar, getTcLevel,- getTcEvTyCoVars, getTcEvBindsMap, setTcEvBindsMap,- tcLookupClass, tcLookupId,-- -- Inerts- updInertTcS, updInertCans, updInertDicts, updInertIrreds,- getHasGivenEqs, setInertCans,- getInertEqs, getInertCans, getInertGivens,- getInertInsols, getInnermostGivenEqLevel,- getTcSInerts, setTcSInerts,- getUnsolvedInerts,- removeInertCts, getPendingGivenScs,- addInertCan, insertFunEq, addInertForAll,- emitWorkNC, emitWork,- lookupInertDict,-- -- The Model- kickOutAfterUnification,-- -- Inert Safe Haskell safe-overlap failures- addInertSafehask, insertSafeOverlapFailureTcS, updInertSafehask,- getSafeOverlapFailures,-- -- Inert solved dictionaries- addSolvedDict, lookupSolvedDict,-- -- Irreds- foldIrreds,-- -- The family application cache- lookupFamAppInert, lookupFamAppCache, extendFamAppCache,- pprKicked,-- instDFunType, -- Instantiation-- -- MetaTyVars- newFlexiTcSTy, instFlexiX,- cloneMetaTyVar,- tcInstSkolTyVarsX,-- TcLevel,- isFilledMetaTyVar_maybe, isFilledMetaTyVar,- zonkTyCoVarsAndFV, zonkTcType, zonkTcTypes, zonkTcTyVar, zonkCo,- zonkTyCoVarsAndFVList,- zonkSimples, zonkWC,- zonkTyCoVarKind,-- -- References- newTcRef, readTcRef, writeTcRef, updTcRef,-- -- Misc- getDefaultInfo, getDynFlags, getGlobalRdrEnvTcS,- matchFam, matchFamTcM,- checkWellStagedDFun,- pprEq, -- Smaller utils, re-exported from TcM- -- TODO (DV): these are only really used in the- -- instance matcher in GHC.Tc.Solver. I am wondering- -- if the whole instance matcher simply belongs- -- here-- breakTyEqCycle_maybe, rewriterView-) where--import GHC.Prelude--import GHC.Driver.Env--import qualified GHC.Tc.Utils.Instantiate as TcM-import GHC.Core.InstEnv-import GHC.Tc.Instance.Family as FamInst-import GHC.Core.FamInstEnv--import qualified GHC.Tc.Utils.Monad as TcM-import qualified GHC.Tc.Utils.TcMType as TcM-import qualified GHC.Tc.Instance.Class as TcM( matchGlobalInst, ClsInstResult(..) )-import qualified GHC.Tc.Utils.Env as TcM- ( checkWellStaged, tcGetDefaultTys, tcLookupClass, tcLookupId, topIdLvl- , tcInitTidyEnv )--import GHC.Driver.Session--import GHC.Tc.Instance.Class( InstanceWhat(..), safeOverlap, instanceReturnsDictCon )-import GHC.Tc.Utils.TcType-import GHC.Tc.Solver.Types-import GHC.Tc.Solver.InertSet-import GHC.Tc.Types.Evidence-import GHC.Tc.Errors.Types--import GHC.Core.Type-import qualified GHC.Core.TyCo.Rep as Rep -- this needs to be used only very locally-import GHC.Core.Coercion-import GHC.Core.Reduction-import GHC.Core.Class-import GHC.Core.TyCon--import GHC.Types.Error ( mkPlainError, noHints )-import GHC.Types.Name-import GHC.Types.TyThing-import GHC.Types.Name.Reader--import GHC.Unit.Module ( HasModule, getModule, extractModule )-import qualified GHC.Rename.Env as TcM-import GHC.Types.Var-import GHC.Types.Var.Env-import GHC.Types.Var.Set-import GHC.Utils.Outputable-import GHC.Utils.Panic-import GHC.Utils.Logger-import GHC.Utils.Misc (HasDebugCallStack)-import GHC.Data.Bag as Bag-import GHC.Types.Unique.Supply-import GHC.Tc.Types-import GHC.Tc.Types.Origin-import GHC.Tc.Types.Constraint-import GHC.Tc.Utils.Unify-import GHC.Core.Predicate-import GHC.Types.Unique.Set (nonDetEltsUniqSet)--import Control.Monad-import GHC.Utils.Monad-import Data.IORef-import GHC.Exts (oneShot)-import Data.List ( mapAccumL, partition )-import Data.Foldable--#if defined(DEBUG)-import GHC.Data.Graph.Directed-#endif--{- *********************************************************************-* *- Inert instances: inert_insts-* *-********************************************************************* -}--addInertForAll :: QCInst -> TcS ()--- Add a local Given instance, typically arising from a type signature-addInertForAll new_qci- = do { ics <- getInertCans- ; ics1 <- add_qci ics-- -- Update given equalities. C.f updateGivenEqs- ; tclvl <- getTcLevel- ; let pred = qci_pred new_qci- not_equality = isClassPred pred && not (isEqPred pred)- -- True <=> definitely not an equality- -- A qci_pred like (f a) might be an equality-- ics2 | not_equality = ics1- | otherwise = ics1 { inert_given_eq_lvl = tclvl- , inert_given_eqs = True }-- ; setInertCans ics2 }- where- add_qci :: InertCans -> TcS InertCans- -- See Note [Do not add duplicate quantified instances]- add_qci ics@(IC { inert_insts = qcis })- | any same_qci qcis- = do { traceTcS "skipping duplicate quantified instance" (ppr new_qci)- ; return ics }-- | otherwise- = do { traceTcS "adding new inert quantified instance" (ppr new_qci)- ; return (ics { inert_insts = 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]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-As an optimisation, we avoid adding duplicate quantified instances to the-inert set; we use a simple duplicate check using tcEqType for simplicity,-even though it doesn't account for superficial differences, e.g. it will count-the following two constraints as different (#22223):-- - forall a b. C a b- - forall b a. C a b--The main logic that allows us to pick local instances, even in the presence of-duplicates, is explained in Note [Use only the best matching quantified constraint]-in GHC.Tc.Solver.Interact.--}--{- *********************************************************************-* *- Adding an inert-* *-************************************************************************--Note [Adding an equality to the InertCans]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When adding an equality to the inerts:--* Kick out any constraints that can be rewritten by the thing- we are adding. Done by kickOutRewritable.--* Note that unifying a:=ty, is like adding [G] a~ty; just use- kickOutRewritable with Nominal, Given. See kickOutAfterUnification.--Note [Kick out existing binding for implicit parameter]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have (typecheck/should_compile/ImplicitParamFDs)- flub :: (?x :: Int) => (Int, Integer)- flub = (?x, let ?x = 5 in ?x)-When we are checking the last ?x occurrence, we guess its type-to be a fresh unification variable alpha and emit an (IP "x" alpha)-constraint. But the given (?x :: Int) has been translated to an-IP "x" Int constraint, which has a functional dependency from the-name to the type. So fundep interaction tells us that alpha ~ Int,-and we get a type error. This is bad.--Instead, we wish to excise any old given for an IP when adding a-new one. We also must make sure not to float out-any IP constraints outside an implication that binds an IP of-the same name; see GHC.Tc.Solver.floatConstraints.--}--addInertCan :: Ct -> TcS ()--- Precondition: item /is/ canonical--- See Note [Adding an equality to the InertCans]-addInertCan ct =- do { traceTcS "addInertCan {" $- text "Trying to insert new inert item:" <+> ppr ct- ; mkTcS (\TcSEnv{tcs_abort_on_insoluble=abort_flag} ->- when (abort_flag && insolubleEqCt ct) TcM.failM)- ; ics <- getInertCans- ; ics <- maybeKickOut ics ct- ; tclvl <- getTcLevel- ; setInertCans (addInertItem tclvl ics ct)-- ; traceTcS "addInertCan }" $ empty }--maybeKickOut :: InertCans -> Ct -> TcS InertCans--- For a CEqCan, kick out any inert that can be rewritten by the CEqCan-maybeKickOut ics ct- | CEqCan { cc_lhs = lhs, cc_ev = ev, cc_eq_rel = eq_rel } <- ct- = do { (_, ics') <- kickOutRewritable (ctEvFlavour ev, eq_rel) lhs ics- ; return ics' }-- -- See [Kick out existing binding for implicit parameter]- | isGivenCt ct- , CDictCan { cc_class = cls, cc_tyargs = [ip_name_strty, _ip_ty] } <- ct- , isIPClass cls- , Just ip_name <- isStrLitTy ip_name_strty- -- Would this be more efficient if we used findDictsByClass and then delDict?- = let dict_map = inert_dicts ics- dict_map' = filterDicts doesn't_match_ip_name dict_map-- doesn't_match_ip_name :: Ct -> Bool- doesn't_match_ip_name ct- | Just (inert_ip_name, _inert_ip_ty) <- isIPPred_maybe (ctPred ct)- = inert_ip_name /= ip_name-- | otherwise- = True-- in- return (ics { inert_dicts = dict_map' })-- | otherwise- = return ics--------------------------------------------kickOutRewritable :: CtFlavourRole -- Flavour/role of the equality that- -- is being added to the inert set- -> CanEqLHS -- The new equality is lhs ~ ty- -> InertCans- -> TcS (Int, InertCans)-kickOutRewritable new_fr new_lhs ics- = do { let (kicked_out, ics') = kickOutRewritableLHS new_fr new_lhs ics- n_kicked = workListSize kicked_out-- ; unless (n_kicked == 0) $- do { updWorkListTcS (appendWorkList kicked_out)-- -- The famapp-cache contains Given evidence from the inert set.- -- If we're kicking out Givens, we need to remove this evidence- -- from the cache, too.- ; let kicked_given_ev_vars =- [ ev_var | ct <- wl_eqs kicked_out- , CtGiven { ctev_evar = ev_var } <- [ctEvidence ct] ]- ; when (new_fr `eqCanRewriteFR` (Given, NomEq) &&- -- if this isn't true, no use looking through the constraints- not (null kicked_given_ev_vars)) $- do { traceTcS "Given(s) have been kicked out; drop from famapp-cache"- (ppr kicked_given_ev_vars)- ; dropFromFamAppCache (mkVarSet kicked_given_ev_vars) }-- ; csTraceTcS $- hang (text "Kick out, lhs =" <+> ppr new_lhs)- 2 (vcat [ text "n-kicked =" <+> int n_kicked- , text "kicked_out =" <+> ppr kicked_out- , text "Residual inerts =" <+> ppr ics' ]) }-- ; return (n_kicked, ics') }--kickOutAfterUnification :: TcTyVar -> TcS Int-kickOutAfterUnification new_tv- = do { ics <- getInertCans- ; (n_kicked, ics2) <- kickOutRewritable (Given,NomEq)- (TyVarLHS new_tv) ics- -- Given because the tv := xi is given; NomEq because- -- only nominal equalities are solved by unification-- ; setInertCans ics2- ; return n_kicked }---- See Wrinkle (2) in Note [Equalities with incompatible kinds] in GHC.Tc.Solver.Canonical--- It's possible that this could just go ahead and unify, but could there be occurs-check--- problems? Seems simpler just to kick out.-kickOutAfterFillingCoercionHole :: CoercionHole -> TcS ()-kickOutAfterFillingCoercionHole hole- = do { ics <- getInertCans- ; let (kicked_out, ics') = kick_out ics- n_kicked = workListSize kicked_out-- ; unless (n_kicked == 0) $- do { updWorkListTcS (appendWorkList kicked_out)- ; csTraceTcS $- hang (text "Kick out, hole =" <+> ppr hole)- 2 (vcat [ text "n-kicked =" <+> int n_kicked- , text "kicked_out =" <+> ppr kicked_out- , text "Residual inerts =" <+> ppr ics' ]) }-- ; setInertCans ics' }- where- kick_out :: InertCans -> (WorkList, InertCans)- kick_out ics@(IC { inert_eqs = eqs, inert_funeqs = funeqs })- = (kicked_out, ics { inert_eqs = eqs_to_keep, inert_funeqs = funeqs_to_keep })- where- (eqs_to_kick, eqs_to_keep) = partitionInertEqs kick_ct eqs- (funeqs_to_kick, funeqs_to_keep) = partitionFunEqs kick_ct funeqs- kicked_out = extendWorkListCts (eqs_to_kick ++ funeqs_to_kick) emptyWorkList-- kick_ct :: Ct -> Bool- -- True: kick out; False: keep.- kick_ct (CEqCan { cc_rhs = rhs, cc_ev = ctev })- = isWanted ctev && -- optimisation: givens don't have coercion holes anyway- rhs `hasThisCoercionHoleTy` hole- kick_ct other = pprPanic "kick_ct (coercion hole)" (ppr other)-----------------addInertSafehask :: InertCans -> Ct -> InertCans-addInertSafehask ics item@(CDictCan { cc_class = cls, cc_tyargs = tys })- = ics { inert_safehask = addDict (inert_dicts ics) cls tys item }--addInertSafehask _ item- = pprPanic "addInertSafehask: can't happen! Inserting " $ ppr item--insertSafeOverlapFailureTcS :: InstanceWhat -> Ct -> TcS ()--- See Note [Safe Haskell Overlapping Instances Implementation] in GHC.Tc.Solver-insertSafeOverlapFailureTcS what item- | safeOverlap what = return ()- | otherwise = updInertCans (\ics -> addInertSafehask ics item)--getSafeOverlapFailures :: TcS Cts--- See Note [Safe Haskell Overlapping Instances Implementation] in GHC.Tc.Solver-getSafeOverlapFailures- = do { IC { inert_safehask = safehask } <- getInertCans- ; return $ foldDicts consCts safehask emptyCts }-----------------addSolvedDict :: InstanceWhat -> CtEvidence -> Class -> [Type] -> TcS ()--- Conditionally add a new item in the solved set of the monad--- See Note [Solved dictionaries] in GHC.Tc.Solver.InertSet-addSolvedDict what item cls tys- | isWanted item- , instanceReturnsDictCon what- = do { traceTcS "updSolvedSetTcs:" $ ppr item- ; updInertTcS $ \ ics ->- ics { inert_solved_dicts = addDict (inert_solved_dicts ics) cls tys item } }- | otherwise- = return ()--getSolvedDicts :: TcS (DictMap CtEvidence)-getSolvedDicts = do { ics <- getTcSInerts; return (inert_solved_dicts ics) }--setSolvedDicts :: DictMap CtEvidence -> TcS ()-setSolvedDicts solved_dicts- = updInertTcS $ \ ics ->- ics { inert_solved_dicts = solved_dicts }--{- *********************************************************************-* *- Other inert-set operations-* *-********************************************************************* -}--updInertTcS :: (InertSet -> InertSet) -> TcS ()--- Modify the inert set with the supplied function-updInertTcS upd_fn- = do { is_var <- getTcSInertsRef- ; wrapTcS (do { curr_inert <- TcM.readTcRef is_var- ; TcM.writeTcRef is_var (upd_fn curr_inert) }) }--getInertCans :: TcS InertCans-getInertCans = do { inerts <- getTcSInerts; return (inert_cans inerts) }--setInertCans :: InertCans -> TcS ()-setInertCans ics = updInertTcS $ \ inerts -> inerts { inert_cans = ics }--updRetInertCans :: (InertCans -> (a, InertCans)) -> TcS a--- Modify the inert set with the supplied function-updRetInertCans upd_fn- = do { is_var <- getTcSInertsRef- ; wrapTcS (do { inerts <- TcM.readTcRef is_var- ; let (res, cans') = upd_fn (inert_cans inerts)- ; TcM.writeTcRef is_var (inerts { inert_cans = cans' })- ; return res }) }--updInertCans :: (InertCans -> InertCans) -> TcS ()--- Modify the inert set with the supplied function-updInertCans upd_fn- = updInertTcS $ \ inerts -> inerts { inert_cans = upd_fn (inert_cans inerts) }--updInertDicts :: (DictMap Ct -> DictMap Ct) -> TcS ()--- Modify the inert set with the supplied function-updInertDicts upd_fn- = updInertCans $ \ ics -> ics { inert_dicts = upd_fn (inert_dicts ics) }--updInertSafehask :: (DictMap Ct -> DictMap Ct) -> TcS ()--- Modify the inert set with the supplied function-updInertSafehask upd_fn- = updInertCans $ \ ics -> ics { inert_safehask = upd_fn (inert_safehask ics) }--updInertIrreds :: (Cts -> Cts) -> TcS ()--- Modify the inert set with the supplied function-updInertIrreds upd_fn- = updInertCans $ \ ics -> ics { inert_irreds = upd_fn (inert_irreds ics) }--getInertEqs :: TcS InertEqs-getInertEqs = do { inert <- getInertCans; return (inert_eqs inert) }--getInnermostGivenEqLevel :: TcS TcLevel-getInnermostGivenEqLevel = do { inert <- getInertCans- ; return (inert_given_eq_lvl inert) }--getInertInsols :: TcS Cts--- Returns insoluble equality constraints and TypeError constraints,--- specifically including Givens.------ Note that this function only inspects irreducible constraints;--- a DictCan constraint such as 'Eq (TypeError msg)' is not--- considered to be an insoluble constraint by this function.------ See Note [Pattern match warnings with insoluble Givens] in GHC.Tc.Solver.-getInertInsols = do { inert <- getInertCans- ; return $ filterBag insolubleCt (inert_irreds inert) }--getInertGivens :: TcS [Ct]--- Returns the Given constraints in the inert set-getInertGivens- = do { inerts <- getInertCans- ; let all_cts = foldIrreds (:) (inert_irreds inerts)- $ foldDicts (:) (inert_dicts inerts)- $ foldFunEqs (++) (inert_funeqs inerts)- $ foldDVarEnv (++) [] (inert_eqs inerts)- ; return (filter isGivenCt all_cts) }--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 })- = assertPpr (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- sc_pending = sc_pend_insts ++ sc_pend_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' <- pendingScDict_maybe 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' <- pendingScInst_maybe 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 GHC.Tc.Solver.Canonical--getUnsolvedInerts :: TcS ( Bag Implication- , Cts ) -- All simple constraints--- Return all the unsolved [Wanted] constraints------ Post-condition: the returned simple constraints are all fully zonked--- (because they come from the inert set)--- the unsolved implics may not be-getUnsolvedInerts- = do { IC { inert_eqs = tv_eqs- , inert_funeqs = fun_eqs- , inert_irreds = irreds- , inert_dicts = idicts- } <- getInertCans-- ; let unsolved_tv_eqs = foldTyEqs add_if_unsolved tv_eqs emptyCts- unsolved_fun_eqs = foldFunEqs add_if_unsolveds fun_eqs emptyCts- unsolved_irreds = Bag.filterBag isWantedCt irreds- unsolved_dicts = foldDicts add_if_unsolved idicts emptyCts- unsolved_others = unionManyBags [ unsolved_irreds- , unsolved_dicts ]-- ; implics <- getWorkListImplics-- ; traceTcS "getUnsolvedInerts" $- vcat [ text " tv eqs =" <+> ppr unsolved_tv_eqs- , text "fun eqs =" <+> ppr unsolved_fun_eqs- , text "others =" <+> ppr unsolved_others- , text "implics =" <+> ppr implics ]-- ; return ( implics, unsolved_tv_eqs `unionBags`- unsolved_fun_eqs `unionBags`- unsolved_others) }- where- add_if_unsolved :: Ct -> Cts -> Cts- add_if_unsolved ct cts | isWantedCt ct = ct `consCts` cts- | otherwise = cts-- add_if_unsolveds :: EqualCtList -> Cts -> Cts- add_if_unsolveds new_cts old_cts = foldr add_if_unsolved old_cts new_cts--getHasGivenEqs :: TcLevel -- TcLevel of this implication- -> TcS ( HasGivenEqs -- are there Given equalities?- , Cts ) -- Insoluble equalities arising from givens--- See Note [Tracking Given equalities] in GHC.Tc.Solver.InertSet-getHasGivenEqs tclvl- = do { inerts@(IC { inert_irreds = irreds- , inert_given_eqs = given_eqs- , inert_given_eq_lvl = ge_lvl })- <- getInertCans- ; let given_insols = filterBag insoluble_given_equality irreds- -- Specifically includes ones that originated in some- -- outer context but were refined to an insoluble by- -- a local equality; so no level-check needed-- -- See Note [HasGivenEqs] in GHC.Tc.Types.Constraint, and- -- Note [Tracking Given equalities] in GHC.Tc.Solver.InertSet- has_ge | ge_lvl == tclvl = MaybeGivenEqs- | given_eqs = LocalGivenEqs- | otherwise = NoGivenEqs-- ; traceTcS "getHasGivenEqs" $- vcat [ text "given_eqs:" <+> ppr given_eqs- , text "ge_lvl:" <+> ppr ge_lvl- , text "ambient level:" <+> ppr tclvl- , text "Inerts:" <+> ppr inerts- , text "Insols:" <+> ppr given_insols]- ; return (has_ge, given_insols) }- where- insoluble_given_equality ct- = insolubleEqCt ct && isGivenCt ct--removeInertCts :: [Ct] -> InertCans -> InertCans--- ^ Remove inert constraints from the 'InertCans', for use when a--- typechecker plugin wishes to discard a given.-removeInertCts cts icans = foldl' removeInertCt icans cts--removeInertCt :: InertCans -> Ct -> InertCans-removeInertCt is ct =- case ct of-- CDictCan { cc_class = cl, cc_tyargs = tys } ->- is { inert_dicts = delDict (inert_dicts is) cl tys }-- CEqCan { cc_lhs = lhs, cc_rhs = rhs } -> delEq is lhs rhs-- CIrredCan {} -> is { inert_irreds = filterBag (not . eqCt ct) $ inert_irreds is }-- CQuantCan {} -> panic "removeInertCt: CQuantCan"- CNonCanonical {} -> panic "removeInertCt: CNonCanonical"--eqCt :: Ct -> Ct -> Bool--- Equality via ctEvId-eqCt c c' = ctEvId c == ctEvId c'---- | Looks up a family application in the inerts.-lookupFamAppInert :: (CtFlavourRole -> Bool) -- can it rewrite the target?- -> TyCon -> [Type] -> TcS (Maybe (Reduction, CtFlavourRole))-lookupFamAppInert rewrite_pred fam_tc tys- = do { IS { inert_cans = IC { inert_funeqs = inert_funeqs } } <- getTcSInerts- ; return (lookup_inerts inert_funeqs) }- where- lookup_inerts inert_funeqs- | Just ecl <- findFunEq inert_funeqs fam_tc tys- , Just (CEqCan { cc_ev = ctev, cc_rhs = rhs })- <- find (rewrite_pred . ctFlavourRole) ecl- = Just (mkReduction (ctEvCoercion ctev) rhs, ctEvFlavourRole ctev)- | otherwise = Nothing--lookupInInerts :: CtLoc -> TcPredType -> TcS (Maybe CtEvidence)--- Is this exact predicate type cached in the solved or canonicals of the InertSet?-lookupInInerts loc pty- | ClassPred cls tys <- classifyPredType pty- = do { inerts <- getTcSInerts- ; let mb_solved = lookupSolvedDict inerts loc cls tys- mb_inert = fmap ctEvidence (lookupInertDict (inert_cans inerts) loc cls tys)- ; return $ do -- Maybe monad- found_ev <- mb_solved `mplus` mb_inert-- -- We're about to "solve" the wanted we're looking up, so we- -- must make sure doing so wouldn't run afoul of- -- Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance.- -- Forgetting this led to #20666.- guard $ not (prohibitedSuperClassSolve (ctEvLoc found_ev) loc)-- return found_ev }- | otherwise -- NB: No caching for equalities, IPs, holes, or errors- = return Nothing---- | Look up a dictionary inert.-lookupInertDict :: InertCans -> CtLoc -> Class -> [Type] -> Maybe Ct-lookupInertDict (IC { inert_dicts = dicts }) loc cls tys- = case findDict dicts loc cls tys of- Just ct -> Just ct- _ -> Nothing---- | Look up a solved inert.-lookupSolvedDict :: InertSet -> CtLoc -> Class -> [Type] -> Maybe CtEvidence--- Returns just if exactly this predicate type exists in the solved.-lookupSolvedDict (IS { inert_solved_dicts = solved }) loc cls tys- = case findDict solved loc cls tys of- Just ev -> Just ev- _ -> Nothing------------------------------lookupFamAppCache :: TyCon -> [Type] -> TcS (Maybe Reduction)-lookupFamAppCache fam_tc tys- = do { IS { inert_famapp_cache = famapp_cache } <- getTcSInerts- ; case findFunEq famapp_cache fam_tc tys of- result@(Just redn) ->- do { traceTcS "famapp_cache hit" (vcat [ ppr (mkTyConApp fam_tc tys)- , ppr redn ])- ; return result }- Nothing -> return Nothing }--extendFamAppCache :: TyCon -> [Type] -> Reduction -> TcS ()--- NB: co :: rhs ~ F tys, to match expectations of rewriter-extendFamAppCache tc xi_args stuff@(Reduction _ ty)- = do { dflags <- getDynFlags- ; when (gopt Opt_FamAppCache dflags) $- do { traceTcS "extendFamAppCache" (vcat [ ppr tc <+> ppr xi_args- , ppr ty ])- ; updInertTcS $ \ is@(IS { inert_famapp_cache = fc }) ->- is { inert_famapp_cache = insertFunEq fc tc xi_args stuff } } }---- Remove entries from the cache whose evidence mentions variables in the--- supplied set-dropFromFamAppCache :: VarSet -> TcS ()-dropFromFamAppCache varset- = do { inerts@(IS { inert_famapp_cache = famapp_cache }) <- getTcSInerts- ; let filtered = filterTcAppMap check famapp_cache- ; setTcSInerts $ inerts { inert_famapp_cache = filtered } }- where- check :: Reduction -> Bool- check redn- = not (anyFreeVarsOfCo (`elemVarSet` varset) $ reductionCoercion redn)--{- *********************************************************************-* *- Irreds-* *-********************************************************************* -}--foldIrreds :: (Ct -> b -> b) -> Cts -> b -> b-foldIrreds k irreds z = foldr k z irreds--{--************************************************************************-* *-* The TcS solver monad *-* *-************************************************************************--Note [The TcS monad]-~~~~~~~~~~~~~~~~~~~~-The TcS monad is a weak form of the main Tc monad--All you can do is- * fail- * allocate new variables- * fill in evidence variables--Filling in a dictionary evidence variable means to create a binding-for it, so TcS carries a mutable location where the binding can be-added. This is initialised from the innermost implication constraint.--}--data TcSEnv- = TcSEnv {- tcs_ev_binds :: EvBindsVar,-- tcs_unified :: IORef Int,- -- The number of unification variables we have filled- -- The important thing is whether it is non-zero-- tcs_unif_lvl :: IORef (Maybe TcLevel),- -- The Unification Level Flag- -- Outermost level at which we have unified a meta tyvar- -- Starts at Nothing, then (Just i), then (Just j) where j<i- -- See Note [The Unification Level Flag]-- tcs_count :: IORef Int, -- Global step count-- tcs_inerts :: IORef InertSet, -- Current inert set-- -- Whether to throw an exception if we come across an insoluble constraint.- -- Used to fail-fast when checking for hole-fits. See Note [Speeding up- -- valid hole-fits].- tcs_abort_on_insoluble :: Bool,-- -- See Note [WorkList priorities] in GHC.Tc.Solver.InertSet- tcs_worklist :: IORef WorkList -- Current worklist- }------------------newtype TcS a = TcS { unTcS :: TcSEnv -> TcM a }- deriving (Functor)--instance MonadFix TcS where- mfix k = TcS $ \env -> mfix (\x -> unTcS (k x) env)---- | Smart constructor for 'TcS', as describe in Note [The one-shot state--- monad trick] in "GHC.Utils.Monad".-mkTcS :: (TcSEnv -> TcM a) -> TcS a-mkTcS f = TcS (oneShot f)--instance Applicative TcS where- pure x = mkTcS $ \_ -> return x- (<*>) = ap--instance Monad TcS where- m >>= k = mkTcS $ \ebs -> do- unTcS m ebs >>= (\r -> unTcS (k r) ebs)--instance MonadIO TcS where- liftIO act = TcS $ \_env -> liftIO act--instance MonadFail TcS where- fail err = mkTcS $ \_ -> fail err--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--- Do not export wrapTcS, because it promotes an arbitrary TcM to TcS,--- and TcS is supposed to have limited functionality-wrapTcS action = mkTcS $ \_env -> action -- a TcM action will not use the TcEvBinds--wrap2TcS :: (TcM a -> TcM a) -> TcS a -> TcS a-wrap2TcS fn (TcS thing) = mkTcS $ \env -> fn (thing env)--wrapErrTcS :: TcM a -> TcS a--- The thing wrapped should just fail--- There's no static check; it's up to the user--- Having a variant for each error message is too painful-wrapErrTcS = wrapTcS--wrapWarnTcS :: TcM a -> TcS a--- The thing wrapped should just add a warning, or no-op--- There's no static check; it's up to the user-wrapWarnTcS = wrapTcS--panicTcS :: SDoc -> TcS a-failTcS :: TcRnMessage -> TcS a-warnTcS, addErrTcS :: TcRnMessage -> TcS ()-failTcS = wrapTcS . TcM.failWith-warnTcS msg = wrapTcS (TcM.addDiagnostic msg)-addErrTcS = wrapTcS . TcM.addErr-panicTcS doc = pprPanic "GHC.Tc.Solver.Canonical" doc---- | Emit a warning within the 'TcS' monad at the location given by the 'CtLoc'.-ctLocWarnTcS :: CtLoc -> TcRnMessage -> TcS ()-ctLocWarnTcS loc msg = wrapTcS $ TcM.setCtLocM loc $ TcM.addDiagnostic msg--traceTcS :: String -> SDoc -> TcS ()-traceTcS herald doc = wrapTcS (TcM.traceTc herald doc)-{-# INLINE traceTcS #-} -- see Note [INLINE conditional tracing utilities]--runTcPluginTcS :: TcPluginM a -> TcS a-runTcPluginTcS = wrapTcS . runTcPluginM--instance HasDynFlags TcS where- getDynFlags = wrapTcS getDynFlags--getGlobalRdrEnvTcS :: TcS GlobalRdrEnv-getGlobalRdrEnvTcS = wrapTcS TcM.getGlobalRdrEnv--bumpStepCountTcS :: TcS ()-bumpStepCountTcS = mkTcS $ \env ->- do { let ref = tcs_count env- ; n <- TcM.readTcRef ref- ; TcM.writeTcRef ref (n+1) }--csTraceTcS :: SDoc -> TcS ()-csTraceTcS doc- = wrapTcS $ csTraceTcM (return doc)-{-# INLINE csTraceTcS #-} -- see Note [INLINE conditional tracing utilities]--traceFireTcS :: CtEvidence -> SDoc -> TcS ()--- Dump a rule-firing trace-traceFireTcS ev doc- = mkTcS $ \env -> csTraceTcM $- do { n <- TcM.readTcRef (tcs_count env)- ; tclvl <- TcM.getTcLevel- ; return (hang (text "Step" <+> int n- <> brackets (text "l:" <> ppr tclvl <> comma <>- text "d:" <> ppr (ctLocDepth (ctEvLoc ev)))- <+> doc <> colon)- 4 (ppr ev)) }-{-# INLINE traceFireTcS #-} -- see Note [INLINE conditional tracing utilities]--csTraceTcM :: TcM SDoc -> TcM ()--- Constraint-solver tracing, -ddump-cs-trace-csTraceTcM mk_doc- = do { logger <- getLogger- ; when ( logHasDumpFlag logger Opt_D_dump_cs_trace- || logHasDumpFlag logger Opt_D_dump_tc_trace)- ( do { msg <- mk_doc- ; TcM.dumpTcRn False- Opt_D_dump_cs_trace- "" FormatText- msg }) }-{-# INLINE csTraceTcM #-} -- see Note [INLINE conditional tracing utilities]--runTcS :: TcS a -- What to run- -> TcM (a, EvBindMap)-runTcS tcs- = do { ev_binds_var <- TcM.newTcEvBinds- ; res <- runTcSWithEvBinds ev_binds_var tcs- ; ev_binds <- TcM.getTcEvBindsMap ev_binds_var- ; return (res, ev_binds) }---- | This variant of 'runTcS' will immediately fail upon encountering an--- insoluble ct. See Note [Speeding up valid hole-fits]. Its one usage--- site does not need the ev_binds, so we do not return them.-runTcSEarlyAbort :: TcS a -> TcM a-runTcSEarlyAbort tcs- = do { ev_binds_var <- TcM.newTcEvBinds- ; runTcSWithEvBinds' True True ev_binds_var tcs }---- | This can deal only with equality constraints.-runTcSEqualities :: TcS a -> TcM a-runTcSEqualities thing_inside- = do { ev_binds_var <- TcM.newNoTcEvBinds- ; runTcSWithEvBinds ev_binds_var thing_inside }---- | A variant of 'runTcS' that takes and returns an 'InertSet' for--- later resumption of the 'TcS' session.-runTcSInerts :: InertSet -> TcS a -> TcM (a, InertSet)-runTcSInerts inerts tcs = do- ev_binds_var <- TcM.newTcEvBinds- runTcSWithEvBinds' False False ev_binds_var $ do- setTcSInerts inerts- a <- tcs- new_inerts <- getTcSInerts- return (a, new_inerts)--runTcSWithEvBinds :: EvBindsVar- -> TcS a- -> TcM a-runTcSWithEvBinds = runTcSWithEvBinds' True False--runTcSWithEvBinds' :: Bool -- ^ Restore type variable cycles afterwards?- -- Don't if you want to reuse the InertSet.- -- See also Note [Type equality cycles]- -- in GHC.Tc.Solver.Canonical- -> Bool- -> EvBindsVar- -> TcS a- -> TcM a-runTcSWithEvBinds' restore_cycles abort_on_insoluble ev_binds_var tcs- = do { unified_var <- TcM.newTcRef 0- ; step_count <- TcM.newTcRef 0- ; inert_var <- TcM.newTcRef emptyInert- ; wl_var <- TcM.newTcRef emptyWorkList- ; unif_lvl_var <- TcM.newTcRef Nothing- ; let env = TcSEnv { tcs_ev_binds = ev_binds_var- , tcs_unified = unified_var- , tcs_unif_lvl = unif_lvl_var- , tcs_count = step_count- , tcs_inerts = inert_var- , tcs_abort_on_insoluble = abort_on_insoluble- , tcs_worklist = wl_var }-- -- Run the computation- ; res <- unTcS tcs env-- ; count <- TcM.readTcRef step_count- ; when (count > 0) $- csTraceTcM $ return (text "Constraint solver steps =" <+> int count)-- ; when restore_cycles $- do { inert_set <- TcM.readTcRef inert_var- ; restoreTyVarCycles inert_set }--#if defined(DEBUG)- ; ev_binds <- TcM.getTcEvBindsMap ev_binds_var- ; checkForCyclicBinds ev_binds-#endif-- ; return res }-------------------------------#if defined(DEBUG)-checkForCyclicBinds :: EvBindMap -> TcM ()-checkForCyclicBinds ev_binds_map- | null cycles- = return ()- | null coercion_cycles- = TcM.traceTc "Cycle in evidence binds" $ ppr cycles- | otherwise- = pprPanic "Cycle in coercion bindings" $ ppr coercion_cycles- where- ev_binds = evBindMapBinds ev_binds_map-- cycles :: [[EvBind]]- cycles = [c | CyclicSCC c <- stronglyConnCompFromEdgedVerticesUniq edges]-- coercion_cycles = [c | c <- cycles, any is_co_bind c]- is_co_bind (EvBind { eb_lhs = b }) = isEqPrimPred (varType b)-- edges :: [ Node EvVar EvBind ]- edges = [ DigraphNode bind bndr (nonDetEltsUniqSet (evVarsOfTerm rhs))- | bind@(EvBind { eb_lhs = bndr, eb_rhs = rhs}) <- bagToList ev_binds ]- -- It's OK to use nonDetEltsUFM here as- -- stronglyConnCompFromEdgedVertices is still deterministic even- -- if the edges are in nondeterministic order as explained in- -- Note [Deterministic SCC] in GHC.Data.Graph.Directed.-#endif-------------------------------setEvBindsTcS :: EvBindsVar -> TcS a -> TcS a-setEvBindsTcS ref (TcS thing_inside)- = TcS $ \ env -> thing_inside (env { tcs_ev_binds = ref })--nestImplicTcS :: EvBindsVar- -> TcLevel -> TcS a- -> TcS a-nestImplicTcS ref inner_tclvl (TcS thing_inside)- = TcS $ \ TcSEnv { tcs_unified = unified_var- , tcs_inerts = old_inert_var- , tcs_count = count- , tcs_unif_lvl = unif_lvl- , tcs_abort_on_insoluble = abort_on_insoluble- } ->- do { inerts <- TcM.readTcRef old_inert_var- ; let nest_inert = inerts { inert_cycle_breakers = pushCycleBreakerVarStack- (inert_cycle_breakers inerts)- , inert_cans = (inert_cans inerts)- { inert_given_eqs = False } }- -- All other InertSet fields are inherited- ; new_inert_var <- TcM.newTcRef nest_inert- ; new_wl_var <- TcM.newTcRef emptyWorkList- ; let nest_env = TcSEnv { tcs_count = count -- Inherited- , tcs_unif_lvl = unif_lvl -- Inherited- , tcs_ev_binds = ref- , tcs_unified = unified_var- , tcs_inerts = new_inert_var- , tcs_abort_on_insoluble = abort_on_insoluble- , tcs_worklist = new_wl_var }- ; res <- TcM.setTcLevel inner_tclvl $- thing_inside nest_env-- ; out_inert_set <- TcM.readTcRef new_inert_var- ; restoreTyVarCycles out_inert_set--#if defined(DEBUG)- -- Perform a check that the thing_inside did not cause cycles- ; ev_binds <- TcM.getTcEvBindsMap ref- ; checkForCyclicBinds ev_binds-#endif- ; return res }--nestTcS :: TcS a -> TcS a--- Use the current untouchables, augmenting the current--- evidence bindings, and solved dictionaries--- But have no effect on the InertCans, or on the inert_famapp_cache--- (we want to inherit the latter from processing the Givens)-nestTcS (TcS thing_inside)- = TcS $ \ env@(TcSEnv { tcs_inerts = inerts_var }) ->- do { inerts <- TcM.readTcRef inerts_var- ; new_inert_var <- TcM.newTcRef inerts- ; new_wl_var <- TcM.newTcRef emptyWorkList- ; let nest_env = env { tcs_inerts = new_inert_var- , tcs_worklist = new_wl_var }-- ; res <- thing_inside nest_env-- ; new_inerts <- TcM.readTcRef new_inert_var-- -- we want to propagate the safe haskell failures- ; let old_ic = inert_cans inerts- new_ic = inert_cans new_inerts- nxt_ic = old_ic { inert_safehask = inert_safehask new_ic }-- ; TcM.writeTcRef inerts_var -- See Note [Propagate the solved dictionaries]- (inerts { inert_solved_dicts = inert_solved_dicts new_inerts- , inert_cans = nxt_ic })-- ; return res }--emitImplicationTcS :: TcLevel -> SkolemInfoAnon- -> [TcTyVar] -- Skolems- -> [EvVar] -- Givens- -> Cts -- Wanteds- -> TcS TcEvBinds--- Add an implication to the TcS monad work-list-emitImplicationTcS new_tclvl skol_info skol_tvs givens wanteds- = do { let wc = emptyWC { wc_simple = wanteds }- ; imp <- wrapTcS $- do { ev_binds_var <- TcM.newTcEvBinds- ; imp <- TcM.newImplication- ; return (imp { ic_tclvl = new_tclvl- , ic_skols = skol_tvs- , ic_given = givens- , ic_wanted = wc- , ic_binds = ev_binds_var- , ic_info = skol_info }) }-- ; emitImplication imp- ; return (TcEvBinds (ic_binds imp)) }--emitTvImplicationTcS :: TcLevel -> SkolemInfoAnon- -> [TcTyVar] -- Skolems- -> Cts -- Wanteds- -> TcS ()--- Just like emitImplicationTcS but no givens and no bindings-emitTvImplicationTcS new_tclvl skol_info skol_tvs wanteds- = do { let wc = emptyWC { wc_simple = wanteds }- ; imp <- wrapTcS $- do { ev_binds_var <- TcM.newNoTcEvBinds- ; imp <- TcM.newImplication- ; return (imp { ic_tclvl = new_tclvl- , ic_skols = skol_tvs- , ic_wanted = wc- , ic_binds = ev_binds_var- , ic_info = skol_info }) }-- ; emitImplication imp }---{- Note [Propagate the solved dictionaries]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-It's really quite important that nestTcS does not discard the solved-dictionaries from the thing_inside.-Consider- Eq [a]- forall b. empty => Eq [a]-We solve the simple (Eq [a]), under nestTcS, and then turn our attention to-the implications. It's definitely fine to use the solved dictionaries on-the inner implications, and it can make a significant performance difference-if you do so.--}---- Getters and setters of GHC.Tc.Utils.Env fields--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~---- Getter of inerts and worklist-getTcSInertsRef :: TcS (IORef InertSet)-getTcSInertsRef = TcS (return . tcs_inerts)--getTcSWorkListRef :: TcS (IORef WorkList)-getTcSWorkListRef = TcS (return . tcs_worklist)--getTcSInerts :: TcS InertSet-getTcSInerts = getTcSInertsRef >>= readTcRef--setTcSInerts :: InertSet -> TcS ()-setTcSInerts ics = do { r <- getTcSInertsRef; writeTcRef r ics }--getWorkListImplics :: TcS (Bag Implication)-getWorkListImplics- = do { wl_var <- getTcSWorkListRef- ; wl_curr <- readTcRef wl_var- ; return (wl_implics wl_curr) }--pushLevelNoWorkList :: SDoc -> TcS a -> TcS (TcLevel, a)--- Push the level and run thing_inside--- However, thing_inside should not generate any work items-#if defined(DEBUG)-pushLevelNoWorkList err_doc (TcS thing_inside)- = TcS (\env -> TcM.pushTcLevelM $- thing_inside (env { tcs_worklist = wl_panic })- )- where- wl_panic = pprPanic "GHC.Tc.Solver.Monad.buildImplication" err_doc- -- This panic checks that the thing-inside- -- does not emit any work-list constraints-#else-pushLevelNoWorkList _ (TcS thing_inside)- = TcS (\env -> TcM.pushTcLevelM (thing_inside env)) -- Don't check-#endif--updWorkListTcS :: (WorkList -> WorkList) -> TcS ()-updWorkListTcS f- = do { wl_var <- getTcSWorkListRef- ; updTcRef wl_var f }--emitWorkNC :: [CtEvidence] -> TcS ()-emitWorkNC evs- | null evs- = return ()- | otherwise- = emitWork (map mkNonCanonical evs)--emitWork :: [Ct] -> TcS ()-emitWork [] = return () -- avoid printing, among other work-emitWork cts- = do { traceTcS "Emitting fresh work" (vcat (map ppr cts))- ; updWorkListTcS (extendWorkListCts cts) }--emitImplication :: Implication -> TcS ()-emitImplication implic- = updWorkListTcS (extendWorkListImplic implic)--newTcRef :: a -> TcS (TcRef a)-newTcRef x = wrapTcS (TcM.newTcRef x)--readTcRef :: TcRef a -> TcS a-readTcRef ref = wrapTcS (TcM.readTcRef ref)--writeTcRef :: TcRef a -> a -> TcS ()-writeTcRef ref val = wrapTcS (TcM.writeTcRef ref val)--updTcRef :: TcRef a -> (a->a) -> TcS ()-updTcRef ref upd_fn = wrapTcS (TcM.updTcRef ref upd_fn)--getTcEvBindsVar :: TcS EvBindsVar-getTcEvBindsVar = TcS (return . tcs_ev_binds)--getTcLevel :: TcS TcLevel-getTcLevel = wrapTcS TcM.getTcLevel--getTcEvTyCoVars :: EvBindsVar -> TcS TyCoVarSet-getTcEvTyCoVars ev_binds_var- = wrapTcS $ TcM.getTcEvTyCoVars ev_binds_var--getTcEvBindsMap :: EvBindsVar -> TcS EvBindMap-getTcEvBindsMap ev_binds_var- = wrapTcS $ TcM.getTcEvBindsMap ev_binds_var--setTcEvBindsMap :: EvBindsVar -> EvBindMap -> TcS ()-setTcEvBindsMap ev_binds_var binds- = wrapTcS $ TcM.setTcEvBindsMap ev_binds_var binds--unifyTyVar :: TcTyVar -> TcType -> TcS ()--- Unify a meta-tyvar with a type--- We keep track of how many unifications have happened in tcs_unified,------ We should never unify the same variable twice!-unifyTyVar tv ty- = assertPpr (isMetaTyVar tv) (ppr tv) $- TcS $ \ env ->- do { TcM.traceTc "unifyTyVar" (ppr tv <+> text ":=" <+> ppr ty)- ; TcM.writeMetaTyVar tv ty- ; TcM.updTcRef (tcs_unified env) (+1) }--reportUnifications :: TcS a -> TcS (Int, a)-reportUnifications (TcS thing_inside)- = TcS $ \ env ->- do { inner_unified <- TcM.newTcRef 0- ; res <- thing_inside (env { tcs_unified = inner_unified })- ; n_unifs <- TcM.readTcRef inner_unified- ; TcM.updTcRef (tcs_unified env) (+ n_unifs)- ; return (n_unifs, res) }--data TouchabilityTestResult- -- See Note [Solve by unification] in GHC.Tc.Solver.Interact- -- which points out that having TouchableSameLevel is just an optimisation;- -- we could manage with TouchableOuterLevel alone (suitably renamed)- = TouchableSameLevel- | TouchableOuterLevel [TcTyVar] -- Promote these- TcLevel -- ..to this level- | Untouchable--instance Outputable TouchabilityTestResult where- ppr TouchableSameLevel = text "TouchableSameLevel"- ppr (TouchableOuterLevel tvs lvl) = text "TouchableOuterLevel" <> parens (ppr lvl <+> ppr tvs)- ppr Untouchable = text "Untouchable"--touchabilityTest :: CtFlavour -> TcTyVar -> TcType -> TcS (TouchabilityTestResult, TcType)--- ^ This is the key test for untouchability:--- See Note [Unification preconditions] in GHC.Tc.Utils.Unify--- and Note [Solve by unification] in GHC.Tc.Solver.Interact------ Returns a new rhs type, as this function can turn make some metavariables concrete.-touchabilityTest flav tv1 rhs- | flav /= Given -- See Note [Do not unify Givens]- , MetaTv { mtv_tclvl = tv_lvl, mtv_info = info } <- tcTyVarDetails tv1- = do { continue_solving <- wrapTcS $ startSolvingByUnification info rhs- ; case continue_solving of- { Nothing -> return (Untouchable, rhs)- ; Just rhs ->- do { let (free_metas, free_skols) = partition isPromotableMetaTyVar $- nonDetEltsUniqSet $- tyCoVarsOfType rhs- ; ambient_lvl <- getTcLevel- ; given_eq_lvl <- getInnermostGivenEqLevel-- ; if | tv_lvl `sameDepthAs` ambient_lvl- -> return (TouchableSameLevel, rhs)-- | tv_lvl `deeperThanOrSame` given_eq_lvl -- No intervening given equalities- , all (does_not_escape tv_lvl) free_skols -- No skolem escapes- -> return (TouchableOuterLevel free_metas tv_lvl, rhs)-- | otherwise- -> return (Untouchable, rhs) } } }- | otherwise- = return (Untouchable, rhs)- where-- does_not_escape tv_lvl fv- | isTyVar fv = tv_lvl `deeperThanOrSame` tcTyVarLevel fv- | otherwise = True- -- Coercion variables are not an escape risk- -- If an implication binds a coercion variable, it'll have equalities,- -- so the "intervening given equalities" test above will catch it- -- Coercion holes get filled with coercions, so again no problem.--{- Note [Do not unify Givens]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this GADT match- data T a where- T1 :: T Int- ...-- f x = case x of- T1 -> True- ...--So we get f :: T alpha[1] -> beta[1]- x :: T alpha[1]-and from the T1 branch we get the implication- forall[2] (alpha[1] ~ Int) => beta[1] ~ Bool--Now, clearly we don't want to unify alpha:=Int! Yet at the moment we-process [G] alpha[1] ~ Int, we don't have any given-equalities in the-inert set, and hence there are no given equalities to make alpha untouchable.--NB: if it were alpha[2] ~ Int, this argument wouldn't hold. But that-never happens: invariant (GivenInv) in Note [TcLevel invariants]-in GHC.Tc.Utils.TcType.--Simple solution: never unify in Givens!--}--getDefaultInfo :: TcS ([Type], (Bool, Bool))-getDefaultInfo = wrapTcS TcM.tcGetDefaultTys--getWorkList :: TcS WorkList-getWorkList = do { wl_var <- getTcSWorkListRef- ; wrapTcS (TcM.readTcRef wl_var) }--selectNextWorkItem :: TcS (Maybe Ct)--- Pick which work item to do next--- See Note [Prioritise equalities]-selectNextWorkItem- = do { wl_var <- getTcSWorkListRef- ; wl <- readTcRef wl_var- ; case selectWorkItem wl of {- Nothing -> return Nothing ;- Just (ct, new_wl) ->- do { -- checkReductionDepth (ctLoc ct) (ctPred ct)- -- This is done by GHC.Tc.Solver.Interact.chooseInstance- ; writeTcRef wl_var new_wl- ; return (Just ct) } } }---- Just get some environments needed for instance looking up and matching--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--getInstEnvs :: TcS InstEnvs-getInstEnvs = wrapTcS $ TcM.tcGetInstEnvs--getFamInstEnvs :: TcS (FamInstEnv, FamInstEnv)-getFamInstEnvs = wrapTcS $ FamInst.tcGetFamInstEnvs--getTopEnv :: TcS HscEnv-getTopEnv = wrapTcS $ TcM.getTopEnv--getGblEnv :: TcS TcGblEnv-getGblEnv = wrapTcS $ TcM.getGblEnv--getLclEnv :: TcS TcLclEnv-getLclEnv = wrapTcS $ TcM.getLclEnv--setLclEnv :: TcLclEnv -> TcS a -> TcS a-setLclEnv env = wrap2TcS (TcM.setLclEnv env)--tcLookupClass :: Name -> TcS Class-tcLookupClass c = wrapTcS $ TcM.tcLookupClass c--tcLookupId :: Name -> TcS Id-tcLookupId n = wrapTcS $ TcM.tcLookupId n---- Any use of this function is a bit suspect, because it violates the--- pure veneer of TcS. But it's just about warnings around unused imports--- and local constructors (GHC will issue fewer warnings than it otherwise--- might), so it's not worth losing sleep over.-recordUsedGREs :: Bag GlobalRdrElt -> TcS ()-recordUsedGREs gres- = do { wrapTcS $ TcM.addUsedGREs gre_list- -- If a newtype constructor was imported, don't warn about not- -- importing it...- ; wrapTcS $ traverse_ (TcM.keepAlive . greMangledName) gre_list }- -- ...and similarly, if a newtype constructor was defined in the same- -- module, don't warn about it being unused.- -- See Note [Tracking unused binding and imports] in GHC.Tc.Utils.-- where- gre_list = bagToList gres---- Various smaller utilities [TODO, maybe will be absorbed in the instance matcher]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--checkWellStagedDFun :: CtLoc -> InstanceWhat -> PredType -> TcS ()--- Check that we do not try to use an instance before it is available. E.g.--- instance Eq T where ...--- f x = $( ... (\(p::T) -> p == p)... )--- Here we can't use the equality function from the instance in the splice--checkWellStagedDFun loc what pred- = do- mbind_lvl <- checkWellStagedInstanceWhat what- case mbind_lvl of- Just bind_lvl | bind_lvl > impLevel ->- wrapTcS $ TcM.setCtLocM loc $ do- { use_stage <- TcM.getStage- ; TcM.checkWellStaged pp_thing bind_lvl (thLevel use_stage) }- _ ->- return ()- where- pp_thing = text "instance for" <+> quotes (ppr pred)---- | Returns the ThLevel of evidence for the solved constraint (if it has evidence)--- See Note [Well-staged instance evidence]-checkWellStagedInstanceWhat :: InstanceWhat -> TcS (Maybe ThLevel)-checkWellStagedInstanceWhat what- | TopLevInstance { iw_dfun_id = dfun_id } <- what- = return $ Just (TcM.topIdLvl dfun_id)- | BuiltinTypeableInstance tc <- what- = do- cur_mod <- extractModule <$> getGblEnv- return $ Just (if nameIsLocalOrFrom cur_mod (tyConName tc)- then outerLevel- else impLevel)- | otherwise = return Nothing--{--Note [Well-staged instance evidence]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--Evidence for instances must obey the same level restrictions as normal bindings.-In particular, it is forbidden to use an instance in a top-level splice in the-module which the instance is defined. This is because the evidence is bound at-the top-level and top-level definitions are forbidden from being using in top-level splices in-the same module.--For example, suppose you have a function.. foo :: Show a => Code Q a -> Code Q ()-then the following program is disallowed,--```-data T a = T a deriving (Show)--main :: IO ()-main =- let x = $$(foo [|| T () ||])- in return ()-```--because the `foo` function (used in a top-level splice) requires `Show T` evidence,-which is defined at the top-level and therefore fails with an error that we have violated-the stage restriction.--```-Main.hs:12:14: error:- • GHC stage restriction:- instance for ‘Show- (T ())’ is used in a top-level splice, quasi-quote, or annotation,- and must be imported, not defined locally- • In the expression: foo [|| T () ||]- In the Template Haskell splice $$(foo [|| T () ||])- In the expression: $$(foo [|| T () ||])- |-12 | let x = $$(foo [|| T () ||])- |-```--Solving a `Typeable (T t1 ...tn)` constraint generates code that relies on-`$tcT`, the `TypeRep` for `T`; and we must check that this reference to `$tcT`-is well staged. It's easy to know the stage of `$tcT`: for imported TyCons it-will be `impLevel`, and for local TyCons it will be `toplevel`.--Therefore the `InstanceWhat` type had to be extended with-a special case for `Typeable`, which recorded the TyCon the evidence was for and-could them be used to check that we were not attempting to evidence in a stage incorrect-manner.---}--pprEq :: TcType -> TcType -> SDoc-pprEq ty1 ty2 = pprParendType ty1 <+> char '~' <+> pprParendType ty2--isFilledMetaTyVar_maybe :: TcTyVar -> TcS (Maybe Type)-isFilledMetaTyVar_maybe tv = wrapTcS (TcM.isFilledMetaTyVar_maybe tv)--isFilledMetaTyVar :: TcTyVar -> TcS Bool-isFilledMetaTyVar tv = wrapTcS (TcM.isFilledMetaTyVar tv)--zonkTyCoVarsAndFV :: TcTyCoVarSet -> TcS TcTyCoVarSet-zonkTyCoVarsAndFV tvs = wrapTcS (TcM.zonkTyCoVarsAndFV tvs)--zonkTyCoVarsAndFVList :: [TcTyCoVar] -> TcS [TcTyCoVar]-zonkTyCoVarsAndFVList tvs = wrapTcS (TcM.zonkTyCoVarsAndFVList tvs)--zonkCo :: Coercion -> TcS Coercion-zonkCo = wrapTcS . TcM.zonkCo--zonkTcType :: TcType -> TcS TcType-zonkTcType ty = wrapTcS (TcM.zonkTcType ty)--zonkTcTypes :: [TcType] -> TcS [TcType]-zonkTcTypes tys = wrapTcS (TcM.zonkTcTypes tys)--zonkTcTyVar :: TcTyVar -> TcS TcType-zonkTcTyVar tv = wrapTcS (TcM.zonkTcTyVar tv)--zonkSimples :: Cts -> TcS Cts-zonkSimples cts = wrapTcS (TcM.zonkSimples cts)--zonkWC :: WantedConstraints -> TcS WantedConstraints-zonkWC wc = wrapTcS (TcM.zonkWC wc)--zonkTyCoVarKind :: TcTyCoVar -> TcS TcTyCoVar-zonkTyCoVarKind tv = wrapTcS (TcM.zonkTyCoVarKind tv)-------------------------------pprKicked :: Int -> SDoc-pprKicked 0 = empty-pprKicked n = parens (int n <+> text "kicked out")--{- *********************************************************************-* *-* The Unification Level Flag *-* *-********************************************************************* -}--{- Note [The Unification Level Flag]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider a deep tree of implication constraints- forall[1] a. -- Outer-implic- C alpha[1] -- Simple- forall[2] c. ....(C alpha[1]).... -- Implic-1- forall[2] b. ....(alpha[1] ~ Int).... -- Implic-2--The (C alpha) is insoluble until we know alpha. We solve alpha-by unifying alpha:=Int somewhere deep inside Implic-2. But then we-must try to solve the Outer-implic all over again. This time we can-solve (C alpha) both in Outer-implic, and nested inside Implic-1.--When should we iterate solving a level-n implication?-Answer: if any unification of a tyvar at level n takes place- in the ic_implics of that implication.--* What if a unification takes place at level n-1? Then don't iterate- level n, because we'll iterate level n-1, and that will in turn iterate- level n.--* What if a unification takes place at level n, in the ic_simples of- level n? No need to track this, because the kick-out mechanism deals- with it. (We can't drop kick-out in favour of iteration, because kick-out- works for skolem-equalities, not just unifications.)--So the monad-global Unification Level Flag, kept in tcs_unif_lvl keeps-track of- - Whether any unifications at all have taken place (Nothing => no unifications)- - If so, what is the outermost level that has seen a unification (Just lvl)--The iteration done in the simplify_loop/maybe_simplify_again loop in GHC.Tc.Solver.--It helpful not to iterate unless there is a chance of progress. #8474 is-an example:-- * There's a deeply-nested chain of implication constraints.- ?x:alpha => ?y1:beta1 => ... ?yn:betan => [W] ?x:Int-- * From the innermost one we get a [W] alpha[1] ~ Int,- so we can unify.-- * It's better not to iterate the inner implications, but go all the- way out to level 1 before iterating -- because iterating level 1- will iterate the inner levels anyway.--(In the olden days when we "floated" thse Derived constraints, this was-much, much more important -- we got exponential behaviour, as each iteration-produced the same Derived constraint.)--}---resetUnificationFlag :: TcS Bool--- We are at ambient level i--- If the unification flag = Just i, reset it to Nothing and return True--- Otherwise leave it unchanged and return False-resetUnificationFlag- = TcS $ \env ->- do { let ref = tcs_unif_lvl env- ; ambient_lvl <- TcM.getTcLevel- ; mb_lvl <- TcM.readTcRef ref- ; TcM.traceTc "resetUnificationFlag" $- vcat [ text "ambient:" <+> ppr ambient_lvl- , text "unif_lvl:" <+> ppr mb_lvl ]- ; case mb_lvl of- Nothing -> return False- Just unif_lvl | ambient_lvl `strictlyDeeperThan` unif_lvl- -> return False- | otherwise- -> do { TcM.writeTcRef ref Nothing- ; return True } }--setUnificationFlag :: TcLevel -> TcS ()--- (setUnificationFlag i) sets the unification level to (Just i)--- unless it already is (Just j) where j <= i-setUnificationFlag lvl- = TcS $ \env ->- do { let ref = tcs_unif_lvl env- ; mb_lvl <- TcM.readTcRef ref- ; case mb_lvl of- Just unif_lvl | lvl `deeperThanOrSame` unif_lvl- -> return ()- _ -> TcM.writeTcRef ref (Just lvl) }---{- *********************************************************************-* *-* Instantiation etc.-* *-********************************************************************* -}---- Instantiations--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--instDFunType :: DFunId -> [DFunInstType] -> TcS ([TcType], TcThetaType)-instDFunType dfun_id inst_tys- = wrapTcS $ TcM.instDFunType dfun_id inst_tys--newFlexiTcSTy :: Kind -> TcS TcType-newFlexiTcSTy knd = wrapTcS (TcM.newFlexiTyVarTy knd)--cloneMetaTyVar :: TcTyVar -> TcS TcTyVar-cloneMetaTyVar tv = wrapTcS (TcM.cloneMetaTyVar tv)--instFlexiX :: Subst -> [TKVar] -> TcS Subst-instFlexiX subst tvs- = wrapTcS (foldlM instFlexiHelper subst tvs)--instFlexiHelper :: Subst -> TKVar -> TcM Subst--- Makes fresh tyvar, extends the substitution, and the in-scope set-instFlexiHelper subst tv- = do { uniq <- TcM.newUnique- ; details <- TcM.newMetaDetails TauTv- ; let name = setNameUnique (tyVarName tv) uniq- kind = substTyUnchecked subst (tyVarKind tv)- tv' = mkTcTyVar name kind details- subst' = extendTvSubstWithClone subst tv tv'- ; TcM.traceTc "instFlexi" (ppr tv')- ; return (extendTvSubst subst' tv (mkTyVarTy tv')) }--matchGlobalInst :: DynFlags- -> Bool -- True <=> caller is the short-cut solver- -- See Note [Shortcut solving: overlap]- -> Class -> [Type] -> TcS TcM.ClsInstResult-matchGlobalInst dflags short_cut cls tys- = wrapTcS (TcM.matchGlobalInst dflags short_cut cls tys)--tcInstSkolTyVarsX :: SkolemInfo -> Subst -> [TyVar] -> TcS (Subst, [TcTyVar])-tcInstSkolTyVarsX skol_info subst tvs = wrapTcS $ TcM.tcInstSkolTyVarsX skol_info subst tvs---- Creating and setting evidence variables and CtFlavors--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--data MaybeNew = Fresh CtEvidence | Cached EvExpr--isFresh :: MaybeNew -> Bool-isFresh (Fresh {}) = True-isFresh (Cached {}) = False--freshGoals :: [MaybeNew] -> [CtEvidence]-freshGoals mns = [ ctev | Fresh ctev <- mns ]--getEvExpr :: MaybeNew -> EvExpr-getEvExpr (Fresh ctev) = ctEvExpr ctev-getEvExpr (Cached evt) = evt--setEvBind :: EvBind -> TcS ()-setEvBind ev_bind- = do { evb <- getTcEvBindsVar- ; wrapTcS $ TcM.addTcEvBind evb ev_bind }---- | Mark variables as used filling a coercion hole-useVars :: CoVarSet -> TcS ()-useVars co_vars- = do { ev_binds_var <- getTcEvBindsVar- ; let ref = ebv_tcvs ev_binds_var- ; wrapTcS $- do { tcvs <- TcM.readTcRef ref- ; let tcvs' = tcvs `unionVarSet` co_vars- ; TcM.writeTcRef ref tcvs' } }---- | Equalities only-setWantedEq :: HasDebugCallStack => TcEvDest -> Coercion -> TcS ()-setWantedEq (HoleDest hole) co- = do { useVars (coVarsOfCo co)- ; fillCoercionHole hole co }-setWantedEq (EvVarDest ev) _ = pprPanic "setWantedEq: EvVarDest" (ppr ev)---- | Good for both equalities and non-equalities-setWantedEvTerm :: TcEvDest -> EvTerm -> TcS ()-setWantedEvTerm (HoleDest hole) tm- | Just co <- evTermCoercion_maybe tm- = do { useVars (coVarsOfCo co)- ; fillCoercionHole hole co }- | otherwise- = -- See Note [Yukky eq_sel for a HoleDest]- do { let co_var = coHoleCoVar hole- ; setEvBind (mkWantedEvBind co_var tm)- ; fillCoercionHole hole (mkCoVarCo co_var) }--setWantedEvTerm (EvVarDest ev_id) tm- = setEvBind (mkWantedEvBind ev_id tm)--{- Note [Yukky eq_sel for a HoleDest]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-How can it be that a Wanted with HoleDest gets evidence that isn't-just a coercion? i.e. evTermCoercion_maybe returns Nothing.--Consider [G] forall a. blah => a ~ T- [W] S ~# T--Then doTopReactEqPred carefully looks up the (boxed) constraint (S ~ T)-in the quantified constraints, and wraps the (boxed) evidence it-gets back in an eq_sel to extract the unboxed (S ~# T). We can't put-that term into a coercion, so we add a value binding- h = eq_sel (...)-and the coercion variable h to fill the coercion hole.-We even re-use the CoHole's Id for this binding!--Yuk!--}--fillCoercionHole :: CoercionHole -> Coercion -> TcS ()-fillCoercionHole hole co- = do { wrapTcS $ TcM.fillCoercionHole hole co- ; kickOutAfterFillingCoercionHole hole }--setEvBindIfWanted :: CtEvidence -> EvTerm -> TcS ()-setEvBindIfWanted ev tm- = case ev of- 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)--newGivenEvVar :: CtLoc -> (TcPredType, EvTerm) -> TcS CtEvidence--- Make a new variable of the given PredType,--- immediately bind it to the given term--- and return its CtEvidence--- See Note [Bind new Givens immediately] in GHC.Tc.Types.Constraint-newGivenEvVar loc (pred, rhs)- = do { new_ev <- newBoundEvVarId pred rhs- ; return (CtGiven { ctev_pred = pred, ctev_evar = new_ev, ctev_loc = loc }) }---- | Make a new 'Id' of the given type, bound (in the monad's EvBinds) to the--- given term-newBoundEvVarId :: TcPredType -> EvTerm -> TcS EvVar-newBoundEvVarId pred rhs- = do { new_ev <- newEvVar pred- ; setEvBind (mkGivenEvBind new_ev rhs)- ; return new_ev }--newGivenEvVars :: CtLoc -> [(TcPredType, EvTerm)] -> TcS [CtEvidence]-newGivenEvVars loc pts = mapM (newGivenEvVar loc) pts--emitNewWantedEq :: CtLoc -> RewriterSet -> Role -> TcType -> TcType -> TcS Coercion--- | Emit a new Wanted equality into the work-list-emitNewWantedEq loc rewriters role ty1 ty2- = do { (ev, co) <- newWantedEq loc rewriters role ty1 ty2- ; updWorkListTcS (extendWorkListEq (mkNonCanonical ev))- ; return co }---- | Create a new Wanted constraint holding a coercion hole--- for an equality between the two types at the given 'Role'.-newWantedEq :: CtLoc -> RewriterSet -> Role -> TcType -> TcType- -> TcS (CtEvidence, Coercion)-newWantedEq loc rewriters role ty1 ty2- = do { hole <- wrapTcS $ TcM.newCoercionHole pty- ; traceTcS "Emitting new coercion hole" (ppr hole <+> dcolon <+> ppr pty)- ; return ( CtWanted { ctev_pred = pty- , ctev_dest = HoleDest hole- , ctev_loc = loc- , ctev_rewriters = rewriters }- , mkHoleCo hole ) }- where- pty = mkPrimEqPredRole role ty1 ty2---- | Create a new Wanted constraint holding an evidence variable.------ Don't use this for equality constraints: use 'newWantedEq' instead.-newWantedEvVarNC :: CtLoc -> RewriterSet- -> TcPredType -> TcS CtEvidence--- Don't look up in the solved/inerts; we know it's not there-newWantedEvVarNC loc rewriters pty- = do { new_ev <- newEvVar pty- ; traceTcS "Emitting new wanted" (ppr new_ev <+> dcolon <+> ppr pty $$- pprCtLoc loc)- ; return (CtWanted { ctev_pred = pty- , ctev_dest = EvVarDest new_ev- , ctev_loc = loc- , ctev_rewriters = rewriters })}---- | Like 'newWantedEvVarNC', except it might look up in the inert set--- to see if an inert already exists, and uses that instead of creating--- a new Wanted constraint.------ Don't use this for equality constraints: this function is only for--- constraints with 'EvVarDest'.-newWantedEvVar :: CtLoc -> RewriterSet- -> TcPredType -> TcS MaybeNew--- For anything except ClassPred, this is the same as newWantedEvVarNC-newWantedEvVar loc rewriters pty- = assertPpr (not (isEqPrimPred pty))- (vcat [ text "newWantedEvVar: HoleDestPred"- , text "pty:" <+> ppr pty ]) $- do { mb_ct <- lookupInInerts loc pty- ; case mb_ct of- Just ctev- -> do { traceTcS "newWantedEvVar/cache hit" $ ppr ctev- ; return $ Cached (ctEvExpr ctev) }- _ -> do { ctev <- newWantedEvVarNC loc rewriters pty- ; return (Fresh ctev) } }---- | Create a new Wanted constraint, potentially looking up--- non-equality constraints in the cache instead of creating--- a new one from scratch.------ Deals with both equality and non-equality constraints.-newWanted :: CtLoc -> RewriterSet -> PredType -> TcS MaybeNew-newWanted loc rewriters pty- | Just (role, ty1, ty2) <- getEqPredTys_maybe pty- = Fresh . fst <$> newWantedEq loc rewriters role ty1 ty2- | otherwise- = newWantedEvVar loc rewriters pty---- | Create a new Wanted constraint.------ Deals with both equality and non-equality constraints.------ Does not attempt to re-use non-equality constraints that already--- exist in the inert set.-newWantedNC :: CtLoc -> RewriterSet -> PredType -> TcS CtEvidence-newWantedNC loc rewriters pty- | Just (role, ty1, ty2) <- getEqPredTys_maybe pty- = fst <$> newWantedEq loc rewriters role ty1 ty2- | otherwise- = newWantedEvVarNC loc rewriters pty---- --------- Check done in GHC.Tc.Solver.Interact.selectNewWorkItem???? ------------ | Checks if the depth of the given location is too much. Fails if--- it's too big, with an appropriate error message.-checkReductionDepth :: CtLoc -> TcType -- ^ type being reduced- -> TcS ()-checkReductionDepth loc ty- = do { dflags <- getDynFlags- ; when (subGoalDepthExceeded dflags (ctLocDepth loc)) $- wrapErrTcS $ solverDepthError loc ty }--matchFam :: TyCon -> [Type] -> TcS (Maybe ReductionN)-matchFam tycon args = wrapTcS $ matchFamTcM tycon args--matchFamTcM :: TyCon -> [Type] -> TcM (Maybe ReductionN)--- Given (F tys) return (ty, co), where co :: F tys ~N ty-matchFamTcM tycon args- = do { fam_envs <- FamInst.tcGetFamInstEnvs- ; let match_fam_result- = reduceTyFamApp_maybe fam_envs Nominal tycon args- ; TcM.traceTc "matchFamTcM" $- vcat [ text "Matching:" <+> ppr (mkTyConApp tycon args)- , ppr_res match_fam_result ]- ; return match_fam_result }- where- ppr_res Nothing = text "Match failed"- ppr_res (Just (Reduction co ty))- = hang (text "Match succeeded:")- 2 (vcat [ text "Rewrites to:" <+> ppr ty- , text "Coercion:" <+> ppr co ])--solverDepthError :: CtLoc -> TcType -> TcM a-solverDepthError loc ty- = TcM.setCtLocM loc $- do { ty <- TcM.zonkTcType ty- ; env0 <- TcM.tcInitTidyEnv- ; let tidy_env = tidyFreeTyCoVars env0 (tyCoVarsOfTypeList ty)- tidy_ty = tidyType tidy_env ty- msg = mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ text "Reduction stack overflow; size =" <+> ppr depth- , hang (text "When simplifying the following type:")- 2 (ppr tidy_ty)- , note ]- ; TcM.failWithTcM (tidy_env, msg) }- where- depth = ctLocDepth loc- note = vcat- [ text "Use -freduction-depth=0 to disable this check"- , text "(any upper bound you could choose might fail unpredictably with"- , text " minor updates to GHC, so disabling the check is recommended if"- , text " you're sure that type checking should terminate)" ]---{--************************************************************************-* *- Breaking type variable cycles-* *-************************************************************************--}---- | Conditionally replace all type family applications in the RHS with fresh--- variables, emitting givens that relate the type family application to the--- variable. See Note [Type equality cycles] in GHC.Tc.Solver.Canonical.--- This only works under conditions as described in the Note; otherwise, returns--- Nothing.-breakTyEqCycle_maybe :: CtEvidence- -> CheckTyEqResult -- result of checkTypeEq- -> CanEqLHS- -> TcType -- RHS- -> TcS (Maybe ReductionN)- -- new RHS that doesn't have any type families-breakTyEqCycle_maybe (ctLocOrigin . ctEvLoc -> CycleBreakerOrigin _) _ _ _- -- see Detail (7) of Note- = return Nothing--breakTyEqCycle_maybe ev cte_result lhs rhs- | NomEq <- eq_rel-- , cte_result `cterHasOnlyProblem` cteSolubleOccurs- -- only do this if the only problem is a soluble occurs-check- -- See Detail (8) of the Note.-- = do { should_break <- final_check- ; mapM go should_break }- where- flavour = ctEvFlavour ev- eq_rel = ctEvEqRel ev-- final_check = case flavour of- Given -> return $ Just rhs- Wanted -- Wanteds work only with a touchable tyvar on the left- -- See "Wanted" section of the Note.- | TyVarLHS lhs_tv <- lhs ->- do { (result, rhs) <- touchabilityTest Wanted lhs_tv rhs- ; return $ case result of- Untouchable -> Nothing- _ -> Just rhs }- | otherwise -> return Nothing-- -- This could be considerably more efficient. See Detail (5) of Note.- go :: TcType -> TcS ReductionN- go ty | Just ty' <- rewriterView ty = go ty'- go (Rep.TyConApp tc tys)- | isTypeFamilyTyCon tc -- worried about whether this type family is not actually- -- causing trouble? See Detail (5) of Note.- = do { let (fun_args, extra_args) = splitAt (tyConArity tc) tys- fun_app = mkTyConApp tc fun_args- fun_app_kind = typeKind fun_app- ; fun_redn <- emit_work fun_app_kind fun_app- ; arg_redns <- unzipRedns <$> mapM go extra_args- ; return $ mkAppRedns fun_redn arg_redns }- -- Worried that this substitution will change kinds?- -- See Detail (3) of Note-- | otherwise- = do { arg_redns <- unzipRedns <$> mapM go tys- ; return $ mkTyConAppRedn Nominal tc arg_redns }-- go (Rep.AppTy ty1 ty2)- = mkAppRedn <$> go ty1 <*> go ty2- go (Rep.FunTy vis w arg res)- = mkFunRedn Nominal vis <$> go w <*> go arg <*> go res- go (Rep.CastTy ty cast_co)- = mkCastRedn1 Nominal ty cast_co <$> go ty- go ty@(Rep.TyVarTy {}) = skip ty- go ty@(Rep.LitTy {}) = skip ty- go ty@(Rep.ForAllTy {}) = skip ty -- See Detail (1) of Note- go ty@(Rep.CoercionTy {}) = skip ty -- See Detail (2) of Note-- skip ty = return $ mkReflRedn Nominal ty-- emit_work :: TcKind -- of the function application- -> TcType -- original function application- -> TcS ReductionN -- rewritten type (the fresh tyvar)- emit_work fun_app_kind fun_app = case flavour of- Given ->- do { new_tv <- wrapTcS (TcM.newCycleBreakerTyVar fun_app_kind)- ; let new_ty = mkTyVarTy new_tv- given_pred = mkHeteroPrimEqPred fun_app_kind fun_app_kind- fun_app new_ty- given_term = evCoercion $ mkNomReflCo new_ty -- See Detail (4) of Note- ; new_given <- newGivenEvVar new_loc (given_pred, given_term)- ; traceTcS "breakTyEqCycle replacing type family in Given" (ppr new_given)- ; emitWorkNC [new_given]- ; updInertTcS $ \is ->- is { inert_cycle_breakers = insertCycleBreakerBinding new_tv fun_app- (inert_cycle_breakers is) }- ; return $ mkReflRedn Nominal new_ty }- -- Why reflexive? See Detail (4) of the Note-- Wanted ->- do { new_tv <- wrapTcS (TcM.newFlexiTyVar fun_app_kind)- ; let new_ty = mkTyVarTy new_tv- ; co <- emitNewWantedEq new_loc (ctEvRewriters ev) Nominal new_ty fun_app- ; return $ mkReduction (mkSymCo co) new_ty }-- -- See Detail (7) of the Note- new_loc = updateCtLocOrigin (ctEvLoc ev) CycleBreakerOrigin---- does not fit scenario from Note-breakTyEqCycle_maybe _ _ _ _ = return Nothing---- | Fill in CycleBreakerTvs with the variables they stand for.--- See Note [Type equality cycles] in GHC.Tc.Solver.Canonical.-restoreTyVarCycles :: InertSet -> TcM ()-restoreTyVarCycles is- = forAllCycleBreakerBindings_ (inert_cycle_breakers is) TcM.writeMetaTyVar-{-# SPECIALISE forAllCycleBreakerBindings_ ::- CycleBreakerVarStack -> (TcTyVar -> TcType -> TcM ()) -> TcM () #-}---- Unwrap a type synonym only when either:--- The type synonym is forgetful, or--- the type synonym mentions a type family in its expansion--- See Note [Rewriting synonyms] in GHC.Tc.Solver.Rewrite.-rewriterView :: TcType -> Maybe TcType-rewriterView ty@(Rep.TyConApp tc _)- | isForgetfulSynTyCon tc || (isTypeSynonymTyCon tc && not (isFamFreeTyCon tc))- = coreView ty-rewriterView _other = Nothing+ emitFunDepWanteds,++ selectNextWorkItem,+ getWorkList,+ updWorkListTcS,+ pushLevelNoWorkList,++ runTcPluginTcS, recordUsedGREs,+ matchGlobalInst, TcM.ClsInstResult(..),++ QCInst(..),++ -- The pipeline+ StopOrContinue(..), continueWith, stopWith,+ startAgainWith, SolverStage(Stage, runSolverStage), simpleStage,+ stopWithStage,++ -- Tracing etc+ panicTcS, traceTcS, tryEarlyAbortTcS,+ traceFireTcS, bumpStepCountTcS, csTraceTcS,+ wrapErrTcS, wrapWarnTcS,+ resetUnificationFlag, setUnificationFlag,++ -- Evidence creation and transformation+ MaybeNew(..), freshGoals, isFresh, getEvExpr,++ newTcEvBinds, newNoTcEvBinds,+ newWantedEq, emitNewWantedEq,+ newWanted,+ newWantedNC, newWantedEvVarNC,+ newBoundEvVarId,+ unifyTyVar, reportUnifications, touchabilityAndShapeTest,+ setEvBind, setWantedEq,+ setWantedEvTerm, setEvBindIfWanted,+ newEvVar, newGivenEvVar, emitNewGivens,+ checkReductionDepth,+ getSolvedDicts, setSolvedDicts,++ getInstEnvs, getFamInstEnvs, -- Getting the environments+ getTopEnv, getGblEnv, getLclEnv, setSrcSpan,+ getTcEvBindsVar, getTcLevel,+ getTcEvTyCoVars, getTcEvBindsMap, setTcEvBindsMap,+ tcLookupClass, tcLookupId, tcLookupTyCon,+++ -- Inerts+ updInertSet, updInertCans,+ getHasGivenEqs, setInertCans,+ getInertEqs, getInertCans, getInertGivens,+ getInertInsols, getInnermostGivenEqLevel,+ getInertSet, setInertSet,+ getUnsolvedInerts,+ removeInertCts, getPendingGivenScs,+ insertFunEq, addInertForAll,+ emitWorkNC, emitWork,+ lookupInertDict,++ -- The Model+ kickOutAfterUnification, kickOutRewritable,++ -- Inert Safe Haskell safe-overlap failures+ addInertSafehask, insertSafeOverlapFailureTcS, updInertSafehask,+ getSafeOverlapFailures,++ -- Inert solved dictionaries+ updSolvedDicts, lookupSolvedDict,++ -- Irreds+ foldIrreds,++ -- The family application cache+ lookupFamAppInert, lookupFamAppCache, extendFamAppCache,+ pprKicked,++ -- Instantiation+ instDFunType,++ -- Unification+ wrapUnifierTcS, unifyFunDeps, uPairsTcM,++ -- MetaTyVars+ newFlexiTcSTy, instFlexiX,+ cloneMetaTyVar,+ tcInstSkolTyVarsX,++ TcLevel,+ isFilledMetaTyVar_maybe, isFilledMetaTyVar,+ zonkTyCoVarsAndFV, zonkTcType, zonkTcTypes, zonkTcTyVar, zonkCo,+ zonkTyCoVarsAndFVList,+ zonkSimples, zonkWC,+ zonkTyCoVarKind,++ -- References+ newTcRef, readTcRef, writeTcRef, updTcRef,++ -- Misc+ getDefaultInfo, getDynFlags, getGlobalRdrEnvTcS,+ matchFam, matchFamTcM,+ checkWellStagedDFun,+ pprEq,++ -- Enforcing invariants for type equalities+ checkTypeEq, checkTouchableTyVarEq+) where++import GHC.Prelude++import GHC.Driver.Env++import qualified GHC.Tc.Utils.Instantiate as TcM+import GHC.Core.InstEnv+import GHC.Tc.Instance.Family as FamInst+import GHC.Core.FamInstEnv++import qualified GHC.Tc.Utils.Monad as TcM+import qualified GHC.Tc.Utils.TcMType as TcM+import qualified GHC.Tc.Instance.Class as TcM( matchGlobalInst, ClsInstResult(..) )+import qualified GHC.Tc.Utils.Env as TcM+ ( checkWellStaged, tcGetDefaultTys+ , tcLookupClass, tcLookupId, tcLookupTyCon+ , topIdLvl )+import GHC.Tc.Zonk.Monad ( ZonkM )+import qualified GHC.Tc.Zonk.TcType as TcM+import qualified GHC.Tc.Zonk.Type as TcM++import GHC.Driver.DynFlags++import GHC.Tc.Instance.Class( safeOverlap, instanceReturnsDictCon )+import GHC.Tc.Instance.FunDeps( FunDepEqn(..) )+import GHC.Tc.Utils.TcType+import GHC.Tc.Solver.Types+import GHC.Tc.Solver.InertSet+import GHC.Tc.Types.Evidence+import GHC.Tc.Errors.Types+import GHC.Tc.Types+import GHC.Tc.Types.Origin+import GHC.Tc.Types.Constraint+import GHC.Tc.Utils.Unify++import GHC.Builtin.Names ( unsatisfiableClassNameKey )++import GHC.Core.Type+import GHC.Core.TyCo.Rep as Rep+import GHC.Core.Coercion+import GHC.Core.Coercion.Axiom( TypeEqn )+import GHC.Core.Predicate+import GHC.Core.Reduction+import GHC.Core.Class+import GHC.Core.TyCon++import GHC.Types.Name+import GHC.Types.TyThing+import GHC.Types.Name.Reader+import GHC.Types.Var+import GHC.Types.Var.Set+import GHC.Types.Unique.Supply+import GHC.Types.Unique.Set( elementOfUniqSet )++import GHC.Unit.Module ( HasModule, getModule, extractModule )+import qualified GHC.Rename.Env as TcM++import GHC.Utils.Outputable+import GHC.Utils.Panic+import GHC.Utils.Logger+import GHC.Utils.Misc (HasDebugCallStack)++import GHC.Data.Bag as Bag+import GHC.Data.Pair++import GHC.Utils.Monad++import GHC.Exts (oneShot)+import Control.Monad+import Data.IORef+import Data.List ( mapAccumL )+import Data.Foldable+import qualified Data.Semigroup as S+import GHC.Types.SrcLoc+import GHC.Rename.Env++#if defined(DEBUG)+import GHC.Types.Unique.Set (nonDetEltsUniqSet)+import GHC.Data.Graph.Directed+#endif++{- *********************************************************************+* *+ SolverStage and StopOrContinue+* *+********************************************************************* -}++{- Note [The SolverStage monad]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The SolverStage monad allows us to write simple code like that in+GHC.Tc.Solver.solveEquality. At the time of writing it looked like+this (may get out of date but the idea is clear):++solveEquality :: ... -> SolverStage Void+solveEquality ev eq_rel ty1 ty2+ = do { Pair ty1' ty2' <- zonkEqTypes ev eq_rel ty1 ty2+ ; mb_canon <- canonicaliseEquality ev' eq_rel ty1' ty2'+ ; case mb_canon of {+ Left irred_ct -> do { tryQCsIrredEqCt irred_ct+ ; solveIrred irred_ct } ;+ Right eq_ct -> do { tryInertEqs eq_ct+ ; tryFunDeps eq_ct+ ; tryQCsEqCt eq_ct+ ; simpleStage (updInertEqs eq_ct)+ ; stopWithStage (eqCtEvidence eq_ct) ".." }}}++Each sub-stage can elect to+ (a) ContinueWith: continue to the next stasge+ (b) StartAgain: start again at the beginning of the pipeline+ (c) Stop: stop altogether; constraint is solved++These three possiblities are described by the `StopOrContinue` data type.+The `SolverStage` monad does the plumbing.++Notes:++(SM1) Each individual stage pretty quickly drops down into+ TcS (StopOrContinue a)+ because the monadic plumbing of `SolverStage` is relatively ineffienct,+ with that three-way split.++(SM2) We use `SolverStage Void` to express the idea that ContinueWith is+ impossible; we don't need to pattern match on it as a possible outcome:A+ see GHC.Tc.Solver.Solve.solveOne. To that end, ContinueWith is strict.+-}++data StopOrContinue a+ = StartAgain Ct -- Constraint is not solved, but some unifications+ -- happened, so go back to the beginning of the pipeline++ | ContinueWith !a -- The constraint was not solved, although it may have+ -- been rewritten. It is strict so that+ -- ContinueWith Void can't happen; see (SM2) in+ -- Note [The SolverStage monad]++ | Stop CtEvidence -- The (rewritten) constraint was solved+ SDoc -- Tells how it was solved+ -- Any new sub-goals have been put on the work list+ deriving (Functor)++instance Outputable a => Outputable (StopOrContinue a) where+ ppr (Stop ev s) = text "Stop" <> parens (s $$ text "ev:" <+> ppr ev)+ ppr (ContinueWith w) = text "ContinueWith" <+> ppr w+ ppr (StartAgain w) = text "StartAgain" <+> ppr w++newtype SolverStage a = Stage { runSolverStage :: TcS (StopOrContinue a) }+ deriving( Functor )++instance Applicative SolverStage where+ pure x = Stage (return (ContinueWith x))+ (<*>) = ap++instance Monad SolverStage where+ return = pure+ (Stage m) >>= k = Stage $+ do { soc <- m+ ; case soc of+ StartAgain x -> return (StartAgain x)+ Stop ev d -> return (Stop ev d)+ ContinueWith x -> runSolverStage (k x) }++simpleStage :: TcS a -> SolverStage a+-- Always does a ContinueWith; no Stop or StartAgain+simpleStage thing = Stage (do { res <- thing; continueWith res })++startAgainWith :: Ct -> TcS (StopOrContinue a)+startAgainWith ct = return (StartAgain ct)++continueWith :: a -> TcS (StopOrContinue a)+continueWith ct = return (ContinueWith ct)++stopWith :: CtEvidence -> String -> TcS (StopOrContinue a)+stopWith ev s = return (Stop ev (text s))++stopWithStage :: CtEvidence -> String -> SolverStage a+stopWithStage ev s = Stage (stopWith ev s)+++{- *********************************************************************+* *+ Inert instances: inert_insts+* *+********************************************************************* -}++addInertForAll :: QCInst -> TcS ()+-- Add a local Given instance, typically arising from a type signature+addInertForAll new_qci+ = do { ics <- getInertCans+ ; ics1 <- add_qci ics++ -- Update given equalities. C.f updateGivenEqs+ ; tclvl <- getTcLevel+ ; let pred = qci_pred new_qci+ not_equality = isClassPred pred && not (isEqPred pred)+ -- True <=> definitely not an equality+ -- A qci_pred like (f a) might be an equality++ ics2 | not_equality = ics1+ | otherwise = ics1 { inert_given_eq_lvl = tclvl+ , inert_given_eqs = True }++ ; setInertCans ics2 }+ where+ add_qci :: InertCans -> TcS InertCans+ -- See Note [Do not add duplicate quantified instances]+ add_qci ics@(IC { inert_insts = qcis })+ | any same_qci qcis+ = do { traceTcS "skipping duplicate quantified instance" (ppr new_qci)+ ; return ics }++ | otherwise+ = do { traceTcS "adding new inert quantified instance" (ppr new_qci)+ ; return (ics { inert_insts = 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]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+As an optimisation, we avoid adding duplicate quantified instances to the+inert set; we use a simple duplicate check using tcEqType for simplicity,+even though it doesn't account for superficial differences, e.g. it will count+the following two constraints as different (#22223):++ - forall a b. C a b+ - forall b a. C a b++The main logic that allows us to pick local instances, even in the presence of+duplicates, is explained in Note [Use only the best matching quantified constraint]+in GHC.Tc.Solver.Dict.+-}++{- *********************************************************************+* *+ Kicking out+* *+************************************************************************+-}+++-----------------------------------------+kickOutRewritable :: KickOutSpec -> CtFlavourRole -> TcS ()+kickOutRewritable ko_spec new_fr+ = do { ics <- getInertCans+ ; let (kicked_out, ics') = kickOutRewritableLHS ko_spec new_fr ics+ n_kicked = lengthBag kicked_out+ ; setInertCans ics'++ ; unless (isEmptyBag kicked_out) $+ do { emitWork kicked_out++ -- The famapp-cache contains Given evidence from the inert set.+ -- If we're kicking out Givens, we need to remove this evidence+ -- from the cache, too.+ ; let kicked_given_ev_vars = foldr add_one emptyVarSet kicked_out+ add_one :: Ct -> VarSet -> VarSet+ add_one ct vs | CtGiven { ctev_evar = ev_var } <- ctEvidence ct+ = vs `extendVarSet` ev_var+ | otherwise = vs++ ; when (new_fr `eqCanRewriteFR` (Given, NomEq) &&+ -- if this isn't true, no use looking through the constraints+ not (isEmptyVarSet kicked_given_ev_vars)) $+ do { traceTcS "Given(s) have been kicked out; drop from famapp-cache"+ (ppr kicked_given_ev_vars)+ ; dropFromFamAppCache kicked_given_ev_vars }++ ; csTraceTcS $+ hang (text "Kick out")+ 2 (vcat [ text "n-kicked =" <+> int n_kicked+ , text "kicked_out =" <+> ppr kicked_out+ , text "Residual inerts =" <+> ppr ics' ]) } }++kickOutAfterUnification :: [TcTyVar] -> TcS ()+kickOutAfterUnification tvs+ | null tvs+ = return ()+ | otherwise+ = do { let tv_set = mkVarSet tvs++ ; n_kicked <- kickOutRewritable (KOAfterUnify tv_set) (Given, NomEq)+ -- Given because the tv := xi is given; NomEq because+ -- only nominal equalities are solved by unification++ -- Set the unification flag if we have done outer unifications+ -- that might affect an earlier implication constraint+ ; let min_tv_lvl = foldr1 minTcLevel (map tcTyVarLevel tvs)+ ; ambient_lvl <- getTcLevel+ ; when (ambient_lvl `strictlyDeeperThan` min_tv_lvl) $+ setUnificationFlag min_tv_lvl++ ; traceTcS "kickOutAfterUnification" (ppr tvs $$ text "n_kicked =" <+> ppr n_kicked)+ ; return n_kicked }++kickOutAfterFillingCoercionHole :: CoercionHole -> TcS ()+-- See Wrinkle (EIK2a) in Note [Equalities with incompatible kinds] in GHC.Tc.Solver.Equality+-- It's possible that this could just go ahead and unify, but could there be occurs-check+-- problems? Seems simpler just to kick out.+kickOutAfterFillingCoercionHole hole+ = do { ics <- getInertCans+ ; let (kicked_out, ics') = kick_out ics+ n_kicked = lengthBag kicked_out++ ; unless (n_kicked == 0) $+ do { updWorkListTcS (extendWorkListCts (fmap CIrredCan kicked_out))+ ; csTraceTcS $+ hang (text "Kick out, hole =" <+> ppr hole)+ 2 (vcat [ text "n-kicked =" <+> int n_kicked+ , text "kicked_out =" <+> ppr kicked_out+ , text "Residual inerts =" <+> ppr ics' ]) }++ ; setInertCans ics' }+ where+ kick_out :: InertCans -> (Bag IrredCt, InertCans)+ kick_out ics@(IC { inert_irreds = irreds })+ = -- We only care about irreds here, because any constraint blocked+ -- by a coercion hole is an irred. See wrinkle (EIK2a) in+ -- Note [Equalities with incompatible kinds] in GHC.Tc.Solver.Canonical+ (irreds_to_kick, ics { inert_irreds = irreds_to_keep })+ where+ (irreds_to_kick, irreds_to_keep) = partitionBag kick_ct irreds++ kick_ct :: IrredCt -> Bool+ -- True: kick out; False: keep.+ kick_ct ct+ | IrredCt { ir_ev = ev, ir_reason = reason } <- ct+ , CtWanted { ctev_rewriters = RewriterSet rewriters } <- ev+ , NonCanonicalReason ctyeq <- reason+ , ctyeq `cterHasProblem` cteCoercionHole+ , hole `elementOfUniqSet` rewriters+ = True+ | otherwise+ = False++--------------+addInertSafehask :: InertCans -> DictCt -> InertCans+addInertSafehask ics item+ = ics { inert_safehask = addDict item (inert_dicts ics) }++insertSafeOverlapFailureTcS :: InstanceWhat -> DictCt -> TcS ()+-- See Note [Safe Haskell Overlapping Instances Implementation] in GHC.Tc.Solver+insertSafeOverlapFailureTcS what item+ | safeOverlap what = return ()+ | otherwise = updInertCans (\ics -> addInertSafehask ics item)++getSafeOverlapFailures :: TcS (Bag DictCt)+-- See Note [Safe Haskell Overlapping Instances Implementation] in GHC.Tc.Solver+getSafeOverlapFailures+ = do { IC { inert_safehask = safehask } <- getInertCans+ ; return $ foldDicts consBag safehask emptyBag }++--------------+updSolvedDicts :: InstanceWhat -> DictCt -> TcS ()+-- Conditionally add a new item in the solved set of the monad+-- See Note [Solved dictionaries] in GHC.Tc.Solver.InertSet+updSolvedDicts what dict_ct@(DictCt { di_ev = ev })+ | isWanted ev+ , instanceReturnsDictCon what+ = do { traceTcS "updSolvedDicts:" $ ppr dict_ct+ ; updInertSet $ \ ics ->+ ics { inert_solved_dicts = addSolvedDict dict_ct (inert_solved_dicts ics) } }+ | otherwise+ = return ()++getSolvedDicts :: TcS (DictMap DictCt)+getSolvedDicts = do { ics <- getInertSet; return (inert_solved_dicts ics) }++setSolvedDicts :: DictMap DictCt -> TcS ()+setSolvedDicts solved_dicts+ = updInertSet $ \ ics ->+ ics { inert_solved_dicts = solved_dicts }++{- *********************************************************************+* *+ Other inert-set operations+* *+********************************************************************* -}++updInertSet :: (InertSet -> InertSet) -> TcS ()+-- Modify the inert set with the supplied function+updInertSet upd_fn+ = do { is_var <- getInertSetRef+ ; wrapTcS (do { curr_inert <- TcM.readTcRef is_var+ ; TcM.writeTcRef is_var (upd_fn curr_inert) }) }++getInertCans :: TcS InertCans+getInertCans = do { inerts <- getInertSet; return (inert_cans inerts) }++setInertCans :: InertCans -> TcS ()+setInertCans ics = updInertSet $ \ inerts -> inerts { inert_cans = ics }++updRetInertCans :: (InertCans -> (a, InertCans)) -> TcS a+-- Modify the inert set with the supplied function+updRetInertCans upd_fn+ = do { is_var <- getInertSetRef+ ; wrapTcS (do { inerts <- TcM.readTcRef is_var+ ; let (res, cans') = upd_fn (inert_cans inerts)+ ; TcM.writeTcRef is_var (inerts { inert_cans = cans' })+ ; return res }) }++updInertCans :: (InertCans -> InertCans) -> TcS ()+-- Modify the inert set with the supplied function+updInertCans upd_fn+ = updInertSet $ \ inerts -> inerts { inert_cans = upd_fn (inert_cans inerts) }++updInertSafehask :: (DictMap DictCt -> DictMap DictCt) -> TcS ()+-- Modify the inert set with the supplied function+updInertSafehask upd_fn+ = updInertCans $ \ ics -> ics { inert_safehask = upd_fn (inert_safehask ics) }++getInertEqs :: TcS InertEqs+getInertEqs = do { inert <- getInertCans; return (inert_eqs inert) }++getInnermostGivenEqLevel :: TcS TcLevel+getInnermostGivenEqLevel = do { inert <- getInertCans+ ; return (inert_given_eq_lvl inert) }++-- | Retrieves all insoluble constraints from the inert set,+-- specifically including Given constraints.+--+-- This consists of:+--+-- - insoluble equalities, such as @Int ~# Bool@;+-- - constraints that are top-level custom type errors, of the form+-- @TypeError msg@, but not constraints such as @Eq (TypeError msg)@+-- in which the type error is nested;+-- - unsatisfiable constraints, of the form @Unsatisfiable msg@.+--+-- The inclusion of Givens is important for pattern match warnings, as we+-- want to consider a pattern match that introduces insoluble Givens to be+-- redundant (see Note [Pattern match warnings with insoluble Givens] in GHC.Tc.Solver).+getInertInsols :: TcS Cts+getInertInsols+ = do { inert <- getInertCans+ ; let insols = filterBag insolubleIrredCt (inert_irreds inert)+ unsats = findDictsByTyConKey (inert_dicts inert) unsatisfiableClassNameKey+ ; return $ fmap CDictCan unsats `unionBags` fmap CIrredCan insols }++getInertGivens :: TcS [Ct]+-- Returns the Given constraints in the inert set+getInertGivens+ = do { inerts <- getInertCans+ ; let all_cts = foldIrreds ((:) . CIrredCan) (inert_irreds inerts)+ $ foldDicts ((:) . CDictCan) (inert_dicts inerts)+ $ foldFunEqs ((:) . CEqCan) (inert_funeqs inerts)+ $ foldTyEqs ((:) . CEqCan) (inert_eqs inerts)+ $ []+ ; return (filter isGivenCt all_cts) }++getPendingGivenScs :: TcS [Ct]+-- Find all inert Given dictionaries, or quantified constraints, such that+-- 1. cc_pend_sc flag has fuel strictly > 0+-- 2. belongs to the current level+-- For each such dictionary:+-- * Return it (with unmodified cc_pend_sc) in sc_pending+-- * Modify the dict in the inert set to have cc_pend_sc = doNotExpand+-- to record that we have expanded superclasses for this dict+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 })+ = assertPpr (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+ sc_pending = sc_pend_insts ++ map CDictCan sc_pend_dicts++ sc_pend_dicts :: [DictCt]+ sc_pend_dicts = foldDicts get_pending dicts []+ dicts' = foldr exhaustAndAdd dicts sc_pend_dicts++ (sc_pend_insts, insts') = mapAccumL get_pending_inst [] insts++ exhaustAndAdd :: DictCt -> DictMap DictCt -> DictMap DictCt+ exhaustAndAdd ct dicts = addDict (ct {di_pend_sc = doNotExpand}) dicts+ -- Exhaust the fuel for this constraint before adding it as+ -- we don't want to expand these constraints again++ get_pending :: DictCt -> [DictCt] -> [DictCt] -- Get dicts with cc_pend_sc > 0+ get_pending dict dicts+ | isPendingScDictCt dict+ , belongs_to_this_level (dictCtEvidence dict)+ = dict : dicts+ | otherwise+ = dicts++ get_pending_inst :: [Ct] -> QCInst -> ([Ct], QCInst)+ get_pending_inst cts qci@(QCI { qci_ev = ev })+ | Just qci' <- pendingScInst_maybe qci+ , belongs_to_this_level ev+ = (CQuantCan qci : cts, qci')+ -- qci' have their fuel exhausted+ -- we don't want to expand these constraints again+ -- qci is expanded+ | 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 GHC.Tc.Solver.Dict++getUnsolvedInerts :: TcS ( Bag Implication+ , Cts ) -- All simple constraints+-- Return all the unsolved [Wanted] constraints+--+-- Post-condition: the returned simple constraints are all fully zonked+-- (because they come from the inert set)+-- the unsolved implics may not be+getUnsolvedInerts+ = do { IC { inert_eqs = tv_eqs+ , inert_funeqs = fun_eqs+ , inert_irreds = irreds+ , inert_dicts = idicts+ } <- getInertCans++ ; let unsolved_tv_eqs = foldTyEqs (add_if_unsolved CEqCan) tv_eqs emptyCts+ unsolved_fun_eqs = foldFunEqs (add_if_unsolved CEqCan) fun_eqs emptyCts+ unsolved_irreds = foldr (add_if_unsolved CIrredCan) emptyCts irreds+ unsolved_dicts = foldDicts (add_if_unsolved CDictCan) idicts emptyCts++ ; implics <- getWorkListImplics++ ; traceTcS "getUnsolvedInerts" $+ vcat [ text " tv eqs =" <+> ppr unsolved_tv_eqs+ , text "fun eqs =" <+> ppr unsolved_fun_eqs+ , text "dicts =" <+> ppr unsolved_dicts+ , text "irreds =" <+> ppr unsolved_irreds+ , text "implics =" <+> ppr implics ]++ ; return ( implics, unsolved_tv_eqs `unionBags`+ unsolved_fun_eqs `unionBags`+ unsolved_irreds `unionBags`+ unsolved_dicts ) }+ where+ add_if_unsolved :: (a -> Ct) -> a -> Cts -> Cts+ add_if_unsolved mk_ct thing cts+ | isWantedCt ct = ct `consCts` cts+ | otherwise = cts+ where+ ct = mk_ct thing++getHasGivenEqs :: TcLevel -- TcLevel of this implication+ -> TcS ( HasGivenEqs -- are there Given equalities?+ , InertIrreds ) -- Insoluble equalities arising from givens+-- See Note [Tracking Given equalities] in GHC.Tc.Solver.InertSet+getHasGivenEqs tclvl+ = do { inerts@(IC { inert_irreds = irreds+ , inert_given_eqs = given_eqs+ , inert_given_eq_lvl = ge_lvl })+ <- getInertCans+ ; let given_insols = filterBag insoluble_given_equality irreds+ -- Specifically includes ones that originated in some+ -- outer context but were refined to an insoluble by+ -- a local equality; so no level-check needed++ -- See Note [HasGivenEqs] in GHC.Tc.Types.Constraint, and+ -- Note [Tracking Given equalities] in GHC.Tc.Solver.InertSet+ has_ge | ge_lvl == tclvl = MaybeGivenEqs+ | given_eqs = LocalGivenEqs+ | otherwise = NoGivenEqs++ ; traceTcS "getHasGivenEqs" $+ vcat [ text "given_eqs:" <+> ppr given_eqs+ , text "ge_lvl:" <+> ppr ge_lvl+ , text "ambient level:" <+> ppr tclvl+ , text "Inerts:" <+> ppr inerts+ , text "Insols:" <+> ppr given_insols]+ ; return (has_ge, given_insols) }+ where+ insoluble_given_equality :: IrredCt -> Bool+ -- Check for unreachability; specifically do not include UserError/Unsatisfiable+ insoluble_given_equality (IrredCt { ir_ev = ev, ir_reason = reason })+ = isInsolubleReason reason && isGiven ev++removeInertCts :: [Ct] -> InertCans -> InertCans+-- ^ Remove inert constraints from the 'InertCans', for use when a+-- typechecker plugin wishes to discard a given.+removeInertCts cts icans = foldl' removeInertCt icans cts++removeInertCt :: InertCans -> Ct -> InertCans+removeInertCt is ct+ = case ct of+ CDictCan dict_ct -> is { inert_dicts = delDict dict_ct (inert_dicts is) }+ CEqCan eq_ct -> delEq eq_ct is+ CIrredCan ir_ct -> delIrred ir_ct is+ CQuantCan {} -> panic "removeInertCt: CQuantCan"+ CNonCanonical {} -> panic "removeInertCt: CNonCanonical"++-- | Looks up a family application in the inerts.+lookupFamAppInert :: (CtFlavourRole -> Bool) -- can it rewrite the target?+ -> TyCon -> [Type] -> TcS (Maybe (Reduction, CtFlavourRole))+lookupFamAppInert rewrite_pred fam_tc tys+ = do { IS { inert_cans = IC { inert_funeqs = inert_funeqs } } <- getInertSet+ ; return (lookup_inerts inert_funeqs) }+ where+ lookup_inerts inert_funeqs+ | Just ecl <- findFunEq inert_funeqs fam_tc tys+ , Just (EqCt { eq_ev = ctev, eq_rhs = rhs })+ <- find (rewrite_pred . eqCtFlavourRole) ecl+ = Just (mkReduction (ctEvCoercion ctev) rhs, ctEvFlavourRole ctev)+ | otherwise = Nothing++lookupInInerts :: CtLoc -> TcPredType -> TcS (Maybe CtEvidence)+-- Is this exact predicate type cached in the solved or canonicals of the InertSet?+lookupInInerts loc pty+ | ClassPred cls tys <- classifyPredType pty+ = do { inerts <- getInertSet+ ; let mb_solved = lookupSolvedDict inerts loc cls tys+ mb_inert = fmap dictCtEvidence (lookupInertDict (inert_cans inerts) loc cls tys)+ ; return $ do -- Maybe monad+ found_ev <- mb_solved `mplus` mb_inert++ -- We're about to "solve" the wanted we're looking up, so we+ -- must make sure doing so wouldn't run afoul of+ -- Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance.+ -- Forgetting this led to #20666.+ guard $ not (prohibitedSuperClassSolve (ctEvLoc found_ev) loc)++ return found_ev }+ | otherwise -- NB: No caching for equalities, IPs, holes, or errors+ = return Nothing++-- | Look up a dictionary inert.+lookupInertDict :: InertCans -> CtLoc -> Class -> [Type] -> Maybe DictCt+lookupInertDict (IC { inert_dicts = dicts }) loc cls tys+ = findDict dicts loc cls tys++-- | Look up a solved inert.+lookupSolvedDict :: InertSet -> CtLoc -> Class -> [Type] -> Maybe CtEvidence+-- Returns just if exactly this predicate type exists in the solved.+lookupSolvedDict (IS { inert_solved_dicts = solved }) loc cls tys+ = fmap dictCtEvidence (findDict solved loc cls tys)++---------------------------+lookupFamAppCache :: TyCon -> [Type] -> TcS (Maybe Reduction)+lookupFamAppCache fam_tc tys+ = do { IS { inert_famapp_cache = famapp_cache } <- getInertSet+ ; case findFunEq famapp_cache fam_tc tys of+ result@(Just redn) ->+ do { traceTcS "famapp_cache hit" (vcat [ ppr (mkTyConApp fam_tc tys)+ , ppr redn ])+ ; return result }+ Nothing -> return Nothing }++extendFamAppCache :: TyCon -> [Type] -> Reduction -> TcS ()+-- NB: co :: rhs ~ F tys, to match expectations of rewriter+extendFamAppCache tc xi_args stuff@(Reduction _ ty)+ = do { dflags <- getDynFlags+ ; when (gopt Opt_FamAppCache dflags) $+ do { traceTcS "extendFamAppCache" (vcat [ ppr tc <+> ppr xi_args+ , ppr ty ])+ ; updInertSet $ \ is@(IS { inert_famapp_cache = fc }) ->+ is { inert_famapp_cache = insertFunEq fc tc xi_args stuff } } }++-- Remove entries from the cache whose evidence mentions variables in the+-- supplied set+dropFromFamAppCache :: VarSet -> TcS ()+dropFromFamAppCache varset+ = updInertSet (\inerts@(IS { inert_famapp_cache = famapp_cache }) ->+ inerts { inert_famapp_cache = filterTcAppMap check famapp_cache })+ where+ check :: Reduction -> Bool+ check redn+ = not (anyFreeVarsOfCo (`elemVarSet` varset) $ reductionCoercion redn)++{-+************************************************************************+* *+* The TcS solver monad *+* *+************************************************************************++Note [The TcS monad]+~~~~~~~~~~~~~~~~~~~~+The TcS monad is a weak form of the main Tc monad++All you can do is+ * fail+ * allocate new variables+ * fill in evidence variables++Filling in a dictionary evidence variable means to create a binding+for it, so TcS carries a mutable location where the binding can be+added. This is initialised from the innermost implication constraint.+-}++data TcSEnv+ = TcSEnv {+ tcs_ev_binds :: EvBindsVar,++ tcs_unified :: IORef Int,+ -- The number of unification variables we have filled+ -- The important thing is whether it is non-zero++ tcs_unif_lvl :: IORef (Maybe TcLevel),+ -- The Unification Level Flag+ -- Outermost level at which we have unified a meta tyvar+ -- Starts at Nothing, then (Just i), then (Just j) where j<i+ -- See Note [The Unification Level Flag]++ tcs_count :: IORef Int, -- Global step count++ tcs_inerts :: IORef InertSet, -- Current inert set++ -- Whether to throw an exception if we come across an insoluble constraint.+ -- Used to fail-fast when checking for hole-fits. See Note [Speeding up+ -- valid hole-fits].+ tcs_abort_on_insoluble :: Bool,++ -- See Note [WorkList priorities] in GHC.Tc.Solver.InertSet+ tcs_worklist :: IORef WorkList -- Current worklist+ }++---------------+newtype TcS a = TcS { unTcS :: TcSEnv -> TcM a }+ deriving (Functor)++instance MonadFix TcS where+ mfix k = TcS $ \env -> mfix (\x -> unTcS (k x) env)++-- | Smart constructor for 'TcS', as describe in Note [The one-shot state+-- monad trick] in "GHC.Utils.Monad".+mkTcS :: (TcSEnv -> TcM a) -> TcS a+mkTcS f = TcS (oneShot f)++instance Applicative TcS where+ pure x = mkTcS $ \_ -> return x+ (<*>) = ap++instance Monad TcS where+ m >>= k = mkTcS $ \ebs -> do+ unTcS m ebs >>= (\r -> unTcS (k r) ebs)++instance MonadIO TcS where+ liftIO act = TcS $ \_env -> liftIO act++instance MonadFail TcS where+ fail err = mkTcS $ \_ -> fail err++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+-- Do not export wrapTcS, because it promotes an arbitrary TcM to TcS,+-- and TcS is supposed to have limited functionality+wrapTcS action = mkTcS $ \_env -> action -- a TcM action will not use the TcEvBinds++liftZonkTcS :: ZonkM a -> TcS a+liftZonkTcS = wrapTcS . TcM.liftZonkM++wrap2TcS :: (TcM a -> TcM a) -> TcS a -> TcS a+wrap2TcS fn (TcS thing) = mkTcS $ \env -> fn (thing env)++wrapErrTcS :: TcM a -> TcS a+-- The thing wrapped should just fail+-- There's no static check; it's up to the user+-- Having a variant for each error message is too painful+wrapErrTcS = wrapTcS++wrapWarnTcS :: TcM a -> TcS a+-- The thing wrapped should just add a warning, or no-op+-- There's no static check; it's up to the user+wrapWarnTcS = wrapTcS++panicTcS :: SDoc -> TcS a+failTcS :: TcRnMessage -> TcS a+warnTcS, addErrTcS :: TcRnMessage -> TcS ()+failTcS = wrapTcS . TcM.failWith+warnTcS msg = wrapTcS (TcM.addDiagnostic msg)+addErrTcS = wrapTcS . TcM.addErr+panicTcS doc = pprPanic "GHC.Tc.Solver.Monad" doc++tryEarlyAbortTcS :: TcS ()+-- Abort (fail in the monad) if the abort_on_insoluble flag is on+tryEarlyAbortTcS+ = mkTcS (\env -> when (tcs_abort_on_insoluble env) TcM.failM)++-- | Emit a warning within the 'TcS' monad at the location given by the 'CtLoc'.+ctLocWarnTcS :: CtLoc -> TcRnMessage -> TcS ()+ctLocWarnTcS loc msg = wrapTcS $ TcM.setCtLocM loc $ TcM.addDiagnostic msg++traceTcS :: String -> SDoc -> TcS ()+traceTcS herald doc = wrapTcS (TcM.traceTc herald doc)+{-# INLINE traceTcS #-} -- see Note [INLINE conditional tracing utilities]++runTcPluginTcS :: TcPluginM a -> TcS a+runTcPluginTcS = wrapTcS . runTcPluginM++instance HasDynFlags TcS where+ getDynFlags = wrapTcS getDynFlags++getGlobalRdrEnvTcS :: TcS GlobalRdrEnv+getGlobalRdrEnvTcS = wrapTcS TcM.getGlobalRdrEnv++bumpStepCountTcS :: TcS ()+bumpStepCountTcS = mkTcS $ \env ->+ do { let ref = tcs_count env+ ; n <- TcM.readTcRef ref+ ; TcM.writeTcRef ref (n+1) }++csTraceTcS :: SDoc -> TcS ()+csTraceTcS doc+ = wrapTcS $ csTraceTcM (return doc)+{-# INLINE csTraceTcS #-} -- see Note [INLINE conditional tracing utilities]++traceFireTcS :: CtEvidence -> SDoc -> TcS ()+-- Dump a rule-firing trace+traceFireTcS ev doc+ = mkTcS $ \env -> csTraceTcM $+ do { n <- TcM.readTcRef (tcs_count env)+ ; tclvl <- TcM.getTcLevel+ ; return (hang (text "Step" <+> int n+ <> brackets (text "l:" <> ppr tclvl <> comma <>+ text "d:" <> ppr (ctLocDepth (ctEvLoc ev)))+ <+> doc <> colon)+ 4 (ppr ev)) }+{-# INLINE traceFireTcS #-} -- see Note [INLINE conditional tracing utilities]++csTraceTcM :: TcM SDoc -> TcM ()+-- Constraint-solver tracing, -ddump-cs-trace+csTraceTcM mk_doc+ = do { logger <- getLogger+ ; when ( logHasDumpFlag logger Opt_D_dump_cs_trace+ || logHasDumpFlag logger Opt_D_dump_tc_trace)+ ( do { msg <- mk_doc+ ; TcM.dumpTcRn False+ Opt_D_dump_cs_trace+ "" FormatText+ msg }) }+{-# INLINE csTraceTcM #-} -- see Note [INLINE conditional tracing utilities]++runTcS :: TcS a -- What to run+ -> TcM (a, EvBindMap)+runTcS tcs+ = do { ev_binds_var <- TcM.newTcEvBinds+ ; res <- runTcSWithEvBinds ev_binds_var tcs+ ; ev_binds <- TcM.getTcEvBindsMap ev_binds_var+ ; return (res, ev_binds) }++-- | This variant of 'runTcS' will immediately fail upon encountering an+-- insoluble ct. See Note [Speeding up valid hole-fits]. Its one usage+-- site does not need the ev_binds, so we do not return them.+runTcSEarlyAbort :: TcS a -> TcM a+runTcSEarlyAbort tcs+ = do { ev_binds_var <- TcM.newTcEvBinds+ ; runTcSWithEvBinds' True True ev_binds_var tcs }++-- | This can deal only with equality constraints.+runTcSEqualities :: TcS a -> TcM a+runTcSEqualities thing_inside+ = do { ev_binds_var <- TcM.newNoTcEvBinds+ ; runTcSWithEvBinds ev_binds_var thing_inside }++-- | A variant of 'runTcS' that takes and returns an 'InertSet' for+-- later resumption of the 'TcS' session.+runTcSInerts :: InertSet -> TcS a -> TcM (a, InertSet)+runTcSInerts inerts tcs = do+ ev_binds_var <- TcM.newTcEvBinds+ runTcSWithEvBinds' False False ev_binds_var $ do+ setInertSet inerts+ a <- tcs+ new_inerts <- getInertSet+ return (a, new_inerts)++runTcSWithEvBinds :: EvBindsVar+ -> TcS a+ -> TcM a+runTcSWithEvBinds = runTcSWithEvBinds' True False++runTcSWithEvBinds' :: Bool -- ^ Restore type variable cycles afterwards?+ -- Don't if you want to reuse the InertSet.+ -- See also Note [Type equality cycles]+ -- in GHC.Tc.Solver.Equality+ -> Bool+ -> EvBindsVar+ -> TcS a+ -> TcM a+runTcSWithEvBinds' restore_cycles abort_on_insoluble ev_binds_var tcs+ = do { unified_var <- TcM.newTcRef 0+ ; step_count <- TcM.newTcRef 0+ ; inert_var <- TcM.newTcRef emptyInert+ ; wl_var <- TcM.newTcRef emptyWorkList+ ; unif_lvl_var <- TcM.newTcRef Nothing+ ; let env = TcSEnv { tcs_ev_binds = ev_binds_var+ , tcs_unified = unified_var+ , tcs_unif_lvl = unif_lvl_var+ , tcs_count = step_count+ , tcs_inerts = inert_var+ , tcs_abort_on_insoluble = abort_on_insoluble+ , tcs_worklist = wl_var }++ -- Run the computation+ ; res <- unTcS tcs env++ ; count <- TcM.readTcRef step_count+ ; when (count > 0) $+ csTraceTcM $ return (text "Constraint solver steps =" <+> int count)++ ; when restore_cycles $+ do { inert_set <- TcM.readTcRef inert_var+ ; restoreTyVarCycles inert_set }++#if defined(DEBUG)+ ; ev_binds <- TcM.getTcEvBindsMap ev_binds_var+ ; checkForCyclicBinds ev_binds+#endif++ ; return res }++----------------------------+#if defined(DEBUG)+checkForCyclicBinds :: EvBindMap -> TcM ()+checkForCyclicBinds ev_binds_map+ | null cycles+ = return ()+ | null coercion_cycles+ = TcM.traceTc "Cycle in evidence binds" $ ppr cycles+ | otherwise+ = pprPanic "Cycle in coercion bindings" $ ppr coercion_cycles+ where+ ev_binds = evBindMapBinds ev_binds_map++ cycles :: [[EvBind]]+ cycles = [c | CyclicSCC c <- stronglyConnCompFromEdgedVerticesUniq edges]++ coercion_cycles = [c | c <- cycles, any is_co_bind c]+ is_co_bind (EvBind { eb_lhs = b }) = isEqPrimPred (varType b)++ edges :: [ Node EvVar EvBind ]+ edges = [ DigraphNode bind bndr (nonDetEltsUniqSet (evVarsOfTerm rhs))+ | bind@(EvBind { eb_lhs = bndr, eb_rhs = rhs}) <- bagToList ev_binds ]+ -- It's OK to use nonDetEltsUFM here as+ -- stronglyConnCompFromEdgedVertices is still deterministic even+ -- if the edges are in nondeterministic order as explained in+ -- Note [Deterministic SCC] in GHC.Data.Graph.Directed.+#endif++----------------------------+setEvBindsTcS :: EvBindsVar -> TcS a -> TcS a+setEvBindsTcS ref (TcS thing_inside)+ = TcS $ \ env -> thing_inside (env { tcs_ev_binds = ref })++nestImplicTcS :: EvBindsVar+ -> TcLevel -> TcS a+ -> TcS a+nestImplicTcS ref inner_tclvl (TcS thing_inside)+ = TcS $ \ TcSEnv { tcs_unified = unified_var+ , tcs_inerts = old_inert_var+ , tcs_count = count+ , tcs_unif_lvl = unif_lvl+ , tcs_abort_on_insoluble = abort_on_insoluble+ } ->+ do { inerts <- TcM.readTcRef old_inert_var+ ; let nest_inert = inerts { inert_cycle_breakers = pushCycleBreakerVarStack+ (inert_cycle_breakers inerts)+ , inert_cans = (inert_cans inerts)+ { inert_given_eqs = False } }+ -- All other InertSet fields are inherited+ ; new_inert_var <- TcM.newTcRef nest_inert+ ; new_wl_var <- TcM.newTcRef emptyWorkList+ ; let nest_env = TcSEnv { tcs_count = count -- Inherited+ , tcs_unif_lvl = unif_lvl -- Inherited+ , tcs_ev_binds = ref+ , tcs_unified = unified_var+ , tcs_inerts = new_inert_var+ , tcs_abort_on_insoluble = abort_on_insoluble+ , tcs_worklist = new_wl_var }+ ; res <- TcM.setTcLevel inner_tclvl $+ thing_inside nest_env++ ; out_inert_set <- TcM.readTcRef new_inert_var+ ; restoreTyVarCycles out_inert_set++#if defined(DEBUG)+ -- Perform a check that the thing_inside did not cause cycles+ ; ev_binds <- TcM.getTcEvBindsMap ref+ ; checkForCyclicBinds ev_binds+#endif+ ; return res }++nestTcS :: TcS a -> TcS a+-- Use the current untouchables, augmenting the current+-- evidence bindings, and solved dictionaries+-- But have no effect on the InertCans, or on the inert_famapp_cache+-- (we want to inherit the latter from processing the Givens)+nestTcS (TcS thing_inside)+ = TcS $ \ env@(TcSEnv { tcs_inerts = inerts_var }) ->+ do { inerts <- TcM.readTcRef inerts_var+ ; new_inert_var <- TcM.newTcRef inerts+ ; new_wl_var <- TcM.newTcRef emptyWorkList+ ; let nest_env = env { tcs_inerts = new_inert_var+ , tcs_worklist = new_wl_var }++ ; res <- thing_inside nest_env++ ; new_inerts <- TcM.readTcRef new_inert_var++ -- we want to propagate the safe haskell failures+ ; let old_ic = inert_cans inerts+ new_ic = inert_cans new_inerts+ nxt_ic = old_ic { inert_safehask = inert_safehask new_ic }++ ; TcM.writeTcRef inerts_var -- See Note [Propagate the solved dictionaries]+ (inerts { inert_solved_dicts = inert_solved_dicts new_inerts+ , inert_cans = nxt_ic })++ ; return res }++emitImplicationTcS :: TcLevel -> SkolemInfoAnon+ -> [TcTyVar] -- Skolems+ -> [EvVar] -- Givens+ -> Cts -- Wanteds+ -> TcS TcEvBinds+-- Add an implication to the TcS monad work-list+emitImplicationTcS new_tclvl skol_info skol_tvs givens wanteds+ = do { let wc = emptyWC { wc_simple = wanteds }+ ; imp <- wrapTcS $+ do { ev_binds_var <- TcM.newTcEvBinds+ ; imp <- TcM.newImplication+ ; return (imp { ic_tclvl = new_tclvl+ , ic_skols = skol_tvs+ , ic_given = givens+ , ic_wanted = wc+ , ic_binds = ev_binds_var+ , ic_info = skol_info }) }++ ; emitImplication imp+ ; return (TcEvBinds (ic_binds imp)) }++emitTvImplicationTcS :: TcLevel -> SkolemInfoAnon+ -> [TcTyVar] -- Skolems+ -> Cts -- Wanteds+ -> TcS ()+-- Just like emitImplicationTcS but no givens and no bindings+emitTvImplicationTcS new_tclvl skol_info skol_tvs wanteds+ = do { let wc = emptyWC { wc_simple = wanteds }+ ; imp <- wrapTcS $+ do { ev_binds_var <- TcM.newNoTcEvBinds+ ; imp <- TcM.newImplication+ ; return (imp { ic_tclvl = new_tclvl+ , ic_skols = skol_tvs+ , ic_wanted = wc+ , ic_binds = ev_binds_var+ , ic_info = skol_info }) }++ ; emitImplication imp }+++{- Note [Propagate the solved dictionaries]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+It's really quite important that nestTcS does not discard the solved+dictionaries from the thing_inside.+Consider+ Eq [a]+ forall b. empty => Eq [a]+We solve the simple (Eq [a]), under nestTcS, and then turn our attention to+the implications. It's definitely fine to use the solved dictionaries on+the inner implications, and it can make a significant performance difference+if you do so.+-}++-- Getters and setters of GHC.Tc.Utils.Env fields+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++-- Getter of inerts and worklist+getInertSetRef :: TcS (IORef InertSet)+getInertSetRef = TcS (return . tcs_inerts)++getInertSet :: TcS InertSet+getInertSet = getInertSetRef >>= readTcRef++setInertSet :: InertSet -> TcS ()+setInertSet is = do { r <- getInertSetRef; writeTcRef r is }++getTcSWorkListRef :: TcS (IORef WorkList)+getTcSWorkListRef = TcS (return . tcs_worklist)++getWorkListImplics :: TcS (Bag Implication)+getWorkListImplics+ = do { wl_var <- getTcSWorkListRef+ ; wl_curr <- readTcRef wl_var+ ; return (wl_implics wl_curr) }++pushLevelNoWorkList :: SDoc -> TcS a -> TcS (TcLevel, a)+-- Push the level and run thing_inside+-- However, thing_inside should not generate any work items+#if defined(DEBUG)+pushLevelNoWorkList err_doc (TcS thing_inside)+ = TcS (\env -> TcM.pushTcLevelM $+ thing_inside (env { tcs_worklist = wl_panic })+ )+ where+ wl_panic = pprPanic "GHC.Tc.Solver.Monad.buildImplication" err_doc+ -- This panic checks that the thing-inside+ -- does not emit any work-list constraints+#else+pushLevelNoWorkList _ (TcS thing_inside)+ = TcS (\env -> TcM.pushTcLevelM (thing_inside env)) -- Don't check+#endif++updWorkListTcS :: (WorkList -> WorkList) -> TcS ()+updWorkListTcS f+ = do { wl_var <- getTcSWorkListRef+ ; updTcRef wl_var f }++emitWorkNC :: [CtEvidence] -> TcS ()+emitWorkNC evs+ | null evs+ = return ()+ | otherwise+ = emitWork (listToBag (map mkNonCanonical evs))++emitWork :: Cts -> TcS ()+emitWork cts+ | isEmptyBag cts -- Avoid printing, among other work+ = return ()+ | otherwise+ = do { traceTcS "Emitting fresh work" (pprBag cts)+ -- Zonk the rewriter set of Wanteds, because that affects+ -- the prioritisation of the work-list. Suppose a constraint+ -- c1 is rewritten by another, c2. When c2 gets solved,+ -- c1 has no rewriters, and can be prioritised; see+ -- Note [Prioritise Wanteds with empty RewriterSet]+ -- in GHC.Tc.Types.Constraint wrinkle (WRW1)+ ; cts <- wrapTcS $ mapBagM TcM.zonkCtRewriterSet cts+ ; updWorkListTcS (extendWorkListCts cts) }++emitImplication :: Implication -> TcS ()+emitImplication implic+ = updWorkListTcS (extendWorkListImplic implic)++newTcRef :: a -> TcS (TcRef a)+newTcRef x = wrapTcS (TcM.newTcRef x)++readTcRef :: TcRef a -> TcS a+readTcRef ref = wrapTcS (TcM.readTcRef ref)++writeTcRef :: TcRef a -> a -> TcS ()+writeTcRef ref val = wrapTcS (TcM.writeTcRef ref val)++updTcRef :: TcRef a -> (a->a) -> TcS ()+updTcRef ref upd_fn = wrapTcS (TcM.updTcRef ref upd_fn)++getTcEvBindsVar :: TcS EvBindsVar+getTcEvBindsVar = TcS (return . tcs_ev_binds)++getTcLevel :: TcS TcLevel+getTcLevel = wrapTcS TcM.getTcLevel++getTcEvTyCoVars :: EvBindsVar -> TcS TyCoVarSet+getTcEvTyCoVars ev_binds_var+ = wrapTcS $ TcM.getTcEvTyCoVars ev_binds_var++getTcEvBindsMap :: EvBindsVar -> TcS EvBindMap+getTcEvBindsMap ev_binds_var+ = wrapTcS $ TcM.getTcEvBindsMap ev_binds_var++setTcEvBindsMap :: EvBindsVar -> EvBindMap -> TcS ()+setTcEvBindsMap ev_binds_var binds+ = wrapTcS $ TcM.setTcEvBindsMap ev_binds_var binds++unifyTyVar :: TcTyVar -> TcType -> TcS ()+-- Unify a meta-tyvar with a type+-- We keep track of how many unifications have happened in tcs_unified,+--+-- We should never unify the same variable twice!+unifyTyVar tv ty+ = assertPpr (isMetaTyVar tv) (ppr tv) $+ TcS $ \ env ->+ do { TcM.traceTc "unifyTyVar" (ppr tv <+> text ":=" <+> ppr ty)+ ; TcM.liftZonkM $ TcM.writeMetaTyVar tv ty+ ; TcM.updTcRef (tcs_unified env) (+1) }++reportUnifications :: TcS a -> TcS (Int, a)+reportUnifications (TcS thing_inside)+ = TcS $ \ env ->+ do { inner_unified <- TcM.newTcRef 0+ ; res <- thing_inside (env { tcs_unified = inner_unified })+ ; n_unifs <- TcM.readTcRef inner_unified+ ; TcM.updTcRef (tcs_unified env) (+ n_unifs)+ ; return (n_unifs, res) }++getDefaultInfo :: TcS ([Type], (Bool, Bool))+getDefaultInfo = wrapTcS TcM.tcGetDefaultTys++getWorkList :: TcS WorkList+getWorkList = do { wl_var <- getTcSWorkListRef+ ; wrapTcS (TcM.readTcRef wl_var) }++selectNextWorkItem :: TcS (Maybe Ct)+-- Pick which work item to do next+-- See Note [Prioritise equalities]+selectNextWorkItem+ = do { wl_var <- getTcSWorkListRef+ ; wl <- readTcRef wl_var+ ; case selectWorkItem wl of {+ Nothing -> return Nothing ;+ Just (ct, new_wl) ->+ do { -- checkReductionDepth (ctLoc ct) (ctPred ct)+ -- This is done by GHC.Tc.Solver.Dict.chooseInstance+ ; writeTcRef wl_var new_wl+ ; return (Just ct) } } }++-- Just get some environments needed for instance looking up and matching+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++getInstEnvs :: TcS InstEnvs+getInstEnvs = wrapTcS $ TcM.tcGetInstEnvs++getFamInstEnvs :: TcS (FamInstEnv, FamInstEnv)+getFamInstEnvs = wrapTcS $ FamInst.tcGetFamInstEnvs++getTopEnv :: TcS HscEnv+getTopEnv = wrapTcS $ TcM.getTopEnv++getGblEnv :: TcS TcGblEnv+getGblEnv = wrapTcS $ TcM.getGblEnv++getLclEnv :: TcS TcLclEnv+getLclEnv = wrapTcS $ TcM.getLclEnv++setSrcSpan :: RealSrcSpan -> TcS a -> TcS a+setSrcSpan ss = wrap2TcS (TcM.setSrcSpan (RealSrcSpan ss mempty))++tcLookupClass :: Name -> TcS Class+tcLookupClass c = wrapTcS $ TcM.tcLookupClass c++tcLookupId :: Name -> TcS Id+tcLookupId n = wrapTcS $ TcM.tcLookupId n++tcLookupTyCon :: Name -> TcS TyCon+tcLookupTyCon n = wrapTcS $ TcM.tcLookupTyCon n++-- Any use of this function is a bit suspect, because it violates the+-- pure veneer of TcS. But it's just about warnings around unused imports+-- and local constructors (GHC will issue fewer warnings than it otherwise+-- might), so it's not worth losing sleep over.+recordUsedGREs :: Bag GlobalRdrElt -> TcS ()+recordUsedGREs gres+ = do { wrapTcS $ TcM.addUsedGREs NoDeprecationWarnings gre_list+ -- If a newtype constructor was imported, don't warn about not+ -- importing it...+ ; wrapTcS $ traverse_ (TcM.keepAlive . greName) gre_list }+ -- ...and similarly, if a newtype constructor was defined in the same+ -- module, don't warn about it being unused.+ -- See Note [Tracking unused binding and imports] in GHC.Tc.Utils.++ where+ gre_list = bagToList gres++-- Various smaller utilities [TODO, maybe will be absorbed in the instance matcher]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++checkWellStagedDFun :: CtLoc -> InstanceWhat -> PredType -> TcS ()+-- Check that we do not try to use an instance before it is available. E.g.+-- instance Eq T where ...+-- f x = $( ... (\(p::T) -> p == p)... )+-- Here we can't use the equality function from the instance in the splice++checkWellStagedDFun loc what pred+ = do+ mbind_lvl <- checkWellStagedInstanceWhat what+ case mbind_lvl of+ Just bind_lvl | bind_lvl > impLevel ->+ wrapTcS $ TcM.setCtLocM loc $ do+ { use_stage <- TcM.getStage+ ; TcM.checkWellStaged (StageCheckInstance what pred) bind_lvl (thLevel use_stage) }+ _ ->+ return ()++-- | Returns the ThLevel of evidence for the solved constraint (if it has evidence)+-- See Note [Well-staged instance evidence]+checkWellStagedInstanceWhat :: InstanceWhat -> TcS (Maybe ThLevel)+checkWellStagedInstanceWhat what+ | TopLevInstance { iw_dfun_id = dfun_id } <- what+ = return $ Just (TcM.topIdLvl dfun_id)+ | BuiltinTypeableInstance tc <- what+ = do+ cur_mod <- extractModule <$> getGblEnv+ return $ Just (if nameIsLocalOrFrom cur_mod (tyConName tc)+ then outerLevel+ else impLevel)+ | otherwise = return Nothing++{-+Note [Well-staged instance evidence]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++Evidence for instances must obey the same level restrictions as normal bindings.+In particular, it is forbidden to use an instance in a top-level splice in the+module which the instance is defined. This is because the evidence is bound at+the top-level and top-level definitions are forbidden from being using in top-level splices in+the same module.++For example, suppose you have a function.. foo :: Show a => Code Q a -> Code Q ()+then the following program is disallowed,++```+data T a = T a deriving (Show)++main :: IO ()+main =+ let x = $$(foo [|| T () ||])+ in return ()+```++because the `foo` function (used in a top-level splice) requires `Show T` evidence,+which is defined at the top-level and therefore fails with an error that we have violated+the stage restriction.++```+Main.hs:12:14: error:+ • GHC stage restriction:+ instance for ‘Show+ (T ())’ is used in a top-level splice, quasi-quote, or annotation,+ and must be imported, not defined locally+ • In the expression: foo [|| T () ||]+ In the Template Haskell splice $$(foo [|| T () ||])+ In the expression: $$(foo [|| T () ||])+ |+12 | let x = $$(foo [|| T () ||])+ |+```++Solving a `Typeable (T t1 ...tn)` constraint generates code that relies on+`$tcT`, the `TypeRep` for `T`; and we must check that this reference to `$tcT`+is well staged. It's easy to know the stage of `$tcT`: for imported TyCons it+will be `impLevel`, and for local TyCons it will be `toplevel`.++Therefore the `InstanceWhat` type had to be extended with+a special case for `Typeable`, which recorded the TyCon the evidence was for and+could them be used to check that we were not attempting to evidence in a stage incorrect+manner.++-}++pprEq :: TcType -> TcType -> SDoc+pprEq ty1 ty2 = pprParendType ty1 <+> char '~' <+> pprParendType ty2++isFilledMetaTyVar_maybe :: TcTyVar -> TcS (Maybe Type)+isFilledMetaTyVar_maybe tv = wrapTcS (TcM.isFilledMetaTyVar_maybe tv)++isFilledMetaTyVar :: TcTyVar -> TcS Bool+isFilledMetaTyVar tv = wrapTcS (TcM.isFilledMetaTyVar tv)++zonkTyCoVarsAndFV :: TcTyCoVarSet -> TcS TcTyCoVarSet+zonkTyCoVarsAndFV tvs = liftZonkTcS (TcM.zonkTyCoVarsAndFV tvs)++zonkTyCoVarsAndFVList :: [TcTyCoVar] -> TcS [TcTyCoVar]+zonkTyCoVarsAndFVList tvs = liftZonkTcS (TcM.zonkTyCoVarsAndFVList tvs)++zonkCo :: Coercion -> TcS Coercion+zonkCo = wrapTcS . fmap TcM.liftZonkM TcM.zonkCo++zonkTcType :: TcType -> TcS TcType+zonkTcType ty = liftZonkTcS (TcM.zonkTcType ty)++zonkTcTypes :: [TcType] -> TcS [TcType]+zonkTcTypes tys = liftZonkTcS (TcM.zonkTcTypes tys)++zonkTcTyVar :: TcTyVar -> TcS TcType+zonkTcTyVar tv = liftZonkTcS (TcM.zonkTcTyVar tv)++zonkSimples :: Cts -> TcS Cts+zonkSimples cts = liftZonkTcS (TcM.zonkSimples cts)++zonkWC :: WantedConstraints -> TcS WantedConstraints+zonkWC wc = liftZonkTcS (TcM.zonkWC wc)++zonkTyCoVarKind :: TcTyCoVar -> TcS TcTyCoVar+zonkTyCoVarKind tv = liftZonkTcS (TcM.zonkTyCoVarKind tv)++----------------------------+pprKicked :: Int -> SDoc+pprKicked 0 = empty+pprKicked n = parens (int n <+> text "kicked out")++{- *********************************************************************+* *+* The Unification Level Flag *+* *+********************************************************************* -}++{- Note [The Unification Level Flag]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider a deep tree of implication constraints+ forall[1] a. -- Outer-implic+ C alpha[1] -- Simple+ forall[2] c. ....(C alpha[1]).... -- Implic-1+ forall[2] b. ....(alpha[1] ~ Int).... -- Implic-2++The (C alpha) is insoluble until we know alpha. We solve alpha+by unifying alpha:=Int somewhere deep inside Implic-2. But then we+must try to solve the Outer-implic all over again. This time we can+solve (C alpha) both in Outer-implic, and nested inside Implic-1.++When should we iterate solving a level-n implication?+Answer: if any unification of a tyvar at level n takes place+ in the ic_implics of that implication.++* What if a unification takes place at level n-1? Then don't iterate+ level n, because we'll iterate level n-1, and that will in turn iterate+ level n.++* What if a unification takes place at level n, in the ic_simples of+ level n? No need to track this, because the kick-out mechanism deals+ with it. (We can't drop kick-out in favour of iteration, because kick-out+ works for skolem-equalities, not just unifications.)++So the monad-global Unification Level Flag, kept in tcs_unif_lvl keeps+track of+ - Whether any unifications at all have taken place (Nothing => no unifications)+ - If so, what is the outermost level that has seen a unification (Just lvl)++The iteration is done in the simplify_loop/maybe_simplify_again loop in GHC.Tc.Solver.++It helpful not to iterate unless there is a chance of progress. #8474 is+an example:++ * There's a deeply-nested chain of implication constraints.+ ?x:alpha => ?y1:beta1 => ... ?yn:betan => [W] ?x:Int++ * From the innermost one we get a [W] alpha[1] ~ Int,+ so we can unify.++ * It's better not to iterate the inner implications, but go all the+ way out to level 1 before iterating -- because iterating level 1+ will iterate the inner levels anyway.++(In the olden days when we "floated" thse Derived constraints, this was+much, much more important -- we got exponential behaviour, as each iteration+produced the same Derived constraint.)+-}+++resetUnificationFlag :: TcS Bool+-- We are at ambient level i+-- If the unification flag = Just i, reset it to Nothing and return True+-- Otherwise leave it unchanged and return False+resetUnificationFlag+ = TcS $ \env ->+ do { let ref = tcs_unif_lvl env+ ; ambient_lvl <- TcM.getTcLevel+ ; mb_lvl <- TcM.readTcRef ref+ ; TcM.traceTc "resetUnificationFlag" $+ vcat [ text "ambient:" <+> ppr ambient_lvl+ , text "unif_lvl:" <+> ppr mb_lvl ]+ ; case mb_lvl of+ Nothing -> return False+ Just unif_lvl | ambient_lvl `strictlyDeeperThan` unif_lvl+ -> return False+ | otherwise+ -> do { TcM.writeTcRef ref Nothing+ ; return True } }++setUnificationFlag :: TcLevel -> TcS ()+-- (setUnificationFlag i) sets the unification level to (Just i)+-- unless it already is (Just j) where j <= i+setUnificationFlag lvl+ = TcS $ \env ->+ do { let ref = tcs_unif_lvl env+ ; mb_lvl <- TcM.readTcRef ref+ ; case mb_lvl of+ Just unif_lvl | lvl `deeperThanOrSame` unif_lvl+ -> return ()+ _ -> TcM.writeTcRef ref (Just lvl) }+++{- *********************************************************************+* *+* Instantiation etc.+* *+********************************************************************* -}++-- Instantiations+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++instDFunType :: DFunId -> [DFunInstType] -> TcS ([TcType], TcThetaType)+instDFunType dfun_id inst_tys+ = wrapTcS $ TcM.instDFunType dfun_id inst_tys++newFlexiTcSTy :: Kind -> TcS TcType+newFlexiTcSTy knd = wrapTcS (TcM.newFlexiTyVarTy knd)++cloneMetaTyVar :: TcTyVar -> TcS TcTyVar+cloneMetaTyVar tv = wrapTcS (TcM.cloneMetaTyVar tv)++instFlexiX :: Subst -> [TKVar] -> TcS Subst+instFlexiX subst tvs = wrapTcS (instFlexiXTcM subst tvs)++instFlexiXTcM :: Subst -> [TKVar] -> TcM Subst+-- Makes fresh tyvar, extends the substitution, and the in-scope set+-- Takes account of the case [k::Type, a::k, ...],+-- where we must substitute for k in a's kind+instFlexiXTcM subst []+ = return subst+instFlexiXTcM subst (tv:tvs)+ = do { uniq <- TcM.newUnique+ ; details <- TcM.newMetaDetails TauTv+ ; let name = setNameUnique (tyVarName tv) uniq+ kind = substTyUnchecked subst (tyVarKind tv)+ tv' = mkTcTyVar name kind details+ subst' = extendTvSubstWithClone subst tv tv'+ ; instFlexiXTcM subst' tvs }++matchGlobalInst :: DynFlags+ -> Bool -- True <=> caller is the short-cut solver+ -- See Note [Shortcut solving: overlap]+ -> Class -> [Type] -> TcS TcM.ClsInstResult+matchGlobalInst dflags short_cut cls tys+ = wrapTcS (TcM.matchGlobalInst dflags short_cut cls tys)++tcInstSkolTyVarsX :: SkolemInfo -> Subst -> [TyVar] -> TcS (Subst, [TcTyVar])+tcInstSkolTyVarsX skol_info subst tvs = wrapTcS $ TcM.tcInstSkolTyVarsX skol_info subst tvs++-- Creating and setting evidence variables and CtFlavors+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++data MaybeNew = Fresh CtEvidence | Cached EvExpr++isFresh :: MaybeNew -> Bool+isFresh (Fresh {}) = True+isFresh (Cached {}) = False++freshGoals :: [MaybeNew] -> [CtEvidence]+freshGoals mns = [ ctev | Fresh ctev <- mns ]++getEvExpr :: MaybeNew -> EvExpr+getEvExpr (Fresh ctev) = ctEvExpr ctev+getEvExpr (Cached evt) = evt++setEvBind :: EvBind -> TcS ()+setEvBind ev_bind+ = do { evb <- getTcEvBindsVar+ ; wrapTcS $ TcM.addTcEvBind evb ev_bind }++-- | Mark variables as used filling a coercion hole+useVars :: CoVarSet -> TcS ()+useVars co_vars+ = do { ev_binds_var <- getTcEvBindsVar+ ; let ref = ebv_tcvs ev_binds_var+ ; wrapTcS $+ do { tcvs <- TcM.readTcRef ref+ ; let tcvs' = tcvs `unionVarSet` co_vars+ ; TcM.writeTcRef ref tcvs' } }++-- | Equalities only+setWantedEq :: HasDebugCallStack => TcEvDest -> Coercion -> TcS ()+setWantedEq (HoleDest hole) co+ = do { useVars (coVarsOfCo co)+ ; fillCoercionHole hole co }+setWantedEq (EvVarDest ev) _ = pprPanic "setWantedEq: EvVarDest" (ppr ev)++-- | Good for both equalities and non-equalities+setWantedEvTerm :: TcEvDest -> Canonical -> EvTerm -> TcS ()+setWantedEvTerm (HoleDest hole) _canonical tm+ | Just co <- evTermCoercion_maybe tm+ = do { useVars (coVarsOfCo co)+ ; fillCoercionHole hole co }+ | otherwise+ = -- See Note [Yukky eq_sel for a HoleDest]+ do { let co_var = coHoleCoVar hole+ ; setEvBind (mkWantedEvBind co_var True tm)+ ; fillCoercionHole hole (mkCoVarCo co_var) }++setWantedEvTerm (EvVarDest ev_id) canonical tm+ = setEvBind (mkWantedEvBind ev_id canonical tm)++{- Note [Yukky eq_sel for a HoleDest]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+How can it be that a Wanted with HoleDest gets evidence that isn't+just a coercion? i.e. evTermCoercion_maybe returns Nothing.++Consider [G] forall a. blah => a ~ T+ [W] S ~# T++Then doTopReactEqPred carefully looks up the (boxed) constraint (S ~ T)+in the quantified constraints, and wraps the (boxed) evidence it+gets back in an eq_sel to extract the unboxed (S ~# T). We can't put+that term into a coercion, so we add a value binding+ h = eq_sel (...)+and the coercion variable h to fill the coercion hole.+We even re-use the CoHole's Id for this binding!++Yuk!+-}++fillCoercionHole :: CoercionHole -> Coercion -> TcS ()+fillCoercionHole hole co+ = do { wrapTcS $ TcM.fillCoercionHole hole co+ ; kickOutAfterFillingCoercionHole hole }++setEvBindIfWanted :: CtEvidence -> Canonical -> EvTerm -> TcS ()+setEvBindIfWanted ev canonical tm+ = case ev of+ CtWanted { ctev_dest = dest } -> setWantedEvTerm dest canonical 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)++newGivenEvVar :: CtLoc -> (TcPredType, EvTerm) -> TcS CtEvidence+-- Make a new variable of the given PredType,+-- immediately bind it to the given term+-- and return its CtEvidence+-- See Note [Bind new Givens immediately] in GHC.Tc.Types.Constraint+newGivenEvVar loc (pred, rhs)+ = do { new_ev <- newBoundEvVarId pred rhs+ ; return (CtGiven { ctev_pred = pred, ctev_evar = new_ev, ctev_loc = loc }) }++-- | Make a new 'Id' of the given type, bound (in the monad's EvBinds) to the+-- given term+newBoundEvVarId :: TcPredType -> EvTerm -> TcS EvVar+newBoundEvVarId pred rhs+ = do { new_ev <- newEvVar pred+ ; setEvBind (mkGivenEvBind new_ev rhs)+ ; return new_ev }++emitNewGivens :: CtLoc -> [(Role,TcType,TcType,TcCoercion)] -> TcS ()+emitNewGivens loc pts+ = do { evs <- mapM (newGivenEvVar loc) $+ [ (mkPrimEqPredRole role ty1 ty2, evCoercion co)+ | (role, ty1, ty2, co) <- pts+ , not (ty1 `tcEqType` ty2) ] -- Kill reflexive Givens at birth+ ; emitWorkNC evs }++emitNewWantedEq :: CtLoc -> RewriterSet -> Role -> TcType -> TcType -> TcS Coercion+-- | Emit a new Wanted equality into the work-list+emitNewWantedEq loc rewriters role ty1 ty2+ = do { (ev, co) <- newWantedEq loc rewriters role ty1 ty2+ ; updWorkListTcS (extendWorkListEq rewriters (mkNonCanonical ev))+ ; return co }++-- | Create a new Wanted constraint holding a coercion hole+-- for an equality between the two types at the given 'Role'.+newWantedEq :: CtLoc -> RewriterSet -> Role -> TcType -> TcType+ -> TcS (CtEvidence, Coercion)+newWantedEq loc rewriters role ty1 ty2+ = do { hole <- wrapTcS $ TcM.newCoercionHole loc pty+ ; return ( CtWanted { ctev_pred = pty+ , ctev_dest = HoleDest hole+ , ctev_loc = loc+ , ctev_rewriters = rewriters }+ , mkHoleCo hole ) }+ where+ pty = mkPrimEqPredRole role ty1 ty2++-- | Create a new Wanted constraint holding an evidence variable.+--+-- Don't use this for equality constraints: use 'newWantedEq' instead.+newWantedEvVarNC :: CtLoc -> RewriterSet+ -> TcPredType -> TcS CtEvidence+-- Don't look up in the solved/inerts; we know it's not there+newWantedEvVarNC loc rewriters pty+ = do { new_ev <- newEvVar pty+ ; traceTcS "Emitting new wanted" (ppr new_ev <+> dcolon <+> ppr pty $$+ pprCtLoc loc)+ ; return (CtWanted { ctev_pred = pty+ , ctev_dest = EvVarDest new_ev+ , ctev_loc = loc+ , ctev_rewriters = rewriters })}++-- | Like 'newWantedEvVarNC', except it might look up in the inert set+-- to see if an inert already exists, and uses that instead of creating+-- a new Wanted constraint.+--+-- Don't use this for equality constraints: this function is only for+-- constraints with 'EvVarDest'.+newWantedEvVar :: CtLoc -> RewriterSet+ -> TcPredType -> TcS MaybeNew+-- For anything except ClassPred, this is the same as newWantedEvVarNC+newWantedEvVar loc rewriters pty+ = assertPpr (not (isEqPrimPred pty))+ (vcat [ text "newWantedEvVar: HoleDestPred"+ , text "pty:" <+> ppr pty ]) $+ do { mb_ct <- lookupInInerts loc pty+ ; case mb_ct of+ Just ctev+ -> do { traceTcS "newWantedEvVar/cache hit" $ ppr ctev+ ; return $ Cached (ctEvExpr ctev) }+ _ -> do { ctev <- newWantedEvVarNC loc rewriters pty+ ; return (Fresh ctev) } }++-- | Create a new Wanted constraint, potentially looking up+-- non-equality constraints in the cache instead of creating+-- a new one from scratch.+--+-- Deals with both equality and non-equality constraints.+newWanted :: CtLoc -> RewriterSet -> PredType -> TcS MaybeNew+newWanted loc rewriters pty+ | Just (role, ty1, ty2) <- getEqPredTys_maybe pty+ = Fresh . fst <$> newWantedEq loc rewriters role ty1 ty2+ | otherwise+ = newWantedEvVar loc rewriters pty++-- | Create a new Wanted constraint.+--+-- Deals with both equality and non-equality constraints.+--+-- Does not attempt to re-use non-equality constraints that already+-- exist in the inert set.+newWantedNC :: CtLoc -> RewriterSet -> PredType -> TcS CtEvidence+newWantedNC loc rewriters pty+ | Just (role, ty1, ty2) <- getEqPredTys_maybe pty+ = fst <$> newWantedEq loc rewriters role ty1 ty2+ | otherwise+ = newWantedEvVarNC loc rewriters pty++-- | Checks if the depth of the given location is too much. Fails if+-- it's too big, with an appropriate error message.+checkReductionDepth :: CtLoc -> TcType -- ^ type being reduced+ -> TcS ()+checkReductionDepth loc ty+ = do { dflags <- getDynFlags+ ; when (subGoalDepthExceeded (reductionDepth dflags) (ctLocDepth loc)) $+ wrapErrTcS $ solverDepthError loc ty }++matchFam :: TyCon -> [Type] -> TcS (Maybe ReductionN)+matchFam tycon args = wrapTcS $ matchFamTcM tycon args++matchFamTcM :: TyCon -> [Type] -> TcM (Maybe ReductionN)+-- Given (F tys) return (ty, co), where co :: F tys ~N ty+matchFamTcM tycon args+ = do { fam_envs <- FamInst.tcGetFamInstEnvs+ ; let match_fam_result+ = reduceTyFamApp_maybe fam_envs Nominal tycon args+ ; TcM.traceTc "matchFamTcM" $+ vcat [ text "Matching:" <+> ppr (mkTyConApp tycon args)+ , ppr_res match_fam_result ]+ ; return match_fam_result }+ where+ ppr_res Nothing = text "Match failed"+ ppr_res (Just (Reduction co ty))+ = hang (text "Match succeeded:")+ 2 (vcat [ text "Rewrites to:" <+> ppr ty+ , text "Coercion:" <+> ppr co ])++solverDepthError :: CtLoc -> TcType -> TcM a+solverDepthError loc ty+ = TcM.setCtLocM loc $+ do { (ty, env0) <- TcM.liftZonkM $+ do { ty <- TcM.zonkTcType ty+ ; env0 <- TcM.tcInitTidyEnv+ ; return (ty, env0) }+ ; let tidy_env = tidyFreeTyCoVars env0 (tyCoVarsOfTypeList ty)+ tidy_ty = tidyType tidy_env ty+ msg = TcRnSolverDepthError tidy_ty depth+ ; TcM.failWithTcM (tidy_env, msg) }+ where+ depth = ctLocDepth loc++{-+************************************************************************+* *+ Emitting equalities arising from fundeps+* *+************************************************************************+-}++emitFunDepWanteds :: CtEvidence -- The work item+ -> [FunDepEqn (CtLoc, RewriterSet)]+ -> TcS Bool -- True <=> some unification happened++emitFunDepWanteds _ [] = return False -- common case noop+-- See Note [FunDep and implicit parameter reactions]++emitFunDepWanteds ev fd_eqns+ = unifyFunDeps ev Nominal do_fundeps+ where+ do_fundeps :: UnifyEnv -> TcM ()+ do_fundeps env = mapM_ (do_one env) fd_eqns++ do_one :: UnifyEnv -> FunDepEqn (CtLoc, RewriterSet) -> TcM ()+ do_one uenv (FDEqn { fd_qtvs = tvs, fd_eqs = eqs, fd_loc = (loc, rewriters) })+ = do { eqs' <- instantiate_eqs tvs (reverse eqs)+ -- (reverse eqs): See Note [Reverse order of fundep equations]+ ; uPairsTcM env_one eqs' }+ where+ env_one = uenv { u_rewriters = u_rewriters uenv S.<> rewriters+ , u_loc = loc }++ instantiate_eqs :: [TyVar] -> [TypeEqn] -> TcM [TypeEqn]+ instantiate_eqs tvs eqs+ | null tvs+ = return eqs+ | otherwise+ = do { TcM.traceTc "emitFunDepWanteds 2" (ppr tvs $$ ppr eqs)+ ; subst <- instFlexiXTcM emptySubst tvs -- Takes account of kind substitution+ ; return [ Pair (substTyUnchecked subst' ty1) ty2+ -- ty2 does not mention fd_qtvs, so no need to subst it.+ -- See GHC.Tc.Instance.Fundeps Note [Improving against instances]+ -- Wrinkle (1)+ | Pair ty1 ty2 <- eqs+ , let subst' = extendSubstInScopeSet subst (tyCoVarsOfType ty1) ]+ -- The free vars of ty1 aren't just fd_qtvs: ty1 is the result+ -- of matching with the [W] constraint. So we add its free+ -- vars to InScopeSet, to satisfy substTy's invariants, even+ -- though ty1 will never (currently) be a poytype, so this+ -- InScopeSet will never be looked at.+ }++{-+************************************************************************+* *+ Unification+* *+************************************************************************++Note [wrapUnifierTcS]+~~~~~~~~~~~~~~~~~~~+When decomposing equalities we often create new wanted constraints for+(s ~ t). But what if s=t? Then it'd be faster to return Refl right away.++Rather than making an equality test (which traverses the structure of the type,+perhaps fruitlessly), we call uType (via wrapUnifierTcS) to traverse the common+structure, and bales out when it finds a difference by creating a new deferred+Wanted constraint. But where it succeeds in finding common structure, it just+builds a coercion to reflect it.++This is all much faster than creating a new constraint, putting it in the+work list, picking it out, canonicalising it, etc etc.++Note [unifyFunDeps]+~~~~~~~~~~~~~~~~~~~+The Bool returned by `unifyFunDeps` is True if we have unified a variable+that occurs in the constraint we are trying to solve; it is not in the+inert set so `wrapUnifierTcS` won't kick it out. Instead we want to send it+back to the start of the pipeline. Hence the Bool.++It's vital that we don't return (not (null unified)) because the fundeps+may create fresh variables; unifying them (alone) should not make us send+the constraint back to the start, or we'll get an infinite loop. See+Note [Fundeps with instances, and equality orientation] in GHC.Tc.Solver.Dict+and Note [Improvement orientation] in GHC.Tc.Solver.Equality.+-}++uPairsTcM :: UnifyEnv -> [TypeEqn] -> TcM ()+uPairsTcM uenv eqns = mapM_ (\(Pair ty1 ty2) -> uType uenv ty1 ty2) eqns++unifyFunDeps :: CtEvidence -> Role+ -> (UnifyEnv -> TcM ())+ -> TcS Bool+unifyFunDeps ev role do_unifications+ = do { (_, _, unified) <- wrapUnifierTcS ev role do_unifications+ ; return (any (`elemVarSet` fvs) unified) }+ -- See Note [unifyFunDeps]+ where+ fvs = tyCoVarsOfType (ctEvPred ev)++wrapUnifierTcS :: CtEvidence -> Role+ -> (UnifyEnv -> TcM a) -- Some calls to uType+ -> TcS (a, Bag Ct, [TcTyVar])+-- Invokes the do_unifications argument, with a suitable UnifyEnv.+-- Emit deferred equalities and kick-out from the inert set as a+-- result of any unifications.+-- Very good short-cut when the two types are equal, or nearly so+-- See Note [wrapUnifierTcS]+--+-- The [TcTyVar] is the list of unification variables that were+-- unified the process; the (Bag Ct) are the deferred constraints.++wrapUnifierTcS ev role do_unifications+ = do { (cos, unified, rewriters, cts) <- wrapTcS $+ do { defer_ref <- TcM.newTcRef emptyBag+ ; unified_ref <- TcM.newTcRef []+ ; rewriters <- TcM.zonkRewriterSet (ctEvRewriters ev)+ ; let env = UE { u_role = role+ , u_rewriters = rewriters+ , u_loc = ctEvLoc ev+ , u_defer = defer_ref+ , u_unified = Just unified_ref}++ ; cos <- do_unifications env++ ; cts <- TcM.readTcRef defer_ref+ ; unified <- TcM.readTcRef unified_ref+ ; return (cos, unified, rewriters, cts) }++ -- Emit the deferred constraints+ -- See Note [Work-list ordering] in GHC.Tc.Solved.Equality+ ; unless (isEmptyBag cts) $+ updWorkListTcS (extendWorkListEqs rewriters cts)++ -- And kick out any inert constraint that we have unified+ ; _ <- kickOutAfterUnification unified++ ; return (cos, cts, unified) }+++{-+************************************************************************+* *+ Breaking type variable cycles+* *+************************************************************************+-}++checkTouchableTyVarEq+ :: CtEvidence+ -> TcTyVar -- A touchable meta-tyvar+ -> TcType -- The RHS+ -> TcS (PuResult () Reduction)+-- Used for Nominal, Wanted equalities, with a touchable meta-tyvar on LHS+-- If checkTouchableTyVarEq tv ty = PuOK cts redn+-- then we can unify+-- tv := ty |> redn+-- with extra wanteds 'cts'+-- If it returns (PuFail reason) we can't unify, and the reason explains why.+checkTouchableTyVarEq ev lhs_tv rhs+ | simpleUnifyCheck True lhs_tv rhs+ -- True <=> type families are ok on the RHS+ = do { traceTcS "checkTouchableTyVarEq: simple-check wins" (ppr lhs_tv $$ ppr rhs)+ ; return (pure (mkReflRedn Nominal rhs)) }++ | otherwise+ = do { traceTcS "checkTouchableTyVarEq {" (ppr lhs_tv $$ ppr rhs)+ ; check_result <- wrapTcS (check_rhs rhs)+ ; traceTcS "checkTouchableTyVarEq }" (ppr lhs_tv $$ ppr check_result)+ ; case check_result of+ PuFail reason -> return (PuFail reason)+ PuOK cts redn -> do { emitWork cts+ ; return (pure redn) } }++ where+ (lhs_tv_info, lhs_tv_lvl) = case tcTyVarDetails lhs_tv of+ MetaTv { mtv_info = info, mtv_tclvl = lvl } -> (info,lvl)+ _ -> pprPanic "checkTouchableTyVarEq" (ppr lhs_tv)+ -- lhs_tv should be a meta-tyvar++ is_concrete_lhs_tv = isConcreteInfo lhs_tv_info++ check_rhs rhs+ -- Crucial special case for alpha ~ F tys+ -- We don't want to flatten that (F tys)!+ | Just (TyFamLHS tc tys) <- canTyFamEqLHS_maybe rhs+ = if is_concrete_lhs_tv+ then failCheckWith (cteProblem cteConcrete)+ else recurseIntoTyConApp arg_flags tc tys+ | otherwise+ = checkTyEqRhs flags rhs++ flags = TEF { tef_foralls = False -- isRuntimeUnkSkol lhs_tv+ , tef_fam_app = mkTEFA_Break ev NomEq break_wanted+ , tef_unifying = Unifying lhs_tv_info lhs_tv_lvl LC_Promote+ , tef_lhs = TyVarLHS lhs_tv+ , tef_occurs = cteInsolubleOccurs }++ arg_flags = famAppArgFlags flags++ break_wanted fam_app+ -- Occurs check or skolem escape; so flatten+ = do { let fam_app_kind = typeKind fam_app+ ; reason <- checkPromoteFreeVars cteInsolubleOccurs+ lhs_tv lhs_tv_lvl (tyCoVarsOfType fam_app_kind)+ ; if not (cterHasNoProblem reason) -- Failed to promote free vars+ then failCheckWith reason+ else+ do { new_tv_ty <-+ case lhs_tv_info of+ ConcreteTv conc_info ->+ -- Make a concrete tyvar if lhs_tv is concrete+ -- e.g. alpha[2,conc] ~ Maybe (F beta[4])+ -- We want to flatten to+ -- alpha[2,conc] ~ Maybe gamma[2,conc]+ -- gamma[2,conc] ~ F beta[4]+ TcM.newConcreteTyVarTyAtLevel conc_info lhs_tv_lvl fam_app_kind+ _ -> TcM.newMetaTyVarTyAtLevel lhs_tv_lvl fam_app_kind++ ; let pty = mkPrimEqPredRole Nominal fam_app new_tv_ty+ ; hole <- TcM.newVanillaCoercionHole pty+ ; let new_ev = CtWanted { ctev_pred = pty+ , ctev_dest = HoleDest hole+ , ctev_loc = cb_loc+ , ctev_rewriters = ctEvRewriters ev }+ ; return (PuOK (singleCt (mkNonCanonical new_ev))+ (mkReduction (HoleCo hole) new_tv_ty)) } }++ -- See Detail (7) of the Note+ cb_loc = updateCtLocOrigin (ctEvLoc ev) CycleBreakerOrigin++------------------------+checkTypeEq :: CtEvidence -> EqRel -> CanEqLHS -> TcType+ -> TcS (PuResult () Reduction)+-- Used for general CanEqLHSs, ones that do+-- not have a touchable type variable on the LHS (i.e. not unifying)+checkTypeEq ev eq_rel lhs rhs+ | isGiven ev+ = do { traceTcS "checkTypeEq {" (vcat [ text "lhs:" <+> ppr lhs+ , text "rhs:" <+> ppr rhs ])+ ; check_result <- wrapTcS (check_given_rhs rhs)+ ; traceTcS "checkTypeEq }" (ppr check_result)+ ; case check_result of+ PuFail reason -> return (PuFail reason)+ PuOK prs redn -> do { new_givens <- mapBagM mk_new_given prs+ ; emitWork new_givens+ ; updInertSet (addCycleBreakerBindings prs)+ ; return (pure redn) } }++ | otherwise -- Wanted+ = do { check_result <- wrapTcS (checkTyEqRhs wanted_flags rhs)+ ; case check_result of+ PuFail reason -> return (PuFail reason)+ PuOK cts redn -> do { emitWork cts+ ; return (pure redn) } }+ where+ check_given_rhs :: TcType -> TcM (PuResult (TcTyVar,TcType) Reduction)+ check_given_rhs rhs+ -- See Note [Special case for top-level of Given equality]+ | Just (TyFamLHS tc tys) <- canTyFamEqLHS_maybe rhs+ = recurseIntoTyConApp arg_flags tc tys+ | otherwise+ = checkTyEqRhs given_flags rhs++ arg_flags = famAppArgFlags given_flags++ given_flags :: TyEqFlags (TcTyVar,TcType)+ given_flags = TEF { tef_lhs = lhs+ , tef_foralls = False+ , tef_unifying = NotUnifying+ , tef_fam_app = mkTEFA_Break ev eq_rel break_given+ , tef_occurs = occ_prob }+ -- TEFA_Break used for: [G] a ~ Maybe (F a)+ -- or [W] F a ~ Maybe (F a)++ wanted_flags = TEF { tef_lhs = lhs+ , tef_foralls = False+ , tef_unifying = NotUnifying+ , tef_fam_app = TEFA_Recurse+ , tef_occurs = occ_prob }+ -- TEFA_Recurse: see Note [Don't cycle-break Wanteds when not unifying]++ -- occ_prob: see Note [Occurs check and representational equality]+ occ_prob = case eq_rel of+ NomEq -> cteInsolubleOccurs+ ReprEq -> cteSolubleOccurs++ break_given :: TcType -> TcM (PuResult (TcTyVar,TcType) Reduction)+ break_given fam_app+ = do { new_tv <- TcM.newCycleBreakerTyVar (typeKind fam_app)+ ; return (PuOK (unitBag (new_tv, fam_app))+ (mkReflRedn Nominal (mkTyVarTy new_tv))) }+ -- Why reflexive? See Detail (4) of the Note++ ---------------------------+ mk_new_given :: (TcTyVar, TcType) -> TcS Ct+ mk_new_given (new_tv, fam_app)+ = mkNonCanonical <$> newGivenEvVar cb_loc (given_pred, given_term)+ where+ new_ty = mkTyVarTy new_tv+ given_pred = mkPrimEqPred fam_app new_ty+ given_term = evCoercion $ mkNomReflCo new_ty -- See Detail (4) of Note++ -- See Detail (7) of the Note+ cb_loc = updateCtLocOrigin (ctEvLoc ev) CycleBreakerOrigin++mkTEFA_Break :: CtEvidence -> EqRel -> FamAppBreaker a -> TyEqFamApp a+mkTEFA_Break ev eq_rel breaker+ | NomEq <- eq_rel+ , not cycle_breaker_origin+ = TEFA_Break breaker+ | otherwise+ = TEFA_Recurse+ where+ -- cycle_breaker_origin: see Detail (7) of Note [Type equality cycles]+ -- in GHC.Tc.Solver.Equality+ cycle_breaker_origin = case ctLocOrigin (ctEvLoc ev) of+ CycleBreakerOrigin {} -> True+ _ -> False++-------------------------+-- | Fill in CycleBreakerTvs with the variables they stand for.+-- See Note [Type equality cycles] in GHC.Tc.Solver.Equality+restoreTyVarCycles :: InertSet -> TcM ()+restoreTyVarCycles is+ = TcM.liftZonkM+ $ forAllCycleBreakerBindings_ (inert_cycle_breakers is) TcM.writeMetaTyVar+{-# SPECIALISE forAllCycleBreakerBindings_ ::+ CycleBreakerVarStack -> (TcTyVar -> TcType -> ZonkM ()) -> ZonkM () #-}+++{- Note [Occurs check and representational equality]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+(a ~R# b a) is soluble if b later turns out to be Identity+So we treat this as a "soluble occurs check".++Note [Special case for top-level of Given equality]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We take care when examining+ [G] F ty ~ G (...(F ty)...)+where both sides are TyFamLHSs. We don't want to flatten that RHS to+ [G] F ty ~ cbv+ [G] G (...(F ty)...) ~ cbv+Instead we'd like to say "occurs-check" and swap LHS and RHS, which yields a+canonical constraint+ [G] G (...(F ty)...) ~ F ty+That tents to rewrite a big type to smaller one. This happens in T15703,+where we had:+ [G] Pure g ~ From1 (To1 (Pure g))+Making a loop breaker and rewriting left to right just makes much bigger+types than swapping it over.++(We might hope to have swapped it over before getting to checkTypeEq,+but better safe than sorry.)++NB: We never see a TyVarLHS here, such as+ [G] a ~ F tys here+because we'd have swapped it to+ [G] F tys ~ a+in canEqCanLHS2, before getting to checkTypeEq.++Note [Don't cycle-break Wanteds when not unifying]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consdier+ [W] a[2] ~ Maybe (F a[2])++Should we cycle-break this Wanted, thus?++ [W] a[2] ~ Maybe delta[2]+ [W] delta[2] ~ F a[2]++For a start, this is dodgy because we might just unify delta, thus undoing+what we have done, and getting an infinite loop in the solver. Even if we+somehow prevented ourselves from doing so, is there any merit in the split?+Maybe: perhaps we can use that equality on `a` to unlock other constraints?+Consider+ type instance F (Maybe _) = Bool++ [G] g1: a ~ Maybe Bool+ [W] w1: a ~ Maybe (F a)++If we loop-break w1 to get+ [W] w1': a ~ Maybe gamma+ [W] w3: gamma ~ F a+Now rewrite w3 with w1'+ [W] w3': gamma ~ F (Maybe gamma)+Now use the type instance to get+ gamma := Bool+Now we are left with+ [W] w1': a ~ Maybe Bool+which we can solve from the Given.++BUT in this situation we could have rewritten the+/original/ Wanted from the Given, like this:+ [W] w1': Maybe Bool ~ Maybe (F (Maybe Bool))+and that is readily soluble.++In short: loop-breaking Wanteds, when we aren't unifying,+seems of no merit. Hence TEFA_Recurse, rather than TEFA_Break,+in `wanted_flags` in `checkTypeEq`.+-}
GHC/Tc/Solver/Rewrite.hs view
@@ -27,7 +27,7 @@ import GHC.Types.Var import GHC.Types.Var.Set import GHC.Types.Var.Env-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Panic.Plain@@ -41,6 +41,7 @@ import GHC.Builtin.Types (tYPETyCon) import Data.List ( find ) import GHC.Data.List.Infinite (Infinite)+import GHC.Data.Bag( listToBag ) import qualified GHC.Data.List.Infinite as Inf {-@@ -55,7 +56,6 @@ -- | The 'RewriteM' monad is a wrapper around 'TcS' with a 'RewriteEnv' newtype RewriteM a = RewriteM { runRewriteM :: RewriteEnv -> TcS a }- deriving (Functor) -- | Smart constructor for 'RewriteM', as describe in Note [The one-shot state -- monad trick] in "GHC.Utils.Monad".@@ -72,6 +72,9 @@ pure x = mkRewriteM $ \_ -> pure x (<*>) = ap +instance Functor RewriteM where+ fmap f (RewriteM x) = mkRewriteM $ \env -> fmap f (x env)+ instance HasDynFlags RewriteM where getDynFlags = liftTcS getDynFlags @@ -91,9 +94,9 @@ runRewrite :: CtLoc -> CtFlavour -> EqRel -> RewriteM a -> TcS (a, RewriterSet) runRewrite loc flav eq_rel thing_inside = do { rewriters_ref <- newTcRef emptyRewriterSet- ; let fmode = RE { re_loc = loc- , re_flavour = flav- , re_eq_rel = eq_rel+ ; let fmode = RE { re_loc = loc+ , re_flavour = flav+ , re_eq_rel = eq_rel , re_rewriters = rewriters_ref } ; res <- runRewriteM thing_inside fmode ; rewriters <- readTcRef rewriters_ref@@ -155,7 +158,7 @@ -- Precondition: the CtEvidence is a CtWanted of an equality recordRewriter :: CtEvidence -> RewriteM () recordRewriter (CtWanted { ctev_dest = HoleDest hole })- = RewriteM $ \env -> updTcRef (re_rewriters env) (`addRewriterSet` hole)+ = RewriteM $ \env -> updTcRef (re_rewriters env) (`addRewriter` hole) recordRewriter other = pprPanic "recordRewriter" (ppr other) {-@@ -315,7 +318,7 @@ Why have these invariants on rewriting? Because we sometimes use typeKind during canonicalisation, and we want this kind to be zonked (e.g., see-GHC.Tc.Solver.Canonical.canEqCanLHS).+GHC.Tc.Solver.Equality.canEqCanLHS). Rewriting is always homogeneous. That is, the kind of the result of rewriting is always the same as the kind of the input, modulo zonking. More formally:@@ -513,7 +516,7 @@ -- Important: look at the *reduced* type, so that any unzonked variables -- in kinds are gone and the getRuntimeRep succeeds.- -- cf. Note [Decomposing FunTy] in GHC.Tc.Solver.Canonical.+ -- cf. Note [Decomposing FunTy] in GHC.Tc.Solver.Equality. ; let arg_rep = getRuntimeRep (reductionReducedType arg_redn) res_rep = getRuntimeRep (reductionReducedType res_redn) @@ -667,7 +670,7 @@ {- Note [Do not rewrite newtypes] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We flirted with unwrapping newtypes in the rewriter -- see GHC.Tc.Solver.Canonical+We flirted with unwrapping newtypes in the rewriter -- see GHC.Tc.Solver.Equality Note [Unwrap newtypes first]. But that turned out to be a bad idea because of recursive newtypes, as that Note says. So be careful if you re-add it! @@ -945,7 +948,7 @@ TcPluginRewriteTo { tcPluginReduction = redn , tcRewriterNewWanteds = wanteds- } -> do { emitWork wanteds; return $ Just redn }+ } -> do { emitWork (listToBag wanteds); return $ Just redn } TcPluginNoRewrite {} -> runRewriters givens rewriters {-@@ -1012,9 +1015,9 @@ ; case lookupDVarEnv ieqs tv of Just equal_ct_list | Just ct <- find can_rewrite equal_ct_list- , CEqCan { cc_ev = ctev, cc_lhs = TyVarLHS tv- , cc_rhs = rhs_ty, cc_eq_rel = ct_eq_rel } <- ct- -> do { let wrw = isWantedCt ct+ , EqCt { eq_ev = ctev, eq_lhs = TyVarLHS tv+ , eq_rhs = rhs_ty, eq_eq_rel = ct_eq_rel } <- ct+ -> do { let wrw = isWanted ctev ; traceRewriteM "Following inert tyvar" $ vcat [ ppr tv <+> equals <+> ppr rhs_ty , ppr ctev@@ -1035,8 +1038,8 @@ _other -> return RTRNotFollowed } where- can_rewrite :: Ct -> Bool- can_rewrite ct = ctFlavourRole ct `eqCanRewriteFR` fr+ can_rewrite :: EqCt -> Bool+ can_rewrite ct = eqCtFlavourRole ct `eqCanRewriteFR` fr -- This is THE key call of eqCanRewriteFR {-@@ -1056,8 +1059,9 @@ [G] b ~ Maybe c This avoids "saturating" the Givens, which can save a modest amount of work.-It is easy to implement, in GHC.Tc.Solver.Interact.kick_out, by only kicking out an inert-only if (a) the work item can rewrite the inert AND+It is easy to implement, in GHC.Tc.Solver.InertSet.kickOutRewritableLHS, 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@@ -1097,7 +1101,7 @@ where go (Bndr tv (NamedTCB vis)) (bndrs, _) = (Named (Bndr tv vis) : bndrs, True)- go (Bndr tv (AnonTCB af)) (bndrs, n)- = (Anon (tymult (tyVarKind tv)) af : bndrs, n)+ go (Bndr tv AnonTCB) (bndrs, n)+ = (Anon (tymult (tyVarKind tv)) FTF_T_T : bndrs, n) {-# INLINE go #-} {-# INLINE ty_con_binders_ty_binders' #-}
+ GHC/Tc/Solver/Solve.hs view
@@ -0,0 +1,718 @@+{-# LANGUAGE RecursiveDo #-}++module GHC.Tc.Solver.Solve (+ solveSimpleGivens, -- Solves [Ct]+ solveSimpleWanteds -- Solves Cts+ ) where++import GHC.Prelude++import GHC.Tc.Solver.Dict+import GHC.Tc.Solver.Equality( solveEquality )+import GHC.Tc.Solver.Irred( solveIrred )+import GHC.Tc.Solver.Rewrite( rewrite )+import GHC.Tc.Errors.Types+import GHC.Tc.Utils.TcType+import GHC.Tc.Types.Evidence+import GHC.Tc.Types+import GHC.Tc.Types.Origin+import GHC.Tc.Types.Constraint+import GHC.Tc.Solver.InertSet+import GHC.Tc.Solver.Monad++import GHC.Core.Predicate+import GHC.Core.Reduction+import GHC.Core.Coercion+import GHC.Core.Class( classHasSCs )++import GHC.Types.Var.Env+import GHC.Types.Var.Set+import GHC.Types.Basic ( IntWithInf, intGtLimit )++import GHC.Data.Bag++import GHC.Utils.Outputable+import GHC.Utils.Panic+import GHC.Utils.Panic.Plain+import GHC.Utils.Misc++import GHC.Driver.Session++import Data.List( deleteFirstsBy )++import Control.Monad+import Data.Semigroup as S+import Data.Void( Void )++{-+**********************************************************************+* *+* Main Solver *+* *+**********************************************************************++Note [Basic Simplifier Plan]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+1. Pick an element from the WorkList if there exists one with depth+ less than our context-stack depth.++2. Run it down the 'stage' pipeline. Stages are:+ - canonicalization+ - inert reactions+ - spontaneous reactions+ - top-level interactions+ Each stage returns a StopOrContinue and may have sideeffected+ the inerts or worklist.++ The threading of the stages is as follows:+ - If (Stop) is returned by a stage then we start again from Step 1.+ - If (ContinueWith ct) is returned by a stage, we feed 'ct' on to+ the next stage in the pipeline.+4. If the element has survived (i.e. ContinueWith x) the last stage+ then we add it in the inerts and jump back to Step 1.++If in Step 1 no such element exists, we have exceeded our context-stack+depth and will simply fail.+-}++solveSimpleGivens :: [Ct] -> TcS ()+solveSimpleGivens givens+ | null givens -- Shortcut for common case+ = return ()+ | otherwise+ = do { traceTcS "solveSimpleGivens {" (ppr givens)+ ; go givens+ ; traceTcS "End solveSimpleGivens }" empty }+ where+ go givens = do { solveSimples (listToBag givens)+ ; new_givens <- runTcPluginsGiven+ ; when (notNull new_givens) $+ go new_givens }++solveSimpleWanteds :: Cts -> TcS WantedConstraints+-- The result is not necessarily zonked+solveSimpleWanteds simples+ = do { traceTcS "solveSimpleWanteds {" (ppr simples)+ ; dflags <- getDynFlags+ ; (n,wc) <- go 1 (solverIterations dflags) (emptyWC { wc_simple = simples })+ ; traceTcS "solveSimpleWanteds end }" $+ vcat [ text "iterations =" <+> ppr n+ , text "residual =" <+> ppr wc ]+ ; return wc }+ where+ go :: Int -> IntWithInf -> WantedConstraints -> TcS (Int, WantedConstraints)+ -- See Note [The solveSimpleWanteds loop]+ go n limit wc+ | n `intGtLimit` limit+ = failTcS $ TcRnSimplifierTooManyIterations simples limit wc+ | isEmptyBag (wc_simple wc)+ = return (n,wc)++ | otherwise+ = do { -- Solve+ wc1 <- solve_simple_wanteds wc++ -- Run plugins+ ; (rerun_plugin, wc2) <- runTcPluginsWanted wc1++ ; if rerun_plugin+ then do { traceTcS "solveSimple going round again:" (ppr rerun_plugin)+ ; go (n+1) limit wc2 } -- Loop+ else return (n, wc2) } -- Done+++solve_simple_wanteds :: WantedConstraints -> TcS WantedConstraints+-- Try solving these constraints+-- Affects the unification state (of course) but not the inert set+-- The result is not necessarily zonked+solve_simple_wanteds (WC { wc_simple = simples1, wc_impl = implics1, wc_errors = errs })+ = nestTcS $+ do { solveSimples simples1+ ; (implics2, unsolved) <- getUnsolvedInerts+ ; return (WC { wc_simple = unsolved+ , wc_impl = implics1 `unionBags` implics2+ , wc_errors = errs }) }++{- Note [The solveSimpleWanteds loop]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Solving a bunch of simple constraints is done in a loop,+(the 'go' loop of 'solveSimpleWanteds'):+ 1. Try to solve them+ 2. Try the plugin+ 3. If the plugin wants to run again, go back to step 1+-}++{-+************************************************************************+* *+ Solving flat constraints: solveSimples+* *+********************************************************************* -}++-- The main solver loop implements Note [Basic Simplifier Plan]+---------------------------------------------------------------+solveSimples :: Cts -> TcS ()+-- Returns the final InertSet in TcS+-- Has no effect on work-list or residual-implications+-- The constraints are initially examined in left-to-right order++solveSimples cts+ = {-# SCC "solveSimples" #-}+ do { emitWork cts; solve_loop }+ where+ solve_loop+ = {-# SCC "solve_loop" #-}+ do { sel <- selectNextWorkItem+ ; case sel of+ Nothing -> return ()+ Just ct -> do { solveOne ct+ ; solve_loop } }++solveOne :: Ct -> TcS () -- Solve one constraint+solveOne workItem+ = do { wl <- getWorkList+ ; inerts <- getInertSet+ ; tclevel <- getTcLevel+ ; traceTcS "----------------------------- " empty+ ; traceTcS "Start solver pipeline {" $+ vcat [ text "tclevel =" <+> ppr tclevel+ , text "work item =" <+> ppr workItem+ , text "inerts =" <+> ppr inerts+ , text "rest of worklist =" <+> ppr wl ]++ ; bumpStepCountTcS -- One step for each constraint processed+ ; solve workItem }+ where+ solve :: Ct -> TcS ()+ solve ct+ = do { traceTcS "solve {" (text "workitem = " <+> ppr ct)+ ; res <- runSolverStage (solveCt ct)+ ; traceTcS "end solve }" (ppr res)+ ; case res of+ StartAgain ct -> do { traceTcS "Go round again" (ppr ct)+ ; solve ct }++ Stop ev s -> do { traceFireTcS ev s+ ; traceTcS "End solver pipeline }" empty+ ; return () }++ -- ContinueWith can't happen: res :: SolverStage Void+ -- solveCt either solves the constraint, or puts+ -- the unsolved constraint in the inert set.+ }++{- *********************************************************************+* *+* Solving one constraint: solveCt+* *+************************************************************************++Note [Canonicalization]+~~~~~~~~~~~~~~~~~~~~~~~+Canonicalization converts a simple constraint to a canonical form. It is+unary (i.e. treats individual constraints one at a time).++Constraints originating from user-written code come into being as+CNonCanonicals. We know nothing about these constraints. So, first:++ Classify CNonCanoncal constraints, depending on whether they+ are equalities, class predicates, or other.++Then proceed depending on the shape of the constraint. Generally speaking,+each constraint gets rewritten and then decomposed into one of several forms+(see type Ct in GHC.Tc.Types).++When an already-canonicalized constraint gets kicked out of the inert set,+it must be recanonicalized. But we know a bit about its shape from the+last time through, so we can skip the classification step.+-}++solveCt :: Ct -> SolverStage Void+-- The Void result tells us that solveCt cannot return+-- a ContinueWith; it must return Stop or StartAgain.+solveCt (CNonCanonical ev) = solveNC ev+solveCt (CIrredCan (IrredCt { ir_ev = ev })) = solveNC ev++solveCt (CEqCan (EqCt { eq_ev = ev, eq_eq_rel = eq_rel+ , eq_lhs = lhs, eq_rhs = rhs }))+ = solveEquality ev eq_rel (canEqLHSType lhs) rhs++solveCt (CQuantCan (QCI { qci_ev = ev, qci_pend_sc = pend_sc }))+ = do { ev <- rewriteEvidence ev+ -- It is (much) easier to rewrite and re-classify than to+ -- rewrite the pieces and build a Reduction that will rewrite+ -- the whole constraint+ ; case classifyPredType (ctEvPred ev) of+ ForAllPred tvs th p -> Stage $ solveForAll ev tvs th p pend_sc+ _ -> pprPanic "SolveCt" (ppr ev) }++solveCt (CDictCan (DictCt { di_ev = ev, di_pend_sc = pend_sc }))+ = do { ev <- rewriteEvidence ev+ -- It is easier to rewrite and re-classify than to rewrite+ -- the pieces and build a Reduction that will rewrite the+ -- whole constraint+ ; case classifyPredType (ctEvPred ev) of+ ClassPred cls tys+ -> solveDict (DictCt { di_ev = ev, di_cls = cls+ , di_tys = tys, di_pend_sc = pend_sc })+ _ -> pprPanic "solveCt" (ppr ev) }++------------------+solveNC :: CtEvidence -> SolverStage Void+solveNC ev+ = -- Instead of rewriting the evidence before classifying, it's possible we+ -- can make progress without the rewrite. Try this first.+ -- For insolubles (all of which are equalities), do /not/ rewrite the arguments+ -- In #14350 doing so led entire-unnecessary and ridiculously large+ -- type function expansion. Instead, canEqNC just applies+ -- the substitution to the predicate, and may do decomposition;+ -- e.g. a ~ [a], where [G] a ~ [Int], can decompose+ case classifyPredType (ctEvPred ev) of {+ EqPred eq_rel ty1 ty2 -> solveEquality ev eq_rel ty1 ty2 ;+ _ ->++ -- Do rewriting on the constraint, especially zonking+ do { ev <- rewriteEvidence ev+ ; let irred = IrredCt { ir_ev = ev, ir_reason = IrredShapeReason }++ -- And then re-classify+ ; case classifyPredType (ctEvPred ev) of+ ClassPred cls tys -> solveDictNC ev cls tys+ ForAllPred tvs th p -> Stage $ solveForAllNC ev tvs th p+ IrredPred {} -> solveIrred irred+ EqPred eq_rel ty1 ty2 -> solveEquality ev eq_rel ty1 ty2+ -- This case only happens if (say) `c` is unified with `a ~# b`,+ -- but that is rare becuase it requires c :: CONSTRAINT UnliftedRep++ }}+++{- *********************************************************************+* *+* Quantified constraints+* *+********************************************************************* -}++{- 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://gitlab.haskell.org/ghc/ghc/wikis/quantified-constraints+which in turn contains a link to the GHC Proposal where the change+is specified, and a Haskell Symposium paper about it.++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 support 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 quantified 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.++ * Predicate.Pred gets a new constructor ForAllPred, and+ and classifyPredType analyses a PredType to decompose+ the new forall-constraints++ * GHC.Tc.Solver.Monad.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+ GHC.Tc.Solver.Instance.Class.matchInstEnv, use the InstEnv from inert_insts+ so that we include the local Given forall-constraints+ in the lookup. (See GHC.Tc.Solver.Monad.getInstEnvs.)++ * `solveForAll` deals with solving a forall-constraint. See+ 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 GHC.Tc.Solver.Monad.kick_out_rewritable++Note that a quantified constraint is never /inferred/+(by GHC.Tc.Solver.simplifyInfer). A function can only have a+quantified constraint in its type if it is given an explicit+type signature.++-}++solveForAllNC :: CtEvidence -> [TcTyVar] -> TcThetaType -> TcPredType+ -> TcS (StopOrContinue Void)+-- NC: this came from CNonCanonical, so we have not yet expanded superclasses+-- Precondition: already rewritten by inert set+solveForAllNC ev tvs theta pred+ | isGiven ev -- See Note [Eagerly expand given superclasses]+ , Just (cls, tys) <- cls_pred_tys_maybe+ = do { dflags <- getDynFlags+ ; sc_cts <- mkStrictSuperClasses (givensFuel dflags) ev tvs theta cls tys+ -- givensFuel dflags: See Note [Expanding Recursive Superclasses and ExpansionFuel]+ ; emitWork (listToBag sc_cts)+ ; solveForAll ev tvs theta pred doNotExpand }+ -- doNotExpand: as we have already (eagerly) expanded superclasses for this class++ | otherwise+ = do { dflags <- getDynFlags+ ; let fuel | Just (cls, _) <- cls_pred_tys_maybe+ , classHasSCs cls = qcsFuel dflags+ -- See invariants (a) and (b) in QCI.qci_pend_sc+ -- qcsFuel dflags: See Note [Expanding Recursive Superclasses and ExpansionFuel]+ -- See Note [Quantified constraints]+ | otherwise = doNotExpand+ ; solveForAll ev tvs theta pred fuel }+ where+ cls_pred_tys_maybe = getClassPredTys_maybe pred++solveForAll :: CtEvidence -> [TcTyVar] -> TcThetaType -> PredType -> ExpansionFuel+ -> TcS (StopOrContinue Void)+-- Precondition: already rewritten by inert set+solveForAll ev@(CtWanted { ctev_dest = dest, ctev_rewriters = rewriters, ctev_loc = loc })+ tvs theta pred _fuel+ = -- See Note [Solving a Wanted forall-constraint]+ setSrcSpan (getCtLocEnvLoc $ ctLocEnv loc) $+ -- This setSrcSpan is important: the emitImplicationTcS uses that+ -- TcLclEnv for the implication, and that in turn sets the location+ -- for the Givens when solving the constraint (#21006)+ do { let empty_subst = mkEmptySubst $ mkInScopeSet $+ tyCoVarsOfTypes (pred:theta) `delVarSetList` tvs+ is_qc = IsQC (ctLocOrigin loc)++ -- rec {..}: see Note [Keeping SkolemInfo inside a SkolemTv]+ -- in GHC.Tc.Utils.TcType+ -- Very like the code in tcSkolDFunType+ ; rec { skol_info <- mkSkolemInfo skol_info_anon+ ; (subst, skol_tvs) <- tcInstSkolTyVarsX skol_info empty_subst tvs+ ; let inst_pred = substTy subst pred+ inst_theta = substTheta subst theta+ skol_info_anon = InstSkol is_qc (get_size inst_pred) }++ ; given_ev_vars <- mapM newEvVar inst_theta+ ; (lvl, (w_id, wanteds))+ <- pushLevelNoWorkList (ppr skol_info) $+ do { let loc' = setCtLocOrigin loc (ScOrigin is_qc NakedSc)+ -- Set the thing to prove to have a ScOrigin, so we are+ -- careful about its termination checks.+ -- See (QC-INV) in Note [Solving a Wanted forall-constraint]+ ; wanted_ev <- newWantedEvVarNC loc' rewriters inst_pred+ ; return ( ctEvEvId wanted_ev+ , unitBag (mkNonCanonical wanted_ev)) }++ ; ev_binds <- emitImplicationTcS lvl skol_info_anon skol_tvs given_ev_vars wanteds++ ; setWantedEvTerm dest True $+ EvFun { et_tvs = skol_tvs, et_given = given_ev_vars+ , et_binds = ev_binds, et_body = w_id }++ ; stopWith ev "Wanted forall-constraint" }+ where+ -- Getting the size of the head is a bit horrible+ -- because of the special treament for class predicates+ get_size pred = case classifyPredType pred of+ ClassPred cls tys -> pSizeClassPred cls tys+ _ -> pSizeType pred++ -- See Note [Solving a Given forall-constraint]+solveForAll ev@(CtGiven {}) tvs _theta pred fuel+ = do { addInertForAll qci+ ; stopWith ev "Given forall-constraint" }+ where+ qci = QCI { qci_ev = ev, qci_tvs = tvs+ , qci_pred = pred, qci_pend_sc = fuel }++{- 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.++The tricky point is about termination: see #19690. We want to maintain+the invariant (QC-INV):++ (QC-INV) Every quantified constraint returns a non-bottom dictionary++just as every top-level instance declaration guarantees to return a non-bottom+dictionary. But as #19690 shows, it is possible to get a bottom dicionary+by superclass selection if we aren't careful. The situation is very similar+to that described in Note [Recursive superclasses] in GHC.Tc.TyCl.Instance;+and we use the same solution:++* Give the Givens a CtOrigin of (GivenOrigin (InstSkol IsQC head_size))+* Give the Wanted a CtOrigin of (ScOrigin IsQC NakedSc)++Both of these things are done in solveForAll. Now the mechanism described+in Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance takes over.++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.+++************************************************************************+* *+ Evidence transformation+* *+************************************************************************+-}++rewriteEvidence :: CtEvidence -> SolverStage CtEvidence+-- (rewriteEvidence old_ev new_pred co do_next)+-- Main purpose: create new evidence for new_pred;+-- unless new_pred is cached already+-- * Calls do_next with (new_ev :: new_pred), with same wanted/given flag as old_ev+-- * If old_ev was wanted, create a binding for old_ev, in terms of new_ev+-- * If old_ev was given, AND not cached, create a binding for new_ev, in terms of old_ev+-- * Stops if new_ev is already cached+--+-- Old evidence New predicate is Return new evidence+-- flavour of same flavor+-- -------------------------------------------------------------------+-- Wanted Already solved or in inert Stop+-- Not do_next new_evidence+--+-- Given Already in inert Stop+-- Not do_next new_evidence++{- Note [Rewriting with Refl]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If the coercion is just reflexivity then you may re-use the same+evidence variable. But be careful! Although the coercion is Refl, new_pred+may reflect the result of unification alpha := ty, so new_pred might+not _look_ the same as old_pred, and it's vital to proceed from now on+using new_pred.++The rewriter preserves type synonyms, so they should appear in new_pred+as well as in old_pred; that is important for good error messages.++If we are rewriting with Refl, then there are no new rewriters to add to+the rewriter set. We check this with an assertion.+ -}+++rewriteEvidence ev+ = Stage $ do { traceTcS "rewriteEvidence" (ppr ev)+ ; (redn, rewriters) <- rewrite ev (ctEvPred ev)+ ; finish_rewrite ev redn rewriters }++finish_rewrite :: CtEvidence -- ^ old evidence+ -> Reduction -- ^ new predicate + coercion, of type <type of old evidence> ~ new predicate+ -> RewriterSet -- ^ See Note [Wanteds rewrite Wanteds]+ -- in GHC.Tc.Types.Constraint+ -> TcS (StopOrContinue CtEvidence)+finish_rewrite old_ev (Reduction co new_pred) rewriters+ | isReflCo co -- See Note [Rewriting with Refl]+ = assert (isEmptyRewriterSet rewriters) $+ continueWith (setCtEvPredType old_ev new_pred)++finish_rewrite ev@(CtGiven { ctev_evar = old_evar, ctev_loc = loc })+ (Reduction co new_pred) rewriters+ = assert (isEmptyRewriterSet rewriters) $ -- this is a Given, not a wanted+ do { new_ev <- newGivenEvVar loc (new_pred, new_tm)+ ; continueWith new_ev }+ where+ -- mkEvCast optimises ReflCo+ new_tm = mkEvCast (evId old_evar)+ (downgradeRole Representational (ctEvRole ev) co)++finish_rewrite ev@(CtWanted { ctev_dest = dest+ , ctev_loc = loc+ , ctev_rewriters = rewriters })+ (Reduction co new_pred) new_rewriters+ = do { mb_new_ev <- newWanted loc rewriters' new_pred+ ; massert (coercionRole co == ctEvRole ev)+ ; setWantedEvTerm dest True $+ mkEvCast (getEvExpr mb_new_ev)+ (downgradeRole Representational (ctEvRole ev) (mkSymCo co))+ ; case mb_new_ev of+ Fresh new_ev -> continueWith new_ev+ Cached _ -> stopWith ev "Cached wanted" }+ where+ rewriters' = rewriters S.<> new_rewriters++{- *******************************************************************+* *+* Typechecker plugins+* *+******************************************************************* -}++-- | Extract the (inert) givens and invoke the plugins on them.+-- Remove solved givens from the inert set and emit insolubles, but+-- return new work produced so that 'solveSimpleGivens' can feed it back+-- into the main solver.+runTcPluginsGiven :: TcS [Ct]+runTcPluginsGiven+ = do { solvers <- getTcPluginSolvers+ ; if null solvers then return [] else+ do { givens <- getInertGivens+ ; if null givens then return [] else+ do { traceTcS "runTcPluginsGiven {" (ppr givens)+ ; p <- runTcPluginSolvers solvers (givens,[])+ ; let (solved_givens, _) = pluginSolvedCts p+ insols = map (ctIrredCt PluginReason) (pluginBadCts p)+ ; updInertCans (removeInertCts solved_givens .+ updIrreds (addIrreds insols) )+ ; traceTcS "runTcPluginsGiven }" $+ vcat [ text "solved_givens:" <+> ppr solved_givens+ , text "insols:" <+> ppr insols+ , text "new:" <+> ppr (pluginNewCts p) ]+ ; return (pluginNewCts p) } } }++-- | Given a bag of (rewritten, zonked) wanteds, invoke the plugins on+-- them and produce an updated bag of wanteds (possibly with some new+-- work) and a bag of insolubles. The boolean indicates whether+-- 'solveSimpleWanteds' should feed the updated wanteds back into the+-- main solver.+runTcPluginsWanted :: WantedConstraints -> TcS (Bool, WantedConstraints)+runTcPluginsWanted wc@(WC { wc_simple = simples1 })+ | isEmptyBag simples1+ = return (False, wc)+ | otherwise+ = do { solvers <- getTcPluginSolvers+ ; if null solvers then return (False, wc) else++ do { given <- getInertGivens+ ; wanted <- zonkSimples simples1 -- Plugin requires zonked inputs++ ; traceTcS "Running plugins (" (vcat [ text "Given:" <+> ppr given+ , text "Watned:" <+> ppr wanted ])+ ; p <- runTcPluginSolvers solvers (given, bagToList wanted)+ ; let (_, solved_wanted) = pluginSolvedCts p+ (_, unsolved_wanted) = pluginInputCts p+ new_wanted = pluginNewCts p+ insols = pluginBadCts p+ all_new_wanted = listToBag new_wanted `andCts`+ listToBag unsolved_wanted `andCts`+ listToBag insols++-- SLPJ: I'm deeply suspicious of this+-- ; updInertCans (removeInertCts $ solved_givens)++ ; mapM_ setEv solved_wanted++ ; traceTcS "Finished plugins }" (ppr new_wanted)+ ; return ( notNull (pluginNewCts p)+ , wc { wc_simple = all_new_wanted } ) } }+ where+ setEv :: (EvTerm,Ct) -> TcS ()+ setEv (ev,ct) = case ctEvidence ct of+ CtWanted { ctev_dest = dest } -> setWantedEvTerm dest True ev -- TODO: plugins should be able to signal non-canonicity+ _ -> panic "runTcPluginsWanted.setEv: attempt to solve non-wanted!"++-- | A pair of (given, wanted) constraints to pass to plugins+type SplitCts = ([Ct], [Ct])++-- | A solved pair of constraints, with evidence for wanteds+type SolvedCts = ([Ct], [(EvTerm,Ct)])++-- | Represents collections of constraints generated by typechecker+-- plugins+data TcPluginProgress = TcPluginProgress+ { pluginInputCts :: SplitCts+ -- ^ Original inputs to the plugins with solved/bad constraints+ -- removed, but otherwise unmodified+ , pluginSolvedCts :: SolvedCts+ -- ^ Constraints solved by plugins+ , pluginBadCts :: [Ct]+ -- ^ Constraints reported as insoluble by plugins+ , pluginNewCts :: [Ct]+ -- ^ New constraints emitted by plugins+ }++getTcPluginSolvers :: TcS [TcPluginSolver]+getTcPluginSolvers+ = do { tcg_env <- getGblEnv; return (tcg_tc_plugin_solvers tcg_env) }++-- | Starting from a pair of (given, wanted) constraints,+-- invoke each of the typechecker constraint-solving plugins in turn and return+--+-- * the remaining unmodified constraints,+-- * constraints that have been solved,+-- * constraints that are insoluble, and+-- * new work.+--+-- Note that new work generated by one plugin will not be seen by+-- other plugins on this pass (but the main constraint solver will be+-- re-invoked and they will see it later). There is no check that new+-- work differs from the original constraints supplied to the plugin:+-- the plugin itself should perform this check if necessary.+runTcPluginSolvers :: [TcPluginSolver] -> SplitCts -> TcS TcPluginProgress+runTcPluginSolvers solvers all_cts+ = do { ev_binds_var <- getTcEvBindsVar+ ; foldM (do_plugin ev_binds_var) initialProgress solvers }+ where+ do_plugin :: EvBindsVar -> TcPluginProgress -> TcPluginSolver -> TcS TcPluginProgress+ do_plugin ev_binds_var p solver = do+ result <- runTcPluginTcS (uncurry (solver ev_binds_var) (pluginInputCts p))+ return $ progress p result++ progress :: TcPluginProgress -> TcPluginSolveResult -> TcPluginProgress+ progress p+ (TcPluginSolveResult+ { tcPluginInsolubleCts = bad_cts+ , tcPluginSolvedCts = solved_cts+ , tcPluginNewCts = new_cts+ }+ ) =+ p { pluginInputCts = discard (bad_cts ++ map snd solved_cts) (pluginInputCts p)+ , pluginSolvedCts = add solved_cts (pluginSolvedCts p)+ , pluginNewCts = new_cts ++ pluginNewCts p+ , pluginBadCts = bad_cts ++ pluginBadCts p+ }++ initialProgress = TcPluginProgress all_cts ([], []) [] []++ discard :: [Ct] -> SplitCts -> SplitCts+ discard cts (xs, ys) =+ (xs `without` cts, ys `without` cts)++ without :: [Ct] -> [Ct] -> [Ct]+ without = deleteFirstsBy eq_ct++ eq_ct :: Ct -> Ct -> Bool+ eq_ct c c' = ctFlavour c == ctFlavour c'+ && ctPred c `tcEqType` ctPred c'++ add :: [(EvTerm,Ct)] -> SolvedCts -> SolvedCts+ add xs scs = foldl' addOne scs xs++ addOne :: SolvedCts -> (EvTerm,Ct) -> SolvedCts+ addOne (givens, wanteds) (ev,ct) = case ctEvidence ct of+ CtGiven {} -> (ct:givens, wanteds)+ CtWanted {} -> (givens, (ev,ct):wanteds)++
GHC/Tc/Solver/Types.hs view
@@ -4,18 +4,20 @@ -- | Utility types used within the constraint solver module GHC.Tc.Solver.Types ( -- Inert CDictCans- DictMap, emptyDictMap, findDictsByClass, addDict,- addDictsByClass, delDict, foldDicts, filterDicts, findDict,- dictsToBag, partitionDicts,+ DictMap, emptyDictMap,+ findDictsByTyConKey, findDictsByClass,+ foldDicts, findDict,+ dictsToBag, - FunEqMap, emptyFunEqs, foldFunEqs, findFunEq, insertFunEq,+ FunEqMap, emptyFunEqs, findFunEq, insertFunEq, findFunEqsByTyCon, TcAppMap, emptyTcAppMap, isEmptyTcAppMap, insertTcApp, alterTcApp, filterTcAppMap,- tcAppMapToBag, foldTcAppMap,+ tcAppMapToBag, foldTcAppMap, delTcApp, EqualCtList, filterEqualCtList, addToEqualCtList+ ) where import GHC.Prelude@@ -24,6 +26,9 @@ import GHC.Tc.Types.Origin import GHC.Tc.Utils.TcType +import GHC.Types.Unique+import GHC.Types.Unique.DFM+ import GHC.Core.Class import GHC.Core.Map.Type import GHC.Core.Predicate@@ -128,9 +133,6 @@ findDict :: DictMap a -> CtLoc -> Class -> [Type] -> Maybe a findDict m loc cls tys- | hasIPSuperClasses cls tys -- See Note [Tuples hiding implicit parameters]- = Nothing- | Just {} <- isCallStackPred cls tys , isPushCallStackOrigin (ctLocOrigin loc) = Nothing -- See Note [Solving CallStack constraints]@@ -139,34 +141,12 @@ = findTcApp m (classTyCon cls) tys findDictsByClass :: DictMap a -> Class -> Bag a-findDictsByClass m cls- | Just tm <- lookupDTyConEnv m (classTyCon cls) = foldTM consBag tm emptyBag- | otherwise = emptyBag--delDict :: DictMap a -> Class -> [Type] -> DictMap a-delDict m cls tys = delTcApp m (classTyCon cls) tys--addDict :: DictMap a -> Class -> [Type] -> a -> DictMap a-addDict m cls tys item = insertTcApp m (classTyCon cls) tys item--addDictsByClass :: DictMap Ct -> Class -> Bag Ct -> DictMap Ct-addDictsByClass m cls items- = extendDTyConEnv m (classTyCon cls) (foldr add emptyTM items)- where- add ct@(CDictCan { cc_tyargs = tys }) tm = insertTM tys ct tm- add ct _ = pprPanic "addDictsByClass" (ppr ct)--filterDicts :: (Ct -> Bool) -> DictMap Ct -> DictMap Ct-filterDicts f m = filterTcAppMap f m+findDictsByClass m cls = findDictsByTyConKey m (getUnique $ classTyCon cls) -partitionDicts :: (Ct -> Bool) -> DictMap Ct -> (Bag Ct, DictMap Ct)-partitionDicts f m = foldTcAppMap k m (emptyBag, emptyDictMap)- where- k ct (yeses, noes) | f ct = (ct `consBag` yeses, noes)- | otherwise = (yeses, add ct noes)- add ct@(CDictCan { cc_class = cls, cc_tyargs = tys }) m- = addDict m cls tys ct- add ct _ = pprPanic "partitionDicts" (ppr ct)+findDictsByTyConKey :: DictMap a -> Unique -> Bag a+findDictsByTyConKey m tc+ | Just tm <- lookupUDFM_Directly m tc = foldTM consBag tm emptyBag+ | otherwise = emptyBag dictsToBag :: DictMap a -> Bag a dictsToBag = tcAppMapToBag@@ -174,25 +154,8 @@ foldDicts :: (a -> b -> b) -> DictMap a -> b -> b foldDicts = foldTcAppMap -{- Note [Tuples hiding implicit parameters]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider- f,g :: (?x::Int, C a) => a -> a- f v = let ?x = 4 in g v--The call to 'g' gives rise to a Wanted constraint (?x::Int, C a).-We must /not/ solve this from the Given (?x::Int, C a), because of-the intervening binding for (?x::Int). #14218.--We deal with this by arranging that we always fail when looking up a-tuple constraint that hides an implicit parameter. Note that this applies- * both to the inert_dicts (lookupInertDict)- * and to the solved_dicts (looukpSolvedDict)-An alternative would be not to extend these sets with such tuple-constraints, but it seemed more direct to deal with the lookup.--Note [Solving CallStack constraints]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+{- Note [Solving CallStack constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ See also Note [Overview of implicit CallStacks] in GHc.Tc.Types.Evidence. Suppose f :: HasCallStack => blah. Then@@ -204,7 +167,7 @@ IP "callStack" CallStack See Note [Overview of implicit CallStacks] in GHC.Tc.Types.Evidence -* We cannonicalise such constraints, in GHC.Tc.Solver.Canonical.canClassNC, by+* We cannonicalise such constraints, in GHC.Tc.Solver.Dict.canDictNC, by pushing the call-site info on the stack, and changing the CtOrigin to record that has been done. Bind: s1 = pushCallStack <site-info> s2@@ -241,12 +204,10 @@ | Just tm <- lookupDTyConEnv m tc = foldTM (:) tm [] | otherwise = [] -foldFunEqs :: (a -> b -> b) -> FunEqMap a -> b -> b-foldFunEqs = foldTcAppMap- insertFunEq :: FunEqMap a -> TyCon -> [Type] -> a -> FunEqMap a insertFunEq m tc tys val = insertTcApp m tc tys val + {- ********************************************************************* * * EqualCtList@@ -264,15 +225,15 @@ contains a Given representational equality and a Wanted nominal one. -} -type EqualCtList = [Ct]+type EqualCtList = [EqCt] -- See Note [EqualCtList invariants] -addToEqualCtList :: Ct -> EqualCtList -> EqualCtList+addToEqualCtList :: EqCt -> EqualCtList -> EqualCtList -- See Note [EqualCtList invariants] addToEqualCtList ct old_eqs | debugIsOn = case ct of- CEqCan { cc_lhs = TyVarLHS tv } ->+ EqCt { eq_lhs = TyVarLHS tv } -> assert (all (shares_lhs tv) old_eqs) $ assertPpr (null bad_prs) (vcat [ text "bad_prs" <+> ppr bad_prs@@ -284,10 +245,11 @@ | otherwise = ct : old_eqs where- shares_lhs tv (CEqCan { cc_lhs = TyVarLHS old_tv }) = tv == old_tv+ shares_lhs tv (EqCt { eq_lhs = TyVarLHS old_tv }) = tv == old_tv shares_lhs _ _ = False bad_prs = filter is_bad_pair (distinctPairs (ct : old_eqs))- is_bad_pair (ct1,ct2) = ctFlavourRole ct1 `eqCanRewriteFR` ctFlavourRole ct2+ is_bad_pair :: (EqCt, EqCt) -> Bool+ is_bad_pair (ct1,ct2) = eqCtFlavourRole ct1 `eqCanRewriteFR` eqCtFlavourRole ct2 distinctPairs :: [a] -> [(a,a)] -- distinctPairs [x1,...xn] is the list of all pairs [ ...(xi, xj)...]@@ -298,7 +260,7 @@ distinctPairs (x:xs) = concatMap (\y -> [(x,y),(y,x)]) xs ++ distinctPairs xs -- returns Nothing when the new list is empty, to keep the environments smaller-filterEqualCtList :: (Ct -> Bool) -> EqualCtList -> Maybe EqualCtList+filterEqualCtList :: (EqCt -> Bool) -> EqualCtList -> Maybe EqualCtList filterEqualCtList pred cts | null new_list = Nothing
GHC/Tc/TyCl.hs view
@@ -23,19 +23,18 @@ tcFamTyPats, tcTyFamInstEqn, tcAddTyFamInstCtxt, tcMkDataFamInstCtxt, tcAddDataFamInstCtxt, unravelFamInstPats, addConsistencyConstraints,- wrongKindOfFamily, checkFamTelescope+ checkFamTelescope ) where import GHC.Prelude import GHC.Driver.Env-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Config.HsToCore import GHC.Hs -import GHC.Tc.Errors.Types ( TcRnMessage(..), FixedRuntimeRepProvenance(..)- , mkTcRnUnknownMessage, IllegalNewtypeReason (..) )+import GHC.Tc.Errors.Types import GHC.Tc.TyCl.Build import GHC.Tc.Solver( pushLevelAndSolveEqualities, pushLevelAndSolveEqualitiesX , reportUnsolvedEqualities )@@ -44,7 +43,8 @@ import GHC.Tc.Utils.Unify( unifyType, emitResidualTvConstraint ) import GHC.Tc.Types.Constraint( emptyWC ) import GHC.Tc.Validity-import GHC.Tc.Utils.Zonk+import GHC.Tc.Zonk.Type+import GHC.Tc.Zonk.TcType import GHC.Tc.TyCl.Utils import GHC.Tc.TyCl.Class import {-# SOURCE #-} GHC.Tc.TyCl.Instance( tcInstDecls1 )@@ -55,13 +55,14 @@ import GHC.Tc.Utils.TcType import GHC.Tc.Instance.Family import GHC.Tc.Types.Origin+import GHC.Tc.Types.LclEnv import GHC.Builtin.Types (oneDataConTy, unitTy, makeRecoveryTyCon ) import GHC.Rename.Env( lookupConstructorFields ) import GHC.Core.Multiplicity-import GHC.Core.FamInstEnv+import GHC.Core.FamInstEnv ( mkBranchedCoAxiom, mkCoAxBranch ) import GHC.Core.Coercion import GHC.Core.Type import GHC.Core.TyCo.Rep -- for checkValidRoles@@ -243,7 +244,13 @@ = 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, kindless) <- kcTyClGroup kisig_env tyclds+ (tc_tycons, kindless) <- checkNoErrs $+ kcTyClGroup kisig_env tyclds+ -- checkNoErrs: If the TyCons are ill-kinded, stop now. Else we+ -- can get follow-on errors. Example: #23252, where the TyCon+ -- had an ill-scoped kind forall (d::k) k (a::k). blah+ -- and that ill-scoped kind made role inference fall over.+ ; traceTc "tcTyAndCl generalized kinds" (vcat (map ppr_tc_tycon tc_tycons)) -- Step 2: type-check all groups together, returning@@ -347,6 +354,268 @@ you can always specify a CUSK directly to make this work out. See tc269 for an example. +Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A TcTyCon is one of the variants of TyCon. First, here are its invariants:++* TcTyCon: a TyCon built with the TcTyCon constructor+ A TcTyCon contains TcTyVars in its binders and kind++* TcTyConBinder: a TyConBinder with a TcTyVar inside (not a TyVar)++* MonoTcTyCon: a form of TcTyCon+ - Flag tcTyConIsPoly = False++ - tyConBinders are TcTyConBinders: they contain TcTyVars, which are+ unification variables (TyVarTv), and whose kinds may contain+ unification variables.++ - tyConKind: the Monomorphic Recursion Principle:+ a MonoTcTyCon has a /monomorphic kind/.+ See Note [No polymorphic recursion in type decls].+ But the tyConKind may contain free unification variables.++ - tyConScopedTyVars is important; maps a Name to a TyVarTv unification variable+ The order matters: Specified then Required variables.+ E.g. in+ data T a (b :: k) = ...+ the order will be [k, a, b].++ We do not allow @k-binders in inference mode, so we do not need to worry about+ data T a @k (b :: k) = ...+ where we would have to put `k` (Specified) after `a` (Required)++ NB: There are no Inferred binders in tyConScopedTyVars; 'a' may+ also be poly-kinded, but that kind variable will be added by+ generaliseTcTyCon, in the passage to a PolyTcTyCon.++ - tyConBinders are irrelevant; we just use tcTyConScopedTyVars+ Well not /quite/ irrelevant:+ * its length gives the number of explicit binders, and so allows us to+ distinguish between the implicit and explicit elements of+ tyConScopedTyVars.+ * at construction time (mkTcTyCon) for a MonoTcTyCon (the call to mkTcTyCon+ in GHC.Tc.Gen.HsType.kcInferDeclHeader) the tyConBinders are used to+ construct the tyConKind; all must have AnonTCB visiblity so we we get+ a monokind.++* PolyTcTyCon: a form of TcTyCon+ - Flag tcTyConIsPoly = True; this is used only to short-cut zonking++ - tyConBinders are still TcTyConBinders, but they are /skolem/ TcTyVars,+ with fixed kinds, and accurate skolem info: no unification variables here++ tyConBinders includes the Inferred binders if any++ tyConBinders uses the Names from the original, renamed program.++ - tcTyConScopedTyVars is irrelevant: just use (binderVars tyConBinders)+ All the types have been swizzled back to use the original Names+ See Note [tyConBinders and lexical scoping] in GHC.Core.TyCon++The main purpose of these TcTyCons is during kind-checking of+type/class declarations (in GHC.Tc.TyCl). During kind checking we+come upon knowledge of the eventual tycon in bits and pieces, and we+use a TcTyCon to record what we know before we are ready to build the+final TyCon. Here is the plan:++* Step 1 (inferInitialKinds, called from kcTyClGroup+ inference only, skipped for checking):+ Make a MonoTcTyCon whose binders are TcTyVars,+ that may contain free unification variables.+ See Note [No polymorphic recursion in type decls]++* Step 2 (kcTyClDecl, called from kcTyClGroup)+ Kind-check the declarations of the group; this step just does+ unifications that affect the unification variables created in+ Step 1++* Step 3 (generaliseTcTyCon, called from kcTyClGroup)+ Generalise that MonoTcTyCon to make a PolyTcTyCon+ Its binders are skolem TcTyVars, with accurate SkolemInfo++* Step 4 (tcTyClDecl, called from tcTyClDecls)+ Typecheck the type and class decls to produce a final TyCon+ Its binders are final TyVars, not TcTyVars++Note that a MonoTcTyCon can contain unification variables, but a+PolyTcTyCon does not: only skolem TcTyVars. See the invariants above.++More details about /kind inference/:++S1) In kcTyClGroup, we use inferInitialKinds to look over the+ declaration of any TyCon that lacks a kind signature or+ CUSK, to determine its "shape"; for example, the number of+ parameters, and any kind signatures.++ We record that shape record that shape in a MonoTcTyCon; it is+ "mono" because it has not been been generalised, and its binders+ and result kind may have free unification variables.++S2) Still in kcTyClGroup, we use kcLTyClDecl to kind-check the+ body (class methods, data constructors, etc.) of each of+ these MonoTcTyCons, which has the effect of filling in the+ metavariables in the tycon's initial kind.++S3) Still in kcTyClGroup, we use generaliseTyClDecl to generalize+ each MonoTcTyCon to get a PolyTcTyCon, with skolem TcTyVars in it,+ and a final, fixed kind.++S4) Finally, back in tcTyClDecls, we extend the environment with+ the PolyTcTyCons, and typecheck each declaration (regardless+ of kind signatures etc) to get final TyCon.++More details about /kind checking/++S5) In kcTyClGroup, we use checkInitialKinds to get the+ utterly-final Kind of all TyCons in the group that+ (a) have a standalone kind signature or+ (b) have a CUSK.+ This produces a PolyTcTyCon, that is, a TcTyCon in which the binders+ and result kind are full of TyVars (not TcTyVars). No unification+ variables here; everything is in its final form.++Wrinkles:++(W1) 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 PolyTcTyCon for this;+ see makeRecoveryTyCon.++(W2) tyConScopedTyVars. A challenging piece in all of this is that we+ end up taking three separate passes over every declaration:+ - one in inferInitialKind (this pass look only at the head, not the body)+ - one in kcTyClDecls (to kind-check the body)+ - a final one in tcTyClDecls (to desugar)++ In the latter two passes, we need to connect the user-written type+ variables in an LHsQTyVars with the variables in the tycon's+ inferred kind. Because the tycon might not have a CUSK, this+ matching up is, in general, quite hard to do. (Look through the+ git history between Dec 2015 and Apr 2016 for+ GHC.Tc.Gen.HsType.splitTelescopeTvs!)++ Instead of trying, we just store the list of type variables to+ bring into scope, in the tyConScopedTyVars field of a MonoTcTyCon.+ These tyvars are brought into scope by the calls to+ tcExtendNameTyVarEnv (tcTyConScopedTyVars tycon)+ in kcTyClDecl.++ In a TcTyCon, why is tyConScopedTyVars :: [(Name,TcTyVar)] rather+ than just [TcTyVar]? Consider these mutually-recursive decls+ data T (a :: k1) b = MkT (S a b)+ data S (c :: k2) d = MkS (T c d)+ We start with k1 bound to kappa1, and k2 to kappa2; so initially+ in the (Name,TcTyVar) pairs the Name is that of the TcTyVar. But+ then kappa1 and kappa2 get unified; so after the zonking in+ 'generalise' in 'kcTyClGroup' the Name and TcTyVar may differ.++See also Note [Type checking recursive type and class declarations].++Note [No polymorphic recursion in type decls]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In GHC.Tc.HsType.kcInferDeclHeader we use mkAnonTyConBinders to make+the TyConBinders for the MonoTcTyCon. Here is why.++Should this kind-check (cf #16344)?+ data T ka (a::ka) b = MkT (T Type Int Bool)+ (T (Type -> Type) Maybe Bool)++Notice that T is used at two different kinds in its RHS. No!+This should not kind-check. Polymorphic recursion is known to+be a tough nut.++Many moons ago, we laboriously (with help from the renamer) tried to give T+the polymorphic kind+ T :: forall ka -> ka -> kappa -> Type+where kappa is a unification variable, even in the inferInitialKinds phase+(which is what kcInferDeclHeader is all about). But that is dangerously+fragile (see #16344), because `kappa` might get unified with `ka`, and+depending on just /when/ that unification happens, the instantiation of T's+kind would vary between different call sites of T.++We encountered similar trickiness with invisible binders in type+declarations: see Note [No inference for invisible binders in type decls]++Solution: the Monomorphic Recursion Principle:++ A MonoTcTyCon has a monomoprhic kind (no foralls!)++See the invariants on MonoTcTyCon in Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon].++So kcInferDeclHeader gives T a straightforward monomorphic kind, with no+quantification whatsoever. That's why we always use mkAnonTyConBinder for+all arguments when figuring out tc_binders.++But notice that (#16344 comment:3)++* Consider this declaration:+ data T2 ka (a::ka) = MkT2 (T2 Type a)++ Starting with inferInitialKinds+ (Step 1 of Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon]):+ MonoTcTyCon binders:+ ka[tyv] :: (kappa1[tau] :: Type)+ a[tyv] :: (ka[tyv] :: Type)+ MonoTcTyCon kind:+ T2 :: kappa1[tau] -> ka[tyv] -> Type++ Given this kind for T2, in Step 2 we kind-check (T2 Type a)+ from where we see+ T2's first arg: (kappa1 ~ Type)+ T2's second arg: (ka ~ ka)+ These constraints are soluble by (kappa1 := Type)+ so generaliseTcTyCon (Step 3) gives+ T2 :: forall (k::Type) -> k -> *++ But now the /typechecking/ (Step 4, aka desugaring, tcTyClDecl)+ phase fails, because the call (T2 Type a) in the RHS is ill-kinded.++ We'd really prefer all errors to show up in the kind checking phase.++* This algorithm still accepts (in all phases)+ data T3 ka (a::ka) = forall b. MkT3 (T3 Type b)+ although T3 is really polymorphic-recursive too.+ Perhaps we should somehow reject that.++Note [No inference for invisible binders in type decls]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have (#22560):+ data T @k (a::k) = MkT (...(T ty)...)+What monokind can we give to T after step 1 of the kind inference+algorithm described in Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon]?+Remember: Step 1 generates a MonoTcTyCon.++It can't be+ T :: kappa1 -> kappa2 -> Type+because the invocation `(T ty)` doesn't have a visible argument for `kappa`.+Nor can it be+ T :: forall k. kappa2 -> Type+because that breaks the Monomorphic Recursion Principle: MonoTcTyCons have+monomorphic kinds; see Note [No polymorphic recursion in type decls]. It could be+ T :: kappa1 ->. kappa2 -> type+where `->.` is a new kind of arrow in kinds, which (like a type-class argument+in terms) is invisibly instantiated. Or we could fake it with+ T :: forall _. kappa2 -> Type+where `_` is a completely fresh variable, but that seems very smelly and makes it+harder to talk about the Monomorphic Recursion Principle. Moreover we'd need+some extra fancy types in TyConBinders to record this extra information.++Note that in *terms* we do not allow+ f @a (x::a) = rhs+unless `f` has a type signature. So we do the same for types:++ We allow `@` binders in data type declarations ONLY if the+ type constructor has a standalone kind signature (or a CUSK).++That means that GHC.Tc.Gen.HsType.kcInferDeclHeader, which is used when we+don't have a kind signature or CUSK, and builds a MonoTcTyCon, we can simply+reject invisible binders outright (GHC.Tc.Gen.HsType.rejectInvisibleBinders);+and continue to use mkAnonTyConBinders as described in+Note [No polymorphic recursion in type decls].++If we get cries of pain we can revist this decision.+ Note [CUSKs and PolyKinds] ~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider@@ -398,100 +667,6 @@ 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 GHC.Tc.TyCl), we come- upon knowledge of the eventual tycon in bits and pieces, and we use- a TcTyCon to record what we know before we are ready to build the- final TyCon. Here is the plan:-- Step 1 (inferInitialKinds, inference only, skipped for checking):- Make a MonoTcTyCon whose binders are TcTyVars,- which may contain free unification variables-- Step 2 (generaliseTcTyCon)- Generalise that MonoTcTyCon to make a PolyTcTyCon- Its binders are skolem TcTyVars, with accurate SkolemInfo-- Step 3 (tcTyClDecl)- Typecheck the type and class decls to produce a final TyCon- Its binders are final TyVars, not TcTyVars-- Note that a MonoTcTyCon can contain unification variables,- but a PolyTcTyCon does not: only skolem TcTyVars. See- Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon] in GHC.Tc.Utils.TcType-- More details about /kind inference/:-- S1) In kcTyClGroup, we use inferInitialKinds to look over the- declaration of any TyCon that lacks a kind signature or- CUSK, to determine its "shape"; for example, the number of- parameters, and any kind signatures.-- We record that shape record that shape in a MonoTcTyCon; it is- "mono" because it has not been been generalised, and its binders- and result kind may have free unification variables.-- S2) Still in kcTyClGroup, we use kcLTyClDecl to kind-check the- body (class methods, data constructors, etc.) of each of- these MonoTcTyCons, which has the effect of filling in the- metavariables in the tycon's initial kind.-- S3) Still in kcTyClGroup, we use generaliseTyClDecl to generalize- each MonoTcTyCon to get a PolyTcTyCon, with skolem TcTyVars in it,- and a final, fixed kind.-- S4) Finally, back in TcTyClDecls, we extend the environment with- the PolyTcTyCons, and typecheck each declaration (regardless- of kind signatures etc) to get final TyCon.-- More details about /kind checking/-- S5) In kcTyClGroup, we use checkInitialKinds to get the- utterly-final Kind of all TyCons in the group that- (a) have a separate kind signature or- (b) have a CUSK.- This produces a PolyTcTyCon, that is, a TcTyCon in which the binders- and result kind are full of TyVars (not TcTyVars). No unification- variables here; everything is in its final form.--3. tyConScopedTyVars. A challenging piece in all of this is that we- end up taking three separate passes over every declaration:- - one in inferInitialKind (this pass look only at the head, not the body)- - one in kcTyClDecls (to kind-check the body)- - a final one in tcTyClDecls (to desugar)-- In the latter two passes, we need to connect the user-written type- variables in an LHsQTyVars with the variables in the tycon's- inferred kind. Because the tycon might not have a CUSK, this- matching up is, in general, quite hard to do. (Look through the- git history between Dec 2015 and Apr 2016 for- GHC.Tc.Gen.HsType.splitTelescopeTvs!)-- Instead of trying, we just store the list of type variables to- bring into scope, in the tyConScopedTyVars field of a MonoTcTyCon.- These tyvars are brought into scope by the calls to- tcExtendNameTyVarEnv (tcTyConScopedTyVars tycon)- in kcTyClDecl.-- In a TcTyCon, why is tyConScopedTyVars :: [(Name,TcTyVar)] rather- than just [TcTyVar]? Consider these mutually-recursive decls- data T (a :: k1) b = MkT (S a b)- data S (c :: k2) d = MkS (T c d)- We start with k1 bound to kappa1, and k2 to kappa2; so initially- in the (Name,TcTyVar) pairs the Name is that of the TcTyVar. But- then kappa1 and kappa2 get unified; so after the zonking in- 'generalise' in 'kcTyClGroup' the Name and TcTyVar may differ.--See also Note [Type checking recursive type and class declarations].- Note [Swizzling the tyvars before generaliseTcTyCon] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This Note only applies when /inferring/ the kind of a TyCon.@@ -766,15 +941,16 @@ = do { let names_in_this_decl :: [Name] names_in_this_decl = tycld_names decl - -- Extract the specified/required binders and skolemise them- ; tc_with_tvs <- mapM skolemise_tc_tycon names_in_this_decl+ ; tc_infos <- liftZonkM $+ do { -- Extract the specified/required binders and skolemise them+ ; tc_with_tvs <- mapM skolemise_tc_tycon names_in_this_decl - -- Zonk, to manifest the side-effects of skolemisation to the swizzler- -- NB: it's important to skolemise them all before this step. E.g.- -- class C f where { type T (f :: k) }- -- We only skolemise k when looking at T's binders,- -- but k appears in f's kind in C's binders.- ; tc_infos <- mapM zonk_tc_tycon tc_with_tvs+ -- Zonk, to manifest the side-effects of skolemisation to the swizzler+ -- NB: it's important to skolemise them all before this step. E.g.+ -- class C f where { type T (f :: k) }+ -- We only skolemise k when looking at T's binders,+ -- but k appears in f's kind in C's binders.+ ; mapM zonk_tc_tycon tc_with_tvs } -- Swizzle ; swizzled_infos <- tcAddDeclCtxt decl (swizzleTcTyConBndrs tc_infos)@@ -789,7 +965,7 @@ at_names (ClassDecl { tcdATs = ats }) = map (familyDeclName . unLoc) ats at_names _ = [] -- Only class decls have associated types - skolemise_tc_tycon :: Name -> TcM (TcTyCon, SkolemInfo, ScopedPairs)+ skolemise_tc_tycon :: Name -> ZonkM (TcTyCon, SkolemInfo, ScopedPairs) -- Zonk and skolemise the Specified and Required binders skolemise_tc_tycon tc_name = do { let tc = lookupNameEnv_NF inferred_tc_env tc_name@@ -799,7 +975,7 @@ ; return (tc, skol_info, scoped_prs) } zonk_tc_tycon :: (TcTyCon, SkolemInfo, ScopedPairs)- -> TcM (TcTyCon, SkolemInfo, ScopedPairs, TcKind)+ -> ZonkM (TcTyCon, SkolemInfo, ScopedPairs, TcKind) zonk_tc_tycon (tc, skol_info, scoped_prs) = do { scoped_prs <- mapSndM zonkTcTyVarToTcTyVar scoped_prs -- We really have to do this again, even though@@ -864,8 +1040,13 @@ swizzle_tv _ tv = return (mkTyVarTy (swizzle_var tv)) swizzle_cv _ cv = return (mkCoVarCo (swizzle_var cv)) - swizzle_bndr _ tcv _- = return ((), swizzle_var tcv)+ swizzle_bndr :: ()+ -> TyCoVar+ -> ForAllTyFlag+ -> (() -> TyCoVar -> Identity r)+ -> Identity r+ swizzle_bndr _ tcv _ k+ = k () (swizzle_var tcv) swizzle_var :: Var -> Var swizzle_var v@@ -913,10 +1094,12 @@ , text "inferred =" <+> pprTyVars inferred ]) -- Step 3: Final zonk: quantifyTyVars may have done some defaulting- ; inferred <- zonkTcTyVarsToTcTyVars inferred- ; sorted_spec_tvs <- zonkTcTyVarsToTcTyVars sorted_spec_tvs- ; req_tvs <- zonkTcTyVarsToTcTyVars req_tvs- ; tc_res_kind <- zonkTcType tc_res_kind+ ; (inferred, sorted_spec_tvs,req_tvs,tc_res_kind) <- liftZonkM $+ do { inferred <- zonkTcTyVarsToTcTyVars inferred+ ; sorted_spec_tvs <- zonkTcTyVarsToTcTyVars sorted_spec_tvs+ ; req_tvs <- zonkTcTyVarsToTcTyVars req_tvs+ ; tc_res_kind <- zonkTcType tc_res_kind+ ; return (inferred, sorted_spec_tvs, req_tvs, tc_res_kind) } ; traceTc "generaliseTcTyCon: post zonk" $ vcat [ text "tycon =" <+> ppr tc@@ -1090,7 +1273,7 @@ Note [Inferring kinds for type declarations] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This note deals with /inference/ for type declarations-that do not have a CUSK. Consider+that do not have a CUSK or a SAKS. Consider data T (a :: k1) k2 (x :: k2) = MkT (S a k2 x) data S (b :: k3) k4 (y :: k4) = MkS (T b k4 y) @@ -1254,18 +1437,17 @@ specifically, so we just include a note to users whenever we infer VDQ. The testsuite did not show up a single spurious inclusion of this message. -The context is added in addVDQNote, which looks for a visible TyConBinder-that also appears in the TyCon's kind. (I first looked at the kind for-a visible, dependent quantifier, but Note [No polymorphic recursion] in-GHC.Tc.Gen.HsType defeats that approach.) addVDQNote is used in kcTyClDecl,-which is used only when inferring the kind of a tycon (never with a CUSK or-SAK).+The context is added in addVDQNote, which looks for a visible+TyConBinder that also appears in the TyCon's kind. (I first looked at+the kind for a visible, dependent quantifier, but+ Note [No polymorphic recursion in type decls]+in GHC.Tc.Gen.HsType defeats that approach.) addVDQNote is used in+kcTyClDecl, which is used only when inferring the kind of a tycon+(never with a CUSK or SAKS). Once upon a time, I (Richard E) thought that the tycon-kind could not be a forall-type. But this is wrong: data T :: forall k. k -> Type (with -XNoCUSKs) could end up here. And this is all OK.-- -} --------------@@ -1389,7 +1571,7 @@ , fdTyVars = ktvs , fdResultSig = unLoc -> resultSig , fdInfo = info } } )- = do { let flav = getFamFlav Nothing info+ = do { let flav = familyInfoTyConFlavour Nothing info ctxt = TyFamResKindCtxt name ; tc <- kcDeclHeader (InitialKindCheck msig) name flav ktvs $ case famResultKindSignature resultSig of@@ -1430,7 +1612,7 @@ -- by default | otherwise -> return AnyKind where- flav = getFamFlav mb_parent_tycon info+ flav = familyInfoTyConFlavour mb_parent_tycon info ctxt = TyFamResKindCtxt name -- See Note [Standalone kind signatures for associated types]@@ -1450,7 +1632,7 @@ Nothing -> return (TheKind liftedTypeKind) where ctxt = TyFamResKindCtxt name- flav = getFamFlav (Just cls) info+ flav = familyInfoTyConFlavour (Just cls) info {- Note [Standalone kind signatures for associated types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1535,29 +1717,6 @@ -} -----------------------------------getFamFlav- :: Maybe TcTyCon -- ^ Just cls <=> this is an associated family of class cls- -> FamilyInfo pass- -> TyConFlavour-getFamFlav mb_parent_tycon info =- case info of- DataFamily -> DataFamilyFlavour mb_parent_tycon- OpenTypeFamily -> OpenTypeFamilyFlavour mb_parent_tycon- ClosedTypeFamily _ -> assert (isNothing mb_parent_tycon) -- See Note [Closed type family mb_parent_tycon]- ClosedTypeFamilyFlavour--{- Note [Closed type family mb_parent_tycon]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-There's no way to write a closed type family inside a class declaration:-- class C a where- type family F a where -- error: parse error on input ‘where’--In fact, it is not clear what the meaning of such a declaration would be.-Therefore, 'mb_parent_tycon' of any closed type family has to be Nothing.--}- ------------------------------------------------------------------------ kcLTyClDecl :: LTyClDecl GhcRn -> TcM () -- See Note [Kind checking for type and class decls]@@ -1583,7 +1742,7 @@ -- TcTyVars rather than create skolemised variables for the bound variables. -- - inferInitialKinds makes the TcTyCon where the tyvars are TcTyVars -- - In this function, those TcTyVars are unified with other kind variables during--- kind inference (see [How TcTyCons work])+-- kind inference (see GHC.Tc.TyCl Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon]) kcTyClDecl (DataDecl { tcdLName = (L _ _name), tcdDataDefn = HsDataDefn { dd_ctxt = ctxt, dd_cons = cons } }) tycon = tcExtendNameTyVarEnv (tcTyConScopedTyVars tycon) $@@ -1848,7 +2007,7 @@ * During GHC.Tc.Gen.HsType.tcTyVar we look in the *local* env, to get the fully-known, not knot-tied TcTyCon for T. - * Then, in GHC.Tc.Utils.Zonk.zonkTcTypeToType (and zonkTcTyCon in particular)+ * Then, in GHC.Tc.Zonk.Type.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@@ -2455,22 +2614,21 @@ -- class (forall a. a b ~ a c) => C b c -- The kind of `a` is unconstrained. ; dvs <- candidateQTyVarsOfTypes ctxt- ; let mk_doc tidy_env = do { (tidy_env2, ctxt) <- zonkTidyTcTypes tidy_env ctxt- ; return ( tidy_env2- , sep [ text "the class context:"- , pprTheta ctxt ] ) }- ; doNotQuantifyTyVars dvs mk_doc+ ; let err_ctx tidy_env = do { (tidy_env2, ctxt) <- zonkTidyTcTypes tidy_env ctxt+ ; return (tidy_env2, UninfTyCtx_ClassContext ctxt) }+ ; doNotQuantifyTyVars dvs err_ctx -- The pushLevelAndSolveEqualities will report errors for any -- unsolved equalities, so these zonks should not encounter -- any unfilled coercion variables unless there is such an error -- The zonk also squeeze out the TcTyCons, and converts -- Skolems to tyvars.- ; ze <- mkEmptyZonkEnv NoFlexi- ; (ze, bndrs) <- zonkTyVarBindersX ze tc_bndrs -- From TcTyVars to TyVars- ; ctxt <- zonkTcTypesToTypesX ze ctxt- ; sig_stuff <- mapM (zonkTcMethInfoToMethInfoX ze) sig_stuff- -- ToDo: do we need to zonk at_stuff?+ ; (bndrs, ctxt, sig_stuff) <- initZonkEnv NoFlexi $+ runZonkBndrT (zonkTyVarBindersX tc_bndrs) $ \ bndrs ->+ do { ctxt <- zonkTcTypesToTypesX ctxt+ ; sig_stuff <- mapM zonkTcMethInfoToMethInfoX sig_stuff+ -- ToDo: do we need to zonk at_stuff?+ ; return (bndrs, ctxt, sig_stuff) } -- TODO: Allow us to distinguish between abstract class, -- and concrete class with no methods (maybe by@@ -2526,7 +2684,10 @@ -> TcM [ClassATItem] tcClassATs class_name cls ats at_defs = do { -- Complain about associated type defaults for non associated-types- sequence_ [ failWithTc (TcRnBadAssociatedType class_name n)+ sequence_ [ failWithTc $ TcRnIllegalInstance+ $ IllegalFamilyInstance $ InvalidAssoc+ $ InvalidAssocDefault+ $ AssocDefaultNotAssoc class_name n | n <- map at_def_tycon at_defs , not (n `elemNameSet` at_names) ] ; mapM tc_at ats }@@ -2560,9 +2721,9 @@ = return Nothing -- No default declaration tcDefaultAssocDecl _ (d1:_:_)- = failWithTc (mkTcRnUnknownMessage $ mkPlainError noHints $- text "More than one default declaration for"- <+> ppr (tyFamInstDeclName (unLoc d1)))+ = failWithTc $ TcRnIllegalInstance $ IllegalFamilyInstance+ $ InvalidAssoc $ InvalidAssocDefault $+ AssocMultipleDefaults (tyFamInstDeclName (unLoc d1)) tcDefaultAssocDecl fam_tc [L loc (TyFamInstDecl { tfid_eqn =@@ -2580,11 +2741,14 @@ -- Kind of family check ; assert (fam_tc_name == tc_name) $- checkTc (isTypeFamilyTyCon fam_tc) (wrongKindOfFamily fam_tc)+ checkTc (isTypeFamilyTyCon fam_tc) $+ TcRnIllegalInstance $ IllegalFamilyInstance $+ FamilyCategoryMismatch fam_tc -- Arity check- ; checkTc (vis_pats == vis_arity)- (wrongNumberOfParmsErr vis_arity)+ ; checkTc (vis_pats == vis_arity) $+ TcRnIllegalInstance $ IllegalFamilyInstance $+ FamilyArityMismatch fam_tc vis_arity -- Typecheck RHS --@@ -2846,12 +3010,12 @@ = setSrcSpanA loc $ do { let tvs = binderVars tcbs ; dflags <- getDynFlags+ -- Fail eagerly to avoid reporting injectivity errors when+ -- TypeFamilyDependencies is not enabled. ; checkTc (xopt LangExt.TypeFamilyDependencies dflags)- (mkTcRnUnknownMessage $ mkPlainError noHints $- text "Illegal injectivity annotation" $$- text "Use TypeFamilyDependencies to allow this")+ TcRnTyFamDepsDisabled ; inj_tvs <- mapM (tcLookupTyVar . unLoc) lInjNames- ; inj_tvs <- zonkTcTyVarsToTcTyVars inj_tvs -- zonk the kinds+ ; inj_tvs <- liftZonkM $ zonkTcTyVarsToTcTyVars 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@@ -2864,7 +3028,7 @@ tcTySynRhs roles_info tc_name hs_ty = bindTyClTyVars tc_name $ \ tc_bndrs res_kind -> do { env <- getLclEnv- ; traceTc "tc-syn" (ppr tc_name $$ ppr (tcl_env env))+ ; traceTc "tc-syn" (ppr tc_name $$ ppr (getLclEnvRdrEnv env)) ; rhs_ty <- pushLevelAndSolveEqualities skol_info tc_bndrs $ tcCheckLHsType hs_ty (TheKind res_kind) @@ -2873,15 +3037,14 @@ -- type T = forall a. Proxy a -- The kind of `a` is unconstrained. ; dvs <- candidateQTyVarsOfType rhs_ty- ; let mk_doc tidy_env = do { (tidy_env2, rhs_ty) <- zonkTidyTcType tidy_env rhs_ty- ; return ( tidy_env2- , sep [ text "the type synonym right-hand side:"- , ppr rhs_ty ] ) }- ; doNotQuantifyTyVars dvs mk_doc+ ; let err_ctx tidy_env = do { (tidy_env2, rhs_ty) <- zonkTidyTcType tidy_env rhs_ty+ ; return (tidy_env2, UninfTyCtx_TySynRhs rhs_ty) }+ ; doNotQuantifyTyVars dvs err_ctx - ; ze <- mkEmptyZonkEnv NoFlexi- ; (ze, bndrs) <- zonkTyVarBindersX ze tc_bndrs- ; rhs_ty <- zonkTcTypeToTypeX ze rhs_ty+ ; (bndrs, rhs_ty) <- initZonkEnv NoFlexi $+ runZonkBndrT (zonkTyVarBindersX tc_bndrs) $ \ bndrs ->+ do { rhs_ty <- zonkTcTypeToTypeX rhs_ty+ ; return (bndrs, rhs_ty) } ; let roles = roles_info tc_name ; return (buildSynTyCon tc_name bndrs res_kind roles rhs_ty) } where@@ -2918,22 +3081,24 @@ -- data (forall a. a b ~ a c) => T b c -- The kind of 'a' is unconstrained. ; dvs <- candidateQTyVarsOfTypes stupid_tc_theta- ; let mk_doc tidy_env+ ; let err_ctx tidy_env = do { (tidy_env2, theta) <- zonkTidyTcTypes tidy_env stupid_tc_theta- ; return ( tidy_env2- , sep [ text "the datatype context:"- , pprTheta theta ] ) }- ; doNotQuantifyTyVars dvs mk_doc+ ; return (tidy_env2, UninfTyCtx_DataContext theta) }+ ; doNotQuantifyTyVars dvs err_ctx -- Check that we don't use kind signatures without the extension ; kind_signatures <- xoptM LangExt.KindSignatures- ; when (isJust mb_ksig) $- checkTc (kind_signatures) (badSigTyDecl tc_name)+ ; case mb_ksig of+ Just (L _ ksig)+ | not kind_signatures+ -> addErrTc $ TcRnKindSignaturesDisabled (Right (tc_name, ksig))+ _ -> return () - ; ze <- mkEmptyZonkEnv NoFlexi- ; (ze, bndrs) <- zonkTyVarBindersX ze tc_bndrs- ; stupid_theta <- zonkTcTypesToTypesX ze stupid_tc_theta- ; res_kind <- zonkTcTypeToTypeX ze res_kind+ ; (bndrs, stupid_theta, res_kind) <- initZonkEnv NoFlexi $+ runZonkBndrT (zonkTyVarBindersX tc_bndrs) $ \ bndrs ->+ do { stupid_theta <- zonkTcTypesToTypesX stupid_tc_theta+ ; res_kind <- zonkTcTypeToTypeX res_kind+ ; return (bndrs, stupid_theta, res_kind) } ; tycon <- fixM $ \ rec_tycon -> do { data_cons <- tcConDecls DDataType rec_tycon tc_bndrs res_kind cons@@ -3045,14 +3210,15 @@ (map (const Nominal) qtvs) (locA loc)) } -checkTyFamInstEqn :: TcTyCon -> Name -> [HsArg tm ty] -> TcM ()+checkTyFamInstEqn :: TcTyCon -> Name -> [HsArg p tm ty] -> TcM () checkTyFamInstEqn tc_fam_tc eqn_tc_name hs_pats = do { -- Ensure that each equation's type constructor is for the right -- type family. E.g. barf on -- type family F a where { G Int = Bool } let tc_fam_tc_name = getName tc_fam_tc ; checkTc (tc_fam_tc_name == eqn_tc_name) $- wrongTyFamName tc_fam_tc_name eqn_tc_name+ TcRnIllegalInstance $ IllegalFamilyInstance $+ TyFamNameMismatch tc_fam_tc_name eqn_tc_name -- Check the arity of visible arguments -- If we wait until validity checking, we'll get kind errors@@ -3060,7 +3226,8 @@ ; let vis_arity = length (tyConVisibleTyVars tc_fam_tc) vis_pats = numVisibleArgs hs_pats ; checkTc (vis_pats == vis_arity) $- wrongNumberOfParmsErr vis_arity+ TcRnIllegalInstance $ IllegalFamilyInstance $+ FamilyArityMismatch tc_fam_tc vis_arity } {- Note [Instantiating a family tycon]@@ -3178,17 +3345,16 @@ -- See Note [Error on unconstrained meta-variables] in GHC.Tc.Utils.TcMType -- Example: typecheck/should_fail/T17301 ; dvs_rhs <- candidateQTyVarsOfType rhs_ty- ; let mk_doc tidy_env+ ; let err_ctx tidy_env = do { (tidy_env2, rhs_ty) <- zonkTidyTcType tidy_env rhs_ty- ; return ( tidy_env2- , sep [ text "type family equation right-hand side:"- , ppr rhs_ty ] ) }- ; doNotQuantifyTyVars dvs_rhs mk_doc+ ; return (tidy_env2, UninfTyCtx_TyFamRhs rhs_ty) }+ ; doNotQuantifyTyVars dvs_rhs err_ctx - ; ze <- mkEmptyZonkEnv NoFlexi- ; (ze, final_tvs) <- zonkTyBndrsX ze final_tvs- ; lhs_ty <- zonkTcTypeToTypeX ze lhs_ty- ; rhs_ty <- zonkTcTypeToTypeX ze rhs_ty+ ; (final_tvs, lhs_ty, rhs_ty) <- initZonkEnv NoFlexi $+ runZonkBndrT (zonkTyBndrsX final_tvs) $ \ final_tvs ->+ do { lhs_ty <- zonkTcTypeToTypeX lhs_ty+ ; rhs_ty <- zonkTcTypeToTypeX rhs_ty+ ; return (final_tvs, lhs_ty, rhs_ty) } ; let pats = unravelFamInstPats lhs_ty -- Note that we do this after solveEqualities@@ -3336,18 +3502,19 @@ -- Check that we don't use GADT syntax in H98 world ; gadtSyntax_ok <- xoptM LangExt.GADTSyntax ; let gadt_syntax = anyLConIsGadt cons- ; checkTc (gadtSyntax_ok || not gadt_syntax) (badGadtDecl tc_name)+ ; unless (gadtSyntax_ok || not gadt_syntax) $+ addErrTc (TcRnGADTsDisabled tc_name) -- Check that the stupid theta is empty for a GADT-style declaration. -- See Note [The stupid context] in GHC.Core.DataCon.- ; checkTc (null stupid_theta || not gadt_syntax) (badStupidTheta tc_name)+ ; checkTc (null stupid_theta || not gadt_syntax) (TcRnGADTDataContext tc_name) -- 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)+ ; unless (not (null cons) || empty_data_decls || is_boot) $+ addErrTc (TcRnEmptyDataDeclsDisabled tc_name) ; return gadt_syntax } @@ -3385,7 +3552,7 @@ concatMapDataDefnConsTcM name f = \ case NewTypeCon a -> f NewType a >>= \ case b:|[] -> pure (NewTypeCon b)- bs -> failWithTc $ newtypeConError name (length bs)+ bs -> failWithTc $ TcRnMultipleConForNewtype name (length bs) DataTypeCons is_type_data as -> DataTypeCons is_type_data <$> concatMapM (fmap toList . f DataType) as tcConDecl :: NewOrData@@ -3457,12 +3624,13 @@ -- See test dependent/should_fail/T13780a -- Zonk to Types- ; ze <- mkEmptyZonkEnv NoFlexi- ; (ze, tc_bndrs) <- zonkTyVarBindersX ze tc_bndrs- ; (ze, kvs) <- zonkTyBndrsX ze kvs- ; (ze, exp_tvbndrs) <- zonkTyVarBindersX ze exp_tvbndrs- ; arg_tys <- zonkScaledTcTypesToTypesX ze arg_tys- ; ctxt <- zonkTcTypesToTypesX ze ctxt+ ; (tc_bndrs, kvs, exp_tvbndrs, arg_tys, ctxt) <- initZonkEnv NoFlexi $+ runZonkBndrT (zonkTyVarBindersX tc_bndrs ) $ \ tc_bndrs ->+ runZonkBndrT (zonkTyBndrsX kvs ) $ \ kvs ->+ runZonkBndrT (zonkTyVarBindersX exp_tvbndrs) $ \ exp_tvbndrs ->+ do { arg_tys <- zonkScaledTcTypesToTypesX arg_tys+ ; ctxt <- zonkTcTypesToTypesX ctxt+ ; return (tc_bndrs, kvs, exp_tvbndrs, arg_tys, ctxt) } -- Can't print univ_tvs, arg_tys etc, because we are inside the knot here ; traceTc "tcConDecl 2" (ppr name $$ ppr field_lbls)@@ -3545,12 +3713,13 @@ ; let tvbndrs = mkTyVarBinders InferredSpec tkvs ++ outer_tv_bndrs - -- Zonk to Types- ; ze <- mkEmptyZonkEnv NoFlexi- ; (ze, tvbndrs) <- zonkTyVarBindersX ze tvbndrs- ; arg_tys <- zonkScaledTcTypesToTypesX ze arg_tys- ; ctxt <- zonkTcTypesToTypesX ze ctxt- ; res_ty <- zonkTcTypeToTypeX ze res_ty+ -- Zonk to Types+ ; (tvbndrs, arg_tys, ctxt, res_ty) <- initZonkEnv NoFlexi $+ runZonkBndrT (zonkTyVarBindersX tvbndrs) $ \ tvbndrs ->+ do { arg_tys <- zonkScaledTcTypesToTypesX arg_tys+ ; ctxt <- zonkTcTypesToTypesX ctxt+ ; res_ty <- zonkTcTypeToTypeX res_ty+ ; return (tvbndrs, arg_tys, ctxt, res_ty) } ; let res_tmpl = mkDDHeaderTy dd_info rep_tycon tc_bndrs (univ_tvs, ex_tvs, tvbndrs', eq_preds, arg_subst)@@ -4069,8 +4238,7 @@ tv_kind = tyVarKind t_tv tv_kind' = substTy t_sub tv_kind t_tv' = setTyVarKind t_tv tv_kind'- eqs' | isConstraintLikeKind (typeKind tv_kind') = eqs- | otherwise = (t_tv', r_ty) : eqs+ eqs' = (t_tv', r_ty) : eqs | otherwise = pprPanic "mkGADTVars" (ppr tmpl_tvs $$ ppr subst)@@ -4263,9 +4431,7 @@ ; ClosedSynFamilyTyCon Nothing -> return () ; AbstractClosedSynFamilyTyCon -> do { hsBoot <- tcIsHsBootOrSig- ; checkTc hsBoot $ mkTcRnUnknownMessage $ mkPlainError noHints $- text "You may define an abstract closed type family" $$- text "only in a .hs-boot file" }+ ; checkTc hsBoot $ TcRnAbstractClosedTyFamDecl } ; DataFamilyTyCon {} -> return () ; OpenSynFamilyTyCon -> return () ; BuiltInSynFamTyCon _ -> return () }@@ -4341,12 +4507,11 @@ checkPartialRecordField all_cons fld = setSrcSpan loc $ warnIf (not is_exhaustive && not (startsWithUnderscore occ_name))- (mkTcRnUnknownMessage $ mkPlainDiagnostic (WarningWithFlag Opt_WarnPartialFields) noHints $- sep [text "Use of partial record field selector" <> colon,- nest 2 $ quotes (ppr occ_name)])+ (TcRnPartialFieldSelector fld) where- loc = getSrcSpan (flSelector fld)- occ_name = occName fld+ sel = flSelector fld+ loc = getSrcSpan sel+ occ_name = nameOccName sel (cons_with_field, cons_without_field) = partition has_field all_cons has_field con = fld `elem` (dataConFieldLabels con)@@ -4358,8 +4523,8 @@ 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) }+ = do { checkTc (isJust mb_subst1) (TcRnCommonFieldResultTypeMismatch con1 con2 fld)+ ; checkTc (isJust mb_subst2) (TcRnCommonFieldTypeMismatch con1 con2 fld) } where mb_subst1 = tcMatchTy res1 res2 mb_subst2 = tcMatchTyX (expectJust "checkFieldCompat" mb_subst1) fty1 fty2@@ -4393,7 +4558,7 @@ -- data instance D [a] where { MkD :: D (Maybe b) } -- see Note [GADT return types] ; checkTc (isJust (tcMatchTyKi res_ty_tmpl orig_res_ty))- (badDataConTyCon con res_ty_tmpl)+ (TcRnDataConParentTypeMismatch con res_ty_tmpl) -- Note that checkTc aborts if it finds an error. This is -- critical to avoid panicking when we call dataConDisplayType -- on an un-rejiggable datacon!@@ -4436,8 +4601,8 @@ ; checkValidType ctxt data_con_display_type -- Check that existentials are allowed if they are used- ; checkTc (existential_ok || isVanillaDataCon con)- (badExistential con)+ ; unless (existential_ok || isVanillaDataCon con) $+ addErrTc (TcRnExistentialQuantificationDisabled con) -- Check that the only constraints in signatures of constructors -- in a "type data" declaration are equality constraints.@@ -4452,16 +4617,14 @@ check_bang orig_arg_ty bang rep_bang n | HsSrcBang _ _ SrcLazy <- bang , not (bang_opt_strict_data bang_opts)- = addErrTc $ mkTcRnUnknownMessage $ mkPlainError noHints $- (bad_bang n (text "Lazy annotation (~) without StrictData"))+ = addErrTc (bad_bang n LazyFieldsDisabled) -- Warn about UNPACK without "!" -- e.g. data T = MkT {-# UNPACK #-} Int | HsSrcBang _ want_unpack strict_mark <- bang , isSrcUnpacked want_unpack, not (is_strict strict_mark) , not (isUnliftedType orig_arg_ty)- = addDiagnosticTc $ mkTcRnUnknownMessage $- mkPlainDiagnostic WarningWithoutFlag noHints (bad_bang n (text "UNPACK pragma lacks '!'"))+ = addDiagnosticTc (bad_bang n UnpackWithoutStrictness) -- Warn about a redundant ! on an unlifted type -- e.g. data T = MkT !Int#@@ -4490,8 +4653,7 @@ -- warn in this case (it gives users the wrong idea about whether -- or not UNPACK on abstract types is supported; it is!) , isHomeUnitDefinite (hsc_home_unit hsc_env)- = addDiagnosticTc $ mkTcRnUnknownMessage $- mkPlainDiagnostic WarningWithoutFlag noHints (bad_bang n (text "Ignoring unusable UNPACK pragma"))+ = addDiagnosticTc (bad_bang n BackpackUnpackAbstractType) | otherwise = return ()@@ -4526,9 +4688,8 @@ NoSrcStrict -> bang_opt_strict_data bang_opts bang -> isSrcStrict bang - bad_bang n herald- = hang herald 2 (text "on the" <+> speakNth n- <+> text "argument of" <+> quotes (ppr con))+ bad_bang n+ = TcRnBadFieldAnnotation n con show_linear_types = xopt LangExt.LinearTypes dflags data_con_display_type = dataConDisplayType show_linear_types con@@ -4597,8 +4758,9 @@ -- extension (subsumed by multiparameter type classes, #8993) ; checkTc (multi_param_type_classes || cls_arity == 1 || (nullary_type_classes && cls_arity == 0))- (classArityErr cls_arity cls)- ; checkTc (fundep_classes || null fundeps) (classFunDepsErr cls)+ (TcRnClassExtensionDisabled cls (MultiParamDisabled cls_arity))+ ; unless (fundep_classes || null fundeps) $+ addErrTc (TcRnClassExtensionDisabled cls FunDepsDisabled) -- Check the super-classes ; checkValidTheta (ClassSCCtxt (className cls)) theta@@ -4608,7 +4770,7 @@ ; unless undecidable_super_classes $ case checkClassCycles cls of Just err -> setSrcSpan (getSrcSpan cls) $- addErrTc (mkTcRnUnknownMessage $ mkPlainError noHints err)+ addErrTc (TcRnSuperclassCycle err) Nothing -> return () -- Check the class operations.@@ -4659,14 +4821,16 @@ check_constraint pred -- See Note [Class method constraints] = when (not (isEmptyVarSet pred_tvs) && pred_tvs `subVarSet` cls_tv_set)- (addErrTc (badMethPred sel_id pred))+ (addErrTc (TcRnClassExtensionDisabled cls (ConstrainedClassMethodsDisabled sel_id pred))) where pred_tvs = tyCoVarsOfType pred check_at (ATI fam_tc m_dflt_rhs) = do { traceTc "ati" (ppr fam_tc $$ ppr tyvars $$ ppr fam_tvs)- ; checkTc (cls_arity == 0 || any (`elemVarSet` cls_tv_set) fam_tvs)- (noClassTyVarErr cls fam_tc)+ ; checkTc (cls_arity == 0 || any (`elemVarSet` cls_tv_set) fam_tvs) $+ TcRnIllegalInstance $ IllegalFamilyInstance $+ InvalidAssoc $ InvalidAssocInstance $+ AssocNoClassTyVar 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,@@ -4751,12 +4915,7 @@ -- default foo2 :: a -> b unless (isJust $ tcMatchTys [dm_phi_ty, vanilla_phi_ty] [vanilla_phi_ty, dm_phi_ty]) $ addErrTc $- mkTcRnUnknownMessage $ mkPlainError noHints $- 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")+ TcRnDefaultSigMismatch sel_id dm_ty -- Now do an ambiguity check on the default type signature. checkValidType ctxt (mkDefaultMethodType cls sel_id dm_spec)@@ -4768,19 +4927,12 @@ -- client might have a go! checkFamFlag tc_name = do { idx_tys <- xoptM LangExt.TypeFamilies- ; checkTc idx_tys err_msg }- where- err_msg :: TcRnMessage- err_msg = mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Illegal family declaration for" <+> quotes (ppr tc_name))- 2 (text "Enable TypeFamilies to allow indexed type families")+ ; unless idx_tys $ addErrTc (TcRnTyFamsDisabled (TyFamsDisabledFamily tc_name)) } checkResultSigFlag :: Name -> FamilyResultSig GhcRn -> TcM () checkResultSigFlag tc_name (TyVarSig _ tvb) = do { ty_fam_deps <- xoptM LangExt.TypeFamilyDependencies- ; checkTc ty_fam_deps $ mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Illegal result type variable" <+> ppr tvb <+> text "for" <+> quotes (ppr tc_name))- 2 (text "Enable TypeFamilyDependencies to allow result variable names") }+ ; unless ty_fam_deps $ addErrTc (TcRnTyFamResultDisabled tc_name tvb) } checkResultSigFlag _ _ = return () -- other cases OK {- Note [Class method constraints]@@ -5013,15 +5165,19 @@ | isVisibleTyConBinder tvb = Just (role, binderVar tvb) | otherwise = Nothing - check_roles- = whenIsJust role_annot_decl_maybe $- \decl@(L loc (RoleAnnotDecl _ _ the_role_annots)) ->+ check_roles = case role_annot_decl_maybe of+ Nothing ->+ setSrcSpan (getSrcSpan name) $+ -- See Note [Missing role annotations warning]+ warnIf (not (isClassTyCon tc) && not (null vis_roles)) $+ TcRnMissingRoleAnnotation name vis_roles+ Just (decl@(L loc (RoleAnnotDecl _ _ the_role_annots))) -> addRoleAnnotCtxt name $ setSrcSpanA loc $ do { role_annots_ok <- xoptM LangExt.RoleAnnotations- ; checkTc role_annots_ok $ needXRoleAnnotations tc+ ; unless role_annots_ok $ addErrTc $ TcRnRoleAnnotationsDisabled tc ; checkTc (vis_vars `equalLength` the_role_annots)- (wrongNumberOfRoles vis_vars decl)+ (TcRnRoleCountMismatch (length 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@@ -5030,7 +5186,7 @@ ; checkTc ( incoherent_roles_ok || (not $ isClassTyCon tc) || (all (== Nominal) vis_roles))- incoherentRoles+ (TcRnIncoherentRoles tc) ; lint <- goptM Opt_DoCoreLinting ; when lint $ checkValidRoles tc }@@ -5038,11 +5194,44 @@ check_no_roles = whenIsJust role_annot_decl_maybe illegalRoleAnnotDecl +-- Note [Missing role annotations warning]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+-- We warn about missing role annotations for tycons+-- 1. not type-classes:+-- type classes are nominal by default, which is most conservative+-- choice. E.g. we cannot have a type-class with an (accidentally)+-- phantom or representational type variable, as we can with+-- data types.+-- 2. with visible roles+--+-- We don't make any exceptions for other data types.+-- In particular we explicitly warn about omitted (default and common)+-- representational roles. That is the point of the warning.+-- For example the default representational role for `Map`s key type parameter+-- would be wrong, and this warning is there to warn about it,+-- asking users to be explicit.+--+-- If the default roles have been nominal, i.e. as conservative as possible,+-- the warning would still be valuable, as most types can be `representational`+-- (c.f. type-classes, which usually cannot).+--+-- We don't warn about types with invisible roles only, because users cannot+-- specify them:+--+-- type Foo :: forall {k}. Type+-- data Foo = Foo Int+-- type role Foo phantom+--+-- is incorrect, GHC complains:+-- Wrong number of roles listed in role annotation;+-- Expected 0, got 1:+--+ checkRoleAnnot :: TyVar -> LocatedAn NoEpAnns (Maybe Role) -> Role -> TcM () checkRoleAnnot _ (L _ Nothing) _ = return () checkRoleAnnot tv (L _ (Just r1)) r2 = when (r1 /= r2) $- addErrTc $ badRoleAnnot (tyVarName tv) r1 r2+ addErrTc $ TcRnRoleMismatch (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 GHC.Tc.TyCl.Utils@@ -5078,11 +5267,8 @@ 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"+ report_error role $ TyVarRoleMismatch tv role'+ Nothing -> report_error role $ TyVarMissingInEnv tv check_ty_roles env Representational (TyConApp tc tys) = let roles' = tyConRoles tc in@@ -5114,17 +5300,14 @@ check_ty_roles _ role (CoercionTy co) = unless (role == Phantom) $- report_error $ text "coercion" <+> ppr co <+> text "has bad role" <+> ppr role+ report_error role $ BadCoercionRole co maybe_check_ty_roles env role ty = when (role == Nominal || role == Representational) $ check_ty_roles env role ty - report_error doc- = addErrTc $ mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [text "Internal error in role inference:",- doc,- text "Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug"]+ report_error role reason+ = addErrTc $ TcRnRoleValidationFailed role reason {- ************************************************************************@@ -5140,7 +5323,7 @@ addVDQNote :: TcTyCon -> TcM a -> TcM a -- See Note [Inferring visible dependent quantification]--- Only types without a signature (CUSK or SAK) here+-- Only types without a signature (CUSK or SAKS) here addVDQNote tycon thing_inside | assertPpr (isMonoTcTyCon tycon) (ppr tycon $$ ppr tc_kind) has_vdq@@ -5202,19 +5385,6 @@ ctxt = text "In the equations for closed type family" <+> quotes (ppr tc) -resultTypeMisMatch :: FieldLabelString -> DataCon -> DataCon -> TcRnMessage-resultTypeMisMatch field_name con1 con2- = mkTcRnUnknownMessage $ mkPlainError noHints $- 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 -> TcRnMessage-fieldTypeMisMatch field_name con1 con2- = mkTcRnUnknownMessage $ mkPlainError noHints $- sep [text "Constructors" <+> ppr con1 <+> text "and" <+> ppr con2,- text "give different types for field", quotes (ppr field_name)]- dataConCtxt :: NonEmpty (LocatedN Name) -> SDoc dataConCtxt cons = text "In the definition of data constructor" <> plural (toList cons) <+> ppr_cons (toList cons)@@ -5231,147 +5401,11 @@ classOpCtxt sel_id tau = sep [text "When checking the class method:", nest 2 (pprPrefixOcc sel_id <+> dcolon <+> ppr tau)] -classArityErr :: Int -> Class -> TcRnMessage-classArityErr n cls- | n == 0 = mkErr "No" "no-parameter"- | otherwise = mkErr "Too many" "multi-parameter"- where- mkErr howMany allowWhat = mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [text (howMany ++ " parameters for class") <+> quotes (ppr cls),- parens (text ("Enable MultiParamTypeClasses to allow "- ++ allowWhat ++ " classes"))]--classFunDepsErr :: Class -> TcRnMessage-classFunDepsErr cls- = mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [text "Fundeps in class" <+> quotes (ppr cls),- parens (text "Enable FunctionalDependencies to allow fundeps")]--badMethPred :: Id -> TcPredType -> TcRnMessage-badMethPred sel_id pred- = mkTcRnUnknownMessage $ mkPlainError noHints $- 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 -> TcRnMessage-noClassTyVarErr clas fam_tc- = mkTcRnUnknownMessage $ mkPlainError noHints $- sep [ text "The associated type" <+> quotes (ppr fam_tc <+> hsep (map ppr (tyConTyVars fam_tc)))- , text "mentions none of the type or kind variables of the class" <+>- quotes (ppr clas <+> hsep (map ppr (classTyVars clas)))]--badDataConTyCon :: DataCon -> Type -> TcRnMessage-badDataConTyCon data_con res_ty_tmpl- = mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Data constructor" <+> quotes (ppr data_con) <+>- text "returns type" <+> quotes (ppr actual_res_ty))- 2 (text "instead of an instance of its parent type" <+> quotes (ppr res_ty_tmpl))- where- actual_res_ty = dataConOrigResTy data_con--badGadtDecl :: Name -> TcRnMessage-badGadtDecl tc_name- = mkTcRnUnknownMessage $ mkPlainError noHints $- 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 -> TcRnMessage-badExistential con- = mkTcRnUnknownMessage $ mkPlainError noHints $- sdocOption sdocLinearTypes (\show_linear_types ->- 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 (dataConDisplayType show_linear_types con)- , parens $ text "Enable ExistentialQuantification or GADTs to allow this" ]))--badStupidTheta :: Name -> TcRnMessage-badStupidTheta tc_name- = mkTcRnUnknownMessage $ mkPlainError noHints $- text "A data type declared in GADT style cannot have a context:" <+> quotes (ppr tc_name)--newtypeConError :: Name -> Int -> TcRnMessage-newtypeConError tycon n- = mkTcRnUnknownMessage $ mkPlainError noHints $- sep [text "A newtype must have exactly one constructor,",- nest 2 $ text "but" <+> quotes (ppr tycon) <+> text "has" <+> speakN n ]--badSigTyDecl :: Name -> TcRnMessage-badSigTyDecl tc_name- = mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ text "Illegal kind signature" <+>- quotes (ppr tc_name)- , nest 2 (parens $ text "Use KindSignatures to allow kind signatures") ]--emptyConDeclsErr :: Name -> TcRnMessage-emptyConDeclsErr tycon- = mkTcRnUnknownMessage $ mkPlainError noHints $- sep [quotes (ppr tycon) <+> text "has no constructors",- nest 2 $ text "(EmptyDataDecls permits this)"]--wrongKindOfFamily :: TyCon -> TcRnMessage-wrongKindOfFamily family- = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Wrong category of family instance; declaration was for a"- <+> kindOfFamily- where- kindOfFamily | isTypeFamilyTyCon family = text "type family"- | isDataFamilyTyCon family = text "data family"- | otherwise = pprPanic "wrongKindOfFamily" (ppr family)---- | Produce an error for oversaturated type family equations with too many--- required arguments.--- See Note [Oversaturated type family equations] in "GHC.Tc.Validity".-wrongNumberOfParmsErr :: Arity -> TcRnMessage-wrongNumberOfParmsErr max_args- = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Number of parameters must match family declaration; expected"- <+> ppr max_args--badRoleAnnot :: Name -> Role -> Role -> TcRnMessage-badRoleAnnot var annot inferred- = mkTcRnUnknownMessage $ mkPlainError noHints $- 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 -> TcRnMessage-wrongNumberOfRoles tyvars d@(L _ (RoleAnnotDecl _ _ annots))- = mkTcRnUnknownMessage $ mkPlainError noHints $- 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 _))+illegalRoleAnnotDecl (L loc role) = setErrCtxt [] $ setSrcSpanA loc $- addErrTc $ mkTcRnUnknownMessage $ mkPlainError noHints $- (text "Illegal role annotation for" <+> ppr tycon <> char ';' $$- text "they are allowed only for datatypes and classes.")--needXRoleAnnotations :: TyCon -> TcRnMessage-needXRoleAnnotations tc- = mkTcRnUnknownMessage $ mkPlainError noHints $- text "Illegal role annotation for" <+> ppr tc <> char ';' $$- text "did you intend to use RoleAnnotations?"--incoherentRoles :: TcRnMessage-incoherentRoles = mkTcRnUnknownMessage $ mkPlainError noHints $- (text "Roles other than" <+> quotes (text "nominal") <+>- text "for class parameters can lead to incoherence.") $$- (text "Use IncoherentInstances to allow this; bad role found")--wrongTyFamName :: Name -> Name -> TcRnMessage-wrongTyFamName fam_tc_name eqn_tc_name- = mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Mismatched type name in type family instance.")- 2 (vcat [ text "Expected:" <+> ppr fam_tc_name- , text " Actual:" <+> ppr eqn_tc_name ])+ addErrTc $ TcRnIllegalRoleAnnotation role addTyConCtxt :: TyCon -> TcM a -> TcM a addTyConCtxt tc = addTyConFlavCtxt name flav
GHC/Tc/TyCl/Class.hs view
@@ -35,21 +35,24 @@ import GHC.Tc.Gen.Bind import GHC.Tc.Utils.Env import GHC.Tc.Utils.Unify-import GHC.Tc.Utils.Instantiate( tcSuperSkolTyVars )+import GHC.Tc.Utils.Instantiate( newFamInst, tcSuperSkolTyVars ) import GHC.Tc.Gen.HsType import GHC.Tc.Utils.TcMType-import GHC.Core.Type ( extendTvSubstWithClone, piResultTys )-import GHC.Core.Predicate-import GHC.Core.Multiplicity import GHC.Tc.Types.Origin import GHC.Tc.Utils.TcType import GHC.Tc.Utils.Monad import GHC.Tc.TyCl.Build( TcMethInfo )++import GHC.Core.Type ( extendTvSubstWithClone, piResultTys )+import GHC.Core.Predicate+import GHC.Core.Multiplicity import GHC.Core.Class import GHC.Core.Coercion ( pprCoAxiom )-import GHC.Driver.Session-import GHC.Tc.Instance.Family import GHC.Core.FamInstEnv+import GHC.Core.TyCon++import GHC.Driver.DynFlags+ import GHC.Types.Error import GHC.Types.Id import GHC.Types.Name@@ -58,13 +61,14 @@ import GHC.Types.Var import GHC.Types.Var.Env ( lookupVarEnv ) import GHC.Types.SourceFile (HscSource(..))+import GHC.Types.SrcLoc+import GHC.Types.Basic+ import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Panic.Plain-import GHC.Types.SrcLoc-import GHC.Core.TyCon+ import GHC.Data.Maybe-import GHC.Types.Basic import GHC.Data.Bag import GHC.Data.BooleanFormula @@ -597,6 +601,8 @@ -- hs-boot and signatures never need to provide complete "definitions" -- of any sort, as they aren't really defining anything, but just -- constraining items which are defined elsewhere.- ; let dia = TcRnNoExplicitAssocTypeOrDefaultDeclaration name- ; diagnosticTc (warn && hsc_src == HsSrcFile) dia+ ; let diag = TcRnIllegalInstance $ IllegalFamilyInstance+ $ InvalidAssoc $ InvalidAssocInstance+ $ AssocInstanceMissing name+ ; diagnosticTc (warn && hsc_src == HsSrcFile) diag }
GHC/Tc/TyCl/Instance.hs view
@@ -6,6 +6,7 @@ {-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wno-incomplete-record-updates #-}@@ -21,6 +22,7 @@ import GHC.Prelude import GHC.Hs+import GHC.Rename.Bind ( rejectBootDecls ) import GHC.Tc.Errors.Types import GHC.Tc.Gen.Bind import GHC.Tc.TyCl@@ -32,7 +34,8 @@ import GHC.Tc.Gen.Sig import GHC.Tc.Utils.Monad import GHC.Tc.Validity-import GHC.Tc.Utils.Zonk+import GHC.Tc.Zonk.Type+import GHC.Tc.Zonk.TcType import GHC.Tc.Utils.TcMType import GHC.Tc.Utils.TcType import GHC.Tc.Types.Constraint@@ -48,6 +51,7 @@ import GHC.Tc.Utils.Env import GHC.Tc.Gen.HsType import GHC.Tc.Utils.Unify+import GHC.Builtin.Names ( unsatisfiableIdName ) import GHC.Core ( Expr(..), mkApps, mkVarApps, mkLams ) import GHC.Core.Make ( nO_METHOD_BINDING_ERROR_ID ) import GHC.Core.Unfold.Make ( mkInlineUnfoldingWithArity, mkDFunUnfolding )@@ -67,11 +71,12 @@ import GHC.Data.Bag import GHC.Types.Basic import GHC.Types.Fixity-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Driver.Ppr import GHC.Utils.Logger import GHC.Data.FastString import GHC.Types.Id+import GHC.Types.SourceFile import GHC.Types.SourceText import GHC.Data.List.SetOps import GHC.Types.Name@@ -485,7 +490,7 @@ , cid_sigs = uprags, cid_tyfam_insts = ats , cid_overlap_mode = overlap_mode , cid_datafam_insts = adts }))- = setSrcSpanA loc $+ = setSrcSpanA loc $ addErrCtxt (instDeclCtxt1 hs_ty) $ do { dfun_ty <- tcHsClsInstType (InstDeclCtxt False) hs_ty ; let (tyvars, theta, clas, inst_tys) = tcSplitDFunTy dfun_ty@@ -552,11 +557,13 @@ all_insts = tyfam_insts ++ datafam_insts -- In hs-boot files there should be no bindings- ; let no_binds = isEmptyLHsBinds binds && null uprags- ; is_boot <- tcIsHsBootOrSig- ; failIfTc (is_boot && not no_binds) TcRnIllegalHsBootFileDecl-- ; return ( [inst_info], all_insts, deriv_infos ) }+ ; gbl_env <- getGblEnv;+ ; case tcg_src gbl_env of+ { HsSrcFile -> return ()+ ; HsBootOrSig boot_or_sig ->+ do { rejectBootDecls boot_or_sig BootBindsRn (bagToList binds)+ ; rejectBootDecls boot_or_sig BootInstanceSigs uprags } }+ ; return ([inst_info], all_insts, deriv_infos) } where defined_ats = mkNameSet (map (tyFamInstDeclName . unLoc) ats) `unionNameSet`@@ -586,11 +593,15 @@ tcAddTyFamInstCtxt decl $ do { let fam_lname = feqn_tycon eqn ; fam_tc <- tcLookupLocatedTyCon fam_lname- ; tcFamInstDeclChecks mb_clsinfo fam_tc+ ; tcFamInstDeclChecks mb_clsinfo IAmType fam_tc -- (0) Check it's an open type family- ; checkTc (isTypeFamilyTyCon fam_tc) (wrongKindOfFamily fam_tc)- ; checkTc (isOpenTypeFamilyTyCon fam_tc) (TcRnNotOpenFamily fam_tc)+ ; checkTc (isTypeFamilyTyCon fam_tc) $+ TcRnIllegalInstance $ IllegalFamilyInstance $+ FamilyCategoryMismatch fam_tc+ ; checkTc (isOpenTypeFamilyTyCon fam_tc) $+ TcRnIllegalInstance $ IllegalFamilyInstance $+ NotAnOpenFamilyTyCon fam_tc -- (1) do the work of verifying the synonym group -- For some reason we don't have a location for the equation@@ -609,24 +620,32 @@ ----------------------tcFamInstDeclChecks :: AssocInstInfo -> TyCon -> TcM ()+tcFamInstDeclChecks :: AssocInstInfo -> TypeOrData -> TyCon -> TcM () -- Used for both type and data families-tcFamInstDeclChecks mb_clsinfo fam_tc+tcFamInstDeclChecks mb_clsinfo ty_or_data fam_tc = do { -- Type family instances require -XTypeFamilies -- and can't (currently) be in an hs-boot file ; traceTc "tcFamInstDecl" (ppr fam_tc) ; type_families <- xoptM LangExt.TypeFamilies- ; is_boot <- tcIsHsBootOrSig -- Are we compiling an hs-boot file?- ; checkTc type_families (TcRnBadFamInstDecl fam_tc)- ; checkTc (not is_boot) TcRnBadBootFamInstDecl+ ; hs_src <- tcHscSource -- Are we compiling an hs-boot file?+ ; checkTc type_families (TcRnTyFamsDisabled (TyFamsDisabledInstance fam_tc))+ ; case hs_src of+ HsBootOrSig boot_or_sig ->+ addErrTc $ TcRnIllegalHsBootOrSigDecl boot_or_sig (BootFamInst fam_tc)+ HsSrcFile ->+ return () - -- Check that it is a family TyCon, and that- -- oplevel type instances are not for associated types.- ; checkTc (isFamilyTyCon fam_tc) (TcRnIllegalFamilyInstance fam_tc)+ -- Check that it is a family TyCon+ ; checkTc (isFamilyTyCon fam_tc) $+ TcRnIllegalInstance $ IllegalFamilyInstance $+ NotAFamilyTyCon ty_or_data fam_tc + -- Check that top-level type instances are not for associated types. ; when (isNotAssociated mb_clsinfo && -- Not in a class decl- isTyConAssoc fam_tc) -- but an associated type- (addErr $ TcRnMissingClassAssoc fam_tc)+ isTyConAssoc fam_tc) $ -- but an associated type+ addErr $ TcRnIllegalInstance $ IllegalFamilyInstance+ $ InvalidAssoc $ InvalidAssocInstance+ $ AssocInstanceNotInAClass fam_tc } {- Note [Associated type instances]@@ -681,10 +700,12 @@ tcAddDataFamInstCtxt decl $ do { fam_tc <- tcLookupLocatedTyCon lfam_name - ; tcFamInstDeclChecks mb_clsinfo fam_tc+ ; tcFamInstDeclChecks mb_clsinfo IAmData fam_tc -- Check that the family declaration is for the right kind- ; checkTc (isDataFamilyTyCon fam_tc) (wrongKindOfFamily fam_tc)+ ; checkTc (isDataFamilyTyCon fam_tc) $+ TcRnIllegalInstance $ IllegalFamilyInstance $+ FamilyCategoryMismatch fam_tc ; gadt_syntax <- dataDeclChecks fam_name hs_ctxt hs_cons -- Do /not/ check that the number of patterns = tyConArity fam_tc -- See [Arity of data families] in GHC.Core.FamInstEnv@@ -739,17 +760,21 @@ , text "eta_tcbs" <+> ppr eta_tcbs ] -- Zonk the patterns etc into the Type world- ; ze <- mkEmptyZonkEnv NoFlexi- ; (ze, ty_binders) <- zonkTyVarBindersX ze tc_ty_binders- ; res_kind <- zonkTcTypeToTypeX ze tc_res_kind- ; all_pats <- zonkTcTypesToTypesX ze all_pats- ; eta_pats <- zonkTcTypesToTypesX ze eta_pats- ; stupid_theta <- zonkTcTypesToTypesX ze stupid_theta- ; let zonked_post_eta_qtvs = map (lookupTyVarX ze) post_eta_qtvs- zonked_eta_tvs = map (lookupTyVarX ze) eta_tvs- -- All these qtvs are in ty_binders, and hence will be in- -- the ZonkEnv, ze. We need the zonked (TyVar) versions to- -- put in the CoAxiom that we are about to build.+ ; (ty_binders, res_kind, all_pats, eta_pats, stupid_theta,+ zonked_post_eta_qtvs, zonked_eta_tvs) <-+ initZonkEnv NoFlexi $+ runZonkBndrT (zonkTyVarBindersX tc_ty_binders) $ \ ty_binders ->+ do { res_kind <- zonkTcTypeToTypeX tc_res_kind+ ; all_pats <- zonkTcTypesToTypesX all_pats+ ; eta_pats <- zonkTcTypesToTypesX eta_pats+ ; stupid_theta <- zonkTcTypesToTypesX stupid_theta+ ; zonked_post_eta_qtvs <- mapM lookupTyVarX post_eta_qtvs+ ; zonked_eta_tvs <- mapM lookupTyVarX eta_tvs+ -- All these qtvs are in ty_binders, and hence will be in+ -- the ZonkEnv, ze. We need the zonked (TyVar) versions to+ -- put in the CoAxiom that we are about to build.+ ; return (ty_binders, res_kind, all_pats, eta_pats, stupid_theta,+ zonked_post_eta_qtvs, zonked_eta_tvs) } ; traceTc "tcDataFamInstDecl" $ vcat [ text "Fam tycon:" <+> ppr fam_tc@@ -948,11 +973,14 @@ -- the outer_tvs. See Note [Generalising in tcTyFamInstEqnGuts] ; reportUnsolvedEqualities skol_info final_tvs tclvl wanted - ; final_tvs <- zonkTcTyVarsToTcTyVars final_tvs- ; lhs_ty <- zonkTcType lhs_ty- ; master_res_kind <- zonkTcType master_res_kind- ; instance_res_kind <- zonkTcType instance_res_kind- ; stupid_theta <- zonkTcTypes stupid_theta+ ; (final_tvs,lhs_ty,master_res_kind,instance_res_kind,stupid_theta) <-+ liftZonkM $ do+ { final_tvs <- zonkTcTyVarsToTcTyVars final_tvs+ ; lhs_ty <- zonkTcType lhs_ty+ ; master_res_kind <- zonkTcType master_res_kind+ ; instance_res_kind <- zonkTcType instance_res_kind+ ; stupid_theta <- zonkTcTypes stupid_theta+ ; return (final_tvs,lhs_ty,master_res_kind,instance_res_kind,stupid_theta) } -- Check that res_kind is OK with checkDataKindSig. We need to -- check that it's ok because res_kind can come from a user-written@@ -1463,7 +1491,7 @@ ; sc_top_name <- newName (mkSuperDictAuxOcc n (getOccName cls)) ; sc_ev_id <- newEvVar sc_pred- ; addTcEvBind ev_binds_var $ mkWantedEvBind sc_ev_id sc_ev_tm+ ; addTcEvBind ev_binds_var $ mkWantedEvBind sc_ev_id True sc_ev_tm ; let sc_top_ty = tcMkDFunSigmaTy tyvars (map idType dfun_evs) sc_pred sc_top_id = mkLocalId sc_top_name ManyTy sc_top_ty export = ABE { abe_wrap = idHsWrapper@@ -1644,7 +1672,7 @@ it is the superclass of an unblocked dictionary (wrinkle (W1)), that is Paterson-smaller than the instance head. - This is implemented in GHC.Tc.Solver.Canonical.mk_strict_superclasses+ This is implemented in GHC.Tc.Solver.Dict.mk_strict_superclasses (in the mk_given_loc helper function). * Superclass "Wanted" constraints have CtOrigin of (ScOrigin NakedSc)@@ -1655,7 +1683,7 @@ origin. But if we apply an instance declaration, we can set the origin to (ScOrigin NotNakedSc), thus lifting any restrictions by making prohibitedSuperClassSolve return False. This happens- in GHC.Tc.Solver.Interact.checkInstanceOK.+ in GHC.Tc.Solver.Dict.checkInstanceOK. * (sc2) ScOrigin wanted constraints can't be solved from a superclass selection, except at a smaller type. This test is@@ -1668,12 +1696,12 @@ breaking their code going when upgrading to GHC 9.6. To this effect, we temporarily continue to allow the constraint solver to create these potentially non-terminating solutions, but emit a loud warning when doing so: see-GHC.Tc.Solver.Interact.tryLastResortProhibitedSuperclass.+GHC.Tc.Solver.Dict.tryLastResortProhibitedSuperclass. Users can silence the warning by manually adding the necessary constraint to the context. GHC will then keep this user-written Given, dropping the Given arising from superclass expansion which has greater SC depth, as explained in-Note [Replacement vs keeping] in GHC.Tc.Solver.Interact.+Note [Replacement vs keeping] in GHC.Tc.Solver.Dict. Note [Silent superclass arguments] (historical interest only) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1785,6 +1813,9 @@ hs_sig_fn = mkHsSigFun sigs inst_loc = getSrcSpan dfun_id + unsat_thetas =+ mapMaybe (\ id -> (id,) <$> isUnsatisfiableCt_maybe (idType id)) dfun_ev_vars+ ---------------------- tc_item :: ClassOpItem -> TcM (Id, LHsBind GhcTc, Maybe Implication) tc_item (sel_id, dm_info)@@ -1801,25 +1832,51 @@ tc_default :: Id -> DefMethInfo -> TcM (TcId, LHsBind GhcTc, Maybe Implication) - tc_default sel_id (Just (dm_name, _))- = do { (meth_bind, inline_prags) <- mkDefMethBind inst_loc dfun_id clas sel_id dm_name+ tc_default sel_id mb_dm = case mb_dm of++ -- If the instance has an "Unsatisfiable msg" context,+ -- add method bindings that use "unsatisfiable".+ --+ -- See Note [Implementation of Unsatisfiable constraints],+ -- in GHC.Tc.Errors, point (D).+ _ | (theta_id,unsat_msg) : _ <- unsat_thetas+ -> do { (meth_id, _) <- mkMethIds clas tyvars dfun_ev_vars+ inst_tys sel_id+ ; unsat_id <- tcLookupId unsatisfiableIdName+ -- Recall that unsatisfiable :: forall {rep} (msg :: ErrorMessage) (a :: TYPE rep). Unsatisfiable msg => a+ --+ -- So we need to instantiate the forall and pass the dictionary evidence.+ ; let meth_rhs = L inst_loc' $+ wrapId+ ( mkWpEvApps [EvExpr $ Var theta_id]+ <.> mkWpTyApps [getRuntimeRep meth_tau, unsat_msg, meth_tau])+ unsat_id+ meth_bind = mkVarBind meth_id $ mkLHsWrap lam_wrapper meth_rhs+ ; return (meth_id, meth_bind, Nothing) }++ Just (dm_name, _) ->+ do { (meth_bind, inline_prags) <- mkDefMethBind inst_loc dfun_id clas sel_id dm_name ; tcMethodBody skol_info clas tyvars dfun_ev_vars inst_tys dfun_ev_binds is_derived hs_sig_fn spec_inst_prags inline_prags sel_id meth_bind inst_loc } - tc_default sel_id Nothing -- No default method at all- = do { traceTc "tc_def: warn" (ppr sel_id)+ -- No default method+ Nothing ->+ do { traceTc "tc_def: warn" (ppr sel_id) ; (meth_id, _) <- mkMethIds clas tyvars dfun_ev_vars inst_tys sel_id ; dflags <- getDynFlags- ; let meth_bind = mkVarBind meth_id $- mkLHsWrap lam_wrapper (error_rhs dflags)+ -- Add a binding whose RHS is an error+ -- "No explicit nor default method for class operation 'meth'".+ ; let meth_rhs = error_rhs dflags+ meth_bind = mkVarBind meth_id $ mkLHsWrap lam_wrapper meth_rhs ; return (meth_id, meth_bind, Nothing) }+ where inst_loc' = noAnnSrcSpan inst_loc error_rhs dflags = L inst_loc'- $ HsApp noComments error_fun (error_msg dflags)+ $ HsApp noComments error_fun (error_msg dflags) error_fun = L inst_loc' $ wrapId (mkWpTyApps [ getRuntimeRep meth_tau, meth_tau])@@ -1829,13 +1886,18 @@ (unsafeMkByteString (error_string dflags)))) meth_tau = classMethodInstTy sel_id inst_tys error_string dflags = showSDoc dflags- (hcat [ppr inst_loc, vbar, ppr sel_id ])+ (hcat [ppr inst_loc, vbar, quotes (ppr sel_id) ]) lam_wrapper = mkWpTyLams tyvars <.> mkWpEvLams dfun_ev_vars ---------------------- -- Check if one of the minimal complete definitions is satisfied checkMinimalDefinition- = whenIsJust (isUnsatisfied methodExists (classMinimalDef clas)) $+ = when (null unsat_thetas) $+ -- Don't warn if there is an "Unsatisfiable" constraint in the context.+ --+ -- See Note [Implementation of Unsatisfiable constraints] in GHC.Tc.Errors,+ -- point (D).+ whenIsJust (isUnsatisfied methodExists (classMinimalDef clas)) $ warnUnsatisfiedMinimalDefinition methodExists meth = isJust (findMethodBind meth binds prag_fn)@@ -1907,17 +1969,15 @@ 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:+Instead, we take the following approach: -1. In tcMethods (which typechecks method bindings), disable- -Winaccessible-code.+1. In tcMethods (which typechecks method bindings), use 'setInGeneratedCode'. 2. When creating Implications during typechecking, record this flag (in ic_warn_inaccessible) at the time of creation. 3. After typechecking comes error reporting, where GHC must decide how to report inaccessible code to the user, on an Implication-by-Implication- basis. If an Implication's DynFlags indicate that -Winaccessible-code was- disabled, then don't bother reporting it. That's it!+ basis. If the ic_warn_inaccessible field of the Implication is False, then+ we don't bother reporting it. That's it! -} ------------------------@@ -2063,7 +2123,7 @@ poly_meth_ty = mkSpecSigmaTy tyvars theta local_meth_ty theta = map idType dfun_ev_vars -methSigCtxt :: Name -> TcType -> TcType -> TidyEnv -> TcM (TidyEnv, SDoc)+methSigCtxt :: Name -> TcType -> TcType -> TidyEnv -> ZonkM (TidyEnv, SDoc) methSigCtxt sel_name sig_ty meth_ty env0 = do { (env1, sig_ty) <- zonkTidyTcType env0 sig_ty ; (env2, meth_ty) <- zonkTidyTcType env1 meth_ty@@ -2166,7 +2226,7 @@ , tyConBinderForAllTyFlag tcb /= Inferred ] rhs = foldl' mk_vta (nlHsVar dm_name) visible_inst_tys bind = L (noAnnSrcSpan loc)- $ mkTopFunBind Generated fn+ $ mkTopFunBind (Generated SkipPmc) fn [mkSimpleMatch (mkPrefixFunRhs fn) [] rhs] ; liftIO (putDumpFileMaybe logger Opt_D_dump_deriv "Filling in method body"
GHC/Tc/TyCl/PatSyn.hs view
@@ -23,9 +23,10 @@ import GHC.Tc.Gen.Pat import GHC.Tc.Utils.Env import GHC.Tc.Utils.TcMType-import GHC.Tc.Utils.Zonk+import GHC.Tc.Zonk.Type import GHC.Tc.Errors.Types import GHC.Tc.Utils.Monad+import GHC.Tc.Zonk.TcType import GHC.Tc.Gen.Sig ( TcPragEnv, emptyPragEnv, completeSigFromId, lookupPragEnv , addInlinePrags, addInlinePragArity ) import GHC.Tc.Solver@@ -41,7 +42,6 @@ import GHC.Core.Predicate import GHC.Builtin.Types.Prim-import GHC.Types.Error import GHC.Types.Name import GHC.Types.Name.Set import GHC.Types.SrcLoc@@ -61,13 +61,14 @@ import GHC.Core.ConLike import GHC.Types.FieldLabel import GHC.Rename.Env-import GHC.Rename.Utils (wrapGenSpan)+import GHC.Rename.Utils (wrapGenSpan, isIrrefutableHsPatRn) import GHC.Data.Bag import GHC.Utils.Misc-import GHC.Driver.Session ( getDynFlags, xopt_FieldSelectors )+import GHC.Driver.DynFlags ( getDynFlags, xopt_FieldSelectors ) import Data.Maybe( mapMaybe ) import Control.Monad ( zipWithM ) import Data.List( partition, mapAccumL )+import Data.List.NonEmpty (NonEmpty, nonEmpty) {- ************************************************************************@@ -175,7 +176,7 @@ ; top_ev_binds <- checkNoErrs (simplifyTop residual) ; addTopEvBinds top_ev_binds $ - do { prov_dicts <- mapM zonkId prov_dicts+ do { prov_dicts <- liftZonkM $ mapM zonkId prov_dicts ; let filtered_prov_dicts = mkMinimalBySCs evVarPred prov_dicts -- Filtering: see Note [Remove redundant provided dicts] (prov_theta, prov_evs)@@ -184,22 +185,21 @@ -- Report coercions that escape -- 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) ]+ ; args <- liftZonkM $ mapM zonkId args+ ; let bad_arg arg = fmap (\bad_cos -> (arg, bad_cos)) $+ nonEmpty $+ dVarSetElems $+ filterDVarSet isId (tyCoVarsOfTypeDSet (idType arg))+ bad_args = mapMaybe bad_arg (args ++ prov_dicts) ; mapM_ dependentArgErr bad_args -- Report un-quantifiable type variables: -- see Note [Unquantified tyvars in a pattern synonym] ; dvs <- candidateQTyVarsOfTypes prov_theta- ; let mk_doc tidy_env+ ; let err_ctx tidy_env = do { (tidy_env2, theta) <- zonkTidyTcTypes tidy_env prov_theta- ; return ( tidy_env2- , sep [ text "the provided context:"- , pprTheta theta ] ) }- ; doNotQuantifyTyVars dvs mk_doc+ ; return ( tidy_env2, UninfTyCtx_ProvidedContext theta ) }+ ; doNotQuantifyTyVars dvs err_ctx ; traceTc "tcInferPatSynDecl }" $ (ppr name $$ ppr ex_tvs) ; rec_fields <- lookupConstructorFields name@@ -238,22 +238,11 @@ pred = evVarPred ev_id eq_con_args = [evId ev_id] -dependentArgErr :: (Id, DTyCoVarSet) -> TcM ()+dependentArgErr :: (Id, NonEmpty CoVar) -> TcM () -- See Note [Coercions that escape] dependentArgErr (arg, bad_cos) = failWithTc $ -- fail here: otherwise we get downstream errors- mkTcRnUnknownMessage $ mkPlainError noHints $- 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+ TcRnPatSynEscapedCoercion arg bad_cos {- Note [Type variables whose kind is captured] ~~-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -407,11 +396,7 @@ -- The existential 'x' should not appear in the result type -- Can't check this until we know P's arity (decl_arity above) ; let bad_tvs = filter (`elemVarSet` tyCoVarsOfType pat_ty) $ binderVars explicit_ex_bndrs- ; checkTc (null bad_tvs) $ mkTcRnUnknownMessage $ mkPlainError noHints $- hang (sep [ text "The result type of the signature for" <+> quotes (ppr name) <> comma- , text "namely" <+> quotes (ppr pat_ty) ])- 2 (text "mentions existential type variable" <> plural bad_tvs- <+> pprQuotedList bad_tvs)+ ; checkTc (null bad_tvs) $ TcRnPatSynExistentialInResult name pat_ty bad_tvs -- See Note [The pattern-synonym signature splitting rule] in GHC.Tc.Gen.Sig ; let univ_fvs = closeOverKinds $@@ -681,10 +666,7 @@ wrongNumberOfParmsErr :: Name -> Arity -> Arity -> TcM a wrongNumberOfParmsErr name decl_arity missing- = failWithTc $ mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Pattern synonym" <+> quotes (ppr name) <+> text "has"- <+> speakNOf decl_arity (text "argument"))- 2 (text "but its type signature has" <+> int missing <+> text "fewer arrows")+ = failWithTc $ TcRnPatSynArityMismatch name decl_arity missing ------------------------- -- Shared by both tcInferPatSyn and tcCheckPatSyn@@ -711,21 +693,25 @@ = do { -- Zonk everything. We are about to build a final PatSyn -- so there had better be no unification variables in there - ; ze <- mkEmptyZonkEnv NoFlexi- ; (ze, univ_tvs') <- zonkTyVarBindersX ze univ_tvs- ; req_theta' <- zonkTcTypesToTypesX ze req_theta- ; (ze, ex_tvs') <- zonkTyVarBindersX ze ex_tvs- ; prov_theta' <- zonkTcTypesToTypesX ze prov_theta- ; pat_ty' <- zonkTcTypeToTypeX ze pat_ty- ; arg_tys' <- zonkTcTypesToTypesX ze arg_tys+ (univ_tvs, req_theta, ex_tvs, prov_theta, arg_tys, pat_ty) <-+ initZonkEnv NoFlexi $+ runZonkBndrT (zonkTyVarBindersX univ_tvs) $ \ univ_tvs' ->+ do { req_theta' <- zonkTcTypesToTypesX req_theta+ ; runZonkBndrT (zonkTyVarBindersX ex_tvs) $ \ ex_tvs' ->+ do { prov_theta' <- zonkTcTypesToTypesX prov_theta+ ; pat_ty' <- zonkTcTypeToTypeX pat_ty+ ; arg_tys' <- zonkTcTypesToTypesX arg_tys - ; let (env1, univ_tvs) = tidyForAllTyBinders emptyTidyEnv univ_tvs'- (env2, ex_tvs) = tidyForAllTyBinders env1 ex_tvs'- req_theta = tidyTypes env2 req_theta'- prov_theta = tidyTypes env2 prov_theta'- arg_tys = tidyTypes env2 arg_tys'- pat_ty = tidyType env2 pat_ty'+ ; let (env1, univ_tvs) = tidyForAllTyBinders emptyTidyEnv univ_tvs'+ (env2, ex_tvs) = tidyForAllTyBinders env1 ex_tvs'+ req_theta = tidyTypes env2 req_theta'+ prov_theta = tidyTypes env2 prov_theta'+ arg_tys = tidyTypes env2 arg_tys'+ pat_ty = tidyType env2 pat_ty' + ; return (univ_tvs, req_theta,+ ex_tvs, prov_theta, arg_tys, pat_ty) } }+ ; traceTc "tc_patsyn_finish {" $ ppr (unLoc lname) $$ ppr (unLoc lpat') $$ ppr (univ_tvs, req_theta, req_ev_binds, req_dicts) $$@@ -822,21 +808,22 @@ args = map nlVarPat [scrutinee, cont, fail] lwpat = noLocA $ WildPat pat_ty- cases = if isIrrefutableHsPat dflags lpat+ cases = if isIrrefutableHsPatRn dflags lpat then [mkHsCaseAlt lpat cont'] else [mkHsCaseAlt lpat cont', mkHsCaseAlt lwpat fail']+ gen = Generated SkipPmc body = mkLHsWrap (mkWpLet req_ev_binds) $ L (getLoc lpat) $- HsCase noExtField (nlHsVar scrutinee) $+ HsCase PatSyn (nlHsVar scrutinee) $ MG{ mg_alts = L (l2l $ getLoc lpat) cases- , mg_ext = MatchGroupTc [unrestricted pat_ty] res_ty Generated+ , mg_ext = MatchGroupTc [unrestricted pat_ty] res_ty gen } body' = noLocA $ HsLam noExtField $ MG{ mg_alts = noLocA [mkSimpleMatch LambdaExpr args body]- , mg_ext = MatchGroupTc (map unrestricted [pat_ty, cont_ty, fail_ty]) res_ty Generated+ , mg_ext = MatchGroupTc (map unrestricted [pat_ty, cont_ty, fail_ty]) res_ty gen } match = mkMatch (mkPrefixFunRhs (L loc (idName patsyn_id))) [] (mkHsLams (rr_tv:res_tv:univ_tvs)@@ -844,7 +831,7 @@ (EmptyLocalBinds noExtField) mg :: MatchGroup GhcTc (LHsExpr GhcTc) mg = MG{ mg_alts = L (l2l $ getLoc match) [match]- , mg_ext = MatchGroupTc [] res_ty Generated+ , mg_ext = MatchGroupTc [] res_ty gen } matcher_arity = length req_theta + 3 -- See Note [Pragmas for pattern synonyms]@@ -923,11 +910,7 @@ = return emptyBag | Left why <- mb_match_group -- Can't invert the pattern- = setSrcSpan (getLocA lpat) $ failWithTc $ mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ hang (text "Invalid right-hand side of bidirectional pattern synonym"- <+> quotes (ppr ps_name) <> colon)- 2 why- , text "RHS pattern:" <+> ppr lpat ]+ = setSrcSpan (getLocA lpat) $ failWithTc $ TcRnPatSynInvalidRhs ps_name lpat args why | Right match_group <- mb_match_group -- Bidirectional = do { patsyn <- tcLookupPatSyn ps_name@@ -977,11 +960,11 @@ mb_match_group = case dir of ExplicitBidirectional explicit_mg -> Right explicit_mg- ImplicitBidirectional -> fmap mk_mg (tcPatToExpr ps_name args lpat)+ ImplicitBidirectional -> fmap mk_mg (tcPatToExpr args lpat) Unidirectional -> panic "tcPatSynBuilderBind" mk_mg :: LHsExpr GhcRn -> MatchGroup GhcRn (LHsExpr GhcRn)- mk_mg body = mkMatchGroup Generated (noLocA [builder_match])+ mk_mg body = mkMatchGroup (Generated SkipPmc) (noLocA [builder_match]) where builder_args = [L (na2la loc) (VarPat noExtField (L loc n)) | L loc n <- args]@@ -1021,8 +1004,8 @@ | need_dummy_arg = mkVisFunTyMany unboxedUnitTy ty | otherwise = ty -tcPatToExpr :: Name -> [LocatedN Name] -> LPat GhcRn- -> Either SDoc (LHsExpr GhcRn)+tcPatToExpr :: [LocatedN Name] -> LPat GhcRn+ -> Either PatSynInvalidRhsReason (LHsExpr GhcRn) -- Given a /pattern/, return an /expression/ that builds a value -- that matches the pattern. E.g. if the pattern is (Just [x]), -- the expression is (Just [x]). They look the same, but the@@ -1031,13 +1014,13 @@ -- -- Returns (Left r) if the pattern is not invertible, for reason r. -- See Note [Builder for a bidirectional pattern synonym]-tcPatToExpr name args pat = go pat+tcPatToExpr args pat = go pat where lhsVars = mkNameSet (map unLoc args) -- Make a prefix con for prefix and infix patterns for simplicity mkPrefixConExpr :: LocatedN Name -> [LPat GhcRn]- -> Either SDoc (HsExpr GhcRn)+ -> Either PatSynInvalidRhsReason (HsExpr GhcRn) mkPrefixConExpr lcon@(L loc _) pats = do { exprs <- mapM go pats ; let con = L (l2l loc) (HsVar noExtField lcon)@@ -1045,18 +1028,18 @@ } mkRecordConExpr :: LocatedN Name -> HsRecFields GhcRn (LPat GhcRn)- -> Either SDoc (HsExpr GhcRn)+ -> Either PatSynInvalidRhsReason (HsExpr GhcRn) mkRecordConExpr con (HsRecFields fields dd) = do { exprFields <- mapM go' fields ; return (RecordCon noExtField con (HsRecFields exprFields dd)) } - go' :: LHsRecField GhcRn (LPat GhcRn) -> Either SDoc (LHsRecField GhcRn (LHsExpr GhcRn))+ go' :: LHsRecField GhcRn (LPat GhcRn) -> Either PatSynInvalidRhsReason (LHsRecField GhcRn (LHsExpr GhcRn)) go' (L l rf) = L l <$> traverse go rf - go :: LPat GhcRn -> Either SDoc (LHsExpr GhcRn)+ go :: LPat GhcRn -> Either PatSynInvalidRhsReason (LHsExpr GhcRn) go (L loc p) = L loc <$> go1 p - go1 :: Pat GhcRn -> Either SDoc (HsExpr GhcRn)+ go1 :: Pat GhcRn -> Either PatSynInvalidRhsReason (HsExpr GhcRn) go1 (ConPat NoExtField con info) = case info of PrefixCon _ ps -> mkPrefixConExpr con ps@@ -1070,7 +1053,7 @@ | var `elemNameSet` lhsVars = return $ HsVar noExtField (L l var) | otherwise- = Left (quotes (ppr var) <+> text "is not bound by the LHS of the pattern synonym")+ = Left (PatSynUnboundVar var) go1 (ParPat _ lpar pat rpar) = fmap (\e -> HsPar noAnn lpar e rpar) $ go pat go1 (ListPat _ pats) = do { exprs <- mapM go pats@@ -1107,19 +1090,7 @@ go1 p@(AsPat {}) = notInvertible p go1 p@(NPlusKPat {}) = notInvertible p - notInvertible p = Left (not_invertible_msg p)-- not_invertible_msg p- = text "Pattern" <+> quotes (ppr p) <+> text "is not invertible"- $+$ hang (text "Suggestion: instead use an explicitly bidirectional"- <+> text "pattern synonym, e.g.")- 2 (hang (text "pattern" <+> pp_name <+> pp_args <+> larrow- <+> ppr pat <+> text "where")- 2 (pp_name <+> pp_args <+> equals <+> text "..."))- where- pp_name = ppr name- pp_args = hsep (map ppr args)-+ notInvertible p = Left (PatSynNotInvertible p) {- Note [Builder for a bidirectional pattern synonym] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GHC/Tc/TyCl/Utils.hs view
@@ -64,17 +64,16 @@ import GHC.Unit.Module -import GHC.Rename.Utils (wrapGenSpan)+import GHC.Rename.Utils (genHsVar, genLHsApp, genLHsLit, genWildPat) import GHC.Types.Basic-import GHC.Types.Error import GHC.Types.FieldLabel import GHC.Types.SrcLoc import GHC.Types.SourceFile import GHC.Types.SourceText import GHC.Types.Name import GHC.Types.Name.Env-import GHC.Types.Name.Reader ( mkVarUnqual )+import GHC.Types.Name.Reader ( mkRdrUnqual ) import GHC.Types.Id import GHC.Types.Id.Info import GHC.Types.Var.Env@@ -170,7 +169,7 @@ -- track of the TyCons which are known to be acyclic, or -- a failure message reporting that a cycle was found. newtype SynCycleM a = SynCycleM {- runSynCycleM :: SynCycleState -> Either (SrcSpan, SDoc) (a, SynCycleState) }+ runSynCycleM :: SynCycleState -> Either (SrcSpan, TySynCycleTyCons) (a, SynCycleState) } deriving (Functor) -- TODO: TyConSet is implemented as IntMap over uniques.@@ -190,8 +189,8 @@ runSynCycleM (f x) state' Left err -> Left err -failSynCycleM :: SrcSpan -> SDoc -> SynCycleM ()-failSynCycleM loc err = SynCycleM $ \_ -> Left (loc, err)+failSynCycleM :: SrcSpan -> TySynCycleTyCons -> SynCycleM ()+failSynCycleM loc seen_tcs = SynCycleM $ \_ -> Left (loc, seen_tcs) -- | Test if a 'Name' is acyclic, short-circuiting if we've -- seen it already.@@ -211,7 +210,7 @@ checkSynCycles :: Unit -> [TyCon] -> [LTyClDecl GhcRn] -> TcM () checkSynCycles this_uid tcs tyclds = case runSynCycleM (mapM_ (go emptyTyConSet []) tcs) emptyTyConSet of- Left (loc, err) -> setSrcSpan loc $ failWithTc (mkTcRnUnknownMessage $ mkPlainError noHints err)+ Left (loc, err) -> setSrcSpan loc $ failWithTc (TcRnTypeSynonymCycle err) Right _ -> return () where -- Try our best to print the LTyClDecl for locally defined things@@ -228,9 +227,7 @@ go' :: TyConSet -> [TyCon] -> TyCon -> SynCycleM () go' so_far seen_tcs tc | tc `elemTyConSet` so_far- = failSynCycleM (getSrcSpan (head seen_tcs)) $- sep [ text "Cycle in type synonym declarations:"- , nest 2 (vcat (map ppr_decl seen_tcs)) ]+ = failSynCycleM (getSrcSpan (head seen_tcs)) (lookup_decl <$> seen_tcs) -- Optimization: we don't allow cycles through external packages, -- so once we find a non-local name we are guaranteed to not -- have a cycle.@@ -247,13 +244,10 @@ where n = tyConName tc mod = nameModule n- ppr_decl tc =- case lookupNameEnv lcl_decls n of- Just (L loc decl) -> ppr (locA loc) <> colon <+> ppr decl- Nothing -> ppr (getSrcSpan n) <> colon <+> ppr n- <+> text "from external module"- where- n = tyConName tc+ lookup_decl tc =+ case lookupNameEnv lcl_decls (tyConName tc) of+ Just decl -> Right decl+ Nothing -> Left tc go_ty :: TyConSet -> [TyCon] -> Type -> SynCycleM () go_ty so_far seen_tcs ty =@@ -307,19 +301,14 @@ type ClassSet = UniqSet Class -checkClassCycles :: Class -> Maybe SDoc+checkClassCycles :: Class -> Maybe SuperclassCycle -- Nothing <=> ok -- Just err <=> possible cycle error checkClassCycles cls- = do { (definite_cycle, err) <- go (unitUniqSet cls)+ = do { (definite_cycle, details) <- go (unitUniqSet cls) cls (mkTyVarTys (classTyVars cls))- ; let herald | definite_cycle = text "Superclass cycle for"- | otherwise = text "Potential superclass cycle for"- ; return (vcat [ herald <+> quotes (ppr cls)- , nest 2 err, hint]) }+ ; return (MkSuperclassCycle cls definite_cycle details) } where- hint = text "Use UndecidableSuperClasses to accept this"- -- Expand superclasses starting with (C a b), complaining -- if you find the same class a second time, or a type function -- or predicate headed by a type variable@@ -327,12 +316,12 @@ -- NB: this code duplicates TcType.transSuperClasses, but -- with more error message generation clobber -- Make sure the two stay in sync.- go :: ClassSet -> Class -> [Type] -> Maybe (Bool, SDoc)+ go :: ClassSet -> Class -> [Type] -> Maybe (Bool, [SuperclassCycleDetail]) go so_far cls tys = firstJusts $ map (go_pred so_far) $ immSuperClasses cls tys - go_pred :: ClassSet -> PredType -> Maybe (Bool, SDoc)+ go_pred :: ClassSet -> PredType -> Maybe (Bool, [SuperclassCycleDetail]) -- Nothing <=> ok -- Just (True, err) <=> definite cycle -- Just (False, err) <=> possible cycle@@ -340,31 +329,28 @@ | Just (tc, tys) <- tcSplitTyConApp_maybe pred = go_tc so_far pred tc tys | hasTyVarHead pred- = Just (False, hang (text "one of whose superclass constraints is headed by a type variable:")- 2 (quotes (ppr pred)))+ = Just (False, [SCD_HeadTyVar pred]) | otherwise = Nothing - go_tc :: ClassSet -> PredType -> TyCon -> [Type] -> Maybe (Bool, SDoc)+ go_tc :: ClassSet -> PredType -> TyCon -> [Type] -> Maybe (Bool, [SuperclassCycleDetail]) go_tc so_far pred tc tys | isFamilyTyCon tc- = Just (False, hang (text "one of whose superclass constraints is headed by a type family:")- 2 (quotes (ppr pred)))+ = Just (False, [SCD_HeadTyFam pred]) | Just cls <- tyConClass_maybe tc = go_cls so_far cls tys | otherwise -- Equality predicate, for example = Nothing - go_cls :: ClassSet -> Class -> [Type] -> Maybe (Bool, SDoc)+ go_cls :: ClassSet -> Class -> [Type] -> Maybe (Bool, [SuperclassCycleDetail]) go_cls so_far cls tys | cls `elementOfUniqSet` so_far- = Just (True, text "one of whose superclasses is" <+> quotes (ppr cls))+ = Just (True, [SCD_Superclass cls]) | isCTupleClass cls = go so_far cls tys | otherwise- = do { (b,err) <- go (so_far `addOneToUniqSet` cls) cls tys- ; return (b, text "one of whose superclasses is" <+> quotes (ppr cls)- $$ err) }+ = do { (b, details) <- go (so_far `addOneToUniqSet` cls) cls tys+ ; return (b, SCD_Superclass cls : details) } {- ************************************************************************@@ -898,7 +884,9 @@ sel_name = flSelector fl sel_id = mkExportedLocalId rec_details sel_name sel_ty- rec_details = RecSelId { sel_tycon = idDetails, sel_naughty = is_naughty }+ rec_details = RecSelId { sel_tycon = idDetails+ , sel_naughty = is_naughty+ , sel_fieldLabel = fl } -- Find a representative constructor, con1 cons_w_field = conLikesWithFields all_cons [lbl]@@ -942,7 +930,7 @@ -- make the binding: sel (C2 { fld = x }) = x -- sel (C7 { fld = x }) = x -- where cons_w_field = [C2,C7]- sel_bind = mkTopFunBind Generated sel_lname alts+ sel_bind = mkTopFunBind (Generated SkipPmc) sel_lname alts where alts | is_naughty = [mkSimpleMatch (mkPrefixFunRhs sel_lname) [] unit_rhs]@@ -956,7 +944,7 @@ { hfbAnn = noAnn , hfbLHS = L locc (FieldOcc sel_name- (L locn $ mkVarUnqual (field_label lbl)))+ (L locn $ mkRdrUnqual (nameOccName sel_name))) , hfbRHS = L loc' (VarPat noExtField (L locn field_var)) , hfbPun = False })@@ -968,11 +956,10 @@ -- mentions this particular record selector deflt | all dealt_with all_cons = [] | otherwise = [mkSimpleMatch CaseAlt- [wrapGenSpan (WildPat noExtField)]- (wrapGenSpan- (HsApp noComments- (wrapGenSpan (HsVar noExtField (wrapGenSpan (getName rEC_SEL_ERROR_ID))))- (wrapGenSpan (HsLit noComments msg_lit))))]+ [genWildPat]+ (genLHsApp+ (genHsVar (getName rEC_SEL_ERROR_ID))+ (genLHsLit msg_lit))] -- Do not add a default case unless there are unmatched -- constructors. We must take account of GADTs, else we
GHC/Tc/Types.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE PatternSynonyms #-}@@ -29,7 +30,7 @@ -- The environment types Env(..),- TcGblEnv(..), TcLclEnv(..),+ TcGblEnv(..), TcLclEnv(..), modifyLclCtxt, TcLclCtxt(..), setLclEnvTcLevel, getLclEnvTcLevel, setLclEnvLoc, getLclEnvLoc, lclEnvInGeneratedCode, IfGblEnv(..), IfLclEnv(..),@@ -40,9 +41,9 @@ FrontendResult(..), -- Renamer types- ErrCtxt, RecFieldEnv, pushErrCtxt, pushErrCtxtSameOrigin,+ ErrCtxt, ImportAvails(..), emptyImportAvails, plusImportAvails,- WhereFrom(..), mkModDeps,+ mkModDeps, -- Typechecker types TcTypeEnv, TcBinderStack, TcBinder(..),@@ -56,7 +57,7 @@ CompleteMatch, CompleteMatches, -- Template Haskell- ThStage(..), SpliceType(..), PendingStuff(..),+ ThStage(..), SpliceType(..), SpliceOrBracket(..), PendingStuff(..), topStage, topAnnStage, topSpliceStage, ThLevel, impLevel, outerLevel, thLevel, ForeignSrcLang(..), THDocs, DocLoc(..),@@ -71,7 +72,7 @@ isPartialSig, hasCompleteSig, -- Misc other types- TcId, TcIdSet,+ TcId, NameShape(..), removeBindingShadowing, getPlatform,@@ -102,31 +103,35 @@ import GHC.Platform import GHC.Driver.Env+import GHC.Driver.Env.KnotVars import GHC.Driver.Config.Core.Lint-import GHC.Driver.Session+import GHC.Driver.DynFlags import {-# SOURCE #-} GHC.Driver.Hooks +import GHC.Linker.Types+ import GHC.Hs import GHC.Tc.Utils.TcType import GHC.Tc.Types.Constraint-import GHC.Tc.Types.Origin import GHC.Tc.Types.Evidence-import {-# SOURCE #-} GHC.Tc.Errors.Hole.FitTypes ( HoleFitPlugin )+import GHC.Tc.Types.TH+import GHC.Tc.Types.TcRef+import GHC.Tc.Types.LclEnv+import GHC.Tc.Types.BasicTypes+import GHC.Tc.Types.ErrCtxt+import {-# SOURCE #-} GHC.Tc.Errors.Hole.Plugin ( HoleFitPlugin ) import GHC.Tc.Errors.Types import GHC.Core.Reduction ( Reduction(..) ) import GHC.Core.Type-import GHC.Core.TyCon ( TyCon, tyConKind )+import GHC.Core.TyCon ( TyCon ) import GHC.Core.PatSyn ( PatSyn ) import GHC.Core.Lint ( lintAxioms )-import GHC.Core.UsageEnv import GHC.Core.InstEnv import GHC.Core.FamInstEnv import GHC.Core.Predicate -import GHC.Types.Id ( idType, idName )-import GHC.Types.FieldLabel ( FieldLabel ) import GHC.Types.Fixity.Env import GHC.Types.Annotations import GHC.Types.CompleteMatch@@ -136,12 +141,9 @@ import GHC.Types.Name.Set import GHC.Types.Avail import GHC.Types.Var-import GHC.Types.Var.Env import GHC.Types.TypeEnv-import GHC.Types.TyThing import GHC.Types.SourceFile import GHC.Types.SrcLoc-import GHC.Types.Var.Set import GHC.Types.Unique.FM import GHC.Types.Basic import GHC.Types.CostCentre.State@@ -159,24 +161,21 @@ import GHC.Utils.Error import GHC.Utils.Outputable import GHC.Utils.Fingerprint-import GHC.Utils.Misc import GHC.Utils.Panic import GHC.Utils.Logger import GHC.Builtin.Names ( isUnboundName ) +import GHCi.Message+import GHCi.RemoteTypes+ import Data.Set ( Set ) import qualified Data.Set as S-import Data.Map ( Map ) import Data.Dynamic ( Dynamic )+import Data.Map ( Map ) import Data.Typeable ( TypeRep ) import Data.Maybe ( mapMaybe )-import GHCi.Message-import GHCi.RemoteTypes -import qualified Language.Haskell.TH as TH-import GHC.Driver.Env.KnotVars-import GHC.Linker.Types -- | A 'NameShape' is a substitution on 'Name's that can be used -- to refine the identities of a hole while we are renaming interfaces@@ -245,7 +244,7 @@ -- Includes all info about imported things -- BangPattern is to fix leak, see #15111 - env_ut :: {-# UNPACK #-} !Char, -- Tag for Uniques+ env_um :: {-# UNPACK #-} !Char, -- Mask for Uniques env_gbl :: gbl, -- Info about things defined at the top level -- of the module being compiled@@ -442,9 +441,7 @@ tcg_default :: Maybe [Type], -- ^ Types used for defaulting. @Nothing@ => no @default@ decl - tcg_fix_env :: FixityEnv, -- ^ Just for things in this module- tcg_field_env :: RecFieldEnv, -- ^ Just for things in this module- -- See Note [The interactive package] in "GHC.Runtime.Context"+ tcg_fix_env :: FixityEnv, -- ^ Just for things in this module tcg_type_env :: TypeEnv, -- ^ Global type env for the module we are compiling now. All@@ -509,6 +506,8 @@ -- See Note [Tracking unused binding and imports] tcg_dus :: DefUses, tcg_used_gres :: TcRef [GlobalRdrElt],+ -- ^ INVARIANT: all these GREs were imported; that is,+ -- they all have a non-empty gre_imp field. tcg_keep :: TcRef NameSet, tcg_th_used :: TcRef Bool,@@ -687,22 +686,10 @@ instance ContainsModule TcGblEnv where extractModule env = tcg_semantic_mod env -type RecFieldEnv = NameEnv [FieldLabel]- -- Maps a constructor name *in this module*- -- to the fields for that constructor.- -- This is used when dealing with ".." notation in record- -- construction and pattern matching.- -- The FieldEnv deals *only* with constructors defined in *this*- -- module. For imported modules, we get the same info from the- -- TypeEnv- data SelfBootInfo = NoSelfBoot -- No corresponding hi-boot file | SelfBoot- { sb_mds :: ModDetails -- There was a hi-boot file,- , sb_tcs :: NameSet } -- defining these TyCons,--- What is sb_tcs used for? See Note [Extra dependencies from .hs-boot files]--- in GHC.Rename.Module+ { sb_mds :: ModDetails } -- There was a hi-boot file bootExports :: SelfBootInfo -> NameSet bootExports boot =@@ -785,118 +772,9 @@ * GHC.Rename.Names.reportUnusedNames. Where newtype data constructors like (d) are imported, we don't want to report them as unused.---************************************************************************-* *- The local typechecker environment-* *-************************************************************************--Note [The Global-Env/Local-Env story]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-During type checking, we keep in the tcg_type_env- * All types and classes- * All Ids derived from types and classes (constructors, selectors)--At the end of type checking, we zonk the local bindings,-and as we do so we add to the tcg_type_env- * Locally defined top-level Ids--Why? Because they are now Ids not TcIds. This final GlobalEnv is- a) fed back (via the knot) to typechecking the- unfoldings of interface signatures- b) used in the ModDetails of this module -} -data TcLclEnv -- Changes as we move inside an expression- -- Discarded after typecheck/rename; not passed on to desugarer- = TcLclEnv {- tcl_loc :: RealSrcSpan, -- Source span- tcl_ctxt :: [ErrCtxt], -- Error context, innermost on top- tcl_in_gen_code :: Bool, -- See Note [Rebindable syntax and HsExpansion]- tcl_tclvl :: TcLevel, - tcl_th_ctxt :: ThStage, -- Template Haskell context- tcl_th_bndrs :: ThBindEnv, -- and binder info- -- The ThBindEnv records the TH binding level of in-scope Names- -- defined in this module (not imported)- -- We can't put this info in the TypeEnv because it's needed- -- (and extended) in the renamer, for untyped splices-- tcl_arrow_ctxt :: ArrowCtxt, -- Arrow-notation context-- tcl_rdr :: LocalRdrEnv, -- Local name envt- -- Maintained during renaming, of course, but also during- -- type checking, solely so that when renaming a Template-Haskell- -- splice we have the right environment for the renamer.- --- -- Does *not* include global name envt; may shadow it- -- Includes both ordinary variables and type variables;- -- they are kept distinct because tyvar have a different- -- occurrence constructor (Name.TvOcc)- -- We still need the unsullied global name env so that- -- we can look up record field names-- tcl_env :: TcTypeEnv, -- The local type environment:- -- Ids and TyVars defined in this module-- tcl_usage :: TcRef UsageEnv, -- Required multiplicity of bindings is accumulated here.--- tcl_bndrs :: TcBinderStack, -- Used for reporting relevant bindings,- -- and for tidying types-- tcl_lie :: TcRef WantedConstraints, -- Place to accumulate type constraints- tcl_errs :: TcRef (Messages TcRnMessage) -- Place to accumulate diagnostics- }--setLclEnvTcLevel :: TcLclEnv -> TcLevel -> TcLclEnv-setLclEnvTcLevel env lvl = env { tcl_tclvl = lvl }--getLclEnvTcLevel :: TcLclEnv -> TcLevel-getLclEnvTcLevel = tcl_tclvl--setLclEnvLoc :: TcLclEnv -> RealSrcSpan -> TcLclEnv-setLclEnvLoc env loc = env { tcl_loc = loc }--getLclEnvLoc :: TcLclEnv -> RealSrcSpan-getLclEnvLoc = tcl_loc--lclEnvInGeneratedCode :: TcLclEnv -> Bool-lclEnvInGeneratedCode = tcl_in_gen_code--type ErrCtxt = (Bool, TidyEnv -> TcM (TidyEnv, SDoc))- -- Monadic so that we have a chance- -- to deal with bound type variables just before error- -- message construction-- -- Bool: True <=> this is a landmark context; do not- -- discard it when trimming for display---- These are here to avoid module loops: one might expect them--- in GHC.Tc.Types.Constraint, but they refer to ErrCtxt which refers to TcM.--- Easier to just keep these definitions here, alongside TcM.-pushErrCtxt :: CtOrigin -> ErrCtxt -> CtLoc -> CtLoc-pushErrCtxt o err loc@(CtLoc { ctl_env = lcl })- = loc { ctl_origin = o, ctl_env = lcl { tcl_ctxt = err : tcl_ctxt lcl } }--pushErrCtxtSameOrigin :: ErrCtxt -> CtLoc -> CtLoc--- Just add information w/o updating the origin!-pushErrCtxtSameOrigin err loc@(CtLoc { ctl_env = lcl })- = loc { ctl_env = lcl { tcl_ctxt = err : tcl_ctxt lcl } }--type TcTypeEnv = NameEnv TcTyThing--type ThBindEnv = NameEnv (TopLevelFlag, ThLevel)- -- Domain = all Ids bound in this module (ie not imported)- -- The TopLevelFlag tells if the binding is syntactically top level.- -- We need to know this, because the cross-stage persistence story allows- -- cross-stage at arbitrary types if the Id is bound at top level.- --- -- Nota bene: a ThLevel of 'outerLevel' is *not* the same as being- -- bound at top level! See Note [Template Haskell levels] in GHC.Tc.Gen.Splice- {- Note [Given Insts] ~~~~~~~~~~~~~~~~~~ Because of GADTs, we have to pass inwards the Insts provided by type signatures@@ -911,54 +789,7 @@ -} --- | Type alias for 'IORef'; the convention is we'll use this for mutable--- bits of data in 'TcGblEnv' which are updated during typechecking and--- returned at the end.-type TcRef a = IORef a--- ToDo: when should I refer to it as a 'TcId' instead of an 'Id'?-type TcId = Id-type TcIdSet = IdSet ------------------------------- The TcBinderStack------------------------------type TcBinderStack = [TcBinder]- -- This is a stack of locally-bound ids and tyvars,- -- innermost on top- -- Used only in error reporting (relevantBindings in TcError),- -- and in tidying- -- We can't use the tcl_env type environment, because it doesn't- -- keep track of the nesting order--data TcBinder- = TcIdBndr- TcId- TopLevelFlag -- Tells whether the binding is syntactically top-level- -- (The monomorphic Ids for a recursive group count- -- as not-top-level for this purpose.)-- | TcIdBndr_ExpType -- Variant that allows the type to be specified as- -- an ExpType- Name- ExpType- TopLevelFlag-- | TcTvBndr -- e.g. case x of P (y::a) -> blah- Name -- We bind the lexical name "a" to the type of y,- TyVar -- which might be an utterly different (perhaps- -- existential) tyvar--instance Outputable TcBinder where- ppr (TcIdBndr id top_lvl) = ppr id <> brackets (ppr top_lvl)- ppr (TcIdBndr_ExpType id _ top_lvl) = ppr id <> brackets (ppr top_lvl)- ppr (TcTvBndr name tv) = ppr name <+> ppr tv--instance HasOccName TcBinder where- occName (TcIdBndr id _) = occName (idName id)- occName (TcIdBndr_ExpType name _ _) = occName name- occName (TcTvBndr name _) = occName name- -- fixes #12177 -- Builds up a list of bindings whose OccName has not been seen before -- i.e., If ys = removeBindingShadowing xs@@ -981,104 +812,7 @@ getPlatform :: TcRnIf a b Platform getPlatform = targetPlatform <$> getDynFlags ------------------------------- Template Haskell stages and levels---------------------------- -data SpliceType = Typed | Untyped--data ThStage -- See Note [Template Haskell state diagram]- -- and Note [Template Haskell levels] in GHC.Tc.Gen.Splice- -- Start at: Comp- -- At bracket: wrap current stage in Brack- -- At splice: currently Brack: return to previous stage- -- currently Comp/Splice: compile and run- = Splice SpliceType -- Inside a top-level splice- -- This code will be run *at compile time*;- -- the result replaces the splice- -- Binding level = 0-- | RunSplice (TcRef [ForeignRef (TH.Q ())])- -- Set when running a splice, i.e. NOT when renaming or typechecking the- -- Haskell code for the splice. See Note [RunSplice ThLevel].- --- -- Contains a list of mod finalizers collected while executing the splice.- --- -- 'addModFinalizer' inserts finalizers here, and from here they are taken- -- to construct an @HsSpliced@ annotation for untyped splices. See Note- -- [Delaying modFinalizers in untyped splices] in GHC.Rename.Splice.- --- -- For typed splices, the typechecker takes finalizers from here and- -- inserts them in the list of finalizers in the global environment.- --- -- See Note [Collecting modFinalizers in typed splices] in "GHC.Tc.Gen.Splice".-- | Comp -- Ordinary Haskell code- -- Binding level = 1-- | Brack -- Inside brackets- ThStage -- Enclosing stage- PendingStuff--data PendingStuff- = RnPendingUntyped -- Renaming the inside of an *untyped* bracket- (TcRef [PendingRnSplice]) -- Pending splices in here-- | RnPendingTyped -- Renaming the inside of a *typed* bracket-- | TcPending -- Typechecking the inside of a typed bracket- (TcRef [PendingTcSplice]) -- Accumulate pending splices here- (TcRef WantedConstraints) -- and type constraints here- QuoteWrapper -- A type variable and evidence variable- -- for the overall monad of- -- the bracket. Splices are checked- -- against this monad. The evidence- -- variable is used for desugaring- -- `lift`.---topStage, topAnnStage, topSpliceStage :: ThStage-topStage = Comp-topAnnStage = Splice Untyped-topSpliceStage = Splice Untyped--instance Outputable ThStage where- ppr (Splice _) = text "Splice"- ppr (RunSplice _) = text "RunSplice"- ppr Comp = text "Comp"- ppr (Brack s _) = text "Brack" <> parens (ppr s)--type ThLevel = Int- -- NB: see Note [Template Haskell levels] in GHC.Tc.Gen.Splice- -- Incremented when going inside a bracket,- -- decremented when going inside a splice- -- NB: ThLevel is one greater than the 'n' in Fig 2 of the- -- original "Template meta-programming for Haskell" paper--impLevel, outerLevel :: ThLevel-impLevel = 0 -- Imported things; they can be used inside a top level splice-outerLevel = 1 -- Things defined outside brackets--thLevel :: ThStage -> ThLevel-thLevel (Splice _) = 0-thLevel Comp = 1-thLevel (Brack s _) = thLevel s + 1-thLevel (RunSplice _) = panic "thLevel: called when running a splice"- -- See Note [RunSplice ThLevel].--{- Note [RunSplice ThLevel]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The 'RunSplice' stage is set when executing a splice, and only when running a-splice. In particular it is not set when the splice is renamed or typechecked.--'RunSplice' is needed to provide a reference where 'addModFinalizer' can insert-the finalizer (see Note [Delaying modFinalizers in untyped splices]), and-'addModFinalizer' runs when doing Q things. Therefore, It doesn't make sense to-set 'RunSplice' when renaming or typechecking the splice, where 'Splice',-'Brack' or 'Comp' are used instead.---}- --------------------------- -- Arrow-notation context ---------------------------@@ -1116,237 +850,6 @@ from further out in the ArrowCtxt that we push inwards. -} -data ArrowCtxt -- Note [Escaping the arrow scope]- = NoArrowCtxt- | ArrowCtxt LocalRdrEnv (TcRef WantedConstraints)--------------------------------- TcTyThing-------------------------------- | A typecheckable thing available in a local context. Could be--- 'AGlobal' 'TyThing', but also lexically scoped variables, etc.--- See "GHC.Tc.Utils.Env" for how to retrieve a 'TyThing' given a 'Name'.-data TcTyThing- = AGlobal TyThing -- Used only in the return type of a lookup-- | ATcId -- Ids defined in this module; may not be fully zonked- { tct_id :: TcId- , tct_info :: IdBindingInfo -- See Note [Meaning of IdBindingInfo]- }-- | ATyVar Name TcTyVar -- See Note [Type variables in the type environment]-- | ATcTyCon TyCon -- Used temporarily, during kind checking, for the- -- tycons and classes in this recursive group- -- The TyCon is always a TcTyCon. Its kind- -- can be a mono-kind or a poly-kind; in TcTyClsDcls see- -- Note [Type checking recursive type and class declarations]-- | APromotionErr PromotionErr---- | Matches on either a global 'TyCon' or a 'TcTyCon'.-tcTyThingTyCon_maybe :: TcTyThing -> Maybe TyCon-tcTyThingTyCon_maybe (AGlobal (ATyCon tc)) = Just tc-tcTyThingTyCon_maybe (ATcTyCon tc_tc) = Just tc_tc-tcTyThingTyCon_maybe _ = Nothing--instance Outputable TcTyThing where -- Debugging only- ppr (AGlobal g) = ppr g- ppr elt@(ATcId {}) = text "Identifier" <>- brackets (ppr (tct_id elt) <> dcolon- <> ppr (varType (tct_id elt)) <> comma- <+> ppr (tct_info elt))- ppr (ATyVar n tv) = text "Type variable" <+> quotes (ppr n) <+> equals <+> ppr tv- <+> dcolon <+> ppr (varType tv)- ppr (ATcTyCon tc) = text "ATcTyCon" <+> ppr tc <+> dcolon <+> ppr (tyConKind tc)- ppr (APromotionErr err) = text "APromotionErr" <+> ppr err---- | IdBindingInfo describes how an Id is bound.------ It is used for the following purposes:--- a) for static forms in 'GHC.Tc.Gen.Expr.checkClosedInStaticForm' and--- b) to figure out when a nested binding can be generalised,--- in 'GHC.Tc.Gen.Bind.decideGeneralisationPlan'.----data IdBindingInfo -- See Note [Meaning of IdBindingInfo]- = NotLetBound- | ClosedLet- | NonClosedLet- RhsNames -- Used for (static e) checks only- ClosedTypeId -- Used for generalisation checks- -- and for (static e) checks---- | IsGroupClosed describes a group of mutually-recursive bindings-data IsGroupClosed- = IsGroupClosed- (NameEnv RhsNames) -- Free var info for the RHS of each binding in the group- -- Used only for (static e) checks-- ClosedTypeId -- True <=> all the free vars of the group are- -- imported or ClosedLet or- -- NonClosedLet with ClosedTypeId=True.- -- In particular, no tyvars, no NotLetBound--type RhsNames = NameSet -- Names of variables, mentioned on the RHS of- -- a definition, that are not Global or ClosedLet--type ClosedTypeId = Bool- -- See Note [Meaning of IdBindingInfo]--{- Note [Meaning of IdBindingInfo]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-NotLetBound means that- the Id is not let-bound (e.g. it is bound in a- lambda-abstraction or in a case pattern)--ClosedLet means that- - The Id is let-bound,- - Any free term variables are also Global or ClosedLet- - Its type has no free variables (NB: a top-level binding subject- to the MR might have free vars in its type)- These ClosedLets can definitely be floated to top level; and we- may need to do so for static forms.-- Property: ClosedLet- is equivalent to- NonClosedLet emptyNameSet True--(NonClosedLet (fvs::RhsNames) (cl::ClosedTypeId)) means that- - The Id is let-bound-- - The fvs::RhsNames contains the free names of the RHS,- excluding Global and ClosedLet ones.-- - For the ClosedTypeId field see Note [Bindings with closed types: ClosedTypeId]--For (static e) to be valid, we need for every 'x' free in 'e',-that x's binding is floatable to the top level. Specifically:- * x's RhsNames must be empty- * x's type has no free variables-See Note [Grand plan for static forms] in "GHC.Iface.Tidy.StaticPtrTable".-This test is made in GHC.Tc.Gen.Expr.checkClosedInStaticForm.-Actually knowing x's RhsNames (rather than just its emptiness-or otherwise) is just so we can produce better error messages--Note [Bindings with closed types: ClosedTypeId]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-- f x = let g ys = map not ys- in ...--Can we generalise 'g' under the OutsideIn algorithm? Yes,-because all g's free variables are top-level; that is they themselves-have no free type variables, and it is the type variables in the-environment that makes things tricky for OutsideIn generalisation.--Here's the invariant:- If an Id has ClosedTypeId=True (in its IdBindingInfo), then- the Id's type is /definitely/ closed (has no free type variables).- Specifically,- a) The Id's actual type is closed (has no free tyvars)- b) Either the Id has a (closed) user-supplied type signature- or all its free variables are Global/ClosedLet- or NonClosedLet with ClosedTypeId=True.- In particular, none are NotLetBound.--Why is (b) needed? Consider- \x. (x :: Int, let y = x+1 in ...)-Initially x::alpha. If we happen to typecheck the 'let' before the-(x::Int), y's type will have a free tyvar; but if the other way round-it won't. So we treat any let-bound variable with a free-non-let-bound variable as not ClosedTypeId, regardless of what the-free vars of its type actually are.--But if it has a signature, all is well:- \x. ...(let { y::Int; y = x+1 } in- let { v = y+2 } in ...)...-Here the signature on 'v' makes 'y' a ClosedTypeId, so we can-generalise 'v'.--Note that:-- * A top-level binding may not have ClosedTypeId=True, if it suffers- from the MR-- * A nested binding may be closed (eg 'g' in the example we started- with). Indeed, that's the point; whether a function is defined at- top level or nested is orthogonal to the question of whether or- not it is closed.-- * A binding may be non-closed because it mentions a lexically scoped- *type variable* Eg- f :: forall a. blah- f x = let g y = ...(y::a)...--Under OutsideIn we are free to generalise an Id all of whose free-variables have ClosedTypeId=True (or imported). This is an extension-compared to the JFP paper on OutsideIn, which used "top-level" as a-proxy for "closed". (It's not a good proxy anyway -- the MR can make-a top-level binding with a free type variable.)--Note [Type variables in the type environment]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The type environment has a binding for each lexically-scoped-type variable that is in scope. For example-- f :: forall a. a -> a- f x = (x :: a)-- g1 :: [a] -> a- g1 (ys :: [b]) = head ys :: b-- g2 :: [Int] -> Int- g2 (ys :: [c]) = head ys :: c--* The forall'd variable 'a' in the signature scopes over f's RHS.--* The pattern-bound type variable 'b' in 'g1' scopes over g1's- RHS; note that it is bound to a skolem 'a' which is not itself- lexically in scope.--* The pattern-bound type variable 'c' in 'g2' is bound to- Int; that is, pattern-bound type variables can stand for- arbitrary types. (see- GHC proposal #128 "Allow ScopedTypeVariables to refer to types"- https://github.com/ghc-proposals/ghc-proposals/pull/128,- and the paper- "Type variables in patterns", Haskell Symposium 2018.---This is implemented by the constructor- ATyVar Name TcTyVar-in the type environment.--* The Name is the name of the original, lexically scoped type- variable--* The TcTyVar is sometimes a skolem (like in 'f'), and sometimes- a unification variable (like in 'g1', 'g2'). We never zonk the- type environment so in the latter case it always stays as a- unification variable, although that variable may be later- unified with a type (such as Int in 'g2').--}--instance Outputable IdBindingInfo where- ppr NotLetBound = text "NotLetBound"- ppr ClosedLet = text "TopLevelLet"- ppr (NonClosedLet fvs closed_type) =- text "TopLevelLet" <+> ppr fvs <+> ppr closed_type-----------------pprTcTyThingCategory :: TcTyThing -> SDoc-pprTcTyThingCategory = text . capitalise . tcTyThingCategory--tcTyThingCategory :: TcTyThing -> String-tcTyThingCategory (AGlobal thing) = tyThingCategory thing-tcTyThingCategory (ATyVar {}) = "type variable"-tcTyThingCategory (ATcId {}) = "local identifier"-tcTyThingCategory (ATcTyCon {}) = "local tycon"-tcTyThingCategory (APromotionErr pe) = peCategory pe- {- ************************************************************************ * *@@ -1418,214 +921,7 @@ imp_orphs = unionListsOrd orphs1 orphs2, imp_finsts = unionListsOrd finsts1 finsts2 } -{--************************************************************************-* *-\subsection{Where from}-* *-************************************************************************ -The @WhereFrom@ type controls where the renamer looks for an interface file--}--data WhereFrom- = ImportByUser IsBootInterface -- Ordinary user import (perhaps {-# SOURCE #-})- | ImportBySystem -- Non user import.- | ImportByPlugin -- Importing a plugin;- -- See Note [Care with plugin imports] in GHC.Iface.Load--instance Outputable WhereFrom where- ppr (ImportByUser IsBoot) = text "{- SOURCE -}"- ppr (ImportByUser NotBoot) = empty- ppr ImportBySystem = text "{- SYSTEM -}"- ppr ImportByPlugin = text "{- PLUGIN -}"---{- *********************************************************************-* *- Type signatures-* *-********************************************************************* -}---- These data types need to be here only because--- GHC.Tc.Solver uses them, and GHC.Tc.Solver is fairly--- low down in the module hierarchy--type TcSigFun = Name -> Maybe TcSigInfo--data TcSigInfo = TcIdSig TcIdSigInfo- | TcPatSynSig TcPatSynInfo--data TcIdSigInfo -- See Note [Complete and partial type signatures]- = CompleteSig -- A complete signature with no wildcards,- -- so the complete polymorphic type is known.- { sig_bndr :: TcId -- The polymorphic Id with that type-- , sig_ctxt :: UserTypeCtxt -- In the case of type-class default methods,- -- the Name in the FunSigCtxt is not the same- -- as the TcId; the former is 'op', while the- -- latter is '$dmop' or some such-- , sig_loc :: SrcSpan -- Location of the type signature- }-- | PartialSig -- A partial type signature (i.e. includes one or more- -- wildcards). In this case it doesn't make sense to give- -- the polymorphic Id, because we are going to /infer/ its- -- type, so we can't make the polymorphic Id ab-initio- { psig_name :: Name -- Name of the function; used when report wildcards- , psig_hs_ty :: LHsSigWcType GhcRn -- The original partial signature in- -- HsSyn form- , sig_ctxt :: UserTypeCtxt- , sig_loc :: SrcSpan -- Location of the type signature- }---{- Note [Complete and partial type signatures]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-A type signature is partial when it contains one or more wildcards-(= type holes). The wildcard can either be:-* A (type) wildcard occurring in sig_theta or sig_tau. These are- stored in sig_wcs.- f :: Bool -> _- g :: Eq _a => _a -> _a -> Bool-* Or an extra-constraints wildcard, stored in sig_cts:- h :: (Num a, _) => a -> a--A type signature is a complete type signature when there are no-wildcards in the type signature, i.e. iff sig_wcs is empty and-sig_extra_cts is Nothing.--}--data TcIdSigInst- = TISI { sig_inst_sig :: TcIdSigInfo-- , sig_inst_skols :: [(Name, InvisTVBinder)]- -- Instantiated type and kind variables, TyVarTvs- -- The Name is the Name that the renamer chose;- -- but the TcTyVar may come from instantiating- -- the type and hence have a different unique.- -- No need to keep track of whether they are truly lexically- -- scoped because the renamer has named them uniquely- -- See Note [Binding scoped type variables] in GHC.Tc.Gen.Sig- --- -- NB: The order of sig_inst_skols is irrelevant- -- for a CompleteSig, but for a PartialSig see- -- Note [Quantified variables in partial type signatures]-- , sig_inst_theta :: TcThetaType- -- Instantiated theta. In the case of a- -- PartialSig, sig_theta does not include- -- the extra-constraints wildcard-- , sig_inst_tau :: TcSigmaType -- Instantiated tau- -- See Note [sig_inst_tau may be polymorphic]-- -- Relevant for partial signature only- , sig_inst_wcs :: [(Name, TcTyVar)]- -- Like sig_inst_skols, but for /named/ wildcards (_a etc).- -- The named wildcards scope over the binding, and hence- -- their Names may appear in type signatures in the binding-- , sig_inst_wcx :: Maybe TcType- -- Extra-constraints wildcard to fill in, if any- -- If this exists, it is surely of the form (meta_tv |> co)- -- (where the co might be reflexive). This is filled in- -- only from the return value of GHC.Tc.Gen.HsType.tcAnonWildCardOcc- }--{- Note [sig_inst_tau may be polymorphic]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Note that "sig_inst_tau" might actually be a polymorphic type,-if the original function had a signature like- forall a. Eq a => forall b. Ord b => ....-But that's ok: tcMatchesFun (called by tcRhs) can deal with that-It happens, too! See Note [Polymorphic methods] in GHC.Tc.TyCl.Class.--Note [Quantified variables in partial type signatures]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider- f :: forall a b. _ -> a -> _ -> b- f (x,y) p q = q--Then we expect f's final type to be- f :: forall {x,y}. forall a b. (x,y) -> a -> b -> b--Note that x,y are Inferred, and can't be use for visible type-application (VTA). But a,b are Specified, and remain Specified-in the final type, so we can use VTA for them. (Exception: if-it turns out that a's kind mentions b we need to reorder them-with scopedSort.)--The sig_inst_skols of the TISI from a partial signature records-that original order, and is used to get the variables of f's-final type in the correct order.---Note [Wildcards in partial signatures]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The wildcards in psig_wcs may stand for a type mentioning-the universally-quantified tyvars of psig_ty--E.g. f :: forall a. _ -> a- f x = x-We get sig_inst_skols = [a]- sig_inst_tau = _22 -> a- sig_inst_wcs = [_22]-and _22 in the end is unified with the type 'a'--Moreover the kind of a wildcard in sig_inst_wcs may mention-the universally-quantified tyvars sig_inst_skols-e.g. f :: t a -> t _-Here we get- sig_inst_skols = [k:*, (t::k ->*), (a::k)]- sig_inst_tau = t a -> t _22- sig_inst_wcs = [ _22::k ]--}--data TcPatSynInfo- = TPSI {- patsig_name :: Name,- patsig_implicit_bndrs :: [InvisTVBinder], -- Implicitly-bound kind vars (Inferred) and- -- implicitly-bound type vars (Specified)- -- See Note [The pattern-synonym signature splitting rule] in GHC.Tc.TyCl.PatSyn- patsig_univ_bndrs :: [InvisTVBinder], -- Bound by explicit user forall- patsig_req :: TcThetaType,- patsig_ex_bndrs :: [InvisTVBinder], -- Bound by explicit user forall- patsig_prov :: TcThetaType,- patsig_body_ty :: TcSigmaType- }--instance Outputable TcSigInfo where- ppr (TcIdSig idsi) = ppr idsi- ppr (TcPatSynSig tpsi) = text "TcPatSynInfo" <+> ppr tpsi--instance Outputable TcIdSigInfo where- ppr (CompleteSig { sig_bndr = bndr })- = ppr bndr <+> dcolon <+> ppr (idType bndr)- ppr (PartialSig { psig_name = name, psig_hs_ty = hs_ty })- = text "psig" <+> ppr name <+> dcolon <+> ppr hs_ty--instance Outputable TcIdSigInst where- ppr (TISI { sig_inst_sig = sig, sig_inst_skols = skols- , sig_inst_theta = theta, sig_inst_tau = tau })- = hang (ppr sig) 2 (vcat [ ppr skols, ppr theta <+> darrow <+> ppr tau ])--instance Outputable TcPatSynInfo where- ppr (TPSI{ patsig_name = name}) = ppr name--isPartialSig :: TcIdSigInst -> Bool-isPartialSig (TISI { sig_inst_sig = PartialSig {} }) = True-isPartialSig _ = False---- | No signature or a partial signature-hasCompleteSig :: TcSigFun -> Name -> Bool-hasCompleteSig sig_fn name- = case sig_fn name of- Just (TcIdSig (CompleteSig {})) -> True- _ -> False-- {- Constraint Solver Plugins -------------------------@@ -1679,7 +975,7 @@ -- and possibly emit additional constraints. These returned constraints -- must be Givens in the first case, and Wanteds in the second. --- -- Use @ \\ _ _ _ _ _ -> pure $ TcPluginOK [] [] @ if your plugin+ -- Use @ \\ _ _ _ _ -> pure $ TcPluginOk [] [] @ if your plugin -- does not provide this functionality. , tcPluginRewrite :: s -> UniqFM TyCon TcPluginRewriter@@ -1779,7 +1075,7 @@ -- Zonked constraints containing the unfilled metavariables that -- can be defaulted. See wrinkle (DP1) of Note [Defaulting plugins] -- in GHC.Tc.Solver- -> TcPluginM [DefaultingProposal]+ -> TcPluginM DefaultingPluginResult -- | A plugin for controlling defaulting. data DefaultingPlugin = forall s. DefaultingPlugin
− GHC/Tc/Types.hs-boot
@@ -1,24 +0,0 @@-module GHC.Tc.Types where--import GHC.Prelude-import GHC.Tc.Utils.TcType-import GHC.Types.SrcLoc-import GHC.Utils.Outputable--data TcLclEnv--data SelfBootInfo--data TcIdSigInfo-instance Outputable TcIdSigInfo--data TcTyThing-instance Outputable TcTyThing--setLclEnvTcLevel :: TcLclEnv -> TcLevel -> TcLclEnv-getLclEnvTcLevel :: TcLclEnv -> TcLevel--setLclEnvLoc :: TcLclEnv -> RealSrcSpan -> TcLclEnv-getLclEnvLoc :: TcLclEnv -> RealSrcSpan--lclEnvInGeneratedCode :: TcLclEnv -> Bool
+ GHC/Tc/Types/BasicTypes.hs view
@@ -0,0 +1,500 @@+module GHC.Tc.Types.BasicTypes (+ -- * TcBinder+ TcBinderStack+ , TcId+ , TcBinder(..)++ -- * Signatures+ , TcSigFun+ , TcIdSigInfo(..)+ , TcSigInfo(..)+ , TcPatSynInfo(..)+ , TcIdSigInst(..)+ , isPartialSig+ , hasCompleteSig++ -- * TcTyThing+ , TcTyThing(..)+ , IdBindingInfo(..)+ , IsGroupClosed(..)+ , RhsNames+ , ClosedTypeId+ , tcTyThingCategory+ , tcTyThingTyCon_maybe+ , pprTcTyThingCategory+ ) where++import GHC.Prelude++import GHC.Types.Id+import GHC.Types.Basic+import GHC.Types.Var+import GHC.Types.SrcLoc+import GHC.Types.Name+import GHC.Types.TyThing+import GHC.Types.Name.Env+import GHC.Types.Name.Set+import GHC.Tc.Types.Origin+import GHC.Tc.Utils.TcType++import GHC.Hs.Extension ( GhcRn )++import Language.Haskell.Syntax.Type ( LHsSigWcType )++import GHC.Tc.Errors.Types.PromotionErr (PromotionErr, peCategory)++import GHC.Core.TyCon ( TyCon, tyConKind )+import GHC.Utils.Outputable+import GHC.Utils.Misc+++---------------------------+-- The TcBinderStack+---------------------------++type TcBinderStack = [TcBinder]+type TcId = Id+ -- This is a stack of locally-bound ids and tyvars,+ -- innermost on top+ -- Used only in error reporting (relevantBindings in TcError),+ -- and in tidying+ -- We can't use the tcl_env type environment, because it doesn't+ -- keep track of the nesting order++data TcBinder+ = TcIdBndr+ TcId+ TopLevelFlag -- Tells whether the binding is syntactically top-level+ -- (The monomorphic Ids for a recursive group count+ -- as not-top-level for this purpose.)++ | TcIdBndr_ExpType -- Variant that allows the type to be specified as+ -- an ExpType+ Name+ ExpType+ TopLevelFlag++ | TcTvBndr -- e.g. case x of P (y::a) -> blah+ Name -- We bind the lexical name "a" to the type of y,+ TyVar -- which might be an utterly different (perhaps+ -- existential) tyvar++instance Outputable TcBinder where+ ppr (TcIdBndr id top_lvl) = ppr id <> brackets (ppr top_lvl)+ ppr (TcIdBndr_ExpType id _ top_lvl) = ppr id <> brackets (ppr top_lvl)+ ppr (TcTvBndr name tv) = ppr name <+> ppr tv++instance HasOccName TcBinder where+ occName (TcIdBndr id _) = occName (idName id)+ occName (TcIdBndr_ExpType name _ _) = occName name+ occName (TcTvBndr name _) = occName name++{- *********************************************************************+* *+ Type signatures+* *+********************************************************************* -}++-- These data types need to be here only because+-- GHC.Tc.Solver uses them, and GHC.Tc.Solver is fairly+-- low down in the module hierarchy++type TcSigFun = Name -> Maybe TcSigInfo++data TcSigInfo = TcIdSig TcIdSigInfo+ | TcPatSynSig TcPatSynInfo++data TcIdSigInfo -- See Note [Complete and partial type signatures]+ = CompleteSig -- A complete signature with no wildcards,+ -- so the complete polymorphic type is known.+ { sig_bndr :: TcId -- The polymorphic Id with that type++ , sig_ctxt :: UserTypeCtxt -- In the case of type-class default methods,+ -- the Name in the FunSigCtxt is not the same+ -- as the TcId; the former is 'op', while the+ -- latter is '$dmop' or some such++ , sig_loc :: SrcSpan -- Location of the type signature+ }++ | PartialSig -- A partial type signature (i.e. includes one or more+ -- wildcards). In this case it doesn't make sense to give+ -- the polymorphic Id, because we are going to /infer/ its+ -- type, so we can't make the polymorphic Id ab-initio+ { psig_name :: Name -- Name of the function; used when report wildcards+ , psig_hs_ty :: LHsSigWcType GhcRn -- The original partial signature in+ -- HsSyn form+ , sig_ctxt :: UserTypeCtxt+ , sig_loc :: SrcSpan -- Location of the type signature+ }+++{- Note [Complete and partial type signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A type signature is partial when it contains one or more wildcards+(= type holes). The wildcard can either be:+* A (type) wildcard occurring in sig_theta or sig_tau. These are+ stored in sig_wcs.+ f :: Bool -> _+ g :: Eq _a => _a -> _a -> Bool+* Or an extra-constraints wildcard, stored in sig_cts:+ h :: (Num a, _) => a -> a++A type signature is a complete type signature when there are no+wildcards in the type signature, i.e. iff sig_wcs is empty and+sig_extra_cts is Nothing.+-}++data TcIdSigInst+ = TISI { sig_inst_sig :: TcIdSigInfo++ , sig_inst_skols :: [(Name, InvisTVBinder)]+ -- Instantiated type and kind variables, TyVarTvs+ -- The Name is the Name that the renamer chose;+ -- but the TcTyVar may come from instantiating+ -- the type and hence have a different unique.+ -- No need to keep track of whether they are truly lexically+ -- scoped because the renamer has named them uniquely+ -- See Note [Binding scoped type variables] in GHC.Tc.Gen.Sig+ --+ -- NB: The order of sig_inst_skols is irrelevant+ -- for a CompleteSig, but for a PartialSig see+ -- Note [Quantified variables in partial type signatures]++ , sig_inst_theta :: TcThetaType+ -- Instantiated theta. In the case of a+ -- PartialSig, sig_theta does not include+ -- the extra-constraints wildcard++ , sig_inst_tau :: TcSigmaType -- Instantiated tau+ -- See Note [sig_inst_tau may be polymorphic]++ -- Relevant for partial signature only+ , sig_inst_wcs :: [(Name, TcTyVar)]+ -- Like sig_inst_skols, but for /named/ wildcards (_a etc).+ -- The named wildcards scope over the binding, and hence+ -- their Names may appear in type signatures in the binding++ , sig_inst_wcx :: Maybe TcType+ -- Extra-constraints wildcard to fill in, if any+ -- If this exists, it is surely of the form (meta_tv |> co)+ -- (where the co might be reflexive). This is filled in+ -- only from the return value of GHC.Tc.Gen.HsType.tcAnonWildCardOcc+ }++{- Note [sig_inst_tau may be polymorphic]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Note that "sig_inst_tau" might actually be a polymorphic type,+if the original function had a signature like+ forall a. Eq a => forall b. Ord b => ....+But that's ok: tcMatchesFun (called by tcRhs) can deal with that+It happens, too! See Note [Polymorphic methods] in GHC.Tc.TyCl.Class.++Note [Quantified variables in partial type signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+ f :: forall a b. _ -> a -> _ -> b+ f (x,y) p q = q++Then we expect f's final type to be+ f :: forall {x,y}. forall a b. (x,y) -> a -> b -> b++Note that x,y are Inferred, and can't be use for visible type+application (VTA). But a,b are Specified, and remain Specified+in the final type, so we can use VTA for them. (Exception: if+it turns out that a's kind mentions b we need to reorder them+with scopedSort.)++The sig_inst_skols of the TISI from a partial signature records+that original order, and is used to get the variables of f's+final type in the correct order.+++Note [Wildcards in partial signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The wildcards in psig_wcs may stand for a type mentioning+the universally-quantified tyvars of psig_ty++E.g. f :: forall a. _ -> a+ f x = x+We get sig_inst_skols = [a]+ sig_inst_tau = _22 -> a+ sig_inst_wcs = [_22]+and _22 in the end is unified with the type 'a'++Moreover the kind of a wildcard in sig_inst_wcs may mention+the universally-quantified tyvars sig_inst_skols+e.g. f :: t a -> t _+Here we get+ sig_inst_skols = [k:*, (t::k ->*), (a::k)]+ sig_inst_tau = t a -> t _22+ sig_inst_wcs = [ _22::k ]+-}++data TcPatSynInfo+ = TPSI {+ patsig_name :: Name,+ patsig_implicit_bndrs :: [InvisTVBinder], -- Implicitly-bound kind vars (Inferred) and+ -- implicitly-bound type vars (Specified)+ -- See Note [The pattern-synonym signature splitting rule] in GHC.Tc.TyCl.PatSyn+ patsig_univ_bndrs :: [InvisTVBinder], -- Bound by explicit user forall+ patsig_req :: TcThetaType,+ patsig_ex_bndrs :: [InvisTVBinder], -- Bound by explicit user forall+ patsig_prov :: TcThetaType,+ patsig_body_ty :: TcSigmaType+ }++instance Outputable TcSigInfo where+ ppr (TcIdSig idsi) = ppr idsi+ ppr (TcPatSynSig tpsi) = text "TcPatSynInfo" <+> ppr tpsi++instance Outputable TcIdSigInfo where+ ppr (CompleteSig { sig_bndr = bndr })+ = ppr bndr <+> dcolon <+> ppr (idType bndr)+ ppr (PartialSig { psig_name = name, psig_hs_ty = hs_ty })+ = text "[partial signature]" <+> ppr name <+> dcolon <+> ppr hs_ty++instance Outputable TcIdSigInst where+ ppr (TISI { sig_inst_sig = sig, sig_inst_skols = skols+ , sig_inst_theta = theta, sig_inst_tau = tau })+ = hang (ppr sig) 2 (vcat [ ppr skols, ppr theta <+> darrow <+> ppr tau ])++instance Outputable TcPatSynInfo where+ ppr (TPSI{ patsig_name = name}) = ppr name++isPartialSig :: TcIdSigInst -> Bool+isPartialSig (TISI { sig_inst_sig = PartialSig {} }) = True+isPartialSig _ = False++-- | No signature or a partial signature+hasCompleteSig :: TcSigFun -> Name -> Bool+hasCompleteSig sig_fn name+ = case sig_fn name of+ Just (TcIdSig (CompleteSig {})) -> True+ _ -> False++---------------------------+-- TcTyThing+---------------------------++-- | A typecheckable thing available in a local context. Could be+-- 'AGlobal' 'TyThing', but also lexically scoped variables, etc.+-- See "GHC.Tc.Utils.Env" for how to retrieve a 'TyThing' given a 'Name'.+data TcTyThing+ = AGlobal TyThing -- Used only in the return type of a lookup++ | ATcId -- Ids defined in this module; may not be fully zonked+ { tct_id :: Id+ , tct_info :: IdBindingInfo -- See Note [Meaning of IdBindingInfo]+ }++ | ATyVar Name TcTyVar -- See Note [Type variables in the type environment]++ | ATcTyCon TyCon -- Used temporarily, during kind checking, for the+ -- tycons and classes in this recursive group+ -- The TyCon is always a TcTyCon. Its kind+ -- can be a mono-kind or a poly-kind; in TcTyClsDcls see+ -- Note [Type checking recursive type and class declarations]++ | APromotionErr PromotionErr++-- | Matches on either a global 'TyCon' or a 'TcTyCon'.+tcTyThingTyCon_maybe :: TcTyThing -> Maybe TyCon+tcTyThingTyCon_maybe (AGlobal (ATyCon tc)) = Just tc+tcTyThingTyCon_maybe (ATcTyCon tc_tc) = Just tc_tc+tcTyThingTyCon_maybe _ = Nothing++instance Outputable TcTyThing where -- Debugging only+ ppr (AGlobal g) = ppr g+ ppr elt@(ATcId {}) = text "Identifier" <>+ brackets (ppr (tct_id elt) <> dcolon+ <> ppr (varType (tct_id elt)) <> comma+ <+> ppr (tct_info elt))+ ppr (ATyVar n tv) = text "Type variable" <+> quotes (ppr n) <+> equals <+> ppr tv+ <+> dcolon <+> ppr (varType tv)+ ppr (ATcTyCon tc) = text "ATcTyCon" <+> ppr tc <+> dcolon <+> ppr (tyConKind tc)+ ppr (APromotionErr err) = text "APromotionErr" <+> ppr err++-- | IdBindingInfo describes how an Id is bound.+--+-- It is used for the following purposes:+-- a) for static forms in 'GHC.Tc.Gen.Expr.checkClosedInStaticForm' and+-- b) to figure out when a nested binding can be generalised,+-- in 'GHC.Tc.Gen.Bind.decideGeneralisationPlan'.+--+data IdBindingInfo -- See Note [Meaning of IdBindingInfo]+ = NotLetBound+ | ClosedLet+ | NonClosedLet+ RhsNames -- Used for (static e) checks only+ ClosedTypeId -- Used for generalisation checks+ -- and for (static e) checks++-- | IsGroupClosed describes a group of mutually-recursive bindings+data IsGroupClosed+ = IsGroupClosed+ (NameEnv RhsNames) -- Free var info for the RHS of each binding in the group+ -- Used only for (static e) checks++ ClosedTypeId -- True <=> all the free vars of the group are+ -- imported or ClosedLet or+ -- NonClosedLet with ClosedTypeId=True.+ -- In particular, no tyvars, no NotLetBound++type RhsNames = NameSet -- Names of variables, mentioned on the RHS of+ -- a definition, that are not Global or ClosedLet++type ClosedTypeId = Bool+ -- See Note [Meaning of IdBindingInfo]++{- Note [Meaning of IdBindingInfo]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+NotLetBound means that+ the Id is not let-bound (e.g. it is bound in a+ lambda-abstraction or in a case pattern)++ClosedLet means that+ - The Id is let-bound,+ - Any free term variables are also Global or ClosedLet+ - Its type has no free variables (NB: a top-level binding subject+ to the MR might have free vars in its type)+ These ClosedLets can definitely be floated to top level; and we+ may need to do so for static forms.++ Property: ClosedLet+ is equivalent to+ NonClosedLet emptyNameSet True++(NonClosedLet (fvs::RhsNames) (cl::ClosedTypeId)) means that+ - The Id is let-bound++ - The fvs::RhsNames contains the free names of the RHS,+ excluding Global and ClosedLet ones.++ - For the ClosedTypeId field see Note [Bindings with closed types: ClosedTypeId]++For (static e) to be valid, we need for every 'x' free in 'e',+that x's binding is floatable to the top level. Specifically:+ * x's RhsNames must be empty+ * x's type has no free variables+See Note [Grand plan for static forms] in "GHC.Iface.Tidy.StaticPtrTable".+This test is made in GHC.Tc.Gen.Expr.checkClosedInStaticForm.+Actually knowing x's RhsNames (rather than just its emptiness+or otherwise) is just so we can produce better error messages++Note [Bindings with closed types: ClosedTypeId]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider++ f x = let g ys = map not ys+ in ...++Can we generalise 'g' under the OutsideIn algorithm? Yes,+because all g's free variables are top-level; that is they themselves+have no free type variables, and it is the type variables in the+environment that makes things tricky for OutsideIn generalisation.++Here's the invariant:+ If an Id has ClosedTypeId=True (in its IdBindingInfo), then+ the Id's type is /definitely/ closed (has no free type variables).+ Specifically,+ a) The Id's actual type is closed (has no free tyvars)+ b) Either the Id has a (closed) user-supplied type signature+ or all its free variables are Global/ClosedLet+ or NonClosedLet with ClosedTypeId=True.+ In particular, none are NotLetBound.++Why is (b) needed? Consider+ \x. (x :: Int, let y = x+1 in ...)+Initially x::alpha. If we happen to typecheck the 'let' before the+(x::Int), y's type will have a free tyvar; but if the other way round+it won't. So we treat any let-bound variable with a free+non-let-bound variable as not ClosedTypeId, regardless of what the+free vars of its type actually are.++But if it has a signature, all is well:+ \x. ...(let { y::Int; y = x+1 } in+ let { v = y+2 } in ...)...+Here the signature on 'v' makes 'y' a ClosedTypeId, so we can+generalise 'v'.++Note that:++ * A top-level binding may not have ClosedTypeId=True, if it suffers+ from the MR++ * A nested binding may be closed (eg 'g' in the example we started+ with). Indeed, that's the point; whether a function is defined at+ top level or nested is orthogonal to the question of whether or+ not it is closed.++ * A binding may be non-closed because it mentions a lexically scoped+ *type variable* Eg+ f :: forall a. blah+ f x = let g y = ...(y::a)...++Under OutsideIn we are free to generalise an Id all of whose free+variables have ClosedTypeId=True (or imported). This is an extension+compared to the JFP paper on OutsideIn, which used "top-level" as a+proxy for "closed". (It's not a good proxy anyway -- the MR can make+a top-level binding with a free type variable.)++Note [Type variables in the type environment]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The type environment has a binding for each lexically-scoped+type variable that is in scope. For example++ f :: forall a. a -> a+ f x = (x :: a)++ g1 :: [a] -> a+ g1 (ys :: [b]) = head ys :: b++ g2 :: [Int] -> Int+ g2 (ys :: [c]) = head ys :: c++* The forall'd variable 'a' in the signature scopes over f's RHS.++* The pattern-bound type variable 'b' in 'g1' scopes over g1's+ RHS; note that it is bound to a skolem 'a' which is not itself+ lexically in scope.++* The pattern-bound type variable 'c' in 'g2' is bound to+ Int; that is, pattern-bound type variables can stand for+ arbitrary types. (see+ GHC proposal #128 "Allow ScopedTypeVariables to refer to types"+ https://github.com/ghc-proposals/ghc-proposals/pull/128,+ and the paper+ "Type variables in patterns", Haskell Symposium 2018.+++This is implemented by the constructor+ ATyVar Name TcTyVar+in the type environment.++* The Name is the name of the original, lexically scoped type+ variable++* The TcTyVar is sometimes a skolem (like in 'f'), and sometimes+ a unification variable (like in 'g1', 'g2'). We never zonk the+ type environment so in the latter case it always stays as a+ unification variable, although that variable may be later+ unified with a type (such as Int in 'g2').+-}++instance Outputable IdBindingInfo where+ ppr NotLetBound = text "NotLetBound"+ ppr ClosedLet = text "TopLevelLet"+ ppr (NonClosedLet fvs closed_type) =+ text "TopLevelLet" <+> ppr fvs <+> ppr closed_type++--------------+pprTcTyThingCategory :: TcTyThing -> SDoc+pprTcTyThingCategory = text . capitalise . tcTyThingCategory++tcTyThingCategory :: TcTyThing -> String+tcTyThingCategory (AGlobal thing) = tyThingCategory thing+tcTyThingCategory (ATyVar {}) = "type variable"+tcTyThingCategory (ATcId {}) = "local identifier"+tcTyThingCategory (ATcTyCon {}) = "local tycon"+tcTyThingCategory (APromotionErr pe) = peCategory pe
GHC/Tc/Types/Constraint.hs view
@@ -6,41 +6,49 @@ -- | This module defines types and simple operations over constraints, as used -- in the type-checker and constraint solver. module GHC.Tc.Types.Constraint (- -- QCInst- QCInst(..), pendingScInst_maybe,-- -- Canonical constraints+ -- Constraints Xi, Ct(..), Cts,- emptyCts, andCts, andManyCts, pprCts, singleCt, listToCts, ctsElts, consCts, snocCts, extendCtsList,- isEmptyCts,- isPendingScDict, pendingScDict_maybe,+ isEmptyCts, emptyCts, andCts, ctsPreds,+ isPendingScDictCt, isPendingScDict, pendingScDict_maybe, superClassesMightHelp, getPendingWantedScs, isWantedCt, isGivenCt,- isUserTypeError, getUserTypeErrorMsg,- ctEvidence, ctLoc, ctPred, ctFlavour, ctEqRel, ctOrigin,+ isTopLevelUserTypeError, containsUserTypeError, getUserTypeErrorMsg,+ isUnsatisfiableCt_maybe,+ ctEvidence, updCtEvidence,+ ctLoc, ctPred, ctFlavour, ctEqRel, ctOrigin, ctRewriters, ctEvId, wantedEvId_maybe, mkTcEqPredLikeEv,- mkNonCanonical, mkNonCanonicalCt, mkGivens,- mkIrredCt,- ctEvPred, ctEvLoc, ctEvOrigin, ctEvEqRel,- ctEvExpr, ctEvTerm, ctEvCoercion, ctEvEvId,- ctEvRewriters,+ mkNonCanonical, mkGivens, tyCoVarsOfCt, tyCoVarsOfCts, tyCoVarsOfCtList, tyCoVarsOfCtsList, + -- Particular forms of constraint+ EqCt(..), eqCtEvidence, eqCtLHS,+ DictCt(..), dictCtEvidence,+ IrredCt(..), irredCtEvidence, mkIrredCt, ctIrredCt, irredCtPred,++ -- QCInst+ QCInst(..), pendingScInst_maybe,++ ExpansionFuel, doNotExpand, consumeFuel, pendingFuel,+ assertFuelPrecondition, assertFuelPreconditionStrict,+ CtIrredReason(..), isInsolubleReason, CheckTyEqResult, CheckTyEqProblem, cteProblem, cterClearOccursCheck,- cteOK, cteImpredicative, cteTypeFamily,+ cteOK, cteImpredicative, cteTypeFamily, cteCoercionHole, cteInsolubleOccurs, cteSolubleOccurs, cterSetOccursCheckSoluble,+ cteConcrete, cteSkolemEscape,+ impredicativeProblem, insolubleOccursProblem, solubleOccursProblem, - cterHasNoProblem, cterHasProblem, cterHasOnlyProblem,+ cterHasNoProblem, cterHasProblem, cterHasOnlyProblem, cterHasOnlyProblems, cterRemoveProblem, cterHasOccursCheck, cterFromKind, - CanEqLHS(..), canEqLHS_maybe, canEqLHSKind, canEqLHSType,- eqCanEqLHS, + CanEqLHS(..), canEqLHS_maybe, canTyFamEqLHS_maybe,+ canEqLHSKind, canEqLHSType, eqCanEqLHS,+ Hole(..), HoleSort(..), isOutOfScopeHole, DelayedError(..), NotConcreteError(..), NotConcreteReason(..),@@ -49,8 +57,8 @@ isSolvedWC, andWC, unionsWC, mkSimpleWC, mkImplicWC, addInsols, dropMisleading, addSimples, addImplics, addHoles, addNotConcreteError, addDelayedErrors,- tyCoVarsOfWC,- tyCoVarsOfWCList, insolubleWantedCt, insolubleEqCt, insolubleCt,+ tyCoVarsOfWC, tyCoVarsOfWCList,+ insolubleWantedCt, insolubleCt, insolubleIrredCt, insolubleImplic, nonDefaultableTyVarsOfWC, Implication(..), implicationPrototype, checkTelescopeSkol,@@ -63,25 +71,30 @@ ctLocTypeOrKind_maybe, ctLocDepth, bumpCtLocDepth, isGivenLoc, setCtLocOrigin, updateCtLocOrigin, setCtLocEnv, setCtLocSpan,- pprCtLoc,+ pprCtLoc, adjustCtLoc, adjustCtLocTyConBinder, + -- CtLocEnv+ CtLocEnv(..), setCtLocEnvLoc, setCtLocEnvLvl, getCtLocEnvLoc, getCtLocEnvLvl, ctLocEnvInGeneratedCode,+ -- CtEvidence CtEvidence(..), TcEvDest(..),- mkKindLoc, toKindLoc, mkGivenLoc, isWanted, isGiven,- ctEvRole, setCtEvPredType, setCtEvLoc,+ ctEvPred, ctEvLoc, ctEvOrigin, ctEvEqRel,+ ctEvExpr, ctEvTerm, ctEvCoercion, ctEvEvId,+ ctEvRewriters, ctEvUnique, tcEvDestUnique,+ mkKindEqLoc, toKindLoc, toInvisibleLoc, mkGivenLoc,+ ctEvRole, setCtEvPredType, setCtEvLoc, arisesFromGivens, tyCoVarsOfCtEvList, tyCoVarsOfCtEv, tyCoVarsOfCtEvsList,- ctEvUnique, tcEvDestUnique, + -- RewriterSet RewriterSet(..), emptyRewriterSet, isEmptyRewriterSet,- -- exported concretely only for anyUnfilledCoercionHoles- rewriterSetFromType, rewriterSetFromTypes, rewriterSetFromCo,- addRewriterSet,+ -- exported concretely only for zonkRewriterSet+ addRewriter, unitRewriterSet, unionRewriterSet, rewriterSetFromCts, wrapType, CtFlavour(..), ctEvFlavour,- CtFlavourRole, ctEvFlavourRole, ctFlavourRole,+ CtFlavourRole, ctEvFlavourRole, ctFlavourRole, eqCtFlavourRole, eqCanRewrite, eqCanRewriteFR, -- Pretty printing@@ -93,9 +106,6 @@ import GHC.Prelude -import {-# SOURCE #-} GHC.Tc.Types ( TcLclEnv, setLclEnvTcLevel, getLclEnvTcLevel- , setLclEnvLoc, getLclEnvLoc )- import GHC.Core.Predicate import GHC.Core.Type import GHC.Core.Coercion@@ -107,15 +117,15 @@ import GHC.Tc.Utils.TcType import GHC.Tc.Types.Evidence import GHC.Tc.Types.Origin+import GHC.Tc.Types.CtLocEnv import GHC.Core import GHC.Core.TyCo.Ppr import GHC.Utils.FV import GHC.Types.Var.Set-import GHC.Driver.Session+import GHC.Builtin.Names import GHC.Types.Basic-import GHC.Types.Unique import GHC.Types.Unique.Set import GHC.Utils.Outputable@@ -127,7 +137,6 @@ import GHC.Types.Name.Reader import Data.Coerce-import Data.Monoid ( Endo(..) ) import qualified Data.Semigroup as S import Control.Monad ( msum, when ) import Data.Maybe ( mapMaybe, isJust )@@ -139,7 +148,6 @@ - {- ************************************************************************ * *@@ -148,8 +156,103 @@ * These are the constraints the low-level simplifier works with * * * ************************************************************************+-} -Note [CEqCan occurs check]+-- | A 'Xi'-type is one that has been fully rewritten with respect+-- to the inert set; that is, it has been rewritten by the algorithm+-- in GHC.Tc.Solver.Rewrite. (Historical note: 'Xi', for years and years,+-- meant that a type was type-family-free. It does *not* mean this+-- any more.)+type Xi = TcType++type Cts = Bag Ct++-- | Says how many layers of superclasses can we expand.+-- Invariant: ExpansionFuel should always be >= 0+-- see Note [Expanding Recursive Superclasses and ExpansionFuel]+type ExpansionFuel = Int++-- | Do not expand superclasses any further+doNotExpand :: ExpansionFuel+doNotExpand = 0++-- | Consumes one unit of fuel.+-- Precondition: fuel > 0+consumeFuel :: ExpansionFuel -> ExpansionFuel+consumeFuel fuel = assertFuelPreconditionStrict fuel $ fuel - 1++-- | Returns True if we have any fuel left for superclass expansion+pendingFuel :: ExpansionFuel -> Bool+pendingFuel n = n > 0++insufficientFuelError :: SDoc+insufficientFuelError = text "Superclass expansion fuel should be > 0"++-- | asserts if fuel is non-negative+assertFuelPrecondition :: ExpansionFuel -> a -> a+{-# INLINE assertFuelPrecondition #-}+assertFuelPrecondition fuel = assertPpr (fuel >= 0) insufficientFuelError++-- | asserts if fuel is strictly greater than 0+assertFuelPreconditionStrict :: ExpansionFuel -> a -> a+{-# INLINE assertFuelPreconditionStrict #-}+assertFuelPreconditionStrict fuel = assertPpr (pendingFuel fuel) insufficientFuelError++data Ct+ = CDictCan DictCt+ | CIrredCan IrredCt -- A "irreducible" constraint (non-canonical)+ | CEqCan EqCt -- A canonical equality constraint+ | CQuantCan QCInst -- A quantified constraint+ | CNonCanonical CtEvidence -- See Note [NonCanonical Semantics] in GHC.Tc.Solver.Monad++--------------- DictCt --------------++data DictCt -- e.g. Num ty+ = DictCt { di_ev :: CtEvidence -- See Note [Ct/evidence invariant]++ , di_cls :: Class+ , di_tys :: [Xi] -- di_tys are rewritten w.r.t. inerts, so Xi++ , di_pend_sc :: ExpansionFuel+ -- See Note [The superclass story] in GHC.Tc.Solver.Dict+ -- See Note [Expanding Recursive Superclasses and ExpansionFuel] in GHC.Tc.Solver+ -- Invariants: di_pend_sc > 0 <=>+ -- (a) di_cls has superclasses+ -- (b) those superclasses are not yet explored+ }++dictCtEvidence :: DictCt -> CtEvidence+dictCtEvidence = di_ev++instance Outputable DictCt where+ ppr dict = ppr (CDictCan dict)++--------------- EqCt --------------++{- Note [Canonical equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+An EqCt is a canonical equality constraint, one that can live in the inert set,+and that can be used to rewrite other constrtaints. It satisfies these invariants:+ * (TyEq:OC) lhs does not occur in rhs (occurs check)+ Note [EqCt occurs check]+ * (TyEq:F) rhs has no foralls+ (this avoids substituting a forall for the tyvar in other types)+ * (TyEq:K) typeKind lhs `tcEqKind` typeKind rhs; Note [Ct kind invariant]+ * (TyEq:N) If the equality is representational, rhs is not headed by a saturated+ application of a newtype TyCon. See GHC.Tc.Solver.Equality+ Note [No top-level newtypes on RHS of representational equalities].+ (Applies only when constructor of newtype is in scope.)+ * (TyEq:U) An EqCt is not immediately unifiable. If we can unify a:=ty, we+ will not form an EqCt (a ~ ty).+ * (TyEq:CH) rhs does not mention any coercion holes that resulted from fixing up+ a hetero-kinded equality. See Note [Equalities with incompatible kinds] in+ GHC.Tc.Solver.Equality, wrinkle (EIK2)++These invariants ensure that the EqCts in inert_eqs constitute a terminating+generalised substitution. See Note [inert_eqs: the inert equalities]+in GHC.Tc.Solver.InertSet for what these words mean!++Note [EqCt occurs check] ~~~~~~~~~~~~~~~~~~~~~~~~~~ A CEqCan relates a CanEqLHS (a type variable or type family applications) on its left to an arbitrary type on its right. It is used for rewriting.@@ -158,11 +261,12 @@ We thus perform an occurs-check. There is, of course, some subtlety: -* For type variables, the occurs-check looks deeply. This is because- a CEqCan over a meta-variable is also used to inform unification,- in GHC.Tc.Solver.Interact.solveByUnification. If the LHS appears- anywhere, at all, in the RHS, unification will create an infinite- structure, which is bad.+* For type variables, the occurs-check looks deeply including kinds of+ type variables. This is because a CEqCan over a meta-variable is+ also used to inform unification, in+ GHC.Tc.Solver.Monad.checkTouchableTyVarEq. If the LHS appears+ anywhere in the RHS, at all, unification will create an infinite+ structure which is bad. * For type family applications, the occurs-check is shallow; it looks only in places where we might rewrite. (Specifically, it does not@@ -176,105 +280,75 @@ already inert, with all type family redexes reduced. So a simple syntactic check is just fine. -The occurs check is performed in GHC.Tc.Utils.Unify.checkTypeEq+The occurs check is performed in GHC.Tc.Utils.Unify.checkTyEqRhs and forms condition T3 in Note [Extending the inert equalities] in GHC.Tc.Solver.InertSet.- -} --- | A 'Xi'-type is one that has been fully rewritten with respect--- to the inert set; that is, it has been rewritten by the algorithm--- in GHC.Tc.Solver.Rewrite. (Historical note: 'Xi', for years and years,--- meant that a type was type-family-free. It does *not* mean this--- any more.)-type Xi = TcType--type Cts = Bag Ct+data EqCt -- An equality constraint; see Note [Canonical equalities]+ = EqCt { -- CanEqLHS ~ rhs+ eq_ev :: CtEvidence, -- See Note [Ct/evidence invariant]+ eq_lhs :: CanEqLHS,+ eq_rhs :: Xi, -- See invariants above+ eq_eq_rel :: EqRel -- INVARIANT: cc_eq_rel = ctEvEqRel cc_ev+ } -data Ct- -- Atomic canonical constraints- = CDictCan { -- e.g. Num ty- cc_ev :: CtEvidence, -- See Note [Ct/evidence invariant]+-- | A 'CanEqLHS' is a type that can appear on the left of a canonical+-- equality: a type variable or /exactly-saturated/ type family application.+data CanEqLHS+ = TyVarLHS TcTyVar+ | TyFamLHS TyCon -- ^ TyCon of the family+ [Xi] -- ^ Arguments, /exactly saturating/ the family - cc_class :: Class,- cc_tyargs :: [Xi], -- cc_tyargs are rewritten w.r.t. inerts, so Xi+instance Outputable CanEqLHS where+ ppr (TyVarLHS tv) = ppr tv+ ppr (TyFamLHS fam_tc fam_args) = ppr (mkTyConApp fam_tc fam_args) - cc_pend_sc :: Bool- -- See Note [The superclass story] in GHC.Tc.Solver.Canonical- -- True <=> (a) cc_class has superclasses- -- (b) we have not (yet) added those- -- superclasses as Givens- }+eqCtEvidence :: EqCt -> CtEvidence+eqCtEvidence = eq_ev - | CIrredCan { -- These stand for yet-unusable predicates- cc_ev :: CtEvidence, -- See Note [Ct/evidence invariant]- cc_reason :: CtIrredReason+eqCtLHS :: EqCt -> CanEqLHS+eqCtLHS = eq_lhs - -- For the might-be-soluble case, the ctev_pred of the evidence is- -- of form (tv xi1 xi2 ... xin) with a tyvar at the head- -- or (lhs1 ~ ty2) where the CEqCan kind invariant (TyEq:K) fails- -- See Note [CIrredCan constraints]+--------------- IrredCt -------------- - -- The definitely-insoluble case is for things like- -- Int ~ Bool tycons don't match- -- a ~ [a] occurs check- }+data IrredCt -- These stand for yet-unusable predicates+ -- See Note [CIrredCan constraints]+ = IrredCt { ir_ev :: CtEvidence -- See Note [Ct/evidence invariant]+ , ir_reason :: CtIrredReason } - | CEqCan { -- CanEqLHS ~ rhs- -- Invariants:- -- * See Note [inert_eqs: the inert equalities] in GHC.Tc.Solver.InertSet- -- * Many are checked in checkTypeEq in GHC.Tc.Utils.Unify- -- * (TyEq:OC) lhs does not occur in rhs (occurs check)- -- Note [CEqCan occurs check]- -- * (TyEq:F) rhs has no foralls- -- (this avoids substituting a forall for the tyvar in other types)- -- * (TyEq:K) typeKind lhs `tcEqKind` typeKind rhs; Note [Ct kind invariant]- -- * (TyEq:N) If the equality is representational, rhs is not headed by a saturated- -- application of a newtype TyCon.- -- See Note [No top-level newtypes on RHS of representational equalities]- -- in GHC.Tc.Solver.Canonical. (Applies only when constructor of newtype is- -- in scope.)- -- * (TyEq:TV) If rhs (perhaps under a cast) is also CanEqLHS, then it is oriented- -- to give best chance of- -- unification happening; eg if rhs is touchable then lhs is too- -- Note [TyVar/TyVar orientation] in GHC.Tc.Utils.Unify- cc_ev :: CtEvidence, -- See Note [Ct/evidence invariant]- cc_lhs :: CanEqLHS,- cc_rhs :: Xi, -- See invariants above+mkIrredCt :: CtIrredReason -> CtEvidence -> Ct+mkIrredCt reason ev = CIrredCan (IrredCt { ir_ev = ev, ir_reason = reason }) - cc_eq_rel :: EqRel -- INVARIANT: cc_eq_rel = ctEvEqRel cc_ev- }+irredCtEvidence :: IrredCt -> CtEvidence+irredCtEvidence = ir_ev - | CNonCanonical { -- See Note [NonCanonical Semantics] in GHC.Tc.Solver.Monad- cc_ev :: CtEvidence- }+irredCtPred :: IrredCt -> PredType+irredCtPred = ctEvPred . irredCtEvidence - | 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+ctIrredCt :: CtIrredReason -> Ct -> IrredCt+ctIrredCt _ (CIrredCan ir) = ir+ctIrredCt reason ct = IrredCt { ir_ev = ctEvidence ct+ , ir_reason = reason } ---------------- | A 'CanEqLHS' is a type that can appear on the left of a canonical--- equality: a type variable or exactly-saturated type family application.-data CanEqLHS- = TyVarLHS TcTyVar- | TyFamLHS TyCon -- ^ of the family- [Xi] -- ^ exactly saturating the family+instance Outputable IrredCt where+ ppr irred = ppr (CIrredCan irred) -instance Outputable CanEqLHS where- ppr (TyVarLHS tv) = ppr tv- ppr (TyFamLHS fam_tc fam_args) = ppr (mkTyConApp fam_tc fam_args)+--------------- QCInst -------------- ------------- data QCInst -- A much simplified version of ClsInst- -- See Note [Quantified constraints] in GHC.Tc.Solver.Canonical+ -- See Note [Quantified constraints] in GHC.Tc.Solver.Solve = 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+ , qci_pend_sc :: ExpansionFuel+ -- Invariants: qci_pend_sc > 0 =>+ -- (a) qci_pred is a ClassPred+ -- (b) this class has superclass(es), and+ -- (c) the superclass(es) are not explored yet+ -- Same as di_pend_sc flag in DictCt+ -- See Note [Expanding Recursive Superclasses and ExpansionFuel] in GHC.Tc.Solver } instance Outputable QCInst where@@ -392,35 +466,40 @@ -- | Used to indicate extra information about why a CIrredCan is irreducible data CtIrredReason = IrredShapeReason- -- ^ this constraint has a non-canonical shape (e.g. @c Int@, for a variable @c@)+ -- ^ This constraint has a non-canonical shape (e.g. @c Int@, for a variable @c@) | NonCanonicalReason CheckTyEqResult- -- ^ an equality where some invariant other than (TyEq:H) of 'CEqCan' is not satisfied;+ -- ^ An equality where some invariant other than (TyEq:H) of 'CEqCan' is not satisfied; -- the 'CheckTyEqResult' states exactly why | ReprEqReason- -- ^ an equality that cannot be decomposed because it is representational.+ -- ^ An equality that cannot be decomposed because it is representational. -- Example: @a b ~R# Int@. -- These might still be solved later. -- INVARIANT: The constraint is a representational equality constraint | ShapeMismatchReason- -- ^ a nominal equality that relates two wholly different types,+ -- ^ A nominal equality that relates two wholly different types, -- like @Int ~# Bool@ or @a b ~# 3@. -- INVARIANT: The constraint is a nominal equality constraint | AbstractTyConReason- -- ^ an equality like @T a b c ~ Q d e@ where either @T@ or @Q@+ -- ^ An equality like @T a b c ~ Q d e@ where either @T@ or @Q@ -- is an abstract type constructor. See Note [Skolem abstract data] -- in GHC.Core.TyCon. -- INVARIANT: The constraint is an equality constraint between two TyConApps + | PluginReason+ -- ^ A typechecker plugin returned this in the pluginBadCts field+ -- of TcPluginProgress+ instance Outputable CtIrredReason where ppr IrredShapeReason = text "(irred)" ppr (NonCanonicalReason cter) = ppr cter ppr ReprEqReason = text "(repr)" ppr ShapeMismatchReason = text "(shape)" ppr AbstractTyConReason = text "(abstc)"+ ppr PluginReason = text "(plugin)" -- | Are we sure that more solving will never solve this constraint? isInsolubleReason :: CtIrredReason -> Bool@@ -429,6 +508,7 @@ isInsolubleReason ReprEqReason = False isInsolubleReason ShapeMismatchReason = True isInsolubleReason AbstractTyConReason = True+isInsolubleReason PluginReason = True ------------------------------------------------------------------------------ --@@ -436,7 +516,7 @@ -- ------------------------------------------------------------------------------ --- | A set of problems in checking the validity of a type equality.+-- | A /set/ of problems in checking the validity of a type equality. -- See 'checkTypeEq'. newtype CheckTyEqResult = CTER Word8 @@ -449,20 +529,35 @@ cterHasNoProblem (CTER 0) = True cterHasNoProblem _ = False --- | An individual problem that might be logged in a 'CheckTyEqResult'+-- | An /individual/ problem that might be logged in a 'CheckTyEqResult' newtype CheckTyEqProblem = CTEP Word8 -cteImpredicative, cteTypeFamily, cteInsolubleOccurs, cteSolubleOccurs :: CheckTyEqProblem-cteImpredicative = CTEP (bit 0) -- forall or (=>) encountered-cteTypeFamily = CTEP (bit 1) -- type family encountered-cteInsolubleOccurs = CTEP (bit 2) -- occurs-check-cteSolubleOccurs = CTEP (bit 3) -- occurs-check under a type function or in a coercion- -- must be one bit to the left of cteInsolubleOccurs--- See also Note [Insoluble occurs check] in GHC.Tc.Errors+cteImpredicative, cteTypeFamily, cteInsolubleOccurs,+ cteSolubleOccurs, cteCoercionHole, cteConcrete,+ cteSkolemEscape :: CheckTyEqProblem+cteImpredicative = CTEP (bit 0) -- Forall or (=>) encountered+cteTypeFamily = CTEP (bit 1) -- Type family encountered +cteInsolubleOccurs = CTEP (bit 2) -- Occurs-check+cteSolubleOccurs = CTEP (bit 3) -- Occurs-check under a type function, or in a coercion,+ -- or in a representational equality; see+ -- See Note [Occurs check and representational equality]+ -- cteSolubleOccurs must be one bit to the left of cteInsolubleOccurs+ -- See also Note [Insoluble mis-match] in GHC.Tc.Errors++cteCoercionHole = CTEP (bit 4) -- Coercion hole encountered+cteConcrete = CTEP (bit 5) -- Type variable that can't be made concrete+ -- e.g. alpha[conc] ~ Maybe beta[tv]+cteSkolemEscape = CTEP (bit 6) -- Skolem escape e.g. alpha[2] ~ b[sk,4]+ cteProblem :: CheckTyEqProblem -> CheckTyEqResult cteProblem (CTEP mask) = CTER mask +impredicativeProblem, insolubleOccursProblem, solubleOccursProblem :: CheckTyEqResult+impredicativeProblem = cteProblem cteImpredicative+insolubleOccursProblem = cteProblem cteInsolubleOccurs+solubleOccursProblem = cteProblem cteSolubleOccurs+ occurs_mask :: Word8 occurs_mask = insoluble_mask .|. soluble_mask where@@ -477,6 +572,9 @@ cterHasOnlyProblem :: CheckTyEqResult -> CheckTyEqProblem -> Bool CTER bits `cterHasOnlyProblem` CTEP mask = bits == mask +cterHasOnlyProblems :: CheckTyEqResult -> CheckTyEqResult -> Bool+CTER bits `cterHasOnlyProblems` CTER mask = (bits .&. complement mask) == 0+ cterRemoveProblem :: CheckTyEqResult -> CheckTyEqProblem -> CheckTyEqResult cterRemoveProblem (CTER bits) (CTEP mask) = CTER (bits .&. complement mask) @@ -513,19 +611,32 @@ instance Monoid CheckTyEqResult where mempty = cteOK +instance Eq CheckTyEqProblem where+ (CTEP b1) == (CTEP b2) = b1==b2++instance Outputable CheckTyEqProblem where+ ppr prob@(CTEP bits) = case lookup prob allBits of+ Just s -> text s+ Nothing -> text "unknown:" <+> ppr bits+ instance Outputable CheckTyEqResult where- ppr cter | cterHasNoProblem cter = text "cteOK"+ ppr cter | cterHasNoProblem cter+ = text "cteOK" | otherwise- = parens $ fcat $ intersperse vbar $ set_bits- where- all_bits = [ (cteImpredicative, "cteImpredicative")- , (cteTypeFamily, "cteTypeFamily")- , (cteInsolubleOccurs, "cteInsolubleOccurs")- , (cteSolubleOccurs, "cteSolubleOccurs") ]- set_bits = [ text str- | (bitmask, str) <- all_bits- , cter `cterHasProblem` bitmask ]+ = braces $ fcat $ intersperse vbar $+ [ text str+ | (bitmask, str) <- allBits+ , cter `cterHasProblem` bitmask ] +allBits :: [(CheckTyEqProblem, String)]+allBits = [ (cteImpredicative, "cteImpredicative")+ , (cteTypeFamily, "cteTypeFamily")+ , (cteInsolubleOccurs, "cteInsolubleOccurs")+ , (cteSolubleOccurs, "cteSolubleOccurs")+ , (cteConcrete, "cteConcrete")+ , (cteSkolemEscape, "cteSkolemEscape")+ , (cteCoercionHole, "cteCoercionHole") ]+ {- Note [CIrredCan constraints] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CIrredCan constraints are used for constraints that are "stuck"@@ -546,10 +657,10 @@ Note [Ct/evidence invariant] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If ct :: Ct, then extra fields of 'ct' cache precisely the ctev_pred field-of (cc_ev ct), and is fully rewritten wrt the substitution. Eg for CDictCan,- ctev_pred (cc_ev ct) = (cc_class ct) (cc_tyargs ct)-This holds by construction; look at the unique place where CDictCan is-built (in GHC.Tc.Solver.Canonical).+of (cc_ev ct), and is fully rewritten wrt the substitution. Eg for DictCt,+ ctev_pred (di_ev ct) = (di_cls ct) (di_tys ct)+This holds by construction; look at the unique place where DictCt is+built (in GHC.Tc.Solver.Dict.canDictNC). Note [Ct kind invariant] ~~~~~~~~~~~~~~~~~~~~~~~~@@ -598,13 +709,7 @@ -} mkNonCanonical :: CtEvidence -> Ct-mkNonCanonical ev = CNonCanonical { cc_ev = ev }--mkNonCanonicalCt :: Ct -> Ct-mkNonCanonicalCt ct = CNonCanonical { cc_ev = cc_ev ct }--mkIrredCt :: CtIrredReason -> CtEvidence -> Ct-mkIrredCt reason ev = CIrredCan { cc_ev = ev, cc_reason = reason }+mkNonCanonical ev = CNonCanonical ev mkGivens :: CtLoc -> [EvId] -> [Ct] mkGivens loc ev_ids@@ -615,9 +720,21 @@ , ctev_loc = loc }) ctEvidence :: Ct -> CtEvidence-ctEvidence (CQuantCan (QCI { qci_ev = ev })) = ev-ctEvidence ct = cc_ev ct+ctEvidence (CQuantCan (QCI { qci_ev = ev })) = ev+ctEvidence (CEqCan (EqCt { eq_ev = ev })) = ev+ctEvidence (CIrredCan (IrredCt { ir_ev = ev })) = ev+ctEvidence (CNonCanonical ev) = ev+ctEvidence (CDictCan (DictCt { di_ev = ev })) = ev +updCtEvidence :: (CtEvidence -> CtEvidence) -> Ct -> Ct+updCtEvidence upd ct+ = case ct of+ CQuantCan qci@(QCI { qci_ev = ev }) -> CQuantCan (qci { qci_ev = upd ev })+ CEqCan eq@(EqCt { eq_ev = ev }) -> CEqCan (eq { eq_ev = upd ev })+ CIrredCan ir@(IrredCt { ir_ev = ev }) -> CIrredCan (ir { ir_ev = upd ev })+ CNonCanonical ev -> CNonCanonical (upd ev)+ CDictCan di@(DictCt { di_ev = ev }) -> CDictCan (di { di_ev = upd ev })+ ctLoc :: Ct -> CtLoc ctLoc = ctEvLoc . ctEvidence @@ -672,14 +789,17 @@ pp_sort = case ct of CEqCan {} -> text "CEqCan" CNonCanonical {} -> text "CNonCanonical"- CDictCan { cc_pend_sc = psc }- | psc -> text "CDictCan(psc)"- | otherwise -> text "CDictCan"- CIrredCan { cc_reason = reason } -> text "CIrredCan" <> ppr reason- CQuantCan (QCI { qci_pend_sc = pend_sc })- | pend_sc -> text "CQuantCan(psc)"+ CDictCan (DictCt { di_pend_sc = psc })+ | psc > 0 -> text "CDictCan" <> parens (text "psc" <+> ppr psc)+ | otherwise -> text "CDictCan"+ CIrredCan (IrredCt { ir_reason = reason }) -> text "CIrredCan" <> ppr reason+ CQuantCan (QCI { qci_pend_sc = psc })+ | psc > 0 -> text "CQuantCan" <> parens (text "psc" <+> ppr psc) | otherwise -> text "CQuantCan" +instance Outputable EqCt where+ ppr (EqCt { eq_ev = ev }) = ppr ev+ ----------------------------------- -- | Is a type a canonical LHS? That is, is it a tyvar or an exactly-saturated -- type family application?@@ -689,6 +809,11 @@ | Just tv <- getTyVar_maybe xi = Just $ TyVarLHS tv + | otherwise+ = canTyFamEqLHS_maybe xi++canTyFamEqLHS_maybe :: Xi -> Maybe CanEqLHS+canTyFamEqLHS_maybe xi | Just (tc, args) <- tcSplitTyConApp_maybe xi , isTypeFamilyTyCon tc , args `lengthIs` tyConArity tc@@ -873,7 +998,7 @@ -- | A constraint is considered to be a custom type error, if it contains -- custom type errors anywhere in it. -- See Note [Custom type errors in constraints]-getUserTypeErrorMsg :: PredType -> Maybe Type+getUserTypeErrorMsg :: PredType -> Maybe ErrorMsgType getUserTypeErrorMsg pred = msum $ userTypeError_maybe pred : map getUserTypeErrorMsg (subTys pred) where@@ -887,29 +1012,53 @@ Just (_,ts) -> ts (t,ts) -> t : ts -isUserTypeError :: PredType -> Bool-isUserTypeError pred = case getUserTypeErrorMsg pred of- Just _ -> True- _ -> False+-- | Is this an user error message type, i.e. either the form @TypeError err@ or+-- @Unsatisfiable err@?+isTopLevelUserTypeError :: PredType -> Bool+isTopLevelUserTypeError pred =+ isJust (userTypeError_maybe pred) || isJust (isUnsatisfiableCt_maybe pred) +-- | Does this constraint contain an user error message?+--+-- That is, the type is either of the form @Unsatisfiable err@, or it contains+-- a type of the form @TypeError msg@, either at the top level or nested inside+-- the type.+containsUserTypeError :: PredType -> Bool+containsUserTypeError pred =+ isJust (getUserTypeErrorMsg pred) || isJust (isUnsatisfiableCt_maybe pred)++-- | Is this type an unsatisfiable constraint?+-- If so, return the error message.+isUnsatisfiableCt_maybe :: Type -> Maybe ErrorMsgType+isUnsatisfiableCt_maybe t+ | Just (tc, [msg]) <- splitTyConApp_maybe t+ , tc `hasKey` unsatisfiableClassNameKey+ = Just msg+ | otherwise+ = Nothing+ isPendingScDict :: Ct -> Bool-isPendingScDict (CDictCan { cc_pend_sc = psc }) = psc--- Says whether this is a CDictCan with cc_pend_sc is True;+isPendingScDict (CDictCan dict_ct) = isPendingScDictCt dict_ct+isPendingScDict _ = False++isPendingScDictCt :: DictCt -> Bool+-- Says whether this is a CDictCan with di_pend_sc has positive fuel; -- i.e. pending un-expanded superclasses-isPendingScDict _ = False+isPendingScDictCt (DictCt { di_pend_sc = f }) = pendingFuel f pendingScDict_maybe :: Ct -> Maybe Ct--- Says whether this is a CDictCan with cc_pend_sc is True,--- AND if so flips the flag-pendingScDict_maybe ct@(CDictCan { cc_pend_sc = True })- = Just (ct { cc_pend_sc = False })+-- Says whether this is a CDictCan with di_pend_sc has fuel left,+-- AND if so exhausts the fuel so that they are not expanded again+pendingScDict_maybe (CDictCan dict@(DictCt { di_pend_sc = f }))+ | pendingFuel f = Just (CDictCan (dict { di_pend_sc = doNotExpand }))+ | otherwise = Nothing pendingScDict_maybe _ = Nothing pendingScInst_maybe :: QCInst -> Maybe QCInst -- Same as isPendingScDict, but for QCInsts-pendingScInst_maybe qci@(QCI { qci_pend_sc = True })- = Just (qci { qci_pend_sc = False })-pendingScInst_maybe _ = Nothing+pendingScInst_maybe qci@(QCI { qci_pend_sc = f })+ | pendingFuel f = Just (qci { qci_pend_sc = doNotExpand })+ | otherwise = Nothing superClassesMightHelp :: WantedConstraints -> Bool -- ^ True if taking superclasses of givens, or of wanteds (to perhaps@@ -924,21 +1073,22 @@ might_help_ct ct = not (is_ip ct) - is_ip (CDictCan { cc_class = cls }) = isIPClass cls- is_ip _ = False+ is_ip (CDictCan (DictCt { di_cls = cls })) = isIPClass cls+ is_ip _ = False getPendingWantedScs :: Cts -> ([Ct], Cts)+-- in the return values [Ct] has original fuel while Cts has fuel exhausted getPendingWantedScs simples = mapAccumBagL get [] simples where- get acc ct | Just ct' <- pendingScDict_maybe ct- = (ct':acc, ct')+ get acc ct | Just ct_exhausted <- pendingScDict_maybe ct+ = (ct:acc, ct_exhausted) | otherwise = (acc, ct) {- Note [When superclasses help] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-First read Note [The superclass story] in GHC.Tc.Solver.Canonical.+First read Note [The superclass story] in GHC.Tc.Solver.Dict We expand superclasses and iterate only if there is at unsolved wanted for which expansion of superclasses (e.g. from given constraints)@@ -995,17 +1145,14 @@ extendCtsList cts xs | null xs = cts | otherwise = cts `unionBags` listToBag xs -andManyCts :: [Cts] -> Cts-andManyCts = unionManyBags- emptyCts :: Cts emptyCts = emptyBag isEmptyCts :: Cts -> Bool isEmptyCts = isEmptyBag -pprCts :: Cts -> SDoc-pprCts cts = vcat (map ppr (bagToList cts))+ctsPreds :: Cts -> [PredType]+ctsPreds cts = foldr ((:) . ctPred) [] cts {- ************************************************************************@@ -1063,9 +1210,9 @@ addImplics :: WantedConstraints -> Bag Implication -> WantedConstraints addImplics wc implic = wc { wc_impl = wc_impl wc `unionBags` implic } -addInsols :: WantedConstraints -> Bag Ct -> WantedConstraints-addInsols wc cts- = wc { wc_simple = wc_simple wc `unionBags` cts }+addInsols :: WantedConstraints -> Bag IrredCt -> WantedConstraints+addInsols wc insols+ = wc { wc_simple = wc_simple wc `unionBags` fmap CIrredCan insols } addHoles :: WantedConstraints -> Bag Hole -> WantedConstraints addHoles wc holes@@ -1148,11 +1295,11 @@ EqPred NomEq lhs rhs | Just tv <- getTyVar_maybe lhs , isConcreteTyVar tv- , not (isConcrete rhs)+ , not (isConcreteType rhs) -> unitVarSet tv | Just tv <- getTyVar_maybe rhs , isConcreteTyVar tv- , not (isConcrete lhs)+ , not (isConcreteType lhs) -> unitVarSet tv _ -> emptyVarSet @@ -1165,52 +1312,27 @@ insolubleWC :: WantedConstraints -> Bool insolubleWC (WC { wc_impl = implics, wc_simple = simples, wc_errors = errors }) = anyBag insolubleWantedCt simples- -- insolubleWantedCt: wanteds only: see Note [Given insolubles] || anyBag insolubleImplic implics || anyBag is_insoluble errors- where++ where is_insoluble (DE_Hole hole) = isOutOfScopeHole hole -- See Note [Insoluble holes] is_insoluble (DE_NotConcrete {}) = True insolubleWantedCt :: Ct -> Bool -- Definitely insoluble, in particular /excluding/ type-hole constraints -- Namely:--- a) an insoluble constraint as per 'insolubleirredCt', i.e. either+-- a) an insoluble constraint as per 'insolubleCt', i.e. either -- - an insoluble equality constraint (e.g. Int ~ Bool), or -- - a custom type error constraint, TypeError msg :: Constraint -- b) that does not arise from a Given or a Wanted/Wanted fundep interaction--- See Note [Insoluble Wanteds]-insolubleWantedCt ct- | CIrredCan ir_ev ir_reason <- ct- -- CIrredCan: see (IW1) in Note [Insoluble Wanteds]- , CtWanted { ctev_loc = loc, ctev_rewriters = rewriters } <- ir_ev- -- It's a Wanted- , insolubleIrredCt ir_ev ir_reason- -- It's insoluble- , isEmptyRewriterSet rewriters- -- rewriters; see (IW2) in Note [Insoluble Wanteds]- , not (isGivenLoc loc)- -- isGivenLoc: see (IW3) in Note [Insoluble Wanteds]- , not (isWantedWantedFunDepOrigin (ctLocOrigin loc))- -- origin check: see (IW4) in Note [Insoluble Wanteds]- = True-- | otherwise- = False---- | Returns True of constraints that are definitely insoluble,--- as well as TypeError constraints.--- Can return 'True' for Given constraints, unlike 'insolubleWantedCt'. ----- The function is tuned for application /after/ constraint solving--- i.e. assuming canonicalisation has been done--- That's why it looks only for IrredCt; all insoluble constraints--- are put into CIrredCan-insolubleCt :: Ct -> Bool-insolubleCt (CIrredCan ir_ev ir_reason) = insolubleIrredCt ir_ev ir_reason-insolubleCt _ = False+-- See Note [Given insolubles].+insolubleWantedCt ct = insolubleCt ct &&+ not (arisesFromGivens ct) &&+ not (isWantedWantedFunDepOrigin (ctOrigin ct)) -insolubleIrredCt :: CtEvidence -> CtIrredReason -> Bool+insolubleIrredCt :: IrredCt -> Bool -- Returns True of Irred constraints that are /definitely/ insoluble -- -- This function is critical for accurate pattern-match overlap warnings.@@ -1219,59 +1341,18 @@ -- Note that this does not traverse through the constraint to find -- nested custom type errors: it only detects @TypeError msg :: Constraint@, -- and not e.g. @Eq (TypeError msg)@.-insolubleIrredCt ev reason- = isInsolubleReason reason- || isJust (userTypeError_maybe (ctEvPred ev))--{- insolubleIrredCt (IrredCt { ir_ev = ev, ir_reason = reason }) = isInsolubleReason reason || isTopLevelUserTypeError (ctEvPred ev)---- | Is this an user error message type, i.e. either the form @TypeError err@ or--- @Unsatisfiable err@?-isTopLevelUserTypeError :: PredType -> Bool-isTopLevelUserTypeError pred =- isJust (userTypeError_maybe pred) || isJust (isUnsatisfiableCt_maybe pred)-----}--insolubleEqCt :: Ct -> Bool--- Returns True of /equality/ constraints--- that are /definitely/ insoluble--- It won't detect some definite errors like--- F a ~ T (F a)--- where F is a type family, which actually has an occurs check------ The function is tuned for application /after/ constraint solving--- i.e. assuming canonicalisation has been done--- E.g. It'll reply True for a ~ [a]--- but False for [a] ~ a--- and--- True for Int ~ F a Int--- but False for Maybe Int ~ F a Int Int--- (where F is an arity-1 type function)-insolubleEqCt (CIrredCan { cc_reason = reason }) = isInsolubleReason reason-insolubleEqCt _ = False---- | Returns True of equality constraints that are definitely insoluble,--- as well as TypeError constraints.--- Can return 'True' for Given constraints, unlike 'insolubleWantedCt'.------ This function is critical for accurate pattern-match overlap warnings.--- See Note [Pattern match warnings with insoluble Givens] in GHC.Tc.Solver------ Note that this does not traverse through the constraint to find--- nested custom type errors: it only detects @TypeError msg :: Constraint@,--- and not e.g. @Eq (TypeError msg)@.-- -- Don't use 'isUserTypeErrorCt' here, as that function is too eager:- -- the TypeError might appear inside a type family application- -- which might later reduce, but we only want to return 'True'+ -- NB: 'isTopLevelUserTypeError' detects constraints of the form "TypeError msg"+ -- and "Unsatisfiable msg". It deliberately does not detect TypeError+ -- nested in a type (e.g. it does not use "containsUserTypeError"), as that+ -- would be too eager: the TypeError might appear inside a type family+ -- application which might later reduce, but we only want to return 'True' -- for constraints that are definitely insoluble. --+ -- For example: Num (F Int (TypeError "msg")), where F is a type family.+ -- -- Test case: T11503, with the 'Assert' type family: -- -- > type Assert :: Bool -> Constraint -> Constraint@@ -1279,6 +1360,18 @@ -- > Assert 'True _errMsg = () -- > Assert _check errMsg = errMsg +-- | Returns True of constraints that are definitely insoluble,+-- as well as TypeError constraints.+-- Can return 'True' for Given constraints, unlike 'insolubleWantedCt'.+--+-- The function is tuned for application /after/ constraint solving+-- i.e. assuming canonicalisation has been done+-- That's why it looks only for IrredCt; all insoluble constraints+-- are put into CIrredCan+insolubleCt :: Ct -> Bool+insolubleCt (CIrredCan ir_ct) = insolubleIrredCt ir_ct+insolubleCt _ = False+ -- | Does this hole represent an "out of scope" error? -- See Note [Insoluble holes] isOutOfScopeHole :: Hole -> Bool@@ -1322,31 +1415,6 @@ Bottom line: insolubleWC (called in GHC.Tc.Solver.setImplicationStatus) should ignore givens even if they are insoluble. -Note [Insoluble Wanteds]-~~~~~~~~~~~~~~~~~~~~~~~~-insolubleWantedCt returns True of a Wanted constraint that definitely-can't be solved. But not quite all such constraints; see wrinkles.--(IW1) insolubleWantedCt is tuned for application /after/ constraint- solving i.e. assuming canonicalisation has been done. That's why- it looks only for IrredCt; all insoluble constraints oare put into- CIrredCan--(IW2) We only treat it as insoluble if it has an empty rewriter set.- Otherwise #25325 happens: a Wanted constraint A that is /not/ insoluble- rewrites some other Wanted constraint B, so B has A in its rewriter- set. Now B looks insoluble. The danger is that we'll suppress reporting- B becuase of its empty rewriter set; and suppress reporting A because- there is an insoluble B lying around. (This suppression happens in- GHC.Tc.Errors.) Solution: don't treat B as insoluble.--(IW3) If the Wanted arises from a Given (how can that happen?), don't- treat it as a Wanted insoluble (obviously).--(IW4) If the Wanted came from a Wanted/Wanted fundep interaction, don't- treat the constraint as insoluble. See Note [Suppressing confusing errors]- in GHC.Tc.Errors- Note [Insoluble holes] ~~~~~~~~~~~~~~~~~~~~~~ Hole constraints that ARE NOT treated as truly insoluble:@@ -1388,17 +1456,16 @@ ic_given_eqs :: HasGivenEqs, -- Are there Given equalities here? ic_warn_inaccessible :: Bool,- -- True <=> -Winaccessible-code is enabled- -- at construction. See+ -- True <=> we should report inaccessible code -- Note [Avoid -Winaccessible-code when deriving] -- in GHC.Tc.TyCl.Instance - ic_env :: TcLclEnv,- -- Records the TcLClEnv at the time of creation.+ ic_env :: !CtLocEnv,+ -- Records the context at the time of creation. --- -- The TcLclEnv gives the source location- -- and error context for the implication, and- -- hence for all the given evidence variables.+ -- This provides all the information needed about+ -- the context to report the source of errors linked+ -- to this implication. ic_wanted :: WantedConstraints, -- The wanteds -- See Invariant (WantedInf) in GHC.Tc.Utils.TcType@@ -1420,15 +1487,15 @@ ic_status :: ImplicStatus } -implicationPrototype :: Implication-implicationPrototype+implicationPrototype :: CtLocEnv -> Implication+implicationPrototype ct_loc_env = Implic { -- These fields must be initialised ic_tclvl = panic "newImplic:tclvl" , ic_binds = panic "newImplic:binds" , ic_info = panic "newImplic:info"- , ic_env = panic "newImplic:env" , ic_warn_inaccessible = panic "newImplic:warn_inaccessible" + , ic_env = ct_loc_env -- The rest have sensible default values , ic_skols = [] , ic_given = []@@ -1443,7 +1510,7 @@ { ics_dead :: [EvVar] } -- Subset of ic_given that are not needed -- See Note [Tracking redundant constraints] in GHC.Tc.Solver - | IC_Insoluble -- At least one insoluble constraint in the tree+ | IC_Insoluble -- At least one insoluble Wanted constraint in the tree | IC_BadTelescope -- Solved, but the skolems in the telescope are out of -- dependency order. See Note [Checking telescopes]@@ -1989,6 +2056,9 @@ setCtEvLoc :: CtEvidence -> CtLoc -> CtEvidence setCtEvLoc ctev loc = ctev { ctev_loc = loc } +arisesFromGivens :: Ct -> Bool+arisesFromGivens ct = isGivenCt ct || isGivenLoc (ctLoc ct)+ -- | Set the type of CtEvidence. -- -- This function ensures that the invariants on 'CtEvidence' hold, by updating@@ -2049,41 +2119,26 @@ emptyRewriterSet :: RewriterSet emptyRewriterSet = RewriterSet emptyUniqSet -isEmptyRewriterSet :: RewriterSet -> Bool-isEmptyRewriterSet (RewriterSet set) = isEmptyUniqSet set--addRewriterSet :: RewriterSet -> CoercionHole -> RewriterSet-addRewriterSet = coerce (addOneToUniqSet @CoercionHole)+unitRewriterSet :: CoercionHole -> RewriterSet+unitRewriterSet = coerce (unitUniqSet @CoercionHole) --- | Makes a 'RewriterSet' from all the coercion holes that occur in the--- given coercion.-rewriterSetFromCo :: Coercion -> RewriterSet-rewriterSetFromCo co = appEndo (rewriter_set_from_co co) emptyRewriterSet+unionRewriterSet :: RewriterSet -> RewriterSet -> RewriterSet+unionRewriterSet = coerce (unionUniqSets @CoercionHole) --- | Makes a 'RewriterSet' from all the coercion holes that occur in the--- given type.-rewriterSetFromType :: Type -> RewriterSet-rewriterSetFromType ty = appEndo (rewriter_set_from_ty ty) emptyRewriterSet+isEmptyRewriterSet :: RewriterSet -> Bool+isEmptyRewriterSet = coerce (isEmptyUniqSet @CoercionHole) --- | Makes a 'RewriterSet' from all the coercion holes that occur in the--- given types.-rewriterSetFromTypes :: [Type] -> RewriterSet-rewriterSetFromTypes tys = appEndo (rewriter_set_from_tys tys) emptyRewriterSet+addRewriter :: RewriterSet -> CoercionHole -> RewriterSet+addRewriter = coerce (addOneToUniqSet @CoercionHole) -rewriter_set_from_ty :: Type -> Endo RewriterSet-rewriter_set_from_tys :: [Type] -> Endo RewriterSet-rewriter_set_from_co :: Coercion -> Endo RewriterSet-(rewriter_set_from_ty, rewriter_set_from_tys, rewriter_set_from_co, _)- = foldTyCo folder ()+rewriterSetFromCts :: Bag Ct -> RewriterSet+-- Take a bag of Wanted equalities, and collect them as a RewriterSet+rewriterSetFromCts cts+ = foldr add emptyRewriterSet cts where- folder :: TyCoFolder () (Endo RewriterSet)- folder = TyCoFolder- { tcf_view = noView- , tcf_tyvar = \ _ tv -> rewriter_set_from_ty (tyVarKind tv)- , tcf_covar = \ _ cv -> rewriter_set_from_ty (varType cv)- , tcf_hole = \ _ hole -> coerce (`addOneToUniqSet` hole) S.<>- rewriter_set_from_ty (varType (coHoleCoVar hole))- , tcf_tycobinder = \ _ _ _ -> () }+ add ct rw_set = case ctEvidence ct of+ CtWanted { ctev_dest = HoleDest hole } -> rw_set `addRewriter` hole+ _ -> rw_set {- ************************************************************************@@ -2116,14 +2171,20 @@ ctEvFlavourRole ev = (ctEvFlavour ev, ctEvEqRel ev) -- | Extract the flavour and role from a 'Ct'+eqCtFlavourRole :: EqCt -> CtFlavourRole+eqCtFlavourRole (EqCt { eq_ev = ev, eq_eq_rel = eq_rel })+ = (ctEvFlavour ev, eq_rel)++dictCtFlavourRole :: DictCt -> CtFlavourRole+dictCtFlavourRole (DictCt { di_ev = ev })+ = (ctEvFlavour ev, NomEq)++-- | Extract the flavour and role from a 'Ct' ctFlavourRole :: Ct -> CtFlavourRole -- Uses short-cuts to role for special cases-ctFlavourRole (CDictCan { cc_ev = ev })- = (ctEvFlavour ev, NomEq)-ctFlavourRole (CEqCan { cc_ev = ev, cc_eq_rel = eq_rel })- = (ctEvFlavour ev, eq_rel)-ctFlavourRole ct- = ctEvFlavourRole (ctEvidence ct)+ctFlavourRole (CDictCan di_ct) = dictCtFlavourRole di_ct+ctFlavourRole (CEqCan eq_ct) = eqCtFlavourRole eq_ct+ctFlavourRole ct = ctEvFlavourRole (ctEvidence ct) {- Note [eqCanRewrite] ~~~~~~~~~~~~~~~~~~~~~~@@ -2166,11 +2227,23 @@ We thus want Wanteds to rewrite Wanteds in order to accept more programs, but we don't want Wanteds to rewrite Wanteds because doing so can create-inscrutable error messages. We choose to allow the rewriting, but-every Wanted tracks the set of Wanteds it has been rewritten by. This is-called a RewriterSet, stored in the ctev_rewriters field of the CtWanted-constructor of CtEvidence. (Only Wanteds have RewriterSets.)+inscrutable error messages. To solve this dilemma: +* We allow Wanteds to rewrite Wanteds, but...++* Each Wanted tracks the set of Wanteds it has been rewritten by, in its+ RewriterSet, stored in the ctev_rewriters field of the CtWanted+ constructor of CtEvidence. (Only Wanteds have RewriterSets.)++* In error reporting, we simply suppress any errors that have been rewritten+ by /unsolved/ wanteds. This suppression happens in GHC.Tc.Errors.mkErrorItem,+ which uses GHC.Tc.Zonk.Type.zonkRewriterSet to look through any filled+ coercion holes. The idea is that we wish to report the "root cause" -- the+ error that rewrote all the others.++* We prioritise Wanteds that have an empty RewriterSet:+ see Note [Prioritise Wanteds with empty RewriterSet].+ Let's continue our first example above: inert: [W] w1 :: a ~ Char@@ -2183,26 +2256,74 @@ The {w1} in the second line of output is the RewriterSet of w1. -A RewriterSet is just a set of unfilled CoercionHoles. This is-sufficient because only equalities (evidenced by coercion holes) are-used for rewriting; other (dictionary) constraints cannot ever-rewrite. The rewriter (in e.g. GHC.Tc.Solver.Rewrite.rewrite) tracks-and returns a RewriterSet, consisting of the evidence (a CoercionHole)-for any Wanted equalities used in rewriting. Then rewriteEvidence and-rewriteEqEvidence (in GHC.Tc.Solver.Canonical) add this RewriterSet to-the rewritten constraint's rewriter set.+A RewriterSet is just a set of unfilled CoercionHoles. This is sufficient+because only equalities (evidenced by coercion holes) are used for rewriting;+other (dictionary) constraints cannot ever rewrite. The rewriter (in+e.g. GHC.Tc.Solver.Rewrite.rewrite) tracks and returns a RewriterSet,+consisting of the evidence (a CoercionHole) for any Wanted equalities used in+rewriting. Then GHC.Tc.Solver.Solve.rewriteEvidence and+GHC.Tc.Solver.Equality.rewriteEqEvidence add this RewriterSet to the rewritten+constraint's rewriter set. -In error reporting, we simply suppress any errors that have been rewritten by-/unsolved/ wanteds. This suppression happens in GHC.Tc.Errors.mkErrorItem, which-uses GHC.Tc.Utils.anyUnfilledCoercionHoles to look through any filled coercion-holes. The idea is that we wish to report the "root cause" -- the error that-rewrote all the others.+Note [Prioritise Wanteds with empty RewriterSet]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When extending the WorkList, in GHC.Tc.Solver.InertSet.extendWorkListEq,+we priorities constraints that have no rewriters. Here's why. -Wrinkle: In #22707, we have a case where all of the Wanteds have rewritten-each other. In order to report /some/ error in this case, we simply report-all the Wanteds. The user will get a perhaps-confusing error message, but-they've written a confusing program!+Consider this, which came up in T22793:+ inert: {}+ work list: [W] co_ayf : awq ~ awo+ work item: [W] co_ayb : awq ~ awp + ==> {just put work item in inert set}+ inert: co_ayb : awq ~ awp+ work list: {}+ work: [W] co_ayf : awq ~ awo++ ==> {rewrite ayf with co_ayb}+ work list: {}+ inert: co_ayb : awq ~ awp+ co_aym{co_ayb} : awp ~ awo+ ^ rewritten by ayb++ ----- start again in simplify_loop in Solver.hs -----+ inert: {}+ work list: [W] co_ayb : awq ~ awp+ work: co_aym{co_ayb} : awp ~ awo++ ==> {add to inert set}+ inert: co_aym{co_ayb} : awp ~ awo+ work list: {}+ work: co_ayb : awq ~ awp++ ==> {rewrite co_ayb}+ inert: co_aym{co_ayb} : awp ~ awo+ co_ayp{co_aym} : awq ~ awo+ work list: {}++Now both wanteds have been rewriten by the other! This happened because+in our simplify_loop iteration, we happened to start with co_aym. All would have+been well if we'd started with the (not-rewritten) co_ayb and gotten it into the+inert set.++With that in mind, we /prioritise/ the work-list to put constraints+with no rewriters first. This prioritisation is done in+GHC.Tc.Solver.InertSet.extendWorkListEq, and extendWorkListEqs.++Wrinkles++(WRW1) Before checking for an empty RewriterSet, we zonk the RewriterSet,+ because some of those CoercionHoles may have been filled in since we last+ looked: see GHC.Tc.Solver.Monad.emitWork.++(WRW2) Despite the prioritisation, it is hard to be /certain/ that we can't end up+ in a situation where all of the Wanteds have rewritten each other. In+ order to report /some/ error in this case, we simply report all the+ Wanteds. The user will get a perhaps-confusing error message, but they've+ written a confusing program! (T22707 and T22793 were close, but they do+ not exhibit this behaviour.) So belt and braces: see the `suppress`+ stuff in GHC.Tc.Errors.mkErrorItem.+ Note [Avoiding rewriting cycles] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Note [inert_eqs: the inert equalities] in GHC.Tc.Solver.InertSet describes@@ -2363,9 +2484,9 @@ maxSubGoalDepth :: SubGoalDepth -> SubGoalDepth -> SubGoalDepth maxSubGoalDepth (SubGoalDepth n) (SubGoalDepth m) = SubGoalDepth (n `max` m) -subGoalDepthExceeded :: DynFlags -> SubGoalDepth -> Bool-subGoalDepthExceeded dflags (SubGoalDepth d)- = mkIntWithInf d > reductionDepth dflags+subGoalDepthExceeded :: IntWithInf -> SubGoalDepth -> Bool+subGoalDepthExceeded reductionDepth (SubGoalDepth d)+ = mkIntWithInf d > reductionDepth {- ************************************************************************@@ -2381,38 +2502,57 @@ -} data CtLoc = CtLoc { ctl_origin :: CtOrigin- , ctl_env :: TcLclEnv+ , ctl_env :: CtLocEnv -- Everything we need to know about+ -- the context this Ct arose in. , ctl_t_or_k :: Maybe TypeOrKind -- OK if we're not sure , ctl_depth :: !SubGoalDepth } - -- The TcLclEnv includes particularly- -- source location: tcl_loc :: RealSrcSpan- -- context: tcl_ctxt :: [ErrCtxt]- -- binder stack: tcl_bndrs :: TcBinderStack- -- level: tcl_tclvl :: TcLevel+mkKindEqLoc :: TcType -> TcType -- original *types* being compared+ -> CtLoc -> CtLoc+mkKindEqLoc s1 s2 ctloc+ | CtLoc { ctl_t_or_k = t_or_k, ctl_origin = origin } <- ctloc+ = ctloc { ctl_origin = KindEqOrigin s1 s2 origin t_or_k+ , ctl_t_or_k = Just KindLevel } -mkKindLoc :: TcType -> TcType -- original *types* being compared- -> CtLoc -> CtLoc-mkKindLoc s1 s2 loc = setCtLocOrigin (toKindLoc loc)- (KindEqOrigin s1 s2 (ctLocOrigin loc)- (ctLocTypeOrKind_maybe loc))+adjustCtLocTyConBinder :: TyConBinder -> CtLoc -> CtLoc+-- Adjust the CtLoc when decomposing a type constructor+adjustCtLocTyConBinder tc_bndr loc+ = adjustCtLoc is_vis is_kind loc+ where+ is_vis = isVisibleTyConBinder tc_bndr+ is_kind = isNamedTyConBinder tc_bndr +adjustCtLoc :: Bool -- True <=> A visible argument+ -> Bool -- True <=> A kind argument+ -> CtLoc -> CtLoc+-- Adjust the CtLoc when decomposing a type constructor, application, etc+adjustCtLoc is_vis is_kind loc+ = loc2+ where+ loc1 | is_kind = toKindLoc loc+ | otherwise = loc+ loc2 | is_vis = loc1+ | otherwise = toInvisibleLoc loc1+ -- | Take a CtLoc and moves it to the kind level toKindLoc :: CtLoc -> CtLoc toKindLoc loc = loc { ctl_t_or_k = Just KindLevel } -mkGivenLoc :: TcLevel -> SkolemInfoAnon -> TcLclEnv -> CtLoc+toInvisibleLoc :: CtLoc -> CtLoc+toInvisibleLoc loc = updateCtLocOrigin loc toInvisibleOrigin++mkGivenLoc :: TcLevel -> SkolemInfoAnon -> CtLocEnv -> CtLoc mkGivenLoc tclvl skol_info env = CtLoc { ctl_origin = GivenOrigin skol_info- , ctl_env = setLclEnvTcLevel env tclvl+ , ctl_env = setCtLocEnvLvl env tclvl , ctl_t_or_k = Nothing -- this only matters for error msgs , ctl_depth = initialSubGoalDepth } -ctLocEnv :: CtLoc -> TcLclEnv+ctLocEnv :: CtLoc -> CtLocEnv ctLocEnv = ctl_env ctLocLevel :: CtLoc -> TcLevel-ctLocLevel loc = getLclEnvTcLevel (ctLocEnv loc)+ctLocLevel loc = getCtLocEnvLvl (ctLocEnv loc) ctLocDepth :: CtLoc -> SubGoalDepth ctLocDepth = ctl_depth@@ -2421,13 +2561,13 @@ ctLocOrigin = ctl_origin ctLocSpan :: CtLoc -> RealSrcSpan-ctLocSpan (CtLoc { ctl_env = lcl}) = getLclEnvLoc lcl+ctLocSpan (CtLoc { ctl_env = lcl}) = getCtLocEnvLoc lcl ctLocTypeOrKind_maybe :: CtLoc -> Maybe TypeOrKind ctLocTypeOrKind_maybe = ctl_t_or_k setCtLocSpan :: CtLoc -> RealSrcSpan -> CtLoc-setCtLocSpan ctl@(CtLoc { ctl_env = lcl }) loc = setCtLocEnv ctl (setLclEnvLoc lcl loc)+setCtLocSpan ctl@(CtLoc { ctl_env = lcl }) loc = setCtLocEnv ctl (setCtLocRealLoc lcl loc) bumpCtLocDepth :: CtLoc -> CtLoc bumpCtLocDepth loc@(CtLoc { ctl_depth = d }) = loc { ctl_depth = bumpSubGoalDepth d }@@ -2439,7 +2579,7 @@ updateCtLocOrigin ctl@(CtLoc { ctl_origin = orig }) upd = ctl { ctl_origin = upd orig } -setCtLocEnv :: CtLoc -> TcLclEnv -> CtLoc+setCtLocEnv :: CtLoc -> CtLocEnv -> CtLoc setCtLocEnv ctl env = ctl { ctl_env = env } pprCtLoc :: CtLoc -> SDoc@@ -2447,4 +2587,4 @@ -- Not an instance of Outputable because of the "arising from" prefix pprCtLoc (CtLoc { ctl_origin = o, ctl_env = lcl}) = sep [ pprCtOrigin o- , text "at" <+> ppr (getLclEnvLoc lcl)]+ , text "at" <+> ppr (getCtLocEnvLoc lcl)]
+ GHC/Tc/Types/CtLocEnv.hs view
@@ -0,0 +1,60 @@+module GHC.Tc.Types.CtLocEnv (+ CtLocEnv(..)+ , getCtLocEnvLoc+ , getCtLocEnvLvl+ , setCtLocEnvLvl+ , setCtLocRealLoc+ , setCtLocEnvLoc+ , ctLocEnvInGeneratedCode+ ) where++import GHC.Prelude++import GHC.Types.SrcLoc+import GHC.Types.Name.Reader++import GHC.Tc.Types.BasicTypes+import GHC.Tc.Utils.TcType+import GHC.Tc.Types.ErrCtxt+++-- | Local typechecker environment for a constraint.+--+-- Used to restore the environment of a constraint+-- when reporting errors, see `setCtLocM`.+--+-- See also 'TcLclCtxt'.+data CtLocEnv = CtLocEnv { ctl_ctxt :: ![ErrCtxt]+ , ctl_loc :: !RealSrcSpan+ , ctl_bndrs :: !TcBinderStack+ , ctl_tclvl :: !TcLevel+ , ctl_in_gen_code :: !Bool+ , ctl_rdr :: !LocalRdrEnv }+++getCtLocEnvLoc :: CtLocEnv -> RealSrcSpan+getCtLocEnvLoc = ctl_loc++getCtLocEnvLvl :: CtLocEnv -> TcLevel+getCtLocEnvLvl = ctl_tclvl++setCtLocEnvLvl :: CtLocEnv -> TcLevel -> CtLocEnv+setCtLocEnvLvl env lvl = env { ctl_tclvl = lvl }++setCtLocRealLoc :: CtLocEnv -> RealSrcSpan -> CtLocEnv+setCtLocRealLoc env ss = env { ctl_loc = ss }++setCtLocEnvLoc :: CtLocEnv -> SrcSpan -> CtLocEnv+-- See Note [Error contexts in generated code]+-- for the ctl_in_gen_code manipulation+setCtLocEnvLoc env (RealSrcSpan loc _)+ = env { ctl_loc = loc, ctl_in_gen_code = False }++setCtLocEnvLoc env loc@(UnhelpfulSpan _)+ | isGeneratedSrcSpan loc+ = env { ctl_in_gen_code = True }+ | otherwise+ = env++ctLocEnvInGeneratedCode :: CtLocEnv -> Bool+ctLocEnvInGeneratedCode = ctl_in_gen_code
+ GHC/Tc/Types/ErrCtxt.hs view
@@ -0,0 +1,16 @@+module GHC.Tc.Types.ErrCtxt where++import GHC.Prelude+import GHC.Types.Var.Env+import GHC.Tc.Zonk.Monad (ZonkM)+import GHC.Utils.Outputable++-- | Additional context to include in an error message, e.g.+-- "In the type signature ...", "In the ambiguity check for ...", etc.+type ErrCtxt = (Bool, TidyEnv -> ZonkM (TidyEnv, SDoc))+ -- Monadic so that we have a chance+ -- to deal with bound type variables just before error+ -- message construction++ -- Bool: True <=> this is a landmark context; do not+ -- discard it when trimming for display
GHC/Tc/Types/EvTerm.hs view
@@ -6,7 +6,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Tc.Types.Evidence
GHC/Tc/Types/Evidence.hs view
@@ -22,7 +22,7 @@ isEmptyEvBindMap, evBindMapToVarSet, varSetMinusEvBindMap,- EvBind(..), emptyTcEvBinds, isEmptyTcEvBinds, mkGivenEvBind, mkWantedEvBind,+ EvBindInfo(..), EvBind(..), emptyTcEvBinds, isEmptyTcEvBinds, mkGivenEvBind, mkWantedEvBind, evBindVar, isCoEvBindsVar, -- * EvTerm (already a CoreExpr)@@ -70,6 +70,7 @@ import GHC.Core import GHC.Core.Class (Class, classSCSelId ) import GHC.Core.FVs ( exprSomeFreeVars )+import GHC.Core.InstEnv ( Canonical ) import GHC.Utils.Misc import GHC.Utils.Panic@@ -229,7 +230,7 @@ mk_wp_fun_co :: Mult -> TcCoercionR -> TcCoercionR -> TcCoercionR mk_wp_fun_co mult arg_co res_co- = mkNakedFunCo1 Representational FTF_T_T (multToCo mult) arg_co res_co+ = mkNakedFunCo Representational FTF_T_T (multToCo mult) arg_co res_co -- FTF_T_T: WpFun is always (->) mkWpCastR :: TcCoercionR -> HsWrapper@@ -447,24 +448,29 @@ instance Outputable EvBindMap where ppr (EvBindMap m) = ppr m +data EvBindInfo+ = EvBindGiven { -- See Note [Tracking redundant constraints] in GHC.Tc.Solver+ }+ | EvBindWanted { ebi_canonical :: Canonical -- See Note [Desugaring non-canonical evidence]+ }+ ----------------- -- All evidence is bound by EvBinds; no side effects data EvBind- = EvBind { eb_lhs :: EvVar- , eb_rhs :: EvTerm- , eb_is_given :: Bool -- True <=> given- -- See Note [Tracking redundant constraints] in GHC.Tc.Solver+ = EvBind { eb_lhs :: EvVar+ , eb_rhs :: EvTerm+ , eb_info :: EvBindInfo } evBindVar :: EvBind -> EvVar evBindVar = eb_lhs -mkWantedEvBind :: EvVar -> EvTerm -> EvBind-mkWantedEvBind ev tm = EvBind { eb_is_given = False, eb_lhs = ev, eb_rhs = tm }+mkWantedEvBind :: EvVar -> Canonical -> EvTerm -> EvBind+mkWantedEvBind ev c tm = EvBind { eb_info = EvBindWanted c, 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 }+mkGivenEvBind ev tm = EvBind { eb_info = EvBindGiven, eb_lhs = ev, eb_rhs = tm } -- An EvTerm is, conceptually, a CoreExpr that implements the constraint.@@ -655,7 +661,7 @@ 1. Explicit, user-written occurrences of `?stk :: CallStack` which have IPOccOrigin, are solved directly from the given IP,- just like a regular IP; see GHC.Tc.Solver.Interact.interactDict.+ just like a regular IP; see GHC.Tc.Solver.Dict.tryInertDicts. For example, the occurrence of `?stk` in @@ -685,7 +691,7 @@ [W] d1 : IP "stk" CallStack with CtOrigin = OccurrenceOf "foo" - * We /solve/ this constraint, in GHC.Tc.Solver.Canonical.canClassNC+ * We /solve/ this constraint, in GHC.Tc.Solver.Dict.canDictNC by emitting a NEW Wanted [W] d2 :: IP "stk" CallStack with CtOrigin = IPOccOrigin@@ -771,7 +777,7 @@ - When we emit a new wanted CallStack from rule (2) we set its origin to `IPOccOrigin ip_name` instead of the original `OccurrenceOf func`- (see GHC.Tc.Solver.Interact.interactDict).+ (see GHC.Tc.Solver.Dict.tryInertDicts). This is a bit shady, but is how we ensure that the new wanted is solved like a regular IP.@@ -845,8 +851,7 @@ 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+ , EvBind { eb_info = EvBindGiven, eb_rhs = rhs } <- ev_bind = evVarsOfTerm rhs `unionVarSet` needs | otherwise = needs@@ -940,12 +945,14 @@ getUnique = ebv_uniq instance Outputable EvBind where- ppr (EvBind { eb_lhs = v, eb_rhs = e, eb_is_given = is_given })+ ppr (EvBind { eb_lhs = v, eb_rhs = e, eb_info = info }) = sep [ pp_gw <+> ppr v , nest 2 $ equals <+> ppr e ]+ -- We cheat a bit and pretend EqVars are CoVars for the purposes of pretty printing where- pp_gw = brackets (if is_given then char 'G' else char 'W')- -- We cheat a bit and pretend EqVars are CoVars for the purposes of pretty printing+ pp_gw = brackets $ case info of+ EvBindGiven{} -> char 'G'+ EvBindWanted{} -> char 'W' instance Outputable EvTerm where ppr (EvExpr e) = ppr e
+ GHC/Tc/Types/LclEnv.hs view
@@ -0,0 +1,239 @@+module GHC.Tc.Types.LclEnv (+ TcLclEnv(..)+ , TcLclCtxt(..)+ , modifyLclCtxt++ , getLclEnvArrowCtxt+ , getLclEnvThBndrs+ , getLclEnvTypeEnv+ , getLclEnvBinderStack+ , getLclEnvErrCtxt+ , getLclEnvLoc+ , getLclEnvRdrEnv+ , getLclEnvTcLevel+ , getLclEnvThStage+ , setLclEnvTcLevel+ , setLclEnvLoc+ , setLclEnvRdrEnv+ , setLclEnvBinderStack+ , setLclEnvErrCtxt+ , setLclEnvThStage+ , setLclEnvTypeEnv+ , modifyLclEnvTcLevel++ , lclEnvInGeneratedCode++ , addLclEnvErrCtxt++ , ArrowCtxt(..)+ , ThBindEnv+ , TcTypeEnv+) where++import GHC.Prelude++import GHC.Tc.Utils.TcType ( TcLevel )+import GHC.Tc.Errors.Types ( TcRnMessage )++import GHC.Core.UsageEnv ( UsageEnv )++import GHC.Types.Name.Reader ( LocalRdrEnv )+import GHC.Types.Name.Env ( NameEnv )+import GHC.Types.SrcLoc ( RealSrcSpan )+import GHC.Types.Basic ( TopLevelFlag )++import GHC.Types.Error ( Messages )++import GHC.Tc.Types.BasicTypes+import GHC.Tc.Types.TH+import GHC.Tc.Types.TcRef+import GHC.Tc.Types.ErrCtxt+import GHC.Tc.Types.Constraint ( WantedConstraints )++{-+************************************************************************+* *+ The local typechecker environment+* *+************************************************************************++Note [The Global-Env/Local-Env story]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+During type checking, we keep in the tcg_type_env+ * All types and classes+ * All Ids derived from types and classes (constructors, selectors)++At the end of type checking, we zonk the local bindings,+and as we do so we add to the tcg_type_env+ * Locally defined top-level Ids++Why? Because they are now Ids not TcIds. This final GlobalEnv is+ a) fed back (via the knot) to typechecking the+ unfoldings of interface signatures+ b) used in the ModDetails of this module+-}++data TcLclEnv -- Changes as we move inside an expression+ -- Discarded after typecheck/rename; not passed on to desugarer+ = TcLclEnv {+ -- The part that we sometimes restore using `restoreLclEnv`.+ tcl_lcl_ctxt :: !TcLclCtxt,++ -- These are exactly the parts of TcLclEnv which are not set by `restoreLclEnv`.++ tcl_usage :: TcRef UsageEnv, -- Required multiplicity of bindings is accumulated here.+ tcl_lie :: TcRef WantedConstraints, -- Place to accumulate type constraints+ tcl_errs :: TcRef (Messages TcRnMessage) -- Place to accumulate diagnostics+ }++data TcLclCtxt+ = TcLclCtxt {+ tcl_loc :: RealSrcSpan, -- Source span+ tcl_ctxt :: [ErrCtxt], -- Error context, innermost on top+ tcl_in_gen_code :: Bool, -- See Note [Rebindable syntax and HsExpansion]+ tcl_tclvl :: TcLevel,+ tcl_bndrs :: TcBinderStack, -- Used for reporting relevant bindings,+ -- and for tidying type++ tcl_rdr :: LocalRdrEnv, -- Local name envt+ -- Maintained during renaming, of course, but also during+ -- type checking, solely so that when renaming a Template-Haskell+ -- splice we have the right environment for the renamer.+ --+ -- Does *not* include global name envt; may shadow it+ -- Includes both ordinary variables and type variables;+ -- they are kept distinct because tyvar have a different+ -- occurrence constructor (Name.TvOcc)+ -- We still need the unsullied global name env so that+ -- we can look up record field names+++ tcl_th_ctxt :: ThStage, -- Template Haskell context+ tcl_th_bndrs :: ThBindEnv, -- and binder info+ -- The ThBindEnv records the TH binding level of in-scope Names+ -- defined in this module (not imported)+ -- We can't put this info in the TypeEnv because it's needed+ -- (and extended) in the renamer, for untyped splices++ tcl_arrow_ctxt :: ArrowCtxt, -- Arrow-notation context++ tcl_env :: TcTypeEnv -- The local type environment:+ -- Ids and TyVars defined in this module++ }++getLclEnvThStage :: TcLclEnv -> ThStage+getLclEnvThStage = tcl_th_ctxt . tcl_lcl_ctxt++setLclEnvThStage :: ThStage -> TcLclEnv -> TcLclEnv+setLclEnvThStage s = modifyLclCtxt (\env -> env { tcl_th_ctxt = s })++getLclEnvThBndrs :: TcLclEnv -> ThBindEnv+getLclEnvThBndrs = tcl_th_bndrs . tcl_lcl_ctxt++getLclEnvArrowCtxt :: TcLclEnv -> ArrowCtxt+getLclEnvArrowCtxt = tcl_arrow_ctxt . tcl_lcl_ctxt++getLclEnvTypeEnv :: TcLclEnv -> TcTypeEnv+getLclEnvTypeEnv = tcl_env . tcl_lcl_ctxt++setLclEnvTypeEnv :: TcTypeEnv -> TcLclEnv -> TcLclEnv+setLclEnvTypeEnv ty_env = modifyLclCtxt (\env -> env { tcl_env = ty_env})++setLclEnvTcLevel :: TcLevel -> TcLclEnv -> TcLclEnv+setLclEnvTcLevel lvl = modifyLclCtxt (\env -> env {tcl_tclvl = lvl })++modifyLclEnvTcLevel :: (TcLevel -> TcLevel) -> TcLclEnv -> TcLclEnv+modifyLclEnvTcLevel f = modifyLclCtxt (\env -> env { tcl_tclvl = f (tcl_tclvl env)})++getLclEnvTcLevel :: TcLclEnv -> TcLevel+getLclEnvTcLevel = tcl_tclvl . tcl_lcl_ctxt++setLclEnvLoc :: RealSrcSpan -> TcLclEnv -> TcLclEnv+setLclEnvLoc loc = modifyLclCtxt (\lenv -> lenv { tcl_loc = loc })++getLclEnvLoc :: TcLclEnv -> RealSrcSpan+getLclEnvLoc = tcl_loc . tcl_lcl_ctxt++getLclEnvErrCtxt :: TcLclEnv -> [ErrCtxt]+getLclEnvErrCtxt = tcl_ctxt . tcl_lcl_ctxt++setLclEnvErrCtxt :: [ErrCtxt] -> TcLclEnv -> TcLclEnv+setLclEnvErrCtxt ctxt = modifyLclCtxt (\env -> env { tcl_ctxt = ctxt })++addLclEnvErrCtxt :: ErrCtxt -> TcLclEnv -> TcLclEnv+addLclEnvErrCtxt ctxt = modifyLclCtxt (\env -> env { tcl_ctxt = ctxt : (tcl_ctxt env) })++lclEnvInGeneratedCode :: TcLclEnv -> Bool+lclEnvInGeneratedCode = tcl_in_gen_code . tcl_lcl_ctxt++getLclEnvBinderStack :: TcLclEnv -> TcBinderStack+getLclEnvBinderStack = tcl_bndrs . tcl_lcl_ctxt++setLclEnvBinderStack :: TcBinderStack -> TcLclEnv -> TcLclEnv+setLclEnvBinderStack stack = modifyLclCtxt (\env -> env { tcl_bndrs = stack })++getLclEnvRdrEnv :: TcLclEnv -> LocalRdrEnv+getLclEnvRdrEnv = tcl_rdr . tcl_lcl_ctxt++setLclEnvRdrEnv :: LocalRdrEnv -> TcLclEnv -> TcLclEnv+setLclEnvRdrEnv rdr_env = modifyLclCtxt (\env -> env { tcl_rdr = rdr_env })++modifyLclCtxt :: (TcLclCtxt -> TcLclCtxt) -> TcLclEnv -> TcLclEnv+modifyLclCtxt upd env =+ let !res = upd (tcl_lcl_ctxt env)+ in env { tcl_lcl_ctxt = res }++++type TcTypeEnv = NameEnv TcTyThing++type ThBindEnv = NameEnv (TopLevelFlag, ThLevel)+ -- Domain = all Ids bound in this module (ie not imported)+ -- The TopLevelFlag tells if the binding is syntactically top level.+ -- We need to know this, because the cross-stage persistence story allows+ -- cross-stage at arbitrary types if the Id is bound at top level.+ --+ -- Nota bene: a ThLevel of 'outerLevel' is *not* the same as being+ -- bound at top level! See Note [Template Haskell levels] in GHC.Tc.Gen.Splice++---------------------------+-- Arrow-notation context+---------------------------++{- Note [Escaping the arrow scope]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In arrow notation, a variable bound by a proc (or enclosed let/kappa)+is not in scope to the left of an arrow tail (-<) or the head of (|..|).+For example++ proc x -> (e1 -< e2)++Here, x is not in scope in e1, but it is in scope in e2. This can get+a bit complicated:++ let x = 3 in+ proc y -> (proc z -> e1) -< e2++Here, x and z are in scope in e1, but y is not.++We implement this by+recording the environment when passing a proc (using newArrowScope),+and returning to that (using escapeArrowScope) on the left of -< and the+head of (|..|).++All this can be dealt with by the *renamer*. But the type checker needs+to be involved too. Example (arrowfail001)+ class Foo a where foo :: a -> ()+ data Bar = forall a. Foo a => Bar a+ get :: Bar -> ()+ get = proc x -> case x of Bar a -> foo -< a+Here the call of 'foo' gives rise to a (Foo a) constraint that should not+be captured by the pattern match on 'Bar'. Rather it should join the+constraints from further out. So we must capture the constraint bag+from further out in the ArrowCtxt that we push inwards.+-}++data ArrowCtxt -- Note [Escaping the arrow scope]+ = NoArrowCtxt+ | ArrowCtxt LocalRdrEnv (TcRef WantedConstraints)
+ GHC/Tc/Types/LclEnv.hs-boot view
@@ -0,0 +1,3 @@+module GHC.Tc.Types.LclEnv where++data TcLclEnv
GHC/Tc/Types/Origin.hs view
@@ -25,16 +25,19 @@ -- * CtOrigin and CallStack isPushCallStackOrigin, callStackOriginFS,+ ClsInstOrQC(..), NakedScFlag(..),+ -- * FixedRuntimeRep origin FixedRuntimeRepOrigin(..), FixedRuntimeRepContext(..), pprFixedRuntimeRepContext, StmtOrigin(..), RepPolyFun(..), ArgPos(..),- ClsInstOrQC(..), NakedScFlag(..), -- * Arrow command origin FRRArrowContext(..), pprFRRArrowContext, ExpectedFunTyOrigin(..), pprExpectedFunTyOrigin, pprExpectedFunTyHerald, + -- InstanceWhat+ InstanceWhat(..), SafeOverlapping ) where import GHC.Prelude@@ -83,11 +86,22 @@ -- Also used for types in SPECIALISE pragmas Name -- Name of the function ReportRedundantConstraints- -- This is usually 'WantRCC', but 'NoRCC' for+ -- See Note [Tracking redundant constraints] in GHC.Tc.Solver+ -- This field is usually 'WantRCC', but 'NoRCC' for -- * Record selectors (not important here) -- * Class and instance methods. Here the code may legitimately -- be more polymorphic than the signature generated from the -- class declaration+ -- * Functions whose type signature has hidden the constraints+ -- behind a type synonym. E.g.+ -- type Foo = forall a. Eq a => a -> a+ -- id :: Foo+ -- id x = x+ -- Here we can't give a good location for the redundant constraints+ -- (see lhsSigWcTypeContextSpan), so we don't report redundant+ -- constraints at all. It's not clear that this a good choice;+ -- perhaps we should report, just with a less informative SrcSpan.+ -- c.f. #16154 | InfSigCtxt Name -- Inferred type for function | ExprSigCtxt -- Expression type signature@@ -278,7 +292,7 @@ | 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+ | TyConSkol (TyConFlavour TyCon) 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@@ -308,7 +322,7 @@ -- shares a certain 'Unique'. mkSkolemInfo :: MonadIO m => SkolemInfoAnon -> m SkolemInfo mkSkolemInfo sk_anon = do- u <- liftIO $! uniqFromTag 's'+ u <- liftIO $! uniqFromMask 's' return (SkolemInfo u sk_anon) getSkolemInfo :: SkolemInfo -> SkolemInfoAnon@@ -467,7 +481,7 @@ ScDepth -- ^ The number of superclass selections necessary to -- get this constraint; see Note [Replacement vs keeping]- -- in GHC.Tc.Solver.Interact+ -- in GHC.Tc.Solver.Dict Bool -- ^ True => "blocked": cannot use this to solve naked superclass Wanteds -- i.e. ones with (ScOrigin _ NakedSc)@@ -578,9 +592,8 @@ | IfThenElseOrigin -- An if-then-else expression | BracketOrigin -- An overloaded quotation bracket | StaticOrigin -- A static form- | Shouldn'tHappenOrigin String- -- the user should never see this one- | GhcBug20076 -- see #20076+ | ImpedanceMatching Id -- See Note [Impedance matching] in GHC.Tc.Gen.Bind+ | Shouldn'tHappenOrigin String -- The user should never see this one -- | Testing whether the constraint associated with an instance declaration -- in a signature file is satisfied upon instantiation.@@ -596,7 +609,7 @@ | CycleBreakerOrigin CtOrigin -- origin of the original constraint - -- See Detail (7) of Note [Type equality cycles] in GHC.Tc.Solver.Canonical+ -- See Detail (7) of Note [Type equality cycles] in GHC.Tc.Solver.Equality | FRROrigin FixedRuntimeRepOrigin @@ -806,13 +819,6 @@ , text "https://gitlab.haskell.org/ghc/ghc/wikis/report-a-bug >>" ] -pprCtOrigin GhcBug20076- = vcat [ text "GHC Bug #20076 <https://gitlab.haskell.org/ghc/ghc/-/issues/20076>"- , text "Assuming you have a partial type signature, you can avoid this error"- , text "by either adding an extra-constraints wildcard (like `(..., _) => ...`,"- , text "with the underscore at the end of the constraint), or by avoiding the"- , text "use of a simplifiable constraint in your partial type signature." ]- pprCtOrigin (ProvCtxtOrigin PSB{ psb_id = (L _ name) }) = hang (ctoHerald <+> text "the \"provided\" constraints claimed by") 2 (text "the signature of" <+> quotes (ppr name))@@ -822,6 +828,10 @@ , ppr cls_inst , text "is provided by" <+> quotes (ppr mod)] +pprCtOrigin (ImpedanceMatching x)+ = vcat [ text "arising when matching required constraints"+ , text "in a group involving" <+> quotes (ppr x)]+ pprCtOrigin (CycleBreakerOrigin orig) = pprCtOrigin orig @@ -914,11 +924,12 @@ pprCtO (InstProvidedOrigin {}) = text "a provided constraint" pprCtO (CycleBreakerOrigin orig) = pprCtO orig pprCtO (FRROrigin {}) = text "a representation-polymorphism check"-pprCtO GhcBug20076 = text "GHC Bug #20076" pprCtO (WantedSuperclassOrigin {}) = text "a superclass constraint" pprCtO (InstanceSigOrigin {}) = text "a type signature in an instance" pprCtO (AmbiguityCheckOrigin {}) = text "a type ambiguity check"+pprCtO (ImpedanceMatching {}) = text "combining required constraints" + {- ********************************************************************* * * CallStacks and CtOrigin@@ -997,6 +1008,11 @@ -- ^ What context requires a fixed runtime representation? } +instance Outputable FixedRuntimeRepOrigin where+ ppr (FixedRuntimeRepOrigin { frr_type = ty, frr_context = cxt })+ = text "FrOrigin" <> braces (vcat [ text "frr_type:" <+> ppr ty+ , text "frr_context:" <+> ppr cxt ])+ -- | The context in which a representation-polymorphism check was performed. -- -- Does not include the type on which the check was performed; see@@ -1401,3 +1417,42 @@ pprExpectedFunTyHerald (ExpectedFunTyLamCase _ expr) = sep [ text "The function" <+> quotes (ppr expr) , text "requires" ]++{- *******************************************************************+* *+ InstanceWhat+* *+**********************************************************************-}++-- | Indicates if Instance met the Safe Haskell overlapping instances safety+-- check.+--+-- See Note [Safe Haskell Overlapping Instances] in GHC.Tc.Solver+-- See Note [Safe Haskell Overlapping Instances Implementation] in GHC.Tc.Solver+type SafeOverlapping = Bool++data InstanceWhat -- How did we solve this constraint?+ = BuiltinEqInstance -- Built-in solver for (t1 ~ t2), (t1 ~~ t2), Coercible t1 t2+ -- See GHC.Tc.Solver.InertSet Note [Solved dictionaries]++ | BuiltinTypeableInstance TyCon -- Built-in solver for Typeable (T t1 .. tn)+ -- See Note [Well-staged instance evidence]++ | BuiltinInstance -- Built-in solver for (C t1 .. tn) where C is+ -- KnownNat, .. etc (classes with no top-level evidence)++ | LocalInstance -- Solved by a quantified constraint+ -- See GHC.Tc.Solver.InertSet Note [Solved dictionaries]++ | TopLevInstance -- Solved by a top-level instance decl+ { iw_dfun_id :: DFunId+ , iw_safe_over :: SafeOverlapping }++instance Outputable InstanceWhat where+ ppr BuiltinInstance = text "a built-in instance"+ ppr BuiltinTypeableInstance {} = text "a built-in typeable instance"+ ppr BuiltinEqInstance = text "a built-in equality instance"+ ppr LocalInstance = text "a locally-quantified instance"+ ppr (TopLevInstance { iw_dfun_id = dfun })+ = hang (text "instance" <+> pprSigmaType (idType dfun))+ 2 (text "--" <+> pprDefinedAt (idName dfun))
+ GHC/Tc/Types/TH.hs view
@@ -0,0 +1,122 @@+module GHC.Tc.Types.TH (+ SpliceType(..)+ , SpliceOrBracket(..)+ , ThStage(..)+ , PendingStuff(..)+ , ThLevel+ , topStage+ , topAnnStage+ , topSpliceStage+ , thLevel+ , impLevel+ , outerLevel+ ) where++import GHCi.RemoteTypes+import qualified Language.Haskell.TH as TH+import GHC.Tc.Types.Evidence+import GHC.Utils.Outputable+import GHC.Prelude+import GHC.Utils.Panic+import GHC.Tc.Types.TcRef+import GHC.Tc.Types.Constraint+import GHC.Hs.Expr ( PendingTcSplice, PendingRnSplice )++---------------------------+-- Template Haskell stages and levels+---------------------------++data SpliceType = Typed | Untyped+data SpliceOrBracket = IsSplice | IsBracket++data ThStage -- See Note [Template Haskell state diagram]+ -- and Note [Template Haskell levels] in GHC.Tc.Gen.Splice+ -- Start at: Comp+ -- At bracket: wrap current stage in Brack+ -- At splice: currently Brack: return to previous stage+ -- currently Comp/Splice: compile and run+ = Splice SpliceType -- Inside a top-level splice+ -- This code will be run *at compile time*;+ -- the result replaces the splice+ -- Binding level = 0++ | RunSplice (TcRef [ForeignRef (TH.Q ())])+ -- Set when running a splice, i.e. NOT when renaming or typechecking the+ -- Haskell code for the splice. See Note [RunSplice ThLevel].+ --+ -- Contains a list of mod finalizers collected while executing the splice.+ --+ -- 'addModFinalizer' inserts finalizers here, and from here they are taken+ -- to construct an @HsSpliced@ annotation for untyped splices. See Note+ -- [Delaying modFinalizers in untyped splices] in GHC.Rename.Splice.+ --+ -- For typed splices, the typechecker takes finalizers from here and+ -- inserts them in the list of finalizers in the global environment.+ --+ -- See Note [Collecting modFinalizers in typed splices] in "GHC.Tc.Gen.Splice".++ | Comp -- Ordinary Haskell code+ -- Binding level = 1++ | Brack -- Inside brackets+ ThStage -- Enclosing stage+ PendingStuff++data PendingStuff+ = RnPendingUntyped -- Renaming the inside of an *untyped* bracket+ (TcRef [PendingRnSplice]) -- Pending splices in here++ | RnPendingTyped -- Renaming the inside of a *typed* bracket++ | TcPending -- Typechecking the inside of a typed bracket+ (TcRef [PendingTcSplice]) -- Accumulate pending splices here+ (TcRef WantedConstraints) -- and type constraints here+ QuoteWrapper -- A type variable and evidence variable+ -- for the overall monad of+ -- the bracket. Splices are checked+ -- against this monad. The evidence+ -- variable is used for desugaring+ -- `lift`.+++topStage, topAnnStage, topSpliceStage :: ThStage+topStage = Comp+topAnnStage = Splice Untyped+topSpliceStage = Splice Untyped++instance Outputable ThStage where+ ppr (Splice _) = text "Splice"+ ppr (RunSplice _) = text "RunSplice"+ ppr Comp = text "Comp"+ ppr (Brack s _) = text "Brack" <> parens (ppr s)++type ThLevel = Int+ -- NB: see Note [Template Haskell levels] in GHC.Tc.Gen.Splice+ -- Incremented when going inside a bracket,+ -- decremented when going inside a splice+ -- NB: ThLevel is one greater than the 'n' in Fig 2 of the+ -- original "Template meta-programming for Haskell" paper++impLevel, outerLevel :: ThLevel+impLevel = 0 -- Imported things; they can be used inside a top level splice+outerLevel = 1 -- Things defined outside brackets++thLevel :: ThStage -> ThLevel+thLevel (Splice _) = 0+thLevel Comp = 1+thLevel (Brack s _) = thLevel s + 1+thLevel (RunSplice _) = panic "thLevel: called when running a splice"+ -- See Note [RunSplice ThLevel].++{- Note [RunSplice ThLevel]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The 'RunSplice' stage is set when executing a splice, and only when running a+splice. In particular it is not set when the splice is renamed or typechecked.++'RunSplice' is needed to provide a reference where 'addModFinalizer' can insert+the finalizer (see Note [Delaying modFinalizers in untyped splices]), and+'addModFinalizer' runs when doing Q things. Therefore, It doesn't make sense to+set 'RunSplice' when renaming or typechecking the splice, where 'Splice',+'Brack' or 'Comp' are used instead.++-}
+ GHC/Tc/Types/TcRef.hs view
@@ -0,0 +1,37 @@+module GHC.Tc.Types.TcRef (TcRef, newTcRef, readTcRef, writeTcRef, updTcRef, updTcRefM) where++import GHC.Prelude++import Control.Monad.IO.Class+import Data.IORef++-- | Type alias for 'IORef'; the convention is we'll use this for mutable+-- bits of data in the typechecker which are updated during typechecking and+-- returned at the end.+type TcRef a = IORef a++-- The following functions are all marked INLINE so that we+-- don't end up passing a Monad or MonadIO dictionary.++newTcRef :: MonadIO m => a -> m (TcRef a)+newTcRef = \ a -> liftIO $ newIORef a+{-# INLINE newTcRef #-}++readTcRef :: MonadIO m => TcRef a -> m a+readTcRef = \ ref -> liftIO $ readIORef ref+{-# INLINE readTcRef #-}++writeTcRef :: MonadIO m => TcRef a -> a -> m ()+writeTcRef = \ ref a -> liftIO $ writeIORef ref a+{-# INLINE writeTcRef #-}++updTcRef :: MonadIO m => TcRef a -> (a -> a) -> m ()+updTcRef = \ ref fn -> liftIO $ modifyIORef' ref fn+{-# INLINE updTcRef #-}++updTcRefM :: MonadIO m => TcRef a -> (a -> m a) -> m ()+updTcRefM ref upd+ = do { contents <- readTcRef ref+ ; !new_contents <- upd contents+ ; writeTcRef ref new_contents }+{-# INLINE updTcRefM #-}
GHC/Tc/Utils/Backpack.hs view
@@ -20,7 +20,7 @@ import GHC.Driver.Env import GHC.Driver.Ppr-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Types.Basic (TypeOrKind(..)) import GHC.Types.Fixity (defaultFixity)@@ -47,14 +47,18 @@ import GHC.Unit.Module.Imported import GHC.Unit.Module.Deps +import GHC.Tc.Errors import GHC.Tc.Errors.Types+import {-# SOURCE #-} GHC.Tc.Module import GHC.Tc.Gen.Export import GHC.Tc.Solver import GHC.Tc.TyCl.Utils import GHC.Tc.Types.Constraint import GHC.Tc.Types.Origin+import GHC.Tc.Utils.Env import GHC.Tc.Utils.Monad import GHC.Tc.Utils.Instantiate+import GHC.Tc.Utils.Unify import GHC.Tc.Utils.TcMType import GHC.Tc.Utils.TcType @@ -71,11 +75,8 @@ import GHC.Rename.Names import GHC.Rename.Fixity ( lookupFixityRn ) -import GHC.Tc.Utils.Env-import GHC.Tc.Errors-import GHC.Tc.Utils.Unify- import GHC.Utils.Error+import GHC.Utils.Misc ( HasDebugCallStack ) import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Panic.Plain@@ -86,36 +87,21 @@ import Control.Monad import Data.List (find) -import {-# SOURCE #-} GHC.Tc.Module---fixityMisMatch :: TyThing -> Fixity -> Fixity -> TcRnMessage-fixityMisMatch real_thing real_fixity sig_fixity =- mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ppr real_thing <+> text "has conflicting fixities in the module",- text "and its hsig file",- text "Main module:" <+> ppr_fix real_fixity,- text "Hsig file:" <+> ppr_fix sig_fixity]- where- ppr_fix f =- ppr f <+>- (if f == defaultFixity- then parens (text "default")- else empty)+import GHC.Iface.Errors.Types checkHsigDeclM :: ModIface -> TyThing -> TyThing -> TcRn () checkHsigDeclM sig_iface sig_thing real_thing = do let name = getName real_thing -- TODO: Distinguish between signature merging and signature -- implementation cases.- checkBootDeclM False sig_thing real_thing+ checkBootDeclM Hsig sig_thing real_thing real_fixity <- lookupFixityRn name let sig_fixity = case mi_fix_fn (mi_final_exts sig_iface) (occName name) of Nothing -> defaultFixity Just f -> f when (real_fixity /= sig_fixity) $ addErrAt (nameSrcSpan name)- (fixityMisMatch real_thing real_fixity sig_fixity)+ (TcRnHsigFixityMismatch real_thing real_fixity sig_fixity) -- | Given a 'ModDetails' of an instantiated signature (note that the -- 'ModDetails' must be knot-tied consistently with the actual implementation)@@ -127,7 +113,7 @@ -- a sufficient set of entities, since otherwise the renaming and then -- typechecking of the signature 'ModIface' would have failed. checkHsigIface :: TcGblEnv -> GlobalRdrEnv -> ModIface -> ModDetails -> TcRn ()-checkHsigIface tcg_env gr sig_iface+checkHsigIface tcg_env gre_env sig_iface ModDetails { md_insts = sig_insts, md_fam_insts = sig_fam_insts, md_types = sig_type_env, md_exports = sig_exports } = do traceTc "checkHsigIface" $ vcat@@ -135,8 +121,8 @@ mapM_ check_export (map availName sig_exports) failIfErrsM -- See Note [Fail before checking instances in checkHsigIface] unless (null sig_fam_insts) $- panic ("GHC.Tc.Module.checkHsigIface: Cannot handle family " ++- "instances in hsig files yet...")+ panic ("GHC.Tc.Utils.Backpack.checkHsigIface: " +++ "Cannot handle family instances in hsig files yet...") -- Delete instances so we don't look them up when -- checking instance satisfiability -- TODO: this should not be necessary@@ -168,14 +154,14 @@ -- tcg_env (TODO: but maybe this isn't relevant anymore). r <- tcLookupImported_maybe name case r of- Failed err -> addErr (TcRnInterfaceLookupError name err)+ Failed err -> addErr (TcRnInterfaceError err) Succeeded real_thing -> checkHsigDeclM sig_iface sig_thing real_thing -- The hsig did NOT define this function; that means it must -- be a reexport. In this case, make sure the 'Name' of the- -- reexport matches the 'Name exported here.- | [gre] <- lookupGlobalRdrEnv gr (nameOccName name) = do- let name' = greMangledName gre+ -- reexport matches the 'Name' exported here.+ | [gre] <- lookupGRE gre_env (LookupOccName (nameOccName name) SameNameSpace) = do+ let name' = greName gre when (name /= name') $ do -- See Note [Error reporting bad reexport] -- TODO: Actually this error swizzle doesn't work@@ -188,11 +174,11 @@ -> getLocA e _ -> nameSrcSpan name addErrAt loc- (badReexportedBootThing False name name')+ (TcRnBootMismatch Hsig $ BadReexportedBootThing name name') -- This should actually never happen, but whatever... | otherwise = addErrAt (nameSrcSpan name)- (missingBootThing False name "exported by")+ (missingBootThing Hsig name MissingBootExport) -- Note [Fail before checking instances in checkHsigIface] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -223,24 +209,25 @@ -- TODO: This could be very well generalized to support instance -- declarations in boot files. tcg_env <- getGblEnv+ lcl_env <- getLclEnv+ -- NB: Have to tug on the interface, not necessarily -- tugged... but it didn't work? mapM_ tcLookupImported_maybe (nameSetElemsStable (orphNamesOfClsInst sig_inst)) -- Based off of 'simplifyDeriv'- let origin = InstProvidedOrigin (tcg_semantic_mod tcg_env) sig_inst (skol_info, tvs_skols, inst_theta, cls, inst_tys) <- tcSkolDFunType (idType dfun_id) (tclvl,cts) <- pushTcLevelM $ do+ given_ids <- mapM newEvVar inst_theta+ let given_loc = mkGivenLoc topTcLevel skol_info (mkCtLocEnv lcl_env)+ givens = [ CtGiven { ctev_pred = idType given_id+ -- Doesn't matter, make something up+ , ctev_evar = given_id+ , ctev_loc = given_loc }+ | given_id <- given_ids ]+ origin = InstProvidedOrigin (tcg_semantic_mod tcg_env) sig_inst wanted <- newWanted origin (Just TypeLevel) (mkClassPred cls inst_tys)- givens <- forM inst_theta $ \given -> do- loc <- getCtLocM origin (Just TypeLevel)- new_ev <- newEvVar given- return CtGiven { ctev_pred = given- -- Doesn't matter, make something up- , ctev_evar = new_ev- , ctev_loc = loc- }- return $ wanted : givens+ return (wanted : givens) unsolved <- simplifyWantedsTcM cts (implic, _) <- buildImplicationFor tclvl skol_info tvs_skols [] unsolved@@ -278,7 +265,7 @@ reqs = requirementMerges unit_state modname holes <- forM reqs $ \(Module iuid mod_name) -> do initIfaceLoad hsc_env- . withException ctx+ . withIfaceErr ctx $ moduleFreeHolesPrecise (text "findExtraSigImports") (mkModule (VirtUnit iuid) mod_name) return (uniqDSetToList (unionManyUniqDSets holes))@@ -400,7 +387,7 @@ decl_pred occs decl = nameOccName (ifName decl) `elemOccSet` occs filter_decls occs = filter (decl_pred occs . snd) (mi_decls iface) - exported_occs = mkOccSet [ occName n+ exported_occs = mkOccSet [ nameOccName n | a <- avails , n <- availNames a ] exported_decls = filter_decls exported_occs@@ -510,7 +497,7 @@ -- from 'requirementMerges' into this signature, producing -- a final 'TcGblEnv' that matches the local signature and -- all required signatures.-mergeSignatures :: HsParsedModule -> TcGblEnv -> ModIface -> TcRn TcGblEnv+mergeSignatures :: HasDebugCallStack => HsParsedModule -> TcGblEnv -> ModIface -> TcRn TcGblEnv mergeSignatures (HsParsedModule { hpm_module = L loc (HsModule { hsmodExports = mb_exports }), hpm_src_files = src_files })@@ -547,7 +534,7 @@ let outer_mod = tcg_mod tcg_env let inner_mod = tcg_semantic_mod tcg_env- let mod_name = moduleName (tcg_mod tcg_env)+ let mod_name = moduleName outer_mod let unit_state = hsc_units hsc_env let dflags = hsc_dflags hsc_env @@ -563,9 +550,8 @@ im = fst (getModuleInstantiation m) ctx = initSDocContext dflags defaultUserStyle fmap fst- . withException ctx- $ findAndReadIface hsc_env- (text "mergeSignatures") im m NotBoot+ . withIfaceErr ctx+ $ findAndReadIface hsc_env (text "mergeSignatures") im m NotBoot -- STEP 3: Get the unrenamed exports of all these interfaces, -- thin it according to the export list, and do shaping on them.@@ -650,12 +636,12 @@ -- because we need module -- LocalSig (from the local -- export list) to match it!- is_mod = mod_name,+ is_mod = mi_module ireq_iface, is_as = mod_name, is_qual = False, is_dloc = locA loc } ImpAll- rdr_env = mkGlobalRdrEnv (gresFromAvails (Just ispec) as1)+ rdr_env = mkGlobalRdrEnv $ gresFromAvails hsc_env (Just ispec) as1 setGblEnv tcg_env { tcg_rdr_env = rdr_env } $ exports_from_avail mb_exports rdr_env@@ -663,9 +649,9 @@ emptyImportAvails (tcg_semantic_mod tcg_env) case mb_r of- Just (_, as2) -> return (thinModIface as2 ireq_iface, as2)+ Just (_, as2, _) -> return (thinModIface as2 ireq_iface, as2) Nothing -> addMessages msgs >> failM- -- We can't think signatures from non signature packages+ -- We can't thin signatures from non-signature packages _ -> return (ireq_iface, as1) -- 3(c). Only identifiers from signature packages are "ok" to -- import (that is, they are safe from a PVP perspective.)@@ -677,7 +663,7 @@ -- 3(d). Extend the name substitution (performing shaping) mb_r <- extend_ns nsubst as2 case mb_r of- Left err -> failWithTc (mkTcRnUnknownMessage $ mkPlainError noHints err)+ Left err -> failWithTc (TcRnHsigShapeMismatch err) Right nsubst' -> return (nsubst',oks',(imod, thinned_iface):ifaces) nsubst0 = mkNameShape (moduleName inner_mod) (mi_exports lcl_iface0) ok_to_use0 = mkOccSet (exportOccs (mi_exports lcl_iface0))@@ -688,9 +674,9 @@ <- foldM gen_subst (nsubst0, ok_to_use0, []) (zip reqs ireq_ifaces0) let thinned_ifaces = reverse rev_thinned_ifaces exports = nameShapeExports nsubst- rdr_env = mkGlobalRdrEnv (gresFromAvails Nothing exports)+ rdr_env = mkGlobalRdrEnv (gresFromAvails hsc_env Nothing exports) _warn_occs = filter (not . (`elemOccSet` ok_to_use)) (exportOccs exports)- warns = NoWarnings+ warns = emptyWarn {- -- TODO: Warnings are transitive, but this is not what we want here: -- if a module reexports an entity from a signature, that should be OK.@@ -713,14 +699,14 @@ -- reexports are picked up correctly tcg_imports = tcg_imports orig_tcg_env, tcg_exports = exports,- tcg_dus = usesOnly (availsToNameSetWithSelectors exports),+ tcg_dus = usesOnly (availsToNameSet exports), tcg_warns = warns } $ do tcg_env <- getGblEnv -- Make sure we didn't refer to anything that doesn't actually exist -- pprTrace "mergeSignatures: exports_from_avail" (ppr exports) $ return ()- (mb_lies, _) <- exports_from_avail mb_exports rdr_env+ (mb_lies, _, _) <- exports_from_avail mb_exports rdr_env (tcg_imports tcg_env) (tcg_semantic_mod tcg_env) {- -- NB: This is commented out, because warns above is disabled.@@ -753,9 +739,9 @@ let ifaces = lcl_iface : ext_ifaces -- STEP 4.1: Merge fixities (we'll verify shortly) tcg_fix_env- let fix_env = mkNameEnv [ (greMangledName rdr_elt, FixItem occ f)+ let fix_env = mkNameEnv [ (greName rdr_elt, FixItem occ f) | (occ, f) <- concatMap mi_fixities ifaces- , rdr_elt <- lookupGlobalRdrEnv rdr_env occ ]+ , rdr_elt <- lookupGRE rdr_env (LookupOccName occ AllRelevantGREs) ] -- STEP 5: Typecheck the interfaces let type_env_var = tcg_type_env_var tcg_env@@ -890,11 +876,11 @@ n <- newDFunName (is_cls inst) (is_tys inst) (nameSrcSpan (is_dfun_name inst)) let dfun = setVarName (is_dfun inst) n return (dfun, inst { is_dfun_name = n, is_dfun = dfun })- tcg_env <- return tcg_env {- tcg_insts = map snd dfun_insts,- tcg_type_env = extendTypeEnvWithIds (tcg_type_env tcg_env) (map fst dfun_insts)- } + tcg_env <- return $+ tcg_env { tcg_insts = map snd dfun_insts+ , tcg_type_env = extendTypeEnvWithIds (tcg_type_env tcg_env) (map fst dfun_insts) }+ addDependentFiles src_files return tcg_env@@ -927,19 +913,19 @@ logger = hsc_logger hsc_env exportOccs :: [AvailInfo] -> [OccName]-exportOccs = concatMap (map occName . availNames)+exportOccs = concatMap (map nameOccName . availNames) impl_msg :: UnitState -> Module -> InstantiatedModule -> SDoc impl_msg unit_state impl_mod (Module req_uid req_mod_name) = pprWithUnitState unit_state $- text "while checking that" <+> ppr impl_mod <+>- text "implements signature" <+> ppr req_mod_name <+>- text "in" <+> ppr req_uid+ text "While checking that" <+> quotes (ppr impl_mod) <+>+ text "implements signature" <+> quotes (ppr req_mod_name) <+>+ text "in" <+> quotes (ppr req_uid) <> dot -- | Check if module implements a signature. (The signature is -- always un-hashed, which is why its components are specified -- explicitly.)-checkImplements :: Module -> InstantiatedModule -> TcRn TcGblEnv+checkImplements :: HasDebugCallStack => Module -> InstantiatedModule -> TcRn TcGblEnv checkImplements impl_mod req_mod@(Module uid mod_name) = do hsc_env <- getTopEnv let unit_state = hsc_units hsc_env@@ -957,7 +943,7 @@ impl_iface <- initIfaceTcRn $ loadSysInterface (text "checkImplements 1") impl_mod let impl_gr = mkGlobalRdrEnv- (gresFromAvails Nothing (mi_exports impl_iface))+ (gresFromAvails hsc_env Nothing (mi_exports impl_iface)) nsubst = mkNameShape (moduleName impl_mod) (mi_exports impl_iface) -- Load all the orphans, so the subsequent 'checkHsigIface' sees@@ -967,9 +953,9 @@ let avails = calculateAvails home_unit other_home_units impl_iface False{- safe -} NotBoot ImportedBySystem- fix_env = mkNameEnv [ (greMangledName rdr_elt, FixItem occ f)+ fix_env = mkNameEnv [ (greName rdr_elt, FixItem occ f) | (occ, f) <- mi_fixities impl_iface- , rdr_elt <- lookupGlobalRdrEnv impl_gr occ ]+ , rdr_elt <- lookupGRE impl_gr (LookupOccName occ AllRelevantGREs) ] updGblEnv (\tcg_env -> tcg_env { -- Setting tcg_rdr_env to treat all exported entities from -- the implementing module as in scope improves error messages,@@ -996,18 +982,15 @@ isig_mod sig_mod NotBoot isig_iface <- case mb_isig_iface of Succeeded (iface, _) -> return iface- Failed err -> failWithTc $ mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Could not find hi interface for signature" <+>- quotes (ppr isig_mod) <> colon) 4 err+ Failed err ->+ failWithTc $ TcRnInterfaceError $+ Can'tFindInterface err (LookingForSig isig_mod) -- STEP 3: Check that the implementing interface exports everything -- we need. (Notice we IGNORE the Modules in the AvailInfos.) forM_ (exportOccs (mi_exports isig_iface)) $ \occ ->- case lookupGlobalRdrEnv impl_gr occ of- [] -> addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- quotes (ppr occ)- <+> text "is exported by the hsig file, but not exported by the implementing module"- <+> quotes (pprWithUnitState unit_state $ ppr impl_mod)+ case lookupGRE impl_gr (LookupOccName occ SameNameSpace) of+ [] -> addErr $ TcRnHsigMissingModuleExport occ unit_state impl_mod _ -> return () failIfErrsM
GHC/Tc/Utils/Concrete.hs view
@@ -8,9 +8,6 @@ ( -- * Ensuring that a type has a fixed runtime representation hasFixedRuntimeRep , hasFixedRuntimeRep_syntactic-- -- * Making a type concrete- , makeTypeConcrete ) where @@ -22,14 +19,15 @@ , mkGReflRightMCo, mkNomReflCo ) import GHC.Core.TyCo.Rep ( Type(..), MCoercion(..) ) import GHC.Core.TyCon ( isConcreteTyCon )-import GHC.Core.Type ( isConcrete, typeKind, tyVarKind, coreView+import GHC.Core.Type ( isConcreteType, typeKind, tyVarKind, coreView , mkTyVarTy, mkTyConApp, mkFunTy, mkAppTy ) import GHC.Tc.Types ( TcM, ThStage(..), PendingStuff(..) ) import GHC.Tc.Types.Constraint ( NotConcreteError(..), NotConcreteReason(..) ) import GHC.Tc.Types.Evidence ( Role(..), TcCoercionN, TcMCoercionN ) import GHC.Tc.Types.Origin ( CtOrigin(..), FixedRuntimeRepContext, FixedRuntimeRepOrigin(..) )-import GHC.Tc.Utils.Monad ( emitNotConcreteError, setTcLevel, getCtLocM, getStage, traceTc )+import GHC.Tc.Utils.Monad ( emitNotConcreteError, setTcLevel, getCtLocM, getStage, traceTc+ , liftZonkM ) import GHC.Tc.Utils.TcType ( TcType, TcKind, TcTypeFRR , MetaInfo(..), ConcreteTvOrigin(..) , isMetaTyVar, metaTyVarInfo, tcTyVarLevel )@@ -37,9 +35,13 @@ , emitWantedEq ) import GHC.Types.Basic ( TypeOrKind(..) )+import GHC.Types.Name ( getOccName )+import GHC.Types.Name.Occurrence( occNameFS ) import GHC.Utils.Misc ( HasDebugCallStack ) import GHC.Utils.Outputable+import GHC.Data.FastString ( fsLit ) + import Control.Monad ( void ) import Data.Functor ( ($>) ) import Data.List.NonEmpty ( NonEmpty((:|)) )@@ -83,7 +85,7 @@ Note [The Concrete mechanism] Instead of simply checking that a type `ty` is concrete (i.e. computing- 'isConcrete`), we emit an equality constraint:+ 'isConcreteType`), we emit an equality constraint: co :: ty ~# concrete_ty @@ -179,7 +181,7 @@ - a concrete type constructor (as defined below), or - a concrete type variable (see Note [ConcreteTv] below), or - an application of a concrete type to another concrete type-GHC.Core.Type.isConcrete checks whether a type meets this definition.+GHC.Core.Type.isConcreteType checks whether a type meets this definition. Definition: a /concrete type constructor/ is defined by - a promoted data constructor@@ -495,7 +497,7 @@ -- Create a new ConcreteTv metavariable @concrete_tv@ -- and unify @ty ~# concrete_tv@. ; _ ->- do { conc_tv <- newConcreteTyVar (ConcreteFRR frr_orig) ki+ do { conc_tv <- newConcreteTyVar (ConcreteFRR frr_orig) (fsLit "cx") ki -- NB: newConcreteTyVar asserts that 'ki' is concrete. ; coToMCo <$> emitWantedEq orig KindLevel Nominal ty (mkTyVarTy conc_tv) } } } where@@ -520,7 +522,8 @@ -> TcType -> TcM TcType ensureConcrete frr_orig ty- = do { (ty', errs) <- makeTypeConcrete conc_orig ty+ = do { traceTc "ensureConcrete {" (ppr frr_orig $$ ppr ty)+ ; (ty', errs) <- makeTypeConcrete conc_orig ty ; case errs of { err:errs -> do { traceTc "ensureConcrete } failure" $@@ -623,8 +626,6 @@ -- that `TupleRep '[ beta[conc], F Int ]` is not concrete because of the -- type family application `F Int`. But we could decompose by setting -- alpha := TupleRep '[ beta, gamma[conc] ] and emitting `[W] gamma[conc] ~ F Int`.------ This would be useful in startSolvingByUnification. makeTypeConcrete conc_orig ty = do { res@(ty', _) <- runWriterT $ go ty ; traceTc "makeTypeConcrete" $@@ -636,7 +637,7 @@ go ty | Just ty <- coreView ty = go ty- | isConcrete ty+ | isConcreteType ty = pure ty go ty@(TyVarTy tv) -- not a ConcreteTv (already handled above) = do { mb_filled <- lift $ isFilledMetaTyVar_maybe tv@@ -647,11 +648,14 @@ , TauTv <- metaTyVarInfo tv -> -- Change the MetaInfo to ConcreteTv, but retain the TcLevel do { kind <- go (tyVarKind tv)+ ; let occ_fs = occNameFS (getOccName tv)+ -- occ_fs: preserve the occurrence name of the original tyvar+ -- This helps in error messages ; lift $ do { conc_tv <- setTcLevel (tcTyVarLevel tv) $- newConcreteTyVar conc_orig kind+ newConcreteTyVar conc_orig occ_fs kind ; let conc_ty = mkTyVarTy conc_tv- ; writeMetaTyVar tv conc_ty+ ; liftZonkM $ writeMetaTyVar tv conc_ty ; return conc_ty } } | otherwise -- Don't attempt to make other type variables concrete
GHC/Tc/Utils/Env.hs view
@@ -22,9 +22,10 @@ tcLookupLocatedGlobal, tcLookupGlobal, tcLookupGlobalOnly, tcLookupTyCon, tcLookupClass, tcLookupDataCon, tcLookupPatSyn, tcLookupConLike,+ tcLookupRecSelParent, tcLookupLocatedGlobalId, tcLookupLocatedTyCon, tcLookupLocatedClass, tcLookupAxiom,- lookupGlobal, lookupGlobal_maybe, ioLookupDataCon,+ lookupGlobal, lookupGlobal_maybe, addTypecheckedBinds, -- Local environment@@ -34,7 +35,6 @@ tcExtendIdEnv, tcExtendIdEnv1, tcExtendIdEnv2, tcExtendBinderStack, tcExtendLocalTypeEnv, isTypeClosedLetBndr,- tcCheckUsage, tcLookup, tcLookupLocated, tcLookupLocalIds, tcLookupId, tcLookupIdMaybe, tcLookupTyVar,@@ -43,13 +43,10 @@ getInLocalScope, wrongThingErr, pprBinders, - tcAddDataFamConPlaceholders, tcAddPatSynPlaceholders,+ tcAddDataFamConPlaceholders, tcAddPatSynPlaceholders, tcAddKindSigPlaceholders, getTypeSigNames, tcExtendRecEnv, -- For knot-tying - -- Tidying- tcInitTidyEnv, tcInitOpenTidyEnv,- -- Instances tcLookupInstance, tcGetInstEnvs, @@ -60,6 +57,7 @@ tcGetDefaultTys, -- Template Haskell stuff+ StageCheckReason(..), checkWellStaged, tcMetaTy, thLevel, topIdLvl, isBrackStage, @@ -67,13 +65,14 @@ newDFunName, newFamInstTyConName, newFamInstAxiomName, mkStableIdFromString, mkStableIdFromName,- mkWrapperName+ mkWrapperName, ) where import GHC.Prelude import GHC.Driver.Env-import GHC.Driver.Session+import GHC.Driver.Env.KnotVars+import GHC.Driver.DynFlags import GHC.Builtin.Names import GHC.Builtin.Types@@ -87,15 +86,11 @@ import GHC.Tc.Errors.Types import GHC.Tc.Utils.Monad-import GHC.Tc.Utils.TcMType import GHC.Tc.Utils.TcType-import GHC.Tc.Types.Evidence (HsWrapper, idHsWrapper)-import {-# SOURCE #-} GHC.Tc.Utils.Unify ( tcSubMult )-import GHC.Tc.Types.Origin ( CtOrigin(UsageEnvironmentOf) )+import GHC.Tc.Types.LclEnv -import GHC.Core.UsageEnv import GHC.Core.InstEnv-import GHC.Core.DataCon ( DataCon, flSelector )+import GHC.Core.DataCon ( DataCon, dataConTyCon, flSelector ) import GHC.Core.PatSyn ( PatSyn ) import GHC.Core.ConLike import GHC.Core.TyCon@@ -103,6 +98,7 @@ import GHC.Core.Coercion.Axiom import GHC.Core.Class + import GHC.Unit.Module import GHC.Unit.Home import GHC.Unit.External@@ -125,17 +121,17 @@ import GHC.Types.Name.Set import GHC.Types.Name.Env import GHC.Types.Id-import GHC.Types.Var-import GHC.Types.Var.Env+import GHC.Types.Id.Info ( RecSelParent(..) ) import GHC.Types.Name.Reader import GHC.Types.TyThing-import GHC.Types.Error+import GHC.Types.Unique.Set ( nonDetEltsUniqSet ) import qualified GHC.LanguageExtensions as LangExt import Data.IORef-import Data.List (intercalate)+import Data.List ( intercalate ) import Control.Monad-import GHC.Driver.Env.KnotVars+import GHC.Iface.Errors.Types+import GHC.Types.Error {- ********************************************************************* * *@@ -151,10 +147,13 @@ mb_thing <- lookupGlobal_maybe hsc_env name ; case mb_thing of Succeeded thing -> return thing- Failed msg -> pprPanic "lookupGlobal" msg+ Failed err ->+ let msg = case err of+ Left name -> text "Could not find local name:" <+> ppr name+ Right err -> pprDiagnostic err+ in pprPanic "lookupGlobal" msg }--lookupGlobal_maybe :: HscEnv -> Name -> IO (MaybeErr SDoc TyThing)+lookupGlobal_maybe :: HscEnv -> Name -> IO (MaybeErr (Either Name IfaceMessage) TyThing) -- This may look up an Id that one has previously looked up. -- If so, we are going to read its interface file, and add its bindings -- to the ExternalPackageTable.@@ -165,24 +164,26 @@ tcg_semantic_mod = homeModuleInstantiation mhome_unit 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+ then return $ Failed $ Left name+ -- Internal names can happen in GHCi+ else do+ res <- lookupImported_maybe hsc_env name+ -- Try home package table and external package table+ return $ case res of+ Succeeded ok -> Succeeded ok+ Failed err -> Failed (Right err) } -lookupImported_maybe :: HscEnv -> Name -> IO (MaybeErr SDoc TyThing)+lookupImported_maybe :: HscEnv -> Name -> IO (MaybeErr IfaceMessage TyThing) -- Returns (Failed err) if we can't find the interface file for the thing lookupImported_maybe hsc_env name = do { mb_thing <- lookupType hsc_env name ; case mb_thing of Just thing -> return (Succeeded thing) Nothing -> importDecl_maybe hsc_env name- }+ } -importDecl_maybe :: HscEnv -> Name -> IO (MaybeErr SDoc TyThing)+importDecl_maybe :: HscEnv -> Name -> IO (MaybeErr IfaceMessage TyThing) importDecl_maybe hsc_env name | Just thing <- wiredInNameTyThing_maybe name = do { when (needWiredInHomeIface thing)@@ -192,22 +193,6 @@ | 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 SDoc 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"- addTypecheckedBinds :: TcGblEnv -> [LHsBinds GhcTc] -> TcGblEnv addTypecheckedBinds tcg_env binds | isHsBootOrSig (tcg_src tcg_env) = tcg_env@@ -257,7 +242,7 @@ do { mb_thing <- tcLookupImported_maybe name ; case mb_thing of Succeeded thing -> return thing- Failed msg -> failWithTc (TcRnInterfaceLookupError name msg)+ Failed msg -> failWithTc (TcRnInterfaceError msg) }}} -- Look up only in this module's global env't. Don't look in imports, etc.@@ -274,42 +259,53 @@ thing <- tcLookupGlobal name case thing of AConLike (RealDataCon con) -> return con- _ -> wrongThingErr "data constructor" (AGlobal thing) name+ _ -> wrongThingErr WrongThingDataCon (AGlobal thing) name tcLookupPatSyn :: Name -> TcM PatSyn tcLookupPatSyn name = do thing <- tcLookupGlobal name case thing of AConLike (PatSynCon ps) -> return ps- _ -> wrongThingErr "pattern synonym" (AGlobal thing) name+ _ -> wrongThingErr WrongThingPatSyn (AGlobal thing) name tcLookupConLike :: Name -> TcM ConLike tcLookupConLike name = do thing <- tcLookupGlobal name case thing of AConLike cl -> return cl- _ -> wrongThingErr "constructor-like thing" (AGlobal thing) name+ _ -> wrongThingErr WrongThingConLike (AGlobal thing) name +tcLookupRecSelParent :: HsRecUpdParent GhcRn -> TcM RecSelParent+tcLookupRecSelParent (RnRecUpdParent { rnRecUpdCons = cons })+ = case any_con of+ PatSynName ps ->+ RecSelPatSyn <$> tcLookupPatSyn ps+ DataConName dc ->+ RecSelData . dataConTyCon <$> tcLookupDataCon dc+ where+ any_con = head $ nonDetEltsUniqSet cons+ -- Any constructor will give the same result here.+ tcLookupClass :: Name -> TcM Class tcLookupClass name = do thing <- tcLookupGlobal name case thing of ATyCon tc | Just cls <- tyConClass_maybe tc -> return cls- _ -> wrongThingErr "class" (AGlobal thing) name+ _ -> wrongThingErr WrongThingClass (AGlobal thing) name tcLookupTyCon :: Name -> TcM TyCon tcLookupTyCon name = do thing <- tcLookupGlobal name case thing of ATyCon tc -> return tc- _ -> wrongThingErr "type constructor" (AGlobal thing) name+ _ -> wrongThingErr WrongThingTyCon (AGlobal thing) name tcLookupAxiom :: Name -> TcM (CoAxiom Branched) tcLookupAxiom name = do thing <- tcLookupGlobal name case thing of ACoAxiom ax -> return ax- _ -> wrongThingErr "axiom" (AGlobal thing) name+ _ -> wrongThingErr WrongThingAxiom (AGlobal thing) name tcLookupLocatedGlobalId :: LocatedA Name -> TcM Id tcLookupLocatedGlobalId = addLocMA tcLookupId@@ -326,17 +322,13 @@ tcLookupInstance :: Class -> [Type] -> TcM ClsInst tcLookupInstance cls tys = do { instEnv <- tcGetInstEnvs- ; case lookupUniqueInstEnv instEnv cls tys of- Left err ->- failWithTc $ mkTcRnUnknownMessage- $ mkPlainError noHints (text "Couldn't match instance:" <+> err)- Right (inst, tys)- | uniqueTyVars tys -> return inst- | otherwise -> failWithTc (mkTcRnUnknownMessage $ mkPlainError noHints errNotExact)+ ; let inst = lookupUniqueInstEnv instEnv cls tys >>= \ (inst, tys) ->+ if uniqueTyVars tys then Right inst else Left LookupInstErrNotExact+ ; case inst of+ Right i -> return i+ Left err -> failWithTc (TcRnLookupInstance cls tys err) } where- errNotExact = text "Not an exact match (i.e., some variables get instantiated)"- uniqueTyVars tys = all isTyVarTy tys && hasNoDups (map getTyVar tys) @@ -460,7 +452,7 @@ local_env <- getLclTypeEnv case lookupNameEnv local_env name of Just thing -> return thing- Nothing -> (AGlobal <$> tcLookupGlobal name)+ Nothing -> AGlobal <$> tcLookupGlobal name tcLookupTyVar :: Name -> TcM TcTyVar tcLookupTyVar name@@ -493,7 +485,7 @@ -- the same level as the lookup. Only used in one place... tcLookupLocalIds ns = do { env <- getLclEnv- ; return (map (lookup (tcl_env env)) ns) }+ ; return (map (lookup (getLclEnvTypeEnv env)) ns) } where lookup lenv name = case lookupNameEnv lenv name of@@ -510,6 +502,7 @@ ATcTyCon tc -> return tc _ -> pprPanic "tcLookupTcTyCon" (ppr name) + getInLocalScope :: TcM (Name -> Bool) getInLocalScope = do { lcl_env <- getLclTypeEnv ; return (`elemNameEnv` lcl_env) }@@ -520,7 +513,7 @@ -- No need to update the global tyvars, or tcl_th_bndrs, or tcl_rdr tcExtendKindEnvList things thing_inside = do { traceTc "tcExtendKindEnvList" (ppr things)- ; updLclEnv upd_env thing_inside }+ ; updLclCtxt upd_env thing_inside } where upd_env env = env { tcl_env = extendNameEnvList (tcl_env env) things } @@ -528,7 +521,7 @@ -- A variant of tcExtendKindEvnList tcExtendKindEnv extra_env thing_inside = do { traceTc "tcExtendKindEnv" (ppr extra_env)- ; updLclEnv upd_env thing_inside }+ ; updLclCtxt upd_env thing_inside } where upd_env env = env { tcl_env = tcl_env env `plusNameEnv` extra_env } @@ -639,9 +632,9 @@ -- that are bound together with extra_env and should not be regarded -- as free in the types of extra_env. = do { traceTc "tc_extend_local_env" (ppr extra_env)- ; updLclEnv upd_lcl_env thing_inside }+ ; updLclCtxt upd_lcl_env thing_inside } where- upd_lcl_env env0@(TcLclEnv { tcl_th_ctxt = stage+ upd_lcl_env env0@(TcLclCtxt { tcl_th_ctxt = stage , tcl_rdr = rdr_env , tcl_th_bndrs = th_bndrs , tcl_env = lcl_type_env })@@ -662,63 +655,10 @@ thlvl = (top_lvl, thLevel stage) -tcExtendLocalTypeEnv :: TcLclEnv -> [(Name, TcTyThing)] -> TcLclEnv-tcExtendLocalTypeEnv lcl_env@(TcLclEnv { tcl_env = lcl_type_env }) tc_ty_things+tcExtendLocalTypeEnv :: [(Name, TcTyThing)] -> TcLclCtxt -> TcLclCtxt+tcExtendLocalTypeEnv tc_ty_things lcl_env@(TcLclCtxt { tcl_env = lcl_type_env }) = lcl_env { tcl_env = extendNameEnvList lcl_type_env tc_ty_things } --- | @tcCheckUsage name mult thing_inside@ runs @thing_inside@, checks that the--- usage of @name@ is a submultiplicity of @mult@, and removes @name@ from the--- usage environment. See also Note [Wrapper returned from tcSubMult] in--- GHC.Tc.Utils.Unify, which applies to the wrapper returned from this function.-tcCheckUsage :: Name -> Mult -> TcM a -> TcM (a, HsWrapper)-tcCheckUsage name id_mult thing_inside- = do { (local_usage, result) <- tcCollectingUsage thing_inside- ; wrapper <- check_then_add_usage local_usage- ; return (result, wrapper) }- where- check_then_add_usage :: UsageEnv -> TcM HsWrapper- -- Checks that the usage of the newly introduced binder is compatible with- -- its multiplicity, and combines the usage of non-new binders to |uenv|- check_then_add_usage uenv- = do { let actual_u = lookupUE uenv name- ; traceTc "check_then_add_usage" (ppr id_mult $$ ppr actual_u)- ; wrapper <- case actual_u of- Bottom -> return idHsWrapper- Zero -> tcSubMult (UsageEnvironmentOf name) ManyTy id_mult- MUsage m -> do { m <- promote_mult m- ; tcSubMult (UsageEnvironmentOf name) m id_mult }- ; tcEmitBindingUsage (deleteUE uenv name)- ; return wrapper }-- -- This is gross. The problem is in test case typecheck/should_compile/T18998:- -- f :: a %1-> Id n a -> Id n a- -- f x (MkId _) = MkId x- -- where MkId is a GADT constructor. Multiplicity polymorphism of constructors- -- invents a new multiplicity variable p[2] for the application MkId x. This- -- variable is at level 2, bumped because of the GADT pattern-match (MkId _).- -- We eventually unify the variable with One, due to the call to tcSubMult in- -- tcCheckUsage. But by then, we're at TcLevel 1, and so the level-check- -- fails.- --- -- What to do? If we did inference "for real", the sub-multiplicity constraint- -- would end up in the implication of the GADT pattern-match, and all would- -- be well. But we don't have a real sub-multiplicity constraint to put in- -- the implication. (Multiplicity inference works outside the usual generate-- -- constraints-and-solve scheme.) Here, where the multiplicity arrives, we- -- must promote all multiplicity variables to reflect this outer TcLevel.- -- It's reminiscent of floating a constraint, really, so promotion is- -- appropriate. The promoteTcType function works only on types of kind TYPE rr,- -- so we can't use it here. Thus, this dirtiness.- --- -- It works nicely in practice.- --- -- We use a set to avoid calling promoteMetaTyVarTo twice on the same- -- metavariable. This happened in #19400.- promote_mult m = do { fvs <- zonkTyCoVarsAndFV (tyCoVarsOfType m)- ; any_promoted <- promoteTyVarSet fvs- ; if any_promoted then zonkTcType m else return m- }- {- ********************************************************************* * * The TcBinderStack@@ -728,42 +668,9 @@ tcExtendBinderStack :: [TcBinder] -> TcM a -> TcM a tcExtendBinderStack bndrs thing_inside = do { traceTc "tcExtendBinderStack" (ppr bndrs)- ; updLclEnv (\env -> env { tcl_bndrs = bndrs ++ tcl_bndrs env })+ ; updLclCtxt (\env -> env { tcl_bndrs = bndrs ++ tcl_bndrs env }) thing_inside } -tcInitTidyEnv :: TcM TidyEnv--- We initialise the "tidy-env", used for tidying types before printing,--- by building a reverse map from the in-scope type variables to the--- OccName that the programmer originally used for them-tcInitTidyEnv- = do { lcl_env <- getLclEnv- ; go emptyTidyEnv (tcl_bndrs lcl_env) }- where- go (env, subst) []- = return (env, subst)- go (env, subst) (b : bs)- | TcTvBndr name tyvar <- b- = do { let (env', occ') = tidyOccName env (nameOccName name)- name' = tidyNameOcc name occ'- tyvar1 = setTyVarName tyvar name'- ; tyvar2 <- zonkTcTyVarToTcTyVar tyvar1- -- Be sure to zonk here! Tidying applies to zonked- -- types, so if we don't zonk we may create an- -- ill-kinded type (#14175)- ; go (env', extendVarEnv subst tyvar tyvar2) bs }- | otherwise- = go (env, subst) bs---- | Get a 'TidyEnv' that includes mappings for all vars free in the given--- type. Useful when tidying open types.-tcInitOpenTidyEnv :: [TyCoVar] -> TcM TidyEnv-tcInitOpenTidyEnv tvs- = do { env1 <- tcInitTidyEnv- ; let env2 = tidyFreeTyCoVars env1 tvs- ; return env2 }--- {- ********************************************************************* * * Adding placeholders@@ -798,6 +705,12 @@ | PSB{ psb_id = L _ name } <- pat_syns ] thing_inside +tcAddKindSigPlaceholders :: LHsKind GhcRn -> TcM a -> TcM a+tcAddKindSigPlaceholders kind_sig thing_inside+ = tcExtendKindEnvList [ (name, APromotionErr TypeVariablePE)+ | name <- hsScopedKvs kind_sig ]+ thing_inside+ getTypeSigNames :: [LSig GhcRn] -> NameSet -- Get the names that have a user type sig getTypeSigNames sigs@@ -886,7 +799,7 @@ ************************************************************************ -} -checkWellStaged :: SDoc -- What the stage check is for+checkWellStaged :: StageCheckReason -- What the stage check is for -> ThLevel -- Binding level (increases inside brackets) -> ThLevel -- Use stage -> TcM () -- Fail if badly staged, adding an error@@ -895,22 +808,11 @@ = return () -- E.g. \x -> [| $(f x) |] | bind_lvl == outerLevel -- GHC restriction on top level splices- = stageRestrictionError pp_thing+ = failWithTc (TcRnStageRestriction pp_thing) | otherwise -- Badly staged = failWithTc $ -- E.g. \x -> $(f x)- mkTcRnUnknownMessage $ mkPlainError noHints $- text "Stage error:" <+> pp_thing <+>- hsep [text "is bound at stage" <+> ppr bind_lvl,- text "but used at stage" <+> ppr use_lvl]--stageRestrictionError :: SDoc -> TcM a-stageRestrictionError pp_thing- = failWithTc $- mkTcRnUnknownMessage $ mkPlainError noHints $- sep [ text "GHC stage restriction:"- , nest 2 (vcat [ pp_thing <+> text "is used in a top-level splice, quasi-quote, or annotation,"- , text "and must be imported, not defined locally"])]+ TcRnBadlyStaged pp_thing bind_lvl use_lvl topIdLvl :: Id -> ThLevel -- Globals may either be imported, or may be from an earlier "chunk"@@ -1077,7 +979,7 @@ = do { is_boot <- tcIsHsBootOrSig ; mod <- getModule ; let info_string = occNameString (getOccName clas) ++- concatMap (occNameString.getDFunTyKey) tys+ concatMap (occNameString . getDFunTyKey) tys ; dfun_occ <- chooseUniqueOccTc (mkDFunOcc info_string is_boot) ; newGlobalBinder mod dfun_occ loc } @@ -1168,17 +1070,14 @@ notFound :: Name -> TcM TyThing notFound name = do { lcl_env <- getLclEnv- ; let stage = tcl_th_ctxt lcl_env+ ; let stage = getLclEnvThStage lcl_env ; case stage of -- See Note [Out of scope might be a staging error] Splice {} | isUnboundName name -> failM -- If the name really isn't in scope -- don't report it again (#11941)- | otherwise -> stageRestrictionError (quotes (ppr name))+ | otherwise -> failWithTc (TcRnStageRestriction (StageCheckSplice name)) _ -> failWithTc $- mkTcRnUnknownMessage $ mkPlainError noHints $- vcat[text "GHC internal error:" <+> quotes (ppr name) <+>- text "is not in scope during type checking, but it passed the renamer",- text "tcl_env of environment:" <+> ppr (tcl_env lcl_env)]+ mkTcRnNotInScope (getRdrName name) (NotInScopeTc (getLclEnvTypeEnv lcl_env)) -- Take care: printing the whole gbl env can -- cause an infinite loop, in the case where we -- are in the middle of a recursive TyCon/Class group;@@ -1186,12 +1085,9 @@ -- very unhelpful, because it hides one compiler bug with another } -wrongThingErr :: String -> TcTyThing -> Name -> TcM a-wrongThingErr expected thing name- = let msg = mkTcRnUnknownMessage $ mkPlainError noHints $- (pprTcTyThingCategory thing <+> quotes (ppr name) <+>- text "used as a" <+> text expected)- in failWithTc msg+wrongThingErr :: WrongThingSort -> TcTyThing -> Name -> TcM a+wrongThingErr expected thing name =+ failWithTc (TcRnTyThingUsedWrong expected thing name) {- Note [Out of scope might be a staging error] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
− GHC/Tc/Utils/Env.hs-boot
@@ -1,10 +0,0 @@-module GHC.Tc.Utils.Env where--import GHC.Tc.Types( TcM )-import GHC.Types.Var.Env( TidyEnv )---- Annoyingly, there's a recursion between tcInitTidyEnv--- (which does zonking and hence needs GHC.Tc.Utils.TcMType) and--- addErrTc etc which live in GHC.Tc.Utils.Monad. Rats.-tcInitTidyEnv :: TcM TidyEnv-
GHC/Tc/Utils/Instantiate.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE FlexibleContexts, RecursiveDo #-} {-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE LambdaCase #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} @@ -27,7 +28,7 @@ newOverloadedLit, mkOverLit, - newClsInst,+ newClsInst, newFamInst, tcGetInsts, tcGetInstEnvs, getOverlapFlag, tcExtendLocalInstEnv, instCallConstraints, newMethodFromName,@@ -43,25 +44,24 @@ import GHC.Driver.Session import GHC.Driver.Env -import GHC.Builtin.Types ( heqDataCon, eqDataCon, integerTyConName )+import GHC.Builtin.Types ( heqDataCon, integerTyConName ) import GHC.Builtin.Names import GHC.Hs import GHC.Hs.Syn.Type ( hsLitType ) import GHC.Core.InstEnv+import GHC.Core.FamInstEnv import GHC.Core.Predicate import GHC.Core ( Expr(..), isOrphan ) -- For the Coercion constructor import GHC.Core.Type-import GHC.Core.Multiplicity-import GHC.Core.TyCo.Rep import GHC.Core.TyCo.Ppr ( debugPprType ) import GHC.Core.Class( Class ) import GHC.Core.DataCon+import GHC.Core.Coercion.Axiom import {-# SOURCE #-} GHC.Tc.Gen.Expr( tcCheckPolyExpr, tcSyntaxOp )-import {-# SOURCE #-} GHC.Tc.Utils.Unify( unifyType, unifyKind )-import GHC.Tc.Utils.Zonk+import {-# SOURCE #-} GHC.Tc.Utils.Unify( unifyType ) import GHC.Tc.Utils.Monad import GHC.Tc.Types.Constraint import GHC.Tc.Types.Origin@@ -72,6 +72,7 @@ import GHC.Tc.Utils.TcMType import GHC.Tc.Utils.TcType import GHC.Tc.Errors.Types+import GHC.Tc.Zonk.Monad ( ZonkM ) import GHC.Types.Id.Make( mkDictFunId ) import GHC.Types.Basic ( TypeOrKind(..), Arity )@@ -89,7 +90,6 @@ import GHC.Utils.Panic import GHC.Utils.Panic.Plain import GHC.Utils.Outputable-import GHC.Utils.Unique (sameUnique) import GHC.Unit.State import GHC.Unit.External@@ -102,7 +102,7 @@ {- ************************************************************************ * *- Creating and emittind constraints+ Creating and emitting constraints * * ************************************************************************ -}@@ -387,71 +387,21 @@ go n subst kind | n > 0- , Just (bndr, body) <- tcSplitPiTy_maybe kind- , isInvisiblePiTyBinder bndr- = do { (subst', arg) <- tcInstInvisibleTyBinder subst bndr+ , Just (bndr, body) <- tcSplitForAllTyVarBinder_maybe kind+ , isInvisibleForAllTyFlag (binderFlag bndr)+ = do { (subst', arg) <- tcInstInvisibleTyBinder subst (binderVar bndr) ; (args, inner_ty) <- go (n-1) subst' body ; return (arg:args, inner_ty) } | otherwise = return ([], substTy subst kind) -tcInstInvisibleTyBinder :: Subst -> PiTyVarBinder -> TcM (Subst, TcType)+tcInstInvisibleTyBinder :: Subst -> TyVar -> TcM (Subst, TcType) -- Called only to instantiate kinds, in user-written type signatures -tcInstInvisibleTyBinder subst (Named (Bndr tv _))+tcInstInvisibleTyBinder subst tv = do { (subst', tv') <- newMetaTyVarX subst tv ; return (subst', mkTyVarTy tv') } -tcInstInvisibleTyBinder subst (Anon ty af)- | Just (mk, k1, k2) <- get_eq_tys_maybe (substTy subst (scaledThing ty))- -- For kinds like (k1 ~ k2) => blah, we want to emit a unification- -- constraint for (k1 ~# k2) and return the argument (Eq# k1 k2)- -- See Note [Constraints in kinds] in GHC.Core.TyCo.Rep- -- Equality is the *only* constraint currently handled in types.- = assert (isInvisibleFunArg af) $- do { co <- unifyKind Nothing k1 k2- ; return (subst, mk co) }-- | otherwise -- This should never happen- -- See GHC.Core.TyCo.Rep Note [Constraints in kinds]- = pprPanic "tcInvisibleTyBinder" (ppr ty)----------------------------------get_eq_tys_maybe :: Type- -> Maybe ( Coercion -> Type- -- Given a coercion proving t1 ~# t2, produce the- -- right instantiation for the PiTyVarBinder at hand- , Type -- t1- , Type -- t2- )--- See Note [Constraints in kinds] in GHC.Core.TyCo.Rep-get_eq_tys_maybe ty- -- Lifted heterogeneous equality (~~)- | Just (tc, [_, _, k1, k2]) <- splitTyConApp_maybe ty- , tc `hasKey` heqTyConKey- = Just (mkHEqBoxTy k1 k2, k1, k2)-- -- Lifted homogeneous equality (~)- | Just (tc, [_, k1, k2]) <- splitTyConApp_maybe ty- , tc `hasKey` eqTyConKey- = Just (mkEqBoxTy k1 k2, k1, k2)-- | otherwise- = Nothing---- | This takes @a ~# b@ and returns @a ~~ b@.-mkHEqBoxTy :: Type -> Type -> TcCoercion -> Type-mkHEqBoxTy ty1 ty2 co- = mkTyConApp (promoteDataCon heqDataCon) [k1, k2, ty1, ty2, mkCoercionTy co]- where k1 = typeKind ty1- k2 = typeKind ty2---- | This takes @a ~# b@ and returns @a ~ b@.-mkEqBoxTy :: Type -> Type -> TcCoercion -> Type-mkEqBoxTy ty1 ty2 co- = mkTyConApp (promoteDataCon eqDataCon) [k, ty1, ty2, mkCoercionTy co]- where k = typeKind ty1- {- ********************************************************************* * * SkolemTvs (immutable)@@ -813,7 +763,7 @@ return (std_nm, unLoc expr) syntaxNameCtxt :: HsExpr GhcRn -> CtOrigin -> Type -> SrcSpan -> TidyEnv- -> TcRn (TidyEnv, SDoc)+ -> ZonkM (TidyEnv, SDoc) syntaxNameCtxt name orig ty loc tidy_env = return (tidy_env, msg) where msg = vcat [ text "When checking that" <+> quotes (ppr name)@@ -842,17 +792,17 @@ in hasFixedRuntimeRep_syntactic (FRRArrow $ ArrowFun user_expr) res_ty mb_arity :: Maybe Arity mb_arity -- arity of the arrow operation, counting type-level arguments- | sameUnique std_nm arrAName -- result used as an argument in, e.g., do_premap+ | std_nm == arrAName -- result used as an argument in, e.g., do_premap = Just 3- | sameUnique std_nm composeAName -- result used as an argument in, e.g., dsCmdStmt/BodyStmt+ | std_nm == composeAName -- result used as an argument in, e.g., dsCmdStmt/BodyStmt = Just 5- | sameUnique std_nm firstAName -- result used as an argument in, e.g., dsCmdStmt/BodyStmt+ | std_nm == firstAName -- result used as an argument in, e.g., dsCmdStmt/BodyStmt = Just 4- | sameUnique std_nm appAName -- result used as an argument in, e.g., dsCmd/HsCmdArrApp/HsHigherOrderApp+ | std_nm == appAName -- result used as an argument in, e.g., dsCmd/HsCmdArrApp/HsHigherOrderApp = Just 2- | sameUnique std_nm choiceAName -- result used as an argument in, e.g., HsCmdIf+ | std_nm == choiceAName -- result used as an argument in, e.g., HsCmdIf = Just 5- | sameUnique std_nm loopAName -- result used as an argument in, e.g., HsCmdIf+ | std_nm == loopAName -- result used as an argument in, e.g., HsCmdIf = Just 4 | otherwise = Nothing@@ -860,7 +810,7 @@ {- ************************************************************************ * *- Instances+ Class instances * * ************************************************************************ -}@@ -871,17 +821,32 @@ -- set the OverlapMode to 'm' getOverlapFlag overlap_mode = do { dflags <- getDynFlags- ; let overlap_ok = xopt LangExt.OverlappingInstances dflags- incoherent_ok = xopt LangExt.IncoherentInstances dflags+ ; let overlap_ok = xopt LangExt.OverlappingInstances dflags+ incoherent_ok = xopt LangExt.IncoherentInstances dflags+ noncanonical_incoherence = not $ gopt Opt_SpecialiseIncoherents dflags+ use x = OverlapFlag { isSafeOverlap = safeLanguageOn dflags , overlapMode = x } default_oflag | incoherent_ok = use (Incoherent NoSourceText) | overlap_ok = use (Overlaps NoSourceText) | otherwise = use (NoOverlap NoSourceText) - final_oflag = setOverlapModeMaybe default_oflag overlap_mode+ oflag = setOverlapModeMaybe default_oflag overlap_mode+ final_oflag = effective_oflag noncanonical_incoherence oflag ; return final_oflag }+ where+ effective_oflag noncanonical_incoherence oflag@OverlapFlag{ overlapMode = overlap_mode }+ = oflag { overlapMode = effective_overlap_mode noncanonical_incoherence overlap_mode } + -- The `-fspecialise-incoherents` flag controls the meaning of the+ -- `Incoherent` overlap mode: as either an Incoherent overlap+ -- flag, or a NonCanonical overlap flag. See Note [Coherence and specialisation: overview]+ -- in GHC.Core.InstEnv for why we care about this distinction.+ effective_overlap_mode noncanonical_incoherence = \case+ Incoherent s | noncanonical_incoherence -> NonCanonical s+ overlap_mode -> overlap_mode++ tcGetInsts :: TcM [ClsInst] -- Gets the local class instances. tcGetInsts = fmap tcg_insts getGblEnv@@ -902,11 +867,13 @@ -- helpful to use the same names ; oflag <- getOverlapFlag overlap_mode- ; let inst = mkLocalInstance dfun oflag tvs' clas tys'- ; when (isOrphan (is_orphan inst)) $- addDiagnostic (TcRnOrphanInstance inst)- ; return inst }+ ; let cls_inst = mkLocalClsInst dfun oflag tvs' clas tys' + ; when (isOrphan (is_orphan cls_inst)) $+ addDiagnostic (TcRnOrphanInstance $ Left cls_inst)++ ; return cls_inst }+ tcExtendLocalInstEnv :: [ClsInst] -> TcM a -> TcM a -- Add new locally-defined instances tcExtendLocalInstEnv dfuns thing_inside@@ -968,9 +935,9 @@ ; return (extendInstEnv home_ie' ispec, ispec : my_insts) } -{--Note [Signature files and type class instances]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++{- Note [Signature files and type class instances]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Instances in signature files do not have an effect when compiling: when you compile a signature against an implementation, you will see the instances WHETHER OR NOT the instance is declared in@@ -1016,10 +983,41 @@ ************************************************************************ * *- Errors and tracing+ Family instances * * ************************************************************************ -}++-- All type variables in a FamInst must be fresh. This function+-- creates the fresh variables and applies the necessary substitution+-- It is defined here to avoid a dependency from FamInstEnv on the monad+-- code.++newFamInst :: FamFlavor -> CoAxiom Unbranched -> TcM FamInst+-- Freshen the type variables of the FamInst branches+newFamInst flavor axiom+ | CoAxBranch { cab_tvs = tvs+ , cab_cvs = cvs+ , cab_lhs = lhs+ , cab_rhs = rhs } <- coAxiomSingleBranch axiom+ = do { -- Freshen the type variables+ (subst, tvs') <- freshenTyVarBndrs tvs+ ; (subst, cvs') <- freshenCoVarBndrsX subst cvs+ ; let lhs' = substTys subst lhs+ rhs' = substTy subst rhs++ ; let fam_inst = mkLocalFamInst flavor axiom tvs' cvs' lhs' rhs'+ ; when (isOrphan (fi_orphan fam_inst)) $+ addDiagnostic (TcRnOrphanInstance $ Right fam_inst)++ ; return fam_inst }+++{- *********************************************************************+* *+ Errors and tracing+* *+********************************************************************* -} traceDFuns :: [ClsInst] -> TcRn () traceDFuns ispecs
GHC/Tc/Utils/Monad.hs view
@@ -2,6 +2,7 @@ {-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeApplications #-} {-# OPTIONS_GHC -fno-warn-orphans #-} @@ -19,7 +20,7 @@ -- * Simple accessors discardResult, getTopEnv, updTopEnv, getGblEnv, updGblEnv,- setGblEnv, getLclEnv, updLclEnv, setLclEnv, restoreLclEnv,+ setGblEnv, getLclEnv, updLclEnv, updLclCtxt, setLclEnv, restoreLclEnv, updTopFlags, getEnvs, setEnvs, updEnvs, restoreEnvs, xoptM, doptM, goptM, woptM,@@ -41,7 +42,7 @@ newSysName, newSysLocalId, newSysLocalIds, -- * Accessing input/output- newTcRef, readTcRef, writeTcRef, updTcRef,+ newTcRef, readTcRef, writeTcRef, updTcRef, updTcRefM, -- * Debugging traceTc, traceRn, traceOptTcRn, dumpOptTcRn,@@ -53,21 +54,22 @@ -- * Typechecker global environment getIsGHCi, getGHCiMonad, getInteractivePrintName,- tcIsHsBootOrSig, tcIsHsig, tcSelfBootInfo, getGlobalRdrEnv,+ tcHscSource, tcIsHsBootOrSig, tcIsHsig, tcSelfBootInfo, getGlobalRdrEnv, getRdrEnvs, getImports,- getFixityEnv, extendFixityEnv, getRecFieldEnv,+ getFixityEnv, extendFixityEnv, getDeclaredDefaultTys, addDependentFiles, -- * Error management- getSrcSpanM, setSrcSpan, setSrcSpanA, addLocM, addLocMA, inGeneratedCode,+ getSrcSpanM, setSrcSpan, setSrcSpanA, addLocM, addLocMA,+ inGeneratedCode, setInGeneratedCode, wrapLocM, wrapLocAM, wrapLocFstM, wrapLocFstMA, wrapLocSndM, wrapLocSndMA, wrapLocM_, wrapLocMA_,wrapLocMA, getErrsVar, setErrsVar, addErr, failWith, failAt, addErrAt, addErrs,- checkErr,+ checkErr, checkErrAt, addMessages, discardWarnings, mkDetailedMessage, @@ -83,7 +85,7 @@ -- * Context management for the type checker getErrCtxt, setErrCtxt, addErrCtxt, addErrCtxtM, addLandmarkErrCtxt,- addLandmarkErrCtxtM, popErrCtxt, getCtLocM, setCtLocM,+ addLandmarkErrCtxtM, popErrCtxt, getCtLocM, setCtLocM, mkCtLocEnv, -- * Diagnostic message generation (type checker) addErrTc,@@ -104,7 +106,7 @@ chooseUniqueOccTc, getConstraintVar, setConstraintVar, emitConstraints, emitStaticConstraints, emitSimple, emitSimples,- emitImplication, emitImplications, emitInsoluble,+ emitImplication, emitImplications, emitDelayedErrors, emitHole, emitHoles, emitNotConcreteError, discardConstraints, captureConstraints, tryCaptureConstraints, pushLevelAndCaptureConstraints,@@ -138,11 +140,14 @@ forkM, setImplicitEnvM, - withException,+ withException, withIfaceErr, -- * Stuff for cost centres. getCCIndexM, getCCIndexTcM, + -- * Zonking+ liftZonkM,+ -- * Types etc. module GHC.Tc.Types, module GHC.Data.IOEnv@@ -153,11 +158,14 @@ import GHC.Builtin.Names +import GHC.Tc.Errors.Types import GHC.Tc.Types -- Re-export all import GHC.Tc.Types.Constraint import GHC.Tc.Types.Evidence import GHC.Tc.Types.Origin+import GHC.Tc.Types.TcRef import GHC.Tc.Utils.TcType+import GHC.Tc.Zonk.TcType import GHC.Hs hiding (LIE) @@ -215,13 +223,13 @@ import Data.IORef import Control.Monad -import GHC.Tc.Errors.Types-import {-# SOURCE #-} GHC.Tc.Utils.Env ( tcInitTidyEnv )- import qualified Data.Map as Map import GHC.Driver.Env.KnotVars import GHC.Linker.Types import GHC.Types.Unique.DFM+import GHC.Iface.Errors.Types+import GHC.Iface.Errors.Ppr+import GHC.Tc.Types.LclEnv {- ************************************************************************@@ -300,7 +308,6 @@ tcg_src = hsc_src, tcg_rdr_env = emptyGlobalRdrEnv, tcg_fix_env = emptyNameEnv,- tcg_field_env = emptyNameEnv, tcg_default = if moduleUnit mod == primUnit || moduleUnit mod == bignumUnit then Just [] -- See Note [Default types]@@ -332,7 +339,7 @@ tcg_sigs = emptyNameSet, tcg_ksigs = emptyNameSet, tcg_ev_binds = emptyBag,- tcg_warns = NoWarnings,+ tcg_warns = emptyWarn, tcg_anns = [], tcg_tcs = [], tcg_insts = [],@@ -377,7 +384,7 @@ ; errs_var <- newIORef emptyMessages ; usage_var <- newIORef zeroUE ; let lcl_env = TcLclEnv {- tcl_errs = errs_var,+ tcl_lcl_ctxt = TcLclCtxt { tcl_loc = loc, -- tcl_loc should be over-ridden very soon! tcl_in_gen_code = False,@@ -387,10 +394,12 @@ tcl_th_bndrs = emptyNameEnv, tcl_arrow_ctxt = NoArrowCtxt, tcl_env = emptyNameEnv,- tcl_usage = usage_var, tcl_bndrs = [],- tcl_lie = lie_var, tcl_tclvl = topTcLevel+ },+ tcl_usage = usage_var,+ tcl_lie = lie_var,+ tcl_errs = errs_var } ; maybe_res <- initTcRnIf 'a' hsc_env gbl_env lcl_env $@@ -445,14 +454,14 @@ ************************************************************************ -} -initTcRnIf :: Char -- ^ Tag for unique supply+initTcRnIf :: Char -- ^ Mask for unique supply -> HscEnv -> gbl -> lcl -> TcRnIf gbl lcl a -> IO a-initTcRnIf uniq_tag hsc_env gbl_env lcl_env thing_inside+initTcRnIf uniq_mask hsc_env gbl_env lcl_env thing_inside = do { let { env = Env { env_top = hsc_env,- env_ut = uniq_tag,+ env_um = uniq_mask, env_gbl = gbl_env, env_lcl = lcl_env} } @@ -494,6 +503,8 @@ updLclEnv upd = updEnv (\ env@(Env { env_lcl = lcl }) -> env { env_lcl = upd lcl }) +updLclCtxt :: (TcLclCtxt -> TcLclCtxt) -> TcRnIf gbl TcLclEnv a -> TcRnIf gbl TcLclEnv a+updLclCtxt upd = updLclEnv (modifyLclCtxt upd) setLclEnv :: lcl' -> TcRnIf gbl lcl' a -> TcRnIf gbl lcl a setLclEnv lcl_env = updEnv (\ env -> env { env_lcl = lcl_env })@@ -662,6 +673,16 @@ Failed err -> liftIO $ throwGhcExceptionIO (ProgramError (renderWithContext ctx err)) Succeeded result -> return result +withIfaceErr :: MonadIO m => SDocContext -> m (MaybeErr MissingInterfaceError a) -> m a+withIfaceErr ctx do_this = do+ r <- do_this+ case r of+ Failed err -> do+ let opts = defaultDiagnosticOpts @IfaceMessage+ msg = missingInterfaceErrorDiagnostic opts err+ liftIO $ throwGhcExceptionIO (ProgramError (renderWithContext ctx msg))+ Succeeded result -> return result+ {- ************************************************************************ * *@@ -672,17 +693,18 @@ newArrowScope :: TcM a -> TcM a newArrowScope- = updLclEnv $ \env -> env { tcl_arrow_ctxt = ArrowCtxt (tcl_rdr env) (tcl_lie env) }+ = updLclEnv $ \env ->+ modifyLclCtxt (\ctx -> ctx { tcl_arrow_ctxt = ArrowCtxt (getLclEnvRdrEnv env) (tcl_lie env) } ) env -- Return to the stored environment (from the enclosing proc) escapeArrowScope :: TcM a -> TcM a escapeArrowScope = updLclEnv $ \ env ->- case tcl_arrow_ctxt env of+ case getLclEnvArrowCtxt env of NoArrowCtxt -> env- ArrowCtxt rdr_env lie -> env { tcl_arrow_ctxt = NoArrowCtxt- , tcl_lie = lie- , tcl_rdr = rdr_env }+ ArrowCtxt rdr_env lie -> env { tcl_lcl_ctxt = (tcl_lcl_ctxt env) { tcl_arrow_ctxt = NoArrowCtxt+ , tcl_rdr = rdr_env }+ , tcl_lie = lie } {- ************************************************************************@@ -695,14 +717,14 @@ newUnique :: TcRnIf gbl lcl Unique newUnique = do { env <- getEnv- ; let tag = env_ut env- ; liftIO $! uniqFromTag tag }+ ; let mask = env_um env+ ; liftIO $! uniqFromMask mask } newUniqueSupply :: TcRnIf gbl lcl UniqSupply newUniqueSupply = do { env <- getEnv- ; let tag = env_ut env- ; liftIO $! mkSplitUniqSupply tag }+ ; let mask = env_um env+ ; liftIO $! mkSplitUniqSupply mask } cloneLocalName :: Name -> TcM Name -- Make a fresh Internal name with the same OccName and SrcSpan@@ -729,9 +751,9 @@ newSysLocalIds :: FastString -> [Scaled TcType] -> TcRnIf gbl lcl [TcId] newSysLocalIds fs tys- = do { us <- newUniqueSupply+ = do { us <- getUniquesM ; let mkId' n (Scaled w t) = mkSysLocal fs n w t- ; return (zipWith mkId' (uniqsFromSupply us) tys) }+ ; return (zipWith mkId' us tys) } instance MonadUnique (IOEnv (Env gbl lcl)) where getUniqueM = newUnique@@ -740,27 +762,6 @@ {- ************************************************************************ * *- Accessing input/output-* *-************************************************************************--}--newTcRef :: a -> TcRnIf gbl lcl (TcRef a)-newTcRef = newMutVar--readTcRef :: TcRef a -> TcRnIf gbl lcl a-readTcRef = readMutVar--writeTcRef :: TcRef a -> a -> TcRnIf gbl lcl ()-writeTcRef = writeMutVar--updTcRef :: TcRef a -> (a -> a) -> TcRnIf gbl lcl ()--- Returns ()-updTcRef ref fn = liftIO $ modifyIORef' ref fn--{--************************************************************************-* * Debugging * * ************************************************************************@@ -917,8 +918,11 @@ getInteractivePrintName = do { hsc <- getTopEnv; return (ic_int_print $ hsc_IC hsc) } tcIsHsBootOrSig :: TcRn Bool-tcIsHsBootOrSig = do { env <- getGblEnv; return (isHsBootOrSig (tcg_src env)) }+tcIsHsBootOrSig = isHsBootOrSig <$> tcHscSource +tcHscSource :: TcRn HscSource+tcHscSource = do { env <- getGblEnv; return (tcg_src env)}+ tcIsHsig :: TcRn Bool tcIsHsig = do { env <- getGblEnv; return (isHsigFile (tcg_src env)) } @@ -929,7 +933,7 @@ getGlobalRdrEnv = do { env <- getGblEnv; return (tcg_rdr_env env) } getRdrEnvs :: TcRn (GlobalRdrEnv, LocalRdrEnv)-getRdrEnvs = do { (gbl,lcl) <- getEnvs; return (tcg_rdr_env gbl, tcl_rdr lcl) }+getRdrEnvs = do { (gbl,lcl) <- getEnvs; return (tcg_rdr_env gbl, getLclEnvRdrEnv lcl) } getImports :: TcRn ImportAvails getImports = do { env <- getGblEnv; return (tcg_imports env) }@@ -942,9 +946,6 @@ = updGblEnv (\env@(TcGblEnv { tcg_fix_env = old_fix_env }) -> env {tcg_fix_env = extendNameEnvList old_fix_env new_bit}) -getRecFieldEnv :: TcRn RecFieldEnv-getRecFieldEnv = do { env <- getGblEnv; return (tcg_field_env env) }- getDeclaredDefaultTys :: TcRn (Maybe [Type]) getDeclaredDefaultTys = do { env <- getGblEnv; return (tcg_default env) } @@ -964,26 +965,33 @@ getSrcSpanM :: TcRn SrcSpan -- Avoid clash with Name.getSrcLoc-getSrcSpanM = do { env <- getLclEnv; return (RealSrcSpan (tcl_loc env) Strict.Nothing) }+getSrcSpanM = do { env <- getLclEnv; return (RealSrcSpan (getLclEnvLoc env) Strict.Nothing) } -- See Note [Error contexts in generated code] inGeneratedCode :: TcRn Bool-inGeneratedCode = tcl_in_gen_code <$> getLclEnv+inGeneratedCode = lclEnvInGeneratedCode <$> getLclEnv setSrcSpan :: SrcSpan -> TcRn a -> TcRn a -- See Note [Error contexts in generated code] -- for the tcl_in_gen_code manipulation setSrcSpan (RealSrcSpan loc _) thing_inside- = updLclEnv (\env -> env { tcl_loc = loc, tcl_in_gen_code = False })+ = updLclCtxt (\env -> env { tcl_loc = loc, tcl_in_gen_code = False }) thing_inside setSrcSpan loc@(UnhelpfulSpan _) thing_inside | isGeneratedSrcSpan loc- = updLclEnv (\env -> env { tcl_in_gen_code = True }) thing_inside+ = setInGeneratedCode thing_inside | otherwise = thing_inside +-- | Mark the inner computation as being done inside generated code.+--+-- See Note [Error contexts in generated code]+setInGeneratedCode :: TcRn a -> TcRn a+setInGeneratedCode thing_inside =+ updLclCtxt (\env -> env { tcl_in_gen_code = True }) thing_inside+ setSrcSpanA :: SrcSpanAnn' ann -> TcRn a -> TcRn a setSrcSpanA l = setSrcSpan (locA l) @@ -1066,7 +1074,7 @@ -- tidying is not an issue, but it's all lazy so the extra -- work doesn't matter addErrAt loc msg = do { ctxt <- getErrCtxt- ; tidy_env <- tcInitTidyEnv+ ; tidy_env <- liftZonkM $ tcInitTidyEnv ; err_info <- mkErrInfo tidy_env ctxt ; let detailed_msg = mkDetailedMessage (ErrInfo err_info Outputable.empty) msg ; add_long_err_at loc detailed_msg }@@ -1084,6 +1092,9 @@ -- Add the error if the bool is False checkErr ok msg = unless ok (addErr msg) +checkErrAt :: SrcSpan -> Bool -> TcRnMessage -> TcRn ()+checkErrAt loc ok msg = unless ok (addErrAt loc msg)+ addMessages :: Messages TcRnMessage -> TcRn () addMessages msgs1 = do { errs_var <- getErrsVar@@ -1201,23 +1212,25 @@ Note [Error contexts in generated code] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-* setSrcSpan sets tc_in_gen_code to True if the SrcSpan is GeneratedSrcSpan,+* setSrcSpan sets tcl_in_gen_code to True if the SrcSpan is GeneratedSrcSpan, and back to False when we get a useful SrcSpan -* When tc_in_gen_code is True, addErrCtxt becomes a no-op.+* When tcl_in_gen_code is True, addErrCtxt becomes a no-op. So typically it's better to do setSrcSpan /before/ addErrCtxt. See Note [Rebindable syntax and HsExpansion] in GHC.Hs.Expr for-more discussion of this fancy footwork.+more discussion of this fancy footwork, as well as+Note [Generated code and pattern-match checking] in GHC.Types.Basic for the+relation with pattern-match checks. -} getErrCtxt :: TcM [ErrCtxt]-getErrCtxt = do { env <- getLclEnv; return (tcl_ctxt env) }+getErrCtxt = do { env <- getLclEnv; return (getLclEnvErrCtxt env) } setErrCtxt :: [ErrCtxt] -> TcM a -> TcM a {-# INLINE setErrCtxt #-} -- Note [Inlining addErrCtxt]-setErrCtxt ctxt = updLclEnv (\ env -> env { tcl_ctxt = ctxt })+setErrCtxt ctxt = updLclEnv (setLclEnvErrCtxt ctxt) -- | Add a fixed message to the error context. This message should not -- do any tidying.@@ -1226,7 +1239,7 @@ addErrCtxt msg = addErrCtxtM (\env -> return (env, msg)) -- | Add a message to the error context. This message may do tidying.-addErrCtxtM :: (TidyEnv -> TcM (TidyEnv, SDoc)) -> TcM a -> TcM a+addErrCtxtM :: (TidyEnv -> ZonkM (TidyEnv, SDoc)) -> TcM a -> TcM a {-# INLINE addErrCtxtM #-} -- Note [Inlining addErrCtxt] addErrCtxtM ctxt = pushCtxt (False, ctxt) @@ -1240,7 +1253,7 @@ -- | Variant of 'addLandmarkErrCtxt' that allows for monadic operations -- and tidying.-addLandmarkErrCtxtM :: (TidyEnv -> TcM (TidyEnv, SDoc)) -> TcM a -> TcM a+addLandmarkErrCtxtM :: (TidyEnv -> ZonkM (TidyEnv, SDoc)) -> TcM a -> TcM a {-# INLINE addLandmarkErrCtxtM #-} -- Note [Inlining addErrCtxt] addLandmarkErrCtxtM ctxt = pushCtxt (True, ctxt) @@ -1251,13 +1264,12 @@ updCtxt :: ErrCtxt -> TcLclEnv -> TcLclEnv -- Do not update the context if we are in generated code -- See Note [Rebindable syntax and HsExpansion] in GHC.Hs.Expr-updCtxt ctxt env@(TcLclEnv { tcl_ctxt = ctxts, tcl_in_gen_code = in_gen })- | in_gen = env- | otherwise = env { tcl_ctxt = ctxt : ctxts }+updCtxt ctxt env+ | lclEnvInGeneratedCode env = env+ | otherwise = addLclEnvErrCtxt ctxt env popErrCtxt :: TcM a -> TcM a-popErrCtxt = updLclEnv (\ env@(TcLclEnv { tcl_ctxt = ctxt }) ->- env { tcl_ctxt = pop ctxt })+popErrCtxt = updLclEnv (\env -> setLclEnvErrCtxt (pop $ getLclEnvErrCtxt env) env) where pop [] = [] pop (_:msgs) = msgs@@ -1266,17 +1278,27 @@ getCtLocM origin t_or_k = do { env <- getLclEnv ; return (CtLoc { ctl_origin = origin- , ctl_env = env+ , ctl_env = mkCtLocEnv env , ctl_t_or_k = t_or_k , ctl_depth = initialSubGoalDepth }) } +mkCtLocEnv :: TcLclEnv -> CtLocEnv+mkCtLocEnv lcl_env =+ CtLocEnv { ctl_bndrs = getLclEnvBinderStack lcl_env+ , ctl_ctxt = getLclEnvErrCtxt lcl_env+ , ctl_loc = getLclEnvLoc lcl_env+ , ctl_tclvl = getLclEnvTcLevel lcl_env+ , ctl_in_gen_code = lclEnvInGeneratedCode lcl_env+ , ctl_rdr = getLclEnvRdrEnv lcl_env+ }+ setCtLocM :: CtLoc -> TcM a -> TcM a -- Set the SrcSpan and error context from the CtLoc setCtLocM (CtLoc { ctl_env = lcl }) thing_inside- = updLclEnv (\env -> env { tcl_loc = tcl_loc lcl- , tcl_bndrs = tcl_bndrs lcl- , tcl_ctxt = tcl_ctxt lcl })- thing_inside+ = updLclEnv (\env -> setLclEnvLoc (ctl_loc lcl)+ $ setLclEnvErrCtxt (ctl_ctxt lcl)+ $ setLclEnvBinderStack (ctl_bndrs lcl)+ $ env) thing_inside {- *********************************************************************@@ -1315,7 +1337,7 @@ capture_messages :: TcM r -> TcM (r, Messages TcRnMessage) -- capture_messages simply captures and returns the--- errors arnd warnings generated by thing_inside+-- errors and warnings generated by thing_inside -- Precondition: thing_inside must not throw an exception! -- Reason for precondition: an exception would blow past the place -- where we read the msg_var, and we'd lose the constraints altogether@@ -1534,8 +1556,19 @@ tidy up the message; we then use it to tidy the context messages -} +{-++Note [Reporting warning diagnostics]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We use functions below to report warnings. For the most part,+we do /not/ need to check any warning flags before doing so.+See https://gitlab.haskell.org/ghc/ghc/-/wikis/Errors-as-(structured)-values+for the design.++-}+ addErrTc :: TcRnMessage -> TcM ()-addErrTc err_msg = do { env0 <- tcInitTidyEnv+addErrTc err_msg = do { env0 <- liftZonkM tcInitTidyEnv ; addErrTcM (env0, err_msg) } addErrTcM :: (TidyEnv, TcRnMessage) -> TcM ()@@ -1597,8 +1630,8 @@ -- | Display a diagnostic in the current context. addDiagnosticTc :: TcRnMessage -> TcM () addDiagnosticTc msg- = do { env0 <- tcInitTidyEnv ;- addDiagnosticTcM (env0, msg) }+ = do { env0 <- liftZonkM tcInitTidyEnv+ ; addDiagnosticTcM (env0, msg) } -- | Display a diagnostic in a given context. addDiagnosticTcM :: (TidyEnv, TcRnMessage) -> TcM ()@@ -1616,7 +1649,7 @@ loc <- getSrcSpanM name_ppr_ctx <- getNamePprCtx !diag_opts <- initDiagOpts <$> getDynFlags- env0 <- tcInitTidyEnv+ env0 <- liftZonkM tcInitTidyEnv ctxt <- getErrCtxt err_info <- mkErrInfo env0 ctxt reportDiagnostic (mkMsgEnvelope diag_opts loc name_ppr_ctx (mkMsg (ErrInfo err_info empty)))@@ -1674,7 +1707,7 @@ go _ _ _ [] = return empty go dbg n env ((is_landmark, ctxt) : ctxts) | is_landmark || n < mAX_CONTEXTS -- Too verbose || dbg- = do { (env', msg) <- ctxt env+ = do { (env', msg) <- liftZonkM $ ctxt env ; let n' = if is_landmark then n else n+1 ; rest <- go dbg n' env' ctxts ; return (msg $$ rest) }@@ -1816,12 +1849,6 @@ do { lie_var <- getConstraintVar ; updTcRef lie_var (`addImplics` ct) } -emitInsoluble :: Ct -> TcM ()-emitInsoluble ct- = do { traceTc "emitInsoluble" (ppr ct)- ; lie_var <- getConstraintVar- ; updTcRef lie_var (`addInsols` unitBag ct) }- emitDelayedErrors :: Bag DelayedError -> TcM () emitDelayedErrors errs = do { traceTc "emitDelayedErrors" (ppr errs)@@ -1856,29 +1883,29 @@ = do { tclvl <- getTcLevel ; let tclvl' = pushTcLevel tclvl ; traceTc "pushLevelAndCaptureConstraints {" (ppr tclvl')- ; (res, lie) <- updLclEnv (\env -> env { tcl_tclvl = tclvl' }) $+ ; (res, lie) <- updLclEnv (setLclEnvTcLevel tclvl') $ captureConstraints thing_inside ; traceTc "pushLevelAndCaptureConstraints }" (ppr tclvl') ; return (tclvl', lie, res) } pushTcLevelM_ :: TcM a -> TcM a-pushTcLevelM_ x = updLclEnv (\ env -> env { tcl_tclvl = pushTcLevel (tcl_tclvl env) }) x+pushTcLevelM_ = updLclEnv (modifyLclEnvTcLevel pushTcLevel) pushTcLevelM :: TcM a -> TcM (TcLevel, a) -- See Note [TcLevel assignment] in GHC.Tc.Utils.TcType pushTcLevelM thing_inside = do { tclvl <- getTcLevel ; let tclvl' = pushTcLevel tclvl- ; res <- updLclEnv (\env -> env { tcl_tclvl = tclvl' }) thing_inside+ ; res <- updLclEnv (setLclEnvTcLevel tclvl') thing_inside ; return (tclvl', res) } getTcLevel :: TcM TcLevel getTcLevel = do { env <- getLclEnv- ; return (tcl_tclvl env) }+ ; return $! getLclEnvTcLevel env } setTcLevel :: TcLevel -> TcM a -> TcM a setTcLevel tclvl thing_inside- = updLclEnv (\env -> env { tcl_tclvl = tclvl }) thing_inside+ = updLclEnv (setLclEnvTcLevel tclvl) thing_inside isTouchableTcM :: TcTyVar -> TcM Bool isTouchableTcM tv@@ -1886,15 +1913,13 @@ ; return (isTouchableMetaTyVar lvl tv) } getLclTypeEnv :: TcM TcTypeEnv-getLclTypeEnv = do { env <- getLclEnv; return (tcl_env env) }+getLclTypeEnv = do { env <- getLclEnv; return (getLclEnvTypeEnv env) } setLclTypeEnv :: TcLclEnv -> TcM a -> TcM a -- Set the local type envt, but do *not* disturb other fields, -- notably the lie_var setLclTypeEnv lcl_env thing_inside- = updLclEnv upd thing_inside- where- upd env = env { tcl_env = tcl_env lcl_env }+ = updLclEnv (setLclEnvTypeEnv (getLclEnvTypeEnv lcl_env)) thing_inside traceTcConstraints :: String -> TcM () traceTcConstraints msg@@ -2042,17 +2067,17 @@ ; updTcRef (tcg_keep env) (`extendNameSet` name) } getStage :: TcM ThStage-getStage = do { env <- getLclEnv; return (tcl_th_ctxt env) }+getStage = do { env <- getLclEnv; return (getLclEnvThStage env) } getStageAndBindLevel :: Name -> TcRn (Maybe (TopLevelFlag, ThLevel, ThStage)) getStageAndBindLevel name = do { env <- getLclEnv;- ; case lookupNameEnv (tcl_th_bndrs env) name of+ ; case lookupNameEnv (getLclEnvThBndrs env) name of Nothing -> return Nothing- Just (top_lvl, bind_lvl) -> return (Just (top_lvl, bind_lvl, tcl_th_ctxt env)) }+ Just (top_lvl, bind_lvl) -> return (Just (top_lvl, bind_lvl, getLclEnvThStage env)) } setStage :: ThStage -> TcM a -> TcRn a-setStage s = updLclEnv (\ env -> env { tcl_th_ctxt = s })+setStage s = updLclEnv (setLclEnvThStage s) -- | Adds the given modFinalizers to the global environment and set them to use -- the current local environment.@@ -2104,11 +2129,11 @@ -} getLocalRdrEnv :: RnM LocalRdrEnv-getLocalRdrEnv = do { env <- getLclEnv; return (tcl_rdr env) }+getLocalRdrEnv = do { env <- getLclEnv; return (getLclEnvRdrEnv env) } setLocalRdrEnv :: LocalRdrEnv -> RnM a -> RnM a setLocalRdrEnv rdr_env thing_inside- = updLclEnv (\env -> env {tcl_rdr = rdr_env}) thing_inside+ = updLclEnv (setLclEnvRdrEnv rdr_env) thing_inside {- ************************************************************************@@ -2281,3 +2306,22 @@ -- | See 'getCCIndexM'. getCCIndexTcM :: FastString -> TcM CostCentreIndex getCCIndexTcM = getCCIndexM tcg_cc_st++--------------------------------------------------------------------------------++-- | Lift a computation from the dedicated zonking monad 'ZonkM' to the+-- full-fledged 'TcM' monad.+liftZonkM :: ZonkM a -> TcM a+liftZonkM (ZonkM f) =+ do { logger <- getLogger+ ; name_ppr_ctx <- getNamePprCtx+ ; lvl <- getTcLevel+ ; src_span <- getSrcSpanM+ ; bndrs <- getLclEnvBinderStack <$> getLclEnv+ ; let zge = ZonkGblEnv { zge_logger = logger+ , zge_name_ppr_ctx = name_ppr_ctx+ , zge_src_span = src_span+ , zge_tc_level = lvl+ , zge_binder_stack = bndrs }+ ; liftIO $ f zge }+{-# INLINE liftZonkM #-}
GHC/Tc/Utils/TcMType.hs view
@@ -24,2817 +24,2346 @@ newFlexiTyVarTys, -- Int -> Kind -> TcM [TcType] newOpenFlexiTyVar, newOpenFlexiTyVarTy, newOpenTypeKind, newOpenBoxedTypeKind,- newMetaKindVar, newMetaKindVars, newMetaTyVarTyAtLevel,- newAnonMetaTyVar, newConcreteTyVar, cloneMetaTyVar,- newCycleBreakerTyVar,-- newMultiplicityVar,- readMetaTyVar, writeMetaTyVar, writeMetaTyVarRef,- newTauTvDetailsAtLevel, newMetaDetails, newMetaTyVarName,- isFilledMetaTyVar_maybe, isFilledMetaTyVar, isUnfilledMetaTyVar,-- --------------------------------- -- Creating new evidence variables- newEvVar, newEvVars, newDict,- newWantedWithLoc, newWanted, newWanteds, cloneWanted, cloneWC, cloneWantedCtEv,- emitWanted, emitWantedEq, emitWantedEvVar, emitWantedEvVars,- emitWantedEqs,- newTcEvBinds, newNoTcEvBinds, addTcEvBind,- emitNewExprHole,-- newCoercionHole, fillCoercionHole, isFilledCoercionHole,- unpackCoercionHole, unpackCoercionHole_maybe,- checkCoercionHole,-- ConcreteHole, newConcreteHole,-- newImplication,-- --------------------------------- -- Instantiation- newMetaTyVars, newMetaTyVarX, newMetaTyVarsX,- newMetaTyVarTyVarX,- newTyVarTyVar, cloneTyVarTyVar,- newPatSigTyVar, newSkolemTyVar, newWildCardX,-- --------------------------------- -- Expected types- ExpType(..), ExpSigmaType, ExpRhoType,- mkCheckExpType, newInferExpType, newInferExpTypeFRR,- tcInfer, tcInferFRR,- readExpType, readExpType_maybe, readScaledExpType,- expTypeToType, scaledExpTypeToType,- checkingExpType_maybe, checkingExpType,- inferResultToType, ensureMonoType, promoteTcType,-- --------------------------------- -- Zonking and tidying- zonkTidyTcType, zonkTidyTcTypes, zonkTidyOrigin, zonkTidyOrigins,- zonkTidyFRRInfos,- tidyEvVar, tidyCt, tidyHole, tidyDelayedError,- zonkTcTyVar, zonkTcTyVars,- zonkTcTyVarToTcTyVar, zonkTcTyVarsToTcTyVars,- zonkInvisTVBinder,- zonkTyCoVarsAndFV, zonkTcTypeAndFV, zonkDTyCoVarSetAndFV,- zonkTyCoVarsAndFVList,-- zonkTcType, zonkTcTypes, zonkCo,- zonkTyCoVarKind,- zonkEvVar, zonkWC, zonkImplication, zonkSimples,- zonkId, zonkCoVar,- zonkCt, zonkSkolemInfo, zonkSkolemInfoAnon,-- ---------------------------------- -- Promotion, defaulting, skolemisation- defaultTyVar, promoteMetaTyVarTo, promoteTyVarSet,- quantifyTyVars, isQuantifiableTv,- zonkAndSkolemise, skolemiseQuantifiedTyVar,- doNotQuantifyTyVars,-- candidateQTyVarsOfType, candidateQTyVarsOfKind,- candidateQTyVarsOfTypes, candidateQTyVarsOfKinds,- candidateQTyVarsWithBinders,- CandidatesQTvs(..), delCandidates,- candidateKindVars, partitionCandidates,-- ------------------------------- -- Representation polymorphism- checkTypeHasFixedRuntimeRep,-- ------------------------------- -- Other- anyUnfilledCoercionHoles- ) where--import GHC.Prelude--import GHC.Driver.Session-import qualified GHC.LanguageExtensions as LangExt--import GHC.Tc.Types.Origin-import GHC.Tc.Types.Constraint-import GHC.Tc.Types.Evidence-import GHC.Tc.Utils.Monad -- TcType, amongst others-import GHC.Tc.Utils.TcType-import GHC.Tc.Errors.Types-import GHC.Tc.Errors.Ppr--import GHC.Core.TyCo.Rep-import GHC.Core.TyCo.Ppr-import GHC.Core.Type-import GHC.Core.TyCon-import GHC.Core.Coercion-import GHC.Core.Class-import GHC.Core.Predicate-import GHC.Core.InstEnv (ClsInst(is_tys))--import GHC.Types.Var-import GHC.Types.Id as Id-import GHC.Types.Name-import GHC.Types.Var.Set--import GHC.Builtin.Types-import GHC.Types.Error-import GHC.Types.Var.Env-import GHC.Types.Unique.Set-import GHC.Types.Basic ( TypeOrKind(..)- , NonStandardDefaultingStrategy(..)- , DefaultingStrategy(..), defaultNonStandardTyVars )--import GHC.Data.FastString-import GHC.Data.Bag-import GHC.Data.Pair--import GHC.Utils.Misc-import GHC.Utils.Outputable-import GHC.Utils.Panic-import GHC.Utils.Panic.Plain-import GHC.Utils.Constants (debugIsOn)--import Control.Monad-import GHC.Data.Maybe-import qualified Data.Semigroup as Semi-import GHC.Types.Name.Reader--{--************************************************************************-* *- Kind variables-* *-************************************************************************--}--newMetaKindVar :: TcM TcKind-newMetaKindVar- = do { details <- newMetaDetails TauTv- ; name <- newMetaTyVarName (fsLit "k")- -- All MetaKindVars are called "k"- -- They may be jiggled by tidying- ; let kv = mkTcTyVar name liftedTypeKind details- ; traceTc "newMetaKindVar" (ppr kv)- ; return (mkTyVarTy kv) }--newMetaKindVars :: Int -> TcM [TcKind]-newMetaKindVars n = replicateM n newMetaKindVar--{--************************************************************************-* *- Evidence variables; range over constraints we can abstract over-* *-************************************************************************--}--newEvVars :: TcThetaType -> TcM [EvVar]-newEvVars theta = mapM newEvVar theta------------------newEvVar :: TcPredType -> TcRnIf gbl lcl EvVar--- Creates new *rigid* variables for predicates-newEvVar ty = do { name <- newSysName (predTypeOccName ty)- ; return (mkLocalIdOrCoVar name ManyTy ty) }---- | Create a new Wanted constraint with the given 'CtLoc'.-newWantedWithLoc :: CtLoc -> PredType -> TcM CtEvidence-newWantedWithLoc loc pty- = do dst <- case classifyPredType pty of- EqPred {} -> HoleDest <$> newCoercionHole pty- _ -> EvVarDest <$> newEvVar pty- return $ CtWanted { ctev_dest = dst- , ctev_pred = pty- , ctev_loc = loc- , ctev_rewriters = emptyRewriterSet }---- | Create a new Wanted constraint with the given 'CtOrigin', and--- location information taken from the 'TcM' environment.-newWanted :: CtOrigin -> Maybe TypeOrKind -> PredType -> TcM CtEvidence--- Deals with both equality and non-equality predicates-newWanted orig t_or_k pty- = do loc <- getCtLocM orig t_or_k- newWantedWithLoc loc pty---- | Create new Wanted constraints with the given 'CtOrigin',--- and location information taken from the 'TcM' environment.-newWanteds :: CtOrigin -> ThetaType -> TcM [CtEvidence]-newWanteds orig = mapM (newWanted orig Nothing)--------------------------------------------------- Cloning constraints-------------------------------------------------cloneWantedCtEv :: CtEvidence -> TcM CtEvidence-cloneWantedCtEv ctev@(CtWanted { ctev_pred = pty, ctev_dest = HoleDest _ })- | isEqPrimPred pty- = do { co_hole <- newCoercionHole pty- ; return (ctev { ctev_dest = HoleDest co_hole }) }- | otherwise- = pprPanic "cloneWantedCtEv" (ppr pty)-cloneWantedCtEv ctev = return ctev--cloneWanted :: Ct -> TcM Ct-cloneWanted ct = mkNonCanonical <$> cloneWantedCtEv (ctEvidence ct)--cloneWC :: WantedConstraints -> TcM WantedConstraints--- Clone all the evidence bindings in--- a) the ic_bind field of any implications--- b) the CoercionHoles of any wanted constraints--- so that solving the WantedConstraints will not have any visible side--- effect, /except/ from causing unifications-cloneWC wc@(WC { wc_simple = simples, wc_impl = implics })- = do { simples' <- mapBagM cloneWanted simples- ; implics' <- mapBagM cloneImplication implics- ; return (wc { wc_simple = simples', wc_impl = implics' }) }--cloneImplication :: Implication -> TcM Implication-cloneImplication implic@(Implic { ic_binds = binds, ic_wanted = inner_wanted })- = do { binds' <- cloneEvBindsVar binds- ; inner_wanted' <- cloneWC inner_wanted- ; return (implic { ic_binds = binds', ic_wanted = inner_wanted' }) }--------------------------------------------------- Emitting constraints--------------------------------------------------- | Emits a new Wanted. Deals with both equalities and non-equalities.-emitWanted :: CtOrigin -> TcPredType -> TcM EvTerm-emitWanted origin pty- = do { ev <- newWanted origin Nothing pty- ; emitSimple $ mkNonCanonical ev- ; return $ ctEvTerm ev }--emitWantedEqs :: CtOrigin -> [(TcType,TcType)] -> TcM ()--- Emit some new wanted nominal equalities-emitWantedEqs origin pairs- | null pairs- = return ()- | otherwise- = mapM_ (uncurry (emitWantedEq origin TypeLevel Nominal)) pairs---- | Emits a new equality constraint-emitWantedEq :: CtOrigin -> TypeOrKind -> Role -> TcType -> TcType -> TcM Coercion-emitWantedEq origin t_or_k role ty1 ty2- = do { hole <- newCoercionHole pty- ; loc <- getCtLocM origin (Just t_or_k)- ; emitSimple $ mkNonCanonical $- CtWanted { ctev_pred = pty- , ctev_dest = HoleDest hole- , ctev_loc = loc- , ctev_rewriters = rewriterSetFromTypes [ty1, ty2] }- ; return (HoleCo hole) }- where- pty = mkPrimEqPredRole role ty1 ty2---- | Creates a new EvVar and immediately emits it as a Wanted.--- No equality predicates here.-emitWantedEvVar :: CtOrigin -> TcPredType -> TcM EvVar-emitWantedEvVar origin ty- = do { new_cv <- newEvVar ty- ; loc <- getCtLocM origin Nothing- ; let ctev = CtWanted { ctev_dest = EvVarDest new_cv- , ctev_pred = ty- , ctev_loc = loc- , ctev_rewriters = emptyRewriterSet }- ; emitSimple $ mkNonCanonical ctev- ; return new_cv }--emitWantedEvVars :: CtOrigin -> [TcPredType] -> TcM [EvVar]-emitWantedEvVars orig = mapM (emitWantedEvVar orig)---- | Emit a new wanted expression hole-emitNewExprHole :: RdrName -- of the hole- -> Type -> TcM HoleExprRef-emitNewExprHole occ ty- = do { u <- newUnique- ; ref <- newTcRef (pprPanic "unfilled unbound-variable evidence" (ppr u))- ; let her = HER ref ty u-- ; loc <- getCtLocM (ExprHoleOrigin (Just occ)) (Just TypeLevel)-- ; let hole = Hole { hole_sort = ExprHole her- , hole_occ = occ- , hole_ty = ty- , hole_loc = loc }- ; emitHole hole- ; return her }--newDict :: Class -> [TcType] -> TcM DictId-newDict cls tys- = do { name <- newSysName (mkDictOcc (getOccName cls))- ; return (mkLocalId name ManyTy (mkClassPred cls tys)) }--predTypeOccName :: PredType -> OccName-predTypeOccName ty = case classifyPredType ty of- ClassPred cls _ -> mkDictOcc (getOccName cls)- EqPred {} -> mkVarOccFS (fsLit "co")- IrredPred {} -> mkVarOccFS (fsLit "irred")- ForAllPred {} -> mkVarOccFS (fsLit "df")---- | Create a new 'Implication' with as many sensible defaults for its fields--- as possible. Note that the 'ic_tclvl', 'ic_binds', and 'ic_info' fields do--- /not/ have sensible defaults, so they are initialized with lazy thunks that--- will 'panic' if forced, so one should take care to initialize these fields--- after creation.------ This is monadic to look up the 'TcLclEnv', which is used to initialize--- 'ic_env', and to set the -Winaccessible-code flag. See--- Note [Avoid -Winaccessible-code when deriving] in "GHC.Tc.TyCl.Instance".-newImplication :: TcM Implication-newImplication- = do env <- getLclEnv- warn_inaccessible <- woptM Opt_WarnInaccessibleCode- return (implicationPrototype { ic_env = env- , ic_warn_inaccessible = warn_inaccessible })--{--************************************************************************-* *- Coercion holes-* *-************************************************************************--}--newCoercionHole :: TcPredType -> TcM CoercionHole-newCoercionHole pred_ty- = do { co_var <- newEvVar pred_ty- ; traceTc "New coercion hole:" (ppr co_var <+> dcolon <+> ppr pred_ty)- ; ref <- newMutVar Nothing- ; return $ CoercionHole { ch_co_var = co_var, ch_ref = ref } }---- | Put a value in a coercion hole-fillCoercionHole :: CoercionHole -> Coercion -> TcM ()-fillCoercionHole (CoercionHole { ch_ref = ref, ch_co_var = cv }) co = do- when debugIsOn $ do- cts <- readTcRef ref- whenIsJust cts $ \old_co ->- pprPanic "Filling a filled coercion hole" (ppr cv $$ ppr co $$ ppr old_co)- traceTc "Filling coercion hole" (ppr cv <+> text ":=" <+> ppr co)- writeTcRef ref (Just co)---- | Is a coercion hole filled in?-isFilledCoercionHole :: CoercionHole -> TcM Bool-isFilledCoercionHole (CoercionHole { ch_ref = ref }) = isJust <$> readTcRef ref---- | Retrieve the contents of a coercion hole. Panics if the hole--- is unfilled-unpackCoercionHole :: CoercionHole -> TcM Coercion-unpackCoercionHole hole- = do { contents <- unpackCoercionHole_maybe hole- ; case contents of- Just co -> return co- Nothing -> pprPanic "Unfilled coercion hole" (ppr hole) }---- | Retrieve the contents of a coercion hole, if it is filled-unpackCoercionHole_maybe :: CoercionHole -> TcM (Maybe Coercion)-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.)--- 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-checkCoercionHole cv co- | debugIsOn- = do { cv_ty <- zonkTcType (varType cv)- -- co is already zonked, but cv might not be- ; return $- assertPpr (ok cv_ty)- (text "Bad coercion hole" <+>- ppr cv <> colon <+> vcat [ ppr t1, ppr t2, ppr role- , ppr cv_ty ])- co }- | otherwise- = return co-- where- (Pair t1 t2, role) = coercionKindRole co- ok cv_ty | EqPred cv_rel cv_t1 cv_t2 <- classifyPredType cv_ty- = t1 `eqType` cv_t1- && t2 `eqType` cv_t2- && role == eqRelRole cv_rel- | otherwise- = False---- | A coercion hole used to store evidence for `Concrete#` constraints.------ See Note [The Concrete mechanism].-type ConcreteHole = CoercionHole---- | Create a new (initially unfilled) coercion hole,--- to hold evidence for a @'Concrete#' (ty :: ki)@ constraint.-newConcreteHole :: Kind -- ^ Kind of the thing we want to ensure is concrete (e.g. 'runtimeRepTy')- -> Type -- ^ Thing we want to ensure is concrete (e.g. some 'RuntimeRep')- -> TcM (ConcreteHole, TcType)- -- ^ where to put the evidence, and a metavariable to store- -- the concrete type-newConcreteHole ki ty- = do { concrete_ty <- newFlexiTyVarTy ki- ; let co_ty = mkHeteroPrimEqPred ki ki ty concrete_ty- ; hole <- newCoercionHole co_ty- ; return (hole, concrete_ty) }--{- **********************************************************************-*- ExpType functions-*-********************************************************************** -}--{- Note [ExpType]-~~~~~~~~~~~~~~~~~-An ExpType is used as the "expected type" when type-checking an expression.-An ExpType can hold a "hole" that can be filled in by the type-checker.-This allows us to have one tcExpr that works in both checking mode and-synthesis mode (that is, bidirectional type-checking). Previously, this-was achieved by using ordinary unification variables, but we don't need-or want that generality. (For example, #11397 was caused by doing the-wrong thing with unification variables.) Instead, we observe that these-holes should--1. never be nested-2. never appear as the type of a variable-3. be used linearly (never be duplicated)--By defining ExpType, separately from Type, we can achieve goals 1 and 2-statically.--See also [wiki:typechecking]--Note [TcLevel of ExpType]-~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-- data G a where- MkG :: G Bool-- foo MkG = True--This is a classic untouchable-variable / ambiguous GADT return type-scenario. But, with ExpTypes, we'll be inferring the type of the RHS.-We thus must track a TcLevel in an Inferring ExpType. If we try to-fill the ExpType and find that the TcLevels don't work out, we fill-the ExpType with a tau-tv at the low TcLevel, hopefully to be worked-out later by some means -- see fillInferResult, and Note [fillInferResult]--This behaviour triggered in test gadt/gadt-escape1.--Note [FixedRuntimeRep context in ExpType]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Sometimes, we want to be sure that we fill an ExpType with a type-that has a syntactically fixed RuntimeRep (in the sense of-Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete).--Example:-- pattern S a = (a :: (T :: TYPE R))--We have to infer a type for `a` which has a syntactically fixed RuntimeRep.-When it comes time to filling in the inferred type, we do the appropriate-representation-polymorphism check, much like we do a level check-as explained in Note [TcLevel of ExpType].--See test case T21325.--}---- actual data definition is in GHC.Tc.Utils.TcType--newInferExpType :: TcM ExpType-newInferExpType = new_inferExpType Nothing--newInferExpTypeFRR :: FixedRuntimeRepContext -> TcM ExpTypeFRR-newInferExpTypeFRR frr_orig- = do { th_stage <- getStage- ; if- -- See [Wrinkle: Typed Template Haskell]- -- in Note [hasFixedRuntimeRep] in GHC.Tc.Utils.Concrete.- | Brack _ (TcPending {}) <- th_stage- -> new_inferExpType Nothing-- | otherwise- -> new_inferExpType (Just frr_orig) }--new_inferExpType :: Maybe FixedRuntimeRepContext -> TcM ExpType-new_inferExpType mb_frr_orig- = do { u <- newUnique- ; tclvl <- getTcLevel- ; traceTc "newInferExpType" (ppr u <+> ppr tclvl)- ; ref <- newMutVar Nothing- ; return (Infer (IR { ir_uniq = u, ir_lvl = tclvl- , ir_ref = ref- , ir_frr = mb_frr_orig })) }---- | Extract a type out of an ExpType, if one exists. But one should always--- exist. Unless you're quite sure you know what you're doing.-readExpType_maybe :: ExpType -> TcM (Maybe TcType)-readExpType_maybe (Check ty) = return (Just ty)-readExpType_maybe (Infer (IR { ir_ref = ref})) = readMutVar ref---- | Same as readExpType, but for Scaled ExpTypes-readScaledExpType :: Scaled ExpType -> TcM (Scaled Type)-readScaledExpType (Scaled m exp_ty)- = do { ty <- readExpType exp_ty- ; return (Scaled m ty) }---- | Extract a type out of an ExpType. Otherwise, panics.-readExpType :: ExpType -> TcM TcType-readExpType exp_ty- = do { mb_ty <- readExpType_maybe exp_ty- ; case mb_ty of- Just ty -> return ty- Nothing -> pprPanic "Unknown expected type" (ppr exp_ty) }---- | Returns the expected type when in checking mode.-checkingExpType_maybe :: ExpType -> Maybe TcType-checkingExpType_maybe (Check ty) = Just ty-checkingExpType_maybe (Infer {}) = Nothing---- | Returns the expected type when in checking mode. Panics if in inference--- mode.-checkingExpType :: String -> ExpType -> TcType-checkingExpType _ (Check ty) = ty-checkingExpType err et = pprPanic "checkingExpType" (text err $$ ppr et)--scaledExpTypeToType :: Scaled ExpType -> TcM (Scaled TcType)-scaledExpTypeToType (Scaled m exp_ty)- = do { ty <- expTypeToType exp_ty- ; return (Scaled m ty) }---- | Extracts the expected type if there is one, or generates a new--- TauTv if there isn't.-expTypeToType :: ExpType -> TcM TcType-expTypeToType (Check ty) = return ty-expTypeToType (Infer inf_res) = inferResultToType inf_res--inferResultToType :: InferResult -> TcM Type-inferResultToType (IR { ir_uniq = u, ir_lvl = tc_lvl- , ir_ref = ref- , ir_frr = mb_frr })- = do { mb_inferred_ty <- readTcRef ref- ; tau <- case mb_inferred_ty of- Just ty -> do { ensureMonoType ty- -- See Note [inferResultToType]- ; return ty }- Nothing -> do { tau <- new_meta- ; writeMutVar ref (Just tau)- ; return tau }- ; traceTc "Forcing ExpType to be monomorphic:"- (ppr u <+> text ":=" <+> ppr tau)- ; return tau }- where- -- See Note [TcLevel of ExpType]- new_meta = case mb_frr of- Nothing -> do { rr <- newMetaTyVarTyAtLevel tc_lvl runtimeRepTy- ; newMetaTyVarTyAtLevel tc_lvl (mkTYPEapp rr) }- Just frr -> mdo { rr <- newConcreteTyVarAtLevel conc_orig tc_lvl runtimeRepTy- ; tau <- newMetaTyVarTyAtLevel tc_lvl (mkTYPEapp rr)- ; let conc_orig = ConcreteFRR $ FixedRuntimeRepOrigin tau frr- ; return tau }--{- Note [inferResultToType]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-expTypeToType and inferResultType convert an InferResult to a monotype.-It must be a monotype because if the InferResult isn't already filled in,-we fill it in with a unification variable (hence monotype). So to preserve-order-independence we check for mono-type-ness even if it *is* filled in-already.--See also Note [TcLevel of ExpType] above, and-Note [fillInferResult] in GHC.Tc.Utils.Unify.--}---- | Infer a type using a fresh ExpType--- See also Note [ExpType] in "GHC.Tc.Utils.TcMType"------ Use 'tcInferFRR' if you require the type to have a fixed--- runtime representation.-tcInfer :: (ExpSigmaType -> TcM a) -> TcM (a, TcSigmaType)-tcInfer = tc_infer Nothing---- | Like 'tcInfer', except it ensures that the resulting type--- has a syntactically fixed RuntimeRep as per Note [Fixed RuntimeRep] in--- GHC.Tc.Utils.Concrete.-tcInferFRR :: FixedRuntimeRepContext -> (ExpSigmaTypeFRR -> TcM a) -> TcM (a, TcSigmaTypeFRR)-tcInferFRR frr_orig = tc_infer (Just frr_orig)--tc_infer :: Maybe FixedRuntimeRepContext -> (ExpSigmaType -> TcM a) -> TcM (a, TcSigmaType)-tc_infer mb_frr tc_check- = do { res_ty <- new_inferExpType mb_frr- ; result <- tc_check res_ty- ; res_ty <- readExpType res_ty- ; return (result, res_ty) }--{- *********************************************************************-* *- Promoting types-* *-********************************************************************* -}--ensureMonoType :: TcType -> TcM ()--- Assuming that the argument type is of kind (TYPE r),--- ensure that it is a /monotype/--- If it is not a monotype we can see right away (since unification--- variables and type-function applications stand for monotypes), but--- we emit a Wanted equality just to delay the error message until later-ensureMonoType res_ty- | isTauTy res_ty -- isTauTy doesn't need zonking or anything- = return ()- | otherwise- = do { mono_ty <- newOpenFlexiTyVarTy- ; let eq_orig = TypeEqOrigin { uo_actual = res_ty- , uo_expected = mono_ty- , uo_thing = Nothing- , uo_visible = False }-- ; _co <- emitWantedEq eq_orig TypeLevel Nominal res_ty mono_ty- ; return () }--promoteTcType :: TcLevel -> TcType -> TcM (TcCoercionN, TcType)--- See Note [Promoting a type]--- See also Note [fillInferResult]--- promoteTcType level ty = (co, ty')--- * Returns ty' whose max level is just 'level'--- and whose kind is ~# to the kind of 'ty'--- and whose kind has form TYPE rr--- * and co :: ty ~ ty'--- * and emits constraints to justify the coercion------ NB: we expect that 'ty' has already kind (TYPE rr) for--- some rr::RuntimeRep. It is, after all, the type of a term.-promoteTcType dest_lvl ty- = do { cur_lvl <- getTcLevel- ; if (cur_lvl `sameDepthAs` dest_lvl)- then return (mkNomReflCo ty, ty)- else promote_it }- where- promote_it :: TcM (TcCoercion, TcType)- promote_it -- Emit a constraint (alpha :: TYPE rr) ~ ty- -- where alpha and rr are fresh and from level dest_lvl- = do { rr <- newMetaTyVarTyAtLevel dest_lvl runtimeRepTy- ; prom_ty <- newMetaTyVarTyAtLevel dest_lvl (mkTYPEapp rr)- ; let eq_orig = TypeEqOrigin { uo_actual = ty- , uo_expected = prom_ty- , uo_thing = Nothing- , uo_visible = False }-- ; co <- emitWantedEq eq_orig TypeLevel Nominal ty prom_ty- ; return (co, prom_ty) }--{- Note [Promoting a type]-~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (#12427)-- data T where- MkT :: (Int -> Int) -> a -> T-- h y = case y of MkT v w -> v--We'll infer the RHS type with an expected type ExpType of- (IR { ir_lvl = l, ir_ref = ref, ... )-where 'l' is the TcLevel of the RHS of 'h'. Then the MkT pattern-match will increase the level, so we'll end up in tcSubType, trying to-unify the type of v,- v :: Int -> Int-with the expected type. But this attempt takes place at level (l+1),-rightly so, since v's type could have mentioned existential variables,-(like w's does) and we want to catch that.--So we- - create a new meta-var alpha[l+1]- - fill in the InferRes ref cell 'ref' with alpha- - emit an equality constraint, thus- [W] alpha[l+1] ~ (Int -> Int)--That constraint will float outwards, as it should, unless v's-type mentions a skolem-captured variable.--This approach fails if v has a higher rank type; see-Note [Promotion and higher rank types]---Note [Promotion and higher rank types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-If v had a higher-rank type, say v :: (forall a. a->a) -> Int,-then we'd emit an equality- [W] alpha[l+1] ~ ((forall a. a->a) -> Int)-which will sadly fail because we can't unify a unification variable-with a polytype. But there is nothing really wrong with the program-here.--We could just about solve this by "promote the type" of v, to expose-its polymorphic "shape" while still leaving constraints that will-prevent existential escape. But we must be careful! Exposing-the "shape" of the type is precisely what we must NOT do under-a GADT pattern match! So in this case we might promote the type-to- (forall a. a->a) -> alpha[l+1]-and emit the constraint- [W] alpha[l+1] ~ Int-Now the promoted type can fill the ref cell, while the emitted-equality can float or not, according to the usual rules.--But that's not quite right! We are exposing the arrow! We could-deal with that too:- (forall a. mu[l+1] a a) -> alpha[l+1]-with constraints- [W] alpha[l+1] ~ Int- [W] mu[l+1] ~ (->)-Here we abstract over the '->' inside the forall, in case that-is subject to an equality constraint from a GADT match.--Note that we kept the outer (->) because that's part of-the polymorphic "shape". And because of impredicativity,-GADT matches can't give equalities that affect polymorphic-shape.--This reasoning just seems too complicated, so I decided not-to do it. These higher-rank notes are just here to record-the thinking.--}---{- *********************************************************************-* *- MetaTvs (meta type variables; mutable)-* *-********************************************************************* -}--{- Note [TyVarTv]-~~~~~~~~~~~~~~~~~-A TyVarTv can unify with type *variables* only, including other TyVarTvs and-skolems. They are used in two places:--1. In kind signatures, see GHC.Tc.TyCl- Note [Inferring kinds for type declarations]- and Note [Using TyVarTvs for kind-checking GADTs]--2. In partial type signatures. See GHC.Tc.Types- Note [Quantified variables in partial type signatures]--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 TyVarTvs to unify with each-other or check that they don't. In the case of (1) the check is done-in GHC.Tc.TyCl.swizzleTcTyConBndrs. In case of (2) it's done by-findDupTyVarTvs in GHC.Tc.Gen.Bind.chooseInferredQuantifiers.--Historical note: Before #15050 this (under the name SigTv) was also-used for ScopedTypeVariables in patterns, to make sure these type-variables only refer to other type variables, but this restriction was-dropped, and ScopedTypeVariables can now refer to full types (GHC-Proposal 29).--}--newMetaTyVarName :: FastString -> TcM Name--- Makes a /System/ Name, which is eagerly eliminated by--- the unifier; see GHC.Tc.Utils.Unify.nicer_to_update_tv1, and--- GHC.Tc.Solver.Canonical.canEqTyVarTyVar (nicer_to_update_tv2)-newMetaTyVarName str- = do { uniq <- newUnique- ; return (mkSystemName uniq (mkTyVarOccFS str)) }--cloneMetaTyVarName :: Name -> TcM Name-cloneMetaTyVarName name- = do { uniq <- newUnique- ; return (mkSystemName uniq (nameOccName name)) }- -- See Note [Name of an instantiated type variable]--{- Note [Name of an instantiated type variable]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-At the moment we give a unification variable a System Name, which-influences the way it is tidied; see TypeRep.tidyTyVarBndr.--}--metaInfoToTyVarName :: MetaInfo -> FastString-metaInfoToTyVarName meta_info =- case meta_info of- TauTv -> fsLit "t"- TyVarTv -> fsLit "a"- RuntimeUnkTv -> fsLit "r"- CycleBreakerTv -> fsLit "b"- ConcreteTv {} -> fsLit "c"--newAnonMetaTyVar :: MetaInfo -> Kind -> TcM TcTyVar-newAnonMetaTyVar mi = newNamedAnonMetaTyVar (metaInfoToTyVarName mi) mi--newNamedAnonMetaTyVar :: FastString -> MetaInfo -> Kind -> TcM TcTyVar--- Make a new meta tyvar out of thin air-newNamedAnonMetaTyVar tyvar_name meta_info kind-- = do { name <- newMetaTyVarName tyvar_name- ; details <- newMetaDetails meta_info- ; let tyvar = mkTcTyVar name kind details- ; traceTc "newAnonMetaTyVar" (ppr tyvar)- ; return tyvar }---- makes a new skolem tv-newSkolemTyVar :: SkolemInfo -> Name -> Kind -> TcM TcTyVar-newSkolemTyVar skol_info name kind- = do { lvl <- getTcLevel- ; return (mkTcTyVar name kind (SkolemTv skol_info lvl False)) }--newTyVarTyVar :: Name -> Kind -> TcM TcTyVar--- See Note [TyVarTv]--- Does not clone a fresh unique-newTyVarTyVar name kind- = do { details <- newMetaDetails TyVarTv- ; let tyvar = mkTcTyVar name kind details- ; traceTc "newTyVarTyVar" (ppr tyvar)- ; return tyvar }--cloneTyVarTyVar :: Name -> Kind -> TcM TcTyVar--- See Note [TyVarTv]--- Clones a fresh unique-cloneTyVarTyVar name kind- = do { details <- newMetaDetails TyVarTv- ; uniq <- newUnique- ; let name' = name `setNameUnique` uniq- tyvar = mkTcTyVar name' kind details- -- Don't use cloneMetaTyVar, which makes a SystemName- -- We want to keep the original more user-friendly Name- -- In practical terms that means that in error messages,- -- when the Name is tidied we get 'a' rather than 'a0'- ; traceTc "cloneTyVarTyVar" (ppr tyvar)- ; return tyvar }---- | Create a new metavariable, of the given kind, which can only be unified--- with a concrete type.------ Invariant: the kind must be concrete, as per Note [ConcreteTv].--- This is checked with an assertion.-newConcreteTyVar :: HasDebugCallStack => ConcreteTvOrigin -> TcKind -> TcM TcTyVar-newConcreteTyVar reason kind =- assertPpr (isConcrete kind)- (text "newConcreteTyVar: non-concrete kind" <+> ppr kind)- $ newAnonMetaTyVar (ConcreteTv reason) kind--newPatSigTyVar :: Name -> Kind -> TcM TcTyVar-newPatSigTyVar name kind- = do { details <- newMetaDetails TauTv- ; uniq <- newUnique- ; let name' = name `setNameUnique` uniq- tyvar = mkTcTyVar name' kind details- -- Don't use cloneMetaTyVar;- -- same reasoning as in newTyVarTyVar- ; traceTc "newPatSigTyVar" (ppr tyvar)- ; return tyvar }--cloneAnonMetaTyVar :: MetaInfo -> TyVar -> TcKind -> TcM TcTyVar--- Make a fresh MetaTyVar, basing the name--- on that of the supplied TyVar-cloneAnonMetaTyVar info tv kind- = do { details <- newMetaDetails info- ; name <- cloneMetaTyVarName (tyVarName tv)- ; let tyvar = mkTcTyVar name kind details- ; traceTc "cloneAnonMetaTyVar" (ppr tyvar <+> dcolon <+> ppr (tyVarKind tyvar))- ; return tyvar }---- Make a new CycleBreakerTv. See Note [Type equality cycles]--- in GHC.Tc.Solver.Canonical.-newCycleBreakerTyVar :: TcKind -> TcM TcTyVar-newCycleBreakerTyVar kind- = do { details <- newMetaDetails CycleBreakerTv- ; name <- newMetaTyVarName (fsLit "cbv")- ; return (mkTcTyVar name kind details) }--newMetaDetails :: MetaInfo -> TcM TcTyVarDetails-newMetaDetails info- = do { ref <- newMutVar Flexi- ; tclvl <- getTcLevel- ; return (MetaTv { mtv_info = info- , mtv_ref = ref- , mtv_tclvl = tclvl }) }--newTauTvDetailsAtLevel :: TcLevel -> TcM TcTyVarDetails-newTauTvDetailsAtLevel tclvl- = do { ref <- newMutVar Flexi- ; return (MetaTv { mtv_info = TauTv- , mtv_ref = ref- , mtv_tclvl = tclvl }) }--newConcreteTvDetailsAtLevel :: ConcreteTvOrigin -> TcLevel -> TcM TcTyVarDetails-newConcreteTvDetailsAtLevel conc_orig tclvl- = do { ref <- newMutVar Flexi- ; return (MetaTv { mtv_info = ConcreteTv conc_orig- , mtv_ref = ref- , mtv_tclvl = tclvl }) }--cloneMetaTyVar :: TcTyVar -> TcM TcTyVar-cloneMetaTyVar tv- = assert (isTcTyVar tv) $- do { ref <- newMutVar Flexi- ; name' <- cloneMetaTyVarName (tyVarName tv)- ; let details' = case tcTyVarDetails tv of- details@(MetaTv {}) -> details { mtv_ref = ref }- _ -> pprPanic "cloneMetaTyVar" (ppr tv)- tyvar = mkTcTyVar name' (tyVarKind tv) details'- ; traceTc "cloneMetaTyVar" (ppr tyvar)- ; return tyvar }---- Works for both type and kind variables-readMetaTyVar :: TyVar -> TcM MetaDetails-readMetaTyVar tyvar = assertPpr (isMetaTyVar tyvar) (ppr tyvar) $- readMutVar (metaTyVarRef tyvar)--isFilledMetaTyVar_maybe :: TcTyVar -> TcM (Maybe Type)-isFilledMetaTyVar_maybe tv--- TODO: This should be an assertion that tv is definitely a TcTyVar but it fails--- at the moment (Jan 22)- | isTcTyVar tv- , MetaTv { mtv_ref = ref } <- tcTyVarDetails tv- = do { cts <- readTcRef ref- ; case cts of- Indirect ty -> return (Just ty)- Flexi -> return Nothing }- | otherwise- = return Nothing--isFilledMetaTyVar :: TyVar -> TcM Bool--- True of a filled-in (Indirect) meta type variable-isFilledMetaTyVar tv = isJust <$> isFilledMetaTyVar_maybe tv--isUnfilledMetaTyVar :: TyVar -> TcM Bool--- True of a un-filled-in (Flexi) meta type variable--- NB: Not the opposite of isFilledMetaTyVar-isUnfilledMetaTyVar tv- | MetaTv { mtv_ref = ref } <- tcTyVarDetails tv- = do { details <- readMutVar ref- ; return (isFlexi details) }- | otherwise = return False------------------------- Works with both type and kind variables-writeMetaTyVar :: HasDebugCallStack => TcTyVar -> TcType -> TcM ()--- Write into a currently-empty MetaTyVar--writeMetaTyVar tyvar ty- | not debugIsOn- = writeMetaTyVarRef tyvar (metaTyVarRef tyvar) ty---- Everything from here on only happens if DEBUG is on- | not (isTcTyVar tyvar)- = massertPpr False (text "Writing to non-tc tyvar" <+> ppr tyvar)-- | MetaTv { mtv_ref = ref } <- tcTyVarDetails tyvar- = writeMetaTyVarRef tyvar ref ty-- | otherwise- = massertPpr False (text "Writing to non-meta tyvar" <+> ppr tyvar)-----------------------writeMetaTyVarRef :: HasDebugCallStack => TcTyVar -> TcRef MetaDetails -> TcType -> TcM ()--- Here the tyvar is for error checking only;--- the ref cell must be for the same tyvar-writeMetaTyVarRef tyvar ref ty- | not debugIsOn- = do { traceTc "writeMetaTyVar" (ppr tyvar <+> dcolon <+> ppr (tyVarKind tyvar)- <+> text ":=" <+> ppr ty)- ; writeTcRef ref (Indirect ty) }-- -- Everything from here on only happens if DEBUG is on- -- Need to zonk 'ty' because we may only recently have promoted- -- its free meta-tyvars (see Solver.Interact.tryToSolveByUnification)- | otherwise- = do { meta_details <- readMutVar ref;- -- Zonk kinds to allow the error check to work- ; zonked_tv_kind <- zonkTcType tv_kind- ; zonked_ty <- zonkTcType ty- ; let zonked_ty_kind = typeKind zonked_ty- zonked_ty_lvl = tcTypeLevel zonked_ty- level_check_ok = not (zonked_ty_lvl `strictlyDeeperThan` tv_lvl)- level_check_msg = ppr zonked_ty_lvl $$ ppr tv_lvl $$ ppr tyvar $$ ppr ty- kind_check_ok = zonked_ty_kind `eqType` zonked_tv_kind- -- Note [Extra-constraint holes in partial type signatures] in GHC.Tc.Gen.HsType-- 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 zonked_ty_kind) )-- ; traceTc "writeMetaTyVar" (ppr tyvar <+> text ":=" <+> ppr ty)-- -- Check for double updates- ; massertPpr (isFlexi meta_details) (double_upd_msg meta_details)-- -- Check for level OK- ; massertPpr level_check_ok level_check_msg-- -- Check Kinds ok- ; massertPpr kind_check_ok kind_msg-- -- Do the write- ; writeMutVar ref (Indirect ty) }- where- tv_kind = tyVarKind tyvar-- tv_lvl = tcTyVarLevel tyvar--- double_upd_msg details = hang (text "Double update of meta tyvar")- 2 (ppr tyvar $$ ppr details)--{--************************************************************************-* *- MetaTvs: TauTvs-* *-************************************************************************--Note [Never need to instantiate coercion variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-With coercion variables sloshing around in types, it might seem that we-sometimes need to instantiate coercion variables. This would be problematic,-because coercion variables inhabit unboxed equality (~#), and the constraint-solver thinks in terms only of boxed equality (~). The solution is that-we never need to instantiate coercion variables in the first place.--The tyvars that we need to instantiate come from the types of functions,-data constructors, and patterns. These will never be quantified over-coercion variables, except for the special case of the promoted Eq#. But,-that can't ever appear in user code, so we're safe!--}---newMultiplicityVar :: TcM TcType-newMultiplicityVar = newFlexiTyVarTy multiplicityTy--newFlexiTyVar :: Kind -> TcM TcTyVar-newFlexiTyVar kind = newAnonMetaTyVar TauTv kind---- | Create a new flexi ty var with a specific name-newNamedFlexiTyVar :: FastString -> Kind -> TcM TcTyVar-newNamedFlexiTyVar fs kind = newNamedAnonMetaTyVar fs TauTv kind--newFlexiTyVarTy :: Kind -> TcM TcType-newFlexiTyVarTy kind = do- tc_tyvar <- newFlexiTyVar kind- return (mkTyVarTy tc_tyvar)--newFlexiTyVarTys :: Int -> Kind -> TcM [TcType]-newFlexiTyVarTys n kind = replicateM n (newFlexiTyVarTy kind)--newOpenTypeKind :: TcM TcKind-newOpenTypeKind- = do { rr <- newFlexiTyVarTy runtimeRepTy- ; return (mkTYPEapp rr) }---- | Create a tyvar that can be a lifted or unlifted type.--- Returns alpha :: TYPE kappa, where both alpha and kappa are fresh-newOpenFlexiTyVarTy :: TcM TcType-newOpenFlexiTyVarTy- = do { tv <- newOpenFlexiTyVar- ; return (mkTyVarTy tv) }--newOpenFlexiTyVar :: TcM TcTyVar-newOpenFlexiTyVar- = do { kind <- newOpenTypeKind- ; newFlexiTyVar kind }--newOpenBoxedTypeKind :: TcM TcKind-newOpenBoxedTypeKind- = do { lev <- newFlexiTyVarTy (mkTyConTy levityTyCon)- ; let rr = mkTyConApp boxedRepDataConTyCon [lev]- ; return (mkTYPEapp rr) }--newMetaTyVars :: [TyVar] -> TcM (Subst, [TcTyVar])--- Instantiate with META type variables--- Note that this works for a sequence of kind, type, and coercion variables--- variables. Eg [ (k:*), (a:k->k) ]--- Gives [ (k7:*), (a8:k7->k7) ]-newMetaTyVars = newMetaTyVarsX emptySubst- -- emptySubst has an empty in-scope set, but that's fine here- -- Since the tyvars are freshly made, they cannot possibly be- -- captured by any existing for-alls.--newMetaTyVarsX :: Subst -> [TyVar] -> TcM (Subst, [TcTyVar])--- Just like newMetaTyVars, but start with an existing substitution.-newMetaTyVarsX subst = mapAccumLM newMetaTyVarX subst--newMetaTyVarX :: Subst -> TyVar -> TcM (Subst, TcTyVar)--- Make a new unification variable tyvar whose Name and Kind come from--- an existing TyVar. We substitute kind variables in the kind.-newMetaTyVarX = new_meta_tv_x TauTv--newMetaTyVarTyVarX :: Subst -> TyVar -> TcM (Subst, TcTyVar)--- Just like newMetaTyVarX, but make a TyVarTv-newMetaTyVarTyVarX = new_meta_tv_x TyVarTv--newWildCardX :: Subst -> TyVar -> TcM (Subst, TcTyVar)-newWildCardX subst tv- = do { new_tv <- newAnonMetaTyVar TauTv (substTy subst (tyVarKind tv))- ; return (extendTvSubstWithClone subst tv new_tv, new_tv) }--new_meta_tv_x :: MetaInfo -> Subst -> TyVar -> TcM (Subst, TcTyVar)-new_meta_tv_x info subst tv- = do { new_tv <- cloneAnonMetaTyVar info tv substd_kind- ; let subst1 = extendTvSubstWithClone subst tv new_tv- ; return (subst1, new_tv) }- where- substd_kind = substTyUnchecked subst (tyVarKind tv)- -- NOTE: #12549 is fixed so we could use- -- substTy here, but the tc_infer_args problem- -- is not yet fixed so leaving as unchecked for now.- -- OLD NOTE:- -- Unchecked because we call newMetaTyVarX from- -- tcInstTyBinder, which is called from tcInferTyApps- -- which does not yet take enough trouble to ensure- -- the in-scope set is right; e.g. #12785 trips- -- if we use substTy here--newMetaTyVarTyAtLevel :: TcLevel -> TcKind -> TcM TcType-newMetaTyVarTyAtLevel tc_lvl kind- = do { details <- newTauTvDetailsAtLevel tc_lvl- ; name <- newMetaTyVarName (fsLit "p")- ; return (mkTyVarTy (mkTcTyVar name kind details)) }--newConcreteTyVarAtLevel :: ConcreteTvOrigin -> TcLevel -> TcKind -> TcM TcType-newConcreteTyVarAtLevel conc_orig tc_lvl kind- = do { details <- newConcreteTvDetailsAtLevel conc_orig tc_lvl- ; name <- newMetaTyVarName (fsLit "c")- ; return (mkTyVarTy (mkTcTyVar name kind details)) }---{- *********************************************************************-* *- Finding variables to quantify over-* *-********************************************************************* -}--{- Note [Dependent type variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In Haskell type inference we quantify over type variables; but we only-quantify over /kind/ variables when -XPolyKinds is on. Without -XPolyKinds-we default the kind variables to *.--So, to support this defaulting, and only for that reason, when-collecting the free vars of a type (in candidateQTyVarsOfType and friends),-prior to quantifying, we must keep the type and kind variables separate.--But what does that mean in a system where kind variables /are/ type-variables? It's a fairly arbitrary distinction based on how the-variables appear:-- - "Kind variables" appear in the kind of some other free variable- or in the kind of a locally quantified type variable- (forall (a :: kappa). ...) or in the kind of a coercion- (a |> (co :: kappa1 ~ kappa2)).-- These are the ones we default to * if -XPolyKinds is off-- - "Type variables" are all free vars that are not kind variables--E.g. In the type T k (a::k)- 'k' is a kind variable, because it occurs in the kind of 'a',- even though it also appears at "top level" of the type- 'a' is a type variable, because it doesn't--We gather these variables using a CandidatesQTvs record:- DV { dv_kvs: Variables free in the kind of a free type variable- or of a forall-bound type variable- , dv_tvs: Variables syntactically free in the type }--So: dv_kvs are the kind variables of the type- (dv_tvs - dv_kvs) are the type variable of the type--Note that--* A variable can occur in both.- T k (x::k) The first occurrence of k makes it- show up in dv_tvs, the second in dv_kvs--* We include any coercion variables in the "dependent",- "kind-variable" set because we never quantify over them.--* The "kind variables" might depend on each other; e.g- (k1 :: k2), (k2 :: *)- The "type variables" do not depend on each other; if- one did, it'd be classified as a kind variable!--Note [CandidatesQTvs determinism and order]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-* Determinism: when we quantify over type variables we decide the- order in which they appear in the final type. Because the order of- type variables in the type can end up in the interface file and- affects some optimizations like worker-wrapper, we want this order to- be deterministic.-- To achieve that we use deterministic sets of variables that can be- converted to lists in a deterministic order. For more information- about deterministic sets see Note [Deterministic UniqFM] in GHC.Types.Unique.DFM.--* Order: as well as being deterministic, we use an- accumulating-parameter style for candidateQTyVarsOfType so that we- add variables one at a time, left to right. That means we tend to- produce the variables in left-to-right order. This is just to make- it bit more predictable for the programmer.--Note [Naughty quantification candidates]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (#14880, dependent/should_compile/T14880-2), suppose-we are trying to generalise this type:-- forall arg. ... (alpha[tau]:arg) ...--We have a metavariable alpha whose kind mentions a skolem variable-bound inside the very type we are generalising.-This can arise while type-checking a user-written type signature-(see the test case for the full code).--We cannot generalise over alpha! That would produce a type like- forall {a :: arg}. forall arg. ...blah...-The fact that alpha's kind mentions arg renders it completely-ineligible for generalisation.--However, we are not going to learn any new constraints on alpha,-because its kind isn't even in scope in the outer context (but see Wrinkle).-So alpha is entirely unconstrained.--What then should we do with alpha? During generalization, every-metavariable is either (A) promoted, (B) generalized, or (C) zapped-(according to Note [Recipe for checking a signature] in GHC.Tc.Gen.HsType).-- * We can't generalise it.- * We can't promote it, because its kind prevents that- * We can't simply leave it be, because this type is about to- go into the typing environment (as the type of some let-bound- variable, say), and then chaos erupts when we try to instantiate.--Previously, we zapped it to Any. This worked, but it had the unfortunate-effect of causing Any sometimes to appear in error messages. If this-kind of signature happens, the user probably has made a mistake -- no-one really wants Any in their types. So we now error. This must be-a hard error (failure in the monad) to avoid other messages from mentioning-Any.--We do this eager erroring in candidateQTyVars, which always precedes-generalisation, because at that moment we have a clear picture of what-skolems are in scope within the type itself (e.g. that 'forall arg').--This change is inspired by and described in Section 7.2 of "Kind Inference-for Datatypes", POPL'20.--NB: this is all rather similar to, but sadly not the same as- Note [Error on unconstrained meta-variables]--Wrinkle:--We must make absolutely sure that alpha indeed is not-from an outer context. (Otherwise, we might indeed learn more information-about it.) This can be done easily: we just check alpha's TcLevel.-That level must be strictly greater than the ambient TcLevel in order-to treat it as naughty. We say "strictly greater than" because the call to-candidateQTyVars is made outside the bumped TcLevel, as stated in the-comment to candidateQTyVarsOfType. The level check is done in go_tv-in collect_cand_qtvs. Skipping this check caused #16517.---}--data CandidatesQTvs- -- See Note [Dependent type variables]- -- See Note [CandidatesQTvs determinism and order]- --- -- Invariants:- -- * All variables are fully zonked, including their kinds- -- * All variables are at a level greater than the ambient level- -- See Note [Use level numbers for quantification]- --- -- This *can* contain skolems. For example, in `data X k :: k -> Type`- -- we need to know that the k is a dependent variable. This is done- -- by collecting the candidates in the kind after skolemising. It also- -- comes up when generalizing a associated type instance, where instance- -- variables are skolems. (Recall that associated type instances are generalized- -- independently from their enclosing class instance, and the associated- -- type instance may be generalized by more, fewer, or different variables- -- than the class instance.)- --- = DV { dv_kvs :: DTyVarSet -- "kind" metavariables (dependent)- , dv_tvs :: DTyVarSet -- "type" metavariables (non-dependent)- -- A variable may appear in both sets- -- E.g. T k (x::k) The first occurrence of k makes it- -- show up in dv_tvs, the second in dv_kvs- -- See Note [Dependent type variables]-- , dv_cvs :: CoVarSet- -- These are covars. Included only so that we don't repeatedly- -- look at covars' kinds in accumulator. Not used by quantifyTyVars.- }--instance Semi.Semigroup CandidatesQTvs where- (DV { dv_kvs = kv1, dv_tvs = tv1, dv_cvs = cv1 })- <> (DV { dv_kvs = kv2, dv_tvs = tv2, dv_cvs = cv2 })- = DV { dv_kvs = kv1 `unionDVarSet` kv2- , dv_tvs = tv1 `unionDVarSet` tv2- , dv_cvs = cv1 `unionVarSet` cv2 }--instance Monoid CandidatesQTvs where- mempty = DV { dv_kvs = emptyDVarSet, dv_tvs = emptyDVarSet, dv_cvs = emptyVarSet }- mappend = (Semi.<>)--instance Outputable CandidatesQTvs where- ppr (DV {dv_kvs = kvs, dv_tvs = tvs, dv_cvs = cvs })- = text "DV" <+> braces (pprWithCommas id [ text "dv_kvs =" <+> ppr kvs- , text "dv_tvs =" <+> ppr tvs- , text "dv_cvs =" <+> ppr cvs ])--isEmptyCandidates :: CandidatesQTvs -> Bool-isEmptyCandidates (DV { dv_kvs = kvs, dv_tvs = tvs })- = isEmptyDVarSet kvs && isEmptyDVarSet tvs---- | Extract out the kind vars (in order) and type vars (in order) from--- a 'CandidatesQTvs'. The lists are guaranteed to be distinct. Keeping--- the lists separate is important only in the -XNoPolyKinds case.-candidateVars :: CandidatesQTvs -> ([TcTyVar], [TcTyVar])-candidateVars (DV { dv_kvs = dep_kv_set, dv_tvs = nondep_tkv_set })- = (dep_kvs, nondep_tvs)- where- dep_kvs = scopedSort $ dVarSetElems dep_kv_set- -- scopedSort: put the kind variables into- -- well-scoped order.- -- E.g. [k, (a::k)] not the other way round-- nondep_tvs = dVarSetElems (nondep_tkv_set `minusDVarSet` dep_kv_set)- -- See Note [Dependent type variables]- -- The `minus` dep_tkvs removes any kind-level vars- -- e.g. T k (a::k) Since k appear in a kind it'll- -- be in dv_kvs, and is dependent. So remove it from- -- dv_tvs which will also contain k- -- NB kinds of tvs are already zonked--candidateKindVars :: CandidatesQTvs -> TyVarSet-candidateKindVars dvs = dVarSetToVarSet (dv_kvs dvs)--delCandidates :: CandidatesQTvs -> [Var] -> CandidatesQTvs-delCandidates (DV { dv_kvs = kvs, dv_tvs = tvs, dv_cvs = cvs }) vars- = DV { dv_kvs = kvs `delDVarSetList` vars- , dv_tvs = tvs `delDVarSetList` vars- , dv_cvs = cvs `delVarSetList` vars }--partitionCandidates :: CandidatesQTvs -> (TyVar -> Bool) -> (TyVarSet, CandidatesQTvs)--- The selected TyVars are returned as a non-deterministic TyVarSet-partitionCandidates dvs@(DV { dv_kvs = kvs, dv_tvs = tvs }) pred- = (extracted, dvs { dv_kvs = rest_kvs, dv_tvs = rest_tvs })- where- (extracted_kvs, rest_kvs) = partitionDVarSet pred kvs- (extracted_tvs, rest_tvs) = partitionDVarSet pred tvs- extracted = dVarSetToVarSet extracted_kvs `unionVarSet` dVarSetToVarSet extracted_tvs--candidateQTyVarsWithBinders :: [TyVar] -> Type -> TcM CandidatesQTvs--- (candidateQTyVarsWithBinders tvs ty) returns the candidateQTyVars--- of (forall tvs. ty), but do not treat 'tvs' as bound for the purpose--- of Note [Naughty quantification candidates]. Why?--- Because we are going to scoped-sort the quantified variables--- in among the tvs-candidateQTyVarsWithBinders bound_tvs ty- = do { kvs <- candidateQTyVarsOfKinds (map tyVarKind bound_tvs)- ; all_tvs <- collect_cand_qtvs ty False emptyVarSet kvs ty- ; return (all_tvs `delCandidates` bound_tvs) }---- | Gathers free variables to use as quantification candidates (in--- 'quantifyTyVars'). This might output the same var--- in both sets, if it's used in both a type and a kind.--- The variables to quantify must have a TcLevel strictly greater than--- the ambient level. (See Wrinkle in Note [Naughty quantification candidates])--- See Note [CandidatesQTvs determinism and order]--- See Note [Dependent type variables]-candidateQTyVarsOfType :: TcType -- not necessarily zonked- -> TcM CandidatesQTvs-candidateQTyVarsOfType ty = collect_cand_qtvs ty False emptyVarSet mempty ty---- | Like 'candidateQTyVarsOfType', but over a list of types--- The variables to quantify must have a TcLevel strictly greater than--- the ambient level. (See Wrinkle in Note [Naughty quantification candidates])-candidateQTyVarsOfTypes :: [Type] -> TcM CandidatesQTvs-candidateQTyVarsOfTypes tys = foldlM (\acc ty -> collect_cand_qtvs ty False emptyVarSet acc ty)- mempty tys---- | Like 'candidateQTyVarsOfType', but consider every free variable--- to be dependent. This is appropriate when generalizing a *kind*,--- instead of a type. (That way, -XNoPolyKinds will default the variables--- to Type.)-candidateQTyVarsOfKind :: TcKind -- Not necessarily zonked- -> TcM CandidatesQTvs-candidateQTyVarsOfKind ty = collect_cand_qtvs ty True emptyVarSet mempty ty--candidateQTyVarsOfKinds :: [TcKind] -- Not necessarily zonked- -> TcM CandidatesQTvs-candidateQTyVarsOfKinds tys = foldM (\acc ty -> collect_cand_qtvs ty True emptyVarSet acc ty)- mempty tys--collect_cand_qtvs- :: TcType -- original type that we started recurring into; for errors- -> Bool -- True <=> consider every fv in Type to be dependent- -> VarSet -- Bound variables (locals only)- -> CandidatesQTvs -- Accumulating parameter- -> Type -- Not necessarily zonked- -> TcM CandidatesQTvs---- Key points:--- * Looks through meta-tyvars as it goes;--- no need to zonk in advance------ * Needs to be monadic anyway, because it handles naughty--- quantification; see Note [Naughty quantification candidates]------ * Returns fully-zonked CandidateQTvs, including their kinds--- so that subsequent dependency analysis (to build a well--- scoped telescope) works correctly--collect_cand_qtvs orig_ty is_dep bound dvs ty- = go dvs ty- where- is_bound tv = tv `elemVarSet` bound-- ------------------ go :: CandidatesQTvs -> TcType -> TcM CandidatesQTvs- -- Uses accumulating-parameter style- go dv (AppTy t1 t2) = foldlM go dv [t1, t2]- go dv (TyConApp tc tys) = go_tc_args dv (tyConBinders tc) tys- go dv (FunTy _ w arg res) = foldlM go dv [w, arg, res]- go dv (LitTy {}) = return dv- go dv (CastTy ty co) = do dv1 <- go dv ty- collect_cand_qtvs_co orig_ty bound dv1 co- go dv (CoercionTy co) = collect_cand_qtvs_co orig_ty bound dv co-- go dv (TyVarTy tv)- | is_bound tv = return dv- | otherwise = do { m_contents <- isFilledMetaTyVar_maybe tv- ; case m_contents of- Just ind_ty -> go dv ind_ty- Nothing -> go_tv dv tv }-- go dv (ForAllTy (Bndr tv _) ty)- = do { dv1 <- collect_cand_qtvs orig_ty True bound dv (tyVarKind tv)- ; collect_cand_qtvs orig_ty is_dep (bound `extendVarSet` tv) dv1 ty }-- -- This makes sure that we default e.g. the alpha in Proxy alpha (Any alpha).- -- Tested in polykinds/NestedProxies.- -- We just might get this wrong in AppTy, but I don't think that's possible- -- with -XNoPolyKinds. And fixing it would be non-performant, as we'd need- -- to look at kinds.- go_tc_args dv (tc_bndr:tc_bndrs) (ty:tys)- = do { dv1 <- collect_cand_qtvs orig_ty (is_dep || isNamedTyConBinder tc_bndr)- bound dv ty- ; go_tc_args dv1 tc_bndrs tys }- go_tc_args dv _bndrs tys -- _bndrs might be non-empty: undersaturation- -- tys might be non-empty: oversaturation- -- either way, the foldlM is correct- = foldlM go dv tys-- ------------------ go_tv dv@(DV { dv_kvs = kvs, dv_tvs = tvs }) tv- | tv `elemDVarSet` kvs- = return dv -- We have met this tyvar already-- | not is_dep- , tv `elemDVarSet` tvs- = return dv -- We have met this tyvar already-- | otherwise- = do { tv_kind <- zonkTcType (tyVarKind tv)- -- This zonk is annoying, but it is necessary, both to- -- ensure that the collected candidates have zonked kinds- -- (#15795) and to make the naughty check- -- (which comes next) works correctly-- ; let tv_kind_vars = tyCoVarsOfType tv_kind- ; cur_lvl <- getTcLevel- ; if | tcTyVarLevel tv <= cur_lvl- -> return dv -- this variable is from an outer context; skip- -- See Note [Use level numbers for quantification]-- | case tcTyVarDetails tv of- SkolemTv _ lvl _ -> lvl > pushTcLevel cur_lvl- _ -> False- -> return dv -- Skip inner skolems; ToDo: explain-- | intersectsVarSet bound tv_kind_vars- -- the tyvar must not be from an outer context, but we have- -- already checked for this.- -- See Note [Naughty quantification candidates]- -> do { traceTc "Naughty quantifier" $- vcat [ ppr tv <+> dcolon <+> ppr tv_kind- , text "bound:" <+> pprTyVars (nonDetEltsUniqSet bound)- , text "fvs:" <+> pprTyVars (nonDetEltsUniqSet tv_kind_vars) ]-- ; let escapees = intersectVarSet bound tv_kind_vars- ; naughtyQuantification orig_ty tv escapees }-- | otherwise- -> do { let tv' = tv `setTyVarKind` tv_kind- dv' | is_dep = dv { dv_kvs = kvs `extendDVarSet` tv' }- | otherwise = dv { dv_tvs = tvs `extendDVarSet` tv' }- -- See Note [Order of accumulation]-- -- See Note [Recurring into kinds for candidateQTyVars]- ; collect_cand_qtvs orig_ty True bound dv' tv_kind } }--collect_cand_qtvs_co :: TcType -- original type at top of recursion; for errors- -> VarSet -- bound variables- -> CandidatesQTvs -> Coercion- -> TcM CandidatesQTvs-collect_cand_qtvs_co orig_ty bound = go_co- where- go_co dv (Refl ty) = collect_cand_qtvs orig_ty True bound dv ty- go_co dv (GRefl _ ty mco) = do dv1 <- collect_cand_qtvs orig_ty True bound dv ty- go_mco dv1 mco- go_co dv (TyConAppCo _ _ cos) = foldlM go_co dv cos- go_co dv (AppCo co1 co2) = foldlM go_co dv [co1, co2]- go_co dv (FunCo _ _ _ w co1 co2) = foldlM go_co dv [w, co1, co2]- go_co dv (AxiomInstCo _ _ cos) = foldlM go_co dv cos- go_co dv (AxiomRuleCo _ cos) = foldlM go_co dv cos- go_co dv (UnivCo prov _ t1 t2) = do dv1 <- go_prov dv prov- dv2 <- collect_cand_qtvs orig_ty True bound dv1 t1- collect_cand_qtvs orig_ty True bound dv2 t2- go_co dv (SymCo co) = go_co dv co- go_co dv (TransCo co1 co2) = foldlM go_co dv [co1, co2]- go_co dv (SelCo _ co) = go_co dv co- go_co dv (LRCo _ co) = go_co dv co- go_co dv (InstCo co1 co2) = foldlM go_co dv [co1, co2]- go_co dv (KindCo co) = go_co dv co- go_co dv (SubCo co) = go_co dv co-- go_co dv (HoleCo hole)- = do m_co <- unpackCoercionHole_maybe hole- case m_co of- Just co -> go_co dv co- Nothing -> go_cv dv (coHoleCoVar hole)-- go_co dv (CoVarCo cv) = go_cv dv cv-- go_co dv (ForAllCo tcv kind_co co)- = do { dv1 <- go_co dv kind_co- ; collect_cand_qtvs_co orig_ty (bound `extendVarSet` tcv) dv1 co }-- go_mco dv MRefl = return dv- go_mco dv (MCo co) = go_co dv co-- go_prov dv (PhantomProv co) = go_co dv co- go_prov dv (ProofIrrelProv co) = go_co dv co- go_prov dv (PluginProv _) = return dv- go_prov dv (CorePrepProv _) = return dv-- go_cv :: CandidatesQTvs -> CoVar -> TcM CandidatesQTvs- go_cv dv@(DV { dv_cvs = cvs }) cv- | is_bound cv = return dv- | cv `elemVarSet` cvs = return dv-- -- See Note [Recurring into kinds for candidateQTyVars]- | otherwise = collect_cand_qtvs orig_ty True bound- (dv { dv_cvs = cvs `extendVarSet` cv })- (idType cv)-- is_bound tv = tv `elemVarSet` bound--{- Note [Order of accumulation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-You might be tempted (like I was) to use unitDVarSet and mappend-rather than extendDVarSet. However, the union algorithm for-deterministic sets depends on (roughly) the size of the sets. The-elements from the smaller set end up to the right of the elements from-the larger one. When sets are equal, the left-hand argument to-`mappend` goes to the right of the right-hand argument.--In our case, if we use unitDVarSet and mappend, we learn that the free-variables of (a -> b -> c -> d) are [b, a, c, d], and we then quantify-over them in that order. (The a comes after the b because we union the-singleton sets as ({a} `mappend` {b}), producing {b, a}. Thereafter,-the size criterion works to our advantage.) This is just annoying to-users, so I use `extendDVarSet`, which unambiguously puts the new-element to the right.--Note that the unitDVarSet/mappend implementation would not be wrong-against any specification -- just suboptimal and confounding to users.--Note [Recurring into kinds for candidateQTyVars]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-First, read Note [Closing over free variable kinds] in GHC.Core.TyCo.FVs, paying-attention to the end of the Note about using an empty bound set when-traversing a variable's kind.--That Note concludes with the recommendation that we empty out the bound-set when recurring into the kind of a type variable. Yet, we do not do-this here. I have two tasks in order to convince you that this code is-right. First, I must show why it is safe to ignore the reasoning in that-Note. Then, I must show why is is necessary to contradict the reasoning in-that Note.--Why it is safe: There can be no-shadowing in the candidateQ... functions: they work on the output of-type inference, which is seeded by the renamer and its insistence to-use different Uniques for different variables. (In contrast, the Core-functions work on the output of optimizations, which may introduce-shadowing.) Without shadowing, the problem studied by-Note [Closing over free variable kinds] in GHC.Core.TyCo.FVs cannot happen.--Why it is necessary:-Wiping the bound set would be just plain wrong here. Consider-- forall k1 k2 (a :: k1). Proxy k2 (a |> (hole :: k1 ~# k2))--We really don't want to think k1 and k2 are free here. (It's true that we'll-never be able to fill in `hole`, but we don't want to go off the rails just-because we have an insoluble coercion hole.) So: why is it wrong to wipe-the bound variables here but right in Core? Because the final statement-in Note [Closing over free variable kinds] in GHC.Core.TyCo.FVs is wrong: not-every variable is either free or bound. A variable can be a hole, too!-The reasoning in that Note then breaks down.--And the reasoning applies just as well to free non-hole variables, so we-retain the bound set always.---}--{- *********************************************************************-* *- Quantification-* *-************************************************************************--Note [quantifyTyVars]-~~~~~~~~~~~~~~~~~~~~~-quantifyTyVars is given the free vars of a type that we-are about to wrap in a forall.--It takes these free type/kind variables (partitioned into dependent and-non-dependent variables) skolemises metavariables with a TcLevel greater-than the ambient level (see Note [Use level numbers for quantification]).--* This function distinguishes between dependent and non-dependent- variables only to keep correct defaulting behavior with -XNoPolyKinds.- With -XPolyKinds, it treats both classes of variables identically.--* quantifyTyVars never quantifies over- - a coercion variable (or any tv mentioned in the kind of a covar)- - a runtime-rep variable--Note [Use level numbers for quantification]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The level numbers assigned to metavariables are very useful. Not only-do they track touchability (Note [TcLevel invariants] in GHC.Tc.Utils.TcType),-but they also allow us to determine which variables to-generalise. The rule is this:-- When generalising, quantify only metavariables with a TcLevel greater- than the ambient level.--This works because we bump the level every time we go inside a new-source-level construct. In a traditional generalisation algorithm, we-would gather all free variables that aren't free in an environment.-However, if a variable is in that environment, it will always have a lower-TcLevel: it came from an outer scope. So we can replace the "free in-environment" check with a level-number check.--Here is an example:-- f x = x + (z True)- where- z y = x * x--We start by saying (x :: alpha[1]). When inferring the type of z, we'll-quickly discover that z :: alpha[1]. But it would be disastrous to-generalise over alpha in the type of z. So we need to know that alpha-comes from an outer environment. By contrast, the type of y is beta[2],-and we are free to generalise over it. What's the difference between-alpha[1] and beta[2]? Their levels. beta[2] has the right TcLevel for-generalisation, and so we generalise it. alpha[1] does not, and so-we leave it alone.--Note that not *every* variable with a higher level will get-generalised, either due to the monomorphism restriction or other-quirks. See, for example, the code in GHC.Tc.Solver.decideMonoTyVars-and in GHC.Tc.Gen.HsType.kindGeneralizeSome, both of which exclude-certain otherwise-eligible variables from being generalised.--Using level numbers for quantification is implemented in the candidateQTyVars...-functions, by adding only those variables with a level strictly higher than-the ambient level to the set of candidates.--Note [quantifyTyVars determinism]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The results of quantifyTyVars are wrapped in a forall and can end up in the-interface file. One such example is inferred type signatures. They also affect-the results of optimizations, for example worker-wrapper. This means that to-get deterministic builds quantifyTyVars needs to be deterministic.--To achieve this CandidatesQTvs is backed by deterministic sets which allows them-to be later converted to a list in a deterministic order.--For more information about deterministic sets see-Note [Deterministic UniqFM] in GHC.Types.Unique.DFM.--}--quantifyTyVars :: SkolemInfo- -> NonStandardDefaultingStrategy- -> CandidatesQTvs -- See Note [Dependent type variables]- -- Already zonked- -> TcM [TcTyVar]--- See Note [quantifyTyVars]--- Can be given a mixture of TcTyVars and TyVars, in the case of--- associated type declarations. Also accepts covars, but *never* returns any.--- According to Note [Use level numbers for quantification] and the--- invariants on CandidateQTvs, we do not have to filter out variables--- free in the environment here. Just quantify unconditionally, subject--- to the restrictions in Note [quantifyTyVars].-quantifyTyVars skol_info ns_strat dvs- -- short-circuit common case- | isEmptyCandidates dvs- = do { traceTc "quantifyTyVars has nothing to quantify" empty- ; return [] }-- | otherwise- = do { traceTc "quantifyTyVars {"- ( vcat [ text "ns_strat =" <+> ppr ns_strat- , text "dvs =" <+> ppr dvs ])-- ; undefaulted <- defaultTyVars ns_strat dvs- ; final_qtvs <- mapMaybeM zonk_quant undefaulted-- ; traceTc "quantifyTyVars }"- (vcat [ text "undefaulted:" <+> pprTyVars undefaulted- , text "final_qtvs:" <+> pprTyVars final_qtvs ])-- -- We should never quantify over coercion variables; check this- ; let co_vars = filter isCoVar final_qtvs- ; massertPpr (null co_vars) (ppr co_vars)-- ; return final_qtvs }- where- -- zonk_quant returns a tyvar if it should be quantified over;- -- otherwise, it returns Nothing. The latter case happens for- -- non-meta-tyvars- zonk_quant 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-- | otherwise- = Just <$> skolemiseQuantifiedTyVar skol_info tkv--isQuantifiableTv :: TcLevel -- Level of the context, outside the quantification- -> TcTyVar- -> Bool-isQuantifiableTv outer_tclvl tcv- | isTcTyVar tcv -- Might be a CoVar; change this when gather covars separately- = tcTyVarLevel tcv > outer_tclvl- | otherwise- = False--zonkAndSkolemise :: SkolemInfo -> TcTyCoVar -> TcM TcTyCoVar--- A tyvar binder is never a unification variable (TauTv),--- rather it is always a skolem. It *might* be a TyVarTv.--- (Because non-CUSK type declarations use TyVarTvs.)--- Regardless, it may have a kind that has not yet been zonked,--- and may include kind unification variables.-zonkAndSkolemise skol_info tyvar- | isTyVarTyVar tyvar- -- We want to preserve the binding location of the original TyVarTv.- -- This is important for error messages. If we don't do this, then- -- we get bad locations in, e.g., typecheck/should_fail/T2688- = do { zonked_tyvar <- zonkTcTyVarToTcTyVar tyvar- ; skolemiseQuantifiedTyVar skol_info zonked_tyvar }-- | otherwise- = assertPpr (isImmutableTyVar tyvar || isCoVar tyvar) (pprTyVar tyvar) $- zonkTyCoVarKind tyvar--skolemiseQuantifiedTyVar :: SkolemInfo -> TcTyVar -> TcM TcTyVar--- The quantified type variables often include meta type variables--- we want to freeze them into ordinary type variables--- The meta tyvar is updated to point to the new skolem TyVar. Now any--- bound occurrences of the original type variable will get zonked to--- the immutable version.------ We leave skolem TyVars alone; they are immutable.------ This function is called on both kind and type variables,--- but kind variables *only* if PolyKinds is on.--skolemiseQuantifiedTyVar skol_info tv- = case tcTyVarDetails tv of- MetaTv {} -> skolemiseUnboundMetaTyVar skol_info tv-- SkolemTv _ lvl _ -- It might be a skolem type variable,- -- for example from a user type signature- -- But it might also be a shared meta-variable across several- -- type declarations, each with its own skol_info. The first- -- will skolemise it, but the other uses must update its- -- skolem info (#22379)- -> do { kind <- zonkTcType (tyVarKind tv)- ; let details = SkolemTv skol_info lvl False- name = tyVarName tv- ; return (mkTcTyVar name kind details) }-- _other -> pprPanic "skolemiseQuantifiedTyVar" (ppr tv) -- RuntimeUnk---- | Default a type variable using the given defaulting strategy.------ See Note [Type variable defaulting options] in GHC.Types.Basic.-defaultTyVar :: DefaultingStrategy- -> TcTyVar -- If it's a MetaTyVar then it is unbound- -> TcM Bool -- True <=> defaulted away altogether-defaultTyVar def_strat tv- | not (isMetaTyVar tv)- || isTyVarTyVar tv- -- Do not default TyVarTvs. Doing so would violate the invariants- -- on TyVarTvs; see Note [TyVarTv] in GHC.Tc.Utils.TcMType.- -- #13343 is an example; #14555 is another- -- See Note [Inferring kinds for type declarations] in GHC.Tc.TyCl- = return False-- | isRuntimeRepVar tv- , default_ns_vars- = do { traceTc "Defaulting a RuntimeRep var to LiftedRep" (ppr tv)- ; writeMetaTyVar tv liftedRepTy- ; return True }- | isLevityVar tv- , default_ns_vars- = do { traceTc "Defaulting a Levity var to Lifted" (ppr tv)- ; writeMetaTyVar tv liftedDataConTy- ; return True }- | isMultiplicityVar tv- , default_ns_vars- = do { traceTc "Defaulting a Multiplicity var to Many" (ppr tv)- ; writeMetaTyVar tv manyDataConTy- ; return True }-- | isConcreteTyVar tv- -- We don't want to quantify; but neither can we default to- -- anything sensible. (If it has kind RuntimeRep or Levity, as is- -- often the case, it'll have been caught earlier by earlier- -- cases. So in this exotic situation we just promote. Not very- -- satisfing, but it's very much a corner case: #23051)- -- We should really implement the plan in #20686.- = do { lvl <- getTcLevel- ; _ <- promoteMetaTyVarTo lvl tv- ; return True }-- | DefaultKindVars <- def_strat -- -XNoPolyKinds and this is a kind var: we must default it- = default_kind_var tv-- | otherwise- = return False-- where- default_ns_vars :: Bool- default_ns_vars = defaultNonStandardTyVars def_strat- default_kind_var :: TyVar -> TcM Bool- -- defaultKindVar is used exclusively with -XNoPolyKinds- -- See Note [Defaulting with -XNoPolyKinds]- -- It takes an (unconstrained) meta tyvar and defaults it.- -- Works only on vars of type *; for other kinds, it issues an error.- default_kind_var kv- | isLiftedTypeKind (tyVarKind kv)- = do { traceTc "Defaulting a kind var to *" (ppr kv)- ; writeMetaTyVar kv liftedTypeKind- ; return True }- | otherwise- = do { addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- (vcat [ text "Cannot default kind variable" <+> quotes (ppr kv')- , text "of kind:" <+> ppr (tyVarKind kv')- , text "Perhaps enable PolyKinds or add a kind signature" ])- -- We failed to default it, so return False to say so.- -- Hence, it'll get skolemised. That might seem odd, but we must either- -- promote, skolemise, or zap-to-Any, to satisfy GHC.Tc.Gen.HsType- -- Note [Recipe for checking a signature]- -- Otherwise we get level-number assertion failures. It doesn't matter much- -- because we are in an error situation anyway.- ; return False- }- where- (_, kv') = tidyOpenTyCoVar emptyTidyEnv kv---- | Default some unconstrained type variables, as specified--- by the defaulting options:------ - 'RuntimeRep' tyvars default to 'LiftedRep'--- - 'Levity' tyvars default to 'Lifted'--- - 'Multiplicity' tyvars default to 'Many'--- - 'Type' tyvars from dv_kvs default to 'Type', when -XNoPolyKinds--- (under -XNoPolyKinds, non-defaulting vars in dv_kvs is an error)-defaultTyVars :: NonStandardDefaultingStrategy- -> CandidatesQTvs -- ^ all candidates for quantification- -> TcM [TcTyVar] -- ^ those variables not defaulted-defaultTyVars ns_strat dvs- = do { poly_kinds <- xoptM LangExt.PolyKinds- ; let- def_tvs, def_kvs :: DefaultingStrategy- def_tvs = NonStandardDefaulting ns_strat- def_kvs- | poly_kinds = def_tvs- | otherwise = DefaultKindVars- -- As -XNoPolyKinds precludes polymorphic kind variables, we default them.- -- For example:- --- -- type F :: Type -> Type- -- type family F a where- -- F (a -> b) = b- --- -- Here we get `a :: TYPE r`, so to accept this program when -XNoPolyKinds is enabled- -- we must default the kind variable `r :: RuntimeRep`.- -- Test case: T20584.- ; defaulted_kvs <- mapM (defaultTyVar def_kvs) dep_kvs- ; defaulted_tvs <- mapM (defaultTyVar def_tvs) nondep_tvs- ; let undefaulted_kvs = [ kv | (kv, False) <- dep_kvs `zip` defaulted_kvs ]- undefaulted_tvs = [ tv | (tv, False) <- nondep_tvs `zip` defaulted_tvs ]- ; return (undefaulted_kvs ++ undefaulted_tvs) }- -- NB: kvs before tvs because tvs may depend on kvs- where- (dep_kvs, nondep_tvs) = candidateVars dvs--skolemiseUnboundMetaTyVar :: SkolemInfo -> TcTyVar -> TcM TyVar--- We have a Meta tyvar with a ref-cell inside it--- Skolemise it, so that we are totally out of Meta-tyvar-land--- We create a skolem TcTyVar, not a regular TyVar--- See Note [Zonking to Skolem]------ Its level should be one greater than the ambient level, which will typically--- be the same as the level on the meta-tyvar. But not invariably; for example--- f :: (forall a b. SameKind a b) -> Int--- The skolems 'a' and 'b' are bound by tcTKTelescope, at level 2; and they each--- have a level-2 kind unification variable, since it might get unified with another--- of the level-2 skolems e.g. 'k' in this version--- f :: (forall k (a :: k) b. SameKind a b) -> Int--- So when we quantify the kind vars at the top level of the signature, the ambient--- level is 1, but we will quantify over kappa[2].--skolemiseUnboundMetaTyVar skol_info tv- = assertPpr (isMetaTyVar tv) (ppr tv) $- do { check_empty tv- ; tc_lvl <- getTcLevel -- Get the location and level from "here"- ; here <- getSrcSpanM -- i.e. where we are generalising- ; kind <- zonkTcType (tyVarKind tv)- ; let tv_name = tyVarName tv- -- See Note [Skolemising and identity]- final_name | isSystemName tv_name- = mkInternalName (nameUnique tv_name)- (nameOccName tv_name) here- | otherwise- = tv_name- details = SkolemTv skol_info (pushTcLevel tc_lvl) False- final_tv = mkTcTyVar final_name kind details-- ; traceTc "Skolemising" (ppr tv <+> text ":=" <+> ppr final_tv)- ; writeMetaTyVar tv (mkTyVarTy final_tv)- ; return final_tv }- where- check_empty tv -- [Sept 04] Check for non-empty.- = when debugIsOn $ -- See Note [Silly Type Synonyms]- do { cts <- readMetaTyVar tv- ; case cts of- Flexi -> return ()- Indirect ty -> warnPprTrace True "skolemiseUnboundMetaTyVar" (ppr tv $$ ppr ty) $- return () }--{- Note [Error on unconstrained meta-variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider--* type C :: Type -> Type -> Constraint- class (forall a. a b ~ a c) => C b c--* type T = forall a. Proxy a--* data (forall a. a b ~ a c) => T b c--* type instance F Int = Proxy Any- where Any :: forall k. k--In the first three cases we will infer a :: Type -> kappa, but then-we get no further information on kappa. In the last, we will get- Proxy kappa Any-but again will get no further info on kappa.--What do do?- A. We could choose kappa := Type. But this only works when the kind of kappa- is Type (true in this example, but not always).- B. We could default to Any.- C. We could quantify.- D. We could error.--We choose (D), as described in #17567, and implement this choice in-doNotQuantifyTyVars. Discussion of alternativs A-C is below.--NB: this is all rather similar to, but sadly not the same as- Note [Naughty quantification candidates]--To do this, we must take an extra step before doing the final zonk to create-e.g. a TyCon. (There is no problem in the final term-level zonk. See the-section on alternative (B) below.) This extra step is needed only for-constructs that do not quantify their free meta-variables, such as a class-constraint or right-hand side of a type synonym.--Specifically: before the final zonk, every construct must either call-quantifyTyVars or doNotQuantifyTyVars. The latter issues an error-if it is passed any free variables. (Exception: we still default-RuntimeRep and Multiplicity variables.)--Because no meta-variables remain after quantifying or erroring, we perform-the zonk with NoFlexi, which panics upon seeing a meta-variable.--Alternatives A-C, not implemented:--A. As stated above, this works only sometimes. We might have a free- meta-variable of kind Nat, for example.--B. This is what we used to do, but it caused Any to appear in error- messages sometimes. See #17567 for several examples. Defaulting to- Any during the final, whole-program zonk is OK, though, because- we are completely done type-checking at that point. No chance to- leak into an error message.--C. Examine the class declaration at the top of this Note again.- Where should we quantify? We might imagine quantifying and- putting the kind variable in the forall of the quantified constraint.- But what if there are nested foralls? Which one should get the- variable? Other constructs have other problems. (For example,- the right-hand side of a type family instance equation may not- be a poly-type.)-- More broadly, the GHC AST defines a set of places where it performs- implicit lexical generalization. For example, in a type- signature-- f :: Proxy a -> Bool-- the otherwise-unbound a is lexically quantified, giving us-- f :: forall a. Proxy a -> Bool-- The places that allow lexical quantification are marked in the AST with- HsImplicitBndrs. HsImplicitBndrs offers a binding site for otherwise-unbound- variables.-- Later, during type-checking, we discover that a's kind is unconstrained.- We thus quantify *again*, to-- f :: forall {k} (a :: k). Proxy @k a -> Bool-- It is this second quantification that this Note is really about --- let's call it *inferred quantification*.- So there are two sorts of implicit quantification in types:- 1. Lexical quantification: signalled by HsImplicitBndrs, occurs over- variables mentioned by the user but with no explicit binding site,- suppressed by a user-written forall (by the forall-or-nothing rule,- in Note [forall-or-nothing rule] in GHC.Hs.Type).- 2. Inferred quantification: no signal in HsSyn, occurs over unconstrained- variables invented by the type-checker, possible only with -XPolyKinds,- unaffected by forall-or-nothing rule- These two quantifications are performed in different compiler phases, and are- essentially unrelated. However, it is convenient- for programmers to remember only one set of implicit quantification- sites. So, we choose to use the same places (those with HsImplicitBndrs)- for lexical quantification as for inferred quantification of unconstrained- meta-variables. Accordingly, there is no quantification in a class- constraint, or the other constructs that call doNotQuantifyTyVars.--}--doNotQuantifyTyVars :: CandidatesQTvs- -> (TidyEnv -> TcM (TidyEnv, SDoc))- -- ^ like "the class context (D a b, E foogle)"- -> TcM ()--- See Note [Error on unconstrained meta-variables]-doNotQuantifyTyVars dvs where_found- | isEmptyCandidates dvs- = traceTc "doNotQuantifyTyVars has nothing to error on" empty-- | otherwise- = do { traceTc "doNotQuantifyTyVars" (ppr dvs)- ; undefaulted <- defaultTyVars DefaultNonStandardTyVars dvs- -- could have regular TyVars here, in an associated type RHS, or- -- bound by a type declaration head. So filter looking only for- -- metavars. e.g. b and c in `class (forall a. a b ~ a c) => C b c`- -- are OK- ; let leftover_metas = filter isMetaTyVar undefaulted- ; unless (null leftover_metas) $- do { let (tidy_env1, tidied_tvs) = tidyOpenTyCoVars emptyTidyEnv leftover_metas- ; (tidy_env2, where_doc) <- where_found tidy_env1- ; let msg = mkTcRnUnknownMessage $- mkPlainError noHints $- pprWithExplicitKindsWhen True $- vcat [ text "Uninferrable type variable"- <> plural tidied_tvs- <+> pprWithCommas pprTyVar tidied_tvs- <+> text "in"- , where_doc ]- ; failWithTcM (tidy_env2, msg) }- ; traceTc "doNotQuantifyTyVars success" empty }--{- Note [Defaulting with -XNoPolyKinds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-- data Compose f g a = Mk (f (g a))--We infer-- Compose :: forall k1 k2. (k2 -> *) -> (k1 -> k2) -> k1 -> *- Mk :: forall k1 k2 (f :: k2 -> *) (g :: k1 -> k2) (a :: k1).- f (g a) -> Compose k1 k2 f g a--Now, in another module, we have -XNoPolyKinds -XDataKinds in effect.-What does 'Mk mean? Pre GHC-8.0 with -XNoPolyKinds,-we just defaulted all kind variables to *. But that's no good here,-because the kind variables in 'Mk aren't of kind *, so defaulting to *-is ill-kinded.--After some debate on #11334, we decided to issue an error in this case.-The code is in defaultKindVar.--Note [What is a meta variable?]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-A "meta type-variable", also know as a "unification variable" is a placeholder-introduced by the typechecker for an as-yet-unknown monotype.--For example, when we see a call `reverse (f xs)`, we know that we calling- reverse :: forall a. [a] -> [a]-So we know that the argument `f xs` must be a "list of something". But what is-the "something"? We don't know until we explore the `f xs` a bit more. So we set-out what we do know at the call of `reverse` by instantiating its type with a fresh-meta tyvar, `alpha` say. So now the type of the argument `f xs`, and of the-result, is `[alpha]`. The unification variable `alpha` stands for the-as-yet-unknown type of the elements of the list.--As type inference progresses we may learn more about `alpha`. For example, suppose-`f` has the type- f :: forall b. b -> [Maybe b]-Then we instantiate `f`'s type with another fresh unification variable, say-`beta`; and equate `f`'s result type with reverse's argument type, thus-`[alpha] ~ [Maybe beta]`.--Now we can solve this equality to learn that `alpha ~ Maybe beta`, so we've-refined our knowledge about `alpha`. And so on.--If you found this Note useful, you may also want to have a look at-Section 5 of "Practical type inference for higher rank types" (Peyton Jones,-Vytiniotis, Weirich and Shields. J. Functional Programming. 2011).--Note [What is zonking?]-~~~~~~~~~~~~~~~~~~~~~~~-GHC relies heavily on mutability in the typechecker for efficient operation.-For this reason, throughout much of the type checking process meta type-variables (the MetaTv constructor of TcTyVarDetails) are represented by mutable-variables (known as TcRefs).--Zonking is the process of ripping out these mutable variables and replacing them-with a real Type. This involves traversing the entire type expression, but the-interesting part of replacing the mutable variables occurs in zonkTyVarOcc.--There are two ways to zonk a Type:-- * zonkTcTypeToType, which is intended to be used at the end of type-checking- for the final zonk. It has to deal with unfilled metavars, either by filling- it with a value like Any or failing (determined by the UnboundTyVarZonker- used).-- * zonkTcType, which will happily ignore unfilled metavars. This is the- appropriate function to use while in the middle of type-checking.--Note [Zonking to Skolem]-~~~~~~~~~~~~~~~~~~~~~~~~-We used to zonk quantified type variables to regular TyVars. However, this-leads to problems. Consider this program from the regression test suite:-- eval :: Int -> String -> String -> String- eval 0 root actual = evalRHS 0 root actual-- evalRHS :: Int -> a- evalRHS 0 root actual = eval 0 root actual--It leads to the deferral of an equality (wrapped in an implication constraint)-- forall a. () => ((String -> String -> String) ~ a)--which is propagated up to the toplevel (see GHC.Tc.Solver.tcSimplifyInferCheck).-In the meantime `a' is zonked and quantified to form `evalRHS's signature.-This has the *side effect* of also zonking the `a' in the deferred equality-(which at this point is being handed around wrapped in an implication-constraint).--Finally, the equality (with the zonked `a') will be handed back to the-simplifier by GHC.Tc.Module.tcRnSrcDecls calling GHC.Tc.Solver.tcSimplifyTop.-If we zonk `a' with a regular type variable, we will have this regular type-variable now floating around in the simplifier, which in many places assumes to-only see proper TcTyVars.--We can avoid this problem by zonking with a skolem TcTyVar. The-skolem is rigid (which we require for a quantified variable), but is-still a TcTyVar that the simplifier knows how to deal with.--Note [Skolemising and identity]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In some places, we make a TyVarTv for a binder. E.g.- class C a where ...-As Note [Inferring kinds for type declarations] discusses,-we make a TyVarTv for 'a'. Later we skolemise it, and we'd-like to retain its identity, location info etc. (If we don't-retain its identity we'll have to do some pointless swizzling;-see GHC.Tc.TyCl.swizzleTcTyConBndrs. If we retain its identity-but not its location we'll lose the detailed binding site info.--Conclusion: use the Name of the TyVarTv. But we don't want-to do that when skolemising random unification variables;-there the location we want is the skolemisation site.--Fortunately we can tell the difference: random unification-variables have System Names. That's why final_name is-set based on the isSystemName test.---Note [Silly Type Synonyms]-~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this:- type C u a = u -- Note 'a' unused-- foo :: (forall a. C u a -> C u a) -> u- foo x = ...-- bar :: Num u => u- bar = foo (\t -> t + t)--* From the (\t -> t+t) we get type {Num d} => d -> d- where d is fresh.--* Now unify with type of foo's arg, and we get:- {Num (C d a)} => C d a -> C d a- where a is fresh.--* Now abstract over the 'a', but float out the Num (C d a) constraint- because it does not 'really' mention a. (see exactTyVarsOfType)- The arg to foo becomes- \/\a -> \t -> t+t--* So we get a dict binding for Num (C d a), which is zonked to give- a = ()- Note (Sept 04): now that we are zonking quantified type variables- on construction, the 'a' will be frozen as a regular tyvar on- quantification, so the floated dict will still have type (C d a).- Which renders this whole note moot; happily!]--* Then the \/\a abstraction has a zonked 'a' in it.--All very silly. I think its harmless to ignore the problem. We'll end up with-a \/\a in the final result but all the occurrences of a will be zonked to ()--}--{- *********************************************************************-* *- Promotion-* *-********************************************************************* -}--promoteMetaTyVarTo :: HasDebugCallStack => TcLevel -> TcTyVar -> TcM Bool--- When we float a constraint out of an implication we must restore--- invariant (WantedInv) in Note [TcLevel invariants] in GHC.Tc.Utils.TcType--- Return True <=> we did some promotion--- Also returns either the original tyvar (no promotion) or the new one--- See Note [Promoting unification variables]-promoteMetaTyVarTo tclvl tv- | assertPpr (isMetaTyVar tv) (ppr tv) $- tcTyVarLevel tv `strictlyDeeperThan` tclvl- = do { cloned_tv <- cloneMetaTyVar tv- ; let rhs_tv = setMetaTyVarTcLevel cloned_tv tclvl- ; writeMetaTyVar tv (mkTyVarTy rhs_tv)- ; traceTc "promoteTyVar" (ppr tv <+> text "-->" <+> ppr rhs_tv)- ; return True }- | otherwise- = return False---- Returns whether or not *any* tyvar is defaulted-promoteTyVarSet :: HasDebugCallStack => TcTyVarSet -> TcM Bool-promoteTyVarSet tvs- = do { tclvl <- getTcLevel- ; bools <- mapM (promoteMetaTyVarTo tclvl) $- filter isPromotableMetaTyVar $- nonDetEltsUniqSet tvs- -- Non-determinism is OK because order of promotion doesn't matter- ; return (or bools) }---{- *********************************************************************-* *- Zonking types-* *-********************************************************************* -}--zonkTcTypeAndFV :: TcType -> TcM DTyCoVarSet--- Zonk a type and take its free variables--- With kind polymorphism it can be essential to zonk *first*--- so that we find the right set of free variables. Eg--- forall k1. forall (a:k2). a--- where k2:=k1 is in the substitution. We don't want--- k2 to look free in this type!-zonkTcTypeAndFV ty- = tyCoVarsOfTypeDSet <$> zonkTcType ty--zonkTyCoVar :: TyCoVar -> TcM TcType--- Works on TyVars and TcTyVars-zonkTyCoVar tv | isTcTyVar tv = zonkTcTyVar tv- | isTyVar tv = mkTyVarTy <$> zonkTyCoVarKind tv- | otherwise = assertPpr (isCoVar tv) (ppr tv) $- mkCoercionTy . mkCoVarCo <$> zonkTyCoVarKind tv- -- Hackily, when typechecking type and class decls- -- we have TyVars in scope added (only) in- -- GHC.Tc.Gen.HsType.bindTyClTyVars, but it seems- -- painful to make them into TcTyVars there--zonkTyCoVarsAndFV :: TyCoVarSet -> TcM TyCoVarSet-zonkTyCoVarsAndFV tycovars- = tyCoVarsOfTypes <$> mapM zonkTyCoVar (nonDetEltsUniqSet tycovars)- -- It's OK to use nonDetEltsUniqSet here because we immediately forget about- -- the ordering by turning it into a nondeterministic set and the order- -- of zonking doesn't matter for determinism.--zonkDTyCoVarSetAndFV :: DTyCoVarSet -> TcM DTyCoVarSet-zonkDTyCoVarSetAndFV tycovars- = mkDVarSet <$> (zonkTyCoVarsAndFVList $ dVarSetElems tycovars)---- Takes a list of TyCoVars, zonks them and returns a--- deterministically ordered list of their free variables.-zonkTyCoVarsAndFVList :: [TyCoVar] -> TcM [TyCoVar]-zonkTyCoVarsAndFVList tycovars- = tyCoVarsOfTypesList <$> mapM zonkTyCoVar tycovars--zonkTcTyVars :: [TcTyVar] -> TcM [TcType]-zonkTcTyVars tyvars = mapM zonkTcTyVar tyvars------------------- Types-zonkTyCoVarKind :: TyCoVar -> TcM TyCoVar-zonkTyCoVarKind tv = do { kind' <- zonkTcType (tyVarKind tv)- ; return (setTyVarKind tv kind') }--{--************************************************************************-* *- Zonking constraints-* *-************************************************************************--}--zonkImplication :: Implication -> TcM Implication-zonkImplication implic@(Implic { ic_skols = skols- , ic_given = given- , ic_wanted = wanted- , ic_info = info })- = do { skols' <- mapM zonkTyCoVarKind skols -- Need to zonk their kinds!- -- as #7230 showed- ; given' <- mapM zonkEvVar given- ; info' <- zonkSkolemInfoAnon info- ; wanted' <- zonkWCRec wanted- ; return (implic { ic_skols = skols'- , ic_given = given'- , ic_wanted = wanted'- , ic_info = info' }) }--zonkEvVar :: EvVar -> TcM EvVar-zonkEvVar var = updateIdTypeAndMultM zonkTcType var---zonkWC :: WantedConstraints -> TcM WantedConstraints-zonkWC wc = zonkWCRec wc--zonkWCRec :: WantedConstraints -> TcM WantedConstraints-zonkWCRec (WC { wc_simple = simple, wc_impl = implic, wc_errors = errs })- = do { simple' <- zonkSimples simple- ; implic' <- mapBagM zonkImplication implic- ; errs' <- mapBagM zonkDelayedError errs- ; return (WC { wc_simple = simple', wc_impl = implic', wc_errors = errs' }) }--zonkSimples :: Cts -> TcM Cts-zonkSimples cts = do { cts' <- mapBagM zonkCt cts- ; traceTc "zonkSimples done:" (ppr cts')- ; return cts' }--zonkDelayedError :: DelayedError -> TcM DelayedError-zonkDelayedError (DE_Hole hole)- = DE_Hole <$> zonkHole hole-zonkDelayedError (DE_NotConcrete err)- = DE_NotConcrete <$> zonkNotConcreteError err--zonkHole :: Hole -> TcM Hole-zonkHole hole@(Hole { hole_ty = ty })- = do { ty' <- zonkTcType ty- ; return (hole { hole_ty = ty' }) }--zonkNotConcreteError :: NotConcreteError -> TcM NotConcreteError-zonkNotConcreteError err@(NCE_FRR { nce_frr_origin = frr_orig })- = do { frr_orig <- zonkFRROrigin frr_orig- ; return $ err { nce_frr_origin = frr_orig } }--zonkFRROrigin :: FixedRuntimeRepOrigin -> TcM FixedRuntimeRepOrigin-zonkFRROrigin (FixedRuntimeRepOrigin ty orig)- = do { ty' <- zonkTcType ty- ; return $ FixedRuntimeRepOrigin ty' orig }--{- Note [zonkCt behaviour]-~~~~~~~~~~~~~~~~~~~~~~~~~~-zonkCt tries to maintain the canonical form of a Ct. For example,- - a CDictCan should stay a CDictCan;- - a CIrredCan should stay a CIrredCan with its cc_reason flag intact--Why?, for example:-- For CDictCan, the @GHC.Tc.Solver.expandSuperClasses@ step, which runs after the- simple wanted and plugin loop, looks for @CDictCan@s. If a plugin is in use,- constraints are zonked before being passed to the plugin. This means if we- don't preserve a canonical form, @expandSuperClasses@ fails to expand- superclasses. This is what happened in #11525.--- For CIrredCan we want to see if a constraint is insoluble with insolubleWC--On the other hand, we change CEqCan to CNonCanonical, because of all of-CEqCan's invariants, which can break during zonking. (Example: a ~R alpha, where-we have alpha := N Int, where N is a newtype.) Besides, the constraint-will be canonicalised again, so there is little benefit in keeping the-CEqCan structure.--NB: Constraints are always rewritten etc by the canonicaliser in-@GHC.Tc.Solver.Canonical@ even if they come in as CDictCan. Only canonical constraints that-are actually in the inert set carry all the guarantees. So it is okay if zonkCt-creates e.g. a CDictCan where the cc_tyars are /not/ fully reduced.--}--zonkCt :: Ct -> TcM Ct--- See Note [zonkCt behaviour]-zonkCt ct@(CDictCan { cc_ev = ev, cc_tyargs = args })- = do { ev' <- zonkCtEvidence ev- ; args' <- mapM zonkTcType args- ; return $ ct { cc_ev = ev', cc_tyargs = args' } }--zonkCt (CEqCan { cc_ev = ev })- = mkNonCanonical <$> zonkCtEvidence ev--zonkCt ct@(CIrredCan { cc_ev = ev }) -- Preserve the cc_reason flag- = do { ev' <- zonkCtEvidence ev- ; return (ct { cc_ev = ev' }) }--zonkCt ct- = do { fl' <- zonkCtEvidence (ctEvidence ct)- ; return (mkNonCanonical fl') }--zonkCtEvidence :: CtEvidence -> TcM CtEvidence-zonkCtEvidence ctev- = do { pred' <- zonkTcType (ctev_pred ctev)- ; return (setCtEvPredType ctev pred')- }--zonkSkolemInfo :: SkolemInfo -> TcM SkolemInfo-zonkSkolemInfo (SkolemInfo u sk) = SkolemInfo u <$> zonkSkolemInfoAnon sk--zonkSkolemInfoAnon :: SkolemInfoAnon -> TcM SkolemInfoAnon-zonkSkolemInfoAnon (SigSkol cx ty tv_prs) = do { ty' <- zonkTcType ty- ; return (SigSkol cx ty' tv_prs) }-zonkSkolemInfoAnon (InferSkol ntys) = do { ntys' <- mapM do_one ntys- ; return (InferSkol ntys') }- where- do_one (n, ty) = do { ty' <- zonkTcType ty; return (n, ty') }-zonkSkolemInfoAnon skol_info = return skol_info--{--************************************************************************-* *- Zonking -- the main work-horses: zonkTcType, zonkTcTyVar-* *-************************************************************************--}---- 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-zonkTcType :: TcType -> TcM TcType-zonkTcTypes :: [TcType] -> TcM [TcType]-zonkCo :: Coercion -> TcM Coercion--(zonkTcType, zonkTcTypes, zonkCo, _)- = mapTyCo zonkTcTypeMapper---- | A suitable TyCoMapper for zonking a type during type-checking,--- before all metavars are filled in.-zonkTcTypeMapper :: TyCoMapper () TcM-zonkTcTypeMapper = TyCoMapper- { tcm_tyvar = const zonkTcTyVar- , tcm_covar = const (\cv -> mkCoVarCo <$> zonkTyCoVarKind cv)- , tcm_hole = hole- , tcm_tycobinder = \_env tv _vis -> ((), ) <$> zonkTyCoVarKind tv- , tcm_tycon = zonkTcTyCon }- where- hole :: () -> CoercionHole -> TcM Coercion- hole _ hole@(CoercionHole { ch_ref = ref, ch_co_var = cv })- = do { contents <- readTcRef ref- ; case contents of- Just co -> do { co' <- zonkCo co- ; checkCoercionHole cv co' }- Nothing -> do { cv' <- zonkCoVar cv- ; return $ HoleCo (hole { ch_co_var = cv' }) } }--zonkTcTyCon :: TcTyCon -> TcM TcTyCon--- Only called on TcTyCons--- A non-poly TcTyCon may have unification--- variables that need zonking, but poly ones cannot-zonkTcTyCon tc- | isMonoTcTyCon tc = do { tck' <- zonkTcType (tyConKind tc)- ; return (setTcTyConKind tc tck') }- | otherwise = return tc--zonkTcTyVar :: TcTyVar -> TcM TcType--- Simply look through all Flexis-zonkTcTyVar tv- | isTcTyVar tv- = case tcTyVarDetails tv of- SkolemTv {} -> zonk_kind_and_return- RuntimeUnk {} -> zonk_kind_and_return- MetaTv { mtv_ref = ref }- -> do { cts <- readMutVar ref- ; case cts of- Flexi -> zonk_kind_and_return- Indirect ty -> do { zty <- zonkTcType ty- ; writeTcRef ref (Indirect zty)- -- See Note [Sharing in zonking]- ; return zty } }-- | otherwise -- coercion variable- = zonk_kind_and_return- where- zonk_kind_and_return = do { z_tv <- zonkTyCoVarKind tv- ; return (mkTyVarTy z_tv) }---- Variant that assumes that any result of zonking is still a TyVar.--- Should be used only on skolems and TyVarTvs-zonkTcTyVarsToTcTyVars :: HasDebugCallStack => [TcTyVar] -> TcM [TcTyVar]-zonkTcTyVarsToTcTyVars = mapM zonkTcTyVarToTcTyVar--zonkTcTyVarToTcTyVar :: HasDebugCallStack => TcTyVar -> TcM TcTyVar-zonkTcTyVarToTcTyVar tv- = do { ty <- zonkTcTyVar tv- ; let tv' = case getTyVar_maybe ty of- Just tv' -> tv'- Nothing -> pprPanic "zonkTcTyVarToTcTyVar"- (ppr tv $$ ppr ty)- ; return tv' }--zonkInvisTVBinder :: VarBndr TcTyVar spec -> TcM (VarBndr TcTyVar spec)-zonkInvisTVBinder (Bndr tv spec) = do { tv' <- zonkTcTyVarToTcTyVar tv- ; return (Bndr tv' spec) }---- zonkId is used *during* typechecking just to zonk the Id's type-zonkId :: TcId -> TcM TcId-zonkId id = Id.updateIdTypeAndMultM zonkTcType id--zonkCoVar :: CoVar -> TcM CoVar-zonkCoVar = zonkId--{- Note [Sharing in zonking]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have- alpha :-> beta :-> gamma :-> ty-where the ":->" means that the unification variable has been-filled in with Indirect. Then when zonking alpha, it'd be nice-to short-circuit beta too, so we end up with- alpha :-> zty- beta :-> zty- gamma :-> zty-where zty is the zonked version of ty. That way, if we come across-beta later, we'll have less work to do. (And indeed the same for-alpha.)--This is easily achieved: just overwrite (Indirect ty) with (Indirect-zty). Non-systematic perf comparisons suggest that this is a modest-win.--But c.f Note [Sharing when zonking to Type] in GHC.Tc.Utils.Zonk.--%************************************************************************-%* *- Tidying-* *-************************************************************************--}--zonkTidyTcType :: TidyEnv -> TcType -> TcM (TidyEnv, TcType)-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 <- zonkSkolemInfoAnon skol_info- ; let skol_info2 = tidySkolemInfoAnon env skol_info1- ; return (env, GivenOrigin skol_info2) }-zonkTidyOrigin env (GivenSCOrigin skol_info sc_depth blocked)- = do { skol_info1 <- zonkSkolemInfoAnon skol_info- ; let skol_info2 = tidySkolemInfoAnon env skol_info1- ; return (env, GivenSCOrigin skol_info2 sc_depth blocked) }-zonkTidyOrigin env orig@(TypeEqOrigin { uo_actual = act- , uo_expected = exp })- = do { (env1, act') <- zonkTidyTcType env act- ; (env2, exp') <- zonkTidyTcType env1 exp- ; return ( env2, orig { uo_actual = act'- , uo_expected = exp' }) }-zonkTidyOrigin env (KindEqOrigin ty1 ty2 orig t_or_k)- = do { (env1, ty1') <- zonkTidyTcType env ty1- ; (env2, ty2') <- zonkTidyTcType env1 ty2- ; (env3, orig') <- zonkTidyOrigin env2 orig- ; return (env3, KindEqOrigin ty1' ty2' orig' t_or_k) }-zonkTidyOrigin env (FunDepOrigin1 p1 o1 l1 p2 o2 l2)- = do { (env1, p1') <- zonkTidyTcType env p1- ; (env2, o1') <- zonkTidyOrigin env1 o1- ; (env3, p2') <- zonkTidyTcType env2 p2- ; (env4, o2') <- zonkTidyOrigin env3 o2- ; return (env4, FunDepOrigin1 p1' o1' l1 p2' o2' l2) }-zonkTidyOrigin env (FunDepOrigin2 p1 o1 p2 l2)- = do { (env1, p1') <- zonkTidyTcType env p1- ; (env2, p2') <- zonkTidyTcType env1 p2- ; (env3, o1') <- zonkTidyOrigin env2 o1- ; return (env3, FunDepOrigin2 p1' o1' p2' l2) }-zonkTidyOrigin env (InjTFOrigin1 pred1 orig1 loc1 pred2 orig2 loc2)- = do { (env1, pred1') <- zonkTidyTcType env pred1- ; (env2, orig1') <- zonkTidyOrigin env1 orig1- ; (env3, pred2') <- zonkTidyTcType env2 pred2- ; (env4, orig2') <- zonkTidyOrigin env3 orig2- ; return (env4, InjTFOrigin1 pred1' orig1' loc1 pred2' orig2' loc2) }-zonkTidyOrigin env (CycleBreakerOrigin orig)- = do { (env1, orig') <- zonkTidyOrigin env orig- ; return (env1, CycleBreakerOrigin orig') }-zonkTidyOrigin env (InstProvidedOrigin mod cls_inst)- = do { (env1, is_tys') <- mapAccumLM zonkTidyTcType env (is_tys cls_inst)- ; return (env1, InstProvidedOrigin mod (cls_inst {is_tys = is_tys'})) }-zonkTidyOrigin env (WantedSuperclassOrigin pty orig)- = do { (env1, pty') <- zonkTidyTcType env pty- ; (env2, orig') <- zonkTidyOrigin env1 orig- ; return (env2, WantedSuperclassOrigin pty' orig') }-zonkTidyOrigin env orig = return (env, orig)--zonkTidyOrigins :: TidyEnv -> [CtOrigin] -> TcM (TidyEnv, [CtOrigin])-zonkTidyOrigins = mapAccumLM zonkTidyOrigin--zonkTidyFRRInfos :: TidyEnv- -> [FixedRuntimeRepErrorInfo]- -> TcM (TidyEnv, [FixedRuntimeRepErrorInfo])-zonkTidyFRRInfos = go []- where- go zs env [] = return (env, reverse zs)- go zs env (FRR_Info { frr_info_origin = FixedRuntimeRepOrigin ty orig- , frr_info_not_concrete = mb_not_conc } : tys)- = do { (env, ty) <- zonkTidyTcType env ty- ; (env, mb_not_conc) <- go_mb_not_conc env mb_not_conc- ; let info = FRR_Info { frr_info_origin = FixedRuntimeRepOrigin ty orig- , frr_info_not_concrete = mb_not_conc }- ; go (info:zs) env tys }-- go_mb_not_conc env Nothing = return (env, Nothing)- go_mb_not_conc env (Just (tv, ty))- = do { (env, tv) <- return $ tidyOpenTyCoVar env tv- ; (env, ty) <- zonkTidyTcType env ty- ; return (env, Just (tv, ty)) }-------------------tidyCt :: TidyEnv -> Ct -> Ct--- Used only in error reporting-tidyCt env ct = ct { cc_ev = tidyCtEvidence env (ctEvidence ct) }--tidyCtEvidence :: TidyEnv -> CtEvidence -> CtEvidence- -- NB: we do not tidy the ctev_evar field because we don't- -- show it in error messages-tidyCtEvidence env ctev = ctev { ctev_pred = tidyType env ty }- where- ty = ctev_pred ctev--tidyHole :: TidyEnv -> Hole -> Hole-tidyHole env h@(Hole { hole_ty = ty }) = h { hole_ty = tidyType env ty }--tidyDelayedError :: TidyEnv -> DelayedError -> DelayedError-tidyDelayedError env (DE_Hole hole)- = DE_Hole $ tidyHole env hole-tidyDelayedError env (DE_NotConcrete err)- = DE_NotConcrete $ tidyConcreteError env err--tidyConcreteError :: TidyEnv -> NotConcreteError -> NotConcreteError-tidyConcreteError env err@(NCE_FRR { nce_frr_origin = frr_orig })- = err { nce_frr_origin = tidyFRROrigin env frr_orig }--tidyFRROrigin :: TidyEnv -> FixedRuntimeRepOrigin -> FixedRuntimeRepOrigin-tidyFRROrigin env (FixedRuntimeRepOrigin ty orig)- = FixedRuntimeRepOrigin (tidyType env ty) orig-------------------tidyEvVar :: TidyEnv -> EvVar -> EvVar-tidyEvVar env var = updateIdTypeAndMult (tidyType env) var-----------------------------------------------------------------------------{--%************************************************************************-%* *- Representation polymorphism checks-* *-***********************************************************************-}---- | Check that the specified type has a fixed runtime representation.------ If it isn't, throw a representation-polymorphism error appropriate--- for the context (as specified by the 'FixedRuntimeRepProvenance').------ Unlike the other representation polymorphism checks, which can emit--- new Wanted constraints to be solved by the constraint solver, this function--- does not emit any constraints: it has enough information to immediately--- make a decision.------ See (1) in Note [Representation polymorphism checking] in GHC.Tc.Utils.Concrete-checkTypeHasFixedRuntimeRep :: FixedRuntimeRepProvenance -> Type -> TcM ()-checkTypeHasFixedRuntimeRep prov ty =- unless (typeHasFixedRuntimeRep ty)- (addDetailedDiagnostic $ TcRnTypeDoesNotHaveFixedRuntimeRep ty prov)--{--%************************************************************************-%* *- Error messages-* *-*************************************************************************---}---- See Note [Naughty quantification candidates]-naughtyQuantification :: TcType -- original type user wanted to quantify- -> TcTyVar -- naughty var- -> TyVarSet -- skolems that would escape- -> TcM a-naughtyQuantification orig_ty tv escapees- = do { orig_ty1 <- zonkTcType orig_ty -- in case it's not zonked-- ; escapees' <- zonkTcTyVarsToTcTyVars $- nonDetEltsUniqSet escapees- -- we'll just be printing, so no harmful non-determinism-- ; let fvs = tyCoVarsOfTypeWellScoped orig_ty1- env0 = tidyFreeTyCoVars emptyTidyEnv fvs- env = env0 `delTidyEnvList` escapees'- -- this avoids gratuitous renaming of the escaped- -- variables; very confusing to users!-- orig_ty' = tidyType env orig_ty1- ppr_tidied = pprTyVars . map (tidyTyCoVarOcc env)- msg = mkTcRnUnknownMessage $ mkPlainError noHints $- pprWithExplicitKindsWhen True $- vcat [ sep [ text "Cannot generalise type; skolem" <> plural escapees'- , quotes $ ppr_tidied escapees'- , text "would escape" <+> itsOrTheir escapees' <+> text "scope"- ]- , sep [ text "if I tried to quantify"- , ppr_tidied [tv]- , text "in this type:"- ]- , nest 2 (pprTidiedType orig_ty')- , text "(Indeed, I sometimes struggle even printing this correctly,"- , text " due to its ill-scoped nature.)"- ]-- ; failWithTcM (env, msg) }--{--************************************************************************-* *- Checking for coercion holes-* *-************************************************************************--}---- | Check whether any coercion hole in a RewriterSet is still unsolved.--- Does this by recursively looking through filled coercion holes until--- one is found that is not yet filled in, at which point this aborts.-anyUnfilledCoercionHoles :: RewriterSet -> TcM Bool-anyUnfilledCoercionHoles (RewriterSet set)- = nonDetStrictFoldUniqSet go (return False) set- -- this does not introduce non-determinism, because the only- -- monadic action is to read, and the combining function is- -- commutative- where- go :: CoercionHole -> TcM Bool -> TcM Bool- go hole m_acc = m_acc <||> check_hole hole-- check_hole :: CoercionHole -> TcM Bool- check_hole hole = do { m_co <- unpackCoercionHole_maybe hole- ; case m_co of- Nothing -> return True -- unfilled hole- Just co -> unUCHM (check_co co) }-- check_ty :: Type -> UnfilledCoercionHoleMonoid- check_co :: Coercion -> UnfilledCoercionHoleMonoid- (check_ty, _, check_co, _) = foldTyCo folder ()-- folder :: TyCoFolder () UnfilledCoercionHoleMonoid- folder = TyCoFolder { tcf_view = noView- , tcf_tyvar = \ _ tv -> check_ty (tyVarKind tv)- , tcf_covar = \ _ cv -> check_ty (varType cv)- , tcf_hole = \ _ -> UCHM . check_hole- , tcf_tycobinder = \ _ _ _ -> () }--newtype UnfilledCoercionHoleMonoid = UCHM { unUCHM :: TcM Bool }--instance Semigroup UnfilledCoercionHoleMonoid where- UCHM l <> UCHM r = UCHM (l <||> r)--instance Monoid UnfilledCoercionHoleMonoid where- mempty = UCHM (return False)+ newMetaKindVar, newMetaKindVars,+ newMetaTyVarTyAtLevel, newConcreteTyVarTyAtLevel,+ newAnonMetaTyVar, newConcreteTyVar,+ cloneMetaTyVar, cloneMetaTyVarWithInfo,+ newCycleBreakerTyVar,++ newMultiplicityVar,+ readMetaTyVar, writeMetaTyVar, writeMetaTyVarRef,+ newTauTvDetailsAtLevel, newMetaDetails, newMetaTyVarName,+ isFilledMetaTyVar_maybe, isFilledMetaTyVar, isUnfilledMetaTyVar,++ --------------------------------+ -- Creating new evidence variables+ newEvVar, newEvVars, newDict,+ newWantedWithLoc, newWanted, newWanteds, cloneWanted, cloneWC, cloneWantedCtEv,+ emitWanted, emitWantedEq, emitWantedEvVar, emitWantedEvVars,+ emitWantedEqs,+ newTcEvBinds, newNoTcEvBinds, addTcEvBind,+ emitNewExprHole,++ newCoercionHole, newCoercionHoleO, newVanillaCoercionHole,+ fillCoercionHole, isFilledCoercionHole,+ unpackCoercionHole, unpackCoercionHole_maybe,+ checkCoercionHole,++ newImplication,++ --------------------------------+ -- Instantiation+ newMetaTyVars, newMetaTyVarX, newMetaTyVarsX,+ newMetaTyVarTyVarX,+ newTyVarTyVar, cloneTyVarTyVar,+ newPatSigTyVar, newSkolemTyVar, newWildCardX,++ --------------------------------+ -- Expected types+ ExpType(..), ExpSigmaType, ExpRhoType,+ mkCheckExpType, newInferExpType, newInferExpTypeFRR,+ tcInfer, tcInferFRR,+ readExpType, readExpType_maybe, readScaledExpType,+ expTypeToType, scaledExpTypeToType,+ checkingExpType_maybe, checkingExpType,+ inferResultToType, ensureMonoType, promoteTcType,++ --------------------------------+ -- Multiplicity usage environment+ tcCheckUsage,++ ---------------------------------+ -- Promotion, defaulting, skolemisation+ defaultTyVar, promoteMetaTyVarTo, promoteTyVarSet,+ quantifyTyVars, isQuantifiableTv,+ zonkAndSkolemise, skolemiseQuantifiedTyVar,+ doNotQuantifyTyVars,++ candidateQTyVarsOfType, candidateQTyVarsOfKind,+ candidateQTyVarsOfTypes, candidateQTyVarsOfKinds,+ candidateQTyVarsWithBinders,+ CandidatesQTvs(..), delCandidates,+ candidateKindVars, partitionCandidates,++ ------------------------------+ -- Representation polymorphism+ checkTypeHasFixedRuntimeRep,++ -- * Other HsSyn functions+ mkHsDictLet, mkHsApp,+ mkHsAppTy, mkHsCaseAlt,+ tcShortCutLit, shortCutLit, hsOverLitName,+ conLikeResTy+ ) where++import GHC.Prelude++import GHC.Hs+import GHC.Platform++import GHC.Driver.DynFlags+import qualified GHC.LanguageExtensions as LangExt++import {-# SOURCE #-} GHC.Tc.Utils.Unify( unifyInvisibleType, tcSubMult )+import GHC.Tc.Types.Origin+import GHC.Tc.Types.Constraint+import GHC.Tc.Types.Evidence+import GHC.Tc.Utils.Monad -- TcType, amongst others+import GHC.Tc.Utils.TcType+import GHC.Tc.Errors.Types+import GHC.Tc.Zonk.Type+import GHC.Tc.Zonk.TcType++import GHC.Builtin.Names++import GHC.Core.ConLike+import GHC.Core.DataCon+import GHC.Core.TyCo.Rep+import GHC.Core.TyCo.Ppr+import GHC.Core.Type+import GHC.Core.TyCon+import GHC.Core.Coercion+import GHC.Core.Class+import GHC.Core.Predicate+import GHC.Core.UsageEnv++import GHC.Types.Var+import GHC.Types.Id as Id+import GHC.Types.Name+import GHC.Types.SourceText+import GHC.Types.Var.Set++import GHC.Builtin.Types+import GHC.Types.Var.Env+import GHC.Types.Unique.Set+import GHC.Types.Basic ( TypeOrKind(..)+ , NonStandardDefaultingStrategy(..)+ , DefaultingStrategy(..), defaultNonStandardTyVars )++import GHC.Data.FastString+import GHC.Data.Bag++import GHC.Utils.Misc+import GHC.Utils.Outputable+import GHC.Utils.Panic+import GHC.Utils.Panic.Plain+import GHC.Utils.Constants (debugIsOn)++import Control.Monad+import Data.IORef+import GHC.Data.Maybe+import qualified Data.Semigroup as Semi+import GHC.Types.Name.Reader++{-+************************************************************************+* *+ Kind variables+* *+************************************************************************+-}++newMetaKindVar :: TcM TcKind+newMetaKindVar+ = do { details <- newMetaDetails TauTv+ ; name <- newMetaTyVarName (fsLit "k")+ -- All MetaKindVars are called "k"+ -- They may be jiggled by tidying+ ; let kv = mkTcTyVar name liftedTypeKind details+ ; traceTc "newMetaKindVar" (ppr kv)+ ; return (mkTyVarTy kv) }++newMetaKindVars :: Int -> TcM [TcKind]+newMetaKindVars n = replicateM n newMetaKindVar++{-+************************************************************************+* *+ Evidence variables; range over constraints we can abstract over+* *+************************************************************************+-}++newEvVars :: TcThetaType -> TcM [EvVar]+newEvVars theta = mapM newEvVar theta++--------------++newEvVar :: TcPredType -> TcRnIf gbl lcl EvVar+-- Creates new *rigid* variables for predicates+newEvVar ty = do { name <- newSysName (predTypeOccName ty)+ ; return (mkLocalIdOrCoVar name ManyTy ty) }++-- | Create a new Wanted constraint with the given 'CtLoc'.+newWantedWithLoc :: CtLoc -> PredType -> TcM CtEvidence+newWantedWithLoc loc pty+ = do dst <- case classifyPredType pty of+ EqPred {} -> HoleDest <$> newCoercionHole loc pty+ _ -> EvVarDest <$> newEvVar pty+ return $ CtWanted { ctev_dest = dst+ , ctev_pred = pty+ , ctev_loc = loc+ , ctev_rewriters = emptyRewriterSet }++-- | Create a new Wanted constraint with the given 'CtOrigin', and+-- location information taken from the 'TcM' environment.+newWanted :: CtOrigin -> Maybe TypeOrKind -> PredType -> TcM CtEvidence+-- Deals with both equality and non-equality predicates+newWanted orig t_or_k pty+ = do loc <- getCtLocM orig t_or_k+ newWantedWithLoc loc pty++-- | Create new Wanted constraints with the given 'CtOrigin',+-- and location information taken from the 'TcM' environment.+newWanteds :: CtOrigin -> ThetaType -> TcM [CtEvidence]+newWanteds orig = mapM (newWanted orig Nothing)++----------------------------------------------+-- Cloning constraints+----------------------------------------------++cloneWantedCtEv :: CtEvidence -> TcM CtEvidence+cloneWantedCtEv ctev@(CtWanted { ctev_pred = pty, ctev_dest = HoleDest _, ctev_loc = loc })+ | isEqPrimPred pty+ = do { co_hole <- newCoercionHole loc pty+ ; return (ctev { ctev_dest = HoleDest co_hole }) }+ | otherwise+ = pprPanic "cloneWantedCtEv" (ppr pty)+cloneWantedCtEv ctev = return ctev++cloneWanted :: Ct -> TcM Ct+cloneWanted ct = mkNonCanonical <$> cloneWantedCtEv (ctEvidence ct)++cloneWC :: WantedConstraints -> TcM WantedConstraints+-- Clone all the evidence bindings in+-- a) the ic_bind field of any implications+-- b) the CoercionHoles of any wanted constraints+-- so that solving the WantedConstraints will not have any visible side+-- effect, /except/ from causing unifications+cloneWC wc@(WC { wc_simple = simples, wc_impl = implics })+ = do { simples' <- mapBagM cloneWanted simples+ ; implics' <- mapBagM cloneImplication implics+ ; return (wc { wc_simple = simples', wc_impl = implics' }) }++cloneImplication :: Implication -> TcM Implication+cloneImplication implic@(Implic { ic_binds = binds, ic_wanted = inner_wanted })+ = do { binds' <- cloneEvBindsVar binds+ ; inner_wanted' <- cloneWC inner_wanted+ ; return (implic { ic_binds = binds', ic_wanted = inner_wanted' }) }++----------------------------------------------+-- Emitting constraints+----------------------------------------------++-- | Emits a new Wanted. Deals with both equalities and non-equalities.+emitWanted :: CtOrigin -> TcPredType -> TcM EvTerm+emitWanted origin pty+ = do { ev <- newWanted origin Nothing pty+ ; emitSimple $ mkNonCanonical ev+ ; return $ ctEvTerm ev }++emitWantedEqs :: CtOrigin -> [(TcType,TcType)] -> TcM ()+-- Emit some new wanted nominal equalities+emitWantedEqs origin pairs+ | null pairs+ = return ()+ | otherwise+ = mapM_ (uncurry (emitWantedEq origin TypeLevel Nominal)) pairs++-- | Emits a new equality constraint+emitWantedEq :: CtOrigin -> TypeOrKind -> Role -> TcType -> TcType -> TcM Coercion+emitWantedEq origin t_or_k role ty1 ty2+ = do { hole <- newCoercionHoleO origin pty+ ; loc <- getCtLocM origin (Just t_or_k)+ ; emitSimple $ mkNonCanonical $+ CtWanted { ctev_pred = pty+ , ctev_dest = HoleDest hole+ , ctev_loc = loc+ , ctev_rewriters = emptyRewriterSet }+ ; return (HoleCo hole) }+ where+ pty = mkPrimEqPredRole role ty1 ty2++-- | Creates a new EvVar and immediately emits it as a Wanted.+-- No equality predicates here.+emitWantedEvVar :: CtOrigin -> TcPredType -> TcM EvVar+emitWantedEvVar origin ty+ = do { new_cv <- newEvVar ty+ ; loc <- getCtLocM origin Nothing+ ; let ctev = CtWanted { ctev_pred = ty+ , ctev_dest = EvVarDest new_cv+ , ctev_loc = loc+ , ctev_rewriters = emptyRewriterSet }+ ; emitSimple $ mkNonCanonical ctev+ ; return new_cv }++emitWantedEvVars :: CtOrigin -> [TcPredType] -> TcM [EvVar]+emitWantedEvVars orig = mapM (emitWantedEvVar orig)++-- | Emit a new wanted expression hole+emitNewExprHole :: RdrName -- of the hole+ -> Type -> TcM HoleExprRef+emitNewExprHole occ ty+ = do { u <- newUnique+ ; ref <- newTcRef (pprPanic "unfilled unbound-variable evidence" (ppr u))+ ; let her = HER ref ty u++ ; loc <- getCtLocM (ExprHoleOrigin (Just occ)) (Just TypeLevel)++ ; let hole = Hole { hole_sort = ExprHole her+ , hole_occ = occ+ , hole_ty = ty+ , hole_loc = loc }+ ; emitHole hole+ ; return her }++newDict :: Class -> [TcType] -> TcM DictId+newDict cls tys+ = do { name <- newSysName (mkDictOcc (getOccName cls))+ ; return (mkLocalId name ManyTy (mkClassPred cls tys)) }++predTypeOccName :: PredType -> OccName+predTypeOccName ty = case classifyPredType ty of+ ClassPred cls _ -> mkDictOcc (getOccName cls)+ EqPred {} -> mkVarOccFS (fsLit "co")+ IrredPred {} -> mkVarOccFS (fsLit "irred")+ ForAllPred {} -> mkVarOccFS (fsLit "df")++-- | Create a new 'Implication' with as many sensible defaults for its fields+-- as possible. Note that the 'ic_tclvl', 'ic_binds', and 'ic_info' fields do+-- /not/ have sensible defaults, so they are initialized with lazy thunks that+-- will 'panic' if forced, so one should take care to initialize these fields+-- after creation.+--+-- This is monadic to look up the 'TcLclEnv', which is used to initialize+-- 'ic_env', and to set the -Winaccessible-code flag. See+-- Note [Avoid -Winaccessible-code when deriving] in "GHC.Tc.TyCl.Instance".+newImplication :: TcM Implication+newImplication+ = do env <- getLclEnv+ warn_inaccessible <- woptM Opt_WarnInaccessibleCode+ let in_gen_code = lclEnvInGeneratedCode env+ return $+ (implicationPrototype (mkCtLocEnv env))+ { ic_warn_inaccessible = warn_inaccessible && not in_gen_code }++{-+************************************************************************+* *+ Coercion holes+* *+************************************************************************+-}++newVanillaCoercionHole :: TcPredType -> TcM CoercionHole+newVanillaCoercionHole = new_coercion_hole False++newCoercionHole :: CtLoc -> TcPredType -> TcM CoercionHole+newCoercionHole loc = newCoercionHoleO (ctLocOrigin loc)++newCoercionHoleO :: CtOrigin -> TcPredType -> TcM CoercionHole+newCoercionHoleO (KindEqOrigin {}) = new_coercion_hole True+newCoercionHoleO _ = new_coercion_hole False++new_coercion_hole :: Bool -> TcPredType -> TcM CoercionHole+new_coercion_hole hetero_kind pred_ty+ = do { co_var <- newEvVar pred_ty+ ; traceTc "New coercion hole:" (ppr co_var <+> dcolon <+> ppr pred_ty)+ ; ref <- newMutVar Nothing+ ; return $ CoercionHole { ch_co_var = co_var, ch_ref = ref+ , ch_hetero_kind = hetero_kind } }++-- | Put a value in a coercion hole+fillCoercionHole :: CoercionHole -> Coercion -> TcM ()+fillCoercionHole (CoercionHole { ch_ref = ref, ch_co_var = cv }) co = do+ when debugIsOn $ do+ cts <- readTcRef ref+ whenIsJust cts $ \old_co ->+ pprPanic "Filling a filled coercion hole" (ppr cv $$ ppr co $$ ppr old_co)+ traceTc "Filling coercion hole" (ppr cv <+> text ":=" <+> ppr co)+ writeTcRef ref (Just co)+++{- **********************************************************************+*+ ExpType functions+*+********************************************************************** -}++{- Note [ExpType]+~~~~~~~~~~~~~~~~~+An ExpType is used as the "expected type" when type-checking an expression.+An ExpType can hold a "hole" that can be filled in by the type-checker.+This allows us to have one tcExpr that works in both checking mode and+synthesis mode (that is, bidirectional type-checking). Previously, this+was achieved by using ordinary unification variables, but we don't need+or want that generality. (For example, #11397 was caused by doing the+wrong thing with unification variables.) Instead, we observe that these+holes should++1. never be nested+2. never appear as the type of a variable+3. be used linearly (never be duplicated)++By defining ExpType, separately from Type, we can achieve goals 1 and 2+statically.++See also [wiki:typechecking]++Note [TcLevel of ExpType]+~~~~~~~~~~~~~~~~~~~~~~~~~+Consider++ data G a where+ MkG :: G Bool++ foo MkG = True++This is a classic untouchable-variable / ambiguous GADT return type+scenario. But, with ExpTypes, we'll be inferring the type of the RHS.+We thus must track a TcLevel in an Inferring ExpType. If we try to+fill the ExpType and find that the TcLevels don't work out, we fill+the ExpType with a tau-tv at the low TcLevel, hopefully to be worked+out later by some means -- see fillInferResult, and Note [fillInferResult]++This behaviour triggered in test gadt/gadt-escape1.++Note [FixedRuntimeRep context in ExpType]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Sometimes, we want to be sure that we fill an ExpType with a type+that has a syntactically fixed RuntimeRep (in the sense of+Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete).++Example:++ pattern S a = (a :: (T :: TYPE R))++We have to infer a type for `a` which has a syntactically fixed RuntimeRep.+When it comes time to filling in the inferred type, we do the appropriate+representation-polymorphism check, much like we do a level check+as explained in Note [TcLevel of ExpType].++See test case T21325.+-}++-- actual data definition is in GHC.Tc.Utils.TcType++newInferExpType :: TcM ExpType+newInferExpType = new_inferExpType Nothing++newInferExpTypeFRR :: FixedRuntimeRepContext -> TcM ExpTypeFRR+newInferExpTypeFRR frr_orig+ = do { th_stage <- getStage+ ; if+ -- See [Wrinkle: Typed Template Haskell]+ -- in Note [hasFixedRuntimeRep] in GHC.Tc.Utils.Concrete.+ | Brack _ (TcPending {}) <- th_stage+ -> new_inferExpType Nothing++ | otherwise+ -> new_inferExpType (Just frr_orig) }++new_inferExpType :: Maybe FixedRuntimeRepContext -> TcM ExpType+new_inferExpType mb_frr_orig+ = do { u <- newUnique+ ; tclvl <- getTcLevel+ ; traceTc "newInferExpType" (ppr u <+> ppr tclvl)+ ; ref <- newMutVar Nothing+ ; return (Infer (IR { ir_uniq = u, ir_lvl = tclvl+ , ir_ref = ref+ , ir_frr = mb_frr_orig })) }++-- | Extract a type out of an ExpType, if one exists. But one should always+-- exist. Unless you're quite sure you know what you're doing.+readExpType_maybe :: MonadIO m => ExpType -> m (Maybe TcType)+readExpType_maybe (Check ty) = return (Just ty)+readExpType_maybe (Infer (IR { ir_ref = ref})) = liftIO $ readIORef ref+{-# INLINEABLE readExpType_maybe #-}++-- | Same as readExpType, but for Scaled ExpTypes+readScaledExpType :: MonadIO m => Scaled ExpType -> m (Scaled Type)+readScaledExpType (Scaled m exp_ty)+ = do { ty <- readExpType exp_ty+ ; return (Scaled m ty) }+{-# INLINEABLE readScaledExpType #-}++-- | Extract a type out of an ExpType. Otherwise, panics.+readExpType :: MonadIO m => ExpType -> m TcType+readExpType exp_ty+ = do { mb_ty <- readExpType_maybe exp_ty+ ; case mb_ty of+ Just ty -> return ty+ Nothing -> pprPanic "Unknown expected type" (ppr exp_ty) }+{-# INLINEABLE readExpType #-}++scaledExpTypeToType :: Scaled ExpType -> TcM (Scaled TcType)+scaledExpTypeToType (Scaled m exp_ty)+ = do { ty <- expTypeToType exp_ty+ ; return (Scaled m ty) }++-- | Extracts the expected type if there is one, or generates a new+-- TauTv if there isn't.+expTypeToType :: ExpType -> TcM TcType+expTypeToType (Check ty) = return ty+expTypeToType (Infer inf_res) = inferResultToType inf_res++inferResultToType :: InferResult -> TcM Type+inferResultToType (IR { ir_uniq = u, ir_lvl = tc_lvl+ , ir_ref = ref+ , ir_frr = mb_frr })+ = do { mb_inferred_ty <- readTcRef ref+ ; tau <- case mb_inferred_ty of+ Just ty -> do { ensureMonoType ty+ -- See Note [inferResultToType]+ ; return ty }+ Nothing -> do { tau <- new_meta+ ; writeMutVar ref (Just tau)+ ; return tau }+ ; traceTc "Forcing ExpType to be monomorphic:"+ (ppr u <+> text ":=" <+> ppr tau)+ ; return tau }+ where+ -- See Note [TcLevel of ExpType]+ new_meta = case mb_frr of+ Nothing -> do { rr <- newMetaTyVarTyAtLevel tc_lvl runtimeRepTy+ ; newMetaTyVarTyAtLevel tc_lvl (mkTYPEapp rr) }+ Just frr -> mdo { rr <- newConcreteTyVarTyAtLevel conc_orig tc_lvl runtimeRepTy+ ; tau <- newMetaTyVarTyAtLevel tc_lvl (mkTYPEapp rr)+ ; let conc_orig = ConcreteFRR $ FixedRuntimeRepOrigin tau frr+ ; return tau }++{- Note [inferResultToType]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+expTypeToType and inferResultType convert an InferResult to a monotype.+It must be a monotype because if the InferResult isn't already filled in,+we fill it in with a unification variable (hence monotype). So to preserve+order-independence we check for mono-type-ness even if it *is* filled in+already.++See also Note [TcLevel of ExpType] above, and+Note [fillInferResult] in GHC.Tc.Utils.Unify.+-}++-- | Infer a type using a fresh ExpType+-- See also Note [ExpType] in "GHC.Tc.Utils.TcMType"+--+-- Use 'tcInferFRR' if you require the type to have a fixed+-- runtime representation.+tcInfer :: (ExpSigmaType -> TcM a) -> TcM (a, TcSigmaType)+tcInfer = tc_infer Nothing++-- | Like 'tcInfer', except it ensures that the resulting type+-- has a syntactically fixed RuntimeRep as per Note [Fixed RuntimeRep] in+-- GHC.Tc.Utils.Concrete.+tcInferFRR :: FixedRuntimeRepContext -> (ExpSigmaTypeFRR -> TcM a) -> TcM (a, TcSigmaTypeFRR)+tcInferFRR frr_orig = tc_infer (Just frr_orig)++tc_infer :: Maybe FixedRuntimeRepContext -> (ExpSigmaType -> TcM a) -> TcM (a, TcSigmaType)+tc_infer mb_frr tc_check+ = do { res_ty <- new_inferExpType mb_frr+ ; result <- tc_check res_ty+ ; res_ty <- readExpType res_ty+ ; return (result, res_ty) }++{- *********************************************************************+* *+ Promoting types+* *+********************************************************************* -}++ensureMonoType :: TcType -> TcM ()+-- Assuming that the argument type is of kind (TYPE r),+-- ensure that it is a /monotype/+-- If it is not a monotype we can see right away (since unification+-- variables and type-function applications stand for monotypes), but+-- we emit a Wanted equality just to delay the error message until later+ensureMonoType res_ty+ | isTauTy res_ty -- isTauTy doesn't need zonking or anything+ = return ()+ | otherwise+ = do { mono_ty <- newOpenFlexiTyVarTy+ ; _co <- unifyInvisibleType res_ty mono_ty+ ; return () }++promoteTcType :: TcLevel -> TcType -> TcM (TcCoercionN, TcType)+-- See Note [Promoting a type]+-- See also Note [fillInferResult]+-- promoteTcType level ty = (co, ty')+-- * Returns ty' whose max level is just 'level'+-- and whose kind is ~# to the kind of 'ty'+-- and whose kind has form TYPE rr+-- * and co :: ty ~ ty'+-- * and emits constraints to justify the coercion+--+-- NB: we expect that 'ty' has already kind (TYPE rr) for+-- some rr::RuntimeRep. It is, after all, the type of a term.+promoteTcType dest_lvl ty+ = do { cur_lvl <- getTcLevel+ ; if (cur_lvl `sameDepthAs` dest_lvl)+ then return (mkNomReflCo ty, ty)+ else promote_it }+ where+ promote_it :: TcM (TcCoercion, TcType)+ promote_it -- Emit a constraint (alpha :: TYPE rr) ~ ty+ -- where alpha and rr are fresh and from level dest_lvl+ = do { rr <- newMetaTyVarTyAtLevel dest_lvl runtimeRepTy+ ; prom_ty <- newMetaTyVarTyAtLevel dest_lvl (mkTYPEapp rr)+ ; co <- unifyInvisibleType ty prom_ty+ ; return (co, prom_ty) }++{- Note [Promoting a type]+~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (#12427)++ data T where+ MkT :: (Int -> Int) -> a -> T++ h y = case y of MkT v w -> v++We'll infer the RHS type with an expected type ExpType of+ (IR { ir_lvl = l, ir_ref = ref, ... )+where 'l' is the TcLevel of the RHS of 'h'. Then the MkT pattern+match will increase the level, so we'll end up in tcSubType, trying to+unify the type of v,+ v :: Int -> Int+with the expected type. But this attempt takes place at level (l+1),+rightly so, since v's type could have mentioned existential variables,+(like w's does) and we want to catch that.++So we+ - create a new meta-var alpha[l+1]+ - fill in the InferRes ref cell 'ref' with alpha+ - emit an equality constraint, thus+ [W] alpha[l+1] ~ (Int -> Int)++That constraint will float outwards, as it should, unless v's+type mentions a skolem-captured variable.++This approach fails if v has a higher rank type; see+Note [Promotion and higher rank types]+++Note [Promotion and higher rank types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If v had a higher-rank type, say v :: (forall a. a->a) -> Int,+then we'd emit an equality+ [W] alpha[l+1] ~ ((forall a. a->a) -> Int)+which will sadly fail because we can't unify a unification variable+with a polytype. But there is nothing really wrong with the program+here.++We could just about solve this by "promote the type" of v, to expose+its polymorphic "shape" while still leaving constraints that will+prevent existential escape. But we must be careful! Exposing+the "shape" of the type is precisely what we must NOT do under+a GADT pattern match! So in this case we might promote the type+to+ (forall a. a->a) -> alpha[l+1]+and emit the constraint+ [W] alpha[l+1] ~ Int+Now the promoted type can fill the ref cell, while the emitted+equality can float or not, according to the usual rules.++But that's not quite right! We are exposing the arrow! We could+deal with that too:+ (forall a. mu[l+1] a a) -> alpha[l+1]+with constraints+ [W] alpha[l+1] ~ Int+ [W] mu[l+1] ~ (->)+Here we abstract over the '->' inside the forall, in case that+is subject to an equality constraint from a GADT match.++Note that we kept the outer (->) because that's part of+the polymorphic "shape". And because of impredicativity,+GADT matches can't give equalities that affect polymorphic+shape.++This reasoning just seems too complicated, so I decided not+to do it. These higher-rank notes are just here to record+the thinking.+-}+++{- *********************************************************************+* *+ MetaTvs (meta type variables; mutable)+* *+********************************************************************* -}++{- Note [TyVarTv]+~~~~~~~~~~~~~~~~~+A TyVarTv can unify with type *variables* only, including other TyVarTvs and+skolems. They are used in two places:++1. In kind signatures, see GHC.Tc.TyCl+ Note [Inferring kinds for type declarations]+ and Note [Using TyVarTvs for kind-checking GADTs]++2. In partial type signatures. See GHC.Tc.Types+ Note [Quantified variables in partial type signatures]++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 TyVarTvs to unify with each+other or check that they don't. In the case of (1) the check is done+in GHC.Tc.TyCl.swizzleTcTyConBndrs. In case of (2) it's done by+findDupTyVarTvs in GHC.Tc.Gen.Bind.chooseInferredQuantifiers.++Historical note: Before #15050 this (under the name SigTv) was also+used for ScopedTypeVariables in patterns, to make sure these type+variables only refer to other type variables, but this restriction was+dropped, and ScopedTypeVariables can now refer to full types (GHC+Proposal 29).+-}++newMetaTyVarName :: FastString -> TcM Name+-- Makes a /System/ Name, which is eagerly eliminated by+-- the unifier; see GHC.Tc.Utils.Unify.nicer_to_update_tv1, and+-- GHC.Tc.Solver.Equality.canEqTyVarTyVar (nicer_to_update_tv2)+newMetaTyVarName str+ = newSysName (mkTyVarOccFS str)++cloneMetaTyVarName :: Name -> TcM Name+cloneMetaTyVarName name+ = newSysName (nameOccName name)+ -- See Note [Name of an instantiated type variable]++{- Note [Name of an instantiated type variable]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+At the moment we give a unification variable a System Name, which+influences the way it is tidied; see TypeRep.tidyTyVarBndr.+-}++metaInfoToTyVarName :: MetaInfo -> FastString+metaInfoToTyVarName meta_info =+ case meta_info of+ TauTv -> fsLit "t"+ TyVarTv -> fsLit "a"+ RuntimeUnkTv -> fsLit "r"+ CycleBreakerTv -> fsLit "b"+ ConcreteTv {} -> fsLit "c"++newAnonMetaTyVar :: MetaInfo -> Kind -> TcM TcTyVar+newAnonMetaTyVar mi = newNamedAnonMetaTyVar (metaInfoToTyVarName mi) mi++newNamedAnonMetaTyVar :: FastString -> MetaInfo -> Kind -> TcM TcTyVar+-- Make a new meta tyvar out of thin air+newNamedAnonMetaTyVar tyvar_name meta_info kind++ = do { name <- newMetaTyVarName tyvar_name+ ; details <- newMetaDetails meta_info+ ; let tyvar = mkTcTyVar name kind details+ ; traceTc "newAnonMetaTyVar" (ppr tyvar)+ ; return tyvar }++-- makes a new skolem tv+newSkolemTyVar :: SkolemInfo -> Name -> Kind -> TcM TcTyVar+newSkolemTyVar skol_info name kind+ = do { lvl <- getTcLevel+ ; return (mkTcTyVar name kind (SkolemTv skol_info lvl False)) }++newTyVarTyVar :: Name -> Kind -> TcM TcTyVar+-- See Note [TyVarTv]+-- Does not clone a fresh unique+newTyVarTyVar name kind+ = do { details <- newMetaDetails TyVarTv+ ; let tyvar = mkTcTyVar name kind details+ ; traceTc "newTyVarTyVar" (ppr tyvar)+ ; return tyvar }++cloneTyVarTyVar :: Name -> Kind -> TcM TcTyVar+-- See Note [TyVarTv]+-- Clones a fresh unique+cloneTyVarTyVar name kind+ = do { details <- newMetaDetails TyVarTv+ ; uniq <- newUnique+ ; let name' = name `setNameUnique` uniq+ tyvar = mkTcTyVar name' kind details+ -- Don't use cloneMetaTyVar, which makes a SystemName+ -- We want to keep the original more user-friendly Name+ -- In practical terms that means that in error messages,+ -- when the Name is tidied we get 'a' rather than 'a0'+ ; traceTc "cloneTyVarTyVar" (ppr tyvar)+ ; return tyvar }++-- | Create a new metavariable, of the given kind, which can only be unified+-- with a concrete type.+--+-- Invariant: the kind must be concrete, as per Note [ConcreteTv].+-- This is checked with an assertion.+newConcreteTyVar :: HasDebugCallStack => ConcreteTvOrigin+ -> FastString -> TcKind -> TcM TcTyVar+newConcreteTyVar reason fs kind+ = assertPpr (isConcreteType kind) assert_msg $+ newNamedAnonMetaTyVar fs (ConcreteTv reason) kind+ where+ assert_msg = text "newConcreteTyVar: non-concrete kind" <+> ppr kind++newPatSigTyVar :: Name -> Kind -> TcM TcTyVar+newPatSigTyVar name kind+ = do { details <- newMetaDetails TauTv+ ; uniq <- newUnique+ ; let name' = name `setNameUnique` uniq+ tyvar = mkTcTyVar name' kind details+ -- Don't use cloneMetaTyVar;+ -- same reasoning as in newTyVarTyVar+ ; traceTc "newPatSigTyVar" (ppr tyvar)+ ; return tyvar }++cloneAnonMetaTyVar :: MetaInfo -> TyVar -> TcKind -> TcM TcTyVar+-- Make a fresh MetaTyVar, basing the name+-- on that of the supplied TyVar+cloneAnonMetaTyVar info tv kind+ = do { details <- newMetaDetails info+ ; name <- cloneMetaTyVarName (tyVarName tv)+ ; let tyvar = mkTcTyVar name kind details+ ; traceTc "cloneAnonMetaTyVar" (ppr tyvar <+> dcolon <+> ppr (tyVarKind tyvar))+ ; return tyvar }++-- Make a new CycleBreakerTv. See Note [Type equality cycles]+-- in GHC.Tc.Solver.Equality+newCycleBreakerTyVar :: TcKind -> TcM TcTyVar+newCycleBreakerTyVar kind+ = do { details <- newMetaDetails CycleBreakerTv+ ; name <- newMetaTyVarName (fsLit "cbv")+ ; return (mkTcTyVar name kind details) }++newMetaDetails :: MetaInfo -> TcM TcTyVarDetails+newMetaDetails info+ = do { ref <- newMutVar Flexi+ ; tclvl <- getTcLevel+ ; return (MetaTv { mtv_info = info+ , mtv_ref = ref+ , mtv_tclvl = tclvl }) }++newTauTvDetailsAtLevel :: TcLevel -> TcM TcTyVarDetails+newTauTvDetailsAtLevel tclvl+ = do { ref <- newMutVar Flexi+ ; return (MetaTv { mtv_info = TauTv+ , mtv_ref = ref+ , mtv_tclvl = tclvl }) }++newConcreteTvDetailsAtLevel :: ConcreteTvOrigin -> TcLevel -> TcM TcTyVarDetails+newConcreteTvDetailsAtLevel conc_orig tclvl+ = do { ref <- newMutVar Flexi+ ; return (MetaTv { mtv_info = ConcreteTv conc_orig+ , mtv_ref = ref+ , mtv_tclvl = tclvl }) }++cloneMetaTyVar :: TcTyVar -> TcM TcTyVar+cloneMetaTyVar tv+ = assert (isTcTyVar tv) $+ do { ref <- newMutVar Flexi+ ; name' <- cloneMetaTyVarName (tyVarName tv)+ ; let details' = case tcTyVarDetails tv of+ details@(MetaTv {}) -> details { mtv_ref = ref }+ _ -> pprPanic "cloneMetaTyVar" (ppr tv)+ tyvar = mkTcTyVar name' (tyVarKind tv) details'+ ; traceTc "cloneMetaTyVar" (ppr tyvar)+ ; return tyvar }++cloneMetaTyVarWithInfo :: MetaInfo -> TcLevel -> TcTyVar -> TcM TcTyVar+cloneMetaTyVarWithInfo info tc_lvl tv+ = assert (isTcTyVar tv) $+ do { ref <- newMutVar Flexi+ ; name' <- cloneMetaTyVarName (tyVarName tv)+ ; let details = MetaTv { mtv_info = info+ , mtv_ref = ref+ , mtv_tclvl = tc_lvl }+ tyvar = mkTcTyVar name' (tyVarKind tv) details+ ; traceTc "cloneMetaTyVarWithInfo" (ppr tyvar)+ ; return tyvar }++-- Works for both type and kind variables+readMetaTyVar :: MonadIO m => TyVar -> m MetaDetails+readMetaTyVar tyvar = assertPpr (isMetaTyVar tyvar) (ppr tyvar) $+ liftIO $ readIORef (metaTyVarRef tyvar)+{-# SPECIALISE readMetaTyVar :: TyVar -> TcM MetaDetails #-}+{-# SPECIALISE readMetaTyVar :: TyVar -> ZonkM MetaDetails #-}++isFilledMetaTyVar_maybe :: TcTyVar -> TcM (Maybe Type)+isFilledMetaTyVar_maybe tv+-- TODO: This should be an assertion that tv is definitely a TcTyVar but it fails+-- at the moment (Jan 22)+ | isTcTyVar tv+ , MetaTv { mtv_ref = ref } <- tcTyVarDetails tv+ = do { cts <- readTcRef ref+ ; case cts of+ Indirect ty -> return (Just ty)+ Flexi -> return Nothing }+ | otherwise+ = return Nothing++isFilledMetaTyVar :: TyVar -> TcM Bool+-- True of a filled-in (Indirect) meta type variable+isFilledMetaTyVar tv = isJust <$> isFilledMetaTyVar_maybe tv++isUnfilledMetaTyVar :: TyVar -> TcM Bool+-- True of a un-filled-in (Flexi) meta type variable+-- NB: Not the opposite of isFilledMetaTyVar+isUnfilledMetaTyVar tv+ | MetaTv { mtv_ref = ref } <- tcTyVarDetails tv+ = do { details <- readMutVar ref+ ; return (isFlexi details) }+ | otherwise = return False++{-+************************************************************************+* *+ MetaTvs: TauTvs+* *+************************************************************************++Note [Never need to instantiate coercion variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+With coercion variables sloshing around in types, it might seem that we+sometimes need to instantiate coercion variables. This would be problematic,+because coercion variables inhabit unboxed equality (~#), and the constraint+solver thinks in terms only of boxed equality (~). The solution is that+we never need to instantiate coercion variables in the first place.++The tyvars that we need to instantiate come from the types of functions,+data constructors, and patterns. These will never be quantified over+coercion variables, except for the special case of the promoted Eq#. But,+that can't ever appear in user code, so we're safe!+-}+++newMultiplicityVar :: TcM TcType+newMultiplicityVar = newFlexiTyVarTy multiplicityTy++newFlexiTyVar :: Kind -> TcM TcTyVar+newFlexiTyVar kind = newAnonMetaTyVar TauTv kind++-- | Create a new flexi ty var with a specific name+newNamedFlexiTyVar :: FastString -> Kind -> TcM TcTyVar+newNamedFlexiTyVar fs kind = newNamedAnonMetaTyVar fs TauTv kind++newFlexiTyVarTy :: Kind -> TcM TcType+newFlexiTyVarTy kind = do+ tc_tyvar <- newFlexiTyVar kind+ return (mkTyVarTy tc_tyvar)++newFlexiTyVarTys :: Int -> Kind -> TcM [TcType]+newFlexiTyVarTys n kind = replicateM n (newFlexiTyVarTy kind)++newOpenTypeKind :: TcM TcKind+newOpenTypeKind+ = do { rr <- newFlexiTyVarTy runtimeRepTy+ ; return (mkTYPEapp rr) }++-- | Create a tyvar that can be a lifted or unlifted type.+-- Returns alpha :: TYPE kappa, where both alpha and kappa are fresh+newOpenFlexiTyVarTy :: TcM TcType+newOpenFlexiTyVarTy+ = do { tv <- newOpenFlexiTyVar+ ; return (mkTyVarTy tv) }++newOpenFlexiTyVar :: TcM TcTyVar+newOpenFlexiTyVar+ = do { kind <- newOpenTypeKind+ ; newFlexiTyVar kind }++newOpenBoxedTypeKind :: TcM TcKind+newOpenBoxedTypeKind+ = do { lev <- newFlexiTyVarTy (mkTyConTy levityTyCon)+ ; let rr = mkTyConApp boxedRepDataConTyCon [lev]+ ; return (mkTYPEapp rr) }++newMetaTyVars :: [TyVar] -> TcM (Subst, [TcTyVar])+-- Instantiate with META type variables+-- Note that this works for a sequence of kind, type, and coercion variables+-- variables. Eg [ (k:*), (a:k->k) ]+-- Gives [ (k7:*), (a8:k7->k7) ]+newMetaTyVars = newMetaTyVarsX emptySubst+ -- emptySubst has an empty in-scope set, but that's fine here+ -- Since the tyvars are freshly made, they cannot possibly be+ -- captured by any existing for-alls.++newMetaTyVarsX :: Subst -> [TyVar] -> TcM (Subst, [TcTyVar])+-- Just like newMetaTyVars, but start with an existing substitution.+newMetaTyVarsX subst = mapAccumLM newMetaTyVarX subst++newMetaTyVarX :: Subst -> TyVar -> TcM (Subst, TcTyVar)+-- Make a new unification variable tyvar whose Name and Kind come from+-- an existing TyVar. We substitute kind variables in the kind.+newMetaTyVarX = new_meta_tv_x TauTv++newMetaTyVarTyVarX :: Subst -> TyVar -> TcM (Subst, TcTyVar)+-- Just like newMetaTyVarX, but make a TyVarTv+newMetaTyVarTyVarX = new_meta_tv_x TyVarTv++newWildCardX :: Subst -> TyVar -> TcM (Subst, TcTyVar)+newWildCardX subst tv+ = do { new_tv <- newAnonMetaTyVar TauTv (substTy subst (tyVarKind tv))+ ; return (extendTvSubstWithClone subst tv new_tv, new_tv) }++new_meta_tv_x :: MetaInfo -> Subst -> TyVar -> TcM (Subst, TcTyVar)+new_meta_tv_x info subst tv+ = do { new_tv <- cloneAnonMetaTyVar info tv substd_kind+ ; let subst1 = extendTvSubstWithClone subst tv new_tv+ ; return (subst1, new_tv) }+ where+ substd_kind = substTyUnchecked subst (tyVarKind tv)+ -- NOTE: #12549 is fixed so we could use+ -- substTy here, but the tc_infer_args problem+ -- is not yet fixed so leaving as unchecked for now.+ -- OLD NOTE:+ -- Unchecked because we call newMetaTyVarX from+ -- tcInstTyBinder, which is called from tcInferTyApps+ -- which does not yet take enough trouble to ensure+ -- the in-scope set is right; e.g. #12785 trips+ -- if we use substTy here++newMetaTyVarTyAtLevel :: TcLevel -> TcKind -> TcM TcType+newMetaTyVarTyAtLevel tc_lvl kind+ = do { details <- newTauTvDetailsAtLevel tc_lvl+ ; name <- newMetaTyVarName (fsLit "p")+ ; return (mkTyVarTy (mkTcTyVar name kind details)) }++newConcreteTyVarTyAtLevel :: ConcreteTvOrigin -> TcLevel -> TcKind -> TcM TcType+newConcreteTyVarTyAtLevel conc_orig tc_lvl kind+ = do { details <- newConcreteTvDetailsAtLevel conc_orig tc_lvl+ ; name <- newMetaTyVarName (fsLit "c")+ ; return (mkTyVarTy (mkTcTyVar name kind details)) }++{- *********************************************************************+* *+ Finding variables to quantify over+* *+********************************************************************* -}++{- Note [Dependent type variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In Haskell type inference we quantify over type variables; but we only+quantify over /kind/ variables when -XPolyKinds is on. Without -XPolyKinds+we default the kind variables to *.++So, to support this defaulting, and only for that reason, when+collecting the free vars of a type (in candidateQTyVarsOfType and friends),+prior to quantifying, we must keep the type and kind variables separate.++But what does that mean in a system where kind variables /are/ type+variables? It's a fairly arbitrary distinction based on how the+variables appear:++ - "Kind variables" appear in the kind of some other free variable+ or in the kind of a locally quantified type variable+ (forall (a :: kappa). ...) or in the kind of a coercion+ (a |> (co :: kappa1 ~ kappa2)).++ These are the ones we default to * if -XPolyKinds is off++ - "Type variables" are all free vars that are not kind variables++E.g. In the type T k (a::k)+ 'k' is a kind variable, because it occurs in the kind of 'a',+ even though it also appears at "top level" of the type+ 'a' is a type variable, because it doesn't++We gather these variables using a CandidatesQTvs record:+ DV { dv_kvs: Variables free in the kind of a free type variable+ or of a forall-bound type variable+ , dv_tvs: Variables syntactically free in the type }++So: dv_kvs are the kind variables of the type+ (dv_tvs - dv_kvs) are the type variable of the type++Note that++* A variable can occur in both.+ T k (x::k) The first occurrence of k makes it+ show up in dv_tvs, the second in dv_kvs++* We include any coercion variables in the "dependent",+ "kind-variable" set because we never quantify over them.++* The "kind variables" might depend on each other; e.g+ (k1 :: k2), (k2 :: *)+ The "type variables" do not depend on each other; if+ one did, it'd be classified as a kind variable!++Note [CandidatesQTvs determinism and order]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+* Determinism: when we quantify over type variables we decide the+ order in which they appear in the final type. Because the order of+ type variables in the type can end up in the interface file and+ affects some optimizations like worker-wrapper, we want this order to+ be deterministic.++ To achieve that we use deterministic sets of variables that can be+ converted to lists in a deterministic order. For more information+ about deterministic sets see Note [Deterministic UniqFM] in GHC.Types.Unique.DFM.++* Order: as well as being deterministic, we use an+ accumulating-parameter style for candidateQTyVarsOfType so that we+ add variables one at a time, left to right. That means we tend to+ produce the variables in left-to-right order. This is just to make+ it bit more predictable for the programmer.++Note [Naughty quantification candidates]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (#14880, dependent/should_compile/T14880-2), suppose+we are trying to generalise this type:++ forall arg. ... (alpha[tau]:arg) ...++We have a metavariable alpha whose kind mentions a skolem variable+bound inside the very type we are generalising.+This can arise while type-checking a user-written type signature+(see the test case for the full code).++We cannot generalise over alpha! That would produce a type like+ forall {a :: arg}. forall arg. ...blah...+The fact that alpha's kind mentions arg renders it completely+ineligible for generalisation.++However, we are not going to learn any new constraints on alpha,+because its kind isn't even in scope in the outer context (but see Wrinkle).+So alpha is entirely unconstrained.++What then should we do with alpha? During generalization, every+metavariable is either (A) promoted, (B) generalized, or (C) zapped+(according to Note [Recipe for checking a signature] in GHC.Tc.Gen.HsType).++ * We can't generalise it.+ * We can't promote it, because its kind prevents that+ * We can't simply leave it be, because this type is about to+ go into the typing environment (as the type of some let-bound+ variable, say), and then chaos erupts when we try to instantiate.++Previously, we zapped it to Any. This worked, but it had the unfortunate+effect of causing Any sometimes to appear in error messages. If this+kind of signature happens, the user probably has made a mistake -- no+one really wants Any in their types. So we now error. This must be+a hard error (failure in the monad) to avoid other messages from mentioning+Any.++We do this eager erroring in candidateQTyVars, which always precedes+generalisation, because at that moment we have a clear picture of what+skolems are in scope within the type itself (e.g. that 'forall arg').++This change is inspired by and described in Section 7.2 of "Kind Inference+for Datatypes", POPL'20.++NB: this is all rather similar to, but sadly not the same as+ Note [Error on unconstrained meta-variables]++Wrinkle:++We must make absolutely sure that alpha indeed is not from an outer+context. (Otherwise, we might indeed learn more information about it.)+This can be done easily: we just check alpha's TcLevel. That level+must be strictly greater than the ambient TcLevel in order to treat it+as naughty. We say "strictly greater than" because the call to+candidateQTyVars is made outside the bumped TcLevel, as stated in the+comment to candidateQTyVarsOfType. The level check is done in go_tv in+collect_cand_qtvs. Skipping this check caused #16517.++-}++data CandidatesQTvs+ -- See Note [Dependent type variables]+ -- See Note [CandidatesQTvs determinism and order]+ --+ -- Invariants:+ -- * All variables are fully zonked, including their kinds+ -- * All variables are at a level greater than the ambient level+ -- See Note [Use level numbers for quantification]+ --+ -- This *can* contain skolems. For example, in `data X k :: k -> Type`+ -- we need to know that the k is a dependent variable. This is done+ -- by collecting the candidates in the kind after skolemising. It also+ -- comes up when generalizing a associated type instance, where instance+ -- variables are skolems. (Recall that associated type instances are generalized+ -- independently from their enclosing class instance, and the associated+ -- type instance may be generalized by more, fewer, or different variables+ -- than the class instance.)+ --+ = DV { dv_kvs :: DTyVarSet -- "kind" metavariables (dependent)+ , dv_tvs :: DTyVarSet -- "type" metavariables (non-dependent)+ -- A variable may appear in both sets+ -- E.g. T k (x::k) The first occurrence of k makes it+ -- show up in dv_tvs, the second in dv_kvs+ -- See Note [Dependent type variables]++ , dv_cvs :: CoVarSet+ -- These are covars. Included only so that we don't repeatedly+ -- look at covars' kinds in accumulator. Not used by quantifyTyVars.+ }++instance Semi.Semigroup CandidatesQTvs where+ (DV { dv_kvs = kv1, dv_tvs = tv1, dv_cvs = cv1 })+ <> (DV { dv_kvs = kv2, dv_tvs = tv2, dv_cvs = cv2 })+ = DV { dv_kvs = kv1 `unionDVarSet` kv2+ , dv_tvs = tv1 `unionDVarSet` tv2+ , dv_cvs = cv1 `unionVarSet` cv2 }++instance Monoid CandidatesQTvs where+ mempty = DV { dv_kvs = emptyDVarSet, dv_tvs = emptyDVarSet, dv_cvs = emptyVarSet }+ mappend = (Semi.<>)++instance Outputable CandidatesQTvs where+ ppr (DV {dv_kvs = kvs, dv_tvs = tvs, dv_cvs = cvs })+ = text "DV" <+> braces (pprWithCommas id [ text "dv_kvs =" <+> ppr kvs+ , text "dv_tvs =" <+> ppr tvs+ , text "dv_cvs =" <+> ppr cvs ])++isEmptyCandidates :: CandidatesQTvs -> Bool+isEmptyCandidates (DV { dv_kvs = kvs, dv_tvs = tvs })+ = isEmptyDVarSet kvs && isEmptyDVarSet tvs++-- | Extract out the kind vars (in order) and type vars (in order) from+-- a 'CandidatesQTvs'. The lists are guaranteed to be distinct. Keeping+-- the lists separate is important only in the -XNoPolyKinds case.+candidateVars :: CandidatesQTvs -> ([TcTyVar], [TcTyVar])+candidateVars (DV { dv_kvs = dep_kv_set, dv_tvs = nondep_tkv_set })+ = (dep_kvs, nondep_tvs)+ where+ dep_kvs = scopedSort $ dVarSetElems dep_kv_set+ -- scopedSort: put the kind variables into+ -- well-scoped order.+ -- E.g. [k, (a::k)] not the other way round++ nondep_tvs = dVarSetElems (nondep_tkv_set `minusDVarSet` dep_kv_set)+ -- See Note [Dependent type variables]+ -- The `minus` dep_tkvs removes any kind-level vars+ -- e.g. T k (a::k) Since k appear in a kind it'll+ -- be in dv_kvs, and is dependent. So remove it from+ -- dv_tvs which will also contain k+ -- NB kinds of tvs are already zonked++candidateKindVars :: CandidatesQTvs -> TyVarSet+candidateKindVars dvs = dVarSetToVarSet (dv_kvs dvs)++delCandidates :: CandidatesQTvs -> [Var] -> CandidatesQTvs+delCandidates (DV { dv_kvs = kvs, dv_tvs = tvs, dv_cvs = cvs }) vars+ = DV { dv_kvs = kvs `delDVarSetList` vars+ , dv_tvs = tvs `delDVarSetList` vars+ , dv_cvs = cvs `delVarSetList` vars }++partitionCandidates :: CandidatesQTvs -> (TyVar -> Bool) -> (TyVarSet, CandidatesQTvs)+-- The selected TyVars are returned as a non-deterministic TyVarSet+partitionCandidates dvs@(DV { dv_kvs = kvs, dv_tvs = tvs }) pred+ = (extracted, dvs { dv_kvs = rest_kvs, dv_tvs = rest_tvs })+ where+ (extracted_kvs, rest_kvs) = partitionDVarSet pred kvs+ (extracted_tvs, rest_tvs) = partitionDVarSet pred tvs+ extracted = dVarSetToVarSet extracted_kvs `unionVarSet` dVarSetToVarSet extracted_tvs++candidateQTyVarsWithBinders :: [TyVar] -> Type -> TcM CandidatesQTvs+-- (candidateQTyVarsWithBinders tvs ty) returns the candidateQTyVars+-- of (forall tvs. ty), but do not treat 'tvs' as bound for the purpose+-- of Note [Naughty quantification candidates]. Why?+-- Because we are going to scoped-sort the quantified variables+-- in among the tvs+candidateQTyVarsWithBinders bound_tvs ty+ = do { kvs <- candidateQTyVarsOfKinds (map tyVarKind bound_tvs)+ ; cur_lvl <- getTcLevel+ ; all_tvs <- collect_cand_qtvs ty False cur_lvl emptyVarSet kvs ty+ ; return (all_tvs `delCandidates` bound_tvs) }++-- | Gathers free variables to use as quantification candidates (in+-- 'quantifyTyVars'). This might output the same var+-- in both sets, if it's used in both a type and a kind.+-- The variables to quantify must have a TcLevel strictly greater than+-- the ambient level. (See Wrinkle in Note [Naughty quantification candidates])+-- See Note [CandidatesQTvs determinism and order]+-- See Note [Dependent type variables]+candidateQTyVarsOfType :: TcType -- not necessarily zonked+ -> TcM CandidatesQTvs+candidateQTyVarsOfType ty+ = do { cur_lvl <- getTcLevel+ ; collect_cand_qtvs ty False cur_lvl emptyVarSet mempty ty }++-- | Like 'candidateQTyVarsOfType', but over a list of types+-- The variables to quantify must have a TcLevel strictly greater than+-- the ambient level. (See Wrinkle in Note [Naughty quantification candidates])+candidateQTyVarsOfTypes :: [Type] -> TcM CandidatesQTvs+candidateQTyVarsOfTypes tys+ = do { cur_lvl <- getTcLevel+ ; foldlM (\acc ty -> collect_cand_qtvs ty False cur_lvl emptyVarSet acc ty)+ mempty tys }++-- | Like 'candidateQTyVarsOfType', but consider every free variable+-- to be dependent. This is appropriate when generalizing a *kind*,+-- instead of a type. (That way, -XNoPolyKinds will default the variables+-- to Type.)+candidateQTyVarsOfKind :: TcKind -- Not necessarily zonked+ -> TcM CandidatesQTvs+candidateQTyVarsOfKind ty+ = do { cur_lvl <- getTcLevel+ ; collect_cand_qtvs ty True cur_lvl emptyVarSet mempty ty }++candidateQTyVarsOfKinds :: [TcKind] -- Not necessarily zonked+ -> TcM CandidatesQTvs+candidateQTyVarsOfKinds tys+ = do { cur_lvl <- getTcLevel+ ; foldM (\acc ty -> collect_cand_qtvs ty True cur_lvl emptyVarSet acc ty)+ mempty tys }++collect_cand_qtvs+ :: TcType -- Original type that we started recurring into; for errors+ -> Bool -- True <=> consider every fv in Type to be dependent+ -> TcLevel -- Current TcLevel; collect only tyvars whose level is greater+ -> VarSet -- Bound variables (locals only)+ -> CandidatesQTvs -- Accumulating parameter+ -> Type -- Not necessarily zonked+ -> TcM CandidatesQTvs++-- Key points:+-- * Looks through meta-tyvars as it goes;+-- no need to zonk in advance+--+-- * Needs to be monadic anyway, because it handles naughty+-- quantification; see Note [Naughty quantification candidates]+--+-- * Returns fully-zonked CandidateQTvs, including their kinds+-- so that subsequent dependency analysis (to build a well+-- scoped telescope) works correctly++collect_cand_qtvs orig_ty is_dep cur_lvl bound dvs ty+ = go dvs ty+ where+ is_bound tv = tv `elemVarSet` bound++ -----------------+ go :: CandidatesQTvs -> TcType -> TcM CandidatesQTvs+ -- Uses accumulating-parameter style+ go dv (AppTy t1 t2) = foldlM go dv [t1, t2]+ go dv (TyConApp tc tys) = go_tc_args dv (tyConBinders tc) tys+ go dv (FunTy _ w arg res) = foldlM go dv [w, arg, res]+ go dv (LitTy {}) = return dv+ go dv (CastTy ty co) = do { dv1 <- go dv ty+ ; collect_cand_qtvs_co orig_ty cur_lvl bound dv1 co }+ go dv (CoercionTy co) = collect_cand_qtvs_co orig_ty cur_lvl bound dv co++ go dv (TyVarTy tv)+ | is_bound tv = return dv+ | otherwise = do { m_contents <- isFilledMetaTyVar_maybe tv+ ; case m_contents of+ Just ind_ty -> go dv ind_ty+ Nothing -> go_tv dv tv }++ go dv (ForAllTy (Bndr tv _) ty)+ = do { dv1 <- collect_cand_qtvs orig_ty True cur_lvl bound dv (tyVarKind tv)+ ; collect_cand_qtvs orig_ty is_dep cur_lvl (bound `extendVarSet` tv) dv1 ty }++ -- This makes sure that we default e.g. the alpha in Proxy alpha (Any alpha).+ -- Tested in polykinds/NestedProxies.+ -- We just might get this wrong in AppTy, but I don't think that's possible+ -- with -XNoPolyKinds. And fixing it would be non-performant, as we'd need+ -- to look at kinds.+ go_tc_args dv (tc_bndr:tc_bndrs) (ty:tys)+ = do { dv1 <- collect_cand_qtvs orig_ty (is_dep || isNamedTyConBinder tc_bndr)+ cur_lvl bound dv ty+ ; go_tc_args dv1 tc_bndrs tys }+ go_tc_args dv _bndrs tys -- _bndrs might be non-empty: undersaturation+ -- tys might be non-empty: oversaturation+ -- either way, the foldlM is correct+ = foldlM go dv tys++ -----------------+ go_tv dv@(DV { dv_kvs = kvs, dv_tvs = tvs }) tv+ | tcTyVarLevel tv <= cur_lvl+ = return dv -- This variable is from an outer context; skip+ -- See Note [Use level numbers for quantification]++ | case tcTyVarDetails tv of+ SkolemTv _ lvl _ -> lvl > pushTcLevel cur_lvl+ _ -> False+ = return dv -- Skip inner skolems+ -- This only happens for erroneous program with bad telescopes+ -- e.g. BadTelescope2: forall a k (b :: k). SameKind a b+ -- We have (a::k), and at the outer we don't want to quantify+ -- over the already-quantified skolem k.+ -- (Apparently we /do/ want to quantify over skolems whose level sk_lvl is+ -- sk_lvl > cur_lvl; you get lots of failures otherwise. A battle for another day.)++ | tv `elemDVarSet` kvs+ = return dv -- We have met this tyvar already++ | not is_dep+ , tv `elemDVarSet` tvs+ = return dv -- We have met this tyvar already++ | otherwise+ = do { tv_kind <- liftZonkM $ zonkTcType (tyVarKind tv)+ -- This zonk is annoying, but it is necessary, both to+ -- ensure that the collected candidates have zonked kinds+ -- (#15795) and to make the naughty check+ -- (which comes next) works correctly++ ; let tv_kind_vars = tyCoVarsOfType tv_kind+ ; if | intersectsVarSet bound tv_kind_vars+ -- the tyvar must not be from an outer context, but we have+ -- already checked for this.+ -- See Note [Naughty quantification candidates]+ -> do { traceTc "Naughty quantifier" $+ vcat [ ppr tv <+> dcolon <+> ppr tv_kind+ , text "bound:" <+> pprTyVars (nonDetEltsUniqSet bound)+ , text "fvs:" <+> pprTyVars (nonDetEltsUniqSet tv_kind_vars) ]++ ; let escapees = intersectVarSet bound tv_kind_vars+ ; naughtyQuantification orig_ty tv escapees }++ | otherwise+ -> do { let tv' = tv `setTyVarKind` tv_kind+ dv' | is_dep = dv { dv_kvs = kvs `extendDVarSet` tv' }+ | otherwise = dv { dv_tvs = tvs `extendDVarSet` tv' }+ -- See Note [Order of accumulation]++ -- See Note [Recurring into kinds for candidateQTyVars]+ ; collect_cand_qtvs orig_ty True cur_lvl bound dv' tv_kind } }++collect_cand_qtvs_co :: TcType -- original type at top of recursion; for errors+ -> TcLevel+ -> VarSet -- bound variables+ -> CandidatesQTvs -> Coercion+ -> TcM CandidatesQTvs+collect_cand_qtvs_co orig_ty cur_lvl bound = go_co+ where+ go_co dv (Refl ty) = collect_cand_qtvs orig_ty True cur_lvl bound dv ty+ go_co dv (GRefl _ ty mco) = do { dv1 <- collect_cand_qtvs orig_ty True cur_lvl bound dv ty+ ; go_mco dv1 mco }+ go_co dv (TyConAppCo _ _ cos) = foldlM go_co dv cos+ go_co dv (AppCo co1 co2) = foldlM go_co dv [co1, co2]+ go_co dv (FunCo _ _ _ w co1 co2) = foldlM go_co dv [w, co1, co2]+ go_co dv (AxiomInstCo _ _ cos) = foldlM go_co dv cos+ go_co dv (AxiomRuleCo _ cos) = foldlM go_co dv cos+ go_co dv (UnivCo prov _ t1 t2) = do { dv1 <- go_prov dv prov+ ; dv2 <- collect_cand_qtvs orig_ty True cur_lvl bound dv1 t1+ ; collect_cand_qtvs orig_ty True cur_lvl bound dv2 t2 }+ go_co dv (SymCo co) = go_co dv co+ go_co dv (TransCo co1 co2) = foldlM go_co dv [co1, co2]+ go_co dv (SelCo _ co) = go_co dv co+ go_co dv (LRCo _ co) = go_co dv co+ go_co dv (InstCo co1 co2) = foldlM go_co dv [co1, co2]+ go_co dv (KindCo co) = go_co dv co+ go_co dv (SubCo co) = go_co dv co++ go_co dv (HoleCo hole)+ = do m_co <- unpackCoercionHole_maybe hole+ case m_co of+ Just co -> go_co dv co+ Nothing -> go_cv dv (coHoleCoVar hole)++ go_co dv (CoVarCo cv) = go_cv dv cv++ go_co dv (ForAllCo tcv kind_co co)+ = do { dv1 <- go_co dv kind_co+ ; collect_cand_qtvs_co orig_ty cur_lvl (bound `extendVarSet` tcv) dv1 co }++ go_mco dv MRefl = return dv+ go_mco dv (MCo co) = go_co dv co++ go_prov dv (PhantomProv co) = go_co dv co+ go_prov dv (ProofIrrelProv co) = go_co dv co+ go_prov dv (PluginProv _) = return dv+ go_prov dv (CorePrepProv _) = return dv++ go_cv :: CandidatesQTvs -> CoVar -> TcM CandidatesQTvs+ go_cv dv@(DV { dv_cvs = cvs }) cv+ | is_bound cv = return dv+ | cv `elemVarSet` cvs = return dv++ -- See Note [Recurring into kinds for candidateQTyVars]+ | otherwise = collect_cand_qtvs orig_ty True cur_lvl bound+ (dv { dv_cvs = cvs `extendVarSet` cv })+ (idType cv)++ is_bound tv = tv `elemVarSet` bound++{- Note [Order of accumulation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+You might be tempted (like I was) to use unitDVarSet and mappend+rather than extendDVarSet. However, the union algorithm for+deterministic sets depends on (roughly) the size of the sets. The+elements from the smaller set end up to the right of the elements from+the larger one. When sets are equal, the left-hand argument to+`mappend` goes to the right of the right-hand argument.++In our case, if we use unitDVarSet and mappend, we learn that the free+variables of (a -> b -> c -> d) are [b, a, c, d], and we then quantify+over them in that order. (The a comes after the b because we union the+singleton sets as ({a} `mappend` {b}), producing {b, a}. Thereafter,+the size criterion works to our advantage.) This is just annoying to+users, so I use `extendDVarSet`, which unambiguously puts the new+element to the right.++Note that the unitDVarSet/mappend implementation would not be wrong+against any specification -- just suboptimal and confounding to users.++Note [Recurring into kinds for candidateQTyVars]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+First, read Note [Closing over free variable kinds] in GHC.Core.TyCo.FVs, paying+attention to the end of the Note about using an empty bound set when+traversing a variable's kind.++That Note concludes with the recommendation that we empty out the bound+set when recurring into the kind of a type variable. Yet, we do not do+this here. I have two tasks in order to convince you that this code is+right. First, I must show why it is safe to ignore the reasoning in that+Note. Then, I must show why is is necessary to contradict the reasoning in+that Note.++Why it is safe: There can be no+shadowing in the candidateQ... functions: they work on the output of+type inference, which is seeded by the renamer and its insistence to+use different Uniques for different variables. (In contrast, the Core+functions work on the output of optimizations, which may introduce+shadowing.) Without shadowing, the problem studied by+Note [Closing over free variable kinds] in GHC.Core.TyCo.FVs cannot happen.++Why it is necessary:+Wiping the bound set would be just plain wrong here. Consider++ forall k1 k2 (a :: k1). Proxy k2 (a |> (hole :: k1 ~# k2))++We really don't want to think k1 and k2 are free here. (It's true that we'll+never be able to fill in `hole`, but we don't want to go off the rails just+because we have an insoluble coercion hole.) So: why is it wrong to wipe+the bound variables here but right in Core? Because the final statement+in Note [Closing over free variable kinds] in GHC.Core.TyCo.FVs is wrong: not+every variable is either free or bound. A variable can be a hole, too!+The reasoning in that Note then breaks down.++And the reasoning applies just as well to free non-hole variables, so we+retain the bound set always.++-}++{- *********************************************************************+* *+ Quantification+* *+************************************************************************++Note [quantifyTyVars]+~~~~~~~~~~~~~~~~~~~~~+quantifyTyVars is given the free vars of a type that we+are about to wrap in a forall.++It takes these free type/kind variables (partitioned into dependent and+non-dependent variables) skolemises metavariables with a TcLevel greater+than the ambient level (see Note [Use level numbers for quantification]).++* This function distinguishes between dependent and non-dependent+ variables only to keep correct defaulting behavior with -XNoPolyKinds.+ With -XPolyKinds, it treats both classes of variables identically.++* quantifyTyVars never quantifies over+ - a coercion variable (or any tv mentioned in the kind of a covar)+ - a runtime-rep variable++Note [Use level numbers for quantification]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The level numbers assigned to metavariables are very useful. Not only+do they track touchability (Note [TcLevel invariants] in GHC.Tc.Utils.TcType),+but they also allow us to determine which variables to+generalise. The rule is this:++ When generalising, quantify only metavariables with a TcLevel greater+ than the ambient level.++This works because we bump the level every time we go inside a new+source-level construct. In a traditional generalisation algorithm, we+would gather all free variables that aren't free in an environment.+However, if a variable is in that environment, it will always have a lower+TcLevel: it came from an outer scope. So we can replace the "free in+environment" check with a level-number check.++Here is an example:++ f x = x + (z True)+ where+ z y = x * x++We start by saying (x :: alpha[1]). When inferring the type of z, we'll+quickly discover that z :: alpha[1]. But it would be disastrous to+generalise over alpha in the type of z. So we need to know that alpha+comes from an outer environment. By contrast, the type of y is beta[2],+and we are free to generalise over it. What's the difference between+alpha[1] and beta[2]? Their levels. beta[2] has the right TcLevel for+generalisation, and so we generalise it. alpha[1] does not, and so+we leave it alone.++Note that not *every* variable with a higher level will get+generalised, either due to the monomorphism restriction or other+quirks. See, for example, the code in GHC.Tc.Solver.decideMonoTyVars+and in GHC.Tc.Gen.HsType.kindGeneralizeSome, both of which exclude+certain otherwise-eligible variables from being generalised.++Using level numbers for quantification is implemented in the candidateQTyVars...+functions, by adding only those variables with a level strictly higher than+the ambient level to the set of candidates.++Note [quantifyTyVars determinism]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The results of quantifyTyVars are wrapped in a forall and can end up in the+interface file. One such example is inferred type signatures. They also affect+the results of optimizations, for example worker-wrapper. This means that to+get deterministic builds quantifyTyVars needs to be deterministic.++To achieve this CandidatesQTvs is backed by deterministic sets which allows them+to be later converted to a list in a deterministic order.++For more information about deterministic sets see+Note [Deterministic UniqFM] in GHC.Types.Unique.DFM.+-}++quantifyTyVars :: SkolemInfo+ -> NonStandardDefaultingStrategy+ -> CandidatesQTvs -- See Note [Dependent type variables]+ -- Already zonked+ -> TcM [TcTyVar]+-- See Note [quantifyTyVars]+-- Can be given a mixture of TcTyVars and TyVars, in the case of+-- associated type declarations. Also accepts covars, but *never* returns any.+-- According to Note [Use level numbers for quantification] and the+-- invariants on CandidateQTvs, we do not have to filter out variables+-- free in the environment here. Just quantify unconditionally, subject+-- to the restrictions in Note [quantifyTyVars].+quantifyTyVars skol_info ns_strat dvs+ -- short-circuit common case+ | isEmptyCandidates dvs+ = do { traceTc "quantifyTyVars has nothing to quantify" empty+ ; return [] }++ | otherwise+ = do { traceTc "quantifyTyVars {"+ ( vcat [ text "ns_strat =" <+> ppr ns_strat+ , text "dvs =" <+> ppr dvs ])++ ; undefaulted <- defaultTyVars ns_strat dvs+ ; final_qtvs <- liftZonkM $ mapMaybeM zonk_quant undefaulted++ ; traceTc "quantifyTyVars }"+ (vcat [ text "undefaulted:" <+> pprTyVars undefaulted+ , text "final_qtvs:" <+> pprTyVars final_qtvs ])++ -- We should never quantify over coercion variables; check this+ ; let co_vars = filter isCoVar final_qtvs+ ; massertPpr (null co_vars) (ppr co_vars)++ ; return final_qtvs }+ where+ -- zonk_quant returns a tyvar if it should be quantified over;+ -- otherwise, it returns Nothing. The latter case happens for+ -- non-meta-tyvars+ zonk_quant 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++ | otherwise+ = Just <$> skolemiseQuantifiedTyVar skol_info tkv++isQuantifiableTv :: TcLevel -- Level of the context, outside the quantification+ -> TcTyVar+ -> Bool+isQuantifiableTv outer_tclvl tcv+ | isTcTyVar tcv -- Might be a CoVar; change this when gather covars separately+ = tcTyVarLevel tcv > outer_tclvl+ | otherwise+ = False++zonkAndSkolemise :: SkolemInfo -> TcTyCoVar -> ZonkM TcTyCoVar+-- A tyvar binder is never a unification variable (TauTv),+-- rather it is always a skolem. It *might* be a TyVarTv.+-- (Because non-CUSK type declarations use TyVarTvs.)+-- Regardless, it may have a kind that has not yet been zonked,+-- and may include kind unification variables.+zonkAndSkolemise skol_info tyvar+ | isTyVarTyVar tyvar+ -- We want to preserve the binding location of the original TyVarTv.+ -- This is important for error messages. If we don't do this, then+ -- we get bad locations in, e.g., typecheck/should_fail/T2688+ = do { zonked_tyvar <- zonkTcTyVarToTcTyVar tyvar+ ; skolemiseQuantifiedTyVar skol_info zonked_tyvar }++ | otherwise+ = assertPpr (isImmutableTyVar tyvar || isCoVar tyvar) (pprTyVar tyvar) $+ zonkTyCoVarKind tyvar++skolemiseQuantifiedTyVar :: SkolemInfo -> TcTyVar -> ZonkM TcTyVar+-- The quantified type variables often include meta type variables+-- we want to freeze them into ordinary type variables+-- The meta tyvar is updated to point to the new skolem TyVar. Now any+-- bound occurrences of the original type variable will get zonked to+-- the immutable version.+--+-- We leave skolem TyVars alone; they are immutable.+--+-- This function is called on both kind and type variables,+-- but kind variables *only* if PolyKinds is on.++skolemiseQuantifiedTyVar skol_info tv+ = case tcTyVarDetails tv of+ MetaTv {} -> skolemiseUnboundMetaTyVar skol_info tv++ SkolemTv _ lvl _ -- It might be a skolem type variable,+ -- for example from a user type signature+ -- But it might also be a shared meta-variable across several+ -- type declarations, each with its own skol_info. The first+ -- will skolemise it, but the other uses must update its+ -- skolem info (#22379)+ -> do { kind <- zonkTcType (tyVarKind tv)+ ; let details = SkolemTv skol_info lvl False+ name = tyVarName tv+ ; return (mkTcTyVar name kind details) }++ _other -> pprPanic "skolemiseQuantifiedTyVar" (ppr tv) -- RuntimeUnk++-- | Default a type variable using the given defaulting strategy.+--+-- See Note [Type variable defaulting options] in GHC.Types.Basic.+defaultTyVar :: DefaultingStrategy+ -> TcTyVar -- If it's a MetaTyVar then it is unbound+ -> TcM Bool -- True <=> defaulted away altogether+defaultTyVar def_strat tv+ | not (isMetaTyVar tv)+ || isTyVarTyVar tv+ -- Do not default TyVarTvs. Doing so would violate the invariants+ -- on TyVarTvs; see Note [TyVarTv] in GHC.Tc.Utils.TcMType.+ -- #13343 is an example; #14555 is another+ -- See Note [Inferring kinds for type declarations] in GHC.Tc.TyCl+ = return False++ | isRuntimeRepVar tv+ , default_ns_vars+ = do { traceTc "Defaulting a RuntimeRep var to LiftedRep" (ppr tv)+ ; liftZonkM $ writeMetaTyVar tv liftedRepTy+ ; return True }++ | isLevityVar tv+ , default_ns_vars+ = do { traceTc "Defaulting a Levity var to Lifted" (ppr tv)+ ; liftZonkM $ writeMetaTyVar tv liftedDataConTy+ ; return True }++ | isMultiplicityVar tv+ , default_ns_vars+ = do { traceTc "Defaulting a Multiplicity var to Many" (ppr tv)+ ; liftZonkM $ writeMetaTyVar tv manyDataConTy+ ; return True }++ | isConcreteTyVar tv+ -- We don't want to quantify; but neither can we default to+ -- anything sensible. (If it has kind RuntimeRep or Levity, as is+ -- often the case, it'll have been caught earlier by earlier+ -- cases. So in this exotic situation we just promote. Not very+ -- satisfing, but it's very much a corner case: #23051+ -- We should really implement the plan in #20686.+ = do { lvl <- getTcLevel+ ; _ <- promoteMetaTyVarTo lvl tv+ ; return True }++ | DefaultKindVars <- def_strat -- -XNoPolyKinds and this is a kind var: we must default it+ = default_kind_var tv++ | otherwise+ = return False++ where+ default_ns_vars :: Bool+ default_ns_vars = defaultNonStandardTyVars def_strat+ default_kind_var :: TyVar -> TcM Bool+ -- defaultKindVar is used exclusively with -XNoPolyKinds+ -- See Note [Defaulting with -XNoPolyKinds]+ -- It takes an (unconstrained) meta tyvar and defaults it.+ -- Works only on vars of type *; for other kinds, it issues an error.+ default_kind_var kv+ | isLiftedTypeKind (tyVarKind kv)+ = do { traceTc "Defaulting a kind var to *" (ppr kv)+ ; liftZonkM $ writeMetaTyVar kv liftedTypeKind+ ; return True }+ | otherwise+ = do { addErr $ TcRnCannotDefaultKindVar kv' (tyVarKind kv')+ -- We failed to default it, so return False to say so.+ -- Hence, it'll get skolemised. That might seem odd, but we must either+ -- promote, skolemise, or zap-to-Any, to satisfy GHC.Tc.Gen.HsType+ -- Note [Recipe for checking a signature]+ -- Otherwise we get level-number assertion failures. It doesn't matter much+ -- because we are in an error situation anyway.+ ; return False+ }+ where+ (_, kv') = tidyOpenTyCoVar emptyTidyEnv kv++-- | Default some unconstrained type variables, as specified+-- by the defaulting options:+--+-- - 'RuntimeRep' tyvars default to 'LiftedRep'+-- - 'Levity' tyvars default to 'Lifted'+-- - 'Multiplicity' tyvars default to 'Many'+-- - 'Type' tyvars from dv_kvs default to 'Type', when -XNoPolyKinds+-- (under -XNoPolyKinds, non-defaulting vars in dv_kvs is an error)+defaultTyVars :: NonStandardDefaultingStrategy+ -> CandidatesQTvs -- ^ all candidates for quantification+ -> TcM [TcTyVar] -- ^ those variables not defaulted+defaultTyVars ns_strat dvs+ = do { poly_kinds <- xoptM LangExt.PolyKinds+ ; let+ def_tvs, def_kvs :: DefaultingStrategy+ def_tvs = NonStandardDefaulting ns_strat+ def_kvs | poly_kinds = def_tvs+ | otherwise = DefaultKindVars+ -- As -XNoPolyKinds precludes polymorphic kind variables, we default them.+ -- For example:+ --+ -- type F :: Type -> Type+ -- type family F a where+ -- F (a -> b) = b+ --+ -- Here we get `a :: TYPE r`, so to accept this program when -XNoPolyKinds is enabled+ -- we must default the kind variable `r :: RuntimeRep`.+ -- Test case: T20584.+ ; defaulted_kvs <- mapM (defaultTyVar def_kvs) dep_kvs+ ; defaulted_tvs <- mapM (defaultTyVar def_tvs) nondep_tvs+ ; let undefaulted_kvs = [ kv | (kv, False) <- dep_kvs `zip` defaulted_kvs ]+ undefaulted_tvs = [ tv | (tv, False) <- nondep_tvs `zip` defaulted_tvs ]+ ; return (undefaulted_kvs ++ undefaulted_tvs) }+ -- NB: kvs before tvs because tvs may depend on kvs+ where+ (dep_kvs, nondep_tvs) = candidateVars dvs++skolemiseUnboundMetaTyVar :: SkolemInfo -> TcTyVar -> ZonkM TyVar+-- We have a Meta tyvar with a ref-cell inside it+-- Skolemise it, so that we are totally out of Meta-tyvar-land+-- We create a skolem TcTyVar, not a regular TyVar+-- See Note [Zonking to Skolem]+--+-- Its level should be one greater than the ambient level, which will typically+-- be the same as the level on the meta-tyvar. But not invariably; for example+-- f :: (forall a b. SameKind a b) -> Int+-- The skolems 'a' and 'b' are bound by tcTKTelescope, at level 2; and they each+-- have a level-2 kind unification variable, since it might get unified with another+-- of the level-2 skolems e.g. 'k' in this version+-- f :: (forall k (a :: k) b. SameKind a b) -> Int+-- So when we quantify the kind vars at the top level of the signature, the ambient+-- level is 1, but we will quantify over kappa[2].++skolemiseUnboundMetaTyVar skol_info tv+ = assertPpr (isMetaTyVar tv) (ppr tv) $+ do { check_empty tv+ -- Get the location and level from "here",+ -- i.e. where we are generalising+ ; ZonkGblEnv { zge_src_span = here, zge_tc_level = tc_lvl }+ <- getZonkGblEnv+ ; kind <- zonkTcType (tyVarKind tv)+ ; let tv_name = tyVarName tv+ -- See Note [Skolemising and identity]+ final_name | isSystemName tv_name+ = mkInternalName (nameUnique tv_name)+ (nameOccName tv_name) here+ | otherwise+ = tv_name+ details = SkolemTv skol_info (pushTcLevel tc_lvl) False+ final_tv = mkTcTyVar final_name kind details++ ; traceZonk "Skolemising" (ppr tv <+> text ":=" <+> ppr final_tv)+ ; writeMetaTyVar tv (mkTyVarTy final_tv)+ ; return final_tv }+ where+ check_empty tv -- [Sept 04] Check for non-empty.+ = when debugIsOn $ -- See Note [Silly Type Synonyms]+ do { cts <- readMetaTyVar tv+ ; case cts of+ Flexi -> return ()+ Indirect ty -> warnPprTrace True "skolemiseUnboundMetaTyVar" (ppr tv $$ ppr ty) $+ return () }++{- Note [Error on unconstrained meta-variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider++* type C :: Type -> Type -> Constraint+ class (forall a. a b ~ a c) => C b c++* type T = forall a. Proxy a++* data (forall a. a b ~ a c) => T b c++* type instance F Int = Proxy Any+ where Any :: forall k. k++In the first three cases we will infer a :: Type -> kappa, but then+we get no further information on kappa. In the last, we will get+ Proxy kappa Any+but again will get no further info on kappa.++What do do?+ A. We could choose kappa := Type. But this only works when the kind of kappa+ is Type (true in this example, but not always).+ B. We could default to Any.+ C. We could quantify.+ D. We could error.++We choose (D), as described in #17567, and implement this choice in+doNotQuantifyTyVars. Discussion of alternatives A-C is below.++NB: this is all rather similar to, but sadly not the same as+ Note [Naughty quantification candidates]++To do this, we must take an extra step before doing the final zonk to create+e.g. a TyCon. (There is no problem in the final term-level zonk. See the+section on alternative (B) below.) This extra step is needed only for+constructs that do not quantify their free meta-variables, such as a class+constraint or right-hand side of a type synonym.++Specifically: before the final zonk, every construct must either call+quantifyTyVars or doNotQuantifyTyVars. The latter issues an error+if it is passed any free variables. (Exception: we still default+RuntimeRep and Multiplicity variables.)++Because no meta-variables remain after quantifying or erroring, we perform+the zonk with NoFlexi, which panics upon seeing a meta-variable.++Alternatives A-C, not implemented:++A. As stated above, this works only sometimes. We might have a free+ meta-variable of kind Nat, for example.++B. This is what we used to do, but it caused Any to appear in error+ messages sometimes. See #17567 for several examples. Defaulting to+ Any during the final, whole-program zonk is OK, though, because+ we are completely done type-checking at that point. No chance to+ leak into an error message.++C. Examine the class declaration at the top of this Note again.+ Where should we quantify? We might imagine quantifying and+ putting the kind variable in the forall of the quantified constraint.+ But what if there are nested foralls? Which one should get the+ variable? Other constructs have other problems. (For example,+ the right-hand side of a type family instance equation may not+ be a poly-type.)++ More broadly, the GHC AST defines a set of places where it performs+ implicit lexical generalization. For example, in a type+ signature++ f :: Proxy a -> Bool++ the otherwise-unbound a is lexically quantified, giving us++ f :: forall a. Proxy a -> Bool++ The places that allow lexical quantification are marked in the AST with+ HsImplicitBndrs. HsImplicitBndrs offers a binding site for otherwise-unbound+ variables.++ Later, during type-checking, we discover that a's kind is unconstrained.+ We thus quantify *again*, to++ f :: forall {k} (a :: k). Proxy @k a -> Bool++ It is this second quantification that this Note is really about --+ let's call it *inferred quantification*.+ So there are two sorts of implicit quantification in types:+ 1. Lexical quantification: signalled by HsImplicitBndrs, occurs over+ variables mentioned by the user but with no explicit binding site,+ suppressed by a user-written forall (by the forall-or-nothing rule,+ in Note [forall-or-nothing rule] in GHC.Hs.Type).+ 2. Inferred quantification: no signal in HsSyn, occurs over unconstrained+ variables invented by the type-checker, possible only with -XPolyKinds,+ unaffected by forall-or-nothing rule+ These two quantifications are performed in different compiler phases, and are+ essentially unrelated. However, it is convenient+ for programmers to remember only one set of implicit quantification+ sites. So, we choose to use the same places (those with HsImplicitBndrs)+ for lexical quantification as for inferred quantification of unconstrained+ meta-variables. Accordingly, there is no quantification in a class+ constraint, or the other constructs that call doNotQuantifyTyVars.+-}++doNotQuantifyTyVars :: CandidatesQTvs+ -> (TidyEnv -> ZonkM (TidyEnv, UninferrableTyVarCtx))+ -- ^ like "the class context (D a b, E foogle)"+ -> TcM ()+-- See Note [Error on unconstrained meta-variables]+doNotQuantifyTyVars dvs where_found+ | isEmptyCandidates dvs+ = traceTc "doNotQuantifyTyVars has nothing to error on" empty++ | otherwise+ = do { traceTc "doNotQuantifyTyVars" (ppr dvs)+ ; undefaulted <- defaultTyVars DefaultNonStandardTyVars dvs+ -- could have regular TyVars here, in an associated type RHS, or+ -- bound by a type declaration head. So filter looking only for+ -- metavars. e.g. b and c in `class (forall a. a b ~ a c) => C b c`+ -- are OK+ ; let leftover_metas = filter isMetaTyVar undefaulted+ ; unless (null leftover_metas) $+ do { let (tidy_env1, tidied_tvs) = tidyOpenTyCoVars emptyTidyEnv leftover_metas+ ; (tidy_env2, where_doc) <- liftZonkM $ where_found tidy_env1+ ; let msg = TcRnUninferrableTyVar tidied_tvs where_doc+ ; failWithTcM (tidy_env2, msg) }+ ; traceTc "doNotQuantifyTyVars success" empty }++{- Note [Defaulting with -XNoPolyKinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider++ data Compose f g a = Mk (f (g a))++We infer++ Compose :: forall k1 k2. (k2 -> *) -> (k1 -> k2) -> k1 -> *+ Mk :: forall k1 k2 (f :: k2 -> *) (g :: k1 -> k2) (a :: k1).+ f (g a) -> Compose k1 k2 f g a++Now, in another module, we have -XNoPolyKinds -XDataKinds in effect.+What does 'Mk mean? Pre GHC-8.0 with -XNoPolyKinds,+we just defaulted all kind variables to *. But that's no good here,+because the kind variables in 'Mk aren't of kind *, so defaulting to *+is ill-kinded.++After some debate on #11334, we decided to issue an error in this case.+The code is in defaultKindVar.++Note [What is a meta variable?]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A "meta type-variable", also know as a "unification variable" is a placeholder+introduced by the typechecker for an as-yet-unknown monotype.++For example, when we see a call `reverse (f xs)`, we know that we calling+ reverse :: forall a. [a] -> [a]+So we know that the argument `f xs` must be a "list of something". But what is+the "something"? We don't know until we explore the `f xs` a bit more. So we set+out what we do know at the call of `reverse` by instantiating its type with a fresh+meta tyvar, `alpha` say. So now the type of the argument `f xs`, and of the+result, is `[alpha]`. The unification variable `alpha` stands for the+as-yet-unknown type of the elements of the list.++As type inference progresses we may learn more about `alpha`. For example, suppose+`f` has the type+ f :: forall b. b -> [Maybe b]+Then we instantiate `f`'s type with another fresh unification variable, say+`beta`; and equate `f`'s result type with reverse's argument type, thus+`[alpha] ~ [Maybe beta]`.++Now we can solve this equality to learn that `alpha ~ Maybe beta`, so we've+refined our knowledge about `alpha`. And so on.++If you found this Note useful, you may also want to have a look at+Section 5 of "Practical type inference for higher rank types" (Peyton Jones,+Vytiniotis, Weirich and Shields. J. Functional Programming. 2011).++Note [Zonking to Skolem]+~~~~~~~~~~~~~~~~~~~~~~~~+We used to zonk quantified type variables to regular TyVars. However, this+leads to problems. Consider this program from the regression test suite:++ eval :: Int -> String -> String -> String+ eval 0 root actual = evalRHS 0 root actual++ evalRHS :: Int -> a+ evalRHS 0 root actual = eval 0 root actual++It leads to the deferral of an equality (wrapped in an implication constraint)++ forall a. () => ((String -> String -> String) ~ a)++which is propagated up to the toplevel (see GHC.Tc.Solver.tcSimplifyInferCheck).+In the meantime `a' is zonked and quantified to form `evalRHS's signature.+This has the *side effect* of also zonking the `a' in the deferred equality+(which at this point is being handed around wrapped in an implication+constraint).++Finally, the equality (with the zonked `a') will be handed back to the+simplifier by GHC.Tc.Module.tcRnSrcDecls calling GHC.Tc.Solver.tcSimplifyTop.+If we zonk `a' with a regular type variable, we will have this regular type+variable now floating around in the simplifier, which in many places assumes to+only see proper TcTyVars.++We can avoid this problem by zonking with a skolem TcTyVar. The+skolem is rigid (which we require for a quantified variable), but is+still a TcTyVar that the simplifier knows how to deal with.++Note [Skolemising and identity]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In some places, we make a TyVarTv for a binder. E.g.+ class C a where ...+As Note [Inferring kinds for type declarations] discusses,+we make a TyVarTv for 'a'. Later we skolemise it, and we'd+like to retain its identity, location info etc. (If we don't+retain its identity we'll have to do some pointless swizzling;+see GHC.Tc.TyCl.swizzleTcTyConBndrs. If we retain its identity+but not its location we'll lose the detailed binding site info.++Conclusion: use the Name of the TyVarTv. But we don't want+to do that when skolemising random unification variables;+there the location we want is the skolemisation site.++Fortunately we can tell the difference: random unification+variables have System Names. That's why final_name is+set based on the isSystemName test.+++Note [Silly Type Synonyms]+~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider this:+ type C u a = u -- Note 'a' unused++ foo :: (forall a. C u a -> C u a) -> u+ foo x = ...++ bar :: Num u => u+ bar = foo (\t -> t + t)++* From the (\t -> t+t) we get type {Num d} => d -> d+ where d is fresh.++* Now unify with type of foo's arg, and we get:+ {Num (C d a)} => C d a -> C d a+ where a is fresh.++* Now abstract over the 'a', but float out the Num (C d a) constraint+ because it does not 'really' mention a. (see exactTyVarsOfType)+ The arg to foo becomes+ \/\a -> \t -> t+t++* So we get a dict binding for Num (C d a), which is zonked to give+ a = ()+ Note (Sept 04): now that we are zonking quantified type variables+ on construction, the 'a' will be frozen as a regular tyvar on+ quantification, so the floated dict will still have type (C d a).+ Which renders this whole note moot; happily!]++* Then the \/\a abstraction has a zonked 'a' in it.++All very silly. I think its harmless to ignore the problem. We'll end up with+a \/\a in the final result but all the occurrences of a will be zonked to ()+-}++--------------------------------------------------------------------------------++-- | @tcCheckUsage name mult thing_inside@ runs @thing_inside@, checks that the+-- usage of @name@ is a submultiplicity of @mult@, and removes @name@ from the+-- usage environment. See also Note [Wrapper returned from tcSubMult] in+-- GHC.Tc.Utils.Unify, which applies to the wrapper returned from this function.+tcCheckUsage :: Name -> Mult -> TcM a -> TcM (a, HsWrapper)+tcCheckUsage name id_mult thing_inside+ = do { (local_usage, result) <- tcCollectingUsage thing_inside+ ; wrapper <- check_then_add_usage local_usage+ ; return (result, wrapper) }+ where+ check_then_add_usage :: UsageEnv -> TcM HsWrapper+ -- Checks that the usage of the newly introduced binder is compatible with+ -- its multiplicity, and combines the usage of non-new binders to |uenv|+ check_then_add_usage uenv+ = do { let actual_u = lookupUE uenv name+ ; traceTc "check_then_add_usage" (ppr id_mult $$ ppr actual_u)+ ; wrapper <- case actual_u of+ Bottom -> return idHsWrapper+ Zero -> tcSubMult (UsageEnvironmentOf name) ManyTy id_mult+ MUsage m -> do { m <- promote_mult m+ ; tcSubMult (UsageEnvironmentOf name) m id_mult }+ ; tcEmitBindingUsage (deleteUE uenv name)+ ; return wrapper }++ -- This is gross. The problem is in test case typecheck/should_compile/T18998:+ -- f :: a %1-> Id n a -> Id n a+ -- f x (MkId _) = MkId x+ -- where MkId is a GADT constructor. Multiplicity polymorphism of constructors+ -- invents a new multiplicity variable p[2] for the application MkId x. This+ -- variable is at level 2, bumped because of the GADT pattern-match (MkId _).+ -- We eventually unify the variable with One, due to the call to tcSubMult in+ -- tcCheckUsage. But by then, we're at TcLevel 1, and so the level-check+ -- fails.+ --+ -- What to do? If we did inference "for real", the sub-multiplicity constraint+ -- would end up in the implication of the GADT pattern-match, and all would+ -- be well. But we don't have a real sub-multiplicity constraint to put in+ -- the implication. (Multiplicity inference works outside the usual generate-+ -- constraints-and-solve scheme.) Here, where the multiplicity arrives, we+ -- must promote all multiplicity variables to reflect this outer TcLevel.+ -- It's reminiscent of floating a constraint, really, so promotion is+ -- appropriate. The promoteTcType function works only on types of kind TYPE rr,+ -- so we can't use it here. Thus, this dirtiness.+ --+ -- It works nicely in practice.+ --+ -- We use a set to avoid calling promoteMetaTyVarTo twice on the same+ -- metavariable. This happened in #19400.+ promote_mult m = do { fvs <- liftZonkM $ zonkTyCoVarsAndFV (tyCoVarsOfType m)+ ; any_promoted <- promoteTyVarSet fvs+ ; if any_promoted then liftZonkM $ zonkTcType m else return m+ }++{- *********************************************************************+* *+ Short-cuts for overloaded numeric literals+* *+********************************************************************* -}++-- Overloaded literals. Here mainly because it uses isIntTy etc++{- Note [Short cut for overloaded literals]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A literal like "3" means (fromInteger @ty (dNum :: Num ty) (3::Integer)).+But if we have a list like+ [4,2,3,2,4,4,2]::[Int]+we use a lot of compile time and space generating and solving all those Num+constraints, and generating calls to fromInteger etc. Better just to cut to+the chase, and cough up an Int literal. Large collections of literals like this+sometimes appear in source files, so it's quite a worthwhile fix.++So we try to take advantage of whatever nearby type information we have,+to short-cut the process for built-in types. We can do this in two places;++* In the typechecker, when we are about to typecheck the literal.+* If that fails, in the desugarer, once we know the final type.+-}++tcShortCutLit :: HsOverLit GhcRn -> ExpRhoType -> TcM (Maybe (HsOverLit GhcTc))+tcShortCutLit lit@(OverLit { ol_val = val, ol_ext = OverLitRn rebindable _}) exp_res_ty+ | not rebindable+ , Just res_ty <- checkingExpType_maybe exp_res_ty+ = do { dflags <- getDynFlags+ ; let platform = targetPlatform dflags+ ; case shortCutLit platform val res_ty of+ Just expr -> return $ Just $+ lit { ol_ext = OverLitTc False expr res_ty }+ Nothing -> return Nothing }+ | otherwise+ = return Nothing++shortCutLit :: Platform -> OverLitVal -> TcType -> Maybe (HsExpr GhcTc)+shortCutLit platform val res_ty+ = case val of+ HsIntegral int_lit -> go_integral int_lit+ HsFractional frac_lit -> go_fractional frac_lit+ HsIsString s src -> go_string s src+ where+ go_integral int@(IL src neg i)+ | isIntTy res_ty && platformInIntRange platform i+ = Just (HsLit noAnn (HsInt noExtField int))+ | isWordTy res_ty && platformInWordRange platform i+ = Just (mkLit wordDataCon (HsWordPrim src i))+ | isIntegerTy res_ty+ = Just (HsLit noAnn (HsInteger src i res_ty))+ | otherwise+ = go_fractional (integralFractionalLit neg i)+ -- The 'otherwise' case is important+ -- Consider (3 :: Float). Syntactically it looks like an IntLit,+ -- so we'll call shortCutIntLit, but of course it's a float+ -- This can make a big difference for programs with a lot of+ -- literals, compiled without -O++ go_fractional f+ | isFloatTy res_ty && valueInRange = Just (mkLit floatDataCon (HsFloatPrim noExtField f))+ | isDoubleTy res_ty && valueInRange = Just (mkLit doubleDataCon (HsDoublePrim noExtField f))+ | otherwise = Nothing+ where+ valueInRange =+ case f of+ FL { fl_exp = e } -> (-100) <= e && e <= 100+ -- We limit short-cutting Fractional Literals to when their power of 10+ -- is less than 100, which ensures desugaring isn't slow.++ go_string src s+ | isStringTy res_ty = Just (HsLit noAnn (HsString src s))+ | otherwise = Nothing++mkLit :: DataCon -> HsLit GhcTc -> HsExpr GhcTc+mkLit con lit = HsApp noComments (nlHsDataCon con) (nlHsLit lit)++------------------------------+hsOverLitName :: OverLitVal -> Name+-- Get the canonical 'fromX' name for a particular OverLitVal+hsOverLitName (HsIntegral {}) = fromIntegerName+hsOverLitName (HsFractional {}) = fromRationalName+hsOverLitName (HsIsString {}) = fromStringName+++{- *********************************************************************+* *+ Promotion+* *+********************************************************************* -}++promoteMetaTyVarTo :: HasDebugCallStack => TcLevel -> TcTyVar -> TcM Bool+-- When we float a constraint out of an implication we must restore+-- invariant (WantedInv) in Note [TcLevel invariants] in GHC.Tc.Utils.TcType+-- Return True <=> we did some promotion+-- Also returns either the original tyvar (no promotion) or the new one+-- See Note [Promoting unification variables]+promoteMetaTyVarTo tclvl tv+ | assertPpr (isMetaTyVar tv) (ppr tv) $+ tcTyVarLevel tv `strictlyDeeperThan` tclvl+ = do { cloned_tv <- cloneMetaTyVar tv+ ; let rhs_tv = setMetaTyVarTcLevel cloned_tv tclvl+ ; liftZonkM $ writeMetaTyVar tv (mkTyVarTy rhs_tv)+ ; traceTc "promoteTyVar" (ppr tv <+> text "-->" <+> ppr rhs_tv)+ ; return True }+ | otherwise+ = return False++-- Returns whether or not *any* tyvar is defaulted+promoteTyVarSet :: HasDebugCallStack => TcTyVarSet -> TcM Bool+promoteTyVarSet tvs+ = do { tclvl <- getTcLevel+ ; bools <- mapM (promoteMetaTyVarTo tclvl) $+ filter isPromotableMetaTyVar $+ nonDetEltsUniqSet tvs+ -- Non-determinism is OK because order of promotion doesn't matter+ ; return (or bools) }++{-+%************************************************************************+%* *+ Representation polymorphism checks+* *+***********************************************************************-}++-- | Check that the specified type has a fixed runtime representation.+--+-- If it isn't, throw a representation-polymorphism error appropriate+-- for the context (as specified by the 'FixedRuntimeRepProvenance').+--+-- Unlike the other representation polymorphism checks, which can emit+-- new Wanted constraints to be solved by the constraint solver, this function+-- does not emit any constraints: it has enough information to immediately+-- make a decision.+--+-- See (1) in Note [Representation polymorphism checking] in GHC.Tc.Utils.Concrete+checkTypeHasFixedRuntimeRep :: FixedRuntimeRepProvenance -> Type -> TcM ()+checkTypeHasFixedRuntimeRep prov ty =+ unless (typeHasFixedRuntimeRep ty)+ (addDetailedDiagnostic $ TcRnTypeDoesNotHaveFixedRuntimeRep ty prov)++{-+%************************************************************************+%* *+ Error messages+* *+*************************************************************************++-}++-- See Note [Naughty quantification candidates]+naughtyQuantification :: TcType -- original type user wanted to quantify+ -> TcTyVar -- naughty var+ -> TyVarSet -- skolems that would escape+ -> TcM a+naughtyQuantification orig_ty tv escapees+ = do { (orig_ty1, escapees') <- liftZonkM $+ do { orig_ty1 <- zonkTcType orig_ty -- in case it's not zonked+ ; escapees' <- zonkTcTyVarsToTcTyVars $+ nonDetEltsUniqSet escapees+ -- we'll just be printing, so no harmful non-determinism+ ; return (orig_ty1, escapees') }++ ; let fvs = tyCoVarsOfTypeWellScoped orig_ty1+ env0 = tidyFreeTyCoVars emptyTidyEnv fvs+ env = env0 `delTidyEnvList` escapees'+ -- this avoids gratuitous renaming of the escaped+ -- variables; very confusing to users!++ orig_ty' = tidyType env orig_ty1+ tidied = map (tidyTyCoVarOcc env) escapees'+ msg = TcRnSkolemEscape tidied (tidyTyCoVarOcc env tv) orig_ty'++ ; failWithTcM (env, msg) }
GHC/Tc/Utils/TcType.hs view
@@ -31,6 +31,7 @@ ExpTypeFRR, ExpSigmaType, ExpSigmaTypeFRR, ExpRhoType, mkCheckExpType,+ checkingExpType_maybe, checkingExpType, SyntaxOpType(..), synKnownType, mkSynFunTys, @@ -38,7 +39,7 @@ -- TcLevel TcLevel(..), topTcLevel, pushTcLevel, isTopTcLevel, strictlyDeeperThan, deeperThanOrSame, sameDepthAs,- tcTypeLevel, tcTyVarLevel, maxTcLevel,+ tcTypeLevel, tcTyVarLevel, maxTcLevel, minTcLevel, -------------------------------- -- MetaDetails@@ -47,7 +48,7 @@ isImmutableTyVar, isSkolemTyVar, isMetaTyVar, isMetaTyVarTy, isTyVarTy, tcIsTcTyVar, isTyVarTyVar, isOverlappableTyVar, isTyConableTyVar, ConcreteTvOrigin(..), isConcreteTyVar_maybe, isConcreteTyVar,- isConcreteTyVarTy, isConcreteTyVarTy_maybe,+ isConcreteTyVarTy, isConcreteTyVarTy_maybe, isConcreteInfo, isAmbiguousTyVar, isCycleBreakerTyVar, metaTyVarRef, metaTyVarInfo, isFlexi, isIndirect, isRuntimeUnkSkol, metaTyVarTcLevel, setMetaTyVarTcLevel, metaTyVarTcLevel_maybe,@@ -72,7 +73,7 @@ tcSplitTyConApp, tcSplitTyConApp_maybe, tcTyConAppTyCon, tcTyConAppTyCon_maybe, tcTyConAppArgs, tcSplitAppTy_maybe, tcSplitAppTy, tcSplitAppTys, tcSplitAppTyNoView_maybe,- tcSplitSigmaTy, tcSplitNestedSigmaTys,+ tcSplitSigmaTy, tcSplitNestedSigmaTys, tcSplitIOType_maybe, --------------------------------- -- Predicates.@@ -84,7 +85,7 @@ isTauTy, isTauTyCon, tcIsTyVarTy, isPredTy, isTyVarClassPred, checkValidClsArgs, hasTyVarHead,- isRigidTy,+ isRigidTy, anyTy_maybe, -- Re-exported from GHC.Core.TyCo.Compare@@ -97,8 +98,6 @@ -- Misc type manipulators deNoteType,- orphNamesOfType, orphNamesOfCo,- orphNamesOfTypes, orphNamesOfCoCon, getDFunTyKey, evVarPred, ambigTkvsOfTy, @@ -117,23 +116,9 @@ anyRewritableTyVar, anyRewritableTyFamApp, ---------------------------------- -- Foreign import and export- IllegalForeignTypeReason(..),- TypeCannotBeMarshaledReason(..),- isFFIArgumentTy, -- :: DynFlags -> Safety -> Type -> Bool- isFFIImportResultTy, -- :: DynFlags -> Type -> Bool- isFFIExportResultTy, -- :: Type -> Bool- isFFIExternalTy, -- :: Type -> Bool- isFFIDynTy, -- :: Type -> Type -> Bool- isFFIPrimArgumentTy, -- :: DynFlags -> Type -> Bool- isFFIPrimResultTy, -- :: DynFlags -> Type -> Bool- isFFILabelTy, -- :: Type -> Bool- isFunPtrTy, -- :: Type -> Bool- tcSplitIOType_maybe, -- :: Type -> Maybe Type-- --------------------------------- -- Patersons sizes- PatersonSize(..), PatersonSizeFailure(..),+ PatersonSize(..), PatersonCondFailure(..),+ PatersonCondFailureContext(..), ltPatersonSize, pSizeZero, pSizeOne, pSizeType, pSizeTypeX, pSizeTypes,@@ -163,8 +148,8 @@ mkTyConTy, mkTyVarTy, mkTyVarTys, mkTyCoVarTy, mkTyCoVarTys, - isClassPred, isEqPrimPred, isIPLikePred, isEqPred, isEqPredClass,- mkClassPred,+ isClassPred, isEqPrimPred, isIPLikePred, isEqPred,+ isEqualityClass, mkClassPred, tcSplitQuantPredTy, tcSplitDFunTy, tcSplitDFunHead, tcSplitMethodTy, isRuntimeRepVar, isFixedRuntimeRepKind, isVisiblePiTyBinder, isInvisiblePiTyBinder,@@ -207,7 +192,7 @@ --------------------------------- -- argument visibility- tcTyConVisibilities, isNextTyConArgVisible, isNextArgVisible+ tyConVisibilities, isNextTyConArgVisible, isNextArgVisible ) where @@ -221,12 +206,10 @@ import GHC.Core.TyCo.Ppr import GHC.Core.Class import GHC.Types.Var-import GHC.Types.ForeignCall import GHC.Types.Var.Set import GHC.Core.Coercion import GHC.Core.Type as Type import GHC.Core.Predicate-import GHC.Types.RepType import GHC.Core.TyCon import {-# SOURCE #-} GHC.Tc.Types.Origin@@ -234,14 +217,12 @@ , FixedRuntimeRepOrigin, FixedRuntimeRepContext ) -- others:-import GHC.Driver.Session-import GHC.Core.FVs import GHC.Types.Name as Name -- We use this to make dictionaries for type literals. -- Perhaps there's a better way to do this? import GHC.Types.Name.Set import GHC.Builtin.Names-import GHC.Builtin.Types ( coercibleClass, eqClass, heqClass, unitTyCon, unitTyConKey+import GHC.Builtin.Types ( coercibleClass, eqClass, heqClass, unitTyConKey , listTyCon, constraintKind ) import GHC.Types.Basic import GHC.Utils.Misc@@ -250,15 +231,11 @@ import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Panic.Plain-import GHC.Utils.Error( Validity'(..) )-import GHC.Utils.Unique (anyOfUnique)-import qualified GHC.LanguageExtensions as LangExt -import Data.IORef+import Data.IORef ( IORef ) import Data.List.NonEmpty( NonEmpty(..) ) import Data.List ( partition, nub, (\\) ) -import GHC.Generics ( Generic ) {- ************************************************************************@@ -372,7 +349,7 @@ type TcInvisTVBinder = InvisTVBinder type TcReqTVBinder = ReqTVBinder --- See Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon]+-- See Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon] in GHC.Tc.TyCl type TcTyCon = TyCon type MonoTcTyCon = TcTyCon type PolyTcTyCon = TcTyCon@@ -406,51 +383,7 @@ type TcDTyVarSet = DTyVarSet type TcDTyCoVarSet = DTyCoVarSet -{- Note [TcTyCon, MonoTcTyCon, and PolyTcTyCon]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See Note [How TcTyCons work] in GHC.Tc.TyCl -Invariants:--* TcTyCon: a TyCon built with the TcTyCon constructor--* TcTyConBinder: a TyConBinder with a TcTyVar inside (not a TyVar)--* TcTyCons contain TcTyVars--* MonoTcTyCon:- - Flag tcTyConIsPoly = False-- - tyConScopedTyVars is important; maps a Name to a TyVarTv unification variable- The order is important: Specified then Required variables. E.g. in- data T a (b :: k) = ...- the order will be [k, a, b].-- NB: There are no Inferred binders in tyConScopedTyVars; 'a' may- also be poly-kinded, but that kind variable will be added by- generaliseTcTyCon, in the passage to a PolyTcTyCon.-- - tyConBinders are irrelevant; we just use tcTyConScopedTyVars- Well not /quite/ irrelevant: its length gives the number of Required binders,- and so allows up to distinguish between the Specified and Required elements of- tyConScopedTyVars.--* PolyTcTyCon:- - Flag tcTyConIsPoly = True; this is used only to short-cut zonking-- - tyConBinders are still TcTyConBinders, but they are /skolem/ TcTyVars,- with fixed kinds, and accurate skolem info: no unification variables here-- tyConBinders includes the Inferred binders if any-- tyConBinders uses the Names from the original, renamed program.-- - tcTyConScopedTyVars is irrelevant: just use (binderVars tyConBinders)- All the types have been swizzled back to use the original Names- See Note [tyConBinders and lexical scoping] in GHC.Core.TyCon---}- {- ********************************************************************* * * ExpType: an "expected type" in the type checker@@ -513,7 +446,17 @@ mkCheckExpType :: TcType -> ExpType mkCheckExpType = Check +-- | Returns the expected type when in checking mode.+checkingExpType_maybe :: ExpType -> Maybe TcType+checkingExpType_maybe (Check ty) = Just ty+checkingExpType_maybe (Infer {}) = Nothing +-- | Returns the expected type when in checking mode. Panics if in inference+-- mode.+checkingExpType :: String -> ExpType -> TcType+checkingExpType _ (Check ty) = ty+checkingExpType err et = pprPanic "checkingExpType" (text err $$ ppr et)+ {- ********************************************************************* * * SyntaxOpType@@ -657,7 +600,7 @@ | Indirect TcType -- | What restrictions are on this metavariable around unification?--- These are checked in GHC.Tc.Utils.Unify.startSolvingByUnification.+-- These are checked in GHC.Tc.Utils.Unify.checkTopShape data MetaInfo = TauTv -- ^ This MetaTv is an ordinary unification variable -- A TauTv is always filled in with a tau-type, which@@ -672,7 +615,7 @@ | CycleBreakerTv -- Used to fix occurs-check problems in Givens -- See Note [Type equality cycles] in- -- GHC.Tc.Solver.Canonical+ -- GHC.Tc.Solver.Equality | ConcreteTv ConcreteTvOrigin -- ^ A unification variable that can only be unified@@ -719,6 +662,9 @@ and each Implication has a level number (of type TcLevel) +* INVARIANT (KindInv) Given a type variable (tv::ki) at at level L,+ the free vars of `ki` all have level <= L+ * INVARIANTS. In a tree of Implications, (ImplicInv) The level number (ic_tclvl) of an Implication is@@ -801,6 +747,9 @@ maxTcLevel :: TcLevel -> TcLevel -> TcLevel maxTcLevel (TcLevel a) (TcLevel b) = TcLevel (a `max` b) +minTcLevel :: TcLevel -> TcLevel -> TcLevel+minTcLevel (TcLevel a) (TcLevel b) = TcLevel (a `min` b)+ topTcLevel :: TcLevel -- See Note [TcLevel assignment] topTcLevel = TcLevel 0 -- 0 = outermost level@@ -1204,6 +1153,10 @@ | otherwise = Nothing +isConcreteInfo :: MetaInfo -> Bool+isConcreteInfo (ConcreteTv {}) = True+isConcreteInfo _ = False+ -- | Is this type variable a concrete type variable, i.e. -- it is a metavariable with 'ConcreteTv' 'MetaInfo'? isConcreteTyVar :: TcTyVar -> Bool@@ -1373,7 +1326,7 @@ -- Always succeeds, even if it returns an empty list. tcSplitPiTys :: Type -> ([PiTyVarBinder], Type) tcSplitPiTys ty- = assert (all isTyBinder (fst sty) ) -- No CoVar binders here+ = assert (all isTyBinder (fst sty)) -- No CoVar binders here sty where sty = splitPiTys ty @@ -1396,7 +1349,7 @@ -- returning just the tyvars. tcSplitForAllTyVars :: Type -> ([TyVar], Type) tcSplitForAllTyVars ty- = assert (all isTyVar (fst sty) ) sty+ = assert (all isTyVar (fst sty)) sty where sty = splitForAllTyCoVars ty -- | Like 'tcSplitForAllTyVars', but only splits 'ForAllTy's with 'Invisible'@@ -1850,7 +1803,7 @@ Notice that in the recursive-superclass case we include C again at the end of the chain. One could exclude C in this case, but the code is more awkward and there seems no good reason to do so.-(However C.f. GHC.Tc.Solver.Canonical.mk_strict_superclasses, which /does/+(However C.f. GHC.Tc.Solver.Dict.mk_strict_superclasses, which /does/ appear to do so.) The algorithm is expand( so_far, pred ):@@ -2048,251 +2001,8 @@ _ -> Nothing --- | Reason why a type in an FFI signature is invalid-data IllegalForeignTypeReason- = TypeCannotBeMarshaled !Type TypeCannotBeMarshaledReason- | ForeignDynNotPtr- !Type -- ^ Expected type- !Type -- ^ Actual type- | SafeHaskellMustBeInIO- | IOResultExpected- | UnexpectedNestedForall- | LinearTypesNotAllowed- | OneArgExpected- | AtLeastOneArgExpected- deriving Generic --- | Reason why a type cannot be marshalled through the FFI.-data TypeCannotBeMarshaledReason- = NotADataType- | NewtypeDataConNotInScope !(Maybe TyCon)- | UnliftedFFITypesNeeded- | NotABoxedMarshalableTyCon- | ForeignLabelNotAPtr- | NotSimpleUnliftedType- | NotBoxedKindAny- deriving Generic--isFFIArgumentTy :: DynFlags -> Safety -> Type -> Validity' IllegalForeignTypeReason--- Checks for valid argument type for a 'foreign import'-isFFIArgumentTy dflags safety ty- = checkRepTyCon (legalOutgoingTyCon dflags safety) ty--isFFIExternalTy :: Type -> Validity' IllegalForeignTypeReason--- Types that are allowed as arguments of a 'foreign export'-isFFIExternalTy ty = checkRepTyCon legalFEArgTyCon ty--isFFIImportResultTy :: DynFlags -> Type -> Validity' IllegalForeignTypeReason-isFFIImportResultTy dflags ty- = checkRepTyCon (legalFIResultTyCon dflags) ty--isFFIExportResultTy :: Type -> Validity' IllegalForeignTypeReason-isFFIExportResultTy ty = checkRepTyCon legalFEResultTyCon ty--isFFIDynTy :: Type -> Type -> Validity' IllegalForeignTypeReason--- The type in a foreign import dynamic must be Ptr, FunPtr, or a newtype of--- either, and the wrapped function type must be equal to the given type.--- We assume that all types have been run through normaliseFfiType, so we don't--- need to worry about expanding newtypes here.-isFFIDynTy expected ty- -- Note [Foreign import dynamic]- -- In the example below, expected would be 'CInt -> IO ()', while ty would- -- be 'FunPtr (CDouble -> IO ())'.- | Just (tc, [ty']) <- splitTyConApp_maybe ty- , anyOfUnique tc [ptrTyConKey, funPtrTyConKey]- , eqType ty' expected- = IsValid- | otherwise- = NotValid (ForeignDynNotPtr expected ty)--isFFILabelTy :: Type -> Validity' IllegalForeignTypeReason--- The type of a foreign label must be Ptr, FunPtr, or a newtype of either.-isFFILabelTy ty = checkRepTyCon ok ty- where- ok tc | tc `hasKey` funPtrTyConKey || tc `hasKey` ptrTyConKey- = IsValid- | otherwise- = NotValid ForeignLabelNotAPtr---- | Check validity for a type of the form @Any :: k@.------ This function returns:------ - @Just IsValid@ for @Any :: Type@ and @Any :: UnliftedType@,--- - @Just (NotValid ..)@ for @Any :: k@ if @k@ is not a kind of boxed types,--- - @Nothing@ if the type is not @Any@.-checkAnyTy :: Type -> Maybe (Validity' IllegalForeignTypeReason)-checkAnyTy ty- | Just ki <- anyTy_maybe ty- = Just $- if isJust $ kindBoxedRepLevity_maybe ki- then IsValid- -- NB: don't allow things like @Any :: TYPE IntRep@, as per #21305.- else NotValid (TypeCannotBeMarshaled ty NotBoxedKindAny)- | otherwise- = Nothing--isFFIPrimArgumentTy :: DynFlags -> Type -> Validity' IllegalForeignTypeReason--- Checks for valid argument type for a 'foreign import prim'--- Currently they must all be simple unlifted types, or Any (at kind Type or UnliftedType),--- which can be used to pass the address to a Haskell object on the heap to--- the foreign function.-isFFIPrimArgumentTy dflags ty- | Just validity <- checkAnyTy ty- = validity- | otherwise- = checkRepTyCon (legalFIPrimArgTyCon dflags) ty--isFFIPrimResultTy :: DynFlags -> Type -> Validity' IllegalForeignTypeReason--- Checks for valid result type for a 'foreign import prim' Currently--- it must be an unlifted type, including unboxed tuples, unboxed--- sums, or the well-known type Any (at kind Type or UnliftedType).-isFFIPrimResultTy dflags ty- | Just validity <- checkAnyTy ty- = validity- | otherwise- = checkRepTyCon (legalFIPrimResultTyCon dflags) ty--isFunPtrTy :: Type -> Bool-isFunPtrTy ty- | Just (tc, [_]) <- splitTyConApp_maybe ty- = tc `hasKey` funPtrTyConKey- | otherwise- = False---- normaliseFfiType gets run before checkRepTyCon, so we don't--- need to worry about looking through newtypes or type functions--- here; that's already been taken care of.-checkRepTyCon- :: (TyCon -> Validity' TypeCannotBeMarshaledReason)- -> Type- -> Validity' IllegalForeignTypeReason-checkRepTyCon check_tc ty- = fmap (TypeCannotBeMarshaled ty) $ case splitTyConApp_maybe ty of- Just (tc, tys)- | isNewTyCon tc -> NotValid (mk_nt_reason tc tys)- | otherwise -> check_tc tc- Nothing -> NotValid NotADataType- where- mk_nt_reason tc tys- | null tys = NewtypeDataConNotInScope Nothing- | otherwise = NewtypeDataConNotInScope (Just tc)- {--Note [Foreign import dynamic]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-A dynamic stub must be of the form 'FunPtr ft -> ft' where ft is any foreign-type. Similarly, a wrapper stub must be of the form 'ft -> IO (FunPtr ft)'.--We use isFFIDynTy to check whether a signature is well-formed. For example,-given a (illegal) declaration like:--foreign import ccall "dynamic"- foo :: FunPtr (CDouble -> IO ()) -> CInt -> IO ()--isFFIDynTy will compare the 'FunPtr' type 'CDouble -> IO ()' with the curried-result type 'CInt -> IO ()', and return False, as they are not equal.--------------------------------------------------These chaps do the work; they are not exported-------------------------------------------------}--legalFEArgTyCon :: TyCon -> Validity' TypeCannotBeMarshaledReason-legalFEArgTyCon tc- -- It's illegal to make foreign exports that take unboxed- -- arguments. The RTS API currently can't invoke such things. --SDM 7/2000- = boxedMarshalableTyCon tc--legalFIResultTyCon :: DynFlags -> TyCon -> Validity' TypeCannotBeMarshaledReason-legalFIResultTyCon dflags tc- | tc == unitTyCon = IsValid- | otherwise = marshalableTyCon dflags tc--legalFEResultTyCon :: TyCon -> Validity' TypeCannotBeMarshaledReason-legalFEResultTyCon tc- | tc == unitTyCon = IsValid- | otherwise = boxedMarshalableTyCon tc--legalOutgoingTyCon :: DynFlags -> Safety -> TyCon -> Validity' TypeCannotBeMarshaledReason--- Checks validity of types going from Haskell -> external world-legalOutgoingTyCon dflags _ tc- = marshalableTyCon dflags tc---- Check for marshalability of a primitive type.--- We exclude lifted types such as RealWorld and TYPE.--- They can technically appear in types, e.g.--- f :: RealWorld -> TYPE LiftedRep -> RealWorld--- f x _ = x--- but there are no values of type RealWorld or TYPE LiftedRep,--- so it doesn't make sense to use them in FFI.-marshalablePrimTyCon :: TyCon -> Bool-marshalablePrimTyCon tc = isPrimTyCon tc && not (isLiftedTypeKind (tyConResKind tc))--marshalableTyCon :: DynFlags -> TyCon -> Validity' TypeCannotBeMarshaledReason-marshalableTyCon dflags tc- | marshalablePrimTyCon tc- , not (null (tyConPrimRep tc)) -- Note [Marshalling void]- = validIfUnliftedFFITypes dflags- | otherwise- = boxedMarshalableTyCon tc--boxedMarshalableTyCon :: TyCon -> Validity' TypeCannotBeMarshaledReason-boxedMarshalableTyCon tc- | anyOfUnique tc [ intTyConKey, int8TyConKey, int16TyConKey- , int32TyConKey, int64TyConKey- , wordTyConKey, word8TyConKey, word16TyConKey- , word32TyConKey, word64TyConKey- , floatTyConKey, doubleTyConKey- , ptrTyConKey, funPtrTyConKey- , charTyConKey- , stablePtrTyConKey- , boolTyConKey- ]- = IsValid-- | otherwise = NotValid NotABoxedMarshalableTyCon--legalFIPrimArgTyCon :: DynFlags -> TyCon -> Validity' TypeCannotBeMarshaledReason--- Check args of 'foreign import prim', only allow simple unlifted types.-legalFIPrimArgTyCon dflags tc- | marshalablePrimTyCon tc- = validIfUnliftedFFITypes dflags- | otherwise- = NotValid NotSimpleUnliftedType--legalFIPrimResultTyCon :: DynFlags -> TyCon -> Validity' TypeCannotBeMarshaledReason--- Check result type of 'foreign import prim'. Allow simple unlifted--- types and also unboxed tuple and sum result types.-legalFIPrimResultTyCon dflags tc- | marshalablePrimTyCon tc- , not (null (tyConPrimRep tc)) -- Note [Marshalling void]- = validIfUnliftedFFITypes dflags-- | isUnboxedTupleTyCon tc || isUnboxedSumTyCon tc- = validIfUnliftedFFITypes dflags-- | otherwise- = NotValid $ NotSimpleUnliftedType--validIfUnliftedFFITypes :: DynFlags -> Validity' TypeCannotBeMarshaledReason-validIfUnliftedFFITypes dflags- | xopt LangExt.UnliftedFFITypes dflags = IsValid- | otherwise = NotValid UnliftedFFITypesNeeded--{--Note [Marshalling void]-~~~~~~~~~~~~~~~~~~~~~~~-We don't treat State# (whose PrimRep is VoidRep) as marshalable.-In turn that means you can't write- foreign import foo :: Int -> State# RealWorld--Reason: the back end falls over with panic "primRepHint:VoidRep";- and there is no compelling reason to permit it--}--{- ************************************************************************ * * Visiblities@@ -2303,8 +2013,8 @@ -- | For every arg a tycon can take, the returned list says True if the argument -- is taken visibly, and False otherwise. Ends with an infinite tail of Trues to -- allow for oversaturation.-tcTyConVisibilities :: TyCon -> [Bool]-tcTyConVisibilities tc = tc_binder_viss ++ tc_return_kind_viss ++ repeat True+tyConVisibilities :: TyCon -> [Bool]+tyConVisibilities tc = tc_binder_viss ++ tc_return_kind_viss ++ repeat True where tc_binder_viss = map isVisibleTyConBinder (tyConBinders tc) tc_return_kind_viss = map isVisiblePiTyBinder (fst $ tcSplitPiTys (tyConResKind tc))@@ -2312,13 +2022,14 @@ -- | If the tycon is applied to the types, is the next argument visible? isNextTyConArgVisible :: TyCon -> [Type] -> Bool isNextTyConArgVisible tc tys- = tcTyConVisibilities tc `getNth` length tys+ = tyConVisibilities tc `getNth` length tys -- | Should this type be applied to a visible argument?+-- E.g. (s t): is `t` a visible argument of `s`? isNextArgVisible :: TcType -> Bool isNextArgVisible ty- | Just (bndr, _) <- tcSplitPiTy_maybe ty = isVisiblePiTyBinder bndr- | otherwise = True+ | Just (bndr, _) <- tcSplitPiTy_maybe (typeKind ty) = isVisiblePiTyBinder bndr+ | otherwise = True -- this second case might happen if, say, we have an unzonked TauTv. -- But TauTvs can't range over types that take invisible arguments @@ -2387,18 +2098,29 @@ has a separate call to isStuckTypeFamily, so the `F` above will still be accepted. -} ---- | Why was the LHS 'PatersonSize' not strictly smaller than the RHS 'PatersonSize'?+-- | Why did the Paterson conditions fail; that is, why+-- was the context P not Paterson-smaller than the head H? -- -- See Note [Paterson conditions] in GHC.Tc.Validity.-data PatersonSizeFailure- -- | Either side contains a type family.- = PSF_TyFam TyCon- -- | The size of the LHS is not strictly less than the size of the RHS.- | PSF_Size- -- | These type variables appear more often in the LHS than in the RHS.- | PSF_TyVar [TyVar] -- ^ no duplicates in this list+data PatersonCondFailure+ -- | Some type variables occur more often in P than in H.+ -- See (PC1) in Note [Paterson conditions] in GHC.Tc.Validity.+ = PCF_TyVar+ [TyVar] -- ^ the type variables which appear more often in the context+ -- | P is not smaller in size than H.+ -- See (PC2) in Note [Paterson conditions] in GHC.Tc.Validity.+ | PCF_Size+ -- | P contains a type family.+ -- See (PC3) in Note [Paterson conditions] in GHC.Tc.Validity.+ | PCF_TyFam+ TyCon -- ^ the type constructor of the type family +-- | Indicates whether a Paterson condition failure occurred in an instance declaration or a type family equation.+-- Useful for differentiating context in error messages.+data PatersonCondFailureContext+ = InInstanceDecl+ | InTyFamEquation+ -------------------------------------- -- | The Paterson size of a given type, in the sense of@@ -2409,7 +2131,6 @@ data PatersonSize -- | The type mentions a type family, so the size could be anything. = PS_TyFam TyCon- -- | The type does not mention a type family. | PS_Vanilla { ps_tvs :: [TyVar] -- ^ free tyvars, including repetitions; , ps_size :: Int -- ^ number of type constructors and variables@@ -2432,14 +2153,14 @@ -- - @Just ps_fail@ otherwise; @ps_fail@ says what went wrong. ltPatersonSize :: PatersonSize -> PatersonSize- -> Maybe PatersonSizeFailure+ -> Maybe PatersonCondFailure ltPatersonSize (PS_Vanilla { ps_tvs = tvs1, ps_size = s1 }) (PS_Vanilla { ps_tvs = tvs2, ps_size = s2 })- | s1 >= s2 = Just PSF_Size- | bad_tvs@(_:_) <- noMoreTyVars tvs1 tvs2 = Just (PSF_TyVar bad_tvs)+ | s1 >= s2 = Just PCF_Size+ | bad_tvs@(_:_) <- noMoreTyVars tvs1 tvs2 = Just (PCF_TyVar bad_tvs) | otherwise = Nothing -- OK!-ltPatersonSize (PS_TyFam tc) _ = Just (PSF_TyFam tc)-ltPatersonSize _ (PS_TyFam tc) = Just (PSF_TyFam tc)+ltPatersonSize (PS_TyFam tc) _ = Just (PCF_TyFam tc)+ltPatersonSize _ (PS_TyFam tc) = Just (PCF_TyFam tc) -- NB: this last equation is never taken when checking instances, because -- type families are disallowed in instance heads. --@@ -2533,11 +2254,11 @@ = isIPClass cls -- Implicit parameter constraints always terminate because -- there are no instances for them --- they are only solved -- by "local instances" in expressions- || isEqPredClass cls+ || isEqualityClass cls || cls `hasKey` typeableClassKey -- Typeable constraints are bigger than they appear due -- to kind polymorphism, but we can never get instance divergence this way- || cls `hasKey` coercibleTyConKey+ || cls `hasKey` unsatisfiableClassNameKey allDistinctTyVars :: TyVarSet -> [KindOrType] -> Bool -- (allDistinctTyVars tvs tys) returns True if tys are
GHC/Tc/Utils/Unify.hs view
@@ -1,2722 +1,3276 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE RecursiveDo #-}--{--(c) The University of Glasgow 2006-(c) The GRASP/AQUA Project, Glasgow University, 1992-1998--}---- | Type subsumption and unification-module GHC.Tc.Utils.Unify (- -- Full-blown subsumption- tcWrapResult, tcWrapResultO, tcWrapResultMono,- tcTopSkolemise, tcSkolemiseScoped, tcSkolemiseExpType,- tcSubType, tcSubTypeSigma, tcSubTypePat, tcSubTypeDS,- tcSubTypeAmbiguity, tcSubMult,- checkConstraints, checkTvConstraints,- buildImplicationFor, buildTvImplication, emitResidualTvConstraint,-- -- Various unifications- unifyType, unifyKind, unifyExpectedType,- uType, promoteTcType,- swapOverTyVars, startSolvingByUnification,-- --------------------------------- -- Holes- tcInfer,- matchExpectedListTy,- matchExpectedTyConApp,- matchExpectedAppTy,- matchExpectedFunTys,- matchExpectedFunKind,- matchActualFunTySigma, matchActualFunTysRho,-- checkTyVarEq, checkTyFamEq, checkTypeEq-- ) where--import GHC.Prelude--import GHC.Hs--import GHC.Tc.Utils.Concrete ( hasFixedRuntimeRep, makeTypeConcrete, hasFixedRuntimeRep_syntactic )-import GHC.Tc.Utils.Env-import GHC.Tc.Utils.Instantiate-import GHC.Tc.Utils.Monad-import GHC.Tc.Utils.TcMType-import GHC.Tc.Utils.TcType--import GHC.Core.Type-import GHC.Core.TyCo.Rep-import GHC.Core.TyCo.Ppr( debugPprType )-import GHC.Core.TyCon-import GHC.Core.Coercion-import GHC.Core.Multiplicity--import qualified GHC.LanguageExtensions as LangExt--import GHC.Tc.Types.Evidence-import GHC.Tc.Types.Constraint-import GHC.Tc.Types.Origin-import GHC.Types.Name( Name, isSystemName )--import GHC.Builtin.Types-import GHC.Types.Var as Var-import GHC.Types.Var.Set-import GHC.Types.Var.Env-import GHC.Utils.Error-import GHC.Driver.Session-import GHC.Types.Basic-import GHC.Data.Bag-import GHC.Data.FastString( fsLit )-import GHC.Utils.Misc-import GHC.Utils.Outputable as Outputable-import GHC.Utils.Panic-import GHC.Utils.Panic.Plain--import GHC.Exts ( inline )-import Control.Monad-import qualified Data.Semigroup as S ( (<>) )--{- *********************************************************************-* *- matchActualFunTys-* *-********************************************************************* -}---- | 'matchActualFunTySigma' looks for just one function arrow,--- returning an uninstantiated sigma-type.------ Invariant: the returned argument type has a syntactically fixed--- RuntimeRep in the sense of Note [Fixed RuntimeRep]--- in GHC.Tc.Utils.Concrete.------ See Note [Return arguments with a fixed RuntimeRep].-matchActualFunTySigma- :: ExpectedFunTyOrigin- -- ^ See Note [Herald for matchExpectedFunTys]- -> Maybe TypedThing- -- ^ The thing with type TcSigmaType- -> (Arity, [Scaled TcSigmaType])- -- ^ Total number of value args in the call, and- -- types of values args to which function has- -- been applied already (reversed)- -- (Both are used only for error messages)- -> TcRhoType- -- ^ Type to analyse: a TcRhoType- -> TcM (HsWrapper, Scaled TcSigmaTypeFRR, TcSigmaType)--- This function takes in a type to analyse (a RhoType) and returns--- an argument type and a result type (splitting apart a function arrow).--- The returned argument type is a SigmaType with a fixed RuntimeRep;--- as explained in Note [Return arguments with a fixed RuntimeRep].------ See Note [matchActualFunTy error handling] for the first three arguments---- If (wrap, arg_ty, res_ty) = matchActualFunTySigma ... fun_ty--- then wrap :: fun_ty ~> (arg_ty -> res_ty)--- and NB: res_ty is an (uninstantiated) SigmaType--matchActualFunTySigma herald mb_thing err_info fun_ty- = assertPpr (isRhoTy fun_ty) (ppr fun_ty) $- go fun_ty- where- -- Does not allocate unnecessary meta variables: if the input already is- -- a function, we just take it apart. Not only is this efficient,- -- it's important for higher rank: the argument might be of form- -- (forall a. ty) -> other- -- If allocated (fresh-meta-var1 -> fresh-meta-var2) and unified, we'd- -- hide the forall inside a meta-variable- go :: TcRhoType -- The type we're processing, perhaps after- -- expanding type synonyms- -> TcM (HsWrapper, Scaled TcSigmaTypeFRR, TcSigmaType)- go ty | Just ty' <- coreView ty = go ty'-- go (FunTy { ft_af = af, ft_mult = w, ft_arg = arg_ty, ft_res = res_ty })- = assert (isVisibleFunArg af) $- do { hasFixedRuntimeRep_syntactic (FRRExpectedFunTy herald 1) arg_ty- ; return (idHsWrapper, Scaled w arg_ty, res_ty) }-- go ty@(TyVarTy tv)- | isMetaTyVar tv- = do { cts <- readMetaTyVar tv- ; case cts of- Indirect ty' -> go ty'- Flexi -> defer ty }-- -- In all other cases we bale out into ordinary unification- -- However unlike the meta-tyvar case, we are sure that the- -- number of arguments doesn't match arity of the original- -- type, so we can add a bit more context to the error message- -- (cf #7869).- --- -- It is not always an error, because specialized type may have- -- different arity, for example:- --- -- > f1 = f2 'a'- -- > f2 :: Monad m => m Bool- -- > f2 = undefined- --- -- But in that case we add specialized type into error context- -- anyway, because it may be useful. See also #9605.- go ty = addErrCtxtM (mk_ctxt ty) (defer ty)-- ------------- defer fun_ty- = do { arg_ty <- newOpenFlexiTyVarTy- ; res_ty <- newOpenFlexiTyVarTy- ; mult <- newFlexiTyVarTy multiplicityTy- ; let unif_fun_ty = tcMkVisFunTy mult arg_ty res_ty- ; co <- unifyType mb_thing fun_ty unif_fun_ty- ; hasFixedRuntimeRep_syntactic (FRRExpectedFunTy herald 1) arg_ty- ; return (mkWpCastN co, Scaled mult arg_ty, res_ty) }-- ------------- mk_ctxt :: TcType -> TidyEnv -> TcM (TidyEnv, SDoc)- mk_ctxt res_ty env = mkFunTysMsg env herald (reverse arg_tys_so_far)- res_ty n_val_args_in_call- (n_val_args_in_call, arg_tys_so_far) = err_info--{- Note [matchActualFunTy error handling]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-matchActualFunTySigma is made much more complicated by the-desire to produce good error messages. Consider the application- f @Int x y-In GHC.Tc.Gen.Expr.tcArgs we deal with visible type arguments,-and then call matchActualFunTysPart for each individual value-argument. It, in turn, must instantiate any type/dictionary args,-before looking for an arrow type.--But if it doesn't find an arrow type, it wants to generate a message-like "f is applied to two arguments but its type only has one".-To do that, it needs to know about the args that tcArgs has already-munched up -- hence passing in n_val_args_in_call and arg_tys_so_far;-and hence also the accumulating so_far arg to 'go'.--This allows us (in mk_ctxt) to construct f's /instantiated/ type,-with just the values-arg arrows, which is what we really want-in the error message.--Ugh!--}---- | Like 'matchExpectedFunTys', but used when you have an "actual" type,--- for example in function application.------ INVARIANT: the returned argument types all have a syntactically fixed RuntimeRep--- in the sense of Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete.--- See Note [Return arguments with a fixed RuntimeRep].-matchActualFunTysRho :: ExpectedFunTyOrigin -- ^ See Note [Herald for matchExpectedFunTys]- -> CtOrigin- -> Maybe TypedThing -- ^ the thing with type TcSigmaType- -> Arity- -> TcSigmaType- -> TcM (HsWrapper, [Scaled TcSigmaTypeFRR], TcRhoType)--- If matchActualFunTysRho n ty = (wrap, [t1,..,tn], res_ty)--- then wrap : ty ~> (t1 -> ... -> tn -> res_ty)--- and res_ty is a RhoType--- NB: the returned type is top-instantiated; it's a RhoType-matchActualFunTysRho herald ct_orig mb_thing n_val_args_wanted fun_ty- = go n_val_args_wanted [] fun_ty- where- go n so_far fun_ty- | not (isRhoTy fun_ty)- = do { (wrap1, rho) <- topInstantiate ct_orig fun_ty- ; (wrap2, arg_tys, res_ty) <- go n so_far rho- ; return (wrap2 <.> wrap1, arg_tys, res_ty) }-- go 0 _ fun_ty = return (idHsWrapper, [], fun_ty)-- go n so_far fun_ty- = do { (wrap_fun1, arg_ty1, res_ty1) <- matchActualFunTySigma- herald mb_thing- (n_val_args_wanted, so_far)- fun_ty- ; (wrap_res, arg_tys, res_ty) <- go (n-1) (arg_ty1:so_far) res_ty1- ; let wrap_fun2 = mkWpFun idHsWrapper wrap_res arg_ty1 res_ty- -- NB: arg_ty1 comes from matchActualFunTySigma, so it has- -- a syntactically fixed RuntimeRep as needed to call mkWpFun.- ; return (wrap_fun2 <.> wrap_fun1, arg_ty1:arg_tys, res_ty) }--{--************************************************************************-* *- matchExpected functions-* *-************************************************************************--Note [Herald for matchExpectedFunTys]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The 'herald' always looks like:- "The equation(s) for 'f' have"- "The abstraction (\x.e) takes"- "The section (+ x) expects"- "The function 'f' is applied to"--This is used to construct a message of form-- The abstraction `\Just 1 -> ...' takes two arguments- but its type `Maybe a -> a' has only one-- The equation(s) for `f' have two arguments- but its type `Maybe a -> a' has only one-- The section `(f 3)' requires 'f' to take two arguments- but its type `Int -> Int' has only one-- The function 'f' is applied to two arguments- but its type `Int -> Int' has only one--When visible type applications (e.g., `f @Int 1 2`, as in #13902) enter the-picture, we have a choice in deciding whether to count the type applications as-proper arguments:-- The function 'f' is applied to one visible type argument- and two value arguments- but its type `forall a. a -> a` has only one visible type argument- and one value argument--Or whether to include the type applications as part of the herald itself:-- The expression 'f @Int' is applied to two arguments- but its type `Int -> Int` has only one--The latter is easier to implement and is arguably easier to understand, so we-choose to implement that option.--Note [matchExpectedFunTys]-~~~~~~~~~~~~~~~~~~~~~~~~~~-matchExpectedFunTys checks that a sigma has the form-of an n-ary function. It passes the decomposed type to the-thing_inside, and returns a wrapper to coerce between the two types--It's used wherever a language construct must have a functional type,-namely:- A lambda expression- A function definition- An operator section--This function must be written CPS'd because it needs to fill in the-ExpTypes produced for arguments before it can fill in the ExpType-passed in.--Note [Return arguments with a fixed RuntimeRep]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The functions-- - matchExpectedFunTys,- - matchActualFunTySigma,- - matchActualFunTysRho,--peel off argument types, as explained in Note [matchExpectedFunTys].-It's important that these functions return argument types that have-a fixed runtime representation, otherwise we would be in violation-of the representation-polymorphism invariants of-Note [Representation polymorphism invariants] in GHC.Core.--This is why all these functions have an additional invariant,-that the argument types they return all have a syntactically fixed RuntimeRep,-in the sense of Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete.--Example:-- Suppose we have-- type F :: Type -> RuntimeRep- type family F a where { F Int = LiftedRep }-- type Dual :: Type -> Type- type family Dual a where- Dual a = a -> ()-- f :: forall (a :: TYPE (F Int)). Dual a- f = \ x -> ()-- The body of `f` is a lambda abstraction, so we must be able to split off- one argument type from its type. This is handled by `matchExpectedFunTys`- (see 'GHC.Tc.Gen.Match.tcMatchLambda'). We end up with desugared Core that- looks like this:-- f :: forall (a :: TYPE (F Int)). Dual (a |> (TYPE F[0]))- f = \ @(a :: TYPE (F Int)) ->- (\ (x :: (a |> (TYPE F[0]))) -> ())- `cast`- (Sub (Sym (Dual[0] <(a |> (TYPE F[0]))>)))-- Two important transformations took place:-- 1. We inserted casts around the argument type to ensure that it has- a fixed runtime representation, as required by invariant (I1) from- Note [Representation polymorphism invariants] in GHC.Core.- 2. We inserted a cast around the whole lambda to make everything line up- with the type signature.--}---- | Use this function to split off arguments types when you have an--- \"expected\" type.------ This function skolemises at each polytype.------ Invariant: this function only applies the provided function--- to a list of argument types which all have a syntactically fixed RuntimeRep--- in the sense of Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete.--- See Note [Return arguments with a fixed RuntimeRep].-matchExpectedFunTys :: forall a.- ExpectedFunTyOrigin -- See Note [Herald for matchExpectedFunTys]- -> UserTypeCtxt- -> Arity- -> ExpRhoType -- Skolemised- -> ([Scaled ExpSigmaTypeFRR] -> ExpRhoType -> TcM a)- -> TcM (HsWrapper, a)--- If matchExpectedFunTys n ty = (wrap, _)--- then wrap : (t1 -> ... -> tn -> ty_r) ~> ty,--- where [t1, ..., tn], ty_r are passed to the thing_inside-matchExpectedFunTys herald ctx arity orig_ty thing_inside- = case orig_ty of- Check ty -> go [] arity ty- _ -> defer [] arity orig_ty- where- -- Skolemise any foralls /before/ the zero-arg case- -- so that we guarantee to return a rho-type- go acc_arg_tys n ty- | (tvs, theta, _) <- tcSplitSigmaTy ty- , not (null tvs && null theta)- = do { (wrap_gen, (wrap_res, result)) <- tcTopSkolemise ctx ty $ \ty' ->- go acc_arg_tys n ty'- ; return (wrap_gen <.> wrap_res, result) }-- -- No more args; do this /before/ coreView, so- -- that we do not unnecessarily unwrap synonyms- go acc_arg_tys 0 rho_ty- = do { result <- thing_inside (reverse acc_arg_tys) (mkCheckExpType rho_ty)- ; return (idHsWrapper, result) }-- go acc_arg_tys n ty- | Just ty' <- coreView ty = go acc_arg_tys n ty'-- go acc_arg_tys n (FunTy { ft_af = af, ft_mult = mult, ft_arg = arg_ty, ft_res = res_ty })- = assert (isVisibleFunArg af) $- do { let arg_pos = 1 + length acc_arg_tys -- for error messages only- ; (arg_co, arg_ty) <- hasFixedRuntimeRep (FRRExpectedFunTy herald arg_pos) arg_ty- ; (wrap_res, result) <- go ((Scaled mult $ mkCheckExpType arg_ty) : acc_arg_tys)- (n-1) res_ty- ; let wrap_arg = mkWpCastN arg_co- fun_wrap = mkWpFun wrap_arg wrap_res (Scaled mult arg_ty) res_ty- ; return (fun_wrap, result) }-- go acc_arg_tys n ty@(TyVarTy tv)- | isMetaTyVar tv- = do { cts <- readMetaTyVar tv- ; case cts of- Indirect ty' -> go acc_arg_tys n ty'- Flexi -> defer acc_arg_tys n (mkCheckExpType ty) }-- -- In all other cases we bale out into ordinary unification- -- However unlike the meta-tyvar case, we are sure that the- -- number of arguments doesn't match arity of the original- -- type, so we can add a bit more context to the error message- -- (cf #7869).- --- -- It is not always an error, because specialized type may have- -- different arity, for example:- --- -- > f1 = f2 'a'- -- > f2 :: Monad m => m Bool- -- > f2 = undefined- --- -- But in that case we add specialized type into error context- -- anyway, because it may be useful. See also #9605.- go acc_arg_tys n ty = addErrCtxtM (mk_ctxt acc_arg_tys ty) $- defer acc_arg_tys n (mkCheckExpType ty)-- ------------- defer :: [Scaled ExpSigmaTypeFRR] -> Arity -> ExpRhoType -> TcM (HsWrapper, a)- defer acc_arg_tys n fun_ty- = do { let last_acc_arg_pos = length acc_arg_tys- ; more_arg_tys <- mapM new_exp_arg_ty [last_acc_arg_pos + 1 .. last_acc_arg_pos + n]- ; res_ty <- newInferExpType- ; result <- thing_inside (reverse acc_arg_tys ++ more_arg_tys) res_ty- ; more_arg_tys <- mapM (\(Scaled m t) -> Scaled m <$> readExpType t) more_arg_tys- ; res_ty <- readExpType res_ty- ; let unif_fun_ty = mkScaledFunTys more_arg_tys res_ty- ; wrap <- tcSubType AppOrigin ctx unif_fun_ty fun_ty- -- Not a good origin at all :-(- ; return (wrap, result) }-- new_exp_arg_ty :: Int -> TcM (Scaled ExpSigmaTypeFRR)- new_exp_arg_ty arg_pos -- position for error messages only- = mkScaled <$> newFlexiTyVarTy multiplicityTy- <*> newInferExpTypeFRR (FRRExpectedFunTy herald arg_pos)-- ------------- mk_ctxt :: [Scaled ExpSigmaTypeFRR] -> TcType -> TidyEnv -> TcM (TidyEnv, SDoc)- mk_ctxt arg_tys res_ty env- = mkFunTysMsg env herald arg_tys' res_ty arity- where- arg_tys' = map (\(Scaled u v) -> Scaled u (checkingExpType "matchExpectedFunTys" v)) $- reverse arg_tys- -- this is safe b/c we're called from "go"--mkFunTysMsg :: TidyEnv- -> ExpectedFunTyOrigin- -> [Scaled TcType] -> TcType -> Arity- -> TcM (TidyEnv, SDoc)-mkFunTysMsg env herald arg_tys res_ty n_val_args_in_call- = do { (env', fun_rho) <- zonkTidyTcType env $- mkScaledFunTys arg_tys res_ty-- ; let (all_arg_tys, _) = splitFunTys fun_rho- n_fun_args = length all_arg_tys-- msg | n_val_args_in_call <= n_fun_args -- Enough args, in the end- = text "In the result of a function call"- | otherwise- = hang (full_herald <> comma)- 2 (sep [ text "but its type" <+> quotes (pprType fun_rho)- , if n_fun_args == 0 then text "has none"- else text "has only" <+> speakN n_fun_args])-- ; return (env', msg) }- where- full_herald = pprExpectedFunTyHerald herald- <+> speakNOf n_val_args_in_call (text "value argument")-------------------------matchExpectedListTy :: TcRhoType -> TcM (TcCoercionN, TcRhoType)--- Special case for lists-matchExpectedListTy exp_ty- = do { (co, [elt_ty]) <- matchExpectedTyConApp listTyCon exp_ty- ; return (co, elt_ty) }------------------------matchExpectedTyConApp :: TyCon -- T :: forall kv1 ... kvm. k1 -> ... -> kn -> *- -> TcRhoType -- orig_ty- -> TcM (TcCoercionN, -- T k1 k2 k3 a b c ~N orig_ty- [TcSigmaType]) -- Element types, k1 k2 k3 a b c---- It's used for wired-in tycons, so we call checkWiredInTyCon--- Precondition: never called with FunTyCon--- Precondition: input type :: *--- Postcondition: (T k1 k2 k3 a b c) is well-kinded--matchExpectedTyConApp tc orig_ty- = assertPpr (isAlgTyCon tc) (ppr tc) $- go orig_ty- where- go ty- | Just ty' <- coreView ty- = go ty'-- go ty@(TyConApp tycon args)- | tc == tycon -- Common case- = return (mkNomReflCo ty, args)-- go (TyVarTy tv)- | isMetaTyVar tv- = do { cts <- readMetaTyVar tv- ; case cts of- Indirect ty -> go ty- Flexi -> defer }-- go _ = defer-- -- If the common case does not occur, instantiate a template- -- T k1 .. kn t1 .. tm, and unify with the original type- -- Doing it this way ensures that the types we return are- -- kind-compatible with T. For example, suppose we have- -- matchExpectedTyConApp T (f Maybe)- -- where data T a = MkT a- -- Then we don't want to instantiate T's data constructors with- -- (a::*) ~ Maybe- -- because that'll make types that are utterly ill-kinded.- -- This happened in #7368- defer- = do { (_, arg_tvs) <- newMetaTyVars (tyConTyVars tc)- ; traceTc "matchExpectedTyConApp" (ppr tc $$ ppr (tyConTyVars tc) $$ ppr arg_tvs)- ; let args = mkTyVarTys arg_tvs- tc_template = mkTyConApp tc args- ; co <- unifyType Nothing tc_template orig_ty- ; return (co, args) }-------------------------matchExpectedAppTy :: TcRhoType -- orig_ty- -> TcM (TcCoercion, -- m a ~N orig_ty- (TcSigmaType, TcSigmaType)) -- Returns m, a--- If the incoming type is a mutable type variable of kind k, then--- matchExpectedAppTy returns a new type variable (m: * -> k); note the *.--matchExpectedAppTy orig_ty- = go orig_ty- where- go ty- | Just ty' <- coreView ty = go ty'-- | Just (fun_ty, arg_ty) <- tcSplitAppTy_maybe ty- = return (mkNomReflCo orig_ty, (fun_ty, arg_ty))-- go (TyVarTy tv)- | isMetaTyVar tv- = do { cts <- readMetaTyVar tv- ; case cts of- Indirect ty -> go ty- Flexi -> defer }-- go _ = defer-- -- Defer splitting by generating an equality constraint- defer- = do { ty1 <- newFlexiTyVarTy kind1- ; ty2 <- newFlexiTyVarTy kind2- ; co <- unifyType Nothing (mkAppTy ty1 ty2) orig_ty- ; return (co, (ty1, ty2)) }-- orig_kind = typeKind orig_ty- kind1 = mkVisFunTyMany liftedTypeKind orig_kind- kind2 = liftedTypeKind -- m :: * -> k- -- arg type :: *--{- **********************************************************************-*- fillInferResult-*-********************************************************************** -}--{- Note [inferResultToType]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-expTypeToType and inferResultType convert an InferResult to a monotype.-It must be a monotype because if the InferResult isn't already filled in,-we fill it in with a unification variable (hence monotype). So to preserve-order-independence we check for mono-type-ness even if it *is* filled in-already.--See also Note [TcLevel of ExpType] in GHC.Tc.Utils.TcType, and-Note [fillInferResult].--}---- | Fill an 'InferResult' with the given type.------ If @co = fillInferResult t1 infer_res@, then @co :: t1 ~# t2@,--- where @t2@ is the type stored in the 'ir_ref' field of @infer_res@.------ This function enforces the following invariants:------ - Level invariant.--- The stored type @t2@ is at the same level as given by the--- 'ir_lvl' field.--- - FRR invariant.--- Whenever the 'ir_frr' field is not @Nothing@, @t2@ is guaranteed--- to have a syntactically fixed RuntimeRep, in the sense of--- Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete.-fillInferResult :: TcType -> InferResult -> TcM TcCoercionN-fillInferResult act_res_ty (IR { ir_uniq = u- , ir_lvl = res_lvl- , ir_frr = mb_frr- , ir_ref = ref })- = do { mb_exp_res_ty <- readTcRef ref- ; case mb_exp_res_ty of- Just exp_res_ty- -- We progressively refine the type stored in 'ref',- -- for example when inferring types across multiple equations.- --- -- Example:- --- -- \ x -> case y of { True -> x ; False -> 3 :: Int }- --- -- When inferring the return type of this function, we will create- -- an 'Infer' 'ExpType', which will first be filled by the type of 'x'- -- after typechecking the first equation, and then filled again with- -- the type 'Int', at which point we want to ensure that we unify- -- the type of 'x' with 'Int'. This is what is happening below when- -- we are "joining" several inferred 'ExpType's.- -> do { traceTc "Joining inferred ExpType" $- ppr u <> colon <+> ppr act_res_ty <+> char '~' <+> ppr exp_res_ty- ; cur_lvl <- getTcLevel- ; unless (cur_lvl `sameDepthAs` res_lvl) $- ensureMonoType act_res_ty- ; unifyType Nothing act_res_ty exp_res_ty }- Nothing- -> do { traceTc "Filling inferred ExpType" $- ppr u <+> text ":=" <+> ppr act_res_ty-- -- Enforce the level invariant: ensure the TcLevel of- -- the type we are writing to 'ref' matches 'ir_lvl'.- ; (prom_co, act_res_ty) <- promoteTcType res_lvl act_res_ty-- -- Enforce the FRR invariant: ensure the type has a syntactically- -- fixed RuntimeRep (if necessary, i.e. 'mb_frr' is not 'Nothing').- ; (frr_co, act_res_ty) <-- case mb_frr of- Nothing -> return (mkNomReflCo act_res_ty, act_res_ty)- Just frr_orig -> hasFixedRuntimeRep frr_orig act_res_ty-- -- Compose the two coercions.- ; let final_co = prom_co `mkTransCo` frr_co-- ; writeTcRef ref (Just act_res_ty)-- ; return final_co }- }--{- Note [fillInferResult]-~~~~~~~~~~~~~~~~~~~~~~~~~-When inferring, we use fillInferResult to "fill in" the hole in InferResult- data InferResult = IR { ir_uniq :: Unique- , ir_lvl :: TcLevel- , ir_ref :: IORef (Maybe TcType) }--There are two things to worry about:--1. What if it is under a GADT or existential pattern match?- - GADTs: a unification variable (and Infer's hole is similar) is untouchable- - Existentials: be careful about skolem-escape--2. What if it is filled in more than once? E.g. multiple branches of a case- case e of- T1 -> e1- T2 -> e2--Our typing rules are:--* The RHS of a existential or GADT alternative must always be a- monotype, regardless of the number of alternatives.--* Multiple non-existential/GADT branches can have (the same)- higher rank type (#18412). E.g. this is OK:- case e of- True -> hr- False -> hr- where hr:: (forall a. a->a) -> Int- c.f. Section 7.1 of "Practical type inference for arbitrary-rank types"- We use choice (2) in that Section.- (GHC 8.10 and earlier used choice (1).)-- But note that- case e of- True -> hr- False -> \x -> hr x- will fail, because we still /infer/ both branches, so the \x will get- a (monotype) unification variable, which will fail to unify with- (forall a. a->a)--For (1) we can detect the GADT/existential situation by seeing that-the current TcLevel is greater than that stored in ir_lvl of the Infer-ExpType. We bump the level whenever we go past a GADT/existential match.--Then, before filling the hole use promoteTcType to promote the type-to the outer ir_lvl. promoteTcType does this- - create a fresh unification variable alpha at level ir_lvl- - emits an equality alpha[ir_lvl] ~ ty- - fills the hole with alpha-That forces the type to be a monotype (since unification variables can-only unify with monotypes); and catches skolem-escapes because the-alpha is untouchable until the equality floats out.--For (2), we simply look to see if the hole is filled already.- - if not, we promote (as above) and fill the hole- - if it is filled, we simply unify with the type that is- already there--There is one wrinkle. Suppose we have- case e of- T1 -> e1 :: (forall a. a->a) -> Int- G2 -> e2-where T1 is not GADT or existential, but G2 is a GADT. Then suppose the-T1 alternative fills the hole with (forall a. a->a) -> Int, which is fine.-But now the G2 alternative must not *just* unify with that else we'd risk-allowing through (e2 :: (forall a. a->a) -> Int). If we'd checked G2 first-we'd have filled the hole with a unification variable, which enforces a-monotype.--So if we check G2 second, we still want to emit a constraint that restricts-the RHS to be a monotype. This is done by ensureMonoType, and it works-by simply generating a constraint (alpha ~ ty), where alpha is a fresh-unification variable. We discard the evidence.---}----{--************************************************************************-* *- Subsumption checking-* *-************************************************************************--Note [Subsumption checking: tcSubType]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-All the tcSubType calls have the form- tcSubType actual_ty expected_ty-which checks- actual_ty <= expected_ty--That is, that a value of type actual_ty is acceptable in-a place expecting a value of type expected_ty. I.e. that-- actual ty is more polymorphic than expected_ty--It returns a wrapper function- co_fn :: actual_ty ~ expected_ty-which takes an HsExpr of type actual_ty into one of type-expected_ty.--Note [Ambiguity check and deep subsumption]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider- f :: (forall b. Eq b => a -> a) -> Int--Does `f` have an ambiguous type? The ambiguity check usually checks-that this definition of f' would typecheck, where f' has the exact same-type as f:- f' :: (forall b. Eq b => a -> a) -> Intp- f' = f--This will be /rejected/ with DeepSubsumption but /accepted/ with-ShallowSubsumption. On the other hand, this eta-expanded version f''-would be rejected both ways:- f'' :: (forall b. Eq b => a -> a) -> Intp- f'' x = f x--This is squishy in the same way as other examples in GHC.Tc.Validity-Note [The squishiness of the ambiguity check]--The situation in June 2022. Since we have SimpleSubsumption at the moment,-we don't want introduce new breakage if you add -XDeepSubsumption, by-rejecting types as ambiguous that weren't ambiguous before. So, as a-holding decision, we /always/ use SimpleSubsumption for the ambiguity check-(erring on the side accepting more programs). Hence tcSubTypeAmbiguity.--}------------------------ tcWrapResult needs both un-type-checked (for origins and error messages)--- and type-checked (for wrapping) expressions-tcWrapResult :: HsExpr GhcRn -> HsExpr GhcTc -> TcSigmaType -> ExpRhoType- -> TcM (HsExpr GhcTc)-tcWrapResult rn_expr = tcWrapResultO (exprCtOrigin rn_expr) rn_expr--tcWrapResultO :: CtOrigin -> HsExpr GhcRn -> HsExpr GhcTc -> TcSigmaType -> ExpRhoType- -> TcM (HsExpr GhcTc)-tcWrapResultO orig rn_expr expr actual_ty res_ty- = do { traceTc "tcWrapResult" (vcat [ text "Actual: " <+> ppr actual_ty- , text "Expected:" <+> ppr res_ty ])- ; wrap <- tcSubTypeNC orig GenSigCtxt (Just $ HsExprRnThing rn_expr) actual_ty res_ty- ; return (mkHsWrap wrap expr) }--tcWrapResultMono :: HsExpr GhcRn -> HsExpr GhcTc- -> TcRhoType -- Actual -- a rho-type not a sigma-type- -> ExpRhoType -- Expected- -> TcM (HsExpr GhcTc)--- A version of tcWrapResult to use when the actual type is a--- rho-type, so nothing to instantiate; just go straight to unify.--- It means we don't need to pass in a CtOrigin-tcWrapResultMono rn_expr expr act_ty res_ty- = assertPpr (isRhoTy act_ty) (ppr act_ty $$ ppr rn_expr) $- do { co <- unifyExpectedType rn_expr act_ty res_ty- ; return (mkHsWrapCo co expr) }--unifyExpectedType :: HsExpr GhcRn- -> TcRhoType -- Actual -- a rho-type not a sigma-type- -> ExpRhoType -- Expected- -> TcM TcCoercionN-unifyExpectedType rn_expr act_ty exp_ty- = case exp_ty of- Infer inf_res -> fillInferResult act_ty inf_res- Check exp_ty -> unifyType (Just $ HsExprRnThing rn_expr) act_ty exp_ty---------------------------tcSubTypePat :: CtOrigin -> UserTypeCtxt- -> ExpSigmaType -> TcSigmaType -> TcM HsWrapper--- Used in patterns; polarity is backwards compared--- to tcSubType--- If wrap = tc_sub_type_et t1 t2--- => wrap :: t1 ~> t2-tcSubTypePat inst_orig ctxt (Check ty_actual) ty_expected- = tc_sub_type unifyTypeET inst_orig ctxt ty_actual ty_expected--tcSubTypePat _ _ (Infer inf_res) ty_expected- = do { co <- fillInferResult ty_expected inf_res- -- In patterns we do not instantatiate-- ; return (mkWpCastN (mkSymCo co)) }------------------tcSubType :: CtOrigin -> UserTypeCtxt- -> TcSigmaType -- ^ Actual- -> ExpRhoType -- ^ Expected- -> TcM HsWrapper--- Checks that 'actual' is more polymorphic than 'expected'-tcSubType orig ctxt ty_actual ty_expected- = addSubTypeCtxt ty_actual ty_expected $- do { traceTc "tcSubType" (vcat [pprUserTypeCtxt ctxt, ppr ty_actual, ppr ty_expected])- ; tcSubTypeNC orig ctxt Nothing ty_actual ty_expected }------------------tcSubTypeDS :: HsExpr GhcRn- -> TcRhoType -- Actual -- a rho-type not a sigma-type- -> ExpRhoType -- Expected- -> TcM HsWrapper--- Similar signature to unifyExpectedType; does deep subsumption--- Only one call site, in GHC.Tc.Gen.App.tcApp-tcSubTypeDS rn_expr act_rho res_ty- = case res_ty of- Check exp_rho -> tc_sub_type_deep (unifyType m_thing) orig- GenSigCtxt act_rho exp_rho-- Infer inf_res -> do { co <- fillInferResult act_rho inf_res- ; return (mkWpCastN co) }- where- orig = exprCtOrigin rn_expr- m_thing = Just (HsExprRnThing rn_expr)------------------tcSubTypeNC :: CtOrigin -- ^ Used when instantiating- -> UserTypeCtxt -- ^ Used when skolemising- -> Maybe TypedThing -- ^ The expression that has type 'actual' (if known)- -> TcSigmaType -- ^ Actual type- -> ExpRhoType -- ^ Expected type- -> TcM HsWrapper-tcSubTypeNC inst_orig ctxt m_thing ty_actual res_ty- = case res_ty of- Check ty_expected -> tc_sub_type (unifyType m_thing) inst_orig ctxt- ty_actual ty_expected-- Infer inf_res -> do { (wrap, rho) <- topInstantiate inst_orig ty_actual- -- See Note [Instantiation of InferResult]- ; co <- fillInferResult rho inf_res- ; return (mkWpCastN co <.> wrap) }------------------tcSubTypeSigma :: CtOrigin -- where did the actual type arise / why are we- -- doing this subtype check?- -> UserTypeCtxt -- where did the expected type arise?- -> TcSigmaType -> TcSigmaType -> TcM HsWrapper--- External entry point, but no ExpTypes on either side--- Checks that actual <= expected--- Returns HsWrapper :: actual ~ expected-tcSubTypeSigma orig ctxt ty_actual ty_expected- = tc_sub_type (unifyType Nothing) orig ctxt ty_actual ty_expected------------------tcSubTypeAmbiguity :: UserTypeCtxt -- Where did this type arise- -> TcSigmaType -> TcSigmaType -> TcM HsWrapper--- See Note [Ambiguity check and deep subsumption]-tcSubTypeAmbiguity ctxt ty_actual ty_expected- = tc_sub_type_shallow (unifyType Nothing)- (AmbiguityCheckOrigin ctxt)- ctxt ty_actual ty_expected------------------addSubTypeCtxt :: TcType -> ExpType -> TcM a -> TcM a-addSubTypeCtxt ty_actual ty_expected thing_inside- | isRhoTy ty_actual -- If there is no polymorphism involved, the- , isRhoExpTy ty_expected -- TypeEqOrigin stuff (added by the _NC functions)- = thing_inside -- gives enough context by itself- | otherwise- = addErrCtxtM mk_msg thing_inside- where- mk_msg tidy_env- = do { (tidy_env, ty_actual) <- zonkTidyTcType tidy_env ty_actual- ; ty_expected <- readExpType ty_expected- -- A worry: might not be filled if we're debugging. Ugh.- ; (tidy_env, ty_expected) <- zonkTidyTcType tidy_env ty_expected- ; let msg = vcat [ hang (text "When checking that:")- 4 (ppr ty_actual)- , nest 2 (hang (text "is more polymorphic than:")- 2 (ppr ty_expected)) ]- ; return (tidy_env, msg) }---{- Note [Instantiation of InferResult]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We now always instantiate before filling in InferResult, so that-the result is a TcRhoType: see #17173 for discussion.--For example:--1. Consider- f x = (*)- We want to instantiate the type of (*) before returning, else we- will infer the type- f :: forall {a}. a -> forall b. Num b => b -> b -> b- This is surely confusing for users.-- And worse, the monomorphism restriction won't work properly. The MR is- dealt with in simplifyInfer, and simplifyInfer has no way of- instantiating. This could perhaps be worked around, but it may be- hard to know even when instantiation should happen.--2. Another reason. Consider- f :: (?x :: Int) => a -> a- g y = let ?x = 3::Int in f- Here want to instantiate f's type so that the ?x::Int constraint- gets discharged by the enclosing implicit-parameter binding.--3. Suppose one defines plus = (+). If we instantiate lazily, we will- infer plus :: forall a. Num a => a -> a -> a. However, the monomorphism- restriction compels us to infer- plus :: Integer -> Integer -> Integer- (or similar monotype). Indeed, the only way to know whether to apply- the monomorphism restriction at all is to instantiate--There is one place where we don't want to instantiate eagerly,-namely in GHC.Tc.Module.tcRnExpr, which implements GHCi's :type-command. See Note [Implementing :type] in GHC.Tc.Module.--}------------------tc_sub_type, tc_sub_type_deep, tc_sub_type_shallow- :: (TcType -> TcType -> TcM TcCoercionN) -- How to unify- -> CtOrigin -- Used when instantiating- -> UserTypeCtxt -- Used when skolemising- -> TcSigmaType -- Actual; a sigma-type- -> TcSigmaType -- Expected; also a sigma-type- -> TcM HsWrapper--- Checks that actual_ty is more polymorphic than expected_ty--- If wrap = tc_sub_type t1 t2--- => wrap :: t1 ~> t2------ The "how to unify argument" is always a call to `uType TypeLevel orig`,--- but with different ways of constructing the CtOrigin `orig` from--- the argument types and context.-------------------------tc_sub_type unify inst_orig ctxt ty_actual ty_expected- = do { deep_subsumption <- xoptM LangExt.DeepSubsumption- ; if deep_subsumption- then tc_sub_type_deep unify inst_orig ctxt ty_actual ty_expected- else tc_sub_type_shallow unify inst_orig ctxt ty_actual ty_expected- }-------------------------tc_sub_type_shallow unify inst_orig ctxt ty_actual ty_expected- | definitely_poly ty_expected -- See Note [Don't skolemise unnecessarily]- , definitely_mono_shallow ty_actual- = do { traceTc "tc_sub_type (drop to equality)" $- vcat [ text "ty_actual =" <+> ppr ty_actual- , text "ty_expected =" <+> ppr ty_expected ]- ; mkWpCastN <$>- unify ty_actual ty_expected }-- | otherwise -- This is the general case- = do { traceTc "tc_sub_type (general case)" $- vcat [ text "ty_actual =" <+> ppr ty_actual- , text "ty_expected =" <+> ppr ty_expected ]-- ; (sk_wrap, inner_wrap)- <- tcTopSkolemise ctxt ty_expected $ \ sk_rho ->- do { (wrap, rho_a) <- topInstantiate inst_orig ty_actual- ; cow <- unify rho_a sk_rho- ; return (mkWpCastN cow <.> wrap) }-- ; return (sk_wrap <.> inner_wrap) }-------------------------tc_sub_type_deep unify inst_orig ctxt ty_actual ty_expected- | definitely_poly ty_expected -- See Note [Don't skolemise unnecessarily]- , definitely_mono_deep ty_actual- = do { traceTc "tc_sub_type_deep (drop to equality)" $- vcat [ text "ty_actual =" <+> ppr ty_actual- , text "ty_expected =" <+> ppr ty_expected ]- ; mkWpCastN <$>- unify ty_actual ty_expected }-- | otherwise -- This is the general case- = do { traceTc "tc_sub_type_deep (general case)" $- vcat [ text "ty_actual =" <+> ppr ty_actual- , text "ty_expected =" <+> ppr ty_expected ]-- ; (sk_wrap, inner_wrap)- <- tcDeeplySkolemise ctxt ty_expected $ \ sk_rho ->- -- See Note [Deep subsumption]- tc_sub_type_ds unify inst_orig ctxt ty_actual sk_rho-- ; return (sk_wrap <.> inner_wrap) }--definitely_mono_shallow :: TcType -> Bool-definitely_mono_shallow ty = isRhoTy ty- -- isRhoTy: no top level forall or (=>)--definitely_mono_deep :: TcType -> Bool-definitely_mono_deep ty- | not (definitely_mono_shallow ty) = False- -- isRhoTy: False means top level forall or (=>)- | Just (_, res) <- tcSplitFunTy_maybe ty = definitely_mono_deep res- -- Top level (->)- | otherwise = True--definitely_poly :: TcType -> Bool--- A very conservative test:--- see Note [Don't skolemise unnecessarily]-definitely_poly ty- | (tvs, theta, tau) <- tcSplitSigmaTy ty- , (tv:_) <- tvs -- At least one tyvar- , null theta -- No constraints; see (DP1)- , checkTyVarEq tv tau `cterHasProblem` cteInsolubleOccurs- -- The tyvar actually occurs (DP2),- -- and occurs in an injective position (DP3).- -- Fortunately checkTyVarEq, used for the occur check,- -- is just what we need.- = True- | otherwise- = False--{- Note [Don't skolemise unnecessarily]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we are trying to solve- ty_actual <= ty_expected- (Char->Char) <= (forall a. a->a)-We could skolemise the 'forall a', and then complain-that (Char ~ a) is insoluble; but that's a pretty obscure-error. It's better to say that- (Char->Char) ~ (forall a. a->a)-fails.--If we prematurely go to equality we'll reject a program we should-accept (e.g. #13752). So the test (which is only to improve error-message) is very conservative:-- * ty_actual is /definitely/ monomorphic: see `definitely_mono`- This definitely_mono test comes in "shallow" and "deep" variants-- * ty_expected is /definitely/ polymorphic: see `definitely_poly`- This definitely_poly test is more subtle than you might think.- Here are three cases where expected_ty looks polymorphic, but- isn't, and where it would be /wrong/ to switch to equality:-- (DP1) (Char->Char) <= (forall a. (a~Char) => a -> a)-- (DP2) (Char->Char) <= (forall a. Char -> Char)-- (DP3) (Char->Char) <= (forall a. F [a] Char -> Char)- where type instance F [x] t = t---Note [Wrapper returned from tcSubMult]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-There is no notion of multiplicity coercion in Core, therefore the wrapper-returned by tcSubMult (and derived functions such as tcCheckUsage and-checkManyPattern) is quite unlike any other wrapper: it checks whether the-coercion produced by the constraint solver is trivial, producing a type error-if it is not. This is implemented via the WpMultCoercion wrapper, as desugared-by GHC.HsToCore.Binds.dsHsWrapper, which does the reflexivity check.--This wrapper needs to be placed in the term; otherwise, checking of the-eventual coercion won't be triggered during desugaring. But it can be put-anywhere, since it doesn't affect the desugared code.--Why do we check this in the desugarer? It's a convenient place, since it's-right after all the constraints are solved. We need the constraints to be-solved to check whether they are trivial or not.--An alternative would be to have a kind of constraint which can-only produce trivial evidence. This would allow such checks to happen-in the constraint solver (#18756).-This would be similar to the existing setup for Concrete, see- Note [The Concrete mechanism] in GHC.Tc.Utils.Concrete- (PHASE 1 in particular).--}--tcSubMult :: CtOrigin -> Mult -> Mult -> TcM HsWrapper-tcSubMult origin w_actual w_expected- | Just (w1, w2) <- isMultMul w_actual =- do { w1 <- tcSubMult origin w1 w_expected- ; w2 <- tcSubMult origin w2 w_expected- ; return (w1 <.> w2) }- -- Currently, we consider p*q and sup p q to be equal. Therefore, p*q <= r is- -- equivalent to p <= r and q <= r. For other cases, we approximate p <= q by p- -- ~ q. This is not complete, but it's sound. See also Note [Overapproximating- -- multiplicities] in Multiplicity.-tcSubMult origin w_actual w_expected =- case submult w_actual w_expected of- Submult -> return WpHole- Unknown -> tcEqMult origin w_actual w_expected--tcEqMult :: CtOrigin -> Mult -> Mult -> TcM HsWrapper-tcEqMult origin w_actual w_expected = do- {- -- Note that here we do not call to `submult`, so we check- -- for strict equality.- ; coercion <- uType TypeLevel origin w_actual w_expected- ; return $ if isReflCo coercion then WpHole else WpMultCoercion coercion }---{- *********************************************************************-* *- Deep subsumption-* *-********************************************************************* -}--{- Note [Deep subsumption]-~~~~~~~~~~~~~~~~~~~~~~~~~~-The DeepSubsumption extension, documented here-- https://github.com/ghc-proposals/ghc-proposals/pull/511.--makes a best-efforts attempt implement deep subsumption as it was-prior to the Simplify Subsumption proposal:-- https://github.com/ghc-proposals/ghc-proposals/pull/287--The effects are in these main places:--1. In the subsumption check, tcSubType, we must do deep skolemisation:- see the call to tcDeeplySkolemise in tc_sub_type_deep--2. In tcPolyExpr we must do deep skolemisation:- see the call to tcDeeplySkolemise in tcSkolemiseExpType--3. for expression type signatures (e :: ty), and functions with type- signatures (e.g. f :: ty; f = e), we must deeply skolemise the type;- see the call to tcDeeplySkolemise in tcSkolemiseScoped.--4. In GHC.Tc.Gen.App.tcApp we call tcSubTypeDS to match the result- type. Without deep subsumption, unifyExpectedType would be sufficent.--In all these cases note that the deep skolemisation must be done /first/.-Consider (1)- (forall a. Int -> a -> a) <= Int -> (forall b. b -> b)-We must skolemise the `forall b` before instantiating the `forall a`.-See also Note [Deep skolemisation].--Note that we /always/ use shallow subsumption in the ambiguity check.-See Note [Ambiguity check and deep subsumption].--Note [Deep skolemisation]-~~~~~~~~~~~~~~~~~~~~~~~~~-deeplySkolemise decomposes and skolemises a type, returning a type-with all its arrows visible (ie not buried under foralls)--Examples:-- deeplySkolemise (Int -> forall a. Ord a => blah)- = ( wp, [a], [d:Ord a], Int -> blah )- where wp = \x:Int. /\a. \(d:Ord a). <hole> x-- deeplySkolemise (forall a. Ord a => Maybe a -> forall b. Eq b => blah)- = ( wp, [a,b], [d1:Ord a,d2:Eq b], Maybe a -> blah )- where wp = /\a.\(d1:Ord a).\(x:Maybe a)./\b.\(d2:Ord b). <hole> x--In general,- if deeplySkolemise ty = (wrap, tvs, evs, rho)- and e :: rho- then wrap e :: ty- and 'wrap' binds tvs, evs--ToDo: this eta-abstraction plays fast and loose with termination,- because it can introduce extra lambdas. Maybe add a `seq` to- fix this--Note [Setting the argument context]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider we are doing the ambiguity check for the (bogus)- f :: (forall a b. C b => a -> a) -> Int--We'll call- tcSubType ((forall a b. C b => a->a) -> Int )- ((forall a b. C b => a->a) -> Int )--with a UserTypeCtxt of (FunSigCtxt "f"). Then we'll do the co/contra thing-on the argument type of the (->) -- and at that point we want to switch-to a UserTypeCtxt of GenSigCtxt. Why?--* Error messages. If we stick with FunSigCtxt we get errors like- * Could not deduce: C b- from the context: C b0- bound by the type signature for:- f :: forall a b. C b => a->a- But of course f does not have that type signature!- Example tests: T10508, T7220a, Simple14--* Implications. We may decide to build an implication for the whole- ambiguity check, but we don't need one for each level within it,- and TcUnify.alwaysBuildImplication checks the UserTypeCtxt.- See Note [When to build an implication]--Note [Multiplicity in deep subsumption]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider- t1 ->{mt} t2 <= s1 ->{ms} s2--At the moment we /unify/ ms~mt, via tcEqMult.--Arguably we should use `tcSubMult`. But then if mt=m0 (a unification-variable) and ms=Many, `tcSubMult` is a no-op (since anything is a-sub-multiplicty of Many). But then `m0` may never get unified with-anything. It is then skolemised by the zonker; see GHC.HsToCore.Binds-Note [Free tyvars on rule LHS]. So we in RULE foldr/app in GHC.Base-we get this-- "foldr/app" [1] forall ys m1 m2. foldr (\x{m1} \xs{m2}. (:) x xs) ys- = \xs -> xs ++ ys--where we eta-expanded that (:). But now foldr expects an argument-with ->{Many} and gets an argument with ->{m1} or ->{m2}, and Lint-complains.--The easiest solution was to use tcEqMult in tc_sub_type_ds, and-insist on equality. This is only in the DeepSubsumption code anyway.--}--tc_sub_type_ds :: (TcType -> TcType -> TcM TcCoercionN) -- How to unify- -> CtOrigin -- Used when instantiating- -> UserTypeCtxt -- Used when skolemising- -> TcSigmaType -- Actual; a sigma-type- -> TcRhoType -- Expected; deeply skolemised- -> TcM HsWrapper---- If wrap = tc_sub_type_ds t1 t2--- => wrap :: t1 ~> t2--- Here is where the work actually happens!--- Precondition: ty_expected is deeply skolemised--tc_sub_type_ds unify inst_orig ctxt ty_actual ty_expected- = do { traceTc "tc_sub_type_ds" $- vcat [ text "ty_actual =" <+> ppr ty_actual- , text "ty_expected =" <+> ppr ty_expected ]- ; go ty_actual ty_expected }- where- -- NB: 'go' is not recursive, except for doing coreView- go ty_a ty_e | Just ty_a' <- coreView ty_a = go ty_a' ty_e- | Just ty_e' <- coreView ty_e = go ty_a ty_e'-- go (TyVarTy tv_a) ty_e- = do { lookup_res <- isFilledMetaTyVar_maybe tv_a- ; case lookup_res of- Just ty_a' ->- do { traceTc "tc_sub_type_ds following filled meta-tyvar:"- (ppr tv_a <+> text "-->" <+> ppr ty_a')- ; tc_sub_type_ds unify inst_orig ctxt ty_a' ty_e }- Nothing -> just_unify ty_actual ty_expected }-- go ty_a@(FunTy { ft_af = af1, ft_mult = act_mult, ft_arg = act_arg, ft_res = act_res })- ty_e@(FunTy { ft_af = af2, ft_mult = exp_mult, ft_arg = exp_arg, ft_res = exp_res })- | isVisibleFunArg af1, isVisibleFunArg af2- = if (isTauTy ty_a && isTauTy ty_e) -- Short cut common case to avoid- then just_unify ty_actual ty_expected -- unnecessary eta expansion- else- -- This is where we do the co/contra thing, and generate a WpFun, which in turn- -- causes eta-expansion, which we don't like; hence encouraging NoDeepSubsumption- do { arg_wrap <- tc_sub_type_deep unify given_orig GenSigCtxt exp_arg act_arg- -- GenSigCtxt: See Note [Setting the argument context]- ; res_wrap <- tc_sub_type_ds unify inst_orig ctxt act_res exp_res- ; mult_wrap <- tcEqMult inst_orig act_mult exp_mult- -- See Note [Multiplicity in deep subsumption]- ; return (mult_wrap <.>- mkWpFun arg_wrap res_wrap (Scaled exp_mult exp_arg) exp_res) }- -- arg_wrap :: exp_arg ~> act_arg- -- res_wrap :: act-res ~> exp_res- where- given_orig = GivenOrigin (SigSkol GenSigCtxt exp_arg [])-- go ty_a ty_e- | let (tvs, theta, _) = tcSplitSigmaTy ty_a- , not (null tvs && null theta)- = do { (in_wrap, in_rho) <- topInstantiate inst_orig ty_a- ; body_wrap <- tc_sub_type_ds unify inst_orig ctxt in_rho ty_e- ; return (body_wrap <.> in_wrap) }-- | otherwise -- Revert to unification- = do { -- It's still possible that ty_actual has nested foralls. Instantiate- -- these, as there's no way unification will succeed with them in.- -- See typecheck/should_compile/T11305 for an example of when this- -- is important. The problem is that we're checking something like- -- a -> forall b. b -> b <= alpha beta gamma- -- where we end up with alpha := (->)- (inst_wrap, rho_a) <- deeplyInstantiate inst_orig ty_actual- ; unify_wrap <- just_unify rho_a ty_expected- ; return (unify_wrap <.> inst_wrap) }-- just_unify ty_a ty_e = do { cow <- unify ty_a ty_e- ; return (mkWpCastN cow) }--tcDeeplySkolemise- :: UserTypeCtxt -> TcSigmaType- -> (TcType -> TcM result)- -> TcM (HsWrapper, result)- -- ^ The wrapper has type: spec_ty ~> expected_ty--- Just like tcTopSkolemise, but calls--- deeplySkolemise instead of topSkolemise--- See Note [Deep skolemisation]-tcDeeplySkolemise ctxt expected_ty thing_inside- | isTauTy expected_ty -- Short cut for common case- = do { res <- thing_inside expected_ty- ; return (idHsWrapper, res) }- | otherwise- = do { -- This (unpleasant) rec block allows us to pass skol_info to deeplySkolemise;- -- but skol_info can't be built until we have tv_prs- rec { (wrap, tv_prs, given, rho_ty) <- deeplySkolemise skol_info expected_ty- ; skol_info <- mkSkolemInfo (SigSkol ctxt expected_ty tv_prs) }-- ; traceTc "tcDeeplySkolemise" (ppr expected_ty $$ ppr rho_ty $$ ppr tv_prs)-- ; let skol_tvs = map snd tv_prs- ; (ev_binds, result)- <- checkConstraints (getSkolemInfo skol_info) skol_tvs given $- thing_inside rho_ty-- ; return (wrap <.> mkWpLet ev_binds, result) }- -- The ev_binds returned by checkConstraints is very- -- often empty, in which case mkWpLet is a no-op--deeplySkolemise :: SkolemInfo -> TcSigmaType- -> TcM ( HsWrapper- , [(Name,TyVar)] -- All skolemised variables- , [EvVar] -- All "given"s- , TcRhoType )--- See Note [Deep skolemisation]-deeplySkolemise skol_info ty- = go init_subst ty- where- init_subst = mkEmptySubst (mkInScopeSet (tyCoVarsOfType ty))-- go subst ty- | Just (arg_tys, tvs, theta, ty') <- tcDeepSplitSigmaTy_maybe ty- = do { let arg_tys' = substScaledTys subst arg_tys- ; ids1 <- newSysLocalIds (fsLit "dk") arg_tys'- ; (subst', tvs1) <- tcInstSkolTyVarsX skol_info subst tvs- ; ev_vars1 <- newEvVars (substTheta subst' theta)- ; (wrap, tvs_prs2, ev_vars2, rho) <- go subst' ty'- ; let tv_prs1 = map tyVarName tvs `zip` tvs1- ; return ( mkWpEta ids1 (mkWpTyLams tvs1- <.> mkWpEvLams ev_vars1- <.> wrap)- , tv_prs1 ++ tvs_prs2- , ev_vars1 ++ ev_vars2- , mkScaledFunTys arg_tys' rho ) }-- | otherwise- = return (idHsWrapper, [], [], substTy subst ty)- -- substTy is a quick no-op on an empty substitution--deeplyInstantiate :: CtOrigin -> TcType -> TcM (HsWrapper, Type)-deeplyInstantiate orig ty- = go init_subst ty- where- init_subst = mkEmptySubst (mkInScopeSet (tyCoVarsOfType ty))-- go subst ty- | Just (arg_tys, tvs, theta, rho) <- tcDeepSplitSigmaTy_maybe ty- = do { (subst', tvs') <- newMetaTyVarsX subst tvs- ; let arg_tys' = substScaledTys subst' arg_tys- theta' = substTheta subst' theta- ; ids1 <- newSysLocalIds (fsLit "di") arg_tys'- ; wrap1 <- instCall orig (mkTyVarTys tvs') theta'- ; (wrap2, rho2) <- go subst' rho- ; return (mkWpEta ids1 (wrap2 <.> wrap1),- mkScaledFunTys arg_tys' rho2) }-- | otherwise- = do { let ty' = substTy subst ty- ; return (idHsWrapper, ty') }--tcDeepSplitSigmaTy_maybe- :: TcSigmaType -> Maybe ([Scaled TcType], [TyVar], ThetaType, TcSigmaType)--- Looks for a *non-trivial* quantified type, under zero or more function arrows--- By "non-trivial" we mean either tyvars or constraints are non-empty--tcDeepSplitSigmaTy_maybe ty- | Just (arg_ty, res_ty) <- tcSplitFunTy_maybe ty- , Just (arg_tys, tvs, theta, rho) <- tcDeepSplitSigmaTy_maybe res_ty- = Just (arg_ty:arg_tys, tvs, theta, rho)-- | (tvs, theta, rho) <- tcSplitSigmaTy ty- , not (null tvs && null theta)- = Just ([], tvs, theta, rho)-- | otherwise = Nothing---{- *********************************************************************-* *- Generalisation-* *-********************************************************************* -}--{- Note [Skolemisation]-~~~~~~~~~~~~~~~~~~~~~~~-tcTopSkolemise takes "expected type" and strip off quantifiers to expose the-type underneath, binding the new skolems for the 'thing_inside'-The returned 'HsWrapper' has type (specific_ty -> expected_ty).--Note that for a nested type like- forall a. Eq a => forall b. Ord b => blah-we still only build one implication constraint- forall a b. (Eq a, Ord b) => <constraints>-This is just an optimisation, but it's why we use topSkolemise to-build the pieces from all the layers, before making a single call-to checkConstraints.--tcSkolemiseScoped is very similar, but differs in two ways:--* It deals specially with just the outer forall, bringing those type- variables into lexical scope. To my surprise, I found that doing- this unconditionally in tcTopSkolemise (i.e. doing it even if we don't- need to bring the variables into lexical scope, which is harmless)- caused a non-trivial (1%-ish) perf hit on the compiler.--* It handles deep subumption, wheres tcTopSkolemise never looks under- function arrows.--* It always calls checkConstraints, even if there are no skolem- variables at all. Reason: there might be nested deferred errors- that must not be allowed to float to top level.- See Note [When to build an implication] below.--}--tcTopSkolemise, tcSkolemiseScoped- :: UserTypeCtxt -> TcSigmaType- -> (TcType -> TcM result)- -> TcM (HsWrapper, result)- -- ^ The wrapper has type: spec_ty ~> expected_ty--- See Note [Skolemisation] for the differences between--- tcSkolemiseScoped and tcTopSkolemise--tcSkolemiseScoped ctxt expected_ty thing_inside- = do { deep_subsumption <- xoptM LangExt.DeepSubsumption- ; let skolemise | deep_subsumption = deeplySkolemise- | otherwise = topSkolemise- ; -- rec {..}: see Note [Keeping SkolemInfo inside a SkolemTv]- -- in GHC.Tc.Utils.TcType- rec { (wrap, tv_prs, given, rho_ty) <- skolemise skol_info expected_ty- ; skol_info <- mkSkolemInfo (SigSkol ctxt expected_ty tv_prs) }-- ; let skol_tvs = map snd tv_prs- ; (ev_binds, res)- <- checkConstraints (getSkolemInfo skol_info) skol_tvs given $- tcExtendNameTyVarEnv tv_prs $- thing_inside rho_ty-- ; return (wrap <.> mkWpLet ev_binds, res) }--tcTopSkolemise ctxt expected_ty thing_inside- | isRhoTy expected_ty -- Short cut for common case- = do { res <- thing_inside expected_ty- ; return (idHsWrapper, res) }- | otherwise- = do { -- rec {..}: see Note [Keeping SkolemInfo inside a SkolemTv]- -- in GHC.Tc.Utils.TcType- rec { (wrap, tv_prs, given, rho_ty) <- topSkolemise skol_info expected_ty- ; skol_info <- mkSkolemInfo (SigSkol ctxt expected_ty tv_prs) }-- ; let skol_tvs = map snd tv_prs- ; (ev_binds, result)- <- checkConstraints (getSkolemInfo skol_info) skol_tvs given $- thing_inside rho_ty-- ; return (wrap <.> mkWpLet ev_binds, result) }- -- The ev_binds returned by checkConstraints is very- -- often empty, in which case mkWpLet is a no-op---- | Variant of 'tcTopSkolemise' that takes an ExpType-tcSkolemiseExpType :: UserTypeCtxt -> ExpSigmaType- -> (ExpRhoType -> TcM result)- -> TcM (HsWrapper, result)-tcSkolemiseExpType _ et@(Infer {}) thing_inside- = (idHsWrapper, ) <$> thing_inside et-tcSkolemiseExpType ctxt (Check ty) thing_inside- = do { deep_subsumption <- xoptM LangExt.DeepSubsumption- ; let skolemise | deep_subsumption = tcDeeplySkolemise- | otherwise = tcTopSkolemise- ; skolemise ctxt ty $ \rho_ty ->- thing_inside (mkCheckExpType rho_ty) }--checkConstraints :: SkolemInfoAnon- -> [TcTyVar] -- Skolems- -> [EvVar] -- Given- -> TcM result- -> TcM (TcEvBinds, result)--checkConstraints skol_info skol_tvs given thing_inside- = do { implication_needed <- implicationNeeded skol_info 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- ; traceTc "checkConstraints" (ppr tclvl $$ ppr skol_tvs)- ; emitImplications implics- ; return (ev_binds, result) }-- else -- Fast path. We check every function argument with tcCheckPolyExpr,- -- which uses tcTopSkolemise and hence checkConstraints.- -- So this fast path is well-exercised- do { res <- thing_inside- ; return (emptyTcEvBinds, res) } }--checkTvConstraints :: SkolemInfo- -> [TcTyVar] -- Skolem tyvars- -> TcM result- -> TcM result--checkTvConstraints skol_info skol_tvs thing_inside- = do { (tclvl, wanted, result) <- pushLevelAndCaptureConstraints thing_inside- ; emitResidualTvConstraint skol_info skol_tvs tclvl wanted- ; return result }--emitResidualTvConstraint :: SkolemInfo -> [TcTyVar]- -> TcLevel -> WantedConstraints -> TcM ()-emitResidualTvConstraint skol_info skol_tvs tclvl wanted- | not (isEmptyWC wanted) ||- checkTelescopeSkol skol_info_anon- = -- checkTelescopeSkol: in this case, /always/ emit this implication- -- even if 'wanted' is empty. We need the implication so that we check- -- for a bad telescope. See Note [Skolem escape and forall-types] in- -- GHC.Tc.Gen.HsType- do { implic <- buildTvImplication skol_info_anon skol_tvs tclvl wanted- ; emitImplication implic }-- | otherwise -- Empty 'wanted', emit nothing- = return ()- where- skol_info_anon = getSkolemInfo skol_info--buildTvImplication :: SkolemInfoAnon -> [TcTyVar]- -> TcLevel -> WantedConstraints -> TcM Implication-buildTvImplication skol_info skol_tvs tclvl wanted- = assertPpr (all (isSkolemTyVar <||> isTyVarTyVar) skol_tvs) (ppr skol_tvs) $- do { ev_binds <- newNoTcEvBinds -- Used for equalities only, so all the constraints- -- are solved by filling in coercion holes, not- -- by creating a value-level evidence binding- ; implic <- newImplication-- ; let implic' = implic { ic_tclvl = tclvl- , ic_skols = skol_tvs- , ic_given_eqs = NoGivenEqs- , ic_wanted = wanted- , ic_binds = ev_binds- , ic_info = skol_info }-- ; checkImplicationInvariants implic'- ; return implic' }--implicationNeeded :: SkolemInfoAnon -> [TcTyVar] -> [EvVar] -> TcM Bool--- See Note [When to build an implication]-implicationNeeded skol_info skol_tvs given- | null skol_tvs- , null given- , not (alwaysBuildImplication skol_info)- = -- Empty skolems and givens- do { tc_lvl <- getTcLevel- ; if not (isTopTcLevel tc_lvl) -- No implication needed if we are- then return False -- already inside an implication- else- do { dflags <- getDynFlags -- If any deferral can happen,- -- we must build an implication- ; return (gopt Opt_DeferTypeErrors dflags ||- gopt Opt_DeferTypedHoles dflags ||- gopt Opt_DeferOutOfScopeVariables dflags) } }-- | otherwise -- Non-empty skolems or givens- = return True -- Definitely need an implication--alwaysBuildImplication :: SkolemInfoAnon -> Bool--- See Note [When to build an implication]-alwaysBuildImplication _ = False--{- Commmented out for now while I figure out about error messages.- See #14185--alwaysBuildImplication (SigSkol ctxt _ _)- = case ctxt of- FunSigCtxt {} -> True -- RHS of a binding with a signature- _ -> False-alwaysBuildImplication (RuleSkol {}) = True-alwaysBuildImplication (InstSkol {}) = True-alwaysBuildImplication (FamInstSkol {}) = True-alwaysBuildImplication _ = False--}--buildImplicationFor :: TcLevel -> SkolemInfoAnon -> [TcTyVar]- -> [EvVar] -> WantedConstraints- -> TcM (Bag Implication, TcEvBinds)-buildImplicationFor tclvl skol_info skol_tvs given wanted- | isEmptyWC wanted && null given- -- Optimisation : if there are no wanteds, and no givens- -- don't generate an implication at all.- -- Reason for the (null given): we don't want to lose- -- the "inaccessible alternative" error check- = return (emptyBag, emptyTcEvBinds)-- | otherwise- = assertPpr (all (isSkolemTyVar <||> isTyVarTyVar) skol_tvs) (ppr skol_tvs) $- -- Why allow TyVarTvs? Because implicitly declared kind variables in- -- non-CUSK type declarations are TyVarTvs, and we need to bring them- -- into scope as a skolem in an implication. This is OK, though,- -- because TyVarTvs will always remain tyvars, even after unification.- do { ev_binds_var <- newTcEvBinds- ; 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 }- ; checkImplicationInvariants implic'-- ; return (unitBag implic', TcEvBinds ev_binds_var) }--{- Note [When to build an implication]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have some 'skolems' and some 'givens', and we are-considering whether to wrap the constraints in their scope into an-implication. We must /always/ so if either 'skolems' or 'givens' are-non-empty. But what if both are empty? You might think we could-always drop the implication. Other things being equal, the fewer-implications the better. Less clutter and overhead. But we must-take care:--* If we have an unsolved [W] g :: a ~# b, and -fdefer-type-errors,- we'll make a /term-level/ evidence binding for 'g = error "blah"'.- We must have an EvBindsVar those bindings!, otherwise they end up as- top-level unlifted bindings, which are verboten. This only matters- at top level, so we check for that- See also Note [Deferred errors for coercion holes] in GHC.Tc.Errors.- cf #14149 for an example of what goes wrong.--* If you have- f :: Int; f = f_blah- g :: Bool; g = g_blah- If we don't build an implication for f or g (no tyvars, no givens),- the constraints for f_blah and g_blah are solved together. And that- can yield /very/ confusing error messages, because we can get- [W] C Int b1 -- from f_blah- [W] C Int b2 -- from g_blan- and fundpes can yield [W] b1 ~ b2, even though the two functions have- literally nothing to do with each other. #14185 is an example.- Building an implication keeps them separate.--}--{--************************************************************************-* *- Boxy unification-* *-************************************************************************--The exported functions are all defined as versions of some-non-exported generic functions.--}--unifyType :: Maybe TypedThing -- ^ If present, the thing that has type ty1- -> TcTauType -> TcTauType -- ty1 (actual), ty2 (expected)- -> TcM TcCoercionN -- :: ty1 ~# ty2--- Actual and expected types--- Returns a coercion : ty1 ~ ty2-unifyType thing ty1 ty2- = uType TypeLevel origin ty1 ty2- where- origin = TypeEqOrigin { uo_actual = ty1- , uo_expected = ty2- , uo_thing = thing- , uo_visible = True }--unifyTypeET :: TcTauType -> TcTauType -> TcM CoercionN--- Like unifyType, but swap expected and actual in error messages--- This is used when typechecking patterns-unifyTypeET ty1 ty2- = uType TypeLevel origin ty1 ty2- where- origin = TypeEqOrigin { uo_actual = ty2 -- NB swapped- , uo_expected = ty1 -- NB swapped- , uo_thing = Nothing- , uo_visible = True }---unifyKind :: Maybe TypedThing -> TcKind -> TcKind -> TcM CoercionN-unifyKind mb_thing ty1 ty2- = uType KindLevel origin ty1 ty2- where- origin = TypeEqOrigin { uo_actual = ty1- , uo_expected = ty2- , uo_thing = mb_thing- , uo_visible = True }---{--%************************************************************************-%* *- uType and friends-%* *-%************************************************************************--uType is the heart of the unifier.--}--uType, uType_defer- :: TypeOrKind- -> CtOrigin- -> TcType -- ty1 is the *actual* type- -> TcType -- ty2 is the *expected* type- -> TcM CoercionN------------------- It is always safe to defer unification to the main constraint solver--- See Note [Deferred unification]--- ty1 is "actual"--- ty2 is "expected"-uType_defer t_or_k origin ty1 ty2- = do { co <- emitWantedEq origin t_or_k Nominal ty1 ty2-- -- Error trace only- -- NB. do *not* call mkErrInfo unless tracing is on,- -- because it is hugely expensive (#5631)- ; whenDOptM Opt_D_dump_tc_trace $ do- { ctxt <- getErrCtxt- ; doc <- mkErrInfo emptyTidyEnv ctxt- ; traceTc "utype_defer" (vcat [ debugPprType ty1- , debugPprType ty2- , pprCtOrigin origin- , doc])- ; traceTc "utype_defer2" (ppr co)- }- ; return co }-----------------uType t_or_k origin orig_ty1 orig_ty2- = do { tclvl <- getTcLevel- ; traceTc "u_tys" $ vcat- [ text "tclvl" <+> ppr tclvl- , sep [ ppr orig_ty1, text "~", ppr orig_ty2]- , pprCtOrigin origin]- ; co <- go orig_ty1 orig_ty2- ; if isReflCo co- then traceTc "u_tys yields no coercion" Outputable.empty- else traceTc "u_tys yields coercion:" (ppr co)- ; return co }- where- go :: TcType -> TcType -> TcM CoercionN- -- The arguments to 'go' are always semantically identical- -- to orig_ty{1,2} except for looking through type synonyms-- -- Unwrap casts before looking for variables. This way, we can easily- -- recognize (t |> co) ~ (t |> co), which is nice. Previously, we- -- didn't do it this way, and then the unification above was deferred.- go (CastTy t1 co1) t2- = do { co_tys <- uType t_or_k origin t1 t2- ; return (mkCoherenceLeftCo Nominal t1 co1 co_tys) }-- go t1 (CastTy t2 co2)- = do { co_tys <- uType t_or_k origin t1 t2- ; return (mkCoherenceRightCo Nominal t2 co2 co_tys) }-- -- Variables; go for uUnfilledVar- -- Note that we pass in *original* (before synonym expansion),- -- so that type variables tend to get filled in with- -- the most informative version of the type- go (TyVarTy tv1) ty2- = do { lookup_res <- isFilledMetaTyVar_maybe tv1- ; case lookup_res of- Just ty1 -> do { traceTc "found filled tyvar" (ppr tv1 <+> text ":->" <+> ppr ty1)- ; go ty1 ty2 }- Nothing -> uUnfilledVar origin t_or_k NotSwapped tv1 ty2 }- go ty1 (TyVarTy tv2)- = do { lookup_res <- isFilledMetaTyVar_maybe tv2- ; case lookup_res of- Just ty2 -> do { traceTc "found filled tyvar" (ppr tv2 <+> text ":->" <+> ppr ty2)- ; go ty1 ty2 }- Nothing -> uUnfilledVar origin t_or_k IsSwapped tv2 ty1 }-- -- See Note [Expanding synonyms during unification]- go ty1@(TyConApp tc1 []) (TyConApp tc2 [])- | tc1 == tc2- = return $ mkNomReflCo ty1-- -- See Note [Expanding synonyms during unification]- --- -- Also NB that we recurse to 'go' so that we don't push a- -- new item on the origin stack. As a result if we have- -- type Foo = Int- -- and we try to unify Foo ~ Bool- -- we'll end up saying "can't match Foo with Bool"- -- rather than "can't match "Int with Bool". See #4535.- go ty1 ty2- | Just ty1' <- coreView ty1 = go ty1' ty2- | Just ty2' <- coreView ty2 = go ty1 ty2'-- -- Functions (t1 -> t2) just check the two parts- -- Do not attempt (c => t); just defer- go (FunTy { ft_af = af1, ft_mult = w1, ft_arg = arg1, ft_res = res1 })- (FunTy { ft_af = af2, ft_mult = w2, ft_arg = arg2, ft_res = res2 })- | isVisibleFunArg af1, af1 == af2- = do { co_l <- uType t_or_k origin arg1 arg2- ; co_r <- uType t_or_k origin res1 res2- ; co_w <- uType t_or_k origin w1 w2- ; return $ mkNakedFunCo1 Nominal af1 co_w co_l co_r }-- -- Always defer if a type synonym family (type function)- -- is involved. (Data families behave rigidly.)- go ty1@(TyConApp tc1 _) ty2- | isTypeFamilyTyCon tc1 = defer ty1 ty2- go ty1 ty2@(TyConApp tc2 _)- | isTypeFamilyTyCon tc2 = defer ty1 ty2-- go (TyConApp tc1 tys1) (TyConApp tc2 tys2)- -- See Note [Mismatched type lists and application decomposition]- | tc1 == tc2, equalLength tys1 tys2- = assertPpr (isGenerativeTyCon tc1 Nominal) (ppr tc1) $- do { cos <- zipWith3M (uType t_or_k) origins' tys1 tys2- ; return $ mkTyConAppCo Nominal tc1 cos }- where- origins' = map (\is_vis -> if is_vis then origin else toInvisibleOrigin origin)- (tcTyConVisibilities tc1)-- go (LitTy m) ty@(LitTy n)- | m == n- = return $ mkNomReflCo ty-- -- See Note [Care with type applications]- -- Do not decompose FunTy against App;- -- it's often a type error, so leave it for the constraint solver- go (AppTy s1 t1) (AppTy s2 t2)- = go_app (isNextArgVisible s1) s1 t1 s2 t2-- go (AppTy s1 t1) (TyConApp tc2 ts2)- | Just (ts2', t2') <- snocView ts2- = assert (not (tyConMustBeSaturated tc2)) $- go_app (isNextTyConArgVisible tc2 ts2') s1 t1 (TyConApp tc2 ts2') t2'-- go (TyConApp tc1 ts1) (AppTy s2 t2)- | Just (ts1', t1') <- snocView ts1- = assert (not (tyConMustBeSaturated tc1)) $- go_app (isNextTyConArgVisible tc1 ts1') (TyConApp tc1 ts1') t1' s2 t2-- go (CoercionTy co1) (CoercionTy co2)- = do { let ty1 = coercionType co1- ty2 = coercionType co2- ; kco <- uType KindLevel- (KindEqOrigin orig_ty1 orig_ty2 origin- (Just t_or_k))- ty1 ty2- ; return $ mkProofIrrelCo Nominal kco co1 co2 }-- -- Anything else fails- -- E.g. unifying for-all types, which is relative unusual- go ty1 ty2 = defer ty1 ty2-- ------------------- defer ty1 ty2 -- See Note [Check for equality before deferring]- | ty1 `tcEqType` ty2 = return (mkNomReflCo ty1)- | otherwise = uType_defer t_or_k origin ty1 ty2-- ------------------- go_app vis s1 t1 s2 t2- = do { co_s <- uType t_or_k origin s1 s2- ; let arg_origin- | vis = origin- | otherwise = toInvisibleOrigin origin- ; co_t <- uType t_or_k arg_origin t1 t2- ; return $ mkAppCo co_s co_t }--{- Note [Check for equality before deferring]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Particularly in ambiguity checks we can get equalities like (ty ~ ty).-If ty involves a type function we may defer, which isn't very sensible.-An egregious example of this was in test T9872a, which has a type signature- Proxy :: Proxy (Solutions Cubes)-Doing the ambiguity check on this signature generates the equality- Solutions Cubes ~ Solutions Cubes-and currently the constraint solver normalises both sides at vast cost.-This little short-cut in 'defer' helps quite a bit.--Note [Care with type applications]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Note: type applications need a bit of care!-They can match FunTy and TyConApp, so use splitAppTy_maybe-NB: we've already dealt with type variables and Notes,-so if one type is an App the other one jolly well better be too--Note [Mismatched type lists and application decomposition]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When we find two TyConApps, you might think that the argument lists-are guaranteed equal length. But they aren't. Consider matching- w (T x) ~ Foo (T x y)-We do match (w ~ Foo) first, but in some circumstances we simply create-a deferred constraint; and then go ahead and match (T x ~ T x y).-This came up in #3950.--So either- (a) either we must check for identical argument kinds- when decomposing applications,-- (b) or we must be prepared for ill-kinded unification sub-problems--Currently we adopt (b) since it seems more robust -- no need to maintain-a global invariant.--Note [Expanding synonyms during unification]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We expand synonyms during unification, but:- * We expand *after* the variable case so that we tend to unify- variables with un-expanded type synonym. This just makes it- 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- Phantom Int ~ Phantom Char- it is *wrong* to unify Int and Char.-- * The problem case immediately above can happen only with arguments- to the tycon. So we check for nullary tycons *before* expanding.- This is particularly helpful when checking (* ~ *), because * is- now a type synonym.--Note [Deferred unification]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-We may encounter a unification ty1 ~ ty2 that cannot be performed syntactically,-and yet its consistency is undetermined. Previously, there was no way to still-make it consistent. So a mismatch error was issued.--Now these unifications are deferred until constraint simplification, where type-family instances and given equations may (or may not) establish the consistency.-Deferred unifications are of the form- F ... ~ ...-or x ~ ...-where F is a type function and x is a type variable.-E.g.- id :: x ~ y => x -> y- id e = e--involves the unification x = y. It is deferred until we bring into account the-context x ~ y to establish that it holds.--If available, we defer original types (rather than those where closed type-synonyms have already been expanded via tcCoreView). This is, as usual, to-improve error messages.--************************************************************************-* *- uUnfilledVar and friends-* *-************************************************************************--@uunfilledVar@ is called when at least one of the types being unified is a-variable. It does {\em not} assume that the variable is a fixed point-of the substitution; rather, notice that @uVar@ (defined below) nips-back into @uTys@ if it turns out that the variable is already bound.--}-------------uUnfilledVar :: CtOrigin- -> TypeOrKind- -> SwapFlag- -> TcTyVar -- Tyvar 1: not necessarily a meta-tyvar- -- definitely not a /filled/ meta-tyvar- -> TcTauType -- Type 2- -> TcM Coercion--- "Unfilled" means that the variable is definitely not a filled-in meta tyvar--- It might be a skolem, or untouchable, or meta--uUnfilledVar origin t_or_k swapped tv1 ty2- = do { ty2 <- zonkTcType ty2- -- Zonk to expose things to the- -- occurs check, and so that if ty2- -- looks like a type variable then it- -- /is/ a type variable- ; uUnfilledVar1 origin t_or_k swapped tv1 ty2 }-------------uUnfilledVar1 :: CtOrigin- -> TypeOrKind- -> SwapFlag- -> TcTyVar -- Tyvar 1: not necessarily a meta-tyvar- -- definitely not a /filled/ meta-tyvar- -> TcTauType -- Type 2, zonked- -> TcM Coercion-uUnfilledVar1 origin t_or_k swapped tv1 ty2- | Just tv2 <- getTyVar_maybe ty2- = go tv2-- | otherwise- = uUnfilledVar2 origin t_or_k swapped tv1 ty2-- where- -- 'go' handles the case where both are- -- tyvars so we might want to swap- -- E.g. maybe tv2 is a meta-tyvar and tv1 is not- go tv2 | tv1 == tv2 -- Same type variable => no-op- = return (mkNomReflCo (mkTyVarTy tv1))-- | swapOverTyVars False tv1 tv2 -- Distinct type variables- -- Swap meta tyvar to the left if poss- = do { tv1 <- zonkTyCoVarKind tv1- -- We must zonk tv1's kind because that might- -- not have happened yet, and it's an invariant of- -- uUnfilledTyVar2 that ty2 is fully zonked- -- Omitting this caused #16902- ; uUnfilledVar2 origin t_or_k (flipSwap swapped)- tv2 (mkTyVarTy tv1) }-- | otherwise- = uUnfilledVar2 origin t_or_k swapped tv1 ty2-------------uUnfilledVar2 :: CtOrigin- -> TypeOrKind- -> SwapFlag- -> TcTyVar -- Tyvar 1: not necessarily a meta-tyvar- -- definitely not a /filled/ meta-tyvar- -> TcTauType -- Type 2, zonked- -> TcM Coercion-uUnfilledVar2 origin t_or_k swapped tv1 ty2- = do { cur_lvl <- getTcLevel- ; go cur_lvl }- where- go cur_lvl- | isTouchableMetaTyVar cur_lvl tv1- -- See Note [Unification preconditions], (UNTOUCHABLE) wrinkles- , cterHasNoProblem (checkTyVarEq tv1 ty2)- -- See Note [Prevent unification with type families]- = do { mb_continue_solving <- startSolvingByUnification (metaTyVarInfo tv1) ty2- ; case mb_continue_solving of- { Nothing -> not_ok_so_defer- ; Just ty2 ->- do { co_k <- uType KindLevel kind_origin (typeKind ty2) (tyVarKind tv1)- ; traceTc "uUnfilledVar2 ok" $- vcat [ ppr tv1 <+> dcolon <+> ppr (tyVarKind tv1)- , ppr ty2 <+> dcolon <+> ppr (typeKind ty2)- , ppr (isReflCo co_k), ppr co_k ]-- ; if isReflCo co_k- -- Only proceed if the kinds match- -- NB: tv1 should still be unfilled, despite the kind unification- -- because tv1 is not free in ty2 (or, hence, in its kind)- then do { writeMetaTyVar tv1 ty2- ; return (mkNomReflCo ty2) }-- else defer }}} -- This cannot be solved now. See GHC.Tc.Solver.Canonical- -- Note [Equalities with incompatible kinds] for how- -- this will be dealt with in the solver-- | otherwise- = not_ok_so_defer-- ty1 = mkTyVarTy tv1- kind_origin = KindEqOrigin ty1 ty2 origin (Just t_or_k)-- defer = unSwap swapped (uType_defer t_or_k origin) ty1 ty2-- not_ok_so_defer =- do { traceTc "uUnfilledVar2 not ok" (ppr tv1 $$ ppr ty2)- -- Occurs check or an untouchable: just defer- -- NB: occurs check isn't necessarily fatal:- -- eg tv1 occurred in type family parameter- ; defer }---- | Checks (TYVAR-TV), (COERCION-HOLE) and (CONCRETE) of--- Note [Unification preconditions]; returns True if these conditions--- are satisfied. But see the Note for other preconditions, too.-startSolvingByUnification :: MetaInfo -> TcType -- zonked- -> TcM (Maybe TcType)-startSolvingByUnification _ xi- | hasCoercionHoleTy xi -- (COERCION-HOLE) check- = return Nothing-startSolvingByUnification info xi- = case info of- CycleBreakerTv -> return Nothing- ConcreteTv conc_orig ->- do { (xi, not_conc_reasons) <- makeTypeConcrete conc_orig xi- -- NB: makeTypeConcrete has the side-effect of turning- -- some TauTvs into ConcreteTvs, e.g.- -- alpha[conc] ~# TYPE (TupleRep '[ beta[tau], IntRep ])- -- will write `beta[tau] := beta[conc]`.- --- -- We return the new type, so that callers of this function- -- aren't required to zonk.- ; case not_conc_reasons of- [] -> return $ Just xi- _ -> return Nothing }- TyVarTv ->- case getTyVar_maybe xi of- Nothing -> return Nothing- Just tv ->- case tcTyVarDetails tv of -- (TYVAR-TV) wrinkle- SkolemTv {} -> return $ Just xi- RuntimeUnk -> return $ Just xi- MetaTv { mtv_info = info } ->- case info of- TyVarTv -> return $ Just xi- _ -> return Nothing- _ -> return $ Just xi--swapOverTyVars :: Bool -> TcTyVar -> TcTyVar -> Bool-swapOverTyVars is_given tv1 tv2- -- See Note [Unification variables on the left]- | not is_given, pri1 == 0, pri2 > 0 = True- | not is_given, pri2 == 0, pri1 > 0 = False-- -- Level comparison: see Note [TyVar/TyVar orientation]- | lvl1 `strictlyDeeperThan` lvl2 = False- | lvl2 `strictlyDeeperThan` lvl1 = True-- -- Priority: see Note [TyVar/TyVar orientation]- | pri1 > pri2 = False- | pri2 > pri1 = True-- -- Names: see Note [TyVar/TyVar orientation]- | isSystemName tv2_name, not (isSystemName tv1_name) = True-- | otherwise = False-- where- lvl1 = tcTyVarLevel tv1- lvl2 = tcTyVarLevel tv2- pri1 = lhsPriority tv1- pri2 = lhsPriority tv2- tv1_name = Var.varName tv1- tv2_name = Var.varName tv2---lhsPriority :: TcTyVar -> Int--- Higher => more important to be on the LHS--- => more likely to be eliminated--- See Note [TyVar/TyVar orientation]-lhsPriority tv- = assertPpr (isTyVar tv) (ppr tv) $- case tcTyVarDetails tv of- RuntimeUnk -> 0- SkolemTv {} -> 0- MetaTv { mtv_info = info } -> case info of- CycleBreakerTv -> 0- TyVarTv -> 1- ConcreteTv {} -> 2- TauTv -> 3- RuntimeUnkTv -> 4--{- Note [Unification preconditions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Question: given a homogeneous equality (alpha ~# ty), when is it OK to-unify alpha := ty?--This note only applied to /homogeneous/ equalities, in which both-sides have the same kind.--There are five reasons not to unify:--1. (SKOL-ESC) Skolem-escape- Consider the constraint- forall[2] a[2]. alpha[1] ~ Maybe a[2]- If we unify alpha := Maybe a, the skolem 'a' may escape its scope.- The level alpha[1] says that alpha may be used outside this constraint,- where 'a' is not in scope at all. So we must not unify.-- Bottom line: when looking at a constraint alpha[n] := ty, do not unify- if any free variable of 'ty' has level deeper (greater) than n--2. (UNTOUCHABLE) Untouchable unification variables- Consider the constraint- forall[2] a[2]. b[1] ~ Int => alpha[1] ~ Int- There is no (SKOL-ESC) problem with unifying alpha := Int, but it might- not be the principal solution. Perhaps the "right" solution is alpha := b.- We simply can't tell. See "OutsideIn(X): modular type inference with local- assumptions", section 2.2. We say that alpha[1] is "untouchable" inside- this implication.-- Bottom line: at ambient level 'l', when looking at a constraint- alpha[n] ~ ty, do not unify alpha := ty if there are any given equalities- between levels 'n' and 'l'.-- Exactly what is a "given equality" for the purpose of (UNTOUCHABLE)?- Answer: see Note [Tracking Given equalities] in GHC.Tc.Solver.InertSet--3. (TYVAR-TV) Unifying TyVarTvs and CycleBreakerTvs- This precondition looks at the MetaInfo of the unification variable:-- * TyVarTv: When considering alpha{tyv} ~ ty, if alpha{tyv} is a- TyVarTv it can only unify with a type variable, not with a- structured type. So if 'ty' is a structured type, such as (Maybe x),- don't unify.-- * CycleBreakerTv: never unified, except by restoreTyVarCycles.--4. (CONCRETE) A ConcreteTv can only unify with a concrete type,- by definition.-- That is, if we have `rr[conc] ~ F Int`, we can't unify- `rr` with `F Int`, so we hold off on unifying.- Note however that the equality might get rewritten; for instance- if we can rewrite `F Int` to a concrete type, say `FloatRep`,- then we will have `rr[conc] ~ FloatRep` and we can unify `rr ~ FloatRep`.-- Note that we can still make progress on unification even if- we can't fully solve an equality, e.g.-- alpha[conc] ~# TupleRep '[ beta[tau], F gamma[tau] ]-- we can fill beta[tau] := beta[conc]. This is why we call- 'makeTypeConcrete' in startSolvingByUnification.--5. (COERCION-HOLE) Confusing coercion holes- Suppose our equality is- (alpha :: k) ~ (Int |> {co})- where co :: Type ~ k is an unsolved wanted. Note that this- equality is homogeneous; both sides have kind k. Unifying here- is sensible, but it can lead to very confusing error messages.- It's very much like a Wanted rewriting a Wanted. Even worse,- unifying a variable essentially turns an equality into a Given,- and so we could not use the tracking mechanism in- Note [Wanteds rewrite Wanteds] in GHC.Tc.Types.Constraint.- We thus simply do not unify in this case.-- This is expanded as Wrinkle (2) in Note [Equalities with incompatible kinds]- in GHC.Tc.Solver.Canonical.---Needless to say, all there are wrinkles:--* (SKOL-ESC) Promotion. Given alpha[n] ~ ty, what if beta[k] is free- in 'ty', where beta is a unification variable, and k>n? 'beta'- stands for a monotype, and since it is part of a level-n type- (equal to alpha[n]), we must /promote/ beta to level n. Just make- up a fresh gamma[n], and unify beta[k] := gamma[n].--* (TYVAR-TV) Unification variables. Suppose alpha[tyv,n] is a level-n- TyVarTv (see Note [TyVarTv] in GHC.Tc.Types.TcMType)? Now- consider alpha[tyv,n] ~ Bool. We don't want to unify because that- would break the TyVarTv invariant.-- What about alpha[tyv,n] ~ beta[tau,n], where beta is an ordinary- TauTv? Again, don't unify, because beta might later be unified- with, say Bool. (If levels permit, we reverse the orientation here;- see Note [TyVar/TyVar orientation].)--* (UNTOUCHABLE) Untouchability. When considering (alpha[n] ~ ty), how- do we know whether there are any given equalities between level n- and the ambient level? We answer in two ways:-- * In the eager unifier, we only unify if l=n. If not, alpha may be- untouchable, and defer to the constraint solver. This check is- made in GHC.Tc.Utils.uUnifilledVar2, in the guard- isTouchableMetaTyVar.-- * In the constraint solver, we track where Given equalities occur- and use that to guard unification in GHC.Tc.Solver.Canonical.touchabilityTest- More details in Note [Tracking Given equalities] in GHC.Tc.Solver.InertSet-- Historical note: in the olden days (pre 2021) the constraint solver- also used to unify only if l=n. Equalities were "floated" out of the- implication in a separate step, so that they would become touchable.- But the float/don't-float question turned out to be very delicate,- as you can see if you look at the long series of Notes associated with- GHC.Tc.Solver.floatEqualities, around Nov 2020. It's much easier- to unify in-place, with no floating.--Note [TyVar/TyVar orientation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See also Note [Fundeps with instances, and equality orientation]-where the kind equality orientation is important--Given (a ~ b), should we orient the CEqCan as (a~b) or (b~a)?-This is a surprisingly tricky question! This is invariant (TyEq:TV).--The question is answered by swapOverTyVars, which is used- - in the eager unifier, in GHC.Tc.Utils.Unify.uUnfilledVar1- - in the constraint solver, in GHC.Tc.Solver.Canonical.canEqCanLHS2--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'.-- Generally speaking we always try to put a MetaTv on the left- in preference to SkolemTv or RuntimeUnkTv:- a) Because the MetaTv may be touchable and can be unified- b) Even if it's not touchable, GHC.Tc.Solver.floatConstraints- looks for meta tyvars on the left-- Tie-breaking rules for MetaTvs:- - CycleBreakerTv: This is essentially a stand-in for another type;- it's untouchable and should have the same priority as a skolem: 0.-- - TyVarTv: These can unify only with another tyvar, but we can't unify- a TyVarTv with a TauTv, because then the TyVarTv could (transitively)- get a non-tyvar type. So give these a low priority: 1.-- - ConcreteTv: These are like TauTv, except they can only unify with- a concrete type. So we want to be able to write to them, but not quite- as much as TauTvs: 2.-- - TauTv: This is the common case; we want these on the left so that they- can be written to: 3.-- - RuntimeUnkTv: These aren't really meta-variables used in type inference,- but just a convenience in the implementation of the GHCi debugger.- Eagerly write to these: 4. See Note [RuntimeUnkTv] in- GHC.Runtime.Heap.Inspect.--* Names. If the level and priority comparisons are all- equal, try to eliminate a TyVar 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 [Unification variables on the left]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-For wanteds, but not givens, swap (skolem ~ meta-tv) regardless of-level, so that the unification variable is on the left.--* We /don't/ want this for Givens because if we ave- [G] a[2] ~ alpha[1]- [W] Bool ~ a[2]- we want to rewrite the wanted to Bool ~ alpha[1],- so we can float the constraint and solve it.--* But for Wanteds putting the unification variable on- the left means an easier job when floating, and when- reporting errors -- just fewer cases to consider.-- In particular, we get better skolem-escape messages:- see #18114--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 eliminating skolem capture.-- See also GHC.Tc.Solver.InertSet 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 #15009 for an further analysis of why "deepest on the left"-is a good plan.--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--Historical Note [Eliminate younger unification variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Given a choice of unifying- alpha := beta or beta := alpha-we try, if possible, to eliminate 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-#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 too nice to discard altogether, so I'm leaving these-notes. SLPJ Jan 18.--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-least in some cases. But it's disastrous for test case perf/compiler/T3064.-Here is the problem: Suppose we have (F ty) where we also have [G] F ty ~ a.-What do we do? Do we reduce F? Or do we use the given? Hard to know what's-best. GHC reduces. This is a disaster for T3064, where the type's size-spirals out of control during reduction. If we prevent-unification with type families, then the solver happens to use the equality-before expanding the type family.--It would be lovely in the future to revisit this problem and remove this-extra, unnecessary check. But we retain it for now as it seems to work-better in practice.--Revisited in Nov '20, along with removing flattening variables. Problem-is still present, and the solution is still the same.--Note [Type synonyms and the occur check]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Generally speaking we try to update a variable with type synonyms not-expanded, which improves later error messages, unless looking-inside a type synonym may help resolve a spurious occurs check-error. Consider:- type A a = ()-- f :: (A a -> a -> ()) -> ()- f = \ _ -> ()-- x :: ()- x = f (\ x p -> p x)--We will eventually get a constraint of the form t ~ A t. The ok function above will-properly expand the type (A t) to just (), which is ok to be unified with t. If we had-unified with the original type A t, we would lead the type checker into an infinite loop.--Hence, if the occurs check fails for a type synonym application, then (and *only* then),-the ok function expands the synonym to detect opportunities for occurs check success using-the underlying definition of the type synonym.--The same applies later on in the constraint interaction code; see GHC.Tc.Solver.Interact,-function @occ_check_ok@.--Note [Non-TcTyVars in GHC.Tc.Utils.Unify]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Because the same code is now shared between unifying types and unifying-kinds, we sometimes will see proper TyVars floating around the unifier.-Example (from test case polykinds/PolyKinds12):-- type family Apply (f :: k1 -> k2) (x :: k1) :: k2- type instance Apply g y = g y--When checking the instance declaration, we first *kind-check* the LHS-and RHS, discovering that the instance really should be-- type instance Apply k3 k4 (g :: k3 -> k4) (y :: k3) = g y--During this kind-checking, all the tyvars will be TcTyVars. Then, however,-as a second pass, we desugar the RHS (which is done in functions prefixed-with "tc" in GHC.Tc.TyCl"). By this time, all the kind-vars are proper-TyVars, not TcTyVars, get some kind unification must happen.--Thus, we always check if a TyVar is a TcTyVar before asking if it's a-meta-tyvar.--This used to not be necessary for type-checking (that is, before * :: *)-because expressions get desugared via an algorithm separate from-type-checking (with wrappers, etc.). Types get desugared very differently,-causing this wibble in behavior seen here.--}---- | Breaks apart a function kind into its pieces.-matchExpectedFunKind- :: TypedThing -- ^ type, only for errors- -> Arity -- ^ n: number of desired arrows- -> TcKind -- ^ fun_kind- -> TcM Coercion -- ^ co :: fun_kind ~ (arg1 -> ... -> argn -> res)--matchExpectedFunKind hs_ty n k = go n k- where- go 0 k = return (mkNomReflCo k)-- go n k | Just k' <- coreView k = go n k'-- go n k@(TyVarTy kvar)- | isMetaTyVar kvar- = do { maybe_kind <- readMetaTyVar kvar- ; case maybe_kind of- Indirect fun_kind -> go n fun_kind- Flexi -> defer n k }-- go n (FunTy { ft_af = af, ft_mult = w, ft_arg = arg, ft_res = res })- | isVisibleFunArg af- = do { co <- go (n-1) res- ; return (mkNakedFunCo1 Nominal af (mkNomReflCo w) (mkNomReflCo arg) co) }-- go n other- = defer n other-- defer n k- = do { arg_kinds <- newMetaKindVars n- ; res_kind <- newMetaKindVar- ; let new_fun = mkVisFunTysMany arg_kinds res_kind- origin = TypeEqOrigin { uo_actual = k- , uo_expected = new_fun- , uo_thing = Just hs_ty- , uo_visible = True- }- ; uType KindLevel origin k new_fun }--{- *********************************************************************-* *- Equality invariant checking-* *-********************************************************************* -}---{- Note [Checking for foralls]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Unless we have -XImpredicativeTypes (which is a totally unsupported-feature), we do not want to unify- alpha ~ (forall a. a->a) -> Int-So we look for foralls hidden inside the type, and it's convenient-to do that at the same time as the occurs check (which looks for-occurrences of alpha).--However, it's not just a question of looking for foralls /anywhere/!-Consider- (alpha :: forall k. k->*) ~ (beta :: forall k. k->*)-This is legal; e.g. dependent/should_compile/T11635.--We don't want to reject it because of the forall in beta's kind, but-(see Note [Occurrence checking: look inside kinds] in GHC.Core.Type)-we do need to look in beta's kind. So we carry a flag saying if a-'forall' is OK, and switch the flag on when stepping inside a kind.--Why is it OK? Why does it not count as impredicative polymorphism?-The reason foralls are bad is because we reply on "seeing" foralls-when doing implicit instantiation. But the forall inside the kind is-fine. We'll generate a kind equality constraint- (forall k. k->*) ~ (forall k. k->*)-to check that the kinds of lhs and rhs are compatible. If alpha's-kind had instead been- (alpha :: kappa)-then this kind equality would rightly complain about unifying kappa-with (forall k. k->*)---}-------------------{-# NOINLINE checkTyVarEq #-} -- checkTyVarEq becomes big after the `inline` fires-checkTyVarEq :: TcTyVar -> TcType -> CheckTyEqResult-checkTyVarEq tv ty- = inline checkTypeEq (TyVarLHS tv) ty- -- inline checkTypeEq so that the `case`s over the CanEqLHS get blasted away--{-# NOINLINE checkTyFamEq #-} -- checkTyFamEq becomes big after the `inline` fires-checkTyFamEq :: TyCon -- type function- -> [TcType] -- args, exactly saturated- -> TcType -- RHS- -> CheckTyEqResult -- always drops cteTypeFamily-checkTyFamEq fun_tc fun_args ty- = inline checkTypeEq (TyFamLHS fun_tc fun_args) ty- `cterRemoveProblem` cteTypeFamily- -- inline checkTypeEq so that the `case`s over the CanEqLHS get blasted away--checkTypeEq :: CanEqLHS -> TcType -> CheckTyEqResult--- If cteHasNoProblem (checkTypeEq dflags lhs rhs), then lhs ~ rhs--- is a canonical CEqCan.------ In particular, this looks for:--- (a) a forall type (forall a. blah)--- (b) a predicate type (c => ty)--- (c) a type family; see Note [Prevent unification with type families]--- (d) an occurrence of the LHS (occurs check)------ Note that an occurs-check does not mean "definite error". For example--- type family F a--- type instance F Int = Int--- consider--- b0 ~ F b0--- This is perfectly reasonable, if we later get b0 ~ Int. But we--- certainly can't unify b0 := F b0------ For (a), (b), and (c) we check only the top level of the type, NOT--- inside the kinds of variables it mentions, and for (d) see--- Note [CEqCan occurs check] in GHC.Tc.Types.Constraint.------ checkTypeEq is called from--- * checkTyFamEq, checkTyVarEq (which inline it to specialise away the--- case-analysis on 'lhs')--- * checkEqCanLHSFinish, which does not know the form of 'lhs'-checkTypeEq lhs ty- = go ty- where- impredicative = cteProblem cteImpredicative- type_family = cteProblem cteTypeFamily- insoluble_occurs = cteProblem cteInsolubleOccurs- soluble_occurs = cteProblem cteSolubleOccurs-- -- The GHCi runtime debugger does its type-matching with- -- unification variables that can unify with a polytype- -- or a TyCon that would usually be disallowed by bad_tc- -- See Note [RuntimeUnkTv] in GHC.Runtime.Heap.Inspect- ghci_tv- | TyVarLHS tv <- lhs- , MetaTv { mtv_info = RuntimeUnkTv } <- tcTyVarDetails tv- = True-- | otherwise- = False-- go :: TcType -> CheckTyEqResult- go (TyVarTy tv') = go_tv tv'- go (TyConApp tc tys) = go_tc tc tys- go (LitTy {}) = cteOK- go (FunTy {ft_af = af, ft_mult = w, ft_arg = a, ft_res = r})- = go w S.<> go a S.<> go r S.<>- if not ghci_tv && isInvisibleFunArg af- then impredicative- else cteOK- go (AppTy fun arg) = go fun S.<> go arg- go (CastTy ty co) = go ty S.<> go_co co- go (CoercionTy co) = go_co co- go (ForAllTy (Bndr tv' _) ty) = (case lhs of- TyVarLHS tv | tv == tv' -> go_occ (tyVarKind tv') S.<> cterClearOccursCheck (go ty)- | otherwise -> go_occ (tyVarKind tv') S.<> go ty- _ -> go ty)- S.<>- if ghci_tv then cteOK else impredicative-- go_tv :: TcTyVar -> CheckTyEqResult- -- this slightly peculiar way of defining this means- -- we don't have to evaluate this `case` at every variable- -- occurrence- go_tv = case lhs of- TyVarLHS tv -> \ tv' -> go_occ (tyVarKind tv') S.<>- if tv == tv' then insoluble_occurs else cteOK- TyFamLHS {} -> \ _tv' -> cteOK- -- See Note [Occurrence checking: look inside kinds] in GHC.Core.Type-- -- For kinds, we only do an occurs check; we do not worry- -- about type families or foralls- -- See Note [Checking for foralls]- go_occ k = cterFromKind $ go k-- go_tc :: TyCon -> [TcType] -> CheckTyEqResult- -- this slightly peculiar way of defining this means- -- we don't have to evaluate this `case` at every tyconapp- go_tc = case lhs of- TyVarLHS {} -> \ tc tys -> check_tc tc S.<> go_tc_args tc tys- TyFamLHS fam_tc fam_args -> \ tc tys ->- if tcEqTyConApps fam_tc fam_args tc tys- then insoluble_occurs- else check_tc tc S.<> go_tc_args tc tys-- -- just look at arguments, not the tycon itself- go_tc_args :: TyCon -> [TcType] -> CheckTyEqResult- go_tc_args tc tys | isGenerativeTyCon tc Nominal = foldMap go tys- | otherwise- = let (tf_args, non_tf_args) = splitAt (tyConArity tc) tys in- cterSetOccursCheckSoluble (foldMap go tf_args) S.<> foldMap go non_tf_args-- -- no bother about impredicativity in coercions, as they're- -- inferred- go_co co | TyVarLHS tv <- lhs- , tv `elemVarSet` tyCoVarsOfCo co- = soluble_occurs-- -- Don't check coercions for type families; see commentary at top of function- | otherwise- = cteOK-- check_tc :: TyCon -> CheckTyEqResult- check_tc- | ghci_tv = \ _tc -> cteOK- | otherwise = \ tc -> (if isTauTyCon tc then cteOK else impredicative) S.<>- (if isFamFreeTyCon tc then cteOK else type_family)+{-# LANGUAGE MultiWayIf #-}+{-# LANGUAGE RecordWildCards #-}++{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1992-1998+-}++-- | Type subsumption and unification+module GHC.Tc.Utils.Unify (+ -- Full-blown subsumption+ tcWrapResult, tcWrapResultO, tcWrapResultMono,+ tcTopSkolemise, tcSkolemiseScoped, tcSkolemiseExpType,+ tcSubType, tcSubTypeSigma, tcSubTypePat, tcSubTypeDS,+ tcSubTypeAmbiguity, tcSubMult,+ checkConstraints, checkTvConstraints,+ buildImplicationFor, buildTvImplication, emitResidualTvConstraint,++ -- Various unifications+ unifyType, unifyKind, unifyInvisibleType, unifyExpectedType,+ unifyTypeAndEmit, promoteTcType,+ swapOverTyVars, touchabilityAndShapeTest,+ UnifyEnv(..), updUEnvLoc, setUEnvRole,+ uType,++ --------------------------------+ -- Holes+ tcInfer,+ matchExpectedListTy,+ matchExpectedTyConApp,+ matchExpectedAppTy,+ matchExpectedFunTys,+ matchExpectedFunKind,+ matchActualFunTySigma, matchActualFunTysRho,++ checkTyEqRhs, recurseIntoTyConApp,+ PuResult(..), failCheckWith, okCheckRefl, mapCheck,+ TyEqFlags(..), TyEqFamApp(..), AreUnifying(..), LevelCheck(..), FamAppBreaker,+ famAppArgFlags, simpleUnifyCheck, checkPromoteFreeVars,+ ) where++import GHC.Prelude++import GHC.Hs++import GHC.Tc.Utils.Concrete ( hasFixedRuntimeRep, hasFixedRuntimeRep_syntactic )+import GHC.Tc.Utils.Env+import GHC.Tc.Utils.Instantiate+import GHC.Tc.Utils.Monad+import GHC.Tc.Utils.TcMType+import GHC.Tc.Utils.TcType+import GHC.Tc.Types.Evidence+import GHC.Tc.Types.Constraint+import GHC.Tc.Types.Origin+import GHC.Tc.Zonk.TcType++import GHC.Core.Type+import GHC.Core.TyCo.Rep+import GHC.Core.TyCo.FVs( isInjectiveInType )+import GHC.Core.TyCo.Ppr( debugPprType {- pprTyVar -} )+import GHC.Core.TyCon+import GHC.Core.Coercion+import GHC.Core.Multiplicity+import GHC.Core.Reduction++import qualified GHC.LanguageExtensions as LangExt++import GHC.Builtin.Types+import GHC.Types.Name+import GHC.Types.Var as Var+import GHC.Types.Var.Set+import GHC.Types.Var.Env+import GHC.Types.Basic+import GHC.Types.Unique.Set (nonDetEltsUniqSet)++import GHC.Utils.Error+import GHC.Utils.Misc+import GHC.Utils.Outputable as Outputable+import GHC.Utils.Panic+import GHC.Utils.Panic.Plain++import GHC.Driver.DynFlags+import GHC.Data.Bag+import GHC.Data.FastString( fsLit )++import Control.Monad+import Data.Monoid as DM ( Any(..) )+import qualified Data.Semigroup as S ( (<>) )++{- *********************************************************************+* *+ matchActualFunTys+* *+********************************************************************* -}++-- | 'matchActualFunTySigma' looks for just one function arrow,+-- returning an uninstantiated sigma-type.+--+-- Invariant: the returned argument type has a syntactically fixed+-- RuntimeRep in the sense of Note [Fixed RuntimeRep]+-- in GHC.Tc.Utils.Concrete.+--+-- See Note [Return arguments with a fixed RuntimeRep].+matchActualFunTySigma+ :: ExpectedFunTyOrigin+ -- ^ See Note [Herald for matchExpectedFunTys]+ -> Maybe TypedThing+ -- ^ The thing with type TcSigmaType+ -> (Arity, [Scaled TcSigmaType])+ -- ^ Total number of value args in the call, and+ -- types of values args to which function has+ -- been applied already (reversed)+ -- (Both are used only for error messages)+ -> TcRhoType+ -- ^ Type to analyse: a TcRhoType+ -> TcM (HsWrapper, Scaled TcSigmaTypeFRR, TcSigmaType)+-- This function takes in a type to analyse (a RhoType) and returns+-- an argument type and a result type (splitting apart a function arrow).+-- The returned argument type is a SigmaType with a fixed RuntimeRep;+-- as explained in Note [Return arguments with a fixed RuntimeRep].+--+-- See Note [matchActualFunTy error handling] for the first three arguments++-- If (wrap, arg_ty, res_ty) = matchActualFunTySigma ... fun_ty+-- then wrap :: fun_ty ~> (arg_ty -> res_ty)+-- and NB: res_ty is an (uninstantiated) SigmaType++matchActualFunTySigma herald mb_thing err_info fun_ty+ = assertPpr (isRhoTy fun_ty) (ppr fun_ty) $+ go fun_ty+ where+ -- Does not allocate unnecessary meta variables: if the input already is+ -- a function, we just take it apart. Not only is this efficient,+ -- it's important for higher rank: the argument might be of form+ -- (forall a. ty) -> other+ -- If allocated (fresh-meta-var1 -> fresh-meta-var2) and unified, we'd+ -- hide the forall inside a meta-variable+ go :: TcRhoType -- The type we're processing, perhaps after+ -- expanding type synonyms+ -> TcM (HsWrapper, Scaled TcSigmaTypeFRR, TcSigmaType)+ go ty | Just ty' <- coreView ty = go ty'++ go (FunTy { ft_af = af, ft_mult = w, ft_arg = arg_ty, ft_res = res_ty })+ = assert (isVisibleFunArg af) $+ do { hasFixedRuntimeRep_syntactic (FRRExpectedFunTy herald 1) arg_ty+ ; return (idHsWrapper, Scaled w arg_ty, res_ty) }++ go ty@(TyVarTy tv)+ | isMetaTyVar tv+ = do { cts <- readMetaTyVar tv+ ; case cts of+ Indirect ty' -> go ty'+ Flexi -> defer ty }++ -- In all other cases we bale out into ordinary unification+ -- However unlike the meta-tyvar case, we are sure that the+ -- number of arguments doesn't match arity of the original+ -- type, so we can add a bit more context to the error message+ -- (cf #7869).+ --+ -- It is not always an error, because specialized type may have+ -- different arity, for example:+ --+ -- > f1 = f2 'a'+ -- > f2 :: Monad m => m Bool+ -- > f2 = undefined+ --+ -- But in that case we add specialized type into error context+ -- anyway, because it may be useful. See also #9605.+ go ty = addErrCtxtM (mk_ctxt ty) (defer ty)++ ------------+ defer fun_ty+ = do { arg_ty <- newOpenFlexiTyVarTy+ ; res_ty <- newOpenFlexiTyVarTy+ ; mult <- newFlexiTyVarTy multiplicityTy+ ; let unif_fun_ty = tcMkVisFunTy mult arg_ty res_ty+ ; co <- unifyType mb_thing fun_ty unif_fun_ty+ ; hasFixedRuntimeRep_syntactic (FRRExpectedFunTy herald 1) arg_ty+ ; return (mkWpCastN co, Scaled mult arg_ty, res_ty) }++ ------------+ mk_ctxt :: TcType -> TidyEnv -> ZonkM (TidyEnv, SDoc)+ mk_ctxt res_ty env = mkFunTysMsg env herald (reverse arg_tys_so_far)+ res_ty n_val_args_in_call+ (n_val_args_in_call, arg_tys_so_far) = err_info++{- Note [matchActualFunTy error handling]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+matchActualFunTySigma is made much more complicated by the+desire to produce good error messages. Consider the application+ f @Int x y+In GHC.Tc.Gen.Expr.tcArgs we deal with visible type arguments,+and then call matchActualFunTysPart for each individual value+argument. It, in turn, must instantiate any type/dictionary args,+before looking for an arrow type.++But if it doesn't find an arrow type, it wants to generate a message+like "f is applied to two arguments but its type only has one".+To do that, it needs to know about the args that tcArgs has already+munched up -- hence passing in n_val_args_in_call and arg_tys_so_far;+and hence also the accumulating so_far arg to 'go'.++This allows us (in mk_ctxt) to construct f's /instantiated/ type,+with just the values-arg arrows, which is what we really want+in the error message.++Ugh!+-}++-- | Like 'matchExpectedFunTys', but used when you have an "actual" type,+-- for example in function application.+--+-- INVARIANT: the returned argument types all have a syntactically fixed RuntimeRep+-- in the sense of Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete.+-- See Note [Return arguments with a fixed RuntimeRep].+matchActualFunTysRho :: ExpectedFunTyOrigin -- ^ See Note [Herald for matchExpectedFunTys]+ -> CtOrigin+ -> Maybe TypedThing -- ^ the thing with type TcSigmaType+ -> Arity+ -> TcSigmaType+ -> TcM (HsWrapper, [Scaled TcSigmaTypeFRR], TcRhoType)+-- If matchActualFunTysRho n ty = (wrap, [t1,..,tn], res_ty)+-- then wrap : ty ~> (t1 -> ... -> tn -> res_ty)+-- and res_ty is a RhoType+-- NB: the returned type is top-instantiated; it's a RhoType+matchActualFunTysRho herald ct_orig mb_thing n_val_args_wanted fun_ty+ = go n_val_args_wanted [] fun_ty+ where+ go n so_far fun_ty+ | not (isRhoTy fun_ty)+ = do { (wrap1, rho) <- topInstantiate ct_orig fun_ty+ ; (wrap2, arg_tys, res_ty) <- go n so_far rho+ ; return (wrap2 <.> wrap1, arg_tys, res_ty) }++ go 0 _ fun_ty = return (idHsWrapper, [], fun_ty)++ go n so_far fun_ty+ = do { (wrap_fun1, arg_ty1, res_ty1) <- matchActualFunTySigma+ herald mb_thing+ (n_val_args_wanted, so_far)+ fun_ty+ ; (wrap_res, arg_tys, res_ty) <- go (n-1) (arg_ty1:so_far) res_ty1+ ; let wrap_fun2 = mkWpFun idHsWrapper wrap_res arg_ty1 res_ty+ -- NB: arg_ty1 comes from matchActualFunTySigma, so it has+ -- a syntactically fixed RuntimeRep as needed to call mkWpFun.+ ; return (wrap_fun2 <.> wrap_fun1, arg_ty1:arg_tys, res_ty) }++{-+************************************************************************+* *+ matchExpected functions+* *+************************************************************************++Note [Herald for matchExpectedFunTys]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The 'herald' always looks like:+ "The equation(s) for 'f' have"+ "The abstraction (\x.e) takes"+ "The section (+ x) expects"+ "The function 'f' is applied to"++This is used to construct a message of form++ The abstraction `\Just 1 -> ...' takes two arguments+ but its type `Maybe a -> a' has only one++ The equation(s) for `f' have two arguments+ but its type `Maybe a -> a' has only one++ The section `(f 3)' requires 'f' to take two arguments+ but its type `Int -> Int' has only one++ The function 'f' is applied to two arguments+ but its type `Int -> Int' has only one++When visible type applications (e.g., `f @Int 1 2`, as in #13902) enter the+picture, we have a choice in deciding whether to count the type applications as+proper arguments:++ The function 'f' is applied to one visible type argument+ and two value arguments+ but its type `forall a. a -> a` has only one visible type argument+ and one value argument++Or whether to include the type applications as part of the herald itself:++ The expression 'f @Int' is applied to two arguments+ but its type `Int -> Int` has only one++The latter is easier to implement and is arguably easier to understand, so we+choose to implement that option.++Note [matchExpectedFunTys]+~~~~~~~~~~~~~~~~~~~~~~~~~~+matchExpectedFunTys checks that a sigma has the form+of an n-ary function. It passes the decomposed type to the+thing_inside, and returns a wrapper to coerce between the two types++It's used wherever a language construct must have a functional type,+namely:+ A lambda expression+ A function definition+ An operator section++This function must be written CPS'd because it needs to fill in the+ExpTypes produced for arguments before it can fill in the ExpType+passed in.++Note [Return arguments with a fixed RuntimeRep]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The functions++ - matchExpectedFunTys,+ - matchActualFunTySigma,+ - matchActualFunTysRho,++peel off argument types, as explained in Note [matchExpectedFunTys].+It's important that these functions return argument types that have+a fixed runtime representation, otherwise we would be in violation+of the representation-polymorphism invariants of+Note [Representation polymorphism invariants] in GHC.Core.++This is why all these functions have an additional invariant,+that the argument types they return all have a syntactically fixed RuntimeRep,+in the sense of Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete.++Example:++ Suppose we have++ type F :: Type -> RuntimeRep+ type family F a where { F Int = LiftedRep }++ type Dual :: Type -> Type+ type family Dual a where+ Dual a = a -> ()++ f :: forall (a :: TYPE (F Int)). Dual a+ f = \ x -> ()++ The body of `f` is a lambda abstraction, so we must be able to split off+ one argument type from its type. This is handled by `matchExpectedFunTys`+ (see 'GHC.Tc.Gen.Match.tcMatchLambda'). We end up with desugared Core that+ looks like this:++ f :: forall (a :: TYPE (F Int)). Dual (a |> (TYPE F[0]))+ f = \ @(a :: TYPE (F Int)) ->+ (\ (x :: (a |> (TYPE F[0]))) -> ())+ `cast`+ (Sub (Sym (Dual[0] <(a |> (TYPE F[0]))>)))++ Two important transformations took place:++ 1. We inserted casts around the argument type to ensure that it has+ a fixed runtime representation, as required by invariant (I1) from+ Note [Representation polymorphism invariants] in GHC.Core.+ 2. We inserted a cast around the whole lambda to make everything line up+ with the type signature.+-}++-- | Use this function to split off arguments types when you have an+-- \"expected\" type.+--+-- This function skolemises at each polytype.+--+-- Invariant: this function only applies the provided function+-- to a list of argument types which all have a syntactically fixed RuntimeRep+-- in the sense of Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete.+-- See Note [Return arguments with a fixed RuntimeRep].+matchExpectedFunTys :: forall a.+ ExpectedFunTyOrigin -- See Note [Herald for matchExpectedFunTys]+ -> UserTypeCtxt+ -> Arity+ -> ExpRhoType -- Skolemised+ -> ([Scaled ExpSigmaTypeFRR] -> ExpRhoType -> TcM a)+ -> TcM (HsWrapper, a)+-- If matchExpectedFunTys n ty = (wrap, _)+-- then wrap : (t1 -> ... -> tn -> ty_r) ~> ty,+-- where [t1, ..., tn], ty_r are passed to the thing_inside+matchExpectedFunTys herald ctx arity orig_ty thing_inside+ = case orig_ty of+ Check ty -> go [] arity ty+ _ -> defer [] arity orig_ty+ where+ -- Skolemise any foralls /before/ the zero-arg case+ -- so that we guarantee to return a rho-type+ go acc_arg_tys n ty+ | (tvs, theta, _) <- tcSplitSigmaTy ty+ , not (null tvs && null theta)+ = do { (wrap_gen, (wrap_res, result)) <- tcTopSkolemise ctx ty $ \ty' ->+ go acc_arg_tys n ty'+ ; return (wrap_gen <.> wrap_res, result) }++ -- No more args; do this /before/ coreView, so+ -- that we do not unnecessarily unwrap synonyms+ go acc_arg_tys 0 rho_ty+ = do { result <- thing_inside (reverse acc_arg_tys) (mkCheckExpType rho_ty)+ ; return (idHsWrapper, result) }++ go acc_arg_tys n ty+ | Just ty' <- coreView ty = go acc_arg_tys n ty'++ go acc_arg_tys n (FunTy { ft_af = af, ft_mult = mult, ft_arg = arg_ty, ft_res = res_ty })+ = assert (isVisibleFunArg af) $+ do { let arg_pos = 1 + length acc_arg_tys -- for error messages only+ ; (arg_co, arg_ty) <- hasFixedRuntimeRep (FRRExpectedFunTy herald arg_pos) arg_ty+ ; (wrap_res, result) <- go ((Scaled mult $ mkCheckExpType arg_ty) : acc_arg_tys)+ (n-1) res_ty+ ; let wrap_arg = mkWpCastN arg_co+ fun_wrap = mkWpFun wrap_arg wrap_res (Scaled mult arg_ty) res_ty+ ; return (fun_wrap, result) }++ go acc_arg_tys n ty@(TyVarTy tv)+ | isMetaTyVar tv+ = do { cts <- readMetaTyVar tv+ ; case cts of+ Indirect ty' -> go acc_arg_tys n ty'+ Flexi -> defer acc_arg_tys n (mkCheckExpType ty) }++ -- In all other cases we bale out into ordinary unification+ -- However unlike the meta-tyvar case, we are sure that the+ -- number of arguments doesn't match arity of the original+ -- type, so we can add a bit more context to the error message+ -- (cf #7869).+ --+ -- It is not always an error, because specialized type may have+ -- different arity, for example:+ --+ -- > f1 = f2 'a'+ -- > f2 :: Monad m => m Bool+ -- > f2 = undefined+ --+ -- But in that case we add specialized type into error context+ -- anyway, because it may be useful. See also #9605.+ go acc_arg_tys n ty = addErrCtxtM (mk_ctxt acc_arg_tys ty) $+ defer acc_arg_tys n (mkCheckExpType ty)++ ------------+ defer :: [Scaled ExpSigmaTypeFRR] -> Arity -> ExpRhoType -> TcM (HsWrapper, a)+ defer acc_arg_tys n fun_ty+ = do { let last_acc_arg_pos = length acc_arg_tys+ ; more_arg_tys <- mapM new_exp_arg_ty [last_acc_arg_pos + 1 .. last_acc_arg_pos + n]+ ; res_ty <- newInferExpType+ ; result <- thing_inside (reverse acc_arg_tys ++ more_arg_tys) res_ty+ ; more_arg_tys <- mapM (\(Scaled m t) -> Scaled m <$> readExpType t) more_arg_tys+ ; res_ty <- readExpType res_ty+ ; let unif_fun_ty = mkScaledFunTys more_arg_tys res_ty+ ; wrap <- tcSubType AppOrigin ctx unif_fun_ty fun_ty+ -- Not a good origin at all :-(+ ; return (wrap, result) }++ new_exp_arg_ty :: Int -> TcM (Scaled ExpSigmaTypeFRR)+ new_exp_arg_ty arg_pos -- position for error messages only+ = mkScaled <$> newFlexiTyVarTy multiplicityTy+ <*> newInferExpTypeFRR (FRRExpectedFunTy herald arg_pos)++ ------------+ mk_ctxt :: [Scaled ExpSigmaTypeFRR] -> TcType -> TidyEnv -> ZonkM (TidyEnv, SDoc)+ mk_ctxt arg_tys res_ty env+ = mkFunTysMsg env herald arg_tys' res_ty arity+ where+ arg_tys' = map (\(Scaled u v) -> Scaled u (checkingExpType "matchExpectedFunTys" v)) $+ reverse arg_tys+ -- this is safe b/c we're called from "go"++mkFunTysMsg :: TidyEnv+ -> ExpectedFunTyOrigin+ -> [Scaled TcType] -> TcType -> Arity+ -> ZonkM (TidyEnv, SDoc)+mkFunTysMsg env herald arg_tys res_ty n_val_args_in_call+ = do { (env', fun_rho) <- zonkTidyTcType env $+ mkScaledFunTys arg_tys res_ty++ ; let (all_arg_tys, _) = splitFunTys fun_rho+ n_fun_args = length all_arg_tys++ msg | n_val_args_in_call <= n_fun_args -- Enough args, in the end+ = text "In the result of a function call"+ | otherwise+ = hang (full_herald <> comma)+ 2 (sep [ text "but its type" <+> quotes (pprType fun_rho)+ , if n_fun_args == 0 then text "has none"+ else text "has only" <+> speakN n_fun_args])++ ; return (env', msg) }+ where+ full_herald = pprExpectedFunTyHerald herald+ <+> speakNOf n_val_args_in_call (text "value argument")++----------------------+matchExpectedListTy :: TcRhoType -> TcM (TcCoercionN, TcRhoType)+-- Special case for lists+matchExpectedListTy exp_ty+ = do { (co, [elt_ty]) <- matchExpectedTyConApp listTyCon exp_ty+ ; return (co, elt_ty) }++---------------------+matchExpectedTyConApp :: TyCon -- T :: forall kv1 ... kvm. k1 -> ... -> kn -> *+ -> TcRhoType -- orig_ty+ -> TcM (TcCoercionN, -- T k1 k2 k3 a b c ~N orig_ty+ [TcSigmaType]) -- Element types, k1 k2 k3 a b c++-- It's used for wired-in tycons, so we call checkWiredInTyCon+-- Precondition: never called with FunTyCon+-- Precondition: input type :: *+-- Postcondition: (T k1 k2 k3 a b c) is well-kinded++matchExpectedTyConApp tc orig_ty+ = assertPpr (isAlgTyCon tc) (ppr tc) $+ go orig_ty+ where+ go ty+ | Just ty' <- coreView ty+ = go ty'++ go ty@(TyConApp tycon args)+ | tc == tycon -- Common case+ = return (mkNomReflCo ty, args)++ go (TyVarTy tv)+ | isMetaTyVar tv+ = do { cts <- readMetaTyVar tv+ ; case cts of+ Indirect ty -> go ty+ Flexi -> defer }++ go _ = defer++ -- If the common case does not occur, instantiate a template+ -- T k1 .. kn t1 .. tm, and unify with the original type+ -- Doing it this way ensures that the types we return are+ -- kind-compatible with T. For example, suppose we have+ -- matchExpectedTyConApp T (f Maybe)+ -- where data T a = MkT a+ -- Then we don't want to instantiate T's data constructors with+ -- (a::*) ~ Maybe+ -- because that'll make types that are utterly ill-kinded.+ -- This happened in #7368+ defer+ = do { (_, arg_tvs) <- newMetaTyVars (tyConTyVars tc)+ ; traceTc "matchExpectedTyConApp" (ppr tc $$ ppr (tyConTyVars tc) $$ ppr arg_tvs)+ ; let args = mkTyVarTys arg_tvs+ tc_template = mkTyConApp tc args+ ; co <- unifyType Nothing tc_template orig_ty+ ; return (co, args) }++----------------------+matchExpectedAppTy :: TcRhoType -- orig_ty+ -> TcM (TcCoercion, -- m a ~N orig_ty+ (TcSigmaType, TcSigmaType)) -- Returns m, a+-- If the incoming type is a mutable type variable of kind k, then+-- matchExpectedAppTy returns a new type variable (m: * -> k); note the *.++matchExpectedAppTy orig_ty+ = go orig_ty+ where+ go ty+ | Just ty' <- coreView ty = go ty'++ | Just (fun_ty, arg_ty) <- tcSplitAppTy_maybe ty+ = return (mkNomReflCo orig_ty, (fun_ty, arg_ty))++ go (TyVarTy tv)+ | isMetaTyVar tv+ = do { cts <- readMetaTyVar tv+ ; case cts of+ Indirect ty -> go ty+ Flexi -> defer }++ go _ = defer++ -- Defer splitting by generating an equality constraint+ defer+ = do { ty1 <- newFlexiTyVarTy kind1+ ; ty2 <- newFlexiTyVarTy kind2+ ; co <- unifyType Nothing (mkAppTy ty1 ty2) orig_ty+ ; return (co, (ty1, ty2)) }++ orig_kind = typeKind orig_ty+ kind1 = mkVisFunTyMany liftedTypeKind orig_kind+ kind2 = liftedTypeKind -- m :: * -> k+ -- arg type :: *++{- **********************************************************************+*+ fillInferResult+*+********************************************************************** -}++{- Note [inferResultToType]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+expTypeToType and inferResultType convert an InferResult to a monotype.+It must be a monotype because if the InferResult isn't already filled in,+we fill it in with a unification variable (hence monotype). So to preserve+order-independence we check for mono-type-ness even if it *is* filled in+already.++See also Note [TcLevel of ExpType] in GHC.Tc.Utils.TcType, and+Note [fillInferResult].+-}++-- | Fill an 'InferResult' with the given type.+--+-- If @co = fillInferResult t1 infer_res@, then @co :: t1 ~# t2@,+-- where @t2@ is the type stored in the 'ir_ref' field of @infer_res@.+--+-- This function enforces the following invariants:+--+-- - Level invariant.+-- The stored type @t2@ is at the same level as given by the+-- 'ir_lvl' field.+-- - FRR invariant.+-- Whenever the 'ir_frr' field is not @Nothing@, @t2@ is guaranteed+-- to have a syntactically fixed RuntimeRep, in the sense of+-- Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete.+fillInferResult :: TcType -> InferResult -> TcM TcCoercionN+fillInferResult act_res_ty (IR { ir_uniq = u+ , ir_lvl = res_lvl+ , ir_frr = mb_frr+ , ir_ref = ref })+ = do { mb_exp_res_ty <- readTcRef ref+ ; case mb_exp_res_ty of+ Just exp_res_ty+ -- We progressively refine the type stored in 'ref',+ -- for example when inferring types across multiple equations.+ --+ -- Example:+ --+ -- \ x -> case y of { True -> x ; False -> 3 :: Int }+ --+ -- When inferring the return type of this function, we will create+ -- an 'Infer' 'ExpType', which will first be filled by the type of 'x'+ -- after typechecking the first equation, and then filled again with+ -- the type 'Int', at which point we want to ensure that we unify+ -- the type of 'x' with 'Int'. This is what is happening below when+ -- we are "joining" several inferred 'ExpType's.+ -> do { traceTc "Joining inferred ExpType" $+ ppr u <> colon <+> ppr act_res_ty <+> char '~' <+> ppr exp_res_ty+ ; cur_lvl <- getTcLevel+ ; unless (cur_lvl `sameDepthAs` res_lvl) $+ ensureMonoType act_res_ty+ ; unifyType Nothing act_res_ty exp_res_ty }+ Nothing+ -> do { traceTc "Filling inferred ExpType" $+ ppr u <+> text ":=" <+> ppr act_res_ty++ -- Enforce the level invariant: ensure the TcLevel of+ -- the type we are writing to 'ref' matches 'ir_lvl'.+ ; (prom_co, act_res_ty) <- promoteTcType res_lvl act_res_ty++ -- Enforce the FRR invariant: ensure the type has a syntactically+ -- fixed RuntimeRep (if necessary, i.e. 'mb_frr' is not 'Nothing').+ ; (frr_co, act_res_ty) <-+ case mb_frr of+ Nothing -> return (mkNomReflCo act_res_ty, act_res_ty)+ Just frr_orig -> hasFixedRuntimeRep frr_orig act_res_ty++ -- Compose the two coercions.+ ; let final_co = prom_co `mkTransCo` frr_co++ ; writeTcRef ref (Just act_res_ty)++ ; return final_co }+ }++{- Note [fillInferResult]+~~~~~~~~~~~~~~~~~~~~~~~~~+When inferring, we use fillInferResult to "fill in" the hole in InferResult+ data InferResult = IR { ir_uniq :: Unique+ , ir_lvl :: TcLevel+ , ir_ref :: IORef (Maybe TcType) }++There are two things to worry about:++1. What if it is under a GADT or existential pattern match?+ - GADTs: a unification variable (and Infer's hole is similar) is untouchable+ - Existentials: be careful about skolem-escape++2. What if it is filled in more than once? E.g. multiple branches of a case+ case e of+ T1 -> e1+ T2 -> e2++Our typing rules are:++* The RHS of a existential or GADT alternative must always be a+ monotype, regardless of the number of alternatives.++* Multiple non-existential/GADT branches can have (the same)+ higher rank type (#18412). E.g. this is OK:+ case e of+ True -> hr+ False -> hr+ where hr:: (forall a. a->a) -> Int+ c.f. Section 7.1 of "Practical type inference for arbitrary-rank types"+ We use choice (2) in that Section.+ (GHC 8.10 and earlier used choice (1).)++ But note that+ case e of+ True -> hr+ False -> \x -> hr x+ will fail, because we still /infer/ both branches, so the \x will get+ a (monotype) unification variable, which will fail to unify with+ (forall a. a->a)++For (1) we can detect the GADT/existential situation by seeing that+the current TcLevel is greater than that stored in ir_lvl of the Infer+ExpType. We bump the level whenever we go past a GADT/existential match.++Then, before filling the hole use promoteTcType to promote the type+to the outer ir_lvl. promoteTcType does this+ - create a fresh unification variable alpha at level ir_lvl+ - emits an equality alpha[ir_lvl] ~ ty+ - fills the hole with alpha+That forces the type to be a monotype (since unification variables can+only unify with monotypes); and catches skolem-escapes because the+alpha is untouchable until the equality floats out.++For (2), we simply look to see if the hole is filled already.+ - if not, we promote (as above) and fill the hole+ - if it is filled, we simply unify with the type that is+ already there++There is one wrinkle. Suppose we have+ case e of+ T1 -> e1 :: (forall a. a->a) -> Int+ G2 -> e2+where T1 is not GADT or existential, but G2 is a GADT. Then suppose the+T1 alternative fills the hole with (forall a. a->a) -> Int, which is fine.+But now the G2 alternative must not *just* unify with that else we'd risk+allowing through (e2 :: (forall a. a->a) -> Int). If we'd checked G2 first+we'd have filled the hole with a unification variable, which enforces a+monotype.++So if we check G2 second, we still want to emit a constraint that restricts+the RHS to be a monotype. This is done by ensureMonoType, and it works+by simply generating a constraint (alpha ~ ty), where alpha is a fresh+unification variable. We discard the evidence.++-}++++{-+************************************************************************+* *+ Subsumption checking+* *+************************************************************************++Note [Subsumption checking: tcSubType]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+All the tcSubType calls have the form+ tcSubType actual_ty expected_ty+which checks+ actual_ty <= expected_ty++That is, that a value of type actual_ty is acceptable in+a place expecting a value of type expected_ty. I.e. that++ actual ty is more polymorphic than expected_ty++It returns a wrapper function+ co_fn :: actual_ty ~ expected_ty+which takes an HsExpr of type actual_ty into one of type+expected_ty.++Note [Ambiguity check and deep subsumption]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+ f :: (forall b. Eq b => a -> a) -> Int++Does `f` have an ambiguous type? The ambiguity check usually checks+that this definition of f' would typecheck, where f' has the exact same+type as f:+ f' :: (forall b. Eq b => a -> a) -> Intp+ f' = f++This will be /rejected/ with DeepSubsumption but /accepted/ with+ShallowSubsumption. On the other hand, this eta-expanded version f''+would be rejected both ways:+ f'' :: (forall b. Eq b => a -> a) -> Intp+ f'' x = f x++This is squishy in the same way as other examples in GHC.Tc.Validity+Note [The squishiness of the ambiguity check]++The situation in June 2022. Since we have SimpleSubsumption at the moment,+we don't want introduce new breakage if you add -XDeepSubsumption, by+rejecting types as ambiguous that weren't ambiguous before. So, as a+holding decision, we /always/ use SimpleSubsumption for the ambiguity check+(erring on the side accepting more programs). Hence tcSubTypeAmbiguity.+-}++++-----------------+-- tcWrapResult needs both un-type-checked (for origins and error messages)+-- and type-checked (for wrapping) expressions+tcWrapResult :: HsExpr GhcRn -> HsExpr GhcTc -> TcSigmaType -> ExpRhoType+ -> TcM (HsExpr GhcTc)+tcWrapResult rn_expr = tcWrapResultO (exprCtOrigin rn_expr) rn_expr++tcWrapResultO :: CtOrigin -> HsExpr GhcRn -> HsExpr GhcTc -> TcSigmaType -> ExpRhoType+ -> TcM (HsExpr GhcTc)+tcWrapResultO orig rn_expr expr actual_ty res_ty+ = do { traceTc "tcWrapResult" (vcat [ text "Actual: " <+> ppr actual_ty+ , text "Expected:" <+> ppr res_ty ])+ ; wrap <- tcSubTypeNC orig GenSigCtxt (Just $ HsExprRnThing rn_expr) actual_ty res_ty+ ; return (mkHsWrap wrap expr) }++tcWrapResultMono :: HsExpr GhcRn -> HsExpr GhcTc+ -> TcRhoType -- Actual -- a rho-type not a sigma-type+ -> ExpRhoType -- Expected+ -> TcM (HsExpr GhcTc)+-- A version of tcWrapResult to use when the actual type is a+-- rho-type, so nothing to instantiate; just go straight to unify.+-- It means we don't need to pass in a CtOrigin+tcWrapResultMono rn_expr expr act_ty res_ty+ = assertPpr (isRhoTy act_ty) (ppr act_ty $$ ppr rn_expr) $+ do { co <- unifyExpectedType rn_expr act_ty res_ty+ ; return (mkHsWrapCo co expr) }++unifyExpectedType :: HsExpr GhcRn+ -> TcRhoType -- Actual -- a rho-type not a sigma-type+ -> ExpRhoType -- Expected+ -> TcM TcCoercionN+unifyExpectedType rn_expr act_ty exp_ty+ = case exp_ty of+ Infer inf_res -> fillInferResult act_ty inf_res+ Check exp_ty -> unifyType (Just $ HsExprRnThing rn_expr) act_ty exp_ty++------------------------+tcSubTypePat :: CtOrigin -> UserTypeCtxt+ -> ExpSigmaType -> TcSigmaType -> TcM HsWrapper+-- Used in patterns; polarity is backwards compared+-- to tcSubType+-- If wrap = tc_sub_type_et t1 t2+-- => wrap :: t1 ~> t2+tcSubTypePat inst_orig ctxt (Check ty_actual) ty_expected+ = tc_sub_type unifyTypeET inst_orig ctxt ty_actual ty_expected++tcSubTypePat _ _ (Infer inf_res) ty_expected+ = do { co <- fillInferResult ty_expected inf_res+ -- In patterns we do not instantatiate++ ; return (mkWpCastN (mkSymCo co)) }++---------------+tcSubType :: CtOrigin -> UserTypeCtxt+ -> TcSigmaType -- ^ Actual+ -> ExpRhoType -- ^ Expected+ -> TcM HsWrapper+-- Checks that 'actual' is more polymorphic than 'expected'+tcSubType orig ctxt ty_actual ty_expected+ = addSubTypeCtxt ty_actual ty_expected $+ do { traceTc "tcSubType" (vcat [pprUserTypeCtxt ctxt, ppr ty_actual, ppr ty_expected])+ ; tcSubTypeNC orig ctxt Nothing ty_actual ty_expected }++---------------+tcSubTypeDS :: HsExpr GhcRn+ -> TcRhoType -- Actual -- a rho-type not a sigma-type+ -> ExpRhoType -- Expected+ -> TcM HsWrapper+-- Similar signature to unifyExpectedType; does deep subsumption+-- Only one call site, in GHC.Tc.Gen.App.tcApp+tcSubTypeDS rn_expr act_rho res_ty+ = case res_ty of+ Check exp_rho -> tc_sub_type_deep (unifyType m_thing) orig+ GenSigCtxt act_rho exp_rho++ Infer inf_res -> do { co <- fillInferResult act_rho inf_res+ ; return (mkWpCastN co) }+ where+ orig = exprCtOrigin rn_expr+ m_thing = Just (HsExprRnThing rn_expr)++---------------+tcSubTypeNC :: CtOrigin -- ^ Used when instantiating+ -> UserTypeCtxt -- ^ Used when skolemising+ -> Maybe TypedThing -- ^ The expression that has type 'actual' (if known)+ -> TcSigmaType -- ^ Actual type+ -> ExpRhoType -- ^ Expected type+ -> TcM HsWrapper+tcSubTypeNC inst_orig ctxt m_thing ty_actual res_ty+ = case res_ty of+ Check ty_expected -> tc_sub_type (unifyType m_thing) inst_orig ctxt+ ty_actual ty_expected++ Infer inf_res -> do { (wrap, rho) <- topInstantiate inst_orig ty_actual+ -- See Note [Instantiation of InferResult]+ ; co <- fillInferResult rho inf_res+ ; return (mkWpCastN co <.> wrap) }++---------------+tcSubTypeSigma :: CtOrigin -- where did the actual type arise / why are we+ -- doing this subtype check?+ -> UserTypeCtxt -- where did the expected type arise?+ -> TcSigmaType -> TcSigmaType -> TcM HsWrapper+-- External entry point, but no ExpTypes on either side+-- Checks that actual <= expected+-- Returns HsWrapper :: actual ~ expected+tcSubTypeSigma orig ctxt ty_actual ty_expected+ = tc_sub_type (unifyType Nothing) orig ctxt ty_actual ty_expected++---------------+tcSubTypeAmbiguity :: UserTypeCtxt -- Where did this type arise+ -> TcSigmaType -> TcSigmaType -> TcM HsWrapper+-- See Note [Ambiguity check and deep subsumption]+tcSubTypeAmbiguity ctxt ty_actual ty_expected+ = tc_sub_type_shallow (unifyType Nothing)+ (AmbiguityCheckOrigin ctxt)+ ctxt ty_actual ty_expected++---------------+addSubTypeCtxt :: TcType -> ExpType -> TcM a -> TcM a+addSubTypeCtxt ty_actual ty_expected thing_inside+ | isRhoTy ty_actual -- If there is no polymorphism involved, the+ , isRhoExpTy ty_expected -- TypeEqOrigin stuff (added by the _NC functions)+ = thing_inside -- gives enough context by itself+ | otherwise+ = addErrCtxtM mk_msg thing_inside+ where+ mk_msg tidy_env+ = do { (tidy_env, ty_actual) <- zonkTidyTcType tidy_env ty_actual+ ; ty_expected <- readExpType ty_expected+ -- A worry: might not be filled if we're debugging. Ugh.+ ; (tidy_env, ty_expected) <- zonkTidyTcType tidy_env ty_expected+ ; let msg = vcat [ hang (text "When checking that:")+ 4 (ppr ty_actual)+ , nest 2 (hang (text "is more polymorphic than:")+ 2 (ppr ty_expected)) ]+ ; return (tidy_env, msg) }+++{- Note [Instantiation of InferResult]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We now always instantiate before filling in InferResult, so that+the result is a TcRhoType: see #17173 for discussion.++For example:++1. Consider+ f x = (*)+ We want to instantiate the type of (*) before returning, else we+ will infer the type+ f :: forall {a}. a -> forall b. Num b => b -> b -> b+ This is surely confusing for users.++ And worse, the monomorphism restriction won't work properly. The MR is+ dealt with in simplifyInfer, and simplifyInfer has no way of+ instantiating. This could perhaps be worked around, but it may be+ hard to know even when instantiation should happen.++2. Another reason. Consider+ f :: (?x :: Int) => a -> a+ g y = let ?x = 3::Int in f+ Here want to instantiate f's type so that the ?x::Int constraint+ gets discharged by the enclosing implicit-parameter binding.++3. Suppose one defines plus = (+). If we instantiate lazily, we will+ infer plus :: forall a. Num a => a -> a -> a. However, the monomorphism+ restriction compels us to infer+ plus :: Integer -> Integer -> Integer+ (or similar monotype). Indeed, the only way to know whether to apply+ the monomorphism restriction at all is to instantiate++There is one place where we don't want to instantiate eagerly,+namely in GHC.Tc.Module.tcRnExpr, which implements GHCi's :type+command. See Note [Implementing :type] in GHC.Tc.Module.+-}++---------------+tc_sub_type, tc_sub_type_deep, tc_sub_type_shallow+ :: (TcType -> TcType -> TcM TcCoercionN) -- How to unify+ -> CtOrigin -- Used when instantiating+ -> UserTypeCtxt -- Used when skolemising+ -> TcSigmaType -- Actual; a sigma-type+ -> TcSigmaType -- Expected; also a sigma-type+ -> TcM HsWrapper+-- Checks that actual_ty is more polymorphic than expected_ty+-- If wrap = tc_sub_type t1 t2+-- => wrap :: t1 ~> t2+--+-- The "how to unify argument" is always a call to `uType TypeLevel orig`,+-- but with different ways of constructing the CtOrigin `orig` from+-- the argument types and context.++----------------------+tc_sub_type unify inst_orig ctxt ty_actual ty_expected+ = do { deep_subsumption <- xoptM LangExt.DeepSubsumption+ ; if deep_subsumption+ then tc_sub_type_deep unify inst_orig ctxt ty_actual ty_expected+ else tc_sub_type_shallow unify inst_orig ctxt ty_actual ty_expected+ }++----------------------+tc_sub_type_shallow unify inst_orig ctxt ty_actual ty_expected+ | definitely_poly ty_expected -- See Note [Don't skolemise unnecessarily]+ , definitely_mono_shallow ty_actual+ = do { traceTc "tc_sub_type (drop to equality)" $+ vcat [ text "ty_actual =" <+> ppr ty_actual+ , text "ty_expected =" <+> ppr ty_expected ]+ ; mkWpCastN <$>+ unify ty_actual ty_expected }++ | otherwise -- This is the general case+ = do { traceTc "tc_sub_type (general case)" $+ vcat [ text "ty_actual =" <+> ppr ty_actual+ , text "ty_expected =" <+> ppr ty_expected ]++ ; (sk_wrap, inner_wrap)+ <- tcTopSkolemise ctxt ty_expected $ \ sk_rho ->+ do { (wrap, rho_a) <- topInstantiate inst_orig ty_actual+ ; cow <- unify rho_a sk_rho+ ; return (mkWpCastN cow <.> wrap) }++ ; return (sk_wrap <.> inner_wrap) }++----------------------+tc_sub_type_deep unify inst_orig ctxt ty_actual ty_expected+ | definitely_poly ty_expected -- See Note [Don't skolemise unnecessarily]+ , definitely_mono_deep ty_actual+ = do { traceTc "tc_sub_type_deep (drop to equality)" $+ vcat [ text "ty_actual =" <+> ppr ty_actual+ , text "ty_expected =" <+> ppr ty_expected ]+ ; mkWpCastN <$>+ unify ty_actual ty_expected }++ | otherwise -- This is the general case+ = do { traceTc "tc_sub_type_deep (general case)" $+ vcat [ text "ty_actual =" <+> ppr ty_actual+ , text "ty_expected =" <+> ppr ty_expected ]++ ; (sk_wrap, inner_wrap)+ <- tcDeeplySkolemise ctxt ty_expected $ \ sk_rho ->+ -- See Note [Deep subsumption]+ tc_sub_type_ds unify inst_orig ctxt ty_actual sk_rho++ ; return (sk_wrap <.> inner_wrap) }++definitely_mono_shallow :: TcType -> Bool+definitely_mono_shallow ty = isRhoTy ty+ -- isRhoTy: no top level forall or (=>)++definitely_mono_deep :: TcType -> Bool+definitely_mono_deep ty+ | not (definitely_mono_shallow ty) = False+ -- isRhoTy: False means top level forall or (=>)+ | Just (_, res) <- tcSplitFunTy_maybe ty = definitely_mono_deep res+ -- Top level (->)+ | otherwise = True++definitely_poly :: TcType -> Bool+-- A very conservative test:+-- see Note [Don't skolemise unnecessarily]+definitely_poly ty+ | (tvs, theta, tau) <- tcSplitSigmaTy ty+ , (tv:_) <- tvs -- At least one tyvar+ , null theta -- No constraints; see (DP1)+ , tv `isInjectiveInType` tau+ -- The tyvar actually occurs (DP2),+ -- and occurs in an injective position (DP3).+ = True+ | otherwise+ = False++{- Note [Don't skolemise unnecessarily]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we are trying to solve+ ty_actual <= ty_expected+ (Char->Char) <= (forall a. a->a)+We could skolemise the 'forall a', and then complain+that (Char ~ a) is insoluble; but that's a pretty obscure+error. It's better to say that+ (Char->Char) ~ (forall a. a->a)+fails.++If we prematurely go to equality we'll reject a program we should+accept (e.g. #13752). So the test (which is only to improve error+message) is very conservative:++ * ty_actual is /definitely/ monomorphic: see `definitely_mono`+ This definitely_mono test comes in "shallow" and "deep" variants++ * ty_expected is /definitely/ polymorphic: see `definitely_poly`+ This definitely_poly test is more subtle than you might think.+ Here are three cases where expected_ty looks polymorphic, but+ isn't, and where it would be /wrong/ to switch to equality:++ (DP1) (Char->Char) <= (forall a. (a~Char) => a -> a)++ (DP2) (Char->Char) <= (forall a. Char -> Char)++ (DP3) (Char->Char) <= (forall a. F [a] Char -> Char)+ where type instance F [x] t = t+++Note [Wrapper returned from tcSubMult]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+There is no notion of multiplicity coercion in Core, therefore the wrapper+returned by tcSubMult (and derived functions such as tcCheckUsage and+checkManyPattern) is quite unlike any other wrapper: it checks whether the+coercion produced by the constraint solver is trivial, producing a type error+if it is not. This is implemented via the WpMultCoercion wrapper, as desugared+by GHC.HsToCore.Binds.dsHsWrapper, which does the reflexivity check.++This wrapper needs to be placed in the term; otherwise, checking of the+eventual coercion won't be triggered during desugaring. But it can be put+anywhere, since it doesn't affect the desugared code.++Why do we check this in the desugarer? It's a convenient place, since it's+right after all the constraints are solved. We need the constraints to be+solved to check whether they are trivial or not.++An alternative would be to have a kind of constraint which can+only produce trivial evidence. This would allow such checks to happen+in the constraint solver (#18756).+This would be similar to the existing setup for Concrete, see+ Note [The Concrete mechanism] in GHC.Tc.Utils.Concrete+ (PHASE 1 in particular).+-}++tcSubMult :: CtOrigin -> Mult -> Mult -> TcM HsWrapper+tcSubMult origin w_actual w_expected+ | Just (w1, w2) <- isMultMul w_actual =+ do { w1 <- tcSubMult origin w1 w_expected+ ; w2 <- tcSubMult origin w2 w_expected+ ; return (w1 <.> w2) }+ -- Currently, we consider p*q and sup p q to be equal. Therefore, p*q <= r is+ -- equivalent to p <= r and q <= r. For other cases, we approximate p <= q by p+ -- ~ q. This is not complete, but it's sound. See also Note [Overapproximating+ -- multiplicities] in Multiplicity.+tcSubMult origin w_actual w_expected =+ case submult w_actual w_expected of+ Submult -> return WpHole+ Unknown -> tcEqMult origin w_actual w_expected++tcEqMult :: CtOrigin -> Mult -> Mult -> TcM HsWrapper+tcEqMult origin w_actual w_expected = do+ {+ -- Note that here we do not call to `submult`, so we check+ -- for strict equality.+ ; coercion <- unifyTypeAndEmit TypeLevel origin w_actual w_expected+ ; return $ if isReflCo coercion then WpHole else WpMultCoercion coercion }+++{- *********************************************************************+* *+ Deep subsumption+* *+********************************************************************* -}++{- Note [Deep subsumption]+~~~~~~~~~~~~~~~~~~~~~~~~~~+The DeepSubsumption extension, documented here++ https://github.com/ghc-proposals/ghc-proposals/pull/511.++makes a best-efforts attempt implement deep subsumption as it was+prior to the Simplify Subsumption proposal:++ https://github.com/ghc-proposals/ghc-proposals/pull/287++The effects are in these main places:++1. In the subsumption check, tcSubType, we must do deep skolemisation:+ see the call to tcDeeplySkolemise in tc_sub_type_deep++2. In tcPolyExpr we must do deep skolemisation:+ see the call to tcDeeplySkolemise in tcSkolemiseExpType++3. for expression type signatures (e :: ty), and functions with type+ signatures (e.g. f :: ty; f = e), we must deeply skolemise the type;+ see the call to tcDeeplySkolemise in tcSkolemiseScoped.++4. In GHC.Tc.Gen.App.tcApp we call tcSubTypeDS to match the result+ type. Without deep subsumption, unifyExpectedType would be sufficent.++In all these cases note that the deep skolemisation must be done /first/.+Consider (1)+ (forall a. Int -> a -> a) <= Int -> (forall b. b -> b)+We must skolemise the `forall b` before instantiating the `forall a`.+See also Note [Deep skolemisation].++Note that we /always/ use shallow subsumption in the ambiguity check.+See Note [Ambiguity check and deep subsumption].++Note [Deep skolemisation]+~~~~~~~~~~~~~~~~~~~~~~~~~+deeplySkolemise decomposes and skolemises a type, returning a type+with all its arrows visible (ie not buried under foralls)++Examples:++ deeplySkolemise (Int -> forall a. Ord a => blah)+ = ( wp, [a], [d:Ord a], Int -> blah )+ where wp = \x:Int. /\a. \(d:Ord a). <hole> x++ deeplySkolemise (forall a. Ord a => Maybe a -> forall b. Eq b => blah)+ = ( wp, [a,b], [d1:Ord a,d2:Eq b], Maybe a -> blah )+ where wp = /\a.\(d1:Ord a).\(x:Maybe a)./\b.\(d2:Ord b). <hole> x++In general,+ if deeplySkolemise ty = (wrap, tvs, evs, rho)+ and e :: rho+ then wrap e :: ty+ and 'wrap' binds tvs, evs++ToDo: this eta-abstraction plays fast and loose with termination,+ because it can introduce extra lambdas. Maybe add a `seq` to+ fix this++Note [Setting the argument context]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider we are doing the ambiguity check for the (bogus)+ f :: (forall a b. C b => a -> a) -> Int++We'll call+ tcSubType ((forall a b. C b => a->a) -> Int )+ ((forall a b. C b => a->a) -> Int )++with a UserTypeCtxt of (FunSigCtxt "f"). Then we'll do the co/contra thing+on the argument type of the (->) -- and at that point we want to switch+to a UserTypeCtxt of GenSigCtxt. Why?++* Error messages. If we stick with FunSigCtxt we get errors like+ * Could not deduce: C b+ from the context: C b0+ bound by the type signature for:+ f :: forall a b. C b => a->a+ But of course f does not have that type signature!+ Example tests: T10508, T7220a, Simple14++* Implications. We may decide to build an implication for the whole+ ambiguity check, but we don't need one for each level within it,+ and TcUnify.alwaysBuildImplication checks the UserTypeCtxt.+ See Note [When to build an implication]++Note [Multiplicity in deep subsumption]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+ t1 ->{mt} t2 <= s1 ->{ms} s2++At the moment we /unify/ ms~mt, via tcEqMult.++Arguably we should use `tcSubMult`. But then if mt=m0 (a unification+variable) and ms=Many, `tcSubMult` is a no-op (since anything is a+sub-multiplicty of Many). But then `m0` may never get unified with+anything. It is then skolemised by the zonker; see GHC.HsToCore.Binds+Note [Free tyvars on rule LHS]. So we in RULE foldr/app in GHC.Base+we get this++ "foldr/app" [1] forall ys m1 m2. foldr (\x{m1} \xs{m2}. (:) x xs) ys+ = \xs -> xs ++ ys++where we eta-expanded that (:). But now foldr expects an argument+with ->{Many} and gets an argument with ->{m1} or ->{m2}, and Lint+complains.++The easiest solution was to use tcEqMult in tc_sub_type_ds, and+insist on equality. This is only in the DeepSubsumption code anyway.+-}++tc_sub_type_ds :: (TcType -> TcType -> TcM TcCoercionN) -- How to unify+ -> CtOrigin -- Used when instantiating+ -> UserTypeCtxt -- Used when skolemising+ -> TcSigmaType -- Actual; a sigma-type+ -> TcRhoType -- Expected; deeply skolemised+ -> TcM HsWrapper++-- If wrap = tc_sub_type_ds t1 t2+-- => wrap :: t1 ~> t2+-- Here is where the work actually happens!+-- Precondition: ty_expected is deeply skolemised++tc_sub_type_ds unify inst_orig ctxt ty_actual ty_expected+ = do { traceTc "tc_sub_type_ds" $+ vcat [ text "ty_actual =" <+> ppr ty_actual+ , text "ty_expected =" <+> ppr ty_expected ]+ ; go ty_actual ty_expected }+ where+ -- NB: 'go' is not recursive, except for doing coreView+ go ty_a ty_e | Just ty_a' <- coreView ty_a = go ty_a' ty_e+ | Just ty_e' <- coreView ty_e = go ty_a ty_e'++ go (TyVarTy tv_a) ty_e+ = do { lookup_res <- isFilledMetaTyVar_maybe tv_a+ ; case lookup_res of+ Just ty_a' ->+ do { traceTc "tc_sub_type_ds following filled meta-tyvar:"+ (ppr tv_a <+> text "-->" <+> ppr ty_a')+ ; tc_sub_type_ds unify inst_orig ctxt ty_a' ty_e }+ Nothing -> just_unify ty_actual ty_expected }++ go ty_a@(FunTy { ft_af = af1, ft_mult = act_mult, ft_arg = act_arg, ft_res = act_res })+ ty_e@(FunTy { ft_af = af2, ft_mult = exp_mult, ft_arg = exp_arg, ft_res = exp_res })+ | isVisibleFunArg af1, isVisibleFunArg af2+ = if (isTauTy ty_a && isTauTy ty_e) -- Short cut common case to avoid+ then just_unify ty_actual ty_expected -- unnecessary eta expansion+ else+ -- This is where we do the co/contra thing, and generate a WpFun, which in turn+ -- causes eta-expansion, which we don't like; hence encouraging NoDeepSubsumption+ do { arg_wrap <- tc_sub_type_deep unify given_orig GenSigCtxt exp_arg act_arg+ -- GenSigCtxt: See Note [Setting the argument context]+ ; res_wrap <- tc_sub_type_ds unify inst_orig ctxt act_res exp_res+ ; mult_wrap <- tcEqMult inst_orig act_mult exp_mult+ -- See Note [Multiplicity in deep subsumption]+ ; return (mult_wrap <.>+ mkWpFun arg_wrap res_wrap (Scaled exp_mult exp_arg) exp_res) }+ -- arg_wrap :: exp_arg ~> act_arg+ -- res_wrap :: act-res ~> exp_res+ where+ given_orig = GivenOrigin (SigSkol GenSigCtxt exp_arg [])++ go ty_a ty_e+ | let (tvs, theta, _) = tcSplitSigmaTy ty_a+ , not (null tvs && null theta)+ = do { (in_wrap, in_rho) <- topInstantiate inst_orig ty_a+ ; body_wrap <- tc_sub_type_ds unify inst_orig ctxt in_rho ty_e+ ; return (body_wrap <.> in_wrap) }++ | otherwise -- Revert to unification+ = do { -- It's still possible that ty_actual has nested foralls. Instantiate+ -- these, as there's no way unification will succeed with them in.+ -- See typecheck/should_compile/T11305 for an example of when this+ -- is important. The problem is that we're checking something like+ -- a -> forall b. b -> b <= alpha beta gamma+ -- where we end up with alpha := (->)+ (inst_wrap, rho_a) <- deeplyInstantiate inst_orig ty_actual+ ; unify_wrap <- just_unify rho_a ty_expected+ ; return (unify_wrap <.> inst_wrap) }++ just_unify ty_a ty_e = do { cow <- unify ty_a ty_e+ ; return (mkWpCastN cow) }++tcDeeplySkolemise+ :: UserTypeCtxt -> TcSigmaType+ -> (TcType -> TcM result)+ -> TcM (HsWrapper, result)+ -- ^ The wrapper has type: spec_ty ~> expected_ty+-- Just like tcTopSkolemise, but calls+-- deeplySkolemise instead of topSkolemise+-- See Note [Deep skolemisation]+tcDeeplySkolemise ctxt expected_ty thing_inside+ | isTauTy expected_ty -- Short cut for common case+ = do { res <- thing_inside expected_ty+ ; return (idHsWrapper, res) }+ | otherwise+ = do { -- This (unpleasant) rec block allows us to pass skol_info to deeplySkolemise;+ -- but skol_info can't be built until we have tv_prs+ rec { (wrap, tv_prs, given, rho_ty) <- deeplySkolemise skol_info expected_ty+ ; skol_info <- mkSkolemInfo (SigSkol ctxt expected_ty tv_prs) }++ ; traceTc "tcDeeplySkolemise" (ppr expected_ty $$ ppr rho_ty $$ ppr tv_prs)++ ; let skol_tvs = map snd tv_prs+ ; (ev_binds, result)+ <- checkConstraints (getSkolemInfo skol_info) skol_tvs given $+ thing_inside rho_ty++ ; return (wrap <.> mkWpLet ev_binds, result) }+ -- The ev_binds returned by checkConstraints is very+ -- often empty, in which case mkWpLet is a no-op++deeplySkolemise :: SkolemInfo -> TcSigmaType+ -> TcM ( HsWrapper+ , [(Name,TyVar)] -- All skolemised variables+ , [EvVar] -- All "given"s+ , TcRhoType )+-- See Note [Deep skolemisation]+deeplySkolemise skol_info ty+ = go init_subst ty+ where+ init_subst = mkEmptySubst (mkInScopeSet (tyCoVarsOfType ty))++ go subst ty+ | Just (arg_tys, tvs, theta, ty') <- tcDeepSplitSigmaTy_maybe ty+ = do { let arg_tys' = substScaledTys subst arg_tys+ ; ids1 <- newSysLocalIds (fsLit "dk") arg_tys'+ ; (subst', tvs1) <- tcInstSkolTyVarsX skol_info subst tvs+ ; ev_vars1 <- newEvVars (substTheta subst' theta)+ ; (wrap, tvs_prs2, ev_vars2, rho) <- go subst' ty'+ ; let tv_prs1 = map tyVarName tvs `zip` tvs1+ ; return ( mkWpEta ids1 (mkWpTyLams tvs1+ <.> mkWpEvLams ev_vars1+ <.> wrap)+ , tv_prs1 ++ tvs_prs2+ , ev_vars1 ++ ev_vars2+ , mkScaledFunTys arg_tys' rho ) }++ | otherwise+ = return (idHsWrapper, [], [], substTy subst ty)+ -- substTy is a quick no-op on an empty substitution++deeplyInstantiate :: CtOrigin -> TcType -> TcM (HsWrapper, Type)+deeplyInstantiate orig ty+ = go init_subst ty+ where+ init_subst = mkEmptySubst (mkInScopeSet (tyCoVarsOfType ty))++ go subst ty+ | Just (arg_tys, tvs, theta, rho) <- tcDeepSplitSigmaTy_maybe ty+ = do { (subst', tvs') <- newMetaTyVarsX subst tvs+ ; let arg_tys' = substScaledTys subst' arg_tys+ theta' = substTheta subst' theta+ ; ids1 <- newSysLocalIds (fsLit "di") arg_tys'+ ; wrap1 <- instCall orig (mkTyVarTys tvs') theta'+ ; (wrap2, rho2) <- go subst' rho+ ; return (mkWpEta ids1 (wrap2 <.> wrap1),+ mkScaledFunTys arg_tys' rho2) }++ | otherwise+ = do { let ty' = substTy subst ty+ ; return (idHsWrapper, ty') }++tcDeepSplitSigmaTy_maybe+ :: TcSigmaType -> Maybe ([Scaled TcType], [TyVar], ThetaType, TcSigmaType)+-- Looks for a *non-trivial* quantified type, under zero or more function arrows+-- By "non-trivial" we mean either tyvars or constraints are non-empty++tcDeepSplitSigmaTy_maybe ty+ | Just (arg_ty, res_ty) <- tcSplitFunTy_maybe ty+ , Just (arg_tys, tvs, theta, rho) <- tcDeepSplitSigmaTy_maybe res_ty+ = Just (arg_ty:arg_tys, tvs, theta, rho)++ | (tvs, theta, rho) <- tcSplitSigmaTy ty+ , not (null tvs && null theta)+ = Just ([], tvs, theta, rho)++ | otherwise = Nothing+++{- *********************************************************************+* *+ Generalisation+* *+********************************************************************* -}++{- Note [Skolemisation]+~~~~~~~~~~~~~~~~~~~~~~~+tcTopSkolemise takes "expected type" and strip off quantifiers to expose the+type underneath, binding the new skolems for the 'thing_inside'+The returned 'HsWrapper' has type (specific_ty -> expected_ty).++Note that for a nested type like+ forall a. Eq a => forall b. Ord b => blah+we still only build one implication constraint+ forall a b. (Eq a, Ord b) => <constraints>+This is just an optimisation, but it's why we use topSkolemise to+build the pieces from all the layers, before making a single call+to checkConstraints.++tcSkolemiseScoped is very similar, but differs in two ways:++* It deals specially with just the outer forall, bringing those type+ variables into lexical scope. To my surprise, I found that doing+ this unconditionally in tcTopSkolemise (i.e. doing it even if we don't+ need to bring the variables into lexical scope, which is harmless)+ caused a non-trivial (1%-ish) perf hit on the compiler.++* It handles deep subumption, wheres tcTopSkolemise never looks under+ function arrows.++* It always calls checkConstraints, even if there are no skolem+ variables at all. Reason: there might be nested deferred errors+ that must not be allowed to float to top level.+ See Note [When to build an implication] below.+-}++tcTopSkolemise, tcSkolemiseScoped+ :: UserTypeCtxt -> TcSigmaType+ -> (TcType -> TcM result)+ -> TcM (HsWrapper, result)+ -- ^ The wrapper has type: spec_ty ~> expected_ty+-- See Note [Skolemisation] for the differences between+-- tcSkolemiseScoped and tcTopSkolemise++tcSkolemiseScoped ctxt expected_ty thing_inside+ = do { deep_subsumption <- xoptM LangExt.DeepSubsumption+ ; let skolemise | deep_subsumption = deeplySkolemise+ | otherwise = topSkolemise+ ; -- rec {..}: see Note [Keeping SkolemInfo inside a SkolemTv]+ -- in GHC.Tc.Utils.TcType+ rec { (wrap, tv_prs, given, rho_ty) <- skolemise skol_info expected_ty+ ; skol_info <- mkSkolemInfo (SigSkol ctxt expected_ty tv_prs) }++ ; let skol_tvs = map snd tv_prs+ ; (ev_binds, res)+ <- checkConstraints (getSkolemInfo skol_info) skol_tvs given $+ tcExtendNameTyVarEnv tv_prs $+ thing_inside rho_ty++ ; return (wrap <.> mkWpLet ev_binds, res) }++tcTopSkolemise ctxt expected_ty thing_inside+ | isRhoTy expected_ty -- Short cut for common case+ = do { res <- thing_inside expected_ty+ ; return (idHsWrapper, res) }+ | otherwise+ = do { -- rec {..}: see Note [Keeping SkolemInfo inside a SkolemTv]+ -- in GHC.Tc.Utils.TcType+ rec { (wrap, tv_prs, given, rho_ty) <- topSkolemise skol_info expected_ty+ ; skol_info <- mkSkolemInfo (SigSkol ctxt expected_ty tv_prs) }++ ; let skol_tvs = map snd tv_prs+ ; (ev_binds, result)+ <- checkConstraints (getSkolemInfo skol_info) skol_tvs given $+ thing_inside rho_ty++ ; return (wrap <.> mkWpLet ev_binds, result) }+ -- The ev_binds returned by checkConstraints is very+ -- often empty, in which case mkWpLet is a no-op++-- | Variant of 'tcTopSkolemise' that takes an ExpType+tcSkolemiseExpType :: UserTypeCtxt -> ExpSigmaType+ -> (ExpRhoType -> TcM result)+ -> TcM (HsWrapper, result)+tcSkolemiseExpType _ et@(Infer {}) thing_inside+ = (idHsWrapper, ) <$> thing_inside et+tcSkolemiseExpType ctxt (Check ty) thing_inside+ = do { deep_subsumption <- xoptM LangExt.DeepSubsumption+ ; let skolemise | deep_subsumption = tcDeeplySkolemise+ | otherwise = tcTopSkolemise+ ; skolemise ctxt ty $ \rho_ty ->+ thing_inside (mkCheckExpType rho_ty) }++checkConstraints :: SkolemInfoAnon+ -> [TcTyVar] -- Skolems+ -> [EvVar] -- Given+ -> TcM result+ -> TcM (TcEvBinds, result)++checkConstraints skol_info skol_tvs given thing_inside+ = do { implication_needed <- implicationNeeded skol_info 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+ ; traceTc "checkConstraints" (ppr tclvl $$ ppr skol_tvs)+ ; emitImplications implics+ ; return (ev_binds, result) }++ else -- Fast path. We check every function argument with tcCheckPolyExpr,+ -- which uses tcTopSkolemise and hence checkConstraints.+ -- So this fast path is well-exercised+ do { res <- thing_inside+ ; return (emptyTcEvBinds, res) } }++checkTvConstraints :: SkolemInfo+ -> [TcTyVar] -- Skolem tyvars+ -> TcM result+ -> TcM result++checkTvConstraints skol_info skol_tvs thing_inside+ = do { (tclvl, wanted, result) <- pushLevelAndCaptureConstraints thing_inside+ ; emitResidualTvConstraint skol_info skol_tvs tclvl wanted+ ; return result }++emitResidualTvConstraint :: SkolemInfo -> [TcTyVar]+ -> TcLevel -> WantedConstraints -> TcM ()+emitResidualTvConstraint skol_info skol_tvs tclvl wanted+ | not (isEmptyWC wanted) ||+ checkTelescopeSkol skol_info_anon+ = -- checkTelescopeSkol: in this case, /always/ emit this implication+ -- even if 'wanted' is empty. We need the implication so that we check+ -- for a bad telescope. See Note [Skolem escape and forall-types] in+ -- GHC.Tc.Gen.HsType+ do { implic <- buildTvImplication skol_info_anon skol_tvs tclvl wanted+ ; emitImplication implic }++ | otherwise -- Empty 'wanted', emit nothing+ = return ()+ where+ skol_info_anon = getSkolemInfo skol_info++buildTvImplication :: SkolemInfoAnon -> [TcTyVar]+ -> TcLevel -> WantedConstraints -> TcM Implication+buildTvImplication skol_info skol_tvs tclvl wanted+ = assertPpr (all (isSkolemTyVar <||> isTyVarTyVar) skol_tvs) (ppr skol_tvs) $+ do { ev_binds <- newNoTcEvBinds -- Used for equalities only, so all the constraints+ -- are solved by filling in coercion holes, not+ -- by creating a value-level evidence binding+ ; implic <- newImplication++ ; let implic' = implic { ic_tclvl = tclvl+ , ic_skols = skol_tvs+ , ic_given_eqs = NoGivenEqs+ , ic_wanted = wanted+ , ic_binds = ev_binds+ , ic_info = skol_info }++ ; checkImplicationInvariants implic'+ ; return implic' }++implicationNeeded :: SkolemInfoAnon -> [TcTyVar] -> [EvVar] -> TcM Bool+-- See Note [When to build an implication]+implicationNeeded skol_info skol_tvs given+ | null skol_tvs+ , null given+ , not (alwaysBuildImplication skol_info)+ = -- Empty skolems and givens+ do { tc_lvl <- getTcLevel+ ; if not (isTopTcLevel tc_lvl) -- No implication needed if we are+ then return False -- already inside an implication+ else+ do { dflags <- getDynFlags -- If any deferral can happen,+ -- we must build an implication+ ; return (gopt Opt_DeferTypeErrors dflags ||+ gopt Opt_DeferTypedHoles dflags ||+ gopt Opt_DeferOutOfScopeVariables dflags) } }++ | otherwise -- Non-empty skolems or givens+ = return True -- Definitely need an implication++alwaysBuildImplication :: SkolemInfoAnon -> Bool+-- See Note [When to build an implication]+alwaysBuildImplication _ = False++{- Commmented out for now while I figure out about error messages.+ See #14185++alwaysBuildImplication (SigSkol ctxt _ _)+ = case ctxt of+ FunSigCtxt {} -> True -- RHS of a binding with a signature+ _ -> False+alwaysBuildImplication (RuleSkol {}) = True+alwaysBuildImplication (InstSkol {}) = True+alwaysBuildImplication (FamInstSkol {}) = True+alwaysBuildImplication _ = False+-}++buildImplicationFor :: TcLevel -> SkolemInfoAnon -> [TcTyVar]+ -> [EvVar] -> WantedConstraints+ -> TcM (Bag Implication, TcEvBinds)+buildImplicationFor tclvl skol_info skol_tvs given wanted+ | isEmptyWC wanted && null given+ -- Optimisation : if there are no wanteds, and no givens+ -- don't generate an implication at all.+ -- Reason for the (null given): we don't want to lose+ -- the "inaccessible alternative" error check+ = return (emptyBag, emptyTcEvBinds)++ | otherwise+ = assertPpr (all (isSkolemTyVar <||> isTyVarTyVar) skol_tvs) (ppr skol_tvs) $+ -- Why allow TyVarTvs? Because implicitly declared kind variables in+ -- non-CUSK type declarations are TyVarTvs, and we need to bring them+ -- into scope as a skolem in an implication. This is OK, though,+ -- because TyVarTvs will always remain tyvars, even after unification.+ do { ev_binds_var <- newTcEvBinds+ ; 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 }+ ; checkImplicationInvariants implic'++ ; return (unitBag implic', TcEvBinds ev_binds_var) }++{- Note [When to build an implication]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have some 'skolems' and some 'givens', and we are+considering whether to wrap the constraints in their scope into an+implication. We must /always/ so if either 'skolems' or 'givens' are+non-empty. But what if both are empty? You might think we could+always drop the implication. Other things being equal, the fewer+implications the better. Less clutter and overhead. But we must+take care:++* If we have an unsolved [W] g :: a ~# b, and -fdefer-type-errors,+ we'll make a /term-level/ evidence binding for 'g = error "blah"'.+ We must have an EvBindsVar those bindings!, otherwise they end up as+ top-level unlifted bindings, which are verboten. This only matters+ at top level, so we check for that+ See also Note [Deferred errors for coercion holes] in GHC.Tc.Errors.+ cf #14149 for an example of what goes wrong.++* If you have+ f :: Int; f = f_blah+ g :: Bool; g = g_blah+ If we don't build an implication for f or g (no tyvars, no givens),+ the constraints for f_blah and g_blah are solved together. And that+ can yield /very/ confusing error messages, because we can get+ [W] C Int b1 -- from f_blah+ [W] C Int b2 -- from g_blan+ and fundpes can yield [W] b1 ~ b2, even though the two functions have+ literally nothing to do with each other. #14185 is an example.+ Building an implication keeps them separate.+-}++{-+************************************************************************+* *+ Boxy unification+* *+************************************************************************++The exported functions are all defined as versions of some+non-exported generic functions.+-}++unifyType :: Maybe TypedThing -- ^ If present, the thing that has type ty1+ -> TcTauType -> TcTauType -- ty1 (actual), ty2 (expected)+ -> TcM TcCoercionN -- :: ty1 ~# ty2+-- Actual and expected types+-- Returns a coercion : ty1 ~ ty2+unifyType thing ty1 ty2+ = unifyTypeAndEmit TypeLevel origin ty1 ty2+ where+ origin = TypeEqOrigin { uo_actual = ty1+ , uo_expected = ty2+ , uo_thing = thing+ , uo_visible = True }++unifyInvisibleType :: TcTauType -> TcTauType -- ty1 (actual), ty2 (expected)+ -> TcM TcCoercionN -- :: ty1 ~# ty2+-- Actual and expected types+-- Returns a coercion : ty1 ~ ty2+unifyInvisibleType ty1 ty2+ = unifyTypeAndEmit TypeLevel origin ty1 ty2+ where+ origin = TypeEqOrigin { uo_actual = ty1+ , uo_expected = ty2+ , uo_thing = Nothing+ , uo_visible = False } -- This is the "invisible" bit++unifyTypeET :: TcTauType -> TcTauType -> TcM CoercionN+-- Like unifyType, but swap expected and actual in error messages+-- This is used when typechecking patterns+unifyTypeET ty1 ty2+ = unifyTypeAndEmit TypeLevel origin ty1 ty2+ where+ origin = TypeEqOrigin { uo_actual = ty2 -- NB swapped+ , uo_expected = ty1 -- NB swapped+ , uo_thing = Nothing+ , uo_visible = True }+++unifyKind :: Maybe TypedThing -> TcKind -> TcKind -> TcM CoercionN+unifyKind mb_thing ty1 ty2+ = unifyTypeAndEmit KindLevel origin ty1 ty2+ where+ origin = TypeEqOrigin { uo_actual = ty1+ , uo_expected = ty2+ , uo_thing = mb_thing+ , uo_visible = True }++unifyTypeAndEmit :: TypeOrKind -> CtOrigin -> TcType -> TcType -> TcM CoercionN+-- Make a ref-cell, unify, emit the collected constraints+unifyTypeAndEmit t_or_k orig ty1 ty2+ = do { ref <- newTcRef emptyBag+ ; loc <- getCtLocM orig (Just t_or_k)+ ; let env = UE { u_loc = loc, u_role = Nominal+ , u_rewriters = emptyRewriterSet -- ToDo: check this+ , u_defer = ref, u_unified = Nothing }++ -- The hard work happens here+ ; co <- uType env ty1 ty2++ ; cts <- readTcRef ref+ ; unless (null cts) (emitSimples cts)+ ; return co }++{-+%************************************************************************+%* *+ uType and friends+%* *+%************************************************************************++Note [The eager unifier]+~~~~~~~~~~~~~~~~~~~~~~~~+The eager unifier, `uType`, is called by++ * The constraint generator (e.g. in GHC.Tc.Gen.Expr),+ via the wrappers `unifyType`, `unifyKind` etc++ * The constraint solver (e.g. in GHC.Tc.Solver.Equality),+ via `GHC.Tc.Solver.Monad.wrapUnifierTcS`.++`uType` runs in the TcM monad, but it carries a UnifyEnv that tells it+what to do when unifying a variable or deferring a constraint. Specifically,+ * it collects deferred constraints in `u_defer`, and+ * it records which unification variables it has unified in `u_unified`+Then it is up to the wrappers (one for the constraint generator, one for+the constraint solver) to deal with these collected sets.++Although `uType` runs in the TcM monad for convenience, really it could+operate just with the ability to+ * write to the accumulators of deferred constraints+ and unification variables in UnifyEnv.+ * read and update existing unification variables+ * zonk types befire unifying (`zonkTcType` in `uUnfilledVar`, and+ `zonkTyCoVarKind` in `uUnfilledVar1`+ * create fresh coercion holes (`newCoercionHole`)+ * emit tracing info for debugging+ * look at the ambient TcLevel: `getTcLevel`+A job for the future.+-}++data UnifyEnv+ = UE { u_role :: Role+ , u_loc :: CtLoc+ , u_rewriters :: RewriterSet++ -- Deferred constraints+ , u_defer :: TcRef (Bag Ct)++ -- Which variables are unified;+ -- if Nothing, we don't care+ , u_unified :: Maybe (TcRef [TcTyVar])+ }++setUEnvRole :: UnifyEnv -> Role -> UnifyEnv+setUEnvRole uenv role = uenv { u_role = role }++updUEnvLoc :: UnifyEnv -> (CtLoc -> CtLoc) -> UnifyEnv+updUEnvLoc uenv@(UE { u_loc = loc }) upd = uenv { u_loc = upd loc }++mkKindEnv :: UnifyEnv -> TcType -> TcType -> UnifyEnv+-- Modify the UnifyEnv to be right for unifing+-- the kinds of these two types+mkKindEnv env@(UE { u_loc = ctloc }) ty1 ty2+ = env { u_role = Nominal, u_loc = mkKindEqLoc ty1 ty2 ctloc }++uType, uType_defer+ :: UnifyEnv+ -> TcType -- ty1 is the *actual* type+ -> TcType -- ty2 is the *expected* type+ -> TcM CoercionN++-- It is always safe to defer unification to the main constraint solver+-- See Note [Deferred unification]+uType_defer (UE { u_loc = loc, u_defer = ref+ , u_role = role, u_rewriters = rewriters })+ ty1 ty2 -- ty1 is "actual", ty2 is "expected"+ = do { let pred_ty = mkPrimEqPredRole role ty1 ty2+ ; hole <- newCoercionHole loc pred_ty+ ; let ct = mkNonCanonical $+ CtWanted { ctev_pred = pred_ty+ , ctev_dest = HoleDest hole+ , ctev_loc = loc+ , ctev_rewriters = rewriters }+ co = HoleCo hole+ ; updTcRef ref (`snocBag` ct)+ -- snocBag: see Note [Work-list ordering] in GHC.Tc.Solver.Equality++ -- Error trace only+ -- NB. do *not* call mkErrInfo unless tracing is on,+ -- because it is hugely expensive (#5631)+ ; whenDOptM Opt_D_dump_tc_trace $+ do { ctxt <- getErrCtxt+ ; doc <- mkErrInfo emptyTidyEnv ctxt+ ; traceTc "utype_defer" (vcat [ ppr role+ , debugPprType ty1+ , debugPprType ty2+ , doc])+ ; traceTc "utype_defer2" (ppr co) }++ ; return co }+++--------------+uType env@(UE { u_role = role }) orig_ty1 orig_ty2+ | Phantom <- role+ = do { kind_co <- uType (mkKindEnv env orig_ty1 orig_ty2)+ (typeKind orig_ty1) (typeKind orig_ty2)+ ; return (mkPhantomCo kind_co orig_ty1 orig_ty2) }++ | otherwise+ = do { tclvl <- getTcLevel+ ; traceTc "u_tys" $ vcat+ [ text "tclvl" <+> ppr tclvl+ , sep [ ppr orig_ty1, text "~" <> ppr role, ppr orig_ty2] ]+ ; co <- go orig_ty1 orig_ty2+ ; if isReflCo co+ then traceTc "u_tys yields no coercion" Outputable.empty+ else traceTc "u_tys yields coercion:" (ppr co)+ ; return co }+ where+ go :: TcType -> TcType -> TcM CoercionN+ -- The arguments to 'go' are always semantically identical+ -- to orig_ty{1,2} except for looking through type synonyms++ -- Unwrap casts before looking for variables. This way, we can easily+ -- recognize (t |> co) ~ (t |> co), which is nice. Previously, we+ -- didn't do it this way, and then the unification above was deferred.+ go (CastTy t1 co1) t2+ = do { co_tys <- uType env t1 t2+ ; return (mkCoherenceLeftCo role t1 co1 co_tys) }++ go t1 (CastTy t2 co2)+ = do { co_tys <- uType env t1 t2+ ; return (mkCoherenceRightCo role t2 co2 co_tys) }++ -- Variables; go for uUnfilledVar+ -- Note that we pass in *original* (before synonym expansion),+ -- so that type variables tend to get filled in with+ -- the most informative version of the type+ go (TyVarTy tv1) ty2+ = do { lookup_res <- isFilledMetaTyVar_maybe tv1+ ; case lookup_res of+ Just ty1 -> do { traceTc "found filled tyvar" (ppr tv1 <+> text ":->" <+> ppr ty1)+ ; uType env ty1 orig_ty2 }+ Nothing -> uUnfilledVar env NotSwapped tv1 ty2 }++ go ty1 (TyVarTy tv2)+ = do { lookup_res <- isFilledMetaTyVar_maybe tv2+ ; case lookup_res of+ Just ty2 -> do { traceTc "found filled tyvar" (ppr tv2 <+> text ":->" <+> ppr ty2)+ ; uType env orig_ty1 ty2 }+ Nothing -> uUnfilledVar env IsSwapped tv2 ty1 }++ -- See Note [Expanding synonyms during unification]+ go ty1@(TyConApp tc1 []) (TyConApp tc2 [])+ | tc1 == tc2+ = return $ mkReflCo role ty1++ -- See Note [Expanding synonyms during unification]+ --+ -- Also NB that we recurse to 'go' so that we don't push a+ -- new item on the origin stack. As a result if we have+ -- type Foo = Int+ -- and we try to unify Foo ~ Bool+ -- we'll end up saying "can't match Foo with Bool"+ -- rather than "can't match "Int with Bool". See #4535.+ go ty1 ty2+ | Just ty1' <- coreView ty1 = go ty1' ty2+ | Just ty2' <- coreView ty2 = go ty1 ty2'++ -- Functions (t1 -> t2) just check the two parts+ go (FunTy { ft_af = af1, ft_mult = w1, ft_arg = arg1, ft_res = res1 })+ (FunTy { ft_af = af2, ft_mult = w2, ft_arg = arg2, ft_res = res2 })+ | isVisibleFunArg af1 -- Do not attempt (c => t); just defer+ , af1 == af2 -- Important! See #21530+ = do { co_w <- uType (env { u_role = funRole role SelMult }) w1 w2+ ; co_l <- uType (env { u_role = funRole role SelArg }) arg1 arg2+ ; co_r <- uType (env { u_role = funRole role SelRes }) res1 res2+ ; return $ mkNakedFunCo role af1 co_w co_l co_r }++ -- Always defer if a type synonym family (type function)+ -- is involved. (Data families behave rigidly.)+ go ty1@(TyConApp tc1 _) ty2+ | isTypeFamilyTyCon tc1 = defer ty1 ty2+ go ty1 ty2@(TyConApp tc2 _)+ | isTypeFamilyTyCon tc2 = defer ty1 ty2++ go (TyConApp tc1 tys1) (TyConApp tc2 tys2)+ -- See Note [Mismatched type lists and application decomposition]+ | tc1 == tc2, equalLength tys1 tys2+ , isInjectiveTyCon tc1 role -- don't look under newtypes at Rep equality+ = assertPpr (isGenerativeTyCon tc1 role) (ppr tc1) $+ do { traceTc "go-tycon" (ppr tc1 $$ ppr tys1 $$ ppr tys2 $$ ppr (take 10 (tyConRoleListX role tc1)))+ ; cos <- zipWith4M u_tc_arg (tyConVisibilities tc1) -- Infinite+ (tyConRoleListX role tc1) -- Infinite+ tys1 tys2+ ; return $ mkTyConAppCo role tc1 cos }++ go (LitTy m) ty@(LitTy n)+ | m == n+ = return $ mkReflCo role ty++ -- See Note [Care with type applications]+ -- Do not decompose FunTy against App;+ -- it's often a type error, so leave it for the constraint solver+ go ty1@(AppTy s1 t1) ty2@(AppTy s2 t2)+ = go_app (isNextArgVisible s1) ty1 s1 t1 ty2 s2 t2++ go ty1@(AppTy s1 t1) ty2@(TyConApp tc2 ts2)+ | Just (ts2', t2') <- snocView ts2+ = assert (not (tyConMustBeSaturated tc2)) $+ go_app (isNextTyConArgVisible tc2 ts2')+ ty1 s1 t1 ty2 (TyConApp tc2 ts2') t2'++ go ty1@(TyConApp tc1 ts1) ty2@(AppTy s2 t2)+ | Just (ts1', t1') <- snocView ts1+ = assert (not (tyConMustBeSaturated tc1)) $+ go_app (isNextTyConArgVisible tc1 ts1')+ ty1 (TyConApp tc1 ts1') t1' ty2 s2 t2++ go ty1@(CoercionTy co1) ty2@(CoercionTy co2)+ = do { kco <- uType (mkKindEnv env ty1 ty2)+ (coercionType co1) (coercionType co2)+ ; return $ mkProofIrrelCo role kco co1 co2 }++ -- Anything else fails+ -- E.g. unifying for-all types, which is relative unusual+ go ty1 ty2 = defer ty1 ty2++ ------------------+ defer ty1 ty2 -- See Note [Check for equality before deferring]+ | ty1 `tcEqType` ty2 = return (mkReflCo role ty1)+ | otherwise = uType_defer env orig_ty1 orig_ty2+++ ------------------+ u_tc_arg is_vis role ty1 ty2+ = do { traceTc "u_tc_arg" (ppr role $$ ppr ty1 $$ ppr ty2)+ ; uType env_arg ty1 ty2 }+ where+ env_arg = env { u_loc = adjustCtLoc is_vis False (u_loc env)+ , u_role = role }++ ------------------+ -- For AppTy, decompose only nominal equalities+ -- See Note [Decomposing AppTy equalities] in GHC.Tc.Solver.Equality+ go_app vis ty1 s1 t1 ty2 s2 t2+ | Nominal <- role+ = -- Unify arguments t1/t2 before function s1/s2, because+ -- the former have smaller kinds, and hence simpler error messages+ -- c.f. GHC.Tc.Solver.Equality.can_eq_app+ -- Example: test T8603+ do { let env_arg = env { u_loc = adjustCtLoc vis False (u_loc env) }+ ; co_t <- uType env_arg t1 t2+ ; co_s <- uType env s1 s2+ ; return $ mkAppCo co_s co_t }+ | otherwise+ = defer ty1 ty2++{- Note [Check for equality before deferring]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Particularly in ambiguity checks we can get equalities like (ty ~ ty).+If ty involves a type function we may defer, which isn't very sensible.+An egregious example of this was in test T9872a, which has a type signature+ Proxy :: Proxy (Solutions Cubes)+Doing the ambiguity check on this signature generates the equality+ Solutions Cubes ~ Solutions Cubes+and currently the constraint solver normalises both sides at vast cost.+This little short-cut in 'defer' helps quite a bit.++Note [Care with type applications]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Note: type applications need a bit of care!+They can match FunTy and TyConApp, so use splitAppTy_maybe+NB: we've already dealt with type variables and Notes,+so if one type is an App the other one jolly well better be too++Note [Mismatched type lists and application decomposition]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we find two TyConApps, you might think that the argument lists+are guaranteed equal length. But they aren't. Consider matching+ w (T x) ~ Foo (T x y)+We do match (w ~ Foo) first, but in some circumstances we simply create+a deferred constraint; and then go ahead and match (T x ~ T x y).+This came up in #3950.++So either+ (a) either we must check for identical argument kinds+ when decomposing applications,++ (b) or we must be prepared for ill-kinded unification sub-problems++Currently we adopt (b) since it seems more robust -- no need to maintain+a global invariant.++Note [Expanding synonyms during unification]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We expand synonyms during unification, but:+ * We expand *after* the variable case so that we tend to unify+ variables with un-expanded type synonym. This just makes it+ 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+ Phantom Int ~ Phantom Char+ it is *wrong* to unify Int and Char.++ * The problem case immediately above can happen only with arguments+ to the tycon. So we check for nullary tycons *before* expanding.+ This is particularly helpful when checking (* ~ *), because * is+ now a type synonym.++Note [Deferred unification]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+We may encounter a unification ty1 ~ ty2 that cannot be performed syntactically,+and yet its consistency is undetermined. Previously, there was no way to still+make it consistent. So a mismatch error was issued.++Now these unifications are deferred until constraint simplification, where type+family instances and given equations may (or may not) establish the consistency.+Deferred unifications are of the form+ F ... ~ ...+or x ~ ...+where F is a type function and x is a type variable.+E.g.+ id :: x ~ y => x -> y+ id e = e++involves the unification x = y. It is deferred until we bring into account the+context x ~ y to establish that it holds.++If available, we defer original types (rather than those where closed type+synonyms have already been expanded via tcCoreView). This is, as usual, to+improve error messages.++************************************************************************+* *+ uUnfilledVar and friends+* *+************************************************************************++@uunfilledVar@ is called when at least one of the types being unified is a+variable. It does {\em not} assume that the variable is a fixed point+of the substitution; rather, notice that @uVar@ (defined below) nips+back into @uTys@ if it turns out that the variable is already bound.+-}++----------+uUnfilledVar, uUnfilledVar1+ :: UnifyEnv+ -> SwapFlag+ -> TcTyVar -- Tyvar 1: not necessarily a meta-tyvar+ -- definitely not a /filled/ meta-tyvar+ -> TcTauType -- Type 2+ -> TcM CoercionN+-- "Unfilled" means that the variable is definitely not a filled-in meta tyvar+-- It might be a skolem, or untouchable, or meta+uUnfilledVar env swapped tv1 ty2+ | Nominal <- u_role env+ = do { ty2 <- liftZonkM $ zonkTcType ty2+ -- Zonk to expose things to the occurs check, and so+ -- that if ty2 looks like a type variable then it+ -- /is/ a type variable+ ; uUnfilledVar1 env swapped tv1 ty2 }++ | otherwise -- See Note [Do not unify representational equalities]+ -- in GHC.Tc.Solver.Equality+ = unSwap swapped (uType_defer env) (mkTyVarTy tv1) ty2++uUnfilledVar1 env -- Precondition: u_role==Nominal+ swapped+ tv1+ ty2 -- ty2 is zonked+ | Just tv2 <- getTyVar_maybe ty2+ = go tv2++ | otherwise+ = uUnfilledVar2 env swapped tv1 ty2++ where+ -- 'go' handles the case where both are+ -- tyvars so we might want to swap+ -- E.g. maybe tv2 is a meta-tyvar and tv1 is not+ go tv2 | tv1 == tv2 -- Same type variable => no-op+ = return (mkNomReflCo (mkTyVarTy tv1))++ | swapOverTyVars False tv1 tv2 -- Distinct type variables+ -- Swap meta tyvar to the left if poss+ = do { tv1 <- liftZonkM $ zonkTyCoVarKind tv1+ -- We must zonk tv1's kind because that might+ -- not have happened yet, and it's an invariant of+ -- uUnfilledTyVar2 that ty2 is fully zonked+ -- Omitting this caused #16902+ ; uUnfilledVar2 env (flipSwap swapped) tv2 (mkTyVarTy tv1) }++ | otherwise+ = uUnfilledVar2 env swapped tv1 ty2++----------+uUnfilledVar2 :: UnifyEnv -- Precondition: u_role==Nominal+ -> SwapFlag+ -> TcTyVar -- Tyvar 1: not necessarily a meta-tyvar+ -- definitely not a /filled/ meta-tyvar+ -> TcTauType -- Type 2, zonked+ -> TcM CoercionN+uUnfilledVar2 env@(UE { u_defer = def_eq_ref }) swapped tv1 ty2+ = do { cur_lvl <- getTcLevel+ -- See Note [Unification preconditions], (UNTOUCHABLE) wrinkles+ -- Here we don't know about given equalities here; so we treat+ -- /any/ level outside this one as untouchable. Hence cur_lvl.+ ; if not (touchabilityAndShapeTest cur_lvl tv1 ty2+ && simpleUnifyCheck False tv1 ty2)+ then not_ok_so_defer+ else+ do { def_eqs <- readTcRef def_eq_ref -- Capture current state of def_eqs++ -- Attempt to unify kinds+ ; co_k <- uType (mkKindEnv env ty1 ty2) (typeKind ty2) (tyVarKind tv1)+ ; traceTc "uUnfilledVar2 ok" $+ vcat [ ppr tv1 <+> dcolon <+> ppr (tyVarKind tv1)+ , ppr ty2 <+> dcolon <+> ppr (typeKind ty2)+ , ppr (isReflCo co_k), ppr co_k ]++ ; if isReflCo co_k+ -- Only proceed if the kinds match+ -- NB: tv1 should still be unfilled, despite the kind unification+ -- because tv1 is not free in ty2' (or, hence, in its kind)+ then do { liftZonkM $ writeMetaTyVar tv1 ty2+ ; case u_unified env of+ Nothing -> return ()+ Just uref -> updTcRef uref (tv1 :)+ ; return (mkNomReflCo ty2) } -- Unification is always Nominal++ else -- The kinds don't match yet, so defer instead.+ do { writeTcRef def_eq_ref def_eqs+ -- Since we are discarding co_k, also discard any constraints+ -- emitted by kind unification; they are just useless clutter.+ -- Do this dicarding by simply restoring the previous state+ -- of def_eqs; a bit imperative/yukky but works fine.+ ; defer }+ }}+ where+ ty1 = mkTyVarTy tv1+ defer = unSwap swapped (uType_defer env) ty1 ty2++ not_ok_so_defer =+ do { traceTc "uUnfilledVar2 not ok" (ppr tv1 $$ ppr ty2)+ -- Occurs check or an untouchable: just defer+ -- NB: occurs check isn't necessarily fatal:+ -- eg tv1 occurred in type family parameter+ ; defer }++swapOverTyVars :: Bool -> TcTyVar -> TcTyVar -> Bool+swapOverTyVars is_given tv1 tv2+ -- See Note [Unification variables on the left]+ | not is_given, pri1 == 0, pri2 > 0 = True+ | not is_given, pri2 == 0, pri1 > 0 = False++ -- Level comparison: see Note [TyVar/TyVar orientation]+ | lvl1 `strictlyDeeperThan` lvl2 = False+ | lvl2 `strictlyDeeperThan` lvl1 = True++ -- Priority: see Note [TyVar/TyVar orientation]+ | pri1 > pri2 = False+ | pri2 > pri1 = True++ -- Names: see Note [TyVar/TyVar orientation]+ | isSystemName tv2_name, not (isSystemName tv1_name) = True++ | otherwise = False++ where+ lvl1 = tcTyVarLevel tv1+ lvl2 = tcTyVarLevel tv2+ pri1 = lhsPriority tv1+ pri2 = lhsPriority tv2+ tv1_name = Var.varName tv1+ tv2_name = Var.varName tv2+++lhsPriority :: TcTyVar -> Int+-- Higher => more important to be on the LHS+-- => more likely to be eliminated+-- See Note [TyVar/TyVar orientation]+lhsPriority tv+ = assertPpr (isTyVar tv) (ppr tv) $+ case tcTyVarDetails tv of+ RuntimeUnk -> 0+ SkolemTv {} -> 0+ MetaTv { mtv_info = info } -> case info of+ CycleBreakerTv -> 0+ TyVarTv -> 1+ ConcreteTv {} -> 2+ TauTv -> 3+ RuntimeUnkTv -> 4++{- Note [Unification preconditions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Question: given a homogeneous equality (alpha ~# ty), when is it OK to+unify alpha := ty?++This note only applied to /homogeneous/ equalities, in which both+sides have the same kind.++There are five reasons not to unify:++1. (SKOL-ESC) Skolem-escape+ Consider the constraint+ forall[2] a[2]. alpha[1] ~ Maybe a[2]+ If we unify alpha := Maybe a, the skolem 'a' may escape its scope.+ The level alpha[1] says that alpha may be used outside this constraint,+ where 'a' is not in scope at all. So we must not unify.++ Bottom line: when looking at a constraint alpha[n] := ty, do not unify+ if any free variable of 'ty' has level deeper (greater) than n++2. (UNTOUCHABLE) Untouchable unification variables+ Consider the constraint+ forall[2] a[2]. b[1] ~ Int => alpha[1] ~ Int+ There is no (SKOL-ESC) problem with unifying alpha := Int, but it might+ not be the principal solution. Perhaps the "right" solution is alpha := b.+ We simply can't tell. See "OutsideIn(X): modular type inference with local+ assumptions", section 2.2. We say that alpha[1] is "untouchable" inside+ this implication.++ Bottom line: at ambient level 'l', when looking at a constraint+ alpha[n] ~ ty, do not unify alpha := ty if there are any given equalities+ between levels 'n' and 'l'.++ Exactly what is a "given equality" for the purpose of (UNTOUCHABLE)?+ Answer: see Note [Tracking Given equalities] in GHC.Tc.Solver.InertSet++3. (TYVAR-TV) Unifying TyVarTvs and CycleBreakerTvs+ This precondition looks at the MetaInfo of the unification variable:++ * TyVarTv: When considering alpha{tyv} ~ ty, if alpha{tyv} is a+ TyVarTv it can only unify with a type variable, not with a+ structured type. So if 'ty' is a structured type, such as (Maybe x),+ don't unify.++ * CycleBreakerTv: never unified, except by restoreTyVarCycles.++4. (CONCRETE) A ConcreteTv can only unify with a concrete type,+ by definition.++ That is, if we have `rr[conc] ~ F Int`, we can't unify+ `rr` with `F Int`, so we hold off on unifying.+ Note however that the equality might get rewritten; for instance+ if we can rewrite `F Int` to a concrete type, say `FloatRep`,+ then we will have `rr[conc] ~ FloatRep` and we can unify `rr ~ FloatRep`.++ Note that we can still make progress on unification even if+ we can't fully solve an equality, e.g.++ alpha[conc] ~# TupleRep '[ beta[tau], F gamma[tau] ]++ we can fill beta[tau] := beta[conc]. This is why we call+ 'makeTypeConcrete' in startSolvingByUnification.++5. (COERCION-HOLE) Confusing coercion holes+ Suppose our equality is+ (alpha :: k) ~ (Int |> {co})+ where co :: Type ~ k is an unsolved wanted. Note that this equality+ is homogeneous; both sides have kind k. We refrain from unifying here, because+ of the coercion hole in the RHS -- see Wrinkle (EIK2) in+ Note [Equalities with incompatible kinds] in GHC.Solver.Equality.++Needless to say, all there are wrinkles:++* (SKOL-ESC) Promotion. Given alpha[n] ~ ty, what if beta[k] is free+ in 'ty', where beta is a unification variable, and k>n? 'beta'+ stands for a monotype, and since it is part of a level-n type+ (equal to alpha[n]), we must /promote/ beta to level n. Just make+ up a fresh gamma[n], and unify beta[k] := gamma[n].++* (TYVAR-TV) Unification variables. Suppose alpha[tyv,n] is a level-n+ TyVarTv (see Note [TyVarTv] in GHC.Tc.Types.TcMType)? Now+ consider alpha[tyv,n] ~ Bool. We don't want to unify because that+ would break the TyVarTv invariant.++ What about alpha[tyv,n] ~ beta[tau,n], where beta is an ordinary+ TauTv? Again, don't unify, because beta might later be unified+ with, say Bool. (If levels permit, we reverse the orientation here;+ see Note [TyVar/TyVar orientation].)++* (UNTOUCHABLE) Untouchability. When considering (alpha[n] ~ ty), how+ do we know whether there are any given equalities between level n+ and the ambient level? We answer in two ways:++ * In the eager unifier, we only unify if l=n. If not, alpha may be+ untouchable, and defer to the constraint solver. This check is+ made in GHC.Tc.Utils.uUnifilledVar2, in the guard+ isTouchableMetaTyVar.++ * In the constraint solver, we track where Given equalities occur+ and use that to guard unification in+ GHC.Tc.Utils.Unify.touchabilityAndShapeTest. More details in+ Note [Tracking Given equalities] in GHC.Tc.Solver.InertSet++ Historical note: in the olden days (pre 2021) the constraint solver+ also used to unify only if l=n. Equalities were "floated" out of the+ implication in a separate step, so that they would become touchable.+ But the float/don't-float question turned out to be very delicate,+ as you can see if you look at the long series of Notes associated with+ GHC.Tc.Solver.floatEqualities, around Nov 2020. It's much easier+ to unify in-place, with no floating.++Note [TyVar/TyVar orientation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+See also Note [Fundeps with instances, and equality orientation]+where the kind equality orientation is important++Given (a ~ b), should we orient the equality as (a~b) or (b~a)?+This is a surprisingly tricky question!++The question is answered by swapOverTyVars, which is used+ - in the eager unifier, in GHC.Tc.Utils.Unify.uUnfilledVar1+ - in the constraint solver, in GHC.Tc.Solver.Equality.canEqCanLHS2++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'.++ Generally speaking we always try to put a MetaTv on the left in+ preference to SkolemTv or RuntimeUnkTv, because the MetaTv may be+ touchable and can be unified.++ Tie-breaking rules for MetaTvs:+ - CycleBreakerTv: This is essentially a stand-in for another type;+ it's untouchable and should have the same priority as a skolem: 0.++ - TyVarTv: These can unify only with another tyvar, but we can't unify+ a TyVarTv with a TauTv, because then the TyVarTv could (transitively)+ get a non-tyvar type. So give these a low priority: 1.++ - ConcreteTv: These are like TauTv, except they can only unify with+ a concrete type. So we want to be able to write to them, but not quite+ as much as TauTvs: 2.++ - TauTv: This is the common case; we want these on the left so that they+ can be written to: 3.++ - RuntimeUnkTv: These aren't really meta-variables used in type inference,+ but just a convenience in the implementation of the GHCi debugger.+ Eagerly write to these: 4. See Note [RuntimeUnkTv] in+ GHC.Runtime.Heap.Inspect.++* Names. If the level and priority comparisons are all+ equal, try to eliminate a TyVar 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 [Unification variables on the left]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+For wanteds, but not givens, swap (skolem ~ meta-tv) regardless of+level, so that the unification variable is on the left.++* We /don't/ want this for Givens because if we ave+ [G] a[2] ~ alpha[1]+ [W] Bool ~ a[2]+ we want to rewrite the wanted to Bool ~ alpha[1],+ so we can float the constraint and solve it.++* But for Wanteds putting the unification variable on+ the left means an easier job when floating, and when+ reporting errors -- just fewer cases to consider.++ In particular, we get better skolem-escape messages:+ see #18114++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 eliminating skolem capture.++ See also GHC.Tc.Solver.InertSet 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 #15009 for an further analysis of why "deepest on the left"+is a good plan.++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++Historical Note [Eliminate younger unification variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Given a choice of unifying+ alpha := beta or beta := alpha+we try, if possible, to eliminate 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+#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 too nice to discard altogether, so I'm leaving these+notes. SLPJ Jan 18.++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+least in some cases. But it's disastrous for test case perf/compiler/T3064.+Here is the problem: Suppose we have (F ty) where we also have [G] F ty ~ a.+What do we do? Do we reduce F? Or do we use the given? Hard to know what's+best. GHC reduces. This is a disaster for T3064, where the type's size+spirals out of control during reduction. If we prevent+unification with type families, then the solver happens to use the equality+before expanding the type family.++It would be lovely in the future to revisit this problem and remove this+extra, unnecessary check. But we retain it for now as it seems to work+better in practice.++Revisited in Nov '20, along with removing flattening variables. Problem+is still present, and the solution is still the same.++Note [Non-TcTyVars in GHC.Tc.Utils.Unify]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Because the same code is now shared between unifying types and unifying+kinds, we sometimes will see proper TyVars floating around the unifier.+Example (from test case polykinds/PolyKinds12):++ type family Apply (f :: k1 -> k2) (x :: k1) :: k2+ type instance Apply g y = g y++When checking the instance declaration, we first *kind-check* the LHS+and RHS, discovering that the instance really should be++ type instance Apply k3 k4 (g :: k3 -> k4) (y :: k3) = g y++During this kind-checking, all the tyvars will be TcTyVars. Then, however,+as a second pass, we desugar the RHS (which is done in functions prefixed+with "tc" in GHC.Tc.TyCl"). By this time, all the kind-vars are proper+TyVars, not TcTyVars, get some kind unification must happen.++Thus, we always check if a TyVar is a TcTyVar before asking if it's a+meta-tyvar.++This used to not be necessary for type-checking (that is, before * :: *)+because expressions get desugared via an algorithm separate from+type-checking (with wrappers, etc.). Types get desugared very differently,+causing this wibble in behavior seen here.+-}++-- | Breaks apart a function kind into its pieces.+matchExpectedFunKind+ :: TypedThing -- ^ type, only for errors+ -> Arity -- ^ n: number of desired arrows+ -> TcKind -- ^ fun_kind+ -> TcM Coercion -- ^ co :: fun_kind ~ (arg1 -> ... -> argn -> res)++matchExpectedFunKind hs_ty n k = go n k+ where+ go 0 k = return (mkNomReflCo k)++ go n k | Just k' <- coreView k = go n k'++ go n k@(TyVarTy kvar)+ | isMetaTyVar kvar+ = do { maybe_kind <- readMetaTyVar kvar+ ; case maybe_kind of+ Indirect fun_kind -> go n fun_kind+ Flexi -> defer n k }++ go n (FunTy { ft_af = af, ft_mult = w, ft_arg = arg, ft_res = res })+ | isVisibleFunArg af+ = do { co <- go (n-1) res+ ; return (mkNakedFunCo Nominal af (mkNomReflCo w) (mkNomReflCo arg) co) }++ go n other+ = defer n other++ defer n k+ = do { arg_kinds <- newMetaKindVars n+ ; res_kind <- newMetaKindVar+ ; let new_fun = mkVisFunTysMany arg_kinds res_kind+ origin = TypeEqOrigin { uo_actual = k+ , uo_expected = new_fun+ , uo_thing = Just hs_ty+ , uo_visible = True+ }+ ; unifyTypeAndEmit KindLevel origin k new_fun }++{- *********************************************************************+* *+ Checking alpha ~ ty+ for the on-the-fly unifier+* *+********************************************************************* -}++simpleUnifyCheck :: Bool -> TcTyVar -> TcType -> Bool+-- A fast check: True <=> unification is OK+-- If it says 'False' then unification might still be OK, but+-- it'll take more work to do -- use the full checkTypeEq+--+-- * Always rejects foralls unless lhs_tv is RuntimeUnk+-- (used by GHCi debugger)+-- * Rejects a non-concrete type if lhs_tv is concrete+-- * Rejects type families unless fam_ok=True+-- * Does a level-check for type variables+--+-- This function is pretty heavily used, so it's optimised not to allocate+simpleUnifyCheck fam_ok lhs_tv rhs+ = go rhs+ where+ !(occ_in_ty, occ_in_co) = mkOccFolders lhs_tv++ lhs_tv_lvl = tcTyVarLevel lhs_tv+ lhs_tv_is_concrete = isConcreteTyVar lhs_tv+ forall_ok = case tcTyVarDetails lhs_tv of+ MetaTv { mtv_info = RuntimeUnkTv } -> True+ _ -> False++ go (TyVarTy tv)+ | lhs_tv == tv = False+ | tcTyVarLevel tv > lhs_tv_lvl = False+ | lhs_tv_is_concrete, not (isConcreteTyVar tv) = False+ | occ_in_ty $! (tyVarKind tv) = False+ | otherwise = True++ go (FunTy {ft_af = af, ft_mult = w, ft_arg = a, ft_res = r})+ | isInvisibleFunArg af, not forall_ok = False+ | otherwise = go w && go a && go r++ go (TyConApp tc tys)+ | lhs_tv_is_concrete, not (isConcreteTyCon tc) = False+ | not (isTauTyCon tc) = False+ | not fam_ok, not (isFamFreeTyCon tc) = False+ | otherwise = all go tys++ go (AppTy t1 t2) = go t1 && go t2+ go (ForAllTy (Bndr tv _) ty)+ | forall_ok = go (tyVarKind tv) && (tv == lhs_tv || go ty)+ | otherwise = False++ go (CastTy ty co) = not (occ_in_co co) && go ty+ go (CoercionTy co) = not (occ_in_co co)+ go (LitTy {}) = True+++mkOccFolders :: TcTyVar -> (TcType -> Bool, TcCoercion -> Bool)+-- These functions return True+-- * if lhs_tv occurs (incl deeply, in the kind of variable)+-- * if there is a coercion hole+-- No expansion of type synonyms+mkOccFolders lhs_tv = (getAny . check_ty, getAny . check_co)+ where+ !(check_ty, _, check_co, _) = foldTyCo occ_folder emptyVarSet+ occ_folder = TyCoFolder { tcf_view = noView -- Don't expand synonyms+ , tcf_tyvar = do_tcv, tcf_covar = do_tcv+ , tcf_hole = do_hole+ , tcf_tycobinder = do_bndr }++ do_tcv is v = Any (not (v `elemVarSet` is) && v == lhs_tv)+ `mappend` check_ty (varType v)++ do_bndr is tcv _faf = extendVarSet is tcv+ do_hole _is _hole = DM.Any True -- Reject coercion holes++{- *********************************************************************+* *+ Equality invariant checking+* *+********************************************************************* -}+++{- Note [Checking for foralls]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We never want to unify+ alpha ~ (forall a. a->a) -> Int+So we look for foralls hidden inside the type, and it's convenient+to do that at the same time as the occurs check (which looks for+occurrences of alpha).++However, it's not just a question of looking for foralls /anywhere/!+Consider+ (alpha :: forall k. k->*) ~ (beta :: forall k. k->*)+This is legal; e.g. dependent/should_compile/T11635.++We don't want to reject it because of the forall in beta's kind, but+(see Note [Occurrence checking: look inside kinds] in GHC.Core.Type)+we do need to look in beta's kind. So we carry a flag saying if a+'forall' is OK, and switch the flag on when stepping inside a kind.++Why is it OK? Why does it not count as impredicative polymorphism?+The reason foralls are bad is because we reply on "seeing" foralls+when doing implicit instantiation. But the forall inside the kind is+fine. We'll generate a kind equality constraint+ (forall k. k->*) ~ (forall k. k->*)+to check that the kinds of lhs and rhs are compatible. If alpha's+kind had instead been+ (alpha :: kappa)+then this kind equality would rightly complain about unifying kappa+with (forall k. k->*)++Note [Forgetful synonyms in checkTyConApp]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+ type S a b = b -- Forgets 'a'++ [W] alpha[2] ~ Maybe (S beta[4] gamma[2])++We don't want to promote beta to level 2; rather, we should+expand the synonym. (Currently, in checkTypeEqRhs promotion+is irrevocable, by side effect.)++To avoid this risk we eagerly expand forgetful synonyms.+This also means we won't get an occurs check in+ a ~ Maybe (S a b)++The annoyance is that we might expand the synonym unnecessarily,+something we generally try to avoid. But for now, this seems+simple.++In a forgetful case like a ~ Maybe (S a b), `checkTyEqRhs` returns+a Reduction that looks+ Reduction { reductionCoercion = Refl+ , reductionReducedType = Maybe b }+We must jolly well use that reductionReduced type, even though the+reductionCoercion is Refl. See `canEqCanLHSFinish_no_unification`.+-}++data PuResult a b = PuFail CheckTyEqResult+ | PuOK (Bag a) b++instance Functor (PuResult a) where+ fmap _ (PuFail prob) = PuFail prob+ fmap f (PuOK cts x) = PuOK cts (f x)++instance Applicative (PuResult a) where+ pure x = PuOK emptyBag x+ PuFail p1 <*> PuFail p2 = PuFail (p1 S.<> p2)+ PuFail p1 <*> PuOK {} = PuFail p1+ PuOK {} <*> PuFail p2 = PuFail p2+ PuOK c1 f <*> PuOK c2 x = PuOK (c1 `unionBags` c2) (f x)++instance (Outputable a, Outputable b) => Outputable (PuResult a b) where+ ppr (PuFail prob) = text "PuFail" <+> (ppr prob)+ ppr (PuOK cts x) = text "PuOK" <> braces+ (vcat [ text "redn:" <+> ppr x+ , text "cts:" <+> ppr cts ])++pprPur :: PuResult a b -> SDoc+-- For debugging+pprPur (PuFail prob) = text "PuFail:" <> ppr prob+pprPur (PuOK {}) = text "PuOK"++okCheckRefl :: TcType -> TcM (PuResult a Reduction)+okCheckRefl ty = return (PuOK emptyBag (mkReflRedn Nominal ty))++failCheckWith :: CheckTyEqResult -> TcM (PuResult a b)+failCheckWith p = return (PuFail p)++mapCheck :: (x -> TcM (PuResult a Reduction))+ -> [x]+ -> TcM (PuResult a Reductions)+mapCheck f xs+ = do { (ress :: [PuResult a Reduction]) <- mapM f xs+ ; return (unzipRedns <$> sequenceA ress) }+ -- sequenceA :: [PuResult a Reduction] -> PuResult a [Reduction]+ -- unzipRedns :: [Reduction] -> Reductions++-----------------------------+-- | Options describing how to deal with a type equality+-- in the pure unifier. See 'checkTyEqRhs'+data TyEqFlags a+ = TEF { tef_foralls :: Bool -- Allow foralls+ , tef_lhs :: CanEqLHS -- LHS of the constraint+ , tef_unifying :: AreUnifying -- Always NotUnifying if tef_lhs is TyFamLHS+ , tef_fam_app :: TyEqFamApp a+ , tef_occurs :: CheckTyEqProblem } -- Soluble or insoluble occurs check++-- | What to do when encountering a type-family application while processing+-- a type equality in the pure unifier.+--+-- See Note [Family applications in canonical constraints]+data TyEqFamApp a+ = TEFA_Fail -- Always fail+ | TEFA_Recurse -- Just recurse+ | TEFA_Break (FamAppBreaker a) -- Recurse, but replace with cycle breaker if fails,+ -- using the FamAppBreaker++data AreUnifying+ = Unifying+ MetaInfo -- MetaInfo of the LHS tyvar (which is a meta-tyvar)+ TcLevel -- Level of the LHS tyvar+ LevelCheck++ | NotUnifying -- Not attempting to unify++data LevelCheck+ = LC_None -- Level check not needed: we should never encounter+ -- a tyvar at deeper level than the LHS++ | LC_Check -- Do a level check between the LHS tyvar and the occurrence tyvar+ -- Fail if the level check fails++ | LC_Promote -- Do a level check between the LHS tyvar and the occurrence tyvar+ -- If the level check fails, and the occurrence is a unification+ -- variable, promote it++instance Outputable (TyEqFlags a) where+ ppr (TEF { .. }) = text "TEF" <> braces (+ vcat [ text "tef_foralls =" <+> ppr tef_foralls+ , text "tef_lhs =" <+> ppr tef_lhs+ , text "tef_unifying =" <+> ppr tef_unifying+ , text "tef_fam_app =" <+> ppr tef_fam_app+ , text "tef_occurs =" <+> ppr tef_occurs ])++instance Outputable (TyEqFamApp a) where+ ppr TEFA_Fail = text "TEFA_Fail"+ ppr TEFA_Recurse = text "TEFA_Fail"+ ppr (TEFA_Break {}) = text "TEFA_Break"++instance Outputable AreUnifying where+ ppr NotUnifying = text "NotUnifying"+ ppr (Unifying mi lvl lc) = text "Unifying" <+>+ braces (ppr mi <> comma <+> ppr lvl <> comma <+> ppr lc)++instance Outputable LevelCheck where+ ppr LC_None = text "LC_None"+ ppr LC_Check = text "LC_Check"+ ppr LC_Promote = text "LC_Promote"++famAppArgFlags :: TyEqFlags a -> TyEqFlags a+-- Adjust the flags when going undter a type family+-- Only the outer family application gets the loop-breaker treatment+-- Ditto tyvar promotion. E.g.+-- [W] alpha[2] ~ Maybe (F beta[3])+-- Do not promote beta[3]; instead promote (F beta[3])+famAppArgFlags flags@(TEF { tef_unifying = unifying })+ = flags { tef_fam_app = TEFA_Recurse+ , tef_unifying = zap_promotion unifying+ , tef_occurs = cteSolubleOccurs }+ -- tef_occurs: under a type family, an occurs check is not definitely-insoluble+ where+ zap_promotion (Unifying info lvl LC_Promote) = Unifying info lvl LC_Check+ zap_promotion unifying = unifying++type FamAppBreaker a = TcType -> TcM (PuResult a Reduction)+ -- Given a family-application ty, return a Reduction :: ty ~ cvb+ -- where 'cbv' is a fresh loop-breaker tyvar (for Given), or+ -- just a fresh TauTv (for Wanted)++checkTyEqRhs :: forall a. TyEqFlags a -> TcType -> TcM (PuResult a Reduction)+checkTyEqRhs flags ty+ = case ty of+ LitTy {} -> okCheckRefl ty+ TyConApp tc tys -> checkTyConApp flags ty tc tys+ TyVarTy tv -> checkTyVar flags tv+ -- Don't worry about foralls inside the kind; see Note [Checking for foralls]+ -- Nor can we expand synonyms; see Note [Occurrence checking: look inside kinds]+ -- in GHC.Core.FVs++ FunTy {ft_af = af, ft_mult = w, ft_arg = a, ft_res = r}+ | isInvisibleFunArg af -- e.g. Num a => blah+ , not (tef_foralls flags)+ -> failCheckWith impredicativeProblem -- Not allowed (TyEq:F)+ | otherwise+ -> do { w_res <- checkTyEqRhs flags w+ ; a_res <- checkTyEqRhs flags a+ ; r_res <- checkTyEqRhs flags r+ ; return (mkFunRedn Nominal af <$> w_res <*> a_res <*> r_res) }++ AppTy fun arg -> do { fun_res <- checkTyEqRhs flags fun+ ; arg_res <- checkTyEqRhs flags arg+ ; return (mkAppRedn <$> fun_res <*> arg_res) }++ CastTy ty co -> do { ty_res <- checkTyEqRhs flags ty+ ; co_res <- checkCo flags co+ ; return (mkCastRedn1 Nominal ty <$> co_res <*> ty_res) }++ CoercionTy co -> do { co_res <- checkCo flags co+ ; return (mkReflCoRedn Nominal <$> co_res) }++ ForAllTy {}+ | tef_foralls flags -> okCheckRefl ty+ | otherwise -> failCheckWith impredicativeProblem -- Not allowed (TyEq:F)+++-------------------+checkCo :: TyEqFlags a -> Coercion -> TcM (PuResult a Coercion)+-- See Note [checkCo]+checkCo (TEF { tef_lhs = TyFamLHS {} }) co+ = return (pure co)++checkCo (TEF { tef_lhs = TyVarLHS lhs_tv+ , tef_unifying = unifying+ , tef_occurs = occ_prob }) co+ -- Check for coercion holes, if unifying+ -- See (COERCION-HOLE) in Note [Unification preconditions]+ | hasCoercionHoleCo co+ = failCheckWith (cteProblem cteCoercionHole)++ -- Occurs check (can promote)+ | Unifying _ lhs_tv_lvl LC_Promote <- unifying+ = do { reason <- checkPromoteFreeVars occ_prob lhs_tv lhs_tv_lvl (tyCoVarsOfCo co)+ ; if cterHasNoProblem reason+ then return (pure co)+ else failCheckWith reason }++ -- Occurs check (no promotion)+ | lhs_tv `elemVarSet` tyCoVarsOfCo co+ = failCheckWith (cteProblem occ_prob)++ | otherwise+ = return (pure co)++{- Note [checkCo]+~~~~~~~~~~~~~~~~~+We don't often care about the contents of coercions, so checking+coercions before making an equality constraint may be surprising.+But there are several cases we need to be wary of:++(1) When we're unifying a variable, we must make sure that the variable+ appears nowhere on the RHS -- even in a coercion. Otherwise, we'll+ create a loop.++(2) We must still make sure that no variable in a coercion is at too+ high a level. But, when unifying, we can promote any variables we encounter.++(3) We do not unify variables with a type with a free coercion hole.+ See (COERCION-HOLE) in Note [Unification preconditions].+++Note [Promotion and level-checking]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+"Promotion" happens when we have this:++ [W] w1: alpha[2] ~ Maybe beta[4]++Here we must NOT unify alpha := Maybe beta, because beta may turn out+to stand for a type involving some inner skolem. Yikes!+Skolem-escape. So instead we /promote/ beta, like this:++ beta[4] := beta'[2]+ [W] w1: alpha[2] ~ Maybe beta'[2]++Now we can unify alpha := Maybe beta', which might unlock other+constraints. But if some other constraint wants to unify beta with a+nested skolem, it'll get stuck with a skolem-escape error.++Now consider `w2` where a type family is involved (#22194):++ [W] w2: alpha[2] ~ Maybe (F gamma beta[4])++In `w2`, it may or may not be the case that `beta` is level 2; suppose+we later discover gamma := Int, and type instance F Int _ = Int.+So, instead, we promote the entire funcion call:++ [W] w2': alpha[2] ~ Maybe gamma[2]+ [W] w3: gamma[2] ~ F gamma beta[4]++Now we can unify alpha := Maybe gamma, which is a Good Thng.++Wrinkle (W1)++There is an important wrinkle: /all this only applies when unifying/.+For example, suppose we have+ [G] a[2] ~ Maybe b[4]+where 'a' is a skolem. This Given might arise from a GADT match, and+we can absolutely use it to rewrite locally. In fact we must do so:+that is how we exploit local knowledge about the outer skolem a[2].+This applies equally for a Wanted [W] a[2] ~ Maybe b[4]. Using it for+local rewriting is fine. (It's not clear to me that it is /useful/,+but it's fine anyway.)++So we only do the level-check in checkTyVar when /unifying/ not for+skolems (or untouchable unification variables).++Note [Family applications in canonical constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A constraint with a type family application in the RHS needs special care.++* First, occurs checks. If we have+ [G] a ~ Maybe (F (Maybe a))+ [W] alpha ~ Maybe (F (Maybe alpha))+ it looks as if we have an occurs check. But go read+ Note [Type equality cycles] in GHC.Tc.Solver.Equality++ The same considerations apply when the LHS is a type family:+ [G] G a ~ Maybe (F (Maybe (G a)))+ [W] G alpha ~ Maybe (F (Maybe (G alpha)))++* Second, promotion. If we have (#22194)+ [W] alpha[2] ~ Maybe (F beta[4])+ it is wrong to promote beta. Instead we want to split to+ [W] alpha[2] ~ Maybe gamma[2]+ [W] gamma[2] ~ F beta[4]+ See Note [Promotion and level-checking] above.++* Third, concrete type variables. If we have+ [W] alpha[conc] ~ Maybe (F tys)+ we want to add an extra variable thus:+ [W] alpha[conc] ~ Maybe gamma[conc]+ [W] gamma[conc] ~ F tys+ Now we can unify alpha, and that might unlock something else.++In all these cases we want to create a fresh type variable, and+emit a new equality connecting it to the type family application.++The `tef_fam_app` field of `TypeEqFlags` says what to do at a type+family application in the RHS of the constraint. `TEFA_Fail` and+`TEFA_Recurse` are straightforward. `TEFA_Break` is the clever+one. As you can see in `checkFamApp`, it+ * Checks the arguments, but using `famAppArgFlags` to record that+ we are now "under" a type-family application. It `tef_fam_app` to+ `TEFA_Recurse`.+ * If any of the arguments fail (level-check error, occurs check)+ use the `FamAppBreaker` to create the extra binding.++Note that this always cycle-breaks the /outermost/ family application.+If we have [W] alpha ~ Maybe (F (G alpha))+* We'll use checkFamApp on `(F (G alpha))`+* It will recurse into `(G alpha)` with TEFA_Recurse, but not cycle-break it+* The occurs check will fire when we hit `alpha`+* `checkFamApp` on `(F (G alpha))` will see the failure and invoke+ the `FamAppBreaker`.+-}++-------------------+checkTyConApp :: TyEqFlags a+ -> TcType -> TyCon -> [TcType]+ -> TcM (PuResult a Reduction)+checkTyConApp flags@(TEF { tef_unifying = unifying, tef_foralls = foralls_ok })+ tc_app tc tys+ | isTypeFamilyTyCon tc+ , let arity = tyConArity tc+ = if tys `lengthIs` arity+ then checkFamApp flags tc_app tc tys -- Common case+ else do { let (fun_args, extra_args) = splitAt (tyConArity tc) tys+ fun_app = mkTyConApp tc fun_args+ ; fun_res <- checkFamApp flags fun_app tc fun_args+ ; extra_res <- mapCheck (checkTyEqRhs flags) extra_args+ ; traceTc "Over-sat" (ppr tc <+> ppr tys $$ ppr arity $$ pprPur fun_res $$ pprPur extra_res)+ ; return (mkAppRedns <$> fun_res <*> extra_res) }++ | Just ty' <- rewriterView tc_app+ -- e.g. S a where type S a = F [a]+ -- or type S a = Int+ -- See Note [Forgetful synonyms in checkTyConApp]+ = checkTyEqRhs flags ty'++ | not (isTauTyCon tc || foralls_ok)+ = failCheckWith impredicativeProblem++ | Unifying info _ _ <- unifying+ , isConcreteInfo info+ , not (isConcreteTyCon tc)+ = failCheckWith (cteProblem cteConcrete)++ | otherwise -- Recurse on arguments+ = recurseIntoTyConApp flags tc tys++recurseIntoTyConApp :: TyEqFlags a -> TyCon -> [TcType] -> TcM (PuResult a Reduction)+recurseIntoTyConApp flags tc tys+ = do { tys_res <- mapCheck (checkTyEqRhs flags) tys+ ; return (mkTyConAppRedn Nominal tc <$> tys_res) }++-------------------+checkFamApp :: TyEqFlags a+ -> TcType -> TyCon -> [TcType] -- Saturated family application+ -> TcM (PuResult a Reduction)+-- See Note [Family applications in canonical constraints]+checkFamApp flags@(TEF { tef_unifying = unifying, tef_occurs = occ_prob+ , tef_fam_app = fam_app_flag, tef_lhs = lhs })+ fam_app tc tys+ = case fam_app_flag of+ TEFA_Fail -> failCheckWith (cteProblem cteTypeFamily)++ _ | TyFamLHS lhs_tc lhs_tys <- lhs+ , tcEqTyConApps lhs_tc lhs_tys tc tys -- F ty ~ ...(F ty)...+ -> case fam_app_flag of+ TEFA_Recurse -> failCheckWith (cteProblem occ_prob)+ TEFA_Break breaker -> breaker fam_app++ _ | Unifying lhs_info _ _ <- unifying+ , isConcreteInfo lhs_info+ -> case fam_app_flag of+ TEFA_Recurse -> failCheckWith (cteProblem cteConcrete)+ TEFA_Break breaker -> breaker fam_app++ TEFA_Recurse+ -> do { tys_res <- mapCheck (checkTyEqRhs arg_flags) tys+ ; traceTc "under" (ppr tc $$ pprPur tys_res $$ ppr flags)+ ; return (mkTyConAppRedn Nominal tc <$> tys_res) }++ TEFA_Break breaker -- Recurse; and break if there is a problem+ -> do { tys_res <- mapCheck (checkTyEqRhs arg_flags) tys+ ; case tys_res of+ PuOK cts redns -> return (PuOK cts (mkTyConAppRedn Nominal tc redns))+ PuFail {} -> breaker fam_app }+ where+ arg_flags = famAppArgFlags flags++-------------------+checkTyVar :: forall a. TyEqFlags a -> TcTyVar -> TcM (PuResult a Reduction)+checkTyVar (TEF { tef_lhs = lhs, tef_unifying = unifying, tef_occurs = occ_prob }) occ_tv+ = case lhs of+ TyFamLHS {} -> success -- Nothing to do if the LHS is a type-family+ TyVarLHS lhs_tv -> check_tv unifying lhs_tv+ where+ lvl_occ = tcTyVarLevel occ_tv+ success = okCheckRefl (mkTyVarTy occ_tv)++ ---------------------+ check_tv NotUnifying lhs_tv+ = simple_occurs_check lhs_tv+ -- We need an occurs-check here, but no level check+ -- See Note [Promotion and level-checking] wrinkle (W1)++ check_tv (Unifying info lvl prom) lhs_tv+ = do { mb_done <- isFilledMetaTyVar_maybe occ_tv+ ; case mb_done of+ Just {} -> success+ -- Already promoted; job done+ -- Example alpha[2] ~ Maybe (beta[4], beta[4])+ -- We promote the first occurrence, and then encounter it+ -- a second time; we don't want to re-promote it!+ -- Remember, the entire process started with a fully zonked type++ Nothing -> check_unif info lvl prom lhs_tv }++ ---------------------+ -- We are in the Unifying branch of AreUnifing+ check_unif :: MetaInfo -> TcLevel -> LevelCheck+ -> TcTyVar -> TcM (PuResult a Reduction)+ check_unif lhs_tv_info lhs_tv_lvl prom lhs_tv+ | isConcreteInfo lhs_tv_info+ , not (isConcreteTyVar occ_tv)+ = if can_make_concrete occ_tv+ then promote lhs_tv lhs_tv_info lhs_tv_lvl+ else failCheckWith (cteProblem cteConcrete)++ | lvl_occ `strictlyDeeperThan` lhs_tv_lvl+ = case prom of+ LC_None -> pprPanic "check_unif" (ppr lhs_tv $$ ppr occ_tv)+ LC_Check -> failCheckWith (cteProblem cteSkolemEscape)+ LC_Promote+ | isSkolemTyVar occ_tv -> failCheckWith (cteProblem cteSkolemEscape)+ | otherwise -> promote lhs_tv lhs_tv_info lhs_tv_lvl++ | otherwise+ = simple_occurs_check lhs_tv++ ---------------------+ simple_occurs_check lhs_tv+ | lhs_tv == occ_tv || check_kind (tyVarKind occ_tv)+ = failCheckWith (cteProblem occ_prob)+ | otherwise+ = success+ where+ (check_kind, _) = mkOccFolders lhs_tv++ ---------------------+ can_make_concrete occ_tv = case tcTyVarDetails occ_tv of+ MetaTv { mtv_info = info } -> case info of+ ConcreteTv {} -> True+ TauTv {} -> True+ _ -> False+ _ -> False -- Don't attempt to make other type variables concrete+ -- (e.g. SkolemTv, TyVarTv, CycleBreakerTv, RuntimeUnkTv).++ ---------------------+ -- occ_tv is definitely a MetaTyVar+ promote lhs_tv lhs_tv_info lhs_tv_lvl+ | MetaTv { mtv_info = info_occ, mtv_tclvl = lvl_occ } <- tcTyVarDetails occ_tv+ = do { let new_info | isConcreteInfo lhs_tv_info = lhs_tv_info+ | otherwise = info_occ+ new_lvl = lhs_tv_lvl `minTcLevel` lvl_occ+ -- c[conc,3] ~ p[tau,2]: want to clone p:=p'[conc,2]+ -- c[tau,2] ~ p[tau,3]: want to clone p:=p'[tau,2]++ -- Check the kind of occ_tv+ ; reason <- checkPromoteFreeVars occ_prob lhs_tv lhs_tv_lvl (tyCoVarsOfType (tyVarKind occ_tv))++ ; if cterHasNoProblem reason -- Successfully promoted+ then do { new_tv_ty <- promote_meta_tyvar new_info new_lvl occ_tv+ ; okCheckRefl new_tv_ty }+ else failCheckWith reason }++ | otherwise = pprPanic "promote" (ppr occ_tv)++-------------------------+checkPromoteFreeVars :: CheckTyEqProblem -- What occurs check problem to report+ -> TcTyVar -> TcLevel+ -> TyCoVarSet -> TcM CheckTyEqResult+-- Check this set of TyCoVars for+-- (a) occurs check+-- (b) promote if necessary, or report skolem escape+checkPromoteFreeVars occ_prob lhs_tv lhs_tv_lvl vs+ = do { oks <- mapM do_one (nonDetEltsUniqSet vs)+ ; return (mconcat oks) }+ where+ do_one :: TyCoVar -> TcM CheckTyEqResult+ do_one v | isCoVar v = return cteOK+ | lhs_tv == v = return (cteProblem occ_prob)+ | no_promotion = return cteOK+ | not (isMetaTyVar v) = return (cteProblem cteSkolemEscape)+ | otherwise = promote_one v+ where+ no_promotion = not (tcTyVarLevel v `strictlyDeeperThan` lhs_tv_lvl)++ -- isCoVar case: coercion variables are not an escape risk+ -- If an implication binds a coercion variable, it'll have equalities,+ -- so the "intervening given equalities" test above will catch it+ -- Coercion holes get filled with coercions, so again no problem.++ promote_one tv = do { _ <- promote_meta_tyvar TauTv lhs_tv_lvl tv+ ; return cteOK }++promote_meta_tyvar :: MetaInfo -> TcLevel -> TcTyVar -> TcM TcType+promote_meta_tyvar info dest_lvl occ_tv+ = do { -- Check whether occ_tv is already unified. The rhs-type+ -- started zonked, but we may have promoted one of its type+ -- variables, and we then encounter it for the second time.+ -- But if so, it'll definitely be another already-checked TyVar+ mb_filled <- isFilledMetaTyVar_maybe occ_tv+ ; case mb_filled of {+ Just ty -> return ty ;+ Nothing ->++ -- OK, not done already, so clone/promote it+ do { new_tv <- cloneMetaTyVarWithInfo info dest_lvl occ_tv+ ; liftZonkM $ writeMetaTyVar occ_tv (mkTyVarTy new_tv)+ ; traceTc "promoteTyVar" (ppr occ_tv <+> text "-->" <+> ppr new_tv)+ ; return (mkTyVarTy new_tv) } } }++++-------------------------+touchabilityAndShapeTest :: TcLevel -> TcTyVar -> TcType -> Bool+-- This is the key test for untouchability:+-- See Note [Unification preconditions] in GHC.Tc.Utils.Unify+-- and Note [Solve by unification] in GHC.Tc.Solver.Equality+-- True <=> touchability and shape are OK+touchabilityAndShapeTest given_eq_lvl tv rhs+ | MetaTv { mtv_info = info, mtv_tclvl = tv_lvl } <- tcTyVarDetails tv+ , checkTopShape info rhs+ = tv_lvl `deeperThanOrSame` given_eq_lvl+ | otherwise+ = False++-------------------------+-- | checkTopShape checks (TYVAR-TV)+-- Note [Unification preconditions]; returns True if these conditions+-- are satisfied. But see the Note for other preconditions, too.+checkTopShape :: MetaInfo -> TcType -> Bool+checkTopShape info xi+ = case info of+ TyVarTv ->+ case getTyVar_maybe xi of -- Looks through type synonyms+ Nothing -> False+ Just tv -> case tcTyVarDetails tv of -- (TYVAR-TV) wrinkle+ SkolemTv {} -> True+ RuntimeUnk -> True+ MetaTv { mtv_info = TyVarTv } -> True+ _ -> False+ CycleBreakerTv -> False -- We never unify these+ _ -> True
GHC/Tc/Utils/Unify.hs-boot view
@@ -9,9 +9,9 @@ -- This boot file exists only to tie the knot between--- GHC.Tc.Utils.Unify and GHC.Tc.Utils.Instantiate+-- GHC.Tc.Utils.Unify and GHC.Tc.Utils.Instantiate/GHC.Tc.Utils.TcMType -unifyType :: Maybe TypedThing -> TcTauType -> TcTauType -> TcM TcCoercion-unifyKind :: Maybe TypedThing -> TcTauType -> TcTauType -> TcM TcCoercion+unifyType :: Maybe TypedThing -> TcTauType -> TcTauType -> TcM TcCoercion+unifyInvisibleType :: TcTauType -> TcTauType -> TcM TcCoercion tcSubMult :: CtOrigin -> Mult -> Mult -> TcM HsWrapper
− GHC/Tc/Utils/Zonk.hs
@@ -1,1934 +0,0 @@--{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE TypeFamilies #-}--{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}--{--(c) The University of Glasgow 2006-(c) The AQUA Project, Glasgow University, 1996-1998---}---- | Specialisations of the @HsSyn@ syntax for the typechecker------ This module is an extension of @HsSyn@ syntax, for use in the type checker.-module GHC.Tc.Utils.Zonk (- -- * Other HsSyn functions- mkHsDictLet, mkHsApp,- mkHsAppTy, mkHsCaseAlt,- tcShortCutLit, shortCutLit, hsOverLitName,- conLikeResTy,-- -- * re-exported from TcMonad- TcId, TcIdSet,-- -- * Zonking- -- | For a description of "zonking", see Note [What is zonking?]- -- in "GHC.Tc.Utils.TcMType"- zonkTopDecls, zonkTopExpr, zonkTopLExpr,- zonkTopBndrs,- ZonkEnv, ZonkFlexi(..), emptyZonkEnv, mkEmptyZonkEnv, initZonkEnv,- zonkTyVarBindersX, zonkTyVarBinderX,- zonkTyBndrs, zonkTyBndrsX,- zonkTcTypeToType, zonkTcTypeToTypeX,- zonkTcTypesToTypesX, zonkScaledTcTypesToTypesX,- zonkTyVarOcc,- zonkCoToCo,- zonkEvBinds, zonkTcEvBinds,- zonkTcMethInfoToMethInfoX,- lookupTyVarX- ) where--import GHC.Prelude--import GHC.Platform--import GHC.Builtin.Types-import GHC.Builtin.Names--import GHC.Hs--import {-# SOURCE #-} GHC.Tc.Gen.Splice (runTopSplice)-import GHC.Tc.Utils.Monad-import GHC.Tc.TyCl.Build ( TcMethInfo, MethInfo )-import GHC.Tc.Utils.TcType-import GHC.Tc.Utils.TcMType-import GHC.Tc.Utils.Env ( tcLookupGlobalOnly )-import GHC.Tc.Types.Evidence-import GHC.Tc.Errors.Types--import GHC.Core.TyCo.Ppr ( pprTyVar )-import GHC.Core.TyCon-import GHC.Core.Type-import GHC.Core.Coercion-import GHC.Core.ConLike-import GHC.Core.DataCon--import GHC.Utils.Outputable-import GHC.Utils.Misc-import GHC.Utils.Panic-import GHC.Utils.Panic.Plain--import GHC.Core.Multiplicity-import GHC.Core-import GHC.Core.Predicate--import GHC.Types.Name-import GHC.Types.Name.Env-import GHC.Types.Var-import GHC.Types.Var.Env-import GHC.Types.Id-import GHC.Types.TypeEnv-import GHC.Types.SourceText-import GHC.Types.Basic-import GHC.Types.SrcLoc-import GHC.Types.Unique.FM-import GHC.Types.TyThing-import GHC.Driver.Session( getDynFlags, targetPlatform )--import GHC.Data.Maybe-import GHC.Data.Bag--import Control.Monad-import Data.List ( partition )-import Control.Arrow ( second )--{- *********************************************************************-* *- Short-cuts for overloaded numeric literals-* *-********************************************************************* -}---- Overloaded literals. Here mainly because it uses isIntTy etc--{- Note [Short cut for overloaded literals]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-A literal like "3" means (fromInteger @ty (dNum :: Num ty) (3::Integer)).-But if we have a list like- [4,2,3,2,4,4,2]::[Int]-we use a lot of compile time and space generating and solving all those Num-constraints, and generating calls to fromInteger etc. Better just to cut to-the chase, and cough up an Int literal. Large collections of literals like this-sometimes appear in source files, so it's quite a worthwhile fix.--So we try to take advantage of whatever nearby type information we have,-to short-cut the process for built-in types. We can do this in two places;--* In the typechecker, when we are about to typecheck the literal.-* If that fails, in the desugarer, once we know the final type.--}--tcShortCutLit :: HsOverLit GhcRn -> ExpRhoType -> TcM (Maybe (HsOverLit GhcTc))-tcShortCutLit lit@(OverLit { ol_val = val, ol_ext = OverLitRn rebindable _}) exp_res_ty- | not rebindable- , Just res_ty <- checkingExpType_maybe exp_res_ty- = do { dflags <- getDynFlags- ; let platform = targetPlatform dflags- ; case shortCutLit platform val res_ty of- Just expr -> return $ Just $- lit { ol_ext = OverLitTc False expr res_ty }- Nothing -> return Nothing }- | otherwise- = return Nothing--shortCutLit :: Platform -> OverLitVal -> TcType -> Maybe (HsExpr GhcTc)-shortCutLit platform val res_ty- = case val of- HsIntegral int_lit -> go_integral int_lit- HsFractional frac_lit -> go_fractional frac_lit- HsIsString s src -> go_string s src- where- go_integral int@(IL src neg i)- | isIntTy res_ty && platformInIntRange platform i- = Just (HsLit noAnn (HsInt noExtField int))- | isWordTy res_ty && platformInWordRange platform i- = Just (mkLit wordDataCon (HsWordPrim src i))- | isIntegerTy res_ty- = Just (HsLit noAnn (HsInteger src i res_ty))- | otherwise- = go_fractional (integralFractionalLit neg i)- -- The 'otherwise' case is important- -- Consider (3 :: Float). Syntactically it looks like an IntLit,- -- so we'll call shortCutIntLit, but of course it's a float- -- This can make a big difference for programs with a lot of- -- literals, compiled without -O-- go_fractional f- | isFloatTy res_ty && valueInRange = Just (mkLit floatDataCon (HsFloatPrim noExtField f))- | isDoubleTy res_ty && valueInRange = Just (mkLit doubleDataCon (HsDoublePrim noExtField f))- | otherwise = Nothing- where- valueInRange =- case f of- FL { fl_exp = e } -> (-100) <= e && e <= 100- -- We limit short-cutting Fractional Literals to when their power of 10- -- is less than 100, which ensures desugaring isn't slow.-- go_string src s- | isStringTy res_ty = Just (HsLit noAnn (HsString src s))- | otherwise = Nothing--mkLit :: DataCon -> HsLit GhcTc -> HsExpr GhcTc-mkLit con lit = HsApp noComments (nlHsDataCon con) (nlHsLit lit)---------------------------------hsOverLitName :: OverLitVal -> Name--- Get the canonical 'fromX' name for a particular OverLitVal-hsOverLitName (HsIntegral {}) = fromIntegerName-hsOverLitName (HsFractional {}) = fromRationalName-hsOverLitName (HsIsString {}) = fromStringName--{--************************************************************************-* *-\subsection[BackSubst-HsBinds]{Running a substitution over @HsBinds@}-* *-************************************************************************--The rest of the zonking is done *after* typechecking.-The main zonking pass runs over the bindings-- a) to convert TcTyVars to TyVars etc, dereferencing any bindings etc- b) convert unbound TcTyVar to Void- c) convert each TcId to an Id by zonking its type--The type variables are converted by binding mutable tyvars to immutable ones-and then zonking as normal.--The Ids are converted by binding them in the normal Tc envt; that-way we maintain sharing; eg an Id is zonked at its binding site and they-all occurrences of that Id point to the common zonked copy--It's all pretty boring stuff, because HsSyn is such a large type, and-the environment manipulation is tiresome.--}---- Confused by zonking? See Note [What is zonking?] in GHC.Tc.Utils.TcMType.---- | See Note [The ZonkEnv]--- Confused by zonking? See Note [What is zonking?] in "GHC.Tc.Utils.TcMType".-data ZonkEnv -- See Note [The ZonkEnv]- = ZonkEnv { ze_flexi :: ZonkFlexi- , ze_tv_env :: TyCoVarEnv TyCoVar- , ze_id_env :: IdEnv Id- , ze_meta_tv_env :: TcRef (TyVarEnv Type) }--{- Note [The ZonkEnv]-~~~~~~~~~~~~~~~~~~~~~-* ze_flexi :: ZonkFlexi says what to do with a- unification variable that is still un-unified.- See Note [Un-unified unification variables]--* ze_tv_env :: TyCoVarEnv TyCoVar promotes sharing. At a binding site- of a tyvar or covar, we zonk the kind right away and add a mapping- to the env. This prevents re-zonking the kind at every- occurrence. But this is *just* an optimisation.--* ze_id_env : IdEnv Id promotes sharing among Ids, by making all- occurrences of the Id point to a single zonked copy, built at the- binding site.-- Unlike ze_tv_env, it is knot-tied: see extendIdZonkEnvRec.- In a mutually recursive group- rec { f = ...g...; g = ...f... }- we want the occurrence of g to point to the one zonked Id for g,- and the same for f.-- Because it is knot-tied, we must be careful to consult it lazily.- Specifically, zonkIdOcc is not monadic.--* ze_meta_tv_env: see Note [Sharing when zonking to Type]---Notes:- * We must be careful never to put coercion variables (which are Ids,- after all) in the knot-tied ze_id_env, because coercions can- appear in types, and we sometimes inspect a zonked type in this- module. [Question: where, precisely?]-- * In zonkTyVarOcc we consult ze_tv_env in a monadic context,- a second reason that ze_tv_env can't be monadic.-- * An obvious suggestion would be to have one VarEnv Var to- replace both ze_id_env and ze_tv_env, but that doesn't work- because of the knot-tying stuff mentioned above.--Note [Un-unified unification variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-What should we do if we find a Flexi unification variable?-There are three possibilities:--* DefaultFlexi: this is the common case, in situations like- length @alpha ([] @alpha)- It really doesn't matter what type we choose for alpha. But- we must choose a type! We can't leave mutable unification- variables floating around: after typecheck is complete, every- type variable occurrence must have a binding site.-- So we default it to 'Any' of the right kind.-- All this works for both type and kind variables (indeed- the two are the same thing).--* SkolemiseFlexi: is a special case for the LHS of RULES.- See Note [Zonking the LHS of a RULE]--* RuntimeUnkFlexi: is a special case for the GHCi debugger.- It's a way to have a variable that is not a mutable- unification variable, but doesn't have a binding site- either.--* NoFlexi: See Note [Error on unconstrained meta-variables]- in GHC.Tc.Utils.TcMType. This mode will panic on unfilled- meta-variables.--}--data ZonkFlexi -- See Note [Un-unified unification variables]- = DefaultFlexi -- Default unbound unification variables to Any- | SkolemiseFlexi -- Skolemise unbound unification variables- -- See Note [Zonking the LHS of a RULE]- | RuntimeUnkFlexi -- Used in the GHCi debugger- | NoFlexi -- Panic on unfilled meta-variables- -- See Note [Error on unconstrained meta-variables]- -- in GHC.Tc.Utils.TcMType--instance Outputable ZonkEnv where- ppr (ZonkEnv { ze_tv_env = tv_env- , ze_id_env = id_env })- = text "ZE" <+> braces (vcat- [ text "ze_tv_env =" <+> ppr tv_env- , text "ze_id_env =" <+> ppr id_env ])---- The EvBinds have to already be zonked, but that's usually the case.-emptyZonkEnv :: TcM ZonkEnv-emptyZonkEnv = mkEmptyZonkEnv DefaultFlexi--mkEmptyZonkEnv :: ZonkFlexi -> TcM ZonkEnv-mkEmptyZonkEnv flexi- = do { mtv_env_ref <- newTcRef emptyVarEnv- ; return (ZonkEnv { ze_flexi = flexi- , ze_tv_env = emptyVarEnv- , ze_id_env = emptyVarEnv- , ze_meta_tv_env = mtv_env_ref }) }--initZonkEnv :: (ZonkEnv -> TcM b) -> TcM b-initZonkEnv thing_inside = do { ze <- mkEmptyZonkEnv DefaultFlexi- ; thing_inside ze }---- | Extend the knot-tied environment.-extendIdZonkEnvRec :: ZonkEnv -> [Var] -> ZonkEnv-extendIdZonkEnvRec ze@(ZonkEnv { ze_id_env = id_env }) ids- -- NB: Don't look at the var to decide which env't to put it in. That- -- would end up knot-tying all the env'ts.- = ze { ze_id_env = extendVarEnvList id_env [(id,id) | id <- ids] }- -- Given coercion variables will actually end up here. That's OK though:- -- coercion variables are never looked up in the knot-tied env't, so zonking- -- them simply doesn't get optimised. No one gets hurt. An improvement (?)- -- would be to do SCC analysis in zonkEvBinds and then only knot-tie the- -- recursive groups. But perhaps the time it takes to do the analysis is- -- more than the savings.--extendZonkEnv :: ZonkEnv -> [Var] -> ZonkEnv-extendZonkEnv ze@(ZonkEnv { ze_tv_env = tyco_env, ze_id_env = id_env }) vars- = ze { ze_tv_env = extendVarEnvList tyco_env [(tv,tv) | tv <- tycovars]- , ze_id_env = extendVarEnvList id_env [(id,id) | id <- ids] }- where- (tycovars, ids) = partition isTyCoVar vars--extendIdZonkEnv :: ZonkEnv -> Var -> ZonkEnv-extendIdZonkEnv ze@(ZonkEnv { ze_id_env = id_env }) id- = ze { ze_id_env = extendVarEnv id_env id id }--extendTyZonkEnv :: ZonkEnv -> TyVar -> ZonkEnv-extendTyZonkEnv ze@(ZonkEnv { ze_tv_env = ty_env }) tv- = ze { ze_tv_env = extendVarEnv ty_env tv tv }--setZonkType :: ZonkEnv -> ZonkFlexi -> ZonkEnv-setZonkType ze flexi = ze { ze_flexi = flexi }--zonkEnvIds :: ZonkEnv -> TypeEnv-zonkEnvIds (ZonkEnv { ze_id_env = id_env})- = mkNameEnv [(getName id, AnId id) | id <- nonDetEltsUFM id_env]- -- It's OK to use nonDetEltsUFM here because we forget the ordering- -- immediately by creating a TypeEnv--zonkLIdOcc :: ZonkEnv -> LocatedN TcId -> LocatedN Id-zonkLIdOcc env = fmap (zonkIdOcc env)--zonkIdOcc :: ZonkEnv -> TcId -> Id--- Ids defined in this module should be in the envt;--- ignore others. (Actually, data constructors are also--- not LocalVars, even when locally defined, but that is fine.)--- (Also foreign-imported things aren't currently in the ZonkEnv;--- that's ok because they don't need zonking.)------ Actually, Template Haskell works in 'chunks' of declarations, and--- an earlier chunk won't be in the 'env' that the zonking phase--- carries around. Instead it'll be in the tcg_gbl_env, already fully--- zonked. There's no point in looking it up there (except for error--- checking), and it's not conveniently to hand; hence the simple--- 'orElse' case in the LocalVar branch.------ Even without template splices, in module Main, the checking of--- 'main' is done as a separate chunk.-zonkIdOcc (ZonkEnv { ze_id_env = id_env}) id- | isLocalVar id = lookupVarEnv id_env id `orElse`- id- | otherwise = id--zonkIdOccs :: ZonkEnv -> [TcId] -> [Id]-zonkIdOccs env ids = map (zonkIdOcc env) ids---- zonkIdBndr is used *after* typechecking to get the Id's type--- to its final form. The TyVarEnv give-zonkIdBndr :: ZonkEnv -> TcId -> TcM Id-zonkIdBndr env v- = do Scaled w' ty' <- zonkScaledTcTypeToTypeX env (idScaledType v)- return (setIdMult (setIdType v ty') w')--zonkIdBndrs :: ZonkEnv -> [TcId] -> TcM [Id]-zonkIdBndrs env ids = mapM (zonkIdBndr env) ids--zonkTopBndrs :: [TcId] -> TcM [Id]-zonkTopBndrs ids = initZonkEnv $ \ ze -> zonkIdBndrs ze ids--zonkFieldOcc :: ZonkEnv -> FieldOcc GhcTc -> TcM (FieldOcc GhcTc)-zonkFieldOcc env (FieldOcc sel lbl)- = fmap ((flip FieldOcc) lbl) $ zonkIdBndr env sel--zonkEvBndrsX :: ZonkEnv -> [EvVar] -> TcM (ZonkEnv, [Var])-zonkEvBndrsX = mapAccumLM zonkEvBndrX--zonkEvBndrX :: ZonkEnv -> EvVar -> TcM (ZonkEnv, EvVar)--- Works for dictionaries and coercions-zonkEvBndrX env var- = do { var' <- zonkEvBndr env var- ; return (extendZonkEnv env [var'], var') }--zonkEvBndr :: ZonkEnv -> EvVar -> TcM EvVar--- Works for dictionaries and coercions--- Does not extend the ZonkEnv-zonkEvBndr env var- = updateIdTypeAndMultM ({-# SCC "zonkEvBndr_zonkTcTypeToType" #-} zonkTcTypeToTypeX env) var--{--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 (extendIdZonkEnv env v', v') }- | otherwise = zonkTyBndrX env v--zonkCoreBndrsX :: ZonkEnv -> [Var] -> TcM (ZonkEnv, [Var])-zonkCoreBndrsX = mapAccumLM zonkCoreBndrX--zonkTyBndrs :: [TcTyVar] -> TcM (ZonkEnv, [TyVar])-zonkTyBndrs tvs = initZonkEnv $ \ze -> zonkTyBndrsX ze tvs--zonkTyBndrsX :: ZonkEnv -> [TcTyVar] -> TcM (ZonkEnv, [TyVar])-zonkTyBndrsX = mapAccumLM zonkTyBndrX--zonkTyBndrX :: ZonkEnv -> TcTyVar -> TcM (ZonkEnv, TyVar)--- This guarantees to return a TyVar (not a TcTyVar)--- then we add it to the envt, so all occurrences are replaced------ It does not clone: the new TyVar has the sane Name--- as the old one. This important when zonking the--- TyVarBndrs of a TyCon, whose Names may scope.-zonkTyBndrX env tv- = assertPpr (isImmutableTyVar tv) (ppr tv <+> dcolon <+> ppr (tyVarKind tv)) $- do { ki <- zonkTcTypeToTypeX env (tyVarKind tv)- -- Internal names tidy up better, for iface files.- ; let tv' = mkTyVar (tyVarName tv) ki- ; return (extendTyZonkEnv env tv', tv') }--zonkTyVarBindersX :: ZonkEnv -> [VarBndr TcTyVar vis]- -> TcM (ZonkEnv, [VarBndr TyVar vis])-zonkTyVarBindersX = mapAccumLM zonkTyVarBinderX--zonkTyVarBinderX :: ZonkEnv -> VarBndr TcTyVar vis- -> TcM (ZonkEnv, VarBndr TyVar vis)--- Takes a TcTyVar and guarantees to return a TyVar-zonkTyVarBinderX env (Bndr tv vis)- = do { (env', tv') <- zonkTyBndrX env tv- ; return (env', Bndr tv' vis) }--zonkTopExpr :: HsExpr GhcTc -> TcM (HsExpr GhcTc)-zonkTopExpr e = initZonkEnv $ \ ze -> zonkExpr ze e--zonkTopLExpr :: LHsExpr GhcTc -> TcM (LHsExpr GhcTc)-zonkTopLExpr e = initZonkEnv $ \ ze -> zonkLExpr ze e--zonkTopDecls :: Bag EvBind- -> LHsBinds GhcTc- -> [LRuleDecl GhcTc] -> [LTcSpecPrag]- -> [LForeignDecl GhcTc]- -> TcM (TypeEnv,- Bag EvBind,- LHsBinds GhcTc,- [LForeignDecl GhcTc],- [LTcSpecPrag],- [LRuleDecl GhcTc])-zonkTopDecls ev_binds binds rules imp_specs fords- = do { (env1, ev_binds') <- initZonkEnv $ \ ze -> zonkEvBinds ze ev_binds- ; (env2, binds') <- zonkRecMonoBinds env1 binds- -- Top level is implicitly recursive- ; rules' <- zonkRules env2 rules- ; specs' <- zonkLTcSpecPrags env2 imp_specs- ; fords' <- zonkForeignExports env2 fords- ; return (zonkEnvIds env2, ev_binds', binds', fords', specs', rules') }------------------------------------------------zonkLocalBinds :: ZonkEnv -> HsLocalBinds GhcTc- -> TcM (ZonkEnv, HsLocalBinds GhcTc)-zonkLocalBinds env (EmptyLocalBinds x)- = return (env, (EmptyLocalBinds x))--zonkLocalBinds _ (HsValBinds _ (ValBinds {}))- = panic "zonkLocalBinds" -- Not in typechecker output--zonkLocalBinds env (HsValBinds x (XValBindsLR (NValBinds binds sigs)))- = do { (env1, new_binds) <- go env binds- ; return (env1, HsValBinds x (XValBindsLR (NValBinds new_binds sigs))) }- where- go env []- = return (env, [])- go env ((r,b):bs)- = do { (env1, b') <- zonkRecMonoBinds env b- ; (env2, bs') <- go env1 bs- ; return (env2, (r,b'):bs') }--zonkLocalBinds env (HsIPBinds x (IPBinds dict_binds binds )) = do- new_binds <- mapM (wrapLocMA zonk_ip_bind) binds- let- env1 = extendIdZonkEnvRec env- [ n | (L _ (IPBind n _ _)) <- new_binds]- (env2, new_dict_binds) <- zonkTcEvBinds env1 dict_binds- return (env2, HsIPBinds x (IPBinds new_dict_binds new_binds))- where- zonk_ip_bind (IPBind dict_id n e)- = do dict_id' <- zonkIdBndr env dict_id- e' <- zonkLExpr env e- return (IPBind dict_id' n e')------------------------------------------------zonkRecMonoBinds :: ZonkEnv -> LHsBinds GhcTc -> TcM (ZonkEnv, LHsBinds GhcTc)-zonkRecMonoBinds env binds- = fixM (\ ~(_, new_binds) -> do- { let env1 = extendIdZonkEnvRec env (collectHsBindsBinders CollNoDictBinders new_binds)- ; binds' <- zonkMonoBinds env1 binds- ; return (env1, binds') })------------------------------------------------zonkMonoBinds :: ZonkEnv -> LHsBinds GhcTc -> TcM (LHsBinds GhcTc)-zonkMonoBinds env binds = mapBagM (zonk_lbind env) binds--zonk_lbind :: ZonkEnv -> LHsBind GhcTc -> TcM (LHsBind GhcTc)-zonk_lbind env = wrapLocMA (zonk_bind env)--zonk_bind :: ZonkEnv -> HsBind GhcTc -> TcM (HsBind GhcTc)-zonk_bind env bind@(PatBind { pat_lhs = pat, pat_rhs = grhss- , pat_ext = (ty, ticks)})- = do { (_env, new_pat) <- zonkPat env pat -- Env already extended- ; new_grhss <- zonkGRHSs env zonkLExpr grhss- ; new_ty <- zonkTcTypeToTypeX env ty- ; return (bind { pat_lhs = new_pat, pat_rhs = new_grhss- , pat_ext = (new_ty, ticks) }) }--zonk_bind env (VarBind { var_ext = x- , var_id = var, var_rhs = expr })- = do { new_var <- zonkIdBndr env var- ; new_expr <- zonkLExpr env expr- ; return (VarBind { var_ext = x- , var_id = new_var- , var_rhs = new_expr }) }--zonk_bind env bind@(FunBind { fun_id = L loc var- , fun_matches = ms- , fun_ext = (co_fn, ticks) })- = do { new_var <- zonkIdBndr env var- ; (env1, new_co_fn) <- zonkCoFn env co_fn- ; new_ms <- zonkMatchGroup env1 zonkLExpr ms- ; return (bind { fun_id = L loc new_var- , fun_matches = new_ms- , fun_ext = (new_co_fn, ticks) }) }--zonk_bind env (XHsBindsLR (AbsBinds { abs_tvs = tyvars, abs_ev_vars = evs- , abs_ev_binds = ev_binds- , abs_exports = exports- , abs_binds = val_binds- , abs_sig = has_sig }))- = assert ( all isImmutableTyVar tyvars ) $- do { (env0, new_tyvars) <- zonkTyBndrsX env tyvars- ; (env1, new_evs) <- zonkEvBndrsX env0 evs- ; (env2, new_ev_binds) <- zonkTcEvBinds_s env1 ev_binds- ; (new_val_bind, new_exports) <- fixM $ \ ~(new_val_binds, _) ->- do { let env3 = extendIdZonkEnvRec env2 $- collectHsBindsBinders CollNoDictBinders new_val_binds- ; new_val_binds <- mapBagM (zonk_val_bind env3) val_binds- ; new_exports <- mapM (zonk_export env3) exports- ; return (new_val_binds, new_exports) }- ; return $ XHsBindsLR $- AbsBinds { 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 } }- where- zonk_val_bind env lbind- | has_sig- , (L loc bind@(FunBind { fun_id = (L mloc mono_id)- , fun_matches = ms- , fun_ext = (co_fn, ticks) })) <- lbind- = do { new_mono_id <- updateIdTypeAndMultM (zonkTcTypeToTypeX env) mono_id- -- Specifically /not/ zonkIdBndr; we do not want to- -- complain about a representation-polymorphic binder- ; (env', new_co_fn) <- zonkCoFn env co_fn- ; new_ms <- zonkMatchGroup env' zonkLExpr ms- ; return $ L loc $- bind { fun_id = L mloc new_mono_id- , fun_matches = new_ms- , fun_ext = (new_co_fn, ticks) } }- | otherwise- = zonk_lbind env lbind -- The normal case-- zonk_export :: ZonkEnv -> ABExport -> TcM ABExport- zonk_export env (ABE{ 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- , abe_poly = new_poly_id- , abe_mono = zonkIdOcc env mono_id- , abe_prags = new_prags })--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- ; details' <- zonkPatSynDetails env1 details- ; (_env2, dir') <- zonkPatSynDir env1 dir- ; return $ PatSynBind x $- bind { psb_id = L loc id'- , psb_args = details'- , psb_def = lpat'- , psb_dir = dir' } }--zonkPatSynDetails :: ZonkEnv- -> HsPatSynDetails GhcTc- -> TcM (HsPatSynDetails GhcTc)-zonkPatSynDetails env (PrefixCon _ as)- = pure $ PrefixCon noTypeArgs (map (zonkLIdOcc env) as)-zonkPatSynDetails env (InfixCon a1 a2)- = pure $ InfixCon (zonkLIdOcc env a1) (zonkLIdOcc env a2)-zonkPatSynDetails env (RecCon flds)- = RecCon <$> mapM (zonkPatSynField env) flds--zonkPatSynField :: ZonkEnv -> RecordPatSynField GhcTc -> TcM (RecordPatSynField GhcTc)-zonkPatSynField env (RecordPatSynField x y) =- RecordPatSynField <$> zonkFieldOcc env x <*> pure (zonkLIdOcc env y)--zonkPatSynDir :: ZonkEnv -> HsPatSynDir GhcTc- -> TcM (ZonkEnv, HsPatSynDir GhcTc)-zonkPatSynDir env Unidirectional = return (env, Unidirectional)-zonkPatSynDir env ImplicitBidirectional = return (env, ImplicitBidirectional)-zonkPatSynDir env (ExplicitBidirectional mg) = do- mg' <- zonkMatchGroup env zonkLExpr mg- return (env, ExplicitBidirectional mg')--zonkSpecPrags :: ZonkEnv -> TcSpecPrags -> TcM TcSpecPrags-zonkSpecPrags _ IsDefaultMethod = return IsDefaultMethod-zonkSpecPrags env (SpecPrags ps) = do { ps' <- zonkLTcSpecPrags env ps- ; return (SpecPrags ps') }--zonkLTcSpecPrags :: ZonkEnv -> [LTcSpecPrag] -> TcM [LTcSpecPrag]-zonkLTcSpecPrags env ps- = mapM zonk_prag ps- where- zonk_prag (L loc (SpecPrag id co_fn inl))- = do { (_, co_fn') <- zonkCoFn env co_fn- ; return (L loc (SpecPrag (zonkIdOcc env id) co_fn' inl)) }--{--************************************************************************-* *-\subsection[BackSubst-Match-GRHSs]{Match and GRHSs}-* *-************************************************************************--}--zonkMatchGroup :: Anno (GRHS GhcTc (LocatedA (body GhcTc))) ~ SrcAnn NoEpAnns- => ZonkEnv- -> (ZonkEnv -> LocatedA (body GhcTc) -> TcM (LocatedA (body GhcTc)))- -> MatchGroup GhcTc (LocatedA (body GhcTc))- -> TcM (MatchGroup GhcTc (LocatedA (body GhcTc)))-zonkMatchGroup env zBody (MG { mg_alts = L l ms- , mg_ext = MatchGroupTc arg_tys res_ty origin- })- = do { ms' <- mapM (zonkMatch env zBody) ms- ; arg_tys' <- zonkScaledTcTypesToTypesX env arg_tys- ; res_ty' <- zonkTcTypeToTypeX env res_ty- ; return (MG { mg_alts = L l ms'- , mg_ext = MatchGroupTc arg_tys' res_ty' origin- }) }--zonkMatch :: Anno (GRHS GhcTc (LocatedA (body GhcTc))) ~ SrcAnn NoEpAnns- => ZonkEnv- -> (ZonkEnv -> LocatedA (body GhcTc) -> TcM (LocatedA (body GhcTc)))- -> LMatch GhcTc (LocatedA (body GhcTc))- -> TcM (LMatch GhcTc (LocatedA (body GhcTc)))-zonkMatch env zBody (L loc match@(Match { m_pats = pats- , m_grhss = grhss }))- = 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 })) }----------------------------------------------------------------------------zonkGRHSs :: Anno (GRHS GhcTc (LocatedA (body GhcTc))) ~ SrcAnn NoEpAnns- => ZonkEnv- -> (ZonkEnv -> LocatedA (body GhcTc) -> TcM (LocatedA (body GhcTc)))- -> GRHSs GhcTc (LocatedA (body GhcTc))- -> TcM (GRHSs GhcTc (LocatedA (body GhcTc)))--zonkGRHSs env zBody (GRHSs x grhss binds) = do- (new_env, new_binds) <- zonkLocalBinds env binds- let- zonk_grhs (GRHS xx guarded rhs)- = do (env2, new_guarded) <- zonkStmts new_env zonkLExpr guarded- new_rhs <- zBody env2 rhs- return (GRHS xx new_guarded new_rhs)- new_grhss <- mapM (wrapLocMA zonk_grhs) grhss- return (GRHSs x new_grhss new_binds)--{--************************************************************************-* *-\subsection[BackSubst-HsExpr]{Running a zonkitution over a TypeCheckedExpr}-* *-************************************************************************--}--zonkLExprs :: ZonkEnv -> [LHsExpr GhcTc] -> TcM [LHsExpr GhcTc]-zonkLExpr :: ZonkEnv -> LHsExpr GhcTc -> TcM (LHsExpr GhcTc)-zonkExpr :: ZonkEnv -> HsExpr GhcTc -> TcM (HsExpr GhcTc)--zonkLExprs env exprs = mapM (zonkLExpr env) exprs-zonkLExpr env expr = wrapLocMA (zonkExpr env) expr--zonkExpr env (HsVar x (L l id))- = assertPpr (isNothing (isDataConId_maybe id)) (ppr id) $- return (HsVar x (L l (zonkIdOcc env id)))--zonkExpr env (HsUnboundVar her occ)- = do her' <- zonk_her her- return (HsUnboundVar her' occ)- where- zonk_her :: HoleExprRef -> TcM HoleExprRef- zonk_her (HER ref ty u)- = do updMutVarM ref (zonkEvTerm env)- ty' <- zonkTcTypeToTypeX env ty- return (HER ref ty' u)--zonkExpr env (HsRecSel _ (FieldOcc v occ))- = return (HsRecSel noExtField (FieldOcc (zonkIdOcc env v) occ))--zonkExpr _ (HsIPVar x _) = dataConCantHappen x--zonkExpr _ (HsOverLabel x _ _) = dataConCantHappen x--zonkExpr env (HsLit x (HsRat e f ty))- = do new_ty <- zonkTcTypeToTypeX env ty- return (HsLit x (HsRat e f new_ty))--zonkExpr _ (HsLit x lit)- = return (HsLit x lit)--zonkExpr env (HsOverLit x lit)- = do { lit' <- zonkOverLit env lit- ; return (HsOverLit x lit') }--zonkExpr env (HsLam x matches)- = do new_matches <- zonkMatchGroup env zonkLExpr matches- return (HsLam x new_matches)--zonkExpr env (HsLamCase x lc_variant matches)- = do new_matches <- zonkMatchGroup env zonkLExpr matches- return (HsLamCase x lc_variant new_matches)--zonkExpr env (HsApp x e1 e2)- = do new_e1 <- zonkLExpr env e1- new_e2 <- zonkLExpr env e2- return (HsApp x new_e1 new_e2)--zonkExpr env (HsAppType ty e at t)- = do new_e <- zonkLExpr env e- new_ty <- zonkTcTypeToTypeX env ty- return (HsAppType new_ty new_e at t)- -- NB: the type is an HsType; can't zonk that!--zonkExpr env (HsTypedBracket hsb_tc body)- = (\x -> HsTypedBracket x body) <$> zonkBracket env hsb_tc--zonkExpr env (HsUntypedBracket hsb_tc body)- = (\x -> HsUntypedBracket x body) <$> zonkBracket env hsb_tc--zonkExpr env (HsTypedSplice s _) = runTopSplice s >>= zonkExpr env--zonkExpr _ e@(HsUntypedSplice _ _) = pprPanic "zonkExpr: HsUntypedSplice" (ppr e)--zonkExpr _ (OpApp x _ _ _) = dataConCantHappen x--zonkExpr env (NegApp x expr op)- = do (env', new_op) <- zonkSyntaxExpr env op- new_expr <- zonkLExpr env' expr- return (NegApp x new_expr new_op)--zonkExpr env (HsPar x lpar e rpar)- = do new_e <- zonkLExpr env e- return (HsPar x lpar new_e rpar)--zonkExpr _ (SectionL x _ _) = dataConCantHappen x-zonkExpr _ (SectionR x _ _) = dataConCantHappen x-zonkExpr env (ExplicitTuple x tup_args boxed)- = do { new_tup_args <- mapM zonk_tup_arg tup_args- ; return (ExplicitTuple x new_tup_args boxed) }- where- zonk_tup_arg (Present x e) = do { e' <- zonkLExpr env e- ; return (Present x e') }- zonk_tup_arg (Missing t) = do { t' <- zonkScaledTcTypeToTypeX env t- ; return (Missing t') }---zonkExpr env (ExplicitSum args alt arity expr)- = do new_args <- mapM (zonkTcTypeToTypeX env) args- new_expr <- zonkLExpr env expr- return (ExplicitSum new_args alt arity new_expr)--zonkExpr env (HsCase x expr ms)- = do new_expr <- zonkLExpr env expr- new_ms <- zonkMatchGroup env zonkLExpr ms- return (HsCase x new_expr new_ms)--zonkExpr env (HsIf x e1 e2 e3)- = do new_e1 <- zonkLExpr env e1- new_e2 <- zonkLExpr env e2- new_e3 <- zonkLExpr env e3- return (HsIf x new_e1 new_e2 new_e3)--zonkExpr env (HsMultiIf ty alts)- = do { alts' <- mapM (wrapLocMA zonk_alt) alts- ; ty' <- zonkTcTypeToTypeX env ty- ; return $ HsMultiIf ty' alts' }- where zonk_alt (GRHS x guard expr)- = do { (env', guard') <- zonkStmts env zonkLExpr guard- ; expr' <- zonkLExpr env' expr- ; return $ GRHS x guard' expr' }--zonkExpr env (HsLet x tkLet binds tkIn expr)- = do (new_env, new_binds) <- zonkLocalBinds env binds- new_expr <- zonkLExpr new_env expr- return (HsLet x tkLet new_binds tkIn new_expr)--zonkExpr env (HsDo ty do_or_lc (L l stmts))- = do (_, new_stmts) <- zonkStmts env zonkLExpr stmts- new_ty <- zonkTcTypeToTypeX env ty- return (HsDo new_ty do_or_lc (L l new_stmts))--zonkExpr env (ExplicitList ty exprs)- = do new_ty <- zonkTcTypeToTypeX env ty- new_exprs <- zonkLExprs env exprs- return (ExplicitList new_ty new_exprs)--zonkExpr env expr@(RecordCon { rcon_ext = con_expr, rcon_flds = rbinds })- = do { new_con_expr <- zonkExpr env con_expr- ; new_rbinds <- zonkRecFields env rbinds- ; return (expr { rcon_ext = new_con_expr- , rcon_flds = new_rbinds }) }--zonkExpr env (ExprWithTySig _ e ty)- = do { e' <- zonkLExpr env e- ; return (ExprWithTySig noExtField e' ty) }--zonkExpr env (ArithSeq expr wit info)- = do (env1, new_wit) <- zonkWit env wit- new_expr <- zonkExpr env expr- new_info <- zonkArithSeq env1 info- return (ArithSeq new_expr new_wit new_info)- where zonkWit env Nothing = return (env, Nothing)- zonkWit env (Just fln) = second Just <$> zonkSyntaxExpr env fln--zonkExpr env (HsPragE x prag expr)- = do new_expr <- zonkLExpr env expr- return (HsPragE x prag new_expr)---- arrow notation extensions-zonkExpr env (HsProc x pat body)- = do { (env1, new_pat) <- zonkPat env pat- ; new_body <- zonkCmdTop env1 body- ; return (HsProc x new_pat new_body) }---- StaticPointers extension-zonkExpr env (HsStatic (fvs, ty) expr)- = do new_ty <- zonkTcTypeToTypeX env ty- HsStatic (fvs, new_ty) <$> zonkLExpr env expr--zonkExpr env (XExpr (WrapExpr (HsWrap co_fn expr)))- = do (env1, new_co_fn) <- zonkCoFn env co_fn- new_expr <- zonkExpr env1 expr- return (XExpr (WrapExpr (HsWrap new_co_fn new_expr)))--zonkExpr env (XExpr (ExpansionExpr (HsExpanded a b)))- = XExpr . ExpansionExpr . HsExpanded a <$> zonkExpr env b--zonkExpr env (XExpr (ConLikeTc con tvs tys))- = XExpr . ConLikeTc con tvs <$> mapM zonk_scale tys- where- zonk_scale (Scaled m ty) = Scaled <$> zonkTcTypeToTypeX env m <*> pure ty- -- Only the multiplicity can contain unification variables- -- The tvs come straight from the data-con, and so are strictly redundant- -- See Wrinkles of Note [Typechecking data constructors] in GHC.Tc.Gen.Head--zonkExpr _ expr = pprPanic "zonkExpr" (ppr expr)----------------------------------------------------------------------------{--Note [Skolems in zonkSyntaxExpr]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider rebindable syntax with something like-- (>>=) :: (forall x. blah) -> (forall y. blah') -> blah''--The x and y become skolems that are in scope when type-checking the-arguments to the bind. This means that we must extend the ZonkEnv with-these skolems when zonking the arguments to the bind. But the skolems-are different between the two arguments, and so we should theoretically-carry around different environments to use for the different arguments.--However, this becomes a logistical nightmare, especially in dealing with-the more exotic Stmt forms. So, we simplify by making the critical-assumption that the uniques of the skolems are different. (This assumption-is justified by the use of newUnique in GHC.Tc.Utils.TcMType.instSkolTyCoVarX.)-Now, we can safely just extend one environment.--}---- See Note [Skolems in zonkSyntaxExpr]-zonkSyntaxExpr :: ZonkEnv -> SyntaxExpr GhcTc- -> TcM (ZonkEnv, SyntaxExpr GhcTc)-zonkSyntaxExpr env (SyntaxExprTc { syn_expr = expr- , syn_arg_wraps = arg_wraps- , syn_res_wrap = res_wrap })- = do { (env0, res_wrap') <- zonkCoFn env res_wrap- ; expr' <- zonkExpr env0 expr- ; (env1, arg_wraps') <- mapAccumLM zonkCoFn env0 arg_wraps- ; return (env1, SyntaxExprTc { syn_expr = expr'- , syn_arg_wraps = arg_wraps'- , syn_res_wrap = res_wrap' }) }-zonkSyntaxExpr env NoSyntaxExprTc = return (env, NoSyntaxExprTc)-----------------------------------------------------------------------------zonkLCmd :: ZonkEnv -> LHsCmd GhcTc -> TcM (LHsCmd GhcTc)-zonkCmd :: ZonkEnv -> HsCmd GhcTc -> TcM (HsCmd GhcTc)--zonkLCmd env cmd = wrapLocMA (zonkCmd env) cmd--zonkCmd env (XCmd (HsWrap w cmd))- = do { (env1, w') <- zonkCoFn env w- ; cmd' <- zonkCmd env1 cmd- ; return (XCmd (HsWrap w' cmd')) }-zonkCmd env (HsCmdArrApp ty e1 e2 ho rl)- = do new_e1 <- zonkLExpr env e1- new_e2 <- zonkLExpr env e2- new_ty <- zonkTcTypeToTypeX env ty- return (HsCmdArrApp new_ty new_e1 new_e2 ho rl)--zonkCmd env (HsCmdArrForm x op f fixity args)- = do new_op <- zonkLExpr env op- new_args <- mapM (zonkCmdTop env) args- return (HsCmdArrForm x new_op f fixity new_args)--zonkCmd env (HsCmdApp x c e)- = do new_c <- zonkLCmd env c- new_e <- zonkLExpr env e- return (HsCmdApp x new_c new_e)--zonkCmd env (HsCmdLam x matches)- = do new_matches <- zonkMatchGroup env zonkLCmd matches- return (HsCmdLam x new_matches)--zonkCmd env (HsCmdPar x lpar c rpar)- = do new_c <- zonkLCmd env c- return (HsCmdPar x lpar new_c rpar)--zonkCmd env (HsCmdCase x expr ms)- = do new_expr <- zonkLExpr env expr- new_ms <- zonkMatchGroup env zonkLCmd ms- return (HsCmdCase x new_expr new_ms)--zonkCmd env (HsCmdLamCase x lc_variant ms)- = do new_ms <- zonkMatchGroup env zonkLCmd ms- return (HsCmdLamCase x lc_variant new_ms)--zonkCmd env (HsCmdIf x eCond ePred cThen cElse)- = do { (env1, new_eCond) <- zonkSyntaxExpr env eCond- ; new_ePred <- zonkLExpr env1 ePred- ; new_cThen <- zonkLCmd env1 cThen- ; new_cElse <- zonkLCmd env1 cElse- ; return (HsCmdIf x new_eCond new_ePred new_cThen new_cElse) }--zonkCmd env (HsCmdLet x tkLet binds tkIn cmd)- = do (new_env, new_binds) <- zonkLocalBinds env binds- new_cmd <- zonkLCmd new_env cmd- return (HsCmdLet x tkLet new_binds tkIn new_cmd)--zonkCmd env (HsCmdDo ty (L l stmts))- = do (_, new_stmts) <- zonkStmts env zonkLCmd stmts- new_ty <- zonkTcTypeToTypeX env ty- return (HsCmdDo new_ty (L l new_stmts))----zonkCmdTop :: ZonkEnv -> LHsCmdTop GhcTc -> TcM (LHsCmdTop GhcTc)-zonkCmdTop env cmd = wrapLocMA (zonk_cmd_top env) cmd--zonk_cmd_top :: ZonkEnv -> HsCmdTop GhcTc -> TcM (HsCmdTop GhcTc)-zonk_cmd_top env (HsCmdTop (CmdTopTc stack_tys ty ids) cmd)- = do new_cmd <- zonkLCmd env cmd- new_stack_tys <- zonkTcTypeToTypeX env stack_tys- new_ty <- zonkTcTypeToTypeX env ty- new_ids <- mapSndM (zonkExpr env) ids-- massert (isLiftedTypeKind (typeKind new_stack_tys))- -- desugarer assumes that this is not representation-polymorphic...- -- but indeed it should always be lifted due to the typing- -- rules for arrows-- return (HsCmdTop (CmdTopTc new_stack_tys new_ty new_ids) new_cmd)----------------------------------------------------------------------------zonkCoFn :: ZonkEnv -> HsWrapper -> TcM (ZonkEnv, HsWrapper)-zonkCoFn env WpHole = return (env, WpHole)-zonkCoFn env (WpCompose c1 c2) = do { (env1, c1') <- zonkCoFn env c1- ; (env2, c2') <- zonkCoFn env1 c2- ; return (env2, WpCompose c1' c2') }-zonkCoFn env (WpFun c1 c2 t1) = do { (env1, c1') <- zonkCoFn env c1- ; (env2, c2') <- zonkCoFn env1 c2- ; t1' <- zonkScaledTcTypeToTypeX env2 t1- ; return (env2, WpFun c1' c2' t1') }-zonkCoFn env (WpCast co) = do { co' <- zonkCoToCo env co- ; return (env, WpCast co') }-zonkCoFn env (WpEvLam ev) = do { (env', ev') <- zonkEvBndrX env ev- ; return (env', WpEvLam ev') }-zonkCoFn env (WpEvApp arg) = do { arg' <- zonkEvTerm env arg- ; return (env, WpEvApp arg') }-zonkCoFn env (WpTyLam tv) = assert (isImmutableTyVar tv) $- do { (env', tv') <- zonkTyBndrX env tv- ; return (env', WpTyLam tv') }-zonkCoFn env (WpTyApp ty) = do { ty' <- zonkTcTypeToTypeX env ty- ; return (env, WpTyApp ty') }-zonkCoFn env (WpLet bs) = do { (env1, bs') <- zonkTcEvBinds env bs- ; return (env1, WpLet bs') }-zonkCoFn env (WpMultCoercion co) = do { co' <- zonkCoToCo env co- ; return (env, WpMultCoercion co') }----------------------------------------------------------------------------zonkOverLit :: ZonkEnv -> HsOverLit GhcTc -> TcM (HsOverLit GhcTc)-zonkOverLit env lit@(OverLit {ol_ext = x@OverLitTc { ol_witness = e, ol_type = ty } })- = do { ty' <- zonkTcTypeToTypeX env ty- ; e' <- zonkExpr env e- ; return (lit { ol_ext = x { ol_witness = e'- , ol_type = ty' } }) }----------------------------------------------------------------------------zonkBracket :: ZonkEnv -> HsBracketTc -> TcM HsBracketTc-zonkBracket env (HsBracketTc hsb_thing ty wrap bs)- = do wrap' <- traverse zonkQuoteWrap wrap- bs' <- mapM (zonk_b env) bs- new_ty <- zonkTcTypeToTypeX env ty- return (HsBracketTc hsb_thing new_ty wrap' bs')- where- zonkQuoteWrap (QuoteWrapper ev ty) = do- let ev' = zonkIdOcc env ev- ty' <- zonkTcTypeToTypeX env ty- return (QuoteWrapper ev' ty')-- zonk_b env' (PendingTcSplice n e) = do e' <- zonkLExpr env' e- return (PendingTcSplice n e')----------------------------------------------------------------------------zonkArithSeq :: ZonkEnv -> ArithSeqInfo GhcTc -> TcM (ArithSeqInfo GhcTc)--zonkArithSeq env (From e)- = do new_e <- zonkLExpr env e- return (From new_e)--zonkArithSeq env (FromThen e1 e2)- = do new_e1 <- zonkLExpr env e1- new_e2 <- zonkLExpr env e2- return (FromThen new_e1 new_e2)--zonkArithSeq env (FromTo e1 e2)- = do new_e1 <- zonkLExpr env e1- new_e2 <- zonkLExpr env e2- return (FromTo new_e1 new_e2)--zonkArithSeq env (FromThenTo e1 e2 e3)- = do new_e1 <- zonkLExpr env e1- new_e2 <- zonkLExpr env e2- new_e3 <- zonkLExpr env e3- return (FromThenTo new_e1 new_e2 new_e3)----------------------------------------------------------------------------zonkStmts :: Anno (StmtLR GhcTc GhcTc (LocatedA (body GhcTc))) ~ SrcSpanAnnA- => ZonkEnv- -> (ZonkEnv -> LocatedA (body GhcTc) -> TcM (LocatedA (body GhcTc)))- -> [LStmt GhcTc (LocatedA (body GhcTc))]- -> TcM (ZonkEnv, [LStmt GhcTc (LocatedA (body GhcTc))])-zonkStmts env _ [] = return (env, [])-zonkStmts env zBody (s:ss) = do { (env1, s') <- wrapLocSndMA (zonkStmt env zBody) s- ; (env2, ss') <- zonkStmts env1 zBody ss- ; return (env2, s' : ss') }--zonkStmt :: Anno (StmtLR GhcTc GhcTc (LocatedA (body GhcTc))) ~ SrcSpanAnnA- => ZonkEnv- -> (ZonkEnv -> LocatedA (body GhcTc) -> TcM (LocatedA (body GhcTc)))- -> Stmt GhcTc (LocatedA (body GhcTc))- -> TcM (ZonkEnv, Stmt GhcTc (LocatedA (body GhcTc)))-zonkStmt env _ (ParStmt bind_ty stmts_w_bndrs mzip_op bind_op)- = do { (env1, new_bind_op) <- zonkSyntaxExpr env bind_op- ; new_bind_ty <- zonkTcTypeToTypeX 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]- env2 = extendIdZonkEnvRec env1 new_binders- ; new_mzip <- zonkExpr env2 mzip_op- ; return (env2- , ParStmt new_bind_ty new_stmts_w_bndrs new_mzip new_bind_op)}- where- zonk_branch :: ZonkEnv -> ParStmtBlock GhcTc GhcTc- -> TcM (ParStmtBlock GhcTc GhcTc)- 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 x new_stmts (zonkIdOccs env3 bndrs)- new_return) }--zonkStmt env zBody (RecStmt { recS_stmts = L _ 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_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- ; new_bind_ty <- zonkTcTypeToTypeX env3 bind_ty- ; new_rvs <- zonkIdBndrs env3 rvs- ; new_lvs <- zonkIdBndrs env3 lvs- ; new_ret_ty <- zonkTcTypeToTypeX env3 ret_ty- ; let env4 = extendIdZonkEnvRec env3 new_rvs- ; (env5, new_segStmts) <- zonkStmts env4 zBody segStmts- -- Zonk the ret-expressions in an envt that- -- has the polymorphic bindings in the envt- ; new_later_rets <- mapM (zonkExpr env5) later_rets- ; new_rec_rets <- mapM (zonkExpr env5) rec_rets- ; return (extendIdZonkEnvRec env3 new_lvs, -- Only the lvs are needed- RecStmt { recS_stmts = noLocA 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_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 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 <- zonkTcTypeToTypeX env2 ty- return (env2, BodyStmt new_ty new_body new_then_op new_guard_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 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_ext = bind_arg_ty- , trS_fmap = liftM_op })- = do {- ; (env1, bind_op') <- zonkSyntaxExpr env bind_op- ; bind_arg_ty' <- zonkTcTypeToTypeX env1 bind_arg_ty- ; (env2, stmts') <- zonkStmts env1 zonkLExpr stmts- ; by' <- traverse (zonkLExpr env2) by- ; using' <- zonkLExpr env2 using-- ; (env3, return_op') <- zonkSyntaxExpr env2 return_op- ; binderMap' <- mapM (zonkBinderMapEntry env3) binderMap- ; liftM_op' <- zonkExpr env3 liftM_op- ; let env3' = extendIdZonkEnvRec env3 (map snd binderMap')- ; 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_ext = bind_arg_ty'- , trS_fmap = liftM_op' }) }- where- zonkBinderMapEntry env (oldBinder, newBinder) = do- let oldBinder' = zonkIdOcc env oldBinder- newBinder' <- zonkIdBndr env newBinder- return (oldBinder', newBinder')--zonkStmt env _ (LetStmt x binds)- = do (env1, new_binds) <- zonkLocalBinds env binds- return (env1, LetStmt x new_binds)--zonkStmt env zBody (BindStmt xbs pat body)- = do { (env1, new_bind) <- zonkSyntaxExpr env (xbstc_bindOp xbs)- ; new_w <- zonkTcTypeToTypeX env1 (xbstc_boundResultMult xbs)- ; new_bind_ty <- zonkTcTypeToTypeX env1 (xbstc_boundResultType xbs)- ; new_body <- zBody env1 body- ; (env2, new_pat) <- zonkPat env1 pat- ; new_fail <- case xbstc_failOp xbs of- Nothing -> return Nothing- Just f -> fmap (Just . snd) (zonkSyntaxExpr env1 f)- ; return ( env2- , BindStmt (XBindStmtTc- { xbstc_bindOp = new_bind- , xbstc_boundResultType = new_bind_ty- , xbstc_boundResultMult = new_w- , xbstc_failOp = new_fail- })- new_pat new_body) }---- Scopes: join > ops (in reverse order) > pats (in forward order)--- > rest of stmts-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 <- zonkTcTypeToTypeX env2 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 :: (SyntaxExpr GhcTc, ApplicativeArg GhcTc) -> LPat GhcTc- get_pat (_, ApplicativeArgOne _ pat _ _) = pat- get_pat (_, ApplicativeArgMany _ _ _ pat _) = pat-- replace_pat :: LPat GhcTc- -> (SyntaxExpr GhcTc, ApplicativeArg GhcTc)- -> (SyntaxExpr GhcTc, ApplicativeArg GhcTc)- replace_pat pat (op, ApplicativeArgOne fail_op _ a isBody)- = (op, ApplicativeArgOne fail_op pat a isBody)- replace_pat pat (op, ApplicativeArgMany x a b _ c)- = (op, ApplicativeArgMany x a b pat c)-- zonk_args env args- = do { (env1, new_args_rev) <- zonk_args_rev env (reverse args)- ; (env2, new_pats) <- zonkPats env1 (map get_pat args)- ; return (env2, zipWithEqual "zonkStmt" replace_pat- new_pats (reverse new_args_rev)) }-- -- these need to go backward, because if any operators are higher-rank,- -- later operators may introduce skolems that are in scope for earlier- -- arguments- zonk_args_rev env ((op, arg) : args)- = do { (env1, new_op) <- zonkSyntaxExpr env op- ; new_arg <- zonk_arg env1 arg- ; (env2, new_args) <- zonk_args_rev env1 args- ; return (env2, (new_op, new_arg) : new_args) }- zonk_args_rev env [] = return (env, [])-- zonk_arg env (ApplicativeArgOne fail_op pat expr isBody)- = do { new_expr <- zonkLExpr env expr- ; new_fail <- forM fail_op $ \old_fail ->- do { (_, fail') <- zonkSyntaxExpr env old_fail- ; return fail'- }- ; return (ApplicativeArgOne new_fail pat new_expr isBody) }- zonk_arg env (ApplicativeArgMany x stmts ret pat ctxt)- = do { (env1, new_stmts) <- zonkStmts env zonkLExpr stmts- ; new_ret <- zonkExpr env1 ret- ; return (ApplicativeArgMany x new_stmts new_ret pat ctxt) }----------------------------------------------------------------------------zonkRecFields :: ZonkEnv -> HsRecordBinds GhcTc -> TcM (HsRecordBinds GhcTc)-zonkRecFields env (HsRecFields flds dd)- = do { flds' <- mapM zonk_rbind flds- ; return (HsRecFields flds' dd) }- where- zonk_rbind (L l fld)- = do { new_id <- wrapLocMA (zonkFieldOcc env) (hfbLHS fld)- ; new_expr <- zonkLExpr env (hfbRHS fld)- ; return (L l (fld { hfbLHS = new_id- , hfbRHS = new_expr })) }--{--************************************************************************-* *-\subsection[BackSubst-Pats]{Patterns}-* *-************************************************************************--}--zonkPat :: ZonkEnv -> LPat GhcTc -> TcM (ZonkEnv, LPat GhcTc)--- Extend the environment as we go, because it's possible for one--- pattern to bind something that is used in another (inside or--- to the right)-zonkPat env pat = wrapLocSndMA (zonk_pat env) pat--zonk_pat :: ZonkEnv -> Pat GhcTc -> TcM (ZonkEnv, Pat GhcTc)-zonk_pat env (ParPat x lpar p rpar)- = do { (env', p') <- zonkPat env p- ; return (env', ParPat x lpar p' rpar) }--zonk_pat env (WildPat ty)- = do { ty' <- zonkTcTypeToTypeX env ty- ; return (env, WildPat ty') }--zonk_pat env (VarPat x (L l v))- = do { v' <- zonkIdBndr env v- ; return (extendIdZonkEnv env v', VarPat x (L l v')) }--zonk_pat env (LazyPat x pat)- = do { (env', pat') <- zonkPat env pat- ; return (env', LazyPat x pat') }--zonk_pat env (BangPat x pat)- = do { (env', pat') <- zonkPat env pat- ; return (env', BangPat x pat') }--zonk_pat env (AsPat x (L loc v) at pat)- = do { v' <- zonkIdBndr env v- ; (env', pat') <- zonkPat (extendIdZonkEnv env v') pat- ; return (env', AsPat x (L loc v') at pat') }--zonk_pat env (ViewPat ty expr pat)- = do { expr' <- zonkLExpr env expr- ; (env', pat') <- zonkPat env pat- ; ty' <- zonkTcTypeToTypeX env ty- ; return (env', ViewPat ty' expr' pat') }--zonk_pat env (ListPat ty pats)- = do { ty' <- zonkTcTypeToTypeX env ty- ; (env', pats') <- zonkPats env pats- ; return (env', ListPat ty' pats') }--zonk_pat env (TuplePat tys pats boxed)- = do { tys' <- mapM (zonkTcTypeToTypeX env) tys- ; (env', pats') <- zonkPats env pats- ; return (env', TuplePat tys' pats' boxed) }--zonk_pat env (SumPat tys pat alt arity )- = do { tys' <- mapM (zonkTcTypeToTypeX env) tys- ; (env', pat') <- zonkPat env pat- ; return (env', SumPat tys' pat' alt arity) }--zonk_pat env p@(ConPat { pat_args = args- , pat_con_ext = p'@(ConPatTc- { cpt_tvs = tyvars- , cpt_dicts = evs- , cpt_binds = binds- , cpt_wrap = wrapper- , cpt_arg_tys = tys- })- })- = assert (all isImmutableTyVar tyvars) $- do { new_tys <- mapM (zonkTcTypeToTypeX env) tys- ; (env0, new_tyvars) <- zonkTyBndrsX env tyvars- -- Must zonk the existential variables, because their- -- /kind/ need potential zonking.- -- cf typecheck/should_compile/tc221.hs- ; (env1, new_evs) <- zonkEvBndrsX env0 evs- ; (env2, new_binds) <- zonkTcEvBinds env1 binds- ; (env3, new_wrapper) <- zonkCoFn env2 wrapper- ; (env', new_args) <- zonkConStuff env3 args- ; pure ( env'- , p- { pat_args = new_args- , pat_con_ext = p'- { cpt_arg_tys = new_tys- , cpt_tvs = new_tyvars- , cpt_dicts = new_evs- , cpt_binds = new_binds- , cpt_wrap = new_wrapper- }- }- )- }--zonk_pat env (LitPat x lit) = return (env, LitPat x lit)--zonk_pat env (SigPat ty pat hs_ty)- = do { ty' <- zonkTcTypeToTypeX env ty- ; (env', pat') <- zonkPat env pat- ; return (env', SigPat ty' pat' hs_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)- Just n -> second Just <$> zonkSyntaxExpr env1 n-- ; lit' <- zonkOverLit env2 lit- ; ty' <- zonkTcTypeToTypeX env2 ty- ; return (env2, NPat ty' (L l lit') mb_neg' eq_expr') }--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- ; lit1' <- zonkOverLit env2 lit1- ; lit2' <- zonkOverLit env2 lit2- ; ty' <- zonkTcTypeToTypeX env2 ty- ; return (extendIdZonkEnv env2 n',- NPlusKPat ty' (L loc n') (L l lit1') lit2' e1' e2') }-zonk_pat env (XPat ext) = case ext of- { ExpansionPat orig pat->- do { (env, pat') <- zonk_pat env pat- ; return $ (env, XPat $ ExpansionPat orig pat') }- ; CoPat co_fn pat ty ->- do { (env', co_fn') <- zonkCoFn env co_fn- ; (env'', pat') <- zonkPat env' (noLocA pat)- ; ty' <- zonkTcTypeToTypeX env'' ty- ; return (env'', XPat $ CoPat co_fn' (unLoc pat') ty')- }}--zonk_pat _ pat = pprPanic "zonk_pat" (ppr pat)------------------------------zonkConStuff :: ZonkEnv -> HsConPatDetails GhcTc- -> TcM (ZonkEnv, HsConPatDetails GhcTc)-zonkConStuff env (PrefixCon tyargs pats)- = do { (env', pats') <- zonkPats env pats- ; return (env', PrefixCon tyargs pats') }--zonkConStuff env (InfixCon p1 p2)- = do { (env1, p1') <- zonkPat env p1- ; (env', p2') <- zonkPat env1 p2- ; return (env', InfixCon p1' p2') }--zonkConStuff env (RecCon (HsRecFields rpats dd))- = do { (env', pats') <- zonkPats env (map (hfbRHS . unLoc) rpats)- ; let rpats' = zipWith (\(L l rp) p' ->- L l (rp { hfbRHS = p' }))- rpats pats'- ; return (env', RecCon (HsRecFields rpats' dd)) }- -- Field selectors have declared types; hence no zonking------------------------------zonkPats :: ZonkEnv -> [LPat GhcTc] -> TcM (ZonkEnv, [LPat GhcTc])-zonkPats env [] = return (env, [])-zonkPats env (pat:pats) = do { (env1, pat') <- zonkPat env pat- ; (env', pats') <- zonkPats env1 pats- ; return (env', pat':pats') }--{--************************************************************************-* *-\subsection[BackSubst-Foreign]{Foreign exports}-* *-************************************************************************--}--zonkForeignExports :: ZonkEnv -> [LForeignDecl GhcTc]- -> TcM [LForeignDecl GhcTc]-zonkForeignExports env ls = mapM (wrapLocMA (zonkForeignExport env)) ls--zonkForeignExport :: ZonkEnv -> ForeignDecl GhcTc -> TcM (ForeignDecl GhcTc)-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_e_ext = co- , fd_fe = spec })-zonkForeignExport _ for_imp- = return for_imp -- Foreign imports don't need zonking--zonkRules :: ZonkEnv -> [LRuleDecl GhcTc] -> TcM [LRuleDecl GhcTc]-zonkRules env rs = mapM (wrapLocMA (zonkRule env)) rs--zonkRule :: ZonkEnv -> RuleDecl GhcTc -> TcM (RuleDecl GhcTc)-zonkRule env rule@(HsRule { rd_tmvs = tm_bndrs{-::[RuleBndr TcId]-}- , rd_lhs = lhs- , rd_rhs = rhs })- = do { (env_inside, new_tm_bndrs) <- mapAccumLM zonk_tm_bndr env tm_bndrs-- ; let env_lhs = setZonkType env_inside SkolemiseFlexi- -- See Note [Zonking the LHS of a RULE]-- ; new_lhs <- zonkLExpr env_lhs lhs- ; new_rhs <- zonkLExpr env_inside rhs-- ; return $ rule { rd_tmvs = new_tm_bndrs- , rd_lhs = new_lhs- , rd_rhs = new_rhs } }- where- zonk_tm_bndr :: ZonkEnv -> LRuleBndr GhcTc -> TcM (ZonkEnv, LRuleBndr GhcTc)- zonk_tm_bndr env (L l (RuleBndr x (L loc v)))- = do { (env', v') <- zonk_it env v- ; return (env', L l (RuleBndr x (L loc v'))) }- zonk_tm_bndr _ (L _ (RuleBndrSig {})) = panic "zonk_tm_bndr RuleBndrSig"-- zonk_it env v- | isId v = do { v' <- zonkIdBndr env v- ; return (extendIdZonkEnvRec env [v'], v') }- | otherwise = assert (isImmutableTyVar v)- zonkTyBndrX env v- -- 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!--{--************************************************************************-* *- Constraints and evidence-* *-************************************************************************--}--zonkEvTerm :: ZonkEnv -> EvTerm -> TcM EvTerm-zonkEvTerm env (EvExpr e)- = EvExpr <$> zonkCoreExpr env e-zonkEvTerm env (EvTypeable ty ev)- = EvTypeable <$> zonkTcTypeToTypeX 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 }) }--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 <$> zonkTcTypeToTypeX env ty--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' <- zonkTcTypeToTypeX env ty- b' <- zonkIdBndr env b- let env1 = extendIdZonkEnv env b'- alts' <- mapM (zonkCoreAlt env1) alts- return $ Case scrut' b' ty' alts'--zonkCoreAlt :: ZonkEnv -> CoreAlt -> TcM CoreAlt-zonkCoreAlt env (Alt dc bndrs rhs)- = do (env1, bndrs') <- zonkCoreBndrsX env bndrs- rhs' <- zonkCoreExpr env1 rhs- return $ Alt 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 = extendIdZonkEnv 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- ; return $ EvTypeableTyCon tycon e' }-zonkEvTypeable env (EvTypeableTyApp t1 t2)- = do { t1' <- zonkEvTerm env t1- ; t2' <- zonkEvTerm env t2- ; return (EvTypeableTyApp t1' t2') }-zonkEvTypeable env (EvTypeableTrFun tm t1 t2)- = do { tm' <- zonkEvTerm env tm- ; t1' <- zonkEvTerm env t1- ; t2' <- zonkEvTerm env t2- ; return (EvTypeableTrFun tm' t1' t2') }-zonkEvTypeable env (EvTypeableTyLit t1)- = do { t1' <- zonkEvTerm env t1- ; return (EvTypeableTyLit t1') }--zonkTcEvBinds_s :: ZonkEnv -> [TcEvBinds] -> TcM (ZonkEnv, [TcEvBinds])-zonkTcEvBinds_s env bs = do { (env, bs') <- mapAccumLM zonk_tc_ev_binds env bs- ; return (env, [EvBinds (unionManyBags bs')]) }--zonkTcEvBinds :: ZonkEnv -> TcEvBinds -> TcM (ZonkEnv, TcEvBinds)-zonkTcEvBinds env bs = do { (env', bs') <- zonk_tc_ev_binds env bs- ; return (env', EvBinds bs') }--zonk_tc_ev_binds :: ZonkEnv -> TcEvBinds -> TcM (ZonkEnv, Bag EvBind)-zonk_tc_ev_binds env (TcEvBinds var) = zonkEvBindsVar env var-zonk_tc_ev_binds env (EvBinds bs) = zonkEvBinds env bs--zonkEvBindsVar :: ZonkEnv -> EvBindsVar -> TcM (ZonkEnv, Bag EvBind)-zonkEvBindsVar env (EvBindsVar { ebv_binds = ref })- = do { bs <- readMutVar ref- ; zonkEvBinds env (evBindMapBinds bs) }-zonkEvBindsVar env (CoEvBindsVar {}) = return (env, emptyBag)--zonkEvBinds :: ZonkEnv -> Bag EvBind -> TcM (ZonkEnv, Bag EvBind)-zonkEvBinds env binds- = {-# SCC "zonkEvBinds" #-}- fixM (\ ~( _, new_binds) -> do- { let env1 = extendIdZonkEnvRec env (collect_ev_bndrs new_binds)- ; binds' <- mapBagM (zonkEvBind env1) binds- ; return (env1, binds') })- where- collect_ev_bndrs :: Bag EvBind -> [EvVar]- collect_ev_bndrs = foldr add []- add (EvBind { eb_lhs = var }) vars = var : vars--zonkEvBind :: ZonkEnv -> EvBind -> TcM EvBind-zonkEvBind env bind@(EvBind { eb_lhs = var, eb_rhs = term })- = do { var' <- {-# SCC "zonkEvBndr" #-} zonkEvBndr env var-- -- Optimise the common case of Refl coercions- -- See Note [Optimise coercion zonking]- -- This has a very big effect on some programs (eg #5030)-- ; term' <- case getEqPredTys_maybe (idType var') of- Just (r, ty1, ty2) | ty1 `eqType` ty2- -> return (evCoercion (mkReflCo r ty1))- _other -> zonkEvTerm env term-- ; return (bind { eb_lhs = var', eb_rhs = term' }) }--{- Note [Optimise coercion zonking]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When optimising evidence binds we may come across situations where-a coercion looks like- cv = ReflCo ty-or cv1 = cv2-where the type 'ty' is big. In such cases it is a waste of time to zonk both- * The variable on the LHS- * The coercion on the RHS-Rather, we can zonk the variable, and if its type is (ty ~ ty), we can just-use Refl on the right, ignoring the actual coercion on the RHS.--This can have a very big effect, because the constraint solver sometimes does go-to a lot of effort to prove Refl! (Eg when solving 10+3 = 10+3; cf #5030)---************************************************************************-* *- Zonking types-* *-************************************************************************--}--{- Note [Sharing when zonking to Type]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Problem:-- In GHC.Tc.Utils.TcMType.zonkTcTyVar, we short-circuit (Indirect ty) to- (Indirect zty), see Note [Sharing in zonking] in GHC.Tc.Utils.TcMType. But we- /can't/ do this when zonking a TcType to a Type (#15552, esp- comment:3). Suppose we have-- alpha -> alpha- where- alpha is already unified:- alpha := T{tc-tycon} Int -> Int- and T is knot-tied-- By "knot-tied" I mean that the occurrence of T is currently a TcTyCon,- but the global env contains a mapping "T" :-> T{knot-tied-tc}. See- Note [Type checking recursive type and class declarations] in- GHC.Tc.TyCl.-- Now we call zonkTcTypeToType on that (alpha -> alpha). If we follow- the same path as Note [Sharing in zonking] in GHC.Tc.Utils.TcMType, we'll- update alpha to- alpha := T{knot-tied-tc} Int -> Int-- But alas, if we encounter alpha for a /second/ time, we end up- looking at T{knot-tied-tc} and fall into a black hole. The whole- point of zonkTcTypeToType is that it produces a type full of- knot-tied tycons, and you must not look at the result!!-- To put it another way (zonkTcTypeToType . zonkTcTypeToType) is not- the same as zonkTcTypeToType. (If we distinguished TcType from- Type, this issue would have been a type error!)--Solutions: (see #15552 for other variants)--One possible solution is simply not to do the short-circuiting.-That has less sharing, but maybe sharing is rare. And indeed,-that usually turns out to be viable from a perf point of view--But zonkTyVarOcc implements something a bit better--* ZonkEnv contains ze_meta_tv_env, which maps- from a MetaTyVar (unification variable)- to a Type (not a TcType)--* In zonkTyVarOcc, we check this map to see if we have zonked- this variable before. If so, use the previous answer; if not- zonk it, and extend the map.--* The map is of course stateful, held in a TcRef. (That is unlike- the treatment of lexically-scoped variables in ze_tv_env and- ze_id_env.)--* In zonkTyVarOcc we read the TcRef to look up the unification- variable:- - if we get a hit we use the zonked result;- - if not, in zonk_meta we see if the variable is `Indirect ty`,- zonk that, and update the map (in finish_meta)- But Nota Bene that the "update map" step must re-read the TcRef- (or, more precisely, use updTcRef) because the zonking of the- `Indirect ty` may have added lots of stuff to the map. See- #19668 for an example where this made an asymptotic difference!--Is it worth the extra work of carrying ze_meta_tv_env? Some-non-systematic perf measurements suggest that compiler allocation is-reduced overall (by 0.5% or so) but compile time really doesn't-change. But in some cases it makes a HUGE difference: see test-T9198 and #19668. So yes, it seems worth it.--}--zonkTyVarOcc :: HasDebugCallStack => ZonkEnv -> TcTyVar -> TcM Type-zonkTyVarOcc env@(ZonkEnv { ze_flexi = flexi- , ze_tv_env = tv_env- , ze_meta_tv_env = mtv_env_ref }) tv- | isTcTyVar tv- = case tcTyVarDetails tv of- SkolemTv {} -> lookup_in_tv_env- RuntimeUnk {} -> lookup_in_tv_env- MetaTv { mtv_ref = ref }- -> do { mtv_env <- readTcRef mtv_env_ref- -- See Note [Sharing when zonking to Type]- ; case lookupVarEnv mtv_env tv of- Just ty -> return ty- Nothing -> do { mtv_details <- readTcRef ref- ; zonk_meta ref mtv_details } }- | otherwise -- This should never really happen;- -- TyVars should not occur in the typechecker- = lookup_in_tv_env-- where- lookup_in_tv_env -- Look up in the env just as we do for Ids- = case lookupVarEnv tv_env tv of- Nothing -> -- TyVar/SkolemTv/RuntimeUnk that isn't in the ZonkEnv- -- This can happen for RuntimeUnk variables (which- -- should stay as RuntimeUnk), but I think it should- -- not happen for SkolemTv.- mkTyVarTy <$> updateTyVarKindM (zonkTcTypeToTypeX env) tv-- Just tv' -> return (mkTyVarTy tv')-- zonk_meta ref Flexi- = do { kind <- zonkTcTypeToTypeX env (tyVarKind tv)- ; ty <- commitFlexi flexi tv kind- ; writeMetaTyVarRef tv ref ty -- Belt and braces- ; finish_meta ty }-- zonk_meta _ (Indirect ty)- = do { zty <- zonkTcTypeToTypeX env ty- ; finish_meta zty }-- finish_meta ty- = do { updTcRef mtv_env_ref (\env -> extendVarEnv env tv ty)- ; return ty }--lookupTyVarX :: ZonkEnv -> TcTyVar -> TyVar-lookupTyVarX (ZonkEnv { ze_tv_env = tv_env }) tv- = case lookupVarEnv tv_env tv of- Just tv -> tv- Nothing -> pprPanic "lookupTyVarOcc" (ppr tv $$ ppr tv_env)--commitFlexi :: ZonkFlexi -> TcTyVar -> Kind -> TcM Type--- Only monadic so we can do tc-tracing-commitFlexi flexi tv zonked_kind- = case flexi of- SkolemiseFlexi -> return (mkTyVarTy (mkTyVar name zonked_kind))-- DefaultFlexi- -- Normally, RuntimeRep variables are defaulted in TcMType.defaultTyVar- -- But that sees only type variables that appear in, say, an inferred type- -- Defaulting here in the zonker is needed to catch e.g.- -- y :: Bool- -- y = (\x -> True) undefined- -- We need *some* known RuntimeRep for the x and undefined, but no one- -- will choose it until we get here, in the zonker.- | isRuntimeRepTy zonked_kind- -> do { traceTc "Defaulting flexi tyvar to LiftedRep:" (pprTyVar tv)- ; return liftedRepTy }- | isLevityTy zonked_kind- -> do { traceTc "Defaulting flexi tyvar to Lifted:" (pprTyVar tv)- ; return liftedDataConTy }- | isMultiplicityTy zonked_kind- -> do { traceTc "Defaulting flexi tyvar to Many:" (pprTyVar tv)- ; return manyDataConTy }- | Just (ConcreteFRR origin) <- isConcreteTyVar_maybe tv- -> do { addErr $ TcRnCannotDefaultConcrete origin- ; return (anyTypeOfKind zonked_kind) }- | otherwise- -> do { traceTc "Defaulting flexi tyvar to Any:" (pprTyVar tv)- ; return (anyTypeOfKind zonked_kind) }-- RuntimeUnkFlexi- -> do { traceTc "Defaulting flexi tyvar to RuntimeUnk:" (pprTyVar tv)- ; return (mkTyVarTy (mkTcTyVar name zonked_kind RuntimeUnk)) }- -- This is where RuntimeUnks are born:- -- otherwise-unconstrained unification variables are- -- turned into RuntimeUnks as they leave the- -- typechecker's monad-- NoFlexi -> pprPanic "NoFlexi" (ppr tv <+> dcolon <+> ppr zonked_kind)-- where- name = tyVarName tv--zonkCoVarOcc :: ZonkEnv -> CoVar -> TcM Coercion-zonkCoVarOcc (ZonkEnv { ze_tv_env = tyco_env }) cv- | Just cv' <- lookupVarEnv tyco_env cv -- don't look in the knot-tied env- = return $ mkCoVarCo cv'- | otherwise- = do { cv' <- zonkCoVar cv; return (mkCoVarCo cv') }--zonkCoHole :: ZonkEnv -> CoercionHole -> TcM Coercion-zonkCoHole env hole@(CoercionHole { ch_ref = ref, ch_co_var = cv })- = do { contents <- readTcRef ref- ; case contents of- Just co -> do { co' <- zonkCoToCo env co- ; checkCoercionHole cv co' }-- -- This next case should happen only in the presence of- -- (undeferred) type errors. Originally, I put in a panic- -- here, but that caused too many uses of `failIfErrsM`.- Nothing -> do { traceTc "Zonking unfilled coercion hole" (ppr hole)- ; cv' <- zonkCoVar cv- ; return $ mkCoVarCo cv' } }- -- This will be an out-of-scope variable, but keeping- -- this as a coercion hole led to #15787--zonk_tycomapper :: TyCoMapper ZonkEnv TcM-zonk_tycomapper = TyCoMapper- { tcm_tyvar = zonkTyVarOcc- , tcm_covar = zonkCoVarOcc- , tcm_hole = zonkCoHole- , tcm_tycobinder = \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 GHC.Tc.Utils.TcMType.-zonkTcTypeToType :: TcType -> TcM Type-zonkTcTypeToType ty = initZonkEnv $ \ ze -> zonkTcTypeToTypeX ze ty--zonkScaledTcTypeToTypeX :: ZonkEnv -> Scaled TcType -> TcM (Scaled TcType)-zonkScaledTcTypeToTypeX env (Scaled m ty) = Scaled <$> zonkTcTypeToTypeX env m- <*> zonkTcTypeToTypeX env ty--zonkTcTypeToTypeX :: ZonkEnv -> TcType -> TcM Type-zonkTcTypesToTypesX :: ZonkEnv -> [TcType] -> TcM [Type]-zonkCoToCo :: ZonkEnv -> Coercion -> TcM Coercion-(zonkTcTypeToTypeX, zonkTcTypesToTypesX, zonkCoToCo, _)- = mapTyCoX zonk_tycomapper--zonkScaledTcTypesToTypesX :: ZonkEnv -> [Scaled TcType] -> TcM [Scaled Type]-zonkScaledTcTypesToTypesX env scaled_tys =- mapM (zonkScaledTcTypeToTypeX env) scaled_tys--zonkTcMethInfoToMethInfoX :: ZonkEnv -> TcMethInfo -> TcM MethInfo-zonkTcMethInfoToMethInfoX ze (name, ty, gdm_spec)- = do { ty' <- zonkTcTypeToTypeX ze ty- ; gdm_spec' <- zonk_gdm gdm_spec- ; return (name, ty', gdm_spec') }- where- 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' <- zonkTcTypeToTypeX ze ty- ; return (Just (GenericDM (loc, ty'))) }------------------------------------------{- Note [Zonking the LHS of a RULE]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See also GHC.HsToCore.Binds Note [Free tyvars on rule LHS]--We need to gather the type variables mentioned on the LHS so we can-quantify over them. Example:- data T a = C-- foo :: T a -> Int- foo C = 1-- {-# RULES "myrule" foo C = 1 #-}--After type checking the LHS becomes (foo alpha (C alpha)) and we do-not want to zap the unbound meta-tyvar 'alpha' to Any, because that-limits the applicability of the rule. Instead, we want to quantify-over it!--We do this in two stages.--* During zonking, we skolemise the TcTyVar 'alpha' to TyVar 'a'. We- do this by using zonkTvSkolemising as the UnboundTyVarZonker in the- ZonkEnv. (This is in fact the whole reason that the ZonkEnv has a- UnboundTyVarZonker.)--* In GHC.HsToCore.Binds, we quantify over it. See GHC.HsToCore.Binds- Note [Free tyvars on rule LHS]--Quantifying here is awkward because (a) the data type is big and (b)-finding the free type vars of an expression is necessarily monadic-operation. (consider /\a -> f @ b, where b is side-effected to a)--}
GHC/Tc/Validity.hs view
@@ -15,7 +15,6 @@ checkTySynRhs, checkEscapingKind, checkValidCoAxiom, checkValidCoAxBranch, checkValidTyFamEqn, checkValidAssocTyFamDeflt, checkConsistentFamInst,- arityErr, checkTyConTelescope, ) where @@ -27,22 +26,22 @@ -- friends: import GHC.Tc.Utils.Unify ( tcSubTypeAmbiguity ) import GHC.Tc.Solver ( simplifyAmbiguityCheck )-import GHC.Tc.Instance.Class ( matchGlobalInst, ClsInstResult(..), InstanceWhat(..), AssocInstInfo(..) )+import GHC.Tc.Instance.Class ( matchGlobalInst, ClsInstResult(..), AssocInstInfo(..) ) import GHC.Tc.Utils.TcType import GHC.Tc.Types.Origin import GHC.Tc.Types.Rank import GHC.Tc.Errors.Types import GHC.Tc.Utils.Monad-import GHC.Tc.Utils.Env ( tcInitTidyEnv, tcInitOpenTidyEnv ) import GHC.Tc.Instance.FunDeps import GHC.Tc.Instance.Family+import GHC.Tc.Zonk.TcType import GHC.Builtin.Types import GHC.Builtin.Names import GHC.Builtin.Uniques ( mkAlphaTyVarUnique ) import GHC.Core.Type-import GHC.Core.Unify ( tcMatchTyX_BM, BindFlag(..) )+import GHC.Core.Unify ( typesAreApart, tcMatchTyX_BM, BindFlag(..) ) import GHC.Core.Coercion import GHC.Core.Coercion.Axiom import GHC.Core.Class@@ -54,8 +53,6 @@ import GHC.Core.FamInstEnv ( isDominatedBy, injectiveBranches , InjectivityCheckResult(..) ) -import GHC.Iface.Type ( pprIfaceType, pprIfaceTypeApp )-import GHC.CoreToIface ( toIfaceTyCon, toIfaceTcArgs, toIfaceType ) import GHC.Hs import GHC.Driver.Session import qualified GHC.LanguageExtensions as LangExt@@ -65,8 +62,10 @@ import GHC.Types.Name import GHC.Types.Var.Env import GHC.Types.Var.Set-import GHC.Types.Var ( VarBndr(..), isInvisibleFunArg, mkTyVar )+import GHC.Types.Var ( VarBndr(..), isInvisibleFunArg, mkTyVar, tyVarName )+import GHC.Types.SourceFile import GHC.Types.SrcLoc+import GHC.Types.TyThing ( TyThing(..) ) import GHC.Types.Unique.Set( isEmptyUniqSet ) import GHC.Utils.FV@@ -83,7 +82,6 @@ import Data.Foldable import Data.Function import Data.List ( (\\) )-import qualified Data.List.NonEmpty as NE {- ************************************************************************@@ -232,19 +230,20 @@ checkAmbiguity :: UserTypeCtxt -> Type -> TcM () checkAmbiguity ctxt ty | wantAmbiguityCheck ctxt- = do { traceTc "Ambiguity check for" (ppr ty)+ = do { traceTc "Ambiguity check for {" (ppr ty) -- Solve the constraints eagerly because an ambiguous type -- can cause a cascade of further errors. Since the free -- tyvars are skolemised, we can safely use tcSimplifyTop ; allow_ambiguous <- xoptM LangExt.AllowAmbiguousTypes- ; (_wrap, wanted) <- addErrCtxt (mk_msg allow_ambiguous) $- captureConstraints $- tcSubTypeAmbiguity ctxt ty ty- -- See Note [Ambiguity check and deep subsumption]- -- in GHC.Tc.Utils.Unify- ; simplifyAmbiguityCheck ty wanted+ ; unless allow_ambiguous $+ do { (_wrap, wanted) <- addErrCtxt (mk_msg allow_ambiguous) $+ captureConstraints $+ tcSubTypeAmbiguity ctxt ty ty+ -- See Note [Ambiguity check and deep subsumption]+ -- in GHC.Tc.Utils.Unify+ ; simplifyAmbiguityCheck ty wanted } - ; traceTc "Done ambiguity check for" (ppr ty) }+ ; traceTc "} Done ambiguity check for" (ppr ty) } | otherwise = return ()@@ -296,7 +295,7 @@ -- inside type family arguments (see #20241). fail_with :: Type -> TcM ()- fail_with msg = do { env0 <- tcInitTidyEnv+ fail_with msg = do { env0 <- liftZonkM tcInitTidyEnv ; let (env1, tidy_msg) = tidyOpenType env0 msg ; failWithTcM (env1, TcRnUserTypeError tidy_msg) }@@ -419,7 +418,7 @@ _ -> panic "checkValidType" -- Can't happen; not used for *user* sigs - ; env <- tcInitOpenTidyEnv (tyCoVarsOfTypeList ty)+ ; env <- liftZonkM $ tcInitOpenTidyEnv (tyCoVarsOfTypeList ty) ; expand <- initialExpandMode ; let ve = ValidityEnv{ ve_tidy_env = env, ve_ctxt = ctxt , ve_rank = rank, ve_expand = expand }@@ -442,7 +441,7 @@ checkValidMonoType :: Type -> TcM () -- Assumes argument is fully zonked checkValidMonoType ty- = do { env <- tcInitOpenTidyEnv (tyCoVarsOfTypeList ty)+ = do { env <- liftZonkM $ tcInitOpenTidyEnv (tyCoVarsOfTypeList ty) ; expand <- initialExpandMode ; let ve = ValidityEnv{ ve_tidy_env = env, ve_ctxt = SigmaCtxt , ve_rank = MustBeMonoType, ve_expand = expand }@@ -475,7 +474,7 @@ MkT :: forall l. T @l :: TYPE (BoxedRep l) which is ill-kinded. -For ordinary /user-written type signatures f :: blah, we make this+For ordinary /user-written/ type signatures f :: blah, we make this check as part of kind-checking the type signature in tcHsSigType; see Note [Escaping kind in type signatures] in GHC.Tc.Gen.HsType. @@ -571,6 +570,8 @@ typeOrKindCtxt (TySynKindCtxt {}) = OnlyKindCtxt typeOrKindCtxt (TyFamResKindCtxt {}) = OnlyKindCtxt +-- These cases are also described in Note [No constraints in kinds], so any+-- change here should be reflected in that note. typeOrKindCtxt (TySynCtxt {}) = BothTypeAndKindCtxt -- Type synonyms can have types and kinds on their RHSs typeOrKindCtxt (GhciCtxt {}) = BothTypeAndKindCtxt@@ -594,7 +595,6 @@ -- | Returns 'True' if the supplied 'UserTypeCtxt' is unambiguously not the -- context for a kind of a type, where the arbitrary use of constraints is -- currently disallowed.--- (See @Note [Constraints in kinds]@ in "GHC.Core.TyCo.Rep".) allConstraintsAllowed :: UserTypeCtxt -> Bool allConstraintsAllowed = typeLevelUserTypeCtxt @@ -827,7 +827,8 @@ where (arg_rank, res_rank) = funArgResRank rank -check_type _ ty = pprPanic "check_type" (ppr ty)+check_type _ ty@(ForAllTy {}) = pprPanic "check_type" (ppr ty)+check_type _ ty@(CoercionTy {}) = pprPanic "check_type" (ppr ty) ---------------------------------------- check_syn_tc_app :: ValidityEnv@@ -985,10 +986,9 @@ checkConstraintsOK ve theta ty | null theta = return () | allConstraintsAllowed (ve_ctxt ve) = return ()- | otherwise- = -- We are in a kind, where we allow only equality predicates- -- See Note [Constraints in kinds] in GHC.Core.TyCo.Rep, and #16263- checkTcM (all isEqPred theta) (env, TcRnConstraintInKind (tidyType env ty))+ | otherwise -- We are unambiguously in a kind; see+ -- Note [No constraints in kinds]+ = failWithTcM (env, TcRnConstraintInKind (tidyType env ty)) where env = ve_tidy_env ve checkVdqOK :: ValidityEnv -> [TyVarBinder] -> Type -> TcM ()@@ -999,7 +999,25 @@ no_vdq = all (isInvisibleForAllTyFlag . binderFlag) tvbs ValidityEnv{ve_tidy_env = env, ve_ctxt = ctxt} = ve -{-+{- Note [No constraints in kinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+GHC does not allow constraints in kinds. Equality constraints+in kinds were allowed from GHC 8.0, but this "feature" was removed+as part of Proposal #547 (https://github.com/ghc-proposals/ghc-proposals/pull/547),+which contains further context and motivation for the removal.++The lack of constraints in kinds is enforced by checkConstraintsOK, which+uses the UserTypeCtxt to determine if we are unambiguously checking a kind.+There are two ambiguous contexts (constructor BothTypeAndKindCtxt of TypeOrKindCtxt)+as written in typeOfKindCtxt:+ - TySynCtxt: this is the RHS of a type synonym. We check the expansion of type+ synonyms for constraints, so this is handled at the usage site of the synonym.+ - GhciCtxt: This is the type in a :kind command. A constraint here does not cause+ any trouble, because the type cannot be used to classify a type.++Beyond these two cases, we also promote data constructors. We check for constraints+in data constructor types in GHC.Tc.Gen.HsType.tcTyVar.+ Note [Liberal type synonyms] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If -XLiberalTypeSynonyms is on, expand closed type synonyms *before*@@ -1077,7 +1095,7 @@ -- Assumes argument is fully zonked checkValidTheta ctxt theta = addErrCtxtM (checkThetaCtxt ctxt theta) $- do { env <- tcInitOpenTidyEnv (tyCoVarsOfTypesList theta)+ do { env <- liftZonkM $ tcInitOpenTidyEnv (tyCoVarsOfTypesList theta) ; expand <- initialExpandMode ; check_valid_theta env ctxt expand theta } @@ -1210,7 +1228,7 @@ check_class_pred :: TidyEnv -> DynFlags -> UserTypeCtxt -> PredType -> Class -> [TcType] -> TcM () check_class_pred env dflags ctxt pred cls tys- | isEqPredClass cls -- (~) and (~~) are classified as classes,+ | isEqualityClass cls -- (~) and (~~) and Coercible are classified as classes, -- but here we want to treat them as equalities = -- Equational constraints are valid in all contexts, and -- we do not need to check e.g. for FlexibleContexts here, so just do nothing@@ -1260,30 +1278,18 @@ = do { result <- matchGlobalInst dflags False cls tys ; case result of OneInst { cir_what = what }- -> let dia = mkTcRnUnknownMessage $- mkPlainDiagnostic (WarningWithFlag Opt_WarnSimplifiableClassConstraints)- noHints- (simplifiable_constraint_warn what)- in addDiagnosticTc dia- _ -> return () }+ -> addDiagnosticTc (TcRnSimplifiableConstraint pred what)+ _ -> return () } where- pred = mkClassPred cls tys-- simplifiable_constraint_warn :: InstanceWhat -> SDoc- simplifiable_constraint_warn what- = vcat [ hang (text "The constraint" <+> quotes (ppr (tidyType env pred))- <+> text "matches")- 2 (ppr what)- , hang (text "This makes type inference for inner bindings fragile;")- 2 (text "either use MonoLocalBinds, or simplify it using the instance") ]+ pred = tidyType env (mkClassPred cls tys) {- Note [Simplifiable given constraints] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A type signature like f :: Eq [(a,b)] => a -> b-is very fragile, for reasons described at length in GHC.Tc.Solver.Interact+is very fragile, for reasons described at length in GHC.Tc.Solver.Dict Note [Instance and Given overlap]. As that Note discusses, for the-most part the clever stuff in GHC.Tc.Solver.Interact means that we don't use a+most part the clever stuff in GHC.Tc.Solver.Dict means that we don't use a top-level instance if a local Given might fire, so there is no fragility. But if we /infer/ the type of a local let-binding, things can go wrong (#11948 is an example, discussed in the Note).@@ -1295,7 +1301,7 @@ The warning only fires if the constraint in the signature matches the top-level instances in only one way, and with no unifiers -- that is, under the same circumstances that-GHC.Tc.Solver.Interact.matchInstEnv fires an interaction with the top+GHC.Tc.Instance.Class.matchInstEnv fires an interaction with the top level instances. For example (#13526), consider instance {-# OVERLAPPABLE #-} Eq (T a) where ...@@ -1364,7 +1370,7 @@ generalized actually. -} -checkThetaCtxt :: UserTypeCtxt -> ThetaType -> TidyEnv -> TcM (TidyEnv, SDoc)+checkThetaCtxt :: UserTypeCtxt -> ThetaType -> TidyEnv -> ZonkM (TidyEnv, SDoc) checkThetaCtxt ctxt theta env = return ( env , vcat [ text "In the context:" <+> pprTheta (tidyTypes env theta)@@ -1376,8 +1382,7 @@ -- ignoring the /invisible/ arguments, which the user does not see. -- (e.g. #10516) tyConArityErr tc tks- = arityErr (ppr (tyConFlavour tc)) (tyConName tc)- tc_type_arity tc_type_args+ = TcRnArityMismatch (ATyCon tc) tc_type_arity tc_type_args where vis_tks = filterOutInvisibleTypes tc tks @@ -1386,17 +1391,6 @@ tc_type_arity = count isVisibleTyConBinder (tyConBinders tc) tc_type_args = length vis_tks -arityErr :: Outputable a => SDoc -> a -> Int -> Int -> TcRnMessage-arityErr what name n m- = mkTcRnUnknownMessage $ mkPlainError noHints $- hsep [ text "The" <+> what, quotes (ppr name), text "should have",- n_arguments <> comma, text "but has been given",- if m==0 then text "none" else int m]- where- n_arguments | n == 0 = text "no arguments"- | n == 1 = text "1 argument"- | True = hsep [int n, text "arguments"]- {- ************************************************************************ * *@@ -1417,9 +1411,8 @@ checkValidInstHead :: UserTypeCtxt -> Class -> [Type] -> TcM () checkValidInstHead ctxt clas cls_args = do { dflags <- getDynFlags- ; is_boot <- tcIsHsBootOrSig- ; is_sig <- tcIsHsig- ; check_special_inst_head dflags is_boot is_sig ctxt clas cls_args+ ; hsc_src <- tcHscSource+ ; check_special_inst_head dflags hsc_src ctxt clas cls_args ; checkValidTypePats (classTyCon clas) cls_args } @@ -1449,16 +1442,17 @@ -} -check_special_inst_head :: DynFlags -> Bool -> Bool- -> UserTypeCtxt -> Class -> [Type] -> TcM ()+check_special_inst_head :: DynFlags -> HscSource -> UserTypeCtxt+ -> Class -> [Type] -> TcM () -- Wow! There are a surprising number of ad-hoc special cases here. -- TODO: common up the logic for special typeclasses (see GHC ticket #20441).-check_special_inst_head dflags is_boot is_sig ctxt clas cls_args+check_special_inst_head dflags hs_src ctxt clas cls_args - -- If not in an hs-boot file, abstract classes cannot have instances+ -- Abstract classes cannot have instances, except in hs-boot or signature files. | isAbstractClass clas- , not is_boot- = failWithTc (TcRnAbstractClassInst clas)+ , hs_src == HsSrcFile+ = fail_with_inst_err $ IllegalInstanceHead+ $ InstHeadAbstractClass clas -- Complain about hand-written instances of built-in classes -- Typeable, KnownNat, KnownSymbol, Coercible, HasField.@@ -1467,31 +1461,34 @@ -- allow a standalone deriving declaration: they are no-ops, -- and we warn about them in GHC.Tc.Deriv.deriveStandalone. | clas_nm == typeableClassName- , not is_sig+ , not (hs_src == HsigFile) -- Note [Instances of built-in classes in signature files] , hand_written_bindings- = failWithTc $ TcRnSpecialClassInst clas False+ = fail_with_inst_err $ IllegalSpecialClassInstance clas False -- Handwritten instances of KnownNat/KnownChar/KnownSymbol -- are forbidden outside of signature files (#12837). -- Derived instances are forbidden completely (#21087). | clas_nm `elem` [ knownNatClassName, knownSymbolClassName, knownCharClassName ]- , (not is_sig && hand_written_bindings) || derived_instance+ , (not (hs_src == HsigFile) && hand_written_bindings) || derived_instance -- Note [Instances of built-in classes in signature files]- = failWithTc $ TcRnSpecialClassInst clas False+ = fail_with_inst_err $ IllegalSpecialClassInstance clas False -- For the most part we don't allow -- instances for (~), (~~), or Coercible; -- but we DO want to allow them in quantified constraints: -- f :: (forall a b. Coercible a b => Coercible (m a) (m b)) => ...m...- | clas_nm `elem` [ heqTyConName, eqTyConName, coercibleTyConName, withDictClassName ]+ | clas_nm `elem`+ [ heqTyConName, eqTyConName, coercibleTyConName+ , withDictClassName, unsatisfiableClassName ] , not quantified_constraint- = failWithTc $ TcRnSpecialClassInst clas False+ = fail_with_inst_err $ IllegalSpecialClassInstance clas False -- Check for hand-written Generic instances (disallowed in Safe Haskell) | clas_nm `elem` genericClassNames , hand_written_bindings- = do { failIfTc (safeLanguageOn dflags) (TcRnSpecialClassInst clas True)+ = do { when (safeLanguageOn dflags) $+ fail_with_inst_err $ IllegalSpecialClassInstance clas True ; when (safeInferOn dflags) (recordUnsafeInfer emptyMessages) } | clas_nm == hasFieldClassName@@ -1506,12 +1503,19 @@ -- Check language restrictions on the args to the class | check_h98_arg_shape- , Just msg <- mb_ty_args_msg- = failWithTc (instTypeErr clas cls_args msg)+ , Just illegal_head <- mb_ty_args_type+ = fail_with_inst_err $ IllegalInstanceHead illegal_head | otherwise = pure () where++ fail_with_inst_err err =+ failWithTc $ TcRnIllegalInstance+ $ IllegalClassInstance+ (TypeThing $ mkClassPred clas cls_args)+ $ err+ clas_nm = getName clas ty_args = filterOutInvisibleTypes (classTyCon clas) cls_args @@ -1545,34 +1549,19 @@ SigmaCtxt -> True _ -> False - head_type_synonym_msg = parens (- text "All instance types must be of the form (T t1 ... tn)" $$- text "where T is not a synonym." $$- text "Use TypeSynonymInstances if you want to disable this.")-- head_type_args_tyvars_msg = parens (vcat [- text "All instance types must be of the form (T a1 ... an)",- text "where a1 ... an are *distinct type variables*,",- text "and each type variable appears at most once in the instance head.",- text "Use FlexibleInstances if you want to disable this."])-- head_one_type_msg = parens $- text "Only one type can be given in an instance head." $$- text "Use MultiParamTypeClasses if you want to allow more, or zero."-- mb_ty_args_msg+ mb_ty_args_type | not (xopt LangExt.TypeSynonymInstances dflags) , not (all tcInstHeadTyNotSynonym ty_args)- = Just head_type_synonym_msg+ = Just InstHeadTySynArgs | not (xopt LangExt.FlexibleInstances dflags) , not (all tcInstHeadTyAppAllTyVars ty_args)- = Just head_type_args_tyvars_msg+ = Just InstHeadNonTyVarArgs | length ty_args /= 1 , not (xopt LangExt.MultiParamTypeClasses dflags) , not (xopt LangExt.NullaryTypeClasses dflags && null ty_args)- = Just head_one_type_msg+ = Just InstHeadMultiParam | otherwise = Nothing@@ -1629,32 +1618,38 @@ dropCastsB :: TyVarBinder -> TyVarBinder dropCastsB b = b -- Don't bother in the kind of a forall -instTypeErr :: Class -> [Type] -> SDoc -> TcRnMessage-instTypeErr cls tys msg- = mkTcRnUnknownMessage $ mkPlainError noHints $- hang (hang (text "Illegal instance declaration for")- 2 (quotes (pprClassPred cls tys)))- 2 msg- -- | See Note [Validity checking of HasField instances] checkHasFieldInst :: Class -> [Type] -> TcM ()-checkHasFieldInst cls tys@[_k_ty, x_ty, r_ty, _a_ty] =+checkHasFieldInst cls tys@[_k_ty, lbl_ty, r_ty, _a_ty] = case splitTyConApp_maybe r_ty of- Nothing -> whoops (text "Record data type must be specified")+ Nothing -> add_err IllegalHasFieldInstanceNotATyCon Just (tc, _) | isFamilyTyCon tc- -> whoops (text "Record data type may not be a data family")- | otherwise -> case isStrLitTy x_ty of+ -> add_err IllegalHasFieldInstanceFamilyTyCon+ | otherwise -> case isStrLitTy lbl_ty of Just lbl- | isJust (lookupTyConFieldLabel (FieldLabelString lbl) tc)- -> whoops (ppr tc <+> text "already has a field"- <+> quotes (ppr lbl))- | otherwise -> return ()+ | let lbl_str = FieldLabelString lbl+ , isJust (lookupTyConFieldLabel lbl_str tc)+ -> add_err $ IllegalHasFieldInstanceTyConHasField tc lbl_str+ | otherwise+ -> return () Nothing- | null (tyConFieldLabels tc) -> return ()- | otherwise -> whoops (ppr tc <+> text "has fields")+ -- If the label is not a literal, we need to ensure it can't unify+ -- with any of the field labels of the TyCon.+ | null (tyConFieldLabels tc)+ -- No field labels at all: nothing to check.+ || typesAreApart (typeKind lbl_ty) typeSymbolKind+ -- If the label has a type whose kind can't unify with Symbol,+ -- then it definitely can't unify with any of the field labels.+ -> return ()+ | otherwise+ -> add_err $ IllegalHasFieldInstanceTyConHasFields tc lbl_ty where- whoops = addErrTc . instTypeErr cls tys+ add_err err = addErrTc $ TcRnIllegalInstance+ $ IllegalClassInstance+ (TypeThing $ mkClassPred cls tys)+ $ IllegalHasFieldInstance err+ checkHasFieldInst _ tys = pprPanic "checkHasFieldInst" (ppr tys) {- Note [Casts during validity checking]@@ -1675,7 +1670,7 @@ Note [Validity checking of HasField instances] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The HasField class has magic constraint solving behaviour (see Note-[HasField instances] in GHC.Tc.Solver.Interact). However, we permit users to+[HasField instances] in GHC.Tc.Instance.Class). However, we permit users to declare their own instances, provided they do not clash with the built-in behaviour. In particular, we forbid: @@ -1694,35 +1689,166 @@ Note [Valid 'deriving' predicate] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-validDerivPred checks for OK 'deriving' context.-See Note [Exotic derived instance contexts] in GHC.Tc.Deriv.Infer. However the predicate is-here because it is quite similar to checkInstTermination.+In a 'derived' instance declaration, we *infer* the context. It's a bit unclear+what rules we should apply for this; the Haskell report is silent. Obviously,+constraints like `Eq a` are fine, but what about -It checks for two things:+ data T f a = MkT (f a) deriving Eq -(VD1) The Paterson conditions; see Note [Paterson conditions]- Not on do we want to check for termination (of course), but it also- deals with a nasty corner case:- instance C a b => D (T a) where ...- Note that 'b' isn't a parameter of T. This gives rise to all sorts of- problems; in particular, it's hard to compare solutions for equality- when finding the fixpoint, and that means the inferContext loop does- not converge. See #5287, #21302+where we'd get an `Eq (f a)` constraint. That's probably fine too. -(VD2) No type constructors; no foralls, no equalities:- see Note [Exotic derived instance contexts] in GHC.Tc.Deriv.Infer+On the other hand, we don't want to allow *every* inferred constraint, as there+are some particularly complex constraints that are tricky to handle. If GHC+encounters a constraint that is too complex, it will reject it, and you will+have to use StandaloneDeriving to manually specify the instance context that+you want. - We check the no-type-constructor bit using tyConsOfType.- Wrinkle: we look only at the /visible/ arguments of the class type- constructor. Including the non-visible arguments can cause the following,- perfectly valid instance to be rejected:- class Category (cat :: k -> k -> *) where ...- newtype T (c :: * -> * -> *) a b = MkT (c a b)- instance Category c => Category (T c) where ...- since the first argument to Category is a non-visible *, which has a- type constructor! See #11833.+There are two criteria for a constraint inferred by a `deriving` clause to be+considered valid, which are described below as (VD1) and (VD2). (Here, "VD"+stands for "valid deriving".) `validDerivPred` implements these checks. While+`validDerivPred` is similar to other things defined in GHC.Tc.Deriv.Infer, we+define it here in GHC.Tc.Validity because it is quite similar to+`checkInstTermination`. +-----------------------------------+-- (VD1) The Paterson conditions --+----------------------------------- +Constraints must satisfy the Paterson conditions (see Note [Paterson+conditions]) to be valid. Not only does this check for termination (of course),+but it also deals with a nasty corner case:++ instance C a b => D (T a) where ...++Note that `b` isn't a parameter of T. This gives rise to all sorts of+problems; in particular, it's hard to compare solutions for equality when+finding the fixpoint, and that means the+GHC.Tc.Deriv.Infer.simplifyInstanceContexts loop does not converge.+See #5287 and #21302.++Another common situation in which a derived instance's context fails to meet+the Paterson conditions is when a constraint mentions a type variable more+often than the instance head, e.g.,++ data Fix f = In (f (Fix f)) deriving Eq++This would result in the following derived `Eq` instance:++ instance Eq (f (Fix f)) => Eq (Fix f)++Because `f` is mentioned more often in the `Eq (f (Fix f))` constraint than in+the instance head `Eq (Fix f)`, GHC rejects this instance.++This is a somewhat contentious restriction, and some have suggested that+instances like this one should be accepted if UndecidableInstances is enabled+(see #15868 for one such discussion). If we *do* lift this restriction in the+future, we should make sure to still meet the termination conditions. If not,+the deriving mechanism generates larger and larger constraints. Example:++ data Succ a = S a+ data Seq a = Cons a (Seq (Succ a)) | Nil deriving Show++Note the lack of a Show instance for Succ. First we'll generate:++ instance (Show (Succ a), Show a) => Show (Seq a)++and then:++ instance (Show (Succ (Succ a)), Show (Succ a), Show a) => Show (Seq a)++and so on. Instead we want to complain of no instance for (Show (Succ a)).++---------------------------------+-- (VD2) No exotic constraints --+---------------------------------++A constraint must satisfy one of the following properties in order to be valid:++* It is a `ClassPred` of the form `C a_1 ... a_n`, where C is a type class+ constructor and a_1, ..., a_n are either raw type variables or applications+ of type variables (e.g., `f a`).+* It is an `IrredPred` of the form `c a_1 ... a_n`, where `c` is a raw type+ variable and a_1, ..., a_n are either raw type variables or applications of+ type variables (e.g., `f a`).++If a constraint does not meet either of these properties, it is considered+*exotic*. A constraint will be exotic if it contains:++* Other type constructors (besides the class in a `ClassPred`),+* Foralls, or+* Equalities++A common form of exotic constraint is one that mentions another type+constructor. For example, given the following:++ data NotAShowInstance+ data Foo = MkFoo Int NotAShowInstance deriving Show++GHC would attempt to generate the following derived `Show` instance:++ instance (Show Int, Show NotAShowInstance) => Show Foo++Note that because there is a top-level `Show Int` instance, GHC is able to+simplify away the inferred `Show Int` constraint. However, it cannot do the+same for the `Show NotAShowInstance` constraint. One possibility would be to+generate this instance:++ instance Show NotAShowInstance => Show Foo++But this is almost surely not what we want most of the time. For this reason,+we reject the constraint above as being exotic.++Here are some other interesting examples:++* Derived instances whose instance context would mention TypeError, such as the+ code from the deriving/should_fail/T14339 test case, are exotic. For example:++ newtype Foo = Foo Int++ class Bar a where+ bar :: a++ instance (TypeError (Text "Boo")) => Bar Foo where+ bar = undefined++ newtype Baz = Baz Foo+ deriving Bar++ The `deriving Bar` clause would generate this instance:++ instance TypeError (Text "Boo") => Bar Baz++ The instance context is exotic, as `TypeError` is not a type constructor, and+ `Text "Boo"` is not an application of type variables. As such, GHC rejects+ it. This has the desirable side effect of causing the TypeError to fire in+ the resulting error message.++* The following `IrredPred`s are not exotic:++ instance c => C (T c a)+ instance c a => C (T c a)++ This `IrredPred`, however, *is* exotic:++ instance c NotAShowInstance => C (T c)++ This is rejected for the same reasons that we do not permit a `ClassPred`+ with a type constructor argument, such as the `Show NotAShowInstance` example+ above.++As part of implementing this check, GHC calls `tyConsOfType` on the arguments+of the constraint, ensuring that there are no other type constructors.+Wrinkle: for `ClassPred`s, we look only at the /visible/ arguments of the class+type constructor. Including the non-visible arguments can cause the following,+perfectly valid instance to be rejected:++ class Category (cat :: k -> k -> Type) where ...+ newtype T (c :: Type -> Type -> Type) a b = MkT (c a b)+ instance Category c => Category (T c) where ...++since the first argument to `Category` is a non-visible `Type`, which has a type+constructor! See #11833.+ Note [Equality class instances] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We can't have users writing instances for the equality classes. But we@@ -1734,23 +1860,17 @@ -- See Note [Valid 'deriving' predicate] validDerivPred head_size pred = case classifyPredType pred of- EqPred {} -> False -- Reject equality constraints- ForAllPred {} -> False -- Rejects quantified predicates+ EqPred {} -> False -- Reject equality constraints (VD2)+ ForAllPred {} -> False -- Rejects quantified predicates (VD2) - ClassPred cls tys -> check_size (pSizeClassPred cls tys)- && isEmptyUniqSet (tyConsOfTypes visible_tys)+ ClassPred cls tys -> check_size (pSizeClassPred cls tys) -- (VD1)+ && isEmptyUniqSet (tyConsOfTypes visible_tys) -- (VD2) where- visible_tys = filterOutInvisibleTypes (classTyCon cls) tys -- (VD2)+ -- See the wrinkle about visible arguments in (VD2)+ visible_tys = filterOutInvisibleTypes (classTyCon cls) tys - IrredPred {} -> check_size (pSizeType pred)- -- Very important that we do the "too many variable occurrences"- -- check here, via check_size. Example (test T21302):- -- instance c Eq a => Eq (BoxAssoc a)- -- data BAD = BAD (BoxAssoc Int) deriving( Eq )- -- We don't want to accept an inferred predicate (c0 Eq Int)- -- from that `deriving(Eq)` clause, because the c0 is fresh,- -- so we'll think it's a "new" one, and loop in- -- GHC.Tc.Deriv.Infer.simplifyInstanceContexts+ IrredPred {} -> check_size (pSizeType pred) -- (VD1)+ && isEmptyUniqSet (tyConsOfType pred) -- (VD2) where check_size pred_size = isNothing (pred_size `ltPatersonSize` head_size)@@ -1834,15 +1954,15 @@ checkValidInstance :: UserTypeCtxt -> LHsSigType GhcRn -> Type -> TcM () checkValidInstance ctxt hs_type ty = case tau of -- See Note [Instances and constraint synonyms]- TyConApp tc inst_tys -> case tyConClass_maybe tc of- Nothing -> failWithTc (TcRnIllegalClassInst (tyConFlavour tc))- Just clas -> do+ TyConApp tc inst_tys+ | Just clas <- tyConClass_maybe tc+ -> do { setSrcSpanA head_loc $ checkValidInstHead ctxt clas inst_tys ; traceTc "checkValidInstance {" (ppr ty) - ; env0 <- tcInitTidyEnv+ ; env0 <- liftZonkM $ tcInitTidyEnv ; expand <- initialExpandMode ; check_valid_theta env0 ctxt expand theta @@ -1863,17 +1983,25 @@ ; traceTc "cvi 2" (ppr ty) - ; case (checkInstCoverage undecidable_ok clas theta inst_tys) of- IsValid -> return () -- Check succeeded- NotValid msg -> addErrTc (instTypeErr clas inst_tys msg)-- ; traceTc "End checkValidInstance }" empty+ ; case checkInstCoverage undecidable_ok clas theta inst_tys of+ IsValid+ -> return () -- Check succeeded+ NotValid coverageInstErr+ -> addErrTc $ mk_err+ $ IllegalInstanceFailsCoverageCondition clas coverageInstErr - ; return () }- _ -> failWithTc (TcRnNoClassInstHead tau)+ ; traceTc "End checkValidInstance }" empty }+ | otherwise+ -> failWithTc $ mk_err $ IllegalInstanceHead+ $ InstHeadNonClass (Just tc)+ _ -> failWithTc $ mk_err $ IllegalInstanceHead+ $ InstHeadNonClass Nothing where (theta, tau) = splitInstTyForValidity ty + mk_err err = TcRnIllegalInstance+ $ IllegalClassInstance (TypeThing tau) err+ -- The location of the "head" of the instance head_loc = getLoc (getLHsInstDeclHead hs_type) @@ -1934,40 +2062,9 @@ where check2 pred_size = case pred_size `ltPatersonSize` head_size of- Just ps_failure -> failWithTc $ mkInstSizeError ps_failure head_pred pred+ Just pc_failure -> failWithTc $ TcRnPatersonCondFailure pc_failure InInstanceDecl pred head_pred Nothing -> return () --mkInstSizeError :: PatersonSizeFailure -> TcPredType -> TcPredType -> TcRnMessage-mkInstSizeError ps_failure head_pred pred- = mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ main_msg- , parens undecidableMsg ]- where- pp_head = text "instance head" <+> quotes (ppr head_pred)- pp_pred = text "constraint" <+> quotes (ppr pred)-- main_msg = case ps_failure of- PSF_TyFam tc -> -- See (PC3) of Note [Paterson conditions]- hang (text "Illegal use of type family" <+> quotes (ppr tc))- 2 (text "in the" <+> pp_pred)- PSF_TyVar tvs -> hang (occMsg tvs)- 2 (sep [ text "in the" <+> pp_pred- , text "than in the" <+> pp_head ])- PSF_Size -> hang (text "The" <+> pp_pred)- 2 (sep [ text "is no smaller than", text "the" <+> pp_head ])--occMsg :: [TyVar] -> SDoc-occMsg tvs = text "Variable" <> plural tvs <+> quotes (pprWithCommas ppr tvs)- <+> pp_occurs <+> text "more often"- where- pp_occurs | isSingleton tvs = text "occurs"- | otherwise = text "occur"--undecidableMsg :: SDoc-undecidableMsg = text "Use UndecidableInstances to permit this"-- {- Note [Instances and constraint synonyms] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Currently, we don't allow instances for constraint synonyms at all.@@ -2022,8 +2119,7 @@ -- (b) failure of injectivity check_branch_compat prev_branches cur_branch | cur_branch `isDominatedBy` prev_branches- = do { let dia = mkTcRnUnknownMessage $- mkPlainDiagnostic WarningWithoutFlag noHints (inaccessibleCoAxBranch fam_tc cur_branch)+ = do { let dia = TcRnInaccessibleCoAxBranch fam_tc cur_branch ; addDiagnosticAt (coAxBranchSpan cur_branch) dia ; return prev_branches } | otherwise@@ -2139,10 +2235,11 @@ extract_tv pat pat_vis = case getTyVar_maybe pat of Just tv -> pure tv- Nothing -> failWithTc $ mkTcRnUnknownMessage $ mkPlainError noHints $- pprWithExplicitKindsWhen (isInvisibleForAllTyFlag pat_vis) $- hang (text "Illegal argument" <+> quotes (ppr pat) <+> text "in:")- 2 (vcat [ppr_eqn, suggestion])+ Nothing -> failWithTc $ TcRnIllegalInstance+ $ IllegalFamilyInstance+ $ InvalidAssoc $ InvalidAssocDefault+ $ AssocDefaultBadArgs fam_tc pats+ $ AssocDefaultNonTyVarArg (pat, pat_vis) -- Checks that no type variables in an associated default declaration are -- duplicated. If that is the case, throw an error.@@ -2156,23 +2253,13 @@ check_all_distinct_tvs cpt_tvs_vis = let dups = findDupsEq ((==) `on` fst) cpt_tvs_vis in traverse_- (\d -> let (pat_tv, pat_vis) = NE.head d in failWithTc $- mkTcRnUnknownMessage $ mkPlainError noHints $- pprWithExplicitKindsWhen (isInvisibleForAllTyFlag pat_vis) $- hang (text "Illegal duplicate variable"- <+> quotes (ppr pat_tv) <+> text "in:")- 2 (vcat [ppr_eqn, suggestion]))+ (\d -> failWithTc $ TcRnIllegalInstance+ $ IllegalFamilyInstance+ $ InvalidAssoc $ InvalidAssocDefault+ $ AssocDefaultBadArgs fam_tc pats+ $ AssocDefaultDuplicateTyVars d) dups - ppr_eqn :: SDoc- ppr_eqn =- quotes (text "type" <+> ppr (mkTyConApp fam_tc pats)- <+> equals <+> text "...")-- suggestion :: SDoc- suggestion = text "The arguments to" <+> quotes (ppr fam_tc)- <+> text "must all be distinct type variables"- checkFamInstRhs :: TyCon -> [Type] -- LHS -> [(TyCon, [Type])] -- type family calls in RHS -> [TcRnMessage]@@ -2190,30 +2277,11 @@ lhs_size = pSizeTypes lhs_tys check (tc, tys) | not (isStuckTypeFamily tc) -- (TF1)- , Just ps_failure <- pSizeTypes tys `ltPatersonSize` lhs_size -- (TF2)- = Just $ mkFamSizeError ps_failure (TyConApp lhs_tc lhs_tys) (TyConApp tc tys)+ , Just pc_failure <- pSizeTypes tys `ltPatersonSize` lhs_size -- (TF2)+ = Just $ TcRnPatersonCondFailure pc_failure InTyFamEquation (TyConApp lhs_tc lhs_tys) (TyConApp tc tys) | otherwise = Nothing -mkFamSizeError :: PatersonSizeFailure -> Type -> Type -> TcRnMessage-mkFamSizeError ps_failure lhs fam_call- = mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ main_msg- , parens undecidableMsg ]- where- pp_lhs = text "LHS of the family instance" <+> quotes (ppr lhs)- pp_call = text "type-family application" <+> quotes (ppr fam_call)-- main_msg = case ps_failure of- PSF_TyFam tc -> -- See (PC3) of Note [Paterson conditions]- hang (text "Illegal nested use of type family" <+> quotes (ppr tc))- 2 (text "in the arguments of the" <+> pp_call)- PSF_TyVar tvs -> hang (occMsg tvs)- 2 (sep [ text "in the" <+> pp_call- , text "than in the" <+> pp_lhs ])- PSF_Size -> hang (text "The" <+> pp_call)- 2 (sep [ text "is no smaller than", text "the" <+> pp_lhs ])- ----------------- checkFamPatBinders :: TyCon -> [TcTyVar] -- Bound on LHS of family instance@@ -2236,15 +2304,14 @@ -- In both cases, 'k' is not bound on the LHS, but is used on the RHS -- We catch the former in kcDeclHeader, and the latter right here -- See Note [Check type-family instance binders]- ; check_tvs bad_rhs_tvs (text "mentioned in the RHS")- (text "bound on the LHS of")+ ; check_tvs (FamInstRHSOutOfScopeTyVars (Just (fam_tc, pats, dodgy_tvs)))+ bad_rhs_tvs -- Check for explicitly forall'd variable that is not bound on LHS -- data instance forall a. T Int = MkT Int -- See Note [Unused explicitly bound variables in a family pattern] -- See Note [Check type-family instance binders]- ; check_tvs bad_qtvs (text "bound by a forall")- (text "used in")+ ; check_tvs FamInstLHSUnusedBoundTyVars bad_qtvs } where cpt_tvs = tyCoVarsOfTypes pats@@ -2265,20 +2332,10 @@ -- Used on RHS but not bound on LHS dodgy_tvs = cpt_tvs `minusVarSet` inj_cpt_tvs - check_tvs tvs what what2- = unless (null tvs) $ addErrAt (getSrcSpan (head tvs)) $ mkTcRnUnknownMessage $ mkPlainError noHints $- hang (text "Type variable" <> plural tvs <+> pprQuotedList tvs- <+> isOrAre tvs <+> what <> comma)- 2 (vcat [ text "but not" <+> what2 <+> text "the family instance"- , mk_extra tvs ])-- -- mk_extra: #7536: give a decent error message for- -- type T a = Int- -- type instance F (T a) = a- mk_extra tvs = ppWhen (any (`elemVarSet` dodgy_tvs) tvs) $- hang (text "The real LHS (expanding synonyms) is:")- 2 (pprTypeApp fam_tc (map expandTypeSynonyms pats))-+ check_tvs mk_err tvs+ = unless (null tvs) $ addErrAt (getSrcSpan (head tvs)) $+ TcRnIllegalInstance $ IllegalFamilyInstance $+ mk_err (map tyVarName tvs) -- | Checks that a list of type patterns is valid in a matching (LHS) -- position of a class instances or type/data family instance.@@ -2297,26 +2354,13 @@ -- Ensure that no type family applications occur a type pattern ; case tcTyConAppTyFamInstsAndVis tc pat_ty_args of [] -> pure ()- ((tf_is_invis_arg, tf_tc, tf_args):_) -> failWithTc $ mkTcRnUnknownMessage $ mkPlainError noHints $- ty_fam_inst_illegal_err tf_is_invis_arg- (mkTyConApp tf_tc tf_args) }+ ((tf_is_invis_arg, tf_tc, tf_args):_) ->+ failWithTc $ TcRnIllegalInstance $+ IllegalFamilyApplicationInInstance inst_ty+ tf_is_invis_arg tf_tc tf_args } where inst_ty = mkTyConApp tc pat_ty_args - ty_fam_inst_illegal_err :: Bool -> Type -> SDoc- ty_fam_inst_illegal_err invis_arg ty- = pprWithExplicitKindsWhen invis_arg $- hang (text "Illegal type synonym family application"- <+> quotes (ppr ty) <+> text "in instance" <> colon)- 2 (ppr inst_ty)---- Error messages--inaccessibleCoAxBranch :: TyCon -> CoAxBranch -> SDoc-inaccessibleCoAxBranch fam_tc cur_branch- = text "Type family instance equation is overlapped:" $$- nest 2 (pprCoAxBranchUser fam_tc cur_branch)- ------------------------- checkConsistentFamInst :: AssocInstInfo -> TyCon -- ^ Family tycon@@ -2340,8 +2384,10 @@ -- Check that the associated type indeed comes from this class -- See [Mismatched class methods and associated type families] -- in TcInstDecls.- ; checkTc (Just (classTyCon clas) == tyConAssoc_maybe fam_tc)- (TcRnBadAssociatedType (className clas) (tyConName fam_tc))+ ; checkTc (Just (classTyCon clas) == tyConAssoc_maybe fam_tc) $+ TcRnIllegalInstance $ IllegalFamilyInstance $+ InvalidAssoc $ InvalidAssocInstance $+ AssocNotInThisClass clas fam_tc ; check_match arg_triples }@@ -2356,29 +2402,12 @@ ax_arg_tys , Just cls_arg_ty <- [lookupVarEnv mini_env fam_tc_tv] ] - pp_wrong_at_arg vis- = pprWithExplicitKindsWhen (isInvisibleForAllTyFlag vis) $- vcat [ text "Type indexes must match class instance head"- , text "Expected:" <+> pp_expected_ty- , text " Actual:" <+> pp_actual_ty ]- -- Fiddling around to arrange that wildcards unconditionally print as "_" -- We only need to print the LHS, not the RHS at all -- See Note [Printing conflicts with class header] (tidy_env1, _) = tidyVarBndrs emptyTidyEnv inst_tvs (tidy_env2, _) = tidyCoAxBndrsForUser tidy_env1 (ax_tvs \\ inst_tvs) - pp_expected_ty = pprIfaceTypeApp topPrec (toIfaceTyCon fam_tc) $- toIfaceTcArgs fam_tc $- [ case lookupVarEnv mini_env at_tv of- Just cls_arg_ty -> tidyType tidy_env2 cls_arg_ty- Nothing -> mk_wildcard at_tv- | at_tv <- tyConTyVars fam_tc ]-- pp_actual_ty = pprIfaceTypeApp topPrec (toIfaceTyCon fam_tc) $- toIfaceTcArgs fam_tc $- tidyTypes tidy_env2 ax_arg_tys- mk_wildcard at_tv = mkTyVarTy (mkTyVar tv_name (tyVarKind at_tv)) tv_name = mkInternalName (mkAlphaTyVarUnique 1) (mkTyVarOccFS (fsLit "_")) noSrcSpan @@ -2393,8 +2422,18 @@ , Just rl_subst1 <- tcMatchTyX_BM bind_me rl_subst ty2 ty1 = go lr_subst1 rl_subst1 triples | otherwise- = addErrTc (mkTcRnUnknownMessage $ mkPlainError noHints $ pp_wrong_at_arg vis)+ = addErrTc $ TcRnIllegalInstance $ IllegalFamilyInstance+ $ InvalidAssoc $ InvalidAssocInstance+ $ AssocTyVarsDontMatch vis fam_tc exp_tys act_tys + -- Expected/actual family argument types (for error messages)+ exp_tys =+ [ case lookupVarEnv mini_env at_tv of+ Just cls_arg_ty -> tidyType tidy_env2 cls_arg_ty+ Nothing -> mk_wildcard at_tv+ | at_tv <- tyConTyVars fam_tc ]+ act_tys = tidyTypes tidy_env2 ax_arg_tys+ -- The /scoped/ type variables from the class-instance header -- should not be alpha-renamed. Inferred ones can be. no_bind_set = mkVarSet inst_tvs@@ -2821,19 +2860,12 @@ checkTyConTelescope tc | bad_scope = -- See "Ill-scoped binders" in Note [Bad TyCon telescopes]- addErr $ mkTcRnUnknownMessage $ mkPlainError noHints $- vcat [ hang (text "The kind of" <+> quotes (ppr tc) <+> text "is ill-scoped")- 2 pp_tc_kind- , extra- , hang (text "Perhaps try this order instead:")- 2 (pprTyVars sorted_tvs) ]+ addErr $ TcRnBadTyConTelescope tc | otherwise = return () where tcbs = tyConBinders tc- tvs = binderVars tcbs- sorted_tvs = scopedSort tvs (_, bad_scope) = foldl add_one (emptyVarSet, False) tcbs @@ -2844,34 +2876,3 @@ where tv = binderVar tcb fkvs = tyCoVarsOfType (tyVarKind tv)-- inferred_tvs = [ binderVar tcb- | tcb <- tcbs, Inferred == tyConBinderForAllTyFlag tcb ]- specified_tvs = [ binderVar tcb- | tcb <- tcbs, Specified == tyConBinderForAllTyFlag tcb ]-- pp_inf = parens (text "namely:" <+> pprTyVars inferred_tvs)- pp_spec = parens (text "namely:" <+> pprTyVars specified_tvs)-- pp_tc_kind = text "Inferred kind:" <+> ppr tc <+> dcolon <+> ppr_untidy (tyConKind tc)- ppr_untidy ty = pprIfaceType (toIfaceType ty)- -- We need ppr_untidy here because pprType will tidy the type, which- -- will turn the bogus kind we are trying to report- -- T :: forall (a::k) k (b::k) -> blah- -- into a misleadingly sanitised version- -- T :: forall (a::k) k1 (b::k1) -> blah-- extra- | null inferred_tvs && null specified_tvs- = empty- | null inferred_tvs- = hang (text "NB: Specified variables")- 2 (sep [pp_spec, text "always come first"])- | null specified_tvs- = hang (text "NB: Inferred variables")- 2 (sep [pp_inf, text "always come first"])- | otherwise- = hang (text "NB: Inferred variables")- 2 (vcat [ sep [ pp_inf, text "always come first"]- , sep [text "then Specified variables", pp_spec]])-
+ GHC/Tc/Zonk/Env.hs view
@@ -0,0 +1,371 @@+{-# LANGUAGE DerivingVia #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE RankNTypes #-}++-- | The 'ZonkEnv' zonking environment, and the 'ZonkT' and 'ZonkBndrT'+-- monad transformers, for the final zonking to type in "GHC.Tc.Zonk.Type".+--+-- See Note [Module structure for zonking] in GHC.Tc.Zonk.Type.+module GHC.Tc.Zonk.Env+ ( -- * The 'ZonkEnv'+ ZonkEnv(..), getZonkEnv+ , ZonkFlexi(..)+ , initZonkEnv++ -- * The 'ZonkT' and 'ZonkBndrT' zonking monad transformers+ , ZonkT(ZonkT,runZonkT), ZonkBndrT(..)++ -- ** Going between 'ZonkT' and 'ZonkBndrT'+ , runZonkBndrT+ , noBinders, don'tBind++ -- ** Modifying and extending the 'ZonkEnv' in 'ZonkBndrT'+ , setZonkType+ , extendZonkEnv+ , extendIdZonkEnv, extendIdZonkEnvRec+ , extendTyZonkEnv++ )+ where++import GHC.Prelude++import GHC.Core.TyCo.Rep ( Type )+import GHC.Types.Var ( TyCoVar, Var, TyVar )++import GHC.Types.Var ( Id, isTyCoVar )+import GHC.Types.Var.Env++import GHC.Utils.Monad.Codensity+import GHC.Utils.Outputable++import Control.Monad.Fix ( MonadFix(..) )+import Control.Monad.IO.Class ( MonadIO(..) )+import Control.Monad.Trans.Class ( MonadTrans(..) )+import Data.Coerce ( coerce )+import Data.IORef ( IORef, newIORef )+import Data.List ( partition )++import GHC.Exts ( oneShot )++--------------------------------------------------------------------------------++-- | See Note [The ZonkEnv]+data ZonkEnv+ = ZonkEnv { ze_flexi :: !ZonkFlexi+ , ze_tv_env :: TyCoVarEnv TyCoVar+ , ze_id_env :: IdEnv Id+ , ze_meta_tv_env :: IORef (TyVarEnv Type) }++-- | How should we handle unfilled unification variables in the zonker?+--+-- See Note [Un-unified unification variables]+data ZonkFlexi+ = DefaultFlexi -- ^ Default unbound unification variables to Any+ | SkolemiseFlexi -- ^ Skolemise unbound unification variables+ -- See Note [Zonking the LHS of a RULE]+ | RuntimeUnkFlexi -- ^ Used in the GHCi debugger+ | NoFlexi -- ^ Panic on unfilled meta-variables+ -- See Note [Error on unconstrained meta-variables]+ -- in GHC.Tc.Utils.TcMType++instance Outputable ZonkEnv where+ ppr (ZonkEnv { ze_tv_env = tv_env+ , ze_id_env = id_env })+ = text "ZE" <+> braces (vcat+ [ text "ze_tv_env =" <+> ppr tv_env+ , text "ze_id_env =" <+> ppr id_env ])++{- Note [The ZonkEnv]+~~~~~~~~~~~~~~~~~~~~~+* ze_flexi :: ZonkFlexi says what to do with a+ unification variable that is still un-unified.+ See Note [Un-unified unification variables]++* ze_tv_env :: TyCoVarEnv TyCoVar promotes sharing. At a binding site+ of a tyvar or covar, we zonk the kind right away and add a mapping+ to the env. This prevents re-zonking the kind at every+ occurrence. But this is *just* an optimisation.++* ze_id_env : IdEnv Id promotes sharing among Ids, by making all+ occurrences of the Id point to a single zonked copy, built at the+ binding site.++ Unlike ze_tv_env, it is knot-tied: see extendIdZonkEnvRec.+ In a mutually recursive group+ rec { f = ...g...; g = ...f... }+ we want the occurrence of g to point to the one zonked Id for g,+ and the same for f.++ Because it is knot-tied, we must be careful to consult it lazily.++* ze_meta_tv_env: see Note [Sharing when zonking to Type]+++Notes:+ * We must be careful never to put coercion variables (which are Ids,+ after all) in the knot-tied ze_id_env, because coercions can+ appear in types, and we sometimes inspect a zonked type in+ the GHC.Tc.Zonk.Type module. [Question: where, precisely?]++ * An obvious suggestion would be to have one VarEnv Var to+ replace both ze_id_env and ze_tv_env, but that doesn't work+ because of the knot-tying stuff mentioned above.++Note [Un-unified unification variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+What should we do if we find a Flexi unification variable?+There are three possibilities:++* DefaultFlexi: this is the common case, in situations like+ length @alpha ([] @alpha)+ It really doesn't matter what type we choose for alpha. But+ we must choose a type! We can't leave mutable unification+ variables floating around: after typecheck is complete, every+ type variable occurrence must have a binding site.++ So we default it to 'Any' of the right kind.++ All this works for both type and kind variables (indeed+ the two are the same thing).++* SkolemiseFlexi: is a special case for the LHS of RULES.+ See Note [Zonking the LHS of a RULE]++* RuntimeUnkFlexi: is a special case for the GHCi debugger.+ It's a way to have a variable that is not a mutable+ unification variable, but doesn't have a binding site+ either.++* NoFlexi: See Note [Error on unconstrained meta-variables]+ in GHC.Tc.Utils.TcMType. This mode will panic on unfilled+ meta-variables.+-}++-- | A reader monad over 'ZonkEnv', for zonking computations which+-- don't modify the 'ZonkEnv' (e.g. don't bind any variables).+--+-- Use 'ZonkBndrT' when you need to modify the 'ZonkEnv' (e.g. to bind+-- a variable).+newtype ZonkT m a = ZonkT' { runZonkT :: ZonkEnv -> m a }++{- Note [Instances for ZonkT]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Below, we derive the following instances by hand:++ newtype ZonkT m a = ZonkT { runZonkT :: ZonkEnv -> m a }+ deriving (Functor, Applicative, Monad, MonadIO, MonadFix)+ via ReaderT ZonkEnv m+ deriving MonadTrans+ via ReaderT ZonkEnv++Why? Two reasons:++ 1. To use oneShot. See Note [The one-shot state monad trick] in GHC.Utils.Monad.+ 2. To be strict in the ZonkEnv. This allows us to worker-wrapper functions,+ passing them individual fields of the ZonkEnv instead of the whole record.+ When this happens, we avoid allocating a ZonkEnv, which is a win.+-}++-- See Note [The one-shot state monad trick] in GHC.Utils.Monad+{-# COMPLETE ZonkT #-}+pattern ZonkT :: forall m a. (ZonkEnv -> m a) -> ZonkT m a+pattern ZonkT m <- ZonkT' m+ where+ ZonkT m = ZonkT' (oneShot m)++-- See Note [Instances for ZonkT]+instance Functor m => Functor (ZonkT m) where+ fmap f (ZonkT g) = ZonkT $ \ !env -> fmap f (g env)+ a <$ ZonkT g = ZonkT $ \ !env -> a <$ g env+ {-# INLINE fmap #-}+ {-# INLINE (<$) #-}++-- See Note [Instances for ZonkT]+instance Applicative m => Applicative (ZonkT m) where+ pure a = ZonkT (\ !_ -> pure a)+ ZonkT f <*> ZonkT x = ZonkT (\ !env -> f env <*> x env )+ ZonkT m *> f = ZonkT (\ !env -> m env *> runZonkT f env)+ {-# INLINE pure #-}+ {-# INLINE (<*>) #-}+ {-# INLINE (*>) #-}++-- See Note [Instances for ZonkT]+instance Monad m => Monad (ZonkT m) where+ ZonkT m >>= f =+ ZonkT (\ !env -> do { r <- m env+ ; runZonkT (f r) env })+ (>>) = (*>)+ {-# INLINE (>>=) #-}+ {-# INLINE (>>) #-}++-- See Note [Instances for ZonkT]+instance MonadIO m => MonadIO (ZonkT m) where+ liftIO f = ZonkT (\ !_ -> liftIO f)+ {-# INLINE liftIO #-}++-- See Note [Instances for ZonkT]+instance MonadTrans ZonkT where+ lift ma = ZonkT $ \ !_ -> ma+ {-# INLINE lift #-}++-- See Note [Instances for ZonkT]+instance MonadFix m => MonadFix (ZonkT m) where+ mfix f = ZonkT $ \ !r -> mfix $ oneShot $ \ a -> runZonkT (f a) r+ {-# INLINE mfix #-}++-- | Zonk binders, bringing them into scope in the inner computation.+--+-- Can be thought of as a state monad transformer @StateT ZonkEnv m a@,+-- but written in continuation-passing style.+--+-- See Note [Continuation-passing style for zonking].+newtype ZonkBndrT m a = ZonkBndrT { runZonkBndrT' :: forall r. (a -> ZonkT m r) -> ZonkT m r }+ deriving (Functor, Applicative, Monad, MonadIO, MonadFix)+ via Codensity (ZonkT m)+ -- See GHC.Utils.Monad.Codensity for the instance definitions.+ -- See Note [Continuation-passing style for zonking] for why we use+ -- continuation-passing style instead of a direct state monad.++{- Note [Continuation-passing style for zonking]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+While zonking, we sometimes need to modify the ZonkEnv. For example, when+zonking a binder with zonkTyBndrX, we extend the type variable ZonkEnv.++We could use direct state passing:++ zonkTyBndrX :: ZonkEnv -> TcTyVar -> TcM (ZonkEnv, TyVar)+ zonkTyBndrX ze tv =+ do { tv' <- ... ze tv+ ; let ze' = extendTyZonkEnv ze tv'+ ; return (ze', tv') }++but we can avoid allocating pairs by using continuation-passing style instead,+for example:++ zonkTyBndrX :: (ZonkEnv -> TcTyVar -> TcM r) -> ZonkEnv -> TcM r+ zonkTyBndrX k ze =+ do { tv' <- ... ze tv+ ; let ze' = extendTyZonkEnv ze tv+ ; k ze' tv' }++We thus define:++ newtype ZonkBndrT m a =+ ZonkBndrT { runZonkBndrT :: forall r. (a -> ZonkT m r) -> ZonkT m r }++which is the type of continuation-passing computations over ZonkT m = ReaderT ZonkEnv m.+We thus have:++ zonkTyBndrX :: TcTyVar -> ZonkBndrT TcM TyVar++which expresses the fact that zonkTyBndrX takes in a TcTyVar, returns a TyVar,+modifying the ZonkEnv state in the process. We can build computations out of it+by using runZonkBndrT and nesting. For example, zonking a type synonym:++ zonkTySynRHS :: [TcTyConBinder] -> [TcTyVar] -> ZonkT TcM ([TyConBinder], [TyVar])+ zonkTySynRHS tc_bndrs rhs_tc_ty =+ runZonkBndrT (zonkTyVarBindersX tc_bndrs) $ \ bndrs ->+ do { rhs_ty <- zonkTcTypeToTypeX rhs_tc_ty+ ; return (bndrs, rhs_ty) }++This is known as the codensity transformation, where++ newtype Codensity m a = Codensity { forall r. (a -> m r) -> m r }++expresses continuation-passing computations in the monad m.++Codensity (ReaderT s m) naturally corresponds to StateT s (Codensity m), and+the instances for Codensity reflect that, e.g.++ traverse :: (a -> ZonkBndrT m b) -> t a -> ZonkBndrT m (t b)++naturally behaves like mapAccumLM, accumulating changes to the ZonkEnv as+we go.+-}++-- | Zonk some binders and run the continuation.+--+-- Example:+--+-- > zonk (ForAllTy (Bndr tv vis) body_ty)+-- > = runZonkBndrT (zonkTyBndrX tv) $ \ tv' ->+-- > do { body_ty' <- zonkTcTypeToTypeX body_ty+-- > ; return (ForAllTy (Bndr tv' vis) body_ty') }+--+-- See Note [Continuation-passing style for zonking].+runZonkBndrT :: ZonkBndrT m a -> forall r. (a -> ZonkT m r) -> ZonkT m r+runZonkBndrT (ZonkBndrT k) f = k (oneShot f)+{-# INLINE runZonkBndrT #-}++-- | Embed a computation that doesn't modify the 'ZonkEnv' into 'ZonkBndrT'.+noBinders :: Monad m => ZonkT m a -> ZonkBndrT m a+noBinders z = coerce $ toCodensity z+{-# INLINE noBinders #-}++-- | Run a nested computation that modifies the 'ZonkEnv',+-- without affecting the outer environment.+don'tBind :: Monad m => ZonkBndrT m a -> ZonkT m a+don'tBind (ZonkBndrT k) = fromCodensity (Codensity k)+{-# INLINE don'tBind #-}++initZonkEnv :: MonadIO m => ZonkFlexi -> ZonkT m b -> m b+initZonkEnv flexi thing_inside+ = do { mtv_env_ref <- liftIO $ newIORef emptyVarEnv+ ; let ze = ZonkEnv { ze_flexi = flexi+ , ze_tv_env = emptyVarEnv+ , ze_id_env = emptyVarEnv+ , ze_meta_tv_env = mtv_env_ref }++ ; runZonkT thing_inside ze }+{-# INLINEABLE initZonkEnv #-} -- so it can be specialised++nestZonkEnv :: (ZonkEnv -> ZonkEnv) -> ZonkBndrT m ()+nestZonkEnv f = ZonkBndrT $ \ k ->+ case k () of+ ZonkT g -> ZonkT (g . f)+{-# INLINE nestZonkEnv #-}++getZonkEnv :: Monad m => ZonkT m ZonkEnv+getZonkEnv = ZonkT return+{-# INLINE getZonkEnv #-}++-- | Extend the knot-tied environment.+extendIdZonkEnvRec :: [Var] -> ZonkBndrT m ()+extendIdZonkEnvRec ids =+ nestZonkEnv $+ \ ze@(ZonkEnv { ze_id_env = id_env }) ->+ -- NB: Don't look at the var to decide which env't to put it in. That+ -- would end up knot-tying all the env'ts.+ ze { ze_id_env = extendVarEnvList id_env [(id,id) | id <- ids] }+ -- Given coercion variables will actually end up here. That's OK though:+ -- coercion variables are never looked up in the knot-tied env't, so zonking+ -- them simply doesn't get optimised. No one gets hurt. An improvement (?)+ -- would be to do SCC analysis in zonkEvBinds and then only knot-tie the+ -- recursive groups. But perhaps the time it takes to do the analysis is+ -- more than the savings.++extendZonkEnv :: [Var] -> ZonkBndrT m ()+extendZonkEnv vars =+ nestZonkEnv $+ \ ze@(ZonkEnv { ze_tv_env = tyco_env, ze_id_env = id_env }) ->+ ze { ze_tv_env = extendVarEnvList tyco_env [(tv,tv) | tv <- tycovars]+ , ze_id_env = extendVarEnvList id_env [(id,id) | id <- ids] }+ where+ (tycovars, ids) = partition isTyCoVar vars++extendIdZonkEnv :: Var -> ZonkBndrT m ()+extendIdZonkEnv id =+ nestZonkEnv $+ \ ze@(ZonkEnv { ze_id_env = id_env }) ->+ ze { ze_id_env = extendVarEnv id_env id id }++extendTyZonkEnv :: TyVar -> ZonkBndrT m ()+extendTyZonkEnv tv =+ nestZonkEnv $+ \ ze@(ZonkEnv { ze_tv_env = ty_env }) ->+ ze { ze_tv_env = extendVarEnv ty_env tv tv }++setZonkType :: ZonkFlexi -> ZonkT m a -> ZonkT m a+setZonkType flexi (ZonkT f) = ZonkT $ \ ze ->+ f $ ze { ze_flexi = flexi }
+ GHC/Tc/Zonk/Monad.hs view
@@ -0,0 +1,112 @@+{-# LANGUAGE DerivingVia #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE RankNTypes #-}++-- | The 'ZonkM' monad, a stripped down 'TcM', used when zonking within+-- the typechecker in "GHC.Tc.Zonk.TcType".+--+-- See Note [Module structure for zonking] in GHC.Tc.Zonk.Type.+module GHC.Tc.Zonk.Monad+ ( -- * The 'ZonkM' monad, a stripped down 'TcM' for zonking+ ZonkM(ZonkM,runZonkM)+ , ZonkGblEnv(..), getZonkGblEnv++ -- ** Logging within 'ZonkM'+ , traceZonk++ )+ where++import GHC.Prelude++import GHC.Driver.Flags ( DumpFlag(Opt_D_dump_tc_trace) )++import GHC.Types.SrcLoc ( SrcSpan )++import GHC.Tc.Types.BasicTypes ( TcBinderStack )+import GHC.Tc.Utils.TcType ( TcLevel )++import GHC.Utils.Logger+import GHC.Utils.Outputable++import Control.Monad ( when )+import Control.Monad.IO.Class ( MonadIO(..) )++import GHC.Exts ( oneShot )++--------------------------------------------------------------------------------++-- | Information needed by the 'ZonkM' monad, which is a slimmed down version+-- of 'TcM' with just enough information for zonking.+data ZonkGblEnv+ = ZonkGblEnv+ { zge_logger :: Logger -- needed for traceZonk+ , zge_name_ppr_ctx :: NamePprCtx -- ''+ , zge_src_span :: SrcSpan -- needed for skolemiseUnboundMetaTyVar+ , zge_tc_level :: TcLevel -- ''+ , zge_binder_stack :: TcBinderStack -- needed for tcInitTidyEnv+ }++-- | A stripped down version of 'TcM' which is sufficient for zonking types.+newtype ZonkM a = ZonkM' { runZonkM :: ZonkGblEnv -> IO a }+{-+NB: we write the following instances by hand:++-- deriving (Functor, Applicative, Monad, MonadIO)+-- via ReaderT ZonkGblEnv IO++See Note [Instances for ZonkT] in GHC.Tc.Zonk.Env for the reasoning:++ - oneShot annotations,+ - strictness annotations to enable worker-wrapper.+-}++{-# COMPLETE ZonkM #-}+pattern ZonkM :: forall a. (ZonkGblEnv -> IO a) -> ZonkM a+pattern ZonkM m <- ZonkM' m+ where+ ZonkM m = ZonkM' (oneShot m)+-- See Note [The one-shot state monad trick] in GHC.Utils.Monad++instance Functor ZonkM where+ fmap f (ZonkM g) = ZonkM $ \ !env -> fmap f (g env)+ a <$ ZonkM g = ZonkM $ \ !env -> a <$ g env+ {-# INLINE fmap #-}+ {-# INLINE (<$) #-}+instance Applicative ZonkM where+ pure a = ZonkM (\ !_ -> pure a)+ ZonkM f <*> ZonkM x = ZonkM (\ !env -> f env <*> x env )+ ZonkM m *> f = ZonkM (\ !env -> m env *> runZonkM f env)+ {-# INLINE pure #-}+ {-# INLINE (<*>) #-}+ {-# INLINE (*>) #-}++instance Monad ZonkM where+ ZonkM m >>= f =+ ZonkM (\ !env -> do { r <- m env+ ; runZonkM (f r) env })+ (>>) = (*>)+ {-# INLINE (>>=) #-}+ {-# INLINE (>>) #-}++instance MonadIO ZonkM where+ liftIO f = ZonkM (\ !_ -> f)+ {-# INLINE liftIO #-}++getZonkGblEnv :: ZonkM ZonkGblEnv+getZonkGblEnv = ZonkM return+{-# INLINE getZonkGblEnv #-}++-- | Same as 'traceTc', but for the 'ZonkM' monad.+traceZonk :: String -> SDoc -> ZonkM ()+traceZonk herald doc = ZonkM $+ \ ( ZonkGblEnv { zge_logger = !logger, zge_name_ppr_ctx = ppr_ctx }) ->+ do { let sty = mkDumpStyle ppr_ctx+ flag = Opt_D_dump_tc_trace+ title = ""+ msg = hang (text herald) 2 doc+ ; when (logHasDumpFlag logger flag) $+ logDumpFile logger sty flag title FormatText msg+ }+{-# INLINE traceZonk #-}+ -- see Note [INLINE conditional tracing utilities] in GHC.Tc.Utils.Monad
+ GHC/Tc/Zonk/TcType.hs view
@@ -0,0 +1,680 @@++{-+(c) The University of Glasgow 2006+(c) The AQUA Project, Glasgow University, 1996-1998+-}++-- | Zonking types within the typechecker.+--+-- Distinct from the final zonking pass in "GHC.Tc.Zonk.Type";+-- see Note [Module structure for zonking] in GHC.Tc.Zonk.Type.+module GHC.Tc.Zonk.TcType+ ( -- * Zonking (within the typechecker)++ -- ** The 'ZonkM' monad and 'ZonkGblEnv'+ module GHC.Tc.Zonk.Monad++ -- ** Zonking types+ , zonkTcType, zonkTcTypes+ , zonkTcTyVar, zonkTcTyVars+ , zonkTcTyVarToTcTyVar, zonkTcTyVarsToTcTyVars+ , zonkInvisTVBinder+ , zonkCo++ -- ** Zonking 'TyCon's+ , zonkTcTyCon++ -- *** FreeVars+ , zonkTcTypeAndFV, zonkTyCoVarsAndFV, zonkTyCoVarsAndFVList+ , zonkDTyCoVarSetAndFV++ -- ** Zonking 'CoVar's and 'Id's+ , zonkId, zonkCoVar, zonkTyCoVar, zonkTyCoVarKind, zonkTyCoVarBndrKind++ -- ** Zonking skolem info+ , zonkSkolemInfo, zonkSkolemInfoAnon++ -- ** Zonking constraints+ , zonkCt, zonkWC, zonkSimples, zonkImplication++ -- * Tidying+ , tcInitTidyEnv, tcInitOpenTidyEnv+ , tidyCt, tidyEvVar, tidyDelayedError++ -- ** Zonk & tidy+ , zonkTidyTcType, zonkTidyTcTypes+ , zonkTidyOrigin, zonkTidyOrigins+ , zonkTidyFRRInfos++ -- * Writing to metavariables+ , writeMetaTyVar, writeMetaTyVarRef++ -- * Handling coercion holes+ , checkCoercionHole++ )+ where++import GHC.Prelude++import GHC.Types.Name+import GHC.Types.Var+import GHC.Types.Var.Env+import GHC.Types.Var.Set+import GHC.Types.Unique.Set++import GHC.Tc.Errors.Types+import GHC.Tc.Errors.Ppr+import GHC.Tc.Types.Constraint+import GHC.Tc.Types.Origin+import GHC.Tc.Types.TcRef+import GHC.Tc.Types.Evidence+import GHC.Tc.Types.BasicTypes+import GHC.Tc.Utils.TcType+import GHC.Tc.Zonk.Monad++import GHC.Core.InstEnv (ClsInst(is_tys))+import GHC.Core.TyCo.Rep+import GHC.Core.TyCon+import GHC.Core.Type+import GHC.Core.Coercion+import GHC.Core.Predicate++import GHC.Utils.Constants+import GHC.Utils.Outputable+import GHC.Utils.Misc+import GHC.Utils.Monad ( mapAccumLM )+import GHC.Utils.Panic++import GHC.Data.Bag+import GHC.Data.Pair++{- *********************************************************************+* *+ Writing to metavariables+* *+************************************************************************+-}++-- | Write into a currently-empty MetaTyVar.+--+-- Works with both type and kind variables.+writeMetaTyVar :: HasDebugCallStack+ => TcTyVar -- ^ the type varfiable to write to+ -> TcType -- ^ the type to write into the mutable reference+ -> ZonkM ()+writeMetaTyVar tyvar ty+ | not debugIsOn+ = writeMetaTyVarRef tyvar (metaTyVarRef tyvar) ty++-- Everything from here on only happens if DEBUG is on+ | not (isTcTyVar tyvar)+ = massertPpr False (text "Writing to non-tc tyvar" <+> ppr tyvar)++ | MetaTv { mtv_ref = ref } <- tcTyVarDetails tyvar+ = writeMetaTyVarRef tyvar ref ty++ | otherwise+ = massertPpr False (text "Writing to non-meta tyvar" <+> ppr tyvar)+{-# INLINE writeMetaTyVar #-} -- See NOTE [Inlining writeMetaTyVar]++-- | Write into the 'MetaDetails' mutable references of a 'MetaTv'.+writeMetaTyVarRef :: HasDebugCallStack+ => TcTyVar -- ^ for debug assertions only;+ -> TcRef MetaDetails -- ^ ref cell must be for the same tyvar+ -> TcType -- ^ the type to write to the mutable reference+ -> ZonkM ()+writeMetaTyVarRef tyvar ref ty+ | not debugIsOn+ = do { traceZonk "writeMetaTyVar" (ppr tyvar <+> dcolon <+> ppr (tyVarKind tyvar)+ <+> text ":=" <+> ppr ty)+ ; writeTcRef ref (Indirect ty) }++ -- Everything from here on only happens if DEBUG is on+ -- Need to zonk 'ty' because we may only recently have promoted+ -- its free meta-tyvars (see GHC.Tc.Utils.Unify.checkPromoteFreeVars)+ | otherwise+ = do { meta_details <- readTcRef ref;+ -- Zonk kinds to allow the error check to work+ ; zonked_tv_kind <- zonkTcType tv_kind+ ; zonked_ty <- zonkTcType ty+ ; let zonked_ty_kind = typeKind zonked_ty+ zonked_ty_lvl = tcTypeLevel zonked_ty+ level_check_ok = not (zonked_ty_lvl `strictlyDeeperThan` tv_lvl)+ level_check_msg = ppr zonked_ty_lvl $$ ppr tv_lvl $$ ppr tyvar $$ ppr ty $$ ppr zonked_ty+ kind_check_ok = zonked_ty_kind `eqType` zonked_tv_kind+ -- Note [Extra-constraint holes in partial type signatures] in GHC.Tc.Gen.HsType++ 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 zonked_ty_kind) )++ ; traceZonk "writeMetaTyVar" (ppr tyvar <+> text ":=" <+> ppr ty)++ -- Check for double updates+ ; massertPpr (isFlexi meta_details) (double_upd_msg meta_details)++ -- Check for level OK+ ; massertPpr level_check_ok level_check_msg++ -- Check Kinds ok+ ; massertPpr kind_check_ok kind_msg++ -- Do the write+ ; writeTcRef ref (Indirect ty) }+ where+ tv_kind = tyVarKind tyvar++ tv_lvl = tcTyVarLevel tyvar+++ double_upd_msg details = hang (text "Double update of meta tyvar")+ 2 (ppr tyvar $$ ppr details)+{-# INLINE writeMetaTyVarRef #-} -- See NOTE [Inlining writeMetaTyVar]++{- NOTE [Inlining writeMetaTyVar]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+writeMetaTyVar is defined in the ZonkM monad, but it is often used within+TcM with the following idiom:++ liftZonkM $ writeMetaTyVar tv ty++Using liftZonkM within TcM generally means extracting out a ZonkGblEnv+from the TcM monad to pass to the inner ZonkM computation (see the definition+of liftZonkM). This can cause writeMetaTyVar to allocate a ZonkGblEnv, which we+would much rather avoid!+Instead, we should directly pass the bits of the ZonkGblEnv that writeMetaTyVar+needs (the Logger and NamePprCtxt, which are needed for the traceZonk call+in writeMetaTyVar). This is achieved by inlining writeMetaTyVar and writeMetaTyVarRef.+These functions just wrap writeTcRef, with some extra tracing+(and some assertions if running in debug mode), so it's fine to inline them.++See for example test T5631, which regresses without this change.+-}++{-+************************************************************************+* *+ Zonking -- the main work-horses: zonkTcType, zonkTcTyVar+* *+************************************************************************+-}++-- 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+zonkTcType :: TcType -> ZonkM TcType+zonkTcTypes :: [TcType] -> ZonkM [TcType]+zonkCo :: Coercion -> ZonkM Coercion+(zonkTcType, zonkTcTypes, zonkCo, _)+ = mapTyCo zonkTcTypeMapper++-- | A suitable TyCoMapper for zonking a type during type-checking,+-- before all metavars are filled in.+zonkTcTypeMapper :: TyCoMapper () ZonkM+zonkTcTypeMapper = TyCoMapper+ { tcm_tyvar = const zonkTcTyVar+ , tcm_covar = const (\cv -> mkCoVarCo <$> zonkTyCoVarKind cv)+ , tcm_hole = hole+ , tcm_tycobinder = \ _env tcv _vis k -> zonkTyCoVarKind tcv >>= k ()+ , tcm_tycon = zonkTcTyCon }+ where+ hole :: () -> CoercionHole -> ZonkM Coercion+ hole _ hole@(CoercionHole { ch_ref = ref, ch_co_var = cv })+ = do { contents <- readTcRef ref+ ; case contents of+ Just co -> do { co' <- zonkCo co+ ; checkCoercionHole cv co' }+ Nothing -> do { cv' <- zonkCoVar cv+ ; return $ HoleCo (hole { ch_co_var = cv' }) } }++zonkTcTyCon :: TcTyCon -> ZonkM TcTyCon+-- Only called on TcTyCons+-- A non-poly TcTyCon may have unification+-- variables that need zonking, but poly ones cannot+zonkTcTyCon tc+ | isMonoTcTyCon tc = do { tck' <- zonkTcType (tyConKind tc)+ ; return (setTcTyConKind tc tck') }+ | otherwise = return tc++zonkTcTyVar :: TcTyVar -> ZonkM TcType+-- Simply look through all Flexis+zonkTcTyVar tv+ | isTcTyVar tv+ = case tcTyVarDetails tv of+ SkolemTv {} -> zonk_kind_and_return+ RuntimeUnk {} -> zonk_kind_and_return+ MetaTv { mtv_ref = ref }+ -> do { cts <- readTcRef ref+ ; case cts of+ Flexi -> zonk_kind_and_return+ Indirect ty -> do { zty <- zonkTcType ty+ ; writeTcRef ref (Indirect zty)+ -- See Note [Sharing in zonking]+ ; return zty } }++ | otherwise -- coercion variable+ = zonk_kind_and_return+ where+ zonk_kind_and_return = do { z_tv <- zonkTyCoVarKind tv+ ; return (mkTyVarTy z_tv) }++-- Variant that assumes that any result of zonking is still a TyVar.+-- Should be used only on skolems and TyVarTvs+zonkTcTyVarsToTcTyVars :: HasDebugCallStack => [TcTyVar] -> ZonkM [TcTyVar]+zonkTcTyVarsToTcTyVars = mapM zonkTcTyVarToTcTyVar++zonkTcTyVarToTcTyVar :: HasDebugCallStack => TcTyVar -> ZonkM TcTyVar+zonkTcTyVarToTcTyVar tv+ = do { ty <- zonkTcTyVar tv+ ; let tv' = case getTyVar_maybe ty of+ Just tv' -> tv'+ Nothing -> pprPanic "zonkTcTyVarToTcTyVar"+ (ppr tv $$ ppr ty)+ ; return tv' }++zonkInvisTVBinder :: VarBndr TcTyVar spec -> ZonkM (VarBndr TcTyVar spec)+zonkInvisTVBinder (Bndr tv spec) = do { tv' <- zonkTcTyVarToTcTyVar tv+ ; return (Bndr tv' spec) }++{- *********************************************************************+* *+ Zonking types+* *+********************************************************************* -}++zonkTcTypeAndFV :: TcType -> ZonkM DTyCoVarSet+-- Zonk a type and take its free variables+-- With kind polymorphism it can be essential to zonk *first*+-- so that we find the right set of free variables. Eg+-- forall k1. forall (a:k2). a+-- where k2:=k1 is in the substitution. We don't want+-- k2 to look free in this type!+zonkTcTypeAndFV ty+ = tyCoVarsOfTypeDSet <$> zonkTcType ty++zonkTyCoVar :: TyCoVar -> ZonkM TcType+-- Works on TyVars and TcTyVars+zonkTyCoVar tv | isTcTyVar tv = zonkTcTyVar tv+ | isTyVar tv = mkTyVarTy <$> zonkTyCoVarKind tv+ | otherwise = assertPpr (isCoVar tv) (ppr tv) $+ mkCoercionTy . mkCoVarCo <$> zonkTyCoVarKind tv+ -- Hackily, when typechecking type and class decls+ -- we have TyVars in scope added (only) in+ -- GHC.Tc.Gen.HsType.bindTyClTyVars, but it seems+ -- painful to make them into TcTyVars there++zonkTyCoVarsAndFV :: TyCoVarSet -> ZonkM TyCoVarSet+zonkTyCoVarsAndFV tycovars+ = tyCoVarsOfTypes <$> mapM zonkTyCoVar (nonDetEltsUniqSet tycovars)+ -- It's OK to use nonDetEltsUniqSet here because we immediately forget about+ -- the ordering by turning it into a nondeterministic set and the order+ -- of zonking doesn't matter for determinism.++zonkDTyCoVarSetAndFV :: DTyCoVarSet -> ZonkM DTyCoVarSet+zonkDTyCoVarSetAndFV tycovars+ = mkDVarSet <$> (zonkTyCoVarsAndFVList $ dVarSetElems tycovars)++-- Takes a list of TyCoVars, zonks them and returns a+-- deterministically ordered list of their free variables.+zonkTyCoVarsAndFVList :: [TyCoVar] -> ZonkM [TyCoVar]+zonkTyCoVarsAndFVList tycovars+ = tyCoVarsOfTypesList <$> mapM zonkTyCoVar tycovars++zonkTcTyVars :: [TcTyVar] -> ZonkM [TcType]+zonkTcTyVars tyvars = mapM zonkTcTyVar tyvars++----------------- Types+zonkTyCoVarKind :: TyCoVar -> ZonkM TyCoVar+zonkTyCoVarKind tv = do { kind' <- zonkTcType (tyVarKind tv)+ ; return (setTyVarKind tv kind') }++zonkTyCoVarBndrKind :: VarBndr TyCoVar flag -> ZonkM (VarBndr TyCoVar flag)+zonkTyCoVarBndrKind (Bndr tv flag) =+ do { tv' <- zonkTyCoVarKind tv+ ; return (Bndr tv' flag) }++-- | zonkId is used *during* typechecking just to zonk the 'Id''s type+zonkId :: TcId -> ZonkM TcId+zonkId id = updateIdTypeAndMultM zonkTcType id++zonkCoVar :: CoVar -> ZonkM CoVar+zonkCoVar = zonkId++{-+************************************************************************+* *+ Coercion holes+* *+************************************************************************+-}++-- | Check that a coercion is appropriate for filling a hole. (The hole+-- 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 -> ZonkM Coercion+checkCoercionHole cv co+ | debugIsOn+ = do { cv_ty <- zonkTcType (varType cv)+ -- co is already zonked, but cv might not be+ ; return $+ assertPpr (ok cv_ty)+ (text "Bad coercion hole" <+>+ ppr cv <> colon <+> vcat [ ppr t1, ppr t2, ppr role+ , ppr cv_ty ])+ co }+ | otherwise+ = return co++ where+ (Pair t1 t2, role) = coercionKindRole co+ ok cv_ty | EqPred cv_rel cv_t1 cv_t2 <- classifyPredType cv_ty+ = t1 `eqType` cv_t1+ && t2 `eqType` cv_t2+ && role == eqRelRole cv_rel+ | otherwise+ = False+++{-+************************************************************************+* *+ Zonking constraints+* *+************************************************************************+-}++zonkImplication :: Implication -> ZonkM Implication+zonkImplication implic@(Implic { ic_skols = skols+ , ic_given = given+ , ic_wanted = wanted+ , ic_info = info })+ = do { skols' <- mapM zonkTyCoVarKind skols -- Need to zonk their kinds!+ -- as #7230 showed+ ; given' <- mapM zonkEvVar given+ ; info' <- zonkSkolemInfoAnon info+ ; wanted' <- zonkWCRec wanted+ ; return (implic { ic_skols = skols'+ , ic_given = given'+ , ic_wanted = wanted'+ , ic_info = info' }) }++zonkEvVar :: EvVar -> ZonkM EvVar+zonkEvVar var = updateIdTypeAndMultM zonkTcType var+++zonkWC :: WantedConstraints -> ZonkM WantedConstraints+zonkWC wc = zonkWCRec wc++zonkWCRec :: WantedConstraints -> ZonkM WantedConstraints+zonkWCRec (WC { wc_simple = simple, wc_impl = implic, wc_errors = errs })+ = do { simple' <- zonkSimples simple+ ; implic' <- mapBagM zonkImplication implic+ ; errs' <- mapBagM zonkDelayedError errs+ ; return (WC { wc_simple = simple', wc_impl = implic', wc_errors = errs' }) }++zonkSimples :: Cts -> ZonkM Cts+zonkSimples cts = do { cts' <- mapBagM zonkCt cts+ ; traceZonk "zonkSimples done:" (ppr cts')+ ; return cts' }++zonkDelayedError :: DelayedError -> ZonkM DelayedError+zonkDelayedError (DE_Hole hole)+ = DE_Hole <$> zonkHole hole+zonkDelayedError (DE_NotConcrete err)+ = DE_NotConcrete <$> zonkNotConcreteError err++zonkHole :: Hole -> ZonkM Hole+zonkHole hole@(Hole { hole_ty = ty })+ = do { ty' <- zonkTcType ty+ ; return (hole { hole_ty = ty' }) }++zonkNotConcreteError :: NotConcreteError -> ZonkM NotConcreteError+zonkNotConcreteError err@(NCE_FRR { nce_frr_origin = frr_orig })+ = do { frr_orig <- zonkFRROrigin frr_orig+ ; return $ err { nce_frr_origin = frr_orig } }++zonkFRROrigin :: FixedRuntimeRepOrigin -> ZonkM FixedRuntimeRepOrigin+zonkFRROrigin (FixedRuntimeRepOrigin ty orig)+ = do { ty' <- zonkTcType ty+ ; return $ FixedRuntimeRepOrigin ty' orig }++{- Note [zonkCt behaviour]+~~~~~~~~~~~~~~~~~~~~~~~~~~+zonkCt tries to maintain the canonical form of a Ct. For example,+ - a CDictCan should stay a CDictCan;+ - a CIrredCan should stay a CIrredCan with its cc_reason flag intact++Why?, for example:+- For CDictCan, the @GHC.Tc.Solver.expandSuperClasses@ step, which runs after the+ simple wanted and plugin loop, looks for @CDictCan@s. If a plugin is in use,+ constraints are zonked before being passed to the plugin. This means if we+ don't preserve a canonical form, @expandSuperClasses@ fails to expand+ superclasses. This is what happened in #11525.++- For CIrredCan we want to see if a constraint is insoluble with insolubleWC++On the other hand, we change CEqCan to CNonCanonical, because of all of+CEqCan's invariants, which can break during zonking. (Example: a ~R alpha, where+we have alpha := N Int, where N is a newtype.) Besides, the constraint+will be canonicalised again, so there is little benefit in keeping the+CEqCan structure.++NB: Constraints are always rewritten etc by the canonicaliser in+GHC.Tc.Solver.Solve.solveCt even if they come in as CDictCan. Only canonical+constraints that are actually in the inert set carry all the guarantees. So it+is okay if zonkCt creates e.g. a CDictCan where the cc_tyars are /not/ fully+reduced.+-}++zonkCt :: Ct -> ZonkM Ct+-- See Note [zonkCt behaviour]+zonkCt (CDictCan dict@(DictCt { di_ev = ev, di_tys = args }))+ = do { ev' <- zonkCtEvidence ev+ ; args' <- mapM zonkTcType args+ ; return (CDictCan (dict { di_ev = ev', di_tys = args' })) }++zonkCt (CEqCan (EqCt { eq_ev = ev }))+ = mkNonCanonical <$> zonkCtEvidence ev++zonkCt (CIrredCan ir@(IrredCt { ir_ev = ev })) -- Preserve the ir_reason flag+ = do { ev' <- zonkCtEvidence ev+ ; return (CIrredCan (ir { ir_ev = ev' })) }++zonkCt ct+ = do { fl' <- zonkCtEvidence (ctEvidence ct)+ ; return (mkNonCanonical fl') }++zonkCtEvidence :: CtEvidence -> ZonkM CtEvidence+zonkCtEvidence ctev+ = do { let pred = ctev_pred ctev+ ; pred' <- zonkTcType pred+ ; return (setCtEvPredType ctev pred') }++zonkSkolemInfo :: SkolemInfo -> ZonkM SkolemInfo+zonkSkolemInfo (SkolemInfo u sk) = SkolemInfo u <$> zonkSkolemInfoAnon sk++zonkSkolemInfoAnon :: SkolemInfoAnon -> ZonkM SkolemInfoAnon+zonkSkolemInfoAnon (SigSkol cx ty tv_prs) = do { ty' <- zonkTcType ty+ ; return (SigSkol cx ty' tv_prs) }+zonkSkolemInfoAnon (InferSkol ntys) = do { ntys' <- mapM do_one ntys+ ; return (InferSkol ntys') }+ where+ do_one (n, ty) = do { ty' <- zonkTcType ty; return (n, ty') }+zonkSkolemInfoAnon skol_info = return skol_info++{- Note [Sharing in zonking]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have+ alpha :-> beta :-> gamma :-> ty+where the ":->" means that the unification variable has been+filled in with Indirect. Then when zonking alpha, it'd be nice+to short-circuit beta too, so we end up with+ alpha :-> zty+ beta :-> zty+ gamma :-> zty+where zty is the zonked version of ty. That way, if we come across+beta later, we'll have less work to do. (And indeed the same for+alpha.)++This is easily achieved: just overwrite (Indirect ty) with (Indirect+zty). Non-systematic perf comparisons suggest that this is a modest+win.++But c.f Note [Sharing when zonking to Type] in GHC.Tc.Zonk.Type.++%************************************************************************+%* *+ Tidying+* *+************************************************************************+-}++tcInitTidyEnv :: ZonkM TidyEnv+-- We initialise the "tidy-env", used for tidying types before printing,+-- by building a reverse map from the in-scope type variables to the+-- OccName that the programmer originally used for them+tcInitTidyEnv+ = do { ZonkGblEnv { zge_binder_stack = bndrs } <- getZonkGblEnv+ ; go emptyTidyEnv bndrs }+ where+ go (env, subst) []+ = return (env, subst)+ go (env, subst) (b : bs)+ | TcTvBndr name tyvar <- b+ = do { let (env', occ') = tidyOccName env (nameOccName name)+ name' = tidyNameOcc name occ'+ tyvar1 = setTyVarName tyvar name'+ ; tyvar2 <- zonkTcTyVarToTcTyVar tyvar1+ -- Be sure to zonk here! Tidying applies to zonked+ -- types, so if we don't zonk we may create an+ -- ill-kinded type (#14175)+ ; go (env', extendVarEnv subst tyvar tyvar2) bs }+ | otherwise+ = go (env, subst) bs++-- | Get a 'TidyEnv' that includes mappings for all vars free in the given+-- type. Useful when tidying open types.+tcInitOpenTidyEnv :: [TyCoVar] -> ZonkM TidyEnv+tcInitOpenTidyEnv tvs+ = do { env1 <- tcInitTidyEnv+ ; let env2 = tidyFreeTyCoVars env1 tvs+ ; return env2 }++zonkTidyTcType :: TidyEnv -> TcType -> ZonkM (TidyEnv, TcType)+zonkTidyTcType env ty = do { ty' <- zonkTcType ty+ ; return (tidyOpenType env ty') }++zonkTidyTcTypes :: TidyEnv -> [TcType] -> ZonkM (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 -> ZonkM (TidyEnv, CtOrigin)+zonkTidyOrigin env (GivenOrigin skol_info)+ = do { skol_info1 <- zonkSkolemInfoAnon skol_info+ ; let skol_info2 = tidySkolemInfoAnon env skol_info1+ ; return (env, GivenOrigin skol_info2) }+zonkTidyOrigin env (GivenSCOrigin skol_info sc_depth blocked)+ = do { skol_info1 <- zonkSkolemInfoAnon skol_info+ ; let skol_info2 = tidySkolemInfoAnon env skol_info1+ ; return (env, GivenSCOrigin skol_info2 sc_depth blocked) }+zonkTidyOrigin env orig@(TypeEqOrigin { uo_actual = act+ , uo_expected = exp })+ = do { (env1, act') <- zonkTidyTcType env act+ ; (env2, exp') <- zonkTidyTcType env1 exp+ ; return ( env2, orig { uo_actual = act'+ , uo_expected = exp' }) }+zonkTidyOrigin env (KindEqOrigin ty1 ty2 orig t_or_k)+ = do { (env1, ty1') <- zonkTidyTcType env ty1+ ; (env2, ty2') <- zonkTidyTcType env1 ty2+ ; (env3, orig') <- zonkTidyOrigin env2 orig+ ; return (env3, KindEqOrigin ty1' ty2' orig' t_or_k) }+zonkTidyOrigin env (FunDepOrigin1 p1 o1 l1 p2 o2 l2)+ = do { (env1, p1') <- zonkTidyTcType env p1+ ; (env2, o1') <- zonkTidyOrigin env1 o1+ ; (env3, p2') <- zonkTidyTcType env2 p2+ ; (env4, o2') <- zonkTidyOrigin env3 o2+ ; return (env4, FunDepOrigin1 p1' o1' l1 p2' o2' l2) }+zonkTidyOrigin env (FunDepOrigin2 p1 o1 p2 l2)+ = do { (env1, p1') <- zonkTidyTcType env p1+ ; (env2, p2') <- zonkTidyTcType env1 p2+ ; (env3, o1') <- zonkTidyOrigin env2 o1+ ; return (env3, FunDepOrigin2 p1' o1' p2' l2) }+zonkTidyOrigin env (InjTFOrigin1 pred1 orig1 loc1 pred2 orig2 loc2)+ = do { (env1, pred1') <- zonkTidyTcType env pred1+ ; (env2, orig1') <- zonkTidyOrigin env1 orig1+ ; (env3, pred2') <- zonkTidyTcType env2 pred2+ ; (env4, orig2') <- zonkTidyOrigin env3 orig2+ ; return (env4, InjTFOrigin1 pred1' orig1' loc1 pred2' orig2' loc2) }+zonkTidyOrigin env (CycleBreakerOrigin orig)+ = do { (env1, orig') <- zonkTidyOrigin env orig+ ; return (env1, CycleBreakerOrigin orig') }+zonkTidyOrigin env (InstProvidedOrigin mod cls_inst)+ = do { (env1, is_tys') <- mapAccumLM zonkTidyTcType env (is_tys cls_inst)+ ; return (env1, InstProvidedOrigin mod (cls_inst {is_tys = is_tys'})) }+zonkTidyOrigin env (WantedSuperclassOrigin pty orig)+ = do { (env1, pty') <- zonkTidyTcType env pty+ ; (env2, orig') <- zonkTidyOrigin env1 orig+ ; return (env2, WantedSuperclassOrigin pty' orig') }+zonkTidyOrigin env orig = return (env, orig)++zonkTidyOrigins :: TidyEnv -> [CtOrigin] -> ZonkM (TidyEnv, [CtOrigin])+zonkTidyOrigins = mapAccumLM zonkTidyOrigin++zonkTidyFRRInfos :: TidyEnv+ -> [FixedRuntimeRepErrorInfo]+ -> ZonkM (TidyEnv, [FixedRuntimeRepErrorInfo])+zonkTidyFRRInfos = go []+ where+ go zs env [] = return (env, reverse zs)+ go zs env (FRR_Info { frr_info_origin = FixedRuntimeRepOrigin ty orig+ , frr_info_not_concrete = mb_not_conc } : tys)+ = do { (env, ty) <- zonkTidyTcType env ty+ ; (env, mb_not_conc) <- go_mb_not_conc env mb_not_conc+ ; let info = FRR_Info { frr_info_origin = FixedRuntimeRepOrigin ty orig+ , frr_info_not_concrete = mb_not_conc }+ ; go (info:zs) env tys }++ go_mb_not_conc env Nothing = return (env, Nothing)+ go_mb_not_conc env (Just (tv, ty))+ = do { (env, tv) <- return $ tidyOpenTyCoVar env tv+ ; (env, ty) <- zonkTidyTcType env ty+ ; return (env, Just (tv, ty)) }++----------------+tidyCt :: TidyEnv -> Ct -> Ct+-- Used only in error reporting+tidyCt env = updCtEvidence (tidyCtEvidence env)++tidyCtEvidence :: TidyEnv -> CtEvidence -> CtEvidence+ -- NB: we do not tidy the ctev_evar field because we don't+ -- show it in error messages+tidyCtEvidence env ctev = ctev { ctev_pred = tidyType env ty }+ where+ ty = ctev_pred ctev++tidyHole :: TidyEnv -> Hole -> Hole+tidyHole env h@(Hole { hole_ty = ty }) = h { hole_ty = tidyType env ty }++tidyDelayedError :: TidyEnv -> DelayedError -> DelayedError+tidyDelayedError env (DE_Hole hole)+ = DE_Hole $ tidyHole env hole+tidyDelayedError env (DE_NotConcrete err)+ = DE_NotConcrete $ tidyConcreteError env err++tidyConcreteError :: TidyEnv -> NotConcreteError -> NotConcreteError+tidyConcreteError env err@(NCE_FRR { nce_frr_origin = frr_orig })+ = err { nce_frr_origin = tidyFRROrigin env frr_orig }++tidyFRROrigin :: TidyEnv -> FixedRuntimeRepOrigin -> FixedRuntimeRepOrigin+tidyFRROrigin env (FixedRuntimeRepOrigin ty orig)+ = FixedRuntimeRepOrigin (tidyType env ty) orig++----------------+tidyEvVar :: TidyEnv -> EvVar -> EvVar+tidyEvVar env var = updateIdTypeAndMult (tidyType env) var
+ GHC/Tc/Zonk/Type.hs view
@@ -0,0 +1,1958 @@+{-# LANGUAGE GADTs #-}++{-+(c) The University of Glasgow 2006+(c) The AQUA Project, Glasgow University, 1996-1998+-}++-- | Final zonking to 'Type'. See Note [Zonking to Type].+--+-- Distinct from the intra-typechecker zonking in "GHC.Tc.Zonk.TcType";+-- see Note [Module structure for zonking].+module GHC.Tc.Zonk.Type (+ -- * Zonking+ -- | For a description of "zonking", see Note [What is zonking?].+ ZonkTcM,+ zonkTopDecls, zonkTopExpr, zonkTopLExpr,+ zonkTopBndrs,+ zonkTyVarBindersX, zonkTyVarBinderX,+ zonkTyBndrsX,+ zonkTcTypeToType, zonkTcTypeToTypeX,+ zonkTcTypesToTypesX, zonkScaledTcTypesToTypesX,+ zonkTyVarOcc,+ zonkCoToCo,+ zonkEvBinds, zonkTcEvBinds,+ zonkTcMethInfoToMethInfoX,+ lookupTyVarX,++ -- ** 'ZonkEnv', and the 'ZonkT' and 'ZonkBndrT' monad transformers+ module GHC.Tc.Zonk.Env,++ -- * Coercion holes+ isFilledCoercionHole, unpackCoercionHole, unpackCoercionHole_maybe,++ -- * Rewriter sets+ zonkRewriterSet, zonkCtRewriterSet, zonkCtEvRewriterSet,++ -- * Tidying+ tcInitTidyEnv, tcInitOpenTidyEnv,+++ ) where++import GHC.Prelude++import GHC.Builtin.Types++import GHC.Core.TyCo.Ppr ( pprTyVar )++import GHC.Hs++import {-# SOURCE #-} GHC.Tc.Gen.Splice (runTopSplice)+import GHC.Tc.Types ( TcM )+import GHC.Tc.Types.TcRef+import GHC.Tc.TyCl.Build ( TcMethInfo, MethInfo )+import GHC.Tc.Utils.Env ( tcLookupGlobalOnly )+import GHC.Tc.Utils.TcType+import GHC.Tc.Utils.Monad ( setSrcSpanA, liftZonkM, traceTc, addErr )+import GHC.Tc.Types.Constraint+import GHC.Tc.Types.Evidence+import GHC.Tc.Errors.Types+import GHC.Tc.Zonk.Env+-- Very little shared code between GHC.Tc.Zonk.TcType and GHC.Tc.Zonk.Type.+-- See Note [Module structure for zonking]+import GHC.Tc.Zonk.TcType+ ( tcInitTidyEnv, tcInitOpenTidyEnv+ , writeMetaTyVarRef+ , checkCoercionHole+ , zonkCoVar )++import GHC.Core.Type+import GHC.Core.Coercion+import GHC.Core.TyCon++import GHC.Utils.Outputable+import GHC.Utils.Misc+import GHC.Utils.Monad+import GHC.Utils.Panic+import GHC.Utils.Panic.Plain++import GHC.Core.Multiplicity+import GHC.Core+import GHC.Core.Predicate++import GHC.Types.Name+import GHC.Types.Name.Env+import GHC.Types.Var+import GHC.Types.Var.Env+import GHC.Types.Id+import GHC.Types.TypeEnv+import GHC.Types.Basic+import GHC.Types.SrcLoc+import GHC.Types.Unique.Set+import GHC.Types.Unique.FM+import GHC.Types.TyThing++import GHC.Tc.Types.BasicTypes++import GHC.Data.Maybe+import GHC.Data.Bag++import Control.Monad+import Control.Monad.Trans.Class ( lift )+import Data.Semigroup++{- Note [What is zonking?]+~~~~~~~~~~~~~~~~~~~~~~~~~~+GHC relies heavily on mutability in the typechecker for efficient operation.+For this reason, throughout much of the type checking process, meta type+variables (the MetaTv constructor of TcTyVarDetails) are represented by mutable+variables (known as TcRefs).++Zonking is the process of replacing each such mutable variable with a Type.+This involves traversing the entire type expression, but the interesting part,+replacing the mutable variables, occurs in zonkTyVarOcc.++There are two ways to zonk a Type, using one of two entirely separate zonkers,+that share essentially no code:++* GHC.Tc.Zonk.TcType.zonkTcType, which is used /during/ type checking:+ * It leaves unfilled metavars untouched, so the resulting Type can contain TcTyVars+ * It is only defined for Type and Coercion, not for HsExpr+ * It works in a very stripped-down monad, ZonkM, make it clear that it uses+ very few effects (for example, it can't throw errors).++* GHC.Tc.Zonk.Type.zonkTcTypeToType, is used /after/ typechecking is complete:+ * It always returns a Type with no remaining TcTyVars; no meta-tyvars remain.+ * It does defaulting, replacing an unconstrained TcTyVar with Any, or failing+ (determined by the ZonkFlexi parameter used; see GHC.Tc.Zonk.Type.commitFlexi).+ * It works over HsExpr and HsBinds as well as Type and Coercion. As part of this,+ it also removes the mutable variables in evidence bindings.+ * It works in the full TcM monad, augmented with an environment.+ More precisely, it uses ZonkTcM and ZonkBndrTcM, which augment TcM with a+ ZonkEnv environment using the zonking monad transformers ZonkT and ZonkBndrT+ (see Note [The ZonkEnv] in GHC.Tc.Zonk.Env).++ Why TcM rather than a smaller monad? See Note [Using TcM for zonking to Type].++Note [Module structure for zonking]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+As remarked in Note [What is zonking?], there are really two different zonkers;+we have GHC.Tc.Zonk.TcType for zonking within the typechecker and+GHC.Tc.Zonk.Type for the final zonking pass.++The code relating to zonking is thus split up across the following modules:++ I. Zonking within the typechecker+ 1. GHC.Tc.Zonk.Monad+ 2. GHC.Tc.Zonk.TcType++ II. Final zonking to Type+ 1. GHC.Tc.Zonk.Env+ 2. GHC.Tc.Zonk.Type++I.1. GHC.Tc.Zonk.Monad - the ZonkM monad++ GHC.Tc.Zonk.Monad defines the ZonkM monad, which is a stripped down version+ of TcM which has just enough information to be able to zonk types.++ This is the monad used for zonking inside the typechecker,+ as used in GHC.Tc.Zonk.TcType.++ Crucially, it never errors. It is the monad we use when reporting errors+ (see ErrCtxt), and it would be quite bad if we could error in the middle+ of reporting an error!++I.2. GHC.Tc.Zonk.TcType - zonking types in the typechecker++ GHC.Tc.Zonk.TcType contains code for zonking types and constraints, for use+ within the typechecker. It uses the ZonkM monad.+ For example, it defines:++ zonkTcType :: TcType -> ZonkM TcType+ zonkCt :: Ct -> ZonkM Ct++II.1. GHC.Tc.Zonk.Env - the ZonkEnv and ZonkT/ZonkBndrT monad transformers++ GHC.Tc.Zonk.Env defines the the ZonkT and ZonkBndrT monad transformers.+ These are essentially "ReaderT ZonkEnv" and "StateT ZonkEnv", except+ that ZonkBndrT use continuation-passing style instead of an explicit state.+ See Note [The ZonkEnv] in GHC.Tc.Zonk.Env.++ These are used for the final zonking to type, in GHC.Tc.Zonk.Type.++II.2. GHC.Tc.Zonk.Type - final zonking to type++ GHC.Tc.Zonk.Type is concerned with the "final zonking" pass, after we finish+ typechecking. It zonks not only types, but terms. It uses the monads++ type ZonkTcM = ZonkT TcM+ type ZonkBndrTcM = ZonkBndrTcM++ for example:++ zonkTyBndrX :: TcTyVar -> ZonkBndrTcM TyVar+ zonkTcTypeToTypeX :: TcType -> ZonkT TcM Type++Note that ZonkTcM does a lot more things than ZonkM:++ - it uses a separate ZonkEnv state to accumulate zonked type+ (see Note [The ZonkEnv] in GHC.Tc.Zonk.Env)+ - it defaults type variables,+ (see Note [Un-unified unification variables] in GHC.Tc.Zonk.Env)+ - turns TcTyVars into TyVars,+ - ...++This means that there is essentially no code shared between "GHC.Tc.Zonk.TcType"+and "GHC.Tc.Zonk.Type'; they're really two different zonkers.++Note [Zonking to Type]+~~~~~~~~~~~~~~~~~~~~~~+Zonking to Type is a final zonking pass done *after* typechecking.+It runs over the bindings++ a) to convert TcTyVars to TyVars etc, dereferencing any bindings etc+ b) convert unbound TcTyVar to Void+ c) convert each TcId to an Id by zonking its type++The type variables are converted by binding mutable tyvars to immutable ones+and then zonking as normal.++The Ids are converted by binding them in the normal Tc envt; that+way we maintain sharing; eg an Id is zonked at its binding site and they+all occurrences of that Id point to the common zonked copy++It's all pretty boring stuff, because HsSyn is such a large type, and+the environment manipulation is tiresome.++Note [Sharing when zonking to Type]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Problem:++ In GHC.Tc.Zonk.TcType.zonkTcTyVar, we short-circuit (Indirect ty) to+ (Indirect zty), see Note [Sharing in zonking] in GHC.Tc.Zonk.TcType.+ But we /can't/ do this when zonking a TcType to a Type (#15552, esp comment:3).+ Suppose we have++ alpha -> alpha+ where+ alpha is already unified:+ alpha := T{tc-tycon} Int -> Int+ and T is knot-tied++ By "knot-tied" I mean that the occurrence of T is currently a TcTyCon,+ but the global env contains a mapping "T" :-> T{knot-tied-tc}. See+ Note [Type checking recursive type and class declarations] in+ GHC.Tc.TyCl.++ Now we call zonkTcTypeToType on that (alpha -> alpha). If we follow+ the same path as Note [Sharing in zonking] in GHC.Tc.Zonk.TcType, we'll+ update alpha to+ alpha := T{knot-tied-tc} Int -> Int++ But alas, if we encounter alpha for a /second/ time, we end up+ looking at T{knot-tied-tc} and fall into a black hole. The whole+ point of zonkTcTypeToType is that it produces a type full of+ knot-tied tycons, and you must not look at the result!!++ To put it another way (zonkTcTypeToType . zonkTcTypeToType) is not+ the same as zonkTcTypeToType. (If we distinguished TcType from+ Type, this issue would have been a type error!)++Solutions: (see #15552 for other variants)++One possible solution is simply not to do the short-circuiting.+That has less sharing, but maybe sharing is rare. And indeed,+that usually turns out to be viable from a perf point of view++But zonkTyVarOcc implements something a bit better++* ZonkEnv contains ze_meta_tv_env, which maps+ from a MetaTyVar (unification variable)+ to a Type (not a TcType)++* In zonkTyVarOcc, we check this map to see if we have zonked+ this variable before. If so, use the previous answer; if not+ zonk it, and extend the map.++* The map is of course stateful, held in a TcRef. (That is unlike+ the treatment of lexically-scoped variables in ze_tv_env and+ ze_id_env.)++* In zonkTyVarOcc we read the TcRef to look up the unification+ variable:+ - if we get a hit we use the zonked result;+ - if not, in zonk_meta we see if the variable is `Indirect ty`,+ zonk that, and update the map (in finish_meta)+ But Nota Bene that the "update map" step must re-read the TcRef+ (or, more precisely, use updTcRef) because the zonking of the+ `Indirect ty` may have added lots of stuff to the map. See+ #19668 for an example where this made an asymptotic difference!++Is it worth the extra work of carrying ze_meta_tv_env? Some+non-systematic perf measurements suggest that compiler allocation is+reduced overall (by 0.5% or so) but compile time really doesn't+change. But in some cases it makes a HUGE difference: see test+T9198 and #19668. So yes, it seems worth it.++Note [Using TcM for zonking to Type]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The main zonking monads currently wrap TcM, because we need access to+the full TcM monad in order to expand typed TH splices.+See zonkExpr (HsTypedSplice s _) = ...++After the Typed TH plan has been implemented, this should no longer be necessary,+and we should be able to use a stripped down monad, similar to the ZonkM monad+which we use for zonking within the typechecker (but we will need a place to+accumulate errors).++Note [Inlining ZonkBndrT computations]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Computations that use the ZonkBndrT monad transformer must be inlined:+ZonkBndrT uses continuation-passing style; failing to inline means applying+an unknown continuation (unknown function call), which prevents many+optimisations from taking place.++See test cases T14683, which regresses without these changes.+-}++-- Why do we use TcM below? See Note [Using TcM for zonking to Type]++-- | Zonking monad for a computation that zonks to Type, reading from a 'ZonkEnv'+-- but not extending or modifying it.+--+-- See Note [Zonking to Type].+type ZonkTcM = ZonkT TcM++-- | Zonking monad for a computation that zonks to Type, reading from+-- and extending or modifying a 'ZonkEnv'.+--+-- See Note [Zonking to Type].+type ZonkBndrTcM = ZonkBndrT TcM++wrapLocZonkMA :: (a -> ZonkTcM b) -> GenLocated (SrcSpanAnn' ann) a+ -> ZonkTcM (GenLocated (SrcSpanAnn' ann) b)+wrapLocZonkMA fn (L loc a) = ZonkT $ \ ze ->+ setSrcSpanA loc $+ do { b <- runZonkT (fn a) ze+ ; return (L loc b) }++wrapLocZonkBndrMA :: (a -> ZonkBndrTcM b) -> GenLocated (SrcSpanAnn' ann) a+ -> ZonkBndrTcM (GenLocated (SrcSpanAnn' ann) b)+wrapLocZonkBndrMA fn (L loc a) = ZonkBndrT $ \ k -> ZonkT $ \ ze ->+ setSrcSpanA loc $+ runZonkT ( runZonkBndrT (fn a) $ \ b -> k (L loc b) ) ze++--------------------------------------------------------------------------------++zonkTyBndrsX :: [TcTyVar] -> ZonkBndrTcM [TcTyVar]+zonkTyBndrsX = traverse zonkTyBndrX+{-# INLINE zonkTyBndrsX #-} -- See Note [Inlining ZonkBndrT computations]++zonkTyBndrX :: TcTyVar -> ZonkBndrTcM TyVar+-- This guarantees to return a TyVar (not a TcTyVar)+-- then we add it to the envt, so all occurrences are replaced+--+-- It does not clone: the new TyVar has the sane Name+-- as the old one. This important when zonking the+-- TyVarBndrs of a TyCon, whose Names may scope.+zonkTyBndrX tv+ = assertPpr (isImmutableTyVar tv) (ppr tv <+> dcolon <+> ppr (tyVarKind tv)) $+ do { ki <- noBinders $ zonkTcTypeToTypeX (tyVarKind tv)+ -- Internal names tidy up better, for iface files.+ ; let tv' = mkTyVar (tyVarName tv) ki+ ; extendTyZonkEnv tv'+ ; return tv' }+{-# INLINE zonkTyBndrX #-} -- See Note [Inlining ZonkBndrT computations]++zonkTyVarBindersX :: [VarBndr TcTyVar vis]+ -> ZonkBndrTcM [VarBndr TyVar vis]+zonkTyVarBindersX = traverse zonkTyVarBinderX+{-# INLINE zonkTyVarBindersX #-} -- See Note [Inlining ZonkBndrT computations]++zonkTyVarBinderX :: VarBndr TcTyVar vis+ -> ZonkBndrTcM (VarBndr TyVar vis)+-- Takes a TcTyVar and guarantees to return a TyVar+zonkTyVarBinderX (Bndr tv vis)+ = do { tv' <- zonkTyBndrX tv+ ; return (Bndr tv' vis) }+{-# INLINE zonkTyVarBinderX #-} -- See Note [Inlining ZonkBndrT computations]++zonkTyVarOcc :: HasDebugCallStack => TcTyVar -> ZonkTcM Type+zonkTyVarOcc tv+ = do { ZonkEnv { ze_tv_env = tv_env } <- getZonkEnv++ ; let lookup_in_tv_env -- Look up in the env just as we do for Ids+ = case lookupVarEnv tv_env tv of+ Nothing -> -- TyVar/SkolemTv/RuntimeUnk that isn't in the ZonkEnv+ -- This can happen for RuntimeUnk variables (which+ -- should stay as RuntimeUnk), but I think it should+ -- not happen for SkolemTv.+ mkTyVarTy <$> updateTyVarKindM zonkTcTypeToTypeX tv++ Just tv' -> return (mkTyVarTy tv')++ zonk_meta ref Flexi+ = do { kind <- zonkTcTypeToTypeX (tyVarKind tv)+ ; ty <- commitFlexi tv kind++ ; lift $ liftZonkM $ writeMetaTyVarRef tv ref ty -- Belt and braces+ ; finish_meta ty }++ zonk_meta _ (Indirect ty)+ = do { zty <- zonkTcTypeToTypeX ty+ ; finish_meta zty }++ finish_meta ty+ = do { extendMetaEnv tv ty+ ; return ty }++ ; if isTcTyVar tv+ then case tcTyVarDetails tv of+ SkolemTv {} -> lookup_in_tv_env+ RuntimeUnk {} -> lookup_in_tv_env+ MetaTv { mtv_ref = ref }+ -> do { mb_ty <- lookupMetaTv tv+ -- See Note [Sharing when zonking to Type]+ ; case mb_ty of+ Just ty -> return ty+ Nothing -> do { mtv_details <- readTcRef ref+ ; zonk_meta ref mtv_details } }++ -- This should never really happen;+ -- TyVars should not occur in the typechecker+ else lookup_in_tv_env }++extendMetaEnv :: TcTyVar -> Type -> ZonkTcM ()+extendMetaEnv tv ty =+ ZonkT $ \ ( ZonkEnv { ze_meta_tv_env = mtv_env_ref } ) ->+ updTcRef mtv_env_ref (\env -> extendVarEnv env tv ty)++lookupMetaTv :: TcTyVar -> ZonkTcM (Maybe Type)+lookupMetaTv tv =+ ZonkT $ \ ( ZonkEnv { ze_meta_tv_env = mtv_env_ref } ) ->+ do { mtv_env <- readTcRef mtv_env_ref+ ; return $ lookupVarEnv mtv_env tv }++lookupTyVarX :: TcTyVar -> ZonkTcM TyVar+lookupTyVarX tv+ = do { ZonkEnv { ze_tv_env = tv_env } <- getZonkEnv+ ; let !res = case lookupVarEnv tv_env tv of+ Just tv -> tv+ Nothing -> pprPanic "lookupTyVarOcc" (ppr tv $$ ppr tv_env)+ ; return res }++commitFlexi :: TcTyVar -> Kind -> ZonkTcM Type+commitFlexi tv zonked_kind+ = do { flexi <- ze_flexi <$> getZonkEnv+ ; lift $ case flexi of+ SkolemiseFlexi -> return (mkTyVarTy (mkTyVar name zonked_kind))++ DefaultFlexi+ -- Normally, RuntimeRep variables are defaulted in GHC.Tc.Utils.TcMType.defaultTyVar+ -- But that sees only type variables that appear in, say, an inferred type.+ -- Defaulting here, in the zonker, is needed to catch e.g.+ -- y :: Bool+ -- y = (\x -> True) undefined+ -- We need *some* known RuntimeRep for the x and undefined, but no one+ -- will choose it until we get here, in the zonker.+ | isRuntimeRepTy zonked_kind+ -> do { traceTc "Defaulting flexi tyvar to LiftedRep:" (pprTyVar tv)+ ; return liftedRepTy }+ | isLevityTy zonked_kind+ -> do { traceTc "Defaulting flexi tyvar to Lifted:" (pprTyVar tv)+ ; return liftedDataConTy }+ | isMultiplicityTy zonked_kind+ -> do { traceTc "Defaulting flexi tyvar to Many:" (pprTyVar tv)+ ; return manyDataConTy }+ | Just (ConcreteFRR origin) <- isConcreteTyVar_maybe tv+ -> do { addErr $ TcRnZonkerMessage (ZonkerCannotDefaultConcrete origin)+ ; return (anyTypeOfKind zonked_kind) }+ | otherwise+ -> do { traceTc "Defaulting flexi tyvar to Any:" (pprTyVar tv)+ ; return (anyTypeOfKind zonked_kind) }++ RuntimeUnkFlexi+ -> do { traceTc "Defaulting flexi tyvar to RuntimeUnk:" (pprTyVar tv)+ ; return (mkTyVarTy (mkTcTyVar name zonked_kind RuntimeUnk)) }+ -- This is where RuntimeUnks are born:+ -- otherwise-unconstrained unification variables are+ -- turned into RuntimeUnks as they leave the+ -- typechecker's monad++ NoFlexi -> pprPanic "NoFlexi" (ppr tv <+> dcolon <+> ppr zonked_kind) }++ where+ name = tyVarName tv+++zonkCoVarOcc :: CoVar -> ZonkTcM Coercion+zonkCoVarOcc cv+ = do { ZonkEnv { ze_tv_env = tyco_env } <- getZonkEnv+ -- don't look in the knot-tied env+ ; case lookupVarEnv tyco_env cv of+ Just cv' -> return $ mkCoVarCo cv'+ _ -> mkCoVarCo <$> (lift $ liftZonkM $ zonkCoVar cv) }++zonkCoHole :: CoercionHole -> ZonkTcM Coercion+zonkCoHole hole@(CoercionHole { ch_ref = ref, ch_co_var = cv })+ = do { contents <- readTcRef ref+ ; case contents of+ Just co -> do { co' <- zonkCoToCo co+ ; lift $ liftZonkM $ checkCoercionHole cv co' }++ -- This next case should happen only in the presence of+ -- (undeferred) type errors. Originally, I put in a panic+ -- here, but that caused too many uses of `failIfErrsM`.+ Nothing -> do { lift $ traceTc "Zonking unfilled coercion hole" (ppr hole)+ ; cv' <- lift $ liftZonkM $ zonkCoVar cv+ ; return $ mkCoVarCo cv' } }+ -- This will be an out-of-scope variable, but keeping+ -- this as a coercion hole led to #15787++zonk_tycomapper :: TyCoMapper ZonkEnv TcM+zonk_tycomapper = TyCoMapper+ { tcm_tyvar = \ env tv -> runZonkT (zonkTyVarOcc tv) env+ , tcm_covar = \ env cv -> runZonkT (zonkCoVarOcc cv) env+ , tcm_hole = \ env co -> runZonkT (zonkCoHole co) env+ , tcm_tycobinder = \ env tcv _vis k -> flip runZonkT env $+ runZonkBndrT (zonkTyBndrX tcv) $+ \ tcv' -> ZonkT $ \ env' -> (k env' tcv')+ , tcm_tycon = \ tc -> zonkTcTyConToTyCon tc+ }++-- 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 "GHC.Tc.Zonk.Type".+zonkTcTypeToType :: TcType -> TcM Type+zonkTcTypeToType ty = initZonkEnv DefaultFlexi $ zonkTcTypeToTypeX ty++zonkScaledTcTypeToTypeX :: Scaled TcType -> ZonkTcM (Scaled TcType)+zonkScaledTcTypeToTypeX (Scaled m ty) = Scaled <$> zonkTcTypeToTypeX m+ <*> zonkTcTypeToTypeX ty++zonkTcTypeToTypeX :: TcType -> ZonkTcM Type+zonkTcTypesToTypesX :: [TcType] -> ZonkTcM [Type]+zonkCoToCo :: Coercion -> ZonkTcM Coercion+(zonkTcTypeToTypeX, zonkTcTypesToTypesX, zonkCoToCo)+ = case mapTyCoX zonk_tycomapper of+ (zty, ztys, zco, _) ->+ (ZonkT . flip zty, ZonkT . flip ztys, ZonkT . flip zco)++zonkScaledTcTypesToTypesX :: [Scaled TcType] -> ZonkTcM [Scaled Type]+zonkScaledTcTypesToTypesX scaled_tys =+ mapM zonkScaledTcTypeToTypeX scaled_tys+++zonkEnvIds :: ZonkEnv -> TypeEnv+zonkEnvIds (ZonkEnv { ze_id_env = id_env })+ = mkNameEnv [(getName id, AnId id) | id <- nonDetEltsUFM id_env]+ -- It's OK to use nonDetEltsUFM here because we forget the ordering+ -- immediately by creating a TypeEnv++zonkLIdOcc :: LocatedN TcId -> ZonkTcM (LocatedN Id)+zonkLIdOcc = traverse zonkIdOcc++zonkIdOcc :: TcId -> ZonkTcM Id+-- Ids defined in this module should be in the envt;+-- ignore others. (Actually, data constructors are also+-- not LocalVars, even when locally defined, but that is fine.)+-- (Also foreign-imported things aren't currently in the ZonkEnv;+-- that's ok because they don't need zonking.)+--+-- Actually, Template Haskell works in 'chunks' of declarations, and+-- an earlier chunk won't be in the 'env' that the zonking phase+-- carries around. Instead it'll be in the tcg_gbl_env, already fully+-- zonked. There's no point in looking it up there (except for error+-- checking), and it's not conveniently to hand; hence the simple+-- 'orElse' case in the LocalVar branch.+--+-- Even without template splices, in module Main, the checking of+-- 'main' is done as a separate chunk.+zonkIdOcc id+ | isLocalVar id =+ do { ZonkEnv { ze_id_env = id_env } <- getZonkEnv+ ; return $ lookupVarEnv id_env id `orElse` id }+ | otherwise+ = return id++zonkIdOccs :: [TcId] -> ZonkTcM [Id]+zonkIdOccs ids = traverse zonkIdOcc ids++-- zonkIdBndr is used *after* typechecking to get the Id's type+-- to its final form. The TyVarEnv give+zonkIdBndrX :: TcId -> ZonkBndrTcM Id+zonkIdBndrX v+ = do { id <- noBinders $ zonkIdBndr v+ ; extendIdZonkEnv id+ ; return id }+{-# INLINE zonkIdBndrX #-} -- See Note [Inlining ZonkBndrT computations]++zonkIdBndr :: TcId -> ZonkTcM Id+zonkIdBndr v+ = do { Scaled w' ty' <- zonkScaledTcTypeToTypeX (idScaledType v)+ ; return $ setIdMult (setIdType v ty') w' }++zonkIdBndrs :: [TcId] -> ZonkTcM [Id]+zonkIdBndrs ids = mapM zonkIdBndr ids++zonkTopBndrs :: [TcId] -> TcM [Id]+zonkTopBndrs ids = initZonkEnv DefaultFlexi $ zonkIdBndrs ids++zonkFieldOcc :: FieldOcc GhcTc -> ZonkTcM (FieldOcc GhcTc)+zonkFieldOcc (FieldOcc sel lbl)+ = fmap ((flip FieldOcc) lbl) $ zonkIdBndr sel++zonkEvBndrsX :: [EvVar] -> ZonkBndrTcM [EvVar]+zonkEvBndrsX = traverse zonkEvBndrX+{-# INLINE zonkEvBndrsX #-} -- See Note [Inlining ZonkBndrT computations]++zonkEvBndrX :: EvVar -> ZonkBndrTcM EvVar+-- Works for dictionaries and coercions+zonkEvBndrX var+ = do { var' <- noBinders $ zonkEvBndr var+ ; extendZonkEnv [var']+ ; return var' }+{-# INLINE zonkEvBndr #-} -- See Note [Inlining ZonkBndrT computations]++zonkEvBndr :: EvVar -> ZonkTcM EvVar+-- Works for dictionaries and coercions+-- Does not extend the ZonkEnv+zonkEvBndr var+ = updateIdTypeAndMultM ({-# SCC "zonkEvBndr_zonkTcTypeToType" #-} zonkTcTypeToTypeX) var++{-+zonkEvVarOcc :: EvVar -> ZonkTcM EvTerm+zonkEvVarOcc env v+ | isCoVar v+ = EvCoercion <$> zonkCoVarOcc env v+ | otherwise+ = return (EvId $ zonkIdOcc env v)+-}++zonkCoreBndrX :: Var -> ZonkBndrTcM Var+zonkCoreBndrX v+ | isId v = zonkIdBndrX v+ | otherwise = zonkTyBndrX v+{-# INLINE zonkCoreBndrX #-} -- See Note [Inlining ZonkBndrT computations]++zonkCoreBndrsX :: [Var] -> ZonkBndrTcM [Var]+zonkCoreBndrsX = traverse zonkCoreBndrX+{-# INLINE zonkCoreBndrsX #-} -- See Note [Inlining ZonkBndrT computations]++zonkTopExpr :: HsExpr GhcTc -> TcM (HsExpr GhcTc)+zonkTopExpr e = initZonkEnv DefaultFlexi $ zonkExpr e++zonkTopLExpr :: LHsExpr GhcTc -> TcM (LHsExpr GhcTc)+zonkTopLExpr e = initZonkEnv DefaultFlexi $ zonkLExpr e++zonkTopDecls :: Bag EvBind+ -> LHsBinds GhcTc+ -> [LRuleDecl GhcTc] -> [LTcSpecPrag]+ -> [LForeignDecl GhcTc]+ -> TcM (TypeEnv,+ Bag EvBind,+ LHsBinds GhcTc,+ [LForeignDecl GhcTc],+ [LTcSpecPrag],+ [LRuleDecl GhcTc])+zonkTopDecls ev_binds binds rules imp_specs fords+ = initZonkEnv DefaultFlexi $+ runZonkBndrT (zonkEvBinds ev_binds) $ \ ev_binds' ->+ runZonkBndrT (zonkRecMonoBinds binds) $ \ binds' ->+ -- Top level is implicitly recursive+ do { rules' <- zonkRules rules+ ; specs' <- zonkLTcSpecPrags imp_specs+ ; fords' <- zonkForeignExports fords+ ; ty_env <- zonkEnvIds <$> getZonkEnv+ ; return (ty_env, ev_binds', binds', fords', specs', rules') }+++---------------------------------------------+zonkLocalBinds :: HsLocalBinds GhcTc+ -> ZonkBndrTcM (HsLocalBinds GhcTc)+zonkLocalBinds (EmptyLocalBinds x)+ = return (EmptyLocalBinds x)++zonkLocalBinds (HsValBinds _ (ValBinds {}))+ = panic "zonkLocalBinds" -- Not in typechecker output++zonkLocalBinds (HsValBinds x (XValBindsLR (NValBinds binds sigs)))+ = do { new_binds <- traverse go binds+ ; return (HsValBinds x (XValBindsLR (NValBinds new_binds sigs))) }+ where+ go (r,b)+ = do { b' <- zonkRecMonoBinds b+ ; return (r,b') }++zonkLocalBinds (HsIPBinds x (IPBinds dict_binds binds )) = do+ new_binds <- noBinders $ mapM (wrapLocZonkMA zonk_ip_bind) binds+ extendIdZonkEnvRec [ n | (L _ (IPBind n _ _)) <- new_binds]+ new_dict_binds <- zonkTcEvBinds dict_binds+ return $ HsIPBinds x (IPBinds new_dict_binds new_binds)+ where+ zonk_ip_bind (IPBind dict_id n e)+ = do dict_id' <- zonkIdBndr dict_id+ e' <- zonkLExpr e+ return (IPBind dict_id' n e')++---------------------------------------------+zonkRecMonoBinds :: LHsBinds GhcTc -> ZonkBndrTcM (LHsBinds GhcTc)+zonkRecMonoBinds binds+ = mfix $ \ new_binds ->+ do { extendIdZonkEnvRec (collectHsBindsBinders CollNoDictBinders new_binds)+ ; noBinders $ zonkMonoBinds binds }++---------------------------------------------+zonkMonoBinds :: LHsBinds GhcTc -> ZonkTcM (LHsBinds GhcTc)+zonkMonoBinds binds = mapBagM zonk_lbind binds++zonk_lbind :: LHsBind GhcTc -> ZonkTcM (LHsBind GhcTc)+zonk_lbind = wrapLocZonkMA zonk_bind++zonk_bind :: HsBind GhcTc -> ZonkTcM (HsBind GhcTc)+zonk_bind bind@(PatBind { pat_lhs = pat, pat_rhs = grhss+ , pat_ext = (ty, ticks)})+ = do { new_pat <- don'tBind $ zonkPat pat -- Env already extended+ ; new_grhss <- zonkGRHSs zonkLExpr grhss+ ; new_ty <- zonkTcTypeToTypeX ty+ ; return (bind { pat_lhs = new_pat, pat_rhs = new_grhss+ , pat_ext = (new_ty, ticks) }) }++zonk_bind (VarBind { var_ext = x+ , var_id = var, var_rhs = expr })+ = do { new_var <- zonkIdBndr var+ ; new_expr <- zonkLExpr expr+ ; return (VarBind { var_ext = x+ , var_id = new_var+ , var_rhs = new_expr }) }++zonk_bind bind@(FunBind { fun_id = L loc var+ , fun_matches = ms+ , fun_ext = (co_fn, ticks) })+ = do { new_var <- zonkIdBndr var+ ; runZonkBndrT (zonkCoFn co_fn) $ \ new_co_fn ->+ do { new_ms <- zonkMatchGroup zonkLExpr ms+ ; return (bind { fun_id = L loc new_var+ , fun_matches = new_ms+ , fun_ext = (new_co_fn, ticks) }) } }++zonk_bind (XHsBindsLR (AbsBinds { abs_tvs = tyvars, abs_ev_vars = evs+ , abs_ev_binds = ev_binds+ , abs_exports = exports+ , abs_binds = val_binds+ , abs_sig = has_sig }))+ = assert ( all isImmutableTyVar tyvars ) $+ runZonkBndrT (zonkTyBndrsX tyvars ) $ \ new_tyvars ->+ runZonkBndrT (zonkEvBndrsX evs ) $ \ new_evs ->+ runZonkBndrT (zonkTcEvBinds_s ev_binds) $ \ new_ev_binds ->+ do { (new_val_bind, new_exports) <- mfix $ \ ~(new_val_binds, _) ->+ runZonkBndrT (extendIdZonkEnvRec $ collectHsBindsBinders CollNoDictBinders new_val_binds) $ \ _ ->+ do { new_val_binds <- mapBagM zonk_val_bind val_binds+ ; new_exports <- mapM zonk_export exports+ ; return (new_val_binds, new_exports)+ }+ ; return $ XHsBindsLR $+ AbsBinds { 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 } }+ where+ zonk_val_bind lbind+ | has_sig+ , (L loc bind@(FunBind { fun_id = (L mloc mono_id)+ , fun_matches = ms+ , fun_ext = (co_fn, ticks) })) <- lbind+ = do { new_mono_id <- updateIdTypeAndMultM zonkTcTypeToTypeX mono_id+ -- Specifically /not/ zonkIdBndr; we do not want to+ -- complain about a representation-polymorphic binder+ ; runZonkBndrT (zonkCoFn co_fn) $ \ new_co_fn ->+ do { new_ms <- zonkMatchGroup zonkLExpr ms+ ; return $ L loc $+ bind { fun_id = L mloc new_mono_id+ , fun_matches = new_ms+ , fun_ext = (new_co_fn, ticks) } } }+ | otherwise+ = zonk_lbind lbind -- The normal case++ zonk_export :: ABExport -> ZonkTcM ABExport+ zonk_export (ABE{ abe_wrap = wrap+ , abe_poly = poly_id+ , abe_mono = mono_id+ , abe_prags = prags })+ = do new_poly_id <- zonkIdBndr poly_id+ new_wrap <- don'tBind $ zonkCoFn wrap+ new_prags <- zonkSpecPrags prags+ new_mono_id <- zonkIdOcc mono_id+ return (ABE{ abe_wrap = new_wrap+ , abe_poly = new_poly_id+ , abe_mono = new_mono_id+ , abe_prags = new_prags })++zonk_bind (PatSynBind x bind@(PSB { psb_id = L loc id+ , psb_args = details+ , psb_def = lpat+ , psb_dir = dir }))+ = do { id' <- zonkIdBndr id+ ; runZonkBndrT (zonkPat lpat) $ \ lpat' ->+ do { details' <- zonkPatSynDetails details+ ; dir' <- zonkPatSynDir dir+ ; return $ PatSynBind x $+ bind { psb_id = L loc id'+ , psb_args = details'+ , psb_def = lpat'+ , psb_dir = dir' } } }++zonkPatSynDetails :: HsPatSynDetails GhcTc+ -> ZonkTcM (HsPatSynDetails GhcTc)+zonkPatSynDetails (PrefixCon _ as)+ = PrefixCon noTypeArgs <$> traverse zonkLIdOcc as+zonkPatSynDetails (InfixCon a1 a2)+ = InfixCon <$> zonkLIdOcc a1 <*> zonkLIdOcc a2+zonkPatSynDetails (RecCon flds)+ = RecCon <$> mapM zonkPatSynField flds++zonkPatSynField :: RecordPatSynField GhcTc -> ZonkTcM (RecordPatSynField GhcTc)+zonkPatSynField (RecordPatSynField x y) =+ RecordPatSynField <$> zonkFieldOcc x <*> zonkLIdOcc y++zonkPatSynDir :: HsPatSynDir GhcTc+ -> ZonkTcM (HsPatSynDir GhcTc)+zonkPatSynDir Unidirectional = return Unidirectional+zonkPatSynDir ImplicitBidirectional = return ImplicitBidirectional+zonkPatSynDir (ExplicitBidirectional mg) = ExplicitBidirectional <$> zonkMatchGroup zonkLExpr mg++zonkSpecPrags :: TcSpecPrags -> ZonkTcM TcSpecPrags+zonkSpecPrags IsDefaultMethod = return IsDefaultMethod+zonkSpecPrags (SpecPrags ps) = do { ps' <- zonkLTcSpecPrags ps+ ; return (SpecPrags ps') }++zonkLTcSpecPrags :: [LTcSpecPrag] -> ZonkTcM [LTcSpecPrag]+zonkLTcSpecPrags ps+ = mapM zonk_prag ps+ where+ zonk_prag (L loc (SpecPrag id co_fn inl))+ = do { co_fn' <- don'tBind $ zonkCoFn co_fn+ ; id' <- zonkIdOcc id+ ; return (L loc (SpecPrag id' co_fn' inl)) }++{-+************************************************************************+* *+\subsection[BackSubst-Match-GRHSs]{Match and GRHSs}+* *+************************************************************************+-}++zonkMatchGroup :: Anno (GRHS GhcTc (LocatedA (body GhcTc))) ~ SrcAnn NoEpAnns+ => (LocatedA (body GhcTc) -> ZonkTcM (LocatedA (body GhcTc)))+ -> MatchGroup GhcTc (LocatedA (body GhcTc))+ -> ZonkTcM (MatchGroup GhcTc (LocatedA (body GhcTc)))+zonkMatchGroup zBody (MG { mg_alts = L l ms+ , mg_ext = MatchGroupTc arg_tys res_ty origin+ })+ = do { ms' <- mapM (zonkMatch zBody) ms+ ; arg_tys' <- zonkScaledTcTypesToTypesX arg_tys+ ; res_ty' <- zonkTcTypeToTypeX res_ty+ ; return (MG { mg_alts = L l ms'+ , mg_ext = MatchGroupTc arg_tys' res_ty' origin+ }) }++zonkMatch :: Anno (GRHS GhcTc (LocatedA (body GhcTc))) ~ SrcAnn NoEpAnns+ => (LocatedA (body GhcTc) -> ZonkTcM (LocatedA (body GhcTc)))+ -> LMatch GhcTc (LocatedA (body GhcTc))+ -> ZonkTcM (LMatch GhcTc (LocatedA (body GhcTc)))+zonkMatch zBody (L loc match@(Match { m_pats = pats+ , m_grhss = grhss }))+ = runZonkBndrT (zonkPats pats) $ \ new_pats ->+ do { new_grhss <- zonkGRHSs zBody grhss+ ; return (L loc (match { m_pats = new_pats, m_grhss = new_grhss })) }++-------------------------------------------------------------------------+zonkGRHSs :: Anno (GRHS GhcTc (LocatedA (body GhcTc))) ~ SrcAnn NoEpAnns+ => (LocatedA (body GhcTc) -> ZonkTcM (LocatedA (body GhcTc)))+ -> GRHSs GhcTc (LocatedA (body GhcTc))+ -> ZonkTcM (GRHSs GhcTc (LocatedA (body GhcTc)))++zonkGRHSs zBody (GRHSs x grhss binds) =+ runZonkBndrT (zonkLocalBinds binds) $ \ new_binds ->+ do { new_grhss <- mapM (wrapLocZonkMA zonk_grhs) grhss+ ; return (GRHSs x new_grhss new_binds) }+ where+ zonk_grhs (GRHS xx guarded rhs) =+ runZonkBndrT (zonkStmts zonkLExpr guarded) $ \ new_guarded ->+ GRHS xx new_guarded <$> zBody rhs++{-+************************************************************************+* *+\subsection[BackSubst-HsExpr]{Running a zonkitution over a TypeCheckedExpr}+* *+************************************************************************+-}++zonkLExprs :: [LHsExpr GhcTc] -> ZonkTcM [LHsExpr GhcTc]+zonkLExpr :: LHsExpr GhcTc -> ZonkTcM (LHsExpr GhcTc)+zonkExpr :: HsExpr GhcTc -> ZonkTcM (HsExpr GhcTc)++zonkLExprs exprs = mapM zonkLExpr exprs+zonkLExpr expr = wrapLocZonkMA zonkExpr expr++zonkExpr (HsVar x (L l id))+ = assertPpr (isNothing (isDataConId_maybe id)) (ppr id) $+ do { id' <- zonkIdOcc id+ ; return (HsVar x (L l id')) }++zonkExpr (HsUnboundVar her occ)+ = do her' <- zonk_her her+ return (HsUnboundVar her' occ)+ where+ zonk_her :: HoleExprRef -> ZonkTcM HoleExprRef+ zonk_her (HER ref ty u)+ = do updTcRefM ref zonkEvTerm+ ty' <- zonkTcTypeToTypeX ty+ return (HER ref ty' u)++zonkExpr (HsRecSel _ (FieldOcc v occ))+ = do { v' <- zonkIdOcc v+ ; return (HsRecSel noExtField (FieldOcc v' occ)) }++zonkExpr (HsIPVar x _) = dataConCantHappen x++zonkExpr (HsOverLabel x _ _) = dataConCantHappen x++zonkExpr (HsLit x (HsRat e f ty))+ = do new_ty <- zonkTcTypeToTypeX ty+ return (HsLit x (HsRat e f new_ty))++zonkExpr (HsLit x lit)+ = return (HsLit x lit)++zonkExpr (HsOverLit x lit)+ = do { lit' <- zonkOverLit lit+ ; return (HsOverLit x lit') }++zonkExpr (HsLam x matches)+ = do new_matches <- zonkMatchGroup zonkLExpr matches+ return (HsLam x new_matches)++zonkExpr (HsLamCase x lc_variant matches)+ = do new_matches <- zonkMatchGroup zonkLExpr matches+ return (HsLamCase x lc_variant new_matches)++zonkExpr (HsApp x e1 e2)+ = do new_e1 <- zonkLExpr e1+ new_e2 <- zonkLExpr e2+ return (HsApp x new_e1 new_e2)++zonkExpr (HsAppType ty e at t)+ = do new_e <- zonkLExpr e+ new_ty <- zonkTcTypeToTypeX ty+ return (HsAppType new_ty new_e at t)+ -- NB: the type is an HsType; can't zonk that!++zonkExpr (HsTypedBracket hsb_tc body)+ = (\x -> HsTypedBracket x body) <$> zonkBracket hsb_tc++zonkExpr (HsUntypedBracket hsb_tc body)+ = (\x -> HsUntypedBracket x body) <$> zonkBracket hsb_tc++zonkExpr (HsTypedSplice s _) = ZonkT (\ _ -> runTopSplice s) >>= zonkExpr++zonkExpr (HsUntypedSplice x _) = dataConCantHappen x++zonkExpr (OpApp x _ _ _) = dataConCantHappen x++zonkExpr (NegApp x expr op)+ = runZonkBndrT (zonkSyntaxExpr op) $ \ new_op ->+ do { new_expr <- zonkLExpr expr+ ; return (NegApp x new_expr new_op) }++zonkExpr (HsPar x lpar e rpar)+ = do { new_e <- zonkLExpr e+ ; return (HsPar x lpar new_e rpar) }++zonkExpr (SectionL x _ _) = dataConCantHappen x+zonkExpr (SectionR x _ _) = dataConCantHappen x+zonkExpr (ExplicitTuple x tup_args boxed)+ = do { new_tup_args <- mapM zonk_tup_arg tup_args+ ; return (ExplicitTuple x new_tup_args boxed) }+ where+ zonk_tup_arg (Present x e) = do { e' <- zonkLExpr e+ ; return (Present x e') }+ zonk_tup_arg (Missing t) = do { t' <- zonkScaledTcTypeToTypeX t+ ; return (Missing t') }+++zonkExpr (ExplicitSum args alt arity expr)+ = do new_args <- mapM zonkTcTypeToTypeX args+ new_expr <- zonkLExpr expr+ return (ExplicitSum new_args alt arity new_expr)++zonkExpr (HsCase x expr ms)+ = do new_expr <- zonkLExpr expr+ new_ms <- zonkMatchGroup zonkLExpr ms+ return (HsCase x new_expr new_ms)++zonkExpr (HsIf x e1 e2 e3)+ = do new_e1 <- zonkLExpr e1+ new_e2 <- zonkLExpr e2+ new_e3 <- zonkLExpr e3+ return (HsIf x new_e1 new_e2 new_e3)++zonkExpr (HsMultiIf ty alts)+ = do { alts' <- mapM (wrapLocZonkMA zonk_alt) alts+ ; ty' <- zonkTcTypeToTypeX ty+ ; return $ HsMultiIf ty' alts' }+ where zonk_alt (GRHS x guard expr)+ = runZonkBndrT (zonkStmts zonkLExpr guard) $ \ guard' ->+ do { expr' <- zonkLExpr expr+ ; return $ GRHS x guard' expr' }++zonkExpr (HsLet x tkLet binds tkIn expr)+ = runZonkBndrT (zonkLocalBinds binds) $ \ new_binds ->+ do { new_expr <- zonkLExpr expr+ ; return (HsLet x tkLet new_binds tkIn new_expr) }++zonkExpr (HsDo ty do_or_lc (L l stmts))+ = do new_stmts <- don'tBind $ zonkStmts zonkLExpr stmts+ new_ty <- zonkTcTypeToTypeX ty+ return (HsDo new_ty do_or_lc (L l new_stmts))++zonkExpr (ExplicitList ty exprs)+ = do new_ty <- zonkTcTypeToTypeX ty+ new_exprs <- zonkLExprs exprs+ return (ExplicitList new_ty new_exprs)++zonkExpr expr@(RecordCon { rcon_ext = con_expr, rcon_flds = rbinds })+ = do { new_con_expr <- zonkExpr con_expr+ ; new_rbinds <- zonkRecFields rbinds+ ; return (expr { rcon_ext = new_con_expr+ , rcon_flds = new_rbinds }) }++zonkExpr (ExprWithTySig _ e ty)+ = do { e' <- zonkLExpr e+ ; return (ExprWithTySig noExtField e' ty) }++zonkExpr (ArithSeq expr wit info)+ = do { new_expr <- zonkExpr expr+ ; runZonkBndrT (zonkWit wit) $ \ new_wit ->+ do { new_info <- zonkArithSeq info+ ; return (ArithSeq new_expr new_wit new_info) } }+ where zonkWit Nothing = return Nothing+ zonkWit (Just fln) = Just <$> zonkSyntaxExpr fln++zonkExpr (HsPragE x prag expr)+ = do new_expr <- zonkLExpr expr+ return (HsPragE x prag new_expr)++-- arrow notation extensions+zonkExpr (HsProc x pat body)+ = runZonkBndrT (zonkPat pat) $ \ new_pat ->+ do { new_body <- zonkCmdTop body+ ; return (HsProc x new_pat new_body) }++-- StaticPointers extension+zonkExpr (HsStatic (fvs, ty) expr)+ = do new_ty <- zonkTcTypeToTypeX ty+ HsStatic (fvs, new_ty) <$> zonkLExpr expr++zonkExpr (XExpr (WrapExpr (HsWrap co_fn expr)))+ = runZonkBndrT (zonkCoFn co_fn) $ \ new_co_fn ->+ do new_expr <- zonkExpr expr+ return (XExpr (WrapExpr (HsWrap new_co_fn new_expr)))++zonkExpr (XExpr (ExpansionExpr (HsExpanded a b)))+ = XExpr . ExpansionExpr . HsExpanded a <$> zonkExpr b++zonkExpr (XExpr (ConLikeTc con tvs tys))+ = XExpr . ConLikeTc con tvs <$> mapM zonk_scale tys+ where+ zonk_scale (Scaled m ty) = Scaled <$> zonkTcTypeToTypeX m <*> pure ty+ -- Only the multiplicity can contain unification variables+ -- The tvs come straight from the data-con, and so are strictly redundant+ -- See Wrinkles of Note [Typechecking data constructors] in GHC.Tc.Gen.Head++zonkExpr (RecordUpd x _ _) = dataConCantHappen x+zonkExpr (HsGetField x _ _) = dataConCantHappen x+zonkExpr (HsProjection x _) = dataConCantHappen x+zonkExpr e@(XExpr (HsTick {})) = pprPanic "zonkExpr" (ppr e)+zonkExpr e@(XExpr (HsBinTick {})) = pprPanic "zonkExpr" (ppr e)++-------------------------------------------------------------------------+{-+Note [Skolems in zonkSyntaxExpr]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider rebindable syntax with something like++ (>>=) :: (forall x. blah) -> (forall y. blah') -> blah''++The x and y become skolems that are in scope when type-checking the+arguments to the bind. This means that we must extend the ZonkEnv with+these skolems when zonking the arguments to the bind. But the skolems+are different between the two arguments, and so we should theoretically+carry around different environments to use for the different arguments.++However, this becomes a logistical nightmare, especially in dealing with+the more exotic Stmt forms. So, we simplify by making the critical+assumption that the uniques of the skolems are different. (This assumption+is justified by the use of newUnique in GHC.Tc.Utils.TcMType.instSkolTyCoVarX.)+Now, we can safely just extend one environment.+-}++-- See Note [Skolems in zonkSyntaxExpr]+zonkSyntaxExpr :: SyntaxExpr GhcTc+ -> ZonkBndrTcM (SyntaxExpr GhcTc)+zonkSyntaxExpr (SyntaxExprTc { syn_expr = expr+ , syn_arg_wraps = arg_wraps+ , syn_res_wrap = res_wrap })+ = do { res_wrap' <- zonkCoFn res_wrap+ ; expr' <- noBinders $ zonkExpr expr+ ; arg_wraps' <- traverse zonkCoFn arg_wraps+ ; return SyntaxExprTc { syn_expr = expr'+ , syn_arg_wraps = arg_wraps'+ , syn_res_wrap = res_wrap' } }+zonkSyntaxExpr NoSyntaxExprTc = return NoSyntaxExprTc++-------------------------------------------------------------------------++zonkLCmd :: LHsCmd GhcTc -> ZonkTcM (LHsCmd GhcTc)+zonkCmd :: HsCmd GhcTc -> ZonkTcM (HsCmd GhcTc)++zonkLCmd cmd = wrapLocZonkMA zonkCmd cmd++zonkCmd (XCmd (HsWrap w cmd))+ = runZonkBndrT (zonkCoFn w) $ \ w' ->+ do { cmd' <- zonkCmd cmd+ ; return (XCmd (HsWrap w' cmd')) }+zonkCmd (HsCmdArrApp ty e1 e2 ho rl)+ = do new_e1 <- zonkLExpr e1+ new_e2 <- zonkLExpr e2+ new_ty <- zonkTcTypeToTypeX ty+ return (HsCmdArrApp new_ty new_e1 new_e2 ho rl)++zonkCmd (HsCmdArrForm x op f fixity args)+ = do new_op <- zonkLExpr op+ new_args <- mapM zonkCmdTop args+ return (HsCmdArrForm x new_op f fixity new_args)++zonkCmd (HsCmdApp x c e)+ = do new_c <- zonkLCmd c+ new_e <- zonkLExpr e+ return (HsCmdApp x new_c new_e)++zonkCmd (HsCmdLam x matches)+ = do new_matches <- zonkMatchGroup zonkLCmd matches+ return (HsCmdLam x new_matches)++zonkCmd (HsCmdPar x lpar c rpar)+ = do new_c <- zonkLCmd c+ return (HsCmdPar x lpar new_c rpar)++zonkCmd (HsCmdCase x expr ms)+ = do new_expr <- zonkLExpr expr+ new_ms <- zonkMatchGroup zonkLCmd ms+ return (HsCmdCase x new_expr new_ms)++zonkCmd (HsCmdLamCase x lc_variant ms)+ = do new_ms <- zonkMatchGroup zonkLCmd ms+ return (HsCmdLamCase x lc_variant new_ms)++zonkCmd (HsCmdIf x eCond ePred cThen cElse)+ = runZonkBndrT (zonkSyntaxExpr eCond) $ \ new_eCond ->+ do { new_ePred <- zonkLExpr ePred+ ; new_cThen <- zonkLCmd cThen+ ; new_cElse <- zonkLCmd cElse+ ; return (HsCmdIf x new_eCond new_ePred new_cThen new_cElse) }++zonkCmd (HsCmdLet x tkLet binds tkIn cmd)+ = runZonkBndrT (zonkLocalBinds binds) $ \ new_binds ->+ do new_cmd <- zonkLCmd cmd+ return (HsCmdLet x tkLet new_binds tkIn new_cmd)++zonkCmd (HsCmdDo ty (L l stmts))+ = do new_stmts <- don'tBind $ zonkStmts zonkLCmd stmts+ new_ty <- zonkTcTypeToTypeX ty+ return (HsCmdDo new_ty (L l new_stmts))++++zonkCmdTop :: LHsCmdTop GhcTc -> ZonkTcM (LHsCmdTop GhcTc)+zonkCmdTop cmd = wrapLocZonkMA (zonk_cmd_top) cmd++zonk_cmd_top :: HsCmdTop GhcTc -> ZonkTcM (HsCmdTop GhcTc)+zonk_cmd_top (HsCmdTop (CmdTopTc stack_tys ty ids) cmd)+ = do new_cmd <- zonkLCmd cmd+ new_stack_tys <- zonkTcTypeToTypeX stack_tys+ new_ty <- zonkTcTypeToTypeX ty+ new_ids <- mapSndM zonkExpr ids++ massert (isLiftedTypeKind (typeKind new_stack_tys))+ -- desugarer assumes that this is not representation-polymorphic...+ -- but indeed it should always be lifted due to the typing+ -- rules for arrows++ return (HsCmdTop (CmdTopTc new_stack_tys new_ty new_ids) new_cmd)++-------------------------------------------------------------------------+zonkCoFn :: HsWrapper -> ZonkBndrTcM HsWrapper+zonkCoFn WpHole = return WpHole+zonkCoFn (WpCompose c1 c2) = do { c1' <- zonkCoFn c1+ ; c2' <- zonkCoFn c2+ ; return (WpCompose c1' c2') }+zonkCoFn (WpFun c1 c2 t1) = do { c1' <- zonkCoFn c1+ ; c2' <- zonkCoFn c2+ ; t1' <- noBinders $ zonkScaledTcTypeToTypeX t1+ ; return (WpFun c1' c2' t1') }+zonkCoFn (WpCast co) = WpCast <$> noBinders (zonkCoToCo co)+zonkCoFn (WpEvLam ev) = WpEvLam <$> zonkEvBndrX ev+zonkCoFn (WpEvApp arg) = WpEvApp <$> noBinders (zonkEvTerm arg)+zonkCoFn (WpTyLam tv) = assert (isImmutableTyVar tv) $+ WpTyLam <$> zonkTyBndrX tv+zonkCoFn (WpTyApp ty) = WpTyApp <$> noBinders (zonkTcTypeToTypeX ty)+zonkCoFn (WpLet bs) = WpLet <$> zonkTcEvBinds bs+zonkCoFn (WpMultCoercion co) = WpMultCoercion <$> noBinders (zonkCoToCo co)++-------------------------------------------------------------------------+zonkOverLit :: HsOverLit GhcTc -> ZonkTcM (HsOverLit GhcTc)+zonkOverLit lit@(OverLit {ol_ext = x@OverLitTc { ol_witness = e, ol_type = ty } })+ = do { ty' <- zonkTcTypeToTypeX ty+ ; e' <- zonkExpr e+ ; return (lit { ol_ext = x { ol_witness = e'+ , ol_type = ty' } }) }++-------------------------------------------------------------------------+zonkBracket :: HsBracketTc -> ZonkTcM HsBracketTc+zonkBracket (HsBracketTc hsb_thing ty wrap bs)+ = do wrap' <- traverse zonkQuoteWrap wrap+ bs' <- mapM zonk_b bs+ new_ty <- zonkTcTypeToTypeX ty+ return (HsBracketTc hsb_thing new_ty wrap' bs')+ where+ zonkQuoteWrap (QuoteWrapper ev ty) = do+ ev' <- zonkIdOcc ev+ ty' <- zonkTcTypeToTypeX ty+ return (QuoteWrapper ev' ty')++ zonk_b (PendingTcSplice n e) = do e' <- zonkLExpr e+ return (PendingTcSplice n e')++-------------------------------------------------------------------------+zonkArithSeq :: ArithSeqInfo GhcTc -> ZonkTcM (ArithSeqInfo GhcTc)++zonkArithSeq (From e)+ = do new_e <- zonkLExpr e+ return (From new_e)++zonkArithSeq (FromThen e1 e2)+ = do new_e1 <- zonkLExpr e1+ new_e2 <- zonkLExpr e2+ return (FromThen new_e1 new_e2)++zonkArithSeq (FromTo e1 e2)+ = do new_e1 <- zonkLExpr e1+ new_e2 <- zonkLExpr e2+ return (FromTo new_e1 new_e2)++zonkArithSeq (FromThenTo e1 e2 e3)+ = do new_e1 <- zonkLExpr e1+ new_e2 <- zonkLExpr e2+ new_e3 <- zonkLExpr e3+ return (FromThenTo new_e1 new_e2 new_e3)++-------------------------------------------------------------------------+zonkStmts :: Anno (StmtLR GhcTc GhcTc (LocatedA (body GhcTc))) ~ SrcSpanAnnA+ => (LocatedA (body GhcTc) -> ZonkTcM (LocatedA (body GhcTc)))+ -> [LStmt GhcTc (LocatedA (body GhcTc))]+ -> ZonkBndrTcM [LStmt GhcTc (LocatedA (body GhcTc))]+zonkStmts _ [] = return []+zonkStmts zBody (s:ss) = do { s' <- wrapLocZonkBndrMA (zonkStmt zBody) s+ ; ss' <- zonkStmts zBody ss+ ; return (s' : ss') }++zonkStmt :: Anno (StmtLR GhcTc GhcTc (LocatedA (body GhcTc))) ~ SrcSpanAnnA+ => (LocatedA (body GhcTc) -> ZonkTcM (LocatedA (body GhcTc)))+ -> Stmt GhcTc (LocatedA (body GhcTc))+ -> ZonkBndrTcM (Stmt GhcTc (LocatedA (body GhcTc)))+zonkStmt _ (ParStmt bind_ty stmts_w_bndrs mzip_op bind_op)+ = do { new_bind_op <- zonkSyntaxExpr bind_op+ ; new_bind_ty <- noBinders $ zonkTcTypeToTypeX bind_ty+ ; new_stmts_w_bndrs <- noBinders $ mapM zonk_branch stmts_w_bndrs++ -- Add in the binders after we're done with all the branches.+ ; let new_binders = [ b | ParStmtBlock _ _ bs _ <- new_stmts_w_bndrs+ , b <- bs ]+ ; extendIdZonkEnvRec new_binders+ ; new_mzip <- noBinders $ zonkExpr mzip_op+ ; return (ParStmt new_bind_ty new_stmts_w_bndrs new_mzip new_bind_op)}+ where+ zonk_branch :: ParStmtBlock GhcTc GhcTc+ -> ZonkTcM (ParStmtBlock GhcTc GhcTc)+ zonk_branch (ParStmtBlock x stmts bndrs return_op)+ = runZonkBndrT (zonkStmts zonkLExpr stmts) $ \ new_stmts ->+ runZonkBndrT (zonkSyntaxExpr return_op) $ \ new_return ->+ do { new_bndrs <- zonkIdOccs bndrs+ ; return (ParStmtBlock x new_stmts new_bndrs new_return) }++zonkStmt zBody (RecStmt { recS_stmts = L _ 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_ext =+ RecStmtTc { recS_bind_ty = bind_ty+ , recS_later_rets = later_rets+ , recS_rec_rets = rec_rets+ , recS_ret_ty = ret_ty} })+ = do { new_bind_id <- zonkSyntaxExpr bind_id+ ; new_mfix_id <- zonkSyntaxExpr mfix_id+ ; new_ret_id <- zonkSyntaxExpr ret_id+ ; new_bind_ty <- noBinders $ zonkTcTypeToTypeX bind_ty+ ; new_rvs <- noBinders $ zonkIdBndrs rvs+ ; new_lvs <- noBinders $ zonkIdBndrs lvs+ ; new_ret_ty <- noBinders $ zonkTcTypeToTypeX ret_ty++ -- Zonk the ret-expressions in an environment that+ -- has the polymorphic bindings+ ; rec_stmt <- noBinders $ don'tBind $+ do { extendIdZonkEnvRec new_rvs+ ; new_segStmts <- zonkStmts zBody segStmts+ ; new_later_rets <- noBinders $ mapM zonkExpr later_rets+ ; new_rec_rets <- noBinders $ mapM zonkExpr rec_rets+ ; return $+ RecStmt { recS_stmts = noLocA 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_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 } } }++ -- Only the lvs are needed+ ; extendIdZonkEnvRec new_lvs+ ; return rec_stmt }++zonkStmt zBody (BodyStmt ty body then_op guard_op)+ = do { new_then_op <- zonkSyntaxExpr then_op+ ; new_guard_op <- zonkSyntaxExpr guard_op+ ; new_body <- noBinders $ zBody body+ ; new_ty <- noBinders $ zonkTcTypeToTypeX ty+ ; return $ BodyStmt new_ty new_body new_then_op new_guard_op }++zonkStmt zBody (LastStmt x body noret ret_op)+ = noBinders $ runZonkBndrT (zonkSyntaxExpr ret_op) $ \ new_ret ->+ do { new_body <- zBody body+ ; return $ LastStmt x new_body noret new_ret }++zonkStmt _ (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_ext = bind_arg_ty+ , trS_fmap = liftM_op })+ = do { bind_op' <- zonkSyntaxExpr bind_op+ ; bind_arg_ty' <- noBinders $ zonkTcTypeToTypeX bind_arg_ty+ ; stmts' <- zonkStmts zonkLExpr stmts+ ; by' <- noBinders $ traverse zonkLExpr by+ ; using' <- noBinders $ zonkLExpr using+ ; return_op' <- zonkSyntaxExpr return_op+ ; liftM_op' <- noBinders $ zonkExpr liftM_op+ ; binderMap' <- mapM zonkBinderMapEntry binderMap+ ; return (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_ext = bind_arg_ty'+ , trS_fmap = liftM_op' }) }+ where+ zonkBinderMapEntry (oldBinder, newBinder) = do+ oldBinder' <- noBinders $ zonkIdOcc oldBinder+ newBinder' <- zonkIdBndrX newBinder+ return (oldBinder', newBinder')++zonkStmt _ (LetStmt x binds)+ = LetStmt x <$> zonkLocalBinds binds++zonkStmt zBody (BindStmt xbs pat body)+ = do { new_bind <- zonkSyntaxExpr (xbstc_bindOp xbs)+ ; new_w <- noBinders $ zonkTcTypeToTypeX (xbstc_boundResultMult xbs)+ ; new_bind_ty <- noBinders $ zonkTcTypeToTypeX (xbstc_boundResultType xbs)+ ; new_body <- noBinders $ zBody body+ ; new_fail <- case xbstc_failOp xbs of+ Nothing -> return Nothing+ Just fail_op -> fmap Just <$> noBinders $ don'tBind (zonkSyntaxExpr fail_op)++ ; new_pat <- zonkPat pat+ ; return $+ BindStmt+ (XBindStmtTc+ { xbstc_bindOp = new_bind+ , xbstc_boundResultType = new_bind_ty+ , xbstc_boundResultMult = new_w+ , xbstc_failOp = new_fail+ })+ new_pat new_body }++-- Scopes: join > ops (in reverse order) > pats (in forward order)+-- > rest of stmts+zonkStmt _zBody (ApplicativeStmt body_ty args mb_join)+ = do { new_mb_join <- zonk_join mb_join+ ; new_args <- zonk_args args+ ; new_body_ty <- noBinders $ zonkTcTypeToTypeX body_ty+ ; return $ ApplicativeStmt new_body_ty new_args new_mb_join }+ where+ zonk_join Nothing = return Nothing+ zonk_join (Just j) = Just <$> zonkSyntaxExpr j++ get_pat :: (SyntaxExpr GhcTc, ApplicativeArg GhcTc) -> LPat GhcTc+ get_pat (_, ApplicativeArgOne _ pat _ _) = pat+ get_pat (_, ApplicativeArgMany _ _ _ pat _) = pat++ replace_pat :: LPat GhcTc+ -> (SyntaxExpr GhcTc, ApplicativeArg GhcTc)+ -> (SyntaxExpr GhcTc, ApplicativeArg GhcTc)+ replace_pat pat (op, ApplicativeArgOne fail_op _ a isBody)+ = (op, ApplicativeArgOne fail_op pat a isBody)+ replace_pat pat (op, ApplicativeArgMany x a b _ c)+ = (op, ApplicativeArgMany x a b pat c)++ zonk_args args+ = do { new_args_rev <- zonk_args_rev (reverse args)+ ; new_pats <- zonkPats (map get_pat args)+ ; return $ zipWithEqual "zonkStmt" replace_pat+ new_pats (reverse new_args_rev) }++ -- these need to go backward, because if any operators are higher-rank,+ -- later operators may introduce skolems that are in scope for earlier+ -- arguments+ zonk_args_rev ((op, arg) : args)+ = do { new_op <- zonkSyntaxExpr op+ ; new_arg <- noBinders $ zonk_arg arg+ ; new_args <- zonk_args_rev args+ ; return $ (new_op, new_arg) : new_args }+ zonk_args_rev [] = return []++ zonk_arg (ApplicativeArgOne fail_op pat expr isBody)+ = do { new_expr <- zonkLExpr expr+ ; new_fail <- forM fail_op $ don'tBind . zonkSyntaxExpr+ ; return (ApplicativeArgOne new_fail pat new_expr isBody) }+ zonk_arg (ApplicativeArgMany x stmts ret pat ctxt)+ = runZonkBndrT (zonkStmts zonkLExpr stmts) $ \ new_stmts ->+ do { new_ret <- zonkExpr ret+ ; return (ApplicativeArgMany x new_stmts new_ret pat ctxt) }++-------------------------------------------------------------------------+zonkRecFields :: HsRecordBinds GhcTc -> ZonkTcM (HsRecordBinds GhcTc)+zonkRecFields (HsRecFields flds dd)+ = do { flds' <- mapM zonk_rbind flds+ ; return (HsRecFields flds' dd) }+ where+ zonk_rbind (L l fld)+ = do { new_id <- wrapLocZonkMA zonkFieldOcc (hfbLHS fld)+ ; new_expr <- zonkLExpr (hfbRHS fld)+ ; return (L l (fld { hfbLHS = new_id+ , hfbRHS = new_expr })) }++{-+************************************************************************+* *+\subsection[BackSubst-Pats]{Patterns}+* *+************************************************************************+-}++zonkPat :: LPat GhcTc -> ZonkBndrTcM (LPat GhcTc)+-- Extend the environment as we go, because it's possible for one+-- pattern to bind something that is used in another (inside or+-- to the right)+zonkPat pat = wrapLocZonkBndrMA zonk_pat pat++zonk_pat :: Pat GhcTc -> ZonkBndrTcM (Pat GhcTc)+zonk_pat (ParPat x lpar p rpar)+ = do { p' <- zonkPat p+ ; return (ParPat x lpar p' rpar) }++zonk_pat (WildPat ty)+ = do { ty' <- noBinders $ zonkTcTypeToTypeX ty+ ; return (WildPat ty') }++zonk_pat (VarPat x (L l v))+ = do { v' <- zonkIdBndrX v+ ; return (VarPat x (L l v')) }++zonk_pat (LazyPat x pat)+ = do { pat' <- zonkPat pat+ ; return (LazyPat x pat') }++zonk_pat (BangPat x pat)+ = do { pat' <- zonkPat pat+ ; return (BangPat x pat') }++zonk_pat (AsPat x (L loc v) at pat)+ = do { v' <- zonkIdBndrX v+ ; pat' <- zonkPat pat+ ; return (AsPat x (L loc v') at pat') }++zonk_pat (ViewPat ty expr pat)+ = do { expr' <- noBinders $ zonkLExpr expr+ ; pat' <- zonkPat pat+ ; ty' <- noBinders $ zonkTcTypeToTypeX ty+ ; return (ViewPat ty' expr' pat') }++zonk_pat (ListPat ty pats)+ = do { ty' <- noBinders $ zonkTcTypeToTypeX ty+ ; pats' <- zonkPats pats+ ; return (ListPat ty' pats') }++zonk_pat (TuplePat tys pats boxed)+ = do { tys' <- noBinders $ mapM zonkTcTypeToTypeX tys+ ; pats' <- zonkPats pats+ ; return (TuplePat tys' pats' boxed) }++zonk_pat (SumPat tys pat alt arity )+ = do { tys' <- noBinders $ mapM zonkTcTypeToTypeX tys+ ; pat' <- zonkPat pat+ ; return (SumPat tys' pat' alt arity) }++zonk_pat p@(ConPat { pat_args = args+ , pat_con_ext = p'@(ConPatTc+ { cpt_tvs = tyvars+ , cpt_dicts = evs+ , cpt_binds = binds+ , cpt_wrap = wrapper+ , cpt_arg_tys = tys+ })+ })+ = assert (all isImmutableTyVar tyvars) $+ do { new_tys <- noBinders $ mapM zonkTcTypeToTypeX tys+ ; new_tyvars <- zonkTyBndrsX tyvars+ -- Must zonk the existential variables, because their+ -- /kind/ need potential zonking.+ -- cf typecheck/should_compile/tc221.hs+ ; new_evs <- zonkEvBndrsX evs+ ; new_binds <- zonkTcEvBinds binds+ ; new_wrapper <- zonkCoFn wrapper+ ; new_args <- zonkConStuff args+ ; pure $ p+ { pat_args = new_args+ , pat_con_ext = p'+ { cpt_arg_tys = new_tys+ , cpt_tvs = new_tyvars+ , cpt_dicts = new_evs+ , cpt_binds = new_binds+ , cpt_wrap = new_wrapper+ }+ }+ }++zonk_pat (LitPat x lit) = return (LitPat x lit)++zonk_pat (SigPat ty pat hs_ty)+ = do { ty' <- noBinders $ zonkTcTypeToTypeX ty+ ; pat' <- zonkPat pat+ ; return (SigPat ty' pat' hs_ty) }++zonk_pat (NPat ty (L l lit) mb_neg eq_expr)+ = do { eq_expr' <- zonkSyntaxExpr eq_expr+ ; mb_neg' <- case mb_neg of+ Nothing -> return Nothing+ Just n -> Just <$> zonkSyntaxExpr n+ ; noBinders $+ do { lit' <- zonkOverLit lit+ ; ty' <- zonkTcTypeToTypeX ty+ ; return (NPat ty' (L l lit') mb_neg' eq_expr') } }++zonk_pat (NPlusKPat ty (L loc n) (L l lit1) lit2 e1 e2)+ = do { e1' <- zonkSyntaxExpr e1+ ; e2' <- zonkSyntaxExpr e2+ ; lit1' <- noBinders $ zonkOverLit lit1+ ; lit2' <- noBinders $ zonkOverLit lit2+ ; ty' <- noBinders $ zonkTcTypeToTypeX ty+ ; n' <- zonkIdBndrX n+ ; return (NPlusKPat ty' (L loc n') (L l lit1') lit2' e1' e2') }++zonk_pat (XPat ext) = case ext of+ { ExpansionPat orig pat->+ do { pat' <- zonk_pat pat+ ; return $ XPat $ ExpansionPat orig pat' }+ ; CoPat co_fn pat ty ->+ do { co_fn' <- zonkCoFn co_fn+ ; pat' <- zonkPat (noLocA pat)+ ; ty' <- noBinders $ zonkTcTypeToTypeX ty+ ; return (XPat $ CoPat co_fn' (unLoc pat') ty')+ } }++zonk_pat pat = pprPanic "zonk_pat" (ppr pat)++---------------------------+zonkConStuff :: HsConPatDetails GhcTc+ -> ZonkBndrTcM (HsConPatDetails GhcTc)+zonkConStuff (PrefixCon tyargs pats)+ = do { pats' <- zonkPats pats+ ; return (PrefixCon tyargs pats') }++zonkConStuff (InfixCon p1 p2)+ = do { p1' <- zonkPat p1+ ; p2' <- zonkPat p2+ ; return (InfixCon p1' p2') }++zonkConStuff (RecCon (HsRecFields rpats dd))+ = do { pats' <- zonkPats (map (hfbRHS . unLoc) rpats)+ ; let rpats' = zipWith (\(L l rp) p' ->+ L l (rp { hfbRHS = p' }))+ rpats pats'+ ; return (RecCon (HsRecFields rpats' dd)) }+ -- Field selectors have declared types; hence no zonking++---------------------------+zonkPats :: [LPat GhcTc] -> ZonkBndrTcM [LPat GhcTc]+zonkPats = traverse zonkPat++{-+************************************************************************+* *+\subsection[BackSubst-Foreign]{Foreign exports}+* *+************************************************************************+-}++zonkForeignExports :: [LForeignDecl GhcTc]+ -> ZonkTcM [LForeignDecl GhcTc]+zonkForeignExports ls = mapM (wrapLocZonkMA zonkForeignExport) ls++zonkForeignExport :: ForeignDecl GhcTc -> ZonkTcM (ForeignDecl GhcTc)+zonkForeignExport (ForeignExport { fd_name = i, fd_e_ext = co+ , fd_fe = spec })+ = do { i' <- zonkLIdOcc i+ ; return (ForeignExport { fd_name = i'+ , fd_sig_ty = undefined, fd_e_ext = co+ , fd_fe = spec }) }+zonkForeignExport for_imp+ = return for_imp -- Foreign imports don't need zonking++zonkRules :: [LRuleDecl GhcTc] -> ZonkTcM [LRuleDecl GhcTc]+zonkRules rs = mapM (wrapLocZonkMA zonkRule) rs++zonkRule :: RuleDecl GhcTc -> ZonkTcM (RuleDecl GhcTc)+zonkRule rule@(HsRule { rd_tmvs = tm_bndrs{-::[RuleBndr TcId]-}+ , rd_lhs = lhs+ , rd_rhs = rhs })+ = runZonkBndrT (traverse zonk_tm_bndr tm_bndrs) $ \ new_tm_bndrs ->+ do { -- See Note [Zonking the LHS of a RULE]+ ; new_lhs <- setZonkType SkolemiseFlexi $ zonkLExpr lhs+ ; new_rhs <- zonkLExpr rhs+ ; return $ rule { rd_tmvs = new_tm_bndrs+ , rd_lhs = new_lhs+ , rd_rhs = new_rhs } }+ where+ zonk_tm_bndr :: LRuleBndr GhcTc -> ZonkBndrTcM (LRuleBndr GhcTc)+ zonk_tm_bndr (L l (RuleBndr x (L loc v)))+ = do { v' <- zonk_it v+ ; return (L l (RuleBndr x (L loc v'))) }+ zonk_tm_bndr (L _ (RuleBndrSig {})) = panic "zonk_tm_bndr RuleBndrSig"++ zonk_it v+ | isId v = zonkIdBndrX v+ | otherwise = assert (isImmutableTyVar v)+ zonkTyBndrX v+ -- DV: used to be "return v", but that is plain+ -- wrong because we may need to go inside the kind+ -- of v and zonk there!++{-+************************************************************************+* *+ Constraints and evidence+* *+************************************************************************+-}++zonkEvTerm :: EvTerm -> ZonkTcM EvTerm+zonkEvTerm (EvExpr e)+ = EvExpr <$> zonkCoreExpr e+zonkEvTerm (EvTypeable ty ev)+ = EvTypeable <$> zonkTcTypeToTypeX ty <*> zonkEvTypeable ev+zonkEvTerm (EvFun { et_tvs = tvs, et_given = evs+ , et_binds = ev_binds, et_body = body_id })+ = runZonkBndrT (zonkTyBndrsX tvs) $ \ new_tvs ->+ runZonkBndrT (zonkEvBndrsX evs) $ \ new_evs ->+ runZonkBndrT (zonkTcEvBinds ev_binds) $ \ new_ev_binds ->+ do { new_body_id <- zonkIdOcc body_id+ ; return (EvFun { et_tvs = new_tvs, et_given = new_evs+ , et_binds = new_ev_binds, et_body = new_body_id }) }++zonkCoreExpr :: CoreExpr -> ZonkTcM CoreExpr+zonkCoreExpr (Var v)+ | isCoVar v+ = Coercion <$> zonkCoVarOcc v+ | otherwise+ = Var <$> zonkIdOcc v+zonkCoreExpr (Lit l)+ = return $ Lit l+zonkCoreExpr (Coercion co)+ = Coercion <$> zonkCoToCo co+zonkCoreExpr (Type ty)+ = Type <$> zonkTcTypeToTypeX ty++zonkCoreExpr (Cast e co)+ = Cast <$> zonkCoreExpr e <*> zonkCoToCo co+zonkCoreExpr (Tick t e)+ = Tick t <$> zonkCoreExpr e -- Do we need to zonk in ticks?++zonkCoreExpr (App e1 e2)+ = App <$> zonkCoreExpr e1 <*> zonkCoreExpr e2+zonkCoreExpr (Lam v e)+ = runZonkBndrT (zonkCoreBndrX v) $ \ v' ->+ Lam v' <$> zonkCoreExpr e+zonkCoreExpr (Let bind e)+ = runZonkBndrT (zonkCoreBind bind) $ \ bind' ->+ Let bind' <$> zonkCoreExpr e+zonkCoreExpr (Case scrut b ty alts)+ = do { scrut' <- zonkCoreExpr scrut+ ; ty' <- zonkTcTypeToTypeX ty+ ; runZonkBndrT (zonkIdBndrX b) $ \ b' ->+ do { alts' <- mapM zonkCoreAlt alts+ ; return $ Case scrut' b' ty' alts' } }++zonkCoreAlt :: CoreAlt -> ZonkTcM CoreAlt+zonkCoreAlt (Alt dc bndrs rhs)+ = runZonkBndrT (zonkCoreBndrsX bndrs) $ \ bndrs' ->+ do { rhs' <- zonkCoreExpr rhs+ ; return $ Alt dc bndrs' rhs' }++zonkCoreBind :: CoreBind -> ZonkBndrTcM CoreBind+zonkCoreBind (NonRec v e)+ = do { (v',e') <- noBinders $ zonkCorePair (v,e)+ ; extendIdZonkEnv v'+ ; return (NonRec v' e') }+zonkCoreBind (Rec pairs)+ = do pairs' <- mfix go+ return $ Rec pairs'+ where+ go new_pairs = do+ extendIdZonkEnvRec (map fst new_pairs)+ noBinders $ mapM zonkCorePair pairs++zonkCorePair :: (CoreBndr, CoreExpr) -> ZonkTcM (CoreBndr, CoreExpr)+zonkCorePair (v,e) =+ do { v' <- zonkIdBndr v+ ; e' <- zonkCoreExpr e+ ; return (v',e') }++zonkEvTypeable :: EvTypeable -> ZonkTcM EvTypeable+zonkEvTypeable (EvTypeableTyCon tycon e)+ = do { e' <- mapM zonkEvTerm e+ ; return $ EvTypeableTyCon tycon e' }+zonkEvTypeable (EvTypeableTyApp t1 t2)+ = do { t1' <- zonkEvTerm t1+ ; t2' <- zonkEvTerm t2+ ; return (EvTypeableTyApp t1' t2') }+zonkEvTypeable (EvTypeableTrFun tm t1 t2)+ = do { tm' <- zonkEvTerm tm+ ; t1' <- zonkEvTerm t1+ ; t2' <- zonkEvTerm t2+ ; return (EvTypeableTrFun tm' t1' t2') }+zonkEvTypeable (EvTypeableTyLit t1)+ = do { t1' <- zonkEvTerm t1+ ; return (EvTypeableTyLit t1') }++zonkTcEvBinds_s :: [TcEvBinds] -> ZonkBndrTcM [TcEvBinds]+zonkTcEvBinds_s bs = do { bs' <- traverse zonk_tc_ev_binds bs+ ; return ([EvBinds (unionManyBags bs')]) }++zonkTcEvBinds :: TcEvBinds -> ZonkBndrTcM TcEvBinds+zonkTcEvBinds bs = do { bs' <- zonk_tc_ev_binds bs+ ; return (EvBinds bs') }++zonk_tc_ev_binds :: TcEvBinds -> ZonkBndrTcM (Bag EvBind)+zonk_tc_ev_binds (TcEvBinds var) = zonkEvBindsVar var+zonk_tc_ev_binds (EvBinds bs) = zonkEvBinds bs++zonkEvBindsVar :: EvBindsVar -> ZonkBndrTcM (Bag EvBind)+zonkEvBindsVar (EvBindsVar { ebv_binds = ref })+ = do { bs <- readTcRef ref+ ; zonkEvBinds (evBindMapBinds bs) }+zonkEvBindsVar (CoEvBindsVar {}) = return emptyBag++zonkEvBinds :: Bag EvBind -> ZonkBndrTcM (Bag EvBind)+zonkEvBinds binds+ = {-# SCC "zonkEvBinds" #-}+ mfix $ \ new_binds ->+ do { extendIdZonkEnvRec (collect_ev_bndrs new_binds)+ ; noBinders $ mapBagM zonkEvBind binds }+ where+ collect_ev_bndrs :: Bag EvBind -> [EvVar]+ collect_ev_bndrs = foldr add []+ add (EvBind { eb_lhs = var }) vars = var : vars++zonkEvBind :: EvBind -> ZonkTcM EvBind+zonkEvBind bind@(EvBind { eb_lhs = var, eb_rhs = term })+ = do { var' <- {-# SCC "zonkEvBndr" #-} zonkEvBndr var++ -- Optimise the common case of Refl coercions+ -- See Note [Optimise coercion zonking]+ -- This has a very big effect on some programs (eg #5030)++ ; term' <- case getEqPredTys_maybe (idType var') of+ Just (r, ty1, ty2) | ty1 `eqType` ty2+ -> return (evCoercion (mkReflCo r ty1))+ _other -> zonkEvTerm term++ ; return (bind { eb_lhs = var', eb_rhs = term' }) }++{- Note [Optimise coercion zonking]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When optimising evidence binds we may come across situations where+a coercion looks like+ cv = ReflCo ty+or cv1 = cv2+where the type 'ty' is big. In such cases it is a waste of time to zonk both+ * The variable on the LHS+ * The coercion on the RHS+Rather, we can zonk the variable, and if its type is (ty ~ ty), we can just+use Refl on the right, ignoring the actual coercion on the RHS.++This can have a very big effect, because the constraint solver sometimes does go+to a lot of effort to prove Refl! (Eg when solving 10+3 = 10+3; cf #5030)+-}++zonkTcMethInfoToMethInfoX :: TcMethInfo -> ZonkTcM MethInfo+zonkTcMethInfoToMethInfoX (name, ty, gdm_spec)+ = do { ty' <- zonkTcTypeToTypeX ty+ ; gdm_spec' <- zonk_gdm gdm_spec+ ; return (name, ty', gdm_spec') }+ where+ zonk_gdm :: Maybe (DefMethSpec (SrcSpan, TcType))+ -> ZonkTcM (Maybe (DefMethSpec (SrcSpan, Type)))+ zonk_gdm Nothing = return Nothing+ zonk_gdm (Just VanillaDM) = return (Just VanillaDM)+ zonk_gdm (Just (GenericDM (loc, ty)))+ = do { ty' <- zonkTcTypeToTypeX ty+ ; return (Just (GenericDM (loc, ty'))) }++---------------------------------------+{- Note [Zonking the LHS of a RULE]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+See also GHC.HsToCore.Binds Note [Free tyvars on rule LHS]++We need to gather the type variables mentioned on the LHS so we can+quantify over them. Example:+ data T a = C++ foo :: T a -> Int+ foo C = 1++ {-# RULES "myrule" foo C = 1 #-}++After type checking the LHS becomes (foo alpha (C alpha)) and we do+not want to zap the unbound meta-tyvar 'alpha' to Any, because that+limits the applicability of the rule. Instead, we want to quantify+over it!++We do this in two stages.++* During zonking, we skolemise the TcTyVar 'alpha' to TyVar 'a'. We+ do this by using zonkTvSkolemising as the UnboundTyVarZonker in the+ ZonkEnv. (This is in fact the whole reason that the ZonkEnv has a+ UnboundTyVarZonker.)++* In GHC.HsToCore.Binds, we quantify over it. See GHC.HsToCore.Binds+ Note [Free tyvars on rule LHS]++Quantifying here is awkward because (a) the data type is big and (b)+finding the free type vars of an expression is necessarily monadic+operation. (consider /\a -> f @ b, where b is side-effected to a)+-}++{-+************************************************************************+* *+ Checking for coercion holes+* *+************************************************************************+-}++-- | Is a coercion hole filled in?+isFilledCoercionHole :: CoercionHole -> TcM Bool+isFilledCoercionHole (CoercionHole { ch_ref = ref })+ = isJust <$> readTcRef ref++-- | Retrieve the contents of a coercion hole. Panics if the hole+-- is unfilled+unpackCoercionHole :: CoercionHole -> TcM Coercion+unpackCoercionHole hole+ = do { contents <- unpackCoercionHole_maybe hole+ ; case contents of+ Just co -> return co+ Nothing -> pprPanic "Unfilled coercion hole" (ppr hole) }++-- | Retrieve the contents of a coercion hole, if it is filled+unpackCoercionHole_maybe :: CoercionHole -> TcM (Maybe Coercion)+unpackCoercionHole_maybe (CoercionHole { ch_ref = ref }) = readTcRef ref++zonkCtRewriterSet :: Ct -> TcM Ct+zonkCtRewriterSet ct+ | isGivenCt ct+ = return ct+ | otherwise+ = case ct of+ CEqCan eq@(EqCt { eq_ev = ev }) -> do { ev' <- zonkCtEvRewriterSet ev+ ; return (CEqCan (eq { eq_ev = ev' })) }+ CIrredCan ir@(IrredCt { ir_ev = ev }) -> do { ev' <- zonkCtEvRewriterSet ev+ ; return (CIrredCan (ir { ir_ev = ev' })) }+ CDictCan di@(DictCt { di_ev = ev }) -> do { ev' <- zonkCtEvRewriterSet ev+ ; return (CDictCan (di { di_ev = ev' })) }+ CQuantCan {} -> return ct+ CNonCanonical ev -> do { ev' <- zonkCtEvRewriterSet ev+ ; return (CNonCanonical ev') }++zonkCtEvRewriterSet :: CtEvidence -> TcM CtEvidence+zonkCtEvRewriterSet ev@(CtGiven {})+ = return ev+zonkCtEvRewriterSet ev@(CtWanted { ctev_rewriters = rewriters })+ = do { rewriters' <- zonkRewriterSet rewriters+ ; return (ev { ctev_rewriters = rewriters' }) }++-- | Check whether any coercion hole in a RewriterSet is still unsolved.+-- Does this by recursively looking through filled coercion holes until+-- one is found that is not yet filled in, at which point this aborts.+zonkRewriterSet :: RewriterSet -> TcM RewriterSet+zonkRewriterSet (RewriterSet set)+ = nonDetStrictFoldUniqSet go (return emptyRewriterSet) set+ -- this does not introduce non-determinism, because the only+ -- monadic action is to read, and the combining function is+ -- commutative+ where+ go :: CoercionHole -> TcM RewriterSet -> TcM RewriterSet+ go hole m_acc = unionRewriterSet <$> check_hole hole <*> m_acc++ check_hole :: CoercionHole -> TcM RewriterSet+ check_hole hole = do { m_co <- unpackCoercionHole_maybe hole+ ; case m_co of+ Nothing -> return (unitRewriterSet hole)+ Just co -> unUCHM (check_co co) }++ check_ty :: Type -> UnfilledCoercionHoleMonoid+ check_co :: Coercion -> UnfilledCoercionHoleMonoid+ (check_ty, _, check_co, _) = foldTyCo folder ()++ folder :: TyCoFolder () UnfilledCoercionHoleMonoid+ folder = TyCoFolder { tcf_view = noView+ , tcf_tyvar = \ _ tv -> check_ty (tyVarKind tv)+ , tcf_covar = \ _ cv -> check_ty (varType cv)+ , tcf_hole = \ _ -> UCHM . check_hole+ , tcf_tycobinder = \ _ _ _ -> () }++newtype UnfilledCoercionHoleMonoid = UCHM { unUCHM :: TcM RewriterSet }++instance Semigroup UnfilledCoercionHoleMonoid where+ UCHM l <> UCHM r = UCHM (unionRewriterSet <$> l <*> r)++instance Monoid UnfilledCoercionHoleMonoid where+ mempty = UCHM (return emptyRewriterSet)
GHC/ThToHs.hs view
@@ -2,6 +2,7 @@ {-# LANGUAGE ConstrainedClassMethods #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -27,10 +28,9 @@ ) where -import GHC.Prelude hiding (head, init, last, tail)+import GHC.Prelude hiding (init, last, tail) import GHC.Hs as Hs-import GHC.Builtin.Names import GHC.Tc.Errors.Types import GHC.Types.Name.Reader import qualified GHC.Types.Name as Name@@ -63,13 +63,13 @@ import Data.List.NonEmpty( NonEmpty (..), nonEmpty ) import qualified Data.List.NonEmpty as NE import Data.Maybe( catMaybes, isNothing )-import Data.Word (Word64) import Language.Haskell.TH as TH hiding (sigP) import Language.Haskell.TH.Syntax as TH import Foreign.ForeignPtr import Foreign.Ptr import System.IO.Unsafe + ------------------------------------------------------------------- -- The external interface @@ -276,13 +276,13 @@ cvtDec (NewtypeD ctxt tc tvs ksig constr derivs) = do { (ctxt', tc', tvs') <- cvt_tycl_hdr ctxt tc tvs ; ksig' <- cvtKind `traverse` ksig- ; con' <- cvtConstr cNameN constr+ ; con' <- cvtDataDefnCons False ksig $ NewTypeCon constr ; derivs' <- cvtDerivs derivs ; let defn = HsDataDefn { dd_ext = noExtField , dd_cType = Nothing , dd_ctxt = mkHsContextMaybe ctxt' , dd_kindSig = ksig'- , dd_cons = NewTypeCon con'+ , dd_cons = con' , dd_derivs = derivs' } ; returnJustLA $ TyClD noExtField $ DataDecl { tcdDExt = noAnn@@ -327,10 +327,10 @@ where overlap pragma = case pragma of- TH.Overlaps -> Hs.Overlaps (SourceText "OVERLAPS")- TH.Overlappable -> Hs.Overlappable (SourceText "OVERLAPPABLE")- TH.Overlapping -> Hs.Overlapping (SourceText "OVERLAPPING")- TH.Incoherent -> Hs.Incoherent (SourceText "INCOHERENT")+ TH.Overlaps -> Hs.Overlaps (SourceText $ fsLit "OVERLAPS")+ TH.Overlappable -> Hs.Overlappable (SourceText $ fsLit "OVERLAPPABLE")+ TH.Overlapping -> Hs.Overlapping (SourceText $ fsLit "OVERLAPPING")+ TH.Incoherent -> Hs.Incoherent (SourceText $ fsLit "INCOHERENT") @@ -348,13 +348,13 @@ cvtDec (DataInstD ctxt bndrs tys ksig constrs derivs) = do { (ctxt', tc', bndrs', typats') <- cvt_datainst_hdr ctxt bndrs tys ; ksig' <- cvtKind `traverse` ksig- ; cons' <- mapM (cvtConstr cNameN) constrs+ ; cons' <- cvtDataDefnCons False ksig $ DataTypeCons False constrs ; derivs' <- cvtDerivs derivs ; let defn = HsDataDefn { dd_ext = noExtField , dd_cType = Nothing , dd_ctxt = mkHsContextMaybe ctxt' , dd_kindSig = ksig'- , dd_cons = DataTypeCons False cons'+ , dd_cons = cons' , dd_derivs = derivs' } ; returnJustLA $ InstD noExtField $ DataFamInstD@@ -370,13 +370,14 @@ cvtDec (NewtypeInstD ctxt bndrs tys ksig constr derivs) = do { (ctxt', tc', bndrs', typats') <- cvt_datainst_hdr ctxt bndrs tys ; ksig' <- cvtKind `traverse` ksig- ; con' <- cvtConstr cNameN constr+ ; con' <- cvtDataDefnCons False ksig $ NewTypeCon constr ; derivs' <- cvtDerivs derivs ; let defn = HsDataDefn { dd_ext = noExtField , dd_cType = Nothing , dd_ctxt = mkHsContextMaybe ctxt' , dd_kindSig = ksig'- , dd_cons = NewTypeCon con', dd_derivs = derivs' }+ , dd_cons = con'+ , dd_derivs = derivs' } ; returnJustLA $ InstD noExtField $ DataFamInstD { dfid_ext = noExtField , dfid_inst = DataFamInstDecl { dfid_eqn =@@ -441,7 +442,8 @@ cvtArgs (TH.PrefixPatSyn args) = Hs.PrefixCon noTypeArgs <$> mapM vNameN args cvtArgs (TH.InfixPatSyn a1 a2) = Hs.InfixCon <$> vNameN a1 <*> vNameN a2 cvtArgs (TH.RecordPatSyn sels)- = do { sels' <- mapM (fmap (\ (L li i) -> FieldOcc noExtField (L li i)) . vNameN) sels+ = do { let mk_fld = fldNameN (nameBase nm)+ ; sels' <- mapM (fmap (\ (L li i) -> FieldOcc noExtField (L li i)) . mk_fld) sels ; vars' <- mapM (vNameN . mkNameS . nameBase) sels ; return $ Hs.RecCon $ zipWith RecordPatSynField sels' vars' } @@ -465,7 +467,7 @@ = failWith InvalidImplicitParamBinding -- Convert a @data@ declaration.-cvtDataDec :: TH.Cxt -> TH.Name -> [TH.TyVarBndr ()]+cvtDataDec :: TH.Cxt -> TH.Name -> [TH.TyVarBndr TH.BndrVis] -> Maybe TH.Kind -> [TH.Con] -> [TH.DerivClause] -> CvtM (Maybe (LHsDecl GhcPs)) cvtDataDec = cvtGenDataDec False@@ -473,17 +475,39 @@ -- Convert a @type data@ declaration. -- These have neither contexts nor derived clauses. -- See Note [Type data declarations] in GHC.Rename.Module.-cvtTypeDataDec :: TH.Name -> [TH.TyVarBndr ()] -> Maybe TH.Kind -> [TH.Con]+cvtTypeDataDec :: TH.Name -> [TH.TyVarBndr TH.BndrVis] -> Maybe TH.Kind -> [TH.Con] -> CvtM (Maybe (LHsDecl GhcPs)) cvtTypeDataDec tc tvs ksig constrs = cvtGenDataDec True [] tc tvs ksig constrs [] -- Convert a @data@ or @type data@ declaration (flagged by the Bool arg). -- See Note [Type data declarations] in GHC.Rename.Module.-cvtGenDataDec :: Bool -> TH.Cxt -> TH.Name -> [TH.TyVarBndr ()]+cvtGenDataDec :: Bool -> TH.Cxt -> TH.Name -> [TH.TyVarBndr TH.BndrVis] -> Maybe TH.Kind -> [TH.Con] -> [TH.DerivClause] -> CvtM (Maybe (LHsDecl GhcPs)) cvtGenDataDec type_data ctxt tc tvs ksig constrs derivs+ = do { (ctxt', tc', tvs') <- cvt_tycl_hdr ctxt tc tvs+ ; ksig' <- cvtKind `traverse` ksig+ ; cons' <- cvtDataDefnCons type_data ksig $+ DataTypeCons type_data constrs+ ; derivs' <- cvtDerivs derivs+ ; let defn = HsDataDefn { dd_ext = noExtField+ , dd_cType = Nothing+ , dd_ctxt = mkHsContextMaybe ctxt'+ , dd_kindSig = ksig'+ , dd_cons = cons'+ , dd_derivs = derivs' }+ ; returnJustLA $ TyClD noExtField $+ DataDecl { tcdDExt = noAnn+ , tcdLName = tc', tcdTyVars = tvs'+ , tcdFixity = Prefix+ , tcdDataDefn = defn } }++-- Convert a set of data constructors.+cvtDataDefnCons ::+ Bool -> Maybe TH.Kind ->+ DataDefnCons TH.Con -> CvtM (DataDefnCons (LConDecl GhcPs))+cvtDataDefnCons type_data ksig constrs = do { let isGadtCon (GadtC _ _ _) = True isGadtCon (RecGadtC _ _ _) = True isGadtCon (ForallC _ _ c) = isGadtCon c@@ -501,22 +525,17 @@ (failWith CannotMixGADTConsWith98Cons) ; unless (isNothing ksig || isGadtDecl) (failWith KindSigsOnlyAllowedOnGADTs)- ; (ctxt', tc', tvs') <- cvt_tycl_hdr ctxt tc tvs- ; ksig' <- cvtKind `traverse` ksig- ; cons' <- mapM (cvtConstr con_name) constrs- ; derivs' <- cvtDerivs derivs- ; let defn = HsDataDefn { dd_ext = noExtField- , dd_cType = Nothing- , dd_ctxt = mkHsContextMaybe ctxt'- , dd_kindSig = ksig'- , dd_cons = DataTypeCons type_data cons'- , dd_derivs = derivs' }- ; returnJustLA $ TyClD noExtField $- DataDecl { tcdDExt = noAnn- , tcdLName = tc', tcdTyVars = tvs'- , tcdFixity = Prefix- , tcdDataDefn = defn } } + ; let first_datacon =+ case firstDataDefnCon constrs of+ Nothing -> panic "cvtDataDefnCons: empty list of constructors"+ Just con -> con+ first_datacon_name =+ case get_cons_names first_datacon of+ [] -> panic "cvtDataDefnCons: data constructor with no names"+ c:_ -> c+ ; mapM (cvtConstr first_datacon_name con_name) constrs }+ ---------------- cvtTySynEqn :: TySynEqn -> CvtM (LTyFamInstEqn GhcPs) cvtTySynEqn (TySynEqn mb_bndrs lhs rhs)@@ -569,7 +588,7 @@ ; return (listToBag binds', sigs', fams', ats', adts') } -----------------cvt_tycl_hdr :: TH.Cxt -> TH.Name -> [TH.TyVarBndr ()]+cvt_tycl_hdr :: TH.Cxt -> TH.Name -> [TH.TyVarBndr TH.BndrVis] -> CvtM ( LHsContext GhcPs , LocatedN RdrName , LHsQTyVars GhcPs)@@ -650,31 +669,32 @@ -- Data types --------------------------------------------------- -cvtConstr :: (TH.Name -> CvtM (LocatedN RdrName)) -- ^ convert constructor name- -> TH.Con -> CvtM (LConDecl GhcPs)+cvtConstr :: TH.Name -- ^ name of first constructor of parent type+ -> (TH.Name -> CvtM (LocatedN RdrName)) -- ^ convert constructor name+ -> TH.Con -> CvtM (LConDecl GhcPs) -cvtConstr con_name (NormalC c strtys)- = do { c' <- con_name c+cvtConstr _ do_con_name (NormalC c strtys)+ = do { c' <- do_con_name c ; tys' <- mapM cvt_arg strtys ; returnLA $ mkConDeclH98 noAnn c' Nothing Nothing (PrefixCon noTypeArgs (map hsLinear tys')) } -cvtConstr con_name (RecC c varstrtys)- = do { c' <- con_name c- ; args' <- mapM cvt_id_arg varstrtys+cvtConstr parent_con do_con_name (RecC c varstrtys)+ = do { c' <- do_con_name c+ ; args' <- mapM (cvt_id_arg parent_con) varstrtys ; con_decl <- wrapParLA (mkConDeclH98 noAnn c' Nothing Nothing . RecCon) args' ; returnLA con_decl } -cvtConstr con_name (InfixC st1 c st2)- = do { c' <- con_name c+cvtConstr _ do_con_name (InfixC st1 c st2)+ = do { c' <- do_con_name c ; st1' <- cvt_arg st1 ; st2' <- cvt_arg st2 ; returnLA $ mkConDeclH98 noAnn c' Nothing Nothing (InfixCon (hsLinear st1') (hsLinear st2')) } -cvtConstr con_name (ForallC tvs ctxt con)+cvtConstr parent_con do_con_name (ForallC tvs ctxt con) = do { tvs' <- cvtTvs tvs ; ctxt' <- cvtContext funPrec ctxt- ; L _ con' <- cvtConstr con_name con+ ; L _ con' <- cvtConstr parent_con do_con_name con ; returnLA $ add_forall tvs' ctxt' con' } where add_cxt lcxt Nothing = mkHsContextMaybe lcxt@@ -702,20 +722,20 @@ where all_tvs = tvs' ++ ex_tvs -cvtConstr con_name (GadtC c strtys ty) = case nonEmpty c of+cvtConstr _ do_con_name (GadtC c strtys ty) = case nonEmpty c of Nothing -> failWith GadtNoCons Just c -> do- { c' <- mapM con_name c+ { c' <- mapM do_con_name c ; args <- mapM cvt_arg strtys ; ty' <- cvtType ty ; mk_gadt_decl c' (PrefixConGADT $ map hsLinear args) ty'} -cvtConstr con_name (RecGadtC c varstrtys ty) = case nonEmpty c of+cvtConstr parent_con do_con_name (RecGadtC c varstrtys ty) = case nonEmpty c of Nothing -> failWith RecGadtNoCons Just c -> do- { c' <- mapM con_name c+ { c' <- mapM do_con_name c ; ty' <- cvtType ty- ; rec_flds <- mapM cvt_id_arg varstrtys+ ; rec_flds <- mapM (cvt_id_arg parent_con) varstrtys ; lrec_flds <- returnLA rec_flds ; mk_gadt_decl c' (RecConGADT lrec_flds noHsUniTok) ty' } @@ -751,9 +771,10 @@ ss' = cvtSrcStrictness ss ; returnLA $ HsBangTy noAnn (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' <- vNameN i+cvt_id_arg :: TH.Name -- ^ parent constructor name+ -> (TH.Name, TH.Bang, TH.Type) -> CvtM (LConDeclField GhcPs)+cvt_id_arg parent_con (i, str, ty)+ = do { L li i' <- fldNameN (nameBase parent_con) i ; ty' <- cvt_arg (str,ty) ; returnLA $ ConDeclField { cd_fld_ext = noAnn@@ -782,8 +803,8 @@ -- and are inserted verbatim, analogous to mkImport in GHC.Parser.PostProcess | callconv == TH.Prim || callconv == TH.JavaScript -> mk_imp (CImport (L l $ quotedSourceText from) (L l (cvt_conv callconv)) (L l safety') Nothing- (CFunction (StaticTarget (SourceText from)- (mkFastString from) Nothing+ (CFunction (StaticTarget (SourceText fromtxt)+ fromtxt Nothing True))) | Just impspec <- parseCImport (L l (cvt_conv callconv)) (L l safety') (mkFastString (TH.nameBase nm))@@ -792,6 +813,7 @@ | otherwise -> failWith $ InvalidCCallImpent from } where+ fromtxt = mkFastString from mk_imp impspec = do { nm' <- vNameN nm ; ty' <- cvtSigType ty@@ -809,8 +831,9 @@ = do { nm' <- vNameN nm ; ty' <- cvtSigType ty ; l <- getL- ; let e = CExport (L l (SourceText as)) (L l (CExportStatic (SourceText as)- (mkFastString as)+ ; let astxt = mkFastString as+ ; let e = CExport (L l (SourceText astxt)) (L l (CExportStatic (SourceText astxt)+ astxt (cvt_conv callconv))) ; return $ ForeignExport { fd_e_ext = noAnn , fd_name = nm'@@ -830,11 +853,14 @@ cvtPragmaD :: Pragma -> CvtM (Maybe (LHsDecl GhcPs)) cvtPragmaD (InlineP nm inline rm phases)- = do { nm' <- vNameN nm+ = do { -- NB: Use vcNameN here, which works for both the variable namespace+ -- (e.g., `INLINE`d functions) and the constructor namespace+ -- (e.g., `INLINE`d pattern synonyms, cf. #23203)+ nm' <- vcNameN nm ; let dflt = dfltActivation inline- ; let src TH.NoInline = "{-# NOINLINE"- src TH.Inline = "{-# INLINE"- src TH.Inlinable = "{-# INLINABLE"+ ; let src TH.NoInline = fsLit "{-# NOINLINE"+ src TH.Inline = fsLit "{-# INLINE"+ src TH.Inlinable = fsLit "{-# INLINABLE" ; let ip = InlinePragma { inl_src = toSrcTxt inline , inl_inline = cvtInline inline (toSrcTxt inline) , inl_rule = cvtRuleMatch rm@@ -852,20 +878,20 @@ , inl_act = NeverActive , inl_sat = Nothing } where- srcTxt = SourceText "{-# OPAQUE"+ srcTxt = SourceText $ fsLit "{-# OPAQUE" ; returnJustLA $ Hs.SigD noExtField $ InlineSig noAnn nm' ip } cvtPragmaD (SpecialiseP nm ty inline phases) = do { nm' <- vNameN nm ; ty' <- cvtSigType ty- ; let src TH.NoInline = "{-# SPECIALISE NOINLINE"- src TH.Inline = "{-# SPECIALISE INLINE"- src TH.Inlinable = "{-# SPECIALISE INLINE"+ ; let src TH.NoInline = fsLit "{-# SPECIALISE NOINLINE"+ src TH.Inline = fsLit "{-# SPECIALISE INLINE"+ src TH.Inlinable = fsLit "{-# SPECIALISE INLINE" ; let (inline', dflt, srcText) = case inline of Just inline1 -> (cvtInline inline1 (toSrcTxt inline1), dfltActivation inline1, toSrcTxt inline1) Nothing -> (NoUserInlinePrag, AlwaysActive,- SourceText "{-# SPECIALISE")+ SourceText $ fsLit "{-# SPECIALISE") where toSrcTxt a = SourceText $ src a ; let ip = InlinePragma { inl_src = srcText@@ -878,7 +904,7 @@ cvtPragmaD (SpecialiseInstP ty) = do { ty' <- cvtSigType ty ; returnJustLA $ Hs.SigD noExtField $- SpecInstSig (noAnn, (SourceText "{-# SPECIALISE")) ty' }+ SpecInstSig (noAnn, (SourceText $ fsLit "{-# SPECIALISE")) ty' } cvtPragmaD (RuleP nm ty_bndrs tm_bndrs lhs rhs phases) = do { let nm' = mkFastString nm@@ -897,7 +923,7 @@ , rd_lhs = lhs' , rd_rhs = rhs' } ; returnJustLA $ Hs.RuleD noExtField- $ HsRules { rds_ext = (noAnn, SourceText "{-# RULES")+ $ HsRules { rds_ext = (noAnn, SourceText $ fsLit "{-# RULES") , rds_rules = [rule] } }@@ -913,7 +939,7 @@ n' <- vcName n wrapParLA ValueAnnProvenance n' ; returnJustLA $ Hs.AnnD noExtField- $ HsAnnotation (noAnn, (SourceText "{-# ANN")) target' exp'+ $ HsAnnotation (noAnn, (SourceText $ fsLit "{-# ANN")) target' exp' } -- NB: This is the only place in GHC.ThToHs that makes use of the `setL`@@ -1116,7 +1142,10 @@ ; flds' <- mapM (cvtFld (wrapParLA mkAmbiguousFieldOcc)) flds- ; return $ RecordUpd noAnn e' (Left flds') }+ ; return $ RecordUpd noAnn e' $+ RegularRecUpdFields+ { xRecUpdFields = noExtField+ , recUpdFields = flds' } } cvt (StaticE e) = fmap (HsStatic noAnn) $ cvtl e cvt (UnboundVarE s) = do -- Use of 'vcName' here instead of 'vName' is -- important, because UnboundVarE may contain@@ -1130,6 +1159,10 @@ (L noSrcSpanA (DotFieldOcc noAnn (L noSrcSpanA (FieldLabelString (fsLit f))))) } cvt (ProjectionE xs) = return $ HsProjection noAnn $ fmap (L noSrcSpanA . DotFieldOcc noAnn . L noSrcSpanA . FieldLabelString . fsLit) xs+ cvt (TypedSpliceE e) = do { e' <- parenthesizeHsExpr appPrec <$> cvtl e+ ; return $ HsTypedSplice (noAnn, noAnn) e' }+ cvt (TypedBracketE e) = do { e' <- cvtl e+ ; return $ HsTypedBracket noAnn e' } {- | #16895 Ensure an infix expression's operator is a variable/constructor. Consider this example:@@ -1374,7 +1407,7 @@ -- "GHC.ThToHs", hence panic quotedSourceText :: String -> SourceText-quotedSourceText s = SourceText $ "\"" ++ s ++ "\""+quotedSourceText s = SourceText $ fsLit $ "\"" ++ s ++ "\"" cvtPats :: [TH.Pat] -> CvtM [Hs.LPat GhcPs] cvtPats pats = mapM cvtPat pats@@ -1443,8 +1476,7 @@ ; return $ ListPat noAnn ps'} cvtp (SigP p t) = do { p' <- cvtPat p; t' <- cvtType t- ; let pp = parenthesizePat sigPrec p'- ; return $ SigPat noAnn pp (mkHsPatSigType noAnn t') }+ ; return $ SigPat noAnn p' (mkHsPatSigType noAnn t') } cvtp (ViewP e p) = do { e' <- cvtl e; p' <- cvtPat p ; return $ ViewPat noAnn e' p'} @@ -1490,6 +1522,10 @@ cvtFlag TH.SpecifiedSpec = Hs.SpecifiedSpec cvtFlag TH.InferredSpec = Hs.InferredSpec +instance CvtFlag TH.BndrVis (HsBndrVis GhcPs) where+ cvtFlag TH.BndrReq = HsBndrRequired+ cvtFlag TH.BndrInvis = HsBndrInvisible noHsTok+ cvtTvs :: CvtFlag flag flag' => [TH.TyVarBndr flag] -> CvtM [LHsTyVarBndr flag' GhcPs] cvtTvs tvs = mapM cvt_tv tvs @@ -1797,8 +1833,9 @@ case arg of HsValArg ty -> do p_ty <- add_parens ty mk_apps (HsAppTy noExtField phead_ty p_ty) args- HsTypeArg l ki -> do p_ki <- add_parens ki- mk_apps (HsAppKindTy l phead_ty p_ki) args+ HsTypeArg at ki ->+ do p_ki <- add_parens ki+ mk_apps (HsAppKindTy noExtField phead_ty at p_ki) args HsArgPar _ -> mk_apps (HsParTy noAnn phead_ty) args go type_args@@ -1843,7 +1880,7 @@ where go (AppT f a) as' = do { a' <- cvtType a; go f (HsValArg a':as') } go (AppKindT ty ki) as' = do { ki' <- cvtKind ki- ; go ty (HsTypeArg noSrcSpan ki':as') }+ ; go ty (HsTypeArg noHsTok ki' : as') } go (ParensT t) as' = do { loc <- getL; go t (HsArgPar loc: as') } go f as = return (f,as) @@ -2053,6 +2090,13 @@ tconNameN n = wrapLN (tconName n) tconName n = cvtName OccName.tcClsName n +-- Field names+fldName :: String -> TH.Name -> CvtM RdrName+fldName con n = cvtName (OccName.fieldName $ fsLit con) n++fldNameN :: String -> TH.Name -> CvtM (LocatedN RdrName)+fldNameN con n = wrapLN (fldName con n)+ ipName :: String -> CvtM HsIPName ipName n = do { unless (okVarOcc n) (failWith (IllegalOccName OccName.varName n))@@ -2132,18 +2176,21 @@ where -- guessed_ns are the name spaces guessed from looking at the TH name guessed_nss- | isLexCon (mkFastString occ_str) = [OccName.tcName, OccName.dataName]- | otherwise = [OccName.varName, OccName.tvName]+ | isLexCon occ_txt = [OccName.tcName, OccName.dataName]+ | isLexVarSym occ_txt = [OccName.tcName, OccName.varName] -- #23525+ | otherwise = [OccName.varName, OccName.tvName] occ_str = TH.occString occ+ occ_txt = mkFastString occ_str -- The packing and unpacking is rather turgid :-( mk_occ :: OccName.NameSpace -> String -> OccName.OccName mk_occ ns occ = OccName.mkOccName ns occ mk_ghc_ns :: TH.NameSpace -> OccName.NameSpace-mk_ghc_ns TH.DataName = OccName.dataName-mk_ghc_ns TH.TcClsName = OccName.tcClsName-mk_ghc_ns TH.VarName = OccName.varName+mk_ghc_ns TH.DataName = OccName.dataName+mk_ghc_ns TH.TcClsName = OccName.tcClsName+mk_ghc_ns TH.VarName = OccName.varName+mk_ghc_ns (TH.FldName con) = OccName.fieldName (fsLit con) mk_mod :: TH.ModName -> ModuleName mk_mod mod = mkModuleName (TH.modString mod)@@ -2151,7 +2198,7 @@ mk_pkg :: TH.PkgName -> Unit mk_pkg pkg = stringToUnit (TH.pkgString pkg) -mk_uniq :: Word64 -> Unique+mk_uniq :: Int -> Unique mk_uniq u = mkUniqueGrimily u {-
GHC/Types/Avail.hs view
@@ -7,33 +7,18 @@ module GHC.Types.Avail ( Avails, AvailInfo(..),- avail,- availField,- availTC, availsToNameSet,- availsToNameSetWithSelectors, availsToNameEnv, availExportsDecl,- availName, availGreName,- availNames, availNonFldNames,- availNamesWithSelectors,- availFlds,- availGreNames,- availSubordinateGreNames,+ availName,+ availNames,+ availSubordinateNames, stableAvailCmp, plusAvail, trimAvail, filterAvail, filterAvails, nubAvails,-- GreName(..),- greNameMangledName,- greNamePrintableName,- greNameSrcSpan,- greNameFieldLabel,- partitionGreNames,- stableGreNameCmp, ) where import GHC.Prelude@@ -41,9 +26,7 @@ import GHC.Types.Name import GHC.Types.Name.Env import GHC.Types.Name.Set-import GHC.Types.SrcLoc -import GHC.Types.FieldLabel import GHC.Utils.Binary import GHC.Data.List.SetOps import GHC.Utils.Outputable@@ -52,10 +35,8 @@ import Control.DeepSeq import Data.Data ( Data )-import Data.Either ( partitionEithers ) import Data.Functor.Classes ( liftCompare ) import Data.List ( find )-import Data.Maybe import qualified Data.Semigroup as S -- -----------------------------------------------------------------------------@@ -66,7 +47,7 @@ -- | An ordinary identifier in scope, or a field label without a parent type -- (see Note [Representing pattern synonym fields in AvailInfo]).- = Avail GreName+ = Avail Name -- | A type or class in scope --@@ -75,74 +56,19 @@ -- -- > AvailTC Eq [Eq, ==, \/=] | AvailTC- Name -- ^ The name of the type or class- [GreName] -- ^ The available pieces of type or class- -- (see Note [Representing fields in AvailInfo]).+ Name -- ^ The name of the type or class+ [Name] -- ^ The available pieces of type or class - deriving ( Eq -- ^ Used when deciding if the interface has changed- , Data )+ deriving Data -- | A collection of 'AvailInfo' - several things that are \"available\" type Avails = [AvailInfo] -{--Note [Representing fields in AvailInfo]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See also Note [FieldLabel] in GHC.Types.FieldLabel.--When -XDuplicateRecordFields is disabled (the normal case), a-datatype like-- data T = MkT { foo :: Int }--gives rise to the AvailInfo-- AvailTC T [T, MkT, FieldLabel "foo" NoDuplicateRecordFields FieldSelectors foo]--whereas if -XDuplicateRecordFields is enabled it gives-- AvailTC T [T, MkT, FieldLabel "foo" DuplicateRecordFields FieldSelectors $sel:foo:MkT]--where the label foo does not match the selector name $sel:foo:MkT.--The labels in a field list are not necessarily unique:-data families allow the same parent (the family tycon) to have-multiple distinct fields with the same label. For example,-- data family F a- data instance F Int = MkFInt { foo :: Int }- data instance F Bool = MkFBool { foo :: Bool}--gives rise to-- AvailTC F [ F, MkFInt, MkFBool- , FieldLabel "foo" DuplicateRecordFields FieldSelectors $sel:foo:MkFInt- , FieldLabel "foo" DuplicateRecordFields FieldSelectors $sel:foo:MkFBool ]--Moreover, note that the flHasDuplicateRecordFields or flFieldSelectors flags-need not be the same for all the elements of the list. In the example above,-this occurs if the two data instances are defined in different modules, with-different states of the `-XDuplicateRecordFields` or `-XNoFieldSelectors`-extensions. Thus it is possible to have-- AvailTC F [ F, MkFInt, MkFBool- , FieldLabel "foo" DuplicateRecordFields FieldSelectors $sel:foo:MkFInt- , FieldLabel "foo" NoDuplicateRecordFields FieldSelectors foo ]--If the two data instances are defined in different modules, both without-`-XDuplicateRecordFields` or `-XNoFieldSelectors`, it will be impossible to-export them from the same module (even with `-XDuplicateRecordfields` enabled),-because they would be represented identically. The workaround here is to enable-`-XDuplicateRecordFields` or `-XNoFieldSelectors` on the defining modules. See-also #13352.---Note [Representing pattern synonym fields in AvailInfo]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+{- Note [Representing pattern synonym fields in AvailInfo]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Record pattern synonym fields cannot be represented using AvailTC like fields of-normal record types (see Note [Representing fields in AvailInfo]), because they-do not always have a parent type constructor. So we represent them using the-Avail constructor, with a NormalGreName that carries the underlying FieldLabel.+normal record types, because they do not always have a parent type constructor.+So we represent them using the Avail constructor. Thus under -XDuplicateRecordFields -XPatternSynoynms, the declaration @@ -150,43 +76,22 @@ gives rise to the AvailInfo - Avail (NormalGreName MkFoo)- Avail (FieldGreName (FieldLabel "f" True $sel:f:MkFoo))+ Avail MkFoo, Avail f However, if `f` is bundled with a type constructor `T` by using `T(MkFoo,f)` in an export list, then whenever `f` is imported the parent will be `T`, represented as - AvailTC T [ NormalGreName T- , NormalGreName MkFoo- , FieldGreName (FieldLabel "f" True $sel:f:MkFoo) ]--See also Note [GreNames] in GHC.Types.Name.Reader.+ AvailTC T [ T, MkFoo, f ] -} -- | Compare lexicographically stableAvailCmp :: AvailInfo -> AvailInfo -> Ordering-stableAvailCmp (Avail c1) (Avail c2) = c1 `stableGreNameCmp` c2+stableAvailCmp (Avail c1) (Avail c2) = c1 `stableNameCmp` c2 stableAvailCmp (Avail {}) (AvailTC {}) = LT-stableAvailCmp (AvailTC n ns) (AvailTC m ms) = stableNameCmp n m S.<> liftCompare stableGreNameCmp ns ms+stableAvailCmp (AvailTC n ns) (AvailTC m ms) = stableNameCmp n m S.<> liftCompare stableNameCmp ns ms stableAvailCmp (AvailTC {}) (Avail {}) = GT -stableGreNameCmp :: GreName -> GreName -> Ordering-stableGreNameCmp (NormalGreName n1) (NormalGreName n2) = n1 `stableNameCmp` n2-stableGreNameCmp (NormalGreName {}) (FieldGreName {}) = LT-stableGreNameCmp (FieldGreName f1) (FieldGreName f2) = flSelector f1 `stableNameCmp` flSelector f2-stableGreNameCmp (FieldGreName {}) (NormalGreName {}) = GT--avail :: Name -> AvailInfo-avail n = Avail (NormalGreName n)--availField :: FieldLabel -> AvailInfo-availField fl = Avail (FieldGreName fl)--availTC :: Name -> [Name] -> [FieldLabel] -> AvailInfo-availTC n ns fls = AvailTC n (map NormalGreName ns ++ map FieldGreName fls)-- -- ----------------------------------------------------------------------------- -- Operations on AvailInfo @@ -194,10 +99,6 @@ availsToNameSet avails = foldr add emptyNameSet avails where add avail set = extendNameSetList set (availNames avail) -availsToNameSetWithSelectors :: [AvailInfo] -> NameSet-availsToNameSetWithSelectors avails = foldr add emptyNameSet avails- where add avail set = extendNameSetList set (availNamesWithSelectors avail)- availsToNameEnv :: [AvailInfo] -> NameEnv AvailInfo availsToNameEnv avails = foldr add emptyNameEnv avails where add avail env = extendNameEnvList env@@ -207,110 +108,29 @@ -- invariant that the parent is first if it appears at all. availExportsDecl :: AvailInfo -> Bool availExportsDecl (AvailTC ty_name names)- | n : _ <- names = NormalGreName ty_name == n+ | n : _ <- names = ty_name == n | otherwise = False availExportsDecl _ = True -- | Just the main name made available, i.e. not the available pieces -- of type or class brought into scope by the 'AvailInfo' availName :: AvailInfo -> Name-availName (Avail n) = greNameMangledName n+availName (Avail n) = n availName (AvailTC n _) = n -availGreName :: AvailInfo -> GreName-availGreName (Avail c) = c-availGreName (AvailTC n _) = NormalGreName n---- | All names made available by the availability information (excluding overloaded selectors)-availNames :: AvailInfo -> [Name]-availNames (Avail c) = childNonOverloadedNames c-availNames (AvailTC _ cs) = concatMap childNonOverloadedNames cs--childNonOverloadedNames :: GreName -> [Name]-childNonOverloadedNames (NormalGreName n) = [n]-childNonOverloadedNames (FieldGreName fl) = [ flSelector fl | not (flIsOverloaded fl) ]---- | All names made available by the availability information (including overloaded selectors)-availNamesWithSelectors :: AvailInfo -> [Name]-availNamesWithSelectors (Avail c) = [greNameMangledName c]-availNamesWithSelectors (AvailTC _ cs) = map greNameMangledName cs---- | Names for non-fields made available by the availability information-availNonFldNames :: AvailInfo -> [Name]-availNonFldNames (Avail (NormalGreName n)) = [n]-availNonFldNames (Avail (FieldGreName {})) = []-availNonFldNames (AvailTC _ ns) = mapMaybe f ns- where- f (NormalGreName n) = Just n- f (FieldGreName {}) = Nothing---- | Fields made available by the availability information-availFlds :: AvailInfo -> [FieldLabel]-availFlds (Avail c) = maybeToList (greNameFieldLabel c)-availFlds (AvailTC _ cs) = mapMaybe greNameFieldLabel cs- -- | Names and fields made available by the availability information.-availGreNames :: AvailInfo -> [GreName]-availGreNames (Avail c) = [c]-availGreNames (AvailTC _ cs) = cs+availNames :: AvailInfo -> [Name]+availNames (Avail c) = [c]+availNames (AvailTC _ cs) = cs -- | Names and fields made available by the availability information, other than -- the main decl itself.-availSubordinateGreNames :: AvailInfo -> [GreName]-availSubordinateGreNames (Avail {}) = []-availSubordinateGreNames avail@(AvailTC _ ns)+availSubordinateNames :: AvailInfo -> [Name]+availSubordinateNames (Avail {}) = []+availSubordinateNames avail@(AvailTC _ ns) | availExportsDecl avail = tail ns | otherwise = ns ---- | Used where we may have an ordinary name or a record field label.--- See Note [GreNames] in GHC.Types.Name.Reader.-data GreName = NormalGreName Name- | FieldGreName FieldLabel- deriving (Data, Eq)--instance Outputable GreName where- ppr (NormalGreName n) = ppr n- ppr (FieldGreName fl) = ppr fl--instance NFData GreName where- rnf (NormalGreName n) = rnf n- rnf (FieldGreName f) = rnf f--instance HasOccName GreName where- occName (NormalGreName n) = occName n- occName (FieldGreName fl) = occName fl--instance Ord GreName where- compare = stableGreNameCmp---- | A 'Name' for internal use, but not for output to the user. For fields, the--- 'OccName' will be the selector. See Note [GreNames] in GHC.Types.Name.Reader.-greNameMangledName :: GreName -> Name-greNameMangledName (NormalGreName n) = n-greNameMangledName (FieldGreName fl) = flSelector fl---- | A 'Name' suitable for output to the user. For fields, the 'OccName' will--- be the field label. See Note [GreNames] in GHC.Types.Name.Reader.-greNamePrintableName :: GreName -> Name-greNamePrintableName (NormalGreName n) = n-greNamePrintableName (FieldGreName fl) = fieldLabelPrintableName fl--greNameSrcSpan :: GreName -> SrcSpan-greNameSrcSpan (NormalGreName n) = nameSrcSpan n-greNameSrcSpan (FieldGreName fl) = nameSrcSpan (flSelector fl)--greNameFieldLabel :: GreName -> Maybe FieldLabel-greNameFieldLabel (NormalGreName {}) = Nothing-greNameFieldLabel (FieldGreName fl) = Just fl--partitionGreNames :: [GreName] -> ([Name], [FieldLabel])-partitionGreNames = partitionEithers . map to_either- where- to_either (NormalGreName n) = Left n- to_either (FieldGreName fl) = Right fl-- -- ----------------------------------------------------------------------------- -- Utility @@ -322,7 +142,7 @@ plusAvail (AvailTC _ []) a2@(AvailTC {}) = a2 plusAvail a1@(AvailTC {}) (AvailTC _ []) = a1 plusAvail (AvailTC n1 (s1:ss1)) (AvailTC n2 (s2:ss2))- = case (NormalGreName n1==s1, NormalGreName n2==s2) of -- Maintain invariant the parent is first+ = case (n1 == s1, n2 == s2) of -- Maintain invariant the parent is first (True,True) -> AvailTC n1 (s1 : (ss1 `unionListsOrd` ss2)) (True,False) -> AvailTC n1 (s1 : (ss1 `unionListsOrd` (s2:ss2))) (False,True) -> AvailTC n1 (s2 : ((s1:ss1) `unionListsOrd` ss2))@@ -332,7 +152,7 @@ -- | trims an 'AvailInfo' to keep only a single name trimAvail :: AvailInfo -> Name -> AvailInfo trimAvail avail@(Avail {}) _ = avail-trimAvail avail@(AvailTC n ns) m = case find ((== m) . greNameMangledName) ns of+trimAvail avail@(AvailTC n ns) m = case find (== m) ns of Just c -> AvailTC n [c] Nothing -> pprPanic "trimAvail" (hsep [ppr avail, ppr m]) @@ -344,10 +164,10 @@ filterAvail :: (Name -> Bool) -> AvailInfo -> [AvailInfo] -> [AvailInfo] filterAvail keep ie rest = case ie of- Avail c | keep (greNameMangledName c) -> ie : rest+ Avail c | keep c -> ie : rest | otherwise -> rest AvailTC tc cs ->- let cs' = filter (keep . greNameMangledName) cs+ let cs' = filter keep cs in if null cs' then rest else AvailTC tc cs' : rest @@ -393,19 +213,3 @@ instance NFData AvailInfo where rnf (Avail n) = rnf n rnf (AvailTC a b) = rnf a `seq` rnf b--instance Binary GreName where- put_ bh (NormalGreName aa) = do- putByte bh 0- put_ bh aa- put_ bh (FieldGreName ab) = do- putByte bh 1- put_ bh ab- get bh = do- h <- getByte bh- case h of- 0 -> do aa <- get bh- return (NormalGreName aa)- _ -> do ab <- get bh- return (FieldGreName ab)-
GHC/Types/Basic.hs view
@@ -16,9 +16,11 @@ {-# OPTIONS_GHC -Wno-orphans #-} -- Outputable PromotionFlag, Binary PromotionFlag, Outputable Boxity, Binay Boxity {-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE LambdaCase #-} module GHC.Types.Basic ( LeftOrRight(..),@@ -34,14 +36,14 @@ FunctionOrData(..), RecFlag(..), isRec, isNonRec, boolToRecFlag,- Origin(..), isGenerated,+ Origin(..), isGenerated, DoPmc(..), requiresPMC, RuleName, pprRuleName, TopLevelFlag(..), isTopLevel, isNotTopLevel, OverlapFlag(..), OverlapMode(..), setOverlapModeMaybe,- hasOverlappingFlag, hasOverlappableFlag, hasIncoherentFlag,+ hasOverlappingFlag, hasOverlappableFlag, hasIncoherentFlag, hasNonCanonicalFlag, Boxity(..), isBoxed, @@ -109,6 +111,8 @@ Levity(..), mightBeLifted, mightBeUnlifted, TypeOrConstraint(..), + TyConFlavour(..), TypeOrData(..), tyConFlavourAssoc_maybe,+ NonStandardDefaultingStrategy(..), DefaultingStrategy(..), defaultNonStandardTyVars, @@ -124,12 +128,16 @@ import GHC.Utils.Binary import GHC.Types.SourceText import qualified GHC.LanguageExtensions as LangExt-import Data.Data-import qualified Data.Semigroup as Semi import {-# SOURCE #-} Language.Haskell.Syntax.Type (PromotionFlag(..), isPromoted) import Language.Haskell.Syntax.Basic (Boxity(..), isBoxed, ConTag) -{- *********************************************************************+import Control.DeepSeq ( NFData(..) )+import Data.Data+import Data.Maybe+import qualified Data.Semigroup as Semi++{-+************************************************************************ * * Binary choice * *@@ -575,18 +583,63 @@ ************************************************************************ -} +-- | Was this piece of code user-written or generated by the compiler?+--+-- See Note [Generated code and pattern-match checking]. data Origin = FromSource- | Generated+ | Generated DoPmc deriving( Eq, Data ) isGenerated :: Origin -> Bool-isGenerated Generated = True-isGenerated FromSource = False+isGenerated Generated {} = True+isGenerated FromSource = False instance Outputable Origin where- ppr FromSource = text "FromSource"- ppr Generated = text "Generated"+ ppr FromSource = text "FromSource"+ ppr (Generated pmc) = text "Generated" <+> ppr pmc +-- | Whether to run pattern-match checks in generated code.+--+-- See Note [Generated code and pattern-match checking].+data DoPmc = SkipPmc+ | DoPmc+ deriving( Eq, Data )++instance Outputable DoPmc where+ ppr SkipPmc = text "SkipPmc"+ ppr DoPmc = text "DoPmc"++-- | Does this 'Origin' require us to run pattern-match checking,+-- or should we skip these checks?+--+-- See Note [Generated code and pattern-match checking].+requiresPMC :: Origin -> Bool+requiresPMC (Generated SkipPmc) = False+requiresPMC _ = True++{- Note [Generated code and pattern-match checking]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Some parts of the compiler generate code that is then typechecked. For example:++ - the HsExpansion mechanism described in Note [Rebindable syntax and HsExpansion]+ in GHC.Hs.Expr,+ - the deriving mechanism.++It is usually the case that we want to avoid generating error messages that+refer to generated code. The way this is handled is that we mark certain+parts of the AST as being generated (using the Origin datatype); this is then+used to set the tcl_in_gen_code flag in TcLclEnv, as explained in+Note [Error contexts in generated code] in GHC.Tc.Utils.Monad.++Being in generated code is usually taken to mean we should also skip doing+pattern-match checking, but not always. For example, when desugaring a record+update (as described in Note [Record Updates] in GHC.Tc.Gen.Expr), we still want+to do pattern-match checking, in order to report incomplete record updates+(failing to do so lead to #23250). So, for a 'Generated' 'Origin', we keep track+of whether we should do pattern-match checks; see the calls of the requiresPMC+function (e.g. isMatchContextPmChecked and needToRunPmCheck in GHC.HsToCore.Pmc.Utils).+-}+ {- ************************************************************************ * *@@ -620,6 +673,7 @@ hasIncoherentFlag mode = case mode of Incoherent _ -> True+ NonCanonical _ -> True _ -> False hasOverlappableFlag :: OverlapMode -> Bool@@ -628,6 +682,7 @@ Overlappable _ -> True Overlaps _ -> True Incoherent _ -> True+ NonCanonical _ -> True _ -> False hasOverlappingFlag :: OverlapMode -> Bool@@ -636,8 +691,14 @@ Overlapping _ -> True Overlaps _ -> True Incoherent _ -> True+ NonCanonical _ -> True _ -> False +hasNonCanonicalFlag :: OverlapMode -> Bool+hasNonCanonicalFlag = \case+ NonCanonical{} -> True+ _ -> False+ data OverlapMode -- See Note [Rules for instance lookup] in GHC.Core.InstEnv = NoOverlap SourceText -- See Note [Pragma source text]@@ -692,6 +753,16 @@ -- instantiating 'b' would change which instance -- was chosen. See also Note [Incoherent instances] in "GHC.Core.InstEnv" + | NonCanonical SourceText+ -- ^ Behave like Incoherent, but the instance choice is observable+ -- by the program behaviour. See Note [Coherence and specialisation: overview].+ --+ -- We don't have surface syntax for the distinction between+ -- Incoherent and NonCanonical instances; instead, the flag+ -- `-f{no-}specialise-incoherents` (on by default) controls+ -- whether `INCOHERENT` instances are regarded as Incoherent or+ -- NonCanonical.+ deriving (Eq, Data) @@ -704,6 +775,7 @@ ppr (Overlapping _) = text "[overlapping]" ppr (Overlaps _) = text "[overlap ok]" ppr (Incoherent _) = text "[incoherent]"+ ppr (NonCanonical _) = text "[noncanonical]" instance Binary OverlapMode where put_ bh (NoOverlap s) = putByte bh 0 >> put_ bh s@@ -711,6 +783,7 @@ put_ bh (Incoherent s) = putByte bh 2 >> put_ bh s put_ bh (Overlapping s) = putByte bh 3 >> put_ bh s put_ bh (Overlappable s) = putByte bh 4 >> put_ bh s+ put_ bh (NonCanonical s) = putByte bh 5 >> put_ bh s get bh = do h <- getByte bh case h of@@ -719,6 +792,7 @@ 2 -> (get bh) >>= \s -> return $ Incoherent s 3 -> (get bh) >>= \s -> return $ Overlapping s 4 -> (get bh) >>= \s -> return $ Overlappable s+ 5 -> (get bh) >>= \s -> return $ NonCanonical s _ -> panic ("get OverlapMode" ++ show h) @@ -1553,7 +1627,7 @@ defaultInlinePragma, alwaysInlinePragma, neverInlinePragma, dfunInlinePragma :: InlinePragma-defaultInlinePragma = InlinePragma { inl_src = SourceText "{-# INLINE"+defaultInlinePragma = InlinePragma { inl_src = SourceText $ fsLit "{-# INLINE" , inl_act = AlwaysActive , inl_rule = FunLike , inl_inline = NoUserInlinePrag@@ -1949,12 +2023,20 @@ data Levity = Lifted | Unlifted- deriving Eq+ deriving (Data,Eq,Ord,Show) instance Outputable Levity where ppr Lifted = text "Lifted" ppr Unlifted = text "Unlifted" +instance Binary Levity where+ put_ bh = \case+ Lifted -> putByte bh 0+ Unlifted -> putByte bh 1+ get bh = getByte bh >>= \case+ 0 -> pure Lifted+ _ -> pure Unlifted+ mightBeLifted :: Maybe Levity -> Bool mightBeLifted (Just Unlifted) = False mightBeLifted _ = True@@ -1967,6 +2049,77 @@ = TypeLike | ConstraintLike deriving( Eq, Ord, Data ) ++{- *********************************************************************+* *+ TyConFlavour+* *+********************************************************************* -}++-- | Paints a picture of what a 'TyCon' represents, in broad strokes.+-- This is used towards more informative error messages.+data TyConFlavour tc+ = ClassFlavour+ | TupleFlavour Boxity+ | SumFlavour+ | DataTypeFlavour+ | NewtypeFlavour+ | AbstractTypeFlavour+ | OpenFamilyFlavour TypeOrData (Maybe tc) -- Just tc <=> (tc == associated class)+ | ClosedTypeFamilyFlavour+ | TypeSynonymFlavour+ | BuiltInTypeFlavour -- ^ e.g., the @(->)@ 'TyCon'.+ | PromotedDataConFlavour+ deriving (Eq, Data, Functor)++instance Outputable (TyConFlavour tc) where+ ppr = text . go+ where+ go ClassFlavour = "class"+ go (TupleFlavour boxed) | isBoxed boxed = "tuple"+ | otherwise = "unboxed tuple"+ go SumFlavour = "unboxed sum"+ go DataTypeFlavour = "data type"+ go NewtypeFlavour = "newtype"+ go AbstractTypeFlavour = "abstract type"+ go (OpenFamilyFlavour type_or_data mb_par)+ = assoc ++ t_or_d ++ " family"+ where+ assoc = if isJust mb_par then "associated " else ""+ t_or_d = case type_or_data of { IAmType -> "type"; IAmData -> "data" }+ go ClosedTypeFamilyFlavour = "type family"+ go TypeSynonymFlavour = "type synonym"+ go BuiltInTypeFlavour = "built-in type"+ go PromotedDataConFlavour = "promoted data constructor"++instance NFData tc => NFData (TyConFlavour tc) where+ rnf ClassFlavour = ()+ rnf (TupleFlavour !_) = ()+ rnf SumFlavour = ()+ rnf DataTypeFlavour = ()+ rnf NewtypeFlavour = ()+ rnf AbstractTypeFlavour = ()+ rnf (OpenFamilyFlavour !_ mb_tc) = rnf mb_tc+ rnf ClosedTypeFamilyFlavour = ()+ rnf TypeSynonymFlavour = ()+ rnf BuiltInTypeFlavour = ()+ rnf PromotedDataConFlavour = ()++-- | Get the enclosing class TyCon (if there is one) for the given TyConFlavour+tyConFlavourAssoc_maybe :: TyConFlavour tc -> Maybe tc+tyConFlavourAssoc_maybe (OpenFamilyFlavour _ mb_parent) = mb_parent+tyConFlavourAssoc_maybe _ = Nothing++-- | Whether something is a type or a data declaration,+-- e.g. a type family or a data family.+data TypeOrData+ = IAmData+ | IAmType+ deriving (Eq, Data)++instance Outputable TypeOrData where+ ppr IAmData = text "data"+ ppr IAmType = text "type" {- ********************************************************************* * *
GHC/Types/CostCentre.hs view
@@ -281,10 +281,8 @@ ppr = pprCostCentre pprCostCentre :: IsLine doc => CostCentre -> doc-pprCostCentre cc = docWithContext $ \ sty ->- if codeStyle (sdocStyle sty)- then ppCostCentreLbl cc- else ftext (costCentreUserNameFS cc)+pprCostCentre cc = docWithStyle (ppCostCentreLbl cc)+ (\_ -> ftext (costCentreUserNameFS cc)) {-# SPECIALISE pprCostCentre :: CostCentre -> SDoc #-} {-# SPECIALISE pprCostCentre :: CostCentre -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable
GHC/Types/Demand.hs view
@@ -88,8 +88,7 @@ import GHC.Types.Basic import GHC.Data.Maybe ( orElse ) -import GHC.Core.Type ( Type )-import GHC.Core.TyCon ( isNewTyCon, isClassTyCon )+import GHC.Core.Type ( Type, isTerminatingType ) import GHC.Core.DataCon ( splitDataProductType_maybe, StrictnessMark, isMarkedStrict ) import GHC.Core.Multiplicity ( scaledThing ) @@ -964,15 +963,15 @@ strictManyApply1Dmd :: Demand strictManyApply1Dmd = C_1N :* mkCall C_1N topSubDmd --- | First argument of catch#: @MC(M,L)@.+-- | First argument of catch#: @MC(1,L)@. -- Evaluates its arg lazily, but then applies it exactly once to one argument. lazyApply1Dmd :: Demand-lazyApply1Dmd = C_01 :* mkCall C_01 topSubDmd+lazyApply1Dmd = C_01 :* mkCall C_11 topSubDmd --- | Second argument of catch#: @MC(M,C(1,L))@.--- Calls its arg lazily, but then applies it exactly once to an additional argument.+-- | Second argument of catch#: @MC(1,C(1,L))@.+-- Evaluates its arg lazily, but then applies it exactly once to two arguments. lazyApply2Dmd :: Demand-lazyApply2Dmd = C_01 :* mkCall C_01 (mkCall C_11 topSubDmd)+lazyApply2Dmd = C_01 :* mkCall C_11 (mkCall C_11 topSubDmd) -- | Make a 'Demand' evaluated at-most-once. oneifyDmd :: Demand -> Demand@@ -984,7 +983,10 @@ strictifyDmd :: Demand -> Demand strictifyDmd = plusDmd seqDmd --- | If the argument is a used non-newtype dictionary, give it strict demand.+-- | If the argument is a guaranteed-terminating type+-- (i.e. a non-newtype dictionary) give it strict demand.+-- This is sound because terminating types can't be bottom:+-- See GHC.Core Note [NON-BOTTOM-DICTS invariant] -- Also split the product type & demand and recur in order to similarly -- strictify the argument's contained used non-newtype superclass dictionaries. -- We use the demand as our recursive measure to guarantee termination.@@ -998,11 +1000,9 @@ -- Return a TyCon and a list of field types if the given -- type is a non-newtype dictionary type as_non_newtype_dict ty- | Just (tycon, _arg_tys, _data_con, map scaledThing -> inst_con_arg_tys)- <- splitDataProductType_maybe ty- , not (isNewTyCon tycon)- , isClassTyCon tycon- = Just inst_con_arg_tys+ | isTerminatingType ty+ , Just (_tc, _arg_tys, _data_con, field_tys) <- splitDataProductType_maybe ty+ = Just (map scaledThing field_tys) | otherwise = Nothing strictifyDictDmd _ dmd = dmd
GHC/Types/Error.hs view
@@ -7,6 +7,8 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE TypeApplications #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE PatternSynonyms #-} module GHC.Types.Error ( -- * Messages@@ -27,14 +29,22 @@ , Severity (..) , Diagnostic (..) , UnknownDiagnostic (..)+ , mkSimpleUnknownDiagnostic+ , mkUnknownDiagnostic+ , embedUnknownDiagnostic , DiagnosticMessage (..)- , DiagnosticReason (..)+ , DiagnosticReason (WarningWithFlag, ..)+ , ResolvedDiagnosticReason(..) , DiagnosticHint (..) , mkPlainDiagnostic , mkPlainError , mkDecoratedDiagnostic , mkDecoratedError + , pprDiagnostic++ , HasDefaultDiagnosticOpts(..)+ , defaultDiagnosticOpts , NoDiagnosticOpts(..) -- * Hints and refactoring actions@@ -91,9 +101,11 @@ import GHC.Data.StringBuffer (atLine, hGetStringBuffer, len, lexemeToString) import GHC.Utils.Json import GHC.Utils.Panic+import GHC.Unit.Module.Warnings (WarningCategory) import Data.Bifunctor import Data.Foldable ( fold )+import Data.List.NonEmpty ( NonEmpty (..) ) import qualified Data.List.NonEmpty as NE import Data.List ( intercalate ) import Data.Typeable ( Typeable )@@ -150,7 +162,10 @@ ppr msgs = braces (vcat (map ppr_one (bagToList (getMessages msgs)))) where ppr_one :: MsgEnvelope e -> SDoc- ppr_one envelope = pprDiagnostic (errMsgDiagnostic envelope)+ ppr_one envelope =+ vcat [ text "Resolved:" <+> ppr (errMsgReason envelope),+ pprDiagnostic (errMsgDiagnostic envelope)+ ] {- Note [Discarding Messages] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -206,6 +221,16 @@ mapDecoratedSDoc f (Decorated s1) = Decorated (map f s1) +class HasDefaultDiagnosticOpts opts where+ defaultOpts :: opts+++defaultDiagnosticOpts :: forall opts . HasDefaultDiagnosticOpts (DiagnosticOpts opts) => DiagnosticOpts opts+defaultDiagnosticOpts = defaultOpts @(DiagnosticOpts opts)++++ -- | A class identifying a diagnostic. -- Dictionary.com defines a diagnostic as: --@@ -215,11 +240,10 @@ -- A 'Diagnostic' carries the /actual/ description of the message (which, in -- GHC's case, it can be an error or a warning) and the /reason/ why such -- message was generated in the first place.-class Diagnostic a where+class (HasDefaultDiagnosticOpts (DiagnosticOpts a)) => Diagnostic a where -- | Type of configuration options for the diagnostic. type DiagnosticOpts a- defaultDiagnosticOpts :: DiagnosticOpts a -- | Extract the error message text from a 'Diagnostic'. diagnosticMessage :: DiagnosticOpts a -> a -> DecoratedSDoc@@ -247,22 +271,40 @@ diagnosticCode :: a -> Maybe DiagnosticCode -- | An existential wrapper around an unknown diagnostic.-data UnknownDiagnostic where- UnknownDiagnostic :: (DiagnosticOpts a ~ NoDiagnosticOpts, Diagnostic a, Typeable a)- => a -> UnknownDiagnostic+data UnknownDiagnostic opts where+ UnknownDiagnostic :: (Diagnostic a, Typeable a)+ => (opts -> DiagnosticOpts a) -- Inject the options of the outer context+ -- into the options for the wrapped diagnostic.+ -> a+ -> UnknownDiagnostic opts -instance Diagnostic UnknownDiagnostic where- type DiagnosticOpts UnknownDiagnostic = NoDiagnosticOpts- defaultDiagnosticOpts = NoDiagnosticOpts- diagnosticMessage _ (UnknownDiagnostic diag) = diagnosticMessage NoDiagnosticOpts diag- diagnosticReason (UnknownDiagnostic diag) = diagnosticReason diag- diagnosticHints (UnknownDiagnostic diag) = diagnosticHints diag- diagnosticCode (UnknownDiagnostic diag) = diagnosticCode diag+instance HasDefaultDiagnosticOpts opts => Diagnostic (UnknownDiagnostic opts) where+ type DiagnosticOpts (UnknownDiagnostic opts) = opts+ diagnosticMessage opts (UnknownDiagnostic f diag) = diagnosticMessage (f opts) diag+ diagnosticReason (UnknownDiagnostic _ diag) = diagnosticReason diag+ diagnosticHints (UnknownDiagnostic _ diag) = diagnosticHints diag+ diagnosticCode (UnknownDiagnostic _ diag) = diagnosticCode diag -- A fallback 'DiagnosticOpts' which can be used when there are no options -- for a particular diagnostic. data NoDiagnosticOpts = NoDiagnosticOpts+instance HasDefaultDiagnosticOpts NoDiagnosticOpts where+ defaultOpts = NoDiagnosticOpts +-- | Make a "simple" unknown diagnostic which doesn't have any configuration options.+mkSimpleUnknownDiagnostic :: (Diagnostic a, Typeable a, DiagnosticOpts a ~ NoDiagnosticOpts) => a -> UnknownDiagnostic b+mkSimpleUnknownDiagnostic = UnknownDiagnostic (const NoDiagnosticOpts)++-- | Make an unknown diagnostic which uses the same options as the context it will be embedded into.+mkUnknownDiagnostic :: (Typeable a, Diagnostic a) => a -> UnknownDiagnostic (DiagnosticOpts a)+mkUnknownDiagnostic = UnknownDiagnostic id++-- | Embed a more complicated diagnostic which requires a potentially different options type.+embedUnknownDiagnostic :: (Diagnostic a, Typeable a) => (opts -> DiagnosticOpts a) -> a -> UnknownDiagnostic opts+embedUnknownDiagnostic = UnknownDiagnostic++--------------------------------------------------------------------------------+ pprDiagnostic :: forall e . Diagnostic e => e -> SDoc pprDiagnostic e = vcat [ ppr (diagnosticReason e) , nest 2 (vcat (unDecorated (diagnosticMessage opts e))) ]@@ -287,7 +329,6 @@ instance Diagnostic DiagnosticMessage where type DiagnosticOpts DiagnosticMessage = NoDiagnosticOpts- defaultDiagnosticOpts = NoDiagnosticOpts diagnosticMessage _ = diagMessage diagnosticReason = diagReason diagnosticHints = diagHints@@ -328,18 +369,75 @@ data DiagnosticReason = WarningWithoutFlag -- ^ Born as a warning.- | WarningWithFlag !WarningFlag+ | WarningWithFlags !(NE.NonEmpty WarningFlag) -- ^ Warning was enabled with the flag.+ | WarningWithCategory !WarningCategory+ -- ^ Warning was enabled with a custom category. | ErrorWithoutFlag -- ^ Born as an error. deriving (Eq, Show) +-- | Like a 'DiagnosticReason', but resolved against a specific set of `DynFlags` to+-- work out which warning flag actually enabled this warning.+newtype ResolvedDiagnosticReason+ = ResolvedDiagnosticReason { resolvedDiagnosticReason :: DiagnosticReason }++-- | The single warning case 'DiagnosticReason' is very common.+pattern WarningWithFlag :: WarningFlag -> DiagnosticReason+pattern WarningWithFlag w = WarningWithFlags (w :| [])++{-+Note [Warnings controlled by multiple flags]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++Diagnostics that started life as flag-controlled warnings have a+'diagnosticReason' of 'WarningWithFlags', giving the flags that control the+warning. Usually there is only one flag, but in a few cases multiple flags+apply. Where there are more than one, they are listed highest-priority first.++For example, the same exported binding may give rise to a warning if either+`-Wmissing-signatures` or `-Wmissing-exported-signatures` is enabled. Here+`-Wmissing-signatures` has higher priority, because we want to mention it if+before are enabled. See `missingSignatureWarningFlags` for the specific logic+in this case.++When reporting such a warning to the user, it is important to mention the+correct flag (e.g. `-Wmissing-signatures` if it is enabled, or+`-Wmissing-exported-signatures` if only the latter is enabled). Thus+`diag_reason_severity` filters the `DiagnosticReason` based on the currently+active `DiagOpts`. For a `WarningWithFlags` it returns only the flags that are+enabled; it leaves other `DiagnosticReason`s unchanged. This is then wrapped+in a `ResolvedDiagnosticReason` newtype which records that this filtering has+taken place.++If we have `-Wmissing-signatures -Werror=missing-exported-signatures` we want+the error to mention `-Werror=missing-exported-signatures` (even though+`-Wmissing-signatures` would normally take precedence). Thus if there are any+fatal warnings, `diag_reason_severity` returns those alone.++The `MsgEnvelope` stores the filtered `ResolvedDiagnosticReason` listing only the+relevant flags for subsequent display.+++Side note: we do not treat `-Wmissing-signatures` as a warning group that+includes `-Wmissing-exported-signatures`, because++ (a) this would require us to provide a flag for the complement, and++ (b) currently, in `-Wmissing-exported-signatures -Wno-missing-signatures`, the+ latter option does not switch off the former.+-}+ instance Outputable DiagnosticReason where ppr = \case WarningWithoutFlag -> text "WarningWithoutFlag"- WarningWithFlag wf -> text ("WarningWithFlag " ++ show wf)+ WarningWithFlags wf -> text ("WarningWithFlags " ++ show wf)+ WarningWithCategory cat -> text "WarningWithCategory" <+> ppr cat ErrorWithoutFlag -> text "ErrorWithoutFlag" +instance Outputable ResolvedDiagnosticReason where+ ppr = ppr . resolvedDiagnosticReason+ -- | An envelope for GHC's facts about a running program, parameterised over the -- /domain-specific/ (i.e. parsing, typecheck-renaming, etc) diagnostics. --@@ -354,6 +452,10 @@ , errMsgContext :: NamePprCtx , errMsgDiagnostic :: e , errMsgSeverity :: Severity+ , errMsgReason :: ResolvedDiagnosticReason+ -- ^ The actual reason caused this message+ --+ -- See Note [Warnings controlled by multiple flags] } deriving (Functor, Foldable, Traversable) -- | The class for a diagnostic message. The main purpose is to classify a@@ -372,7 +474,7 @@ -- ^ Log messages intended for end users. -- No file\/line\/column stuff. - | MCDiagnostic Severity DiagnosticReason (Maybe DiagnosticCode)+ | MCDiagnostic Severity ResolvedDiagnosticReason (Maybe DiagnosticCode) -- ^ Diagnostics from the compiler. This constructor is very powerful as -- it allows the construction of a 'MessageClass' with a completely -- arbitrary permutation of 'Severity' and 'DiagnosticReason'. As such,@@ -426,7 +528,7 @@ -- don't want to see. See Note [Suppressing Messages] | SevWarning | SevError- deriving (Eq, Show)+ deriving (Eq, Ord, Show) instance Outputable Severity where ppr = \case@@ -494,8 +596,9 @@ warning_flag_doc = case msg_class of MCDiagnostic sev reason _code- | Just msg <- flag_msg sev reason -> brackets msg- _ -> empty+ | Just msg <- flag_msg sev (resolvedDiagnosticReason reason)+ -> brackets msg+ _ -> empty code_doc = case msg_class of@@ -508,26 +611,32 @@ -- in a log file, e.g. with -ddump-tc-trace. It should not -- happen otherwise, though. flag_msg SevError WarningWithoutFlag = Just (col "-Werror")- flag_msg SevError (WarningWithFlag wflag) =+ flag_msg SevError (WarningWithFlags (wflag :| _)) = let name = NE.head (warnFlagNames wflag) in- Just $ col ("-W" ++ name) <+> warn_flag_grp wflag+ Just $ col ("-W" ++ name) <+> warn_flag_grp (smallestWarningGroups wflag) <> comma <+> col ("Werror=" ++ name)+ flag_msg SevError (WarningWithCategory cat) =+ Just $ coloured msg_colour (text "-W" <> ppr cat)+ <+> warn_flag_grp smallestWarningGroupsForCategory+ <> comma+ <+> coloured msg_colour (text "-Werror=" <> ppr cat) flag_msg SevError ErrorWithoutFlag = Nothing flag_msg SevWarning WarningWithoutFlag = Nothing- flag_msg SevWarning (WarningWithFlag wflag) =+ flag_msg SevWarning (WarningWithFlags (wflag :| _)) = let name = NE.head (warnFlagNames wflag) in- Just (col ("-W" ++ name) <+> warn_flag_grp wflag)+ Just (col ("-W" ++ name) <+> warn_flag_grp (smallestWarningGroups wflag))+ flag_msg SevWarning (WarningWithCategory cat) =+ Just (coloured msg_colour (text "-W" <> ppr cat)+ <+> warn_flag_grp smallestWarningGroupsForCategory) flag_msg SevWarning ErrorWithoutFlag = pprPanic "SevWarning with ErrorWithoutFlag" $ vcat [ text "locn:" <+> ppr locn , text "msg:" <+> ppr msg ] - warn_flag_grp flag- | show_warn_groups =- case smallestWarningGroups flag of- [] -> empty- groups -> text $ "(in " ++ intercalate ", " (map ("-W"++) groups) ++ ")"+ warn_flag_grp groups+ | show_warn_groups, not (null groups)+ = text $ "(in " ++ intercalate ", " (map (("-W"++) . warningGroupName) groups) ++ ")" | otherwise = empty -- Add prefixes, like Foo.hs:34: warning:@@ -645,7 +754,7 @@ -- | Returns 'True' if this is, intrinsically, a failure. See -- Note [Intrinsic And Extrinsic Failures]. isIntrinsicErrorMessage :: Diagnostic e => MsgEnvelope e -> Bool-isIntrinsicErrorMessage = (==) ErrorWithoutFlag . diagnosticReason . errMsgDiagnostic+isIntrinsicErrorMessage = (==) ErrorWithoutFlag . resolvedDiagnosticReason . errMsgReason isWarningMessage :: Diagnostic e => MsgEnvelope e -> Bool isWarningMessage = not . isIntrinsicErrorMessage
GHC/Types/Error/Codes.hs view
@@ -20,15 +20,16 @@ where import GHC.Prelude-import GHC.Types.Error ( DiagnosticCode(..), UnknownDiagnostic (..), diagnosticCode )+import GHC.Types.Error ( DiagnosticCode(..), UnknownDiagnostic (..), diagnosticCode, NoDiagnosticOpts ) import GHC.Hs.Extension ( GhcRn ) -import GHC.Driver.Errors.Types ( DriverMessage )+import GHC.Core.InstEnv (LookupInstanceErrReason)+import GHC.Iface.Errors.Types+import GHC.Driver.Errors.Types ( DriverMessage, GhcMessageOpts, DriverMessageOpts ) import GHC.Parser.Errors.Types ( PsMessage, PsHeaderMessage ) import GHC.HsToCore.Errors.Types ( DsMessage ) import GHC.Tc.Errors.Types-import GHC.Tc.Utils.TcType ( IllegalForeignTypeReason, TypeCannotBeMarshaledReason ) import GHC.Unit.Module.Warnings ( WarningTxt ) import GHC.Utils.Panic.Plain @@ -38,6 +39,7 @@ import GHC.TypeLits ( Symbol, TypeError, ErrorMessage(..) ) import GHC.TypeNats ( Nat, KnownNat, natVal' ) + {- Note [Diagnostic codes] ~~~~~~~~~~~~~~~~~~~~~~~~~~ Every time a new diagnostic (error or warning) is introduced to GHC,@@ -253,7 +255,6 @@ GhcDiagnosticCode "PsErrAtInPatPos" = 08382 GhcDiagnosticCode "PsErrParseErrorOnInput" = 66418 GhcDiagnosticCode "PsErrMalformedDecl" = 85316- GhcDiagnosticCode "PsErrUnexpectedTypeAppInDecl" = 45054 GhcDiagnosticCode "PsErrNotADataCon" = 25742 GhcDiagnosticCode "PsErrInferredTypeVarNotAllowed" = 57342 GhcDiagnosticCode "PsErrIllegalTraditionalRecordSyntax" = 65719@@ -294,12 +295,17 @@ GhcDiagnosticCode "DriverCannotImportFromUntrustedPackage" = 75165 GhcDiagnosticCode "DriverRedirectedNoMain" = 95379 GhcDiagnosticCode "DriverHomePackagesNotClosed" = 03271+ GhcDiagnosticCode "DriverInconsistentDynFlags" = 74335+ GhcDiagnosticCode "DriverSafeHaskellIgnoredExtension" = 98887+ GhcDiagnosticCode "DriverPackageTrustIgnored" = 83552+ GhcDiagnosticCode "DriverUnrecognisedFlag" = 93741+ GhcDiagnosticCode "DriverDeprecatedFlag" = 53692 -- Constraint solver diagnostic codes GhcDiagnosticCode "BadTelescope" = 97739 GhcDiagnosticCode "UserTypeError" = 64725+ GhcDiagnosticCode "UnsatisfiableError" = 22250 GhcDiagnosticCode "ReportHoleError" = 88464- GhcDiagnosticCode "UntouchableVariable" = 34699 GhcDiagnosticCode "FixedRuntimeRepError" = 55287 GhcDiagnosticCode "BlockedEquality" = 06200 GhcDiagnosticCode "ExpectingMoreArguments" = 81325@@ -323,12 +329,13 @@ GhcDiagnosticCode "RepresentationalEq" = 10283 -- Typechecker/renamer diagnostic codes+ GhcDiagnosticCode "TcRnSolverDepthError" = 40404 GhcDiagnosticCode "TcRnRedundantConstraints" = 30606 GhcDiagnosticCode "TcRnInaccessibleCode" = 40564+ GhcDiagnosticCode "TcRnInaccessibleCoAxBranch" = 28129 GhcDiagnosticCode "TcRnTypeDoesNotHaveFixedRuntimeRep" = 18478 GhcDiagnosticCode "TcRnImplicitLift" = 00846 GhcDiagnosticCode "TcRnUnusedPatternBinds" = 61367- GhcDiagnosticCode "TcRnDodgyImports" = 99623 GhcDiagnosticCode "TcRnDodgyExports" = 75356 GhcDiagnosticCode "TcRnMissingImportList" = 77037 GhcDiagnosticCode "TcRnUnsafeDueToPlugin" = 01687@@ -336,6 +343,7 @@ GhcDiagnosticCode "TcRnIdNotExportedFromModuleSig" = 44188 GhcDiagnosticCode "TcRnIdNotExportedFromLocalSig" = 50058 GhcDiagnosticCode "TcRnShadowedName" = 63397+ GhcDiagnosticCode "TcRnInvalidWarningCategory" = 53573 GhcDiagnosticCode "TcRnDuplicateWarningDecls" = 00711 GhcDiagnosticCode "TcRnSimplifierTooManyIterations" = 95822 GhcDiagnosticCode "TcRnIllegalPatSynDecl" = 82077@@ -356,7 +364,7 @@ GhcDiagnosticCode "TcRnTagToEnumResTyNotAnEnum" = 49356 GhcDiagnosticCode "TcRnTagToEnumResTyTypeData" = 96189 GhcDiagnosticCode "TcRnArrowIfThenElsePredDependsOnResultTy" = 55868- GhcDiagnosticCode "TcRnIllegalHsBootFileDecl" = 58195+ GhcDiagnosticCode "TcRnIllegalHsBootOrSigDecl" = 58195 GhcDiagnosticCode "TcRnRecursivePatternSynonym" = 72489 GhcDiagnosticCode "TcRnPartialTypeSigTyVarMismatch" = 88793 GhcDiagnosticCode "TcRnPartialTypeSigBadQuantifier" = 94185@@ -364,8 +372,6 @@ GhcDiagnosticCode "TcRnPolymorphicBinderMissingSig" = 64414 GhcDiagnosticCode "TcRnOverloadedSig" = 16675 GhcDiagnosticCode "TcRnTupleConstraintInst" = 69012- GhcDiagnosticCode "TcRnAbstractClassInst" = 51758- GhcDiagnosticCode "TcRnNoClassInstHead" = 56538 GhcDiagnosticCode "TcRnUserTypeError" = 47403 GhcDiagnosticCode "TcRnConstraintInKind" = 01259 GhcDiagnosticCode "TcRnUnboxedTupleOrSumTypeFuncArg" = 19590@@ -377,9 +383,7 @@ GhcDiagnosticCode "TcRnNonTypeVarArgInConstraint" = 80003 GhcDiagnosticCode "TcRnIllegalImplicitParam" = 75863 GhcDiagnosticCode "TcRnIllegalConstraintSynonymOfKind" = 75844- GhcDiagnosticCode "TcRnIllegalClassInst" = 53946 GhcDiagnosticCode "TcRnOversaturatedVisibleKindArg" = 45474- GhcDiagnosticCode "TcRnBadAssociatedType" = 38351 GhcDiagnosticCode "TcRnForAllRankErr" = 91510 GhcDiagnosticCode "TcRnMonomorphicBindings" = 55524 GhcDiagnosticCode "TcRnOrphanInstance" = 90177@@ -401,22 +405,20 @@ GhcDiagnosticCode "TcRnDuplicateExport" = 47854 GhcDiagnosticCode "TcRnExportedParentChildMismatch" = 88993 GhcDiagnosticCode "TcRnConflictingExports" = 69158- GhcDiagnosticCode "TcRnAmbiguousField" = 02256+ GhcDiagnosticCode "TcRnDuplicateFieldExport" = 97219+ GhcDiagnosticCode "TcRnAmbiguousFieldInUpdate" = 56428+ GhcDiagnosticCode "TcRnAmbiguousRecordUpdate" = 02256 GhcDiagnosticCode "TcRnMissingFields" = 20125 GhcDiagnosticCode "TcRnFieldUpdateInvalidType" = 63055- GhcDiagnosticCode "TcRnNoConstructorHasAllFields" = 14392- GhcDiagnosticCode "TcRnMixedSelectors" = 40887 GhcDiagnosticCode "TcRnMissingStrictFields" = 95909- GhcDiagnosticCode "TcRnNoPossibleParentForFields" = 33238- GhcDiagnosticCode "TcRnBadOverloadedRecordUpdate" = 99339 GhcDiagnosticCode "TcRnStaticFormNotClosed" = 88431+ GhcDiagnosticCode "TcRnIllegalStaticExpression" = 23800 GhcDiagnosticCode "TcRnUselessTypeable" = 90584 GhcDiagnosticCode "TcRnDerivingDefaults" = 20042 GhcDiagnosticCode "TcRnNonUnaryTypeclassConstraint" = 73993 GhcDiagnosticCode "TcRnPartialTypeSignatures" = 60661 GhcDiagnosticCode "TcRnLazyGADTPattern" = 87005 GhcDiagnosticCode "TcRnArrowProcGADTPattern" = 64525- GhcDiagnosticCode "TcRnSpecialClassInst" = 97044 GhcDiagnosticCode "TcRnForallIdentifier" = 64088 GhcDiagnosticCode "TcRnTypeEqualityOutOfScope" = 12003 GhcDiagnosticCode "TcRnTypeEqualityRequiresOperators" = 58520@@ -425,14 +427,17 @@ GhcDiagnosticCode "TcRnIncorrectNameSpace" = 31891 GhcDiagnosticCode "TcRnNoRebindableSyntaxRecordDot" = 65945 GhcDiagnosticCode "TcRnNoFieldPunsRecordDot" = 57365- GhcDiagnosticCode "TcRnIllegalStaticExpression" = 23800- GhcDiagnosticCode "TcRnIllegalStaticFormInSplice" = 12219 GhcDiagnosticCode "TcRnListComprehensionDuplicateBinding" = 81232 GhcDiagnosticCode "TcRnLastStmtNotExpr" = 55814 GhcDiagnosticCode "TcRnUnexpectedStatementInContext" = 42026 GhcDiagnosticCode "TcRnSectionWithoutParentheses" = 95880 GhcDiagnosticCode "TcRnIllegalImplicitParameterBindings" = 50730 GhcDiagnosticCode "TcRnIllegalTupleSection" = 59155+ GhcDiagnosticCode "TcRnTermNameInType" = 37479+ GhcDiagnosticCode "TcRnUnexpectedKindVar" = 12875+ GhcDiagnosticCode "TcRnNegativeNumTypeLiteral" = 93632+ GhcDiagnosticCode "TcRnUnusedQuantifiedTypeVar" = 54180+ GhcDiagnosticCode "TcRnMissingRoleAnnotation" = 65490 GhcDiagnosticCode "TcRnUntickedPromotedThing" = 49957 GhcDiagnosticCode "TcRnIllegalBuiltinSyntax" = 39716@@ -445,21 +450,16 @@ GhcDiagnosticCode "TcRnUnsupportedCallConv" = 01245 GhcDiagnosticCode "TcRnInvalidCIdentifier" = 95774 GhcDiagnosticCode "TcRnExpectedValueId" = 01570- GhcDiagnosticCode "TcRnNotARecordSelector" = 47535 GhcDiagnosticCode "TcRnRecSelectorEscapedTyVar" = 55876 GhcDiagnosticCode "TcRnPatSynNotBidirectional" = 16444- GhcDiagnosticCode "TcRnSplicePolymorphicLocalVar" = 06568 GhcDiagnosticCode "TcRnIllegalDerivingItem" = 11913 GhcDiagnosticCode "TcRnUnexpectedAnnotation" = 18932 GhcDiagnosticCode "TcRnIllegalRecordSyntax" = 89246- GhcDiagnosticCode "TcRnUnexpectedTypeSplice" = 39180 GhcDiagnosticCode "TcRnInvalidVisibleKindArgument" = 20967 GhcDiagnosticCode "TcRnTooManyBinders" = 05989 GhcDiagnosticCode "TcRnDifferentNamesForTyVar" = 17370- GhcDiagnosticCode "TcRnDisconnectedTyVar" = 59738 GhcDiagnosticCode "TcRnInvalidReturnKind" = 55233 GhcDiagnosticCode "TcRnClassKindNotConstraint" = 80768- GhcDiagnosticCode "TcRnUnpromotableThing" = 88634 GhcDiagnosticCode "TcRnMatchesHaveDiffNumArgs" = 91938 GhcDiagnosticCode "TcRnCannotBindScopedTyVarInPatSig" = 46131 GhcDiagnosticCode "TcRnCannotBindTyVarsInPatBind" = 48361@@ -468,42 +468,158 @@ GhcDiagnosticCode "TcRnUnexpectedPragmas" = 88293 GhcDiagnosticCode "TcRnNonOverloadedSpecialisePragma" = 35827 GhcDiagnosticCode "TcRnSpecialiseNotVisible" = 85337+ GhcDiagnosticCode "TcRnDifferentExportWarnings" = 92878+ GhcDiagnosticCode "TcRnIncompleteExportWarnings" = 94721 GhcDiagnosticCode "TcRnIllegalTypeOperatorDecl" = 50649- GhcDiagnosticCode "TcRnNameByTemplateHaskellQuote" = 40027- GhcDiagnosticCode "TcRnIllegalBindingOfBuiltIn" = 69639+ GhcDiagnosticCode "TcRnBindVarAlreadyInScope" = 69710+ GhcDiagnosticCode "TcRnBindMultipleVariables" = 92957+ GhcDiagnosticCode "TcRnIllegalKind" = 64861+ GhcDiagnosticCode "TcRnUnexpectedPatSigType" = 74097+ GhcDiagnosticCode "TcRnIllegalKindSignature" = 91382+ GhcDiagnosticCode "TcRnDataKindsError" = 68567 GhcDiagnosticCode "TcRnIllegalHsigDefaultMethods" = 93006+ GhcDiagnosticCode "TcRnHsigFixityMismatch" = 93007+ GhcDiagnosticCode "TcRnHsigNoIface" = 93010+ GhcDiagnosticCode "TcRnHsigMissingModuleExport" = 93011 GhcDiagnosticCode "TcRnBadGenericMethod" = 59794 GhcDiagnosticCode "TcRnWarningMinimalDefIncomplete" = 13511 GhcDiagnosticCode "TcRnDefaultMethodForPragmaLacksBinding" = 28587 GhcDiagnosticCode "TcRnIgnoreSpecialisePragmaOnDefMethod" = 72520 GhcDiagnosticCode "TcRnBadMethodErr" = 46284- GhcDiagnosticCode "TcRnNoExplicitAssocTypeOrDefaultDeclaration" = 08585 GhcDiagnosticCode "TcRnIllegalTypeData" = 15013 GhcDiagnosticCode "TcRnTypeDataForbids" = 67297- GhcDiagnosticCode "TcRnTypedTHWithPolyType" = 94642- GhcDiagnosticCode "TcRnSpliceThrewException" = 87897- GhcDiagnosticCode "TcRnInvalidTopDecl" = 52886- GhcDiagnosticCode "TcRnNonExactName" = 77923- GhcDiagnosticCode "TcRnAddInvalidCorePlugin" = 86463- GhcDiagnosticCode "TcRnAddDocToNonLocalDefn" = 67760- GhcDiagnosticCode "TcRnFailedToLookupThInstName" = 49530- GhcDiagnosticCode "TcRnCannotReifyInstance" = 30384- GhcDiagnosticCode "TcRnCannotReifyOutOfScopeThing" = 24922- GhcDiagnosticCode "TcRnCannotReifyThingNotInTypeEnv" = 79890- GhcDiagnosticCode "TcRnNoRolesAssociatedWithThing" = 65923- GhcDiagnosticCode "TcRnCannotRepresentType" = 75721- GhcDiagnosticCode "TcRnReportCustomQuasiError" = 39584 GhcDiagnosticCode "TcRnInterfaceLookupError" = 52243 GhcDiagnosticCode "TcRnUnsatisfiedMinimalDef" = 06201 GhcDiagnosticCode "TcRnMisplacedInstSig" = 06202- GhcDiagnosticCode "TcRnBadBootFamInstDecl" = 06203- GhcDiagnosticCode "TcRnIllegalFamilyInstance" = 06204- GhcDiagnosticCode "TcRnMissingClassAssoc" = 06205- GhcDiagnosticCode "TcRnBadFamInstDecl" = 06206- GhcDiagnosticCode "TcRnNotOpenFamily" = 06207+ GhcDiagnosticCode "TcRnCapturedTermName" = 54201+ GhcDiagnosticCode "TcRnBindingOfExistingName" = 58805+ GhcDiagnosticCode "TcRnMultipleFixityDecls" = 50419+ GhcDiagnosticCode "TcRnIllegalPatternSynonymDecl" = 41507+ GhcDiagnosticCode "TcRnIllegalClassBinding" = 69248+ GhcDiagnosticCode "TcRnOrphanCompletePragma" = 93961+ GhcDiagnosticCode "TcRnEmptyCase" = 48010+ GhcDiagnosticCode "TcRnNonStdGuards" = 59119+ GhcDiagnosticCode "TcRnDuplicateSigDecl" = 31744+ GhcDiagnosticCode "TcRnMisplacedSigDecl" = 87866+ GhcDiagnosticCode "TcRnUnexpectedDefaultSig" = 40700+ GhcDiagnosticCode "TcRnDuplicateMinimalSig" = 85346 GhcDiagnosticCode "TcRnLoopySuperclassSolve" = 36038+ GhcDiagnosticCode "TcRnUnexpectedStandaloneDerivingDecl" = 95159+ GhcDiagnosticCode "TcRnUnusedVariableInRuleDecl" = 65669+ GhcDiagnosticCode "TcRnUnexpectedStandaloneKindSig" = 45906+ GhcDiagnosticCode "TcRnIllegalRuleLhs" = 63294+ GhcDiagnosticCode "TcRnDuplicateRoleAnnot" = 97170+ GhcDiagnosticCode "TcRnDuplicateKindSig" = 43371+ GhcDiagnosticCode "TcRnIllegalDerivStrategy" = 87139+ GhcDiagnosticCode "TcRnIllegalMultipleDerivClauses" = 30281+ GhcDiagnosticCode "TcRnNoDerivStratSpecified" = 55631+ GhcDiagnosticCode "TcRnStupidThetaInGadt" = 18403+ GhcDiagnosticCode "TcRnShadowedTyVarNameInFamResult" = 99412+ GhcDiagnosticCode "TcRnIncorrectTyVarOnLhsOfInjCond" = 88333+ GhcDiagnosticCode "TcRnUnknownTyVarsOnRhsOfInjCond" = 48254+ GhcDiagnosticCode "TcRnBadlyStaged" = 28914+ GhcDiagnosticCode "TcRnStageRestriction" = 18157+ GhcDiagnosticCode "TcRnTyThingUsedWrong" = 10969+ GhcDiagnosticCode "TcRnCannotDefaultKindVar" = 79924+ GhcDiagnosticCode "TcRnUninferrableTyVar" = 16220+ GhcDiagnosticCode "TcRnSkolemEscape" = 71451+ GhcDiagnosticCode "TcRnPatSynEscapedCoercion" = 88986+ GhcDiagnosticCode "TcRnPatSynExistentialInResult" = 33973+ GhcDiagnosticCode "TcRnPatSynArityMismatch" = 18365+ GhcDiagnosticCode "TcRnTyFamDepsDisabled" = 43991+ GhcDiagnosticCode "TcRnAbstractClosedTyFamDecl" = 60012+ GhcDiagnosticCode "TcRnPartialFieldSelector" = 82712+ GhcDiagnosticCode "TcRnSuperclassCycle" = 29210+ GhcDiagnosticCode "TcRnDefaultSigMismatch" = 72771+ GhcDiagnosticCode "TcRnTyFamResultDisabled" = 44012+ GhcDiagnosticCode "TcRnCommonFieldResultTypeMismatch" = 31004+ GhcDiagnosticCode "TcRnCommonFieldTypeMismatch" = 91827+ GhcDiagnosticCode "TcRnDataConParentTypeMismatch" = 45219+ GhcDiagnosticCode "TcRnGADTsDisabled" = 23894+ GhcDiagnosticCode "TcRnExistentialQuantificationDisabled" = 25709+ GhcDiagnosticCode "TcRnGADTDataContext" = 61072+ GhcDiagnosticCode "TcRnMultipleConForNewtype" = 16409+ GhcDiagnosticCode "TcRnKindSignaturesDisabled" = 49378+ GhcDiagnosticCode "TcRnEmptyDataDeclsDisabled" = 32478+ GhcDiagnosticCode "TcRnRoleMismatch" = 29178+ GhcDiagnosticCode "TcRnRoleCountMismatch" = 54298+ GhcDiagnosticCode "TcRnIllegalRoleAnnotation" = 77192+ GhcDiagnosticCode "TcRnRoleAnnotationsDisabled" = 17779+ GhcDiagnosticCode "TcRnIncoherentRoles" = 18273+ GhcDiagnosticCode "TcRnTypeSynonymCycle" = 97522+ GhcDiagnosticCode "TcRnSelfImport" = 43281+ GhcDiagnosticCode "TcRnNoExplicitImportList" = 16029+ GhcDiagnosticCode "TcRnSafeImportsDisabled" = 26971+ GhcDiagnosticCode "TcRnDeprecatedModule" = 15328+ GhcDiagnosticCode "TcRnCompatUnqualifiedImport" = 82347+ GhcDiagnosticCode "TcRnRedundantSourceImport" = 54478+ GhcDiagnosticCode "TcRnDuplicateDecls" = 29916+ GhcDiagnosticCode "TcRnPackageImportsDisabled" = 10032+ GhcDiagnosticCode "TcRnIllegalDataCon" = 78448+ GhcDiagnosticCode "TcRnNestedForallsContexts" = 71492+ GhcDiagnosticCode "TcRnRedundantRecordWildcard" = 15932+ GhcDiagnosticCode "TcRnUnusedRecordWildcard" = 83475+ GhcDiagnosticCode "TcRnUnusedName" = 40910+ GhcDiagnosticCode "TcRnQualifiedBinder" = 28329+ GhcDiagnosticCode "TcRnInvalidRecordField" = 53822+ GhcDiagnosticCode "TcRnTupleTooLarge" = 94803+ GhcDiagnosticCode "TcRnCTupleTooLarge" = 89347+ GhcDiagnosticCode "TcRnIllegalInferredTyVars" = 54832+ GhcDiagnosticCode "TcRnAmbiguousName" = 87543+ GhcDiagnosticCode "TcRnBindingNameConflict" = 10498+ GhcDiagnosticCode "NonCanonicalMonoid" = 50928+ GhcDiagnosticCode "NonCanonicalMonad" = 22705+ GhcDiagnosticCode "TcRnImplicitImportOfPrelude" = 20540+ GhcDiagnosticCode "TcRnMissingMain" = 67120+ GhcDiagnosticCode "TcRnGhciUnliftedBind" = 17999+ GhcDiagnosticCode "TcRnGhciMonadLookupFail" = 44990+ GhcDiagnosticCode "TcRnArityMismatch" = 27346+ GhcDiagnosticCode "TcRnSimplifiableConstraint" = 62412+ GhcDiagnosticCode "TcRnIllegalQuasiQuotes" = 77343+ GhcDiagnosticCode "TcRnImplicitRhsQuantification" = 16382+ GhcDiagnosticCode "TcRnBadTyConTelescope" = 87279+ GhcDiagnosticCode "TcRnPatersonCondFailure" = 22979+ GhcDiagnosticCode "TcRnDeprecatedInvisTyArgInConPat" = 69797 + -- TcRnTypeApplicationsDisabled+ GhcDiagnosticCode "TypeApplication" = 23482+ GhcDiagnosticCode "TypeApplicationInPattern" = 17916++ -- PatSynInvalidRhsReason+ GhcDiagnosticCode "PatSynNotInvertible" = 69317+ GhcDiagnosticCode "PatSynUnboundVar" = 28572++ -- TcRnBadFieldAnnotation/BadFieldAnnotationReason+ GhcDiagnosticCode "LazyFieldsDisabled" = 81601+ GhcDiagnosticCode "UnpackWithoutStrictness" = 10107+ GhcDiagnosticCode "BackpackUnpackAbstractType" = 40091++ -- TcRnRoleValidationFailed/RoleInferenceFailedReason+ GhcDiagnosticCode "TyVarRoleMismatch" = 22221+ GhcDiagnosticCode "TyVarMissingInEnv" = 99991+ GhcDiagnosticCode "BadCoercionRole" = 92834++ -- TcRnClassExtensionDisabled/DisabledClassExtension+ GhcDiagnosticCode "MultiParamDisabled" = 28349+ GhcDiagnosticCode "FunDepsDisabled" = 15708+ GhcDiagnosticCode "ConstrainedClassMethodsDisabled" = 25079++ -- TcRnTyFamsDisabled/TyFamsDisabledReason+ GhcDiagnosticCode "TyFamsDisabledFamily" = 39191+ GhcDiagnosticCode "TyFamsDisabledInstance" = 06206+ GhcDiagnosticCode "TcRnPrecedenceParsingError" = 88747+ GhcDiagnosticCode "TcRnSectionPrecedenceError" = 46878++ -- HsigShapeMismatchReason+ GhcDiagnosticCode "HsigShapeSortMismatch" = 93008+ GhcDiagnosticCode "HsigShapeNotUnifiable" = 93009++ -- Invisible binders+ GhcDiagnosticCode "TcRnIllegalInvisTyVarBndr" = 58589+ GhcDiagnosticCode "TcRnInvalidInvisTyVarBndr" = 57916+ GhcDiagnosticCode "TcRnInvisBndrWithoutSig" = 92337+ -- IllegalNewtypeReason GhcDiagnosticCode "DoesNotHaveSingleField" = 23517 GhcDiagnosticCode "IsNonLinear" = 38291@@ -512,6 +628,18 @@ GhcDiagnosticCode "HasExistentialTyVar" = 07525 GhcDiagnosticCode "HasStrictnessAnnotation" = 04049 + -- TcRnBadRecordUpdate+ GhcDiagnosticCode "NoConstructorHasAllFields" = 14392+ GhcDiagnosticCode "MultiplePossibleParents" = 99339+ GhcDiagnosticCode "InvalidTyConParent" = 33238++ -- BadImport+ GhcDiagnosticCode "BadImportNotExported" = 61689+ GhcDiagnosticCode "BadImportAvailDataCon" = 35373+ GhcDiagnosticCode "BadImportNotExportedSubordinates" = 10237+ GhcDiagnosticCode "BadImportAvailTyCon" = 56449+ GhcDiagnosticCode "BadImportAvailVar" = 12112+ -- TcRnPragmaWarning GhcDiagnosticCode "WarningTxt" = 63394 GhcDiagnosticCode "DeprecatedTxt" = 68441@@ -540,6 +668,62 @@ GhcDiagnosticCode "DefaultDataInstDecl" = 39639 GhcDiagnosticCode "FunBindLacksEquations" = 52078 + -- TcRnDodgyImports/DodgyImportsReason+ GhcDiagnosticCode "DodgyImportsEmptyParent" = 99623++ -- TcRnImportLookup/ImportLookupReason+ GhcDiagnosticCode "ImportLookupQualified" = 48795+ GhcDiagnosticCode "ImportLookupIllegal" = 14752+ GhcDiagnosticCode "ImportLookupAmbiguous" = 92057++ -- TcRnUnusedImport/UnusedImportReason+ GhcDiagnosticCode "UnusedImportNone" = 66111+ GhcDiagnosticCode "UnusedImportSome" = 38856++ -- TcRnIllegalInstance+ GhcDiagnosticCode "IllegalFamilyApplicationInInstance" = 73138++ -- TcRnIllegalClassInstance/IllegalClassInstanceReason+ GhcDiagnosticCode "IllegalSpecialClassInstance" = 97044+ GhcDiagnosticCode "IllegalInstanceFailsCoverageCondition" = 21572++ -- IllegalInstanceHead+ GhcDiagnosticCode "InstHeadAbstractClass" = 51758+ GhcDiagnosticCode "InstHeadNonClass" = 53946+ GhcDiagnosticCode "InstHeadTySynArgs" = 93557+ GhcDiagnosticCode "InstHeadNonTyVarArgs" = 48406+ GhcDiagnosticCode "InstHeadMultiParam" = 91901++ -- IllegalHasFieldInstance+ GhcDiagnosticCode "IllegalHasFieldInstanceNotATyCon" = 88994+ GhcDiagnosticCode "IllegalHasFieldInstanceFamilyTyCon" = 70743+ GhcDiagnosticCode "IllegalHasFieldInstanceTyConHasFields" = 43406+ GhcDiagnosticCode "IllegalHasFieldInstanceTyConHasField" = 30836++ -- TcRnIllegalFamilyInstance/IllegalFamilyInstanceReason+ GhcDiagnosticCode "NotAFamilyTyCon" = 06204+ GhcDiagnosticCode "NotAnOpenFamilyTyCon" = 06207+ GhcDiagnosticCode "FamilyCategoryMismatch" = 52347+ GhcDiagnosticCode "FamilyArityMismatch" = 12985+ GhcDiagnosticCode "TyFamNameMismatch" = 88221+ GhcDiagnosticCode "FamInstRHSOutOfScopeTyVars" = 53634+ GhcDiagnosticCode "FamInstLHSUnusedBoundTyVars" = 30337++ -- InvalidAssocInstance+ GhcDiagnosticCode "AssocInstanceMissing" = 08585+ GhcDiagnosticCode "AssocInstanceNotInAClass" = 06205+ GhcDiagnosticCode "AssocNotInThisClass" = 38351+ GhcDiagnosticCode "AssocNoClassTyVar" = 55912+ GhcDiagnosticCode "AssocTyVarsDontMatch" = 95424++ -- InvalidAssocDefault+ GhcDiagnosticCode "AssocDefaultNotAssoc" = 78822+ GhcDiagnosticCode "AssocMultipleDefaults" = 59128++ -- AssocDefaultBadArgs+ GhcDiagnosticCode "AssocDefaultNonTyVarArg" = 41522+ GhcDiagnosticCode "AssocDefaultDuplicateTyVars" = 48178+ -- Diagnostic codes for the foreign function interface GhcDiagnosticCode "NotADataType" = 31136 GhcDiagnosticCode "NewtypeDataConNotInScope" = 72317@@ -556,13 +740,32 @@ GhcDiagnosticCode "OneArgExpected" = 91490 GhcDiagnosticCode "AtLeastOneArgExpected" = 07641 + -- Interface errors+ GhcDiagnosticCode "BadSourceImport" = 64852+ GhcDiagnosticCode "HomeModError" = 58427+ GhcDiagnosticCode "DynamicHashMismatchError" = 54709+ GhcDiagnosticCode "CouldntFindInFiles" = 94559+ GhcDiagnosticCode "GenericMissing" = 87110+ GhcDiagnosticCode "MissingPackageFiles" = 22211+ GhcDiagnosticCode "MissingPackageWayFiles" = 88719+ GhcDiagnosticCode "ModuleSuggestion" = 61948+ GhcDiagnosticCode "MultiplePackages" = 45102+ GhcDiagnosticCode "NoUnitIdMatching" = 51294+ GhcDiagnosticCode "NotAModule" = 35235+ GhcDiagnosticCode "Can'tFindNameInInterface" = 83249+ GhcDiagnosticCode "CircularImport" = 75429+ GhcDiagnosticCode "HiModuleNameMismatchWarn" = 53693+ GhcDiagnosticCode "ExceptionOccurred" = 47808+ -- Out of scope errors GhcDiagnosticCode "NotInScope" = 76037+ GhcDiagnosticCode "NotARecordField" = 22385 GhcDiagnosticCode "NoExactName" = 97784 GhcDiagnosticCode "SameName" = 81573 GhcDiagnosticCode "MissingBinding" = 44432 GhcDiagnosticCode "NoTopLevelBinding" = 10173 GhcDiagnosticCode "UnknownSubordinate" = 54721+ GhcDiagnosticCode "NotInScopeTc" = 76329 -- Diagnostic codes for deriving GhcDiagnosticCode "DerivErrNotWellKinded" = 62016@@ -593,14 +796,63 @@ GhcDiagnosticCode "DerivErrGenerics" = 30367 GhcDiagnosticCode "DerivErrEnumOrProduct" = 58291 + -- Diagnostic codes for instance lookup+ GhcDiagnosticCode "LookupInstErrNotExact" = 10372+ GhcDiagnosticCode "LookupInstErrFlexiVar" = 10373+ GhcDiagnosticCode "LookupInstErrNotFound" = 10374+ -- TcRnEmptyStmtsGroupError/EmptyStatementGroupErrReason GhcDiagnosticCode "EmptyStmtsGroupInParallelComp" = 41242 GhcDiagnosticCode "EmptyStmtsGroupInTransformListComp" = 92693 GhcDiagnosticCode "EmptyStmtsGroupInDoNotation" = 82311 GhcDiagnosticCode "EmptyStmtsGroupInArrowNotation" = 19442 - GhcDiagnosticCode "TcRnCannotDefaultConcrete" = 52083+ -- HsBoot and Hsig errors+ GhcDiagnosticCode "MissingBootDefinition" = 63610+ GhcDiagnosticCode "MissingBootExport" = 91999+ GhcDiagnosticCode "MissingBootInstance" = 79857+ GhcDiagnosticCode "BadReexportedBootThing" = 12424+ GhcDiagnosticCode "BootMismatchedIdTypes" = 11890+ GhcDiagnosticCode "BootMismatchedTyCons" = 15843 + -- TH errors+ GhcDiagnosticCode "TypedTHWithPolyType" = 94642+ GhcDiagnosticCode "SplicePolymorphicLocalVar" = 06568+ GhcDiagnosticCode "SpliceThrewException" = 87897+ GhcDiagnosticCode "InvalidTopDecl" = 52886+ GhcDiagnosticCode "NonExactName" = 77923+ GhcDiagnosticCode "AddInvalidCorePlugin" = 86463+ GhcDiagnosticCode "AddDocToNonLocalDefn" = 67760+ GhcDiagnosticCode "FailedToLookupThInstName" = 49530+ GhcDiagnosticCode "CannotReifyInstance" = 30384+ GhcDiagnosticCode "CannotReifyOutOfScopeThing" = 24922+ GhcDiagnosticCode "CannotReifyThingNotInTypeEnv" = 79890+ GhcDiagnosticCode "NoRolesAssociatedWithThing" = 65923+ GhcDiagnosticCode "CannotRepresentType" = 75721+ GhcDiagnosticCode "ReportCustomQuasiError" = 39584+ GhcDiagnosticCode "MismatchedSpliceType" = 45108+ GhcDiagnosticCode "IllegalTHQuotes" = 62558+ GhcDiagnosticCode "IllegalTHSplice" = 26759+ GhcDiagnosticCode "NestedTHBrackets" = 59185+ GhcDiagnosticCode "AddTopDeclsUnexpectedDeclarationSplice" = 17599+ GhcDiagnosticCode "BadImplicitSplice" = 25277+ GhcDiagnosticCode "QuotedNameWrongStage" = 57695+ GhcDiagnosticCode "IllegalStaticFormInSplice" = 12219++ -- Zonker messages+ GhcDiagnosticCode "ZonkerCannotDefaultConcrete" = 52083++ -- Promotion errors+ GhcDiagnosticCode "ClassPE" = 86934+ GhcDiagnosticCode "TyConPE" = 85413+ GhcDiagnosticCode "PatSynPE" = 70349+ GhcDiagnosticCode "FamDataConPE" = 64578+ GhcDiagnosticCode "ConstrainedDataConPE" = 28374+ GhcDiagnosticCode "RecDataConPE" = 56753+ GhcDiagnosticCode "NoDataKindsDC" = 71015+ GhcDiagnosticCode "TermVariablePE" = 45510+ GhcDiagnosticCode "TypeVariablePE" = 47557+ -- To generate new random numbers: -- https://www.random.org/integers/?num=10&min=1&max=99999&col=1&base=10&format=plain --@@ -609,8 +861,20 @@ -- and this includes outdated diagnostic codes for errors that GHC -- no longer reports. These are collected below. - GhcDiagnosticCode "Example outdated error" = 00000+ GhcDiagnosticCode "TcRnIllegalInstanceHeadDecl" = 12222+ GhcDiagnosticCode "TcRnNoClassInstHead" = 56538+ -- The above two are subsumed by InstHeadNonClass [GHC-53946] + GhcDiagnosticCode "TcRnNameByTemplateHaskellQuote" = 40027+ GhcDiagnosticCode "TcRnIllegalBindingOfBuiltIn" = 69639+ GhcDiagnosticCode "TcRnMixedSelectors" = 40887+ GhcDiagnosticCode "TcRnBadBootFamInstDecl" = 06203+ GhcDiagnosticCode "TcRnBindInBootFile" = 11247+ GhcDiagnosticCode "TcRnUnexpectedTypeSplice" = 39180+ GhcDiagnosticCode "PsErrUnexpectedTypeAppInDecl" = 45054+ GhcDiagnosticCode "TcRnUnpromotableThing" = 88634+ GhcDiagnosticCode "UntouchableVariable" = 34699+ {- ********************************************************************* * * Recurring into an argument@@ -636,24 +900,33 @@ ConRecursInto "GhcPsMessage" = 'Just PsMessage ConRecursInto "GhcTcRnMessage" = 'Just TcRnMessage ConRecursInto "GhcDsMessage" = 'Just DsMessage- ConRecursInto "GhcUnknownMessage" = 'Just UnknownDiagnostic+ ConRecursInto "GhcUnknownMessage" = 'Just (UnknownDiagnostic GhcMessageOpts) ---------------------------------- -- Constructors of DriverMessage - ConRecursInto "DriverUnknownMessage" = 'Just UnknownDiagnostic+ ConRecursInto "DriverUnknownMessage" = 'Just (UnknownDiagnostic DriverMessageOpts) ConRecursInto "DriverPsHeaderMessage" = 'Just PsMessage+ ConRecursInto "DriverInterfaceError" = 'Just IfaceMessage + ConRecursInto "CantFindErr" = 'Just CantFindInstalled+ ConRecursInto "CantFindInstalledErr" = 'Just CantFindInstalled++ ConRecursInto "CantFindInstalled" = 'Just CantFindInstalledReason++ ConRecursInto "BadIfaceFile" = 'Just ReadInterfaceError+ ConRecursInto "FailedToLoadDynamicInterface" = 'Just ReadInterfaceError+ ---------------------------------- -- Constructors of PsMessage - ConRecursInto "PsUnknownMessage" = 'Just UnknownDiagnostic+ ConRecursInto "PsUnknownMessage" = 'Just (UnknownDiagnostic NoDiagnosticOpts) ConRecursInto "PsHeaderMessage" = 'Just PsHeaderMessage ---------------------------------- -- Constructors of TcRnMessage - ConRecursInto "TcRnUnknownMessage" = 'Just UnknownDiagnostic+ ConRecursInto "TcRnUnknownMessage" = 'Just (UnknownDiagnostic TcRnMessageOpts) -- Recur into TcRnMessageWithInfo to get the underlying TcRnMessage ConRecursInto "TcRnMessageWithInfo" = 'Just TcRnMessageDetailed@@ -661,16 +934,67 @@ ConRecursInto "TcRnWithHsDocContext" = 'Just TcRnMessage ConRecursInto "TcRnCannotDeriveInstance" = 'Just DeriveInstanceErrReason+ ConRecursInto "TcRnLookupInstance" = 'Just LookupInstanceErrReason ConRecursInto "TcRnPragmaWarning" = 'Just (WarningTxt GhcRn) ConRecursInto "TcRnNotInScope" = 'Just NotInScopeError ConRecursInto "TcRnIllegalNewtype" = 'Just IllegalNewtypeReason+ ConRecursInto "TcRnHsigShapeMismatch" = 'Just HsigShapeMismatchReason+ ConRecursInto "TcRnPatSynInvalidRhs" = 'Just PatSynInvalidRhsReason+ ConRecursInto "TcRnBadRecordUpdate" = 'Just BadRecordUpdateReason+ ConRecursInto "TcRnBadFieldAnnotation" = 'Just BadFieldAnnotationReason+ ConRecursInto "TcRnRoleValidationFailed" = 'Just RoleValidationFailedReason+ ConRecursInto "TcRnClassExtensionDisabled" = 'Just DisabledClassExtension+ ConRecursInto "TcRnTyFamsDisabled" = 'Just TyFamsDisabledReason+ ConRecursInto "TcRnDodgyImports" = 'Just DodgyImportsReason+ ConRecursInto "DodgyImportsHiding" = 'Just ImportLookupReason+ ConRecursInto "TcRnImportLookup" = 'Just ImportLookupReason+ ConRecursInto "TcRnUnusedImport" = 'Just UnusedImportReason+ ConRecursInto "TcRnNonCanonicalDefinition" = 'Just NonCanonicalDefinition+ ConRecursInto "TcRnIllegalInstance" = 'Just IllegalInstanceReason+ ConRecursInto "TcRnTypeApplicationsDisabled" = 'Just TypeApplication + -- Illegal instance reasons+ ConRecursInto "IllegalClassInstance" = 'Just IllegalClassInstanceReason+ ConRecursInto "IllegalFamilyInstance" = 'Just IllegalFamilyInstanceReason++ -- Illegal class instance reasons++ ConRecursInto "IllegalInstanceHead" = 'Just IllegalInstanceHeadReason+ ConRecursInto "IllegalHasFieldInstance" = 'Just IllegalHasFieldInstance++ -- Illegal family instance reasons++ ConRecursInto "InvalidAssoc" = 'Just InvalidAssoc+ ConRecursInto "InvalidAssocInstance" = 'Just InvalidAssocInstance+ ConRecursInto "InvalidAssocDefault" = 'Just InvalidAssocDefault+ ConRecursInto "AssocDefaultBadArgs" = 'Just AssocDefaultBadArgs+ -- -- TH errors+ ConRecursInto "TcRnTHError" = 'Just THError+ ConRecursInto "THSyntaxError" = 'Just THSyntaxError+ ConRecursInto "THNameError" = 'Just THNameError+ ConRecursInto "THReifyError" = 'Just THReifyError+ ConRecursInto "TypedTHError" = 'Just TypedTHError+ ConRecursInto "THSpliceFailed" = 'Just SpliceFailReason+ ConRecursInto "RunSpliceFailure" = 'Just RunSpliceFailReason+ ConRecursInto "ConversionFail" = 'Just ConversionFailReason+ ConRecursInto "AddTopDeclsError" = 'Just AddTopDeclsError+ ConRecursInto "AddTopDeclsRunSpliceFailure" = 'Just RunSpliceFailReason - ConRecursInto "TcRnRunSpliceFailure" = 'Just RunSpliceFailReason- ConRecursInto "ConversionFail" = 'Just ConversionFailReason+ -- Interface file errors + ConRecursInto "TcRnInterfaceError" = 'Just IfaceMessage+ ConRecursInto "Can'tFindInterface" = 'Just MissingInterfaceError++ -- HsBoot and Hsig errors+ ConRecursInto "TcRnBootMismatch" = 'Just BootMismatch+ ConRecursInto "MissingBootThing" = 'Just MissingBootThing+ ConRecursInto "BootMismatch" = 'Just BootMismatchWhat++ -- Zonker errors+ ConRecursInto "TcRnZonkerMessage" = 'Just ZonkerMessage+ ------------------ -- FFI errors @@ -697,9 +1021,14 @@ ---------------------------------- -- Constructors of DsMessage - ConRecursInto "DsUnknownMessage" = 'Just UnknownDiagnostic+ ConRecursInto "DsUnknownMessage" = 'Just (UnknownDiagnostic NoDiagnosticOpts) ----------------------------------+ -- Constructors of ImportLookupBad+ ConRecursInto "ImportLookupBad" = 'Just BadImportKind++ ConRecursInto "TcRnUnpromotableThing" = 'Just PromotionErr+ ---------------------------------- -- Any other constructors: don't recur, instead directly -- use the constructor name for the error code. @@ -782,11 +1111,11 @@ -- If we recur into the 'UnknownDiagnostic' existential datatype, -- unwrap the existential and obtain the error code. instance {-# OVERLAPPING #-}- ( ConRecursInto con ~ 'Just UnknownDiagnostic- , HasType UnknownDiagnostic con f )- => ConstructorCode con f ('Just UnknownDiagnostic) where- gconstructorCode diag = case getType @UnknownDiagnostic @con @f diag of- UnknownDiagnostic diag -> diagnosticCode diag+ ( ConRecursInto con ~ 'Just (UnknownDiagnostic opts)+ , HasType (UnknownDiagnostic opts) con f )+ => ConstructorCode con f ('Just (UnknownDiagnostic opts)) where+ gconstructorCode diag = case getType @(UnknownDiagnostic opts) @con @f diag of+ UnknownDiagnostic _ diag -> diagnosticCode diag -- (*) Recursive instance: Recur into the given type. instance ( ConRecursInto con ~ 'Just ty, HasType ty con f
GHC/Types/FieldLabel.hs view
@@ -10,7 +10,6 @@ Note [FieldLabel] ~~~~~~~~~~~~~~~~~- This module defines the representation of FieldLabels as stored in TyCons. As well as a selector name, these have some extra structure to support the DuplicateRecordFields and NoFieldSelectors extensions.@@ -22,60 +21,25 @@ has - FieldLabel { flLabel = "foo"- , flHasDuplicateRecordFields = NoDuplicateRecordFields+ FieldLabel { flHasDuplicateRecordFields = NoDuplicateRecordFields , flHasFieldSelector = FieldSelectors , flSelector = foo }. -In particular, the Name of the selector has the same string-representation as the label. If DuplicateRecordFields-is enabled, however, the same declaration instead gives+If DuplicateRecordFields is enabled, however, the same declaration instead gives - FieldLabel { flLabel = "foo"- , flHasDuplicateRecordFields = DuplicateRecordFields+ FieldLabel { flHasDuplicateRecordFields = DuplicateRecordFields , flHasFieldSelector = FieldSelectors- , flSelector = $sel:foo:MkT }.--Similarly, the selector name will be mangled if NoFieldSelectors is used-(whether or not DuplicateRecordFields is enabled). See Note [NoFieldSelectors]-in GHC.Rename.Env.--Now the name of the selector ($sel:foo:MkT) does not match the label of-the field (foo). We must be careful not to show the selector name to-the user! The point of mangling the selector name is to allow a-module to define the same field label in different datatypes:-- data T = MkT { foo :: Int }- data U = MkU { foo :: Bool }--Now there will be two FieldLabel values for 'foo', one in T and one in-U. They share the same label (FieldLabelString), but the selector-functions differ.--See also Note [Representing fields in AvailInfo] in GHC.Types.Avail.--Note [Why selector names include data constructors]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--As explained above, a selector name includes the name of the first-data constructor in the type, so that the same label can appear-multiple times in the same module. (This is irrespective of whether-the first constructor has that field, for simplicity.)--We use a data constructor name, rather than the type constructor name,-because data family instances do not have a representation type-constructor name generated until relatively late in the typechecking-process.--Of course, datatypes with no constructors cannot have any fields.+ , flSelector = foo }. +We need to keep track of whether FieldSelectors or DuplicateRecordFields were+enabled when a record field was defined, as they affect name resolution and+shadowing of record fields, as explained in Note [NoFieldSelectors] in GHC.Types.Name.Reader+and Note [Reporting duplicate local declarations] in GHC.Rename.Names. -} module GHC.Types.FieldLabel ( FieldLabelEnv- , FieldLabel(..)- , fieldSelectorOccName- , fieldLabelPrintableName+ , FieldLabel(..), flLabel , DuplicateRecordFields(..) , FieldSelectors(..) , flIsOverloaded@@ -84,10 +48,8 @@ import GHC.Prelude -import {-# SOURCE #-} GHC.Types.Name.Occurrence import {-# SOURCE #-} GHC.Types.Name -import GHC.Data.FastString import GHC.Data.FastString.Env import GHC.Types.Unique (Uniquable(..)) import GHC.Utils.Outputable@@ -104,20 +66,23 @@ -- | Fields in an algebraic record type; see Note [FieldLabel]. data FieldLabel = FieldLabel {- flLabel :: FieldLabelString,- -- ^ User-visible label of the field flHasDuplicateRecordFields :: DuplicateRecordFields, -- ^ Was @DuplicateRecordFields@ on in the defining module for this datatype? flHasFieldSelector :: FieldSelectors, -- ^ Was @FieldSelectors@ enabled in the defining module for this datatype? -- See Note [NoFieldSelectors] in GHC.Rename.Env flSelector :: Name- -- ^ Record selector function+ -- ^ The 'Name' of the selector function, which uniquely identifies+ -- the field label. } deriving (Data, Eq) +-- | User-visible label of a field.+flLabel :: FieldLabel -> FieldLabelString+flLabel = FieldLabelString . occNameFS . nameOccName . flSelector+ instance HasOccName FieldLabel where- occName = mkVarOccFS . field_label . flLabel+ occName = nameOccName . flSelector instance Outputable FieldLabel where ppr fl = ppr (flLabel fl) <> whenPprDebug (braces (ppr (flSelector fl))@@ -130,9 +95,6 @@ instance Uniquable FieldLabelString where getUnique (FieldLabelString fs) = getUnique fs -instance NFData FieldLabel where- rnf (FieldLabel a b c d) = rnf a `seq` rnf b `seq` rnf c `seq` rnf d- -- | Flag to indicate whether the DuplicateRecordFields extension is enabled. data DuplicateRecordFields = DuplicateRecordFields -- ^ Fields may be duplicated in a single module@@ -148,8 +110,10 @@ ppr NoDuplicateRecordFields = text "-dup" instance NFData DuplicateRecordFields where- rnf x = x `seq` ()+ rnf DuplicateRecordFields = ()+ rnf NoDuplicateRecordFields = () + -- | Flag to indicate whether the FieldSelectors extension is enabled. data FieldSelectors = FieldSelectors -- ^ Selector functions are available (the default)@@ -165,55 +129,27 @@ ppr NoFieldSelectors = text "-sel" instance NFData FieldSelectors where- rnf x = x `seq` ()+ rnf FieldSelectors = ()+ rnf NoFieldSelectors = () -- | We need the @Binary Name@ constraint here even though there is an instance -- defined in "GHC.Types.Name", because the we have a SOURCE import, so the -- instance is not in scope. And the instance cannot be added to Name.hs-boot -- because "GHC.Utils.Binary" itself depends on "GHC.Types.Name". instance Binary Name => Binary FieldLabel where- put_ bh (FieldLabel aa ab ac ad) = do- put_ bh (field_label aa)+ put_ bh (FieldLabel aa ab ac) = do+ put_ bh aa put_ bh ab- put_ bh ac- put_ bh ad+ case getUserData bh of+ UserData{ ud_put_binding_name = put_binding_name } ->+ put_binding_name bh ac get bh = do aa <- get bh ab <- get bh ac <- get bh- ad <- get bh- return (FieldLabel (FieldLabelString aa) ab ac ad)----- | Record selector OccNames are built from the underlying field name--- and the name of the first data constructor of the type, to support--- duplicate record field names.--- See Note [Why selector names include data constructors].-fieldSelectorOccName :: FieldLabelString -> OccName -> DuplicateRecordFields -> FieldSelectors -> OccName-fieldSelectorOccName lbl dc dup_fields_ok has_sel- | shouldMangleSelectorNames dup_fields_ok has_sel = mkRecFldSelOcc str- | otherwise = mkVarOccFS fl- where- fl = field_label lbl- str = concatFS [fsLit ":", fl, fsLit ":", occNameFS dc]---- | Undo the name mangling described in Note [FieldLabel] to produce a Name--- that has the user-visible OccName (but the selector's unique). This should--- be used only when generating output, when we want to show the label, but may--- need to qualify it with a module prefix.-fieldLabelPrintableName :: FieldLabel -> Name-fieldLabelPrintableName fl- | flIsOverloaded fl = tidyNameOcc (flSelector fl) (mkVarOccFS (field_label $ flLabel fl))- | otherwise = flSelector fl---- | Selector name mangling should be used if either DuplicateRecordFields or--- NoFieldSelectors is enabled, so that the OccName of the field can be used for--- something else. See Note [FieldLabel], and Note [NoFieldSelectors] in--- GHC.Rename.Env.-shouldMangleSelectorNames :: DuplicateRecordFields -> FieldSelectors -> Bool-shouldMangleSelectorNames dup_fields_ok has_sel- = dup_fields_ok == DuplicateRecordFields || has_sel == NoFieldSelectors+ return (FieldLabel aa ab ac) flIsOverloaded :: FieldLabel -> Bool flIsOverloaded fl =- shouldMangleSelectorNames (flHasDuplicateRecordFields fl) (flHasFieldSelector fl)+ flHasDuplicateRecordFields fl == DuplicateRecordFields+ || flHasFieldSelector fl == NoFieldSelectors
GHC/Types/Fixity.hs view
@@ -24,7 +24,7 @@ import Data.Data hiding (Fixity, Prefix, Infix) data Fixity = Fixity SourceText Int FixityDirection- -- Note [Pragma source text]+ -- Note [Pragma source text] in "GHC.Types.SourceText" deriving Data instance Outputable Fixity where
GHC/Types/ForeignCall.hs view
@@ -99,7 +99,7 @@ data CExportSpec = CExportStatic -- foreign export ccall foo :: ty SourceText -- of the CLabelString.- -- See Note [Pragma source text] in GHC.Types.SourceText+ -- See Note [Pragma source text] in "GHC.Types.SourceText" CLabelString -- C Name of exported function CCallConv deriving Data@@ -117,7 +117,7 @@ -- An "unboxed" ccall# to named function in a particular package. = StaticTarget SourceText -- of the CLabelString.- -- See Note [Pragma source text] in GHC.Types.SourceText+ -- See Note [Pragma source text] in "GHC.Types.SourceText" CLabelString -- C-land name of label. (Maybe Unit) -- What package the function is in.@@ -233,7 +233,7 @@ = text "__ffi_dyn_ccall" <> gc_suf <+> text "\"\"" -- The filename for a C header file--- Note [Pragma source text] in GHC.Types.SourceText+-- Note [Pragma source text] in "GHC.Types.SourceText" data Header = Header SourceText FastString deriving (Eq, Data) @@ -247,7 +247,7 @@ -- 'GHC.Parser.Annotation.AnnClose' @'\#-}'@, -- For details on above see Note [exact print annotations] in "GHC.Parser.Annotation"-data CType = CType SourceText -- Note [Pragma source text] in GHC.Types.SourceText+data CType = CType SourceText -- Note [Pragma source text] in "GHC.Types.SourceText" (Maybe Header) -- header to include for this type (SourceText,FastString) -- the type itself deriving (Eq, Data)
+ GHC/Types/GREInfo.hs view
@@ -0,0 +1,281 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DerivingStrategies #-}++-- | Renamer-level information about 'Name's.+--+-- Renamer equivalent of 'TyThing'.+module GHC.Types.GREInfo where++import GHC.Prelude++import GHC.Types.Basic+import GHC.Types.FieldLabel+import GHC.Types.Name+import GHC.Types.Unique+import GHC.Types.Unique.Set+import GHC.Utils.Outputable+import GHC.Utils.Panic++import Control.DeepSeq ( NFData(..), deepseq )++import Data.Data ( Data )+import Data.List.NonEmpty ( NonEmpty )+import qualified Data.List.NonEmpty as NonEmpty++{-**********************************************************************+* *+ GREInfo+* *+************************************************************************++Note [GREInfo]+~~~~~~~~~~~~~~+In the renamer, we sometimes need a bit more information about a 'Name', e.g.+whether it is a type constructor, class, data constructor, record field, etc.++For example, when typechecking record construction, the renamer needs to look+up the fields of the data constructor being used (see e.g. GHC.Rename.Pat.rnHsRecFields).+Extra information also allows us to provide better error messages when a fatal+error occurs in the renamer, as it allows us to distinguish classes, type families,+type synonyms, etc.++For imported Names, we have access to the full type information in the form of+a TyThing (although see Note [Retrieving the GREInfo from interfaces]).+However, for Names in the module currently being renamed, we don't+yet have full information. Instead of using TyThing, we use the GREInfo type,+and this information gets affixed to each element in the GlobalRdrEnv.++This allows us to treat imported and local Names in a consistent manner:+always look at the GREInfo.++Note [Retrieving the GREInfo from interfaces]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If we have a TyThing, we can easily compute the corresponding GREInfo: this is+done in GHC.Types.TyThing.tyThingGREInfo.++However, one often needs to produce GlobalRdrElts (and thus their GREInfos)+directly after loading interface files, before they are typechecked. For example:++ - GHC.Tc.Module.tcRnModuleTcRnM first calls tcRnImports, which starts off+ calling rnImports which transitively calls filterImports. That function+ is responsible for coughing up GlobalRdrElts (and their GREInfos) obtained+ from interfaces, but we will only typecheck the interfaces after we have+ finished processing the imports (see e.g. the logic at the start of tcRnImports+ which sets eps_is_boot, which decides whether we should look in the boot+ or non-boot interface for any particular module).+ - GHC.Tc.Utils.Backpack.mergeSignatures first loads the relevant signature+ interfaces to merge them, but only later on does it typecheck them.++In both of these examples, what's important is that we **lazily** produce the+GREInfo: it should only be consulted once the interfaces have been typechecked,+which will add the necessary information to the type-level environment.+In particular, the respective functions 'filterImports' and 'mergeSignatures'+should NOT force the gre_info field.++We delay the loading of interfaces by making the gre_info field of 'GlobalRdrElt'+a thunk which, when forced, loads the interface, looks up the 'Name' in the type+environment to get its associated TyThing, and computes the GREInfo from that.+See 'GHC.Rename.Env.lookupGREInfo'.++A possible alternative design would be to change the AvailInfo datatype to also+store GREInfo. We currently don't do that, as this would mean that every time+an interface re-exports something it has to also provide its GREInfo, which+could lead to bloat.++Note [Forcing GREInfo]+~~~~~~~~~~~~~~~~~~~~~~+The GREInfo field of a GlobalRdrElt needs to be lazy, as explained in+Note [Retrieving the GREInfo from interfaces]. For imported things, this field+is usually a thunk which looks up the GREInfo in a type environment+(see GHC.Rename.Env.lookupGREInfo).++We thus need to be careful not to introduce space leaks: such thunks could end+up retaining old type environments, which would violate invariant (5) of+Note [GHC Heap Invariants] in GHC.Driver.Make. This can happen, for example,+when reloading in GHCi (see e.g. test T15369, which can trigger the ghci leak check+if we're not careful).++A naive approach is to simply deeply force the whole GlobalRdrEnv. However,+forcing the GREInfo thunks can force the loading of interface files which we+otherwise might not need to load, so it leads to wasted work.++Instead, whenever we are about to store the GlobalRdrEnv somewhere (such as+in ModDetails), we dehydrate it by stripping away the GREInfo field, turning it+into (). See 'forceGlobalRdrEnv' and its cousin 'hydrateGlobalRdrEnv',+as well as Note [IfGlobalRdrEnv] in GHC.Types.Name.Reader.++Search for references to this note in the code for illustration.+-}++-- | Information about a 'Name' that is pertinent to the renamer.+--+-- See Note [GREInfo]+data GREInfo+ -- | No particular information... e.g. a function+ = Vanilla+ -- | An unbound GRE... could be anything+ | UnboundGRE+ -- | 'TyCon'+ | IAmTyCon !(TyConFlavour Name)+ -- | 'ConLike'+ | IAmConLike !ConInfo+ -- ^ The constructor fields.+ -- See Note [Local constructor info in the renamer].+ -- | Record field+ | IAmRecField !RecFieldInfo++ deriving Data++instance NFData GREInfo where+ rnf Vanilla = ()+ rnf UnboundGRE = ()+ rnf (IAmTyCon tc) = rnf tc+ rnf (IAmConLike info) = rnf info+ rnf (IAmRecField info) = rnf info++plusGREInfo :: GREInfo -> GREInfo -> GREInfo+plusGREInfo Vanilla Vanilla = Vanilla+plusGREInfo UnboundGRE UnboundGRE = UnboundGRE+plusGREInfo (IAmTyCon {}) info2@(IAmTyCon {}) = info2+plusGREInfo (IAmConLike {}) info2@(IAmConLike {}) = info2+plusGREInfo (IAmRecField {}) info2@(IAmRecField {}) = info2+plusGREInfo info1 info2 = pprPanic "plusInfo" $+ vcat [ text "info1:" <+> ppr info1+ , text "info2:" <+> ppr info2 ]++instance Outputable GREInfo where+ ppr Vanilla = text "Vanilla"+ ppr UnboundGRE = text "UnboundGRE"+ ppr (IAmTyCon flav)+ = text "TyCon" <+> ppr flav+ ppr (IAmConLike info)+ = text "ConLike" <+> ppr info+ ppr (IAmRecField info)+ = text "RecField" <+> ppr info++{-**********************************************************************+* *+ Constructor info+* *+************************************************************************++Note [Local constructor info in the renamer]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+As explained in Note [GREInfo], information pertinent to the renamer is+stored using the GREInfo datatype. What information do we need about constructors?++Consider the following example:++ data T = T1 { x, y :: Int }+ | T2 { x :: Int }+ | T3+ | T4 Int Bool++We need to know:+* The fields of the data constructor, so that+ - We can complain if you say `T1 { v = 3 }`, where `v` is not a field of `T1`+ See the following call stack+ * GHC.Rename.Expr.rnExpr (RecordCon case)+ * GHC.Rename.Pat.rnHsRecFields+ * GHC.Rename.Env.lookupRecFieldOcc+ - Ditto if you pattern match on `T1 { v = x }`.+ See the following call stack+ * GHC.Rename.Pat.rnHsRecPatsAndThen+ * GHC.Rename.Pat.rnHsRecFields+ * GHC.Rename.Env.lookupRecFieldOcc+ - We can fill in the dots if you say `T1 {..}` in construction or pattern matching+ See GHC.Rename.Pat.rnHsRecFields.rn_dotdot++* Whether the contructor is nullary.+ We need to know this to accept `T2 {..}`, and `T3 {..}`, but reject `T4 {..}`,+ in both construction and pattern matching.+ See GHC.Rename.Pat.rnHsRecFields.rn_dotdot+ and Note [Nullary constructors and empty record wildcards]++Note [Nullary constructors and empty record wildcards]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A nullary constructor is one with no arguments.+For example, both `data T = MkT` and `data T = MkT {}` are nullary.++For consistency and TH convenience, it was agreed that a `{..}`+match or usage on nullary constructors would be accepted.+This is done as as per https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0496-empty-record-wildcards.rst+-}++-- | Information about the record fields of a constructor.+--+-- See Note [Local constructor info in the renamer]+data ConInfo+ = ConHasRecordFields (NonEmpty FieldLabel)+ | ConHasPositionalArgs+ | ConIsNullary+ deriving stock Eq+ deriving Data++instance NFData ConInfo where+ rnf ConIsNullary = ()+ rnf ConHasPositionalArgs = ()+ rnf (ConHasRecordFields flds) = rnf flds++mkConInfo :: Arity -> [FieldLabel] -> ConInfo+mkConInfo 0 _ = ConIsNullary+mkConInfo _ fields = maybe ConHasPositionalArgs ConHasRecordFields+ $ NonEmpty.nonEmpty fields++conInfoFields :: ConInfo -> [FieldLabel]+conInfoFields (ConHasRecordFields fields) = NonEmpty.toList fields+conInfoFields ConHasPositionalArgs = []+conInfoFields ConIsNullary = []++instance Outputable ConInfo where+ ppr ConIsNullary = text "ConIsNullary"+ ppr ConHasPositionalArgs = text "ConHasPositionalArgs"+ ppr (ConHasRecordFields fieldLabels) =+ text "ConHasRecordFields" <+> braces (ppr fieldLabels)++-- | The 'Name' of a 'ConLike'.+--+-- Useful when we are in the renamer and don't yet have a full 'DataCon' or+-- 'PatSyn' to hand.+data ConLikeName+ = DataConName { conLikeName_Name :: !Name }+ | PatSynName { conLikeName_Name :: !Name }+ deriving (Eq, Data)++instance Outputable ConLikeName where+ ppr = ppr . conLikeName_Name++instance Uniquable ConLikeName where+ getUnique = getUnique . conLikeName_Name++instance NFData ConLikeName where+ rnf = rnf . conLikeName_Name++{-**********************************************************************+* *+ Record field info+* *+**********************************************************************-}++data RecFieldInfo+ = RecFieldInfo+ { recFieldLabel :: !FieldLabel+ , recFieldCons :: !(UniqSet ConLikeName)+ -- ^ The constructors which have this field label.+ -- Always non-empty.+ --+ -- NB: these constructors will always share a single parent,+ -- as the field label disambiguates between parents in the presence+ -- of duplicate record fields.+ }+ deriving (Eq, Data)++instance NFData RecFieldInfo where+ rnf (RecFieldInfo lbl cons)+ = rnf lbl `seq` nonDetStrictFoldUniqSet deepseq () cons++instance Outputable RecFieldInfo where+ ppr (RecFieldInfo { recFieldLabel = fl, recFieldCons = cons })+ = text "RecFieldInfo" <+> braces+ (text "recFieldLabel:" <+> ppr fl <> comma+ <+> text "recFieldCons:" <+> pprWithCommas ppr (nonDetEltsUniqSet cons))
GHC/Types/Hint.hs view
@@ -21,17 +21,21 @@ , noStarIsTypeHints ) where +import Language.Haskell.Syntax.Expr (LHsExpr)+import Language.Haskell.Syntax (LPat, LIdP)+ import GHC.Prelude import qualified Data.List.NonEmpty as NE -import GHC.Utils.Outputable import qualified GHC.LanguageExtensions as LangExt-import Data.Typeable import GHC.Unit.Module (ModuleName, Module)-import GHC.Hs.Extension (GhcTc)+import GHC.Unit.Module.Imported (ImportedModsVal)+import GHC.Hs.Extension (GhcTc, GhcRn) import GHC.Core.Coercion-import GHC.Core.Type (PredType)+import GHC.Core.FamInstEnv (FamFlavor)+import GHC.Core.TyCon (TyCon)+import GHC.Core.Type (PredType, Type) import GHC.Types.Fixity (LexicalFixity(..)) import GHC.Types.Name (Name, NameSpace, OccName (occNameFS), isSymOcc, nameOccName) import GHC.Types.Name.Reader (RdrName (Unqual), ImpDeclSpec)@@ -39,12 +43,11 @@ import GHC.Types.Basic (Activation, RuleName) import {-# SOURCE #-} GHC.Tc.Types.Origin ( ClsInstOrQC(..) ) import GHC.Parser.Errors.Basic-import {-# SOURCE #-} Language.Haskell.Syntax.Expr-import GHC.Unit.Module.Imported (ImportedModsVal)-import GHC.Data.FastString (fsLit)- -- This {-# SOURCE #-} import should be removable once- -- 'Language.Haskell.Syntax.Bind' no longer depends on 'GHC.Tc.Types.Evidence'.+import GHC.Utils.Outputable+import GHC.Data.FastString (fsLit, FastString) +import Data.Typeable ( Typeable )+ -- | The bindings we have available in scope when -- suggesting an explicit type signature. data AvailableBindings@@ -247,7 +250,6 @@ -} | SuggestAddToHSigExportList !Name !(Maybe Module) {-| Suggests increasing the limit for the number of iterations in the simplifier.- -} | SuggestIncreaseSimplifierIterations {-| Suggests to explicitly import 'Type' from the 'Data.Kind' module, because@@ -304,13 +306,18 @@ -} | SuggestTypeSignatureForm - {-| Suggests to move an orphan instance or to newtype-wrap it.+ {-| Suggests to move an orphan instance (for a typeclass or a type or data+ family), or to newtype-wrap it. Triggered by: 'GHC.Tc.Errors.Types.TcRnOrphanInstance' Test cases(s): warnings/should_compile/T9178 typecheck/should_compile/T4912+ indexed-types/should_compile/T22717_fam_orph -}- | SuggestFixOrphanInstance+ | SuggestFixOrphanInst+ { isFamilyInstance :: Maybe FamFlavor }+ -- ^ Whether this is a family instance (of the given 'FamFlavor'),+ -- or a class instance ('Nothing'). {-| Suggests to use a standalone deriving declaration when GHC can't derive a typeclass instance in a trivial way.@@ -320,6 +327,14 @@ -} | SuggestAddStandaloneDerivation + {-| Suggests to add a standalone kind signature when GHC+ can't perform kind inference.++ Triggered by: 'GHC.Tc.Errors.Types.TcRnInvisBndrWithoutSig'+ Test case(s): typecheck/should_fail/T22560_fail_d+ -}+ | SuggestAddStandaloneKindSignature Name+ {-| Suggests the user to fill in the wildcard constraint to disambiguate which constraint that is. @@ -395,16 +410,9 @@ Test cases: mod28, mod36, mod87, mod114, ... -}- | ImportSuggestion ImportSuggestion-- {-| Suggest importing a data constructor to bring it into scope- Triggered by: 'GHC.Tc.Errors.Types.TcRnTypeCannotBeMarshaled'+ | ImportSuggestion OccName ImportSuggestion - Test cases: ccfail004- -}- | SuggestImportingDataCon- {- Found a pragma in the body of a module, suggest- placing it in the header+ {-| Found a pragma in the body of a module, suggest placing it in the header. -} | SuggestPlacePragmaInHeader {-| Suggest using pattern matching syntax for a non-bidirectional pattern synonym@@ -420,11 +428,52 @@ -} | SuggestSpecialiseVisibilityHints Name + {-| Suggest renaming implicitly quantified type variable in case it+ captures a term's name.+ -}+ | SuggestRenameTypeVariable+ | LoopySuperclassSolveHint PredType ClsInstOrQC - {-| Suggest binding explicitly; e.g data T @k (a :: F k) = .... -}- | SuggestBindTyVarExplicitly Name+ | SuggestExplicitBidiPatSyn Name (LPat GhcRn) [LIdP GhcRn] + {-| Suggest enabling one of the SafeHaskell modes Safe, Unsafe or+ Trustworthy.+ -}+ | SuggestSafeHaskell++ {-| Suggest removing a record wildcard from a pattern when it doesn't+ bind anything useful.+ -}+ | SuggestRemoveRecordWildcard+ {-| Suggest moving a method implementation to a different instance to its+ superclass that defines the canonical version of the method.+ -}+ | SuggestMoveNonCanonicalDefinition+ Name -- ^ move the implementation from this method+ Name -- ^ ... to this method+ String -- ^ Documentation URL++ {-| Suggest to increase the solver maximum reduction depth -}+ | SuggestIncreaseReductionDepth++ {-| Suggest removing a method implementation when a superclass defines the+ canonical version of that method.+ -}+ | SuggestRemoveNonCanonicalDefinition+ Name -- ^ method with non-canonical implementation+ Name -- ^ possible other method to use as the RHS instead+ String -- ^ Documentation URL+ {-| Suggest eta-reducing a type synonym used in the implementation+ of abstract data. -}+ | SuggestEtaReduceAbsDataTySyn TyCon+ {-| Remind the user that there is no field of a type and name in the record,+ constructors are in the usual order $x$, $r$, $a$ -}+ | RemindRecordMissingField FastString Type Type+ {-| Suggest binding the type variable on the LHS of the type declaration+ -}+ | SuggestBindTyVarOnLhs RdrName+ -- | An 'InstantiationSuggestion' for a '.hsig' file. This is generated -- by GHC in case of a 'DriverUnexpectedSignature' and suggests a way -- to instantiate a particular signature, where the first argument is@@ -441,9 +490,23 @@ -- | Suggest how to fix an import. data ImportSuggestion -- | Some module exports what we want, but we aren't explicitly importing it.- = CouldImportFrom (NE.NonEmpty (Module, ImportedModsVal)) OccName+ = CouldImportFrom (NE.NonEmpty (Module, ImportedModsVal)) -- | Some module exports what we want, but we are explicitly hiding it.- | CouldUnhideFrom (NE.NonEmpty (Module, ImportedModsVal)) OccName+ | CouldUnhideFrom (NE.NonEmpty (Module, ImportedModsVal))+ -- | The module exports what we want, but it isn't a type.+ | CouldRemoveTypeKeyword ModuleName+ -- | The module exports what we want, but it's a type and we have @ExplicitNamespaces@ on.+ | CouldAddTypeKeyword ModuleName+ -- | Suggest importing a data constructor to bring it into scope+ | ImportDataCon+ -- | Where to suggest importing the 'DataCon' from.+ --+ -- The 'Bool' tracks whether to suggest using an import of the form+ -- @import (pattern Foo)@, depending on whether @-XPatternSynonyms@+ -- was enabled.+ { ies_suggest_import_from :: Maybe (ModuleName, Bool)+ -- | The 'OccName' of the parent of the data constructor.+ , ies_parent :: OccName } -- | Explain how something is in scope. data HowInScope@@ -454,7 +517,7 @@ data SimilarName = SimilarName Name- | SimilarRdrName RdrName HowInScope+ | SimilarRdrName RdrName (Maybe HowInScope) -- | Something is promoted to the type-level without a promotion tick. data UntickedPromotedThing
GHC/Types/Hint/Ppr.hs view
@@ -12,10 +12,13 @@ import GHC.Parser.Errors.Basic import GHC.Types.Hint +import GHC.Core.FamInstEnv (FamFlavor(..))+import GHC.Core.TyCon+import GHC.Core.TyCo.Rep ( mkVisFunTyMany ) import GHC.Hs.Expr () -- instance Outputable-import {-# SOURCE #-} GHC.Tc.Types.Origin ( ClsInstOrQC(..) )+import GHC.Tc.Types.Origin ( ClsInstOrQC(..) ) import GHC.Types.Id-import GHC.Types.Name (NameSpace, pprDefinedAt, occNameSpace, pprNameSpace, isValNameSpace, nameModule)+import GHC.Types.Name import GHC.Types.Name.Reader (RdrName,ImpDeclSpec (..), rdrNameOcc, rdrNameSpace) import GHC.Types.SrcLoc (SrcSpan(..), srcSpanStartLine) import GHC.Unit.Module.Imported (ImportedModsVal(..))@@ -132,12 +135,19 @@ in case mb_mod of Nothing -> header <+> text "the hsig file." Just mod -> header <+> ppr (moduleName mod) <> text "'s hsig file."- SuggestFixOrphanInstance- -> vcat [ text "Move the instance declaration to the module of the class or of the type, or"+ SuggestFixOrphanInst { isFamilyInstance = mbFamFlavor }+ -> vcat [ text "Move the instance declaration to the module of the" <+> what <+> text "or of the type, or" , text "wrap the type with a newtype and declare the instance on the new type." ]+ where+ what = case mbFamFlavor of+ Nothing -> text "class"+ Just SynFamilyInst -> text "type family"+ Just (DataFamilyInst {}) -> text "data family" SuggestAddStandaloneDerivation -> text "Use a standalone deriving declaration instead"+ SuggestAddStandaloneKindSignature name+ -> text "Add a standalone kind signature for" <+> quotes (ppr name) SuggestFillInWildcardConstraint -> text "Fill in the wildcard constraint yourself" SuggestRenameForall@@ -193,10 +203,8 @@ whose | null parents = empty | otherwise = text "belonging to the type" <> plural parents <+> pprQuotedList parents- ImportSuggestion import_suggestion- -> pprImportSuggestion import_suggestion- SuggestImportingDataCon- -> text "Import the data constructor to bring it into scope"+ ImportSuggestion occ_name import_suggestion+ -> pprImportSuggestion occ_name import_suggestion SuggestPlacePragmaInHeader -> text "Perhaps you meant to place it in the module header?" $$ text "The module header is the section at the top of the file, before the" <+> quotes (text "module") <+> text "keyword"@@ -207,6 +215,8 @@ <+> quotes (ppr name) <+> text "has an INLINABLE pragma" where mod = nameModule name+ SuggestRenameTypeVariable+ -> text "Consider renaming the type variable." LoopySuperclassSolveHint pty cls_or_qc -> vcat [ text "Add the constraint" <+> quotes (ppr pty) <+> text "to the" <+> what <> comma , text "even though it seems logically implied by other constraints in the context." ]@@ -215,77 +225,156 @@ what = case cls_or_qc of IsClsInst -> text "instance context" IsQC {} -> text "context of the quantified constraint"- SuggestBindTyVarExplicitly tv- -> text "bind" <+> quotes (ppr tv)- <+> text "explicitly with" <+> quotes (char '@' <> ppr tv)+ SuggestExplicitBidiPatSyn name pat args+ -> hang (text "Instead use an explicitly bidirectional"+ <+> text "pattern synonym, e.g.")+ 2 (hang (text "pattern" <+> pp_name <+> pp_args <+> larrow+ <+> ppr pat <+> text "where")+ 2 (pp_name <+> pp_args <+> equals <+> text "..."))+ where+ pp_name = ppr name+ pp_args = hsep (map ppr args)+ SuggestSafeHaskell+ -> text "Enable Safe Haskell through either Safe, Trustworthy or Unsafe."+ SuggestRemoveRecordWildcard+ -> text "Omit the" <+> quotes (text "..")+ SuggestIncreaseReductionDepth ->+ vcat+ [ text "Use -freduction-depth=0 to disable this check"+ , text "(any upper bound you could choose might fail unpredictably with"+ , text " minor updates to GHC, so disabling the check is recommended if"+ , text " you're sure that type checking should terminate)" ]+ SuggestMoveNonCanonicalDefinition lhs rhs refURL ->+ text "Move definition from" <+>+ quotes (pprPrefixUnqual rhs) <+>+ text "to" <+> quotes (pprPrefixUnqual lhs) $$+ text "See also:" <+> text refURL+ SuggestRemoveNonCanonicalDefinition lhs rhs refURL ->+ text "Either remove definition for" <+>+ quotes (pprPrefixUnqual lhs) <+> text "(recommended)" <+>+ text "or define as" <+>+ quotes (pprPrefixUnqual lhs <+> text "=" <+> pprPrefixUnqual rhs) $$+ text "See also:" <+> text refURL+ SuggestEtaReduceAbsDataTySyn tc+ -> text "If possible, eta-reduce the type synonym" <+> ppr_tc <+> text "so that it is nullary."+ where ppr_tc = quotes (ppr $ tyConName tc)+ RemindRecordMissingField x r a ->+ text "NB: There is no field selector" <+> ppr_sel+ <+> text "in scope for record type" <+> ppr_r+ where ppr_sel = quotes (ftext x <+> dcolon <+> ppr_arr_r_a)+ ppr_arr_r_a = ppr $ mkVisFunTyMany r a+ ppr_r = quotes $ ppr r+ SuggestBindTyVarOnLhs tv+ -> text "Bind" <+> quotes (ppr tv) <+> text "on the LHS of the type declaration" perhapsAsPat :: SDoc perhapsAsPat = text "Perhaps you meant an as-pattern, which must not be surrounded by whitespace" -- | Pretty-print an 'ImportSuggestion'.-pprImportSuggestion :: ImportSuggestion -> SDoc-pprImportSuggestion (CouldImportFrom mods occ_name)+pprImportSuggestion :: OccName -> ImportSuggestion -> SDoc+pprImportSuggestion occ_name (CouldImportFrom mods) | (mod, imv) NE.:| [] <- mods = fsep- [ text "Perhaps you want to add"+ [ text "Add" , quotes (ppr occ_name) , text "to the import list" , text "in the import of" , quotes (ppr mod)- , parens (ppr (imv_span imv)) <> dot+ , parens (text "at" <+> ppr (imv_span imv)) <> dot ] | otherwise = fsep- [ text "Perhaps you want to add"+ [ text "Add" , quotes (ppr occ_name) , text "to one of these import lists:" ] $$ nest 2 (vcat- [ quotes (ppr mod) <+> parens (ppr (imv_span imv))+ [ quotes (ppr mod) <+> parens (text "at" <+> ppr (imv_span imv)) | (mod,imv) <- NE.toList mods ])-pprImportSuggestion (CouldUnhideFrom mods occ_name)+pprImportSuggestion occ_name (CouldUnhideFrom mods) | (mod, imv) NE.:| [] <- mods = fsep- [ text "Perhaps you want to remove"+ [ text "Remove" , quotes (ppr occ_name) , text "from the explicit hiding list" , text "in the import of" , quotes (ppr mod)- , parens (ppr (imv_span imv)) <> dot+ , parens (text "at" <+> ppr (imv_span imv)) <> dot ] | otherwise = fsep- [ text "Perhaps you want to remove"+ [ text "Remove" , quotes (ppr occ_name) , text "from the hiding clauses" , text "in one of these imports:" ] $$ nest 2 (vcat- [ quotes (ppr mod) <+> parens (ppr (imv_span imv))+ [ quotes (ppr mod) <+> parens (text "at" <+> ppr (imv_span imv)) | (mod,imv) <- NE.toList mods ])+pprImportSuggestion occ_name (CouldAddTypeKeyword mod)+ = vcat [ text "Add the" <+> quotes (text "type")+ <+> text "keyword to the import statement:"+ , nest 2 $ text "import"+ <+> ppr mod+ <+> parens_sp (text "type" <+> pprPrefixOcc occ_name)+ ]+ where+ parens_sp d = parens (space <> d <> space)+pprImportSuggestion occ_name (CouldRemoveTypeKeyword mod)+ = vcat [ text "Remove the" <+> quotes (text "type")+ <+> text "keyword from the import statement:"+ , nest 2 $ text "import"+ <+> ppr mod+ <+> parens_sp (pprPrefixOcc occ_name) ]+ where+ parens_sp d = parens (space <> d <> space)+pprImportSuggestion dc_occ (ImportDataCon Nothing parent_occ)+ = text "Import the data constructor" <+> quotes (ppr dc_occ) <+>+ text "of" <+> quotes (ppr parent_occ)+pprImportSuggestion dc_occ (ImportDataCon (Just (mod, patsyns_enabled)) parent_occ)+ = vcat $ [ text "Use"+ , nest 2 $ text "import"+ <+> ppr mod+ <+> parens_sp (pprPrefixOcc parent_occ <> parens_sp (pprPrefixOcc dc_occ))+ , text "or"+ , nest 2 $ text "import"+ <+> ppr mod+ <+> parens_sp (pprPrefixOcc parent_occ <> text "(..)")+ ] ++ if patsyns_enabled+ then [ text "or"+ , nest 2 $ text "import"+ <+> ppr mod+ <+> parens_sp (text "pattern" <+> pprPrefixOcc dc_occ)+ ]+ else []+ where+ parens_sp d = parens (space <> d <> space) -- | Pretty-print a 'SimilarName'. pprSimilarName :: NameSpace -> SimilarName -> SDoc pprSimilarName _ (SimilarName name) = quotes (ppr name) <+> parens (pprDefinedAt name) pprSimilarName tried_ns (SimilarRdrName rdr_name how_in_scope)- = case how_in_scope of- LocallyBoundAt loc ->- pp_ns rdr_name <+> quotes (ppr rdr_name) <+> loc'- where- loc' = case loc of- UnhelpfulSpan l -> parens (ppr l)- RealSrcSpan l _ -> parens (text "line" <+> int (srcSpanStartLine l))- ImportedBy is ->- pp_ns rdr_name <+> quotes (ppr rdr_name) <+>- parens (text "imported from" <+> ppr (is_mod is))-+ = pp_ns rdr_name <+> quotes (ppr rdr_name) <+> loc where+ loc = case how_in_scope of+ Nothing -> empty+ Just scope -> case scope of+ LocallyBoundAt loc ->+ case loc of+ UnhelpfulSpan l -> parens (ppr l)+ RealSrcSpan l _ -> parens (text "line" <+> int (srcSpanStartLine l))+ ImportedBy is ->+ parens (text "imported from" <+> ppr (moduleName $ is_mod is)) pp_ns :: RdrName -> SDoc pp_ns rdr | ns /= tried_ns = pprNameSpace ns | otherwise = empty where ns = rdrNameSpace rdr++pprPrefixUnqual :: Name -> SDoc+pprPrefixUnqual name =+ pprPrefixOcc (getOccName name)
GHC/Types/IPE.hs view
@@ -9,6 +9,7 @@ import GHC.Prelude import GHC.Types.Name+import GHC.Data.FastString import GHC.Types.SrcLoc import GHC.Core.DataCon @@ -20,7 +21,7 @@ -- | Position and information about an info table. -- For return frames these are the contents of a 'CoreSyn.SourceNote'.-type IpeSourceLocation = (RealSrcSpan, String)+type IpeSourceLocation = (RealSrcSpan, LexicalFastString) -- | A map from a 'Name' to the best approximate source position that -- name arose from.
GHC/Types/Id.hs view
@@ -480,23 +480,23 @@ isDataConRecordSelector id = case Var.idDetails id of RecSelId {sel_tycon = RecSelData _} -> True- _ -> False+ _ -> False isPatSynRecordSelector id = case Var.idDetails id of RecSelId {sel_tycon = RecSelPatSyn _} -> True- _ -> False+ _ -> False isNaughtyRecordSelector id = case Var.idDetails id of RecSelId { sel_naughty = n } -> n- _ -> False+ _ -> False isClassOpId id = case Var.idDetails id of- ClassOpId _ -> True- _other -> False+ ClassOpId {} -> True+ _other -> False isClassOpId_maybe id = case Var.idDetails id of- ClassOpId cls -> Just cls- _other -> Nothing+ ClassOpId cls _ -> Just cls+ _other -> Nothing isPrimOpId id = case Var.idDetails id of PrimOpId {} -> True@@ -527,8 +527,8 @@ _ -> Nothing isDataConWrapId id = case Var.idDetails id of- DataConWrapId _ -> True- _ -> False+ DataConWrapId _ -> True+ _ -> False isDataConWrapId_maybe id = case Var.idDetails id of DataConWrapId con -> Just con@@ -834,15 +834,15 @@ asNonWorkerLikeId id = let details = case idDetails id of WorkerLikeId{} -> Just $ VanillaId- JoinId arity Just{} -> Just $ JoinId arity Nothing- _ -> Nothing+ JoinId arity Just{} -> Just $ JoinId arity Nothing+ _ -> Nothing in maybeModifyIdDetails details id -- | Turn this id into a WorkerLikeId if possible. asWorkerLikeId :: Id -> Id asWorkerLikeId id = let details = case idDetails id of- WorkerLikeId{} -> Nothing+ WorkerLikeId{} -> Nothing JoinId _arity Just{} -> Nothing JoinId arity Nothing -> Just (JoinId arity (Just [])) VanillaId -> Just $ WorkerLikeId []
GHC/Types/Id/Info.hs view
@@ -8,9 +8,11 @@ Haskell. [WDP 94/11]) -} --{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE BinaryLiterals #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wno-incomplete-record-updates #-} @@ -18,7 +20,7 @@ -- * The IdDetails type IdDetails(..), pprIdDetails, coVarDetails, isCoVarDetails, JoinArity, isJoinIdDetails_maybe,- RecSelParent(..),+ RecSelParent(..), recSelParentName, recSelFirstConName, -- * The IdInfo type IdInfo, -- Abstract@@ -95,6 +97,7 @@ import GHC.Types.Basic import GHC.Core.DataCon import GHC.Core.TyCon+import GHC.Core.Type (mkTyConApp) import GHC.Core.PatSyn import GHC.Types.ForeignCall import GHC.Unit.Module@@ -105,11 +108,11 @@ import GHC.Utils.Panic import GHC.Utils.Panic.Plain import GHC.Stg.InferTags.TagSig+import GHC.StgToCmm.Types (LambdaFormInfo) +import Data.Data ( Data ) import Data.Word -import GHC.StgToCmm.Types (LambdaFormInfo)- -- infixl so you can say (id `set` a `set` b) infixl 1 `setRuleInfo`, `setArityInfo`,@@ -120,7 +123,8 @@ `setCafInfo`, `setDmdSigInfo`, `setCprSigInfo`,- `setDemandInfo`+ `setDemandInfo`,+ `setLFInfo` {- ************************************************************************ * *@@ -138,8 +142,9 @@ -- | The 'Id' for a record selector | RecSelId- { sel_tycon :: RecSelParent- , sel_naughty :: Bool -- True <=> a "naughty" selector which can't actually exist, for example @x@ in:+ { sel_tycon :: RecSelParent+ , sel_fieldLabel :: FieldLabel+ , sel_naughty :: Bool -- True <=> a "naughty" selector which can't actually exist, for example @x@ in: -- data T = forall a. MkT { x :: a } } -- See Note [Naughty record selectors] in GHC.Tc.TyCl @@ -150,9 +155,14 @@ -- a) to support isImplicitId -- b) when desugaring a RecordCon we can get -- from the Id back to the data con]- | ClassOpId Class -- ^ The 'Id' is a superclass selector,- -- or class operation of a class + | ClassOpId -- ^ The 'Id' is a superclass selector or class operation+ Class -- for this class+ Bool -- True <=> given a non-bottom dictionary, the class op will+ -- definitely return a non-bottom result+ -- and Note [exprOkForSpeculation and type classes]+ -- in GHC.Core.Utils+ | PrimOpId PrimOp Bool -- ^ The 'Id' is for a primitive operator -- True <=> is representation-polymorphic, -- and hence has no binding@@ -268,17 +278,40 @@ if there are unapplied occurrences like `map f xs`. -} --- | Recursive Selector Parent-data RecSelParent = RecSelData TyCon | RecSelPatSyn PatSyn deriving Eq- -- Either `TyCon` or `PatSyn` depending- -- on the origin of the record selector.- -- For a data type family, this is the- -- /instance/ 'TyCon' not the family 'TyCon'+-- | Parent of a record selector function.+--+-- Either the parent 'TyCon' or 'PatSyn' depending+-- on the origin of the record selector.+--+-- For a data family, this is the /instance/ 'TyCon',+-- **not** the family 'TyCon'.+data RecSelParent+ -- | Parent of a data constructor record field.+ --+ -- For a data family, this is the /instance/ 'TyCon'.+ = RecSelData TyCon+ -- | Parent of a pattern synonym record field:+ -- the 'PatSyn' itself.+ | RecSelPatSyn PatSyn+ deriving (Eq, Data) +recSelParentName :: RecSelParent -> Name+recSelParentName (RecSelData tc) = tyConName tc+recSelParentName (RecSelPatSyn ps) = patSynName ps++recSelFirstConName :: RecSelParent -> Name+recSelFirstConName (RecSelData tc) = dataConName $ head $ tyConDataCons tc+recSelFirstConName (RecSelPatSyn ps) = patSynName ps+ instance Outputable RecSelParent where ppr p = case p of- RecSelData ty_con -> ppr ty_con- RecSelPatSyn ps -> ppr ps+ RecSelData tc+ | Just (parent_tc, tys) <- tyConFamInst_maybe tc+ -> ppr (mkTyConApp parent_tc tys)+ | otherwise+ -> ppr tc+ RecSelPatSyn ps+ -> ppr ps -- | Just a synonym for 'CoVarId'. Written separately so it can be -- exported in the hs-boot file.@@ -302,7 +335,7 @@ pprIdDetails other = brackets (pp other) where pp VanillaId = panic "pprIdDetails"- pp (WorkerLikeId dmds) = text "StrictWorker" <> parens (ppr dmds)+ pp (WorkerLikeId dmds) = text "StrictWorker" <> parens (ppr dmds) pp (DataConWorkId _) = text "DataCon" pp (DataConWrapId _) = text "DataConWrapper" pp (ClassOpId {}) = text "ClassOp"@@ -369,7 +402,12 @@ -- -- See documentation of the getters for what these packed fields mean. lfInfo :: !(Maybe LambdaFormInfo),- -- ^ See Note [The LFInfo of Imported Ids] in GHC.StgToCmm.Closure+ -- ^ If lfInfo = Just info, then the `info` is guaranteed /correct/.+ -- If lfInfo = Nothing, then we do not have a `LambdaFormInfo` for this Id,+ -- so (for imported Ids) we make a conservative version.+ -- See Note [The LFInfo of Imported Ids] in GHC.StgToCmm.Closure+ -- For locally-defined Ids other than DataCons, the `lfInfo` field is always Nothing.+ -- See also Note [LFInfo of DataCon workers and wrappers] -- See documentation of the getters for what these packed fields mean. tagSig :: !(Maybe TagSig)
GHC/Types/Id/Make.hs view
@@ -65,6 +65,7 @@ import GHC.Types.Literal import GHC.Types.SourceText+import GHC.Types.RepType ( countFunRepArgs ) import GHC.Types.Name.Set import GHC.Types.Name import GHC.Types.ForeignCall@@ -87,6 +88,10 @@ import GHC.Data.List.SetOps import Data.List ( zipWith4 ) +-- A bit of a shame we must import these here+import GHC.StgToCmm.Types (LambdaFormInfo(..))+import GHC.Runtime.Heap.Layout (ArgDescr(ArgUnknown))+ {- ************************************************************************ * *@@ -465,7 +470,7 @@ -- (dictionary superclass or method) -> Class -> Id mkDictSelId name clas- = mkGlobalId (ClassOpId clas) name sel_ty info+ = mkGlobalId (ClassOpId clas terminating) name sel_ty info where tycon = classTyCon clas sel_names = map idName (classAllSelIds clas)@@ -476,11 +481,16 @@ arg_tys = dataConRepArgTys data_con -- Includes the dictionary superclasses val_index = assoc "MkId.mkDictSelId" (sel_names `zip` [0..]) name - sel_ty = mkInvisForAllTys tyvars $- mkFunctionType ManyTy (mkClassPred clas (mkTyVarTys (binderVars tyvars))) $- scaledThing (getNth arg_tys val_index)- -- See Note [Type classes and linear types]+ pred_ty = mkClassPred clas (mkTyVarTys (binderVars tyvars))+ res_ty = scaledThing (getNth arg_tys val_index)+ sel_ty = mkInvisForAllTys tyvars $+ mkFunctionType ManyTy pred_ty res_ty+ -- See Note [Type classes and linear types] + terminating = isTerminatingType res_ty || definitelyUnliftedType res_ty+ -- If the field is unlifted, it can't be bottom+ -- Ditto if it's a terminating type+ base_info = noCafIdInfo `setArityInfo` 1 `setDmdSigInfo` strict_sig@@ -590,11 +600,18 @@ `setInlinePragInfo` wkr_inline_prag `setUnfoldingInfo` evaldUnfolding -- Record that it's evaluated, -- even if arity = 0+ `setLFInfo` wkr_lf_info -- No strictness: see Note [Data-con worker strictness] in GHC.Core.DataCon wkr_inline_prag = defaultInlinePragma { inl_rule = ConLike } wkr_arity = dataConRepArity data_con + -- See Note [LFInfo of DataCon workers and wrappers]+ wkr_lf_info+ | wkr_arity == 0 = LFCon data_con+ | otherwise = LFReEntrant TopLevel (countFunRepArgs wkr_arity wkr_ty) True ArgUnknown+ -- LFInfo stores post-unarisation arity+ ----------- Workers for newtypes -------------- univ_tvs = dataConUnivTyVars data_con ex_tcvs = dataConExTyCoVars data_con@@ -603,6 +620,8 @@ `setArityInfo` 1 -- Arity 1 `setInlinePragInfo` dataConWrapperInlinePragma `setUnfoldingInfo` newtype_unf+ -- See W1 in Note [LFInfo of DataCon workers and wrappers]+ `setLFInfo` (panic "mkDataConWorkId: we shouldn't look at LFInfo for newtype worker ids") id_arg1 = mkScaledTemplateLocal 1 (head arg_tys) res_ty_args = mkTyCoVarTys univ_tvs newtype_unf = assertPpr (null ex_tcvs && isSingleton arg_tys)@@ -613,6 +632,89 @@ wrapNewTypeBody tycon res_ty_args (Var id_arg1) {-+Note [LFInfo of DataCon workers and wrappers]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+As noted in Note [The LFInfo of Imported Ids] in GHC.StgToCmm.Closure, it's+crucial that saturated data con applications are given an LFInfo of `LFCon`.++Since for data constructors we never serialise the worker and the wrapper (only+the data type declaration), we never serialise their lambda form info either.++Therefore, when making data constructors workers and wrappers, we construct a+correct `LFInfo` for them right away, and put it it in the `lfInfo` field of the+worker/wrapper Id, ensuring that:++ The `lfInfo` field of a DataCon worker or wrapper is always populated with the correct LFInfo.++How do we construct a /correct/ LFInfo for workers and wrappers?+(Remember: `LFCon` means "a saturated constructor application")++(1) Data constructor workers and wrappers with arity > 0 are unambiguously+functions and should be given `LFReEntrant`, regardless of the runtime+relevance of the arguments.+ - For example, `Just :: a -> Maybe a` is given `LFReEntrant`,+ and `HNil :: (a ~# '[]) -> HList a` is given `LFReEntrant` too.++(2) A datacon /worker/ with zero arity is trivially fully saturated -- it takes+no arguments whatsoever (not even zero-width args), so it is given `LFCon`.++(3) Perhaps surprisingly, a datacon /wrapper/ can be an `LFCon`. See Wrinkle (W1) below.+A datacon /wrapper/ with zero arity must be a fully saturated application of+the worker to zero-width arguments only (which are dropped after unarisation),+and therefore is also given `LFCon`.++For example, consider the following data constructors:++ data T1 a where+ TCon1 :: {-# UNPACK #-} !(a :~: True) -> T1 a++ data T2 a where+ TCon2 :: {-# UNPACK #-} !() -> T2 a++ data T3 a where+ TCon3 :: T3 '[]++`TCon1`'s wrapper has a lifted argument, which is non-zero-width, while the+worker has an unlifted equality argument, which is zero-width.++`TCon2`'s wrapper has a lifted argument, which is non-zero-width, while the+worker has no arguments.++Wrinkle (W1). Perhaps surprisingly, it is possible for the /wrapper/ to be an+`LFCon` even though the /worker/ is not. Consider `T3` above. Here is the+Core representation of the worker and wrapper:++ $WTCon3 :: T3 '[] -- Wrapper+ $WTCon3 = TCon3 @[] <Refl> -- A saturated constructor application: LFCon++ TCon3 :: forall (a :: * -> *). (a ~# []) => T a -- Worker+ TCon3 = /\a. \(co :: a~#[]). TCon3 co -- A function: LFReEntrant++For `TCon1`, both the wrapper and worker will be given `LFReEntrant` since they+both have arity == 1.++For `TCon2`, the wrapper will be given `LFReEntrant` since it has arity == 1+while the worker is `LFCon` since its arity == 0++For `TCon3`, the wrapper will be given `LFCon` since its arity == 0 and the+worker `LFReEntrant` since its arity == 1++One might think we could give *workers* with only zero-width-args the `LFCon`+LambdaFormInfo, e.g. give `LFCon` to the worker of `TCon1` and `TCon3`.+However, these workers are unambiguously functions+-- which makes `LFReEntrant`, the LambdaFormInfo we give them, correct.+See also the discussion in #23158.++Wrinkles:++(W1) Why do we panic when generating `LFInfo` for newtype workers and wrappers?++ We don't generate code for newtype workers/wrappers, so we should never have to+ look at their LFInfo (and in general we can't; they may be representation-polymorphic).++See also the Note [Imported unlifted nullary datacon wrappers must have correct LFInfo]+in GHC.StgToCmm.Types.+ ------------------------------------------------- -- Data constructor representation --@@ -704,11 +806,20 @@ -- We need to get the CAF info right here because GHC.Iface.Tidy -- does not tidy the IdInfo of implicit bindings (like the wrapper) -- so it not make sure that the CAF info is sane+ `setLFInfo` wrap_lf_info -- The signature is purely for passes like the Simplifier, not for -- DmdAnal itself; see Note [DmdAnal for DataCon wrappers]. wrap_sig = mkClosedDmdSig wrap_arg_dmds topDiv + -- See Note [LFInfo of DataCon workers and wrappers]+ wrap_lf_info+ | wrap_arity == 0 = LFCon data_con+ -- See W1 in Note [LFInfo of DataCon workers and wrappers]+ | isNewTyCon tycon = panic "mkDataConRep: we shouldn't look at LFInfo for newtype wrapper ids"+ | otherwise = LFReEntrant TopLevel (countFunRepArgs wrap_arity wrap_ty) True ArgUnknown+ -- LFInfo stores post-unarisation arity+ wrap_arg_dmds = replicate (length theta) topDmd ++ map mk_dmd arg_ibangs -- Don't forget the dictionary arguments when building@@ -788,25 +899,15 @@ -- needs a wrapper. This wrapper is injected into the program later in the -- CoreTidy pass. See Note [Injecting implicit bindings] in GHC.Iface.Tidy, -- along with the accompanying implementation in getTyConImplicitBinds.- wrapper_reqd- | isTypeDataTyCon tycon- -- `type data` declarations never have data-constructor wrappers- -- Their data constructors only live at the type level, in the- -- form of PromotedDataCon, and therefore do not need wrappers.- -- See wrinkle (W0) in Note [Type data declarations] in GHC.Rename.Module.- = False-- | otherwise- = (not new_tycon+ wrapper_reqd =+ (not new_tycon -- (Most) newtypes have only a worker, with the exception -- of some newtypes written with GADT syntax. -- See dataConUserTyVarsNeedWrapper below. && (any isBanged (ev_ibangs ++ arg_ibangs))) -- Some forcing/unboxing (includes eq_spec)- || isFamInstTyCon tycon -- Cast result-- || dataConUserTyVarsNeedWrapper data_con+ || (dataConUserTyVarsNeedWrapper data_con -- If the data type was written with GADT syntax and -- orders the type variables differently from what the -- worker expects, it needs a data con wrapper to reorder@@ -815,7 +916,19 @@ -- -- NB: All GADTs return true from this function, but there -- is one exception that we must check below.-+ && not (isTypeDataTyCon tycon))+ -- An exception to this rule is `type data` declarations.+ -- Their data constructors only live at the type level and+ -- therefore do not need wrappers.+ -- See Note [Type data declarations] in GHC.Rename.Module.+ --+ -- Note that the other checks in this definition will+ -- return False for `type data` declarations, as:+ --+ -- - They cannot be newtypes+ -- - They cannot have strict fields+ -- - They cannot be data family instances+ -- - They cannot have datatype contexts || not (null stupid_theta) -- If the data constructor has a datatype context, -- we need a wrapper in order to drop the stupid arguments.@@ -2074,10 +2187,15 @@ This is crucial: otherwise, we could import an unfolding in which 'nospec' has been inlined (= erased), and we would lose the benefit. -'nospec' is used in the implementation of 'withDict': we insert 'nospec'-so that the typeclass specialiser doesn't assume any two evidence terms-of the same type are equal. See Note [withDict] in GHC.Tc.Instance.Class,-and see test case T21575b for an example.+'nospec' is used:++* In the implementation of 'withDict': we insert 'nospec' so that the+ typeclass specialiser doesn't assume any two evidence terms of the+ same type are equal. See Note [withDict] in GHC.Tc.Instance.Class,+ and see test case T21575b for an example.++* To defeat the specialiser when we have incoherent instances.+ See Note [Coherence and specialisation: overview] in GHC.Core.InstEnv. Note [The oneShot function] ~~~~~~~~~~~~~~~~~~~~~~~~~~~
GHC/Types/Literal.hs view
@@ -32,7 +32,7 @@ , mkLitFloat, mkLitDouble , mkLitChar, mkLitString , mkLitBigNat- , mkLitNumber, mkLitNumberWrap+ , mkLitNumber, mkLitNumberWrap, mkLitNumberMaybe -- ** Operations on Literals , literalType@@ -410,6 +410,12 @@ mkLitNumber platform nt i = assertPpr (litNumCheckRange platform nt i) (integer i) (LitNumber nt i)++-- | Create a numeric 'Literal' of the given type if it is in range+mkLitNumberMaybe :: Platform -> LitNumType -> Integer -> Maybe Literal+mkLitNumberMaybe platform nt i+ | litNumCheckRange platform nt i = Just (LitNumber nt i)+ | otherwise = Nothing -- | Creates a 'Literal' of type @Int#@ mkLitInt :: Platform -> Integer -> Literal
GHC/Types/Name.hs view
@@ -2,6 +2,8 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} +{-# OPTIONS_GHC -Wno-orphans #-} -- instance NFData FieldLabel+ {- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998@@ -63,8 +65,8 @@ -- ** Predicates on 'Name's isSystemName, isInternalName, isExternalName, isTyVarName, isTyConName, isDataConName,- isValName, isVarName, isDynLinkName,- isWiredInName, isWiredIn, isBuiltInSyntax,+ isValName, isVarName, isDynLinkName, isFieldName,+ isWiredInName, isWiredIn, isBuiltInSyntax, isTupleTyConName, isHoleName, wiredInNameTyThing_maybe, nameIsLocalOrFrom, nameIsExternalOrFrom, nameIsHomePackage,@@ -91,6 +93,7 @@ import GHC.Types.Name.Occurrence import GHC.Unit.Module import GHC.Unit.Home+import GHC.Types.FieldLabel import GHC.Types.SrcLoc import GHC.Types.Unique import GHC.Utils.Misc@@ -103,6 +106,8 @@ import Control.DeepSeq import Data.Data import qualified Data.Semigroup as S+import GHC.Types.Basic (Boxity(Boxed))+import GHC.Builtin.Uniques (isTupleTyConUnique) {- ************************************************************************@@ -157,6 +162,10 @@ instance NFData Name where rnf Name{..} = rnf n_sort `seq` rnf n_occ `seq` n_uniq `seq` rnf n_loc +-- Needs NFData Name, so the instance is here to avoid cyclic imports.+instance NFData FieldLabel where+ rnf (FieldLabel a b c) = rnf a `seq` rnf b `seq` rnf c+ instance NFData NameSort where rnf (External m) = rnf m rnf (WiredIn m t b) = rnf m `seq` t `seq` b `seq` ()@@ -282,6 +291,9 @@ isBuiltInSyntax (Name {n_sort = WiredIn _ _ BuiltInSyntax}) = True isBuiltInSyntax _ = False +isTupleTyConName :: Name -> Bool+isTupleTyConName = isJust . isTupleTyConUnique . getUnique+ isExternalName (Name {n_sort = External _}) = True isExternalName (Name {n_sort = WiredIn _ _ _}) = True isExternalName _ = False@@ -339,7 +351,14 @@ -- Return the pun for a name if available. -- Used for pretty-printing under ListTuplePuns. namePun_maybe :: Name -> Maybe FastString-namePun_maybe name | getUnique name == getUnique listTyCon = Just (fsLit "[]")+namePun_maybe name+ | getUnique name == getUnique listTyCon = Just (fsLit "[]")++ | Just (Boxed, ar) <- isTupleTyConUnique (getUnique name)+ , ar /= 1 = Just (fsLit $ '(' : commas ar ++ ")")+ where+ commas ar = replicate (ar-1) ','+ namePun_maybe _ = Nothing nameIsLocalOrFrom :: Module -> Name -> Bool@@ -424,6 +443,9 @@ isVarName :: Name -> Bool isVarName = isVarOcc . nameOccName +isFieldName :: Name -> Bool+isFieldName = isFieldOcc . nameOccName+ isSystemName (Name {n_sort = System}) = True isSystemName _ = False @@ -627,21 +649,31 @@ pprName :: forall doc. IsLine doc => Name -> doc pprName name@(Name {n_sort = sort, n_uniq = uniq, n_occ = occ})- = docWithContext $ \ctx ->- let sty = sdocStyle ctx- debug = sdocPprDebug ctx- listTuplePuns = sdocListTuplePuns ctx- in handlePuns listTuplePuns (namePun_maybe name) $- case sort of- WiredIn mod _ builtin -> pprExternal debug sty uniq mod occ True builtin- External mod -> pprExternal debug sty uniq mod occ False UserSyntax- System -> pprSystem debug sty uniq occ- Internal -> pprInternal debug sty uniq occ+ = docWithStyle codeDoc normalDoc where- -- Print GHC.Types.List as [], etc.- handlePuns :: Bool -> Maybe FastString -> doc -> doc- handlePuns True (Just pun) _ = ftext pun- handlePuns _ _ r = r+ codeDoc = case sort of+ WiredIn mod _ _ -> pprModule mod <> char '_' <> z_occ+ External mod -> pprModule mod <> char '_' <> z_occ+ -- In code style, always qualify+ -- ToDo: maybe we could print all wired-in things unqualified+ -- in code style, to reduce symbol table bloat?+ System -> pprUniqueAlways uniq+ Internal -> pprUniqueAlways uniq+ z_occ = ztext $ zEncodeFS $ occNameMangledFS occ++ normalDoc sty =+ getPprDebug $ \debug ->+ sdocOption sdocListTuplePuns $ \listTuplePuns ->+ handlePuns listTuplePuns (namePun_maybe name) $+ case sort of+ WiredIn mod _ builtin -> pprExternal debug sty uniq mod occ True builtin+ External mod -> pprExternal debug sty uniq mod occ False UserSyntax+ System -> pprSystem debug sty uniq occ+ Internal -> pprInternal debug sty uniq occ++ handlePuns :: Bool -> Maybe FastString -> SDoc -> SDoc+ handlePuns True (Just pun) _ = ftext pun+ handlePuns _ _ r = r {-# SPECIALISE pprName :: Name -> SDoc #-} {-# SPECIALISE pprName :: Name -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable @@ -674,12 +706,8 @@ pprNameUnqualified :: Name -> SDoc pprNameUnqualified Name { n_occ = occ } = ppr_occ_name occ -pprExternal :: IsLine doc => Bool -> PprStyle -> Unique -> Module -> OccName -> Bool -> BuiltInSyntax -> doc+pprExternal :: Bool -> PprStyle -> Unique -> Module -> OccName -> Bool -> BuiltInSyntax -> SDoc pprExternal debug sty uniq mod occ is_wired is_builtin- | codeStyle sty = pprModule mod <> char '_' <> ppr_z_occ_name occ- -- In code style, always qualify- -- ToDo: maybe we could print all wired-in things unqualified- -- in code style, to reduce symbol table bloat? | debug = pp_mod <> ppr_occ_name occ <> braces (hsep [if is_wired then text "(w)" else empty, pprNameSpaceBrief (occNameSpace occ),@@ -695,9 +723,8 @@ pp_mod = ppUnlessOption sdocSuppressModulePrefixes (pprModule mod <> dot) -pprInternal :: IsLine doc => Bool -> PprStyle -> Unique -> OccName -> doc+pprInternal :: Bool -> PprStyle -> Unique -> OccName -> SDoc pprInternal debug sty uniq occ- | codeStyle sty = pprUniqueAlways uniq | debug = ppr_occ_name occ <> braces (hsep [pprNameSpaceBrief (occNameSpace occ), pprUnique uniq]) | dumpStyle sty = ppr_occ_name occ <> ppr_underscore_unique uniq@@ -706,9 +733,8 @@ | otherwise = ppr_occ_name occ -- User style -- Like Internal, except that we only omit the unique in Iface style-pprSystem :: IsLine doc => Bool -> PprStyle -> Unique -> OccName -> doc-pprSystem debug sty uniq occ- | codeStyle sty = pprUniqueAlways uniq+pprSystem :: Bool -> PprStyle -> Unique -> OccName -> SDoc+pprSystem debug _sty uniq occ | debug = ppr_occ_name occ <> ppr_underscore_unique uniq <> braces (pprNameSpaceBrief (occNameSpace occ)) | otherwise = ppr_occ_name occ <> ppr_underscore_unique uniq@@ -717,7 +743,7 @@ -- so print the unique -pprModulePrefix :: IsLine doc => PprStyle -> Module -> OccName -> doc+pprModulePrefix :: PprStyle -> Module -> OccName -> SDoc -- Print the "M." part of a name, based on whether it's in scope or not -- See Note [Printing original names] in GHC.Types.Name.Ppr pprModulePrefix sty mod occ = ppUnlessOption sdocSuppressModulePrefixes $@@ -728,28 +754,23 @@ <> pprModuleName (moduleName mod) <> dot -- scope either NameUnqual -> empty -- In scope unqualified -pprUnique :: IsLine doc => Unique -> doc+pprUnique :: Unique -> SDoc -- Print a unique unless we are suppressing them pprUnique uniq = ppUnlessOption sdocSuppressUniques $ pprUniqueAlways uniq -ppr_underscore_unique :: IsLine doc => Unique -> doc+ppr_underscore_unique :: Unique -> SDoc -- Print an underscore separating the name from its unique -- But suppress it if we aren't printing the uniques anyway ppr_underscore_unique uniq = ppUnlessOption sdocSuppressUniques $ char '_' <> pprUniqueAlways uniq -ppr_occ_name :: IsLine doc => OccName -> doc+ppr_occ_name :: OccName -> SDoc ppr_occ_name occ = ftext (occNameFS occ) -- Don't use pprOccName; instead, just print the string of the OccName; -- we print the namespace in the debug stuff above---- In code style, we Z-encode the strings. The results of Z-encoding each FastString are--- cached behind the scenes in the FastString implementation.-ppr_z_occ_name :: IsLine doc => OccName -> doc-ppr_z_occ_name occ = ztext (zEncodeFS (occNameFS occ)) -- Prints (if mod information is available) "Defined at <loc>" or -- "Defined in <mod>" information for a Name.
GHC/Types/Name.hs-boot view
@@ -3,7 +3,7 @@ module GHC.Types.Name.Occurrence ) where -import GHC.Prelude (Eq)+import GHC.Prelude (Eq, Bool) import {-# SOURCE #-} GHC.Types.Name.Occurrence import GHC.Types.Unique import GHC.Utils.Outputable@@ -28,3 +28,4 @@ setNameUnique :: Name -> Unique -> Name nameOccName :: Name -> OccName tidyNameOcc :: Name -> OccName -> Name+isFieldName :: Name -> Bool
GHC/Types/Name/Cache.hs view
@@ -1,4 +1,3 @@- {-# LANGUAGE RankNTypes #-} -- | The Name Cache@@ -30,7 +29,9 @@ import Control.Concurrent.MVar import Control.Monad+import Control.Applicative + {- Note [The Name Cache]@@ -58,8 +59,8 @@ Note [Built-in syntax and the OrigNameCache] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Built-in syntax like tuples and unboxed sums are quite ubiquitous. To lower-their cost we use two tricks,+Built-in syntax like unboxed sums and punned syntax like tuples are quite+ubiquitous. To lower their cost we use two tricks, a. We specially encode tuple and sum Names in interface files' symbol tables to avoid having to look up their names while loading interface files.@@ -69,13 +70,14 @@ in GHC.Iface.Binary and for details. b. We don't include them in the Orig name cache but instead parse their- OccNames (in isBuiltInOcc_maybe) to avoid bloating the name cache with- them.+ OccNames (in isBuiltInOcc_maybe and isPunOcc_maybe) to avoid bloating+ the name cache with them. Why is the second measure necessary? Good question; afterall, 1) the parser-emits built-in syntax directly as Exact RdrNames, and 2) built-in syntax never-needs to looked-up during interface loading due to (a). It turns out that there-are two reasons why we might look up an Orig RdrName for built-in syntax,+emits built-in and punned syntax directly as Exact RdrNames, and 2) built-in+and punned syntax never needs to looked-up during interface loading due to (a).+It turns out that there are two reasons why we might look up an Orig RdrName+for built-in and punned syntax, * If you use setRdrNameSpace on an Exact RdrName it may be turned into an Orig RdrName.@@ -98,12 +100,12 @@ type OrigNameCache = ModuleEnv (OccEnv Name) takeUniqFromNameCache :: NameCache -> IO Unique-takeUniqFromNameCache (NameCache c _) = uniqFromTag c+takeUniqFromNameCache (NameCache c _) = uniqFromMask c lookupOrigNameCache :: OrigNameCache -> Module -> OccName -> Maybe Name lookupOrigNameCache nc mod occ | mod == gHC_TYPES || mod == gHC_PRIM || mod == gHC_TUPLE_PRIM- , Just name <- isBuiltInOcc_maybe occ+ , Just name <- isBuiltInOcc_maybe occ <|> isPunOcc_maybe mod occ = -- See Note [Known-key names], 3(c) in GHC.Builtin.Names -- Special case for tuples; there are too many -- of them to pre-populate the original-name cache
GHC/Types/Name/Env.hs view
@@ -15,12 +15,16 @@ -- ** Manipulating these environments mkNameEnv, mkNameEnvWith,+ fromUniqMap, emptyNameEnv, isEmptyNameEnv, unitNameEnv, nonDetNameEnvElts, extendNameEnv_C, extendNameEnv_Acc, extendNameEnv, extendNameEnvList, extendNameEnvList_C,- filterNameEnv, mapMaybeNameEnv, anyNameEnv,+ filterNameEnv, anyNameEnv,+ mapMaybeNameEnv,+ extendNameEnvListWith, plusNameEnv, plusNameEnv_C, plusNameEnv_CD, plusNameEnv_CD2, alterNameEnv,+ plusNameEnvList, plusNameEnvListWith, lookupNameEnv, lookupNameEnv_NF, delFromNameEnv, delListFromNameEnv, elemNameEnv, mapNameEnv, disjointNameEnv, seqEltsNameEnv,@@ -47,6 +51,7 @@ import GHC.Types.Name import GHC.Types.Unique.FM import GHC.Types.Unique.DFM+import GHC.Types.Unique.Map import GHC.Data.Maybe {-@@ -103,6 +108,7 @@ isEmptyNameEnv :: NameEnv a -> Bool mkNameEnv :: [(Name,a)] -> NameEnv a mkNameEnvWith :: (a -> Name) -> [a] -> NameEnv a+fromUniqMap :: UniqMap Name a -> NameEnv a nonDetNameEnvElts :: NameEnv a -> [a] alterNameEnv :: (Maybe a-> Maybe a) -> NameEnv a -> Name -> NameEnv a extendNameEnv_C :: (a->a->a) -> NameEnv a -> Name -> a -> NameEnv a@@ -112,7 +118,10 @@ plusNameEnv_C :: (a->a->a) -> NameEnv a -> NameEnv a -> NameEnv a plusNameEnv_CD :: (a->a->a) -> NameEnv a -> a -> NameEnv a -> a -> NameEnv a plusNameEnv_CD2 :: (Maybe a->Maybe a->a) -> NameEnv a -> NameEnv a -> NameEnv a+plusNameEnvList :: [NameEnv a] -> NameEnv a+plusNameEnvListWith :: (a->a->a) -> [NameEnv a] -> NameEnv a extendNameEnvList :: NameEnv a -> [(Name,a)] -> NameEnv a+extendNameEnvListWith :: (a -> Name) -> NameEnv a -> [a] -> NameEnv a extendNameEnvList_C :: (a->a->a) -> NameEnv a -> [(Name,a)] -> NameEnv a delFromNameEnv :: NameEnv a -> Name -> NameEnv a delListFromNameEnv :: NameEnv a -> [Name] -> NameEnv a@@ -133,16 +142,22 @@ unitNameEnv x y = unitUFM x y extendNameEnv x y z = addToUFM x y z extendNameEnvList x l = addListToUFM x l+extendNameEnvListWith f x l = addListToUFM x (map (\a -> (f a, a)) l) lookupNameEnv x y = lookupUFM x y alterNameEnv = alterUFM mkNameEnv l = listToUFM l mkNameEnvWith f = mkNameEnv . map (\a -> (f a, a))+fromUniqMap = mapUFM snd . getUniqMap elemNameEnv x y = elemUFM x y plusNameEnv x y = plusUFM x y plusNameEnv_C f x y = plusUFM_C f x y {-# INLINE plusNameEnv_CD #-} plusNameEnv_CD f x d y b = plusUFM_CD f x d y b plusNameEnv_CD2 f x y = plusUFM_CD2 f x y+{-# INLINE plusNameEnvList #-}+plusNameEnvList xs = plusUFMList xs+{-# INLINE plusNameEnvListWith #-}+plusNameEnvListWith f xs = plusUFMListWith f xs extendNameEnv_C f x y z = addToUFM_C f x y z mapNameEnv f x = mapUFM f x extendNameEnv_Acc x y z a b = addToUFM_Acc x y z a b@@ -151,7 +166,7 @@ delListFromNameEnv x y = delListFromUFM x y filterNameEnv x y = filterUFM x y mapMaybeNameEnv x y = mapMaybeUFM x y-anyNameEnv f x = foldUFM ((||) . f) False x+anyNameEnv f x = nonDetFoldUFM ((||) . f) False x disjointNameEnv x y = disjointUFM x y seqEltsNameEnv seqElt x = seqEltsUFM seqElt x
GHC/Types/Name/Occurrence.hs view
@@ -3,8 +3,11 @@ (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} -{-# LANGUAGE DeriveDataTypeable #-}+--{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE MagicHash #-} {-# LANGUAGE OverloadedStrings #-} -- |@@ -29,7 +32,7 @@ -- ** Construction -- $real_vs_source_data_constructors- tcName, clsName, tcClsName, dataName, varName,+ tcName, clsName, tcClsName, dataName, varName, fieldName, tvName, srcDataName, -- ** Pretty Printing@@ -37,11 +40,12 @@ -- * The 'OccName' type OccName, -- Abstract, instance of Outputable- pprOccName,+ pprOccName, occNameMangledFS, -- ** Construction mkOccName, mkOccNameFS, mkVarOcc, mkVarOccFS,+ mkRecFieldOcc, mkRecFieldOccFS, mkDataOcc, mkDataOccFS, mkTyVarOcc, mkTyVarOccFS, mkTcOcc, mkTcOccFS,@@ -49,7 +53,10 @@ mkDFunOcc, setOccNameSpace, demoteOccName,+ demoteOccTvName, promoteOccName,+ varToRecFieldOcc,+ recFieldToVarOcc, HasOccName(..), -- ** Derived 'OccName's@@ -66,31 +73,41 @@ mkSuperDictSelOcc, mkSuperDictAuxOcc, mkLocalOcc, mkMethodOcc, mkInstTyTcOcc, mkInstTyCoOcc, mkEqPredCoOcc,- mkRecFldSelOcc, mkTyConRepOcc, -- ** Deconstruction occNameFS, occNameString, occNameSpace, isVarOcc, isTvOcc, isTcOcc, isDataOcc, isDataSymOcc, isSymOcc, isValOcc,+ isFieldOcc, fieldOcc_maybe, parenSymOcc, startsWithUnderscore, isTcClsNameSpace, isTvNameSpace, isDataConNameSpace, isVarNameSpace, isValNameSpace,+ isFieldNameSpace, isTermVarOrFieldNameSpace, -- * The 'OccEnv' type- OccEnv, emptyOccEnv, unitOccEnv, extendOccEnv, mapOccEnv,- lookupOccEnv, mkOccEnv, mkOccEnv_C, extendOccEnvList, elemOccEnv,- nonDetOccEnvElts, foldOccEnv, plusOccEnv, plusOccEnv_C, extendOccEnv_C,+ OccEnv, emptyOccEnv, unitOccEnv, extendOccEnv,+ mapOccEnv, strictMapOccEnv,+ mapMaybeOccEnv,+ lookupOccEnv, lookupOccEnv_AllNameSpaces,+ lookupOccEnv_WithFields, lookupFieldsOccEnv,+ mkOccEnv, mkOccEnv_C, extendOccEnvList, elemOccEnv,+ nonDetOccEnvElts, nonDetFoldOccEnv,+ plusOccEnv, plusOccEnv_C, extendOccEnv_Acc, filterOccEnv, delListFromOccEnv, delFromOccEnv,- alterOccEnv, minusOccEnv, minusOccEnv_C, pprOccEnv,+ alterOccEnv, minusOccEnv, minusOccEnv_C, minusOccEnv_C_Ns,+ pprOccEnv, forceOccEnv,+ intersectOccEnv_C, -- * The 'OccSet' type OccSet, emptyOccSet, unitOccSet, mkOccSet, extendOccSet, extendOccSetList,- unionOccSets, unionManyOccSets, minusOccSet, elemOccSet,- isEmptyOccSet, intersectOccSet,- filterOccSet, occSetToEnv,+ unionOccSets, unionManyOccSets, elemOccSet,+ isEmptyOccSet, + -- * Dealing with main+ mainOcc, ppMainFn,+ -- * Tidying up TidyOccEnv, emptyTidyOccEnv, initTidyOccEnv, tidyOccName, avoidClashesOccEnv, delTidyOccEnvList,@@ -101,9 +118,9 @@ import GHC.Prelude +import GHC.Builtin.Uniques import GHC.Utils.Misc import GHC.Types.Unique-import GHC.Builtin.Uniques import GHC.Types.Unique.FM import GHC.Types.Unique.Set import GHC.Data.FastString@@ -111,10 +128,13 @@ import GHC.Utils.Outputable import GHC.Utils.Lexeme import GHC.Utils.Binary+import GHC.Utils.Panic.Plain+ import Control.DeepSeq import Data.Char import Data.Data import qualified Data.Semigroup as S+import GHC.Exts( Int(I#), dataToTag# ) {- ************************************************************************@@ -124,33 +144,109 @@ ************************************************************************ -} -data NameSpace = VarName -- Variables, including "real" data constructors- | DataName -- "Source" data constructors- | TvName -- Type variables- | TcClsName -- Type constructors and classes; Haskell has them- -- in the same name space for now.- deriving( Eq, Ord )+data NameSpace+ -- | Variable name space (including "real" data constructors).+ = VarName+ -- | Record field namespace for the given record.+ | FldName+ { fldParent :: !FastString+ -- ^ The textual name of the parent of the field.+ --+ -- - For a field of a datatype, this is the name of the first constructor+ -- of the datatype (regardless of whether this constructor has this field).+ -- - For a field of a pattern synonym, this is the name of the pattern synonym.+ }+ -- | "Source" data constructor namespace.+ | DataName+ -- | Type variable namespace.+ | TvName+ -- | Type constructor and class namespace.+ | TcClsName+ -- Haskell has type constructors and classes in the same namespace, for now.+ deriving Eq --- Note [Data Constructors]--- ~~~~~~~~~~~~~~~~~~~~~~~~--- see also: Note [Data Constructor Naming] in GHC.Core.DataCon------ $real_vs_source_data_constructors--- There are two forms of data constructor:------ [Source data constructors] The data constructors mentioned in Haskell source code------ [Real data constructors] The data constructors of the representation type, which may not be the same as the source type------ For example:------ > data T = T !(Int, Int)------ The source datacon has type @(Int, Int) -> T@--- The real datacon has type @Int -> Int -> T@------ GHC chooses a representation based on the strictness etc.+instance Ord NameSpace where+ compare ns1 ns2 =+ case compare (I# (dataToTag# ns1)) (I# (dataToTag# ns2)) of+ LT -> LT+ GT -> GT+ EQ+ | FldName { fldParent = p1 } <- ns1+ , FldName { fldParent = p2 } <- ns2+ -> lexicalCompareFS p1 p2+ | otherwise+ -> EQ +instance Uniquable NameSpace where+ getUnique (FldName fs) = mkFldNSUnique fs+ getUnique VarName = varNSUnique+ getUnique DataName = dataNSUnique+ getUnique TvName = tvNSUnique+ getUnique TcClsName = tcNSUnique++instance NFData NameSpace where+ rnf VarName = ()+ rnf (FldName par) = rnf par+ rnf DataName = ()+ rnf TvName = ()+ rnf TcClsName = ()++{-+Note [Data Constructors]+~~~~~~~~~~~~~~~~~~~~~~~~+see also: Note [Data Constructor Naming] in GHC.Core.DataCon++$real_vs_source_data_constructors+There are two forms of data constructor:++ [Source data constructors] The data constructors mentioned in Haskell source code++ [Real data constructors] The data constructors of the representation type, which may not be the same as the source type++For example:++> data T = T !(Int, Int)++The source datacon has type @(Int, Int) -> T@+The real datacon has type @Int -> Int -> T@++GHC chooses a representation based on the strictness etc.++Note [Record field namespacing]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Record fields have a separate namespace from variables, to support+DuplicateRecordFields, e.g. in++ data X = MkX { fld :: Int }+ data Y = MkY { fld :: Bool }++ f x = x { fld = 3 }+ g y = y { fld = False }++we want the two occurrences of "fld" to refer to the field names associated with+the corresponding data type.++The namespace for a record field is as follows:++ - for a data type, it is the textual name of the first constructor of the+ datatype, whether this constructor has this field or not;+ - for a pattern synonym, it is the textual name of the pattern synonym itself.++Record fields are initially parsed as variables, but the renamer resolves their+namespace in GHC.Rename.Names.newRecordFieldLabel, which is called when renaming+record data declarations and record pattern synonym declarations.++To illustrate the namespacing, consider the record field "fld" in the following datatype++ data instance A Int Bool Char+ = MkA1 | MkA2 { fld :: Int } | MkA3 { bar :: Bool, fld :: Int }++Its namespace is `FldName "MkA1"`. This is a convention used throughout GHC+to circumvent the fact that we don't have a way to refer to the type constructor+"A Int Bool Char" in the renamer, as data family instances only get given+'Name's in the typechecker.+-}+ tcName, clsName, tcClsName :: NameSpace dataName, srcDataName :: NameSpace tvName, varName :: NameSpace@@ -168,6 +264,9 @@ tvName = TvName varName = VarName +fieldName :: FastString -> NameSpace+fieldName = FldName+ isDataConNameSpace :: NameSpace -> Bool isDataConNameSpace DataName = True isDataConNameSpace _ = False@@ -181,30 +280,44 @@ isTvNameSpace _ = False isVarNameSpace :: NameSpace -> Bool -- Variables or type variables, but not constructors-isVarNameSpace TvName = True-isVarNameSpace VarName = True-isVarNameSpace _ = False+isVarNameSpace TvName = True+isVarNameSpace VarName = True+isVarNameSpace (FldName {}) = True+isVarNameSpace _ = False +-- | Is this a term variable or field name namespace?+isTermVarOrFieldNameSpace :: NameSpace -> Bool+isTermVarOrFieldNameSpace VarName = True+isTermVarOrFieldNameSpace (FldName {}) = True+isTermVarOrFieldNameSpace _ = False+ isValNameSpace :: NameSpace -> Bool-isValNameSpace DataName = True-isValNameSpace VarName = True-isValNameSpace _ = False+isValNameSpace DataName = True+isValNameSpace VarName = True+isValNameSpace (FldName {}) = True+isValNameSpace _ = False +isFieldNameSpace :: NameSpace -> Bool+isFieldNameSpace (FldName {}) = True+isFieldNameSpace _ = False+ pprNameSpace :: NameSpace -> SDoc-pprNameSpace DataName = text "data constructor"-pprNameSpace VarName = text "variable"-pprNameSpace TvName = text "type variable"-pprNameSpace TcClsName = text "type constructor or class"+pprNameSpace DataName = text "data constructor"+pprNameSpace VarName = text "variable"+pprNameSpace TvName = text "type variable"+pprNameSpace TcClsName = text "type constructor or class"+pprNameSpace (FldName p) = text "record field of" <+> ftext p pprNonVarNameSpace :: NameSpace -> SDoc pprNonVarNameSpace VarName = empty pprNonVarNameSpace ns = pprNameSpace ns -pprNameSpaceBrief :: IsLine doc => NameSpace -> doc-pprNameSpaceBrief DataName = char 'd'-pprNameSpaceBrief VarName = char 'v'-pprNameSpaceBrief TvName = text "tv"-pprNameSpaceBrief TcClsName = text "tc"+pprNameSpaceBrief :: NameSpace -> SDoc+pprNameSpaceBrief DataName = char 'd'+pprNameSpaceBrief VarName = char 'v'+pprNameSpaceBrief TvName = text "tv"+pprNameSpaceBrief TcClsName = text "tc"+pprNameSpaceBrief (FldName {}) = text "fld" -- demoteNameSpace lowers the NameSpace if possible. We can not know -- in advance, since a TvName can appear in an HsTyVar.@@ -214,7 +327,17 @@ demoteNameSpace DataName = Nothing demoteNameSpace TvName = Nothing demoteNameSpace TcClsName = Just DataName+demoteNameSpace (FldName {}) = Nothing +-- demoteTvNameSpace lowers the NameSpace of a type variable.+-- See Note [Demotion] in GHC.Rename.Env.+demoteTvNameSpace :: NameSpace -> Maybe NameSpace+demoteTvNameSpace TvName = Just VarName+demoteTvNameSpace VarName = Nothing+demoteTvNameSpace DataName = Nothing+demoteTvNameSpace TcClsName = Nothing+demoteTvNameSpace (FldName {}) = Nothing+ -- promoteNameSpace promotes the NameSpace as follows. -- See Note [Promotion] in GHC.Rename.Env. promoteNameSpace :: NameSpace -> Maybe NameSpace@@ -222,6 +345,7 @@ promoteNameSpace VarName = Just TvName promoteNameSpace TcClsName = Nothing promoteNameSpace TvName = Nothing+promoteNameSpace (FldName {}) = Nothing {- ************************************************************************@@ -246,7 +370,8 @@ instance Ord OccName where -- Compares lexicographically, *not* by Unique of the string- compare (OccName sp1 s1) (OccName sp2 s2) = lexicalCompareFS s1 s2 S.<> compare sp1 sp2+ compare (OccName sp1 s1) (OccName sp2 s2) =+ lexicalCompareFS s1 s2 S.<> compare sp1 sp2 instance Data OccName where -- don't traverse?@@ -278,11 +403,41 @@ pprOccName :: IsLine doc => OccName -> doc pprOccName (OccName sp occ)- = docWithContext $ \ sty ->- if codeStyle (sdocStyle sty)- then ztext (zEncodeFS occ)- else ftext occ <> whenPprDebug (braces (pprNameSpaceBrief sp))+ = docWithStyle (ztext (zEncodeFS occ))+ (\_ -> ftext occ <> whenPprDebug (braces (pprNameSpaceBrief sp)))+{-# SPECIALIZE pprOccName :: OccName -> SDoc #-}+{-# SPECIALIZE pprOccName :: OccName -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable +-- | Mangle field names to avoid duplicate symbols.+--+-- See Note [Mangling OccNames].+occNameMangledFS :: OccName -> FastString+occNameMangledFS (OccName ns fs) =+ case ns of+ -- Fields need to include the constructor, to ensure that we don't define+ -- duplicate symbols when using DuplicateRecordFields.+ FldName con -> concatFS [fsLit "$fld:", con, ":", fs]+ -- Otherwise, we can ignore the namespace, as there is no risk of name+ -- clashes.+ _ -> fs++{- Note [Mangling OccNames]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+When generating a symbol for a Name, we usually discard the NameSpace entirely+(see GHC.Types.Name.pprName). This is because clashes are usually not possible,+e.g. a variable and a data constructor can't clash because data constructors+start with a capital letter or a colon, while variables never do.++However, record field names, in the presence of DuplicateRecordFields, need this+disambiguation. So, for a record field like++ data A = MkA { foo :: Int }++we generate the symbol $fld:MkA:foo. We use the constructor 'MkA' to disambiguate,+and not the TyCon A as one might naively expect: this is explained in+Note [Record field namespacing].+-}+ {- ************************************************************************ * *@@ -303,6 +458,27 @@ mkVarOccFS :: FastString -> OccName mkVarOccFS fs = mkOccNameFS varName fs +mkRecFieldOcc :: FastString -> String -> OccName+mkRecFieldOcc dc = mkOccName (fieldName dc)++mkRecFieldOccFS :: FastString -> FastString -> OccName+mkRecFieldOccFS dc = mkOccNameFS (fieldName dc)++varToRecFieldOcc :: HasDebugCallStack => FastString -> OccName -> OccName+varToRecFieldOcc dc (OccName ns s) =+ assert makes_sense $ mkRecFieldOccFS dc s+ where+ makes_sense = case ns of+ VarName -> True+ FldName {} -> True+ -- NB: it's OK to change the parent data constructor,+ -- see e.g. test T23220 in which we construct with TH+ -- a datatype using the fields of a different datatype.+ _ -> False++recFieldToVarOcc :: HasDebugCallStack => OccName -> OccName+recFieldToVarOcc (OccName _ns s) = mkVarOccFS s+ mkDataOcc :: String -> OccName mkDataOcc = mkOccName dataName @@ -334,6 +510,11 @@ space' <- demoteNameSpace space return $ OccName space' name +demoteOccTvName :: OccName -> Maybe OccName+demoteOccTvName (OccName space name) = do+ space' <- demoteTvNameSpace space+ return $ OccName space' name+ -- promoteOccName promotes the NameSpace of OccName. -- See Note [Promotion] in GHC.Rename.Env. promoteOccName :: OccName -> Maybe OccName@@ -353,91 +534,291 @@ * * ************************************************************************ -OccEnvs are used mainly for the envts in ModIfaces.+OccEnvs are used for the GlobalRdrEnv and for the envts in ModIface. -Note [The Unique of an OccName]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-They are efficient, because FastStrings have unique Int# keys. We assume-this key is less than 2^24, and indeed FastStrings are allocated keys-sequentially starting at 0.+Note [OccEnv]+~~~~~~~~~~~~~+An OccEnv is a map keyed on OccName. Recall that an OccEnv consists of two+components: -So we can make a Unique using- mkUnique ns key :: Unique-where 'ns' is a Char representing the name space. This in turn makes it-easy to build an OccEnv.--}+ - a namespace,+ - a textual name (in the form of a FastString). -instance Uniquable OccName where- -- See Note [The Unique of an OccName]- getUnique (OccName VarName fs) = mkVarOccUnique fs- getUnique (OccName DataName fs) = mkDataOccUnique fs- getUnique (OccName TvName fs) = mkTvOccUnique fs- getUnique (OccName TcClsName fs) = mkTcOccUnique fs+In general, for a given textual name, there is only one appropriate namespace.+However, sometimes we do get an occurrence that belongs to several namespaces: -newtype OccEnv a = A (UniqFM OccName a)- deriving Data+ - Symbolic identifiers such as (:+) can belong to both the data constructor and+ type constructor/class namespaces.+ - With duplicate record fields, a field name can belong to several different+ namespaces, one for each parent datatype (or pattern synonym). +So we represent an OccEnv as a nested data structure++ FastStringEnv (UniqFM NameSpace a)++in which we can first look up the textual name, and then choose which of the+namespaces are relevant. This supports the two main uses of OccEnvs:++ 1. One wants to look up a specific OccName in the environment, at a specific+ namespace. One looks up the textual name, and then the namespace.+ 2. One wants to look up something, but isn't sure in advance of the namespace.+ So one looks up the textual name, and then can decide what to do based on+ the returned map of namespaces.++This data structure isn't performance critical in most situations, but some+improvements to its performance that might be worth it are as follows:++ A. Use a tailor-made data structure for a map keyed on NameSpaces.++ Recall that we have:++ data IntMap a = Bin !Int !Int !(IntMap a) !(IntMap a)+ | Tip !Key a+ | Nil++ This is already pretty efficient for singletons, but we don't need the+ empty case (as we would simply omit the parent key in the OccEnv instead+ of storing an empty inner map).++ B. Always ensure the inner map (keyed on namespaces) is evaluated, i.e.+ is never a thunk. For this, we would need to use strict operations on+ the outer FastStringEnv (but we'd keep using lazy operations on the inner+ UniqFM).+-}++-- | A map keyed on 'OccName'. See Note [OccEnv].+newtype OccEnv a = MkOccEnv (FastStringEnv (UniqFM NameSpace a))+ deriving Functor++-- | The empty 'OccEnv'. emptyOccEnv :: OccEnv a-unitOccEnv :: OccName -> a -> OccEnv a+emptyOccEnv = MkOccEnv emptyFsEnv++-- | A singleton 'OccEnv'.+unitOccEnv :: OccName -> a -> OccEnv a+unitOccEnv (OccName ns s) a = MkOccEnv $ unitFsEnv s (unitUFM ns a)++-- | Add a single element to an 'OccEnv'. extendOccEnv :: OccEnv a -> OccName -> a -> OccEnv a+extendOccEnv (MkOccEnv as) (OccName ns s) a =+ MkOccEnv $ extendFsEnv_C plusUFM as s (unitUFM ns a)++-- | Extend an 'OccEnv' by a list.+--+-- 'OccName's later on in the list override earlier 'OccName's. extendOccEnvList :: OccEnv a -> [(OccName, a)] -> OccEnv a+extendOccEnvList = foldl' $ \ env (occ, a) -> extendOccEnv env occ a++-- | Look an element up in an 'OccEnv'. lookupOccEnv :: OccEnv a -> OccName -> Maybe a-mkOccEnv :: [(OccName,a)] -> OccEnv a-mkOccEnv_C :: (a -> a -> a) -> [(OccName,a)] -> OccEnv a-elemOccEnv :: OccName -> OccEnv a -> Bool-foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b-nonDetOccEnvElts :: OccEnv a -> [a]-extendOccEnv_C :: (a->a->a) -> OccEnv a -> OccName -> a -> OccEnv a-extendOccEnv_Acc :: (a->b->b) -> (a->b) -> OccEnv b -> OccName -> a -> OccEnv b-plusOccEnv :: OccEnv a -> OccEnv a -> OccEnv a-plusOccEnv_C :: (a->a->a) -> OccEnv a -> OccEnv a -> OccEnv a-mapOccEnv :: (a->b) -> OccEnv a -> OccEnv b-delFromOccEnv :: OccEnv a -> OccName -> OccEnv a+lookupOccEnv (MkOccEnv as) (OccName ns s)+ = do { m <- lookupFsEnv as s+ ; lookupUFM m ns }++-- | Lookup an element in an 'OccEnv', ignoring 'NameSpace's entirely.+lookupOccEnv_AllNameSpaces :: OccEnv a -> OccName -> [a]+lookupOccEnv_AllNameSpaces (MkOccEnv as) (OccName _ s)+ = case lookupFsEnv as s of+ Nothing -> []+ Just r -> nonDetEltsUFM r++-- | Lookup an element in an 'OccEnv', looking in the record field+-- namespace for a variable.+lookupOccEnv_WithFields :: OccEnv a -> OccName -> [a]+lookupOccEnv_WithFields env occ =+ case lookupOccEnv env occ of+ Nothing -> fieldGREs+ Just gre -> gre : fieldGREs+ where+ fieldGREs+ -- If the 'OccName' is a variable, also look up+ -- in the record field namespaces.+ | isVarOcc occ+ = lookupFieldsOccEnv env (occNameFS occ)+ | otherwise+ = []++-- | Look up all the record fields that match with the given 'FastString'+-- in an 'OccEnv'.+lookupFieldsOccEnv :: OccEnv a -> FastString -> [a]+lookupFieldsOccEnv (MkOccEnv as) fld =+ case lookupFsEnv as fld of+ Nothing -> []+ Just flds -> nonDetEltsUFM $ filter_flds flds+ -- NB: non-determinism is OK: in practice we will either end up resolving+ -- to a single field or throwing an error.+ where+ filter_flds = filterUFM_Directly (\ uniq _ -> isFldNSUnique uniq)++-- | Create an 'OccEnv' from a list.+--+-- 'OccName's later on in the list override earlier 'OccName's.+mkOccEnv :: [(OccName,a)] -> OccEnv a+mkOccEnv = extendOccEnvList emptyOccEnv++-- | Create an 'OccEnv' from a list, combining different values+-- with the same 'OccName' using the combining function.+mkOccEnv_C :: (a -> a -> a) -- ^ old -> new -> result+ -> [(OccName,a)]+ -> OccEnv a+mkOccEnv_C f elts+ = MkOccEnv $ foldl' g emptyFsEnv elts+ where+ g env (OccName ns s, a) =+ extendFsEnv_C (plusUFM_C $ flip f) env s (unitUFM ns a)++-- | Compute whether there is a value keyed by the given 'OccName'.+elemOccEnv :: OccName -> OccEnv a -> Bool+elemOccEnv (OccName ns s) (MkOccEnv as)+ = case lookupFsEnv as s of+ Nothing -> False+ Just m -> ns `elemUFM` m++-- | Fold over an 'OccEnv'. Non-deterministic, unless the folding function+-- is commutative (i.e. @a1 `f` ( a2 `f` b ) == a2 `f` ( a1 `f` b )@ for all @a1@, @a2@, @b@).+nonDetFoldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b+nonDetFoldOccEnv f b0 (MkOccEnv as) =+ nonDetFoldFsEnv (flip $ nonDetFoldUFM f) b0 as++-- | Obtain the elements of an 'OccEnv'.+--+-- The resulting order is non-deterministic.+nonDetOccEnvElts :: OccEnv a -> [a]+nonDetOccEnvElts = nonDetFoldOccEnv (:) []++-- | Union of two 'OccEnv's, right-biased.+plusOccEnv :: OccEnv a -> OccEnv a -> OccEnv a+plusOccEnv (MkOccEnv env1) (MkOccEnv env2)+ = MkOccEnv $ plusFsEnv_C plusUFM env1 env2++-- | Union of two 'OccEnv's with a combining function.+plusOccEnv_C :: (a->a->a) -> OccEnv a -> OccEnv a -> OccEnv a+plusOccEnv_C f (MkOccEnv env1) (MkOccEnv env2)+ = MkOccEnv $ plusFsEnv_C (plusUFM_C f) env1 env2++-- | Map over an 'OccEnv' ('Functor' instance).+mapOccEnv :: (a->b) -> OccEnv a -> OccEnv b+mapOccEnv = fmap++-- | 'mapMaybe' for b 'OccEnv'.+mapMaybeOccEnv :: (a -> Maybe b) -> OccEnv a -> OccEnv b+mapMaybeOccEnv f (MkOccEnv env)+ = MkOccEnv $ mapMaybeUFM g env+ where+ g as =+ case mapMaybeUFM f as of+ m' | isNullUFM m' -> Nothing+ | otherwise -> Just m'++-- | Add a single element to an 'OccEnv', using a different function whether+-- the 'OccName' already exists or not.+extendOccEnv_Acc :: forall a b+ . (a->b->b) -- ^ add to existing+ -> (a->b) -- ^ new element+ -> OccEnv b -- ^ old+ -> OccName -> a -- ^ new+ -> OccEnv b+extendOccEnv_Acc f g (MkOccEnv env) (OccName ns s) =+ MkOccEnv . extendFsEnv_Acc f' g' env s+ where+ f' :: a -> UniqFM NameSpace b -> UniqFM NameSpace b+ f' a bs = alterUFM (Just . \ case { Nothing -> g a ; Just b -> f a b }) bs ns+ g' a = unitUFM ns (g a)++-- | Delete one element from an 'OccEnv'.+delFromOccEnv :: forall a. OccEnv a -> OccName -> OccEnv a+delFromOccEnv (MkOccEnv env1) (OccName ns s) =+ MkOccEnv $ alterFsEnv f env1 s+ where+ f :: Maybe (UniqFM NameSpace a) -> Maybe (UniqFM NameSpace a)+ f Nothing = Nothing+ f (Just m) =+ case delFromUFM m ns of+ m' | isNullUFM m' -> Nothing+ | otherwise -> Just m'++-- | Delete multiple elements from an 'OccEnv'. delListFromOccEnv :: OccEnv a -> [OccName] -> OccEnv a-filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt-alterOccEnv :: (Maybe elt -> Maybe elt) -> OccEnv elt -> OccName -> OccEnv elt+delListFromOccEnv = foldl' delFromOccEnv++-- | Filter out all elements in an 'OccEnv' using a predicate.+filterOccEnv :: forall a. (a -> Bool) -> OccEnv a -> OccEnv a+filterOccEnv f (MkOccEnv env) =+ MkOccEnv $ mapMaybeFsEnv g env+ where+ g :: UniqFM NameSpace a -> Maybe (UniqFM NameSpace a)+ g ms =+ case filterUFM f ms of+ m' | isNullUFM m' -> Nothing+ | otherwise -> Just m'++-- | Alter an 'OccEnv', adding or removing an element at the given key.+alterOccEnv :: forall a. (Maybe a -> Maybe a) -> OccEnv a -> OccName -> OccEnv a+alterOccEnv f (MkOccEnv env) (OccName ns s) =+ MkOccEnv $ alterFsEnv g env s+ where+ g :: Maybe (UniqFM NameSpace a) -> Maybe (UniqFM NameSpace a)+ g Nothing = fmap (unitUFM ns) (f Nothing)+ g (Just m) =+ case alterUFM f m ns of+ m' | isNullUFM m' -> Nothing+ | otherwise -> Just m'++intersectOccEnv_C :: (a -> b -> c) -> OccEnv a -> OccEnv b -> OccEnv c+intersectOccEnv_C f (MkOccEnv as) (MkOccEnv bs)+ = MkOccEnv $ intersectUFM_C (intersectUFM_C f) as bs++-- | Remove elements of the first 'OccEnv' that appear in the second 'OccEnv'. minusOccEnv :: OccEnv a -> OccEnv b -> OccEnv a+minusOccEnv = minusOccEnv_C_Ns minusUFM --- | Alters (replaces or removes) those elements of the map that are mentioned in the second map-minusOccEnv_C :: (a -> b -> Maybe a) -> OccEnv a -> OccEnv b -> OccEnv a+-- | Alters (replaces or removes) those elements of the first 'OccEnv' that are+-- mentioned in the second 'OccEnv'.+--+-- Same idea as 'Data.Map.differenceWith'.+minusOccEnv_C :: (a -> b -> Maybe a)+ -> OccEnv a -> OccEnv b -> OccEnv a+minusOccEnv_C f = minusOccEnv_C_Ns (minusUFM_C f) -emptyOccEnv = A emptyUFM-unitOccEnv x y = A $ unitUFM x y-extendOccEnv (A x) y z = A $ addToUFM x y z-extendOccEnvList (A x) l = A $ addListToUFM x l-lookupOccEnv (A x) y = lookupUFM x y-mkOccEnv l = A $ listToUFM l-elemOccEnv x (A y) = elemUFM x y-foldOccEnv a b (A c) = foldUFM a b c-nonDetOccEnvElts (A x) = nonDetEltsUFM x-plusOccEnv (A x) (A y) = A $ plusUFM x y-plusOccEnv_C f (A x) (A y) = A $ plusUFM_C f x y-extendOccEnv_C f (A x) y z = A $ addToUFM_C f x y z-extendOccEnv_Acc f g (A x) y z = A $ addToUFM_Acc f g x y z-mapOccEnv f (A x) = A $ mapUFM f x-mkOccEnv_C comb l = A $ addListToUFM_C comb emptyUFM l-delFromOccEnv (A x) y = A $ delFromUFM x y-delListFromOccEnv (A x) y = A $ delListFromUFM x y-filterOccEnv x (A y) = A $ filterUFM x y-alterOccEnv fn (A y) k = A $ alterUFM fn y k-minusOccEnv (A x) (A y) = A $ minusUFM x y-minusOccEnv_C fn (A x) (A y) = A $ minusUFM_C fn x y+minusOccEnv_C_Ns :: forall a b+ . (UniqFM NameSpace a -> UniqFM NameSpace b -> UniqFM NameSpace a)+ -> OccEnv a -> OccEnv b -> OccEnv a+minusOccEnv_C_Ns f (MkOccEnv as) (MkOccEnv bs) =+ MkOccEnv $ minusUFM_C g as bs+ where+ g :: UniqFM NameSpace a -> UniqFM NameSpace b -> Maybe (UniqFM NameSpace a)+ g as bs =+ let m = f as bs+ in if isNullUFM m+ then Nothing+ else Just m instance Outputable a => Outputable (OccEnv a) where ppr x = pprOccEnv ppr x pprOccEnv :: (a -> SDoc) -> OccEnv a -> SDoc-pprOccEnv ppr_elt (A env) = pprUniqFM ppr_elt env+pprOccEnv ppr_elt (MkOccEnv env)+ = brackets $ fsep $ punctuate comma $+ [ ppr uq <+> text ":->" <+> ppr_elt elt+ | (uq, elts) <- nonDetUFMToList env+ , elt <- nonDetEltsUFM elts ] instance NFData a => NFData (OccEnv a) where rnf = forceOccEnv rnf +-- | Map over an 'OccEnv' strictly.+strictMapOccEnv :: (a -> b) -> OccEnv a -> OccEnv b+strictMapOccEnv f (MkOccEnv as) =+ MkOccEnv $ strictMapFsEnv (strictMapUFM f) as+ -- | Force an 'OccEnv' with the provided function. forceOccEnv :: (a -> ()) -> OccEnv a -> ()-forceOccEnv nf (A fs) = seqEltsUFM nf fs+forceOccEnv nf (MkOccEnv fs) = seqEltsUFM (seqEltsUFM nf) fs -type OccSet = UniqSet OccName+-------------------------------------------------------------------------------- +type OccSet = FastStringEnv (UniqSet NameSpace)+ emptyOccSet :: OccSet unitOccSet :: OccName -> OccSet mkOccSet :: [OccName] -> OccSet@@ -445,27 +826,18 @@ extendOccSetList :: OccSet -> [OccName] -> OccSet unionOccSets :: OccSet -> OccSet -> OccSet unionManyOccSets :: [OccSet] -> OccSet-minusOccSet :: OccSet -> OccSet -> OccSet elemOccSet :: OccName -> OccSet -> Bool isEmptyOccSet :: OccSet -> Bool-intersectOccSet :: OccSet -> OccSet -> OccSet-filterOccSet :: (OccName -> Bool) -> OccSet -> OccSet--- | Converts an OccSet to an OccEnv (operationally the identity)-occSetToEnv :: OccSet -> OccEnv OccName -emptyOccSet = emptyUniqSet-unitOccSet = unitUniqSet-mkOccSet = mkUniqSet-extendOccSet = addOneToUniqSet-extendOccSetList = addListToUniqSet-unionOccSets = unionUniqSets-unionManyOccSets = unionManyUniqSets-minusOccSet = minusUniqSet-elemOccSet = elementOfUniqSet-isEmptyOccSet = isEmptyUniqSet-intersectOccSet = intersectUniqSets-filterOccSet = filterUniqSet-occSetToEnv = A . getUniqSet+emptyOccSet = emptyFsEnv+unitOccSet (OccName ns s) = unitFsEnv s (unitUniqSet ns)+mkOccSet = extendOccSetList emptyOccSet+extendOccSet occs (OccName ns s) = extendFsEnv occs s (unitUniqSet ns)+extendOccSetList = foldl extendOccSet+unionOccSets = plusFsEnv_C unionUniqSets+unionManyOccSets = foldl' unionOccSets emptyOccSet+elemOccSet (OccName ns s) occs = maybe False (elementOfUniqSet ns) $ lookupFsEnv occs s+isEmptyOccSet = isNullUFM {- ************************************************************************@@ -481,7 +853,7 @@ setOccNameSpace :: NameSpace -> OccName -> OccName setOccNameSpace sp (OccName _ occ) = OccName sp occ -isVarOcc, isTvOcc, isTcOcc, isDataOcc :: OccName -> Bool+isVarOcc, isTvOcc, isTcOcc, isDataOcc, isFieldOcc :: OccName -> Bool isVarOcc (OccName VarName _) = True isVarOcc _ = False@@ -492,12 +864,20 @@ isTcOcc (OccName TcClsName _) = True isTcOcc _ = False +isFieldOcc (OccName (FldName {}) _) = True+isFieldOcc _ = False++fieldOcc_maybe :: OccName -> Maybe FastString+fieldOcc_maybe (OccName (FldName con) _) = Just con+fieldOcc_maybe _ = Nothing+ -- | /Value/ 'OccNames's are those that are either in--- the variable or data constructor namespaces+-- the variable, field name or data constructor namespaces isValOcc :: OccName -> Bool-isValOcc (OccName VarName _) = True-isValOcc (OccName DataName _) = True-isValOcc _ = False+isValOcc (OccName VarName _) = True+isValOcc (OccName DataName _) = True+isValOcc (OccName (FldName {}) _) = True+isValOcc _ = False isDataOcc (OccName DataName _) = True isDataOcc _ = False@@ -512,10 +892,12 @@ -- | Test if the 'OccName' is that for any operator (whether -- it is a data constructor or variable or whatever) isSymOcc :: OccName -> Bool-isSymOcc (OccName DataName s) = isLexConSym s-isSymOcc (OccName TcClsName s) = isLexSym s-isSymOcc (OccName VarName s) = isLexSym s-isSymOcc (OccName TvName s) = isLexSym s+isSymOcc (OccName ns s) = case ns of+ DataName -> isLexConSym s+ TcClsName -> isLexSym s+ VarName -> isLexSym s+ TvName -> isLexSym s+ FldName {} -> isLexSym s -- Pretty inefficient! parenSymOcc :: OccName -> SDoc -> SDoc@@ -652,10 +1034,6 @@ mkGenR = mk_simple_deriv tcName "Rep_" mkGen1R = mk_simple_deriv tcName "Rep1_" --- Overloaded record field selectors-mkRecFldSelOcc :: FastString -> OccName-mkRecFldSelOcc s = mk_deriv varName "$sel" [s]- mk_simple_deriv :: NameSpace -> FastString -> OccName -> OccName mk_simple_deriv sp px occ = mk_deriv sp px [occNameFS occ] @@ -886,6 +1264,24 @@ {- ************************************************************************ * *+ Utilies for "main"+* *+************************************************************************+-}++mainOcc :: OccName+mainOcc = mkVarOccFS (fsLit "main")++ppMainFn :: OccName -> SDoc+ppMainFn main_occ+ | main_occ == mainOcc+ = text "IO action" <+> quotes (ppr main_occ)+ | otherwise+ = text "main IO action" <+> quotes (ppr main_occ)++{-+************************************************************************+* * Binary instance Here rather than in GHC.Iface.Binary because OccName is abstract * *@@ -901,13 +1297,19 @@ putByte bh 2 put_ bh TcClsName = putByte bh 3+ put_ bh (FldName parent) = do+ putByte bh 4+ put_ bh parent get bh = do h <- getByte bh case h of 0 -> return VarName 1 -> return DataName 2 -> return TvName- _ -> return TcClsName+ 3 -> return TcClsName+ _ -> do+ parent <- get bh+ return $ FldName { fldParent = parent } instance Binary OccName where put_ bh (OccName aa ab) = do
GHC/Types/Name/Occurrence.hs-boot view
@@ -8,5 +8,4 @@ occName :: name -> OccName occNameFS :: OccName -> FastString-mkRecFldSelOcc :: FastString -> OccName mkVarOccFS :: FastString -> OccName
GHC/Types/Name/Ppr.hs view
@@ -23,6 +23,7 @@ import GHC.Utils.Misc import GHC.Builtin.Types.Prim ( fUNTyConName ) import GHC.Builtin.Types+import Data.Maybe (isJust) {-@@ -67,7 +68,7 @@ -- | Creates some functions that work out the best ways to format -- names for the user according to a set of heuristics.-mkNamePprCtx :: PromotionTickContext -> UnitEnv -> GlobalRdrEnv -> NamePprCtx+mkNamePprCtx :: Outputable info => PromotionTickContext -> UnitEnv -> GlobalRdrEnvX info -> NamePprCtx mkNamePprCtx ptc unit_env env = QueryQualify (mkQualName env)@@ -78,7 +79,7 @@ unit_state = ue_units unit_env home_unit = ue_homeUnit unit_env -mkQualName :: GlobalRdrEnv -> QueryQualifyName+mkQualName :: Outputable info => GlobalRdrEnvX info -> QueryQualifyName mkQualName env = qual_name where qual_name mod occ | [gre] <- unqual_gres@@ -96,7 +97,8 @@ = NameQual (greQualModName gre) | null qual_gres- = if null (lookupGRE_RdrName (mkRdrQual (moduleName mod) occ) env)+ = if null $ lookupGRE env $+ LookupRdrName (mkRdrQual (moduleName mod) occ) SameNameSpace then NameNotInScope1 else NameNotInScope2 @@ -120,18 +122,20 @@ , tYPETyConName , fUNTyConName, unrestrictedFunTyConName , oneDataConName+ , listTyConName , manyDataConName ]+ || isJust (isTupleTyOcc_maybe mod occ) right_name gre = greDefinitionModule gre == Just mod - unqual_gres = lookupGRE_RdrName (mkRdrUnqual occ) env- qual_gres = filter right_name (lookupGlobalRdrEnv env occ)+ unqual_gres = lookupGRE env (LookupRdrName (mkRdrUnqual occ) SameNameSpace)+ qual_gres = filter right_name (lookupGRE env (LookupOccName occ SameNameSpace)) -- we can mention a module P:M without the P: qualifier iff -- "import M" would resolve unambiguously to P:M. (if P is the -- current package we can just assume it is unqualified). -mkPromTick :: PromotionTickContext -> GlobalRdrEnv -> QueryPromotionTick+mkPromTick :: PromotionTickContext -> GlobalRdrEnvX info -> QueryPromotionTick mkPromTick ptc env | ptcPrintRedundantPromTicks ptc = alwaysPrintPromTick | otherwise = print_prom_tick@@ -147,7 +151,7 @@ = ptcListTuplePuns ptc | Just occ' <- promoteOccName occ- , [] <- lookupGRE_RdrName (mkRdrUnqual occ') env+ , [] <- lookupGRE env (LookupRdrName (mkRdrUnqual occ') SameNameSpace) = -- Could not find a corresponding type name in the environment, -- so the data name is unambiguous. Promotion tick not needed. False
GHC/Types/Name/Reader.hs view
@@ -5,1351 +5,2038 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-}---- |--- #name_types#--- GHC uses several kinds of name internally:------ * 'GHC.Types.Name.Occurrence.OccName': see "GHC.Types.Name.Occurrence#name_types"------ * 'GHC.Types.Name.Reader.RdrName' is the type of names that come directly from the parser. They--- have not yet had their scoping and binding resolved by the renamer and can be--- thought of to a first approximation as an 'GHC.Types.Name.Occurrence.OccName' with an optional module--- qualifier------ * 'GHC.Types.Name.Name': see "GHC.Types.Name#name_types"------ * 'GHC.Types.Id.Id': see "GHC.Types.Id#name_types"------ * 'GHC.Types.Var.Var': see "GHC.Types.Var#name_types"--module GHC.Types.Name.Reader (- -- * The main type- RdrName(..), -- Constructors exported only to GHC.Iface.Binary-- -- ** Construction- mkRdrUnqual, mkRdrQual,- mkUnqual, mkVarUnqual, mkQual, mkOrig,- nameRdrName, getRdrName,-- -- ** Destruction- rdrNameOcc, rdrNameSpace, demoteRdrName, promoteRdrName,- isRdrDataCon, isRdrTyVar, isRdrTc, isQual, isQual_maybe, isUnqual,- isOrig, isOrig_maybe, isExact, isExact_maybe, isSrcRdrName,-- -- * Local mapping of 'RdrName' to 'Name.Name'- LocalRdrEnv, emptyLocalRdrEnv, extendLocalRdrEnv, extendLocalRdrEnvList,- lookupLocalRdrEnv, lookupLocalRdrOcc,- elemLocalRdrEnv, inLocalRdrEnvScope,- localRdrEnvElts, minusLocalRdrEnv,-- -- * Global mapping of 'RdrName' to 'GlobalRdrElt's- GlobalRdrEnv, emptyGlobalRdrEnv, mkGlobalRdrEnv, plusGlobalRdrEnv,- lookupGlobalRdrEnv, extendGlobalRdrEnv, greOccName, shadowNames,- pprGlobalRdrEnv, globalRdrEnvElts,- lookupGRE_RdrName, lookupGRE_RdrName', lookupGRE_Name,- lookupGRE_GreName, lookupGRE_FieldLabel,- lookupGRE_Name_OccName,- getGRE_NameQualifier_maybes,- transformGREs, pickGREs, pickGREsModExp,-- -- * GlobalRdrElts- gresFromAvails, gresFromAvail, localGREsFromAvail, availFromGRE,- greRdrNames, greSrcSpan, greQualModName,- gresToAvailInfo,- greDefinitionModule, greDefinitionSrcSpan,- greMangledName, grePrintableName,- greFieldLabel,-- -- ** Global 'RdrName' mapping elements: 'GlobalRdrElt', 'Provenance', 'ImportSpec'- GlobalRdrElt(..), isLocalGRE, isRecFldGRE,- isDuplicateRecFldGRE, isNoFieldSelectorGRE, isFieldSelectorGRE,- unQualOK, qualSpecOK, unQualSpecOK,- pprNameProvenance,- GreName(..), greNameSrcSpan,- Parent(..), greParent_maybe,- ImportSpec(..), ImpDeclSpec(..), ImpItemSpec(..),- importSpecLoc, importSpecModule, isExplicitItem, bestImport,-- -- * Utils- opIsAt- ) where--import GHC.Prelude--import GHC.Unit.Module-import GHC.Types.Name-import GHC.Types.Avail-import GHC.Types.Name.Set-import GHC.Data.Maybe-import GHC.Types.SrcLoc as SrcLoc-import GHC.Data.FastString-import GHC.Types.FieldLabel-import GHC.Utils.Outputable-import GHC.Types.Unique-import GHC.Types.Unique.FM-import GHC.Types.Unique.Set-import GHC.Utils.Misc as Utils-import GHC.Utils.Panic-import GHC.Types.Name.Env--import Language.Haskell.Syntax.Basic (FieldLabelString(..))--import Data.Data-import Data.List( sortBy )-import qualified Data.Semigroup as S-import Control.DeepSeq-import GHC.Data.Bag--{--************************************************************************-* *-\subsection{The main data type}-* *-************************************************************************--}---- | Reader Name------ Do not use the data constructors of RdrName directly: prefer the family--- of functions that creates them, such as 'mkRdrUnqual'------ - Note: A Located RdrName will only have API Annotations if it is a--- compound one,--- e.g.------ > `bar`--- > ( ~ )------ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnType',--- 'GHC.Parser.Annotation.AnnOpen' @'('@ or @'['@ or @'[:'@,--- 'GHC.Parser.Annotation.AnnClose' @')'@ or @']'@ or @':]'@,,--- 'GHC.Parser.Annotation.AnnBackquote' @'`'@,--- 'GHC.Parser.Annotation.AnnVal'--- 'GHC.Parser.Annotation.AnnTilde',---- For details on above see Note [exact print annotations] in "GHC.Parser.Annotation"-data RdrName- = Unqual OccName- -- ^ Unqualified name- --- -- Used for ordinary, unqualified occurrences, e.g. @x@, @y@ or @Foo@.- -- Create such a 'RdrName' with 'mkRdrUnqual'-- | Qual ModuleName OccName- -- ^ Qualified name- --- -- A qualified name written by the user in- -- /source/ code. The module isn't necessarily- -- the module where the thing is defined;- -- just the one from which it is imported.- -- Examples are @Bar.x@, @Bar.y@ or @Bar.Foo@.- -- Create such a 'RdrName' with 'mkRdrQual'-- | Orig Module OccName- -- ^ Original name- --- -- An original name; the module is the /defining/ module.- -- This is used when GHC generates code that will be fed- -- into the renamer (e.g. from deriving clauses), but where- -- we want to say \"Use Prelude.map dammit\". One of these- -- can be created with 'mkOrig'-- | Exact Name- -- ^ Exact name- --- -- We know exactly the 'Name'. This is used:- --- -- (1) When the parser parses built-in syntax like @[]@- -- and @(,)@, but wants a 'RdrName' from it- --- -- (2) By Template Haskell, when TH has generated a unique name- --- -- Such a 'RdrName' can be created by using 'getRdrName' on a 'Name'- deriving Data--{--************************************************************************-* *-\subsection{Simple functions}-* *-************************************************************************--}--instance HasOccName RdrName where- occName = rdrNameOcc--rdrNameOcc :: RdrName -> OccName-rdrNameOcc (Qual _ occ) = occ-rdrNameOcc (Unqual occ) = occ-rdrNameOcc (Orig _ occ) = occ-rdrNameOcc (Exact name) = nameOccName name--rdrNameSpace :: RdrName -> NameSpace-rdrNameSpace = occNameSpace . rdrNameOcc---- demoteRdrName lowers the NameSpace of RdrName.--- See Note [Demotion] in GHC.Rename.Env-demoteRdrName :: RdrName -> Maybe RdrName-demoteRdrName (Unqual occ) = fmap Unqual (demoteOccName occ)-demoteRdrName (Qual m occ) = fmap (Qual m) (demoteOccName occ)-demoteRdrName (Orig _ _) = Nothing-demoteRdrName (Exact _) = Nothing---- promoteRdrName promotes the NameSpace of RdrName.--- See Note [Promotion] in GHC.Rename.Env.-promoteRdrName :: RdrName -> Maybe RdrName-promoteRdrName (Unqual occ) = fmap Unqual (promoteOccName occ)-promoteRdrName (Qual m occ) = fmap (Qual m) (promoteOccName occ)-promoteRdrName (Orig _ _) = Nothing-promoteRdrName (Exact _) = Nothing-- -- These two are the basic constructors-mkRdrUnqual :: OccName -> RdrName-mkRdrUnqual occ = Unqual occ--mkRdrQual :: ModuleName -> OccName -> RdrName-mkRdrQual mod occ = Qual mod occ--mkOrig :: Module -> OccName -> RdrName-mkOrig mod occ = Orig mod occ------------------ -- These two are used when parsing source files- -- They do encode the module and occurrence names-mkUnqual :: NameSpace -> FastString -> RdrName-mkUnqual sp n = Unqual (mkOccNameFS sp n)--mkVarUnqual :: FastString -> RdrName-mkVarUnqual n = Unqual (mkVarOccFS n)---- | Make a qualified 'RdrName' in the given namespace and where the 'ModuleName' and--- the 'OccName' are taken from the first and second elements of the tuple respectively-mkQual :: NameSpace -> (FastString, FastString) -> RdrName-mkQual sp (m, n) = Qual (mkModuleNameFS m) (mkOccNameFS sp n)--getRdrName :: NamedThing thing => thing -> RdrName-getRdrName name = nameRdrName (getName name)--nameRdrName :: Name -> RdrName-nameRdrName name = Exact name--- Keep the Name even for Internal names, so that the--- unique is still there for debug printing, particularly--- of Types (which are converted to IfaceTypes before printing)--nukeExact :: Name -> RdrName-nukeExact n- | isExternalName n = Orig (nameModule n) (nameOccName n)- | otherwise = Unqual (nameOccName n)--isRdrDataCon :: RdrName -> Bool-isRdrTyVar :: RdrName -> Bool-isRdrTc :: RdrName -> Bool--isRdrDataCon rn = isDataOcc (rdrNameOcc rn)-isRdrTyVar rn = isTvOcc (rdrNameOcc rn)-isRdrTc rn = isTcOcc (rdrNameOcc rn)--isSrcRdrName :: RdrName -> Bool-isSrcRdrName (Unqual _) = True-isSrcRdrName (Qual _ _) = True-isSrcRdrName _ = False--isUnqual :: RdrName -> Bool-isUnqual (Unqual _) = True-isUnqual _ = False--isQual :: RdrName -> Bool-isQual (Qual _ _) = True-isQual _ = False--isQual_maybe :: RdrName -> Maybe (ModuleName, OccName)-isQual_maybe (Qual m n) = Just (m,n)-isQual_maybe _ = Nothing--isOrig :: RdrName -> Bool-isOrig (Orig _ _) = True-isOrig _ = False--isOrig_maybe :: RdrName -> Maybe (Module, OccName)-isOrig_maybe (Orig m n) = Just (m,n)-isOrig_maybe _ = Nothing--isExact :: RdrName -> Bool-isExact (Exact _) = True-isExact _ = False--isExact_maybe :: RdrName -> Maybe Name-isExact_maybe (Exact n) = Just n-isExact_maybe _ = Nothing--{--************************************************************************-* *-\subsection{Instances}-* *-************************************************************************--}--instance Outputable RdrName where- ppr (Exact name) = ppr name- ppr (Unqual occ) = ppr occ- ppr (Qual mod occ) = ppr mod <> dot <> ppr occ- ppr (Orig mod occ) = getPprStyle (\sty -> pprModulePrefix sty mod occ <> ppr occ)--instance OutputableBndr RdrName where- pprBndr _ n- | isTvOcc (rdrNameOcc n) = char '@' <> ppr n- | otherwise = ppr n-- pprInfixOcc rdr = pprInfixVar (isSymOcc (rdrNameOcc rdr)) (ppr rdr)- pprPrefixOcc rdr- | Just name <- isExact_maybe rdr = pprPrefixName name- -- pprPrefixName has some special cases, so- -- we delegate to them rather than reproduce them- | otherwise = pprPrefixVar (isSymOcc (rdrNameOcc rdr)) (ppr rdr)--instance Eq RdrName where- (Exact n1) == (Exact n2) = n1==n2- -- Convert exact to orig- (Exact n1) == r2@(Orig _ _) = nukeExact n1 == r2- r1@(Orig _ _) == (Exact n2) = r1 == nukeExact n2-- (Orig m1 o1) == (Orig m2 o2) = m1==m2 && o1==o2- (Qual m1 o1) == (Qual m2 o2) = m1==m2 && o1==o2- (Unqual o1) == (Unqual o2) = o1==o2- _ == _ = False--instance Ord RdrName where- a <= b = case (a `compare` b) of { LT -> True; EQ -> True; GT -> False }- a < b = case (a `compare` b) of { LT -> True; EQ -> False; GT -> False }- a >= b = case (a `compare` b) of { LT -> False; EQ -> True; GT -> True }- a > b = case (a `compare` b) of { LT -> False; EQ -> False; GT -> True }-- -- Exact < Unqual < Qual < Orig- -- [Note: Apr 2004] We used to use nukeExact to convert Exact to Orig- -- before comparing so that Prelude.map == the exact Prelude.map, but- -- that meant that we reported duplicates when renaming bindings- -- generated by Template Haskell; e.g- -- do { n1 <- newName "foo"; n2 <- newName "foo";- -- <decl involving n1,n2> }- -- I think we can do without this conversion- compare (Exact n1) (Exact n2) = n1 `compare` n2- compare (Exact _) _ = LT-- compare (Unqual _) (Exact _) = GT- compare (Unqual o1) (Unqual o2) = o1 `compare` o2- compare (Unqual _) _ = LT-- compare (Qual _ _) (Exact _) = GT- compare (Qual _ _) (Unqual _) = GT- compare (Qual m1 o1) (Qual m2 o2) = compare o1 o2 S.<> compare m1 m2- compare (Qual _ _) (Orig _ _) = LT-- compare (Orig m1 o1) (Orig m2 o2) = compare o1 o2 S.<> compare m1 m2- compare (Orig _ _) _ = GT--{--************************************************************************-* *- LocalRdrEnv-* *-************************************************************************--}--{- Note [LocalRdrEnv]-~~~~~~~~~~~~~~~~~~~~~-The LocalRdrEnv is used to store local bindings (let, where, lambda, case).--* It is keyed by OccName, because we never use it for qualified names.--* It maps the OccName to a Name. That Name is almost always an- Internal Name, but (hackily) it can be External too for top-level- pattern bindings. See Note [bindLocalNames for an External name]- in GHC.Rename.Pat--* We keep the current mapping (lre_env), *and* the set of all Names in- scope (lre_in_scope). Reason: see Note [Splicing Exact names] in- GHC.Rename.Env.--}---- | Local Reader Environment--- See Note [LocalRdrEnv]-data LocalRdrEnv = LRE { lre_env :: OccEnv Name- , lre_in_scope :: NameSet }--instance Outputable LocalRdrEnv where- ppr (LRE {lre_env = env, lre_in_scope = ns})- = hang (text "LocalRdrEnv {")- 2 (vcat [ text "env =" <+> pprOccEnv ppr_elt env- , text "in_scope ="- <+> pprUFM (getUniqSet ns) (braces . pprWithCommas ppr)- ] <+> char '}')- where- ppr_elt name = parens (ppr (getUnique (nameOccName name))) <+> ppr name- -- So we can see if the keys line up correctly--emptyLocalRdrEnv :: LocalRdrEnv-emptyLocalRdrEnv = LRE { lre_env = emptyOccEnv- , lre_in_scope = emptyNameSet }--extendLocalRdrEnv :: LocalRdrEnv -> Name -> LocalRdrEnv--- See Note [LocalRdrEnv]-extendLocalRdrEnv lre@(LRE { lre_env = env, lre_in_scope = ns }) name- = lre { lre_env = extendOccEnv env (nameOccName name) name- , lre_in_scope = extendNameSet ns name }--extendLocalRdrEnvList :: LocalRdrEnv -> [Name] -> LocalRdrEnv--- See Note [LocalRdrEnv]-extendLocalRdrEnvList lre@(LRE { lre_env = env, lre_in_scope = ns }) names- = lre { lre_env = extendOccEnvList env [(nameOccName n, n) | n <- names]- , lre_in_scope = extendNameSetList ns names }--lookupLocalRdrEnv :: LocalRdrEnv -> RdrName -> Maybe Name-lookupLocalRdrEnv (LRE { lre_env = env, lre_in_scope = ns }) rdr- | Unqual occ <- rdr- = lookupOccEnv env occ-- -- See Note [Local bindings with Exact Names]- | Exact name <- rdr- , name `elemNameSet` ns- = Just name-- | otherwise- = Nothing--lookupLocalRdrOcc :: LocalRdrEnv -> OccName -> Maybe Name-lookupLocalRdrOcc (LRE { lre_env = env }) occ = lookupOccEnv env occ--elemLocalRdrEnv :: RdrName -> LocalRdrEnv -> Bool-elemLocalRdrEnv rdr_name (LRE { lre_env = env, lre_in_scope = ns })- = case rdr_name of- Unqual occ -> occ `elemOccEnv` env- Exact name -> name `elemNameSet` ns -- See Note [Local bindings with Exact Names]- Qual {} -> False- Orig {} -> False--localRdrEnvElts :: LocalRdrEnv -> [Name]-localRdrEnvElts (LRE { lre_env = env }) = nonDetOccEnvElts env--inLocalRdrEnvScope :: Name -> LocalRdrEnv -> Bool--- This is the point of the NameSet-inLocalRdrEnvScope name (LRE { lre_in_scope = ns }) = name `elemNameSet` ns--minusLocalRdrEnv :: LocalRdrEnv -> OccEnv a -> LocalRdrEnv-minusLocalRdrEnv lre@(LRE { lre_env = env }) occs- = lre { lre_env = minusOccEnv env occs }--{--Note [Local bindings with Exact Names]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-With Template Haskell we can make local bindings that have Exact Names.-Computing shadowing etc may use elemLocalRdrEnv (at least it certainly-does so in GHC.Rename.HsType.bindHsQTyVars), so for an Exact Name we must consult-the in-scope-name-set.---************************************************************************-* *- GlobalRdrEnv-* *-************************************************************************--}---- | Global Reader Environment-type GlobalRdrEnv = OccEnv [GlobalRdrElt]--- ^ Keyed by 'OccName'; when looking up a qualified name--- we look up the 'OccName' part, and then check the 'Provenance'--- to see if the appropriate qualification is valid. This--- saves routinely doubling the size of the env by adding both--- qualified and unqualified names to the domain.------ The list in the codomain is required because there may be name clashes--- These only get reported on lookup, not on construction------ INVARIANT 1: All the members of the list have distinct--- 'gre_name' fields; that is, no duplicate Names------ INVARIANT 2: Imported provenance => Name is an ExternalName--- However LocalDefs can have an InternalName. This--- happens only when type-checking a [d| ... |] Template--- Haskell quotation; see this note in GHC.Rename.Names--- Note [Top-level Names in Template Haskell decl quotes]------ INVARIANT 3: If the GlobalRdrEnv maps [occ -> gre], then--- greOccName gre = occ------ NB: greOccName gre is usually the same as--- nameOccName (greMangledName gre), but not always in the--- case of record selectors; see Note [GreNames]---- | Global Reader Element------ An element of the 'GlobalRdrEnv'-data GlobalRdrElt- = GRE { gre_name :: !GreName -- ^ See Note [GreNames]- , gre_par :: !Parent -- ^ See Note [Parents]- , gre_lcl :: !Bool -- ^ True <=> the thing was defined locally- , gre_imp :: !(Bag ImportSpec) -- ^ In scope through these imports- } deriving (Data)- -- INVARIANT: either gre_lcl = True or gre_imp is non-empty- -- See Note [GlobalRdrElt provenance]--instance NFData GlobalRdrElt where- rnf (GRE name par _ imp) = rnf name `seq` rnf par `seq` rnf imp----- | See Note [Parents]-data Parent = NoParent- | ParentIs { par_is :: !Name }- deriving (Eq, Data)--instance Outputable Parent where- ppr NoParent = empty- ppr (ParentIs n) = text "parent:" <> ppr n--instance NFData Parent where- rnf NoParent = ()- rnf (ParentIs n) = rnf n--plusParent :: Parent -> Parent -> Parent--- See Note [Combining parents]-plusParent p1@(ParentIs _) p2 = hasParent p1 p2-plusParent p1 p2@(ParentIs _) = hasParent p2 p1-plusParent NoParent NoParent = NoParent--hasParent :: Parent -> Parent -> Parent-#if defined(DEBUG)-hasParent p NoParent = p-hasParent p p'- | p /= p' = pprPanic "hasParent" (ppr p <+> ppr p') -- Parents should agree-#endif-hasParent p _ = p---{- Note [GlobalRdrElt provenance]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The gre_lcl and gre_imp fields of a GlobalRdrElt describe its "provenance",-i.e. how the Name came to be in scope. It can be in scope two ways:- - gre_lcl = True: it is bound in this module- - gre_imp: a list of all the imports that brought it into scope--It's an INVARIANT that you have one or the other; that is, either-gre_lcl is True, or gre_imp is non-empty.--It is just possible to have *both* if there is a module loop: a Name-is defined locally in A, and also brought into scope by importing a-module that SOURCE-imported A. Example (#7672):-- A.hs-boot module A where- data T-- B.hs module B(Decl.T) where- import {-# SOURCE #-} qualified A as Decl-- A.hs module A where- import qualified B- data T = Z | S B.T--In A.hs, 'T' is locally bound, *and* imported as B.T.---Note [Parents]-~~~~~~~~~~~~~~~~~-The children of a Name are the things that are abbreviated by the ".." notation-in export lists.--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- Parent Children-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- data T Data constructors- Record-field ids-- data family T Data constructors and record-field ids- of all visible data instances of T-- class C Class operations- Associated type constructors--~~~~~~~~~~~~~~~~~~~~~~~~~~~~- Constructor Meaning-~~~~~~~~~~~~~~~~~~~~~~~~~~~~- NoParent Not bundled with a type constructor.- ParentIs n Bundled with the type constructor corresponding to n.--Pattern synonym constructors (and their record fields, if any) are unusual:-their gre_par is NoParent in the module in which they are defined. However, a-pattern synonym can be bundled with a type constructor on export, in which case-whenever the pattern synonym is imported the gre_par will be ParentIs.--Thus the gre_name and gre_par fields are independent, because a normal datatype-introduces FieldGreNames using ParentIs, but a record pattern synonym can-introduce FieldGreNames that use NoParent. (In the past we represented fields-using an additional constructor of the Parent type, which could not adequately-represent this situation.) See also-Note [Representing pattern synonym fields in AvailInfo] in GHC.Types.Avail.---Note [GreNames]-~~~~~~~~~~~~~~~-A `GlobalRdrElt` has a field `gre_name :: GreName`, which uniquely-identifies what the `GlobalRdrElt` describes. There are two sorts of-`GreName` (see the data type decl):--* NormalGreName Name: this is used for most entities; the Name- uniquely identifies it. It is stored in the GlobalRdrEnv under- the OccName of the Name.--* FieldGreName FieldLabel: is used only for field labels of a- record. With -XDuplicateRecordFields there may be many field- labels `x` in scope; e.g.- data T1 = MkT1 { x :: Int }- data T2 = MkT2 { x :: Bool }- Each has a different GlobalRdrElt with a distinct GreName.- The two fields are uniquely identified by their record selectors,- which are stored in the FieldLabel, and have mangled names like- `$sel:x:MkT1`. See Note [FieldLabel] in GHC.Types.FieldLabel.-- These GREs are stored in the GlobalRdrEnv under the OccName of the- field (i.e. "x" in both cases above), /not/ the OccName of the mangled- record selector function.--A GreName, and hence a GRE, has both a "printable" and a "mangled" Name. These-are identical for normal names, but for record fields compiled with--XDuplicateRecordFields they will differ. So we have two pairs of functions:-- * greNameMangledName :: GreName -> Name- greMangledName :: GlobalRdrElt -> Name- The "mangled" Name is the actual Name of the selector function,- e.g. $sel:x:MkT1. This should not be displayed to the user, but is used to- uniquely identify the field in the renamer, and later in the backend.-- * greNamePrintableName :: GreName -> Name- grePrintableName :: GlobalRdrElt -> Name- The "printable" Name is the "manged" Name with its OccName replaced with that- of the field label. This is how the field should be output to the user.--Since the right Name to use is context-dependent, we do not define a NamedThing-instance for GREName (or GlobalRdrElt), but instead make the choice explicit.---Note [Combining parents]-~~~~~~~~~~~~~~~~~~~~~~~~-With an associated type we might have- module M where- class C a where- data T a- op :: T a -> a- instance C Int where- data T Int = TInt- instance C Bool where- data T Bool = TBool--Then: C is the parent of T- T is the parent of TInt and TBool-So: in an export list- C(..) is short for C( op, T )- T(..) is short for T( TInt, TBool )--Module M exports everything, so its exports will be- AvailTC C [C,T,op]- AvailTC T [T,TInt,TBool]-On import we convert to GlobalRdrElt and then combine-those. For T that will mean we have- one GRE with Parent C- one GRE with NoParent-That's why plusParent picks the "best" case.--}---- | make a 'GlobalRdrEnv' where all the elements point to the same--- Provenance (useful for "hiding" imports, or imports with no details).-gresFromAvails :: Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt]--- prov = Nothing => locally bound--- Just spec => imported as described by spec-gresFromAvails prov avails- = concatMap (gresFromAvail (const prov)) avails--localGREsFromAvail :: AvailInfo -> [GlobalRdrElt]--- Turn an Avail into a list of LocalDef GlobalRdrElts-localGREsFromAvail = gresFromAvail (const Nothing)--gresFromAvail :: (Name -> Maybe ImportSpec) -> AvailInfo -> [GlobalRdrElt]-gresFromAvail prov_fn avail- = map mk_gre (availNonFldNames avail) ++ map mk_fld_gre (availFlds avail)- where- mk_gre n- = case prov_fn n of -- Nothing => bound locally- -- Just is => imported from 'is'- Nothing -> GRE { gre_name = NormalGreName n, gre_par = mkParent n avail- , gre_lcl = True, gre_imp = emptyBag }- Just is -> GRE { gre_name = NormalGreName n, gre_par = mkParent n avail- , gre_lcl = False, gre_imp = unitBag is }-- mk_fld_gre fl- = case prov_fn (flSelector fl) of -- Nothing => bound locally- -- Just is => imported from 'is'- Nothing -> GRE { gre_name = FieldGreName fl, gre_par = availParent avail- , gre_lcl = True, gre_imp = emptyBag }- Just is -> GRE { gre_name = FieldGreName fl, gre_par = availParent avail- , gre_lcl = False, gre_imp = unitBag is }--instance HasOccName GlobalRdrElt where- occName = greOccName---- | See Note [GreNames]-greOccName :: GlobalRdrElt -> OccName-greOccName = occName . gre_name---- | A 'Name' for the GRE for internal use. Careful: the 'OccName' of this--- 'Name' is not necessarily the same as the 'greOccName' (see Note [GreNames]).-greMangledName :: GlobalRdrElt -> Name-greMangledName = greNameMangledName . gre_name---- | A 'Name' for the GRE suitable for output to the user. Its 'OccName' will--- be the 'greOccName' (see Note [GreNames]).-grePrintableName :: GlobalRdrElt -> Name-grePrintableName = greNamePrintableName . gre_name---- | The SrcSpan of the name pointed to by the GRE.-greDefinitionSrcSpan :: GlobalRdrElt -> SrcSpan-greDefinitionSrcSpan = nameSrcSpan . greMangledName---- | The module in which the name pointed to by the GRE is defined.-greDefinitionModule :: GlobalRdrElt -> Maybe Module-greDefinitionModule = nameModule_maybe . greMangledName--greQualModName :: GlobalRdrElt -> ModuleName--- Get a suitable module qualifier for the GRE--- (used in mkPrintUnqualified)--- Precondition: the greMangledName is always External-greQualModName gre@(GRE { gre_lcl = lcl, gre_imp = iss })- | lcl, Just mod <- greDefinitionModule gre = moduleName mod- | Just is <- headMaybe iss = is_as (is_decl is)- | otherwise = pprPanic "greQualModName" (ppr gre)--greRdrNames :: GlobalRdrElt -> [RdrName]-greRdrNames gre@GRE{ gre_lcl = lcl, gre_imp = iss }- = bagToList $ (if lcl then unitBag unqual else emptyBag) `unionBags` concatMapBag do_spec (mapBag is_decl iss)- where- occ = greOccName gre- unqual = Unqual occ- do_spec decl_spec- | is_qual decl_spec = unitBag qual- | otherwise = listToBag [unqual,qual]- where qual = Qual (is_as decl_spec) occ---- the SrcSpan that pprNameProvenance prints out depends on whether--- the Name is defined locally or not: for a local definition the--- definition site is used, otherwise the location of the import--- declaration. We want to sort the export locations in--- exportClashErr by this SrcSpan, we need to extract it:-greSrcSpan :: GlobalRdrElt -> SrcSpan-greSrcSpan gre@(GRE { gre_lcl = lcl, gre_imp = iss } )- | lcl = greDefinitionSrcSpan gre- | Just is <- headMaybe iss = is_dloc (is_decl is)- | otherwise = pprPanic "greSrcSpan" (ppr gre)--mkParent :: Name -> AvailInfo -> Parent-mkParent _ (Avail _) = NoParent-mkParent n (AvailTC m _) | n == m = NoParent- | otherwise = ParentIs m--availParent :: AvailInfo -> Parent-availParent (AvailTC m _) = ParentIs m-availParent (Avail {}) = NoParent---greParent_maybe :: GlobalRdrElt -> Maybe Name-greParent_maybe gre = case gre_par gre of- NoParent -> Nothing- ParentIs n -> Just n---- | Takes a list of distinct GREs and folds them--- into AvailInfos. This is more efficient than mapping each individual--- GRE to an AvailInfo and the folding using `plusAvail` but needs the--- uniqueness assumption.-gresToAvailInfo :: [GlobalRdrElt] -> [AvailInfo]-gresToAvailInfo gres- = nonDetNameEnvElts avail_env- where- avail_env :: NameEnv AvailInfo -- Keyed by the parent- (avail_env, _) = foldl' add (emptyNameEnv, emptyNameSet) gres-- add :: (NameEnv AvailInfo, NameSet)- -> GlobalRdrElt- -> (NameEnv AvailInfo, NameSet)- add (env, done) gre- | name `elemNameSet` done- = (env, done) -- Don't insert twice into the AvailInfo- | otherwise- = ( extendNameEnv_Acc comb availFromGRE env key gre- , done `extendNameSet` name )- where- name = greMangledName gre- key = case greParent_maybe gre of- Just parent -> parent- Nothing -> greMangledName gre-- -- We want to insert the child `k` into a list of children but- -- need to maintain the invariant that the parent is first.- --- -- We also use the invariant that `k` is not already in `ns`.- insertChildIntoChildren :: Name -> [GreName] -> GreName -> [GreName]- insertChildIntoChildren _ [] k = [k]- insertChildIntoChildren p (n:ns) k- | NormalGreName p == k = k:n:ns- | otherwise = n:k:ns-- comb :: GlobalRdrElt -> AvailInfo -> AvailInfo- comb _ (Avail n) = Avail n -- Duplicated name, should not happen- comb gre (AvailTC m ns)- = case gre_par gre of- NoParent -> AvailTC m (gre_name gre:ns) -- Not sure this ever happens- ParentIs {} -> AvailTC m (insertChildIntoChildren m ns (gre_name gre))--availFromGRE :: GlobalRdrElt -> AvailInfo-availFromGRE (GRE { gre_name = child, gre_par = parent })- = case parent of- ParentIs p -> AvailTC p [child]- NoParent | NormalGreName me <- child, isTyConName me -> AvailTC me [child]- | otherwise -> Avail child--emptyGlobalRdrEnv :: GlobalRdrEnv-emptyGlobalRdrEnv = emptyOccEnv--globalRdrEnvElts :: GlobalRdrEnv -> [GlobalRdrElt]-globalRdrEnvElts env = foldOccEnv (++) [] env--instance Outputable GlobalRdrElt where- ppr gre = hang (ppr (greMangledName gre) <+> ppr (gre_par gre))- 2 (pprNameProvenance gre)--pprGlobalRdrEnv :: Bool -> GlobalRdrEnv -> SDoc-pprGlobalRdrEnv locals_only env- = vcat [ text "GlobalRdrEnv" <+> ppWhen locals_only (text "(locals only)")- <+> lbrace- , nest 2 (vcat [ pp (remove_locals gre_list) | gre_list <- nonDetOccEnvElts env ]- <+> rbrace) ]- where- remove_locals gres | locals_only = filter isLocalGRE gres- | otherwise = gres- pp [] = empty- pp gres@(gre:_) = hang (ppr occ- <+> parens (text "unique" <+> ppr (getUnique occ))- <> colon)- 2 (vcat (map ppr gres))- where- occ = nameOccName (greMangledName gre)--lookupGlobalRdrEnv :: GlobalRdrEnv -> OccName -> [GlobalRdrElt]-lookupGlobalRdrEnv env occ_name = case lookupOccEnv env occ_name of- Nothing -> []- Just gres -> gres--lookupGRE_RdrName :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt]--- ^ Look for this 'RdrName' in the global environment. Omits record fields--- without selector functions (see Note [NoFieldSelectors] in GHC.Rename.Env).-lookupGRE_RdrName rdr_name env =- filter (not . isNoFieldSelectorGRE) (lookupGRE_RdrName' rdr_name env)--lookupGRE_RdrName' :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt]--- ^ Look for this 'RdrName' in the global environment. Includes record fields--- without selector functions (see Note [NoFieldSelectors] in GHC.Rename.Env).-lookupGRE_RdrName' rdr_name env- = case lookupOccEnv env (rdrNameOcc rdr_name) of- Nothing -> []- Just gres -> pickGREs rdr_name gres--lookupGRE_Name :: GlobalRdrEnv -> Name -> Maybe GlobalRdrElt--- ^ Look for precisely this 'Name' in the environment. This tests--- whether it is in scope, ignoring anything else that might be in--- scope with the same 'OccName'.-lookupGRE_Name env name- = lookupGRE_Name_OccName env name (nameOccName name)--lookupGRE_GreName :: GlobalRdrEnv -> GreName -> Maybe GlobalRdrElt--- ^ Look for precisely this 'GreName' in the environment. This tests--- whether it is in scope, ignoring anything else that might be in--- scope with the same 'OccName'.-lookupGRE_GreName env gname- = lookupGRE_Name_OccName env (greNameMangledName gname) (occName gname)--lookupGRE_FieldLabel :: GlobalRdrEnv -> FieldLabel -> Maybe GlobalRdrElt--- ^ Look for a particular record field selector in the environment, where the--- selector name and field label may be different: the GlobalRdrEnv is keyed on--- the label. See Note [GreNames] for why this happens.-lookupGRE_FieldLabel env fl- = lookupGRE_Name_OccName env (flSelector fl) (mkVarOccFS (field_label $ flLabel fl))--lookupGRE_Name_OccName :: GlobalRdrEnv -> Name -> OccName -> Maybe GlobalRdrElt--- ^ Look for precisely this 'Name' in the environment, but with an 'OccName'--- that might differ from that of the 'Name'. See 'lookupGRE_FieldLabel' and--- Note [GreNames].-lookupGRE_Name_OccName env name occ- = case [ gre | gre <- lookupGlobalRdrEnv env occ- , greMangledName gre == name ] of- [] -> Nothing- [gre] -> Just gre- gres -> pprPanic "lookupGRE_Name_OccName"- (ppr name $$ ppr occ $$ ppr gres)- -- See INVARIANT 1 on GlobalRdrEnv---getGRE_NameQualifier_maybes :: GlobalRdrEnv -> Name -> [Maybe [ModuleName]]--- Returns all the qualifiers by which 'x' is in scope--- Nothing means "the unqualified version is in scope"--- [] means the thing is not in scope at all-getGRE_NameQualifier_maybes env name- = case lookupGRE_Name env name of- Just gre -> [qualifier_maybe gre]- Nothing -> []- where- qualifier_maybe (GRE { gre_lcl = lcl, gre_imp = iss })- | lcl = Nothing- | otherwise = Just $ map (is_as . is_decl) (bagToList iss)--isLocalGRE :: GlobalRdrElt -> Bool-isLocalGRE (GRE {gre_lcl = lcl }) = lcl--isRecFldGRE :: GlobalRdrElt -> Bool-isRecFldGRE = isJust . greFieldLabel--isDuplicateRecFldGRE :: GlobalRdrElt -> Bool--- ^ Is this a record field defined with DuplicateRecordFields?--- (See Note [GreNames])-isDuplicateRecFldGRE =- maybe False ((DuplicateRecordFields ==) . flHasDuplicateRecordFields) . greFieldLabel--isNoFieldSelectorGRE :: GlobalRdrElt -> Bool--- ^ Is this a record field defined with NoFieldSelectors?--- (See Note [NoFieldSelectors] in GHC.Rename.Env)-isNoFieldSelectorGRE =- maybe False ((NoFieldSelectors ==) . flHasFieldSelector) . greFieldLabel--isFieldSelectorGRE :: GlobalRdrElt -> Bool--- ^ Is this a record field defined with FieldSelectors?--- (See Note [NoFieldSelectors] in GHC.Rename.Env)-isFieldSelectorGRE =- maybe False ((FieldSelectors ==) . flHasFieldSelector) . greFieldLabel--greFieldLabel :: GlobalRdrElt -> Maybe FieldLabel--- ^ Returns the field label of this GRE, if it has one-greFieldLabel = greNameFieldLabel . gre_name--unQualOK :: GlobalRdrElt -> Bool--- ^ Test if an unqualified version of this thing would be in scope-unQualOK (GRE {gre_lcl = lcl, gre_imp = iss })- | lcl = True- | otherwise = any unQualSpecOK iss--{- Note [GRE filtering]-~~~~~~~~~~~~~~~~~~~~~~~-(pickGREs rdr gres) takes a list of GREs which have the same OccName-as 'rdr', say "x". It does two things:--(a) filters the GREs to a subset that are in scope- * Qualified, as 'M.x' if want_qual is Qual M _- * Unqualified, as 'x' if want_unqual is Unqual _--(b) for that subset, filter the provenance field (gre_lcl and gre_imp)- to ones that brought it into scope qualified or unqualified resp.--Example:- module A ( f ) where- import qualified Foo( f )- import Baz( f )- f = undefined--Let's suppose that Foo.f and Baz.f are the same entity really, but the local-'f' is different, so there will be two GREs matching "f":- gre1: gre_lcl = True, gre_imp = []- gre2: gre_lcl = False, gre_imp = [ imported from Foo, imported from Bar ]--The use of "f" in the export list is ambiguous because it's in scope-from the local def and the import Baz(f); but *not* the import qualified Foo.-pickGREs returns two GRE- gre1: gre_lcl = True, gre_imp = []- gre2: gre_lcl = False, gre_imp = [ imported from Bar ]--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 in scope--- * Qualified, as 'M.x' if want_qual is Qual M _--- * Unqualified, as 'x' if want_unqual is Unqual _------ Return each such GRE, with its ImportSpecs filtered, to reflect--- how it is in scope qualified or unqualified respectively.--- See Note [GRE filtering]-pickGREs (Unqual {}) gres = mapMaybe pickUnqualGRE gres-pickGREs (Qual mod _) gres = mapMaybe (pickQualGRE mod) gres-pickGREs _ _ = [] -- I don't think this actually happens--pickUnqualGRE :: GlobalRdrElt -> Maybe GlobalRdrElt-pickUnqualGRE gre@(GRE { gre_lcl = lcl, gre_imp = iss })- | not lcl, null iss' = Nothing- | otherwise = Just (gre { gre_imp = iss' })- where- iss' = filterBag unQualSpecOK iss--pickQualGRE :: ModuleName -> GlobalRdrElt -> Maybe GlobalRdrElt-pickQualGRE mod gre@(GRE { gre_lcl = lcl, gre_imp = iss })- | not lcl', null iss' = Nothing- | otherwise = Just (gre { gre_lcl = lcl', gre_imp = iss' })- where- iss' = filterBag (qualSpecOK mod) iss- lcl' = lcl && name_is_from mod-- name_is_from :: ModuleName -> Bool- name_is_from mod = case greDefinitionModule gre of- Just n_mod -> moduleName n_mod == mod- Nothing -> False--pickGREsModExp :: ModuleName -> [GlobalRdrElt] -> [(GlobalRdrElt,GlobalRdrElt)]--- ^ Pick GREs that are in scope *both* qualified *and* unqualified--- Return each GRE that is, as a pair--- (qual_gre, unqual_gre)--- These two GREs are the original GRE with imports filtered to express how--- it is in scope qualified an unqualified respectively------ Used only for the 'module M' item in export list;--- see 'GHC.Tc.Gen.Export.exports_from_avail'-pickGREsModExp mod gres = mapMaybe (pickBothGRE mod) gres---- | isBuiltInSyntax filter out names for built-in syntax They--- just clutter up the environment (esp tuples), and the--- parser will generate Exact RdrNames for them, so the--- cluttered envt is no use. Really, it's only useful for--- GHC.Base and GHC.Tuple.-pickBothGRE :: ModuleName -> GlobalRdrElt -> Maybe (GlobalRdrElt, GlobalRdrElt)-pickBothGRE mod gre- | isBuiltInSyntax (greMangledName gre) = Nothing- | Just gre1 <- pickQualGRE mod gre- , Just gre2 <- pickUnqualGRE gre = Just (gre1, gre2)- | otherwise = Nothing---- Building GlobalRdrEnvs--plusGlobalRdrEnv :: GlobalRdrEnv -> GlobalRdrEnv -> GlobalRdrEnv-plusGlobalRdrEnv env1 env2 = plusOccEnv_C (foldr insertGRE) env1 env2--mkGlobalRdrEnv :: [GlobalRdrElt] -> GlobalRdrEnv-mkGlobalRdrEnv gres- = foldr add emptyGlobalRdrEnv gres- where- add gre env = extendOccEnv_Acc insertGRE Utils.singleton env- (greOccName gre)- gre--insertGRE :: GlobalRdrElt -> [GlobalRdrElt] -> [GlobalRdrElt]-insertGRE new_g [] = [new_g]-insertGRE new_g (old_g : old_gs)- | gre_name new_g == gre_name old_g- = new_g `plusGRE` old_g : old_gs- | otherwise- = old_g : insertGRE new_g old_gs--plusGRE :: GlobalRdrElt -> GlobalRdrElt -> GlobalRdrElt--- Used when the gre_name fields match-plusGRE g1 g2- = GRE { gre_name = gre_name g1- , gre_lcl = gre_lcl g1 || gre_lcl g2- , gre_imp = gre_imp g1 `unionBags` gre_imp g2- , gre_par = gre_par g1 `plusParent` gre_par g2 }--transformGREs :: (GlobalRdrElt -> GlobalRdrElt)- -> [OccName]- -> GlobalRdrEnv -> GlobalRdrEnv--- ^ Apply a transformation function to the GREs for these OccNames-transformGREs trans_gre occs rdr_env- = foldr trans rdr_env occs- where- trans occ env- = case lookupOccEnv env occ of- Just gres -> extendOccEnv env occ (map trans_gre gres)- Nothing -> env--extendGlobalRdrEnv :: GlobalRdrEnv -> GlobalRdrElt -> GlobalRdrEnv-extendGlobalRdrEnv env gre- = extendOccEnv_Acc insertGRE Utils.singleton env- (greOccName gre) gre--{- Note [GlobalRdrEnv shadowing]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Before adding new names to the GlobalRdrEnv we nuke some existing entries;-this is "shadowing". The actual work is done by RdrEnv.shadowNames.-Suppose- env' = shadowNames env f `extendGlobalRdrEnv` M.f--Then:- * Looking up (Unqual f) in env' should succeed, returning M.f,- even if env contains existing unqualified bindings for f.- They are shadowed-- * Looking up (Qual M.f) in env' should succeed, returning M.f-- * Looking up (Qual X.f) in env', where X /= M, should be the same as- looking up (Qual X.f) in env.-- That is, shadowNames does /not/ delete earlier qualified bindings--There are two reasons for shadowing:--* The GHCi REPL-- - Ids bought into scope on the command line (eg let x = True) have- External Names, like Ghci4.x. We want a new binding for 'x' (say)- to override the existing binding for 'x'. Example:-- ghci> :load M -- Brings `x` and `M.x` into scope- ghci> x- ghci> "Hello"- ghci> M.x- ghci> "hello"- ghci> let x = True -- Shadows `x`- ghci> x -- The locally bound `x`- -- NOT an ambiguous reference- ghci> True- ghci> M.x -- M.x is still in scope!- ghci> "Hello"-- So when we add `x = True` we must not delete the `M.x` from the- `GlobalRdrEnv`; rather we just want to make it "qualified only";- hence the `set_qual` in `shadowNames`. See also Note- [Interactively-bound Ids in GHCi] in GHC.Runtime.Context-- - 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- See Note [Top-level Names in Template Haskell decl quotes] in GHC.Rename.Names-- Consider a TH decl quote:- module M where- f x = h [d| f = ...f...M.f... |]- We must shadow the outer unqualified binding of 'f', else we'll get- a complaint when extending the GlobalRdrEnv, saying that there are- two bindings for 'f'. There are several tricky points:-- - This shadowing applies even if the binding for 'f' is in a- where-clause, and hence is in the *local* RdrEnv not the *global*- RdrEnv. This is done in lcl_env_TH in extendGlobalRdrEnvRn.-- - The External Name M.f from the enclosing module must certainly- still be available. So we don't nuke it entirely; we just make- it seem like qualified import.-- - We only shadow *External* names (which come from the main module),- or from earlier GHCi commands. Do not shadow *Internal* names- because in the bracket- [d| class C a where f :: a- f = 4 |]- rnSrcDecls will first call extendGlobalRdrEnvRn with C[f] from the- class decl, and *separately* extend the envt with the value binding.- At that stage, the class op 'f' will have an Internal name.--}--shadowNames :: GlobalRdrEnv -> OccEnv a -> GlobalRdrEnv--- Remove certain old GREs that share the same OccName as this new Name.--- See Note [GlobalRdrEnv shadowing] for details-shadowNames = minusOccEnv_C (\gres _ -> Just (mapMaybe shadow gres))- where- shadow :: GlobalRdrElt -> Maybe GlobalRdrElt- shadow- old_gre@(GRE { gre_lcl = lcl, gre_imp = iss })- = case greDefinitionModule old_gre of- Nothing -> Just old_gre -- Old name is Internal; do not shadow- Just old_mod- | null iss' -- Nothing remains- -> Nothing-- | otherwise- -> Just (old_gre { gre_lcl = False, gre_imp = iss' })-- where- iss' = lcl_imp `unionBags` mapMaybeBag set_qual iss- lcl_imp | lcl = listToBag [mk_fake_imp_spec old_gre old_mod]- | otherwise = emptyBag-- mk_fake_imp_spec old_gre old_mod -- Urgh!- = ImpSpec id_spec ImpAll- where- old_mod_name = moduleName old_mod- id_spec = ImpDeclSpec { is_mod = old_mod_name- , is_as = old_mod_name- , is_qual = True- , is_dloc = greDefinitionSrcSpan old_gre }-- set_qual :: ImportSpec -> Maybe ImportSpec- set_qual is = Just (is { is_decl = (is_decl is) { is_qual = True } })---{--************************************************************************-* *- ImportSpec-* *-************************************************************************--}---- | Import Specification------ The 'ImportSpec' of something says how it came to be imported--- It's quite elaborate so that we can give accurate unused-name warnings.-data ImportSpec = ImpSpec { is_decl :: !ImpDeclSpec,- is_item :: !ImpItemSpec }- deriving( Eq, Data )--instance NFData ImportSpec where- rnf = rwhnf -- All fields are strict, so we don't need to do anything---- | Import Declaration Specification------ Describes a particular import declaration and is--- shared among all the 'Provenance's for that decl-data ImpDeclSpec- = ImpDeclSpec {- is_mod :: !ModuleName, -- ^ Module imported, e.g. @import Muggle@- -- Note the @Muggle@ may well not be- -- the defining module for this thing!-- -- TODO: either should be Module, or there- -- should be a Maybe UnitId here too.- is_as :: !ModuleName, -- ^ Import alias, e.g. from @as M@ (or @Muggle@ if there is no @as@ clause)- is_qual :: !Bool, -- ^ Was this import qualified?- is_dloc :: !SrcSpan -- ^ The location of the entire import declaration- } deriving (Eq, Data)---- | Import Item Specification------ Describes import info a particular Name-data ImpItemSpec- = ImpAll -- ^ The import had no import list,- -- or had a hiding list-- | ImpSome {- is_explicit :: !Bool,- is_iloc :: !SrcSpan -- Location of the import item- } -- ^ The import had an import list.- -- The 'is_explicit' field is @True@ iff the thing was named- -- /explicitly/ in the import specs rather- -- than being imported as part of a "..." group. Consider:- --- -- > import C( T(..) )- --- -- Here the constructors of @T@ are not named explicitly;- -- only @T@ is named explicitly.- deriving (Eq, Data)--bestImport :: [ImportSpec] -> ImportSpec--- See Note [Choosing the best import declaration]-bestImport iss- = case sortBy best iss of- (is:_) -> is- [] -> pprPanic "bestImport" (ppr iss)- where- best :: ImportSpec -> ImportSpec -> Ordering- -- Less means better- -- Unqualified always wins over qualified; then- -- import-all wins over import-some; then- -- earlier declaration wins over later- best (ImpSpec { is_item = item1, is_decl = d1 })- (ImpSpec { is_item = item2, is_decl = d2 })- = (is_qual d1 `compare` is_qual d2) S.<> best_item item1 item2 S.<>- SrcLoc.leftmost_smallest (is_dloc d1) (is_dloc d2)-- best_item :: ImpItemSpec -> ImpItemSpec -> Ordering- best_item ImpAll ImpAll = EQ- best_item ImpAll (ImpSome {}) = LT- best_item (ImpSome {}) ImpAll = GT- best_item (ImpSome { is_explicit = e1 })- (ImpSome { is_explicit = e2 }) = e1 `compare` e2- -- False < True, so if e1 is explicit and e2 is not, we get GT--{- Note [Choosing the best import declaration]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When reporting unused import declarations we use the following rules.- (see [wiki:commentary/compiler/unused-imports])--Say that an import-item is either- * an entire import-all decl (eg import Foo), or- * a particular item in an import list (eg import Foo( ..., x, ...)).-The general idea is that for each /occurrence/ of an imported name, we will-attribute that use to one import-item. Once we have processed all the-occurrences, any import items with no uses attributed to them are unused,-and are warned about. More precisely:--1. For every RdrName in the program text, find its GlobalRdrElt.--2. Then, from the [ImportSpec] (gre_imp) of that GRE, choose one- the "chosen import-item", and mark it "used". This is done- by 'bestImport'--3. After processing all the RdrNames, bleat about any- import-items that are unused.- This is done in GHC.Rename.Names.warnUnusedImportDecls.--The function 'bestImport' returns the dominant import among the-ImportSpecs it is given, implementing Step 2. We say import-item A-dominates import-item B if we choose A over B. In general, we try to-choose the import that is most likely to render other imports-unnecessary. Here is the dominance relationship we choose:-- a) import Foo dominates import qualified Foo.-- b) import Foo dominates import Foo(x).-- c) Otherwise choose the textually first one.--Rationale for (a). Consider- import qualified M -- Import #1- import M( x ) -- Import #2- foo = M.x + x--The unqualified 'x' can only come from import #2. The qualified 'M.x'-could come from either, but bestImport picks import #2, because it is-more likely to be useful in other imports, as indeed it is in this-case (see #5211 for a concrete example).--But the rules are not perfect; consider- import qualified M -- Import #1- import M( x ) -- Import #2- foo = M.x + M.y--The M.x will use import #2, but M.y can only use import #1.--}---unQualSpecOK :: ImportSpec -> Bool--- ^ Is in scope unqualified?-unQualSpecOK is = not (is_qual (is_decl is))--qualSpecOK :: ModuleName -> ImportSpec -> Bool--- ^ Is in scope qualified with the given module?-qualSpecOK mod is = mod == is_as (is_decl is)--importSpecLoc :: ImportSpec -> SrcSpan-importSpecLoc (ImpSpec decl ImpAll) = is_dloc decl-importSpecLoc (ImpSpec _ item) = is_iloc item--importSpecModule :: ImportSpec -> ModuleName-importSpecModule is = is_mod (is_decl is)--isExplicitItem :: ImpItemSpec -> Bool-isExplicitItem ImpAll = False-isExplicitItem (ImpSome {is_explicit = exp}) = exp--pprNameProvenance :: GlobalRdrElt -> SDoc--- ^ Print out one place where the name was define/imported--- (With -dppr-debug, print them all)-pprNameProvenance gre@(GRE { gre_lcl = lcl, gre_imp = iss })- = ifPprDebug (vcat pp_provs)- (head pp_provs)- where- name = greMangledName gre+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GADTs #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE PatternSynonyms #-}++-- |+-- #name_types#+-- GHC uses several kinds of name internally:+--+-- * 'GHC.Types.Name.Occurrence.OccName': see "GHC.Types.Name.Occurrence#name_types"+--+-- * 'GHC.Types.Name.Reader.RdrName' is the type of names that come directly from the parser. They+-- have not yet had their scoping and binding resolved by the renamer and can be+-- thought of to a first approximation as an 'GHC.Types.Name.Occurrence.OccName' with an optional module+-- qualifier+--+-- * 'GHC.Types.Name.Name': see "GHC.Types.Name#name_types"+--+-- * 'GHC.Types.Id.Id': see "GHC.Types.Id#name_types"+--+-- * 'GHC.Types.Var.Var': see "GHC.Types.Var#name_types"++module GHC.Types.Name.Reader (+ -- * The main type+ RdrName(..), -- Constructors exported only to GHC.Iface.Binary++ -- ** Construction+ mkRdrUnqual, mkRdrQual,+ mkUnqual, mkVarUnqual, mkQual, mkOrig,+ nameRdrName, getRdrName,++ -- ** Destruction+ rdrNameOcc, rdrNameSpace, demoteRdrName, demoteRdrNameTv, promoteRdrName,+ isRdrDataCon, isRdrTyVar, isRdrTc, isQual, isQual_maybe, isUnqual,+ isOrig, isOrig_maybe, isExact, isExact_maybe, isSrcRdrName,++ -- * Local mapping of 'RdrName' to 'Name.Name'+ LocalRdrEnv, emptyLocalRdrEnv, extendLocalRdrEnv, extendLocalRdrEnvList,+ lookupLocalRdrEnv, lookupLocalRdrOcc,+ elemLocalRdrEnv, inLocalRdrEnvScope,+ localRdrEnvElts, minusLocalRdrEnv, minusLocalRdrEnvList,++ -- * Global mapping of 'RdrName' to 'GlobalRdrElt's+ GlobalRdrEnvX, GlobalRdrEnv, IfGlobalRdrEnv,+ emptyGlobalRdrEnv, mkGlobalRdrEnv, plusGlobalRdrEnv,+ extendGlobalRdrEnv, greOccName,+ pprGlobalRdrEnv, globalRdrEnvElts,++ -- ** Looking up 'GlobalRdrElt's+ FieldsOrSelectors(..), filterFieldGREs, allowGRE,++ LookupGRE(..), lookupGRE,+ WhichGREs(.., AllRelevantGREs, RelevantGREsFOS),+ greIsRelevant,+ LookupChild(..),++ lookupGRE_Name,+ lookupGRE_FieldLabel,+ getGRE_NameQualifier_maybes,+ transformGREs, pickGREs, pickGREsModExp,++ -- * GlobalRdrElts+ availFromGRE,+ greRdrNames, greSrcSpan, greQualModName,+ gresToAvailInfo,+ greDefinitionModule, greDefinitionSrcSpan,+ greFieldLabel_maybe,++ -- ** Global 'RdrName' mapping elements: 'GlobalRdrElt', 'Provenance', 'ImportSpec'+ GlobalRdrEltX(..), GlobalRdrElt, IfGlobalRdrElt, FieldGlobalRdrElt,+ greName, greNameSpace, greParent, greInfo,+ forceGlobalRdrEnv, hydrateGlobalRdrEnv,+ isLocalGRE, isImportedGRE, isRecFldGRE,+ fieldGREInfo,+ isDuplicateRecFldGRE, isNoFieldSelectorGRE, isFieldSelectorGRE,+ unQualOK, qualSpecOK, unQualSpecOK,+ pprNameProvenance,+ mkGRE, mkExactGRE, mkLocalGRE, mkLocalVanillaGRE, mkLocalTyConGRE,+ mkLocalConLikeGRE, mkLocalFieldGREs,+ gresToNameSet,++ -- ** Shadowing+ greClashesWith, shadowNames,++ -- ** Information attached to a 'GlobalRdrElt'+ ConLikeName(..),+ GREInfo(..), RecFieldInfo(..),+ plusGREInfo,+ recFieldConLike_maybe, recFieldInfo_maybe,+ fieldGRE_maybe, fieldGRELabel,++ -- ** Parent information+ Parent(..), greParent_maybe,+ mkParent, availParent,+ ImportSpec(..), ImpDeclSpec(..), ImpItemSpec(..),+ importSpecLoc, importSpecModule, isExplicitItem, bestImport,++ -- * Utils+ opIsAt+ ) where++import GHC.Prelude++import GHC.Data.Bag+import GHC.Data.FastString+import GHC.Data.Maybe++import GHC.Types.Avail+import GHC.Types.Basic+import GHC.Types.GREInfo+import GHC.Types.FieldLabel+import GHC.Types.Name+import GHC.Types.Name.Env+ ( NameEnv, nonDetNameEnvElts, emptyNameEnv, extendNameEnv_Acc )+import GHC.Types.Name.Set+import GHC.Types.SrcLoc as SrcLoc+import GHC.Types.Unique+import GHC.Types.Unique.FM+import GHC.Types.Unique.Set+import GHC.Builtin.Uniques ( isFldNSUnique )++import GHC.Unit.Module++import GHC.Utils.Misc as Utils+import GHC.Utils.Outputable+import GHC.Utils.Panic++import Control.DeepSeq+import Control.Monad ( guard )+import Data.Data+import Data.List ( sort )+import qualified Data.List.NonEmpty as NE+import qualified Data.Map.Strict as Map+import qualified Data.Semigroup as S+import System.IO.Unsafe ( unsafePerformIO )++{-+************************************************************************+* *+\subsection{The main data type}+* *+************************************************************************+-}++-- | Reader Name+--+-- Do not use the data constructors of RdrName directly: prefer the family+-- of functions that creates them, such as 'mkRdrUnqual'+--+-- - Note: A Located RdrName will only have API Annotations if it is a+-- compound one,+-- e.g.+--+-- > `bar`+-- > ( ~ )+--+-- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnType',+-- 'GHC.Parser.Annotation.AnnOpen' @'('@ or @'['@ or @'[:'@,+-- 'GHC.Parser.Annotation.AnnClose' @')'@ or @']'@ or @':]'@,,+-- 'GHC.Parser.Annotation.AnnBackquote' @'`'@,+-- 'GHC.Parser.Annotation.AnnVal'+-- 'GHC.Parser.Annotation.AnnTilde',++-- For details on above see Note [exact print annotations] in "GHC.Parser.Annotation"+data RdrName+ = Unqual OccName+ -- ^ Unqualified name+ --+ -- Used for ordinary, unqualified occurrences, e.g. @x@, @y@ or @Foo@.+ -- Create such a 'RdrName' with 'mkRdrUnqual'++ | Qual ModuleName OccName+ -- ^ Qualified name+ --+ -- A qualified name written by the user in+ -- /source/ code. The module isn't necessarily+ -- the module where the thing is defined;+ -- just the one from which it is imported.+ -- Examples are @Bar.x@, @Bar.y@ or @Bar.Foo@.+ -- Create such a 'RdrName' with 'mkRdrQual'++ | Orig Module OccName+ -- ^ Original name+ --+ -- An original name; the module is the /defining/ module.+ -- This is used when GHC generates code that will be fed+ -- into the renamer (e.g. from deriving clauses), but where+ -- we want to say \"Use Prelude.map dammit\". One of these+ -- can be created with 'mkOrig'++ | Exact Name+ -- ^ Exact name+ --+ -- We know exactly the 'Name'. This is used:+ --+ -- (1) When the parser parses built-in syntax like @[]@+ -- and @(,)@, but wants a 'RdrName' from it+ --+ -- (2) By Template Haskell, when TH has generated a unique name+ --+ -- Such a 'RdrName' can be created by using 'getRdrName' on a 'Name'+ deriving Data++{-+************************************************************************+* *+\subsection{Simple functions}+* *+************************************************************************+-}++instance HasOccName RdrName where+ occName = rdrNameOcc++rdrNameOcc :: RdrName -> OccName+rdrNameOcc (Qual _ occ) = occ+rdrNameOcc (Unqual occ) = occ+rdrNameOcc (Orig _ occ) = occ+rdrNameOcc (Exact name) = nameOccName name++rdrNameSpace :: RdrName -> NameSpace+rdrNameSpace = occNameSpace . rdrNameOcc++-- demoteRdrName lowers the NameSpace of RdrName.+-- See Note [Demotion] in GHC.Rename.Env+demoteRdrName :: RdrName -> Maybe RdrName+demoteRdrName (Unqual occ) = fmap Unqual (demoteOccName occ)+demoteRdrName (Qual m occ) = fmap (Qual m) (demoteOccName occ)+demoteRdrName (Orig _ _) = Nothing+demoteRdrName (Exact _) = Nothing++demoteRdrNameTv :: RdrName -> Maybe RdrName+demoteRdrNameTv (Unqual occ) = fmap Unqual (demoteOccTvName occ)+demoteRdrNameTv (Qual m occ) = fmap (Qual m) (demoteOccTvName occ)+demoteRdrNameTv (Orig _ _) = Nothing+demoteRdrNameTv (Exact _) = Nothing++-- promoteRdrName promotes the NameSpace of RdrName.+-- See Note [Promotion] in GHC.Rename.Env.+promoteRdrName :: RdrName -> Maybe RdrName+promoteRdrName (Unqual occ) = fmap Unqual (promoteOccName occ)+promoteRdrName (Qual m occ) = fmap (Qual m) (promoteOccName occ)+promoteRdrName (Orig _ _) = Nothing+promoteRdrName (Exact _) = Nothing++ -- These two are the basic constructors+mkRdrUnqual :: OccName -> RdrName+mkRdrUnqual occ = Unqual occ++mkRdrQual :: ModuleName -> OccName -> RdrName+mkRdrQual mod occ = Qual mod occ++mkOrig :: Module -> OccName -> RdrName+mkOrig mod occ = Orig mod occ++---------------+ -- These two are used when parsing source files+ -- They do encode the module and occurrence names+mkUnqual :: NameSpace -> FastString -> RdrName+mkUnqual sp n = Unqual (mkOccNameFS sp n)++mkVarUnqual :: FastString -> RdrName+mkVarUnqual n = Unqual (mkVarOccFS n)++-- | Make a qualified 'RdrName' in the given namespace and where the 'ModuleName' and+-- the 'OccName' are taken from the first and second elements of the tuple respectively+mkQual :: NameSpace -> (FastString, FastString) -> RdrName+mkQual sp (m, n) = Qual (mkModuleNameFS m) (mkOccNameFS sp n)++getRdrName :: NamedThing thing => thing -> RdrName+getRdrName name = nameRdrName (getName name)++nameRdrName :: Name -> RdrName+nameRdrName name = Exact name+-- Keep the Name even for Internal names, so that the+-- unique is still there for debug printing, particularly+-- of Types (which are converted to IfaceTypes before printing)++nukeExact :: Name -> RdrName+nukeExact n+ | isExternalName n = Orig (nameModule n) (nameOccName n)+ | otherwise = Unqual (nameOccName n)++isRdrDataCon :: RdrName -> Bool+isRdrTyVar :: RdrName -> Bool+isRdrTc :: RdrName -> Bool++isRdrDataCon rn = isDataOcc (rdrNameOcc rn)+isRdrTyVar rn = isTvOcc (rdrNameOcc rn)+isRdrTc rn = isTcOcc (rdrNameOcc rn)++isSrcRdrName :: RdrName -> Bool+isSrcRdrName (Unqual _) = True+isSrcRdrName (Qual _ _) = True+isSrcRdrName _ = False++isUnqual :: RdrName -> Bool+isUnqual (Unqual _) = True+isUnqual _ = False++isQual :: RdrName -> Bool+isQual (Qual _ _) = True+isQual _ = False++isQual_maybe :: RdrName -> Maybe (ModuleName, OccName)+isQual_maybe (Qual m n) = Just (m,n)+isQual_maybe _ = Nothing++isOrig :: RdrName -> Bool+isOrig (Orig _ _) = True+isOrig _ = False++isOrig_maybe :: RdrName -> Maybe (Module, OccName)+isOrig_maybe (Orig m n) = Just (m,n)+isOrig_maybe _ = Nothing++isExact :: RdrName -> Bool+isExact (Exact _) = True+isExact _ = False++isExact_maybe :: RdrName -> Maybe Name+isExact_maybe (Exact n) = Just n+isExact_maybe _ = Nothing++{-+************************************************************************+* *+\subsection{Instances}+* *+************************************************************************+-}++instance Outputable RdrName where+ ppr (Exact name) = ppr name+ ppr (Unqual occ) = ppr occ+ ppr (Qual mod occ) = ppr mod <> dot <> ppr occ+ ppr (Orig mod occ) = getPprStyle (\sty -> pprModulePrefix sty mod occ <> ppr occ)++instance OutputableBndr RdrName where+ pprBndr _ n+ | isTvOcc (rdrNameOcc n) = char '@' <> ppr n+ | otherwise = ppr n++ pprInfixOcc rdr = pprInfixVar (isSymOcc (rdrNameOcc rdr)) (ppr rdr)+ pprPrefixOcc rdr+ | Just name <- isExact_maybe rdr = pprPrefixName name+ -- pprPrefixName has some special cases, so+ -- we delegate to them rather than reproduce them+ | otherwise = pprPrefixVar (isSymOcc (rdrNameOcc rdr)) (ppr rdr)++instance Eq RdrName where+ (Exact n1) == (Exact n2) = n1==n2+ -- Convert exact to orig+ (Exact n1) == r2@(Orig _ _) = nukeExact n1 == r2+ r1@(Orig _ _) == (Exact n2) = r1 == nukeExact n2++ (Orig m1 o1) == (Orig m2 o2) = m1==m2 && o1==o2+ (Qual m1 o1) == (Qual m2 o2) = m1==m2 && o1==o2+ (Unqual o1) == (Unqual o2) = o1==o2+ _ == _ = False++instance Ord RdrName where+ a <= b = case (a `compare` b) of { LT -> True; EQ -> True; GT -> False }+ a < b = case (a `compare` b) of { LT -> True; EQ -> False; GT -> False }+ a >= b = case (a `compare` b) of { LT -> False; EQ -> True; GT -> True }+ a > b = case (a `compare` b) of { LT -> False; EQ -> False; GT -> True }++ -- Exact < Unqual < Qual < Orig+ -- [Note: Apr 2004] We used to use nukeExact to convert Exact to Orig+ -- before comparing so that Prelude.map == the exact Prelude.map, but+ -- that meant that we reported duplicates when renaming bindings+ -- generated by Template Haskell; e.g+ -- do { n1 <- newName "foo"; n2 <- newName "foo";+ -- <decl involving n1,n2> }+ -- I think we can do without this conversion+ compare (Exact n1) (Exact n2) = n1 `compare` n2+ compare (Exact _) _ = LT++ compare (Unqual _) (Exact _) = GT+ compare (Unqual o1) (Unqual o2) = o1 `compare` o2+ compare (Unqual _) _ = LT++ compare (Qual _ _) (Exact _) = GT+ compare (Qual _ _) (Unqual _) = GT+ compare (Qual m1 o1) (Qual m2 o2) = compare o1 o2 S.<> compare m1 m2+ compare (Qual _ _) (Orig _ _) = LT++ compare (Orig m1 o1) (Orig m2 o2) = compare o1 o2 S.<> compare m1 m2+ compare (Orig _ _) _ = GT++{-+************************************************************************+* *+ LocalRdrEnv+* *+************************************************************************+-}++{- Note [LocalRdrEnv]+~~~~~~~~~~~~~~~~~~~~~+The LocalRdrEnv is used to store local bindings (let, where, lambda, case).++* It is keyed by OccName, because we never use it for qualified names.++* It maps the OccName to a Name. That Name is almost always an+ Internal Name, but (hackily) it can be External too for top-level+ pattern bindings. See Note [bindLocalNames for an External name]+ in GHC.Rename.Pat++* We keep the current mapping (lre_env), *and* the set of all Names in+ scope (lre_in_scope). Reason: see Note [Splicing Exact names] in+ GHC.Rename.Env.+-}++-- | Local Reader Environment+-- See Note [LocalRdrEnv]+data LocalRdrEnv = LRE { lre_env :: OccEnv Name+ , lre_in_scope :: NameSet }++instance Outputable LocalRdrEnv where+ ppr (LRE {lre_env = env, lre_in_scope = ns})+ = hang (text "LocalRdrEnv {")+ 2 (vcat [ text "env =" <+> pprOccEnv ppr_elt env+ , text "in_scope ="+ <+> pprUFM (getUniqSet ns) (braces . pprWithCommas ppr)+ ] <+> char '}')+ where+ ppr_elt name = parens (ppr (nameOccName name)) <+> ppr name+ -- So we can see if the keys line up correctly++emptyLocalRdrEnv :: LocalRdrEnv+emptyLocalRdrEnv = LRE { lre_env = emptyOccEnv+ , lre_in_scope = emptyNameSet }++extendLocalRdrEnv :: LocalRdrEnv -> Name -> LocalRdrEnv+-- See Note [LocalRdrEnv]+extendLocalRdrEnv lre@(LRE { lre_env = env, lre_in_scope = ns }) name+ = lre { lre_env = extendOccEnv env (nameOccName name) name+ , lre_in_scope = extendNameSet ns name }++extendLocalRdrEnvList :: LocalRdrEnv -> [Name] -> LocalRdrEnv+-- See Note [LocalRdrEnv]+extendLocalRdrEnvList lre@(LRE { lre_env = env, lre_in_scope = ns }) names+ = lre { lre_env = extendOccEnvList env [(nameOccName n, n) | n <- names]+ , lre_in_scope = extendNameSetList ns names }++lookupLocalRdrEnv :: LocalRdrEnv -> RdrName -> Maybe Name+lookupLocalRdrEnv (LRE { lre_env = env, lre_in_scope = ns }) rdr+ | Unqual occ <- rdr+ = lookupOccEnv env occ++ -- See Note [Local bindings with Exact Names]+ | Exact name <- rdr+ , name `elemNameSet` ns+ = Just name++ | otherwise+ = Nothing++lookupLocalRdrOcc :: LocalRdrEnv -> OccName -> Maybe Name+lookupLocalRdrOcc (LRE { lre_env = env }) occ = lookupOccEnv env occ++elemLocalRdrEnv :: RdrName -> LocalRdrEnv -> Bool+elemLocalRdrEnv rdr_name (LRE { lre_env = env, lre_in_scope = ns })+ = case rdr_name of+ Unqual occ -> occ `elemOccEnv` env+ Exact name -> name `elemNameSet` ns -- See Note [Local bindings with Exact Names]+ Qual {} -> False+ Orig {} -> False++localRdrEnvElts :: LocalRdrEnv -> [Name]+localRdrEnvElts (LRE { lre_env = env }) = nonDetOccEnvElts env++inLocalRdrEnvScope :: Name -> LocalRdrEnv -> Bool+-- This is the point of the NameSet+inLocalRdrEnvScope name (LRE { lre_in_scope = ns }) = name `elemNameSet` ns++minusLocalRdrEnv :: LocalRdrEnv -> OccEnv a -> LocalRdrEnv+minusLocalRdrEnv lre@(LRE { lre_env = env }) occs+ = lre { lre_env = minusOccEnv env occs }++minusLocalRdrEnvList :: LocalRdrEnv -> [OccName] -> LocalRdrEnv+minusLocalRdrEnvList lre@(LRE { lre_env = env }) occs+ = lre { lre_env = delListFromOccEnv env occs }++{-+Note [Local bindings with Exact Names]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+With Template Haskell we can make local bindings that have Exact Names.+Computing shadowing etc may use elemLocalRdrEnv (at least it certainly+does so in GHC.Rename.HsType.bindHsQTyVars), so for an Exact Name we must consult+the in-scope-name-set.+++************************************************************************+* *+ GlobalRdrEnv+* *+************************************************************************+-}++-- | Global Reader Environment+type GlobalRdrEnv = GlobalRdrEnvX GREInfo+-- ^ Keyed by 'OccName'; when looking up a qualified name+-- we look up the 'OccName' part, and then check the 'Provenance'+-- to see if the appropriate qualification is valid. This+-- saves routinely doubling the size of the env by adding both+-- qualified and unqualified names to the domain.+--+-- The list in the codomain is required because there may be name clashes+-- These only get reported on lookup, not on construction+--+-- INVARIANT 1: All the members of the list have distinct+-- 'gre_name' fields; that is, no duplicate Names+--+-- INVARIANT 2: Imported provenance => Name is an ExternalName+-- However LocalDefs can have an InternalName. This+-- happens only when type-checking a [d| ... |] Template+-- Haskell quotation; see this note in GHC.Rename.Names+-- Note [Top-level Names in Template Haskell decl quotes]+--+-- INVARIANT 3: If the GlobalRdrEnv maps [occ -> gre], then+-- greOccName gre = occ++-- | A 'GlobalRdrEnv' in which the 'GlobalRdrElt's don't have any 'GREInfo'+-- attached to them. This is useful to avoid space leaks, see Note [IfGlobalRdrEnv].+type IfGlobalRdrEnv = GlobalRdrEnvX ()++-- | Parametrises 'GlobalRdrEnv' over the presence or absence of 'GREInfo'.+--+-- See Note [IfGlobalRdrEnv].+type GlobalRdrEnvX info = OccEnv [GlobalRdrEltX info]++-- | Global Reader Element+--+-- Something in scope in the renamer; usually a member of the 'GlobalRdrEnv'.+-- See Note [GlobalRdrElt provenance].++type GlobalRdrElt = GlobalRdrEltX GREInfo++-- | A 'GlobalRdrElt' in which we stripped out the 'GREInfo' field,+-- in order to avoid space leaks.+--+-- See Note [IfGlobalRdrEnv].+type IfGlobalRdrElt = GlobalRdrEltX ()++-- | Global Reader Element+--+-- Something in scope in the renamer; usually a member of the 'GlobalRdrEnv'.+-- See Note [GlobalRdrElt provenance].+--+-- Why do we parametrise over the 'gre_info' field? See Note [IfGlobalRdrEnv].+data GlobalRdrEltX info+ = GRE { gre_name :: !Name+ , gre_par :: !Parent -- ^ See Note [Parents]+ , gre_lcl :: !Bool -- ^ True <=> the thing was defined locally+ , gre_imp :: !(Bag ImportSpec) -- ^ In scope through these imports+ -- See Note [GlobalRdrElt provenance] for the relation between gre_lcl and gre_imp.++ , gre_info :: info+ -- ^ Information the renamer knows about this particular 'Name'.+ --+ -- Careful about forcing this field! Forcing it can trigger+ -- the loading of interface files.+ --+ -- Note [Retrieving the GREInfo from interfaces] in GHC.Types.GREInfo.+ } deriving (Data)+++{- Note [IfGlobalRdrEnv]+~~~~~~~~~~~~~~~~~~~~~~~~+Information pertinent to the renamer about a 'Name' is stored in the fields of+'GlobalRdrElt'. The 'gre_info' field, described in Note [GREInfo] in GHC.Types.GREInfo,+is a bit special: as Note [Retrieving the GREInfo from interfaces] in GHC.Types.GREInfo+describes, for imported 'Name's it is usually obtained by a look up in a type environment,+and forcing can cause the interface file for the module defining the 'Name' to be+loaded. As described in Note [Forcing GREInfo] in GHC.Types.GREInfo, keeping it+a thunk can cause space leaks, while forcing it can cause extra work to be done.+So it's best to discard it when we don't need it, for example when we are about+to store it in a 'ModIface'.++We thus parametrise 'GlobalRdrElt' (and 'GlobalRdrEnv') over the presence or+absence of the 'GREInfo' field.++ - When we are about to stash the 'GlobalRdrElt' in a long-lived data structure,+ e.g. a 'ModIface', we force it by setting all the 'GREInfo' fields to '()'.+ See 'forceGlobalRdrEnv'.+ - To go back the other way, we use 'hydrateGlobalRdrEnv', which sets the+ 'gre_info' fields back to lazy lookups.++This parametrisation also helps ensure that we don't accidentally force the+GREInfo field (which can cause unnecessary loading of interface files).+In particular, the 'lookupGRE' function is statically guaranteed to not consult+the 'GREInfo' field when using 'SameNameSpace', which is important+as we sometimes need to use this function with an 'IfaceGlobalRdrEnv' in which+the 'GREInfo' fields have been stripped.+-}++-- | A 'FieldGlobalRdrElt' is a 'GlobalRdrElt'+-- in which the 'gre_info' field is 'IAmRecField'.+type FieldGlobalRdrElt = GlobalRdrElt++greName :: GlobalRdrEltX info -> Name+greName = gre_name++greNameSpace :: GlobalRdrEltX info -> NameSpace+greNameSpace = nameNameSpace . greName++greParent :: GlobalRdrEltX info -> Parent+greParent = gre_par++greInfo :: GlobalRdrElt -> GREInfo+greInfo = gre_info++instance NFData IfGlobalRdrElt where+ rnf !_ = ()++-- | See Note [Parents]+data Parent = NoParent+ | ParentIs { par_is :: Name }+ deriving (Eq, Data)++instance Outputable Parent where+ ppr NoParent = empty+ ppr (ParentIs n) = text "parent:" <> ppr n++plusParent :: Parent -> Parent -> Parent+-- See Note [Combining parents]+plusParent p1@(ParentIs _) p2 = hasParent p1 p2+plusParent p1 p2@(ParentIs _) = hasParent p2 p1+plusParent NoParent NoParent = NoParent++hasParent :: Parent -> Parent -> Parent+#if defined(DEBUG)+hasParent p NoParent = p+hasParent p p'+ | p /= p' = pprPanic "hasParent" (ppr p <+> ppr p') -- Parents should agree+#endif+hasParent p _ = p+++{- Note [GlobalRdrElt provenance]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The gre_lcl and gre_imp fields of a GlobalRdrElt describe its "provenance",+i.e. how the Name came to be in scope. It can be in scope in one of the following+three ways:++ A. The Name was locally bound, in the current module.+ gre_lcl = True++ The renamer adds this Name to the GlobalRdrEnv after renaming the binding.+ See the calls to "extendGlobalRdrEnvRn" in GHC.Rename.Module.rnSrcDecls.++ B. The Name was imported+ gre_imp = Just imps <=> brought into scope by the imports "imps"++ The renamer adds this Name to the GlobalRdrEnv after processing the imports.+ See GHC.Rename.Names.filterImports and GHC.Tc.Module.tcRnImports.++ C. We followed an exact reference (i.e. an Exact or Orig RdrName)+ gre_lcl = False, gre_imp = Nothing++ In this case, we directly fetch a Name and its GREInfo from direct reference.+ We don't add it to the GlobalRdrEnv. See "GHC.Rename.Env.lookupExactOrOrig".++It is just about possible to have *both* gre_lcl = True and gre_imp = Just imps.+This can happen with module loops: a Name is defined locally in A, and also+brought into scope by importing a module that SOURCE-imported A.++Example (#7672):++ A.hs-boot module A where+ data T++ B.hs module B(Decl.T) where+ import {-# SOURCE #-} qualified A as Decl++ A.hs module A where+ import qualified B+ data T = Z | S B.T++In A.hs, 'T' is locally bound, *and* imported as B.T.+++Note [Parents]+~~~~~~~~~~~~~~~~~+The children of a Name are the things that are abbreviated by the ".." notation+in export lists.++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ Parent Children+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ data T Data constructors+ Record-field ids++ data family T Data constructors and record-field ids+ of all visible data instances of T++ class C Class operations+ Associated type constructors++~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ Constructor Meaning+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ NoParent Not bundled with a type constructor.+ ParentIs n Bundled with the type constructor corresponding to n.++Pattern synonym constructors (and their record fields, if any) are unusual:+their gre_par is NoParent in the module in which they are defined. However, a+pattern synonym can be bundled with a type constructor on export, in which case+whenever the pattern synonym is imported the gre_par will be ParentIs.++Thus the gre_name and gre_par fields are independent, because a normal datatype+introduces FieldGlobalRdrElts using ParentIs, but a record pattern synonym can+introduce FieldGlobalRdrElts that use NoParent. (In the past we represented+fields using an additional constructor of the Parent type, which could not+adequately represent this situation.) See also+Note [Representing pattern synonym fields in AvailInfo] in GHC.Types.Avail.++Note [Combining parents]+~~~~~~~~~~~~~~~~~~~~~~~~+With an associated type we might have+ module M where+ class C a where+ data T a+ op :: T a -> a+ instance C Int where+ data T Int = TInt+ instance C Bool where+ data T Bool = TBool++Then: C is the parent of T+ T is the parent of TInt and TBool+So: in an export list+ C(..) is short for C( op, T )+ T(..) is short for T( TInt, TBool )++Module M exports everything, so its exports will be+ AvailTC C [C,T,op]+ AvailTC T [T,TInt,TBool]+On import we convert to GlobalRdrElt and then combine+those. For T that will mean we have+ one GRE with Parent C+ one GRE with NoParent+That's why plusParent picks the "best" case.+-}++mkGRE :: (Name -> Maybe ImportSpec) -> GREInfo -> Parent -> Name -> GlobalRdrElt+mkGRE prov_fn info par n =+ case prov_fn n of+ -- Nothing => bound locally+ -- Just is => imported from 'is'+ Nothing -> GRE { gre_name = n, gre_par = par+ , gre_lcl = True, gre_imp = emptyBag+ , gre_info = info }+ Just is -> GRE { gre_name = n, gre_par = par+ , gre_lcl = False, gre_imp = unitBag is+ , gre_info = info }++mkExactGRE :: Name -> GREInfo -> GlobalRdrElt+mkExactGRE nm info =+ GRE { gre_name = nm, gre_par = NoParent+ , gre_lcl = False, gre_imp = emptyBag+ , gre_info = info }++mkLocalGRE :: GREInfo -> Parent -> Name -> GlobalRdrElt+mkLocalGRE = mkGRE (const Nothing)++mkLocalVanillaGRE :: Parent -> Name -> GlobalRdrElt+mkLocalVanillaGRE = mkLocalGRE Vanilla++-- | Create a local 'GlobalRdrElt' for a 'TyCon'.+mkLocalTyConGRE :: TyConFlavour Name+ -> Name+ -> GlobalRdrElt+mkLocalTyConGRE flav nm = mkLocalGRE (IAmTyCon flav) par nm+ where+ par = case tyConFlavourAssoc_maybe flav of+ Nothing -> NoParent+ Just p -> ParentIs p++mkLocalConLikeGRE :: Parent -> (ConLikeName, ConInfo) -> GlobalRdrElt+mkLocalConLikeGRE p (con_nm, con_info) =+ mkLocalGRE (IAmConLike con_info) p (conLikeName_Name con_nm )++mkLocalFieldGREs :: Parent -> [(ConLikeName, ConInfo)] -> [GlobalRdrElt]+mkLocalFieldGREs p cons =+ [ mkLocalGRE (IAmRecField fld_info) p fld_nm+ | (S.Arg fld_nm fl, fl_cons) <- flds+ , let fld_info = RecFieldInfo { recFieldLabel = fl+ , recFieldCons = fl_cons } ]+ where+ -- We are given a map taking a constructor to its fields, but we want+ -- a map taking a field to the contructors which have it.+ -- We thus need to convert [(Con, [Field])] into [(Field, [Con])].+ flds = Map.toList+ $ Map.fromListWith unionUniqSets+ [ (S.Arg (flSelector fl) fl, unitUniqSet con)+ | (con, con_info) <- cons+ , ConHasRecordFields fls <- [con_info]+ , fl <- NE.toList fls ]++instance HasOccName (GlobalRdrEltX info) where+ occName = greOccName++greOccName :: GlobalRdrEltX info -> OccName+greOccName ( GRE { gre_name = nm } ) = nameOccName nm++-- | The SrcSpan of the name pointed to by the GRE.+greDefinitionSrcSpan :: GlobalRdrEltX info -> SrcSpan+greDefinitionSrcSpan = nameSrcSpan . greName++-- | The module in which the name pointed to by the GRE is defined.+greDefinitionModule :: GlobalRdrEltX info -> Maybe Module+greDefinitionModule = nameModule_maybe . greName++greQualModName :: Outputable info => GlobalRdrEltX info -> ModuleName+-- Get a suitable module qualifier for the GRE+-- (used in mkPrintUnqualified)+-- Precondition: the gre_name is always External+greQualModName gre@(GRE { gre_lcl = lcl, gre_imp = iss })+ | lcl, Just mod <- greDefinitionModule gre = moduleName mod+ | Just is <- headMaybe iss = is_as (is_decl is)+ | otherwise = pprPanic "greQualModName" (ppr gre)++greRdrNames :: GlobalRdrEltX info -> [RdrName]+greRdrNames gre@GRE{ gre_lcl = lcl, gre_imp = iss }+ = bagToList $ (if lcl then unitBag unqual else emptyBag) `unionBags` concatMapBag do_spec (mapBag is_decl iss)+ where+ occ = greOccName gre+ unqual = Unqual occ+ do_spec decl_spec+ | is_qual decl_spec = unitBag qual+ | otherwise = listToBag [unqual,qual]+ where qual = Qual (is_as decl_spec) occ++-- the SrcSpan that pprNameProvenance prints out depends on whether+-- the Name is defined locally or not: for a local definition the+-- definition site is used, otherwise the location of the import+-- declaration. We want to sort the export locations in+-- exportClashErr by this SrcSpan, we need to extract it:+greSrcSpan :: Outputable info => GlobalRdrEltX info -> SrcSpan+greSrcSpan gre@(GRE { gre_lcl = lcl, gre_imp = iss } )+ | lcl = greDefinitionSrcSpan gre+ | Just is <- headMaybe iss = is_dloc (is_decl is)+ | otherwise = pprPanic "greSrcSpan" (ppr gre)++mkParent :: Name -> AvailInfo -> Parent+mkParent _ (Avail _) = NoParent+mkParent n (AvailTC m _) | n == m = NoParent+ | otherwise = ParentIs m++availParent :: AvailInfo -> Parent+availParent (AvailTC m _) = ParentIs m+availParent (Avail {}) = NoParent+++greParent_maybe :: GlobalRdrEltX info -> Maybe Name+greParent_maybe gre = case gre_par gre of+ NoParent -> Nothing+ ParentIs n -> Just n++gresToNameSet :: [GlobalRdrEltX info] -> NameSet+gresToNameSet gres = foldr add emptyNameSet gres+ where add gre set = extendNameSet set (greName gre)++-- | Takes a list of distinct GREs and folds them+-- into AvailInfos. This is more efficient than mapping each individual+-- GRE to an AvailInfo and then folding using `plusAvail`, but needs the+-- uniqueness assumption.+gresToAvailInfo :: forall info. [GlobalRdrEltX info] -> [AvailInfo]+gresToAvailInfo gres+ = nonDetNameEnvElts avail_env+ where+ avail_env :: NameEnv AvailInfo -- Keyed by the parent+ (avail_env, _) = foldl' add (emptyNameEnv, emptyNameSet) gres++ add :: (NameEnv AvailInfo, NameSet)+ -> GlobalRdrEltX info+ -> (NameEnv AvailInfo, NameSet)+ add (env, done) gre+ | name `elemNameSet` done+ = (env, done) -- Don't insert twice into the AvailInfo+ | otherwise+ = ( extendNameEnv_Acc comb availFromGRE env key gre+ , done `extendNameSet` name )+ where+ name = greName gre+ key = case greParent_maybe gre of+ Just parent -> parent+ Nothing -> greName gre++ -- We want to insert the child `k` into a list of children but+ -- need to maintain the invariant that the parent is first.+ --+ -- We also use the invariant that `k` is not already in `ns`.+ insertChildIntoChildren :: Name -> [Name] -> Name -> [Name]+ insertChildIntoChildren _ [] k = [k]+ insertChildIntoChildren p (n:ns) k+ | p == k = k:n:ns+ | otherwise = n:k:ns++ comb :: GlobalRdrEltX info -> AvailInfo -> AvailInfo+ comb _ (Avail n) = Avail n -- Duplicated name, should not happen+ comb gre (AvailTC m ns)+ = case gre_par gre of+ NoParent -> AvailTC m (greName gre:ns) -- Not sure this ever happens+ ParentIs {} -> AvailTC m (insertChildIntoChildren m ns (greName gre))++availFromGRE :: GlobalRdrEltX info -> AvailInfo+availFromGRE (GRE { gre_name = child, gre_par = parent })+ = case parent of+ ParentIs p+ -> AvailTC p [child]+ NoParent+ | isTyConName child -- NB: don't force the GREInfo field unnecessarily.+ -> AvailTC child [child]+ | otherwise+ -> Avail child++emptyGlobalRdrEnv :: GlobalRdrEnvX info+emptyGlobalRdrEnv = emptyOccEnv++globalRdrEnvElts :: GlobalRdrEnvX info -> [GlobalRdrEltX info]+globalRdrEnvElts env = nonDetFoldOccEnv (++) [] env++-- | Drop all 'GREInfo' fields in a 'GlobalRdrEnv' in order to+-- avoid space leaks.+--+-- See Note [Forcing GREInfo] in GHC.Types.GREInfo.+forceGlobalRdrEnv :: GlobalRdrEnvX info -> IfGlobalRdrEnv+forceGlobalRdrEnv rdrs =+ strictMapOccEnv (strictMap (\ gre -> gre { gre_info = () })) rdrs++-- | Hydrate a previously dehydrated 'GlobalRdrEnv',+-- by (lazily!) looking up the 'GREInfo' using the provided function.+--+-- See Note [Forcing GREInfo] in GHC.Types.GREInfo.+hydrateGlobalRdrEnv :: forall info noInfo+ . (Name -> IO info)+ -> GlobalRdrEnvX noInfo -> GlobalRdrEnvX info+hydrateGlobalRdrEnv f = mapOccEnv (fmap g)+ where+ g gre = gre { gre_info = unsafePerformIO $ f (greName gre) }+ -- NB: use unsafePerformIO to delay the lookup until it is forced.+ -- See also 'GHC.Rename.Env.lookupGREInfo'.++instance Outputable info => Outputable (GlobalRdrEltX info) where+ ppr gre = hang (ppr (greName gre) <+> ppr (gre_par gre) <+> ppr (gre_info gre))+ 2 (pprNameProvenance gre)++pprGlobalRdrEnv :: Bool -> GlobalRdrEnv -> SDoc+pprGlobalRdrEnv locals_only env+ = vcat [ text "GlobalRdrEnv" <+> ppWhen locals_only (text "(locals only)")+ <+> lbrace+ , nest 2 (vcat [ pp (remove_locals gre_list) | gre_list <- nonDetOccEnvElts env ]+ <+> rbrace) ]+ where+ remove_locals gres | locals_only = filter isLocalGRE gres+ | otherwise = gres+ pp [] = empty+ pp gres@(gre:_) = hang (ppr occ <> colon)+ 2 (vcat (map ppr gres))+ where+ occ = nameOccName (greName gre)++{-+Note [NoFieldSelectors]+~~~~~~~~~~~~~~~~~~~~~~~+The NoFieldSelectors extension allows record fields to be defined without+bringing the corresponding selector functions into scope. However, such fields+may still be used in contexts such as record construction, pattern matching or+update. This requires us to distinguish contexts in which selectors are required+from those in which any field may be used. For example:++ {-# LANGUAGE NoFieldSelectors #-}+ module M (T(foo), foo) where -- T(foo) refers to the field,+ -- unadorned foo to the value binding+ data T = MkT { foo :: Int }+ foo = ()++ bar = foo -- refers to the value binding, field ignored++ module N where+ import M (T(..))+ baz = MkT { foo = 3 } -- refers to the field+ oops = foo -- an error: the field is in scope but the value binding is not++Each 'FieldLabel' indicates (in the 'flHasFieldSelector' field) whether the+FieldSelectors extension was enabled in the defining module. This allows them+to be filtered out by 'filterFieldGREs'.++Even when NoFieldSelectors is in use, we still generate selector functions+internally. For example, the expression+ getField @"foo" t+or (with dot-notation)+ t.foo+extracts the `foo` field of t::T, and hence needs the selector function+(see Note [HasField instances] in GHC.Tc.Instance.Class).++In many of the name lookup functions in this module we pass a FieldsOrSelectors+value, indicating what we are looking for:++ * WantNormal: fields are in scope only if they have an accompanying selector+ function, e.g. we are looking up a variable in an expression+ (lookupExprOccRn).++ * WantBoth: any name or field will do, regardless of whether the selector+ function is available, e.g. record updates (lookupRecUpdFields) with+ NoDisambiguateRecordFields.++ * WantField: any field will do, regardless of whether the selector function is+ available, but ignoring any non-field names, e.g. record updates+ (lookupRecUpdFields with DisambiguateRecordFields.++-----------------------------------------------------------------------------------+ Context FieldsOrSelectors+-----------------------------------------------------------------------------------+ Record construction/pattern match WantField, but unless DisambiguateRecordFields+ e.g. MkT { foo = 3 } is in effect, also look up using WantBoth+ Record update, e.g. e { foo = 3 } to report when a non-field clashes with a field.++ :info in GHCi WantBoth++ Variable occurrence in expression WantNormal+ Type variable, data constructor+ Pretty much everything else+-----------------------------------------------------------------------------------+-}++fieldGRE_maybe :: GlobalRdrElt -> Maybe FieldGlobalRdrElt+fieldGRE_maybe gre = do+ guard (isRecFldGRE gre)+ return gre++fieldGRELabel :: HasDebugCallStack => FieldGlobalRdrElt -> FieldLabel+fieldGRELabel = recFieldLabel . fieldGREInfo++fieldGREInfo :: HasDebugCallStack => FieldGlobalRdrElt -> RecFieldInfo+fieldGREInfo gre+ = assertPpr (isRecFldGRE gre) (ppr gre) $+ case greInfo gre of+ IAmRecField info -> info+ info -> pprPanic "fieldGREInfo" $+ vcat [ text "gre_name:" <+> ppr (greName gre)+ , text "info:" <+> ppr info ]++recFieldConLike_maybe :: HasDebugCallStack => GlobalRdrElt -> Maybe ConInfo+recFieldConLike_maybe gre =+ case greInfo gre of+ IAmConLike info -> Just info+ _ -> Nothing++recFieldInfo_maybe :: HasDebugCallStack => GlobalRdrElt -> Maybe RecFieldInfo+recFieldInfo_maybe gre =+ case greInfo gre of+ IAmRecField info -> assertPpr (isRecFldGRE gre) (ppr gre) $ Just info+ _ -> Nothing++-- | When looking up GREs, we may or may not want to include fields that were+-- defined in modules with @NoFieldSelectors@ enabled. See Note+-- [NoFieldSelectors].+data FieldsOrSelectors+ = WantNormal -- ^ Include normal names, and fields with selectors, but+ -- ignore fields without selectors.+ | WantBoth -- ^ Include normal names and all fields (regardless of whether+ -- they have selectors).+ | WantField -- ^ Include only fields, with or without selectors, ignoring+ -- any non-fields in scope.+ deriving (Eq, Show)++filterFieldGREs :: FieldsOrSelectors -> [GlobalRdrElt] -> [GlobalRdrElt]+filterFieldGREs WantBoth = id+filterFieldGREs fos = filter (allowGRE fos)++allowGRE :: FieldsOrSelectors -> GlobalRdrElt -> Bool+allowGRE WantBoth _+ = True+allowGRE WantNormal gre+ -- NB: we only need to consult the GREInfo for record field GREs,+ -- to check whether they define field selectors.+ -- By checking 'isRecFldGRE' first, which only consults the NameSpace,+ -- we avoid forcing the GREInfo for things that aren't record fields.+ | isRecFldGRE gre+ = flHasFieldSelector (fieldGRELabel gre) == FieldSelectors+ | otherwise+ = True+allowGRE WantField gre+ = isRecFldGRE gre++-- | What should we look up in a 'GlobalRdrEnv'? Should we only look up+-- names with the exact same 'OccName', or do we allow different 'NameSpace's?+--+-- Depending on the answer, we might need more or less information from the+-- 'GlobalRdrEnv', e.g. if we want to include matching record fields we need+-- to know if the corresponding record fields define field selectors, for which+-- we need to consult the 'GREInfo'. This is why this datatype is a GADT.+--+-- See Note [IfGlobalRdrEnv].+data LookupGRE info where+ -- | Look for this specific 'OccName', with the exact same 'NameSpace',+ -- in the 'GlobalRdrEnv'.+ LookupOccName :: OccName -- ^ the 'OccName' to look up+ -> WhichGREs info+ -- ^ information about other relevant 'NameSpace's+ -> LookupGRE info++ -- | Look up the 'OccName' of this 'RdrName' in the 'GlobalRdrEnv',+ -- filtering out those whose qualification matches that of the 'RdrName'.+ --+ -- Lookup returns an empty result for 'Exact' or 'Orig' 'RdrName's.+ LookupRdrName :: RdrName -- ^ the 'RdrName' to look up+ -> WhichGREs info+ -- ^ information about other relevant 'NameSpace's+ -> LookupGRE info++ -- | Look for 'GRE's with the same unique as the given 'Name'+ -- in the 'GlobalRdrEnv'.+ LookupExactName+ :: { lookupExactName :: Name+ -- ^ the 'Name' to look up+ , lookInAllNameSpaces :: Bool+ -- ^ whether to look in *all* 'NameSpace's, or just+ -- in the 'NameSpace' of the 'Name'+ -- See Note [Template Haskell ambiguity]+ }+ -> LookupGRE info++ -- | Look up children 'GlobalRdrElt's with a given 'Parent'.+ LookupChildren+ :: OccName -- ^ the 'OccName' to look up+ -> LookupChild+ -- ^ information to decide which 'GlobalRdrElt's+ -- are valid children after looking up+ -> LookupGRE info++-- | How should we look up in a 'GlobalRdrEnv'?+-- Which 'NameSpace's are considered relevant for a given lookup?+data WhichGREs info where+ -- | Only consider 'GlobalRdrElt's with the exact 'NameSpace' we look up.+ SameNameSpace :: WhichGREs info+ -- | Allow 'GlobalRdrElt's with different 'NameSpace's, e.g. allow looking up+ -- record fields from the variable 'NameSpace', or looking up a 'TyCon' from+ -- the data constructor 'NameSpace'.+ RelevantGREs+ :: { includeFieldSelectors :: !FieldsOrSelectors+ -- ^ how should we handle looking up variables?+ --+ -- - should we include record fields defined with @-XNoFieldSelectors@?+ -- - should we include non-fields?+ --+ -- See Note [NoFieldSelectors].+ , lookupVariablesForFields :: !Bool+ -- ^ when looking up a record field, should we also look up plain variables?+ , lookupTyConsAsWell :: !Bool+ -- ^ when looking up a variable, field or data constructor, should we+ -- also try the type constructor 'NameSpace'?+ }+ -> WhichGREs GREInfo++-- | Look up as many possibly relevant 'GlobalRdrElt's as possible.+pattern AllRelevantGREs :: WhichGREs GREInfo+pattern AllRelevantGREs =+ RelevantGREs { includeFieldSelectors = WantBoth+ , lookupVariablesForFields = True+ , lookupTyConsAsWell = True }++-- | Look up relevant GREs, taking into account the interaction between the+-- variable and field 'NameSpace's as determined by the 'FieldsOrSelector'+-- argument.+pattern RelevantGREsFOS :: FieldsOrSelectors -> WhichGREs GREInfo+pattern RelevantGREsFOS fos <- RelevantGREs { includeFieldSelectors = fos }+ where+ RelevantGREsFOS fos =+ RelevantGREs { includeFieldSelectors = fos+ , lookupVariablesForFields = fos == WantBoth+ , lookupTyConsAsWell = False }++data LookupChild+ = LookupChild+ { wantedParent :: Name+ -- ^ the parent we are looking up children of+ , lookupDataConFirst :: Bool+ -- ^ for type constructors, should we look in the data constructor+ -- namespace first?+ , prioritiseParent :: Bool+ -- ^ should we prioritise getting the right 'Parent'?+ --+ -- - @True@: prioritise getting the right 'Parent'+ -- - @False@: prioritise getting the right 'NameSpace'+ --+ -- See Note [childGREPriority].+ }++-- | After looking up something with the given 'NameSpace', is the resulting+-- 'GlobalRdrElt' we have obtained relevant, according to the 'RelevantGREs'+-- specification of which 'NameSpace's are relevant?+greIsRelevant :: WhichGREs GREInfo -- ^ specification of which 'GlobalRdrElt's to consider relevant+ -> NameSpace -- ^ the 'NameSpace' of the thing we are looking up+ -> GlobalRdrElt -- ^ the 'GlobalRdrElt' we have looked up, in a+ -- potentially different 'NameSpace' than we wanted+ -> Bool+greIsRelevant which_gres ns gre+ | ns == other_ns+ = True+ | otherwise+ = case which_gres of+ SameNameSpace -> False+ RelevantGREs { includeFieldSelectors = fos+ , lookupVariablesForFields = vars_for_flds+ , lookupTyConsAsWell = tycons_too }+ | ns == varName+ -> (isFieldNameSpace other_ns && allowGRE fos gre) || tc_too+ | isFieldNameSpace ns+ -> vars_for_flds &&+ ( other_ns == varName+ || (isFieldNameSpace other_ns && allowGRE fos gre)+ || tc_too )+ | isDataConNameSpace ns+ -> tc_too+ | otherwise+ -> False+ where+ tc_too = tycons_too && isTcClsNameSpace other_ns+ where+ other_ns = greNameSpace gre++{- Note [childGREPriority]+~~~~~~~~~~~~~~~~~~~~~~~~~~+There are currently two places in the compiler where we look up GlobalRdrElts+which have a given Parent. These are the two calls to lookupSubBndrOcc_helper:++ A. Looking up children in an export item, e.g.++ module M ( T(MkT, D) ) where { data T = MkT; data D = D }++ B. Looking up binders in a class or instance declaration, e.g.+ the operator +++ in the fixity declaration:++ class C a where { type (+++) :: a -> a ->; infixl 6 +++ }+ (+++) :: Int -> Int -> Int; (+++) = (+)++In these two situations, there are two competing metrics for finding the "best"+'GlobalRdrElt' that a particular 'OccName' resolves to:++ - does the resolved 'GlobalRdrElt' have the correct parent?+ - does the resolved 'GlobalRdrElt' have the same 'NameSpace' as the 'OccName'?++(A) and (B) have competing requirements.++For the example of (A) above, we know that the child 'D' of 'T' must live+in the data namespace, so we look up the OccName 'OccName DataName "D"' and+prioritise the lookup results based on the 'NameSpace'.+This means we get an error message of the form:++ The type constructor 'T' is not the parent of the data constructor 'D'.++as opposed to the rather unhelpful and confusing:++ The type constructor 'T' is not the parent of the type constructor 'D'.++See test case T11970.++For the example of (B) above, the fixity declaration for +++ lies inside the+class, so we should prioritise looking up 'GlobalRdrElt's whose parent is 'C'.+Not doing so led to #23664.+-}++-- | Scoring priority function for looking up children 'GlobalRdrElt'.+--+-- We score by 'Parent' and 'NameSpace', with higher priorities having lower+-- numbers. Which lexicographic order we use ('Parent' or 'NameSpace' first)+-- is determined by the first argument; see Note [childGREPriority].+childGREPriority :: LookupChild -- ^ what kind of child do we want,+ -- e.g. what should its parent be?+ -> NameSpace -- ^ what 'NameSpace' are we originally looking in?+ -> GlobalRdrEltX info+ -- ^ the result of looking up; it might be in a different+ -- 'NameSpace', which is used to determine the score+ -- (in the first component)+ -> Maybe (Int, Int)+childGREPriority (LookupChild { wantedParent = wanted_parent+ , lookupDataConFirst = try_dc_first+ , prioritiseParent = par_first })+ ns gre =+ case child_ns_prio $ greNameSpace gre of+ Nothing -> Nothing+ Just ns_prio ->+ let par_prio = parent_prio $ greParent gre+ in Just $ if par_first+ then (par_prio, ns_prio)+ else (ns_prio, par_prio)+ -- See Note [childGREPriority].++ where+ -- Pick out the possible 'NameSpace's in order of priority.+ child_ns_prio :: (NameSpace -> Maybe Int)+ child_ns_prio other_ns+ | other_ns == ns+ = Just 0+ | isTermVarOrFieldNameSpace ns+ , isTermVarOrFieldNameSpace other_ns+ = Just 0+ | isValNameSpace varName+ , other_ns == tcName+ -- When looking up children, we sometimes want a value name+ -- to resolve to a type constructor.+ -- For example, for an infix declaration "infixr 3 +!" or "infix 2 `Fun`"+ -- inside a class declaration, we want to account for the possibility+ -- that the identifier refers to an associated type (type constructor+ -- NameSpace), when otherwise "+!" would be in the term-level variable+ -- NameSpace, and "Fun" would be in the term-level data constructor+ -- NameSpace. See tests T10816, T23664, T24037.+ = Just 1+ | ns == tcName+ , other_ns == dataName+ , try_dc_first -- try data namespace before type/class namespace?+ = Just (-1)+ | otherwise+ = Nothing++ parent_prio :: Parent -> Int+ parent_prio (ParentIs other_parent)+ | other_parent == wanted_parent = 0+ | otherwise = 1+ parent_prio NoParent = 0++-- | Look something up in the Global Reader Environment.+--+-- The 'LookupGRE' argument specifies what to look up, and in particular+-- whether there should there be any lee-way if the 'NameSpace's don't+-- exactly match.+lookupGRE :: GlobalRdrEnvX info -> LookupGRE info -> [GlobalRdrEltX info]+lookupGRE env = \case+ LookupOccName occ which_gres ->+ case which_gres of+ SameNameSpace ->+ concat $ lookupOccEnv env occ+ rel@(RelevantGREs{}) ->+ filter (greIsRelevant rel (occNameSpace occ)) $+ concat $ lookupOccEnv_AllNameSpaces env occ+ LookupRdrName rdr rel ->+ pickGREs rdr $ lookupGRE env (LookupOccName (rdrNameOcc rdr) rel)+ LookupExactName { lookupExactName = nm+ , lookInAllNameSpaces = all_ns } ->+ [ gre | gre <- lkup, greName gre == nm ]+ where+ occ = nameOccName nm+ lkup | all_ns = concat $ lookupOccEnv_AllNameSpaces env occ+ | otherwise = fromMaybe [] $ lookupOccEnv env occ+ LookupChildren occ which_child ->+ let ns = occNameSpace occ+ all_gres = concat $ lookupOccEnv_AllNameSpaces env occ+ in highestPriorityGREs (childGREPriority which_child ns) all_gres++-- | Collect the 'GlobalRdrElt's with the highest priority according+-- to the given function (lower value <=> higher priority).+--+-- This allows us to first look in e.g. the data 'NameSpace', and then fall back+-- to the type/class 'NameSpace'.+highestPriorityGREs :: forall gre prio+ . Ord prio+ => (gre -> Maybe prio)+ -- ^ priority function+ -- lower value <=> higher priority+ -> [gre] -> [gre]+highestPriorityGREs priority gres =+ take_highest_prio $ NE.group $ sort+ [ S.Arg prio gre+ | gre <- gres+ , prio <- maybeToList $ priority gre ]+ where+ take_highest_prio :: [NE.NonEmpty (S.Arg prio gre)] -> [gre]+ take_highest_prio [] = []+ take_highest_prio (fs:_) = map (\ (S.Arg _ gre) -> gre) $ NE.toList fs+{-# INLINEABLE highestPriorityGREs #-}++-- | Look for precisely this 'Name' in the environment,+-- in the __same 'NameSpace'__ as the 'Name'.+--+-- This tests whether it is in scope, ignoring anything+-- else that might be in scope which doesn't have the same 'Unique'.+lookupGRE_Name :: Outputable info => GlobalRdrEnvX info -> Name -> Maybe (GlobalRdrEltX info)+lookupGRE_Name env name =+ case lookupGRE env (LookupExactName { lookupExactName = name+ , lookInAllNameSpaces = False }) of+ [] -> Nothing+ [gre] -> Just gre+ gres -> pprPanic "lookupGRE_Name"+ (ppr name $$ ppr (nameOccName name) $$ ppr gres)+ -- See INVARIANT 1 on GlobalRdrEnv++-- | Look for a particular record field selector in the environment.+lookupGRE_FieldLabel :: GlobalRdrEnv -> FieldLabel -> Maybe FieldGlobalRdrElt+lookupGRE_FieldLabel env fl =+ case lookupGRE_Name env (flSelector fl) of+ Nothing -> Nothing+ Just gre ->+ assertPpr (isRecFldGRE gre)+ (vcat [ text "lookupGre_FieldLabel:" <+> ppr fl ]) $+ Just gre++getGRE_NameQualifier_maybes :: GlobalRdrEnv -> Name -> [Maybe [ModuleName]]+-- Returns all the qualifiers by which 'x' is in scope+-- Nothing means "the unqualified version is in scope"+-- [] means the thing is not in scope at all+getGRE_NameQualifier_maybes env name+ = case lookupGRE_Name env name of+ Just gre -> [qualifier_maybe gre]+ Nothing -> []+ where+ qualifier_maybe (GRE { gre_lcl = lcl, gre_imp = iss })+ | lcl = Nothing+ | otherwise = Just $ map (is_as . is_decl) (bagToList iss)++-- | Is this 'GlobalRdrElt' defined locally?+isLocalGRE :: GlobalRdrEltX info -> Bool+isLocalGRE (GRE { gre_lcl = lcl }) = lcl++-- | Is this 'GlobalRdrElt' imported?+--+-- Not just the negation of 'isLocalGRE', because it might be an Exact or+-- Orig name reference. See Note [GlobalRdrElt provenance].+isImportedGRE :: GlobalRdrEltX info -> Bool+isImportedGRE (GRE { gre_imp = imps }) = not $ isEmptyBag imps++-- | Is this a record field GRE?+--+-- Important: does /not/ consult the 'GreInfo' field.+isRecFldGRE :: GlobalRdrEltX info -> Bool+isRecFldGRE (GRE { gre_name = nm }) = isFieldName nm++isDuplicateRecFldGRE :: GlobalRdrElt -> Bool+-- ^ Is this a record field defined with DuplicateRecordFields?+isDuplicateRecFldGRE =+ maybe False ((DuplicateRecordFields ==) . flHasDuplicateRecordFields) . greFieldLabel_maybe++isNoFieldSelectorGRE :: GlobalRdrElt -> Bool+-- ^ Is this a record field defined with NoFieldSelectors?+-- (See Note [NoFieldSelectors] in GHC.Rename.Env)+isNoFieldSelectorGRE =+ maybe False ((NoFieldSelectors ==) . flHasFieldSelector) . greFieldLabel_maybe++isFieldSelectorGRE :: GlobalRdrElt -> Bool+-- ^ Is this a record field defined with FieldSelectors?+-- (See Note [NoFieldSelectors] in GHC.Rename.Env)+isFieldSelectorGRE =+ maybe False ((FieldSelectors ==) . flHasFieldSelector) . greFieldLabel_maybe++greFieldLabel_maybe :: GlobalRdrElt -> Maybe FieldLabel+-- ^ Returns the field label of this GRE, if it has one+greFieldLabel_maybe = fmap fieldGRELabel . fieldGRE_maybe++unQualOK :: GlobalRdrEltX info -> Bool+-- ^ Test if an unqualified version of this thing would be in scope+unQualOK (GRE {gre_lcl = lcl, gre_imp = iss })+ | lcl = True+ | otherwise = any unQualSpecOK iss++{- Note [GRE filtering]+~~~~~~~~~~~~~~~~~~~~~~~+(pickGREs rdr gres) takes a list of GREs which have the same OccName+as 'rdr', say "x". It does two things:++(a) filters the GREs to a subset that are in scope+ * Qualified, as 'M.x' if want_qual is Qual M _+ * Unqualified, as 'x' if want_unqual is Unqual _++(b) for that subset, filter the provenance field (gre_lcl and gre_imp)+ to ones that brought it into scope qualified or unqualified resp.++Example:+ module A ( f ) where+ import qualified Foo( f )+ import Baz( f )+ f = undefined++Let's suppose that Foo.f and Baz.f are the same entity really, but the local+'f' is different, so there will be two GREs matching "f":+ gre1: gre_lcl = True, gre_imp = []+ gre2: gre_lcl = False, gre_imp = [ imported from Foo, imported from Bar ]++The use of "f" in the export list is ambiguous because it's in scope+from the local def and the import Baz(f); but *not* the import qualified Foo.+pickGREs returns two GRE+ gre1: gre_lcl = True, gre_imp = []+ gre2: gre_lcl = False, gre_imp = [ imported from Bar ]++Now the "ambiguous occurrence" message can correctly report how the+ambiguity arises.+-}++pickGREs :: RdrName -> [GlobalRdrEltX info] -> [GlobalRdrEltX info]+-- ^ Takes a list of GREs which have the right OccName 'x'+-- 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 _+--+-- Return each such GRE, with its ImportSpecs filtered, to reflect+-- how it is in scope qualified or unqualified respectively.+-- See Note [GRE filtering]+pickGREs (Unqual {}) gres = mapMaybe pickUnqualGRE gres+pickGREs (Qual mod _) gres = mapMaybe (pickQualGRE mod) gres+pickGREs _ _ = [] -- I don't think this actually happens++pickUnqualGRE :: GlobalRdrEltX info -> Maybe (GlobalRdrEltX info)+pickUnqualGRE gre@(GRE { gre_lcl = lcl, gre_imp = iss })+ | not lcl, null iss' = Nothing+ | otherwise = Just (gre { gre_imp = iss' })+ where+ iss' = filterBag unQualSpecOK iss++pickQualGRE :: ModuleName -> GlobalRdrEltX info -> Maybe (GlobalRdrEltX info)+pickQualGRE mod gre@(GRE { gre_lcl = lcl, gre_imp = iss })+ | not lcl', null iss' = Nothing+ | otherwise = Just (gre { gre_lcl = lcl', gre_imp = iss' })+ where+ iss' = filterBag (qualSpecOK mod) iss+ lcl' = lcl && name_is_from mod++ name_is_from :: ModuleName -> Bool+ name_is_from mod = case greDefinitionModule gre of+ Just n_mod -> moduleName n_mod == mod+ Nothing -> False++pickGREsModExp :: ModuleName -> [GlobalRdrEltX info] -> [(GlobalRdrEltX info,GlobalRdrEltX info)]+-- ^ Pick GREs that are in scope *both* qualified *and* unqualified+-- Return each GRE that is, as a pair+-- (qual_gre, unqual_gre)+-- These two GREs are the original GRE with imports filtered to express how+-- it is in scope qualified an unqualified respectively+--+-- Used only for the 'module M' item in export list;+-- see 'GHC.Tc.Gen.Export.exports_from_avail'+pickGREsModExp mod gres = mapMaybe (pickBothGRE mod) gres++-- | isBuiltInSyntax filter out names for built-in syntax They+-- just clutter up the environment (esp tuples), and the+-- parser will generate Exact RdrNames for them, so the+-- cluttered envt is no use. Really, it's only useful for+-- GHC.Base and GHC.Tuple.+pickBothGRE :: ModuleName -> GlobalRdrEltX info -> Maybe (GlobalRdrEltX info, GlobalRdrEltX info)+pickBothGRE mod gre+ | isBuiltInSyntax (greName gre)+ = Nothing+ | Just gre1 <- pickQualGRE mod gre+ , Just gre2 <- pickUnqualGRE gre+ = Just (gre1, gre2)+ | otherwise+ = Nothing++-- Building GlobalRdrEnvs++plusGlobalRdrEnv :: GlobalRdrEnv -> GlobalRdrEnv -> GlobalRdrEnv+plusGlobalRdrEnv env1 env2 = plusOccEnv_C (foldr insertGRE) env1 env2++mkGlobalRdrEnv :: [GlobalRdrElt] -> GlobalRdrEnv+mkGlobalRdrEnv gres+ = foldr add emptyGlobalRdrEnv gres+ where+ add gre env = extendOccEnv_Acc insertGRE Utils.singleton env+ (greOccName gre)+ gre++insertGRE :: GlobalRdrElt -> [GlobalRdrElt] -> [GlobalRdrElt]+insertGRE new_g [] = [new_g]+insertGRE new_g (old_g : old_gs)+ | greName new_g == greName old_g+ = new_g `plusGRE` old_g : old_gs+ | otherwise+ = old_g : insertGRE new_g old_gs++plusGRE :: GlobalRdrElt -> GlobalRdrElt -> GlobalRdrElt+-- Used when the gre_name fields match+plusGRE g1 g2+ = GRE { gre_name = gre_name g1+ , gre_lcl = gre_lcl g1 || gre_lcl g2+ , gre_imp = gre_imp g1 `unionBags` gre_imp g2+ , gre_par = gre_par g1 `plusParent` gre_par g2+ , gre_info = gre_info g1 `plusGREInfo` gre_info g2 }++transformGREs :: (GlobalRdrElt -> GlobalRdrElt)+ -> [OccName]+ -> GlobalRdrEnv -> GlobalRdrEnv+-- ^ Apply a transformation function to the GREs for these OccNames+transformGREs trans_gre occs rdr_env+ = foldr trans rdr_env occs+ where+ trans occ env+ = case lookupOccEnv env occ of+ Just gres -> extendOccEnv env occ (map trans_gre gres)+ Nothing -> env++extendGlobalRdrEnv :: GlobalRdrEnv -> GlobalRdrElt -> GlobalRdrEnv+extendGlobalRdrEnv env gre+ = extendOccEnv_Acc insertGRE Utils.singleton env+ (greOccName gre) gre++{- Note [GlobalRdrEnv shadowing]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Before adding new names to the GlobalRdrEnv we nuke some existing entries;+this is "shadowing". The actual work is done by GHC.Types.Name.Reader.shadowNames.+Suppose++ env' = shadowNames env { f } `extendGlobalRdrEnv` { M.f }++Then:+ * Looking up (Unqual f) in env' should succeed, returning M.f,+ even if env contains existing unqualified bindings for f.+ They are shadowed++ * Looking up (Qual M.f) in env' should succeed, returning M.f++ * Looking up (Qual X.f) in env', where X /= M, should be the same as+ looking up (Qual X.f) in env.++ That is, shadowNames does /not/ delete earlier qualified bindings++There are two reasons for shadowing:++* The GHCi REPL++ - Ids bought into scope on the command line (eg let x = True) have+ External Names, like Ghci4.x. We want a new binding for 'x' (say)+ to override the existing binding for 'x'. Example:++ ghci> :load M -- Brings `x` and `M.x` into scope+ ghci> x+ ghci> "Hello"+ ghci> M.x+ ghci> "hello"+ ghci> let x = True -- Shadows `x`+ ghci> x -- The locally bound `x`+ -- NOT an ambiguous reference+ ghci> True+ ghci> M.x -- M.x is still in scope!+ ghci> "Hello"++ So when we add `x = True` we must not delete the `M.x` from the+ `GlobalRdrEnv`; rather we just want to make it "qualified only";+ hence the `set_qual` in `shadowNames`. See also Note+ [Interactively-bound Ids in GHCi] in GHC.Runtime.Context++ - 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+ See Note [Top-level Names in Template Haskell decl quotes] in GHC.Rename.Names++ Consider a TH decl quote:+ module M where+ f x = h [d| f = ...f...M.f... |]+ We must shadow the outer unqualified binding of 'f', else we'll get+ a complaint when extending the GlobalRdrEnv, saying that there are+ two bindings for 'f'. There are several tricky points:++ - This shadowing applies even if the binding for 'f' is in a+ where-clause, and hence is in the *local* RdrEnv not the *global*+ RdrEnv. This is done in lcl_env_TH in extendGlobalRdrEnvRn.++ - The External Name M.f from the enclosing module must certainly+ still be available. So we don't nuke it entirely; we just make+ it seem like qualified import.++ - We only shadow *External* names (which come from the main module),+ or from earlier GHCi commands. Do not shadow *Internal* names+ because in the bracket+ [d| class C a where f :: a+ f = 4 |]+ rnSrcDecls will first call extendGlobalRdrEnvRn with C[f] from the+ class decl, and *separately* extend the envt with the value binding.+ At that stage, the class op 'f' will have an Internal name.++Wrinkle [Shadowing namespaces]++ In the following GHCi session:++ > data A = MkA { foo :: Int }+ > foo = False+ > bar = foo++ We expect the variable 'foo' to shadow the record field 'foo', even though+ they are in separate namespaces, so that the occurrence of 'foo' in the body+ of 'bar' is not ambiguous.++-}++shadowNames :: Bool -- ^ discard names that are only available qualified?+ -> GlobalRdrEnv -> GlobalRdrEnv -> GlobalRdrEnv+-- Remove certain old GREs that share the same OccName as this new Name.+-- See Note [GlobalRdrEnv shadowing] for details+shadowNames drop_only_qualified env new_gres = minusOccEnv_C_Ns do_shadowing env new_gres+ where++ do_shadowing :: UniqFM NameSpace [GlobalRdrElt]+ -> UniqFM NameSpace [GlobalRdrElt]+ -> UniqFM NameSpace [GlobalRdrElt]+ do_shadowing olds news =+ -- Start off by accumulating all 'NameSpace's shadowed+ -- by the entire collection of new GREs.+ let shadowed_gres :: ShadowedGREs+ shadowed_gres =+ nonDetFoldUFM (\ gres shads -> foldMap greShadowedNameSpaces gres S.<> shads)+ mempty news++ -- Then shadow the old 'GlobalRdrElt's, now that we know which 'NameSpace's+ -- should be shadowed.+ shadow_list :: Unique -> [GlobalRdrElt] -> Maybe [GlobalRdrElt]+ shadow_list old_ns old_gres =+ case namespace_is_shadowed old_ns shadowed_gres of+ IsNotShadowed -> Just old_gres+ IsShadowed -> guard_nonEmpty $ mapMaybe shadow old_gres+ IsShadowedIfFieldSelector ->+ guard_nonEmpty $+ mapMaybe (\ old_gre -> if isFieldSelectorGRE old_gre then shadow old_gre else Just old_gre)+ old_gres++ -- Now do all of the shadowing in a single go. This avoids traversing+ -- the old GlobalRdrEnv multiple times over.+ in mapMaybeWithKeyUFM shadow_list olds++ guard_nonEmpty :: [a] -> Maybe [a]+ guard_nonEmpty xs | null xs = Nothing+ | otherwise = Just xs++ -- Shadow a single GRE, by either qualifying it or removing it entirely.+ shadow :: GlobalRdrElt-> Maybe GlobalRdrElt+ shadow old_gre@(GRE { gre_lcl = lcl, gre_imp = iss }) =+ case greDefinitionModule old_gre of+ Nothing -> Just old_gre -- Old name is Internal; do not shadow+ Just old_mod+ | null iss' -- Nothing remains+ || drop_only_qualified+ -> Nothing++ | otherwise+ -> Just (old_gre { gre_lcl = False, gre_imp = iss' })++ where+ iss' = lcl_imp `unionBags` mapBag set_qual iss+ lcl_imp | lcl = unitBag $ mk_fake_imp_spec old_gre old_mod+ | otherwise = emptyBag++ mk_fake_imp_spec old_gre old_mod -- Urgh!+ = ImpSpec id_spec ImpAll+ where+ old_mod_name = moduleName old_mod+ id_spec = ImpDeclSpec { is_mod = old_mod+ , is_as = old_mod_name+ , is_qual = True+ , is_dloc = greDefinitionSrcSpan old_gre }++ set_qual :: ImportSpec -> ImportSpec+ set_qual is = is { is_decl = (is_decl is) { is_qual = True } }++-- | @greClashesWith new_gre old_gre@ computes whether @new_gre@ clashes+-- with @old_gre@ (assuming they both have the same underlying 'occNameFS').+greClashesWith :: GlobalRdrElt -> (GlobalRdrElt -> Bool)+greClashesWith new_gre old_gre =+ old_gre `greIsShadowed` greShadowedNameSpaces new_gre++-- | Is the given 'GlobalRdrElt' shadowed, as specified by the 'ShadowedNameSpace's?+greIsShadowed :: GlobalRdrElt -> ShadowedGREs -> Bool+greIsShadowed old_gre shadowed =+ case getUnique old_ns `namespace_is_shadowed` shadowed of+ IsShadowed -> True+ IsNotShadowed -> False+ IsShadowedIfFieldSelector -> isFieldSelectorGRE old_gre+ where+ old_ns = occNameSpace $ greOccName old_gre+++-- | Whether a 'GlobalRdrElt' is definitely shadowed, definitely not shadowed,+-- or conditionally shadowed based on more information beyond the 'NameSpace'.+data IsShadowed+ -- | The GRE is not shadowed.+ = IsNotShadowed+ -- | The GRE is shadowed.+ | IsShadowed+ -- | The GRE is shadowed iff it is a record field GRE+ -- which defines a field selector (i.e. FieldSelectors is enabled in its+ -- defining module).+ | IsShadowedIfFieldSelector++-- | Internal function: is a 'GlobalRdrElt' with the 'NameSpace' with given+-- 'Unique' shadowed by the specified 'ShadowedGREs'?+namespace_is_shadowed :: Unique -> ShadowedGREs -> IsShadowed+namespace_is_shadowed old_ns (ShadowedGREs shadowed_nonflds shadowed_flds)+ | isFldNSUnique old_ns+ = case shadowed_flds of+ ShadowAllFieldGREs -> IsShadowed+ ShadowFieldSelectorsAnd shadowed+ | old_ns `elemUniqSet_Directly` shadowed+ -> IsShadowed+ | otherwise+ -> IsShadowedIfFieldSelector+ ShadowFieldNameSpaces shadowed+ | old_ns `elemUniqSet_Directly` shadowed+ -> IsShadowed+ | otherwise+ -> IsNotShadowed+ | old_ns `elemUniqSet_Directly` shadowed_nonflds+ = IsShadowed+ | otherwise+ = IsNotShadowed++-- | What are all the 'GlobalRdrElt's that are shadowed by this new 'GlobalRdrElt'?+greShadowedNameSpaces :: GlobalRdrElt -> ShadowedGREs+greShadowedNameSpaces gre = ShadowedGREs shadowed_nonflds shadowed_flds+ where+ ns = occNameSpace $ greOccName gre+ !shadowed_nonflds+ | isFieldNameSpace ns+ -- A new record field shadows variables if it defines a field selector.+ = if isFieldSelectorGRE gre+ then unitUniqSet varName+ else emptyUniqSet+ | otherwise+ = unitUniqSet ns+ !shadowed_flds+ | ns == varName+ -- A new variable shadows record fields with field selectors.+ = ShadowFieldSelectorsAnd emptyUniqSet+ | isFieldNameSpace ns+ -- A new record field shadows record fields unless it is a duplicate record field.+ = if isDuplicateRecFldGRE gre+ then ShadowFieldNameSpaces (unitUniqSet ns)+ -- NB: we must still shadow fields with the same constructor name.+ else ShadowAllFieldGREs+ | otherwise+ = ShadowFieldNameSpaces emptyUniqSet++-- | A description of which 'GlobalRdrElt's are shadowed.+data ShadowedGREs+ = ShadowedGREs+ { shadowedNonFieldNameSpaces :: !(UniqSet NameSpace)+ -- ^ These specific non-field 'NameSpace's are shadowed.+ , shadowedFieldGREs :: !ShadowedFieldGREs+ -- ^ These field 'GlobalRdrElt's are shadowed.+ }++-- | A description of which record field 'GlobalRdrElt's are shadowed.+data ShadowedFieldGREs+ -- | All field 'GlobalRdrElt's are shadowed.+ = ShadowAllFieldGREs+ -- | Record field GREs defining field selectors, as well as those+ -- with the explicitly specified field 'NameSpace's, are shadowed.+ | ShadowFieldSelectorsAnd { shadowedFieldNameSpaces :: !(UniqSet NameSpace) }+ -- | These specific field 'NameSpace's are shadowed.+ | ShadowFieldNameSpaces { shadowedFieldNameSpaces :: !(UniqSet NameSpace) }++instance Monoid ShadowedFieldGREs where+ mempty = ShadowFieldNameSpaces { shadowedFieldNameSpaces = emptyUniqSet }++instance Semigroup ShadowedFieldGREs where+ ShadowAllFieldGREs <> _ = ShadowAllFieldGREs+ _ <> ShadowAllFieldGREs = ShadowAllFieldGREs+ ShadowFieldSelectorsAnd ns1 <> ShadowFieldSelectorsAnd ns2 =+ ShadowFieldSelectorsAnd (ns1 S.<> ns2)+ ShadowFieldSelectorsAnd ns1 <> ShadowFieldNameSpaces ns2 =+ ShadowFieldSelectorsAnd (ns1 S.<> ns2)+ ShadowFieldNameSpaces ns1 <> ShadowFieldSelectorsAnd ns2 =+ ShadowFieldSelectorsAnd (ns1 S.<> ns2)+ ShadowFieldNameSpaces ns1 <> ShadowFieldNameSpaces ns2 =+ ShadowFieldNameSpaces (ns1 S.<> ns2)++instance Monoid ShadowedGREs where+ mempty =+ ShadowedGREs+ { shadowedNonFieldNameSpaces = emptyUniqSet+ , shadowedFieldGREs = mempty }++instance Semigroup ShadowedGREs where+ ShadowedGREs nonflds1 flds1 <> ShadowedGREs nonflds2 flds2 =+ ShadowedGREs (nonflds1 S.<> nonflds2) (flds1 S.<> flds2)++{-+************************************************************************+* *+ ImportSpec+* *+************************************************************************+-}++-- | Import Specification+--+-- The 'ImportSpec' of something says how it came to be imported+-- It's quite elaborate so that we can give accurate unused-name warnings.+data ImportSpec = ImpSpec { is_decl :: ImpDeclSpec,+ is_item :: ImpItemSpec }+ deriving( Eq, Data )++-- | Import Declaration Specification+--+-- Describes a particular import declaration and is+-- shared among all the 'Provenance's for that decl+data ImpDeclSpec+ = ImpDeclSpec {+ is_mod :: Module, -- ^ Module imported, e.g. @import Muggle@+ -- Note the @Muggle@ may well not be+ -- the defining module for this thing!++ -- TODO: either should be Module, or there+ -- should be a Maybe UnitId here too.+ is_as :: ModuleName, -- ^ Import alias, e.g. from @as M@ (or @Muggle@ if there is no @as@ clause)+ is_qual :: Bool, -- ^ Was this import qualified?+ is_dloc :: SrcSpan -- ^ The location of the entire import declaration+ } deriving (Eq, Data)++-- | Import Item Specification+--+-- Describes import info a particular Name+data ImpItemSpec+ = ImpAll -- ^ The import had no import list,+ -- or had a hiding list++ | ImpSome {+ is_explicit :: Bool,+ is_iloc :: SrcSpan -- Location of the import item+ } -- ^ The import had an import list.+ -- The 'is_explicit' field is @True@ iff the thing was named+ -- /explicitly/ in the import specs rather+ -- than being imported as part of a "..." group. Consider:+ --+ -- > import C( T(..) )+ --+ -- Here the constructors of @T@ are not named explicitly;+ -- only @T@ is named explicitly.+ deriving (Eq, Data)++bestImport :: NE.NonEmpty ImportSpec -> ImportSpec+-- See Note [Choosing the best import declaration]+bestImport iss = NE.head $ NE.sortBy best iss+ where+ best :: ImportSpec -> ImportSpec -> Ordering+ -- Less means better+ -- Unqualified always wins over qualified; then+ -- import-all wins over import-some; then+ -- earlier declaration wins over later+ best (ImpSpec { is_item = item1, is_decl = d1 })+ (ImpSpec { is_item = item2, is_decl = d2 })+ = (is_qual d1 `compare` is_qual d2) S.<> best_item item1 item2 S.<>+ SrcLoc.leftmost_smallest (is_dloc d1) (is_dloc d2)++ best_item :: ImpItemSpec -> ImpItemSpec -> Ordering+ best_item ImpAll ImpAll = EQ+ best_item ImpAll (ImpSome {}) = LT+ best_item (ImpSome {}) ImpAll = GT+ best_item (ImpSome { is_explicit = e1 })+ (ImpSome { is_explicit = e2 }) = e1 `compare` e2+ -- False < True, so if e1 is explicit and e2 is not, we get GT++{- Note [Choosing the best import declaration]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When reporting unused import declarations we use the following rules.+ (see [wiki:commentary/compiler/unused-imports])++Say that an import-item is either+ * an entire import-all decl (eg import Foo), or+ * a particular item in an import list (eg import Foo( ..., x, ...)).+The general idea is that for each /occurrence/ of an imported name, we will+attribute that use to one import-item. Once we have processed all the+occurrences, any import items with no uses attributed to them are unused,+and are warned about. More precisely:++1. For every RdrName in the program text, find its GlobalRdrElt.++2. Then, from the [ImportSpec] (gre_imp) of that GRE, choose one+ the "chosen import-item", and mark it "used". This is done+ by 'bestImport'++3. After processing all the RdrNames, bleat about any+ import-items that are unused.+ This is done in GHC.Rename.Names.warnUnusedImportDecls.++The function 'bestImport' returns the dominant import among the+ImportSpecs it is given, implementing Step 2. We say import-item A+dominates import-item B if we choose A over B. In general, we try to+choose the import that is most likely to render other imports+unnecessary. Here is the dominance relationship we choose:++ a) import Foo dominates import qualified Foo.++ b) import Foo dominates import Foo(x).++ c) Otherwise choose the textually first one.++Rationale for (a). Consider+ import qualified M -- Import #1+ import M( x ) -- Import #2+ foo = M.x + x++The unqualified 'x' can only come from import #2. The qualified 'M.x'+could come from either, but bestImport picks import #2, because it is+more likely to be useful in other imports, as indeed it is in this+case (see #5211 for a concrete example).++But the rules are not perfect; consider+ import qualified M -- Import #1+ import M( x ) -- Import #2+ foo = M.x + M.y++The M.x will use import #2, but M.y can only use import #1.+-}+++unQualSpecOK :: ImportSpec -> Bool+-- ^ Is in scope unqualified?+unQualSpecOK is = not (is_qual (is_decl is))++qualSpecOK :: ModuleName -> ImportSpec -> Bool+-- ^ Is in scope qualified with the given module?+qualSpecOK mod is = mod == is_as (is_decl is)++importSpecLoc :: ImportSpec -> SrcSpan+importSpecLoc (ImpSpec decl ImpAll) = is_dloc decl+importSpecLoc (ImpSpec _ item) = is_iloc item++importSpecModule :: ImportSpec -> ModuleName+importSpecModule = moduleName . is_mod . is_decl++isExplicitItem :: ImpItemSpec -> Bool+isExplicitItem ImpAll = False+isExplicitItem (ImpSome {is_explicit = exp}) = exp++pprNameProvenance :: GlobalRdrEltX info -> SDoc+-- ^ Print out one place where the name was define/imported+-- (With -dppr-debug, print them all)+pprNameProvenance (GRE { gre_name = name, gre_lcl = lcl, gre_imp = iss })+ = ifPprDebug (vcat pp_provs)+ (head pp_provs)+ where pp_provs = pp_lcl ++ map pp_is (bagToList iss) pp_lcl = if lcl then [text "defined at" <+> ppr (nameSrcLoc name)] else []
GHC/Types/Name/Shape.hs view
@@ -17,16 +17,14 @@ import GHC.Unit.Module -import GHC.Types.Unique.FM import GHC.Types.Avail-import GHC.Types.FieldLabel import GHC.Types.Name import GHC.Types.Name.Env import GHC.Tc.Utils.Monad import GHC.Iface.Env+import GHC.Tc.Errors.Types -import GHC.Utils.Outputable import GHC.Utils.Panic.Plain import Control.Monad@@ -87,7 +85,7 @@ mkNameShape mod_name as = NameShape mod_name as $ mkOccEnv $ do a <- as- n <- availName a : availNamesWithSelectors a+ n <- availName a : availNames a return (occName n, n) -- | Given an existing 'NameShape', merge it with a list of 'AvailInfo's@@ -106,7 +104,7 @@ -- restricted notion of shaping than in Backpack'14: we do shaping -- *as* we do type-checking. Thus, once we shape a signature, its -- exports are *final* and we're not allowed to refine them further,-extendNameShape :: HscEnv -> NameShape -> [AvailInfo] -> IO (Either SDoc NameShape)+extendNameShape :: HscEnv -> NameShape -> [AvailInfo] -> IO (Either HsigShapeMismatchReason NameShape) extendNameShape hsc_env ns as = case uAvailInfos (ns_mod_name ns) (ns_exports ns) as of Left err -> return (Left err)@@ -180,24 +178,14 @@ -- for type constructors, where it is sufficient to substitute the 'availName' -- to induce a substitution on 'availNames'. substNameAvailInfo :: HscEnv -> ShNameSubst -> AvailInfo -> IO AvailInfo-substNameAvailInfo _ env (Avail (NormalGreName n)) = return (Avail (NormalGreName (substName env n)))-substNameAvailInfo _ env (Avail (FieldGreName fl)) =- return (Avail (FieldGreName fl { flSelector = substName env (flSelector fl) }))+substNameAvailInfo _ env (Avail gre) =+ return $ Avail (substName env gre) substNameAvailInfo hsc_env env (AvailTC n ns) = let mb_mod = fmap nameModule (lookupNameEnv env n)- in AvailTC (substName env n) <$> mapM (setNameGreName hsc_env mb_mod) ns--setNameGreName :: HscEnv -> Maybe Module -> GreName -> IO GreName-setNameGreName hsc_env mb_mod gname = case gname of- NormalGreName n -> NormalGreName <$> initIfaceLoad hsc_env (setNameModule mb_mod n)- FieldGreName fl -> FieldGreName <$> setNameFieldSelector hsc_env mb_mod fl+ in AvailTC (substName env n) <$> mapM (setName hsc_env mb_mod) ns --- | Set the 'Module' of a 'FieldSelector'-setNameFieldSelector :: HscEnv -> Maybe Module -> FieldLabel -> IO FieldLabel-setNameFieldSelector _ Nothing f = return f-setNameFieldSelector hsc_env mb_mod (FieldLabel l b has_sel sel) = do- sel' <- initIfaceLoad hsc_env $ setNameModule mb_mod sel- return (FieldLabel l b has_sel sel')+setName :: HscEnv -> Maybe Module -> Name -> IO Name+setName hsc_env mb_mod nm = initIfaceLoad hsc_env (setNameModule mb_mod nm) {- ************************************************************************@@ -224,46 +212,39 @@ -- | Unify two lists of 'AvailInfo's, given an existing substitution @subst@, -- with only name holes from @flexi@ unifiable (all other name holes rigid.)-uAvailInfos :: ModuleName -> [AvailInfo] -> [AvailInfo] -> Either SDoc ShNameSubst+uAvailInfos :: ModuleName -> [AvailInfo] -> [AvailInfo] -> Either HsigShapeMismatchReason ShNameSubst uAvailInfos flexi as1 as2 = -- pprTrace "uAvailInfos" (ppr as1 $$ ppr as2) $- let mkOE as = listToUFM $ do a <- as- n <- availNames a- return (nameOccName n, a)+ let mkOE as = mkOccEnv [(nameOccName n, a) | a <- as, n <- availNames a] in foldM (\subst (a1, a2) -> uAvailInfo flexi subst a1 a2) emptyNameEnv- (nonDetEltsUFM (intersectUFM_C (,) (mkOE as1) (mkOE as2)))+ (nonDetOccEnvElts $ intersectOccEnv_C (,) (mkOE as1) (mkOE as2)) -- Edward: I have to say, this is pretty clever. -- | Unify two 'AvailInfo's, given an existing substitution @subst@, -- with only name holes from @flexi@ unifiable (all other name holes rigid.) uAvailInfo :: ModuleName -> ShNameSubst -> AvailInfo -> AvailInfo- -> Either SDoc ShNameSubst-uAvailInfo flexi subst (Avail (NormalGreName n1)) (Avail (NormalGreName n2)) = uName flexi subst n1 n2-uAvailInfo flexi subst (AvailTC n1 _) (AvailTC n2 _) = uName flexi subst n1 n2-uAvailInfo _ _ a1 a2 = Left $ text "While merging export lists, could not combine"- <+> ppr a1 <+> text "with" <+> ppr a2- <+> parens (text "one is a type, the other is a plain identifier")+ -> Either HsigShapeMismatchReason ShNameSubst+uAvailInfo flexi subst (Avail n1) (Avail n2)+ = uName flexi subst n1 n2+uAvailInfo flexi subst (AvailTC n1 _) (AvailTC n2 _)+ = uName flexi subst n1 n2+uAvailInfo _ _ a1 a2 = Left $ HsigShapeSortMismatch a1 a2 -- | Unify two 'Name's, given an existing substitution @subst@, -- with only name holes from @flexi@ unifiable (all other name holes rigid.)-uName :: ModuleName -> ShNameSubst -> Name -> Name -> Either SDoc ShNameSubst+uName :: ModuleName -> ShNameSubst -> Name -> Name -> Either HsigShapeMismatchReason ShNameSubst uName flexi subst n1 n2 | n1 == n2 = Right subst | isFlexi n1 = uHoleName flexi subst n1 n2 | isFlexi n2 = uHoleName flexi subst n2 n1- | otherwise = Left (text "While merging export lists, could not unify"- <+> ppr n1 <+> text "with" <+> ppr n2 $$ extra)+ | otherwise = Left (HsigShapeNotUnifiable n1 n2 (isHoleName n1 || isHoleName n2)) where isFlexi n = isHoleName n && moduleName (nameModule n) == flexi- extra | isHoleName n1 || isHoleName n2- = text "Neither name variable originates from the current signature."- | otherwise- = empty -- | Unify a name @h@ which 'isHoleName' with another name, given an existing -- substitution @subst@, with only name holes from @flexi@ unifiable (all -- other name holes rigid.) uHoleName :: ModuleName -> ShNameSubst -> Name {- hole name -} -> Name- -> Either SDoc ShNameSubst+ -> Either HsigShapeMismatchReason ShNameSubst uHoleName flexi subst h n = assert (isHoleName h) $ case lookupNameEnv subst h of
GHC/Types/RepType.hs view
@@ -84,12 +84,11 @@ = False -- INVARIANT: the result list is never empty.-typePrimRepArgs :: HasDebugCallStack => Type -> [PrimRep]+typePrimRepArgs :: HasDebugCallStack => Type -> NonEmpty PrimRep typePrimRepArgs ty- | [] <- reps- = [VoidRep]- | otherwise- = reps+ = case reps of+ [] -> VoidRep :| []+ (x:xs) -> x :| xs where reps = typePrimRep ty @@ -124,6 +123,10 @@ | otherwise = NS_Done +-- | Count the arity of a function post-unarisation, including zero-width arguments.+--+-- The post-unarisation arity may be larger than the arity of the original+-- function type. See Note [Unarisation]. countFunRepArgs :: Arity -> Type -> RepArity countFunRepArgs 0 _ = 0@@ -312,8 +315,10 @@ primRepSlot :: PrimRep -> SlotTy primRepSlot VoidRep = pprPanic "primRepSlot" (text "No slot for VoidRep")-primRepSlot LiftedRep = PtrLiftedSlot-primRepSlot UnliftedRep = PtrUnliftedSlot+primRepSlot (BoxedRep mlev) = case mlev of+ Nothing -> panic "primRepSlot: levity polymorphic BoxedRep"+ Just Lifted -> PtrLiftedSlot+ Just Unlifted -> PtrUnliftedSlot primRepSlot IntRep = WordSlot primRepSlot Int8Rep = WordSlot primRepSlot Int16Rep = WordSlot@@ -330,8 +335,8 @@ primRepSlot (VecRep n e) = VecSlot n e slotPrimRep :: SlotTy -> PrimRep-slotPrimRep PtrLiftedSlot = LiftedRep-slotPrimRep PtrUnliftedSlot = UnliftedRep+slotPrimRep PtrLiftedSlot = BoxedRep (Just Lifted)+slotPrimRep PtrUnliftedSlot = BoxedRep (Just Unlifted) slotPrimRep Word64Slot = Word64Rep slotPrimRep WordSlot = WordRep slotPrimRep DoubleSlot = DoubleRep@@ -636,8 +641,10 @@ primRepToRuntimeRep :: PrimRep -> RuntimeRepType primRepToRuntimeRep rep = case rep of VoidRep -> zeroBitRepTy- LiftedRep -> liftedRepTy- UnliftedRep -> unliftedRepTy+ BoxedRep mlev -> case mlev of+ Nothing -> panic "primRepToRuntimeRep: levity polymorphic BoxedRep"+ Just Lifted -> liftedRepTy+ Just Unlifted -> unliftedRepTy IntRep -> intRepDataConTy Int8Rep -> int8RepDataConTy Int16Rep -> int16RepDataConTy@@ -689,7 +696,7 @@ -- AK: It would be nice to figure out and document the difference -- between this and isFunTy at some point. mightBeFunTy ty- | [LiftedRep] <- typePrimRep ty+ | [BoxedRep _] <- typePrimRep ty , Just tc <- tyConAppTyCon_maybe (unwrapType ty) , isDataTyCon tc = False
+ GHC/Types/SaneDouble.hs view
@@ -0,0 +1,48 @@+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}++-- | Double datatype with saner instances+module GHC.Types.SaneDouble+ ( SaneDouble (..)+ )+where++import GHC.Prelude+import GHC.Utils.Binary+import GHC.Float (castDoubleToWord64, castWord64ToDouble)++-- | A newtype wrapper around 'Double' to ensure we never generate a 'Double'+-- that becomes a 'NaN', see instances for details on sanity.+newtype SaneDouble = SaneDouble+ { unSaneDouble :: Double+ }+ deriving (Fractional, Num)++instance Eq SaneDouble where+ (SaneDouble x) == (SaneDouble y) = x == y || (isNaN x && isNaN y)++instance Ord SaneDouble where+ compare (SaneDouble x) (SaneDouble y) = compare (fromNaN x) (fromNaN y)+ where fromNaN z | isNaN z = Nothing+ | otherwise = Just z++instance Show SaneDouble where+ show (SaneDouble x) = show x++-- we need to preserve NaN and infinities, unfortunately the Binary instance for+-- Double does not do this+instance Binary SaneDouble where+ put_ bh (SaneDouble d)+ | isNaN d = putByte bh 1+ | isInfinite d && d > 0 = putByte bh 2+ | isInfinite d && d < 0 = putByte bh 3+ | isNegativeZero d = putByte bh 4+ | otherwise = putByte bh 5 >> put_ bh (castDoubleToWord64 d)+ get bh = getByte bh >>= \case+ 1 -> pure $ SaneDouble (0 / 0)+ 2 -> pure $ SaneDouble (1 / 0)+ 3 -> pure $ SaneDouble ((-1) / 0)+ 4 -> pure $ SaneDouble (-0)+ 5 -> SaneDouble . castWord64ToDouble <$> get bh+ n -> error ("Binary get bh SaneDouble: invalid tag: " ++ show n)+
GHC/Types/SourceFile.hs view
@@ -1,8 +1,11 @@+{-# LANGUAGE PatternSynonyms #-}+ module GHC.Types.SourceFile- ( HscSource(..)+ ( HscSource(HsBootFile, HsigFile, ..)+ , HsBootOrSig(..) , hscSourceToIsBoot , isHsBootOrSig- , isHsigFile+ , isHsBootFile, isHsigFile , hscSourceString ) where@@ -11,45 +14,57 @@ import GHC.Utils.Binary import GHC.Unit.Types --- Note [HscSource types]--- ~~~~~~~~~~~~~~~~~~~~~~--- There are three types of source file for Haskell code:------ * HsSrcFile is an ordinary hs file which contains code,------ * HsBootFile is an hs-boot file, which is used to break--- recursive module imports (there will always be an--- HsSrcFile associated with it), and------ * HsigFile is an hsig file, which contains only type--- signatures and is used to specify signatures for--- modules.------ Syntactically, hs-boot files and hsig files are quite similar: they--- only include type signatures and must be associated with an--- actual HsSrcFile. isHsBootOrSig allows us to abstract over code--- which is indifferent to which. However, there are some important--- differences, mostly owing to the fact that hsigs are proper--- modules (you `import Sig` directly) whereas HsBootFiles are--- temporary placeholders (you `import {-# SOURCE #-} Mod).--- When we finish compiling the true implementation of an hs-boot,--- we replace the HomeModInfo with the real HsSrcFile. An HsigFile, on the--- other hand, is never replaced (in particular, we *cannot* use the--- HomeModInfo of the original HsSrcFile backing the signature, since it--- will export too many symbols.)------ Additionally, while HsSrcFile is the only Haskell file--- which has *code*, we do generate .o files for HsigFile, because--- this is how the recompilation checker figures out if a file--- needs to be recompiled. These are fake object files which--- should NOT be linked against.+{- Note [HscSource types]+~~~~~~~~~~~~~~~~~~~~~~~~~+There are three types of source file for Haskell code: + * HsSrcFile is an ordinary hs file which contains code,++ * HsBootFile is an hs-boot file, which is used to break+ recursive module imports (there will always be an+ HsSrcFile associated with it), and++ * HsigFile is an hsig file, which contains only type+ signatures and is used to specify signatures for+ modules.++Syntactically, hs-boot files and hsig files are quite similar: they+only include type signatures and must be associated with an+actual HsSrcFile. isHsBootOrSig allows us to abstract over code+which is indifferent to which. However, there are some important+differences, mostly owing to the fact that hsigs are proper+modules (you `import Sig` directly) whereas HsBootFiles are+temporary placeholders (you `import {-# SOURCE #-} Mod).+When we finish compiling the true implementation of an hs-boot,+we replace the HomeModInfo with the real HsSrcFile. An HsigFile, on the+other hand, is never replaced (in particular, we *cannot* use the+HomeModInfo of the original HsSrcFile backing the signature, since it+will export too many symbols.)++Additionally, while HsSrcFile is the only Haskell file+which has *code*, we do generate .o files for HsigFile, because+this is how the recompilation checker figures out if a file+needs to be recompiled. These are fake object files which+should NOT be linked against.+-}++data HsBootOrSig+ = HsBoot -- ^ .hs-boot file+ | Hsig -- ^ .hsig file+ deriving (Eq, Ord, Show)+ data HscSource- = HsSrcFile -- ^ .hs file- | HsBootFile -- ^ .hs-boot file- | HsigFile -- ^ .hsig file+ -- | .hs file+ = HsSrcFile+ -- | .hs-boot or .hsig file+ | HsBootOrSig !HsBootOrSig deriving (Eq, Ord, Show) +{-# COMPLETE HsSrcFile, HsBootFile, HsigFile #-}+pattern HsBootFile, HsigFile :: HscSource+pattern HsBootFile = HsBootOrSig HsBoot+pattern HsigFile = HsBootOrSig Hsig+ -- | Tests if an 'HscSource' is a boot file, primarily for constructing elements -- of 'BuildModule'. We conflate signatures and modules because they are bound -- in the same namespace; only boot interfaces can be disambiguated with@@ -70,15 +85,18 @@ _ -> return HsigFile hscSourceString :: HscSource -> String-hscSourceString HsSrcFile = ""-hscSourceString HsBootFile = "[boot]"-hscSourceString HsigFile = "[sig]"+hscSourceString HsSrcFile = ""+hscSourceString HsBootFile = "[boot]"+hscSourceString HsigFile = "[sig]" -- See Note [HscSource types] isHsBootOrSig :: HscSource -> Bool-isHsBootOrSig HsBootFile = True-isHsBootOrSig HsigFile = True-isHsBootOrSig _ = False+isHsBootOrSig (HsBootOrSig _) = True+isHsBootOrSig HsSrcFile = False++isHsBootFile :: HscSource -> Bool+isHsBootFile HsBootFile = True+isHsBootFile _ = False isHsigFile :: HscSource -> Bool isHsigFile HsigFile = True
GHC/Types/SourceText.hs view
@@ -1,4 +1,7 @@ {-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE RecordWildCards #-} -- | Source text --@@ -38,6 +41,7 @@ import Data.Data import GHC.Real ( Ratio(..) ) import GHC.Types.SrcLoc+import Control.DeepSeq {- Note [Pragma source text]@@ -95,7 +99,7 @@ -- Note [Literal source text],[Pragma source text] data SourceText- = SourceText String+ = SourceText FastString | NoSourceText -- ^ For when code is generated, e.g. TH, -- deriving. The pretty printer will then make@@ -103,9 +107,14 @@ deriving (Data, Show, Eq ) instance Outputable SourceText where- ppr (SourceText s) = text "SourceText" <+> text s+ ppr (SourceText s) = text "SourceText" <+> ftext s ppr NoSourceText = text "NoSourceText" +instance NFData SourceText where+ rnf = \case+ SourceText s -> rnf s+ NoSourceText -> ()+ instance Binary SourceText where put_ bh NoSourceText = putByte bh 0 put_ bh (SourceText s) = do@@ -124,7 +133,7 @@ -- | Special combinator for showing string literals. pprWithSourceText :: SourceText -> SDoc -> SDoc pprWithSourceText NoSourceText d = d-pprWithSourceText (SourceText src) _ = text src+pprWithSourceText (SourceText src) _ = ftext src ------------------------------------------------ -- Literals@@ -143,7 +152,7 @@ deriving (Data, Show) mkIntegralLit :: Integral a => a -> IntegralLit-mkIntegralLit i = IL { il_text = SourceText (show i_integer)+mkIntegralLit i = IL { il_text = SourceText (fsLit $ show i_integer) , il_neg = i < 0 , il_value = i_integer } where@@ -153,9 +162,9 @@ negateIntegralLit :: IntegralLit -> IntegralLit negateIntegralLit (IL text neg value) = case text of- SourceText ('-':src) -> IL (SourceText src) False (negate value)- SourceText src -> IL (SourceText ('-':src)) True (negate value)- NoSourceText -> IL NoSourceText (not neg) (negate value)+ SourceText (unconsFS -> Just ('-',src)) -> IL (SourceText src) False (negate value)+ SourceText src -> IL (SourceText ('-' `consFS` src)) True (negate value)+ NoSourceText -> IL NoSourceText (not neg) (negate value) -- | Fractional Literal --@@ -206,7 +215,7 @@ mkRationalWithExponentBase i e expBase mkTHFractionalLit :: Rational -> FractionalLit-mkTHFractionalLit r = FL { fl_text = SourceText (show (realToFrac r::Double))+mkTHFractionalLit r = FL { fl_text = SourceText (fsLit $ 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@@ -222,13 +231,14 @@ negateFractionalLit :: FractionalLit -> FractionalLit negateFractionalLit (FL text neg i e eb) = case text of- SourceText ('-':src) -> FL (SourceText src) False (negate i) e eb- SourceText src -> FL (SourceText ('-':src)) True (negate i) e eb+ SourceText (unconsFS -> Just ('-',src))+ -> FL (SourceText src) False (negate i) e eb+ SourceText src -> FL (SourceText ('-' `consFS` src)) True (negate i) e eb NoSourceText -> FL NoSourceText (not neg) (negate i) e eb -- | The integer should already be negated if it's negative. integralFractionalLit :: Bool -> Integer -> FractionalLit-integralFractionalLit neg i = FL { fl_text = SourceText (show i)+integralFractionalLit neg i = FL { fl_text = SourceText (fsLit $ show i) , fl_neg = neg , fl_signi = i :% 1 , fl_exp = 0@@ -238,7 +248,7 @@ mkSourceFractionalLit :: String -> Bool -> Integer -> Integer -> FractionalExponentBase -> FractionalLit-mkSourceFractionalLit !str !b !r !i !ff = FL (SourceText str) b (r :% 1) i ff+mkSourceFractionalLit !str !b !r !i !ff = FL (SourceText $ fsLit str) b (r :% 1) i ff {- Note [fractional exponent bases] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -258,7 +268,7 @@ compare = compare `on` il_value instance Outputable IntegralLit where- ppr (IL (SourceText src) _ _) = text src+ ppr (IL (SourceText src) _ _) = ftext src ppr (IL NoSourceText _ value) = text (show value) @@ -313,12 +323,3 @@ instance Outputable StringLiteral where ppr sl = pprWithSourceText (sl_st sl) (ftext $ sl_fs sl)--instance Binary StringLiteral where- put_ bh (StringLiteral st fs _) = do- put_ bh st- put_ bh fs- get bh = do- st <- get bh- fs <- get bh- return (StringLiteral st fs Nothing)
GHC/Types/SrcLoc.hs view
@@ -64,6 +64,9 @@ isGoodSrcSpan, isOneLineSpan, isZeroWidthSpan, containsSpan, isNoSrcSpan, + -- ** Predicates on RealSrcSpan+ isPointRealSpan,+ -- * StringBuffer locations BufPos(..), getBufPos,
GHC/Types/Tickish.hs view
@@ -25,6 +25,7 @@ ) where import GHC.Prelude+import GHC.Data.FastString import GHC.Core.Type @@ -153,8 +154,8 @@ -- necessary to enable optimizations. | SourceNote { sourceSpan :: RealSrcSpan -- ^ Source covered- , sourceName :: String -- ^ Name for source location- -- (uses same names as CCs)+ , sourceName :: LexicalFastString -- ^ Name for source location+ -- (uses same names as CCs) } deriving instance Eq (GenTickish 'TickishPassCore)
GHC/Types/TyThing.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE LambdaCase #-}+ -- | A global typecheckable-thing, essentially anything that has a name. module GHC.Types.TyThing ( TyThing (..)@@ -15,7 +17,7 @@ , isImplicitTyThing , tyThingParent_maybe , tyThingsTyCoVars- , tyThingAvailInfo+ , tyThingLocalGREs, tyThingGREInfo , tyThingTyCon , tyThingCoAxiom , tyThingDataCon@@ -26,12 +28,14 @@ import GHC.Prelude +import GHC.Types.GREInfo import GHC.Types.Name+import GHC.Types.Name.Reader import GHC.Types.Var import GHC.Types.Var.Set import GHC.Types.Id import GHC.Types.Id.Info-import GHC.Types.Avail+import GHC.Types.Unique.Set import GHC.Core.Class import GHC.Core.DataCon@@ -49,6 +53,11 @@ import Control.Monad.Trans.Reader import Control.Monad.Trans.Class +import Data.List.NonEmpty ( NonEmpty(..) )+import qualified Data.List.NonEmpty as NE+import Data.List ( intersect )++ {- Note [ATyCon for classes] ~~~~~~~~~~~~~~~~~~~~~~~~~@@ -257,7 +266,7 @@ Just (ATyCon tc) RecSelId { sel_tycon = RecSelPatSyn ps } -> Just (AConLike (PatSynCon ps))- ClassOpId cls ->+ ClassOpId cls _ -> Just (ATyCon (classTyCon cls)) _other -> Nothing tyThingParent_maybe _other = Nothing@@ -276,22 +285,90 @@ Nothing -> tyCoVarsOfType $ tyConKind tc ttToVarSet (ACoAxiom _) = emptyVarSet --- | The Names that a TyThing should bring into scope. Used to build--- the GlobalRdrEnv for the InteractiveContext.-tyThingAvailInfo :: TyThing -> [AvailInfo]-tyThingAvailInfo (ATyCon t)- = case tyConClass_maybe t of- Just c -> [availTC n ((n : map getName (classMethods c)- ++ map getName (classATs c))) [] ]- where n = getName c- Nothing -> [availTC n (n : map getName dcs) flds]- where n = getName t- dcs = tyConDataCons t- flds = tyConFieldLabels t-tyThingAvailInfo (AConLike (PatSynCon p))- = avail (getName p) : map availField (patSynFieldLabels p)-tyThingAvailInfo t- = [avail (getName t)]+-- | The 'GlobalRdrElt's that a 'TyThing' should bring into scope.+-- Used to build the 'GlobalRdrEnv' for the InteractiveContext.+tyThingLocalGREs :: TyThing -> [GlobalRdrElt]+tyThingLocalGREs ty_thing =+ case ty_thing of+ ATyCon t+ | Just c <- tyConClass_maybe t+ -> myself NoParent+ : ( map (mkLocalVanillaGRE (ParentIs $ className c) . getName) (classMethods c)+ ++ map tc_GRE (classATs c) )+ | otherwise+ -> let dcs = tyConDataCons t+ par = ParentIs $ tyConName t+ mk_nm = DataConName . dataConName+ in myself NoParent+ : map (dc_GRE par) dcs+ +++ mkLocalFieldGREs par+ [ (mk_nm dc, con_info)+ | dc <- dcs+ , let con_info = conLikeConInfo (RealDataCon dc) ]+ AConLike con ->+ let (par, cons_flds) = case con of+ PatSynCon {} ->+ (NoParent, [(conLikeConLikeName con, conLikeConInfo con)])+ -- NB: NoParent for local pattern synonyms, as per+ -- Note [Parents] in GHC.Types.Name.Reader.+ RealDataCon dc1 ->+ (ParentIs $ tyConName $ dataConTyCon dc1+ , [ (DataConName $ dataConName $ dc, ConHasRecordFields (fld :| flds))+ | dc <- tyConDataCons $ dataConTyCon dc1+ -- Go through all the data constructors of the parent TyCon,+ -- to ensure that all the record fields have the correct set+ -- of parent data constructors. See #23546.+ , let con_info = conLikeConInfo (RealDataCon dc)+ , ConHasRecordFields flds0 <- [con_info]+ , let flds1 = NE.toList flds0 `intersect` dataConFieldLabels dc+ , fld:flds <- [flds1]+ ])+ in myself par : mkLocalFieldGREs par cons_flds+ AnId id+ | RecSelId { sel_tycon = RecSelData tc } <- idDetails id+ -> [ myself (ParentIs $ tyConName tc) ]+ -- Fallback to NoParent for PatSyn record selectors,+ -- as per Note [Parents] in GHC.Types.Name.Reader.+ _ -> [ myself NoParent ]+ where+ tc_GRE :: TyCon -> GlobalRdrElt+ tc_GRE at = mkLocalTyConGRE+ (fmap tyConName $ tyConFlavour at)+ (tyConName at)+ dc_GRE :: Parent -> DataCon -> GlobalRdrElt+ dc_GRE par dc =+ let con_info = conLikeConInfo (RealDataCon dc)+ in mkLocalConLikeGRE par (DataConName $ dataConName dc, con_info)+ myself :: Parent -> GlobalRdrElt+ myself p = mkLocalGRE (tyThingGREInfo ty_thing) p (getName ty_thing)++-- | Obtain information pertinent to the renamer about a particular 'TyThing'.+--+-- This extracts out renamer information from typechecker information.+tyThingGREInfo :: TyThing -> GREInfo+tyThingGREInfo = \case+ AConLike con -> IAmConLike $ conLikeConInfo con+ AnId id -> case idDetails id of+ RecSelId { sel_tycon = parent, sel_fieldLabel = fl } ->+ let relevant_cons = case parent of+ RecSelPatSyn ps -> unitUniqSet $ PatSynName (patSynName ps)+ RecSelData tc ->+ let dcs = map RealDataCon $ tyConDataCons tc in+ case conLikesWithFields dcs [flLabel fl] of+ [] -> pprPanic "tyThingGREInfo: no DataCons with this FieldLabel" $+ vcat [ text "id:" <+> ppr id+ , text "fl:" <+> ppr fl+ , text "dcs:" <+> ppr dcs ]+ cons -> mkUniqSet $ map conLikeConLikeName cons+ in IAmRecField $+ RecFieldInfo+ { recFieldLabel = fl+ , recFieldCons = relevant_cons }+ _ -> Vanilla+ ATyCon tc ->+ IAmTyCon (fmap tyConName $ tyConFlavour tc)+ _ -> Vanilla -- | Get the 'TyCon' from a 'TyThing' if it is a type constructor thing. Panics otherwise tyThingTyCon :: HasDebugCallStack => TyThing -> TyCon
GHC/Types/TyThing/Ppr.hs view
@@ -26,9 +26,9 @@ import GHC.Core.FamInstEnv( FamInst(..), FamFlavor(..) ) import GHC.Core.TyCo.Ppr ( pprUserForAll, pprTypeApp ) +import GHC.Iface.Decl ( tyThingToIfaceDecl ) import GHC.Iface.Syntax ( ShowSub(..), ShowHowMuch(..), AltPpr(..)- , showToHeader, pprIfaceDecl )-import GHC.Iface.Make ( tyThingToIfaceDecl )+ , showToHeader, pprIfaceDecl ) import GHC.Utils.Outputable
+ GHC/Types/TyThing/Ppr.hs-boot view
@@ -0,0 +1,11 @@+module GHC.Types.TyThing.Ppr (+ pprTyThing,+ pprTyThingInContext+ ) where++import GHC.Iface.Type ( ShowSub )+import GHC.Types.TyThing ( TyThing )+import GHC.Utils.Outputable ( SDoc )++pprTyThing :: ShowSub -> TyThing -> SDoc+pprTyThingInContext :: ShowSub -> TyThing -> SDoc
GHC/Types/TypeEnv.hs view
@@ -93,4 +93,3 @@ plusTypeEnv :: TypeEnv -> TypeEnv -> TypeEnv plusTypeEnv env1 env2 = plusNameEnv env1 env2-
GHC/Types/Unique.hs view
@@ -30,12 +30,9 @@ pprUniqueAlways, - mkTag, mkUniqueGrimily,- mkUniqueIntGrimily, getKey, mkUnique, unpkUnique,- mkUniqueInt, eqUnique, ltUnique, incrUnique, stepUnique, @@ -55,12 +52,11 @@ import GHC.Data.FastString import GHC.Utils.Outputable-import GHC.Utils.Word64 (intToWord64, word64ToInt)+import GHC.Utils.Panic.Plain -- just for implementing a fast [0,61) -> Char function import GHC.Exts (indexCharOffAddr#, Char(..), Int(..)) -import GHC.Word ( Word64 ) import Data.Char ( chr, ord ) import Language.Haskell.Syntax.Module.Name@@ -72,19 +68,19 @@ * * ************************************************************************ -Note [Uniques and tags]+Note [Uniques and masks] ~~~~~~~~~~~~~~~~~~~~~~~~-A `Unique` in GHC is a 64 bit value composed of two pieces:-* A "tag", of width `UNIQUE_TAG_BITS`, in the high order bits-* A number, of width `uNIQUE_BITS`, which fills up the remainder of the Word64+A `Unique` in GHC is a Word-sized value composed of two pieces:+* A "mask", of width `UNIQUE_TAG_BITS`, in the high order bits+* A number, of width `uNIQUE_BITS`, which fills up the remainder of the Word -The tag is typically an ASCII character. It is typically used to make it easier+The mask is typically an ASCII character. It is typically used to make it easier to distinguish uniques constructed by different parts of the compiler.-There is a (potentially incomplete) list of unique tags used given in-GHC.Builtin.Uniques. See Note [Uniques for wired-in prelude things and known tags]+There is a (potentially incomplete) list of unique masks used given in+GHC.Builtin.Uniques. See Note [Uniques for wired-in prelude things and known masks] `mkUnique` constructs a `Unique` from its pieces- mkUnique :: Char -> Word64 -> Unique+ mkUnique :: Char -> Int -> Unique -} @@ -95,24 +91,24 @@ -- the functions from the 'UniqSupply' module -- -- These are sometimes also referred to as \"keys\" in comments in GHC.-newtype Unique = MkUnique Word64+newtype Unique = MkUnique Int {-# INLINE uNIQUE_BITS #-} uNIQUE_BITS :: Int-uNIQUE_BITS = 64 - UNIQUE_TAG_BITS+uNIQUE_BITS = finiteBitSize (0 :: Int) - UNIQUE_TAG_BITS {- Now come the functions which construct uniques from their pieces, and vice versa. The stuff about unique *supplies* is handled further down this module. -} -unpkUnique :: Unique -> (Char, Word64) -- The reverse+unpkUnique :: Unique -> (Char, Int) -- The reverse -mkUniqueGrimily :: Word64 -> Unique -- A trap-door for UniqSupply-getKey :: Unique -> Word64 -- for Var+mkUniqueGrimily :: Int -> Unique -- A trap-door for UniqSupply+getKey :: Unique -> Int -- for Var incrUnique :: Unique -> Unique-stepUnique :: Unique -> Word64 -> Unique+stepUnique :: Unique -> Int -> Unique newTagUnique :: Unique -> Char -> Unique mkUniqueGrimily = MkUnique@@ -123,7 +119,7 @@ incrUnique (MkUnique i) = MkUnique (i + 1) stepUnique (MkUnique i) n = MkUnique (i + n) -mkLocalUnique :: Word64 -> Unique+mkLocalUnique :: Int -> Unique mkLocalUnique i = mkUnique 'X' i minLocalUnique :: Unique@@ -135,42 +131,30 @@ -- newTagUnique changes the "domain" of a unique to a different char newTagUnique u c = mkUnique c i where (_,i) = unpkUnique u --- | Bitmask that has zeros for the tag bits and ones for the rest.-uniqueMask :: Word64+-- | How many bits are devoted to the unique index (as opposed to the class+-- character).+uniqueMask :: Int uniqueMask = (1 `shiftL` uNIQUE_BITS) - 1 --- | Put the character in the highest bits of the Word64.--- This may truncate the character to UNIQUE_TAG_BITS.--- This function is used in @`mkSplitUniqSupply`@ so that it can--- precompute and share the tag part of the uniques it generates.-mkTag :: Char -> Word64-mkTag c = intToWord64 (ord c) `shiftL` uNIQUE_BITS- -- pop the Char in the top 8 bits of the Unique(Supply) -- No 64-bit bugs here, as long as we have at least 32 bits. --JSM -- and as long as the Char fits in 8 bits, which we assume anyway! -mkUnique :: Char -> Word64 -> Unique -- Builds a unique from pieces+mkUnique :: Char -> Int -> Unique -- Builds a unique from pieces -- EXPORTED and used only in GHC.Builtin.Uniques mkUnique c i = MkUnique (tag .|. bits) where- tag = mkTag c+ tag = ord c `shiftL` uNIQUE_BITS bits = i .&. uniqueMask -mkUniqueInt :: Char -> Int -> Unique-mkUniqueInt c i = mkUnique c (intToWord64 i)--mkUniqueIntGrimily :: Int -> Unique-mkUniqueIntGrimily = MkUnique . intToWord64- unpkUnique (MkUnique u) = let- -- The potentially truncating use of fromIntegral here is safe- -- because the argument is just the tag bits after shifting.- tag = chr (word64ToInt (u `shiftR` uNIQUE_BITS))+ -- as long as the Char may have its eighth bit set, we+ -- really do need the logical right-shift here!+ tag = chr (u `shiftR` uNIQUE_BITS) i = u .&. uniqueMask in (tag, i)@@ -200,10 +184,10 @@ x `hasKey` k = getUnique x == k instance Uniquable FastString where- getUnique fs = mkUniqueIntGrimily (uniqueOfFS fs)+ getUnique fs = mkUniqueGrimily (uniqueOfFS fs) instance Uniquable Int where- getUnique i = mkUniqueIntGrimily i+ getUnique i = mkUniqueGrimily i instance Uniquable ModuleName where getUnique (ModuleName nm) = getUnique nm@@ -277,7 +261,7 @@ 1) Use UniqFM or UniqDFM, see Note [Deterministic UniqFM] to decide which 2) Create a newtype wrapper based on Unique ordering where nondeterminism- is controlled. See GHC.Unit.Module.Env.ModuleEnv+ is controlled. See Module.ModuleEnv 3) Change the algorithm to use nonDetCmpUnique and document why it's still deterministic 4) Use TrieMap as done in GHC.Cmm.CommonBlockElim.groupByLabel@@ -295,7 +279,7 @@ showUnique :: Unique -> String showUnique uniq = case unpkUnique uniq of- (tag, u) -> tag : w64ToBase62 u+ (tag, u) -> tag : iToBase62 u pprUniqueAlways :: IsLine doc => Unique -> doc -- The "always" means regardless of -dsuppress-uniques@@ -321,20 +305,19 @@ ************************************************************************ A character-stingy way to read/write numbers (notably Uniques).-The ``62-its'' are \tr{[0-9a-zA-Z]}.+The ``62-its'' are \tr{[0-9a-zA-Z]}. We don't handle negative Ints. Code stolen from Lennart. -} -w64ToBase62 :: Word64 -> String-w64ToBase62 n_ = go n_ ""+iToBase62 :: Int -> String+iToBase62 n_+ = assert (n_ >= 0) $ go n_ "" where- -- The potentially truncating uses of fromIntegral here are safe- -- because the argument is guaranteed to be less than 62 in both cases. go n cs | n < 62- = let !c = chooseChar62 (word64ToInt n) in c : cs+ = let !c = chooseChar62 n in c : cs | otherwise = go q (c : cs) where (!q, r) = quotRem n 62- !c = chooseChar62 (word64ToInt r)+ !c = chooseChar62 r chooseChar62 :: Int -> Char {-# INLINE chooseChar62 #-}
GHC/Types/Unique/DFM.hs view
@@ -71,18 +71,18 @@ import GHC.Prelude -import GHC.Types.Unique ( Uniquable(..), Unique, getKey, mkUniqueGrimily )+import GHC.Types.Unique ( Uniquable(..), Unique, getKey ) import GHC.Utils.Outputable -import qualified GHC.Data.Word64Map.Strict as MS-import qualified GHC.Data.Word64Map as M+import qualified Data.IntMap.Strict as MS+import qualified Data.IntMap as M import Data.Data import Data.Functor.Classes (Eq1 (..)) import Data.List (sortBy) import Data.Function (on) import GHC.Types.Unique.FM (UniqFM, nonDetUFMToList, ufmToIntMap, unsafeIntMapToUFM) import Unsafe.Coerce-import qualified GHC.Data.Word64Set as W+import qualified Data.IntSet as I -- Note [Deterministic UniqFM] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -94,7 +94,7 @@ -- order then `udfmToList` returns them in deterministic order. -- -- There is an implementation cost: each element is given a serial number--- as it is added, and `udfmToList` sorts it's result by this serial+-- as it is added, and `udfmToList` sorts its result by this serial -- number. So you should only use `UniqDFM` if you need the deterministic -- property. --@@ -147,7 +147,7 @@ -- very much discouraged. data UniqDFM key ele = UDFM- !(M.Word64Map (TaggedVal ele)) -- A map where keys are Unique's values and+ !(M.IntMap (TaggedVal ele)) -- A map where keys are Unique's values and -- values are tagged with insertion time. -- The invariant is that all the tags will -- be distinct within a single map@@ -290,8 +290,6 @@ -- | Performs a deterministic fold over the UniqDFM. -- It's O(n log n) while the corresponding function on `UniqFM` is O(n). foldUDFM :: (elt -> a -> a) -> a -> UniqDFM key elt -> a-{-# INLINE foldUDFM #-}--- This INLINE prevents a regression in !10568 foldUDFM k z m = foldr k z (eltsUDFM m) -- | Performs a nondeterministic strict fold over the UniqDFM.@@ -308,7 +306,7 @@ -- The INLINE makes it a good producer (from the map) eltsUDFM (UDFM m _i) = map taggedFst (sort_it m) -sort_it :: M.Word64Map (TaggedVal elt) -> [TaggedVal elt]+sort_it :: M.IntMap (TaggedVal elt) -> [TaggedVal elt] sort_it m = sortBy (compare `on` taggedSnd) (M.elems m) filterUDFM :: (elt -> Bool) -> UniqDFM key elt -> UniqDFM key elt@@ -317,12 +315,12 @@ filterUDFM_Directly :: (Unique -> elt -> Bool) -> UniqDFM key elt -> UniqDFM key elt filterUDFM_Directly p (UDFM m i) = UDFM (M.filterWithKey p' m) i where- p' k (TaggedVal v _) = p (mkUniqueGrimily k) v+ p' k (TaggedVal v _) = p (getUnique k) v udfmRestrictKeys :: UniqDFM key elt -> UniqDFM key elt2 -> UniqDFM key elt udfmRestrictKeys (UDFM a i) (UDFM b _) = UDFM (M.restrictKeys a (M.keysSet b)) i -udfmRestrictKeysSet :: UniqDFM key elt -> W.Word64Set -> UniqDFM key elt+udfmRestrictKeysSet :: UniqDFM key elt -> I.IntSet -> UniqDFM key elt udfmRestrictKeysSet (UDFM val_set i) set = let key_set = set in UDFM (M.restrictKeys val_set key_set) i@@ -331,7 +329,7 @@ -- It's O(n log n) while the corresponding function on `UniqFM` is O(n). udfmToList :: UniqDFM key elt -> [(Unique, elt)] udfmToList (UDFM m _i) =- [ (mkUniqueGrimily k, taggedFst v)+ [ (getUnique k, taggedFst v) | (k, v) <- sortBy (compare `on` (taggedSnd . snd)) $ M.toList m ] -- Determines whether two 'UniqDFM's contain the same keys.
GHC/Types/Unique/FM.hs view
@@ -44,7 +44,7 @@ addListToUFM,addListToUFM_C, addToUFM_Directly, addListToUFM_Directly,- adjustUFM, alterUFM,+ adjustUFM, alterUFM, alterUFM_Directly, adjustUFM_Directly, delFromUFM, delFromUFM_Directly,@@ -57,6 +57,7 @@ mergeUFM, plusMaybeUFM_C, plusUFMList,+ plusUFMListWith, sequenceUFMList, minusUFM, minusUFM_C,@@ -64,11 +65,12 @@ intersectUFM_C, disjointUFM, equalKeysUFM,- nonDetStrictFoldUFM, foldUFM, nonDetStrictFoldUFM_DirectlyM,+ nonDetStrictFoldUFM, nonDetFoldUFM, nonDetStrictFoldUFM_DirectlyM,+ nonDetFoldWithKeyUFM, nonDetStrictFoldUFM_Directly, anyUFM, allUFM, seqEltsUFM,- mapUFM, mapUFM_Directly,- mapMaybeUFM,+ mapUFM, mapUFM_Directly, strictMapUFM,+ mapMaybeUFM, mapMaybeWithKeyUFM, elemUFM, elemUFM_Directly, filterUFM, filterUFM_Directly, partitionUFM, sizeUFM,@@ -84,12 +86,12 @@ import GHC.Prelude -import GHC.Types.Unique ( Uniquable(..), Unique, getKey, mkUniqueGrimily )+import GHC.Types.Unique ( Uniquable(..), Unique, getKey ) import GHC.Utils.Outputable import GHC.Utils.Panic.Plain-import qualified GHC.Data.Word64Map as M-import qualified GHC.Data.Word64Map.Strict as MS-import qualified GHC.Data.Word64Set as S+import qualified Data.IntMap as M+import qualified Data.IntMap.Strict as MS+import qualified Data.IntSet as S import Data.Data import qualified Data.Semigroup as Semi import Data.Functor.Classes (Eq1 (..))@@ -103,7 +105,7 @@ -- If two types don't overlap in their uniques it's also safe -- to index the same map at multiple key types. But this is -- very much discouraged.-newtype UniqFM key ele = UFM (M.Word64Map ele)+newtype UniqFM key ele = UFM (M.IntMap ele) deriving (Data, Eq, Functor) -- Nondeterministic Foldable and Traversable instances are accessible through -- use of the 'NonDetUniqFM' wrapper.@@ -165,10 +167,10 @@ addToUFM_C :: Uniquable key- => (elt -> elt -> elt) -- old -> new -> result- -> UniqFM key elt -- old- -> key -> elt -- new- -> UniqFM key elt -- result+ => (elt -> elt -> elt) -- ^ old -> new -> result+ -> UniqFM key elt -- ^ old+ -> key -> elt -- ^ new+ -> UniqFM key elt -- ^ result -- Arguments of combining function of M.insertWith and addToUFM_C are flipped. addToUFM_C f (UFM m) k v = UFM (M.insertWith (flip f) (getKey $ getUnique k) v m)@@ -177,9 +179,9 @@ :: Uniquable key => (elt -> elts -> elts) -- Add to existing -> (elt -> elts) -- New element- -> UniqFM key elts -- old+ -> UniqFM key elts -- old -> key -> elt -- new- -> UniqFM key elts -- result+ -> UniqFM key elts -- result addToUFM_Acc exi new (UFM m) k v = UFM (M.insertWith (\_new old -> exi v old) (getKey $ getUnique k) (new v) m) @@ -188,11 +190,11 @@ -- otherwise compute the element to add using the passed function. addToUFM_L :: Uniquable key- => (key -> elt -> elt -> elt) -- key,old,new+ => (key -> elt -> elt -> elt) -- ^ key,old,new -> key -> elt -- new -> UniqFM key elt- -> (Maybe elt, UniqFM key elt) -- old, result+ -> (Maybe elt, UniqFM key elt) -- ^ old, result addToUFM_L f k v (UFM m) = coerce $ M.insertLookupWithKey@@ -203,12 +205,19 @@ alterUFM :: Uniquable key- => (Maybe elt -> Maybe elt) -- How to adjust- -> UniqFM key elt -- old- -> key -- new- -> UniqFM key elt -- result+ => (Maybe elt -> Maybe elt) -- ^ How to adjust+ -> UniqFM key elt -- ^ old+ -> key -- ^ new+ -> UniqFM key elt -- ^ result alterUFM f (UFM m) k = UFM (M.alter f (getKey $ getUnique k) m) +alterUFM_Directly+ :: (Maybe elt -> Maybe elt) -- ^ How to adjust+ -> UniqFM key elt -- ^ old+ -> Unique -- ^ new+ -> UniqFM key elt -- ^ result+alterUFM_Directly f (UFM m) k = UFM (M.alter f (getKey k) m)+ -- | Add elements to the map, combining existing values with inserted ones using -- the given function. addListToUFM_C@@ -323,6 +332,9 @@ plusUFMList :: [UniqFM key elt] -> UniqFM key elt plusUFMList = foldl' plusUFM emptyUFM +plusUFMListWith :: (elt -> elt -> elt) -> [UniqFM key elt] -> UniqFM key elt+plusUFMListWith f xs = unsafeIntMapToUFM $ M.unionsWith f (map ufmToIntMap xs)+ sequenceUFMList :: forall key elt. [UniqFM key elt] -> UniqFM key [elt] sequenceUFMList = foldr (plusUFM_CD2 cons) emptyUFM where@@ -356,23 +368,39 @@ disjointUFM :: UniqFM key elt1 -> UniqFM key elt2 -> Bool disjointUFM (UFM x) (UFM y) = M.disjoint x y -foldUFM :: (elt -> a -> a) -> a -> UniqFM key elt -> a-foldUFM k z (UFM m) = M.foldr k z m+-- | Fold over a 'UniqFM'.+--+-- Non-deterministic, unless the folding function is commutative+-- (i.e. @a1 `f` ( a2 `f` b ) == a2 `f` ( a1 `f` b )@ for all @a1@, @a2@, @b@).+nonDetFoldUFM :: (elt -> a -> a) -> a -> UniqFM key elt -> a+nonDetFoldUFM f z (UFM m) = M.foldr f z m +-- | Like 'nonDetFoldUFM', but with the 'Unique' key as well.+nonDetFoldWithKeyUFM :: (Unique -> elt -> a -> a) -> a -> UniqFM key elt -> a+nonDetFoldWithKeyUFM f z (UFM m) = M.foldrWithKey f' z m+ where+ f' k e a = f (getUnique k) e a+ mapUFM :: (elt1 -> elt2) -> UniqFM key elt1 -> UniqFM key elt2 mapUFM f (UFM m) = UFM (M.map f m) mapMaybeUFM :: (elt1 -> Maybe elt2) -> UniqFM key elt1 -> UniqFM key elt2 mapMaybeUFM f (UFM m) = UFM (M.mapMaybe f m) +mapMaybeWithKeyUFM :: (Unique -> elt1 -> Maybe elt2) -> UniqFM key elt1 -> UniqFM key elt2+mapMaybeWithKeyUFM f (UFM m) = UFM (M.mapMaybeWithKey (f . getUnique) m)+ mapUFM_Directly :: (Unique -> elt1 -> elt2) -> UniqFM key elt1 -> UniqFM key elt2-mapUFM_Directly f (UFM m) = UFM (M.mapWithKey (f . mkUniqueGrimily) m)+mapUFM_Directly f (UFM m) = UFM (M.mapWithKey (f . getUnique) m) +strictMapUFM :: (a -> b) -> UniqFM k a -> UniqFM k b+strictMapUFM f (UFM a) = UFM $ MS.map f a+ filterUFM :: (elt -> Bool) -> UniqFM key elt -> UniqFM key elt filterUFM p (UFM m) = UFM (M.filter p m) filterUFM_Directly :: (Unique -> elt -> Bool) -> UniqFM key elt -> UniqFM key elt-filterUFM_Directly p (UFM m) = UFM (M.filterWithKey (p . mkUniqueGrimily) m)+filterUFM_Directly p (UFM m) = UFM (M.filterWithKey (p . getUnique) m) partitionUFM :: (elt -> Bool) -> UniqFM key elt -> (UniqFM key elt, UniqFM key elt) partitionUFM p (UFM m) =@@ -401,7 +429,7 @@ lookupWithDefaultUFM_Directly :: UniqFM key elt -> elt -> Unique -> elt lookupWithDefaultUFM_Directly (UFM m) v u = M.findWithDefault v (getKey u) m -ufmToSet_Directly :: UniqFM key elt -> S.Word64Set+ufmToSet_Directly :: UniqFM key elt -> S.IntSet ufmToSet_Directly (UFM m) = M.keysSet m anyUFM :: (elt -> Bool) -> UniqFM key elt -> Bool@@ -411,7 +439,7 @@ allUFM p (UFM m) = M.foldr ((&&) . p) True m seqEltsUFM :: (elt -> ()) -> UniqFM key elt -> ()-seqEltsUFM seqElt = foldUFM (\v rest -> seqElt v `seq` rest) ()+seqEltsUFM seqElt = nonDetFoldUFM (\v rest -> seqElt v `seq` rest) () -- See Note [Deterministic UniqFM] to learn about nondeterminism. -- If you use this please provide a justification why it doesn't introduce@@ -423,7 +451,7 @@ -- If you use this please provide a justification why it doesn't introduce -- nondeterminism. nonDetKeysUFM :: UniqFM key elt -> [Unique]-nonDetKeysUFM (UFM m) = map mkUniqueGrimily $ M.keys m+nonDetKeysUFM (UFM m) = map getUnique $ M.keys m -- See Note [Deterministic UniqFM] to learn about nondeterminism. -- If you use this please provide a justification why it doesn't introduce@@ -440,18 +468,18 @@ nonDetStrictFoldUFM_DirectlyM :: (Monad m) => (Unique -> b -> elt -> m b) -> b -> UniqFM key elt -> m b nonDetStrictFoldUFM_DirectlyM f z0 (UFM xs) = M.foldrWithKey c return xs z0 -- See Note [List fusion and continuations in 'c']- where c u x k z = f (mkUniqueGrimily u) z x >>= k+ where c u x k z = f (getUnique u) z x >>= k {-# INLINE c #-} nonDetStrictFoldUFM_Directly:: (Unique -> elt -> a -> a) -> a -> UniqFM key elt -> a-nonDetStrictFoldUFM_Directly k z (UFM m) = M.foldlWithKey' (\z' i x -> k (mkUniqueGrimily i) x z') z m+nonDetStrictFoldUFM_Directly k z (UFM m) = M.foldlWithKey' (\z' i x -> k (getUnique i) x z') z m {-# INLINE nonDetStrictFoldUFM_Directly #-} -- See Note [Deterministic UniqFM] to learn about nondeterminism. -- If you use this please provide a justification why it doesn't introduce -- nondeterminism. nonDetUFMToList :: UniqFM key elt -> [(Unique, elt)]-nonDetUFMToList (UFM m) = map (\(k, v) -> (mkUniqueGrimily k, v)) $ M.toList m+nonDetUFMToList (UFM m) = map (\(k, v) -> (getUnique k, v)) $ M.toList m -- | A wrapper around 'UniqFM' with the sole purpose of informing call sites -- that the provided 'Foldable' and 'Traversable' instances are@@ -476,10 +504,10 @@ instance forall key. Traversable (NonDetUniqFM key) where traverse f (NonDetUniqFM (UFM m)) = NonDetUniqFM . UFM <$> traverse f m -ufmToIntMap :: UniqFM key elt -> M.Word64Map elt+ufmToIntMap :: UniqFM key elt -> M.IntMap elt ufmToIntMap (UFM m) = m -unsafeIntMapToUFM :: M.Word64Map elt -> UniqFM key elt+unsafeIntMapToUFM :: M.IntMap elt -> UniqFM key elt unsafeIntMapToUFM = UFM -- | Cast the key domain of a UniqFM.
GHC/Types/Unique/Map.hs view
@@ -30,20 +30,25 @@ plusUniqMap_C, plusMaybeUniqMap_C, plusUniqMapList,+ plusUniqMapListWith, minusUniqMap, intersectUniqMap, intersectUniqMap_C, disjointUniqMap, mapUniqMap, filterUniqMap,+ filterWithKeyUniqMap, partitionUniqMap, sizeUniqMap, elemUniqMap,+ nonDetKeysUniqMap,+ nonDetEltsUniqMap, lookupUniqMap, lookupWithDefaultUniqMap, anyUniqMap, allUniqMap,- nonDetEltsUniqMap,+ nonDetUniqMapToList,+ nonDetUniqMapToKeySet, nonDetFoldUniqMap -- Non-deterministic functions omitted ) where@@ -61,6 +66,8 @@ import Data.Data import Control.DeepSeq +import Data.Set (Set, fromList)+ -- | Maps indexed by 'Uniquable' keys newtype UniqMap k a = UniqMap { getUniqMap :: UniqFM k (k, a) } deriving (Data, Eq, Functor)@@ -192,6 +199,13 @@ plusUniqMapList :: [UniqMap k a] -> UniqMap k a plusUniqMapList xs = UniqMap $ plusUFMList (coerce xs) +plusUniqMapListWith :: (a -> a -> a) -> [UniqMap k a] -> UniqMap k a+plusUniqMapListWith f xs = UniqMap $ plusUFMListWith go (coerce xs)+ where+ -- l and r keys will be identical so we choose the former+ go (l_key, l) (_r, r) = (l_key, f l r)+{-# INLINE plusUniqMapListWith #-}+ minusUniqMap :: UniqMap k a -> UniqMap k b -> UniqMap k a minusUniqMap (UniqMap m1) (UniqMap m2) = UniqMap $ minusUFM m1 m2 @@ -201,6 +215,7 @@ -- | Intersection with a combining function. intersectUniqMap_C :: (a -> b -> c) -> UniqMap k a -> UniqMap k b -> UniqMap k c intersectUniqMap_C f (UniqMap m1) (UniqMap m2) = UniqMap $ intersectUFM_C (\(k, a) (_, b) -> (k, f a b)) m1 m2+{-# INLINE intersectUniqMap #-} disjointUniqMap :: UniqMap k a -> UniqMap k b -> Bool disjointUniqMap (UniqMap m1) (UniqMap m2) = disjointUFM m1 m2@@ -211,6 +226,9 @@ filterUniqMap :: (a -> Bool) -> UniqMap k a -> UniqMap k a filterUniqMap f (UniqMap m) = UniqMap $ filterUFM (f . snd) m +filterWithKeyUniqMap :: (k -> a -> Bool) -> UniqMap k a -> UniqMap k a+filterWithKeyUniqMap f (UniqMap m) = UniqMap $ filterUFM (uncurry f) m+ partitionUniqMap :: (a -> Bool) -> UniqMap k a -> (UniqMap k a, UniqMap k a) partitionUniqMap f (UniqMap m) = coerce $ partitionUFM (f . snd) m@@ -233,8 +251,21 @@ allUniqMap :: (a -> Bool) -> UniqMap k a -> Bool allUniqMap f (UniqMap m) = allUFM (f . snd) m -nonDetEltsUniqMap :: UniqMap k a -> [(k, a)]-nonDetEltsUniqMap (UniqMap m) = nonDetEltsUFM m+nonDetUniqMapToList :: UniqMap k a -> [(k, a)]+nonDetUniqMapToList (UniqMap m) = nonDetEltsUFM m+{-# INLINE nonDetUniqMapToList #-} +nonDetUniqMapToKeySet :: Ord k => UniqMap k a -> Set k+nonDetUniqMapToKeySet m = fromList (nonDetKeysUniqMap m)++nonDetKeysUniqMap :: UniqMap k a -> [k]+nonDetKeysUniqMap m = map fst (nonDetUniqMapToList m)+{-# INLINE nonDetKeysUniqMap #-}++nonDetEltsUniqMap :: UniqMap k a -> [a]+nonDetEltsUniqMap m = map snd (nonDetUniqMapToList m)+{-# INLINE nonDetEltsUniqMap #-}+ nonDetFoldUniqMap :: ((k, a) -> b -> b) -> b -> UniqMap k a -> b-nonDetFoldUniqMap go z (UniqMap m) = foldUFM go z m+nonDetFoldUniqMap go z (UniqMap m) = nonDetFoldUFM go z m+{-# INLINE nonDetFoldUniqMap #-}
GHC/Types/Unique/Set.hs view
@@ -72,7 +72,7 @@ unitUniqSet :: Uniquable a => a -> UniqSet a unitUniqSet x = UniqSet $ unitUFM x x -mkUniqSet :: Uniquable a => [a] -> UniqSet a+mkUniqSet :: Uniquable a => [a] -> UniqSet a mkUniqSet = foldl' addOneToUniqSet emptyUniqSet addOneToUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a@@ -186,7 +186,7 @@ -- | 'unsafeUFMToUniqSet' converts a @'UniqFM' a@ into a @'UniqSet' a@ -- assuming, without checking, that it maps each 'Unique' to a value -- that has that 'Unique'. See Note [UniqSet invariant].-unsafeUFMToUniqSet :: UniqFM a a -> UniqSet a+unsafeUFMToUniqSet :: UniqFM a a -> UniqSet a unsafeUFMToUniqSet = UniqSet instance Outputable a => Outputable (UniqSet a) where
GHC/Types/Unique/Supply.hs view
@@ -15,7 +15,7 @@ -- ** Operations on supplies uniqFromSupply, uniqsFromSupply, -- basic ops- takeUniqFromSupply, uniqFromTag,+ takeUniqFromSupply, uniqFromMask, mkSplitUniqSupply, splitUniqSupply, listSplitUniqSupply,@@ -39,19 +39,12 @@ import GHC.Utils.Monad import Control.Monad-import Data.Word+import Data.Char import GHC.Exts( Ptr(..), noDuplicate#, oneShot )-import Foreign.Storable--#include "MachDeps.h"--#if MIN_VERSION_GLASGOW_HASKELL(9,1,0,0) && WORD_SIZE_IN_BITS == 64-import GHC.Word( Word64(..) )-import GHC.Exts( fetchAddWordAddr#, plusWord#, readWordOffAddr# )-#if MIN_VERSION_GLASGOW_HASKELL(9,3,0,0)-import GHC.Exts( wordToWord64# )-#endif+#if MIN_VERSION_GLASGOW_HASKELL(9,1,0,0)+import GHC.Exts( Int(..), word2Int#, fetchAddWordAddr#, plusWord#, readWordOffAddr# ) #endif+import Foreign.Storable #include "Unique.h" @@ -68,17 +61,17 @@ The basic idea (due to Lennart Augustsson) is that a UniqSupply is lazily-evaluated infinite tree. -* At each MkSplitUniqSupply node is a unique Word64, and two+* At each MkSplitUniqSupply node is a unique Int, and two sub-trees (see data UniqSupply) * takeUniqFromSupply :: UniqSupply -> (Unique, UniqSupply)- returns the unique Word64 and one of the sub-trees+ returns the unique Int and one of the sub-trees * splitUniqSupply :: UniqSupply -> (UniqSupply, UniqSupply) returns the two sub-trees * When you poke on one of the thunks, it does a foreign call- to get a fresh Word64 from a thread-safe counter, and returns+ to get a fresh Int from a thread-safe counter, and returns a fresh MkSplitUniqSupply node. This has to be as efficient as possible: it should allocate only * The fresh node@@ -90,25 +83,25 @@ * For creating new uniques either a UniqSupply is used and threaded through or for monadic code a MonadUnique instance might conjure up uniques using- `uniqFromTag`.+ `uniqFromMask`. * Different parts of the compiler will use a UniqSupply or MonadUnique instance- with a specific tag. This way the different parts of the compiler will- generate uniques with different tags.+ with a specific mask. This way the different parts of the compiler will+ generate uniques with different masks. -If different code shares the same tag then care has to be taken that all uniques+If different code shares the same mask then care has to be taken that all uniques still get distinct numbers. Usually this is done by relying on genSym which has *one* counter per GHC invocation that is relied on by all calls to it. But using something like the address for pinned objects works as well and in fact is done for fast strings. This is important for example in the simplifier. Most passes of the simplifier use-the same tag 's'. However in some places we create a unique supply using `mkSplitUniqSupply`+the same mask 's'. However in some places we create a unique supply using `mkSplitUniqSupply` and thread it through the code, while in GHC.Core.Opt.Simplify.Monad we use the `instance MonadUnique SimplM`, which uses `mkSplitUniqSupply` in getUniqueSupplyM-and `uniqFromTag` in getUniqueM.+and `uniqFromMask` in getUniqueM. -Ultimately all these boil down to each new unique consisting of the tag and the result from-a call to `genSym`. The latter producing a distinct number for each invocation ensuring+Ultimately all these boil down to each new unique consisting of the mask and the result from+a call to `genSym`. The later producing a distinct number for each invocation ensuring uniques are distinct. Note [Optimising the unique supply]@@ -120,7 +113,7 @@ case unIO genSym s1 of { (# s2, u #) -> case unIO (unsafeDupableInterleaveIO (IO mk_supply)) s2 of { (# s3, x #) -> case unIO (unsafeDupableInterleaveIO (IO mk_supply)) s3 of { (# s4, y #) ->- (# s4, MkSplitUniqSupply (tag .|. u) x y #)+ (# s4, MkSplitUniqSupply (mask .|. u) x y #) }}}} It's a classic example of an IO action that is captured and then called@@ -134,7 +127,7 @@ genSym >>= \ u -> mk_supply >>= \ s1 -> mk_supply >>= \ s2 ->- return (MkSplitUniqSupply (tag .|. u) s1 s2)+ return (MkSplitUniqSupply (mask .|. u) s1 s2) and to rely on -fno-state-hack, full laziness and inlining to get the same result. It was very brittle and required enabling -fno-state-hack globally. So@@ -153,29 +146,29 @@ get around the need to allocate one `UniqSupply` for each Unique we need. -For code in IO we can improve on this by threading only the *tag*-we are going to use for Uniques. Using `uniqFromTag` to+For code in IO we can improve on this by threading only the *mask*+we are going to use for Uniques. Using `uniqFromMask` to generate uniques as needed. This gets rid of the overhead of allocating a new UniqSupply for each unique generated. It also avoids-frequent state updates when the Unique/Tag is part of the state in a+frequent state updates when the Unique/Mask is part of the state in a state monad. -For monadic code in IO which always uses the same tag we can go further-and hardcode the tag into the MonadUnique instance. On top of all the-benefits of threading the tag this *also* has the benefit of avoiding-the tag getting captured in thunks, or being passed around at runtime.-It does however come at the cost of having to use a fixed tag for all-code run in this Monad. But remember, the tag is purely cosmetic:-See Note [Uniques and tags].+For monadic code in IO which always uses the same mask we can go further+and hardcode the mask into the MonadUnique instance. On top of all the+benefits of threading the mask this *also* has the benefit of avoiding+the mask getting captured in thunks, or being passed around at runtime.+It does however come at the cost of having to use a fixed Mask for all+code run in this Monad. But remember, the Mask is purely cosmetic:+See Note [Uniques and masks]. NB: It's *not* an optimization to pass around the UniqSupply inside an-IORef instead of the tag. While this would avoid frequent state updates+IORef instead of the mask. While this would avoid frequent state updates it still requires allocating one UniqSupply per Unique. On top of some overhead for reading/writing to/from the IORef. All of this hinges on the assumption that UniqSupply and-uniqFromTag use the same source of distinct numbers (`genSym`) which-allows both to be used at the same time, with the same tag, while still+uniqFromMask use the same source of distinct numbers (`genSym`) which+allows both to be used at the same time, with the same mask, while still ensuring distinct uniques. One might consider this fact to be an "accident". But GHC worked like this as far back as source control history goes. It also allows the later two@@ -191,18 +184,18 @@ -- also manufacture an arbitrary number of further 'UniqueSupply' values, -- which will be distinct from the first and from all others. data UniqSupply- = MkSplitUniqSupply {-# UNPACK #-} !Word64 -- make the Unique with this+ = MkSplitUniqSupply {-# UNPACK #-} !Int -- make the Unique with this UniqSupply UniqSupply -- when split => these two supplies mkSplitUniqSupply :: Char -> IO UniqSupply -- ^ Create a unique supply out of thin air.--- The "tag" (Char) supplied is purely cosmetic, making it easier+-- The "mask" (Char) supplied is purely cosmetic, making it easier -- to figure out where a Unique was born. See--- Note [Uniques and tags].+-- Note [Uniques and masks]. -- -- The payload part of the Uniques allocated from this UniqSupply are--- guaranteed distinct wrt all other supplies, regardless of their "tag".+-- guaranteed distinct wrt all other supplies, regardless of their "mask". -- This is achieved by allocating the payload part from -- a single source of Uniques, namely `genSym`, shared across -- all UniqSupply's.@@ -213,7 +206,7 @@ = unsafeDupableInterleaveIO (IO mk_supply) where- !tag = mkTag c+ !mask = ord c `unsafeShiftL` uNIQUE_BITS -- Here comes THE MAGIC: see Note [How the unique supply works] -- This is one of the most hammered bits in the whole compiler@@ -225,28 +218,21 @@ -- deferred IO computations case unIO (unsafeDupableInterleaveIO (IO mk_supply)) s2 of { (# s3, x #) -> case unIO (unsafeDupableInterleaveIO (IO mk_supply)) s3 of { (# s4, y #) ->- (# s4, MkSplitUniqSupply (tag .|. u) x y #)+ (# s4, MkSplitUniqSupply (mask .|. u) x y #) }}}} --- If a word is not 64 bits then we would need a fetchAddWord64Addr# primitive,--- which does not exist. So we fall back on the C implementation in that case.--#if !MIN_VERSION_GLASGOW_HASKELL(9,1,0,0) || WORD_SIZE_IN_BITS != 64-foreign import ccall unsafe "genSym" genSym :: IO Word64+#if !MIN_VERSION_GLASGOW_HASKELL(9,1,0,0)+foreign import ccall unsafe "genSym" genSym :: IO Int #else-genSym :: IO Word64+genSym :: IO Int genSym = do let !mask = (1 `unsafeShiftL` uNIQUE_BITS) - 1- let !(Ptr counter) = ghc_unique_counter64+ let !(Ptr counter) = ghc_unique_counter let !(Ptr inc_ptr) = ghc_unique_inc u <- IO $ \s0 -> case readWordOffAddr# inc_ptr 0# s0 of (# s1, inc #) -> case fetchAddWordAddr# counter inc s1 of (# s2, val #) ->-#if !MIN_VERSION_GLASGOW_HASKELL(9,3,0,0)- let !u = W64# (val `plusWord#` inc) .&. mask-#else- let !u = W64# (wordToWord64# (val `plusWord#` inc)) .&. mask-#endif+ let !u = I# (word2Int# (val `plusWord#` inc)) .&. mask in (# s2, u #) #if defined(DEBUG) -- Uh oh! We will overflow next time a unique is requested.@@ -256,19 +242,19 @@ return u #endif -foreign import ccall unsafe "&ghc_unique_counter64" ghc_unique_counter64 :: Ptr Word64-foreign import ccall unsafe "&ghc_unique_inc" ghc_unique_inc :: Ptr Int+foreign import ccall unsafe "&ghc_unique_counter" ghc_unique_counter :: Ptr Word+foreign import ccall unsafe "&ghc_unique_inc" ghc_unique_inc :: Ptr Int -initUniqSupply :: Word64 -> Int -> IO ()+initUniqSupply :: Word -> Int -> IO () initUniqSupply counter inc = do- poke ghc_unique_counter64 counter- poke ghc_unique_inc inc+ poke ghc_unique_counter counter+ poke ghc_unique_inc inc -uniqFromTag :: Char -> IO Unique-uniqFromTag !tag+uniqFromMask :: Char -> IO Unique+uniqFromMask !mask = do { uqNum <- genSym- ; return $! mkUnique tag uqNum }-{-# NOINLINE uniqFromTag #-} -- We'll unbox everything, but we don't want to inline it+ ; return $! mkUnique mask uqNum }+{-# NOINLINE uniqFromMask #-} -- We'll unbox everything, but we don't want to inline it splitUniqSupply :: UniqSupply -> (UniqSupply, UniqSupply) -- ^ Build two 'UniqSupply' from a single one, each of which
GHC/Types/Var.hs view
@@ -117,7 +117,7 @@ import {-# SOURCE #-} GHC.Builtin.Types ( manyDataConTy ) import GHC.Types.Name hiding (varName) import GHC.Types.Unique ( Uniquable, Unique, getKey, getUnique- , nonDetCmpUnique )+ , mkUniqueGrimily, nonDetCmpUnique ) import GHC.Types.Basic( TypeOrConstraint(..) ) import GHC.Utils.Misc import GHC.Utils.Binary@@ -247,7 +247,7 @@ = TyVar { -- Type and kind variables -- see Note [Kind and type variables] varName :: !Name,- realUnique :: {-# UNPACK #-} !Unique,+ realUnique :: {-# UNPACK #-} !Int, -- ^ Key for fast comparison -- Identical to the Unique in the name, -- cached here for speed@@ -258,14 +258,14 @@ -- Used for kind variables during -- inference, as well varName :: !Name,- realUnique :: {-# UNPACK #-} !Unique,+ realUnique :: {-# UNPACK #-} !Int, varType :: Kind, tc_tv_details :: TcTyVarDetails } | Id { varName :: !Name,- realUnique :: {-# UNPACK #-} !Unique,+ realUnique :: {-# UNPACK #-} !Int, varType :: Type, varMult :: Mult, -- See Note [Multiplicity of let binders] idScope :: IdScope,@@ -374,10 +374,10 @@ a == b = realUnique a == realUnique b instance Ord Var where- a <= b = getKey (realUnique a) <= getKey (realUnique b)- a < b = getKey (realUnique a) < getKey (realUnique b)- a >= b = getKey (realUnique a) >= getKey (realUnique b)- a > b = getKey (realUnique a) > getKey (realUnique b)+ a <= b = realUnique a <= realUnique b+ a < b = realUnique a < realUnique b+ a >= b = realUnique a >= realUnique b+ a > b = realUnique a > realUnique b a `compare` b = a `nonDetCmpVar` b -- | Compare Vars by their Uniques.@@ -397,7 +397,7 @@ occName = nameOccName . varName varUnique :: Var -> Unique-varUnique var = realUnique var+varUnique var = mkUniqueGrimily (realUnique var) varMultMaybe :: Id -> Maybe Mult varMultMaybe (Id { varMult = mult }) = Just mult@@ -405,12 +405,12 @@ setVarUnique :: Var -> Unique -> Var setVarUnique var uniq- = var { realUnique = uniq,+ = var { realUnique = getKey uniq, varName = setNameUnique (varName var) uniq } setVarName :: Var -> Name -> Var setVarName var new_name- = var { realUnique = getUnique new_name,+ = var { realUnique = getKey (getUnique new_name), varName = new_name } setVarType :: Var -> Type -> Var@@ -687,10 +687,6 @@ * TyCon.TyConBinder = VarBndr TyVar TyConBndrVis Binders of a TyCon; see TyCon in GHC.Core.TyCon -* TyCon.TyConPiTyBinder = VarBndr TyCoVar TyConBndrVis- Binders of a PromotedDataCon- See Note [Promoted GADT data constructors] in GHC.Core.TyCon- * IfaceType.IfaceForAllBndr = VarBndr IfaceBndr ForAllTyFlag * IfaceType.IfaceForAllSpecBndr = VarBndr IfaceBndr Specificity * IfaceType.IfaceTyConBinder = VarBndr IfaceBndr TyConBndrVis@@ -1084,7 +1080,7 @@ mkTyVar :: Name -> Kind -> TyVar mkTyVar name kind = TyVar { varName = name- , realUnique = nameUnique name+ , realUnique = getKey (nameUnique name) , varType = kind } @@ -1092,7 +1088,7 @@ mkTcTyVar name kind details = -- NB: 'kind' may be a coercion kind; cf, 'GHC.Tc.Utils.TcMType.newMetaCoVar' TcTyVar { varName = name,- realUnique = nameUnique name,+ realUnique = getKey (nameUnique name), varType = kind, tc_tv_details = details }@@ -1148,7 +1144,7 @@ mk_id :: Name -> Mult -> Type -> IdScope -> IdDetails -> IdInfo -> Id mk_id name !w ty scope details info = Id { varName = name,- realUnique = nameUnique name,+ realUnique = getKey (nameUnique name), varMult = w, varType = ty, idScope = scope,
GHC/Types/Var/Env.hs view
@@ -24,6 +24,7 @@ elemVarEnvByKey, filterVarEnv, restrictVarEnv, partitionVarEnv, varEnvDomain,+ nonDetStrictFoldVarEnv_Directly, -- * Deterministic Var environments (maps) DVarEnv, DIdEnv, DTyVarEnv,@@ -77,7 +78,7 @@ ) where import GHC.Prelude-import qualified GHC.Data.Word64Map.Strict as Word64Map -- TODO: Move this to UniqFM+import qualified Data.IntMap.Strict as IntMap -- TODO: Move this to UniqFM import GHC.Types.Name.Occurrence import GHC.Types.Name@@ -227,7 +228,7 @@ -- introduce non-unique 'Unique's this way. See Note [Local uniques]. unsafeGetFreshLocalUnique :: InScopeSet -> Unique unsafeGetFreshLocalUnique (InScope set)- | Just (uniq,_) <- Word64Map.lookupLT (getKey maxLocalUnique) (ufmToIntMap $ getUniqSet set)+ | Just (uniq,_) <- IntMap.lookupLT (getKey maxLocalUnique) (ufmToIntMap $ getUniqSet set) , let uniq' = mkLocalUnique uniq , not $ uniq' `ltUnique` minLocalUnique = incrUnique uniq'@@ -318,25 +319,30 @@ rnBndr2_var :: RnEnv2 -> Var -> Var -> (RnEnv2, Var) -- ^ Similar to 'rnBndr2' but returns the new variable as well as the--- new environment+-- new environment.+-- Postcondition: the type of the returned Var is that of bR rnBndr2_var (RV2 { envL = envL, envR = envR, in_scope = in_scope }) bL bR- = (RV2 { envL = extendVarEnv envL bL new_b -- See Note- , envR = extendVarEnv envR bR new_b -- [Rebinding]+ = (RV2 { envL = extendVarEnv envL bL new_b -- See Note+ , envR = extendVarEnv envR bR new_b -- [Rebinding] , in_scope = extendInScopeSet in_scope new_b }, new_b) where -- Find a new binder not in scope in either term- new_b | not (bL `elemInScopeSet` in_scope) = bL- | not (bR `elemInScopeSet` in_scope) = bR- | otherwise = uniqAway' in_scope bL+ -- To avoid calling `uniqAway`, we try bL's Unique+ -- But we always return a Var whose type is that of bR+ new_b | not (bR `elemInScopeSet` in_scope) = bR+ | not (bL `elemInScopeSet` in_scope) = bR `setVarUnique` varUnique bL+ | otherwise = uniqAway' in_scope bR -- Note [Rebinding] -- ~~~~~~~~~~~~~~~~ -- If the new var is the same as the old one, note that- -- the extendVarEnv *deletes* any current renaming+ -- the extendVarEnv *replaces* any current renaming -- E.g. (\x. \x. ...) ~ (\y. \z. ...) --+ -- envL envR in_scope -- Inside \x \y { [x->y], [y->y], {y} }- -- \x \z { [x->x], [y->y, z->x], {y,x} }+ -- \x \z { [x->z], [y->y, z->z], {y,z} }+ -- The envL binding [x->y] is replaced by [x->z] rnBndrL :: RnEnv2 -> Var -> (RnEnv2, Var) -- ^ Similar to 'rnBndr2' but used when there's a binder on the left@@ -530,6 +536,7 @@ elemVarEnv :: Var -> VarEnv a -> Bool elemVarEnvByKey :: Unique -> VarEnv a -> Bool disjointVarEnv :: VarEnv a -> VarEnv a -> Bool+nonDetStrictFoldVarEnv_Directly :: (Unique -> a -> r -> r) -> r -> VarEnv a -> r elemVarEnv = elemUFM elemVarEnvByKey = elemUFM_Directly@@ -565,6 +572,7 @@ isEmptyVarEnv = isNullUFM partitionVarEnv = partitionUFM varEnvDomain = domUFMUnVarSet+nonDetStrictFoldVarEnv_Directly = nonDetStrictFoldUFM_Directly restrictVarEnv env vs = filterUFM_Directly keep env
GHC/Unit.hs view
@@ -63,7 +63,7 @@ Certain libraries (ghc-prim, base, etc.) are known to the compiler and to the RTS as they provide some basic primitives. Hence UnitIds of wired-in libraries-are fixed. Instead of letting Cabal chose the UnitId for these libraries, their+are fixed. Instead of letting Cabal choose the UnitId for these libraries, their .cabal file uses the following stanza to force it to a specific value: ghc-options: -this-unit-id ghc-prim -- taken from ghc-prim.cabal
GHC/Unit/Env.hs view
@@ -78,7 +78,7 @@ import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import GHC.Utils.Misc (HasDebugCallStack)-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Utils.Outputable import GHC.Utils.Panic (pprPanic) import GHC.Unit.Module.ModIface
GHC/Unit/Finder.hs view
@@ -301,7 +301,7 @@ , fr_suggestions = [] }) LookupUnusable unusable -> let unusables' = map get_unusable unusable- get_unusable (_, ModUnusable r) = r+ get_unusable (m, ModUnusable r) = (moduleUnit m, r) get_unusable (_, r) = pprPanic "findLookupResult: unexpected origin" (ppr r) in return (NotFound{ fr_paths = [], fr_pkg = Nothing
GHC/Unit/Finder/Types.hs view
@@ -61,7 +61,7 @@ -- but the *unit* is hidden -- | Module is in these units, but it is unusable- , fr_unusables :: [UnusableUnit]+ , fr_unusables :: [(Unit, UnusableUnitReason)] , fr_suggestions :: [ModuleSuggestion] -- ^ Possible mis-spelled modules }
GHC/Unit/Module/Deps.hs view
@@ -21,6 +21,8 @@ import GHC.Prelude +import GHC.Data.FastString+ import GHC.Types.SafeHaskell import GHC.Types.Name @@ -275,7 +277,7 @@ -- | A file upon which the module depends, e.g. a CPP #include, or using TH's -- 'addDependentFile' | UsageFile {- usg_file_path :: FilePath,+ usg_file_path :: FastString, -- ^ External file dependency. From a CPP #include or TH -- addDependentFile. Should be absolute. usg_file_hash :: Fingerprint,
GHC/Unit/Module/Env.hs view
@@ -6,6 +6,7 @@ , extendModuleEnvList_C, plusModuleEnv_C , delModuleEnvList, delModuleEnv, plusModuleEnv, lookupModuleEnv , lookupWithDefaultModuleEnv, mapModuleEnv, mkModuleEnv, emptyModuleEnv+ , alterModuleEnv , partitionModuleEnv , moduleEnvKeys, moduleEnvElts, moduleEnvToList , unitModuleEnv, isEmptyModuleEnv@@ -146,6 +147,9 @@ partitionModuleEnv f (ModuleEnv e) = (ModuleEnv a, ModuleEnv b) where (a,b) = Map.partition f e++alterModuleEnv :: (Maybe a -> Maybe a) -> Module -> ModuleEnv a -> ModuleEnv a+alterModuleEnv f m (ModuleEnv e) = ModuleEnv (Map.alter f (NDModule m) e) mkModuleEnv :: [(Module, a)] -> ModuleEnv a mkModuleEnv xs = ModuleEnv (Map.fromList [(NDModule k, v) | (k,v) <- xs])
GHC/Unit/Module/Graph.hs view
@@ -22,6 +22,7 @@ , showModMsg , moduleGraphNodeModule , moduleGraphNodeModSum+ , moduleGraphModulesBelow , moduleGraphNodes , SummaryNode@@ -50,7 +51,7 @@ import GHC.Data.Graph.Directed import GHC.Driver.Backend-import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Types.SourceFile ( hscSourceString ) @@ -62,12 +63,14 @@ import qualified Data.Map as Map import GHC.Types.Unique.DSet import qualified Data.Set as Set+import Data.Set (Set) import GHC.Unit.Module import GHC.Linker.Static.Utils import Data.Bifunctor import Data.Either import Data.Function+import Data.List (sort) import GHC.Data.List.SetOps -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'.@@ -385,3 +388,30 @@ type ModNodeKey = ModuleNameWithIsBoot ++-- | This function returns all the modules belonging to the home-unit that can+-- be reached by following the given dependencies. Additionally, if both the+-- boot module and the non-boot module can be reached, it only returns the+-- non-boot one.+moduleGraphModulesBelow :: ModuleGraph -> UnitId -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid+moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- modules_below]+ where+ td_map = mgTransDeps mg++ modules_below = maybe [] Set.toList $ Map.lookup (NodeKey_Module (ModNodeKeyWithUid mn uid)) td_map++ filtered_mods = Set.fromDistinctAscList . filter_mods . sort++ -- IsBoot and NotBoot modules are necessarily consecutive in the sorted list+ -- (cf Ord instance of GenWithIsBoot). Hence we only have to perform a+ -- linear sweep with a window of size 2 to remove boot modules for which we+ -- have the corresponding non-boot.+ filter_mods = \case+ (r1@(ModNodeKeyWithUid (GWIB m1 b1) uid1) : r2@(ModNodeKeyWithUid (GWIB m2 _) uid2): rs)+ | m1 == m2 && uid1 == uid2 ->+ let !r' = case b1 of+ NotBoot -> r1+ IsBoot -> r2+ in r' : filter_mods rs+ | otherwise -> r1 : filter_mods (r2:rs)+ rs -> rs
GHC/Unit/Module/ModIface.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE NamedFieldPuns #-} module GHC.Unit.Module.ModIface ( ModIface@@ -109,8 +110,10 @@ -- other fields and are not put into the interface file. -- Not really produced by the backend but there is no need to create them -- any earlier.- , mi_warn_fn :: !(OccName -> Maybe (WarningTxt GhcRn))- -- ^ Cached lookup for 'mi_warns'+ , mi_decl_warn_fn :: !(OccName -> Maybe (WarningTxt GhcRn))+ -- ^ Cached lookup for 'mi_warns' for declaration deprecations+ , mi_export_warn_fn :: !(Name -> Maybe (WarningTxt GhcRn))+ -- ^ Cached lookup for 'mi_warns' for export deprecations , mi_fix_fn :: !(OccName -> Maybe Fixity) -- ^ Cached lookup for 'mi_fixities' , mi_hash_fn :: !(OccName -> Maybe (OccName, Fingerprint))@@ -184,7 +187,7 @@ -- ^ Fixities -- NOT STRICT! we read this field lazily from the interface file - mi_warns :: (Warnings GhcRn),+ mi_warns :: IfaceWarnings, -- ^ Warnings -- NOT STRICT! we read this field lazily from the interface file @@ -205,7 +208,7 @@ -- combined with mi_decls allows us to restart code generation. -- See Note [Interface Files with Core Definitions] and Note [Interface File with Core: Sharing RHSs] - mi_globals :: !(Maybe GlobalRdrEnv),+ mi_globals :: !(Maybe IfGlobalRdrEnv), -- ^ Binds all the things defined at the top level in -- the /original source/ code for this module. which -- is NOT the same as mi_exports, nor mi_decls (which@@ -478,7 +481,8 @@ mi_finsts = hasFamInsts, mi_exp_hash = exp_hash, mi_orphan_hash = orphan_hash,- mi_warn_fn = mkIfaceWarnCache warns,+ mi_decl_warn_fn = mkIfaceDeclWarnCache $ fromIfaceWarnings warns,+ mi_export_warn_fn = mkIfaceExportWarnCache $ fromIfaceWarnings warns, mi_fix_fn = mkIfaceFixCache fixities, mi_hash_fn = mkIfaceHashCache decls }})@@ -497,7 +501,7 @@ mi_exports = [], mi_used_th = False, mi_fixities = [],- mi_warns = NoWarnings,+ mi_warns = IfWarnSome [] [], mi_anns = [], mi_insts = [], mi_fam_insts = [],@@ -529,7 +533,8 @@ mi_finsts = False, mi_exp_hash = fingerprint0, mi_orphan_hash = fingerprint0,- mi_warn_fn = emptyIfaceWarnCache,+ mi_decl_warn_fn = emptyIfaceWarnCache,+ mi_export_warn_fn = emptyIfaceWarnCache, mi_fix_fn = emptyIfaceFixCache, mi_hash_fn = emptyIfaceHashCache } } @@ -549,20 +554,64 @@ -- Take care, this instance only forces to the degree necessary to -- avoid major space leaks.-instance (NFData (IfaceBackendExts (phase :: ModIfacePhase)), NFData (IfaceDeclExts (phase :: ModIfacePhase))) => NFData (ModIface_ phase) where- rnf (ModIface f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12- f13 f14 f15 f16 f17 f18 f19 f20 f21 f22 f23 f24) =- rnf f1 `seq` rnf f2 `seq` f3 `seq` f4 `seq` f5 `seq` f6 `seq` rnf f7 `seq` f8 `seq`- f9 `seq` rnf f10 `seq` rnf f11 `seq` rnf f12 `seq` rnf f13 `seq` rnf f14 `seq` rnf f15 `seq` rnf f16 `seq`- rnf f17 `seq` f18 `seq` rnf f19 `seq` rnf f20 `seq` rnf f21 `seq` f22 `seq` f23 `seq` rnf f24+instance ( NFData (IfaceBackendExts (phase :: ModIfacePhase))+ , NFData (IfaceDeclExts (phase :: ModIfacePhase))+ ) => NFData (ModIface_ phase) where+ rnf (ModIface{ mi_module, mi_sig_of, mi_hsc_src, mi_deps, mi_usages+ , mi_exports, mi_used_th, mi_fixities, mi_warns, mi_anns+ , mi_decls, mi_extra_decls, mi_globals, mi_insts+ , mi_fam_insts, mi_rules, mi_hpc, mi_trust, mi_trust_pkg+ , mi_complete_matches, mi_docs, mi_final_exts+ , mi_ext_fields, mi_src_hash })+ = rnf mi_module+ `seq` rnf mi_sig_of+ `seq` mi_hsc_src+ `seq` mi_deps+ `seq` mi_usages+ `seq` mi_exports+ `seq` rnf mi_used_th+ `seq` mi_fixities+ `seq` rnf mi_warns+ `seq` rnf mi_anns+ `seq` rnf mi_decls+ `seq` rnf mi_extra_decls+ `seq` mi_globals+ -- NB: we already removed any potential space leaks in 'mi_globals' by+ -- dehydrating, that is, by turning the 'GlobalRdrEnv' into a 'IfGlobalRdrEnv'.+ -- This means we don't need to use 'rnf' here.+ -- See Note [Forcing GREInfo] in GHC.Types.GREInfo.+ `seq` rnf mi_insts+ `seq` rnf mi_fam_insts+ `seq` rnf mi_rules+ `seq` rnf mi_hpc+ `seq` mi_trust+ `seq` rnf mi_trust_pkg+ `seq` rnf mi_complete_matches+ `seq` rnf mi_docs+ `seq` mi_final_exts+ `seq` mi_ext_fields+ `seq` rnf mi_src_hash `seq` () - instance NFData (ModIfaceBackend) where- rnf (ModIfaceBackend f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13)- = rnf f1 `seq` rnf f2 `seq` rnf f3 `seq` rnf f4 `seq`- rnf f5 `seq` rnf f6 `seq` rnf f7 `seq` rnf f8 `seq`- rnf f9 `seq` rnf f10 `seq` rnf f11 `seq` rnf f12 `seq` rnf f13+ rnf (ModIfaceBackend{ mi_iface_hash, mi_mod_hash, mi_flag_hash, mi_opt_hash+ , mi_hpc_hash, mi_plugin_hash, mi_orphan, mi_finsts, mi_exp_hash+ , mi_orphan_hash, mi_decl_warn_fn, mi_export_warn_fn, mi_fix_fn+ , mi_hash_fn})+ = rnf mi_iface_hash+ `seq` rnf mi_mod_hash+ `seq` rnf mi_flag_hash+ `seq` rnf mi_opt_hash+ `seq` rnf mi_hpc_hash+ `seq` rnf mi_plugin_hash+ `seq` rnf mi_orphan+ `seq` rnf mi_finsts+ `seq` rnf mi_exp_hash+ `seq` rnf mi_orphan_hash+ `seq` rnf mi_decl_warn_fn+ `seq` rnf mi_export_warn_fn+ `seq` rnf mi_fix_fn+ `seq` rnf mi_hash_fn forceModIface :: ModIface -> IO ()
GHC/Unit/Module/ModSummary.hs view
@@ -27,7 +27,7 @@ import GHC.Hs -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Unit.Types import GHC.Unit.Module
GHC/Unit/Module/Warnings.hs view
@@ -1,42 +1,205 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE LambdaCase #-} -- | Warnings for a module module GHC.Unit.Module.Warnings- ( Warnings (..)+ ( WarningCategory(..)+ , mkWarningCategory+ , defaultWarningCategory+ , validWarningCategory+ , InWarningCategory(..)+ , fromWarningCategory++ , WarningCategorySet+ , emptyWarningCategorySet+ , completeWarningCategorySet+ , nullWarningCategorySet+ , elemWarningCategorySet+ , insertWarningCategorySet+ , deleteWarningCategorySet++ , Warnings (..) , WarningTxt (..)+ , DeclWarnOccNames+ , ExportWarnNames+ , warningTxtCategory+ , warningTxtMessage+ , warningTxtSame , pprWarningTxtForMsg- , mkIfaceWarnCache+ , emptyWarn+ , mkIfaceDeclWarnCache+ , mkIfaceExportWarnCache , emptyIfaceWarnCache- , plusWarns+ , insertWarnDecls+ , insertWarnExports ) where import GHC.Prelude +import GHC.Data.FastString (FastString, mkFastString, unpackFS) import GHC.Types.SourceText import GHC.Types.Name.Occurrence+import GHC.Types.Name.Env+import GHC.Types.Name (Name) import GHC.Types.SrcLoc+import GHC.Types.Unique+import GHC.Types.Unique.Set import GHC.Hs.Doc-import GHC.Hs.Extension import GHC.Utils.Outputable import GHC.Utils.Binary+import GHC.Unicode +import Language.Haskell.Syntax.Concrete (HsToken (HsTok)) import Language.Haskell.Syntax.Extension import Data.Data+import Data.List (isPrefixOf) import GHC.Generics ( Generic )+import Control.DeepSeq ++{-+Note [Warning categories]+~~~~~~~~~~~~~~~~~~~~~~~~~+See GHC Proposal 541 for the design of the warning categories feature:+https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0541-warning-pragmas-with-categories.rst++A WARNING pragma may be annotated with a category such as "x-partial" written+after the 'in' keyword, like this:++ {-# WARNING in "x-partial" head "This function is partial..." #-}++This is represented by the 'Maybe (Located WarningCategory)' field in+'WarningTxt'. The parser will accept an arbitrary string as the category name,+then the renamer (in 'rnWarningTxt') will check it contains only valid+characters, so we can generate a nicer error message than a parse error.++The corresponding warnings can then be controlled with the -Wx-partial,+-Wno-x-partial, -Werror=x-partial and -Wwarn=x-partial flags. Such a flag is+distinguished from an 'unrecognisedWarning' by the flag parser testing+'validWarningCategory'. The 'x-' prefix means we can still usually report an+unrecognised warning where the user has made a mistake.++A DEPRECATED pragma may not have a user-defined category, and is always treated+as belonging to the special category 'deprecations'. Similarly, a WARNING+pragma without a category belongs to the 'deprecations' category.+Thus the '-Wdeprecations' flag will enable all of the following:++ {-# WARNING in "deprecations" foo "This function is deprecated..." #-}+ {-# WARNING foo "This function is deprecated..." #-}+ {-# DEPRECATED foo "This function is deprecated..." #-}++The '-Wwarnings-deprecations' flag is supported for backwards compatibility+purposes as being equivalent to '-Wdeprecations'.++The '-Wextended-warnings' warning group collects together all warnings with+user-defined categories, so they can be enabled or disabled+collectively. Moreover they are treated as being part of other warning groups+such as '-Wdefault' (see 'warningGroupIncludesExtendedWarnings').++'DynFlags' and 'DiagOpts' each contain a set of enabled and a set of fatal+warning categories, just as they do for the finite enumeration of 'WarningFlag's+built in to GHC. These are represented as 'WarningCategorySet's to allow for+the possibility of them being infinite.++-}++data InWarningCategory+ = InWarningCategory+ { iwc_in :: !(Located (HsToken "in")),+ iwc_st :: !SourceText,+ iwc_wc :: (Located WarningCategory)+ } deriving Data++fromWarningCategory :: WarningCategory -> InWarningCategory+fromWarningCategory wc = InWarningCategory (noLoc HsTok) NoSourceText (noLoc wc)+++-- See Note [Warning categories]+newtype WarningCategory = WarningCategory FastString+ deriving (Binary, Data, Eq, Outputable, Show, Uniquable, NFData)++mkWarningCategory :: FastString -> WarningCategory+mkWarningCategory = WarningCategory++-- | The @deprecations@ category is used for all DEPRECATED pragmas and for+-- WARNING pragmas that do not specify a category.+defaultWarningCategory :: WarningCategory+defaultWarningCategory = mkWarningCategory (mkFastString "deprecations")++-- | Is this warning category allowed to appear in user-defined WARNING pragmas?+-- It must either be the known category @deprecations@, or be a custom category+-- that begins with @x-@ and contains only valid characters (letters, numbers,+-- apostrophes and dashes).+validWarningCategory :: WarningCategory -> Bool+validWarningCategory cat@(WarningCategory c) =+ cat == defaultWarningCategory || ("x-" `isPrefixOf` s && all is_allowed s)+ where+ s = unpackFS c+ is_allowed c = isAlphaNum c || c == '\'' || c == '-'+++-- | A finite or infinite set of warning categories.+--+-- Unlike 'WarningFlag', there are (in principle) infinitely many warning+-- categories, so we cannot necessarily enumerate all of them. However the set+-- is constructed by adding or removing categories one at a time, so we can+-- represent it as either a finite set of categories, or a cofinite set (where+-- we store the complement).+data WarningCategorySet =+ FiniteWarningCategorySet (UniqSet WarningCategory)+ -- ^ The set of warning categories is the given finite set.+ | CofiniteWarningCategorySet (UniqSet WarningCategory)+ -- ^ The set of warning categories is infinite, so the constructor stores+ -- its (finite) complement.++-- | The empty set of warning categories.+emptyWarningCategorySet :: WarningCategorySet+emptyWarningCategorySet = FiniteWarningCategorySet emptyUniqSet++-- | The set consisting of all possible warning categories.+completeWarningCategorySet :: WarningCategorySet+completeWarningCategorySet = CofiniteWarningCategorySet emptyUniqSet++-- | Is this set empty?+nullWarningCategorySet :: WarningCategorySet -> Bool+nullWarningCategorySet (FiniteWarningCategorySet s) = isEmptyUniqSet s+nullWarningCategorySet CofiniteWarningCategorySet{} = False++-- | Does this warning category belong to the set?+elemWarningCategorySet :: WarningCategory -> WarningCategorySet -> Bool+elemWarningCategorySet c (FiniteWarningCategorySet s) = c `elementOfUniqSet` s+elemWarningCategorySet c (CofiniteWarningCategorySet s) = not (c `elementOfUniqSet` s)++-- | Insert an element into a warning category set.+insertWarningCategorySet :: WarningCategory -> WarningCategorySet -> WarningCategorySet+insertWarningCategorySet c (FiniteWarningCategorySet s) = FiniteWarningCategorySet (addOneToUniqSet s c)+insertWarningCategorySet c (CofiniteWarningCategorySet s) = CofiniteWarningCategorySet (delOneFromUniqSet s c)++-- | Delete an element from a warning category set.+deleteWarningCategorySet :: WarningCategory -> WarningCategorySet -> WarningCategorySet+deleteWarningCategorySet c (FiniteWarningCategorySet s) = FiniteWarningCategorySet (delOneFromUniqSet s c)+deleteWarningCategorySet c (CofiniteWarningCategorySet s) = CofiniteWarningCategorySet (addOneToUniqSet s c)++ -- | Warning Text -- -- reason/explanation from a WARNING or DEPRECATED pragma data WarningTxt pass = WarningTxt+ (Maybe (Located InWarningCategory))+ -- ^ Warning category attached to this WARNING pragma, if any;+ -- see Note [Warning categories] (Located SourceText) [Located (WithHsDocIdentifiers StringLiteral pass)] | DeprecatedTxt@@ -44,40 +207,52 @@ [Located (WithHsDocIdentifiers StringLiteral pass)] deriving Generic -deriving instance Eq (IdP pass) => Eq (WarningTxt pass)+-- | To which warning category does this WARNING or DEPRECATED pragma belong?+-- See Note [Warning categories].+warningTxtCategory :: WarningTxt pass -> WarningCategory+warningTxtCategory (WarningTxt (Just (L _ (InWarningCategory _ _ (L _ cat)))) _ _) = cat+warningTxtCategory _ = defaultWarningCategory++-- | The message that the WarningTxt was specified to output+warningTxtMessage :: WarningTxt p -> [Located (WithHsDocIdentifiers StringLiteral p)]+warningTxtMessage (WarningTxt _ _ m) = m+warningTxtMessage (DeprecatedTxt _ m) = m++-- | True if the 2 WarningTxts have the same category and messages+warningTxtSame :: WarningTxt p1 -> WarningTxt p2 -> Bool+warningTxtSame w1 w2+ = warningTxtCategory w1 == warningTxtCategory w2+ && literal_message w1 == literal_message w2+ && same_type+ where+ literal_message :: WarningTxt p -> [StringLiteral]+ literal_message = map (hsDocString . unLoc) . warningTxtMessage+ same_type | DeprecatedTxt {} <- w1, DeprecatedTxt {} <- w2 = True+ | WarningTxt {} <- w1, WarningTxt {} <- w2 = True+ | otherwise = False++deriving instance Eq InWarningCategory++deriving instance (Eq (HsToken "in"), Eq (IdP pass)) => Eq (WarningTxt pass) deriving instance (Data pass, Data (IdP pass)) => Data (WarningTxt pass) +instance Outputable InWarningCategory where+ ppr (InWarningCategory _ _ wt) = text "in" <+> doubleQuotes (ppr wt)++ instance Outputable (WarningTxt pass) where- ppr (WarningTxt lsrc ws)+ ppr (WarningTxt mcat lsrc ws) = case unLoc lsrc of- NoSourceText -> pp_ws ws- SourceText src -> text src <+> pp_ws ws <+> text "#-}"+ NoSourceText -> pp_ws ws+ SourceText src -> ftext src <+> ctg_doc <+> pp_ws ws <+> text "#-}"+ where+ ctg_doc = maybe empty (\ctg -> ppr ctg) mcat + ppr (DeprecatedTxt lsrc ds) = case unLoc lsrc of NoSourceText -> pp_ws ds- SourceText src -> text src <+> pp_ws ds <+> text "#-}"--instance Binary (WarningTxt GhcRn) where- put_ bh (WarningTxt s w) = do- putByte bh 0- put_ bh $ unLoc s- put_ bh $ unLoc <$> w- put_ bh (DeprecatedTxt s d) = do- putByte bh 1- put_ bh $ unLoc s- put_ bh $ unLoc <$> d-- get bh = do- h <- getByte bh- case h of- 0 -> do s <- noLoc <$> get bh- w <- fmap noLoc <$> get bh- return (WarningTxt s w)- _ -> do s <- noLoc <$> get bh- d <- fmap noLoc <$> get bh- return (DeprecatedTxt s d)-+ SourceText src -> ftext src <+> pp_ws ds <+> text "#-}" pp_ws :: [Located (WithHsDocIdentifiers StringLiteral pass)] -> SDoc pp_ws [l] = ppr $ unLoc l@@ -88,20 +263,20 @@ pprWarningTxtForMsg :: WarningTxt p -> SDoc-pprWarningTxtForMsg (WarningTxt _ ws)+pprWarningTxtForMsg (WarningTxt _ _ ws) = doubleQuotes (vcat (map (ftext . sl_fs . hsDocString . unLoc) ws)) pprWarningTxtForMsg (DeprecatedTxt _ ds) = text "Deprecated:" <+> doubleQuotes (vcat (map (ftext . sl_fs . hsDocString . unLoc) ds)) --- | Warning information for a module+-- | Warning information from a module data Warnings pass- = NoWarnings -- ^ Nothing deprecated- | WarnAll (WarningTxt pass) -- ^ Whole module deprecated- | WarnSome [(OccName,WarningTxt pass)] -- ^ Some specific things deprecated+ = WarnSome (DeclWarnOccNames pass) -- ^ Names deprecated (may be empty)+ (ExportWarnNames pass) -- ^ Exports deprecated (may be empty)+ | WarnAll (WarningTxt pass) -- ^ Whole module deprecated - -- Only an OccName is needed because+ -- For the module-specific names only an OccName is needed because -- (1) a deprecation always applies to a binding -- defined in the module in which the deprecation appears. -- (2) deprecations are only reported outside the defining module.@@ -121,40 +296,44 @@ -- -- this is in contrast with fixity declarations, where we need to map -- a Name to its fixity declaration.+ --+ -- For export deprecations we need to know where the symbol comes from, since+ -- we need to be able to check if the deprecated export that was imported is+ -- the same thing as imported by another import, which would not trigger+ -- a deprecation message. +-- | Deprecated declarations+type DeclWarnOccNames pass = [(OccName, WarningTxt pass)]++-- | Names that are deprecated as exports+type ExportWarnNames pass = [(Name, WarningTxt pass)]+ deriving instance Eq (IdP pass) => Eq (Warnings pass) -instance Binary (Warnings GhcRn) where- put_ bh NoWarnings = putByte bh 0- put_ bh (WarnAll t) = do- putByte bh 1- put_ bh t- put_ bh (WarnSome ts) = do- putByte bh 2- put_ bh ts+emptyWarn :: Warnings p+emptyWarn = WarnSome [] [] - get bh = do- h <- getByte bh- case h of- 0 -> return NoWarnings- 1 -> do aa <- get bh- return (WarnAll aa)- _ -> do aa <- get bh- return (WarnSome aa)+-- | Constructs the cache for the 'mi_decl_warn_fn' field of a 'ModIface'+mkIfaceDeclWarnCache :: Warnings p -> OccName -> Maybe (WarningTxt p)+mkIfaceDeclWarnCache (WarnAll t) = \_ -> Just t+mkIfaceDeclWarnCache (WarnSome vs _) = lookupOccEnv (mkOccEnv vs) --- | Constructs the cache for the 'mi_warn_fn' field of a 'ModIface'-mkIfaceWarnCache :: Warnings p -> OccName -> Maybe (WarningTxt p)-mkIfaceWarnCache NoWarnings = \_ -> Nothing-mkIfaceWarnCache (WarnAll t) = \_ -> Just t-mkIfaceWarnCache (WarnSome pairs) = lookupOccEnv (mkOccEnv pairs)+-- | Constructs the cache for the 'mi_export_warn_fn' field of a 'ModIface'+mkIfaceExportWarnCache :: Warnings p -> Name -> Maybe (WarningTxt p)+mkIfaceExportWarnCache (WarnAll _) = const Nothing -- We do not want a double report of the module deprecation+mkIfaceExportWarnCache (WarnSome _ ds) = lookupNameEnv (mkNameEnv ds) -emptyIfaceWarnCache :: OccName -> Maybe (WarningTxt p)+emptyIfaceWarnCache :: name -> Maybe (WarningTxt p) emptyIfaceWarnCache _ = Nothing -plusWarns :: Warnings p -> Warnings p -> Warnings p-plusWarns d NoWarnings = d-plusWarns NoWarnings d = d-plusWarns _ (WarnAll t) = WarnAll t-plusWarns (WarnAll t) _ = WarnAll t-plusWarns (WarnSome v1) (WarnSome v2) = WarnSome (v1 ++ v2)+insertWarnDecls :: Warnings p -- ^ Existing warnings+ -> [(OccName, WarningTxt p)] -- ^ New declaration deprecations+ -> Warnings p -- ^ Updated warnings+insertWarnDecls ws@(WarnAll _) _ = ws+insertWarnDecls (WarnSome wns wes) wns' = WarnSome (wns ++ wns') wes +insertWarnExports :: Warnings p -- ^ Existing warnings+ -> [(Name, WarningTxt p)] -- ^ New export deprecations+ -> Warnings p -- ^ Updated warnings+insertWarnExports ws@(WarnAll _) _ = ws+insertWarnExports (WarnSome wns wes) wes' = WarnSome wns (wes ++ wes')
GHC/Unit/State.hs view
@@ -43,7 +43,6 @@ LookupResult(..), ModuleSuggestion(..), ModuleOrigin(..),- UnusableUnit(..), UnusableUnitReason(..), pprReason, @@ -76,7 +75,7 @@ import GHC.Prelude -import GHC.Driver.Session+import GHC.Driver.DynFlags import GHC.Platform import GHC.Platform.Ways@@ -92,6 +91,8 @@ import GHC.Types.Unique.DFM import GHC.Types.Unique.Set import GHC.Types.Unique.DSet+import GHC.Types.Unique.Map+import GHC.Types.Unique import GHC.Types.PkgQual import GHC.Utils.Misc@@ -111,13 +112,10 @@ import Control.Monad import Data.Graph (stronglyConnComp, SCC(..)) import Data.Char ( toUpper )-import Data.List ( intersperse, partition, sortBy, isSuffixOf )-import Data.Map (Map)+import Data.List ( intersperse, partition, sortBy, isSuffixOf, sortOn ) import Data.Set (Set) import Data.Monoid (First(..)) import qualified Data.Semigroup as Semigroup-import qualified Data.Map as Map-import qualified Data.Map.Strict as MapStrict import qualified Data.Set as Set import GHC.LanguageExtensions import Control.Applicative@@ -175,10 +173,8 @@ -- (But maybe the user didn't realize), so we'll still keep track -- of these modules.) ModHidden-- -- | Module is unavailable because the unit is unusable.- | ModUnusable !UnusableUnit-+ -- | Module is unavailable because the package is unusable.+ | ModUnusable UnusableUnitReason -- | Module is public, and could have come from some places. | ModOrigin { -- | @Just False@ means that this module is in@@ -196,13 +192,6 @@ , fromPackageFlag :: Bool } --- | A unusable unit module origin-data UnusableUnit = UnusableUnit- { uuUnit :: !Unit -- ^ Unusable unit- , uuReason :: !UnusableUnitReason -- ^ Reason- , uuIsReexport :: !Bool -- ^ Is the "module" a reexport?- }- instance Outputable ModuleOrigin where ppr ModHidden = text "hidden module" ppr (ModUnusable _) = text "unusable module"@@ -247,8 +236,7 @@ text "x: " <> ppr x $$ text "y: " <> ppr y g Nothing x = x g x Nothing = x-- x <> y = pprPanic "ModOrigin: module origin mismatch" $+ x <> y = pprPanic "ModOrigin: hidden module redefined" $ text "x: " <> ppr x $$ text "y: " <> ppr y instance Monoid ModuleOrigin where@@ -271,7 +259,7 @@ type PreloadUnitClosure = UniqSet UnitId -- | 'UniqFM' map from 'Unit' to a 'UnitVisibility'.-type VisibilityMap = Map Unit UnitVisibility+type VisibilityMap = UniqMap Unit UnitVisibility -- | 'UnitVisibility' records the various aspects of visibility of a particular -- 'Unit'.@@ -285,7 +273,7 @@ -- ^ The package name associated with the 'Unit'. This is used -- to implement legacy behavior where @-package foo-0.1@ implicitly -- hides any packages named @foo@- , uv_requirements :: Map ModuleName (Set InstantiatedModule)+ , uv_requirements :: UniqMap ModuleName (Set InstantiatedModule) -- ^ The signatures which are contributed to the requirements context -- from this unit ID. , uv_explicit :: Maybe PackageArg@@ -309,7 +297,7 @@ { uv_expose_all = uv_expose_all uv1 || uv_expose_all uv2 , uv_renamings = uv_renamings uv1 ++ uv_renamings uv2 , uv_package_name = mappend (uv_package_name uv1) (uv_package_name uv2)- , uv_requirements = Map.unionWith Set.union (uv_requirements uv1) (uv_requirements uv2)+ , uv_requirements = plusUniqMap_C Set.union (uv_requirements uv2) (uv_requirements uv1) , uv_explicit = uv_explicit uv1 <|> uv_explicit uv2 } @@ -318,7 +306,7 @@ { uv_expose_all = False , uv_renamings = [] , uv_package_name = First Nothing- , uv_requirements = Map.empty+ , uv_requirements = emptyUniqMap , uv_explicit = Nothing } mappend = (Semigroup.<>)@@ -418,7 +406,7 @@ -- origin for a given 'Module' type ModuleNameProvidersMap =- Map ModuleName (Map Module ModuleOrigin)+ UniqMap ModuleName (UniqMap Module ModuleOrigin) data UnitState = UnitState { -- | A mapping of 'Unit' to 'UnitInfo'. This list is adjusted@@ -442,10 +430,10 @@ packageNameMap :: UniqFM PackageName UnitId, -- | A mapping from database unit keys to wired in unit ids.- wireMap :: Map UnitId UnitId,+ wireMap :: UniqMap UnitId UnitId, -- | A mapping from wired in unit ids to unit keys from the database.- unwireMap :: Map UnitId UnitId,+ unwireMap :: UniqMap UnitId UnitId, -- | The units we're going to link in eagerly. This list -- should be in reverse dependency order; that is, a unit@@ -475,7 +463,7 @@ -- and @r[C=\<A>]:C@. -- -- There's an entry in this map for each hole in our home library.- requirementContext :: Map ModuleName [InstantiatedModule],+ requirementContext :: UniqMap ModuleName [InstantiatedModule], -- | Indicate if we can instantiate units on-the-fly. --@@ -486,17 +474,17 @@ emptyUnitState :: UnitState emptyUnitState = UnitState {- unitInfoMap = Map.empty,+ unitInfoMap = emptyUniqMap, preloadClosure = emptyUniqSet, packageNameMap = emptyUFM,- wireMap = Map.empty,- unwireMap = Map.empty,- preloadUnits = [],- explicitUnits = [],+ wireMap = emptyUniqMap,+ unwireMap = emptyUniqMap,+ preloadUnits = [],+ explicitUnits = [], homeUnitDepends = [],- moduleNameProvidersMap = Map.empty,- pluginModuleNameProvidersMap = Map.empty,- requirementContext = Map.empty,+ moduleNameProvidersMap = emptyUniqMap,+ pluginModuleNameProvidersMap = emptyUniqMap,+ requirementContext = emptyUniqMap, allowVirtualUnits = False } @@ -509,7 +497,7 @@ instance Outputable u => Outputable (UnitDatabase u) where ppr (UnitDatabase fp _u) = text "DB:" <+> text fp -type UnitInfoMap = Map UnitId UnitInfo+type UnitInfoMap = UniqMap UnitId UnitInfo -- | Find the unit we know about with the given unit, if any lookupUnit :: UnitState -> Unit -> Maybe UnitInfo@@ -525,20 +513,20 @@ lookupUnit' :: Bool -> UnitInfoMap -> PreloadUnitClosure -> Unit -> Maybe UnitInfo lookupUnit' allowOnTheFlyInst pkg_map closure u = case u of HoleUnit -> error "Hole unit"- RealUnit i -> Map.lookup (unDefinite i) pkg_map+ RealUnit i -> lookupUniqMap pkg_map (unDefinite i) VirtUnit i | allowOnTheFlyInst -> -- lookup UnitInfo of the indefinite unit to be instantiated and -- instantiate it on-the-fly fmap (renameUnitInfo pkg_map closure (instUnitInsts i))- (Map.lookup (instUnitInstanceOf i) pkg_map)+ (lookupUniqMap pkg_map (instUnitInstanceOf i)) | otherwise -> -- lookup UnitInfo by virtual UnitId. This is used to find indefinite -- units. Even if they are real, installed units, they can't use the -- `RealUnit` constructor (it is reserved for definite units) so we use -- the `VirtUnit` constructor.- Map.lookup (virtualUnitId i) pkg_map+ lookupUniqMap pkg_map (virtualUnitId i) -- | Find the unit we know about with the given unit id, if any lookupUnitId :: UnitState -> UnitId -> Maybe UnitInfo@@ -546,7 +534,7 @@ -- | Find the unit we know about with the given unit id, if any lookupUnitId' :: UnitInfoMap -> UnitId -> Maybe UnitInfo-lookupUnitId' db uid = Map.lookup uid db+lookupUnitId' db uid = lookupUniqMap db uid -- | Looks up the given unit in the unit state, panicking if it is not found@@ -580,12 +568,12 @@ resolvePackageImport :: UnitState -> ModuleName -> PackageName -> Maybe UnitId resolvePackageImport unit_st mn pn = do -- 1. Find all modules providing the ModuleName (this accounts for visibility/thinning etc)- providers <- Map.filter originVisible <$> Map.lookup mn (moduleNameProvidersMap unit_st)+ providers <- filterUniqMap originVisible <$> lookupUniqMap (moduleNameProvidersMap unit_st) mn -- 2. Get the UnitIds of the candidates- let candidates_uid = concatMap to_uid $ Map.assocs providers+ let candidates_uid = concatMap to_uid $ sortOn fst $ nonDetUniqMapToList providers -- 3. Get the package names of the candidates let candidates_units = map (\ui -> ((unitPackageName ui), unitId ui))- $ mapMaybe (\uid -> Map.lookup uid (unitInfoMap unit_st)) candidates_uid+ $ mapMaybe (\uid -> lookupUniqMap (unitInfoMap unit_st) uid) candidates_uid -- 4. Check to see if the PackageName helps us disambiguate any candidates. lookup pn candidates_units @@ -611,23 +599,22 @@ -- with module holes). -- mkUnitInfoMap :: [UnitInfo] -> UnitInfoMap-mkUnitInfoMap infos = foldl' add Map.empty infos+mkUnitInfoMap infos = foldl' add emptyUniqMap infos where mkVirt p = virtualUnitId (mkInstantiatedUnit (unitInstanceOf p) (unitInstantiations p)) add pkg_map p | not (null (unitInstantiations p))- = Map.insert (mkVirt p) p- $ Map.insert (unitId p) p- $ pkg_map+ = addToUniqMap (addToUniqMap pkg_map (mkVirt p) p)+ (unitId p) p | otherwise- = Map.insert (unitId p) p pkg_map+ = addToUniqMap pkg_map (unitId p) p -- | Get a list of entries from the unit database. NB: be careful with -- this function, although all units in this map are "visible", this -- does not imply that the exposed-modules of the unit are available -- (they may have been thinned or renamed). listUnitInfo :: UnitState -> [UnitInfo]-listUnitInfo state = Map.elems (unitInfoMap state)+listUnitInfo state = nonDetEltsUniqMap (unitInfoMap state) -- ---------------------------------------------------------------------------- -- Loading the unit db files and building up the unit state@@ -915,20 +902,20 @@ -- This method is responsible for computing what our -- inherited requirements are. reqs | UnitIdArg orig_uid <- arg = collectHoles orig_uid- | otherwise = Map.empty+ | otherwise = emptyUniqMap collectHoles uid = case uid of- HoleUnit -> Map.empty- RealUnit {} -> Map.empty -- definite units don't have holes+ HoleUnit -> emptyUniqMap+ RealUnit {} -> emptyUniqMap -- definite units don't have holes VirtUnit indef ->- let local = [ Map.singleton+ let local = [ unitUniqMap (moduleName mod) (Set.singleton $ Module indef mod_name) | (mod_name, mod) <- instUnitInsts indef , isHoleModule mod ] recurse = [ collectHoles (moduleUnit mod) | (_, mod) <- instUnitInsts indef ]- in Map.unionsWith Set.union $ local ++ recurse+ in plusUniqMapListWith Set.union $ local ++ recurse uv = UnitVisibility { uv_expose_all = b@@ -937,7 +924,7 @@ , uv_requirements = reqs , uv_explicit = Just arg }- vm' = Map.insertWith mappend (mkUnit p) uv vm_cleared+ vm' = addToUniqMap_C mappend vm_cleared (mkUnit p) uv -- In the old days, if you said `ghc -package p-0.1 -package p-0.2` -- (or if p-0.1 was registered in the pkgdb as exposed: True), -- the second package flag would override the first one and you@@ -961,7 +948,7 @@ vm_cleared | no_hide_others = vm -- NB: renamings never clear | (_:_) <- rns = vm- | otherwise = Map.filterWithKey+ | otherwise = filterWithKeyUniqMap (\k uv -> k == mkUnit p || First (Just n) /= uv_package_name uv) vm _ -> panic "applyPackageFlag"@@ -969,7 +956,7 @@ HidePackage str -> case findPackages prec_map pkg_map closure (PackageArg str) pkgs unusable of Left ps -> Failed (PackageFlagErr flag ps)- Right ps -> Succeeded $ foldl' (flip Map.delete) vm (map mkUnit ps)+ Right ps -> Succeeded $ foldl' delFromUniqMap vm (map mkUnit ps) -- | Like 'selectPackages', but doesn't return a list of unmatched -- packages. Furthermore, any packages it returns are *renamed*@@ -985,7 +972,7 @@ = let ps = mapMaybe (finder arg) pkgs in if null ps then Left (mapMaybe (\(x,y) -> finder arg x >>= \x' -> return (x',y))- (Map.elems unusable))+ (nonDetEltsUniqMap unusable)) else Right (sortByPreference prec_map ps) where finder (PackageArg str) p@@ -1010,7 +997,7 @@ = let matches = matching arg (ps,rest) = partition matches pkgs in if null ps- then Left (filter (matches.fst) (Map.elems unusable))+ then Left (filter (matches.fst) (nonDetEltsUniqMap unusable)) else Right (sortByPreference prec_map ps, rest) -- | Rename a 'UnitInfo' according to some module instantiation.@@ -1064,8 +1051,8 @@ compareByPreference prec_map pkg pkg' = case comparing unitPackageVersion pkg pkg' of GT -> GT- EQ | Just prec <- Map.lookup (unitId pkg) prec_map- , Just prec' <- Map.lookup (unitId pkg') prec_map+ EQ | Just prec <- lookupUniqMap prec_map (unitId pkg)+ , Just prec' <- lookupUniqMap prec_map (unitId pkg') -- Prefer the unit from the later DB flag (i.e., higher -- precedence) -> compare prec prec'@@ -1089,9 +1076,9 @@ -- ----------------------------------------------------------------------------- -- Wired-in units ----- See Note [Wired-in units] in GHC.Unit.Module+-- See Note [Wired-in units] in GHC.Unit.Types -type WiringMap = Map UnitId UnitId+type WiringMap = UniqMap UnitId UnitId findWiredInUnits :: Logger@@ -1105,7 +1092,7 @@ findWiredInUnits logger prec_map pkgs vis_map = do -- Now we must find our wired-in units, and rename them to -- their canonical names (eg. base-1.0 ==> base), as described- -- in Note [Wired-in units] in GHC.Unit.Module+ -- in Note [Wired-in units] in GHC.Unit.Types let matches :: UnitInfo -> UnitId -> Bool pc `matches` pid = unitPackageName pc == PackageName (unitIdFS pid)@@ -1131,7 +1118,7 @@ findWiredInUnit pkgs wired_pkg = firstJustsM [try all_exposed_ps, try all_ps, notfound] where all_ps = [ p | p <- pkgs, p `matches` wired_pkg ]- all_exposed_ps = [ p | p <- all_ps, Map.member (mkUnit p) vis_map ]+ all_exposed_ps = [ p | p <- all_ps, (mkUnit p) `elemUniqMap` vis_map ] try ps = case sortByPreference prec_map ps of p:_ -> Just <$> pick p@@ -1157,8 +1144,8 @@ let wired_in_pkgs = catMaybes mb_wired_in_pkgs - wiredInMap :: Map UnitId UnitId- wiredInMap = Map.fromList+ wiredInMap :: UniqMap UnitId UnitId+ wiredInMap = listToUniqMap [ (unitId realUnitInfo, wiredInUnitId) | (wiredInUnitId, realUnitInfo) <- wired_in_pkgs , not (unitIsIndefinite realUnitInfo)@@ -1166,7 +1153,7 @@ updateWiredInDependencies pkgs = map (upd_deps . upd_pkg) pkgs where upd_pkg pkg- | Just wiredInUnitId <- Map.lookup (unitId pkg) wiredInMap+ | Just wiredInUnitId <- lookupUniqMap wiredInMap (unitId pkg) = pkg { unitId = wiredInUnitId , unitInstanceOf = wiredInUnitId -- every non instantiated unit is an instance of@@ -1188,7 +1175,7 @@ -- Helper functions for rewiring Module and Unit. These -- rewrite Units of modules in wired-in packages to the form known to the--- compiler, as described in Note [Wired-in units] in GHC.Unit.Module.+-- compiler, as described in Note [Wired-in units] in GHC.Unit.Types. -- -- For instance, base-4.9.0.0 will be rewritten to just base, to match -- what appears in GHC.Builtin.Names.@@ -1207,18 +1194,17 @@ upd_wired_in :: WiringMap -> UnitId -> UnitId upd_wired_in wiredInMap key- | Just key' <- Map.lookup key wiredInMap = key'+ | Just key' <- lookupUniqMap wiredInMap key = key' | otherwise = key updateVisibilityMap :: WiringMap -> VisibilityMap -> VisibilityMap-updateVisibilityMap wiredInMap vis_map = foldl' f vis_map (Map.toList wiredInMap)- where f vm (from, to) = case Map.lookup (RealUnit (Definite from)) vis_map of+updateVisibilityMap wiredInMap vis_map = foldl' f vis_map (nonDetUniqMapToList wiredInMap)+ where f vm (from, to) = case lookupUniqMap vis_map (RealUnit (Definite from)) of Nothing -> vm- Just r -> Map.insert (RealUnit (Definite to)) r- (Map.delete (RealUnit (Definite from)) vm)-+ Just r -> addToUniqMap (delFromUniqMap vm (RealUnit (Definite from)))+ (RealUnit (Definite to)) r --- ----------------------------------------------------------------------------+ -- ---------------------------------------------------------------------------- -- | The reason why a unit is unusable. data UnusableUnitReason@@ -1245,7 +1231,7 @@ ppr (IgnoredDependencies uids) = brackets (text "ignored" <+> ppr uids) ppr (ShadowedDependencies uids) = brackets (text "shadowed" <+> ppr uids) -type UnusableUnits = Map UnitId (UnitInfo, UnusableUnitReason)+type UnusableUnits = UniqMap UnitId (UnitInfo, UnusableUnitReason) pprReason :: SDoc -> UnusableUnitReason -> SDoc pprReason pref reason = case reason of@@ -1275,7 +1261,7 @@ nest 2 (hsep (map (ppr . unitId) vs)) reportUnusable :: Logger -> UnusableUnits -> IO ()-reportUnusable logger pkgs = mapM_ report (Map.toList pkgs)+reportUnusable logger pkgs = mapM_ report (nonDetUniqMapToList pkgs) where report (ipid, (_, reason)) = debugTraceMsg logger 2 $@@ -1289,14 +1275,15 @@ -- | A reverse dependency index, mapping an 'UnitId' to -- the 'UnitId's which have a dependency on it.-type RevIndex = Map UnitId [UnitId]+type RevIndex = UniqMap UnitId [UnitId] -- | Compute the reverse dependency index of a unit database. reverseDeps :: UnitInfoMap -> RevIndex-reverseDeps db = Map.foldl' go Map.empty db+reverseDeps db = nonDetFoldUniqMap go emptyUniqMap db where- go r pkg = foldl' (go' (unitId pkg)) r (unitDepends pkg)- go' from r to = Map.insertWith (++) to [from] r+ go :: (UnitId, UnitInfo) -> RevIndex -> RevIndex+ go (_uid, pkg) r = foldl' (go' (unitId pkg)) r (unitDepends pkg)+ go' from r to = addToUniqMap_C (++) r to [from] -- | Given a list of 'UnitId's to remove, a database, -- and a reverse dependency index (as computed by 'reverseDeps'),@@ -1310,10 +1297,10 @@ where go [] (m,pkgs) = (m,pkgs) go (uid:uids) (m,pkgs)- | Just pkg <- Map.lookup uid m- = case Map.lookup uid index of- Nothing -> go uids (Map.delete uid m, pkg:pkgs)- Just rdeps -> go (rdeps ++ uids) (Map.delete uid m, pkg:pkgs)+ | Just pkg <- lookupUniqMap m uid+ = case lookupUniqMap index uid of+ Nothing -> go uids (delFromUniqMap m uid, pkg:pkgs)+ Just rdeps -> go (rdeps ++ uids) (delFromUniqMap m uid, pkg:pkgs) | otherwise = go uids (m,pkgs) @@ -1322,7 +1309,7 @@ depsNotAvailable :: UnitInfoMap -> UnitInfo -> [UnitId]-depsNotAvailable pkg_map pkg = filter (not . (`Map.member` pkg_map)) (unitDepends pkg)+depsNotAvailable pkg_map pkg = filter (not . (`elemUniqMap` pkg_map)) (unitDepends pkg) -- | Given a 'UnitInfo' from some 'UnitInfoMap' return all entries in -- 'unitAbiDepends' which correspond to units that do not exist, OR have@@ -1333,7 +1320,7 @@ depsAbiMismatch pkg_map pkg = map fst . filter (not . abiMatch) $ unitAbiDepends pkg where abiMatch (dep_uid, abi)- | Just dep_pkg <- Map.lookup dep_uid pkg_map+ | Just dep_pkg <- lookupUniqMap pkg_map dep_uid = unitAbiHash dep_pkg == abi | otherwise = False@@ -1342,7 +1329,7 @@ -- Ignore units ignoreUnits :: [IgnorePackageFlag] -> [UnitInfo] -> UnusableUnits-ignoreUnits flags pkgs = Map.fromList (concatMap doit flags)+ignoreUnits flags pkgs = listToUniqMap (concatMap doit flags) where doit (IgnorePackage str) = case partition (matchingStr str) pkgs of@@ -1362,7 +1349,7 @@ -- the command line. We use this mapping to make sure we prefer -- units that were defined later on the command line, if there -- is an ambiguity.-type UnitPrecedenceMap = Map UnitId Int+type UnitPrecedenceMap = UniqMap UnitId Int -- | Given a list of databases, merge them together, where -- units with the same unit id in later databases override@@ -1370,7 +1357,7 @@ -- makes sense (that's done by 'validateDatabase'). mergeDatabases :: Logger -> [UnitDatabase UnitId] -> IO (UnitInfoMap, UnitPrecedenceMap)-mergeDatabases logger = foldM merge (Map.empty, Map.empty) . zip [1..]+mergeDatabases logger = foldM merge (emptyUniqMap, emptyUniqMap) . zip [1..] where merge (pkg_map, prec_map) (i, UnitDatabase db_path db) = do debugTraceMsg logger 2 $@@ -1382,22 +1369,22 @@ return (pkg_map', prec_map') where db_map = mk_pkg_map db- mk_pkg_map = Map.fromList . map (\p -> (unitId p, p))+ mk_pkg_map = listToUniqMap . map (\p -> (unitId p, p)) -- The set of UnitIds which appear in both db and pkgs. These are the -- ones that get overridden. Compute this just to give some -- helpful debug messages at -v2 override_set :: Set UnitId- override_set = Set.intersection (Map.keysSet db_map)- (Map.keysSet pkg_map)+ override_set = Set.intersection (nonDetUniqMapToKeySet db_map)+ (nonDetUniqMapToKeySet pkg_map) -- Now merge the sets together (NB: in case of duplicate, -- first argument preferred) pkg_map' :: UnitInfoMap- pkg_map' = Map.union db_map pkg_map+ pkg_map' = pkg_map `plusUniqMap` db_map prec_map' :: UnitPrecedenceMap- prec_map' = Map.union (Map.map (const i) db_map) prec_map+ prec_map' = prec_map `plusUniqMap` (mapUniqMap (const i) db_map) -- | Validates a database, removing unusable units from it -- (this includes removing units that the user has explicitly@@ -1420,39 +1407,45 @@ -- Helper function mk_unusable mk_err dep_matcher m uids =- Map.fromList [ (unitId pkg, (pkg, mk_err (dep_matcher m pkg)))- | pkg <- uids ]+ listToUniqMap [ (unitId pkg, (pkg, mk_err (dep_matcher m pkg)))+ | pkg <- uids+ ] -- Find broken units directly_broken = filter (not . null . depsNotAvailable pkg_map1)- (Map.elems pkg_map1)+ (nonDetEltsUniqMap pkg_map1) (pkg_map2, broken) = removeUnits (map unitId directly_broken) index pkg_map1 unusable_broken = mk_unusable BrokenDependencies depsNotAvailable pkg_map2 broken -- Find recursive units sccs = stronglyConnComp [ (pkg, unitId pkg, unitDepends pkg)- | pkg <- Map.elems pkg_map2 ]+ | pkg <- nonDetEltsUniqMap pkg_map2 ] getCyclicSCC (CyclicSCC vs) = map unitId vs getCyclicSCC (AcyclicSCC _) = [] (pkg_map3, cyclic) = removeUnits (concatMap getCyclicSCC sccs) index pkg_map2 unusable_cyclic = mk_unusable CyclicDependencies depsNotAvailable pkg_map3 cyclic -- Apply ignore flags- directly_ignored = ignoreUnits ignore_flags (Map.elems pkg_map3)- (pkg_map4, ignored) = removeUnits (Map.keys directly_ignored) index pkg_map3+ directly_ignored = ignoreUnits ignore_flags (nonDetEltsUniqMap pkg_map3)+ (pkg_map4, ignored) = removeUnits (nonDetKeysUniqMap directly_ignored) index pkg_map3 unusable_ignored = mk_unusable IgnoredDependencies depsNotAvailable pkg_map4 ignored -- Knock out units whose dependencies don't agree with ABI -- (i.e., got invalidated due to shadowing) directly_shadowed = filter (not . null . depsAbiMismatch pkg_map4)- (Map.elems pkg_map4)+ (nonDetEltsUniqMap pkg_map4) (pkg_map5, shadowed) = removeUnits (map unitId directly_shadowed) index pkg_map4 unusable_shadowed = mk_unusable ShadowedDependencies depsAbiMismatch pkg_map5 shadowed - unusable = directly_ignored `Map.union` unusable_ignored- `Map.union` unusable_broken- `Map.union` unusable_cyclic- `Map.union` unusable_shadowed+ -- combine all unusables. The order is important for shadowing.+ -- plusUniqMapList folds using plusUFM which is right biased (opposite of+ -- Data.Map.union) so the head of the list should be the least preferred+ unusable = plusUniqMapList [ unusable_shadowed+ , unusable_cyclic+ , unusable_broken+ , unusable_ignored+ , directly_ignored+ ] -- ----------------------------------------------------------------------------- -- When all the command-line options are in, we can process our unit@@ -1551,7 +1544,7 @@ -- or not packages are visible or not) pkgs1 <- mayThrowUnitErr $ foldM (applyTrustFlag prec_map unusable)- (Map.elems pkg_map2) (reverse (unitConfigFlagsTrusted cfg))+ (nonDetEltsUniqMap pkg_map2) (reverse (unitConfigFlagsTrusted cfg)) let prelim_pkg_db = mkUnitInfoMap pkgs1 --@@ -1591,17 +1584,16 @@ -- default, because it's almost assuredly not -- what you want (no mix-in linking has occurred). if unitIsExposed p && unitIsDefinite (mkUnit p) && mostPreferable p- then Map.insert (mkUnit p)+ then addToUniqMap vm (mkUnit p) UnitVisibility { uv_expose_all = True, uv_renamings = [], uv_package_name = First (Just (fsPackageName p)),- uv_requirements = Map.empty,+ uv_requirements = emptyUniqMap, uv_explicit = Nothing }- vm else vm)- Map.empty pkgs1+ emptyUniqMap pkgs1 -- -- Compute a visibility map according to the command-line flags (-package,@@ -1629,9 +1621,9 @@ case unitConfigFlagsPlugins cfg of -- common case; try to share the old vis_map [] | not hide_plugin_pkgs -> return vis_map- | otherwise -> return Map.empty+ | otherwise -> return emptyUniqMap _ -> do let plugin_vis_map1- | hide_plugin_pkgs = Map.empty+ | hide_plugin_pkgs = emptyUniqMap -- Use the vis_map PRIOR to wired in, -- because otherwise applyPackageFlag -- won't work.@@ -1660,9 +1652,9 @@ -- The requirement context is directly based off of this: we simply -- look for nested unit IDs that are directly fed holes: the requirements -- of those units are precisely the ones we need to track- let explicit_pkgs = [(k, uv_explicit v) | (k, v) <- Map.toList vis_map]- req_ctx = Map.map (Set.toList)- $ Map.unionsWith Set.union (map uv_requirements (Map.elems vis_map))+ let explicit_pkgs = [(k, uv_explicit v) | (k, v) <- nonDetUniqMapToList vis_map]+ req_ctx = mapUniqMap (Set.toList)+ $ plusUniqMapListWith Set.union (map uv_requirements (nonDetEltsUniqMap vis_map)) --@@ -1675,11 +1667,11 @@ -- NB: preload IS important even for type-checking, because we -- need the correct include path to be set. --- let preload1 = Map.keys (Map.filter (isJust . uv_explicit) vis_map)+ let preload1 = nonDetKeysUniqMap (filterUniqMap (isJust . uv_explicit) vis_map) -- add default preload units if they can be found in the db basicLinkedUnits = fmap (RealUnit . Definite)- $ filter (flip Map.member pkg_db)+ $ filter (flip elemUniqMap pkg_db) $ unitConfigAutoLink cfg preload3 = ordNub $ (basicLinkedUnits ++ preload1) @@ -1690,7 +1682,7 @@ let mod_map1 = mkModuleNameProvidersMap logger cfg pkg_db emptyUniqSet vis_map mod_map2 = mkUnusableModuleNameProvidersMap unusable- mod_map = Map.union mod_map1 mod_map2+ mod_map = mod_map2 `plusUniqMap` mod_map1 -- Force the result to avoid leaking input parameters let !state = UnitState@@ -1703,7 +1695,7 @@ , pluginModuleNameProvidersMap = mkModuleNameProvidersMap logger cfg pkg_db emptyUniqSet plugin_vis_map , packageNameMap = pkgname_map , wireMap = wired_map- , unwireMap = Map.fromList [ (v,k) | (k,v) <- Map.toList wired_map ]+ , unwireMap = listToUniqMap [ (v,k) | (k,v) <- nonDetUniqMapToList wired_map ] , requirementContext = req_ctx , allowVirtualUnits = unitConfigAllowVirtual cfg }@@ -1726,7 +1718,7 @@ -- that it was recorded as in the package database. unwireUnit :: UnitState -> Unit -> Unit unwireUnit state uid@(RealUnit (Definite def_uid)) =- maybe uid (RealUnit . Definite) (Map.lookup def_uid (unwireMap state))+ maybe uid (RealUnit . Definite) (lookupUniqMap (unwireMap state) def_uid) unwireUnit _ uid = uid -- -----------------------------------------------------------------------------@@ -1761,36 +1753,35 @@ -- 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+ nonDetFoldUniqMap extend_modmap emptyMap vis_map_extended where- vis_map_extended = Map.union vis_map {- preferred -} default_vis+ vis_map_extended = {- preferred -} default_vis `plusUniqMap` vis_map - default_vis = Map.fromList+ default_vis = listToUniqMap [ (mkUnit pkg, mempty)- | pkg <- Map.elems pkg_map+ | (_, pkg) <- nonDetUniqMapToList pkg_map -- Exclude specific instantiations of an indefinite -- package , unitIsIndefinite pkg || null (unitInstantiations pkg) ] - emptyMap = Map.empty+ emptyMap = emptyUniqMap setOrigins m os = fmap (const os) m- extend_modmap modmap uid- UnitVisibility { uv_expose_all = b, uv_renamings = rns }+ extend_modmap (uid, UnitVisibility { uv_expose_all = b, uv_renamings = rns }) modmap = addListTo modmap theBindings where pkg = unit_lookup uid - theBindings :: [(ModuleName, Map Module ModuleOrigin)]+ theBindings :: [(ModuleName, UniqMap Module ModuleOrigin)] theBindings = newBindings b rns newBindings :: Bool -> [(ModuleName, ModuleName)]- -> [(ModuleName, Map Module ModuleOrigin)]+ -> [(ModuleName, UniqMap Module ModuleOrigin)] newBindings e rns = es e ++ hiddens ++ map rnBinding rns rnBinding :: (ModuleName, ModuleName)- -> (ModuleName, Map Module ModuleOrigin)+ -> (ModuleName, UniqMap Module ModuleOrigin) rnBinding (orig, new) = (new, setOrigins origEntry fromFlag) where origEntry = case lookupUFM esmap orig of Just r -> r@@ -1799,7 +1790,7 @@ (text "package flag: could not find module name" <+> ppr orig <+> text "in package" <+> ppr pk))) - es :: Bool -> [(ModuleName, Map Module ModuleOrigin)]+ es :: Bool -> [(ModuleName, UniqMap Module ModuleOrigin)] es e = do (m, exposedReexport) <- exposed_mods let (pk', m', origin') =@@ -1809,7 +1800,7 @@ (pk', m', fromReexportedModules e pkg) return (m, mkModMap pk' m' origin') - esmap :: UniqFM ModuleName (Map Module ModuleOrigin)+ esmap :: UniqFM ModuleName (UniqMap Module ModuleOrigin) esmap = listToUFM (es False) -- parameter here doesn't matter, orig will -- be overwritten @@ -1825,54 +1816,39 @@ -- | Make a 'ModuleNameProvidersMap' covering a set of unusable packages. mkUnusableModuleNameProvidersMap :: UnusableUnits -> ModuleNameProvidersMap mkUnusableModuleNameProvidersMap unusables =- Map.foldl' extend_modmap Map.empty unusables+ nonDetFoldUniqMap extend_modmap emptyUniqMap unusables where- extend_modmap modmap (unit_info, reason) = addListTo modmap bindings- where bindings :: [(ModuleName, Map Module ModuleOrigin)]+ extend_modmap (_uid, (pkg, reason)) modmap = addListTo modmap bindings+ where bindings :: [(ModuleName, UniqMap Module ModuleOrigin)] bindings = exposed ++ hidden - origin_reexport = ModUnusable (UnusableUnit unit reason True)- origin_normal = ModUnusable (UnusableUnit unit reason False)- unit = mkUnit unit_info+ origin = ModUnusable reason+ pkg_id = mkUnit pkg exposed = map get_exposed exposed_mods- hidden = [(m, mkModMap unit m origin_normal) | m <- hidden_mods]+ hidden = [(m, mkModMap pkg_id m origin) | m <- hidden_mods] - -- with re-exports, c:Foo can be reexported from two (or more)- -- unusable packages:- -- Foo -> a:Foo (unusable reason A) -> c:Foo- -- -> b:Foo (unusable reason B) -> c:Foo- --- -- We must be careful to not record the following (#21097):- -- Foo -> c:Foo (unusable reason A)- -- -> c:Foo (unusable reason B)- -- But:- -- Foo -> a:Foo (unusable reason A)- -- -> b:Foo (unusable reason B)- --- get_exposed (mod, Just _) = (mod, mkModMap unit mod origin_reexport)- get_exposed (mod, _) = (mod, mkModMap unit mod origin_normal)- -- in the reexport case, we create a virtual module that doesn't- -- exist but we don't care as it's only used as a key in the map.+ get_exposed (mod, Just mod') = (mod, unitUniqMap mod' origin)+ get_exposed (mod, _) = (mod, mkModMap pkg_id mod origin) - exposed_mods = unitExposedModules unit_info- hidden_mods = unitHiddenModules unit_info+ exposed_mods = unitExposedModules pkg+ hidden_mods = unitHiddenModules 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 #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 :: (Monoid a, Ord k1, Ord k2, Uniquable k1, Uniquable k2)+ => UniqMap k1 (UniqMap k2 a)+ -> [(k1, UniqMap k2 a)]+ -> UniqMap k1 (UniqMap k2 a) addListTo = foldl' merge- where merge m (k, v) = MapStrict.insertWith (Map.unionWith mappend) k v m+ where merge m (k, v) = addToUniqMap_C (plusUniqMap_C mappend) m k v -- | Create a singleton module mapping-mkModMap :: Unit -> ModuleName -> ModuleOrigin -> Map Module ModuleOrigin-mkModMap pkg mod = Map.singleton (mkModule pkg mod)+mkModMap :: Unit -> ModuleName -> ModuleOrigin -> UniqMap Module ModuleOrigin+mkModMap pkg mod = unitUniqMap (mkModule pkg mod) -- -----------------------------------------------------------------------------@@ -1950,10 +1926,10 @@ -> PkgQual -> LookupResult lookupModuleWithSuggestions' pkgs mod_map m mb_pn- = case Map.lookup m mod_map of+ = case lookupUniqMap mod_map m of Nothing -> LookupNotFound suggestions Just xs ->- case foldl' classify ([],[],[], []) (Map.toList xs) of+ case foldl' classify ([],[],[], []) (sortOn fst $ nonDetUniqMapToList xs) of ([], [], [], []) -> LookupNotFound suggestions (_, _, _, [(m, o)]) -> LookupFound m (mod_unit m, o) (_, _, _, exposed@(_:_)) -> LookupMultiple exposed@@ -2011,8 +1987,8 @@ all_mods :: [(String, ModuleSuggestion)] -- All modules all_mods = sortBy (comparing fst) $ [ (moduleNameString m, suggestion)- | (m, e) <- Map.toList (moduleNameProvidersMap pkgs)- , suggestion <- map (getSuggestion m) (Map.toList e)+ | (m, e) <- nonDetUniqMapToList (moduleNameProvidersMap pkgs)+ , suggestion <- map (getSuggestion m) (nonDetUniqMapToList e) ] getSuggestion name (mod, origin) = (if originVisible origin then SuggestVisible else SuggestHidden)@@ -2020,8 +1996,8 @@ listVisibleModuleNames :: UnitState -> [ModuleName] listVisibleModuleNames state =- map fst (filter visible (Map.toList (moduleNameProvidersMap state)))- where visible (_, ms) = any originVisible (Map.elems ms)+ map fst (filter visible (nonDetUniqMapToList (moduleNameProvidersMap state)))+ where visible (_, ms) = anyUniqMap originVisible ms -- | Takes a list of UnitIds (and their "parent" dependency, used for error -- messages), and returns the list with dependencies included, in reverse@@ -2032,7 +2008,7 @@ -- | Similar to closeUnitDeps but takes a list of already loaded units as an -- additional argument. closeUnitDeps' :: UnitInfoMap -> [UnitId] -> [(UnitId,Maybe UnitId)] -> MaybeErr UnitErr [UnitId]-closeUnitDeps' pkg_map current_ids ps = foldM (add_unit pkg_map) current_ids ps+closeUnitDeps' pkg_map current_ids ps = foldM (uncurry . add_unit pkg_map) current_ids ps -- | Add a UnitId and those it depends on (recursively) to the given list of -- UnitIds if they are not already in it. Return a list in reverse dependency@@ -2043,9 +2019,10 @@ -- error message ("dependency of <PARENT>"). add_unit :: UnitInfoMap -> [UnitId]- -> (UnitId,Maybe UnitId)+ -> UnitId+ -> Maybe UnitId -> MaybeErr UnitErr [UnitId]-add_unit pkg_map ps (p, mb_parent)+add_unit pkg_map ps p mb_parent | p `elem` ps = return ps -- Check if we've already added this unit | otherwise = case lookupUnitId' pkg_map p of Nothing -> Failed (CloseUnitErr p mb_parent)@@ -2054,8 +2031,8 @@ ps' <- foldM add_unit_key ps (unitDepends info) return (p : ps') where- add_unit_key ps key- = add_unit pkg_map ps (key, Just p)+ add_unit_key xs key+ = add_unit pkg_map xs key (Just p) data UnitErr = CloseUnitErr !UnitId !(Maybe UnitId)@@ -2099,7 +2076,7 @@ -- to form @mod_name@, or @[]@ if this is not a requirement. requirementMerges :: UnitState -> ModuleName -> [InstantiatedModule] requirementMerges pkgstate mod_name =- fromMaybe [] (Map.lookup mod_name (requirementContext pkgstate))+ fromMaybe [] (lookupUniqMap (requirementContext pkgstate) mod_name) -- ----------------------------------------------------------------------------- @@ -2154,9 +2131,9 @@ -- | Show the mapping of modules to where they come from. pprModuleMap :: ModuleNameProvidersMap -> SDoc pprModuleMap mod_map =- vcat (map pprLine (Map.toList mod_map))+ vcat (map pprLine (nonDetUniqMapToList mod_map)) where- pprLine (m,e) = ppr m $$ nest 50 (vcat (map (pprEntry m) (Map.toList e)))+ pprLine (m,e) = ppr m $$ nest 50 (vcat (map (pprEntry m) (nonDetUniqMapToList e))) pprEntry :: Outputable a => ModuleName -> (Module, a) -> SDoc pprEntry m (m',o) | m == moduleName m' = ppr (moduleUnit m') <+> parens (ppr o)
GHC/Unit/Types.hs view
@@ -99,6 +99,7 @@ import GHC.Utils.Encoding import GHC.Utils.Fingerprint import GHC.Utils.Misc+import GHC.Settings.Config (cProjectUnitId) import Control.DeepSeq import Data.Data@@ -166,7 +167,7 @@ instance Outputable InstantiatedUnit where ppr = pprInstantiatedUnit -pprInstantiatedUnit :: IsLine doc => InstantiatedUnit -> doc+pprInstantiatedUnit :: InstantiatedUnit -> SDoc pprInstantiatedUnit uid = -- getPprStyle $ \sty -> pprUnitId cid <>@@ -180,8 +181,6 @@ where cid = instUnitInstanceOf uid insts = instUnitInsts uid-{-# SPECIALIZE pprInstantiatedUnit :: InstantiatedUnit -> SDoc #-}-{-# SPECIALIZE pprInstantiatedUnit :: InstantiatedUnit -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable -- | Class for types that are used as unit identifiers (UnitKey, UnitId, Unit) --@@ -203,14 +202,13 @@ unitFS HoleUnit = holeFS pprModule :: IsLine doc => Module -> doc-pprModule mod@(Module p n) = docWithContext (doc . sdocStyle)+pprModule mod@(Module p n) = docWithStyle code doc where- doc sty- | codeStyle sty =- (if p == mainUnit+ code = (if p == mainUnit then empty -- never qualify the main package in code else ztext (zEncodeFS (unitFS p)) <> char '_') <> pprModuleName n+ doc sty | qualModule sty mod = case p of HoleUnit -> angleBrackets (pprModuleName n)@@ -352,12 +350,10 @@ instance Outputable Unit where ppr pk = pprUnit pk -pprUnit :: IsLine doc => Unit -> doc+pprUnit :: Unit -> SDoc pprUnit (RealUnit (Definite d)) = pprUnitId d pprUnit (VirtUnit uid) = pprInstantiatedUnit uid pprUnit HoleUnit = ftext holeFS-{-# SPECIALIZE pprUnit :: Unit -> SDoc #-}-{-# SPECIALIZE pprUnit :: Unit -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable instance Show Unit where show = unitString@@ -535,12 +531,8 @@ instance Outputable UnitId where ppr = pprUnitId -pprUnitId :: IsLine doc => UnitId -> doc-pprUnitId (UnitId fs) = dualLine (sdocOption sdocUnitIdForUser ($ fs)) (ftext fs)- -- see Note [Pretty-printing UnitId] in GHC.Unit- -- also see Note [dualLine and dualDoc] in GHC.Utils.Outputable-{-# SPECIALIZE pprUnitId :: UnitId -> SDoc #-}-{-# SPECIALIZE pprUnitId :: UnitId -> HLine #-} -- see Note [SPECIALIZE to HDoc] in GHC.Utils.Outputable+pprUnitId :: UnitId -> SDoc+pprUnitId (UnitId fs) = sdocOption sdocUnitIdForUser ($ fs) -- | A 'DefUnitId' is an 'UnitId' with the invariant that -- it only refers to a definite library; i.e., one we have generated@@ -606,7 +598,7 @@ bignumUnitId = UnitId (fsLit "ghc-bignum") baseUnitId = UnitId (fsLit "base") rtsUnitId = UnitId (fsLit "rts")-thisGhcUnitId = UnitId (fsLit "ghc")+thisGhcUnitId = UnitId (fsLit cProjectUnitId) -- See Note [GHC's Unit Id] interactiveUnitId = UnitId (fsLit "interactive") thUnitId = UnitId (fsLit "template-haskell") @@ -634,8 +626,49 @@ , baseUnitId , rtsUnitId , thUnitId- , thisGhcUnitId ]+ -- NB: ghc is no longer part of the wired-in units since its unit-id, given+ -- by hadrian or cabal, is no longer overwritten and now matches both the+ -- cProjectUnitId defined in build-time-generated module GHC.Version, and+ -- the unit key.+ --+ -- See also Note [About units], taking into consideration ghc is still a+ -- wired-in unit but whose unit-id no longer needs special handling because+ -- we take care that it matches the unit key.++{-+Note [GHC's Unit Id]+~~~~~~~~~~~~~~~~~~~~+Previously, the unit-id of ghc-the-library was fixed as `ghc`.+This was done primarily because the compiler must know the unit-id of+some packages (including ghc) a-priori to define wired-in names.++However, as seen in #20742, a reinstallable `ghc` whose unit-id is fixed+to `ghc` might result in subtle bugs when different ghc's interact.++A good example of this is having GHC_A load a plugin compiled by GHC_B,+where GHC_A and GHC_B are linked to ghc-libraries that are ABI+incompatible. Without a distinction between the unit-id of the ghc library+GHC_A is linked against and the ghc library the plugin it is loading was+compiled against, we can't check compatibility.++Now, we give a better unit-id to ghc (`ghc-version-hash`) by++(1) Not setting -this-unit-id fixed to `ghc` in `ghc.cabal`, but rather by having+ (1.1) Hadrian pass the new unit-id with -this-unit-id for stage0-1+ (1.2) Cabal pass the unit-id it computes to ghc, which it already does by default++(2) Adding a definition to `GHC.Settings.Config` whose value is the new+unit-id. This is crucial to define the wired-in name of the GHC unit+(`thisGhcUnitId`) which *must* match the value of the -this-unit-id flag.+(Where `GHC.Settings.Config` is a module generated by the build system which,+be it either hadrian or cabal, knows exactly the unit-id it passed with -this-unit-id)++Note that we also ensure the ghc's unit key matches its unit id, both when+hadrian or cabal is building ghc. This way, we no longer need to add `ghc` to+the WiringMap, and that's why 'wiredInUnitIds' no longer includes+'thisGhcUnitId'.+-} --------------------------------------------------------------------- -- Boot Modules
GHC/Utils/Binary.hs view
@@ -44,7 +44,7 @@ castBin, withBinBuffer, - foldGet,+ foldGet, foldGet', writeBinMem, readBinMem,@@ -332,7 +332,24 @@ b' <- f i a b go (i+1) b' +foldGet'+ :: Binary a+ => Word -- n elements+ -> BinHandle+ -> b -- initial accumulator+ -> (Word -> a -> b -> IO b)+ -> IO b+{-# INLINE foldGet' #-}+foldGet' n bh init_b f = go 0 init_b+ where+ go i !b+ | i == n = return b+ | otherwise = do+ !a <- get bh+ b' <- f i a b+ go (i+1) b' + -- ----------------------------------------------------------------------------- -- Low-level reading/writing of bytes @@ -1242,16 +1259,6 @@ instance Binary ModuleName where put_ bh (ModuleName fs) = put_ bh fs get bh = do fs <- get bh; return (ModuleName fs)---- instance Binary FunctionOrData where--- put_ bh IsFunction = putByte bh 0--- put_ bh IsData = putByte bh 1--- get bh = do--- h <- getByte bh--- case h of--- 0 -> return IsFunction--- 1 -> return IsData--- _ -> panic "Binary FunctionOrData" -- instance Binary TupleSort where -- put_ bh BoxedTuple = putByte bh 0
− GHC/Utils/Containers/Internal/BitUtil.hs
@@ -1,69 +0,0 @@-{-# LANGUAGE CPP #-}-#if __GLASGOW_HASKELL__-{-# LANGUAGE MagicHash #-}-#endif-#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)-{-# LANGUAGE Safe #-}-#endif---------------------------------------------------------------------------------- |--- Module : Utils.Containers.Internal.BitUtil--- Copyright : (c) Clark Gaebel 2012--- (c) Johan Tibel 2012--- License : BSD-style--- Maintainer : libraries@haskell.org--- Portability : portable------------------------------------------------------------------------------------ = WARNING------ This module is considered __internal__.------ The Package Versioning Policy __does not apply__.------ The contents of this module may change __in any way whatsoever__--- and __without any warning__ between minor versions of this package.------ Authors importing this module are expected to track development--- closely.--module GHC.Utils.Containers.Internal.BitUtil- ( bitcount- , highestBitMask- , shiftLL- , shiftRL- ) where--import GHC.Prelude.Basic-import Data.Word--{----------------------------------------------------------------------- [bitcount] as posted by David F. Place to haskell-cafe on April 11, 2006,- based on the code on- http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan,- where the following source is given:- Published in 1988, the C Programming Language 2nd Ed. (by Brian W.- Kernighan and Dennis M. Ritchie) mentions this in exercise 2-9. On April- 19, 2006 Don Knuth pointed out to me that this method "was first published- by Peter Wegner in CACM 3 (1960), 322. (Also discovered independently by- Derrick Lehmer and published in 1964 in a book edited by Beckenbach.)"-----------------------------------------------------------------------}--bitcount :: Int -> Word64 -> Int-bitcount a x = a + popCount x-{-# INLINE bitcount #-}---- The highestBitMask implementation is based on--- http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2--- which has been put in the public domain.---- | Return a word where only the highest bit is set.-highestBitMask :: Word64 -> Word64-highestBitMask w = shiftLL 1 (63 - countLeadingZeros w)-{-# INLINE highestBitMask #-}---- Right and left logical shifts.-shiftRL, shiftLL :: Word64 -> Int -> Word64-shiftRL = unsafeShiftR-shiftLL = unsafeShiftL
− GHC/Utils/Containers/Internal/StrictPair.hs
@@ -1,25 +0,0 @@-{-# LANGUAGE CPP #-}-#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)-{-# LANGUAGE Safe #-}-#endif---- | A strict pair--module GHC.Utils.Containers.Internal.StrictPair (StrictPair(..), toPair) where--import Prelude () -- for build ordering; see #23942 and- -- Note [Depend on GHC.Num.Integer] in base:GHC.Base---- | The same as a regular Haskell pair, but------ @--- (x :*: _|_) = (_|_ :*: y) = _|_--- @-data StrictPair a b = !a :*: !b--infixr 1 :*:---- | Convert a strict pair to a standard pair.-toPair :: StrictPair a b -> (a, b)-toPair (x :*: y) = (x, y)-{-# INLINE toPair #-}
GHC/Utils/Error.hs view
@@ -32,7 +32,7 @@ formatBulleted, -- ** Construction- DiagOpts (..), diag_wopt, diag_fatal_wopt,+ DiagOpts (..), emptyDiagOpts, diag_wopt, diag_fatal_wopt, emptyMessages, mkDecorated, mkLocMessage, mkMsgEnvelope, mkPlainMsgEnvelope, mkPlainErrorMsgEnvelope, mkErrorMsgEnvelope,@@ -79,6 +79,7 @@ import GHC.Utils.Logger import GHC.Types.Error import GHC.Types.SrcLoc as SrcLoc+import GHC.Unit.Module.Warnings import System.Exit ( ExitCode(..), exitWith ) import Data.List ( sortBy )@@ -89,49 +90,93 @@ import Control.Monad.Catch as MC (handle) import GHC.Conc ( getAllocationCounter ) import System.CPUTime+import Data.List.NonEmpty (NonEmpty (..))+import qualified Data.List.NonEmpty as NE data DiagOpts = DiagOpts { diag_warning_flags :: !(EnumSet WarningFlag) -- ^ Enabled warnings , diag_fatal_warning_flags :: !(EnumSet WarningFlag) -- ^ Fatal warnings+ , diag_custom_warning_categories :: !WarningCategorySet -- ^ Enabled custom warning categories+ , diag_fatal_custom_warning_categories :: !WarningCategorySet -- ^ Fatal custom warning categories , diag_warn_is_error :: !Bool -- ^ Treat warnings as errors , diag_reverse_errors :: !Bool -- ^ Reverse error reporting order , diag_max_errors :: !(Maybe Int) -- ^ Max reported error count , diag_ppr_ctx :: !SDocContext -- ^ Error printing context } +emptyDiagOpts :: DiagOpts+emptyDiagOpts =+ DiagOpts+ { diag_warning_flags = EnumSet.empty+ , diag_fatal_warning_flags = EnumSet.empty+ , diag_custom_warning_categories = emptyWarningCategorySet+ , diag_fatal_custom_warning_categories = emptyWarningCategorySet+ , diag_warn_is_error = False+ , diag_reverse_errors = False+ , diag_max_errors = Nothing+ , diag_ppr_ctx = defaultSDocContext+ }+ diag_wopt :: WarningFlag -> DiagOpts -> Bool diag_wopt wflag opts = wflag `EnumSet.member` diag_warning_flags opts diag_fatal_wopt :: WarningFlag -> DiagOpts -> Bool diag_fatal_wopt wflag opts = wflag `EnumSet.member` diag_fatal_warning_flags opts +diag_wopt_custom :: WarningCategory -> DiagOpts -> Bool+diag_wopt_custom wflag opts = wflag `elemWarningCategorySet` diag_custom_warning_categories opts++diag_fatal_wopt_custom :: WarningCategory -> DiagOpts -> Bool+diag_fatal_wopt_custom wflag opts = wflag `elemWarningCategorySet` diag_fatal_custom_warning_categories opts+ -- | Computes the /right/ 'Severity' for the input 'DiagnosticReason' out of -- the 'DiagOpts. This function /has/ to be called when a diagnostic is constructed, -- i.e. with a 'DiagOpts \"snapshot\" taken as close as possible to where a -- particular diagnostic message is built, otherwise the computed 'Severity' might -- not be correct, due to the mutable nature of the 'DynFlags' in GHC.+--+-- diagReasonSeverity :: DiagOpts -> DiagnosticReason -> Severity-diagReasonSeverity opts reason = case reason of- WarningWithFlag wflag- | not (diag_wopt wflag opts) -> SevIgnore- | diag_fatal_wopt wflag opts -> SevError- | otherwise -> SevWarning+diagReasonSeverity opts reason = fst (diag_reason_severity opts reason)++-- Like the diagReasonSeverity but the second half of the pair is a small+-- ReasolvedDiagnosticReason which would cause the diagnostic to be triggered with the+-- same severity.+--+-- See Note [Warnings controlled by multiple flags]+--+diag_reason_severity :: DiagOpts -> DiagnosticReason -> (Severity, ResolvedDiagnosticReason)+diag_reason_severity opts reason = fmap ResolvedDiagnosticReason $ case reason of+ WarningWithFlags wflags -> case wflags' of+ [] -> (SevIgnore, reason)+ w : ws -> case wflagsE of+ [] -> (SevWarning, WarningWithFlags (w :| ws))+ e : es -> (SevError, WarningWithFlags (e :| es))+ where+ wflags' = NE.filter (\wflag -> diag_wopt wflag opts) wflags+ wflagsE = filter (\wflag -> diag_fatal_wopt wflag opts) wflags'++ WarningWithCategory wcat+ | not (diag_wopt_custom wcat opts) -> (SevIgnore, reason)+ | diag_fatal_wopt_custom wcat opts -> (SevError, reason)+ | otherwise -> (SevWarning, reason) WarningWithoutFlag- | diag_warn_is_error opts -> SevError- | otherwise -> SevWarning+ | diag_warn_is_error opts -> (SevError, reason)+ | otherwise -> (SevWarning, reason) ErrorWithoutFlag- -> SevError-+ -> (SevError, reason) -- | Make a 'MessageClass' for a given 'DiagnosticReason', consulting the--- 'DiagOpts.+-- 'DiagOpts'. mkMCDiagnostic :: DiagOpts -> DiagnosticReason -> Maybe DiagnosticCode -> MessageClass-mkMCDiagnostic opts reason code = MCDiagnostic (diagReasonSeverity opts reason) reason code+mkMCDiagnostic opts reason code = MCDiagnostic sev reason' code+ where+ (sev, reason') = diag_reason_severity opts reason -- | Varation of 'mkMCDiagnostic' which can be used when we are /sure/ the -- input 'DiagnosticReason' /is/ 'ErrorWithoutFlag' and there is no diagnostic code. errorDiagnostic :: MessageClass-errorDiagnostic = MCDiagnostic SevError ErrorWithoutFlag Nothing+errorDiagnostic = MCDiagnostic SevError (ResolvedDiagnosticReason ErrorWithoutFlag) Nothing -- -- Creating MsgEnvelope(s)@@ -142,13 +187,15 @@ => Severity -> SrcSpan -> NamePprCtx+ -> ResolvedDiagnosticReason -> e -> MsgEnvelope e-mk_msg_envelope severity locn name_ppr_ctx err+mk_msg_envelope severity locn name_ppr_ctx reason err = MsgEnvelope { errMsgSpan = locn , errMsgContext = name_ppr_ctx , errMsgDiagnostic = err , errMsgSeverity = severity+ , errMsgReason = reason } -- | Wrap a 'Diagnostic' in a 'MsgEnvelope', recording its location.@@ -162,7 +209,9 @@ -> e -> MsgEnvelope e mkMsgEnvelope opts locn name_ppr_ctx err- = mk_msg_envelope (diagReasonSeverity opts (diagnosticReason err)) locn name_ppr_ctx err+ = mk_msg_envelope sev locn name_ppr_ctx reason err+ where+ (sev, reason) = diag_reason_severity opts (diagnosticReason err) -- | Wrap a 'Diagnostic' in a 'MsgEnvelope', recording its location. -- Precondition: the diagnostic is, in fact, an error. That is,@@ -173,7 +222,7 @@ -> e -> MsgEnvelope e mkErrorMsgEnvelope locn name_ppr_ctx msg =- assert (diagnosticReason msg == ErrorWithoutFlag) $ mk_msg_envelope SevError locn name_ppr_ctx msg+ assert (diagnosticReason msg == ErrorWithoutFlag) $ mk_msg_envelope SevError locn name_ppr_ctx (ResolvedDiagnosticReason ErrorWithoutFlag) msg -- | Variant that doesn't care about qualified/unqualified names. mkPlainMsgEnvelope :: Diagnostic e@@ -191,7 +240,7 @@ -> e -> MsgEnvelope e mkPlainErrorMsgEnvelope locn msg =- mk_msg_envelope SevError locn alwaysQualify msg+ mk_msg_envelope SevError locn alwaysQualify (ResolvedDiagnosticReason ErrorWithoutFlag) msg ------------------------- data Validity' a@@ -219,14 +268,14 @@ ---------------- -- | Formats the input list of structured document, where each element of the list gets a bullet.-formatBulleted :: SDocContext -> DecoratedSDoc -> SDoc-formatBulleted ctx (unDecorated -> docs)- = case msgs of+formatBulleted :: DecoratedSDoc -> SDoc+formatBulleted (unDecorated -> docs)+ = sdocWithContext $ \ctx -> case msgs ctx of [] -> Outputable.empty [msg] -> msg- _ -> vcat $ map starred msgs+ xs -> vcat $ map starred xs where- msgs = filter (not . Outputable.isEmpty ctx) docs+ msgs ctx = filter (not . Outputable.isEmpty ctx) docs starred = (bullet<+>) pprMessages :: Diagnostic e => DiagnosticOpts e -> Messages e -> SDoc@@ -247,13 +296,13 @@ pprLocMsgEnvelope opts (MsgEnvelope { errMsgSpan = s , errMsgDiagnostic = e , errMsgSeverity = sev- , errMsgContext = name_ppr_ctx })- = sdocWithContext $ \ctx ->- withErrStyle name_ppr_ctx $+ , errMsgContext = name_ppr_ctx+ , errMsgReason = reason })+ = withErrStyle name_ppr_ctx $ mkLocMessage- (MCDiagnostic sev (diagnosticReason e) (diagnosticCode e))+ (MCDiagnostic sev reason (diagnosticCode e)) s- (formatBulleted ctx $ diagnosticMessage opts e)+ (formatBulleted $ diagnosticMessage opts e) sortMsgBag :: Maybe DiagOpts -> Bag (MsgEnvelope e) -> [MsgEnvelope e] sortMsgBag mopts = maybeLimit . sortBy (cmp `on` errMsgSpan) . bagToList
GHC/Utils/Lexeme.hs view
@@ -227,11 +227,10 @@ , "module", "newtype", "of", "then", "type", "where" , "_" ] --- | All reserved operators. Taken from section 2.4 of the 2010 Report,--- excluding @\@@ and @~@ that are allowed by GHC (see GHC Proposal #229).+-- | All reserved operators. Taken from section 2.4 of the 2010 Report. reservedOps :: Set.Set String reservedOps = Set.fromList [ "..", ":", "::", "=", "\\", "|", "<-", "->"- , "=>" ]+ , "@", "~", "=>" ] -- | Does this string contain only dashes and has at least 2 of them? isDashes :: String -> Bool
GHC/Utils/Misc.hs view
@@ -22,7 +22,7 @@ unzipWith, mapFst, mapSnd, chkAppend,- mapAndUnzip, mapAndUnzip3,+ mapAndUnzip, mapAndUnzip3, mapAndUnzip4, filterOut, partitionWith, dropWhileEndLE, spanEnd, last2, lastMaybe, onJust,@@ -35,7 +35,7 @@ equalLength, compareLength, leLength, ltLength, isSingleton, only, expectOnly, GHC.Utils.Misc.singleton,- notNull, snocView,+ notNull, expectNonEmpty, snocView, chunkList, @@ -55,6 +55,7 @@ -- * Tuples fstOf3, sndOf3, thdOf3,+ fstOf4, sndOf4, fst3, snd3, third3, uncurry3, @@ -121,6 +122,7 @@ ) where import GHC.Prelude.Basic hiding ( head, init, last, tail )+import qualified GHC.Prelude.Basic as Partial ( head ) import GHC.Utils.Exception import GHC.Utils.Panic.Plain@@ -129,7 +131,6 @@ import Data.Data import qualified Data.List as List-import qualified Data.List as Partial ( head ) import Data.List.NonEmpty ( NonEmpty(..), last, nonEmpty ) import qualified Data.List.NonEmpty as NE @@ -183,6 +184,11 @@ sndOf3 (_,b,_) = b thdOf3 (_,_,c) = c +fstOf4 :: (a,b,c,d) -> a+sndOf4 :: (a,b,c,d) -> b+fstOf4 (a,_,_,_) = a+sndOf4 (_,b,_,_) = b+ fst3 :: (a -> d) -> (a, b, c) -> (d, b, c) fst3 f (a, b, c) = (f a, b, c) @@ -324,7 +330,6 @@ (r1:rs1, r2:rs2) mapAndUnzip3 :: (a -> (b, c, d)) -> [a] -> ([b], [c], [d])- mapAndUnzip3 _ [] = ([], [], []) mapAndUnzip3 f (x:xs) = let (r1, r2, r3) = f x@@ -332,6 +337,14 @@ in (r1:rs1, r2:rs2, r3:rs3) +mapAndUnzip4 :: (a -> (b, c, d, e)) -> [a] -> ([b], [c], [d], [e])+mapAndUnzip4 _ [] = ([], [], [], [])+mapAndUnzip4 f (x:xs)+ = let (r1, r2, r3, r4) = f x+ (rs1, rs2, rs3, rs4) = mapAndUnzip4 f xs+ in+ (r1:rs1, r2:rs2, r3:rs3, r4:rs4)+ zipWithAndUnzip :: (a -> b -> (c,d)) -> [a] -> [b] -> ([c],[d]) zipWithAndUnzip f (a:as) (b:bs) = let (r1, r2) = f a b@@ -481,7 +494,6 @@ #endif expectOnly msg _ = panic ("expectOnly: " ++ msg) - -- | Split a list into chunks of /n/ elements chunkList :: Int -> [a] -> [[a]] chunkList _ [] = []@@ -499,6 +511,16 @@ changeLast [] _ = panic "changeLast" changeLast [_] x = [x] changeLast (x:xs) x' = x : changeLast xs x'++-- | Like @expectJust msg . nonEmpty@; a better alternative to 'NE.fromList'.+expectNonEmpty :: HasCallStack => String -> [a] -> NonEmpty a+{-# INLINE expectNonEmpty #-}+expectNonEmpty _ (x:xs) = x:|xs+expectNonEmpty msg [] = expectNonEmptyPanic msg++expectNonEmptyPanic :: String -> a+expectNonEmptyPanic msg = panic ("expectNonEmpty: " ++ msg)+{-# NOINLINE expectNonEmptyPanic #-} -- | Apply an effectful function to the last list element. mapLastM :: Functor f => (a -> f a) -> NonEmpty a -> f (NonEmpty a)
GHC/Utils/Monad.hs view
@@ -11,6 +11,7 @@ , MonadIO(..) , zipWith3M, zipWith3M_, zipWith4M, zipWithAndUnzipM+ , zipWith3MNE , mapAndUnzipM, mapAndUnzip3M, mapAndUnzip4M, mapAndUnzip5M , mapAccumLM , mapSndM@@ -96,6 +97,15 @@ ; (cs, ds) <- zipWithAndUnzipM f xs ys ; return (c:cs, d:ds) } zipWithAndUnzipM _ _ _ = return ([], [])++-- | 'zipWith3M' for 'NonEmpty' lists.+zipWith3MNE :: Monad m+ => (a -> b -> c -> m d)+ -> NonEmpty a -> NonEmpty b -> NonEmpty c -> m (NonEmpty d)+zipWith3MNE f ~(x :| xs) ~(y :| ys) ~(z :| zs)+ = do { w <- f x y z+ ; ws <- zipWith3M f xs ys zs+ ; return $ w :| ws } {-
+ GHC/Utils/Monad/Codensity.hs view
@@ -0,0 +1,64 @@+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE StandaloneKindSignatures #-}++module GHC.Utils.Monad.Codensity+ ( Codensity(..), toCodensity, fromCodensity )+ where++import Data.Kind ( Type )++import GHC.Prelude+import GHC.Exts ( oneShot )++import Control.Monad.Fix+import Control.Monad.IO.Class+import Control.Monad.Trans.Class+import Control.Concurrent.MVar ( newEmptyMVar, readMVar, putMVar )+import Control.Exception+import GHC.IO.Exception+import GHC.IO.Unsafe ( unsafeDupableInterleaveIO )++--------------------------------------------------------------------------------++type Codensity :: (Type -> Type) -> Type -> Type+newtype Codensity m a = Codensity { runCodensity :: forall r. (a -> m r) -> m r }+instance Functor (Codensity k) where+ fmap f (Codensity m) = Codensity $ oneShot (\k -> m $ oneShot (\x -> k $ f x))+ {-# INLINE fmap #-}+instance Applicative (Codensity f) where+ pure x = Codensity $ oneShot (\k -> k x)+ {-# INLINE pure #-}+ Codensity f <*> Codensity g =+ Codensity $ oneShot (\bfr -> f $ oneShot (\ab -> g $ oneShot (\x -> bfr (ab x))))+ {-# INLINE (<*>) #-}+instance Monad (Codensity f) where+ return = pure+ {-# INLINE return #-}+ m >>= k =+ Codensity $ oneShot (\c -> runCodensity m $ oneShot (\a -> runCodensity (k a) c))+ {-# INLINE (>>=) #-}+instance MonadTrans Codensity where+ lift m = Codensity $ oneShot (m >>=)+ {-# INLINE lift #-}+instance MonadIO m => MonadIO (Codensity m) where+ liftIO = lift . liftIO+ {-# INLINE liftIO #-}+instance MonadIO m => MonadFix (Codensity m) where+ mfix f = Codensity $ oneShot $ \ k -> do+ promise <- liftIO $ newEmptyMVar+ ans <- liftIO $ unsafeDupableInterleaveIO+ $ readMVar promise+ `catch`+ (\ BlockedIndefinitelyOnMVar -> throwIO FixIOException)+ runCodensity (f ans) $ oneShot $ \ a -> do+ liftIO $ putMVar promise a+ k a+ {-# INLINE mfix #-}++toCodensity :: Monad m => m a -> Codensity m a+toCodensity m = Codensity $ oneShot (m >>=)+{-# INLINE toCodensity #-}++fromCodensity :: Monad m => Codensity m a -> m a+fromCodensity c = runCodensity c return+{-# INLINE fromCodensity #-}
GHC/Utils/Outputable.hs view
@@ -31,12 +31,13 @@ SDoc, runSDoc, PDoc(..), docToSDoc, interppSP, interpp'SP, interpp'SP',- pprQuotedList, pprWithCommas, quotedListWithOr, quotedListWithNor,+ pprQuotedList, pprWithCommas,+ quotedListWithOr, quotedListWithNor, quotedListWithAnd, pprWithBars, spaceIfSingleQuote, isEmpty, nest, ptext,- int, intWithCommas, integer, word64, word, float, double, rational, doublePrec,+ int, intWithCommas, integer, word, float, double, rational, doublePrec, parens, cparen, brackets, braces, quotes, quote, doubleQuotes, angleBrackets, semi, comma, colon, dcolon, space, equals, dot, vbar,@@ -46,8 +47,8 @@ blankLine, forAllLit, bullet, ($+$), cat, fcat,- hang, hangNotEmpty, punctuate, ppWhen, ppUnless,- ppWhenOption, ppUnlessOption,+ hang, hangNotEmpty, punctuate, punctuateFinal,+ ppWhen, ppUnless, ppWhenOption, ppUnlessOption, speakNth, speakN, speakNOf, plural, singular, isOrAre, doOrDoes, itsOrTheir, thisOrThese, hasOrHave, unicodeSyntax,@@ -126,6 +127,7 @@ import qualified GHC.Utils.Ppr as Pretty import qualified GHC.Utils.Ppr.Colour as Col import GHC.Utils.Ppr ( Doc, Mode(..) )+import GHC.Utils.Panic.Plain (assert) import GHC.Serialized import GHC.LanguageExtensions (Extension) import GHC.Utils.GlobalVars( unsafeHasPprDebug )@@ -139,7 +141,7 @@ import qualified Data.IntMap as IM import Data.Set (Set) import qualified Data.Set as Set-import qualified GHC.Data.Word64Set as Word64Set+import qualified Data.IntSet as IntSet import Data.String import Data.Word import System.IO ( Handle )@@ -149,8 +151,9 @@ import Data.Graph (SCC(..)) import Data.List (intersperse) import Data.List.NonEmpty (NonEmpty (..))+import Data.Semigroup (Arg(..)) import qualified Data.List.NonEmpty as NEL-import Data.Time+import Data.Time ( UTCTime ) import Data.Time.Format.ISO8601 import Data.Void @@ -678,7 +681,6 @@ int :: IsLine doc => Int -> doc integer :: IsLine doc => Integer -> doc word :: Integer -> SDoc-word64 :: IsLine doc => Word64 -> doc float :: IsLine doc => Float -> doc double :: IsLine doc => Double -> doc rational :: Rational -> SDoc@@ -696,8 +698,6 @@ {-# INLINE CONLIKE rational #-} rational n = text $ show n -- See Note [Print Hexadecimal Literals] in GHC.Utils.Ppr-{-# INLINE CONLIKE word64 #-}-word64 n = text $ show n {-# INLINE CONLIKE word #-} word n = sdocOption sdocHexWordLiterals $ \case True -> docToSDoc $ Pretty.hex n@@ -842,6 +842,21 @@ go d [] = [d] go d (e:es) = (d <> p) : go e es +-- | Punctuate a list, e.g. with commas and dots.+--+-- > sep $ punctuateFinal comma dot [text "ab", text "cd", text "ef"]+-- > ab, cd, ef.+punctuateFinal :: IsLine doc+ => doc -- ^ The interstitial punctuation+ -> doc -- ^ The final punctuation+ -> [doc] -- ^ The list that will have punctuation added between every adjacent pair of elements+ -> [doc] -- ^ Punctuated list+punctuateFinal _ _ [] = []+punctuateFinal p q (d:ds) = go d ds+ where+ go d [] = [d <> q]+ go d (e:es) = (d <> p) : go e es+ ppWhen, ppUnless :: IsOutput doc => Bool -> doc -> doc {-# INLINE CONLIKE ppWhen #-} ppWhen True doc = doc@@ -858,9 +873,10 @@ False -> empty {-# INLINE CONLIKE ppUnlessOption #-}-ppUnlessOption :: IsLine doc => (SDocContext -> Bool) -> doc -> doc-ppUnlessOption f doc = docWithContext $- \ctx -> if f ctx then empty else doc+ppUnlessOption :: (SDocContext -> Bool) -> SDoc -> SDoc+ppUnlessOption f doc = sdocOption f $ \case+ True -> empty+ False -> doc -- | Apply the given colour\/style for the argument. --@@ -890,6 +906,9 @@ -- There's no Outputable for Char; it's too easy to use Outputable -- on String and have ppr "hello" rendered as "h,e,l,l,o". +instance Outputable Void where+ ppr _ = text "<<Void>>"+ instance Outputable Bool where ppr True = text "True" ppr False = text "False"@@ -950,11 +969,14 @@ instance (Outputable a) => Outputable (NonEmpty a) where ppr = ppr . NEL.toList +instance (Outputable a, Outputable b) => Outputable (Arg a b) where+ ppr (Arg a b) = text "Arg" <+> ppr a <+> ppr b+ instance (Outputable a) => Outputable (Set a) where ppr s = braces (pprWithCommas ppr (Set.toList s)) -instance Outputable Word64Set.Word64Set where- ppr s = braces (pprWithCommas ppr (Word64Set.toList s))+instance Outputable IntSet.IntSet where+ ppr s = braces (pprWithCommas ppr (IntSet.toList s)) instance (Outputable a, Outputable b) => Outputable (a, b) where ppr (x,y) = parens (sep [ppr x <> comma, ppr y])@@ -1043,10 +1065,7 @@ pprModuleName :: IsLine doc => ModuleName -> doc pprModuleName (ModuleName nm) =- docWithContext $ \ctx ->- if codeStyle (sdocStyle ctx)- then ztext (zEncodeFS nm)- else ftext nm+ docWithStyle (ztext (zEncodeFS nm)) (\_ -> ftext nm) {-# SPECIALIZE pprModuleName :: ModuleName -> SDoc #-} {-# SPECIALIZE pprModuleName :: ModuleName -> HLine #-} -- see Note [SPECIALIZE to HDoc] @@ -1387,6 +1406,11 @@ quotedListWithNor xs@(_:_:_) = quotedList (init xs) <+> text "nor" <+> quotes (last xs) quotedListWithNor xs = quotedList xs +quotedListWithAnd :: [SDoc] -> SDoc+-- [x,y,z] ==> `x', `y' and `z'+quotedListWithAnd xs@(_:_:_) = quotedList (init xs) <+> text "and" <+> quotes (last xs)+quotedListWithAnd xs = quotedList xs+ {- ************************************************************************ * *@@ -1636,6 +1660,7 @@ class IsOutput doc where empty :: doc docWithContext :: (SDocContext -> doc) -> doc+ docWithStyle :: doc -> (PprStyle -> SDoc) -> doc class IsOutput doc => IsLine doc class (IsOutput doc, IsLine (Line doc)) => IsDoc doc@@ -1672,14 +1697,23 @@ difficult to make completely equivalent under both printer implementations. These operations should generally be avoided, as they can result in surprising-changes in behavior when the printer implementation is changed. However, in-certain cases, the alternative is even worse. For example, we use dualLine in-the implementation of pprUnitId, as the hack we use for printing unit ids-(see Note [Pretty-printing UnitId] in GHC.Unit) is difficult to adapt to HLine-and is not necessary for code paths that use it, anyway.+changes in behavior when the printer implementation is changed.+Right now, they are used only when outputting debugging comments in+codegen, as it is difficult to adapt that code to use HLine and not necessary. -Use these operations wisely. -}+Use these operations wisely. +Note [docWithStyle]+~~~~~~~~~~~~~~~~~~~+Sometimes when printing, we consult the printing style. This can be done+with 'docWithStyle c f'. This is similar to 'docWithContext (f . sdocStyle)',+but:+* For code style, 'docWithStyle c f' will return 'c'.+* For other styles, 'docWithStyle c f', will call 'f style', but expect+ an SDoc rather than doc. This removes the need to write code polymorphic+ in SDoc and HDoc, since the latter is used only for code style.+-}+ -- | Represents a single line of output that can be efficiently printed directly -- to a 'System.IO.Handle' (actually a 'BufHandle'). -- See Note [SDoc versus HDoc] and Note [HLine versus HDoc] for more details.@@ -1703,7 +1737,7 @@ {-# COMPLETE HDoc #-} bPutHDoc :: BufHandle -> SDocContext -> HDoc -> IO ()-bPutHDoc h ctx (HDoc f) = f ctx h+bPutHDoc h ctx (HDoc f) = assert (codeStyle (sdocStyle ctx)) (f ctx h) -- | A superclass for 'IsLine' and 'IsDoc' that provides an identity, 'empty', -- as well as access to the shared 'SDocContext'.@@ -1712,6 +1746,7 @@ class IsOutput doc where empty :: doc docWithContext :: (SDocContext -> doc) -> doc+ docWithStyle :: doc -> (PprStyle -> SDoc) -> doc -- see Note [docWithStyle] -- | A class of types that represent a single logical line of text, with support -- for horizontal composition.@@ -1782,6 +1817,11 @@ {-# INLINE CONLIKE empty #-} docWithContext = sdocWithContext {-# INLINE docWithContext #-}+ docWithStyle c f = sdocWithContext (\ctx -> let sty = sdocStyle ctx+ in if codeStyle sty then c+ else f sty)+ -- see Note [docWithStyle]+ {-# INLINE CONLIKE docWithStyle #-} instance IsLine SDoc where char c = docToSDoc $ Pretty.char c@@ -1826,12 +1866,16 @@ {-# INLINE empty #-} docWithContext f = HLine $ \ctx h -> runHLine (f ctx) ctx h {-# INLINE CONLIKE docWithContext #-}+ docWithStyle c _ = c -- see Note [docWithStyle]+ {-# INLINE CONLIKE docWithStyle #-} instance IsOutput HDoc where empty = HDoc (\_ _ -> pure ()) {-# INLINE empty #-} docWithContext f = HDoc $ \ctx h -> runHDoc (f ctx) ctx h {-# INLINE CONLIKE docWithContext #-}+ docWithStyle c _ = c -- see Note [docWithStyle]+ {-# INLINE CONLIKE docWithStyle #-} instance IsLine HLine where char c = HLine (\_ h -> bPutChar h c)
GHC/Utils/Panic.hs view
@@ -7,6 +7,8 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables, LambdaCase #-} +#include <ghcautoconf.h>+ -- | Defines basic functions for printing error messages. -- -- It's hard to put these functions anywhere else without causing@@ -236,6 +238,11 @@ -- | Temporarily install standard signal handlers for catching ^C, which just -- throw an exception in the current thread. withSignalHandlers :: ExceptionMonad m => m a -> m a+#if !defined(HAVE_SIGNAL_H)+-- No signal functionality exist on the host platform (e.g. on+-- wasm32-wasi), so don't attempt to set up signal handlers+withSignalHandlers = id+#else withSignalHandlers act = do main_thread <- liftIO myThreadId wtid <- liftIO (mkWeakThreadId main_thread)@@ -295,6 +302,7 @@ mayInstallHandlers act `MC.finally` mayUninstallHandlers+#endif callStackDoc :: HasCallStack => SDoc callStackDoc = prettyCallStackDoc callStack
GHC/Utils/Panic/Plain.hs view
@@ -29,6 +29,8 @@ import GHC.Utils.Exception as Exception import GHC.Stack import GHC.Prelude.Basic++import Control.Monad (when) import System.IO.Unsafe -- | This type is very similar to 'GHC.Utils.Panic.GhcException', but it omits@@ -150,4 +152,8 @@ assertM :: (HasCallStack, Monad m) => m Bool -> m () {-# INLINE assertM #-}-assertM mcond = withFrozenCallStack (mcond >>= massert)+assertM mcond+ | debugIsOn = withFrozenCallStack $ do+ res <- mcond+ when (not res) assertPanic'+ | otherwise = return ()
− GHC/Utils/Unique.hs
@@ -1,35 +0,0 @@-{-# LANGUAGE CPP #-}--{- Work around #23537--On 32 bit systems, GHC's codegen around 64 bit numbers is not quite-complete. This led to panics mentioning missing cases in iselExpr64.-Now that GHC uses Word64 for its uniques, these panics have started-popping up whenever a unique is compared to many other uniques in one-function. As a workaround we use these two functions which are not-inlined on 32 bit systems, thus preventing the panics.--}--module GHC.Utils.Unique (sameUnique, anyOfUnique) where--#include "MachDeps.h"--import GHC.Prelude.Basic (Bool, Eq((==)), Foldable(elem))-import GHC.Types.Unique (Unique, Uniquable (getUnique))---#if WORD_SIZE_IN_BITS == 32-{-# NOINLINE sameUnique #-}-#else-{-# INLINE sameUnique #-}-#endif-sameUnique :: Uniquable a => a -> a -> Bool-sameUnique x y = getUnique x == getUnique y--#if WORD_SIZE_IN_BITS == 32-{-# NOINLINE anyOfUnique #-}-#else-{-# INLINE anyOfUnique #-}-#endif-anyOfUnique :: Uniquable a => a -> [Unique] -> Bool-anyOfUnique tc xs = getUnique tc `elem` xs
− GHC/Utils/Word64.hs
@@ -1,20 +0,0 @@-module GHC.Utils.Word64 (- intToWord64,- word64ToInt,- truncateWord64ToWord32,- ) where--import GHC.Prelude-import GHC.Utils.Panic.Plain (assert)--import Data.Word-import GHC.Stack--intToWord64 :: HasCallStack => Int -> Word64-intToWord64 x = assert (0 <= x) (fromIntegral x)--word64ToInt :: HasCallStack => Word64 -> Int-word64ToInt x = assert (x <= fromIntegral (maxBound :: Int)) (fromIntegral x)--truncateWord64ToWord32 :: Word64 -> Word32-truncateWord64ToWord32 = fromIntegral
GHC/Wasm/ControlFlow/FromCmm.hs view
@@ -19,12 +19,13 @@ import GHC.Cmm.Dominators import GHC.Cmm.Dataflow.Graph import GHC.Cmm.Dataflow.Label+import GHC.Cmm.Reducibility import GHC.Cmm.Switch import GHC.CmmToAsm.Wasm.Types import GHC.Platform-+import GHC.Types.Unique.Supply import GHC.Utils.Misc import GHC.Utils.Panic import GHC.Utils.Outputable ( Outputable, text, (<+>), ppr@@ -78,7 +79,7 @@ scrutinee = smartExtend platform $ smartPlus platform e offset range = inclusiveInterval (lo+toInteger offset) (hi+toInteger offset) in Switch scrutinee range target_labels default_label- CmmCall { cml_cont = Nothing, cml_target = e } -> TailCall e+ CmmCall { cml_target = e } -> TailCall e _ -> panic "flowLeaving: unreachable" ----------------------- Evaluation contexts ------------------------------@@ -140,15 +141,19 @@ structuredControl :: forall expr stmt m . Applicative m => Platform -- ^ needed for offset calculation+ -> UniqSupply -> (Label -> CmmExpr -> m expr) -- ^ translator for expressions -> (Label -> CmmActions -> m stmt) -- ^ translator for straight-line code -> CmmGraph -- ^ CFG to be translated -> m (WasmControl stmt expr '[] '[ 'I32])-structuredControl platform txExpr txBlock g =+structuredControl platform us txExpr txBlock g' = doTree returns dominatorTree emptyContext where+ g :: CmmGraph+ g = gwd_graph gwd+ gwd :: GraphWithDominators CmmNode- gwd = graphWithDominators g+ gwd = initUs_ us $ asReducible $ graphWithDominators g' dominatorTree :: Tree.Tree CmmBlock-- Dominator tree in which children are sorted -- with highest reverse-postorder number first
Language/Haskell/Syntax/Concrete.hs view
@@ -35,6 +35,7 @@ -- avoid a dependency. data HsUniToken (tok :: Symbol) (utok :: Symbol) = HsNormalTok | HsUnicodeTok +deriving instance Eq (HsToken tok) deriving instance KnownSymbol tok => Data (HsToken tok) deriving instance (KnownSymbol tok, KnownSymbol utok) => Data (HsUniToken tok utok)
Language/Haskell/Syntax/Decls.hs view
@@ -30,7 +30,7 @@ HsDecl(..), LHsDecl, HsDataDefn(..), HsDeriving, LHsFunDep, FunDep(..), HsDerivingClause(..), LHsDerivingClause, DerivClauseTys(..), LDerivClauseTys, NewOrData(..), DataDefnCons(..), dataDefnConsNewOrData,- isTypeDataDefnCons,+ isTypeDataDefnCons, firstDataDefnCon, StandaloneKindSig(..), LStandaloneKindSig, -- ** Class or type declarations@@ -45,7 +45,7 @@ FamilyDecl(..), LFamilyDecl, -- ** Instance declarations- InstDecl(..), LInstDecl, FamilyInfo(..),+ InstDecl(..), LInstDecl, FamilyInfo(..), familyInfoTyConFlavour, TyFamInstDecl(..), LTyFamInstDecl, TyFamDefltDecl, LTyFamDefltDecl, DataFamInstDecl(..), LDataFamInstDecl,@@ -99,12 +99,14 @@ import Language.Haskell.Syntax.Type import Language.Haskell.Syntax.Basic (Role) -import GHC.Types.Basic (TopLevelFlag, OverlapMode, RuleName, Activation)+import GHC.Types.Basic (TopLevelFlag, OverlapMode, RuleName, Activation+ ,TyConFlavour(..), TypeOrData(..)) import GHC.Types.ForeignCall (CType, CCallConv, Safety, Header, CLabelString, CCallTarget, CExportSpec) import GHC.Types.Fixity (LexicalFixity) import GHC.Core.Type (Specificity) import GHC.Unit.Module.Warnings (WarningTxt)+import GHC.Utils.Panic.Plain ( assert ) import GHC.Hs.Doc (LHsDoc) -- ROMES:TODO Discuss in #21592 whether this is parsed AST or base AST @@ -580,7 +582,8 @@ See https://gitlab.haskell.org/ghc/ghc/wikis/ghc-kinds/kind-inference#proposed-new-strategy and #9200 for lots of discussion of how we got here. -The detection of CUSKs is enabled by the -XCUSKs extension, switched on by default.+The detection of CUSKs is enabled by the -XCUSKs extension, switched off by default+in GHC2021 and on in Haskell98/2010. Under -XNoCUSKs, all declarations are treated as if they have no CUSK. See https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0036-kind-signatures.rst @@ -862,7 +865,29 @@ -- said "type family Foo x where .." | ClosedTypeFamily (Maybe [LTyFamInstEqn pass]) +familyInfoTyConFlavour+ :: Maybe tc -- ^ Just cls <=> this is an associated family of class cls+ -> FamilyInfo pass+ -> TyConFlavour tc+familyInfoTyConFlavour mb_parent_tycon info =+ case info of+ DataFamily -> OpenFamilyFlavour IAmData mb_parent_tycon+ OpenTypeFamily -> OpenFamilyFlavour IAmType mb_parent_tycon+ ClosedTypeFamily _ -> assert (isNothing mb_parent_tycon)+ -- See Note [Closed type family mb_parent_tycon]+ ClosedTypeFamilyFlavour +{- Note [Closed type family mb_parent_tycon]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+There's no way to write a closed type family inside a class declaration:++ class C a where+ type family F a where -- error: parse error on input ‘where’++In fact, it is not clear what the meaning of such a declaration would be.+Therefore, 'mb_parent_tycon' of any closed type family has to be Nothing.+-}+ {- ********************************************************************* * * Data types and data constructors@@ -1015,6 +1040,11 @@ isTypeDataDefnCons (NewTypeCon _) = False isTypeDataDefnCons (DataTypeCons is_type_data _) = is_type_data +-- | Retrieve the first data constructor in a 'DataDefnCons' (if one exists).+firstDataDefnCon :: DataDefnCons a -> Maybe a+firstDataDefnCon (NewTypeCon con) = Just con+firstDataDefnCon (DataTypeCons _ cons) = listToMaybe cons+ -- | Located data Constructor Declaration type LConDecl pass = XRec pass (ConDecl pass) -- ^ May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnSemi' when@@ -1598,7 +1628,7 @@ { rd_ext :: XHsRule pass -- ^ After renamer, free-vars from the LHS and RHS , rd_name :: XRec pass RuleName- -- ^ Note [Pragma source text] in "GHC.Types.Basic"+ -- ^ Note [Pragma source text] in "GHC.Types.SourceText" , rd_act :: Activation , rd_tyvs :: Maybe [LHsTyVarBndr () (NoGhcTc pass)] -- ^ Forall'd type vars
Language/Haskell/Syntax/Expr.hs view
@@ -5,6 +5,7 @@ {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilyDependencies #-} {-# LANGUAGE UndecidableInstances #-} -- Wrinkle in Note [Trees That Grow]@@ -39,7 +40,6 @@ -- libraries: import Data.Data hiding (Fixity(..)) import Data.Bool-import Data.Either import Data.Eq import Data.Maybe import Data.List.NonEmpty ( NonEmpty )@@ -147,6 +147,19 @@ type RecUpdProj p = RecProj p (LHsExpr p) type LHsRecUpdProj p = XRec p (RecUpdProj p) +-- | Haskell Record Update Fields.+data LHsRecUpdFields p where+ -- | A regular (non-overloaded) record update.+ RegularRecUpdFields+ :: { xRecUpdFields :: XLHsRecUpdLabels p+ , recUpdFields :: [LHsRecUpdField p p] }+ -> LHsRecUpdFields p+ -- | An overloaded record update.+ OverloadedRecUpdFields+ :: { xOLRecUpdFields :: XLHsOLRecUpdLabels p+ , olRecUpdFields :: [LHsRecUpdProj p] }+ -> LHsRecUpdFields p+ {- ************************************************************************ * *@@ -463,7 +476,7 @@ | RecordUpd { rupd_ext :: XRecordUpd p , rupd_expr :: LHsExpr p- , rupd_flds :: Either [LHsRecUpdField p] [LHsRecUpdProj p]+ , rupd_flds :: LHsRecUpdFields p } -- For a type family, the arg types are of the *instance* tycon, -- not the family tycon@@ -1587,11 +1600,11 @@ -- | Haskell Statement Context. data HsStmtContext p- = HsDoStmt HsDoFlavour -- ^Context for HsDo (do-notation and comprehensions)- | PatGuard (HsMatchContext p) -- ^Pattern guard for specified thing- | ParStmtCtxt (HsStmtContext p) -- ^A branch of a parallel stmt- | TransStmtCtxt (HsStmtContext p) -- ^A branch of a transform stmt- | ArrowExpr -- ^do-notation in an arrow-command context+ = HsDoStmt HsDoFlavour -- ^ Context for HsDo (do-notation and comprehensions)+ | PatGuard (HsMatchContext p) -- ^ Pattern guard for specified thing+ | ParStmtCtxt (HsStmtContext p) -- ^ A branch of a parallel stmt+ | TransStmtCtxt (HsStmtContext p) -- ^ A branch of a transform stmt+ | ArrowExpr -- ^ do-notation in an arrow-command context -- | Haskell arrow match context. data HsArrowMatchContext
Language/Haskell/Syntax/Extension.hs view
@@ -432,6 +432,8 @@ type family XExplicitList x type family XRecordCon x type family XRecordUpd x+type family XLHsRecUpdLabels x+type family XLHsOLRecUpdLabels x type family XGetField x type family XProjection x type family XExprWithTySig x@@ -566,7 +568,13 @@ type family XHsInt x type family XHsIntPrim x type family XHsWordPrim x+type family XHsInt8Prim x+type family XHsInt16Prim x+type family XHsInt32Prim x type family XHsInt64Prim x+type family XHsWord8Prim x+type family XHsWord16Prim x+type family XHsWord32Prim x type family XHsWord64Prim x type family XHsInteger x type family XHsRat x
Language/Haskell/Syntax/ImpExp.hs view
@@ -127,7 +127,7 @@ -- ^ Imported or exported Thing With given imported or exported -- -- The thing is a Class/Type and the imported or exported things are- -- methods/constructors and record fields; see Note [IEThingWith]+ -- its children. -- - 'GHC.Parser.Annotation.AnnKeywordId's : 'GHC.Parser.Annotation.AnnOpen', -- 'GHC.Parser.Annotation.AnnClose', -- 'GHC.Parser.Annotation.AnnComma',
Language/Haskell/Syntax/Lit.hs view
@@ -42,9 +42,9 @@ ************************************************************************ -} --- Note [Literal source text] in GHC.Types.Basic for SourceText fields in+-- Note [Literal source text] in "GHC.Types.SourceText" for SourceText fields in -- the following--- Note [Trees That Grow] in Language.Haskell.Syntax.Extension for the Xxxxx+-- Note [Trees That Grow] in "Language.Haskell.Syntax.Extension" for the Xxxxx -- fields in the following -- | Haskell Literal data HsLit x@@ -63,8 +63,20 @@ -- ^ literal @Int#@ | HsWordPrim (XHsWordPrim x) {- SourceText -} Integer -- ^ literal @Word#@+ | HsInt8Prim (XHsInt8Prim x) {- SourceText -} Integer+ -- ^ literal @Int8#@+ | HsInt16Prim (XHsInt16Prim x) {- SourceText -} Integer+ -- ^ literal @Int16#@+ | HsInt32Prim (XHsInt32Prim x) {- SourceText -} Integer+ -- ^ literal @Int32#@ | HsInt64Prim (XHsInt64Prim x) {- SourceText -} Integer -- ^ literal @Int64#@+ | HsWord8Prim (XHsWord8Prim x) {- SourceText -} Integer+ -- ^ literal @Word8#@+ | HsWord16Prim (XHsWord16Prim x) {- SourceText -} Integer+ -- ^ literal @Word16#@+ | HsWord32Prim (XHsWord32Prim x) {- SourceText -} Integer+ -- ^ literal @Word32#@ | HsWord64Prim (XHsWord64Prim x) {- SourceText -} Integer -- ^ literal @Word64#@ | HsInteger (XHsInteger x) {- SourceText -} Integer Type@@ -107,7 +119,7 @@ | XOverLit !(XXOverLit p) --- Note [Literal source text] in GHC.Types.Basic for SourceText fields in+-- Note [Literal source text] in "GHC.Types.SourceText" for SourceText fields in -- the following -- | Overloaded Literal Value data OverLitVal@@ -149,4 +161,3 @@ compare (HsIsString _ s1) (HsIsString _ s2) = s1 `lexicalCompareFS` s2 compare (HsIsString _ _) (HsIntegral _) = GT compare (HsIsString _ _) (HsFractional _) = GT-
Language/Haskell/Syntax/Pat.hs view
@@ -280,13 +280,13 @@ type LHsRecField p arg = XRec p (HsRecField p arg) -- | Located Haskell Record Update Field-type LHsRecUpdField p = XRec p (HsRecUpdField p)+type LHsRecUpdField p q = XRec p (HsRecUpdField p q) -- | Haskell Record Field type HsRecField p arg = HsFieldBind (LFieldOcc p) arg -- | Haskell Record Update Field-type HsRecUpdField p = HsFieldBind (LAmbiguousFieldOcc p) (LHsExpr p)+type HsRecUpdField p q = HsFieldBind (LAmbiguousFieldOcc p) (LHsExpr q) -- | Haskell Field Binding --@@ -353,7 +353,7 @@ -- -- hfbLHS = Unambiguous "x" $sel:x:MkS :: AmbiguousFieldOcc Id ----- See also Note [Disambiguating record fields] in GHC.Tc.Gen.Head.+-- See also Note [Disambiguating record updates] in GHC.Rename.Pat. hsRecFields :: forall p arg.UnXRec p => HsRecFields p arg -> [XCFieldOcc p] hsRecFields rbinds = Data.List.map (hsRecFieldSel . unXRec @p) (rec_flds rbinds)@@ -363,4 +363,3 @@ hsRecFieldSel :: forall p arg. UnXRec p => HsRecField p arg -> XCFieldOcc p hsRecFieldSel = foExt . unXRec @p . hfbLHS-
Language/Haskell/Syntax/Type.hs view
@@ -8,6 +8,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE UndecidableInstances #-} -- Wrinkle in Note [Trees That Grow]+{-# LANGUAGE LambdaCase #-} -- in module Language.Haskell.Syntax.Extension {- (c) The University of Glasgow 2006@@ -25,6 +26,7 @@ HsLinearArrowTokens(..), HsType(..), LHsType, HsKind, LHsKind,+ HsBndrVis(..), isHsBndrInvisible, HsForAllTelescope(..), HsTyVarBndr(..), LHsTyVarBndr, LHsQTyVars(..), HsOuterTyVarBndrs(..), HsOuterFamEqnTyVarBndrs, HsOuterSigTyVarBndrs,@@ -44,7 +46,7 @@ ConDeclField(..), LConDeclField, - HsConDetails(..), noTypeArgs,+ HsConDetails(..), noTypeArgs, conDetailsArity, FieldOcc(..), LFieldOcc, AmbiguousFieldOcc(..), LAmbiguousFieldOcc,@@ -64,6 +66,7 @@ import GHC.Core.DataCon( HsSrcBang(..) ) import GHC.Core.Type (Specificity) import GHC.Types.SrcLoc (SrcSpan)+import GHC.Types.Basic (Arity) import GHC.Hs.Doc (LHsDoc) import GHC.Data.FastString (FastString)@@ -74,7 +77,7 @@ import Data.Eq import Data.Bool import Data.Char-import Prelude (Integer)+import Prelude (Integer, length) {- ************************************************************************@@ -342,12 +345,12 @@ data LHsQTyVars pass -- See Note [HsType binders] = HsQTvs { hsq_ext :: XHsQTvs pass - , hsq_explicit :: [LHsTyVarBndr () pass]+ , hsq_explicit :: [LHsTyVarBndr (HsBndrVis pass) pass] -- Explicit variables, written by the user } | XLHsQTyVars !(XXLHsQTyVars pass) -hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr () pass]+hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr (HsBndrVis pass) pass] hsQTvExplicit = hsq_explicit ------------------------------------------------@@ -713,6 +716,21 @@ | XTyVarBndr !(XXTyVarBndr pass) +data HsBndrVis pass+ = HsBndrRequired+ -- Binder for a visible (required) variable:+ -- type Dup a = (a, a)+ -- ^^^++ | HsBndrInvisible (LHsToken "@" pass)+ -- Binder for an invisible (specified) variable:+ -- type KindOf @k (a :: k) = k+ -- ^^^++isHsBndrInvisible :: HsBndrVis pass -> Bool+isHsBndrInvisible HsBndrInvisible{} = True+isHsBndrInvisible HsBndrRequired = False+ -- | Does this 'HsTyVarBndr' come with an explicit kind annotation? isHsKindedTyVar :: HsTyVarBndr flag pass -> Bool isHsKindedTyVar (UserTyVar {}) = False@@ -756,6 +774,7 @@ | HsAppKindTy (XAppKindTy pass) -- type level type app (LHsType pass)+ !(LHsToken "@" pass) (LHsKind pass) | HsFunTy (XFunTy pass)@@ -1071,6 +1090,12 @@ noTypeArgs :: [Void] noTypeArgs = [] +conDetailsArity :: (rec -> Arity) -> HsConDetails tyarg arg rec -> Arity+conDetailsArity recToArity = \case+ PrefixCon _ args -> length args+ RecCon rec -> recToArity rec+ InfixCon _ _ -> 2+ {- Note [ConDeclField pass] ~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1181,14 +1206,13 @@ -} -- | Arguments in an expression/type after splitting-data HsArg tm ty+data HsArg p tm ty = HsValArg tm -- Argument is an ordinary expression (f arg)- | HsTypeArg SrcSpan ty -- Argument is a visible type application (f @ty)- -- SrcSpan is location of the `@`+ | HsTypeArg !(LHsToken "@" p) ty -- Argument is a visible type application (f @ty) | HsArgPar SrcSpan -- See Note [HsArgPar] -- type level equivalent-type LHsTypeArg p = HsArg (LHsType p) (LHsKind p)+type LHsTypeArg p = HsArg p (LHsType p) (LHsKind p) {- Note [HsArgPar]
Setup.hs view
@@ -3,7 +3,10 @@ import Distribution.Simple import Distribution.Simple.BuildPaths+import Distribution.Types.ComponentLocalBuildInfo+import Distribution.Types.ComponentName (ComponentName(CLibName)) import Distribution.Types.LocalBuildInfo+import Distribution.Types.LibraryName (LibraryName(LMainLibName)) import Distribution.Verbosity import Distribution.Simple.Program import Distribution.Simple.Utils@@ -15,6 +18,7 @@ import System.FilePath import Control.Monad import Data.Char+import qualified Data.Map as Map import GHC.ResponseFile import System.Environment @@ -85,9 +89,13 @@ callProcess "deriveConstants" ["--gen-haskell-type","-o",tmp,"--target-os",targetOS] renameFile tmp platformConstantsPath + let cProjectUnitId = case Map.lookup (CLibName LMainLibName) componentNameMap of+ Just [LibComponentLocalBuildInfo{componentUnitId}] -> unUnitId componentUnitId+ _ -> error "Couldn't find unique cabal library when building ghc"+ -- Write GHC.Settings.Config- let configHsPath = autogenPackageModulesDir lbi </> "GHC/Settings/Config.hs"- configHs = generateConfigHs settings+ configHsPath = autogenPackageModulesDir lbi </> "GHC/Settings/Config.hs"+ configHs = generateConfigHs cProjectUnitId settings createDirectoryIfMissingVerbose verbosity True (takeDirectory configHsPath) rewriteFileEx verbosity configHsPath configHs @@ -98,8 +106,9 @@ Nothing -> Left (show k ++ " not found in settings: " ++ show settings) Just v -> Right v -generateConfigHs :: [(String,String)] -> String-generateConfigHs settings = either error id $ do+generateConfigHs :: String -- ^ ghc's cabal-generated unit-id, which matches its package-id/key+ -> [(String,String)] -> String+generateConfigHs cProjectUnitId settings = either error id $ do let getSetting' = getSetting $ (("cStage","2"):) settings buildPlatform <- getSetting' "cBuildPlatformString" "Host platform" hostPlatform <- getSetting' "cHostPlatformString" "Target platform"@@ -114,6 +123,7 @@ , " , cProjectName" , " , cBooterVersion" , " , cStage"+ , " , cProjectUnitId" , " ) where" , "" , "import GHC.Prelude.Basic"@@ -134,4 +144,7 @@ , "" , "cStage :: String" , "cStage = show ("++ cStage ++ " :: Int)"+ , ""+ , "cProjectUnitId :: String"+ , "cProjectUnitId = " ++ show cProjectUnitId ]
cbits/genSym.c view
@@ -9,44 +9,16 @@ // // The CPP is thus about the RTS version GHC is linked against, and not the // version of the GHC being built.-#if MIN_VERSION_GLASGOW_HASKELL(9,9,0,0)-// Unique64 patch was present in 9.10 and later-#define HAVE_UNIQUE64 1-#elif !MIN_VERSION_GLASGOW_HASKELL(9,9,0,0) && MIN_VERSION_GLASGOW_HASKELL(9,8,4,0)-// Unique64 patch was backported to 9.8.4-#define HAVE_UNIQUE64 1-#elif !MIN_VERSION_GLASGOW_HASKELL(9,7,0,0) && MIN_VERSION_GLASGOW_HASKELL(9,6,7,0)-// Unique64 patch was backported to 9.6.7-#define HAVE_UNIQUE64 1-#endif---#if !defined(HAVE_UNIQUE64)-HsWord64 ghc_unique_counter64 = 0;-#endif #if !MIN_VERSION_GLASGOW_HASKELL(9,3,0,0)+HsInt ghc_unique_counter = 0; HsInt ghc_unique_inc = 1; #endif -// This function has been added to the RTS. Here we pessimistically assume-// that a threaded RTS is used. This function is only used for bootstrapping.-#if !MIN_VERSION_GLASGOW_HASKELL(9,7,0,0)-STATIC_INLINE StgWord64-atomic_inc64(StgWord64 volatile* p, StgWord64 incr)-{-#if defined(HAVE_C11_ATOMICS)- return __atomic_add_fetch(p, incr, __ATOMIC_SEQ_CST);-#else- return __sync_add_and_fetch(p, incr);-#endif-}-#endif--#define UNIQUE_BITS (sizeof (HsWord64) * 8 - UNIQUE_TAG_BITS)+#define UNIQUE_BITS (sizeof (HsInt) * 8 - UNIQUE_TAG_BITS) #define UNIQUE_MASK ((1ULL << UNIQUE_BITS) - 1) -HsWord64 genSym(void) {- HsWord64 u = atomic_inc64((StgWord64 *)&ghc_unique_counter64, ghc_unique_inc) & UNIQUE_MASK;+HsInt genSym(void) {+ HsInt u = atomic_inc((StgWord *)&ghc_unique_counter, ghc_unique_inc) & UNIQUE_MASK; // Uh oh! We will overflow next time a unique is requested. ASSERT(u != UNIQUE_MASK); return u;
ghc.cabal view
@@ -3,7 +3,7 @@ -- ./configure. Make sure you are editing ghc.cabal.in, not ghc.cabal. Name: ghc-Version: 9.6.7+Version: 9.8.1 License: BSD-3-Clause License-File: LICENSE Author: The GHC Team@@ -25,7 +25,6 @@ extra-source-files: GHC/Builtin/primops.txt.pp- GHC/Builtin/bytearray-ops.txt.pp Unique.h CodeGen.Platform.h -- Shared with rts via hard-link at configure time. This is safer@@ -39,7 +38,7 @@ custom-setup- setup-depends: base >= 3 && < 5, Cabal >= 1.6 && <3.10, directory, process, filepath+ setup-depends: base >= 3 && < 5, Cabal >= 1.6 && <3.10, directory, process, filepath, containers Flag internal-interpreter Description: Build with internal interpreter support.@@ -57,6 +56,20 @@ Description: Use build-tool-depends Default: True +Flag with-libzstd+ Default: False+ Manual: True++Flag static-libzstd+ Default: False+ Manual: True++-- While the boot compiler fixes ghc's unit-id to `ghc`, the stage0 compiler must still be compiled with `-this-unit-id ghc`+Flag hadrian-stage0+ Description: Enable if compiling the stage0 compiler with hadrian+ Default: False+ Manual: True+ Library Default-Language: Haskell2010 Exposed: False@@ -71,24 +84,35 @@ if flag(build-tool-depends) build-tool-depends: alex:alex >= 3.2.6, happy:happy >= 1.20.0, genprimopcode:genprimopcode, deriveConstants:deriveConstants - Build-Depends: base >= 4.11 && < 4.19,- deepseq >= 1.4 && < 1.5,+ if flag(with-libzstd)+ if flag(static-libzstd)+ if os(darwin)+ buildable: False+ else+ extra-libraries: :libzstd.a+ else+ extra-libraries: zstd+ CPP-Options: -DHAVE_LIBZSTD++ Build-Depends: base >= 4.11 && < 4.20,+ deepseq >= 1.4 && < 1.6, directory >= 1 && < 1.4, process >= 1 && < 1.7,- bytestring >= 0.9 && < 0.12,+ bytestring >= 0.9 && < 0.13, binary == 0.8.*, time >= 1.4 && < 1.13, containers >= 0.6.2.1 && < 0.7, array >= 0.1 && < 0.6, filepath >= 1 && < 1.5,- template-haskell == 2.20.*,- hpc == 0.6.*,+ template-haskell == 2.21.*,+ hpc >= 0.6 && < 0.8, transformers >= 0.5 && < 0.7, exceptions == 0.10.*,+ semaphore-compat, stm,- ghc-boot == 9.6.7,- ghc-heap == 9.6.7,- ghci == 9.6.7+ ghc-boot == 9.8.1,+ ghc-heap == 9.8.1,+ ghci == 9.8.1 if os(windows) Build-Depends: Win32 >= 2.3 && < 2.14@@ -136,15 +160,12 @@ Include-Dirs: . - -- We need to set the unit id to ghc (without a version number)- -- as it's magic.- GHC-Options: -this-unit-id ghc+ if flag(hadrian-stage0)+ -- We need to set the unit id to ghc (without a version number)+ -- as it's magic.+ GHC-Options: -this-unit-id ghc - if arch(javascript)- js-sources:- jsbits/genSym.js- else- c-sources:+ c-sources: cbits/cutils.c cbits/genSym.c cbits/keepCAFsForGHCi.c@@ -307,6 +328,7 @@ GHC.Core.Opt.Arity GHC.Core.Opt.CallArity GHC.Core.Opt.CallerCC+ GHC.Core.Opt.CallerCC.Types GHC.Core.Opt.ConstantFold GHC.Core.Opt.CprAnal GHC.Core.Opt.CSE@@ -322,6 +344,7 @@ GHC.Core.Opt.SetLevels GHC.Core.Opt.Simplify GHC.Core.Opt.Simplify.Env+ GHC.Core.Opt.Simplify.Inline GHC.Core.Opt.Simplify.Iteration GHC.Core.Opt.Simplify.Monad GHC.Core.Opt.Simplify.Utils@@ -394,13 +417,6 @@ GHC.Data.TrieMap GHC.Data.Unboxed GHC.Data.UnionFind- GHC.Data.Word64Set- GHC.Data.Word64Set.Internal- GHC.Data.Word64Map- GHC.Data.Word64Map.Internal- GHC.Data.Word64Map.Lazy- GHC.Data.Word64Map.Strict- GHC.Data.Word64Map.Strict.Internal GHC.Driver.Backend GHC.Driver.Backend.Internal GHC.Driver.Backpack@@ -436,6 +452,7 @@ GHC.Driver.Config.StgToCmm GHC.Driver.Config.Tidy GHC.Driver.Config.StgToJS+ GHC.Driver.DynFlags GHC.Driver.Env GHC.Driver.Env.KnotVars GHC.Driver.Env.Types@@ -446,6 +463,7 @@ GHC.Driver.GenerateCgIPEStub GHC.Driver.Hooks GHC.Driver.LlvmConfigCache+ GHC.Driver.MakeSem GHC.Driver.Main GHC.Driver.Make GHC.Driver.MakeFile@@ -511,8 +529,11 @@ GHC.Hs.Type GHC.Hs.Utils GHC.Iface.Binary+ GHC.Iface.Decl GHC.Iface.Env GHC.Iface.Errors+ GHC.Iface.Errors.Types+ GHC.Iface.Errors.Ppr GHC.Iface.Ext.Ast GHC.Iface.Ext.Binary GHC.Iface.Ext.Debug@@ -531,11 +552,14 @@ GHC.IfaceToCore GHC.Iface.Type GHC.JS.Make+ GHC.JS.Optimizer GHC.JS.Ppr GHC.JS.Syntax GHC.JS.Transform+ GHC.JS.Unsat.Syntax GHC.Linker GHC.Linker.Config+ GHC.Linker.Deps GHC.Linker.Dynamic GHC.Linker.ExtraObj GHC.Linker.Loader@@ -567,6 +591,7 @@ GHC.Platform.ARM GHC.Platform.AArch64 GHC.Platform.Constants+ GHC.Platform.LoongArch64 GHC.Platform.NoRegs GHC.Platform.PPC GHC.Platform.Profile@@ -574,7 +599,6 @@ GHC.Platform.Reg.Class GHC.Platform.Regs GHC.Platform.RISCV64- GHC.Platform.LoongArch64 GHC.Platform.S390X GHC.Platform.Wasm32 GHC.Platform.Ways@@ -602,8 +626,11 @@ GHC.Runtime.Heap.Inspect GHC.Runtime.Heap.Layout GHC.Runtime.Interpreter+ GHC.Runtime.Interpreter.JS+ GHC.Runtime.Interpreter.Process GHC.Runtime.Interpreter.Types GHC.Runtime.Loader+ GHC.Runtime.Utils GHC.Settings GHC.Settings.Config GHC.Settings.Constants@@ -616,6 +643,7 @@ GHC.Stg.Lift.Analysis GHC.Stg.Lift.Config GHC.Stg.Lift.Monad+ GHC.Stg.Lift.Types GHC.Stg.Lint GHC.Stg.InferTags GHC.Stg.InferTags.Rewrite@@ -656,7 +684,6 @@ GHC.StgToJS.Arg GHC.StgToJS.Closure GHC.StgToJS.CodeGen- GHC.StgToJS.CoreUtils GHC.StgToJS.DataCon GHC.StgToJS.Deps GHC.StgToJS.Expr@@ -669,20 +696,19 @@ GHC.StgToJS.Object GHC.StgToJS.Prim GHC.StgToJS.Profiling- GHC.StgToJS.Printer GHC.StgToJS.Regs GHC.StgToJS.Rts.Types GHC.StgToJS.Rts.Rts GHC.StgToJS.Sinker GHC.StgToJS.Stack GHC.StgToJS.StaticPtr- GHC.StgToJS.StgUtils GHC.StgToJS.Symbols GHC.StgToJS.Types GHC.StgToJS.Utils GHC.StgToJS.Linker.Linker GHC.StgToJS.Linker.Types GHC.StgToJS.Linker.Utils+ GHC.StgToJS.Linker.Opt GHC.Stg.Unarise GHC.SysTools GHC.SysTools.Ar@@ -702,8 +728,10 @@ GHC.Tc.Errors GHC.Tc.Errors.Hole GHC.Tc.Errors.Hole.FitTypes+ GHC.Tc.Errors.Hole.Plugin GHC.Tc.Errors.Ppr GHC.Tc.Errors.Types+ GHC.Tc.Errors.Types.PromotionErr GHC.Tc.Gen.Annotation GHC.Tc.Gen.App GHC.Tc.Gen.Arrow@@ -726,10 +754,12 @@ GHC.Tc.Module GHC.Tc.Plugin GHC.Tc.Solver- GHC.Tc.Solver.Canonical GHC.Tc.Solver.Rewrite GHC.Tc.Solver.InertSet- GHC.Tc.Solver.Interact+ GHC.Tc.Solver.Solve+ GHC.Tc.Solver.Irred+ GHC.Tc.Solver.Equality+ GHC.Tc.Solver.Dict GHC.Tc.Solver.Monad GHC.Tc.Solver.Types GHC.Tc.TyCl@@ -744,6 +774,12 @@ GHC.Tc.Types.EvTerm GHC.Tc.Types.Origin GHC.Tc.Types.Rank+ GHC.Tc.Types.CtLocEnv+ GHC.Tc.Types.ErrCtxt+ GHC.Tc.Types.LclEnv+ GHC.Tc.Types.TH+ GHC.Tc.Types.TcRef+ GHC.Tc.Types.BasicTypes GHC.Tc.Utils.Backpack GHC.Tc.Utils.Concrete GHC.Tc.Utils.Env@@ -752,8 +788,11 @@ GHC.Tc.Utils.TcMType GHC.Tc.Utils.TcType GHC.Tc.Utils.Unify- GHC.Tc.Utils.Zonk GHC.Tc.Validity+ GHC.Tc.Zonk.Env+ GHC.Tc.Zonk.Monad+ GHC.Tc.Zonk.TcType+ GHC.Tc.Zonk.Type GHC.ThToHs GHC.Types.Annotations GHC.Types.Avail@@ -771,6 +810,7 @@ GHC.Types.Fixity.Env GHC.Types.ForeignCall GHC.Types.ForeignStubs+ GHC.Types.GREInfo GHC.Types.Hint GHC.Types.Hint.Ppr GHC.Types.HpcInfo@@ -792,6 +832,7 @@ GHC.Types.ProfAuto GHC.Types.RepType GHC.Types.SafeHaskell+ GHC.Types.SaneDouble GHC.Types.SourceError GHC.Types.SourceFile GHC.Types.SourceText@@ -843,8 +884,6 @@ GHC.Utils.BufHandle GHC.Utils.CliOption GHC.Utils.Constants- GHC.Utils.Containers.Internal.BitUtil- GHC.Utils.Containers.Internal.StrictPair GHC.Utils.Error GHC.Utils.Exception GHC.Utils.Fingerprint@@ -856,6 +895,7 @@ GHC.Utils.Logger GHC.Utils.Misc GHC.Utils.Monad+ GHC.Utils.Monad.Codensity GHC.Utils.Monad.State.Strict GHC.Utils.Outputable GHC.Utils.Panic@@ -864,8 +904,6 @@ GHC.Utils.Ppr.Colour GHC.Utils.TmpFs GHC.Utils.Trace- GHC.Utils.Unique- GHC.Utils.Word64 GHC.Wasm.ControlFlow GHC.Wasm.ControlFlow.FromCmm GHC.CmmToAsm.Wasm
− jsbits/genSym.js
@@ -1,26 +0,0 @@-//#OPTIONS: CPP-#include "Unique.h"--// We assume that the unique tag occupies less than 32 bits (should be safe)-#define HIGH_UNIQUE_BITS (32 - UNIQUE_TAG_BITS)-#define HIGH_UNIQUE_MASK ((1 << HIGH_UNIQUE_BITS) - 1)--// The 'ghc_unique_inc' and 'ghc_unique_counter64' are in the native RTS. It allows them to be-// shared with plugins even if two different instances of the GHC library are-// loaded at the same time (#19940)-// However, cross compilers do not support plugins so we have moved these globals back-// into the compiler.-var h$ghc_unique_inc = h$newByteArray(4);-h$ghc_unique_inc.i3[0] = 1;-var h$ghc_unique_counter64 = h$newByteArray(8);-h$ghc_unique_counter64.i3[0] = 0;-h$ghc_unique_counter64.i3[1] = 0;--function h$genSym() {- var rl = h$hs_plusWord64(h$ghc_unique_counter64.i3[1] >>> 0, h$ghc_unique_counter64.i3[0] >>> 0, 0, h$ghc_unique_inc.i3[0] >>> 0);- h$ret1 = (h$ret1 & HIGH_UNIQUE_MASK) >>> 0;- // h$ret1 contains the higher part (rh)- h$ghc_unique_counter64.i3[0] = rl | 0;- h$ghc_unique_counter64.i3[1] = h$ret1 | 0;- return rl; // h$ret1 still contains rh-}